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