@conduction/nextcloud-vue 2.61.0 → 2.62.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/CnAppNav/CnAppNav.vue2.js +128 -0
- package/dist/esm/components/CnAppNav/CnAppNav.vue2.js.map +1 -1
- package/dist/esm/components/CnAppNav/CnAppNav.vue3.js.map +1 -1
- package/dist/esm/components/CnBannerWidget/CnBannerWidget.vue2.js +79 -2
- package/dist/esm/components/CnBannerWidget/CnBannerWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnBannerWidget/CnBannerWidget.vue3.js +38 -25
- package/dist/esm/components/CnBannerWidget/CnBannerWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnBrandStripe/CnBrandStripe.vue2.js +21 -1
- package/dist/esm/components/CnBrandStripe/CnBrandStripe.vue2.js.map +1 -1
- package/dist/esm/components/CnBrandStripe/CnBrandStripe.vue3.js +4 -1
- package/dist/esm/components/CnBrandStripe/CnBrandStripe.vue3.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +30 -6
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js +40 -15
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js +2 -2
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js.map +1 -1
- package/dist/esm/components/CnLinkCardsPage/CnLinkCardsPage.vue2.js.map +1 -1
- package/dist/esm/components/CnLinkCardsPage/CnLinkCardsPage.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js +53 -0
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js +22 -5
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js.map +1 -1
- package/dist/esm/components/CnReportsPage/CnReportsPage.vue2.js.map +1 -1
- package/dist/esm/components/CnReportsPage/CnReportsPage.vue3.js.map +1 -1
- package/dist/esm/components/CnStorePage/CnStorePage.vue2.js.map +1 -1
- package/dist/esm/components/CnStorePage/CnStorePage.vue3.js.map +1 -1
- package/dist/esm/components/CnWikiPage/CnWikiPage.vue2.js.map +1 -1
- package/dist/esm/components/CnWikiPage/CnWikiPage.vue3.js.map +1 -1
- package/dist/esm/l10n/en.json.js +5 -0
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +5 -0
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/nextcloud-vue.css +108 -9
- package/dist/esm/utils/validateManifestV2.compiled.js +1 -1
- package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +857 -490
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +108 -9
- package/l10n/en.json +5 -0
- package/l10n/nl.json +5 -0
- package/package.json +3 -2
- package/scripts/manifest-schema-hash.js +41 -0
- package/scripts/record-manifest-schema-hash.js +52 -0
- package/src/components/CnAppNav/CnAppNav.vue +128 -0
- package/src/components/CnBannerWidget/CnBannerWidget.vue +113 -2
- package/src/components/CnBrandStripe/CnBrandStripe.md +16 -0
- package/src/components/CnBrandStripe/CnBrandStripe.vue +58 -5
- package/src/components/CnDashboardPage/CnDashboardPage.vue +30 -6
- package/src/components/CnDataTable/CnDataTable.md +1 -1
- package/src/components/CnDataTable/CnDataTable.vue +42 -17
- package/src/components/CnLinkCardsPage/CnLinkCardsPage.vue +35 -2
- package/src/components/CnObjectSidebar/CnFilesTab.vue +65 -0
- package/src/components/CnReportsPage/CnReportsPage.vue +7 -0
- package/src/components/CnStorePage/CnStorePage.vue +7 -0
- package/src/components/CnWikiPage/CnWikiPage.vue +7 -0
- package/src/css/table.css +1 -2
- package/src/public/index.js +5 -0
- package/src/schemas/app-manifest-v2.schema.json +1 -1
- package/src/utils/validateManifestV2.compiled.js +1 -1
|
@@ -130,6 +130,18 @@
|
|
|
130
130
|
</template>
|
|
131
131
|
{{ openLabel }}
|
|
132
132
|
</NcActionButton>
|
|
133
|
+
<!-- OpenRegister's Office page applies the object rule:
|
|
134
|
+
update edits, read views, no read is a 404. -->
|
|
135
|
+
<NcActionLink
|
|
136
|
+
v-if="officeOpens(file)"
|
|
137
|
+
:href="officeUrlFor(file)"
|
|
138
|
+
target="_blank"
|
|
139
|
+
:closeAfterClick="true">
|
|
140
|
+
<template #icon>
|
|
141
|
+
<FileDocumentEditOutline :size="20" />
|
|
142
|
+
</template>
|
|
143
|
+
{{ openInOfficeLabel }}
|
|
144
|
+
</NcActionLink>
|
|
133
145
|
<NcActionLink
|
|
134
146
|
v-if="file.id"
|
|
135
147
|
:href="downloadUrlFor(file)"
|
|
@@ -194,6 +206,7 @@
|
|
|
194
206
|
<script>
|
|
195
207
|
import { getCurrentUser } from '@nextcloud/auth'
|
|
196
208
|
import axios from '@nextcloud/axios'
|
|
209
|
+
import { getCapabilities } from '@nextcloud/capabilities'
|
|
197
210
|
import { translate as t } from '@nextcloud/l10n'
|
|
198
211
|
import { generateRemoteUrl, generateUrl } from '@nextcloud/router'
|
|
199
212
|
import {
|
|
@@ -209,6 +222,7 @@ import {
|
|
|
209
222
|
} from '@nextcloud/vue'
|
|
210
223
|
import Delete from 'vue-material-design-icons/Delete.vue'
|
|
211
224
|
import Download from 'vue-material-design-icons/Download.vue'
|
|
225
|
+
import FileDocumentEditOutline from 'vue-material-design-icons/FileDocumentEditOutline.vue'
|
|
212
226
|
import FileOutline from 'vue-material-design-icons/FileOutline.vue'
|
|
213
227
|
import FolderOutline from 'vue-material-design-icons/FolderOutline.vue'
|
|
214
228
|
import InformationOutline from 'vue-material-design-icons/InformationOutline.vue'
|
|
@@ -221,6 +235,23 @@ import { buildHeaders, prefixUrl } from '../../utils/index.js'
|
|
|
221
235
|
import { safeHref } from '../../utils/safeHref.js'
|
|
222
236
|
import { resolveObjectFolder } from '../CnFilesBrowser/filesBrowser.js'
|
|
223
237
|
|
|
238
|
+
/**
|
|
239
|
+
* The mime types Nextcloud Office opens by default for the current person.
|
|
240
|
+
*
|
|
241
|
+
* richdocuments publishes its capabilities only to a person it lets use
|
|
242
|
+
* Office, so an empty list means no Office here, or none for them.
|
|
243
|
+
*
|
|
244
|
+
* @return {Array<string>} The mime types, or an empty list.
|
|
245
|
+
*/
|
|
246
|
+
function readOfficeMimetypes() {
|
|
247
|
+
try {
|
|
248
|
+
const mimetypes = getCapabilities()?.richdocuments?.mimetypes
|
|
249
|
+
return Array.isArray(mimetypes) ? mimetypes.filter((mime) => typeof mime === 'string') : []
|
|
250
|
+
} catch {
|
|
251
|
+
return []
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
224
255
|
export default {
|
|
225
256
|
name: 'CnFilesTab',
|
|
226
257
|
|
|
@@ -237,6 +268,7 @@ export default {
|
|
|
237
268
|
NcLoadingIcon,
|
|
238
269
|
Delete,
|
|
239
270
|
Download,
|
|
271
|
+
FileDocumentEditOutline,
|
|
240
272
|
FileOutline,
|
|
241
273
|
FolderOutline,
|
|
242
274
|
InformationOutline,
|
|
@@ -261,6 +293,13 @@ export default {
|
|
|
261
293
|
noFilesLabel: { type: String, default: () => t('nextcloud-vue', 'No files attached') },
|
|
262
294
|
/** Label for the open/view file action */
|
|
263
295
|
openLabel: { type: String, default: () => t('nextcloud-vue', 'Open') },
|
|
296
|
+
/**
|
|
297
|
+
* Label of the action that opens a document in Nextcloud Office through
|
|
298
|
+
* OpenRegister's Office page. Shown only when Office is there for this
|
|
299
|
+
* person and opens the file's type; the page opens it for editing or
|
|
300
|
+
* read-only by the object's own rule.
|
|
301
|
+
*/
|
|
302
|
+
openInOfficeLabel: { type: String, default: () => t('nextcloud-vue', 'Open in Office') },
|
|
264
303
|
/** Label for the delete action */
|
|
265
304
|
deleteLabel: { type: String, default: () => t('nextcloud-vue', 'Delete') },
|
|
266
305
|
/** What the files browser's root crumb reads; null shows the folder's own name, as the Files app does. */
|
|
@@ -346,6 +385,8 @@ export default {
|
|
|
346
385
|
* @type {HTMLInputElement|null}
|
|
347
386
|
*/
|
|
348
387
|
fileInputEl: null,
|
|
388
|
+
/** The mime types Nextcloud Office opens for this person; empty without Office. */
|
|
389
|
+
officeMimetypes: readOfficeMimetypes(),
|
|
349
390
|
}
|
|
350
391
|
},
|
|
351
392
|
|
|
@@ -702,6 +743,30 @@ export default {
|
|
|
702
743
|
return `${this.apiBase}/files/${encodeURIComponent(String(file.id))}/download`
|
|
703
744
|
},
|
|
704
745
|
|
|
746
|
+
/**
|
|
747
|
+
* Whether Nextcloud Office opens this file for this person.
|
|
748
|
+
*
|
|
749
|
+
* @param {object} file The file row.
|
|
750
|
+
* @return {boolean} true when the Office action applies.
|
|
751
|
+
*/
|
|
752
|
+
officeOpens(file) {
|
|
753
|
+
const mime = file.type || file.mimetype || file.mimeType || ''
|
|
754
|
+
return Boolean(file.id) && mime !== '' && this.officeMimetypes.includes(mime)
|
|
755
|
+
},
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* OpenRegister's Office page for a file of this object, which checks the
|
|
759
|
+
* object rule and opens the document editable or read-only.
|
|
760
|
+
*
|
|
761
|
+
* @param {object} file The file row.
|
|
762
|
+
* @return {string} The url.
|
|
763
|
+
*/
|
|
764
|
+
officeUrlFor(file) {
|
|
765
|
+
const appBase = /\/api\/?$/.test(this.apiBase) ? this.apiBase.replace(/\/api\/?$/, '') : '/apps/openregister'
|
|
766
|
+
const segments = [this.register, this.schema, this.objectId, String(file.id)].map((part) => encodeURIComponent(String(part)))
|
|
767
|
+
return prefixUrl(`${appBase}/office/${segments.join('/')}`)
|
|
768
|
+
},
|
|
769
|
+
|
|
705
770
|
/**
|
|
706
771
|
* The Files app's permalink for a file: opens the Files app at the
|
|
707
772
|
* file's folder with the file selected.
|
|
@@ -436,6 +436,13 @@ export default {
|
|
|
436
436
|
padding: 16px;
|
|
437
437
|
}
|
|
438
438
|
|
|
439
|
+
/* Clear the Nextcloud navigation toggle button (44px wide, absolutely
|
|
440
|
+
positioned at the left edge of .app-content) plus 12px breathing room, as
|
|
441
|
+
CnPageHeader does. Only the header shifts; the body keeps the full width. */
|
|
442
|
+
.cn-reports-page__header {
|
|
443
|
+
padding-inline-start: 56px;
|
|
444
|
+
}
|
|
445
|
+
|
|
439
446
|
.cn-reports-page__title {
|
|
440
447
|
margin: 0 0 4px;
|
|
441
448
|
}
|
|
@@ -774,6 +774,13 @@ export default {
|
|
|
774
774
|
max-width: 1200px;
|
|
775
775
|
}
|
|
776
776
|
|
|
777
|
+
/* Clear the Nextcloud navigation toggle button (44px wide, absolutely
|
|
778
|
+
positioned at the left edge of .app-content) plus 12px breathing room, as
|
|
779
|
+
CnPageHeader does. Only the header shifts; the body keeps the full width. */
|
|
780
|
+
.cn-store-page__header {
|
|
781
|
+
padding-inline-start: 56px;
|
|
782
|
+
}
|
|
783
|
+
|
|
777
784
|
.cn-store-page__heading {
|
|
778
785
|
display: flex;
|
|
779
786
|
flex-wrap: wrap;
|
|
@@ -418,6 +418,13 @@ export default {
|
|
|
418
418
|
margin-bottom: 16px;
|
|
419
419
|
}
|
|
420
420
|
|
|
421
|
+
/* Without a sidebar the title starts at the left edge of the content, under
|
|
422
|
+
the Nextcloud navigation toggle button (44px wide). Clear it as CnPageHeader
|
|
423
|
+
does. With a sidebar the tree sits there instead and the title is clear. */
|
|
424
|
+
.cn-wiki-page:not(.cn-wiki-page--has-sidebar) .cn-wiki-page__header {
|
|
425
|
+
padding-inline-start: 56px;
|
|
426
|
+
}
|
|
427
|
+
|
|
421
428
|
.cn-wiki-page__title {
|
|
422
429
|
font-size: 1.6em;
|
|
423
430
|
margin: 0;
|
package/src/css/table.css
CHANGED
|
@@ -295,8 +295,7 @@
|
|
|
295
295
|
outline-offset: -2px;
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
-
/* Multi-column sort priority badge (1, 2, 3)
|
|
299
|
-
one sort key is active; a single active sort shows the arrow alone. */
|
|
298
|
+
/* Multi-column sort priority badge (1, 2, 3), rendered only when two or more rendered, sortable columns are sorted. */
|
|
300
299
|
.cn-table-sort-badge {
|
|
301
300
|
display: inline-flex;
|
|
302
301
|
align-items: center;
|
package/src/public/index.js
CHANGED
|
@@ -40,6 +40,10 @@
|
|
|
40
40
|
* claiming purity is worth nothing; the check is in CI.
|
|
41
41
|
*/
|
|
42
42
|
|
|
43
|
+
// The brand stripe imports nothing at all, so it is public-safe as it is: a
|
|
44
|
+
// portal draws the organisation's motif under its header with the same
|
|
45
|
+
// component, and the same tokens, as a Nextcloud page (brand-motif-token).
|
|
46
|
+
import CnBrandStripe from '../components/CnBrandStripe/CnBrandStripe.vue'
|
|
43
47
|
import CnSiteCard from './components/CnSiteCard.vue'
|
|
44
48
|
import CnSiteCardGrid from './components/CnSiteCardGrid.vue'
|
|
45
49
|
import CnSiteEmptyState from './components/CnSiteEmptyState.vue'
|
|
@@ -50,6 +54,7 @@ import CnSiteSearch from './components/CnSiteSearch.vue'
|
|
|
50
54
|
import CnSiteSection from './components/CnSiteSection.vue'
|
|
51
55
|
|
|
52
56
|
export {
|
|
57
|
+
CnBrandStripe,
|
|
53
58
|
CnSiteCard,
|
|
54
59
|
CnSiteCardGrid,
|
|
55
60
|
CnSiteEmptyState,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"$id": "https://raw.githubusercontent.com/ConductionNL/nextcloud-vue/main/src/schemas/app-manifest-v2.schema.json",
|
|
4
4
|
"title": "Conduction App Manifest v2",
|
|
5
5
|
"description": "v2 schema for the JSON-driven page and navigation manifest consumed by @conduction/nextcloud-vue. Introduces a uniform widgets[] array on every page type with a per-slot grid coordinate system, a typed actions[] discriminator, and the required $schema field for version detection. v1 manifests continue to validate against app-manifest.schema.json (unchanged).",
|
|
6
|
-
"version": "2.
|
|
6
|
+
"version": "2.43.0",
|
|
7
7
|
"type": "object",
|
|
8
8
|
"required": ["$schema", "version"],
|
|
9
9
|
"allOf": [
|