@conduction/nextcloud-vue 2.56.0-beta.11 → 2.56.0-beta.13
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/CnAppNav/CnAppNav.vue2.js +253 -10
- package/dist/esm/components/CnAppNav/CnAppNav.vue2.js.map +1 -1
- package/dist/esm/components/CnAppNav/CnAppNav.vue3.js +139 -46
- package/dist/esm/components/CnAppNav/CnAppNav.vue3.js.map +1 -1
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue2.js +87 -0
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue2.js.map +1 -1
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue3.js +26 -24
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue3.js.map +1 -1
- package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue2.js +61 -16
- package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue2.js.map +1 -1
- package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue3.js.map +1 -1
- package/dist/esm/components/CnAuditTrailWidget/CnAuditTrailWidget.vue2.js +20 -0
- package/dist/esm/components/CnAuditTrailWidget/CnAuditTrailWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnAuditTrailWidget/CnAuditTrailWidget.vue3.js +3 -2
- package/dist/esm/components/CnAuditTrailWidget/CnAuditTrailWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnBreadcrumbs/CnBreadcrumbs.vue2.js +13 -0
- package/dist/esm/components/CnBreadcrumbs/CnBreadcrumbs.vue2.js.map +1 -1
- package/dist/esm/components/CnBreadcrumbs/CnBreadcrumbs.vue3.js +2 -1
- package/dist/esm/components/CnBreadcrumbs/CnBreadcrumbs.vue3.js.map +1 -1
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js +33 -2
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js.map +1 -1
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue3.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +154 -4
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +555 -480
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnColumnFilterPopover.vue2.js +9 -3
- package/dist/esm/components/CnDataTable/CnColumnFilterPopover.vue2.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnColumnFilterPopover.vue3.js +1 -1
- package/dist/esm/components/CnDataTable/CnColumnFilterPopover.vue3.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js +37 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js +12 -4
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +187 -19
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js +215 -135
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
- package/dist/esm/components/CnFkResolveCell/CnFkResolveCell.vue2.js +3 -1
- package/dist/esm/components/CnFkResolveCell/CnFkResolveCell.vue2.js.map +1 -1
- package/dist/esm/components/CnFormDialog/CnFormDialog.vue2.js +144 -4
- package/dist/esm/components/CnFormDialog/CnFormDialog.vue2.js.map +1 -1
- package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js.map +1 -1
- package/dist/esm/components/CnHeaderWidget/CnHeaderWidget.vue2.js +157 -7
- package/dist/esm/components/CnHeaderWidget/CnHeaderWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnHeaderWidget/CnHeaderWidget.vue3.js +23 -5
- package/dist/esm/components/CnHeaderWidget/CnHeaderWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +30 -0
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +2 -2
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js +5 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue3.js +4 -2
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnSegmentedControl/CnSegmentedControl.vue2.js +11 -0
- package/dist/esm/components/CnSegmentedControl/CnSegmentedControl.vue2.js.map +1 -1
- package/dist/esm/components/CnSegmentedControl/CnSegmentedControl.vue3.js +2 -1
- package/dist/esm/components/CnSegmentedControl/CnSegmentedControl.vue3.js.map +1 -1
- package/dist/esm/components/CnStagesWidget/CnStagesWidget.vue2.js +63 -2
- package/dist/esm/components/CnStagesWidget/CnStagesWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnStagesWidget/CnStagesWidget.vue3.js +96 -37
- package/dist/esm/components/CnStagesWidget/CnStagesWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnStagesWidget/stagesModel.js +5 -2
- package/dist/esm/components/CnStagesWidget/stagesModel.js.map +1 -1
- package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js +74 -5
- package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnStatWidget/CnStatWidget.vue3.js +15 -8
- package/dist/esm/components/CnStatWidget/CnStatWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js +14 -2
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue3.js +2 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue2.js +73 -1
- package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue2.js.map +1 -1
- package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue3.js +14 -2
- package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue3.js.map +1 -1
- package/dist/esm/l10n/en.json.js +5 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +5 -1
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/mixins/pageViews.js +400 -0
- package/dist/esm/mixins/pageViews.js.map +1 -0
- package/dist/esm/nextcloud-vue.css +513 -81
- package/dist/esm/store/useObjectStore.js +118 -33
- package/dist/esm/store/useObjectStore.js.map +1 -1
- package/dist/esm/utils/actionsDispatcher.js +25 -2
- package/dist/esm/utils/actionsDispatcher.js.map +1 -1
- package/dist/esm/utils/columnFilters.js +27 -3
- package/dist/esm/utils/columnFilters.js.map +1 -1
- package/dist/esm/utils/schema.js +40 -2
- package/dist/esm/utils/schema.js.map +1 -1
- package/dist/esm/utils/schemaRefSlug.js +19 -3
- package/dist/esm/utils/schemaRefSlug.js.map +1 -1
- package/dist/esm/utils/validateManifestV2.compiled.js +2 -2
- package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +8858 -6566
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +513 -81
- package/l10n/en.json +5 -0
- package/l10n/nl.json +5 -0
- package/package.json +1 -1
- package/src/components/CnAppNav/CnAppNav.vue +441 -14
- package/src/components/CnAppRoot/CnAppRoot.md +4 -0
- package/src/components/CnAppRoot/CnAppRoot.vue +94 -1
- package/src/components/CnAuditTrailCard/CnAuditTrailCard.vue +61 -16
- package/src/components/CnAuditTrailWidget/CnAuditTrailWidget.vue +22 -1
- package/src/components/CnBreadcrumbs/CnBreadcrumbs.vue +14 -0
- package/src/components/CnCellRenderer/CnCellRenderer.vue +33 -2
- package/src/components/CnDashboardPage/CnDashboardPage.vue +237 -12
- package/src/components/CnDataTable/CnColumnFilterPopover.vue +11 -5
- package/src/components/CnDataTable/CnDataTable.vue +45 -1
- package/src/components/CnDetailPage/CnDetailPage.md +8 -0
- package/src/components/CnDetailPage/CnDetailPage.vue +263 -7
- package/src/components/CnFkResolveCell/CnFkResolveCell.vue +3 -1
- package/src/components/CnFormDialog/CnFormDialog.vue +144 -4
- package/src/components/CnHeaderWidget/CnHeaderWidget.vue +206 -9
- package/src/components/CnIndexPage/CnIndexPage.vue +32 -2
- package/src/components/CnObjectListWidget/CnObjectListWidget.vue +7 -1
- package/src/components/CnSegmentedControl/CnSegmentedControl.md +1 -1
- package/src/components/CnSegmentedControl/CnSegmentedControl.vue +12 -0
- package/src/components/CnStagesWidget/CnStagesWidget.vue +189 -2
- package/src/components/CnStagesWidget/stagesModel.js +5 -2
- package/src/components/CnStatWidget/CnStatWidget.vue +89 -7
- package/src/components/CnTabsWidget/CnTabsWidget.vue +15 -2
- package/src/components/CnWidgetWrapper/CnWidgetWrapper.md +4 -0
- package/src/components/CnWidgetWrapper/CnWidgetWrapper.vue +107 -1
- package/src/css/detail-page.css +37 -4
- package/src/css/kpi-card.css +71 -1
- package/src/css/table.css +18 -6
- package/src/mixins/pageViews.js +396 -0
- package/src/schemas/app-manifest-v2.schema.json +162 -3
- package/src/store/useObjectStore.js +118 -33
- package/src/utils/actionsDispatcher.js +25 -2
- package/src/utils/columnFilters.js +29 -2
- package/src/utils/schema.js +40 -2
- package/src/utils/schemaRefSlug.js +19 -3
- package/src/utils/validateManifestV2.compiled.js +2 -2
package/dist/esm/l10n/nl.json.js
CHANGED
|
@@ -47,6 +47,9 @@ var translations = {
|
|
|
47
47
|
"No integrations available yet.": "Nog geen integraties beschikbaar.",
|
|
48
48
|
"This integration is not available.": "Deze integratie is niet beschikbaar.",
|
|
49
49
|
Integrations: "Integraties",
|
|
50
|
+
View: "Bekijken",
|
|
51
|
+
Views: "Weergaven",
|
|
52
|
+
"current step": "huidige stap",
|
|
50
53
|
"{app} not available": "{app} niet beschikbaar",
|
|
51
54
|
"{app} not configured": "{app} niet geconfigureerd",
|
|
52
55
|
"This integration is not available or not configured yet.": "Deze integratie is nog niet beschikbaar of niet geconfigureerd.",
|
|
@@ -219,7 +222,6 @@ var translations = {
|
|
|
219
222
|
"Drop files here or click to browse": "Sleep bestanden hier of klik om te bladeren",
|
|
220
223
|
Duration: "Duur",
|
|
221
224
|
Edit: "Bewerken",
|
|
222
|
-
View: "Bekijken",
|
|
223
225
|
"Edit {title}": "{title} bewerken",
|
|
224
226
|
"Enter a custom value": "Voer een aangepaste waarde in",
|
|
225
227
|
"Enumeration ({count})": "Opsomming ({count})",
|
|
@@ -403,6 +405,7 @@ var translations = {
|
|
|
403
405
|
Any: "Alle",
|
|
404
406
|
To: "Tot",
|
|
405
407
|
Equals: "Is gelijk aan",
|
|
408
|
+
Contains: "Bevat",
|
|
406
409
|
Clear: "Wissen",
|
|
407
410
|
Apply: "Toepassen",
|
|
408
411
|
"This column cannot list its objects.": "Deze kolom kan zijn objecten niet tonen.",
|
|
@@ -1123,6 +1126,7 @@ var translations = {
|
|
|
1123
1126
|
"The actions of an attention card are declared in the manifest.": "De acties van een aandachtskaart staan in het manifest.",
|
|
1124
1127
|
"An attention card needs a title": "Een aandachtskaart heeft een titel nodig",
|
|
1125
1128
|
"Good morning, {name}": "Goedemorgen, {name}",
|
|
1129
|
+
"This view has no widgets yet.": "Deze weergave heeft nog geen widgets.",
|
|
1126
1130
|
"Good morning": "Goedemorgen",
|
|
1127
1131
|
"Good afternoon, {name}": "Goedemiddag, {name}",
|
|
1128
1132
|
"Good afternoon": "Goedemiddag",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nl.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nl.json.js","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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
import { translate } from '@nextcloud/l10n';
|
|
2
|
+
import { readUserPreference, writeUserPreference, USER_PREFERENCE_STORAGE_PREFIX } from '../composables/useUserPreferences.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* SPDX-FileCopyrightText: 2026 Conduction B.V.
|
|
6
|
+
* SPDX-License-Identifier: EUPL-1.2
|
|
7
|
+
*
|
|
8
|
+
* Page views: a few views of one page, each its own widget grid, behind one
|
|
9
|
+
* segmented control ("My work | My team").
|
|
10
|
+
*
|
|
11
|
+
* A page that mixes this in accepts `views` (each `{ id, label, icon?,
|
|
12
|
+
* widgets, layout, emptyText? }`), `defaultView` and `viewsLabel`. It keeps
|
|
13
|
+
* the chosen view, writes it to the address (`?view=<id>`) and to the
|
|
14
|
+
* user's preferences (the server, mirrored in the browser), and provides `cnPageViews` so a greeting header widget on
|
|
15
|
+
* the page can draw the switch instead of the page.
|
|
16
|
+
*
|
|
17
|
+
* Which view opens: the address, then the stored view, then `defaultView`,
|
|
18
|
+
* then the first view. An id that names no view is ignored at every step.
|
|
19
|
+
*
|
|
20
|
+
* Used by CnDashboardPage and CnDetailPage. Each renders the chosen view's
|
|
21
|
+
* `layout` with its own grid, so a view looks exactly like the page's own
|
|
22
|
+
* grid.
|
|
23
|
+
*
|
|
24
|
+
* @mixin pageViews
|
|
25
|
+
* @spec openspec/changes/view-switch-containers/specs/view-switch-containers/spec.md#requirement-a-page-declares-views-that-each-hold-a-widget-grid
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/** The query parameter that carries the chosen view. */
|
|
29
|
+
const PAGE_VIEW_QUERY_KEY = 'view';
|
|
30
|
+
|
|
31
|
+
/** Prefix of the user-preference key; the page id follows it. */
|
|
32
|
+
const PAGE_VIEW_PREFERENCE_PREFIX = 'cn_page_view:';
|
|
33
|
+
|
|
34
|
+
let regionSeq = 0;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Read the browser mirror of a user preference synchronously, so the stored
|
|
38
|
+
* view is on screen from the first frame. Errors read as nothing stored.
|
|
39
|
+
*
|
|
40
|
+
* @param {string} appId The app id.
|
|
41
|
+
* @param {string} key The preference key.
|
|
42
|
+
* @return {string|null} The stored id, or null.
|
|
43
|
+
* @spec openspec/changes/view-switch-containers/specs/view-switch-containers/spec.md#requirement-the-chosen-view-is-linkable-and-remembered
|
|
44
|
+
*/
|
|
45
|
+
function readStoredViewMirror(appId, key) {
|
|
46
|
+
try {
|
|
47
|
+
if (typeof localStorage === 'undefined') {
|
|
48
|
+
return null
|
|
49
|
+
}
|
|
50
|
+
const raw = localStorage.getItem(`${USER_PREFERENCE_STORAGE_PREFIX}${appId}:${key}`);
|
|
51
|
+
if (raw === null || raw === undefined) {
|
|
52
|
+
return null
|
|
53
|
+
}
|
|
54
|
+
const value = JSON.parse(raw);
|
|
55
|
+
return typeof value === 'string' && value !== '' ? value : null
|
|
56
|
+
} catch {
|
|
57
|
+
return null
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const pageViews = {
|
|
62
|
+
inject: {
|
|
63
|
+
/** The host app id, provided by CnAppRoot; keys the stored view. */
|
|
64
|
+
cnPageViewsAppId: { from: 'cnAppId', default: '' },
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
props: {
|
|
68
|
+
/**
|
|
69
|
+
* Views of this page, each its own widget grid behind one segmented
|
|
70
|
+
* control. Each is `{ id, label, icon?, widgets, layout, emptyText? }`:
|
|
71
|
+
* `widgets` and `layout` have the same shape as the page's own. The
|
|
72
|
+
* chosen view renders in a region below the page's own grid. Empty
|
|
73
|
+
* (the default) draws no switch and no region.
|
|
74
|
+
*
|
|
75
|
+
* @type {Array<{id: string, label: string, icon?: string, widgets?: Array<object>, layout?: Array<object>, emptyText?: string}>}
|
|
76
|
+
*/
|
|
77
|
+
views: {
|
|
78
|
+
type: Array,
|
|
79
|
+
default: () => [],
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The id of the view chosen when neither the address nor the browser
|
|
84
|
+
* store names one. Empty chooses the first view.
|
|
85
|
+
*
|
|
86
|
+
* @type {string}
|
|
87
|
+
*/
|
|
88
|
+
defaultView: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: '',
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Accessible name of the view switch (through the host translate
|
|
95
|
+
* function). Empty reads "View".
|
|
96
|
+
*
|
|
97
|
+
* @type {string}
|
|
98
|
+
*/
|
|
99
|
+
viewsLabel: {
|
|
100
|
+
type: String,
|
|
101
|
+
default: '',
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
data() {
|
|
106
|
+
regionSeq += 1;
|
|
107
|
+
return {
|
|
108
|
+
/** The view the user chose in this session, or the stored one. */
|
|
109
|
+
selectedViewId: null,
|
|
110
|
+
/** Whether the user chose a view in this session (a late server read then leaves it alone). */
|
|
111
|
+
viewChosen: false,
|
|
112
|
+
/** Id of the view region, the target of the options' `aria-controls`. */
|
|
113
|
+
viewRegionId: `cn-page-view-region-${regionSeq}`,
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Provide the views to descendants, so a greeting header widget in the
|
|
119
|
+
* page's grid can draw the switch. Getters keep it reactive.
|
|
120
|
+
*
|
|
121
|
+
* @return {object} The provided `cnPageViews`.
|
|
122
|
+
*/
|
|
123
|
+
provide() {
|
|
124
|
+
const vm = this;
|
|
125
|
+
return {
|
|
126
|
+
cnPageViews: {
|
|
127
|
+
get views() { return vm.normalizedViews },
|
|
128
|
+
get activeId() { return vm.activeViewId },
|
|
129
|
+
get regionId() { return vm.viewRegionId },
|
|
130
|
+
select: (id) => vm.selectView(id),
|
|
131
|
+
},
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
computed: {
|
|
136
|
+
/**
|
|
137
|
+
* The declared views in one shape, labels translated. Entries without
|
|
138
|
+
* an id or a label are dropped, as are repeated ids.
|
|
139
|
+
*
|
|
140
|
+
* @return {Array<{id: string, label: string, icon: string, widgets: Array<object>, layout: Array<object>, emptyText: string}>}
|
|
141
|
+
* @spec openspec/changes/view-switch-containers/specs/view-switch-containers/spec.md#requirement-a-page-declares-views-that-each-hold-a-widget-grid
|
|
142
|
+
*/
|
|
143
|
+
normalizedViews() {
|
|
144
|
+
const translate = typeof this.cnTranslate === 'function' ? this.cnTranslate : (key) => key;
|
|
145
|
+
const seen = new Set();
|
|
146
|
+
return (Array.isArray(this.views) ? this.views : [])
|
|
147
|
+
.filter((view) => {
|
|
148
|
+
if (!view || typeof view !== 'object' || view.id === undefined || view.id === null || view.id === '') {
|
|
149
|
+
return false
|
|
150
|
+
}
|
|
151
|
+
if (typeof view.label !== 'string' || view.label === '' || seen.has(String(view.id))) {
|
|
152
|
+
return false
|
|
153
|
+
}
|
|
154
|
+
seen.add(String(view.id));
|
|
155
|
+
return true
|
|
156
|
+
})
|
|
157
|
+
.map((view) => ({
|
|
158
|
+
id: String(view.id),
|
|
159
|
+
label: translate(view.label),
|
|
160
|
+
icon: typeof view.icon === 'string' ? view.icon : '',
|
|
161
|
+
widgets: Array.isArray(view.widgets) ? view.widgets : [],
|
|
162
|
+
layout: Array.isArray(view.layout) ? view.layout : [],
|
|
163
|
+
emptyText: typeof view.emptyText === 'string' && view.emptyText !== '' ? translate(view.emptyText) : '',
|
|
164
|
+
}))
|
|
165
|
+
},
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Whether this page has views.
|
|
169
|
+
*
|
|
170
|
+
* @return {boolean}
|
|
171
|
+
*/
|
|
172
|
+
hasViews() {
|
|
173
|
+
return this.normalizedViews.length > 0
|
|
174
|
+
},
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* The chosen view's id: the address, then this session's or the
|
|
178
|
+
* stored choice, then `defaultView`, then the first view.
|
|
179
|
+
*
|
|
180
|
+
* @return {string|null} The id, or null without views.
|
|
181
|
+
* @spec openspec/changes/view-switch-containers/specs/view-switch-containers/spec.md#requirement-the-chosen-view-is-linkable-and-remembered
|
|
182
|
+
*/
|
|
183
|
+
activeViewId() {
|
|
184
|
+
const views = this.normalizedViews;
|
|
185
|
+
if (views.length === 0) {
|
|
186
|
+
return null
|
|
187
|
+
}
|
|
188
|
+
const known = (id) => id !== null && id !== undefined && views.some((view) => view.id === String(id));
|
|
189
|
+
const fromAddress = this.$route && this.$route.query ? this.$route.query[PAGE_VIEW_QUERY_KEY] : undefined;
|
|
190
|
+
if (known(fromAddress)) {
|
|
191
|
+
return String(fromAddress)
|
|
192
|
+
}
|
|
193
|
+
if (known(this.selectedViewId)) {
|
|
194
|
+
return String(this.selectedViewId)
|
|
195
|
+
}
|
|
196
|
+
if (known(this.defaultView)) {
|
|
197
|
+
return this.defaultView
|
|
198
|
+
}
|
|
199
|
+
return views[0].id
|
|
200
|
+
},
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* The chosen view, or null without views.
|
|
204
|
+
*
|
|
205
|
+
* @return {object|null}
|
|
206
|
+
*/
|
|
207
|
+
activeView() {
|
|
208
|
+
return this.normalizedViews.find((view) => view.id === this.activeViewId) || null
|
|
209
|
+
},
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* The switch's options, for CnSegmentedControl.
|
|
213
|
+
*
|
|
214
|
+
* @return {Array<{value: string, label: string}>}
|
|
215
|
+
*/
|
|
216
|
+
viewSwitchOptions() {
|
|
217
|
+
return this.normalizedViews.map((view) => ({ value: view.id, label: view.label }))
|
|
218
|
+
},
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* The switch's accessible name: `viewsLabel` translated, else "View".
|
|
222
|
+
*
|
|
223
|
+
* @return {string}
|
|
224
|
+
* @spec openspec/changes/view-switch-containers/specs/view-switch-containers/spec.md#requirement-the-view-switch-is-accessible
|
|
225
|
+
*/
|
|
226
|
+
viewSwitchLabel() {
|
|
227
|
+
const translate$1 = typeof this.cnTranslate === 'function' ? this.cnTranslate : (key) => key;
|
|
228
|
+
return this.viewsLabel ? translate$1(this.viewsLabel) : translate('nextcloud-vue', 'Views')
|
|
229
|
+
},
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Whether a greeting header in the page's own widgets draws the
|
|
233
|
+
* switch (an option with a `view`), so the page draws none.
|
|
234
|
+
*
|
|
235
|
+
* @return {boolean}
|
|
236
|
+
* @spec openspec/changes/view-switch-containers/specs/view-switch-containers/spec.md#requirement-a-greeting-header-can-switch-the-pages-views
|
|
237
|
+
*/
|
|
238
|
+
viewSwitchInHeaderWidget() {
|
|
239
|
+
const widgets = Array.isArray(this.widgets) ? this.widgets : [];
|
|
240
|
+
return widgets.some((def) => {
|
|
241
|
+
const options = def && def.content && def.content.views && def.content.views.options;
|
|
242
|
+
return Array.isArray(options) && options.some((option) => option && typeof option.view === 'string' && option.view !== '')
|
|
243
|
+
})
|
|
244
|
+
},
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Whether the page draws the switch itself.
|
|
248
|
+
*
|
|
249
|
+
* @return {boolean}
|
|
250
|
+
*/
|
|
251
|
+
showsPageViewSwitch() {
|
|
252
|
+
return this.hasViews && !this.viewSwitchInHeaderWidget
|
|
253
|
+
},
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* The user-preference key for this page's chosen view.
|
|
257
|
+
*
|
|
258
|
+
* @return {string}
|
|
259
|
+
*/
|
|
260
|
+
viewPreferenceKey() {
|
|
261
|
+
// The page id, else the route name: a detail page's fallback id is
|
|
262
|
+
// its record's title, which would remember a view per record.
|
|
263
|
+
const id = this.pageId || (this.$route && this.$route.name) || this.resolvedPageId || 'page';
|
|
264
|
+
return `${PAGE_VIEW_PREFERENCE_PREFIX}${id}`
|
|
265
|
+
},
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* The app id the stored view is kept under: the page's `appId` prop
|
|
269
|
+
* when it has one, else the app root's.
|
|
270
|
+
*
|
|
271
|
+
* @return {string}
|
|
272
|
+
*/
|
|
273
|
+
viewPreferenceAppId() {
|
|
274
|
+
const own = typeof this.appId === 'string' ? this.appId : '';
|
|
275
|
+
return own || (typeof this.cnPageViewsAppId === 'string' ? this.cnPageViewsAppId : '')
|
|
276
|
+
},
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* The message of the chosen view's empty state.
|
|
280
|
+
*
|
|
281
|
+
* @return {string}
|
|
282
|
+
* @spec openspec/changes/view-switch-containers/specs/view-switch-containers/spec.md#requirement-a-view-with-nothing-to-draw-says-so
|
|
283
|
+
*/
|
|
284
|
+
viewEmptyText() {
|
|
285
|
+
if (this.activeView && this.activeView.emptyText) {
|
|
286
|
+
return this.activeView.emptyText
|
|
287
|
+
}
|
|
288
|
+
return translate('nextcloud-vue', 'This view has no widgets yet.')
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
|
|
292
|
+
created() {
|
|
293
|
+
this.loadStoredView();
|
|
294
|
+
},
|
|
295
|
+
|
|
296
|
+
methods: {
|
|
297
|
+
/**
|
|
298
|
+
* Read the stored view: the browser mirror at once, then the user
|
|
299
|
+
* preference on the server, which wins unless the user already chose.
|
|
300
|
+
*
|
|
301
|
+
* @return {Promise<void>}
|
|
302
|
+
* @spec openspec/changes/view-switch-containers/specs/view-switch-containers/spec.md#requirement-the-chosen-view-is-linkable-and-remembered
|
|
303
|
+
*/
|
|
304
|
+
async loadStoredView() {
|
|
305
|
+
if (!this.hasViews) {
|
|
306
|
+
return
|
|
307
|
+
}
|
|
308
|
+
const appId = this.viewPreferenceAppId;
|
|
309
|
+
const key = this.viewPreferenceKey;
|
|
310
|
+
this.selectedViewId = readStoredViewMirror(appId, key);
|
|
311
|
+
if (!appId) {
|
|
312
|
+
return
|
|
313
|
+
}
|
|
314
|
+
const stored = await readUserPreference(appId, key, null);
|
|
315
|
+
if (!this.viewChosen && typeof stored === 'string' && stored !== '') {
|
|
316
|
+
this.selectedViewId = stored;
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Choose a view: keep it, store it, and write it to the address
|
|
322
|
+
* (replacing the history entry, keeping the other query keys).
|
|
323
|
+
*
|
|
324
|
+
* @param {string} id The view id.
|
|
325
|
+
* @return {void}
|
|
326
|
+
* @spec openspec/changes/view-switch-containers/specs/view-switch-containers/spec.md#requirement-the-chosen-view-is-linkable-and-remembered
|
|
327
|
+
*/
|
|
328
|
+
selectView(id) {
|
|
329
|
+
const view = this.normalizedViews.find((candidate) => candidate.id === String(id));
|
|
330
|
+
if (!view) {
|
|
331
|
+
return
|
|
332
|
+
}
|
|
333
|
+
this.selectedViewId = view.id;
|
|
334
|
+
this.viewChosen = true;
|
|
335
|
+
writeUserPreference(this.viewPreferenceAppId, this.viewPreferenceKey, view.id);
|
|
336
|
+
if (!this.$router || !this.$route) {
|
|
337
|
+
return
|
|
338
|
+
}
|
|
339
|
+
const query = this.$route.query || {};
|
|
340
|
+
if (query[PAGE_VIEW_QUERY_KEY] === view.id) {
|
|
341
|
+
return
|
|
342
|
+
}
|
|
343
|
+
const result = this.$router.replace({ query: { ...query, [PAGE_VIEW_QUERY_KEY]: view.id } });
|
|
344
|
+
if (result && typeof result.catch === 'function') {
|
|
345
|
+
result.catch(() => {});
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Look a widget definition up in the views, for a layout item of the
|
|
351
|
+
* chosen view.
|
|
352
|
+
*
|
|
353
|
+
* @param {string} widgetId The widget id.
|
|
354
|
+
* @return {object|null} The definition, or null.
|
|
355
|
+
*/
|
|
356
|
+
findViewWidget(widgetId) {
|
|
357
|
+
const view = this.activeView;
|
|
358
|
+
if (!view) {
|
|
359
|
+
return null
|
|
360
|
+
}
|
|
361
|
+
return view.widgets.find((def) => def && def.id === widgetId) || null
|
|
362
|
+
},
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Write a drag or resize in the chosen view's grid back onto its
|
|
366
|
+
* layout items in place, as the page does for its own layout, so the
|
|
367
|
+
* in-app manifest editor sees it.
|
|
368
|
+
*
|
|
369
|
+
* @param {Array<object>} updated The layout from the grid.
|
|
370
|
+
* @return {void}
|
|
371
|
+
*/
|
|
372
|
+
onViewLayoutChange(updated) {
|
|
373
|
+
const view = this.activeView;
|
|
374
|
+
if (!view || !Array.isArray(updated)) {
|
|
375
|
+
return
|
|
376
|
+
}
|
|
377
|
+
for (const u of updated) {
|
|
378
|
+
const item = view.layout.find((l) => String(l.id) === String(u.id));
|
|
379
|
+
if (!item) {
|
|
380
|
+
continue
|
|
381
|
+
}
|
|
382
|
+
for (const key of ['gridX', 'gridY', 'gridWidth', 'gridHeight']) {
|
|
383
|
+
if (u[key] !== undefined) {
|
|
384
|
+
item[key] = u[key];
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Emitted when a widget in a view's grid is dragged or resized.
|
|
390
|
+
*
|
|
391
|
+
* @event view-layout-change
|
|
392
|
+
* @type {{view: string, layout: Array<object>}}
|
|
393
|
+
*/
|
|
394
|
+
this.$emit('view-layout-change', { view: view.id, layout: view.layout });
|
|
395
|
+
},
|
|
396
|
+
},
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
export { PAGE_VIEW_PREFERENCE_PREFIX, PAGE_VIEW_QUERY_KEY, pageViews };
|
|
400
|
+
//# sourceMappingURL=pageViews.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageViews.js","sources":["../../../src/mixins/pageViews.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2026 Conduction B.V.\n * SPDX-License-Identifier: EUPL-1.2\n *\n * Page views: a few views of one page, each its own widget grid, behind one\n * segmented control (\"My work | My team\").\n *\n * A page that mixes this in accepts `views` (each `{ id, label, icon?,\n * widgets, layout, emptyText? }`), `defaultView` and `viewsLabel`. It keeps\n * the chosen view, writes it to the address (`?view=<id>`) and to the\n * user's preferences (the server, mirrored in the browser), and provides `cnPageViews` so a greeting header widget on\n * the page can draw the switch instead of the page.\n *\n * Which view opens: the address, then the stored view, then `defaultView`,\n * then the first view. An id that names no view is ignored at every step.\n *\n * Used by CnDashboardPage and CnDetailPage. Each renders the chosen view's\n * `layout` with its own grid, so a view looks exactly like the page's own\n * grid.\n *\n * @mixin pageViews\n * @spec openspec/changes/view-switch-containers/specs/view-switch-containers/spec.md#requirement-a-page-declares-views-that-each-hold-a-widget-grid\n */\nimport { translate as t } from '@nextcloud/l10n'\nimport { readUserPreference, USER_PREFERENCE_STORAGE_PREFIX, writeUserPreference } from '../composables/useUserPreferences.js'\n\n/** The query parameter that carries the chosen view. */\nexport const PAGE_VIEW_QUERY_KEY = 'view'\n\n/** Prefix of the user-preference key; the page id follows it. */\nexport const PAGE_VIEW_PREFERENCE_PREFIX = 'cn_page_view:'\n\nlet regionSeq = 0\n\n/**\n * Read the browser mirror of a user preference synchronously, so the stored\n * view is on screen from the first frame. Errors read as nothing stored.\n *\n * @param {string} appId The app id.\n * @param {string} key The preference key.\n * @return {string|null} The stored id, or null.\n * @spec openspec/changes/view-switch-containers/specs/view-switch-containers/spec.md#requirement-the-chosen-view-is-linkable-and-remembered\n */\nfunction readStoredViewMirror(appId, key) {\n\ttry {\n\t\tif (typeof localStorage === 'undefined') {\n\t\t\treturn null\n\t\t}\n\t\tconst raw = localStorage.getItem(`${USER_PREFERENCE_STORAGE_PREFIX}${appId}:${key}`)\n\t\tif (raw === null || raw === undefined) {\n\t\t\treturn null\n\t\t}\n\t\tconst value = JSON.parse(raw)\n\t\treturn typeof value === 'string' && value !== '' ? value : null\n\t} catch {\n\t\treturn null\n\t}\n}\n\nexport const pageViews = {\n\tinject: {\n\t\t/** The host app id, provided by CnAppRoot; keys the stored view. */\n\t\tcnPageViewsAppId: { from: 'cnAppId', default: '' },\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Views of this page, each its own widget grid behind one segmented\n\t\t * control. Each is `{ id, label, icon?, widgets, layout, emptyText? }`:\n\t\t * `widgets` and `layout` have the same shape as the page's own. The\n\t\t * chosen view renders in a region below the page's own grid. Empty\n\t\t * (the default) draws no switch and no region.\n\t\t *\n\t\t * @type {Array<{id: string, label: string, icon?: string, widgets?: Array<object>, layout?: Array<object>, emptyText?: string}>}\n\t\t */\n\t\tviews: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * The id of the view chosen when neither the address nor the browser\n\t\t * store names one. Empty chooses the first view.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tdefaultView: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Accessible name of the view switch (through the host translate\n\t\t * function). Empty reads \"View\".\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tviewsLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tdata() {\n\t\tregionSeq += 1\n\t\treturn {\n\t\t\t/** The view the user chose in this session, or the stored one. */\n\t\t\tselectedViewId: null,\n\t\t\t/** Whether the user chose a view in this session (a late server read then leaves it alone). */\n\t\t\tviewChosen: false,\n\t\t\t/** Id of the view region, the target of the options' `aria-controls`. */\n\t\t\tviewRegionId: `cn-page-view-region-${regionSeq}`,\n\t\t}\n\t},\n\n\t/**\n\t * Provide the views to descendants, so a greeting header widget in the\n\t * page's grid can draw the switch. Getters keep it reactive.\n\t *\n\t * @return {object} The provided `cnPageViews`.\n\t */\n\tprovide() {\n\t\tconst vm = this\n\t\treturn {\n\t\t\tcnPageViews: {\n\t\t\t\tget views() { return vm.normalizedViews },\n\t\t\t\tget activeId() { return vm.activeViewId },\n\t\t\t\tget regionId() { return vm.viewRegionId },\n\t\t\t\tselect: (id) => vm.selectView(id),\n\t\t\t},\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The declared views in one shape, labels translated. Entries without\n\t\t * an id or a label are dropped, as are repeated ids.\n\t\t *\n\t\t * @return {Array<{id: string, label: string, icon: string, widgets: Array<object>, layout: Array<object>, emptyText: string}>}\n\t\t * @spec openspec/changes/view-switch-containers/specs/view-switch-containers/spec.md#requirement-a-page-declares-views-that-each-hold-a-widget-grid\n\t\t */\n\t\tnormalizedViews() {\n\t\t\tconst translate = typeof this.cnTranslate === 'function' ? this.cnTranslate : (key) => key\n\t\t\tconst seen = new Set()\n\t\t\treturn (Array.isArray(this.views) ? this.views : [])\n\t\t\t\t.filter((view) => {\n\t\t\t\t\tif (!view || typeof view !== 'object' || view.id === undefined || view.id === null || view.id === '') {\n\t\t\t\t\t\treturn false\n\t\t\t\t\t}\n\t\t\t\t\tif (typeof view.label !== 'string' || view.label === '' || seen.has(String(view.id))) {\n\t\t\t\t\t\treturn false\n\t\t\t\t\t}\n\t\t\t\t\tseen.add(String(view.id))\n\t\t\t\t\treturn true\n\t\t\t\t})\n\t\t\t\t.map((view) => ({\n\t\t\t\t\tid: String(view.id),\n\t\t\t\t\tlabel: translate(view.label),\n\t\t\t\t\ticon: typeof view.icon === 'string' ? view.icon : '',\n\t\t\t\t\twidgets: Array.isArray(view.widgets) ? view.widgets : [],\n\t\t\t\t\tlayout: Array.isArray(view.layout) ? view.layout : [],\n\t\t\t\t\temptyText: typeof view.emptyText === 'string' && view.emptyText !== '' ? translate(view.emptyText) : '',\n\t\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * Whether this page has views.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\thasViews() {\n\t\t\treturn this.normalizedViews.length > 0\n\t\t},\n\n\t\t/**\n\t\t * The chosen view's id: the address, then this session's or the\n\t\t * stored choice, then `defaultView`, then the first view.\n\t\t *\n\t\t * @return {string|null} The id, or null without views.\n\t\t * @spec openspec/changes/view-switch-containers/specs/view-switch-containers/spec.md#requirement-the-chosen-view-is-linkable-and-remembered\n\t\t */\n\t\tactiveViewId() {\n\t\t\tconst views = this.normalizedViews\n\t\t\tif (views.length === 0) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst known = (id) => id !== null && id !== undefined && views.some((view) => view.id === String(id))\n\t\t\tconst fromAddress = this.$route && this.$route.query ? this.$route.query[PAGE_VIEW_QUERY_KEY] : undefined\n\t\t\tif (known(fromAddress)) {\n\t\t\t\treturn String(fromAddress)\n\t\t\t}\n\t\t\tif (known(this.selectedViewId)) {\n\t\t\t\treturn String(this.selectedViewId)\n\t\t\t}\n\t\t\tif (known(this.defaultView)) {\n\t\t\t\treturn this.defaultView\n\t\t\t}\n\t\t\treturn views[0].id\n\t\t},\n\n\t\t/**\n\t\t * The chosen view, or null without views.\n\t\t *\n\t\t * @return {object|null}\n\t\t */\n\t\tactiveView() {\n\t\t\treturn this.normalizedViews.find((view) => view.id === this.activeViewId) || null\n\t\t},\n\n\t\t/**\n\t\t * The switch's options, for CnSegmentedControl.\n\t\t *\n\t\t * @return {Array<{value: string, label: string}>}\n\t\t */\n\t\tviewSwitchOptions() {\n\t\t\treturn this.normalizedViews.map((view) => ({ value: view.id, label: view.label }))\n\t\t},\n\n\t\t/**\n\t\t * The switch's accessible name: `viewsLabel` translated, else \"View\".\n\t\t *\n\t\t * @return {string}\n\t\t * @spec openspec/changes/view-switch-containers/specs/view-switch-containers/spec.md#requirement-the-view-switch-is-accessible\n\t\t */\n\t\tviewSwitchLabel() {\n\t\t\tconst translate = typeof this.cnTranslate === 'function' ? this.cnTranslate : (key) => key\n\t\t\treturn this.viewsLabel ? translate(this.viewsLabel) : t('nextcloud-vue', 'Views')\n\t\t},\n\n\t\t/**\n\t\t * Whether a greeting header in the page's own widgets draws the\n\t\t * switch (an option with a `view`), so the page draws none.\n\t\t *\n\t\t * @return {boolean}\n\t\t * @spec openspec/changes/view-switch-containers/specs/view-switch-containers/spec.md#requirement-a-greeting-header-can-switch-the-pages-views\n\t\t */\n\t\tviewSwitchInHeaderWidget() {\n\t\t\tconst widgets = Array.isArray(this.widgets) ? this.widgets : []\n\t\t\treturn widgets.some((def) => {\n\t\t\t\tconst options = def && def.content && def.content.views && def.content.views.options\n\t\t\t\treturn Array.isArray(options) && options.some((option) => option && typeof option.view === 'string' && option.view !== '')\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Whether the page draws the switch itself.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tshowsPageViewSwitch() {\n\t\t\treturn this.hasViews && !this.viewSwitchInHeaderWidget\n\t\t},\n\n\t\t/**\n\t\t * The user-preference key for this page's chosen view.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tviewPreferenceKey() {\n\t\t\t// The page id, else the route name: a detail page's fallback id is\n\t\t\t// its record's title, which would remember a view per record.\n\t\t\tconst id = this.pageId || (this.$route && this.$route.name) || this.resolvedPageId || 'page'\n\t\t\treturn `${PAGE_VIEW_PREFERENCE_PREFIX}${id}`\n\t\t},\n\n\t\t/**\n\t\t * The app id the stored view is kept under: the page's `appId` prop\n\t\t * when it has one, else the app root's.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tviewPreferenceAppId() {\n\t\t\tconst own = typeof this.appId === 'string' ? this.appId : ''\n\t\t\treturn own || (typeof this.cnPageViewsAppId === 'string' ? this.cnPageViewsAppId : '')\n\t\t},\n\n\t\t/**\n\t\t * The message of the chosen view's empty state.\n\t\t *\n\t\t * @return {string}\n\t\t * @spec openspec/changes/view-switch-containers/specs/view-switch-containers/spec.md#requirement-a-view-with-nothing-to-draw-says-so\n\t\t */\n\t\tviewEmptyText() {\n\t\t\tif (this.activeView && this.activeView.emptyText) {\n\t\t\t\treturn this.activeView.emptyText\n\t\t\t}\n\t\t\treturn t('nextcloud-vue', 'This view has no widgets yet.')\n\t\t},\n\t},\n\n\tcreated() {\n\t\tthis.loadStoredView()\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Read the stored view: the browser mirror at once, then the user\n\t\t * preference on the server, which wins unless the user already chose.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/view-switch-containers/specs/view-switch-containers/spec.md#requirement-the-chosen-view-is-linkable-and-remembered\n\t\t */\n\t\tasync loadStoredView() {\n\t\t\tif (!this.hasViews) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst appId = this.viewPreferenceAppId\n\t\t\tconst key = this.viewPreferenceKey\n\t\t\tthis.selectedViewId = readStoredViewMirror(appId, key)\n\t\t\tif (!appId) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst stored = await readUserPreference(appId, key, null)\n\t\t\tif (!this.viewChosen && typeof stored === 'string' && stored !== '') {\n\t\t\t\tthis.selectedViewId = stored\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Choose a view: keep it, store it, and write it to the address\n\t\t * (replacing the history entry, keeping the other query keys).\n\t\t *\n\t\t * @param {string} id The view id.\n\t\t * @return {void}\n\t\t * @spec openspec/changes/view-switch-containers/specs/view-switch-containers/spec.md#requirement-the-chosen-view-is-linkable-and-remembered\n\t\t */\n\t\tselectView(id) {\n\t\t\tconst view = this.normalizedViews.find((candidate) => candidate.id === String(id))\n\t\t\tif (!view) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.selectedViewId = view.id\n\t\t\tthis.viewChosen = true\n\t\t\twriteUserPreference(this.viewPreferenceAppId, this.viewPreferenceKey, view.id)\n\t\t\tif (!this.$router || !this.$route) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst query = this.$route.query || {}\n\t\t\tif (query[PAGE_VIEW_QUERY_KEY] === view.id) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst result = this.$router.replace({ query: { ...query, [PAGE_VIEW_QUERY_KEY]: view.id } })\n\t\t\tif (result && typeof result.catch === 'function') {\n\t\t\t\tresult.catch(() => {})\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Look a widget definition up in the views, for a layout item of the\n\t\t * chosen view.\n\t\t *\n\t\t * @param {string} widgetId The widget id.\n\t\t * @return {object|null} The definition, or null.\n\t\t */\n\t\tfindViewWidget(widgetId) {\n\t\t\tconst view = this.activeView\n\t\t\tif (!view) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn view.widgets.find((def) => def && def.id === widgetId) || null\n\t\t},\n\n\t\t/**\n\t\t * Write a drag or resize in the chosen view's grid back onto its\n\t\t * layout items in place, as the page does for its own layout, so the\n\t\t * in-app manifest editor sees it.\n\t\t *\n\t\t * @param {Array<object>} updated The layout from the grid.\n\t\t * @return {void}\n\t\t */\n\t\tonViewLayoutChange(updated) {\n\t\t\tconst view = this.activeView\n\t\t\tif (!view || !Array.isArray(updated)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tfor (const u of updated) {\n\t\t\t\tconst item = view.layout.find((l) => String(l.id) === String(u.id))\n\t\t\t\tif (!item) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tfor (const key of ['gridX', 'gridY', 'gridWidth', 'gridHeight']) {\n\t\t\t\t\tif (u[key] !== undefined) {\n\t\t\t\t\t\titem[key] = u[key]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t/**\n\t\t\t * Emitted when a widget in a view's grid is dragged or resized.\n\t\t\t *\n\t\t\t * @event view-layout-change\n\t\t\t * @type {{view: string, layout: Array<object>}}\n\t\t\t */\n\t\t\tthis.$emit('view-layout-change', { view: view.id, layout: view.layout })\n\t\t},\n\t},\n}\n"],"names":["translate","t"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACY,MAAC,mBAAmB,GAAG,OAAM;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