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