Skip to content

Commit 4dce3c2

Browse files
Frencilrmarkel-neonsampsonj
authored
v1.6.5 (#36)
* TimeSeriesViewer handle flat 0 axis datarange * initial NeonPage snapshots tests * NeonPage snapshot tests * SiteMap table export CSV * iterate on TimeSeriesViewer series bug * fix TimeSeriesV graph generation when seconds are not in t * iTimeSeriesViewerSummary snapshot tests * attempt to fix SiteMap safari marker click bug * ibump version to v1.6.5 * TimeSeriesViewerSites snapshot tests * lib export * fix lint * document FOREIGN_LOCATION env var in .env.develpoment * SiteMap marker type safety / table layout tweak * Update for DownloadDataButton Icon. * mockReactComponent safer rendering of functions and nodes * add prototype dataset JSON-LD injection * README updates * jettison legacy components; final lint/lib export * fix dialog paper z-index issue Co-authored-by: Robert Markel <[email protected]> Co-authored-by: jsampson <[email protected]>
1 parent 9b5dd6d commit 4dce3c2

File tree

164 files changed

+7756
-5725
lines changed

Some content is hidden

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

164 files changed

+7756
-5725
lines changed

.env.development

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,18 @@ REACT_APP_NEON_SHOW_AOP_VIEWER="true"
4141
REACT_APP_NEON_VISUS_PRODUCTS_BASE_URL="https://neon.visus.org/neonapi/products/"
4242
REACT_APP_NEON_VISUS_IFRAME_BASE_URL="https://neon.visus.org/visus-frame.html"
4343

44-
# Override for development purposes to point at various environments
45-
# Otherwise will derive from where the app is running (window.location.host)
44+
# API ROOT
45+
#
46+
# By default API calls made by core components use window.location.host for the root.
47+
#
48+
# This can be overridden using REACT_APP_NEON_HOST_OVERRIDE. Note that the override will
49+
# only be applied in a dev environment. To also apply override in production environments
50+
# set REACT_APP_FOREIGN_LOCATION to "true".
51+
#
52+
# Using portal-core-components as a dependency hosted outside of data.neonscience.org:
53+
# * Set REACT_APP_NEON_HOST_OVERRIDE to "https://data.neonscience.org"
54+
# * Set REACT_APP_FOREIGN_LOCATION to "true"
55+
# Rate limiting may apply. See https://data.neonscience.org/data-api/rate-limiting/ for details.
56+
4657
REACT_APP_NEON_HOST_OVERRIDE="https://int-data.neonscience.org"
47-
#REACT_APP_NEON_WS_HOST_OVERRIDE=""
58+
# REACT_APP_FOREIGN_LOCATION="true"

.eslintignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
src/registerServiceWorker.js
2-
src/lib_components/components/PopupBase
3-
src/lib_components/components/PopupLoading
42
src/lib_components/components/**/*.d.ts
53
src/lib_components/remoteAssets

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ To update **all** snapshots (after confirming all failures are expected from rec
187187
188188
npm run test:updateSnapshots
189189
190+
When tests are run test coverage information is generated. This appears in the shell and can also be found formatted as HTML pages in the `test_coverage` directory.
191+
190192
### Writing Tests
191193
192194
The Jest configuration will pick up all javascript files in a `__tests__` directory. By convention, for portal-core-components, every file that has accompanying unit tests should have an adjacent `__tests__` folder containing any/all test files, and each test file should bear the same name as the source file it is testing.
@@ -208,6 +210,7 @@ Example:
208210
| | | | __tests__/
209211
| | | | | OtherComponent.jsx
210212
213+
Several mocks exist for testing any part of the core components library that may need them. These can be found in `~/src/__mocks__`. See README.md in that directory for details.
211214
212215
## Building the Library
213216
@@ -226,7 +229,7 @@ For Windows users the `npm run lib` command may fail with complaint about 'NODE_
226229
227230
## Library Composition
228231
229-
This package was configured with advice from [this article](https://medium.com/@lokhmakov/best-way-to-create-npm-packages-with-create-react-app-b24dd449c354).
232+
This package was originally onfigured with advice from [this article](https://medium.com/@lokhmakov/best-way-to-create-npm-packages-with-create-react-app-b24dd449c354).
230233
231234
In summary, it began as a create-react-app app that was ejected. A `babel.config.json` was added with minor configuration and a script to invoke babel to run a library build was added.
232235

lib/components/DownloadDataButton/DownloadDataButton.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,9 @@ var DownloadDataButton = function DownloadDataButton(props) {
9292
color: "primary",
9393
variant: "contained",
9494
onClick: handleOpenDialog,
95-
"data-selenium": "download-data-button"
96-
}, gtmProps, other), label, /*#__PURE__*/_react.default.createElement(_SaveAlt.default, {
97-
style: {
98-
marginLeft: _Theme.default.spacing(1)
99-
}
100-
})), !dialogOpen ? null : /*#__PURE__*/_react.default.createElement(_react.Suspense, {
95+
"data-selenium": "download-data-button",
96+
endIcon: /*#__PURE__*/_react.default.createElement(_SaveAlt.default, null)
97+
}, gtmProps, other), label), !dialogOpen ? null : /*#__PURE__*/_react.default.createElement(_react.Suspense, {
10198
fallback: null
10299
}, /*#__PURE__*/_react.default.createElement(DownloadDataDialog, null)));
103100
};

