@conduction/nextcloud-vue 2.165.0 → 2.166.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/CnActionButtons/CnActionButtons.vue.js +1 -1
- package/dist/esm/components/CnActionButtons/CnActionButtons.vue2.js +7 -0
- package/dist/esm/components/CnActionButtons/CnActionButtons.vue2.js.map +1 -1
- package/dist/esm/components/CnActionButtons/CnActionButtons.vue3.js.map +1 -1
- package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue.js +1 -1
- package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue2.js +10 -0
- package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue2.js.map +1 -1
- package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue3.js +1 -1
- package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue3.js.map +1 -1
- package/dist/esm/components/CnChipListManager/CnChipListManager.vue.js +1 -1
- package/dist/esm/components/CnChipListManager/CnChipListManager.vue2.js.map +1 -1
- package/dist/esm/components/CnChipListManager/CnChipListManager.vue3.js.map +1 -1
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue.js +1 -1
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue2.js +50 -7
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue3.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js +13 -0
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js +1 -0
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +39 -4
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js +2 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
- package/dist/esm/components/CnExpandableRow/CnExpandableRow.vue.js +1 -1
- package/dist/esm/components/CnExpandableRow/CnExpandableRow.vue2.js.map +1 -1
- package/dist/esm/components/CnExpandableRow/CnExpandableRow.vue3.js.map +1 -1
- package/dist/esm/components/CnFieldGroupsWidget/CnFieldGroupsWidget.vue.js +9 -0
- package/dist/esm/components/CnFieldGroupsWidget/CnFieldGroupsWidget.vue.js.map +1 -0
- package/dist/esm/components/CnFieldGroupsWidget/CnFieldGroupsWidget.vue2.js +232 -0
- package/dist/esm/components/CnFieldGroupsWidget/CnFieldGroupsWidget.vue2.js.map +1 -0
- package/dist/esm/components/CnFieldGroupsWidget/CnFieldGroupsWidget.vue3.js +61 -0
- package/dist/esm/components/CnFieldGroupsWidget/CnFieldGroupsWidget.vue3.js.map +1 -0
- package/dist/esm/components/CnFieldGroupsWidget/index.js +28 -0
- package/dist/esm/components/CnFieldGroupsWidget/index.js.map +1 -0
- package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue.js +1 -1
- package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue2.js +80 -6
- package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue3.js +361 -289
- package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue.js +1 -1
- package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue2.js +9 -0
- package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue2.js.map +1 -1
- package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue3.js +2 -1
- package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue3.js.map +1 -1
- package/dist/esm/components/CnFlowDetail/CnFlowRunSummary.vue.js +1 -1
- package/dist/esm/components/CnFlowDetail/CnFlowRunSummary.vue2.js +21 -0
- package/dist/esm/components/CnFlowDetail/CnFlowRunSummary.vue2.js.map +1 -1
- package/dist/esm/components/CnFlowDetail/CnFlowRunSummary.vue3.js +12 -2
- package/dist/esm/components/CnFlowDetail/CnFlowRunSummary.vue3.js.map +1 -1
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue.js +1 -1
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue2.js +17 -0
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue2.js.map +1 -1
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue3.js +6 -3
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue3.js.map +1 -1
- package/dist/esm/components/CnGraphCanvas/CnGraphCanvas.vue2.js +33 -2
- package/dist/esm/components/CnGraphCanvas/CnGraphCanvas.vue2.js.map +1 -1
- package/dist/esm/components/CnGraphCanvas/CnGraphCanvas.vue3.js +2 -2
- package/dist/esm/components/CnGraphCanvas/CnGraphCanvas.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +83 -8
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +2 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectLinksWidget/CnObjectLinkDialog.vue.js +9 -0
- package/dist/esm/components/CnObjectLinksWidget/CnObjectLinkDialog.vue.js.map +1 -0
- package/dist/esm/components/CnObjectLinksWidget/CnObjectLinkDialog.vue2.js +187 -0
- package/dist/esm/components/CnObjectLinksWidget/CnObjectLinkDialog.vue2.js.map +1 -0
- package/dist/esm/components/CnObjectLinksWidget/CnObjectLinkDialog.vue3.js +106 -0
- package/dist/esm/components/CnObjectLinksWidget/CnObjectLinkDialog.vue3.js.map +1 -0
- package/dist/esm/components/CnObjectLinksWidget/CnObjectLinksWidget.vue.js +9 -0
- package/dist/esm/components/CnObjectLinksWidget/CnObjectLinksWidget.vue.js.map +1 -0
- package/dist/esm/components/CnObjectLinksWidget/CnObjectLinksWidget.vue2.js +421 -0
- package/dist/esm/components/CnObjectLinksWidget/CnObjectLinksWidget.vue2.js.map +1 -0
- package/dist/esm/components/CnObjectLinksWidget/CnObjectLinksWidget.vue3.js +131 -0
- package/dist/esm/components/CnObjectLinksWidget/CnObjectLinksWidget.vue3.js.map +1 -0
- package/dist/esm/components/CnObjectLinksWidget/index.js +29 -0
- package/dist/esm/components/CnObjectLinksWidget/index.js.map +1 -0
- package/dist/esm/components/CnObjectLinksWidget/objectLinks.js +22 -0
- package/dist/esm/components/CnObjectLinksWidget/objectLinks.js.map +1 -0
- package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue.js +1 -1
- package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue2.js +48 -13
- package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue3.js +44 -20
- package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnPagination/CnPagination.vue2.js +26 -0
- package/dist/esm/components/CnPagination/CnPagination.vue2.js.map +1 -1
- package/dist/esm/components/CnPagination/CnPagination.vue3.js +40 -37
- package/dist/esm/components/CnPagination/CnPagination.vue3.js.map +1 -1
- package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js +2 -0
- package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js.map +1 -1
- package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue.js +1 -1
- package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue2.js +4 -0
- package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue2.js.map +1 -1
- package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue3.js.map +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/l10n/en.json.js +18 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +18 -1
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +635 -329
- package/dist/esm/utils/actionsDispatcher.js +9 -5
- package/dist/esm/utils/actionsDispatcher.js.map +1 -1
- package/dist/esm/utils/libraryWidgetKeys.js +2 -0
- package/dist/esm/utils/libraryWidgetKeys.js.map +1 -1
- package/dist/esm/utils/objectParties.js +68 -1
- package/dist/esm/utils/objectParties.js.map +1 -1
- package/dist/esm/utils/overlayInset.js +60 -0
- package/dist/esm/utils/overlayInset.js.map +1 -0
- package/dist/esm/utils/validateManifestV2.compiled.js +2 -2
- package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
- package/dist/esm/utils/widgetDispatch.js +4 -1
- package/dist/esm/utils/widgetDispatch.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +8444 -6584
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +635 -329
- package/l10n/en.json +18 -1
- package/l10n/nl.json +18 -1
- package/package.json +1 -1
- package/src/components/CnActionButtons/CnActionButtons.vue +7 -0
- package/src/components/CnAuditTrailCard/CnAuditTrailCard.vue +11 -1
- package/src/components/CnChipListManager/CnChipListManager.vue +4 -1
- package/src/components/CnDashboardGrid/CnDashboardGrid.vue +50 -7
- package/src/components/CnDataTable/CnDataTable.md +1 -0
- package/src/components/CnDataTable/CnDataTable.vue +14 -0
- package/src/components/CnDetailPage/CnDetailPage.md +1 -0
- package/src/components/CnDetailPage/CnDetailPage.vue +40 -4
- package/src/components/CnExpandableRow/CnExpandableRow.vue +7 -4
- package/src/components/CnFieldGroupsWidget/CnFieldGroupsWidget.vue +287 -0
- package/src/components/CnFieldGroupsWidget/index.js +27 -0
- package/src/components/CnFieldListWidget/CnFieldListWidget.vue +162 -7
- package/src/components/CnFlowDetail/CnFlowDetail.vue +10 -0
- package/src/components/CnFlowDetail/CnFlowRunSummary.vue +26 -1
- package/src/components/CnFlowsPage/CnFlowBoard.vue +90 -4
- package/src/components/CnGraphCanvas/CnGraphCanvas.vue +35 -4
- package/src/components/CnIndexPage/CnIndexPage.md +1 -1
- package/src/components/CnIndexPage/CnIndexPage.vue +83 -7
- package/src/components/CnObjectLinksWidget/CnObjectLinkDialog.vue +267 -0
- package/src/components/CnObjectLinksWidget/CnObjectLinksWidget.vue +532 -0
- package/src/components/CnObjectLinksWidget/index.js +28 -0
- package/src/components/CnObjectLinksWidget/objectLinks.js +19 -0
- package/src/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue +65 -15
- package/src/components/CnPagination/CnPagination.md +1 -0
- package/src/components/CnPagination/CnPagination.vue +27 -1
- package/src/components/CnWidgetGrid/registerDashboardWidgets.js +2 -0
- package/src/components/CnWidgetObjectTable/CnWidgetObjectTable.vue +4 -0
- package/src/components/index.js +2 -0
- package/src/css/dialog.css +25 -3
- package/src/css/index-page.css +22 -8
- package/src/css/look-board-detail.css +41 -0
- package/src/css/look-board-index.css +52 -1
- package/src/css/look-board.css +17 -0
- package/src/index.js +2 -0
- package/src/schemas/app-manifest-v2.schema.json +3 -3
- package/src/utils/actionsDispatcher.js +9 -5
- package/src/utils/libraryWidgetKeys.js +2 -0
- package/src/utils/objectParties.js +67 -0
- package/src/utils/overlayInset.js +57 -0
- package/src/utils/validateManifestV2.compiled.js +2 -2
- package/src/utils/widgetDispatch.js +4 -1
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { translate as t } from '@nextcloud/l10n'
|
|
16
|
+
import { boardDateLocale, formatBoardDate } from './boardDate.js'
|
|
16
17
|
import { readPath } from './readPath.js'
|
|
17
18
|
|
|
18
19
|
/**
|
|
@@ -281,3 +282,69 @@ export function newPartyRecord(create, values) {
|
|
|
281
282
|
export function savedUuid(saved) {
|
|
282
283
|
return String(saved?.['@self']?.id || saved?.uuid || saved?.id || '')
|
|
283
284
|
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* The board row's meta line (DqZaakBetrokkenen "Rollen", design-system #811):
|
|
288
|
+
* the primary mark, the role, the link's note and the extra lines, by middots.
|
|
289
|
+
* A role that follows the primary mark reads in lower case ("Primaire partij ·
|
|
290
|
+
* verzoeker"), unless it is an abbreviation. No kind word: the row's role and
|
|
291
|
+
* note already say what the party is.
|
|
292
|
+
*
|
|
293
|
+
* @param {{primary: string, role: string, note: string, extras: Array<string>}} parts The parts.
|
|
294
|
+
* @return {string} The line.
|
|
295
|
+
* @spec openspec/changes/parties-board-rows-r40/specs/record-widgets/spec.md#requirement-a-board-party-row-reads-as-design-system-811-draws-it
|
|
296
|
+
*/
|
|
297
|
+
export function boardMetaLine({ primary = '', role = '', note = '', extras = [] }) {
|
|
298
|
+
let shownRole = typeof role === 'string' ? role : ''
|
|
299
|
+
const abbreviation = shownRole.length > 1 && shownRole[1] === shownRole[1].toUpperCase() && shownRole[1] !== shownRole[1].toLowerCase()
|
|
300
|
+
if (primary && shownRole !== '' && !abbreviation) {
|
|
301
|
+
shownRole = shownRole[0].toLowerCase() + shownRole.slice(1)
|
|
302
|
+
}
|
|
303
|
+
return [primary, shownRole, note, ...(Array.isArray(extras) ? extras : [])]
|
|
304
|
+
.filter((part) => typeof part === 'string' && part.trim() !== '')
|
|
305
|
+
.join(' · ')
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Whether a party's row says it has no secrecy (`content.secrecy`): its kind
|
|
310
|
+
* is one of `kinds`, its record carries no indicator keyed `indicator`, and,
|
|
311
|
+
* with `primaryOnly`, it is the record's primary party.
|
|
312
|
+
*
|
|
313
|
+
* @param {object} party The listing row (`partyUuid`, `partyKind`).
|
|
314
|
+
* @param {object|undefined} record The party record with its `indicators`.
|
|
315
|
+
* @param {{indicator: string, kinds?: Array<string>, primaryOnly?: boolean}|undefined} secrecy The declaration.
|
|
316
|
+
* @param {string|null} primary The primary party's uuid.
|
|
317
|
+
* @return {boolean}
|
|
318
|
+
* @spec openspec/changes/parties-board-rows-r40/specs/record-widgets/spec.md#requirement-a-party-of-a-listed-kind-says-it-has-no-secrecy
|
|
319
|
+
*/
|
|
320
|
+
export function showsNoSecrecy(party, record, secrecy, primary) {
|
|
321
|
+
if (!secrecy || typeof secrecy.indicator !== 'string' || secrecy.indicator === '' || !party) {
|
|
322
|
+
return false
|
|
323
|
+
}
|
|
324
|
+
const kinds = Array.isArray(secrecy.kinds) ? secrecy.kinds : []
|
|
325
|
+
if (kinds.length > 0 && !kinds.includes(party.partyKind)) {
|
|
326
|
+
return false
|
|
327
|
+
}
|
|
328
|
+
if (secrecy.primaryOnly === true && (!primary || party.partyUuid !== primary)) {
|
|
329
|
+
return false
|
|
330
|
+
}
|
|
331
|
+
const indicators = Array.isArray(record?.indicators) ? record.indicators : []
|
|
332
|
+
return !indicators.some((indicator) => indicator && indicator.key === secrecy.indicator)
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* The pill that names when a party's link ends (`validUntil`), in the app's
|
|
337
|
+
* words with `{date}`: "Machtiging tot 31 dec". Empty without words or an end.
|
|
338
|
+
*
|
|
339
|
+
* @param {object} party The link row.
|
|
340
|
+
* @param {string} label The words, with `{date}`.
|
|
341
|
+
* @param {Date} [now] The reference moment, for the year.
|
|
342
|
+
* @param {string} [locale] BCP 47 tag (defaults to the user's).
|
|
343
|
+
* @return {string} The pill text, or ''.
|
|
344
|
+
* @spec openspec/changes/party-representation-end-pill/specs/record-widgets/spec.md#requirement-a-representatives-row-names-when-the-representation-ends
|
|
345
|
+
*/
|
|
346
|
+
export function untilPillOf(party, label, now = new Date(), locale = boardDateLocale()) {
|
|
347
|
+
const words = typeof label === 'string' ? label : ''
|
|
348
|
+
const date = words === '' ? '' : formatBoardDate(party?.validUntil, now, locale)
|
|
349
|
+
return date === '' ? '' : words.replaceAll('{date}', date)
|
|
350
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SPDX-FileCopyrightText: 2026 Conduction B.V.
|
|
3
|
+
* SPDX-License-Identifier: EUPL-1.2
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
const SIDES = ['top', 'right', 'bottom', 'left']
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* How far chrome floating over a frame reaches into it, per side.
|
|
10
|
+
*
|
|
11
|
+
* A box taller than half the frame is a side panel and reserves its width on
|
|
12
|
+
* the side it stands; any other box is a strip and reserves its height from
|
|
13
|
+
* the top or the bottom, whichever half holds its centre. Boxes with no size
|
|
14
|
+
* (not drawn) are skipped.
|
|
15
|
+
*
|
|
16
|
+
* @param {DOMRect|object|null} frame The frame's rect.
|
|
17
|
+
* @param {Array<DOMRect|object|null>} rects The floating boxes' rects.
|
|
18
|
+
* @return {{top: number, right: number, bottom: number, left: number}} Pixels per side.
|
|
19
|
+
*/
|
|
20
|
+
export function overlayInset(frame, rects) {
|
|
21
|
+
const inset = { top: 0, right: 0, bottom: 0, left: 0 }
|
|
22
|
+
if (!frame || !frame.width || !frame.height) {
|
|
23
|
+
return inset
|
|
24
|
+
}
|
|
25
|
+
for (const rect of rects || []) {
|
|
26
|
+
if (!rect || !rect.width || !rect.height) {
|
|
27
|
+
continue
|
|
28
|
+
}
|
|
29
|
+
if (rect.height > frame.height / 2) {
|
|
30
|
+
if (rect.left + rect.width / 2 > frame.left + frame.width / 2) {
|
|
31
|
+
inset.right = Math.max(inset.right, frame.right - rect.left)
|
|
32
|
+
} else {
|
|
33
|
+
inset.left = Math.max(inset.left, rect.right - frame.left)
|
|
34
|
+
}
|
|
35
|
+
} else if (rect.top + rect.height / 2 < frame.top + frame.height / 2) {
|
|
36
|
+
inset.top = Math.max(inset.top, rect.bottom - frame.top)
|
|
37
|
+
} else {
|
|
38
|
+
inset.bottom = Math.max(inset.bottom, frame.bottom - rect.top)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return inset
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Vue Flow's fit padding for a canvas with chrome over it: each side's inset
|
|
46
|
+
* plus a gap, in pixels. Without an inset, Vue Flow's own 0.1.
|
|
47
|
+
*
|
|
48
|
+
* @param {object|null} inset Pixels per side, as overlayInset returns.
|
|
49
|
+
* @param {number} gap Pixels kept clear beyond the inset.
|
|
50
|
+
* @return {number|object} The `padding` for Vue Flow's fitView.
|
|
51
|
+
*/
|
|
52
|
+
export function fitPaddingFor(inset, gap = 24) {
|
|
53
|
+
if (!inset || !SIDES.some((side) => inset[side] > 0)) {
|
|
54
|
+
return 0.1
|
|
55
|
+
}
|
|
56
|
+
return Object.fromEntries(SIDES.map((side) => [side, `${Math.round((inset[side] || 0) + gap)}px`]))
|
|
57
|
+
}
|