@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.
Files changed (78) hide show
  1. package/dist/nextcloud-vue.cjs +67614 -0
  2. package/dist/nextcloud-vue.cjs.js +13518 -13617
  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 +1796 -1800
  6. package/dist/nextcloud-vue.esm.js +13518 -13617
  7. package/dist/nextcloud-vue.esm.js.map +1 -1
  8. package/package.json +3 -2
  9. package/src/components/CnActionsBar/CnActionsBar.vue +254 -254
  10. package/src/components/CnAdvancedFormDialog/CnAdvancedFormDialog.vue +570 -570
  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 +422 -422
  14. package/src/components/CnAdvancedFormDialog/CnPropertyValueCell.vue +247 -247
  15. package/src/components/CnCard/CnCard.vue +415 -415
  16. package/src/components/CnCardGrid/CnCardGrid.vue +156 -156
  17. package/src/components/CnCellRenderer/CnCellRenderer.vue +132 -132
  18. package/src/components/CnChartWidget/CnChartWidget.vue +346 -346
  19. package/src/components/CnConfigurationCard/CnConfigurationCard.vue +77 -77
  20. package/src/components/CnContextMenu/CnContextMenu.vue +142 -142
  21. package/src/components/CnCopyDialog/CnCopyDialog.vue +266 -266
  22. package/src/components/CnDashboardGrid/CnDashboardGrid.vue +229 -229
  23. package/src/components/CnDashboardPage/CnDashboardPage.vue +397 -397
  24. package/src/components/CnDataTable/CnDataTable.vue +362 -362
  25. package/src/components/CnDeleteDialog/CnDeleteDialog.vue +177 -177
  26. package/src/components/CnDetailCard/CnDetailCard.vue +225 -225
  27. package/src/components/CnDetailGrid/CnDetailGrid.vue +256 -256
  28. package/src/components/CnDetailPage/CnDetailPage.vue +432 -432
  29. package/src/components/CnFacetSidebar/CnFacetSidebar.vue +234 -234
  30. package/src/components/CnFilterBar/CnFilterBar.vue +153 -153
  31. package/src/components/CnFormDialog/CnFormDialog.vue +1047 -1047
  32. package/src/components/CnIcon/CnIcon.vue +89 -89
  33. package/src/components/CnIndexPage/CnIndexPage.vue +981 -980
  34. package/src/components/CnIndexSidebar/CnIndexSidebar.vue +536 -536
  35. package/src/components/CnInfoWidget/CnInfoWidget.vue +219 -219
  36. package/src/components/CnItemCard/CnItemCard.vue +134 -134
  37. package/src/components/CnJsonViewer/CnJsonViewer.vue +312 -312
  38. package/src/components/CnKpiGrid/CnKpiGrid.vue +93 -93
  39. package/src/components/CnMassActionBar/CnMassActionBar.vue +161 -161
  40. package/src/components/CnMassCopyDialog/CnMassCopyDialog.vue +327 -327
  41. package/src/components/CnMassDeleteDialog/CnMassDeleteDialog.vue +245 -245
  42. package/src/components/CnMassExportDialog/CnMassExportDialog.vue +191 -191
  43. package/src/components/CnMassImportDialog/CnMassImportDialog.vue +494 -494
  44. package/src/components/CnNoteCard/CnNoteCard.vue +149 -149
  45. package/src/components/CnNotesCard/CnNotesCard.vue +416 -416
  46. package/src/components/CnObjectCard/CnObjectCard.vue +294 -294
  47. package/src/components/CnObjectDataWidget/CnObjectDataWidget.vue +854 -854
  48. package/src/components/CnObjectMetadataWidget/CnObjectMetadataWidget.vue +289 -289
  49. package/src/components/CnObjectSidebar/CnAuditTrailTab.vue +369 -369
  50. package/src/components/CnObjectSidebar/CnFilesTab.vue +287 -287
  51. package/src/components/CnObjectSidebar/CnNotesTab.vue +250 -250
  52. package/src/components/CnObjectSidebar/CnObjectSidebar.vue +255 -255
  53. package/src/components/CnObjectSidebar/CnTagsTab.vue +259 -259
  54. package/src/components/CnObjectSidebar/CnTasksTab.vue +483 -483
  55. package/src/components/CnPageHeader/CnPageHeader.vue +61 -61
  56. package/src/components/CnPagination/CnPagination.vue +253 -253
  57. package/src/components/CnProgressBar/CnProgressBar.vue +262 -262
  58. package/src/components/CnRegisterMapping/CnRegisterMapping.vue +793 -793
  59. package/src/components/CnRowActions/CnRowActions.vue +95 -95
  60. package/src/components/CnSchemaFormDialog/CnSchemaConfigurationTab.vue +226 -226
  61. package/src/components/CnSchemaFormDialog/CnSchemaFormDialog.vue +788 -788
  62. package/src/components/CnSchemaFormDialog/CnSchemaPropertiesTab.vue +305 -305
  63. package/src/components/CnSchemaFormDialog/CnSchemaPropertyActions.vue +1398 -1398
  64. package/src/components/CnSchemaFormDialog/CnSchemaSecurityTab.vue +236 -236
  65. package/src/components/CnSettingsCard/CnSettingsCard.vue +92 -92
  66. package/src/components/CnSettingsSection/CnSettingsSection.vue +267 -267
  67. package/src/components/CnStatsBlock/CnStatsBlock.vue +437 -437
  68. package/src/components/CnStatsPanel/CnStatsPanel.vue +321 -321
  69. package/src/components/CnStatusBadge/CnStatusBadge.vue +90 -90
  70. package/src/components/CnTabbedFormDialog/CnTabbedFormDialog.vue +545 -545
  71. package/src/components/CnTableWidget/CnTableWidget.vue +333 -333
  72. package/src/components/CnTasksCard/CnTasksCard.vue +374 -374
  73. package/src/components/CnTileWidget/CnTileWidget.vue +159 -159
  74. package/src/components/CnTimelineStages/CnTimelineStages.vue +294 -294
  75. package/src/components/CnUserActionMenu/CnUserActionMenu.vue +436 -436
  76. package/src/components/CnVersionInfoCard/CnVersionInfoCard.vue +313 -313
  77. package/src/components/CnWidgetRenderer/CnWidgetRenderer.vue +180 -180
  78. package/src/components/CnWidgetWrapper/CnWidgetWrapper.vue +248 -248
