almost implemented item detail page.

This commit is contained in:
Yoshihiro OKUMURA
2019-05-10 21:34:38 +09:00
parent 820f6ed8c7
commit 8a755c839d
18 changed files with 647 additions and 273 deletions
+4 -4
View File
@@ -3,12 +3,12 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@types/jest": "24.0.11",
"@types/jest": "24.0.12",
"@types/lokijs": "^1.5.2",
"@types/node": "11.13.8",
"@types/node": "12.0.0",
"@types/query-string": "^6.3.0",
"@types/rc-tree": "^1.11.3",
"@types/react": "16.8.14",
"@types/react": "16.8.17",
"@types/react-dom": "16.8.4",
"@types/react-router-dom": "^4.3.1",
"lokijs": "^1.5.6",
@@ -17,7 +17,7 @@
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-router-dom": "^5.0.0",
"react-scripts": "3.0.0",
"react-scripts": "3.0.1",
"typescript": "3.4.5"
},
"scripts": {
File diff suppressed because one or more lines are too long
+144 -30
View File
@@ -1,6 +1,6 @@
import React from 'react';
import React, { Fragment } from 'react';
import { Link } from 'react-router-dom';
import ItemUtil, { ItemBasicLang, ItemBasicChangeLog, ItemBasicIndex } from './ItemUtil';
import ItemUtil, { ItemBasicLang, ItemBasicChangeLog, ItemBasicFile, ItemBasicIndex } from './ItemUtil';
import IndexUtil from './IndexUtil';
import DatabaseItemType from '../components/DatabaseItemType';
@@ -40,47 +40,57 @@ class ItemTypeUtil {
return (<span>{label}</span>);
}
static Description(props: { description: string, className?: string }) {
const { description, className } = props;
const regex = /(\r?\n)/g;
const textarea = description.split(regex).map((line, i) => {
if (line.match(regex)) {
return <br key={i} />;
}
return <Fragment key={i}>{line}</Fragment>;
});
const name = typeof className === 'undefined' ? 'description' : className;
return (<div className={name}>{textarea}</div>);
}
static Contributer(props: { uname: string, name: string }) {
const { name, uname } = props;
const label = (name === '' ? uname : name + ' (' + uname + ')');
return (<span>{label}</span>);
}
static Date(props: { date: number }) {
const { date } = props;
static Date(props: { date: number, isSimple?: boolean }) {
const { date, isSimple } = props;
const d = new Date(date * 1000);
const monthStr = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
const year = d.getFullYear();
const month = monthStr[d.getMonth()];
const mday = d.getDate();
const hour = d.getHours();
const min = d.getMinutes();
const sec = d.getSeconds();
const label = month + ' ' + mday + ', ' + year + ' ' + hour + ':' + min + ':' + sec;
const mday = String(d.getDate()).padStart(2, '0');
const hour = String(d.getHours()).padStart(2, '0');
const min = String(d.getMinutes()).padStart(2, '0');
const sec = String(d.getSeconds()).padStart(2, '0');
const time = (typeof isSimple !== 'undefined' || isSimple) ? '' : ' ' + hour + ':' + min + ':' + sec;
const label = month + ' ' + mday + ', ' + year + time;
return (<span>{label}</span>);
}
static ChangeLogDate(props: { date: number }) {
const { date } = props;
const d = new Date(date * 1000);
const monthStr = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
const year = d.getFullYear();
const month = monthStr[d.getMonth()];
const mday = d.getDate();
const label = month + ' ' + mday + ', ' + year + ' ';
return (<span>{label}</span>);
static PublicationDate(props: { year: number, month: number, mday: number }) {
const { year, month, mday } = props;
const d = new Date(year + '-' + month + '-' + mday);
const timestamp = Math.floor(d.valueOf() / 1000);
return <ItemTypeUtil.Date date={timestamp} isSimple={true} />;
}
static ChangeLog(props: {changelog: ItemBasicChangeLog[]}) {
static ChangeLog(props: { changelog: ItemBasicChangeLog[] }) {
const { changelog } = props;
if (changelog.length === 0) {
return null;
}
const elements = changelog.map((value, index) => {
const elements = changelog.map((value, i) => {
return (
<tr key={index}>
<td className="changeLogDate"><ItemTypeUtil.ChangeLogDate date={value.log_date} /></td>
<td>{value}</td>
<tr key={i}>
<td className="changeLogDate"><ItemTypeUtil.Date date={value.log_date} isSimple={true} /></td>
<td>{value.log}</td>
</tr>
);
});
@@ -93,23 +103,127 @@ class ItemTypeUtil {
return null;
}
let evenodd = 'even';
const elements = author.map((value, index) => {
const elements = author.map((value, i) => {
evenodd = evenodd === 'even' ? 'odd' : 'even';
return (<tr key={index}><td className={evenodd}>{value}</td></tr>);
return (<tr key={i}><td className={evenodd}>{value}</td></tr>);
});
return (<table><tbody>{elements}</tbody></table>);
}
static FileSize(props: { size: number }) {
const { size } = props;
const units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
const power = size > 0 ? Math.floor(Math.log(size) / Math.log(1024)) : 0;
const label = Math.round(size / Math.pow(1024, power) * 10) / 10 + ' ' + units[power]
return <span>{label}</span>;
}
static FileDownloadButton(props: { file: ItemBasicFile, rights?: string }) {
const { file, rights } = props;
const url = '/database/file/' + file.file_id;
if (typeof rights != 'undefined') {
return <Link className="downloadButton" to={url} target="_blank" download={file.original_file_name}>TODO: Download</Link>;
}
return <Link className="downloadButton" to={url} target="_blank" download={file.original_file_name}>Download</Link>;
}
static Preview(props: { file: ItemBasicFile[] }) {
const { file } = props;
const data = file.filter((value) => {
return value.file_type_name === 'preview';
});
if (data.length === 0) {
return null;
}
const elements = data.map((value) => {
return (
<td key={value.file_id}>{value.original_file_name}</td>
);
});
return (
<div>
<table className="preview">
<tbody>
{elements}
</tbody>
</table>
</div>
);
}
static File(props: { file: ItemBasicFile[], type: string, rights?: string }) {
const { file, type, rights } = props;
const data = file.find((value) => {
return value.file_type_name === type;
});
if (typeof data === 'undefined') {
return null;
}
const date = new Date(data.timestamp);
const timestamp = Math.floor(date.valueOf() / 1000);
return (
<div>
{data.original_file_name}<br />
<table>
<tbody>
<tr><td>Type</td><td>: {data.mime_type}</td><td rowSpan={4}><ItemTypeUtil.FileDownloadButton file={data} rights={rights} /></td></tr>
<tr><td>Size</td><td>: <ItemTypeUtil.FileSize size={data.file_size} /></td></tr>
<tr><td>Last updated</td><td>: <ItemTypeUtil.Date date={timestamp} isSimple={true} /></td></tr>
</tbody>
</table>
</div>
);
}
static Readme(props: { readme: string }) {
const { readme } = props;
return <ItemTypeUtil.Description description={readme} className="readme" />;
}
static Rights(props: { rights: string, useCc: number, ccCommercialUse: number, ccModification: number }) {
const { rights, useCc } = props;
if (useCc === 0) {
return <ItemTypeUtil.Description description={rights} className="rights" />;
}
return <div dangerouslySetInnerHTML={{__html: rights}} />;
}
static CreativeCommons(props: { type: 'by' | 'by-nc' | 'by-nc-nd' | 'by-nc-sa' | 'by-nd' | 'by-sa' }) {
const {type} = props;
const url = 'http://creativecommons.org/licenses/' + type + '/4.0/';
const logoUrl = 'https://i.creativecommons.org/l/' + type + '/4.0/88x31.png';
const labels = {
by: 'Attribution',
nc: 'NonCommercial',
nd: 'NoDerivatives',
sa: 'ShareAlike',
}
const label = type.split('-').map((value) => {
const prop = value as 'by' | 'nc' | 'nd' | 'sa';
return labels[prop];
}).join('-');
return (
<table>
<tbody>
<tr>
<td><a rel="license" href={url}><img alt="Creative Commons License" src={logoUrl} /></a></td>
<td>This work is licensed under a <a rel="license" href={url}>Criative Commons {label} 4.0 International License</a>.</td>
</tr>
</tbody>
</table>
);
}
static Index(props: { index: ItemBasicIndex[] }) {
const { index } = props;
if (index.length === 0) {
return null;
}
let evenodd = 'even';
const elements = index.map((value, index) => {
const elements = index.map((value) => {
evenodd = evenodd === 'even' ? 'odd' : 'even';
const url = IndexUtil.getUrl(value.index_id);
return (<tr key={index}><td className={evenodd}><Link to={url}>{value.title}</Link></td></tr>);
return (<tr key={value.index_id}><td className={evenodd}><Link to={url}>{value.title}</Link></td></tr>);
});
return (<table><tbody>{elements}</tbody></table>);
}
@@ -120,13 +234,13 @@ class ItemTypeUtil {
return null;
}
let evenodd = 'even';
const elements = relatedTo.map((value) => {
const item = ItemUtil.get(value);
const elements = relatedTo.map((itemId) => {
const item = ItemUtil.get(itemId);
if (item === null) {
return null;
}
evenodd = evenodd === 'even' ? 'odd' : 'even';
return (<tr key={value}><td className={evenodd}><DatabaseItemType.List item={item} /></td></tr>);
return (<tr key={itemId}><td className={evenodd}><DatabaseItemType.List item={item} /></td></tr>);
});
return (
<table>
+8 -2
View File
@@ -15,8 +15,10 @@ export interface ItemBasicFile {
original_file_name: string;
mime_type: string;
file_size: number;
caption: string;
timestamp: string;
display_name: string;
file_type_name: string;
file_type_display_name: string;
}
export interface ItemBasic {
item_id: number;
@@ -73,7 +75,7 @@ export interface ItemConference extends ItemBasic {
author: string[];
}
export type ItemDataSubType = 'excel' | 'movie' | 'text' | 'picture' | 'ohter';
export type ItemDataSubType = 'excel' | 'movie' | 'text' | 'picture' | 'other';
export interface ItemData extends ItemBasic {
data_id: number;
data_type: ItemDataSubType;
@@ -200,6 +202,10 @@ class ItemUtil {
return '/database/item/' + String(item.item_id);
}
static getFileUrl(fileId: number) {
return '/database/file/' + fileId;
}
static get(itemId: number) {
const filter = {
'item_id': itemId
+39 -1
View File
@@ -17,4 +17,42 @@
text-align: center;
width: 65px;
line-height: 0;
}
}
.database :global(.itemDetail .head) {
width: 30%;
}
.database :global(.itemDetail .changeLogDate) {
white-space: nowrap;
}
.database :global(.itemDetail .downloadButton) {
display: inline-block;
padding: 7px 20px;
text-decoration: none;
font-weight: normal;
background: #f0f0f0;
color: #000;
border: solid 1px #e0e0e0;
box-shadow: 2px 2px #bbbbbb;
border-radius: 5px;
}
.database :global(.itemDetail .downloadButton:hover) {
background: #e8e8e8;
border: solid 1px #cccccc;
}
.database :global(.itemDetail .downloadButton:active) {
transform: translate(2px, 2px);
box-shadow: none;
}
.database :global(.itemDetail .readme),
.database :global(.itemDetail .rights) {
background-color: #ffffff;
width: 100%;
max-height: 200px;
overflow: auto;
}
+5 -5
View File
@@ -19,9 +19,9 @@ class DatabaseDetailItem extends Component<Props, State> {
super(props);
const { params } = this.props.match;
let item = null;
if (params.doi !== undefined) {
if (typeof params.doi !== 'undefined') {
item = ItemUtil.getByDoi(params.doi);
} else if (params.id !== undefined) {
} else if (typeof params.id !== 'undefined') {
const itemId = parseInt(params.id, 10);
item = ItemUtil.get(itemId);
}
@@ -31,9 +31,9 @@ class DatabaseDetailItem extends Component<Props, State> {
componentWillReceiveProps(nextProps: Props) {
const { params } = nextProps.match;
let item = null;
if (params.doi !== undefined) {
if (typeof params.doi !== 'undefined') {
item = ItemUtil.getByDoi(params.doi);
} else if (params.id !== undefined) {
} else if (typeof params.id !== 'undefined') {
const itemId = parseInt(params.id, 10);
item = ItemUtil.get(itemId);
}
@@ -42,7 +42,7 @@ class DatabaseDetailItem extends Component<Props, State> {
render() {
if (this.state.item === null) {
return (null);
return null;
}
return (
<>
+7 -7
View File
@@ -59,7 +59,7 @@ class DatabaseItemType {
case 'xnpurl':
return (<DatabaseItemTypeUrl.List item={item as ItemUrl} />);
default:
return (null);
return null;
}
}
@@ -67,19 +67,19 @@ class DatabaseItemType {
const item = props.item;
switch (item.item_type_name) {
case 'xnpbook':
return (<DatabaseItemTypeBook.List item={item as ItemBook} />);
return (<DatabaseItemTypeBook.Detail item={item as ItemBook} />);
case 'xnpconference':
return (<DatabaseItemTypeConference.List item={item as ItemConference} />);
return (<DatabaseItemTypeConference.Detail item={item as ItemConference} />);
case 'xnpdata':
return (<DatabaseItemTypeData.List item={item as ItemData} />);
return (<DatabaseItemTypeData.Detail item={item as ItemData} />);
case 'xnpmodel':
return (<DatabaseItemTypeModel.List item={item as ItemModel} />);
return (<DatabaseItemTypeModel.Detail item={item as ItemModel} />);
case 'xnppaper':
return (<DatabaseItemTypePaper.Detail item={item as ItemPaper} />);
case 'xnpurl':
return (<DatabaseItemTypeUrl.List item={item as ItemUrl} />);
return (<DatabaseItemTypeUrl.Detail item={item as ItemUrl} />);
default:
return (null);
return null;
}
}
}
+46 -4
View File
@@ -1,7 +1,8 @@
import React from 'react';
import React, { ReactNode } from 'react';
import { Link } from 'react-router-dom';
import ItemUtil, { ItemBook } from '../common/ItemUtil';
import iconFile from '../assets/images/database/icon_book.gif';
import ItemTypeUtil from '../common/ItemTypeUtil';
class DatabaseItemTypeBook {
@@ -29,9 +30,9 @@ class DatabaseItemTypeBook {
static List(props: { item: ItemBook }) {
const { item } = props;
const url = ItemUtil.getUrl(item);
const authors = item.author.map((author, index) => {
const padding = index > 0 ? ', ' : '';
return (<span key={index}>{padding}{author}</span>);
const authors = item.author.map((author, i) => {
const padding = i > 0 ? ', ' : '';
return (<span key={i}>{padding}{author}</span>);
});
return (
<table>
@@ -49,6 +50,47 @@ class DatabaseItemTypeBook {
</table>
);
}
static Detail(props: { item: ItemBook }) {
const { item } = props;
const fields: { label: ReactNode, value: ReactNode }[] = [
{ label: 'ID', value: item.doi },
{ label: 'Language', value: <ItemTypeUtil.Language lang={item.lang} /> },
{ label: 'Title', value: item.title },
{ label: 'Free Keywords', value: <ItemTypeUtil.FreeKeyword keyword={item.keyword} /> },
{ label: 'Description', value: <ItemTypeUtil.Description description={item.description} /> },
{ label: 'Last Modified Date', value: <ItemTypeUtil.Date date={item.last_update_date} /> },
{ label: 'Created Date', value: <ItemTypeUtil.Date date={item.creation_date} /> },
{ label: 'Contributor', value: <ItemTypeUtil.Contributer uname={item.uname} name={item.name} /> },
{ label: 'Item Type', value: item.item_type_display_name },
{ label: 'Change Log(History)', value: <ItemTypeUtil.ChangeLog changelog={item.changelog} /> },
{ label: 'Author', value: <ItemTypeUtil.Author author={item.author} /> },
{ label: 'Editor', value: item.editor },
{ label: 'Publisher', value: item.publisher },
{ label: 'Publication Year', value: item.publication_year },
{ label: 'URL', value: <a href={item.url} target="_blank" rel="noopener noreferrer">{item.url}</a> },
{ label: 'PDF File', value: <ItemTypeUtil.File file={item.file} type="book_pdf" /> },
{ label: 'Index', value: <ItemTypeUtil.Index index={item.index} /> },
{ label: 'Related to', value: <ItemTypeUtil.RelatedTo relatedTo={item.related_to} /> },
];
let evenodd = 'even';
const elements = fields.map((value, i) => {
evenodd = evenodd === 'even' ? 'odd' : 'even'
return (
<tr key={i}>
<td className="head">{value.label}</td>
<td className={evenodd}>{value.value}</td>
</tr>
)
});
return (
<table className="outer itemDetail">
<tbody>
{elements}
</tbody>
</table>
);
}
}
export default DatabaseItemTypeBook;
+71 -13
View File
@@ -1,6 +1,7 @@
import React from 'react';
import React, { ReactNode } from 'react';
import { Link } from 'react-router-dom';
import ItemUtil, { ItemConference } from '../common/ItemUtil';
import ItemUtil, { ItemConference, ItemConferenceSubType } from '../common/ItemUtil';
import ItemTypeUtil from '../common/ItemTypeUtil';
import iconFile from '../assets/images/database/icon_conference.gif';
class DatabaseItemTypeConference {
@@ -36,16 +37,9 @@ class DatabaseItemTypeConference {
static List(props: { item: ItemConference }) {
const { item } = props;
const url = ItemUtil.getUrl(item);
const types = {
powerpoint: 'PowerPoint',
pdf: 'PDF',
illustrator: 'Illustrator',
other: 'Other'
}
const presentationType = '(' + types[item.presentation_type] + ')';
const authors = item.author.map((author, index) => {
const padding = index > 0 ? ', ' : '';
return (<span key={index}>{padding}{author}</span>);
const authors = item.author.map((author, i) => {
const padding = i > 0 ? ', ' : '';
return (<span key={i}>{padding}{author}</span>);
});
return (
<table>
@@ -56,7 +50,7 @@ class DatabaseItemTypeConference {
</td>
<td>
<Link to={url}>{item.title}</Link><br />
{item.conference_title} {presentationType} <br />
{item.conference_title} (<DatabaseItemTypeConference.PresentationType type={item.presentation_type} />)<br />
{authors}<br />
</td>
</tr>
@@ -64,6 +58,70 @@ class DatabaseItemTypeConference {
</table>
);
}
static Detail(props: { item: ItemConference }) {
const { item } = props;
const fields: { label: ReactNode, value: ReactNode }[] = [
{ label: 'ID', value: item.doi },
{ label: 'Language', value: <ItemTypeUtil.Language lang={item.lang} /> },
{ label: 'Conference Title', value: item.conference_title },
{ label: 'Place', value: item.place },
{ label: 'Date', value: <DatabaseItemTypeConference.Date item={item} /> },
{ label: 'Last Modified Date', value: <ItemTypeUtil.Date date={item.last_update_date} /> },
{ label: 'Created Date', value: <ItemTypeUtil.Date date={item.creation_date} /> },
{ label: 'Contributor', value: <ItemTypeUtil.Contributer uname={item.uname} name={item.name} /> },
{ label: 'Item Type', value: item.item_type_display_name },
{ label: 'Change Log(History)', value: <ItemTypeUtil.ChangeLog changelog={item.changelog} /> },
{ label: 'Presentation Title', value: item.title },
{ label: 'Author', value: <ItemTypeUtil.Author author={item.author} /> },
{ label: 'Abstract', value: <ItemTypeUtil.Description description={item.abstract} /> },
{ label: 'Presentation File', value: <ItemTypeUtil.File file={item.file} type="conference_file" /> },
{ label: 'Presentation Type', value: <DatabaseItemTypeConference.PresentationType type={item.presentation_type} /> },
{ label: 'Conference Paper', value: <ItemTypeUtil.File file={item.file} type="conference_paper" /> },
{ label: 'Index', value: <ItemTypeUtil.Index index={item.index} /> },
{ label: 'Related to', value: <ItemTypeUtil.RelatedTo relatedTo={item.related_to} /> },
];
let evenodd = 'even';
const elements = fields.map((value, i) => {
evenodd = evenodd === 'even' ? 'odd' : 'even'
return (
<tr key={i}>
<td className="head">{value.label}</td>
<td className={evenodd}>{value.value}</td>
</tr>
)
});
return (
<table className="outer itemDetail">
<tbody>
{elements}
</tbody>
</table>
);
}
static PresentationType(props: { type: ItemConferenceSubType }) {
const { type } = props;
const typeStr = {
powerpoint: 'PowerPoint',
pdf: 'PDF',
illustrator: 'Illustrator',
other: 'Other',
};
if (!(type in typeStr)) {
return null;
}
const label = typeStr[type];
return (<span>{label}</span>);
}
static Date(props: { item: ItemConference }) {
const { item } = props;
const monthStr = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
const from = 'From: ' + monthStr[item.conference_from_month - 1] + ' ' + item.conference_from_mday + ', ' + item.conference_from_year;
const to = 'To: ' + monthStr[item.conference_to_month - 1] + ' ' + item.conference_to_mday + ', ' + item.conference_to_year;
return (<span>{from} {to}</span>);
}
}
export default DatabaseItemTypeConference;
+64 -5
View File
@@ -1,7 +1,8 @@
import React from 'react';
import React, { ReactNode } from 'react';
import { Link } from 'react-router-dom';
import ItemUtil, { ItemData } from '../common/ItemUtil';
import ItemUtil, { ItemData, ItemDataSubType } from '../common/ItemUtil';
import iconFile from '../assets/images/database/icon_data.gif';
import ItemTypeUtil from '../common/ItemTypeUtil';
class DatabaseItemTypeData {
@@ -38,9 +39,9 @@ class DatabaseItemTypeData {
static List(props: { item: ItemData }) {
const url = ItemUtil.getUrl(props.item);
const { item } = props;
const authors = item.experimenter.map((author, index) => {
const padding = index > 0 ? ', ' : '';
return (<span key={index}>{padding}{author}</span>);
const authors = item.experimenter.map((author, i) => {
const padding = i > 0 ? ', ' : '';
return (<span key={i}>{padding}{author}</span>);
});
return (
<table>
@@ -58,6 +59,64 @@ class DatabaseItemTypeData {
</table>
);
}
static Detail(props: { item: ItemData }) {
const { item } = props;
const fields: { label: ReactNode, value: ReactNode }[] = [
{ label: 'ID', value: item.doi },
{ label: 'Language', value: <ItemTypeUtil.Language lang={item.lang} /> },
{ label: 'Title', value: item.title },
{ label: 'Free Keywords', value: <ItemTypeUtil.FreeKeyword keyword={item.keyword} /> },
{ label: 'Description', value: <ItemTypeUtil.Description description={item.description} /> },
{ label: 'Date', value: <ItemTypeUtil.PublicationDate year={item.publication_year} month={item.publication_month} mday={item.publication_mday} /> },
{ label: 'Last Modified Date', value: <ItemTypeUtil.Date date={item.last_update_date} /> },
{ label: 'Created Date', value: <ItemTypeUtil.Date date={item.creation_date} /> },
{ label: 'Contributor', value: <ItemTypeUtil.Contributer uname={item.uname} name={item.name} /> },
{ label: 'Item Type', value: item.item_type_display_name },
{ label: 'Change Log(History)', value: <ItemTypeUtil.ChangeLog changelog={item.changelog} /> },
{ label: 'Data Type', value: <DatabaseItemTypeData.DataType type={item.data_type} /> },
{ label: 'Experimenter', value: <ItemTypeUtil.Author author={item.experimenter} /> },
{ label: 'Preview', value: <ItemTypeUtil.Preview file={item.file} /> },
{ label: 'Data File', value: <ItemTypeUtil.File file={item.file} type="data_file" rights={item.rights} /> },
{ label: 'Readme', value: <ItemTypeUtil.Readme readme={item.readme} /> },
{ label: 'Rights', value: <ItemTypeUtil.Rights rights={item.rights} useCc={item.use_cc} ccCommercialUse={item.cc_commercial_use} ccModification={item.cc_modification} /> },
{ label: 'Index', value: <ItemTypeUtil.Index index={item.index} /> },
{ label: 'Related to', value: <ItemTypeUtil.RelatedTo relatedTo={item.related_to} /> },
];
let evenodd = 'even';
const elements = fields.map((value, i) => {
evenodd = evenodd === 'even' ? 'odd' : 'even'
return (
<tr key={i}>
<td className="head">{value.label}</td>
<td className={evenodd}>{value.value}</td>
</tr>
)
});
return (
<table className="outer itemDetail">
<tbody>
{elements}
</tbody>
</table>
);
}
static DataType(props: { type: ItemDataSubType }) {
const { type } = props;
const typeStr = {
excel: 'Excel',
movie: 'Movie',
text: 'Text',
picture: 'Picture',
other: 'Other',
};
if (!(type in typeStr)) {
return null;
}
const label = typeStr[type];
return (<span>{label}</span>);
}
}
export default DatabaseItemTypeData;
+65 -5
View File
@@ -1,7 +1,8 @@
import React from 'react';
import React, { ReactNode } from 'react';
import { Link } from 'react-router-dom';
import ItemUtil, { ItemModel } from '../common/ItemUtil';
import ItemUtil, { ItemModel, ItemModelSubType } from '../common/ItemUtil';
import iconFile from '../assets/images/database/icon_model.gif';
import ItemTypeUtil from '../common/ItemTypeUtil';
class DatabaseItemTypeModel {
@@ -42,9 +43,9 @@ class DatabaseItemTypeModel {
static List(props: { item: ItemModel }) {
const { item } = props;
const url = ItemUtil.getUrl(item);
const authors = item.creator.map((author, index) => {
const padding = index > 0 ? ', ' : '';
return (<span key={index}>{padding}{author}</span>);
const authors = item.creator.map((author, i) => {
const padding = i > 0 ? ', ' : '';
return (<span key={i}>{padding}{author}</span>);
});
return (
<table>
@@ -62,6 +63,65 @@ class DatabaseItemTypeModel {
</table>
);
}
static Detail(props: { item: ItemModel }) {
const { item } = props;
const fields: { label: ReactNode, value: ReactNode }[] = [
{ label: 'ID', value: item.doi },
{ label: 'Language', value: <ItemTypeUtil.Language lang={item.lang} /> },
{ label: 'Title', value: item.title },
{ label: 'Free Keywords', value: <ItemTypeUtil.FreeKeyword keyword={item.keyword} /> },
{ label: 'Description', value: <ItemTypeUtil.Description description={item.description} /> },
{ label: 'Last Modified Date', value: <ItemTypeUtil.Date date={item.last_update_date} /> },
{ label: 'Created Date', value: <ItemTypeUtil.Date date={item.creation_date} /> },
{ label: 'Contributor', value: <ItemTypeUtil.Contributer uname={item.uname} name={item.name} /> },
{ label: 'Item Type', value: item.item_type_display_name },
{ label: 'Change Log(History)', value: <ItemTypeUtil.ChangeLog changelog={item.changelog} /> },
{ label: 'Model Type', value: <DatabaseItemTypeModel.ModelType type={item.model_type} /> },
{ label: 'Creator', value: <ItemTypeUtil.Author author={item.creator} /> },
{ label: 'Preview', value: <ItemTypeUtil.Preview file={item.file} /> },
{ label: 'Model File', value: <ItemTypeUtil.File file={item.file} type="model_data" rights={item.rights} /> },
{ label: 'Readme', value: <ItemTypeUtil.Readme readme={item.readme} /> },
{ label: 'Rights', value: <ItemTypeUtil.Rights rights={item.rights} useCc={item.use_cc} ccCommercialUse={item.cc_commercial_use} ccModification={item.cc_modification} /> },
{ label: 'Index', value: <ItemTypeUtil.Index index={item.index} /> },
{ label: 'Related to', value: <ItemTypeUtil.RelatedTo relatedTo={item.related_to} /> },
];
let evenodd = 'even';
const elements = fields.map((value, i) => {
evenodd = evenodd === 'even' ? 'odd' : 'even'
return (
<tr key={i}>
<td className="head">{value.label}</td>
<td className={evenodd}>{value.value}</td>
</tr>
)
});
return (
<table className="outer itemDetail">
<tbody>
{elements}
</tbody>
</table>
);
}
static ModelType(props: { type: ItemModelSubType }) {
const { type } = props;
const typeStr = {
matlab: 'Matlab',
neuron: 'Neuron',
original_program: 'Original Program',
satellite: 'SATELLITE',
genesis: 'Genesis',
a_cell: 'A-Cell',
other: 'Other',
};
if (!(type in typeStr)) {
return null;
}
const label = typeStr[type];
return (<span>{label}</span>);
}
}
export default DatabaseItemTypeModel;
+39 -83
View File
@@ -1,4 +1,4 @@
import React from 'react';
import React, { ReactNode } from 'react';
import { Link } from 'react-router-dom';
import ItemUtil, { ItemPaper } from '../common/ItemUtil';
import ItemTypeUtil from '../common/ItemTypeUtil';
@@ -30,9 +30,9 @@ class DatabaseItemTypePaper {
static List(props: { item: ItemPaper }) {
const { item } = props;
const url = ItemUtil.getUrl(item);
const authors = item.author.map((author, index) => {
const padding = index > 0 ? ', ' : '';
return (<span key={index}>{padding}{author}</span>);
const authors = item.author.map((author, i) => {
const padding = i > 0 ? ', ' : '';
return (<span key={i}>{padding}{author}</span>);
});
const pubYear = String(item.publication_year);
const volume = item.volume === null ? '' : ';' + String(item.volume);
@@ -59,92 +59,48 @@ class DatabaseItemTypePaper {
static Detail(props: { item: ItemPaper }) {
const { item } = props;
const fields: { label: ReactNode, value: ReactNode }[] = [
{ label: 'ID', value: item.doi },
{ label: 'Language', value: <ItemTypeUtil.Language lang={item.lang} /> },
{ label: 'PubmedID', value: <DatabaseItemTypePaper.PubmedLink pubmedId={item.pubmed_id} /> },
{ label: 'Title', value: item.title },
{ label: 'Free Keywords', value: <ItemTypeUtil.FreeKeyword keyword={item.keyword} /> },
{ label: 'Description', value: <ItemTypeUtil.Description description={item.description} /> },
{ label: 'Last Modified Date', value: <ItemTypeUtil.Date date={item.last_update_date} /> },
{ label: 'Created Date', value: <ItemTypeUtil.Date date={item.creation_date} /> },
{ label: 'Contributor', value: <ItemTypeUtil.Contributer uname={item.uname} name={item.name} /> },
{ label: 'Item Type', value: item.item_type_display_name },
{ label: 'Change Log(History)', value: <ItemTypeUtil.ChangeLog changelog={item.changelog} /> },
{ label: 'Author', value: <ItemTypeUtil.Author author={item.author} /> },
{ label: 'Journal', value: item.journal },
{ label: 'Publication Year', value: item.publication_year },
{ label: 'Volume', value: item.volume },
{ label: 'Number', value: item.number },
{ label: 'Page', value: item.page },
{ label: 'Index', value: <ItemTypeUtil.Index index={item.index} /> },
{ label: 'Related to', value: <ItemTypeUtil.RelatedTo relatedTo={item.related_to} /> },
];
let evenodd = 'even';
const elements = fields.map((value, i) => {
evenodd = evenodd === 'even' ? 'odd' : 'even'
return (
<tr key={i}>
<td className="head">{value.label}</td>
<td className={evenodd}>{value.value}</td>
</tr>
)
});
return (
<table>
<table className="outer itemDetail">
<tbody>
<tr>
<td className="head">ID</td>
<td className="odd">{item.doi}</td>
</tr>
<tr>
<td className="head">Language</td>
<td className="even"><ItemTypeUtil.Language lang={item.lang} /></td>
</tr>
<tr>
<td className="head">PubMedID</td>
<td className="odd"><DatabaseItemTypePaper.PubmedLink pubmedId={item.pubmed_id} /></td>
</tr>
<tr>
<td className="head">Title</td>
<td className="even">{item.title}</td>
</tr>
<tr>
<td className="head">Free Keywords</td>
<td className="odd"><ItemTypeUtil.FreeKeyword keyword={item.keyword} /></td>
</tr>
<tr>
<td className="head">Description</td>
<td className="even">{item.description}</td>
</tr>
<tr>
<td className="head">Last Modified Date</td>
<td className="odd"><ItemTypeUtil.Date date={item.last_update_date} /></td>
</tr>
<tr>
<td className="head">Created Date</td>
<td className="even"><ItemTypeUtil.Date date={item.creation_date} /></td>
</tr>
<tr>
<td className="head">Contributor</td>
<td className="odd"><ItemTypeUtil.Contributer uname={item.uname} name={item.name} /></td>
</tr>
<tr>
<td className="head">Item Type</td>
<td className="even">{item.item_type_display_name}</td>
</tr>
<tr>
<td className="head">Change Log(History)</td>
<td className="odd"><ItemTypeUtil.ChangeLog changelog={item.changelog} /></td>
</tr>
<tr>
<td className="head">Author</td>
<td className="even"><ItemTypeUtil.Author author={item.author} /></td>
</tr>
<tr>
<td className="head">Journal</td>
<td className="odd">{item.journal}</td>
</tr>
<tr>
<td className="head">Publication Year</td>
<td className="even">{item.publication_year}</td>
</tr>
<tr>
<td className="head">Volume</td>
<td className="odd">{item.volume}</td>
</tr>
<tr>
<td className="head">Number</td>
<td className="even">{item.number}</td>
</tr>
<tr>
<td className="head">Page</td>
<td className="odd">{item.page}</td>
</tr>
<tr>
<td className="head">Index</td>
<td className="even"><ItemTypeUtil.Index index={item.index} /></td>
</tr>
<tr>
<td className="head">Related to</td>
<td className="odd"><ItemTypeUtil.RelatedTo relatedTo={item.related_to} /></td>
</tr>
{elements}
</tbody>
</table>
);
}
static PubmedLink(props: {pubmedId: string}) {
const {pubmedId} = props;
static PubmedLink(props: { pubmedId: string }) {
const { pubmedId } = props;
if (pubmedId === '') {
return null;
}
+54 -2
View File
@@ -1,7 +1,8 @@
import React from 'react';
import React, { ReactNode } from 'react';
import { Link } from 'react-router-dom';
import ItemUtil, { ItemUrl } from '../common/ItemUtil';
import ItemUtil, { ItemUrl, ItemBasicFile } from '../common/ItemUtil';
import iconFile from '../assets/images/database/icon_url.gif';
import ItemTypeUtil from '../common/ItemTypeUtil';
class DatabaseItemTypeUrl {
@@ -45,6 +46,57 @@ class DatabaseItemTypeUrl {
</table>
);
}
static Detail(props: { item: ItemUrl }) {
const { item } = props;
const fields: { label: ReactNode, value: ReactNode }[] = [
{ label: 'ID', value: item.doi },
{ label: 'Language', value: <ItemTypeUtil.Language lang={item.lang} /> },
{ label: 'Title', value: item.title },
{ label: 'Free Keywords', value: <ItemTypeUtil.FreeKeyword keyword={item.keyword} /> },
{ label: 'Description', value: <ItemTypeUtil.Description description={item.description} /> },
{ label: 'Last Modified Date', value: <ItemTypeUtil.Date date={item.last_update_date} /> },
{ label: 'Created Date', value: <ItemTypeUtil.Date date={item.creation_date} /> },
{ label: 'Contributor', value: <ItemTypeUtil.Contributer uname={item.uname} name={item.name} /> },
{ label: 'Item Type', value: item.item_type_display_name },
{ label: 'Change Log(History)', value: <ItemTypeUtil.ChangeLog changelog={item.changelog} /> },
{ label: 'URL', value: <a href={item.url} target="_blank" rel="noopener noreferrer">{item.url}</a> },
{ label: 'Banner File', value: <DatabaseItemTypeUrl.BannerFile file={item.file} /> },
{ label: 'Index', value: <ItemTypeUtil.Index index={item.index} /> },
{ label: 'Related to', value: <ItemTypeUtil.RelatedTo relatedTo={item.related_to} /> },
];
let evenodd = 'even';
const elements = fields.map((value, i) => {
evenodd = evenodd === 'even' ? 'odd' : 'even'
return (
<tr key={i}>
<td className="head">{value.label}</td>
<td className={evenodd}>{value.value}</td>
</tr>
)
});
return (
<table className="outer itemDetail">
<tbody>
{elements}
</tbody>
</table>
);
}
static BannerFile(props: { file: ItemBasicFile[] }) {
const { file } = props;
const data = file.find((value) => {
return value.file_type_name === 'url_banner_file';
});
if (typeof data === 'undefined') {
return null;
}
const url = ItemUtil.getFileUrl(data.file_id);
return (
<Link to={url} download={data.original_file_name}><img src={url} alt="banner" /></Link>
);
}
}
export default DatabaseItemTypeUrl;
+1 -1
View File
@@ -5,7 +5,7 @@ import DatabaseIndex from './DatabaseIndex';
const DatabaseListIndex = (props: { index: Index }) => {
const children = IndexUtil.getChildren(props.index.id);
if (children.length === 0) {
return (null);
return null;
}
let evenodd: string = 'even';
const treeList = children.map((value: Index) => {
+2 -3
View File
@@ -158,12 +158,11 @@ class DatabaseListItem extends Component<Props, State> {
renderPageNavi(result: SearchResult) {
const maxPage = Math.floor(result.total / this.state.condition.limit) + 1;
const link = (title: string, page: number, id: string) => {
const key = 'nav' + id
if (page === 0 || page === this.state.condition.page) {
return (<span key={key} className={styles.pageNaviItem}>{title}</span>);
return (<span key={id} className={styles.pageNaviItem}>{title}</span>);
}
const url: string = this.getListUrl({ page: page });
return (<Link key={key} className={styles.pageNaviItem} to={url}>{title}</Link>);
return (<Link key={id} className={styles.pageNaviItem} to={url}>{title}</Link>);
}
const startPage = (this.state.condition.page - 5) > 1 ? this.state.condition.page - 5 : 1;
const endPage = (startPage + 5) > maxPage ? maxPage : startPage + 5;
+1 -1
View File
@@ -52,7 +52,7 @@ class DatabaseSearchByIndexId extends Component<Props, State> {
render() {
if (this.state.index === null) {
return (null);
return null;
}
const baseUrl = this.getUrl();
const pIndexes = IndexUtil.getParents(this.state.index.id);
+1 -1
View File
@@ -80,7 +80,7 @@ class IndexTreeBlock extends Component<Props, State> {
}
handleSelect(selectedKeys: string[], e: SelectData): void {
const url = '/database/list/' + e.node.props.eventKey;
const url = IndexUtil.getUrl(parseInt(e.node.props.eventKey, 10));
this.props.history.push(url);
this.setState({ selectedKeys: [] });
}
+95 -105
View File
@@ -921,9 +921,9 @@
integrity sha512-+ryw4GU9pjr1uT6lBuErHJg3NYqzwJTvZ75nKuJijEzpd00Uqi6oiawTGDDf5Hl0zWmI7qHfOtaqB0kpQZJQzA==
"@hapi/joi@^15.0.0":
version "15.0.1"
resolved "https://registry.yarnpkg.com/@hapi/joi/-/joi-15.0.1.tgz#dec64ff87555954f925220a9c5db062ba34493fc"
integrity sha512-6RLoFusVbSkKjo51IGy7TT72TYKaks3OLKRV4Wy4E8f0Vt2oqKBgtG+8VMnbruy+M4iLItiLYjETX7mQqklObQ==
version "15.0.2"
resolved "https://registry.yarnpkg.com/@hapi/joi/-/joi-15.0.2.tgz#2989041a06ee2941cf6dd247ffff8032640d16bb"
integrity sha512-c3NwWBHzUnEavcaCpGaepOcygS17pSnOh5ZYUBz+sfqCP7kC9haLcRnd3U8KFC4TbLFmRwKnmYglsc47m9yapg==
dependencies:
"@hapi/address" "2.x.x"
"@hapi/hoek" "6.x.x"
@@ -1052,7 +1052,7 @@
jest-runner "^24.8.0"
jest-runtime "^24.8.0"
"@jest/transform@^24.7.1", "@jest/transform@^24.8.0":
"@jest/transform@^24.8.0":
version "24.8.0"
resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-24.8.0.tgz#628fb99dce4f9d254c6fd9341e3eea262e06fef5"
integrity sha512-xBMfFUP7TortCs0O+Xtez2W7Zu1PLH9bvJgtraN1CDST6LBM/eTOZ9SfwS/lvV8yOfcDpFmwf9bq5cYbXvqsvA==
@@ -1263,10 +1263,10 @@
resolved "https://registry.yarnpkg.com/@types/jest-diff/-/jest-diff-20.0.1.tgz#35cc15b9c4f30a18ef21852e255fdb02f6d59b89"
integrity sha512-yALhelO3i0hqZwhjtcr6dYyaLoCHbAMshwtj6cGxTvHZAKXHsYGdff6E8EPw3xLKY0ELUTQ69Q1rQiJENnccMA==
"@types/jest@24.0.11":
version "24.0.11"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-24.0.11.tgz#1f099bea332c228ea6505a88159bfa86a5858340"
integrity sha512-2kLuPC5FDnWIDvaJBzsGTBQaBbnDweznicvK7UGYzlIJP4RJR2a4A/ByLUXEyEgag6jz8eHdlWExGDtH3EYUXQ==
"@types/jest@24.0.12":
version "24.0.12"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-24.0.12.tgz#0553dd0a5ac744e7dc4e8700da6d3baedbde3e8f"
integrity sha512-60sjqMhat7i7XntZckcSGV8iREJyXXI6yFHZkSZvCPUeOnEJ/VP1rU/WpEWQ56mvoh8NhC+sfKAuJRTyGtCOow==
dependencies:
"@types/jest-diff" "*"
@@ -1275,16 +1275,11 @@
resolved "https://registry.yarnpkg.com/@types/lokijs/-/lokijs-1.5.2.tgz#ed228f080033ce1fb16eff4acde65cb9ae0f1bf2"
integrity sha512-ZF14v1P1Bjbw8VJRu+p4WS9V926CAOjWF4yq23QmSBWRPe0/GXlUKzSxjP1fi/xi8nrq6zr9ECo8Z/8KsRqroQ==
"@types/node@*":
"@types/node@*", "@types/node@12.0.0":
version "12.0.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.0.0.tgz#d11813b9c0ff8aaca29f04cbc12817f4c7d656e5"
integrity sha512-Jrb/x3HT4PTJp6a4avhmJCDEVrPdqLfl3e8GGMbpkGGdwAV5UGlIs4vVEfsHHfylZVOKZWpOqmqFH8CbfOZ6kg==
"@types/node@11.13.8":
version "11.13.8"
resolved "https://registry.yarnpkg.com/@types/node/-/node-11.13.8.tgz#e5d71173c95533be9842b2c798978f095f912aab"
integrity sha512-szA3x/3miL90ZJxUCzx9haNbK5/zmPieGraZEe4WI+3srN0eGLiT22NXeMHmyhNEopn+IrxqMc7wdVwvPl8meg==
"@types/prop-types@*":
version "15.7.1"
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.1.tgz#f1a11e7babb0c3cad68100be381d1e064c68f1f6"
@@ -1326,25 +1321,17 @@
"@types/react-router" "*"
"@types/react-router@*":
version "4.4.5"
resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-4.4.5.tgz#1166997dc7eef2917b5ebce890ebecb32ee5c1b3"
integrity sha512-12+VOu1+xiC8RPc9yrgHCyLI79VswjtuqeS2gPrMcywH6tkc8rGIUhs4LaL3AJPqo5d+RPnfRpNKiJ7MK2Qhcg==
version "5.0.0"
resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-5.0.0.tgz#22ae8f55d8af770ea1f755218936f01bfe1bfe27"
integrity sha512-0JjtJMxkQSyWUHTHaD3GhKf6rcZSUFmcQob8OlPTsbnxnIg2Nh3btkss4uke5CKVRtbCMipGU7My5jtfZQC+jw==
dependencies:
"@types/history" "*"
"@types/react" "*"
"@types/react@*":
version "16.8.16"
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.8.16.tgz#2bf980b4fb29cceeb01b2c139b3e185e57d3e08e"
integrity sha512-A0+6kS6zwPtvubOLiCJmZ8li5bm3wKIkoKV0h3RdMDOnCj9cYkUnj3bWbE03/lcICdQmwBmUfoFiHeNhbFiyHQ==
dependencies:
"@types/prop-types" "*"
csstype "^2.2.0"
"@types/react@16.8.14":
version "16.8.14"
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.8.14.tgz#b561bfabeb8f60d12e6d4766367e7a9ae927aa18"
integrity sha512-26tFVJ1omGmzIdFTFmnC5zhz1GTaqCjxgUxV4KzWvsybF42P7/j4RBn6UeO3KbHPXqKWZszMXMoI65xIWm954A==
"@types/react@*", "@types/react@16.8.17":
version "16.8.17"
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.8.17.tgz#f287b76a5badb93bc9aa3f54521a3eb53d6c2374"
integrity sha512-pln3mgc6VfkNg92WXODul/ONo140huK9OMsx62GlBlZ2lvjNK86PQJhYMPLO1i66aF5O9OPyZefogvNltBIszA==
dependencies:
"@types/prop-types" "*"
csstype "^2.2.0"
@@ -1837,10 +1824,11 @@ assert-plus@1.0.0, assert-plus@^1.0.0:
integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=
assert@^1.1.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91"
integrity sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=
version "1.5.0"
resolved "https://registry.yarnpkg.com/assert/-/assert-1.5.0.tgz#55c109aaf6e0aefdb3dc4b71240c70bf574b18eb"
integrity sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==
dependencies:
object-assign "^4.1.1"
util "0.10.3"
assign-symbols@^1.0.0:
@@ -1940,19 +1928,6 @@ babel-extract-comments@^1.0.0:
dependencies:
babylon "^6.18.0"
babel-jest@24.7.1:
version "24.7.1"
resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-24.7.1.tgz#73902c9ff15a7dfbdc9994b0b17fcefd96042178"
integrity sha512-GPnLqfk8Mtt0i4OemjWkChi73A3ALs4w2/QbG64uAj8b5mmwzxc7jbJVRZt8NJkxi6FopVHog9S3xX6UJKb2qg==
dependencies:
"@jest/transform" "^24.7.1"
"@jest/types" "^24.7.0"
"@types/babel__core" "^7.1.0"
babel-plugin-istanbul "^5.1.0"
babel-preset-jest "^24.6.0"
chalk "^2.4.2"
slash "^2.0.0"
babel-jest@^24.8.0:
version "24.8.0"
resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-24.8.0.tgz#5c15ff2b28e20b0f45df43fe6b7f2aae93dba589"
@@ -2039,10 +2014,10 @@ babel-preset-jest@^24.6.0:
"@babel/plugin-syntax-object-rest-spread" "^7.0.0"
babel-plugin-jest-hoist "^24.6.0"
babel-preset-react-app@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/babel-preset-react-app/-/babel-preset-react-app-8.0.0.tgz#930b6e28cdcfdff97ddb8bef9226d504f244d326"
integrity sha512-6Dmj7e8l7eWE+R6sKKLRrGEQXMfcBqBYlphaAgT1ml8qT1NEP+CyTZyfjmgKGqHZfwH3RQCUOuP6y4mpGc7tgg==
babel-preset-react-app@^9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/babel-preset-react-app/-/babel-preset-react-app-9.0.0.tgz#703108142bc9dd7173bde6a1a0138a762abc76f9"
integrity sha512-YVsDA8HpAKklhFLJtl9+AgaxrDaor8gGvDFlsg1ByOS0IPGUovumdv4/gJiAnLcDmZmKlH6+9sVOz4NVW7emAg==
dependencies:
"@babel/core" "7.4.3"
"@babel/plugin-proposal-class-properties" "7.4.0"
@@ -2077,9 +2052,9 @@ babylon@^6.18.0:
integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==
bail@^1.0.0:
version "1.0.3"
resolved "https://registry.yarnpkg.com/bail/-/bail-1.0.3.tgz#63cfb9ddbac829b02a3128cd53224be78e6c21a3"
integrity sha512-1X8CnjFVQ+a+KW36uBNMTU5s8+v5FzeqrP7hTG5aTb4aPreSbZJlhwPon9VKMuEVgV++JM+SQrALY3kr7eswdg==
version "1.0.4"
resolved "https://registry.yarnpkg.com/bail/-/bail-1.0.4.tgz#7181b66d508aa3055d3f6c13f0a0c720641dde9b"
integrity sha512-S8vuDB4w6YpRhICUDET3guPlQpaJl7od94tpZ0Fvnyp+MKW/HyDTcRDck+29C9g+d/qQHnddRH3+94kZdrW0Ww==
balanced-match@^1.0.0:
version "1.0.0"
@@ -2443,9 +2418,9 @@ caseless@~0.12.0:
integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=
ccount@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.0.3.tgz#f1cec43f332e2ea5a569fd46f9f5bde4e6102aff"
integrity sha512-Jt9tIBkRc9POUof7QA/VwWd+58fKkEEfI+/t1/eOlxKM7ZhrczNzMFefge7Ai+39y1pR/pP6cI19guHy3FSLmw==
version "1.0.4"
resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.0.4.tgz#9cf2de494ca84060a2a8d2854edd6dfb0445f386"
integrity sha512-fpZ81yYfzentuieinmGnphk0pLkOTMm6MZdVqwd77ROvhko6iujLNGrHH5E7utq3ygWklwfmwuG+A7P+NpqT6w==
chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.1, chalk@^2.4.2:
version "2.4.2"
@@ -3499,9 +3474,9 @@ ee-first@1.1.1:
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
electron-to-chromium@^1.3.122, electron-to-chromium@^1.3.127:
version "1.3.131"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.131.tgz#205a0b7a276b3f56bc056f19178909243054252a"
integrity sha512-NSO4jLeyGLWrT4mzzfYX8vt1MYCoMI5LxSYAjt0H9+LF/14JyiKJSyyjA6AJTxflZlEM5v3QU33F0ohbPMCAPg==
version "1.3.133"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.133.tgz#c47639c19b91feee3e22fad69f5556142007008c"
integrity sha512-lyoC8aoqbbDqsprb6aPdt9n3DpOZZzdz/T4IZKsR0/dkZIxnJVUjjcpOSwA66jPRIOyDAamCTAUqweU05kKNSg==
elliptic@^6.0.0:
version "6.4.1"
@@ -3616,10 +3591,10 @@ escodegen@^1.11.0, escodegen@^1.9.1:
optionalDependencies:
source-map "~0.6.1"
eslint-config-react-app@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-4.0.0.tgz#1651f44b3830d863817af6ebed0916193aa870c3"
integrity sha512-SeFxaI+0NAzWPFAI9AT+Vp9Xe2u5RCnn0JVEXkE338HgoPujc38Bc0upCJw4BWmavvIN/ODmE6EuzHoAEn3ozw==
eslint-config-react-app@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-4.0.1.tgz#23fd0fd7ea89442ef1e733f66a7207674b23c8db"
integrity sha512-ZsaoXUIGsK8FCi/x4lT2bZR5mMkL/Kgj+Lnw690rbvvUr/uiwgFiD8FcfAhkCycm7Xte6O5lYz4EqMx2vX7jgw==
dependencies:
confusing-browser-globals "^1.0.7"
@@ -4202,10 +4177,10 @@ forever-agent@~0.6.1:
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
fork-ts-checker-webpack-plugin@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-1.0.1.tgz#140453c4dc3dc35937034b7416b66a3bacfbc3a8"
integrity sha512-RrVxSiNtngsFDLQpP2QlrVaJK1zqRdwhtwslmDUWQTg3t3GW8QN7D3EpW/EAI+oqTqL0dGvLyluyYQ/eIrIHvQ==
fork-ts-checker-webpack-plugin@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-1.1.1.tgz#caf2a210778fb1e171b6993ca0a40f9b6589e3b7"
integrity sha512-gqWAEMLlae/oeVnN6RWCAhesOJMswAN1MaKNqhhjXHV5O0/rTUjWI4UbgQHdlrVbCnb+xLotXmJbBlC66QmpFw==
dependencies:
babel-code-frame "^6.22.0"
chalk "^2.4.1"
@@ -4214,6 +4189,7 @@ fork-ts-checker-webpack-plugin@1.0.1:
minimatch "^3.0.4"
semver "^5.6.0"
tapable "^1.0.0"
worker-rpc "^0.1.0"
form-data@~2.3.2:
version "2.3.3"
@@ -4369,9 +4345,9 @@ glob-to-regexp@^0.3.0:
integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=
glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3:
version "7.1.3"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1"
integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==
version "7.1.4"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255"
integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
@@ -6234,6 +6210,11 @@ methods@~1.1.2:
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=
microevent.ts@~0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/microevent.ts/-/microevent.ts-0.1.0.tgz#390748b8a515083e6b63cd5112a3f18c2fe0eba8"
integrity sha1-OQdIuKUVCD5rY81REqPxjC/g66g=
micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.8:
version "3.1.10"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
@@ -6566,9 +6547,9 @@ node-pre-gyp@^0.12.0:
tar "^4"
node-releases@^1.1.13, node-releases@^1.1.17:
version "1.1.17"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.17.tgz#71ea4631f0a97d5cd4f65f7d04ecf9072eac711a"
integrity sha512-/SCjetyta1m7YXLgtACZGDYJdCSIBAWorDWkGCGZlydP2Ll7J48l7j/JxNYZ+xsgSPbWfdulVS/aY+GdjUsQ7Q==
version "1.1.18"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.18.tgz#cc98fd75598a324a77188ebddf6650e9cbd8b1d5"
integrity sha512-/mnVgm6u/8OwlIsoyRXtTI0RfQcxZoAZbdwyXap0EeWwcOpDDymyCHM2/aR9XKmHXrvizHoPAOs0pcbiJ6RUaA==
dependencies:
semver "^5.3.0"
@@ -8097,10 +8078,10 @@ rc@^1.2.7:
minimist "^1.2.0"
strip-json-comments "~2.0.1"
react-app-polyfill@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/react-app-polyfill/-/react-app-polyfill-1.0.0.tgz#735c725c1d4261b710cb200c498789c8b80e0f74"
integrity sha512-fbZxEZdfx+rVENMvGTFjUcDDOZGKHaiavA8Y+FwM2I/o8gJT6pCYZk19XfeOntVzGZH2F1qqH7SLjXMhUM+YJw==
react-app-polyfill@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/react-app-polyfill/-/react-app-polyfill-1.0.1.tgz#809a858e44f9564c7f4205e173076f90048274f1"
integrity sha512-LbVpT1NdzTdDDs7xEZdebjDrqsvKi5UyVKUQqtTYYNyC1JJYVAwNQWe4ybWvoT2V2WW9PGVO2u5Y6aVj4ER/Ow==
dependencies:
core-js "3.0.1"
object-assign "4.1.1"
@@ -8109,10 +8090,10 @@ react-app-polyfill@^1.0.0:
regenerator-runtime "0.13.2"
whatwg-fetch "3.0.0"
react-dev-utils@^9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-9.0.0.tgz#356d95db442441c5d4748e0e49f4fd1e71aecbbd"
integrity sha512-HXvxOnABzIQH804ros5dBFryw4x0FU7Tl5KU2xg71jKx0EDsJYK0LuVVdj9qoLIgD1pmjzpjl7q7pjwXKIe37A==
react-dev-utils@^9.0.1:
version "9.0.1"
resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-9.0.1.tgz#5c03d85a0b2537d0c46af7165c24a7dfb274bef2"
integrity sha512-pnaeMo/Pxel8aZpxk1WwxT3uXxM3tEwYvsjCYn5R7gNxjhN1auowdcLDzFB8kr7rafAj2rxmvfic/fbac5CzwQ==
dependencies:
"@babel/code-frame" "7.0.0"
address "1.0.3"
@@ -8123,7 +8104,7 @@ react-dev-utils@^9.0.0:
escape-string-regexp "1.0.5"
filesize "3.6.1"
find-up "3.0.0"
fork-ts-checker-webpack-plugin "1.0.1"
fork-ts-checker-webpack-plugin "1.1.1"
global-modules "2.0.0"
globby "8.0.2"
gzip-size "5.0.0"
@@ -8133,7 +8114,7 @@ react-dev-utils@^9.0.0:
loader-utils "1.2.3"
opn "5.4.0"
pkg-up "2.0.0"
react-error-overlay "^5.1.5"
react-error-overlay "^5.1.6"
recursive-readdir "2.2.2"
shell-quote "1.6.1"
sockjs-client "1.3.0"
@@ -8150,10 +8131,10 @@ react-dom@^16.8.6:
prop-types "^15.6.2"
scheduler "^0.13.6"
react-error-overlay@^5.1.5:
version "5.1.5"
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-5.1.5.tgz#884530fd055476c764eaa8ab13b8ecf1f57bbf2c"
integrity sha512-O9JRum1Zq/qCPFH5qVEvDDrVun8Jv9vbHtZXCR1EuRj9sKg1xJTlHxBzU6AkCzpvxRLuiY4OKImy3cDLQ+UTdg==
react-error-overlay@^5.1.6:
version "5.1.6"
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-5.1.6.tgz#0cd73407c5d141f9638ae1e0c63e7b2bf7e9929d"
integrity sha512-X1Y+0jR47ImDVr54Ab6V9eGk0Hnu7fVWGeHQSOXHf/C2pF9c6uy3gef8QUeuUiWlNb0i08InPSE5a/KJzNzw1Q==
react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4:
version "16.8.6"
@@ -8194,26 +8175,27 @@ react-router@5.0.0:
tiny-invariant "^1.0.2"
tiny-warning "^1.0.0"
react-scripts@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/react-scripts/-/react-scripts-3.0.0.tgz#a715613ef3eace025907b409cec8505096e0233e"
integrity sha512-F4HegoBuUKZvEzXYksQu05Y6vJqallhHkQUEL6M7OQ5rYLBQC/4MTK6km9ZZvEK9TqMy1XA8SSEJGJgTEr6bSQ==
react-scripts@3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/react-scripts/-/react-scripts-3.0.1.tgz#e5565350d8069cc9966b5998d3fe3befe3d243ac"
integrity sha512-LKEjBhVpEB+c312NeJhzF+NATxF7JkHNr5GhtwMeRS1cMeLElMeIu8Ye7WGHtDP7iz7ra4ryy48Zpo6G/cwWUw==
dependencies:
"@babel/core" "7.4.3"
"@svgr/webpack" "4.1.0"
"@typescript-eslint/eslint-plugin" "1.6.0"
"@typescript-eslint/parser" "1.6.0"
babel-eslint "10.0.1"
babel-jest "24.7.1"
babel-jest "^24.8.0"
babel-loader "8.0.5"
babel-plugin-named-asset-import "^0.3.2"
babel-preset-react-app "^8.0.0"
babel-preset-react-app "^9.0.0"
camelcase "^5.2.0"
case-sensitive-paths-webpack-plugin "2.2.0"
css-loader "2.1.1"
dotenv "6.2.0"
dotenv-expand "4.2.0"
eslint "^5.16.0"
eslint-config-react-app "^4.0.0"
eslint-config-react-app "^4.0.1"
eslint-loader "2.1.2"
eslint-plugin-flowtype "2.50.1"
eslint-plugin-import "2.16.0"
@@ -8237,13 +8219,14 @@ react-scripts@3.0.0:
postcss-normalize "7.0.1"
postcss-preset-env "6.6.0"
postcss-safe-parser "4.0.1"
react-app-polyfill "^1.0.0"
react-dev-utils "^9.0.0"
react-app-polyfill "^1.0.1"
react-dev-utils "^9.0.1"
resolve "1.10.0"
sass-loader "7.1.0"
semver "6.0.0"
style-loader "0.23.1"
terser-webpack-plugin "1.2.3"
ts-pnp "1.1.2"
url-loader "1.1.2"
webpack "4.29.6"
webpack-dev-server "3.2.1"
@@ -9333,9 +9316,9 @@ symbol-tree@^3.2.2:
integrity sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=
table@^5.2.3:
version "5.2.3"
resolved "https://registry.yarnpkg.com/table/-/table-5.2.3.tgz#cde0cc6eb06751c009efab27e8c820ca5b67b7f2"
integrity sha512-N2RsDAMvDLvYwFcwbPyF3VmVSSkuF+G1e+8inhBLtHpvwXGw4QRPEZhihQNeEN0i1up6/f6ObCJXNdlRG3YVyQ==
version "5.3.0"
resolved "https://registry.yarnpkg.com/table/-/table-5.3.0.tgz#8a2c3354dc87312328c68732039b38b6a41c86c9"
integrity sha512-6V2qlZHIbbZQGzoP3Ghcj/IQDPhBvQYjZE4W4JEyFMkbzHziIzG6jxmAD87BZ1ZXgwPwgu3MzvCUGMOFRN7wlw==
dependencies:
ajv "^6.9.1"
lodash "^4.17.11"
@@ -9523,7 +9506,7 @@ trough@^1.0.0:
resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.3.tgz#e29bd1614c6458d44869fc28b255ab7857ef7c24"
integrity sha512-fwkLWH+DimvA4YCy+/nvJd61nWQQ2liO/nF/RjkTpiOGi+zxZzVkhb1mvbHIIW4b/8nDsYI8uTmAlc0nNkRMOw==
ts-pnp@^1.0.0:
ts-pnp@1.1.2, ts-pnp@^1.0.0:
version "1.1.2"
resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.1.2.tgz#be8e4bfce5d00f0f58e0666a82260c34a57af552"
integrity sha512-f5Knjh7XCyRIzoC/z1Su1yLLRrPrFCgtUAh/9fCSP6NKbATwpOL1+idQVXQokK9GRFURn/jYPGPfegIctwunoA==
@@ -9822,9 +9805,9 @@ vary@~1.1.2:
integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
vendors@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.2.tgz#7fcb5eef9f5623b156bcea89ec37d63676f21801"
integrity sha512-w/hry/368nO21AN9QljsaIhb9ZiZtZARoVH5f3CsFbawdLdayCgKRPup7CggujvySMxx0I91NOyxdVENohprLQ==
version "1.0.3"
resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.3.tgz#a6467781abd366217c050f8202e7e50cc9eef8c0"
integrity sha512-fOi47nsJP5Wqefa43kyWSg80qF+Q3XA6MUkgi7Hp1HQaKDQW4cQrK2D0P7mmbFtsV1N89am55Yru/nyEwRubcw==
verror@1.10.0:
version "1.10.0"
@@ -9925,9 +9908,9 @@ wbuf@^1.1.0, wbuf@^1.7.3:
minimalistic-assert "^1.0.0"
web-namespaces@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-1.1.2.tgz#c8dc267ab639505276bae19e129dbd6ae72b22b4"
integrity sha512-II+n2ms4mPxK+RnIxRPOw3zwF2jRscdJIUE9BfkKHm4FYEg9+biIoTMnaZF5MpemE3T+VhMLrhbyD4ilkPCSbg==
version "1.1.3"
resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-1.1.3.tgz#9bbf5c99ff0908d2da031f1d732492a96571a83f"
integrity sha512-r8sAtNmgR0WKOKOxzuSgk09JsHlpKlB+uHi937qypOu3PZ17UxPrierFKDye/uNHjNTTEshu5PId8rojIPj/tA==
webidl-conversions@^4.0.2:
version "4.0.2"
@@ -10254,6 +10237,13 @@ worker-farm@^1.5.2:
dependencies:
errno "~0.1.7"
worker-rpc@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/worker-rpc/-/worker-rpc-0.1.0.tgz#5f1258dca3d617cd18ca86587f8a05ac0eebd834"
integrity sha1-XxJY3KPWF80YyoZYf4oFrA7r2DQ=
dependencies:
microevent.ts "~0.1.0"
wrap-ansi@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85"