@conduction/nextcloud-vue 2.171.0 → 2.172.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.
Files changed (31) hide show
  1. package/dist/esm/components/CnActionDialog/CnActionDialog.vue.js +1 -1
  2. package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js.map +1 -1
  3. package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js.map +1 -1
  4. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue.js +1 -1
  5. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue2.js +22 -3
  6. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue2.js.map +1 -1
  7. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue3.js.map +1 -1
  8. package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue.js +1 -1
  9. package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue2.js +75 -4
  10. package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue2.js.map +1 -1
  11. package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue3.js.map +1 -1
  12. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue.js +1 -1
  13. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js +7 -3
  14. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js.map +1 -1
  15. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js.map +1 -1
  16. package/dist/esm/library-style.js +1 -1
  17. package/dist/esm/nextcloud-vue.css +270 -162
  18. package/dist/esm/utils/builtInFormatters.js +19 -1
  19. package/dist/esm/utils/builtInFormatters.js.map +1 -1
  20. package/dist/nextcloud-vue.cjs.js +122 -13
  21. package/dist/nextcloud-vue.cjs.js.map +2 -2
  22. package/dist/nextcloud-vue.css +270 -162
  23. package/package.json +1 -1
  24. package/src/components/CnActionDialog/CnActionDialog.vue +4 -1
  25. package/src/components/CnChecklistRunWidget/CnChecklistRunWidget.vue +24 -3
  26. package/src/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue +75 -4
  27. package/src/components/CnFactsWidget/CnFactsWidget.vue +7 -3
  28. package/src/css/look-board-detail.css +100 -1
  29. package/src/css/look-board-index.css +7 -6
  30. package/src/css/patches.css +4 -1
  31. package/src/utils/builtInFormatters.js +18 -0
@@ -592,6 +592,23 @@ function formatUserName(value) {
592
592
  return userDisplayName(value) || String(value)
593
593
  }
594
594
 
