@conduction/nextcloud-vue 2.115.0 → 2.116.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 +92 -0
- package/dist/esm/components/CnActionButtons/CnActionButtons.vue2.js.map +1 -1
- package/dist/esm/components/CnActionButtons/CnActionButtons.vue3.js +2 -2
- package/dist/esm/components/CnActionButtons/CnActionButtons.vue3.js.map +1 -1
- package/dist/esm/components/CnChecklistWidget/CnChecklistWidget.vue.js +9 -0
- package/dist/esm/components/CnChecklistWidget/CnChecklistWidget.vue.js.map +1 -0
- package/dist/esm/components/CnChecklistWidget/CnChecklistWidget.vue2.js +145 -0
- package/dist/esm/components/CnChecklistWidget/CnChecklistWidget.vue2.js.map +1 -0
- package/dist/esm/components/CnChecklistWidget/CnChecklistWidget.vue3.js +58 -0
- package/dist/esm/components/CnChecklistWidget/CnChecklistWidget.vue3.js.map +1 -0
- package/dist/esm/components/CnChecklistWidget/index.js +28 -0
- package/dist/esm/components/CnChecklistWidget/index.js.map +1 -0
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +25 -0
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +376 -51
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js +364 -285
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue.js +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js +11 -0
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue3.js +6 -4
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue3.js.map +1 -1
- package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue.js +1 -1
- package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue2.js +48 -1
- package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue3.js +11 -2
- package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnMacrosWidget/CnMacrosWidget.vue.js +1 -1
- package/dist/esm/components/CnMacrosWidget/CnMacrosWidget.vue2.js +11 -3
- package/dist/esm/components/CnMacrosWidget/CnMacrosWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnMacrosWidget/CnMacrosWidget.vue3.js +8 -3
- package/dist/esm/components/CnMacrosWidget/CnMacrosWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue.js +1 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js +55 -2
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +94 -4
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js +248 -239
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordNoteRows.vue.js +9 -0
- package/dist/esm/components/CnRecordListWidget/CnRecordNoteRows.vue.js.map +1 -0
- package/dist/esm/components/CnRecordListWidget/CnRecordNoteRows.vue2.js +282 -0
- package/dist/esm/components/CnRecordListWidget/CnRecordNoteRows.vue2.js.map +1 -0
- package/dist/esm/components/CnRecordListWidget/CnRecordNoteRows.vue3.js +202 -0
- package/dist/esm/components/CnRecordListWidget/CnRecordNoteRows.vue3.js.map +1 -0
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue.js +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js +10 -5
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js +1 -0
- package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js.map +1 -1
- package/dist/esm/composables/indexSources.js +64 -0
- package/dist/esm/composables/indexSources.js.map +1 -1
- package/dist/esm/composables/useTaskInboxStore.js +85 -0
- package/dist/esm/composables/useTaskInboxStore.js.map +1 -1
- package/dist/esm/dialogs/CnAccessPurposeDialog.vue.js +9 -0
- package/dist/esm/dialogs/CnAccessPurposeDialog.vue.js.map +1 -0
- package/dist/esm/dialogs/CnAccessPurposeDialog.vue2.js +107 -0
- package/dist/esm/dialogs/CnAccessPurposeDialog.vue2.js.map +1 -0
- package/dist/esm/dialogs/CnAccessPurposeDialog.vue3.js +110 -0
- package/dist/esm/dialogs/CnAccessPurposeDialog.vue3.js.map +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/l10n/en.json.js +19 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +23 -1
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +1054 -911
- package/dist/esm/utils/actionsDispatcher.js +10 -5
- package/dist/esm/utils/actionsDispatcher.js.map +1 -1
- package/dist/esm/utils/detailActionModel.js +6 -2
- package/dist/esm/utils/detailActionModel.js.map +1 -1
- package/dist/esm/utils/libraryWidgetKeys.js +1 -0
- package/dist/esm/utils/libraryWidgetKeys.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/esm/utils/widgetDispatch.js +1 -1
- package/dist/esm/utils/widgetDispatch.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +17078 -15224
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +1054 -911
- package/l10n/en.json +19 -1
- package/l10n/nl.json +23 -1
- package/package.json +1 -1
- package/src/components/CnActionButtons/CnActionButtons.vue +93 -1
- package/src/components/CnChecklistWidget/CnChecklistWidget.vue +206 -0
- package/src/components/CnChecklistWidget/index.js +27 -0
- package/src/components/CnDashboardPage/CnDashboardPage.vue +26 -1
- package/src/components/CnDetailPage/CnDetailPage.md +2 -0
- package/src/components/CnDetailPage/CnDetailPage.vue +377 -10
- package/src/components/CnDetailWidgetHost/CnDetailWidgetHost.vue +15 -2
- package/src/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue +59 -1
- package/src/components/CnMacrosWidget/CnMacrosWidget.vue +16 -6
- package/src/components/CnObjectListWidget/CnObjectListWidget.vue +55 -2
- package/src/components/CnRecordListWidget/CnRecordListWidget.vue +101 -3
- package/src/components/CnRecordListWidget/CnRecordNoteRows.vue +508 -0
- package/src/components/CnTabsWidget/CnTabsWidget.vue +10 -5
- package/src/components/CnWidgetGrid/registerDashboardWidgets.js +1 -0
- package/src/components/index.js +1 -0
- package/src/composables/indexSources.js +64 -0
- package/src/composables/useTaskInboxStore.js +85 -0
- package/src/dialogs/CnAccessPurposeDialog.vue +183 -0
- package/src/index.js +1 -0
- package/src/schemas/app-manifest-v2.schema.json +49 -3
- package/src/utils/actionsDispatcher.js +10 -5
- package/src/utils/detailActionModel.js +6 -2
- package/src/utils/libraryWidgetKeys.js +1 -0
- package/src/utils/validateManifestV2.compiled.js +3 -3
- package/src/utils/widgetDispatch.js +1 -1
|
@@ -4,7 +4,8 @@ import { NcButton, NcLoadingIcon } from '@nextcloud/vue';
|
|
|
4
4
|
import { inject, ref } from 'vue';
|
|
5
5
|
import ChevronRight from 'vue-material-design-icons/ChevronRight.vue';
|
|
6
6
|
import __sfc_main from '../CnIcon/CnIcon.vue.js';
|
|
7
|
-
import __sfc_main$
|
|
7
|
+
import __sfc_main$2 from '../CnStatusBadge/CnStatusBadge.vue.js';
|
|
8
|
+
import __sfc_main$1 from './CnRecordNoteRows.vue.js';
|
|
8
9
|
import { useEndpointSource } from '../../composables/useEndpointSource.js';
|
|
9
10
|
import { dispatchAction, interpolateActionTarget, actionLink } from '../../utils/actionsDispatcher.js';
|
|
10
11
|
import { isBadgeVariant } from '../../utils/badgeVariants.js';
|
|
@@ -23,7 +24,7 @@ const PAGE_REFRESH_CHANNEL = 'cn:page:refresh';
|
|
|
23
24
|
|
|
24
25
|
/** Gives each list's footer reason its own element id. */
|
|
25
26
|
let footerSeq = 0;
|
|
26
|
-
const PRESENTATIONS = ['rows', 'feed', 'inline', 'cards', 'notice', 'table'];
|
|
27
|
+
const PRESENTATIONS = ['rows', 'feed', 'inline', 'cards', 'notice', 'table', 'notes'];
|
|
27
28
|
|
|
28
29
|
/** The tones a `notice` list takes. */
|
|
29
30
|
const NOTICE_VARIANTS = ['info', 'warning', 'error'];
|
|
@@ -76,7 +77,7 @@ function unwrap(value) {
|
|
|
76
77
|
var script = {
|
|
77
78
|
name: 'CnRecordListWidget',
|
|
78
79
|
|
|
79
|
-
components: { ChevronRight, CnIcon: __sfc_main,
|
|
80
|
+
components: { ChevronRight, CnIcon: __sfc_main, CnRecordNoteRows: __sfc_main$1, CnStatusBadge: __sfc_main$2, NcButton, NcLoadingIcon },
|
|
80
81
|
|
|
81
82
|
inject: {
|
|
82
83
|
/** Detail-page object context (`{ objectId, object, register, schema }`). */
|
|
@@ -174,6 +175,8 @@ var script = {
|
|
|
174
175
|
/** Whether `footerAction.disabledWhen` holds. */
|
|
175
176
|
footerDisabled: false,
|
|
176
177
|
footerReasonId: `cn-record-list-footer-reason-${++footerSeq}`,
|
|
178
|
+
/** The first `emptyTexts` entry whose condition holds, translated; '' for none. */
|
|
179
|
+
conditionalEmptyText: '',
|
|
177
180
|
}
|
|
178
181
|
},
|
|
179
182
|
|
|
@@ -459,10 +462,58 @@ var script = {
|
|
|
459
462
|
},
|
|
460
463
|
|
|
461
464
|
/** @return {string} The empty line. */
|
|
465
|
+
/**
|
|
466
|
+
* `noteAction` with its labels through the host translate, or null
|
|
467
|
+
* (`presentation: "notes"`).
|
|
468
|
+
*
|
|
469
|
+
* @spec openspec/changes/record-list-notes/specs/record-list-notes/spec.md#requirement-a-record-list-can-collect-and-record-a-note-per-row
|
|
470
|
+
* @return {object|null}
|
|
471
|
+
*/
|
|
472
|
+
noteAction() {
|
|
473
|
+
const action = this.content?.noteAction;
|
|
474
|
+
if (!action || typeof action !== 'object' || (!action.urlField && !action.url)) {
|
|
475
|
+
return null
|
|
476
|
+
}
|
|
477
|
+
const tr = (text) => (typeof text === 'string' && text !== '' ? this.translate(text) : '');
|
|
478
|
+
return {
|
|
479
|
+
...action,
|
|
480
|
+
label: tr(action.label),
|
|
481
|
+
fieldLabel: tr(action.fieldLabel),
|
|
482
|
+
placeholder: tr(action.placeholder),
|
|
483
|
+
readyLabel: tr(action.readyLabel),
|
|
484
|
+
errorText: tr(action.errorText),
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* `noteAction.recordAll` translated, its cancel link as a route, or null.
|
|
490
|
+
*
|
|
491
|
+
* @return {object|null}
|
|
492
|
+
*/
|
|
493
|
+
noteRecordAll() {
|
|
494
|
+
const all = this.content?.noteAction?.recordAll;
|
|
495
|
+
if (!all || typeof all !== 'object' || !all.label) {
|
|
496
|
+
return null
|
|
497
|
+
}
|
|
498
|
+
const cancel = all.cancel && all.cancel.label && all.cancel.route
|
|
499
|
+
? { label: this.translate(all.cancel.label), to: typeof all.cancel.route === 'string' ? { name: all.cancel.route } : all.cancel.route }
|
|
500
|
+
: null;
|
|
501
|
+
return {
|
|
502
|
+
label: this.translate(all.label),
|
|
503
|
+
title: all.title ? this.translate(all.title) : '',
|
|
504
|
+
text: all.text ? this.translate(all.text) : '',
|
|
505
|
+
icon: all.icon || '',
|
|
506
|
+
cancel,
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
|
|
462
510
|
emptyLabel() {
|
|
463
511
|
if (this.lensReasonText !== '') {
|
|
464
512
|
return this.lensReasonText
|
|
465
513
|
}
|
|
514
|
+
if (this.conditionalEmptyText !== '') {
|
|
515
|
+
return this.conditionalEmptyText
|
|
516
|
+
}
|
|
466
517
|
return this.content?.emptyText ? this.translate(this.content.emptyText) : translate('nextcloud-vue', 'Nothing here yet')
|
|
467
518
|
},
|
|
468
519
|
|
|
@@ -482,6 +533,10 @@ var script = {
|
|
|
482
533
|
this.fetchRows();
|
|
483
534
|
},
|
|
484
535
|
|
|
536
|
+
rows() {
|
|
537
|
+
this.evaluateEmptyTexts();
|
|
538
|
+
},
|
|
539
|
+
|
|
485
540
|
footerDisabledKey: {
|
|
486
541
|
immediate: true,
|
|
487
542
|
handler() {
|
|
@@ -567,6 +622,38 @@ var script = {
|
|
|
567
622
|
* @spec openspec/changes/record-list-footer-action/specs/record-list/spec.md#requirement-a-record-list-can-end-with-an-action-that-says-why-it-is-disabled
|
|
568
623
|
* @return {Promise<void>}
|
|
569
624
|
*/
|
|
625
|
+
/**
|
|
626
|
+
* Pick the empty text (`emptyTexts`: `[{ when, text }]`, the first whose
|
|
627
|
+
* visibleWhen condition holds), for a list that is empty for more than
|
|
628
|
+
* one reason ("Everything you opened today has a note" or "You have not
|
|
629
|
+
* opened anything today"). `emptyText` stays the fallback.
|
|
630
|
+
*
|
|
631
|
+
* @spec openspec/changes/record-list-notes/specs/record-list-notes/spec.md#requirement-a-record-list-can-say-why-it-is-empty
|
|
632
|
+
* @return {Promise<void>}
|
|
633
|
+
*/
|
|
634
|
+
async evaluateEmptyTexts() {
|
|
635
|
+
const options = Array.isArray(this.content?.emptyTexts) ? this.content.emptyTexts : [];
|
|
636
|
+
if (options.length === 0 || this.rows.length > 0) {
|
|
637
|
+
this.conditionalEmptyText = '';
|
|
638
|
+
return
|
|
639
|
+
}
|
|
640
|
+
const run = this.emptyRun = (this.emptyRun || 0) + 1;
|
|
641
|
+
for (const option of options) {
|
|
642
|
+
if (!option || typeof option.text !== 'string' || !option.when) {
|
|
643
|
+
continue
|
|
644
|
+
}
|
|
645
|
+
const holds = await evaluateVisibleWhen(option.when, this.tokenCtx);
|
|
646
|
+
if (run !== this.emptyRun) {
|
|
647
|
+
return
|
|
648
|
+
}
|
|
649
|
+
if (holds) {
|
|
650
|
+
this.conditionalEmptyText = this.translate(option.text);
|
|
651
|
+
return
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
this.conditionalEmptyText = '';
|
|
655
|
+
},
|
|
656
|
+
|
|
570
657
|
async evaluateFooterDisabled() {
|
|
571
658
|
const cond = this.content?.footerAction?.disabledWhen;
|
|
572
659
|
if (!cond) {
|
|
@@ -831,7 +918,10 @@ var script = {
|
|
|
831
918
|
},
|
|
832
919
|
|
|
833
920
|
rowLink(row) {
|
|
834
|
-
|
|
921
|
+
// `rowRouteField`: the route name read from the row, for a list
|
|
922
|
+
// whose rows open different pages (a case and a task).
|
|
923
|
+
const byField = this.content?.rowRouteField ? readPath(row, this.content.rowRouteField) : null;
|
|
924
|
+
const route = (typeof byField === 'string' && byField !== '') ? byField : this.content?.rowRoute;
|
|
835
925
|
if (!route || !this.$router || !row) {
|
|
836
926
|
return null
|
|
837
927
|
}
|