@conduction/nextcloud-vue 2.68.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 (43) hide show
  1. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +21 -35
  2. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
  3. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +17 -0
  4. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
  5. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +40 -3
  6. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
  7. package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js +58 -16
  8. package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
  9. package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js +2 -2
  10. package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js.map +1 -1
  11. package/dist/esm/components/CnStatWidget/CnStatWidget.vue3.js.map +1 -1
  12. package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget.vue2.js +70 -1
  13. package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget.vue2.js.map +1 -1
  14. package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget.vue3.js +23 -3
  15. package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget.vue3.js.map +1 -1
  16. package/dist/esm/l10n/en.json.js +3 -0
  17. package/dist/esm/l10n/en.json.js.map +1 -1
  18. package/dist/esm/l10n/nl.json.js +3 -0
  19. package/dist/esm/l10n/nl.json.js.map +1 -1
  20. package/dist/esm/mixins/pageViews.js +278 -11
  21. package/dist/esm/mixins/pageViews.js.map +1 -1
  22. package/dist/esm/store/plugins/dashboardLayouts.js +35 -1
  23. package/dist/esm/store/plugins/dashboardLayouts.js.map +1 -1
  24. package/dist/esm/utils/formatMetric.js +137 -16
  25. package/dist/esm/utils/formatMetric.js.map +1 -1
  26. package/dist/esm/utils/validateManifestV2.compiled.js +2 -2
  27. package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
  28. package/dist/nextcloud-vue.cjs.js +678 -83
  29. package/dist/nextcloud-vue.cjs.js.map +2 -2
  30. package/l10n/en.json +3 -0
  31. package/l10n/nl.json +3 -0
  32. package/package.json +1 -1
  33. package/src/components/CnDashboardPage/CnDashboardPage.md +2 -0
  34. package/src/components/CnDashboardPage/CnDashboardPage.vue +34 -35
  35. package/src/components/CnDetailPage/CnDetailPage.md +6 -0
  36. package/src/components/CnDetailPage/CnDetailPage.vue +67 -5
  37. package/src/components/CnStatWidget/CnStatWidget.vue +2 -2
  38. package/src/components/CnStatsBlockWidget/CnStatsBlockWidget.vue +82 -3
  39. package/src/mixins/pageViews.js +277 -10
  40. package/src/schemas/app-manifest-v2.schema.json +28 -2
  41. package/src/store/plugins/dashboardLayouts.js +34 -0
  42. package/src/utils/formatMetric.js +143 -15
  43. package/src/utils/validateManifestV2.compiled.js +2 -2
@@ -1,4 +1,4 @@
1
- import { resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, createBlock, renderSlot, createElementVNode, Fragment, renderList, createVNode, withCtx, createTextVNode, createSlots, mergeProps } from 'vue';
1
+ import { resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, createBlock, renderSlot, createElementVNode, Fragment, renderList, withCtx, createTextVNode, createVNode, createSlots, mergeProps } from 'vue';
2
2
 
3
3
  const _hoisted_1 = ["href"];
4
4
  const _hoisted_2 = { class: "cn-detail-page__header-left" };
@@ -20,7 +20,7 @@ const _hoisted_7 = {
20
20
  };
21
21
  const _hoisted_8 = { class: "cn-detail-page__header-actions" };
22
22
  const _hoisted_9 = {
23
- key: 1,
23
+ key: 3,
24
24
  class: "cn-detail-page__list-nav",
25
25
  "data-testid": "cn-detail-page-list-nav"
26
26
  };
@@ -115,12 +115,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
115
115
  const _component_CnTranslatedBadge = resolveComponent("CnTranslatedBadge");
116
116
  const _component_CnSummaryAggregates = resolveComponent("CnSummaryAggregates");
117
117
  const _component_CnSegmentedControl = resolveComponent("CnSegmentedControl");
118
- const _component_ChevronLeft = resolveComponent("ChevronLeft");
118
+ const _component_Check = resolveComponent("Check");
119
+ const _component_Pencil = resolveComponent("Pencil");
119
120
  const _component_NcButton = resolveComponent("NcButton");
121
+ const _component_Restore = resolveComponent("Restore");
122
+ const _component_ChevronLeft = resolveComponent("ChevronLeft");
120
123
  const _component_ChevronRight = resolveComponent("ChevronRight");
121
124
  const _component_CnLifecycleActions = resolveComponent("CnLifecycleActions");
122
125
  const _component_CnActionButtons = resolveComponent("CnActionButtons");
