@conduction/nextcloud-vue 2.56.0-beta.7 → 2.56.0-beta.9
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 +169 -1
- 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 +88 -4
- 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 +40 -8
- 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/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js +6 -5
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
- package/dist/esm/components/CnHeaderWidget/CnHeaderWidget.vue2.js +3 -1
- package/dist/esm/components/CnHeaderWidget/CnHeaderWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnHeaderWidget/CnHeaderWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnLinkCardsPage/CnLinkCardsPage.vue.js +10 -0
- package/dist/esm/components/CnLinkCardsPage/CnLinkCardsPage.vue.js.map +1 -0
- package/dist/esm/components/CnLinkCardsPage/CnLinkCardsPage.vue2.js +316 -0
- package/dist/esm/components/CnLinkCardsPage/CnLinkCardsPage.vue2.js.map +1 -0
- package/dist/esm/components/CnLinkCardsPage/CnLinkCardsPage.vue3.js +105 -0
- package/dist/esm/components/CnLinkCardsPage/CnLinkCardsPage.vue3.js.map +1 -0
- 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/CnPageRenderer/pageTypes.js +1 -0
- package/dist/esm/components/CnPageRenderer/pageTypes.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/index.js +6 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/l10n/en.json.js +6 -0
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +6 -0
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/nextcloud-vue.css +198 -9
- package/dist/esm/utils/headers.js +28 -2
- package/dist/esm/utils/headers.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 +9162 -8283
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +198 -9
- package/l10n/en.json +6 -0
- package/l10n/nl.json +6 -0
- package/package.json +3 -2
- package/scripts/.jsdoc-baselines.json +1 -0
- package/scripts/manifest-schema-hash.js +41 -0
- package/scripts/record-manifest-schema-hash.js +52 -0
- package/src/components/CnAppNav/CnAppNav.vue +169 -1
- package/src/components/CnBannerWidget/CnBannerWidget.vue +122 -4
- package/src/components/CnBrandStripe/CnBrandStripe.md +16 -0
- package/src/components/CnBrandStripe/CnBrandStripe.vue +58 -5
- package/src/components/CnDashboardPage/CnDashboardPage.vue +40 -8
- package/src/components/CnDataTable/CnDataTable.md +1 -1
- package/src/components/CnDataTable/CnDataTable.vue +42 -17
- package/src/components/CnDetailPage/CnDetailPage.vue +4 -1
- package/src/components/CnHeaderWidget/CnHeaderWidget.vue +3 -1
- package/src/components/CnLinkCardsPage/CnLinkCardsPage.vue +517 -0
- package/src/components/CnLinkCardsPage/index.js +4 -0
- package/src/components/CnObjectSidebar/CnFilesTab.vue +65 -0
- package/src/components/CnPageRenderer/pageTypes.js +1 -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/components/index.js +1 -0
- package/src/css/detail-page.css +10 -2
- package/src/css/table.css +1 -2
- package/src/index.js +7 -0
- package/src/public/index.js +5 -0
- package/src/schemas/app-manifest-v2.schema.json +45 -3
- package/src/types/manifest.d.ts +1 -1
- package/src/utils/headers.js +28 -2
- package/src/utils/validateManifestV2.compiled.js +2 -2
|
@@ -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() {
|
|
@@ -835,11 +930,84 @@ var script = {
|
|
|
835
930
|
return this.effectiveTranslate(item.label)
|
|
836
931
|
},
|
|
837
932
|
|
|
933
|
+
/**
|
|
934
|
+
* Whether a menu entry is the page the reader is on.
|
|
935
|
+
*
|
|
936
|
+
* Two entries may share a route and differ only in `query` ("My
|
|
937
|
+
* work" and "Queue" on one list). The route name alone lit both. An
|
|
938
|
+
* entry with a `query` is active only when the address carries that
|
|
939
|
+
* query; an entry without one steps back when a sibling's query
|
|
940
|
+
* matches, so exactly one of them is marked.
|
|
941
|
+
*
|
|
942
|
+
* On a page below a list where that rule marks nothing, the one
|
|
943
|
+
* entry `subRouteParent` picks is active instead.
|
|
944
|
+
*
|
|
945
|
+
* @param {object} item Menu entry.
|
|
946
|
+
* @return {boolean} True when the entry is the current page.
|
|
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
|
|
949
|
+
*/
|
|
838
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) {
|
|
839
969
|
if (item.href || !item.route) {
|
|
840
970
|
return false
|
|
841
971
|
}
|
|
842
|
-
|
|
972
|
+
if (item.route !== this.activeRouteName) {
|
|
973
|
+
return false
|
|
974
|
+
}
|
|
975
|
+
if (item.query && typeof item.query === 'object') {
|
|
976
|
+
return this.queryMatches(item)
|
|
977
|
+
}
|
|
978
|
+
const siblings = [];
|
|
979
|
+
for (const entry of this.visibleItems) {
|
|
980
|
+
siblings.push(entry, ...this.visibleChildren(entry));
|
|
981
|
+
}
|
|
982
|
+
return !siblings.some((entry) => entry !== item
|
|
983
|
+
&& entry.route === item.route
|
|
984
|
+
&& entry.query && typeof entry.query === 'object'
|
|
985
|
+
&& this.queryMatches(entry))
|
|
986
|
+
},
|
|
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
|
+
|
|
999
|
+
/**
|
|
1000
|
+
* Whether the address carries every key of an entry's `query`.
|
|
1001
|
+
* Values are compared as strings, since an address has no numbers.
|
|
1002
|
+
*
|
|
1003
|
+
* @param {object} item Menu entry with a `query`.
|
|
1004
|
+
* @return {boolean} True when every declared key matches.
|
|
1005
|
+
* @spec openspec/changes/link-cards-page/specs/link-cards-page/spec.md#requirement-menu-entries-that-differ-in-query
|
|
1006
|
+
*/
|
|
1007
|
+
queryMatches(item) {
|
|
1008
|
+
const current = this.$route?.query ?? {};
|
|
1009
|
+
const keys = Object.keys(item.query);
|
|
1010
|
+
return keys.length > 0 && keys.every((key) => String(current[key] ?? '') === String(item.query[key]))
|
|
843
1011
|
},
|
|
844
1012
|
|
|
845
1013
|
/**
|