refactor(resourceList): move grid/list view into a resourceList component, purpose normalize on all sections views
This commit is contained in:
@@ -295,6 +295,26 @@
|
||||
* Roles: `viewer`, `commenter`, `editor`, `manager`, `admin`
|
||||
*/
|
||||
|
||||
/**
|
||||
* Configuration for `ResourceListComponent`.
|
||||
* @typedef {Object} ResourceListConfig
|
||||
* @property {boolean} [selectable=true] - Show per-item checkboxes and enable selection.
|
||||
* @property {boolean} [showFavorite=true] - Show the favorite-star button on each item.
|
||||
* @property {boolean} [showOwner=false] - Show the owner column initially.
|
||||
* @property {boolean} [showShareBadge=true] - Show the shared-resource badge on items.
|
||||
* @property {boolean} [draggable=false] - Mark items as draggable.
|
||||
* @property {boolean} [showContextMenu=true] - Enable the three-dots button and right-click menu.
|
||||
* @property {string} [itemModifierClass] - Extra CSS class on every .file-item (e.g. 'favorite-item').
|
||||
* @property {string} [dateField='modified_at'] - Which date field to display in the date column.
|
||||
* @property {string} [dateLabel] - Column header label for the date column.
|
||||
* @property {(id: string, type: 'file'|'folder') => boolean} [isFavorite] - State provider for favorite badge.
|
||||
* @property {(id: string, type: 'file'|'folder') => boolean} [isShared] - State provider for share badge.
|
||||
* @property {(item: FileItem|FolderItem, event: MouseEvent) => void} [onOpen] - Item open/navigate callback.
|
||||
* @property {(item: FileItem|FolderItem) => Promise<void>} [onFavoriteToggle] - Favorite-star click callback.
|
||||
* @property {(item: FileItem|FolderItem, event: MouseEvent) => void} [onContextMenu] - Context menu callback.
|
||||
* @property {(selected: Array<FileItem|FolderItem>) => void} [onSelectionChange] - Selection change callback.
|
||||
*/
|
||||
|
||||
/**
|
||||
* One item returned by `GET /api/grants/incoming/resources`.
|
||||
* `resource_type` discriminates the shape of `resource`.
|
||||
|
||||
Reference in New Issue
Block a user