export interface FolderNode { id: number; name: string; /** Direct test-case count — cases with `folderId === this.id`. Rendered as the row badge. */ count?: number; /** Total test-case count including all descendants. Rendered as a tooltip on the folder row. */ totalCount?: number; color?: string; children?: FolderNode[]; /** Backend hint: true when this node has at least one direct child. Drives * the sidebar chevron under lazy loading, so the affordance shows even * before `children` has been fetched. */ hasChildren?: boolean; /** Backend-reported total number of direct children. The sidebar shows a * "Load more" row when `(children?.length ?? 0) < totalChildren`. */ totalChildren?: number; /** Last 0-based page already fetched into `children`. `undefined` means the * subtree has not been loaded yet — the host should fetch on first expand. */ loadedPages?: number; /** True while a children-page fetch is in flight, so the sidebar can render * a spinner row and the host can suppress duplicate requests. */ childrenLoading?: boolean; } export declare type FolderIdAccessor = (row: any) => number | null | undefined; export interface ModularConfig { showSidebar: boolean; showBreadcrumb: boolean; showFolderGrid: boolean; showUnorganizedSection: boolean; showSubfolderSection: boolean; showCounts: boolean; allowCreateFolder: boolean; allowRenameFolder: boolean; allowDeleteFolder: boolean; allowDuplicateFolder: boolean; allowNestedFolders: boolean; allowTestDragDrop: boolean; allowBulkSelection: boolean; /** * When true, the table renders a folder column (icon + folder name) and lists it in the * settings dropdown. Default visibility on first init follows `viewMode`: shown in list, * hidden in modular. Once the user toggles it the choice persists. */ showFolderColumn: boolean; } export declare const DEFAULT_MODULAR_CONFIG: ModularConfig; /** * Reserved fieldId for the auto-injected folder column. Hosts should avoid * defining a column with this id of their own. */ export declare const FOLDER_COLUMN_FIELD_ID = "folder"; export interface ModularLabels { folders: string; organized: string; unorganized: string; newFolder: string; searchFoldersPlaceholder: string; allFolders: string; subfoldersIn: string; moveToFolder: string; addTag: string; delete: string; selectAll: string; testsCountSingular: string; testsCountPlural: string; foldersCountSingular: string; foldersCountPlural: string; subfolderCountSingular: string; subfolderCountPlural: string; oneSubfolder: string; subfoldersCount: string; clearFilter: string; moveDialogTitle: string; moveDialogCancel: string; moveDialogConfirm: string; moveDialogRoot: string; moveDialogDescriptionSingular: string; moveDialogDescriptionPlural: string; newFolderDialogTitle: string; newFolderDialogDescription: string; newFolderDialogNameLabel: string; newFolderDialogNamePlaceholder: string; newFolderDialogParentLabel: string; newFolderDialogParentNone: string; newFolderDialogColorLabel: string; newFolderDialogCancel: string; newFolderDialogConfirm: string; newFolderDialogNameRequiredError: string; newFolderDialogNameMaxLengthError: string; folderMenuCreateSubfolder: string; folderMenuRename: string; folderMenuMove: string; folderMenuDuplicate: string; folderMenuDelete: string; deleteFolderDialogTitle: string; deleteFolderDialogBodyTemplate: string; deleteFolderDialogBodyTestCaseSingular: string; deleteFolderDialogBodyTestCasePlural: string; deleteFolderDialogBodyStepGroupSingular: string; deleteFolderDialogBodyStepGroupPlural: string; deleteFolderDialogBodyJoin: string; deleteFolderDialogMoveToParentTitle: string; deleteFolderDialogMoveToParentDescription: string; deleteFolderDialogMoveToUnorganizedTitle: string; deleteFolderDialogMoveToUnorganizedDescription: string; deleteFolderDialogCancel: string; deleteFolderDialogConfirm: string; emptyNoTestsInFolderTitle: string; emptyNoTestsInFolderDescription: string; /** Header label for the auto-injected folder column. */ folderColumnLabel: string; /** Cell label for rows with no folderId (i.e. the "Unorganized" bucket). */ unorganizedRowLabel: string; /** Shown in the folder sidebar when the search input filters out every folder. */ noFoldersFound: string; /** Helper line shown under the empty-folder-list state, hinting at the create action. */ noFoldersEmptyDescription: string; /** Sidebar folder-row hover tooltip count line. `{n}` is the descendant total * (FolderNode.totalCount). The host swaps the noun for "step group" when in * step-group mode by overriding these two keys. The full tooltip is composed * as `${node.name}\n${tpl.replace('{n}', total)}`. */ folderTooltipTotalSingular: string; folderTooltipTotalPlural: string; } export declare const DEFAULT_MODULAR_LABELS: ModularLabels; /** * Emitted after a successful inline folder rename. Carries the full renamed node * (with the new name already applied) plus its parent id, so hosts can issue * a complete update request (e.g. `PUT /test_case_folders/{id}`) without a * secondary lookup against their cached tree. */ export interface FolderRenamedPayload { folder: FolderNode; parentId: number | null; /** Previous name, useful for undo messages / audit logs. */ previousName: string; } export interface FolderCreatedPayload { parentId: number | null; name: string; color?: string; } /** * Delete strategies match the backend `strategy` query param values on * `DELETE /test_case_folders/{id}?strategy=…`. Only the two move strategies * are covered by the library's internal dialog; `DELETE_IF_EMPTY` is the * host's responsibility (precheck `count === 0 && totalCount === 0`). */ export declare type FolderDeleteStrategy = 'MOVE_TO_PARENT' | 'MOVE_TO_UNORGANISED'; export interface FolderDeleteRequestedPayload { id: number; name: string; testCount: number; hasParent: boolean; } export interface FolderMoveRequestedPayload { id: number; name: string; hasParent: boolean; } export interface FolderMovedPayload { id: number; newParentId: number | null; } export interface FolderDuplicateRequestedPayload { id: number; name: string; } export interface FolderDeletedPayload { id: number; strategy?: FolderDeleteStrategy; } export interface TestsMovedPayload { testIds: Array; targetFolderId: number | null; } export interface BulkActionInvokedPayload { id: string; selected: any[]; } export interface ReorderLabels { reorderButton: string; cancelButton: string; doneButton: string; savingButton: string; bannerTitle: string; bannerDescription: string; } export declare const DEFAULT_REORDER_LABELS: ReorderLabels; export interface ReorderSavePayload { orderedItems: any[]; } export declare const ROW_DRAG_MIME = "application/x-cqa-test-ids"; /** Custom MIME for folder-row drags in the sidebar. Payload is a JSON-stringified folder id. */ export declare const FOLDER_DRAG_MIME = "application/x-cqa-folder-id";