import { Action } from '@ngrx/store'; import { TableState } from './table-definition'; import { IWithIdentifier } from '@digitaix/types'; export declare enum TableActionTypes { ArchiveRow = "[TableComponent] Archive Row", RestoreRow = "[TableComponent] Restore Row", DeleteRow = "[TableComponent] Delete Row", EditRow = "[TableComponent] Edit Row", ViewRow = "[TableComponent] View Row", AddRow = "[TableComponent] Add Row", DownloadRow = "[TableComponent] Download Row", ExportTableData = "[TableComponent] Export Table Data", ImportTableData = "[TableComponent] Import Table Data", RegisterTable = "Register Table", RegisterTables = "Register Tables", ToggleSorting = "[TableComponent] Toggle Sorting", ToggleFiltering = "[TableComponent] Toggle Filtering", TogglePagination = "[TableComponent] Toggle Pagination", ToggleDownload = "[TableComponent] Toggle Download", ToggleUpload = "[TableComponent] Toggle Upload", ToggleShowArchived = "[TableComponent] Toggle Show Archived", ToggleShowCreatedAt = "[TableComponent] Toggle Show CreatedAt", ToggleShowUpdatedAt = "[TableComponent] Toggle Show UpdatedAt", SetLoadingLimit = "[TableComponent] Set Loading Limit", SetPageSize = "[TableComponent] Set Page Size", SetPage = "[TableComponent] Set Page", LoadTableData = "[TableComponent] Load Table Data", SetTableLimit = "[TableComponent] Set Table Limit", SetExpandedRow = "[TableComponent] Set Expanded Row", SetExpandedRowEditMode = "[TableComponent] Set Expanded Row Edit Mode", SetExpandedRowFullMode = "[TableComponent] Set Expanded Row Full Mode", ToggleDialogEdit = "[TableComponent] Toggle Dialog Edit", ToggleDialogView = "[TableComponent] Toggle Dialog View", ClearExpandedRowId = "[TableComponent] Clear Expanded RowId", ToggleColumnHidden = "[TableComponent] Toggle Column Hidden", SelectRow = "[TableComponent] Select Row", SetCurrentTableTab = "[TableComponent] Set Current Table Tab", AddRowToSelection = "[TableComponent] Add Row To Selection", RemoveRowFromSelection = "[TableComponent] Remove Row From Selection", SetFilter = "[TableComponent] Set Filter", ClearSelectedRows = "@digitaix/core/tables/CLEAR_SELECTED_ROWS" } export declare class ClearSelectedRows implements Action { tableId: string; readonly type = TableActionTypes.ClearSelectedRows; constructor(tableId: string); } export declare class SetFilter implements Action { tableId: string; columnName: string; filter: S; readonly type = TableActionTypes.SetFilter; constructor(tableId: string, columnName: string, filter: S); } export declare class SetCurrentTableTab implements Action { tableId: string; tableTab: number; readonly type = TableActionTypes.SetCurrentTableTab; constructor(tableId: string, tableTab: number); } export declare class ToggleColumnHidden implements Action { tableId: string; columnName: string; readonly type = TableActionTypes.ToggleColumnHidden; constructor(tableId: string, columnName: string); } export declare class ClearExpandedRowId implements Action { tableId: string; readonly type = TableActionTypes.ClearExpandedRowId; constructor(tableId: string); } export declare class AddRow implements Action { tableId: string; collectionPath: string; readonly type = TableActionTypes.AddRow; constructor(tableId: string, collectionPath: string); } export declare class ToggleDialogEdit implements Action { tableId: string; enabled?: boolean; readonly type = TableActionTypes.ToggleDialogEdit; constructor(tableId: string, enabled?: boolean); } export declare class ToggleDialogView implements Action { tableId: string; enabled?: boolean; readonly type = TableActionTypes.ToggleDialogView; constructor(tableId: string, enabled?: boolean); } export declare class ToggleShowArchived implements Action { tableId: string; enabled?: boolean; readonly type = TableActionTypes.ToggleShowArchived; constructor(tableId: string, enabled?: boolean); } export declare class ToggleShowCreatedAt implements Action { tableId: string; enabled?: boolean; readonly type = TableActionTypes.ToggleShowCreatedAt; constructor(tableId: string, enabled?: boolean); } export declare class ToggleShowUpdatedAt implements Action { tableId: string; enabled?: boolean; readonly type = TableActionTypes.ToggleShowUpdatedAt; constructor(tableId: string, enabled?: boolean); } export declare class ToggleDownload implements Action { tableId: string; enabled?: boolean; readonly type = TableActionTypes.ToggleDownload; constructor(tableId: string, enabled?: boolean); } export declare class ToggleUpload implements Action { tableId: string; enabled?: boolean; readonly type = TableActionTypes.ToggleUpload; constructor(tableId: string, enabled?: boolean); } export declare class ExportTableData implements Action { tableId: string; readonly type = TableActionTypes.ExportTableData; constructor(tableId: string); } export declare class ImportTableData implements Action { tableId: string; readonly type = TableActionTypes.ImportTableData; constructor(tableId: string); } export declare class SetExpandedRowEditMode implements Action { tableId: string; editMode?: boolean; readonly type = TableActionTypes.SetExpandedRowEditMode; constructor(tableId: string, editMode?: boolean); } export declare class SetExpandedRowFullMode implements Action { tableId: string; fullMode?: boolean; readonly type = TableActionTypes.SetExpandedRowFullMode; constructor(tableId: string, fullMode?: boolean); } export declare class SetTableLimit implements Action { tableId: string; limit: number; readonly type = TableActionTypes.SetTableLimit; constructor(tableId: string, limit: number); } export declare class LoadTableData implements Action { tableId: string; collectionPath: string; readonly type = TableActionTypes.LoadTableData; constructor(tableId: string, collectionPath: string); } export declare class SetPageSize implements Action { tableId: string; pageSize: number; readonly type = TableActionTypes.SetPageSize; constructor(tableId: string, pageSize: number); } export declare class SetPage implements Action { tableId: string; page: number; readonly type = TableActionTypes.SetPage; constructor(tableId: string, page: number); } export declare class SetLoadingLimit implements Action { tableId: string; limit: number; readonly type = TableActionTypes.SetLoadingLimit; constructor(tableId: string, limit: number); } export declare class ToggleSorting implements Action { tableId: string; enabled?: boolean; readonly type = TableActionTypes.ToggleFiltering; constructor(tableId: string, enabled?: boolean); } export declare class ToggleFiltering implements Action { tableId: string; enabled?: boolean; readonly type = TableActionTypes.ToggleSorting; constructor(tableId: string, enabled?: boolean); } export declare class TogglePagination implements Action { tableId: string; enabled?: boolean; readonly type = TableActionTypes.TogglePagination; constructor(tableId: string, enabled?: boolean); } export declare class RegisterTable implements Action { tableId: string; payload: Partial>; readonly type = TableActionTypes.RegisterTable; constructor(tableId: string, payload: Partial>); } export declare class RegisterTables implements Action { tables: { [tableId: string]: Partial>; }; readonly type = TableActionTypes.RegisterTables; constructor(tables: { [tableId: string]: Partial>; }); } export declare class ActionWithRow { tableId: string; row: R; collectionPath: string; rowId: string; constructor(tableId: string, row: R, collectionPath: string); } export declare class DeleteRow extends ActionWithRow implements Action { readonly type = TableActionTypes.DeleteRow; } export declare class EditRow extends ActionWithRow implements Action { readonly type = TableActionTypes.EditRow; } export declare class ViewRow extends ActionWithRow implements Action { readonly type = TableActionTypes.ViewRow; } export declare class DownloadRow extends ActionWithRow implements Action { readonly type = TableActionTypes.DownloadRow; } export declare class SetExpandedRow extends ActionWithRow implements Action { editMode: boolean; toggle?: boolean; readonly type = TableActionTypes.SetExpandedRow; constructor(tableId: string, row: R, collectionPath: string, editMode: boolean, toggle?: boolean); } export declare class ArchiveRow extends ActionWithRow implements Action { readonly type = TableActionTypes.ArchiveRow; } export declare class RestoreRow extends ActionWithRow implements Action { readonly type = TableActionTypes.RestoreRow; } export declare class SelectRow extends ActionWithRow implements Action { readonly type = TableActionTypes.SelectRow; } export declare class AddRowToSelection extends ActionWithRow implements Action { readonly type = TableActionTypes.AddRowToSelection; } export declare class RemoveRowFromSelection extends ActionWithRow implements Action { readonly type = TableActionTypes.RemoveRowFromSelection; } export declare class MoveRowUp extends ActionWithRow implements Action { static TYPE: string; readonly type: string; } export declare class MoveRowDown extends ActionWithRow implements Action { static TYPE: string; readonly type: string; } export declare abstract class IconButtonTableAction implements Action { tableId: string; row: Row; readonly type: any; constructor(tableId: string, row: Row); } export declare type TableActions = ArchiveRow | RestoreRow | AddRowToSelection | RemoveRowFromSelection | RegisterTable | SetExpandedRow | ToggleFiltering | TogglePagination | ToggleSorting | ExportTableData | ImportTableData | ToggleDownload | ToggleUpload | ToggleShowUpdatedAt | ToggleShowCreatedAt | ToggleShowArchived | ToggleColumnHidden | SetLoadingLimit | SetPage | ViewRow | DownloadRow | AddRow | SetCurrentTableTab | SetExpandedRowEditMode | ToggleDialogEdit | ToggleDialogView | SetExpandedRowFullMode | RegisterTables | ClearExpandedRowId | LoadTableData | ClearSelectedRows | SetPageSize | SetFilter | EditRow | SetTableLimit | SelectRow;