@conduction/nextcloud-vue 2.183.0 → 2.185.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 +21 -0
- package/dist/esm/components/CnChartWidget/CnChartWidget2.vue.js.map +1 -1
- package/dist/esm/components/CnChartWidget/CnChartWidget3.vue.js.map +1 -1
- package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget.vue.js +1 -1
- package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget2.vue.js +20 -0
- package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget2.vue.js.map +1 -1
- package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget3.vue.js.map +1 -1
- package/dist/esm/dialogs/CnAddWidgetModal.vue.js +1 -1
- package/dist/esm/dialogs/CnAddWidgetModal2.vue.js +27 -1
- package/dist/esm/dialogs/CnAddWidgetModal2.vue.js.map +1 -1
- package/dist/esm/dialogs/CnAddWidgetModal3.vue.js +38 -19
- package/dist/esm/dialogs/CnAddWidgetModal3.vue.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/mixins/widgetData.js +69 -0
- package/dist/esm/mixins/widgetData.js.map +1 -0
- package/dist/esm/nextcloud-vue.css +111 -105
- package/dist/nextcloud-vue.cjs.js +362 -211
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +111 -105
- package/package.json +1 -1
- package/src/components/CnChartWidget/CnChartWidget.vue +21 -0
- package/src/components/CnStatsBlockWidget/CnStatsBlockWidget.vue +20 -0
- package/src/dialogs/CnAddWidgetModal.vue +50 -1
- package/src/mixins/widgetData.js +66 -0
|
@@ -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-03a0a5bc";
|
|
6
6
|
const __sfc_main = script;
|
|
7
7
|
|
|
8
8
|
export { __sfc_main as default };
|
|
@@ -5,6 +5,7 @@ import { markRaw, inject, ref } from 'vue';
|
|
|
5
5
|
import m from '../../node_modules/vue3-apexcharts/dist/vue3-apexcharts.js';
|
|
6
6
|
import { useDataSource } from '../../composables/useDataSource.js';
|
|
7
7
|
import { getByPath, useEndpointSource } from '../../composables/useEndpointSource.js';
|
|
8
|
+
import widgetData, { seriesTotal } from '../../mixins/widgetData.js';
|
|
8
9
|
import { useObjectStore } from '../../store/useObjectStore.js';
|
|
9
10
|
import { resolveObjectOpType } from '../../utils/actionsDispatcher.js';
|
|
10
11
|
import { fetchReferenceObjects } from '../../utils/boardReferenceColumns.js';
|
|
@@ -261,6 +262,8 @@ var script = {
|
|
|
261
262
|
|
|
262
263
|
components: { CnEndpointNotice: __sfc_main, NcNoteCard },
|
|
263
264
|
|
|
265
|
+
mixins: [widgetData],
|
|
266
|
+
|
|
264
267
|
inject: {
|
|
265
268
|
/**
|
|
266
269
|
* Reactive date-range provided by an ancestor `CnDashboardPage`.
|
|
@@ -1010,6 +1013,24 @@ var script = {
|
|
|
1010
1013
|
return fromDs !== undefined ? fromDs : this.series
|
|
1011
1014
|
},
|
|
1012
1015
|
|
|
1016
|
+
/**
|
|
1017
|
+
* What the chart shows, for the `data` event: its series, categories,
|
|
1018
|
+
* labels and the total of its first series; null until it has a series.
|
|
1019
|
+
*
|
|
1020
|
+
* @return {{series: Array, categories: Array, labels: Array, total: number|null}|null}
|
|
1021
|
+
* @spec openspec/changes/widget-data-event/specs/widget-data-event/spec.md#requirement-a-self-fetching-widget-tells-its-host-what-it-shows
|
|
1022
|
+
*/
|
|
1023
|
+
widgetData() {
|
|
1024
|
+
const series = this.resolvedSeries;
|
|
1025
|
+
if (!Array.isArray(series) || series.length === 0) {
|
|
1026
|
+
return null
|
|
1027
|
+
}
|
|
1028
|
+
const categories = Array.isArray(this.resolvedCategories) ? this.resolvedCategories : [];
|
|
1029
|
+
const rest = this.aggregateData || this.bucketData || this.groupByData;
|
|
1030
|
+
const labels = Array.isArray(rest?.labels) ? rest.labels : (Array.isArray(this.labels) ? this.labels : categories);
|
|
1031
|
+
return { series, categories, labels, total: seriesTotal(series) }
|
|
1032
|
+
},
|
|
1033
|
+
|
|
1013
1034
|
resolvedCategories() {
|
|
1014
1035
|
if (this.cellData) {
|
|
1015
1036
|
return this.cellData.categories
|