@conduction/nextcloud-vue 0.1.0-beta.1 → 0.1.0-beta.2
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/README.md +226 -0
- package/dist/nextcloud-vue.cjs.js +7039 -2409
- package/dist/nextcloud-vue.cjs.js.map +1 -1
- package/dist/nextcloud-vue.css +237 -52
- package/dist/nextcloud-vue.esm.js +7012 -2386
- package/dist/nextcloud-vue.esm.js.map +1 -1
- package/package.json +2 -4
- package/src/components/CnActionsBar/CnActionsBar.vue +225 -0
- package/src/components/CnActionsBar/index.js +1 -0
- package/src/components/CnCopyDialog/CnCopyDialog.vue +250 -0
- package/src/components/CnCopyDialog/index.js +1 -0
- package/src/components/CnDataTable/CnDataTable.vue +0 -5
- package/src/components/CnDeleteDialog/CnDeleteDialog.vue +170 -0
- package/src/components/CnDeleteDialog/index.js +1 -0
- package/src/components/CnFormDialog/CnFormDialog.vue +629 -0
- package/src/components/CnFormDialog/index.js +1 -0
- package/src/components/CnIcon/CnIcon.vue +89 -0
- package/src/components/CnIcon/index.js +1 -0
- package/src/components/CnIndexPage/CnIndexPage.vue +434 -300
- package/src/components/CnIndexSidebar/CnIndexSidebar.vue +484 -0
- package/src/components/CnIndexSidebar/index.js +1 -0
- package/src/components/CnPageHeader/CnPageHeader.vue +57 -0
- package/src/components/CnPageHeader/index.js +1 -0
- package/src/components/CnRegisterMapping/CnRegisterMapping.vue +792 -0
- package/src/components/CnRegisterMapping/index.js +1 -0
- package/src/components/index.js +8 -4
- package/src/constants/metadata.js +30 -0
- package/src/css/actions-bar.css +48 -0
- package/src/css/badge.css +4 -4
- package/src/css/card.css +23 -23
- package/src/css/detail.css +13 -13
- package/src/css/index-page.css +32 -0
- package/src/css/index-sidebar.css +187 -0
- package/src/css/index.css +4 -0
- package/src/css/layout.css +14 -14
- package/src/css/page-header.css +33 -0
- package/src/css/pagination.css +12 -12
- package/src/css/table.css +21 -22
- package/src/css/utilities.css +2 -2
- package/src/index.js +11 -8
- package/src/store/plugins/index.js +1 -0
- package/src/store/plugins/registerMapping.js +185 -0
- package/src/store/useObjectStore.js +122 -61
- package/src/utils/headers.js +7 -1
- package/src/utils/index.js +1 -1
- package/src/utils/schema.js +133 -1
- package/src/components/CnDetailViewLayout/CnDetailViewLayout.vue +0 -88
- package/src/components/CnDetailViewLayout/index.js +0 -1
- package/src/components/CnEmptyState/CnEmptyState.vue +0 -78
- package/src/components/CnEmptyState/index.js +0 -1
- package/src/components/CnListViewLayout/CnListViewLayout.vue +0 -80
- package/src/components/CnListViewLayout/index.js +0 -1
- package/src/components/CnViewModeToggle/CnViewModeToggle.vue +0 -77
- package/src/components/CnViewModeToggle/index.js +0 -1
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<NcEmptyContent :name="title" :description="description">
|
|
3
|
-
<template #icon>
|
|
4
|
-
<slot name="icon">
|
|
5
|
-
<component :is="icon" v-if="icon" :size="64" />
|
|
6
|
-
</slot>
|
|
7
|
-
</template>
|
|
8
|
-
<template v-if="actionLabel" #action>
|
|
9
|
-
<slot name="action">
|
|
10
|
-
<NcButton :type="actionType" @click="$emit('action')">
|
|
11
|
-
{{ actionLabel }}
|
|
12
|
-
</NcButton>
|
|
13
|
-
</slot>
|
|
14
|
-
</template>
|
|
15
|
-
</NcEmptyContent>
|
|
16
|
-
</template>
|
|
17
|
-
|
|
18
|
-
<script>
|
|
19
|
-
import { NcEmptyContent, NcButton } from '@nextcloud/vue'
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* CnEmptyState — Consistent empty state display wrapping NcEmptyContent.
|
|
23
|
-
*
|
|
24
|
-
* Provides a unified empty state pattern with icon, title, description,
|
|
25
|
-
* and optional action button. Used across all list views.
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* <CnEmptyState
|
|
29
|
-
* title="No clients yet"
|
|
30
|
-
* description="Create your first client to get started"
|
|
31
|
-
* action-label="New Client"
|
|
32
|
-
* @action="createClient" />
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* <!-- With custom icon -->
|
|
36
|
-
* <CnEmptyState title="No results">
|
|
37
|
-
* <template #icon>
|
|
38
|
-
* <Magnify :size="64" />
|
|
39
|
-
* </template>
|
|
40
|
-
* </CnEmptyState>
|
|
41
|
-
*/
|
|
42
|
-
export default {
|
|
43
|
-
name: 'CnEmptyState',
|
|
44
|
-
|
|
45
|
-
components: {
|
|
46
|
-
NcEmptyContent,
|
|
47
|
-
NcButton,
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
props: {
|
|
51
|
-
/** Main title text */
|
|
52
|
-
title: {
|
|
53
|
-
type: String,
|
|
54
|
-
required: true,
|
|
55
|
-
},
|
|
56
|
-
/** Description text below the title */
|
|
57
|
-
description: {
|
|
58
|
-
type: String,
|
|
59
|
-
default: '',
|
|
60
|
-
},
|
|
61
|
-
/** Vue component for the icon (e.g., imported material design icon) */
|
|
62
|
-
icon: {
|
|
63
|
-
type: [Object, null],
|
|
64
|
-
default: null,
|
|
65
|
-
},
|
|
66
|
-
/** Action button label. If empty, no button is shown. */
|
|
67
|
-
actionLabel: {
|
|
68
|
-
type: String,
|
|
69
|
-
default: '',
|
|
70
|
-
},
|
|
71
|
-
/** NcButton type for the action button */
|
|
72
|
-
actionType: {
|
|
73
|
-
type: String,
|
|
74
|
-
default: 'primary',
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
}
|
|
78
|
-
</script>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as CnEmptyState } from './CnEmptyState.vue'
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="cn-list-layout">
|
|
3
|
-
<!-- Header -->
|
|
4
|
-
<div class="cn-list-layout__header">
|
|
5
|
-
<div class="cn-list-layout__title">
|
|
6
|
-
<h2>{{ title }}</h2>
|
|
7
|
-
<span v-if="totalItems > 0" class="cn-list-layout__count">({{ totalItems }})</span>
|
|
8
|
-
</div>
|
|
9
|
-
<div class="cn-list-layout__actions">
|
|
10
|
-
<slot name="actions" />
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
13
|
-
|
|
14
|
-
<!-- Filters slot -->
|
|
15
|
-
<slot name="filters" />
|
|
16
|
-
|
|
17
|
-
<!-- Loading state -->
|
|
18
|
-
<div v-if="loading" class="cn-loading-container">
|
|
19
|
-
<NcLoadingIcon :size="32" />
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
|
-
<!-- Main content (table area) -->
|
|
23
|
-
<template v-else>
|
|
24
|
-
<slot />
|
|
25
|
-
</template>
|
|
26
|
-
|
|
27
|
-
<!-- Pagination slot -->
|
|
28
|
-
<slot name="pagination" />
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
|
31
|
-
|
|
32
|
-
<script>
|
|
33
|
-
import { NcLoadingIcon } from '@nextcloud/vue'
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* CnListViewLayout — Full list page layout wrapping header, filters, table, and pagination.
|
|
37
|
-
*
|
|
38
|
-
* Provides the standard page structure used by every list view: a header with
|
|
39
|
-
* title + action buttons, a filter/search area, the main content (table), and pagination.
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* <CnListViewLayout title="Clients" :total-items="clients.length" :loading="isLoading">
|
|
43
|
-
* <template #actions>
|
|
44
|
-
* <NcButton type="primary" @click="createClient">New client</NcButton>
|
|
45
|
-
* </template>
|
|
46
|
-
* <template #filters>
|
|
47
|
-
* <CnFilterBar ... />
|
|
48
|
-
* </template>
|
|
49
|
-
* <CnDataTable :columns="columns" :rows="clients" />
|
|
50
|
-
* <template #pagination>
|
|
51
|
-
* <CnPagination ... />
|
|
52
|
-
* </template>
|
|
53
|
-
* </CnListViewLayout>
|
|
54
|
-
*/
|
|
55
|
-
export default {
|
|
56
|
-
name: 'CnListViewLayout',
|
|
57
|
-
|
|
58
|
-
components: {
|
|
59
|
-
NcLoadingIcon,
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
props: {
|
|
63
|
-
/** Page title */
|
|
64
|
-
title: {
|
|
65
|
-
type: String,
|
|
66
|
-
required: true,
|
|
67
|
-
},
|
|
68
|
-
/** Total items count (shown next to title) */
|
|
69
|
-
totalItems: {
|
|
70
|
-
type: Number,
|
|
71
|
-
default: 0,
|
|
72
|
-
},
|
|
73
|
-
/** Whether data is loading */
|
|
74
|
-
loading: {
|
|
75
|
-
type: Boolean,
|
|
76
|
-
default: false,
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
}
|
|
80
|
-
</script>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as CnListViewLayout } from './CnListViewLayout.vue'
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="cn-view-mode-toggle" role="group" :aria-label="ariaLabel">
|
|
3
|
-
<NcButton
|
|
4
|
-
:type="value === 'cards' ? 'primary' : 'secondary'"
|
|
5
|
-
:aria-pressed="String(value === 'cards')"
|
|
6
|
-
@click="$emit('input', 'cards')">
|
|
7
|
-
<template #icon>
|
|
8
|
-
<ViewGrid :size="20" />
|
|
9
|
-
</template>
|
|
10
|
-
{{ cardsLabel }}
|
|
11
|
-
</NcButton>
|
|
12
|
-
<NcButton
|
|
13
|
-
:type="value === 'table' ? 'primary' : 'secondary'"
|
|
14
|
-
:aria-pressed="String(value === 'table')"
|
|
15
|
-
@click="$emit('input', 'table')">
|
|
16
|
-
<template #icon>
|
|
17
|
-
<ViewList :size="20" />
|
|
18
|
-
</template>
|
|
19
|
-
{{ tableLabel }}
|
|
20
|
-
</NcButton>
|
|
21
|
-
</div>
|
|
22
|
-
</template>
|
|
23
|
-
|
|
24
|
-
<script>
|
|
25
|
-
import { NcButton } from '@nextcloud/vue'
|
|
26
|
-
import ViewGrid from 'vue-material-design-icons/ViewGrid.vue'
|
|
27
|
-
import ViewList from 'vue-material-design-icons/ViewList.vue'
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* CnViewModeToggle — Cards/Table view mode toggle.
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* <CnViewModeToggle v-model="viewMode" />
|
|
34
|
-
*/
|
|
35
|
-
export default {
|
|
36
|
-
name: 'CnViewModeToggle',
|
|
37
|
-
|
|
38
|
-
components: {
|
|
39
|
-
NcButton,
|
|
40
|
-
ViewGrid,
|
|
41
|
-
ViewList,
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
props: {
|
|
45
|
-
/** Current view mode: 'cards' or 'table' */
|
|
46
|
-
value: {
|
|
47
|
-
type: String,
|
|
48
|
-
default: 'table',
|
|
49
|
-
validator: (v) => ['cards', 'table'].includes(v),
|
|
50
|
-
},
|
|
51
|
-
/** Label for cards button */
|
|
52
|
-
cardsLabel: {
|
|
53
|
-
type: String,
|
|
54
|
-
default: 'Cards',
|
|
55
|
-
},
|
|
56
|
-
/** Label for table button */
|
|
57
|
-
tableLabel: {
|
|
58
|
-
type: String,
|
|
59
|
-
default: 'Table',
|
|
60
|
-
},
|
|
61
|
-
/** Aria label for the toggle group */
|
|
62
|
-
ariaLabel: {
|
|
63
|
-
type: String,
|
|
64
|
-
default: 'View mode',
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
}
|
|
68
|
-
</script>
|
|
69
|
-
|
|
70
|
-
<style scoped>
|
|
71
|
-
.cn-view-mode-toggle {
|
|
72
|
-
display: inline-flex;
|
|
73
|
-
gap: 0;
|
|
74
|
-
border-radius: var(--border-radius-pill, 20px);
|
|
75
|
-
overflow: hidden;
|
|
76
|
-
}
|
|
77
|
-
</style>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as CnViewModeToggle } from './CnViewModeToggle.vue'
|