595
+ /**
596
+ * A Dutch postcode as people read it: "2999AA" (as the registers store it)
597
+ * becomes "2999 AA". Anything that is not a Dutch postcode comes back as it is.
598
+ *
599
+ * @param {*} value The postcode.
600
+ * @return {string} The postcode with its space, the value as it is, or ''.
601
+ * @spec openspec/changes/facts-postcode-format/specs/facts-postcode-format/spec.md#requirement-a-facts-part-can-write-a-dutch-postcode-with-its-space
602
+ */
603
+ function formatPostcode(value) {
604
+ if (value === null || value === undefined || typeof value === 'object') {
605
+ return ''
606
+ }
607
+ const text = String(value).trim();
608
+ const match = /^([1-9]\d{3})\s*([a-zA-Z]{2})$/.exec(text);
609
+ return match ? `${match[1]} ${match[2].toUpperCase()}` : text
610
+ }
611
+
595
612
  const BUILT_IN_FORMATTERS = {
596
613
  date: formatDate,
597
614
  datetime: formatDateTime,
@@ -609,7 +626,8 @@ const BUILT_IN_FORMATTERS = {
609
626
  termDuration: formatTermDuration,
610
627
  valueMap: formatValueMap,
611
628
  userName: formatUserName,
629
+ postcode: formatPostcode,
612
630
  };
613
631
 
614
- export { BUILT_IN_FORMATTERS, formatConditionalPhrase, formatConnectionSettingsLabel, formatConnectionStatus, formatCount, formatCurrency, formatDate, formatDateTime, formatDaysSince, formatDaysUntil, formatIsoDuration, formatMasked, formatRelativeDay, formatRelativeTime, formatTermDuration, formatUserName, formatValueMap };
632
+ export { BUILT_IN_FORMATTERS, formatConditionalPhrase, formatConnectionSettingsLabel, formatConnectionStatus, formatCount, formatCurrency, formatDate, formatDateTime, formatDaysSince, formatDaysUntil, formatIsoDuration, formatMasked, formatPostcode, formatRelativeDay, formatRelativeTime, formatTermDuration, formatUserName, formatValueMap };
615
633
  //# sourceMappingURL=builtInFormatters.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"builtInFormatters.js","sources":["../../../src/utils/builtInFormatters.js"],"sourcesContent":["import { translatePlural as n, translate as t } from '@nextcloud/l10n'\nimport { formatRelativeDate } from './boardDate.js'\nimport { formatMoney } from './formatMetric.js'\nimport { parseDuration } from './isoDuration.js'\nimport { userDisplayName } from './userDisplayName.js'\n\n/**\n * @file Built-in formatters merged into the `cnFormatters` registry\n * `CnAppRoot` provides to descendants.\n *\n * Resolution order (in `CnCellRenderer`):\n * 1. Consumer-registered `formatters[id]` (passed to CnAppRoot).\n * 2. Built-in `BUILT_IN_FORMATTERS[id]` from this file.\n * 3. Schema-type-aware rendering.\n * 4. Plain `formatValue()` fallback.\n *\n * Consumer formatters win (CnAppRoot spreads\n * `{ ...BUILT_IN_FORMATTERS, ...props.formatters }`).\n *\n * A formatter is invoked as `fn(value, row, property, options)` — `options`\n * is the column's declarative `formatterOptions` map (undefined when the\n * column declares none), so config-driven formatters (`currency`,\n * `conditionalPhrase`) work without one registry function per configuration.\n * The fourth argument is additive: pre-existing three-argument formatters\n * are unaffected.\n *\n * Every built-in MUST be safe against null / empty / non-parseable\n * inputs — the contract is \"return the original value (or empty\n * string) rather than throw\".\n */\n\n/**\n * Parse a value that's meant to be a date — accepts a `Date` instance,\n * an ISO/parseable string, or a numeric timestamp.\n *\n * @param {Date|string|number|null|undefined} value The candidate date value.\n * @return {Date|null} A `Date` instance, or `null` if the input is null/empty/unparseable.\n */\nfunction toDate(value) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn null\n\t}\n\tif (value instanceof Date) {\n\t\treturn Number.isNaN(value.getTime()) ? null : value\n\t}\n\tconst d = new Date(value)\n\treturn Number.isNaN(d.getTime()) ? null : d\n}\n\n/**\n * Locale-formatted date (no time). Backed by `Intl.DateTimeFormat`\n * (`dateStyle: 'medium'`) using the user-agent locale.\n *\n * @param {unknown} value A `Date`, parseable date string, or timestamp.\n * @return {string} Formatted date, or `''` for null/empty, or `String(value)` for unparseable.\n */\nexport function formatDate(value) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn ''\n\t}\n\tconst d = toDate(value)\n\tif (!d) {\n\t\treturn String(value)\n\t}\n\treturn new Intl.DateTimeFormat(undefined, { dateStyle: 'medium' }).format(d)\n}\n\n/**\n * Locale-formatted date + time. Backed by `Intl.DateTimeFormat`\n * (`dateStyle: 'medium'`, `timeStyle: 'short'`).\n *\n * @param {unknown} value A `Date`, parseable date string, or timestamp.\n * @return {string} Formatted date + time, or `''` for null/empty, or `String(value)` for unparseable.\n */\nexport function formatDateTime(value) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn ''\n\t}\n\tconst d = toDate(value)\n\tif (!d) {\n\t\treturn String(value)\n\t}\n\treturn new Intl.DateTimeFormat(undefined, { dateStyle: 'medium', timeStyle: 'short' }).format(d)\n}\n\n/**\n * Relative time (\"3 days ago\") via `Intl.RelativeTimeFormat`.\n * Picks the coarsest unit whose absolute delta exceeds one unit,\n * down to minutes (anything sub-minute clamps to \"now\"/seconds).\n *\n * @param {unknown} value A `Date`, parseable date string, or timestamp.\n * @return {string} Relative phrasing, or `''` for null/empty, or `String(value)` for unparseable.\n */\nexport function formatRelativeTime(value) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn ''\n\t}\n\tconst d = toDate(value)\n\tif (!d) {\n\t\treturn String(value)\n\t}\n\tconst diffMs = d.getTime() - Date.now()\n\tconst rtf = new Intl.RelativeTimeFormat(undefined, { numeric: 'auto' })\n\tconst units = [\n\t\t['year', 31536000000],\n\t\t['month', 2592000000],\n\t\t['week', 604800000],\n\t\t['day', 86400000],\n\t\t['hour', 3600000],\n\t\t['minute', 60000],\n\t]\n\tfor (const [unit, ms] of units) {\n\t\tif (Math.abs(diffMs) >= ms || unit === 'minute') {\n\t\t\treturn rtf.format(Math.round(diffMs / ms), unit)\n\t\t}\n\t}\n\treturn rtf.format(0, 'second')\n}\n\n/**\n * Whole-day difference between a date value and today, comparing\n * date-only (both clamped to local midnight) so a due date later today\n * still counts as \"today\", not \"in 0.4 days\".\n *\n * @param {Date} d The parsed date.\n * @return {number} Signed day count: positive = future, negative = past, 0 = today.\n */\nfunction dayDiffFromToday(d) {\n\tconst target = new Date(d)\n\ttarget.setHours(0, 0, 0, 0)\n\tconst today = new Date()\n\ttoday.setHours(0, 0, 0, 0)\n\treturn Math.round((target.getTime() - today.getTime()) / 86400000)\n}\n\n/**\n * Future-oriented deadline formatter (`daysUntil` registry key), i18n'd\n * through the library's own translation slug (`nextcloud-vue`):\n * a future date renders \"N days remaining\", today renders \"Due today\",\n * and a past date renders \"N days overdue\". Day counts are plural-aware\n * via `translatePlural`.\n *\n * Null-safe per the built-in-formatter contract: `''` for null/empty,\n * `String(value)` for unparseable input — never throws.\n *\n * @param {unknown} value A `Date`, parseable date string, or timestamp.\n * @return {string} The relative-day phrasing (or ''/original on bad input).\n */\nexport function formatDaysUntil(value) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn ''\n\t}\n\tconst d = toDate(value)\n\tif (!d) {\n\t\treturn String(value)\n\t}\n\tconst days = dayDiffFromToday(d)\n\tif (days === 0) {\n\t\treturn t('nextcloud-vue', 'Due today')\n\t}\n\tif (days > 0) {\n\t\treturn n('nextcloud-vue', '{count} day remaining', '{count} days remaining', days, { count: days })\n\t}\n\tconst overdue = Math.abs(days)\n\treturn n('nextcloud-vue', '{count} day overdue', '{count} days overdue', overdue, { count: overdue })\n}\n\n/**\n * Elapsed-time formatter (`daysSince` registry key), i18n'd through the\n * library's own translation slug (`nextcloud-vue`) in the Nextcloud user\n * language. Whole calendar days, read as a running phrase so it sits after a\n * title or in a meta line: today renders \"today\", one day back renders\n * \"yesterday\", further back renders \"N days ago\". A (nonsensical but\n * harmless) future date renders \"tomorrow\" or \"in N days\". Day counts are\n * plural-aware via `translatePlural`.\n *\n * Null-safe per the built-in-formatter contract: `''` for null/empty,\n * `String(value)` for unparseable input, never throws.\n *\n * @param {unknown} value A `Date`, parseable date string, or timestamp.\n * @return {string} The relative-day phrasing (or ''/original on bad input).\n */\nexport function formatDaysSince(value) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn ''\n\t}\n\tconst d = toDate(value)\n\tif (!d) {\n\t\treturn String(value)\n\t}\n\tconst days = dayDiffFromToday(d)\n\tif (days === 0) {\n\t\treturn t('nextcloud-vue', 'today')\n\t}\n\tif (days === -1) {\n\t\treturn t('nextcloud-vue', 'yesterday')\n\t}\n\tif (days === 1) {\n\t\treturn t('nextcloud-vue', 'tomorrow')\n\t}\n\tif (days < 0) {\n\t\tconst ago = Math.abs(days)\n\t\treturn n('nextcloud-vue', '{count} day ago', '{count} days ago', ago, { count: ago })\n\t}\n\treturn n('nextcloud-vue', 'in {count} day', 'in {count} days', days, { count: days })\n}\n\n/**\n * Relative-date formatter (`relativeDate` registry key): \"today\", \"yesterday\",\n * then the board's short date (\"5 okt\"). The column's `formatterOptions` may set\n * `time: true` to add the time of day after the day (\"vandaag, 09.42\").\n *\n * Null-safe per the built-in-formatter contract: `''` for null/empty,\n * `String(value)` for unparseable input, never throws.\n *\n * @param {unknown} value A `Date`, parseable date string, or timestamp.\n * @param {object} [_row] The full row (unused).\n * @param {object} [_property] The schema property (unused).\n * @param {{time?: boolean}} [options] The column's `formatterOptions`.\n * @return {string} The relative-day phrasing (or ''/original on bad input).\n * @spec openspec/changes/screens-relative-dates/specs/relative-dates/spec.md#requirement-a-relative-date-reads-today-yesterday-then-a-short-date\n */\nexport function formatRelativeDay(value, _row, _property, options) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn ''\n\t}\n\tconst text = formatRelativeDate(value, { withTime: options?.time === true })\n\treturn text === '' ? String(value) : text\n}\n\n/**\n * Currency formatter (`currency` registry key) via `Intl.NumberFormat`.\n * Defaults to EUR; the column's `formatterOptions` may set `currency`\n * (ISO-4217 code, guarded by `safeCurrencyCode` so an invalid code can\n * never throw a `RangeError`) and `decimals` (default 2).\n *\n * Null-safe per the built-in-formatter contract: `''` for null/empty,\n * `String(value)` for non-numeric input — never throws.\n *\n * @param {unknown} value A numeric value (or numeric string).\n * @param {object} [row] The full row, for `currencyField`.\n * @param {object} [_property] The schema property (unused).\n * @param {{currency?: string, currencyField?: string, decimals?: number}} [options] The column's `formatterOptions`.\n * @return {string} The locale currency string (or ''/original on bad input).\n */\nexport function formatCurrency(value, row, _property, options) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn ''\n\t}\n\tconst num = Number(value)\n\tif (!Number.isFinite(num)) {\n\t\treturn String(value)\n\t}\n\treturn formatMoney(num, options || {}, row)\n}\n\n/**\n * Sign/zero-based phrase selector (`conditionalPhrase` registry key) —\n * generalizes `daysUntil` to ANY numeric field: the column's\n * `formatterOptions` supply pre-translated `{ negative, zero, positive }`\n * phrases and the matching one renders with `{n}` replaced by the ABSOLUTE\n * value (so \"{n} days overdue\" reads naturally for -3). Phrases are\n * consumer-provided strings — apps translate them before declaring the\n * column, keeping i18n in the app layer.\n *\n * Null-safe per the built-in-formatter contract: `''` for null/empty,\n * `String(value)` for non-numeric input or when the selected phrase is\n * missing — never throws.\n *\n * @param {unknown} value A numeric value (or numeric string).\n * @param {object} [_row] The full row (unused).\n * @param {object} [_property] The schema property (unused).\n * @param {{negative?: string, zero?: string, positive?: string}} [options] The column's `formatterOptions`.\n * @return {string} The selected phrase with `{n}` substituted (or ''/original on bad input).\n */\nexport function formatConditionalPhrase(value, _row, _property, options) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn ''\n\t}\n\tconst num = Number(value)\n\tif (!Number.isFinite(num)) {\n\t\treturn String(value)\n\t}\n\tconst opts = options || {}\n\tconst phrase = num < 0 ? opts.negative : (num > 0 ? opts.positive : opts.zero)\n\tif (typeof phrase !== 'string' || phrase === '') {\n\t\treturn String(value)\n\t}\n\treturn phrase.replace(/\\{n\\}/g, String(Math.abs(num)))\n}\n\n/**\n * Read a value that may be a collection SERIALISED as JSON back into the\n * collection itself. OpenRegister hands a stringified array back for some\n * property types (and an app's own import path may persist one), which\n * `formatCount` would otherwise report as a single entry.\n *\n * Only `[`/`{`-leading strings are tried, so an ordinary text value never pays\n * for a parse attempt, and a string that merely looks like JSON but isn't falls\n * back to being one entry.\n *\n * @param {unknown} value The raw cell value.\n * @return {unknown} The parsed collection, or `value` unchanged.\n */\nfunction parseCollection(value) {\n\tif (typeof value !== 'string') {\n\t\treturn value\n\t}\n\tconst trimmed = value.trim()\n\tif (trimmed[0] !== '[' && trimmed[0] !== '{') {\n\t\treturn value\n\t}\n\ttry {\n\t\tconst parsed = JSON.parse(trimmed)\n\t\treturn (parsed !== null && typeof parsed === 'object') ? parsed : value\n\t} catch {\n\t\treturn value\n\t}\n}\n\n/**\n * Entry-count summariser (`count` registry key) — renders a collection-valued\n * cell as \"5 frames\" instead of the truncated JSON blob `formatValue` would\n * produce. Counts array entries or object keys; a PRESENT scalar counts as 1.\n * The column's `formatterOptions` supply pre-translated\n * `{ singular, plural, zero }` phrases with `{n}` substituted, following the\n * `conditionalPhrase` convention of keeping i18n in the app layer. Without\n * phrases it renders the bare count.\n *\n * Null-safe per the built-in-formatter contract: `zero` (or `''`) for\n * null/empty — never throws.\n *\n * @param {unknown} value An array, object, JSON-encoded collection, or scalar.\n * @param {object} [_row] The full row (unused).\n * @param {object} [_property] The schema property (unused).\n * @param {{singular?: string, plural?: string, zero?: string}} [options] The column's `formatterOptions`.\n * @return {string} The selected phrase with `{n}` substituted, or the bare count.\n */\nexport function formatCount(value, _row, _property, options) {\n\tconst opts = options || {}\n\tconst zero = typeof opts.zero === 'string' ? opts.zero : ''\n\t// Every EMPTY value takes the zero phrase, not just null/''. `0` and `false`\n\t// used to fall through to the scalar branch and count as one entry, so a\n\t// column over a `0` rendered \"1 retry\" — the singular of a thing that isn't\n\t// there.\n\tif (value === null || value === undefined || value === '' || value === 0 || value === false) {\n\t\treturn zero\n\t}\n\tconst collection = parseCollection(value)\n\tlet n\n\tif (Array.isArray(collection)) {\n\t\tn = collection.length\n\t} else if (typeof collection === 'object') {\n\t\tn = Object.keys(collection).length\n\t} else {\n\t\tn = 1\n\t}\n\tif (n === 0) {\n\t\treturn zero\n\t}\n\tconst phrase = n === 1 ? (opts.singular ?? opts.plural) : (opts.plural ?? opts.singular)\n\tif (typeof phrase !== 'string' || phrase === '') {\n\t\treturn String(n)\n\t}\n\treturn phrase.replace(/\\{n\\}/g, String(n))\n}\n\n/**\n * The seven stored connection status values and their English source labels.\n *\n * The label is translated on each call, not here. A module-level `t()` runs\n * before the catalogue is registered and would freeze every label in English.\n */\nconst CONNECTION_STATUS_LABELS = {\n\tconfigured: 'Configured',\n\tlimited: 'Limited',\n\tunconfigured: 'Not configured',\n\tsimulated: 'Simulated',\n\tdisabled: 'Switched off',\n\tunavailable: 'Not available',\n\terror: 'Error',\n}\n\n/**\n * The short labels `formatterOptions.short` draws (board DqInstellingen\n * \"Aan / Uit / Fout\"): a connection that works in some form is on, one that\n * does not run is off, and a failing one is an error.\n */\nconst CONNECTION_STATUS_SHORT_LABELS = {\n\tconfigured: 'On',\n\tlimited: 'On',\n\tsimulated: 'On',\n\tunconfigured: 'Off',\n\tdisabled: 'Off',\n\tunavailable: 'Off',\n\terror: 'Error',\n}\n\n/**\n * Connection status formatter (`connectionStatus` registry key) for the\n * fleet connection registry. Renders one of the seven stored status values\n * as its translated label through the library's own slug (`nextcloud-vue`).\n * With `formatterOptions.short` it renders the board's three short labels\n * instead: On (configured, limited, simulated), Off (not configured,\n * switched off, not available) and Error.\n *\n * An unknown value passes through unchanged, so a status added later still\n * shows as its raw value instead of an empty cell. Null and undefined render\n * as `''`. Never throws.\n *\n * @param {unknown} value The stored status value.\n * @param {object} [row] The row (unused).\n * @param {object} [property] The column's property (unused).\n * @param {{short?: boolean}} [options] The column's `formatterOptions`.\n * @return {string} The translated label, or the value itself when it is not one of the seven.\n */\nexport function formatConnectionStatus(value, row, property, options) {\n\tif (value === null || value === undefined) {\n\t\treturn ''\n\t}\n\tconst labels = options && options.short === true ? CONNECTION_STATUS_SHORT_LABELS : CONNECTION_STATUS_LABELS\n\tconst label = Object.hasOwn(labels, value) ? labels[value] : null\n\treturn label ? t('nextcloud-vue', label) : String(value)\n}\n\n/**\n * Connection settings label formatter (`connectionSettingsLabel` registry\n * key). Renders \"Open settings\" when the row's `settingsUrl` is a non-empty\n * string, and `''` otherwise. Paired with the built-in `link` cell widget, an\n * empty label and href fall through to plain empty text, so a connection with\n * no settings section offers nothing to click.\n *\n * @param {unknown} value The row's `settingsUrl`.\n * @return {string} The translated link text, or `''`.\n */\nexport function formatConnectionSettingsLabel(value) {\n\treturn typeof value === 'string' && value !== ''\n\t\t? t('nextcloud-vue', 'Open settings')\n\t\t: ''\n}\n\n/**\n * Show a value with all but its last characters replaced by `*`, as the facts\n * widget's `masked` format does: an IBAN or a BSN reads `*****4567`.\n *\n * DISPLAY ONLY, NOT ACCESS CONTROL. The full value is still in the row the\n * page received; a reader with the browser's developer tools can read it.\n * A value the reader must not have belongs hidden in OpenRegister (property\n * authorization), not masked here.\n *\n * The column's `formatterOptions.visible` sets how many characters stay\n * (default 4); at most five `*` are drawn, so the length does not leak.\n * Null-safe: `''` for null or empty.\n *\n * @param {unknown} value The value.\n * @param {object} [_row] The full row (unused).\n * @param {object} [_property] The schema property (unused).\n * @param {{visible?: number}} [options] The column's `formatterOptions`.\n * @return {string} The masked value.\n * @spec openspec/changes/masked-formatter-max-aggregate/specs/index-page/spec.md#requirement-a-column-can-mask-its-value-for-display\n */\nexport function formatMasked(value, _row, _property, options) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn ''\n\t}\n\tconst text = String(value)\n\tconst visible = Number.isInteger(options && options.visible) && options.visible >= 0 ? options.visible : 4\n\tif (text.length <= visible) {\n\t\treturn text\n\t}\n\treturn '*'.repeat(Math.min(text.length - visible, 5)) + (visible > 0 ? text.slice(-visible) : '')\n}\n\n/**\n * A stored value through a display map (`valueMap` registry key): the label\n * `options.map` gives the value, else the value as stored. \"Besloten\n * Vennootschap\" reads \"BV\" on DqOrganisaties.\n *\n * @param {unknown} value The stored value.\n * @param {object} [_row] The full row (unused).\n * @param {object} [_property] The schema property (unused).\n * @param {{map?: Object<string, string>}} [options] The column's `formatterOptions`.\n * @return {string} The label, or the value.\n * @spec openspec/changes/value-map-formatter/specs/index-page/spec.md#requirement-a-column-can-show-stored-values-through-a-display-map\n */\nexport function formatValueMap(value, _row, _property, options) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn ''\n\t}\n\tconst map = options && options.map && typeof options.map === 'object' ? options.map : {}\n\tconst label = Object.hasOwn(map, String(value)) ? map[String(value)] : undefined\n\treturn typeof label === 'string' && label !== '' ? label : String(value)\n}\n\n/**\n * Built-in formatter registry merged under any consumer-registered\n * `formatters` in `CnAppRoot`'s `cnFormatters` provide.\n */\n/**\n * An ISO-8601 period of one unit in words (`isoDuration` registry key):\n * `P10Y` reads \"10 years\", `P6W` \"6 weeks\". A retention period or a term is\n * stored as such a period and was shown raw. Anything that is not a one-unit\n * period is returned as written, `''` for null or empty.\n *\n * @param {unknown} value The stored period.\n * @return {string} The period in words.\n */\nexport function formatIsoDuration(value) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn ''\n\t}\n\tconst period = parseDuration(String(value))\n\tif (period === null) {\n\t\treturn String(value)\n\t}\n\tconst words = {\n\t\tyears: () => n('nextcloud-vue', '%n year', '%n years', period.amount),\n\t\tmonths: () => n('nextcloud-vue', '%n month', '%n months', period.amount),\n\t\tweeks: () => n('nextcloud-vue', '%n week', '%n weeks', period.amount),\n\t\tdays: () => n('nextcloud-vue', '%n day', '%n days', period.amount),\n\t\thours: () => n('nextcloud-vue', '%n hour', '%n hours', period.amount),\n\t\tminutes: () => n('nextcloud-vue', '%n minute', '%n minutes', period.amount),\n\t}\n\treturn words[period.unit] ? words[period.unit]() : String(value)\n}\n\n/** The ISO designator of each date unit a term is written in. */\nconst UNIT_DESIGNATOR = { years: 'Y', months: 'M', weeks: 'W', days: 'D' }\n\n/**\n * A one-unit ISO-8601 period, a day count that is whole weeks read as weeks\n * (a term of `P28D` is \"4 weeks\"); null when it is not a one-unit period.\n *\n * @param {unknown} value The stored period.\n * @return {{amount: number, unit: string}|null}\n */\nfunction termPeriod(value) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn null\n\t}\n\tconst period = parseDuration(String(value))\n\tif (period === null || !UNIT_DESIGNATOR[period.unit]) {\n\t\treturn null\n\t}\n\tif (period.unit === 'days' && period.amount > 0 && period.amount % 7 === 0) {\n\t\treturn { amount: period.amount / 7, unit: 'weeks' }\n\t}\n\treturn period\n}\n\n/**\n * A term in words, with the extension it may get (`format: 'duration'`):\n * `P28D` reads \"4 weeks\", and with an extension of `P14D` \"4 weeks,\n * extendable by 2\" (the unit is said once when both share it). A time of\n * hours or minutes reads in words too (`PT6M` is \"6 minutes\"). A value that\n * is not a one-unit period is returned as written, '' for null or empty.\n *\n * @spec openspec/changes/data-widget-duration-format/specs/data-widget/spec.md#requirement-a-term-reads-in-words-with-its-extension\n * @spec openspec/changes/duration-time-units/specs/data-widget/spec.md#requirement-a-duration-in-hours-or-minutes-reads-in-words\n * @param {unknown} value The stored term.\n * @param {unknown} [extension] The stored extension period, if any.\n * @return {string}\n */\nexport function formatTermDuration(value, extension = null) {\n\tconst term = termPeriod(value)\n\tif (term === null) {\n\t\treturn value === null || value === undefined ? '' : formatIsoDuration(value)\n\t}\n\tconst words = formatIsoDuration(`P${term.amount}${UNIT_DESIGNATOR[term.unit]}`)\n\tconst extra = termPeriod(extension)\n\tif (extra === null || extra.amount === 0) {\n\t\treturn words\n\t}\n\tconst extraWords = extra.unit === term.unit\n\t\t? String(extra.amount)\n\t\t: formatIsoDuration(`P${extra.amount}${UNIT_DESIGNATOR[extra.unit]}`)\n\treturn t('nextcloud-vue', '{term}, extendable by {extension}', { term: words, extension: extraWords })\n}\n\n/**\n * A Nextcloud user id as its display name (`userName` registry key): the id\n * while the name is looked up, and for a user nobody answers for.\n *\n * @spec openspec/changes/user-name-formatter/specs/user-name-formatter/spec.md#requirement-a-user-id-can-read-as-its-display-name\n * @param {unknown} value The user id.\n * @return {string} The display name, the id, or ''.\n */\nexport function formatUserName(value) {\n\tif (value === null || value === undefined || value === '' || typeof value === 'object') {\n\t\treturn ''\n\t}\n\treturn userDisplayName(value) || String(value)\n}\n\nexport const BUILT_IN_FORMATTERS = {\n\tdate: formatDate,\n\tdatetime: formatDateTime,\n\t'relative-time': formatRelativeTime,\n\tdaysSince: formatDaysSince,\n\tdaysUntil: formatDaysUntil,\n\trelativeDate: formatRelativeDay,\n\tcurrency: formatCurrency,\n\tconditionalPhrase: formatConditionalPhrase,\n\tcount: formatCount,\n\tconnectionStatus: formatConnectionStatus,\n\tconnectionSettingsLabel: formatConnectionSettingsLabel,\n\tmasked: formatMasked,\n\tisoDuration: formatIsoDuration,\n\ttermDuration: formatTermDuration,\n\tvalueMap: formatValueMap,\n\tuserName: formatUserName,\n}\n"],"names":["t","n"],"mappings":";;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,MAAM,CAAC,KAAK,EAAE;AACvB,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,EAAE;AAC5D,EAAE,OAAO,IAAI;AACb,EAAE;AACF,CAAC,IAAI,KAAK,YAAY,IAAI,EAAE;AAC5B,EAAE,OAAO,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,GAAG,IAAI,GAAG,KAAK;AACrD,EAAE;AACF,CAAC,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,KAAK,EAAC;A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,cAAc,CAAC,KAAK,EAAE;AACtC,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACzF,EAAE,OAAO,EAAE;AACX,EAAE;AACF,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC;AAC/C,CAAC;AACD;AACY,MAAC,mBAAmB,GAAG;AACnC,CAAC,IAAI,EAAE,UAAU;AACjB,CAAC,QAAQ,EAAE,cAAc;AACzB,CAAC,eAAe,EAAE,kBAAkB;AACpC,CAAC,SAAS,EAAE,eAAe;AAC3B,CAAC,SAAS,EAAE,eAAe;AAC3B,CAAC,YAAY,EAAE,iBAAiB;AAChC,CAAC,QAAQ,EAAE,cAAc;AACzB,CAAC,iBAAiB,EAAE,uBAAuB;AAC3C,CAAC,KAAK,EAAE,WAAW;AACnB,CAAC,gBAAgB,EAAE,sBAAsB;AACzC,CAAC,uBAAuB,EAAE,6BAA6B;AACvD,CAAC,MAAM,EAAE,YAAY;AACrB,CAAC,WAAW,EAAE,iBAAiB;AAC/B,CAAC,YAAY,EAAE,kBAAkB;AACjC,CAAC,QAAQ,EAAE,cAAc;AACzB,CAAC,QAAQ,EAAE,cAAc;AACzB;;;;"}
1
+ {"version":3,"file":"builtInFormatters.js","sources":["../../../src/utils/builtInFormatters.js"],"sourcesContent":["import { translatePlural as n, translate as t } from '@nextcloud/l10n'\nimport { formatRelativeDate } from './boardDate.js'\nimport { formatMoney } from './formatMetric.js'\nimport { parseDuration } from './isoDuration.js'\nimport { userDisplayName } from './userDisplayName.js'\n\n/**\n * @file Built-in formatters merged into the `cnFormatters` registry\n * `CnAppRoot` provides to descendants.\n *\n * Resolution order (in `CnCellRenderer`):\n * 1. Consumer-registered `formatters[id]` (passed to CnAppRoot).\n * 2. Built-in `BUILT_IN_FORMATTERS[id]` from this file.\n * 3. Schema-type-aware rendering.\n * 4. Plain `formatValue()` fallback.\n *\n * Consumer formatters win (CnAppRoot spreads\n * `{ ...BUILT_IN_FORMATTERS, ...props.formatters }`).\n *\n * A formatter is invoked as `fn(value, row, property, options)` — `options`\n * is the column's declarative `formatterOptions` map (undefined when the\n * column declares none), so config-driven formatters (`currency`,\n * `conditionalPhrase`) work without one registry function per configuration.\n * The fourth argument is additive: pre-existing three-argument formatters\n * are unaffected.\n *\n * Every built-in MUST be safe against null / empty / non-parseable\n * inputs — the contract is \"return the original value (or empty\n * string) rather than throw\".\n */\n\n/**\n * Parse a value that's meant to be a date — accepts a `Date` instance,\n * an ISO/parseable string, or a numeric timestamp.\n *\n * @param {Date|string|number|null|undefined} value The candidate date value.\n * @return {Date|null} A `Date` instance, or `null` if the input is null/empty/unparseable.\n */\nfunction toDate(value) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn null\n\t}\n\tif (value instanceof Date) {\n\t\treturn Number.isNaN(value.getTime()) ? null : value\n\t}\n\tconst d = new Date(value)\n\treturn Number.isNaN(d.getTime()) ? null : d\n}\n\n/**\n * Locale-formatted date (no time). Backed by `Intl.DateTimeFormat`\n * (`dateStyle: 'medium'`) using the user-agent locale.\n *\n * @param {unknown} value A `Date`, parseable date string, or timestamp.\n * @return {string} Formatted date, or `''` for null/empty, or `String(value)` for unparseable.\n */\nexport function formatDate(value) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn ''\n\t}\n\tconst d = toDate(value)\n\tif (!d) {\n\t\treturn String(value)\n\t}\n\treturn new Intl.DateTimeFormat(undefined, { dateStyle: 'medium' }).format(d)\n}\n\n/**\n * Locale-formatted date + time. Backed by `Intl.DateTimeFormat`\n * (`dateStyle: 'medium'`, `timeStyle: 'short'`).\n *\n * @param {unknown} value A `Date`, parseable date string, or timestamp.\n * @return {string} Formatted date + time, or `''` for null/empty, or `String(value)` for unparseable.\n */\nexport function formatDateTime(value) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn ''\n\t}\n\tconst d = toDate(value)\n\tif (!d) {\n\t\treturn String(value)\n\t}\n\treturn new Intl.DateTimeFormat(undefined, { dateStyle: 'medium', timeStyle: 'short' }).format(d)\n}\n\n/**\n * Relative time (\"3 days ago\") via `Intl.RelativeTimeFormat`.\n * Picks the coarsest unit whose absolute delta exceeds one unit,\n * down to minutes (anything sub-minute clamps to \"now\"/seconds).\n *\n * @param {unknown} value A `Date`, parseable date string, or timestamp.\n * @return {string} Relative phrasing, or `''` for null/empty, or `String(value)` for unparseable.\n */\nexport function formatRelativeTime(value) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn ''\n\t}\n\tconst d = toDate(value)\n\tif (!d) {\n\t\treturn String(value)\n\t}\n\tconst diffMs = d.getTime() - Date.now()\n\tconst rtf = new Intl.RelativeTimeFormat(undefined, { numeric: 'auto' })\n\tconst units = [\n\t\t['year', 31536000000],\n\t\t['month', 2592000000],\n\t\t['week', 604800000],\n\t\t['day', 86400000],\n\t\t['hour', 3600000],\n\t\t['minute', 60000],\n\t]\n\tfor (const [unit, ms] of units) {\n\t\tif (Math.abs(diffMs) >= ms || unit === 'minute') {\n\t\t\treturn rtf.format(Math.round(diffMs / ms), unit)\n\t\t}\n\t}\n\treturn rtf.format(0, 'second')\n}\n\n/**\n * Whole-day difference between a date value and today, comparing\n * date-only (both clamped to local midnight) so a due date later today\n * still counts as \"today\", not \"in 0.4 days\".\n *\n * @param {Date} d The parsed date.\n * @return {number} Signed day count: positive = future, negative = past, 0 = today.\n */\nfunction dayDiffFromToday(d) {\n\tconst target = new Date(d)\n\ttarget.setHours(0, 0, 0, 0)\n\tconst today = new Date()\n\ttoday.setHours(0, 0, 0, 0)\n\treturn Math.round((target.getTime() - today.getTime()) / 86400000)\n}\n\n/**\n * Future-oriented deadline formatter (`daysUntil` registry key), i18n'd\n * through the library's own translation slug (`nextcloud-vue`):\n * a future date renders \"N days remaining\", today renders \"Due today\",\n * and a past date renders \"N days overdue\". Day counts are plural-aware\n * via `translatePlural`.\n *\n * Null-safe per the built-in-formatter contract: `''` for null/empty,\n * `String(value)` for unparseable input — never throws.\n *\n * @param {unknown} value A `Date`, parseable date string, or timestamp.\n * @return {string} The relative-day phrasing (or ''/original on bad input).\n */\nexport function formatDaysUntil(value) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn ''\n\t}\n\tconst d = toDate(value)\n\tif (!d) {\n\t\treturn String(value)\n\t}\n\tconst days = dayDiffFromToday(d)\n\tif (days === 0) {\n\t\treturn t('nextcloud-vue', 'Due today')\n\t}\n\tif (days > 0) {\n\t\treturn n('nextcloud-vue', '{count} day remaining', '{count} days remaining', days, { count: days })\n\t}\n\tconst overdue = Math.abs(days)\n\treturn n('nextcloud-vue', '{count} day overdue', '{count} days overdue', overdue, { count: overdue })\n}\n\n/**\n * Elapsed-time formatter (`daysSince` registry key), i18n'd through the\n * library's own translation slug (`nextcloud-vue`) in the Nextcloud user\n * language. Whole calendar days, read as a running phrase so it sits after a\n * title or in a meta line: today renders \"today\", one day back renders\n * \"yesterday\", further back renders \"N days ago\". A (nonsensical but\n * harmless) future date renders \"tomorrow\" or \"in N days\". Day counts are\n * plural-aware via `translatePlural`.\n *\n * Null-safe per the built-in-formatter contract: `''` for null/empty,\n * `String(value)` for unparseable input, never throws.\n *\n * @param {unknown} value A `Date`, parseable date string, or timestamp.\n * @return {string} The relative-day phrasing (or ''/original on bad input).\n */\nexport function formatDaysSince(value) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn ''\n\t}\n\tconst d = toDate(value)\n\tif (!d) {\n\t\treturn String(value)\n\t}\n\tconst days = dayDiffFromToday(d)\n\tif (days === 0) {\n\t\treturn t('nextcloud-vue', 'today')\n\t}\n\tif (days === -1) {\n\t\treturn t('nextcloud-vue', 'yesterday')\n\t}\n\tif (days === 1) {\n\t\treturn t('nextcloud-vue', 'tomorrow')\n\t}\n\tif (days < 0) {\n\t\tconst ago = Math.abs(days)\n\t\treturn n('nextcloud-vue', '{count} day ago', '{count} days ago', ago, { count: ago })\n\t}\n\treturn n('nextcloud-vue', 'in {count} day', 'in {count} days', days, { count: days })\n}\n\n/**\n * Relative-date formatter (`relativeDate` registry key): \"today\", \"yesterday\",\n * then the board's short date (\"5 okt\"). The column's `formatterOptions` may set\n * `time: true` to add the time of day after the day (\"vandaag, 09.42\").\n *\n * Null-safe per the built-in-formatter contract: `''` for null/empty,\n * `String(value)` for unparseable input, never throws.\n *\n * @param {unknown} value A `Date`, parseable date string, or timestamp.\n * @param {object} [_row] The full row (unused).\n * @param {object} [_property] The schema property (unused).\n * @param {{time?: boolean}} [options] The column's `formatterOptions`.\n * @return {string} The relative-day phrasing (or ''/original on bad input).\n * @spec openspec/changes/screens-relative-dates/specs/relative-dates/spec.md#requirement-a-relative-date-reads-today-yesterday-then-a-short-date\n */\nexport function formatRelativeDay(value, _row, _property, options) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn ''\n\t}\n\tconst text = formatRelativeDate(value, { withTime: options?.time === true })\n\treturn text === '' ? String(value) : text\n}\n\n/**\n * Currency formatter (`currency` registry key) via `Intl.NumberFormat`.\n * Defaults to EUR; the column's `formatterOptions` may set `currency`\n * (ISO-4217 code, guarded by `safeCurrencyCode` so an invalid code can\n * never throw a `RangeError`) and `decimals` (default 2).\n *\n * Null-safe per the built-in-formatter contract: `''` for null/empty,\n * `String(value)` for non-numeric input — never throws.\n *\n * @param {unknown} value A numeric value (or numeric string).\n * @param {object} [row] The full row, for `currencyField`.\n * @param {object} [_property] The schema property (unused).\n * @param {{currency?: string, currencyField?: string, decimals?: number}} [options] The column's `formatterOptions`.\n * @return {string} The locale currency string (or ''/original on bad input).\n */\nexport function formatCurrency(value, row, _property, options) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn ''\n\t}\n\tconst num = Number(value)\n\tif (!Number.isFinite(num)) {\n\t\treturn String(value)\n\t}\n\treturn formatMoney(num, options || {}, row)\n}\n\n/**\n * Sign/zero-based phrase selector (`conditionalPhrase` registry key) —\n * generalizes `daysUntil` to ANY numeric field: the column's\n * `formatterOptions` supply pre-translated `{ negative, zero, positive }`\n * phrases and the matching one renders with `{n}` replaced by the ABSOLUTE\n * value (so \"{n} days overdue\" reads naturally for -3). Phrases are\n * consumer-provided strings — apps translate them before declaring the\n * column, keeping i18n in the app layer.\n *\n * Null-safe per the built-in-formatter contract: `''` for null/empty,\n * `String(value)` for non-numeric input or when the selected phrase is\n * missing — never throws.\n *\n * @param {unknown} value A numeric value (or numeric string).\n * @param {object} [_row] The full row (unused).\n * @param {object} [_property] The schema property (unused).\n * @param {{negative?: string, zero?: string, positive?: string}} [options] The column's `formatterOptions`.\n * @return {string} The selected phrase with `{n}` substituted (or ''/original on bad input).\n */\nexport function formatConditionalPhrase(value, _row, _property, options) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn ''\n\t}\n\tconst num = Number(value)\n\tif (!Number.isFinite(num)) {\n\t\treturn String(value)\n\t}\n\tconst opts = options || {}\n\tconst phrase = num < 0 ? opts.negative : (num > 0 ? opts.positive : opts.zero)\n\tif (typeof phrase !== 'string' || phrase === '') {\n\t\treturn String(value)\n\t}\n\treturn phrase.replace(/\\{n\\}/g, String(Math.abs(num)))\n}\n\n/**\n * Read a value that may be a collection SERIALISED as JSON back into the\n * collection itself. OpenRegister hands a stringified array back for some\n * property types (and an app's own import path may persist one), which\n * `formatCount` would otherwise report as a single entry.\n *\n * Only `[`/`{`-leading strings are tried, so an ordinary text value never pays\n * for a parse attempt, and a string that merely looks like JSON but isn't falls\n * back to being one entry.\n *\n * @param {unknown} value The raw cell value.\n * @return {unknown} The parsed collection, or `value` unchanged.\n */\nfunction parseCollection(value) {\n\tif (typeof value !== 'string') {\n\t\treturn value\n\t}\n\tconst trimmed = value.trim()\n\tif (trimmed[0] !== '[' && trimmed[0] !== '{') {\n\t\treturn value\n\t}\n\ttry {\n\t\tconst parsed = JSON.parse(trimmed)\n\t\treturn (parsed !== null && typeof parsed === 'object') ? parsed : value\n\t} catch {\n\t\treturn value\n\t}\n}\n\n/**\n * Entry-count summariser (`count` registry key) — renders a collection-valued\n * cell as \"5 frames\" instead of the truncated JSON blob `formatValue` would\n * produce. Counts array entries or object keys; a PRESENT scalar counts as 1.\n * The column's `formatterOptions` supply pre-translated\n * `{ singular, plural, zero }` phrases with `{n}` substituted, following the\n * `conditionalPhrase` convention of keeping i18n in the app layer. Without\n * phrases it renders the bare count.\n *\n * Null-safe per the built-in-formatter contract: `zero` (or `''`) for\n * null/empty — never throws.\n *\n * @param {unknown} value An array, object, JSON-encoded collection, or scalar.\n * @param {object} [_row] The full row (unused).\n * @param {object} [_property] The schema property (unused).\n * @param {{singular?: string, plural?: string, zero?: string}} [options] The column's `formatterOptions`.\n * @return {string} The selected phrase with `{n}` substituted, or the bare count.\n */\nexport function formatCount(value, _row, _property, options) {\n\tconst opts = options || {}\n\tconst zero = typeof opts.zero === 'string' ? opts.zero : ''\n\t// Every EMPTY value takes the zero phrase, not just null/''. `0` and `false`\n\t// used to fall through to the scalar branch and count as one entry, so a\n\t// column over a `0` rendered \"1 retry\" — the singular of a thing that isn't\n\t// there.\n\tif (value === null || value === undefined || value === '' || value === 0 || value === false) {\n\t\treturn zero\n\t}\n\tconst collection = parseCollection(value)\n\tlet n\n\tif (Array.isArray(collection)) {\n\t\tn = collection.length\n\t} else if (typeof collection === 'object') {\n\t\tn = Object.keys(collection).length\n\t} else {\n\t\tn = 1\n\t}\n\tif (n === 0) {\n\t\treturn zero\n\t}\n\tconst phrase = n === 1 ? (opts.singular ?? opts.plural) : (opts.plural ?? opts.singular)\n\tif (typeof phrase !== 'string' || phrase === '') {\n\t\treturn String(n)\n\t}\n\treturn phrase.replace(/\\{n\\}/g, String(n))\n}\n\n/**\n * The seven stored connection status values and their English source labels.\n *\n * The label is translated on each call, not here. A module-level `t()` runs\n * before the catalogue is registered and would freeze every label in English.\n */\nconst CONNECTION_STATUS_LABELS = {\n\tconfigured: 'Configured',\n\tlimited: 'Limited',\n\tunconfigured: 'Not configured',\n\tsimulated: 'Simulated',\n\tdisabled: 'Switched off',\n\tunavailable: 'Not available',\n\terror: 'Error',\n}\n\n/**\n * The short labels `formatterOptions.short` draws (board DqInstellingen\n * \"Aan / Uit / Fout\"): a connection that works in some form is on, one that\n * does not run is off, and a failing one is an error.\n */\nconst CONNECTION_STATUS_SHORT_LABELS = {\n\tconfigured: 'On',\n\tlimited: 'On',\n\tsimulated: 'On',\n\tunconfigured: 'Off',\n\tdisabled: 'Off',\n\tunavailable: 'Off',\n\terror: 'Error',\n}\n\n/**\n * Connection status formatter (`connectionStatus` registry key) for the\n * fleet connection registry. Renders one of the seven stored status values\n * as its translated label through the library's own slug (`nextcloud-vue`).\n * With `formatterOptions.short` it renders the board's three short labels\n * instead: On (configured, limited, simulated), Off (not configured,\n * switched off, not available) and Error.\n *\n * An unknown value passes through unchanged, so a status added later still\n * shows as its raw value instead of an empty cell. Null and undefined render\n * as `''`. Never throws.\n *\n * @param {unknown} value The stored status value.\n * @param {object} [row] The row (unused).\n * @param {object} [property] The column's property (unused).\n * @param {{short?: boolean}} [options] The column's `formatterOptions`.\n * @return {string} The translated label, or the value itself when it is not one of the seven.\n */\nexport function formatConnectionStatus(value, row, property, options) {\n\tif (value === null || value === undefined) {\n\t\treturn ''\n\t}\n\tconst labels = options && options.short === true ? CONNECTION_STATUS_SHORT_LABELS : CONNECTION_STATUS_LABELS\n\tconst label = Object.hasOwn(labels, value) ? labels[value] : null\n\treturn label ? t('nextcloud-vue', label) : String(value)\n}\n\n/**\n * Connection settings label formatter (`connectionSettingsLabel` registry\n * key). Renders \"Open settings\" when the row's `settingsUrl` is a non-empty\n * string, and `''` otherwise. Paired with the built-in `link` cell widget, an\n * empty label and href fall through to plain empty text, so a connection with\n * no settings section offers nothing to click.\n *\n * @param {unknown} value The row's `settingsUrl`.\n * @return {string} The translated link text, or `''`.\n */\nexport function formatConnectionSettingsLabel(value) {\n\treturn typeof value === 'string' && value !== ''\n\t\t? t('nextcloud-vue', 'Open settings')\n\t\t: ''\n}\n\n/**\n * Show a value with all but its last characters replaced by `*`, as the facts\n * widget's `masked` format does: an IBAN or a BSN reads `*****4567`.\n *\n * DISPLAY ONLY, NOT ACCESS CONTROL. The full value is still in the row the\n * page received; a reader with the browser's developer tools can read it.\n * A value the reader must not have belongs hidden in OpenRegister (property\n * authorization), not masked here.\n *\n * The column's `formatterOptions.visible` sets how many characters stay\n * (default 4); at most five `*` are drawn, so the length does not leak.\n * Null-safe: `''` for null or empty.\n *\n * @param {unknown} value The value.\n * @param {object} [_row] The full row (unused).\n * @param {object} [_property] The schema property (unused).\n * @param {{visible?: number}} [options] The column's `formatterOptions`.\n * @return {string} The masked value.\n * @spec openspec/changes/masked-formatter-max-aggregate/specs/index-page/spec.md#requirement-a-column-can-mask-its-value-for-display\n */\nexport function formatMasked(value, _row, _property, options) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn ''\n\t}\n\tconst text = String(value)\n\tconst visible = Number.isInteger(options && options.visible) && options.visible >= 0 ? options.visible : 4\n\tif (text.length <= visible) {\n\t\treturn text\n\t}\n\treturn '*'.repeat(Math.min(text.length - visible, 5)) + (visible > 0 ? text.slice(-visible) : '')\n}\n\n/**\n * A stored value through a display map (`valueMap` registry key): the label\n * `options.map` gives the value, else the value as stored. \"Besloten\n * Vennootschap\" reads \"BV\" on DqOrganisaties.\n *\n * @param {unknown} value The stored value.\n * @param {object} [_row] The full row (unused).\n * @param {object} [_property] The schema property (unused).\n * @param {{map?: Object<string, string>}} [options] The column's `formatterOptions`.\n * @return {string} The label, or the value.\n * @spec openspec/changes/value-map-formatter/specs/index-page/spec.md#requirement-a-column-can-show-stored-values-through-a-display-map\n */\nexport function formatValueMap(value, _row, _property, options) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn ''\n\t}\n\tconst map = options && options.map && typeof options.map === 'object' ? options.map : {}\n\tconst label = Object.hasOwn(map, String(value)) ? map[String(value)] : undefined\n\treturn typeof label === 'string' && label !== '' ? label : String(value)\n}\n\n/**\n * Built-in formatter registry merged under any consumer-registered\n * `formatters` in `CnAppRoot`'s `cnFormatters` provide.\n */\n/**\n * An ISO-8601 period of one unit in words (`isoDuration` registry key):\n * `P10Y` reads \"10 years\", `P6W` \"6 weeks\". A retention period or a term is\n * stored as such a period and was shown raw. Anything that is not a one-unit\n * period is returned as written, `''` for null or empty.\n *\n * @param {unknown} value The stored period.\n * @return {string} The period in words.\n */\nexport function formatIsoDuration(value) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn ''\n\t}\n\tconst period = parseDuration(String(value))\n\tif (period === null) {\n\t\treturn String(value)\n\t}\n\tconst words = {\n\t\tyears: () => n('nextcloud-vue', '%n year', '%n years', period.amount),\n\t\tmonths: () => n('nextcloud-vue', '%n month', '%n months', period.amount),\n\t\tweeks: () => n('nextcloud-vue', '%n week', '%n weeks', period.amount),\n\t\tdays: () => n('nextcloud-vue', '%n day', '%n days', period.amount),\n\t\thours: () => n('nextcloud-vue', '%n hour', '%n hours', period.amount),\n\t\tminutes: () => n('nextcloud-vue', '%n minute', '%n minutes', period.amount),\n\t}\n\treturn words[period.unit] ? words[period.unit]() : String(value)\n}\n\n/** The ISO designator of each date unit a term is written in. */\nconst UNIT_DESIGNATOR = { years: 'Y', months: 'M', weeks: 'W', days: 'D' }\n\n/**\n * A one-unit ISO-8601 period, a day count that is whole weeks read as weeks\n * (a term of `P28D` is \"4 weeks\"); null when it is not a one-unit period.\n *\n * @param {unknown} value The stored period.\n * @return {{amount: number, unit: string}|null}\n */\nfunction termPeriod(value) {\n\tif (value === null || value === undefined || value === '') {\n\t\treturn null\n\t}\n\tconst period = parseDuration(String(value))\n\tif (period === null || !UNIT_DESIGNATOR[period.unit]) {\n\t\treturn null\n\t}\n\tif (period.unit === 'days' && period.amount > 0 && period.amount % 7 === 0) {\n\t\treturn { amount: period.amount / 7, unit: 'weeks' }\n\t}\n\treturn period\n}\n\n/**\n * A term in words, with the extension it may get (`format: 'duration'`):\n * `P28D` reads \"4 weeks\", and with an extension of `P14D` \"4 weeks,\n * extendable by 2\" (the unit is said once when both share it). A time of\n * hours or minutes reads in words too (`PT6M` is \"6 minutes\"). A value that\n * is not a one-unit period is returned as written, '' for null or empty.\n *\n * @spec openspec/changes/data-widget-duration-format/specs/data-widget/spec.md#requirement-a-term-reads-in-words-with-its-extension\n * @spec openspec/changes/duration-time-units/specs/data-widget/spec.md#requirement-a-duration-in-hours-or-minutes-reads-in-words\n * @param {unknown} value The stored term.\n * @param {unknown} [extension] The stored extension period, if any.\n * @return {string}\n */\nexport function formatTermDuration(value, extension = null) {\n\tconst term = termPeriod(value)\n\tif (term === null) {\n\t\treturn value === null || value === undefined ? '' : formatIsoDuration(value)\n\t}\n\tconst words = formatIsoDuration(`P${term.amount}${UNIT_DESIGNATOR[term.unit]}`)\n\tconst extra = termPeriod(extension)\n\tif (extra === null || extra.amount === 0) {\n\t\treturn words\n\t}\n\tconst extraWords = extra.unit === term.unit\n\t\t? String(extra.amount)\n\t\t: formatIsoDuration(`P${extra.amount}${UNIT_DESIGNATOR[extra.unit]}`)\n\treturn t('nextcloud-vue', '{term}, extendable by {extension}', { term: words, extension: extraWords })\n}\n\n/**\n * A Nextcloud user id as its display name (`userName` registry key): the id\n * while the name is looked up, and for a user nobody answers for.\n *\n * @spec openspec/changes/user-name-formatter/specs/user-name-formatter/spec.md#requirement-a-user-id-can-read-as-its-display-name\n * @param {unknown} value The user id.\n * @return {string} The display name, the id, or ''.\n */\nexport function formatUserName(value) {\n\tif (value === null || value === undefined || value === '' || typeof value === 'object') {\n\t\treturn ''\n\t}\n\treturn userDisplayName(value) || String(value)\n}\n\n/**\n * A Dutch postcode as people read it: \"2999AA\" (as the registers store it)\n * becomes \"2999 AA\". Anything that is not a Dutch postcode comes back as it is.\n *\n * @param {*} value The postcode.\n * @return {string} The postcode with its space, the value as it is, or ''.\n * @spec openspec/changes/facts-postcode-format/specs/facts-postcode-format/spec.md#requirement-a-facts-part-can-write-a-dutch-postcode-with-its-space\n */\nexport function formatPostcode(value) {\n\tif (value === null || value === undefined || typeof value === 'object') {\n\t\treturn ''\n\t}\n\tconst text = String(value).trim()\n\tconst match = /^([1-9]\\d{3})\\s*([a-zA-Z]{2})$/.exec(text)\n\treturn match ? `${match[1]} ${match[2].toUpperCase()}` : text\n}\n\nexport const BUILT_IN_FORMATTERS = {\n\tdate: formatDate,\n\tdatetime: formatDateTime,\n\t'relative-time': formatRelativeTime,\n\tdaysSince: formatDaysSince,\n\tdaysUntil: formatDaysUntil,\n\trelativeDate: formatRelativeDay,\n\tcurrency: formatCurrency,\n\tconditionalPhrase: formatConditionalPhrase,\n\tcount: formatCount,\n\tconnectionStatus: formatConnectionStatus,\n\tconnectionSettingsLabel: formatConnectionSettingsLabel,\n\tmasked: formatMasked,\n\tisoDuration: formatIsoDuration,\n\ttermDuration: formatTermDuration,\n\tvalueMap: formatValueMap,\n\tuserName: formatUserName,\n\tpostcode: formatPostcode,\n}\n"],"names":["t","n"],"mappings":";;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,MAAM,CAAC,KAAK,EAAE;AACvB,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,EAAE;AAC5D,EAAE,OAAO,IAAI;AACb,EAAE;AACF,CAAC,IAAI,KAAK,YAAY,IAAI,EAAE;AAC5B,EAAE,OAAO,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,GAAG,IAAI,GAAG,KAAK;AACrD,EAAE;AACF,CAAC,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,KAAK,EAAC;AAC1B,CAAC,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC;AAC5C,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,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,23 @@ function formatUserName(value) {
43540
43540
  return userDisplayName(value) || String(value)
43541
43541
  }
43542
43542
 
43543
+ /**
43544
+ * A Dutch postcode as people read it: "2999AA" (as the registers store it)
43545
+ * becomes "2999 AA". Anything that is not a Dutch postcode comes back as it is.
43546
+ *
43547
+ * @param {*} value The postcode.
43548
+ * @return {string} The postcode with its space, the value as it is, or ''.
43549
+ * @spec openspec/changes/facts-postcode-format/specs/facts-postcode-format/spec.md#requirement-a-facts-part-can-write-a-dutch-postcode-with-its-space
43550
+ */
43551
+ function formatPostcode(value) {
43552
+ if (value === null || value === undefined || typeof value === 'object') {
43553
+ return ''
43554
+ }
43555
+ const text = String(value).trim();
43556
+ const match = /^([1-9]\d{3})\s*([a-zA-Z]{2})$/.exec(text);
43557
+ return match ? `${match[1]} ${match[2].toUpperCase()}` : text
43558
+ }
43559
+
43543
43560
  const BUILT_IN_FORMATTERS = {
43544
43561
  date: formatDate,
43545
43562
  datetime: formatDateTime,
@@ -43557,6 +43574,7 @@ const BUILT_IN_FORMATTERS = {
43557
43574
  termDuration: formatTermDuration,
43558
43575
  valueMap: formatValueMap,
43559
43576
  userName: formatUserName,
43577
+ postcode: formatPostcode,
43560
43578
  };
43561
43579
 
43562
43580
  /**
@@ -245087,8 +245105,8 @@ var script$4s = {
245087
245105
  * - `headerPill` — a status pill in the card header (reported through the `header` event): `{ path?, text?, map?, variant?, variantMap?, colorMap? }`, read from the record like a `pill` entry (DqBezwaar "Advies ontvangen"); nothing shows while the value is empty.
245088
245106
  * - `notice` — `{ text, variant? }`, a note band inside the card under the facts (`info` by default; `success`, `warning` or `error`); the text is translated.
245089
245107
  * - `footnote` — a plain muted line under the facts, without a band (DqZaakBesluiten "Na het ondertekenen ..."); the text is translated.
245090
- * `format` is `text` (default), `date` (board short date), `date-long` (always with the year), `longdate` (the month written out, the year only outside this year: "3 oktober"), `longdatetime` (the month written out, the year and the time: "7 oktober 2026, 09:12"), `duration` (an ISO period in words, "4 weken"; `extendBy` names the extension period on the record: "4 weken, te verdagen met 2"), `year` ("2026"), `list` (an array joined by ", ", each item read at `itemPath` and written in `itemFormat`), `group` (a Nextcloud group by its display name), `bytes` (a size, "1.5 MB"), `number` (in the reader's language, `decimals` fraction digits when set), `months` (a number of months in words, whole years as years: 240 is "20 jaar") 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).
245091
- * `format` is `text` (default), `today-time` (a moment today as "10:24", another day as its board date), `date` (board short date), `date-long` (always with the year), `longdate` (the month written out, the year only outside this year: "3 oktober"), `duration` (an ISO period in words, "4 weken"; `extendBy` names the extension period on the record: "4 weken, te verdagen met 2"), `year` ("2026"), `list` (an array joined by ", ", each item read at `itemPath` and written in `itemFormat`), `group` (a Nextcloud group by its display name), `bytes` (a size, "1.5 MB"), `number` (in the reader's language, `decimals` fraction digits when set), `months` (a number of months in words, whole years as years: 240 is "20 jaar") 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).
245108
+ * `format` is `text` (default), `date` (board short date), `date-long` (always with the year), `longdate` (the month written out, the year only outside this year: "3 oktober"), `longdatetime` (the month written out, the year and the time: "7 oktober 2026, 09:12"), `duration` (an ISO period in words, "4 weken"; `extendBy` names the extension period on the record: "4 weken, te verdagen met 2"), `year` ("2026"), `postcode` (a Dutch postcode with its space, "2999 AA"), `list` (an array joined by ", ", each item read at `itemPath` and written in `itemFormat`), `group` (a Nextcloud group by its display name), `bytes` (a size, "1.5 MB"), `number` (in the reader's language, `decimals` fraction digits when set), `months` (a number of months in words, whole years as years: 240 is "20 jaar") 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).
245109
+ * `format` is `text` (default), `today-time` (a moment today as "10:24", another day as its board date), `date` (board short date), `date-long` (always with the year), `longdate` (the month written out, the year only outside this year: "3 oktober"), `duration` (an ISO period in words, "4 weken"; `extendBy` names the extension period on the record: "4 weken, te verdagen met 2"), `year` ("2026"), `postcode` (a Dutch postcode with its space, "2999 AA"), `list` (an array joined by ", ", each item read at `itemPath` and written in `itemFormat`), `group` (a Nextcloud group by its display name), `bytes` (a size, "1.5 MB"), `number` (in the reader's language, `decimals` fraction digits when set), `months` (a number of months in words, whole years as years: 240 is "20 jaar") 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).
245092
245110
  * `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.
245093
245111
  * - `source` — `{ register, schema, id }` or `{ url }`; omitted = the current object. `{ register, schema, filter, sort? }` without `id` reads the first object that matches `filter` in `sort` order (`{ field, dir }`): the latest count of a shift. An entry with `from: "object"` reads the current object even then (a client card that also shows the ticket's channel).
245094
245112
  * - `endpointSource` — `{ url, method?, params?, responsePath? }`, the block a stat or chart takes: the facts read an app endpoint, shared and cached like those.
@@ -246804,6 +246822,10 @@ var script$4s = {
246804
246822
  const end = Date.UTC(today.getFullYear(), today.getMonth(), today.getDate());
246805
246823
  return String(Math.max(0, Math.round((end - start) / 86400000)))
246806
246824
  }
246825
+ // A Dutch postcode with its space: "2999AA" as "2999 AA".
246826
+ if (format === 'postcode') {
246827
+ return formatPostcode(raw)
246828
+ }
246807
246829
  if (format === 'year') {
246808
246830
  const date = parseDateValue(raw);
246809
246831
  return date === null ? '' : String(date.getFullYear())
@@ -247463,7 +247485,7 @@ function render$4q(_ctx, _cache, $props, $setup, $data, $options) {
247463
247485
  }
247464
247486
 
247465
247487
  script$4s.render = render$4q;
247466
- script$4s.__scopeId = "data-v-03c2322b";
247488
+ script$4s.__scopeId = "data-v-4dae3b2e";
247467
247489
  const __sfc_main$4s = script$4s;
247468
247490
 
247469
247491
  /**
@@ -248484,12 +248506,16 @@ var script$4p = {
248484
248506
  /**
248485
248507
  * The widget configuration.
248486
248508
  *
248487
- * - `frames` — `[{ key?, title, widgetIds? | sections?, status? }]`, in order. `widgetIds` names
248509
+ * - `frames` — `[{ key?, title, titleFrom?, widgetIds? | sections?, status? }]`, in order. `widgetIds` names
248488
248510
  * widgets of the surface, stacked; `sections` takes the `sections` widget's entries instead.
248511
+ * `titleFrom: { source: { register, schema, filter, sort? }, field }` titles the frame by that field of the
248512
+ * first matching record, read under the reader's rights; `title` stays while none matches.
248489
248513
  * - `status` — the status line of every frame (a frame's own `status` wins): `{ text?, tone?,
248490
248514
  * followConnection?, onlineText?, offlineText? }`. With `followConnection` the line reads
248491
248515
  * `offlineText` while the device is offline and `onlineText` otherwise. `tone` is `warning`
248492
- * (default while offline), `success` or `info`.
248516
+ * (default while offline), `success` or `info`. With `syncedFrom: { source: { register, schema,
248517
+ * filter }, field }` the newest value of that date field is the last synchronisation, and while
248518
+ * offline the line reads `offlineSyncedText` with `{time}` as its time (`offlineText` without one).
248493
248519
  * - `width` — the frame width in pixels (default 350).
248494
248520
  * - `height` — the frame height in pixels (at least 400); what does not fit scrolls inside it. Without it the frame grows with its content.
248495
248521
  *
@@ -248572,6 +248598,8 @@ var script$4p = {
248572
248598
  return {
248573
248599
  uid: instanceCounter$2,
248574
248600
  online: typeof navigator === 'undefined' || navigator.onLine !== false,
248601
+ readTitles: {},
248602
+ syncedTime: '',
248575
248603
  }
248576
248604
  },
248577
248605
 
@@ -248603,7 +248631,7 @@ var script$4p = {
248603
248631
  : (Array.isArray(frame.widgetIds) ? frame.widgetIds : []).filter((id) => typeof id === 'string' && id !== '').map((widgetId) => ({ widgetId }));
248604
248632
  return {
248605
248633
  key: String(frame.key || `frame-${index}`).replace(/[^\w-]/g, '-'),
248606
- title: this.tr(frame.title || ''),
248634
+ title: this.readTitles[index] || this.tr(frame.title || ''),
248607
248635
  sections,
248608
248636
  status: this.statusOf(frame.status || this.content?.status || null),
248609
248637
  }
@@ -248612,6 +248640,7 @@ var script$4p = {
248612
248640
  },
248613
248641
 
248614
248642
  mounted() {
248643
+ this.readSources();
248615
248644
  if (typeof window !== 'undefined') {
248616
248645
  window.addEventListener('online', this.onConnection);
248617
248646
  window.addEventListener('offline', this.onConnection);
@@ -248651,13 +248680,74 @@ var script$4p = {
248651
248680
  if (status.followConnection === true) {
248652
248681
  text = this.online ? status.onlineText : status.offlineText;
248653
248682
  tone = tone || (this.online ? 'success' : 'warning');
248683
+ if (!this.online && this.syncedTime && typeof status.offlineSyncedText === 'string' && status.offlineSyncedText !== '') {
248684
+ return this.statusLine(this.tr(status.offlineSyncedText).replace('{time}', this.syncedTime), tone)
248685
+ }
248654
248686
  }
248655
248687
  if (typeof text !== 'string' || text === '') {
248656
248688
  return null
248657
248689
  }
248690
+ return this.statusLine(this.tr(text), tone)
248691
+ },
248692
+
248693
+ /**
248694
+ * A status line of a text and a tone.
248695
+ *
248696
+ * @param {string} text The translated text.
248697
+ * @param {string} tone The tone.
248698
+ * @return {{text: string, tone: string, icon: object}}
248699
+ */
248700
+ statusLine(text, tone) {
248658
248701
  const known = ['warning', 'success', 'info'].includes(tone) ? tone : 'info';
248659
248702
  const icon = known === 'warning' ? CloudOffOutline : (known === 'success' ? CloudCheckOutline : InformationOutline);
248660
- return { text: this.tr(text), tone: known, icon: vue$1.markRaw(icon) }
248703
+ return { text, tone: known, icon: vue$1.markRaw(icon) }
248704
+ },
248705
+
248706
+ /**
248707
+ * The first record of a `{ source: { register, schema, filter, sort? } }`, sorted by `sort` (or
248708
+ * newest first by `orderBy`), under the reader's rights; null without one or while a token is unresolved.
248709
+ *
248710
+ * @param {object} spec The source spec.
248711
+ * @param {string} [orderBy] A field to sort on, newest first, when the source names no sort.
248712
+ * @return {Promise<object|null>}
248713
+ */
248714
+ async firstOf(spec, orderBy = '') {
248715
+ const source = spec?.source;
248716
+ if (!source || typeof source !== 'object' || !source.register || !source.schema) {
248717
+ return null
248718
+ }
248719
+ const filter = resolveFilterTokens(source.filter || {}, { objectId: this.objectId || null, object: this.objectData });
248720
+ if (hasUnresolvedTokens(filter)) {
248721
+ return null
248722
+ }
248723
+ const sort = source.sort?.field ? { [`_order[${source.sort.field}]`]: source.sort.dir === 'asc' ? 'asc' : 'desc' } : (orderBy ? { [`_order[${orderBy}]`]: 'desc' } : {});
248724
+ try {
248725
+ const rows = await fetchReferenceObjects({ register: source.register, schema: source.schema, filter: { ...filter, ...sort }, limit: 1 });
248726
+ return Array.isArray(rows) && rows.length > 0 ? rows[0] : null
248727
+ } catch {
248728
+ return null
248729
+ }
248730
+ },
248731
+
248732
+ /** Read the frame titles (`titleFrom`) and the last synchronisation (`status.syncedFrom`). */
248733
+ async readSources() {
248734
+ const list = Array.isArray(this.content?.frames) ? this.content.frames.filter((frame) => frame && typeof frame === 'object') : [];
248735
+ const titles = {};
248736
+ await Promise.all(list.map(async (frame, index) => {
248737
+ if (!frame.titleFrom?.field) {
248738
+ return
248739
+ }
248740
+ const value = readPath$9(await this.firstOf(frame.titleFrom), frame.titleFrom.field);
248741
+ if (typeof value === 'string' && value !== '') {
248742
+ titles[index] = value;
248743
+ }
248744
+ }));
248745
+ this.readTitles = titles;
248746
+ const synced = this.content?.status?.syncedFrom;
248747
+ if (synced?.field) {
248748
+ const at = new Date(readPath$9(await this.firstOf(synced, synced.field), synced.field) ?? '');
248749
+ this.syncedTime = Number.isNaN(at.getTime()) ? '' : `${String(at.getHours()).padStart(2, '0')}:${String(at.getMinutes()).padStart(2, '0')}`;
248750
+ }
248661
248751
  },
248662
248752
 
248663
248753
  /** Follow the browser's connection state. */
@@ -248739,7 +248829,7 @@ function render$4n(_ctx, _cache, $props, $setup, $data, $options) {
248739
248829
  }
248740
248830
 
248741
248831
  script$4p.render = render$4n;
248742
- script$4p.__scopeId = "data-v-0d8080b4";
248832
+ script$4p.__scopeId = "data-v-41a3b42e";
248743
248833
  const __sfc_main$4p = script$4p;
248744
248834
 
248745
248835
  /**
@@ -249816,7 +249906,9 @@ function idOf$1(object) {
249816
249906
  *
249817
249907
  * `startAt: "firstOpen"` opens a run that was started earlier at the page of
249818
249908
  * its first unanswered question (the last page when all are answered), once
249819
- * per record; without it the run opens at the first page.
249909
+ * per record; `startAt: "lastAnswered"` at the page of its last answered
249910
+ * question, where the inspector was; without it the run opens at the first
249911
+ * page.
249820
249912
  *
249821
249913
  * Question kinds: `yes_no`, `yes_no_na`, `choice` (the question's `options`,
249822
249914
  * a list of strings or `{ value, label }`), `number`, `photo` and `text`.
@@ -250034,7 +250126,8 @@ var script$4n = {
250034
250126
  /**
250035
250127
  * The questions of this page that get a photo control: with a
250036
250128
  * `photoRequired` field, those whose rule is not never (and photo
250037
- * questions); without one, the first question of the page.
250129
+ * questions), less a `{ whenAnswer }` question answered otherwise that
250130
+ * holds no photo; without one, the first question of the page.
250038
250131
  *
250039
250132
  * @return {object[]} The questions.
250040
250133
  * @spec openspec/changes/checklist-run-photo-rule/specs/checklist-run-photo-rule/spec.md#requirement-a-question-can-require-a-photo
@@ -250044,7 +250137,7 @@ var script$4n = {
250044
250137
  return []
250045
250138
  }
250046
250139
  if (this.fields.photoRequired) {
250047
- return this.pageQuestions.filter((q) => q.kind === 'photo' || q.photoRule !== 'never')
250140
+ return this.pageQuestions.filter((q) => q.kind === 'photo' || (q.photoRule !== 'never' && !this.photoRuledOut(q)))
250048
250141
  }
250049
250142
  const first = this.currentQuestion;
250050
250143
  const extra = this.pageQuestions.filter((q) => q.kind === 'photo' && q !== first);
@@ -250259,6 +250352,19 @@ var script$4n = {
250259
250352
  return Boolean(rule && typeof rule === 'object' && String(this.draft[question.id]?.value ?? '') === rule.whenAnswer)
250260
250353
  },
250261
250354
 
250355
+ /**
250356
+ * Whether a question's answer rules its photo out: a `{ whenAnswer }`
250357
+ * question answered with another value and holding no photo.
250358
+ *
250359
+ * @param {object} question The question.
250360
+ * @return {boolean} True when no photo control is needed.
250361
+ */
250362
+ photoRuledOut(question) {
250363
+ const rule = question.photoRule;
250364
+ const value = String(this.draft[question.id]?.value ?? '');
250365
+ return Boolean(rule && typeof rule === 'object' && value !== '' && value !== rule.whenAnswer && !this.hasPhoto(question))
250366
+ },
250367
+
250262
250368
  /**
250263
250369
  * Whether a question has a photo, stored or held.
250264
250370
  *
@@ -250411,6 +250517,9 @@ var script$4n = {
250411
250517
  if (this.positionedFor !== key && this.content?.startAt === 'firstOpen') {
250412
250518
  const open = questions.findIndex((question) => !this.isAnswered(question));
250413
250519
  this.page = open === -1 ? lastPage : Math.floor(open / this.pageSize);
250520
+ } else if (this.positionedFor !== key && this.content?.startAt === 'lastAnswered') {
250521
+ const last = questions.findLastIndex((question) => this.isAnswered(question));
250522
+ this.page = last === -1 ? 0 : Math.floor(last / this.pageSize);
250414
250523
  }
250415
250524
  this.positionedFor = key;
250416
250525
  this.page = Math.min(this.page, lastPage);
@@ -250990,7 +251099,7 @@ function render$4l(_ctx, _cache, $props, $setup, $data, $options) {
250990
251099
  }
250991
251100
 
250992
251101
  script$4n.render = render$4l;
250993
- script$4n.__scopeId = "data-v-4713ce24";
251102
+ script$4n.__scopeId = "data-v-05891472";
250994
251103
  const __sfc_main$4n = script$4n;
250995
251104
 
250996
251105
  /**
@@ -393660,7 +393769,7 @@ function render$1P(_ctx, _cache, $props, $setup, $data, $options) {
393660
393769
  }
393661
393770
 
393662
393771
  script$1Q.render = render$1P;
393663
- script$1Q.__scopeId = "data-v-44890cd9";
393772
+ script$1Q.__scopeId = "data-v-651529a9";
393664
393773
  const __sfc_main$1Q = script$1Q;
393665
393774
 
393666
393775
  var CnActionDialog = /*#__PURE__*/Object.freeze({
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/nextcloud-vue.cjs.js.map
3
- size: 52340294 bytes
4
- sha256: 03fe31c2b7a0c803c553251f7e7e0a17aea12a105b4172ad94317616a3653f65
3
+ size: 52355298 bytes
4
+ sha256: f320285c21026a2504015124fecbd90040fd3c31221070641715843470cc957d