@conduction/nextcloud-vue 0.1.0-beta.1
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.
- package/dist/nextcloud-vue.cjs.js +10710 -0
- package/dist/nextcloud-vue.cjs.js.map +1 -0
- package/dist/nextcloud-vue.css +803 -0
- package/dist/nextcloud-vue.esm.js +10665 -0
- package/dist/nextcloud-vue.esm.js.map +1 -0
- package/package.json +63 -0
- package/src/components/CnCardGrid/CnCardGrid.vue +152 -0
- package/src/components/CnCardGrid/index.js +1 -0
- package/src/components/CnCellRenderer/CnCellRenderer.vue +132 -0
- package/src/components/CnCellRenderer/index.js +1 -0
- package/src/components/CnConfigurationCard/CnConfigurationCard.vue +77 -0
- package/src/components/CnConfigurationCard/index.js +1 -0
- package/src/components/CnDataTable/CnDataTable.vue +354 -0
- package/src/components/CnDataTable/index.js +1 -0
- package/src/components/CnDetailViewLayout/CnDetailViewLayout.vue +88 -0
- package/src/components/CnDetailViewLayout/index.js +1 -0
- package/src/components/CnEmptyState/CnEmptyState.vue +78 -0
- package/src/components/CnEmptyState/index.js +1 -0
- package/src/components/CnFacetSidebar/CnFacetSidebar.vue +223 -0
- package/src/components/CnFacetSidebar/index.js +1 -0
- package/src/components/CnFilterBar/CnFilterBar.vue +152 -0
- package/src/components/CnFilterBar/index.js +1 -0
- package/src/components/CnIndexPage/CnIndexPage.vue +682 -0
- package/src/components/CnIndexPage/index.js +1 -0
- package/src/components/CnKpiGrid/CnKpiGrid.vue +89 -0
- package/src/components/CnKpiGrid/index.js +1 -0
- package/src/components/CnListViewLayout/CnListViewLayout.vue +80 -0
- package/src/components/CnListViewLayout/index.js +1 -0
- package/src/components/CnMassActionBar/CnMassActionBar.vue +160 -0
- package/src/components/CnMassActionBar/index.js +1 -0
- package/src/components/CnMassCopyDialog/CnMassCopyDialog.vue +320 -0
- package/src/components/CnMassCopyDialog/index.js +1 -0
- package/src/components/CnMassDeleteDialog/CnMassDeleteDialog.vue +238 -0
- package/src/components/CnMassDeleteDialog/index.js +1 -0
- package/src/components/CnMassExportDialog/CnMassExportDialog.vue +190 -0
- package/src/components/CnMassExportDialog/index.js +1 -0
- package/src/components/CnMassImportDialog/CnMassImportDialog.vue +491 -0
- package/src/components/CnMassImportDialog/index.js +1 -0
- package/src/components/CnObjectCard/CnObjectCard.vue +292 -0
- package/src/components/CnObjectCard/index.js +1 -0
- package/src/components/CnPagination/CnPagination.vue +252 -0
- package/src/components/CnPagination/index.js +1 -0
- package/src/components/CnRowActions/CnRowActions.vue +73 -0
- package/src/components/CnRowActions/index.js +1 -0
- package/src/components/CnSettingsCard/CnSettingsCard.vue +92 -0
- package/src/components/CnSettingsCard/index.js +1 -0
- package/src/components/CnSettingsSection/CnSettingsSection.vue +266 -0
- package/src/components/CnSettingsSection/index.js +1 -0
- package/src/components/CnStatsBlock/CnStatsBlock.vue +366 -0
- package/src/components/CnStatsBlock/index.js +1 -0
- package/src/components/CnStatusBadge/CnStatusBadge.vue +77 -0
- package/src/components/CnStatusBadge/index.js +1 -0
- package/src/components/CnVersionInfoCard/CnVersionInfoCard.vue +312 -0
- package/src/components/CnVersionInfoCard/index.js +1 -0
- package/src/components/CnViewModeToggle/CnViewModeToggle.vue +77 -0
- package/src/components/CnViewModeToggle/index.js +1 -0
- package/src/components/index.js +25 -0
- package/src/composables/index.js +3 -0
- package/src/composables/useDetailView.js +132 -0
- package/src/composables/useListView.js +153 -0
- package/src/composables/useSubResource.js +142 -0
- package/src/css/badge.css +51 -0
- package/src/css/card.css +128 -0
- package/src/css/detail.css +68 -0
- package/src/css/index.css +8 -0
- package/src/css/layout.css +90 -0
- package/src/css/pagination.css +72 -0
- package/src/css/table.css +143 -0
- package/src/css/utilities.css +46 -0
- package/src/index.js +50 -0
- package/src/store/createSubResourcePlugin.js +135 -0
- package/src/store/index.js +3 -0
- package/src/store/plugins/auditTrails.js +17 -0
- package/src/store/plugins/files.js +186 -0
- package/src/store/plugins/index.js +4 -0
- package/src/store/plugins/lifecycle.js +180 -0
- package/src/store/plugins/relations.js +68 -0
- package/src/store/useObjectStore.js +625 -0
- package/src/types/auditTrail.d.ts +32 -0
- package/src/types/file.d.ts +23 -0
- package/src/types/index.d.ts +35 -0
- package/src/types/notification.d.ts +36 -0
- package/src/types/object.d.ts +40 -0
- package/src/types/organisation.d.ts +41 -0
- package/src/types/register.d.ts +25 -0
- package/src/types/schema.d.ts +39 -0
- package/src/types/shared.d.ts +79 -0
- package/src/types/source.d.ts +14 -0
- package/src/types/task.d.ts +31 -0
- package/src/utils/errors.js +96 -0
- package/src/utils/headers.js +44 -0
- package/src/utils/index.js +3 -0
- package/src/utils/schema.js +287 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { ref, reactive } from 'vue'
|
|
2
|
+
import { buildHeaders, buildQueryString } from '../utils/headers.js'
|
|
3
|
+
import { parseResponseError, networkError } from '../utils/errors.js'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Standalone composable for fetching sub-resources outside the Pinia store.
|
|
7
|
+
*
|
|
8
|
+
* Use this for app-specific sub-resources that don't follow the standard
|
|
9
|
+
* OpenRegister pattern or don't need shared state (e.g. CalDAV tasks,
|
|
10
|
+
* ICommentsManager notes). State is scoped to the component lifecycle.
|
|
11
|
+
*
|
|
12
|
+
* For sub-resources that need shared state across components, use store
|
|
13
|
+
* plugins (filesPlugin, auditTrailsPlugin, etc.) instead.
|
|
14
|
+
*
|
|
15
|
+
* @param {object} store The object store instance (must have objectTypeRegistry and _options)
|
|
16
|
+
* @param {string} endpoint URL path segment appended to the object URL (e.g. 'tasks')
|
|
17
|
+
* @param {object} [options={}] Composable options
|
|
18
|
+
* @param {Function} [options.transform] Transform function applied to each result item
|
|
19
|
+
* @param {number} [options.limit=20] Default page size
|
|
20
|
+
* @return {object} Reactive state and methods
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* // Basic usage
|
|
24
|
+
* const tasks = useSubResource(store, 'tasks')
|
|
25
|
+
* await tasks.fetch('case', caseId)
|
|
26
|
+
* console.log(tasks.data.results)
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* // With transform function (e.g. CalDAV task normalization)
|
|
30
|
+
* const tasks = useSubResource(store, 'tasks', {
|
|
31
|
+
* transform: (task) => ({
|
|
32
|
+
* id: task.uid || task.id,
|
|
33
|
+
* title: task.summary,
|
|
34
|
+
* deadline: task.due,
|
|
35
|
+
* status: task.status,
|
|
36
|
+
* }),
|
|
37
|
+
* })
|
|
38
|
+
*/
|
|
39
|
+
export function useSubResource(store, endpoint, options = {}) {
|
|
40
|
+
const limit = options.limit || 20
|
|
41
|
+
const transform = options.transform || null
|
|
42
|
+
|
|
43
|
+
const data = reactive({
|
|
44
|
+
results: [],
|
|
45
|
+
total: 0,
|
|
46
|
+
page: 1,
|
|
47
|
+
pages: 0,
|
|
48
|
+
limit,
|
|
49
|
+
offset: 0,
|
|
50
|
+
})
|
|
51
|
+
const loading = ref(false)
|
|
52
|
+
const error = ref(null)
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Build the sub-resource URL for a given object type and ID.
|
|
56
|
+
*
|
|
57
|
+
* @param {string} type The registered object type slug
|
|
58
|
+
* @param {string} objectId The parent object ID
|
|
59
|
+
* @return {string} Full URL path
|
|
60
|
+
*/
|
|
61
|
+
function buildUrl(type, objectId) {
|
|
62
|
+
const config = store.objectTypeRegistry[type]
|
|
63
|
+
if (!config) {
|
|
64
|
+
throw new Error(`Object type "${type}" is not registered in the store.`)
|
|
65
|
+
}
|
|
66
|
+
return `${store._options.baseUrl}/${config.register}/${config.schema}/${objectId}/${endpoint}`
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Fetch the sub-resource collection for an object.
|
|
71
|
+
*
|
|
72
|
+
* @param {string} type The registered object type slug
|
|
73
|
+
* @param {string} objectId The parent object ID
|
|
74
|
+
* @param {object} [params={}] Query parameters (_search, _limit, _page)
|
|
75
|
+
* @return {Promise<Array>} The fetched results
|
|
76
|
+
*/
|
|
77
|
+
async function fetchData(type, objectId, params = {}) {
|
|
78
|
+
loading.value = true
|
|
79
|
+
error.value = null
|
|
80
|
+
|
|
81
|
+
try {
|
|
82
|
+
const url = buildUrl(type, objectId) + buildQueryString(params)
|
|
83
|
+
|
|
84
|
+
const response = await fetch(url, {
|
|
85
|
+
method: 'GET',
|
|
86
|
+
headers: buildHeaders(),
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
if (!response.ok) {
|
|
90
|
+
error.value = await parseResponseError(response, endpoint)
|
|
91
|
+
console.error(`Error fetching ${endpoint} for ${type}/${objectId}:`, error.value)
|
|
92
|
+
return []
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const responseData = await response.json()
|
|
96
|
+
let results = responseData.results || responseData
|
|
97
|
+
|
|
98
|
+
if (Array.isArray(results) && transform) {
|
|
99
|
+
results = results.map(transform)
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
data.results = results
|
|
103
|
+
data.total = responseData.total || results.length
|
|
104
|
+
data.page = responseData.page || 1
|
|
105
|
+
data.pages = responseData.pages || 0
|
|
106
|
+
data.limit = params._limit || limit
|
|
107
|
+
data.offset = responseData.offset || 0
|
|
108
|
+
|
|
109
|
+
return data.results
|
|
110
|
+
} catch (err) {
|
|
111
|
+
error.value = err.name === 'TypeError'
|
|
112
|
+
? networkError(err)
|
|
113
|
+
: { status: null, message: err.message, details: null, isValidation: false, fields: null, toString() { return this.message } }
|
|
114
|
+
console.error(`Error fetching ${endpoint} for ${type}/${objectId}:`, err)
|
|
115
|
+
return []
|
|
116
|
+
} finally {
|
|
117
|
+
loading.value = false
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Clear all state back to defaults.
|
|
123
|
+
*/
|
|
124
|
+
function clear() {
|
|
125
|
+
data.results = []
|
|
126
|
+
data.total = 0
|
|
127
|
+
data.page = 1
|
|
128
|
+
data.pages = 0
|
|
129
|
+
data.limit = limit
|
|
130
|
+
data.offset = 0
|
|
131
|
+
loading.value = false
|
|
132
|
+
error.value = null
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return {
|
|
136
|
+
data,
|
|
137
|
+
loading,
|
|
138
|
+
error,
|
|
139
|
+
fetch: fetchData,
|
|
140
|
+
clear,
|
|
141
|
+
}
|
|
142
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* ========================================
|
|
2
|
+
@conduction/nextcloud-vue — Status Badge
|
|
3
|
+
======================================== */
|
|
4
|
+
|
|
5
|
+
.cn-status-badge {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
padding: 2px 10px;
|
|
9
|
+
border-radius: var(--border-radius-pill);
|
|
10
|
+
font-size: 0.85em;
|
|
11
|
+
font-weight: 500;
|
|
12
|
+
line-height: 1.4;
|
|
13
|
+
white-space: nowrap;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Size variants */
|
|
17
|
+
.cn-status-badge--small {
|
|
18
|
+
padding: 1px 8px;
|
|
19
|
+
font-size: 0.75em;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Color variants */
|
|
23
|
+
.cn-status-badge--default {
|
|
24
|
+
background-color: var(--color-background-dark);
|
|
25
|
+
color: var(--color-main-text);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.cn-status-badge--primary {
|
|
29
|
+
background-color: var(--nldesign-color-primary-light, var(--color-primary-element-light));
|
|
30
|
+
color: var(--nldesign-color-primary, var(--color-primary-element));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.cn-status-badge--success {
|
|
34
|
+
background-color: var(--color-success-light, rgba(70, 186, 97, 0.15));
|
|
35
|
+
color: var(--color-success);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.cn-status-badge--warning {
|
|
39
|
+
background-color: var(--color-warning-light, rgba(232, 163, 39, 0.15));
|
|
40
|
+
color: var(--color-warning-text, var(--color-warning));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.cn-status-badge--error {
|
|
44
|
+
background-color: var(--color-error-light, rgba(224, 68, 68, 0.15));
|
|
45
|
+
color: var(--color-error);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.cn-status-badge--info {
|
|
49
|
+
background-color: var(--color-info-light, rgba(0, 130, 201, 0.15));
|
|
50
|
+
color: var(--color-info, #0082c9);
|
|
51
|
+
}
|
package/src/css/card.css
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/* ========================================
|
|
2
|
+
@conduction/nextcloud-vue — Card Styles
|
|
3
|
+
======================================== */
|
|
4
|
+
|
|
5
|
+
/* Card Grid */
|
|
6
|
+
.cn-card-grid {
|
|
7
|
+
display: grid;
|
|
8
|
+
gap: 1.5rem;
|
|
9
|
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* Base Card */
|
|
13
|
+
.cn-card {
|
|
14
|
+
background: var(--color-main-background);
|
|
15
|
+
border-radius: 8px;
|
|
16
|
+
padding: 20px;
|
|
17
|
+
box-shadow: 0 2px 8px var(--color-box-shadow);
|
|
18
|
+
min-height: 200px;
|
|
19
|
+
transition: transform 0.2s ease-in-out;
|
|
20
|
+
border: 1px solid var(--color-border);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.cn-card:hover {
|
|
24
|
+
transform: scale(1.01);
|
|
25
|
+
box-shadow: 0 4px 12px var(--color-box-shadow);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Card Header */
|
|
29
|
+
.cn-card-header {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: space-between;
|
|
33
|
+
gap: 8px;
|
|
34
|
+
margin-bottom: 12px;
|
|
35
|
+
padding-bottom: 8px;
|
|
36
|
+
border-bottom: 1px solid var(--color-border);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.cn-card-header h2,
|
|
40
|
+
.cn-card-header h3 {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: 8px;
|
|
44
|
+
margin: 0;
|
|
45
|
+
color: var(--color-main-text);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.cn-card-header h2 { font-size: 1.2em; }
|
|
49
|
+
.cn-card-header h3 { font-size: 1.1em; }
|
|
50
|
+
|
|
51
|
+
/* Settings Card */
|
|
52
|
+
.cn-settings-card {
|
|
53
|
+
background: var(--color-background-hover);
|
|
54
|
+
border-radius: var(--border-radius-large);
|
|
55
|
+
padding: 20px;
|
|
56
|
+
margin-bottom: 20px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.cn-settings-card h4 {
|
|
60
|
+
margin: 0 0 16px 0;
|
|
61
|
+
color: var(--color-main-text);
|
|
62
|
+
font-size: 16px;
|
|
63
|
+
font-weight: 600;
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
gap: 8px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.cn-settings-card--collapsible h4 {
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
user-select: none;
|
|
72
|
+
display: flex;
|
|
73
|
+
justify-content: space-between;
|
|
74
|
+
align-items: center;
|
|
75
|
+
transition: color 0.2s ease;
|
|
76
|
+
margin-bottom: 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.cn-settings-card--collapsible h4:hover {
|
|
80
|
+
color: var(--color-primary-element);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.cn-settings-card__chevron {
|
|
84
|
+
transition: transform 0.3s ease;
|
|
85
|
+
color: var(--color-text-maxcontrast);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.cn-settings-card--collapsible h4:hover .cn-settings-card__chevron {
|
|
89
|
+
color: var(--color-primary-element);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.cn-settings-card__content {
|
|
93
|
+
padding-top: 16px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Stat Grid */
|
|
97
|
+
.cn-stat-grid {
|
|
98
|
+
display: grid;
|
|
99
|
+
grid-template-columns: repeat(2, 1fr);
|
|
100
|
+
gap: 12px;
|
|
101
|
+
margin-bottom: 16px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.cn-stat-item {
|
|
105
|
+
display: flex;
|
|
106
|
+
flex-direction: column;
|
|
107
|
+
gap: 4px;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.cn-stat-label {
|
|
111
|
+
color: var(--color-text-maxcontrast);
|
|
112
|
+
font-size: 0.9em;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.cn-stat-value {
|
|
116
|
+
font-size: 1.1em;
|
|
117
|
+
font-weight: 600;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Backwards compatibility aliases */
|
|
121
|
+
.cardGrid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
|
|
122
|
+
.card { background: var(--color-main-background); border-radius: 8px; padding: 20px; box-shadow: 0 2px 8px var(--color-box-shadow); min-height: 200px; transition: transform 0.2s ease-in-out; border: 1px solid var(--color-border); }
|
|
123
|
+
.card:hover { transform: scale(1.01); box-shadow: 0 4px 12px var(--color-box-shadow); }
|
|
124
|
+
.cardHeader { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--color-border); }
|
|
125
|
+
.statGrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
|
|
126
|
+
.statItem { display: flex; flex-direction: column; gap: 4px; }
|
|
127
|
+
.statLabel { color: var(--color-text-maxcontrast); font-size: 0.9em; }
|
|
128
|
+
.statValue { font-size: 1.1em; font-weight: 600; }
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/* ========================================
|
|
2
|
+
@conduction/nextcloud-vue — Detail Styles
|
|
3
|
+
======================================== */
|
|
4
|
+
|
|
5
|
+
/* Detail Grid (metadata display) */
|
|
6
|
+
.cn-detail-grid {
|
|
7
|
+
display: grid;
|
|
8
|
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
9
|
+
gap: 16px;
|
|
10
|
+
margin-bottom: 20px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.cn-detail-item {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: 4px;
|
|
17
|
+
padding: 8px 12px;
|
|
18
|
+
border-left: 3px solid var(--color-primary-element);
|
|
19
|
+
background: var(--color-background-hover);
|
|
20
|
+
border-radius: 0 var(--border-radius) var(--border-radius) 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.cn-detail-item__label {
|
|
24
|
+
font-size: 0.85em;
|
|
25
|
+
color: var(--color-text-maxcontrast);
|
|
26
|
+
font-weight: 500;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.cn-detail-item__value {
|
|
30
|
+
font-size: 1em;
|
|
31
|
+
color: var(--color-main-text);
|
|
32
|
+
word-break: break-word;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* Detail Layout */
|
|
36
|
+
.cn-detail-layout {
|
|
37
|
+
max-width: 1000px;
|
|
38
|
+
padding: 20px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.cn-detail-layout__header {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
gap: 12px;
|
|
45
|
+
margin-bottom: 24px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.cn-detail-layout__title {
|
|
49
|
+
flex: 1;
|
|
50
|
+
margin: 0;
|
|
51
|
+
font-size: 1.5em;
|
|
52
|
+
color: var(--color-main-text);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.cn-detail-layout__actions {
|
|
56
|
+
display: flex;
|
|
57
|
+
gap: 8px;
|
|
58
|
+
flex-shrink: 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.cn-detail-layout__content {
|
|
62
|
+
margin-top: 16px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Backwards compatibility aliases */
|
|
66
|
+
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-bottom: 20px; }
|
|
67
|
+
.detail-item { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; border-left: 3px solid var(--color-primary-element); background: var(--color-background-hover); border-radius: 0 var(--border-radius) var(--border-radius) 0; }
|
|
68
|
+
.detailContainer { margin-block-start: 20px; margin-inline-start: 20px; margin-inline-end: 20px; }
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/* ========================================
|
|
2
|
+
@conduction/nextcloud-vue — Layout Styles
|
|
3
|
+
======================================== */
|
|
4
|
+
|
|
5
|
+
/* List View Layout */
|
|
6
|
+
.cn-list-layout {
|
|
7
|
+
padding: 20px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.cn-list-layout__header {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: space-between;
|
|
14
|
+
margin-bottom: 16px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.cn-list-layout__title {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: baseline;
|
|
20
|
+
gap: 8px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.cn-list-layout__title h2 {
|
|
24
|
+
margin: 0;
|
|
25
|
+
font-size: 1.4em;
|
|
26
|
+
color: var(--color-main-text);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.cn-list-layout__title .cn-list-layout__count {
|
|
30
|
+
font-size: 0.85em;
|
|
31
|
+
color: var(--color-text-maxcontrast);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.cn-list-layout__actions {
|
|
35
|
+
display: flex;
|
|
36
|
+
gap: 8px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Filter Bar */
|
|
40
|
+
.cn-filter-bar {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: 12px;
|
|
44
|
+
margin-bottom: 16px;
|
|
45
|
+
flex-wrap: wrap;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.cn-filter-bar__search {
|
|
49
|
+
flex: 1;
|
|
50
|
+
min-width: 200px;
|
|
51
|
+
max-width: 400px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.cn-filter-bar__filters {
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
gap: 8px;
|
|
58
|
+
flex-wrap: wrap;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.cn-filter-bar__filter {
|
|
62
|
+
min-width: 150px;
|
|
63
|
+
max-width: 200px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.cn-filter-bar__clear {
|
|
67
|
+
margin-left: auto;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Dashboard Content */
|
|
71
|
+
.cn-dashboard-content {
|
|
72
|
+
margin-inline: auto;
|
|
73
|
+
max-width: 1200px;
|
|
74
|
+
padding-block: 20px;
|
|
75
|
+
padding-inline: 20px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* Loading Container */
|
|
79
|
+
.cn-loading-container {
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
gap: 10px;
|
|
83
|
+
color: var(--color-text-maxcontrast);
|
|
84
|
+
justify-content: center;
|
|
85
|
+
padding-block: 40px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* Backwards compatibility aliases */
|
|
89
|
+
.dashboardContent { margin-inline: auto; max-width: 1200px; padding-block: 20px; padding-inline: 20px; }
|
|
90
|
+
.loadingContainer { display: flex; align-items: center; gap: 10px; color: var(--color-text-maxcontrast); justify-content: center; padding-block: 40px; }
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/* ========================================
|
|
2
|
+
@conduction/nextcloud-vue — Pagination
|
|
3
|
+
======================================== */
|
|
4
|
+
|
|
5
|
+
.cn-pagination {
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: space-between;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: 15px;
|
|
10
|
+
margin-top: 30px;
|
|
11
|
+
padding: 20px;
|
|
12
|
+
flex-wrap: nowrap;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.cn-pagination__info {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
flex-shrink: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.cn-pagination__page-info {
|
|
22
|
+
color: var(--color-text-maxcontrast);
|
|
23
|
+
font-size: 0.9rem;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.cn-pagination__nav {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
gap: 10px;
|
|
30
|
+
flex-grow: 1;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.cn-pagination__numbers {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
gap: 5px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.cn-pagination__ellipsis {
|
|
41
|
+
padding: 0 5px;
|
|
42
|
+
color: var(--color-text-maxcontrast);
|
|
43
|
+
font-size: 0.9rem;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.cn-pagination__page-size {
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
gap: 10px;
|
|
50
|
+
flex-shrink: 0;
|
|
51
|
+
min-width: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.cn-pagination__page-size label {
|
|
55
|
+
font-size: 0.9rem;
|
|
56
|
+
color: var(--color-text-maxcontrast);
|
|
57
|
+
white-space: nowrap;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.cn-pagination__page-size-select {
|
|
61
|
+
min-width: 100px !important;
|
|
62
|
+
max-width: 120px !important;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Backwards compatibility aliases */
|
|
66
|
+
.viewPagination { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 30px; padding: 20px; flex-wrap: nowrap; }
|
|
67
|
+
.viewPaginationInfo { display: flex; align-items: center; flex-shrink: 0; }
|
|
68
|
+
.viewPageInfo { color: var(--color-text-maxcontrast); font-size: 0.9rem; }
|
|
69
|
+
.viewPaginationNav { display: flex; align-items: center; gap: 10px; flex-grow: 1; justify-content: center; }
|
|
70
|
+
.viewPaginationNumbers { display: flex; align-items: center; gap: 5px; }
|
|
71
|
+
.viewPaginationEllipsis { padding: 0 5px; color: var(--color-text-maxcontrast); font-size: 0.9rem; }
|
|
72
|
+
.viewPaginationPageSize { display: flex; align-items: center; gap: 10px; flex-shrink: 0; min-width: 0; }
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/* ========================================
|
|
2
|
+
@conduction/nextcloud-vue — Table Styles
|
|
3
|
+
======================================== */
|
|
4
|
+
|
|
5
|
+
/* Table Container */
|
|
6
|
+
.cn-table-container {
|
|
7
|
+
background: var(--nldesign-component-table-background-color, var(--color-main-background));
|
|
8
|
+
border-radius: var(--nldesign-border-radius, var(--border-radius));
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
box-shadow: 0 2px 4px var(--color-box-shadow);
|
|
11
|
+
border: 1px solid var(--nldesign-component-table-border-color, var(--color-border));
|
|
12
|
+
margin-bottom: 20px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.cn-table-container.cn-table-container--scrollable {
|
|
16
|
+
max-height: 400px;
|
|
17
|
+
overflow-y: auto;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Base Table */
|
|
21
|
+
.cn-data-table {
|
|
22
|
+
width: 100%;
|
|
23
|
+
border-collapse: collapse;
|
|
24
|
+
background-color: var(--nldesign-component-table-background-color, var(--color-main-background));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.cn-data-table th,
|
|
28
|
+
.cn-data-table td {
|
|
29
|
+
padding: var(--nldesign-component-table-cell-padding-block, 12px)
|
|
30
|
+
var(--nldesign-component-table-cell-padding-inline, 12px);
|
|
31
|
+
text-align: left;
|
|
32
|
+
border-bottom: 1px solid var(--nldesign-component-table-border-color, var(--color-border));
|
|
33
|
+
vertical-align: middle;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.cn-data-table th {
|
|
37
|
+
background: var(--nldesign-component-table-header-background-color, var(--color-background-dark));
|
|
38
|
+
font-weight: var(--nldesign-component-table-header-font-weight, 500);
|
|
39
|
+
color: var(--color-text-maxcontrast);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.cn-data-table th.cn-table-header--sortable {
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
user-select: none;
|
|
45
|
+
transition: background-color 0.2s ease;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.cn-data-table th.cn-table-header--sortable:hover {
|
|
49
|
+
background-color: var(--color-background-hover);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.cn-table-sort-indicator {
|
|
53
|
+
margin-left: 4px;
|
|
54
|
+
opacity: 0.6;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Row States */
|
|
58
|
+
.cn-table-row {
|
|
59
|
+
border-bottom: 1px solid var(--nldesign-component-table-border-color, var(--color-border));
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
transition: background-color 0.2s ease;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.cn-table-row:hover {
|
|
65
|
+
background: var(--nldesign-component-table-row-hover-background-color, var(--color-background-hover));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.cn-table-row--selected {
|
|
69
|
+
background-color: var(--color-primary-light);
|
|
70
|
+
border-left: 3px solid var(--color-primary);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.cn-table-row--selected:hover {
|
|
74
|
+
background-color: var(--color-primary-light);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Column Types */
|
|
78
|
+
.cn-table-col--checkbox {
|
|
79
|
+
width: 50px;
|
|
80
|
+
text-align: center;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.cn-table-col--actions {
|
|
84
|
+
width: 120px;
|
|
85
|
+
text-align: center;
|
|
86
|
+
min-width: 120px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.cn-table-col--constrained {
|
|
90
|
+
width: 150px;
|
|
91
|
+
max-width: 150px;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
text-overflow: ellipsis;
|
|
94
|
+
white-space: nowrap;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.cn-table-col--expanded {
|
|
98
|
+
width: auto;
|
|
99
|
+
min-width: 200px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.cn-table-col--title {
|
|
103
|
+
min-width: 120px;
|
|
104
|
+
max-width: 200px;
|
|
105
|
+
word-wrap: break-word;
|
|
106
|
+
overflow: hidden;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* Loading State */
|
|
110
|
+
.cn-table-loading {
|
|
111
|
+
text-align: center;
|
|
112
|
+
padding: 50px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.cn-table-loading p {
|
|
116
|
+
margin-top: 20px;
|
|
117
|
+
color: var(--color-text-maxcontrast);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Empty State (inside table) */
|
|
121
|
+
.cn-table-empty td {
|
|
122
|
+
text-align: center;
|
|
123
|
+
padding: 48px 24px;
|
|
124
|
+
color: var(--color-text-maxcontrast);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* ========================================
|
|
128
|
+
Backwards compatibility aliases
|
|
129
|
+
(legacy OpenRegister CSS class names)
|
|
130
|
+
======================================== */
|
|
131
|
+
.viewTableContainer { background: var(--nldesign-component-table-background-color, var(--color-main-background)); border-radius: var(--nldesign-border-radius, var(--border-radius)); overflow: hidden; box-shadow: 0 2px 4px var(--color-box-shadow); border: 1px solid var(--nldesign-component-table-border-color, var(--color-border)); margin-bottom: 20px; }
|
|
132
|
+
.viewTableContainer.scrollable { max-height: 400px; overflow-y: auto; }
|
|
133
|
+
.viewTable { width: 100%; border-collapse: collapse; background-color: var(--nldesign-component-table-background-color, var(--color-main-background)); }
|
|
134
|
+
.viewTable th, .viewTable td { padding: 12px; text-align: left; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
|
|
135
|
+
.viewTable th { background: var(--color-background-hover); font-weight: 500; color: var(--color-text-maxcontrast); background-color: var(--color-background-dark); }
|
|
136
|
+
.viewTableRow { border-bottom: 1px solid var(--color-border); cursor: pointer; transition: background-color 0.2s ease; }
|
|
137
|
+
.viewTableRow:hover { background: var(--color-background-hover); }
|
|
138
|
+
.viewTableRow.active, .viewTableRowSelected { background: var(--color-primary-light); }
|
|
139
|
+
.tableColumnCheckbox { width: 50px; text-align: center; }
|
|
140
|
+
.tableColumnActions { width: 120px; text-align: center; min-width: 120px; }
|
|
141
|
+
.tableColumnConstrained { width: 150px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
142
|
+
.tableColumnExpanded { width: auto; min-width: 200px; }
|
|
143
|
+
.tableColumnTitle { min-width: 120px; max-width: 200px; word-wrap: break-word; overflow: hidden; }
|