@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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { translate } from '@nextcloud/l10n';
|
|
2
2
|
import { generateUrl } from '@nextcloud/router';
|
|
3
3
|
import { NcAppNavigation, NcAppNavigationCaption, NcAppNavigationItem, NcAppNavigationList, NcAppNavigationNew, NcAppNavigationSettings, NcButton, NcCounterBubble } from '@nextcloud/vue';
|
|
4
|
+
import { toRaw } from 'vue';
|
|
4
5
|
import BookOpenVariant from 'vue-material-design-icons/BookOpenVariant.vue';
|
|
5
6
|
import Cog from 'vue-material-design-icons/Cog.vue';
|
|
6
7
|
import HelpCircleOutline from 'vue-material-design-icons/HelpCircleOutline.vue';
|
|
@@ -227,6 +228,13 @@ var script = {
|
|
|
227
228
|
|
|
228
229
|
emits: ['primary-action', 'primary-action-click'],
|
|
229
230
|
|
|
231
|
+
/**
|
|
232
|
+
* The navigation's own state: which groups are open, and which entry
|
|
233
|
+
* of a route the reader last used.
|
|
234
|
+
*
|
|
235
|
+
* @return {object} The state.
|
|
236
|
+
* @spec openspec/changes/live-check-follow-ups/specs/live-check-follow-ups/spec.md#requirement-a-page-below-a-list-marks-one-menu-entry
|
|
237
|
+
*/
|
|
230
238
|
data() {
|
|
231
239
|
return {
|
|
232
240
|
/**
|
|
@@ -240,6 +248,15 @@ var script = {
|
|
|
240
248
|
*/
|
|
241
249
|
openState: {},
|
|
242
250
|
|
|
251
|
+
/**
|
|
252
|
+
* Per route name, the key of the entry that was last active on
|
|
253
|
+
* that route in this session. Read by `subRouteParent` to keep
|
|
254
|
+
* "the list I came from" marked on a page below it. In memory
|
|
255
|
+
* only: a reload starts empty and falls back to menu order.
|
|
256
|
+
*
|
|
257
|
+
* @type {Record<string, string>}
|
|
258
|
+
*/
|
|
259
|
+
lastActiveEntryByRoute: {},
|
|
243
260
|
}
|
|
244
261
|
},
|
|
245
262
|
|
|
@@ -597,6 +614,67 @@ var script = {
|
|
|
597
614
|
}
|
|
598
615
|
return best ?? routeName ?? null
|
|
599
616
|
},
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* Every visible entry and child, flat, in menu order.
|
|
620
|
+
*
|
|
621
|
+
* @return {Array<object>} The entries.
|
|
622
|
+
* @spec openspec/changes/live-check-follow-ups/specs/live-check-follow-ups/spec.md#requirement-a-page-below-a-list-marks-one-menu-entry
|
|
623
|
+
*/
|
|
624
|
+
flatEntries() {
|
|
625
|
+
const flat = [];
|
|
626
|
+
for (const item of this.visibleItems) {
|
|
627
|
+
flat.push(item, ...this.visibleChildren(item));
|
|
628
|
+
}
|
|
629
|
+
return flat
|
|
630
|
+
},
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* The entry the query rule marks while the reader is on a menu
|
|
634
|
+
* route itself (not on a page below it). Watched, so the nav can
|
|
635
|
+
* remember which entry of a route the reader last used.
|
|
636
|
+
*
|
|
637
|
+
* @return {object|null} The entry, or null on a page below a route.
|
|
638
|
+
* @spec openspec/changes/live-check-follow-ups/specs/live-check-follow-ups/spec.md#requirement-a-page-below-a-list-marks-one-menu-entry
|
|
639
|
+
*/
|
|
640
|
+
entryActiveOnOwnRoute() {
|
|
641
|
+
const routeName = this.$route?.name;
|
|
642
|
+
if (!routeName || routeName !== this.activeRouteName) {
|
|
643
|
+
return null
|
|
644
|
+
}
|
|
645
|
+
return this.flatEntries.find((entry) => this.isActiveByRule(entry)) ?? null
|
|
646
|
+
},
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* The one entry to mark on a page BELOW a menu route when the query
|
|
650
|
+
* rule marks none.
|
|
651
|
+
*
|
|
652
|
+
* On a detail page (`/cases/123`) the active route is found by path
|
|
653
|
+
* prefix, and the address carries the detail page's query, not the
|
|
654
|
+
* list's. When every entry on that list has a `query` ("My work",
|
|
655
|
+
* "Queue"), none of them matched and the menu showed no place at
|
|
656
|
+
* all. Marking all of them is the defect the query rule ended, so
|
|
657
|
+
* this picks exactly one: the entry the reader last had active on
|
|
658
|
+
* that route, else the first in menu order.
|
|
659
|
+
*
|
|
660
|
+
* Null whenever the existing rule already marks an entry, so a list
|
|
661
|
+
* with an entry without a `query` behaves as it did.
|
|
662
|
+
*
|
|
663
|
+
* @return {object|null} The entry to mark, or null.
|
|
664
|
+
* @spec openspec/changes/live-check-follow-ups/specs/live-check-follow-ups/spec.md#requirement-a-page-below-a-list-marks-one-menu-entry
|
|
665
|
+
*/
|
|
666
|
+
subRouteParent() {
|
|
667
|
+
const active = this.activeRouteName;
|
|
668
|
+
if (!active || this.$route?.name === active) {
|
|
669
|
+
return null
|
|
670
|
+
}
|
|
671
|
+
const entries = this.flatEntries.filter((entry) => !entry.href && entry.route === active);
|
|
672
|
+
if (entries.length === 0 || entries.some((entry) => this.isActiveByRule(entry))) {
|
|
673
|
+
return null
|
|
674
|
+
}
|
|
675
|
+
const remembered = this.lastActiveEntryByRoute[active];
|
|
676
|
+
return entries.find((entry) => this.entryKey(entry) === remembered) ?? entries[0]
|
|
677
|
+
},
|
|
600
678
|
},
|
|
601
679
|
|
|
602
680
|
watch: {
|
|
@@ -611,6 +689,23 @@ var script = {
|
|
|
611
689
|
visibleItems() {
|
|
612
690
|
this.pinGroupsEntered(this.activeRouteName);
|
|
613
691
|
},
|
|
692
|
+
|
|
693
|
+
entryActiveOnOwnRoute: {
|
|
694
|
+
immediate: true,
|
|
695
|
+
/**
|
|
696
|
+
* Remember which entry of a route the reader used, for
|
|
697
|
+
* `subRouteParent`.
|
|
698
|
+
*
|
|
699
|
+
* @param {object|null} entry The entry active on its own route.
|
|
700
|
+
* @return {void}
|
|
701
|
+
* @spec openspec/changes/live-check-follow-ups/specs/live-check-follow-ups/spec.md#requirement-a-page-below-a-list-marks-one-menu-entry
|
|
702
|
+
*/
|
|
703
|
+
handler(entry) {
|
|
704
|
+
if (entry && entry.route) {
|
|
705
|
+
this.lastActiveEntryByRoute[entry.route] = this.entryKey(entry);
|
|
706
|
+
}
|
|
707
|
+
},
|
|
708
|
+
},
|
|
614
709
|
},
|
|
615
710
|
|
|
616
711
|
created() {
|
|
@@ -844,11 +939,33 @@ var script = {
|
|
|
844
939
|
* query; an entry without one steps back when a sibling's query
|
|
845
940
|
* matches, so exactly one of them is marked.
|
|
846
941
|
*
|
|
942
|
+
* On a page below a list where that rule marks nothing, the one
|
|
943
|
+
* entry `subRouteParent` picks is active instead.
|
|
944
|
+
*
|
|
847
945
|
* @param {object} item Menu entry.
|
|
848
946
|
* @return {boolean} True when the entry is the current page.
|
|
849
947
|
* @spec openspec/changes/link-cards-page/specs/link-cards-page/spec.md#requirement-menu-entries-that-differ-in-query
|
|
948
|
+
* @spec openspec/changes/live-check-follow-ups/specs/live-check-follow-ups/spec.md#requirement-a-page-below-a-list-marks-one-menu-entry
|
|
850
949
|
*/
|
|
851
950
|
isActive(item) {
|
|
951
|
+
if (this.isActiveByRule(item)) {
|
|
952
|
+
return true
|
|
953
|
+
}
|
|
954
|
+
const parent = this.subRouteParent;
|
|
955
|
+
return parent !== null && toRaw(parent) === toRaw(item)
|
|
956
|
+
},
|
|
957
|
+
|
|
958
|
+
/**
|
|
959
|
+
* The route and query rule on its own, without the fallback for a
|
|
960
|
+
* page below a list. `subRouteParent` asks this to see whether the
|
|
961
|
+
* rule already marks an entry.
|
|
962
|
+
*
|
|
963
|
+
* @param {object} item Menu entry.
|
|
964
|
+
* @return {boolean} True when the rule marks the entry.
|
|
965
|
+
* @spec openspec/changes/link-cards-page/specs/link-cards-page/spec.md#requirement-menu-entries-that-differ-in-query
|
|
966
|
+
* @spec openspec/changes/live-check-follow-ups/specs/live-check-follow-ups/spec.md#requirement-a-page-below-a-list-marks-one-menu-entry
|
|
967
|
+
*/
|
|
968
|
+
isActiveByRule(item) {
|
|
852
969
|
if (item.href || !item.route) {
|
|
853
970
|
return false
|
|
854
971
|
}
|
|
@@ -868,6 +985,17 @@ var script = {
|
|
|
868
985
|
&& this.queryMatches(entry))
|
|
869
986
|
},
|
|
870
987
|
|
|
988
|
+
/**
|
|
989
|
+
* What an entry is remembered by: its `id`, else its label.
|
|
990
|
+
*
|
|
991
|
+
* @param {object} item Menu entry.
|
|
992
|
+
* @return {string} The key.
|
|
993
|
+
* @spec openspec/changes/live-check-follow-ups/specs/live-check-follow-ups/spec.md#requirement-a-page-below-a-list-marks-one-menu-entry
|
|
994
|
+
*/
|
|
995
|
+
entryKey(item) {
|
|
996
|
+
return String(item.id ?? item.label ?? '')
|
|
997
|
+
},
|
|
998
|
+
|
|
871
999
|
/**
|
|
872
1000
|
* Whether the address carries every key of an entry's `query`.
|
|
873
1001
|
* Values are compared as strings, since an address has no numbers.
|