123
- const _component_Pencil = resolveComponent("Pencil");
124
126
  const _component_CnBuildiqEditButton = resolveComponent("CnBuildiqEditButton");
125
127
  const _component_NcActionSeparator = resolveComponent("NcActionSeparator");
126
128
  const _component_NcActionCaption = resolveComponent("NcActionCaption");
@@ -251,6 +253,46 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
251
253
  "onUpdate:modelValue": _ctx.selectView
252
254
  }, null, 8 /* PROPS */, ["options", "modelValue", "ariaLabel", "controls", "onUpdate:modelValue"]))
253
255
  : createCommentVNode("v-if", true),
256
+ ($props.userLayout && _ctx.viewUserLayoutOn && !$options.viewIsEmpty)
257
+ ? (openBlock(), createBlock(_component_NcButton, {
258
+ key: 1,
259
+ variant: $data.arrangingView ? 'primary' : 'secondary',
260
+ "data-testid": "cn-detail-page-arrange-view",
261
+ onClick: $options.toggleArrangeView
262
+ }, {
263
+ icon: withCtx(() => [
264
+ ($data.arrangingView)
265
+ ? (openBlock(), createBlock(_component_Check, {
266
+ key: 0,
267
+ size: 20
268
+ }))
269
+ : (openBlock(), createBlock(_component_Pencil, {
270
+ key: 1,
271
+ size: 20
272
+ }))
273
+ ]),
274
+ default: withCtx(() => [
275
+ createTextVNode(" " + toDisplayString($data.arrangingView ? _ctx.t('nextcloud-vue', 'Done') : _ctx.t('nextcloud-vue', 'Arrange view')), 1 /* TEXT */)
276
+ ]),
277
+ _: 1 /* STABLE */
278
+ }, 8 /* PROPS */, ["variant", "onClick"]))
279
+ : createCommentVNode("v-if", true),
280
+ (_ctx.viewUserLayoutOn && $data.arrangingView)
281
+ ? (openBlock(), createBlock(_component_NcButton, {
282
+ key: 2,
283
+ variant: "tertiary",
284
+ "data-testid": "cn-detail-page-reset-view",
285
+ onClick: _cache[1] || (_cache[1] = $event => (_ctx.resetViewUserLayout()))
286
+ }, {
287
+ icon: withCtx(() => [
288
+ createVNode(_component_Restore, { size: 20 })
289
+ ]),
290
+ default: withCtx(() => [
291
+ createTextVNode(" " + toDisplayString(_ctx.t('nextcloud-vue', 'Reset view')), 1 /* TEXT */)
292
+ ]),
293
+ _: 1 /* STABLE */
294
+ }))
295
+ : createCommentVNode("v-if", true),
254
296
  ($props.listNavigation && $props.listNavigation.available)
