Skip to content

Commit 80a3a62

Browse files
authored
v1.10.0 (NEONScience#42)
* 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
1 parent da616f4 commit 80a3a62

File tree

74 files changed

+2784
-1256
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+2784
-1256
lines changed

README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,25 @@ And used like any other component in the containing render() method.
4444
### Using Components Outside of a NEON Domain
4545

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

50-
**`REACT_APP_NEON_HOST_OVERRIDE`**
50+
#### Development
5151

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

54-
**`REACT_APP_FOREIGN_LOCATION`**
54+
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.
5555

56-
Set this environment variable to `true`.
56+
#### Production
5757

58-
The host envvar above is typically reserved for development purposes and will be ignored in
59-
production *unless* the foreign location env var is true.
58+
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):
59+
60+
```javascript
61+
window.NEON_SERVER_DATA = {
62+
NeonPublicAPIHost: 'https://data.neonscience.org',
63+
NeonWebHost: 'https://www.neonscience.org',
64+
};
65+
```
6066

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

@@ -92,14 +98,14 @@ wrapping them in additional resources unless the documentation specifically stat
9298
* If the entry point is the _same pre- and post-compile_ then use only `main` to point to the common entry point
9399
* Use kebab-case for `name`
94100
* Use CamelCase for files
95-
6. Add the new component to `src/lib_components/index.ts`
101+
6. If desirable to export the component at the library level, add the new component to `src/lib_components/index.ts`
96102
7. Run `npm run lib` to have the new component picked up and exported with the library
97103
98104
### NOTE: Verify new dependencies!
99105
100106
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.
101107
102-
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.
108+
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.
103109
104110
### Using Workers in Components
105111
@@ -158,7 +164,7 @@ Have nodejs.
158164
159165
Clone this project from git. In the cloned directory, run:
160166
161-
npm install
167+
npm ci
162168
163169
This should pick up everything from the package-lock.json file via the npm repos.
164170

jest.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
module.exports = {
22
verbose: true,
3+
roots: [
4+
'<rootDir>/src/',
5+
],
36
moduleNameMapper: {
47
'typeface-inter': '<rootDir>/src/__mocks__/fileMock.js',
58
'\\.(css|less)$': '<rootDir>/src/__mocks__/styleMock.js',
@@ -17,6 +20,9 @@ module.exports = {
1720
testPathIgnorePatterns: [
1821
'<rootDir>/lib/',
1922
],
23+
modulePathIgnorePatterns: [
24+
'<rootDir>/lib/',
25+
],
2026
collectCoverage: true,
2127
coverageReporters: [
2228
'lcov',

lib/components/DataProductAvailability/StateStorageConverter.d.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

lib/components/DataProductAvailability/StateStorageConverter.js

Lines changed: 0 additions & 125 deletions
This file was deleted.

lib/components/DownloadDataContext/StatePersistence.d.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

lib/components/DownloadDataContext/StatePersistence.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

lib/components/DownloadDataDialog/NeonSignInButton.d.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

lib/components/DownloadDataDialog/NeonSignInButton.js

Lines changed: 0 additions & 43 deletions
This file was deleted.

lib/components/DownloadDataDialog/signInButtonState.d.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

lib/components/DownloadDataDialog/signInButtonState.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)