@conduction/nextcloud-vue 0.1.0-beta.4 → 0.1.0-beta.5

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 (68) hide show
  1. package/dist/nextcloud-vue.cjs +67614 -0
  2. package/dist/nextcloud-vue.cjs.js +9554 -8980
  3. package/dist/nextcloud-vue.cjs.js.map +1 -1
  4. package/dist/nextcloud-vue.cjs.map +1 -0
  5. package/dist/nextcloud-vue.css +1231 -1231
  6. package/dist/nextcloud-vue.esm.js +9554 -8980
  7. package/dist/nextcloud-vue.esm.js.map +1 -1
  8. package/package.json +11 -4
  9. package/src/components/CnActionsBar/CnActionsBar.vue +235 -235
  10. package/src/components/CnAdvancedFormDialog/CnAdvancedFormDialog.vue +579 -579
  11. package/src/components/CnAdvancedFormDialog/CnDataTab.vue +217 -217
  12. package/src/components/CnAdvancedFormDialog/CnMetadataTab.vue +121 -121
  13. package/src/components/CnAdvancedFormDialog/CnPropertiesTab.vue +418 -418
  14. package/src/components/CnAdvancedFormDialog/CnPropertyValueCell.vue +247 -247
  15. package/src/components/CnCardGrid/CnCardGrid.vue +152 -152
  16. package/src/components/CnCellRenderer/CnCellRenderer.vue +132 -132
  17. package/src/components/CnChartWidget/CnChartWidget.vue +320 -320
  18. package/src/components/CnConfigurationCard/CnConfigurationCard.vue +77 -77
  19. package/src/components/CnCopyDialog/CnCopyDialog.vue +250 -250
  20. package/src/components/CnDashboardGrid/CnDashboardGrid.vue +225 -225
  21. package/src/components/CnDashboardPage/CnDashboardPage.vue +390 -390
  22. package/src/components/CnDataTable/CnDataTable.vue +349 -349
  23. package/src/components/CnDeleteDialog/CnDeleteDialog.vue +170 -170
  24. package/src/components/CnDetailCard/CnDetailCard.vue +214 -214
  25. package/src/components/CnDetailPage/CnDetailPage.vue +285 -281
  26. package/src/components/CnFacetSidebar/CnFacetSidebar.vue +231 -231
  27. package/src/components/CnFilterBar/CnFilterBar.vue +152 -152
  28. package/src/components/CnFormDialog/CnFormDialog.vue +302 -11
  29. package/src/components/CnIcon/CnIcon.vue +89 -89
  30. package/src/components/CnIndexPage/CnIndexPage.vue +884 -874
  31. package/src/components/CnIndexSidebar/CnIndexSidebar.vue +503 -503
  32. package/src/components/CnItemCard/CnItemCard.vue +132 -132
  33. package/src/components/CnKpiGrid/CnKpiGrid.vue +89 -89
  34. package/src/components/CnMassActionBar/CnMassActionBar.vue +160 -160
  35. package/src/components/CnMassCopyDialog/CnMassCopyDialog.vue +320 -320
  36. package/src/components/CnMassDeleteDialog/CnMassDeleteDialog.vue +238 -238
  37. package/src/components/CnMassExportDialog/CnMassExportDialog.vue +190 -190
  38. package/src/components/CnMassImportDialog/CnMassImportDialog.vue +491 -491
  39. package/src/components/CnNoteCard/CnNoteCard.vue +149 -149
  40. package/src/components/CnNotesCard/CnNotesCard.vue +413 -413
  41. package/src/components/CnObjectCard/CnObjectCard.vue +292 -292
  42. package/src/components/CnObjectSidebar/CnObjectSidebar.vue +876 -876
  43. package/src/components/CnPageHeader/CnPageHeader.vue +57 -57
  44. package/src/components/CnPagination/CnPagination.vue +252 -252
  45. package/src/components/CnRegisterMapping/CnRegisterMapping.vue +792 -792
  46. package/src/components/CnRowActions/CnRowActions.vue +95 -73
  47. package/src/components/CnSchemaFormDialog/CnSchemaConfigurationTab.vue +226 -226
  48. package/src/components/CnSchemaFormDialog/CnSchemaFormDialog.vue +787 -787
  49. package/src/components/CnSchemaFormDialog/CnSchemaPropertiesTab.vue +305 -305
  50. package/src/components/CnSchemaFormDialog/CnSchemaPropertyActions.vue +1398 -1398
  51. package/src/components/CnSchemaFormDialog/CnSchemaSecurityTab.vue +236 -236
  52. package/src/components/CnSettingsCard/CnSettingsCard.vue +92 -92
  53. package/src/components/CnSettingsSection/CnSettingsSection.vue +266 -266
  54. package/src/components/CnStatsBlock/CnStatsBlock.vue +420 -420
  55. package/src/components/CnStatusBadge/CnStatusBadge.vue +77 -77
  56. package/src/components/CnTabbedFormDialog/CnTabbedFormDialog.vue +540 -540
  57. package/src/components/CnTasksCard/CnTasksCard.vue +373 -373
  58. package/src/components/CnTileWidget/CnTileWidget.vue +159 -159
  59. package/src/components/CnTimelineStages/CnTimelineStages.vue +292 -292
  60. package/src/components/CnUserActionMenu/CnUserActionMenu.vue +435 -435
  61. package/src/components/CnVersionInfoCard/CnVersionInfoCard.vue +312 -312
  62. package/src/components/CnWidgetRenderer/CnWidgetRenderer.vue +180 -180
  63. package/src/components/CnWidgetWrapper/CnWidgetWrapper.vue +211 -211
  64. package/src/index.js +1 -1
  65. package/src/types/notification.d.ts +13 -13
  66. package/src/types/organisation.d.ts +15 -15
  67. package/src/types/schema.d.ts +13 -13
  68. package/src/types/task.d.ts +6 -6
