import { Action } from '@ngrx/store' ; import { RouteParams } from '../router/router.models' ; import { Datatable , DatatableColumn , UpdateRecord , SuggestionsQuery , DeleteRecord , } from './table.models' ; export const ADD_RECORD = '[Table] Add Record' ; export const ARE_RECORDS_LOADING = '[Table] Are Records Loading' ; export const DELETE_RECORD = '[Table] Delete Record' ; export const DESELECT_RECORD = '[Table] Deselect Record' ; export const DESELECT_RECORDS = '[Table] Deselect Records' ; export const EDIT_CANCEL = '[Table] Edit Cancel' ; export const GET_DATATABLE = '[Table] Get Datatable' ; export const GET_DATATABLE_COLUMNS = '[Table] Get Datatable Columns' ; export const GET_RECORDS = '[Table] Get Records' ; export const GET_SUGGESTIONS = '[Table] Get Select Items' ; export const INITIALIZE_SETTINGS = '[Table] Initialize Settings' ; export const RECEIVE_DATATABLE = '[Table] Receive Datatable' ; export const RECEIVE_DATATABLE_COLUMNS = '[Table] Receive Datatable Columns' ; export const RECEIVE_RECORDS = '[Table] Receive Records' ; export const RECEIVE_SUGGESTIONS = '[Table] Receive Select Items' ; export const REMOVE_RECORD = '[Table] Remove Record' ; export const REMOVE_RECORDS = '[Table] Remove Records' ; export const SELECT_RECORDS = '[Table] Select Records' ; export const SELECT_TABLE = '[Table] Select Table' ; export const UPDATE_COLUMNS_VISIBILITY = '[Table] Update Columns Visibility' ; export const UPDATE_KEYWORD = '[Table] Update Keyword' ; export const UPDATE_PAGINATION = '[Table] Update Pagination' ; export const UPDATE_RECORD = '[Table] Update Record' ; export const UPDATE_ROW_COUNT = '[Table] Update Row Count' ; export const UPDATE_SORT = '[Table] Update Sort' ; export const UPDATE_TABLE_NAME = '[Table] Update Table Name' ; export class AddRecordAction implements Action { type = ADD_RECORD ; constructor ( public payload ) { } } export class AreRecordsLoadingAction implements Action { type = ARE_RECORDS_LOADING ; constructor ( public payload ) { } } export class DeleteRecordAction implements Action { type = DELETE_RECORD ; constructor ( public payload ) { } } export class DeselectRecordAction implements Action { type = DESELECT_RECORD ; constructor ( public payload ) { } } export class DeselectRecordsAction implements Action { type = DESELECT_RECORDS ; constructor ( public payload ) { } } export class EditCancelAction implements Action { type = EDIT_CANCEL ; constructor ( public payload ) { } } export class GetDatatableAction implements Action { type = GET_DATATABLE ; constructor ( public payload ) { } } export class GetDatatableColumnsAction implements Action { type = GET_DATATABLE_COLUMNS ; constructor ( public payload ) { } } export class GetRecordsAction implements Action { type = GET_RECORDS ; constructor ( public payload ) { } } export class GetSuggestionsAction implements Action { type = GET_SUGGESTIONS ; constructor ( public payload ) { } } export class InitializeSettingsAction implements Action { type = INITIALIZE_SETTINGS ; constructor ( public payload ) { } } export class ReceiveDatatableAction implements Action { type = RECEIVE_DATATABLE ; constructor ( public payload ) { } } export class ReceiveDatatableColumnsAction implements Action { type = RECEIVE_DATATABLE_COLUMNS ; constructor ( public payload ) { } } export class ReceiveRecordsAction implements Action { type = RECEIVE_RECORDS ; constructor ( public payload ) { } } export class ReceiveSuggestionsAction implements Action { type = RECEIVE_SUGGESTIONS ; constructor ( public payload ) { } } export class RemoveRecordAction implements Action { type = REMOVE_RECORD ; constructor ( public payload ) { } } export class RemoveTableRecordsAction implements Action { type = REMOVE_RECORDS ; constructor ( public payload ) { } } export class SelectRecordsAction implements Action { type = SELECT_RECORDS ; constructor ( public payload ) { } } export class SelectTableAction implements Action { type = SELECT_TABLE ; constructor ( public payload ) { } } export class UpdateColumnsVisibilityAction implements Action { type = UPDATE_COLUMNS_VISIBILITY ; constructor ( public payload ) { } } export class UpdateKeywordAction implements Action { type = UPDATE_KEYWORD ; constructor ( public payload ) { } } export class UpdatePaginationAction implements Action { type = UPDATE_PAGINATION ; constructor ( public payload ) { } } export class UpdateRecordAction implements Action { type = UPDATE_RECORD ; constructor ( public payload ) { } } export class UpdateRowCountAction implements Action { type = UPDATE_ROW_COUNT ; constructor ( public payload ) { } } export class UpdateSortAction implements Action { type = UPDATE_SORT ; constructor ( public payload ) { } } export class UpdateTableNameAction implements Action { type = UPDATE_TABLE_NAME ; constructor ( public payload ) { } } export type TableActions = AddRecordAction | AreRecordsLoadingAction | DeleteRecordAction | DeselectRecordAction | DeselectRecordsAction | GetDatatableColumnsAction | GetRecordsAction | InitializeSettingsAction | ReceiveDatatableColumnsAction | ReceiveRecordsAction | RemoveRecordAction | RemoveTableRecordsAction | SelectRecordsAction | UpdateColumnsVisibilityAction | UpdatePaginationAction | UpdateRecordAction | UpdateRowCountAction | UpdateSortAction | UpdateTableNameAction ;