@conduction/nextcloud-vue 2.186.0 → 2.187.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/components/CnChartWidget/CnChartWidget.vue.js +1 -1
- package/dist/esm/components/CnChartWidget/CnChartWidget2.vue.js +58 -0
- package/dist/esm/components/CnChartWidget/CnChartWidget2.vue.js.map +1 -1
- package/dist/esm/components/CnChartWidget/CnChartWidget3.vue.js +2 -2
- package/dist/esm/components/CnChartWidget/CnChartWidget3.vue.js.map +1 -1
- package/dist/esm/components/CnPeopleWidget/CnPeopleWidget.vue.js +1 -1
- package/dist/esm/components/CnPeopleWidget/CnPeopleWidget2.vue.js +281 -27
- package/dist/esm/components/CnPeopleWidget/CnPeopleWidget2.vue.js.map +1 -1
- package/dist/esm/components/CnPeopleWidget/CnPeopleWidget3.vue.js +86 -33
- package/dist/esm/components/CnPeopleWidget/CnPeopleWidget3.vue.js.map +1 -1
- package/dist/esm/components/CnPeopleWidget/peopleCache.js +76 -0
- package/dist/esm/components/CnPeopleWidget/peopleCache.js.map +1 -0
- package/dist/esm/components/CnPeopleWidgetForm/CnPeopleWidgetForm.vue.js +1 -1
- package/dist/esm/components/CnPeopleWidgetForm/CnPeopleWidgetForm2.vue.js +40 -9
- package/dist/esm/components/CnPeopleWidgetForm/CnPeopleWidgetForm2.vue.js.map +1 -1
- package/dist/esm/components/CnPeopleWidgetForm/CnPeopleWidgetForm3.vue.js +35 -26
- package/dist/esm/components/CnPeopleWidgetForm/CnPeopleWidgetForm3.vue.js.map +1 -1
- package/dist/esm/components/CnTextWidget/CnTextWidget.vue.js +1 -1
- package/dist/esm/components/CnTextWidget/CnTextWidget2.vue.js +32 -12
- package/dist/esm/components/CnTextWidget/CnTextWidget2.vue.js.map +1 -1
- package/dist/esm/components/CnTextWidget/CnTextWidget3.vue.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +4 -0
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +206 -150
- package/dist/nextcloud-vue.cjs.js +1366 -864
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +206 -150
- package/l10n/nl.json +4 -0
- package/package.json +1 -1
- package/src/components/CnChartWidget/CnChartWidget.vue +60 -2
- package/src/components/CnPeopleWidget/CnPeopleWidget.vue +402 -56
- package/src/components/CnPeopleWidget/peopleCache.js +73 -0
- package/src/components/CnPeopleWidgetForm/CnPeopleWidgetForm.vue +45 -11
- package/src/components/CnTextWidget/CnTextWidget.vue +32 -12
|
@@ -2,7 +2,7 @@ import script from './CnChartWidget2.vue.js';
|
|
|
2
2
|
import { render } from './CnChartWidget3.vue.js';
|
|
3
3
|
|
|
4
4
|
script.render = render;
|
|
5
|
-
script.__scopeId = "data-v-
|
|
5
|
+
script.__scopeId = "data-v-4af6d548";
|
|
6
6
|
const __sfc_main = script;
|
|
7
7
|
|
|
8
8
|
export { __sfc_main as default };
|
|
@@ -905,6 +905,13 @@ var script = {
|
|
|
905
905
|
// once at creation (data, not computed — matches the dashboard
|
|
906
906
|
// date-chip convention).
|
|
907
907
|
viewsGroupLabel: translate('nextcloud-vue', 'Chart view'),
|
|
908
|
+
// What the apexcharts wrapper is bound to: one raw object and one raw
|
|
909
|
+
// array, kept equal to `mergedOptions` / `plottedSeries` by filling
|
|
910
|
+
// them in place. The wrapper builds a chart from them (on mount and
|
|
911
|
+
// on its own type / size rebuilds) but never sees them change, so
|
|
912
|
+
// its watchers never fire; `updateChart` updates the live chart.
|
|
913
|
+
apexOptions: markRaw({}),
|
|
914
|
+
apexSeries: markRaw([]),
|
|
908
915
|
}
|
|
909
916
|
},
|
|
910
917
|
|
|
@@ -1712,6 +1719,16 @@ var script = {
|
|
|
1712
1719
|
})
|
|
1713
1720
|
},
|
|
1714
1721
|
|
|
1722
|
+
/**
|
|
1723
|
+
* The options and series the chart draws, as one value, so a data
|
|
1724
|
+
* change that moves both reaches the chart as one update.
|
|
1725
|
+
*
|
|
1726
|
+
* @return {Array} `[mergedOptions, plottedSeries]`.
|
|
1727
|
+
*/
|
|
1728
|
+
chartPayload() {
|
|
1729
|
+
return [this.mergedOptions, this.plottedSeries]
|
|
1730
|
+
},
|
|
1731
|
+
|
|
1715
1732
|
mergedOptions() {
|
|
1716
1733
|
const isPieType = ['pie', 'donut', 'radialBar'].includes(this.type);
|
|
1717
1734
|
|
|
@@ -1881,6 +1898,10 @@ var script = {
|
|
|
1881
1898
|
},
|
|
1882
1899
|
|
|
1883
1900
|
watch: {
|
|
1901
|
+
chartPayload() {
|
|
1902
|
+
this.updateChart();
|
|
1903
|
+
},
|
|
1904
|
+
|
|
1884
1905
|
groupByKey() {
|
|
1885
1906
|
this.fetchGroupBy();
|
|
1886
1907
|
},
|
|
@@ -1901,6 +1922,7 @@ var script = {
|
|
|
1901
1922
|
created() {
|
|
1902
1923
|
// markRaw: `data()` is deeply reactive and would proxy the component.
|
|
1903
1924
|
this.chartComponent = markRaw(m);
|
|
1925
|
+
this.syncChartBinding();
|
|
1904
1926
|
},
|
|
1905
1927
|
|
|
1906
1928
|
mounted() {
|
|
@@ -2034,6 +2056,42 @@ var script = {
|
|
|
2034
2056
|
}
|
|
2035
2057
|
},
|
|
2036
2058
|
|
|
2059
|
+
/**
|
|
2060
|
+
* Fill the wrapper's bound options and series with the current ones,
|
|
2061
|
+
* in place, so a chart the wrapper (re)builds starts from them.
|
|
2062
|
+
*
|
|
2063
|
+
* @return {void}
|
|
2064
|
+
*/
|
|
2065
|
+
syncChartBinding() {
|
|
2066
|
+
const options = this.apexOptions;
|
|
2067
|
+
for (const key of Object.keys(options)) {
|
|
2068
|
+
delete options[key];
|
|
2069
|
+
}
|
|
2070
|
+
Object.assign(options, this.mergedOptions);
|
|
2071
|
+
const series = this.plottedSeries;
|
|
2072
|
+
this.apexSeries.splice(0, this.apexSeries.length, ...(Array.isArray(series) ? series : []));
|
|
2073
|
+
},
|
|
2074
|
+
|
|
2075
|
+
/**
|
|
2076
|
+
* Show new options and series in the live chart as one in-place,
|
|
2077
|
+
* unanimated `updateOptions`, instead of the wrapper's
|
|
2078
|
+
* `updateOptions` + `updateSeries` pair: every ApexCharts update clears
|
|
2079
|
+
* and redraws the whole SVG and measures each label again, which on a
|
|
2080
|
+
* full dashboard page costs far more than the data change itself. The
|
|
2081
|
+
* entry animation on first draw is unaffected. ApexCharts skips a
|
|
2082
|
+
* payload identical to the last one.
|
|
2083
|
+
*
|
|
2084
|
+
* @return {void}
|
|
2085
|
+
*/
|
|
2086
|
+
updateChart() {
|
|
2087
|
+
this.syncChartBinding();
|
|
2088
|
+
const apex = this.$refs.chart?.chart;
|
|
2089
|
+
if (typeof apex?.updateOptions !== 'function') {
|
|
2090
|
+
return
|
|
2091
|
+
}
|
|
2092
|
+
apex.updateOptions({ ...this.mergedOptions, series: this.plottedSeries }, false, false);
|
|
2093
|
+
},
|
|
2094
|
+
|
|
2037
2095
|
/**
|
|
2038
2096
|
* Re-measure and redraw the chart after its box changed size, without
|
|
2039
2097
|
* rebuilding it.
|