@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,259 +1,259 @@
1
- <template>
2
- <div class="cn-sidebar-tab">
3
- <!-- Add tag -->
4
- <div class="cn-sidebar-tab__action">
5
- <div class="cn-sidebar-tab__action--row">
6
- <NcTextField
7
- v-model="newTagName"
8
- :label="addTagPlaceholder"
9
- @input="filterSuggestions"
10
- @keyup.enter="addTag"
11
- @focus="showSuggestions = true" />
12
- <NcButton
13
- type="primary"
14
- :disabled="!newTagName.trim() || saving"
15
- @click="addTag">
16
- <template #icon>
17
- <Plus :size="20" />
18
- </template>
19
- </NcButton>
20
- </div>
21
- <!-- Tag suggestions dropdown -->
22
- <div
23
- v-if="showSuggestions && filtered.length > 0"
24
- class="cn-sidebar-tab__tag-suggestions">
25
- <button
26
- v-for="suggestion in filtered"
27
- :key="suggestion"
28
- class="cn-sidebar-tab__tag-suggestion"
29
- @mousedown.prevent="selectSuggestion(suggestion)">
30
- <TagOutline :size="16" />
31
- {{ suggestion }}
32
- </button>
33
- </div>
34
- </div>
35
-
36
- <!-- Tags list -->
37
- <NcLoadingIcon v-if="loading" />
38
- <div v-else-if="tags.length === 0" class="cn-sidebar-tab__empty">
39
- {{ noTagsLabel }}
40
- </div>
41
- <div v-else class="cn-sidebar-tab__tags">
42
- <span
43
- v-for="tag in tags"
44
- :key="tag"
45
- class="cn-sidebar-tab__tag">
46
- {{ tag }}
47
- <button
48
- class="cn-sidebar-tab__tag-remove"
49
- :aria-label="'Remove ' + tag"
50
- @click="removeTag(tag)">
51
- <Close :size="14" />
52
- </button>
53
- </span>
54
- </div>
55
- </div>
56
- </template>
57
-
58
- <script>
59
- import { translate as t } from '@nextcloud/l10n'
60
- import { NcButton, NcTextField, NcLoadingIcon } from '@nextcloud/vue'
61
- import TagOutline from 'vue-material-design-icons/TagOutline.vue'
62
- import Plus from 'vue-material-design-icons/Plus.vue'
63
- import Close from 'vue-material-design-icons/Close.vue'
64
- import { buildHeaders } from '../../utils/index.js'
65
-
66
- export default {
67
- name: 'CnTagsTab',
68
-
69
- components: { NcButton, NcTextField, NcLoadingIcon, TagOutline, Plus, Close },
70
-
71
- props: {
72
- objectId: { type: String, required: true },
73
- register: { type: String, default: '' },
74
- schema: { type: String, default: '' },
75
- apiBase: { type: String, default: '/apps/openregister/api' },
76
- addTagPlaceholder: { type: String, default: () => t('nextcloud-vue', 'Add tag...') },
77
- noTagsLabel: { type: String, default: () => t('nextcloud-vue', 'No tags') },
78
- },
79
-
80
- data() {
81
- return {
82
- tags: [],
83
- loading: false,
84
- newTagName: '',
85
- saving: false,
86
- availableTags: [],
87
- filtered: [],
88
- showSuggestions: false,
89
- }
90
- },
91
-
92
- watch: {
93
- objectId: {
94
- immediate: true,
95
- handler(id) {
96
- if (id) {
97
- this.fetchTags()
98
- this.fetchAvailableTags()
99
- }
100
- },
101
- },
102
- },
103
-
104
- methods: {
105
- async fetchTags() {
106
- if (!this.register || !this.schema) return
107
- this.loading = true
108
- try {
109
- const response = await fetch(
110
- `${this.apiBase}/objects/${this.register}/${this.schema}/${this.objectId}/tags`,
111
- { headers: buildHeaders() },
112
- )
113
- if (response.ok) {
114
- this.tags = await response.json()
115
- }
116
- } catch (err) {
117
- console.error('CnTagsTab: Failed to fetch tags', err)
118
- } finally {
119
- this.loading = false
120
- }
121
- },
122
-
123
- async fetchAvailableTags() {
124
- try {
125
- const response = await fetch(`${this.apiBase}/tags`, { headers: buildHeaders() })
126
- if (response.ok) {
127
- this.availableTags = await response.json()
128
- }
129
- } catch (err) {
130
- console.error('CnTagsTab: Failed to fetch available tags', err)
131
- }
132
- },
133
-
134
- filterSuggestions() {
135
- const query = this.newTagName.trim().toLowerCase()
136
- if (!query) {
137
- this.filtered = this.availableTags.filter(t => !this.tags.includes(t))
138
- return
139
- }
140
- this.filtered = this.availableTags.filter(
141
- t => t.toLowerCase().includes(query) && !this.tags.includes(t),
142
- )
143
- },
144
-
145
- selectSuggestion(tagName) {
146
- this.newTagName = tagName
147
- this.showSuggestions = false
148
- this.addTag()
149
- },
150
-
151
- async addTag() {
152
- if (!this.newTagName.trim() || !this.register || !this.schema) return
153
- this.saving = true
154
- this.showSuggestions = false
155
- try {
156
- const response = await fetch(
157
- `${this.apiBase}/objects/${this.register}/${this.schema}/${this.objectId}/tags`,
158
- {
159
- method: 'POST',
160
- headers: buildHeaders(),
161
- body: JSON.stringify({ tag: this.newTagName.trim() }),
162
- },
163
- )
164
- if (response.ok) {
165
- this.tags = await response.json()
166
- }
167
- this.newTagName = ''
168
- this.fetchAvailableTags()
169
- } catch (err) {
170
- console.error('CnTagsTab: Failed to add tag', err)
171
- } finally {
172
- this.saving = false
173
- }
174
- },
175
-
176
- async removeTag(tagName) {
177
- if (!this.register || !this.schema) return
178
- try {
179
- const response = await fetch(
180
- `${this.apiBase}/objects/${this.register}/${this.schema}/${this.objectId}/tags/${encodeURIComponent(tagName)}`,
181
- { method: 'DELETE', headers: buildHeaders() },
182
- )
183
- if (response.ok) {
184
- this.tags = await response.json()
185
- }
186
- } catch (err) {
187
- console.error('CnTagsTab: Failed to remove tag', err)
188
- }
189
- },
190
- },
191
- }
192
- </script>
193
-
194
- <style scoped>
195
- .cn-sidebar-tab { padding: 12px; }
196
- .cn-sidebar-tab__action { margin-bottom: 16px; }
197
- .cn-sidebar-tab__action--row { display: flex; gap: 8px; align-items: flex-end; }
198
-
199
- .cn-sidebar-tab__empty {
200
- text-align: center;
201
- padding: 24px 12px;
202
- color: var(--color-text-maxcontrast);
203
- font-size: 13px;
204
- }
205
-
206
- .cn-sidebar-tab__tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0; }
207
-
208
- .cn-sidebar-tab__tag {
209
- display: inline-flex;
210
- align-items: center;
211
- gap: 4px;
212
- padding: 3px 8px;
213
- border-radius: var(--border-radius-pill, 16px);
214
- background: var(--color-primary-element-light, rgba(0, 130, 201, 0.1));
215
- color: var(--color-primary-element);
216
- font-size: 12px;
217
- font-weight: 500;
218
- }
219
-
220
- .cn-sidebar-tab__tag-remove {
221
- display: flex;
222
- align-items: center;
223
- justify-content: center;
224
- background: none;
225
- border: none;
226
- padding: 0;
227
- cursor: pointer;
228
- color: var(--color-primary-element);
229
- opacity: 0.6;
230
- border-radius: 50%;
231
- }
232
-
233
- .cn-sidebar-tab__tag-remove:hover { opacity: 1; background: rgba(0, 0, 0, 0.08); }
234
-
235
- .cn-sidebar-tab__tag-suggestions {
236
- margin-top: 4px;
237
- border: 1px solid var(--color-border);
238
- border-radius: var(--border-radius);
239
- background: var(--color-main-background);
240
- max-height: 160px;
241
- overflow-y: auto;
242
- }
243
-
244
- .cn-sidebar-tab__tag-suggestion {
245
- display: flex;
246
- align-items: center;
247
- gap: 8px;
248
- width: 100%;
249
- padding: 6px 12px;
250
- border: none;
251
- background: none;
252
- cursor: pointer;
253
- font-size: 13px;
254
- color: var(--color-main-text);
255
- text-align: left;
256
- }
257
-
258
- .cn-sidebar-tab__tag-suggestion:hover { background: var(--color-background-hover); }
259
- </style>
1
+ <template>
2
+ <div class="cn-sidebar-tab">
3
+ <!-- Add tag -->
4
+ <div class="cn-sidebar-tab__action">
5
+ <div class="cn-sidebar-tab__action--row">
6
+ <NcTextField
7
+ v-model="newTagName"
8
+ :label="addTagPlaceholder"
9
+ @input="filterSuggestions"
10
+ @keyup.enter="addTag"
11
+ @focus="showSuggestions = true" />
12
+ <NcButton
13
+ type="primary"
14
+ :disabled="!newTagName.trim() || saving"
15
+ @click="addTag">
16
+ <template #icon>
17
+ <Plus :size="20" />
18
+ </template>
19
+ </NcButton>
20
+ </div>
21
+ <!-- Tag suggestions dropdown -->
22
+ <div
23
+ v-if="showSuggestions && filtered.length > 0"
24
+ class="cn-sidebar-tab__tag-suggestions">
25
+ <button
26
+ v-for="suggestion in filtered"
27
+ :key="suggestion"
28
+ class="cn-sidebar-tab__tag-suggestion"
29
+ @mousedown.prevent="selectSuggestion(suggestion)">
30
+ <TagOutline :size="16" />
31
+ {{ suggestion }}
32
+ </button>
33
+ </div>
34
+ </div>
35
+
36
+ <!-- Tags list -->
37
+ <NcLoadingIcon v-if="loading" />
38
+ <div v-else-if="tags.length === 0" class="cn-sidebar-tab__empty">
39
+ {{ noTagsLabel }}
40
+ </div>
41
+ <div v-else class="cn-sidebar-tab__tags">
42
+ <span
43
+ v-for="tag in tags"
44
+ :key="tag"
45
+ class="cn-sidebar-tab__tag">
46
+ {{ tag }}
47
+ <button
48
+ class="cn-sidebar-tab__tag-remove"
49
+ :aria-label="'Remove ' + tag"
50
+ @click="removeTag(tag)">
51
+ <Close :size="14" />
52
+ </button>
53
+ </span>
54
+ </div>
55
+ </div>
56
+ </template>
57
+
58
+ <script>
59
+ import { translate as t } from '@nextcloud/l10n'
60
+ import { NcButton, NcTextField, NcLoadingIcon } from '@nextcloud/vue'
61
+ import TagOutline from 'vue-material-design-icons/TagOutline.vue'
62
+ import Plus from 'vue-material-design-icons/Plus.vue'
63
+ import Close from 'vue-material-design-icons/Close.vue'
64
+ import { buildHeaders } from '../../utils/index.js'
65
+
66
+ export default {
67
+ name: 'CnTagsTab',
68
+
69
+ components: { NcButton, NcTextField, NcLoadingIcon, TagOutline, Plus, Close },
70
+
71
+ props: {
72
+ objectId: { type: String, required: true },
73
+ register: { type: String, default: '' },
74
+ schema: { type: String, default: '' },
75
+ apiBase: { type: String, default: '/apps/openregister/api' },
76
+ addTagPlaceholder: { type: String, default: () => t('nextcloud-vue', 'Add tag...') },
77
+ noTagsLabel: { type: String, default: () => t('nextcloud-vue', 'No tags') },
78
+ },
79
+
80
+ data() {
81
+ return {
82
+ tags: [],
83
+ loading: false,
84
+ newTagName: '',
85
+ saving: false,
86
+ availableTags: [],
87
+ filtered: [],
88
+ showSuggestions: false,
89
+ }
90
+ },
91
+
92
+ watch: {
93
+ objectId: {
94
+ immediate: true,
95
+ handler(id) {
96
+ if (id) {
97
+ this.fetchTags()
98
+ this.fetchAvailableTags()
99
+ }
100
+ },
101
+ },
102
+ },
103
+
104
+ methods: {
105
+ async fetchTags() {
106
+ if (!this.register || !this.schema) return
107
+ this.loading = true
108
+ try {
109
+ const response = await fetch(
110
+ `${this.apiBase}/objects/${this.register}/${this.schema}/${this.objectId}/tags`,
111
+ { headers: buildHeaders() },
112
+ )
113
+ if (response.ok) {
114
+ this.tags = await response.json()
115
+ }
116
+ } catch (err) {
117
+ console.error('CnTagsTab: Failed to fetch tags', err)
118
+ } finally {
119
+ this.loading = false
120
+ }
121
+ },
122
+
123
+ async fetchAvailableTags() {
124
+ try {
125
+ const response = await fetch(`${this.apiBase}/tags`, { headers: buildHeaders() })
126
+ if (response.ok) {
127
+ this.availableTags = await response.json()
128
+ }
129
+ } catch (err) {
130
+ console.error('CnTagsTab: Failed to fetch available tags', err)
131
+ }
132
+ },
133
+
134
+ filterSuggestions() {
135
+ const query = this.newTagName.trim().toLowerCase()
136
+ if (!query) {
137
+ this.filtered = this.availableTags.filter(t => !this.tags.includes(t))
138
+ return
139
+ }
140
+ this.filtered = this.availableTags.filter(
141
+ t => t.toLowerCase().includes(query) && !this.tags.includes(t),
142
+ )
143
+ },
144
+
145
+ selectSuggestion(tagName) {
146
+ this.newTagName = tagName
147
+ this.showSuggestions = false
148
+ this.addTag()
149
+ },
150
+
151
+ async addTag() {
152
+ if (!this.newTagName.trim() || !this.register || !this.schema) return
153
+ this.saving = true
154
+ this.showSuggestions = false
155
+ try {
156
+ const response = await fetch(
157
+ `${this.apiBase}/objects/${this.register}/${this.schema}/${this.objectId}/tags`,
158
+ {
159
+ method: 'POST',
160
+ headers: buildHeaders(),
161
+ body: JSON.stringify({ tag: this.newTagName.trim() }),
162
+ },
163
+ )
164
+ if (response.ok) {
165
+ this.tags = await response.json()
166
+ }
167
+ this.newTagName = ''
168
+ this.fetchAvailableTags()
169
+ } catch (err) {
170
+ console.error('CnTagsTab: Failed to add tag', err)
171
+ } finally {
172
+ this.saving = false
173
+ }
174
+ },
175
+
176
+ async removeTag(tagName) {
177
+ if (!this.register || !this.schema) return
178
+ try {
179
+ const response = await fetch(
180
+ `${this.apiBase}/objects/${this.register}/${this.schema}/${this.objectId}/tags/${encodeURIComponent(tagName)}`,
181
+ { method: 'DELETE', headers: buildHeaders() },
182
+ )
183
+ if (response.ok) {
184
+ this.tags = await response.json()
185
+ }
186
+ } catch (err) {
187
+ console.error('CnTagsTab: Failed to remove tag', err)
188
+ }
189
+ },
190
+ },
191
+ }
192
+ </script>
193
+
194
+ <style scoped>
195
+ .cn-sidebar-tab { padding: 12px; }
196
+ .cn-sidebar-tab__action { margin-bottom: 16px; }
197
+ .cn-sidebar-tab__action--row { display: flex; gap: 8px; align-items: flex-end; }
198
+
199
+ .cn-sidebar-tab__empty {
200
+ text-align: center;
201
+ padding: 24px 12px;
202
+ color: var(--color-text-maxcontrast);
203
+ font-size: 13px;
204
+ }
205
+
206
+ .cn-sidebar-tab__tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0; }
207
+
208
+ .cn-sidebar-tab__tag {
209
+ display: inline-flex;
210
+ align-items: center;
211
+ gap: 4px;
212
+ padding: 3px 8px;
213
+ border-radius: var(--border-radius-pill, 16px);
214
+ background: var(--color-primary-element-light, rgba(0, 130, 201, 0.1));
215
+ color: var(--color-primary-element);
216
+ font-size: 12px;
217
+ font-weight: 500;
218
+ }
219
+
220
+ .cn-sidebar-tab__tag-remove {
221
+ display: flex;
222
+ align-items: center;
223
+ justify-content: center;
224
+ background: none;
225
+ border: none;
226
+ padding: 0;
227
+ cursor: pointer;
228
+ color: var(--color-primary-element);
229
+ opacity: 0.6;
230
+ border-radius: 50%;
231
+ }
232
+
233
+ .cn-sidebar-tab__tag-remove:hover { opacity: 1; background: rgba(0, 0, 0, 0.08); }
234
+
235
+ .cn-sidebar-tab__tag-suggestions {
236
+ margin-top: 4px;
237
+ border: 1px solid var(--color-border);
238
+ border-radius: var(--border-radius);
239
+ background: var(--color-main-background);
240
+ max-height: 160px;
241
+ overflow-y: auto;
242
+ }
243
+
244
+ .cn-sidebar-tab__tag-suggestion {
245
+ display: flex;
246
+ align-items: center;
247
+ gap: 8px;
248
+ width: 100%;
249
+ padding: 6px 12px;
250
+ border: none;
251
+ background: none;
252
+ cursor: pointer;
253
+ font-size: 13px;
254
+ color: var(--color-main-text);
255
+ text-align: left;
256
+ }
257
+
258
+ .cn-sidebar-tab__tag-suggestion:hover { background: var(--color-background-hover); }
259
+ </style>