mirror of
https://github.com/PeWu/topola-viewer.git
synced 2025-12-23 18:50:04 +00:00
upgrade prettier and run on all files
This commit is contained in:
parent
9cadda886e
commit
97c17d47af
18
package-lock.json
generated
18
package-lock.json
generated
@ -67,7 +67,7 @@
|
|||||||
"@typescript-eslint/parser": "^4.19.0",
|
"@typescript-eslint/parser": "^4.19.0",
|
||||||
"cypress": "^13.17.0",
|
"cypress": "^13.17.0",
|
||||||
"gh-pages": "^3.1.0",
|
"gh-pages": "^3.1.0",
|
||||||
"prettier": "^2.2.1",
|
"prettier": "^3.4.2",
|
||||||
"react-scripts": "^5.0.1",
|
"react-scripts": "^5.0.1",
|
||||||
"run-script-os": "^1.1.6",
|
"run-script-os": "^1.1.6",
|
||||||
"start-server-and-test": "^2.0.9",
|
"start-server-and-test": "^2.0.9",
|
||||||
@ -17416,15 +17416,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/prettier": {
|
"node_modules/prettier": {
|
||||||
"version": "2.8.8",
|
"version": "3.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz",
|
||||||
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
|
"integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"prettier": "bin-prettier.js"
|
"prettier": "bin/prettier.cjs"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.13.0"
|
"node": ">=14"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||||
@ -35609,9 +35609,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
"version": "2.8.8",
|
"version": "3.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz",
|
||||||
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
|
"integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"pretty-bytes": {
|
"pretty-bytes": {
|
||||||
|
|||||||
@ -62,7 +62,7 @@
|
|||||||
"@typescript-eslint/parser": "^4.19.0",
|
"@typescript-eslint/parser": "^4.19.0",
|
||||||
"cypress": "^13.17.0",
|
"cypress": "^13.17.0",
|
||||||
"gh-pages": "^3.1.0",
|
"gh-pages": "^3.1.0",
|
||||||
"prettier": "^2.2.1",
|
"prettier": "^3.4.2",
|
||||||
"react-scripts": "^5.0.1",
|
"react-scripts": "^5.0.1",
|
||||||
"run-script-os": "^1.1.6",
|
"run-script-os": "^1.1.6",
|
||||||
"start-server-and-test": "^2.0.9",
|
"start-server-and-test": "^2.0.9",
|
||||||
|
|||||||
@ -122,7 +122,10 @@ interface Arguments {
|
|||||||
config: Config;
|
config: Config;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getParamFromSearch(name: string, search: queryString.ParsedQuery<string>) {
|
function getParamFromSearch(
|
||||||
|
name: string,
|
||||||
|
search: queryString.ParsedQuery<string>,
|
||||||
|
) {
|
||||||
const value = search[name];
|
const value = search[name];
|
||||||
return typeof value === 'string' ? value : undefined;
|
return typeof value === 'string' ? value : undefined;
|
||||||
}
|
}
|
||||||
@ -155,7 +158,8 @@ function getArguments(location: H.Location<any>): Arguments {
|
|||||||
const windowSearch = queryString.parse(window.location.search);
|
const windowSearch = queryString.parse(window.location.search);
|
||||||
sourceSpec = {
|
sourceSpec = {
|
||||||
source: DataSourceEnum.WIKITREE,
|
source: DataSourceEnum.WIKITREE,
|
||||||
authcode: getParam('authcode') || getParamFromSearch('authcode', windowSearch),
|
authcode:
|
||||||
|
getParam('authcode') || getParamFromSearch('authcode', windowSearch),
|
||||||
};
|
};
|
||||||
} else if (hash) {
|
} else if (hash) {
|
||||||
sourceSpec = {
|
sourceSpec = {
|
||||||
@ -591,4 +595,3 @@ export function App() {
|
|||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -117,7 +117,10 @@ export function ConfigPanel(props: {
|
|||||||
value="generation"
|
value="generation"
|
||||||
checked={props.config.color === ChartColors.COLOR_BY_GENERATION}
|
checked={props.config.color === ChartColors.COLOR_BY_GENERATION}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
props.onChange({...props.config, color: ChartColors.COLOR_BY_GENERATION})
|
props.onChange({
|
||||||
|
...props.config,
|
||||||
|
color: ChartColors.COLOR_BY_GENERATION,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</Form.Field>
|
</Form.Field>
|
||||||
@ -135,14 +138,17 @@ export function ConfigPanel(props: {
|
|||||||
value="gender"
|
value="gender"
|
||||||
checked={props.config.color === ChartColors.COLOR_BY_SEX}
|
checked={props.config.color === ChartColors.COLOR_BY_SEX}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
props.onChange({...props.config, color: ChartColors.COLOR_BY_SEX})
|
props.onChange({
|
||||||
|
...props.config,
|
||||||
|
color: ChartColors.COLOR_BY_SEX,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</Form.Field>
|
</Form.Field>
|
||||||
</Item.Content>
|
</Item.Content>
|
||||||
</Item>
|
</Item>
|
||||||
<Item>
|
<Item>
|
||||||
<Item.Content>
|
<Item.Content>
|
||||||
<Header sub>
|
<Header sub>
|
||||||
<FormattedMessage id="config.ids" defaultMessage="IDs" />
|
<FormattedMessage id="config.ids" defaultMessage="IDs" />
|
||||||
</Header>
|
</Header>
|
||||||
@ -159,9 +165,7 @@ export function ConfigPanel(props: {
|
|||||||
name="checkboxRadioGroup"
|
name="checkboxRadioGroup"
|
||||||
value="hide"
|
value="hide"
|
||||||
checked={props.config.id === Ids.HIDE}
|
checked={props.config.id === Ids.HIDE}
|
||||||
onClick={() =>
|
onClick={() => props.onChange({...props.config, id: Ids.HIDE})}
|
||||||
props.onChange({...props.config, id: Ids.HIDE})
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
</Form.Field>
|
</Form.Field>
|
||||||
<Form.Field className="no-margin">
|
<Form.Field className="no-margin">
|
||||||
@ -177,15 +181,13 @@ export function ConfigPanel(props: {
|
|||||||
name="checkboxRadioGroup"
|
name="checkboxRadioGroup"
|
||||||
value="show"
|
value="show"
|
||||||
checked={props.config.id === Ids.SHOW}
|
checked={props.config.id === Ids.SHOW}
|
||||||
onClick={() =>
|
onClick={() => props.onChange({...props.config, id: Ids.SHOW})}
|
||||||
props.onChange({...props.config, id: Ids.SHOW})
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
</Form.Field>
|
</Form.Field>
|
||||||
</Item.Content>
|
</Item.Content>
|
||||||
</Item>
|
</Item>
|
||||||
<Item>
|
<Item>
|
||||||
<Item.Content>
|
<Item.Content>
|
||||||
<Header sub>
|
<Header sub>
|
||||||
<FormattedMessage id="config.sex" defaultMessage="Sex" />
|
<FormattedMessage id="config.sex" defaultMessage="Sex" />
|
||||||
</Header>
|
</Header>
|
||||||
@ -202,9 +204,7 @@ export function ConfigPanel(props: {
|
|||||||
name="checkboxRadioGroup"
|
name="checkboxRadioGroup"
|
||||||
value="hide"
|
value="hide"
|
||||||
checked={props.config.sex === Sex.HIDE}
|
checked={props.config.sex === Sex.HIDE}
|
||||||
onClick={() =>
|
onClick={() => props.onChange({...props.config, sex: Sex.HIDE})}
|
||||||
props.onChange({...props.config, sex: Sex.HIDE})
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
</Form.Field>
|
</Form.Field>
|
||||||
<Form.Field className="no-margin">
|
<Form.Field className="no-margin">
|
||||||
@ -220,9 +220,7 @@ export function ConfigPanel(props: {
|
|||||||
name="checkboxRadioGroup"
|
name="checkboxRadioGroup"
|
||||||
value="show"
|
value="show"
|
||||||
checked={props.config.sex === Sex.SHOW}
|
checked={props.config.sex === Sex.SHOW}
|
||||||
onClick={() =>
|
onClick={() => props.onChange({...props.config, sex: Sex.SHOW})}
|
||||||
props.onChange({...props.config, sex: Sex.SHOW})
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
</Form.Field>
|
</Form.Field>
|
||||||
</Item.Content>
|
</Item.Content>
|
||||||
|
|||||||
@ -887,4 +887,3 @@ export class WikiTreeDataSource implements DataSource<WikiTreeSourceSpec> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import {
|
|||||||
GedcomData,
|
GedcomData,
|
||||||
getData,
|
getData,
|
||||||
getFileName,
|
getFileName,
|
||||||
getImageFileEntry
|
getImageFileEntry,
|
||||||
} from '../util/gedcom_util';
|
} from '../util/gedcom_util';
|
||||||
import {Events} from './events';
|
import {Events} from './events';
|
||||||
import {GedcomEntry} from 'parse-gedcom';
|
import {GedcomEntry} from 'parse-gedcom';
|
||||||
|
|||||||
@ -158,9 +158,7 @@ function eventSources(entry: GedcomEntry, gedcom: GedcomData): Source[] {
|
|||||||
(subEntry) => 'TITL' === subEntry.tag,
|
(subEntry) => 'TITL' === subEntry.tag,
|
||||||
);
|
);
|
||||||
|
|
||||||
const abbr = sourceEntry.tree.find(
|
const abbr = sourceEntry.tree.find((subEntry) => 'ABBR' === subEntry.tag);
|
||||||
(subEntry) => 'ABBR' === subEntry.tag,
|
|
||||||
);
|
|
||||||
|
|
||||||
const author = sourceEntry.tree.find(
|
const author = sourceEntry.tree.find(
|
||||||
(subEntry) => 'AUTH' === subEntry.tag,
|
(subEntry) => 'AUTH' === subEntry.tag,
|
||||||
|
|||||||
@ -58,8 +58,7 @@ function Contents() {
|
|||||||
<li>
|
<li>
|
||||||
<ViewLink
|
<ViewLink
|
||||||
params={{
|
params={{
|
||||||
url:
|
url: 'https://chronoplexsoftware.com/myfamilytree/samples/The%20Kennedy%20Family.gdz',
|
||||||
'https://chronoplexsoftware.com/myfamilytree/samples/The%20Kennedy%20Family.gdz',
|
|
||||||
}}
|
}}
|
||||||
text="J. F. Kennedy"
|
text="J. F. Kennedy"
|
||||||
/>{' '}
|
/>{' '}
|
||||||
@ -72,8 +71,7 @@ function Contents() {
|
|||||||
<li>
|
<li>
|
||||||
<ViewLink
|
<ViewLink
|
||||||
params={{
|
params={{
|
||||||
url:
|
url: 'https://webtreeprint.com/tp_downloader.php?path=famous_gedcoms/shakespeare.ged&file=shakespeare.ged',
|
||||||
'https://webtreeprint.com/tp_downloader.php?path=famous_gedcoms/shakespeare.ged&file=shakespeare.ged',
|
|
||||||
}}
|
}}
|
||||||
text="Shakespeare"
|
text="Shakespeare"
|
||||||
/>{' '}
|
/>{' '}
|
||||||
@ -86,8 +84,8 @@ function Contents() {
|
|||||||
<li>
|
<li>
|
||||||
<ViewLink
|
<ViewLink
|
||||||
params={{
|
params={{
|
||||||
indi:
|
indi: 'Skłodowska-2',
|
||||||
'Skłodowska-2', source: 'wikitree'
|
source: 'wikitree',
|
||||||
}}
|
}}
|
||||||
text="Maria Skłodowska-Curie"
|
text="Maria Skłodowska-Curie"
|
||||||
/>{' '}
|
/>{' '}
|
||||||
@ -180,4 +178,3 @@ export function Intro() {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -289,8 +289,9 @@ export function getName(person: GedcomEntry): string | undefined {
|
|||||||
export function getFileName(fileEntry: GedcomEntry): string | undefined {
|
export function getFileName(fileEntry: GedcomEntry): string | undefined {
|
||||||
const fileTitle = fileEntry?.tree.find((entry) => entry.tag === 'TITL')?.data;
|
const fileTitle = fileEntry?.tree.find((entry) => entry.tag === 'TITL')?.data;
|
||||||
|
|
||||||
const fileExtension = fileEntry?.tree.find((entry) => entry.tag === 'FORM')
|
const fileExtension = fileEntry?.tree.find(
|
||||||
?.data;
|
(entry) => entry.tag === 'FORM',
|
||||||
|
)?.data;
|
||||||
|
|
||||||
return fileTitle && fileExtension && fileTitle + '.' + fileExtension;
|
return fileTitle && fileExtension && fileTitle + '.' + fileExtension;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user