@conduction/nextcloud-vue 2.169.0 → 2.171.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/CnCellRenderer/CnCellRenderer.vue.js +1 -1
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js +7 -2
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js.map +1 -1
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue3.js.map +1 -1
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroup.vue.js +9 -0
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroup.vue.js.map +1 -0
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroup.vue2.js +242 -0
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroup.vue2.js.map +1 -0
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroup.vue3.js +200 -0
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroup.vue3.js.map +1 -0
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroupEditor.vue.js +9 -0
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroupEditor.vue.js.map +1 -0
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroupEditor.vue2.js +186 -0
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroupEditor.vue2.js.map +1 -0
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroupEditor.vue3.js +24 -0
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroupEditor.vue3.js.map +1 -0
- package/dist/esm/components/CnConditionListEditor/CnConditionListEditor.vue.js +1 -1
- package/dist/esm/components/CnConditionListEditor/CnConditionListEditor.vue2.js +3 -15
- package/dist/esm/components/CnConditionListEditor/CnConditionListEditor.vue2.js.map +1 -1
- package/dist/esm/components/CnConditionListEditor/CnConditionListEditor.vue3.js +16 -61
- package/dist/esm/components/CnConditionListEditor/CnConditionListEditor.vue3.js.map +1 -1
- package/dist/esm/components/CnConditionListEditor/CnConditionRow.vue.js +9 -0
- package/dist/esm/components/CnConditionListEditor/CnConditionRow.vue.js.map +1 -0
- package/dist/esm/components/CnConditionListEditor/CnConditionRow.vue2.js +120 -0
- package/dist/esm/components/CnConditionListEditor/CnConditionRow.vue2.js.map +1 -0
- package/dist/esm/components/CnConditionListEditor/CnConditionRow.vue3.js +86 -0
- package/dist/esm/components/CnConditionListEditor/CnConditionRow.vue3.js.map +1 -0
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue.js +1 -1
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue2.js +88 -0
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue3.js +4 -3
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue3.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +46 -3
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +2 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js +9 -9
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue.js +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue.js +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js +9 -3
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue3.js.map +1 -1
- package/dist/esm/components/CnDialogActions/CnDialogActions.vue.js +8 -0
- package/dist/esm/components/CnDialogActions/CnDialogActions.vue.js.map +1 -0
- package/dist/esm/components/CnDialogActions/CnDialogActions.vue2.js +101 -0
- package/dist/esm/components/CnDialogActions/CnDialogActions.vue2.js.map +1 -0
- package/dist/esm/components/CnDialogActions/CnDialogActions.vue3.js +54 -0
- package/dist/esm/components/CnDialogActions/CnDialogActions.vue3.js.map +1 -0
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue.js +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js +14 -2
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/filesBrowser.js +21 -2
- package/dist/esm/components/CnFilesBrowser/filesBrowser.js.map +1 -1
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue.js +1 -1
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue2.js +7 -0
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue2.js.map +1 -1
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue3.js +2 -2
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue3.js.map +1 -1
- package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue2.js +11 -0
- package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue2.js.map +1 -1
- package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue3.js +2 -1
- package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue3.js.map +1 -1
- package/dist/esm/components/CnLinkedWidget/CnLinkedWidget.vue.js +1 -1
- 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/CnMassActionDialog/CnMassActionDialog.vue.js +9 -0
- package/dist/esm/components/CnMassActionDialog/CnMassActionDialog.vue.js.map +1 -0
- package/dist/esm/components/CnMassActionDialog/CnMassActionDialog.vue2.js +248 -0
- package/dist/esm/components/CnMassActionDialog/CnMassActionDialog.vue2.js.map +1 -0
- package/dist/esm/components/{CnMassDeleteDialog/CnMassDeleteDialog.vue3.js → CnMassActionDialog/CnMassActionDialog.vue3.js} +66 -52
- package/dist/esm/components/CnMassActionDialog/CnMassActionDialog.vue3.js.map +1 -0
- package/dist/esm/components/CnMassDeleteDialog/CnMassDeleteDialog.vue.js +0 -3
- package/dist/esm/components/CnMassDeleteDialog/CnMassDeleteDialog.vue.js.map +1 -1
- package/dist/esm/components/CnMassDeleteDialog/CnMassDeleteDialog.vue2.js +25 -121
- package/dist/esm/components/CnMassDeleteDialog/CnMassDeleteDialog.vue2.js.map +1 -1
- package/dist/esm/components/CnNotesCard/CnNotesCard.vue.js +1 -1
- package/dist/esm/components/CnNotesCard/CnNotesCard.vue2.js +11 -3
- package/dist/esm/components/CnNotesCard/CnNotesCard.vue2.js.map +1 -1
- package/dist/esm/components/CnNotesCard/CnNotesCard.vue3.js +1 -1
- package/dist/esm/components/CnNotesCard/CnNotesCard.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue.js +1 -1
- package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue2.js +13 -6
- package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue.js +1 -1
- package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue2.js +21 -1
- package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue3.js +2 -2
- package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue3.js.map +1 -1
- package/dist/esm/components/CnTreeView/CnTreeNode.vue.js +1 -1
- package/dist/esm/components/CnTreeView/CnTreeNode.vue2.js.map +1 -1
- package/dist/esm/components/CnTreeView/CnTreeNode.vue3.js +23 -5
- package/dist/esm/components/CnTreeView/CnTreeNode.vue3.js.map +1 -1
- package/dist/esm/components/CnTreeView/CnTreeView.vue.js +1 -1
- package/dist/esm/components/CnTreeView/CnTreeView.vue2.js +3 -0
- package/dist/esm/components/CnTreeView/CnTreeView.vue2.js.map +1 -1
- package/dist/esm/components/CnTreeView/CnTreeView.vue3.js +14 -4
- package/dist/esm/components/CnTreeView/CnTreeView.vue3.js.map +1 -1
- package/dist/esm/dialogs/CnConfirmDialog.vue.js +1 -1
- package/dist/esm/dialogs/CnConfirmDialog.vue2.js.map +1 -1
- package/dist/esm/dialogs/CnConfirmDialog.vue3.js +5 -3
- package/dist/esm/dialogs/CnConfirmDialog.vue3.js.map +1 -1
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/integrations/builtin/contacts/CnContactsTab.vue.js +1 -1
- package/dist/esm/integrations/builtin/contacts/CnContactsTab.vue2.js +14 -3
- package/dist/esm/integrations/builtin/contacts/CnContactsTab.vue2.js.map +1 -1
- package/dist/esm/integrations/builtin/contacts/CnContactsTab.vue3.js.map +1 -1
- package/dist/esm/l10n/en.json.js +16 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +16 -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 +874 -496
- package/dist/esm/utils/noteThreads.js +14 -2
- package/dist/esm/utils/noteThreads.js.map +1 -1
- package/dist/esm/utils/objectParties.js +50 -5
- package/dist/esm/utils/objectParties.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +11549 -10100
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +874 -496
- package/l10n/en.json +16 -1
- package/l10n/nl.json +16 -1
- package/package.json +1 -1
- package/scripts/.jsdoc-baselines.json +1 -1
- package/src/components/CnCellRenderer/CnCellRenderer.vue +7 -2
- package/src/components/CnConditionGroupEditor/CnConditionGroup.vue +528 -0
- package/src/components/CnConditionGroupEditor/CnConditionGroupEditor.vue +211 -0
- package/src/components/CnConditionGroupEditor/index.js +9 -0
- package/src/components/CnConditionListEditor/CnConditionListEditor.vue +15 -78
- package/src/components/CnConditionListEditor/CnConditionRow.vue +226 -0
- package/src/components/CnDashboardGrid/CnDashboardGrid.md +1 -0
- package/src/components/CnDashboardGrid/CnDashboardGrid.vue +100 -2
- package/src/components/CnDashboardPage/CnDashboardPage.vue +47 -3
- package/src/components/CnDetailPage/CnDetailPage.vue +8 -8
- package/src/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue +6 -0
- package/src/components/CnDetailWidgetHost/CnDetailWidgetHost.vue +9 -9
- package/src/components/CnDialogActions/CnDialogActions.vue +124 -0
- package/src/components/CnDialogActions/index.js +7 -0
- package/src/components/CnFilesBrowser/CnFilesBrowser.vue +15 -3
- package/src/components/CnFilesBrowser/filesBrowser.js +21 -2
- package/src/components/CnFlowsPage/CnFlowBoard.vue +10 -3
- package/src/components/CnFlowsPage/CnFlowEditorPage.vue +12 -0
- package/src/components/CnLinkedWidget/CnLinkedWidget.vue +7 -0
- package/src/components/CnMassActionDialog/CnMassActionDialog.vue +382 -0
- package/src/components/CnMassActionDialog/index.js +7 -0
- package/src/components/CnMassDeleteDialog/CnMassDeleteDialog.md +4 -0
- package/src/components/CnMassDeleteDialog/CnMassDeleteDialog.vue +25 -254
- package/src/components/CnNotesCard/CnNotesCard.vue +12 -4
- package/src/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue +14 -5
- package/src/components/CnObjectSidebar/CnNotesTab.vue +23 -3
- package/src/components/CnTreeView/CnTreeNode.vue +10 -1
- package/src/components/CnTreeView/CnTreeView.vue +9 -0
- package/src/components/index.js +3 -0
- package/src/css/context-menu.css +7 -0
- package/src/css/dialog.css +7 -5
- package/src/css/look-board-detail.css +120 -1
- package/src/css/look-board-index.css +21 -2
- package/src/css/look-board.css +55 -2
- package/src/dialogs/CnConfirmDialog.vue +3 -1
- package/src/index.js +3 -0
- package/src/integrations/builtin/contacts/CnContactsTab.vue +14 -3
- package/src/integrations/builtin/contacts/__tests__/CnContactsTabBoardRows.spec.js +17 -2
- package/src/utils/noteThreads.js +13 -1
- package/src/utils/objectParties.js +49 -4
- package/dist/esm/components/CnMassDeleteDialog/CnMassDeleteDialog.vue3.js.map +0 -1
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<template>
|
|
15
15
|
<div ref="gridContainer"
|
|
16
16
|
class="cn-dashboard-grid"
|
|
17
|
-
:class="{ 'cn-dashboard-grid--side-column': sideColumnStyle !== null, 'cn-dashboard-grid--fill': filling }"
|
|
17
|
+
:class="{ 'cn-dashboard-grid--side-column': sideColumnStyle !== null, 'cn-dashboard-grid--weighted': columnBounds !== null, 'cn-dashboard-grid--fill': filling }"
|
|
18
18
|
:style="sideColumnStyle">
|
|
19
19
|
<!--
|
|
20
20
|
Keyboard instructions, referenced by every grid item through
|
|
@@ -48,9 +48,10 @@
|
|
|
48
48
|
:gs-min-h="minRows(item)"
|
|
49
49
|
:gs-size-to-content="sizeToContentAttr(item)"
|
|
50
50
|
:data-cn-track="item.track === 'main' || item.track === 'side' ? item.track : undefined"
|
|
51
|
+
:data-cn-weighted="weightStyle(item) ? '' : undefined"
|
|
51
52
|
:data-cn-widget-id="item.widgetId || undefined"
|
|
52
53
|
:gs-locked="item.clear === true && !editable ? 'true' : undefined"
|
|
53
|
-
:style="
|
|
54
|
+
:style="itemStyle(item)"
|
|
54
55
|
@keydown="onItemKeydown($event, item)">
|
|
55
56
|
<div class="grid-stack-item-content">
|
|
56
57
|
<slot name="widget" :item="item">
|
|
@@ -352,6 +353,22 @@ export default {
|
|
|
352
353
|
default: null,
|
|
353
354
|
},
|
|
354
355
|
|
|
356
|
+
/**
|
|
357
|
+
* Weights for groups of the twelve columns: `[{ span, weight }]`, the
|
|
358
|
+
* spans adding up to 12. Each group takes its weight's share of the
|
|
359
|
+
* width, split evenly over its columns, so three groups of four can be
|
|
360
|
+
* drawn 332 / 415 / 332 (PqWerkplekKlant in a call). Items on a
|
|
361
|
+
* `sideColumn` track keep that column. Only on the full twelve-column
|
|
362
|
+
* grid and not while editing; GridStack keeps the twelve columns
|
|
363
|
+
* underneath.
|
|
364
|
+
*
|
|
365
|
+
* @spec openspec/changes/dashboard-column-weights/specs/dashboard-column-weights/spec.md#requirement-a-dashboard-can-weigh-its-column-groups
|
|
366
|
+
*/
|
|
367
|
+
columnWeights: {
|
|
368
|
+
type: Array,
|
|
369
|
+
default: null,
|
|
370
|
+
},
|
|
371
|
+
|
|
355
372
|
/**
|
|
356
373
|
* Fill the height the host gives the grid instead of growing with
|
|
357
374
|
* the content: in view mode the layout rows divide the grid's own
|
|
@@ -436,6 +453,41 @@ export default {
|
|
|
436
453
|
*
|
|
437
454
|
* @return {object|null}
|
|
438
455
|
*/
|
|
456
|
+
/**
|
|
457
|
+
* The left edge of each of the twelve columns and the right edge of
|
|
458
|
+
* the last, as fractions of the grid's width, from `columnWeights`;
|
|
459
|
+
* null when the grid keeps its twelve shares.
|
|
460
|
+
*
|
|
461
|
+
* @spec openspec/changes/dashboard-column-weights/specs/dashboard-column-weights/spec.md#requirement-a-dashboard-can-weigh-its-column-groups
|
|
462
|
+
* @return {number[]|null}
|
|
463
|
+
*/
|
|
464
|
+
columnBounds() {
|
|
465
|
+
const groups = this.columnWeights
|
|
466
|
+
if (this.editable || !Array.isArray(groups) || groups.length === 0) {
|
|
467
|
+
return null
|
|
468
|
+
}
|
|
469
|
+
const perColumn = []
|
|
470
|
+
for (const group of groups) {
|
|
471
|
+
const span = Number(group?.span)
|
|
472
|
+
const weight = Number(group?.weight)
|
|
473
|
+
if (!Number.isInteger(span) || span < 1 || !Number.isFinite(weight) || weight <= 0) {
|
|
474
|
+
return null
|
|
475
|
+
}
|
|
476
|
+
for (let i = 0; i < span; i++) {
|
|
477
|
+
perColumn.push(weight / span)
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
if (perColumn.length !== 12) {
|
|
481
|
+
return null
|
|
482
|
+
}
|
|
483
|
+
const total = perColumn.reduce((sum, w) => sum + w, 0)
|
|
484
|
+
const bounds = [0]
|
|
485
|
+
for (const w of perColumn) {
|
|
486
|
+
bounds.push(bounds[bounds.length - 1] + w / total)
|
|
487
|
+
}
|
|
488
|
+
return bounds
|
|
489
|
+
},
|
|
490
|
+
|
|
439
491
|
sideColumnStyle() {
|
|
440
492
|
const width = Number(this.sideColumn?.width)
|
|
441
493
|
if (this.editable || !Number.isFinite(width) || width <= 0) {
|
|
@@ -811,6 +863,43 @@ export default {
|
|
|
811
863
|
}
|
|
812
864
|
},
|
|
813
865
|
|
|
866
|
+
/**
|
|
867
|
+
* The left and width fractions of an item on weighted columns, or
|
|
868
|
+
* null when the grid keeps its twelve shares or the item is on a
|
|
869
|
+
* side-column track.
|
|
870
|
+
*
|
|
871
|
+
* @spec openspec/changes/dashboard-column-weights/specs/dashboard-column-weights/spec.md#requirement-a-dashboard-can-weigh-its-column-groups
|
|
872
|
+
* @param {object} item The layout item.
|
|
873
|
+
* @return {object|null}
|
|
874
|
+
*/
|
|
875
|
+
weightStyle(item) {
|
|
876
|
+
const bounds = this.columnBounds
|
|
877
|
+
if (bounds === null || (this.sideColumnStyle !== null && (item.track === 'main' || item.track === 'side'))) {
|
|
878
|
+
return null
|
|
879
|
+
}
|
|
880
|
+
const x = Math.min(Math.max(Number.isFinite(item.gridX) ? item.gridX : 0, 0), 12)
|
|
881
|
+
const w = Number.isFinite(item.gridWidth) ? item.gridWidth : this.minWidth
|
|
882
|
+
const end = Math.min(Math.max(x + w, x), 12)
|
|
883
|
+
return {
|
|
884
|
+
'--cn-weight-left': String(bounds[x]),
|
|
885
|
+
'--cn-weight-width': String(bounds[end] - bounds[x]),
|
|
886
|
+
}
|
|
887
|
+
},
|
|
888
|
+
|
|
889
|
+
/**
|
|
890
|
+
* The inline style of an item: its place on a filled grid, or its
|
|
891
|
+
* place on weighted columns.
|
|
892
|
+
*
|
|
893
|
+
* @param {object} item The layout item.
|
|
894
|
+
* @return {object|undefined}
|
|
895
|
+
*/
|
|
896
|
+
itemStyle(item) {
|
|
897
|
+
if (this.filling) {
|
|
898
|
+
return this.fillItemStyle(item)
|
|
899
|
+
}
|
|
900
|
+
return this.weightStyle(item) || undefined
|
|
901
|
+
},
|
|
902
|
+
|
|
814
903
|
resolveItemLabel(item, index) {
|
|
815
904
|
if (this.itemLabel) {
|
|
816
905
|
return String(this.itemLabel(item, index) ?? '')
|
|
@@ -1720,6 +1809,15 @@ export default {
|
|
|
1720
1809
|
width: calc((min(var(--gs-x) + var(--gs-w), var(--cn-side-from)) - min(var(--gs-x), var(--cn-side-from))) * var(--cn-main-col) + (max(var(--gs-x) + var(--gs-w) - var(--cn-side-from), 0) - max(var(--gs-x) - var(--cn-side-from), 0)) * var(--cn-side-col)) !important;
|
|
1721
1810
|
}
|
|
1722
1811
|
|
|
1812
|
+
/* `columnWeights`: an item's left edge and width follow the weighted columns
|
|
1813
|
+
it spans, as fractions of the grid. GridStack writes its own left and width
|
|
1814
|
+
inline, hence !important. */
|
|
1815
|
+
.cn-dashboard-grid--weighted > .grid-stack.gs-12:not(.grid-stack-rtl) > .grid-stack-item[data-cn-weighted] {
|
|
1816
|
+
/* stylelint-disable-next-line csstools/use-logical -- GridStack places a left-to-right item by `left`. */
|
|
1817
|
+
left: calc(var(--cn-weight-left) * 100%) !important;
|
|
1818
|
+
width: calc(var(--cn-weight-width) * 100%) !important;
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1723
1821
|
/* Screen-reader-only text: the keyboard key map and the live region. Kept in
|
|
1724
1822
|
the layout (not `display: none`) so assistive tech still reads it. */
|
|
1725
1823
|
.cn-dashboard-grid__sr-only {
|
|
@@ -574,6 +574,7 @@
|
|
|
574
574
|
:margin="gridMargin"
|
|
575
575
|
:float="gridFloat"
|
|
576
576
|
:sideColumn="section.sideColumn"
|
|
577
|
+
:columnWeights="section.columnWeights"
|
|
577
578
|
@layoutChange="section.view ? onViewLayoutChange($event) : onLayoutChange($event)">
|
|
578
579
|
<template #widget="{ item }">
|
|
579
580
|
<!-- In-app edit overlay (ADR-041): a single launchpad-style
|
|
@@ -1499,7 +1500,9 @@ export default {
|
|
|
1499
1500
|
* on). Editing the page shows the page's own layout.
|
|
1500
1501
|
*
|
|
1501
1502
|
* @spec openspec/changes/dashboard-layout-when/specs/dashboard-layout-when/spec.md#requirement-a-dashboard-can-arrange-its-cards-by-the-pages-workspace
|
|
1502
|
-
*
|
|
1503
|
+
* An entry can carry `gridColumnWeights` for its own layout.
|
|
1504
|
+
*
|
|
1505
|
+
* @type {Array<{when: object, layout: Array<object>, gridColumnWeights?: Array<object>}>}
|
|
1503
1506
|
*/
|
|
1504
1507
|
layoutWhen: {
|
|
1505
1508
|
type: Array,
|
|
@@ -1658,6 +1661,20 @@ export default {
|
|
|
1658
1661
|
default: null,
|
|
1659
1662
|
},
|
|
1660
1663
|
|
|
1664
|
+
/**
|
|
1665
|
+
* Weights for groups of the grid's twelve columns (manifest
|
|
1666
|
+
* `config.gridColumnWeights`): `[{ span, weight }]`, see
|
|
1667
|
+
* CnDashboardGrid's `columnWeights`. A `layoutWhen` entry can carry
|
|
1668
|
+
* its own `gridColumnWeights` for the layout it draws
|
|
1669
|
+
* (PqWerkplekKlant in a call: 332 / 415 / 332).
|
|
1670
|
+
*
|
|
1671
|
+
* @spec openspec/changes/dashboard-column-weights/specs/dashboard-column-weights/spec.md#requirement-a-dashboard-can-weigh-its-column-groups
|
|
1672
|
+
*/
|
|
1673
|
+
gridColumnWeights: {
|
|
1674
|
+
type: Array,
|
|
1675
|
+
default: null,
|
|
1676
|
+
},
|
|
1677
|
+
|
|
1661
1678
|
/**
|
|
1662
1679
|
* Widget definitions array. Each widget defines metadata for rendering.
|
|
1663
1680
|
*
|
|
@@ -3124,7 +3141,7 @@ export default {
|
|
|
3124
3141
|
if (!this.gridSectionsShown) {
|
|
3125
3142
|
return []
|
|
3126
3143
|
}
|
|
3127
|
-
const page = { key: 'page', view: false, layout: this.displayLayout, editable: this.gridEditable, sideColumn: this.gridSideColumn, attrs: {} }
|
|
3144
|
+
const page = { key: 'page', view: false, layout: this.displayLayout, editable: this.gridEditable, sideColumn: this.gridSideColumn, columnWeights: this.pageColumnWeights(), attrs: {} }
|
|
3128
3145
|
if (!this.hasViews) {
|
|
3129
3146
|
return [page]
|
|
3130
3147
|
}
|
|
@@ -3398,15 +3415,42 @@ export default {
|
|
|
3398
3415
|
* @spec openspec/changes/dashboard-layout-when/specs/dashboard-layout-when/spec.md#requirement-a-dashboard-can-arrange-its-cards-by-the-pages-workspace
|
|
3399
3416
|
*/
|
|
3400
3417
|
layoutFromWorkspace() {
|
|
3418
|
+
const entry = this.layoutEntryFromWorkspace()
|
|
3419
|
+
return entry ? entry.layout : null
|
|
3420
|
+
},
|
|
3421
|
+
|
|
3422
|
+
/**
|
|
3423
|
+
* The first `layoutWhen` entry whose condition holds on the workspace,
|
|
3424
|
+
* or null when none applies.
|
|
3425
|
+
*
|
|
3426
|
+
* @return {object|null}
|
|
3427
|
+
* @spec openspec/changes/dashboard-layout-when/specs/dashboard-layout-when/spec.md#requirement-a-dashboard-can-arrange-its-cards-by-the-pages-workspace
|
|
3428
|
+
*/
|
|
3429
|
+
layoutEntryFromWorkspace() {
|
|
3401
3430
|
const workspace = this.workspaceContext || {}
|
|
3402
3431
|
for (const entry of Array.isArray(this.layoutWhen) ? this.layoutWhen : []) {
|
|
3403
3432
|
if (entry && Array.isArray(entry.layout) && isWorkspaceCondition(entry.when) && evaluateWorkspaceCondition(entry.when, workspace)) {
|
|
3404
|
-
return entry
|
|
3433
|
+
return entry
|
|
3405
3434
|
}
|
|
3406
3435
|
}
|
|
3407
3436
|
return null
|
|
3408
3437
|
},
|
|
3409
3438
|
|
|
3439
|
+
/**
|
|
3440
|
+
* The column weights of the page's grid: the applying `layoutWhen`
|
|
3441
|
+
* entry's own, else the page's.
|
|
3442
|
+
*
|
|
3443
|
+
* @return {Array<object>|null}
|
|
3444
|
+
* @spec openspec/changes/dashboard-column-weights/specs/dashboard-column-weights/spec.md#requirement-a-dashboard-can-weigh-its-column-groups
|
|
3445
|
+
*/
|
|
3446
|
+
pageColumnWeights() {
|
|
3447
|
+
const entry = this.layoutEntryFromWorkspace()
|
|
3448
|
+
if (entry && Array.isArray(entry.gridColumnWeights)) {
|
|
3449
|
+
return entry.gridColumnWeights
|
|
3450
|
+
}
|
|
3451
|
+
return Array.isArray(this.gridColumnWeights) ? this.gridColumnWeights : null
|
|
3452
|
+
},
|
|
3453
|
+
|
|
3410
3454
|
/**
|
|
3411
3455
|
* The first `titleWhen` title whose condition holds on the workspace,
|
|
3412
3456
|
* its `{workspace.<key>}` tokens filled; '' when none applies.
|
|
@@ -523,8 +523,14 @@
|
|
|
523
523
|
:rootText="breadcrumbCrumbs[0].icon === undefined"
|
|
524
524
|
:separator="breadcrumbSeparator || '/'"
|
|
525
525
|
data-testid="cn-detail-page-breadcrumbs" />
|
|
526
|
+
<CnDetailHeaderChips
|
|
527
|
+
v-if="headerFields.length > 0"
|
|
528
|
+
:fields="headerFields"
|
|
529
|
+
:object="resolvedObject"
|
|
530
|
+
:schema="currentSchema"
|
|
531
|
+
:register="register" />
|
|
526
532
|
<span
|
|
527
|
-
v-if="breadcrumbCrumbs.length > 0 &&
|
|
533
|
+
v-if="(breadcrumbCrumbs.length > 0 || headerFields.length > 0) && headerMetaText"
|
|
528
534
|
class="cn-detail-page__header-dot"
|
|
529
535
|
aria-hidden="true"
|
|
530
536
|
data-testid="cn-detail-page-header-dot">·</span>
|
|
@@ -532,12 +538,6 @@
|
|
|
532
538
|
v-if="headerMetaText"
|
|
533
539
|
class="cn-detail-page__header-meta"
|
|
534
540
|
data-testid="cn-detail-page-header-meta">{{ headerMetaText }}</span>
|
|
535
|
-
<CnDetailHeaderChips
|
|
536
|
-
v-if="headerFields.length > 0"
|
|
537
|
-
:fields="headerFields"
|
|
538
|
-
:object="resolvedObject"
|
|
539
|
-
:schema="currentSchema"
|
|
540
|
-
:register="register" />
|
|
541
541
|
</div>
|
|
542
542
|
<!-- Row 3 of the board look's header: the Follow control under the
|
|
543
543
|
breadcrumb, clear of the title row and its actions (DqZaak
|
|
@@ -3814,7 +3814,7 @@ export default {
|
|
|
3814
3814
|
},
|
|
3815
3815
|
|
|
3816
3816
|
/**
|
|
3817
|
-
* Whether row 2 has a meta line or header chips to draw
|
|
3817
|
+
* Whether row 2 has a meta line or header chips to draw beside the
|
|
3818
3818
|
* breadcrumb.
|
|
3819
3819
|
*
|
|
3820
3820
|
* @return {boolean} True with meta or chips.
|
|
@@ -113,6 +113,12 @@ export default {
|
|
|
113
113
|
gap: 12px;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
+
.cn-detail-page__catalog-note {
|
|
117
|
+
color: var(--color-text-maxcontrast);
|
|
118
|
+
font-size: 14px;
|
|
119
|
+
white-space: nowrap;
|
|
120
|
+
}
|
|
121
|
+
|
|
116
122
|
.cn-detail-page__catalog-action {
|
|
117
123
|
align-items: center;
|
|
118
124
|
background: var(--color-primary-element-light);
|
|
@@ -1611,11 +1611,13 @@ export default {
|
|
|
1611
1611
|
},
|
|
1612
1612
|
|
|
1613
1613
|
/**
|
|
1614
|
-
* An integration widget's `labels` (prop name to text
|
|
1615
|
-
* the host's language: a leaf cannot translate
|
|
1614
|
+
* An integration widget's `labels` (prop name to text, or to a map of
|
|
1615
|
+
* texts), translated in the host's language: a leaf cannot translate
|
|
1616
|
+
* the host app's words.
|
|
1616
1617
|
*
|
|
1617
|
-
* @return {object} Prop name to translated text.
|
|
1618
|
+
* @return {object} Prop name to translated text or map.
|
|
1618
1619
|
* @spec openspec/changes/leaf-labels-in-the-host-language/specs/leaf-labels-in-the-host-language/spec.md#requirement-an-integration-widget-gives-its-leaf-labels-in-the-hosts-language
|
|
1620
|
+
* @spec openspec/changes/parties-role-line-from-the-role-record/specs/record-widgets/spec.md#requirement-a-board-contact-row-can-lead-with-the-word-for-its-kind
|
|
1619
1621
|
*/
|
|
1620
1622
|
leafLabels() {
|
|
1621
1623
|
const labels = this.widget?.labels
|
|
@@ -1626,6 +1628,10 @@ export default {
|
|
|
1626
1628
|
for (const [prop, text] of Object.entries(labels)) {
|
|
1627
1629
|
if (typeof text === 'string') {
|
|
1628
1630
|
out[prop] = this.translateLabel(text)
|
|
1631
|
+
} else if (text && typeof text === 'object' && !Array.isArray(text)) {
|
|
1632
|
+
out[prop] = Object.fromEntries(Object.entries(text)
|
|
1633
|
+
.filter(([, word]) => typeof word === 'string')
|
|
1634
|
+
.map(([key, word]) => [key, this.translateLabel(word)]))
|
|
1629
1635
|
}
|
|
1630
1636
|
}
|
|
1631
1637
|
return out
|
|
@@ -2194,12 +2200,6 @@ export default {
|
|
|
2194
2200
|
text-align: center;
|
|
2195
2201
|
}
|
|
2196
2202
|
|
|
2197
|
-
.cn-detail-page__catalog-note {
|
|
2198
|
-
color: var(--color-text-maxcontrast);
|
|
2199
|
-
font-size: 14px;
|
|
2200
|
-
white-space: nowrap;
|
|
2201
|
-
}
|
|
2202
|
-
|
|
2203
2203
|
.cn-detail-widget-host,
|
|
2204
2204
|
.cn-detail-widget-host > * {
|
|
2205
2205
|
height: 100%;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
- SPDX-FileCopyrightText: 2026 Conduction B.V.
|
|
3
|
+
- SPDX-License-Identifier: EUPL-1.2
|
|
4
|
+
-->
|
|
5
|
+
<template>
|
|
6
|
+
<NcButton :disabled="saving" data-testid="cn-dialog-actions-cancel" @click="onCancel">
|
|
7
|
+
{{ cancelLabel }}
|
|
8
|
+
</NcButton>
|
|
9
|
+
<NcButton
|
|
10
|
+
:variant="variant"
|
|
11
|
+
:disabled="saving || !canSubmit"
|
|
12
|
+
data-testid="cn-dialog-actions-submit"
|
|
13
|
+
@click="onSubmit">
|
|
14
|
+
<template v-if="saving || confirmIcon" #icon>
|
|
15
|
+
<NcLoadingIcon
|
|
16
|
+
v-if="saving"
|
|
17
|
+
:size="20"
|
|
18
|
+
:name="t('nextcloud-vue', 'Loading …')" />
|
|
19
|
+
<CnIcon v-else :name="confirmIcon" :size="20" />
|
|
20
|
+
</template>
|
|
21
|
+
{{ confirmLabel }}
|
|
22
|
+
</NcButton>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
import { translate as t } from '@nextcloud/l10n'
|
|
27
|
+
import { NcButton, NcLoadingIcon } from '@nextcloud/vue'
|
|
28
|
+
import { CnIcon } from '../CnIcon/index.js'
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* CnDialogActions — the footer of a hand-built dialog: a cancel button and a
|
|
32
|
+
* primary button that shows a loading icon while the dialog saves.
|
|
33
|
+
*
|
|
34
|
+
* Put it in the `#actions` slot of `CnDialog` (or `NcDialog`) when the dialog
|
|
35
|
+
* body is too custom for `CnFormDialog`. The component holds no state: the
|
|
36
|
+
* parent owns `saving` and `canSubmit` and does the work on `submit`.
|
|
37
|
+
*
|
|
38
|
+
* ```vue
|
|
39
|
+
* <CnDialog :name="t('myapp', 'Edit source')" default-width="form" @closing="close">
|
|
40
|
+
* <MySourceForm v-model="source" />
|
|
41
|
+
* <template #actions>
|
|
42
|
+
* <CnDialogActions
|
|
43
|
+
* :saving="saving"
|
|
44
|
+
* :can-submit="source.title !== ''"
|
|
45
|
+
* :confirm-label="editing ? t('myapp', 'Save') : t('myapp', 'Create')"
|
|
46
|
+
* @cancel="close"
|
|
47
|
+
* @submit="save" />
|
|
48
|
+
* </template>
|
|
49
|
+
* </CnDialog>
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* The primary button is disabled while `saving` is true or `canSubmit` is
|
|
53
|
+
* false. While saving it draws a loading icon with an accessible name, so a
|
|
54
|
+
* screen-reader user hears that the save is running.
|
|
55
|
+
*/
|
|
56
|
+
export default {
|
|
57
|
+
name: 'CnDialogActions',
|
|
58
|
+
|
|
59
|
+
components: {
|
|
60
|
+
CnIcon,
|
|
61
|
+
NcButton,
|
|
62
|
+
NcLoadingIcon,
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
props: {
|
|
66
|
+
/** Whether a save is in flight. Disables both buttons and draws a loading icon on the primary one. */
|
|
67
|
+
saving: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: false,
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
/** Whether the dialog holds enough to submit. False disables the primary button. */
|
|
73
|
+
canSubmit: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
default: true,
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
/** Label of the primary button. */
|
|
79
|
+
confirmLabel: {
|
|
80
|
+
type: String,
|
|
81
|
+
default: () => t('nextcloud-vue', 'Save'),
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
/** Label of the cancel button. */
|
|
85
|
+
cancelLabel: {
|
|
86
|
+
type: String,
|
|
87
|
+
default: () => t('nextcloud-vue', 'Cancel'),
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
/** Variant of the primary button. Use `error` for a destructive submit. */
|
|
91
|
+
variant: {
|
|
92
|
+
type: String,
|
|
93
|
+
default: 'primary',
|
|
94
|
+
validator: (v) => ['primary', 'secondary', 'error', 'warning', 'success'].includes(v),
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
/** A CnIcon name drawn on the primary button when it is not saving. Empty draws none. */
|
|
98
|
+
confirmIcon: {
|
|
99
|
+
type: String,
|
|
100
|
+
default: '',
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
emits: ['cancel', 'submit'],
|
|
105
|
+
|
|
106
|
+
methods: {
|
|
107
|
+
t,
|
|
108
|
+
|
|
109
|
+
onCancel() {
|
|
110
|
+
/**
|
|
111
|
+
* @event cancel Emitted when the cancel button is clicked.
|
|
112
|
+
*/
|
|
113
|
+
this.$emit('cancel')
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
onSubmit() {
|
|
117
|
+
/**
|
|
118
|
+
* @event submit Emitted when the primary button is clicked while it is enabled.
|
|
119
|
+
*/
|
|
120
|
+
this.$emit('submit')
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
}
|
|
124
|
+
</script>
|
|
@@ -409,7 +409,7 @@
|
|
|
409
409
|
<td class="cn-files-browser__col-actions" @click.stop @auxclick.stop>
|
|
410
410
|
<!-- The host's one visible button on a file ("Beoordelen"),
|
|
411
411
|
primary while the row still asks for it. -->
|
|
412
|
-
<NcButton v-if="
|
|
412
|
+
<NcButton v-if="rowButtonApplies(node)"
|
|
413
413
|
:variant="rowButtonPrimary(node) ? 'primary' : 'secondary'"
|
|
414
414
|
class="cn-files-browser__row-button"
|
|
415
415
|
:aria-label="t('nextcloud-vue', '{action}: {name}', { action: hostLabel(rowButton), name: node.basename })"
|
|
@@ -2301,6 +2301,20 @@ export default {
|
|
|
2301
2301
|
return list.some((v) => String(v).toLowerCase() === String(value).toLowerCase())
|
|
2302
2302
|
},
|
|
2303
2303
|
|
|
2304
|
+
/**
|
|
2305
|
+
* Whether the row button is drawn on a file: never on a folder, and
|
|
2306
|
+
* only where its `when` and `visibleIf` (row included) hold.
|
|
2307
|
+
*
|
|
2308
|
+
* @param {object} node The file.
|
|
2309
|
+
* @return {boolean}
|
|
2310
|
+
*/
|
|
2311
|
+
rowButtonApplies(node) {
|
|
2312
|
+
if (!this.rowButton || this.isFolder(node)) {
|
|
2313
|
+
return false
|
|
2314
|
+
}
|
|
2315
|
+
return hostActionApplies(this.rowButton, node, this.rowValueOf(node))
|
|
2316
|
+
},
|
|
2317
|
+
|
|
2304
2318
|
/**
|
|
2305
2319
|
* Whether a file's row button is the primary one: the row-data field
|
|
2306
2320
|
* `primaryWhen.key` holds one of `primaryWhen.values`.
|
|
@@ -2320,8 +2334,6 @@ export default {
|
|
|
2320
2334
|
return when.values.some((v) => String(v).toLowerCase() === String(raw).toLowerCase())
|
|
2321
2335
|
},
|
|
2322
2336
|
|
|
2323
|
-
hostActionApplies,
|
|
2324
|
-
|
|
2325
2337
|
/**
|
|
2326
2338
|
* Re-read the folder once after a burst of change signals. One upload
|
|
2327
2339
|
* of ten files answers ten `files:node:created`, and one PROPFIND
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import axios from '@nextcloud/axios'
|
|
11
11
|
import { generateUrl } from '@nextcloud/router'
|
|
12
|
+
import { conditionHolds } from '../../utils/fieldCondition.js'
|
|
12
13
|
import { stripTrailingSlashes } from '../../utils/trailingSlashes.js'
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -280,6 +281,23 @@ export function indexRowData(data, { path = '', key = 'fileId' } = {}) {
|
|
|
280
281
|
return byId
|
|
281
282
|
}
|
|
282
283
|
|
|
284
|
+
/**
|
|
285
|
+
* Whether one field of a file's row meets its `visibleIf.row` entry: a plain
|
|
286
|
+
* value is compared strictly, an object is a predicate of a form field
|
|
287
|
+
* condition (`equals`, `in`, `notEmpty` and the rest).
|
|
288
|
+
*
|
|
289
|
+
* @param {string} key The row field.
|
|
290
|
+
* @param {unknown} wanted The value, or the predicate.
|
|
291
|
+
* @param {unknown} value What the row holds.
|
|
292
|
+
* @return {boolean} True when the field meets it.
|
|
293
|
+
*/
|
|
294
|
+
function rowFieldMatches(key, wanted, value) {
|
|
295
|
+
if (wanted !== null && typeof wanted === 'object' && !Array.isArray(wanted)) {
|
|
296
|
+
return conditionHolds({ ...wanted, field: key }, { [key]: value }, key)
|
|
297
|
+
}
|
|
298
|
+
return value === wanted
|
|
299
|
+
}
|
|
300
|
+
|
|
283
301
|
/**
|
|
284
302
|
* Whether a host row action is offered on a file, by its `visibleIf`.
|
|
285
303
|
*
|
|
@@ -287,7 +305,8 @@ export function indexRowData(data, { path = '', key = 'fileId' } = {}) {
|
|
|
287
305
|
* allowed); `visibleIf.mime` lists mime types, where one ending in `/` or
|
|
288
306
|
* `/*` names the whole family; `visibleIf.row` maps fields of the host's row
|
|
289
307
|
* for the file to the value each must have (compared strictly, so `true` is
|
|
290
|
-
* not `"true"`)
|
|
308
|
+
* not `"true"`), or to a predicate of a form field condition such as
|
|
309
|
+
* `{ notEmpty: true }` or `{ in: [...] }`. Every condition named must hold. An action without
|
|
291
310
|
* `visibleIf` is offered on every file, as before. An action with `when` is
|
|
292
311
|
* offered only while `when` is `true`.
|
|
293
312
|
*
|
|
@@ -333,7 +352,7 @@ export function hostActionApplies(action, node, rowValue = null) {
|
|
|
333
352
|
if (typeof rowValue !== 'function') {
|
|
334
353
|
return false
|
|
335
354
|
}
|
|
336
|
-
const holds = Object.entries(condition.row).every(([key, wanted]) =>
|
|
355
|
+
const holds = Object.entries(condition.row).every(([key, wanted]) => rowFieldMatches(key, wanted, rowValue(key)))
|
|
337
356
|
if (!holds) {
|
|
338
357
|
return false
|
|
339
358
|
}
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
<div class="cn-flow-board" :class="{ 'cn-flow-board--with-palette': showPalette, 'cn-flow-board--canvas': canvasLayout, 'cn-flow-board--run': store.inRunView }" data-testid="flow-board">
|
|
16
16
|
<header class="cn-flow-board__header">
|
|
17
17
|
<div class="cn-flow-board__heading">
|
|
18
|
-
<
|
|
18
|
+
<h1 class="cn-flow-board__title" data-testid="flow-board-title">
|
|
19
19
|
{{ titleText }}
|
|
20
|
-
</
|
|
20
|
+
</h1>
|
|
21
21
|
</div>
|
|
22
22
|
<div v-if="!store.inRunView || canvasLayout" class="cn-flow-board__actions">
|
|
23
23
|
<template v-if="!store.inRunView">
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
data-testid="flow-board-enabled-switch"
|
|
40
40
|
@click="onEnabledChange(store.flow.enabled === false)" />
|
|
41
41
|
<span :id="toggleLabelId" class="cn-flow-board__toggle-label">
|
|
42
|
-
{{ store.flow.enabled !== false ? t('nextcloud-vue', 'Active') : t('nextcloud-vue', 'Paused') }}
|
|
42
|
+
{{ toggleLabel === 'fixed' || store.flow.enabled !== false ? t('nextcloud-vue', 'Active') : t('nextcloud-vue', 'Paused') }}
|
|
43
43
|
</span>
|
|
44
44
|
</span>
|
|
45
45
|
<NcButton :disabled="store.checking || !store.nodes.length"
|
|
@@ -639,6 +639,13 @@ export default {
|
|
|
639
639
|
* over the canvas. `cards` (default) keeps the DqFlow grid.
|
|
640
640
|
*/
|
|
641
641
|
layout: { type: String, default: 'cards' },
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* How the Active switch is named. `state` (default) names it after
|
|
645
|
+
* the flow's state, Active or Paused (PqFlow). `fixed` always names
|
|
646
|
+
* it Active and lets the switch show whether the flow runs (DqFlow).
|
|
647
|
+
*/
|
|
648
|
+
toggleLabel: { type: String, default: 'state' },
|
|
642
649
|
},
|
|
643
650
|
|
|
644
651
|
emits: ['save', 'run', 'retried'],
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
:paletteGroups="translatedPaletteGroups"
|
|
14
14
|
:flowDirection="flowDirection"
|
|
15
15
|
:layout="layout"
|
|
16
|
+
:toggleLabel="toggleLabel"
|
|
16
17
|
:nodeLook="nodeLook"
|
|
17
18
|
:notice="notice ? cnTranslate(notice) : ''"
|
|
18
19
|
:saveAsVersion="saveAsVersion"
|
|
@@ -261,6 +262,17 @@ export default {
|
|
|
261
262
|
type: String,
|
|
262
263
|
default: 'cards',
|
|
263
264
|
},
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Board look: how the Active switch is named. `state` names it
|
|
268
|
+
* Active or Paused after the flow; `fixed` always names it Active
|
|
269
|
+
* and the switch shows the state (DqFlow). Manifest key
|
|
270
|
+
* `config.toggleLabel`.
|
|
271
|
+
*/
|
|
272
|
+
toggleLabel: {
|
|
273
|
+
type: String,
|
|
274
|
+
default: 'state',
|
|
275
|
+
},
|
|
264
276
|
},
|
|
265
277
|
|
|
266
278
|
/**
|
|
@@ -400,6 +400,13 @@ button.cn-linked-widget__link {
|
|
|
400
400
|
text-decoration: underline;
|
|
401
401
|
}
|
|
402
402
|
|
|
403
|
+
/* The class twice: Nextcloud's `button:not(.button-vue, ...)` rule (0,2,1)
|
|
404
|
+
gives every button a 3px margin that a single scoped class cannot take back. */
|
|
405
|
+
button.cn-linked-widget__link.cn-linked-widget__link,
|
|
406
|
+
.cn-linked-widget__action.cn-linked-widget__action {
|
|
407
|
+
margin: 0;
|
|
408
|
+
}
|
|
409
|
+
|
|
403
410
|
.cn-linked-widget__empty {
|
|
404
411
|
color: var(--color-text-maxcontrast);
|
|
405
412
|
font-size: 13px;
|