Welcome
Welcome to J-Node OpenNeuro repository!
- The INCF Japan Node platform OpenNeuro repository provides a reliable opportunity for researchers in the field of experimental and computational neuroscience to share supplemental materials to their peer-reviewed publications in academic journals and conference proceedings that are available in the public domain. - It aims at playing a core role for promoting and accelerating neuroscience. - Toward this end, we encourage databasing of + Welcome to J-Node OpenNeuro repository! +
++ The INCF Japan Node platform OpenNeuro repository provides a reliable opportunity for + researchers in the field of experimental and computational neuroscience to share supplemental materials + to their peer-reviewed publications in academic journals and conference proceedings that are available + in the public domain. It aims at playing a core role for promoting and accelerating neuroscience. Toward + this end, we encourage databasing of
- complete sets of experimental image and/or time-series data, @@ -32,11 +37,19 @@ const Welcome: React.FC
- computational models,
- which have been described and/or analyzed in the publications, in particular if they are too large in size and/or too complicated to make them public as usual supplemental-material-mechanisms provided by academic journals, or if the authors wish to retain unique services of INCF Japan Node and J-Node OpenNeuro repository such as real-time cloud computing services for the data registered in J-Node OpenNeuro repository. - Each of those materials may be provided by standardized human/machine readable formats, such as model description languages, commonly utilized program source codes and/or executable/machine-readable binary codes. J-Node OpenNeuro repository will welcome those materials prior to publication to guarantee data accessibility, which will be accessible only for limited number of peer-reviewers during review process and then opened in the public domain immediately after publication. + which have been described and/or analyzed in the publications, in particular if they are too large in + size and/or too complicated to make them public as usual supplemental-material-mechanisms provided by + academic journals, or if the authors wish to retain unique services of INCF Japan Node and J-Node{' '} + OpenNeuro repository such as real-time cloud computing services for the data registered + in J-Node OpenNeuro repository. Each of those materials may be provided by standardized + human/machine readable formats, such as model description languages, commonly utilized program source + codes and/or executable/machine-readable binary codes. J-Node OpenNeuro repository will + welcome those materials prior to publication to guarantee data accessibility, which will be accessible + only for limited number of peer-reviewers during review process and then opened in the public domain + immediately after publication.
{Functions.mlang('[en]Search Items[/en][ja]アイテム検索[/ja]', lang)}
-{Functions.mlang('[en]Search Items[/en][ja]アイテム検索[/ja]', lang)}
+{Functions.mlang('[en]Item Detail[/en][ja]アイテム詳細[/ja]', lang)}
--
{Functions.mlang('[en]Item Detail[/en][ja]アイテム詳細[/ja]', lang)}
++
Listing item
-Listing item
+{Functions.mlang('[en]Listing item[/en][ja]アイテム一覧[/ja]', lang)}
-{Functions.mlang('[en]Listing item[/en][ja]アイテム一覧[/ja]', lang)}
+{Functions.mlang('[en]Listing item[/en][ja]アイテム一覧[/ja]', lang)}
-{Functions.mlang('[en]Listing item[/en][ja]アイテム一覧[/ja]', lang)}
+{Functions.mlang('[en]Listing item[/en][ja]アイテム一覧[/ja]', lang)}
-{Functions.mlang('[en]Search Keyword[/en][ja]検索キーワード[/ja]', lang)} : {this.state.keyword}
-{Functions.mlang('[en]Listing item[/en][ja]アイテム一覧[/ja]', lang)}
++ {Functions.mlang('[en]Search Keyword[/en][ja]検索キーワード[/ja]', lang)} : {keyword} +
+|
- {type !== '' && |
+ {type !== '' && |
);
})}
@@ -35,6 +34,6 @@ const DatabaseTop = (props: Props) => {
+ {Functions.mlang(item.title, lang)} +
{authors} > ); diff --git a/src/database/item-type/book/BookTop.tsx b/src/database/item-type/book/BookTop.tsx index 4fb2c35..0611ed3 100644 --- a/src/database/item-type/book/BookTop.tsx +++ b/src/database/item-type/book/BookTop.tsx @@ -1,8 +1,7 @@ -import TopBase, { TopBaseProps } from '../lib/TopBase'; import iconFile from '../../assets/images/icon_book.gif'; +import TopBase, { type TopBaseProps } from '../lib/TopBase'; class BookTop extends TopBase { - constructor(props: TopBaseProps) { super(props); this.type = 'book'; @@ -12,4 +11,4 @@ class BookTop extends TopBase { } } -export default BookTop; \ No newline at end of file +export default BookTop; diff --git a/src/database/item-type/book/index.tsx b/src/database/item-type/book/index.tsx index 3187d8b..2649298 100644 --- a/src/database/item-type/book/index.tsx +++ b/src/database/item-type/book/index.tsx @@ -1,7 +1,7 @@ -import BookTop from './BookTop'; -import BookList from './BookList'; -import BookDetail from './BookDetail'; import BookAdvancedSearch from './BookAdvancedSearch'; +import BookDetail from './BookDetail'; +import BookList from './BookList'; +import BookTop from './BookTop'; const ItemTypeBook = { Top: BookTop, diff --git a/src/database/item-type/conference/ConferenceAdvancedSearch.tsx b/src/database/item-type/conference/ConferenceAdvancedSearch.tsx index 505835c..dc9eece 100644 --- a/src/database/item-type/conference/ConferenceAdvancedSearch.tsx +++ b/src/database/item-type/conference/ConferenceAdvancedSearch.tsx @@ -1,9 +1,7 @@ -import React from 'react'; import { ItemConferenceSubTypes } from '../../lib/ItemUtil'; -import AdvancedSearchBase, { AdvancedSearchBaseProps } from '../lib/AdvancedSearchBase'; +import AdvancedSearchBase, { type AdvancedSearchBaseProps } from '../lib/AdvancedSearchBase'; class ConferenceAdvancedSearch extends AdvancedSearchBase { - constructor(props: AdvancedSearchBaseProps) { super(props); this.type = 'conference'; @@ -12,15 +10,15 @@ class ConferenceAdvancedSearch extends AdvancedSearchBase { const year = String(now.getFullYear()); const month = String(now.getMonth() + 1); const mday = String(now.getDate()); - this.state.values['title'] = ''; - this.state.values['presentation_type'] = ''; - this.state.values['author'] = ''; - this.state.values['conference_from_year'] = year; - this.state.values['conference_from_month'] = month; - this.state.values['conference_from_mday'] = mday; - this.state.values['conference_to_year'] = year; - this.state.values['conference_to_month'] = month; - this.state.values['conference_to_mday'] = mday; + this.state.values.title = ''; + this.state.values.presentation_type = ''; + this.state.values.author = ''; + this.state.values.conference_from_year = year; + this.state.values.conference_from_month = month; + this.state.values.conference_from_mday = mday; + this.state.values.conference_to_year = year; + this.state.values.conference_to_month = month; + this.state.values.conference_to_mday = mday; this.setIgnoreKey('conference_from_year'); this.setIgnoreKey('conference_from_month'); this.setIgnoreKey('conference_from_mday'); @@ -33,8 +31,12 @@ class ConferenceAdvancedSearch extends AdvancedSearchBase { return ( <>
- {Functions.mlang(item.conference_title, lang)} (
+ {Functions.mlang(item.title, lang)} +
+ {Functions.mlang(item.conference_title, lang)} ( +
{authors} > ); } } -export default ConferenceList; \ No newline at end of file +export default ConferenceList; diff --git a/src/database/item-type/conference/ConferenceTop.tsx b/src/database/item-type/conference/ConferenceTop.tsx index 8ba23b7..117475d 100644 --- a/src/database/item-type/conference/ConferenceTop.tsx +++ b/src/database/item-type/conference/ConferenceTop.tsx @@ -1,9 +1,8 @@ -import { ItemConferenceSubTypes } from '../../lib/ItemUtil'; -import TopBase, { TopBaseProps } from '../lib/TopBase'; import iconFile from '../../assets/images/icon_conference.gif'; +import { ItemConferenceSubTypes } from '../../lib/ItemUtil'; +import TopBase, { type TopBaseProps } from '../lib/TopBase'; class ConferenceTop extends TopBase { - constructor(props: TopBaseProps) { super(props); this.type = 'conference'; @@ -14,4 +13,4 @@ class ConferenceTop extends TopBase { } } -export default ConferenceTop; \ No newline at end of file +export default ConferenceTop; diff --git a/src/database/item-type/conference/ConferenceUtil.tsx b/src/database/item-type/conference/ConferenceUtil.tsx index 6cdbe2b..b3b6dcb 100644 --- a/src/database/item-type/conference/ConferenceUtil.tsx +++ b/src/database/item-type/conference/ConferenceUtil.tsx @@ -1,6 +1,5 @@ -import React from 'react'; -import { MultiLang } from '../../../config'; -import { ItemConference, ItemConferenceSubType, ItemConferenceSubTypes } from '../../lib/ItemUtil'; +import type { MultiLang } from '../../../config'; +import { type ItemConference, type ItemConferenceSubType, ItemConferenceSubTypes } from '../../lib/ItemUtil'; interface PresentationTypeProps { lang: MultiLang; @@ -9,12 +8,14 @@ interface PresentationTypeProps { const PresentationType = (props: PresentationTypeProps) => { const { type } = props; - const subtype = ItemConferenceSubTypes.find((value) => { return value.type === type; }); + const subtype = ItemConferenceSubTypes.find((value) => { + return value.type === type; + }); if (typeof subtype === 'undefined') { return null; } - return ({subtype.label}); -} + return {subtype.label}; +}; interface ConferenceDateProps { lang: MultiLang; @@ -24,14 +25,30 @@ interface ConferenceDateProps { const ConferenceDate = (props: ConferenceDateProps) => { 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 ({from} {to}); -} + 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 ( + + {from} {to} + + ); +}; const ConferenceUtil = { PresentationType, ConferenceDate, -} +}; -export default ConferenceUtil; \ No newline at end of file +export default ConferenceUtil; diff --git a/src/database/item-type/conference/index.tsx b/src/database/item-type/conference/index.tsx index 75272c4..f3cae75 100644 --- a/src/database/item-type/conference/index.tsx +++ b/src/database/item-type/conference/index.tsx @@ -1,7 +1,7 @@ -import ConferenceTop from './ConferenceTop'; -import ConferenceList from './ConferenceList'; -import ConferenceDetail from './ConferenceDetail'; import ConferenceAdvancedSearch from './ConferenceAdvancedSearch'; +import ConferenceDetail from './ConferenceDetail'; +import ConferenceList from './ConferenceList'; +import ConferenceTop from './ConferenceTop'; const ItemTypeConference = { Top: ConferenceTop, @@ -10,4 +10,4 @@ const ItemTypeConference = { AdvancedSearch: ConferenceAdvancedSearch, }; -export default ItemTypeConference; \ No newline at end of file +export default ItemTypeConference; diff --git a/src/database/item-type/data/DataAdvancedSearch.tsx b/src/database/item-type/data/DataAdvancedSearch.tsx index e408d8b..9abc6f0 100644 --- a/src/database/item-type/data/DataAdvancedSearch.tsx +++ b/src/database/item-type/data/DataAdvancedSearch.tsx @@ -1,8 +1,7 @@ import { ItemDataSubTypes } from '../../lib/ItemUtil'; -import AdvancedSearchBase, { AdvancedSearchBaseProps } from '../lib/AdvancedSearchBase'; +import AdvancedSearchBase, { type AdvancedSearchBaseProps } from '../lib/AdvancedSearchBase'; class DataAdvancedSearch extends AdvancedSearchBase { - constructor(props: AdvancedSearchBaseProps) { super(props); this.type = 'data'; @@ -11,15 +10,15 @@ class DataAdvancedSearch extends AdvancedSearchBase { const year = String(now.getFullYear()); const month = String(now.getMonth() + 1); const mday = String(now.getDate()); - this.state.values['title'] = ''; - this.state.values['keyword'] = ''; - this.state.values['description'] = ''; - this.state.values['doi'] = ''; - this.state.values['data_type'] = ''; - this.state.values['experimenter'] = ''; - this.state.values['publication_year'] = year; - this.state.values['publication_month'] = month; - this.state.values['publication_mday'] = mday; + this.state.values.title = ''; + this.state.values.keyword = ''; + this.state.values.description = ''; + this.state.values.doi = ''; + this.state.values.data_type = ''; + this.state.values.experimenter = ''; + this.state.values.publication_year = year; + this.state.values.publication_month = month; + this.state.values.publication_mday = mday; this.state.values['file.preview.caption'] = ''; this.state.values['file.data_file.original_file_name'] = ''; this.setIgnoreKey('publication_year'); @@ -30,17 +29,32 @@ class DataAdvancedSearch extends AdvancedSearchBase { getRows() { const rows = [ { label: '[en]Title[/en][ja]タイトル[/ja]', value: this.renderFieldInputText('title', 50) }, - { label: '[en]Free Keywords[/en][ja]フリーキーワード[/ja]', value: this.renderFieldInputText('keyword', 50) }, + { + label: '[en]Free Keywords[/en][ja]フリーキーワード[/ja]', + value: this.renderFieldInputText('keyword', 50), + }, { label: '[en]Description[/en][ja]概要[/ja]', value: this.renderFieldInputText('description', 50) }, { label: 'ID', value: this.renderFieldInputText('doi', 50) }, - { label: '[en]Data Type[/en][ja]データタイプ[/ja]', value: this.renderFieldSelect('data_type', ItemDataSubTypes) }, + { + label: '[en]Data Type[/en][ja]データタイプ[/ja]', + value: this.renderFieldSelect('data_type', ItemDataSubTypes), + }, { label: '[en]Experimenter[/en][ja]実験者[/ja]', value: this.renderFieldInputText('experimenter', 50) }, - { label: '[en]Date[/en][ja]日付[/ja]', value: this.renderFieldDate('', 'publication_year', 'publication_month', 'publication_mday') }, - { label: '[en]Caption[/en][ja]キャプション[/ja]', value: this.renderFieldInputText('file.preview.caption', 50) }, - { label: '[en]Data File[/en][ja]データファイル[/ja]', value: this.renderFieldInputText('file.data_file.original_file_name', 50) }, + { + label: '[en]Date[/en][ja]日付[/ja]', + value: this.renderFieldDate('', 'publication_year', 'publication_month', 'publication_mday'), + }, + { + label: '[en]Caption[/en][ja]キャプション[/ja]', + value: this.renderFieldInputText('file.preview.caption', 50), + }, + { + label: '[en]Data File[/en][ja]データファイル[/ja]', + value: this.renderFieldInputText('file.data_file.original_file_name', 50), + }, ]; return rows; } } -export default DataAdvancedSearch; \ No newline at end of file +export default DataAdvancedSearch; diff --git a/src/database/item-type/data/DataDetail.tsx b/src/database/item-type/data/DataDetail.tsx index 6578faf..7f43f9f 100644 --- a/src/database/item-type/data/DataDetail.tsx +++ b/src/database/item-type/data/DataDetail.tsx @@ -1,6 +1,5 @@ -import React from 'react'; import Functions from '../../../functions'; -import ItemUtil, { ItemData } from '../../lib/ItemUtil'; +import ItemUtil, { type ItemData } from '../../lib/ItemUtil'; import DetailBase from '../lib/DetailBase'; import ItemTypeField from '../lib/field'; import OpenNeuroAuthor from '../lib/field/OpenNeuroAuthor'; @@ -10,39 +9,108 @@ import SimPFLinkIcon from '../lib/field/SimPFLinkIcon'; import DataUtil from './DataUtil'; class DataDetail extends DetailBase { - getFields() { const { lang } = this.props; const item = this.props.item as ItemData; - // OPENNEURO: const fields = [ { label: '[en]Item Type[/en][ja]アイテムタイプ[/ja]', value: item.item_type_display_name }, { label: 'ID', value: item.doi }, - { label: '[en]Language[/en][ja]言語[/ja]', value:
-
+ {Functions.mlang(item.title, lang)} +
+
{authors} > ); } } -export default DataList; \ No newline at end of file +export default DataList; diff --git a/src/database/item-type/data/DataTop.tsx b/src/database/item-type/data/DataTop.tsx index 0deae6a..e3426cc 100644 --- a/src/database/item-type/data/DataTop.tsx +++ b/src/database/item-type/data/DataTop.tsx @@ -1,18 +1,17 @@ -import { ItemDataSubTypes } from '../../lib/ItemUtil'; -import TopBase, { TopBaseProps } from '../lib/TopBase'; import iconFile from '../../assets/images/icon_data.gif'; +import { ItemDataSubTypes } from '../../lib/ItemUtil'; +import TopBase, { type TopBaseProps } from '../lib/TopBase'; class DataTop extends TopBase { - constructor(props: TopBaseProps) { super(props); this.type = 'data'; this.label = 'Data'; this.icon = iconFile; - // OPENNEURO: - this.description = '[en]Experimental data, Numerical data/Image/Movie/etc...[/en][ja]実験結果の数値データ/画像/動画など[/ja]'; + this.description = + '[en]Experimental data, Numerical data/Image/Movie/etc...[/en][ja]実験結果の数値データ/画像/動画など[/ja]'; this.subTypes = ItemDataSubTypes; } } -export default DataTop; \ No newline at end of file +export default DataTop; diff --git a/src/database/item-type/data/DataUtil.tsx b/src/database/item-type/data/DataUtil.tsx index 9944054..a98e949 100644 --- a/src/database/item-type/data/DataUtil.tsx +++ b/src/database/item-type/data/DataUtil.tsx @@ -1,6 +1,5 @@ -import React from 'react'; -import { MultiLang } from '../../../config'; -import { ItemDataSubType, ItemDataSubTypes } from '../../lib/ItemUtil'; +import type { MultiLang } from '../../../config'; +import { type ItemDataSubType, ItemDataSubTypes } from '../../lib/ItemUtil'; interface DataTypeProps { lang: MultiLang; @@ -9,15 +8,17 @@ interface DataTypeProps { const DataType = (props: DataTypeProps) => { const { type } = props; - const subtype = ItemDataSubTypes.find((value) => { return value.type === type; }); + const subtype = ItemDataSubTypes.find((value) => { + return value.type === type; + }); if (typeof subtype === 'undefined') { return null; } - return ({subtype.label}); -} + return {subtype.label}; +}; const DataUtil = { DataType, -} +}; -export default DataUtil; \ No newline at end of file +export default DataUtil; diff --git a/src/database/item-type/data/index.tsx b/src/database/item-type/data/index.tsx index 21a88d8..982c4d6 100644 --- a/src/database/item-type/data/index.tsx +++ b/src/database/item-type/data/index.tsx @@ -1,7 +1,7 @@ -import DataTop from './DataTop'; -import DataList from './DataList'; -import DataDetail from './DataDetail'; import DataAdvancedSearch from './DataAdvancedSearch'; +import DataDetail from './DataDetail'; +import DataList from './DataList'; +import DataTop from './DataTop'; const ItemTypeData = { Top: DataTop, @@ -10,4 +10,4 @@ const ItemTypeData = { AdvancedSearch: DataAdvancedSearch, }; -export default ItemTypeData; \ No newline at end of file +export default ItemTypeData; diff --git a/src/database/item-type/files/FilesAdvancedSearch.tsx b/src/database/item-type/files/FilesAdvancedSearch.tsx index 57b27d3..945105e 100644 --- a/src/database/item-type/files/FilesAdvancedSearch.tsx +++ b/src/database/item-type/files/FilesAdvancedSearch.tsx @@ -1,30 +1,41 @@ -import AdvancedSearchBase, { AdvancedSearchBaseProps } from '../lib/AdvancedSearchBase'; +import AdvancedSearchBase, { type AdvancedSearchBaseProps } from '../lib/AdvancedSearchBase'; class FilesAdvancedSearch extends AdvancedSearchBase { - constructor(props: AdvancedSearchBaseProps) { super(props); this.type = 'files'; this.title = 'Files'; - this.state.values['title'] = ''; - this.state.values['data_file_name'] = ''; - this.state.values['data_file_mimetype'] = ''; - this.state.values['data_file_filetype'] = ''; - this.state.values['keyword'] = ''; - this.state.values['description'] = ''; + this.state.values.title = ''; + this.state.values.data_file_name = ''; + this.state.values.data_file_mimetype = ''; + this.state.values.data_file_filetype = ''; + this.state.values.keyword = ''; + this.state.values.description = ''; } getRows() { const rows = [ { label: '[en]Title[/en][ja]タイトル[/ja]', value: this.renderFieldInputText('title', 50) }, - { label: '- [en]File Name[/en][ja]ファイル名[/ja]', value: this.renderFieldInputText('data_file_name', 50) }, - { label: '- [en]MIME Type[/en][ja]MIMEタイプ[/ja]', value: this.renderFieldInputText('data_file_mimetype', 50) }, - { label: '- [en]File Type[/en][ja]ファイルタイプ[/ja]', value: this.renderFieldInputText('data_file_filetype', 20) }, - { label: '[en]Free Keywords[/en][ja]フリーキーワード[/ja]', value: this.renderFieldInputText('keyword', 50) }, + { + label: '- [en]File Name[/en][ja]ファイル名[/ja]', + value: this.renderFieldInputText('data_file_name', 50), + }, + { + label: '- [en]MIME Type[/en][ja]MIMEタイプ[/ja]', + value: this.renderFieldInputText('data_file_mimetype', 50), + }, + { + label: '- [en]File Type[/en][ja]ファイルタイプ[/ja]', + value: this.renderFieldInputText('data_file_filetype', 20), + }, + { + label: '[en]Free Keywords[/en][ja]フリーキーワード[/ja]', + value: this.renderFieldInputText('keyword', 50), + }, { label: '[en]Description[/en][ja]概要[/ja]', value: this.renderFieldInputText('description', 50) }, ]; return rows; } } -export default FilesAdvancedSearch; \ No newline at end of file +export default FilesAdvancedSearch; diff --git a/src/database/item-type/files/FilesDetail.tsx b/src/database/item-type/files/FilesDetail.tsx index 89091d0..4a0fdec 100644 --- a/src/database/item-type/files/FilesDetail.tsx +++ b/src/database/item-type/files/FilesDetail.tsx @@ -1,31 +1,56 @@ -import React from 'react'; import Functions from '../../../functions'; -import { ItemFiles } from '../../lib/ItemUtil'; +import type { ItemFiles } from '../../lib/ItemUtil'; import DetailBase from '../lib/DetailBase'; import ItemTypeField from '../lib/field'; class FilesDetail extends DetailBase { - getFields() { const { lang } = this.props; const item = this.props.item as ItemFiles; return [ { label: 'ID', value: item.doi }, - { label: '[en]Language[/en][ja]言語[/ja]', value:
-
+ {Functions.mlang(item.title, lang)} +
+
{item.data_file_mimetype} > ); } } -export default FilesList; \ No newline at end of file +export default FilesList; diff --git a/src/database/item-type/files/FilesTop.tsx b/src/database/item-type/files/FilesTop.tsx index 3e6fae9..3669544 100644 --- a/src/database/item-type/files/FilesTop.tsx +++ b/src/database/item-type/files/FilesTop.tsx @@ -1,9 +1,8 @@ -import TopBase, { TopBaseProps } from '../lib/TopBase'; import iconFile from '../../assets/images/icon_files.gif'; import { ItemFilesSubTypes } from '../../lib/ItemUtil'; +import TopBase, { type TopBaseProps } from '../lib/TopBase'; class FilesTop extends TopBase { - constructor(props: TopBaseProps) { super(props); this.type = 'files'; @@ -14,4 +13,4 @@ class FilesTop extends TopBase { } } -export default FilesTop; \ No newline at end of file +export default FilesTop; diff --git a/src/database/item-type/files/FilesUtil.tsx b/src/database/item-type/files/FilesUtil.tsx index 0e10e42..9ce49b5 100644 --- a/src/database/item-type/files/FilesUtil.tsx +++ b/src/database/item-type/files/FilesUtil.tsx @@ -1,5 +1,3 @@ +const FilesUtil = {}; -const FilesUtil = { -} - -export default FilesUtil; \ No newline at end of file +export default FilesUtil; diff --git a/src/database/item-type/files/index.tsx b/src/database/item-type/files/index.tsx index 00ebdea..c1e871d 100644 --- a/src/database/item-type/files/index.tsx +++ b/src/database/item-type/files/index.tsx @@ -1,7 +1,7 @@ -import FilesTop from './FilesTop'; -import FilesList from './FilesList'; -import FilesDetail from './FilesDetail'; import FilesAdvancedSearch from './FilesAdvancedSearch'; +import FilesDetail from './FilesDetail'; +import FilesList from './FilesList'; +import FilesTop from './FilesTop'; const ItemTypeFiles = { Top: FilesTop, @@ -10,4 +10,4 @@ const ItemTypeFiles = { AdvancedSearch: FilesAdvancedSearch, }; -export default ItemTypeFiles; \ No newline at end of file +export default ItemTypeFiles; diff --git a/src/database/item-type/index.tsx b/src/database/item-type/index.tsx index 900cacc..ebf8192 100644 --- a/src/database/item-type/index.tsx +++ b/src/database/item-type/index.tsx @@ -1,7 +1,21 @@ -import React from 'react'; -import { MultiLang } from '../../config'; -import AdvancedSearchQuery from '../lib/AdvancedSearchQuery'; -import { Item, ItemBinder, ItemBook, ItemConference, ItemData, ItemFiles, ItemModel, ItemPaper, ItemPresentation, ItemSimulator, ItemStimulus, ItemTool, ItemUrl, ItemMemo } from '../lib/ItemUtil'; +import type { MultiLang } from '../../config'; +import type AdvancedSearchQuery from '../lib/AdvancedSearchQuery'; +import type { + Item, + ItemBinder, + ItemBook, + ItemConference, + ItemData, + ItemFiles, + ItemMemo, + ItemModel, + ItemPaper, + ItemPresentation, + ItemSimulator, + ItemStimulus, + ItemTool, + ItemUrl, +} from '../lib/ItemUtil'; import ItemTypeBinder from './binder'; import ItemTypeBook from './book'; import ItemTypeConference from './conference'; @@ -52,7 +66,7 @@ const Top = (props: TopProps) => { default: return null; } -} +}; interface ListProps { lang: MultiLang; @@ -90,7 +104,7 @@ const List = (props: ListProps) => { default: return null; } -} +}; interface DetailProps { lang: MultiLang; @@ -128,7 +142,7 @@ const Detail = (props: DetailProps) => { default: return null; } -} +}; interface AdvancedSearchProps { lang: MultiLang; @@ -167,13 +181,13 @@ const AdvancedSearch = (props: AdvancedSearchProps) => { default: return null; } -} +}; const ItemType = { Top, List, Detail, - AdvancedSearch -} + AdvancedSearch, +}; -export default ItemType; \ No newline at end of file +export default ItemType; diff --git a/src/database/item-type/lib/AdvancedSearchBase.tsx b/src/database/item-type/lib/AdvancedSearchBase.tsx index f1c5286..e9e6966 100644 --- a/src/database/item-type/lib/AdvancedSearchBase.tsx +++ b/src/database/item-type/lib/AdvancedSearchBase.tsx @@ -1,8 +1,9 @@ -import React, { ChangeEvent, Component } from 'react'; -import { MultiLang } from '../../../config'; +import type { ReactElement } from 'react'; +import { type ChangeEvent, Component } from 'react'; +import type { MultiLang } from '../../../config'; import Functions from '../../../functions'; -import AdvancedSearchQuery from '../../lib/AdvancedSearchQuery'; -import { ItemSubTypes } from '../../lib/ItemUtil'; +import type AdvancedSearchQuery from '../../lib/AdvancedSearchQuery'; +import type { ItemSubTypes } from '../../lib/ItemUtil'; export interface AdvancedSearchBaseProps { lang: MultiLang; @@ -11,12 +12,11 @@ export interface AdvancedSearchBaseProps { interface State { show: boolean; - values: any; + values: Record
| - {this.renderIcon()} - | -- {this.renderBody()} - | +{this.renderIcon()} | +{this.renderBody()} |
|
@@ -51,4 +46,4 @@ class ListBase extends Component||||||||||||||||||||||||||
| {value} | ||||||||||||||||||||||||||||||
| {value} | +
| This work is licensed under a Criative Commons {label} 4.0 International License. | +
+
+ |
+ + This work is licensed under a{' '} + + Criative Commons {label} 4.0 International License + + . + |
+ {data.original_file_name} +
| Type | : {data.mime_type} | {downloadLimit === 0 && |
| Size | : | |
| Last updated | : | |
| Type | +: {data.mime_type} | +
+ {downloadLimit === 0 && (
+ |
+
| Size | +
+ : |
+ |
| Last updated | +
+ : |
+
({Functions.mlang('[en]File has been removed[/en][ja]ファイルは削除されました[/ja]', lang)})>} + {downloadLimit === 1 && ( + <> +
({Functions.mlang('[en]File has been removed[/en][ja]ファイルは削除されました[/ja]', lang)}) + > + )}
No items found.
- ); - } - const startNum = 1 + this.state.condition.limit * (this.state.condition.page - 1); - let endNum = this.state.condition.limit * this.state.condition.page; - if (endNum > result.total) { - endNum = result.total; - } - const pageNavi = this.renderPageNavi(result); - const items = result.data.map((item: Item, idx) => { - const evenodd = idx % 2 === 0 ? 'even' : 'odd'; - return ({startNum} - {endNum} of {result.total} Items
- {pageNavi} -No items found.
; + } + const startNum = 1 + condition.limit * (condition.page - 1); + let endNum = condition.limit * condition.page; + if (endNum > result.total) { + endNum = result.total; + } + const pageNavi = renderPageNavi(result); + const items = result.data.map((item: Item, idx) => { + const evenodd = idx % 2 === 0 ? 'even' : 'odd'; + return ( ++ {startNum} - {endNum} of {result.total} Items +
+ {pageNavi} +