255
297
  ? (openBlock(), createElementBlock("div", _hoisted_9, [
256
298
  createVNode(_component_NcButton, {
@@ -260,7 +302,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
260
302
  "aria-label": $options.previousRecordLabel,
261
303
  title: $options.previousRecordLabel,
262
304
  "data-testid": "cn-detail-page-previous",
263
- onClick: _cache[1] || (_cache[1] = $event => ($options.onListStep('previous-record', $props.previousTo, $event)))
305
+ onClick: _cache[2] || (_cache[2] = $event => ($options.onListStep('previous-record', $props.previousTo, $event)))
264
306
  }, {
265
307
  icon: withCtx(() => [
266
308
  createVNode(_component_ChevronLeft, { size: 20 })
@@ -275,7 +317,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
275
317
  "aria-label": $options.nextRecordLabel,
276
318
  title: $options.nextRecordLabel,
277
319
  "data-testid": "cn-detail-page-next",
278
- onClick: _cache[2] || (_cache[2] = $event => ($options.onListStep('next-record', $props.nextTo, $event)))
320
+ onClick: _cache[3] || (_cache[3] = $event => ($options.onListStep('next-record', $props.nextTo, $event)))
279
321
  }, {
280
322
  icon: withCtx(() => [
281
323
  createVNode(_component_ChevronRight, { size: 20 })
@@ -286,7 +328,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
286
328
  : createCommentVNode("v-if", true),
287
329
  ($options.effectivePrimaryLabel && !$options.showsNextStepCard)
288
330
  ? (openBlock(), createBlock(_component_NcButton, {
289
- key: 2,
331
+ key: 4,
290
332
  id: $options.primaryActionAnchorId,
291
333
  ref: "primaryActionButton",
292
334
  variant: "primary",
@@ -333,24 +375,24 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
333
375
  }), 128 /* KEYED_FRAGMENT */)),
334
376
  ($options.showsLifecycleActions)
335
377
  ? (openBlock(), createBlock(_component_CnLifecycleActions, {
336
- key: 3,
378
+ key: 5,
337
379
  objectId: $props.objectId,
338
380
  object: $options.currentObject,
339
381
  config: $props.lifecycleActions,
340
382
  schema: $options.currentSchema,
341
383
  display: "menu",
342
- onEntries: _cache[3] || (_cache[3] = $event => ($data.lifecycleMenuEntries = $event)),
384
+ onEntries: _cache[4] || (_cache[4] = $event => ($data.lifecycleMenuEntries = $event)),
343
385
  onTransitioned: $options.onTransitioned,
344
386
  onReload: $options.onLifecycleReload
345
387
  }, null, 8 /* PROPS */, ["objectId", "object", "config", "schema", "onTransitioned", "onReload"]))
346
388
  : createCommentVNode("v-if", true),
347
389
  ($options.effectiveHeaderActions.length > 0)
348
390
  ? (openBlock(), createBlock(_component_CnActionButtons, {
349
- key: 4,
391
+ key: 6,
350
392
  actions: $options.effectiveHeaderActions,
351
393
  display: "menu",
352
394
  "data-testid": "cn-detail-page-header-actions",
353
- onEntries: _cache[4] || (_cache[4] = $event => ($data.menuHeaderActions = $event)),
395
+ onEntries: _cache[5] || (_cache[5] = $event => ($data.menuHeaderActions = $event)),
354
396
  onCreated: $options.onLifecycleReload
355
397
  }, null, 8 /* PROPS */, ["actions", "onCreated"]))
356
398
  : createCommentVNode("v-if", true),
@@ -365,7 +407,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
365
407
  }),
366
408
  ($options.canEditRecord && !$options.foldsEditIntoActions)
367
409
  ? (openBlock(), createBlock(_component_NcButton, {
368
- key: 5,
410
+ key: 7,
369
411
  variant: "secondary",
370
412
  "data-testid": "cn-detail-page-edit",
371
413
  "aria-label": $options.editActionLabel,
@@ -686,10 +728,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
686
728
  : createCommentVNode("v-if", true),
687
729
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.bodyGridSections, (section) => {
688
730
  return (openBlock(), createBlock(_component_CnDashboardGrid, mergeProps({
689
- key: `cn-detail-grid-${section.key}-${$options.editingBody ? 'editing' : 'live'}`
731
+ key: `cn-detail-grid-${section.key}-${section.editable ? 'editing' : 'live'}`
690
732
  }, { ref_for: true }, section.attrs, {
691
733
  layout: section.layout,
692
- editable: $options.editingBody,
734
+ editable: section.editable,
693
735
  columns: 12,
694
736
  columnOpts: $props.columnOpts,
695
737
  class: "cn-detail-page__grid",
@@ -944,7 +986,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
944
986
  deletable: true,
945
987
  onSave: $options.onWidgetConfigSave,
946
988
  onDelete: $options.onWidgetConfigDelete,
947
- onClose: _cache[5] || (_cache[5] = $event => ($data.showWidgetConfig = false))
989
+ onClose: _cache[6] || (_cache[6] = $event => ($data.showWidgetConfig = false))
948
990
  }, null, 8 /* PROPS */, ["show", "widget", "onSave", "onDelete"]))
949
991
  : createCommentVNode("v-if", true),
950
992
  renderSlot(_ctx.$slots, "form-dialog", {
@@ -1002,7 +1044,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1002
1044
  currentObject: $options.currentObject || {},
1003
1045
  fkField: $data.activeRelationLink.fkField,
1004
1046
  onLinked: $options.onRelationLinked,
1005
- onClose: _cache[6] || (_cache[6] = $event => ($data.activeRelationLink = null))
1047
+ onClose: _cache[7] || (_cache[7] = $event => ($data.activeRelationLink = null))
1006
1048
  }, null, 8 /* PROPS */, ["title", "selectLabel", "register", "schema", "labelField", "allowCreate", "currentType", "currentObject", "fkField", "onLinked"]))
1007
1049
  : createCommentVNode("v-if", true)
1008
1050
  ], 6 /* CLASS, STYLE */))