@conduction/nextcloud-vue 2.56.0-beta.37 → 2.56.0-beta.38
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.
- package/dist/esm/components/CnAdvancedFormDialog/CnMetadataTab.vue.js +1 -1
- package/dist/esm/components/CnAdvancedFormDialog/CnMetadataTab.vue2.js +3 -2
- package/dist/esm/components/CnAdvancedFormDialog/CnMetadataTab.vue2.js.map +1 -1
- package/dist/esm/components/CnAdvancedFormDialog/CnMetadataTab.vue3.js.map +1 -1
- package/dist/esm/components/CnAdvancedFormDialog/CnPropertyValueCell.vue.js +1 -1
- package/dist/esm/components/CnAdvancedFormDialog/CnPropertyValueCell.vue2.js +5 -4
- package/dist/esm/components/CnAdvancedFormDialog/CnPropertyValueCell.vue2.js.map +1 -1
- package/dist/esm/components/CnAdvancedFormDialog/CnPropertyValueCell.vue3.js.map +1 -1
- package/dist/esm/components/CnAnalyticsReportPicker/CnAnalyticsReportPicker.vue.js +1 -1
- package/dist/esm/components/CnAnalyticsReportPicker/CnAnalyticsReportPicker.vue2.js +2 -1
- package/dist/esm/components/CnAnalyticsReportPicker/CnAnalyticsReportPicker.vue2.js.map +1 -1
- package/dist/esm/components/CnAnalyticsReportPicker/CnAnalyticsReportPicker.vue3.js.map +1 -1
- package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue.js +1 -1
- package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue2.js +2 -1
- package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue2.js.map +1 -1
- package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue3.js.map +1 -1
- package/dist/esm/components/CnBoardView/CnBoardView.vue.js +1 -1
- package/dist/esm/components/CnBoardView/CnBoardView.vue2.js +156 -14
- package/dist/esm/components/CnBoardView/CnBoardView.vue2.js.map +1 -1
- package/dist/esm/components/CnBoardView/CnBoardView.vue3.js +105 -74
- package/dist/esm/components/CnBoardView/CnBoardView.vue3.js.map +1 -1
- package/dist/esm/components/CnCalendarEventPicker/CnCalendarEventPicker.vue.js +1 -1
- package/dist/esm/components/CnCalendarEventPicker/CnCalendarEventPicker.vue2.js +2 -1
- package/dist/esm/components/CnCalendarEventPicker/CnCalendarEventPicker.vue2.js.map +1 -1
- package/dist/esm/components/CnCalendarEventPicker/CnCalendarEventPicker.vue3.js.map +1 -1
- package/dist/esm/components/CnCalendarWidget/CnCalendarWidget.vue.js +1 -1
- package/dist/esm/components/CnCalendarWidget/CnCalendarWidget.vue2.js +2 -1
- package/dist/esm/components/CnCalendarWidget/CnCalendarWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnCalendarWidget/CnCalendarWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnChartWidget/CnChartWidget.vue.js +1 -1
- package/dist/esm/components/CnChartWidget/CnChartWidget.vue2.js +6 -5
- package/dist/esm/components/CnChartWidget/CnChartWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnChartWidget/CnChartWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnCollectivePagePicker/CnCollectivePagePicker.vue.js +1 -1
- package/dist/esm/components/CnCollectivePagePicker/CnCollectivePagePicker.vue2.js +2 -1
- package/dist/esm/components/CnCollectivePagePicker/CnCollectivePagePicker.vue2.js.map +1 -1
- package/dist/esm/components/CnCollectivePagePicker/CnCollectivePagePicker.vue3.js.map +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationThread.vue.js +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationThread.vue2.js +2 -1
- package/dist/esm/components/CnConversationThread/CnConversationThread.vue2.js.map +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationThread.vue3.js.map +1 -1
- package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue.js +1 -1
- package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue2.js +2 -1
- package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +2 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
- package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue.js +1 -1
- package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue2.js +3 -1
- package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue2.js.map +1 -1
- package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailHeaderChips.vue2.js +2 -1
- package/dist/esm/components/CnDetailPage/CnDetailHeaderChips.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailHeaderChips.vue3.js.map +1 -1
- package/dist/esm/components/CnEmailPicker/CnEmailPicker.vue.js +1 -1
- package/dist/esm/components/CnEmailPicker/CnEmailPicker.vue2.js +2 -1
- package/dist/esm/components/CnEmailPicker/CnEmailPicker.vue2.js.map +1 -1
- package/dist/esm/components/CnEmailPicker/CnEmailPicker.vue3.js.map +1 -1
- package/dist/esm/components/CnFederationStatus/CnFederationStatus.vue.js +1 -1
- package/dist/esm/components/CnFederationStatus/CnFederationStatus.vue2.js +3 -1
- package/dist/esm/components/CnFederationStatus/CnFederationStatus.vue2.js.map +1 -1
- package/dist/esm/components/CnFederationStatus/CnFederationStatus.vue3.js.map +1 -1
- package/dist/esm/components/CnFileManager/CnFileManager.vue.js +1 -1
- package/dist/esm/components/CnFileManager/CnFileManager.vue2.js +3 -1
- package/dist/esm/components/CnFileManager/CnFileManager.vue2.js.map +1 -1
- package/dist/esm/components/CnFileManager/CnFileManager.vue3.js.map +1 -1
- package/dist/esm/components/CnFilePreview/CnFilePreview.vue.js +1 -1
- package/dist/esm/components/CnFilePreview/CnFilePreview.vue2.js +2 -1
- package/dist/esm/components/CnFilePreview/CnFilePreview.vue2.js.map +1 -1
- package/dist/esm/components/CnFilePreview/CnFilePreview.vue3.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue.js +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js +49 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js +3 -3
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js.map +1 -1
- package/dist/esm/components/CnFollowToggle/CnFollowToggle.vue.js +1 -1
- package/dist/esm/components/CnFollowToggle/CnFollowToggle.vue2.js +2 -1
- package/dist/esm/components/CnFollowToggle/CnFollowToggle.vue2.js.map +1 -1
- package/dist/esm/components/CnFollowToggle/CnFollowToggle.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +28 -5
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnNotesCard/CnNotesCard.vue.js +1 -1
- package/dist/esm/components/CnNotesCard/CnNotesCard.vue2.js +2 -1
- package/dist/esm/components/CnNotesCard/CnNotesCard.vue2.js.map +1 -1
- package/dist/esm/components/CnNotesCard/CnNotesCard.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectCalendar/CnObjectCalendar.vue.js +1 -1
- package/dist/esm/components/CnObjectCalendar/CnObjectCalendar.vue2.js +3 -2
- package/dist/esm/components/CnObjectCalendar/CnObjectCalendar.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectCalendar/CnObjectCalendar.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue.js +1 -1
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js +28 -0
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js +82 -75
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectMetadataWidget/CnObjectMetadataWidget.vue.js +1 -1
- package/dist/esm/components/CnObjectMetadataWidget/CnObjectMetadataWidget.vue2.js +5 -4
- package/dist/esm/components/CnObjectMetadataWidget/CnObjectMetadataWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectMetadataWidget/CnObjectMetadataWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnAuditTrailTab.vue.js +1 -1
- package/dist/esm/components/CnObjectSidebar/CnAuditTrailTab.vue2.js +2 -1
- package/dist/esm/components/CnObjectSidebar/CnAuditTrailTab.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnAuditTrailTab.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnFlowTasksPanel.vue.js +1 -1
- package/dist/esm/components/CnObjectSidebar/CnFlowTasksPanel.vue2.js +2 -1
- package/dist/esm/components/CnObjectSidebar/CnFlowTasksPanel.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnFlowTasksPanel.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue.js +1 -1
- package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue2.js +2 -1
- package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnTasksTab.vue.js +1 -1
- package/dist/esm/components/CnObjectSidebar/CnTasksTab.vue2.js +2 -1
- package/dist/esm/components/CnObjectSidebar/CnTasksTab.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnTasksTab.vue3.js.map +1 -1
- package/dist/esm/components/CnPropertySourceField/CnPropertySourceField.vue.js +1 -1
- package/dist/esm/components/CnPropertySourceField/CnPropertySourceField.vue2.js +2 -1
- package/dist/esm/components/CnPropertySourceField/CnPropertySourceField.vue2.js.map +1 -1
- package/dist/esm/components/CnPropertySourceField/CnPropertySourceField.vue3.js.map +1 -1
- package/dist/esm/components/CnRoadmapItem/CnRoadmapItem.vue.js +1 -1
- package/dist/esm/components/CnRoadmapItem/CnRoadmapItem.vue2.js +2 -1
- package/dist/esm/components/CnRoadmapItem/CnRoadmapItem.vue2.js.map +1 -1
- package/dist/esm/components/CnRoadmapItem/CnRoadmapItem.vue3.js.map +1 -1
- package/dist/esm/components/CnSchemaFormDialog/CnSchemaFormDialog.vue2.js +2 -0
- package/dist/esm/components/CnSchemaFormDialog/CnSchemaFormDialog.vue2.js.map +1 -1
- package/dist/esm/components/CnSchemaFormDialog/CnSchemaFormDialog.vue3.js +2 -2
- package/dist/esm/components/CnSchemaFormDialog/CnSchemaFormDialog.vue3.js.map +1 -1
- package/dist/esm/components/CnStatsBlock/CnStatsBlock.vue.js +1 -1
- package/dist/esm/components/CnStatsBlock/CnStatsBlock.vue2.js +2 -1
- package/dist/esm/components/CnStatsBlock/CnStatsBlock.vue2.js.map +1 -1
- package/dist/esm/components/CnStatsBlock/CnStatsBlock.vue3.js.map +1 -1
- package/dist/esm/components/CnSummaryAggregates/CnSummaryAggregates.vue.js +1 -1
- package/dist/esm/components/CnSummaryAggregates/CnSummaryAggregates.vue2.js +2 -1
- package/dist/esm/components/CnSummaryAggregates/CnSummaryAggregates.vue2.js.map +1 -1
- package/dist/esm/components/CnSummaryAggregates/CnSummaryAggregates.vue3.js.map +1 -1
- package/dist/esm/components/CnTasksCard/CnTasksCard.vue.js +1 -1
- package/dist/esm/components/CnTasksCard/CnTasksCard.vue2.js +2 -1
- package/dist/esm/components/CnTasksCard/CnTasksCard.vue2.js.map +1 -1
- package/dist/esm/components/CnTasksCard/CnTasksCard.vue3.js.map +1 -1
- package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue.js +1 -1
- package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue2.js +2 -1
- package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnTranslatedBadge/CnTranslatedBadge.vue.js +1 -1
- package/dist/esm/components/CnTranslatedBadge/CnTranslatedBadge.vue2.js +2 -1
- package/dist/esm/components/CnTranslatedBadge/CnTranslatedBadge.vue2.js.map +1 -1
- package/dist/esm/components/CnVersionHistory/CnVersionHistory.vue.js +1 -1
- package/dist/esm/components/CnVersionHistory/CnVersionHistory.vue2.js +2 -1
- package/dist/esm/components/CnVersionHistory/CnVersionHistory.vue2.js.map +1 -1
- package/dist/esm/components/CnVersionHistory/CnVersionHistory.vue3.js.map +1 -1
- package/dist/esm/dialogs/CnNoteHistoryDialog.vue.js +1 -1
- package/dist/esm/dialogs/CnNoteHistoryDialog.vue2.js +2 -1
- package/dist/esm/dialogs/CnNoteHistoryDialog.vue2.js.map +1 -1
- package/dist/esm/dialogs/CnNoteHistoryDialog.vue3.js.map +1 -1
- package/dist/esm/integrations/builtin/activity/CnActivityCard.vue.js +1 -1
- package/dist/esm/integrations/builtin/activity/CnActivityCard.vue2.js +3 -2
- package/dist/esm/integrations/builtin/activity/CnActivityCard.vue2.js.map +1 -1
- package/dist/esm/integrations/builtin/activity/CnActivityCard.vue3.js.map +1 -1
- package/dist/esm/integrations/builtin/activity/CnActivityTab.vue.js +1 -1
- package/dist/esm/integrations/builtin/activity/CnActivityTab.vue2.js +4 -3
- package/dist/esm/integrations/builtin/activity/CnActivityTab.vue2.js.map +1 -1
- package/dist/esm/integrations/builtin/activity/CnActivityTab.vue3.js.map +1 -1
- package/dist/esm/integrations/builtin/analytics/CnAnalyticsTab.vue.js +1 -1
- package/dist/esm/integrations/builtin/analytics/CnAnalyticsTab.vue2.js +3 -2
- package/dist/esm/integrations/builtin/analytics/CnAnalyticsTab.vue2.js.map +1 -1
- package/dist/esm/integrations/builtin/analytics/CnAnalyticsTab.vue3.js.map +1 -1
- package/dist/esm/integrations/builtin/calendar/CnCalendarCard.vue.js +1 -1
- package/dist/esm/integrations/builtin/calendar/CnCalendarCard.vue2.js +2 -1
- package/dist/esm/integrations/builtin/calendar/CnCalendarCard.vue2.js.map +1 -1
- package/dist/esm/integrations/builtin/calendar/CnCalendarCard.vue3.js.map +1 -1
- package/dist/esm/integrations/builtin/calendar/CnCalendarTab.vue.js +1 -1
- package/dist/esm/integrations/builtin/calendar/CnCalendarTab.vue2.js +6 -5
- package/dist/esm/integrations/builtin/calendar/CnCalendarTab.vue2.js.map +1 -1
- package/dist/esm/integrations/builtin/calendar/CnCalendarTab.vue3.js.map +1 -1
- package/dist/esm/integrations/builtin/contactmoment/CnContactmomentCard.vue.js +1 -1
- package/dist/esm/integrations/builtin/contactmoment/CnContactmomentCard.vue2.js +2 -1
- package/dist/esm/integrations/builtin/contactmoment/CnContactmomentCard.vue2.js.map +1 -1
- package/dist/esm/integrations/builtin/contactmoment/CnContactmomentCard.vue3.js.map +1 -1
- package/dist/esm/integrations/builtin/cospend/CnCospendTab.vue.js +1 -1
- package/dist/esm/integrations/builtin/cospend/CnCospendTab.vue2.js +2 -1
- package/dist/esm/integrations/builtin/cospend/CnCospendTab.vue2.js.map +1 -1
- package/dist/esm/integrations/builtin/cospend/CnCospendTab.vue3.js.map +1 -1
- package/dist/esm/integrations/builtin/deck/CnDeckTab.vue.js +1 -1
- package/dist/esm/integrations/builtin/deck/CnDeckTab.vue2.js +2 -1
- package/dist/esm/integrations/builtin/deck/CnDeckTab.vue2.js.map +1 -1
- package/dist/esm/integrations/builtin/deck/CnDeckTab.vue3.js.map +1 -1
- package/dist/esm/integrations/builtin/email/CnEmailCard.vue.js +1 -1
- package/dist/esm/integrations/builtin/email/CnEmailCard.vue2.js +2 -1
- package/dist/esm/integrations/builtin/email/CnEmailCard.vue2.js.map +1 -1
- package/dist/esm/integrations/builtin/email/CnEmailCard.vue3.js.map +1 -1
- package/dist/esm/integrations/builtin/field-inspection/CnFieldInspectionCard.vue.js +1 -1
- package/dist/esm/integrations/builtin/field-inspection/CnFieldInspectionCard.vue2.js +2 -1
- package/dist/esm/integrations/builtin/field-inspection/CnFieldInspectionCard.vue2.js.map +1 -1
- package/dist/esm/integrations/builtin/field-inspection/CnFieldInspectionCard.vue3.js.map +1 -1
- package/dist/esm/integrations/builtin/field-inspection/CnFieldInspectionTab.vue.js +1 -1
- package/dist/esm/integrations/builtin/field-inspection/CnFieldInspectionTab.vue2.js +2 -1
- package/dist/esm/integrations/builtin/field-inspection/CnFieldInspectionTab.vue2.js.map +1 -1
- package/dist/esm/integrations/builtin/field-inspection/CnFieldInspectionTab.vue3.js.map +1 -1
- package/dist/esm/integrations/builtin/photos/CnPhotosTab.vue.js +1 -1
- package/dist/esm/integrations/builtin/photos/CnPhotosTab.vue2.js +2 -1
- package/dist/esm/integrations/builtin/photos/CnPhotosTab.vue2.js.map +1 -1
- package/dist/esm/integrations/builtin/photos/CnPhotosTab.vue3.js.map +1 -1
- package/dist/esm/l10n/en.json.js +35 -2
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +38 -2
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +994 -909
- package/dist/esm/store/useObjectStore.js +7 -2
- package/dist/esm/store/useObjectStore.js.map +1 -1
- package/dist/esm/utils/boardColumns.js +50 -1
- package/dist/esm/utils/boardColumns.js.map +1 -1
- package/dist/esm/utils/boardReferenceColumns.js +55 -3
- package/dist/esm/utils/boardReferenceColumns.js.map +1 -1
- package/dist/esm/utils/schema.js +5 -4
- package/dist/esm/utils/schema.js.map +1 -1
- package/dist/esm/utils/userLocale.js +30 -0
- package/dist/esm/utils/userLocale.js.map +1 -0
- package/dist/esm/utils/validateManifestV2.compiled.js +2 -2
- package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +837 -359
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +994 -909
- package/l10n/en.json +35 -2
- package/l10n/nl.json +38 -2
- package/package.json +1 -1
- package/src/components/CnAdvancedFormDialog/CnMetadataTab.vue +3 -2
- package/src/components/CnAdvancedFormDialog/CnPropertyValueCell.vue +5 -4
- package/src/components/CnAnalyticsReportPicker/CnAnalyticsReportPicker.vue +2 -1
- package/src/components/CnAuditTrailCard/CnAuditTrailCard.vue +2 -1
- package/src/components/CnBoardView/CnBoardView.vue +189 -24
- package/src/components/CnCalendarEventPicker/CnCalendarEventPicker.vue +2 -1
- package/src/components/CnCalendarWidget/CnCalendarWidget.vue +2 -1
- package/src/components/CnChartWidget/CnChartWidget.vue +6 -5
- package/src/components/CnCollectivePagePicker/CnCollectivePagePicker.vue +2 -1
- package/src/components/CnConversationThread/CnConversationThread.vue +2 -1
- package/src/components/CnCountdownWidget/CnCountdownWidget.vue +2 -1
- package/src/components/CnDashboardPage/CnDashboardPage.vue +2 -1
- package/src/components/CnDataMatrix/CnDataMatrix.vue +2 -1
- package/src/components/CnDetailPage/CnDetailHeaderChips.vue +2 -1
- package/src/components/CnEmailPicker/CnEmailPicker.vue +2 -1
- package/src/components/CnFederationStatus/CnFederationStatus.vue +3 -1
- package/src/components/CnFileManager/CnFileManager.vue +2 -1
- package/src/components/CnFilePreview/CnFilePreview.vue +2 -1
- package/src/components/CnFilesBrowser/CnFilesBrowser.vue +54 -6
- package/src/components/CnFollowToggle/CnFollowToggle.vue +2 -1
- package/src/components/CnIndexPage/CnIndexPage.vue +28 -4
- package/src/components/CnNotesCard/CnNotesCard.vue +2 -1
- package/src/components/CnObjectCalendar/CnObjectCalendar.vue +3 -2
- package/src/components/CnObjectDataWidget/CnObjectDataWidget.vue +36 -0
- package/src/components/CnObjectMetadataWidget/CnObjectMetadataWidget.vue +5 -4
- package/src/components/CnObjectSidebar/CnAuditTrailTab.vue +2 -1
- package/src/components/CnObjectSidebar/CnFlowTasksPanel.vue +2 -1
- package/src/components/CnObjectSidebar/CnNotesTab.vue +2 -1
- package/src/components/CnObjectSidebar/CnTasksTab.vue +2 -1
- package/src/components/CnPropertySourceField/CnPropertySourceField.vue +2 -1
- package/src/components/CnRoadmapItem/CnRoadmapItem.vue +2 -1
- package/src/components/CnSchemaFormDialog/CnSchemaFormDialog.vue +4 -2
- package/src/components/CnStatsBlock/CnStatsBlock.vue +2 -1
- package/src/components/CnSummaryAggregates/CnSummaryAggregates.vue +2 -1
- package/src/components/CnTasksCard/CnTasksCard.vue +2 -1
- package/src/components/CnTimelineWidget/CnTimelineWidget.vue +2 -1
- package/src/components/CnTranslatedBadge/CnTranslatedBadge.vue +2 -1
- package/src/components/CnVersionHistory/CnVersionHistory.vue +2 -1
- package/src/css/board.css +40 -0
- package/src/dialogs/CnNoteHistoryDialog.vue +2 -1
- package/src/integrations/builtin/activity/CnActivityCard.vue +3 -2
- package/src/integrations/builtin/activity/CnActivityTab.vue +4 -3
- package/src/integrations/builtin/analytics/CnAnalyticsTab.vue +3 -2
- package/src/integrations/builtin/calendar/CnCalendarCard.vue +2 -1
- package/src/integrations/builtin/calendar/CnCalendarTab.vue +6 -5
- package/src/integrations/builtin/contactmoment/CnContactmomentCard.vue +2 -1
- package/src/integrations/builtin/cospend/CnCospendTab.vue +2 -1
- package/src/integrations/builtin/deck/CnDeckTab.vue +2 -1
- package/src/integrations/builtin/email/CnEmailCard.vue +2 -1
- package/src/integrations/builtin/field-inspection/CnFieldInspectionCard.vue +2 -1
- package/src/integrations/builtin/field-inspection/CnFieldInspectionTab.vue +2 -1
- package/src/integrations/builtin/photos/CnPhotosTab.vue +2 -1
- package/src/schemas/app-manifest-v2.schema.json +2 -1
- package/src/store/useObjectStore.js +7 -2
- package/src/utils/boardColumns.js +49 -0
- package/src/utils/boardReferenceColumns.js +54 -2
- package/src/utils/schema.js +5 -4
- package/src/utils/userLocale.js +26 -0
- package/src/utils/validateManifestV2.compiled.js +2 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { capacityValue } from './boardColumns.js';
|
|
1
2
|
import { prefixUrl, buildQueryString, buildHeaders } from './headers.js';
|
|
2
3
|
import { readPath } from './readPath.js';
|
|
3
4
|
import { schemaRefSlug } from './schemaRefSlug.js';
|
|
@@ -125,7 +126,9 @@ function referenceTargetOf(source, { register = '', property = null } = {}) {
|
|
|
125
126
|
* @param {string} [options.mergeBy] The row field whose equal values make one column.
|
|
126
127
|
* @param {{field: string, rowField: string}|null} [options.narrowBy] The parent link.
|
|
127
128
|
* @param {string} [options.narrowValue] The parent the board is narrowed to, '' for all.
|
|
128
|
-
* @
|
|
129
|
+
* @param {string} [options.capacityField] The numeric row field that holds a column's limit.
|
|
130
|
+
* A column merged from two or more rows shows none: each row has its own limit.
|
|
131
|
+
* @return {{states: Array<{key: string, label: string, color: string, capacity?: (number|null)}>, keyByValue: Map<string, string>, refsByKey: Map<string, Array<object>>}} The stages.
|
|
129
132
|
* @spec openspec/changes/screens-board-reference-columns/specs/board-view/spec.md#requirement-columns-can-be-the-rows-a-field-references
|
|
130
133
|
*/
|
|
131
134
|
function buildReferenceStages({
|
|
@@ -136,6 +139,7 @@ function buildReferenceStages({
|
|
|
136
139
|
mergeBy = '',
|
|
137
140
|
narrowBy = null,
|
|
138
141
|
narrowValue = '',
|
|
142
|
+
capacityField = '',
|
|
139
143
|
} = {}) {
|
|
140
144
|
const list = (Array.isArray(refs) ? refs : []).filter((ref) => ref && typeof ref === 'object' && refIdOf(ref) !== '');
|
|
141
145
|
const narrowed = narrowBy && narrowBy.field && narrowValue !== ''
|
|
@@ -162,13 +166,61 @@ function buildReferenceStages({
|
|
|
162
166
|
if (!refsByKey.has(key)) {
|
|
163
167
|
refsByKey.set(key, []);
|
|
164
168
|
const color = colorField ? readPath(ref, colorField) : ref.color;
|
|
165
|
-
|
|
169
|
+
const state = { key, label, color: typeof color === 'string' ? color : '' };
|
|
170
|
+
if (capacityField) {
|
|
171
|
+
state.capacity = capacityOfRef(ref, capacityField);
|
|
172
|
+
}
|
|
173
|
+
states.push(state);
|
|
166
174
|
}
|
|
167
175
|
refsByKey.get(key).push(ref);
|
|
168
176
|
}
|
|
177
|
+
for (const state of states) {
|
|
178
|
+
if (capacityField && refsByKey.get(state.key).length > 1) {
|
|
179
|
+
state.capacity = null;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
169
182
|
return { states, keyByValue, refsByKey }
|
|
170
183
|
}
|
|
171
184
|
|
|
185
|
+
/**
|
|
186
|
+
* The limit one referenced row declares.
|
|
187
|
+
*
|
|
188
|
+
* @param {object} ref The referenced row.
|
|
189
|
+
* @param {string} capacityField The row field that holds the limit.
|
|
190
|
+
* @return {number|null} The limit, or null when it has none.
|
|
191
|
+
* @spec openspec/changes/board-column-capacity/specs/board-view/spec.md#requirement-a-column-can-carry-a-capacity
|
|
192
|
+
*/
|
|
193
|
+
function capacityOfRef(ref, capacityField) {
|
|
194
|
+
return capacityField ? capacityValue(readPath(ref, capacityField)) : null
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Whether a drop fills a referenced row past its limit: the cards that
|
|
199
|
+
* already carry that row, counted against the row's own limit. Counted per
|
|
200
|
+
* row, not per column, so a column merged from several rows still refuses
|
|
201
|
+
* the one that is full.
|
|
202
|
+
*
|
|
203
|
+
* @param {object} options The call.
|
|
204
|
+
* @param {object} options.target The referenced row the drop would write.
|
|
205
|
+
* @param {object} options.card The card being moved.
|
|
206
|
+
* @param {Array<object>} options.rows The cards the board holds.
|
|
207
|
+
* @param {string} options.field The row field the columns come from.
|
|
208
|
+
* @param {string} options.capacityField The referenced row's limit field.
|
|
209
|
+
* @param {string} [options.rowKey] The row key, so the moving card is not counted.
|
|
210
|
+
* @return {{count: number, capacity: number}|null} The count and limit when full, else null.
|
|
211
|
+
* @spec openspec/changes/board-column-capacity/specs/board-view/spec.md#requirement-a-drop-into-a-full-column-is-refused
|
|
212
|
+
*/
|
|
213
|
+
function fullTargetOf({ target, card, rows = [], field, capacityField, rowKey = 'id' } = {}) {
|
|
214
|
+
const capacity = capacityOfRef(target, capacityField);
|
|
215
|
+
if (capacity === null) {
|
|
216
|
+
return null
|
|
217
|
+
}
|
|
218
|
+
const id = refIdOf(target);
|
|
219
|
+
const self = String(card?.[rowKey] ?? '');
|
|
220
|
+
const count = (Array.isArray(rows) ? rows : []).filter((row) => String(row?.[rowKey] ?? '') !== self && refIdOf(readPath(row, field)) === id).length;
|
|
221
|
+
return count >= capacity ? { count, capacity } : null
|
|
222
|
+
}
|
|
223
|
+
|
|
172
224
|
/**
|
|
173
225
|
* The stages of a field with no referenced schema (a user id): the values
|
|
174
226
|
* present on the rows, by label, then one column for no value.
|
|
@@ -274,5 +326,5 @@ async function fetchReferenceObjects({ register, schema, filter = {}, limit = 50
|
|
|
274
326
|
return Array.isArray(data?.results) ? data.results : (Array.isArray(data) ? data : [])
|
|
275
327
|
}
|
|
276
328
|
|
|
277
|
-
export { NO_VALUE_KEY, buildReferenceStages, buildValueStages, columnFieldsOf, columnKeyOfRow, fetchReferenceObjects, refIdOf, referenceTargetOf, resolveDropValue };
|
|
329
|
+
export { NO_VALUE_KEY, buildReferenceStages, buildValueStages, capacityOfRef, columnFieldsOf, columnKeyOfRow, fetchReferenceObjects, fullTargetOf, refIdOf, referenceTargetOf, resolveDropValue };
|
|
278
330
|
//# sourceMappingURL=boardReferenceColumns.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boardReferenceColumns.js","sources":["../../../src/utils/boardReferenceColumns.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>\n * SPDX-License-Identifier: EUPL-1.2\n *\n * Board columns from a REFERENCED field (screens-board-reference-columns).\n *\n * A status that is an enum or a lifecycle list carries its stages on the\n * field, and `boardColumns.js` reads them there. A status that is a reference\n * to another object (a case's `status` pointing at a statusType row) carries\n * nothing on the field: the stages are the rows of the referenced schema. This\n * module turns those rows into the same `states` list `stagesOf()` reads, plus\n * the map from a row's raw value (the referenced id) to its column.\n *\n * 🔴 THE COLUMNS ARE STILL THE SCHEMA'S, NOT THE DATA'S. They are the\n * referenced rows, fetched, not the values present on the loaded cards, so an\n * empty stage is still a column to drop a card into. The one exception is a\n * field with no referenced schema at all (a Nextcloud user id): there the\n * values present are all there is, and a \"nobody\" column is always added so\n * work without an owner stays visible and can be dropped back to nobody.\n *\n * 🔴 MERGED COLUMNS RESOLVE PER CARD. Referenced rows are often per parent\n * (every case type has its own \"In behandeling\"). Merged by name they make one\n * column, and a drop must then write the row of THAT card's parent. A column\n * with no row for the card's parent is not a place the card can go, and the\n * drop is refused rather than written to some other parent's row.\n *\n * Pure apart from `fetchReferenceObjects`: no store, no Vue.\n */\n\nimport { buildHeaders, buildQueryString, prefixUrl } from './headers.js'\nimport { readPath } from './readPath.js'\nimport { schemaRefSlug } from './schemaRefSlug.js'\n\n/** The column of cards with no value, for a `values` column field. */\nexport const NO_VALUE_KEY = '__none__'\n\n/**\n * The id a reference value carries: a string as is, an object by its `id`,\n * `uuid` or `@self.id`.\n *\n * @param {unknown} value A reference as a row holds it.\n * @return {string} The id, '' when there is none.\n */\nexport function refIdOf(value) {\n\tif (value === null || value === undefined) {\n\t\treturn ''\n\t}\n\tif (typeof value === 'object') {\n\t\tconst id = value.id ?? value.uuid ?? value['@self']?.id ?? value.value ?? ''\n\t\treturn id === null || id === undefined ? '' : String(id)\n\t}\n\treturn String(value)\n}\n\n/**\n * A value as text: a string or number as is, an object by its name.\n *\n * @param {unknown} value The raw value.\n * @return {string} The text.\n */\nfunction textOf(value) {\n\tif (value === null || value === undefined) {\n\t\treturn ''\n\t}\n\tif (typeof value === 'object') {\n\t\treturn String(value.displayName ?? value.name ?? value.title ?? value.label ?? '').trim()\n\t}\n\treturn String(value).trim()\n}\n\n/**\n * The column fields a board offers, normalised. Without `columnFields` the\n * board has one, its `statusField`, read from the schema as before.\n *\n * @param {object} board The board configuration (manifest `config.board`).\n * @return {Array<{field: string, label: string, source: (object|null), kind: string, readOnly: boolean, moveHandler: string, moveTargetsHandler: string}>} The fields.\n * @spec openspec/changes/screens-board-reference-columns/specs/board-view/spec.md#requirement-a-board-can-switch-the-field-its-columns-come-from\n */\nexport function columnFieldsOf(board) {\n\tconst declared = Array.isArray(board?.columnFields) ? board.columnFields : []\n\treturn declared\n\t\t.map((entry) => (typeof entry === 'string' ? { field: entry } : entry))\n\t\t.filter((entry) => entry && typeof entry.field === 'string' && entry.field !== '')\n\t\t.map((entry) => ({\n\t\t\tfield: entry.field,\n\t\t\tlabel: typeof entry.label === 'string' && entry.label !== '' ? entry.label : entry.field,\n\t\t\tsource: entry.source && typeof entry.source === 'object' ? entry.source : null,\n\t\t\tkind: entry.kind === 'values' ? 'values' : (entry.source ? 'reference' : 'schema'),\n\t\t\treadOnly: entry.readOnly === true,\n\t\t\tmoveHandler: typeof entry.moveHandler === 'string' ? entry.moveHandler : '',\n\t\t\tmoveTargetsHandler: typeof entry.moveTargetsHandler === 'string' ? entry.moveTargetsHandler : '',\n\t\t\tvalueLabels: entry.valueLabels && typeof entry.valueLabels === 'object' ? entry.valueLabels : null,\n\t\t\temptyLabel: typeof entry.emptyLabel === 'string' ? entry.emptyLabel : '',\n\t\t}))\n}\n\n/**\n * The register and schema a reference column reads its rows from: the\n * source's own, else the page's register and the property's `$ref`.\n *\n * @param {object} source The column field's `source`.\n * @param {object} options The context.\n * @param {string} options.register The page's register.\n * @param {object} [options.property] The field's schema property.\n * @return {{register: string, schema: string}} Both, '' when unknown.\n */\nexport function referenceTargetOf(source, { register = '', property = null } = {}) {\n\tconst schema = source?.schema || schemaRefSlug(property?.$ref ?? property?.items?.$ref ?? '')\n\treturn {\n\t\tregister: String(source?.register || register || ''),\n\t\tschema: schema === '' || schema === null || schema === undefined ? '' : String(schema),\n\t}\n}\n\n/**\n * The stages of a referenced field: the referenced rows, narrowed to one\n * parent when asked, ordered, and merged by a field when asked.\n *\n * @param {object} options The call.\n * @param {Array<object>} options.refs The referenced rows.\n * @param {string} [options.labelField] The row field that names a column.\n * @param {string} [options.orderField] The numeric row field the columns are ordered by.\n * @param {string} [options.colorField] The row field that holds the dot colour.\n * @param {string} [options.mergeBy] The row field whose equal values make one column.\n * @param {{field: string, rowField: string}|null} [options.narrowBy] The parent link.\n * @param {string} [options.narrowValue] The parent the board is narrowed to, '' for all.\n * @return {{states: Array<{key: string, label: string, color: string}>, keyByValue: Map<string, string>, refsByKey: Map<string, Array<object>>}} The stages.\n * @spec openspec/changes/screens-board-reference-columns/specs/board-view/spec.md#requirement-columns-can-be-the-rows-a-field-references\n */\nexport function buildReferenceStages({\n\trefs = [],\n\tlabelField = '',\n\torderField = '',\n\tcolorField = '',\n\tmergeBy = '',\n\tnarrowBy = null,\n\tnarrowValue = '',\n} = {}) {\n\tconst list = (Array.isArray(refs) ? refs : []).filter((ref) => ref && typeof ref === 'object' && refIdOf(ref) !== '')\n\tconst narrowed = narrowBy && narrowBy.field && narrowValue !== ''\n\t\t? list.filter((ref) => refIdOf(readPath(ref, narrowBy.field)) === String(narrowValue))\n\t\t: list\n\n\tconst orderOf = (ref) => {\n\t\tconst n = Number(orderField ? readPath(ref, orderField) : NaN)\n\t\treturn Number.isFinite(n) ? n : Number.MAX_SAFE_INTEGER\n\t}\n\tconst ordered = narrowed\n\t\t.map((ref, index) => ({ ref, index }))\n\t\t.sort((a, b) => (orderOf(a.ref) - orderOf(b.ref)) || (a.index - b.index))\n\t\t.map((entry) => entry.ref)\n\n\tconst states = []\n\tconst keyByValue = new Map()\n\tconst refsByKey = new Map()\n\tfor (const ref of ordered) {\n\t\tconst id = refIdOf(ref)\n\t\tconst label = textOf(labelField ? readPath(ref, labelField) : (ref.name ?? ref.title)) || id\n\t\tconst key = mergeBy ? (textOf(readPath(ref, mergeBy)) || id) : id\n\t\tkeyByValue.set(id, key)\n\t\tif (!refsByKey.has(key)) {\n\t\t\trefsByKey.set(key, [])\n\t\t\tconst color = colorField ? readPath(ref, colorField) : ref.color\n\t\t\tstates.push({ key, label, color: typeof color === 'string' ? color : '' })\n\t\t}\n\t\trefsByKey.get(key).push(ref)\n\t}\n\treturn { states, keyByValue, refsByKey }\n}\n\n/**\n * The stages of a field with no referenced schema (a user id): the values\n * present on the rows, by label, then one column for no value.\n *\n * @param {object} options The call.\n * @param {Array<object>} options.rows The rows the list holds.\n * @param {string} options.field The row field.\n * @param {object} [options.valueLabels] Raw value to the label to show.\n * @param {string} [options.emptyLabel] The no-value column's label.\n * @return {{states: Array<{key: string, label: string, color: string}>, keyByValue: Map<string, string>, refsByKey: Map<string, Array<object>>}} The stages.\n * @spec openspec/changes/screens-board-reference-columns/specs/board-view/spec.md#requirement-a-field-without-a-referenced-schema-takes-its-values\n */\nexport function buildValueStages({ rows = [], field = '', valueLabels = null, emptyLabel = 'Nobody' } = {}) {\n\tconst labels = valueLabels && typeof valueLabels === 'object' ? valueLabels : {}\n\tconst seen = new Map()\n\tfor (const row of Array.isArray(rows) ? rows : []) {\n\t\tconst raw = readPath(row, field)\n\t\tconst id = refIdOf(raw)\n\t\tif (id !== '' && !seen.has(id)) {\n\t\t\tseen.set(id, typeof labels[id] === 'string' ? labels[id] : (textOf(raw) || id))\n\t\t}\n\t}\n\tconst states = [...seen.entries()]\n\t\t.sort((a, b) => a[1].localeCompare(b[1]))\n\t\t.map(([key, label]) => ({ key, label, color: '' }))\n\tstates.push({ key: NO_VALUE_KEY, label: emptyLabel, color: '' })\n\tconst keyByValue = new Map(states.map((state) => [state.key, state.key]))\n\tkeyByValue.set('', NO_VALUE_KEY)\n\treturn { states, keyByValue, refsByKey: new Map() }\n}\n\n/**\n * The column a row sits in, under a value-to-column map.\n *\n * @param {object} row The row.\n * @param {string} field The row field.\n * @param {Map<string, string>} keyByValue The value-to-column map.\n * @return {string} The column key, or the raw value when the map has none\n * (which lands the card in the off-board column).\n */\nexport function columnKeyOfRow(row, field, keyByValue) {\n\tconst id = refIdOf(readPath(row, field))\n\treturn keyByValue.has(id) ? keyByValue.get(id) : id\n}\n\n/**\n * What a drop on a column writes for one card: the referenced row of that\n * column which belongs to the card's parent, or null when the column has none\n * (the card cannot go there).\n *\n * @param {object} options The call.\n * @param {object} options.card The card.\n * @param {string} options.toKey The column it was dropped on.\n * @param {string} options.kind `reference` or `values`.\n * @param {Map<string, Array<object>>} [options.refsByKey] The column's rows.\n * @param {{field: string, rowField: string}|null} [options.narrowBy] The parent link.\n * @return {{value: (string|null), target: (object|null)}|null} The value to write and its row, or null.\n * @spec openspec/changes/screens-board-reference-columns/specs/board-view/spec.md#requirement-a-drop-writes-the-reference\n */\nexport function resolveDropValue({ card, toKey, kind, refsByKey = new Map(), narrowBy = null } = {}) {\n\tif (kind === 'values') {\n\t\treturn { value: toKey === NO_VALUE_KEY ? null : String(toKey), target: null }\n\t}\n\tconst candidates = refsByKey.get(String(toKey)) || []\n\tif (candidates.length === 0) {\n\t\treturn null\n\t}\n\tif (narrowBy && narrowBy.field && narrowBy.rowField) {\n\t\tconst parent = refIdOf(readPath(card, narrowBy.rowField))\n\t\tconst match = candidates.find((ref) => refIdOf(readPath(ref, narrowBy.field)) === parent)\n\t\treturn match ? { value: refIdOf(match), target: match } : null\n\t}\n\treturn { value: refIdOf(candidates[0]), target: candidates[0] }\n}\n\n/**\n * Fetch the rows a reference column is built from, one list request.\n *\n * @param {object} options The call.\n * @param {string} options.register The register slug.\n * @param {string} options.schema The schema slug.\n * @param {object} [options.filter] Equality filters, e.g. `{ isFinal: false }`.\n * @param {number} [options.limit] The page size, 500 by default.\n * @return {Promise<Array<object>>} The rows.\n * @spec openspec/changes/screens-board-reference-columns/specs/board-view/spec.md#requirement-columns-can-be-the-rows-a-field-references\n */\nexport async function fetchReferenceObjects({ register, schema, filter = {}, limit = 500 } = {}) {\n\tif (!register || !schema) {\n\t\treturn []\n\t}\n\tconst params = { _limit: limit }\n\tfor (const [key, value] of Object.entries(filter || {})) {\n\t\tif (value !== undefined && value !== null && typeof value !== 'object') {\n\t\t\tparams[key] = typeof value === 'boolean' ? String(value) : value\n\t\t}\n\t}\n\tconst url = prefixUrl(`/apps/openregister/api/objects/${encodeURIComponent(register)}/${encodeURIComponent(schema)}${buildQueryString(params)}`)\n\tconst response = await fetch(url, { headers: buildHeaders() })\n\tif (!response.ok) {\n\t\tthrow new Error(`list returned ${response.status}`)\n\t}\n\tconst data = await response.json()\n\treturn Array.isArray(data?.results) ? data.results : (Array.isArray(data) ? data : [])\n}\n"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACY,MAAC,YAAY,GAAG,WAAU;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,OAAO,CAAC,KAAK,EAAE;AAC/B,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE;AAC5C,EAAE,OAAO,EAAE;AACX,EAAE;AACF,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAChC,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,KAAK,CAAC,KAAK,IAAI,GAAE;AAC9E,EAAE,OAAO,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,SAAS,GAAG,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC;AAC1D,EAAE;AACF,CAAC,OAAO,MAAM,CAAC,KAAK,CAAC;AACrB,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,MAAM,CAAC,KAAK,EAAE;AACvB,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE;AAC5C,EAAE,OAAO,EAAE;AACX,EAAE;AACF,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;A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C,GAAG,OAAO,KAAK,KAAK,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,MAAK;AACnE,GAAG;AACH,EAAE;AACF,CAAC,MAAM,GAAG,GAAG,SAAS,CAAC,CAAC,+BAA+B,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAC;AACjJ,CAAC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAC;AAC/D,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE;AACnB,EAAE,MAAM,IAAI,KAAK,CAAC,CAAC,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;AACrD,EAAE;AACF,CAAC,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,GAAE;AACnC,CAAC,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;AACvF;;;;"}
|
|
1
|
+
{"version":3,"file":"boardReferenceColumns.js","sources":["../../../src/utils/boardReferenceColumns.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>\n * SPDX-License-Identifier: EUPL-1.2\n *\n * Board columns from a REFERENCED field (screens-board-reference-columns).\n *\n * A status that is an enum or a lifecycle list carries its stages on the\n * field, and `boardColumns.js` reads them there. A status that is a reference\n * to another object (a case's `status` pointing at a statusType row) carries\n * nothing on the field: the stages are the rows of the referenced schema. This\n * module turns those rows into the same `states` list `stagesOf()` reads, plus\n * the map from a row's raw value (the referenced id) to its column.\n *\n * 🔴 THE COLUMNS ARE STILL THE SCHEMA'S, NOT THE DATA'S. They are the\n * referenced rows, fetched, not the values present on the loaded cards, so an\n * empty stage is still a column to drop a card into. The one exception is a\n * field with no referenced schema at all (a Nextcloud user id): there the\n * values present are all there is, and a \"nobody\" column is always added so\n * work without an owner stays visible and can be dropped back to nobody.\n *\n * 🔴 MERGED COLUMNS RESOLVE PER CARD. Referenced rows are often per parent\n * (every case type has its own \"In behandeling\"). Merged by name they make one\n * column, and a drop must then write the row of THAT card's parent. A column\n * with no row for the card's parent is not a place the card can go, and the\n * drop is refused rather than written to some other parent's row.\n *\n * Pure apart from `fetchReferenceObjects`: no store, no Vue.\n */\n\nimport { capacityValue } from './boardColumns.js'\nimport { buildHeaders, buildQueryString, prefixUrl } from './headers.js'\nimport { readPath } from './readPath.js'\nimport { schemaRefSlug } from './schemaRefSlug.js'\n\n/** The column of cards with no value, for a `values` column field. */\nexport const NO_VALUE_KEY = '__none__'\n\n/**\n * The id a reference value carries: a string as is, an object by its `id`,\n * `uuid` or `@self.id`.\n *\n * @param {unknown} value A reference as a row holds it.\n * @return {string} The id, '' when there is none.\n */\nexport function refIdOf(value) {\n\tif (value === null || value === undefined) {\n\t\treturn ''\n\t}\n\tif (typeof value === 'object') {\n\t\tconst id = value.id ?? value.uuid ?? value['@self']?.id ?? value.value ?? ''\n\t\treturn id === null || id === undefined ? '' : String(id)\n\t}\n\treturn String(value)\n}\n\n/**\n * A value as text: a string or number as is, an object by its name.\n *\n * @param {unknown} value The raw value.\n * @return {string} The text.\n */\nfunction textOf(value) {\n\tif (value === null || value === undefined) {\n\t\treturn ''\n\t}\n\tif (typeof value === 'object') {\n\t\treturn String(value.displayName ?? value.name ?? value.title ?? value.label ?? '').trim()\n\t}\n\treturn String(value).trim()\n}\n\n/**\n * The column fields a board offers, normalised. Without `columnFields` the\n * board has one, its `statusField`, read from the schema as before.\n *\n * @param {object} board The board configuration (manifest `config.board`).\n * @return {Array<{field: string, label: string, source: (object|null), kind: string, readOnly: boolean, moveHandler: string, moveTargetsHandler: string}>} The fields.\n * @spec openspec/changes/screens-board-reference-columns/specs/board-view/spec.md#requirement-a-board-can-switch-the-field-its-columns-come-from\n */\nexport function columnFieldsOf(board) {\n\tconst declared = Array.isArray(board?.columnFields) ? board.columnFields : []\n\treturn declared\n\t\t.map((entry) => (typeof entry === 'string' ? { field: entry } : entry))\n\t\t.filter((entry) => entry && typeof entry.field === 'string' && entry.field !== '')\n\t\t.map((entry) => ({\n\t\t\tfield: entry.field,\n\t\t\tlabel: typeof entry.label === 'string' && entry.label !== '' ? entry.label : entry.field,\n\t\t\tsource: entry.source && typeof entry.source === 'object' ? entry.source : null,\n\t\t\tkind: entry.kind === 'values' ? 'values' : (entry.source ? 'reference' : 'schema'),\n\t\t\treadOnly: entry.readOnly === true,\n\t\t\tmoveHandler: typeof entry.moveHandler === 'string' ? entry.moveHandler : '',\n\t\t\tmoveTargetsHandler: typeof entry.moveTargetsHandler === 'string' ? entry.moveTargetsHandler : '',\n\t\t\tvalueLabels: entry.valueLabels && typeof entry.valueLabels === 'object' ? entry.valueLabels : null,\n\t\t\temptyLabel: typeof entry.emptyLabel === 'string' ? entry.emptyLabel : '',\n\t\t}))\n}\n\n/**\n * The register and schema a reference column reads its rows from: the\n * source's own, else the page's register and the property's `$ref`.\n *\n * @param {object} source The column field's `source`.\n * @param {object} options The context.\n * @param {string} options.register The page's register.\n * @param {object} [options.property] The field's schema property.\n * @return {{register: string, schema: string}} Both, '' when unknown.\n */\nexport function referenceTargetOf(source, { register = '', property = null } = {}) {\n\tconst schema = source?.schema || schemaRefSlug(property?.$ref ?? property?.items?.$ref ?? '')\n\treturn {\n\t\tregister: String(source?.register || register || ''),\n\t\tschema: schema === '' || schema === null || schema === undefined ? '' : String(schema),\n\t}\n}\n\n/**\n * The stages of a referenced field: the referenced rows, narrowed to one\n * parent when asked, ordered, and merged by a field when asked.\n *\n * @param {object} options The call.\n * @param {Array<object>} options.refs The referenced rows.\n * @param {string} [options.labelField] The row field that names a column.\n * @param {string} [options.orderField] The numeric row field the columns are ordered by.\n * @param {string} [options.colorField] The row field that holds the dot colour.\n * @param {string} [options.mergeBy] The row field whose equal values make one column.\n * @param {{field: string, rowField: string}|null} [options.narrowBy] The parent link.\n * @param {string} [options.narrowValue] The parent the board is narrowed to, '' for all.\n * @param {string} [options.capacityField] The numeric row field that holds a column's limit.\n * A column merged from two or more rows shows none: each row has its own limit.\n * @return {{states: Array<{key: string, label: string, color: string, capacity?: (number|null)}>, keyByValue: Map<string, string>, refsByKey: Map<string, Array<object>>}} The stages.\n * @spec openspec/changes/screens-board-reference-columns/specs/board-view/spec.md#requirement-columns-can-be-the-rows-a-field-references\n */\nexport function buildReferenceStages({\n\trefs = [],\n\tlabelField = '',\n\torderField = '',\n\tcolorField = '',\n\tmergeBy = '',\n\tnarrowBy = null,\n\tnarrowValue = '',\n\tcapacityField = '',\n} = {}) {\n\tconst list = (Array.isArray(refs) ? refs : []).filter((ref) => ref && typeof ref === 'object' && refIdOf(ref) !== '')\n\tconst narrowed = narrowBy && narrowBy.field && narrowValue !== ''\n\t\t? list.filter((ref) => refIdOf(readPath(ref, narrowBy.field)) === String(narrowValue))\n\t\t: list\n\n\tconst orderOf = (ref) => {\n\t\tconst n = Number(orderField ? readPath(ref, orderField) : NaN)\n\t\treturn Number.isFinite(n) ? n : Number.MAX_SAFE_INTEGER\n\t}\n\tconst ordered = narrowed\n\t\t.map((ref, index) => ({ ref, index }))\n\t\t.sort((a, b) => (orderOf(a.ref) - orderOf(b.ref)) || (a.index - b.index))\n\t\t.map((entry) => entry.ref)\n\n\tconst states = []\n\tconst keyByValue = new Map()\n\tconst refsByKey = new Map()\n\tfor (const ref of ordered) {\n\t\tconst id = refIdOf(ref)\n\t\tconst label = textOf(labelField ? readPath(ref, labelField) : (ref.name ?? ref.title)) || id\n\t\tconst key = mergeBy ? (textOf(readPath(ref, mergeBy)) || id) : id\n\t\tkeyByValue.set(id, key)\n\t\tif (!refsByKey.has(key)) {\n\t\t\trefsByKey.set(key, [])\n\t\t\tconst color = colorField ? readPath(ref, colorField) : ref.color\n\t\t\tconst state = { key, label, color: typeof color === 'string' ? color : '' }\n\t\t\tif (capacityField) {\n\t\t\t\tstate.capacity = capacityOfRef(ref, capacityField)\n\t\t\t}\n\t\t\tstates.push(state)\n\t\t}\n\t\trefsByKey.get(key).push(ref)\n\t}\n\tfor (const state of states) {\n\t\tif (capacityField && refsByKey.get(state.key).length > 1) {\n\t\t\tstate.capacity = null\n\t\t}\n\t}\n\treturn { states, keyByValue, refsByKey }\n}\n\n/**\n * The limit one referenced row declares.\n *\n * @param {object} ref The referenced row.\n * @param {string} capacityField The row field that holds the limit.\n * @return {number|null} The limit, or null when it has none.\n * @spec openspec/changes/board-column-capacity/specs/board-view/spec.md#requirement-a-column-can-carry-a-capacity\n */\nexport function capacityOfRef(ref, capacityField) {\n\treturn capacityField ? capacityValue(readPath(ref, capacityField)) : null\n}\n\n/**\n * Whether a drop fills a referenced row past its limit: the cards that\n * already carry that row, counted against the row's own limit. Counted per\n * row, not per column, so a column merged from several rows still refuses\n * the one that is full.\n *\n * @param {object} options The call.\n * @param {object} options.target The referenced row the drop would write.\n * @param {object} options.card The card being moved.\n * @param {Array<object>} options.rows The cards the board holds.\n * @param {string} options.field The row field the columns come from.\n * @param {string} options.capacityField The referenced row's limit field.\n * @param {string} [options.rowKey] The row key, so the moving card is not counted.\n * @return {{count: number, capacity: number}|null} The count and limit when full, else null.\n * @spec openspec/changes/board-column-capacity/specs/board-view/spec.md#requirement-a-drop-into-a-full-column-is-refused\n */\nexport function fullTargetOf({ target, card, rows = [], field, capacityField, rowKey = 'id' } = {}) {\n\tconst capacity = capacityOfRef(target, capacityField)\n\tif (capacity === null) {\n\t\treturn null\n\t}\n\tconst id = refIdOf(target)\n\tconst self = String(card?.[rowKey] ?? '')\n\tconst count = (Array.isArray(rows) ? rows : []).filter((row) => String(row?.[rowKey] ?? '') !== self && refIdOf(readPath(row, field)) === id).length\n\treturn count >= capacity ? { count, capacity } : null\n}\n\n/**\n * The stages of a field with no referenced schema (a user id): the values\n * present on the rows, by label, then one column for no value.\n *\n * @param {object} options The call.\n * @param {Array<object>} options.rows The rows the list holds.\n * @param {string} options.field The row field.\n * @param {object} [options.valueLabels] Raw value to the label to show.\n * @param {string} [options.emptyLabel] The no-value column's label.\n * @return {{states: Array<{key: string, label: string, color: string}>, keyByValue: Map<string, string>, refsByKey: Map<string, Array<object>>}} The stages.\n * @spec openspec/changes/screens-board-reference-columns/specs/board-view/spec.md#requirement-a-field-without-a-referenced-schema-takes-its-values\n */\nexport function buildValueStages({ rows = [], field = '', valueLabels = null, emptyLabel = 'Nobody' } = {}) {\n\tconst labels = valueLabels && typeof valueLabels === 'object' ? valueLabels : {}\n\tconst seen = new Map()\n\tfor (const row of Array.isArray(rows) ? rows : []) {\n\t\tconst raw = readPath(row, field)\n\t\tconst id = refIdOf(raw)\n\t\tif (id !== '' && !seen.has(id)) {\n\t\t\tseen.set(id, typeof labels[id] === 'string' ? labels[id] : (textOf(raw) || id))\n\t\t}\n\t}\n\tconst states = [...seen.entries()]\n\t\t.sort((a, b) => a[1].localeCompare(b[1]))\n\t\t.map(([key, label]) => ({ key, label, color: '' }))\n\tstates.push({ key: NO_VALUE_KEY, label: emptyLabel, color: '' })\n\tconst keyByValue = new Map(states.map((state) => [state.key, state.key]))\n\tkeyByValue.set('', NO_VALUE_KEY)\n\treturn { states, keyByValue, refsByKey: new Map() }\n}\n\n/**\n * The column a row sits in, under a value-to-column map.\n *\n * @param {object} row The row.\n * @param {string} field The row field.\n * @param {Map<string, string>} keyByValue The value-to-column map.\n * @return {string} The column key, or the raw value when the map has none\n * (which lands the card in the off-board column).\n */\nexport function columnKeyOfRow(row, field, keyByValue) {\n\tconst id = refIdOf(readPath(row, field))\n\treturn keyByValue.has(id) ? keyByValue.get(id) : id\n}\n\n/**\n * What a drop on a column writes for one card: the referenced row of that\n * column which belongs to the card's parent, or null when the column has none\n * (the card cannot go there).\n *\n * @param {object} options The call.\n * @param {object} options.card The card.\n * @param {string} options.toKey The column it was dropped on.\n * @param {string} options.kind `reference` or `values`.\n * @param {Map<string, Array<object>>} [options.refsByKey] The column's rows.\n * @param {{field: string, rowField: string}|null} [options.narrowBy] The parent link.\n * @return {{value: (string|null), target: (object|null)}|null} The value to write and its row, or null.\n * @spec openspec/changes/screens-board-reference-columns/specs/board-view/spec.md#requirement-a-drop-writes-the-reference\n */\nexport function resolveDropValue({ card, toKey, kind, refsByKey = new Map(), narrowBy = null } = {}) {\n\tif (kind === 'values') {\n\t\treturn { value: toKey === NO_VALUE_KEY ? null : String(toKey), target: null }\n\t}\n\tconst candidates = refsByKey.get(String(toKey)) || []\n\tif (candidates.length === 0) {\n\t\treturn null\n\t}\n\tif (narrowBy && narrowBy.field && narrowBy.rowField) {\n\t\tconst parent = refIdOf(readPath(card, narrowBy.rowField))\n\t\tconst match = candidates.find((ref) => refIdOf(readPath(ref, narrowBy.field)) === parent)\n\t\treturn match ? { value: refIdOf(match), target: match } : null\n\t}\n\treturn { value: refIdOf(candidates[0]), target: candidates[0] }\n}\n\n/**\n * Fetch the rows a reference column is built from, one list request.\n *\n * @param {object} options The call.\n * @param {string} options.register The register slug.\n * @param {string} options.schema The schema slug.\n * @param {object} [options.filter] Equality filters, e.g. `{ isFinal: false }`.\n * @param {number} [options.limit] The page size, 500 by default.\n * @return {Promise<Array<object>>} The rows.\n * @spec openspec/changes/screens-board-reference-columns/specs/board-view/spec.md#requirement-columns-can-be-the-rows-a-field-references\n */\nexport async function fetchReferenceObjects({ register, schema, filter = {}, limit = 500 } = {}) {\n\tif (!register || !schema) {\n\t\treturn []\n\t}\n\tconst params = { _limit: limit }\n\tfor (const [key, value] of Object.entries(filter || {})) {\n\t\tif (value !== undefined && value !== null && typeof value !== 'object') {\n\t\t\tparams[key] = typeof value === 'boolean' ? String(value) : value\n\t\t}\n\t}\n\tconst url = prefixUrl(`/apps/openregister/api/objects/${encodeURIComponent(register)}/${encodeURIComponent(schema)}${buildQueryString(params)}`)\n\tconst response = await fetch(url, { headers: buildHeaders() })\n\tif (!response.ok) {\n\t\tthrow new Error(`list returned ${response.status}`)\n\t}\n\tconst data = await response.json()\n\treturn Array.isArray(data?.results) ? data.results : (Array.isArray(data) ? data : [])\n}\n"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACY,MAAC,YAAY,GAAG,WAAU;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,OAAO,CAAC,KAAK,EAAE;AAC/B,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE;AAC5C,EAAE,OAAO,EAAE;AACX,EAAE;AACF,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAChC,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,KAAK,CAAC,KAAK,IAAI,GAAE;AAC9E,EAAE,OAAO,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,SAAS,GAAG,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC;AAC1D,EAAE;AACF,CAAC,OAAO,MAAM,CAAC,KAAK,CAAC;AACrB,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,MAAM,CAAC,KAAK,EAAE;AACvB,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE;AAC5C,EAAE,OAAO,EAAE;AACX,EAAE;AACF,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAChC,EAAE,OAAO,MAAM,CAAC,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAA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AE;AAC1D,EAAE,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC1E,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,OAAO,KAAK,KAAK,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,MAAK;AACnE,GAAG;AACH,EAAE;AACF,CAAC,MAAM,GAAG,GAAG,SAAS,CAAC,CAAC,+BAA+B,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAC;AACjJ,CAAC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAC;AAC/D,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE;AACnB,EAAE,MAAM,IAAI,KAAK,CAAC,CAAC,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;AACrD,EAAE;AACF,CAAC,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,GAAE;AACnC,CAAC,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;AACvF;;;;"}
|
package/dist/esm/utils/schema.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { schemaRefSlug } from './schemaRefSlug.js';
|
|
2
|
+
import { userLocale } from './userLocale.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Schema utility functions for auto-generating table columns, cell formatting,
|
|
@@ -160,7 +161,7 @@ function formatValue(value, property = {}, options = {}) {
|
|
|
160
161
|
if (Number.isNaN(num)) {
|
|
161
162
|
return String(value)
|
|
162
163
|
}
|
|
163
|
-
return num.toLocaleString()
|
|
164
|
+
return num.toLocaleString(userLocale())
|
|
164
165
|
}
|
|
165
166
|
|
|
166
167
|
// Array
|
|
@@ -214,17 +215,17 @@ function formatValue(value, property = {}, options = {}) {
|
|
|
214
215
|
return str
|
|
215
216
|
}
|
|
216
217
|
if (format === 'date') {
|
|
217
|
-
return date.toLocaleDateString(
|
|
218
|
+
return date.toLocaleDateString(userLocale(), {
|
|
218
219
|
day: '2-digit',
|
|
219
220
|
month: '2-digit',
|
|
220
221
|
year: 'numeric',
|
|
221
222
|
})
|
|
222
223
|
}
|
|
223
|
-
return date.toLocaleDateString(
|
|
224
|
+
return date.toLocaleDateString(userLocale(), {
|
|
224
225
|
day: '2-digit',
|
|
225
226
|
month: '2-digit',
|
|
226
227
|
year: 'numeric',
|
|
227
|
-
}) + ', ' + date.toLocaleTimeString(
|
|
228
|
+
}) + ', ' + date.toLocaleTimeString(userLocale(), {
|
|
228
229
|
hour: '2-digit',
|
|
229
230
|
minute: '2-digit',
|
|
230
231
|
second: '2-digit',
|