Skip to content

Commit

Permalink
v1.10.0 (#42)
Browse files Browse the repository at this point in the history
* time series: handle irregular series, map based on timestamp

* 1.9.1

* handle sending credentials with CORS requests to support multiple domains

* remove cors withCredentials by default for arcgis asset API calls

* 1.10.0-rc.1.0

* utilize bundles from API, restructure

* clean up lib generation

* add bundle service, parser

* prepare v1.10.0-rc.2.0

* prepare v1.10.0
  • Loading branch information
sampsonj authored Nov 10, 2021
1 parent da616f4 commit 80a3a62
Show file tree
Hide file tree
Showing 74 changed files with 2,784 additions and 1,256 deletions.
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,25 @@ And used like any other component in the containing render() method.
### Using Components Outside of a NEON Domain

Portal Core Components are designed to be used throughout the NEON web application platform as well
as on any third party platform. However, in order to work properly outside of NEON, two environment
variable must be set so that components that generate links do so properly.
as on any third party platform. However, in order to work properly outside of NEON, environment
variables must be set to reference the appropriate API endpoints.

**`REACT_APP_NEON_HOST_OVERRIDE`**
#### Development

Set this environment variable to your host without a trailing slash (e.g. "https://myhost.org").
**`REACT_APP_NEON_API_HOST_OVERRIDE`**

**`REACT_APP_FOREIGN_LOCATION`**
Set this environment variable to the desired API host without a trailing slash (e.g. "https://data.neonscience.org"). Note that this is a build time environment variable and if set within `.env.production` will impact *all* deployments.

Set this environment variable to `true`.
#### Production

The host envvar above is typically reserved for development purposes and will be ignored in
production *unless* the foreign location env var is true.
By default, the production build will use the appropriate production values for the API host. To customize based on runtime environment variables, will need to inject the following object into the DOM prior to the application's initialization (e.g. inject into the static HTML server side or equivalent):

```javascript
window.NEON_SERVER_DATA = {
NeonPublicAPIHost: 'https://data.neonscience.org',
NeonWebHost: 'https://www.neonscience.org',
};
```

#### Theming and Contexts Outside of a NEON Domain

Expand Down Expand Up @@ -92,14 +98,14 @@ wrapping them in additional resources unless the documentation specifically stat
* If the entry point is the _same pre- and post-compile_ then use only `main` to point to the common entry point
* Use kebab-case for `name`
* Use CamelCase for files
6. Add the new component to `src/lib_components/index.ts`
6. If desirable to export the component at the library level, add the new component to `src/lib_components/index.ts`
7. Run `npm run lib` to have the new component picked up and exported with the library
### NOTE: Verify new dependencies!
If you have added or modified third-party dependencies then it is important to verify they work from a fresh install before committing changes upstream.
Run `rm -rf node_modules && npm install` and re-run the app to validate a fresh install. This mimics how other apps importing `portal-core-components` will see your changes.
Run `rm -rf node_modules && npm ci` and re-run the app to validate a fresh install. This mimics how other apps importing `portal-core-components` will see your changes.
### Using Workers in Components
Expand Down Expand Up @@ -158,7 +164,7 @@ Have nodejs.
Clone this project from git. In the cloned directory, run:
npm install
npm ci
This should pick up everything from the package-lock.json file via the npm repos.
Expand Down
6 changes: 6 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
module.exports = {
verbose: true,
roots: [
'<rootDir>/src/',
],
moduleNameMapper: {
'typeface-inter': '<rootDir>/src/__mocks__/fileMock.js',
'\\.(css|less)$': '<rootDir>/src/__mocks__/styleMock.js',
Expand All @@ -17,6 +20,9 @@ module.exports = {
testPathIgnorePatterns: [
'<rootDir>/lib/',
],
modulePathIgnorePatterns: [
'<rootDir>/lib/',
],
collectCoverage: true,
coverageReporters: [
'lcov',
Expand Down
11 changes: 0 additions & 11 deletions lib/components/DataProductAvailability/StateStorageConverter.d.ts

This file was deleted.

125 changes: 0 additions & 125 deletions lib/components/DataProductAvailability/StateStorageConverter.js

This file was deleted.

2 changes: 0 additions & 2 deletions lib/components/DownloadDataContext/StatePersistence.d.ts

This file was deleted.

24 changes: 0 additions & 24 deletions lib/components/DownloadDataContext/StatePersistence.js

This file was deleted.

2 changes: 0 additions & 2 deletions lib/components/DownloadDataDialog/NeonSignInButton.d.ts

This file was deleted.

43 changes: 0 additions & 43 deletions lib/components/DownloadDataDialog/NeonSignInButton.js

This file was deleted.

3 changes: 0 additions & 3 deletions lib/components/DownloadDataDialog/signInButtonState.d.ts

This file was deleted.

23 changes: 0 additions & 23 deletions lib/components/DownloadDataDialog/signInButtonState.js

This file was deleted.

5 changes: 3 additions & 2 deletions lib/components/NeonApi/NeonApi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export function getTestableItems(): {
postJsonObservable?: undefined;
} | {
getApiTokenHeader: (headers?: Object | undefined) => Object;
getJsonObservable: (url: string, headers?: Object | undefined, includeToken?: boolean) => import("rxjs").Observable<any>;
postJsonObservable: (url: string, body: any, headers?: Object | undefined, includeToken?: boolean) => import("rxjs").Observable<import("rxjs/ajax").AjaxResponse> | import("rxjs").Observable<null>;
getJsonObservable: (url: string, headers?: Object | undefined, includeToken?: boolean, withCredentials?: boolean) => import("rxjs").Observable<any>;
postJsonObservable: (url: string, body: any, headers?: Object | undefined, includeToken?: boolean, withCredentials?: boolean) => import("rxjs").Observable<import("rxjs/ajax").AjaxResponse> | import("rxjs").Observable<null>;
};
declare namespace NeonApi {
function getApiTokenHeader(headers?: Object | undefined): Object;
Expand All @@ -15,6 +15,7 @@ declare namespace NeonApi {
function getJson(url: string, callback: any, errorCallback: any, cancellationSubject$: any, headers?: Object | undefined): import("rxjs").Subscription;
function getProductsObservable(): import("rxjs").Observable<any>;
function getProductObservable(productCode: string, release?: string): import("rxjs").Observable<any>;
function getProductBundlesObservable(release?: string): import("rxjs").Observable<any>;
function getPrototypeDatasetsObservable(): import("rxjs").Observable<any>;
function getPrototypeDatasetObservable(uuid: any): import("rxjs").Observable<any>;
function getPrototypeManifestRollupObservable(uuid: any): import("rxjs").Observable<any>;
Expand Down
Loading

0 comments on commit 80a3a62

Please sign in to comment.