@conduction/nextcloud-vue 2.167.0 → 2.168.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/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +26 -2
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordNoteRows.vue.js +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordNoteRows.vue2.js +22 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordNoteRows.vue2.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordNoteRows.vue3.js +16 -8
- package/dist/esm/components/CnRecordListWidget/CnRecordNoteRows.vue3.js.map +1 -1
- package/dist/esm/composables/useListView.js +17 -1
- package/dist/esm/composables/useListView.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +213 -169
- package/dist/nextcloud-vue.cjs.js +210 -141
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +213 -169
- package/package.json +1 -1
- package/src/components/CnRecordListWidget/CnRecordListWidget.vue +27 -3
- package/src/components/CnRecordListWidget/CnRecordNoteRows.vue +36 -3
- package/src/composables/useListView.js +17 -1
- package/src/css/look-board-detail.css +6 -1
- package/src/css/look-board.css +34 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@conduction/nextcloud-vue",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.168.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": {
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
<ul
|
|
219
219
|
v-if="group.items.length > 0"
|
|
220
220
|
class="cn-record-list__list"
|
|
221
|
-
:class="{ 'cn-record-list__list--avatar-small': avatarSmall, 'cn-record-list__list--avatar-person': avatarPerson, 'cn-record-list__list--avatar-primary': avatarPrimary }"
|
|
221
|
+
:class="{ 'cn-record-list__list--avatar-small': avatarSmall, 'cn-record-list__list--avatar-person': avatarPerson, 'cn-record-list__list--avatar-primary': avatarPrimary, 'cn-record-list__list--headline': headLine }"
|
|
222
222
|
:aria-labelledby="group.label ? group.headingId : null"
|
|
223
223
|
:data-testid="isGrouped ? 'cn-record-list-group' : null">
|
|
224
224
|
<li
|
|
@@ -1687,10 +1687,10 @@ export default {
|
|
|
1687
1687
|
return {
|
|
1688
1688
|
label: this.translate(all.label),
|
|
1689
1689
|
title: all.title ? this.translate(all.title) : '',
|
|
1690
|
-
text:
|
|
1690
|
+
text: this.recordAllText(all.text),
|
|
1691
1691
|
icon: all.icon || '',
|
|
1692
1692
|
cancel,
|
|
1693
|
-
placement: all.placement && typeof all.placement.widget === 'string' ? { widget: all.placement.widget } : null,
|
|
1693
|
+
placement: all.placement && typeof all.placement.widget === 'string' ? { widget: all.placement.widget, sentence: all.placement.sentence === true } : null,
|
|
1694
1694
|
}
|
|
1695
1695
|
},
|
|
1696
1696
|
|
|
@@ -2416,6 +2416,30 @@ export default {
|
|
|
2416
2416
|
}
|
|
2417
2417
|
},
|
|
2418
2418
|
|
|
2419
|
+
/**
|
|
2420
|
+
* The record-all sentence, translated: a string, or its count forms
|
|
2421
|
+
* (`{ zero?, one?, other }`, `{count}` the notes filled in) each translated.
|
|
2422
|
+
*
|
|
2423
|
+
* @param {unknown} text The declared sentence.
|
|
2424
|
+
* @return {string|object} The sentence, or its translated forms.
|
|
2425
|
+
* @spec openspec/changes/record-all-counted-sentence/specs/record-list-notes/spec.md
|
|
2426
|
+
*/
|
|
2427
|
+
recordAllText(text) {
|
|
2428
|
+
if (typeof text === 'string') {
|
|
2429
|
+
return text ? this.translate(text) : ''
|
|
2430
|
+
}
|
|
2431
|
+
if (!text || typeof text !== 'object') {
|
|
2432
|
+
return ''
|
|
2433
|
+
}
|
|
2434
|
+
const forms = {}
|
|
2435
|
+
for (const key of ['zero', 'one', 'other']) {
|
|
2436
|
+
if (typeof text[key] === 'string' && text[key] !== '') {
|
|
2437
|
+
forms[key] = this.translate(text[key])
|
|
2438
|
+
}
|
|
2439
|
+
}
|
|
2440
|
+
return forms
|
|
2441
|
+
},
|
|
2442
|
+
|
|
2419
2443
|
/**
|
|
2420
2444
|
* A count read through the aggregate's `text` forms (`{ zero?, one?,
|
|
2421
2445
|
* other }`, `{count}` filled in, translated), else the figure itself.
|
|
@@ -82,6 +82,12 @@
|
|
|
82
82
|
<!-- `recordAll.placement.widget`: the pair goes to the foot of that
|
|
83
83
|
dashboard card, which carries the title and sentence itself. -->
|
|
84
84
|
<Teleport v-if="recordAll" :to="placedTarget || 'body'" :disabled="!placedTarget">
|
|
85
|
+
<p
|
|
86
|
+
v-if="placedTarget && recordAll.placement && recordAll.placement.sentence && allSentence"
|
|
87
|
+
class="cn-record-notes__all-sentence cn-record-notes__all-sentence--placed"
|
|
88
|
+
data-testid="cn-record-list-record-all-sentence">
|
|
89
|
+
{{ allSentence }}
|
|
90
|
+
</p>
|
|
85
91
|
<div
|
|
86
92
|
class="cn-record-notes__all"
|
|
87
93
|
:class="{ 'cn-record-notes__all--placed': !!placedTarget }"
|
|
@@ -90,8 +96,8 @@
|
|
|
90
96
|
<h3 v-if="recordAll.title" class="cn-record-notes__all-title">
|
|
91
97
|
{{ recordAll.title }}
|
|
92
98
|
</h3>
|
|
93
|
-
<p v-if="
|
|
94
|
-
{{
|
|
99
|
+
<p v-if="allSentence" class="cn-record-notes__all-sentence">
|
|
100
|
+
{{ allSentence }}
|
|
95
101
|
</p>
|
|
96
102
|
</div>
|
|
97
103
|
<div class="cn-record-notes__all-actions">
|
|
@@ -170,7 +176,7 @@ export default {
|
|
|
170
176
|
required: true,
|
|
171
177
|
},
|
|
172
178
|
|
|
173
|
-
/** `recordAll`, already translated: `{ label, title?, text?, icon?, cancel?: { label, to }, placement?: { widget } }`, or null. */
|
|
179
|
+
/** `recordAll`, already translated: `{ label, title?, text?: (string|{ zero?, one?, other }), icon?, cancel?: { label, to }, placement?: { widget, sentence? } }`, or null. */
|
|
174
180
|
recordAll: {
|
|
175
181
|
type: Object,
|
|
176
182
|
default: null,
|
|
@@ -203,6 +209,27 @@ export default {
|
|
|
203
209
|
return this.items.filter((item) => this.hasDraft(item.key)).length
|
|
204
210
|
},
|
|
205
211
|
|
|
212
|
+
/**
|
|
213
|
+
* The record-all sentence for the notes filled in now: a plain
|
|
214
|
+
* sentence as it is, else the `zero`, `one` or `other` form with
|
|
215
|
+
* `{count}` filled in.
|
|
216
|
+
*
|
|
217
|
+
* @return {string}
|
|
218
|
+
* @spec openspec/changes/record-all-counted-sentence/specs/record-list-notes/spec.md
|
|
219
|
+
*/
|
|
220
|
+
allSentence() {
|
|
221
|
+
const text = this.recordAll?.text
|
|
222
|
+
if (typeof text === 'string') {
|
|
223
|
+
return text
|
|
224
|
+
}
|
|
225
|
+
if (!text || typeof text !== 'object') {
|
|
226
|
+
return ''
|
|
227
|
+
}
|
|
228
|
+
const count = this.readyCount
|
|
229
|
+
const form = (count === 0 && text.zero) || (count === 1 && text.one) || text.other || text.one || ''
|
|
230
|
+
return form.replace(/\{count\}/g, String(count))
|
|
231
|
+
},
|
|
232
|
+
|
|
206
233
|
/** @return {string} The label of the ready figure. */
|
|
207
234
|
readyLabel() {
|
|
208
235
|
return this.action.readyLabel || t('nextcloud-vue', 'filled in, not recorded yet')
|
|
@@ -589,6 +616,12 @@ export default {
|
|
|
589
616
|
color: var(--color-text-maxcontrast);
|
|
590
617
|
}
|
|
591
618
|
|
|
619
|
+
.cn-record-notes__all-sentence--placed {
|
|
620
|
+
margin: 0;
|
|
621
|
+
padding: 0 0 12px;
|
|
622
|
+
color: var(--color-main-text);
|
|
623
|
+
}
|
|
624
|
+
|
|
592
625
|
.cn-record-notes__all-actions {
|
|
593
626
|
display: flex;
|
|
594
627
|
gap: 8px;
|
|
@@ -108,6 +108,9 @@ export function useListView(objectTypeOrOptions, options) {
|
|
|
108
108
|
// current ones.
|
|
109
109
|
const error = ref(null)
|
|
110
110
|
let refreshSeq = 0
|
|
111
|
+
// The mount's schema request, and whether it is still in flight.
|
|
112
|
+
let schemaLoading = null
|
|
113
|
+
let schemaPending = false
|
|
111
114
|
let pendingRefreshes = 0
|
|
112
115
|
|
|
113
116
|
let searchTimeout = null
|
|
@@ -197,8 +200,15 @@ export function useListView(objectTypeOrOptions, options) {
|
|
|
197
200
|
*
|
|
198
201
|
* @param {number} [page] Page to fetch
|
|
199
202
|
* @return {Promise<void>}
|
|
203
|
+
* @spec openspec/changes/list-waits-for-its-schema/specs/list-waits-for-its-schema/spec.md#requirement-a-list-fetch-waits-for-the-schema-the-mount-is-loading
|
|
200
204
|
*/
|
|
201
205
|
async function refresh(page = 1) {
|
|
206
|
+
// The store asks for facets only once it holds the schema, so a refresh
|
|
207
|
+
// that starts while the mount is still loading it (a watcher applying
|
|
208
|
+
// default filters, say) waits for it.
|
|
209
|
+
if (schemaPending) {
|
|
210
|
+
await schemaLoading.catch(() => null)
|
|
211
|
+
}
|
|
202
212
|
const seq = ++refreshSeq
|
|
203
213
|
// This call's own result. `errors[getType()]` is shared by every call
|
|
204
214
|
// for the type and is not cleared on success, so it cannot say which
|
|
@@ -378,7 +388,13 @@ export function useListView(objectTypeOrOptions, options) {
|
|
|
378
388
|
|
|
379
389
|
onMounted(async () => {
|
|
380
390
|
try {
|
|
381
|
-
|
|
391
|
+
schemaPending = true
|
|
392
|
+
schemaLoading = Promise.resolve(objectStore.fetchSchema(getType()))
|
|
393
|
+
try {
|
|
394
|
+
schema.value = await schemaLoading
|
|
395
|
+
} finally {
|
|
396
|
+
schemaPending = false
|
|
397
|
+
}
|
|
382
398
|
if (sidebarState) {
|
|
383
399
|
setupSidebar()
|
|
384
400
|
}
|
|
@@ -812,7 +812,9 @@
|
|
|
812
812
|
.cn-look-board .cn-detail-page__side .cn-countdown-widget__sub,
|
|
813
813
|
.cn-look-board .cn-detail-page__side .cn-facts-widget__link,
|
|
814
814
|
.cn-look-board .cn-detail-page__side .cn-facts-widget__link-note,
|
|
815
|
+
.cn-look-board .cn-detail-page__side .cn-linked-widget__link,
|
|
815
816
|
.cn-look-board .cn-detail-page__side .cn-linked-widget__empty,
|
|
817
|
+
.cn-look-board .cn-detail-page__side .cn-linked-widget__action,
|
|
816
818
|
.cn-look-board .cn-detail-page__side .cn-status-explainer__muted,
|
|
817
819
|
.cn-look-board .cn-detail-page__side .cn-status-explainer__dwell,
|
|
818
820
|
.cn-look-board .cn-detail-page__side .cn-attention-flag__heading,
|
|
@@ -2058,9 +2060,12 @@
|
|
|
2058
2060
|
/* ---- A file list's bulk bar (CnFilesBrowser) ---------------------------- */
|
|
2059
2061
|
/* The band over the ticked files is the case list's selection band: 10px
|
|
2060
2062
|
14px, radius 10, the count bold in the band's ink, 34px buttons with their words
|
|
2061
|
-
only (DqDocumentenBeheer "2 documenten geselecteerd").
|
|
2063
|
+
only (DqDocumentenBeheer "2 documenten geselecteerd"). It stands 10px under
|
|
2064
|
+
the bar and 14px over the list, where the bar's 8px margin and the browser's
|
|
2065
|
+
8px gap would give 16 and 8.
|
|
2062
2066
|
@spec openspec/changes/board-files-bulk-bar/specs/board-files-bulk-bar/spec.md#requirement-the-files-bulk-bar-is-the-boards-selection-band */
|
|
2063
2067
|
.cn-look-board .cn-files-browser__bulk-bar:not(.cn-look-nextcloud *) {
|
|
2068
|
+
margin-block: -6px 6px;
|
|
2064
2069
|
padding: 10px 14px;
|
|
2065
2070
|
border-radius: 10px;
|
|
2066
2071
|
font-size: 14px;
|
package/src/css/look-board.css
CHANGED
|
@@ -3127,6 +3127,27 @@ body:has(.cn-look-board):not(:has(.cn-look-nextcloud)) .vs__dropdown-menu:has(.c
|
|
|
3127
3127
|
gap: 8px 16px;
|
|
3128
3128
|
}
|
|
3129
3129
|
|
|
3130
|
+
/* `headLine` rows as DqDagAfsluiten "Vandaag vastgelegd" draws them: 16px
|
|
3131
|
+
above and below, the pill 12px from the done mark, the note 4px under the
|
|
3132
|
+
head line at the normal leading, the title underlined as the link it is.
|
|
3133
|
+
@spec openspec/changes/record-list-headline-rows/specs/record-list/spec.md#requirement-a-row-can-put-its-pill-title-and-meta-on-one-line */
|
|
3134
|
+
.cn-look-board .cn-dashboard-page:not(.cn-look-nextcloud *) .cn-record-list__list--headline .cn-record-list__row {
|
|
3135
|
+
padding-block: 16px;
|
|
3136
|
+
gap: 8px 12px;
|
|
3137
|
+
}
|
|
3138
|
+
|
|
3139
|
+
.cn-look-board .cn-dashboard-page:not(.cn-look-nextcloud *) .cn-record-list__list--headline .cn-record-list__main {
|
|
3140
|
+
gap: 4px;
|
|
3141
|
+
}
|
|
3142
|
+
|
|
3143
|
+
.cn-look-board .cn-dashboard-page:not(.cn-look-nextcloud *) .cn-record-list__headline .cn-record-list__title--link {
|
|
3144
|
+
text-decoration: underline !important;
|
|
3145
|
+
}
|
|
3146
|
+
|
|
3147
|
+
.cn-look-board .cn-dashboard-page:not(.cn-look-nextcloud *) .cn-record-list__note {
|
|
3148
|
+
line-height: normal;
|
|
3149
|
+
}
|
|
3150
|
+
|
|
3130
3151
|
/* A status pill, a due text and the initials in the row keep their own tone
|
|
3131
3152
|
(DqProcesanalyse "Knelpunt" red, "Let op" amber; PqMijnWerk "JP" soft ink).
|
|
3132
3153
|
@spec openspec/changes/board-dashboard-row-pill-ink/specs/board-dashboard-row-pill-ink/spec.md#requirement-a-dashboard-rows-pill-keeps-its-tone */
|
|
@@ -3305,6 +3326,19 @@ body:has(.cn-look-board):not(:has(.cn-look-nextcloud)) .vs__dropdown-menu:has(.c
|
|
|
3305
3326
|
border-top: 1px solid var(--color-border);
|
|
3306
3327
|
}
|
|
3307
3328
|
|
|
3329
|
+
/* A sentence the list places with the pair (`placement.sentence`) stands 24px
|
|
3330
|
+
in and 20px above the band, as the card's own sentence did.
|
|
3331
|
+
@spec openspec/changes/record-all-counted-sentence/specs/record-list-notes/spec.md */
|
|
3332
|
+
.cn-look-board .cn-dashboard-page:not(.cn-look-nextcloud *) .cn-record-notes__all-sentence--placed {
|
|
3333
|
+
padding: 0 24px 20px;
|
|
3334
|
+
}
|
|
3335
|
+
|
|
3336
|
+
/* The placed sentence replaces the card's own text, which stays as the
|
|
3337
|
+
sentence for a library without placement. */
|
|
3338
|
+
.cn-look-board .cn-dashboard-page:not(.cn-look-nextcloud *) .cn-widget-wrapper__content:has(> .cn-record-notes__all-sentence--placed) > .cn-text-widget {
|
|
3339
|
+
display: none;
|
|
3340
|
+
}
|
|
3341
|
+
|
|
3308
3342
|
/* The card holding that pair draws its title and sentence 24px in, as the
|
|
3309
3343
|
board draws it, not the dashboard cards' 22px. */
|
|
3310
3344
|
.cn-look-board .cn-dashboard-page:not(.cn-look-nextcloud *) .cn-widget-wrapper:has(> .cn-widget-wrapper__content > .cn-record-notes__all--placed) {
|