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