@conduction/nextcloud-vue 0.1.0-beta.3 → 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 (142) hide show
  1. package/README.md +226 -226
  2. package/dist/nextcloud-vue.cjs +67614 -0
  3. package/dist/nextcloud-vue.cjs.js +58386 -6112
  4. package/dist/nextcloud-vue.cjs.js.map +1 -1
  5. package/dist/nextcloud-vue.cjs.map +1 -0
  6. package/dist/nextcloud-vue.css +1819 -285
  7. package/dist/nextcloud-vue.esm.js +58342 -6088
  8. package/dist/nextcloud-vue.esm.js.map +1 -1
  9. package/package.json +82 -62
  10. package/src/components/CnActionsBar/CnActionsBar.vue +17 -7
  11. package/src/components/CnActionsBar/index.js +1 -1
  12. package/src/components/CnAdvancedFormDialog/CnAdvancedFormDialog.vue +579 -0
  13. package/src/components/CnAdvancedFormDialog/CnDataTab.vue +217 -0
  14. package/src/components/CnAdvancedFormDialog/CnMetadataTab.vue +121 -0
  15. package/src/components/CnAdvancedFormDialog/CnPropertiesTab.vue +418 -0
  16. package/src/components/CnAdvancedFormDialog/CnPropertyValueCell.vue +247 -0
  17. package/src/components/CnAdvancedFormDialog/index.js +1 -0
  18. package/src/components/CnCardGrid/CnCardGrid.vue +1 -1
  19. package/src/components/CnCardGrid/index.js +1 -1
  20. package/src/components/CnCellRenderer/index.js +1 -1
  21. package/src/components/CnChartWidget/CnChartWidget.vue +320 -0
  22. package/src/components/CnChartWidget/index.js +1 -0
  23. package/src/components/CnConfigurationCard/index.js +1 -1
  24. package/src/components/CnCopyDialog/CnCopyDialog.vue +250 -250
  25. package/src/components/CnDashboardGrid/CnDashboardGrid.vue +225 -0
  26. package/src/components/CnDashboardGrid/index.js +1 -0
  27. package/src/components/CnDashboardPage/CnDashboardPage.vue +390 -0
  28. package/src/components/CnDashboardPage/index.js +1 -0
  29. package/src/components/CnDataTable/CnDataTable.vue +1 -1
  30. package/src/components/CnDataTable/index.js +1 -1
  31. package/src/components/CnDeleteDialog/CnDeleteDialog.vue +170 -170
  32. package/src/components/CnDetailCard/CnDetailCard.vue +214 -0
  33. package/src/components/CnDetailCard/index.js +1 -0
  34. package/src/components/CnDetailPage/CnDetailPage.vue +285 -0
  35. package/src/components/CnDetailPage/index.js +1 -0
  36. package/src/components/CnFacetSidebar/CnFacetSidebar.vue +9 -1
  37. package/src/components/CnFacetSidebar/index.js +1 -1
  38. package/src/components/CnFilterBar/index.js +1 -1
  39. package/src/components/CnFormDialog/CnFormDialog.vue +302 -11
  40. package/src/components/CnIcon/index.js +1 -1
  41. package/src/components/CnIndexPage/CnIndexPage.vue +71 -3
  42. package/src/components/CnIndexPage/index.js +1 -1
  43. package/src/components/CnIndexSidebar/CnIndexSidebar.vue +121 -102
  44. package/src/components/CnIndexSidebar/index.js +1 -1
  45. package/src/components/CnItemCard/CnItemCard.vue +132 -0
  46. package/src/components/CnItemCard/index.js +1 -0
  47. package/src/components/CnKpiGrid/index.js +1 -1
  48. package/src/components/CnMassActionBar/index.js +1 -1
  49. package/src/components/CnMassCopyDialog/index.js +1 -1
  50. package/src/components/CnMassDeleteDialog/index.js +1 -1
  51. package/src/components/CnMassExportDialog/index.js +1 -1
  52. package/src/components/CnMassImportDialog/index.js +1 -1
  53. package/src/components/CnNoteCard/CnNoteCard.vue +149 -0
  54. package/src/components/CnNoteCard/index.js +1 -0
  55. package/src/components/CnNotesCard/CnNotesCard.vue +413 -0
  56. package/src/components/CnNotesCard/index.js +1 -0
  57. package/src/components/CnObjectCard/CnObjectCard.vue +1 -1
  58. package/src/components/CnObjectCard/index.js +1 -1
  59. package/src/components/CnObjectSidebar/CnObjectSidebar.vue +876 -0
  60. package/src/components/CnObjectSidebar/index.js +1 -0
  61. package/src/components/CnPageHeader/index.js +1 -1
  62. package/src/components/CnPagination/index.js +1 -1
  63. package/src/components/CnRegisterMapping/CnRegisterMapping.vue +792 -792
  64. package/src/components/CnRowActions/CnRowActions.vue +25 -3
  65. package/src/components/CnRowActions/index.js +1 -1
  66. package/src/components/CnSchemaFormDialog/CnSchemaConfigurationTab.vue +226 -0
  67. package/src/components/CnSchemaFormDialog/CnSchemaFormDialog.vue +787 -0
  68. package/src/components/CnSchemaFormDialog/CnSchemaPropertiesTab.vue +305 -0
  69. package/src/components/CnSchemaFormDialog/CnSchemaPropertyActions.vue +1398 -0
  70. package/src/components/CnSchemaFormDialog/CnSchemaSecurityTab.vue +236 -0
  71. package/src/components/CnSchemaFormDialog/index.js +1 -0
  72. package/src/components/CnSettingsCard/index.js +1 -1
  73. package/src/components/CnSettingsSection/index.js +1 -1
  74. package/src/components/CnStatsBlock/CnStatsBlock.vue +62 -8
  75. package/src/components/CnStatsBlock/index.js +1 -1
  76. package/src/components/CnStatusBadge/index.js +1 -1
  77. package/src/components/CnTabbedFormDialog/CnTabbedFormDialog.vue +540 -0
  78. package/src/components/CnTabbedFormDialog/index.js +1 -0
  79. package/src/components/CnTasksCard/CnTasksCard.vue +373 -0
  80. package/src/components/CnTasksCard/index.js +1 -0
  81. package/src/components/CnTileWidget/CnTileWidget.vue +159 -0
  82. package/src/components/CnTileWidget/index.js +1 -0
  83. package/src/components/CnTimelineStages/CnTimelineStages.vue +292 -0
  84. package/src/components/CnTimelineStages/index.js +1 -0
  85. package/src/components/CnUserActionMenu/CnUserActionMenu.vue +435 -0
  86. package/src/components/CnUserActionMenu/index.js +1 -0
  87. package/src/components/CnVersionInfoCard/index.js +1 -1
  88. package/src/components/CnWidgetRenderer/CnWidgetRenderer.vue +180 -0
  89. package/src/components/CnWidgetRenderer/index.js +1 -0
  90. package/src/components/CnWidgetWrapper/CnWidgetWrapper.vue +211 -0
  91. package/src/components/CnWidgetWrapper/index.js +1 -0
  92. package/src/components/index.js +43 -29
  93. package/src/composables/index.js +4 -3
  94. package/src/composables/useDashboardView.js +240 -0
  95. package/src/composables/useDetailView.js +289 -132
  96. package/src/composables/useListView.js +363 -362
  97. package/src/composables/useSubResource.js +142 -142
  98. package/src/constants/metadata.js +30 -30
  99. package/src/css/CnSchemaFormDialog.css +546 -0
  100. package/src/css/__sample_nextcloud_tokens.css +110 -0
  101. package/src/css/actions-bar.css +48 -48
  102. package/src/css/badge.css +51 -51
  103. package/src/css/card.css +128 -128
  104. package/src/css/dashboard.css +70 -0
  105. package/src/css/detail-page.css +168 -0
  106. package/src/css/detail.css +68 -68
  107. package/src/css/index-page.css +44 -32
  108. package/src/css/index-sidebar.css +193 -187
  109. package/src/css/index.css +16 -12
  110. package/src/css/layout.css +90 -90
  111. package/src/css/page-header.css +33 -33
  112. package/src/css/pagination.css +72 -72
  113. package/src/css/table.css +142 -142
  114. package/src/css/timeline-stages.css +218 -0
  115. package/src/css/utilities.css +46 -46
  116. package/src/index.js +72 -53
  117. package/src/store/createSubResourcePlugin.js +135 -135
  118. package/src/store/index.js +3 -3
  119. package/src/store/plugins/auditTrails.js +17 -17
  120. package/src/store/plugins/files.js +250 -186
  121. package/src/store/plugins/index.js +7 -5
  122. package/src/store/plugins/lifecycle.js +180 -180
  123. package/src/store/plugins/relations.js +68 -68
  124. package/src/store/plugins/search.js +372 -0
  125. package/src/store/plugins/selection.js +104 -0
  126. package/src/store/useObjectStore.js +829 -686
  127. package/src/types/auditTrail.d.ts +32 -32
  128. package/src/types/file.d.ts +23 -23
  129. package/src/types/index.d.ts +35 -35
  130. package/src/types/notification.d.ts +36 -36
  131. package/src/types/object.d.ts +40 -40
  132. package/src/types/organisation.d.ts +41 -41
  133. package/src/types/register.d.ts +25 -25
  134. package/src/types/schema.d.ts +39 -39
  135. package/src/types/shared.d.ts +79 -79
  136. package/src/types/source.d.ts +14 -14
  137. package/src/types/task.d.ts +31 -31
  138. package/src/utils/errors.js +96 -96
  139. package/src/utils/headers.js +68 -50
  140. package/src/utils/id.js +13 -0
  141. package/src/utils/index.js +3 -3
  142. package/src/utils/schema.js +422 -419
