Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
+25
@@ -39,10 +39,30 @@ export interface FileBrowserFilterState {
|
||||
readonly includeArchived: boolean;
|
||||
}
|
||||
|
||||
/** A selectable assignee (Verantwortlicher) filter option. */
|
||||
export interface FileAssigneeOption {
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* The option lists that populate the browser filter dropdowns. Built once by the
|
||||
* loader (tenant-scoped) and passed in; the VM stays pure. `entityTypes` are raw
|
||||
* enum keys — the UI maps them to i18n labels.
|
||||
*/
|
||||
export interface FileBrowserFilterOptions {
|
||||
readonly entityTypes: readonly string[];
|
||||
readonly tags: readonly string[];
|
||||
readonly assignees: readonly FileAssigneeOption[];
|
||||
}
|
||||
|
||||
const EMPTY_FILTER_OPTIONS: FileBrowserFilterOptions = { entityTypes: [], tags: [], assignees: [] };
|
||||
|
||||
export interface FileBrowserData {
|
||||
readonly viewMode: FileViewMode;
|
||||
readonly rows: readonly FileBrowserRow[];
|
||||
readonly filter: FileBrowserFilterState;
|
||||
readonly filterOptions: FileBrowserFilterOptions;
|
||||
readonly canWrite: boolean;
|
||||
readonly canDelete: boolean;
|
||||
/** Cursor of the next page (null = last page). */
|
||||
@@ -80,6 +100,8 @@ export interface BuildFileBrowserVMInput {
|
||||
readonly viewMode?: FileViewMode;
|
||||
readonly rows: readonly FileBrowserRow[];
|
||||
readonly filter: FileBrowserFilterState;
|
||||
/** Option lists for the filter dropdowns. Defaults to empty when omitted. */
|
||||
readonly filterOptions?: FileBrowserFilterOptions;
|
||||
readonly canWrite: boolean;
|
||||
readonly canDelete: boolean;
|
||||
readonly nextCursor?: string | null;
|
||||
@@ -87,6 +109,7 @@ export interface BuildFileBrowserVMInput {
|
||||
|
||||
export function buildFileBrowserVM(input: BuildFileBrowserVMInput): FileBrowserVM {
|
||||
const viewMode: FileViewMode = input.viewMode ?? "table";
|
||||
const filterOptions = input.filterOptions ?? EMPTY_FILTER_OPTIONS;
|
||||
if (input.rows.length === 0) {
|
||||
// Empty stays a `ready` state with a plain-text empty state (DoD 23) so the
|
||||
// filter/toggle bar and upload CTA remain visible.
|
||||
@@ -96,6 +119,7 @@ export function buildFileBrowserVM(input: BuildFileBrowserVMInput): FileBrowserV
|
||||
viewMode,
|
||||
rows: [],
|
||||
filter: input.filter,
|
||||
filterOptions,
|
||||
canWrite: input.canWrite,
|
||||
canDelete: input.canDelete,
|
||||
nextCursor: null,
|
||||
@@ -111,6 +135,7 @@ export function buildFileBrowserVM(input: BuildFileBrowserVMInput): FileBrowserV
|
||||
viewMode,
|
||||
rows: input.rows,
|
||||
filter: input.filter,
|
||||
filterOptions,
|
||||
canWrite: input.canWrite,
|
||||
canDelete: input.canDelete,
|
||||
nextCursor: input.nextCursor ?? null,
|
||||
|
||||
Reference in new issue
Block a user