@conduction/nextcloud-vue 2.152.0 → 2.153.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/CnConversationThread/CnConversationThread.vue.js +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationThread.vue2.js +2 -1
- package/dist/esm/components/CnConversationThread/CnConversationThread.vue2.js.map +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationThread.vue3.js +33 -25
- package/dist/esm/components/CnConversationThread/CnConversationThread.vue3.js.map +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationWidget.vue.js +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationWidget.vue2.js +22 -2
- package/dist/esm/components/CnConversationThread/CnConversationWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +21 -3
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnMapWidget/CnMapWidget.vue.js +1 -1
- package/dist/esm/components/CnMapWidget/CnMapWidget.vue2.js +20 -0
- package/dist/esm/components/CnMapWidget/CnMapWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnMapWidget/CnMapWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnNotificationMatrix/CnNotificationMatrix.vue.js +1 -1
- package/dist/esm/components/CnNotificationMatrix/CnNotificationMatrix.vue2.js.map +1 -1
- package/dist/esm/components/CnNotificationMatrix/CnNotificationMatrix.vue3.js.map +1 -1
- package/dist/esm/components/CnPlanWidget/CnPlanWidget.vue.js +1 -1
- package/dist/esm/components/CnPlanWidget/CnPlanWidget.vue2.js +18 -1
- package/dist/esm/components/CnPlanWidget/CnPlanWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnPlanWidget/CnPlanWidget.vue3.js +4 -2
- package/dist/esm/components/CnPlanWidget/CnPlanWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnPlanWidget/CnPlanWidgetRow.vue.js +1 -1
- package/dist/esm/components/CnPlanWidget/CnPlanWidgetRow.vue2.js +25 -3
- package/dist/esm/components/CnPlanWidget/CnPlanWidgetRow.vue2.js.map +1 -1
- package/dist/esm/components/CnPlanWidget/CnPlanWidgetRow.vue3.js +1 -1
- package/dist/esm/components/CnPlanWidget/CnPlanWidgetRow.vue3.js.map +1 -1
- package/dist/esm/components/CnStepper/CnStepper.vue.js +1 -1
- package/dist/esm/components/CnStepper/CnStepper.vue2.js.map +1 -1
- package/dist/esm/components/CnStepper/CnStepper.vue3.js.map +1 -1
- package/dist/esm/l10n/en.json.js +19 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +20 -2
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +237 -125
- package/dist/esm/utils/fillTemplate.js +12 -2
- package/dist/esm/utils/fillTemplate.js.map +1 -1
- package/dist/esm/utils/savedViewSummary.js +109 -4
- package/dist/esm/utils/savedViewSummary.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +681 -424
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +237 -125
- package/l10n/en.json +19 -1
- package/l10n/nl.json +20 -2
- package/package.json +1 -1
- package/src/components/CnConversationThread/CnConversationThread.vue +7 -1
- package/src/components/CnConversationThread/CnConversationWidget.vue +22 -2
- package/src/components/CnIndexPage/CnIndexPage.vue +21 -3
- package/src/components/CnMapWidget/CnMapWidget.vue +20 -0
- package/src/components/CnNotificationMatrix/CnNotificationMatrix.vue +23 -0
- package/src/components/CnPlanWidget/CnPlanWidget.vue +20 -1
- package/src/components/CnPlanWidget/CnPlanWidgetRow.vue +26 -4
- package/src/components/CnStepper/CnStepper.vue +7 -5
- package/src/css/dialog.css +12 -0
- package/src/css/form-field.css +11 -0
- package/src/css/look-board-detail.css +28 -1
- package/src/css/look-board-index.css +21 -4
- package/src/css/look-board.css +20 -0
- package/src/utils/fillTemplate.js +12 -2
- package/src/utils/savedViewSummary.js +109 -4
package/l10n/en.json
CHANGED
|
@@ -2413,7 +2413,13 @@
|
|
|
2413
2413
|
"Briefcase": "Briefcase",
|
|
2414
2414
|
"Eye": "Eye",
|
|
2415
2415
|
"Euro": "Euro",
|
|
2416
|
-
"Ready": "Ready"
|
|
2416
|
+
"Ready": "Ready",
|
|
2417
|
+
"Map layers": "Map layers",
|
|
2418
|
+
"you": "you",
|
|
2419
|
+
"my team": "my team",
|
|
2420
|
+
"Subject: {subject}": "Subject: {subject}",
|
|
2421
|
+
"Optional": "Optional",
|
|
2422
|
+
"Reached": "Reached"
|
|
2417
2423
|
},
|
|
2418
2424
|
"plurals": {
|
|
2419
2425
|
"{count} member": [
|
|
@@ -2622,6 +2628,18 @@
|
|
|
2622
2628
|
"{names} has no location, so it is not on the map.": [
|
|
2623
2629
|
"{names} has no location, so it is not on the map.",
|
|
2624
2630
|
"{names} have no location, so they are not on the map."
|
|
2631
|
+
],
|
|
2632
|
+
"in %n day": [
|
|
2633
|
+
"in %n day",
|
|
2634
|
+
"in %n days"
|
|
2635
|
+
],
|
|
2636
|
+
"%n day ago": [
|
|
2637
|
+
"%n day ago",
|
|
2638
|
+
"%n days ago"
|
|
2639
|
+
],
|
|
2640
|
+
"%n attachment": [
|
|
2641
|
+
"%n attachment",
|
|
2642
|
+
"%n attachments"
|
|
2625
2643
|
]
|
|
2626
2644
|
}
|
|
2627
2645
|
}
|
package/l10n/nl.json
CHANGED
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"Advanced": "Geavanceerd",
|
|
138
138
|
"The item could not be created.": "Het item kon niet worden aangemaakt.",
|
|
139
139
|
"Start over": "Opnieuw beginnen",
|
|
140
|
-
"Continue where you left off": "
|
|
140
|
+
"Continue where you left off": "Verder met de rondleiding",
|
|
141
141
|
"Active": "Actief",
|
|
142
142
|
"Appraisal": "Waardering",
|
|
143
143
|
"Archiving": "Archivering",
|
|
@@ -2668,7 +2668,13 @@
|
|
|
2668
2668
|
"Briefcase": "Koffer",
|
|
2669
2669
|
"Eye": "Oog",
|
|
2670
2670
|
"Euro": "Euro",
|
|
2671
|
-
"Ready": "Gereed"
|
|
2671
|
+
"Ready": "Gereed",
|
|
2672
|
+
"Map layers": "Kaartlagen",
|
|
2673
|
+
"you": "jij",
|
|
2674
|
+
"my team": "mijn team",
|
|
2675
|
+
"Subject: {subject}": "Onderwerp: {subject}",
|
|
2676
|
+
"Optional": "Optioneel",
|
|
2677
|
+
"Reached": "Bereikt"
|
|
2672
2678
|
},
|
|
2673
2679
|
"plurals": {
|
|
2674
2680
|
"{count} member": [
|
|
@@ -2894,6 +2900,18 @@
|
|
|
2894
2900
|
"{names} has no location, so it is not on the map.": [
|
|
2895
2901
|
"{names} heeft geen locatie, dus staat niet op de kaart.",
|
|
2896
2902
|
"{names} hebben geen locatie, dus staan ze niet op de kaart."
|
|
2903
|
+
],
|
|
2904
|
+
"in %n day": [
|
|
2905
|
+
"over %n dag",
|
|
2906
|
+
"over %n dagen"
|
|
2907
|
+
],
|
|
2908
|
+
"%n day ago": [
|
|
2909
|
+
"%n dag geleden",
|
|
2910
|
+
"%n dagen geleden"
|
|
2911
|
+
],
|
|
2912
|
+
"%n attachment": [
|
|
2913
|
+
"%n bijlage",
|
|
2914
|
+
"%n bijlagen"
|
|
2897
2915
|
]
|
|
2898
2916
|
}
|
|
2899
2917
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@conduction/nextcloud-vue",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.153.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": {
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
aria-hidden="true">{{ row.directionWord }}</span>
|
|
77
77
|
<time v-if="row.timeLabel" :datetime="row.datetime || null">{{ row.timeLabel }}</time>
|
|
78
78
|
</span>
|
|
79
|
+
<span v-if="row.subjectLine" class="cn-conversation-thread__subject" data-testid="cn-conversation-subject">{{ row.subjectLine }}</span>
|
|
79
80
|
<span class="cn-conversation-thread__text">{{ row.text }}</span>
|
|
80
81
|
<span v-if="row.note" class="cn-conversation-thread__note" data-testid="cn-conversation-note">{{ row.note }}</span>
|
|
81
82
|
<span v-if="row.actions.length > 0" class="cn-conversation-thread__message-actions">
|
|
@@ -203,7 +204,7 @@ export default {
|
|
|
203
204
|
|
|
204
205
|
props: {
|
|
205
206
|
/**
|
|
206
|
-
* The messages, oldest first: `{ id?, author?, time?, text, side?, channel?, channelIcon?, status?, actions?, note? }`.
|
|
207
|
+
* The messages, oldest first: `{ id?, author?, time?, text, side?, channel?, channelIcon?, status?, subject?, actions?, note? }`.
|
|
207
208
|
* `status` is shown after the channel ("Failed"); `actions` are
|
|
208
209
|
* `{ id, label, disabled? }` buttons under the text, each emitting
|
|
209
210
|
* `message-action`.
|
|
@@ -389,6 +390,7 @@ export default {
|
|
|
389
390
|
channel: typeof message.channel === 'string' ? message.channel : '',
|
|
390
391
|
channelIcon: typeof message.channelIcon === 'string' ? message.channelIcon : '',
|
|
391
392
|
status: typeof message.status === 'string' ? message.status : '',
|
|
393
|
+
subjectLine: typeof message.subject === 'string' && message.subject !== '' ? t('nextcloud-vue', 'Subject: {subject}', { subject: message.subject }) : '',
|
|
392
394
|
actions: Array.isArray(message.actions) ? message.actions.filter((action) => action && action.id && action.label) : [],
|
|
393
395
|
directionLabel: side === 'us' ? t('nextcloud-vue', 'Sent message') : t('nextcloud-vue', 'Received message'),
|
|
394
396
|
directionWord: side === 'us' ? t('nextcloud-vue', 'Outgoing') : t('nextcloud-vue', 'Incoming'),
|
|
@@ -655,6 +657,10 @@ export default {
|
|
|
655
657
|
content: ' ·';
|
|
656
658
|
}
|
|
657
659
|
|
|
660
|
+
.cn-conversation-thread__subject {
|
|
661
|
+
font-weight: 600;
|
|
662
|
+
}
|
|
663
|
+
|
|
658
664
|
.cn-conversation-thread__note {
|
|
659
665
|
color: var(--color-text-maxcontrast);
|
|
660
666
|
font-size: 13px;
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
|
|
86
86
|
<script>
|
|
87
87
|
import { subscribe, unsubscribe } from '@nextcloud/event-bus'
|
|
88
|
-
import { translate as t } from '@nextcloud/l10n'
|
|
88
|
+
import { translatePlural as n, translate as t } from '@nextcloud/l10n'
|
|
89
89
|
import { NcButton, NcCheckboxRadioSwitch } from '@nextcloud/vue'
|
|
90
90
|
import CnIcon from '../CnIcon/CnIcon.vue'
|
|
91
91
|
import CnTemplateSelect from '../CnTemplateSelect/CnTemplateSelect.vue'
|
|
@@ -111,6 +111,9 @@ import { userDisplayName } from '../../utils/userDisplayName.js'
|
|
|
111
111
|
* `outValue`) for the messages the organisation sent, and `channelField` with
|
|
112
112
|
* an optional `channelMap` from stored value to label ("email" to "E-mail")
|
|
113
113
|
* and `channelIcons` from stored value to an icon name, drawn before the label.
|
|
114
|
+
* `subjectField` shows a message's subject on a line of its own above its
|
|
115
|
+
* text ("Subject: ..."); `noteField` a grey line under it, followed by the
|
|
116
|
+
* count `attachmentCountField` holds ("1 attachment").
|
|
114
117
|
*
|
|
115
118
|
* The reply box posts to `endpoint` (`@objectId` filled in), or runs
|
|
116
119
|
* `replyAction`, an action descriptor the app decides the meaning of: it is
|
|
@@ -307,7 +310,8 @@ export default {
|
|
|
307
310
|
return {
|
|
308
311
|
id: key,
|
|
309
312
|
author: this.authorOf(message, sideOf),
|
|
310
|
-
|
|
313
|
+
subject: c.subjectField ? this.textOf(readPath(message, c.subjectField)) : '',
|
|
314
|
+
note: this.noteOf(message),
|
|
311
315
|
time: readPath(message, c.timestampField || c.timeField || 'time'),
|
|
312
316
|
text: readPath(message, c.bodyField || c.textField || 'text'),
|
|
313
317
|
side: sideOf,
|
|
@@ -694,6 +698,22 @@ export default {
|
|
|
694
698
|
return format === 'user' && text !== '' ? (userDisplayName(text) || text) : text
|
|
695
699
|
},
|
|
696
700
|
|
|
701
|
+
/**
|
|
702
|
+
* The grey line under a message: its note, then its attachment count,
|
|
703
|
+
* joined with a comma ("Binnengekomen op het Woo-postvak, 1 bijlage").
|
|
704
|
+
*
|
|
705
|
+
* @param {object} message The stored message.
|
|
706
|
+
* @return {string} The line, or '' when it has neither.
|
|
707
|
+
* @spec openspec/changes/conversation-subject-attachments/specs/conversation-subject-attachments/spec.md#requirement-a-message-can-show-its-subject-note-and-attachment-count
|
|
708
|
+
*/
|
|
709
|
+
noteOf(message) {
|
|
710
|
+
const c = this.content || {}
|
|
711
|
+
const note = c.noteField ? this.textOf(readPath(message, c.noteField)) : ''
|
|
712
|
+
const count = c.attachmentCountField ? Number(readPath(message, c.attachmentCountField)) : 0
|
|
713
|
+
const attachments = Number.isFinite(count) && count > 0 ? n('nextcloud-vue', '%n attachment', '%n attachments', count) : ''
|
|
714
|
+
return [note, attachments].filter((part) => part !== '').join(', ')
|
|
715
|
+
},
|
|
716
|
+
|
|
697
717
|
/**
|
|
698
718
|
* @param {unknown} value A stored value.
|
|
699
719
|
* @return {string} It as text, or '' for none.
|
|
@@ -6373,7 +6373,24 @@ export default {
|
|
|
6373
6373
|
if (declared || !from || typeof from.field !== 'string' || from.field === '') {
|
|
6374
6374
|
return ''
|
|
6375
6375
|
}
|
|
6376
|
-
return JSON.stringify({ r: this.register, s: this.exportSchemaSlug, f: this.filter || null, q: from })
|
|
6376
|
+
return JSON.stringify({ r: this.register, s: this.exportSchemaSlug, f: this.filter || null, a: this.quickFiltersFromScope, q: from })
|
|
6377
|
+
},
|
|
6378
|
+
|
|
6379
|
+
/**
|
|
6380
|
+
* The active filters the `quickFiltersFrom` values are counted within,
|
|
6381
|
+
* without the field's own: a saved view's or default filters narrow the
|
|
6382
|
+
* tabs as they narrow the list, and picking a tab keeps the others.
|
|
6383
|
+
*
|
|
6384
|
+
* @return {object}
|
|
6385
|
+
* @spec openspec/changes/quick-filters-from-active-scope/specs/quick-filters-from-active-scope/spec.md#requirement-generated-quick-filters-count-within-the-active-filters
|
|
6386
|
+
*/
|
|
6387
|
+
quickFiltersFromScope() {
|
|
6388
|
+
const field = this.quickFiltersFrom && this.quickFiltersFrom.field
|
|
6389
|
+
const scope = { ...(this.effectiveActiveFilters || {}) }
|
|
6390
|
+
if (field) {
|
|
6391
|
+
delete scope[field]
|
|
6392
|
+
}
|
|
6393
|
+
return scope
|
|
6377
6394
|
},
|
|
6378
6395
|
|
|
6379
6396
|
filterStripCountKey() {
|
|
@@ -9830,7 +9847,8 @@ export default {
|
|
|
9830
9847
|
|
|
9831
9848
|
/**
|
|
9832
9849
|
* Build the `quickFiltersFrom` tabs: the field's distinct values with
|
|
9833
|
-
* their counts
|
|
9850
|
+
* their counts within the page filter and the active filters (not the
|
|
9851
|
+
* field's own) in one grouped request, labelled through the
|
|
9834
9852
|
* reference-label resolver when the values are record ids. A failed
|
|
9835
9853
|
* request draws no tabs.
|
|
9836
9854
|
*
|
|
@@ -9849,7 +9867,7 @@ export default {
|
|
|
9849
9867
|
const ctx = typeof this.selfFetchTokenCtx === 'function' ? this.selfFetchTokenCtx() : {}
|
|
9850
9868
|
let groups
|
|
9851
9869
|
try {
|
|
9852
|
-
groups = await fetchGroupedCounts({ register: this.register, schema, groupBy: from.field, filter: resolveFilterMap(this.filter, params, ctx) }, ctx)
|
|
9870
|
+
groups = await fetchGroupedCounts({ register: this.register, schema, groupBy: from.field, filter: { ...resolveFilterMap(this.filter, params, ctx), ...resolveFilterMap(this.quickFiltersFromScope, params, ctx) } }, ctx)
|
|
9853
9871
|
} catch {
|
|
9854
9872
|
groups = []
|
|
9855
9873
|
}
|
|
@@ -1269,9 +1269,29 @@ export default {
|
|
|
1269
1269
|
// The board look keeps the top right for its control column.
|
|
1270
1270
|
this.layersControl = L.control.layers(baseLayers, {}, { position: this.isBoardLook ? 'topleft' : 'topright' })
|
|
1271
1271
|
this.layersControl.addTo(this.map)
|
|
1272
|
+
this.labelLayersToggle()
|
|
1272
1273
|
}
|
|
1273
1274
|
},
|
|
1274
1275
|
|
|
1276
|
+
/**
|
|
1277
|
+
* Name the base-map switch in the user's language: Leaflet titles its
|
|
1278
|
+
* toggle "Layers" and gives it no accessible name of its own.
|
|
1279
|
+
*
|
|
1280
|
+
* @spec openspec/changes/board-map-layers-button/specs/board-map-layers-button/spec.md#requirement-the-base-map-switch-is-a-named-board-button
|
|
1281
|
+
*/
|
|
1282
|
+
labelLayersToggle() {
|
|
1283
|
+
const container = this.layersControl && typeof this.layersControl.getContainer === 'function'
|
|
1284
|
+
? this.layersControl.getContainer()
|
|
1285
|
+
: null
|
|
1286
|
+
const toggle = container ? container.querySelector('.leaflet-control-layers-toggle') : null
|
|
1287
|
+
if (!toggle) {
|
|
1288
|
+
return
|
|
1289
|
+
}
|
|
1290
|
+
const label = t('nextcloud-vue', 'Map layers')
|
|
1291
|
+
toggle.setAttribute('title', label)
|
|
1292
|
+
toggle.setAttribute('aria-label', label)
|
|
1293
|
+
},
|
|
1294
|
+
|
|
1275
1295
|
/**
|
|
1276
1296
|
* Mount the custom control bar (fit-all / locate / fullscreen). Leaflet's own
|
|
1277
1297
|
* zoom + attribution controls are enabled separately in `initMap`; in the
|
|
@@ -1158,6 +1158,29 @@ export default {
|
|
|
1158
1158
|
42px as on the board (10px, the 1px-low checkbox, 10px, the rule). */
|
|
1159
1159
|
display: block;
|
|
1160
1160
|
margin: 1px auto 0;
|
|
1161
|
+
/* Drawn as Nextcloud's checkbox (NcCheckboxRadioSwitch's
|
|
1162
|
+
checkbox-blank-outline / checkbox-marked icons at 20px), as the
|
|
1163
|
+
boards draw it: the native box differs per browser. */
|
|
1164
|
+
appearance: none;
|
|
1165
|
+
border: 0;
|
|
1166
|
+
background-color: var(--color-text-maxcontrast);
|
|
1167
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z'/%3E%3C/svg%3E") center / 20px no-repeat;
|
|
1168
|
+
cursor: pointer;
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
.cn-notification-matrix__table tbody td input[type='checkbox']:checked {
|
|
1172
|
+
background-color: var(--color-primary-element);
|
|
1173
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z'/%3E%3C/svg%3E");
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
.cn-notification-matrix__table tbody td input[type='checkbox']:focus-visible {
|
|
1177
|
+
outline: 2px solid var(--color-primary-element);
|
|
1178
|
+
outline-offset: 2px;
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
.cn-notification-matrix__table tbody td input[type='checkbox']:disabled {
|
|
1182
|
+
cursor: default;
|
|
1183
|
+
opacity: .5;
|
|
1161
1184
|
}
|
|
1162
1185
|
|
|
1163
1186
|
.cn-notification-matrix__group {
|
|
@@ -18,12 +18,14 @@
|
|
|
18
18
|
<ul v-else-if="roots.length > 0" class="cn-plan__tree">
|
|
19
19
|
<li v-for="node in roots" :key="node.uuid" class="cn-plan__node">
|
|
20
20
|
<CnPlanWidgetRow :item="node"
|
|
21
|
+
:labels="stateLabels"
|
|
21
22
|
:busy="busy"
|
|
22
23
|
@enable="enable"
|
|
23
24
|
@transition="transition" />
|
|
24
25
|
<ul v-if="node.children.length > 0" class="cn-plan__children">
|
|
25
26
|
<li v-for="child in node.children" :key="child.uuid" class="cn-plan__node">
|
|
26
27
|
<CnPlanWidgetRow :item="child"
|
|
28
|
+
:labels="stateLabels"
|
|
27
29
|
:busy="busy"
|
|
28
30
|
@enable="enable"
|
|
29
31
|
@transition="transition" />
|
|
@@ -59,7 +61,8 @@ const PAGE_REFRESH = 'cn:page:refresh'
|
|
|
59
61
|
* retry, never an empty plan. Any app whose records run on OpenRegister's
|
|
60
62
|
* case layer uses it; dossiq's case plan is the first.
|
|
61
63
|
*
|
|
62
|
-
* `content`: `emptyText`,
|
|
64
|
+
* `content`: `emptyText`, and `stateLabels` (`{ active: 'Active' }`, the word
|
|
65
|
+
* for a state), both through the host translate.
|
|
63
66
|
*
|
|
64
67
|
* The record's id comes from `objectId`, else the bound record.
|
|
65
68
|
*/
|
|
@@ -111,6 +114,22 @@ export default {
|
|
|
111
114
|
},
|
|
112
115
|
|
|
113
116
|
computed: {
|
|
117
|
+
/** @return {object} The configured word per state, translated. */
|
|
118
|
+
stateLabels() {
|
|
119
|
+
const map = this.content?.stateLabels
|
|
120
|
+
if (!map || typeof map !== 'object') {
|
|
121
|
+
return {}
|
|
122
|
+
}
|
|
123
|
+
const out = {}
|
|
124
|
+
for (const [state, label] of Object.entries(map)) {
|
|
125
|
+
const text = this.text(label)
|
|
126
|
+
if (text !== '') {
|
|
127
|
+
out[state] = text
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return out
|
|
131
|
+
},
|
|
132
|
+
|
|
114
133
|
/** @return {string} The record id. */
|
|
115
134
|
id() {
|
|
116
135
|
const bound = this.objectData || {}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<span class="cn-plan-row__name">{{ item.name }}</span>
|
|
9
9
|
<span v-if="item.description" class="cn-plan-row__meta" data-testid="cn-plan-row-meta">{{ item.description }}</span>
|
|
10
10
|
</span>
|
|
11
|
-
<span class="cn-plan-row__state" :data-state="item.state">{{ stateLabel(item
|
|
11
|
+
<span class="cn-plan-row__state" :data-state="item.state">{{ stateLabel(item) }}</span>
|
|
12
12
|
<NcButton v-if="item.state === 'enabled' && item.discretionary"
|
|
13
13
|
:disabled="busy"
|
|
14
14
|
:data-testid="`cn-plan-enable-${item.key || item.uuid}`"
|
|
@@ -49,6 +49,16 @@ export default {
|
|
|
49
49
|
required: true,
|
|
50
50
|
},
|
|
51
51
|
|
|
52
|
+
/**
|
|
53
|
+
* The word per state that replaces the default, already translated.
|
|
54
|
+
*
|
|
55
|
+
* @type {object}
|
|
56
|
+
*/
|
|
57
|
+
labels: {
|
|
58
|
+
type: Object,
|
|
59
|
+
default: () => ({}),
|
|
60
|
+
},
|
|
61
|
+
|
|
52
62
|
/** A move is running. */
|
|
53
63
|
busy: {
|
|
54
64
|
type: Boolean,
|
|
@@ -69,12 +79,24 @@ export default {
|
|
|
69
79
|
t,
|
|
70
80
|
|
|
71
81
|
/**
|
|
72
|
-
* The word for
|
|
82
|
+
* The word for an item's state. A completed milestone is reached, and
|
|
83
|
+
* an optional item nobody has started reads as optional rather than
|
|
84
|
+
* waiting. `labels` replaces the word for a state.
|
|
73
85
|
*
|
|
74
|
-
* @param {
|
|
86
|
+
* @param {object} item The plan item.
|
|
75
87
|
* @return {string}
|
|
76
88
|
*/
|
|
77
|
-
stateLabel(
|
|
89
|
+
stateLabel(item) {
|
|
90
|
+
const state = item.state
|
|
91
|
+
if (typeof this.labels[state] === 'string' && this.labels[state] !== '') {
|
|
92
|
+
return this.labels[state]
|
|
93
|
+
}
|
|
94
|
+
if (state === 'completed' && item.type === 'milestone') {
|
|
95
|
+
return t('nextcloud-vue', 'Reached')
|
|
96
|
+
}
|
|
97
|
+
if (item.discretionary && (state === 'available' || state === 'enabled')) {
|
|
98
|
+
return t('nextcloud-vue', 'Optional')
|
|
99
|
+
}
|
|
78
100
|
const labels = {
|
|
79
101
|
available: t('nextcloud-vue', 'Waiting'),
|
|
80
102
|
enabled: t('nextcloud-vue', 'Can start'),
|
|
@@ -292,15 +292,17 @@ button.cn-stepper__step {
|
|
|
292
292
|
background: var(--color-success);
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
/* Done: filled success circle, 16px check,
|
|
295
|
+
/* Done: filled success circle, 16px white check, label in the main text. */
|
|
296
296
|
.cn-stepper--board .cn-stepper__item--done .cn-stepper__dot {
|
|
297
297
|
border-color: var(--color-success);
|
|
298
298
|
background: var(--color-success);
|
|
299
|
-
|
|
299
|
+
/* A white check on the green, as the board draws it (DqInstellen); the
|
|
300
|
+
theme's success text tone is a dark green meant for a light ground. */
|
|
301
|
+
color: var(--color-primary-element-text, #fff);
|
|
300
302
|
}
|
|
301
303
|
|
|
302
304
|
.cn-stepper--board .cn-stepper__item--done .cn-stepper__label {
|
|
303
|
-
color: var(--
|
|
305
|
+
color: var(--color-main-text);
|
|
304
306
|
font-weight: 400;
|
|
305
307
|
}
|
|
306
308
|
|
|
@@ -317,12 +319,12 @@ button.cn-stepper__step {
|
|
|
317
319
|
font-weight: 700;
|
|
318
320
|
}
|
|
319
321
|
|
|
320
|
-
/* Upcoming: 2px outline, number 14/
|
|
322
|
+
/* Upcoming: 2px outline, number 14/700, label in the max-contrast tone. */
|
|
321
323
|
.cn-stepper--board .cn-stepper__item--upcoming .cn-stepper__dot {
|
|
322
324
|
border: 2px solid var(--color-border-dark);
|
|
323
325
|
background: transparent;
|
|
324
326
|
color: var(--color-text-maxcontrast);
|
|
325
|
-
font-weight:
|
|
327
|
+
font-weight: 700;
|
|
326
328
|
}
|
|
327
329
|
|
|
328
330
|
.cn-stepper--board .cn-stepper__item--upcoming .cn-stepper__label {
|
package/src/css/dialog.css
CHANGED
|
@@ -621,3 +621,15 @@ body:has(.cn-look-board):not(:has(.cn-look-nextcloud)) .modal-mask {
|
|
|
621
621
|
.cn-dialog-board .cn-transition-input-fields .cn-transition-input-fields__label {
|
|
622
622
|
line-height: normal;
|
|
623
623
|
}
|
|
624
|
+
|
|
625
|
+
/* A setup step's parts are 16px apart, as the boards draw them (DqInstellen:
|
|
626
|
+
intro, choices and note sat 11 to 26px apart), and a note inside it adds no
|
|
627
|
+
margin of its own.
|
|
628
|
+
@spec openspec/changes/board-wizard-step/specs/setup-wizard/spec.md */
|
|
629
|
+
.cn-dialog-board .cn-wizard-dialog__step-body .cn-setup-step {
|
|
630
|
+
gap: 16px;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
.cn-dialog-board .cn-wizard-dialog__step-body .cn-setup-step .notecard.notecard {
|
|
634
|
+
margin: 0;
|
|
635
|
+
}
|
package/src/css/form-field.css
CHANGED
|
@@ -101,6 +101,17 @@
|
|
|
101
101
|
padding: 10px 12px;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
/* The boards draw a form's text area three lines tall on the font's own
|
|
105
|
+
leading (DqNieuweZaak "Omschrijving": 76px); the field's 80px minimum, its
|
|
106
|
+
four rows and the server's 3px margin made it 84px in a 90px wrapper. It
|
|
107
|
+
still resizes. */
|
|
108
|
+
.cn-look-board .cn-form-dialog__field .cn-form-dialog__textarea {
|
|
109
|
+
min-height: 0;
|
|
110
|
+
height: calc(3 * 1.2em + 22px);
|
|
111
|
+
margin: 0;
|
|
112
|
+
line-height: normal;
|
|
113
|
+
}
|
|
114
|
+
|
|
104
115
|
/* An invalid field: 2px error border on the control, 4px edge on the group. */
|
|
105
116
|
.cn-look-board .cn-form-field--invalid input:not([type='checkbox']):not([type='radio']),
|
|
106
117
|
.cn-look-board .cn-form-field--invalid textarea,
|
|
@@ -2013,6 +2013,32 @@
|
|
|
2013
2013
|
margin-bottom: 8px;
|
|
2014
2014
|
}
|
|
2015
2015
|
|
|
2016
|
+
/* The name and the details line at line height 1.2 with no top inset, so a
|
|
2017
|
+
two-line row is 60px high as drawn (r31: 71).
|
|
2018
|
+
@spec openspec/changes/board-contacts-rows/specs/contacts/spec.md */
|
|
2019
|
+
.cn-look-board .cn-contacts-tab .cn-contacts-tab__details {
|
|
2020
|
+
padding-top: 0;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
.cn-look-board .cn-contacts-tab .cn-contacts-tab__name,
|
|
2024
|
+
.cn-look-board .cn-contacts-tab .cn-contacts-tab__meta {
|
|
2025
|
+
line-height: 1.2;
|
|
2026
|
+
}
|
|
2027
|
+
|
|
2028
|
+
/* The board draws every party's initials on the same grey ground in the
|
|
2029
|
+
soft ink, 12px bold, where NcAvatar tints each one from a hash of the name
|
|
2030
|
+
(inline styles, hence the !important).
|
|
2031
|
+
@spec openspec/changes/board-contacts-rows/specs/contacts/spec.md */
|
|
2032
|
+
.cn-look-board .cn-contacts-tab .cn-contacts-tab__avatar .avatardiv__initials-wrapper {
|
|
2033
|
+
background-color: var(--color-background-hover) !important;
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
.cn-look-board .cn-contacts-tab .cn-contacts-tab__avatar .avatardiv__initials {
|
|
2037
|
+
color: var(--cn-board-text-soft) !important;
|
|
2038
|
+
font-size: 12px;
|
|
2039
|
+
font-weight: 700;
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2016
2042
|
/* The contacts tab inside a detail card (DqZaakBetrokkenen "Partijen") takes
|
|
2017
2043
|
the card's padding instead of its own, and its buttons start at the card's
|
|
2018
2044
|
edge under the subtitle.
|
|
@@ -2104,9 +2130,10 @@
|
|
|
2104
2130
|
line-height: 1.2;
|
|
2105
2131
|
}
|
|
2106
2132
|
|
|
2107
|
-
.cn-look-board .cn-object-parties .cn-object-parties__accepted-kind {
|
|
2133
|
+
.cn-look-board .cn-object-parties .cn-object-parties__accepted-kind.cn-status-badge:not(.cn-look-nextcloud *) {
|
|
2108
2134
|
padding: 2px 8px;
|
|
2109
2135
|
border: 1px solid var(--color-border-maxcontrast);
|
|
2136
|
+
background-color: transparent;
|
|
2110
2137
|
border-radius: 12px;
|
|
2111
2138
|
font-size: 13px;
|
|
2112
2139
|
font-weight: 600;
|
|
@@ -1787,8 +1787,10 @@
|
|
|
1787
1787
|
padding: 0 6px;
|
|
1788
1788
|
box-sizing: border-box;
|
|
1789
1789
|
border-radius: 10px;
|
|
1790
|
-
|
|
1791
|
-
|
|
1790
|
+
/* The board's count pill: the hairline grey with the secondary ink
|
|
1791
|
+
(DqAfdelingen 228,230,234 / 61,64,71), not the hover grey and the main ink. */
|
|
1792
|
+
background: var(--cn-board-hairline);
|
|
1793
|
+
color: color-mix(in srgb, var(--color-text-maxcontrast) 50%, var(--color-main-text));
|
|
1792
1794
|
font-size: 12px;
|
|
1793
1795
|
font-weight: 600;
|
|
1794
1796
|
}
|
|
@@ -1828,11 +1830,26 @@
|
|
|
1828
1830
|
padding-inline-start: 64px;
|
|
1829
1831
|
}
|
|
1830
1832
|
|
|
1831
|
-
.cn-look-board .cn-index-page__folder-pane .cn-folder-tree__item > :not(.cn-folder-tree__name):not(.cn-folder-tree__count)
|
|
1832
|
-
.cn-look-board .cn-index-page__folder-pane .cn-folder-sidebar__all > :not(.cn-folder-sidebar__all-label) {
|
|
1833
|
+
.cn-look-board .cn-index-page__folder-pane .cn-folder-tree__item > :not(.cn-folder-tree__name):not(.cn-folder-tree__count) {
|
|
1833
1834
|
display: none;
|
|
1834
1835
|
}
|
|
1835
1836
|
|
|
1837
|
+
/* "Alle" keeps its 18px all-inclusive icon, 8px before the label, as the
|
|
1838
|
+
board draws it (DqAfdelingen "∞ Alle"); the folder rows draw no icon.
|
|
1839
|
+
@spec openspec/changes/board-folder-pane-rows/specs/board-folder-pane-rows/spec.md#requirement-a-board-folder-pane-draws-the-boards-folder-rows */
|
|
1840
|
+
.cn-look-board .cn-index-page__folder-pane .cn-folder-sidebar__all {
|
|
1841
|
+
display: flex;
|
|
1842
|
+
align-items: center;
|
|
1843
|
+
gap: 8px;
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
.cn-look-board .cn-index-page__folder-pane .cn-folder-sidebar__all > :not(.cn-folder-sidebar__all-label) {
|
|
1847
|
+
display: inline-flex;
|
|
1848
|
+
flex: none;
|
|
1849
|
+
width: 18px;
|
|
1850
|
+
height: 18px;
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1836
1853
|
.cn-look-board .cn-index-page__folder-pane .cn-folder-tree__item--active,
|
|
1837
1854
|
.cn-look-board .cn-index-page__folder-pane .cn-folder-sidebar__all--active {
|
|
1838
1855
|
--nldesign-component-button-font-weight: 700;
|
package/src/css/look-board.css
CHANGED
|
@@ -3595,6 +3595,26 @@ html :where(.cn-look-board) :is(h2, h3, h5, h6):where(.cn-inner-heading) {
|
|
|
3595
3595
|
background: var(--color-background-hover);
|
|
3596
3596
|
}
|
|
3597
3597
|
|
|
3598
|
+
/* The base-map switch in the top left is the same 36px edged square, 12px
|
|
3599
|
+
in, around an 18px layers icon in the main ink (Leaflet's own is a 44px
|
|
3600
|
+
grey-edged square with a bitmap icon).
|
|
3601
|
+
@spec openspec/changes/board-map-layers-button/specs/board-map-layers-button/spec.md#requirement-the-base-map-switch-is-a-named-board-button */
|
|
3602
|
+
.cn-look-board .cn-map-widget .leaflet-control-layers:not(.cn-look-nextcloud *) {
|
|
3603
|
+
margin: 12px 0 0 12px;
|
|
3604
|
+
border: 1px solid var(--cn-board-control-border);
|
|
3605
|
+
border-radius: var(--cn-board-control-radius);
|
|
3606
|
+
box-shadow: none;
|
|
3607
|
+
background: var(--color-main-background);
|
|
3608
|
+
}
|
|
3609
|
+
|
|
3610
|
+
.cn-look-board .cn-map-widget .leaflet-control-layers .leaflet-control-layers-toggle:not(.cn-look-nextcloud *) {
|
|
3611
|
+
width: 34px;
|
|
3612
|
+
height: 34px;
|
|
3613
|
+
background: var(--color-main-text);
|
|
3614
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12,16L19.36,10.27L21,9L12,2L3,9L4.63,10.27M12,18.54L4.62,12.81L3,14.07L12,21.07L21,14.07L19.37,12.8L12,18.54Z'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
|
|
3615
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12,16L19.36,10.27L21,9L12,2L3,9L4.63,10.27M12,18.54L4.62,12.81L3,14.07L12,21.07L21,14.07L19.37,12.8L12,18.54Z'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
|
|
3616
|
+
}
|
|
3617
|
+
|
|
3598
3618
|
/* The manage timeline's lines as DqZaakHistorie draws them: the subtitle and
|
|
3599
3619
|
the event count 14px muted (over a theme's paragraph tokens, which set a
|
|
3600
3620
|
paragraph 15px ink), the count line under a hairline, and the note form
|
|
@@ -5,6 +5,7 @@ import { translate as t } from '@nextcloud/l10n'
|
|
|
5
5
|
import { boardDateLocale, formatAgo, formatBoardDate, formatBoardWeekday, formatRelativeDate, formatTimeOfDay, isoWeek } from './boardDate.js'
|
|
6
6
|
import { parseDateValue } from './dateVariant.js'
|
|
7
7
|
import { formatMoney } from './formatMetric.js'
|
|
8
|
+
import { groupDisplayName, loadGroupDisplayName } from './groupAutocomplete.js'
|
|
8
9
|
import { readPath } from './readPath.js'
|
|
9
10
|
import { userDisplayName } from './userDisplayName.js'
|
|
10
11
|
|
|
@@ -80,7 +81,7 @@ function countEntries(list, key) {
|
|
|
80
81
|
* Format one token value.
|
|
81
82
|
*
|
|
82
83
|
* @param {unknown} value The raw value.
|
|
83
|
-
* @param {string} format `date`, `datetime`, `weekday`, `longdate`, `time`, `user`, `currency`, `relative`, `relativetime`, `ago`, `week`, `days`, `lower`, `mailbox` or '' (as is).
|
|
84
|
+
* @param {string} format `date`, `datetime`, `weekday`, `longdate`, `time`, `user`, `group`, `currency`, `relative`, `relativetime`, `ago`, `week`, `days`, `lower`, `mailbox` or '' (as is).
|
|
84
85
|
* @param {Date} now The reference moment.
|
|
85
86
|
* @param {string} [arg] The format's argument (`currency:EUR`, or a row path holding the code).
|
|
86
87
|
* @param {object|null} [object] The row, for a currency read from a field.
|
|
@@ -121,6 +122,14 @@ function formatValue(value, format, now, arg = '', object = null, config = null,
|
|
|
121
122
|
if (format === 'user') {
|
|
122
123
|
return userDisplayName(value)
|
|
123
124
|
}
|
|
125
|
+
if (format === 'group') {
|
|
126
|
+
const name = groupDisplayName(value)
|
|
127
|
+
if (name === null) {
|
|
128
|
+
loadGroupDisplayName(value)
|
|
129
|
+
return ''
|
|
130
|
+
}
|
|
131
|
+
return name
|
|
132
|
+
}
|
|
124
133
|
if (format === 'time') {
|
|
125
134
|
const date = parseDateValue(value)
|
|
126
135
|
return date === null ? '' : formatTimeOfDay(date)
|
|
@@ -168,7 +177,8 @@ function formatValue(value, format, now, arg = '', object = null, config = null,
|
|
|
168
177
|
* for today), `{path|longdate}` writes the month out ("7 oktober";
|
|
169
178
|
* `{path|longdate:year}` always adds the year), `{path|time}` is the time
|
|
170
179
|
* of day ("08:45"), `{path|user}` is a user id's display name (looked up
|
|
171
|
-
* once, '' until it arrives), `{path|
|
|
180
|
+
* once, '' until it arrives), `{path|group}` is a group id's display name
|
|
181
|
+
* (the same, through the group name cache), `{path|currency}`,
|
|
172
182
|
* `{path|currency:EUR}` and `{path|currency:field}` write an amount in a
|
|
173
183
|
* currency (a code, or the row field that holds it; without either, or when
|
|
174
184
|
* the row field is empty, the app's reporting currency), `{path|relative}` and
|