@conduction/nextcloud-vue 2.129.0 → 2.130.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 (63) hide show
  1. package/dist/esm/components/CnActionsBar/CnActionsBar.vue2.js +23 -1
  2. package/dist/esm/components/CnActionsBar/CnActionsBar.vue2.js.map +1 -1
  3. package/dist/esm/components/CnActionsBar/CnActionsBar.vue3.js +87 -4
  4. package/dist/esm/components/CnActionsBar/CnActionsBar.vue3.js.map +1 -1
  5. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue.js +1 -1
  6. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js +29 -3
  7. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js.map +1 -1
  8. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue3.js +68 -14
  9. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue3.js.map +1 -1
  10. package/dist/esm/components/CnEventsCard/CnEventsCard.vue.js +1 -1
  11. package/dist/esm/components/CnEventsCard/CnEventsCard.vue2.js +16 -5
  12. package/dist/esm/components/CnEventsCard/CnEventsCard.vue2.js.map +1 -1
  13. package/dist/esm/components/CnEventsCard/CnEventsCard.vue3.js.map +1 -1
  14. package/dist/esm/components/CnFilesCard/CnFilesCard.vue.js +1 -1
  15. package/dist/esm/components/CnFilesCard/CnFilesCard.vue2.js.map +1 -1
  16. package/dist/esm/components/CnFilesCard/CnFilesCard.vue3.js +11 -2
  17. package/dist/esm/components/CnFilesCard/CnFilesCard.vue3.js.map +1 -1
  18. package/dist/esm/components/CnIcon/semanticIcons.js +2 -0
  19. package/dist/esm/components/CnIcon/semanticIcons.js.map +1 -1
  20. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +32 -2
  21. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
  22. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +3 -1
  23. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
  24. package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue.js +1 -1
  25. package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js.map +1 -1
  26. package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue3.js +4 -1
  27. package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue3.js.map +1 -1
  28. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
  29. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +62 -2
  30. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
  31. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js +515 -356
  32. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
  33. package/dist/esm/integrations/builtin/calendar/CnCalendarCard.vue.js +1 -1
  34. package/dist/esm/integrations/builtin/calendar/CnCalendarCard.vue2.js +6 -1
  35. package/dist/esm/integrations/builtin/calendar/CnCalendarCard.vue2.js.map +1 -1
  36. package/dist/esm/integrations/builtin/calendar/CnCalendarCard.vue3.js +17 -9
  37. package/dist/esm/integrations/builtin/calendar/CnCalendarCard.vue3.js.map +1 -1
  38. package/dist/esm/library-style.js +1 -1
  39. package/dist/esm/nextcloud-vue.css +323 -165
  40. package/dist/esm/utils/boardReferenceColumns.js +38 -1
  41. package/dist/esm/utils/boardReferenceColumns.js.map +1 -1
  42. package/dist/esm/utils/validateManifestV2.compiled.js +3 -3
  43. package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
  44. package/dist/nextcloud-vue.cjs.js +989 -479
  45. package/dist/nextcloud-vue.cjs.js.map +2 -2
  46. package/dist/nextcloud-vue.css +323 -165
  47. package/package.json +1 -1
  48. package/src/components/CnActionsBar/CnActionsBar.vue +67 -3
  49. package/src/components/CnDetailWidgetHost/CnDetailWidgetHost.vue +59 -8
  50. package/src/components/CnEventsCard/CnEventsCard.vue +16 -5
  51. package/src/components/CnFilesCard/CnFilesCard.vue +7 -0
  52. package/src/components/CnIcon/semanticIcons.js +2 -0
  53. package/src/components/CnIndexPage/CnIndexPage.vue +34 -1
  54. package/src/components/CnObjectListWidget/CnObjectListWidget.vue +1 -1
  55. package/src/components/CnRecordListWidget/CnRecordListWidget.vue +186 -8
  56. package/src/css/look-board-detail.css +27 -2
  57. package/src/css/look-board-index.css +50 -2
  58. package/src/css/look-board.css +52 -2
  59. package/src/integrations/builtin/calendar/CnCalendarCard.vue +12 -3
  60. package/src/integrations/builtin/calendar/__tests__/CnCalendarCardHeaderActions.spec.js +12 -1
  61. package/src/schemas/app-manifest-v2.schema.json +27 -3
  62. package/src/utils/boardReferenceColumns.js +37 -0
  63. package/src/utils/validateManifestV2.compiled.js +3 -3
