@conduction/nextcloud-vue 2.67.0 → 2.69.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.
Files changed (91) hide show
  1. package/dist/esm/components/CnContextMenu/CnContextMenu.vue2.js +37 -26
  2. package/dist/esm/components/CnContextMenu/CnContextMenu.vue2.js.map +1 -1
  3. package/dist/esm/components/CnContextMenu/CnContextMenu.vue3.js +3 -3
  4. package/dist/esm/components/CnContextMenu/CnContextMenu.vue3.js.map +1 -1
  5. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +21 -35
  6. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
  7. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +17 -0
  8. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
  9. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +40 -3
  10. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
  11. package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js +58 -16
  12. package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
  13. package/dist/esm/components/CnFormDialog/CnFormDialog.vue2.js +87 -18
  14. package/dist/esm/components/CnFormDialog/CnFormDialog.vue2.js.map +1 -1
  15. package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js +6 -1
  16. package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js.map +1 -1
  17. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +58 -48
  18. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
  19. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +2 -2
  20. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
  21. package/dist/esm/components/CnIndexPage/defaultActions.js +6 -7
  22. package/dist/esm/components/CnIndexPage/defaultActions.js.map +1 -1
  23. package/dist/esm/components/CnRowActions/CnRowActions.vue2.js +33 -34
  24. package/dist/esm/components/CnRowActions/CnRowActions.vue2.js.map +1 -1
  25. package/dist/esm/components/CnRowActions/CnRowActions.vue3.js +3 -3
  26. package/dist/esm/components/CnRowActions/CnRowActions.vue3.js.map +1 -1
  27. package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue2.js +8 -2
  28. package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue2.js.map +1 -1
  29. package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue3.js.map +1 -1
  30. package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js +2 -2
  31. package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js.map +1 -1
  32. package/dist/esm/components/CnStatWidget/CnStatWidget.vue3.js.map +1 -1
  33. package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget.vue2.js +70 -1
  34. package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget.vue2.js.map +1 -1
  35. package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget.vue3.js +23 -3
  36. package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget.vue3.js.map +1 -1
  37. package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue2.js +3 -2
  38. package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue2.js.map +1 -1
  39. package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue3.js.map +1 -1
  40. package/dist/esm/composables/useContextMenu.js +4 -2
  41. package/dist/esm/composables/useContextMenu.js.map +1 -1
  42. package/dist/esm/l10n/en.json.js +3 -0
  43. package/dist/esm/l10n/en.json.js.map +1 -1
  44. package/dist/esm/l10n/nl.json.js +3 -0
  45. package/dist/esm/l10n/nl.json.js.map +1 -1
  46. package/dist/esm/mixins/pageViews.js +278 -11
  47. package/dist/esm/mixins/pageViews.js.map +1 -1
  48. package/dist/esm/store/plugins/dashboardLayouts.js +35 -1
  49. package/dist/esm/store/plugins/dashboardLayouts.js.map +1 -1
  50. package/dist/esm/utils/formatMetric.js +137 -16
  51. package/dist/esm/utils/formatMetric.js.map +1 -1
  52. package/dist/esm/utils/resolveRowActions.js +130 -0
  53. package/dist/esm/utils/resolveRowActions.js.map +1 -0
  54. package/dist/esm/utils/rowActionItem.js +104 -0
  55. package/dist/esm/utils/rowActionItem.js.map +1 -0
  56. package/dist/esm/utils/timelineEvents.js +44 -1
  57. package/dist/esm/utils/timelineEvents.js.map +1 -1
  58. package/dist/esm/utils/validateManifest.js +59 -3
  59. package/dist/esm/utils/validateManifest.js.map +1 -1
  60. package/dist/esm/utils/validateManifestV2.compiled.js +2 -2
  61. package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
  62. package/dist/nextcloud-vue.cjs.js +1251 -232
  63. package/dist/nextcloud-vue.cjs.js.map +2 -2
  64. package/l10n/en.json +3 -0
  65. package/l10n/nl.json +3 -0
  66. package/package.json +1 -1
  67. package/scripts/.jsdoc-baselines.json +2 -2
  68. package/src/components/CnContextMenu/CnContextMenu.vue +40 -29
  69. package/src/components/CnDashboardPage/CnDashboardPage.md +2 -0
  70. package/src/components/CnDashboardPage/CnDashboardPage.vue +34 -35
  71. package/src/components/CnDetailPage/CnDetailPage.md +6 -0
  72. package/src/components/CnDetailPage/CnDetailPage.vue +67 -5
  73. package/src/components/CnFormDialog/CnFormDialog.vue +92 -18
  74. package/src/components/CnIndexPage/CnIndexPage.md +21 -0
  75. package/src/components/CnIndexPage/CnIndexPage.vue +61 -51
  76. package/src/components/CnIndexPage/defaultActions.js +6 -7
  77. package/src/components/CnRowActions/CnRowActions.vue +36 -37
  78. package/src/components/CnSetupWizard/CnSetupWizard.vue +8 -2
  79. package/src/components/CnStatWidget/CnStatWidget.vue +2 -2
  80. package/src/components/CnStatsBlockWidget/CnStatsBlockWidget.vue +82 -3
  81. package/src/components/CnTimelineWidget/CnTimelineWidget.vue +3 -2
  82. package/src/composables/useContextMenu.js +4 -2
  83. package/src/mixins/pageViews.js +277 -10
  84. package/src/schemas/app-manifest-v2.schema.json +73 -9
  85. package/src/store/plugins/dashboardLayouts.js +34 -0
  86. package/src/utils/formatMetric.js +143 -15
  87. package/src/utils/resolveRowActions.js +127 -0
  88. package/src/utils/rowActionItem.js +100 -0
  89. package/src/utils/timelineEvents.js +43 -0
  90. package/src/utils/validateManifest.js +60 -3
  91. package/src/utils/validateManifestV2.compiled.js +2 -2