@@ -24,50 +24,56 @@
24
24
  <Magnify :size="20" />
25
25
  </template>
26
26
 
27
- <div class="cn-index-sidebar__section">
28
- <h3>{{ searchLabel }}</h3>
29
- <NcTextField
30
- :value="searchValue"
31
- :placeholder="searchPlaceholder"
32
- :label="searchLabel"
33
- @update:value="$emit('search', $event)" />
34
- </div>
27
+ <div class="cn-index-sidebar__tab-content">
28
+ <div v-if="$slots['search-above']" class="cn-index-sidebar__section">
29
+ <slot name="search-above" />
30
+ </div>
31
+
32
+ <div class="cn-index-sidebar__section">
33
+ <h3>{{ searchLabel }}</h3>
34
+ <NcTextField
35
+ :value="searchValue"
36
+ :placeholder="searchPlaceholder"
37
+ :label="searchLabel"
38
+ @update:value="$emit('search', $event)" />
39
+ </div>
35
40
 
36
- <div v-if="schemaFilters.length > 0" class="cn-index-sidebar__section">
37
- <h3>{{ filtersLabel }}</h3>
38
- <div
39
- v-for="filter in schemaFilters"
40
- :key="filter.key"
41
- class="cn-index-sidebar__filter-group">
42
- <div class="cn-index-sidebar__filter-header">
43
- <span class="cn-index-sidebar__filter-label">{{ filter.label }}</span>
44
- <NcPopover v-if="filter.description" popup-role="dialog">
45
- <template #trigger>
46
- <NcButton
47
- type="tertiary-no-background"
48
- :aria-label="filter.label + ' info'"
49
- class="cn-index-sidebar__info-btn">
50
- <template #icon>
51
- <InformationOutline :size="16" />
52
- </template>
53
- </NcButton>
54
- </template>
55
- <p class="cn-index-sidebar__filter-description">{{ filter.description }}</p>
56
- </NcPopover>
41
+ <div v-if="schemaFilters.length > 0" class="cn-index-sidebar__section">
42
+ <h3>{{ filtersLabel }}</h3>
43
+ <div
44
+ v-for="filter in schemaFilters"
45
+ :key="filter.key"
46
+ class="cn-index-sidebar__filter-group">
47
+ <div class="cn-index-sidebar__filter-header">
48
+ <span class="cn-index-sidebar__filter-label">{{ filter.label }}</span>
49
+ <NcPopover v-if="filter.description" popup-role="dialog">
50
+ <template #trigger>
51
+ <NcButton
52
+ type="tertiary-no-background"
53
+ :aria-label="filter.label + ' info'"
54
+ class="cn-index-sidebar__info-btn">
55
+ <template #icon>
56
+ <InformationOutline :size="16" />
57
+ </template>
58
+ </NcButton>
59
+ </template>
60
+ <p class="cn-index-sidebar__filter-description">{{ filter.description }}</p>
61
+ </NcPopover>
62
+ </div>
63
+ <NcSelect
64
+ class="cn-index-sidebar__select"
65
+ :value="getSelectedFilterOptions(filter)"
66
+ :options="getFilterOptions(filter)"
67
+ placeholder="Select..."
68
+ :input-label="filter.label"
69
+ :multiple="true"
70
+ :clearable="true"
71
+ @input="onFilterChange(filter.key, $event)" />
57
72
  </div>
