@gisce/ooui 2.40.0-alpha.7 → 2.40.0-alpha.9

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,16 +1,16 @@
1
- var xt = Object.defineProperty;
2
- var pt = (s, e, t) => e in s ? xt(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
- var r = (s, e, t) => (pt(s, typeof e != "symbol" ? e + "" : e, t), t);
4
- import { decode as wt } from "html-entities";
5
- import { evaluateCondition as Ft } from "@gisce/conscheck";
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
6
  import * as I from "txml";
7
7
  import T from "moment";
8
- const vt = (s = !1) => (s = JSON.parse(s.toString().toLowerCase()), +s > 0), Ct = ({
8
+ const Ct = (s = !1) => (s = JSON.parse(s.toString().toLowerCase()), +s > 0), kt = ({
9
9
  entry: s,
10
10
  values: e,
11
11
  fields: t
12
12
  }) => {
13
- let [i, n, l] = s, o = e[i];
13
+ let [i, r, l] = s, o = e[i];
14
14
  const a = U({
15
15
  fieldName: i,
16
16
  valueInObject: o,
@@ -19,7 +19,7 @@ const vt = (s = !1) => (s = JSON.parse(s.toString().toLowerCase()), +s > 0), Ct
19
19
  });
20
20
  if (a.directOutcome !== void 0)
21
21
  return a.directOutcome;
22
- switch (a.modifiedValueInObject !== null && (o = a.modifiedValueInObject), a.modifiedExpectedValue !== null && (l = a.modifiedExpectedValue), n.toLowerCase()) {
22
+ switch (a.modifiedValueInObject !== null && (o = a.modifiedValueInObject), a.modifiedExpectedValue !== null && (l = a.modifiedExpectedValue), r.toLowerCase()) {
23
23
  case "=":
24
24
  case "==":
25
25
  return o == l;
@@ -41,13 +41,13 @@ const vt = (s = !1) => (s = JSON.parse(s.toString().toLowerCase()), +s > 0), Ct
41
41
  default:
42
42
  return !1;
43
43
  }
44
- }, g = (s) => wt(s, { level: "xml" }), U = ({
44
+ }, g = (s) => Ft(s, { level: "xml" }), U = ({
45
45
  fieldName: s,
46
46
  valueInObject: e,
47
47
  expectedValue: t,
48
48
  fields: i = {}
49
49
  }) => {
50
- const n = {
50
+ const r = {
51
51
  modifiedValueInObject: e,
52
52
  modifiedExpectedValue: null,
53
53
  directOutcome: void 0
@@ -60,7 +60,7 @@ const vt = (s = !1) => (s = JSON.parse(s.toString().toLowerCase()), +s > 0), Ct
60
60
  modifiedValueInObject: null,
61
61
  modifiedExpectedValue: null,
62
62
  directOutcome: !1
63
- } : (n.modifiedValueInObject = i[s].type === "boolean" ? !!e : e, i[s].type === "many2one" && t === !1 && e === void 0 ? n.modifiedExpectedValue = void 0 : (n.modifiedValueInObject === void 0 ? n.modifiedValueInObject = !1 : Array.isArray(n.modifiedValueInObject) && n.modifiedValueInObject[0] !== void 0 && (n.modifiedValueInObject = n.modifiedValueInObject[0]), n.modifiedValueInObject === null && (n.modifiedValueInObject = !1)), i[s].type === "many2one" && Array.isArray(n.modifiedValueInObject) && n.modifiedValueInObject[0] === void 0 && (n.modifiedValueInObject = !1), i[s].type === "boolean" && (t === 0 || t === 1) && (n.modifiedExpectedValue = t !== 0), n);
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
64
  }, Q = ({
65
65
  attrs: s,
66
66
  values: e,
@@ -69,7 +69,7 @@ const vt = (s = !1) => (s = JSON.parse(s.toString().toLowerCase()), +s > 0), Ct
69
69
  }) => {
70
70
  const c = s.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) => Ct({ entry: y, values: e, fields: t })).every((y) => y);
72
+ const x = u[m].map((y) => kt({ entry: y, values: e, fields: t })).every((y) => y);
73
73
  x ? h[m] = !0 : m === "readonly" && !x && i === "button" && (h[m] = !1);
74
74
  }
75
75
  return h;
@@ -84,18 +84,18 @@ const vt = (s = !1) => (s = JSON.parse(s.toString().toLowerCase()), +s > 0), Ct
84
84
  }
85
85
  else
86
86
  return s;
87
- }, kt = ({
87
+ }, Pt = ({
88
88
  attrs: s,
89
89
  values: e,
90
90
  fields: t,
91
91
  widgetType: i
92
92
  }) => {
93
93
  try {
94
- const n = g(s), l = JSON.parse(
95
- n.replace(/'/g, '"')
94
+ const r = g(s), l = JSON.parse(
95
+ r.replace(/'/g, '"')
96
96
  ), o = {};
97
97
  for (const a of Object.keys(l)) {
98
- const c = Ft({
98
+ const c = vt({
99
99
  object: e,
100
100
  condition: l[a],
101
101
  evaluateFieldComparison: ({
@@ -112,29 +112,29 @@ const vt = (s = !1) => (s = JSON.parse(s.toString().toLowerCase()), +s > 0), Ct
112
112
  c ? o[a] = !0 : a === "readonly" && !c && i === "button" && (o[a] = !1);
113
113
  }
114
114
  return o;
115
- } catch (n) {
116
- throw console.error(n), n instanceof SyntaxError ? new Error(
115
+ } catch (r) {
116
+ throw console.error(r), r instanceof SyntaxError ? new Error(
117
117
  "Error parsing new json_attrs. Original string: " + s
118
- ) : n;
118
+ ) : r;
119
119
  }
120
120
  }, tt = ({
121
121
  tagAttributes: s,
122
122
  values: e,
123
123
  fields: t,
124
124
  widgetType: i,
125
- fallbackMode: n = !0
125
+ fallbackMode: r = !0
126
126
  }) => {
127
127
  let l = {};
128
128
  if (s.json_attrs)
129
129
  try {
130
- l = kt({
130
+ l = Pt({
131
131
  attrs: s.json_attrs,
132
132
  values: e,
133
133
  fields: t,
134
134
  widgetType: i
135
135
  });
136
136
  } catch (o) {
137
- if (n && s.attrs)
137
+ if (r && s.attrs)
138
138
  l = Q({
139
139
  attrs: s.attrs,
140
140
  values: e,
@@ -162,38 +162,38 @@ const vt = (s = !1) => (s = JSON.parse(s.toString().toLowerCase()), +s > 0), Ct
162
162
  /**
163
163
  * Determines if widget is read only (default is undefined)
164
164
  */
165
- r(this, "_readOnly");
165
+ n(this, "_readOnly");
166
166
  /**
167
167
  * Column span (default is 1)
168
168
  */
169
- r(this, "_colspan");
169
+ n(this, "_colspan");
170
170
  /**
171
171
  * Invisible fields (default is false)
172
172
  */
173
- r(this, "_invisible");
173
+ n(this, "_invisible");
174
174
  /**
175
175
  * Widget type
176
176
  */
177
- r(this, "_type", "");
177
+ n(this, "_type", "");
178
178
  /**
179
179
  * Context
180
180
  */
181
- r(this, "_context");
181
+ n(this, "_context");
182
182
  /**
183
183
  * Domain
184
184
  */
185
- r(this, "_domain");
185
+ n(this, "_domain");
186
186
  /**
187
187
  * Unique key for widget
188
188
  */
189
- r(this, "_key");
190
- r(this, "_parsedWidgetProps", {});
191
- r(this, "_isFunction");
192
- r(this, "_isSortable", !1);
189
+ n(this, "_key");
190
+ n(this, "_parsedWidgetProps", {});
191
+ n(this, "_isFunction");
192
+ n(this, "_isSortable", !1);
193
193
  /**
194
194
  * Base type of the field
195
195
  */
196
- r(this, "_fieldType", "");
196
+ n(this, "_fieldType", "");
197
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));
198
198
  }
199
199
  static get defaultColspan() {
@@ -266,7 +266,7 @@ const vt = (s = !1) => (s = JSON.parse(s.toString().toLowerCase()), +s > 0), Ct
266
266
  /**
267
267
  * Default colspan
268
268
  */
269
- r(P, "_defaultColspan", 1);
269
+ n(P, "_defaultColspan", 1);
270
270
  let k = P;
271
271
  class f extends k {
272
272
  constructor(t) {
@@ -276,47 +276,47 @@ class f extends k {
276
276
  *
277
277
  * Corresponds to the field's name attribute from xml
278
278
  */
279
- r(this, "_id", "");
279
+ n(this, "_id", "");
280
280
  /**
281
281
  * Label
282
282
  */
283
- r(this, "_label", "");
283
+ n(this, "_label", "");
284
284
  /**
285
285
  * No label
286
286
  *
287
287
  * This field hasn't got to show the label
288
288
  *
289
289
  */
290
- r(this, "_nolabel", !1);
290
+ n(this, "_nolabel", !1);
291
291
  /**
292
292
  *
293
293
  * Required field
294
294
  *
295
295
  */
296
- r(this, "_required", !1);
296
+ n(this, "_required", !1);
297
297
  /**
298
298
  * Tooltip
299
299
  */
300
- r(this, "_tooltip");
300
+ n(this, "_tooltip");
301
301
  /**
302
302
  * Tooltip inline
303
303
  */
304
- r(this, "_tooltipInline", !1);
304
+ n(this, "_tooltipInline", !1);
305
305
  /**
306
306
  * Activated (default is true)
307
307
  */
308
- r(this, "_activated", !0);
308
+ n(this, "_activated", !0);
309
309
  /**
310
310
  * Sum - sum parameter (label), this will mean that we have to sum this field in the tree
311
311
  */
312
- r(this, "_sum");
312
+ n(this, "_sum");
313
313
  /**
314
314
  * Values and keys
315
315
  */
316
- r(this, "_selectionValues", /* @__PURE__ */ new Map([]));
317
- r(this, "_autoRefresh", !1);
318
- r(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 = vt(t.help_inline)), t.autorefresh && (this.autoRefresh = p(t.autorefresh)));
316
+ n(this, "_selectionValues", /* @__PURE__ */ new Map([]));
317
+ n(this, "_autoRefresh", !1);
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)));
320
320
  }
321
321
  get id() {
322
322
  return this._id;
@@ -401,7 +401,7 @@ class f extends k {
401
401
  return this._id === t ? this : null;
402
402
  }
403
403
  }
404
- class Pt extends f {
404
+ class Ot extends f {
405
405
  }
406
406
  class et extends k {
407
407
  findById(e) {
@@ -414,23 +414,23 @@ class st extends f {
414
414
  /**
415
415
  * Label text
416
416
  */
417
- r(this, "_text", "");
417
+ n(this, "_text", "");
418
418
  /**
419
419
  * Align text
420
420
  */
421
- r(this, "_align", "left");
421
+ n(this, "_align", "left");
422
422
  /**
423
423
  * Label type
424
424
  */
425
- r(this, "_labelType", "default");
425
+ n(this, "_labelType", "default");
426
426
  /**
427
427
  * Label size
428
428
  */
429
- r(this, "_labelSize");
429
+ n(this, "_labelSize");
430
430
  /**
431
431
  * Id of the field that this label goes with. Null if it's an independent label
432
432
  */
433
- r(this, "_fieldForLabel", null);
433
+ n(this, "_fieldForLabel", null);
434
434
  t != null && t.fieldForLabel && (this._fieldForLabel = t.fieldForLabel), t.widget_props && (this.parsedWidgetProps.label_type && (this.labelType = this.parsedWidgetProps.label_type), this.parsedWidgetProps.label_size && (this.labelSize = this.parsedWidgetProps.label_size)), t != null && t.align && (this.align = t.align);
435
435
  }
436
436
  get text() {
@@ -469,29 +469,29 @@ class st extends f {
469
469
  }
470
470
  }
471
471
  class z {
472
- constructor(e = 4, t = 6, i = !1, n = void 0) {
472
+ constructor(e = 4, t = 6, i = !1, r = void 0) {
473
473
  /**
474
474
  * Number of columns the container is divided
475
475
  */
476
- r(this, "_columns");
476
+ n(this, "_columns");
477
477
  /**
478
478
  * Number of columns to use
479
479
  */
480
- r(this, "_colspan");
480
+ n(this, "_colspan");
481
481
  /**
482
482
  * Number of rows
483
483
  */
484
- r(this, "_rows");
485
- r(this, "_index");
484
+ n(this, "_rows");
485
+ n(this, "_index");
486
486
  /**
487
487
  * Determines if widget is read only (default is false)
488
488
  */
489
- r(this, "_readOnly");
489
+ n(this, "_readOnly");
490
490
  /**
491
491
  * Unique key for container
492
492
  */
493
- r(this, "_key");
494
- this._columns = e, this._colspan = t, this._rows = [[]], this._index = 0, this._readOnly = i, this._key = n;
493
+ n(this, "_key");
494
+ this._columns = e, this._colspan = t, this._rows = [[]], this._index = 0, this._readOnly = i, this._key = r;
495
495
  }
496
496
  get columns() {
497
497
  return this._columns;
@@ -534,12 +534,12 @@ class z {
534
534
  return this._columns - e;
535
535
  }
536
536
  addWidget(e, t) {
537
- const i = [], n = t ? t.addLabel : !0;
537
+ const i = [], r = t ? t.addLabel : !0;
538
538
  if (e instanceof et) {
539
539
  this._rows.push([]), this._index++;
540
540
  return;
541
541
  }
542
- if (e.colspan > this._columns && (e.colspan = this._columns), e.readOnly = e.readOnly || this.readOnly, n && e instanceof f && !e.nolabel) {
542
+ if (e.colspan > this._columns && (e.colspan = this._columns), e.readOnly = e.readOnly || this.readOnly, r && e instanceof f && !e.nolabel) {
543
543
  e.colspan > 1 && (e.colspan -= 1);
544
544
  const o = new st({
545
545
  name: e.id + "_label",
@@ -564,8 +564,8 @@ class z {
564
564
  findById(e) {
565
565
  var i;
566
566
  let t = null;
567
- return (i = this._rows) != null && i.length && this._rows.forEach((n) => {
568
- t || n != null && n.length && n.forEach((l) => {
567
+ return (i = this._rows) != null && i.length && this._rows.forEach((r) => {
568
+ t || r != null && r.length && r.forEach((l) => {
569
569
  t || l && (t = l.findById(e));
570
570
  });
571
571
  }), t;
@@ -579,19 +579,19 @@ const O = class O extends k {
579
579
  *
580
580
  * Corresponds to the field's name attribute from xml
581
581
  */
582
- r(this, "_id", "");
582
+ n(this, "_id", "");
583
583
  /**
584
584
  * Container
585
585
  */
586
- r(this, "_container");
586
+ n(this, "_container");
587
587
  /**
588
588
  * Must expand widget
589
589
  */
590
- r(this, "_mustExpand", !1);
590
+ n(this, "_mustExpand", !1);
591
591
  /**
592
592
  * Container label
593
593
  */
594
- r(this, "_label", "");
594
+ n(this, "_label", "");
595
595
  this._container = new z(
596
596
  t == null ? void 0 : t.col,
597
597
  O._defaultColspan,
@@ -643,13 +643,13 @@ const O = class O extends k {
643
643
  return t === this.id ? this : this.container.findById(t);
644
644
  }
645
645
  };
646
- r(O, "_defaultColspan", 6);
646
+ n(O, "_defaultColspan", 6);
647
647
  let F = O;
648
648
  const W = class W extends F {
649
649
  constructor(t) {
650
650
  super(t);
651
- r(this, "_tabPosition", "top");
652
- r(this, "_pages", []);
651
+ n(this, "_tabPosition", "top");
652
+ n(this, "_pages", []);
653
653
  this.colspan = W._defaultColspan, t && (t.colspan && (this.colspan = t.colspan), t.tabpos && (this._tabPosition = t.tabpos));
654
654
  }
655
655
  static get defaultColspan() {
@@ -668,12 +668,12 @@ const W = class W extends F {
668
668
  return [].concat.apply([], this._container.rows);
669
669
  }
670
670
  };
671
- r(W, "_defaultColspan", 3);
671
+ n(W, "_defaultColspan", 3);
672
672
  let B = W;
673
673
  class N extends F {
674
674
  constructor(t) {
675
675
  super(t);
676
- r(this, "_loading", !1);
676
+ n(this, "_loading", !1);
677
677
  t && t.loading && (this._loading = t.loading);
678
678
  }
679
679
  get loading() {
@@ -683,10 +683,10 @@ class N extends F {
683
683
  this._loading = t;
684
684
  }
685
685
  }
686
- class Ot extends N {
686
+ class Wt extends N {
687
687
  constructor(t) {
688
688
  super(t);
689
- r(this, "_icon", null);
689
+ n(this, "_icon", null);
690
690
  t.icon && (this._icon = t.icon);
691
691
  }
692
692
  get icon() {
@@ -696,13 +696,13 @@ class Ot extends N {
696
696
  this._icon = t;
697
697
  }
698
698
  }
699
- class Wt extends N {
699
+ class Tt extends N {
700
700
  constructor(t) {
701
701
  var i;
702
702
  super(t);
703
- r(this, "_icon", null);
704
- r(this, "_height");
705
- r(this, "_backgroundColor");
703
+ n(this, "_icon", null);
704
+ n(this, "_height");
705
+ n(this, "_backgroundColor");
706
706
  if (t && (t.icon && (this._icon = t.icon), t.height))
707
707
  try {
708
708
  this._height = parseInt(t.height);
@@ -739,21 +739,21 @@ class A extends f {
739
739
  /**
740
740
  * Type
741
741
  */
742
- r(this, "_buttonType", "workflow");
742
+ n(this, "_buttonType", "workflow");
743
743
  /**
744
744
  * Button caption
745
745
  */
746
- r(this, "_caption", "");
746
+ n(this, "_caption", "");
747
747
  /**
748
748
  * Button icon
749
749
  */
750
- r(this, "_icon");
750
+ n(this, "_icon");
751
751
  /**
752
752
  * Confirm string for modal in button types workflow
753
753
  */
754
- r(this, "_confirmMessage", "");
755
- r(this, "_primary", !1);
756
- r(this, "_danger", !1);
754
+ n(this, "_confirmMessage", "");
755
+ n(this, "_primary", !1);
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
759
  const i = t.primary;
@@ -802,10 +802,10 @@ class A extends f {
802
802
  this._danger = t;
803
803
  }
804
804
  }
805
- class Tt extends F {
805
+ class zt extends F {
806
806
  constructor(t) {
807
807
  super(t);
808
- r(this, "_defaultName", "");
808
+ n(this, "_defaultName", "");
809
809
  t.default && (this._defaultName = t.default);
810
810
  }
811
811
  get defaultName() {
@@ -824,8 +824,8 @@ class Tt extends F {
824
824
  get secondaryButtons() {
825
825
  return this.buttons.filter(
826
826
  (i) => {
827
- var n;
828
- return i.id !== ((n = this.defaultButton) == null ? void 0 : n.id);
827
+ var r;
828
+ return i.id !== ((r = this.defaultButton) == null ? void 0 : r.id);
829
829
  }
830
830
  );
831
831
  }
@@ -833,7 +833,7 @@ class Tt extends F {
833
833
  return this._container.rows.flat().filter((t) => !t.invisible);
834
834
  }
835
835
  }
836
- class zt extends f {
836
+ class It extends f {
837
837
  }
838
838
  class R extends f {
839
839
  constructor(t) {
@@ -841,13 +841,13 @@ class R extends f {
841
841
  /**
842
842
  * Field place holder
843
843
  */
844
- r(this, "_placeholder", "");
844
+ n(this, "_placeholder", "");
845
845
  /**
846
846
  * Field size
847
847
  */
848
- r(this, "_size");
849
- r(this, "_isPassword", !1);
850
- r(this, "_translatable", !1);
848
+ n(this, "_size");
849
+ n(this, "_isPassword", !1);
850
+ n(this, "_translatable", !1);
851
851
  t && (t.size && (this._size = t.size), t.password && (this.isPassword = t.password === "True"), t.translate && (this.translatable = t.translate === "True" || t.translate === !0));
852
852
  }
853
853
  get placeholder() {
@@ -884,20 +884,20 @@ class $ extends f {
884
884
  /**
885
885
  * Field place holder
886
886
  */
887
- r(this, "_placeholder", "");
887
+ n(this, "_placeholder", "");
888
888
  /**
889
889
  * Field size
890
890
  */
891
- r(this, "_size");
891
+ n(this, "_size");
892
892
  /**
893
893
  * Must expand widget
894
894
  */
895
- r(this, "_mustExpand", !1);
895
+ n(this, "_mustExpand", !1);
896
896
  /**
897
897
  * Height
898
898
  */
899
- r(this, "_height");
900
- r(this, "_translatable", !1);
899
+ n(this, "_height");
900
+ n(this, "_translatable", !1);
901
901
  if (t) {
902
902
  if (t.placeholder && (this._placeholder = g(t.placeholder)), t.colspan || (this._mustExpand = !0), t.height)
903
903
  try {
@@ -948,7 +948,7 @@ class S extends f {
948
948
  /**
949
949
  * Field size
950
950
  */
951
- r(this, "_size", 150);
951
+ n(this, "_size", 150);
952
952
  t && t.size && (this._size = t.size);
953
953
  }
954
954
  get size() {
@@ -958,17 +958,17 @@ class S extends f {
958
958
  this._size = t;
959
959
  }
960
960
  }
961
- class It extends f {
961
+ class St extends f {
962
962
  constructor(t) {
963
963
  super(t);
964
964
  /**
965
965
  * Field size
966
966
  */
967
- r(this, "_size", 150);
967
+ n(this, "_size", 150);
968
968
  /**
969
969
  * Relation
970
970
  */
971
- r(this, "_relation", "");
971
+ n(this, "_relation", "");
972
972
  t && (t.size && (this._size = t.size), t.relation && (this._relation = t.relation));
973
973
  }
974
974
  get size() {
@@ -993,14 +993,14 @@ class It extends f {
993
993
  return this.parsedWidgetProps.showMenu;
994
994
  }
995
995
  }
996
- class St extends $ {
996
+ class Et extends $ {
997
997
  }
998
998
  class it extends f {
999
999
  constructor(e) {
1000
1000
  super(e);
1001
1001
  }
1002
1002
  }
1003
- class Et extends f {
1003
+ class Vt extends f {
1004
1004
  constructor(e) {
1005
1005
  super(e);
1006
1006
  }
@@ -1013,16 +1013,16 @@ class q extends f {
1013
1013
  *
1014
1014
  * Number of integer digits that will be part of the float
1015
1015
  */
1016
- r(this, "_integerDigits", 16);
1016
+ n(this, "_integerDigits", 16);
1017
1017
  /**
1018
1018
  * Decimal digits
1019
1019
  *
1020
1020
  * Number of decimal digits that will be part of the float
1021
1021
  */
1022
- r(this, "_decimalDigits", 2);
1022
+ n(this, "_decimalDigits", 2);
1023
1023
  if (t != null && t.digits) {
1024
- const [i, n] = t.digits;
1025
- this._integerDigits = i, this._decimalDigits = n;
1024
+ const [i, r] = t.digits;
1025
+ this._integerDigits = i, this._decimalDigits = r;
1026
1026
  }
1027
1027
  }
1028
1028
  get integerDigits() {
@@ -1038,21 +1038,21 @@ class q extends f {
1038
1038
  this._decimalDigits = t;
1039
1039
  }
1040
1040
  }
1041
- class Vt extends q {
1041
+ class Yt extends q {
1042
1042
  }
1043
- class Yt extends f {
1043
+ class Dt extends f {
1044
1044
  }
1045
- class Dt extends q {
1045
+ class jt extends q {
1046
1046
  }
1047
- class jt extends f {
1047
+ class Nt extends f {
1048
1048
  constructor(e) {
1049
1049
  super(e);
1050
1050
  }
1051
1051
  }
1052
- class Nt extends f {
1052
+ class At extends f {
1053
1053
  constructor(t) {
1054
1054
  super(t);
1055
- r(this, "_timezone");
1055
+ n(this, "_timezone");
1056
1056
  this._timezone = (t == null ? void 0 : t.timezone) || void 0;
1057
1057
  }
1058
1058
  get timezone() {
@@ -1062,41 +1062,41 @@ class Nt extends f {
1062
1062
  this._timezone = t;
1063
1063
  }
1064
1064
  }
1065
- class rt extends f {
1065
+ class nt extends f {
1066
1066
  constructor(t) {
1067
1067
  super(t);
1068
1068
  /**
1069
1069
  * Field size
1070
1070
  */
1071
- r(this, "_size", 150);
1071
+ n(this, "_size", 150);
1072
1072
  /**
1073
1073
  * Relation
1074
1074
  */
1075
- r(this, "_relation", "");
1075
+ n(this, "_relation", "");
1076
1076
  /**
1077
1077
  * Inv_field
1078
1078
  */
1079
- r(this, "_inv_field");
1079
+ n(this, "_inv_field");
1080
1080
  /**
1081
1081
  * Views
1082
1082
  */
1083
- r(this, "_views", null);
1083
+ n(this, "_views", null);
1084
1084
  /**
1085
1085
  * Mode
1086
1086
  */
1087
- r(this, "_mode", []);
1087
+ n(this, "_mode", []);
1088
1088
  /**
1089
1089
  * Must expand widget
1090
1090
  */
1091
- r(this, "_mustExpand", !1);
1091
+ n(this, "_mustExpand", !1);
1092
1092
  /**
1093
1093
  * Height
1094
1094
  */
1095
- r(this, "_height");
1095
+ n(this, "_height");
1096
1096
  /**
1097
1097
  * Infinite mode
1098
1098
  */
1099
- r(this, "_infinite");
1099
+ n(this, "_infinite");
1100
1100
  if (t) {
1101
1101
  if (t.size && (this._size = t.size), t.relation && (this._relation = t.relation), t.mode && (this._mode = t.mode.split(",")), t.views && (this._views = t.views), t.colspan ? this.colspan = t.colspan : this._mustExpand = !0, t.inv_field && (this._inv_field = t.inv_field), t.height)
1102
1102
  try {
@@ -1156,14 +1156,14 @@ class rt extends f {
1156
1156
  this._infinite = t;
1157
1157
  }
1158
1158
  }
1159
- class At extends k {
1159
+ class Mt extends k {
1160
1160
  constructor(t) {
1161
1161
  super(t);
1162
1162
  /**
1163
1163
  * Label
1164
1164
  */
1165
- r(this, "_label", "");
1166
- r(this, "_icon", null);
1165
+ n(this, "_label", "");
1166
+ n(this, "_icon", null);
1167
1167
  t && (t.string && (this._label = g(t.string)), t.icon && (this._icon = t.icon));
1168
1168
  }
1169
1169
  get label() {
@@ -1182,15 +1182,15 @@ class At extends k {
1182
1182
  return null;
1183
1183
  }
1184
1184
  }
1185
- class Mt extends S {
1185
+ class Bt extends S {
1186
1186
  }
1187
- class Bt extends f {
1187
+ class Rt extends f {
1188
1188
  constructor(t) {
1189
1189
  super(t);
1190
1190
  /**
1191
1191
  * Filename field name
1192
1192
  */
1193
- r(this, "_filenameField", "");
1193
+ n(this, "_filenameField", "");
1194
1194
  t && t.filename && (this._filenameField = t.filename);
1195
1195
  }
1196
1196
  get filenameField() {
@@ -1200,11 +1200,11 @@ class Bt extends f {
1200
1200
  this._filenameField = t;
1201
1201
  }
1202
1202
  }
1203
- class Rt extends f {
1203
+ class Lt extends f {
1204
1204
  constructor(t) {
1205
1205
  super(t);
1206
- r(this, "_width");
1207
- r(this, "_height");
1206
+ n(this, "_width");
1207
+ n(this, "_height");
1208
1208
  if (t) {
1209
1209
  if (t.width) {
1210
1210
  const i = parseInt(t.width);
@@ -1233,21 +1233,21 @@ class Rt extends f {
1233
1233
  return ((t = this.parsedWidgetProps) == null ? void 0 : t.showControls) ?? !0;
1234
1234
  }
1235
1235
  }
1236
- class Lt extends f {
1236
+ class Gt extends f {
1237
1237
  constructor(t) {
1238
1238
  super({ ...t, nolabel: !0 });
1239
1239
  /**
1240
1240
  * Icon name
1241
1241
  */
1242
- r(this, "_name", "");
1242
+ n(this, "_name", "");
1243
1243
  /**
1244
1244
  * Icon size
1245
1245
  */
1246
- r(this, "_size", 16);
1246
+ n(this, "_size", 16);
1247
1247
  /**
1248
1248
  * Icon color
1249
1249
  */
1250
- r(this, "_color", "");
1250
+ n(this, "_color", "");
1251
1251
  t && (t.name && (this._name = t.name), t.size && (this._size = t.size), t.color && (this._color = t.color));
1252
1252
  }
1253
1253
  get name() {
@@ -1269,22 +1269,22 @@ class Lt extends f {
1269
1269
  this._color = t;
1270
1270
  }
1271
1271
  }
1272
- class Gt extends f {
1272
+ class $t extends f {
1273
1273
  constructor(e) {
1274
1274
  super(e);
1275
1275
  }
1276
1276
  }
1277
- class $t extends rt {
1277
+ class qt extends nt {
1278
1278
  constructor(t) {
1279
1279
  super(t);
1280
1280
  /**
1281
1281
  * Title field
1282
1282
  */
1283
- r(this, "_titleField");
1283
+ n(this, "_titleField");
1284
1284
  /**
1285
1285
  * Summary field
1286
1286
  */
1287
- r(this, "_summaryField");
1287
+ n(this, "_summaryField");
1288
1288
  this._titleField = "", this._summaryField = "", this._parsedWidgetProps && (this._titleField = this._parsedWidgetProps.titleField, this._summaryField = this.parsedWidgetProps.summaryField);
1289
1289
  }
1290
1290
  get titleField() {
@@ -1306,24 +1306,24 @@ class $t extends rt {
1306
1306
  return this.parsedWidgetProps.colorField;
1307
1307
  }
1308
1308
  }
1309
- class qt extends S {
1309
+ class Jt extends S {
1310
1310
  constructor(t) {
1311
1311
  super(t);
1312
- r(this, "_nolabel", !0);
1313
- r(this, "_card");
1314
- r(this, "_icon");
1315
- r(this, "_suffix");
1316
- r(this, "_color", "");
1312
+ n(this, "_nolabel", !0);
1313
+ n(this, "_card");
1314
+ n(this, "_icon");
1315
+ n(this, "_suffix");
1316
+ n(this, "_color", "");
1317
1317
  /**
1318
1318
  * Action id
1319
1319
  */
1320
- r(this, "_actionId");
1320
+ n(this, "_actionId");
1321
1321
  /**
1322
1322
  * Action field
1323
1323
  */
1324
- r(this, "_actionField");
1325
- r(this, "_height");
1326
- r(this, "_autoRefresh");
1324
+ n(this, "_actionField");
1325
+ n(this, "_height");
1326
+ n(this, "_autoRefresh");
1327
1327
  if (this._card = !1, this._icon = "", this._suffix = "", this._autoRefresh = !1, this._parsedWidgetProps && (this._card = this._parsedWidgetProps.card || !1, this._icon = g(this._parsedWidgetProps.icon) || "", this._suffix = this._parsedWidgetProps.suffix || "", this._color = g(this._parsedWidgetProps.color) || ""), t) {
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 {
@@ -1380,26 +1380,26 @@ class qt extends S {
1380
1380
  this._autoRefresh = t;
1381
1381
  }
1382
1382
  }
1383
- class nt extends f {
1383
+ class rt extends f {
1384
1384
  constructor(t) {
1385
1385
  super(t);
1386
1386
  /**
1387
1387
  * Field size
1388
1388
  */
1389
- r(this, "_size", 150);
1389
+ n(this, "_size", 150);
1390
1390
  /**
1391
1391
  * Relation
1392
1392
  */
1393
- r(this, "_relation", "");
1393
+ n(this, "_relation", "");
1394
1394
  /**
1395
1395
  * Inv_field
1396
1396
  */
1397
- r(this, "_inv_field");
1397
+ n(this, "_inv_field");
1398
1398
  /**
1399
1399
  * field to define the value to show
1400
1400
  */
1401
- r(this, "_field", "name");
1402
- r(this, "_columns", 4);
1401
+ n(this, "_field", "name");
1402
+ n(this, "_columns", 4);
1403
1403
  t && (t.size && (this._size = t.size), t.relation && (this._relation = t.relation), t.inv_field && (this._inv_field = t.inv_field), this.parsedWidgetProps.hasOwnProperty("field") && (this._field = this.parsedWidgetProps.field), this.parsedWidgetProps.columns && (this._columns = this.parsedWidgetProps.columns));
1404
1404
  }
1405
1405
  get size() {
@@ -1433,9 +1433,9 @@ class nt extends f {
1433
1433
  this._columns = t;
1434
1434
  }
1435
1435
  }
1436
- class Jt extends nt {
1436
+ class Ht extends rt {
1437
1437
  }
1438
- class Ht extends S {
1438
+ class Qt extends S {
1439
1439
  get colors() {
1440
1440
  return this._parsedWidgetProps.colors || {};
1441
1441
  }
@@ -1444,13 +1444,13 @@ class Ht extends S {
1444
1444
  return ((e = this._parsedWidgetProps) == null ? void 0 : e.colorField) || null;
1445
1445
  }
1446
1446
  }
1447
- class Qt extends S {
1447
+ class Kt extends S {
1448
1448
  constructor(t) {
1449
1449
  super(t);
1450
1450
  /**
1451
1451
  * Define the direction
1452
1452
  */
1453
- r(this, "_direction", "horizontal");
1453
+ n(this, "_direction", "horizontal");
1454
1454
  t && this.parsedWidgetProps.hasOwnProperty("direction") && (this._direction = this.parsedWidgetProps.direction);
1455
1455
  }
1456
1456
  get direction() {
@@ -1460,17 +1460,17 @@ class Qt extends S {
1460
1460
  this._direction = t;
1461
1461
  }
1462
1462
  }
1463
- class Kt extends it {
1463
+ class Xt extends it {
1464
1464
  }
1465
- class Xt extends f {
1465
+ class Ut extends f {
1466
1466
  constructor(t) {
1467
1467
  super(t);
1468
1468
  /**
1469
1469
  * Relation
1470
1470
  */
1471
- r(this, "_relation", "");
1472
- r(this, "_errorField", null);
1473
- r(this, "_lastStep", !0);
1471
+ n(this, "_relation", "");
1472
+ n(this, "_errorField", null);
1473
+ n(this, "_lastStep", !0);
1474
1474
  t && (t.relation && (this._relation = t.relation), this.parsedWidgetProps.hasOwnProperty("error_field") && (this._errorField = this.parsedWidgetProps.error_field), this.parsedWidgetProps.hasOwnProperty("last_step") && (this._lastStep = this.parsedWidgetProps.last_step));
1475
1475
  }
1476
1476
  get relation() {
@@ -1495,7 +1495,7 @@ class Xt extends f {
1495
1495
  class at extends $ {
1496
1496
  constructor(t) {
1497
1497
  super(t);
1498
- r(this, "_lang", null);
1498
+ n(this, "_lang", null);
1499
1499
  t && this.parsedWidgetProps.lang && (this._lang = this.parsedWidgetProps.lang);
1500
1500
  }
1501
1501
  get lang() {
@@ -1505,21 +1505,21 @@ class at extends $ {
1505
1505
  this._lang = t;
1506
1506
  }
1507
1507
  }
1508
- class Ut extends f {
1508
+ class Zt extends f {
1509
1509
  constructor(e) {
1510
1510
  super(e);
1511
1511
  }
1512
1512
  }
1513
- class Zt extends F {
1513
+ class te extends F {
1514
1514
  constructor(t) {
1515
1515
  super(t);
1516
1516
  /**
1517
1517
  * Alert type
1518
1518
  */
1519
- r(this, "_alertType", "info");
1520
- r(this, "_title", "");
1521
- r(this, "_text", "");
1522
- r(this, "_icon", null);
1519
+ n(this, "_alertType", "info");
1520
+ n(this, "_title", "");
1521
+ n(this, "_text", "");
1522
+ n(this, "_icon", null);
1523
1523
  t && (t.alert_type && (this._alertType = t.alert_type), t.title && (this._title = t.title), t.text && (this._text = t.text), t.icon && (this._icon = t.icon));
1524
1524
  }
1525
1525
  get alertType() {
@@ -1550,13 +1550,13 @@ class Zt extends F {
1550
1550
  return this._container.rows.flat().filter((t) => !t.invisible);
1551
1551
  }
1552
1552
  }
1553
- class te extends f {
1553
+ class ee extends f {
1554
1554
  constructor(t) {
1555
1555
  super(t);
1556
1556
  /**
1557
1557
  * Height of the comments component
1558
1558
  */
1559
- r(this, "_height");
1559
+ n(this, "_height");
1560
1560
  if (t.height) {
1561
1561
  const i = parseInt(t.height);
1562
1562
  this._height = isNaN(i) ? void 0 : i;
@@ -1572,14 +1572,14 @@ class te extends f {
1572
1572
  class K extends at {
1573
1573
  constructor() {
1574
1574
  super(...arguments);
1575
- r(this, "_lang", "json");
1575
+ n(this, "_lang", "json");
1576
1576
  }
1577
1577
  }
1578
- class ee extends f {
1578
+ class se extends f {
1579
1579
  constructor(t) {
1580
1580
  super(t);
1581
- r(this, "_multi", !1);
1582
- r(this, "_size");
1581
+ n(this, "_multi", !1);
1582
+ n(this, "_size");
1583
1583
  t && t.size && (this.size = t.size), this.parsedWidgetProps.multi && (this.multi = this.parsedWidgetProps.multi);
1584
1584
  }
1585
1585
  get multi() {
@@ -1595,10 +1595,10 @@ class ee extends f {
1595
1595
  this._size = t;
1596
1596
  }
1597
1597
  }
1598
- class se extends F {
1598
+ class ie extends F {
1599
1599
  constructor(t) {
1600
1600
  super(t);
1601
- r(this, "_autoPlay", !0);
1601
+ n(this, "_autoPlay", !0);
1602
1602
  t && "auto_play" in t && (this._autoPlay = p(t.auto_play));
1603
1603
  }
1604
1604
  get autoPlay() {
@@ -1611,7 +1611,7 @@ class se extends F {
1611
1611
  return this._container.rows.flat().filter((t) => !t.invisible);
1612
1612
  }
1613
1613
  }
1614
- class ie extends R {
1614
+ class ne extends R {
1615
1615
  get showText() {
1616
1616
  return this.parsedWidgetProps.show_text ?? !0;
1617
1617
  }
@@ -1630,15 +1630,15 @@ 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 ne extends N {
1633
+ class ae extends N {
1634
1634
  constructor(t) {
1635
1635
  super(t);
1636
- r(this, "_title", null);
1637
- r(this, "_icon", null);
1636
+ n(this, "_title", null);
1637
+ n(this, "_icon", null);
1638
1638
  /**
1639
1639
  * Height of the card component
1640
1640
  */
1641
- r(this, "_height");
1641
+ n(this, "_height");
1642
1642
  if (t && (t.title && (this._title = t.title), t.icon && (this._icon = t.icon), t.height)) {
1643
1643
  const i = parseInt(t.height);
1644
1644
  this._height = isNaN(i) ? void 0 : i;
@@ -1668,7 +1668,7 @@ class E {
1668
1668
  /**
1669
1669
  * Widget class
1670
1670
  */
1671
- r(this, "_widgetClass");
1671
+ n(this, "_widgetClass");
1672
1672
  }
1673
1673
  setWidgetClass(e) {
1674
1674
  switch (e) {
@@ -1676,13 +1676,13 @@ class E {
1676
1676
  this._widgetClass = B;
1677
1677
  break;
1678
1678
  case "page":
1679
- this._widgetClass = Ot;
1679
+ this._widgetClass = Wt;
1680
1680
  break;
1681
1681
  case "group":
1682
- this._widgetClass = Wt;
1682
+ this._widgetClass = Tt;
1683
1683
  break;
1684
1684
  case "card":
1685
- this._widgetClass = ne;
1685
+ this._widgetClass = ae;
1686
1686
  break;
1687
1687
  case "label":
1688
1688
  this._widgetClass = st;
@@ -1697,114 +1697,114 @@ class E {
1697
1697
  this._widgetClass = A;
1698
1698
  break;
1699
1699
  case "buttonGroup":
1700
- this._widgetClass = Tt;
1700
+ this._widgetClass = zt;
1701
1701
  break;
1702
1702
  case "action_buttons":
1703
- this._widgetClass = zt;
1703
+ this._widgetClass = It;
1704
1704
  break;
1705
1705
  case "selection":
1706
1706
  this._widgetClass = S;
1707
1707
  break;
1708
1708
  case "many2one":
1709
- this._widgetClass = It;
1709
+ this._widgetClass = St;
1710
1710
  break;
1711
1711
  case "boolean":
1712
1712
  this._widgetClass = it;
1713
1713
  break;
1714
1714
  case "integer":
1715
- this._widgetClass = Et;
1715
+ this._widgetClass = Vt;
1716
1716
  break;
1717
1717
  case "float":
1718
1718
  this._widgetClass = q;
1719
1719
  break;
1720
1720
  case "float_time":
1721
- this._widgetClass = Vt;
1721
+ this._widgetClass = Yt;
1722
1722
  break;
1723
1723
  case "date":
1724
- this._widgetClass = jt;
1724
+ this._widgetClass = Nt;
1725
1725
  break;
1726
1726
  case "datetime":
1727
- this._widgetClass = Nt;
1727
+ this._widgetClass = At;
1728
1728
  break;
1729
1729
  case "progressbar":
1730
- this._widgetClass = Dt;
1730
+ this._widgetClass = jt;
1731
1731
  break;
1732
1732
  case "markdown":
1733
- this._widgetClass = St;
1733
+ this._widgetClass = Et;
1734
1734
  break;
1735
1735
  case "many2many":
1736
1736
  case "one2many":
1737
1737
  case "one2many_list":
1738
- this._widgetClass = rt;
1738
+ this._widgetClass = nt;
1739
1739
  break;
1740
1740
  case "newline":
1741
1741
  this._widgetClass = et;
1742
1742
  break;
1743
1743
  case "separator":
1744
- this._widgetClass = At;
1744
+ this._widgetClass = Mt;
1745
1745
  break;
1746
1746
  case "url":
1747
1747
  this._widgetClass = R;
1748
1748
  break;
1749
1749
  case "email":
1750
- this._widgetClass = ee;
1750
+ this._widgetClass = se;
1751
1751
  break;
1752
1752
  case "reference":
1753
- this._widgetClass = Mt;
1753
+ this._widgetClass = Bt;
1754
1754
  break;
1755
1755
  case "binary":
1756
- this._widgetClass = Bt;
1756
+ this._widgetClass = Rt;
1757
1757
  break;
1758
1758
  case "image":
1759
- this._widgetClass = Rt;
1759
+ this._widgetClass = Lt;
1760
1760
  break;
1761
1761
  case "icon":
1762
- this._widgetClass = Lt;
1762
+ this._widgetClass = Gt;
1763
1763
  break;
1764
1764
  case "fiber_grid":
1765
- this._widgetClass = Gt;
1765
+ this._widgetClass = $t;
1766
1766
  break;
1767
1767
  case "timeline":
1768
- this._widgetClass = $t;
1768
+ this._widgetClass = qt;
1769
1769
  break;
1770
1770
  case "indicator":
1771
- this._widgetClass = qt;
1771
+ this._widgetClass = Jt;
1772
1772
  break;
1773
1773
  case "tags":
1774
- this._widgetClass = Jt;
1774
+ this._widgetClass = Ht;
1775
1775
  break;
1776
1776
  case "tag":
1777
- this._widgetClass = Ht;
1777
+ this._widgetClass = Qt;
1778
1778
  break;
1779
1779
  case "avatar":
1780
- this._widgetClass = Pt;
1780
+ this._widgetClass = Ot;
1781
1781
  break;
1782
1782
  case "radio":
1783
- this._widgetClass = Qt;
1783
+ this._widgetClass = Kt;
1784
1784
  break;
1785
1785
  case "multicheckbox":
1786
- this._widgetClass = nt;
1786
+ this._widgetClass = rt;
1787
1787
  break;
1788
1788
  case "switch":
1789
- this._widgetClass = Kt;
1789
+ this._widgetClass = Xt;
1790
1790
  break;
1791
1791
  case "steps":
1792
- this._widgetClass = Xt;
1792
+ this._widgetClass = Ut;
1793
1793
  break;
1794
1794
  case "codeeditor":
1795
1795
  this._widgetClass = at;
1796
1796
  break;
1797
1797
  case "time":
1798
- this._widgetClass = Ut;
1798
+ this._widgetClass = Zt;
1799
1799
  break;
1800
1800
  case "html_preview":
1801
- this._widgetClass = Yt;
1801
+ this._widgetClass = Dt;
1802
1802
  break;
1803
1803
  case "alert":
1804
- this._widgetClass = Zt;
1804
+ this._widgetClass = te;
1805
1805
  break;
1806
1806
  case "comments_timeline":
1807
- this._widgetClass = te;
1807
+ this._widgetClass = ee;
1808
1808
  break;
1809
1809
  case "json":
1810
1810
  this._widgetClass = K;
@@ -1816,10 +1816,10 @@ class E {
1816
1816
  this._widgetClass = N;
1817
1817
  break;
1818
1818
  case "carousel":
1819
- this._widgetClass = se;
1819
+ this._widgetClass = ie;
1820
1820
  break;
1821
1821
  case "colorPicker":
1822
- this._widgetClass = ie;
1822
+ this._widgetClass = ne;
1823
1823
  break;
1824
1824
  case "qrcode":
1825
1825
  this._widgetClass = re;
@@ -1846,7 +1846,7 @@ class E {
1846
1846
  }
1847
1847
  }
1848
1848
  }
1849
- const ae = ({
1849
+ const le = ({
1850
1850
  fieldName: s,
1851
1851
  values: e,
1852
1852
  fields: t
@@ -1857,7 +1857,7 @@ const ae = ({
1857
1857
  const i = (o = t[s]) == null ? void 0 : o.states;
1858
1858
  if (!i)
1859
1859
  return {};
1860
- const n = {}, l = {};
1860
+ const r = {}, l = {};
1861
1861
  for (const a of Object.keys(i))
1862
1862
  if (e.state === a) {
1863
1863
  const c = i[a];
@@ -1868,9 +1868,9 @@ const ae = ({
1868
1868
  }
1869
1869
  for (const a of Object.keys(l)) {
1870
1870
  const c = l[a];
1871
- n[a] = c.some((_) => _);
1871
+ r[a] = c.some((_) => _);
1872
1872
  }
1873
- return n;
1873
+ return r;
1874
1874
  }, lt = ({
1875
1875
  states: s,
1876
1876
  values: e
@@ -1880,13 +1880,13 @@ const ae = ({
1880
1880
  const t = s.split(",");
1881
1881
  return t.length === 0 ? {} : t.includes(e.state) ? {} : { invisible: !0 };
1882
1882
  };
1883
- function le({
1883
+ function oe({
1884
1884
  values: s = {},
1885
1885
  fieldName: e,
1886
1886
  fields: t = {}
1887
1887
  }) {
1888
- var n;
1889
- const i = ((n = t[e]) == null ? void 0 : n.type) || "passthrough";
1888
+ var r;
1889
+ const i = ((r = t[e]) == null ? void 0 : r.type) || "passthrough";
1890
1890
  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);
1891
1891
  }
1892
1892
  const J = ({
@@ -1908,7 +1908,7 @@ const J = ({
1908
1908
  return h.forEach((d) => {
1909
1909
  const b = d[1];
1910
1910
  if (!d[1].includes("'") && d[1] !== "true" && d[1] !== "false") {
1911
- const x = le({
1911
+ const x = oe({
1912
1912
  values: e,
1913
1913
  fields: t,
1914
1914
  fieldName: b === "active_id" ? "id" : b
@@ -1943,20 +1943,20 @@ function ot(s) {
1943
1943
  function ct(s) {
1944
1944
  return typeof s == "object" && s !== null && typeof s != "string";
1945
1945
  }
1946
- const oe = (s) => {
1947
- const e = s.trim().replace(")", "").split("("), t = e[0], n = e[1].split(",").map((l) => l.trim());
1946
+ const dt = (s) => {
1947
+ 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) : [];
1948
1948
  return {
1949
1949
  method: t,
1950
- args: n
1950
+ args: r
1951
1951
  };
1952
1952
  };
1953
1953
  function ce(s) {
1954
1954
  const e = [];
1955
1955
  function t(i) {
1956
- const n = [];
1956
+ const r = [];
1957
1957
  for (const l of i)
1958
- l instanceof F ? t(l._container.rows.flat()) : n.push(l);
1959
- n.length > 0 && e.push(n);
1958
+ l instanceof F ? t(l._container.rows.flat()) : r.push(l);
1959
+ r.length > 0 && e.push(r);
1960
1960
  }
1961
1961
  for (const i of s)
1962
1962
  t(i);
@@ -1967,25 +1967,25 @@ class Ee {
1967
1967
  /**
1968
1968
  * Object containing fields specification of the form.
1969
1969
  */
1970
- r(this, "_fields");
1971
- r(this, "_container");
1972
- r(this, "_string", null);
1970
+ n(this, "_fields");
1971
+ n(this, "_container");
1972
+ n(this, "_string", null);
1973
1973
  /**
1974
1974
  * Widget type
1975
1975
  */
1976
- r(this, "_type", "form");
1976
+ n(this, "_type", "form");
1977
1977
  /**
1978
1978
  * Determines if form is read only (default is false)
1979
1979
  */
1980
- r(this, "_readOnly", !1);
1980
+ n(this, "_readOnly", !1);
1981
1981
  /**
1982
1982
  * Context
1983
1983
  */
1984
- r(this, "_context", {});
1984
+ n(this, "_context", {});
1985
1985
  /**
1986
1986
  * Collection of onChange actions for fields
1987
1987
  */
1988
- r(this, "_onChangeFields", {});
1988
+ n(this, "_onChangeFields", {});
1989
1989
  /*
1990
1990
  _widgets = {
1991
1991
  *[Symbol.iterator]() {
@@ -2004,19 +2004,19 @@ class Ee {
2004
2004
  /**
2005
2005
  * Unique key for container
2006
2006
  */
2007
- r(this, "_keyIdx", 0);
2007
+ n(this, "_keyIdx", 0);
2008
2008
  /**
2009
2009
  * List of invisible fields
2010
2010
  */
2011
- r(this, "_invisibleFields", []);
2011
+ n(this, "_invisibleFields", []);
2012
2012
  /**
2013
2013
  * List of autorefreshable fields
2014
2014
  */
2015
- r(this, "_autorefreshableFields", []);
2015
+ n(this, "_autorefreshableFields", []);
2016
2016
  /**
2017
2017
  * Context for each field in the form
2018
2018
  */
2019
- r(this, "_contextForFields", {});
2019
+ n(this, "_contextForFields", {});
2020
2020
  this._fields = e, this._container = new z(t, 6, !1, "root");
2021
2021
  }
2022
2022
  get fields() {
@@ -2072,8 +2072,8 @@ class Ee {
2072
2072
  }
2073
2073
  parse(e, t) {
2074
2074
  var a;
2075
- const { values: i = {}, readOnly: n = !1 } = t || {}, l = I.parse(e).filter((c) => c.tagName === "form")[0];
2076
- this._string = ((a = l.attributes) == null ? void 0 : a.string) || null, this._string && (this._string = g(this._string)), this._readOnly = n, this._context = i.id ? { active_id: i.id, active_ids: [i.id] } : {}, this._invisibleFields = [], this.parseNode({
2075
+ const { values: i = {}, readOnly: r = !1 } = t || {}, l = I.parse(e).filter((c) => c.tagName === "form")[0];
2076
+ 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({
2077
2077
  fields: l.children,
2078
2078
  container: this._container,
2079
2079
  values: i
@@ -2089,7 +2089,7 @@ class Ee {
2089
2089
  container: t,
2090
2090
  values: i
2091
2091
  }) {
2092
- const n = new E();
2092
+ const r = new E();
2093
2093
  e.filter((l) => typeof l == "object").forEach((l) => {
2094
2094
  var v, C;
2095
2095
  const { tagName: o, attributes: a, children: c } = l;
@@ -2124,7 +2124,7 @@ class Ee {
2124
2124
  o === "button" && u.states ? m = lt({
2125
2125
  states: u.states,
2126
2126
  values: i
2127
- }) : m = ae({
2127
+ }) : m = le({
2128
2128
  fieldName: u.name,
2129
2129
  values: i,
2130
2130
  fields: this._fields
@@ -2134,7 +2134,7 @@ class Ee {
2134
2134
  values: i,
2135
2135
  fields: this._fields
2136
2136
  });
2137
- u.on_change && (this._onChangeFields[u.name] = oe(
2137
+ u.on_change && (this._onChangeFields[u.name] = dt(
2138
2138
  u.on_change
2139
2139
  ));
2140
2140
  let b;
@@ -2147,7 +2147,7 @@ class Ee {
2147
2147
  key: `${this._keyIdx}`
2148
2148
  };
2149
2149
  t.readOnly && (x.readonly = !0);
2150
- const y = n.createWidget(_, x);
2150
+ const y = r.createWidget(_, x);
2151
2151
  y.invisible && y instanceof f && this._invisibleFields.push(x.name), y instanceof F && this.parseNode({
2152
2152
  fields: c,
2153
2153
  container: y.container,
@@ -2171,34 +2171,34 @@ class Ve {
2171
2171
  /**
2172
2172
  * Object containing fields specification of the form.
2173
2173
  */
2174
- r(this, "_fields");
2175
- r(this, "_columns", []);
2176
- r(this, "_string", null);
2174
+ n(this, "_fields");
2175
+ n(this, "_columns", []);
2176
+ n(this, "_string", null);
2177
2177
  /**
2178
2178
  * Widget type
2179
2179
  */
2180
- r(this, "_type", "tree");
2180
+ n(this, "_type", "tree");
2181
2181
  /**
2182
2182
  * Color expression value
2183
2183
  */
2184
- r(this, "_colors", null);
2185
- r(this, "_status", null);
2184
+ n(this, "_colors", null);
2185
+ n(this, "_status", null);
2186
2186
  /**
2187
2187
  * Editable value
2188
2188
  */
2189
- r(this, "_editable", null);
2189
+ n(this, "_editable", null);
2190
2190
  /**
2191
2191
  * Context for each field in the form
2192
2192
  */
2193
- r(this, "_contextForFields", {});
2193
+ n(this, "_contextForFields", {});
2194
2194
  /**
2195
2195
  * List of autorefreshable fields
2196
2196
  */
2197
- r(this, "_autorefreshableFields", []);
2197
+ n(this, "_autorefreshableFields", []);
2198
2198
  /**
2199
2199
  * Is infinite
2200
2200
  */
2201
- r(this, "_infinite", !1);
2201
+ n(this, "_infinite", !1);
2202
2202
  this._fields = e;
2203
2203
  }
2204
2204
  get fields() {
@@ -2238,11 +2238,11 @@ class Ve {
2238
2238
  this._infinite = e;
2239
2239
  }
2240
2240
  parse(e) {
2241
- const t = I.parse(e).filter((n) => n.tagName === "tree")[0];
2241
+ const t = I.parse(e).filter((r) => r.tagName === "tree")[0];
2242
2242
  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;
2243
2243
  const i = new E();
2244
- t.children.forEach((n) => {
2245
- const { tagName: l, attributes: o } = n;
2244
+ t.children.forEach((r) => {
2245
+ const { tagName: l, attributes: o } = r;
2246
2246
  let a = null;
2247
2247
  if (l === "field") {
2248
2248
  const { name: c, widget: _ } = o;
@@ -2285,55 +2285,61 @@ class Ye {
2285
2285
  /**
2286
2286
  * Object containing fields specification of the kanban.
2287
2287
  */
2288
- r(this, "_fields");
2288
+ n(this, "_fields");
2289
2289
  /**
2290
2290
  * Array of field widgets to display in cards
2291
2291
  */
2292
- r(this, "_card_fields", []);
2292
+ n(this, "_card_fields", []);
2293
2293
  /**
2294
2294
  * Array of button widgets to display in cards
2295
2295
  */
2296
- r(this, "_buttons", []);
2297
- r(this, "_string", null);
2298
- r(this, "_status", null);
2296
+ n(this, "_buttons", []);
2297
+ n(this, "_string", null);
2298
+ n(this, "_status", null);
2299
2299
  /**
2300
2300
  * Widget type
2301
2301
  */
2302
- r(this, "_type", "kanban");
2302
+ n(this, "_type", "kanban");
2303
2303
  /**
2304
2304
  * Field that defines the columns (e.g., "state")
2305
2305
  */
2306
- r(this, "_column_field", "state");
2306
+ n(this, "_column_field", "state");
2307
2307
  /**
2308
2308
  * Domain for filtering columns (for many2one fields)
2309
2309
  * Example: "[('fold', '!=', True)]"
2310
2310
  */
2311
- r(this, "_column_domain", null);
2311
+ n(this, "_column_domain", null);
2312
2312
  /**
2313
2313
  * Enable dragging cards between columns
2314
2314
  */
2315
- r(this, "_drag", !0);
2315
+ n(this, "_drag", !0);
2316
2316
  /**
2317
2317
  * Field name to use for sorting cards within columns
2318
2318
  */
2319
- r(this, "_sort");
2319
+ n(this, "_sort");
2320
2320
  /**
2321
2321
  * Enable setting max cards per column (WIP limits)
2322
2322
  */
2323
- r(this, "_set_max_cards", !1);
2323
+ n(this, "_set_max_cards", !1);
2324
2324
  /**
2325
2325
  * Color expression value (e.g., "blue:state=='draft';green:state=='done'")
2326
2326
  */
2327
- r(this, "_colors", null);
2327
+ n(this, "_colors", null);
2328
+ /**
2329
+ * Custom function to call when a card moves between columns
2330
+ * Example: "handle_state_change" or with args "handle_state_change(field, from, to)"
2331
+ * If not defined, the frontend should use the default on_change_column method
2332
+ */
2333
+ n(this, "_on_change_column", null);
2328
2334
  /**
2329
2335
  * Context for each field in the kanban
2330
2336
  */
2331
- r(this, "_contextForFields", {});
2337
+ n(this, "_contextForFields", {});
2332
2338
  /**
2333
2339
  * Map of fields that have sum aggregation
2334
2340
  * Key: field name, Value: sum label (e.g., "Total hours")
2335
2341
  */
2336
- r(this, "_aggregations", {});
2342
+ n(this, "_aggregations", {});
2337
2343
  this._fields = e;
2338
2344
  }
2339
2345
  get fields() {
@@ -2372,6 +2378,9 @@ class Ye {
2372
2378
  get colors() {
2373
2379
  return this._colors;
2374
2380
  }
2381
+ get on_change_column() {
2382
+ return this._on_change_column;
2383
+ }
2375
2384
  get contextForFields() {
2376
2385
  return this._contextForFields;
2377
2386
  }
@@ -2382,21 +2391,21 @@ class Ye {
2382
2391
  return this._aggregations;
2383
2392
  }
2384
2393
  parse(e) {
2385
- const t = I.parse(e).filter((n) => n.tagName === "kanban")[0];
2386
- 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));
2394
+ const t = I.parse(e).filter((r) => r.tagName === "kanban")[0];
2395
+ 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));
2387
2396
  const i = new E();
2388
- t.children.forEach((n) => {
2389
- const { tagName: l, attributes: o } = n;
2390
- l === "field" ? this._parseField(n, o, i) : l === "button" && this._parseButton(n, o);
2397
+ t.children.forEach((r) => {
2398
+ const { tagName: l, attributes: o } = r;
2399
+ l === "field" ? this._parseField(r, o, i) : l === "button" && this._parseButton(r, o);
2391
2400
  });
2392
2401
  }
2393
2402
  _parseField(e, t, i) {
2394
- const { name: n, widget: l, sum: o } = t;
2395
- if (!n)
2403
+ const { name: r, widget: l, sum: o } = t;
2404
+ if (!r)
2396
2405
  return;
2397
- if (!this._fields[n])
2398
- throw new Error(`Field ${n} doesn't exist in fields definition`);
2399
- const a = this._fields[n];
2406
+ if (!this._fields[r])
2407
+ throw new Error(`Field ${r} doesn't exist in fields definition`);
2408
+ const a = this._fields[r];
2400
2409
  let c = a.type;
2401
2410
  (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;
2402
2411
  const _ = J({
@@ -2409,22 +2418,22 @@ class Ye {
2409
2418
  fieldsWidgetType: a == null ? void 0 : a.type,
2410
2419
  context: _
2411
2420
  };
2412
- if (this._contextForFields[n] = _, l && (c = l), !u.invisible) {
2421
+ if (this._contextForFields[r] = _, l && (c = l), !u.invisible) {
2413
2422
  const h = i.createWidget(
2414
2423
  c,
2415
2424
  u
2416
2425
  );
2417
- o && (h.sum = g(o), this._aggregations[n] = g(o)), this._card_fields.push(h);
2426
+ o && (h.sum = g(o), this._aggregations[r] = g(o)), this._card_fields.push(h);
2418
2427
  }
2419
2428
  }
2420
2429
  _parseButton(e, t) {
2421
- const { name: i, type: n, string: l, states: o } = t;
2430
+ const { name: i, type: r, string: l, states: o } = t;
2422
2431
  if (!i)
2423
2432
  return;
2424
2433
  const a = {
2425
2434
  ...t,
2426
2435
  name: i,
2427
- buttonType: n || "object",
2436
+ buttonType: r || "object",
2428
2437
  string: l || ""
2429
2438
  }, c = new A(a);
2430
2439
  o && (c.states = o), this._buttons.push(c);
@@ -2434,20 +2443,20 @@ class Ye {
2434
2443
  * @param {string} id id to find
2435
2444
  */
2436
2445
  findById(e) {
2437
- const t = this._card_fields.find((n) => n.findById ? n.findById(e) : !1);
2438
- return t || this._buttons.find((n) => n.findById ? n.findById(e) : !1) || null;
2446
+ const t = this._card_fields.find((r) => r.findById ? r.findById(e) : !1);
2447
+ return t || this._buttons.find((r) => r.findById ? r.findById(e) : !1) || null;
2439
2448
  }
2440
2449
  }
2441
2450
  class De {
2442
2451
  constructor(e) {
2443
- r(this, "_kanbanDef");
2452
+ n(this, "_kanbanDef");
2444
2453
  this._kanbanDef = e;
2445
2454
  }
2446
2455
  get kanbanDef() {
2447
2456
  return this._kanbanDef;
2448
2457
  }
2449
2458
  parse(e, t) {
2450
- const i = (t == null ? void 0 : t.readOnly) ?? !1, n = new z(1, 12, i), l = new E();
2459
+ const i = (t == null ? void 0 : t.readOnly) ?? !1, r = new z(1, 12, i), l = new E();
2451
2460
  let o = 0;
2452
2461
  return this._kanbanDef.card_fields.forEach((a) => {
2453
2462
  o++;
@@ -2463,7 +2472,7 @@ class De {
2463
2472
  };
2464
2473
  i && (_.readonly = !0);
2465
2474
  const u = a.type || "field", h = l.createWidget(u, _);
2466
- n.addWidget(h, { addLabel: !a.nolabel });
2475
+ r.addWidget(h, { addLabel: !a.nolabel });
2467
2476
  }), this._kanbanDef.buttons.forEach((a) => {
2468
2477
  o++;
2469
2478
  const c = a.states ? lt({
@@ -2476,8 +2485,8 @@ class De {
2476
2485
  };
2477
2486
  i && (_.readonly = !0);
2478
2487
  const u = new A(_);
2479
- n.addWidget(u, { addLabel: !1 });
2480
- }), n;
2488
+ r.addWidget(u, { addLabel: !1 });
2489
+ }), r;
2481
2490
  }
2482
2491
  }
2483
2492
  const de = {
@@ -2498,13 +2507,13 @@ class je {
2498
2507
  /**
2499
2508
  * Object containing the specific fields for primary and secondary search fields
2500
2509
  */
2501
- r(this, "_searchFields");
2510
+ n(this, "_searchFields");
2502
2511
  /**
2503
2512
  * Object containing all the fields specification of the whole form
2504
2513
  */
2505
- r(this, "_fields");
2506
- r(this, "_simpleSearchContainer");
2507
- r(this, "_advancedSearchContainer");
2514
+ n(this, "_fields");
2515
+ n(this, "_simpleSearchContainer");
2516
+ n(this, "_advancedSearchContainer");
2508
2517
  this._searchFields = e, this._fields = t, this._simpleSearchContainer = new z(i), this._advancedSearchContainer = new z(i);
2509
2518
  }
2510
2519
  get searchFields() {
@@ -2524,24 +2533,24 @@ class je {
2524
2533
  this.parseFields(
2525
2534
  this.searchFields.primary,
2526
2535
  e
2527
- ).forEach((n) => {
2528
- this.simpleSearchContainer.addWidget(n, { addLabel: !1 }), this.advancedSearchContainer.addWidget(n, { addLabel: !1 });
2536
+ ).forEach((r) => {
2537
+ this.simpleSearchContainer.addWidget(r, { addLabel: !1 }), this.advancedSearchContainer.addWidget(r, { addLabel: !1 });
2529
2538
  }), this.parseFields(
2530
2539
  this.searchFields.secondary,
2531
2540
  e
2532
- ).forEach((n) => {
2533
- this.advancedSearchContainer.addWidget(n, { addLabel: !1 });
2541
+ ).forEach((r) => {
2542
+ this.advancedSearchContainer.addWidget(r, { addLabel: !1 });
2534
2543
  });
2535
2544
  }
2536
2545
  parseFields(e, t) {
2537
2546
  return e.map((i) => {
2538
- const n = {
2547
+ const r = {
2539
2548
  ...this.fields[i],
2540
2549
  name: i,
2541
2550
  colspan: 2
2542
- }, { type: l, widget: o } = n;
2551
+ }, { type: l, widget: o } = r;
2543
2552
  let a = o ?? l;
2544
- return de[a] === void 0 && (a = l), t.createWidget(a, n);
2553
+ return de[a] === void 0 && (a = l), t.createWidget(a, r);
2545
2554
  });
2546
2555
  }
2547
2556
  /**
@@ -2560,18 +2569,18 @@ const Ne = ({
2560
2569
  return s.forEach((i) => {
2561
2570
  if (!Array.isArray(i))
2562
2571
  return;
2563
- const [n, l, o] = i;
2572
+ const [r, l, o] = i;
2564
2573
  let a, c;
2565
- n.indexOf(".") !== -1 ? (a = n.substr(0, n.indexOf(".")), c = n.substr(
2566
- n.indexOf(".") + 1,
2567
- n.length - 1
2568
- )) : (a = n, c = "id"), a === e && t.push([c, l, o]);
2574
+ r.indexOf(".") !== -1 ? (a = r.substr(0, r.indexOf(".")), c = r.substr(
2575
+ r.indexOf(".") + 1,
2576
+ r.length - 1
2577
+ )) : (a = r, c = "id"), a === e && t.push([c, l, o]);
2569
2578
  }), t;
2570
2579
  }, Ae = (s) => typeof s != "string" ? [] : s.replace(/[()[\]]/g, "").split(",").map((e) => e.trim()).filter((e) => !e.includes("'"));
2571
2580
  class ue {
2572
2581
  constructor(e) {
2573
- r(this, "_action_id", null);
2574
- r(this, "_position", null);
2582
+ n(this, "_action_id", null);
2583
+ n(this, "_position", null);
2575
2584
  e.action_id && (this._action_id = e.action_id), e.position && (this._position = e.position);
2576
2585
  }
2577
2586
  get action_id() {
@@ -2583,13 +2592,13 @@ class ue {
2583
2592
  }
2584
2593
  class Me {
2585
2594
  constructor(e) {
2586
- r(this, "_string", null);
2587
- r(this, "_items", []);
2588
- const t = I.parse(e).filter((n) => n.tagName === "dashboard")[0];
2595
+ n(this, "_string", null);
2596
+ n(this, "_items", []);
2597
+ const t = I.parse(e).filter((r) => r.tagName === "dashboard")[0];
2589
2598
  this._string = t.attributes.string || null;
2590
2599
  const { children: i } = t;
2591
- i.forEach((n) => {
2592
- n.tagName === "dashboard_item" && this._items.push(new ue(n.attributes));
2600
+ i.forEach((r) => {
2601
+ r.tagName === "dashboard_item" && this._items.push(new ue(r.attributes));
2593
2602
  });
2594
2603
  }
2595
2604
  get string() {
@@ -2599,13 +2608,13 @@ class Me {
2599
2608
  return this._items;
2600
2609
  }
2601
2610
  }
2602
- class dt {
2611
+ class ut {
2603
2612
  constructor(e) {
2604
- r(this, "_string", null);
2605
- r(this, "_type");
2606
- r(this, "_timerange", null);
2607
- r(this, "_interval", 1);
2608
- r(this, "_y_range", "default");
2613
+ n(this, "_string", null);
2614
+ n(this, "_type");
2615
+ n(this, "_timerange", null);
2616
+ n(this, "_interval", 1);
2617
+ n(this, "_y_range", "default");
2609
2618
  if (this._string = e.attributes.string || null, this._timerange = e.attributes.timerange || null, e.attributes.interval && (this._interval = parseInt(e.attributes.interval)), e.attributes.y_range) {
2610
2619
  const t = e.attributes.y_range;
2611
2620
  (t === "auto" || t === "full" || t === "default") && (this._y_range = t);
@@ -2627,16 +2636,17 @@ class dt {
2627
2636
  return this._y_range;
2628
2637
  }
2629
2638
  }
2630
- class ut extends dt {
2639
+ class ht extends ut {
2631
2640
  constructor(t, i) {
2632
2641
  super(i);
2633
- r(this, "_color", null);
2634
- r(this, "_icon", null);
2635
- r(this, "_totalDomain", null);
2636
- r(this, "_showPercent", !1);
2637
- r(this, "_progressbar", !1);
2638
- r(this, "_suffix", null);
2639
- 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);
2642
+ n(this, "_color", null);
2643
+ n(this, "_icon", null);
2644
+ n(this, "_totalDomain", null);
2645
+ n(this, "_showPercent", !1);
2646
+ n(this, "_progressbar", !1);
2647
+ n(this, "_showTotal", !0);
2648
+ n(this, "_suffix", null);
2649
+ 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) : !0;
2640
2650
  }
2641
2651
  get color() {
2642
2652
  return this._color;
@@ -2653,17 +2663,20 @@ class ut extends dt {
2653
2663
  get progressbar() {
2654
2664
  return this._progressbar;
2655
2665
  }
2666
+ get showTotal() {
2667
+ return this._showTotal;
2668
+ }
2656
2669
  get suffix() {
2657
2670
  return this._suffix;
2658
2671
  }
2659
2672
  }
2660
- class he extends ut {
2673
+ class he extends ht {
2661
2674
  constructor(t, i) {
2662
2675
  super(t, i);
2663
- r(this, "_field");
2664
- r(this, "_operator");
2665
- const { children: n } = i;
2666
- n.forEach((l) => {
2676
+ n(this, "_field");
2677
+ n(this, "_operator");
2678
+ const { children: r } = i;
2679
+ r.forEach((l) => {
2667
2680
  if (l.tagName === "field") {
2668
2681
  const o = l.attributes.name, a = l.attributes.operator;
2669
2682
  this._field = o || void 0, this._operator = a;
@@ -2682,14 +2695,14 @@ const _e = (s) => {
2682
2695
  let t;
2683
2696
  if (s.forEach((i) => {
2684
2697
  if (i.tagName === "field") {
2685
- const n = i.attributes.axis, l = i.attributes.operator, o = i.attributes.name, a = i.attributes.label || void 0, c = i.attributes.stacked || void 0;
2686
- if (!n)
2698
+ 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;
2699
+ if (!r)
2687
2700
  throw new Error(`Field ${o} doesn't have an axis`);
2688
2701
  if (!o)
2689
2702
  throw new Error("Missing name attribute for field");
2690
- n === "x" ? t = new me({
2703
+ r === "x" ? t = new me({
2691
2704
  name: o
2692
- }) : n === "y" && e.push(
2705
+ }) : r === "y" && e.push(
2693
2706
  new ge({
2694
2707
  name: o,
2695
2708
  operator: l,
@@ -2707,14 +2720,14 @@ const _e = (s) => {
2707
2720
  y: e
2708
2721
  };
2709
2722
  };
2710
- class M extends dt {
2723
+ class M extends ut {
2711
2724
  constructor(t, i) {
2712
2725
  super(i);
2713
- r(this, "_x");
2714
- r(this, "_y");
2726
+ n(this, "_x");
2727
+ n(this, "_y");
2715
2728
  this._type = t;
2716
- const n = _e(i.children);
2717
- this._x = n.x, this._y = n.y;
2729
+ const r = _e(i.children);
2730
+ this._x = r.x, this._y = r.y;
2718
2731
  }
2719
2732
  get x() {
2720
2733
  return this._x;
@@ -2724,13 +2737,13 @@ class M extends dt {
2724
2737
  }
2725
2738
  }
2726
2739
  const fe = {
2727
- indicator: ut,
2740
+ indicator: ht,
2728
2741
  indicatorField: he,
2729
2742
  line: M,
2730
2743
  bar: M,
2731
2744
  pie: M
2732
2745
  }, Be = (s) => {
2733
- const e = I.parse(s).filter((n) => n.tagName === "graph")[0], t = e.attributes.type;
2746
+ const e = I.parse(s).filter((r) => r.tagName === "graph")[0], t = e.attributes.type;
2734
2747
  if (!t)
2735
2748
  throw new Error(`${t} is not a valid graph`);
2736
2749
  const i = fe[t];
@@ -2738,10 +2751,10 @@ const fe = {
2738
2751
  throw new Error(`${t} not found as a GraphModel`);
2739
2752
  return new i(t, e);
2740
2753
  };
2741
- class ht {
2754
+ class _t {
2742
2755
  constructor({ name: e, axis: t }) {
2743
- r(this, "_name");
2744
- r(this, "_axis");
2756
+ n(this, "_name");
2757
+ n(this, "_axis");
2745
2758
  this._name = e, this._axis = t;
2746
2759
  }
2747
2760
  get name() {
@@ -2751,18 +2764,18 @@ class ht {
2751
2764
  return this._axis;
2752
2765
  }
2753
2766
  }
2754
- class ge extends ht {
2767
+ class ge extends _t {
2755
2768
  constructor({
2756
2769
  name: t,
2757
2770
  operator: i,
2758
- label: n,
2771
+ label: r,
2759
2772
  stacked: l
2760
2773
  }) {
2761
2774
  super({ name: t, axis: "y" });
2762
- r(this, "_operator");
2763
- r(this, "_label");
2764
- r(this, "_stacked");
2765
- this._operator = i, this._label = n, this._stacked = l;
2775
+ n(this, "_operator");
2776
+ n(this, "_label");
2777
+ n(this, "_stacked");
2778
+ this._operator = i, this._label = r, this._stacked = l;
2766
2779
  }
2767
2780
  get operator() {
2768
2781
  return this._operator;
@@ -2774,7 +2787,7 @@ class ge extends ht {
2774
2787
  return this._stacked;
2775
2788
  }
2776
2789
  }
2777
- class me extends ht {
2790
+ class me extends _t {
2778
2791
  constructor({ name: e }) {
2779
2792
  super({ name: e, axis: "x" });
2780
2793
  }
@@ -2790,16 +2803,16 @@ function H({
2790
2803
  values: e,
2791
2804
  fieldName: t
2792
2805
  }) {
2793
- const i = s[t], n = e[t];
2806
+ const i = s[t], r = e[t];
2794
2807
  if (!i)
2795
2808
  throw new Error(`Field ${t} not found`);
2796
2809
  if (i.type === "many2one")
2797
- return n ? { value: n[0], label: n[1] } : { value: !1, label: void 0 };
2810
+ return r ? { value: r[0], label: r[1] } : { value: !1, label: void 0 };
2798
2811
  if (i.type === "selection") {
2799
- const o = i.selection.find((a) => a[0] === n);
2800
- return o ? { value: n, label: o[1] } : { value: !1, label: void 0 };
2812
+ const o = i.selection.find((a) => a[0] === r);
2813
+ return o ? { value: r, label: o[1] } : { value: !1, label: void 0 };
2801
2814
  }
2802
- return { value: n, label: n };
2815
+ return { value: r, label: r };
2803
2816
  }
2804
2817
  const Re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2805
2818
  __proto__: null,
@@ -2827,18 +2840,18 @@ function xe({
2827
2840
  interval: t = 1
2828
2841
  }) {
2829
2842
  let i = [];
2830
- const n = ft({
2843
+ const r = gt({
2831
2844
  values: s,
2832
2845
  groupBy: "type-stacked"
2833
2846
  }), l = `${e}s`;
2834
- return Object.keys(n).forEach((a) => {
2835
- const c = n[a];
2847
+ return Object.keys(r).forEach((a) => {
2848
+ const c = r[a];
2836
2849
  for (let _ = 0; _ < c.length; _++) {
2837
2850
  const u = c[_];
2838
2851
  if (i.push(u), _ === c.length - 1)
2839
2852
  return;
2840
2853
  const h = u.x, m = c[_ + 1].x;
2841
- if (!_t([h, m], l)) {
2854
+ if (!ft([h, m], l)) {
2842
2855
  const d = pe({
2843
2856
  dates: [h, m],
2844
2857
  timerange: e,
@@ -2861,19 +2874,19 @@ function pe({
2861
2874
  timerange: e,
2862
2875
  interval: t = 1
2863
2876
  }) {
2864
- const i = [], n = `${e}s`;
2877
+ const i = [], r = `${e}s`;
2865
2878
  if (s.length === 1)
2866
2879
  return s;
2867
2880
  const l = s.sort((o, a) => o < a ? -1 : o > a ? 1 : 0);
2868
2881
  for (let o = 0; o < l.length - 1; o++) {
2869
2882
  const a = l[o], c = l[o + 1];
2870
- if (!_t([a, c], n)) {
2871
- const _ = T(a, D(n)).add(
2883
+ if (!ft([a, c], r)) {
2884
+ const _ = T(a, D(r)).add(
2872
2885
  t,
2873
- n
2874
- ), u = T(c, D(n));
2886
+ r
2887
+ ), u = T(c, D(r));
2875
2888
  for (; _.isBefore(u); )
2876
- i.push(_.format(D(n))), _.add(t, n);
2889
+ i.push(_.format(D(r))), _.add(t, r);
2877
2890
  }
2878
2891
  }
2879
2892
  return i;
@@ -2885,12 +2898,12 @@ function we({
2885
2898
  const t = Fe({
2886
2899
  values: s,
2887
2900
  timerange: e
2888
- }), i = [], n = ft({
2901
+ }), i = [], r = gt({
2889
2902
  values: t,
2890
2903
  groupBy: "all"
2891
2904
  });
2892
- return Object.keys(n).forEach((l) => {
2893
- const o = n[l], a = o[0].operator === "count" ? "+" : o[0].operator, c = j({
2905
+ return Object.keys(r).forEach((l) => {
2906
+ const o = r[l], a = o[0].operator === "count" ? "+" : o[0].operator, c = j({
2894
2907
  values: o.map((_) => _.value),
2895
2908
  operator: a
2896
2909
  });
@@ -2945,26 +2958,26 @@ function ve({
2945
2958
  function Ce(s) {
2946
2959
  return s.indexOf(":") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
2947
2960
  }
2948
- function _t(s, e) {
2961
+ function ft(s, e) {
2949
2962
  let t = !1;
2950
2963
  const i = D(e);
2951
2964
  if (s.length === 0)
2952
2965
  return !1;
2953
2966
  if (s.length === 1)
2954
2967
  return !0;
2955
- for (let n = 0; n < s.length - 1; n++) {
2956
- const l = T(s[n], i), a = T(s[n + 1], i).diff(l, e);
2968
+ for (let r = 0; r < s.length - 1; r++) {
2969
+ const l = T(s[r], i), a = T(s[r + 1], i).diff(l, e);
2957
2970
  Math.abs(a) === 1 ? t = !0 : t = !1;
2958
2971
  }
2959
2972
  return t;
2960
2973
  }
2961
- function ft({
2974
+ function gt({
2962
2975
  values: s,
2963
2976
  groupBy: e
2964
2977
  }) {
2965
2978
  const t = {};
2966
2979
  return s.forEach((i) => {
2967
- const n = i.x, l = i.type, o = i.stacked, a = e === "all" ? `${n}-${l}-${o}` : `${l}-${o}`;
2980
+ const r = i.x, l = i.type, o = i.stacked, a = e === "all" ? `${r}-${l}-${o}` : `${l}-${o}`;
2968
2981
  t[a] || (t[a] = []), t[a].push(i);
2969
2982
  }), t;
2970
2983
  }
@@ -2997,14 +3010,14 @@ const ke = {
2997
3010
  fields: t,
2998
3011
  options: i
2999
3012
  }) => {
3000
- const n = G({
3013
+ const r = G({
3001
3014
  fieldName: s.x.name,
3002
3015
  values: e,
3003
3016
  fields: t
3004
3017
  }), l = [];
3005
3018
  s.y.forEach((d) => {
3006
- Object.keys(n).forEach((b) => {
3007
- const x = n[b].label, y = n[b].entries;
3019
+ Object.keys(r).forEach((b) => {
3020
+ const x = r[b].label, y = r[b].entries;
3008
3021
  if (d.label) {
3009
3022
  const v = G({
3010
3023
  fieldName: d.label,
@@ -3012,17 +3025,17 @@ const ke = {
3012
3025
  fields: t
3013
3026
  });
3014
3027
  Object.keys(v).forEach((C) => {
3015
- const w = v[C].entries, V = v[C].label, bt = L({
3028
+ const w = v[C].entries, V = v[C].label, yt = L({
3016
3029
  entries: w,
3017
3030
  fields: t,
3018
3031
  fieldName: d.name
3019
- }), yt = j({
3020
- values: bt,
3032
+ }), xt = j({
3033
+ values: yt,
3021
3034
  operator: d.operator
3022
3035
  });
3023
3036
  l.push({
3024
3037
  x: x || !1,
3025
- value: yt,
3038
+ value: xt,
3026
3039
  type: V,
3027
3040
  operator: d.operator,
3028
3041
  stacked: d.stacked
@@ -3040,7 +3053,7 @@ const ke = {
3040
3053
  l.push({
3041
3054
  x: x || !1,
3042
3055
  value: C,
3043
- type: gt({
3056
+ type: mt({
3044
3057
  yAxis: d,
3045
3058
  fields: t
3046
3059
  }),
@@ -3071,7 +3084,7 @@ const ke = {
3071
3084
  if (s.type === "line" && s.y_range && (m.yAxisOpts = {
3072
3085
  mode: s.y_range
3073
3086
  }, s.y_range === "auto")) {
3074
- const { min: d, max: b } = mt(h);
3087
+ const { min: d, max: b } = bt(h);
3075
3088
  m.yAxisOpts.valueOpts = { min: d, max: b };
3076
3089
  }
3077
3090
  return m;
@@ -3085,7 +3098,7 @@ function L({
3085
3098
  fieldName: e,
3086
3099
  values: i,
3087
3100
  fields: t
3088
- })).map(({ value: i, label: n }) => n);
3101
+ })).map(({ value: i, label: r }) => r);
3089
3102
  }
3090
3103
  function j({
3091
3104
  operator: s,
@@ -3113,7 +3126,7 @@ function j({
3113
3126
  })
3114
3127
  );
3115
3128
  case "avg": {
3116
- const i = e.reduce((n, l) => n + l, 0) / e.length || 0;
3129
+ const i = e.reduce((r, l) => r + l, 0) / e.length || 0;
3117
3130
  return Y(i);
3118
3131
  }
3119
3132
  case "min":
@@ -3131,13 +3144,13 @@ function G({
3131
3144
  values: t
3132
3145
  }) {
3133
3146
  const i = {};
3134
- return t.forEach((n) => {
3147
+ return t.forEach((r) => {
3135
3148
  const { value: l, label: o } = H({
3136
3149
  fields: e,
3137
- values: n,
3150
+ values: r,
3138
3151
  fieldName: s
3139
3152
  });
3140
- i[l] || (i[l] = { label: o, entries: [] }), i[l].entries.push(n);
3153
+ i[l] || (i[l] = { label: o, entries: [] }), i[l].entries.push(r);
3141
3154
  }), i;
3142
3155
  }
3143
3156
  function Oe(s) {
@@ -3147,98 +3160,98 @@ function Oe(s) {
3147
3160
  e = e.concat(i.entries);
3148
3161
  }), e;
3149
3162
  }
3150
- function gt({
3163
+ function mt({
3151
3164
  yAxis: s,
3152
3165
  fields: e
3153
3166
  }) {
3154
3167
  const t = e[s.name];
3155
3168
  return t != null && t.string ? t.string : s.name;
3156
3169
  }
3157
- function mt(s, e = 0.1) {
3170
+ function bt(s, e = 0.1) {
3158
3171
  if (s.length === 0)
3159
3172
  throw new Error("The values array cannot be empty.");
3160
- const t = s.map((o) => o.value), i = Math.min(...t), n = Math.max(...t), l = (n - i) * e;
3173
+ const t = s.map((o) => o.value), i = Math.min(...t), r = Math.max(...t), l = (r - i) * e;
3161
3174
  return {
3162
3175
  min: i - l,
3163
- max: n + l
3176
+ max: r + l
3164
3177
  };
3165
3178
  }
3166
3179
  const Le = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3167
3180
  __proto__: null,
3168
3181
  getAllObjectsInGroupedValues: Oe,
3169
- getMinMax: mt,
3182
+ getMinMax: bt,
3170
3183
  getValueForOperator: j,
3171
3184
  getValuesForYField: L,
3172
3185
  getValuesGroupedByField: G,
3173
- getYAxisFieldname: gt,
3186
+ getYAxisFieldname: mt,
3174
3187
  labelsForOperator: ke,
3175
3188
  processGraphData: Pe
3176
3189
  }, Symbol.toStringTag, { value: "Module" }));
3177
3190
  export {
3178
- zt as ActionButtons,
3179
- Zt as Alert,
3180
- Pt as Avatar,
3181
- Bt as Binary,
3191
+ It as ActionButtons,
3192
+ te as Alert,
3193
+ Ot as Avatar,
3194
+ Rt as Binary,
3182
3195
  it as Boolean,
3183
3196
  A as Button,
3184
- Tt as ButtonGroup,
3185
- ne as Card,
3186
- se as Carousel,
3197
+ zt as ButtonGroup,
3198
+ ae as Card,
3199
+ ie as Carousel,
3187
3200
  R as Char,
3188
3201
  at as CodeEditor,
3189
- ie as ColorPicker,
3190
- te as Comments,
3202
+ ne as ColorPicker,
3203
+ ee as Comments,
3191
3204
  z as Container,
3192
3205
  F as ContainerWidget,
3193
3206
  Me as Dashboard,
3194
3207
  ue as DashboardItem,
3195
- jt as Date,
3196
- Nt as DateTime,
3197
- ee as Email,
3208
+ Nt as Date,
3209
+ At as DateTime,
3210
+ se as Email,
3198
3211
  f as Field,
3199
3212
  q as Float,
3200
- Vt as FloatTime,
3213
+ Yt as FloatTime,
3201
3214
  Ee as Form,
3202
- dt as Graph,
3203
- ht as GraphAxis,
3215
+ ut as Graph,
3216
+ _t as GraphAxis,
3204
3217
  M as GraphChart,
3205
- ut as GraphIndicator,
3218
+ ht as GraphIndicator,
3206
3219
  he as GraphIndicatorField,
3207
3220
  me as GraphXAxis,
3208
3221
  ge as GraphYAxis,
3209
- Wt as Group,
3210
- Yt as HTMLPreview,
3211
- Lt as Icon,
3212
- Rt as Image,
3213
- qt as Indicator,
3214
- Et as Integer,
3222
+ Tt as Group,
3223
+ Dt as HTMLPreview,
3224
+ Gt as Icon,
3225
+ Lt as Image,
3226
+ Jt as Indicator,
3227
+ Vt as Integer,
3215
3228
  K as JSONField,
3216
3229
  Ye as Kanban,
3217
3230
  De as KanbanCard,
3218
3231
  st as Label,
3219
- It as Many2one,
3220
- St as Markdown,
3221
- nt as MultiCheckbox,
3232
+ St as Many2one,
3233
+ Et as Markdown,
3234
+ rt as MultiCheckbox,
3222
3235
  et as NewLine,
3223
3236
  B as Notebook,
3224
- rt as One2many,
3225
- Ot as Page,
3226
- Dt as ProgressBar,
3237
+ nt as One2many,
3238
+ Wt as Page,
3239
+ jt as ProgressBar,
3227
3240
  re as QRCode,
3228
- Qt as Radio,
3229
- Mt as Reference,
3241
+ Kt as Radio,
3242
+ Bt as Reference,
3230
3243
  de as SearchFieldTypes,
3231
3244
  je as SearchFilter,
3232
3245
  S as Selection,
3233
- At as Separator,
3246
+ Mt as Separator,
3234
3247
  N as Spinner,
3235
- Xt as Steps,
3236
- Kt as Switch,
3237
- Ht as Tag,
3238
- Jt as Tags,
3248
+ Ut as Steps,
3249
+ Xt as Switch,
3250
+ Qt as Tag,
3251
+ Ht as Tags,
3239
3252
  $ as Text,
3240
- Ut as Time,
3241
- $t as Timeline,
3253
+ Zt as Time,
3254
+ qt as Timeline,
3242
3255
  Ve as Tree,
3243
3256
  k as Widget,
3244
3257
  Re as graphFieldUtils,