glib-web 3.17.0 → 3.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -33,7 +33,7 @@ const singleDataSeries = (dataSeries) => dataSeries.reduce((prev, curr) => Objec
|
|
|
33
33
|
function useChart({ dataSeries, spec, multiple = true }) {
|
|
34
34
|
const isDonut = [spec.styleClasses].flat().includes('donut');
|
|
35
35
|
const { datalabels, centerLabel } = spec.plugins || {};
|
|
36
|
-
const legend =
|
|
36
|
+
const legend = spec.legend || { display: true };
|
|
37
37
|
|
|
38
38
|
let series = null;
|
|
39
39
|
if (multiple) {
|
|
@@ -27,7 +27,7 @@ export default {
|
|
|
27
27
|
}),
|
|
28
28
|
computed: {
|
|
29
29
|
augmentedSpec() {
|
|
30
|
-
const spec = this.spec
|
|
30
|
+
const spec = this.spec;
|
|
31
31
|
|
|
32
32
|
if (spec.autoFocus) {
|
|
33
33
|
let firstAutoFocus = false;
|
|
@@ -44,7 +44,7 @@ export default {
|
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
return spec
|
|
47
|
+
return spec;
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
watch: {
|
|
@@ -92,6 +92,10 @@ export default {
|
|
|
92
92
|
$ready() {
|
|
93
93
|
this.formElement = this.$refs.form.$el;
|
|
94
94
|
|
|
95
|
+
if (this.formElement && this.spec.onChange) {
|
|
96
|
+
this.formElement.onchange = () => GLib.action.execute(this.spec.onChange, this);
|
|
97
|
+
}
|
|
98
|
+
|
|
95
99
|
// this.parentStyles = this.genericStyles({ width: this.spec.width });
|
|
96
100
|
|
|
97
101
|
// const { url: url, params: params } = Utils.url.extractFormActionData(
|
|
@@ -117,6 +121,11 @@ export default {
|
|
|
117
121
|
// });
|
|
118
122
|
// }
|
|
119
123
|
},
|
|
124
|
+
$tearDown() {
|
|
125
|
+
if (this.formElement) {
|
|
126
|
+
this.formElement.onchange = null;
|
|
127
|
+
}
|
|
128
|
+
},
|
|
120
129
|
onSubmit(event) {
|
|
121
130
|
event.preventDefault();
|
|
122
131
|
event.stopPropagation();
|
|
@@ -161,7 +170,7 @@ export default {
|
|
|
161
170
|
} else {
|
|
162
171
|
Utils.launch.dialog.alert("Make sure all fields are valid", this);
|
|
163
172
|
}
|
|
164
|
-
})
|
|
173
|
+
});
|
|
165
174
|
},
|
|
166
175
|
action_clear() {
|
|
167
176
|
this.formElement.reset();
|