@@ -5,6 +5,7 @@ import { NcActionButton, NcActionCaption, NcActionLink, NcActionSeparator, NcBut
5
5
  import { ref, provide, watch } from 'vue';
6
6
  import AlertCircleOutline from 'vue-material-design-icons/AlertCircleOutline.vue';
7
7
  import ArrowLeft from 'vue-material-design-icons/ArrowLeft.vue';
8
+ import Check from 'vue-material-design-icons/Check.vue';
8
9
  import ChevronLeft from 'vue-material-design-icons/ChevronLeft.vue';
9
10
  import ChevronRight from 'vue-material-design-icons/ChevronRight.vue';
10
11
  import Cog from 'vue-material-design-icons/Cog.vue';
@@ -13,6 +14,7 @@ import InformationOutline from 'vue-material-design-icons/InformationOutline.vue
13
14
  import Pencil from 'vue-material-design-icons/Pencil.vue';
14
15
  import Plus from 'vue-material-design-icons/Plus.vue';
15
16
  import Refresh from 'vue-material-design-icons/Refresh.vue';
17
+ import Restore from 'vue-material-design-icons/Restore.vue';
16
18
  import ViewDashboardOutline from 'vue-material-design-icons/ViewDashboardOutline.vue';
17
19
  import __sfc_main$i from '../../dialogs/CnRelationLinkModal.vue.js';
18
20
  import __sfc_main$h from '../../dialogs/CnWidgetStyleEditorModal.vue.js';
@@ -201,9 +203,11 @@ var script = {
201
203
  CnTranslatedBadge: __sfc_main$g,
202
204
  CnWidgetStyleEditorModal: __sfc_main$h,
203
205
  CnRelationLinkModal: __sfc_main$i,
206
+ Check,
204
207
  Cog,
205
208
  Plus,
206
209
  Pencil,
210
+ Restore,
207
211
  },
208
212
 
209
213
  mixins: [gridLayout, pageViews],
@@ -696,6 +700,20 @@ var script = {
696
700
  default: '',
697
701
  },
698
702
 
703
+ /**
704
+ * Whether the user arranges each view (`views`) for themselves. On,
705
+ * the header offers Arrange view next to the view switch; the
706
+ * arrangement is stored per view and per user (the server, mirrored
707
+ * in the browser) and a reset returns the view to its manifest
708
+ * layout. Off (the default), a view renders as the manifest says.
709
+ *
710
+ * @type {boolean}
711
+ */
712
+ userLayout: {
713
+ type: Boolean,
714
+ default: false,
715
+ },
716
+
699
717
  /**
700
718
  * Whether the Refresh entry renders in the page-header menu.
701
719
  * Tri-state:
@@ -1346,6 +1364,8 @@ var script = {
1346
1364
 
1347
1365
  data() {
1348
1366
  return {
1367
+ /** Whether the user is arranging the chosen view (`userLayout`). */
1368
+ arrangingView: false,
1349
1369
  /** Whether the record edit form is open. */
1350
1370
  editFormOpen: false,
1351
1371
  /**
@@ -2516,7 +2536,7 @@ var script = {
2516
2536
  viewDisplayLayout() {
2517
2537
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- reading the flag IS the effect, as in bodyGridLayout
2518
2538
  this.editingBody;
2519
- return this.activeView ? this.closeDroppedRows(this.activeView.layout) : []
2539
+ return this.activeView ? this.closeDroppedRows(this.activeViewLayout) : []
2520
2540
  },
2521
2541
 
2522
2542
  /**
@@ -2534,16 +2554,18 @@ var script = {
2534
2554
  * chosen view's grid in the region the view switch controls (left out
2535
2555
  * when the view is empty; the empty state takes the region then).
2536
2556
  *
2537
- * @return {Array<{key: string, view: boolean, layout: Array<object>, attrs: object}>}
2557
+ * @return {Array<{key: string, view: boolean, layout: Array<object>, editable: boolean, attrs: object}>}
2538
2558
  * @spec openspec/changes/view-switch-containers/specs/view-switch-containers/spec.md#requirement-a-page-declares-views-that-each-hold-a-widget-grid
2539
2559
  */
2540
2560
  bodyGridSections() {
2541
- const sections = this.hasBodyGrid ? [{ key: 'body', view: false, layout: this.bodyGridLayout, attrs: {} }] : [];
2561
+ const sections = this.hasBodyGrid ? [{ key: 'body', view: false, layout: this.bodyGridLayout, editable: this.editingBody, attrs: {} }] : [];
2542
2562
  if (this.hasViews && !this.viewIsEmpty) {
2543
2563
  sections.push({
2544
2564
  key: `view-${this.activeViewId}`,
2545
2565
  view: true,
2546
2566
  layout: this.viewDisplayLayout,
2567
+ // The user arranges the view while Arrange view is on.
2568
+ editable: this.editingBody || this.arrangingView,
2547
2569
  attrs: {
2548
2570
  id: this.viewRegionId,
2549
2571
  role: 'region',
@@ -2868,6 +2890,21 @@ var script = {
2868
2890
  },
2869
2891
 
2870
2892
  methods: {
2893
+ /**
2894
+ * Start or finish arranging the chosen view. Finishing stores the
2895
+ * arrangement of every view the user moved, once.
2896
+ *
2897
+ * @return {void}
2898
+ * @spec openspec/changes/page-view-user-layouts/specs/view-switch-containers/spec.md#requirement-a-user-arranges-each-view-for-themselves
2899
+ */
2900
+ toggleArrangeView() {
2901
+ const leaving = this.arrangingView;
2902
+ this.arrangingView = !this.arrangingView;
2903
+ if (leaving) {
2904
+ this.saveViewUserLayouts();
2905
+ }
2906
+ },
2907
+
2871
2908
  // Expose the shared grid helpers to the template (grid mode + auto-body).
2872
2909
  cnGridCellStyle,
2873
2910
  hasGridRow,