@conduction/nextcloud-vue 2.127.0 → 2.128.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/CnDashboardPage/CnDashboardPage.vue.js +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +3 -113
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +12 -12
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js +34 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js +16 -8
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +153 -8
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js +169 -58
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
- package/dist/esm/components/CnTileWidget/CnTileWidget.vue.js +1 -1
- package/dist/esm/components/CnTileWidget/CnTileWidget.vue2.js +11 -0
- package/dist/esm/components/CnTileWidget/CnTileWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnTileWidget/CnTileWidget.vue3.js +14 -4
- package/dist/esm/components/CnTileWidget/CnTileWidget.vue3.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/mixins/pageFilters.js +142 -0
- package/dist/esm/mixins/pageFilters.js.map +1 -0
- package/dist/esm/nextcloud-vue.css +269 -74
- package/dist/esm/utils/actionLink.js +9 -3
- package/dist/esm/utils/actionLink.js.map +1 -1
- package/dist/esm/utils/validateManifestV2.compiled.js +3 -3
- package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +1176 -828
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +269 -74
- package/package.json +1 -1
- package/src/components/CnDashboardPage/CnDashboardPage.vue +3 -113
- package/src/components/CnDataTable/CnDataTable.vue +40 -1
- package/src/components/CnDetailPage/CnDetailPage.md +2 -0
- package/src/components/CnDetailPage/CnDetailPage.vue +237 -8
- package/src/components/CnTileWidget/CnTileWidget.vue +30 -2
- package/src/css/detail-page.css +42 -0
- package/src/css/dialog.css +13 -0
- package/src/css/look-board-detail.css +1 -1
- package/src/css/look-board-index.css +8 -0
- package/src/css/look-board.css +97 -0
- package/src/css/table.css +12 -0
- package/src/mixins/pageFilters.js +138 -0
- package/src/schemas/app-manifest-v2.schema.json +41 -3
- package/src/utils/actionLink.js +9 -3
- package/src/utils/validateManifestV2.compiled.js +3 -3
|
@@ -2,7 +2,7 @@ import script from './CnDashboardPage.vue2.js';
|
|
|
2
2
|
import { render } from './CnDashboardPage.vue3.js';
|
|
3
3
|
|
|
4
4
|
script.render = render;
|
|
5
|
-
script.__scopeId = "data-v-
|
|
5
|
+
script.__scopeId = "data-v-2853e370";
|
|
6
6
|
const __sfc_main = script;
|
|
7
7
|
|
|
8
8
|
export { __sfc_main as default };
|
|
@@ -30,6 +30,7 @@ import { interpolateUrlTokens } from '../../utils/interpolateUrlTokens.js';
|
|
|
30
30
|
import { resolveFilterValue, isOptionalUnresolved } from '../../utils/resolveFilterTokens.js';
|
|
31
31
|
import { useIntegrationRegistry } from '../../composables/useIntegrationRegistry.js';
|
|
32
32
|
import { normalizeLook } from '../../composables/useLook.js';
|
|
33
|
+
import { pageFilters } from '../../mixins/pageFilters.js';
|
|
33
34
|
import { pageViews } from '../../mixins/pageViews.js';
|
|
34
35
|
import { mergeUserLayout, resolveUserLayoutApi } from '../../store/plugins/dashboardLayouts.js';
|
|
35
36
|
import { headerActionAsLink } from '../../utils/actionLink.js';
|
|
@@ -37,8 +38,6 @@ import { dispatchAction } from '../../utils/actionsDispatcher.js';
|
|
|
37
38
|
import { isAppInstalled } from '../../utils/appInstalled.js';
|
|
38
39
|
import { contentHeaderLink } from '../../utils/contentHeaderLink.js';
|
|
39
40
|
import { pickDeclaredProps } from '../../utils/declaredProps.js';
|
|
40
|
-
import { isOptionsFrom, loadOptionsFrom } from '../../utils/optionsFrom.js';
|
|
41
|
-
import { generatedPageFilterOptions } from '../../utils/periodOptions.js';
|
|
42
41
|
import { userLocale } from '../../utils/userLocale.js';
|
|
43
42
|
import { isWorkspaceCondition, evaluateWorkspaceCondition, readVisibleWhenValue, compareVisibleWhen } from '../../utils/visibleWhen.js';
|
|
44
43
|
import { resolveWidgetHeaderActions } from '../../utils/widgetHeaderActions.js';
|
|
@@ -266,7 +265,7 @@ var script = {
|
|
|
266
265
|
CnWidgetIcon: __sfc_main$i,
|
|
267
266
|
},
|
|
268
267
|
|
|
269
|
-
mixins: [pageViews],
|
|
268
|
+
mixins: [pageFilters, pageViews],
|
|
270
269
|
|
|
271
270
|
inject: {
|
|
272
271
|
/**
|
|
@@ -1066,10 +1065,6 @@ var script = {
|
|
|
1066
1065
|
|
|
1067
1066
|
data() {
|
|
1068
1067
|
return {
|
|
1069
|
-
/** Options read through a page filter's `optionsFrom`, by filter key. */
|
|
1070
|
-
pageFilterFetched: {},
|
|
1071
|
-
/** Whether a page filter's `optionsFrom` read is in flight, by filter key. */
|
|
1072
|
-
pageFilterLoading: {},
|
|
1073
1068
|
isEditing: false,
|
|
1074
1069
|
/**
|
|
1075
1070
|
* This user's arranged layout, when `userLayout` is on.
|
|
@@ -2035,112 +2030,6 @@ var script = {
|
|
|
2035
2030
|
},
|
|
2036
2031
|
|
|
2037
2032
|
methods: {
|
|
2038
|
-
/**
|
|
2039
|
-
* Seed the reactive workspace context with each page filter's default
|
|
2040
|
-
* (its `default`, else the first option's value) so endpoint-bound
|
|
2041
|
-
* widgets have a value to interpolate on first render. Only writes keys
|
|
2042
|
-
* that aren't already present, so a value another widget set survives.
|
|
2043
|
-
*
|
|
2044
|
-
* @return {void}
|
|
2045
|
-
*/
|
|
2046
|
-
initPageFilters() {
|
|
2047
|
-
for (const pf of this.pageFilters || []) {
|
|
2048
|
-
if (!pf || !pf.key) {
|
|
2049
|
-
continue
|
|
2050
|
-
}
|
|
2051
|
-
if (this.workspaceContext[pf.key] !== undefined) {
|
|
2052
|
-
continue
|
|
2053
|
-
}
|
|
2054
|
-
const listed = Array.isArray(pf.options) ? pf.options : generatedPageFilterOptions(pf);
|
|
2055
|
-
const fallback = (listed && listed.length && pf.clearable !== true) ? listed[0].value : undefined;
|
|
2056
|
-
const value = pf.default !== undefined ? pf.default : fallback;
|
|
2057
|
-
if (value !== undefined) {
|
|
2058
|
-
this.workspaceContext[pf.key] = value;
|
|
2059
|
-
}
|
|
2060
|
-
}
|
|
2061
|
-
},
|
|
2062
|
-
|
|
2063
|
-
/**
|
|
2064
|
-
* The currently-selected option object for a page filter's NcSelect
|
|
2065
|
-
* (matched by `value` against the workspace context), or null.
|
|
2066
|
-
*
|
|
2067
|
-
* @param {object} pf The page-filter descriptor.
|
|
2068
|
-
* @return {object|null}
|
|
2069
|
-
*/
|
|
2070
|
-
selectedPageFilterOption(pf) {
|
|
2071
|
-
if (!pf || !pf.key) {
|
|
2072
|
-
return null
|
|
2073
|
-
}
|
|
2074
|
-
const current = this.workspaceContext[pf.key];
|
|
2075
|
-
return this.pageFilterSegments(pf).find((o) => o.value === current) || null
|
|
2076
|
-
},
|
|
2077
|
-
|
|
2078
|
-
/**
|
|
2079
|
-
* A page filter's options, labels through the host translate: the
|
|
2080
|
-
* segments of a segmented filter and the options of a select.
|
|
2081
|
-
*
|
|
2082
|
-
* @spec openspec/changes/dashboard-board-termijnen/specs/dashboard-page/spec.md#requirement-a-page-filter-as-a-segmented-group-on-the-description-line
|
|
2083
|
-
* @param {object} pf The page-filter descriptor.
|
|
2084
|
-
* @return {Array<{value: (string|number), label: string}>}
|
|
2085
|
-
*/
|
|
2086
|
-
pageFilterSegments(pf) {
|
|
2087
|
-
const options = Array.isArray(pf.options) ? pf.options : (generatedPageFilterOptions(pf) || this.pageFilterFetched[pf.key] || []);
|
|
2088
|
-
return options.map((o) => ({ value: o.value, label: o.label ? this.effectiveTranslate(o.label) : String(o.value) }))
|
|
2089
|
-
},
|
|
2090
|
-
|
|
2091
|
-
/**
|
|
2092
|
-
* Read the options of every page filter with `optionsFrom`, then seed
|
|
2093
|
-
* a filter that is not clearable with its first option when it has no
|
|
2094
|
-
* value yet.
|
|
2095
|
-
*
|
|
2096
|
-
* @spec openspec/changes/page-filter-options-from/specs/dashboard-page/spec.md#requirement-a-page-filter-can-read-its-options
|
|
2097
|
-
* @return {Promise<void>}
|
|
2098
|
-
*/
|
|
2099
|
-
async loadPageFilterOptions() {
|
|
2100
|
-
const ctx = { workspace: this.workspaceContext || {} };
|
|
2101
|
-
await Promise.all((this.pageFilters || [])
|
|
2102
|
-
.filter((pf) => pf && pf.key && !Array.isArray(pf.options) && pf.optionsFrom && typeof pf.optionsFrom === 'object')
|
|
2103
|
-
.map(async (pf) => {
|
|
2104
|
-
const from = pf.optionsFrom;
|
|
2105
|
-
if (!isOptionsFrom(from)) {
|
|
2106
|
-
return
|
|
2107
|
-
}
|
|
2108
|
-
this.pageFilterLoading = { ...this.pageFilterLoading, [pf.key]: true };
|
|
2109
|
-
let options;
|
|
2110
|
-
try {
|
|
2111
|
-
options = (await loadOptionsFrom(from, ctx)).map((o) => ({ value: o.id, label: o.label }));
|
|
2112
|
-
} catch {
|
|
2113
|
-
options = [];
|
|
2114
|
-
}
|
|
2115
|
-
this.pageFilterFetched = { ...this.pageFilterFetched, [pf.key]: options };
|
|
2116
|
-
this.pageFilterLoading = { ...this.pageFilterLoading, [pf.key]: false };
|
|
2117
|
-
if (pf.clearable !== true && pf.default === undefined && this.workspaceContext[pf.key] === undefined && options.length > 0) {
|
|
2118
|
-
this.workspaceContext[pf.key] = options[0].value;
|
|
2119
|
-
}
|
|
2120
|
-
}));
|
|
2121
|
-
},
|
|
2122
|
-
|
|
2123
|
-
/**
|
|
2124
|
-
* Write a page filter's new selection into the reactive workspace
|
|
2125
|
-
* context so every `@page.<key>` / `@workspace.<key>` token re-resolves.
|
|
2126
|
-
*
|
|
2127
|
-
* @param {object} pf The page-filter descriptor.
|
|
2128
|
-
* @param {object|null} option The chosen NcSelect option (`{ value, label }`).
|
|
2129
|
-
* @return {void}
|
|
2130
|
-
*/
|
|
2131
|
-
onPageFilterChange(pf, option) {
|
|
2132
|
-
if (!pf || !pf.key) {
|
|
2133
|
-
return
|
|
2134
|
-
}
|
|
2135
|
-
const value = option && typeof option === 'object' ? option.value : (option ?? null);
|
|
2136
|
-
this.workspaceContext[pf.key] = value;
|
|
2137
|
-
/**
|
|
2138
|
-
* @event page-filter-change Emitted when a page-level filter selection changes.
|
|
2139
|
-
* @type {{ key: string, value: (string|number|null) }}
|
|
2140
|
-
*/
|
|
2141
|
-
this.$emit('page-filter-change', { key: pf.key, value });
|
|
2142
|
-
},
|
|
2143
|
-
|
|
2144
2033
|
/**
|
|
2145
2034
|
* Re-emit the page-level CnActionsMenu `@refresh` to the host,
|
|
2146
2035
|
* passing the synthetic event through so a host listener can
|
|
@@ -3948,6 +3837,7 @@ var script = {
|
|
|
3948
3837
|
// by the modal) must still fall through to content.title, which the
|
|
3949
3838
|
// form validates as required and so is always populated.
|
|
3950
3839
|
title: def.title || c.title,
|
|
3840
|
+
subtitle: c.subtitle ?? def.subtitle,
|
|
3951
3841
|
icon: c.icon ?? def.icon,
|
|
3952
3842
|
iconType: c.iconType ?? def.iconType,
|
|
3953
3843
|
backgroundColor: c.backgroundColor ?? def.backgroundColor,
|