@@ -2,7 +2,7 @@ import script from './CnRecordListWidget.vue2.js';
2
2
  import { render } from './CnRecordListWidget.vue3.js';
3
3
 
4
4
  script.render = render;
5
- script.__scopeId = "data-v-340c80f7";
5
+ script.__scopeId = "data-v-622f305a";
6
6
  const __sfc_main = script;
7
7
 
8
8
  export { __sfc_main as default };
@@ -276,6 +276,41 @@ var script = {
276
276
  }
277
277
  },
278
278
 
279
+ /**
280
+ * The group value `footerAction.group` puts the action in, with
281
+ * `groupBy`; '' when the action stands under the list.
282
+ *
283
+ * @spec openspec/changes/record-list-group-action/specs/record-list/spec.md#requirement-a-record-lists-action-can-end-a-group-heading-as-a-tonal-pill
284
+ * @return {string}
285
+ */
286
+ footerGroup() {
287
+ const group = this.content?.footerAction?.group;
288
+ if (!this.footerAction || !this.isGrouped || group === null || group === undefined || group === '') {
289
+ return ''
290
+ }
291
+ return String(group)
292
+ },
293
+
294
+ /**
295
+ * The heading of the action's group, for the list without rows.
296
+ *
297
+ * @return {string}
298
+ */
299
+ footerGroupHead() {
300
+ if (this.footerGroup === '') {
301
+ return ''
302
+ }
303
+ const c = this.content;
304
+ const labels = c.valueLabels && typeof c.valueLabels[c.groupBy] === 'object' ? c.valueLabels[c.groupBy] : {};
305
+ const named = labels[this.footerGroup] || this.footerGroup;
306
+ return this.translate(named)
307
+ },
308
+
309
+ /** @return {boolean} Whether the action is drawn as a tonal pill (`footerAction.variant: "tonal"`). */
310
+ footerTonal() {
311
+ return this.content?.footerAction?.variant === 'tonal'
312
+ },
313
+
279
314
  /**
280
315
  * What `footerAction.disabledWhen` depends on, so it is evaluated again
281
316
  * when the condition, the record or the workspace changes.
@@ -457,7 +492,7 @@ var script = {
457
492
  * or not at all. Without `groupBy` all rows are one unheaded group.
458
493
  *
459
494
  * @spec openspec/changes/record-list-group-headings/specs/record-list/spec.md#requirement-a-record-list-can-group-its-rows-under-headings
460
- * @return {Array<{key: string, label: string, headingId: string, items: Array<object>}>} The groups.
495
+ * @return {Array<{key: string, value: string, label: string, headingId: string, items: Array<object>}>} The groups.
461
496
  */
