dc/client/src/app/_globals.ts

119 lines
2.8 KiB
TypeScript

import { QueryClause } from './models/TableData'
interface FilterCache {
cols: any[]
vals: any[]
groupLogic: string
whereClause: string
libds: string
clauses: any[]
query: QueryClause[]
}
interface ViewboxCache {
[key: number]: {
filter: FilterCache
}
}
export const initFilter: { filter: FilterCache } = {
filter: {
cols: <any[]>[],
vals: <any[]>[],
groupLogic: <string>'',
whereClause: <string>'',
libds: <string>'',
clauses: <any>[],
query: <QueryClause[]>[]
}
}
export const globals: {
rootParam: string
editor: any
viewer: any
viewboxes: ViewboxCache
lineage: any
metadata: any
viyaApi: any
usernav: any
operators: any
[key: string]: any
} = {
rootParam: <string>'',
editor: {
startupSet: <boolean>false,
treeNodeLibraries: <any[] | null>[],
libsAndTables: <any[]>[],
libraries: <String[] | undefined>[],
library: <string>'',
table: <string>'',
filter: <FilterCache>{
cols: <any[]>[],
vals: <any[]>[],
groupLogic: <string>'',
whereClause: <string>'',
libds: <string>'',
clauses: <any>[],
query: <QueryClause[]>[]
}
},
viewer: {
startupSet: <boolean>false,
tablesSet: <boolean>false,
libraries: <any[]>[],
tables: <any>null,
library: '',
table: '',
libinfo: [],
librariesSearch: <string>'',
filter: <FilterCache>{
cols: <any[]>[],
vals: <any[]>[],
groupLogic: <string>'',
whereClause: <string>'',
libds: <string>'',
clauses: <any>[],
query: <QueryClause[]>[]
},
currentSelection: <string>''
},
viewboxes: {},
lineage: {
libraryList: <any[] | undefined>[],
tablesList: <any[] | undefined>[],
columnsList: <any[] | undefined>[],
librariesSearch: <string>'',
lib: <String | null>'',
table: <String | undefined>'',
column: <String | undefined>'',
currentLineagePathLibTable: <String>'',
currentLineagePathColumn: <String>''
},
metadata: {
metaDataList: <any[] | undefined>undefined,
metaDataSearch: <string>'',
metaObjectList: <any[] | undefined>[],
metaObjectSearch: <string>'',
metaRepositories: <any[] | undefined>undefined,
selectedRepository: <string>''
},
viyaApi: {
collectionsList: <any[] | undefined>undefined,
collectionsSearch: <string>'',
selectedRepository: <string>''
},
usernav: {
userList: <any[] | undefined>undefined,
userSearch: <string>'',
groupList: <any[] | undefined>undefined,
groupSearch: <string>'',
roleList: <any[] | undefined>undefined,
roleSearch: <string>''
},
operators: {
numOperators: ['=', '<', '>', '<=', '>=', 'BETWEEN', 'IN', 'NOT IN', 'NE'],
charOperators: ['=', '<', '>', '<=', '>=', 'CONTAINS', 'IN', 'NOT IN', 'NE']
}
}