@conduction/nextcloud-vue 2.104.0 → 2.105.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 (110) hide show
  1. package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue.js +1 -1
  2. package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue2.js.map +1 -1
  3. package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue3.js +1 -1
  4. package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue3.js.map +1 -1
  5. package/dist/esm/components/CnChartWidget/CnChartWidget.vue.js +1 -1
  6. package/dist/esm/components/CnChartWidget/CnChartWidget.vue2.js +93 -1
  7. package/dist/esm/components/CnChartWidget/CnChartWidget.vue2.js.map +1 -1
  8. package/dist/esm/components/CnChartWidget/CnChartWidget.vue3.js.map +1 -1
  9. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
  10. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +6 -3
  11. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
  12. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +3 -3
  13. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
  14. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +59 -1
  15. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
  16. package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
  17. package/dist/esm/components/CnFeaturesAndRoadmapView/CnFeaturesAndRoadmapView.vue.js +1 -1
  18. package/dist/esm/components/CnFeaturesAndRoadmapView/CnFeaturesAndRoadmapView.vue2.js +1 -1
  19. package/dist/esm/components/CnFeaturesAndRoadmapView/CnFeaturesAndRoadmapView.vue2.js.map +1 -1
  20. package/dist/esm/components/CnFeaturesAndRoadmapView/CnFeaturesAndRoadmapView.vue3.js.map +1 -1
  21. package/dist/esm/components/CnFeaturesBoard/CnFeaturesBoard.vue.js +1 -1
  22. package/dist/esm/components/CnFeaturesBoard/CnFeaturesBoard.vue2.js +2 -0
  23. package/dist/esm/components/CnFeaturesBoard/CnFeaturesBoard.vue2.js.map +1 -1
  24. package/dist/esm/components/CnFeaturesBoard/CnFeaturesBoard.vue3.js +32 -29
  25. package/dist/esm/components/CnFeaturesBoard/CnFeaturesBoard.vue3.js.map +1 -1
  26. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue.js +1 -1
  27. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue2.js +73 -4
  28. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue2.js.map +1 -1
  29. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue3.js +74 -27
  30. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue3.js.map +1 -1
  31. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +54 -1
  32. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
  33. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
  34. package/dist/esm/components/CnIndexPage/useSelfFetchList.js +3 -2
  35. package/dist/esm/components/CnIndexPage/useSelfFetchList.js.map +1 -1
  36. package/dist/esm/components/CnNoticeWidget/CnNoticeWidget.vue.js +9 -0
  37. package/dist/esm/components/CnNoticeWidget/CnNoticeWidget.vue.js.map +1 -0
  38. package/dist/esm/components/CnNoticeWidget/CnNoticeWidget.vue2.js +88 -0
  39. package/dist/esm/components/CnNoticeWidget/CnNoticeWidget.vue2.js.map +1 -0
  40. package/dist/esm/components/CnNoticeWidget/CnNoticeWidget.vue3.js +39 -0
  41. package/dist/esm/components/CnNoticeWidget/CnNoticeWidget.vue3.js.map +1 -0
  42. package/dist/esm/components/CnSettingsField/CnSettingsField.vue.js +1 -1
  43. package/dist/esm/components/CnSettingsField/CnSettingsField.vue2.js.map +1 -1
  44. package/dist/esm/components/CnSettingsField/CnSettingsField.vue3.js +3 -3
  45. package/dist/esm/components/CnSettingsField/CnSettingsField.vue3.js.map +1 -1
  46. package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue.js +1 -1
  47. package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue2.js.map +1 -1
  48. package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue3.js +16 -4
  49. package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue3.js.map +1 -1
  50. package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue.js +1 -1
  51. package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue2.js +11 -0
  52. package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue2.js.map +1 -1
  53. package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue3.js +4 -4
  54. package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue3.js.map +1 -1
  55. package/dist/esm/components/CnWidgetGrid/builtInWidgets.js +16 -14
  56. package/dist/esm/components/CnWidgetGrid/builtInWidgets.js.map +1 -1
  57. package/dist/esm/index.js +1 -0
  58. package/dist/esm/index.js.map +1 -1
  59. package/dist/esm/l10n/en.json.js +4 -1
  60. package/dist/esm/l10n/en.json.js.map +1 -1
  61. package/dist/esm/l10n/nl.json.js +4 -1
  62. package/dist/esm/l10n/nl.json.js.map +1 -1
  63. package/dist/esm/library-style.js +1 -1
  64. package/dist/esm/nextcloud-vue.css +566 -295
  65. package/dist/esm/utils/libraryWidgetKeys.js +1 -0
  66. package/dist/esm/utils/libraryWidgetKeys.js.map +1 -1
  67. package/dist/esm/utils/nextcloudApps.js +45 -0
  68. package/dist/esm/utils/nextcloudApps.js.map +1 -0
  69. package/dist/esm/utils/scopeListLayout.js +9 -2
  70. package/dist/esm/utils/scopeListLayout.js.map +1 -1
  71. package/dist/esm/utils/validateManifestV2.compiled.js +3 -3
  72. package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
  73. package/dist/esm/utils/visibleWhen.js +12 -4
  74. package/dist/esm/utils/visibleWhen.js.map +1 -1
  75. package/dist/nextcloud-vue.cjs.js +3054 -2517
  76. package/dist/nextcloud-vue.cjs.js.map +2 -2
  77. package/dist/nextcloud-vue.css +566 -295
  78. package/l10n/en.json +4 -1
  79. package/l10n/nl.json +4 -1
  80. package/package.json +1 -1
  81. package/src/components/CnAdminSettingsShell/CnAdminSettingsShell.vue +1 -1
  82. package/src/components/CnChartWidget/CnChartWidget.md +2 -0
  83. package/src/components/CnChartWidget/CnChartWidget.vue +93 -1
  84. package/src/components/CnDashboardPage/CnDashboardPage.vue +9 -6
  85. package/src/components/CnDetailPage/CnDetailPage.md +1 -0
  86. package/src/components/CnDetailPage/CnDetailPage.vue +59 -1
  87. package/src/components/CnFeaturesAndRoadmapView/CnFeaturesAndRoadmapView.vue +1 -1
  88. package/src/components/CnFeaturesBoard/CnFeaturesBoard.vue +4 -1
  89. package/src/components/CnFlowsPage/CnFlowBoard.vue +132 -8
  90. package/src/components/CnIndexPage/CnIndexPage.md +1 -0
  91. package/src/components/CnIndexPage/CnIndexPage.vue +54 -1
  92. package/src/components/CnIndexPage/useSelfFetchList.js +3 -2
  93. package/src/components/CnNoticeWidget/CnNoticeWidget.vue +153 -0
  94. package/src/components/CnNoticeWidget/index.js +12 -0
  95. package/src/components/CnSettingsField/CnSettingsField.vue +4 -1
  96. package/src/components/CnSetupWizard/CnSetupWizard.vue +9 -1
  97. package/src/components/CnVersionInfoCard/CnVersionInfoCard.vue +15 -4
  98. package/src/components/CnWidgetGrid/builtInWidgets.js +2 -0
  99. package/src/components/index.js +1 -0
  100. package/src/css/dialog.css +20 -2
  101. package/src/css/look-board-detail.css +77 -4
  102. package/src/css/look-board-index.css +36 -2
  103. package/src/css/look-board.css +97 -12
  104. package/src/index.js +1 -0
  105. package/src/schemas/app-manifest-v2.schema.json +36 -3
  106. package/src/utils/libraryWidgetKeys.js +1 -0
  107. package/src/utils/nextcloudApps.js +50 -0
  108. package/src/utils/scopeListLayout.js +9 -2
  109. package/src/utils/validateManifestV2.compiled.js +3 -3
  110. package/src/utils/visibleWhen.js +12 -4
