@conduction/nextcloud-vue 2.65.0 → 2.66.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 (61) hide show
  1. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +99 -2
  2. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
  3. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +438 -383
  4. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
  5. package/dist/esm/components/CnDataTable/CnColumnFilterPopover.vue2.js +9 -3
  6. package/dist/esm/components/CnDataTable/CnColumnFilterPopover.vue2.js.map +1 -1
  7. package/dist/esm/components/CnDataTable/CnColumnFilterPopover.vue3.js +1 -1
  8. package/dist/esm/components/CnDataTable/CnColumnFilterPopover.vue3.js.map +1 -1
  9. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +78 -21
  10. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
  11. package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js +129 -96
  12. package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
  13. package/dist/esm/components/CnFkResolveCell/CnFkResolveCell.vue2.js +3 -1
  14. package/dist/esm/components/CnFkResolveCell/CnFkResolveCell.vue2.js.map +1 -1
  15. package/dist/esm/components/CnFormDialog/CnFormDialog.vue2.js +144 -4
  16. package/dist/esm/components/CnFormDialog/CnFormDialog.vue2.js.map +1 -1
  17. package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js.map +1 -1
  18. package/dist/esm/components/CnHeaderWidget/CnHeaderWidget.vue2.js +63 -7
  19. package/dist/esm/components/CnHeaderWidget/CnHeaderWidget.vue2.js.map +1 -1
  20. package/dist/esm/components/CnHeaderWidget/CnHeaderWidget.vue3.js +2 -1
  21. package/dist/esm/components/CnHeaderWidget/CnHeaderWidget.vue3.js.map +1 -1
  22. package/dist/esm/components/CnSegmentedControl/CnSegmentedControl.vue2.js +11 -0
  23. package/dist/esm/components/CnSegmentedControl/CnSegmentedControl.vue2.js.map +1 -1
  24. package/dist/esm/components/CnSegmentedControl/CnSegmentedControl.vue3.js +2 -1
  25. package/dist/esm/components/CnSegmentedControl/CnSegmentedControl.vue3.js.map +1 -1
  26. package/dist/esm/l10n/en.json.js +3 -0
  27. package/dist/esm/l10n/en.json.js.map +1 -1
  28. package/dist/esm/l10n/nl.json.js +3 -0
  29. package/dist/esm/l10n/nl.json.js.map +1 -1
  30. package/dist/esm/mixins/pageViews.js +400 -0
  31. package/dist/esm/mixins/pageViews.js.map +1 -0
  32. package/dist/esm/nextcloud-vue.css +18 -0
  33. package/dist/esm/utils/actionsDispatcher.js +11 -2
  34. package/dist/esm/utils/actionsDispatcher.js.map +1 -1
  35. package/dist/esm/utils/columnFilters.js +27 -3
  36. package/dist/esm/utils/columnFilters.js.map +1 -1
  37. package/dist/esm/utils/schema.js +40 -2
  38. package/dist/esm/utils/schema.js.map +1 -1
  39. package/dist/esm/utils/validateManifestV2.compiled.js +2 -2
  40. package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
  41. package/dist/nextcloud-vue.cjs.js +1521 -596
  42. package/dist/nextcloud-vue.cjs.js.map +2 -2
  43. package/dist/nextcloud-vue.css +18 -0
  44. package/l10n/en.json +3 -0
  45. package/l10n/nl.json +3 -0
  46. package/package.json +1 -1
  47. package/src/components/CnDashboardPage/CnDashboardPage.vue +165 -8
  48. package/src/components/CnDataTable/CnColumnFilterPopover.vue +11 -5
  49. package/src/components/CnDetailPage/CnDetailPage.vue +94 -5
  50. package/src/components/CnFkResolveCell/CnFkResolveCell.vue +3 -1
  51. package/src/components/CnFormDialog/CnFormDialog.vue +144 -4
  52. package/src/components/CnHeaderWidget/CnHeaderWidget.vue +67 -8
  53. package/src/components/CnSegmentedControl/CnSegmentedControl.md +1 -1
  54. package/src/components/CnSegmentedControl/CnSegmentedControl.vue +12 -0
  55. package/src/css/detail-page.css +5 -0
  56. package/src/mixins/pageViews.js +396 -0
  57. package/src/schemas/app-manifest-v2.schema.json +29 -1
  58. package/src/utils/actionsDispatcher.js +11 -2
  59. package/src/utils/columnFilters.js +29 -2
  60. package/src/utils/schema.js +40 -2
  61. package/src/utils/validateManifestV2.compiled.js +2 -2
@@ -1,4 +1,4 @@
1
- import { resolveComponent, openBlock, createElementBlock, toDisplayString, createCommentVNode, createElementVNode, renderSlot, createBlock, withCtx, createTextVNode, createVNode, createSlots, normalizeClass, Fragment, renderList, mergeProps, resolveDynamicComponent, normalizeProps } from 'vue';
1
+ import { resolveComponent, openBlock, createElementBlock, toDisplayString, createCommentVNode, createElementVNode, renderSlot, createBlock, withCtx, createTextVNode, createVNode, createSlots, normalizeClass, Fragment, renderList, mergeProps, resolveDynamicComponent } from 'vue';
2
2
 
