@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,245 +1,245 @@
1
- <template>
2
- <NcDialog
3
- :name="dialogTitle"
4
- size="normal"
5
- :can-close="!loading"
6
- @closing="$emit('close')">
7
- <!-- Review phase -->
8
- <div v-if="result === null" class="cn-mass-delete__review">
9
- <NcNoteCard type="warning">
10
- {{ warningText }}
11
- </NcNoteCard>
12
-
13
- <div class="cn-mass-delete__list">
14
- <div
15
- v-for="item in localItems"
16
- :key="item.id"
17
- class="cn-mass-delete__item">
18
- <span class="cn-mass-delete__item-name">
19
- {{ getItemName(item) }}
20
- </span>
21
- <NcButton
22
- type="tertiary"
23
- :aria-label="removeLabel"
24
- @click="removeItem(item.id)">
25
- <template #icon>
26
- <Close :size="16" />
27
- </template>
28
- </NcButton>
29
- </div>
30
- </div>
31
-
32
- <p v-if="localItems.length === 0" class="cn-mass-delete__empty">
33
- {{ emptyText }}
34
- </p>
35
- </div>
36
-
37
- <!-- Result phase -->
38
- <div v-else class="cn-mass-delete__result">
39
- <NcNoteCard v-if="result.success" type="success">
40
- {{ successText }}
41
- </NcNoteCard>
42
- <NcNoteCard v-if="result.error" type="error">
43
- {{ result.error }}
44
- </NcNoteCard>
45
- </div>
46
-
47
- <template #actions>
48
- <NcButton @click="$emit('close')">
49
- {{ result === null ? cancelLabel : closeLabel }}
50
- </NcButton>
51
- <NcButton
52
- v-if="result === null"
53
- type="error"
54
- :disabled="loading || localItems.length === 0"
55
- @click="executeDelete">
56
- <template #icon>
57
- <NcLoadingIcon v-if="loading" :size="20" />
58
- <TrashCanOutline v-else :size="20" />
59
- </template>
60
- {{ confirmLabel }}
61
- </NcButton>
62
- </template>
63
- </NcDialog>
64
- </template>
65
-
66
- <script>
67
- import { translate as t } from '@nextcloud/l10n'
68
- import { NcDialog, NcButton, NcNoteCard, NcLoadingIcon } from '@nextcloud/vue'
69
- import TrashCanOutline from 'vue-material-design-icons/TrashCanOutline.vue'
70
- import Close from 'vue-material-design-icons/Close.vue'
71
-
72
- /**
73
- * CnMassDeleteDialog — Two-phase mass delete confirmation dialog.
74
- *
75
- * Phase 1 (review): Shows the items to be deleted with the ability to remove
76
- * individual items before confirming. Phase 2 (result): Shows success or error.
77
- *
78
- * The dialog does NOT perform the delete itself — it emits a `confirm` event
79
- * with the item IDs. The parent component performs the actual API call and
80
- * calls `setResult()` via a ref.
81
- *
82
- * @example
83
- * <CnMassDeleteDialog
84
- * v-if="showDeleteDialog"
85
- * :items="selectedObjects"
86
- * :name-field="'title'"
87
- * @confirm="onDeleteConfirm"
88
- * @close="showDeleteDialog = false" />
89
- *
90
- * // In methods:
91
- * async onDeleteConfirm(ids) {
92
- * try {
93
- * await store.massDelete(ids)
94
- * this.$refs.deleteDialog.setResult({ success: true })
95
- * } catch (e) {
96
- * this.$refs.deleteDialog.setResult({ error: e.message })
97
- * }
98
- * }
99
- */
100
- export default {
101
- name: 'CnMassDeleteDialog',
102
-
103
- components: {
104
- NcDialog,
105
- NcButton,
106
- NcNoteCard,
107
- NcLoadingIcon,
108
- TrashCanOutline,
109
- Close,
110
- },
111
-
112
- props: {
113
- /** Items to delete. Each must have an `id` property. */
114
- items: {
115
- type: Array,
116
- required: true,
117
- },
118
- /** Property name used for display (e.g., 'title', 'name') */
119
- nameField: {
120
- type: String,
121
- default: 'title',
122
- },
123
- /** Optional function to format the item name. Receives the item, returns a string. Overrides nameField when provided. */
124
- nameFormatter: {
125
- type: Function,
126
- default: null,
127
- },
128
- /** Dialog title */
129
- dialogTitle: {
130
- type: String,
131
- default: () => t('nextcloud-vue', 'Delete items'),
132
- },
133
- /** Warning text shown above the item list */
134
- warningText: {
135
- type: String,
136
- default: () => t('nextcloud-vue', 'The following items will be permanently deleted. Remove any items you want to keep.'),
137
- },
138
- /** Text when all items removed from list */
139
- emptyText: {
140
- type: String,
141
- default: () => t('nextcloud-vue', 'No items selected for deletion.'),
142
- },
143
- /** Success message */
144
- successText: {
145
- type: String,
146
- default: () => t('nextcloud-vue', 'Items successfully deleted.'),
147
- },
148
- cancelLabel: { type: String, default: () => t('nextcloud-vue', 'Cancel') },
149
- closeLabel: { type: String, default: () => t('nextcloud-vue', 'Close') },
150
- confirmLabel: { type: String, default: () => t('nextcloud-vue', 'Delete') },
151
- removeLabel: { type: String, default: () => t('nextcloud-vue', 'Remove from list') },
152
- },
153
-
154
- data() {
155
- return {
156
- localItems: [...this.items],
157
- loading: false,
158
- result: null,
159
- closeTimeout: null,
160
- }
161
- },
162
-
163
- watch: {
164
- items(val) {
165
- this.localItems = [...val]
166
- },
167
- },
168
-
169
- beforeDestroy() {
170
- if (this.closeTimeout) clearTimeout(this.closeTimeout)
171
- },
172
-
173
- methods: {
174
- getItemName(item) {
175
- if (this.nameFormatter) return this.nameFormatter(item)
176
- return item[this.nameField] || item.name || item.title || item.id
177
- },
178
-
179
- removeItem(id) {
180
- this.localItems = this.localItems.filter((i) => i.id !== id)
181
- },
182
-
183
- executeDelete() {
184
- this.loading = true
185
- const ids = this.localItems.map((i) => i.id)
186
- /**
187
- * @event confirm Emitted when the user confirms deletion.
188
- * Payload: array of item IDs to delete.
189
- */
190
- this.$emit('confirm', ids)
191
- },
192
-
193
- /**
194
- * Set the result of the delete operation. Call this from the parent
195
- * after the API call completes.
196
- *
197
- * @param {{ success?: boolean, error?: string }} resultData - Result data to pass to the dialog
198
- * @public
199
- */
200
- setResult(resultData) {
201
- this.loading = false
202
- this.result = resultData
203
- if (resultData.success) {
204
- this.closeTimeout = setTimeout(() => {
205
- this.$emit('close')
206
- }, 2000)
207
- }
208
- },
209
- },
210
- }
211
- </script>
212
-
213
- <style scoped>
214
- .cn-mass-delete__list {
215
- max-height: 300px;
216
- overflow-y: auto;
217
- margin-top: 12px;
218
- }
219
-
220
- .cn-mass-delete__item {
221
- display: flex;
222
- align-items: center;
223
- justify-content: space-between;
224
- padding: 8px 12px;
225
- border-bottom: 1px solid var(--color-border);
226
- }
227
-
228
- .cn-mass-delete__item:last-child {
229
- border-bottom: none;
230
- }
231
-
232
- .cn-mass-delete__item-name {
233
- font-weight: 500;
234
- overflow: hidden;
235
- text-overflow: ellipsis;
236
- white-space: nowrap;
237
- }
238
-
239
- .cn-mass-delete__empty {
240
- text-align: center;
241
- color: var(--color-text-maxcontrast);
242
- font-style: italic;
243
- padding: 20px;
244
- }
245
- </style>
1
+ <template>
2
+ <NcDialog
3
+ :name="dialogTitle"
4
+ size="normal"
5
+ :can-close="!loading"
6
+ @closing="$emit('close')">
7
+ <!-- Review phase -->
8
+ <div v-if="result === null" class="cn-mass-delete__review">
9
+ <NcNoteCard type="warning">
10
+ {{ warningText }}
11
+ </NcNoteCard>
12
+
13
+ <div class="cn-mass-delete__list">
14
+ <div
15
+ v-for="item in localItems"
16
+ :key="item.id"
17
+ class="cn-mass-delete__item">
18
+ <span class="cn-mass-delete__item-name">
19
+ {{ getItemName(item) }}
20
+ </span>
21
+ <NcButton
22
+ type="tertiary"
23
+ :aria-label="removeLabel"
24
+ @click="removeItem(item.id)">
25
+ <template #icon>
26
+ <Close :size="16" />
27
+ </template>
28
+ </NcButton>
29
+ </div>
30
+ </div>
31
+
32
+ <p v-if="localItems.length === 0" class="cn-mass-delete__empty">
33
+ {{ emptyText }}
34
+ </p>
35
+ </div>
36
+
37
+ <!-- Result phase -->
38
+ <div v-else class="cn-mass-delete__result">
39
+ <NcNoteCard v-if="result.success" type="success">
40
+ {{ successText }}
41
+ </NcNoteCard>
42
+ <NcNoteCard v-if="result.error" type="error">
43
+ {{ result.error }}
44
+ </NcNoteCard>
45
+ </div>
46
+
47
+ <template #actions>
48
+ <NcButton @click="$emit('close')">
49
+ {{ result === null ? cancelLabel : closeLabel }}
50
+ </NcButton>
51
+ <NcButton
52
+ v-if="result === null"
53
+ type="error"
54
+ :disabled="loading || localItems.length === 0"
55
+ @click="executeDelete">
56
+ <template #icon>
57
+ <NcLoadingIcon v-if="loading" :size="20" />
58
+ <TrashCanOutline v-else :size="20" />
59
+ </template>
60
+ {{ confirmLabel }}
61
+ </NcButton>
62
+ </template>
63
+ </NcDialog>
64
+ </template>
65
+
66
+ <script>
67
+ import { translate as t } from '@nextcloud/l10n'
68
+ import { NcDialog, NcButton, NcNoteCard, NcLoadingIcon } from '@nextcloud/vue'
69
+ import TrashCanOutline from 'vue-material-design-icons/TrashCanOutline.vue'
70
+ import Close from 'vue-material-design-icons/Close.vue'
71
+
72
+ /**
73
+ * CnMassDeleteDialog — Two-phase mass delete confirmation dialog.
74
+ *
75
+ * Phase 1 (review): Shows the items to be deleted with the ability to remove
76
+ * individual items before confirming. Phase 2 (result): Shows success or error.
77
+ *
78
+ * The dialog does NOT perform the delete itself — it emits a `confirm` event
79
+ * with the item IDs. The parent component performs the actual API call and
80
+ * calls `setResult()` via a ref.
81
+ *
82
+ * @example
83
+ * <CnMassDeleteDialog
84
+ * v-if="showDeleteDialog"
85
+ * :items="selectedObjects"
86
+ * :name-field="'title'"
87
+ * @confirm="onDeleteConfirm"
88
+ * @close="showDeleteDialog = false" />
89
+ *
90
+ * // In methods:
91
+ * async onDeleteConfirm(ids) {
92
+ * try {
93
+ * await store.massDelete(ids)
94
+ * this.$refs.deleteDialog.setResult({ success: true })
95
+ * } catch (e) {
96
+ * this.$refs.deleteDialog.setResult({ error: e.message })
97
+ * }
98
+ * }
99
+ */
100
+ export default {
101
+ name: 'CnMassDeleteDialog',
102
+
103
+ components: {
104
+ NcDialog,
105
+ NcButton,
106
+ NcNoteCard,
107
+ NcLoadingIcon,
108
+ TrashCanOutline,
109
+ Close,
110
+ },
111
+
112
+ props: {
113
+ /** Items to delete. Each must have an `id` property. */
114
+ items: {
115
+ type: Array,
116
+ required: true,
117
+ },
118
+ /** Property name used for display (e.g., 'title', 'name') */
119
+ nameField: {
120
+ type: String,
121
+ default: 'title',
122
+ },
123
+ /** Optional function to format the item name. Receives the item, returns a string. Overrides nameField when provided. */
124
+ nameFormatter: {
125
+ type: Function,
126
+ default: null,
127
+ },
128
+ /** Dialog title */
129
+ dialogTitle: {
130
+ type: String,
131
+ default: () => t('nextcloud-vue', 'Delete items'),
132
+ },
133
+ /** Warning text shown above the item list */
134
+ warningText: {
135
+ type: String,
136
+ default: () => t('nextcloud-vue', 'The following items will be permanently deleted. Remove any items you want to keep.'),
137
+ },
138
+ /** Text when all items removed from list */
139
+ emptyText: {
140
+ type: String,
141
+ default: () => t('nextcloud-vue', 'No items selected for deletion.'),
142
+ },
143
+ /** Success message */
144
+ successText: {
145
+ type: String,
146
+ default: () => t('nextcloud-vue', 'Items successfully deleted.'),
147
+ },
148
+ cancelLabel: { type: String, default: () => t('nextcloud-vue', 'Cancel') },
149
+ closeLabel: { type: String, default: () => t('nextcloud-vue', 'Close') },
150
+ confirmLabel: { type: String, default: () => t('nextcloud-vue', 'Delete') },
151
+ removeLabel: { type: String, default: () => t('nextcloud-vue', 'Remove from list') },
152
+ },
153
+
154
+ data() {
155
+ return {
156
+ localItems: [...this.items],
157
+ loading: false,
158
+ result: null,
159
+ closeTimeout: null,
160
+ }
161
+ },
162
+
163
+ watch: {
164
+ items(val) {
165
+ this.localItems = [...val]
166
+ },
167
+ },
168
+
169
+ beforeDestroy() {
170
+ if (this.closeTimeout) clearTimeout(this.closeTimeout)
171
+ },
172
+
173
+ methods: {
174
+ getItemName(item) {
175
+ if (this.nameFormatter) return this.nameFormatter(item)
176
+ return item[this.nameField] || item.name || item.title || item.id
177
+ },
178
+
179
+ removeItem(id) {
180
+ this.localItems = this.localItems.filter((i) => i.id !== id)
181
+ },
182
+
183
+ executeDelete() {
184
+ this.loading = true
185
+ const ids = this.localItems.map((i) => i.id)
186
+ /**
187
+ * @event confirm Emitted when the user confirms deletion.
188
+ * Payload: array of item IDs to delete.
189
+ */
190
+ this.$emit('confirm', ids)
191
+ },
192
+
193
+ /**
194
+ * Set the result of the delete operation. Call this from the parent
195
+ * after the API call completes.
196
+ *
197
+ * @param {{ success?: boolean, error?: string }} resultData - Result data to pass to the dialog
198
+ * @public
199
+ */
200
+ setResult(resultData) {
201
+ this.loading = false
202
+ this.result = resultData
203
+ if (resultData.success) {
204
+ this.closeTimeout = setTimeout(() => {
205
+ this.$emit('close')
206
+ }, 2000)
207
+ }
208
+ },
209
+ },
210
+ }
211
+ </script>
212
+
213
+ <style scoped>
214
+ .cn-mass-delete__list {
215
+ max-height: 300px;
216
+ overflow-y: auto;
217
+ margin-top: 12px;
218
+ }
219
+
220
+ .cn-mass-delete__item {
221
+ display: flex;
222
+ align-items: center;
223
+ justify-content: space-between;
224
+ padding: 8px 12px;
225
+ border-bottom: 1px solid var(--color-border);
226
+ }
227
+
228
+ .cn-mass-delete__item:last-child {
229
+ border-bottom: none;
230
+ }
231
+
232
+ .cn-mass-delete__item-name {
233
+ font-weight: 500;
234
+ overflow: hidden;
235
+ text-overflow: ellipsis;
236
+ white-space: nowrap;
237
+ }
238
+
239
+ .cn-mass-delete__empty {
240
+ text-align: center;
241
+ color: var(--color-text-maxcontrast);
242
+ font-style: italic;
243
+ padding: 20px;
244
+ }
245
+ </style>