@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.
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue.js +1 -1
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js.map +1 -1
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js.map +1 -1
- package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue.js +1 -1
- package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue2.js +22 -3
- package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue.js +1 -1
- package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue2.js +75 -4
- package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue.js +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js +7 -3
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +270 -162
- package/dist/esm/utils/builtInFormatters.js +19 -1
- package/dist/esm/utils/builtInFormatters.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +122 -13
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +270 -162
- package/package.json +1 -1
- package/src/components/CnActionDialog/CnActionDialog.vue +4 -1
- package/src/components/CnChecklistRunWidget/CnChecklistRunWidget.vue +24 -3
- package/src/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue +75 -4
- package/src/components/CnFactsWidget/CnFactsWidget.vue +7 -3
- package/src/css/look-board-detail.css +100 -1
- package/src/css/look-board-index.css +7 -6
- package/src/css/patches.css +4 -1
- package/src/utils/builtInFormatters.js +18 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@conduction/nextcloud-vue",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.172.0",
|
|
4
4
|
"description": "Shared Vue component library for Conduction Nextcloud apps — complements @nextcloud/vue with higher-level components, OpenRegister integration, and NL Design System support",
|
|
5
5
|
"homepage": "https://github.com/ConductionNL/nextcloud-vue#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -836,10 +836,11 @@ export default {
|
|
|
836
836
|
</script>
|
|
837
837
|
|
|
838
838
|
<style scoped>
|
|
839
|
+
/* The parts stand 18px apart, as the board draws the dialog (DqArchiveren). */
|
|
839
840
|
.cn-action-dialog {
|
|
840
841
|
display: flex;
|
|
841
842
|
flex-direction: column;
|
|
842
|
-
gap:
|
|
843
|
+
gap: 18px;
|
|
843
844
|
}
|
|
844
845
|
|
|
845
846
|
.cn-action-dialog__summary {
|
|
@@ -910,6 +911,8 @@ export default {
|
|
|
910
911
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
911
912
|
gap: 12px 24px;
|
|
912
913
|
margin: 0;
|
|
914
|
+
/* The server pads every dl 12px. */
|
|
915
|
+
padding: 0;
|
|
913
916
|
}
|
|
914
917
|
|
|
915
918
|
.cn-action-dialog__fact {
|
|
@@ -306,7 +306,9 @@ function idOf(object) {
|
|
|
306
306
|
*
|
|
307
307
|
* `startAt: "firstOpen"` opens a run that was started earlier at the page of
|
|
308
308
|
* its first unanswered question (the last page when all are answered), once
|
|
309
|
-
* per record;
|
|
309
|
+
* per record; `startAt: "lastAnswered"` at the page of its last answered
|
|
310
|
+
* question, where the inspector was; without it the run opens at the first
|
|
311
|
+
* page.
|
|
310
312
|
*
|
|
311
313
|
* Question kinds: `yes_no`, `yes_no_na`, `choice` (the question's `options`,
|
|
312
314
|
* a list of strings or `{ value, label }`), `number`, `photo` and `text`.
|
|
@@ -524,7 +526,8 @@ export default {
|
|
|
524
526
|
/**
|
|
525
527
|
* The questions of this page that get a photo control: with a
|
|
526
528
|
* `photoRequired` field, those whose rule is not never (and photo
|
|
527
|
-
* questions)
|
|
529
|
+
* questions), less a `{ whenAnswer }` question answered otherwise that
|
|
530
|
+
* holds no photo; without one, the first question of the page.
|
|
528
531
|
*
|
|
529
532
|
* @return {object[]} The questions.
|
|
530
533
|
* @spec openspec/changes/checklist-run-photo-rule/specs/checklist-run-photo-rule/spec.md#requirement-a-question-can-require-a-photo
|
|
@@ -534,7 +537,7 @@ export default {
|
|
|
534
537
|
return []
|
|
535
538
|
}
|
|
536
539
|
if (this.fields.photoRequired) {
|
|
537
|
-
return this.pageQuestions.filter((q) => q.kind === 'photo' || q.photoRule !== 'never')
|
|
540
|
+
return this.pageQuestions.filter((q) => q.kind === 'photo' || (q.photoRule !== 'never' && !this.photoRuledOut(q)))
|
|
538
541
|
}
|
|
539
542
|
const first = this.currentQuestion
|
|
540
543
|
const extra = this.pageQuestions.filter((q) => q.kind === 'photo' && q !== first)
|
|
@@ -749,6 +752,19 @@ export default {
|
|
|
749
752
|
return Boolean(rule && typeof rule === 'object' && String(this.draft[question.id]?.value ?? '') === rule.whenAnswer)
|
|
750
753
|
},
|
|
751
754
|
|
|
755
|
+
/**
|
|
756
|
+
* Whether a question's answer rules its photo out: a `{ whenAnswer }`
|
|
757
|
+
* question answered with another value and holding no photo.
|
|
758
|
+
*
|
|
759
|
+
* @param {object} question The question.
|
|
760
|
+
* @return {boolean} True when no photo control is needed.
|
|
761
|
+
*/
|
|
762
|
+
photoRuledOut(question) {
|
|
763
|
+
const rule = question.photoRule
|
|
764
|
+
const value = String(this.draft[question.id]?.value ?? '')
|
|
765
|
+
return Boolean(rule && typeof rule === 'object' && value !== '' && value !== rule.whenAnswer && !this.hasPhoto(question))
|
|
766
|
+
},
|
|
767
|
+
|
|
752
768
|
/**
|
|
753
769
|
* Whether a question has a photo, stored or held.
|
|
754
770
|
*
|
|
@@ -901,6 +917,9 @@ export default {
|
|
|
901
917
|
if (this.positionedFor !== key && this.content?.startAt === 'firstOpen') {
|
|
902
918
|
const open = questions.findIndex((question) => !this.isAnswered(question))
|
|
903
919
|
this.page = open === -1 ? lastPage : Math.floor(open / this.pageSize)
|
|
920
|
+
} else if (this.positionedFor !== key && this.content?.startAt === 'lastAnswered') {
|
|
921
|
+
const last = questions.findLastIndex((question) => this.isAnswered(question))
|
|
922
|
+
this.page = last === -1 ? 0 : Math.floor(last / this.pageSize)
|
|
904
923
|
}
|
|
905
924
|
this.positionedFor = key
|
|
906
925
|
this.page = Math.min(this.page, lastPage)
|
|
@@ -1314,6 +1333,8 @@ export default {
|
|
|
1314
1333
|
display: flex;
|
|
1315
1334
|
flex-direction: column;
|
|
1316
1335
|
gap: 4px;
|
|
1336
|
+
font-size: 14px;
|
|
1337
|
+
font-weight: 600 !important;
|
|
1317
1338
|
line-height: 1.2;
|
|
1318
1339
|
}
|
|
1319
1340
|
|
|
@@ -50,6 +50,9 @@ import CloudCheckOutline from 'vue-material-design-icons/CloudCheckOutline.vue'
|
|
|
50
50
|
import CloudOffOutline from 'vue-material-design-icons/CloudOffOutline.vue'
|
|
51
51
|
import InformationOutline from 'vue-material-design-icons/InformationOutline.vue'
|
|
52
52
|
import CnSectionsWidget from '../CnSectionsWidget/CnSectionsWidget.vue'
|
|
53
|
+
import { fetchReferenceObjects } from '../../utils/boardReferenceColumns.js'
|
|
54
|
+
import { readPath } from '../../utils/readPath.js'
|
|
55
|
+
import { hasUnresolvedTokens, resolveFilterTokens } from '../../utils/resolveFilterTokens.js'
|
|
53
56
|
|
|
54
57
|
/** Counter for unique heading ids across instances. */
|
|
55
58
|
let instanceCounter = 0
|
|
@@ -96,12 +99,16 @@ export default {
|
|
|
96
99
|
/**
|
|
97
100
|
* The widget configuration.
|
|
98
101
|
*
|
|
99
|
-
* - `frames` — `[{ key?, title, widgetIds? | sections?, status? }]`, in order. `widgetIds` names
|
|
102
|
+
* - `frames` — `[{ key?, title, titleFrom?, widgetIds? | sections?, status? }]`, in order. `widgetIds` names
|
|
100
103
|
* widgets of the surface, stacked; `sections` takes the `sections` widget's entries instead.
|
|
104
|
+
* `titleFrom: { source: { register, schema, filter, sort? }, field }` titles the frame by that field of the
|
|
105
|
+
* first matching record, read under the reader's rights; `title` stays while none matches.
|
|
101
106
|
* - `status` — the status line of every frame (a frame's own `status` wins): `{ text?, tone?,
|
|
102
107
|
* followConnection?, onlineText?, offlineText? }`. With `followConnection` the line reads
|
|
103
108
|
* `offlineText` while the device is offline and `onlineText` otherwise. `tone` is `warning`
|
|
104
|
-
* (default while offline), `success` or `info`.
|
|
109
|
+
* (default while offline), `success` or `info`. With `syncedFrom: { source: { register, schema,
|
|
110
|
+
* filter }, field }` the newest value of that date field is the last synchronisation, and while
|
|
111
|
+
* offline the line reads `offlineSyncedText` with `{time}` as its time (`offlineText` without one).
|
|
105
112
|
* - `width` — the frame width in pixels (default 350).
|
|
106
113
|
* - `height` — the frame height in pixels (at least 400); what does not fit scrolls inside it. Without it the frame grows with its content.
|
|
107
114
|
*
|
|
@@ -184,6 +191,8 @@ export default {
|
|
|
184
191
|
return {
|
|
185
192
|
uid: instanceCounter,
|
|
186
193
|
online: typeof navigator === 'undefined' || navigator.onLine !== false,
|
|
194
|
+
readTitles: {},
|
|
195
|
+
syncedTime: '',
|
|
187
196
|
}
|
|
188
197
|
},
|
|
189
198
|
|
|
@@ -215,7 +224,7 @@ export default {
|
|
|
215
224
|
: (Array.isArray(frame.widgetIds) ? frame.widgetIds : []).filter((id) => typeof id === 'string' && id !== '').map((widgetId) => ({ widgetId }))
|
|
216
225
|
return {
|
|
217
226
|
key: String(frame.key || `frame-${index}`).replace(/[^\w-]/g, '-'),
|
|
218
|
-
title: this.tr(frame.title || ''),
|
|
227
|
+
title: this.readTitles[index] || this.tr(frame.title || ''),
|
|
219
228
|
sections,
|
|
220
229
|
status: this.statusOf(frame.status || this.content?.status || null),
|
|
221
230
|
}
|
|
@@ -224,6 +233,7 @@ export default {
|
|
|
224
233
|
},
|
|
225
234
|
|
|
226
235
|
mounted() {
|
|
236
|
+
this.readSources()
|
|
227
237
|
if (typeof window !== 'undefined') {
|
|
228
238
|
window.addEventListener('online', this.onConnection)
|
|
229
239
|
window.addEventListener('offline', this.onConnection)
|
|
@@ -263,13 +273,74 @@ export default {
|
|
|
263
273
|
if (status.followConnection === true) {
|
|
264
274
|
text = this.online ? status.onlineText : status.offlineText
|
|
265
275
|
tone = tone || (this.online ? 'success' : 'warning')
|
|
276
|
+
if (!this.online && this.syncedTime && typeof status.offlineSyncedText === 'string' && status.offlineSyncedText !== '') {
|
|
277
|
+
return this.statusLine(this.tr(status.offlineSyncedText).replace('{time}', this.syncedTime), tone)
|
|
278
|
+
}
|
|
266
279
|
}
|
|
267
280
|
if (typeof text !== 'string' || text === '') {
|
|
268
281
|
return null
|
|
269
282
|
}
|
|
283
|
+
return this.statusLine(this.tr(text), tone)
|
|
284
|
+
},
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* A status line of a text and a tone.
|
|
288
|
+
*
|
|
289
|
+
* @param {string} text The translated text.
|
|
290
|
+
* @param {string} tone The tone.
|
|
291
|
+
* @return {{text: string, tone: string, icon: object}}
|
|
292
|
+
*/
|
|
293
|
+
statusLine(text, tone) {
|
|
270
294
|
const known = ['warning', 'success', 'info'].includes(tone) ? tone : 'info'
|
|
271
295
|
const icon = known === 'warning' ? CloudOffOutline : (known === 'success' ? CloudCheckOutline : InformationOutline)
|
|
272
|
-
return { text
|
|
296
|
+
return { text, tone: known, icon: markRaw(icon) }
|
|
297
|
+
},
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* The first record of a `{ source: { register, schema, filter, sort? } }`, sorted by `sort` (or
|
|
301
|
+
* newest first by `orderBy`), under the reader's rights; null without one or while a token is unresolved.
|
|
302
|
+
*
|
|
303
|
+
* @param {object} spec The source spec.
|
|
304
|
+
* @param {string} [orderBy] A field to sort on, newest first, when the source names no sort.
|
|
305
|
+
* @return {Promise<object|null>}
|
|
306
|
+
*/
|
|
307
|
+
async firstOf(spec, orderBy = '') {
|
|
308
|
+
const source = spec?.source
|
|
309
|
+
if (!source || typeof source !== 'object' || !source.register || !source.schema) {
|
|
310
|
+
return null
|
|
311
|
+
}
|
|
312
|
+
const filter = resolveFilterTokens(source.filter || {}, { objectId: this.objectId || null, object: this.objectData })
|
|
313
|
+
if (hasUnresolvedTokens(filter)) {
|
|
314
|
+
return null
|
|
315
|
+
}
|
|
316
|
+
const sort = source.sort?.field ? { [`_order[${source.sort.field}]`]: source.sort.dir === 'asc' ? 'asc' : 'desc' } : (orderBy ? { [`_order[${orderBy}]`]: 'desc' } : {})
|
|
317
|
+
try {
|
|
318
|
+
const rows = await fetchReferenceObjects({ register: source.register, schema: source.schema, filter: { ...filter, ...sort }, limit: 1 })
|
|
319
|
+
return Array.isArray(rows) && rows.length > 0 ? rows[0] : null
|
|
320
|
+
} catch {
|
|
321
|
+
return null
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
|
|
325
|
+
/** Read the frame titles (`titleFrom`) and the last synchronisation (`status.syncedFrom`). */
|
|
326
|
+
async readSources() {
|
|
327
|
+
const list = Array.isArray(this.content?.frames) ? this.content.frames.filter((frame) => frame && typeof frame === 'object') : []
|
|
328
|
+
const titles = {}
|
|
329
|
+
await Promise.all(list.map(async (frame, index) => {
|
|
330
|
+
if (!frame.titleFrom?.field) {
|
|
331
|
+
return
|
|
332
|
+
}
|
|
333
|
+
const value = readPath(await this.firstOf(frame.titleFrom), frame.titleFrom.field)
|
|
334
|
+
if (typeof value === 'string' && value !== '') {
|
|
335
|
+
titles[index] = value
|
|
336
|
+
}
|
|
337
|
+
}))
|
|
338
|
+
this.readTitles = titles
|
|
339
|
+
const synced = this.content?.status?.syncedFrom
|
|
340
|
+
if (synced?.field) {
|
|
341
|
+
const at = new Date(readPath(await this.firstOf(synced, synced.field), synced.field) ?? '')
|
|
342
|
+
this.syncedTime = Number.isNaN(at.getTime()) ? '' : `${String(at.getHours()).padStart(2, '0')}:${String(at.getMinutes()).padStart(2, '0')}`
|
|
343
|
+
}
|
|
273
344
|
},
|
|
274
345
|
|
|
275
346
|
/** Follow the browser's connection state. */
|
|
@@ -295,7 +295,7 @@ import { useRefLabels } from '../../composables/useRefLabels.js'
|
|
|
295
295
|
import { dispatchAction } from '../../utils/actionsDispatcher.js'
|
|
296
296
|
import { isBadgeVariant } from '../../utils/badgeVariants.js'
|
|
297
297
|
import { formatBoardDate, formatTimeOfDay } from '../../utils/boardDate.js'
|
|
298
|
-
import { formatTermDuration } from '../../utils/builtInFormatters.js'
|
|
298
|
+
import { formatPostcode, formatTermDuration } from '../../utils/builtInFormatters.js'
|
|
299
299
|
import { conditionalLine } from '../../utils/conditionalLine.js'
|
|
300
300
|
import { parseDateValue } from '../../utils/dateVariant.js'
|
|
301
301
|
import { fetchListTotal } from '../../utils/fetchFilterCounts.js'
|
|
@@ -525,8 +525,8 @@ export default {
|
|
|
525
525
|
* - `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.
|
|
526
526
|
* - `notice` — `{ text, variant? }`, a note band inside the card under the facts (`info` by default; `success`, `warning` or `error`); the text is translated.
|
|
527
527
|
* - `footnote` — a plain muted line under the facts, without a band (DqZaakBesluiten "Na het ondertekenen ..."); the text is translated.
|
|
528
|
-
* `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).
|
|
529
|
-
* `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).
|
|
528
|
+
* `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).
|
|
529
|
+
* `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).
|
|
530
530
|
* `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.
|
|
531
531
|
* - `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).
|
|
532
532
|
* - `endpointSource` — `{ url, method?, params?, responsePath? }`, the block a stat or chart takes: the facts read an app endpoint, shared and cached like those.
|
|
@@ -2242,6 +2242,10 @@ export default {
|
|
|
2242
2242
|
const end = Date.UTC(today.getFullYear(), today.getMonth(), today.getDate())
|
|
2243
2243
|
return String(Math.max(0, Math.round((end - start) / 86400000)))
|
|
2244
2244
|
}
|
|
2245
|
+
// A Dutch postcode with its space: "2999AA" as "2999 AA".
|
|
2246
|
+
if (format === 'postcode') {
|
|
2247
|
+
return formatPostcode(raw)
|
|
2248
|
+
}
|
|
2245
2249
|
if (format === 'year') {
|
|
2246
2250
|
const date = parseDateValue(raw)
|
|
2247
2251
|
return date === null ? '' : String(date.getFullYear())
|
|
@@ -808,13 +808,23 @@
|
|
|
808
808
|
font-size: 13px;
|
|
809
809
|
}
|
|
810
810
|
|
|
811
|
-
/* The attention flag under the status sits under a hairline (DqZaak)
|
|
811
|
+
/* The attention flag under the status sits under a hairline (DqZaak), 10px
|
|
812
|
+
under the status: the sections column's gap is 8px. */
|
|
812
813
|
.cn-look-board .cn-detail-page__sections-card .cn-attention-flag.cn-attention-flag:not(.cn-look-nextcloud *) {
|
|
813
814
|
gap: 6px;
|
|
815
|
+
margin-block-start: 2px;
|
|
814
816
|
padding: 10px 0 0;
|
|
815
817
|
border-top: 1px solid var(--cn-board-hairline);
|
|
816
818
|
}
|
|
817
819
|
|
|
820
|
+
/* The flag's button sits the column gap (6px) under its hint, as the case
|
|
821
|
+
boards draw it; the hint's own 8px margin stood the button 14px under it
|
|
822
|
+
(Status card 317 vs 311 on every case board).
|
|
823
|
+
@spec openspec/changes/board-attention-flag-button-height/specs/board-attention-flag-button-height/spec.md#requirement-the-attention-flags-button-sits-under-its-hint */
|
|
824
|
+
.cn-look-board .cn-detail-page__sections-card .cn-attention-flag:not(.cn-look-nextcloud *) .cn-attention-flag__hint {
|
|
825
|
+
margin-block-end: 0;
|
|
826
|
+
}
|
|
827
|
+
|
|
818
828
|
/* The side cards' texts read at the font's normal leading, as the boards draw
|
|
819
829
|
them; at Nextcloud's 1.5 each card stood taller and pushed the cards under it.
|
|
820
830
|
@spec openspec/changes/side-card-text-normal-leading/specs/side-card-text-normal-leading/spec.md#requirement-a-side-cards-texts-read-at-normal-leading */
|
|
@@ -995,6 +1005,22 @@
|
|
|
995
1005
|
padding: var(--cn-board-card-padding);
|
|
996
1006
|
}
|
|
997
1007
|
|
|
1008
|
+
/* A data grid placed bare in a section or a tab panel (PqJourney
|
|
1009
|
+
"Journeygegevens", PqContract "Facturering", PqMailinglijst "Lijstgegevens")
|
|
1010
|
+
is inset once, by the card around it: its chromeless wrapper has no header,
|
|
1011
|
+
so the rule above gave it a second 20px 22px.
|
|
1012
|
+
@spec openspec/changes/board-nested-data-card-single-inset/specs/board-card/spec.md#requirement-a-bare-data-grid-is-inset-once */
|
|
1013
|
+
.cn-look-board .cn-detail-page .cn-detail-widget-host--bare > .cn-widget-wrapper.cn-widget-wrapper--chromeless > .cn-widget-wrapper__content:has(> .cn-object-data-widget__grid-wrap) {
|
|
1014
|
+
padding: 0;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
/* A sections card that opens on such a grid starts it 14px under the card
|
|
1018
|
+
title, as a data card does.
|
|
1019
|
+
@spec openspec/changes/board-nested-data-card-single-inset/specs/board-card/spec.md#requirement-a-sections-card-that-opens-on-a-data-grid-starts-it-14px-under-the-title */
|
|
1020
|
+
.cn-look-board .cn-detail-page .cn-widget-wrapper__content:has(> .cn-sections-widget > .cn-sections-widget__column:first-child > .cn-sections-widget__section:first-child:not(:has(> .cn-sections-widget__heading)) > .cn-sections-widget__body > .cn-detail-widget-host--bare > .cn-widget-wrapper > .cn-widget-wrapper__content > .cn-object-data-widget__grid-wrap):not(.cn-detail-page__side *) {
|
|
1021
|
+
padding-top: 14px;
|
|
1022
|
+
}
|
|
1023
|
+
|
|
998
1024
|
/* The data card: 200px columns, a 12px 24px gap, label over value, hairline.
|
|
999
1025
|
Each selector holds one class more than the component's scoped rule
|
|
1000
1026
|
(`.cn-object-data-widget__cell[data-v-...]`), which loads after this sheet:
|
|
@@ -1249,6 +1275,60 @@
|
|
|
1249
1275
|
gap: 12px;
|
|
1250
1276
|
}
|
|
1251
1277
|
|
|
1278
|
+
/* A side lead card that also lists rows (DqContact "Identiteit") keeps the
|
|
1279
|
+
rows rhythm: 10px under the title and between its parts. The 12px above is
|
|
1280
|
+
for a lead followed by a link (DqZaak "Aanvrager"). An inline row (the BSN
|
|
1281
|
+
with its Tonen button) keeps 10px to the next row, its button without
|
|
1282
|
+
Nextcloud's 3px margin above and below.
|
|
1283
|
+
@spec openspec/changes/board-contact-identity-and-feed-rhythm/specs/board-contact-identity-and-feed-rhythm/spec.md#requirement-a-side-lead-card-with-rows-keeps-the-rows-rhythm */
|
|
1284
|
+
.cn-look-board .cn-detail-page__side .cn-widget-wrapper__content:has(> .cn-facts-widget > .cn-facts-widget__lead:first-child):has(> .cn-facts-widget > .cn-facts-widget__rows):not(.cn-look-nextcloud *) {
|
|
1285
|
+
padding-top: 10px;
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
.cn-look-board .cn-detail-page__side .cn-facts-widget:has(> .cn-facts-widget__lead:first-child):has(> .cn-facts-widget__rows):not(.cn-look-nextcloud *) {
|
|
1289
|
+
gap: 10px;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
.cn-look-board .cn-detail-page__side .cn-facts-widget__row--inline:not(.cn-look-nextcloud *) {
|
|
1293
|
+
margin-bottom: 2px;
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
.cn-look-board .cn-detail-page__side .cn-facts-widget__inline-button:not(.cn-look-nextcloud *) {
|
|
1297
|
+
margin-block: 0;
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
/* A side card that opens on a text followed by its link (DqContact
|
|
1301
|
+
"Woonadres", "Historie") keeps 8px between them, the link without the
|
|
1302
|
+
first line's leading above.
|
|
1303
|
+
@spec openspec/changes/board-contact-identity-and-feed-rhythm/specs/board-contact-identity-and-feed-rhythm/spec.md#requirement-a-side-text-keeps-8px-to-its-link */
|
|
1304
|
+
.cn-look-board .cn-detail-page__side .cn-facts-widget:has(> .cn-facts-widget__text:first-child + .cn-facts-widget__link):not(.cn-look-nextcloud *) {
|
|
1305
|
+
gap: 8px;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
.cn-look-board .cn-detail-page__side .cn-facts-widget__text:first-child + .cn-facts-widget__link:not(.cn-look-nextcloud *) {
|
|
1309
|
+
margin-top: 0;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
/* A side facts card's action ("Contact vastleggen") is 34px tall with no
|
|
1313
|
+
margin above or below, as DqContact "Bereikbaar via" draws it.
|
|
1314
|
+
@spec openspec/changes/board-contact-identity-and-feed-rhythm/specs/board-contact-identity-and-feed-rhythm/spec.md#requirement-a-side-facts-action-is-34px-with-no-vertical-margin */
|
|
1315
|
+
.cn-look-board .cn-detail-page__side .cn-facts-widget__action:not(.cn-look-nextcloud *) {
|
|
1316
|
+
margin-block: 0;
|
|
1317
|
+
min-height: 34px;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
/* A feed row's meta line and text sit on the normal line, 3px apart, and the
|
|
1321
|
+
rows are 4px apart (DqContact "Laatste contactmomenten": 65px per row).
|
|
1322
|
+
@spec openspec/changes/board-contact-identity-and-feed-rhythm/specs/board-contact-identity-and-feed-rhythm/spec.md#requirement-a-feed-sets-its-lines-on-the-normal-line */
|
|
1323
|
+
.cn-look-board .cn-record-list--feed .cn-record-list__main:not(.cn-look-nextcloud *) {
|
|
1324
|
+
gap: 3px;
|
|
1325
|
+
line-height: normal;
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
.cn-look-board .cn-record-list--feed .cn-record-list__item + .cn-record-list__item:not(.cn-look-nextcloud *) {
|
|
1329
|
+
margin-top: 4px;
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1252
1332
|
/* A side status card opens on its explanation, set on the normal line, so no
|
|
1253
1333
|
leading comes off the 10px under the title (DqZaak "Status").
|
|
1254
1334
|
@spec openspec/changes/board-side-lead-and-status-gaps/specs/board-side-lead-and-status-gaps/spec.md#requirement-a-side-status-card-starts-10px-under-its-title */
|
|
@@ -1939,6 +2019,25 @@
|
|
|
1939
2019
|
border-end-end-radius: var(--cn-board-card-radius);
|
|
1940
2020
|
}
|
|
1941
2021
|
|
|
2022
|
+
/* The lines under a bleed table stand as the boards draw them in the card's
|
|
2023
|
+
12px column (DqZaakGerelateerd Deelzaken "(0/2 voltooid)" and its footnote,
|
|
2024
|
+
Objecten "Objecttypen beheren"): 12px apart at the font's normal leading. The
|
|
2025
|
+
summary sat flush under the table at a 1.5 leading.
|
|
2026
|
+
@spec openspec/changes/object-list-table-bleed/specs/object-list-table-bleed/spec.md#requirement-the-lines-under-a-bleed-table-stand-as-drawn */
|
|
2027
|
+
.cn-look-board .cn-detail-page .cn-widget-wrapper__content > .cn-object-list-widget--bleed > .cn-object-list-widget__summary {
|
|
2028
|
+
margin-block-start: 12px;
|
|
2029
|
+
line-height: normal;
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
.cn-look-board .cn-detail-page .cn-widget-wrapper__content > .cn-object-list-widget--bleed > .cn-object-list-widget__summary + .cn-object-list-widget__footnote {
|
|
2033
|
+
margin-block-start: 12px;
|
|
2034
|
+
line-height: normal;
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
.cn-look-board .cn-detail-page .cn-widget-wrapper__content > .cn-object-list-widget--bleed > .cn-object-list-widget__links {
|
|
2038
|
+
line-height: normal;
|
|
2039
|
+
}
|
|
2040
|
+
|
|
1942
2041
|
/* A row menu in the last column keeps its 34px button and 16px start
|
|
1943
2042
|
padding beside the card's end padding, so it is not cut off. */
|
|
1944
2043
|
.cn-look-board .cn-detail-page .cn-widget-wrapper__content > .cn-object-list-widget--bleed .cn-table-container .cn-data-table .cn-table-col--actions:last-child {
|
|
@@ -1182,12 +1182,13 @@
|
|
|
1182
1182
|
width: 100%;
|
|
1183
1183
|
}
|
|
1184
1184
|
|
|
1185
|
-
/*
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
1.35.
|
|
1189
|
-
@spec openspec/changes/board-wrapped-secondary-line-height/specs/board-wrapped-secondary-line-height/spec.md
|
|
1190
|
-
|
|
1185
|
+
/* The title column's secondary line runs at a normal line height over its
|
|
1186
|
+
lines, 2px under the title, as the boards draw it (DqZoekresultaten,
|
|
1187
|
+
DqFilterBeheren beside the open sidebar); on one line that is the 18.9px
|
|
1188
|
+
of the table's 1.35.
|
|
1189
|
+
@spec openspec/changes/board-wrapped-secondary-line-height/specs/board-wrapped-secondary-line-height/spec.md
|
|
1190
|
+
@spec openspec/changes/board-title-secondary-normal-leading/specs/board-title-secondary-normal-leading/spec.md */
|
|
1191
|
+
.cn-look-board .cn-table-container--board .cn-data-table td.cn-table-col--title .cn-table-cell__secondary {
|
|
1191
1192
|
margin-top: 2px;
|
|
1192
1193
|
line-height: normal;
|
|
1193
1194
|
}
|
package/src/css/patches.css
CHANGED
|
@@ -39,7 +39,10 @@
|
|
|
39
39
|
puts the white icon at 4.67:1 and the square's edge at 4.32:1 on the
|
|
40
40
|
page ground; the brand orange #f36c21 gives 3.01:1 and 2.78:1.
|
|
41
41
|
@spec openspec/changes/board-buildiq-orange/specs/board-buildiq-orange/spec.md#requirement-the-board-buildiq-square-is-the-boards-orange */
|
|
42
|
-
|
|
42
|
+
/* The doubled class outranks the same rule in an older copy of this library
|
|
43
|
+
that another app's bundle injects later on the page (decidiq's integration
|
|
44
|
+
on the case Besluiten tab drew the square in the old #e2611a). */
|
|
45
|
+
.cn-look-board .cn-buildiq-edit .cn-buildiq-edit__actions .button-vue.button-vue {
|
|
43
46
|
--cn-buildiq-color: #c64e0b;
|
|
44
47
|
}
|
|
45
48
|
|
|
@@ -592,6 +592,23 @@ export 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
|
+
export 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
|
export const BUILT_IN_FORMATTERS = {
|
|
596
613
|
date: formatDate,
|
|
597
614
|
datetime: formatDateTime,
|
|
@@ -609,4 +626,5 @@ export const BUILT_IN_FORMATTERS = {
|
|
|
609
626
|
termDuration: formatTermDuration,
|
|
610
627
|
valueMap: formatValueMap,
|
|
611
628
|
userName: formatUserName,
|
|
629
|
+
postcode: formatPostcode,
|
|
612
630
|
}
|