58
- <NcSelect
59
- class="cn-index-sidebar__select"
60
- :value="getSelectedFilterOptions(filter)"
61
- :options="getFilterOptions(filter)"
62
- placeholder="Select..."
63
- :input-label="filter.label"
64
- :multiple="true"
65
- :clearable="true"
66
- @input="onFilterChange(filter.key, $event)" />
67
73
  </div>
68
- </div>
69
74
 
70
- <slot name="search-extra" />
75
+ <slot name="search-extra" />
76
+ </div>
71
77
  </NcAppSidebarTab>
72
78
 
73
79
  <!-- Columns Tab -->
@@ -79,71 +85,73 @@
79
85
  <FormatColumns :size="20" />
80
86
  </template>
81
87
 
82
- <div class="cn-sidebar-columns">
83
- <h3>{{ columnsHeading }}</h3>
84
- <p class="cn-sidebar-columns__description">{{ columnsDescription }}</p>
85
-
86
- <template v-if="allColumns.length > 0 || allGroups.length > 0">
87
- <!-- Schema properties group (collapsible) -->
88
- <div v-if="allColumns.length > 0" class="cn-sidebar-columns__group cn-sidebar-columns__group--collapsible">
89
- <div class="cn-sidebar-columns__group-header" @click="propertiesExpanded = !propertiesExpanded">
90
- <ChevronDown v-if="propertiesExpanded" :size="20" />
91
- <ChevronRight v-else :size="20" />
92
- <h4>{{ resolvedPropertiesLabel }}</h4>
93
- <NcCheckboxRadioSwitch
94
- :checked="isGroupAllVisible(allColumns)"
95
- class="cn-sidebar-columns__select-all"
96
- @click.native.stop
97
- @update:checked="toggleGroupAll(allColumns)">
98
- All
99
- </NcCheckboxRadioSwitch>
100
- </div>
101
- <div v-if="propertiesExpanded" class="cn-sidebar-columns__group-content">
102
- <NcCheckboxRadioSwitch
103
- v-for="col in allColumns"
104
- :key="col.key"
105
- :checked="isColumnVisible(col.key)"
106
- @update:checked="toggleColumn(col.key)">
107
- {{ col.label }}
108
- </NcCheckboxRadioSwitch>
88
+ <div class="cn-index-sidebar__tab-content">
89
+ <div class="cn-sidebar-columns">
90
+ <h3>{{ columnsHeading }}</h3>
91
+ <p class="cn-sidebar-columns__description">{{ columnsDescription }}</p>
92
+
93
+ <template v-if="allColumns.length > 0 || allGroups.length > 0">
94
+ <!-- Schema properties group (collapsible) -->
95
+ <div v-if="allColumns.length > 0" class="cn-sidebar-columns__group cn-sidebar-columns__group--collapsible">
96
+ <div class="cn-sidebar-columns__group-header" @click="propertiesExpanded = !propertiesExpanded">
97
+ <ChevronDown v-if="propertiesExpanded" :size="20" />
98
+ <ChevronRight v-else :size="20" />
99
+ <h4>{{ resolvedPropertiesLabel }}</h4>
100
+ <NcCheckboxRadioSwitch
101
+ :checked="isGroupAllVisible(allColumns)"
102
+ class="cn-sidebar-columns__select-all"
103
+ @click.native.stop
104
+ @update:checked="toggleGroupAll(allColumns)">
105
+ All
106
+ </NcCheckboxRadioSwitch>
107
+ </div>
108
+ <div v-if="propertiesExpanded" class="cn-sidebar-columns__group-content">
109
+ <NcCheckboxRadioSwitch
110
+ v-for="col in allColumns"
111
+ :key="col.key"
112
+ :checked="isColumnVisible(col.key)"
113
+ @update:checked="toggleColumn(col.key)">
114
+ {{ col.label }}
115
+ </NcCheckboxRadioSwitch>
116
+ </div>
109
117
  </div>
