import { Settings } from './models'; export const DASHBOARD_STORE = 'dashboardStore'; export const FETCH_TABLES = 'fetchTables'; export const FETCH_TABLE = 'fetchTable'; export const CREATE_TABLE = 'createTable'; export const DELETE_TABLE = 'deleteTable'; export const UPLOAD_TABLE = 'uploadTable'; export const SAVE_TABLE_CHANGES = 'saveTableChanges'; export const SAVE_TABLE_SETTINGS = 'saveTableSettings'; export const FETCH_TABLE_SETTINGS = 'fetchTableSettings'; export const CANCEL_IMPORT = 'cancelImport'; export const ROWS_PER_PAGE_OPTIONS = [5, 10, 15, 20]; // Shared module state — deep-clone (JSON round-trip) before mutating nested // members; a spread copy still aliases the nested objects. export const INITIAL_SETTINGS: Settings = { general: { backgroundColor: '', bordered: false, dark: false, dense: false, flat: false, fullscreen: false, grid: { desktop: false, tablet: false, mobile: false }, gridColumns: { desktop: 3, tablet: 2, mobile: 1 }, separator: 'horizontal', square: false, textColor: '', }, bottom: { backgroundColor: '', textColor: '', hidePagination: false, rowsPerPageLabel: 'Records per page', initial: { sortBy: 'desc', descending: false, page: 1, rowsPerPage: 10, }, }, content: { buttonText: 'Link', buttonBgColor: '', buttonTextColor: '', linkTextColor: '', imageHeight: 50, imageWidth: 50, previewMode: true, turnLinksToButtons: false, turnLinksToImages: true, verticalAlignment: 'middle', allowHtml: true, autoSync: false, syncInterval: 5, jsonPreviewLines: 10, }, columns: { stickyFirstColumn: false, stickyFirstColumnBgColor: 'white', stickyFirstColumnTextColor: 'dark', stickyLastColumn: false, stickyLastColumnBgColor: 'white', stickyLastColumnTextColor: 'dark', columnsMaxWidth: {}, columnsMinWidth: {}, visibleColumns: [], hiddenColumns: [], }, customCss: { cardClass: '', css: '', tableClass: '', tableHeaderClass: '', titleClass: '', }, dimensions: { tableHeight: null, tableMaxWidth: null, }, search: { color: '', bgColor: '', searchOn: false, filter: '', searchInputStyle: 'standard', }, filter: { filterOn: false, logic: 'AND', conditions: [], }, sorting: { sortingOn: false, binaryStateSort: false, columnSortOrder: 'ad', }, top: { hideHeader: false, hideTitle: false, headerBackgroundColor: '', headerTextColor: '', stickyHeader: false, textColor: '', topBackgroundColor: '', }, virtualScroll: { virtualScrollOn: false, virtualScrollSliceSize: 30, virtualScrollSliceRatioBefore: 1, virtualScrollSliceRatioAfter: 1, virtualScrollStickySizeStart: 0, }, columnGroups: { enabled: false, tree: [], }, };