@gisce/ooui 2.39.0 → 2.40.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ooui.es.js CHANGED
@@ -1,54 +1,54 @@
1
- var be = Object.defineProperty;
2
- var ye = (i, t, e) => t in i ? be(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
- var r = (i, t, e) => (ye(i, typeof t != "symbol" ? t + "" : t, e), e);
4
- import { decode as xe } from "html-entities";
5
- import { evaluateCondition as pe } from "@gisce/conscheck";
6
- import * as D from "txml";
1
+ var bt = Object.defineProperty;
2
+ var yt = (i, e, t) => e in i ? bt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
+ var r = (i, e, t) => (yt(i, typeof e != "symbol" ? e + "" : e, t), t);
4
+ import { decode as xt } from "html-entities";
5
+ import { evaluateCondition as pt } from "@gisce/conscheck";
6
+ import * as I from "txml";
7
7
  import T from "moment";
8
- const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve = ({
8
+ const wt = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Ft = ({
9
9
  entry: i,
10
- values: t,
11
- fields: e
10
+ values: e,
11
+ fields: t
12
12
  }) => {
13
- let [s, n, a] = i, l = t[s];
14
- const o = X({
13
+ let [s, n, a] = i, o = e[s];
14
+ const l = U({
15
15
  fieldName: s,
16
- valueInObject: l,
16
+ valueInObject: o,
17
17
  expectedValue: a,
18
- fields: e
18
+ fields: t
19
19
  });
20
- if (o.directOutcome !== void 0)
21
- return o.directOutcome;
22
- switch (o.modifiedValueInObject !== null && (l = o.modifiedValueInObject), o.modifiedExpectedValue !== null && (a = o.modifiedExpectedValue), n.toLowerCase()) {
20
+ if (l.directOutcome !== void 0)
21
+ return l.directOutcome;
22
+ switch (l.modifiedValueInObject !== null && (o = l.modifiedValueInObject), l.modifiedExpectedValue !== null && (a = l.modifiedExpectedValue), n.toLowerCase()) {
23
23
  case "=":
24
24
  case "==":
25
- return l == a;
25
+ return o == a;
26
26
  case "<>":
27
27
  case "!=":
28
- return l != a;
28
+ return o != a;
29
29
  case ">":
30
- return l > a;
30
+ return o > a;
31
31
  case ">=":
32
- return l >= a;
32
+ return o >= a;
33
33
  case "<":
34
- return l < a;
34
+ return o < a;
35
35
  case "<=":
36
- return l <= a;
36
+ return o <= a;
37
37
  case "in":
38
- return a.includes(l);
38
+ return a.includes(o);
39
39
  case "not in":
40
- return !a.includes(l);
40
+ return !a.includes(o);
41
41
  default:
42
42
  return !1;
43
43
  }
44
- }, m = (i) => xe(i, { level: "xml" }), X = ({
44
+ }, g = (i) => xt(i, { level: "xml" }), U = ({
45
45
  fieldName: i,
46
- valueInObject: t,
47
- expectedValue: e,
46
+ valueInObject: e,
47
+ expectedValue: t,
48
48
  fields: s = {}
49
49
  }) => {
50
50
  const n = {
51
- modifiedValueInObject: t,
51
+ modifiedValueInObject: e,
52
52
  modifiedExpectedValue: null,
53
53
  directOutcome: void 0
54
54
  };
@@ -56,24 +56,24 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
56
56
  modifiedValueInObject: null,
57
57
  modifiedExpectedValue: null,
58
58
  directOutcome: !1
59
- } : t === void 0 && s[i].type !== "boolean" && s[i].type !== "many2one" && s[i].type !== "selection" && typeof e != "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
- } : (n.modifiedValueInObject = s[i].type === "boolean" ? !!t : t, s[i].type === "many2one" && e === !1 && t === void 0 ? n.modifiedExpectedValue = void 0 : (n.modifiedValueInObject === void 0 ? n.modifiedValueInObject = !1 : Array.isArray(n.modifiedValueInObject) && n.modifiedValueInObject[0] !== void 0 && (n.modifiedValueInObject = n.modifiedValueInObject[0]), n.modifiedValueInObject === null && (n.modifiedValueInObject = !1)), s[i].type === "many2one" && Array.isArray(n.modifiedValueInObject) && n.modifiedValueInObject[0] === void 0 && (n.modifiedValueInObject = !1), s[i].type === "boolean" && (e === 0 || e === 1) && (n.modifiedExpectedValue = e !== 0), n);
64
- }, J = ({
63
+ } : (n.modifiedValueInObject = s[i].type === "boolean" ? !!e : e, s[i].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)), s[i].type === "many2one" && Array.isArray(n.modifiedValueInObject) && n.modifiedValueInObject[0] === void 0 && (n.modifiedValueInObject = !1), s[i].type === "boolean" && (t === 0 || t === 1) && (n.modifiedExpectedValue = t !== 0), n);
64
+ }, Q = ({
65
65
  attrs: i,
66
- values: t,
67
- fields: e,
66
+ values: e,
67
+ fields: t,
68
68
  widgetType: s
69
69
  }) => {
70
- const d = i.replace(/\(/g, "[").replace(/\)/g, "]").replace(/'/g, '"').replace(/True/g, "true").replace(/False/g, "false"), _ = m(d), h = JSON.parse(_), u = {};
71
- for (const g of Object.keys(h)) {
72
- const x = h[g].map((y) => ve({ entry: y, values: t, fields: e })).every((y) => y);
73
- x ? u[g] = !0 : g === "readonly" && !x && s === "button" && (u[g] = !1);
70
+ const d = i.replace(/\(/g, "[").replace(/\)/g, "]").replace(/'/g, '"').replace(/True/g, "true").replace(/False/g, "false"), _ = g(d), h = JSON.parse(_), u = {};
71
+ for (const m of Object.keys(h)) {
72
+ const x = h[m].map((y) => Ft({ entry: y, values: e, fields: t })).every((y) => y);
73
+ x ? u[m] = !0 : m === "readonly" && !x && s === "button" && (u[m] = !1);
74
74
  }
75
75
  return u;
76
- }, U = (i) => {
76
+ }, Z = (i) => {
77
77
  if (i === void 0)
78
78
  return {};
79
79
  if (typeof i == "string")
@@ -84,71 +84,71 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
84
84
  }
85
85
  else
86
86
  return i;
87
- }, Fe = ({
87
+ }, vt = ({
88
88
  attrs: i,
89
- values: t,
90
- fields: e,
89
+ values: e,
90
+ fields: t,
91
91
  widgetType: s
92
92
  }) => {
93
93
  try {
94
- const n = m(i), a = JSON.parse(
94
+ const n = g(i), a = JSON.parse(
95
95
  n.replace(/'/g, '"')
96
- ), l = {};
97
- for (const o of Object.keys(a)) {
98
- const d = pe({
99
- object: t,
100
- condition: a[o],
96
+ ), o = {};
97
+ for (const l of Object.keys(a)) {
98
+ const d = pt({
99
+ object: e,
100
+ condition: a[l],
101
101
  evaluateFieldComparison: ({
102
102
  fieldName: _,
103
103
  valueInObject: h,
104
104
  expectedValue: u
105
- }) => X({
105
+ }) => U({
106
106
  fieldName: _,
107
107
  valueInObject: h,
108
108
  expectedValue: u,
109
- fields: e
109
+ fields: t
110
110
  })
111
111
  });
112
- d ? l[o] = !0 : o === "readonly" && !d && s === "button" && (l[o] = !1);
112
+ d ? o[l] = !0 : l === "readonly" && !d && s === "button" && (o[l] = !1);
113
113
  }
114
- return l;
114
+ return o;
115
115
  } catch (n) {
116
116
  throw console.error(n), n instanceof SyntaxError ? new Error(
117
117
  "Error parsing new json_attrs. Original string: " + i
118
118
  ) : n;
119
119
  }
120
- }, Ce = ({
120
+ }, Ct = ({
121
121
  tagAttributes: i,
122
- values: t,
123
- fields: e,
122
+ values: e,
123
+ fields: t,
124
124
  widgetType: s,
125
125
  fallbackMode: n = !0
126
126
  }) => {
127
127
  let a = {};
128
128
  if (i.json_attrs)
129
129
  try {
130
- a = Fe({
130
+ a = vt({
131
131
  attrs: i.json_attrs,
132
- values: t,
133
- fields: e,
132
+ values: e,
133
+ fields: t,
134
134
  widgetType: s
135
135
  });
136
- } catch (l) {
136
+ } catch (o) {
137
137
  if (n && i.attrs)
138
- a = J({
138
+ a = Q({
139
139
  attrs: i.attrs,
140
- values: t,
141
- fields: e,
140
+ values: e,
141
+ fields: t,
142
142
  widgetType: s
143
143
  });
144
144
  else
145
- throw l;
145
+ throw o;
146
146
  }
147
147
  else
148
- i.attrs && (a = J({
148
+ i.attrs && (a = Q({
149
149
  attrs: i.attrs,
150
- values: t,
151
- fields: e,
150
+ values: e,
151
+ fields: t,
152
152
  widgetType: s
153
153
  }));
154
154
  return {
@@ -157,8 +157,8 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
157
157
  attrs: void 0,
158
158
  json_attrs: void 0
159
159
  };
160
- }, k = (i) => i === 1 || i === "1" || i === !0 || i === "True" || i === "true", P = class P {
161
- constructor(t) {
160
+ }, p = (i) => i === 1 || i === "1" || i === !0 || i === "True" || i === "true", P = class P {
161
+ constructor(e) {
162
162
  /**
163
163
  * Determines if widget is read only (default is undefined)
164
164
  */
@@ -194,67 +194,67 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
194
194
  * Base type of the field
195
195
  */
196
196
  r(this, "_fieldType", "");
197
- this._colspan = P._defaultColspan, this._invisible = !1, t && (t.colspan && (this._colspan = +t.colspan), t.readonly !== void 0 && (this._readOnly = k(t.readonly)), t.invisible && (t.invisible === 1 || t.invisible === "1" || t.invisible === !0) && (this._invisible = !0), t.type && (this._type = t.type), t.context && (this._context = t.context), t.domain && (typeof t.domain != "string" ? this._domain = m(JSON.stringify(t.domain)) : this._domain = m(t.domain)), t.type && (this._fieldType = t.fieldsWidgetType), t.widget_props && (this._parsedWidgetProps = U(t.widget_props)), t.key && (this._key = t.key), t.is_function && (this._isFunction = t.is_function), t.is_sortable && (this._isSortable = t.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 = 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() {
200
200
  return P._defaultColspan;
201
201
  }
202
- static set defaultColspan(t) {
203
- P._defaultColspan = t;
202
+ static set defaultColspan(e) {
203
+ P._defaultColspan = e;
204
204
  }
205
205
  get readOnly() {
206
206
  return this._readOnly;
207
207
  }
208
- set readOnly(t) {
209
- this._readOnly = t;
208
+ set readOnly(e) {
209
+ this._readOnly = e;
210
210
  }
211
211
  get colspan() {
212
212
  return this._colspan;
213
213
  }
214
- set colspan(t) {
215
- this._colspan = +t;
214
+ set colspan(e) {
215
+ this._colspan = +e;
216
216
  }
217
217
  get invisible() {
218
218
  return this._invisible;
219
219
  }
220
- set invisible(t) {
221
- this._invisible = t;
220
+ set invisible(e) {
221
+ this._invisible = e;
222
222
  }
223
223
  get type() {
224
224
  return this._type;
225
225
  }
226
- set type(t) {
227
- this._type = t;
226
+ set type(e) {
227
+ this._type = e;
228
228
  }
229
229
  get context() {
230
230
  return this._context;
231
231
  }
232
- set context(t) {
233
- this._context = t;
232
+ set context(e) {
233
+ this._context = e;
234
234
  }
235
235
  get domain() {
236
236
  return this._domain;
237
237
  }
238
- set domain(t) {
239
- this._domain = t;
238
+ set domain(e) {
239
+ this._domain = e;
240
240
  }
241
241
  get key() {
242
242
  return this._key;
243
243
  }
244
- set key(t) {
245
- this._key = t;
244
+ set key(e) {
245
+ this._key = e;
246
246
  }
247
247
  get parsedWidgetProps() {
248
248
  return this._parsedWidgetProps;
249
249
  }
250
- set parsedWidgetProps(t) {
251
- this._parsedWidgetProps = t;
250
+ set parsedWidgetProps(e) {
251
+ this._parsedWidgetProps = e;
252
252
  }
253
253
  get isFunction() {
254
254
  return this._isFunction;
255
255
  }
256
- set isFunction(t) {
257
- this._isFunction = t;
256
+ set isFunction(e) {
257
+ this._isFunction = e;
258
258
  }
259
259
  get isSortable() {
260
260
  return this._isSortable;
@@ -267,10 +267,10 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
267
267
  * Default colspan
268
268
  */
269
269
  r(P, "_defaultColspan", 1);
270
- let C = P;
271
- class f extends C {
272
- constructor(e) {
273
- super(e);
270
+ let k = P;
271
+ class f extends k {
272
+ constructor(t) {
273
+ super(t);
274
274
  /**
275
275
  * Field identifier
276
276
  *
@@ -316,55 +316,55 @@ class f extends C {
316
316
  r(this, "_selectionValues", /* @__PURE__ */ new Map([]));
317
317
  r(this, "_autoRefresh", !1);
318
318
  r(this, "_raw_props");
319
- this._activated = !0, e && (this._raw_props = e, e.name && (this._id = e.name), e.activated && (this._activated = e.activated), e.string && (this._label = m(e.string)), e.help && (this._tooltip = m(e.help)), e.nolabel && (e.nolabel === "1" || typeof e.nolabel == "boolean" && e.nolabel === !0) && (this._nolabel = !0), e.required && (e.required === "1" || e.required === !0 || e.required === "True") && (this._required = !0), e.sum && (this._sum = m(e.sum)), e.selection && (this._selectionValues = new Map(e.selection)), e.help_inline && (this.tooltipInline = we(e.help_inline)), e.autorefresh && (this.autoRefresh = k(e.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 = wt(t.help_inline)), t.autorefresh && (this.autoRefresh = p(t.autorefresh)));
320
320
  }
321
321
  get id() {
322
322
  return this._id;
323
323
  }
324
- set id(e) {
325
- this._id = e;
324
+ set id(t) {
325
+ this._id = t;
326
326
  }
327
327
  get label() {
328
328
  return this._label;
329
329
  }
330
- set label(e) {
331
- this._label = e;
330
+ set label(t) {
331
+ this._label = t;
332
332
  }
333
333
  get nolabel() {
334
334
  return this._nolabel;
335
335
  }
336
- set nolabel(e) {
337
- this._nolabel = e;
336
+ set nolabel(t) {
337
+ this._nolabel = t;
338
338
  }
339
339
  get required() {
340
340
  return this._required;
341
341
  }
342
- set required(e) {
343
- this._required = e;
342
+ set required(t) {
343
+ this._required = t;
344
344
  }
345
345
  get tooltip() {
346
346
  return this._tooltip;
347
347
  }
348
- set tooltip(e) {
349
- this._tooltip = e;
348
+ set tooltip(t) {
349
+ this._tooltip = t;
350
350
  }
351
351
  get tooltipInline() {
352
352
  return this._tooltipInline;
353
353
  }
354
- set tooltipInline(e) {
355
- this._tooltipInline = e;
354
+ set tooltipInline(t) {
355
+ this._tooltipInline = t;
356
356
  }
357
357
  get activated() {
358
358
  return this._activated;
359
359
  }
360
- set activated(e) {
361
- this._activated = e;
360
+ set activated(t) {
361
+ this._activated = t;
362
362
  }
363
363
  get sum() {
364
364
  return this._sum;
365
365
  }
366
- set sum(e) {
367
- this._sum = e;
366
+ set sum(t) {
367
+ this._sum = t;
368
368
  }
369
369
  get suffix() {
370
370
  return this._parsedWidgetProps.suffix || "";
@@ -375,20 +375,20 @@ class f extends C {
375
375
  get selectionValues() {
376
376
  return this._selectionValues;
377
377
  }
378
- set selectionValues(e) {
379
- this._selectionValues = e;
378
+ set selectionValues(t) {
379
+ this._selectionValues = t;
380
380
  }
381
381
  get autoRefresh() {
382
382
  return this._autoRefresh ?? !1;
383
383
  }
384
- set autoRefresh(e) {
385
- this._autoRefresh = e;
384
+ set autoRefresh(t) {
385
+ this._autoRefresh = t;
386
386
  }
387
387
  get readOnly() {
388
388
  return this.autoRefresh ? !0 : super.readOnly;
389
389
  }
390
- set readOnly(e) {
391
- super.readOnly = e;
390
+ set readOnly(t) {
391
+ super.readOnly = t;
392
392
  }
393
393
  get raw_props() {
394
394
  return this._raw_props;
@@ -397,20 +397,20 @@ class f extends C {
397
397
  * Returns this instance in case this id matches param id.
398
398
  * @param {string} id id (name) to find
399
399
  */
400
- findById(e) {
401
- return this._id === e ? this : null;
400
+ findById(t) {
401
+ return this._id === t ? this : null;
402
402
  }
403
403
  }
404
- class ke extends f {
404
+ class kt extends f {
405
405
  }
406
- class K extends C {
407
- findById(t) {
406
+ class tt extends k {
407
+ findById(e) {
408
408
  return null;
409
409
  }
410
410
  }
411
- class Z extends f {
412
- constructor(e) {
413
- super({ ...e, nolabel: !0 });
411
+ class et extends f {
412
+ constructor(t) {
413
+ super({ ...t, nolabel: !0 });
414
414
  /**
415
415
  * Label text
416
416
  */
@@ -431,45 +431,45 @@ class Z extends f {
431
431
  * Id of the field that this label goes with. Null if it's an independent label
432
432
  */
433
433
  r(this, "_fieldForLabel", null);
434
- e != null && e.fieldForLabel && (this._fieldForLabel = e.fieldForLabel), e.widget_props && (this.parsedWidgetProps.label_type && (this.labelType = this.parsedWidgetProps.label_type), this.parsedWidgetProps.label_size && (this.labelSize = this.parsedWidgetProps.label_size)), e != null && e.align && (this.align = e.align);
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() {
437
437
  return this._text;
438
438
  }
439
- set text(e) {
440
- this._text = e;
439
+ set text(t) {
440
+ this._text = t;
441
441
  }
442
442
  get align() {
443
443
  return this._align;
444
444
  }
445
- set align(e) {
446
- this._align = e;
445
+ set align(t) {
446
+ this._align = t;
447
447
  }
448
448
  get labelType() {
449
449
  return this._labelType;
450
450
  }
451
- set labelType(e) {
452
- this._labelType = e;
451
+ set labelType(t) {
452
+ this._labelType = t;
453
453
  }
454
454
  get labelSize() {
455
455
  return this._labelSize;
456
456
  }
457
- set labelSize(e) {
458
- this._labelSize = e;
457
+ set labelSize(t) {
458
+ this._labelSize = t;
459
459
  }
460
460
  get humanDate() {
461
- var e;
462
- return k(((e = this._parsedWidgetProps) == null ? void 0 : e.human_date) ?? !1);
461
+ var t;
462
+ return p(((t = this._parsedWidgetProps) == null ? void 0 : t.human_date) ?? !1);
463
463
  }
464
464
  get fieldForLabel() {
465
465
  return this._fieldForLabel;
466
466
  }
467
- set fieldForLabel(e) {
468
- this._fieldForLabel = e;
467
+ set fieldForLabel(t) {
468
+ this._fieldForLabel = t;
469
469
  }
470
470
  }
471
- class V {
472
- constructor(t = 4, e = 6, s = !1, n = void 0) {
471
+ class Y {
472
+ constructor(e = 4, t = 6, s = !1, n = void 0) {
473
473
  /**
474
474
  * Number of columns the container is divided
475
475
  */
@@ -491,25 +491,25 @@ class V {
491
491
  * Unique key for container
492
492
  */
493
493
  r(this, "_key");
494
- this._columns = t, this._colspan = e, this._rows = [[]], this._index = 0, this._readOnly = s, this._key = n;
494
+ this._columns = e, this._colspan = t, this._rows = [[]], this._index = 0, this._readOnly = s, this._key = n;
495
495
  }
496
496
  get columns() {
497
497
  return this._columns;
498
498
  }
499
- set columns(t) {
500
- this._columns = t;
499
+ set columns(e) {
500
+ this._columns = e;
501
501
  }
502
502
  get colspan() {
503
503
  return this._colspan;
504
504
  }
505
- set colspan(t) {
506
- this._colspan = t;
505
+ set colspan(e) {
506
+ this._colspan = e;
507
507
  }
508
508
  get rows() {
509
509
  return this._rows;
510
510
  }
511
- set rows(t) {
512
- this._rows = t;
511
+ set rows(e) {
512
+ this._rows = e;
513
513
  }
514
514
  get index() {
515
515
  return this._index;
@@ -517,43 +517,43 @@ class V {
517
517
  get readOnly() {
518
518
  return this._readOnly;
519
519
  }
520
- set readOnly(t) {
521
- this._readOnly = t;
520
+ set readOnly(e) {
521
+ this._readOnly = e;
522
522
  }
523
523
  get key() {
524
524
  return this._key;
525
525
  }
526
- set key(t) {
527
- this._key = t;
526
+ set key(e) {
527
+ this._key = e;
528
528
  }
529
529
  /**
530
530
  * Returns the next free position
531
531
  */
532
532
  freePosition() {
533
- const t = this._rows[this._index].filter((e) => !e.invisible).reduce((e, s) => e + s.colspan, 0);
534
- return this._columns - t;
533
+ const e = this._rows[this._index].filter((t) => !t.invisible).reduce((t, s) => t + s.colspan, 0);
534
+ return this._columns - e;
535
535
  }
536
- addWidget(t, e) {
537
- const s = [], n = e ? e.addLabel : !0;
538
- if (t instanceof K) {
536
+ addWidget(e, t) {
537
+ const s = [], n = t ? t.addLabel : !0;
538
+ if (e instanceof tt) {
539
539
  this._rows.push([]), this._index++;
540
540
  return;
541
541
  }
542
- if (t.colspan > this._columns && (t.colspan = this._columns), t.readOnly = t.readOnly || this.readOnly, n && t instanceof f && !t.nolabel) {
543
- t.colspan > 1 && (t.colspan -= 1);
544
- const l = new Z({
545
- name: t.id + "_label",
546
- string: t.label,
547
- invisible: t.invisible,
548
- help: t.tooltip,
549
- fieldForLabel: t.id,
550
- key: `${t.key}-label`
542
+ if (e.colspan > this._columns && (e.colspan = this._columns), e.readOnly = e.readOnly || this.readOnly, n && e instanceof f && !e.nolabel) {
543
+ e.colspan > 1 && (e.colspan -= 1);
544
+ const o = new et({
545
+ name: e.id + "_label",
546
+ string: e.label,
547
+ invisible: e.invisible,
548
+ help: e.tooltip,
549
+ fieldForLabel: e.id,
550
+ key: `${e.key}-label`
551
551
  });
552
- l.type = "label", s.push(l), s.push(t);
552
+ o.type = "label", s.push(o), s.push(e);
553
553
  } else
554
- s.push(t);
554
+ s.push(e);
555
555
  s.reduce(
556
- (l, o) => l + o.colspan,
556
+ (o, l) => o + l.colspan,
557
557
  0
558
558
  ) > this.freePosition() && (this._rows.push([]), this._index++), this._rows[this._index] = this._rows[this._index].concat(s);
559
559
  }
@@ -561,19 +561,19 @@ class V {
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
- findById(t) {
564
+ findById(e) {
565
565
  var s;
566
- let e = null;
566
+ let t = null;
567
567
  return (s = this._rows) != null && s.length && this._rows.forEach((n) => {
568
- e || n != null && n.length && n.forEach((a) => {
569
- e || a && (e = a.findById(t));
568
+ t || n != null && n.length && n.forEach((a) => {
569
+ t || a && (t = a.findById(e));
570
570
  });
571
- }), e;
571
+ }), t;
572
572
  }
573
573
  }
574
- const O = class O extends C {
575
- constructor(e) {
576
- super(e);
574
+ const O = class O extends k {
575
+ constructor(t) {
576
+ super(t);
577
577
  /**
578
578
  * Field identifier
579
579
  *
@@ -592,120 +592,120 @@ const O = class O extends C {
592
592
  * Container label
593
593
  */
594
594
  r(this, "_label", "");
595
- this._container = new V(
596
- e == null ? void 0 : e.col,
595
+ this._container = new Y(
596
+ t == null ? void 0 : t.col,
597
597
  O._defaultColspan,
598
598
  this.readOnly,
599
- e == null ? void 0 : e.key
600
- ), e && (e.name && (this._id = e.name), e.colspan ? this._container.colspan = +e.colspan : this._mustExpand = !0, e.string && (this._label = m(e.string)));
599
+ t == null ? void 0 : t.key
600
+ ), t && (t.name && (this._id = t.name), t.colspan ? this._container.colspan = +t.colspan : this._mustExpand = !0, t.string && (this._label = g(t.string)));
601
601
  }
602
602
  get id() {
603
603
  return this._id;
604
604
  }
605
- set id(e) {
606
- this._id = e;
605
+ set id(t) {
606
+ this._id = t;
607
607
  }
608
608
  static get defaultColspan() {
609
609
  return O._defaultColspan;
610
610
  }
611
- static set defaultColspan(e) {
612
- O._defaultColspan = e;
611
+ static set defaultColspan(t) {
612
+ O._defaultColspan = t;
613
613
  }
614
614
  get container() {
615
615
  return this._container;
616
616
  }
617
- set container(e) {
618
- this._container = e;
617
+ set container(t) {
618
+ this._container = t;
619
619
  }
620
620
  get colspan() {
621
621
  return this._container.colspan;
622
622
  }
623
- set colspan(e) {
624
- this._container.colspan = +e;
623
+ set colspan(t) {
624
+ this._container.colspan = +t;
625
625
  }
626
626
  get mustExpand() {
627
627
  return this._mustExpand;
628
628
  }
629
- set mustExpand(e) {
630
- this._mustExpand = e;
629
+ set mustExpand(t) {
630
+ this._mustExpand = t;
631
631
  }
632
632
  get label() {
633
633
  return this._label;
634
634
  }
635
- set label(e) {
636
- this._label = e;
635
+ set label(t) {
636
+ this._label = t;
637
637
  }
638
638
  /**
639
639
  * Calls container's findById method to find the widgets matching with param id
640
640
  * @param {string} id id to find
641
641
  */
642
- findById(e) {
643
- return e === this.id ? this : this.container.findById(e);
642
+ findById(t) {
643
+ return t === this.id ? this : this.container.findById(t);
644
644
  }
645
645
  };
646
646
  r(O, "_defaultColspan", 6);
647
- let w = O;
648
- const W = class W extends w {
649
- constructor(e) {
650
- super(e);
647
+ let F = O;
648
+ const W = class W extends F {
649
+ constructor(t) {
650
+ super(t);
651
651
  r(this, "_tabPosition", "top");
652
652
  r(this, "_pages", []);
653
- this.colspan = W._defaultColspan, e && (e.colspan && (this.colspan = e.colspan), e.tabpos && (this._tabPosition = e.tabpos));
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() {
656
656
  return W._defaultColspan;
657
657
  }
658
- static set defaultColspan(e) {
659
- W._defaultColspan = e;
658
+ static set defaultColspan(t) {
659
+ W._defaultColspan = t;
660
660
  }
661
661
  get tabPosition() {
662
662
  return this._tabPosition;
663
663
  }
664
- set tabPosition(e) {
665
- this._tabPosition = e;
664
+ set tabPosition(t) {
665
+ this._tabPosition = t;
666
666
  }
667
667
  get pages() {
668
668
  return [].concat.apply([], this._container.rows);
669
669
  }
670
670
  };
671
671
  r(W, "_defaultColspan", 3);
672
- let N = W;
673
- class j extends w {
674
- constructor(e) {
675
- super(e);
672
+ let A = W;
673
+ class D extends F {
674
+ constructor(t) {
675
+ super(t);
676
676
  r(this, "_loading", !1);
677
- e && e.loading && (this._loading = e.loading);
677
+ t && t.loading && (this._loading = t.loading);
678
678
  }
679
679
  get loading() {
680
680
  return this._loading;
681
681
  }
682
- set loading(e) {
683
- this._loading = e;
682
+ set loading(t) {
683
+ this._loading = t;
684
684
  }
685
685
  }
686
- class Pe extends j {
687
- constructor(e) {
688
- super(e);
686
+ class Pt extends D {
687
+ constructor(t) {
688
+ super(t);
689
689
  r(this, "_icon", null);
690
- e.icon && (this._icon = e.icon);
690
+ t.icon && (this._icon = t.icon);
691
691
  }
692
692
  get icon() {
693
693
  return this._icon;
694
694
  }
695
- set icon(e) {
696
- this._icon = e;
695
+ set icon(t) {
696
+ this._icon = t;
697
697
  }
698
698
  }
699
- class Oe extends j {
700
- constructor(e) {
699
+ class Ot extends D {
700
+ constructor(t) {
701
701
  var s;
702
- super(e);
702
+ super(t);
703
703
  r(this, "_icon", null);
704
704
  r(this, "_height");
705
705
  r(this, "_backgroundColor");
706
- if (e && (e.icon && (this._icon = e.icon), e.height))
706
+ if (t && (t.icon && (this._icon = t.icon), t.height))
707
707
  try {
708
- this._height = parseInt(e.height);
708
+ this._height = parseInt(t.height);
709
709
  } catch {
710
710
  console.log("Error parsing height"), this._height = void 0;
711
711
  }
@@ -714,27 +714,27 @@ class Oe extends j {
714
714
  get icon() {
715
715
  return this._icon;
716
716
  }
717
- set icon(e) {
718
- this._icon = e;
717
+ set icon(t) {
718
+ this._icon = t;
719
719
  }
720
720
  get height() {
721
721
  return this._height;
722
722
  }
723
- set height(e) {
724
- this._height = e;
723
+ set height(t) {
724
+ this._height = t;
725
725
  }
726
726
  get backgroundColor() {
727
727
  return this._backgroundColor;
728
728
  }
729
- set backgroundColor(e) {
730
- this._backgroundColor = e;
729
+ set backgroundColor(t) {
730
+ this._backgroundColor = t;
731
731
  }
732
732
  }
733
- class ee extends f {
734
- constructor(e) {
733
+ class G extends f {
734
+ constructor(t) {
735
735
  super({
736
- ...e,
737
- nolabel: (e == null ? void 0 : e.nolabel) !== void 0 ? e.nolabel : !0
736
+ ...t,
737
+ nolabel: (t == null ? void 0 : t.nolabel) !== void 0 ? t.nolabel : !0
738
738
  });
739
739
  /**
740
740
  * Type
@@ -754,13 +754,13 @@ class ee extends f {
754
754
  r(this, "_confirmMessage", "");
755
755
  r(this, "_primary", !1);
756
756
  r(this, "_danger", !1);
757
- if (e) {
758
- if (e.string && (this._caption = m(e.string)), e.buttonType && (this._buttonType = e.buttonType), e.confirm && (this._confirmMessage = m(e.confirm)), e.special && e.special === "cancel" && (this._buttonType = "cancel"), e.icon && (this._icon = e.icon), e.primary) {
759
- const s = e.primary;
757
+ if (t) {
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 s = t.primary;
760
760
  (s === "1" || s === 1 || s === !0) && (this._primary = !0);
761
761
  }
762
- if (e.danger) {
763
- const s = e.danger;
762
+ if (t.danger) {
763
+ const s = t.danger;
764
764
  (s === "1" || s === 1 || s === !0) && (this._danger = !0);
765
765
  }
766
766
  }
@@ -768,45 +768,45 @@ class ee extends f {
768
768
  get buttonType() {
769
769
  return this._buttonType;
770
770
  }
771
- set buttonType(e) {
772
- this._buttonType = e;
771
+ set buttonType(t) {
772
+ this._buttonType = t;
773
773
  }
774
774
  get caption() {
775
775
  return this._caption;
776
776
  }
777
- set caption(e) {
778
- this._caption = e;
777
+ set caption(t) {
778
+ this._caption = t;
779
779
  }
780
780
  get icon() {
781
781
  return this._icon;
782
782
  }
783
- set icon(e) {
784
- this._icon = e;
783
+ set icon(t) {
784
+ this._icon = t;
785
785
  }
786
786
  get confirmMessage() {
787
787
  return this._confirmMessage;
788
788
  }
789
- set confirmMessage(e) {
790
- this._confirmMessage = e;
789
+ set confirmMessage(t) {
790
+ this._confirmMessage = t;
791
791
  }
792
792
  get primary() {
793
793
  return this._primary;
794
794
  }
795
- set primary(e) {
796
- this._primary = e;
795
+ set primary(t) {
796
+ this._primary = t;
797
797
  }
798
798
  get danger() {
799
799
  return this._danger;
800
800
  }
801
- set danger(e) {
802
- this._danger = e;
801
+ set danger(t) {
802
+ this._danger = t;
803
803
  }
804
804
  }
805
- class We extends w {
806
- constructor(e) {
807
- super(e);
805
+ class Wt extends F {
806
+ constructor(t) {
807
+ super(t);
808
808
  r(this, "_defaultName", "");
809
- e.default && (this._defaultName = e.default);
809
+ t.default && (this._defaultName = t.default);
810
810
  }
811
811
  get defaultName() {
812
812
  return this._defaultName;
@@ -815,11 +815,11 @@ class We extends w {
815
815
  return this.buttons.find((s) => s.id === this.defaultName) || this.buttons[0];
816
816
  }
817
817
  get colspan() {
818
- var e;
819
- return ((e = this.defaultButton) == null ? void 0 : e.colspan) || 1;
818
+ var t;
819
+ return ((t = this.defaultButton) == null ? void 0 : t.colspan) || 1;
820
820
  }
821
- set colspan(e) {
822
- this.defaultButton && (this.defaultButton.colspan = e);
821
+ set colspan(t) {
822
+ this.defaultButton && (this.defaultButton.colspan = t);
823
823
  }
824
824
  get secondaryButtons() {
825
825
  return this.buttons.filter(
@@ -830,14 +830,14 @@ class We extends w {
830
830
  );
831
831
  }
832
832
  get buttons() {
833
- return this._container.rows.flat().filter((e) => !e.invisible);
833
+ return this._container.rows.flat().filter((t) => !t.invisible);
834
834
  }
835
835
  }
836
- class Te extends f {
836
+ class Tt extends f {
837
837
  }
838
- class A extends f {
839
- constructor(e) {
840
- super(e);
838
+ class N extends f {
839
+ constructor(t) {
840
+ super(t);
841
841
  /**
842
842
  * Field place holder
843
843
  */
@@ -848,13 +848,13 @@ class A extends f {
848
848
  r(this, "_size");
849
849
  r(this, "_isPassword", !1);
850
850
  r(this, "_translatable", !1);
851
- e && (e.size && (this._size = e.size), e.password && (this.isPassword = e.password === "True"), e.translate && (this.translatable = e.translate === "True" || e.translate === !0));
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() {
854
854
  return this._placeholder;
855
855
  }
856
- set placeholder(e) {
857
- this._placeholder = e;
856
+ set placeholder(t) {
857
+ this._placeholder = t;
858
858
  }
859
859
  get showCount() {
860
860
  return this.parsedWidgetProps.showCount || !1;
@@ -862,25 +862,25 @@ class A extends f {
862
862
  get size() {
863
863
  return this._size;
864
864
  }
865
- set size(e) {
866
- this._size = e;
865
+ set size(t) {
866
+ this._size = t;
867
867
  }
868
868
  get isPassword() {
869
869
  return this._isPassword;
870
870
  }
871
- set isPassword(e) {
872
- this._isPassword = e;
871
+ set isPassword(t) {
872
+ this._isPassword = t;
873
873
  }
874
874
  get translatable() {
875
875
  return this._translatable;
876
876
  }
877
- set translatable(e) {
878
- this._translatable = e;
877
+ set translatable(t) {
878
+ this._translatable = t;
879
879
  }
880
880
  }
881
- class L extends f {
882
- constructor(e) {
883
- super(e);
881
+ class $ extends f {
882
+ constructor(t) {
883
+ super(t);
884
884
  /**
885
885
  * Field place holder
886
886
  */
@@ -898,21 +898,21 @@ class L extends f {
898
898
  */
899
899
  r(this, "_height");
900
900
  r(this, "_translatable", !1);
901
- if (e) {
902
- if (e.placeholder && (this._placeholder = m(e.placeholder)), e.colspan || (this._mustExpand = !0), e.height)
901
+ if (t) {
902
+ if (t.placeholder && (this._placeholder = g(t.placeholder)), t.colspan || (this._mustExpand = !0), t.height)
903
903
  try {
904
- this._height = parseInt(e.height);
904
+ this._height = parseInt(t.height);
905
905
  } catch {
906
906
  this._height = void 0;
907
907
  }
908
- e.translate && (this.translatable = e.translate === "True" || e.translate === !0), e.size && (this.size = parseInt(e.size));
908
+ t.translate && (this.translatable = t.translate === "True" || t.translate === !0), t.size && (this.size = parseInt(t.size));
909
909
  }
910
910
  }
911
911
  get placeholder() {
912
912
  return this._placeholder;
913
913
  }
914
- set placeholder(e) {
915
- this._placeholder = e;
914
+ set placeholder(t) {
915
+ this._placeholder = t;
916
916
  }
917
917
  get showCount() {
918
918
  return this.parsedWidgetProps.showCount || !1;
@@ -920,47 +920,47 @@ class L extends f {
920
920
  get size() {
921
921
  return this._size;
922
922
  }
923
- set size(e) {
924
- this._size = e;
923
+ set size(t) {
924
+ this._size = t;
925
925
  }
926
926
  get mustExpand() {
927
927
  return this._mustExpand;
928
928
  }
929
- set mustExpand(e) {
930
- this._mustExpand = e;
929
+ set mustExpand(t) {
930
+ this._mustExpand = t;
931
931
  }
932
932
  get height() {
933
933
  return this._height;
934
934
  }
935
- set height(e) {
936
- this._height = e;
935
+ set height(t) {
936
+ this._height = t;
937
937
  }
938
938
  get translatable() {
939
939
  return this._translatable;
940
940
  }
941
- set translatable(e) {
942
- this._translatable = e;
941
+ set translatable(t) {
942
+ this._translatable = t;
943
943
  }
944
944
  }
945
945
  class z extends f {
946
- constructor(e) {
947
- super(e);
946
+ constructor(t) {
947
+ super(t);
948
948
  /**
949
949
  * Field size
950
950
  */
951
951
  r(this, "_size", 150);
952
- e && e.size && (this._size = e.size);
952
+ t && t.size && (this._size = t.size);
953
953
  }
954
954
  get size() {
955
955
  return this._size;
956
956
  }
957
- set size(e) {
958
- this._size = e;
957
+ set size(t) {
958
+ this._size = t;
959
959
  }
960
960
  }
961
- class ze extends f {
962
- constructor(e) {
963
- super(e);
961
+ class It extends f {
962
+ constructor(t) {
963
+ super(t);
964
964
  /**
965
965
  * Field size
966
966
  */
@@ -969,19 +969,19 @@ class ze extends f {
969
969
  * Relation
970
970
  */
971
971
  r(this, "_relation", "");
972
- e && (e.size && (this._size = e.size), e.relation && (this._relation = e.relation));
972
+ t && (t.size && (this._size = t.size), t.relation && (this._relation = t.relation));
973
973
  }
974
974
  get size() {
975
975
  return this._size;
976
976
  }
977
- set size(e) {
978
- this._size = e;
977
+ set size(t) {
978
+ this._size = t;
979
979
  }
980
980
  get relation() {
981
981
  return this._relation;
982
982
  }
983
- set relation(e) {
984
- this._relation = e;
983
+ set relation(t) {
984
+ this._relation = t;
985
985
  }
986
986
  get showFolder() {
987
987
  return this.parsedWidgetProps.showFolder;
@@ -993,21 +993,21 @@ class ze extends f {
993
993
  return this.parsedWidgetProps.showMenu;
994
994
  }
995
995
  }
996
- class Se extends L {
997
- }
998
- class te extends f {
999
- constructor(t) {
1000
- super(t);
1001
- }
996
+ class zt extends $ {
1002
997
  }
1003
- class Ie extends f {
1004
- constructor(t) {
1005
- super(t);
998
+ class it extends f {
999
+ constructor(e) {
1000
+ super(e);
1006
1001
  }
1007
1002
  }
1008
- class G extends f {
1003
+ class St extends f {
1009
1004
  constructor(e) {
1010
1005
  super(e);
1006
+ }
1007
+ }
1008
+ class q extends f {
1009
+ constructor(t) {
1010
+ super(t);
1011
1011
  /**
1012
1012
  * Integer digits
1013
1013
  *
@@ -1020,51 +1020,51 @@ class G extends f {
1020
1020
  * Number of decimal digits that will be part of the float
1021
1021
  */
1022
1022
  r(this, "_decimalDigits", 2);
1023
- if (e != null && e.digits) {
1024
- const [s, n] = e.digits;
1023
+ if (t != null && t.digits) {
1024
+ const [s, n] = t.digits;
1025
1025
  this._integerDigits = s, this._decimalDigits = n;
1026
1026
  }
1027
1027
  }
1028
1028
  get integerDigits() {
1029
1029
  return this._integerDigits;
1030
1030
  }
1031
- set integerDigits(e) {
1032
- this._integerDigits = e;
1031
+ set integerDigits(t) {
1032
+ this._integerDigits = t;
1033
1033
  }
1034
1034
  get decimalDigits() {
1035
1035
  return this._decimalDigits;
1036
1036
  }
1037
- set decimalDigits(e) {
1038
- this._decimalDigits = e;
1037
+ set decimalDigits(t) {
1038
+ this._decimalDigits = t;
1039
1039
  }
1040
1040
  }
1041
- class Ee extends G {
1042
- }
1043
- class Ve extends f {
1041
+ class Et extends q {
1044
1042
  }
1045
- class Ye extends G {
1043
+ class Vt extends f {
1046
1044
  }
1047
- class De extends f {
1048
- constructor(t) {
1049
- super(t);
1050
- }
1045
+ class Yt extends q {
1051
1046
  }
1052
- class je extends f {
1047
+ class jt extends f {
1053
1048
  constructor(e) {
1054
1049
  super(e);
1050
+ }
1051
+ }
1052
+ class Dt extends f {
1053
+ constructor(t) {
1054
+ super(t);
1055
1055
  r(this, "_timezone");
1056
- this._timezone = (e == null ? void 0 : e.timezone) || void 0;
1056
+ this._timezone = (t == null ? void 0 : t.timezone) || void 0;
1057
1057
  }
1058
1058
  get timezone() {
1059
1059
  return this._timezone;
1060
1060
  }
1061
- set timezone(e) {
1062
- this._timezone = e;
1061
+ set timezone(t) {
1062
+ this._timezone = t;
1063
1063
  }
1064
1064
  }
1065
- class ie extends f {
1066
- constructor(e) {
1067
- super(e);
1065
+ class st extends f {
1066
+ constructor(t) {
1067
+ super(t);
1068
1068
  /**
1069
1069
  * Field size
1070
1070
  */
@@ -1097,123 +1097,123 @@ class ie extends f {
1097
1097
  * Infinite mode
1098
1098
  */
1099
1099
  r(this, "_infinite");
1100
- if (e) {
1101
- if (e.size && (this._size = e.size), e.relation && (this._relation = e.relation), e.mode && (this._mode = e.mode.split(",")), e.views && (this._views = e.views), e.colspan ? this.colspan = e.colspan : this._mustExpand = !0, e.inv_field && (this._inv_field = e.inv_field), e.height)
1100
+ if (t) {
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 {
1103
- this._height = parseInt(e.height);
1103
+ this._height = parseInt(t.height);
1104
1104
  } catch {
1105
1105
  this._height = void 0;
1106
1106
  }
1107
- e.widget_props && (this._infinite = e.widget_props.infinite);
1107
+ t.widget_props && (this._infinite = t.widget_props.infinite);
1108
1108
  }
1109
1109
  }
1110
1110
  get size() {
1111
1111
  return this._size;
1112
1112
  }
1113
- set size(e) {
1114
- this._size = e;
1113
+ set size(t) {
1114
+ this._size = t;
1115
1115
  }
1116
1116
  get relation() {
1117
1117
  return this._relation;
1118
1118
  }
1119
- set relation(e) {
1120
- this._relation = e;
1119
+ set relation(t) {
1120
+ this._relation = t;
1121
1121
  }
1122
1122
  get inv_field() {
1123
1123
  return this._inv_field;
1124
1124
  }
1125
- set inv_field(e) {
1126
- this._inv_field = e;
1125
+ set inv_field(t) {
1126
+ this._inv_field = t;
1127
1127
  }
1128
1128
  get views() {
1129
1129
  return this._views;
1130
1130
  }
1131
- set views(e) {
1132
- this._views = e;
1131
+ set views(t) {
1132
+ this._views = t;
1133
1133
  }
1134
1134
  get mode() {
1135
1135
  return this._mode;
1136
1136
  }
1137
- set mode(e) {
1138
- this._mode = e;
1137
+ set mode(t) {
1138
+ this._mode = t;
1139
1139
  }
1140
1140
  get mustExpand() {
1141
1141
  return this._mustExpand;
1142
1142
  }
1143
- set mustExpand(e) {
1144
- this._mustExpand = e;
1143
+ set mustExpand(t) {
1144
+ this._mustExpand = t;
1145
1145
  }
1146
1146
  get height() {
1147
1147
  return this._height;
1148
1148
  }
1149
- set height(e) {
1150
- this._height = e;
1149
+ set height(t) {
1150
+ this._height = t;
1151
1151
  }
1152
1152
  get infinite() {
1153
1153
  return this._infinite;
1154
1154
  }
1155
- set infinite(e) {
1156
- this._infinite = e;
1155
+ set infinite(t) {
1156
+ this._infinite = t;
1157
1157
  }
1158
1158
  }
1159
- class Me extends C {
1160
- constructor(e) {
1161
- super(e);
1159
+ class Mt extends k {
1160
+ constructor(t) {
1161
+ super(t);
1162
1162
  /**
1163
1163
  * Label
1164
1164
  */
1165
1165
  r(this, "_label", "");
1166
1166
  r(this, "_icon", null);
1167
- e && (e.string && (this._label = m(e.string)), e.icon && (this._icon = e.icon));
1167
+ t && (t.string && (this._label = g(t.string)), t.icon && (this._icon = t.icon));
1168
1168
  }
1169
1169
  get label() {
1170
1170
  return this._label;
1171
1171
  }
1172
- set label(e) {
1173
- this._label = e;
1172
+ set label(t) {
1173
+ this._label = t;
1174
1174
  }
1175
1175
  get icon() {
1176
1176
  return this._icon;
1177
1177
  }
1178
- set icon(e) {
1179
- this._icon = e;
1178
+ set icon(t) {
1179
+ this._icon = t;
1180
1180
  }
1181
- findById(e) {
1181
+ findById(t) {
1182
1182
  return null;
1183
1183
  }
1184
1184
  }
1185
- class Ne extends z {
1185
+ class Bt extends z {
1186
1186
  }
1187
- class Ae extends f {
1188
- constructor(e) {
1189
- super(e);
1187
+ class At extends f {
1188
+ constructor(t) {
1189
+ super(t);
1190
1190
  /**
1191
1191
  * Filename field name
1192
1192
  */
1193
1193
  r(this, "_filenameField", "");
1194
- e && e.filename && (this._filenameField = e.filename);
1194
+ t && t.filename && (this._filenameField = t.filename);
1195
1195
  }
1196
1196
  get filenameField() {
1197
1197
  return this._filenameField;
1198
1198
  }
1199
- set filenameField(e) {
1200
- this._filenameField = e;
1199
+ set filenameField(t) {
1200
+ this._filenameField = t;
1201
1201
  }
1202
1202
  }
1203
- class Be extends f {
1203
+ class Nt extends f {
1204
1204
  get showControls() {
1205
- var t;
1206
- return ((t = this.parsedWidgetProps) == null ? void 0 : t.showControls) ?? !0;
1207
- }
1208
- }
1209
- class Re extends f {
1210
- constructor(t) {
1211
- super(t);
1205
+ var e;
1206
+ return ((e = this.parsedWidgetProps) == null ? void 0 : e.showControls) ?? !0;
1212
1207
  }
1213
1208
  }
1214
- class Le extends ie {
1209
+ class Rt extends f {
1215
1210
  constructor(e) {
1216
1211
  super(e);
1212
+ }
1213
+ }
1214
+ class Lt extends st {
1215
+ constructor(t) {
1216
+ super(t);
1217
1217
  /**
1218
1218
  * Title field
1219
1219
  */
@@ -1227,14 +1227,14 @@ class Le extends ie {
1227
1227
  get titleField() {
1228
1228
  return this._titleField;
1229
1229
  }
1230
- set titleField(e) {
1231
- this._titleField = e;
1230
+ set titleField(t) {
1231
+ this._titleField = t;
1232
1232
  }
1233
1233
  get summaryField() {
1234
1234
  return this._summaryField;
1235
1235
  }
1236
- set summaryField(e) {
1237
- this._summaryField = e;
1236
+ set summaryField(t) {
1237
+ this._summaryField = t;
1238
1238
  }
1239
1239
  get iconField() {
1240
1240
  return this.parsedWidgetProps.iconField;
@@ -1243,9 +1243,9 @@ class Le extends ie {
1243
1243
  return this.parsedWidgetProps.colorField;
1244
1244
  }
1245
1245
  }
1246
- class Ge extends z {
1247
- constructor(e) {
1248
- super(e);
1246
+ class Gt extends z {
1247
+ constructor(t) {
1248
+ super(t);
1249
1249
  r(this, "_nolabel", !0);
1250
1250
  r(this, "_card");
1251
1251
  r(this, "_icon");
@@ -1261,33 +1261,33 @@ class Ge extends z {
1261
1261
  r(this, "_actionField");
1262
1262
  r(this, "_height");
1263
1263
  r(this, "_autoRefresh");
1264
- if (this._card = !1, this._icon = "", this._suffix = "", this._autoRefresh = !1, this._parsedWidgetProps && (this._card = this._parsedWidgetProps.card || !1, this._icon = m(this._parsedWidgetProps.icon) || "", this._suffix = this._parsedWidgetProps.suffix || "", this._color = m(this._parsedWidgetProps.color) || ""), e) {
1265
- if (e.action_id && (this._actionId = parseInt(e.action_id)), e.action_field && (this._actionField = e.action_field), e.height)
1264
+ 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) {
1265
+ if (t.action_id && (this._actionId = parseInt(t.action_id)), t.action_field && (this._actionField = t.action_field), t.height)
1266
1266
  try {
1267
- this._height = parseInt(e.height);
1267
+ this._height = parseInt(t.height);
1268
1268
  } catch (s) {
1269
1269
  console.error(s);
1270
1270
  }
1271
- this._autoRefresh = k(e.autorefresh);
1271
+ this._autoRefresh = p(t.autorefresh);
1272
1272
  }
1273
1273
  }
1274
1274
  get card() {
1275
1275
  return this._card;
1276
1276
  }
1277
- set card(e) {
1278
- this._card = e;
1277
+ set card(t) {
1278
+ this._card = t;
1279
1279
  }
1280
1280
  get icon() {
1281
1281
  return this._icon;
1282
1282
  }
1283
- set icon(e) {
1284
- this._icon = e;
1283
+ set icon(t) {
1284
+ this._icon = t;
1285
1285
  }
1286
1286
  get suffix() {
1287
1287
  return this._suffix;
1288
1288
  }
1289
- set suffix(e) {
1290
- this._suffix = e;
1289
+ set suffix(t) {
1290
+ this._suffix = t;
1291
1291
  }
1292
1292
  get color() {
1293
1293
  return this._color;
@@ -1295,31 +1295,31 @@ class Ge extends z {
1295
1295
  get actionId() {
1296
1296
  return this._actionId;
1297
1297
  }
1298
- set actionId(e) {
1299
- this._actionId = e;
1298
+ set actionId(t) {
1299
+ this._actionId = t;
1300
1300
  }
1301
1301
  get actionField() {
1302
1302
  return this._actionField;
1303
1303
  }
1304
- set actionField(e) {
1305
- this._actionField = e;
1304
+ set actionField(t) {
1305
+ this._actionField = t;
1306
1306
  }
1307
1307
  get height() {
1308
1308
  return this._height;
1309
1309
  }
1310
- set height(e) {
1311
- this._height = e;
1310
+ set height(t) {
1311
+ this._height = t;
1312
1312
  }
1313
1313
  get autoRefresh() {
1314
1314
  return this._autoRefresh;
1315
1315
  }
1316
- set autoRefresh(e) {
1317
- this._autoRefresh = e;
1316
+ set autoRefresh(t) {
1317
+ this._autoRefresh = t;
1318
1318
  }
1319
1319
  }
1320
- class se extends f {
1321
- constructor(e) {
1322
- super(e);
1320
+ class rt extends f {
1321
+ constructor(t) {
1322
+ super(t);
1323
1323
  /**
1324
1324
  * Field size
1325
1325
  */
@@ -1337,119 +1337,119 @@ class se extends f {
1337
1337
  */
1338
1338
  r(this, "_field", "name");
1339
1339
  r(this, "_columns", 4);
1340
- e && (e.size && (this._size = e.size), e.relation && (this._relation = e.relation), e.inv_field && (this._inv_field = e.inv_field), this.parsedWidgetProps.hasOwnProperty("field") && (this._field = this.parsedWidgetProps.field), this.parsedWidgetProps.columns && (this._columns = this.parsedWidgetProps.columns));
1340
+ 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));
1341
1341
  }
1342
1342
  get size() {
1343
1343
  return this._size;
1344
1344
  }
1345
- set size(e) {
1346
- this._size = e;
1345
+ set size(t) {
1346
+ this._size = t;
1347
1347
  }
1348
1348
  get relation() {
1349
1349
  return this._relation;
1350
1350
  }
1351
- set relation(e) {
1352
- this._relation = e;
1351
+ set relation(t) {
1352
+ this._relation = t;
1353
1353
  }
1354
1354
  get inv_field() {
1355
1355
  return this._inv_field;
1356
1356
  }
1357
- set inv_field(e) {
1358
- this._inv_field = e;
1357
+ set inv_field(t) {
1358
+ this._inv_field = t;
1359
1359
  }
1360
1360
  get field() {
1361
1361
  return this._field;
1362
1362
  }
1363
- set field(e) {
1364
- this._field = e;
1363
+ set field(t) {
1364
+ this._field = t;
1365
1365
  }
1366
1366
  get columns() {
1367
1367
  return this._columns;
1368
1368
  }
1369
- set columns(e) {
1370
- this._columns = e;
1369
+ set columns(t) {
1370
+ this._columns = t;
1371
1371
  }
1372
1372
  }
1373
- class $e extends se {
1373
+ class $t extends rt {
1374
1374
  }
1375
- class qe extends z {
1375
+ class qt extends z {
1376
1376
  get colors() {
1377
1377
  return this._parsedWidgetProps.colors || {};
1378
1378
  }
1379
1379
  get colorField() {
1380
- var t;
1381
- return ((t = this._parsedWidgetProps) == null ? void 0 : t.colorField) || null;
1380
+ var e;
1381
+ return ((e = this._parsedWidgetProps) == null ? void 0 : e.colorField) || null;
1382
1382
  }
1383
1383
  }
1384
- class Je extends z {
1385
- constructor(e) {
1386
- super(e);
1384
+ class Jt extends z {
1385
+ constructor(t) {
1386
+ super(t);
1387
1387
  /**
1388
1388
  * Define the direction
1389
1389
  */
1390
1390
  r(this, "_direction", "horizontal");
1391
- e && this.parsedWidgetProps.hasOwnProperty("direction") && (this._direction = this.parsedWidgetProps.direction);
1391
+ t && this.parsedWidgetProps.hasOwnProperty("direction") && (this._direction = this.parsedWidgetProps.direction);
1392
1392
  }
1393
1393
  get direction() {
1394
1394
  return this._direction;
1395
1395
  }
1396
- set direction(e) {
1397
- this._direction = e;
1396
+ set direction(t) {
1397
+ this._direction = t;
1398
1398
  }
1399
1399
  }
1400
- class He extends te {
1400
+ class Ht extends it {
1401
1401
  }
1402
- class Qe extends f {
1403
- constructor(e) {
1404
- super(e);
1402
+ class Qt extends f {
1403
+ constructor(t) {
1404
+ super(t);
1405
1405
  /**
1406
1406
  * Relation
1407
1407
  */
1408
1408
  r(this, "_relation", "");
1409
1409
  r(this, "_errorField", null);
1410
1410
  r(this, "_lastStep", !0);
1411
- e && (e.relation && (this._relation = e.relation), this.parsedWidgetProps.hasOwnProperty("error_field") && (this._errorField = this.parsedWidgetProps.error_field), this.parsedWidgetProps.hasOwnProperty("last_step") && (this._lastStep = this.parsedWidgetProps.last_step));
1411
+ 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));
1412
1412
  }
1413
1413
  get relation() {
1414
1414
  return this._relation;
1415
1415
  }
1416
- set relation(e) {
1417
- this._relation = e;
1416
+ set relation(t) {
1417
+ this._relation = t;
1418
1418
  }
1419
1419
  get errorField() {
1420
1420
  return this._errorField;
1421
1421
  }
1422
- set errorField(e) {
1423
- this._errorField = e;
1422
+ set errorField(t) {
1423
+ this._errorField = t;
1424
1424
  }
1425
1425
  get lastStep() {
1426
1426
  return this._lastStep;
1427
1427
  }
1428
- set lastStep(e) {
1429
- this._lastStep = e;
1428
+ set lastStep(t) {
1429
+ this._lastStep = t;
1430
1430
  }
1431
1431
  }
1432
- class re extends L {
1433
- constructor(e) {
1434
- super(e);
1432
+ class nt extends $ {
1433
+ constructor(t) {
1434
+ super(t);
1435
1435
  r(this, "_lang", null);
1436
- e && this.parsedWidgetProps.lang && (this._lang = this.parsedWidgetProps.lang);
1436
+ t && this.parsedWidgetProps.lang && (this._lang = this.parsedWidgetProps.lang);
1437
1437
  }
1438
1438
  get lang() {
1439
1439
  return this._lang;
1440
1440
  }
1441
- set lang(e) {
1442
- this._lang = e;
1441
+ set lang(t) {
1442
+ this._lang = t;
1443
1443
  }
1444
1444
  }
1445
- class Xe extends f {
1446
- constructor(t) {
1447
- super(t);
1448
- }
1449
- }
1450
- class Ue extends w {
1445
+ class Kt extends f {
1451
1446
  constructor(e) {
1452
1447
  super(e);
1448
+ }
1449
+ }
1450
+ class Xt extends F {
1451
+ constructor(t) {
1452
+ super(t);
1453
1453
  /**
1454
1454
  * Alert type
1455
1455
  */
@@ -1457,447 +1457,447 @@ class Ue extends w {
1457
1457
  r(this, "_title", "");
1458
1458
  r(this, "_text", "");
1459
1459
  r(this, "_icon", null);
1460
- e && (e.alert_type && (this._alertType = e.alert_type), e.title && (this._title = e.title), e.text && (this._text = e.text), e.icon && (this._icon = e.icon));
1460
+ 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));
1461
1461
  }
1462
1462
  get alertType() {
1463
1463
  return this._alertType;
1464
1464
  }
1465
- set alertType(e) {
1466
- this._alertType = e;
1465
+ set alertType(t) {
1466
+ this._alertType = t;
1467
1467
  }
1468
1468
  get title() {
1469
1469
  return this._title;
1470
1470
  }
1471
- set title(e) {
1472
- this._title = e;
1471
+ set title(t) {
1472
+ this._title = t;
1473
1473
  }
1474
1474
  get text() {
1475
1475
  return this._text;
1476
1476
  }
1477
- set text(e) {
1478
- this._text = e;
1477
+ set text(t) {
1478
+ this._text = t;
1479
1479
  }
1480
1480
  get icon() {
1481
1481
  return this._icon;
1482
1482
  }
1483
- set icon(e) {
1484
- this._icon = e;
1483
+ set icon(t) {
1484
+ this._icon = t;
1485
1485
  }
1486
1486
  get buttons() {
1487
- return this._container.rows.flat().filter((e) => !e.invisible);
1487
+ return this._container.rows.flat().filter((t) => !t.invisible);
1488
1488
  }
1489
1489
  }
1490
- class Ke extends f {
1491
- constructor(e) {
1492
- super(e);
1490
+ class Ut extends f {
1491
+ constructor(t) {
1492
+ super(t);
1493
1493
  /**
1494
1494
  * Height of the comments component
1495
1495
  */
1496
1496
  r(this, "_height");
1497
- if (e.height) {
1498
- const s = parseInt(e.height);
1497
+ if (t.height) {
1498
+ const s = parseInt(t.height);
1499
1499
  this._height = isNaN(s) ? void 0 : s;
1500
1500
  }
1501
1501
  }
1502
1502
  get height() {
1503
1503
  return this._height;
1504
1504
  }
1505
- set height(e) {
1506
- this._height = e;
1505
+ set height(t) {
1506
+ this._height = t;
1507
1507
  }
1508
1508
  }
1509
- class H extends re {
1509
+ class K extends nt {
1510
1510
  constructor() {
1511
1511
  super(...arguments);
1512
1512
  r(this, "_lang", "json");
1513
1513
  }
1514
1514
  }
1515
- class Ze extends f {
1516
- constructor(e) {
1517
- super(e);
1515
+ class Zt extends f {
1516
+ constructor(t) {
1517
+ super(t);
1518
1518
  r(this, "_multi", !1);
1519
1519
  r(this, "_size");
1520
- e && e.size && (this.size = e.size), this.parsedWidgetProps.multi && (this.multi = this.parsedWidgetProps.multi);
1520
+ t && t.size && (this.size = t.size), this.parsedWidgetProps.multi && (this.multi = this.parsedWidgetProps.multi);
1521
1521
  }
1522
1522
  get multi() {
1523
1523
  return this._multi;
1524
1524
  }
1525
- set multi(e) {
1526
- this._multi = e;
1525
+ set multi(t) {
1526
+ this._multi = t;
1527
1527
  }
1528
1528
  get size() {
1529
1529
  return this._size;
1530
1530
  }
1531
- set size(e) {
1532
- this._size = e;
1531
+ set size(t) {
1532
+ this._size = t;
1533
1533
  }
1534
1534
  }
1535
- class et extends w {
1536
- constructor(e) {
1537
- super(e);
1535
+ class te extends F {
1536
+ constructor(t) {
1537
+ super(t);
1538
1538
  r(this, "_autoPlay", !0);
1539
- e && "auto_play" in e && (this._autoPlay = k(e.auto_play));
1539
+ t && "auto_play" in t && (this._autoPlay = p(t.auto_play));
1540
1540
  }
1541
1541
  get autoPlay() {
1542
1542
  return this._autoPlay;
1543
1543
  }
1544
- set autoPlay(e) {
1545
- this._autoPlay = e;
1544
+ set autoPlay(t) {
1545
+ this._autoPlay = t;
1546
1546
  }
1547
1547
  get items() {
1548
- return this._container.rows.flat().filter((e) => !e.invisible);
1548
+ return this._container.rows.flat().filter((t) => !t.invisible);
1549
1549
  }
1550
1550
  }
1551
- class tt extends A {
1551
+ class ee extends N {
1552
1552
  get showText() {
1553
1553
  return this.parsedWidgetProps.show_text ?? !0;
1554
1554
  }
1555
1555
  }
1556
- class it extends f {
1556
+ class ie extends f {
1557
1557
  get width() {
1558
- var t;
1559
- return (t = this.parsedWidgetProps) == null ? void 0 : t.width;
1558
+ var e;
1559
+ return (e = this.parsedWidgetProps) == null ? void 0 : e.width;
1560
1560
  }
1561
1561
  get border() {
1562
- var t;
1563
- return ((t = this.parsedWidgetProps) == null ? void 0 : t.border) ?? !1;
1562
+ var e;
1563
+ return ((e = this.parsedWidgetProps) == null ? void 0 : e.border) ?? !1;
1564
1564
  }
1565
1565
  get showValue() {
1566
- var t;
1567
- return console.log(this.parsedWidgetProps), ((t = this.parsedWidgetProps) == null ? void 0 : t.showValue) ?? !1;
1566
+ var e;
1567
+ return console.log(this.parsedWidgetProps), ((e = this.parsedWidgetProps) == null ? void 0 : e.showValue) ?? !1;
1568
1568
  }
1569
1569
  }
1570
- class st extends j {
1571
- constructor(e) {
1572
- super(e);
1570
+ class se extends D {
1571
+ constructor(t) {
1572
+ super(t);
1573
1573
  r(this, "_title", null);
1574
1574
  r(this, "_icon", null);
1575
1575
  /**
1576
1576
  * Height of the card component
1577
1577
  */
1578
1578
  r(this, "_height");
1579
- if (e && (e.title && (this._title = e.title), e.icon && (this._icon = e.icon), e.height)) {
1580
- const s = parseInt(e.height);
1579
+ if (t && (t.title && (this._title = t.title), t.icon && (this._icon = t.icon), t.height)) {
1580
+ const s = parseInt(t.height);
1581
1581
  this._height = isNaN(s) ? void 0 : s;
1582
1582
  }
1583
1583
  }
1584
1584
  get title() {
1585
1585
  return this._title;
1586
1586
  }
1587
- set title(e) {
1588
- this._title = e;
1587
+ set title(t) {
1588
+ this._title = t;
1589
1589
  }
1590
1590
  get icon() {
1591
1591
  return this._icon;
1592
1592
  }
1593
- set icon(e) {
1594
- this._icon = e;
1593
+ set icon(t) {
1594
+ this._icon = t;
1595
1595
  }
1596
1596
  get height() {
1597
1597
  return this._height;
1598
1598
  }
1599
- set height(e) {
1600
- this._height = e;
1599
+ set height(t) {
1600
+ this._height = t;
1601
1601
  }
1602
1602
  }
1603
- class $ {
1603
+ class M {
1604
1604
  constructor() {
1605
1605
  /**
1606
1606
  * Widget class
1607
1607
  */
1608
1608
  r(this, "_widgetClass");
1609
1609
  }
1610
- setWidgetClass(t) {
1611
- switch (t) {
1610
+ setWidgetClass(e) {
1611
+ switch (e) {
1612
1612
  case "notebook":
1613
- this._widgetClass = N;
1613
+ this._widgetClass = A;
1614
1614
  break;
1615
1615
  case "page":
1616
- this._widgetClass = Pe;
1616
+ this._widgetClass = Pt;
1617
1617
  break;
1618
1618
  case "group":
1619
- this._widgetClass = Oe;
1619
+ this._widgetClass = Ot;
1620
1620
  break;
1621
1621
  case "card":
1622
- this._widgetClass = st;
1622
+ this._widgetClass = se;
1623
1623
  break;
1624
1624
  case "label":
1625
- this._widgetClass = Z;
1625
+ this._widgetClass = et;
1626
1626
  break;
1627
1627
  case "char":
1628
- this._widgetClass = A;
1628
+ this._widgetClass = N;
1629
1629
  break;
1630
1630
  case "text":
1631
- this._widgetClass = L;
1631
+ this._widgetClass = $;
1632
1632
  break;
1633
1633
  case "button":
1634
- this._widgetClass = ee;
1634
+ this._widgetClass = G;
1635
1635
  break;
1636
1636
  case "buttonGroup":
1637
- this._widgetClass = We;
1637
+ this._widgetClass = Wt;
1638
1638
  break;
1639
1639
  case "action_buttons":
1640
- this._widgetClass = Te;
1640
+ this._widgetClass = Tt;
1641
1641
  break;
1642
1642
  case "selection":
1643
1643
  this._widgetClass = z;
1644
1644
  break;
1645
1645
  case "many2one":
1646
- this._widgetClass = ze;
1646
+ this._widgetClass = It;
1647
1647
  break;
1648
1648
  case "boolean":
1649
- this._widgetClass = te;
1649
+ this._widgetClass = it;
1650
1650
  break;
1651
1651
  case "integer":
1652
- this._widgetClass = Ie;
1652
+ this._widgetClass = St;
1653
1653
  break;
1654
1654
  case "float":
1655
- this._widgetClass = G;
1655
+ this._widgetClass = q;
1656
1656
  break;
1657
1657
  case "float_time":
1658
- this._widgetClass = Ee;
1658
+ this._widgetClass = Et;
1659
1659
  break;
1660
1660
  case "date":
1661
- this._widgetClass = De;
1661
+ this._widgetClass = jt;
1662
1662
  break;
1663
1663
  case "datetime":
1664
- this._widgetClass = je;
1664
+ this._widgetClass = Dt;
1665
1665
  break;
1666
1666
  case "progressbar":
1667
- this._widgetClass = Ye;
1667
+ this._widgetClass = Yt;
1668
1668
  break;
1669
1669
  case "markdown":
1670
- this._widgetClass = Se;
1670
+ this._widgetClass = zt;
1671
1671
  break;
1672
1672
  case "many2many":
1673
1673
  case "one2many":
1674
1674
  case "one2many_list":
1675
- this._widgetClass = ie;
1675
+ this._widgetClass = st;
1676
1676
  break;
1677
1677
  case "newline":
1678
- this._widgetClass = K;
1678
+ this._widgetClass = tt;
1679
1679
  break;
1680
1680
  case "separator":
1681
- this._widgetClass = Me;
1681
+ this._widgetClass = Mt;
1682
1682
  break;
1683
1683
  case "url":
1684
- this._widgetClass = A;
1684
+ this._widgetClass = N;
1685
1685
  break;
1686
1686
  case "email":
1687
- this._widgetClass = Ze;
1687
+ this._widgetClass = Zt;
1688
1688
  break;
1689
1689
  case "reference":
1690
- this._widgetClass = Ne;
1690
+ this._widgetClass = Bt;
1691
1691
  break;
1692
1692
  case "binary":
1693
- this._widgetClass = Ae;
1693
+ this._widgetClass = At;
1694
1694
  break;
1695
1695
  case "image":
1696
- this._widgetClass = Be;
1696
+ this._widgetClass = Nt;
1697
1697
  break;
1698
1698
  case "fiber_grid":
1699
- this._widgetClass = Re;
1699
+ this._widgetClass = Rt;
1700
1700
  break;
1701
1701
  case "timeline":
1702
- this._widgetClass = Le;
1702
+ this._widgetClass = Lt;
1703
1703
  break;
1704
1704
  case "indicator":
1705
- this._widgetClass = Ge;
1705
+ this._widgetClass = Gt;
1706
1706
  break;
1707
1707
  case "tags":
1708
- this._widgetClass = $e;
1708
+ this._widgetClass = $t;
1709
1709
  break;
1710
1710
  case "tag":
1711
- this._widgetClass = qe;
1711
+ this._widgetClass = qt;
1712
1712
  break;
1713
1713
  case "avatar":
1714
- this._widgetClass = ke;
1714
+ this._widgetClass = kt;
1715
1715
  break;
1716
1716
  case "radio":
1717
- this._widgetClass = Je;
1717
+ this._widgetClass = Jt;
1718
1718
  break;
1719
1719
  case "multicheckbox":
1720
- this._widgetClass = se;
1720
+ this._widgetClass = rt;
1721
1721
  break;
1722
1722
  case "switch":
1723
- this._widgetClass = He;
1723
+ this._widgetClass = Ht;
1724
1724
  break;
1725
1725
  case "steps":
1726
- this._widgetClass = Qe;
1726
+ this._widgetClass = Qt;
1727
1727
  break;
1728
1728
  case "codeeditor":
1729
- this._widgetClass = re;
1729
+ this._widgetClass = nt;
1730
1730
  break;
1731
1731
  case "time":
1732
- this._widgetClass = Xe;
1732
+ this._widgetClass = Kt;
1733
1733
  break;
1734
1734
  case "html_preview":
1735
- this._widgetClass = Ve;
1735
+ this._widgetClass = Vt;
1736
1736
  break;
1737
1737
  case "alert":
1738
- this._widgetClass = Ue;
1738
+ this._widgetClass = Xt;
1739
1739
  break;
1740
1740
  case "comments_timeline":
1741
- this._widgetClass = Ke;
1741
+ this._widgetClass = Ut;
1742
1742
  break;
1743
1743
  case "json":
1744
- this._widgetClass = H;
1744
+ this._widgetClass = K;
1745
1745
  break;
1746
1746
  case "arrow_steps":
1747
- this._widgetClass = H;
1747
+ this._widgetClass = K;
1748
1748
  break;
1749
1749
  case "spinner":
1750
- this._widgetClass = j;
1750
+ this._widgetClass = D;
1751
1751
  break;
1752
1752
  case "carousel":
1753
- this._widgetClass = et;
1753
+ this._widgetClass = te;
1754
1754
  break;
1755
1755
  case "colorPicker":
1756
- this._widgetClass = tt;
1756
+ this._widgetClass = ee;
1757
1757
  break;
1758
1758
  case "qrcode":
1759
- this._widgetClass = it;
1759
+ this._widgetClass = ie;
1760
1760
  break;
1761
1761
  }
1762
1762
  }
1763
- createWidget(t, e) {
1763
+ createWidget(e, t) {
1764
1764
  this._widgetClass = void 0;
1765
- let s = t;
1766
- switch (this.setWidgetClass(t), this._widgetClass === void 0 && (s = e.fieldsWidgetType, this.setWidgetClass(e.fieldsWidgetType)), this._widgetClass === void 0 && (this._widgetClass = C), t) {
1765
+ let s = e;
1766
+ switch (this.setWidgetClass(e), this._widgetClass === void 0 && (s = t.fieldsWidgetType, this.setWidgetClass(t.fieldsWidgetType)), this._widgetClass === void 0 && (this._widgetClass = k), e) {
1767
1767
  case "notebook":
1768
1768
  case "page":
1769
1769
  case "group":
1770
1770
  case "card":
1771
- return new this._widgetClass({ ...e, type: s });
1771
+ return new this._widgetClass({ ...t, type: s });
1772
1772
  case "button":
1773
1773
  return new this._widgetClass({
1774
- ...e,
1775
- type: t,
1776
- buttonType: e.type
1774
+ ...t,
1775
+ type: e,
1776
+ buttonType: t.type
1777
1777
  });
1778
1778
  default:
1779
- return new this._widgetClass({ ...e, type: s });
1779
+ return new this._widgetClass({ ...t, type: s });
1780
1780
  }
1781
1781
  }
1782
1782
  }
1783
- const rt = ({
1783
+ const re = ({
1784
1784
  fieldName: i,
1785
- values: t,
1786
- fields: e
1785
+ values: e,
1786
+ fields: t
1787
1787
  }) => {
1788
- var l;
1788
+ var o;
1789
1789
  if (!i)
1790
1790
  return {};
1791
- const s = (l = e[i]) == null ? void 0 : l.states;
1791
+ const s = (o = t[i]) == null ? void 0 : o.states;
1792
1792
  if (!s)
1793
1793
  return {};
1794
1794
  const n = {}, a = {};
1795
- for (const o of Object.keys(s))
1796
- if (t.state === o) {
1797
- const d = s[o];
1795
+ for (const l of Object.keys(s))
1796
+ if (e.state === l) {
1797
+ const d = s[l];
1798
1798
  for (const _ of d) {
1799
1799
  const [h, u] = _;
1800
1800
  a[h] || (a[h] = []), a[h].push(u);
1801
1801
  }
1802
1802
  }
1803
- for (const o of Object.keys(a)) {
1804
- const d = a[o];
1805
- n[o] = d.some((_) => _);
1803
+ for (const l of Object.keys(a)) {
1804
+ const d = a[l];
1805
+ n[l] = d.some((_) => _);
1806
1806
  }
1807
1807
  return n;
1808
- }, nt = ({
1808
+ }, ne = ({
1809
1809
  states: i,
1810
- values: t
1810
+ values: e
1811
1811
  }) => {
1812
- if (!(t != null && t.state))
1812
+ if (!(e != null && e.state))
1813
1813
  return {};
1814
- const e = i.split(",");
1815
- return e.length === 0 ? {} : e.includes(t.state) ? {} : { invisible: !0 };
1814
+ const t = i.split(",");
1815
+ return t.length === 0 ? {} : t.includes(e.state) ? {} : { invisible: !0 };
1816
1816
  };
1817
- function at({
1817
+ function ae({
1818
1818
  values: i = {},
1819
- fieldName: t,
1820
- fields: e = {}
1819
+ fieldName: e,
1820
+ fields: t = {}
1821
1821
  }) {
1822
1822
  var n;
1823
- const s = ((n = e[t]) == null ? void 0 : n.type) || "passthrough";
1824
- return s === "many2one" ? i[t] ? i[t][0] || null : !1 : s === "one2many" || s === "many2many" ? i[t].map((a) => a.id) : i != null && i[t] ? i == null ? void 0 : i[t] : t.includes("'") ? t : parseInt(t);
1823
+ const s = ((n = t[e]) == null ? void 0 : n.type) || "passthrough";
1824
+ return s === "many2one" ? i[e] ? i[e][0] || null : !1 : s === "one2many" || s === "many2many" ? i[e].map((a) => a.id) : i != null && i[e] ? i == null ? void 0 : i[e] : e.includes("'") ? e : parseInt(e);
1825
1825
  }
1826
- const ne = ({
1826
+ const J = ({
1827
1827
  context: i,
1828
- values: t,
1829
- fields: e
1828
+ values: e,
1829
+ fields: t
1830
1830
  }) => {
1831
1831
  try {
1832
1832
  if (!i)
1833
1833
  return;
1834
- if (le(i) || typeof i != "string")
1834
+ if (lt(i) || typeof i != "string")
1835
1835
  return i;
1836
- const s = ae(i);
1836
+ const s = at(i);
1837
1837
  if (s !== null)
1838
1838
  return s;
1839
1839
  if (i.trim().length === 0)
1840
1840
  return;
1841
- const u = i.replace(/"/g, "'").replace(/\s/g, "").replace(/True/g, "true").replace(/False/g, "false").replace(/\{/g, "").replace(/\}/g, "").split(",").map((c) => c.split(":")), g = {};
1841
+ const u = i.replace(/"/g, "'").replace(/\s/g, "").replace(/True/g, "true").replace(/False/g, "false").replace(/\{/g, "").replace(/\}/g, "").split(",").map((c) => c.split(":")), m = {};
1842
1842
  return u.forEach((c) => {
1843
1843
  const b = c[1];
1844
1844
  if (!c[1].includes("'") && c[1] !== "true" && c[1] !== "false") {
1845
- const x = at({
1846
- values: t,
1847
- fields: e,
1845
+ const x = ae({
1846
+ values: e,
1847
+ fields: t,
1848
1848
  fieldName: b === "active_id" ? "id" : b
1849
1849
  });
1850
- g[c[0].replace(/'/g, "")] = x || void 0;
1850
+ m[c[0].replace(/'/g, "")] = x || void 0;
1851
1851
  } else
1852
- c[1] === "true" ? g[c[0].replace(/'/g, "")] = !0 : c[1] === "false" ? g[c[0].replace(/'/g, "")] = !1 : g[c[0].replace(/'/g, "")] = c[1].replace(
1852
+ c[1] === "true" ? m[c[0].replace(/'/g, "")] = !0 : c[1] === "false" ? m[c[0].replace(/'/g, "")] = !1 : m[c[0].replace(/'/g, "")] = c[1].replace(
1853
1853
  /'/g,
1854
1854
  ""
1855
1855
  );
1856
- }), g;
1856
+ }), m;
1857
1857
  } catch {
1858
1858
  return;
1859
1859
  }
1860
- }, St = (i) => {
1861
- const t = [];
1860
+ }, ze = (i) => {
1861
+ const e = [];
1862
1862
  try {
1863
- return !i || le(i) || typeof i != "string" ? t : ae(i) !== null ? [] : (i.trim().length === 0 || i.replace(/"/g, "'").replace(/\s/g, "").replace(/True/g, "true").replace(/False/g, "false").replace(/\{/g, "").replace(/\}/g, "").split(",").map((u) => u.split(":")).forEach((u) => {
1864
- !u[1].includes("'") && u[1] !== "true" && u[1] !== "false" && t.push(u[1].replace(/'/g, ""));
1865
- }), t);
1863
+ return !i || lt(i) || typeof i != "string" ? e : at(i) !== null ? [] : (i.trim().length === 0 || i.replace(/"/g, "'").replace(/\s/g, "").replace(/True/g, "true").replace(/False/g, "false").replace(/\{/g, "").replace(/\}/g, "").split(",").map((u) => u.split(":")).forEach((u) => {
1864
+ !u[1].includes("'") && u[1] !== "true" && u[1] !== "false" && e.push(u[1].replace(/'/g, ""));
1865
+ }), e);
1866
1866
  } catch {
1867
1867
  }
1868
- return t;
1868
+ return e;
1869
1869
  };
1870
- function ae(i) {
1870
+ function at(i) {
1871
1871
  try {
1872
1872
  return JSON.parse(i.replace(/'/g, '"'));
1873
1873
  } catch {
1874
1874
  return null;
1875
1875
  }
1876
1876
  }
1877
- function le(i) {
1877
+ function lt(i) {
1878
1878
  return typeof i == "object" && i !== null && typeof i != "string";
1879
1879
  }
1880
- const lt = (i) => {
1881
- const t = i.trim().replace(")", "").split("("), e = t[0], n = t[1].split(",").map((a) => a.trim());
1880
+ const le = (i) => {
1881
+ const e = i.trim().replace(")", "").split("("), t = e[0], n = e[1].split(",").map((a) => a.trim());
1882
1882
  return {
1883
- method: e,
1883
+ method: t,
1884
1884
  args: n
1885
1885
  };
1886
1886
  };
1887
- function ot(i) {
1888
- const t = [];
1889
- function e(s) {
1887
+ function oe(i) {
1888
+ const e = [];
1889
+ function t(s) {
1890
1890
  const n = [];
1891
1891
  for (const a of s)
1892
- a instanceof w ? e(a._container.rows.flat()) : n.push(a);
1893
- n.length > 0 && t.push(n);
1892
+ a instanceof F ? t(a._container.rows.flat()) : n.push(a);
1893
+ n.length > 0 && e.push(n);
1894
1894
  }
1895
1895
  for (const s of i)
1896
- e(s);
1897
- return t.flat();
1896
+ t(s);
1897
+ return e.flat();
1898
1898
  }
1899
- class It {
1900
- constructor(t, e = 4) {
1899
+ class Se {
1900
+ constructor(e, t = 4) {
1901
1901
  /**
1902
1902
  * Object containing fields specification of the form.
1903
1903
  */
@@ -1951,7 +1951,7 @@ class It {
1951
1951
  * Context for each field in the form
1952
1952
  */
1953
1953
  r(this, "_contextForFields", {});
1954
- this._fields = t, this._container = new V(e, 6, !1, "root");
1954
+ this._fields = e, this._container = new Y(t, 6, !1, "root");
1955
1955
  }
1956
1956
  get fields() {
1957
1957
  return this._fields;
@@ -1968,32 +1968,32 @@ class It {
1968
1968
  get readOnly() {
1969
1969
  return this._readOnly;
1970
1970
  }
1971
- set readOnly(t) {
1972
- this._readOnly = t;
1971
+ set readOnly(e) {
1972
+ this._readOnly = e;
1973
1973
  }
1974
1974
  get context() {
1975
1975
  return this._context;
1976
1976
  }
1977
- set context(t) {
1978
- this._context = t;
1977
+ set context(e) {
1978
+ this._context = e;
1979
1979
  }
1980
1980
  get onChangeFields() {
1981
1981
  return this._onChangeFields;
1982
1982
  }
1983
- set onChangeFields(t) {
1984
- this._onChangeFields = t;
1983
+ set onChangeFields(e) {
1984
+ this._onChangeFields = e;
1985
1985
  }
1986
1986
  get keyIdx() {
1987
1987
  return this._keyIdx;
1988
1988
  }
1989
- set keyIdx(t) {
1990
- this._keyIdx = t;
1989
+ set keyIdx(e) {
1990
+ this._keyIdx = e;
1991
1991
  }
1992
1992
  get invisibleFields() {
1993
1993
  return this._invisibleFields;
1994
1994
  }
1995
- set invisibleFields(t) {
1996
- this._invisibleFields = t;
1995
+ set invisibleFields(e) {
1996
+ this._invisibleFields = e;
1997
1997
  }
1998
1998
  get autorefreshableFields() {
1999
1999
  return this._autorefreshableFields;
@@ -2001,107 +2001,107 @@ class It {
2001
2001
  get contextForFields() {
2002
2002
  return this._contextForFields;
2003
2003
  }
2004
- set contextForFields(t) {
2005
- this._contextForFields = t;
2004
+ set contextForFields(e) {
2005
+ this._contextForFields = e;
2006
2006
  }
2007
- parse(t, e) {
2008
- var o;
2009
- const { values: s = {}, readOnly: n = !1 } = e || {}, a = D.parse(t).filter((d) => d.tagName === "form")[0];
2010
- this._string = ((o = a.attributes) == null ? void 0 : o.string) || null, this._string && (this._string = m(this._string)), this._readOnly = n, this._context = s.id ? { active_id: s.id, active_ids: [s.id] } : {}, this._invisibleFields = [], this.parseNode({
2007
+ parse(e, t) {
2008
+ var l;
2009
+ const { values: s = {}, readOnly: n = !1 } = t || {}, a = I.parse(e).filter((d) => d.tagName === "form")[0];
2010
+ this._string = ((l = a.attributes) == null ? void 0 : l.string) || null, this._string && (this._string = g(this._string)), this._readOnly = n, this._context = s.id ? { active_id: s.id, active_ids: [s.id] } : {}, this._invisibleFields = [], this.parseNode({
2011
2011
  fields: a.children,
2012
2012
  container: this._container,
2013
2013
  values: s
2014
2014
  });
2015
- const l = ot(this._container._rows);
2016
- l.forEach((d) => {
2015
+ const o = oe(this._container._rows);
2016
+ o.forEach((d) => {
2017
2017
  const _ = d;
2018
2018
  _._id && _._context && (this._contextForFields[_._id] = d._context);
2019
- }), this._autorefreshableFields = l.filter((d) => d instanceof f && d.autoRefresh).map((d) => d._id);
2019
+ }), this._autorefreshableFields = o.filter((d) => d instanceof f && d.autoRefresh).map((d) => d._id);
2020
2020
  }
2021
2021
  parseNode({
2022
- fields: t,
2023
- container: e,
2022
+ fields: e,
2023
+ container: t,
2024
2024
  values: s
2025
2025
  }) {
2026
- const n = new $();
2027
- t.filter((a) => typeof a == "object").forEach((a) => {
2028
- var v, F;
2029
- const { tagName: l, attributes: o, children: d } = a;
2030
- let _ = l, h = o;
2031
- if (l === "field") {
2032
- const { name: p, widget: S } = o;
2026
+ const n = new M();
2027
+ e.filter((a) => typeof a == "object").forEach((a) => {
2028
+ var v, C;
2029
+ const { tagName: o, attributes: l, children: d } = a;
2030
+ let _ = o, h = l;
2031
+ if (o === "field") {
2032
+ const { name: w, widget: S } = l;
2033
2033
  if (S)
2034
2034
  _ = S;
2035
- else if (p) {
2036
- if (!this._fields[p])
2035
+ else if (w) {
2036
+ if (!this._fields[w])
2037
2037
  throw new Error(
2038
- `Field ${p} doesn't exist in fields defintion`
2038
+ `Field ${w} doesn't exist in fields defintion`
2039
2039
  );
2040
- _ = this._fields[p].type, o.widget_props = {
2041
- ...U(o.widget_props),
2042
- ...this._fields[p].widget_props || {}
2040
+ _ = this._fields[w].type, l.widget_props = {
2041
+ ...Z(l.widget_props),
2042
+ ...this._fields[w].widget_props || {}
2043
2043
  };
2044
2044
  }
2045
2045
  h = {
2046
- ...this._fields[p],
2047
- ...o,
2048
- fieldsWidgetType: this._fields[p].type
2046
+ ...this._fields[w],
2047
+ ...l,
2048
+ fieldsWidgetType: this._fields[w].type
2049
2049
  };
2050
2050
  }
2051
- const u = Ce({
2051
+ const u = Ct({
2052
2052
  tagAttributes: h,
2053
2053
  values: s,
2054
2054
  fields: this._fields,
2055
- widgetType: l
2055
+ widgetType: o
2056
2056
  });
2057
- let g;
2058
- l === "button" && h.states ? g = nt({
2057
+ let m;
2058
+ o === "button" && h.states ? m = ne({
2059
2059
  states: h.states,
2060
2060
  values: s
2061
- }) : g = rt({
2061
+ }) : m = re({
2062
2062
  fieldName: h.name,
2063
2063
  values: s,
2064
2064
  fields: this._fields
2065
2065
  });
2066
- const c = ne({
2066
+ const c = J({
2067
2067
  context: h.context || ((v = this._fields[h.name]) == null ? void 0 : v.context),
2068
2068
  values: s,
2069
2069
  fields: this._fields
2070
2070
  });
2071
- h.on_change && (this._onChangeFields[h.name] = lt(
2071
+ h.on_change && (this._onChangeFields[h.name] = le(
2072
2072
  h.on_change
2073
2073
  ));
2074
2074
  let b;
2075
- Q(h.domain) ? b = h.domain : Q((F = this._fields[h.name]) == null ? void 0 : F.domain) && (b = this._fields[h.name].domain), this._keyIdx = this._keyIdx + 1;
2075
+ X(h.domain) ? b = h.domain : X((C = this._fields[h.name]) == null ? void 0 : C.domain) && (b = this._fields[h.name].domain), this._keyIdx = this._keyIdx + 1;
2076
2076
  const x = {
2077
2077
  ...u,
2078
- ...g,
2078
+ ...m,
2079
2079
  context: c,
2080
2080
  domain: b,
2081
2081
  key: `${this._keyIdx}`
2082
2082
  };
2083
- e.readOnly && (x.readonly = !0);
2083
+ t.readOnly && (x.readonly = !0);
2084
2084
  const y = n.createWidget(_, x);
2085
- y.invisible && y instanceof f && this._invisibleFields.push(x.name), y instanceof w && this.parseNode({
2085
+ y.invisible && y instanceof f && this._invisibleFields.push(x.name), y instanceof F && this.parseNode({
2086
2086
  fields: d,
2087
2087
  container: y.container,
2088
2088
  values: s
2089
- }), y instanceof ee && y.readOnly !== void 0 || (y.readOnly = y.readOnly || this.readOnly), e.addWidget(y);
2089
+ }), y instanceof G && y.readOnly !== void 0 || (y.readOnly = y.readOnly || this.readOnly), t.addWidget(y);
2090
2090
  });
2091
2091
  }
2092
2092
  /**
2093
2093
  * Calls container's findById method to find the widgets matching with param id
2094
2094
  * @param {string} id id to find
2095
2095
  */
2096
- findById(t) {
2097
- return this.container.findById(t);
2096
+ findById(e) {
2097
+ return this.container.findById(e);
2098
2098
  }
2099
2099
  }
2100
- function Q(i) {
2100
+ function X(i) {
2101
2101
  return i ? Array.isArray(i) && i.length > 0 ? !0 : typeof i == "string" && i !== "" && i !== "[]" : !1;
2102
2102
  }
2103
- class Et {
2104
- constructor(t) {
2103
+ class Ee {
2104
+ constructor(e) {
2105
2105
  /**
2106
2106
  * Object containing fields specification of the form.
2107
2107
  */
@@ -2133,7 +2133,7 @@ class Et {
2133
2133
  * Is infinite
2134
2134
  */
2135
2135
  r(this, "_infinite", !1);
2136
- this._fields = t;
2136
+ this._fields = e;
2137
2137
  }
2138
2138
  get fields() {
2139
2139
  return this._fields;
@@ -2159,8 +2159,8 @@ class Et {
2159
2159
  get contextForFields() {
2160
2160
  return this._contextForFields;
2161
2161
  }
2162
- set contextForFields(t) {
2163
- this._contextForFields = t;
2162
+ set contextForFields(e) {
2163
+ this._contextForFields = e;
2164
2164
  }
2165
2165
  get autorefreshableFields() {
2166
2166
  return this._autorefreshableFields;
@@ -2168,41 +2168,41 @@ class Et {
2168
2168
  get infinite() {
2169
2169
  return this._infinite;
2170
2170
  }
2171
- set infinite(t) {
2172
- this._infinite = t;
2171
+ set infinite(e) {
2172
+ this._infinite = e;
2173
2173
  }
2174
- parse(t) {
2175
- const e = D.parse(t).filter((n) => n.tagName === "tree")[0];
2176
- this._string = e.attributes.string || null, this._string && (this._string = m(this._string)), this._colors = e.attributes.colors || null, this._colors && (this._colors = m(this._colors)), this._status = e.attributes.status || null, this._status && (this._status = m(this._status)), this._editable = e.attributes.editable || null, this._infinite = e.attributes.infinite || !1;
2177
- const s = new $();
2178
- e.children.forEach((n) => {
2179
- const { tagName: a, attributes: l } = n;
2180
- let o = null;
2174
+ parse(e) {
2175
+ const t = I.parse(e).filter((n) => n.tagName === "tree")[0];
2176
+ 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;
2177
+ const s = new M();
2178
+ t.children.forEach((n) => {
2179
+ const { tagName: a, attributes: o } = n;
2180
+ let l = null;
2181
2181
  if (a === "field") {
2182
- const { name: d, widget: _ } = l;
2183
- let h = l;
2182
+ const { name: d, widget: _ } = o;
2183
+ let h = o;
2184
2184
  if (d) {
2185
2185
  if (!this._fields[d])
2186
2186
  throw new Error(`Field ${d} doesn't exist in fields defintion`);
2187
2187
  const u = this._fields[d];
2188
- o = u.type, (Array.isArray(u == null ? void 0 : u.domain) && (u == null ? void 0 : u.domain.length) === 0 || (u == null ? void 0 : u.domain) === !1) && l.domain && l.domain.length > 0 && delete u.domain;
2189
- const g = ne({
2190
- context: l.context || u.context,
2188
+ l = u.type, (Array.isArray(u == null ? void 0 : u.domain) && (u == null ? void 0 : u.domain.length) === 0 || (u == null ? void 0 : u.domain) === !1) && o.domain && o.domain.length > 0 && delete u.domain;
2189
+ const m = J({
2190
+ context: o.context || u.context,
2191
2191
  values: {},
2192
2192
  fields: this._fields
2193
2193
  });
2194
2194
  h = {
2195
2195
  ...u,
2196
- ...l,
2196
+ ...o,
2197
2197
  fieldsWidgetType: u == null ? void 0 : u.type,
2198
- context: g
2199
- }, this._contextForFields[d] = g;
2198
+ context: m
2199
+ }, this._contextForFields[d] = m;
2200
2200
  }
2201
- if (_ && (o = _), !h.invisible) {
2202
- const u = s.createWidget(o, h);
2201
+ if (_ && (l = _), !h.invisible) {
2202
+ const u = s.createWidget(l, h);
2203
2203
  this._columns.push(u);
2204
2204
  }
2205
- k(h.autorefresh) && this._autorefreshableFields.push(d);
2205
+ p(h.autorefresh) && this._autorefreshableFields.push(d);
2206
2206
  }
2207
2207
  });
2208
2208
  }
@@ -2210,11 +2210,159 @@ class Et {
2210
2210
  * Find the widgets matching with param id
2211
2211
  * @param {string} id id to find
2212
2212
  */
2213
- findById(t) {
2214
- return this._columns.find((e) => e.findById ? e.findById(t) : !1);
2213
+ findById(e) {
2214
+ return this._columns.find((t) => t.findById ? t.findById(e) : !1);
2215
2215
  }
2216
2216
  }
2217
- const ct = {
2217
+ class Ve {
2218
+ constructor(e) {
2219
+ /**
2220
+ * Object containing fields specification of the kanban.
2221
+ */
2222
+ r(this, "_fields");
2223
+ /**
2224
+ * Array of field widgets to display in cards
2225
+ */
2226
+ r(this, "_card_fields", []);
2227
+ /**
2228
+ * Array of button widgets to display in cards
2229
+ */
2230
+ r(this, "_buttons", []);
2231
+ r(this, "_string", null);
2232
+ /**
2233
+ * Widget type
2234
+ */
2235
+ r(this, "_type", "kanban");
2236
+ /**
2237
+ * Field that defines the columns (e.g., "state")
2238
+ */
2239
+ r(this, "_column_field", null);
2240
+ /**
2241
+ * Enable dragging cards between columns
2242
+ */
2243
+ r(this, "_drag", !0);
2244
+ /**
2245
+ * Enable sorting cards within columns
2246
+ */
2247
+ r(this, "_sort", !0);
2248
+ /**
2249
+ * Enable setting max cards per column (WIP limits)
2250
+ */
2251
+ r(this, "_set_max_cards", !1);
2252
+ /**
2253
+ * Color expression value (e.g., "blue:state=='draft';green:state=='done'")
2254
+ */
2255
+ r(this, "_colors", null);
2256
+ /**
2257
+ * Context for each field in the kanban
2258
+ */
2259
+ r(this, "_contextForFields", {});
2260
+ /**
2261
+ * Map of fields that have sum aggregation
2262
+ * Key: field name, Value: sum label (e.g., "Total hours")
2263
+ */
2264
+ r(this, "_aggregations", {});
2265
+ this._fields = e;
2266
+ }
2267
+ get fields() {
2268
+ return this._fields;
2269
+ }
2270
+ get card_fields() {
2271
+ return this._card_fields;
2272
+ }
2273
+ get buttons() {
2274
+ return this._buttons;
2275
+ }
2276
+ get string() {
2277
+ return this._string;
2278
+ }
2279
+ get type() {
2280
+ return this._type;
2281
+ }
2282
+ get column_field() {
2283
+ return this._column_field;
2284
+ }
2285
+ get drag() {
2286
+ return this._drag;
2287
+ }
2288
+ get sort() {
2289
+ return this._sort;
2290
+ }
2291
+ get set_max_cards() {
2292
+ return this._set_max_cards;
2293
+ }
2294
+ get colors() {
2295
+ return this._colors;
2296
+ }
2297
+ get contextForFields() {
2298
+ return this._contextForFields;
2299
+ }
2300
+ set contextForFields(e) {
2301
+ this._contextForFields = e;
2302
+ }
2303
+ get aggregations() {
2304
+ return this._aggregations;
2305
+ }
2306
+ parse(e) {
2307
+ const t = I.parse(e).filter((n) => n.tagName === "kanban")[0];
2308
+ if (this._string = t.attributes.string || null, this._string && (this._string = g(this._string)), this._column_field = t.attributes.column_field || null, !this._column_field)
2309
+ throw new Error("Kanban view must have a column_field attribute");
2310
+ this._drag = t.attributes.drag !== void 0 ? p(t.attributes.drag) : !0, this._sort = t.attributes.sort !== void 0 ? p(t.attributes.sort) : !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));
2311
+ const s = new M();
2312
+ t.children.forEach((n) => {
2313
+ const { tagName: a, attributes: o } = n;
2314
+ a === "field" ? this._parseField(n, o, s) : a === "button" && this._parseButton(n, o);
2315
+ });
2316
+ }
2317
+ _parseField(e, t, s) {
2318
+ const { name: n, widget: a, sum: o } = t;
2319
+ if (!n)
2320
+ return;
2321
+ if (!this._fields[n])
2322
+ throw new Error(`Field ${n} doesn't exist in fields definition`);
2323
+ const l = this._fields[n];
2324
+ let d = l.type;
2325
+ (Array.isArray(l == null ? void 0 : l.domain) && (l == null ? void 0 : l.domain.length) === 0 || (l == null ? void 0 : l.domain) === !1) && t.domain && t.domain.length > 0 && delete l.domain;
2326
+ const _ = J({
2327
+ context: t.context || l.context,
2328
+ values: {},
2329
+ fields: this._fields
2330
+ }), h = {
2331
+ ...l,
2332
+ ...t,
2333
+ fieldsWidgetType: l == null ? void 0 : l.type,
2334
+ context: _
2335
+ };
2336
+ if (this._contextForFields[n] = _, a && (d = a), !h.invisible) {
2337
+ const u = s.createWidget(
2338
+ d,
2339
+ h
2340
+ );
2341
+ o && (u.sum = g(o), this._aggregations[n] = g(o)), this._card_fields.push(u);
2342
+ }
2343
+ }
2344
+ _parseButton(e, t) {
2345
+ const { name: s, type: n, string: a, states: o } = t;
2346
+ if (!s)
2347
+ return;
2348
+ const l = {
2349
+ ...t,
2350
+ name: s,
2351
+ buttonType: n || "object",
2352
+ string: a || ""
2353
+ }, d = new G(l);
2354
+ o && (d.states = o), this._buttons.push(d);
2355
+ }
2356
+ /**
2357
+ * Find the widgets matching with param id
2358
+ * @param {string} id id to find
2359
+ */
2360
+ findById(e) {
2361
+ const t = this._card_fields.find((n) => n.findById ? n.findById(e) : !1);
2362
+ return t || this._buttons.find((n) => n.findById ? n.findById(e) : !1) || null;
2363
+ }
2364
+ }
2365
+ const ce = {
2218
2366
  text: "text",
2219
2367
  many2one: "many2one",
2220
2368
  char: "char",
@@ -2227,8 +2375,8 @@ const ct = {
2227
2375
  date: "date",
2228
2376
  datetime: "datetime"
2229
2377
  };
2230
- class Vt {
2231
- constructor(t, e, s = 8) {
2378
+ class Ye {
2379
+ constructor(e, t, s = 8) {
2232
2380
  /**
2233
2381
  * Object containing the specific fields for primary and secondary search fields
2234
2382
  */
@@ -2239,7 +2387,7 @@ class Vt {
2239
2387
  r(this, "_fields");
2240
2388
  r(this, "_simpleSearchContainer");
2241
2389
  r(this, "_advancedSearchContainer");
2242
- this._searchFields = t, this._fields = e, this._simpleSearchContainer = new V(s), this._advancedSearchContainer = new V(s);
2390
+ this._searchFields = e, this._fields = t, this._simpleSearchContainer = new Y(s), this._advancedSearchContainer = new Y(s);
2243
2391
  }
2244
2392
  get searchFields() {
2245
2393
  return this._searchFields;
@@ -2254,59 +2402,59 @@ class Vt {
2254
2402
  return this._advancedSearchContainer;
2255
2403
  }
2256
2404
  parse() {
2257
- const t = new $();
2405
+ const e = new M();
2258
2406
  this.parseFields(
2259
2407
  this.searchFields.primary,
2260
- t
2408
+ e
2261
2409
  ).forEach((n) => {
2262
2410
  this.simpleSearchContainer.addWidget(n, { addLabel: !1 }), this.advancedSearchContainer.addWidget(n, { addLabel: !1 });
2263
2411
  }), this.parseFields(
2264
2412
  this.searchFields.secondary,
2265
- t
2413
+ e
2266
2414
  ).forEach((n) => {
2267
2415
  this.advancedSearchContainer.addWidget(n, { addLabel: !1 });
2268
2416
  });
2269
2417
  }
2270
- parseFields(t, e) {
2271
- return t.map((s) => {
2418
+ parseFields(e, t) {
2419
+ return e.map((s) => {
2272
2420
  const n = {
2273
2421
  ...this.fields[s],
2274
2422
  name: s,
2275
2423
  colspan: 2
2276
- }, { type: a, widget: l } = n;
2277
- let o = l ?? a;
2278
- return ct[o] === void 0 && (o = a), e.createWidget(o, n);
2424
+ }, { type: a, widget: o } = n;
2425
+ let l = o ?? a;
2426
+ return ce[l] === void 0 && (l = a), t.createWidget(l, n);
2279
2427
  });
2280
2428
  }
2281
2429
  /**
2282
2430
  * Calls container's findById method to find the widgets matching with param id
2283
2431
  * @param {string} id id to find
2284
2432
  */
2285
- findById(t) {
2286
- return this.advancedSearchContainer.findById(t);
2433
+ findById(e) {
2434
+ return this.advancedSearchContainer.findById(e);
2287
2435
  }
2288
2436
  }
2289
- const Yt = ({
2437
+ const je = ({
2290
2438
  domain: i,
2291
- widgetFieldName: t
2439
+ widgetFieldName: e
2292
2440
  }) => {
2293
- const e = [];
2441
+ const t = [];
2294
2442
  return i.forEach((s) => {
2295
2443
  if (!Array.isArray(s))
2296
2444
  return;
2297
- const [n, a, l] = s;
2298
- let o, d;
2299
- n.indexOf(".") !== -1 ? (o = n.substr(0, n.indexOf(".")), d = n.substr(
2445
+ const [n, a, o] = s;
2446
+ let l, d;
2447
+ n.indexOf(".") !== -1 ? (l = n.substr(0, n.indexOf(".")), d = n.substr(
2300
2448
  n.indexOf(".") + 1,
2301
2449
  n.length - 1
2302
- )) : (o = n, d = "id"), o === t && e.push([d, a, l]);
2303
- }), e;
2304
- }, Dt = (i) => typeof i != "string" ? [] : i.replace(/[()[\]]/g, "").split(",").map((t) => t.trim()).filter((t) => !t.includes("'"));
2305
- class dt {
2306
- constructor(t) {
2450
+ )) : (l = n, d = "id"), l === e && t.push([d, a, o]);
2451
+ }), t;
2452
+ }, De = (i) => typeof i != "string" ? [] : i.replace(/[()[\]]/g, "").split(",").map((e) => e.trim()).filter((e) => !e.includes("'"));
2453
+ class de {
2454
+ constructor(e) {
2307
2455
  r(this, "_action_id", null);
2308
2456
  r(this, "_position", null);
2309
- t.action_id && (this._action_id = t.action_id), t.position && (this._position = t.position);
2457
+ e.action_id && (this._action_id = e.action_id), e.position && (this._position = e.position);
2310
2458
  }
2311
2459
  get action_id() {
2312
2460
  return this._action_id;
@@ -2315,15 +2463,15 @@ class dt {
2315
2463
  return this._position;
2316
2464
  }
2317
2465
  }
2318
- class jt {
2319
- constructor(t) {
2466
+ class Me {
2467
+ constructor(e) {
2320
2468
  r(this, "_string", null);
2321
2469
  r(this, "_items", []);
2322
- const e = D.parse(t).filter((n) => n.tagName === "dashboard")[0];
2323
- this._string = e.attributes.string || null;
2324
- const { children: s } = e;
2470
+ const t = I.parse(e).filter((n) => n.tagName === "dashboard")[0];
2471
+ this._string = t.attributes.string || null;
2472
+ const { children: s } = t;
2325
2473
  s.forEach((n) => {
2326
- n.tagName === "dashboard_item" && this._items.push(new dt(n.attributes));
2474
+ n.tagName === "dashboard_item" && this._items.push(new de(n.attributes));
2327
2475
  });
2328
2476
  }
2329
2477
  get string() {
@@ -2333,16 +2481,16 @@ class jt {
2333
2481
  return this._items;
2334
2482
  }
2335
2483
  }
2336
- class oe {
2337
- constructor(t) {
2484
+ class ot {
2485
+ constructor(e) {
2338
2486
  r(this, "_string", null);
2339
2487
  r(this, "_type");
2340
2488
  r(this, "_timerange", null);
2341
2489
  r(this, "_interval", 1);
2342
2490
  r(this, "_y_range", "default");
2343
- if (this._string = t.attributes.string || null, this._timerange = t.attributes.timerange || null, t.attributes.interval && (this._interval = parseInt(t.attributes.interval)), t.attributes.y_range) {
2344
- const e = t.attributes.y_range;
2345
- (e === "auto" || e === "full" || e === "default") && (this._y_range = e);
2491
+ 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) {
2492
+ const t = e.attributes.y_range;
2493
+ (t === "auto" || t === "full" || t === "default") && (this._y_range = t);
2346
2494
  }
2347
2495
  }
2348
2496
  get string() {
@@ -2361,15 +2509,15 @@ class oe {
2361
2509
  return this._y_range;
2362
2510
  }
2363
2511
  }
2364
- class ce extends oe {
2365
- constructor(e, s) {
2512
+ class ct extends ot {
2513
+ constructor(t, s) {
2366
2514
  super(s);
2367
2515
  r(this, "_color", null);
2368
2516
  r(this, "_icon", null);
2369
2517
  r(this, "_totalDomain", null);
2370
2518
  r(this, "_showPercent", !1);
2371
2519
  r(this, "_suffix", null);
2372
- this._type = e, this._color = s.attributes.color || null, this._color && (this._color = m(this._color)), this._icon = s.attributes.icon || null, this._icon && (this._icon = m(this._icon)), this._suffix = s.attributes.suffix || null, this._totalDomain = m(s.attributes.totalDomain) || null, this._showPercent = k(s.attributes.showPercent);
2520
+ 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);
2373
2521
  }
2374
2522
  get color() {
2375
2523
  return this._color;
@@ -2387,16 +2535,16 @@ class ce extends oe {
2387
2535
  return this._suffix;
2388
2536
  }
2389
2537
  }
2390
- class ut extends ce {
2391
- constructor(e, s) {
2392
- super(e, s);
2538
+ class ue extends ct {
2539
+ constructor(t, s) {
2540
+ super(t, s);
2393
2541
  r(this, "_field");
2394
2542
  r(this, "_operator");
2395
2543
  const { children: n } = s;
2396
2544
  n.forEach((a) => {
2397
2545
  if (a.tagName === "field") {
2398
- const l = a.attributes.name, o = a.attributes.operator;
2399
- this._field = l || void 0, this._operator = o;
2546
+ const o = a.attributes.name, l = a.attributes.operator;
2547
+ this._field = o || void 0, this._operator = l;
2400
2548
  }
2401
2549
  });
2402
2550
  }
@@ -2407,43 +2555,43 @@ class ut extends ce {
2407
2555
  return this._operator;
2408
2556
  }
2409
2557
  }
2410
- const ht = (i) => {
2411
- const t = [];
2412
- let e;
2558
+ const he = (i) => {
2559
+ const e = [];
2560
+ let t;
2413
2561
  if (i.forEach((s) => {
2414
2562
  if (s.tagName === "field") {
2415
- const n = s.attributes.axis, a = s.attributes.operator, l = s.attributes.name, o = s.attributes.label || void 0, d = s.attributes.stacked || void 0;
2563
+ const n = s.attributes.axis, a = s.attributes.operator, o = s.attributes.name, l = s.attributes.label || void 0, d = s.attributes.stacked || void 0;
2416
2564
  if (!n)
2417
- throw new Error(`Field ${l} doesn't have an axis`);
2418
- if (!l)
2565
+ throw new Error(`Field ${o} doesn't have an axis`);
2566
+ if (!o)
2419
2567
  throw new Error("Missing name attribute for field");
2420
- n === "x" ? e = new gt({
2421
- name: l
2422
- }) : n === "y" && t.push(
2423
- new ft({
2424
- name: l,
2568
+ n === "x" ? t = new ge({
2569
+ name: o
2570
+ }) : n === "y" && e.push(
2571
+ new fe({
2572
+ name: o,
2425
2573
  operator: a,
2426
- label: o,
2574
+ label: l,
2427
2575
  stacked: d
2428
2576
  })
2429
2577
  );
2430
2578
  }
2431
- }), !e)
2579
+ }), !t)
2432
2580
  throw new Error("No x axis found");
2433
- if (!t.length)
2581
+ if (!e.length)
2434
2582
  throw new Error("No y axis found. At least we need one y axis");
2435
2583
  return {
2436
- x: e,
2437
- y: t
2584
+ x: t,
2585
+ y: e
2438
2586
  };
2439
2587
  };
2440
- class M extends oe {
2441
- constructor(e, s) {
2588
+ class B extends ot {
2589
+ constructor(t, s) {
2442
2590
  super(s);
2443
2591
  r(this, "_x");
2444
2592
  r(this, "_y");
2445
- this._type = e;
2446
- const n = ht(s.children);
2593
+ this._type = t;
2594
+ const n = he(s.children);
2447
2595
  this._x = n.x, this._y = n.y;
2448
2596
  }
2449
2597
  get x() {
@@ -2453,26 +2601,26 @@ class M extends oe {
2453
2601
  return this._y;
2454
2602
  }
2455
2603
  }
2456
- const _t = {
2457
- indicator: ce,
2458
- indicatorField: ut,
2459
- line: M,
2460
- bar: M,
2461
- pie: M
2462
- }, Mt = (i) => {
2463
- const t = D.parse(i).filter((n) => n.tagName === "graph")[0], e = t.attributes.type;
2464
- if (!e)
2465
- throw new Error(`${e} is not a valid graph`);
2466
- const s = _t[e];
2604
+ const _e = {
2605
+ indicator: ct,
2606
+ indicatorField: ue,
2607
+ line: B,
2608
+ bar: B,
2609
+ pie: B
2610
+ }, Be = (i) => {
2611
+ const e = I.parse(i).filter((n) => n.tagName === "graph")[0], t = e.attributes.type;
2612
+ if (!t)
2613
+ throw new Error(`${t} is not a valid graph`);
2614
+ const s = _e[t];
2467
2615
  if (!s)
2468
- throw new Error(`${e} not found as a GraphModel`);
2469
- return new s(e, t);
2616
+ throw new Error(`${t} not found as a GraphModel`);
2617
+ return new s(t, e);
2470
2618
  };
2471
- class de {
2472
- constructor({ name: t, axis: e }) {
2619
+ class dt {
2620
+ constructor({ name: e, axis: t }) {
2473
2621
  r(this, "_name");
2474
2622
  r(this, "_axis");
2475
- this._name = t, this._axis = e;
2623
+ this._name = e, this._axis = t;
2476
2624
  }
2477
2625
  get name() {
2478
2626
  return this._name;
@@ -2481,14 +2629,14 @@ class de {
2481
2629
  return this._axis;
2482
2630
  }
2483
2631
  }
2484
- class ft extends de {
2632
+ class fe extends dt {
2485
2633
  constructor({
2486
- name: e,
2634
+ name: t,
2487
2635
  operator: s,
2488
2636
  label: n,
2489
2637
  stacked: a
2490
2638
  }) {
2491
- super({ name: e, axis: "y" });
2639
+ super({ name: t, axis: "y" });
2492
2640
  r(this, "_operator");
2493
2641
  r(this, "_label");
2494
2642
  r(this, "_stacked");
@@ -2504,75 +2652,75 @@ class ft extends de {
2504
2652
  return this._stacked;
2505
2653
  }
2506
2654
  }
2507
- class gt extends de {
2508
- constructor({ name: t }) {
2509
- super({ name: t, axis: "x" });
2655
+ class ge extends dt {
2656
+ constructor({ name: e }) {
2657
+ super({ name: e, axis: "x" });
2510
2658
  }
2511
2659
  }
2512
- const mt = ({ ooui: i }) => {
2513
- const e = [i.x.name];
2660
+ const me = ({ ooui: i }) => {
2661
+ const t = [i.x.name];
2514
2662
  return i.y ? (i.y.forEach((s) => {
2515
- s.operator !== "count" && !e.includes(s.name) && e.push(s.name), s.label && !e.includes(s.label) && e.push(s.label);
2516
- }), e) : [];
2663
+ s.operator !== "count" && !t.includes(s.name) && t.push(s.name), s.label && !t.includes(s.label) && t.push(s.label);
2664
+ }), t) : [];
2517
2665
  };
2518
- function q({
2666
+ function H({
2519
2667
  fields: i,
2520
- values: t,
2521
- fieldName: e
2668
+ values: e,
2669
+ fieldName: t
2522
2670
  }) {
2523
- const s = i[e], n = t[e];
2671
+ const s = i[t], n = e[t];
2524
2672
  if (!s)
2525
- throw new Error(`Field ${e} not found`);
2673
+ throw new Error(`Field ${t} not found`);
2526
2674
  if (s.type === "many2one")
2527
2675
  return n ? { value: n[0], label: n[1] } : { value: !1, label: void 0 };
2528
2676
  if (s.type === "selection") {
2529
- const l = s.selection.find((o) => o[0] === n);
2530
- return l ? { value: n, label: l[1] } : { value: !1, label: void 0 };
2677
+ const o = s.selection.find((l) => l[0] === n);
2678
+ return o ? { value: n, label: o[1] } : { value: !1, label: void 0 };
2531
2679
  }
2532
2680
  return { value: n, label: n };
2533
2681
  }
2534
- const Nt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2682
+ const Ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2535
2683
  __proto__: null,
2536
- getFieldsToRetrieve: mt,
2537
- getValueAndLabelForField: q
2684
+ getFieldsToRetrieve: me,
2685
+ getValueAndLabelForField: H
2538
2686
  }, Symbol.toStringTag, { value: "Module" }));
2539
- function bt({
2687
+ function be({
2540
2688
  values: i,
2541
- timerange: t,
2542
- interval: e = 1
2689
+ timerange: e,
2690
+ interval: t = 1
2543
2691
  }) {
2544
- const s = pt({
2692
+ const s = pe({
2545
2693
  values: i,
2546
- timerange: t
2694
+ timerange: e
2547
2695
  });
2548
- return yt({
2696
+ return ye({
2549
2697
  values: s,
2550
- timerange: t,
2551
- interval: e
2698
+ timerange: e,
2699
+ interval: t
2552
2700
  });
2553
2701
  }
2554
- function yt({
2702
+ function ye({
2555
2703
  values: i,
2556
- timerange: t,
2557
- interval: e = 1
2704
+ timerange: e,
2705
+ interval: t = 1
2558
2706
  }) {
2559
2707
  let s = [];
2560
- const n = he({
2708
+ const n = ht({
2561
2709
  values: i,
2562
2710
  groupBy: "type-stacked"
2563
- }), a = `${t}s`;
2564
- return Object.keys(n).forEach((o) => {
2565
- const d = n[o];
2711
+ }), a = `${e}s`;
2712
+ return Object.keys(n).forEach((l) => {
2713
+ const d = n[l];
2566
2714
  for (let _ = 0; _ < d.length; _++) {
2567
2715
  const h = d[_];
2568
2716
  if (s.push(h), _ === d.length - 1)
2569
2717
  return;
2570
- const u = h.x, g = d[_ + 1].x;
2571
- if (!ue([u, g], a)) {
2572
- const c = xt({
2573
- dates: [u, g],
2574
- timerange: t,
2575
- interval: e
2718
+ const u = h.x, m = d[_ + 1].x;
2719
+ if (!ut([u, m], a)) {
2720
+ const c = xe({
2721
+ dates: [u, m],
2722
+ timerange: e,
2723
+ interval: t
2576
2724
  });
2577
2725
  s = s.concat(
2578
2726
  c.map((b) => ({
@@ -2584,121 +2732,121 @@ function yt({
2584
2732
  );
2585
2733
  }
2586
2734
  }
2587
- }), s.sort((o, d) => o.x < d.x ? -1 : o.x > d.x ? 1 : 0);
2735
+ }), s.sort((l, d) => l.x < d.x ? -1 : l.x > d.x ? 1 : 0);
2588
2736
  }
2589
- function xt({
2737
+ function xe({
2590
2738
  dates: i,
2591
- timerange: t,
2592
- interval: e = 1
2739
+ timerange: e,
2740
+ interval: t = 1
2593
2741
  }) {
2594
- const s = [], n = `${t}s`;
2742
+ const s = [], n = `${e}s`;
2595
2743
  if (i.length === 1)
2596
2744
  return i;
2597
- const a = i.sort((l, o) => l < o ? -1 : l > o ? 1 : 0);
2598
- for (let l = 0; l < a.length - 1; l++) {
2599
- const o = a[l], d = a[l + 1];
2600
- if (!ue([o, d], n)) {
2601
- const _ = T(o, E(n)).add(
2602
- e,
2745
+ const a = i.sort((o, l) => o < l ? -1 : o > l ? 1 : 0);
2746
+ for (let o = 0; o < a.length - 1; o++) {
2747
+ const l = a[o], d = a[o + 1];
2748
+ if (!ut([l, d], n)) {
2749
+ const _ = T(l, V(n)).add(
2750
+ t,
2603
2751
  n
2604
- ), h = T(d, E(n));
2752
+ ), h = T(d, V(n));
2605
2753
  for (; _.isBefore(h); )
2606
- s.push(_.format(E(n))), _.add(e, n);
2754
+ s.push(_.format(V(n))), _.add(t, n);
2607
2755
  }
2608
2756
  }
2609
2757
  return s;
2610
2758
  }
2611
- function pt({
2759
+ function pe({
2612
2760
  values: i,
2613
- timerange: t
2761
+ timerange: e
2614
2762
  }) {
2615
- const e = wt({
2763
+ const t = we({
2616
2764
  values: i,
2617
- timerange: t
2618
- }), s = [], n = he({
2619
- values: e,
2765
+ timerange: e
2766
+ }), s = [], n = ht({
2767
+ values: t,
2620
2768
  groupBy: "all"
2621
2769
  });
2622
2770
  return Object.keys(n).forEach((a) => {
2623
- const l = n[a], o = l[0].operator === "count" ? "+" : l[0].operator, d = Y({
2624
- values: l.map((_) => _.value),
2625
- operator: o
2771
+ const o = n[a], l = o[0].operator === "count" ? "+" : o[0].operator, d = j({
2772
+ values: o.map((_) => _.value),
2773
+ operator: l
2626
2774
  });
2627
2775
  s.push({
2628
- ...l[0],
2776
+ ...o[0],
2629
2777
  value: d
2630
2778
  });
2631
2779
  }), s;
2632
2780
  }
2633
- function wt({
2781
+ function we({
2634
2782
  values: i,
2635
- timerange: t
2783
+ timerange: e
2636
2784
  }) {
2637
- return i.map((e) => ({
2638
- ...e,
2639
- x: vt({
2640
- date: e.x,
2641
- timerange: t
2785
+ return i.map((t) => ({
2786
+ ...t,
2787
+ x: Fe({
2788
+ date: t.x,
2789
+ timerange: e
2642
2790
  })
2643
2791
  }));
2644
2792
  }
2645
- function vt({
2793
+ function Fe({
2646
2794
  date: i,
2647
- timerange: t
2795
+ timerange: e
2648
2796
  }) {
2649
- let e = Ft(i);
2650
- const s = T(i, e);
2651
- switch (t) {
2797
+ let t = ve(i);
2798
+ const s = T(i, t);
2799
+ switch (e) {
2652
2800
  case "hour": {
2653
- e = "YYYY-MM-DD HH:00";
2801
+ t = "YYYY-MM-DD HH:00";
2654
2802
  break;
2655
2803
  }
2656
2804
  case "day": {
2657
- e = "YYYY-MM-DD";
2805
+ t = "YYYY-MM-DD";
2658
2806
  break;
2659
2807
  }
2660
2808
  case "week": {
2661
- e = "YYYY-WW";
2809
+ t = "YYYY-WW";
2662
2810
  break;
2663
2811
  }
2664
2812
  case "month": {
2665
- e = "YYYY-MM";
2813
+ t = "YYYY-MM";
2666
2814
  break;
2667
2815
  }
2668
2816
  case "year": {
2669
- e = "YYYY";
2817
+ t = "YYYY";
2670
2818
  break;
2671
2819
  }
2672
2820
  }
2673
- return s.format(e);
2821
+ return s.format(t);
2674
2822
  }
2675
- function Ft(i) {
2823
+ function ve(i) {
2676
2824
  return i.indexOf(":") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
2677
2825
  }
2678
- function ue(i, t) {
2679
- let e = !1;
2680
- const s = E(t);
2826
+ function ut(i, e) {
2827
+ let t = !1;
2828
+ const s = V(e);
2681
2829
  if (i.length === 0)
2682
2830
  return !1;
2683
2831
  if (i.length === 1)
2684
2832
  return !0;
2685
2833
  for (let n = 0; n < i.length - 1; n++) {
2686
- const a = T(i[n], s), o = T(i[n + 1], s).diff(a, t);
2687
- Math.abs(o) === 1 ? e = !0 : e = !1;
2834
+ const a = T(i[n], s), l = T(i[n + 1], s).diff(a, e);
2835
+ Math.abs(l) === 1 ? t = !0 : t = !1;
2688
2836
  }
2689
- return e;
2837
+ return t;
2690
2838
  }
2691
- function he({
2839
+ function ht({
2692
2840
  values: i,
2693
- groupBy: t
2841
+ groupBy: e
2694
2842
  }) {
2695
- const e = {};
2843
+ const t = {};
2696
2844
  return i.forEach((s) => {
2697
- const n = s.x, a = s.type, l = s.stacked, o = t === "all" ? `${n}-${a}-${l}` : `${a}-${l}`;
2698
- e[o] || (e[o] = []), e[o].push(s);
2699
- }), e;
2845
+ const n = s.x, a = s.type, o = s.stacked, l = e === "all" ? `${n}-${a}-${o}` : `${a}-${o}`;
2846
+ t[l] || (t[l] = []), t[l].push(s);
2847
+ }), t;
2700
2848
  }
2701
- function E(i) {
2849
+ function V(i) {
2702
2850
  switch (i) {
2703
2851
  case "days":
2704
2852
  return "YYYY-MM-DD";
@@ -2713,7 +2861,7 @@ function E(i) {
2713
2861
  return "YYYY-MM-DD HH:mm";
2714
2862
  }
2715
2863
  }
2716
- const Ct = {
2864
+ const Ce = {
2717
2865
  count: "count",
2718
2866
  "+": "sum",
2719
2867
  "-": "subtract",
@@ -2721,58 +2869,58 @@ const Ct = {
2721
2869
  avg: "average",
2722
2870
  min: "min",
2723
2871
  max: "max"
2724
- }, kt = ({
2872
+ }, ke = ({
2725
2873
  ooui: i,
2726
- values: t,
2727
- fields: e,
2874
+ values: e,
2875
+ fields: t,
2728
2876
  options: s
2729
2877
  }) => {
2730
- const n = R({
2878
+ const n = L({
2731
2879
  fieldName: i.x.name,
2732
- values: t,
2733
- fields: e
2880
+ values: e,
2881
+ fields: t
2734
2882
  }), a = [];
2735
2883
  i.y.forEach((c) => {
2736
2884
  Object.keys(n).forEach((b) => {
2737
2885
  const x = n[b].label, y = n[b].entries;
2738
2886
  if (c.label) {
2739
- const v = R({
2887
+ const v = L({
2740
2888
  fieldName: c.label,
2741
2889
  values: y,
2742
- fields: e
2890
+ fields: t
2743
2891
  });
2744
- Object.keys(v).forEach((F) => {
2745
- const p = v[F].entries, S = v[F].label, ge = B({
2746
- entries: p,
2747
- fields: e,
2892
+ Object.keys(v).forEach((C) => {
2893
+ const w = v[C].entries, S = v[C].label, gt = R({
2894
+ entries: w,
2895
+ fields: t,
2748
2896
  fieldName: c.name
2749
- }), me = Y({
2750
- values: ge,
2897
+ }), mt = j({
2898
+ values: gt,
2751
2899
  operator: c.operator
2752
2900
  });
2753
2901
  a.push({
2754
2902
  x: x || !1,
2755
- value: me,
2903
+ value: mt,
2756
2904
  type: S,
2757
2905
  operator: c.operator,
2758
2906
  stacked: c.stacked
2759
2907
  });
2760
2908
  });
2761
2909
  } else {
2762
- const v = B({
2910
+ const v = R({
2763
2911
  entries: y,
2764
- fields: e,
2912
+ fields: t,
2765
2913
  fieldName: c.name
2766
- }), F = Y({
2914
+ }), C = j({
2767
2915
  values: v,
2768
2916
  operator: c.operator
2769
2917
  });
2770
2918
  a.push({
2771
2919
  x: x || !1,
2772
- value: F,
2773
- type: _e({
2920
+ value: C,
2921
+ type: _t({
2774
2922
  yAxis: c,
2775
- fields: e
2923
+ fields: t
2776
2924
  }),
2777
2925
  operator: c.operator,
2778
2926
  stacked: c.stacked
@@ -2780,200 +2928,201 @@ const Ct = {
2780
2928
  }
2781
2929
  });
2782
2930
  });
2783
- const l = i.y.some((c) => c.label !== void 0), o = i.y.some((c) => c.stacked !== void 0);
2931
+ const o = i.y.some((c) => c.label !== void 0), l = i.y.some((c) => c.stacked !== void 0);
2784
2932
  let _ = [...a.sort((c, b) => c.x < b.x ? -1 : c.x > b.x ? 1 : 0)];
2785
- o && i.y.filter((c) => c.stacked !== void 0).length > 1 && (_ = _.map((c) => ({ ...c, type: `${c.type} - ${c.stacked}` })));
2933
+ l && i.y.filter((c) => c.stacked !== void 0).length > 1 && (_ = _.map((c) => ({ ...c, type: `${c.type} - ${c.stacked}` })));
2786
2934
  let h = [..._];
2787
2935
  i.type === "pie" && h.some((c) => c.x === !1) ? h = h.map((c) => c.x === !1 ? { ...c, x: (s == null ? void 0 : s.uninformedString) || "Not informed" } : c) : _.some((c) => c.x === !1) && (h = h.filter(
2788
2936
  (c) => c.x !== !1
2789
2937
  ));
2790
2938
  let u = h;
2791
- i.timerange ? u = bt({
2939
+ i.timerange ? u = be({
2792
2940
  values: u,
2793
2941
  timerange: i.timerange,
2794
2942
  interval: i.interval
2795
2943
  }) : i.type == "pie" && (u = h.sort((c, b) => b.value - c.value));
2796
- const g = {
2944
+ const m = {
2797
2945
  data: u,
2798
- isGroup: o || l,
2799
- isStack: o
2946
+ isGroup: l || o,
2947
+ isStack: l
2800
2948
  };
2801
- if (i.type === "line" && i.y_range && (g.yAxisOpts = {
2949
+ if (i.type === "line" && i.y_range && (m.yAxisOpts = {
2802
2950
  mode: i.y_range
2803
2951
  }, i.y_range === "auto")) {
2804
- const { min: c, max: b } = fe(u);
2805
- g.yAxisOpts.valueOpts = { min: c, max: b };
2952
+ const { min: c, max: b } = ft(u);
2953
+ m.yAxisOpts.valueOpts = { min: c, max: b };
2806
2954
  }
2807
- return g;
2955
+ return m;
2808
2956
  };
2809
- function B({
2957
+ function R({
2810
2958
  entries: i,
2811
- fieldName: t,
2812
- fields: e
2959
+ fieldName: e,
2960
+ fields: t
2813
2961
  }) {
2814
- return i.map((s) => q({
2815
- fieldName: t,
2962
+ return i.map((s) => H({
2963
+ fieldName: e,
2816
2964
  values: s,
2817
- fields: e
2965
+ fields: t
2818
2966
  })).map(({ value: s, label: n }) => n);
2819
2967
  }
2820
- function Y({
2968
+ function j({
2821
2969
  operator: i,
2822
- values: t
2970
+ values: e
2823
2971
  }) {
2824
2972
  switch (i) {
2825
2973
  case "count":
2826
- return t.length;
2974
+ return e.length;
2827
2975
  case "+":
2828
- return I(
2829
- t.reduce(function(e, s) {
2830
- return e + s;
2976
+ return E(
2977
+ e.reduce(function(t, s) {
2978
+ return t + s;
2831
2979
  })
2832
2980
  );
2833
2981
  case "-":
2834
- return I(
2835
- t.reduce(function(e, s) {
2836
- return e - s;
2982
+ return E(
2983
+ e.reduce(function(t, s) {
2984
+ return t - s;
2837
2985
  })
2838
2986
  );
2839
2987
  case "*":
2840
- return I(
2841
- t.reduce(function(e, s) {
2842
- return e * s;
2988
+ return E(
2989
+ e.reduce(function(t, s) {
2990
+ return t * s;
2843
2991
  })
2844
2992
  );
2845
2993
  case "avg": {
2846
- const s = t.reduce((n, a) => n + a, 0) / t.length || 0;
2847
- return I(s);
2994
+ const s = e.reduce((n, a) => n + a, 0) / e.length || 0;
2995
+ return E(s);
2848
2996
  }
2849
2997
  case "min":
2850
- return Math.min(...t);
2998
+ return Math.min(...e);
2851
2999
  case "max":
2852
- return Math.max(...t);
3000
+ return Math.max(...e);
2853
3001
  }
2854
3002
  }
2855
- function I(i) {
3003
+ function E(i) {
2856
3004
  return Math.round((i + Number.EPSILON) * 100) / 100;
2857
3005
  }
2858
- function R({
3006
+ function L({
2859
3007
  fieldName: i,
2860
- fields: t,
2861
- values: e
3008
+ fields: e,
3009
+ values: t
2862
3010
  }) {
2863
3011
  const s = {};
2864
- return e.forEach((n) => {
2865
- const { value: a, label: l } = q({
2866
- fields: t,
3012
+ return t.forEach((n) => {
3013
+ const { value: a, label: o } = H({
3014
+ fields: e,
2867
3015
  values: n,
2868
3016
  fieldName: i
2869
3017
  });
2870
- s[a] || (s[a] = { label: l, entries: [] }), s[a].entries.push(n);
3018
+ s[a] || (s[a] = { label: o, entries: [] }), s[a].entries.push(n);
2871
3019
  }), s;
2872
3020
  }
2873
- function Pt(i) {
2874
- let t = [];
2875
- return Object.keys(i).forEach((e) => {
2876
- const s = i[e];
2877
- t = t.concat(s.entries);
2878
- }), t;
3021
+ function Pe(i) {
3022
+ let e = [];
3023
+ return Object.keys(i).forEach((t) => {
3024
+ const s = i[t];
3025
+ e = e.concat(s.entries);
3026
+ }), e;
2879
3027
  }
2880
- function _e({
3028
+ function _t({
2881
3029
  yAxis: i,
2882
- fields: t
3030
+ fields: e
2883
3031
  }) {
2884
- const e = t[i.name];
2885
- return e != null && e.string ? e.string : i.name;
3032
+ const t = e[i.name];
3033
+ return t != null && t.string ? t.string : i.name;
2886
3034
  }
2887
- function fe(i, t = 0.1) {
3035
+ function ft(i, e = 0.1) {
2888
3036
  if (i.length === 0)
2889
3037
  throw new Error("The values array cannot be empty.");
2890
- const e = i.map((l) => l.value), s = Math.min(...e), n = Math.max(...e), a = (n - s) * t;
3038
+ const t = i.map((o) => o.value), s = Math.min(...t), n = Math.max(...t), a = (n - s) * e;
2891
3039
  return {
2892
3040
  min: s - a,
2893
3041
  max: n + a
2894
3042
  };
2895
3043
  }
2896
- const At = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3044
+ const Ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2897
3045
  __proto__: null,
2898
- getAllObjectsInGroupedValues: Pt,
2899
- getMinMax: fe,
2900
- getValueForOperator: Y,
2901
- getValuesForYField: B,
2902
- getValuesGroupedByField: R,
2903
- getYAxisFieldname: _e,
2904
- labelsForOperator: Ct,
2905
- processGraphData: kt
3046
+ getAllObjectsInGroupedValues: Pe,
3047
+ getMinMax: ft,
3048
+ getValueForOperator: j,
3049
+ getValuesForYField: R,
3050
+ getValuesGroupedByField: L,
3051
+ getYAxisFieldname: _t,
3052
+ labelsForOperator: Ce,
3053
+ processGraphData: ke
2906
3054
  }, Symbol.toStringTag, { value: "Module" }));
2907
3055
  export {
2908
- Te as ActionButtons,
2909
- Ue as Alert,
2910
- ke as Avatar,
2911
- Ae as Binary,
2912
- te as Boolean,
2913
- ee as Button,
2914
- We as ButtonGroup,
2915
- st as Card,
2916
- et as Carousel,
2917
- A as Char,
2918
- re as CodeEditor,
2919
- tt as ColorPicker,
2920
- Ke as Comments,
2921
- V as Container,
2922
- w as ContainerWidget,
2923
- jt as Dashboard,
2924
- dt as DashboardItem,
2925
- De as Date,
2926
- je as DateTime,
2927
- Ze as Email,
3056
+ Tt as ActionButtons,
3057
+ Xt as Alert,
3058
+ kt as Avatar,
3059
+ At as Binary,
3060
+ it as Boolean,
3061
+ G as Button,
3062
+ Wt as ButtonGroup,
3063
+ se as Card,
3064
+ te as Carousel,
3065
+ N as Char,
3066
+ nt as CodeEditor,
3067
+ ee as ColorPicker,
3068
+ Ut as Comments,
3069
+ Y as Container,
3070
+ F as ContainerWidget,
3071
+ Me as Dashboard,
3072
+ de as DashboardItem,
3073
+ jt as Date,
3074
+ Dt as DateTime,
3075
+ Zt as Email,
2928
3076
  f as Field,
2929
- G as Float,
2930
- Ee as FloatTime,
2931
- It as Form,
2932
- oe as Graph,
2933
- de as GraphAxis,
2934
- M as GraphChart,
2935
- ce as GraphIndicator,
2936
- ut as GraphIndicatorField,
2937
- gt as GraphXAxis,
2938
- ft as GraphYAxis,
2939
- Oe as Group,
2940
- Ve as HTMLPreview,
2941
- Be as Image,
2942
- Ge as Indicator,
2943
- Ie as Integer,
2944
- H as JSONField,
2945
- Z as Label,
2946
- ze as Many2one,
2947
- Se as Markdown,
2948
- se as MultiCheckbox,
2949
- K as NewLine,
2950
- N as Notebook,
2951
- ie as One2many,
2952
- Pe as Page,
2953
- Ye as ProgressBar,
2954
- it as QRCode,
2955
- Je as Radio,
2956
- Ne as Reference,
2957
- ct as SearchFieldTypes,
2958
- Vt as SearchFilter,
3077
+ q as Float,
3078
+ Et as FloatTime,
3079
+ Se as Form,
3080
+ ot as Graph,
3081
+ dt as GraphAxis,
3082
+ B as GraphChart,
3083
+ ct as GraphIndicator,
3084
+ ue as GraphIndicatorField,
3085
+ ge as GraphXAxis,
3086
+ fe as GraphYAxis,
3087
+ Ot as Group,
3088
+ Vt as HTMLPreview,
3089
+ Nt as Image,
3090
+ Gt as Indicator,
3091
+ St as Integer,
3092
+ K as JSONField,
3093
+ Ve as Kanban,
3094
+ et as Label,
3095
+ It as Many2one,
3096
+ zt as Markdown,
3097
+ rt as MultiCheckbox,
3098
+ tt as NewLine,
3099
+ A as Notebook,
3100
+ st as One2many,
3101
+ Pt as Page,
3102
+ Yt as ProgressBar,
3103
+ ie as QRCode,
3104
+ Jt as Radio,
3105
+ Bt as Reference,
3106
+ ce as SearchFieldTypes,
3107
+ Ye as SearchFilter,
2959
3108
  z as Selection,
2960
- Me as Separator,
2961
- j as Spinner,
2962
- Qe as Steps,
2963
- He as Switch,
2964
- qe as Tag,
2965
- $e as Tags,
2966
- L as Text,
2967
- Xe as Time,
2968
- Le as Timeline,
2969
- Et as Tree,
2970
- C as Widget,
2971
- Nt as graphFieldUtils,
2972
- At as graphProcessor,
2973
- ne as parseContext,
2974
- St as parseContextFields,
2975
- Dt as parseDomainFields,
2976
- Mt as parseGraph,
2977
- Yt as transformDomainForChildWidget
3109
+ Mt as Separator,
3110
+ D as Spinner,
3111
+ Qt as Steps,
3112
+ Ht as Switch,
3113
+ qt as Tag,
3114
+ $t as Tags,
3115
+ $ as Text,
3116
+ Kt as Time,
3117
+ Lt as Timeline,
3118
+ Ee as Tree,
3119
+ k as Widget,
3120
+ Ae as graphFieldUtils,
3121
+ Ne as graphProcessor,
3122
+ J as parseContext,
3123
+ ze as parseContextFields,
3124
+ De as parseDomainFields,
3125
+ Be as parseGraph,
3126
+ je as transformDomainForChildWidget
2978
3127
  };
2979
3128
  //# sourceMappingURL=ooui.es.js.map