@@ -1,180 +1,180 @@
1
- <!--
2
- CnWidgetRenderer — Renders Nextcloud Dashboard API widgets (v1/v2).
3
-
4
- Loads widget items from the Nextcloud widget API and displays them
5
- using NcDashboardWidget. Supports auto-refresh for widgets that
6
- define a reload interval.
7
- -->
8
- <template>
9
- <div class="cn-widget-renderer">
10
- <!-- API Widget V1 or V2 -->
11
- <NcDashboardWidget
12
- v-if="isApiWidget"
13
- :items="widgetItems"
14
- :show-more-url="widget.widgetUrl"
15
- :loading="loading"
16
- :item-menu="false"
17
- :round-icons="widget.itemIconsRound">
18
- <template #empty-content>
19
- <NcEmptyContent
20
- v-if="emptyMessage"
21
- :description="emptyMessage">
22
- <template #icon>
23
- <span v-if="widget.iconClass" :class="widget.iconClass" />
24
- </template>
25
- </NcEmptyContent>
26
- </template>
27
- </NcDashboardWidget>
28
-
29
- <!-- Loading state -->
30
- <div v-else-if="loading" class="cn-widget-renderer__loading">
31
- <NcLoadingIcon :size="32" />
32
- </div>
33
-
34
- <!-- Fallback for unknown widget types -->
35
- <NcEmptyContent
36
- v-else
37
- :description="unavailableText">
38
- <template #icon>
39
- <AlertCircleOutline :size="48" />
40
- </template>
41
- </NcEmptyContent>
42
- </div>
43
- </template>
44
-
45
- <script>
46
- import { NcDashboardWidget, NcEmptyContent, NcLoadingIcon } from '@nextcloud/vue'
47
- import AlertCircleOutline from 'vue-material-design-icons/AlertCircleOutline.vue'
48
- import axios from '@nextcloud/axios'
49
- import { generateOcsUrl } from '@nextcloud/router'
50
-
51
- /**
52
- * CnWidgetRenderer — Renders Nextcloud Dashboard API widgets.
53
- *
54
- * Fetches widget items from the OCS Dashboard API and displays them
55
- * using the standard NcDashboardWidget component.
56
- *
57
- * @example
58
- * <CnWidgetRenderer :widget="ncWidget" />
59
- */
60
- export default {
61
- name: 'CnWidgetRenderer',
62
-
63
- components: {
64
- NcDashboardWidget,
65
- NcEmptyContent,
66
- NcLoadingIcon,
67
- AlertCircleOutline,
68
- },
69
-
70
- props: {
71
- /**
72
- * Nextcloud widget object from the Dashboard API.
73
- * @type {{ id: string, title: string, iconClass?: string, iconUrl?: string, widgetUrl?: string, itemIconsRound?: boolean, itemApiVersions?: number[], reloadInterval?: number, buttons?: Array }}
74
- */
75
- widget: {
76
- type: Object,
77
- required: true,
78
- },
79
- /** Text shown when widget is not available */
80
- unavailableText: {
81
- type: String,
82
- default: 'Widget not available',
83
- },
84
- },
85
-
86
- data() {
87
- return {
88
- loading: false,
89
- items: [],
90
- emptyMessage: '',
91
- refreshInterval: null,
92
- }
93
- },
94
-
95
- computed: {
96
- isApiWidgetV2() {
97
- return this.widget?.itemApiVersions?.includes(2)
98
- },
99
-
100
- isApiWidgetV1() {
101
- return this.widget?.itemApiVersions?.includes(1)
102
- },
103
-
104
- isApiWidget() {
105
- return this.isApiWidgetV1 || this.isApiWidgetV2
106
- },
107
-
108
- widgetItems() {
109
- return this.items.map(item => ({
110
- id: item.sinceId || item.id || String(Math.random()),
111
- targetUrl: item.link || item.targetUrl || '',
112
- avatarUrl: item.iconUrl || item.avatarUrl || '',
113
- avatarUsername: item.avatarUsername || '',
114
- overlayIconUrl: item.overlayIconUrl || '',
115
- mainText: item.title || item.mainText || '',
116
- subText: item.subtitle || item.subText || '',
117
- }))
118
- },
119
- },
120
-
121
- async mounted() {
122
- if (this.isApiWidget) {
123
- await this.loadItems()
124
-
125
- if (this.widget.reloadInterval && this.widget.reloadInterval > 0) {
126
- this.refreshInterval = setInterval(
127
- () => this.loadItems(),
128
- this.widget.reloadInterval * 1000,
129
- )
130
- }
131
- }
132
- },
133
-
134
- beforeDestroy() {
135
- if (this.refreshInterval) {
136
- clearInterval(this.refreshInterval)
137
- }
138
- },
139
-
140
- methods: {
141
- async loadItems() {
142
- this.loading = true
143
- try {
144
- const version = this.isApiWidgetV2 ? 2 : 1
145
- const url = generateOcsUrl(
146
- `/apps/dashboard/api/v${version}/widget-items`,
147
- )
148
- const response = await axios.get(url, {
149
- params: { widgets: [this.widget.id] },
150
- })
151
-
152
- const data = response.data?.ocs?.data
153
- if (data && data[this.widget.id]) {
154
- const widgetData = data[this.widget.id]
155
- this.items = widgetData.items || widgetData || []
156
- this.emptyMessage = widgetData.emptyContentMessage || ''
157
- }
158
- } catch (error) {
159
- console.error(`[CnWidgetRenderer] Failed to load items for ${this.widget.id}:`, error)
160
- } finally {
161
- this.loading = false
162
- }
163
- },
164
- },
165
- }
166
- </script>
167
-
168
- <style scoped>
169
- .cn-widget-renderer {
170
- height: 100%;
171
- padding: 8px;
172
- }
173
-
174
- .cn-widget-renderer__loading {
175
- display: flex;
176
- align-items: center;
177
- justify-content: center;
178
- height: 100%;
179
- }
180
- </style>
1
+ <!--
2
+ CnWidgetRenderer — Renders Nextcloud Dashboard API widgets (v1/v2).
3
+
4
+ Loads widget items from the Nextcloud widget API and displays them
5
+ using NcDashboardWidget. Supports auto-refresh for widgets that
6
+ define a reload interval.
7
+ -->
8
+ <template>
9
+ <div class="cn-widget-renderer">
10
+ <!-- API Widget V1 or V2 -->
11
+ <NcDashboardWidget
12
+ v-if="isApiWidget"
13
+ :items="widgetItems"
14
+ :show-more-url="widget.widgetUrl"
15
+ :loading="loading"
16
+ :item-menu="false"
17
+ :round-icons="widget.itemIconsRound">
18
+ <template #empty-content>
19
+ <NcEmptyContent
20
+ v-if="emptyMessage"
21
+ :description="emptyMessage">
22
+ <template #icon>
23
+ <span v-if="widget.iconClass" :class="widget.iconClass" />
24
+ </template>
25
+ </NcEmptyContent>
26
+ </template>
27
+ </NcDashboardWidget>
28
+
29
+ <!-- Loading state -->
30
+ <div v-else-if="loading" class="cn-widget-renderer__loading">
31
+ <NcLoadingIcon :size="32" />
32
+ </div>
33
+
34
+ <!-- Fallback for unknown widget types -->
35
+ <NcEmptyContent
36
+ v-else
37
+ :description="unavailableText">
38
+ <template #icon>
39
+ <AlertCircleOutline :size="48" />
40
+ </template>
41
+ </NcEmptyContent>
42
+ </div>
43
+ </template>
44
+
45
+ <script>
46
+ import { NcDashboardWidget, NcEmptyContent, NcLoadingIcon } from '@nextcloud/vue'
47
+ import AlertCircleOutline from 'vue-material-design-icons/AlertCircleOutline.vue'
48
+ import axios from '@nextcloud/axios'
49
+ import { generateOcsUrl } from '@nextcloud/router'
50
+
51
+ /**
52
+ * CnWidgetRenderer — Renders Nextcloud Dashboard API widgets.
53
+ *
54
+ * Fetches widget items from the OCS Dashboard API and displays them
55
+ * using the standard NcDashboardWidget component.
56
+ *
57
+ * @example
58
+ * <CnWidgetRenderer :widget="ncWidget" />
59
+ */
60
+ export default {
61
+ name: 'CnWidgetRenderer',
62
+
63
+ components: {
64
+ NcDashboardWidget,
65
+ NcEmptyContent,
66
+ NcLoadingIcon,
67
+ AlertCircleOutline,
68
+ },
69
+
70
+ props: {
71
+ /**
72
+ * Nextcloud widget object from the Dashboard API.
73
+ * @type {{ id: string, title: string, iconClass?: string, iconUrl?: string, widgetUrl?: string, itemIconsRound?: boolean, itemApiVersions?: number[], reloadInterval?: number, buttons?: Array }}
74
+ */
75
+ widget: {
76
+ type: Object,
77
+ required: true,
78
+ },
79
+ /** Text shown when widget is not available */
80
+ unavailableText: {
81
+ type: String,
82
+ default: 'Widget not available',
83
+ },
84
+ },
85
+
86
+ data() {
87
+ return {
88
+ loading: false,
89
+ items: [],
90
+ emptyMessage: '',
91
+ refreshInterval: null,
92
+ }
93
+ },
94
+
95
+ computed: {
96
+ isApiWidgetV2() {
97
+ return this.widget?.itemApiVersions?.includes(2)
98
+ },
99
+
100
+ isApiWidgetV1() {
101
+ return this.widget?.itemApiVersions?.includes(1)
102
+ },
103
+
104
+ isApiWidget() {
105
+ return this.isApiWidgetV1 || this.isApiWidgetV2
106
+ },
107
+
108
+ widgetItems() {
109
+ return this.items.map(item => ({
110
+ id: item.sinceId || item.id || String(Math.random()),
111
+ targetUrl: item.link || item.targetUrl || '',
112
+ avatarUrl: item.iconUrl || item.avatarUrl || '',
113
+ avatarUsername: item.avatarUsername || '',
114
+ overlayIconUrl: item.overlayIconUrl || '',
115
+ mainText: item.title || item.mainText || '',
116
+ subText: item.subtitle || item.subText || '',
117
+ }))
118
+ },
119
+ },
120
+
121
+ async mounted() {
122
+ if (this.isApiWidget) {
123
+ await this.loadItems()
124
+
125
+ if (this.widget.reloadInterval && this.widget.reloadInterval > 0) {
126
+ this.refreshInterval = setInterval(
127
+ () => this.loadItems(),
128
+ this.widget.reloadInterval * 1000,
129
+ )
130
+ }
131
+ }
132
+ },
133
+
134
+ beforeDestroy() {
135
+ if (this.refreshInterval) {
136
+ clearInterval(this.refreshInterval)
137
+ }
138
+ },
139
+
140
+ methods: {
141
+ async loadItems() {
142
+ this.loading = true
143
+ try {
144
+ const version = this.isApiWidgetV2 ? 2 : 1
145
+ const url = generateOcsUrl(
146
+ `/apps/dashboard/api/v${version}/widget-items`,
147
+ )
148
+ const response = await axios.get(url, {
149
+ params: { widgets: [this.widget.id] },
150
+ })
151
+
152
+ const data = response.data?.ocs?.data
153
+ if (data && data[this.widget.id]) {
154
+ const widgetData = data[this.widget.id]
155
+ this.items = widgetData.items || widgetData || []
156
+ this.emptyMessage = widgetData.emptyContentMessage || ''
157
+ }
158
+ } catch (error) {
159
+ console.error(`[CnWidgetRenderer] Failed to load items for ${this.widget.id}:`, error)
160
+ } finally {
161
+ this.loading = false
162
+ }
163
+ },
164
+ },
165
+ }
166
+ </script>
167
+
168
+ <style scoped>
169
+ .cn-widget-renderer {
170
+ height: 100%;
171
+ padding: 8px;
172
+ }
173
+
174
+ .cn-widget-renderer__loading {
175
+ display: flex;
176
+ align-items: center;
177
+ justify-content: center;
178
+ height: 100%;
179
+ }
180
+ </style>