@conduction/nextcloud-vue 2.161.0 → 2.162.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/CnActionsMenu/CnActionsMenu.vue2.js +3 -2
- package/dist/esm/components/CnActionsMenu/CnActionsMenu.vue2.js.map +1 -1
- package/dist/esm/components/CnActionsMenu/CnActionsMenu.vue3.js.map +1 -1
- package/dist/esm/components/CnAddressSearch/CnAddressSearch.vue.js +1 -1
- package/dist/esm/components/CnAddressSearch/CnAddressSearch.vue2.js +2 -1
- package/dist/esm/components/CnAddressSearch/CnAddressSearch.vue2.js.map +1 -1
- package/dist/esm/components/CnAddressSearch/CnAddressSearch.vue3.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +2 -1
- 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 +8 -8
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue.js +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js +23 -0
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue3.js.map +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue.js +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js +48 -5
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js +2 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue.js +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js +4 -3
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/filesBrowser.js +6 -5
- package/dist/esm/components/CnFilesBrowser/filesBrowser.js.map +1 -1
- package/dist/esm/components/CnFilesWidget/CnFilesWidget.vue.js +1 -1
- package/dist/esm/components/CnFilesWidget/CnFilesWidget.vue2.js +2 -1
- package/dist/esm/components/CnFilesWidget/CnFilesWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnFilesWidget/CnFilesWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnFlowRunsWidget/CnFlowRunsWidget.vue.js +1 -1
- package/dist/esm/components/CnFlowRunsWidget/CnFlowRunsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnFlowRunsWidget/CnFlowRunsWidget.vue3.js +41 -39
- package/dist/esm/components/CnFlowRunsWidget/CnFlowRunsWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnFolderSidebar/webdavFolders.js +2 -1
- package/dist/esm/components/CnFolderSidebar/webdavFolders.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +11 -3
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnMenuWidget/menuActive.js +2 -1
- package/dist/esm/components/CnMenuWidget/menuActive.js.map +1 -1
- package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue.js +1 -1
- package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue2.js +39 -2
- package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue3.js +1 -1
- package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnPageTreeNode/CnPageTreeNode.vue.js +1 -1
- package/dist/esm/components/CnPageTreeNode/CnPageTreeNode.vue2.js +2 -1
- package/dist/esm/components/CnPageTreeNode/CnPageTreeNode.vue2.js.map +1 -1
- package/dist/esm/components/CnPageTreeNode/CnPageTreeNode.vue3.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +5 -5
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
- package/dist/esm/integrations/builtin/email/CnEmailTab.vue.js +1 -1
- package/dist/esm/integrations/builtin/email/CnEmailTab.vue2.js +130 -1
- package/dist/esm/integrations/builtin/email/CnEmailTab.vue2.js.map +1 -1
- package/dist/esm/integrations/builtin/email/CnEmailTab.vue3.js +27 -16
- package/dist/esm/integrations/builtin/email/CnEmailTab.vue3.js.map +1 -1
- package/dist/esm/l10n/en.json.js +9 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +9 -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 +560 -488
- package/dist/esm/utils/buildManifestRoutes.js +2 -1
- package/dist/esm/utils/buildManifestRoutes.js.map +1 -1
- package/dist/esm/utils/cnFetch.js +1 -15
- package/dist/esm/utils/cnFetch.js.map +1 -1
- package/dist/esm/utils/fillTemplate.js +29 -2
- package/dist/esm/utils/fillTemplate.js.map +1 -1
- package/dist/esm/utils/forge.js +4 -1
- package/dist/esm/utils/forge.js.map +1 -1
- package/dist/esm/utils/myTeam.js +17 -3
- package/dist/esm/utils/myTeam.js.map +1 -1
- package/dist/esm/utils/rowAggregate.js +20 -1
- package/dist/esm/utils/rowAggregate.js.map +1 -1
- package/dist/esm/utils/trailingSlashes.js +24 -0
- package/dist/esm/utils/trailingSlashes.js.map +1 -0
- package/dist/nextcloud-vue.cjs.js +1009 -675
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +560 -488
- package/l10n/en.json +9 -1
- package/l10n/nl.json +9 -1
- package/package.json +1 -1
- package/src/components/CnActionsMenu/CnActionsMenu.vue +3 -2
- package/src/components/CnAddressSearch/CnAddressSearch.vue +2 -1
- package/src/components/CnDashboardPage/CnDashboardPage.vue +2 -1
- package/src/components/CnDataTable/CnDataTable.vue +8 -8
- package/src/components/CnDetailWidgetHost/CnDetailWidgetHost.vue +23 -0
- package/src/components/CnFactsWidget/CnFactsWidget.vue +49 -5
- package/src/components/CnFilesBrowser/CnFilesBrowser.vue +4 -3
- package/src/components/CnFilesBrowser/filesBrowser.js +6 -5
- package/src/components/CnFilesWidget/CnFilesWidget.vue +2 -1
- package/src/components/CnFlowRunsWidget/CnFlowRunsWidget.vue +1 -1
- package/src/components/CnFolderSidebar/webdavFolders.js +2 -1
- package/src/components/CnIndexPage/CnIndexPage.vue +11 -3
- package/src/components/CnMenuWidget/menuActive.js +2 -1
- package/src/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue +40 -3
- package/src/components/CnPageTreeNode/CnPageTreeNode.vue +2 -1
- package/src/components/CnRecordListWidget/CnRecordListWidget.vue +5 -5
- package/src/css/dialog.css +7 -0
- package/src/css/look-board-detail.css +35 -0
- package/src/css/look-board.css +18 -1
- package/src/integrations/builtin/email/CnEmailTab.vue +155 -4
- package/src/utils/buildManifestRoutes.js +2 -1
- package/src/utils/cnFetch.js +3 -15
- package/src/utils/fillTemplate.js +29 -2
- package/src/utils/forge.js +3 -1
- package/src/utils/myTeam.js +17 -3
- package/src/utils/rowAggregate.js +19 -0
- package/src/utils/trailingSlashes.js +21 -0
|
@@ -22,8 +22,10 @@ import { fetchListTotal } from '../../utils/fetchFilterCounts.js';
|
|
|
22
22
|
import { fillTemplate, formatLongDate } from '../../utils/fillTemplate.js';
|
|
23
23
|
import { metricLocale, formatMoney, unwrapAppConfig } from '../../utils/formatMetric.js';
|
|
24
24
|
import { groupDisplayName, loadGroupDisplayName } from '../../utils/groupAutocomplete.js';
|
|
25
|
+
import { fetchCallerScope } from '../../utils/objectPermissions.js';
|
|
25
26
|
import { readPath } from '../../utils/readPath.js';
|
|
26
27
|
import { resolveDeepTokens, hasUnresolvedDeepTokens } from '../../utils/resolveFilterTokens.js';
|
|
28
|
+
import { stripTrailingSlashes } from '../../utils/trailingSlashes.js';
|
|
27
29
|
import { userDisplayName } from '../../utils/userDisplayName.js';
|
|
28
30
|
import { isLocallyDecidableVisibleWhen, evaluateVisibleWhenLocal, evaluateVisibleWhen } from '../../utils/visibleWhen.js';
|
|
29
31
|
|
|
@@ -220,7 +222,7 @@ var script = {
|
|
|
220
222
|
* The widget configuration.
|
|
221
223
|
*
|
|
222
224
|
* - `fields` — the entries, in order. Each is `{ path, label?, as?, from?, format?, map?, itemPath?, parts?, separator?, route?, variant?, variantMap?, colorMap?, icon?, copy?, reveal?, inline?, joinPrevious?, joinSeparator?, text?, title?, subtitle?, initialsPath?, tone? }`.
|
|
223
|
-
* `as` is `row` (default when `label` or `icon` is set), `title`, `line`, `text` (a line in the normal ink), `lead` (an icon tile or initials beside `title` and `subtitle`), `pill` or `meter`.
|
|
225
|
+
* `as` is `row` (default when `label` or `icon` is set), `title`, `line`, `text` (a line in the normal ink), `lead` (an icon tile or initials beside `title` and `subtitle`), `pill` or `meter`. A `title` takes `size` in px (a Termijn card's 26px figure).
|
|
224
226
|
* `countFrom` (`{ register, schema, filter? }`, `@objectId` / `@object.<field>` in the filter) shows how many records that list holds ("Lopende zaken 43"); the row is left out while the count cannot be read.
|
|
225
227
|
* A `meter` shows the amount at `path` against the limit at `limitPath` (or a constant `limit`) as "12 of 50" with a bar; past the limit the bar turns red and the text says "over the limit"; without a positive limit it shows the amount and no bar.
|
|
226
228
|
* A `line` or `text` with `joinPrevious: true` is written on after the line or text just before it, as one paragraph (`joinSeparator`, default a space); with none before it, it stands alone. A text joined with a line break (`joinSeparator: "\n"`) keeps it: two address lines as one block.
|
|
@@ -237,7 +239,7 @@ var script = {
|
|
|
237
239
|
* `labelPath` ("@context.caseType.handlerLabel") names a value on the record or the page's `@context` records that labels the row when it holds text; `label` is the fallback.
|
|
238
240
|
* `emptyValue` ("No") is shown, translated, when the entry has no value, so the entry stays drawn whatever `hideEmpty` says (an override that was never set reads "No").
|
|
239
241
|
* - `action` — an action drawn as a button under the facts; `headerAction` — one drawn in the card header (reported through the `header` event).
|
|
240
|
-
* - `actions` — action buttons under the facts in the `headerActions` shape (`api-call`, `open-form`, `navigate`, `open-modal`, ...; `confirm`, `variant`). `@source.<field>` names a field of the record shown, and an action whose token names an empty field is not drawn. `visibleWhen` reads the record shown; `adminOnly: true` draws the action for an instance admin only (visibility, never authorisation). An api-call or a saved form refreshes the page, and the facts read their source again.
|
|
242
|
+
* - `actions` — action buttons under the facts in the `headerActions` shape (`api-call`, `open-form`, `navigate`, `open-modal`, ...; `confirm`, `variant`). `@source.<field>` names a field of the record shown, and an action whose token names an empty field is not drawn. `visibleWhen` reads the record shown; `adminOnly: true` draws the action for an instance admin only (visibility, never authorisation). `requires: "update"` draws it only when OpenRegister lets the reader update the page's record (also on `emptyActions`; while the right is unknown it draws, and the server decides). An api-call or a saved form refreshes the page, and the facts read their source again.
|
|
241
243
|
* - `fieldsFrom` — `@context.<name>.<path>`, a list of entries on a record the page reads beside this one (a case type's `requestFields`); when it holds entries they are drawn instead of `fields`.
|
|
242
244
|
* - `rowsPath` — a path to a list of `{ label, value }` the record holds, drawn as rows after `fields` (a preview the server builds).
|
|
243
245
|
* - `headerPill` — a status pill in the card header (reported through the `header` event): `{ path?, text?, map?, variant?, variantMap?, colorMap? }`, read from the record like a `pill` entry (DqBezwaar "Advies ontvangen"); nothing shows while the value is empty.
|
|
@@ -304,6 +306,8 @@ var script = {
|
|
|
304
306
|
counts: {},
|
|
305
307
|
/** The outcome of each `actions[]` condition that needs a request, by action id. */
|
|
306
308
|
remoteVisibility: {},
|
|
309
|
+
/** Whether OpenRegister lets the reader update the page's record; null while unknown (the server decides). */
|
|
310
|
+
mayUpdate: null,
|
|
307
311
|
/** Sequence of the source reads, so an older answer never replaces a newer one. */
|
|
308
312
|
loadSeq: 0,
|
|
309
313
|
}
|
|
@@ -518,6 +522,7 @@ var script = {
|
|
|
518
522
|
emptyActions() {
|
|
519
523
|
const list = Array.isArray(this.content?.emptyActions) ? this.content.emptyActions : [];
|
|
520
524
|
return list
|
|
525
|
+
.filter((action) => this.rightAllows(action))
|
|
521
526
|
.map((action) => ({ view: this.actionView(action), action }))
|
|
522
527
|
.filter((entry) => entry.view)
|
|
523
528
|
.map((entry) => ({ ...entry.view, action: entry.action }))
|
|
@@ -550,7 +555,7 @@ var script = {
|
|
|
550
555
|
const admin = this.viewerIsAdmin();
|
|
551
556
|
const out = [];
|
|
552
557
|
actions.forEach((action, index) => {
|
|
553
|
-
if (!action || typeof action !== 'object' || (action.adminOnly === true && !admin)) {
|
|
558
|
+
if (!action || typeof action !== 'object' || (action.adminOnly === true && !admin) || !this.rightAllows(action)) {
|
|
554
559
|
return
|
|
555
560
|
}
|
|
556
561
|
const id = this.actionId(action, index);
|
|
@@ -565,7 +570,7 @@ var script = {
|
|
|
565
570
|
if (unresolved) {
|
|
566
571
|
return
|
|
567
572
|
}
|
|
568
|
-
const { visibleWhen, adminOnly, ...drawn } = value;
|
|
573
|
+
const { visibleWhen, adminOnly, requires, ...drawn } = value;
|
|
569
574
|
out.push({ ...drawn, id });
|
|
570
575
|
});
|
|
571
576
|
return out
|
|
@@ -649,6 +654,9 @@ var script = {
|
|
|
649
654
|
if (kind === 'title' && field.route) {
|
|
650
655
|
block.to = this.resolveRoute(field.route, record);
|
|
651
656
|
}
|
|
657
|
+
if (kind === 'title' && Number.isFinite(field.size) && field.size > 0) {
|
|
658
|
+
block.size = field.size;
|
|
659
|
+
}
|
|
652
660
|
if (kind === 'pill') {
|
|
653
661
|
const raw = readPath(record, field.path);
|
|
654
662
|
const colours = field.variantMap || field.colorMap;
|
|
@@ -874,6 +882,7 @@ var script = {
|
|
|
874
882
|
|
|
875
883
|
mounted() {
|
|
876
884
|
subscribe(PAGE_REFRESH_CHANNEL, this.onPageRefresh);
|
|
885
|
+
this.loadMayUpdate();
|
|
877
886
|
},
|
|
878
887
|
|
|
879
888
|
beforeUnmount() {
|
|
@@ -881,6 +890,40 @@ var script = {
|
|
|
881
890
|
},
|
|
882
891
|
|
|
883
892
|
methods: {
|
|
893
|
+
/**
|
|
894
|
+
* Whether an action's `requires: "update"` holds: the reader may update
|
|
895
|
+
* the page's record. Unknown counts as yes; the server decides.
|
|
896
|
+
*
|
|
897
|
+
* @param {object} action The declaration.
|
|
898
|
+
* @return {boolean}
|
|
899
|
+
* @spec openspec/changes/facts-title-size-and-update-right/specs/facts-widget/spec.md#requirement-a-facts-action-can-ask-for-the-update-right
|
|
900
|
+
*/
|
|
901
|
+
rightAllows(action) {
|
|
902
|
+
return !(action && action.requires === 'update' && this.mayUpdate === false)
|
|
903
|
+
},
|
|
904
|
+
|
|
905
|
+
/**
|
|
906
|
+
* Read the reader's rights on the page's register and schema, when an
|
|
907
|
+
* action asks for the update right.
|
|
908
|
+
*
|
|
909
|
+
* @return {Promise<void>}
|
|
910
|
+
* @spec openspec/changes/facts-title-size-and-update-right/specs/facts-widget/spec.md#requirement-a-facts-action-can-ask-for-the-update-right
|
|
911
|
+
*/
|
|
912
|
+
async loadMayUpdate() {
|
|
913
|
+
const all = [...(Array.isArray(this.content?.actions) ? this.content.actions : []), ...(Array.isArray(this.content?.emptyActions) ? this.content.emptyActions : [])];
|
|
914
|
+
const { register, schema } = this.tokenCtx;
|
|
915
|
+
if (!all.some((action) => action && action.requires === 'update') || !register || !schema) {
|
|
916
|
+
return
|
|
917
|
+
}
|
|
918
|
+
const slug = (value) => (value && typeof value === 'object' ? String(value.slug || value.id || '') : String(value));
|
|
919
|
+
try {
|
|
920
|
+
const scope = await fetchCallerScope({ register: slug(register), schema: slug(schema) });
|
|
921
|
+
this.mayUpdate = !scope || !Array.isArray(scope.actions) || scope.actions.includes('update');
|
|
922
|
+
} catch {
|
|
923
|
+
this.mayUpdate = null;
|
|
924
|
+
}
|
|
925
|
+
},
|
|
926
|
+
|
|
884
927
|
/**
|
|
885
928
|
* A link's label and the muted note under it, their `{path}` and
|
|
886
929
|
* `{path:format}` placeholders filled from the record ("{page:last-segment}").
|
|
@@ -1007,7 +1050,7 @@ var script = {
|
|
|
1007
1050
|
return LINK_SCHEMES.includes(parsed.protocol) ? parsed.href : ''
|
|
1008
1051
|
}
|
|
1009
1052
|
if (typeof link.hrefBase === 'string' && link.hrefBase !== '') {
|
|
1010
|
-
const path = link.hrefBase
|
|
1053
|
+
const path = stripTrailingSlashes(link.hrefBase) + '/' + value.replace(/^\/+/, '');
|
|
1011
1054
|
return generateUrl(path)
|
|
1012
1055
|
}
|
|
1013
1056
|
return value.startsWith('/') && !value.startsWith('//') ? value : ''
|