@conduction/nextcloud-vue 0.1.0-beta.11 → 0.1.0-beta.12
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/nextcloud-vue.cjs +67614 -0
- package/dist/nextcloud-vue.cjs.js +13518 -13617
- package/dist/nextcloud-vue.cjs.js.map +1 -1
- package/dist/nextcloud-vue.cjs.map +1 -0
- package/dist/nextcloud-vue.css +1796 -1800
- package/dist/nextcloud-vue.esm.js +13518 -13617
- package/dist/nextcloud-vue.esm.js.map +1 -1
- package/package.json +3 -2
- package/src/components/CnActionsBar/CnActionsBar.vue +254 -254
- package/src/components/CnAdvancedFormDialog/CnAdvancedFormDialog.vue +570 -570
- package/src/components/CnAdvancedFormDialog/CnDataTab.vue +217 -217
- package/src/components/CnAdvancedFormDialog/CnMetadataTab.vue +121 -121
- package/src/components/CnAdvancedFormDialog/CnPropertiesTab.vue +422 -422
- package/src/components/CnAdvancedFormDialog/CnPropertyValueCell.vue +247 -247
- package/src/components/CnCard/CnCard.vue +415 -415
- package/src/components/CnCardGrid/CnCardGrid.vue +156 -156
- package/src/components/CnCellRenderer/CnCellRenderer.vue +132 -132
- package/src/components/CnChartWidget/CnChartWidget.vue +346 -346
- package/src/components/CnConfigurationCard/CnConfigurationCard.vue +77 -77
- package/src/components/CnContextMenu/CnContextMenu.vue +142 -142
- package/src/components/CnCopyDialog/CnCopyDialog.vue +266 -266
- package/src/components/CnDashboardGrid/CnDashboardGrid.vue +229 -229
- package/src/components/CnDashboardPage/CnDashboardPage.vue +397 -397
- package/src/components/CnDataTable/CnDataTable.vue +362 -362
- package/src/components/CnDeleteDialog/CnDeleteDialog.vue +177 -177
- package/src/components/CnDetailCard/CnDetailCard.vue +225 -225
- package/src/components/CnDetailGrid/CnDetailGrid.vue +256 -256
- package/src/components/CnDetailPage/CnDetailPage.vue +432 -432
- package/src/components/CnFacetSidebar/CnFacetSidebar.vue +234 -234
- package/src/components/CnFilterBar/CnFilterBar.vue +153 -153
- package/src/components/CnFormDialog/CnFormDialog.vue +1047 -1047
- package/src/components/CnIcon/CnIcon.vue +89 -89
- package/src/components/CnIndexPage/CnIndexPage.vue +981 -980
- package/src/components/CnIndexSidebar/CnIndexSidebar.vue +536 -536
- package/src/components/CnInfoWidget/CnInfoWidget.vue +219 -219
- package/src/components/CnItemCard/CnItemCard.vue +134 -134
- package/src/components/CnJsonViewer/CnJsonViewer.vue +312 -312
- package/src/components/CnKpiGrid/CnKpiGrid.vue +93 -93
- package/src/components/CnMassActionBar/CnMassActionBar.vue +161 -161
- package/src/components/CnMassCopyDialog/CnMassCopyDialog.vue +327 -327
- package/src/components/CnMassDeleteDialog/CnMassDeleteDialog.vue +245 -245
- package/src/components/CnMassExportDialog/CnMassExportDialog.vue +191 -191
- package/src/components/CnMassImportDialog/CnMassImportDialog.vue +494 -494
- package/src/components/CnNoteCard/CnNoteCard.vue +149 -149
- package/src/components/CnNotesCard/CnNotesCard.vue +416 -416
- package/src/components/CnObjectCard/CnObjectCard.vue +294 -294
- package/src/components/CnObjectDataWidget/CnObjectDataWidget.vue +854 -854
- package/src/components/CnObjectMetadataWidget/CnObjectMetadataWidget.vue +289 -289
- package/src/components/CnObjectSidebar/CnAuditTrailTab.vue +369 -369
- package/src/components/CnObjectSidebar/CnFilesTab.vue +287 -287
- package/src/components/CnObjectSidebar/CnNotesTab.vue +250 -250
- package/src/components/CnObjectSidebar/CnObjectSidebar.vue +255 -255
- package/src/components/CnObjectSidebar/CnTagsTab.vue +259 -259
- package/src/components/CnObjectSidebar/CnTasksTab.vue +483 -483
- package/src/components/CnPageHeader/CnPageHeader.vue +61 -61
- package/src/components/CnPagination/CnPagination.vue +253 -253
- package/src/components/CnProgressBar/CnProgressBar.vue +262 -262
- package/src/components/CnRegisterMapping/CnRegisterMapping.vue +793 -793
- package/src/components/CnRowActions/CnRowActions.vue +95 -95
- package/src/components/CnSchemaFormDialog/CnSchemaConfigurationTab.vue +226 -226
- package/src/components/CnSchemaFormDialog/CnSchemaFormDialog.vue +788 -788
- package/src/components/CnSchemaFormDialog/CnSchemaPropertiesTab.vue +305 -305
- package/src/components/CnSchemaFormDialog/CnSchemaPropertyActions.vue +1398 -1398
- package/src/components/CnSchemaFormDialog/CnSchemaSecurityTab.vue +236 -236
- package/src/components/CnSettingsCard/CnSettingsCard.vue +92 -92
- package/src/components/CnSettingsSection/CnSettingsSection.vue +267 -267
- package/src/components/CnStatsBlock/CnStatsBlock.vue +437 -437
- package/src/components/CnStatsPanel/CnStatsPanel.vue +321 -321
- package/src/components/CnStatusBadge/CnStatusBadge.vue +90 -90
- package/src/components/CnTabbedFormDialog/CnTabbedFormDialog.vue +545 -545
- package/src/components/CnTableWidget/CnTableWidget.vue +333 -333
- package/src/components/CnTasksCard/CnTasksCard.vue +374 -374
- package/src/components/CnTileWidget/CnTileWidget.vue +159 -159
- package/src/components/CnTimelineStages/CnTimelineStages.vue +294 -294
- package/src/components/CnUserActionMenu/CnUserActionMenu.vue +436 -436
- package/src/components/CnVersionInfoCard/CnVersionInfoCard.vue +313 -313
- package/src/components/CnWidgetRenderer/CnWidgetRenderer.vue +180 -180
- package/src/components/CnWidgetWrapper/CnWidgetWrapper.vue +248 -248
|
@@ -1,255 +1,255 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
CnObjectSidebar — Right sidebar with standardized tabs for generic object functionality.
|
|
3
|
-
|
|
4
|
-
Provides Files, Notes, Tags, Tasks, and Audit Trail tabs that integrate with
|
|
5
|
-
OpenRegister API endpoints (which bridge to Nextcloud-native APIs).
|
|
6
|
-
All tabs are optional and overridable via props and slots.
|
|
7
|
-
-->
|
|
8
|
-
<template>
|
|
9
|
-
<NcAppSidebar
|
|
10
|
-
:name="sidebarTitle"
|
|
11
|
-
:title="sidebarTitle"
|
|
12
|
-
:subtitle="sidebarSubtitle"
|
|
13
|
-
:active.sync="activeTab"
|
|
14
|
-
@update:open="$emit('update:open', $event)"
|
|
15
|
-
@close="$emit('update:open', false)">
|
|
16
|
-
<!-- Files Tab -->
|
|
17
|
-
<NcAppSidebarTab
|
|
18
|
-
v-if="!isTabHidden('files')"
|
|
19
|
-
id="files"
|
|
20
|
-
:name="filesLabel"
|
|
21
|
-
:order="1">
|
|
22
|
-
<template #icon>
|
|
23
|
-
<Paperclip :size="20" />
|
|
24
|
-
</template>
|
|
25
|
-
<slot name="tab-files" :object-id="objectId" :object-type="objectType">
|
|
26
|
-
<CnFilesTab
|
|
27
|
-
:object-id="objectId"
|
|
28
|
-
:register="register"
|
|
29
|
-
:schema="schema"
|
|
30
|
-
:api-base="apiBase" />
|
|
31
|
-
</slot>
|
|
32
|
-
</NcAppSidebarTab>
|
|
33
|
-
|
|
34
|
-
<!-- Notes Tab -->
|
|
35
|
-
<NcAppSidebarTab
|
|
36
|
-
v-if="!isTabHidden('notes')"
|
|
37
|
-
id="notes"
|
|
38
|
-
:name="notesLabel"
|
|
39
|
-
:order="2">
|
|
40
|
-
<template #icon>
|
|
41
|
-
<CommentTextOutline :size="20" />
|
|
42
|
-
</template>
|
|
43
|
-
<slot name="tab-notes" :object-id="objectId" :object-type="objectType">
|
|
44
|
-
<CnNotesTab
|
|
45
|
-
:object-id="objectId"
|
|
46
|
-
:register="register"
|
|
47
|
-
:schema="schema"
|
|
48
|
-
:api-base="apiBase" />
|
|
49
|
-
</slot>
|
|
50
|
-
</NcAppSidebarTab>
|
|
51
|
-
|
|
52
|
-
<!-- Tags Tab -->
|
|
53
|
-
<NcAppSidebarTab
|
|
54
|
-
v-if="!isTabHidden('tags')"
|
|
55
|
-
id="tags"
|
|
56
|
-
:name="tagsLabel"
|
|
57
|
-
:order="3">
|
|
58
|
-
<template #icon>
|
|
59
|
-
<TagOutline :size="20" />
|
|
60
|
-
</template>
|
|
61
|
-
<slot name="tab-tags" :object-id="objectId" :object-type="objectType">
|
|
62
|
-
<CnTagsTab
|
|
63
|
-
:object-id="objectId"
|
|
64
|
-
:register="register"
|
|
65
|
-
:schema="schema"
|
|
66
|
-
:api-base="apiBase" />
|
|
67
|
-
</slot>
|
|
68
|
-
</NcAppSidebarTab>
|
|
69
|
-
|
|
70
|
-
<!-- Tasks Tab -->
|
|
71
|
-
<NcAppSidebarTab
|
|
72
|
-
v-if="!isTabHidden('tasks')"
|
|
73
|
-
id="tasks"
|
|
74
|
-
:name="tasksLabel"
|
|
75
|
-
:order="4">
|
|
76
|
-
<template #icon>
|
|
77
|
-
<CheckboxMarkedOutline :size="20" />
|
|
78
|
-
</template>
|
|
79
|
-
<slot name="tab-tasks" :object-id="objectId" :object-type="objectType">
|
|
80
|
-
<CnTasksTab
|
|
81
|
-
:object-id="objectId"
|
|
82
|
-
:register="register"
|
|
83
|
-
:schema="schema"
|
|
84
|
-
:api-base="apiBase" />
|
|
85
|
-
</slot>
|
|
86
|
-
</NcAppSidebarTab>
|
|
87
|
-
|
|
88
|
-
<!-- Audit Trail Tab -->
|
|
89
|
-
<NcAppSidebarTab
|
|
90
|
-
v-if="!isTabHidden('auditTrail')"
|
|
91
|
-
id="auditTrail"
|
|
92
|
-
:name="auditTrailLabel"
|
|
93
|
-
:order="5">
|
|
94
|
-
<template #icon>
|
|
95
|
-
<History :size="20" />
|
|
96
|
-
</template>
|
|
97
|
-
<slot name="tab-audit-trail" :object-id="objectId" :object-type="objectType">
|
|
98
|
-
<CnAuditTrailTab
|
|
99
|
-
:object-id="objectId"
|
|
100
|
-
:register="register"
|
|
101
|
-
:schema="schema"
|
|
102
|
-
:api-base="apiBase" />
|
|
103
|
-
</slot>
|
|
104
|
-
</NcAppSidebarTab>
|
|
105
|
-
|
|
106
|
-
<!-- Custom tabs slot -->
|
|
107
|
-
<slot name="extra-tabs" />
|
|
108
|
-
</NcAppSidebar>
|
|
109
|
-
</template>
|
|
110
|
-
|
|
111
|
-
<script>
|
|
112
|
-
import { translate as t } from '@nextcloud/l10n'
|
|
113
|
-
import { NcAppSidebar, NcAppSidebarTab } from '@nextcloud/vue'
|
|
114
|
-
|
|
115
|
-
import Paperclip from 'vue-material-design-icons/Paperclip.vue'
|
|
116
|
-
import CommentTextOutline from 'vue-material-design-icons/CommentTextOutline.vue'
|
|
117
|
-
import TagOutline from 'vue-material-design-icons/TagOutline.vue'
|
|
118
|
-
import CheckboxMarkedOutline from 'vue-material-design-icons/CheckboxMarkedOutline.vue'
|
|
119
|
-
import History from 'vue-material-design-icons/History.vue'
|
|
120
|
-
|
|
121
|
-
import CnFilesTab from './CnFilesTab.vue'
|
|
122
|
-
import CnNotesTab from './CnNotesTab.vue'
|
|
123
|
-
import CnTagsTab from './CnTagsTab.vue'
|
|
124
|
-
import CnTasksTab from './CnTasksTab.vue'
|
|
125
|
-
import CnAuditTrailTab from './CnAuditTrailTab.vue'
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* CnObjectSidebar — Right sidebar for entity detail pages.
|
|
129
|
-
*
|
|
130
|
-
* Provides standardized tabs for generic object functionality (Files, Notes, Tags,
|
|
131
|
-
* Tasks, Audit Trail) that integrate with OpenRegister API endpoints bridging to
|
|
132
|
-
* Nextcloud-native APIs. Each tab is a self-contained component.
|
|
133
|
-
*
|
|
134
|
-
* @example Basic usage
|
|
135
|
-
* <CnObjectSidebar
|
|
136
|
-
* object-type="pipelinq_lead"
|
|
137
|
-
* :object-id="leadId"
|
|
138
|
-
* :register="registerConfig.register"
|
|
139
|
-
* :schema="registerConfig.schema" />
|
|
140
|
-
*
|
|
141
|
-
* @example Hide specific tabs
|
|
142
|
-
* <CnObjectSidebar
|
|
143
|
-
* object-type="pipelinq_lead"
|
|
144
|
-
* :object-id="leadId"
|
|
145
|
-
* :hidden-tabs="['tasks', 'tags']" />
|
|
146
|
-
*
|
|
147
|
-
* @example Override a tab
|
|
148
|
-
* <CnObjectSidebar object-type="pipelinq_lead" :object-id="leadId">
|
|
149
|
-
* <template #tab-notes="{ objectId }">
|
|
150
|
-
* <MyCustomNotesComponent :id="objectId" />
|
|
151
|
-
* </template>
|
|
152
|
-
* </CnObjectSidebar>
|
|
153
|
-
*/
|
|
154
|
-
export default {
|
|
155
|
-
name: 'CnObjectSidebar',
|
|
156
|
-
|
|
157
|
-
components: {
|
|
158
|
-
NcAppSidebar,
|
|
159
|
-
NcAppSidebarTab,
|
|
160
|
-
Paperclip,
|
|
161
|
-
CommentTextOutline,
|
|
162
|
-
TagOutline,
|
|
163
|
-
CheckboxMarkedOutline,
|
|
164
|
-
History,
|
|
165
|
-
CnFilesTab,
|
|
166
|
-
CnNotesTab,
|
|
167
|
-
CnTagsTab,
|
|
168
|
-
CnTasksTab,
|
|
169
|
-
CnAuditTrailTab,
|
|
170
|
-
},
|
|
171
|
-
|
|
172
|
-
props: {
|
|
173
|
-
/** The entity type (e.g., "pipelinq_lead", "procest_case") */
|
|
174
|
-
objectType: {
|
|
175
|
-
type: String,
|
|
176
|
-
required: true,
|
|
177
|
-
},
|
|
178
|
-
/** The object UUID */
|
|
179
|
-
objectId: {
|
|
180
|
-
type: String,
|
|
181
|
-
required: true,
|
|
182
|
-
},
|
|
183
|
-
/** OpenRegister register ID */
|
|
184
|
-
register: {
|
|
185
|
-
type: String,
|
|
186
|
-
default: '',
|
|
187
|
-
},
|
|
188
|
-
/** OpenRegister schema ID */
|
|
189
|
-
schema: {
|
|
190
|
-
type: String,
|
|
191
|
-
default: '',
|
|
192
|
-
},
|
|
193
|
-
/** Array of tab IDs to hide: 'files', 'notes', 'tags', 'tasks', 'auditTrail' */
|
|
194
|
-
hiddenTabs: {
|
|
195
|
-
type: Array,
|
|
196
|
-
default: () => [],
|
|
197
|
-
},
|
|
198
|
-
/** Whether the sidebar is open */
|
|
199
|
-
open: {
|
|
200
|
-
type: Boolean,
|
|
201
|
-
default: true,
|
|
202
|
-
},
|
|
203
|
-
/** Sidebar title (defaults to objectType) */
|
|
204
|
-
title: {
|
|
205
|
-
type: String,
|
|
206
|
-
default: '',
|
|
207
|
-
},
|
|
208
|
-
/** Sidebar subtitle */
|
|
209
|
-
subtitle: {
|
|
210
|
-
type: String,
|
|
211
|
-
default: '',
|
|
212
|
-
},
|
|
213
|
-
/** @deprecated Use subtitle instead */
|
|
214
|
-
subtitleProp: {
|
|
215
|
-
type: String,
|
|
216
|
-
default: '',
|
|
217
|
-
},
|
|
218
|
-
/** Base API URL for OpenRegister */
|
|
219
|
-
apiBase: {
|
|
220
|
-
type: String,
|
|
221
|
-
default: '/apps/openregister/api',
|
|
222
|
-
},
|
|
223
|
-
|
|
224
|
-
// --- Pre-translated labels ---
|
|
225
|
-
filesLabel: { type: String, default: () => t('nextcloud-vue', 'Files') },
|
|
226
|
-
notesLabel: { type: String, default: () => t('nextcloud-vue', 'Notes') },
|
|
227
|
-
tagsLabel: { type: String, default: () => t('nextcloud-vue', 'Tags') },
|
|
228
|
-
tasksLabel: { type: String, default: () => t('nextcloud-vue', 'Tasks') },
|
|
229
|
-
auditTrailLabel: { type: String, default: () => t('nextcloud-vue', 'Audit trail') },
|
|
230
|
-
},
|
|
231
|
-
|
|
232
|
-
emits: ['update:open'],
|
|
233
|
-
|
|
234
|
-
data() {
|
|
235
|
-
return {
|
|
236
|
-
activeTab: 'files',
|
|
237
|
-
}
|
|
238
|
-
},
|
|
239
|
-
|
|
240
|
-
computed: {
|
|
241
|
-
sidebarTitle() {
|
|
242
|
-
return this.title || this.objectType || 'Details'
|
|
243
|
-
},
|
|
244
|
-
sidebarSubtitle() {
|
|
245
|
-
return this.subtitle || this.subtitleProp || ''
|
|
246
|
-
},
|
|
247
|
-
},
|
|
248
|
-
|
|
249
|
-
methods: {
|
|
250
|
-
isTabHidden(tabId) {
|
|
251
|
-
return this.hiddenTabs.includes(tabId)
|
|
252
|
-
},
|
|
253
|
-
},
|
|
254
|
-
}
|
|
255
|
-
</script>
|
|
1
|
+
<!--
|
|
2
|
+
CnObjectSidebar — Right sidebar with standardized tabs for generic object functionality.
|
|
3
|
+
|
|
4
|
+
Provides Files, Notes, Tags, Tasks, and Audit Trail tabs that integrate with
|
|
5
|
+
OpenRegister API endpoints (which bridge to Nextcloud-native APIs).
|
|
6
|
+
All tabs are optional and overridable via props and slots.
|
|
7
|
+
-->
|
|
8
|
+
<template>
|
|
9
|
+
<NcAppSidebar
|
|
10
|
+
:name="sidebarTitle"
|
|
11
|
+
:title="sidebarTitle"
|
|
12
|
+
:subtitle="sidebarSubtitle"
|
|
13
|
+
:active.sync="activeTab"
|
|
14
|
+
@update:open="$emit('update:open', $event)"
|
|
15
|
+
@close="$emit('update:open', false)">
|
|
16
|
+
<!-- Files Tab -->
|
|
17
|
+
<NcAppSidebarTab
|
|
18
|
+
v-if="!isTabHidden('files')"
|
|
19
|
+
id="files"
|
|
20
|
+
:name="filesLabel"
|
|
21
|
+
:order="1">
|
|
22
|
+
<template #icon>
|
|
23
|
+
<Paperclip :size="20" />
|
|
24
|
+
</template>
|
|
25
|
+
<slot name="tab-files" :object-id="objectId" :object-type="objectType">
|
|
26
|
+
<CnFilesTab
|
|
27
|
+
:object-id="objectId"
|
|
28
|
+
:register="register"
|
|
29
|
+
:schema="schema"
|
|
30
|
+
:api-base="apiBase" />
|
|
31
|
+
</slot>
|
|
32
|
+
</NcAppSidebarTab>
|
|
33
|
+
|
|
34
|
+
<!-- Notes Tab -->
|
|
35
|
+
<NcAppSidebarTab
|
|
36
|
+
v-if="!isTabHidden('notes')"
|
|
37
|
+
id="notes"
|
|
38
|
+
:name="notesLabel"
|
|
39
|
+
:order="2">
|
|
40
|
+
<template #icon>
|
|
41
|
+
<CommentTextOutline :size="20" />
|
|
42
|
+
</template>
|
|
43
|
+
<slot name="tab-notes" :object-id="objectId" :object-type="objectType">
|
|
44
|
+
<CnNotesTab
|
|
45
|
+
:object-id="objectId"
|
|
46
|
+
:register="register"
|
|
47
|
+
:schema="schema"
|
|
48
|
+
:api-base="apiBase" />
|
|
49
|
+
</slot>
|
|
50
|
+
</NcAppSidebarTab>
|
|
51
|
+
|
|
52
|
+
<!-- Tags Tab -->
|
|
53
|
+
<NcAppSidebarTab
|
|
54
|
+
v-if="!isTabHidden('tags')"
|
|
55
|
+
id="tags"
|
|
56
|
+
:name="tagsLabel"
|
|
57
|
+
:order="3">
|
|
58
|
+
<template #icon>
|
|
59
|
+
<TagOutline :size="20" />
|
|
60
|
+
</template>
|
|
61
|
+
<slot name="tab-tags" :object-id="objectId" :object-type="objectType">
|
|
62
|
+
<CnTagsTab
|
|
63
|
+
:object-id="objectId"
|
|
64
|
+
:register="register"
|
|
65
|
+
:schema="schema"
|
|
66
|
+
:api-base="apiBase" />
|
|
67
|
+
</slot>
|
|
68
|
+
</NcAppSidebarTab>
|
|
69
|
+
|
|
70
|
+
<!-- Tasks Tab -->
|
|
71
|
+
<NcAppSidebarTab
|
|
72
|
+
v-if="!isTabHidden('tasks')"
|
|
73
|
+
id="tasks"
|
|
74
|
+
:name="tasksLabel"
|
|
75
|
+
:order="4">
|
|
76
|
+
<template #icon>
|
|
77
|
+
<CheckboxMarkedOutline :size="20" />
|
|
78
|
+
</template>
|
|
79
|
+
<slot name="tab-tasks" :object-id="objectId" :object-type="objectType">
|
|
80
|
+
<CnTasksTab
|
|
81
|
+
:object-id="objectId"
|
|
82
|
+
:register="register"
|
|
83
|
+
:schema="schema"
|
|
84
|
+
:api-base="apiBase" />
|
|
85
|
+
</slot>
|
|
86
|
+
</NcAppSidebarTab>
|
|
87
|
+
|
|
88
|
+
<!-- Audit Trail Tab -->
|
|
89
|
+
<NcAppSidebarTab
|
|
90
|
+
v-if="!isTabHidden('auditTrail')"
|
|
91
|
+
id="auditTrail"
|
|
92
|
+
:name="auditTrailLabel"
|
|
93
|
+
:order="5">
|
|
94
|
+
<template #icon>
|
|
95
|
+
<History :size="20" />
|
|
96
|
+
</template>
|
|
97
|
+
<slot name="tab-audit-trail" :object-id="objectId" :object-type="objectType">
|
|
98
|
+
<CnAuditTrailTab
|
|
99
|
+
:object-id="objectId"
|
|
100
|
+
:register="register"
|
|
101
|
+
:schema="schema"
|
|
102
|
+
:api-base="apiBase" />
|
|
103
|
+
</slot>
|
|
104
|
+
</NcAppSidebarTab>
|
|
105
|
+
|
|
106
|
+
<!-- Custom tabs slot -->
|
|
107
|
+
<slot name="extra-tabs" />
|
|
108
|
+
</NcAppSidebar>
|
|
109
|
+
</template>
|
|
110
|
+
|
|
111
|
+
<script>
|
|
112
|
+
import { translate as t } from '@nextcloud/l10n'
|
|
113
|
+
import { NcAppSidebar, NcAppSidebarTab } from '@nextcloud/vue'
|
|
114
|
+
|
|
115
|
+
import Paperclip from 'vue-material-design-icons/Paperclip.vue'
|
|
116
|
+
import CommentTextOutline from 'vue-material-design-icons/CommentTextOutline.vue'
|
|
117
|
+
import TagOutline from 'vue-material-design-icons/TagOutline.vue'
|
|
118
|
+
import CheckboxMarkedOutline from 'vue-material-design-icons/CheckboxMarkedOutline.vue'
|
|
119
|
+
import History from 'vue-material-design-icons/History.vue'
|
|
120
|
+
|
|
121
|
+
import CnFilesTab from './CnFilesTab.vue'
|
|
122
|
+
import CnNotesTab from './CnNotesTab.vue'
|
|
123
|
+
import CnTagsTab from './CnTagsTab.vue'
|
|
124
|
+
import CnTasksTab from './CnTasksTab.vue'
|
|
125
|
+
import CnAuditTrailTab from './CnAuditTrailTab.vue'
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* CnObjectSidebar — Right sidebar for entity detail pages.
|
|
129
|
+
*
|
|
130
|
+
* Provides standardized tabs for generic object functionality (Files, Notes, Tags,
|
|
131
|
+
* Tasks, Audit Trail) that integrate with OpenRegister API endpoints bridging to
|
|
132
|
+
* Nextcloud-native APIs. Each tab is a self-contained component.
|
|
133
|
+
*
|
|
134
|
+
* @example Basic usage
|
|
135
|
+
* <CnObjectSidebar
|
|
136
|
+
* object-type="pipelinq_lead"
|
|
137
|
+
* :object-id="leadId"
|
|
138
|
+
* :register="registerConfig.register"
|
|
139
|
+
* :schema="registerConfig.schema" />
|
|
140
|
+
*
|
|
141
|
+
* @example Hide specific tabs
|
|
142
|
+
* <CnObjectSidebar
|
|
143
|
+
* object-type="pipelinq_lead"
|
|
144
|
+
* :object-id="leadId"
|
|
145
|
+
* :hidden-tabs="['tasks', 'tags']" />
|
|
146
|
+
*
|
|
147
|
+
* @example Override a tab
|
|
148
|
+
* <CnObjectSidebar object-type="pipelinq_lead" :object-id="leadId">
|
|
149
|
+
* <template #tab-notes="{ objectId }">
|
|
150
|
+
* <MyCustomNotesComponent :id="objectId" />
|
|
151
|
+
* </template>
|
|
152
|
+
* </CnObjectSidebar>
|
|
153
|
+
*/
|
|
154
|
+
export default {
|
|
155
|
+
name: 'CnObjectSidebar',
|
|
156
|
+
|
|
157
|
+
components: {
|
|
158
|
+
NcAppSidebar,
|
|
159
|
+
NcAppSidebarTab,
|
|
160
|
+
Paperclip,
|
|
161
|
+
CommentTextOutline,
|
|
162
|
+
TagOutline,
|
|
163
|
+
CheckboxMarkedOutline,
|
|
164
|
+
History,
|
|
165
|
+
CnFilesTab,
|
|
166
|
+
CnNotesTab,
|
|
167
|
+
CnTagsTab,
|
|
168
|
+
CnTasksTab,
|
|
169
|
+
CnAuditTrailTab,
|
|
170
|
+
},
|
|
171
|
+
|
|
172
|
+
props: {
|
|
173
|
+
/** The entity type (e.g., "pipelinq_lead", "procest_case") */
|
|
174
|
+
objectType: {
|
|
175
|
+
type: String,
|
|
176
|
+
required: true,
|
|
177
|
+
},
|
|
178
|
+
/** The object UUID */
|
|
179
|
+
objectId: {
|
|
180
|
+
type: String,
|
|
181
|
+
required: true,
|
|
182
|
+
},
|
|
183
|
+
/** OpenRegister register ID */
|
|
184
|
+
register: {
|
|
185
|
+
type: String,
|
|
186
|
+
default: '',
|
|
187
|
+
},
|
|
188
|
+
/** OpenRegister schema ID */
|
|
189
|
+
schema: {
|
|
190
|
+
type: String,
|
|
191
|
+
default: '',
|
|
192
|
+
},
|
|
193
|
+
/** Array of tab IDs to hide: 'files', 'notes', 'tags', 'tasks', 'auditTrail' */
|
|
194
|
+
hiddenTabs: {
|
|
195
|
+
type: Array,
|
|
196
|
+
default: () => [],
|
|
197
|
+
},
|
|
198
|
+
/** Whether the sidebar is open */
|
|
199
|
+
open: {
|
|
200
|
+
type: Boolean,
|
|
201
|
+
default: true,
|
|
202
|
+
},
|
|
203
|
+
/** Sidebar title (defaults to objectType) */
|
|
204
|
+
title: {
|
|
205
|
+
type: String,
|
|
206
|
+
default: '',
|
|
207
|
+
},
|
|
208
|
+
/** Sidebar subtitle */
|
|
209
|
+
subtitle: {
|
|
210
|
+
type: String,
|
|
211
|
+
default: '',
|
|
212
|
+
},
|
|
213
|
+
/** @deprecated Use subtitle instead */
|
|
214
|
+
subtitleProp: {
|
|
215
|
+
type: String,
|
|
216
|
+
default: '',
|
|
217
|
+
},
|
|
218
|
+
/** Base API URL for OpenRegister */
|
|
219
|
+
apiBase: {
|
|
220
|
+
type: String,
|
|
221
|
+
default: '/apps/openregister/api',
|
|
222
|
+
},
|
|
223
|
+
|
|
224
|
+
// --- Pre-translated labels ---
|
|
225
|
+
filesLabel: { type: String, default: () => t('nextcloud-vue', 'Files') },
|
|
226
|
+
notesLabel: { type: String, default: () => t('nextcloud-vue', 'Notes') },
|
|
227
|
+
tagsLabel: { type: String, default: () => t('nextcloud-vue', 'Tags') },
|
|
228
|
+
tasksLabel: { type: String, default: () => t('nextcloud-vue', 'Tasks') },
|
|
229
|
+
auditTrailLabel: { type: String, default: () => t('nextcloud-vue', 'Audit trail') },
|
|
230
|
+
},
|
|
231
|
+
|
|
232
|
+
emits: ['update:open'],
|
|
233
|
+
|
|
234
|
+
data() {
|
|
235
|
+
return {
|
|
236
|
+
activeTab: 'files',
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
|
|
240
|
+
computed: {
|
|
241
|
+
sidebarTitle() {
|
|
242
|
+
return this.title || this.objectType || 'Details'
|
|
243
|
+
},
|
|
244
|
+
sidebarSubtitle() {
|
|
245
|
+
return this.subtitle || this.subtitleProp || ''
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
|
|
249
|
+
methods: {
|
|
250
|
+
isTabHidden(tabId) {
|
|
251
|
+
return this.hiddenTabs.includes(tabId)
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
}
|
|
255
|
+
</script>
|