462
497
  itemGroups() {
463
498
  if (!this.isGrouped) {
@@ -484,10 +519,15 @@ var script = {
484
519
  if (buckets.has('')) {
485
520
  values.push('');
486
521
  }
522
+ if (this.footerGroup !== '' && !buckets.has(this.footerGroup)) {
523
+ buckets.set(this.footerGroup, []);
524
+ values.splice(buckets.has('') ? values.length - 1 : values.length, 0, this.footerGroup);
525
+ }
487
526
  return values.map((value, index) => {
488
527
  const named = value === '' ? c.groupEmptyLabel : (labels[value] || value);
489
528
  return {
490
529
  key: `group-${value}`,
530
+ value,
491
531
  label: typeof named === 'string' && named !== '' ? this.translate(named) : '',
492
532
  headingId: `${this.groupIdBase}-${index}`,
493
533
  items: buckets.get(value),
@@ -519,6 +559,8 @@ var script = {
519
559
  const indentPath = this.content?.indentPath;
520
560
  const rows = this.items.map((item) => ({
521
561
  key: item.key,
562
+ row: item.row,
563
+ rowActions: this.rowActions.length > 0 ? this.rowActionsOf(item.row) : [],
522
564
  to: item.attrs.to || null,
523
565
  depth: indentPath ? Math.max(0, Math.floor(Number(readPath(item.row, indentPath)) || 0)) : 0,
524
566
  cells: this.tableColumns.map((col) => {
@@ -528,6 +570,7 @@ var script = {
528
570
  return {
529
571
  key: col.key,
530
572
  text,
573
+ sub: typeof col.sub === 'string' ? this.fill(col.sub, item.row) : '',
531
574
  align: col.align,
532
575
  alert: col.alertAbove !== undefined && Number.isFinite(limit) && text !== '' && Number.isFinite(value) && value > limit,
533
576
  tone: this.cellToneOf(col, item.row, text),
@@ -725,6 +768,17 @@ var script = {
725
768
  }))
726
769
  },
727
770
 
771
+ /**
772
+ * The heading of the `table` presentation's actions column.
773
+ *
774
+ * @return {string}
775
+ * @spec openspec/changes/record-list-table-row-actions/specs/record-list-table/spec.md#requirement-a-table-row-can-carry-a-second-line-and-an-actions-menu
776
+ */
777
+ rowActionsHeader() {
778
+ const own = this.content?.rowActionsHeader;
779
+ return typeof own === 'string' && own !== '' ? this.translate(own) : translate('nextcloud-vue', 'Actions')
780
+ },
781
+
728
782
  /** @return {string} The accessible name of a row's actions menu. */
729
783
  rowActionsLabel() {
730
784
  const own = this.content?.rowActionsLabel;
@@ -933,7 +987,7 @@ var script = {
933
987
  if (!declared || this.footerDisabled) {
934
988
  return undefined
935
989
  }
936
- const { disabledWhen, disabledReason, ...action } = declared;
990
+ const { disabledWhen, disabledReason, group, variant, ...action } = declared;
937
991
  if (typeof this.cnDispatchAction === 'function') {
938
992
  return this.cnDispatchAction(action)
939
993
  }
@@ -1146,16 +1200,22 @@ var script = {
1146
1200
  * Run a `rowAction` that is not a plain link through the page's
1147
1201
  * dispatcher: a `handler` gets the row as its last argument, an
1148
1202
  * `open-modal` gets it as the `row` prop, an `object-op` acts on it.
1203
+ * With `endpoint` it calls that app URL for the row, as a `rowActions`
1204
+ * endpoint entry does.
1149
1205
  *
1150
1206
  * @param {object} row The row.
1151
1207
  * @return {unknown} What the dispatcher returns.
1152
1208
  * @spec openspec/changes/screens-record-list-row-action/specs/record-list/spec.md
1209
+ * @spec openspec/changes/record-list-row-action-endpoint/specs/record-list/spec.md#requirement-a-rows-one-action-can-call-an-app-endpoint-for-that-row
1153
1210
  */
1154
1211
  runRowAction(row) {
1155
1212
  const action = this.content?.rowAction;
1156
1213
  if (!action || typeof action !== 'object') {
1157
1214
  return undefined
1158
1215
  }
1216
+ if (typeof action.endpoint === 'string' && action.endpoint !== '') {
1217
+ return this.runRowActionEntry(action, row)
1218
+ }
1159
1219
  const type = action.type || 'handler';
1160
1220
  let wrapped = action;
1161
1221
  if (type === 'handler') {