110
- </div>
111
118
 
112
- <!-- Extra column groups (built-in Metadata + external) -->
113
- <div
114
- v-for="group in allGroups"
115
- :key="group.id"
116
- class="cn-sidebar-columns__group cn-sidebar-columns__group--collapsible">
117
- <div class="cn-sidebar-columns__group-header" @click="toggleGroup(group.id)">
118
- <ChevronDown v-if="expandedGroups[group.id]" :size="20" />
119
- <ChevronRight v-else :size="20" />
120
- <h4>{{ group.label }}</h4>
121
- <NcCheckboxRadioSwitch
122
- :checked="isGroupAllVisible(group.columns)"
123
- class="cn-sidebar-columns__select-all"
124
- @click.native.stop
125
- @update:checked="toggleGroupAll(group.columns)">
126
- All
127
- </NcCheckboxRadioSwitch>
119
+ <!-- Extra column groups (built-in Metadata + external) -->
120
+ <div
121
+ v-for="group in allGroups"
122
+ :key="group.id"
123
+ class="cn-sidebar-columns__group cn-sidebar-columns__group--collapsible">
124
+ <div class="cn-sidebar-columns__group-header" @click="toggleGroup(group.id)">
125
+ <ChevronDown v-if="expandedGroups[group.id]" :size="20" />
126
+ <ChevronRight v-else :size="20" />
127
+ <h4>{{ group.label }}</h4>
128
+ <NcCheckboxRadioSwitch
129
+ :checked="isGroupAllVisible(group.columns)"
130
+ class="cn-sidebar-columns__select-all"
131
+ @click.native.stop
132
+ @update:checked="toggleGroupAll(group.columns)">
133
+ All
134
+ </NcCheckboxRadioSwitch>
135
+ </div>
136
+ <div v-if="expandedGroups[group.id]" class="cn-sidebar-columns__group-content">
137
+ <NcCheckboxRadioSwitch
138
+ v-for="col in group.columns"
139
+ :key="col.key"
140
+ :checked="isColumnVisible(col.key)"
141
+ @update:checked="toggleColumn(col.key)">
142
+ {{ col.label }}
143
+ </NcCheckboxRadioSwitch>
144
+ </div>
128
145
  </div>
