@conduction/nextcloud-vue 2.155.0 → 2.156.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/CnAiCompanion/CnAiInput.vue2.js +3 -1
- package/dist/esm/components/CnAiCompanion/CnAiInput.vue2.js.map +1 -1
- package/dist/esm/components/CnAiCompanion/CnAiInput.vue3.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue2.js +13 -4
- package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue3.js.map +1 -1
- package/dist/esm/components/CnLinkedWidget/CnLinkedWidget.vue.js +1 -1
- package/dist/esm/components/CnLinkedWidget/CnLinkedWidget.vue2.js +91 -7
- package/dist/esm/components/CnLinkedWidget/CnLinkedWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnLinkedWidget/CnLinkedWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnSchemaFormDialog/CnSchemaConfigurationTab.vue2.js +25 -0
- package/dist/esm/components/CnSchemaFormDialog/CnSchemaConfigurationTab.vue2.js.map +1 -1
- package/dist/esm/components/CnSchemaFormDialog/CnSchemaConfigurationTab.vue3.js +40 -8
- package/dist/esm/components/CnSchemaFormDialog/CnSchemaConfigurationTab.vue3.js.map +1 -1
- package/dist/esm/components/CnSchemaFormDialog/CnSchemaFormDialog.vue2.js +10 -0
- package/dist/esm/components/CnSchemaFormDialog/CnSchemaFormDialog.vue2.js.map +1 -1
- package/dist/esm/components/CnSchemaFormDialog/CnSchemaFormDialog.vue3.js.map +1 -1
- package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue.js +1 -1
- package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue2.js +24 -1
- package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue2.js.map +1 -1
- package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue3.js +9 -0
- package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue3.js.map +1 -1
- package/dist/esm/l10n/en.json.js +12 -7
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +14 -9
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +110 -94
- package/dist/nextcloud-vue.cjs.js +1643 -1442
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +110 -94
- package/l10n/en.json +12 -7
- package/l10n/nl.json +14 -9
- package/package.json +1 -1
- package/src/components/CnAiCompanion/CnAiInput.vue +3 -1
- package/src/components/CnDashboardPage/CnDashboardPage.vue +3 -1
- package/src/components/CnIndexSidebar/CnIndexSidebar.vue +13 -4
- package/src/components/CnLinkedWidget/CnLinkedWidget.vue +91 -7
- package/src/components/CnSchemaFormDialog/CnSchemaConfigurationTab.vue +42 -0
- package/src/components/CnSchemaFormDialog/CnSchemaFormDialog.vue +10 -0
- package/src/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue +37 -1
- package/src/css/look-board.css +11 -0
package/l10n/nl.json
CHANGED
|
@@ -576,7 +576,6 @@
|
|
|
576
576
|
"No widgets configured": "Geen widgets geconfigureerd",
|
|
577
577
|
"Not configured": "Niet geconfigureerd",
|
|
578
578
|
"Not set": "Niet ingesteld",
|
|
579
|
-
"Not done yet": "Nog niet klaar",
|
|
580
579
|
"Not run": "Niet uitgevoerd",
|
|
581
580
|
"Load": "Laden",
|
|
582
581
|
"Load again": "Opnieuw laden",
|
|
@@ -629,6 +628,11 @@
|
|
|
629
628
|
"Object image field": "Objectafbeeldingsveld",
|
|
630
629
|
"Object name field": "Objectnaamveld",
|
|
631
630
|
"Object summary field": "Objectsamenvattingsveld",
|
|
631
|
+
"Object slug field": "Objectslugveld",
|
|
632
|
+
"Select a property to build object slugs from": "Selecteer een eigenschap waaruit objectslugs worden opgebouwd",
|
|
633
|
+
"Schema name + object name": "Schemanaam + objectnaam",
|
|
634
|
+
"Append a date-time suffix when a slug is already taken": "Een datum-tijd-achtervoegsel toevoegen als een slug al in gebruik is",
|
|
635
|
+
"A slug is unique within the register and schema and does not change once it is set, also not after the slug field is switched. Objects without a slug get one from the new field on their next save or with occ openregister:backfill-slugs <register> <schema>.": "Een slug is uniek binnen het register en schema en verandert niet meer zodra hij is gezet, ook niet na het wisselen van het slugveld. Objecten zonder slug krijgen er een uit het nieuwe veld bij hun volgende opslag of met occ openregister:backfill-slugs <register> <schema>.",
|
|
632
636
|
"Objects": "Objecten",
|
|
633
637
|
"objects": "objecten",
|
|
634
638
|
"oneOf - Exactly one schema must match": "oneOf - Precies één schema moet overeenkomen",
|
|
@@ -1919,12 +1923,6 @@
|
|
|
1919
1923
|
"Made {date}": "Gemaakt {date}",
|
|
1920
1924
|
"expires {date}": "verloopt {date}",
|
|
1921
1925
|
"Reorder {item}: drag, or press the up and down arrow keys": "{item} verplaatsen: slepen, of de pijltoetsen omhoog en omlaag",
|
|
1922
|
-
"Board {name}": "Bord {name}",
|
|
1923
|
-
"list {name}": "lijst {name}",
|
|
1924
|
-
"Tentative": "Voorlopig",
|
|
1925
|
-
"Confirmed": "Bevestigd",
|
|
1926
|
-
"Cancelled": "Geannuleerd",
|
|
1927
|
-
"{start} until {end}": "{start} tot {end}",
|
|
1928
1926
|
"No contacts linked": "Geen contacten gekoppeld",
|
|
1929
1927
|
"No relations yet": "Nog geen relaties",
|
|
1930
1928
|
"Period": "Periode",
|
|
@@ -1946,8 +1944,6 @@
|
|
|
1946
1944
|
"Absent today": "Vandaag afwezig",
|
|
1947
1945
|
"{message} until {time}": "{message} tot {time}",
|
|
1948
1946
|
"Away": "Afwezig",
|
|
1949
|
-
"Present": "Aanwezig",
|
|
1950
|
-
"Absent until {date}": "Afwezig tot {date}",
|
|
1951
1947
|
"Busy": "Bezet",
|
|
1952
1948
|
"No one in the team": "Niemand in het team",
|
|
1953
1949
|
"Also replace the criteria with the current filters": "Vervang ook de criteria door de huidige filters",
|
|
@@ -2492,6 +2488,7 @@
|
|
|
2492
2488
|
"Due by": "Uiterlijk op",
|
|
2493
2489
|
"Incoming": "Inkomend",
|
|
2494
2490
|
"Outgoing": "Uitgaand",
|
|
2491
|
+
"Not done yet": "Nog niet klaar",
|
|
2495
2492
|
"{from} through {to}": "{from} tot en met {to}",
|
|
2496
2493
|
"from {from}": "vanaf {from}",
|
|
2497
2494
|
"up to {to}": "tot en met {to}",
|
|
@@ -2592,6 +2589,14 @@
|
|
|
2592
2589
|
"More default views": "Meer standaardweergaven",
|
|
2593
2590
|
"Fewer default views": "Minder standaardweergaven",
|
|
2594
2591
|
"More steps": "Meer stappen",
|
|
2592
|
+
"Board {name}": "Bord {name}",
|
|
2593
|
+
"list {name}": "lijst {name}",
|
|
2594
|
+
"Tentative": "Voorlopig",
|
|
2595
|
+
"Confirmed": "Bevestigd",
|
|
2596
|
+
"Cancelled": "Geannuleerd",
|
|
2597
|
+
"{start} until {end}": "{start} tot {end}",
|
|
2598
|
+
"Present": "Aanwezig",
|
|
2599
|
+
"Absent until {date}": "Afwezig tot {date}",
|
|
2595
2600
|
"More views": "Meer weergaven",
|
|
2596
2601
|
"{type} from {app}": "{type} van {app}",
|
|
2597
2602
|
"Start step": "Start",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@conduction/nextcloud-vue",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.156.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": {
|
|
@@ -228,7 +228,6 @@
|
|
|
228
228
|
|
|
229
229
|
<script>
|
|
230
230
|
import axios from '@nextcloud/axios'
|
|
231
|
-
import { FilePickerType, getFilePickerBuilder } from '@nextcloud/dialogs'
|
|
232
231
|
import { NcActionButton, NcActions, NcLoadingIcon, NcNoteCard } from '@nextcloud/vue'
|
|
233
232
|
import Close from 'vue-material-design-icons/Close.vue'
|
|
234
233
|
import FolderOutline from 'vue-material-design-icons/FolderOutline.vue'
|
|
@@ -1081,6 +1080,9 @@ export default {
|
|
|
1081
1080
|
}
|
|
1082
1081
|
this.uploadError = ''
|
|
1083
1082
|
try {
|
|
1083
|
+
// Loaded when someone picks from Files: the dialogs package is a large
|
|
1084
|
+
// share of the chat panel, which hosts load on every page.
|
|
1085
|
+
const { FilePickerType, getFilePickerBuilder } = await import('@nextcloud/dialogs')
|
|
1084
1086
|
const picker = getFilePickerBuilder(this.cnTranslate('Choose from Files'))
|
|
1085
1087
|
.setMultiSelect(true)
|
|
1086
1088
|
.setType(FilePickerType.Choose)
|
|
@@ -5485,13 +5485,15 @@ export default {
|
|
|
5485
5485
|
}
|
|
5486
5486
|
|
|
5487
5487
|
/* A header with a breadcrumb trail ends 8px under it, as the boards pad
|
|
5488
|
-
their header (DqCatalogus: 167)
|
|
5488
|
+
their header (DqCatalogus: 167), and the trail row sits at normal leading
|
|
5489
|
+
(DqDagAfsluiten: 75, live 79 at 1.5). */
|
|
5489
5490
|
.cn-dashboard-page--board .cn-dashboard-page__header:has(.cn-header-trail) {
|
|
5490
5491
|
padding-bottom: 8px;
|
|
5491
5492
|
}
|
|
5492
5493
|
|
|
5493
5494
|
.cn-dashboard-page--board .cn-dashboard-page__header :deep(.cn-header-trail) {
|
|
5494
5495
|
margin-bottom: 0;
|
|
5496
|
+
line-height: normal;
|
|
5495
5497
|
}
|
|
5496
5498
|
|
|
5497
5499
|
.cn-dashboard-page__kpi-cell {
|
|
@@ -1451,19 +1451,24 @@ export default {
|
|
|
1451
1451
|
/**
|
|
1452
1452
|
* A field's values as checkbox rows, in the board look and for a short
|
|
1453
1453
|
* list only: label and count apart, from the facet when there is one,
|
|
1454
|
-
* else the field's own options.
|
|
1455
|
-
*
|
|
1456
|
-
*
|
|
1454
|
+
* else the field's own options. A single choice is a list too (a row
|
|
1455
|
+
* replaces the other); a reference only from its facet, whose buckets
|
|
1456
|
+
* carry the labels. Null where the picker stays (the Nextcloud look, a
|
|
1457
|
+
* reference without a facet, more than CHECKLIST_MAX values).
|
|
1457
1458
|
*
|
|
1458
1459
|
* @spec openspec/changes/board-sidebar-filters-as-checkbox-lists/specs/index-sidebar/spec.md#requirement-the-board-look-draws-a-short-filter-as-a-checkbox-list-with-counts
|
|
1459
1460
|
* @param {object} filter The filter definition.
|
|
1460
1461
|
* @return {Array<{id: (string|number|boolean), label: string, count: (number|null)}>|null} The rows, or null.
|
|
1461
1462
|
*/
|
|
1462
1463
|
checklistOptions(filter) {
|
|
1463
|
-
if (!this.isBoardLook
|
|
1464
|
+
if (!this.isBoardLook) {
|
|
1464
1465
|
return null
|
|
1465
1466
|
}
|
|
1466
1467
|
const facet = this.facetData[filter.key]
|
|
1468
|
+
const hasBuckets = Boolean(facet && Array.isArray(facet.values) && facet.values.length > 0)
|
|
1469
|
+
if (filter.type === 'reference' && !hasBuckets) {
|
|
1470
|
+
return null
|
|
1471
|
+
}
|
|
1467
1472
|
let rows
|
|
1468
1473
|
if (facet && Array.isArray(facet.values) && facet.values.length > 0) {
|
|
1469
1474
|
rows = facet.values.map((bucket) => ({
|
|
@@ -1506,6 +1511,10 @@ export default {
|
|
|
1506
1511
|
const value = this.activeFilters[filter.key]
|
|
1507
1512
|
const current = Array.isArray(value) ? [...value] : (value === undefined || value === null || value === '' ? [] : [value])
|
|
1508
1513
|
const rest = current.filter((v) => String(v) !== String(id))
|
|
1514
|
+
if (filter.multiple === false) {
|
|
1515
|
+
this.$emit('filter-change', { key: filter.key, values: checked ? [id] : [] })
|
|
1516
|
+
return
|
|
1517
|
+
}
|
|
1509
1518
|
this.$emit('filter-change', { key: filter.key, values: checked ? [...rest, id] : rest })
|
|
1510
1519
|
},
|
|
1511
1520
|
|
|
@@ -74,6 +74,10 @@ import { getLanguage, translate as t } from '@nextcloud/l10n'
|
|
|
74
74
|
import CnIcon from '../CnIcon/CnIcon.vue'
|
|
75
75
|
import CnLeafMountHost from '../CnLeafMountHost/CnLeafMountHost.vue'
|
|
76
76
|
import { useIntegrationRegistry } from '../../composables/useIntegrationRegistry.js'
|
|
77
|
+
import { isAppInstalled } from '../../utils/appInstalled.js'
|
|
78
|
+
import { fetchReferenceObjects } from '../../utils/boardReferenceColumns.js'
|
|
79
|
+
import { fillTemplate } from '../../utils/fillTemplate.js'
|
|
80
|
+
import { prefixUrl } from '../../utils/headers.js'
|
|
77
81
|
|
|
78
82
|
/**
|
|
79
83
|
* Join nouns as a sentence list in the user's language ("a, b en c").
|
|
@@ -100,6 +104,14 @@ function joinList(items) {
|
|
|
100
104
|
* one line ("Leges, contract en projecten: niets gekoppeld") followed by their
|
|
101
105
|
* actions. A leaf whose app is absent is not registered and is left out.
|
|
102
106
|
*
|
|
107
|
+
* A leaf may also be a record leaf, written in the manifest instead of
|
|
108
|
+
* registered by an app: `{ id, register, schema, filter?, requiredApp?, noun,
|
|
109
|
+
* label, href?, icon? }`. The card reads that register's records matching
|
|
110
|
+
* `filter` (`@objectId` is this record's id) and lists one row per record,
|
|
111
|
+
* `label` and `href` filled from it (DqZaak "Vraag in pipelinq": the
|
|
112
|
+
* requests whose case reference is this case). It is left out when
|
|
113
|
+
* `requiredApp` is not installed. Texts go through the host translate.
|
|
114
|
+
*
|
|
103
115
|
* @spec openspec/changes/linked-integrations-card/specs/linked-integrations-card/spec.md#requirement-one-card-lists-the-linked-integrations-of-a-record
|
|
104
116
|
*/
|
|
105
117
|
export default {
|
|
@@ -107,8 +119,13 @@ export default {
|
|
|
107
119
|
|
|
108
120
|
components: { CnIcon, CnLeafMountHost },
|
|
109
121
|
|
|
122
|
+
inject: {
|
|
123
|
+
/** The host app's translate (CnAppRoot `cnTranslate`). */
|
|
124
|
+
cnTranslate: { default: () => (key) => key },
|
|
125
|
+
},
|
|
126
|
+
|
|
110
127
|
props: {
|
|
111
|
-
/** `{ leaves: string
|
|
128
|
+
/** `{ leaves: Array<string|object> }`: integration ids or record leaves, in the order to list them. */
|
|
112
129
|
content: {
|
|
113
130
|
type: Object,
|
|
114
131
|
default: () => ({}),
|
|
@@ -146,10 +163,30 @@ export default {
|
|
|
146
163
|
},
|
|
147
164
|
|
|
148
165
|
computed: {
|
|
149
|
-
/** @return {string
|
|
150
|
-
|
|
166
|
+
/** @return {Array<string|object>} The configured leaves. */
|
|
167
|
+
leaves() {
|
|
151
168
|
const leaves = this.content && this.content.leaves
|
|
152
|
-
return Array.isArray(leaves) ? leaves
|
|
169
|
+
return Array.isArray(leaves) ? leaves : []
|
|
170
|
+
},
|
|
171
|
+
|
|
172
|
+
/** @return {string[]} The configured integration ids. */
|
|
173
|
+
leafIds() {
|
|
174
|
+
return this.leaves.filter((id) => typeof id === 'string' && id !== '')
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
/** @return {object[]} The record leaves whose app is here. */
|
|
178
|
+
recordLeaves() {
|
|
179
|
+
return this.leaves.filter((leaf) => leaf && typeof leaf === 'object' && typeof leaf.id === 'string' && leaf.id !== ''
|
|
180
|
+
&& leaf.register && leaf.schema && (!leaf.requiredApp || isAppInstalled(leaf.requiredApp)))
|
|
181
|
+
},
|
|
182
|
+
|
|
183
|
+
/** @return {string[]} Every listed leaf's id, in the configured order. */
|
|
184
|
+
orderedIds() {
|
|
185
|
+
const providers = new Set(this.providers.map((p) => p.id))
|
|
186
|
+
const records = new Set(this.recordLeaves.map((leaf) => leaf.id))
|
|
187
|
+
return this.leaves
|
|
188
|
+
.map((leaf) => (typeof leaf === 'string' ? leaf : (leaf && leaf.id)))
|
|
189
|
+
.filter((id) => providers.has(id) || records.has(id))
|
|
153
190
|
},
|
|
154
191
|
|
|
155
192
|
/** @return {object[]} The registered mount-mode providers, in the configured order. */
|
|
@@ -178,9 +215,9 @@ export default {
|
|
|
178
215
|
|
|
179
216
|
/** @return {Array<{id: string, summary: object}>} The reported summaries, in order. */
|
|
180
217
|
reported() {
|
|
181
|
-
return this.
|
|
182
|
-
.filter((
|
|
183
|
-
.map((
|
|
218
|
+
return this.orderedIds
|
|
219
|
+
.filter((id) => this.summaries[id])
|
|
220
|
+
.map((id) => ({ id, summary: this.summaries[id] }))
|
|
184
221
|
},
|
|
185
222
|
|
|
186
223
|
/** @return {object[]} The rows of the leaves that have something linked. */
|
|
@@ -223,7 +260,54 @@ export default {
|
|
|
223
260
|
},
|
|
224
261
|
},
|
|
225
262
|
|
|
263
|
+
watch: {
|
|
264
|
+
recordLeaves: {
|
|
265
|
+
handler() {
|
|
266
|
+
this.recordLeaves.forEach((leaf) => this.readRecordLeaf(leaf))
|
|
267
|
+
},
|
|
268
|
+
|
|
269
|
+
immediate: true,
|
|
270
|
+
},
|
|
271
|
+
|
|
272
|
+
objectId() {
|
|
273
|
+
this.recordLeaves.forEach((leaf) => this.readRecordLeaf(leaf))
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
|
|
226
277
|
methods: {
|
|
278
|
+
/**
|
|
279
|
+
* Read a record leaf's records and report them as its summary. A
|
|
280
|
+
* failed read reports nothing, so the leaf is not listed as empty.
|
|
281
|
+
*
|
|
282
|
+
* @param {object} leaf The record leaf.
|
|
283
|
+
* @return {Promise<void>}
|
|
284
|
+
*/
|
|
285
|
+
async readRecordLeaf(leaf) {
|
|
286
|
+
const objectId = String(this.objectId || '')
|
|
287
|
+
if (objectId === '') {
|
|
288
|
+
return
|
|
289
|
+
}
|
|
290
|
+
const filter = {}
|
|
291
|
+
for (const [key, value] of Object.entries(leaf.filter || {})) {
|
|
292
|
+
filter[key] = value === '@objectId' ? objectId : value
|
|
293
|
+
}
|
|
294
|
+
let rows
|
|
295
|
+
try {
|
|
296
|
+
rows = await fetchReferenceObjects({ register: leaf.register, schema: leaf.schema, filter, limit: leaf.limit || 20 })
|
|
297
|
+
} catch {
|
|
298
|
+
return
|
|
299
|
+
}
|
|
300
|
+
const label = leaf.label ? this.cnTranslate(leaf.label) : ''
|
|
301
|
+
this.onSummary(leaf.id, {
|
|
302
|
+
count: rows.length,
|
|
303
|
+
noun: leaf.noun ? this.cnTranslate(leaf.noun) : '',
|
|
304
|
+
rows: rows.map((row) => {
|
|
305
|
+
const href = leaf.href ? fillTemplate(leaf.href, row) : ''
|
|
306
|
+
return { label: fillTemplate(label, row), href: href ? prefixUrl(href) : undefined, icon: leaf.icon || undefined }
|
|
307
|
+
}),
|
|
308
|
+
})
|
|
309
|
+
},
|
|
310
|
+
|
|
227
311
|
/**
|
|
228
312
|
* Keep a leaf's summary, normalised.
|
|
229
313
|
*
|
|
@@ -123,6 +123,23 @@
|
|
|
123
123
|
:clearable="true"
|
|
124
124
|
:inputLabel="t('nextcloud-vue', 'Object summary field')"
|
|
125
125
|
:placeholder="t('nextcloud-vue', 'Select a property to use as object summary. e.g. summary, abstract, or excerpt')" />
|
|
126
|
+
<NcSelect
|
|
127
|
+
v-model="schema.configuration.objectSlugField"
|
|
128
|
+
:disabled="loading"
|
|
129
|
+
:options="slugFieldOptions"
|
|
130
|
+
:reduce="option => option.id"
|
|
131
|
+
label="label"
|
|
132
|
+
:clearable="true"
|
|
133
|
+
:inputLabel="t('nextcloud-vue', 'Object slug field')"
|
|
134
|
+
:placeholder="t('nextcloud-vue', 'Select a property to build object slugs from')" />
|
|
135
|
+
<NcCheckboxRadioSwitch
|
|
136
|
+
v-model="schema.configuration.objectSlugSuffix"
|
|
137
|
+
:disabled="loading || !schema.configuration.objectSlugField">
|
|
138
|
+
{{ t('nextcloud-vue', 'Append a date-time suffix when a slug is already taken') }}
|
|
139
|
+
</NcCheckboxRadioSwitch>
|
|
140
|
+
<NcNoteCard v-if="schema.configuration.objectSlugField" type="info">
|
|
141
|
+
<p>{{ t('nextcloud-vue', 'A slug is unique within the register and schema and does not change once it is set, also not after the slug field is switched. Objects without a slug get one from the new field on their next save or with occ openregister:backfill-slugs <register> <schema>.') }}</p>
|
|
142
|
+
</NcNoteCard>
|
|
126
143
|
<NcCheckboxRadioSwitch
|
|
127
144
|
v-model="schema.configuration.allowFiles"
|
|
128
145
|
:disabled="loading">
|
|
@@ -217,6 +234,21 @@ export default {
|
|
|
217
234
|
},
|
|
218
235
|
|
|
219
236
|
computed: {
|
|
237
|
+
/**
|
|
238
|
+
* The choices for the object slug field: every schema property, and first the
|
|
239
|
+
* reserved source `@schema.name` that OpenRegister turns into
|
|
240
|
+
* `<schema slug>-<object name>` (the second choice Robert Zondervan asked for
|
|
241
|
+
* next to a property, 2026-10-26). Stored as the id, shown by its label.
|
|
242
|
+
*
|
|
243
|
+
* @return {Array<{id: string, label: string}>}
|
|
244
|
+
*/
|
|
245
|
+
slugFieldOptions() {
|
|
246
|
+
return [
|
|
247
|
+
{ id: '@schema.name', label: t('nextcloud-vue', 'Schema name + object name') },
|
|
248
|
+
...this.propertyOptions.map((property) => ({ id: property, label: property })),
|
|
249
|
+
]
|
|
250
|
+
},
|
|
251
|
+
|
|
220
252
|
/** Local alias to avoid vue/no-mutating-props on template bindings */
|
|
221
253
|
schema() {
|
|
222
254
|
return this.schemaItem
|
|
@@ -224,6 +256,16 @@ export default {
|
|
|
224
256
|
},
|
|
225
257
|
|
|
226
258
|
watch: {
|
|
259
|
+
// The suffix only applies together with a slug field; drop it when the
|
|
260
|
+
// field is cleared so it cannot silently re-activate on a later pick.
|
|
261
|
+
'schema.configuration.objectSlugField': {
|
|
262
|
+
handler(value) {
|
|
263
|
+
if (!value && this.schema.configuration.objectSlugSuffix) {
|
|
264
|
+
this.schema.configuration.objectSlugSuffix = false
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
|
|
227
269
|
'schema.configuration.allowedTags': {
|
|
228
270
|
immediate: true,
|
|
229
271
|
handler(tags) {
|
|
@@ -342,6 +342,8 @@ export default {
|
|
|
342
342
|
objectDescriptionField: '',
|
|
343
343
|
objectImageField: '',
|
|
344
344
|
objectSummaryField: '',
|
|
345
|
+
objectSlugField: '',
|
|
346
|
+
objectSlugSuffix: false,
|
|
345
347
|
allowFiles: false,
|
|
346
348
|
allowedTags: [],
|
|
347
349
|
autoPublish: false,
|
|
@@ -606,6 +608,8 @@ export default {
|
|
|
606
608
|
objectDescriptionField: '',
|
|
607
609
|
objectImageField: '',
|
|
608
610
|
objectSummaryField: '',
|
|
611
|
+
objectSlugField: '',
|
|
612
|
+
objectSlugSuffix: false,
|
|
609
613
|
allowFiles: false,
|
|
610
614
|
allowedTags: [],
|
|
611
615
|
autoPublish: false,
|
|
@@ -640,6 +644,12 @@ export default {
|
|
|
640
644
|
if (!this.schemaItem.configuration.objectSummaryField) {
|
|
641
645
|
this.schemaItem.configuration.objectSummaryField = ''
|
|
642
646
|
}
|
|
647
|
+
if (!this.schemaItem.configuration.objectSlugField) {
|
|
648
|
+
this.schemaItem.configuration.objectSlugField = ''
|
|
649
|
+
}
|
|
650
|
+
if (this.schemaItem.configuration.objectSlugSuffix === undefined) {
|
|
651
|
+
this.schemaItem.configuration.objectSlugSuffix = false
|
|
652
|
+
}
|
|
643
653
|
if (this.schemaItem.configuration.allowFiles === undefined) {
|
|
644
654
|
this.schemaItem.configuration.allowFiles = false
|
|
645
655
|
}
|
|
@@ -121,6 +121,15 @@
|
|
|
121
121
|
<span v-if="dirty" class="cn-settings-fields__dirty" data-testid="cn-settings-fields-dirty">
|
|
122
122
|
{{ t('nextcloud-vue', 'Unsaved changes') }}
|
|
123
123
|
</span>
|
|
124
|
+
<!-- An action field with `placement: 'save'` stands beside Save
|
|
125
|
+
(DqBeheerGeavanceerd "Willekeurig geheim genereren"). -->
|
|
126
|
+
<CnSettingsField
|
|
127
|
+
v-for="field in saveRowFields"
|
|
128
|
+
:key="field.key"
|
|
129
|
+
class="cn-settings-fields__save-action"
|
|
130
|
+
:field="field"
|
|
131
|
+
:modelValue="form[field.key]"
|
|
132
|
+
@action="runAction(field)" />
|
|
124
133
|
<NcButton
|
|
125
134
|
:variant="saveVariant"
|
|
126
135
|
type="submit"
|
|
@@ -740,7 +749,17 @@ export default {
|
|
|
740
749
|
* @return {Array<object>}
|
|
741
750
|
*/
|
|
742
751
|
mainFields() {
|
|
743
|
-
return this.visibleFields.filter((field) => field.advanced !== true)
|
|
752
|
+
return this.visibleFields.filter((field) => field.advanced !== true && !this.inSaveRow(field))
|
|
753
|
+
},
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* The visible action fields drawn in the save row, beside Save.
|
|
757
|
+
*
|
|
758
|
+
* @return {Array<object>}
|
|
759
|
+
* @spec openspec/changes/settings-action-in-save-row/specs/settings-action-in-save-row/spec.md#requirement-an-action-field-can-stand-beside-save
|
|
760
|
+
*/
|
|
761
|
+
saveRowFields() {
|
|
762
|
+
return this.visibleFields.filter((field) => field.advanced !== true && this.inSaveRow(field))
|
|
744
763
|
},
|
|
745
764
|
|
|
746
765
|
/**
|
|
@@ -870,6 +889,19 @@ export default {
|
|
|
870
889
|
return Object.hasOwn(this.form, key) ? this.form[key] : literalFirst(this.values, key)
|
|
871
890
|
},
|
|
872
891
|
|
|
892
|
+
/**
|
|
893
|
+
* Whether an action field stands in the save row: it asks for
|
|
894
|
+
* `placement: 'save'` and the form draws a save row at all.
|
|
895
|
+
*
|
|
896
|
+
* @param {object} field The field.
|
|
897
|
+
* @return {boolean}
|
|
898
|
+
* @spec openspec/changes/settings-action-in-save-row/specs/settings-action-in-save-row/spec.md#requirement-an-action-field-can-stand-beside-save
|
|
899
|
+
*/
|
|
900
|
+
inSaveRow(field) {
|
|
901
|
+
return field.type === 'action' && field.placement === 'save'
|
|
902
|
+
&& !this.autoSave && this.hasInputs && !this.inlineSave
|
|
903
|
+
},
|
|
904
|
+
|
|
873
905
|
/**
|
|
874
906
|
* Whether a field's `visibleWhen` holds; a field without one is always shown.
|
|
875
907
|
*
|
|
@@ -1566,6 +1598,10 @@ export default {
|
|
|
1566
1598
|
gap: 12px;
|
|
1567
1599
|
}
|
|
1568
1600
|
|
|
1601
|
+
.cn-settings-fields__save-action {
|
|
1602
|
+
flex: none;
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1569
1605
|
.cn-settings-fields__dirty {
|
|
1570
1606
|
font-size: 14px;
|
|
1571
1607
|
color: var(--color-text-maxcontrast);
|
package/src/css/look-board.css
CHANGED
|
@@ -366,6 +366,17 @@
|
|
|
366
366
|
text-transform: none;
|
|
367
367
|
}
|
|
368
368
|
|
|
369
|
+
/* A dashboard banner's reason line is 15px at the font's normal line height
|
|
370
|
+
(DqMijnWerk "2026-4837 · Woo-verzoek · de termijn loopt vandaag af"; live
|
|
371
|
+
14px at 1.5). The stacked banner keeps its 14px.
|
|
372
|
+
@spec openspec/changes/board-banner-reason-15/specs/board-banner-reason-15/spec.md#requirement-a-board-dashboard-banners-reason-is-15px-at-normal-leading */
|
|
373
|
+
.cn-look-board .cn-dashboard-page:not(.cn-look-nextcloud *) .cn-banner-widget:not(.cn-banner-widget--stacked) .cn-banner-widget__reason {
|
|
374
|
+
--nldesign-component-paragraph-font-size: 15px;
|
|
375
|
+
--nldesign-component-paragraph-line-height: normal;
|
|
376
|
+
font-size: 15px;
|
|
377
|
+
line-height: normal;
|
|
378
|
+
}
|
|
379
|
+
|
|
369
380
|
/* ---- A workspace filter form (CnWorkspaceFilterWidget) ----------------- */
|
|
370
381
|
/* The boards draw the form's field and its load button 40px tall, the button
|
|
371
382
|
16px in at both sides (DqTermijnen "Jaar" with "Rapport laden"); the form
|