@@ -1,177 +1,177 @@
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 { translate as t } from '@nextcloud/l10n'
45
- import { NcDialog, NcButton, NcNoteCard, NcLoadingIcon } from '@nextcloud/vue'
46
- import TrashCanOutline from 'vue-material-design-icons/TrashCanOutline.vue'
47
-
48
- /**
49
- * CnDeleteDialog — Single-item delete confirmation dialog.
50
- *
51
- * Two-phase UI: confirm then result. The dialog does NOT perform the delete
52
- * itself — it emits a `confirm` event with the item ID. The parent performs
53
- * the actual API call and calls `setResult()` via a ref.
54
- *
55
- * @example
56
- * <CnDeleteDialog
57
- * v-if="showDeleteDialog"
58
- * ref="deleteDialog"
59
- * :item="itemToDelete"
60
- * @confirm="onDeleteConfirm"
61
- * @close="showDeleteDialog = false" />
62
- *
63
- * // In methods:
64
- * async onDeleteConfirm(id) {
65
- * try {
66
- * await store.deleteItem(id)
67
- * this.$refs.deleteDialog.setResult({ success: true })
68
- * } catch (e) {
69
- * this.$refs.deleteDialog.setResult({ error: e.message })
70
- * }
71
- * }
72
- */
73
- export default {
74
- name: 'CnDeleteDialog',
75
-
76
- components: {
77
- NcDialog,
78
- NcButton,
79
- NcNoteCard,
80
- NcLoadingIcon,
81
- TrashCanOutline,
82
- },
83
-
84
- props: {
85
- /** The item to delete. Must have an `id` property. */
86
- item: {
87
- type: Object,
88
- required: true,
89
- },
90
- /** Property name used for display (e.g., 'title', 'name') */
91
- nameField: {
92
- type: String,
93
- default: 'title',
94
- },
95
- /** Optional function to format the item name. Receives the item, returns a string. Overrides nameField when provided. */
96
- nameFormatter: {
97
- type: Function,
98
- default: null,
99
- },
100
- /** Dialog title */
101
- dialogTitle: {
102
- type: String,
103
- default: () => t('nextcloud-vue', 'Delete item'),
104
- },
105
- /** Warning text. Use `{name}` as placeholder for the item name. */
106
- warningText: {
107
- type: String,
108
- default: () => t('nextcloud-vue', 'Are you sure you want to permanently delete "{name}"? This action cannot be undone.'),
109
- },
110
- /** Success message */
111
- successText: {
112
- type: String,
113
- default: () => t('nextcloud-vue', 'Item successfully deleted.'),
114
- },
115
- cancelLabel: { type: String, default: () => t('nextcloud-vue', 'Cancel') },
116
- closeLabel: { type: String, default: () => t('nextcloud-vue', 'Close') },
117
- confirmLabel: { type: String, default: () => t('nextcloud-vue', 'Delete') },
118
- },
119
-
120
- data() {
121
- return {
122
- loading: false,
123
- result: null,
124
- closeTimeout: null,
125
- }
126
- },
127
-
128
- computed: {
129
- itemName() {
130
- if (this.nameFormatter) return this.nameFormatter(this.item)
131
- return this.item[this.nameField] || this.item.name || this.item.title || this.item.id
132
- },
133
- resolvedWarningText() {
134
- return this.warningText.replace('{name}', this.itemName)
135
- },
136
- },
137
-
138
- beforeDestroy() {
139
- if (this.closeTimeout) clearTimeout(this.closeTimeout)
140
- },
141
-
142
- /**
143
- * @event confirm Emitted when the user confirms deletion. Payload: the item ID.
144
- * @event close Emitted when the dialog should be closed (cancel, close button, or auto-close after success).
145
- */
146
-
147
- methods: {
148
- executeDelete() {
149
- this.loading = true
150
- this.$emit('confirm', this.item.id)
151
- },
152
-
153
- /**
154
- * Set the result of the delete operation. Call this from the parent
155
- * after the API call completes.
156
- *
157
- * @param {{ success?: boolean, error?: string }} resultData - Result data to pass to the dialog
158
- * @public
159
- */
160
- setResult(resultData) {
161
- this.loading = false
162
- this.result = resultData
163
- if (resultData.success) {
164
- this.closeTimeout = setTimeout(() => {
165
- this.$emit('close')
166
- }, 2000)
167
- }
168
- },
169
- },
170
- }
171
- </script>
172
-
173
- <style scoped>
174
- .cn-delete__confirm {
175
- padding: 4px 0;
176
- }
177
- </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 { translate as t } from '@nextcloud/l10n'
45
+ import { NcDialog, NcButton, NcNoteCard, NcLoadingIcon } from '@nextcloud/vue'
46
+ import TrashCanOutline from 'vue-material-design-icons/TrashCanOutline.vue'
47
+
48
+ /**
49
+ * CnDeleteDialog — Single-item delete confirmation dialog.
50
+ *
51
+ * Two-phase UI: confirm then result. The dialog does NOT perform the delete
52
+ * itself — it emits a `confirm` event with the item ID. The parent performs
53
+ * the actual API call and calls `setResult()` via a ref.
54
+ *
55
+ * @example
56
+ * <CnDeleteDialog
57
+ * v-if="showDeleteDialog"
58
+ * ref="deleteDialog"
59
+ * :item="itemToDelete"
60
+ * @confirm="onDeleteConfirm"
61
+ * @close="showDeleteDialog = false" />
62
+ *
63
+ * // In methods:
64
+ * async onDeleteConfirm(id) {
65
+ * try {
66
+ * await store.deleteItem(id)
67
+ * this.$refs.deleteDialog.setResult({ success: true })
68
+ * } catch (e) {
69
+ * this.$refs.deleteDialog.setResult({ error: e.message })
70
+ * }
71
+ * }
72
+ */
73
+ export default {
74
+ name: 'CnDeleteDialog',
75
+
76
+ components: {
77
+ NcDialog,
78
+ NcButton,
79
+ NcNoteCard,
80
+ NcLoadingIcon,
81
+ TrashCanOutline,
82
+ },
83
+
84
+ props: {
85
+ /** The item to delete. Must have an `id` property. */
86
+ item: {
87
+ type: Object,
88
+ required: true,
89
+ },
90
+ /** Property name used for display (e.g., 'title', 'name') */
91
+ nameField: {
92
+ type: String,
93
+ default: 'title',
94
+ },
95
+ /** Optional function to format the item name. Receives the item, returns a string. Overrides nameField when provided. */
96
+ nameFormatter: {
97
+ type: Function,
98
+ default: null,
99
+ },
100
+ /** Dialog title */
101
+ dialogTitle: {
102
+ type: String,
103
+ default: () => t('nextcloud-vue', 'Delete item'),
104
+ },
105
+ /** Warning text. Use `{name}` as placeholder for the item name. */
106
+ warningText: {
107
+ type: String,
108
+ default: () => t('nextcloud-vue', 'Are you sure you want to permanently delete "{name}"? This action cannot be undone.'),
109
+ },
110
+ /** Success message */
111
+ successText: {
112
+ type: String,
113
+ default: () => t('nextcloud-vue', 'Item successfully deleted.'),
114
+ },
115
+ cancelLabel: { type: String, default: () => t('nextcloud-vue', 'Cancel') },
116
+ closeLabel: { type: String, default: () => t('nextcloud-vue', 'Close') },
117
+ confirmLabel: { type: String, default: () => t('nextcloud-vue', 'Delete') },
118
+ },
119
+
120
+ data() {
121
+ return {
122
+ loading: false,
123
+ result: null,
124
+ closeTimeout: null,
125
+ }
126
+ },
127
+
128
+ computed: {
129
+ itemName() {
130
+ if (this.nameFormatter) return this.nameFormatter(this.item)
131
+ return this.item[this.nameField] || this.item.name || this.item.title || this.item.id
132
+ },
133
+ resolvedWarningText() {
134
+ return this.warningText.replace('{name}', this.itemName)
135
+ },
136
+ },
137
+
138
+ beforeDestroy() {
139
+ if (this.closeTimeout) clearTimeout(this.closeTimeout)
140
+ },
141
+
142
+ /**
143
+ * @event confirm Emitted when the user confirms deletion. Payload: the item ID.
144
+ * @event close Emitted when the dialog should be closed (cancel, close button, or auto-close after success).
145
+ */
146
+
147
+ methods: {
148
+ executeDelete() {
149
+ this.loading = true
150
+ this.$emit('confirm', this.item.id)
151
+ },
152
+
153
+ /**
154
+ * Set the result of the delete operation. Call this from the parent
155
+ * after the API call completes.
156
+ *
157
+ * @param {{ success?: boolean, error?: string }} resultData - Result data to pass to the dialog
158
+ * @public
159
+ */
160
+ setResult(resultData) {
161
+ this.loading = false
162
+ this.result = resultData
163
+ if (resultData.success) {
164
+ this.closeTimeout = setTimeout(() => {
165
+ this.$emit('close')
166
+ }, 2000)
167
+ }
168
+ },
169
+ },
170
+ }
171
+ </script>
172
+
173
+ <style scoped>
174
+ .cn-delete__confirm {
175
+ padding: 4px 0;
176
+ }
177
+ </style>