@gisce/ooui 2.31.0-alpha.4 → 2.32.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/Date.d.ts +6 -1
- package/dist/Date.d.ts.map +1 -1
- package/dist/DateTime.d.ts +2 -2
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/Time.d.ts +2 -2
- package/dist/Time.d.ts.map +1 -1
- package/dist/ooui.es.js +197 -189
- package/dist/ooui.es.js.map +1 -1
- package/package.json +1 -1
- package/src/Date.ts +12 -1
- package/src/DateTime.ts +2 -2
- package/src/Time.ts +2 -2
package/dist/ooui.es.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var r = (i, t, e) => (
|
|
4
|
-
import { decode as
|
|
5
|
-
import { evaluateCondition as
|
|
1
|
+
var ye = Object.defineProperty;
|
|
2
|
+
var pe = (i, t, e) => t in i ? ye(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
|
+
var r = (i, t, e) => (pe(i, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
+
import { decode as xe } from "html-entities";
|
|
5
|
+
import { evaluateCondition as we } from "@gisce/conscheck";
|
|
6
6
|
import * as D from "txml";
|
|
7
7
|
import T from "moment";
|
|
8
|
-
const
|
|
8
|
+
const ve = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe = ({
|
|
9
9
|
entry: i,
|
|
10
10
|
values: t,
|
|
11
11
|
fields: e
|
|
12
12
|
}) => {
|
|
13
13
|
let [s, n, a] = i, l = t[s];
|
|
14
|
-
const o =
|
|
14
|
+
const o = U({
|
|
15
15
|
fieldName: s,
|
|
16
16
|
valueInObject: l,
|
|
17
17
|
expectedValue: a,
|
|
@@ -41,7 +41,7 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
|
|
|
41
41
|
default:
|
|
42
42
|
return !1;
|
|
43
43
|
}
|
|
44
|
-
}, m = (i) =>
|
|
44
|
+
}, m = (i) => xe(i, { level: "xml" }), U = ({
|
|
45
45
|
fieldName: i,
|
|
46
46
|
valueInObject: t,
|
|
47
47
|
expectedValue: e,
|
|
@@ -61,19 +61,19 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
|
|
|
61
61
|
modifiedExpectedValue: null,
|
|
62
62
|
directOutcome: !1
|
|
63
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
|
-
},
|
|
64
|
+
}, H = ({
|
|
65
65
|
attrs: i,
|
|
66
66
|
values: t,
|
|
67
67
|
fields: e,
|
|
68
68
|
widgetType: s
|
|
69
69
|
}) => {
|
|
70
70
|
const u = i.replace(/\(/g, "[").replace(/\)/g, "]").replace(/'/g, '"').replace(/True/g, "true").replace(/False/g, "false"), _ = m(u), h = JSON.parse(_), d = {};
|
|
71
|
-
for (const
|
|
72
|
-
const p = h[
|
|
73
|
-
p ? d[
|
|
71
|
+
for (const f of Object.keys(h)) {
|
|
72
|
+
const p = h[f].map((y) => Fe({ entry: y, values: t, fields: e })).every((y) => y);
|
|
73
|
+
p ? d[f] = !0 : f === "readonly" && !p && s === "button" && (d[f] = !1);
|
|
74
74
|
}
|
|
75
75
|
return d;
|
|
76
|
-
},
|
|
76
|
+
}, K = (i) => {
|
|
77
77
|
if (i === void 0)
|
|
78
78
|
return {};
|
|
79
79
|
if (typeof i == "string")
|
|
@@ -84,7 +84,7 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
|
|
|
84
84
|
}
|
|
85
85
|
else
|
|
86
86
|
return i;
|
|
87
|
-
},
|
|
87
|
+
}, Ce = ({
|
|
88
88
|
attrs: i,
|
|
89
89
|
values: t,
|
|
90
90
|
fields: e,
|
|
@@ -95,14 +95,14 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
|
|
|
95
95
|
n.replace(/'/g, '"')
|
|
96
96
|
), l = {};
|
|
97
97
|
for (const o of Object.keys(a)) {
|
|
98
|
-
const u =
|
|
98
|
+
const u = we({
|
|
99
99
|
object: t,
|
|
100
100
|
condition: a[o],
|
|
101
101
|
evaluateFieldComparison: ({
|
|
102
102
|
fieldName: _,
|
|
103
103
|
valueInObject: h,
|
|
104
104
|
expectedValue: d
|
|
105
|
-
}) =>
|
|
105
|
+
}) => U({
|
|
106
106
|
fieldName: _,
|
|
107
107
|
valueInObject: h,
|
|
108
108
|
expectedValue: d,
|
|
@@ -117,7 +117,7 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
|
|
|
117
117
|
"Error parsing new json_attrs. Original string: " + i
|
|
118
118
|
) : n;
|
|
119
119
|
}
|
|
120
|
-
},
|
|
120
|
+
}, ke = ({
|
|
121
121
|
tagAttributes: i,
|
|
122
122
|
values: t,
|
|
123
123
|
fields: e,
|
|
@@ -127,7 +127,7 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
|
|
|
127
127
|
let a = {};
|
|
128
128
|
if (i.json_attrs)
|
|
129
129
|
try {
|
|
130
|
-
a =
|
|
130
|
+
a = Ce({
|
|
131
131
|
attrs: i.json_attrs,
|
|
132
132
|
values: t,
|
|
133
133
|
fields: e,
|
|
@@ -135,7 +135,7 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
|
|
|
135
135
|
});
|
|
136
136
|
} catch (l) {
|
|
137
137
|
if (n && i.attrs)
|
|
138
|
-
a =
|
|
138
|
+
a = H({
|
|
139
139
|
attrs: i.attrs,
|
|
140
140
|
values: t,
|
|
141
141
|
fields: e,
|
|
@@ -145,7 +145,7 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
|
|
|
145
145
|
throw l;
|
|
146
146
|
}
|
|
147
147
|
else
|
|
148
|
-
i.attrs && (a =
|
|
148
|
+
i.attrs && (a = H({
|
|
149
149
|
attrs: i.attrs,
|
|
150
150
|
values: t,
|
|
151
151
|
fields: e,
|
|
@@ -193,7 +193,7 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
|
|
|
193
193
|
* Base type of the field
|
|
194
194
|
*/
|
|
195
195
|
r(this, "_fieldType", "");
|
|
196
|
-
this._colspan = k._defaultColspan, this._invisible = !1, t && (t.colspan && (this._colspan = +t.colspan), t.readonly !== void 0 && (this._readOnly = W(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 =
|
|
196
|
+
this._colspan = k._defaultColspan, this._invisible = !1, t && (t.colspan && (this._colspan = +t.colspan), t.readonly !== void 0 && (this._readOnly = W(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 = K(t.widget_props)), t.key && (this._key = t.key), t.is_function && (this._isFunction = t.is_function));
|
|
197
197
|
}
|
|
198
198
|
static get defaultColspan() {
|
|
199
199
|
return k._defaultColspan;
|
|
@@ -264,7 +264,7 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
|
|
|
264
264
|
*/
|
|
265
265
|
r(k, "_defaultColspan", 1);
|
|
266
266
|
let C = k;
|
|
267
|
-
class
|
|
267
|
+
class g extends C {
|
|
268
268
|
constructor(e) {
|
|
269
269
|
super(e);
|
|
270
270
|
/**
|
|
@@ -312,7 +312,7 @@ class f extends C {
|
|
|
312
312
|
r(this, "_selectionValues", /* @__PURE__ */ new Map([]));
|
|
313
313
|
r(this, "_autoRefresh", !1);
|
|
314
314
|
r(this, "_raw_props");
|
|
315
|
-
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 =
|
|
315
|
+
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 = ve(e.help_inline)), e.autorefresh && (this.autoRefresh = W(e.autorefresh)));
|
|
316
316
|
}
|
|
317
317
|
get id() {
|
|
318
318
|
return this._id;
|
|
@@ -397,14 +397,14 @@ class f extends C {
|
|
|
397
397
|
return this._id === e ? this : null;
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
|
-
class
|
|
400
|
+
class Pe extends g {
|
|
401
401
|
}
|
|
402
|
-
class
|
|
402
|
+
class Z extends C {
|
|
403
403
|
findById(t) {
|
|
404
404
|
return null;
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
|
-
class
|
|
407
|
+
class ee extends g {
|
|
408
408
|
constructor(e) {
|
|
409
409
|
super({ ...e, nolabel: !0 });
|
|
410
410
|
/**
|
|
@@ -531,13 +531,13 @@ class V {
|
|
|
531
531
|
}
|
|
532
532
|
addWidget(t, e) {
|
|
533
533
|
const s = [], n = e ? e.addLabel : !0;
|
|
534
|
-
if (t instanceof
|
|
534
|
+
if (t instanceof Z) {
|
|
535
535
|
this._rows.push([]), this._index++;
|
|
536
536
|
return;
|
|
537
537
|
}
|
|
538
|
-
if (t.colspan > this._columns && (t.colspan = this._columns), t.readOnly = t.readOnly || this.readOnly, n && t instanceof
|
|
538
|
+
if (t.colspan > this._columns && (t.colspan = this._columns), t.readOnly = t.readOnly || this.readOnly, n && t instanceof g && !t.nolabel) {
|
|
539
539
|
t.colspan > 1 && (t.colspan -= 1);
|
|
540
|
-
const l = new
|
|
540
|
+
const l = new ee({
|
|
541
541
|
name: t.id + "_label",
|
|
542
542
|
string: t.label,
|
|
543
543
|
invisible: t.invisible,
|
|
@@ -679,7 +679,7 @@ class L extends w {
|
|
|
679
679
|
this._loading = e;
|
|
680
680
|
}
|
|
681
681
|
}
|
|
682
|
-
class
|
|
682
|
+
class Oe extends L {
|
|
683
683
|
constructor(e) {
|
|
684
684
|
super(e);
|
|
685
685
|
r(this, "_icon", null);
|
|
@@ -692,7 +692,7 @@ class Pe extends L {
|
|
|
692
692
|
this._icon = e;
|
|
693
693
|
}
|
|
694
694
|
}
|
|
695
|
-
class
|
|
695
|
+
class We extends L {
|
|
696
696
|
constructor(e) {
|
|
697
697
|
var s;
|
|
698
698
|
super(e);
|
|
@@ -726,7 +726,7 @@ class Oe extends L {
|
|
|
726
726
|
this._backgroundColor = e;
|
|
727
727
|
}
|
|
728
728
|
}
|
|
729
|
-
class
|
|
729
|
+
class te extends g {
|
|
730
730
|
constructor(e) {
|
|
731
731
|
super({
|
|
732
732
|
...e,
|
|
@@ -798,7 +798,7 @@ class ee extends f {
|
|
|
798
798
|
this._danger = e;
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
|
-
class
|
|
801
|
+
class Te extends w {
|
|
802
802
|
constructor(e) {
|
|
803
803
|
super(e);
|
|
804
804
|
r(this, "_defaultName", "");
|
|
@@ -829,7 +829,7 @@ class We extends w {
|
|
|
829
829
|
return this._container.rows.flat().filter((e) => !e.invisible);
|
|
830
830
|
}
|
|
831
831
|
}
|
|
832
|
-
class A extends
|
|
832
|
+
class A extends g {
|
|
833
833
|
constructor(e) {
|
|
834
834
|
super(e);
|
|
835
835
|
/**
|
|
@@ -872,7 +872,7 @@ class A extends f {
|
|
|
872
872
|
this._translatable = e;
|
|
873
873
|
}
|
|
874
874
|
}
|
|
875
|
-
class G extends
|
|
875
|
+
class G extends g {
|
|
876
876
|
constructor(e) {
|
|
877
877
|
super(e);
|
|
878
878
|
/**
|
|
@@ -936,7 +936,7 @@ class G extends f {
|
|
|
936
936
|
this._translatable = e;
|
|
937
937
|
}
|
|
938
938
|
}
|
|
939
|
-
class
|
|
939
|
+
class z extends g {
|
|
940
940
|
constructor(e) {
|
|
941
941
|
super(e);
|
|
942
942
|
/**
|
|
@@ -952,7 +952,7 @@ class I extends f {
|
|
|
952
952
|
this._size = e;
|
|
953
953
|
}
|
|
954
954
|
}
|
|
955
|
-
class
|
|
955
|
+
class ze extends g {
|
|
956
956
|
constructor(e) {
|
|
957
957
|
super(e);
|
|
958
958
|
/**
|
|
@@ -989,17 +989,17 @@ class Te extends f {
|
|
|
989
989
|
}
|
|
990
990
|
class Ie extends G {
|
|
991
991
|
}
|
|
992
|
-
class
|
|
992
|
+
class ie extends g {
|
|
993
993
|
constructor(t) {
|
|
994
994
|
super(t);
|
|
995
995
|
}
|
|
996
996
|
}
|
|
997
|
-
class Ee extends
|
|
997
|
+
class Ee extends g {
|
|
998
998
|
constructor(t) {
|
|
999
999
|
super(t);
|
|
1000
1000
|
}
|
|
1001
1001
|
}
|
|
1002
|
-
class R extends
|
|
1002
|
+
class R extends g {
|
|
1003
1003
|
constructor(e) {
|
|
1004
1004
|
super(e);
|
|
1005
1005
|
/**
|
|
@@ -1034,21 +1034,29 @@ class R extends f {
|
|
|
1034
1034
|
}
|
|
1035
1035
|
class Se extends R {
|
|
1036
1036
|
}
|
|
1037
|
-
class
|
|
1037
|
+
class Ve extends g {
|
|
1038
1038
|
}
|
|
1039
|
-
class
|
|
1039
|
+
class Ye extends R {
|
|
1040
1040
|
}
|
|
1041
|
-
class
|
|
1042
|
-
constructor(
|
|
1043
|
-
super(
|
|
1041
|
+
class $ extends g {
|
|
1042
|
+
constructor(e) {
|
|
1043
|
+
super(e);
|
|
1044
|
+
r(this, "_timezone");
|
|
1045
|
+
this._timezone = (e == null ? void 0 : e.timezone) || void 0;
|
|
1046
|
+
}
|
|
1047
|
+
get timezone() {
|
|
1048
|
+
return this._timezone;
|
|
1049
|
+
}
|
|
1050
|
+
set timezone(e) {
|
|
1051
|
+
this._timezone = e;
|
|
1044
1052
|
}
|
|
1045
1053
|
}
|
|
1046
|
-
class De extends
|
|
1054
|
+
class De extends $ {
|
|
1047
1055
|
constructor(t) {
|
|
1048
1056
|
super(t);
|
|
1049
1057
|
}
|
|
1050
1058
|
}
|
|
1051
|
-
class
|
|
1059
|
+
class se extends g {
|
|
1052
1060
|
constructor(e) {
|
|
1053
1061
|
super(e);
|
|
1054
1062
|
/**
|
|
@@ -1168,9 +1176,9 @@ class je extends C {
|
|
|
1168
1176
|
return null;
|
|
1169
1177
|
}
|
|
1170
1178
|
}
|
|
1171
|
-
class Me extends
|
|
1179
|
+
class Me extends z {
|
|
1172
1180
|
}
|
|
1173
|
-
class Ae extends
|
|
1181
|
+
class Ae extends g {
|
|
1174
1182
|
constructor(e) {
|
|
1175
1183
|
super(e);
|
|
1176
1184
|
/**
|
|
@@ -1186,18 +1194,18 @@ class Ae extends f {
|
|
|
1186
1194
|
this._filenameField = e;
|
|
1187
1195
|
}
|
|
1188
1196
|
}
|
|
1189
|
-
class Ne extends
|
|
1197
|
+
class Ne extends g {
|
|
1190
1198
|
get showControls() {
|
|
1191
1199
|
var t;
|
|
1192
1200
|
return ((t = this.parsedWidgetProps) == null ? void 0 : t.showControls) ?? !0;
|
|
1193
1201
|
}
|
|
1194
1202
|
}
|
|
1195
|
-
class Be extends
|
|
1203
|
+
class Be extends g {
|
|
1196
1204
|
constructor(t) {
|
|
1197
1205
|
super(t);
|
|
1198
1206
|
}
|
|
1199
1207
|
}
|
|
1200
|
-
class Le extends
|
|
1208
|
+
class Le extends se {
|
|
1201
1209
|
constructor(e) {
|
|
1202
1210
|
super(e);
|
|
1203
1211
|
/**
|
|
@@ -1229,7 +1237,7 @@ class Le extends ie {
|
|
|
1229
1237
|
return this.parsedWidgetProps.colorField;
|
|
1230
1238
|
}
|
|
1231
1239
|
}
|
|
1232
|
-
class Ge extends
|
|
1240
|
+
class Ge extends z {
|
|
1233
1241
|
constructor(e) {
|
|
1234
1242
|
super(e);
|
|
1235
1243
|
r(this, "_nolabel", !0);
|
|
@@ -1283,7 +1291,7 @@ class Ge extends I {
|
|
|
1283
1291
|
this._height = e;
|
|
1284
1292
|
}
|
|
1285
1293
|
}
|
|
1286
|
-
class
|
|
1294
|
+
class re extends g {
|
|
1287
1295
|
constructor(e) {
|
|
1288
1296
|
super(e);
|
|
1289
1297
|
/**
|
|
@@ -1336,9 +1344,9 @@ class se extends f {
|
|
|
1336
1344
|
this._columns = e;
|
|
1337
1345
|
}
|
|
1338
1346
|
}
|
|
1339
|
-
class Re extends
|
|
1347
|
+
class Re extends re {
|
|
1340
1348
|
}
|
|
1341
|
-
class $e extends
|
|
1349
|
+
class $e extends z {
|
|
1342
1350
|
get colors() {
|
|
1343
1351
|
return this._parsedWidgetProps.colors || {};
|
|
1344
1352
|
}
|
|
@@ -1347,7 +1355,7 @@ class $e extends I {
|
|
|
1347
1355
|
return ((t = this._parsedWidgetProps) == null ? void 0 : t.colorField) || null;
|
|
1348
1356
|
}
|
|
1349
1357
|
}
|
|
1350
|
-
class qe extends
|
|
1358
|
+
class qe extends z {
|
|
1351
1359
|
constructor(e) {
|
|
1352
1360
|
super(e);
|
|
1353
1361
|
/**
|
|
@@ -1363,9 +1371,9 @@ class qe extends I {
|
|
|
1363
1371
|
this._direction = e;
|
|
1364
1372
|
}
|
|
1365
1373
|
}
|
|
1366
|
-
class Je extends
|
|
1374
|
+
class Je extends ie {
|
|
1367
1375
|
}
|
|
1368
|
-
class He extends
|
|
1376
|
+
class He extends g {
|
|
1369
1377
|
constructor(e) {
|
|
1370
1378
|
super(e);
|
|
1371
1379
|
/**
|
|
@@ -1395,7 +1403,7 @@ class He extends f {
|
|
|
1395
1403
|
this._lastStep = e;
|
|
1396
1404
|
}
|
|
1397
1405
|
}
|
|
1398
|
-
class
|
|
1406
|
+
class ne extends G {
|
|
1399
1407
|
constructor(e) {
|
|
1400
1408
|
super(e);
|
|
1401
1409
|
r(this, "_lang", null);
|
|
@@ -1408,7 +1416,7 @@ class re extends G {
|
|
|
1408
1416
|
this._lang = e;
|
|
1409
1417
|
}
|
|
1410
1418
|
}
|
|
1411
|
-
class Qe extends
|
|
1419
|
+
class Qe extends $ {
|
|
1412
1420
|
constructor(t) {
|
|
1413
1421
|
super(t);
|
|
1414
1422
|
}
|
|
@@ -1453,7 +1461,7 @@ class Xe extends w {
|
|
|
1453
1461
|
return this._container.rows.flat().filter((e) => !e.invisible);
|
|
1454
1462
|
}
|
|
1455
1463
|
}
|
|
1456
|
-
class Ue extends
|
|
1464
|
+
class Ue extends g {
|
|
1457
1465
|
constructor(e) {
|
|
1458
1466
|
super(e);
|
|
1459
1467
|
/**
|
|
@@ -1472,13 +1480,13 @@ class Ue extends f {
|
|
|
1472
1480
|
this._height = e;
|
|
1473
1481
|
}
|
|
1474
1482
|
}
|
|
1475
|
-
class
|
|
1483
|
+
class Q extends ne {
|
|
1476
1484
|
constructor() {
|
|
1477
1485
|
super(...arguments);
|
|
1478
1486
|
r(this, "_lang", "json");
|
|
1479
1487
|
}
|
|
1480
1488
|
}
|
|
1481
|
-
class Ke extends
|
|
1489
|
+
class Ke extends g {
|
|
1482
1490
|
constructor(e) {
|
|
1483
1491
|
super(e);
|
|
1484
1492
|
r(this, "_multi", !1);
|
|
@@ -1519,7 +1527,7 @@ class et extends A {
|
|
|
1519
1527
|
return this.parsedWidgetProps.show_text ?? !0;
|
|
1520
1528
|
}
|
|
1521
1529
|
}
|
|
1522
|
-
class
|
|
1530
|
+
class q {
|
|
1523
1531
|
constructor() {
|
|
1524
1532
|
/**
|
|
1525
1533
|
* Widget class
|
|
@@ -1532,13 +1540,13 @@ class $ {
|
|
|
1532
1540
|
this._widgetClass = M;
|
|
1533
1541
|
break;
|
|
1534
1542
|
case "page":
|
|
1535
|
-
this._widgetClass =
|
|
1543
|
+
this._widgetClass = Oe;
|
|
1536
1544
|
break;
|
|
1537
1545
|
case "group":
|
|
1538
|
-
this._widgetClass =
|
|
1546
|
+
this._widgetClass = We;
|
|
1539
1547
|
break;
|
|
1540
1548
|
case "label":
|
|
1541
|
-
this._widgetClass =
|
|
1549
|
+
this._widgetClass = ee;
|
|
1542
1550
|
break;
|
|
1543
1551
|
case "char":
|
|
1544
1552
|
this._widgetClass = A;
|
|
@@ -1547,19 +1555,19 @@ class $ {
|
|
|
1547
1555
|
this._widgetClass = G;
|
|
1548
1556
|
break;
|
|
1549
1557
|
case "button":
|
|
1550
|
-
this._widgetClass =
|
|
1558
|
+
this._widgetClass = te;
|
|
1551
1559
|
break;
|
|
1552
1560
|
case "buttonGroup":
|
|
1553
|
-
this._widgetClass =
|
|
1561
|
+
this._widgetClass = Te;
|
|
1554
1562
|
break;
|
|
1555
1563
|
case "selection":
|
|
1556
|
-
this._widgetClass =
|
|
1564
|
+
this._widgetClass = z;
|
|
1557
1565
|
break;
|
|
1558
1566
|
case "many2one":
|
|
1559
|
-
this._widgetClass =
|
|
1567
|
+
this._widgetClass = ze;
|
|
1560
1568
|
break;
|
|
1561
1569
|
case "boolean":
|
|
1562
|
-
this._widgetClass =
|
|
1570
|
+
this._widgetClass = ie;
|
|
1563
1571
|
break;
|
|
1564
1572
|
case "integer":
|
|
1565
1573
|
this._widgetClass = Ee;
|
|
@@ -1571,13 +1579,13 @@ class $ {
|
|
|
1571
1579
|
this._widgetClass = Se;
|
|
1572
1580
|
break;
|
|
1573
1581
|
case "date":
|
|
1574
|
-
this._widgetClass =
|
|
1582
|
+
this._widgetClass = $;
|
|
1575
1583
|
break;
|
|
1576
1584
|
case "datetime":
|
|
1577
1585
|
this._widgetClass = De;
|
|
1578
1586
|
break;
|
|
1579
1587
|
case "progressbar":
|
|
1580
|
-
this._widgetClass =
|
|
1588
|
+
this._widgetClass = Ye;
|
|
1581
1589
|
break;
|
|
1582
1590
|
case "markdown":
|
|
1583
1591
|
this._widgetClass = Ie;
|
|
@@ -1585,10 +1593,10 @@ class $ {
|
|
|
1585
1593
|
case "many2many":
|
|
1586
1594
|
case "one2many":
|
|
1587
1595
|
case "one2many_list":
|
|
1588
|
-
this._widgetClass =
|
|
1596
|
+
this._widgetClass = se;
|
|
1589
1597
|
break;
|
|
1590
1598
|
case "newline":
|
|
1591
|
-
this._widgetClass =
|
|
1599
|
+
this._widgetClass = Z;
|
|
1592
1600
|
break;
|
|
1593
1601
|
case "separator":
|
|
1594
1602
|
this._widgetClass = je;
|
|
@@ -1624,13 +1632,13 @@ class $ {
|
|
|
1624
1632
|
this._widgetClass = $e;
|
|
1625
1633
|
break;
|
|
1626
1634
|
case "avatar":
|
|
1627
|
-
this._widgetClass =
|
|
1635
|
+
this._widgetClass = Pe;
|
|
1628
1636
|
break;
|
|
1629
1637
|
case "radio":
|
|
1630
1638
|
this._widgetClass = qe;
|
|
1631
1639
|
break;
|
|
1632
1640
|
case "multicheckbox":
|
|
1633
|
-
this._widgetClass =
|
|
1641
|
+
this._widgetClass = re;
|
|
1634
1642
|
break;
|
|
1635
1643
|
case "switch":
|
|
1636
1644
|
this._widgetClass = Je;
|
|
@@ -1639,13 +1647,13 @@ class $ {
|
|
|
1639
1647
|
this._widgetClass = He;
|
|
1640
1648
|
break;
|
|
1641
1649
|
case "codeeditor":
|
|
1642
|
-
this._widgetClass =
|
|
1650
|
+
this._widgetClass = ne;
|
|
1643
1651
|
break;
|
|
1644
1652
|
case "time":
|
|
1645
1653
|
this._widgetClass = Qe;
|
|
1646
1654
|
break;
|
|
1647
1655
|
case "html_preview":
|
|
1648
|
-
this._widgetClass =
|
|
1656
|
+
this._widgetClass = Ve;
|
|
1649
1657
|
break;
|
|
1650
1658
|
case "alert":
|
|
1651
1659
|
this._widgetClass = Xe;
|
|
@@ -1654,10 +1662,10 @@ class $ {
|
|
|
1654
1662
|
this._widgetClass = Ue;
|
|
1655
1663
|
break;
|
|
1656
1664
|
case "json":
|
|
1657
|
-
this._widgetClass =
|
|
1665
|
+
this._widgetClass = Q;
|
|
1658
1666
|
break;
|
|
1659
1667
|
case "arrow_steps":
|
|
1660
|
-
this._widgetClass =
|
|
1668
|
+
this._widgetClass = Q;
|
|
1661
1669
|
break;
|
|
1662
1670
|
case "spinner":
|
|
1663
1671
|
this._widgetClass = L;
|
|
@@ -1732,7 +1740,7 @@ function st({
|
|
|
1732
1740
|
const s = ((n = e[t]) == null ? void 0 : n.type) || "passthrough";
|
|
1733
1741
|
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);
|
|
1734
1742
|
}
|
|
1735
|
-
const
|
|
1743
|
+
const ae = ({
|
|
1736
1744
|
context: i,
|
|
1737
1745
|
values: t,
|
|
1738
1746
|
fields: e
|
|
@@ -1740,14 +1748,14 @@ const ne = ({
|
|
|
1740
1748
|
try {
|
|
1741
1749
|
if (!i)
|
|
1742
1750
|
return;
|
|
1743
|
-
if (
|
|
1751
|
+
if (oe(i) || typeof i != "string")
|
|
1744
1752
|
return i;
|
|
1745
|
-
const s =
|
|
1753
|
+
const s = le(i);
|
|
1746
1754
|
if (s !== null)
|
|
1747
1755
|
return s;
|
|
1748
1756
|
if (i.trim().length === 0)
|
|
1749
1757
|
return;
|
|
1750
|
-
const d = i.replace(/"/g, "'").replace(/\s/g, "").replace(/True/g, "true").replace(/False/g, "false").replace(/\{/g, "").replace(/\}/g, "").split(",").map((c) => c.split(":")),
|
|
1758
|
+
const d = i.replace(/"/g, "'").replace(/\s/g, "").replace(/True/g, "true").replace(/False/g, "false").replace(/\{/g, "").replace(/\}/g, "").split(",").map((c) => c.split(":")), f = {};
|
|
1751
1759
|
return d.forEach((c) => {
|
|
1752
1760
|
const b = c[1];
|
|
1753
1761
|
if (!c[1].includes("'") && c[1] !== "true" && c[1] !== "false") {
|
|
@@ -1756,34 +1764,34 @@ const ne = ({
|
|
|
1756
1764
|
fields: e,
|
|
1757
1765
|
fieldName: b === "active_id" ? "id" : b
|
|
1758
1766
|
});
|
|
1759
|
-
|
|
1767
|
+
f[c[0].replace(/'/g, "")] = p || void 0;
|
|
1760
1768
|
} else
|
|
1761
|
-
c[1] === "true" ?
|
|
1769
|
+
c[1] === "true" ? f[c[0].replace(/'/g, "")] = !0 : c[1] === "false" ? f[c[0].replace(/'/g, "")] = !1 : f[c[0].replace(/'/g, "")] = c[1].replace(
|
|
1762
1770
|
/'/g,
|
|
1763
1771
|
""
|
|
1764
1772
|
);
|
|
1765
|
-
}),
|
|
1773
|
+
}), f;
|
|
1766
1774
|
} catch {
|
|
1767
1775
|
return;
|
|
1768
1776
|
}
|
|
1769
1777
|
}, Wt = (i) => {
|
|
1770
1778
|
const t = [];
|
|
1771
1779
|
try {
|
|
1772
|
-
return !i ||
|
|
1780
|
+
return !i || oe(i) || typeof i != "string" ? t : le(i) !== null ? [] : (i.trim().length === 0 || i.replace(/"/g, "'").replace(/\s/g, "").replace(/True/g, "true").replace(/False/g, "false").replace(/\{/g, "").replace(/\}/g, "").split(",").map((d) => d.split(":")).forEach((d) => {
|
|
1773
1781
|
!d[1].includes("'") && d[1] !== "true" && d[1] !== "false" && t.push(d[1].replace(/'/g, ""));
|
|
1774
1782
|
}), t);
|
|
1775
1783
|
} catch {
|
|
1776
1784
|
}
|
|
1777
1785
|
return t;
|
|
1778
1786
|
};
|
|
1779
|
-
function
|
|
1787
|
+
function le(i) {
|
|
1780
1788
|
try {
|
|
1781
1789
|
return JSON.parse(i.replace(/'/g, '"'));
|
|
1782
1790
|
} catch {
|
|
1783
1791
|
return null;
|
|
1784
1792
|
}
|
|
1785
1793
|
}
|
|
1786
|
-
function
|
|
1794
|
+
function oe(i) {
|
|
1787
1795
|
return typeof i == "object" && i !== null && typeof i != "string";
|
|
1788
1796
|
}
|
|
1789
1797
|
const rt = (i) => {
|
|
@@ -1925,29 +1933,29 @@ class Tt {
|
|
|
1925
1933
|
l.forEach((u) => {
|
|
1926
1934
|
const _ = u;
|
|
1927
1935
|
_._id && _._context && (this._contextForFields[_._id] = u._context);
|
|
1928
|
-
}), this._autorefreshableFields = l.filter((u) => u instanceof
|
|
1936
|
+
}), this._autorefreshableFields = l.filter((u) => u instanceof g && u.autoRefresh).map((u) => u._id);
|
|
1929
1937
|
}
|
|
1930
1938
|
parseNode({
|
|
1931
1939
|
fields: t,
|
|
1932
1940
|
container: e,
|
|
1933
1941
|
values: s
|
|
1934
1942
|
}) {
|
|
1935
|
-
const n = new
|
|
1943
|
+
const n = new q();
|
|
1936
1944
|
t.filter((a) => typeof a == "object").forEach((a) => {
|
|
1937
1945
|
var v, F;
|
|
1938
1946
|
const { tagName: l, attributes: o, children: u } = a;
|
|
1939
1947
|
let _ = l, h = o;
|
|
1940
1948
|
if (l === "field") {
|
|
1941
|
-
const { name: x, widget:
|
|
1942
|
-
if (
|
|
1943
|
-
_ =
|
|
1949
|
+
const { name: x, widget: I } = o;
|
|
1950
|
+
if (I)
|
|
1951
|
+
_ = I;
|
|
1944
1952
|
else if (x) {
|
|
1945
1953
|
if (!this._fields[x])
|
|
1946
1954
|
throw new Error(
|
|
1947
1955
|
`Field ${x} doesn't exist in fields defintion`
|
|
1948
1956
|
);
|
|
1949
1957
|
_ = this._fields[x].type, o.widget_props = {
|
|
1950
|
-
...
|
|
1958
|
+
...K(o.widget_props),
|
|
1951
1959
|
...this._fields[x].widget_props || {}
|
|
1952
1960
|
};
|
|
1953
1961
|
}
|
|
@@ -1957,22 +1965,22 @@ class Tt {
|
|
|
1957
1965
|
fieldsWidgetType: this._fields[x].type
|
|
1958
1966
|
};
|
|
1959
1967
|
}
|
|
1960
|
-
const d =
|
|
1968
|
+
const d = ke({
|
|
1961
1969
|
tagAttributes: h,
|
|
1962
1970
|
values: s,
|
|
1963
1971
|
fields: this._fields,
|
|
1964
1972
|
widgetType: l
|
|
1965
1973
|
});
|
|
1966
|
-
let
|
|
1967
|
-
l === "button" && h.states ?
|
|
1974
|
+
let f;
|
|
1975
|
+
l === "button" && h.states ? f = it({
|
|
1968
1976
|
states: h.states,
|
|
1969
1977
|
values: s
|
|
1970
|
-
}) :
|
|
1978
|
+
}) : f = tt({
|
|
1971
1979
|
fieldName: h.name,
|
|
1972
1980
|
values: s,
|
|
1973
1981
|
fields: this._fields
|
|
1974
1982
|
});
|
|
1975
|
-
const c =
|
|
1983
|
+
const c = ae({
|
|
1976
1984
|
context: h.context || ((v = this._fields[h.name]) == null ? void 0 : v.context),
|
|
1977
1985
|
values: s,
|
|
1978
1986
|
fields: this._fields
|
|
@@ -1981,21 +1989,21 @@ class Tt {
|
|
|
1981
1989
|
h.on_change
|
|
1982
1990
|
));
|
|
1983
1991
|
let b;
|
|
1984
|
-
|
|
1992
|
+
X(h.domain) ? b = h.domain : X((F = this._fields[h.name]) == null ? void 0 : F.domain) && (b = this._fields[h.name].domain), this._keyIdx = this._keyIdx + 1;
|
|
1985
1993
|
const p = {
|
|
1986
1994
|
...d,
|
|
1987
|
-
...
|
|
1995
|
+
...f,
|
|
1988
1996
|
context: c,
|
|
1989
1997
|
domain: b,
|
|
1990
1998
|
key: `${this._keyIdx}`
|
|
1991
1999
|
};
|
|
1992
2000
|
e.readOnly && (p.readonly = !0);
|
|
1993
2001
|
const y = n.createWidget(_, p);
|
|
1994
|
-
y.invisible && y instanceof
|
|
2002
|
+
y.invisible && y instanceof g && this._invisibleFields.push(p.name), y instanceof w && this.parseNode({
|
|
1995
2003
|
fields: u,
|
|
1996
2004
|
container: y.container,
|
|
1997
2005
|
values: s
|
|
1998
|
-
}), y instanceof
|
|
2006
|
+
}), y instanceof te && y.readOnly !== void 0 || (y.readOnly = y.readOnly || this.readOnly), e.addWidget(y);
|
|
1999
2007
|
});
|
|
2000
2008
|
}
|
|
2001
2009
|
/**
|
|
@@ -2006,10 +2014,10 @@ class Tt {
|
|
|
2006
2014
|
return this.container.findById(t);
|
|
2007
2015
|
}
|
|
2008
2016
|
}
|
|
2009
|
-
function
|
|
2017
|
+
function X(i) {
|
|
2010
2018
|
return i ? Array.isArray(i) && i.length > 0 ? !0 : typeof i == "string" && i !== "" && i !== "[]" : !1;
|
|
2011
2019
|
}
|
|
2012
|
-
class
|
|
2020
|
+
class zt {
|
|
2013
2021
|
constructor(t) {
|
|
2014
2022
|
/**
|
|
2015
2023
|
* Object containing fields specification of the form.
|
|
@@ -2083,7 +2091,7 @@ class It {
|
|
|
2083
2091
|
parse(t) {
|
|
2084
2092
|
const e = D.parse(t).filter((n) => n.tagName === "tree")[0];
|
|
2085
2093
|
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;
|
|
2086
|
-
const s = new
|
|
2094
|
+
const s = new q();
|
|
2087
2095
|
e.children.forEach((n) => {
|
|
2088
2096
|
const { tagName: a, attributes: l } = n;
|
|
2089
2097
|
let o = null;
|
|
@@ -2095,7 +2103,7 @@ class It {
|
|
|
2095
2103
|
throw new Error(`Field ${u} doesn't exist in fields defintion`);
|
|
2096
2104
|
const d = this._fields[u];
|
|
2097
2105
|
o = d.type, (Array.isArray(d == null ? void 0 : d.domain) && (d == null ? void 0 : d.domain.length) === 0 || (d == null ? void 0 : d.domain) === !1) && l.domain && l.domain.length > 0 && delete d.domain;
|
|
2098
|
-
const
|
|
2106
|
+
const f = ae({
|
|
2099
2107
|
context: l.context || d.context,
|
|
2100
2108
|
values: {},
|
|
2101
2109
|
fields: this._fields
|
|
@@ -2104,8 +2112,8 @@ class It {
|
|
|
2104
2112
|
...d,
|
|
2105
2113
|
...l,
|
|
2106
2114
|
fieldsWidgetType: d == null ? void 0 : d.type,
|
|
2107
|
-
context:
|
|
2108
|
-
}, this._contextForFields[u] =
|
|
2115
|
+
context: f
|
|
2116
|
+
}, this._contextForFields[u] = f;
|
|
2109
2117
|
}
|
|
2110
2118
|
if (_ && (o = _), !h.invisible) {
|
|
2111
2119
|
const d = s.createWidget(o, h);
|
|
@@ -2136,7 +2144,7 @@ const at = {
|
|
|
2136
2144
|
date: "date",
|
|
2137
2145
|
datetime: "datetime"
|
|
2138
2146
|
};
|
|
2139
|
-
class
|
|
2147
|
+
class It {
|
|
2140
2148
|
constructor(t, e, s = 8) {
|
|
2141
2149
|
/**
|
|
2142
2150
|
* Object containing the specific fields for primary and secondary search fields
|
|
@@ -2163,7 +2171,7 @@ class Et {
|
|
|
2163
2171
|
return this._advancedSearchContainer;
|
|
2164
2172
|
}
|
|
2165
2173
|
parse() {
|
|
2166
|
-
const t = new
|
|
2174
|
+
const t = new q();
|
|
2167
2175
|
this.parseFields(
|
|
2168
2176
|
this.searchFields.primary,
|
|
2169
2177
|
t
|
|
@@ -2195,7 +2203,7 @@ class Et {
|
|
|
2195
2203
|
return this.advancedSearchContainer.findById(t);
|
|
2196
2204
|
}
|
|
2197
2205
|
}
|
|
2198
|
-
const
|
|
2206
|
+
const Et = ({
|
|
2199
2207
|
domain: i,
|
|
2200
2208
|
widgetFieldName: t
|
|
2201
2209
|
}) => {
|
|
@@ -2210,7 +2218,7 @@ const St = ({
|
|
|
2210
2218
|
n.length - 1
|
|
2211
2219
|
)) : (o = n, u = "id"), o === t && e.push([u, a, l]);
|
|
2212
2220
|
}), e;
|
|
2213
|
-
},
|
|
2221
|
+
}, St = (i) => typeof i != "string" ? [] : i.replace(/[()[\]]/g, "").split(",").map((t) => t.trim()).filter((t) => !t.includes("'"));
|
|
2214
2222
|
class lt {
|
|
2215
2223
|
constructor(t) {
|
|
2216
2224
|
r(this, "_action_id", null);
|
|
@@ -2242,7 +2250,7 @@ class Vt {
|
|
|
2242
2250
|
return this._items;
|
|
2243
2251
|
}
|
|
2244
2252
|
}
|
|
2245
|
-
class
|
|
2253
|
+
class ce {
|
|
2246
2254
|
constructor(t) {
|
|
2247
2255
|
r(this, "_string", null);
|
|
2248
2256
|
r(this, "_type");
|
|
@@ -2270,7 +2278,7 @@ class oe {
|
|
|
2270
2278
|
return this._y_range;
|
|
2271
2279
|
}
|
|
2272
2280
|
}
|
|
2273
|
-
class
|
|
2281
|
+
class ue extends ce {
|
|
2274
2282
|
constructor(e, s) {
|
|
2275
2283
|
super(s);
|
|
2276
2284
|
r(this, "_color", null);
|
|
@@ -2296,7 +2304,7 @@ class ce extends oe {
|
|
|
2296
2304
|
return this._suffix;
|
|
2297
2305
|
}
|
|
2298
2306
|
}
|
|
2299
|
-
class ot extends
|
|
2307
|
+
class ot extends ue {
|
|
2300
2308
|
constructor(e, s) {
|
|
2301
2309
|
super(e, s);
|
|
2302
2310
|
r(this, "_field");
|
|
@@ -2346,7 +2354,7 @@ const ct = (i) => {
|
|
|
2346
2354
|
y: t
|
|
2347
2355
|
};
|
|
2348
2356
|
};
|
|
2349
|
-
class j extends
|
|
2357
|
+
class j extends ce {
|
|
2350
2358
|
constructor(e, s) {
|
|
2351
2359
|
super(s);
|
|
2352
2360
|
r(this, "_x");
|
|
@@ -2363,7 +2371,7 @@ class j extends oe {
|
|
|
2363
2371
|
}
|
|
2364
2372
|
}
|
|
2365
2373
|
const ut = {
|
|
2366
|
-
indicator:
|
|
2374
|
+
indicator: ue,
|
|
2367
2375
|
indicatorField: ot,
|
|
2368
2376
|
line: j,
|
|
2369
2377
|
bar: j,
|
|
@@ -2377,7 +2385,7 @@ const ut = {
|
|
|
2377
2385
|
throw new Error(`${e} not found as a GraphModel`);
|
|
2378
2386
|
return new s(e, t);
|
|
2379
2387
|
};
|
|
2380
|
-
class
|
|
2388
|
+
class de {
|
|
2381
2389
|
constructor({ name: t, axis: e }) {
|
|
2382
2390
|
r(this, "_name");
|
|
2383
2391
|
r(this, "_axis");
|
|
@@ -2390,7 +2398,7 @@ class ue {
|
|
|
2390
2398
|
return this._axis;
|
|
2391
2399
|
}
|
|
2392
2400
|
}
|
|
2393
|
-
class dt extends
|
|
2401
|
+
class dt extends de {
|
|
2394
2402
|
constructor({
|
|
2395
2403
|
name: e,
|
|
2396
2404
|
operator: s,
|
|
@@ -2413,7 +2421,7 @@ class dt extends ue {
|
|
|
2413
2421
|
return this._stacked;
|
|
2414
2422
|
}
|
|
2415
2423
|
}
|
|
2416
|
-
class ht extends
|
|
2424
|
+
class ht extends de {
|
|
2417
2425
|
constructor({ name: t }) {
|
|
2418
2426
|
super({ name: t, axis: "x" });
|
|
2419
2427
|
}
|
|
@@ -2424,7 +2432,7 @@ const _t = ({ ooui: i }) => {
|
|
|
2424
2432
|
s.operator !== "count" && !e.includes(s.name) && e.push(s.name), s.label && !e.includes(s.label) && e.push(s.label);
|
|
2425
2433
|
}), e) : [];
|
|
2426
2434
|
};
|
|
2427
|
-
function
|
|
2435
|
+
function J({
|
|
2428
2436
|
fields: i,
|
|
2429
2437
|
values: t,
|
|
2430
2438
|
fieldName: e
|
|
@@ -2443,7 +2451,7 @@ function q({
|
|
|
2443
2451
|
const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2444
2452
|
__proto__: null,
|
|
2445
2453
|
getFieldsToRetrieve: _t,
|
|
2446
|
-
getValueAndLabelForField:
|
|
2454
|
+
getValueAndLabelForField: J
|
|
2447
2455
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2448
2456
|
function ft({
|
|
2449
2457
|
values: i,
|
|
@@ -2466,7 +2474,7 @@ function gt({
|
|
|
2466
2474
|
interval: e = 1
|
|
2467
2475
|
}) {
|
|
2468
2476
|
let s = [];
|
|
2469
|
-
const n =
|
|
2477
|
+
const n = _e({
|
|
2470
2478
|
values: i,
|
|
2471
2479
|
groupBy: "type-stacked"
|
|
2472
2480
|
}), a = `${t}s`;
|
|
@@ -2476,10 +2484,10 @@ function gt({
|
|
|
2476
2484
|
const h = u[_];
|
|
2477
2485
|
if (s.push(h), _ === u.length - 1)
|
|
2478
2486
|
return;
|
|
2479
|
-
const d = h.x,
|
|
2480
|
-
if (!
|
|
2487
|
+
const d = h.x, f = u[_ + 1].x;
|
|
2488
|
+
if (!he([d, f], a)) {
|
|
2481
2489
|
const c = mt({
|
|
2482
|
-
dates: [d,
|
|
2490
|
+
dates: [d, f],
|
|
2483
2491
|
timerange: t,
|
|
2484
2492
|
interval: e
|
|
2485
2493
|
});
|
|
@@ -2506,13 +2514,13 @@ function mt({
|
|
|
2506
2514
|
const a = i.sort((l, o) => l < o ? -1 : l > o ? 1 : 0);
|
|
2507
2515
|
for (let l = 0; l < a.length - 1; l++) {
|
|
2508
2516
|
const o = a[l], u = a[l + 1];
|
|
2509
|
-
if (!
|
|
2510
|
-
const _ = T(o,
|
|
2517
|
+
if (!he([o, u], n)) {
|
|
2518
|
+
const _ = T(o, S(n)).add(
|
|
2511
2519
|
e,
|
|
2512
2520
|
n
|
|
2513
|
-
), h = T(u,
|
|
2521
|
+
), h = T(u, S(n));
|
|
2514
2522
|
for (; _.isBefore(h); )
|
|
2515
|
-
s.push(_.format(
|
|
2523
|
+
s.push(_.format(S(n))), _.add(e, n);
|
|
2516
2524
|
}
|
|
2517
2525
|
}
|
|
2518
2526
|
return s;
|
|
@@ -2524,7 +2532,7 @@ function bt({
|
|
|
2524
2532
|
const e = yt({
|
|
2525
2533
|
values: i,
|
|
2526
2534
|
timerange: t
|
|
2527
|
-
}), s = [], n =
|
|
2535
|
+
}), s = [], n = _e({
|
|
2528
2536
|
values: e,
|
|
2529
2537
|
groupBy: "all"
|
|
2530
2538
|
});
|
|
@@ -2584,9 +2592,9 @@ function pt({
|
|
|
2584
2592
|
function xt(i) {
|
|
2585
2593
|
return i.indexOf(":") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
|
|
2586
2594
|
}
|
|
2587
|
-
function
|
|
2595
|
+
function he(i, t) {
|
|
2588
2596
|
let e = !1;
|
|
2589
|
-
const s =
|
|
2597
|
+
const s = S(t);
|
|
2590
2598
|
if (i.length === 0)
|
|
2591
2599
|
return !1;
|
|
2592
2600
|
if (i.length === 1)
|
|
@@ -2597,7 +2605,7 @@ function de(i, t) {
|
|
|
2597
2605
|
}
|
|
2598
2606
|
return e;
|
|
2599
2607
|
}
|
|
2600
|
-
function
|
|
2608
|
+
function _e({
|
|
2601
2609
|
values: i,
|
|
2602
2610
|
groupBy: t
|
|
2603
2611
|
}) {
|
|
@@ -2607,7 +2615,7 @@ function he({
|
|
|
2607
2615
|
e[o] || (e[o] = []), e[o].push(s);
|
|
2608
2616
|
}), e;
|
|
2609
2617
|
}
|
|
2610
|
-
function
|
|
2618
|
+
function S(i) {
|
|
2611
2619
|
switch (i) {
|
|
2612
2620
|
case "days":
|
|
2613
2621
|
return "YYYY-MM-DD";
|
|
@@ -2651,18 +2659,18 @@ const wt = {
|
|
|
2651
2659
|
fields: e
|
|
2652
2660
|
});
|
|
2653
2661
|
Object.keys(v).forEach((F) => {
|
|
2654
|
-
const x = v[F].entries,
|
|
2662
|
+
const x = v[F].entries, I = v[F].label, me = N({
|
|
2655
2663
|
entries: x,
|
|
2656
2664
|
fields: e,
|
|
2657
2665
|
fieldName: c.name
|
|
2658
|
-
}),
|
|
2659
|
-
values:
|
|
2666
|
+
}), be = Y({
|
|
2667
|
+
values: me,
|
|
2660
2668
|
operator: c.operator
|
|
2661
2669
|
});
|
|
2662
2670
|
a.push({
|
|
2663
2671
|
x: p || !1,
|
|
2664
|
-
value:
|
|
2665
|
-
type:
|
|
2672
|
+
value: be,
|
|
2673
|
+
type: I,
|
|
2666
2674
|
operator: c.operator,
|
|
2667
2675
|
stacked: c.stacked
|
|
2668
2676
|
});
|
|
@@ -2679,7 +2687,7 @@ const wt = {
|
|
|
2679
2687
|
a.push({
|
|
2680
2688
|
x: p || !1,
|
|
2681
2689
|
value: F,
|
|
2682
|
-
type:
|
|
2690
|
+
type: fe({
|
|
2683
2691
|
yAxis: c,
|
|
2684
2692
|
fields: e
|
|
2685
2693
|
}),
|
|
@@ -2702,25 +2710,25 @@ const wt = {
|
|
|
2702
2710
|
timerange: i.timerange,
|
|
2703
2711
|
interval: i.interval
|
|
2704
2712
|
}) : i.type == "pie" && (d = h.sort((c, b) => b.value - c.value));
|
|
2705
|
-
const
|
|
2713
|
+
const f = {
|
|
2706
2714
|
data: d,
|
|
2707
2715
|
isGroup: o || l,
|
|
2708
2716
|
isStack: o
|
|
2709
2717
|
};
|
|
2710
|
-
if (i.type === "line" && i.y_range && (
|
|
2718
|
+
if (i.type === "line" && i.y_range && (f.yAxisOpts = {
|
|
2711
2719
|
mode: i.y_range
|
|
2712
2720
|
}, i.y_range === "auto")) {
|
|
2713
|
-
const { min: c, max: b } =
|
|
2714
|
-
|
|
2721
|
+
const { min: c, max: b } = ge(d);
|
|
2722
|
+
f.yAxisOpts.valueOpts = { min: c, max: b };
|
|
2715
2723
|
}
|
|
2716
|
-
return
|
|
2724
|
+
return f;
|
|
2717
2725
|
};
|
|
2718
2726
|
function N({
|
|
2719
2727
|
entries: i,
|
|
2720
2728
|
fieldName: t,
|
|
2721
2729
|
fields: e
|
|
2722
2730
|
}) {
|
|
2723
|
-
return i.map((s) =>
|
|
2731
|
+
return i.map((s) => J({
|
|
2724
2732
|
fieldName: t,
|
|
2725
2733
|
values: s,
|
|
2726
2734
|
fields: e
|
|
@@ -2734,26 +2742,26 @@ function Y({
|
|
|
2734
2742
|
case "count":
|
|
2735
2743
|
return t.length;
|
|
2736
2744
|
case "+":
|
|
2737
|
-
return
|
|
2745
|
+
return E(
|
|
2738
2746
|
t.reduce(function(e, s) {
|
|
2739
2747
|
return e + s;
|
|
2740
2748
|
})
|
|
2741
2749
|
);
|
|
2742
2750
|
case "-":
|
|
2743
|
-
return
|
|
2751
|
+
return E(
|
|
2744
2752
|
t.reduce(function(e, s) {
|
|
2745
2753
|
return e - s;
|
|
2746
2754
|
})
|
|
2747
2755
|
);
|
|
2748
2756
|
case "*":
|
|
2749
|
-
return
|
|
2757
|
+
return E(
|
|
2750
2758
|
t.reduce(function(e, s) {
|
|
2751
2759
|
return e * s;
|
|
2752
2760
|
})
|
|
2753
2761
|
);
|
|
2754
2762
|
case "avg": {
|
|
2755
2763
|
const s = t.reduce((n, a) => n + a, 0) / t.length || 0;
|
|
2756
|
-
return
|
|
2764
|
+
return E(s);
|
|
2757
2765
|
}
|
|
2758
2766
|
case "min":
|
|
2759
2767
|
return Math.min(...t);
|
|
@@ -2761,7 +2769,7 @@ function Y({
|
|
|
2761
2769
|
return Math.max(...t);
|
|
2762
2770
|
}
|
|
2763
2771
|
}
|
|
2764
|
-
function
|
|
2772
|
+
function E(i) {
|
|
2765
2773
|
return Math.round((i + Number.EPSILON) * 100) / 100;
|
|
2766
2774
|
}
|
|
2767
2775
|
function B({
|
|
@@ -2771,7 +2779,7 @@ function B({
|
|
|
2771
2779
|
}) {
|
|
2772
2780
|
const s = {};
|
|
2773
2781
|
return e.forEach((n) => {
|
|
2774
|
-
const { value: a, label: l } =
|
|
2782
|
+
const { value: a, label: l } = J({
|
|
2775
2783
|
fields: t,
|
|
2776
2784
|
values: n,
|
|
2777
2785
|
fieldName: i
|
|
@@ -2786,14 +2794,14 @@ function Ft(i) {
|
|
|
2786
2794
|
t = t.concat(s.entries);
|
|
2787
2795
|
}), t;
|
|
2788
2796
|
}
|
|
2789
|
-
function
|
|
2797
|
+
function fe({
|
|
2790
2798
|
yAxis: i,
|
|
2791
2799
|
fields: t
|
|
2792
2800
|
}) {
|
|
2793
2801
|
const e = t[i.name];
|
|
2794
2802
|
return e != null && e.string ? e.string : i.name;
|
|
2795
2803
|
}
|
|
2796
|
-
function
|
|
2804
|
+
function ge(i, t = 0.1) {
|
|
2797
2805
|
if (i.length === 0)
|
|
2798
2806
|
throw new Error("The values array cannot be empty.");
|
|
2799
2807
|
const e = i.map((l) => l.value), s = Math.min(...e), n = Math.max(...e), a = (n - s) * t;
|
|
@@ -2805,64 +2813,64 @@ function fe(i, t = 0.1) {
|
|
|
2805
2813
|
const jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2806
2814
|
__proto__: null,
|
|
2807
2815
|
getAllObjectsInGroupedValues: Ft,
|
|
2808
|
-
getMinMax:
|
|
2816
|
+
getMinMax: ge,
|
|
2809
2817
|
getValueForOperator: Y,
|
|
2810
2818
|
getValuesForYField: N,
|
|
2811
2819
|
getValuesGroupedByField: B,
|
|
2812
|
-
getYAxisFieldname:
|
|
2820
|
+
getYAxisFieldname: fe,
|
|
2813
2821
|
labelsForOperator: wt,
|
|
2814
2822
|
processGraphData: vt
|
|
2815
2823
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2816
2824
|
export {
|
|
2817
2825
|
Xe as Alert,
|
|
2818
|
-
|
|
2826
|
+
Pe as Avatar,
|
|
2819
2827
|
Ae as Binary,
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2828
|
+
ie as Boolean,
|
|
2829
|
+
te as Button,
|
|
2830
|
+
Te as ButtonGroup,
|
|
2823
2831
|
Ze as Carousel,
|
|
2824
2832
|
A as Char,
|
|
2825
|
-
|
|
2833
|
+
ne as CodeEditor,
|
|
2826
2834
|
et as ColorPicker,
|
|
2827
2835
|
Ue as Comments,
|
|
2828
2836
|
V as Container,
|
|
2829
2837
|
w as ContainerWidget,
|
|
2830
2838
|
Vt as Dashboard,
|
|
2831
2839
|
lt as DashboardItem,
|
|
2832
|
-
|
|
2840
|
+
$ as Date,
|
|
2833
2841
|
De as DateTime,
|
|
2834
2842
|
Ke as Email,
|
|
2835
|
-
|
|
2843
|
+
g as Field,
|
|
2836
2844
|
R as Float,
|
|
2837
2845
|
Se as FloatTime,
|
|
2838
2846
|
Tt as Form,
|
|
2839
|
-
|
|
2840
|
-
|
|
2847
|
+
ce as Graph,
|
|
2848
|
+
de as GraphAxis,
|
|
2841
2849
|
j as GraphChart,
|
|
2842
|
-
|
|
2850
|
+
ue as GraphIndicator,
|
|
2843
2851
|
ot as GraphIndicatorField,
|
|
2844
2852
|
ht as GraphXAxis,
|
|
2845
2853
|
dt as GraphYAxis,
|
|
2846
|
-
|
|
2847
|
-
|
|
2854
|
+
We as Group,
|
|
2855
|
+
Ve as HTMLPreview,
|
|
2848
2856
|
Ne as Image,
|
|
2849
2857
|
Ge as Indicator,
|
|
2850
2858
|
Ee as Integer,
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2859
|
+
Q as JSONField,
|
|
2860
|
+
ee as Label,
|
|
2861
|
+
ze as Many2one,
|
|
2854
2862
|
Ie as Markdown,
|
|
2855
|
-
|
|
2856
|
-
|
|
2863
|
+
re as MultiCheckbox,
|
|
2864
|
+
Z as NewLine,
|
|
2857
2865
|
M as Notebook,
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2866
|
+
se as One2many,
|
|
2867
|
+
Oe as Page,
|
|
2868
|
+
Ye as ProgressBar,
|
|
2861
2869
|
qe as Radio,
|
|
2862
2870
|
Me as Reference,
|
|
2863
2871
|
at as SearchFieldTypes,
|
|
2864
|
-
|
|
2865
|
-
|
|
2872
|
+
It as SearchFilter,
|
|
2873
|
+
z as Selection,
|
|
2866
2874
|
je as Separator,
|
|
2867
2875
|
L as Spinner,
|
|
2868
2876
|
He as Steps,
|
|
@@ -2872,14 +2880,14 @@ export {
|
|
|
2872
2880
|
G as Text,
|
|
2873
2881
|
Qe as Time,
|
|
2874
2882
|
Le as Timeline,
|
|
2875
|
-
|
|
2883
|
+
zt as Tree,
|
|
2876
2884
|
C as Widget,
|
|
2877
2885
|
Dt as graphFieldUtils,
|
|
2878
2886
|
jt as graphProcessor,
|
|
2879
|
-
|
|
2887
|
+
ae as parseContext,
|
|
2880
2888
|
Wt as parseContextFields,
|
|
2881
|
-
|
|
2889
|
+
St as parseDomainFields,
|
|
2882
2890
|
Yt as parseGraph,
|
|
2883
|
-
|
|
2891
|
+
Et as transformDomainForChildWidget
|
|
2884
2892
|
};
|
|
2885
2893
|
//# sourceMappingURL=ooui.es.js.map
|