129
- <div v-if="expandedGroups[group.id]" class="cn-sidebar-columns__group-content">
130
- <NcCheckboxRadioSwitch
131
- v-for="col in group.columns"
132
- :key="col.key"
133
- :checked="isColumnVisible(col.key)"
134
- @update:checked="toggleColumn(col.key)">
135
- {{ col.label }}
136
- </NcCheckboxRadioSwitch>
137
- </div>
138
- </div>
139
- </template>
146
+ </template>
140
147
 
141
- <p v-else class="cn-sidebar-columns__empty">
142
- No columns available. Provide a schema to auto-generate columns.
143
- </p>
144
- </div>
148
+ <p v-else class="cn-sidebar-columns__empty">
149
+ No columns available. Provide a schema to auto-generate columns.
150
+ </p>
151
+ </div>
145
152
 
146
- <slot name="columns-extra" />
153
+ <slot name="columns-extra" />
154
+ </div>
147
155
  </NcAppSidebarTab>
148
156
 
149
157
  <!-- Extra tabs injected by the consumer -->
@@ -180,6 +188,9 @@ import { METADATA_COLUMNS } from '../../constants/metadata.js'
180
188
  * :search-value="search"
181
189
  * @search="onSearch"
182
190
  * @columns-change="onColumnsChange" />
191
+ *
192
+ * @slot search-above - Content rendered above the search field in the Search tab (e.g. hints, quick actions).
193
+ * @slot search-extra - Content rendered below the search field and filters in the Search tab (e.g. saved searches).
183
194
  */
