@conduction/nextcloud-vue 0.1.0-beta.3 → 0.1.0-beta.4
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 -226
- package/dist/nextcloud-vue.cjs.js +60455 -8755
- package/dist/nextcloud-vue.cjs.js.map +1 -1
- package/dist/nextcloud-vue.css +2062 -528
- package/dist/nextcloud-vue.esm.js +60411 -8731
- package/dist/nextcloud-vue.esm.js.map +1 -1
- package/package.json +75 -62
- package/src/components/CnActionsBar/CnActionsBar.vue +235 -225
- package/src/components/CnActionsBar/index.js +1 -1
- package/src/components/CnAdvancedFormDialog/CnAdvancedFormDialog.vue +579 -0
- package/src/components/CnAdvancedFormDialog/CnDataTab.vue +217 -0
- package/src/components/CnAdvancedFormDialog/CnMetadataTab.vue +121 -0
- package/src/components/CnAdvancedFormDialog/CnPropertiesTab.vue +418 -0
- package/src/components/CnAdvancedFormDialog/CnPropertyValueCell.vue +247 -0
- package/src/components/CnAdvancedFormDialog/index.js +1 -0
- package/src/components/CnCardGrid/CnCardGrid.vue +152 -152
- package/src/components/CnCardGrid/index.js +1 -1
- package/src/components/CnCellRenderer/CnCellRenderer.vue +132 -132
- package/src/components/CnCellRenderer/index.js +1 -1
- package/src/components/CnChartWidget/CnChartWidget.vue +320 -0
- package/src/components/CnChartWidget/index.js +1 -0
- package/src/components/CnConfigurationCard/CnConfigurationCard.vue +77 -77
- package/src/components/CnConfigurationCard/index.js +1 -1
- package/src/components/CnDashboardGrid/CnDashboardGrid.vue +225 -0
- package/src/components/CnDashboardGrid/index.js +1 -0
- package/src/components/CnDashboardPage/CnDashboardPage.vue +390 -0
- package/src/components/CnDashboardPage/index.js +1 -0
- package/src/components/CnDataTable/CnDataTable.vue +349 -349
- package/src/components/CnDataTable/index.js +1 -1
- package/src/components/CnDetailCard/CnDetailCard.vue +214 -0
- package/src/components/CnDetailCard/index.js +1 -0
- package/src/components/CnDetailPage/CnDetailPage.vue +281 -0
- package/src/components/CnDetailPage/index.js +1 -0
- package/src/components/CnFacetSidebar/CnFacetSidebar.vue +231 -223
- package/src/components/CnFacetSidebar/index.js +1 -1
- package/src/components/CnFilterBar/CnFilterBar.vue +152 -152
- package/src/components/CnFilterBar/index.js +1 -1
- package/src/components/CnIcon/CnIcon.vue +89 -89
- package/src/components/CnIcon/index.js +1 -1
- package/src/components/CnIndexPage/CnIndexPage.vue +874 -816
- package/src/components/CnIndexPage/index.js +1 -1
- package/src/components/CnIndexSidebar/CnIndexSidebar.vue +503 -484
- package/src/components/CnIndexSidebar/index.js +1 -1
- package/src/components/CnItemCard/CnItemCard.vue +132 -0
- package/src/components/CnItemCard/index.js +1 -0
- package/src/components/CnKpiGrid/CnKpiGrid.vue +89 -89
- package/src/components/CnKpiGrid/index.js +1 -1
- package/src/components/CnMassActionBar/CnMassActionBar.vue +160 -160
- package/src/components/CnMassActionBar/index.js +1 -1
- package/src/components/CnMassCopyDialog/CnMassCopyDialog.vue +320 -320
- package/src/components/CnMassCopyDialog/index.js +1 -1
- package/src/components/CnMassDeleteDialog/CnMassDeleteDialog.vue +238 -238
- package/src/components/CnMassDeleteDialog/index.js +1 -1
- package/src/components/CnMassExportDialog/CnMassExportDialog.vue +190 -190
- package/src/components/CnMassExportDialog/index.js +1 -1
- package/src/components/CnMassImportDialog/CnMassImportDialog.vue +491 -491
- package/src/components/CnMassImportDialog/index.js +1 -1
- package/src/components/CnNoteCard/CnNoteCard.vue +149 -0
- package/src/components/CnNoteCard/index.js +1 -0
- package/src/components/CnNotesCard/CnNotesCard.vue +413 -0
- package/src/components/CnNotesCard/index.js +1 -0
- package/src/components/CnObjectCard/CnObjectCard.vue +292 -292
- package/src/components/CnObjectCard/index.js +1 -1
- package/src/components/CnObjectSidebar/CnObjectSidebar.vue +876 -0
- package/src/components/CnObjectSidebar/index.js +1 -0
- package/src/components/CnPageHeader/CnPageHeader.vue +57 -57
- package/src/components/CnPageHeader/index.js +1 -1
- package/src/components/CnPagination/CnPagination.vue +252 -252
- package/src/components/CnPagination/index.js +1 -1
- package/src/components/CnRowActions/CnRowActions.vue +73 -73
- package/src/components/CnRowActions/index.js +1 -1
- package/src/components/CnSchemaFormDialog/CnSchemaConfigurationTab.vue +226 -0
- package/src/components/CnSchemaFormDialog/CnSchemaFormDialog.vue +787 -0
- package/src/components/CnSchemaFormDialog/CnSchemaPropertiesTab.vue +305 -0
- package/src/components/CnSchemaFormDialog/CnSchemaPropertyActions.vue +1398 -0
- package/src/components/CnSchemaFormDialog/CnSchemaSecurityTab.vue +236 -0
- package/src/components/CnSchemaFormDialog/index.js +1 -0
- package/src/components/CnSettingsCard/CnSettingsCard.vue +92 -92
- package/src/components/CnSettingsCard/index.js +1 -1
- package/src/components/CnSettingsSection/CnSettingsSection.vue +266 -266
- package/src/components/CnSettingsSection/index.js +1 -1
- package/src/components/CnStatsBlock/CnStatsBlock.vue +420 -366
- package/src/components/CnStatsBlock/index.js +1 -1
- package/src/components/CnStatusBadge/CnStatusBadge.vue +77 -77
- package/src/components/CnStatusBadge/index.js +1 -1
- package/src/components/CnTabbedFormDialog/CnTabbedFormDialog.vue +540 -0
- package/src/components/CnTabbedFormDialog/index.js +1 -0
- package/src/components/CnTasksCard/CnTasksCard.vue +373 -0
- package/src/components/CnTasksCard/index.js +1 -0
- package/src/components/CnTileWidget/CnTileWidget.vue +159 -0
- package/src/components/CnTileWidget/index.js +1 -0
- package/src/components/CnTimelineStages/CnTimelineStages.vue +292 -0
- package/src/components/CnTimelineStages/index.js +1 -0
- package/src/components/CnUserActionMenu/CnUserActionMenu.vue +435 -0
- package/src/components/CnUserActionMenu/index.js +1 -0
- package/src/components/CnVersionInfoCard/CnVersionInfoCard.vue +312 -312
- package/src/components/CnVersionInfoCard/index.js +1 -1
- package/src/components/CnWidgetRenderer/CnWidgetRenderer.vue +180 -0
- package/src/components/CnWidgetRenderer/index.js +1 -0
- package/src/components/CnWidgetWrapper/CnWidgetWrapper.vue +211 -0
- package/src/components/CnWidgetWrapper/index.js +1 -0
- package/src/components/index.js +43 -29
- package/src/composables/index.js +4 -3
- package/src/composables/useDashboardView.js +240 -0
- package/src/composables/useDetailView.js +289 -132
- package/src/composables/useListView.js +363 -362
- package/src/composables/useSubResource.js +142 -142
- package/src/constants/metadata.js +30 -30
- package/src/css/CnSchemaFormDialog.css +546 -0
- package/src/css/__sample_nextcloud_tokens.css +110 -0
- package/src/css/actions-bar.css +48 -48
- package/src/css/badge.css +51 -51
- package/src/css/card.css +128 -128
- package/src/css/dashboard.css +70 -0
- package/src/css/detail-page.css +168 -0
- package/src/css/detail.css +68 -68
- package/src/css/index-page.css +44 -32
- package/src/css/index-sidebar.css +193 -187
- package/src/css/index.css +16 -12
- package/src/css/layout.css +90 -90
- package/src/css/page-header.css +33 -33
- package/src/css/pagination.css +72 -72
- package/src/css/table.css +142 -142
- package/src/css/timeline-stages.css +218 -0
- package/src/css/utilities.css +46 -46
- package/src/index.js +72 -53
- package/src/store/createSubResourcePlugin.js +135 -135
- package/src/store/index.js +3 -3
- package/src/store/plugins/auditTrails.js +17 -17
- package/src/store/plugins/files.js +250 -186
- package/src/store/plugins/index.js +7 -5
- package/src/store/plugins/lifecycle.js +180 -180
- package/src/store/plugins/relations.js +68 -68
- package/src/store/plugins/search.js +372 -0
- package/src/store/plugins/selection.js +104 -0
- package/src/store/useObjectStore.js +829 -686
- package/src/types/auditTrail.d.ts +32 -32
- package/src/types/file.d.ts +23 -23
- package/src/types/index.d.ts +35 -35
- package/src/types/notification.d.ts +36 -36
- package/src/types/object.d.ts +40 -40
- package/src/types/organisation.d.ts +41 -41
- package/src/types/register.d.ts +25 -25
- package/src/types/schema.d.ts +39 -39
- package/src/types/shared.d.ts +79 -79
- package/src/types/source.d.ts +14 -14
- package/src/types/task.d.ts +31 -31
- package/src/utils/errors.js +96 -96
- package/src/utils/headers.js +68 -50
- package/src/utils/id.js +13 -0
- package/src/utils/index.js +3 -3
- package/src/utils/schema.js +422 -419
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
CnWidgetRenderer — Renders Nextcloud Dashboard API widgets (v1/v2).
|
|
3
|
+
|
|
4
|
+
Loads widget items from the Nextcloud widget API and displays them
|
|
5
|
+
using NcDashboardWidget. Supports auto-refresh for widgets that
|
|
6
|
+
define a reload interval.
|
|
7
|
+
-->
|
|
8
|
+
<template>
|
|
9
|
+
<div class="cn-widget-renderer">
|
|
10
|
+
<!-- API Widget V1 or V2 -->
|
|
11
|
+
<NcDashboardWidget
|
|
12
|
+
v-if="isApiWidget"
|
|
13
|
+
:items="widgetItems"
|
|
14
|
+
:show-more-url="widget.widgetUrl"
|
|
15
|
+
:loading="loading"
|
|
16
|
+
:item-menu="false"
|
|
17
|
+
:round-icons="widget.itemIconsRound">
|
|
18
|
+
<template #empty-content>
|
|
19
|
+
<NcEmptyContent
|
|
20
|
+
v-if="emptyMessage"
|
|
21
|
+
:description="emptyMessage">
|
|
22
|
+
<template #icon>
|
|
23
|
+
<span v-if="widget.iconClass" :class="widget.iconClass" />
|
|
24
|
+
</template>
|
|
25
|
+
</NcEmptyContent>
|
|
26
|
+
</template>
|
|
27
|
+
</NcDashboardWidget>
|
|
28
|
+
|
|
29
|
+
<!-- Loading state -->
|
|
30
|
+
<div v-else-if="loading" class="cn-widget-renderer__loading">
|
|
31
|
+
<NcLoadingIcon :size="32" />
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<!-- Fallback for unknown widget types -->
|
|
35
|
+
<NcEmptyContent
|
|
36
|
+
v-else
|
|
37
|
+
:description="unavailableText">
|
|
38
|
+
<template #icon>
|
|
39
|
+
<AlertCircleOutline :size="48" />
|
|
40
|
+
</template>
|
|
41
|
+
</NcEmptyContent>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script>
|
|
46
|
+
import { NcDashboardWidget, NcEmptyContent, NcLoadingIcon } from '@nextcloud/vue'
|
|
47
|
+
import AlertCircleOutline from 'vue-material-design-icons/AlertCircleOutline.vue'
|
|
48
|
+
import axios from '@nextcloud/axios'
|
|
49
|
+
import { generateOcsUrl } from '@nextcloud/router'
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* CnWidgetRenderer — Renders Nextcloud Dashboard API widgets.
|
|
53
|
+
*
|
|
54
|
+
* Fetches widget items from the OCS Dashboard API and displays them
|
|
55
|
+
* using the standard NcDashboardWidget component.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* <CnWidgetRenderer :widget="ncWidget" />
|
|
59
|
+
*/
|
|
60
|
+
export default {
|
|
61
|
+
name: 'CnWidgetRenderer',
|
|
62
|
+
|
|
63
|
+
components: {
|
|
64
|
+
NcDashboardWidget,
|
|
65
|
+
NcEmptyContent,
|
|
66
|
+
NcLoadingIcon,
|
|
67
|
+
AlertCircleOutline,
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
props: {
|
|
71
|
+
/**
|
|
72
|
+
* Nextcloud widget object from the Dashboard API.
|
|
73
|
+
* @type {{ id: string, title: string, iconClass?: string, iconUrl?: string, widgetUrl?: string, itemIconsRound?: boolean, itemApiVersions?: number[], reloadInterval?: number, buttons?: Array }}
|
|
74
|
+
*/
|
|
75
|
+
widget: {
|
|
76
|
+
type: Object,
|
|
77
|
+
required: true,
|
|
78
|
+
},
|
|
79
|
+
/** Text shown when widget is not available */
|
|
80
|
+
unavailableText: {
|
|
81
|
+
type: String,
|
|
82
|
+
default: 'Widget not available',
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
data() {
|
|
87
|
+
return {
|
|
88
|
+
loading: false,
|
|
89
|
+
items: [],
|
|
90
|
+
emptyMessage: '',
|
|
91
|
+
refreshInterval: null,
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
computed: {
|
|
96
|
+
isApiWidgetV2() {
|
|
97
|
+
return this.widget?.itemApiVersions?.includes(2)
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
isApiWidgetV1() {
|
|
101
|
+
return this.widget?.itemApiVersions?.includes(1)
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
isApiWidget() {
|
|
105
|
+
return this.isApiWidgetV1 || this.isApiWidgetV2
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
widgetItems() {
|
|
109
|
+
return this.items.map(item => ({
|
|
110
|
+
id: item.sinceId || item.id || String(Math.random()),
|
|
111
|
+
targetUrl: item.link || item.targetUrl || '',
|
|
112
|
+
avatarUrl: item.iconUrl || item.avatarUrl || '',
|
|
113
|
+
avatarUsername: item.avatarUsername || '',
|
|
114
|
+
overlayIconUrl: item.overlayIconUrl || '',
|
|
115
|
+
mainText: item.title || item.mainText || '',
|
|
116
|
+
subText: item.subtitle || item.subText || '',
|
|
117
|
+
}))
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
async mounted() {
|
|
122
|
+
if (this.isApiWidget) {
|
|
123
|
+
await this.loadItems()
|
|
124
|
+
|
|
125
|
+
if (this.widget.reloadInterval && this.widget.reloadInterval > 0) {
|
|
126
|
+
this.refreshInterval = setInterval(
|
|
127
|
+
() => this.loadItems(),
|
|
128
|
+
this.widget.reloadInterval * 1000,
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
|
|
134
|
+
beforeDestroy() {
|
|
135
|
+
if (this.refreshInterval) {
|
|
136
|
+
clearInterval(this.refreshInterval)
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
|
|
140
|
+
methods: {
|
|
141
|
+
async loadItems() {
|
|
142
|
+
this.loading = true
|
|
143
|
+
try {
|
|
144
|
+
const version = this.isApiWidgetV2 ? 2 : 1
|
|
145
|
+
const url = generateOcsUrl(
|
|
146
|
+
`/apps/dashboard/api/v${version}/widget-items`,
|
|
147
|
+
)
|
|
148
|
+
const response = await axios.get(url, {
|
|
149
|
+
params: { widgets: [this.widget.id] },
|
|
150
|
+
})
|
|
151
|
+
|
|
152
|
+
const data = response.data?.ocs?.data
|
|
153
|
+
if (data && data[this.widget.id]) {
|
|
154
|
+
const widgetData = data[this.widget.id]
|
|
155
|
+
this.items = widgetData.items || widgetData || []
|
|
156
|
+
this.emptyMessage = widgetData.emptyContentMessage || ''
|
|
157
|
+
}
|
|
158
|
+
} catch (error) {
|
|
159
|
+
console.error(`[CnWidgetRenderer] Failed to load items for ${this.widget.id}:`, error)
|
|
160
|
+
} finally {
|
|
161
|
+
this.loading = false
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
}
|
|
166
|
+
</script>
|
|
167
|
+
|
|
168
|
+
<style scoped>
|
|
169
|
+
.cn-widget-renderer {
|
|
170
|
+
height: 100%;
|
|
171
|
+
padding: 8px;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.cn-widget-renderer__loading {
|
|
175
|
+
display: flex;
|
|
176
|
+
align-items: center;
|
|
177
|
+
justify-content: center;
|
|
178
|
+
height: 100%;
|
|
179
|
+
}
|
|
180
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CnWidgetRenderer } from './CnWidgetRenderer.vue'
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
CnWidgetWrapper — Container shell around a dashboard widget.
|
|
3
|
+
|
|
4
|
+
Provides header (icon + title), scrollable content area, and optional
|
|
5
|
+
footer with action buttons. Applies style configuration for borders,
|
|
6
|
+
backgrounds, and padding.
|
|
7
|
+
-->
|
|
8
|
+
<template>
|
|
9
|
+
<div class="cn-widget-wrapper" :style="wrapperStyles">
|
|
10
|
+
<!-- Header -->
|
|
11
|
+
<div v-if="showTitle" class="cn-widget-wrapper__header">
|
|
12
|
+
<div class="cn-widget-wrapper__header-left">
|
|
13
|
+
<img
|
|
14
|
+
v-if="iconUrl"
|
|
15
|
+
:src="iconUrl"
|
|
16
|
+
:alt="displayTitle"
|
|
17
|
+
class="cn-widget-wrapper__icon">
|
|
18
|
+
<span
|
|
19
|
+
v-else-if="iconClass"
|
|
20
|
+
:class="iconClass"
|
|
21
|
+
class="cn-widget-wrapper__icon" />
|
|
22
|
+
<h3 class="cn-widget-wrapper__title">
|
|
23
|
+
{{ displayTitle }}
|
|
24
|
+
</h3>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="cn-widget-wrapper__actions">
|
|
27
|
+
<slot name="header-actions" />
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<!-- Content -->
|
|
32
|
+
<div class="cn-widget-wrapper__content">
|
|
33
|
+
<slot />
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<!-- Footer -->
|
|
37
|
+
<div v-if="$slots.footer || (buttons && buttons.length > 0)" class="cn-widget-wrapper__footer">
|
|
38
|
+
<slot name="footer">
|
|
39
|
+
<a
|
|
40
|
+
v-for="button in buttons"
|
|
41
|
+
:key="button.link"
|
|
42
|
+
:href="button.link"
|
|
43
|
+
class="cn-widget-wrapper__footer-link">
|
|
44
|
+
{{ button.text }}
|
|
45
|
+
</a>
|
|
46
|
+
</slot>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<script>
|
|
52
|
+
/**
|
|
53
|
+
* CnWidgetWrapper — Widget container with header, content, and footer.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* <CnWidgetWrapper title="My Cases" :icon-url="casesIconUrl">
|
|
57
|
+
* <MyCasesChart :data="chartData" />
|
|
58
|
+
* </CnWidgetWrapper>
|
|
59
|
+
*
|
|
60
|
+
* @example With NC widget object
|
|
61
|
+
* <CnWidgetWrapper
|
|
62
|
+
* :title="widget.title"
|
|
63
|
+
* :icon-url="widget.iconUrl"
|
|
64
|
+
* :icon-class="widget.iconClass"
|
|
65
|
+
* :buttons="widget.buttons">
|
|
66
|
+
* <CnWidgetRenderer :widget="widget" />
|
|
67
|
+
* </CnWidgetWrapper>
|
|
68
|
+
*/
|
|
69
|
+
export default {
|
|
70
|
+
name: 'CnWidgetWrapper',
|
|
71
|
+
|
|
72
|
+
props: {
|
|
73
|
+
/** Widget title */
|
|
74
|
+
title: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: 'Widget',
|
|
77
|
+
},
|
|
78
|
+
/** Whether to show the header with title */
|
|
79
|
+
showTitle: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: true,
|
|
82
|
+
},
|
|
83
|
+
/** Icon URL (image) */
|
|
84
|
+
iconUrl: {
|
|
85
|
+
type: String,
|
|
86
|
+
default: null,
|
|
87
|
+
},
|
|
88
|
+
/** Icon CSS class (e.g., Nextcloud icon class) */
|
|
89
|
+
iconClass: {
|
|
90
|
+
type: String,
|
|
91
|
+
default: null,
|
|
92
|
+
},
|
|
93
|
+
/** Footer action buttons: [{ text, link }] */
|
|
94
|
+
buttons: {
|
|
95
|
+
type: Array,
|
|
96
|
+
default: () => [],
|
|
97
|
+
},
|
|
98
|
+
/**
|
|
99
|
+
* Style configuration for the wrapper.
|
|
100
|
+
* @type {{ backgroundColor?: string, borderStyle?: string, borderWidth?: number, borderColor?: string, borderRadius?: number, padding?: { top: number, right: number, bottom: number, left: number } }}
|
|
101
|
+
*/
|
|
102
|
+
styleConfig: {
|
|
103
|
+
type: Object,
|
|
104
|
+
default: () => ({}),
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
computed: {
|
|
109
|
+
displayTitle() {
|
|
110
|
+
return this.title || 'Widget'
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
wrapperStyles() {
|
|
114
|
+
const styles = {}
|
|
115
|
+
|
|
116
|
+
if (this.styleConfig.backgroundColor) {
|
|
117
|
+
styles.backgroundColor = this.styleConfig.backgroundColor
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (this.styleConfig.borderStyle && this.styleConfig.borderStyle !== 'none') {
|
|
121
|
+
styles.border = `${this.styleConfig.borderWidth || 1}px ${this.styleConfig.borderStyle} ${this.styleConfig.borderColor || 'var(--color-border)'}`
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (this.styleConfig.borderRadius !== undefined) {
|
|
125
|
+
styles.borderRadius = `${this.styleConfig.borderRadius}px`
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (this.styleConfig.padding) {
|
|
129
|
+
const p = this.styleConfig.padding
|
|
130
|
+
styles.padding = `${p.top || 0}px ${p.right || 0}px ${p.bottom || 0}px ${p.left || 0}px`
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return styles
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
}
|
|
137
|
+
</script>
|
|
138
|
+
|
|
139
|
+
<style scoped>
|
|
140
|
+
.cn-widget-wrapper {
|
|
141
|
+
height: 100%;
|
|
142
|
+
display: flex;
|
|
143
|
+
flex-direction: column;
|
|
144
|
+
background: var(--color-main-background);
|
|
145
|
+
border: 1px solid var(--color-border);
|
|
146
|
+
overflow: hidden;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.cn-widget-wrapper__header {
|
|
150
|
+
display: flex;
|
|
151
|
+
align-items: center;
|
|
152
|
+
justify-content: space-between;
|
|
153
|
+
padding: 12px 16px;
|
|
154
|
+
border-bottom: 1px solid var(--color-border);
|
|
155
|
+
flex-shrink: 0;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.cn-widget-wrapper__header-left {
|
|
159
|
+
display: flex;
|
|
160
|
+
align-items: center;
|
|
161
|
+
gap: 8px;
|
|
162
|
+
min-width: 0;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.cn-widget-wrapper__icon {
|
|
166
|
+
width: 24px;
|
|
167
|
+
height: 24px;
|
|
168
|
+
flex-shrink: 0;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.cn-widget-wrapper__title {
|
|
172
|
+
font-weight: 600;
|
|
173
|
+
font-size: 14px;
|
|
174
|
+
margin: 0;
|
|
175
|
+
white-space: nowrap;
|
|
176
|
+
overflow: hidden;
|
|
177
|
+
text-overflow: ellipsis;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.cn-widget-wrapper__content {
|
|
181
|
+
flex: 1;
|
|
182
|
+
overflow: auto;
|
|
183
|
+
min-height: 0;
|
|
184
|
+
padding: 16px;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.cn-widget-wrapper__actions {
|
|
188
|
+
display: flex;
|
|
189
|
+
gap: 4px;
|
|
190
|
+
flex-shrink: 0;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.cn-widget-wrapper__footer {
|
|
194
|
+
display: flex;
|
|
195
|
+
justify-content: flex-end;
|
|
196
|
+
gap: 8px;
|
|
197
|
+
padding: 8px 16px;
|
|
198
|
+
border-top: 1px solid var(--color-border);
|
|
199
|
+
flex-shrink: 0;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.cn-widget-wrapper__footer-link {
|
|
203
|
+
font-size: 13px;
|
|
204
|
+
color: var(--color-primary-element);
|
|
205
|
+
text-decoration: none;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.cn-widget-wrapper__footer-link:hover {
|
|
209
|
+
text-decoration: underline;
|
|
210
|
+
}
|
|
211
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CnWidgetWrapper } from './CnWidgetWrapper.vue'
|
package/src/components/index.js
CHANGED
|
@@ -1,29 +1,43 @@
|
|
|
1
|
-
export { CnDataTable } from './CnDataTable/index.js'
|
|
2
|
-
export { CnFilterBar } from './CnFilterBar/index.js'
|
|
3
|
-
export { CnStatusBadge } from './CnStatusBadge/index.js'
|
|
4
|
-
export { CnPagination } from './CnPagination/index.js'
|
|
5
|
-
export { CnSettingsCard } from './CnSettingsCard/index.js'
|
|
6
|
-
export { CnSettingsSection } from './CnSettingsSection/index.js'
|
|
7
|
-
export { CnStatsBlock } from './CnStatsBlock/index.js'
|
|
8
|
-
export { CnConfigurationCard } from './CnConfigurationCard/index.js'
|
|
9
|
-
export { CnVersionInfoCard } from './CnVersionInfoCard/index.js'
|
|
10
|
-
export { CnCellRenderer } from './CnCellRenderer/index.js'
|
|
11
|
-
export { CnObjectCard } from './CnObjectCard/index.js'
|
|
12
|
-
export { CnCardGrid } from './CnCardGrid/index.js'
|
|
13
|
-
export { CnFacetSidebar } from './CnFacetSidebar/index.js'
|
|
14
|
-
export { CnRowActions } from './CnRowActions/index.js'
|
|
15
|
-
export { CnIndexPage } from './CnIndexPage/index.js'
|
|
16
|
-
export { CnMassActionBar } from './CnMassActionBar/index.js'
|
|
17
|
-
export { CnDeleteDialog } from './CnDeleteDialog/index.js'
|
|
18
|
-
export { CnCopyDialog } from './CnCopyDialog/index.js'
|
|
19
|
-
export { CnFormDialog } from './CnFormDialog/index.js'
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
1
|
+
export { CnDataTable } from './CnDataTable/index.js'
|
|
2
|
+
export { CnFilterBar } from './CnFilterBar/index.js'
|
|
3
|
+
export { CnStatusBadge } from './CnStatusBadge/index.js'
|
|
4
|
+
export { CnPagination } from './CnPagination/index.js'
|
|
5
|
+
export { CnSettingsCard } from './CnSettingsCard/index.js'
|
|
6
|
+
export { CnSettingsSection } from './CnSettingsSection/index.js'
|
|
7
|
+
export { CnStatsBlock } from './CnStatsBlock/index.js'
|
|
8
|
+
export { CnConfigurationCard } from './CnConfigurationCard/index.js'
|
|
9
|
+
export { CnVersionInfoCard } from './CnVersionInfoCard/index.js'
|
|
10
|
+
export { CnCellRenderer } from './CnCellRenderer/index.js'
|
|
11
|
+
export { CnObjectCard } from './CnObjectCard/index.js'
|
|
12
|
+
export { CnCardGrid } from './CnCardGrid/index.js'
|
|
13
|
+
export { CnFacetSidebar } from './CnFacetSidebar/index.js'
|
|
14
|
+
export { CnRowActions } from './CnRowActions/index.js'
|
|
15
|
+
export { CnIndexPage } from './CnIndexPage/index.js'
|
|
16
|
+
export { CnMassActionBar } from './CnMassActionBar/index.js'
|
|
17
|
+
export { CnDeleteDialog } from './CnDeleteDialog/index.js'
|
|
18
|
+
export { CnCopyDialog } from './CnCopyDialog/index.js'
|
|
19
|
+
export { CnFormDialog } from './CnFormDialog/index.js'
|
|
20
|
+
export { CnAdvancedFormDialog } from './CnAdvancedFormDialog/index.js'
|
|
21
|
+
export { CnMassDeleteDialog } from './CnMassDeleteDialog/index.js'
|
|
22
|
+
export { CnMassCopyDialog } from './CnMassCopyDialog/index.js'
|
|
23
|
+
export { CnKpiGrid } from './CnKpiGrid/index.js'
|
|
24
|
+
export { CnMassExportDialog } from './CnMassExportDialog/index.js'
|
|
25
|
+
export { CnMassImportDialog } from './CnMassImportDialog/index.js'
|
|
26
|
+
export { CnIndexSidebar } from './CnIndexSidebar/index.js'
|
|
27
|
+
export { CnRegisterMapping } from './CnRegisterMapping/index.js'
|
|
28
|
+
export { CnIcon, ICON_MAP, registerIcons } from './CnIcon/index.js'
|
|
29
|
+
export { CnPageHeader } from './CnPageHeader/index.js'
|
|
30
|
+
export { CnActionsBar } from './CnActionsBar/index.js'
|
|
31
|
+
export { CnDetailPage } from './CnDetailPage/index.js'
|
|
32
|
+
export { CnDashboardPage } from './CnDashboardPage/index.js'
|
|
33
|
+
export { CnDashboardGrid } from './CnDashboardGrid/index.js'
|
|
34
|
+
export { CnWidgetWrapper } from './CnWidgetWrapper/index.js'
|
|
35
|
+
export { CnWidgetRenderer } from './CnWidgetRenderer/index.js'
|
|
36
|
+
export { CnTileWidget } from './CnTileWidget/index.js'
|
|
37
|
+
export { CnItemCard } from './CnItemCard/index.js'
|
|
38
|
+
export { CnSchemaFormDialog } from './CnSchemaFormDialog/index.js'
|
|
39
|
+
export { CnTabbedFormDialog } from './CnTabbedFormDialog/index.js'
|
|
40
|
+
export { CnTimelineStages } from './CnTimelineStages/index.js'
|
|
41
|
+
export { CnUserActionMenu } from './CnUserActionMenu/index.js'
|
|
42
|
+
export { CnNotesCard } from './CnNotesCard/index.js'
|
|
43
|
+
export { CnTasksCard } from './CnTasksCard/index.js'
|
package/src/composables/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { useListView } from './useListView.js'
|
|
2
|
-
export { useDetailView } from './useDetailView.js'
|
|
3
|
-
export { useSubResource } from './useSubResource.js'
|
|
1
|
+
export { useListView } from './useListView.js'
|
|
2
|
+
export { useDetailView } from './useDetailView.js'
|
|
3
|
+
export { useSubResource } from './useSubResource.js'
|
|
4
|
+
export { useDashboardView } from './useDashboardView.js'
|