@conduction/nextcloud-vue 2.96.0 → 2.97.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/CnCellRenderer/CnCellRenderer.vue.js +1 -1
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js +33 -1
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js.map +1 -1
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue3.js +383 -359
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue3.js.map +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationThread.vue.js +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationThread.vue2.js +17 -3
- package/dist/esm/components/CnConversationThread/CnConversationThread.vue2.js.map +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationThread.vue3.js +61 -43
- package/dist/esm/components/CnConversationThread/CnConversationThread.vue3.js.map +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationWidget.vue.js +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationWidget.vue2.js +159 -18
- package/dist/esm/components/CnConversationThread/CnConversationWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationWidget.vue3.js +9 -7
- package/dist/esm/components/CnConversationThread/CnConversationWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue.js +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js +48 -3
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js +46 -12
- 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 +144 -0
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js +488 -399
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/filesBrowserColumns.js +8 -2
- package/dist/esm/components/CnFilesBrowser/filesBrowserColumns.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +301 -18
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +29 -7
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPageWidgets.vue.js +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPageWidgets.vue2.js +2 -2
- package/dist/esm/components/CnIndexPage/CnIndexPageWidgets.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPageWidgets.vue3.js +2 -2
- package/dist/esm/components/CnIndexPage/CnIndexPageWidgets.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/useNamedSource.js +1 -1
- package/dist/esm/components/CnIndexPage/useNamedSource.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue.js +1 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js +13 -0
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js +5 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js.map +1 -1
- package/dist/esm/composables/indexSources.js +182 -3
- package/dist/esm/composables/indexSources.js.map +1 -1
- package/dist/esm/l10n/en.json.js +7 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +7 -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 +301 -177
- package/dist/esm/utils/queryPresets.js +13 -2
- package/dist/esm/utils/queryPresets.js.map +1 -1
- package/dist/esm/utils/scopeListLayout.js +37 -1
- package/dist/esm/utils/scopeListLayout.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 +3009 -1907
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +301 -177
- package/l10n/en.json +7 -1
- package/l10n/nl.json +7 -1
- package/package.json +1 -1
- package/src/components/CnCellRenderer/CnCellRenderer.vue +57 -1
- package/src/components/CnConversationThread/CnConversationThread.md +12 -0
- package/src/components/CnConversationThread/CnConversationThread.vue +30 -4
- package/src/components/CnConversationThread/CnConversationWidget.vue +167 -24
- package/src/components/CnFactsWidget/CnFactsWidget.vue +114 -3
- package/src/components/CnFilesBrowser/CnFilesBrowser.vue +508 -236
- package/src/components/CnFilesBrowser/filesBrowserColumns.js +8 -2
- package/src/components/CnIndexPage/CnIndexPage.vue +324 -24
- package/src/components/CnIndexPage/CnIndexPageWidgets.vue +13 -4
- package/src/components/CnIndexPage/useNamedSource.js +1 -1
- package/src/components/CnObjectSidebar/CnFilesTab.vue +17 -0
- package/src/composables/indexSources.js +182 -3
- package/src/schemas/app-manifest-v2.schema.json +11 -4
- package/src/utils/queryPresets.js +13 -2
- package/src/utils/scopeListLayout.js +37 -1
- package/src/utils/validateManifestV2.compiled.js +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnFactsWidget.vue2.js","sources":["../../../../src/components/CnFactsWidget/CnFactsWidget.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<div class=\"cn-facts-widget\" data-testid=\"cn-facts-widget\">\n\t\t<p v-if=\"error\" class=\"cn-facts-widget__muted\" data-testid=\"cn-facts-error\">\n\t\t\t{{ tr('Could not load this information') }}\n\t\t</p>\n\t\t<div v-else-if=\"loading && !record\" class=\"cn-facts-widget__loading\">\n\t\t\t<NcLoadingIcon :size=\"20\" />\n\t\t</div>\n\t\t<p v-else-if=\"blocks.length === 0\" class=\"cn-facts-widget__muted\" data-testid=\"cn-facts-empty\">\n\t\t\t{{ emptyLabel }}\n\t\t</p>\n\t\t<template v-else>\n\t\t\t<template v-for=\"block in blocks\" :key=\"block.key\">\n\t\t\t\t<dl\n\t\t\t\t\tv-if=\"block.kind === 'rows'\"\n\t\t\t\t\tclass=\"cn-facts-widget__rows\"\n\t\t\t\t\t:class=\"{ 'cn-facts-widget__rows--columns': twoColumns }\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-for=\"row in block.rows\"\n\t\t\t\t\t\t:key=\"row.key\"\n\t\t\t\t\t\tclass=\"cn-facts-widget__row\"\n\t\t\t\t\t\t:data-testid=\"`cn-fact-${row.key}`\">\n\t\t\t\t\t\t<dt class=\"cn-facts-widget__label\" :class=\"{ 'cn-facts-widget__label--icon': row.icon }\">\n\t\t\t\t\t\t\t<CnIcon\n\t\t\t\t\t\t\t\tv-if=\"row.icon\"\n\t\t\t\t\t\t\t\t:name=\"row.icon\"\n\t\t\t\t\t\t\t\t:size=\"18\"\n\t\t\t\t\t\t\t\taria-hidden=\"true\" />\n\t\t\t\t\t\t\t<span :class=\"{ 'hidden-visually': row.icon }\">{{ row.label }}</span>\n\t\t\t\t\t\t</dt>\n\t\t\t\t\t\t<dd class=\"cn-facts-widget__value\">\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\tv-if=\"row.href\"\n\t\t\t\t\t\t\t\t:href=\"row.href\"\n\t\t\t\t\t\t\t\tclass=\"cn-facts-widget__value-link\"\n\t\t\t\t\t\t\t\t:target=\"row.external ? '_blank' : undefined\"\n\t\t\t\t\t\t\t\t:rel=\"row.external ? 'noopener noreferrer' : undefined\">{{ row.value }}</a>\n\t\t\t\t\t\t\t<span v-else>{{ row.masked && !revealed[row.key] ? row.masked : row.value }}</span>\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tv-if=\"row.reveal && !revealed[row.key]\"\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tclass=\"cn-facts-widget__inline-button\"\n\t\t\t\t\t\t\t\t:aria-label=\"revealLabel(row)\"\n\t\t\t\t\t\t\t\t:data-testid=\"`cn-fact-reveal-${row.key}`\"\n\t\t\t\t\t\t\t\t@click=\"reveal(row)\">\n\t\t\t\t\t\t\t\t<EyeOutline :size=\"16\" aria-hidden=\"true\" />\n\t\t\t\t\t\t\t\t{{ showLabel }}\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tv-if=\"row.copy\"\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tclass=\"cn-facts-widget__icon-button\"\n\t\t\t\t\t\t\t\t:aria-label=\"copyLabel(row)\"\n\t\t\t\t\t\t\t\t:title=\"copyLabel(row)\"\n\t\t\t\t\t\t\t\t:data-testid=\"`cn-fact-copy-${row.key}`\"\n\t\t\t\t\t\t\t\t@click=\"copy(row)\">\n\t\t\t\t\t\t\t\t<Check v-if=\"copied === row.key\" :size=\"16\" aria-hidden=\"true\" />\n\t\t\t\t\t\t\t\t<ContentCopy v-else :size=\"16\" aria-hidden=\"true\" />\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</dd>\n\t\t\t\t\t</div>\n\t\t\t\t</dl>\n\t\t\t\t<component\n\t\t\t\t\t:is=\"block.to ? 'router-link' : 'strong'\"\n\t\t\t\t\tv-else-if=\"block.kind === 'title'\"\n\t\t\t\t\t:to=\"block.to || undefined\"\n\t\t\t\t\tclass=\"cn-facts-widget__title\"\n\t\t\t\t\t:data-testid=\"`cn-fact-${block.key}`\">\n\t\t\t\t\t{{ block.value }}\n\t\t\t\t</component>\n\t\t\t\t<span\n\t\t\t\t\tv-else-if=\"block.kind === 'line'\"\n\t\t\t\t\tclass=\"cn-facts-widget__line\"\n\t\t\t\t\t:data-testid=\"`cn-fact-${block.key}`\">\n\t\t\t\t\t{{ block.value }}\n\t\t\t\t</span>\n\t\t\t\t<span\n\t\t\t\t\tv-else-if=\"block.kind === 'text'\"\n\t\t\t\t\tclass=\"cn-facts-widget__text\"\n\t\t\t\t\t:data-testid=\"`cn-fact-${block.key}`\">\n\t\t\t\t\t{{ block.value }}\n\t\t\t\t</span>\n\t\t\t\t<div\n\t\t\t\t\tv-else-if=\"block.kind === 'lead'\"\n\t\t\t\t\tclass=\"cn-facts-widget__lead\"\n\t\t\t\t\t:data-testid=\"`cn-fact-${block.key}`\">\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass=\"cn-facts-widget__lead-tile\"\n\t\t\t\t\t\t:class=\"`cn-facts-widget__lead-tile--${block.tone}`\"\n\t\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t\t<CnIcon v-if=\"block.icon\" :name=\"block.icon\" :size=\"20\" />\n\t\t\t\t\t\t<template v-else>{{ block.initials }}</template>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span class=\"cn-facts-widget__lead-text\">\n\t\t\t\t\t\t<strong class=\"cn-facts-widget__lead-title\">{{ block.value }}</strong>\n\t\t\t\t\t\t<span v-if=\"block.subtitle\" class=\"cn-facts-widget__lead-subtitle\">{{ block.subtitle }}</span>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t\t<div v-else-if=\"block.kind === 'pill'\">\n\t\t\t\t\t<CnStatusBadge\n\t\t\t\t\t\t:label=\"block.value\"\n\t\t\t\t\t\t:variant=\"block.variant\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t:data-testid=\"`cn-fact-${block.key}`\" />\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t</template>\n\t\t<component\n\t\t\t:is=\"link.to ? 'router-link' : 'a'\"\n\t\t\tv-if=\"link && record\"\n\t\t\t:to=\"link.to || undefined\"\n\t\t\t:href=\"link.href || undefined\"\n\t\t\tclass=\"cn-facts-widget__link\"\n\t\t\tdata-testid=\"cn-facts-link\">\n\t\t\t{{ link.label }}\n\t\t</component>\n\t\t<button\n\t\t\tv-if=\"action && record\"\n\t\t\ttype=\"button\"\n\t\t\tclass=\"cn-facts-widget__action\"\n\t\t\tdata-testid=\"cn-facts-action\"\n\t\t\t@click=\"runAction(content.action)\">\n\t\t\t<CnIcon v-if=\"action.icon\" :name=\"action.icon\" :size=\"16\" />\n\t\t\t{{ action.label }}\n\t\t</button>\n\t</div>\n</template>\n\n<script>\nimport { emit } from '@nextcloud/event-bus'\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcLoadingIcon } from '@nextcloud/vue'\nimport Check from 'vue-material-design-icons/Check.vue'\nimport ContentCopy from 'vue-material-design-icons/ContentCopy.vue'\nimport EyeOutline from 'vue-material-design-icons/EyeOutline.vue'\nimport CnIcon from '../CnIcon/CnIcon.vue'\nimport CnStatusBadge from '../CnStatusBadge/CnStatusBadge.vue'\nimport { resolveEndpointRequest } from '../../composables/useEndpointSource.js'\nimport { useRefLabels } from '../../composables/useRefLabels.js'\nimport { dispatchAction } from '../../utils/actionsDispatcher.js'\nimport { isBadgeVariant } from '../../utils/badgeVariants.js'\nimport { formatBoardDate } from '../../utils/boardDate.js'\nimport { parseDateValue } from '../../utils/dateVariant.js'\nimport { formatMoney, unwrapAppConfig } from '../../utils/formatMetric.js'\nimport { readPath } from '../../utils/readPath.js'\nimport { hasUnresolvedDeepTokens, resolveDeepTokens } from '../../utils/resolveFilterTokens.js'\nimport { userDisplayName } from '../../utils/userDisplayName.js'\n\n/** Kinds of entry a `fields[]` item can be. A labelled item without `as` is a row. */\nconst KINDS = Object.freeze(['row', 'title', 'line', 'pill', 'lead', 'text'])\n\n/**\n * The label resolver every facts widget on the page shares, made on first use\n * (the object store needs an active pinia). One batched request per register and\n * schema for the ids it has not seen; a label it has read stays until the page\n * reloads, and an object the store already holds is not fetched at all.\n *\n * @type {{resolve: Function}|null}\n */\nlet refLabels = null\n\n/**\n * The entry that reads a resolved pill's tone: the same reference, with the\n * referenced object's `toneField` as the field to read.\n *\n * @param {object} spec A facts entry.\n * @return {object|null} `{ path, itemPath, resolve }`, or null when no `toneField` is set.\n */\nfunction toneSpec(spec) {\n\tconst resolve = spec && spec.resolve\n\tif (!resolve || typeof resolve !== 'object' || typeof resolve.toneField !== 'string' || resolve.toneField === '') {\n\t\treturn null\n\t}\n\treturn { path: spec.path, itemPath: spec.itemPath, resolve: { register: resolve.register, schema: resolve.schema, labelField: resolve.toneField } }\n}\n\n/** The page-wide reference label resolver. */\nfunction sharedRefLabels() {\n\tif (!refLabels) {\n\t\trefLabels = useRefLabels()\n\t}\n\treturn refLabels\n}\n\n/**\n * Key of a resolved reference in the widget's `labels` data.\n *\n * @param {{register: string, schema: string, labelField?: string}} resolve The entry's `resolve` config.\n * @param {string} id The referenced object's id.\n * @return {string} The key.\n */\nfunction refKey(resolve, id) {\n\treturn `${resolve.register}/${resolve.schema}/${resolve.labelField || ''}/${id}`\n}\n\n/** Event-bus channel a reveal of a masked value is announced on, so an app can log it. */\nexport const FACTS_REVEAL_CHANNEL = 'cn:facts:reveal'\n\n/**\n * CnFactsWidget — the `facts` widget: a card of facts about ONE object.\n *\n * Renders the configured fields of the current detail-page object, or of one\n * other object named by `content.source`, as the side cards on the screens\n * draw them: label/value rows (a two-column grid, label muted), a bold title\n * line that may link, muted meta lines that join several fields with \" · \",\n * a status pill, and one link at the foot.\n *\n * Everything is configuration; nothing in it knows an app:\n *\n * ```json\n * {\n * \"type\": \"facts\",\n * \"title\": \"Zaak\",\n * \"content\": {\n * \"source\": { \"register\": \"dossiq\", \"schema\": \"case\", \"id\": \"@object.case\" },\n * \"fields\": [\n * { \"as\": \"title\", \"path\": \"title\", \"route\": { \"name\": \"CaseDetail\", \"params\": { \"id\": \"@source.id\" } } },\n * { \"as\": \"line\", \"parts\": [\"identifier\", \"caseTypeTitle\"] },\n * { \"as\": \"pill\", \"path\": \"status\", \"map\": { \"open\": \"In behandeling\" } },\n * { \"path\": \"deadline\", \"label\": \"Termijn\", \"format\": \"date\" }\n * ],\n * \"link\": { \"label\": \"Naar de zaak\", \"route\": { \"name\": \"CaseDetail\", \"params\": { \"id\": \"@source.id\" } } },\n * \"emptyText\": \"Geen zaak\"\n * }\n * }\n * ```\n *\n * Tokens: `source.id` takes the shared filter tokens; `source.url` takes them\n * inside the url, the endpoint grammar (`/apps/x/api/y/@objectId`)\n * (`@objectId`, `@object.<field>`, `@workspace.<key>`, `@me`, ...). Routes\n * and the link also take `@source.<field>` (a field of the object shown).\n * A source whose id token does not resolve renders the empty text, never a\n * request for the literal token.\n *\n * Labels, map values, the link label and the empty text go through the host\n * app's translate (`cnTranslate`).\n */\nexport default {\n\tname: 'CnFactsWidget',\n\n\tcomponents: { Check, CnIcon, CnStatusBadge, ContentCopy, EyeOutline, NcLoadingIcon },\n\n\tinject: {\n\t\tcnTranslate: { default: () => (key) => key },\n\t\tcnObjectContext: { default: null },\n\t\tcnWorkspaceContext: { default: null },\n\t\t/** The page's app config; its `currency` is the reporting currency a money value falls back to. */\n\t\tcnAppConfig: { default: null },\n\t\t/** Pre-bound action dispatcher of CnPageRenderer, for `action` / `headerAction`. */\n\t\tcnDispatchAction: { default: null },\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The widget configuration.\n\t\t *\n\t\t * - `fields` — the entries, in order. Each is `{ path, label?, as?, from?, format?, map?, itemPath?, parts?, separator?, route?, variant?, variantMap?, colorMap?, icon?, copy?, reveal?, text?, title?, subtitle?, initialsPath?, tone? }`.\n\t\t * `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`) or `pill`.\n\t\t * A row's `format` may also be `email`, `phone` or `url` (a link) or `masked` (the last four characters; `reveal: true` adds Show). `copy: true` adds a copy button; `icon` replaces the label.\n\t\t * A part may be `{ text }`, a constant; a `line` or `text` entry without `path` or `parts` shows its `text`.\n\t\t * `resolve: { register, schema, labelField? }` on an entry or a part turns a value that is a reference (an id, or a list of ids) into the label of the referenced object (`labelField`, else `title`, then `name`): the case type or status of a task shows its name, not its uuid. The ids are fetched once per register and schema through the object store and shared by every facts widget on the page; the entry stays empty until its label is known, and when no label can be read. A resolved value works as a pill too: `map` is applied to the resolved label, and `variantMap` / `colorMap` look the tone up by the value of `resolve.toneField` on the referenced object when that is set (a status named by its `name`, coloured by its `state`), then by the resolved label, then by the stored value.\n\t\t * `format: 'user'` shows a Nextcloud user id as the user's display name, read once per id; the entry stays empty until the name is known.\n\t\t * - `action` — an action drawn as a button under the facts; `headerAction` — one drawn in the card header (reported through the `header` event).\n\t\t * `format` is `text` (default), `date` (board short date), `date-long` (always with the year), `list` (an array joined by \", \", each item read at `itemPath`) or `currency` (a money amount in the reader's language, \"€ 1.234,50\": the code in `currency`, else the record's `currencyField`, else the app's reporting currency, else EUR; `decimals` defaults to 2).\n\t\t * `map` turns a raw value into a label (translated). `parts` (on a `line`) lists paths, or `{ path, label?, format? }`, joined by `separator` (default \" · \"); empty parts are dropped.\n\t\t * - `source` — `{ register, schema, id }` or `{ url }`; omitted = the current object. An entry with `from: \"object\"` reads the current object even then (a client card that also shows the ticket's channel).\n\t\t * - `link` — `{ label, route? | href? }` at the foot.\n\t\t * - `hideEmpty` — drop an entry whose value is empty (default true).\n\t\t * - `columns` — `2` lays the rows out in two columns with the label above the value (board DqContact); a row with `parts` joins them like a line (an address on one row).\n\t\t * - `emptyText` — shown when no entry has a value.\n\t\t *\n\t\t * @type {{fields?: Array<object>, source?: object, link?: object, hideEmpty?: boolean, emptyText?: string}}\n\t\t */\n\t\tcontent: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * The current detail-page object, passed by the detail page host.\n\t\t * Read when `content.source` is not set.\n\t\t */\n\t\tobjectData: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** The current detail-page object id, for the `@objectId` token. */\n\t\tobjectId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\temits: ['header', 'reveal'],\n\n\tdata() {\n\t\treturn {\n\t\t\tfetched: null,\n\t\t\tloading: false,\n\t\t\terror: false,\n\t\t\t/** Keys of the masked rows the reader chose to show. */\n\t\t\trevealed: {},\n\t\t\t/** Key of the row whose value was just copied. */\n\t\t\tcopied: '',\n\t\t\t/** Labels of the referenced objects read so far, by `refKey`. */\n\t\t\tlabels: {},\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * Whether the rows sit in two columns, label above value.\n\t\t *\n\t\t * @spec openspec/changes/facts-columns/specs/facts-widget/spec.md#requirement-facts-rows-can-sit-in-two-columns\n\t\t * @return {boolean}\n\t\t */\n\t\ttwoColumns() {\n\t\t\treturn Number(this.content?.columns) === 2\n\t\t},\n\n\t\t/**\n\t\t * The token context: the detail object (prop, else the injected context)\n\t\t * and the page workspace.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\ttokenCtx() {\n\t\t\tconst unwrap = (c) => (c && typeof c === 'object' && 'value' in c ? c.value : c)\n\t\t\tconst injected = unwrap(this.cnObjectContext) || {}\n\t\t\treturn {\n\t\t\t\t...injected,\n\t\t\t\tobjectId: this.objectId ?? injected.objectId ?? this.objectData?.id ?? null,\n\t\t\t\tobject: this.objectData || injected.object || null,\n\t\t\t\tworkspace: unwrap(this.cnWorkspaceContext) || {},\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * The source declaration with its tokens resolved, or null for the current object.\n\t\t *\n\t\t * @return {object|null}\n\t\t */\n\t\tresolvedSource() {\n\t\t\tconst source = this.content?.source\n\t\t\tif (!source || typeof source !== 'object') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (typeof source.url === 'string' && source.url !== '') {\n\t\t\t\t// The endpoint grammar: tokens INSIDE the url, and a request\n\t\t\t\t// that is blocked while one leaves an empty path segment.\n\t\t\t\tconst request = resolveEndpointRequest({ url: source.url }, this.tokenCtx)\n\t\t\t\treturn { url: request.blocked ? '' : request.url }\n\t\t\t}\n\t\t\treturn resolveDeepTokens(source, this.tokenCtx)\n\t\t},\n\n\t\t/**\n\t\t * A stable key of the resolved source, so the widget refetches only when it changes.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tsourceKey() {\n\t\t\treturn this.resolvedSource ? JSON.stringify(this.resolvedSource) : ''\n\t\t},\n\n\t\t/**\n\t\t * The object the facts are read from.\n\t\t *\n\t\t * @return {object|null}\n\t\t */\n\t\trecord() {\n\t\t\treturn this.resolvedSource ? this.fetched : this.objectData\n\t\t},\n\n\t\t/**\n\t\t * The entries to draw, consecutive rows grouped into one list.\n\t\t *\n\t\t * @return {Array<object>}\n\t\t */\n\t\tblocks() {\n\t\t\tconst sourceRecord = this.record\n\t\t\tif (!sourceRecord) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\tconst fields = Array.isArray(this.content?.fields) ? this.content.fields : []\n\t\t\tconst hideEmpty = this.content?.hideEmpty !== false\n\t\t\tconst out = []\n\t\t\tfields.forEach((field, index) => {\n\t\t\t\tif (!field || typeof field !== 'object') {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\t// `from: \"object\"` reads the page's own object while the card shows a `source`.\n\t\t\t\tconst record = field.from === 'object' && this.objectData ? this.objectData : sourceRecord\n\t\t\t\tconst kind = this.kindOf(field)\n\t\t\t\tconst key = String(field.key || field.path || `${kind}-${index}`).replace(/[^\\w-]/g, '-')\n\t\t\t\tconst value = this.entryValue(record, field, kind)\n\t\t\t\tif (value === '' && (hideEmpty || kind === 'lead')) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif (kind === 'row') {\n\t\t\t\t\tconst last = out[out.length - 1]\n\t\t\t\t\tconst row = { key, label: this.tr(field.label || ''), value, ...this.rowExtras(record, field, value) }\n\t\t\t\t\tif (last && last.kind === 'rows') {\n\t\t\t\t\t\tlast.rows.push(row)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tout.push({ kind: 'rows', key: `rows-${index}`, rows: [row] })\n\t\t\t\t\t}\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tconst block = { kind, key, value }\n\t\t\t\tif (kind === 'lead') {\n\t\t\t\t\tblock.subtitle = this.partsValue(record, field.subtitle)\n\t\t\t\t\tblock.icon = typeof field.icon === 'string' ? field.icon : ''\n\t\t\t\t\tblock.initials = block.icon ? '' : this.initialsOf(readPath(record, field.initialsPath))\n\t\t\t\t\tblock.tone = ['success', 'info', 'warning', 'error'].includes(field.tone) ? field.tone : 'neutral'\n\t\t\t\t}\n\t\t\t\tif (kind === 'title' && field.route) {\n\t\t\t\t\tblock.to = this.resolveRoute(field.route, record)\n\t\t\t\t}\n\t\t\t\tif (kind === 'pill') {\n\t\t\t\t\tconst raw = readPath(record, field.path)\n\t\t\t\t\tconst colours = field.variantMap || field.colorMap\n\t\t\t\t\t// A resolved pill looks its tone up by the referenced object's tone field,\n\t\t\t\t\t// then by the resolved label, then by the stored value.\n\t\t\t\t\tconst keys = field.resolve && typeof field.resolve === 'object'\n\t\t\t\t\t\t? [toneSpec(field) ? this.refLabels(raw, toneSpec(field))[0] : undefined, this.refLabels(raw, field)[0], raw]\n\t\t\t\t\t\t: [raw]\n\t\t\t\t\tconst hit = colours ? keys.find((candidate) => (typeof candidate === 'string' || typeof candidate === 'number') && Object.hasOwn(colours, candidate)) : undefined\n\t\t\t\t\tconst variant = hit !== undefined ? colours[hit] : field.variant\n\t\t\t\t\tblock.variant = isBadgeVariant(variant) ? variant : 'default'\n\t\t\t\t}\n\t\t\t\tout.push(block)\n\t\t\t})\n\t\t\treturn out\n\t\t},\n\n\t\t/**\n\t\t * The foot link, resolved, or null.\n\t\t *\n\t\t * @return {{label: string, to?: object, href?: string}|null}\n\t\t */\n\t\tlink() {\n\t\t\tconst link = this.content?.link\n\t\t\tif (!link || typeof link !== 'object' || !link.label) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (link.route) {\n\t\t\t\tconst to = this.resolveRoute(link.route, this.record)\n\t\t\t\treturn to ? { label: this.tr(link.label), to } : null\n\t\t\t}\n\t\t\tif (typeof link.href === 'string' && link.href !== '') {\n\t\t\t\tconst href = this.resolveTemplate(link.href, this.record)\n\t\t\t\treturn href ? { label: this.tr(link.label), href } : null\n\t\t\t}\n\t\t\treturn null\n\t\t},\n\n\t\t/**\n\t\t * The action under the facts, as drawn: `{ label, icon }`, or null.\n\t\t *\n\t\t * @return {{label: string, icon: string}|null}\n\t\t * @spec openspec/changes/screens-relation-pages/specs/relation-pages/spec.md#requirement-the-facts-card-draws-contact-details-identity-and-a-lead\n\t\t */\n\t\taction() {\n\t\t\treturn this.actionView(this.content?.action)\n\t\t},\n\n\t\t/**\n\t\t * The header action, as drawn: `{ label, icon }`, or null.\n\t\t *\n\t\t * @return {{label: string, icon: string}|null}\n\t\t * @spec openspec/changes/screens-relation-pages/specs/relation-pages/spec.md#requirement-the-facts-card-draws-contact-details-identity-and-a-lead\n\t\t */\n\t\theaderAction() {\n\t\t\treturn this.actionView(this.content?.headerAction)\n\t\t},\n\n\t\t/** @return {string} The reveal button's text. */\n\t\tshowLabel() {\n\t\t\treturn t('nextcloud-vue', 'Show')\n\t\t},\n\n\t\t/**\n\t\t * The empty line.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\temptyLabel() {\n\t\t\treturn this.tr(this.content?.emptyText || 'Nothing to show yet')\n\t\t},\n\t},\n\n\twatch: {\n\t\tsourceKey: {\n\t\t\timmediate: true,\n\t\t\thandler() {\n\t\t\t\tthis.load()\n\t\t\t},\n\t\t},\n\n\t\trecord: {\n\t\t\timmediate: true,\n\t\t\thandler() {\n\t\t\t\tthis.loadLabels()\n\t\t\t},\n\t\t},\n\n\t\theaderAction: {\n\t\t\timmediate: true,\n\t\t\thandler() {\n\t\t\t\tthis.emitHeader()\n\t\t\t},\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Translate through the host app.\n\t\t *\n\t\t * @param {string} text The text.\n\t\t * @return {string}\n\t\t */\n\t\ttr(text) {\n\t\t\tif (typeof text !== 'string' || text === '') {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\treturn typeof this.cnTranslate === 'function' ? this.cnTranslate(text) : text\n\t\t},\n\n\t\t/**\n\t\t * The kind of a field entry.\n\t\t *\n\t\t * @param {object} field The entry.\n\t\t * @return {string} `row`, `title`, `line` or `pill`.\n\t\t */\n\t\tkindOf(field) {\n\t\t\tif (KINDS.includes(field.as)) {\n\t\t\t\treturn field.as\n\t\t\t}\n\t\t\treturn field.label || field.icon ? 'row' : 'line'\n\t\t},\n\n\t\t/**\n\t\t * The display text of an entry of any kind: a lead's title, the parts of\n\t\t * a line or text, a constant `text`, else the value at `path`.\n\t\t *\n\t\t * @param {object} record The object.\n\t\t * @param {object} field The entry.\n\t\t * @param {string} kind The entry's kind.\n\t\t * @return {string}\n\t\t * @spec openspec/changes/screens-relation-pages/specs/relation-pages/spec.md#requirement-the-facts-card-draws-contact-details-identity-and-a-lead\n\t\t */\n\t\tentryValue(record, field, kind) {\n\t\t\tif (kind === 'lead') {\n\t\t\t\treturn this.partsValue(record, field.title)\n\t\t\t}\n\t\t\tif ((kind === 'line' || kind === 'text' || kind === 'row') && Array.isArray(field.parts)) {\n\t\t\t\treturn this.lineValue(record, field)\n\t\t\t}\n\t\t\tif ((kind === 'line' || kind === 'text') && !field.path && typeof field.text === 'string') {\n\t\t\t\treturn this.tr(field.text)\n\t\t\t}\n\t\t\treturn this.valueOf(record, field)\n\t\t},\n\n\t\t/**\n\t\t * A lead's title or subtitle: a path, a part spec, or an array of parts\n\t\t * joined as a line joins them.\n\t\t *\n\t\t * @param {object} record The object.\n\t\t * @param {string|object|Array} spec The declaration.\n\t\t * @return {string}\n\t\t */\n\t\tpartsValue(record, spec) {\n\t\t\tif (typeof spec === 'string' && spec !== '') {\n\t\t\t\treturn this.valueOf(record, { path: spec })\n\t\t\t}\n\t\t\tif (Array.isArray(spec)) {\n\t\t\t\treturn this.lineValue(record, { parts: spec })\n\t\t\t}\n\t\t\tif (spec && typeof spec === 'object') {\n\t\t\t\treturn this.lineValue(record, { parts: [spec] })\n\t\t\t}\n\t\t\treturn ''\n\t\t},\n\n\t\t/**\n\t\t * The initials of a name: \"Sanne de Vries\" reads \"SV\".\n\t\t *\n\t\t * @param {unknown} name The name.\n\t\t * @return {string}\n\t\t */\n\t\tinitialsOf(name) {\n\t\t\tif (typeof name !== 'string' || name.trim() === '') {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst words = name.trim().split(/\\s+/).filter((word) => /^\\p{Lu}/u.test(word))\n\t\t\tconst picked = words.length ? words : name.trim().split(/\\s+/)\n\t\t\tconst first = picked[0].charAt(0)\n\t\t\tconst last = picked.length > 1 ? picked[picked.length - 1].charAt(0) : ''\n\t\t\treturn (first + last).toUpperCase()\n\t\t},\n\n\t\t/**\n\t\t * What a row adds to its value: an icon, a link for the email, phone\n\t\t * and url formats, the masked text, and the copy and reveal buttons.\n\t\t *\n\t\t * @param {object} record The object.\n\t\t * @param {object} field The entry.\n\t\t * @param {string} value The display text.\n\t\t * @return {object}\n\t\t * @spec openspec/changes/screens-relation-pages/specs/relation-pages/spec.md#requirement-the-facts-card-draws-contact-details-identity-and-a-lead\n\t\t */\n\t\trowExtras(record, field, value) {\n\t\t\tconst extras = {\n\t\t\t\ticon: typeof field.icon === 'string' ? field.icon : '',\n\t\t\t\tpath: field.path || '',\n\t\t\t\traw: readPath(record, field.path),\n\t\t\t\tcopy: field.copy === true && value !== '',\n\t\t\t\treveal: false,\n\t\t\t\tmasked: '',\n\t\t\t\thref: '',\n\t\t\t\texternal: false,\n\t\t\t}\n\t\t\tif (value === '') {\n\t\t\t\treturn extras\n\t\t\t}\n\t\t\tif (field.format === 'email') {\n\t\t\t\textras.href = `mailto:${value}`\n\t\t\t} else if (field.format === 'phone') {\n\t\t\t\textras.href = `tel:${value.replace(/[^\\d+]/g, '')}`\n\t\t\t} else if (field.format === 'url') {\n\t\t\t\textras.href = /^https?:\\/\\//i.test(value) ? value : `https://${value}`\n\t\t\t\textras.external = true\n\t\t\t} else if (field.format === 'masked') {\n\t\t\t\textras.masked = value.length > 4 ? '*'.repeat(Math.min(value.length - 4, 5)) + value.slice(-4) : value\n\t\t\t\textras.reveal = field.reveal === true && value.length > 4\n\t\t\t}\n\t\t\treturn extras\n\t\t},\n\n\t\t/**\n\t\t * Show a masked value, and say so: the `reveal` event and the event-bus\n\t\t * channel {@link FACTS_REVEAL_CHANNEL}, so an app can log who saw it.\n\t\t *\n\t\t * @param {object} row The row.\n\t\t * @spec openspec/changes/screens-relation-pages/specs/relation-pages/spec.md#requirement-the-facts-card-draws-contact-details-identity-and-a-lead\n\t\t */\n\t\treveal(row) {\n\t\t\tthis.revealed = { ...this.revealed, [row.key]: true }\n\t\t\tconst detail = { path: row.path }\n\t\t\t/**\n\t\t\t * @event reveal Emitted when the reader shows a masked value.\n\t\t\t * @type {{path: string}} The path of the shown field.\n\t\t\t */\n\t\t\tthis.$emit('reveal', detail)\n\t\t\temit(FACTS_REVEAL_CHANNEL, { ...detail, objectId: this.tokenCtx.objectId, register: this.tokenCtx.register || null, schema: this.tokenCtx.schema || null })\n\t\t},\n\n\t\t/**\n\t\t * Copy a row's value to the clipboard.\n\t\t *\n\t\t * @param {object} row The row.\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync copy(row) {\n\t\t\tconst text = row.raw === null || row.raw === undefined || typeof row.raw === 'object' ? row.value : String(row.raw)\n\t\t\ttry {\n\t\t\t\tawait navigator.clipboard.writeText(text)\n\t\t\t\tthis.copied = row.key\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tif (this.copied === row.key) {\n\t\t\t\t\t\tthis.copied = ''\n\t\t\t\t\t}\n\t\t\t\t}, 2000)\n\t\t\t} catch (e) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn('[CnFactsWidget] could not copy:', e?.message || e)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * @param {object} row The row.\n\t\t * @return {string} The copy button's accessible name.\n\t\t */\n\t\tcopyLabel(row) {\n\t\t\treturn this.copied === row.key\n\t\t\t\t? t('nextcloud-vue', 'Copied')\n\t\t\t\t: t('nextcloud-vue', 'Copy {label}', { label: row.label || row.value })\n\t\t},\n\n\t\t/**\n\t\t * @param {object} row The row.\n\t\t * @return {string} The reveal button's accessible name.\n\t\t */\n\t\trevealLabel(row) {\n\t\t\treturn t('nextcloud-vue', 'Show {label}', { label: row.label || '' }).trim()\n\t\t},\n\n\t\t/**\n\t\t * The drawn part of an action declaration.\n\t\t *\n\t\t * @param {object} action The declaration.\n\t\t * @return {{label: string, icon: string}|null}\n\t\t */\n\t\tactionView(action) {\n\t\t\tif (!action || typeof action !== 'object' || typeof action.label !== 'string' || action.label === '') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn { label: this.tr(action.label), icon: typeof action.icon === 'string' ? action.icon : '' }\n\t\t},\n\n\t\t/**\n\t\t * Dispatch an action with the record's tokens resolved (`@objectId`,\n\t\t * `@object.<field>`), through the page's dispatcher when there is one.\n\t\t *\n\t\t * @param {object} action The declaration.\n\t\t * @return {unknown}\n\t\t * @spec openspec/changes/screens-relation-pages/specs/relation-pages/spec.md#requirement-the-facts-card-draws-contact-details-identity-and-a-lead\n\t\t */\n\t\trunAction(action) {\n\t\t\tif (!action || typeof action !== 'object') {\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\tconst resolved = resolveDeepTokens(action, this.tokenCtx)\n\t\t\tif (typeof this.cnDispatchAction === 'function') {\n\t\t\t\treturn this.cnDispatchAction(resolved)\n\t\t\t}\n\t\t\treturn dispatchAction(resolved, { router: this.$router || null })\n\t\t},\n\n\t\t/** Tell the card around the facts what its header shows (the header action). */\n\t\temitHeader() {\n\t\t\tconst view = this.headerAction\n\t\t\t/**\n\t\t\t * @event header Emitted with the card header's parts: the header action, if any.\n\t\t\t * @type {{link: null, note: string, action: (object|null)}} `action` is `{ label, icon, run }`.\n\t\t\t */\n\t\t\tthis.$emit('header', {\n\t\t\t\tlink: null,\n\t\t\t\tnote: '',\n\t\t\t\taction: view ? { ...view, run: () => this.runAction(this.content.headerAction) } : null,\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * The text of a reference: the labels of the objects its id(s) name, joined\n\t\t * by \", \". An id whose label is not known yet (or cannot be read) adds nothing.\n\t\t *\n\t\t * @param {unknown} raw The id, or a list of ids (or of `{ id }` objects).\n\t\t * @param {object} spec `{ resolve: { register, schema, labelField? }, itemPath? }`.\n\t\t * @return {string}\n\t\t */\n\t\trefText(raw, spec) {\n\t\t\treturn this.refLabels(raw, spec)\n\t\t\t\t.map((label) => (spec.map && Object.hasOwn(spec.map, label) ? this.tr(spec.map[label]) : label))\n\t\t\t\t.join(', ')\n\t\t},\n\n\t\t/**\n\t\t * The labels of a reference as read, before `map` is applied: the key a\n\t\t * pill's `variantMap` and `colorMap` look up.\n\t\t *\n\t\t * @param {unknown} raw The id, or a list of ids.\n\t\t * @param {object} spec `{ resolve, itemPath? }`.\n\t\t * @return {string[]}\n\t\t */\n\t\trefLabels(raw, spec) {\n\t\t\treturn this.refIds(raw, spec)\n\t\t\t\t.map((id) => this.labels[refKey(spec.resolve, id)])\n\t\t\t\t.filter((label) => typeof label === 'string' && label !== '')\n\t\t},\n\n\t\t/**\n\t\t * The ids a reference value holds.\n\t\t *\n\t\t * @param {unknown} raw The value.\n\t\t * @param {object} spec `{ itemPath? }`.\n\t\t * @return {string[]}\n\t\t */\n\t\trefIds(raw, spec) {\n\t\t\treturn (Array.isArray(raw) ? raw : [raw])\n\t\t\t\t.map((item) => (item && typeof item === 'object' ? (spec.itemPath ? readPath(item, spec.itemPath) : (item.id ?? item.uuid)) : item))\n\t\t\t\t.filter((id) => id !== null && id !== undefined && id !== '' && typeof id !== 'object')\n\t\t\t\t.map(String)\n\t\t},\n\n\t\t/**\n\t\t * Every entry or part that carries `resolve`, with the record's value at its path.\n\t\t *\n\t\t * @param {object} record The object.\n\t\t * @return {Array<{spec: object, raw: unknown}>}\n\t\t */\n\t\trefSpecs(record) {\n\t\t\tconst fields = Array.isArray(this.content?.fields) ? this.content.fields : []\n\t\t\tconst specs = []\n\t\t\tconst visit = (spec) => {\n\t\t\t\tif (!spec || typeof spec !== 'object') {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif (spec.resolve && typeof spec.resolve === 'object' && spec.path) {\n\t\t\t\t\tspecs.push({ spec, raw: readPath(record, spec.path) })\n\t\t\t\t\tif (toneSpec(spec)) {\n\t\t\t\t\t\tspecs.push({ spec: toneSpec(spec), raw: readPath(record, spec.path) })\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst nested = [...(Array.isArray(spec.parts) ? spec.parts : []), ...(Array.isArray(spec.title) ? spec.title : [spec.title]), ...(Array.isArray(spec.subtitle) ? spec.subtitle : [spec.subtitle])]\n\t\t\t\tnested.forEach(visit)\n\t\t\t}\n\t\t\tfields.forEach(visit)\n\t\t\treturn specs\n\t\t},\n\n\t\t/**\n\t\t * Read the labels of the referenced objects, one batched request per\n\t\t * register and schema, and keep them in `labels`.\n\t\t *\n\t\t * @param {object|null} record The object shown (defaults to the current record).\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync loadLabels(record = this.record) {\n\t\t\tif (!record) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst groups = new Map()\n\t\t\tfor (const { spec, raw } of this.refSpecs(record)) {\n\t\t\t\tconst { register, schema, labelField } = spec.resolve\n\t\t\t\tif (!register || !schema) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tconst groupKey = `${register}/${schema}/${labelField || ''}`\n\t\t\t\tconst group = groups.get(groupKey) || { resolve: spec.resolve, ids: new Set() }\n\t\t\t\tthis.refIds(raw, spec).forEach((id) => group.ids.add(id))\n\t\t\t\tgroups.set(groupKey, group)\n\t\t\t}\n\t\t\tif (groups.size === 0) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst resolver = sharedRefLabels()\n\t\t\tconst next = { ...this.labels }\n\t\t\tawait Promise.all([...groups.values()].map(async ({ resolve, ids }) => {\n\t\t\t\tconst found = await resolver.resolve(resolve.register, resolve.schema, [...ids], resolve.labelField)\n\t\t\t\tObject.entries(found).forEach(([id, label]) => {\n\t\t\t\t\tnext[refKey(resolve, id)] = label\n\t\t\t\t})\n\t\t\t}))\n\t\t\tthis.labels = next\n\t\t},\n\n\t\t/**\n\t\t * Read the source object.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync load() {\n\t\t\tconst source = this.resolvedSource\n\t\t\tthis.error = false\n\t\t\tif (!source) {\n\t\t\t\tthis.fetched = null\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst url = this.sourceUrl(source)\n\t\t\tif (!url) {\n\t\t\t\tthis.fetched = null\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\t\timport('@nextcloud/router'),\n\t\t\t\t])\n\t\t\t\tconst full = url.startsWith('/apps/') || url.startsWith('/ocs/') ? generateUrl(url) : url\n\t\t\t\tconst response = await axios.get(full)\n\t\t\t\tconst data = response && response.data\n\t\t\t\tthis.fetched = data && typeof data === 'object' && !Array.isArray(data) ? data : null\n\t\t\t} catch (e) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn('[CnFactsWidget] the source could not be read:', e?.message || e)\n\t\t\t\tthis.fetched = null\n\t\t\t\tthis.error = true\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * The URL of a resolved source, or '' when it cannot be read yet.\n\t\t *\n\t\t * @param {object} source The resolved source.\n\t\t * @return {string}\n\t\t */\n\t\tsourceUrl(source) {\n\t\t\tif (typeof source.url === 'string') {\n\t\t\t\treturn source.url\n\t\t\t}\n\t\t\tif (hasUnresolvedDeepTokens(source)) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst { register, schema, id } = source\n\t\t\tif (!register || !schema || id === undefined || id === null || id === '' || typeof id === 'object') {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\treturn `/apps/openregister/api/objects/${encodeURIComponent(register)}/${encodeURIComponent(schema)}/${encodeURIComponent(String(id))}`\n\t\t},\n\n\t\t/**\n\t\t * The display text of one field.\n\t\t *\n\t\t * @param {object} record The object.\n\t\t * @param {object} field The entry.\n\t\t * @return {string}\n\t\t */\n\t\tvalueOf(record, field) {\n\t\t\tconst raw = readPath(record, field.path)\n\t\t\treturn this.format(raw, field, record)\n\t\t},\n\n\t\t/**\n\t\t * The text of a `line` entry that joins several parts.\n\t\t *\n\t\t * @param {object} record The object.\n\t\t * @param {object} field The entry.\n\t\t * @return {string}\n\t\t */\n\t\tlineValue(record, field) {\n\t\t\tconst separator = typeof field.separator === 'string' ? field.separator : ' · '\n\t\t\treturn field.parts\n\t\t\t\t.map((part) => {\n\t\t\t\t\tconst spec = typeof part === 'string' ? { path: part } : (part || {})\n\t\t\t\t\t// A constant part (`{ text }`): \"Handelsregister\" after the legal form.\n\t\t\t\t\tif (!spec.path && typeof spec.text === 'string') {\n\t\t\t\t\t\treturn this.tr(spec.text)\n\t\t\t\t\t}\n\t\t\t\t\t// A group of parts with its own separator (\"Parkstraat 24\" inside\n\t\t\t\t\t// \"Parkstraat 24, 3421 AB Zuiddrecht\").\n\t\t\t\t\tif (!spec.path && Array.isArray(spec.parts)) {\n\t\t\t\t\t\treturn this.lineValue(record, spec)\n\t\t\t\t\t}\n\t\t\t\t\tconst value = this.format(readPath(record, spec.path), spec, record)\n\t\t\t\t\tif (value === '') {\n\t\t\t\t\t\treturn ''\n\t\t\t\t\t}\n\t\t\t\t\treturn spec.label ? `${this.tr(spec.label)} ${value}` : value\n\t\t\t\t})\n\t\t\t\t.filter((value) => value !== '')\n\t\t\t\t.join(separator)\n\t\t},\n\n\t\t/**\n\t\t * Format a raw value.\n\t\t *\n\t\t * @param {unknown} raw The value.\n\t\t * @param {object} spec `{ format?, map?, itemPath?, currency?, currencyField?, decimals? }`.\n\t\t * @param {object|null} [record] The object shown, which `currencyField` reads.\n\t\t * @return {string} The text, '' when empty.\n\t\t * @spec openspec/changes/facts-currency-format/specs/facts-widget/spec.md#requirement-a-facts-entry-can-show-a-money-amount\n\t\t * @spec openspec/changes/facts-user-format/specs/facts-widget/spec.md#requirement-a-facts-entry-can-show-a-user-by-name\n\t\t */\n\t\tformat(raw, spec, record = null) {\n\t\t\tif (raw === null || raw === undefined || raw === '') {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tif (spec.resolve && typeof spec.resolve === 'object') {\n\t\t\t\treturn this.refText(raw, spec)\n\t\t\t}\n\t\t\tconst format = spec.format || 'text'\n\t\t\tif (format === 'list' || Array.isArray(raw)) {\n\t\t\t\tconst items = (Array.isArray(raw) ? raw : [raw])\n\t\t\t\t\t.map((item) => (spec.itemPath && item && typeof item === 'object' ? readPath(item, spec.itemPath) : item))\n\t\t\t\t\t.map((item) => this.format(item, { ...spec, format: 'text' }))\n\t\t\t\t\t.filter((item) => item !== '')\n\t\t\t\treturn items.join(', ')\n\t\t\t}\n\t\t\tif (format === 'date' || format === 'date-long') {\n\t\t\t\tconst date = parseDateValue(raw)\n\t\t\t\tif (date === null) {\n\t\t\t\t\treturn ''\n\t\t\t\t}\n\t\t\t\t// A year far from now forces the long form, so date-long reuses the board formatter.\n\t\t\t\treturn format === 'date-long'\n\t\t\t\t\t? formatBoardDate(date, new Date(date.getFullYear() + 1, 0, 1))\n\t\t\t\t\t: formatBoardDate(date)\n\t\t\t}\n\t\t\tif (format === 'user') {\n\t\t\t\treturn userDisplayName(raw)\n\t\t\t}\n\t\t\tif (format === 'currency') {\n\t\t\t\tconst money = formatMoney(raw, { currency: spec.currency, currencyField: spec.currencyField, decimals: spec.decimals }, record, unwrapAppConfig(this.cnAppConfig))\n\t\t\t\tif (money !== '') {\n\t\t\t\t\treturn money\n\t\t\t\t}\n\t\t\t\t// Not a number: shown as written, never as \"[object Object]\".\n\t\t\t\treturn typeof raw === 'object' ? '' : String(raw)\n\t\t\t}\n\t\t\tif (typeof raw === 'object') {\n\t\t\t\tconst label = raw.title || raw.name || raw.label || raw.displayName\n\t\t\t\treturn typeof label === 'string' ? label : ''\n\t\t\t}\n\t\t\tif (typeof raw === 'boolean') {\n\t\t\t\tconst mapped = spec.map && spec.map[String(raw)]\n\t\t\t\treturn mapped ? this.tr(mapped) : this.tr(raw ? 'Yes' : 'No')\n\t\t\t}\n\t\t\tif (spec.map && Object.hasOwn(spec.map, String(raw))) {\n\t\t\t\treturn this.tr(spec.map[String(raw)])\n\t\t\t}\n\t\t\treturn String(raw)\n\t\t},\n\n\t\t/**\n\t\t * Replace `@source.<field>` / `@source.id` and the shared tokens in a string.\n\t\t *\n\t\t * @param {string} value The template.\n\t\t * @param {object|null} record The object shown.\n\t\t * @return {string} The value, '' when a token stays unresolved.\n\t\t */\n\t\tresolveTemplate(value, record) {\n\t\t\tif (typeof value !== 'string') {\n\t\t\t\treturn value\n\t\t\t}\n\t\t\tlet unresolved = false\n\t\t\tconst replaced = value.replace(/@source\\.([\\w.@]+)/g, (match, path) => {\n\t\t\t\tconst read = record ? (path === 'id' ? (record.id ?? readPath(record, '@self.id')) : readPath(record, path)) : undefined\n\t\t\t\tif (read === undefined || read === null || read === '') {\n\t\t\t\t\tunresolved = true\n\t\t\t\t\treturn match\n\t\t\t\t}\n\t\t\t\treturn String(read)\n\t\t\t})\n\t\t\tif (unresolved) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tif (replaced.charAt(0) === '@') {\n\t\t\t\tconst resolved = resolveDeepTokens(replaced, this.tokenCtx)\n\t\t\t\treturn typeof resolved === 'string' && resolved.charAt(0) === '@' ? '' : String(resolved)\n\t\t\t}\n\t\t\treturn replaced\n\t\t},\n\n\t\t/**\n\t\t * Resolve a route declaration (`{ name, params?, query? }`).\n\t\t *\n\t\t * @param {object} route The declaration.\n\t\t * @param {object|null} record The object shown.\n\t\t * @return {object|null} The route, or null when a param stays unresolved.\n\t\t */\n\t\tresolveRoute(route, record) {\n\t\t\tif (!route || typeof route !== 'object' || !route.name) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst out = { name: route.name }\n\t\t\tfor (const key of ['params', 'query']) {\n\t\t\t\tif (route[key] && typeof route[key] === 'object') {\n\t\t\t\t\tout[key] = {}\n\t\t\t\t\tfor (const [name, value] of Object.entries(route[key])) {\n\t\t\t\t\t\tconst resolved = this.resolveTemplate(value, record)\n\t\t\t\t\t\tif (resolved === '') {\n\t\t\t\t\t\t\treturn null\n\t\t\t\t\t\t}\n\t\t\t\t\t\tout[key][name] = resolved\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn out\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-facts-widget {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 10px;\n\tmin-width: 0;\n}\n\n.cn-facts-widget__rows {\n\tdisplay: grid;\n\tgrid-template-columns: max-content 1fr;\n\tgap: 8px 16px;\n\tmargin: 0;\n\tfont-size: 14px;\n}\n\n/* Each row is a grid of its own children: the wrapper takes no box. */\n.cn-facts-widget__row {\n\tdisplay: contents;\n}\n\n/* Nextcloud core styles `dt` and `dd` (text-align end, 12px padding), which\n pushed the label to the right of its column and added 12px around both. The\n class is doubled so these resets outrank that rule, and a dossiq-style\n `:deep()` override in an app is not needed. */\n.cn-facts-widget__label.cn-facts-widget__label {\n\tmargin: 0;\n\tpadding: 0;\n\ttext-align: start;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-facts-widget__value.cn-facts-widget__value {\n\tmargin: 0;\n\tpadding: 0;\n\ttext-align: start;\n\tfont-weight: 500;\n\tmin-width: 0;\n\toverflow-wrap: anywhere;\n}\n\n.cn-facts-widget__title {\n\tfont-size: 15px;\n\tfont-weight: 600;\n\tcolor: var(--color-main-text);\n}\n\n.cn-facts-widget__line {\n\tfont-size: 13px;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-facts-widget__muted {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-facts-widget__label .hidden-visually {\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\n}\n\n.cn-facts-widget__label--icon {\n\talign-items: center;\n\tdisplay: flex;\n}\n\n.cn-facts-widget__value-link {\n\tcolor: var(--color-primary-element);\n\ttext-decoration: underline;\n}\n\n.cn-facts-widget__inline-button,\n.cn-facts-widget__icon-button,\n.cn-facts-widget__action {\n\talign-items: center;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\tfont: inherit;\n}\n\n.cn-facts-widget__inline-button {\n\tbackground: var(--color-main-background);\n\tborder: 1px solid var(--color-border-dark);\n\tborder-radius: 16px;\n\tfont-size: 13px;\n\tfont-weight: 600;\n\tgap: 4px;\n\tmargin-inline-start: 8px;\n\tmin-height: 28px;\n\tpadding: 0 10px;\n}\n\n.cn-facts-widget__icon-button {\n\tbackground: transparent;\n\tborder: 0;\n\tborder-radius: 6px;\n\tcolor: var(--color-text-maxcontrast);\n\tmargin-inline-start: 4px;\n\tpadding: 2px;\n\tvertical-align: middle;\n}\n\n.cn-facts-widget__icon-button:hover,\n.cn-facts-widget__icon-button:focus-visible {\n\tbackground: var(--color-background-hover);\n\tcolor: var(--color-main-text);\n}\n\n.cn-facts-widget__text {\n\tcolor: var(--color-main-text);\n\tfont-size: 15px;\n}\n\n/* A lead: an icon tile or initials beside a bold title and a muted subtitle. */\n.cn-facts-widget__lead {\n\talign-items: center;\n\tdisplay: flex;\n\tgap: 12px;\n}\n\n.cn-facts-widget__lead-tile {\n\talign-items: center;\n\tbackground: var(--color-background-dark);\n\tborder-radius: 8px;\n\tcolor: var(--color-main-text);\n\tdisplay: flex;\n\tflex: none;\n\tfont-size: 14px;\n\tfont-weight: 700;\n\theight: 40px;\n\tjustify-content: center;\n\twidth: 40px;\n}\n\n.cn-facts-widget__lead-tile--success {\n\tbackground: color-mix(in srgb, var(--color-success) 14%, var(--color-main-background));\n\tborder-radius: 50%;\n\tcolor: var(--color-success-text, var(--color-success));\n}\n\n.cn-facts-widget__lead-tile--info {\n\tbackground: var(--color-primary-element-light);\n\tborder-radius: 50%;\n\tcolor: var(--color-primary-element-light-text, var(--color-primary-element));\n}\n\n.cn-facts-widget__lead-text {\n\tdisplay: flex;\n\tflex-direction: column;\n\tmin-width: 0;\n}\n\n.cn-facts-widget__lead-title {\n\tfont-size: 15px;\n}\n\n.cn-facts-widget__lead-subtitle {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n}\n\n.cn-facts-widget__action {\n\talign-self: flex-start;\n\tbackground: var(--color-primary-element-light);\n\tborder: 0;\n\tborder-radius: 16px;\n\tcolor: var(--color-primary-element-light-text, var(--color-primary-element));\n\tfont-size: 13px;\n\tfont-weight: 700;\n\tgap: 6px;\n\tmin-height: 32px;\n\tpadding: 0 14px;\n}\n\n.cn-facts-widget__action:hover,\n.cn-facts-widget__action:focus-visible {\n\tbackground: var(--color-primary-element-light-hover, var(--color-primary-element-light));\n}\n\n.cn-facts-widget__link {\n\tfont-size: 14px;\n\tfont-weight: 600;\n\tcolor: var(--color-primary-element);\n\ttext-decoration: underline;\n}\n\n/* `columns: 2` (board DqContact): two columns, the label above the value, a\n hairline under each fact; one column on a phone. */\n.cn-facts-widget__rows--columns {\n\tgrid-template-columns: repeat(2, minmax(0, 1fr));\n\tgap: 14px 24px;\n\tfont-size: 15px;\n}\n\n.cn-facts-widget__rows--columns .cn-facts-widget__row {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 3px;\n\tmin-width: 0;\n\tpadding-bottom: 10px;\n\tborder-bottom: 1px solid var(--color-border);\n}\n\n.cn-facts-widget__rows--columns .cn-facts-widget__label.cn-facts-widget__label {\n\tfont-size: 13px;\n}\n\n@media (max-width: 640px) {\n\t.cn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IAAI,EAAE,KAAK,CAAA,IAAK,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE;MACvD,MAAM,QAAS,GAAE,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAA;AACnD,MAAA,IAAI,aAAa,EAAE,EAAE;AACpB,OAAA,OAAO,IAAG;AACX,OAAA;MACA,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA,GAAI,SAAO;AACzB,MAAA;AACD,KAAA;AACD,IAAA;AACA,GAAA,OAAO,GAAE;GACT;EACD;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"CnFactsWidget.vue2.js","sources":["../../../../src/components/CnFactsWidget/CnFactsWidget.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<div class=\"cn-facts-widget\" data-testid=\"cn-facts-widget\">\n\t\t<p v-if=\"error\" class=\"cn-facts-widget__muted\" data-testid=\"cn-facts-error\">\n\t\t\t{{ tr('Could not load this information') }}\n\t\t</p>\n\t\t<div v-else-if=\"loading && !record\" class=\"cn-facts-widget__loading\">\n\t\t\t<NcLoadingIcon :size=\"20\" />\n\t\t</div>\n\t\t<p v-else-if=\"blocks.length === 0\" class=\"cn-facts-widget__muted\" data-testid=\"cn-facts-empty\">\n\t\t\t{{ emptyLabel }}\n\t\t</p>\n\t\t<template v-else>\n\t\t\t<template v-for=\"block in blocks\" :key=\"block.key\">\n\t\t\t\t<dl\n\t\t\t\t\tv-if=\"block.kind === 'rows'\"\n\t\t\t\t\tclass=\"cn-facts-widget__rows\"\n\t\t\t\t\t:class=\"{ 'cn-facts-widget__rows--columns': twoColumns }\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-for=\"row in block.rows\"\n\t\t\t\t\t\t:key=\"row.key\"\n\t\t\t\t\t\tclass=\"cn-facts-widget__row\"\n\t\t\t\t\t\t:data-testid=\"`cn-fact-${row.key}`\">\n\t\t\t\t\t\t<dt class=\"cn-facts-widget__label\" :class=\"{ 'cn-facts-widget__label--icon': row.icon }\">\n\t\t\t\t\t\t\t<CnIcon\n\t\t\t\t\t\t\t\tv-if=\"row.icon\"\n\t\t\t\t\t\t\t\t:name=\"row.icon\"\n\t\t\t\t\t\t\t\t:size=\"18\"\n\t\t\t\t\t\t\t\taria-hidden=\"true\" />\n\t\t\t\t\t\t\t<span :class=\"{ 'hidden-visually': row.icon }\">{{ row.label }}</span>\n\t\t\t\t\t\t</dt>\n\t\t\t\t\t\t<dd class=\"cn-facts-widget__value\">\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\tv-if=\"row.href\"\n\t\t\t\t\t\t\t\t:href=\"row.href\"\n\t\t\t\t\t\t\t\tclass=\"cn-facts-widget__value-link\"\n\t\t\t\t\t\t\t\t:target=\"row.external ? '_blank' : undefined\"\n\t\t\t\t\t\t\t\t:rel=\"row.external ? 'noopener noreferrer' : undefined\">{{ row.value }}</a>\n\t\t\t\t\t\t\t<span v-else>{{ row.masked && !revealed[row.key] ? row.masked : row.value }}</span>\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tv-if=\"row.reveal && !revealed[row.key]\"\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tclass=\"cn-facts-widget__inline-button\"\n\t\t\t\t\t\t\t\t:aria-label=\"revealLabel(row)\"\n\t\t\t\t\t\t\t\t:data-testid=\"`cn-fact-reveal-${row.key}`\"\n\t\t\t\t\t\t\t\t@click=\"reveal(row)\">\n\t\t\t\t\t\t\t\t<EyeOutline :size=\"16\" aria-hidden=\"true\" />\n\t\t\t\t\t\t\t\t{{ showLabel }}\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tv-if=\"row.copy\"\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tclass=\"cn-facts-widget__icon-button\"\n\t\t\t\t\t\t\t\t:aria-label=\"copyLabel(row)\"\n\t\t\t\t\t\t\t\t:title=\"copyLabel(row)\"\n\t\t\t\t\t\t\t\t:data-testid=\"`cn-fact-copy-${row.key}`\"\n\t\t\t\t\t\t\t\t@click=\"copy(row)\">\n\t\t\t\t\t\t\t\t<Check v-if=\"copied === row.key\" :size=\"16\" aria-hidden=\"true\" />\n\t\t\t\t\t\t\t\t<ContentCopy v-else :size=\"16\" aria-hidden=\"true\" />\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</dd>\n\t\t\t\t\t</div>\n\t\t\t\t</dl>\n\t\t\t\t<component\n\t\t\t\t\t:is=\"block.to ? 'router-link' : 'strong'\"\n\t\t\t\t\tv-else-if=\"block.kind === 'title'\"\n\t\t\t\t\t:to=\"block.to || undefined\"\n\t\t\t\t\tclass=\"cn-facts-widget__title\"\n\t\t\t\t\t:data-testid=\"`cn-fact-${block.key}`\">\n\t\t\t\t\t{{ block.value }}\n\t\t\t\t</component>\n\t\t\t\t<span\n\t\t\t\t\tv-else-if=\"block.kind === 'line'\"\n\t\t\t\t\tclass=\"cn-facts-widget__line\"\n\t\t\t\t\t:data-testid=\"`cn-fact-${block.key}`\">\n\t\t\t\t\t{{ block.value }}\n\t\t\t\t</span>\n\t\t\t\t<span\n\t\t\t\t\tv-else-if=\"block.kind === 'text'\"\n\t\t\t\t\tclass=\"cn-facts-widget__text\"\n\t\t\t\t\t:data-testid=\"`cn-fact-${block.key}`\">\n\t\t\t\t\t{{ block.value }}\n\t\t\t\t</span>\n\t\t\t\t<div\n\t\t\t\t\tv-else-if=\"block.kind === 'lead'\"\n\t\t\t\t\tclass=\"cn-facts-widget__lead\"\n\t\t\t\t\t:data-testid=\"`cn-fact-${block.key}`\">\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass=\"cn-facts-widget__lead-tile\"\n\t\t\t\t\t\t:class=\"`cn-facts-widget__lead-tile--${block.tone}`\"\n\t\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t\t<CnIcon v-if=\"block.icon\" :name=\"block.icon\" :size=\"20\" />\n\t\t\t\t\t\t<template v-else>{{ block.initials }}</template>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span class=\"cn-facts-widget__lead-text\">\n\t\t\t\t\t\t<strong class=\"cn-facts-widget__lead-title\">{{ block.value }}</strong>\n\t\t\t\t\t\t<span v-if=\"block.subtitle\" class=\"cn-facts-widget__lead-subtitle\">{{ block.subtitle }}</span>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tv-else-if=\"block.kind === 'meter'\"\n\t\t\t\t\tclass=\"cn-facts-widget__meter\"\n\t\t\t\t\t:class=\"{ 'cn-facts-widget__meter--over': block.over }\"\n\t\t\t\t\t:data-testid=\"`cn-fact-${block.key}`\">\n\t\t\t\t\t<div class=\"cn-facts-widget__meter-head\">\n\t\t\t\t\t\t<span class=\"cn-facts-widget__meter-label\">{{ block.label }}</span>\n\t\t\t\t\t\t<span class=\"cn-facts-widget__meter-value\">{{ block.value }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-if=\"block.limit !== null\"\n\t\t\t\t\t\tclass=\"cn-facts-widget__meter-track\"\n\t\t\t\t\t\trole=\"meter\"\n\t\t\t\t\t\t:aria-label=\"block.label\"\n\t\t\t\t\t\t:aria-valuenow=\"block.amount\"\n\t\t\t\t\t\taria-valuemin=\"0\"\n\t\t\t\t\t\t:aria-valuemax=\"block.limit\"\n\t\t\t\t\t\t:aria-valuetext=\"block.value\"\n\t\t\t\t\t\t:data-testid=\"`cn-fact-${block.key}-bar`\">\n\t\t\t\t\t\t<span class=\"cn-facts-widget__meter-bar\" :style=\"{ width: `${block.percent}%` }\" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div v-else-if=\"block.kind === 'pill'\">\n\t\t\t\t\t<CnStatusBadge\n\t\t\t\t\t\t:label=\"block.value\"\n\t\t\t\t\t\t:variant=\"block.variant\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t:data-testid=\"`cn-fact-${block.key}`\" />\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t</template>\n\t\t<component\n\t\t\t:is=\"link.to ? 'router-link' : 'a'\"\n\t\t\tv-if=\"link && record\"\n\t\t\t:to=\"link.to || undefined\"\n\t\t\t:href=\"link.href || undefined\"\n\t\t\tclass=\"cn-facts-widget__link\"\n\t\t\tdata-testid=\"cn-facts-link\">\n\t\t\t{{ link.label }}\n\t\t</component>\n\t\t<button\n\t\t\tv-if=\"action && record\"\n\t\t\ttype=\"button\"\n\t\t\tclass=\"cn-facts-widget__action\"\n\t\t\tdata-testid=\"cn-facts-action\"\n\t\t\t@click=\"runAction(content.action)\">\n\t\t\t<CnIcon v-if=\"action.icon\" :name=\"action.icon\" :size=\"16\" />\n\t\t\t{{ action.label }}\n\t\t</button>\n\t</div>\n</template>\n\n<script>\nimport { emit } from '@nextcloud/event-bus'\nimport { formatFileSize } from '@nextcloud/files'\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcLoadingIcon } from '@nextcloud/vue'\nimport Check from 'vue-material-design-icons/Check.vue'\nimport ContentCopy from 'vue-material-design-icons/ContentCopy.vue'\nimport EyeOutline from 'vue-material-design-icons/EyeOutline.vue'\nimport CnIcon from '../CnIcon/CnIcon.vue'\nimport CnStatusBadge from '../CnStatusBadge/CnStatusBadge.vue'\nimport { resolveEndpointRequest } from '../../composables/useEndpointSource.js'\nimport { useRefLabels } from '../../composables/useRefLabels.js'\nimport { dispatchAction } from '../../utils/actionsDispatcher.js'\nimport { isBadgeVariant } from '../../utils/badgeVariants.js'\nimport { formatBoardDate } from '../../utils/boardDate.js'\nimport { parseDateValue } from '../../utils/dateVariant.js'\nimport { formatMoney, unwrapAppConfig } from '../../utils/formatMetric.js'\nimport { readPath } from '../../utils/readPath.js'\nimport { hasUnresolvedDeepTokens, resolveDeepTokens } from '../../utils/resolveFilterTokens.js'\nimport { userDisplayName } from '../../utils/userDisplayName.js'\n\n/** Kinds of entry a `fields[]` item can be. A labelled item without `as` is a row. */\nconst KINDS = Object.freeze(['row', 'title', 'line', 'pill', 'lead', 'text', 'meter'])\n\n/**\n * The label resolver every facts widget on the page shares, made on first use\n * (the object store needs an active pinia). One batched request per register and\n * schema for the ids it has not seen; a label it has read stays until the page\n * reloads, and an object the store already holds is not fetched at all.\n *\n * @type {{resolve: Function}|null}\n */\nlet refLabels = null\n\n/**\n * The entry that reads a resolved pill's tone: the same reference, with the\n * referenced object's `toneField` as the field to read.\n *\n * @param {object} spec A facts entry.\n * @return {object|null} `{ path, itemPath, resolve }`, or null when no `toneField` is set.\n */\nfunction toneSpec(spec) {\n\tconst resolve = spec && spec.resolve\n\tif (!resolve || typeof resolve !== 'object' || typeof resolve.toneField !== 'string' || resolve.toneField === '') {\n\t\treturn null\n\t}\n\treturn { path: spec.path, itemPath: spec.itemPath, resolve: { register: resolve.register, schema: resolve.schema, labelField: resolve.toneField } }\n}\n\n/** The page-wide reference label resolver. */\nfunction sharedRefLabels() {\n\tif (!refLabels) {\n\t\trefLabels = useRefLabels()\n\t}\n\treturn refLabels\n}\n\n/**\n * Key of a resolved reference in the widget's `labels` data.\n *\n * @param {{register: string, schema: string, labelField?: string}} resolve The entry's `resolve` config.\n * @param {string} id The referenced object's id.\n * @return {string} The key.\n */\nfunction refKey(resolve, id) {\n\treturn `${resolve.register}/${resolve.schema}/${resolve.labelField || ''}/${id}`\n}\n\n/** Event-bus channel a reveal of a masked value is announced on, so an app can log it. */\nexport const FACTS_REVEAL_CHANNEL = 'cn:facts:reveal'\n\n/**\n * CnFactsWidget — the `facts` widget: a card of facts about ONE object.\n *\n * Renders the configured fields of the current detail-page object, or of one\n * other object named by `content.source`, as the side cards on the screens\n * draw them: label/value rows (a two-column grid, label muted), a bold title\n * line that may link, muted meta lines that join several fields with \" · \",\n * a status pill, and one link at the foot.\n *\n * Everything is configuration; nothing in it knows an app:\n *\n * ```json\n * {\n * \"type\": \"facts\",\n * \"title\": \"Zaak\",\n * \"content\": {\n * \"source\": { \"register\": \"dossiq\", \"schema\": \"case\", \"id\": \"@object.case\" },\n * \"fields\": [\n * { \"as\": \"title\", \"path\": \"title\", \"route\": { \"name\": \"CaseDetail\", \"params\": { \"id\": \"@source.id\" } } },\n * { \"as\": \"line\", \"parts\": [\"identifier\", \"caseTypeTitle\"] },\n * { \"as\": \"pill\", \"path\": \"status\", \"map\": { \"open\": \"In behandeling\" } },\n * { \"path\": \"deadline\", \"label\": \"Termijn\", \"format\": \"date\" }\n * ],\n * \"link\": { \"label\": \"Naar de zaak\", \"route\": { \"name\": \"CaseDetail\", \"params\": { \"id\": \"@source.id\" } } },\n * \"emptyText\": \"Geen zaak\"\n * }\n * }\n * ```\n *\n * Tokens: `source.id` takes the shared filter tokens; `source.url` takes them\n * inside the url, the endpoint grammar (`/apps/x/api/y/@objectId`)\n * (`@objectId`, `@object.<field>`, `@workspace.<key>`, `@me`, ...). Routes\n * and the link also take `@source.<field>` (a field of the object shown).\n * A source whose id token does not resolve renders the empty text, never a\n * request for the literal token.\n *\n * Labels, map values, the link label and the empty text go through the host\n * app's translate (`cnTranslate`).\n */\nexport default {\n\tname: 'CnFactsWidget',\n\n\tcomponents: { Check, CnIcon, CnStatusBadge, ContentCopy, EyeOutline, NcLoadingIcon },\n\n\tinject: {\n\t\tcnTranslate: { default: () => (key) => key },\n\t\tcnObjectContext: { default: null },\n\t\tcnWorkspaceContext: { default: null },\n\t\t/** The page's app config; its `currency` is the reporting currency a money value falls back to. */\n\t\tcnAppConfig: { default: null },\n\t\t/** Pre-bound action dispatcher of CnPageRenderer, for `action` / `headerAction`. */\n\t\tcnDispatchAction: { default: null },\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The widget configuration.\n\t\t *\n\t\t * - `fields` — the entries, in order. Each is `{ path, label?, as?, from?, format?, map?, itemPath?, parts?, separator?, route?, variant?, variantMap?, colorMap?, icon?, copy?, reveal?, text?, title?, subtitle?, initialsPath?, tone? }`.\n\t\t * `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`.\n\t\t * 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.\n\t\t * A row's `format` may also be `email`, `phone` or `url` (a link) or `masked` (the last four characters; `reveal: true` adds Show). `copy: true` adds a copy button; `icon` replaces the label.\n\t\t * A part may be `{ text }`, a constant; a `line` or `text` entry without `path` or `parts` shows its `text`.\n\t\t * `resolve: { register, schema, labelField? }` on an entry or a part turns a value that is a reference (an id, or a list of ids) into the label of the referenced object (`labelField`, else `title`, then `name`): the case type or status of a task shows its name, not its uuid. The ids are fetched once per register and schema through the object store and shared by every facts widget on the page; the entry stays empty until its label is known, and when no label can be read. A resolved value works as a pill too: `map` is applied to the resolved label, and `variantMap` / `colorMap` look the tone up by the value of `resolve.toneField` on the referenced object when that is set (a status named by its `name`, coloured by its `state`), then by the resolved label, then by the stored value.\n\t\t * `format: 'user'` shows a Nextcloud user id as the user's display name, read once per id; the entry stays empty until the name is known.\n\t\t * - `action` — an action drawn as a button under the facts; `headerAction` — one drawn in the card header (reported through the `header` event).\n\t\t * `format` is `text` (default), `date` (board short date), `date-long` (always with the year), `list` (an array joined by \", \", each item read at `itemPath`), `bytes` (a size, \"1.5 MB\") or `currency` (a money amount in the reader's language, \"€ 1.234,50\": the code in `currency`, else the record's `currencyField`, else the app's reporting currency, else EUR; `decimals` defaults to 2).\n\t\t * `map` turns a raw value into a label (translated). `parts` (on a `line`) lists paths, or `{ path, label?, format? }`, joined by `separator` (default \" · \"); empty parts are dropped.\n\t\t * - `source` — `{ register, schema, id }` or `{ url }`; omitted = the current object. An entry with `from: \"object\"` reads the current object even then (a client card that also shows the ticket's channel).\n\t\t * - `link` — `{ label, route? | href? }` at the foot.\n\t\t * - `hideEmpty` — drop an entry whose value is empty (default true).\n\t\t * - `columns` — `2` lays the rows out in two columns with the label above the value (board DqContact); a row with `parts` joins them like a line (an address on one row).\n\t\t * - `emptyText` — shown when no entry has a value.\n\t\t *\n\t\t * @type {{fields?: Array<object>, source?: object, link?: object, hideEmpty?: boolean, emptyText?: string}}\n\t\t */\n\t\tcontent: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * The current detail-page object, passed by the detail page host.\n\t\t * Read when `content.source` is not set.\n\t\t */\n\t\tobjectData: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** The current detail-page object id, for the `@objectId` token. */\n\t\tobjectId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\temits: ['header', 'reveal'],\n\n\tdata() {\n\t\treturn {\n\t\t\tfetched: null,\n\t\t\tloading: false,\n\t\t\terror: false,\n\t\t\t/** Keys of the masked rows the reader chose to show. */\n\t\t\trevealed: {},\n\t\t\t/** Key of the row whose value was just copied. */\n\t\t\tcopied: '',\n\t\t\t/** Labels of the referenced objects read so far, by `refKey`. */\n\t\t\tlabels: {},\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * Whether the rows sit in two columns, label above value.\n\t\t *\n\t\t * @spec openspec/changes/facts-columns/specs/facts-widget/spec.md#requirement-facts-rows-can-sit-in-two-columns\n\t\t * @return {boolean}\n\t\t */\n\t\ttwoColumns() {\n\t\t\treturn Number(this.content?.columns) === 2\n\t\t},\n\n\t\t/**\n\t\t * The token context: the detail object (prop, else the injected context)\n\t\t * and the page workspace.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\ttokenCtx() {\n\t\t\tconst unwrap = (c) => (c && typeof c === 'object' && 'value' in c ? c.value : c)\n\t\t\tconst injected = unwrap(this.cnObjectContext) || {}\n\t\t\treturn {\n\t\t\t\t...injected,\n\t\t\t\tobjectId: this.objectId ?? injected.objectId ?? this.objectData?.id ?? null,\n\t\t\t\tobject: this.objectData || injected.object || null,\n\t\t\t\tworkspace: unwrap(this.cnWorkspaceContext) || {},\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * The source declaration with its tokens resolved, or null for the current object.\n\t\t *\n\t\t * @return {object|null}\n\t\t */\n\t\tresolvedSource() {\n\t\t\tconst source = this.content?.source\n\t\t\tif (!source || typeof source !== 'object') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (typeof source.url === 'string' && source.url !== '') {\n\t\t\t\t// The endpoint grammar: tokens INSIDE the url, and a request\n\t\t\t\t// that is blocked while one leaves an empty path segment.\n\t\t\t\tconst request = resolveEndpointRequest({ url: source.url }, this.tokenCtx)\n\t\t\t\treturn { url: request.blocked ? '' : request.url }\n\t\t\t}\n\t\t\treturn resolveDeepTokens(source, this.tokenCtx)\n\t\t},\n\n\t\t/**\n\t\t * A stable key of the resolved source, so the widget refetches only when it changes.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tsourceKey() {\n\t\t\treturn this.resolvedSource ? JSON.stringify(this.resolvedSource) : ''\n\t\t},\n\n\t\t/**\n\t\t * The object the facts are read from.\n\t\t *\n\t\t * @return {object|null}\n\t\t */\n\t\trecord() {\n\t\t\treturn this.resolvedSource ? this.fetched : this.objectData\n\t\t},\n\n\t\t/**\n\t\t * The entries to draw, consecutive rows grouped into one list.\n\t\t *\n\t\t * @return {Array<object>}\n\t\t */\n\t\tblocks() {\n\t\t\tconst sourceRecord = this.record\n\t\t\tif (!sourceRecord) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\tconst fields = Array.isArray(this.content?.fields) ? this.content.fields : []\n\t\t\tconst hideEmpty = this.content?.hideEmpty !== false\n\t\t\tconst out = []\n\t\t\tfields.forEach((field, index) => {\n\t\t\t\tif (!field || typeof field !== 'object') {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\t// `from: \"object\"` reads the page's own object while the card shows a `source`.\n\t\t\t\tconst record = field.from === 'object' && this.objectData ? this.objectData : sourceRecord\n\t\t\t\tconst kind = this.kindOf(field)\n\t\t\t\tconst key = String(field.key || field.path || `${kind}-${index}`).replace(/[^\\w-]/g, '-')\n\t\t\t\tconst value = this.entryValue(record, field, kind)\n\t\t\t\tif (value === '' && (hideEmpty || kind === 'lead')) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif (kind === 'row') {\n\t\t\t\t\tconst last = out[out.length - 1]\n\t\t\t\t\tconst row = { key, label: this.tr(field.label || ''), value, ...this.rowExtras(record, field, value) }\n\t\t\t\t\tif (last && last.kind === 'rows') {\n\t\t\t\t\t\tlast.rows.push(row)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tout.push({ kind: 'rows', key: `rows-${index}`, rows: [row] })\n\t\t\t\t\t}\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tconst block = { kind, key, value }\n\t\t\t\tif (kind === 'lead') {\n\t\t\t\t\tblock.subtitle = this.partsValue(record, field.subtitle)\n\t\t\t\t\tblock.icon = typeof field.icon === 'string' ? field.icon : ''\n\t\t\t\t\tblock.initials = block.icon ? '' : this.initialsOf(readPath(record, field.initialsPath))\n\t\t\t\t\tblock.tone = ['success', 'info', 'warning', 'error'].includes(field.tone) ? field.tone : 'neutral'\n\t\t\t\t}\n\t\t\t\tif (kind === 'meter') {\n\t\t\t\t\tObject.assign(block, this.meterOf(record, field))\n\t\t\t\t}\n\t\t\t\tif (kind === 'title' && field.route) {\n\t\t\t\t\tblock.to = this.resolveRoute(field.route, record)\n\t\t\t\t}\n\t\t\t\tif (kind === 'pill') {\n\t\t\t\t\tconst raw = readPath(record, field.path)\n\t\t\t\t\tconst colours = field.variantMap || field.colorMap\n\t\t\t\t\t// A resolved pill looks its tone up by the referenced object's tone field,\n\t\t\t\t\t// then by the resolved label, then by the stored value.\n\t\t\t\t\tconst keys = field.resolve && typeof field.resolve === 'object'\n\t\t\t\t\t\t? [toneSpec(field) ? this.refLabels(raw, toneSpec(field))[0] : undefined, this.refLabels(raw, field)[0], raw]\n\t\t\t\t\t\t: [raw]\n\t\t\t\t\tconst hit = colours ? keys.find((candidate) => (typeof candidate === 'string' || typeof candidate === 'number') && Object.hasOwn(colours, candidate)) : undefined\n\t\t\t\t\tconst variant = hit !== undefined ? colours[hit] : field.variant\n\t\t\t\t\tblock.variant = isBadgeVariant(variant) ? variant : 'default'\n\t\t\t\t}\n\t\t\t\tout.push(block)\n\t\t\t})\n\t\t\treturn out\n\t\t},\n\n\t\t/**\n\t\t * The foot link, resolved, or null.\n\t\t *\n\t\t * @return {{label: string, to?: object, href?: string}|null}\n\t\t */\n\t\tlink() {\n\t\t\tconst link = this.content?.link\n\t\t\tif (!link || typeof link !== 'object' || !link.label) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (link.route) {\n\t\t\t\tconst to = this.resolveRoute(link.route, this.record)\n\t\t\t\treturn to ? { label: this.tr(link.label), to } : null\n\t\t\t}\n\t\t\tif (typeof link.href === 'string' && link.href !== '') {\n\t\t\t\tconst href = this.resolveTemplate(link.href, this.record)\n\t\t\t\treturn href ? { label: this.tr(link.label), href } : null\n\t\t\t}\n\t\t\treturn null\n\t\t},\n\n\t\t/**\n\t\t * The action under the facts, as drawn: `{ label, icon }`, or null.\n\t\t *\n\t\t * @return {{label: string, icon: string}|null}\n\t\t * @spec openspec/changes/screens-relation-pages/specs/relation-pages/spec.md#requirement-the-facts-card-draws-contact-details-identity-and-a-lead\n\t\t */\n\t\taction() {\n\t\t\treturn this.actionView(this.content?.action)\n\t\t},\n\n\t\t/**\n\t\t * The header action, as drawn: `{ label, icon }`, or null.\n\t\t *\n\t\t * @return {{label: string, icon: string}|null}\n\t\t * @spec openspec/changes/screens-relation-pages/specs/relation-pages/spec.md#requirement-the-facts-card-draws-contact-details-identity-and-a-lead\n\t\t */\n\t\theaderAction() {\n\t\t\treturn this.actionView(this.content?.headerAction)\n\t\t},\n\n\t\t/** @return {string} The reveal button's text. */\n\t\tshowLabel() {\n\t\t\treturn t('nextcloud-vue', 'Show')\n\t\t},\n\n\t\t/**\n\t\t * The empty line.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\temptyLabel() {\n\t\t\treturn this.tr(this.content?.emptyText || 'Nothing to show yet')\n\t\t},\n\t},\n\n\twatch: {\n\t\tsourceKey: {\n\t\t\timmediate: true,\n\t\t\thandler() {\n\t\t\t\tthis.load()\n\t\t\t},\n\t\t},\n\n\t\trecord: {\n\t\t\timmediate: true,\n\t\t\thandler() {\n\t\t\t\tthis.loadLabels()\n\t\t\t},\n\t\t},\n\n\t\theaderAction: {\n\t\t\timmediate: true,\n\t\t\thandler() {\n\t\t\t\tthis.emitHeader()\n\t\t\t},\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Translate through the host app.\n\t\t *\n\t\t * @param {string} text The text.\n\t\t * @return {string}\n\t\t */\n\t\ttr(text) {\n\t\t\tif (typeof text !== 'string' || text === '') {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\treturn typeof this.cnTranslate === 'function' ? this.cnTranslate(text) : text\n\t\t},\n\n\t\t/**\n\t\t * The kind of a field entry.\n\t\t *\n\t\t * @param {object} field The entry.\n\t\t * @return {string} `row`, `title`, `line` or `pill`.\n\t\t */\n\t\tkindOf(field) {\n\t\t\tif (KINDS.includes(field.as)) {\n\t\t\t\treturn field.as\n\t\t\t}\n\t\t\treturn field.label || field.icon ? 'row' : 'line'\n\t\t},\n\n\t\t/**\n\t\t * A meter entry's parts: the amount at `path` against the limit at\n\t\t * `limitPath` (or a constant `limit`), both formatted with the entry's\n\t\t * `format`. Without a positive numeric limit there is no bar, only the\n\t\t * amount. Past the limit the text says so, so the state never rests on\n\t\t * the bar's colour alone.\n\t\t *\n\t\t * @param {object} record The object.\n\t\t * @param {object} field The entry.\n\t\t * @return {{label: string, value: string, amount: number|null, limit: number|null, percent: number, over: boolean}}\n\t\t * @spec openspec/changes/facts-meter-row/specs/facts-meter-row/spec.md#requirement-a-facts-entry-can-be-a-meter\n\t\t */\n\t\tmeterOf(record, field) {\n\t\t\tconst amount = Number(readPath(record, field.path))\n\t\t\tconst rawLimit = typeof field.limitPath === 'string' && field.limitPath !== '' ? readPath(record, field.limitPath) : field.limit\n\t\t\tconst limit = rawLimit === null || rawLimit === undefined || rawLimit === '' ? NaN : Number(rawLimit)\n\t\t\tconst label = this.tr(field.label || '')\n\t\t\tconst value = this.valueOf(record, field)\n\t\t\tif (!Number.isFinite(amount) || !Number.isFinite(limit) || limit <= 0) {\n\t\t\t\treturn { label, value, amount: Number.isFinite(amount) ? amount : null, limit: null, percent: 0, over: false }\n\t\t\t}\n\t\t\tconst over = amount > limit\n\t\t\tconst limitText = this.format(limit, field, record)\n\t\t\treturn {\n\t\t\t\tlabel,\n\t\t\t\tvalue: over\n\t\t\t\t\t? t('nextcloud-vue', '{value} of {limit}, over the limit', { value, limit: limitText })\n\t\t\t\t\t: t('nextcloud-vue', '{value} of {limit}', { value, limit: limitText }),\n\n\t\t\t\tamount,\n\t\t\t\tlimit,\n\t\t\t\tpercent: Math.max(0, Math.min(100, (amount / limit) * 100)),\n\t\t\t\tover,\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * The display text of an entry of any kind: a lead's title, the parts of\n\t\t * a line or text, a constant `text`, else the value at `path`.\n\t\t *\n\t\t * @param {object} record The object.\n\t\t * @param {object} field The entry.\n\t\t * @param {string} kind The entry's kind.\n\t\t * @return {string}\n\t\t * @spec openspec/changes/screens-relation-pages/specs/relation-pages/spec.md#requirement-the-facts-card-draws-contact-details-identity-and-a-lead\n\t\t */\n\t\tentryValue(record, field, kind) {\n\t\t\tif (kind === 'lead') {\n\t\t\t\treturn this.partsValue(record, field.title)\n\t\t\t}\n\t\t\tif ((kind === 'line' || kind === 'text' || kind === 'row') && Array.isArray(field.parts)) {\n\t\t\t\treturn this.lineValue(record, field)\n\t\t\t}\n\t\t\tif ((kind === 'line' || kind === 'text') && !field.path && typeof field.text === 'string') {\n\t\t\t\treturn this.tr(field.text)\n\t\t\t}\n\t\t\treturn this.valueOf(record, field)\n\t\t},\n\n\t\t/**\n\t\t * A lead's title or subtitle: a path, a part spec, or an array of parts\n\t\t * joined as a line joins them.\n\t\t *\n\t\t * @param {object} record The object.\n\t\t * @param {string|object|Array} spec The declaration.\n\t\t * @return {string}\n\t\t */\n\t\tpartsValue(record, spec) {\n\t\t\tif (typeof spec === 'string' && spec !== '') {\n\t\t\t\treturn this.valueOf(record, { path: spec })\n\t\t\t}\n\t\t\tif (Array.isArray(spec)) {\n\t\t\t\treturn this.lineValue(record, { parts: spec })\n\t\t\t}\n\t\t\tif (spec && typeof spec === 'object') {\n\t\t\t\treturn this.lineValue(record, { parts: [spec] })\n\t\t\t}\n\t\t\treturn ''\n\t\t},\n\n\t\t/**\n\t\t * The initials of a name: \"Sanne de Vries\" reads \"SV\".\n\t\t *\n\t\t * @param {unknown} name The name.\n\t\t * @return {string}\n\t\t */\n\t\tinitialsOf(name) {\n\t\t\tif (typeof name !== 'string' || name.trim() === '') {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst words = name.trim().split(/\\s+/).filter((word) => /^\\p{Lu}/u.test(word))\n\t\t\tconst picked = words.length ? words : name.trim().split(/\\s+/)\n\t\t\tconst first = picked[0].charAt(0)\n\t\t\tconst last = picked.length > 1 ? picked[picked.length - 1].charAt(0) : ''\n\t\t\treturn (first + last).toUpperCase()\n\t\t},\n\n\t\t/**\n\t\t * What a row adds to its value: an icon, a link for the email, phone\n\t\t * and url formats, the masked text, and the copy and reveal buttons.\n\t\t *\n\t\t * @param {object} record The object.\n\t\t * @param {object} field The entry.\n\t\t * @param {string} value The display text.\n\t\t * @return {object}\n\t\t * @spec openspec/changes/screens-relation-pages/specs/relation-pages/spec.md#requirement-the-facts-card-draws-contact-details-identity-and-a-lead\n\t\t */\n\t\trowExtras(record, field, value) {\n\t\t\tconst extras = {\n\t\t\t\ticon: typeof field.icon === 'string' ? field.icon : '',\n\t\t\t\tpath: field.path || '',\n\t\t\t\traw: readPath(record, field.path),\n\t\t\t\tcopy: field.copy === true && value !== '',\n\t\t\t\treveal: false,\n\t\t\t\tmasked: '',\n\t\t\t\thref: '',\n\t\t\t\texternal: false,\n\t\t\t}\n\t\t\tif (value === '') {\n\t\t\t\treturn extras\n\t\t\t}\n\t\t\tif (field.format === 'email') {\n\t\t\t\textras.href = `mailto:${value}`\n\t\t\t} else if (field.format === 'phone') {\n\t\t\t\textras.href = `tel:${value.replace(/[^\\d+]/g, '')}`\n\t\t\t} else if (field.format === 'url') {\n\t\t\t\textras.href = /^https?:\\/\\//i.test(value) ? value : `https://${value}`\n\t\t\t\textras.external = true\n\t\t\t} else if (field.format === 'masked') {\n\t\t\t\textras.masked = value.length > 4 ? '*'.repeat(Math.min(value.length - 4, 5)) + value.slice(-4) : value\n\t\t\t\textras.reveal = field.reveal === true && value.length > 4\n\t\t\t}\n\t\t\treturn extras\n\t\t},\n\n\t\t/**\n\t\t * Show a masked value, and say so: the `reveal` event and the event-bus\n\t\t * channel {@link FACTS_REVEAL_CHANNEL}, so an app can log who saw it.\n\t\t *\n\t\t * @param {object} row The row.\n\t\t * @spec openspec/changes/screens-relation-pages/specs/relation-pages/spec.md#requirement-the-facts-card-draws-contact-details-identity-and-a-lead\n\t\t */\n\t\treveal(row) {\n\t\t\tthis.revealed = { ...this.revealed, [row.key]: true }\n\t\t\tconst detail = { path: row.path }\n\t\t\t/**\n\t\t\t * @event reveal Emitted when the reader shows a masked value.\n\t\t\t * @type {{path: string}} The path of the shown field.\n\t\t\t */\n\t\t\tthis.$emit('reveal', detail)\n\t\t\temit(FACTS_REVEAL_CHANNEL, { ...detail, objectId: this.tokenCtx.objectId, register: this.tokenCtx.register || null, schema: this.tokenCtx.schema || null })\n\t\t},\n\n\t\t/**\n\t\t * Copy a row's value to the clipboard.\n\t\t *\n\t\t * @param {object} row The row.\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync copy(row) {\n\t\t\tconst text = row.raw === null || row.raw === undefined || typeof row.raw === 'object' ? row.value : String(row.raw)\n\t\t\ttry {\n\t\t\t\tawait navigator.clipboard.writeText(text)\n\t\t\t\tthis.copied = row.key\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tif (this.copied === row.key) {\n\t\t\t\t\t\tthis.copied = ''\n\t\t\t\t\t}\n\t\t\t\t}, 2000)\n\t\t\t} catch (e) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn('[CnFactsWidget] could not copy:', e?.message || e)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * @param {object} row The row.\n\t\t * @return {string} The copy button's accessible name.\n\t\t */\n\t\tcopyLabel(row) {\n\t\t\treturn this.copied === row.key\n\t\t\t\t? t('nextcloud-vue', 'Copied')\n\t\t\t\t: t('nextcloud-vue', 'Copy {label}', { label: row.label || row.value })\n\t\t},\n\n\t\t/**\n\t\t * @param {object} row The row.\n\t\t * @return {string} The reveal button's accessible name.\n\t\t */\n\t\trevealLabel(row) {\n\t\t\treturn t('nextcloud-vue', 'Show {label}', { label: row.label || '' }).trim()\n\t\t},\n\n\t\t/**\n\t\t * The drawn part of an action declaration.\n\t\t *\n\t\t * @param {object} action The declaration.\n\t\t * @return {{label: string, icon: string}|null}\n\t\t */\n\t\tactionView(action) {\n\t\t\tif (!action || typeof action !== 'object' || typeof action.label !== 'string' || action.label === '') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn { label: this.tr(action.label), icon: typeof action.icon === 'string' ? action.icon : '' }\n\t\t},\n\n\t\t/**\n\t\t * Dispatch an action with the record's tokens resolved (`@objectId`,\n\t\t * `@object.<field>`), through the page's dispatcher when there is one.\n\t\t *\n\t\t * @param {object} action The declaration.\n\t\t * @return {unknown}\n\t\t * @spec openspec/changes/screens-relation-pages/specs/relation-pages/spec.md#requirement-the-facts-card-draws-contact-details-identity-and-a-lead\n\t\t */\n\t\trunAction(action) {\n\t\t\tif (!action || typeof action !== 'object') {\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\tconst resolved = resolveDeepTokens(action, this.tokenCtx)\n\t\t\tif (typeof this.cnDispatchAction === 'function') {\n\t\t\t\treturn this.cnDispatchAction(resolved)\n\t\t\t}\n\t\t\treturn dispatchAction(resolved, { router: this.$router || null })\n\t\t},\n\n\t\t/** Tell the card around the facts what its header shows (the header action). */\n\t\temitHeader() {\n\t\t\tconst view = this.headerAction\n\t\t\t/**\n\t\t\t * @event header Emitted with the card header's parts: the header action, if any.\n\t\t\t * @type {{link: null, note: string, action: (object|null)}} `action` is `{ label, icon, run }`.\n\t\t\t */\n\t\t\tthis.$emit('header', {\n\t\t\t\tlink: null,\n\t\t\t\tnote: '',\n\t\t\t\taction: view ? { ...view, run: () => this.runAction(this.content.headerAction) } : null,\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * The text of a reference: the labels of the objects its id(s) name, joined\n\t\t * by \", \". An id whose label is not known yet (or cannot be read) adds nothing.\n\t\t *\n\t\t * @param {unknown} raw The id, or a list of ids (or of `{ id }` objects).\n\t\t * @param {object} spec `{ resolve: { register, schema, labelField? }, itemPath? }`.\n\t\t * @return {string}\n\t\t */\n\t\trefText(raw, spec) {\n\t\t\treturn this.refLabels(raw, spec)\n\t\t\t\t.map((label) => (spec.map && Object.hasOwn(spec.map, label) ? this.tr(spec.map[label]) : label))\n\t\t\t\t.join(', ')\n\t\t},\n\n\t\t/**\n\t\t * The labels of a reference as read, before `map` is applied: the key a\n\t\t * pill's `variantMap` and `colorMap` look up.\n\t\t *\n\t\t * @param {unknown} raw The id, or a list of ids.\n\t\t * @param {object} spec `{ resolve, itemPath? }`.\n\t\t * @return {string[]}\n\t\t */\n\t\trefLabels(raw, spec) {\n\t\t\treturn this.refIds(raw, spec)\n\t\t\t\t.map((id) => this.labels[refKey(spec.resolve, id)])\n\t\t\t\t.filter((label) => typeof label === 'string' && label !== '')\n\t\t},\n\n\t\t/**\n\t\t * The ids a reference value holds.\n\t\t *\n\t\t * @param {unknown} raw The value.\n\t\t * @param {object} spec `{ itemPath? }`.\n\t\t * @return {string[]}\n\t\t */\n\t\trefIds(raw, spec) {\n\t\t\treturn (Array.isArray(raw) ? raw : [raw])\n\t\t\t\t.map((item) => (item && typeof item === 'object' ? (spec.itemPath ? readPath(item, spec.itemPath) : (item.id ?? item.uuid)) : item))\n\t\t\t\t.filter((id) => id !== null && id !== undefined && id !== '' && typeof id !== 'object')\n\t\t\t\t.map(String)\n\t\t},\n\n\t\t/**\n\t\t * Every entry or part that carries `resolve`, with the record's value at its path.\n\t\t *\n\t\t * @param {object} record The object.\n\t\t * @return {Array<{spec: object, raw: unknown}>}\n\t\t */\n\t\trefSpecs(record) {\n\t\t\tconst fields = Array.isArray(this.content?.fields) ? this.content.fields : []\n\t\t\tconst specs = []\n\t\t\tconst visit = (spec) => {\n\t\t\t\tif (!spec || typeof spec !== 'object') {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif (spec.resolve && typeof spec.resolve === 'object' && spec.path) {\n\t\t\t\t\tspecs.push({ spec, raw: readPath(record, spec.path) })\n\t\t\t\t\tif (toneSpec(spec)) {\n\t\t\t\t\t\tspecs.push({ spec: toneSpec(spec), raw: readPath(record, spec.path) })\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst nested = [...(Array.isArray(spec.parts) ? spec.parts : []), ...(Array.isArray(spec.title) ? spec.title : [spec.title]), ...(Array.isArray(spec.subtitle) ? spec.subtitle : [spec.subtitle])]\n\t\t\t\tnested.forEach(visit)\n\t\t\t}\n\t\t\tfields.forEach(visit)\n\t\t\treturn specs\n\t\t},\n\n\t\t/**\n\t\t * Read the labels of the referenced objects, one batched request per\n\t\t * register and schema, and keep them in `labels`.\n\t\t *\n\t\t * @param {object|null} record The object shown (defaults to the current record).\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync loadLabels(record = this.record) {\n\t\t\tif (!record) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst groups = new Map()\n\t\t\tfor (const { spec, raw } of this.refSpecs(record)) {\n\t\t\t\tconst { register, schema, labelField } = spec.resolve\n\t\t\t\tif (!register || !schema) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tconst groupKey = `${register}/${schema}/${labelField || ''}`\n\t\t\t\tconst group = groups.get(groupKey) || { resolve: spec.resolve, ids: new Set() }\n\t\t\t\tthis.refIds(raw, spec).forEach((id) => group.ids.add(id))\n\t\t\t\tgroups.set(groupKey, group)\n\t\t\t}\n\t\t\tif (groups.size === 0) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst resolver = sharedRefLabels()\n\t\t\tconst next = { ...this.labels }\n\t\t\tawait Promise.all([...groups.values()].map(async ({ resolve, ids }) => {\n\t\t\t\tconst found = await resolver.resolve(resolve.register, resolve.schema, [...ids], resolve.labelField)\n\t\t\t\tObject.entries(found).forEach(([id, label]) => {\n\t\t\t\t\tnext[refKey(resolve, id)] = label\n\t\t\t\t})\n\t\t\t}))\n\t\t\tthis.labels = next\n\t\t},\n\n\t\t/**\n\t\t * Read the source object.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync load() {\n\t\t\tconst source = this.resolvedSource\n\t\t\tthis.error = false\n\t\t\tif (!source) {\n\t\t\t\tthis.fetched = null\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst url = this.sourceUrl(source)\n\t\t\tif (!url) {\n\t\t\t\tthis.fetched = null\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\t\timport('@nextcloud/router'),\n\t\t\t\t])\n\t\t\t\tconst full = url.startsWith('/apps/') || url.startsWith('/ocs/') ? generateUrl(url) : url\n\t\t\t\tconst response = await axios.get(full)\n\t\t\t\tconst data = response && response.data\n\t\t\t\tthis.fetched = data && typeof data === 'object' && !Array.isArray(data) ? data : null\n\t\t\t} catch (e) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn('[CnFactsWidget] the source could not be read:', e?.message || e)\n\t\t\t\tthis.fetched = null\n\t\t\t\tthis.error = true\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * The URL of a resolved source, or '' when it cannot be read yet.\n\t\t *\n\t\t * @param {object} source The resolved source.\n\t\t * @return {string}\n\t\t */\n\t\tsourceUrl(source) {\n\t\t\tif (typeof source.url === 'string') {\n\t\t\t\treturn source.url\n\t\t\t}\n\t\t\tif (hasUnresolvedDeepTokens(source)) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst { register, schema, id } = source\n\t\t\tif (!register || !schema || id === undefined || id === null || id === '' || typeof id === 'object') {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\treturn `/apps/openregister/api/objects/${encodeURIComponent(register)}/${encodeURIComponent(schema)}/${encodeURIComponent(String(id))}`\n\t\t},\n\n\t\t/**\n\t\t * The display text of one field.\n\t\t *\n\t\t * @param {object} record The object.\n\t\t * @param {object} field The entry.\n\t\t * @return {string}\n\t\t */\n\t\tvalueOf(record, field) {\n\t\t\tconst raw = readPath(record, field.path)\n\t\t\treturn this.format(raw, field, record)\n\t\t},\n\n\t\t/**\n\t\t * The text of a `line` entry that joins several parts.\n\t\t *\n\t\t * @param {object} record The object.\n\t\t * @param {object} field The entry.\n\t\t * @return {string}\n\t\t */\n\t\tlineValue(record, field) {\n\t\t\tconst separator = typeof field.separator === 'string' ? field.separator : ' · '\n\t\t\treturn field.parts\n\t\t\t\t.map((part) => {\n\t\t\t\t\tconst spec = typeof part === 'string' ? { path: part } : (part || {})\n\t\t\t\t\t// A constant part (`{ text }`): \"Handelsregister\" after the legal form.\n\t\t\t\t\tif (!spec.path && typeof spec.text === 'string') {\n\t\t\t\t\t\treturn this.tr(spec.text)\n\t\t\t\t\t}\n\t\t\t\t\t// A group of parts with its own separator (\"Parkstraat 24\" inside\n\t\t\t\t\t// \"Parkstraat 24, 3421 AB Zuiddrecht\").\n\t\t\t\t\tif (!spec.path && Array.isArray(spec.parts)) {\n\t\t\t\t\t\treturn this.lineValue(record, spec)\n\t\t\t\t\t}\n\t\t\t\t\tconst value = this.format(readPath(record, spec.path), spec, record)\n\t\t\t\t\tif (value === '') {\n\t\t\t\t\t\treturn ''\n\t\t\t\t\t}\n\t\t\t\t\treturn spec.label ? `${this.tr(spec.label)} ${value}` : value\n\t\t\t\t})\n\t\t\t\t.filter((value) => value !== '')\n\t\t\t\t.join(separator)\n\t\t},\n\n\t\t/**\n\t\t * Format a raw value.\n\t\t *\n\t\t * @param {unknown} raw The value.\n\t\t * @param {object} spec `{ format?, map?, itemPath?, currency?, currencyField?, decimals? }`.\n\t\t * @param {object|null} [record] The object shown, which `currencyField` reads.\n\t\t * @return {string} The text, '' when empty.\n\t\t * @spec openspec/changes/facts-currency-format/specs/facts-widget/spec.md#requirement-a-facts-entry-can-show-a-money-amount\n\t\t * @spec openspec/changes/facts-user-format/specs/facts-widget/spec.md#requirement-a-facts-entry-can-show-a-user-by-name\n\t\t */\n\t\tformat(raw, spec, record = null) {\n\t\t\tif (raw === null || raw === undefined || raw === '') {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tif (spec.resolve && typeof spec.resolve === 'object') {\n\t\t\t\treturn this.refText(raw, spec)\n\t\t\t}\n\t\t\tconst format = spec.format || 'text'\n\t\t\tif (format === 'list' || Array.isArray(raw)) {\n\t\t\t\tconst items = (Array.isArray(raw) ? raw : [raw])\n\t\t\t\t\t.map((item) => (spec.itemPath && item && typeof item === 'object' ? readPath(item, spec.itemPath) : item))\n\t\t\t\t\t.map((item) => this.format(item, { ...spec, format: 'text' }))\n\t\t\t\t\t.filter((item) => item !== '')\n\t\t\t\treturn items.join(', ')\n\t\t\t}\n\t\t\tif (format === 'date' || format === 'date-long') {\n\t\t\t\tconst date = parseDateValue(raw)\n\t\t\t\tif (date === null) {\n\t\t\t\t\treturn ''\n\t\t\t\t}\n\t\t\t\t// A year far from now forces the long form, so date-long reuses the board formatter.\n\t\t\t\treturn format === 'date-long'\n\t\t\t\t\t? formatBoardDate(date, new Date(date.getFullYear() + 1, 0, 1))\n\t\t\t\t\t: formatBoardDate(date)\n\t\t\t}\n\t\t\tif (format === 'bytes') {\n\t\t\t\tconst bytes = Number(raw)\n\t\t\t\treturn Number.isFinite(bytes) && bytes >= 0 ? formatFileSize(bytes) : ''\n\t\t\t}\n\t\t\tif (format === 'user') {\n\t\t\t\treturn userDisplayName(raw)\n\t\t\t}\n\t\t\tif (format === 'currency') {\n\t\t\t\tconst money = formatMoney(raw, { currency: spec.currency, currencyField: spec.currencyField, decimals: spec.decimals }, record, unwrapAppConfig(this.cnAppConfig))\n\t\t\t\tif (money !== '') {\n\t\t\t\t\treturn money\n\t\t\t\t}\n\t\t\t\t// Not a number: shown as written, never as \"[object Object]\".\n\t\t\t\treturn typeof raw === 'object' ? '' : String(raw)\n\t\t\t}\n\t\t\tif (typeof raw === 'object') {\n\t\t\t\tconst label = raw.title || raw.name || raw.label || raw.displayName\n\t\t\t\treturn typeof label === 'string' ? label : ''\n\t\t\t}\n\t\t\tif (typeof raw === 'boolean') {\n\t\t\t\tconst mapped = spec.map && spec.map[String(raw)]\n\t\t\t\treturn mapped ? this.tr(mapped) : this.tr(raw ? 'Yes' : 'No')\n\t\t\t}\n\t\t\tif (spec.map && Object.hasOwn(spec.map, String(raw))) {\n\t\t\t\treturn this.tr(spec.map[String(raw)])\n\t\t\t}\n\t\t\treturn String(raw)\n\t\t},\n\n\t\t/**\n\t\t * Replace `@source.<field>` / `@source.id` and the shared tokens in a string.\n\t\t *\n\t\t * @param {string} value The template.\n\t\t * @param {object|null} record The object shown.\n\t\t * @return {string} The value, '' when a token stays unresolved.\n\t\t */\n\t\tresolveTemplate(value, record) {\n\t\t\tif (typeof value !== 'string') {\n\t\t\t\treturn value\n\t\t\t}\n\t\t\tlet unresolved = false\n\t\t\tconst replaced = value.replace(/@source\\.([\\w.@]+)/g, (match, path) => {\n\t\t\t\tconst read = record ? (path === 'id' ? (record.id ?? readPath(record, '@self.id')) : readPath(record, path)) : undefined\n\t\t\t\tif (read === undefined || read === null || read === '') {\n\t\t\t\t\tunresolved = true\n\t\t\t\t\treturn match\n\t\t\t\t}\n\t\t\t\treturn String(read)\n\t\t\t})\n\t\t\tif (unresolved) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tif (replaced.charAt(0) === '@') {\n\t\t\t\tconst resolved = resolveDeepTokens(replaced, this.tokenCtx)\n\t\t\t\treturn typeof resolved === 'string' && resolved.charAt(0) === '@' ? '' : String(resolved)\n\t\t\t}\n\t\t\treturn replaced\n\t\t},\n\n\t\t/**\n\t\t * Resolve a route declaration (`{ name, params?, query? }`).\n\t\t *\n\t\t * @param {object} route The declaration.\n\t\t * @param {object|null} record The object shown.\n\t\t * @return {object|null} The route, or null when a param stays unresolved.\n\t\t */\n\t\tresolveRoute(route, record) {\n\t\t\tif (!route || typeof route !== 'object' || !route.name) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst out = { name: route.name }\n\t\t\tfor (const key of ['params', 'query']) {\n\t\t\t\tif (route[key] && typeof route[key] === 'object') {\n\t\t\t\t\tout[key] = {}\n\t\t\t\t\tfor (const [name, value] of Object.entries(route[key])) {\n\t\t\t\t\t\tconst resolved = this.resolveTemplate(value, record)\n\t\t\t\t\t\tif (resolved === '') {\n\t\t\t\t\t\t\treturn null\n\t\t\t\t\t\t}\n\t\t\t\t\t\tout[key][name] = resolved\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn out\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-facts-widget {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 10px;\n\tmin-width: 0;\n}\n\n.cn-facts-widget__rows {\n\tdisplay: grid;\n\tgrid-template-columns: max-content 1fr;\n\tgap: 8px 16px;\n\tmargin: 0;\n\tfont-size: 14px;\n}\n\n/* Each row is a grid of its own children: the wrapper takes no box. */\n.cn-facts-widget__row {\n\tdisplay: contents;\n}\n\n/* Nextcloud core styles `dt` and `dd` (text-align end, 12px padding), which\n pushed the label to the right of its column and added 12px around both. The\n class is doubled so these resets outrank that rule, and a dossiq-style\n `:deep()` override in an app is not needed. */\n.cn-facts-widget__label.cn-facts-widget__label {\n\tmargin: 0;\n\tpadding: 0;\n\ttext-align: start;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-facts-widget__value.cn-facts-widget__value {\n\tmargin: 0;\n\tpadding: 0;\n\ttext-align: start;\n\tfont-weight: 500;\n\tmin-width: 0;\n\toverflow-wrap: anywhere;\n}\n\n.cn-facts-widget__title {\n\tfont-size: 15px;\n\tfont-weight: 600;\n\tcolor: var(--color-main-text);\n}\n\n.cn-facts-widget__line {\n\tfont-size: 13px;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-facts-widget__meter {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tfont-size: 14px;\n}\n\n.cn-facts-widget__meter-head {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tgap: 16px;\n}\n\n.cn-facts-widget__meter-label {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-facts-widget__meter-value {\n\tfont-weight: 500;\n\ttext-align: end;\n}\n\n.cn-facts-widget__meter-track {\n\theight: 6px;\n\tborder-radius: 3px;\n\tbackground: var(--color-background-darker);\n\toverflow: hidden;\n}\n\n.cn-facts-widget__meter-bar {\n\tdisplay: block;\n\theight: 100%;\n\tborder-radius: inherit;\n\tbackground: var(--color-primary-element);\n}\n\n.cn-facts-widget__meter--over .cn-facts-widget__meter-value {\n\tcolor: var(--color-error-text);\n}\n\n.cn-facts-widget__meter--over .cn-facts-widget__meter-bar {\n\tbackground: var(--color-error);\n}\n\n.cn-facts-widget__muted {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-facts-widget__label .hidden-visually {\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\n}\n\n.cn-facts-widget__label--icon {\n\talign-items: center;\n\tdisplay: flex;\n}\n\n.cn-facts-widget__value-link {\n\tcolor: var(--color-primary-element);\n\ttext-decoration: underline;\n}\n\n.cn-facts-widget__inline-button,\n.cn-facts-widget__icon-button,\n.cn-facts-widget__action {\n\talign-items: center;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\tfont: inherit;\n}\n\n.cn-facts-widget__inline-button {\n\tbackground: var(--color-main-background);\n\tborder: 1px solid var(--color-border-dark);\n\tborder-radius: 16px;\n\tfont-size: 13px;\n\tfont-weight: 600;\n\tgap: 4px;\n\tmargin-inline-start: 8px;\n\tmin-height: 28px;\n\tpadding: 0 10px;\n}\n\n.cn-facts-widget__icon-button {\n\tbackground: transparent;\n\tborder: 0;\n\tborder-radius: 6px;\n\tcolor: var(--color-text-maxcontrast);\n\tmargin-inline-start: 4px;\n\tpadding: 2px;\n\tvertical-align: middle;\n}\n\n.cn-facts-widget__icon-button:hover,\n.cn-facts-widget__icon-button:focus-visible {\n\tbackground: var(--color-background-hover);\n\tcolor: var(--color-main-text);\n}\n\n.cn-facts-widget__text {\n\tcolor: var(--color-main-text);\n\tfont-size: 15px;\n}\n\n/* A lead: an icon tile or initials beside a bold title and a muted subtitle. */\n.cn-facts-widget__lead {\n\talign-items: center;\n\tdisplay: flex;\n\tgap: 12px;\n}\n\n.cn-facts-widget__lead-tile {\n\talign-items: center;\n\tbackground: var(--color-background-dark);\n\tborder-radius: 8px;\n\tcolor: var(--color-main-text);\n\tdisplay: flex;\n\tflex: none;\n\tfont-size: 14px;\n\tfont-weight: 700;\n\theight: 40px;\n\tjustify-content: center;\n\twidth: 40px;\n}\n\n.cn-facts-widget__lead-tile--success {\n\tbackground: color-mix(in srgb, var(--color-success) 14%, var(--color-main-background));\n\tborder-radius: 50%;\n\tcolor: var(--color-success-text, var(--color-success));\n}\n\n.cn-facts-widget__lead-tile--info {\n\tbackground: var(--color-primary-element-light);\n\tborder-radius: 50%;\n\tcolor: var(--color-primary-element-light-text, var(--color-primary-element));\n}\n\n.cn-facts-widget__lead-text {\n\tdisplay: flex;\n\tflex-direction: column;\n\tmin-width: 0;\n}\n\n.cn-facts-widget__lead-title {\n\tfont-size: 15px;\n}\n\n.cn-facts-widget__lead-subtitle {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n}\n\n.cn-facts-widget__action {\n\talign-self: flex-start;\n\tbackground: var(--color-primary-element-light);\n\tborder: 0;\n\tborder-radius: 16px;\n\tcolor: var(--color-primary-element-light-text, var(--color-primary-element));\n\tfont-size: 13px;\n\tfont-weight: 700;\n\tgap: 6px;\n\tmin-height: 32px;\n\tpadding: 0 14px;\n}\n\n.cn-facts-widget__action:hover,\n.cn-facts-widget__action:focus-visible {\n\tbackground: var(--color-primary-element-light-hover, var(--color-primary-element-light));\n}\n\n.cn-facts-widget__link {\n\tfont-size: 14px;\n\tfont-weight: 600;\n\tcolor: var(--color-primary-element);\n\ttext-decoration: underline;\n}\n\n/* `columns: 2` (board DqContact): two columns, the label above the value, a\n hairline under each fact; one column on a phone. */\n.cn-facts-widget__rows--columns {\n\tgrid-template-columns: repeat(2, minmax(0, 1fr));\n\tgap: 14px 24px;\n\tfont-size: 15px;\n}\n\n.cn-facts-widget__rows--columns .cn-facts-widget__row {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 3px;\n\tmin-width: 0;\n\tpadding-bottom: 10px;\n\tborder-bottom: 1px solid var(--color-border);\n}\n\n.cn-facts-widget__rows--columns .cn-facts-widget__label.cn-facts-widget__label {\n\tfont-size: 13px;\n}\n\n@media (max-width: 640px) {\n\t.cn-facts-widget__rows--columns {\n\t\tgrid-template-columns: minmax(0, 1fr);\n\t}\n}\n</style>\n"],"names":["CnIcon","CnStatusBadge","t"],"mappings":";;;;;;;;;;;;;;;;;;;;AAgLA;AACA,MAAM,KAAI,GAAI,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,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AACzF,IAAA;GACA,OAAO,QAAO;GACd;;AAED;;AAEC;AACA;AACA;;;EAGD,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE;GAC3B,IAAI,CAAC,SAAS,OAAO,KAAM,KAAI,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE;AACvD,IAAA,OAAO,IAAG;AACX,IAAA;GACA,MAAM,GAAE,GAAI,EAAE,IAAI,EAAE,KAAK,CAAC,IAAK,GAAA;AAC/B,GAAA,KAAK,MAAM,GAAI,IAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE;AACtC,IAAA,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,KAAK,CAAC,GAAG,CAAE,KAAI,QAAQ,EAAE;KACjD,GAAG,CAAC,GAAG,CAAA,GAAI,GAAC;KACZ,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAA,IAAK,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE;MACvD,MAAM,QAAS,GAAE,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAA;AACnD,MAAA,IAAI,aAAa,EAAE,EAAE;AACpB,OAAA,OAAO,IAAG;AACX,OAAA;MACA,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA,GAAI,SAAO;AACzB,MAAA;AACD,KAAA;AACD,IAAA;AACA,GAAA,OAAO,GAAE;GACT;EACD;AACF;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveComponent, openBlock, createElementBlock, toDisplayString, createVNode, Fragment, renderList, normalizeClass, createElementVNode, createBlock, createCommentVNode, createTextVNode, resolveDynamicComponent, withCtx } from 'vue';
|
|
1
|
+
import { resolveComponent, openBlock, createElementBlock, toDisplayString, createVNode, Fragment, renderList, normalizeClass, createElementVNode, createBlock, createCommentVNode, createTextVNode, resolveDynamicComponent, withCtx, normalizeStyle } from 'vue';
|
|
2
2
|
|
|
3
3
|
const _hoisted_1 = {
|
|
4
4
|
class: "cn-facts-widget",
|
|
@@ -33,7 +33,12 @@ const _hoisted_16 = {
|
|
|
33
33
|
key: 0,
|
|
34
34
|
class: "cn-facts-widget__lead-subtitle"
|
|
35
35
|
};
|
|
36
|
-
const _hoisted_17 =
|
|
36
|
+
const _hoisted_17 = ["data-testid"];
|
|
37
|
+
const _hoisted_18 = { class: "cn-facts-widget__meter-head" };
|
|
38
|
+
const _hoisted_19 = { class: "cn-facts-widget__meter-label" };
|
|
39
|
+
const _hoisted_20 = { class: "cn-facts-widget__meter-value" };
|
|
40
|
+
const _hoisted_21 = ["aria-label", "aria-valuenow", "aria-valuemax", "aria-valuetext", "data-testid"];
|
|
41
|
+
const _hoisted_22 = { key: 6 };
|
|
37
42
|
|
|
38
43
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
39
44
|
const _component_NcLoadingIcon = resolveComponent("NcLoadingIcon");
|
|
@@ -186,16 +191,45 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
186
191
|
: createCommentVNode("v-if", true)
|
|
187
192
|
])
|
|
188
193
|
], 8 /* PROPS */, _hoisted_13))
|
|
189
|
-
: (block.kind === '
|
|
190
|
-
? (openBlock(), createElementBlock("div",
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
194
|
+
: (block.kind === 'meter')
|
|
195
|
+
? (openBlock(), createElementBlock("div", {
|
|
196
|
+
key: 5,
|
|
197
|
+
class: normalizeClass(["cn-facts-widget__meter", { 'cn-facts-widget__meter--over': block.over }]),
|
|
198
|
+
"data-testid": `cn-fact-${block.key}`
|
|
199
|
+
}, [
|
|
200
|
+
createElementVNode("div", _hoisted_18, [
|
|
201
|
+
createElementVNode("span", _hoisted_19, toDisplayString(block.label), 1 /* TEXT */),
|
|
202
|
+
createElementVNode("span", _hoisted_20, toDisplayString(block.value), 1 /* TEXT */)
|
|
203
|
+
]),
|
|
204
|
+
(block.limit !== null)
|
|
205
|
+
? (openBlock(), createElementBlock("div", {
|
|
206
|
+
key: 0,
|
|
207
|
+
class: "cn-facts-widget__meter-track",
|
|
208
|
+
role: "meter",
|
|
209
|
+
"aria-label": block.label,
|
|
210
|
+
"aria-valuenow": block.amount,
|
|
211
|
+
"aria-valuemin": "0",
|
|
212
|
+
"aria-valuemax": block.limit,
|
|
213
|
+
"aria-valuetext": block.value,
|
|
214
|
+
"data-testid": `cn-fact-${block.key}-bar`
|
|
215
|
+
}, [
|
|
216
|
+
createElementVNode("span", {
|
|
217
|
+
class: "cn-facts-widget__meter-bar",
|
|
218
|
+
style: normalizeStyle({ width: `${block.percent}%` })
|
|
219
|
+
}, null, 4 /* STYLE */)
|
|
220
|
+
], 8 /* PROPS */, _hoisted_21))
|
|
221
|
+
: createCommentVNode("v-if", true)
|
|
222
|
+
], 10 /* CLASS, PROPS */, _hoisted_17))
|
|
223
|
+
: (block.kind === 'pill')
|
|
224
|
+
? (openBlock(), createElementBlock("div", _hoisted_22, [
|
|
225
|
+
createVNode(_component_CnStatusBadge, {
|
|
226
|
+
label: block.value,
|
|
227
|
+
variant: block.variant,
|
|
228
|
+
size: "small",
|
|
229
|
+
"data-testid": `cn-fact-${block.key}`
|
|
230
|
+
}, null, 8 /* PROPS */, ["label", "variant", "data-testid"])
|
|
231
|
+
]))
|
|
232
|
+
: createCommentVNode("v-if", true)
|
|
199
233
|
], 64 /* STABLE_FRAGMENT */))
|
|
200
234
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
201
235
|
($options.link && $options.record)
|