184
195
  export default {
185
196
  name: 'CnIndexSidebar',
@@ -303,6 +314,14 @@ export default {
303
314
  type: String,
304
315
  default: 'search-tab',
305
316
  },
317
+ /**
318
+ * Whether the current user is an admin.
319
+ * When false, schema properties with `adminOnly: true` are hidden from filters.
320
+ */
321
+ userIsAdmin: {
322
+ type: Boolean,
323
+ default: true,
324
+ },
306
325
  },
307
326
 
308
327
  data() {
@@ -343,10 +362,10 @@ export default {
343
362
  return columnsFromSchema(this.schema, {})
344
363
  },
345
364
 
346
- /** Filter definitions from schema (facetable properties) */
365
+ /** Filter definitions from schema (facetable properties, respecting RBAC) */
347
366
  schemaFilters() {
348
367
  if (!this.schema) return []
349
- return filtersFromSchema(this.schema)
368
+ return filtersFromSchema(this.schema, { isAdmin: this.userIsAdmin })
350
369
  },
351
370
 
352
371
  /** Combined column groups: built-in Metadata + external groups */
@@ -1 +1 @@
1
- export { default as CnIndexSidebar } from './CnIndexSidebar.vue'
1
+ export { default as CnIndexSidebar } from './CnIndexSidebar.vue'
@@ -0,0 +1,132 @@
1
+ <template>
2
+ <div class="cn-item-card" @click="$emit('click', $event)">
3
+ <div class="cn-item-card__header">
4
+ <div class="cn-item-card__title-row">
5
+ <slot name="icon">
6
+ <component :is="icon" v-if="icon" :size="iconSize" />
7
+ </slot>
8
+ <div class="cn-item-card__title-content">
9
+ <h3 class="cn-item-card__title">{{ title }}</h3>
10
+ <span v-if="subtitle" class="cn-item-card__subtitle">{{ subtitle }}</span>
11
+ </div>
12
+ </div>
13
+ <div v-if="$slots.actions || $scopedSlots.actions" class="cn-item-card__actions">
14
+ <slot name="actions" />
15
+ </div>
16
+ </div>
17
+ <div v-if="$slots.default || $scopedSlots.default" class="cn-item-card__content">
18
+ <slot />
19
+ </div>
20
+ </div>
21
+ </template>
22
+
23
+ <script>
24
+ /**
25
+ * CnItemCard — Compact card for displaying an item in a sidebar list.
26
+ *
27
+ * Provides a card with a header (icon + title + optional actions) and
28
+ * a flexible content area. Designed for use in sidebar lists such as
29
+ * schema listings, source listings, etc.
30
+ *
31
+ * @example Basic usage
32
+ * <CnItemCard title="My Schema" :icon="FileCodeOutline">
33
+ * <p>Schema content here</p>
34
+ * </CnItemCard>
35
+ *
36
+ * @example With actions and stats
37
+ * <CnItemCard title="My Schema" :icon="FileCodeOutline" subtitle="v1.0">
38
+ * <template #actions>
39
+ * <NcActions>
40
+ * <NcActionButton @click="edit">Edit</NcActionButton>
41
+ * </NcActions>
42
+ * </template>
43
+ * <CnKpiGrid :columns="2">
44
+ * <CnStatsBlock title="Objects" :count="42" />
45
+ * <CnStatsBlock title="Size" :count="0" :breakdown="{ size: '1.2 MB' }" />
46
+ * </CnKpiGrid>
47
+ * </CnItemCard>
48
+ */
49
+ export default {
50
+ name: 'CnItemCard',
51
+
52
+ props: {
53
+ /** Card title */
54
+ title: {
55
+ type: String,
56
+ default: '',
57
+ },
58
+ /** Optional subtitle below the title */
59
+ subtitle: {
60
+ type: String,
61
+ default: '',
62
+ },
63
+ /** Icon component (e.g., imported MDI icon) */
64
+ icon: {
65
+ type: [Object, Function],
66
+ default: null,
67
+ },
68
+ /** Icon size in pixels */
69
+ iconSize: {
70
+ type: Number,
71
+ default: 20,
72
+ },
73
+ },
74
+ }
75
+ </script>
76
+
77
+ <style scoped>
78
+ .cn-item-card {
79
+ background: var(--color-main-background);
80
+ border: 1px solid var(--color-border);
81
+ border-radius: var(--border-radius-large, 10px);
82
+ padding: 12px;
83
+ margin-bottom: 12px;
84
+ }
85
+
86
+ .cn-item-card:last-child {
87
+ margin-bottom: 0;
88
+ }
89
+
90
+ .cn-item-card__header {
91
+ display: flex;
92
+ align-items: center;
93
+ justify-content: space-between;
94
+ }
95
+
96
+ .cn-item-card__title-row {
97
+ display: flex;
98
+ align-items: center;
99
+ gap: 8px;
100
+ min-width: 0;
101
+ flex: 1;
102
+ }
103
+
104
+ .cn-item-card__title-content {
105
+ display: flex;
106
+ flex-direction: column;
107
+ min-width: 0;
108
+ }
109
+
110
+ .cn-item-card__title {
111
+ margin: 0;
112
+ font-size: 1em;
113
+ font-weight: 600;
114
+ color: var(--color-main-text);
115
+ overflow: hidden;
116
+ text-overflow: ellipsis;
117
+ white-space: nowrap;
118
+ }
119
+
120
+ .cn-item-card__subtitle {
121
+ font-size: 0.85em;
122
+ color: var(--color-text-maxcontrast);
123
+ }
124
+
125
+ .cn-item-card__actions {
126
+ flex-shrink: 0;
127
+ }
128
+
129
+ .cn-item-card__content {
130
+ margin-top: 8px;
131
+ }
132
+ </style>
@@ -0,0 +1 @@
1
+ export { default as CnItemCard } from './CnItemCard.vue'
@@ -1 +1 @@
1
- export { default as CnKpiGrid } from './CnKpiGrid.vue'
1
+ export { default as CnKpiGrid } from './CnKpiGrid.vue'
@@ -1 +1 @@
1
- export { default as CnMassActionBar } from './CnMassActionBar.vue'
1
+ export { default as CnMassActionBar } from './CnMassActionBar.vue'
@@ -1 +1 @@
1
- export { default as CnMassCopyDialog } from './CnMassCopyDialog.vue'
1
+ export { default as CnMassCopyDialog } from './CnMassCopyDialog.vue'
@@ -1 +1 @@
1
- export { default as CnMassDeleteDialog } from './CnMassDeleteDialog.vue'
1
+ export { default as CnMassDeleteDialog } from './CnMassDeleteDialog.vue'
@@ -1 +1 @@
1
- export { default as CnMassExportDialog } from './CnMassExportDialog.vue'
1
+ export { default as CnMassExportDialog } from './CnMassExportDialog.vue'
@@ -1 +1 @@
1
- export { default as CnMassImportDialog } from './CnMassImportDialog.vue'
1
+ export { default as CnMassImportDialog } from './CnMassImportDialog.vue'
@@ -0,0 +1,149 @@
1
+ <!--
2
+ This code was taken from nextcloud-vue due to certain changes being required but unable to be done as a patch.
3
+
4
+ https://github.com/nextcloud-libraries/nextcloud-vue/blob/main/src/components/NcNoteCard/NcNoteCard.vue
5
+ -->
6
+ <template>
7
+ <div
8
+ class="notecard"
9
+ :class="{
10
+ [`notecard--${type}`]: type,
11
+ }"
12
+ :role="shouldShowAlert ? 'alert' : 'note'">
13
+ <slot name="icon">
14
+ <NcIconSvgWrapper
15
+ :path="iconPath"
16
+ class="notecard__icon"
17
+ :class="{ 'notecard__icon--heading': heading }"
18
+ inline />
19
+ </slot>
20
+ <div>
21
+ <p v-if="heading" class="notecard__heading">
22
+ {{ heading }}
23
+ </p>
24
+ <slot>
25
+ <p class="notecard__text">
26
+ {{ text }}
27
+ </p>
28
+ </slot>
29
+ </div>
30
+ </div>
31
+ </template>
32
+
33
+ <script>
34
+ import { NcIconSvgWrapper } from '@nextcloud/vue'
35
+
36
+ // hardcoded @mdi/js icons to avoid unnececary package and bundlesize
37
+ // we are only doing this to patch NcNoteCard anyway
38
+ const mdiAlert = 'M13 14H11V9H13M13 18H11V16H13M1 21H23L12 2L1 21Z'
39
+ const mdiAlertDecagram = 'M23,12L20.56,9.22L20.9,5.54L17.29,4.72L15.4,1.54L12,3L8.6,1.54L6.71,4.72L3.1,5.53L3.44,9.21L1,12L3.44,14.78L3.1,18.47L6.71,19.29L8.6,22.47L12,21L15.4,22.46L17.29,19.28L20.9,18.46L20.56,14.78L23,12M13,17H11V15H13V17M13,13H11V7H13V13Z'
40
+ const mdiCheckboxMarkedCircle = 'M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z'
41
+ const mdiInformation = 'M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 12,2Z'
42
+
43
+ export default {
44
+ name: 'CnNoteCard',
45
+ components: {
46
+ NcIconSvgWrapper,
47
+ },
48
+ props: {
49
+ /** Optional text to show as a heading of the note card */
50
+ heading: {
51
+ type: String,
52
+ default: undefined,
53
+ },
54
+ /**
55
+ * Enforce the `alert` role on the note card.
56
+ *
57
+ * The alert role should only be used for information that requires the user's immediate attention.
58
+ *
59
+ * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/alert_role
60
+ */
61
+ showAlert: {
62
+ type: Boolean,
63
+ default: undefined,
64
+ },
65
+ /** The message text of the note card */
66
+ text: {
67
+ type: String,
68
+ default: undefined,
69
+ },
70
+ /** Type or severity of the message */
71
+ type: {
72
+ type: String,
73
+ default: 'warning',
74
+ validator: (value) =>
75
+ ['success', 'info', 'warning', 'error'].includes(value),
76
+ },
77
+ },
78
+ computed: {
79
+ shouldShowAlert() {
80
+ return this.showAlert || this.type === 'error'
81
+ },
82
+ iconPath() {
83
+ switch (this.type) {
84
+ case 'error':
85
+ return mdiAlertDecagram
86
+ case 'success':
87
+ return mdiCheckboxMarkedCircle
88
+ case 'info':
89
+ return mdiInformation
90
+ case 'warning':
91
+ default:
92
+ return mdiAlert
93
+ }
94
+ },
95
+ },
96
+ }
97
+ </script>
98
+
99
+ <!-- we do not have support for scss so this has been translated to css -->
100
+ <!-- @TODO add scss support -->
101
+ <style scoped>
102
+ .notecard {
103
+ --note-card-icon-size: 20px;
104
+ --note-card-padding: calc(2 * var(--default-grid-baseline));
105
+ color: var(--color-main-text) !important;
106
+ background-color: var(--note-background) !important;
107
+ border-inline-start: var(--default-grid-baseline) solid var(--note-theme);
108
+ border-radius: var(--border-radius-small);
109
+ margin: 1rem 0;
110
+ padding: var(--note-card-padding);
111
+ display: flex;
112
+ flex-direction: row;
113
+ gap: var(--note-card-padding);
114
+ }
115
+
116
+ .notecard__heading {
117
+ font-size: var(--note-card-icon-size); /* Same as icon */
118
+ font-weight: 600;
119
+ }
120
+
121
+ .notecard__icon {
122
+ color: var(--note-theme);
123
+ }
124
+ .notecard__icon--heading {
125
+ font-size: var(--note-card-icon-size);
126
+ /* Ensure icon is on the same height as the heading */
127
+ margin-block: calc((1lh - 1em) / 2) auto;
128
+ }
129
+
130
+ .notecard--success {
131
+ --note-background: var(--color-success);
132
+ --note-theme: var(--color-success-text);
133
+ }
134
+
135
+ .notecard--info {
136
+ --note-background: var(--color-info);
137
+ --note-theme: var(--color-info-text);
138
+ }
139
+
140
+ .notecard--error {
141
+ --note-background: var(--color-error);
142
+ --note-theme: var(--color-error-text);
143
+ }
144
+
145
+ .notecard--warning {
146
+ --note-background: var(--color-warning);
147
+ --note-theme: var(--color-warning-text);
148
+ }
149
+ </style>
@@ -0,0 +1 @@
1
+ export { default as CnNoteCard } from './CnNoteCard.vue'