Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/CnContextMenu/CnContextMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default {
* a native tooltip — useful for explaining why an entry is disabled.
* When the entire array is empty (or all entries are filtered out), only
* the default slot content is rendered.
* @type {Array<{label: string, icon?: object, handler?: Function, disabled?: boolean | Function, visible?: boolean | Function, title?: string | Function, destructive?: boolean}>}
* @type {Array<{label: string, icon: object, handler: Function, disabled: boolean | Function, visible: boolean | Function, title: string | Function, destructive: boolean}>}
*/
actions: {
type: Array,
Expand Down
6 changes: 2 additions & 4 deletions src/components/CnDashboardPage/CnDashboardPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,7 @@ export default {
* Custom widgets: `{ id: 'my-widget', title: 'My Widget', type: 'custom' }`
* NC API widgets: `{ id: 'calendar', title: 'Calendar', itemApiVersions: [1,2], ... }`
* Tile widgets: `{ id: 'tile-files', type: 'tile', title: 'Files', icon: 'M12...', iconType: 'svg', backgroundColor: '#0082c9', textColor: '#fff', linkType: 'app', linkValue: 'files' }`
*
* @type {Array<{ id: string, title: string, type?: string, iconUrl?: string, iconClass?: string, buttons?: Array, itemApiVersions?: number[], reloadInterval?: number, [key: string]: any }>}
* @type {Array<{ id: string, title: string, type: string, iconUrl: string, iconClass: string, buttons: Array, itemApiVersions: number[], reloadInterval: number }>}
*/
widgets: {
type: Array,
Expand All @@ -220,8 +219,7 @@ export default {
* Each item: `{ id: 'unique-id', widgetId: 'my-widget', gridX: 0, gridY: 0, gridWidth: 4, gridHeight: 3 }`
*
* Additional properties (showTitle, styleConfig, tile config) are passed through.
*
* @type {Array<{ id: string|number, widgetId: string, gridX: number, gridY: number, gridWidth: number, gridHeight: number, showTitle?: boolean, styleConfig?: object, [key: string]: any }>}
* @type {Array<{ id: string|number, widgetId: string, gridX: number, gridY: number, gridWidth: number, gridHeight: number, showTitle: boolean, styleConfig: object }>}
*/
layout: {
type: Array,
Expand Down
2 changes: 1 addition & 1 deletion src/components/CnDataTable/CnDataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export default {
/**
* Column definitions (manual mode).
* Not required when `schema` is provided.
* @type {Array<{key: string, label: string, sortable?: boolean, width?: string, class?: string, cellClass?: string}>}
* @type {Array<{key: string, label: string, sortable: boolean, width: string, class: string, cellClass: string}>}
*/
columns: {
type: Array,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ export default {
* set; otherwise the default Nextcloud apps page is used
* - `enabled` discriminates the link label: `false` means the
* app is installed but disabled; otherwise it's not installed
*
* @type {Array<{id: string, name?: string, installUrl?: string, enabled?: boolean}>}
* @type {Array<{id: string, name: string, installUrl: string, enabled: boolean}>}
*/
dependencies: {
type: Array,
Expand Down
2 changes: 1 addition & 1 deletion src/components/CnDetailGrid/CnDetailGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default {
props: {
/**
* Array of detail items to render.
* @type {Array<{ label: string, value?: string|number }>}
* @type {Array<{ label: string, value: string|number }>}
*/
items: {
type: Array,
Expand Down
3 changes: 1 addition & 2 deletions src/components/CnDetailPage/CnDetailPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,7 @@ export default {
/**
* Column definitions for the statistics table.
* Each column: `{ key: string, label: string, align?: 'left'|'center'|'right' }`
*
* @type {Array<{ key: string, label: string, align?: string }>}
* @type {Array<{ key: string, label: string, align: string }>}
*/
statsColumns: {
type: Array,
Expand Down
2 changes: 1 addition & 1 deletion src/components/CnFilterBar/CnFilterBar.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default {
methods: {
onFilterChange({ key, value }) {
if (key === 'status') {
this.activeStatus = value?.value || null
this.activeStatus = (value && value.value) || null
this.filters[0].value = value
}
if (key === 'active') {
Expand Down
7 changes: 4 additions & 3 deletions src/components/CnFilterBar/CnFilterBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ export default {

props: {
/**
* Filter definitions.
* @type {Array<{key: string, label: string, type: 'select'|'text'|'checkbox', options?: Array, value?: *}>}
* Filter definitions. Each item has `key`, `label`, `type` ('select'|'text'|'checkbox'),
* optional `options` (for select), and optional `value`.
* @type {Array<{key: string, label: string, type: 'select'|'text'|'checkbox', options: Array, value: any}>}
*/
filters: {
type: Array,
Expand Down Expand Up @@ -145,7 +146,7 @@ export default {
onFilterChange(key, value) {
/**
* @event filter-change Emitted when any filter changes.
* @type {{ key: string, value: * }}
* @type {{ key: string, value: any }}
*/
this.$emit('filter-change', { key, value })
},
Expand Down
3 changes: 1 addition & 2 deletions src/components/CnObjectDataWidget/CnObjectDataWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,7 @@ export default {
* - `editable` (boolean) — Override editability (default: based on schema readOnly)
* - `label` (string) — Override the display label
* - `widget` (string) — Override the widget type for editing
*
* @type {{ [key: string]: { order?: number, gridColumn?: number, gridRow?: number, hidden?: boolean, editable?: boolean, label?: string, widget?: string } }}
* @type {object}
*/
overrides: {
type: Object,
Expand Down
2 changes: 1 addition & 1 deletion src/components/CnRegisterMapping/CnRegisterMapping.vue
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export default {
},
/**
* Groups of object types that share a register.
* @type {Array<{ name: string, description?: string, registerConfigKey?: string, types: Array<{ slug: string, label: string, description?: string, configKey?: string }> }>}
* @type {Array<{ name: string, description: string, registerConfigKey: string, types: Array<{ slug: string, label: string, description: string, configKey: string }> }>}
*/
groups: {
type: Array,
Expand Down
3 changes: 1 addition & 2 deletions src/components/CnRowActions/CnRowActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ export default {
* - `visible` (boolean | (row) => boolean) — when `false`, hide the entry from the menu (default: shown)
* - `title` (string | (row) => string) — native tooltip shown on hover (useful to explain why an entry is disabled)
* - `destructive` (boolean) — apply error color styling
*
* @type {Array<{label: string, icon?: object, handler: Function, disabled?: boolean | Function, visible?: boolean | Function, title?: string | Function, destructive?: boolean}>}
* @type {Array<{label: string, icon: object, handler: Function, disabled: boolean | Function, visible: boolean | Function, title: string | Function, destructive: boolean}>}
*/
actions: {
type: Array,
Expand Down
6 changes: 2 additions & 4 deletions src/components/CnTabbedFormDialog/CnTabbedFormDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ export default {
* Array of tab definitions. Each tab must have at least an `id` and `title`.
* The optional `icon` field should be a Vue component reference (e.g. an imported MDI icon).
* The optional `disabled` field prevents tab selection.
*
* @type {Array<{ id: string, title: string, icon?: object, disabled?: boolean }>}
* @type {Array<{ id: string, title: string, icon: object, disabled: boolean }>}
*/
tabs: {
type: Array,
Expand Down Expand Up @@ -276,8 +275,7 @@ export default {
/**
* Result of the last operation.
* null = form phase, { success: true } = success, { error: 'msg' } = error
*
* @type {{ success?: boolean, error?: string }|null}
* @type {{ success: boolean, error: string }|null}
*/
result: null,
/** @type {number|null} Timeout ID for auto-close after success */
Expand Down
3 changes: 1 addition & 2 deletions src/components/CnTableWidget/CnTableWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ export default {
},
/**
* Column definitions for CnDataTable.
*
* @type {{ key: string, label: string, sortable?: boolean }[]}
* @type {{ key: string, label: string, sortable: boolean }[]}
*/
columns: {
type: Array,
Expand Down
2 changes: 1 addition & 1 deletion src/components/CnTileWidget/CnTileWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default {
props: {
/**
* Tile configuration object.
* @type {{ title: string, icon: string, iconType: 'svg'|'class'|'url'|'emoji', backgroundColor?: string, textColor?: string, linkType: 'app'|'url', linkValue: string }}
* @type {{ title: string, icon: string, iconType: 'svg'|'class'|'url'|'emoji', backgroundColor: string, textColor: string, linkType: 'app'|'url', linkValue: string }}
*/
tile: {
type: Object,
Expand Down
2 changes: 1 addition & 1 deletion src/components/CnTimelineStages/CnTimelineStages.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default {
/**
* Array of stage objects. Each must have `id` (unique) and `label` (display text).
* Optional `subtitle` for secondary text below the label.
* @type {{ id: string, label: string, subtitle?: string }[]}
* @type {{ id: string, label: string, subtitle: string }[]}
*/
stages: {
type: Array,
Expand Down
2 changes: 1 addition & 1 deletion src/components/CnWidgetRenderer/CnWidgetRenderer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default {
props: {
/**
* Nextcloud widget object from the Dashboard API.
* @type {{ id: string, title: string, iconClass?: string, iconUrl?: string, widgetUrl?: string, itemIconsRound?: boolean, itemApiVersions?: number[], reloadInterval?: number, buttons?: Array }}
* @type {{ id: string, title: string, iconClass: string, iconUrl: string, widgetUrl: string, itemIconsRound: boolean, itemApiVersions: number[], reloadInterval: number, buttons: Array }}
*/
widget: {
type: Object,
Expand Down
2 changes: 1 addition & 1 deletion src/components/CnWidgetWrapper/CnWidgetWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export default {
},
/**
* Style configuration for the wrapper.
* @type {{ backgroundColor?: string, borderStyle?: string, borderWidth?: number, borderColor?: string, borderRadius?: number, padding?: { top: number, right: number, bottom: number, left: number } }}
* @type {{ backgroundColor: string, borderStyle: string, borderWidth: number, borderColor: string, borderRadius: number, padding: { top: number, right: number, bottom: number, left: number } }}
*/
styleConfig: {
type: Object,
Expand Down
8 changes: 8 additions & 0 deletions styleguide/styleguide.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ module.exports = {
exampleMode: 'collapse',
pagePerSection: true,

// Buble (live-example transpiler) config: pass async/await and object spread through natively.
compilerConfig: {
objectAssign: 'Object.assign',
transforms: {
asyncAwait: false,
},
},

// Build output — relative to this styleguide/ directory
styleguideDir: 'build',

Expand Down
Loading