@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,170 +1,170 @@
1
- <template>
2
- <NcDialog
3
- :name="dialogTitle"
4
- size="small"
5
- :can-close="!loading"
6
- @closing="$emit('close')">
7
- <!-- Result phase -->
8
- <div v-if="result !== null" class="cn-delete__result">
9
- <NcNoteCard v-if="result.success" type="success">
10
- {{ successText }}
11
- </NcNoteCard>
12
- <NcNoteCard v-if="result.error" type="error">
13
- {{ result.error }}
14
- </NcNoteCard>
15
- </div>
16
-
17
- <!-- Confirm phase -->
18
- <div v-else class="cn-delete__confirm">
19
- <NcNoteCard type="warning">
20
- {{ resolvedWarningText }}
21
- </NcNoteCard>
22
- </div>
23
-
24
- <template #actions>
25
- <NcButton @click="$emit('close')">
26
- {{ result !== null ? closeLabel : cancelLabel }}
27
- </NcButton>
28
- <NcButton
29
- v-if="result === null"
30
- type="error"
31
- :disabled="loading"
32
- @click="executeDelete">
33
- <template #icon>
34
- <NcLoadingIcon v-if="loading" :size="20" />
35
- <TrashCanOutline v-else :size="20" />
36
- </template>
37
- {{ confirmLabel }}
38
- </NcButton>
39
- </template>
40
- </NcDialog>
41
- </template>
42
-
43
- <script>
44
- import { NcDialog, NcButton, NcNoteCard, NcLoadingIcon } from '@nextcloud/vue'
45
- import TrashCanOutline from 'vue-material-design-icons/TrashCanOutline.vue'
46
-
47
- /**
48
- * CnDeleteDialog — Single-item delete confirmation dialog.
49
- *
50
- * Two-phase UI: confirm then result. The dialog does NOT perform the delete
51
- * itself — it emits a `confirm` event with the item ID. The parent performs
52
- * the actual API call and calls `setResult()` via a ref.
53
- *
54
- * @example
55
- * <CnDeleteDialog
56
- * v-if="showDeleteDialog"
57
- * ref="deleteDialog"
58
- * :item="itemToDelete"
59
- * @confirm="onDeleteConfirm"
60
- * @close="showDeleteDialog = false" />
61
- *
62
- * // In methods:
63
- * async onDeleteConfirm(id) {
64
- * try {
65
- * await store.deleteItem(id)
66
- * this.$refs.deleteDialog.setResult({ success: true })
67
- * } catch (e) {
68
- * this.$refs.deleteDialog.setResult({ error: e.message })
69
- * }
70
- * }
71
- */
72
- export default {
73
- name: 'CnDeleteDialog',
74
-
75
- components: {
76
- NcDialog,
77
- NcButton,
78
- NcNoteCard,
79
- NcLoadingIcon,
80
- TrashCanOutline,
81
- },
82
-
83
- props: {
84
- /** The item to delete. Must have an `id` property. */
85
- item: {
86
- type: Object,
87
- required: true,
88
- },
89
- /** Property name used for display (e.g., 'title', 'name') */
90
- nameField: {
91
- type: String,
92
- default: 'title',
93
- },
94
- /** Dialog title */
95
- dialogTitle: {
96
- type: String,
97
- default: 'Delete Item',
98
- },
99
- /** Warning text. Use `{name}` as placeholder for the item name. */
100
- warningText: {
101
- type: String,
102
- default: 'Are you sure you want to permanently delete "{name}"? This action cannot be undone.',
103
- },
104
- /** Success message */
105
- successText: {
106
- type: String,
107
- default: 'Item successfully deleted.',
108
- },
109
- cancelLabel: { type: String, default: 'Cancel' },
110
- closeLabel: { type: String, default: 'Close' },
111
- confirmLabel: { type: String, default: 'Delete' },
112
- },
113
-
114
- data() {
115
- return {
116
- loading: false,
117
- result: null,
118
- closeTimeout: null,
119
- }
120
- },
121
-
122
- computed: {
123
- itemName() {
124
- return this.item[this.nameField] || this.item.name || this.item.title || this.item.id
125
- },
126
- resolvedWarningText() {
127
- return this.warningText.replace('{name}', this.itemName)
128
- },
129
- },
130
-
131
- beforeDestroy() {
132
- if (this.closeTimeout) clearTimeout(this.closeTimeout)
133
- },
134
-
135
- /**
136
- * @event confirm Emitted when the user confirms deletion. Payload: the item ID.
137
- * @event close Emitted when the dialog should be closed (cancel, close button, or auto-close after success).
138
- */
139
-
140
- methods: {
141
- executeDelete() {
142
- this.loading = true
143
- this.$emit('confirm', this.item.id)
144
- },
145
-
146
- /**
147
- * Set the result of the delete operation. Call this from the parent
148
- * after the API call completes.
149
- *
150
- * @param {{ success?: boolean, error?: string }} resultData
151
- * @public
152
- */
153
- setResult(resultData) {
154
- this.loading = false
155
- this.result = resultData
156
- if (resultData.success) {
157
- this.closeTimeout = setTimeout(() => {
158
- this.$emit('close')
159
- }, 2000)
160
- }
161
- },
162
- },
163
- }
164
- </script>
165
-
166
- <style scoped>
167
- .cn-delete__confirm {
168
- padding: 4px 0;
169
- }
170
- </style>
1
+ <template>
2
+ <NcDialog
3
+ :name="dialogTitle"
4
+ size="small"
5
+ :can-close="!loading"
6
+ @closing="$emit('close')">
7
+ <!-- Result phase -->
8
+ <div v-if="result !== null" class="cn-delete__result">
9
+ <NcNoteCard v-if="result.success" type="success">
10
+ {{ successText }}
11
+ </NcNoteCard>
12
+ <NcNoteCard v-if="result.error" type="error">
13
+ {{ result.error }}
14
+ </NcNoteCard>
15
+ </div>
16
+
17
+ <!-- Confirm phase -->
18
+ <div v-else class="cn-delete__confirm">
19
+ <NcNoteCard type="warning">
20
+ {{ resolvedWarningText }}
21
+ </NcNoteCard>
22
+ </div>
23
+
24
+ <template #actions>
25
+ <NcButton @click="$emit('close')">
26
+ {{ result !== null ? closeLabel : cancelLabel }}
27
+ </NcButton>
28
+ <NcButton
29
+ v-if="result === null"
30
+ type="error"
31
+ :disabled="loading"
32
+ @click="executeDelete">
33
+ <template #icon>
34
+ <NcLoadingIcon v-if="loading" :size="20" />
35
+ <TrashCanOutline v-else :size="20" />
36
+ </template>
37
+ {{ confirmLabel }}
38
+ </NcButton>
39
+ </template>
40
+ </NcDialog>
41
+ </template>
42
+
43
+ <script>
44
+ import { NcDialog, NcButton, NcNoteCard, NcLoadingIcon } from '@nextcloud/vue'
45
+ import TrashCanOutline from 'vue-material-design-icons/TrashCanOutline.vue'
46
+
47
+ /**
48
+ * CnDeleteDialog — Single-item delete confirmation dialog.
49
+ *
50
+ * Two-phase UI: confirm then result. The dialog does NOT perform the delete
51
+ * itself — it emits a `confirm` event with the item ID. The parent performs
52
+ * the actual API call and calls `setResult()` via a ref.
53
+ *
54
+ * @example
55
+ * <CnDeleteDialog
56
+ * v-if="showDeleteDialog"
57
+ * ref="deleteDialog"
58
+ * :item="itemToDelete"
59
+ * @confirm="onDeleteConfirm"
60
+ * @close="showDeleteDialog = false" />
61
+ *
62
+ * // In methods:
63
+ * async onDeleteConfirm(id) {
64
+ * try {
65
+ * await store.deleteItem(id)
66
+ * this.$refs.deleteDialog.setResult({ success: true })
67
+ * } catch (e) {
68
+ * this.$refs.deleteDialog.setResult({ error: e.message })
69
+ * }
70
+ * }
71
+ */
72
+ export default {
73
+ name: 'CnDeleteDialog',
74
+
75
+ components: {
76
+ NcDialog,
77
+ NcButton,
78
+ NcNoteCard,
79
+ NcLoadingIcon,
80
+ TrashCanOutline,
81
+ },
82
+
83
+ props: {
84
+ /** The item to delete. Must have an `id` property. */
85
+ item: {
86
+ type: Object,
87
+ required: true,
88
+ },
89
+ /** Property name used for display (e.g., 'title', 'name') */
90
+ nameField: {
91
+ type: String,
92
+ default: 'title',
93
+ },
94
+ /** Dialog title */
95
+ dialogTitle: {
96
+ type: String,
97
+ default: 'Delete Item',
98
+ },
99
+ /** Warning text. Use `{name}` as placeholder for the item name. */
100
+ warningText: {
101
+ type: String,
102
+ default: 'Are you sure you want to permanently delete "{name}"? This action cannot be undone.',
103
+ },
104
+ /** Success message */
105
+ successText: {
106
+ type: String,
107
+ default: 'Item successfully deleted.',
108
+ },
109
+ cancelLabel: { type: String, default: 'Cancel' },
110
+ closeLabel: { type: String, default: 'Close' },
111
+ confirmLabel: { type: String, default: 'Delete' },
112
+ },
113
+
114
+ data() {
115
+ return {
116
+ loading: false,
117
+ result: null,
118
+ closeTimeout: null,
119
+ }
120
+ },
121
+
122
+ computed: {
123
+ itemName() {
124
+ return this.item[this.nameField] || this.item.name || this.item.title || this.item.id
125
+ },
126
+ resolvedWarningText() {
127
+ return this.warningText.replace('{name}', this.itemName)
128
+ },
129
+ },
130
+
131
+ beforeDestroy() {
132
+ if (this.closeTimeout) clearTimeout(this.closeTimeout)
133
+ },
134
+
135
+ /**
136
+ * @event confirm Emitted when the user confirms deletion. Payload: the item ID.
137
+ * @event close Emitted when the dialog should be closed (cancel, close button, or auto-close after success).
138
+ */
139
+
140
+ methods: {
141
+ executeDelete() {
142
+ this.loading = true
143
+ this.$emit('confirm', this.item.id)
144
+ },
145
+
146
+ /**
147
+ * Set the result of the delete operation. Call this from the parent
148
+ * after the API call completes.
149
+ *
150
+ * @param {{ success?: boolean, error?: string }} resultData
151
+ * @public
152
+ */
153
+ setResult(resultData) {
154
+ this.loading = false
155
+ this.result = resultData
156
+ if (resultData.success) {
157
+ this.closeTimeout = setTimeout(() => {
158
+ this.$emit('close')
159
+ }, 2000)
160
+ }
161
+ },
162
+ },
163
+ }
164
+ </script>
165
+
166
+ <style scoped>
167
+ .cn-delete__confirm {
168
+ padding: 4px 0;
169
+ }
170
+ </style>