@@ -82,6 +82,22 @@ function parseBucketKey(key) {
82
82
  )
83
83
  }
84
84
 
85
+ /**
86
+ * A theme colour by CSS variable name, as a literal: ApexCharts writes colours
87
+ * into SVG attributes, where `var()` does not resolve.
88
+ *
89
+ * @param {string} name The variable, e.g. `--color-error`.
90
+ * @param {string} fallback The colour when the variable is unset (or no DOM).
91
+ * @return {string} The colour.
92
+ */
93
+ function themeColor(name, fallback) {
94
+ if (typeof document === 'undefined' || typeof getComputedStyle !== 'function') {
95
+ return fallback
96
+ }
97
+ const value = getComputedStyle(document.documentElement).getPropertyValue(name).trim();
98
+ return value || fallback
99
+ }
100
+
85
101
  /** Event-bus channel CnWidgetWrapper's Refresh action broadcasts on. */
86
102
  const REFRESH_BUS_CHANNEL = 'cn:widget:refresh';
87
103
 
@@ -247,6 +263,31 @@ var script = {
247
263
  default: '',
248
264
  },
249
265
 
266
+ /**
267
+ * Horizontal reference lines on the value axis of a line, area or bar
268
+ * chart, such as a norm: `[{ value, label?, color? }]`. Drawn dashed;
269
+ * the label goes through the host's translate. The colour defaults to
270
+ * the theme's error colour.
271
+ *
272
+ * @type {Array<{value: number, label?: string, color?: string}>}
273
+ */
274
+ referenceLines: {
275
+ type: Array,
276
+ default: () => [],
277
+ },
278
+
279
+ /**
280
+ * How date categories read on the x-axis: `month` ("jan") or
281
+ * `month-year` ("jan 2026"), in the user's language. A category that
282
+ * is not a date is shown as is. Empty shows the categories unchanged.
283
+ *
284
+ * @type {''|'month'|'month-year'}
285
+ */
286
+ categoryFormat: {
287
+ type: String,
288
+ default: '',
289
+ },
290
+
250
291
  /**
251
292
  * The `matrix` cell to outline, usually the record's on a detail page:
252
293
  * `{ row, column, columnKeys? }`, where `row` and `column` take tokens
@@ -1367,6 +1408,51 @@ var script = {
1367
1408
  return this.footnote ? this.hostTranslate(this.footnote) : translate('nextcloud-vue', 'Chart data')
1368
1409
  },
1369
1410
 
1411
+ /**
1412
+ * The x-axis categories as shown: with `categoryFormat`, date
1413
+ * categories as short months in the user's language.
1414
+ *
1415
+ * @return {Array<string|number>} The categories.
1416
+ */
1417
+ displayCategories() {
1418
+ const categories = Array.isArray(this.resolvedCategories) ? this.resolvedCategories : [];
1419
+ if (this.categoryFormat !== 'month' && this.categoryFormat !== 'month-year') {
1420
+ return categories
1421
+ }
1422
+ const options = this.categoryFormat === 'month' ? { month: 'short' } : { month: 'short', year: 'numeric' };
1423
+ return categories.map((category) => {
1424
+ const date = typeof category === 'string' || typeof category === 'number' ? parseBucketKey(category) : null;
1425
+ return date ? date.toLocaleDateString(userLocale(), options) : category
1426
+ })
1427
+ },
1428
+
1429
+ /**
1430
+ * The `referenceLines` as ApexCharts annotations: dashed, labelled,
1431
+ * in the theme's error colour unless a line names its own.
1432
+ *
1433
+ * @return {Array<object>} The annotations, possibly empty.
1434
+ */
1435
+ referenceAnnotations() {
1436
+ const lines = (Array.isArray(this.referenceLines) ? this.referenceLines : [])
1437
+ .filter((line) => line && Number.isFinite(Number(line.value)));
1438
+ if (lines.length === 0) {
1439
+ return []
1440
+ }
1441
+ const fallback = themeColor('--color-error', '#e04224');
1442
+ return lines.map((line) => {
1443
+ const color = line.color || fallback;
1444
+ return {
1445
+ y: Number(line.value),
1446
+ x: Number(line.value),
1447
+ borderColor: color,
1448
+ strokeDashArray: 6,
1449
+ label: line.label
1450
+ ? { text: this.hostTranslate(line.label), borderColor: color, style: { color: '#fff', background: color } }
1451
+ : { text: '' },
1452
+ }
1453
+ })
1454
+ },
1455
+
1370
1456
  mergedOptions() {
1371
1457
  const isPieType = ['pie', 'donut', 'radialBar'].includes(this.type);
1372
1458
 
@@ -1454,7 +1540,7 @@ var script = {
1454
1540
  if (!isPieType) {
1455
1541
  if (this.resolvedCategories.length > 0) {
1456
1542
  defaults.xaxis = {
1457
- categories: this.resolvedCategories,
1543
+ categories: this.displayCategories,
1458
1544
  labels: {
1459
1545
  style: {
1460
1546
  colors: 'var(--color-text-maxcontrast, #767676)',
@@ -1496,6 +1582,12 @@ var script = {
1496
1582
  }
1497
1583
  }
1498
1584
 
1585
+ // Reference lines, such as a norm, on the value axis.
1586
+ if (!isPieType && this.referenceAnnotations.length > 0) {
1587
+ const axisKey = (this.type === 'bar' && this.horizontal) ? 'xaxis' : 'yaxis';
1588
+ defaults.annotations = { [axisKey]: this.referenceAnnotations };
1589
+ }
1590
+
1499
1591
  // Add labels for pie/donut
1500
1592
  if (isPieType && this.resolvedLabels.length > 0) {
1501
1593
  defaults.labels = this.resolvedLabels;