-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added Neon public API host variable with value pulled from server data. * Fixed function name. * Updates for setting public API host through server data. * Updated valid hosts regex pattern. * Reset NEON_SERVER_DATA * Minor cleanup. * Update for web socket host determination. * Added prototype typescript environment module. * Cleanup. * Fixed test and cleanup. * Removed unused variable. * Removed file. * site map: handle maxZoom property propagation * site map: update mapZoom initialization to include bounds * NeonContext final state when core auth, TS context include release * resolve authentication state when silent SSO disabled * Neon sign in modifications. * Updates. * pull out route handling to dedicated service * fix host regex validation, update routes * reduce .env usage * fix account route * fix logout redirect path handling * Added new file. * Updates. * Update. * Added subject type. * Refactoring for NEON sign in button observer pattern. * Create more generalized state storage service. * Updates. * change site type relocatable references to gradient * Changes for persisting SiteMap state when sign in button is clicked. * initial draft of document viewer component * Added state persistence to TimeSeriesViewer * Updates for DataAvailability state persistence. * Updates from npm run lib. * fix typo in document viewer style guide * delineate TS state restore by key, update stored status * Minor cleanup. * Removed state after restore. * Updates for state persistence with multiple instances. * Updates after npm run lib. * add global feature flag for sign in state save, download state save in dialog only * propagate use of enable global sign in state * handle AOP path in download context session storage * Removed MG-RAST references. * Removed MG-RAST reference. * 1.9.0 Co-authored-by: Robert Markel <rmarkel@battelleecology.org>
- Loading branch information
1 parent
7b0b5e6
commit d7405d7
Showing
128 changed files
with
3,558 additions
and
1,447 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,4 @@ | |
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
lib/components/DataProductAvailability/StateStorageConverter.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* Alter the current state for valid JSON serialization. | ||
* @param currentState The current state | ||
*/ | ||
declare const convertStateForStorage: (state: any) => any; | ||
/** | ||
* Restore the state from JSON serialization. | ||
* @param storedState The state read from storage. | ||
*/ | ||
declare const convertStateFromStorage: (state: any) => any; | ||
export { convertStateForStorage, convertStateFromStorage }; |
125 changes: 125 additions & 0 deletions
125
lib/components/DataProductAvailability/StateStorageConverter.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
"use strict"; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.convertStateFromStorage = exports.convertStateForStorage = void 0; | ||
|
||
var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep")); | ||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
|
||
/** | ||
* Alter the current state for valid JSON serialization. | ||
* @param currentState The current state | ||
*/ | ||
var convertStateForStorage = function convertStateForStorage(state) { | ||
var newState = (0, _cloneDeep.default)(state); // variables | ||
// const { variables: stateVariables } = state; | ||
// Object.keys(stateVariables).forEach((variableKey, index) => { | ||
// const { sites, tables, timeSteps } = stateVariables[variableKey]; | ||
// if (sites instanceof Set && sites.size > 0) { | ||
// newState.variables[variableKey].sites = Array.from(sites); | ||
// } else { | ||
// newState.variables[variableKey].sites = []; | ||
// } | ||
// if (tables instanceof Set && sites.size > 0) { | ||
// newState.variables[variableKey].tables = Array.from(tables); | ||
// } else { | ||
// newState.variables[variableKey].tables = []; | ||
// } | ||
// if (timeSteps instanceof Set && sites.size > 0) { | ||
// newState.variables[variableKey].timeSteps = Array.from(timeSteps); | ||
// } else { | ||
// newState.variables[variableKey].timeSteps = []; | ||
// } | ||
// }); | ||
// // product site variables | ||
// const { sites: productSites } = state.product; | ||
// Object.keys(productSites).forEach((siteKey, index) => { | ||
// const { variables: siteVariables } = productSites[siteKey]; | ||
// if (siteVariables instanceof Set && siteVariables.size > 0) { | ||
// newState.product.sites[siteKey].variables = Array.from(siteVariables); | ||
// } else { | ||
// newState.product.sites[siteKey].variables = []; | ||
// } | ||
// }); | ||
// // available quality flags | ||
// const { availableQualityFlags } = state; | ||
// if (availableQualityFlags instanceof Set) { | ||
// newState.availableQualityFlags = Array.from(availableQualityFlags); | ||
// } else { | ||
// newState.availableQualityFlags = []; | ||
// } | ||
// // available time steps | ||
// const { availableTimeSteps } = state; | ||
// if (availableTimeSteps instanceof Set) { | ||
// newState.availableTimeSteps = Array.from(availableTimeSteps); | ||
// } else { | ||
// newState.availableTimeSteps = []; | ||
// } | ||
|
||
return newState; | ||
}; | ||
/** | ||
* Restore the state from JSON serialization. | ||
* @param storedState The state read from storage. | ||
*/ | ||
|
||
|
||
exports.convertStateForStorage = convertStateForStorage; | ||
|
||
var convertStateFromStorage = function convertStateFromStorage(state) { | ||
var newState = (0, _cloneDeep.default)(state); // // graphData data | ||
// const data = state.graphData.data.map((entry: any) => [new Date(entry[0]), entry[1]]); | ||
// newState.graphData.data = data; | ||
// // state variables | ||
// const { variables } = state; | ||
// Object.keys(variables).forEach((key, index) => { | ||
// const { sites, tables, timeSteps } = variables[key]; | ||
// if (Array.isArray(sites)) { | ||
// newState.variables[key].sites = new Set(sites); | ||
// } else { | ||
// newState.variables[key].sites = new Set(); | ||
// } | ||
// if (Array.isArray(tables)) { | ||
// newState.variables[key].tables = new Set(tables); | ||
// } else { | ||
// newState.variables[key].tables = new Set(); | ||
// } | ||
// if (Array.isArray(timeSteps)) { | ||
// newState.variables[key].timeSteps = new Set(timeSteps); | ||
// } else { | ||
// newState.variables[key].timeSteps = new Set(); | ||
// } | ||
// }); | ||
// // product site variables | ||
// const { sites: productSites } = state.product; | ||
// // get the variables for each site | ||
// Object.keys(productSites).forEach((siteKey, index) => { | ||
// const { variables: siteVariables } = productSites[siteKey]; | ||
// if (Array.isArray(siteVariables) && siteVariables.length > 0) { | ||
// newState.product.sites[siteKey].variables = new Set(siteVariables); | ||
// } else { | ||
// newState.product.sites[siteKey].variables = new Set(); | ||
// } | ||
// }); | ||
// // available quality flags | ||
// const { availableQualityFlags } = state; | ||
// if (Array.isArray(availableQualityFlags)) { | ||
// newState.availableQualityFlags = new Set(availableQualityFlags); | ||
// } else { | ||
// newState.availableQualityFlags = new Set(); | ||
// } | ||
// // available quality flags | ||
// const { availableTimeSteps } = state; | ||
// if (Array.isArray(availableTimeSteps)) { | ||
// newState.availableTimeSteps = new Set(availableTimeSteps); | ||
// } else { | ||
// newState.availableTimeSteps = new Set(); | ||
// } | ||
|
||
return newState; | ||
}; | ||
|
||
exports.convertStateFromStorage = convertStateFromStorage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from 'react'; | ||
import { NeonDocument } from '../../types/neon'; | ||
export interface DocumentViewerProps { | ||
document: NeonDocument; | ||
width: number; | ||
} | ||
declare const DocumentViewer: React.FC<DocumentViewerProps>; | ||
export default DocumentViewer; |
Oops, something went wrong.