@conduction/nextcloud-vue 2.112.0 → 2.113.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/CnActionButtons/CnActionButtons.vue.js +1 -1
- package/dist/esm/components/CnActionButtons/CnActionButtons.vue2.js +4 -6
- package/dist/esm/components/CnActionButtons/CnActionButtons.vue2.js.map +1 -1
- package/dist/esm/components/CnActionButtons/CnActionButtons.vue3.js.map +1 -1
- package/dist/esm/components/CnChoiceCards/CnChoiceCards.vue.js +1 -1
- package/dist/esm/components/CnChoiceCards/CnChoiceCards.vue2.js.map +1 -1
- package/dist/esm/components/CnChoiceCards/CnChoiceCards.vue3.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +18 -3
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +2 -2
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +20 -5
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +56 -13
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +5 -3
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnReportsPage/CnReportsPage.vue.js +1 -1
- package/dist/esm/components/CnReportsPage/CnReportsPage.vue2.js +29 -12
- package/dist/esm/components/CnReportsPage/CnReportsPage.vue2.js.map +1 -1
- package/dist/esm/components/CnReportsPage/CnReportsPage.vue3.js +3 -1
- package/dist/esm/components/CnReportsPage/CnReportsPage.vue3.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +152 -181
- package/dist/esm/utils/actionLink.js +104 -1
- 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 +241 -50
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +152 -181
- package/package.json +1 -1
- package/src/components/CnActionButtons/CnActionButtons.vue +4 -6
- package/src/components/CnChoiceCards/CnChoiceCards.vue +0 -3
- package/src/components/CnDashboardPage/CnDashboardPage.vue +20 -5
- package/src/components/CnDetailPage/CnDetailPage.vue +20 -5
- package/src/components/CnIndexPage/CnIndexPage.vue +59 -14
- package/src/components/CnReportsPage/CnReportsPage.vue +31 -12
- package/src/css/badge.css +15 -13
- package/src/css/board.css +0 -1
- package/src/css/look-board-index.css +3 -17
- package/src/css/look-board.css +2 -16
- package/src/schemas/app-manifest-v2.schema.json +51 -9
- package/src/utils/actionLink.js +103 -0
- package/src/utils/validateManifestV2.compiled.js +3 -3
|
@@ -44,6 +44,7 @@ import { useObjectSubscription } from '../../composables/useObjectSubscription.j
|
|
|
44
44
|
import { createRefLabelResolver } from '../../composables/useRefLabels.js';
|
|
45
45
|
import { gridLayout } from '../../mixins/gridLayout.js';
|
|
46
46
|
import { pageViews } from '../../mixins/pageViews.js';
|
|
47
|
+
import { headerActionAsLink } from '../../utils/actionLink.js';
|
|
47
48
|
import { isAppInstalled } from '../../utils/appInstalled.js';
|
|
48
49
|
import { compactLayoutRows } from '../../utils/dashboardPlacement.js';
|
|
49
50
|
import { defaultDetailGrid } from '../../utils/defaultDetailGrid.js';
|
|
@@ -986,6 +987,11 @@ var script = {
|
|
|
986
987
|
* `@objectId` / `@object.<field>` token + local-predicate resolution.
|
|
987
988
|
* Empty (the default) renders nothing.
|
|
988
989
|
*
|
|
990
|
+
* An entry with `href` is a link, never dispatched: an absolute
|
|
991
|
+
* `http(s)`, `mailto:`, `tel:` or `//host/...` URL as written, or an instance path
|
|
992
|
+
* (leading `/`) through `generateUrl()`, opening in place unless
|
|
993
|
+
* `target` is `'_blank'`.
|
|
994
|
+
*
|
|
989
995
|
* The menu, not a row of buttons: that is what the manifest schema has
|
|
990
996
|
* always said this key is, and what CnIndexPage already does with it.
|
|
991
997
|
* The two surfaces had drifted, and on a dossiq case — twelve actions —
|
|
@@ -2708,6 +2714,7 @@ var script = {
|
|
|
2708
2714
|
* in. Edit goes LAST so it reads after the app's own actions in the
|
|
2709
2715
|
* Actions menu — the page's affordance yields to the app's.
|
|
2710
2716
|
*
|
|
2717
|
+
* @spec openspec/changes/header-action-href/specs/header-action-href/spec.md#requirement-a-header-action-with-href-is-a-link-that-runs-and-emits-nothing
|
|
2711
2718
|
* @return {Array<object>} The action descriptors.
|
|
2712
2719
|
*/
|
|
2713
2720
|
effectiveHeaderActions() {
|
|
@@ -2716,12 +2723,16 @@ var script = {
|
|
|
2716
2723
|
// written out in place) join the list CnActionButtons dispatches,
|
|
2717
2724
|
// so they get the same dialogs, toasts and `visibleWhen` gating as
|
|
2718
2725
|
// any header action. An id that is already declared is not added
|
|
2719
|
-
// twice. With nothing pinned inline
|
|
2726
|
+
// twice. With nothing pinned inline and no `href` entry this is
|
|
2727
|
+
// `headerActions` itself.
|
|
2720
2728
|
const known = new Set(authored.map((action) => action && action.id));
|
|
2721
2729
|
const inline = [this.stagePrimary, ...this.pinnedQuickActions]
|
|
2722
2730
|
.filter((pinned) => pinned && pinned.inline && !known.has(pinned.id))
|
|
2723
2731
|
.map((pinned) => pinned.inline);
|
|
2724
|
-
const
|
|
2732
|
+
const combined = inline.length > 0 ? [...authored, ...inline] : authored;
|
|
2733
|
+
// An entry (or child) with `href` becomes a link CnActionButtons renders as an anchor.
|
|
2734
|
+
const linked = combined.map(headerActionAsLink);
|
|
2735
|
+
const declared = linked.some((action, index) => action !== combined[index]) ? linked : combined;
|
|
2725
2736
|
if (!(this.foldsEditIntoActions && this.canEditRecord)) {
|
|
2726
2737
|
return declared
|
|
2727
2738
|
}
|
|
@@ -3965,12 +3976,13 @@ var script = {
|
|
|
3965
3976
|
*
|
|
3966
3977
|
* A stage's action is dispatched the way a header action is, through
|
|
3967
3978
|
* the `run()` CnActionButtons bound for it, and announced to the host
|
|
3968
|
-
* with its declaration. A link action is left to the browser
|
|
3969
|
-
* a stage action this is the page's
|
|
3970
|
-
* before.
|
|
3979
|
+
* with its declaration. A link action is left to the browser and
|
|
3980
|
+
* announces nothing. Without a stage action this is the page's
|
|
3981
|
+
* `primaryAction`, announced as before.
|
|
3971
3982
|
*
|
|
3972
3983
|
* @return {void}
|
|
3973
3984
|
* @spec openspec/changes/detail-action-model-and-case-surfaces/specs/detail-action-model/spec.md#requirement-primary-action-follows-the-stage
|
|
3985
|
+
* @spec openspec/changes/header-action-href/specs/header-action-href/spec.md#requirement-a-header-action-with-href-is-a-link-that-runs-and-emits-nothing
|
|
3974
3986
|
*/
|
|
3975
3987
|
onPrimaryActionClick() {
|
|
3976
3988
|
const entry = this.stagePrimaryEntry;
|
|
@@ -3978,6 +3990,9 @@ var script = {
|
|
|
3978
3990
|
this.$emit('primary-action', this.primaryAction);
|
|
3979
3991
|
return
|
|
3980
3992
|
}
|
|
3993
|
+
if (entry.href) {
|
|
3994
|
+
return
|
|
3995
|
+
}
|
|
3981
3996
|
this.$emit('primary-action', this.headerActionsById[entry.id] || { id: entry.id, label: entry.label });
|
|
3982
3997
|
this.onPinnedActionClick(entry);
|
|
3983
3998
|
},
|