Skip to content

Commit 8e83241

Browse files
committed
upgrade and many updates to db connections!
1 parent 1476b61 commit 8e83241

File tree

9 files changed

+369
-354
lines changed

9 files changed

+369
-354
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
"version": "0.1.0",
55
"private": true,
66
"dependencies": {
7-
"@emotion/react": "^11.9.0",
8-
"@emotion/styled": "^11.8.1",
7+
"@emotion/react": "^11.14.0",
8+
"@emotion/styled": "^11.14.0",
99
"@fontsource/roboto": "^4.5.5",
1010
"@mui/icons-material": "^5.14.0",
11-
"@mui/material": "^5.6.0",
11+
"@mui/material": "^7.0.2",
1212
"@reduxjs/toolkit": "^1.8.6",
1313
"@types/dompurify": "^3.0.5",
1414
"@types/validator": "^13.12.2",

src/app/App.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
getSessionId,
1414
} from './dfSlice'
1515

16-
import blue from '@mui/material/colors/blue';
16+
import { red, purple, blue, brown, yellow, orange, } from '@mui/material/colors';
1717

1818
import _ from 'lodash';
1919

@@ -559,11 +559,14 @@ export const AppFC: FC<AppFCProps> = function AppFC(appProps) {
559559
primary: {
560560
main: blue[700]
561561
},
562+
secondary: {
563+
main: purple[700]
564+
},
562565
derived: {
563-
main: "rgb(255,215,0)", // gold
566+
main: yellow[700],
564567
},
565568
custom: {
566-
main: "rgb(255, 160, 122)", //lightsalmon
569+
main: orange[700], //lightsalmon
567570
},
568571
warning: {
569572
main: '#bf5600', // New accessible color, original (#ed6c02) has insufficient color contrast of 3.11

src/app/dfSlice.tsx

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ export interface DataFormulatorState {
7171
defaultChartWidth: number;
7272
defaultChartHeight: number;
7373
}
74+
75+
dataLoaderConnectParams: Record<string, Record<string, string>>; // {table_name: {param_name: param_value}}
7476
}
7577

7678
// Define the initial state using that type
@@ -108,7 +110,9 @@ const initialState: DataFormulatorState = {
108110
maxRepairAttempts: 1,
109111
defaultChartWidth: 300,
110112
defaultChartHeight: 300,
111-
}
113+
},
114+
115+
dataLoaderConnectParams: {}
112116
}
113117

114118
let getUnrefedDerivedTableIds = (state: DataFormulatorState) => {
@@ -278,6 +282,8 @@ export const dataFormulatorSlice = createSlice({
278282
state.chartSynthesisInProgress = [];
279283

280284
state.config = initialState.config;
285+
286+
//state.dataLoaderConnectParams = initialState.dataLoaderConnectParams;
281287
},
282288
loadState: (state, action: PayloadAction<any>) => {
283289

@@ -305,6 +311,8 @@ export const dataFormulatorSlice = createSlice({
305311
state.chartSynthesisInProgress = [];
306312

307313
state.config = savedState.config;
314+
315+
state.dataLoaderConnectParams = savedState.dataLoaderConnectParams || {};
308316
},
309317
setConfig: (state, action: PayloadAction<{
310318
formulateTimeoutSeconds: number, maxRepairAttempts: number,
@@ -730,6 +738,24 @@ export const dataFormulatorSlice = createSlice({
730738
setSessionId: (state, action: PayloadAction<string>) => {
731739
state.sessionId = action.payload;
732740
},
741+
updateDataLoaderConnectParams: (state, action: PayloadAction<{dataLoaderType: string, params: Record<string, string>}>) => {
742+
let dataLoaderType = action.payload.dataLoaderType;
743+
let params = action.payload.params;
744+
state.dataLoaderConnectParams[dataLoaderType] = params;
745+
},
746+
updateDataLoaderConnectParam: (state, action: PayloadAction<{dataLoaderType: string, paramName: string, paramValue: string}>) => {
747+
let dataLoaderType = action.payload.dataLoaderType;
748+
if (!state.dataLoaderConnectParams[dataLoaderType]) {
749+
state.dataLoaderConnectParams[dataLoaderType] = {};
750+
}
751+
let paramName = action.payload.paramName;
752+
let paramValue = action.payload.paramValue;
753+
state.dataLoaderConnectParams[dataLoaderType][paramName] = paramValue;
754+
},
755+
deleteDataLoaderConnectParams: (state, action: PayloadAction<string>) => {
756+
let dataLoaderType = action.payload;
757+
delete state.dataLoaderConnectParams[dataLoaderType];
758+
}
733759
},
734760
extraReducers: (builder) => {
735761
builder

src/scss/ConceptShelf.scss

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -214,75 +214,6 @@
214214
}
215215
}
216216

217-
.info-panel-table {
218-
.info-panel-table-cell {
219-
padding: 0px 1px 0px 1px;
220-
.example-textfield {
221-
display: flex;
222-
}
223-
}
224-
225-
.info-panel-table-index-column {
226-
width: fit-content;
227-
padding: 0px;
228-
color: darkgray;
229-
font-size: smaller;
230-
font-style: italic;
231-
232-
}
233-
234-
.info-panel-table-header {
235-
236-
.info-panel-table-header-cell {
237-
padding: 0px 1px 0px 1px;
238-
max-width: 240px;
239-
240-
.info-panel-table-header-container {
241-
display: flex;
242-
flex-direction: row;
243-
justify-content: space-between;
244-
height: auto;
245-
padding: 2px 4px;
246-
position: relative;
247-
248-
}
249-
250-
.info-panel-table-header-container.row-index {
251-
background-color: white;
252-
border-bottom: 2px solid lightgray;
253-
}
254-
.info-panel-table-header-container.custom {
255-
background-color: #fff9f8;
256-
border-bottom: 2px solid #ffb395;
257-
}
258-
.info-panel-table-header-container.original {
259-
background-color: rgb(237, 247, 252);
260-
border-bottom: 2px solid #0288d1;
261-
}
262-
263-
.info-panel-table-header-title {
264-
margin: auto;
265-
margin-left: 3px;
266-
display: flex;
267-
align-items: center;
268-
}
269-
270-
.info-panel-table-header-name {
271-
font-size: inherit;
272-
margin-left: 3px;
273-
white-space: nowrap;
274-
overflow: hidden;
275-
text-overflow: ellipsis;
276-
flex-shrink: 1;
277-
font-style: italic;
278-
color: #333;
279-
}
280-
}
281-
282-
283-
}
284-
}
285-
286217
@keyframes color {
287218
0% { background: white; }
288219
50% { background: rgb(237, 247, 252); }

src/scss/VisualizationView.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,6 @@ $accelerate-ease: cubic-bezier(0.4, 0.0, 1, 1);
219219
animation: appear 0.5s ease-out
220220
}
221221

222-
.selected-card {
223-
//box-shadow: 2px 2px 4px lightslategray;
224-
border: 2px solid rgb(25, 118, 210);
225-
}
226222

227223
.vega-thumbnail {
228224

0 commit comments

Comments
 (0)