lib/components/NeonEnvironment/NeonEnvironment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ var NeonEnvironment = {
270270
var root = NeonEnvironment.getRootJsonLdPath();
271271
var appliedPath = '';
272272

273-
if (['products'].includes(path)) {
273+
if (['products', 'prototype'].includes(path)) {
274274
appliedPath = NeonEnvironment.getApiPath[path]();
275275
} else if (typeof NeonEnvironment.getApiLdPath[path] === 'function') {
276276
appliedPath = NeonEnvironment.getApiLdPath[path]();

lib/components/NeonFooter/NeonFooter.css

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

lib/components/NeonFooter/NeonFooter.d.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@ declare function NeonFooter(props: any): JSX.Element;
33
declare namespace NeonFooter {
44
export namespace propTypes {
55
export const drupalCssLoaded: PropTypes.Requireable<boolean>;
6-
export const useCoreHeader: PropTypes.Requireable<boolean>;
76
}
87
export namespace defaultProps {
98
const drupalCssLoaded_1: boolean;
109
export { drupalCssLoaded_1 as drupalCssLoaded };
11-
const useCoreHeader_1: boolean;
12-
export { useCoreHeader_1 as useCoreHeader };
1310
}
1411
}
1512
import PropTypes from "prop-types";

lib/components/NeonFooter/NeonFooter.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ var _drupalFooter = _interopRequireDefault(require("../../remoteAssets/drupal-fo
2121

2222
var _NeonContext = _interopRequireWildcard(require("../NeonContext/NeonContext"));
2323

24-
var _NeonLegacyFooter = _interopRequireDefault(require("./NeonLegacyFooter"));
25-
2624
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
2725

2826
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -44,8 +42,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
4442
var DRUPAL_FOOTER_HTML = _remoteAssetsMap.default.DRUPAL_FOOTER_HTML.KEY;
4543

4644
var NeonFooter = function NeonFooter(props) {
47-
var drupalCssLoaded = props.drupalCssLoaded,
48-
useCoreHeader = props.useCoreHeader;
45+
var drupalCssLoaded = props.drupalCssLoaded;
4946

5047
var _NeonContext$useNeonC = _NeonContext.default.useNeonContextState(),
5148
_NeonContext$useNeonC2 = _slicedToArray(_NeonContext$useNeonC, 1),
@@ -56,7 +53,7 @@ var NeonFooter = function NeonFooter(props) {
5653

5754
var renderMode = 'legacy';
5855

59-
if (!useCoreHeader && neonContextIsActive) {
56+
if (neonContextIsActive) {
6057
switch (footerFetch.status) {
6158
case _NeonContext.FETCH_STATUS.SUCCESS:
6259
renderMode = footerHTML && drupalCssLoaded ? 'drupal' : 'loading';
@@ -88,22 +85,18 @@ var NeonFooter = function NeonFooter(props) {
8885
}, (0, _htmlReactParser.default)(footerHTML));
8986

9087
case 'drupal-fallback':
88+
default:
9189
return /*#__PURE__*/_react.default.createElement("footer", {
9290
id: "footer"
9391
}, (0, _htmlReactParser.default)(_drupalFooter.default));
94-
95-
default:
96-
return /*#__PURE__*/_react.default.createElement(_NeonLegacyFooter.default, null);
9792
}
9893
};
9994

10095
NeonFooter.propTypes = {
101-
drupalCssLoaded: _propTypes.default.bool,
102-
useCoreHeader: _propTypes.default.bool
96+
drupalCssLoaded: _propTypes.default.bool
10397
};
10498
NeonFooter.defaultProps = {
105-
drupalCssLoaded: false,
106-
useCoreHeader: false
99+
drupalCssLoaded: false
107100
};
108101
var _default = NeonFooter;
109102
exports.default = _default;

lib/components/NeonFooter/NeonLegacyFooter.d.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)