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