-
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.
* add table slice to time series, fix default variable determination * add tombstone availability status support * fix runtime validation of tombstoned status type * add table slice to time series, fix default variable determination * enable multi citation support for bundles * update citation bundle display * update citation bundle display * create bundle presentation component, update citation display * pull out bundle content builder from component * regen drupal assets * update bundle blurbs and display * tweak citation use language * improve drupal asset handling, font, style loading * improve css response handling, script await refinement, regen assets * update image asset location update in drupal css cleaning * update assets script options, allow env var for disabling drupal fetch * helper script for apps to synchronize cached public assets * handle multi-citation release case * inject only single metadata tags for multi parent * add bundled information link, generate lib * prepare v2.1.0 * remove parent language from bundle subtitles
- Loading branch information
Showing
133 changed files
with
4,998 additions
and
15,088 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/// <reference types="react" /> | ||
import { IDataProductLike } from '../../types/internal'; | ||
export interface IBundleContentBuilder { | ||
getParentProductLink: (dataProduct: IDataProductLike, release?: string) => JSX.Element; | ||
getBundledLink: () => JSX.Element; | ||
buildManyParentsMainContent: (dataProducts: IDataProductLike[], release?: string) => JSX.Element; | ||
buildDefaultTitleContent: (dataProduct: IDataProductLike, release?: string) => JSX.Element; | ||
buildDefaultSplitTitleContent: (isRelease: boolean, terminalChar?: string) => JSX.Element; | ||
buildDefaultSubTitleContent: (forwardAvailability: boolean, hasManyParents: boolean) => JSX.Element; | ||
} | ||
declare const BundleContentBuilder: IBundleContentBuilder; | ||
export default BundleContentBuilder; |
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,61 @@ | ||
"use strict"; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _Link = _interopRequireDefault(require("@material-ui/core/Link")); | ||
var _RouteService = _interopRequireDefault(require("../../service/RouteService")); | ||
var _Theme = _interopRequireDefault(require("../Theme/Theme")); | ||
var _typeUtil = require("../../util/typeUtil"); | ||
var _ReleaseService = require("../../service/ReleaseService"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var BundleContentBuilder = { | ||
getParentProductLink: function getParentProductLink(dataProduct, release) { | ||
var isRelease = (0, _typeUtil.isStringNonEmpty)(release) && release !== _ReleaseService.LATEST_AND_PROVISIONAL; | ||
var href = _RouteService.default.getProductDetailPath(dataProduct.productCode, isRelease ? release : undefined); | ||
return /*#__PURE__*/_react.default.createElement(_Link.default, { | ||
href: href, | ||
target: "_blank" | ||
}, "".concat(dataProduct.productName, " (").concat(dataProduct.productCode, ")")); | ||
}, | ||
getBundledLink: function getBundledLink() { | ||
var href = _RouteService.default.getDataProductBundlesPath(); | ||
return /*#__PURE__*/_react.default.createElement(_Link.default, { | ||
href: href, | ||
target: "_blank" | ||
}, "bundled"); | ||
}, | ||
buildManyParentsMainContent: function buildManyParentsMainContent(dataProducts, release) { | ||
return /*#__PURE__*/_react.default.createElement("ul", { | ||
style: { | ||
margin: _Theme.default.spacing(1, 0) | ||
} | ||
}, dataProducts.map(function (dataProduct) { | ||
return /*#__PURE__*/_react.default.createElement("li", { | ||
key: dataProduct.productCode | ||
}, BundleContentBuilder.getParentProductLink(dataProduct, release)); | ||
})); | ||
}, | ||
buildDefaultTitleContent: function buildDefaultTitleContent(dataProduct, release) { | ||
var isRelease = (0, _typeUtil.isStringNonEmpty)(release) && release !== _ReleaseService.LATEST_AND_PROVISIONAL; | ||
var bundleParentLink = BundleContentBuilder.getParentProductLink(dataProduct, isRelease ? release : undefined); | ||
var bundledLink = BundleContentBuilder.getBundledLink(); | ||
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "This data product ", isRelease ? 'release ' : '', "is ", bundledLink, " into ", bundleParentLink); | ||
}, | ||
buildDefaultSplitTitleContent: function buildDefaultSplitTitleContent(isRelease, terminalChar) { | ||
var bundledLink = BundleContentBuilder.getBundledLink(); | ||
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "This data product ", isRelease ? 'release ' : '', "is ", bundledLink, " into the following data product", isRelease ? ' releases' : 's', "".concat(terminalChar)); | ||
}, | ||
buildDefaultSubTitleContent: function buildDefaultSubTitleContent(forwardAvailability, hasManyParents) { | ||
return ( | ||
/*#__PURE__*/ | ||
// eslint-disable-next-line react/jsx-no-useless-fragment | ||
_react.default.createElement(_react.default.Fragment, null, forwardAvailability ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "It is not available as a standalone download. Data availability shown below reflects availability of the entire bundle.") : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "It is not available as a standalone download. Data availability information and data product download is only available through the bundle data ", hasManyParents ? 'products' : 'product', ".")) | ||
); | ||
} | ||
}; | ||
Object.freeze(BundleContentBuilder); | ||
var _default = BundleContentBuilder; | ||
exports.default = _default; |
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,6 @@ | ||
import React from 'react'; | ||
export interface BundleListItemIconProps { | ||
isSplit?: boolean; | ||
} | ||
declare const BundleListItemIcon: React.FC<BundleListItemIconProps>; | ||
export default BundleListItemIcon; |
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,35 @@ | ||
"use strict"; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _ListItemIcon = _interopRequireDefault(require("@material-ui/core/ListItemIcon")); | ||
var _styles = require("@material-ui/core/styles"); | ||
var _reactFontawesome = require("@fortawesome/react-fontawesome"); | ||
var _freeSolidSvgIcons = require("@fortawesome/free-solid-svg-icons"); | ||
var _Theme = _interopRequireDefault(require("../Theme/Theme")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var useStyles = (0, _styles.makeStyles)(function (theme) { | ||
return { | ||
bundleIcon: { | ||
padding: '5px', | ||
marginRight: theme.spacing(2) | ||
} | ||
}; | ||
}); | ||
var BundleListItemIcon = function BundleListItemIcon(props) { | ||
var classes = useStyles(_Theme.default); | ||
var isSplit = props.isSplit; | ||
return /*#__PURE__*/_react.default.createElement(_ListItemIcon.default, null, /*#__PURE__*/_react.default.createElement(_reactFontawesome.FontAwesomeIcon, { | ||
icon: isSplit ? _freeSolidSvgIcons.faBoxesStacked : _freeSolidSvgIcons.faBox, | ||
size: "2x", | ||
className: classes.bundleIcon | ||
})); | ||
}; | ||
BundleListItemIcon.defaultProps = { | ||
isSplit: false | ||
}; | ||
var _default = BundleListItemIcon; | ||
exports.default = _default; |
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,19 @@ | ||
import React from 'react'; | ||
export interface DataProductBundleCardClasses { | ||
card?: string; | ||
cardContent?: string; | ||
cardContentFlexContainer?: string; | ||
cardContentContainer?: string; | ||
cardIcon?: string; | ||
} | ||
export interface DataProductBundleCardProps { | ||
titleContent?: React.ReactNode; | ||
detailContent?: React.ReactNode; | ||
subTitleContent?: React.ReactNode; | ||
customContent?: React.ReactNode; | ||
isSplit?: boolean; | ||
showIcon?: boolean; | ||
classes?: DataProductBundleCardClasses; | ||
} | ||
declare const DataProductBundleCard: React.FC<DataProductBundleCardProps>; | ||
export default DataProductBundleCard; |
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,106 @@ | ||
"use strict"; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _Card = _interopRequireDefault(require("@material-ui/core/Card")); | ||
var _CardContent = _interopRequireDefault(require("@material-ui/core/CardContent")); | ||
var _Typography = _interopRequireDefault(require("@material-ui/core/Typography")); | ||
var _styles = require("@material-ui/core/styles"); | ||
var _reactFontawesome = require("@fortawesome/react-fontawesome"); | ||
var _freeSolidSvgIcons = require("@fortawesome/free-solid-svg-icons"); | ||
var _Theme = _interopRequireDefault(require("../Theme/Theme")); | ||
var _typeUtil = require("../../util/typeUtil"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var useStyles = (0, _styles.makeStyles)(function (theme) { | ||
return { | ||
card: { | ||
backgroundColor: _Theme.default.colors.GOLD[50], | ||
borderColor: _Theme.default.colors.GOLD[200], | ||
marginTop: theme.spacing(1) | ||
}, | ||
cardContent: { | ||
padding: theme.spacing(2), | ||
paddingBottom: "".concat(theme.spacing(2), "px !important") | ||
}, | ||
cardContentFlexContainer: { | ||
display: 'flex', | ||
alignItems: 'center', | ||
padding: theme.spacing(2), | ||
paddingBottom: "".concat(theme.spacing(2), "px !important") | ||
}, | ||
cardContentContainer: { | ||
flexGrow: 1 | ||
}, | ||
cardIcon: { | ||
color: theme.colors.GOLD[700], | ||
padding: '5px', | ||
fontSize: '2.3875em', | ||
marginRight: theme.spacing(2) | ||
}, | ||
cardIconBoxesStacked: { | ||
color: theme.colors.GOLD[700], | ||
fontSize: '2.3875em', | ||
marginRight: theme.spacing(2) | ||
} | ||
}; | ||
}); | ||
var DataProductBundleCard = function DataProductBundleCard(props) { | ||
var classes = useStyles(_Theme.default); | ||
var titleContent = props.titleContent, | ||
subTitleContent = props.subTitleContent, | ||
detailContent = props.detailContent, | ||
customContent = props.customContent, | ||
isSplit = props.isSplit, | ||
showIcon = props.showIcon, | ||
customClasses = props.classes; | ||
var customCardClass = customClasses ? customClasses.card : undefined; | ||
var customCardContentClass = customClasses ? customClasses.cardContent : undefined; | ||
var customCardContentFlexContainerClass = customClasses ? customClasses.cardContentFlexContainer : undefined; | ||
var customCardContentContainerClass = customClasses ? customClasses.cardContentContainer : undefined; | ||
var customIconClass = customClasses ? customClasses.cardIcon : undefined; | ||
var renderContent = function renderContent() { | ||
if ((0, _typeUtil.exists)(customContent)) { | ||
// eslint-disable-next-line react/jsx-no-useless-fragment | ||
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, customContent); | ||
} | ||
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !(0, _typeUtil.exists)(titleContent) ? null : /*#__PURE__*/_react.default.createElement(_Typography.default, { | ||
variant: "subtitle2" | ||
}, titleContent), !(0, _typeUtil.exists)(detailContent) ? null : | ||
/*#__PURE__*/ | ||
// eslint-disable-next-line react/jsx-no-useless-fragment | ||
_react.default.createElement(_react.default.Fragment, null, detailContent), !(0, _typeUtil.exists)(subTitleContent) ? null : /*#__PURE__*/_react.default.createElement(_Typography.default, { | ||
variant: "body2" | ||
}, subTitleContent)); | ||
}; | ||
var renderCardContent = function renderCardContent() { | ||
if (!showIcon) { | ||
return renderContent(); | ||
} | ||
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactFontawesome.FontAwesomeIcon, { | ||
icon: isSplit ? _freeSolidSvgIcons.faBoxesStacked : _freeSolidSvgIcons.faBox, | ||
size: "2x", | ||
className: customIconClass || isSplit ? classes.cardIconBoxesStacked : classes.cardIcon | ||
}), /*#__PURE__*/_react.default.createElement("div", { | ||
className: customCardContentContainerClass || classes.cardContentContainer | ||
}, renderContent())); | ||
}; | ||
return /*#__PURE__*/_react.default.createElement(_Card.default, { | ||
className: customCardClass || classes.card | ||
}, /*#__PURE__*/_react.default.createElement(_CardContent.default, { | ||
className: showIcon ? customCardContentFlexContainerClass || classes.cardContentFlexContainer : customCardContentClass || classes.cardContent | ||
}, renderCardContent())); | ||
}; | ||
DataProductBundleCard.defaultProps = { | ||
titleContent: undefined, | ||
detailContent: undefined, | ||
subTitleContent: undefined, | ||
customContent: undefined, | ||
isSplit: false, | ||
showIcon: true, | ||
classes: undefined | ||
}; | ||
var _default = DataProductBundleCard; | ||
exports.default = _default; |
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 @@ | ||
export { default } from "./DataProductBundleCard"; |
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,13 @@ | ||
"use strict"; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
Object.defineProperty(exports, "default", { | ||
enumerable: true, | ||
get: function get() { | ||
return _DataProductBundleCard.default; | ||
} | ||
}); | ||
var _DataProductBundleCard = _interopRequireDefault(require("./DataProductBundleCard")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
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,6 @@ | ||
{ | ||
"private": true, | ||
"name": "bundles", | ||
"main": "./DataProductBundleCard.tsx", | ||
"module": "./DataProductBundleCard.tsx" | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import React from 'react'; | ||
import { DataProductCitationItemViewProps } from './ViewState'; | ||
declare const DataProductCitationItemView: React.FC<DataProductCitationItemViewProps>; | ||
export default DataProductCitationItemView; |
Oops, something went wrong.