@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,266 +1,266 @@
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-copy__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
- <!-- Form phase -->
18
- <div v-else class="cn-copy__form">
19
- <div class="cn-copy__pattern">
20
- <label for="cn-copy-pattern">{{ patternLabel }}</label>
21
- <NcSelect
22
- input-id="cn-copy-pattern"
23
- :options="patternOptions"
24
- :value="selectedPattern"
25
- :clearable="false"
26
- @input="selectedPattern = $event" />
27
- </div>
28
-
29
- <div class="cn-copy__preview">
30
- <div class="cn-copy__preview-row">
31
- <span class="cn-copy__preview-original">{{ itemName }}</span>
32
- <span class="cn-copy__preview-arrow">&rarr;</span>
33
- <span class="cn-copy__preview-new">{{ newName }}</span>
34
- </div>
35
- </div>
36
- </div>
37
-
38
- <template #actions>
39
- <NcButton @click="$emit('close')">
40
- {{ result !== null ? closeLabel : cancelLabel }}
41
- </NcButton>
42
- <NcButton
43
- v-if="result === null"
44
- type="primary"
45
- :disabled="loading"
46
- @click="executeCopy">
47
- <template #icon>
48
- <NcLoadingIcon v-if="loading" :size="20" />
49
- <ContentCopy v-else :size="20" />
50
- </template>
51
- {{ confirmLabel }}
52
- </NcButton>
53
- </template>
54
- </NcDialog>
55
- </template>
56
-
57
- <script>
58
- import { translate as t } from '@nextcloud/l10n'
59
- import { NcDialog, NcButton, NcNoteCard, NcLoadingIcon, NcSelect } from '@nextcloud/vue'
60
- import ContentCopy from 'vue-material-design-icons/ContentCopy.vue'
61
-
62
- /**
63
- * CnCopyDialog — Single-item copy confirmation dialog with naming pattern.
64
- *
65
- * Two-phase UI: form (with name preview) then result. The dialog does NOT
66
- * perform the copy itself — it emits a `confirm` event with the item ID
67
- * and the new name. The parent performs the actual API call and calls
68
- * `setResult()` via a ref.
69
- *
70
- * @example
71
- * <CnCopyDialog
72
- * v-if="showCopyDialog"
73
- * ref="copyDialog"
74
- * :item="itemToCopy"
75
- * @confirm="onCopyConfirm"
76
- * @close="showCopyDialog = false" />
77
- *
78
- * // In methods:
79
- * async onCopyConfirm({ id, newName }) {
80
- * try {
81
- * await store.copyItem(id, { title: newName })
82
- * this.$refs.copyDialog.setResult({ success: true })
83
- * } catch (e) {
84
- * this.$refs.copyDialog.setResult({ error: e.message })
85
- * }
86
- * }
87
- */
88
- export default {
89
- name: 'CnCopyDialog',
90
-
91
- components: {
92
- NcDialog,
93
- NcButton,
94
- NcNoteCard,
95
- NcLoadingIcon,
96
- NcSelect,
97
- ContentCopy,
98
- },
99
-
100
- props: {
101
- /** The item to copy. Must have an `id` property. */
102
- item: {
103
- type: Object,
104
- required: true,
105
- },
106
- /** Property name used for display (e.g., 'title', 'name') */
107
- nameField: {
108
- type: String,
109
- default: 'title',
110
- },
111
- /** Optional function to format the item name. Receives the item, returns a string. Overrides nameField when provided. */
112
- nameFormatter: {
113
- type: Function,
114
- default: null,
115
- },
116
- /** Dialog title */
117
- dialogTitle: {
118
- type: String,
119
- default: () => t('nextcloud-vue', 'Copy item'),
120
- },
121
- /** Label for the naming pattern selector */
122
- patternLabel: {
123
- type: String,
124
- default: () => t('nextcloud-vue', 'Naming pattern'),
125
- },
126
- /** Success message */
127
- successText: {
128
- type: String,
129
- default: () => t('nextcloud-vue', 'Item successfully copied.'),
130
- },
131
- cancelLabel: { type: String, default: () => t('nextcloud-vue', 'Cancel') },
132
- closeLabel: { type: String, default: () => t('nextcloud-vue', 'Close') },
133
- confirmLabel: { type: String, default: () => t('nextcloud-vue', 'Copy') },
134
- },
135
-
136
- data() {
137
- return {
138
- loading: false,
139
- result: null,
140
- closeTimeout: null,
141
- selectedPatternId: 'copy-of',
142
- }
143
- },
144
-
145
- computed: {
146
- itemName() {
147
- if (this.nameFormatter) return this.nameFormatter(this.item)
148
- return this.item[this.nameField] || this.item.name || this.item.title || this.item.id
149
- },
150
-
151
- patternOptions() {
152
- return [
153
- { id: 'copy-of', label: t('nextcloud-vue', 'Copy of {name}') },
154
- { id: 'name-copy', label: t('nextcloud-vue', '{name} - Copy') },
155
- { id: 'name-parens', label: t('nextcloud-vue', '{name} (Copy)') },
156
- ]
157
- },
158
-
159
- selectedPattern: {
160
- get() {
161
- return this.patternOptions.find((p) => p.id === this.selectedPatternId) || this.patternOptions[0]
162
- },
163
- set(pattern) {
164
- this.selectedPatternId = pattern ? pattern.id : 'copy-of'
165
- },
166
- },
167
-
168
- newName() {
169
- return this.applyPattern(this.itemName, this.selectedPatternId)
170
- },
171
- },
172
-
173
- beforeDestroy() {
174
- if (this.closeTimeout) clearTimeout(this.closeTimeout)
175
- },
176
-
177
- /**
178
- * @event confirm Emitted when the user confirms copying. Payload: `{ id, newName }`.
179
- * @event close Emitted when the dialog should be closed (cancel, close button, or auto-close after success).
180
- */
181
-
182
- methods: {
183
- applyPattern(name, patternId) {
184
- switch (patternId) {
185
- case 'copy-of':
186
- return t('nextcloud-vue', 'Copy of {name}', { name })
187
- case 'name-copy':
188
- return t('nextcloud-vue', '{name} - Copy', { name })
189
- case 'name-parens':
190
- return t('nextcloud-vue', '{name} (Copy)', { name })
191
- default:
192
- return t('nextcloud-vue', 'Copy of {name}', { name })
193
- }
194
- },
195
-
196
- executeCopy() {
197
- this.loading = true
198
- this.$emit('confirm', {
199
- id: this.item.id,
200
- newName: this.newName,
201
- })
202
- },
203
-
204
- /**
205
- * Set the result of the copy operation. Call this from the parent
206
- * after the API call completes.
207
- *
208
- * @param {{ success?: boolean, error?: string }} resultData - Result data to pass to the dialog
209
- * @public
210
- */
211
- setResult(resultData) {
212
- this.loading = false
213
- this.result = resultData
214
- if (resultData.success) {
215
- this.closeTimeout = setTimeout(() => {
216
- this.$emit('close')
217
- }, 2000)
218
- }
219
- },
220
- },
221
- }
222
- </script>
223
-
224
- <style scoped>
225
- .cn-copy__pattern {
226
- margin-bottom: 16px;
227
- }
228
-
229
- .cn-copy__pattern label {
230
- display: block;
231
- font-weight: 600;
232
- margin-bottom: 4px;
233
- }
234
-
235
- .cn-copy__preview {
236
- margin-top: 12px;
237
- }
238
-
239
- .cn-copy__preview-row {
240
- display: flex;
241
- align-items: center;
242
- gap: 8px;
243
- padding: 8px 12px;
244
- background-color: var(--color-background-hover);
245
- border-radius: var(--border-radius);
246
- }
247
-
248
- .cn-copy__preview-original {
249
- color: var(--color-text-maxcontrast);
250
- overflow: hidden;
251
- text-overflow: ellipsis;
252
- white-space: nowrap;
253
- }
254
-
255
- .cn-copy__preview-arrow {
256
- flex-shrink: 0;
257
- color: var(--color-text-maxcontrast);
258
- }
259
-
260
- .cn-copy__preview-new {
261
- font-weight: 500;
262
- overflow: hidden;
263
- text-overflow: ellipsis;
264
- white-space: nowrap;
265
- }
266
- </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-copy__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
+ <!-- Form phase -->
18
+ <div v-else class="cn-copy__form">
19
+ <div class="cn-copy__pattern">
20
+ <label for="cn-copy-pattern">{{ patternLabel }}</label>
21
+ <NcSelect
22
+ input-id="cn-copy-pattern"
23
+ :options="patternOptions"
24
+ :value="selectedPattern"
25
+ :clearable="false"
26
+ @input="selectedPattern = $event" />
27
+ </div>
28
+
29
+ <div class="cn-copy__preview">
30
+ <div class="cn-copy__preview-row">
31
+ <span class="cn-copy__preview-original">{{ itemName }}</span>
32
+ <span class="cn-copy__preview-arrow">&rarr;</span>
33
+ <span class="cn-copy__preview-new">{{ newName }}</span>
34
+ </div>
35
+ </div>
36
+ </div>
37
+
38
+ <template #actions>
39
+ <NcButton @click="$emit('close')">
40
+ {{ result !== null ? closeLabel : cancelLabel }}
41
+ </NcButton>
42
+ <NcButton
43
+ v-if="result === null"
44
+ type="primary"
45
+ :disabled="loading"
46
+ @click="executeCopy">
47
+ <template #icon>
48
+ <NcLoadingIcon v-if="loading" :size="20" />
49
+ <ContentCopy v-else :size="20" />
50
+ </template>
51
+ {{ confirmLabel }}
52
+ </NcButton>
53
+ </template>
54
+ </NcDialog>
55
+ </template>
56
+
57
+ <script>
58
+ import { translate as t } from '@nextcloud/l10n'
59
+ import { NcDialog, NcButton, NcNoteCard, NcLoadingIcon, NcSelect } from '@nextcloud/vue'
60
+ import ContentCopy from 'vue-material-design-icons/ContentCopy.vue'
61
+
62
+ /**
63
+ * CnCopyDialog — Single-item copy confirmation dialog with naming pattern.
64
+ *
65
+ * Two-phase UI: form (with name preview) then result. The dialog does NOT
66
+ * perform the copy itself — it emits a `confirm` event with the item ID
67
+ * and the new name. The parent performs the actual API call and calls
68
+ * `setResult()` via a ref.
69
+ *
70
+ * @example
71
+ * <CnCopyDialog
72
+ * v-if="showCopyDialog"
73
+ * ref="copyDialog"
74
+ * :item="itemToCopy"
75
+ * @confirm="onCopyConfirm"
76
+ * @close="showCopyDialog = false" />
77
+ *
78
+ * // In methods:
79
+ * async onCopyConfirm({ id, newName }) {
80
+ * try {
81
+ * await store.copyItem(id, { title: newName })
82
+ * this.$refs.copyDialog.setResult({ success: true })
83
+ * } catch (e) {
84
+ * this.$refs.copyDialog.setResult({ error: e.message })
85
+ * }
86
+ * }
87
+ */
88
+ export default {
89
+ name: 'CnCopyDialog',
90
+
91
+ components: {
92
+ NcDialog,
93
+ NcButton,
94
+ NcNoteCard,
95
+ NcLoadingIcon,
96
+ NcSelect,
97
+ ContentCopy,
98
+ },
99
+
100
+ props: {
101
+ /** The item to copy. Must have an `id` property. */
102
+ item: {
103
+ type: Object,
104
+ required: true,
105
+ },
106
+ /** Property name used for display (e.g., 'title', 'name') */
107
+ nameField: {
108
+ type: String,
109
+ default: 'title',
110
+ },
111
+ /** Optional function to format the item name. Receives the item, returns a string. Overrides nameField when provided. */
112
+ nameFormatter: {
113
+ type: Function,
114
+ default: null,
115
+ },
116
+ /** Dialog title */
117
+ dialogTitle: {
118
+ type: String,
119
+ default: () => t('nextcloud-vue', 'Copy item'),
120
+ },
121
+ /** Label for the naming pattern selector */
122
+ patternLabel: {
123
+ type: String,
124
+ default: () => t('nextcloud-vue', 'Naming pattern'),
125
+ },
126
+ /** Success message */
127
+ successText: {
128
+ type: String,
129
+ default: () => t('nextcloud-vue', 'Item successfully copied.'),
130
+ },
131
+ cancelLabel: { type: String, default: () => t('nextcloud-vue', 'Cancel') },
132
+ closeLabel: { type: String, default: () => t('nextcloud-vue', 'Close') },
133
+ confirmLabel: { type: String, default: () => t('nextcloud-vue', 'Copy') },
134
+ },
135
+
136
+ data() {
137
+ return {
138
+ loading: false,
139
+ result: null,
140
+ closeTimeout: null,
141
+ selectedPatternId: 'copy-of',
142
+ }
143
+ },
144
+
145
+ computed: {
146
+ itemName() {
147
+ if (this.nameFormatter) return this.nameFormatter(this.item)
148
+ return this.item[this.nameField] || this.item.name || this.item.title || this.item.id
149
+ },
150
+
151
+ patternOptions() {
152
+ return [
153
+ { id: 'copy-of', label: t('nextcloud-vue', 'Copy of {name}') },
154
+ { id: 'name-copy', label: t('nextcloud-vue', '{name} - Copy') },
155
+ { id: 'name-parens', label: t('nextcloud-vue', '{name} (Copy)') },
156
+ ]
157
+ },
158
+
159
+ selectedPattern: {
160
+ get() {
161
+ return this.patternOptions.find((p) => p.id === this.selectedPatternId) || this.patternOptions[0]
162
+ },
163
+ set(pattern) {
164
+ this.selectedPatternId = pattern ? pattern.id : 'copy-of'
165
+ },
166
+ },
167
+
168
+ newName() {
169
+ return this.applyPattern(this.itemName, this.selectedPatternId)
170
+ },
171
+ },
172
+
173
+ beforeDestroy() {
174
+ if (this.closeTimeout) clearTimeout(this.closeTimeout)
175
+ },
176
+
177
+ /**
178
+ * @event confirm Emitted when the user confirms copying. Payload: `{ id, newName }`.
179
+ * @event close Emitted when the dialog should be closed (cancel, close button, or auto-close after success).
180
+ */
181
+
182
+ methods: {
183
+ applyPattern(name, patternId) {
184
+ switch (patternId) {
185
+ case 'copy-of':
186
+ return t('nextcloud-vue', 'Copy of {name}', { name })
187
+ case 'name-copy':
188
+ return t('nextcloud-vue', '{name} - Copy', { name })
189
+ case 'name-parens':
190
+ return t('nextcloud-vue', '{name} (Copy)', { name })
191
+ default:
192
+ return t('nextcloud-vue', 'Copy of {name}', { name })
193
+ }
194
+ },
195
+
196
+ executeCopy() {
197
+ this.loading = true
198
+ this.$emit('confirm', {
199
+ id: this.item.id,
200
+ newName: this.newName,
201
+ })
202
+ },
203
+
204
+ /**
205
+ * Set the result of the copy operation. Call this from the parent
206
+ * after the API call completes.
207
+ *
208
+ * @param {{ success?: boolean, error?: string }} resultData - Result data to pass to the dialog
209
+ * @public
210
+ */
211
+ setResult(resultData) {
212
+ this.loading = false
213
+ this.result = resultData
214
+ if (resultData.success) {
215
+ this.closeTimeout = setTimeout(() => {
216
+ this.$emit('close')
217
+ }, 2000)
218
+ }
219
+ },
220
+ },
221
+ }
222
+ </script>
223
+
224
+ <style scoped>
225
+ .cn-copy__pattern {
226
+ margin-bottom: 16px;
227
+ }
228
+
229
+ .cn-copy__pattern label {
230
+ display: block;
231
+ font-weight: 600;
232
+ margin-bottom: 4px;
233
+ }
234
+
235
+ .cn-copy__preview {
236
+ margin-top: 12px;
237
+ }
238
+
239
+ .cn-copy__preview-row {
240
+ display: flex;
241
+ align-items: center;
242
+ gap: 8px;
243
+ padding: 8px 12px;
244
+ background-color: var(--color-background-hover);
245
+ border-radius: var(--border-radius);
246
+ }
247
+
248
+ .cn-copy__preview-original {
249
+ color: var(--color-text-maxcontrast);
250
+ overflow: hidden;
251
+ text-overflow: ellipsis;
252
+ white-space: nowrap;
253
+ }
254
+
255
+ .cn-copy__preview-arrow {
256
+ flex-shrink: 0;
257
+ color: var(--color-text-maxcontrast);
258
+ }
259
+
260
+ .cn-copy__preview-new {
261
+ font-weight: 500;
262
+ overflow: hidden;
263
+ text-overflow: ellipsis;
264
+ white-space: nowrap;
265
+ }
266
+ </style>