3
3
  const _hoisted_1 = {
4
4
  class: "cn-dashboard-page",
@@ -48,31 +48,37 @@ const _hoisted_14 = {
48
48
  class: "cn-dashboard-page__content"
49
49
  };
50
50
  const _hoisted_15 = {
51
+ key: 9,
52
+ class: "cn-dashboard-page__view-switch"
53
+ };
54
+ const _hoisted_16 = {
51
55
  key: 0,
52
56
  class: "cn-dashboard-page__widget-edit"
53
57
  };
54
- const _hoisted_16 = ["title"];
55
- const _hoisted_17 = {
58
+ const _hoisted_17 = ["title"];
59
+ const _hoisted_18 = {
56
60
  key: 1,
57
61
  class: "cn-dashboard-page__date-chip-preset-spacer"
58
62
  };
59
- const _hoisted_18 = ["title"];
60
- const _hoisted_19 = {
63
+ const _hoisted_19 = ["title"];
64
+ const _hoisted_20 = {
61
65
  key: 1,
62
66
  class: "cn-dashboard-page__date-chip-preset-spacer"
63
67
  };
64
- const _hoisted_20 = {
68
+ const _hoisted_21 = {
65
69
  key: 2,
66
70
  class: "cn-dashboard-page__unknown"
67
71
  };
68
- const _hoisted_21 = ["title"];
69
- const _hoisted_22 = {
72
+ const _hoisted_22 = ["title"];
73
+ const _hoisted_23 = {
70
74
  key: 1,
71
75
  class: "cn-dashboard-page__date-chip-preset-spacer"
72
76
  };
73
- const _hoisted_23 = { class: "cn-dashboard-page__unknown" };
77
+ const _hoisted_24 = { class: "cn-dashboard-page__unknown" };
78
+ const _hoisted_25 = ["id", "aria-label"];
74
79
 
75
80
  function render(_ctx, _cache, $props, $setup, $data, $options) {
81
+ const _component_CnSegmentedControl = resolveComponent("CnSegmentedControl");
76
82
  const _component_CnActionButtons = resolveComponent("CnActionButtons");
77
83
  const _component_Pencil = resolveComponent("Pencil");
78
84
  const _component_Check = resolveComponent("Check");
@@ -122,9 +128,21 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
122
128
  : createCommentVNode("v-if", true)
123
129
  ]),
124
130
  createElementVNode("div", _hoisted_8, [
131
+ (_ctx.showsPageViewSwitch)
132
+ ? (openBlock(), createBlock(_component_CnSegmentedControl, {
133
+ key: 0,
134
+ class: "cn-page-view-switch",
135
+ options: _ctx.viewSwitchOptions,
136
+ modelValue: _ctx.activeViewId,
137
+ ariaLabel: _ctx.viewSwitchLabel,
138
+ controls: _ctx.viewRegionId,
139
+ "data-testid": "cn-dashboard-page-view-switch",
140
+ "onUpdate:modelValue": _ctx.selectView
141
+ }, null, 8 /* PROPS */, ["options", "modelValue", "ariaLabel", "controls", "onUpdate:modelValue"]))
142
+ : createCommentVNode("v-if", true),
125
143
  ($props.headerActions && $props.headerActions.length)
126
144
  ? (openBlock(), createBlock(_component_CnActionButtons, {
127
- key: 0,
145
+ key: 1,
128
146
  actions: $props.headerActions,
129
147
  "data-testid": "cn-dashboard-page-header-actions"
130
148
  }, null, 8 /* PROPS */, ["actions"]))
@@ -133,7 +151,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
133
151
  renderSlot(_ctx.$slots, "actions"),
134
152
  ($props.allowEdit)
135
153
  ? (openBlock(), createBlock(_component_NcButton, {
136
- key: 1,
154
+ key: 2,
137
155
  variant: $data.isEditing ? 'primary' : 'secondary',
138
156
  onClick: $options.toggleEdit
139
157
  }, {
@@ -290,7 +308,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
290
308
  ? (openBlock(), createBlock(_component_NcLoadingIcon, { key: 5 }))
291
309
  : (!$data.widgetConditionsSettled && !$options.gridEditable)
292
310
  ? (openBlock(), createBlock(_component_NcLoadingIcon, { key: 6 }))
293
- : (!$options.hasWidgets && !$options.hasBodyWidgets)
311
+ : (!$options.hasWidgets && !$options.hasBodyWidgets && !_ctx.hasViews)
294
312
  ? (openBlock(), createElementBlock("div", _hoisted_13, [
295
313
  renderSlot(_ctx.$slots, "empty", {}, () => [
296
314
  createVNode(_component_NcEmptyContent, { description: $props.emptyLabel }, {
@@ -311,219 +329,420 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
311
329
  }, null, 8 /* PROPS */, ["refUri"]))
312
330
  }), 128 /* KEYED_FRAGMENT */))
313
331
  ]))
314
- : (openBlock(), createBlock(_component_CnDashboardGrid, {
315
- key: `cn-dashboard-grid-${$options.gridEditable ? 'editing' : 'live'}`,
316
- layout: $options.displayLayout,
317
- editable: $options.gridEditable,
318
- columns: $props.columns,
319
- cellHeight: $props.cellHeight,
320
- margin: $props.gridMargin,
321
- onLayoutChange: $options.onLayoutChange
332
+ : createCommentVNode("v-if", true),
333
+ ($options.gridSectionsShown && !$props.showHeader && _ctx.showsPageViewSwitch)
334
+ ? (openBlock(), createElementBlock("div", _hoisted_15, [
335
+ createVNode(_component_CnSegmentedControl, {
336
+ class: "cn-page-view-switch",
337
+ options: _ctx.viewSwitchOptions,
338
+ modelValue: _ctx.activeViewId,
339
+ ariaLabel: _ctx.viewSwitchLabel,
340
+ controls: _ctx.viewRegionId,
341
+ "data-testid": "cn-dashboard-page-view-switch",
342
+ "onUpdate:modelValue": _ctx.selectView
343
+ }, null, 8 /* PROPS */, ["options", "modelValue", "ariaLabel", "controls", "onUpdate:modelValue"])
344
+ ]))
345
+ : createCommentVNode("v-if", true),
346
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.gridSections, (section) => {
347
+ return (openBlock(), createBlock(_component_CnDashboardGrid, mergeProps({
348
+ key: `cn-dashboard-grid-${section.key}-${$options.gridEditable ? 'editing' : 'live'}`
349
+ }, { ref_for: true }, section.attrs, {
350
+ layout: section.layout,
351
+ editable: section.editable,
352
+ columns: $props.columns,
353
+ cellHeight: $props.cellHeight,
354
+ margin: $props.gridMargin,
355
+ onLayoutChange: $event => (section.view ? _ctx.onViewLayoutChange($event) : $options.onLayoutChange($event))
356
+ }), {
357
+ widget: withCtx(({ item }) => [
358
+ ($options.gridEditable)
359
+ ? (openBlock(), createElementBlock("div", _hoisted_16, [
360
+ createVNode(_component_NcButton, {
361
+ variant: "tertiary",
362
+ "aria-label": _ctx.t('nextcloud-vue', 'Configure widget'),
363
+ onClick: $event => ($options.configureWidget(item))
364
+ }, {
365
+ icon: withCtx(() => [
366
+ createVNode(_component_Cog, { size: 18 })
367
+ ]),
368
+ _: 1 /* STABLE */
369
+ }, 8 /* PROPS */, ["aria-label", "onClick"])
370
+ ]))
371
+ : createCommentVNode("v-if", true),
372
+ ($options.missingRequiredApp(item))
373
+ ? (openBlock(), createBlock(_component_CnWidgetWrapper, {
374
+ key: 1,
375
+ title: $options.getWidgetTitle(item),
376
+ showTitle: $options.widgetShowTitle(item)
322
377
  }, {
323
- widget: withCtx(({ item }) => [
324
- ($options.gridEditable)
325
- ? (openBlock(), createElementBlock("div", _hoisted_15, [
326
- createVNode(_component_NcButton, {
327
- variant: "tertiary",
328
- "aria-label": _ctx.t('nextcloud-vue', 'Configure widget'),
329
- onClick: $event => ($options.configureWidget(item))
330
- }, {
331
- icon: withCtx(() => [
332
- createVNode(_component_Cog, { size: 18 })
333
- ]),
334
- _: 1 /* STABLE */
335
- }, 8 /* PROPS */, ["aria-label", "onClick"])
336
- ]))
337
- : createCommentVNode("v-if", true),
338
- ($options.missingRequiredApp(item))
339
- ? (openBlock(), createBlock(_component_CnWidgetWrapper, {
340
- key: 1,
341
- title: $options.getWidgetTitle(item),
342
- showTitle: $options.widgetShowTitle(item)
378
+ default: withCtx(() => [
379
+ createVNode(_component_NcEmptyContent, {
380
+ name: $options.installAppLabel($options.missingRequiredApp(item)),
381
+ description: _ctx.t('nextcloud-vue', 'This widget shows data from another app that isn\'t installed yet.'),
382
+ class: "cn-dashboard-page__requires-app cn-requires-app"
383
+ }, {
384
+ icon: withCtx(() => [
385
+ createVNode(_component_Download, { size: 24 })
386
+ ]),
387
+ action: withCtx(() => [
388
+ createVNode(_component_NcButton, {
389
+ variant: "primary",
390
+ href: $options.appInstallUrl($options.missingRequiredApp(item))
343
391
  }, {
392
+ icon: withCtx(() => [
393
+ createVNode(_component_Download, { size: 18 })
394
+ ]),
344
395
  default: withCtx(() => [
345
- createVNode(_component_NcEmptyContent, {
346
- name: $options.installAppLabel($options.missingRequiredApp(item)),
347
- description: _ctx.t('nextcloud-vue', 'This widget shows data from another app that isn\'t installed yet.'),
348
- class: "cn-dashboard-page__requires-app cn-requires-app"
349
- }, {
350
- icon: withCtx(() => [
351
- createVNode(_component_Download, { size: 24 })
352
- ]),
353
- action: withCtx(() => [
354
- createVNode(_component_NcButton, {
355
- variant: "primary",
356
- href: $options.appInstallUrl($options.missingRequiredApp(item))
396
+ createTextVNode(" " + toDisplayString($options.installAppLabel($options.missingRequiredApp(item))), 1 /* TEXT */)
397
+ ]),
398
+ _: 2 /* DYNAMIC */
399
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["href"])
400
+ ]),
401
+ _: 2 /* DYNAMIC */
402
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["name", "description"])
403
+ ]),
404
+ _: 2 /* DYNAMIC */
405
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["title", "showTitle"]))
406
+ : ($options.isTile(item))
407
+ ? (openBlock(), createBlock(_component_CnTileWidget, {
408
+ key: 2,
409
+ tile: $options.getTileConfig(item)
410
+ }, null, 8 /* PROPS */, ["tile"]))
411
+ : ($options.hasWidgetSlot(item.widgetId))
412
+ ? (openBlock(), createBlock(_component_CnWidgetWrapper, {
413
+ key: 3,
414
+ widgetId: item.widgetId,
415
+ title: $options.getWidgetTitle(item),
416
+ iconUrl: $options.getWidgetIconUrl(item),
417
+ iconClass: $options.getWidgetIconClass(item),
418
+ showTitle: $options.widgetShowTitle(item),
419
+ borderless: $options.widgetBorderless(item),
420
+ flush: item.flush !== false,
421
+ buttons: $options.getWidgetButtons(item),
422
+ headerLink: $options.getWidgetHeaderLink(item),
423
+ styleConfig: item.styleConfig || {},
424
+ titleIconPosition: $options.getWidgetTitleIconPosition(item),
425
+ titleIconColor: $options.getWidgetTitleIconColor(item),
426
+ titleIconVariant: $options.getWidgetTitleIconVariant(item),
427
+ showRefresh: $options.getWidgetShowRefresh(item),
428
+ showActions: $options.widgetShowActions(item),
429
+ documentationUrl: $options.getWidgetDocumentationUrl(item),
430
+ docsAnchor: $options.getWidgetDocsAnchor(item),
431
+ onRefresh: $event => ($options.onWidgetRefresh(item)),
432
+ onRequestFeature: $event => ($options.onWidgetRequestFeature(item))
433
+ }, createSlots({
434
+ default: withCtx(() => [
435
+ renderSlot(_ctx.$slots, 'widget-' + item.widgetId, {
436
+ item: item,
437
+ widget: $options.getWidgetDef(item.widgetId)
438
+ })
439
+ ]),
440
+ _: 2 /* DYNAMIC */
441
+ }, [
442
+ (_ctx.$slots['widget-' + item.widgetId + '-title-icon'])
443
+ ? {
444
+ name: "title-icon",
445
+ fn: withCtx(() => [
446
+ renderSlot(_ctx.$slots, 'widget-' + item.widgetId + '-title-icon', {
447
+ item: item,
448
+ widget: $options.getWidgetDef(item.widgetId)
449
+ })
450
+ ]),
451
+ key: "0"
452
+ }
453
+ : undefined,
454
+ (_ctx.$slots['widget-' + item.widgetId + '-actions'])
455
+ ? {
456
+ name: "actions",
457
+ fn: withCtx(() => [
458
+ renderSlot(_ctx.$slots, 'widget-' + item.widgetId + '-actions', {
459
+ item: item,
460
+ widget: $options.getWidgetDef(item.widgetId)
461
+ })
462
+ ]),
463
+ key: "1"
464
+ }
465
+ : undefined,
466
+ ($options.dateRangeEnabled && item.dateChip === true)
467
+ ? {
468
+ name: "title-meta",
469
+ fn: withCtx(() => [
470
+ createVNode(_component_NcActions, {
471
+ open: $data.openChipPicker[item.widgetId],
472
+ "onUpdate:open": $event => (($data.openChipPicker[item.widgetId]) = $event),
473
+ forceMenu: true,
474
+ container: "body",
475
+ "data-testid": `cn-dashboard-page-date-chip-${item.widgetId}`,
476
+ class: "cn-dashboard-page__date-chip-trigger"
477
+ }, {
478
+ icon: withCtx(() => [
479
+ createElementVNode("span", {
480
+ class: "cn-dashboard-page__date-chip",
481
+ title: $data.dateChipTitle
482
+ }, toDisplayString($options.dashboardRangeChipLabel), 9 /* TEXT, PROPS */, _hoisted_17)
483
+ ]),
484
+ default: withCtx(() => [
485
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.effectivePresets, (preset) => {
486
+ return (openBlock(), createBlock(_component_NcActionButton, {
487
+ key: preset.id,
488
+ closeAfterClick: true,
489
+ onClick: $event => ($options.onChipPresetPick(preset, item))
490
+ }, {
491
+ icon: withCtx(() => [
492
+ ($data.currentRange.preset === preset.id)
493
+ ? (openBlock(), createBlock(_component_CalendarRange, {
494
+ key: 0,
495
+ size: 16
496
+ }))
497
+ : (openBlock(), createElementBlock("span", _hoisted_18))
498
+ ]),
499
+ default: withCtx(() => [
500
+ createTextVNode(" " + toDisplayString(preset.label), 1 /* TEXT */)
501
+ ]),
502
+ _: 2 /* DYNAMIC */
503
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"]))
504
+ }), 128 /* KEYED_FRAGMENT */)),
505
+ createVNode(_component_NcActionSeparator),
506
+ createVNode(_component_NcActionInput, {
507
+ type: "datetime-local",
508
+ isNativePicker: "",
509
+ modelValue: $options.toPickerDate($data.currentRange.from),
510
+ label: _ctx.t('nextcloud-vue', 'From'),
511
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => ($options.onChipDateInput('from', $event)))
512
+ }, null, 8 /* PROPS */, ["modelValue", "label"]),
513
+ createVNode(_component_NcActionInput, {
514
+ type: "datetime-local",
515
+ isNativePicker: "",
516
+ modelValue: $options.toPickerDate($data.currentRange.to),
517
+ label: _ctx.t('nextcloud-vue', 'To'),
518
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => ($options.onChipDateInput('to', $event)))
519
+ }, null, 8 /* PROPS */, ["modelValue", "label"])
520
+ ]),
521
+ _: 2 /* DYNAMIC */
522
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["open", "onUpdate:open", "data-testid"])
523
+ ]),
524
+ key: "2"
525
+ }
526
+ : undefined
527
+ ]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["widgetId", "title", "iconUrl", "iconClass", "showTitle", "borderless", "flush", "buttons", "headerLink", "styleConfig", "titleIconPosition", "titleIconColor", "titleIconVariant", "showRefresh", "showActions", "documentationUrl", "docsAnchor", "onRefresh", "onRequestFeature"]))
528
+ : ($options.isChart(item))
529
+ ? (openBlock(), createBlock(_component_CnWidgetWrapper, {
530
+ key: 4,
531
+ widgetId: item.widgetId,
532
+ class: normalizeClass({ 'cn-dashboard-page__chart-fit': $options.isChartFitted(item) }),
533
+ title: $options.getWidgetTitle(item),
534
+ iconUrl: $options.getWidgetIconUrl(item),
535
+ iconClass: $options.getWidgetIconClass(item),
536
+ showTitle: $options.widgetShowTitle(item),
537
+ showActions: $options.widgetShowActions(item),
538
+ borderless: $options.widgetBorderless(item),
539
+ flush: item.flush !== false,
540
+ buttons: $options.getWidgetButtons(item),
541
+ headerLink: $options.getWidgetHeaderLink(item),
542
+ styleConfig: item.styleConfig || {},
543
+ titleIconPosition: $options.getWidgetTitleIconPosition(item),
544
+ titleIconColor: $options.getWidgetTitleIconColor(item),
545
+ titleIconVariant: $options.getWidgetTitleIconVariant(item),
546
+ showRefresh: $options.getWidgetShowRefresh(item),
547
+ documentationUrl: $options.getWidgetDocumentationUrl(item),
548
+ docsAnchor: $options.getWidgetDocsAnchor(item),
549
+ onRefresh: $event => ($options.onWidgetRefresh(item)),
550
+ onRequestFeature: $event => ($options.onWidgetRequestFeature(item))
551
+ }, createSlots({
552
+ default: withCtx(() => [
553
+ createVNode(_component_CnChartWidget, mergeProps({ ref_for: true }, $options.getChartProps(item), {
554
+ widgetId: item.widgetId,
555
+ "data-source": $options.getWidgetDataSource(item)
556
+ }), null, 16 /* FULL_PROPS */, ["widgetId", "data-source"])
557
+ ]),
558
+ _: 2 /* DYNAMIC */
559
+ }, [
560
+ ($options.dateRangeEnabled && (item.dateChip === true || $options.formatChartDateRange(item)))
561
+ ? {
562
+ name: "title-meta",
563
+ fn: withCtx(() => [
564
+ createVNode(_component_NcActions, {
565
+ open: $data.openChipPicker[item.widgetId],
566
+ "onUpdate:open": $event => (($data.openChipPicker[item.widgetId]) = $event),
567
+ forceMenu: true,
568
+ container: "body",
569
+ "data-testid": `cn-dashboard-page-date-chip-${item.widgetId}`,
570
+ class: "cn-dashboard-page__date-chip-trigger"
357
571
  }, {
358
572
  icon: withCtx(() => [
359
- createVNode(_component_Download, { size: 18 })
573
+ createElementVNode("span", {
574
+ class: "cn-dashboard-page__date-chip",
575
+ title: $data.dateChipTitle
576
+ }, toDisplayString($options.formatChartDateRange(item) || $options.dashboardRangeChipLabel), 9 /* TEXT, PROPS */, _hoisted_19)
360
577
  ]),
361
578
  default: withCtx(() => [
362
- createTextVNode(" " + toDisplayString($options.installAppLabel($options.missingRequiredApp(item))), 1 /* TEXT */)
579
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.effectivePresets, (preset) => {
580
+ return (openBlock(), createBlock(_component_NcActionButton, {
581
+ key: preset.id,
582
+ closeAfterClick: true,
583
+ onClick: $event => ($options.onChipPresetPick(preset, item))
584
+ }, {
585
+ icon: withCtx(() => [
586
+ ($data.currentRange.preset === preset.id)
587
+ ? (openBlock(), createBlock(_component_CalendarRange, {
588
+ key: 0,
589
+ size: 16
590
+ }))
591
+ : (openBlock(), createElementBlock("span", _hoisted_20))
592
+ ]),
593
+ default: withCtx(() => [
594
+ createTextVNode(" " + toDisplayString(preset.label), 1 /* TEXT */)
595
+ ]),
596
+ _: 2 /* DYNAMIC */
597
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"]))
598
+ }), 128 /* KEYED_FRAGMENT */)),
599
+ createVNode(_component_NcActionSeparator),
600
+ createVNode(_component_NcActionInput, {
601
+ type: "datetime-local",
602
+ isNativePicker: "",
603
+ modelValue: $options.toPickerDate($data.currentRange.from),
604
+ label: _ctx.t('nextcloud-vue', 'From'),
605
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = $event => ($options.onChipDateInput('from', $event)))
606
+ }, null, 8 /* PROPS */, ["modelValue", "label"]),
607
+ createVNode(_component_NcActionInput, {
608
+ type: "datetime-local",
609
+ isNativePicker: "",
610
+ modelValue: $options.toPickerDate($data.currentRange.to),
611
+ label: _ctx.t('nextcloud-vue', 'To'),
612
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = $event => ($options.onChipDateInput('to', $event)))
613
+ }, null, 8 /* PROPS */, ["modelValue", "label"])
363
614
  ]),
364
615
  _: 2 /* DYNAMIC */
365
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["href"])
616
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["open", "onUpdate:open", "data-testid"])
366
617
  ]),
367
- _: 2 /* DYNAMIC */
368
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["name", "description"])
618
+ key: "0"
619
+ }
620
+ : undefined
621
+ ]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["widgetId", "class", "title", "iconUrl", "iconClass", "showTitle", "showActions", "borderless", "flush", "buttons", "headerLink", "styleConfig", "titleIconPosition", "titleIconColor", "titleIconVariant", "showRefresh", "documentationUrl", "docsAnchor", "onRefresh", "onRequestFeature"]))
622
+ : ($options.isStatsBlock(item))
623
+ ? (openBlock(), createBlock(_component_CnWidgetWrapper, {
624
+ key: 5,
625
+ widgetId: item.widgetId,
626
+ title: $options.getWidgetTitle(item),
627
+ iconUrl: $options.getWidgetIconUrl(item),
628
+ iconClass: $options.getWidgetIconClass(item),
629
+ showTitle: $options.widgetShowTitle(item),
630
+ showActions: $options.widgetShowActions(item),
631
+ borderless: $options.widgetBorderless(item),
632
+ flush: item.flush !== false,
633
+ class: normalizeClass({ 'cn-dashboard-page__card-fit': $options.isCardWidget(item) }),
634
+ buttons: $options.getWidgetButtons(item),
635
+ headerLink: $options.getWidgetHeaderLink(item),
636
+ styleConfig: item.styleConfig || {},
637
+ documentationUrl: $options.getWidgetDocumentationUrl(item),
638
+ docsAnchor: $options.getWidgetDocsAnchor(item),
639
+ onRefresh: $event => ($options.onWidgetRefresh(item)),
640
+ onRequestFeature: $event => ($options.onWidgetRequestFeature(item))
641
+ }, {
642
+ default: withCtx(() => [
643
+ createVNode(_component_CnStatsBlockWidget, mergeProps({ ref_for: true }, $options.getStatsBlockProps(item), {
644
+ title: $options.getWidgetTitle(item),
645
+ "data-source": $options.getWidgetDataSource(item)
646
+ }), null, 16 /* FULL_PROPS */, ["title", "data-source"])
369
647
  ]),
370
648
  _: 2 /* DYNAMIC */
371
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["title", "showTitle"]))
372
- : ($options.isTile(item))
373
- ? (openBlock(), createBlock(_component_CnTileWidget, {
374
- key: 2,
375
- tile: $options.getTileConfig(item)
376
- }, null, 8 /* PROPS */, ["tile"]))
377
- : ($options.hasWidgetSlot(item.widgetId))
649
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["widgetId", "title", "iconUrl", "iconClass", "showTitle", "showActions", "borderless", "flush", "class", "buttons", "headerLink", "styleConfig", "documentationUrl", "docsAnchor", "onRefresh", "onRequestFeature"]))
650
+ : ($options.isIntegration(item))
651
+ ? (openBlock(), createBlock(_component_CnWidgetWrapper, {
652
+ key: 6,
653
+ widgetId: item.widgetId,
654
+ title: $options.getWidgetTitle(item),
655
+ iconUrl: $options.getWidgetIconUrl(item),
656
+ iconClass: $options.getWidgetIconClass(item),
657
+ showTitle: $options.widgetShowTitle(item),
658
+ showActions: $options.widgetShowActions(item),
659
+ borderless: $options.widgetBorderless(item),
660
+ flush: item.flush !== false,
661
+ buttons: $options.getWidgetButtons(item),
662
+ headerLink: $options.getWidgetHeaderLink(item),
663
+ styleConfig: item.styleConfig || {},
664
+ titleIconPosition: $options.getWidgetTitleIconPosition(item),
665
+ titleIconColor: $options.getWidgetTitleIconColor(item),
666
+ titleIconVariant: $options.getWidgetTitleIconVariant(item),
667
+ showRefresh: $options.getWidgetShowRefresh(item),
668
+ documentationUrl: $options.getWidgetDocumentationUrl(item),
669
+ docsAnchor: $options.getWidgetDocsAnchor(item),
670
+ onRefresh: $event => ($options.onWidgetRefresh(item)),
671
+ onRequestFeature: $event => ($options.onWidgetRequestFeature(item))
672
+ }, {
673
+ default: withCtx(() => [
674
+ ($options.isMountIntegration(item))
675
+ ? (openBlock(), createBlock(_component_CnLeafMountHost, {
676
+ key: 0,
677
+ provider: $options.integrationProviderFor(item),
678
+ mountProps: $options.getIntegrationMountProps(item)
679
+ }, null, 8 /* PROPS */, ["provider", "mountProps"]))
680
+ : ($options.resolveIntegrationWidget(item))
681
+ ? (openBlock(), createBlock(resolveDynamicComponent($options.resolveIntegrationWidget(item)), mergeProps({
682
+ key: 1,
683
+ ref_for: true
684
+ }, $options.getIntegrationProps(item)), null, 16 /* FULL_PROPS */))
685
+ : (openBlock(), createElementBlock("div", _hoisted_21, toDisplayString($props.unavailableLabel), 1 /* TEXT */))
686
+ ]),
687
+ _: 2 /* DYNAMIC */
688
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["widgetId", "title", "iconUrl", "iconClass", "showTitle", "showActions", "borderless", "flush", "buttons", "headerLink", "styleConfig", "titleIconPosition", "titleIconColor", "titleIconVariant", "showRefresh", "documentationUrl", "docsAnchor", "onRefresh", "onRequestFeature"]))
689
+ : ($options.isNcWidget(item))
378
690
  ? (openBlock(), createBlock(_component_CnWidgetWrapper, {
379
- key: 3,
691
+ key: 7,
380
692
  widgetId: item.widgetId,
381
693
  title: $options.getWidgetTitle(item),
382
694
  iconUrl: $options.getWidgetIconUrl(item),
383
695
  iconClass: $options.getWidgetIconClass(item),
384
696
  showTitle: $options.widgetShowTitle(item),
385
- borderless: $options.widgetBorderless(item),
386
- flush: item.flush !== false,
697
+ showActions: $options.widgetShowActions(item),
387
698
  buttons: $options.getWidgetButtons(item),
388
699
  headerLink: $options.getWidgetHeaderLink(item),
389
700
  styleConfig: item.styleConfig || {},
390
- titleIconPosition: $options.getWidgetTitleIconPosition(item),
391
- titleIconColor: $options.getWidgetTitleIconColor(item),
392
- titleIconVariant: $options.getWidgetTitleIconVariant(item),
393
701
  showRefresh: $options.getWidgetShowRefresh(item),
394
- showActions: $options.widgetShowActions(item),
395
702
  documentationUrl: $options.getWidgetDocumentationUrl(item),
396
703
  docsAnchor: $options.getWidgetDocsAnchor(item),
397
704
  onRefresh: $event => ($options.onWidgetRefresh(item)),
398
705
  onRequestFeature: $event => ($options.onWidgetRequestFeature(item))
399
- }, createSlots({
706
+ }, {
400
707
  default: withCtx(() => [
401
- renderSlot(_ctx.$slots, 'widget-' + item.widgetId, {
402
- item: item,
403
- widget: $options.getWidgetDef(item.widgetId)
404
- })
708
+ createVNode(_component_CnWidgetRenderer, {
709
+ widget: $options.getWidgetDef(item.widgetId),
710
+ unavailableText: $props.unavailableLabel
711
+ }, null, 8 /* PROPS */, ["widget", "unavailableText"])
405
712
  ]),
406
713
  _: 2 /* DYNAMIC */
407
- }, [
408
- (_ctx.$slots['widget-' + item.widgetId + '-title-icon'])
409
- ? {
410
- name: "title-icon",
411
- fn: withCtx(() => [
412
- renderSlot(_ctx.$slots, 'widget-' + item.widgetId + '-title-icon', {
413
- item: item,
414
- widget: $options.getWidgetDef(item.widgetId)
415
- })
416
- ]),
417
- key: "0"
418
- }
419
- : undefined,
420
- (_ctx.$slots['widget-' + item.widgetId + '-actions'])
421
- ? {
422
- name: "actions",
423
- fn: withCtx(() => [
424
- renderSlot(_ctx.$slots, 'widget-' + item.widgetId + '-actions', {
425
- item: item,
426
- widget: $options.getWidgetDef(item.widgetId)
427
- })
428
- ]),
429
- key: "1"
430
- }
431
- : undefined,
432
- ($options.dateRangeEnabled && item.dateChip === true)
433
- ? {
434
- name: "title-meta",
435
- fn: withCtx(() => [
436
- createVNode(_component_NcActions, {
437
- open: $data.openChipPicker[item.widgetId],
438
- "onUpdate:open": $event => (($data.openChipPicker[item.widgetId]) = $event),
439
- forceMenu: true,
440
- container: "body",
441
- "data-testid": `cn-dashboard-page-date-chip-${item.widgetId}`,
442
- class: "cn-dashboard-page__date-chip-trigger"
443
- }, {
444
- icon: withCtx(() => [
445
- createElementVNode("span", {
446
- class: "cn-dashboard-page__date-chip",
447
- title: $data.dateChipTitle
448
- }, toDisplayString($options.dashboardRangeChipLabel), 9 /* TEXT, PROPS */, _hoisted_16)
449
- ]),
450
- default: withCtx(() => [
451
- (openBlock(true), createElementBlock(Fragment, null, renderList($options.effectivePresets, (preset) => {
452
- return (openBlock(), createBlock(_component_NcActionButton, {
453
- key: preset.id,
454
- closeAfterClick: true,
455
- onClick: $event => ($options.onChipPresetPick(preset, item))
456
- }, {
457
- icon: withCtx(() => [
458
- ($data.currentRange.preset === preset.id)
459
- ? (openBlock(), createBlock(_component_CalendarRange, {
460
- key: 0,
461
- size: 16
462
- }))
463
- : (openBlock(), createElementBlock("span", _hoisted_17))
464
- ]),
465
- default: withCtx(() => [
466
- createTextVNode(" " + toDisplayString(preset.label), 1 /* TEXT */)
467
- ]),
468
- _: 2 /* DYNAMIC */
469
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"]))
470
- }), 128 /* KEYED_FRAGMENT */)),
471
- createVNode(_component_NcActionSeparator),
472
- createVNode(_component_NcActionInput, {
473
- type: "datetime-local",
474
- isNativePicker: "",
475
- modelValue: $options.toPickerDate($data.currentRange.from),
476
- label: _ctx.t('nextcloud-vue', 'From'),
477
- "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => ($options.onChipDateInput('from', $event)))
478
- }, null, 8 /* PROPS */, ["modelValue", "label"]),
479
- createVNode(_component_NcActionInput, {
480
- type: "datetime-local",
481
- isNativePicker: "",
482
- modelValue: $options.toPickerDate($data.currentRange.to),
483
- label: _ctx.t('nextcloud-vue', 'To'),
484
- "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => ($options.onChipDateInput('to', $event)))
485
- }, null, 8 /* PROPS */, ["modelValue", "label"])
486
- ]),
487
- _: 2 /* DYNAMIC */
488
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["open", "onUpdate:open", "data-testid"])
489
- ]),
490
- key: "2"
491
- }
492
- : undefined
493
- ]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["widgetId", "title", "iconUrl", "iconClass", "showTitle", "borderless", "flush", "buttons", "headerLink", "styleConfig", "titleIconPosition", "titleIconColor", "titleIconVariant", "showRefresh", "showActions", "documentationUrl", "docsAnchor", "onRefresh", "onRequestFeature"]))
494
- : ($options.isChart(item))
714
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["widgetId", "title", "iconUrl", "iconClass", "showTitle", "showActions", "buttons", "headerLink", "styleConfig", "showRefresh", "documentationUrl", "docsAnchor", "onRefresh", "onRequestFeature"]))
715
+ : ($options.registryRenderer(item))
495
716
  ? (openBlock(), createBlock(_component_CnWidgetWrapper, {
496
- key: 4,
717
+ key: 8,
497
718
  widgetId: item.widgetId,
498
- class: normalizeClass({ 'cn-dashboard-page__chart-fit': $options.isChartFitted(item) }),
499
719
  title: $options.getWidgetTitle(item),
500
- iconUrl: $options.getWidgetIconUrl(item),
501
- iconClass: $options.getWidgetIconClass(item),
502
720
  showTitle: $options.widgetShowTitle(item),
503
721
  showActions: $options.widgetShowActions(item),
722
+ showRefresh: $options.getWidgetShowRefresh(item),
504
723
  borderless: $options.widgetBorderless(item),
505
724
  flush: item.flush !== false,
506
- buttons: $options.getWidgetButtons(item),
507
- headerLink: $options.getWidgetHeaderLink(item),
508
- styleConfig: item.styleConfig || {},
509
725
  titleIconPosition: $options.getWidgetTitleIconPosition(item),
510
726
  titleIconColor: $options.getWidgetTitleIconColor(item),
511
727
  titleIconVariant: $options.getWidgetTitleIconVariant(item),
512
- showRefresh: $options.getWidgetShowRefresh(item),
728
+ class: normalizeClass({ 'cn-dashboard-page__card-fit': $options.isCardWidget(item) }),
729
+ buttons: $options.getWidgetButtons(item),
730
+ headerLink: $options.getWidgetHeaderLink(item),
731
+ styleConfig: item.styleConfig || {},
513
732
  documentationUrl: $options.getWidgetDocumentationUrl(item),
514
733
  docsAnchor: $options.getWidgetDocsAnchor(item),
515
734
  onRefresh: $event => ($options.onWidgetRefresh(item)),
516
735
  onRequestFeature: $event => ($options.onWidgetRequestFeature(item))
517
736
  }, createSlots({
518
737
  default: withCtx(() => [
519
- createVNode(_component_CnChartWidget, mergeProps($options.getChartProps(item), {
738
+ (openBlock(), createBlock(resolveDynamicComponent($options.registryRenderer(item)), mergeProps({
520
739
  widgetId: item.widgetId,
521
- "data-source": $options.getWidgetDataSource(item)
522
- }), null, 16 /* FULL_PROPS */, ["widgetId", "data-source"])
740
+ content: $options.registryWidgetBindings(item)
741
+ }, { ref_for: true }, $options.registryWidgetBindings(item)), null, 16 /* FULL_PROPS */, ["widgetId", "content"]))
523
742
  ]),
524
743
  _: 2 /* DYNAMIC */
525
744
  }, [
526
- ($options.dateRangeEnabled && (item.dateChip === true || $options.formatChartDateRange(item)))
745
+ ($options.dateRangeEnabled && item.dateChip === true)
527
746
  ? {
528
747
  name: "title-meta",
529
748
  fn: withCtx(() => [
@@ -539,7 +758,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
539
758
  createElementVNode("span", {
540
759
  class: "cn-dashboard-page__date-chip",
541
760
  title: $data.dateChipTitle
542
- }, toDisplayString($options.formatChartDateRange(item) || $options.dashboardRangeChipLabel), 9 /* TEXT, PROPS */, _hoisted_18)
761
+ }, toDisplayString($options.dashboardRangeChipLabel), 9 /* TEXT, PROPS */, _hoisted_22)
543
762
  ]),
544
763
  default: withCtx(() => [
545
764
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.effectivePresets, (preset) => {
@@ -549,12 +768,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
549
768
  onClick: $event => ($options.onChipPresetPick(preset, item))
550
769
  }, {
551
770
  icon: withCtx(() => [
552
- ($data.currentRange.preset === preset.id)
771
+ ($data.currentRange && $data.currentRange.preset === preset.id)
553
772
  ? (openBlock(), createBlock(_component_CalendarRange, {
554
773
  key: 0,
555
774
  size: 16
556
775
  }))
557
- : (openBlock(), createElementBlock("span", _hoisted_19))
776
+ : (openBlock(), createElementBlock("span", _hoisted_23))
558
777
  ]),
559
778
  default: withCtx(() => [
560
779
  createTextVNode(" " + toDisplayString(preset.label), 1 /* TEXT */)
@@ -566,16 +785,16 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
566
785
  createVNode(_component_NcActionInput, {
567
786
  type: "datetime-local",
568
787
  isNativePicker: "",
569
- modelValue: $options.toPickerDate($data.currentRange.from),
788
+ modelValue: $options.toPickerDate($data.currentRange && $data.currentRange.from),
570
789
  label: _ctx.t('nextcloud-vue', 'From'),
571
- "onUpdate:modelValue": _cache[4] || (_cache[4] = $event => ($options.onChipDateInput('from', $event)))
790
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = $event => ($options.onChipDateInput('from', $event)))
572
791
  }, null, 8 /* PROPS */, ["modelValue", "label"]),
573
792
  createVNode(_component_NcActionInput, {
574
793
  type: "datetime-local",
575
794
  isNativePicker: "",
576
- modelValue: $options.toPickerDate($data.currentRange.to),
795
+ modelValue: $options.toPickerDate($data.currentRange && $data.currentRange.to),
577
796
  label: _ctx.t('nextcloud-vue', 'To'),
578
- "onUpdate:modelValue": _cache[5] || (_cache[5] = $event => ($options.onChipDateInput('to', $event)))
797
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = $event => ($options.onChipDateInput('to', $event)))
579
798
  }, null, 8 /* PROPS */, ["modelValue", "label"])
580
799
  ]),
581
800
  _: 2 /* DYNAMIC */
@@ -584,206 +803,42 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
584
803
  key: "0"
585
804
  }
586
805
  : undefined
587
- ]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["widgetId", "class", "title", "iconUrl", "iconClass", "showTitle", "showActions", "borderless", "flush", "buttons", "headerLink", "styleConfig", "titleIconPosition", "titleIconColor", "titleIconVariant", "showRefresh", "documentationUrl", "docsAnchor", "onRefresh", "onRequestFeature"]))
588
- : ($options.isStatsBlock(item))
589
- ? (openBlock(), createBlock(_component_CnWidgetWrapper, {
590
- key: 5,
591
- widgetId: item.widgetId,
592
- title: $options.getWidgetTitle(item),
593
- iconUrl: $options.getWidgetIconUrl(item),
594
- iconClass: $options.getWidgetIconClass(item),
595
- showTitle: $options.widgetShowTitle(item),
596
- showActions: $options.widgetShowActions(item),
597
- borderless: $options.widgetBorderless(item),
598
- flush: item.flush !== false,
599
- class: normalizeClass({ 'cn-dashboard-page__card-fit': $options.isCardWidget(item) }),
600
- buttons: $options.getWidgetButtons(item),
601
- headerLink: $options.getWidgetHeaderLink(item),
602
- styleConfig: item.styleConfig || {},
603
- documentationUrl: $options.getWidgetDocumentationUrl(item),
604
- docsAnchor: $options.getWidgetDocsAnchor(item),
605
- onRefresh: $event => ($options.onWidgetRefresh(item)),
606
- onRequestFeature: $event => ($options.onWidgetRequestFeature(item))
607
- }, {
608
- default: withCtx(() => [
609
- createVNode(_component_CnStatsBlockWidget, mergeProps($options.getStatsBlockProps(item), {
610
- title: $options.getWidgetTitle(item),
611
- "data-source": $options.getWidgetDataSource(item)
612
- }), null, 16 /* FULL_PROPS */, ["title", "data-source"])
613
- ]),
614
- _: 2 /* DYNAMIC */
615
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["widgetId", "title", "iconUrl", "iconClass", "showTitle", "showActions", "borderless", "flush", "class", "buttons", "headerLink", "styleConfig", "documentationUrl", "docsAnchor", "onRefresh", "onRequestFeature"]))
616
- : ($options.isIntegration(item))
617
- ? (openBlock(), createBlock(_component_CnWidgetWrapper, {
618
- key: 6,
619
- widgetId: item.widgetId,
620
- title: $options.getWidgetTitle(item),
621
- iconUrl: $options.getWidgetIconUrl(item),
622
- iconClass: $options.getWidgetIconClass(item),
623
- showTitle: $options.widgetShowTitle(item),
624
- showActions: $options.widgetShowActions(item),
625
- borderless: $options.widgetBorderless(item),
626
- flush: item.flush !== false,
627
- buttons: $options.getWidgetButtons(item),
628
- headerLink: $options.getWidgetHeaderLink(item),
629
- styleConfig: item.styleConfig || {},
630
- titleIconPosition: $options.getWidgetTitleIconPosition(item),
631
- titleIconColor: $options.getWidgetTitleIconColor(item),
632
- titleIconVariant: $options.getWidgetTitleIconVariant(item),
633
- showRefresh: $options.getWidgetShowRefresh(item),
634
- documentationUrl: $options.getWidgetDocumentationUrl(item),
635
- docsAnchor: $options.getWidgetDocsAnchor(item),
636
- onRefresh: $event => ($options.onWidgetRefresh(item)),
637
- onRequestFeature: $event => ($options.onWidgetRequestFeature(item))
638
- }, {
639
- default: withCtx(() => [
640
- ($options.isMountIntegration(item))
641
- ? (openBlock(), createBlock(_component_CnLeafMountHost, {
642
- key: 0,
643
- provider: $options.integrationProviderFor(item),
644
- mountProps: $options.getIntegrationMountProps(item)
645
- }, null, 8 /* PROPS */, ["provider", "mountProps"]))
646
- : ($options.resolveIntegrationWidget(item))
647
- ? (openBlock(), createBlock(resolveDynamicComponent($options.resolveIntegrationWidget(item)), normalizeProps(mergeProps({ key: 1 }, $options.getIntegrationProps(item))), null, 16 /* FULL_PROPS */))
648
- : (openBlock(), createElementBlock("div", _hoisted_20, toDisplayString($props.unavailableLabel), 1 /* TEXT */))
649
- ]),
650
- _: 2 /* DYNAMIC */
651
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["widgetId", "title", "iconUrl", "iconClass", "showTitle", "showActions", "borderless", "flush", "buttons", "headerLink", "styleConfig", "titleIconPosition", "titleIconColor", "titleIconVariant", "showRefresh", "documentationUrl", "docsAnchor", "onRefresh", "onRequestFeature"]))
652
- : ($options.isNcWidget(item))
653
- ? (openBlock(), createBlock(_component_CnWidgetWrapper, {
654
- key: 7,
655
- widgetId: item.widgetId,
656
- title: $options.getWidgetTitle(item),
657
- iconUrl: $options.getWidgetIconUrl(item),
658
- iconClass: $options.getWidgetIconClass(item),
659
- showTitle: $options.widgetShowTitle(item),
660
- showActions: $options.widgetShowActions(item),
661
- buttons: $options.getWidgetButtons(item),
662
- headerLink: $options.getWidgetHeaderLink(item),
663
- styleConfig: item.styleConfig || {},
664
- showRefresh: $options.getWidgetShowRefresh(item),
665
- documentationUrl: $options.getWidgetDocumentationUrl(item),
666
- docsAnchor: $options.getWidgetDocsAnchor(item),
667
- onRefresh: $event => ($options.onWidgetRefresh(item)),
668
- onRequestFeature: $event => ($options.onWidgetRequestFeature(item))
669
- }, {
670
- default: withCtx(() => [
671
- createVNode(_component_CnWidgetRenderer, {
672
- widget: $options.getWidgetDef(item.widgetId),
673
- unavailableText: $props.unavailableLabel
674
- }, null, 8 /* PROPS */, ["widget", "unavailableText"])
675
- ]),
676
- _: 2 /* DYNAMIC */
677
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["widgetId", "title", "iconUrl", "iconClass", "showTitle", "showActions", "buttons", "headerLink", "styleConfig", "showRefresh", "documentationUrl", "docsAnchor", "onRefresh", "onRequestFeature"]))
678
- : ($options.registryRenderer(item))
679
- ? (openBlock(), createBlock(_component_CnWidgetWrapper, {
680
- key: 8,
681
- widgetId: item.widgetId,
682
- title: $options.getWidgetTitle(item),
683
- showTitle: $options.widgetShowTitle(item),
684
- showActions: $options.widgetShowActions(item),
685
- showRefresh: $options.getWidgetShowRefresh(item),
686
- borderless: $options.widgetBorderless(item),
687
- flush: item.flush !== false,
688
- titleIconPosition: $options.getWidgetTitleIconPosition(item),
689
- titleIconColor: $options.getWidgetTitleIconColor(item),
690
- titleIconVariant: $options.getWidgetTitleIconVariant(item),
691
- class: normalizeClass({ 'cn-dashboard-page__card-fit': $options.isCardWidget(item) }),
692
- buttons: $options.getWidgetButtons(item),
693
- headerLink: $options.getWidgetHeaderLink(item),
694
- styleConfig: item.styleConfig || {},
695
- documentationUrl: $options.getWidgetDocumentationUrl(item),
696
- docsAnchor: $options.getWidgetDocsAnchor(item),
697
- onRefresh: $event => ($options.onWidgetRefresh(item)),
698
- onRequestFeature: $event => ($options.onWidgetRequestFeature(item))
699
- }, createSlots({
700
- default: withCtx(() => [
701
- (openBlock(), createBlock(resolveDynamicComponent($options.registryRenderer(item)), mergeProps({
702
- widgetId: item.widgetId,
703
- content: $options.registryWidgetBindings(item)
704
- }, $options.registryWidgetBindings(item)), null, 16 /* FULL_PROPS */, ["widgetId", "content"]))
705
- ]),
706
- _: 2 /* DYNAMIC */
707
- }, [
708
- ($options.dateRangeEnabled && item.dateChip === true)
709
- ? {
710
- name: "title-meta",
711
- fn: withCtx(() => [
712
- createVNode(_component_NcActions, {
713
- open: $data.openChipPicker[item.widgetId],
714
- "onUpdate:open": $event => (($data.openChipPicker[item.widgetId]) = $event),
715
- forceMenu: true,
716
- container: "body",
717
- "data-testid": `cn-dashboard-page-date-chip-${item.widgetId}`,
718
- class: "cn-dashboard-page__date-chip-trigger"
719
- }, {
720
- icon: withCtx(() => [
721
- createElementVNode("span", {
722
- class: "cn-dashboard-page__date-chip",
723
- title: $data.dateChipTitle
724
- }, toDisplayString($options.dashboardRangeChipLabel), 9 /* TEXT, PROPS */, _hoisted_21)
725
- ]),
726
- default: withCtx(() => [
727
- (openBlock(true), createElementBlock(Fragment, null, renderList($options.effectivePresets, (preset) => {
728
- return (openBlock(), createBlock(_component_NcActionButton, {
729
- key: preset.id,
730
- closeAfterClick: true,
731
- onClick: $event => ($options.onChipPresetPick(preset, item))
732
- }, {
733
- icon: withCtx(() => [
734
- ($data.currentRange && $data.currentRange.preset === preset.id)
735
- ? (openBlock(), createBlock(_component_CalendarRange, {
736
- key: 0,
737
- size: 16
738
- }))
739
- : (openBlock(), createElementBlock("span", _hoisted_22))
740
- ]),
741
- default: withCtx(() => [
742
- createTextVNode(" " + toDisplayString(preset.label), 1 /* TEXT */)
743
- ]),
744
- _: 2 /* DYNAMIC */
745
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"]))
746
- }), 128 /* KEYED_FRAGMENT */)),
747
- createVNode(_component_NcActionSeparator),
748
- createVNode(_component_NcActionInput, {
749
- type: "datetime-local",
750
- isNativePicker: "",
751
- modelValue: $options.toPickerDate($data.currentRange && $data.currentRange.from),
752
- label: _ctx.t('nextcloud-vue', 'From'),
753
- "onUpdate:modelValue": _cache[6] || (_cache[6] = $event => ($options.onChipDateInput('from', $event)))
754
- }, null, 8 /* PROPS */, ["modelValue", "label"]),
755
- createVNode(_component_NcActionInput, {
756
- type: "datetime-local",
757
- isNativePicker: "",
758
- modelValue: $options.toPickerDate($data.currentRange && $data.currentRange.to),
759
- label: _ctx.t('nextcloud-vue', 'To'),
760
- "onUpdate:modelValue": _cache[7] || (_cache[7] = $event => ($options.onChipDateInput('to', $event)))
761
- }, null, 8 /* PROPS */, ["modelValue", "label"])
762
- ]),
763
- _: 2 /* DYNAMIC */
764
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["open", "onUpdate:open", "data-testid"])
765
- ]),
766
- key: "0"
767
- }
768
- : undefined
769
- ]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["widgetId", "title", "showTitle", "showActions", "showRefresh", "borderless", "flush", "titleIconPosition", "titleIconColor", "titleIconVariant", "class", "buttons", "headerLink", "styleConfig", "documentationUrl", "docsAnchor", "onRefresh", "onRequestFeature"]))
770
- : (openBlock(), createBlock(_component_CnWidgetWrapper, {
771
- key: 9,
772
- title: $options.getWidgetTitle(item),
773
- showTitle: $options.widgetShowTitle(item),
774
- showRefresh: false
775
- }, {
776
- default: withCtx(() => [
777
- createElementVNode("div", _hoisted_23, toDisplayString($props.unavailableLabel), 1 /* TEXT */)
778
- ]),
779
- _: 1 /* STABLE */
780
- }, 8 /* PROPS */, ["title", "showTitle"]))
781
- ]),
782
- _: 3 /* FORWARDED */
783
- }, 8 /* PROPS */, ["layout", "editable", "columns", "cellHeight", "margin", "onLayoutChange"])),
806
+ ]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["widgetId", "title", "showTitle", "showActions", "showRefresh", "borderless", "flush", "titleIconPosition", "titleIconColor", "titleIconVariant", "class", "buttons", "headerLink", "styleConfig", "documentationUrl", "docsAnchor", "onRefresh", "onRequestFeature"]))
807
+ : (openBlock(), createBlock(_component_CnWidgetWrapper, {
808
+ key: 9,
809
+ title: $options.getWidgetTitle(item),
810
+ showTitle: $options.widgetShowTitle(item),
811
+ showRefresh: false
812
+ }, {
813
+ default: withCtx(() => [
814
+ createElementVNode("div", _hoisted_24, toDisplayString($props.unavailableLabel), 1 /* TEXT */)
815
+ ]),
816
+ _: 1 /* STABLE */
817
+ }, 8 /* PROPS */, ["title", "showTitle"]))
818
+ ]),
819
+ _: 3 /* FORWARDED */
820
+ }, 16 /* FULL_PROPS */, ["layout", "editable", "columns", "cellHeight", "margin", "onLayoutChange"]))
821
+ }), 128 /* KEYED_FRAGMENT */)),
822
+ ($options.gridSectionsShown && $options.viewIsEmpty)
823
+ ? (openBlock(), createElementBlock("div", {
824
+ key: 10,
825
+ id: _ctx.viewRegionId,
826
+ role: "region",
827
+ "aria-label": _ctx.activeView ? _ctx.activeView.label : null,
828
+ class: "cn-page-view-region cn-page-view-region--empty",
829
+ "data-testid": "cn-dashboard-page-view-empty"
830
+ }, [
831
+ createVNode(_component_NcEmptyContent, { description: _ctx.viewEmptyText }, {
832
+ icon: withCtx(() => [
833
+ createVNode(_component_ViewDashboardOutline, { size: 48 })
834
+ ]),
835
+ _: 1 /* STABLE */
836
+ }, 8 /* PROPS */, ["description"])
837
+ ], 8 /* PROPS */, _hoisted_25))
838
+ : createCommentVNode("v-if", true),
784
839
  ($options.hasBodyWidgets)
785
840
  ? (openBlock(), createBlock(_component_CnBodySections, {
786
- key: 10,
841
+ key: 11,
787
842
  sections: $props.bodyWidgets,
788
843
  context: $options.sectionContext,
789
844
  placement: "after-grid",
@@ -792,7 +847,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
792
847
  : createCommentVNode("v-if", true),
793
848
  ($options.hasBodyWidgets)
794
849
  ? (openBlock(), createBlock(_component_CnBodySections, {
795
- key: 11,
850
+ key: 12,
796
851
  sections: $options.endPlacementSections,
797
852
  context: $options.sectionContext,
798
853
  placement: null,
@@ -801,7 +856,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
801
856
  : createCommentVNode("v-if", true),
802
857
  ($data.showWidgetConfig)
803
858
  ? (openBlock(), createBlock(_component_CnWidgetStyleEditorModal, {
804
- key: 12,
859
+ key: 13,
805
860
  show: $data.showWidgetConfig,
806
861
  widget: $options.configWidget,
807
862
  deletable: true,