Compare commits
1 Commits
feature/an
...
facets-2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7205aeab77 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -16,7 +16,6 @@ node_modules
|
|||||||
*.launch
|
*.launch
|
||||||
.settings/
|
.settings/
|
||||||
*.sublime-workspace
|
*.sublime-workspace
|
||||||
.obsidian
|
|
||||||
|
|
||||||
# IDE - VSCode
|
# IDE - VSCode
|
||||||
.vscode/*
|
.vscode/*
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
This demo data portal is designed for https://hatespeechdata.com. It catalogs datasets annotated for hate speech, online abuse, and offensive language which are useful for training a natural language processing system to detect this online abuse.
|
## Intro
|
||||||
|
|
||||||
The site is built on top of [PortalJS](https://portaljs.org/). It catalogs datasets and lists of offensive keywords. It also includes static pages. All of these are stored as markdown files inside the `content` folder.
|
This page catalogues datasets annotated for hate speech, online abuse, and offensive language. They may be useful for e.g. training a natural language processing system to detect this language.
|
||||||
|
|
||||||
|
Its built on top of [PortalJS](https://portaljs.org/), it allows you to publish datasets, lists of offensive keywords and static pages, all of those are stored as markdown files inside the `content` folder.
|
||||||
|
|
||||||
- .md files inside `content/datasets/` will appear on the dataset list section of the homepage and be searchable as well as having a individual page in `datasets/<file name>`
|
- .md files inside `content/datasets/` will appear on the dataset list section of the homepage and be searchable as well as having a individual page in `datasets/<file name>`
|
||||||
- .md files inside `content/keywords/` will appear on the list of offensive keywords section of the homepage as well as having a individual page in `keywords/<file name>`
|
- .md files inside `content/keywords/` will appear on the list of offensive keywords section of the homepage as well as having a individual page in `keywords/<file name>`
|
||||||
109
examples/alan-turing-portal/components/Header.jsx
Normal file
109
examples/alan-turing-portal/components/Header.jsx
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
import { useRef } from 'react'
|
||||||
|
import { useRouter } from 'next/router'
|
||||||
|
|
||||||
|
import { Container } from '../components/Container'
|
||||||
|
|
||||||
|
function SunIcon(props) {
|
||||||
|
return (
|
||||||
|
<svg
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
strokeWidth="1.5"
|
||||||
|
strokeLinecap="round"
|
||||||
|
strokeLinejoin="round"
|
||||||
|
aria-hidden="true"
|
||||||
|
{...props}
|
||||||
|
>
|
||||||
|
<path d="M8 12.25A4.25 4.25 0 0 1 12.25 8v0a4.25 4.25 0 0 1 4.25 4.25v0a4.25 4.25 0 0 1-4.25 4.25v0A4.25 4.25 0 0 1 8 12.25v0Z" />
|
||||||
|
<path
|
||||||
|
d="M12.25 3v1.5M21.5 12.25H20M18.791 18.791l-1.06-1.06M18.791 5.709l-1.06 1.06M12.25 20v1.5M4.5 12.25H3M6.77 6.77 5.709 5.709M6.77 17.73l-1.061 1.061"
|
||||||
|
fill="none"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function MoonIcon(props) {
|
||||||
|
return (
|
||||||
|
<svg viewBox="0 0 24 24" aria-hidden="true" {...props}>
|
||||||
|
<path
|
||||||
|
d="M17.25 16.22a6.937 6.937 0 0 1-9.47-9.47 7.451 7.451 0 1 0 9.47 9.47ZM12.75 7C17 7 17 2.75 17 2.75S17 7 21.25 7C17 7 17 11.25 17 11.25S17 7 12.75 7Z"
|
||||||
|
strokeWidth="1.5"
|
||||||
|
strokeLinecap="round"
|
||||||
|
strokeLinejoin="round"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function ModeToggle() {
|
||||||
|
function disableTransitionsTemporarily() {
|
||||||
|
document.documentElement.classList.add('[&_*]:!transition-none')
|
||||||
|
window.setTimeout(() => {
|
||||||
|
document.documentElement.classList.remove('[&_*]:!transition-none')
|
||||||
|
}, 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleMode() {
|
||||||
|
disableTransitionsTemporarily()
|
||||||
|
|
||||||
|
let darkModeMediaQuery = window.matchMedia('(prefers-color-scheme: dark)')
|
||||||
|
let isSystemDarkMode = darkModeMediaQuery.matches
|
||||||
|
let isDarkMode = document.documentElement.classList.toggle('dark')
|
||||||
|
|
||||||
|
if (isDarkMode === isSystemDarkMode) {
|
||||||
|
delete window.localStorage.isDarkMode
|
||||||
|
} else {
|
||||||
|
window.localStorage.isDarkMode = isDarkMode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
aria-label="Toggle dark mode"
|
||||||
|
className="group rounded-full bg-white/90 px-3 py-2 shadow-lg shadow-zinc-800/5 ring-1 ring-zinc-900/5 backdrop-blur transition dark:bg-zinc-800/90 dark:ring-white/10 dark:hover:ring-white/20"
|
||||||
|
onClick={toggleMode}
|
||||||
|
>
|
||||||
|
<SunIcon className="h-6 w-6 fill-zinc-100 stroke-zinc-500 transition group-hover:fill-zinc-200 group-hover:stroke-zinc-700 dark:hidden [@media(prefers-color-scheme:dark)]:fill-teal-50 [@media(prefers-color-scheme:dark)]:stroke-teal-500 [@media(prefers-color-scheme:dark)]:group-hover:fill-teal-50 [@media(prefers-color-scheme:dark)]:group-hover:stroke-teal-600" />
|
||||||
|
<MoonIcon className="hidden h-6 w-6 fill-zinc-700 stroke-zinc-500 transition dark:block [@media(prefers-color-scheme:dark)]:group-hover:stroke-zinc-400 [@media_not_(prefers-color-scheme:dark)]:fill-teal-400/10 [@media_not_(prefers-color-scheme:dark)]:stroke-teal-500" />
|
||||||
|
</button>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Header() {
|
||||||
|
let isHomePage = useRouter().pathname === '/'
|
||||||
|
|
||||||
|
let headerRef = useRef()
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<header
|
||||||
|
className="pointer-events-none relative z-50 flex flex-col"
|
||||||
|
style={{
|
||||||
|
height: 'var(--header-height)',
|
||||||
|
marginBottom: 'var(--header-mb)',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
ref={headerRef}
|
||||||
|
className="top-0 z-10 h-16 pt-6"
|
||||||
|
style={{ position: 'var(--header-position)' }}
|
||||||
|
>
|
||||||
|
<Container
|
||||||
|
className="top-[var(--header-top,theme(spacing.6))] w-full"
|
||||||
|
style={{ position: 'var(--header-inner-position)' }}
|
||||||
|
>
|
||||||
|
<div className="relative flex gap-4">
|
||||||
|
<div className="flex justify-end md:flex-1">
|
||||||
|
<div className="pointer-events-auto">
|
||||||
|
<ModeToggle />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Container>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
{isHomePage && <div style={{ height: 'var(--content-offset)' }} />}
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
34
examples/alan-turing-portal/content/index.md
Normal file
34
examples/alan-turing-portal/content/index.md
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: Hate Speech Dataset Catalogue
|
||||||
|
---
|
||||||
|
|
||||||
|
This page catalogues datasets annotated for hate speech, online abuse, and offensive language. They may be useful for e.g. training a natural language processing system to detect this language.
|
||||||
|
|
||||||
|
The list is maintained by Leon Derczynski, Bertie Vidgen, Hannah Rose Kirk, Pica Johansson, Yi-Ling Chung, Mads Guldborg Kjeldgaard Kongsbak, Laila Sprejer, and Philine Zeinert.
|
||||||
|
|
||||||
|
We provide a list of datasets and keywords. If you would like to contribute to our catalogue or add your dataset, please see the instructions for contributing.
|
||||||
|
|
||||||
|
If you use these resources, please cite (and read!) our paper: Directions in Abusive Language Training Data: Garbage In, Garbage Out. And if you would like to find other resources for researching online hate, visit The Alan Turing Institute’s Online Hate Research Hub or read The Alan Turing Institute’s Reading List on Online Hate and Abuse Research.
|
||||||
|
|
||||||
|
If you’re looking for a good paper on online hate training datasets (beyond our paper, of course!) then have a look at ‘Resources and benchmark corpora for hate speech detection: a systematic review’ by Poletto et al. in Language Resources and Evaluation.
|
||||||
|
|
||||||
|
## How to contribute
|
||||||
|
|
||||||
|
We accept entries to our catalogue based on pull requests to the content folder. The dataset must be avaliable for download to be included in the list. If you want to add an entry, follow these steps!
|
||||||
|
|
||||||
|
Please send just one dataset addition/edit at a time - edit it in, then save. This will make everyone’s life easier (including yours!)
|
||||||
|
|
||||||
|
- Go to the repo url file and click the "Add file" dropdown and then click on "Create new file".
|
||||||
|

|
||||||
|
|
||||||
|
- In the following page type `content/datasets/<name-of-the-file>.md`. if you want to add an entry to the datasets catalog or `content/keywords/<name-of-the-file>.md` if you want to add an entry to the lists of abusive keywords, if you want to just add an static page you can leave in the root of `content` it will automatically get assigned an url eg: `/content/about.md` becomes the `/about` page
|
||||||
|

|
||||||
|
|
||||||
|
- Copy the contents of `templates/dataset.md` or `templates/keywords.md` respectively to the camp below, filling out the fields with the correct data format
|
||||||
|

|
||||||
|
|
||||||
|
- Click on "Commit changes", on the popup make sure you give some brief detail on the proposed change. and then click on Propose changes
|
||||||
|
<img src='https://i.imgur.com/BxuxKEJ.png' style={{ maxWidth: '50%', margin: '0 auto' }}/>
|
||||||
|
|
||||||
|
- Submit the pull request on the next page when prompted.
|
||||||
|
|
||||||
BIN
examples/alan-turing-portal/markdown.db
Normal file
BIN
examples/alan-turing-portal/markdown.db
Normal file
Binary file not shown.
@@ -23,8 +23,13 @@
|
|||||||
"@tailwindcss/forms": "^0.5.3",
|
"@tailwindcss/forms": "^0.5.3",
|
||||||
"@tailwindcss/typography": "^0.5.4",
|
"@tailwindcss/typography": "^0.5.4",
|
||||||
"@tanstack/react-table": "^8.8.5",
|
"@tanstack/react-table": "^8.8.5",
|
||||||
|
"@types/node": "18.16.0",
|
||||||
|
"@types/react": "18.2.0",
|
||||||
|
"@types/react-dom": "18.2.0",
|
||||||
"autoprefixer": "^10.4.12",
|
"autoprefixer": "^10.4.12",
|
||||||
"clsx": "^1.2.1",
|
"clsx": "^1.2.1",
|
||||||
|
"eslint": "8.39.0",
|
||||||
|
"eslint-config-next": "13.3.1",
|
||||||
"fast-glob": "^3.2.11",
|
"fast-glob": "^3.2.11",
|
||||||
"feed": "^4.2.2",
|
"feed": "^4.2.2",
|
||||||
"flexsearch": "^0.7.31",
|
"flexsearch": "^0.7.31",
|
||||||
@@ -56,9 +61,6 @@
|
|||||||
"tailwindcss": "^3.3.0"
|
"tailwindcss": "^3.3.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "18.16.0",
|
|
||||||
"@types/react": "18.2.0",
|
|
||||||
"@types/react-dom": "18.2.0",
|
|
||||||
"eslint": "8.26.0",
|
"eslint": "8.26.0",
|
||||||
"eslint-config-next": "13.0.2",
|
"eslint-config-next": "13.0.2",
|
||||||
"prettier": "^2.8.7",
|
"prettier": "^2.8.7",
|
||||||
@@ -550,9 +552,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@jridgewell/gen-mapping": {
|
"node_modules/@jridgewell/gen-mapping": {
|
||||||
"version": "0.3.3",
|
"version": "0.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz",
|
||||||
"integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
|
"integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jridgewell/set-array": "^1.0.1",
|
"@jridgewell/set-array": "^1.0.1",
|
||||||
@@ -582,9 +584,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@jridgewell/source-map": {
|
"node_modules/@jridgewell/source-map": {
|
||||||
"version": "0.3.3",
|
"version": "0.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz",
|
||||||
"integrity": "sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==",
|
"integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jridgewell/gen-mapping": "^0.3.0",
|
"@jridgewell/gen-mapping": "^0.3.0",
|
||||||
@@ -598,13 +600,13 @@
|
|||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/@jridgewell/trace-mapping": {
|
"node_modules/@jridgewell/trace-mapping": {
|
||||||
"version": "0.3.18",
|
"version": "0.3.14",
|
||||||
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz",
|
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz",
|
||||||
"integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==",
|
"integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jridgewell/resolve-uri": "3.1.0",
|
"@jridgewell/resolve-uri": "^3.0.3",
|
||||||
"@jridgewell/sourcemap-codec": "1.4.14"
|
"@jridgewell/sourcemap-codec": "^1.4.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@lit-labs/ssr-dom-shim": {
|
"node_modules/@lit-labs/ssr-dom-shim": {
|
||||||
@@ -1346,7 +1348,6 @@
|
|||||||
"version": "18.2.0",
|
"version": "18.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.0.tgz",
|
||||||
"integrity": "sha512-8yQrvS6sMpSwIovhPOwfyNf2Wz6v/B62LFSVYQ85+Rq3tLsBIG7rP5geMxaijTUxSkrO6RzN/IRuIAADYQsleA==",
|
"integrity": "sha512-8yQrvS6sMpSwIovhPOwfyNf2Wz6v/B62LFSVYQ85+Rq3tLsBIG7rP5geMxaijTUxSkrO6RzN/IRuIAADYQsleA==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/react": "*"
|
"@types/react": "*"
|
||||||
}
|
}
|
||||||
@@ -1477,148 +1478,148 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/ast": {
|
"node_modules/@webassemblyjs/ast": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz",
|
||||||
"integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==",
|
"integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@webassemblyjs/helper-numbers": "1.11.6",
|
"@webassemblyjs/helper-numbers": "1.11.1",
|
||||||
"@webassemblyjs/helper-wasm-bytecode": "1.11.6"
|
"@webassemblyjs/helper-wasm-bytecode": "1.11.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/floating-point-hex-parser": {
|
"node_modules/@webassemblyjs/floating-point-hex-parser": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz",
|
||||||
"integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==",
|
"integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==",
|
||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/helper-api-error": {
|
"node_modules/@webassemblyjs/helper-api-error": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz",
|
||||||
"integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==",
|
"integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==",
|
||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/helper-buffer": {
|
"node_modules/@webassemblyjs/helper-buffer": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz",
|
||||||
"integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==",
|
"integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==",
|
||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/helper-numbers": {
|
"node_modules/@webassemblyjs/helper-numbers": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz",
|
||||||
"integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==",
|
"integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@webassemblyjs/floating-point-hex-parser": "1.11.6",
|
"@webassemblyjs/floating-point-hex-parser": "1.11.1",
|
||||||
"@webassemblyjs/helper-api-error": "1.11.6",
|
"@webassemblyjs/helper-api-error": "1.11.1",
|
||||||
"@xtuc/long": "4.2.2"
|
"@xtuc/long": "4.2.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/helper-wasm-bytecode": {
|
"node_modules/@webassemblyjs/helper-wasm-bytecode": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz",
|
||||||
"integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==",
|
"integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==",
|
||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/helper-wasm-section": {
|
"node_modules/@webassemblyjs/helper-wasm-section": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz",
|
||||||
"integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==",
|
"integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@webassemblyjs/ast": "1.11.6",
|
"@webassemblyjs/ast": "1.11.1",
|
||||||
"@webassemblyjs/helper-buffer": "1.11.6",
|
"@webassemblyjs/helper-buffer": "1.11.1",
|
||||||
"@webassemblyjs/helper-wasm-bytecode": "1.11.6",
|
"@webassemblyjs/helper-wasm-bytecode": "1.11.1",
|
||||||
"@webassemblyjs/wasm-gen": "1.11.6"
|
"@webassemblyjs/wasm-gen": "1.11.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/ieee754": {
|
"node_modules/@webassemblyjs/ieee754": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz",
|
||||||
"integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==",
|
"integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@xtuc/ieee754": "^1.2.0"
|
"@xtuc/ieee754": "^1.2.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/leb128": {
|
"node_modules/@webassemblyjs/leb128": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz",
|
||||||
"integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==",
|
"integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@xtuc/long": "4.2.2"
|
"@xtuc/long": "4.2.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/utf8": {
|
"node_modules/@webassemblyjs/utf8": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz",
|
||||||
"integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==",
|
"integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==",
|
||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/wasm-edit": {
|
"node_modules/@webassemblyjs/wasm-edit": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz",
|
||||||
"integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==",
|
"integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@webassemblyjs/ast": "1.11.6",
|
"@webassemblyjs/ast": "1.11.1",
|
||||||
"@webassemblyjs/helper-buffer": "1.11.6",
|
"@webassemblyjs/helper-buffer": "1.11.1",
|
||||||
"@webassemblyjs/helper-wasm-bytecode": "1.11.6",
|
"@webassemblyjs/helper-wasm-bytecode": "1.11.1",
|
||||||
"@webassemblyjs/helper-wasm-section": "1.11.6",
|
"@webassemblyjs/helper-wasm-section": "1.11.1",
|
||||||
"@webassemblyjs/wasm-gen": "1.11.6",
|
"@webassemblyjs/wasm-gen": "1.11.1",
|
||||||
"@webassemblyjs/wasm-opt": "1.11.6",
|
"@webassemblyjs/wasm-opt": "1.11.1",
|
||||||
"@webassemblyjs/wasm-parser": "1.11.6",
|
"@webassemblyjs/wasm-parser": "1.11.1",
|
||||||
"@webassemblyjs/wast-printer": "1.11.6"
|
"@webassemblyjs/wast-printer": "1.11.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/wasm-gen": {
|
"node_modules/@webassemblyjs/wasm-gen": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz",
|
||||||
"integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==",
|
"integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@webassemblyjs/ast": "1.11.6",
|
"@webassemblyjs/ast": "1.11.1",
|
||||||
"@webassemblyjs/helper-wasm-bytecode": "1.11.6",
|
"@webassemblyjs/helper-wasm-bytecode": "1.11.1",
|
||||||
"@webassemblyjs/ieee754": "1.11.6",
|
"@webassemblyjs/ieee754": "1.11.1",
|
||||||
"@webassemblyjs/leb128": "1.11.6",
|
"@webassemblyjs/leb128": "1.11.1",
|
||||||
"@webassemblyjs/utf8": "1.11.6"
|
"@webassemblyjs/utf8": "1.11.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/wasm-opt": {
|
"node_modules/@webassemblyjs/wasm-opt": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz",
|
||||||
"integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==",
|
"integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@webassemblyjs/ast": "1.11.6",
|
"@webassemblyjs/ast": "1.11.1",
|
||||||
"@webassemblyjs/helper-buffer": "1.11.6",
|
"@webassemblyjs/helper-buffer": "1.11.1",
|
||||||
"@webassemblyjs/wasm-gen": "1.11.6",
|
"@webassemblyjs/wasm-gen": "1.11.1",
|
||||||
"@webassemblyjs/wasm-parser": "1.11.6"
|
"@webassemblyjs/wasm-parser": "1.11.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/wasm-parser": {
|
"node_modules/@webassemblyjs/wasm-parser": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz",
|
||||||
"integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==",
|
"integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@webassemblyjs/ast": "1.11.6",
|
"@webassemblyjs/ast": "1.11.1",
|
||||||
"@webassemblyjs/helper-api-error": "1.11.6",
|
"@webassemblyjs/helper-api-error": "1.11.1",
|
||||||
"@webassemblyjs/helper-wasm-bytecode": "1.11.6",
|
"@webassemblyjs/helper-wasm-bytecode": "1.11.1",
|
||||||
"@webassemblyjs/ieee754": "1.11.6",
|
"@webassemblyjs/ieee754": "1.11.1",
|
||||||
"@webassemblyjs/leb128": "1.11.6",
|
"@webassemblyjs/leb128": "1.11.1",
|
||||||
"@webassemblyjs/utf8": "1.11.6"
|
"@webassemblyjs/utf8": "1.11.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@webassemblyjs/wast-printer": {
|
"node_modules/@webassemblyjs/wast-printer": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz",
|
||||||
"integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==",
|
"integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@webassemblyjs/ast": "1.11.6",
|
"@webassemblyjs/ast": "1.11.1",
|
||||||
"@xtuc/long": "4.2.2"
|
"@xtuc/long": "4.2.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -3650,9 +3651,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/enhanced-resolve": {
|
"node_modules/enhanced-resolve": {
|
||||||
"version": "5.14.0",
|
"version": "5.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.14.0.tgz",
|
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz",
|
||||||
"integrity": "sha512-+DCows0XNwLDcUhbFJPdlQEVnT2zXlCv7hPxemTz86/O+B/hCQ+mb7ydkPKiflpVraqLPCAfu7lDy+hBXueojw==",
|
"integrity": "sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"graceful-fs": "^4.2.4",
|
"graceful-fs": "^4.2.4",
|
||||||
@@ -3727,9 +3728,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/es-module-lexer": {
|
"node_modules/es-module-lexer": {
|
||||||
"version": "1.2.1",
|
"version": "0.9.3",
|
||||||
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz",
|
||||||
"integrity": "sha512-9978wrXM50Y4rTMmW5kXIC09ZdXQZqkE4mxhwkd8VbzsGkXGPgV4zWuqQJgCEzYngdo2dYDa0l8xhX4fkSwJSg==",
|
"integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==",
|
||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/es-shim-unscopables": {
|
"node_modules/es-shim-unscopables": {
|
||||||
@@ -5409,9 +5410,9 @@
|
|||||||
"integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw=="
|
"integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw=="
|
||||||
},
|
},
|
||||||
"node_modules/http-cache-semantics": {
|
"node_modules/http-cache-semantics": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz",
|
||||||
"integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ=="
|
"integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ=="
|
||||||
},
|
},
|
||||||
"node_modules/http-proxy-agent": {
|
"node_modules/http-proxy-agent": {
|
||||||
"version": "4.0.1",
|
"version": "4.0.1",
|
||||||
@@ -6117,9 +6118,9 @@
|
|||||||
"integrity": "sha512-Rc2suX5meI0S3bfdZuA7JMFBGkJ875ApfVyq2WHELjBiiG22My/l7/8zPpH/CfFVQHuVLd8NLR0nv6vi0BYYKA=="
|
"integrity": "sha512-Rc2suX5meI0S3bfdZuA7JMFBGkJ875ApfVyq2WHELjBiiG22My/l7/8zPpH/CfFVQHuVLd8NLR0nv6vi0BYYKA=="
|
||||||
},
|
},
|
||||||
"node_modules/json5": {
|
"node_modules/json5": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
|
||||||
"integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
|
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"minimist": "^1.2.0"
|
"minimist": "^1.2.0"
|
||||||
@@ -10807,9 +10808,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/schema-utils": {
|
"node_modules/schema-utils": {
|
||||||
"version": "3.1.2",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
|
||||||
"integrity": "sha512-pvjEHOgWc9OWA/f/DE3ohBWTD6EleVLf7iFUkoSwAxttdBhB9QUebQgxER2kWueOvRJXPHNnyrvvh9eZINB8Eg==",
|
"integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/json-schema": "^7.0.8",
|
"@types/json-schema": "^7.0.8",
|
||||||
@@ -10875,9 +10876,9 @@
|
|||||||
"integrity": "sha512-EjnoLE5OGmDAVV/8YDoN5KiajNadjzIp9BAHOhYeQHt7j0UWxjmgsx4YD48wp4Ue1Qogq38F1GNUJNqF1kKKxA=="
|
"integrity": "sha512-EjnoLE5OGmDAVV/8YDoN5KiajNadjzIp9BAHOhYeQHt7j0UWxjmgsx4YD48wp4Ue1Qogq38F1GNUJNqF1kKKxA=="
|
||||||
},
|
},
|
||||||
"node_modules/serialize-javascript": {
|
"node_modules/serialize-javascript": {
|
||||||
"version": "6.0.1",
|
"version": "6.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz",
|
||||||
"integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==",
|
"integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"randombytes": "^2.1.0"
|
"randombytes": "^2.1.0"
|
||||||
@@ -11495,9 +11496,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/terser": {
|
"node_modules/terser": {
|
||||||
"version": "5.17.3",
|
"version": "5.14.2",
|
||||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.17.3.tgz",
|
"resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz",
|
||||||
"integrity": "sha512-AudpAZKmZHkG9jueayypz4duuCFJMMNGRMwaPvQKWfxKedh8Z2x3OCoDqIIi1xx5+iwx1u6Au8XQcc9Lke65Yg==",
|
"integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jridgewell/source-map": "^0.3.2",
|
"@jridgewell/source-map": "^0.3.2",
|
||||||
@@ -11513,16 +11514,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/terser-webpack-plugin": {
|
"node_modules/terser-webpack-plugin": {
|
||||||
"version": "5.3.8",
|
"version": "5.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.8.tgz",
|
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.3.tgz",
|
||||||
"integrity": "sha512-WiHL3ElchZMsK27P8uIUh4604IgJyAW47LVXGbEoB21DbQcZ+OuMpGjVYnEUaqcWM6dO8uS2qUbA7LSCWqvsbg==",
|
"integrity": "sha512-Fx60G5HNYknNTNQnzQ1VePRuu89ZVYWfjRAeT5rITuCY/1b08s49e5kSQwHDirKZWuoKOBRFS98EUUoZ9kLEwQ==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jridgewell/trace-mapping": "^0.3.17",
|
"@jridgewell/trace-mapping": "^0.3.7",
|
||||||
"jest-worker": "^27.4.5",
|
"jest-worker": "^27.4.5",
|
||||||
"schema-utils": "^3.1.1",
|
"schema-utils": "^3.1.1",
|
||||||
"serialize-javascript": "^6.0.1",
|
"serialize-javascript": "^6.0.0",
|
||||||
"terser": "^5.16.8"
|
"terser": "^5.7.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 10.13.0"
|
"node": ">= 10.13.0"
|
||||||
@@ -12812,22 +12813,22 @@
|
|||||||
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
|
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
|
||||||
},
|
},
|
||||||
"node_modules/webpack": {
|
"node_modules/webpack": {
|
||||||
"version": "5.82.0",
|
"version": "5.74.0",
|
||||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.82.0.tgz",
|
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.74.0.tgz",
|
||||||
"integrity": "sha512-iGNA2fHhnDcV1bONdUu554eZx+XeldsaeQ8T67H6KKHl2nUSwX8Zm7cmzOA46ox/X1ARxf7Bjv8wQ/HsB5fxBg==",
|
"integrity": "sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/eslint-scope": "^3.7.3",
|
"@types/eslint-scope": "^3.7.3",
|
||||||
"@types/estree": "^1.0.0",
|
"@types/estree": "^0.0.51",
|
||||||
"@webassemblyjs/ast": "^1.11.5",
|
"@webassemblyjs/ast": "1.11.1",
|
||||||
"@webassemblyjs/wasm-edit": "^1.11.5",
|
"@webassemblyjs/wasm-edit": "1.11.1",
|
||||||
"@webassemblyjs/wasm-parser": "^1.11.5",
|
"@webassemblyjs/wasm-parser": "1.11.1",
|
||||||
"acorn": "^8.7.1",
|
"acorn": "^8.7.1",
|
||||||
"acorn-import-assertions": "^1.7.6",
|
"acorn-import-assertions": "^1.7.6",
|
||||||
"browserslist": "^4.14.5",
|
"browserslist": "^4.14.5",
|
||||||
"chrome-trace-event": "^1.0.2",
|
"chrome-trace-event": "^1.0.2",
|
||||||
"enhanced-resolve": "^5.13.0",
|
"enhanced-resolve": "^5.10.0",
|
||||||
"es-module-lexer": "^1.2.1",
|
"es-module-lexer": "^0.9.0",
|
||||||
"eslint-scope": "5.1.1",
|
"eslint-scope": "5.1.1",
|
||||||
"events": "^3.2.0",
|
"events": "^3.2.0",
|
||||||
"glob-to-regexp": "^0.4.1",
|
"glob-to-regexp": "^0.4.1",
|
||||||
@@ -12836,9 +12837,9 @@
|
|||||||
"loader-runner": "^4.2.0",
|
"loader-runner": "^4.2.0",
|
||||||
"mime-types": "^2.1.27",
|
"mime-types": "^2.1.27",
|
||||||
"neo-async": "^2.6.2",
|
"neo-async": "^2.6.2",
|
||||||
"schema-utils": "^3.1.2",
|
"schema-utils": "^3.1.0",
|
||||||
"tapable": "^2.1.1",
|
"tapable": "^2.1.1",
|
||||||
"terser-webpack-plugin": "^5.3.7",
|
"terser-webpack-plugin": "^5.1.3",
|
||||||
"watchpack": "^2.4.0",
|
"watchpack": "^2.4.0",
|
||||||
"webpack-sources": "^3.2.3"
|
"webpack-sources": "^3.2.3"
|
||||||
},
|
},
|
||||||
@@ -12875,6 +12876,12 @@
|
|||||||
"node": ">=10.13.0"
|
"node": ">=10.13.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/webpack/node_modules/@types/estree": {
|
||||||
|
"version": "0.0.51",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz",
|
||||||
|
"integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
"node_modules/webpack/node_modules/eslint-scope": {
|
"node_modules/webpack/node_modules/eslint-scope": {
|
||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
|
||||||
@@ -13701,9 +13708,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@jridgewell/gen-mapping": {
|
"@jridgewell/gen-mapping": {
|
||||||
"version": "0.3.3",
|
"version": "0.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz",
|
||||||
"integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
|
"integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@jridgewell/set-array": "^1.0.1",
|
"@jridgewell/set-array": "^1.0.1",
|
||||||
@@ -13724,9 +13731,9 @@
|
|||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"@jridgewell/source-map": {
|
"@jridgewell/source-map": {
|
||||||
"version": "0.3.3",
|
"version": "0.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz",
|
||||||
"integrity": "sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==",
|
"integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@jridgewell/gen-mapping": "^0.3.0",
|
"@jridgewell/gen-mapping": "^0.3.0",
|
||||||
@@ -13740,13 +13747,13 @@
|
|||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"@jridgewell/trace-mapping": {
|
"@jridgewell/trace-mapping": {
|
||||||
"version": "0.3.18",
|
"version": "0.3.14",
|
||||||
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz",
|
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz",
|
||||||
"integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==",
|
"integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@jridgewell/resolve-uri": "3.1.0",
|
"@jridgewell/resolve-uri": "^3.0.3",
|
||||||
"@jridgewell/sourcemap-codec": "1.4.14"
|
"@jridgewell/sourcemap-codec": "^1.4.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@lit-labs/ssr-dom-shim": {
|
"@lit-labs/ssr-dom-shim": {
|
||||||
@@ -14272,7 +14279,6 @@
|
|||||||
"version": "18.2.0",
|
"version": "18.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.0.tgz",
|
||||||
"integrity": "sha512-8yQrvS6sMpSwIovhPOwfyNf2Wz6v/B62LFSVYQ85+Rq3tLsBIG7rP5geMxaijTUxSkrO6RzN/IRuIAADYQsleA==",
|
"integrity": "sha512-8yQrvS6sMpSwIovhPOwfyNf2Wz6v/B62LFSVYQ85+Rq3tLsBIG7rP5geMxaijTUxSkrO6RzN/IRuIAADYQsleA==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/react": "*"
|
"@types/react": "*"
|
||||||
}
|
}
|
||||||
@@ -14355,148 +14361,148 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@webassemblyjs/ast": {
|
"@webassemblyjs/ast": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz",
|
||||||
"integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==",
|
"integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@webassemblyjs/helper-numbers": "1.11.6",
|
"@webassemblyjs/helper-numbers": "1.11.1",
|
||||||
"@webassemblyjs/helper-wasm-bytecode": "1.11.6"
|
"@webassemblyjs/helper-wasm-bytecode": "1.11.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@webassemblyjs/floating-point-hex-parser": {
|
"@webassemblyjs/floating-point-hex-parser": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz",
|
||||||
"integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==",
|
"integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==",
|
||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"@webassemblyjs/helper-api-error": {
|
"@webassemblyjs/helper-api-error": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz",
|
||||||
"integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==",
|
"integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==",
|
||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"@webassemblyjs/helper-buffer": {
|
"@webassemblyjs/helper-buffer": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz",
|
||||||
"integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==",
|
"integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==",
|
||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"@webassemblyjs/helper-numbers": {
|
"@webassemblyjs/helper-numbers": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz",
|
||||||
"integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==",
|
"integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@webassemblyjs/floating-point-hex-parser": "1.11.6",
|
"@webassemblyjs/floating-point-hex-parser": "1.11.1",
|
||||||
"@webassemblyjs/helper-api-error": "1.11.6",
|
"@webassemblyjs/helper-api-error": "1.11.1",
|
||||||
"@xtuc/long": "4.2.2"
|
"@xtuc/long": "4.2.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@webassemblyjs/helper-wasm-bytecode": {
|
"@webassemblyjs/helper-wasm-bytecode": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz",
|
||||||
"integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==",
|
"integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==",
|
||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"@webassemblyjs/helper-wasm-section": {
|
"@webassemblyjs/helper-wasm-section": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz",
|
||||||
"integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==",
|
"integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@webassemblyjs/ast": "1.11.6",
|
"@webassemblyjs/ast": "1.11.1",
|
||||||
"@webassemblyjs/helper-buffer": "1.11.6",
|
"@webassemblyjs/helper-buffer": "1.11.1",
|
||||||
"@webassemblyjs/helper-wasm-bytecode": "1.11.6",
|
"@webassemblyjs/helper-wasm-bytecode": "1.11.1",
|
||||||
"@webassemblyjs/wasm-gen": "1.11.6"
|
"@webassemblyjs/wasm-gen": "1.11.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@webassemblyjs/ieee754": {
|
"@webassemblyjs/ieee754": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz",
|
||||||
"integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==",
|
"integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@xtuc/ieee754": "^1.2.0"
|
"@xtuc/ieee754": "^1.2.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@webassemblyjs/leb128": {
|
"@webassemblyjs/leb128": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz",
|
||||||
"integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==",
|
"integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@xtuc/long": "4.2.2"
|
"@xtuc/long": "4.2.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@webassemblyjs/utf8": {
|
"@webassemblyjs/utf8": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz",
|
||||||
"integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==",
|
"integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==",
|
||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"@webassemblyjs/wasm-edit": {
|
"@webassemblyjs/wasm-edit": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz",
|
||||||
"integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==",
|
"integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@webassemblyjs/ast": "1.11.6",
|
"@webassemblyjs/ast": "1.11.1",
|
||||||
"@webassemblyjs/helper-buffer": "1.11.6",
|
"@webassemblyjs/helper-buffer": "1.11.1",
|
||||||
"@webassemblyjs/helper-wasm-bytecode": "1.11.6",
|
"@webassemblyjs/helper-wasm-bytecode": "1.11.1",
|
||||||
"@webassemblyjs/helper-wasm-section": "1.11.6",
|
"@webassemblyjs/helper-wasm-section": "1.11.1",
|
||||||
"@webassemblyjs/wasm-gen": "1.11.6",
|
"@webassemblyjs/wasm-gen": "1.11.1",
|
||||||
"@webassemblyjs/wasm-opt": "1.11.6",
|
"@webassemblyjs/wasm-opt": "1.11.1",
|
||||||
"@webassemblyjs/wasm-parser": "1.11.6",
|
"@webassemblyjs/wasm-parser": "1.11.1",
|
||||||
"@webassemblyjs/wast-printer": "1.11.6"
|
"@webassemblyjs/wast-printer": "1.11.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@webassemblyjs/wasm-gen": {
|
"@webassemblyjs/wasm-gen": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz",
|
||||||
"integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==",
|
"integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@webassemblyjs/ast": "1.11.6",
|
"@webassemblyjs/ast": "1.11.1",
|
||||||
"@webassemblyjs/helper-wasm-bytecode": "1.11.6",
|
"@webassemblyjs/helper-wasm-bytecode": "1.11.1",
|
||||||
"@webassemblyjs/ieee754": "1.11.6",
|
"@webassemblyjs/ieee754": "1.11.1",
|
||||||
"@webassemblyjs/leb128": "1.11.6",
|
"@webassemblyjs/leb128": "1.11.1",
|
||||||
"@webassemblyjs/utf8": "1.11.6"
|
"@webassemblyjs/utf8": "1.11.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@webassemblyjs/wasm-opt": {
|
"@webassemblyjs/wasm-opt": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz",
|
||||||
"integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==",
|
"integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@webassemblyjs/ast": "1.11.6",
|
"@webassemblyjs/ast": "1.11.1",
|
||||||
"@webassemblyjs/helper-buffer": "1.11.6",
|
"@webassemblyjs/helper-buffer": "1.11.1",
|
||||||
"@webassemblyjs/wasm-gen": "1.11.6",
|
"@webassemblyjs/wasm-gen": "1.11.1",
|
||||||
"@webassemblyjs/wasm-parser": "1.11.6"
|
"@webassemblyjs/wasm-parser": "1.11.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@webassemblyjs/wasm-parser": {
|
"@webassemblyjs/wasm-parser": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz",
|
||||||
"integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==",
|
"integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@webassemblyjs/ast": "1.11.6",
|
"@webassemblyjs/ast": "1.11.1",
|
||||||
"@webassemblyjs/helper-api-error": "1.11.6",
|
"@webassemblyjs/helper-api-error": "1.11.1",
|
||||||
"@webassemblyjs/helper-wasm-bytecode": "1.11.6",
|
"@webassemblyjs/helper-wasm-bytecode": "1.11.1",
|
||||||
"@webassemblyjs/ieee754": "1.11.6",
|
"@webassemblyjs/ieee754": "1.11.1",
|
||||||
"@webassemblyjs/leb128": "1.11.6",
|
"@webassemblyjs/leb128": "1.11.1",
|
||||||
"@webassemblyjs/utf8": "1.11.6"
|
"@webassemblyjs/utf8": "1.11.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@webassemblyjs/wast-printer": {
|
"@webassemblyjs/wast-printer": {
|
||||||
"version": "1.11.6",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz",
|
||||||
"integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==",
|
"integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@webassemblyjs/ast": "1.11.6",
|
"@webassemblyjs/ast": "1.11.1",
|
||||||
"@xtuc/long": "4.2.2"
|
"@xtuc/long": "4.2.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -15979,9 +15985,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"enhanced-resolve": {
|
"enhanced-resolve": {
|
||||||
"version": "5.14.0",
|
"version": "5.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.14.0.tgz",
|
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz",
|
||||||
"integrity": "sha512-+DCows0XNwLDcUhbFJPdlQEVnT2zXlCv7hPxemTz86/O+B/hCQ+mb7ydkPKiflpVraqLPCAfu7lDy+hBXueojw==",
|
"integrity": "sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"graceful-fs": "^4.2.4",
|
"graceful-fs": "^4.2.4",
|
||||||
@@ -16038,9 +16044,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"es-module-lexer": {
|
"es-module-lexer": {
|
||||||
"version": "1.2.1",
|
"version": "0.9.3",
|
||||||
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz",
|
||||||
"integrity": "sha512-9978wrXM50Y4rTMmW5kXIC09ZdXQZqkE4mxhwkd8VbzsGkXGPgV4zWuqQJgCEzYngdo2dYDa0l8xhX4fkSwJSg==",
|
"integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==",
|
||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
"es-shim-unscopables": {
|
"es-shim-unscopables": {
|
||||||
@@ -17299,9 +17305,9 @@
|
|||||||
"integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw=="
|
"integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw=="
|
||||||
},
|
},
|
||||||
"http-cache-semantics": {
|
"http-cache-semantics": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz",
|
||||||
"integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ=="
|
"integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ=="
|
||||||
},
|
},
|
||||||
"http-proxy-agent": {
|
"http-proxy-agent": {
|
||||||
"version": "4.0.1",
|
"version": "4.0.1",
|
||||||
@@ -17788,9 +17794,9 @@
|
|||||||
"integrity": "sha512-Rc2suX5meI0S3bfdZuA7JMFBGkJ875ApfVyq2WHELjBiiG22My/l7/8zPpH/CfFVQHuVLd8NLR0nv6vi0BYYKA=="
|
"integrity": "sha512-Rc2suX5meI0S3bfdZuA7JMFBGkJ875ApfVyq2WHELjBiiG22My/l7/8zPpH/CfFVQHuVLd8NLR0nv6vi0BYYKA=="
|
||||||
},
|
},
|
||||||
"json5": {
|
"json5": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
|
||||||
"integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
|
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "^1.2.0"
|
"minimist": "^1.2.0"
|
||||||
@@ -21042,9 +21048,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"schema-utils": {
|
"schema-utils": {
|
||||||
"version": "3.1.2",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
|
||||||
"integrity": "sha512-pvjEHOgWc9OWA/f/DE3ohBWTD6EleVLf7iFUkoSwAxttdBhB9QUebQgxER2kWueOvRJXPHNnyrvvh9eZINB8Eg==",
|
"integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/json-schema": "^7.0.8",
|
"@types/json-schema": "^7.0.8",
|
||||||
@@ -21090,9 +21096,9 @@
|
|||||||
"integrity": "sha512-EjnoLE5OGmDAVV/8YDoN5KiajNadjzIp9BAHOhYeQHt7j0UWxjmgsx4YD48wp4Ue1Qogq38F1GNUJNqF1kKKxA=="
|
"integrity": "sha512-EjnoLE5OGmDAVV/8YDoN5KiajNadjzIp9BAHOhYeQHt7j0UWxjmgsx4YD48wp4Ue1Qogq38F1GNUJNqF1kKKxA=="
|
||||||
},
|
},
|
||||||
"serialize-javascript": {
|
"serialize-javascript": {
|
||||||
"version": "6.0.1",
|
"version": "6.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz",
|
||||||
"integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==",
|
"integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"randombytes": "^2.1.0"
|
"randombytes": "^2.1.0"
|
||||||
@@ -21543,9 +21549,9 @@
|
|||||||
"integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg=="
|
"integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg=="
|
||||||
},
|
},
|
||||||
"terser": {
|
"terser": {
|
||||||
"version": "5.17.3",
|
"version": "5.14.2",
|
||||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.17.3.tgz",
|
"resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz",
|
||||||
"integrity": "sha512-AudpAZKmZHkG9jueayypz4duuCFJMMNGRMwaPvQKWfxKedh8Z2x3OCoDqIIi1xx5+iwx1u6Au8XQcc9Lke65Yg==",
|
"integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@jridgewell/source-map": "^0.3.2",
|
"@jridgewell/source-map": "^0.3.2",
|
||||||
@@ -21555,16 +21561,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"terser-webpack-plugin": {
|
"terser-webpack-plugin": {
|
||||||
"version": "5.3.8",
|
"version": "5.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.8.tgz",
|
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.3.tgz",
|
||||||
"integrity": "sha512-WiHL3ElchZMsK27P8uIUh4604IgJyAW47LVXGbEoB21DbQcZ+OuMpGjVYnEUaqcWM6dO8uS2qUbA7LSCWqvsbg==",
|
"integrity": "sha512-Fx60G5HNYknNTNQnzQ1VePRuu89ZVYWfjRAeT5rITuCY/1b08s49e5kSQwHDirKZWuoKOBRFS98EUUoZ9kLEwQ==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@jridgewell/trace-mapping": "^0.3.17",
|
"@jridgewell/trace-mapping": "^0.3.7",
|
||||||
"jest-worker": "^27.4.5",
|
"jest-worker": "^27.4.5",
|
||||||
"schema-utils": "^3.1.1",
|
"schema-utils": "^3.1.1",
|
||||||
"serialize-javascript": "^6.0.1",
|
"serialize-javascript": "^6.0.0",
|
||||||
"terser": "^5.16.8"
|
"terser": "^5.7.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"text-table": {
|
"text-table": {
|
||||||
@@ -22598,22 +22604,22 @@
|
|||||||
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
|
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
|
||||||
},
|
},
|
||||||
"webpack": {
|
"webpack": {
|
||||||
"version": "5.82.0",
|
"version": "5.74.0",
|
||||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.82.0.tgz",
|
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.74.0.tgz",
|
||||||
"integrity": "sha512-iGNA2fHhnDcV1bONdUu554eZx+XeldsaeQ8T67H6KKHl2nUSwX8Zm7cmzOA46ox/X1ARxf7Bjv8wQ/HsB5fxBg==",
|
"integrity": "sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/eslint-scope": "^3.7.3",
|
"@types/eslint-scope": "^3.7.3",
|
||||||
"@types/estree": "^1.0.0",
|
"@types/estree": "^0.0.51",
|
||||||
"@webassemblyjs/ast": "^1.11.5",
|
"@webassemblyjs/ast": "1.11.1",
|
||||||
"@webassemblyjs/wasm-edit": "^1.11.5",
|
"@webassemblyjs/wasm-edit": "1.11.1",
|
||||||
"@webassemblyjs/wasm-parser": "^1.11.5",
|
"@webassemblyjs/wasm-parser": "1.11.1",
|
||||||
"acorn": "^8.7.1",
|
"acorn": "^8.7.1",
|
||||||
"acorn-import-assertions": "^1.7.6",
|
"acorn-import-assertions": "^1.7.6",
|
||||||
"browserslist": "^4.14.5",
|
"browserslist": "^4.14.5",
|
||||||
"chrome-trace-event": "^1.0.2",
|
"chrome-trace-event": "^1.0.2",
|
||||||
"enhanced-resolve": "^5.13.0",
|
"enhanced-resolve": "^5.10.0",
|
||||||
"es-module-lexer": "^1.2.1",
|
"es-module-lexer": "^0.9.0",
|
||||||
"eslint-scope": "5.1.1",
|
"eslint-scope": "5.1.1",
|
||||||
"events": "^3.2.0",
|
"events": "^3.2.0",
|
||||||
"glob-to-regexp": "^0.4.1",
|
"glob-to-regexp": "^0.4.1",
|
||||||
@@ -22622,13 +22628,19 @@
|
|||||||
"loader-runner": "^4.2.0",
|
"loader-runner": "^4.2.0",
|
||||||
"mime-types": "^2.1.27",
|
"mime-types": "^2.1.27",
|
||||||
"neo-async": "^2.6.2",
|
"neo-async": "^2.6.2",
|
||||||
"schema-utils": "^3.1.2",
|
"schema-utils": "^3.1.0",
|
||||||
"tapable": "^2.1.1",
|
"tapable": "^2.1.1",
|
||||||
"terser-webpack-plugin": "^5.3.7",
|
"terser-webpack-plugin": "^5.1.3",
|
||||||
"watchpack": "^2.4.0",
|
"watchpack": "^2.4.0",
|
||||||
"webpack-sources": "^3.2.3"
|
"webpack-sources": "^3.2.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@types/estree": {
|
||||||
|
"version": "0.0.51",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz",
|
||||||
|
"integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
"eslint-scope": {
|
"eslint-scope": {
|
||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
|
||||||
@@ -27,8 +27,13 @@
|
|||||||
"@tailwindcss/forms": "^0.5.3",
|
"@tailwindcss/forms": "^0.5.3",
|
||||||
"@tailwindcss/typography": "^0.5.4",
|
"@tailwindcss/typography": "^0.5.4",
|
||||||
"@tanstack/react-table": "^8.8.5",
|
"@tanstack/react-table": "^8.8.5",
|
||||||
|
"@types/node": "18.16.0",
|
||||||
|
"@types/react": "18.2.0",
|
||||||
|
"@types/react-dom": "18.2.0",
|
||||||
"autoprefixer": "^10.4.12",
|
"autoprefixer": "^10.4.12",
|
||||||
"clsx": "^1.2.1",
|
"clsx": "^1.2.1",
|
||||||
|
"eslint": "8.39.0",
|
||||||
|
"eslint-config-next": "13.3.1",
|
||||||
"fast-glob": "^3.2.11",
|
"fast-glob": "^3.2.11",
|
||||||
"feed": "^4.2.2",
|
"feed": "^4.2.2",
|
||||||
"flexsearch": "^0.7.31",
|
"flexsearch": "^0.7.31",
|
||||||
@@ -63,9 +68,6 @@
|
|||||||
"eslint": "8.26.0",
|
"eslint": "8.26.0",
|
||||||
"eslint-config-next": "13.0.2",
|
"eslint-config-next": "13.0.2",
|
||||||
"prettier": "^2.8.7",
|
"prettier": "^2.8.7",
|
||||||
"prettier-plugin-tailwindcss": "^0.2.6",
|
"prettier-plugin-tailwindcss": "^0.2.6"
|
||||||
"@types/node": "18.16.0",
|
|
||||||
"@types/react": "18.2.0",
|
|
||||||
"@types/react-dom": "18.2.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,7 @@ import { Container } from '../components/Container'
|
|||||||
import clientPromise from '../lib/mddb'
|
import clientPromise from '../lib/mddb'
|
||||||
import { promises as fs } from 'fs';
|
import { promises as fs } from 'fs';
|
||||||
import { MDXRemote } from 'next-mdx-remote'
|
import { MDXRemote } from 'next-mdx-remote'
|
||||||
|
import { serialize } from 'next-mdx-remote/serialize'
|
||||||
import { Card } from '../components/Card'
|
import { Card } from '../components/Card'
|
||||||
import Head from 'next/head'
|
import Head from 'next/head'
|
||||||
import parse from '../lib/markdown'
|
import parse from '../lib/markdown'
|
||||||
@@ -84,10 +85,10 @@ export default function DRDPage({ mdxSource }) {
|
|||||||
<Head>
|
<Head>
|
||||||
<title>{meta.title}</title>
|
<title>{meta.title}</title>
|
||||||
</Head>
|
</Head>
|
||||||
<Container className="mt-9 relative">
|
<Container className="mt-16 lg:mt-32">
|
||||||
<article>
|
<article>
|
||||||
<header className="flex flex-col">
|
<header className="flex flex-col">
|
||||||
<h1 className="text-4xl font-bold tracking-tight text-zinc-800 dark:text-zinc-100 sm:text-5xl">
|
<h1 className="mt-6 text-4xl font-bold tracking-tight text-zinc-800 dark:text-zinc-100 sm:text-5xl">
|
||||||
{meta.title}
|
{meta.title}
|
||||||
</h1>
|
</h1>
|
||||||
<Card as="article">
|
<Card as="article">
|
||||||
@@ -1,17 +1,25 @@
|
|||||||
import { Head, Html, Main, NextScript } from 'next/document'
|
import { Head, Html, Main, NextScript } from 'next/document'
|
||||||
|
|
||||||
const modeScript = `
|
const modeScript = `
|
||||||
|
let darkModeMediaQuery = window.matchMedia('(prefers-color-scheme: dark)')
|
||||||
|
|
||||||
updateMode()
|
updateMode()
|
||||||
|
darkModeMediaQuery.addEventListener('change', updateModeWithoutTransitions)
|
||||||
window.addEventListener('storage', updateModeWithoutTransitions)
|
window.addEventListener('storage', updateModeWithoutTransitions)
|
||||||
|
|
||||||
function updateMode() {
|
function updateMode() {
|
||||||
let isDarkMode = window.localStorage.isDarkMode === 'true'
|
let isSystemDarkMode = darkModeMediaQuery.matches
|
||||||
|
let isDarkMode = window.localStorage.isDarkMode === 'true' || (!('isDarkMode' in window.localStorage) && isSystemDarkMode)
|
||||||
|
|
||||||
if (isDarkMode) {
|
if (isDarkMode) {
|
||||||
document.documentElement.classList.add('dark')
|
document.documentElement.classList.add('dark')
|
||||||
} else {
|
} else {
|
||||||
document.documentElement.classList.remove('dark')
|
document.documentElement.classList.remove('dark')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isDarkMode === isSystemDarkMode) {
|
||||||
|
delete window.localStorage.isDarkMode
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function disableTransitionsTemporarily() {
|
function disableTransitionsTemporarily() {
|
||||||
@@ -13,9 +13,7 @@ import { MDXRemote } from 'next-mdx-remote'
|
|||||||
function DatasetCard({ dataset }) {
|
function DatasetCard({ dataset }) {
|
||||||
return (
|
return (
|
||||||
<Card as="article">
|
<Card as="article">
|
||||||
<Card.Title>
|
<Card.Title><Link href={dataset.url}>{dataset.title}</Link></Card.Title>
|
||||||
<Link href={dataset.url}>{dataset.title}</Link>
|
|
||||||
</Card.Title>
|
|
||||||
<Card.Description>
|
<Card.Description>
|
||||||
<span className="font-semibold">Link to publication: </span>{' '}
|
<span className="font-semibold">Link to publication: </span>{' '}
|
||||||
<a
|
<a
|
||||||
@@ -77,9 +75,7 @@ function DatasetCard({ dataset }) {
|
|||||||
function ListOfAbusiveKeywordsCard({ list }) {
|
function ListOfAbusiveKeywordsCard({ list }) {
|
||||||
return (
|
return (
|
||||||
<Card as="article">
|
<Card as="article">
|
||||||
<Card.Title>
|
<Card.Title><Link href={list.url}>{list.title}</Link></Card.Title>
|
||||||
<Link href={list.url}>{list.title}</Link>
|
|
||||||
</Card.Title>
|
|
||||||
{list.description && (
|
{list.description && (
|
||||||
<Card.Description>
|
<Card.Description>
|
||||||
<span className="font-semibold">List Description: </span>{' '}
|
<span className="font-semibold">List Description: </span>{' '}
|
||||||
@@ -143,23 +139,17 @@ export default function Home({
|
|||||||
<h1 className="text-4xl font-bold tracking-tight text-zinc-800 dark:text-zinc-100 sm:text-5xl">
|
<h1 className="text-4xl font-bold tracking-tight text-zinc-800 dark:text-zinc-100 sm:text-5xl">
|
||||||
{indexText.frontmatter.title}
|
{indexText.frontmatter.title}
|
||||||
</h1>
|
</h1>
|
||||||
<article className="index-text prose mt-6 flex flex-col gap-y-2 text-base text-zinc-600 dark:prose-invert prose-h3:mt-4 prose-a:font-normal prose-a:text-zinc-600 prose-a:decoration-inherit prose-img:rounded-none dark:text-zinc-400 prose-a:dark:text-zinc-400 hover:prose-a:text-teal-600 hover:prose-a:dark:text-teal-900">
|
<article className="mt-6 index-text flex flex-col gap-y-2 text-base text-zinc-600 dark:text-zinc-400 prose dark:prose-invert">
|
||||||
<MDXRemote {...indexText} />
|
<MDXRemote {...indexText} />
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
<Container className="mt-12 md:mt-14">
|
<Container className="mt-24 md:mt-28">
|
||||||
<div className="mx-auto grid max-w-7xl grid-cols-1 gap-y-8 lg:max-w-none">
|
<div className="mx-auto grid max-w-7xl grid-cols-1 gap-y-8 lg:max-w-none">
|
||||||
<h2
|
<h2 className="text-xl font-bold tracking-tight text-zinc-800 dark:text-zinc-100 sm:text-5xl">
|
||||||
id="Datasets-header"
|
|
||||||
className="text-xl font-bold tracking-tight text-zinc-800 dark:text-zinc-100 sm:text-5xl"
|
|
||||||
>
|
|
||||||
Datasets
|
Datasets
|
||||||
</h2>
|
</h2>
|
||||||
<form
|
<form onSubmit={handleSubmit(() => reset())} className="rounded-2xl border border-zinc-100 px-4 py-6 dark:border-zinc-700/40 sm:p-6">
|
||||||
onSubmit={handleSubmit(() => reset())}
|
|
||||||
className="rounded-2xl border border-zinc-100 px-4 py-6 dark:border-zinc-700/40 sm:p-6"
|
|
||||||
>
|
|
||||||
<p className="mt-2 text-lg font-semibold text-zinc-600 dark:text-zinc-100">
|
<p className="mt-2 text-lg font-semibold text-zinc-600 dark:text-zinc-100">
|
||||||
Search for datasets
|
Search for datasets
|
||||||
</p>
|
</p>
|
||||||
@@ -208,12 +198,7 @@ export default function Home({
|
|||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
</select>
|
</select>
|
||||||
<button
|
<button type='submit' className='inline-flex items-center gap-2 justify-center rounded-md py-2 px-3 text-sm outline-offset-2 transition active:transition-none bg-zinc-800 font-semibold text-zinc-100 hover:bg-zinc-700 active:bg-zinc-800 active:text-zinc-100/70 dark:bg-zinc-700 dark:hover:bg-zinc-600 dark:active:bg-zinc-700 dark:active:text-zinc-100/70 flex-none'>Clear filters</button>
|
||||||
type="submit"
|
|
||||||
className="inline-flex flex-none items-center justify-center gap-2 rounded-md bg-zinc-800 px-3 py-2 text-sm font-semibold text-zinc-100 outline-offset-2 transition hover:bg-zinc-700 active:bg-zinc-800 active:text-zinc-100/70 active:transition-none dark:bg-zinc-700 dark:hover:bg-zinc-600 dark:active:bg-zinc-700 dark:active:text-zinc-100/70"
|
|
||||||
>
|
|
||||||
Clear filters
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div className="flex flex-col gap-16">
|
<div className="flex flex-col gap-16">
|
||||||
@@ -240,7 +225,7 @@ export default function Home({
|
|||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
<Container className="mt-16">
|
<Container className="mt-16">
|
||||||
<h2 id="Keywords-header" className="text-xl font-bold tracking-tight text-zinc-800 dark:text-zinc-100 sm:text-5xl">
|
<h2 className="text-xl font-bold tracking-tight text-zinc-800 dark:text-zinc-100 sm:text-5xl">
|
||||||
Lists of Abusive Keywords
|
Lists of Abusive Keywords
|
||||||
</h2>
|
</h2>
|
||||||
<div className="mt-3 flex flex-col gap-16">
|
<div className="mt-3 flex flex-col gap-16">
|
||||||
|
Before Width: | Height: | Size: 566 B After Width: | Height: | Size: 566 B |
@@ -2,7 +2,6 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
content: [
|
content: [
|
||||||
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
||||||
"./content/**/*.{js,ts,jsx,tsx,mdx}",
|
|
||||||
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
|
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
|
||||||
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
||||||
],
|
],
|
||||||
@@ -10,24 +10,24 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@heroicons/react": "^2.0.17",
|
"@heroicons/react": "^2.0.17",
|
||||||
|
"@types/node": "18.16.0",
|
||||||
|
"@types/react": "18.0.38",
|
||||||
|
"@types/react-dom": "18.0.11",
|
||||||
|
"eslint": "8.39.0",
|
||||||
|
"eslint-config-next": "13.3.1",
|
||||||
"next": "13.3.1",
|
"next": "13.3.1",
|
||||||
"next-seo": "^6.0.0",
|
"next-seo": "^6.0.0",
|
||||||
"octokit": "^2.0.14",
|
"octokit": "^2.0.14",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"react-markdown": "^8.0.7",
|
"react-markdown": "^8.0.7",
|
||||||
"remark-gfm": "^3.0.1"
|
"remark-gfm": "^3.0.1",
|
||||||
|
"typescript": "5.0.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tailwindcss/typography": "^0.5.9",
|
"@tailwindcss/typography": "^0.5.9",
|
||||||
"autoprefixer": "^10.4.14",
|
"autoprefixer": "^10.4.14",
|
||||||
"postcss": "^8.4.23",
|
"postcss": "^8.4.23",
|
||||||
"tailwindcss": "^3.3.1",
|
"tailwindcss": "^3.3.1"
|
||||||
"eslint": "8.39.0",
|
|
||||||
"eslint-config-next": "13.3.1",
|
|
||||||
"typescript": "5.0.4",
|
|
||||||
"@types/node": "18.16.0",
|
|
||||||
"@types/react": "18.0.38",
|
|
||||||
"@types/react-dom": "18.0.11"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
35
examples/fivethirtyeight/.gitignore
vendored
35
examples/fivethirtyeight/.gitignore
vendored
@@ -1,35 +0,0 @@
|
|||||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
||||||
|
|
||||||
# dependencies
|
|
||||||
/node_modules
|
|
||||||
/.pnp
|
|
||||||
.pnp.js
|
|
||||||
|
|
||||||
# testing
|
|
||||||
/coverage
|
|
||||||
|
|
||||||
# next.js
|
|
||||||
/.next/
|
|
||||||
/out/
|
|
||||||
|
|
||||||
# production
|
|
||||||
/build
|
|
||||||
|
|
||||||
# misc
|
|
||||||
.DS_Store
|
|
||||||
*.pem
|
|
||||||
|
|
||||||
# debug
|
|
||||||
npm-debug.log*
|
|
||||||
yarn-debug.log*
|
|
||||||
yarn-error.log*
|
|
||||||
|
|
||||||
# local env files
|
|
||||||
.env*.local
|
|
||||||
|
|
||||||
# vercel
|
|
||||||
.vercel
|
|
||||||
|
|
||||||
# typescript
|
|
||||||
*.tsbuildinfo
|
|
||||||
next-env.d.ts
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
This is a replica of the awesome data.fivethirtyeight.com using PortalJS.
|
|
||||||
|
|
||||||
You might be asking why we did that, there are three main reasons:
|
|
||||||
|
|
||||||
- The website has a great UI, with multiple datasets being displayed elegantly and with simplicity.
|
|
||||||
- PortalJS allows us to add more functionality to it e.g dataset previews and search functionality.
|
|
||||||
- The project follows our same principles of open sourcing and free data, with every dataset being publicly available on Github.
|
|
||||||
|
|
||||||
## Getting Started
|
|
||||||
|
|
||||||
First, run the development server:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm run dev
|
|
||||||
# or
|
|
||||||
yarn dev
|
|
||||||
# or
|
|
||||||
pnpm dev
|
|
||||||
```
|
|
||||||
|
|
||||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
|
||||||
|
|
||||||
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
|
|
||||||
|
|
||||||
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
|
|
||||||
|
|
||||||
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
|
|
||||||
|
|
||||||
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
|
|
||||||
|
|
||||||
## Learn More
|
|
||||||
|
|
||||||
To learn more about Next.js, take a look at the following resources:
|
|
||||||
|
|
||||||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
|
||||||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
|
||||||
|
|
||||||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
|
|
||||||
|
|
||||||
## Deploy on Vercel
|
|
||||||
|
|
||||||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
|
||||||
|
|
||||||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
import Link from "next/link";
|
|
||||||
|
|
||||||
function HomeIcon({ className = "" }) {
|
|
||||||
return <div className={`inline-block w-4 ${className}`}><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <path d="M 12 2 A 1 1 0 0 0 11.289062 2.296875 L 1.203125 11.097656 A 0.5 0.5 0 0 0 1 11.5 A 0.5 0.5 0 0 0 1.5 12 L 4 12 L 4 20 C 4 20.552 4.448 21 5 21 L 9 21 C 9.552 21 10 20.552 10 20 L 10 14 L 14 14 L 14 20 C 14 20.552 14.448 21 15 21 L 19 21 C 19.552 21 20 20.552 20 20 L 20 12 L 22.5 12 A 0.5 0.5 0 0 0 23 11.5 A 0.5 0.5 0 0 0 22.796875 11.097656 L 12.716797 2.3027344 A 1 1 0 0 0 12.710938 2.296875 A 1 1 0 0 0 12 2 z"/></svg></div>
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function Breadcrumbs({ links }: { links: { title: string, href?: string, target?: string }[] }) {
|
|
||||||
const current = links.at(-1);
|
|
||||||
|
|
||||||
return <div className="flex items-center uppercase font-black text-xs">
|
|
||||||
<Link className="flex items-center" href='/'><HomeIcon /></Link>
|
|
||||||
|
|
||||||
{/* {links.length > 1 && links.slice(0, -1).map((link) => {
|
|
||||||
return <>
|
|
||||||
<span className="mx-4">/</span>
|
|
||||||
<Link href={link.href}>{link.title}</Link>
|
|
||||||
</>
|
|
||||||
})} */}
|
|
||||||
|
|
||||||
<span className="mx-4">/</span>
|
|
||||||
<span>{current?.title}</span>
|
|
||||||
</div >
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,38 +0,0 @@
|
|||||||
import { Octokit } from 'octokit';
|
|
||||||
|
|
||||||
export interface GithubProject {
|
|
||||||
owner: string;
|
|
||||||
repo: string;
|
|
||||||
branch: string;
|
|
||||||
files: string[];
|
|
||||||
readme: string;
|
|
||||||
description?: string;
|
|
||||||
name?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function getProjectReadme(
|
|
||||||
owner: string,
|
|
||||||
repo: string,
|
|
||||||
branch: string,
|
|
||||||
readme: string,
|
|
||||||
github_pat?: string
|
|
||||||
) {
|
|
||||||
const octokit = new Octokit({ auth: github_pat });
|
|
||||||
try {
|
|
||||||
const response = await octokit.rest.repos.getContent({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
path: readme,
|
|
||||||
ref: branch,
|
|
||||||
});
|
|
||||||
const data = response.data as { content?: string };
|
|
||||||
const fileContent = data.content ? data.content : '';
|
|
||||||
if (fileContent === '') {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
const decodedContent = Buffer.from(fileContent, 'base64').toString();
|
|
||||||
return decodedContent;
|
|
||||||
} catch (error) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
/** @type {import('next').NextConfig} */
|
|
||||||
const nextConfig = {
|
|
||||||
reactStrictMode: true,
|
|
||||||
serverRuntimeConfig: {
|
|
||||||
github_pat: process.env.GITHUB_PAT ? process.env.GITHUB_PAT : null,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = nextConfig
|
|
||||||
6878
examples/fivethirtyeight/package-lock.json
generated
6878
examples/fivethirtyeight/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,37 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "fiverthirtyeight-example",
|
|
||||||
"version": "0.1.0",
|
|
||||||
"private": true,
|
|
||||||
"scripts": {
|
|
||||||
"dev": "next dev",
|
|
||||||
"build": "next build",
|
|
||||||
"start": "next start",
|
|
||||||
"lint": "next lint"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@portaljs/components": "^0.1.0",
|
|
||||||
"@tailwindcss/typography": "^0.5.9",
|
|
||||||
"@types/node": "20.1.1",
|
|
||||||
"@types/react": "18.2.6",
|
|
||||||
"@types/react-dom": "18.2.4",
|
|
||||||
"autoprefixer": "10.4.14",
|
|
||||||
"eslint": "8.40.0",
|
|
||||||
"eslint-config-next": "13.4.1",
|
|
||||||
"flexsearch": "^0.7.31",
|
|
||||||
"next": "13.4.1",
|
|
||||||
"next-mdx-remote": "^4.4.1",
|
|
||||||
"next-seo": "^6.0.0",
|
|
||||||
"octokit": "^2.0.14",
|
|
||||||
"postcss": "8.4.23",
|
|
||||||
"react": "18.2.0",
|
|
||||||
"react-dom": "18.2.0",
|
|
||||||
"react-markdown": "^8.0.7",
|
|
||||||
"remark-code-frontmatter": "^1.0.0",
|
|
||||||
"remark-extract-frontmatter": "^3.2.0",
|
|
||||||
"remark-frontmatter": "^4.0.1",
|
|
||||||
"remark-gfm": "^3.0.1",
|
|
||||||
"tailwindcss": "3.3.2",
|
|
||||||
"timeago.js": "^4.0.2",
|
|
||||||
"typescript": "5.0.4"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
import '@/styles/globals.css'
|
|
||||||
import '@portaljs/components/styles.css'
|
|
||||||
|
|
||||||
import type { AppProps } from 'next/app'
|
|
||||||
|
|
||||||
export default function App({ Component, pageProps }: AppProps) {
|
|
||||||
return <Component {...pageProps} />
|
|
||||||
}
|
|
||||||
@@ -1,96 +0,0 @@
|
|||||||
import { Html, Head, Main, NextScript } from 'next/document';
|
|
||||||
|
|
||||||
export default function Document() {
|
|
||||||
return (
|
|
||||||
<Html lang="en">
|
|
||||||
<Head>
|
|
||||||
<link
|
|
||||||
rel="icon"
|
|
||||||
type="image/x-icon"
|
|
||||||
href="https://projects.fivethirtyeight.com/shared/favicon.ico"
|
|
||||||
/>
|
|
||||||
<meta
|
|
||||||
property="og:image"
|
|
||||||
content="https://portaljs-fivethirtyeight.vercel.app/share_image.png"
|
|
||||||
/>
|
|
||||||
<meta
|
|
||||||
property="twitter:image"
|
|
||||||
content="https://portaljs-fivethirtyeight.vercel.app/share_image.png"
|
|
||||||
/>
|
|
||||||
</Head>
|
|
||||||
<body>
|
|
||||||
<div className="px-2 max-w-5xl mx-auto pb-2">
|
|
||||||
<div className="mt-2 px-2 bg-[#3c3c3c] text-white">
|
|
||||||
<div className="p-2 text-center">
|
|
||||||
This is a replica to the awesome{' '}
|
|
||||||
<a
|
|
||||||
className="hover:underline font-bold"
|
|
||||||
href="https://data.fivethirtyeight.com"
|
|
||||||
>
|
|
||||||
data.fivethirtyeight.com
|
|
||||||
</a>{' '}
|
|
||||||
website.{' '}
|
|
||||||
<a
|
|
||||||
className="hover:underline font-bold"
|
|
||||||
href="https://github.com/datopian/portaljs/tree/main/examples/fivethirtyeight"
|
|
||||||
>
|
|
||||||
Read more here
|
|
||||||
</a>{' '}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<header className="max-w-5xl mx-auto mt-8 w-full">
|
|
||||||
<div className="border-b-2 pb-2.5 mx-2 border-zinc-800 flex justify-between">
|
|
||||||
<h1 className="flex gap-x-1 items-end">
|
|
||||||
<span className="sr-only">FiveThirtyEight</span>
|
|
||||||
<img
|
|
||||||
width="197"
|
|
||||||
height="25"
|
|
||||||
alt="FiveThirtyEight"
|
|
||||||
src="data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MjEgNTMuNzYiPjxkZWZzPjxzdHlsZT4uY2xzLTF7ZmlsbDojMDEwMTAxO308L3N0eWxlPjwvZGVmcz48dGl0bGU+QXJ0Ym9hcmQgOTU8L3RpdGxlPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTAgMGgyNXY4SDl2MTBoMTV2OEg5djE3SDBWMHpNMzEgMzZoNVYxOGgtNXYtOGgxM3YyNmg0djdIMzF6bTUtMzZoOHY4aC04ek0xNzkgMzZoNVYxOGgtNXYtOGgxM3YyNmg0djdoLTE3em01LTM2aDh2OGgtOHpNMzE2IDM2aDVWMThoLTV2LThoMTN2MjZoNHY3aC0xN3ptNS0zNmg4djhoLTh6TTU0IDI3VjEwaDh2MTVsNCA5Ljk4aDFMNzEgMjVWMTBoOHYxN2wtNyAxNkg2MWwtNy0xNnpNMTExIDQzSDk3LjQyQzg5LjIzIDQzIDg1IDM5LjE5IDg1IDMxLjE3VjIyYzAtNy41NyA0LjMtMTMgMTMtMTMgOS4zMyAwIDEzIDUuMDcgMTMgMTR2N0g5NHYxLjc0YzAgMi42MiAxIDQuMjYgMy40MiA0LjI2SDExMXpNOTQgMjNoOHYtMS41NWMwLTIuNjItMS4wNi01LjQ1LTQuMTMtNS40NS0yLjc5IDAtMy44NyAyLjItMy44NyA1LjQ1ek0xMjUgOGgtMTBWMGgyOXY4aC0xMHYzNWgtOVY4ek0yMDIgNDNWMTBoOHY0YzEuMTQtMi40NSAzLjc1LTQgNy4yMi00SDIyMHY4aC02Yy0yLjg0IDAtNCAuOTQtNCAzLjlWNDN6TTI0NSA0M2gtNC44NEMyMzMuMDUgNDMgMjMwIDM5LjMxIDIzMCAzMS44NVYxOGgtNnYtOGg2VjNoOHY3aDd2OGgtN2wtLjA3IDEzLjkzYzAgMi4yMi45MyA0LjA3IDMuNjYgNC4wN0gyNDV6TTQyMSA0M2gtNC44NEM0MDkuMDUgNDMgNDA2IDM5LjMxIDQwNiAzMS44NVYxOGgtNnYtOGg2VjNoOHY3aDd2OGgtN2wtLjA3IDEzLjkzYzAgMi4yMi45MyA0LjA3IDMuNjYgNC4wN0g0MjF6TTI1NC4yNiA1My43Nmw0LjYxLTkuNUwyNTEgMjdWMTBoOHYxNWw0IDEwaDFsNC0xMFYxMGg4djE3bC0xMi4zIDI2Ljc2aC05LjQ0ek0yODQgMGgyNXY4aC0xNnY5aDE1djhoLTE1djEwaDE2djhoLTI1VjB6TTMzNyA0OHYtMmgxNi4xYzIgMCAyLjktLjE4IDIuOS0xLjI3di0uMzRjMC0xLjA4LS45MS0xLjM5LTIuOS0xLjM5SDM0MHYtNWw1LTVjLTUuMjktMS40OC04LTUuNDMtOC0xMXYtMWMwLTcuNTYgNC40NC0xMiAxNC0xMmEyMS45MyAyMS45MyAwIDAgMSA1Ljk1IDFMMzYxIDRsNSAzLTQgNmMxLjM3IDEuOTMgMyA0LjkzIDMgOHYxYzAgNy0zLjMgMTAuNjYtMTIgMTFsLTMgNGg2YzUuOTIgMCA5IDIuNjIgOSA3LjY4di4xMWMwIDUuMDYtMi43MSA4LjIxLTguNjIgOC4yMWgtMTNjLTQuMjkgMC02LjM4LTEuODQtNi4zOC01em0xOS0yNXYtM2MwLTMuMy0xLjMzLTQtNS00cy01IC43LTUgNHYzYzAgMy4zIDEuMzkgNCA1IDRzNS0uNyA1LTR6TTM4MCA0M2gtOFYwaDh2MTRjMS4xNC0yLjY3IDMuNC00IDctNCA2LjI2IDAgOSAzLjA4IDkgMTAuNzZWNDNoLThWMjJjMC0zLjEzLTEuMDctNS00LTVzLTQgMS44Ny00IDV6TTE1NyA0M2gtOFYwaDh2MTRjMS4xNC0yLjY3IDMuOTEtNCA3LjQ5LTQgNi4yNiAwIDguNTEgMy4xMyA4LjUxIDEwLjgxVjQzaC04VjIxYzAtMy4xMy0xLjA3LTQuNDQtNC00LjQ0cy00IDIuMjYtNCA1LjM5eiIvPjwvc3ZnPg=="
|
|
||||||
/>{' '}
|
|
||||||
<span className="-mb-0.5 text-[#3c3c3c]">replica</span>
|
|
||||||
</h1>
|
|
||||||
<div className="md:flex items-center gap-x-3 text-[#3c3c3c] -mb-1 hidden">
|
|
||||||
<a
|
|
||||||
className="hover:opacity-75 transition"
|
|
||||||
href="https://portaljs.org"
|
|
||||||
>
|
|
||||||
Built with 🌀PortalJS
|
|
||||||
</a>
|
|
||||||
<hr className="h-[80%] border border-[#3c3c3c] opacity-75 my-2"></hr>
|
|
||||||
<a
|
|
||||||
className="hover:opacity-75 transition"
|
|
||||||
href="https://github.com/datopian/portaljs/tree/main/examples/fivethirtyeight"
|
|
||||||
>
|
|
||||||
Github
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="mx-2 py-1.5 text-[14px] text-[#3c3c3c] md:hidden">
|
|
||||||
<ul className="flex gap-x-4">
|
|
||||||
<li>
|
|
||||||
<a
|
|
||||||
className="hover:opacity-75 transition"
|
|
||||||
href="https://portaljs.org"
|
|
||||||
>
|
|
||||||
PortalJS
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a
|
|
||||||
className="hover:opacity-75 transition"
|
|
||||||
href="https://github.com/datopian/portaljs/tree/main/examples/fivethirtyeight"
|
|
||||||
>
|
|
||||||
View on Github
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
<Main />
|
|
||||||
<NextScript />
|
|
||||||
</body>
|
|
||||||
</Html>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,131 +0,0 @@
|
|||||||
import { NextSeo } from 'next-seo';
|
|
||||||
import { promises as fs } from 'fs';
|
|
||||||
import path from 'path';
|
|
||||||
import getConfig from 'next/config';
|
|
||||||
import { getProjectReadme, GithubProject } from '@/lib/octokit';
|
|
||||||
import remarkGfm from 'remark-gfm';
|
|
||||||
import extract from 'remark-extract-frontmatter';
|
|
||||||
import { Dataset } from '..';
|
|
||||||
import { GetStaticProps } from 'next';
|
|
||||||
import { Table } from '@portaljs/components';
|
|
||||||
import Breadcrumbs from '@/components/Breadcrumbs';
|
|
||||||
import { ReactMarkdown } from 'react-markdown/lib/react-markdown';
|
|
||||||
import remarkFrontmatter from 'remark-frontmatter';
|
|
||||||
|
|
||||||
export default function DatasetPage({
|
|
||||||
dataset,
|
|
||||||
}: {
|
|
||||||
dataset: Dataset & {
|
|
||||||
readme: string | null;
|
|
||||||
};
|
|
||||||
}) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<NextSeo title={`${dataset.name} page`} />
|
|
||||||
<main className="max-w-5xl px-2 prose mx-auto my-8 prose-thead:border-b-4 prose-table:max-w-5xl prose-table:overflow-scroll prose-thead:overflow-scroll prose-tbody:overflow-scroll prose-thead:pb-2 prose-thead:border-zinc-900 prose-th:uppercase prose-th:text-left prose-th:font-light prose-th:text-xs">
|
|
||||||
<Breadcrumbs links={[{ title: dataset.name, href: '' }]} />
|
|
||||||
<h1 className="uppercase mb-0 mt-16">{dataset.name}</h1>
|
|
||||||
<p className="mb-8">
|
|
||||||
<span className="font-semibold">Repository:</span>{' '}
|
|
||||||
<a target="_blank" href={dataset.url}>
|
|
||||||
{dataset.url}
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 className="mb-0 mt-10">FILES</h2>
|
|
||||||
<div className="inline-block min-w-full py-2 align-middle">
|
|
||||||
<table className="min-w-full divide-y divide-gray-300">
|
|
||||||
<thead className="border-b-4 pb-2 border-zinc-900">
|
|
||||||
<tr>
|
|
||||||
<th
|
|
||||||
className="uppercase text-left font-light text-xs pb-3"
|
|
||||||
scope="col"
|
|
||||||
>
|
|
||||||
Name
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody className="divide-y divide-gray-200">
|
|
||||||
{dataset.files?.map((file) => (
|
|
||||||
<tr key={file}>
|
|
||||||
<td className="whitespace-nowrap text-left py-4 text-sm text-gray-500">
|
|
||||||
<a href={file}>{file.split('/').slice(-1)}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
))}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
{dataset.files && dataset.files.length > 0 && (
|
|
||||||
<>
|
|
||||||
<h2 className="mb-0 mt-10">DATA PREVIEWS</h2>
|
|
||||||
{dataset.files?.map((file) => (
|
|
||||||
<div key={file} className="preview-table my-8">
|
|
||||||
<h3>{file.split('/').slice(-1)}</h3>
|
|
||||||
<Table url={file} />
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
{dataset.readme && (
|
|
||||||
<>
|
|
||||||
<h2 className="uppercase font-black">Readme</h2>
|
|
||||||
{dataset.readme && (
|
|
||||||
<ReactMarkdown
|
|
||||||
remarkPlugins={[
|
|
||||||
remarkFrontmatter,
|
|
||||||
remarkGfm,
|
|
||||||
[extract, { remove: true }],
|
|
||||||
]}
|
|
||||||
>
|
|
||||||
{dataset.readme}
|
|
||||||
</ReactMarkdown>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</main>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function getStaticPaths() {
|
|
||||||
const datasetsFile = path.join(process.cwd(), 'datasets.json');
|
|
||||||
const datasets = await fs.readFile(datasetsFile, 'utf8');
|
|
||||||
|
|
||||||
return {
|
|
||||||
paths: JSON.parse(datasets).map((dataset: Dataset) => {
|
|
||||||
return {
|
|
||||||
params: { datasetName: dataset.name },
|
|
||||||
};
|
|
||||||
}),
|
|
||||||
fallback: false, // can also be true or 'blocking'
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getStaticProps: GetStaticProps = async ({ params }) => {
|
|
||||||
const datasetsFile = path.join(process.cwd(), 'datasets.json');
|
|
||||||
const datasetsString = await fs.readFile(datasetsFile, 'utf8');
|
|
||||||
const datasets: Dataset[] = JSON.parse(datasetsString);
|
|
||||||
const dataset: Dataset | undefined = datasets.find(
|
|
||||||
(_dataset) => _dataset.name === params?.datasetName
|
|
||||||
);
|
|
||||||
const github_pat = getConfig().serverRuntimeConfig.github_pat;
|
|
||||||
const readmes = await Promise.all(['/README.md', '/readme.md', '/Readme.md'].map(async (readme) => await getProjectReadme(
|
|
||||||
'fivethirtyeight',
|
|
||||||
'data',
|
|
||||||
'master',
|
|
||||||
dataset?.name + readme,
|
|
||||||
github_pat
|
|
||||||
)));
|
|
||||||
const readme = readmes.find(item => item !== null)
|
|
||||||
if (!readme) console.log('Readme not found for ' + dataset?.name)
|
|
||||||
return {
|
|
||||||
props: {
|
|
||||||
dataset: {
|
|
||||||
...dataset,
|
|
||||||
readme,
|
|
||||||
files: dataset && dataset.files ? dataset.files : null,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,211 +0,0 @@
|
|||||||
import Image from 'next/image';
|
|
||||||
import { Inter } from 'next/font/google';
|
|
||||||
import { format } from 'timeago.js';
|
|
||||||
import { promises as fs } from 'fs';
|
|
||||||
import path from 'path';
|
|
||||||
import { NextSeo } from 'next-seo';
|
|
||||||
|
|
||||||
const inter = Inter({ subsets: ['latin'] });
|
|
||||||
|
|
||||||
export interface Article {
|
|
||||||
date: string;
|
|
||||||
title: string;
|
|
||||||
url: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Dataset {
|
|
||||||
url: string;
|
|
||||||
name: string;
|
|
||||||
displayName: string;
|
|
||||||
articles: Article[];
|
|
||||||
files?: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Request a weekday along with a long date
|
|
||||||
const options = {
|
|
||||||
year: 'numeric',
|
|
||||||
month: 'long',
|
|
||||||
day: 'numeric',
|
|
||||||
} as const;
|
|
||||||
|
|
||||||
export function MobileItem({ dataset }: { dataset: Dataset }) {
|
|
||||||
return (
|
|
||||||
<div className="flex gap-x-2 pb-2 py-4 items-center justify-between border-b border-zinc-600">
|
|
||||||
<div className="flex flex-col">
|
|
||||||
<span className="font-mono font-light">{dataset.name}</span>
|
|
||||||
{dataset.articles.map((article) => (
|
|
||||||
<div key={article.title} className="py-1 flex flex-col">
|
|
||||||
<span className="font-bold hover:underline">{article.title}</span>
|
|
||||||
<span className="font-light text-base">
|
|
||||||
{format(article.date).includes('years')
|
|
||||||
? new Date(article.date).toLocaleString('en-US', options)
|
|
||||||
: format(article.date)}
|
|
||||||
</span>{' '}
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
<div className="flex flex-col justify-start">
|
|
||||||
<a
|
|
||||||
className="ml-2 border border-zinc-900 font-light px-4 py-1 text-sm transition hover:bg-zinc-900 hover:text-white"
|
|
||||||
href={dataset.url}
|
|
||||||
>
|
|
||||||
info
|
|
||||||
</a>
|
|
||||||
{/*
|
|
||||||
<button>
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="currentColor"
|
|
||||||
className="w-12 h-12 text-blue-400 hover:text-blue-300 transition mt-1"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
fillRule="evenodd"
|
|
||||||
d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25zm-.53 14.03a.75.75 0 001.06 0l3-3a.75.75 0 10-1.06-1.06l-1.72 1.72V8.25a.75.75 0 00-1.5 0v5.69l-1.72-1.72a.75.75 0 00-1.06 1.06l3 3z"
|
|
||||||
clipRule="evenodd"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</button> */}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function DesktopItem({ dataset }: { dataset: Dataset }) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{dataset.articles.map((article, index) => (
|
|
||||||
<tr
|
|
||||||
key={article.url}
|
|
||||||
className={`${
|
|
||||||
index === dataset.articles.length - 1 ? 'border-b' : ''
|
|
||||||
} border-zinc-400`}
|
|
||||||
>
|
|
||||||
<td className="py-8 font-light font-mono text-[13px] text-zinc-700">
|
|
||||||
{index === 0 ? dataset.name : ''}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a
|
|
||||||
className="py-8 font-bold hover:underline pr-2"
|
|
||||||
href={article.url}
|
|
||||||
>
|
|
||||||
{article.title}
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td className="py-8 font-light text-[14px] min-w-[138px] font-mono text-[#999]">
|
|
||||||
{format(article.date).includes('years')
|
|
||||||
? new Date(article.date).toLocaleString('en-US', options)
|
|
||||||
: format(article.date)}
|
|
||||||
</td>
|
|
||||||
<td className="py-8">
|
|
||||||
{index === 0 && (
|
|
||||||
<a
|
|
||||||
className="ml-2 border border-zinc-900 font-light px-[25px] py-2.5 text-sm transition hover:bg-zinc-900 hover:text-white"
|
|
||||||
href={dataset.url}
|
|
||||||
>
|
|
||||||
info
|
|
||||||
</a>
|
|
||||||
)}
|
|
||||||
</td>
|
|
||||||
{/*
|
|
||||||
<td>
|
|
||||||
<button>
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="currentColor"
|
|
||||||
className="w-12 h-12 text-blue-400 hover:text-blue-300 transition mt-1"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
fillRule="evenodd"
|
|
||||||
d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25zm-.53 14.03a.75.75 0 001.06 0l3-3a.75.75 0 10-1.06-1.06l-1.72 1.72V8.25a.75.75 0 00-1.5 0v5.69l-1.72-1.72a.75.75 0 00-1.06 1.06l3 3z"
|
|
||||||
clipRule="evenodd"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
</td>*/}
|
|
||||||
</tr>
|
|
||||||
))}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function getStaticProps() {
|
|
||||||
const jsonDirectory = path.join(process.cwd(), '/datasets.json');
|
|
||||||
const datasetString = await fs.readFile(jsonDirectory, 'utf8');
|
|
||||||
const datasets = JSON.parse(datasetString);
|
|
||||||
return {
|
|
||||||
props: { datasets },
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function Home({ datasets }: { datasets: Dataset[] }) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<NextSeo title="FiveThirtyEight tribute by PortalJS" />
|
|
||||||
<main
|
|
||||||
className={`flex min-h-screen flex-col items-center max-w-5xl mx-auto pt-20 px-2.5 ${inter.className}`}
|
|
||||||
>
|
|
||||||
<div>
|
|
||||||
<h1 className="text-[40px] font-bold text-zinc-800 text-center">
|
|
||||||
Our Data
|
|
||||||
</h1>
|
|
||||||
<p className="max-w-[600px] text-[17px] text-center text-[#6d6f71]">
|
|
||||||
We’re sharing the data and code behind some of our articles and
|
|
||||||
graphics. We hope you’ll use it to check our work and to create
|
|
||||||
stories and visualizations of your own.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<article className="w-full px-2 md:hidden py-4">
|
|
||||||
{datasets.map((dataset) => (
|
|
||||||
<MobileItem key={dataset.name} dataset={dataset} />
|
|
||||||
))}
|
|
||||||
</article>
|
|
||||||
<table className="w-full mt-10 mb-4 hidden md:table">
|
|
||||||
<thead className="border-b-4 pb-2 border-zinc-900">
|
|
||||||
<tr>
|
|
||||||
<th className="uppercase text-left font-normal text-xs pb-3">
|
|
||||||
data set
|
|
||||||
</th>
|
|
||||||
<th className="uppercase text-left font-normal text-xs pb-3">
|
|
||||||
related content
|
|
||||||
</th>
|
|
||||||
<th className="uppercase text-left font-normal text-xs pb-3">
|
|
||||||
last updated
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{datasets.map((dataset) => (
|
|
||||||
<DesktopItem key={dataset.name} dataset={dataset} />
|
|
||||||
))}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<p className="text-[13px] py-8">
|
|
||||||
Unless otherwise noted, our data sets are available under the{' '}
|
|
||||||
<a
|
|
||||||
className="text-blue-400 hover:underline"
|
|
||||||
href="http://creativecommons.org/licenses/by/4.0/"
|
|
||||||
>
|
|
||||||
Creative Commons Attribution 4.0 International license
|
|
||||||
</a>
|
|
||||||
, and the code is available under the{' '}
|
|
||||||
<a
|
|
||||||
className="text-blue-400 hover:underline"
|
|
||||||
href="http://opensource.org/licenses/MIT"
|
|
||||||
>
|
|
||||||
MIT license
|
|
||||||
</a>
|
|
||||||
. If you find this information useful, please{' '}
|
|
||||||
<a
|
|
||||||
className="text-blue-400 hover:underline"
|
|
||||||
href="mailto:data@fivethirtyeight.com"
|
|
||||||
>
|
|
||||||
let us know
|
|
||||||
</a>
|
|
||||||
.
|
|
||||||
</p>
|
|
||||||
</main>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 25 KiB |
@@ -1 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 81 KiB |
@@ -1 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 283 64"><path fill="black" d="M141 16c-11 0-19 7-19 18s9 18 20 18c7 0 13-3 16-7l-7-5c-2 3-6 4-9 4-5 0-9-3-10-7h28v-3c0-11-8-18-19-18zm-9 15c1-4 4-7 9-7s8 3 9 7h-18zm117-15c-11 0-19 7-19 18s9 18 20 18c6 0 12-3 16-7l-8-5c-2 3-5 4-8 4-5 0-9-3-11-7h28l1-3c0-11-8-18-19-18zm-10 15c2-4 5-7 10-7s8 3 9 7h-19zm-39 3c0 6 4 10 10 10 4 0 7-2 9-5l8 5c-3 5-9 8-17 8-11 0-19-7-19-18s8-18 19-18c8 0 14 3 17 8l-8 5c-2-3-5-5-9-5-6 0-10 4-10 10zm83-29v46h-9V5h9zM37 0l37 64H0L37 0zm92 5-27 48L74 5h10l18 30 17-30h10zm59 12v10l-3-1c-6 0-10 4-10 10v15h-9V17h9v9c0-5 6-9 13-9z"/></svg>
|
|
||||||
|
Before Width: | Height: | Size: 629 B |
@@ -1,8 +0,0 @@
|
|||||||
@tailwind base;
|
|
||||||
@tailwind components;
|
|
||||||
@tailwind utilities;
|
|
||||||
|
|
||||||
.preview-table > div {
|
|
||||||
overflow-x: scroll;
|
|
||||||
overflow-y: hidden;
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
/** @type {import('tailwindcss').Config} */
|
|
||||||
module.exports = {
|
|
||||||
content: [
|
|
||||||
'./pages/**/*.{js,ts,jsx,tsx,mdx}',
|
|
||||||
'./components/**/*.{js,ts,jsx,tsx,mdx}',
|
|
||||||
'./app/**/*.{js,ts,jsx,tsx,mdx}',
|
|
||||||
],
|
|
||||||
theme: {
|
|
||||||
extend: {
|
|
||||||
backgroundImage: {
|
|
||||||
'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
|
|
||||||
'gradient-conic':
|
|
||||||
'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
plugins: [require('@tailwindcss/typography')],
|
|
||||||
};
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"target": "es5",
|
|
||||||
"lib": ["dom", "dom.iterable", "esnext"],
|
|
||||||
"allowJs": true,
|
|
||||||
"skipLibCheck": true,
|
|
||||||
"strict": true,
|
|
||||||
"forceConsistentCasingInFileNames": true,
|
|
||||||
"noEmit": true,
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"module": "esnext",
|
|
||||||
"moduleResolution": "node",
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
"isolatedModules": true,
|
|
||||||
"jsx": "preserve",
|
|
||||||
"incremental": true,
|
|
||||||
"paths": {
|
|
||||||
"@/*": ["./*"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
|
|
||||||
"exclude": ["node_modules"]
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": ["next", "next/core-web-vitals"],
|
|
||||||
"ignorePatterns": ["!**/*", ".next/**/*"],
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
||||||
"rules": {
|
|
||||||
"@next/next/no-html-link-for-pages": [
|
|
||||||
"error",
|
|
||||||
"examples/simple-example/pages"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"files": ["*.ts", "*.tsx"],
|
|
||||||
"rules": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"files": ["*.js", "*.jsx"],
|
|
||||||
"rules": {}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"rules": {
|
|
||||||
"@next/next/no-html-link-for-pages": "off"
|
|
||||||
},
|
|
||||||
"env": {
|
|
||||||
"jest": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
node_modules
|
|
||||||
**/.next/**
|
|
||||||
**/_next/**
|
|
||||||
**/dist/**
|
|
||||||
**/__tmp__/**
|
|
||||||
lerna.json
|
|
||||||
.github
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -1,101 +0,0 @@
|
|||||||
# A data catalog with data on GitHub
|
|
||||||
|
|
||||||
This example showcases a simple data catalog that get its data from a list of GitHub repos that serve as datasets.
|
|
||||||
|
|
||||||
A `datasets.json` file is used to specify which datasets are going to be part of the data catalog.
|
|
||||||
|
|
||||||
The application contains an index page, which lists all the datasets specified in the `datasets.json` file, and users can see more information about each dataset, such as the list of data files in it and the README, by clicking the "info" button on the list.
|
|
||||||
|
|
||||||
You can read more about it on the [Data catalog with data on GitHub](https://portaljs.org/docs/examples/github-backed-catalog) blog post.
|
|
||||||
|
|
||||||
## Demo
|
|
||||||
|
|
||||||
https://example.portaljs.org/
|
|
||||||
|
|
||||||
## Deploy your own
|
|
||||||
|
|
||||||
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fdatopian%2Fportaljs%2Ftree%2Fmain%2Fexamples%2Fgithub-backed-catalog)
|
|
||||||
|
|
||||||
By clicking on this button, you will be redirected to a page which will allow you to clone the content into your own GitHub/GitLab/Bitbucket account and automatically deploy everything.
|
|
||||||
|
|
||||||
## How to use
|
|
||||||
|
|
||||||
### Install
|
|
||||||
|
|
||||||
Execute `create-next-app` to bootstrap the example:
|
|
||||||
|
|
||||||
```
|
|
||||||
npx create-next-app <app-name> --example https://github.com/datopian/portaljs/tree/main/examples/github-backed-catalog
|
|
||||||
cd <app-name>
|
|
||||||
```
|
|
||||||
|
|
||||||
### Set environment variables
|
|
||||||
|
|
||||||
This project uses the GitHub API, which for anonymous users will cap at 50 requests per hour, so you might want to get a [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) and add it to a `.env` file inside the folder like so
|
|
||||||
|
|
||||||
```
|
|
||||||
GITHUB_PAT=<github token>
|
|
||||||
```
|
|
||||||
|
|
||||||
### Change datasets
|
|
||||||
|
|
||||||
You can change the datasets that will be displayed in the data catalog by editing the file `datasets.json`. Some examples can be found inside [this repo](https://github.com/datasets).
|
|
||||||
|
|
||||||
### Run in development mode
|
|
||||||
|
|
||||||
Run the app using:
|
|
||||||
|
|
||||||
```
|
|
||||||
npm run dev
|
|
||||||
```
|
|
||||||
|
|
||||||
Open http://localhost:3000 from your browser. You should see something similar to this:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
If click on the `info` button for a dataset you will see a page similar to this:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Notes
|
|
||||||
|
|
||||||
### Structure of `datasets.json`
|
|
||||||
|
|
||||||
The `datasets.json` file is simply a list of datasets, below you can see a minimal example of a dataset:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"owner": "fivethirtyeight",
|
|
||||||
"repo": "data",
|
|
||||||
"branch": "master",
|
|
||||||
"files": ["nba-raptor/historical_RAPTOR_by_player.csv", "nba-raptor/historical_RAPTOR_by_team.csv"],
|
|
||||||
"readme": "nba-raptor/README.md"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
It has:
|
|
||||||
|
|
||||||
- A `owner` which is going to be the github repo owner
|
|
||||||
- A `repo` which is going to be the github repo name
|
|
||||||
- A `branch` which is going to be the branch to which we need to get the files and the readme
|
|
||||||
- A list of `files` which is going to be a list of paths with files that you want to show to the world
|
|
||||||
- A `readme` which is going to be the path to your data description, it can also be a subpath eg: `example/README.md`
|
|
||||||
|
|
||||||
You can also add:
|
|
||||||
|
|
||||||
- A `description` which is useful if you have more than one dataset for each repo, if not provided we are just going to use the repo description
|
|
||||||
- A `Name` which is useful if you want to give your dataset a nice name, if not provided we are going to use the junction of the `owner` the `repo` + the path of the README, in the exaple above it will be `fivethirtyeight/data/nba-raptor`
|
|
||||||
|
|
||||||
### Extra commands
|
|
||||||
|
|
||||||
You can also build the project for production with:
|
|
||||||
|
|
||||||
```
|
|
||||||
npm run build
|
|
||||||
```
|
|
||||||
|
|
||||||
And run the production build with:
|
|
||||||
|
|
||||||
```
|
|
||||||
npm run start
|
|
||||||
```
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
import Link from "next/link";
|
|
||||||
import HomeIcon from "../icons/HomeIcon";
|
|
||||||
|
|
||||||
export default function Breadcrumbs({
|
|
||||||
links,
|
|
||||||
}: {
|
|
||||||
links: { title: string; href?: string; target?: string }[];
|
|
||||||
}) {
|
|
||||||
const current = links.at(-1);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="flex items-center uppercase font-black text-xs">
|
|
||||||
<Link className="flex items-center" href="/">
|
|
||||||
<HomeIcon />
|
|
||||||
</Link>
|
|
||||||
|
|
||||||
{/* {links.length > 1 && links.slice(0, -1).map((link) => {
|
|
||||||
return <>
|
|
||||||
<span className="mx-4">/</span>
|
|
||||||
<Link href={link.href}>{link.title}</Link>
|
|
||||||
</>
|
|
||||||
})} */}
|
|
||||||
|
|
||||||
<span className="mx-4">/</span>
|
|
||||||
<span>{current.title}</span>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
export default function ExternalLinkIcon({ className = "" }) {
|
|
||||||
return (
|
|
||||||
<div className={`inline-block w-4 ${className}`}>
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
viewBox="0 0 64 64"
|
|
||||||
fill="currentColor"
|
|
||||||
>
|
|
||||||
<path d="M 40 10 C 38.896 10 38 10.896 38 12 C 38 13.104 38.896 14 40 14 L 47.171875 14 L 30.585938 30.585938 C 29.804938 31.366938 29.804938 32.633063 30.585938 33.414062 C 30.976938 33.805063 31.488 34 32 34 C 32.512 34 33.023063 33.805062 33.414062 33.414062 L 50 16.828125 L 50 24 C 50 25.104 50.896 26 52 26 C 53.104 26 54 25.104 54 24 L 54 12 C 54 10.896 53.104 10 52 10 L 40 10 z M 18 12 C 14.691 12 12 14.691 12 18 L 12 46 C 12 49.309 14.691 52 18 52 L 46 52 C 49.309 52 52 49.309 52 46 L 52 34 C 52 32.896 51.104 32 50 32 C 48.896 32 48 32.896 48 34 L 48 46 C 48 47.103 47.103 48 46 48 L 18 48 C 16.897 48 16 47.103 16 46 L 16 18 C 16 16.897 16.897 16 18 16 L 30 16 C 31.104 16 32 15.104 32 14 C 32 12.896 31.104 12 30 12 L 18 12 z" />
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
export default function HomeIcon({ className = "" }) {
|
|
||||||
return (
|
|
||||||
<div className={`inline-block w-4 ${className}`}>
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
||||||
{" "}
|
|
||||||
<path d="M 12 2 A 1 1 0 0 0 11.289062 2.296875 L 1.203125 11.097656 A 0.5 0.5 0 0 0 1 11.5 A 0.5 0.5 0 0 0 1.5 12 L 4 12 L 4 20 C 4 20.552 4.448 21 5 21 L 9 21 C 9.552 21 10 20.552 10 20 L 10 14 L 14 14 L 14 20 C 14 20.552 14.448 21 15 21 L 19 21 C 19.552 21 20 20.552 20 20 L 20 12 L 22.5 12 A 0.5 0.5 0 0 0 23 11.5 A 0.5 0.5 0 0 0 22.796875 11.097656 L 12.716797 2.3027344 A 1 1 0 0 0 12.710938 2.296875 A 1 1 0 0 0 12 2 z" />
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
6
examples/github-backed-catalog/index.d.ts
vendored
6
examples/github-backed-catalog/index.d.ts
vendored
@@ -1,6 +0,0 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
||||||
declare module "*.svg" {
|
|
||||||
const content: any;
|
|
||||||
export const ReactComponent: any;
|
|
||||||
export default content;
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
const nextConfig = {
|
|
||||||
async rewrites() {
|
|
||||||
return {
|
|
||||||
beforeFiles: [
|
|
||||||
{
|
|
||||||
source: "/@:org/:project*",
|
|
||||||
destination: "/@org/:org/:project*",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
},
|
|
||||||
serverRuntimeConfig: {
|
|
||||||
github_pat: process.env.GITHUB_PAT ? process.env.GITHUB_PAT : null,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports = nextConfig;
|
|
||||||
@@ -1,139 +0,0 @@
|
|||||||
import { promises as fs } from "fs";
|
|
||||||
import path from "path";
|
|
||||||
import { getProject } from "../lib/octokit";
|
|
||||||
import getConfig from "next/config";
|
|
||||||
import ExternalLinkIcon from "../components/icons/ExternalLinkIcon";
|
|
||||||
import TimeAgo from "react-timeago";
|
|
||||||
import Link from "next/link";
|
|
||||||
import { NextSeo } from "next-seo";
|
|
||||||
|
|
||||||
export async function getStaticProps() {
|
|
||||||
const jsonDirectory = path.join(process.cwd(), "/datasets.json");
|
|
||||||
const repos = await fs.readFile(jsonDirectory, "utf8");
|
|
||||||
const github_pat = getConfig().serverRuntimeConfig.github_pat;
|
|
||||||
|
|
||||||
const projects = await Promise.all(
|
|
||||||
JSON.parse(repos).map(async (repo) => {
|
|
||||||
const project = await getProject(repo, github_pat);
|
|
||||||
return { ...project, repo_config: repo };
|
|
||||||
})
|
|
||||||
);
|
|
||||||
return {
|
|
||||||
props: {
|
|
||||||
projects,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function Datasets({ projects }) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<NextSeo title="GitHub Datasets" />
|
|
||||||
<div className="bg-white min-h-screen">
|
|
||||||
<div className="mx-auto max-w-7xl px-6 py-16 sm:py-24 lg:px-8">
|
|
||||||
<div className="text-center">
|
|
||||||
<h2 className="text-3xl font-bold leading-10 tracking-tight">
|
|
||||||
GitHub Datasets
|
|
||||||
</h2>
|
|
||||||
<p className="mt-3 mx-auto max-w-2xl text-base leading-7 text-gray-500">
|
|
||||||
Data catalog with datasets hosted on GitHub by{" "}
|
|
||||||
<Link
|
|
||||||
target="_blank"
|
|
||||||
className="underline"
|
|
||||||
href="https://portaljs.org/"
|
|
||||||
>
|
|
||||||
🌀 PortalJS
|
|
||||||
</Link>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div className="mt-20">
|
|
||||||
<div className="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
|
|
||||||
<div className="inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8">
|
|
||||||
<table className="min-w-full divide-y divide-gray-300">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th
|
|
||||||
scope="col"
|
|
||||||
className="px-3 py-3.5 text-left text-sm font-semibold text-gray-900"
|
|
||||||
>
|
|
||||||
Name
|
|
||||||
</th>
|
|
||||||
<th
|
|
||||||
scope="col"
|
|
||||||
className="px-3 py-3.5 text-left text-sm font-semibold text-gray-900"
|
|
||||||
>
|
|
||||||
Repository
|
|
||||||
</th>
|
|
||||||
<th
|
|
||||||
scope="col"
|
|
||||||
className="px-3 py-3.5 text-left text-sm font-semibold text-gray-900"
|
|
||||||
>
|
|
||||||
Description
|
|
||||||
</th>
|
|
||||||
<th
|
|
||||||
scope="col"
|
|
||||||
className="px-3 py-3.5 text-left text-sm font-semibold text-gray-900"
|
|
||||||
>
|
|
||||||
Last updated
|
|
||||||
</th>
|
|
||||||
<th
|
|
||||||
scope="col"
|
|
||||||
className="relative py-3.5 pl-3 pr-4 sm:pr-0"
|
|
||||||
></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody className="divide-y divide-gray-200">
|
|
||||||
{projects.map((project) => (
|
|
||||||
<tr key={project.id}>
|
|
||||||
<td className="whitespace-nowrap px-3 py-6 text-sm text-gray-500">
|
|
||||||
{project.repo_config.name
|
|
||||||
? project.repo_config.name
|
|
||||||
: project.full_name +
|
|
||||||
(project.base_path === "/"
|
|
||||||
? ""
|
|
||||||
: "/" + project.base_path)}
|
|
||||||
</td>
|
|
||||||
<td className="whitespace-nowrap px-3 py-6 text-sm group text-gray-500 hover:text-gray-900 transition-all duration-250">
|
|
||||||
<a
|
|
||||||
href={project.html_url}
|
|
||||||
target="_blank"
|
|
||||||
className="flex items-center"
|
|
||||||
>
|
|
||||||
@{project.full_name}{" "}
|
|
||||||
<ExternalLinkIcon className="ml-1" />
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td className="px-3 py-4 text-sm text-gray-500">
|
|
||||||
{project.repo_config.description
|
|
||||||
? project.repo_config.description
|
|
||||||
: project.description}
|
|
||||||
</td>
|
|
||||||
<td className="whitespace-nowrap px-3 py-6 text-sm text-gray-500">
|
|
||||||
<TimeAgo date={new Date(project.last_updated)} />
|
|
||||||
</td>
|
|
||||||
<td className="relative whitespace-nowrap py-6 pl-3 pr-4 text-right text-sm font-medium sm:pr-0">
|
|
||||||
<a
|
|
||||||
href={`/@${project.repo_config.owner}/${
|
|
||||||
project.repo_config.repo
|
|
||||||
}/${
|
|
||||||
project.base_path === "/" ? "" : project.base_path
|
|
||||||
}`}
|
|
||||||
className="border border-gray-900 text-gray-900 px-4 py-2 transition-all hover:bg-gray-900 hover:text-white"
|
|
||||||
>
|
|
||||||
info
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
))}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Datasets;
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
@tailwind base;
|
|
||||||
@tailwind components;
|
|
||||||
@tailwind utilities;
|
|
||||||
html {
|
|
||||||
-webkit-text-size-adjust: 100%;
|
|
||||||
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
|
||||||
Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif,
|
|
||||||
Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
|
|
||||||
line-height: 1.5;
|
|
||||||
tab-size: 4;
|
|
||||||
scroll-behavior: smooth;
|
|
||||||
}
|
|
||||||
body {
|
|
||||||
font-family: inherit;
|
|
||||||
line-height: inherit;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
h1,
|
|
||||||
h2,
|
|
||||||
p,
|
|
||||||
pre {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
*,
|
|
||||||
::before,
|
|
||||||
::after {
|
|
||||||
box-sizing: border-box;
|
|
||||||
border-width: 0;
|
|
||||||
border-style: solid;
|
|
||||||
border-color: currentColor;
|
|
||||||
}
|
|
||||||
h1,
|
|
||||||
h2 {
|
|
||||||
font-size: inherit;
|
|
||||||
font-weight: inherit;
|
|
||||||
}
|
|
||||||
a {
|
|
||||||
color: inherit;
|
|
||||||
text-decoration: inherit;
|
|
||||||
}
|
|
||||||
pre {
|
|
||||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
|
|
||||||
Liberation Mono, Courier New, monospace;
|
|
||||||
}
|
|
||||||
svg {
|
|
||||||
display: block;
|
|
||||||
vertical-align: middle;
|
|
||||||
shape-rendering: auto;
|
|
||||||
text-rendering: optimizeLegibility;
|
|
||||||
}
|
|
||||||
pre {
|
|
||||||
background-color: rgba(55, 65, 81, 1);
|
|
||||||
border-radius: 0.25rem;
|
|
||||||
color: rgba(229, 231, 235, 1);
|
|
||||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
|
|
||||||
Liberation Mono, Courier New, monospace;
|
|
||||||
overflow: scroll;
|
|
||||||
padding: 0.5rem 0.75rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shadow {
|
|
||||||
box-shadow: 0 0 #0000, 0 0 #0000, 0 10px 15px -3px rgba(0, 0, 0, 0.1),
|
|
||||||
0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
||||||
}
|
|
||||||
.rounded {
|
|
||||||
border-radius: 1.5rem;
|
|
||||||
}
|
|
||||||
.wrapper {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.container {
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
max-width: 768px;
|
|
||||||
padding-bottom: 3rem;
|
|
||||||
padding-left: 1rem;
|
|
||||||
padding-right: 1rem;
|
|
||||||
color: rgba(55, 65, 81, 1);
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
plugins: {
|
|
||||||
tailwindcss: {},
|
|
||||||
autoprefixer: {},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
/** @type {import('tailwindcss').Config} */
|
|
||||||
module.exports = {
|
|
||||||
content: [
|
|
||||||
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
|
||||||
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
|
|
||||||
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
|
||||||
],
|
|
||||||
theme: {
|
|
||||||
extend: {},
|
|
||||||
},
|
|
||||||
plugins: [require("@tailwindcss/typography")],
|
|
||||||
};
|
|
||||||
@@ -3,7 +3,7 @@ import { useState } from 'react';
|
|||||||
import DebouncedInput from './DebouncedInput';
|
import DebouncedInput from './DebouncedInput';
|
||||||
import { useForm } from 'react-hook-form';
|
import { useForm } from 'react-hook-form';
|
||||||
|
|
||||||
export function Catalog({
|
export default function Catalog({
|
||||||
datasets,
|
datasets,
|
||||||
facets,
|
facets,
|
||||||
}: {
|
}: {
|
||||||
@@ -102,10 +102,10 @@ export function Catalog({
|
|||||||
)}
|
)}
|
||||||
</select>
|
</select>
|
||||||
))}
|
))}
|
||||||
<ul className='mb-5 pl-6 mt-5 list-disc'>
|
<ul>
|
||||||
{filteredDatasets.map((dataset) => (
|
{filteredDatasets.map((dataset) => (
|
||||||
<li className='py-2' key={dataset._id}>
|
<li key={dataset._id}>
|
||||||
<a className='font-medium underline' href={dataset.url_path}>
|
<a href={dataset.url_path}>
|
||||||
{dataset.metadata.title
|
{dataset.metadata.title
|
||||||
? dataset.metadata.title
|
? dataset.metadata.title
|
||||||
: dataset.url_path}
|
: dataset.url_path}
|
||||||
@@ -8,7 +8,7 @@ import { Mermaid } from '@flowershow/core';
|
|||||||
// here.
|
// here.
|
||||||
const components = {
|
const components = {
|
||||||
Table: dynamic(() => import('@portaljs/components').then(mod => mod.Table)),
|
Table: dynamic(() => import('@portaljs/components').then(mod => mod.Table)),
|
||||||
Catalog: dynamic(() => import('@portaljs/components').then(mod => mod.Catalog)),
|
Catalog: dynamic(() => import('./Catalog')),
|
||||||
mermaid: Mermaid,
|
mermaid: Mermaid,
|
||||||
Vega: dynamic(() => import('@portaljs/components').then(mod => mod.Vega)),
|
Vega: dynamic(() => import('@portaljs/components').then(mod => mod.Vega)),
|
||||||
VegaLite: dynamic(() => import('@portaljs/components').then(mod => mod.VegaLite)),
|
VegaLite: dynamic(() => import('@portaljs/components').then(mod => mod.VegaLite)),
|
||||||
|
|||||||
32
examples/learn-example/components/DebouncedInput.tsx
Normal file
32
examples/learn-example/components/DebouncedInput.tsx
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
|
const DebouncedInput = ({
|
||||||
|
value: initialValue,
|
||||||
|
onChange,
|
||||||
|
debounce = 500,
|
||||||
|
...props
|
||||||
|
}) => {
|
||||||
|
const [value, setValue] = useState(initialValue);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setValue(initialValue);
|
||||||
|
}, [initialValue]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const timeout = setTimeout(() => {
|
||||||
|
onChange(value);
|
||||||
|
}, debounce);
|
||||||
|
|
||||||
|
return () => clearTimeout(timeout);
|
||||||
|
}, [value]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<input
|
||||||
|
{...props}
|
||||||
|
value={value}
|
||||||
|
onChange={(e) => setValue(e.target.value)}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default DebouncedInput;
|
||||||
260
examples/learn-example/package-lock.json
generated
260
examples/learn-example/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,8 +19,13 @@
|
|||||||
"@flowershow/remark-wiki-link": "^1.1.2",
|
"@flowershow/remark-wiki-link": "^1.1.2",
|
||||||
"@heroicons/react": "^2.0.17",
|
"@heroicons/react": "^2.0.17",
|
||||||
"@opentelemetry/api": "^1.4.0",
|
"@opentelemetry/api": "^1.4.0",
|
||||||
"@portaljs/components": "^0.1.0",
|
"@portaljs/components": "^0.0.3",
|
||||||
"@tanstack/react-table": "^8.8.5",
|
"@tanstack/react-table": "^8.8.5",
|
||||||
|
"@types/node": "18.16.0",
|
||||||
|
"@types/react": "18.2.0",
|
||||||
|
"@types/react-dom": "18.2.0",
|
||||||
|
"eslint": "8.39.0",
|
||||||
|
"eslint-config-next": "13.3.1",
|
||||||
"flexsearch": "0.7.21",
|
"flexsearch": "0.7.21",
|
||||||
"gray-matter": "^4.0.3",
|
"gray-matter": "^4.0.3",
|
||||||
"hastscript": "^7.2.0",
|
"hastscript": "^7.2.0",
|
||||||
@@ -45,12 +50,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tailwindcss/typography": "^0.5.9",
|
"@tailwindcss/typography": "^0.5.9",
|
||||||
"@types/flexsearch": "^0.7.3",
|
"@types/flexsearch": "^0.7.3",
|
||||||
"@types/node": "18.16.0",
|
|
||||||
"@types/react": "18.2.0",
|
|
||||||
"@types/react-dom": "18.2.0",
|
|
||||||
"autoprefixer": "^10.4.14",
|
"autoprefixer": "^10.4.14",
|
||||||
"eslint": "8.39.0",
|
|
||||||
"eslint-config-next": "13.3.1",
|
|
||||||
"postcss": "^8.4.23",
|
"postcss": "^8.4.23",
|
||||||
"tailwindcss": "^3.3.1"
|
"tailwindcss": "^3.3.1"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,70 +50,25 @@ export const getStaticProps = async (context) => {
|
|||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
mdxSource,
|
mdxSource,
|
||||||
frontMatter: JSON.stringify(frontMatter),
|
frontMatter,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function DatasetPage({ mdxSource, frontMatter }) {
|
export default function DatasetPage({ mdxSource, frontMatter }) {
|
||||||
frontMatter = JSON.parse(frontMatter);
|
|
||||||
return (
|
return (
|
||||||
<div className="prose dark:prose-invert mx-auto py-8">
|
<div className="prose dark:prose-invert mx-auto">
|
||||||
<header>
|
<header>
|
||||||
<div className="mb-6">
|
<div className="mb-6">
|
||||||
<>
|
<>
|
||||||
<h1 className="mb-2">{frontMatter.title}</h1>
|
<h1>{frontMatter.title}</h1>
|
||||||
{frontMatter.author && (
|
{frontMatter.author && (
|
||||||
<p className="my-0">
|
<div className="-mt-6">
|
||||||
<span className="font-semibold">Author: </span>
|
<p className="opacity-60 pl-1">{frontMatter.author}</p>
|
||||||
<span className="my-0">{frontMatter.author}</span>
|
</div>
|
||||||
</p>
|
|
||||||
)}
|
)}
|
||||||
{frontMatter.description && (
|
{frontMatter.description && (
|
||||||
<p className="my-0">
|
<p className="description">{frontMatter.description}</p>
|
||||||
<span className="font-semibold">Description: </span>
|
|
||||||
<span className="description my-0">
|
|
||||||
{frontMatter.description}
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
{frontMatter.modified && (
|
|
||||||
<p className="my-0">
|
|
||||||
<span className="font-semibold">Modified: </span>
|
|
||||||
<span className="description my-0">
|
|
||||||
{new Date(frontMatter.modified).toLocaleDateString()}
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
{frontMatter.files && (
|
|
||||||
<section className="py-6">
|
|
||||||
<h2 className="mt-0">Data files</h2>
|
|
||||||
<table className="table-auto">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>File</th>
|
|
||||||
<th>Format</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{frontMatter.files.map((f) => {
|
|
||||||
const fileName = f.split('/').slice(-1);
|
|
||||||
return (
|
|
||||||
<tr key={`resources-list-${f}`}>
|
|
||||||
<td>
|
|
||||||
<a target="_blank" href={f}>
|
|
||||||
{fileName}
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{fileName[0].split('.').slice(-1)[0].toUpperCase()}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
35
examples/openspending/.gitignore
vendored
35
examples/openspending/.gitignore
vendored
@@ -1,35 +0,0 @@
|
|||||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
||||||
|
|
||||||
# dependencies
|
|
||||||
/node_modules
|
|
||||||
/.pnp
|
|
||||||
.pnp.js
|
|
||||||
|
|
||||||
# testing
|
|
||||||
/coverage
|
|
||||||
|
|
||||||
# next.js
|
|
||||||
/.next/
|
|
||||||
/out/
|
|
||||||
|
|
||||||
# production
|
|
||||||
/build
|
|
||||||
|
|
||||||
# misc
|
|
||||||
.DS_Store
|
|
||||||
*.pem
|
|
||||||
|
|
||||||
# debug
|
|
||||||
npm-debug.log*
|
|
||||||
yarn-debug.log*
|
|
||||||
yarn-error.log*
|
|
||||||
|
|
||||||
# local env files
|
|
||||||
.env*.local
|
|
||||||
|
|
||||||
# vercel
|
|
||||||
.vercel
|
|
||||||
|
|
||||||
# typescript
|
|
||||||
*.tsbuildinfo
|
|
||||||
next-env.d.ts
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
# A data catalog with data on GitHub
|
|
||||||
|
|
||||||
This example showcases a simple data catalog that get its data from a list of GitHub repos that serve as datasets.
|
|
||||||
|
|
||||||
A `datasets.json` file is used to specify which datasets are going to be part of the data catalog.
|
|
||||||
|
|
||||||
The application contains an index page, which lists all the datasets specified in the `datasets.json` file, and users can see more information about each dataset, such as the list of data files in it and the README, by clicking the "info" button on the list.
|
|
||||||
|
|
||||||
You can read more about it on the [Data catalog with data on GitHub](https://portaljs.org/docs/examples/github-backed-catalog) blog post.
|
|
||||||
|
|
||||||
## Demo
|
|
||||||
|
|
||||||
https://example.portaljs.org/
|
|
||||||
|
|
||||||
## Deploy your own
|
|
||||||
|
|
||||||
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fdatopian%2Fportaljs%2Ftree%2Fmain%2Fexamples%2Fgithub-backed-catalog)
|
|
||||||
|
|
||||||
By clicking on this button, you will be redirected to a page which will allow you to clone the content into your own GitHub/GitLab/Bitbucket account and automatically deploy everything.
|
|
||||||
|
|
||||||
## How to use
|
|
||||||
|
|
||||||
### Install
|
|
||||||
|
|
||||||
Execute `create-next-app` to bootstrap the example:
|
|
||||||
|
|
||||||
```
|
|
||||||
npx create-next-app <app-name> --example https://github.com/datopian/portaljs/tree/main/examples/github-backed-catalog
|
|
||||||
cd <app-name>
|
|
||||||
```
|
|
||||||
|
|
||||||
### Set environment variables
|
|
||||||
|
|
||||||
This project uses the GitHub API, which for anonymous users will cap at 50 requests per hour, so you might want to get a [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) and add it to a `.env` file inside the folder like so
|
|
||||||
|
|
||||||
```
|
|
||||||
GITHUB_PAT=<github token>
|
|
||||||
```
|
|
||||||
|
|
||||||
### Change datasets
|
|
||||||
|
|
||||||
You can change the datasets that will be displayed in the data catalog by editing the file `datasets.json`. Some examples can be found inside [this repo](https://github.com/datasets).
|
|
||||||
|
|
||||||
### Run in development mode
|
|
||||||
|
|
||||||
Run the app using:
|
|
||||||
|
|
||||||
```
|
|
||||||
npm run dev
|
|
||||||
```
|
|
||||||
|
|
||||||
Open http://localhost:3000 from your browser. You should see something similar to this:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
If click on the `info` button for a dataset you will see a page similar to this:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Notes
|
|
||||||
|
|
||||||
### Structure of `datasets.json`
|
|
||||||
|
|
||||||
The `datasets.json` file is simply a list of datasets, below you can see a minimal example of a dataset:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"owner": "fivethirtyeight",
|
|
||||||
"repo": "data",
|
|
||||||
"branch": "master",
|
|
||||||
"files": ["nba-raptor/historical_RAPTOR_by_player.csv", "nba-raptor/historical_RAPTOR_by_team.csv"],
|
|
||||||
"readme": "nba-raptor/README.md"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
It has:
|
|
||||||
|
|
||||||
- A `owner` which is going to be the github repo owner
|
|
||||||
- A `repo` which is going to be the github repo name
|
|
||||||
- A `branch` which is going to be the branch to which we need to get the files and the readme
|
|
||||||
- A list of `files` which is going to be a list of paths with files that you want to show to the world
|
|
||||||
- A `readme` which is going to be the path to your data description, it can also be a subpath eg: `example/README.md`
|
|
||||||
|
|
||||||
You can also add:
|
|
||||||
|
|
||||||
- A `description` which is useful if you have more than one dataset for each repo, if not provided we are just going to use the repo description
|
|
||||||
- A `Name` which is useful if you want to give your dataset a nice name, if not provided we are going to use the junction of the `owner` the `repo` + the path of the README, in the exaple above it will be `fivethirtyeight/data/nba-raptor`
|
|
||||||
|
|
||||||
### Extra commands
|
|
||||||
|
|
||||||
You can also build the project for production with:
|
|
||||||
|
|
||||||
```
|
|
||||||
npm run build
|
|
||||||
```
|
|
||||||
|
|
||||||
And run the production build with:
|
|
||||||
|
|
||||||
```
|
|
||||||
npm run start
|
|
||||||
```
|
|
||||||
|
|
||||||
@@ -1,138 +0,0 @@
|
|||||||
import { expect, test } from 'vitest';
|
|
||||||
import { getAllProjectsFromOrg, getProjectDataPackage } from '../lib/project';
|
|
||||||
import { loadDataPackage } from '../lib/loader';
|
|
||||||
import { getProjectMetadata } from '../lib/project';
|
|
||||||
import { getCsv, parseCsv } from '../components/Table';
|
|
||||||
|
|
||||||
test(
|
|
||||||
'Test OS-Data',
|
|
||||||
async () => {
|
|
||||||
const repos = await getAllProjectsFromOrg(
|
|
||||||
'os-data',
|
|
||||||
'main',
|
|
||||||
process.env.VITE_GITHUB_PAT
|
|
||||||
);
|
|
||||||
if (repos.failed.length > 0) console.log(repos.failed);
|
|
||||||
expect(repos.failed.length).toBe(0);
|
|
||||||
},
|
|
||||||
{ timeout: 100000 }
|
|
||||||
);
|
|
||||||
|
|
||||||
test(
|
|
||||||
'Test Gift-Data',
|
|
||||||
async () => {
|
|
||||||
const repos = await getAllProjectsFromOrg(
|
|
||||||
'gift-data',
|
|
||||||
'main',
|
|
||||||
process.env.VITE_GITHUB_PAT
|
|
||||||
);
|
|
||||||
if (repos.failed.length > 0) console.log(repos.failed);
|
|
||||||
expect(repos.failed.length).toBe(0);
|
|
||||||
},
|
|
||||||
{ timeout: 100000 }
|
|
||||||
);
|
|
||||||
|
|
||||||
test(
|
|
||||||
'Test getting one dataset from github',
|
|
||||||
async () => {
|
|
||||||
const datapackage = await getProjectDataPackage(
|
|
||||||
'os-data',
|
|
||||||
'berlin-berlin',
|
|
||||||
'main',
|
|
||||||
process.env.VITE_GITHUB_PAT
|
|
||||||
);
|
|
||||||
const repo = await getProjectMetadata(
|
|
||||||
'os-data',
|
|
||||||
'berlin-berlin',
|
|
||||||
process.env.VITE_GITHUB_PAT
|
|
||||||
);
|
|
||||||
const project = loadDataPackage(datapackage, repo);
|
|
||||||
delete project['datapackage'];
|
|
||||||
delete project.files[0]['dialect'];
|
|
||||||
delete project.files[0]['schema'];
|
|
||||||
expect(project).toStrictEqual({
|
|
||||||
name: 'berlin-berlin',
|
|
||||||
title: 'Berlin-Berlin',
|
|
||||||
description: null,
|
|
||||||
owner: {
|
|
||||||
name: 'os-data',
|
|
||||||
logo: 'https://avatars.githubusercontent.com/u/13695166?v=4',
|
|
||||||
title: 'os-data',
|
|
||||||
},
|
|
||||||
repo: {
|
|
||||||
name: 'berlin-berlin',
|
|
||||||
full_name: 'os-data/berlin-berlin',
|
|
||||||
url: 'https://github.com/os-data/berlin-berlin',
|
|
||||||
},
|
|
||||||
files: [
|
|
||||||
{
|
|
||||||
name: 'berlin-gesamt',
|
|
||||||
format: 'csv',
|
|
||||||
path: 'https://storage.openspending.org/berlin-berlin/berlin-gesamt.csv',
|
|
||||||
mediatype: 'text/csv',
|
|
||||||
bytes: 81128743,
|
|
||||||
encoding: 'utf-8',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
author: 'Michael Peters <michael.peters@okfn.de>',
|
|
||||||
cityCode: 'Berlin',
|
|
||||||
countryCode: 'DE',
|
|
||||||
fiscalPeriod: { start: '2014-01-01', end: '2019-12-31' },
|
|
||||||
readme: '',
|
|
||||||
});
|
|
||||||
},
|
|
||||||
{ timeout: 100000 }
|
|
||||||
);
|
|
||||||
|
|
||||||
test(
|
|
||||||
'Test getting one section of csv from R2',
|
|
||||||
async () => {
|
|
||||||
const rawCsv = await getCsv(
|
|
||||||
'https://storage.openspending.org/state-of-minas-gerais-brazil-planned-budget/__os_imported__br-mg-ppagloc.csv'
|
|
||||||
);
|
|
||||||
const parsedCsv = await parseCsv(rawCsv);
|
|
||||||
expect(parsedCsv.errors.length).toBe(1);
|
|
||||||
expect(parsedCsv.data.length).toBe(10165);
|
|
||||||
expect(parsedCsv.meta.fields).toStrictEqual([
|
|
||||||
'function_name',
|
|
||||||
'function_label',
|
|
||||||
'product_name',
|
|
||||||
'product_label',
|
|
||||||
'area_name',
|
|
||||||
'area_label',
|
|
||||||
'subaction_name',
|
|
||||||
'subaction_label',
|
|
||||||
'region_label_map',
|
|
||||||
'region_reg_map',
|
|
||||||
'region_name',
|
|
||||||
'region_label',
|
|
||||||
'municipality_map_id',
|
|
||||||
'municipality_name',
|
|
||||||
'municipality_map_code',
|
|
||||||
'municipality_label',
|
|
||||||
'municipality_map_name_simple',
|
|
||||||
'municipality_map_name',
|
|
||||||
'cofog1_label_en',
|
|
||||||
'cofog1_name',
|
|
||||||
'cofog1_label',
|
|
||||||
'amount',
|
|
||||||
'subprogramme_name',
|
|
||||||
'subprogramme_label',
|
|
||||||
'time_name',
|
|
||||||
'time_year',
|
|
||||||
'time_month',
|
|
||||||
'time_day',
|
|
||||||
'time_week',
|
|
||||||
'time_yearmonth',
|
|
||||||
'time_quarter',
|
|
||||||
'time',
|
|
||||||
'action_name',
|
|
||||||
'action_label',
|
|
||||||
'subfunction_name',
|
|
||||||
'subfunction_label',
|
|
||||||
'programme_name',
|
|
||||||
'programme_label',
|
|
||||||
]);
|
|
||||||
},
|
|
||||||
{ timeout: 100000 }
|
|
||||||
);
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
import Link from 'next/link';
|
|
||||||
import clsx from 'clsx';
|
|
||||||
|
|
||||||
export function Button({ href, className = '', ...props }) {
|
|
||||||
className = clsx(
|
|
||||||
'inline-flex justify-center rounded-2xl bg-emerald-600 p-4 text-base font-semibold text-white hover:bg-emerald-500 focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-emerald-500 active:text-white/70',
|
|
||||||
className
|
|
||||||
);
|
|
||||||
|
|
||||||
return href ? (
|
|
||||||
<Link scroll={false} href={href} className={className} {...props} />
|
|
||||||
) : (
|
|
||||||
<button className={className} {...props} />
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
import clsx from 'clsx'
|
|
||||||
|
|
||||||
export function Container({ className = "", ...props }) {
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
className={clsx('mx-auto max-w-7xl px-4 sm:px-6 lg:px-8', className)}
|
|
||||||
{...props}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
import Link from 'next/link';
|
|
||||||
import { Project } from '../lib/project.interface';
|
|
||||||
import ExternalLinkIcon from './icons/ExternalLinkIcon';
|
|
||||||
|
|
||||||
export default function DatasetCard({ dataset }: { dataset: Project }) {
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
key={dataset.name}
|
|
||||||
className="overflow-hidden rounded-xl border border-gray-200"
|
|
||||||
>
|
|
||||||
<Link
|
|
||||||
href={`/@${dataset.owner.name}/${dataset.repo.name}`}
|
|
||||||
className="flex items-center gap-x-4 border-b border-gray-900/5 bg-gray-50 p-6"
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
src={dataset.owner.logo || '/assets/org-icon.svg'}
|
|
||||||
alt={dataset.owner.name}
|
|
||||||
className="h-12 w-12 flex-none rounded-lg bg-white object-cover ring-1 ring-gray-900/10 p-2"
|
|
||||||
/>
|
|
||||||
<div className="text-sm font-medium leading-6">
|
|
||||||
<div className="text-gray-900 line-clamp-1">{dataset.title}</div>
|
|
||||||
<div className="text-gray-500 line-clamp-1">
|
|
||||||
{dataset.owner.title}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</Link>
|
|
||||||
<dl className="-my-3 divide-y divide-gray-100 px-6 py-4 text-sm leading-6">
|
|
||||||
<div className="flex justify-between gap-x-4 py-3">
|
|
||||||
<dt className="text-gray-500">Name</dt>
|
|
||||||
<dd className="flex items-start gap-x-2">
|
|
||||||
<div className="font-medium text-gray-900 line-clamp-1">
|
|
||||||
{dataset.name}
|
|
||||||
</div>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<div className="flex justify-between gap-x-4 py-3">
|
|
||||||
<dt className="text-gray-500">Country</dt>
|
|
||||||
<dd className="flex items-start gap-x-2">
|
|
||||||
<div className="font-medium text-gray-900">
|
|
||||||
{dataset.countryCode}
|
|
||||||
</div>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<div className="flex justify-between gap-x-4 py-3">
|
|
||||||
<dt className="text-gray-500">Fiscal Period</dt>
|
|
||||||
<dd className="text-gray-700">
|
|
||||||
{dataset.fiscalPeriod?.start &&
|
|
||||||
new Date(dataset.fiscalPeriod.start).getFullYear()}
|
|
||||||
{dataset.fiscalPeriod?.end &&
|
|
||||||
dataset.fiscalPeriod?.start !== dataset.fiscalPeriod?.end && (
|
|
||||||
<>
|
|
||||||
{' - '}
|
|
||||||
{new Date(dataset.fiscalPeriod.end).getFullYear()}
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<div className="flex justify-between gap-x-4 py-3">
|
|
||||||
<dt className="text-gray-500">Metadata</dt>
|
|
||||||
<dd className="flex items-start gap-x-2">
|
|
||||||
<div className="font-medium text-gray-900">
|
|
||||||
<Link
|
|
||||||
// TODO: this link may be incorrect for some datasets
|
|
||||||
href={`https://github.com/${dataset.owner.name}/${dataset.repo.name}/blob/main/datapackage.json`}
|
|
||||||
target="_blank"
|
|
||||||
className="flex items-center hover:text-gray-700"
|
|
||||||
>
|
|
||||||
datapackage.json <ExternalLinkIcon className="ml-1" />
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
import { Project } from '../lib/project.interface';
|
|
||||||
import DatasetCard from './DatasetCard';
|
|
||||||
|
|
||||||
export default function DatasetsGrid({ datasets }: { datasets: Project[] }) {
|
|
||||||
return (
|
|
||||||
<ul
|
|
||||||
className="grid gap-x-6 gap-y-8 grid-cols-1 sm:grid-cols-2 md:grid-cols-3"
|
|
||||||
role="list"
|
|
||||||
>
|
|
||||||
{datasets.map((dataset, idx) => {
|
|
||||||
return (
|
|
||||||
<li key={`datasets-grid-item-${idx}`}>
|
|
||||||
<DatasetCard dataset={dataset} />
|
|
||||||
</li>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</ul>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,225 +0,0 @@
|
|||||||
import { useForm } from 'react-hook-form';
|
|
||||||
import DatasetsGrid from './DatasetsGrid';
|
|
||||||
import { Project } from '../lib/project.interface';
|
|
||||||
import { Index } from 'flexsearch';
|
|
||||||
import {
|
|
||||||
ChevronDoubleLeftIcon,
|
|
||||||
ChevronDoubleRightIcon,
|
|
||||||
ChevronLeftIcon,
|
|
||||||
ChevronRightIcon,
|
|
||||||
} from '@heroicons/react/24/solid';
|
|
||||||
import { useState } from 'react';
|
|
||||||
|
|
||||||
export default function DatasetsSearch({
|
|
||||||
datasets,
|
|
||||||
availableCountries,
|
|
||||||
}: {
|
|
||||||
datasets: Project[];
|
|
||||||
availableCountries;
|
|
||||||
}) {
|
|
||||||
const itemsPerPage = 6;
|
|
||||||
const [page, setPage] = useState(1);
|
|
||||||
|
|
||||||
const index = new Index({ tokenize: 'full' });
|
|
||||||
|
|
||||||
datasets.forEach((dataset: Project) =>
|
|
||||||
index.add(
|
|
||||||
dataset.name,
|
|
||||||
`${dataset.repo} ${dataset.name} ${dataset.title} ${dataset.author} ${dataset.title} ${dataset.cityCode} ${dataset.fiscalPeriod?.start} ${dataset.fiscalPeriod?.end}`
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
const { register, watch, handleSubmit, reset, resetField } = useForm({
|
|
||||||
defaultValues: {
|
|
||||||
searchTerm: '',
|
|
||||||
country: '',
|
|
||||||
minDate: '',
|
|
||||||
maxDate: '',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const filteredDatasets = datasets
|
|
||||||
.filter((dataset: Project) =>
|
|
||||||
watch().searchTerm && watch().searchTerm !== ''
|
|
||||||
? index.search(watch().searchTerm).includes(dataset.name)
|
|
||||||
: true
|
|
||||||
)
|
|
||||||
.filter((dataset) =>
|
|
||||||
watch().country && watch().country !== ''
|
|
||||||
? dataset.countryCode === watch().country
|
|
||||||
: true
|
|
||||||
)
|
|
||||||
.filter((dataset) => {
|
|
||||||
const filterMinDate = watch().minDate;
|
|
||||||
const filterMaxDate = watch().maxDate;
|
|
||||||
|
|
||||||
const datasetMinDate = dataset.fiscalPeriod?.start;
|
|
||||||
const datasetMaxDate = dataset.fiscalPeriod?.end;
|
|
||||||
|
|
||||||
let datasetStartOverlaps = false;
|
|
||||||
if (datasetMinDate) {
|
|
||||||
datasetStartOverlaps =
|
|
||||||
datasetMinDate >= filterMinDate && datasetMinDate <= filterMaxDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
let datasetEndOverlaps = false;
|
|
||||||
if (datasetMaxDate) {
|
|
||||||
datasetEndOverlaps =
|
|
||||||
datasetMaxDate >= filterMinDate && datasetMaxDate <= filterMaxDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (filterMinDate && filterMaxDate) {
|
|
||||||
return datasetStartOverlaps || datasetEndOverlaps;
|
|
||||||
} else if (filterMinDate) {
|
|
||||||
return datasetMinDate >= filterMinDate;
|
|
||||||
} else if (filterMaxDate) {
|
|
||||||
return datasetMinDate <= filterMaxDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
|
|
||||||
const paginatedDatasets = filteredDatasets.slice(
|
|
||||||
(page - 1) * itemsPerPage,
|
|
||||||
(page - 1) * itemsPerPage + itemsPerPage
|
|
||||||
);
|
|
||||||
|
|
||||||
const pageCount = Math.ceil(filteredDatasets.length / itemsPerPage) || 1;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<div className="flex flex-col gap-3 sm:flex-row">
|
|
||||||
<div className="min-w-0 flex-auto">
|
|
||||||
<br />
|
|
||||||
<div className="relative">
|
|
||||||
<input
|
|
||||||
placeholder="Search datasets"
|
|
||||||
aria-label="Search datasets"
|
|
||||||
{...register('searchTerm', { onChange: () => setPage(1) })}
|
|
||||||
className="h-[3em] relative w-full rounded-lg bg-white py-2 pl-3 pr-10 text-left shadow-md focus:outline-none focus-visible:border-emerald-500 focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-emerald-400 sm:text-sm"
|
|
||||||
/>
|
|
||||||
{watch().searchTerm !== '' && (
|
|
||||||
<button
|
|
||||||
onClick={() => resetField('searchTerm')}
|
|
||||||
className="absolute right-3 top-1/2 -translate-y-1/2 text-gray-500"
|
|
||||||
>
|
|
||||||
<CloseIcon />
|
|
||||||
</button>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="sm:basis-1/6">
|
|
||||||
{/* TODO: nicer select e.g. headlessui example */}
|
|
||||||
<label className="text-sm text-gray-600 font-medium">Country</label>
|
|
||||||
<select
|
|
||||||
className="h-[3em] w-full rounded-lg bg-white py-2 pl-3 pr-10 text-left shadow-md focus:outline-none focus-visible:border-emerald-500 focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-emerald-400 sm:text-sm"
|
|
||||||
{...register('country', { onChange: () => setPage(1) })}
|
|
||||||
>
|
|
||||||
<option value="">All</option>
|
|
||||||
{availableCountries.map((country) => {
|
|
||||||
return (
|
|
||||||
<option key={country.code} value={country.code}>
|
|
||||||
{country.title}
|
|
||||||
</option>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div className="sm:basis-1/6">
|
|
||||||
<label className="text-sm text-gray-600 font-medium">
|
|
||||||
Fiscal Period Start
|
|
||||||
</label>
|
|
||||||
<div className="relative">
|
|
||||||
<input
|
|
||||||
aria-label="Min. date"
|
|
||||||
type="date"
|
|
||||||
{...register('minDate', { onChange: () => setPage(1) })}
|
|
||||||
className="h-[3em] w-full rounded-lg bg-white py-2 pl-3 pr-10 text-left shadow-md focus:outline-none focus-visible:border-emerald-500 focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-emerald-400 sm:text-sm"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="sm:basis-1/6">
|
|
||||||
<label className="text-sm text-gray-600 font-medium">
|
|
||||||
Fiscal Period End
|
|
||||||
</label>
|
|
||||||
<div className="relative">
|
|
||||||
<input
|
|
||||||
aria-label="Max. date"
|
|
||||||
type="date"
|
|
||||||
{...register('maxDate', { onChange: () => setPage(1) })}
|
|
||||||
className="h-[3em] w-full rounded-lg bg-white py-2 pl-3 pr-10 text-left shadow-md focus:outline-none focus-visible:border-emerald-500 focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-emerald-400 sm:text-sm"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="mt-5 mb-5">
|
|
||||||
<span className="text-lg font-medium">
|
|
||||||
{filteredDatasets.length} datasets found
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div className="min-w-full align-middle">
|
|
||||||
<DatasetsGrid datasets={paginatedDatasets} />
|
|
||||||
<div className="w-full flex justify-center mt-10">
|
|
||||||
<button
|
|
||||||
onClick={() => setPage(1)}
|
|
||||||
disabled={page <= 1}
|
|
||||||
className="disabled:text-gray-400"
|
|
||||||
>
|
|
||||||
<ChevronDoubleLeftIcon className="w-6 h-6" />
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
onClick={() => {
|
|
||||||
if (page > 1) setPage((prev) => --prev);
|
|
||||||
}}
|
|
||||||
disabled={page <= 1}
|
|
||||||
className="disabled:text-gray-400"
|
|
||||||
>
|
|
||||||
<ChevronLeftIcon className="w-6 h-6" />
|
|
||||||
</button>
|
|
||||||
<span className="mx-5">
|
|
||||||
Page {page} of {pageCount}
|
|
||||||
</span>
|
|
||||||
<button
|
|
||||||
onClick={() => {
|
|
||||||
if (page < pageCount) setPage((prev) => ++prev);
|
|
||||||
}}
|
|
||||||
disabled={page >= pageCount}
|
|
||||||
className="disabled:text-gray-400"
|
|
||||||
>
|
|
||||||
<ChevronRightIcon className="w-6 h-6" />
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
onClick={() => setPage(pageCount)}
|
|
||||||
disabled={page >= pageCount}
|
|
||||||
className="disabled:text-gray-400"
|
|
||||||
>
|
|
||||||
<ChevronDoubleRightIcon className="w-6 h-6" />
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const CloseIcon = () => {
|
|
||||||
return (
|
|
||||||
<svg
|
|
||||||
width={20}
|
|
||||||
height={20}
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<g id="Menu / Close_MD">
|
|
||||||
<path
|
|
||||||
id="Vector"
|
|
||||||
d="M18 18L12 12M12 12L6 6M12 12L18 6M12 12L6 18"
|
|
||||||
stroke="currentColor"
|
|
||||||
strokeWidth="2"
|
|
||||||
strokeLinecap="round"
|
|
||||||
strokeLinejoin="round"
|
|
||||||
/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,94 +0,0 @@
|
|||||||
import {
|
|
||||||
QueryClient,
|
|
||||||
QueryClientProvider,
|
|
||||||
useQuery,
|
|
||||||
useQueryClient,
|
|
||||||
} from 'react-query';
|
|
||||||
import Papa from 'papaparse';
|
|
||||||
import { Grid } from '@githubocto/flat-ui';
|
|
||||||
|
|
||||||
const queryClient = new QueryClient();
|
|
||||||
|
|
||||||
export async function getCsv(url: string) {
|
|
||||||
const response = await fetch(url, {
|
|
||||||
headers: {
|
|
||||||
Range: 'bytes=0-5132288',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const data = await response.text();
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function parseCsv(file: string): Promise<any> {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
Papa.parse(file, {
|
|
||||||
header: true,
|
|
||||||
dynamicTyping: true,
|
|
||||||
skipEmptyLines: true,
|
|
||||||
transform: (value: string): string => {
|
|
||||||
return value.trim();
|
|
||||||
},
|
|
||||||
complete: (results: any) => {
|
|
||||||
return resolve(results);
|
|
||||||
},
|
|
||||||
error: (error: any) => {
|
|
||||||
return reject(error);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const Spinning = () => {
|
|
||||||
return (
|
|
||||||
<div role="status w-fit mx-auto">
|
|
||||||
<svg
|
|
||||||
aria-hidden="true"
|
|
||||||
className="w-8 h-8 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-emerald-600"
|
|
||||||
viewBox="0 0 100 101"
|
|
||||||
fill="none"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
|
|
||||||
fill="currentColor"
|
|
||||||
/>
|
|
||||||
<path
|
|
||||||
d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
|
|
||||||
fill="currentFill"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
<span className="sr-only">Loading...</span>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const FlatUiTable: React.FC<{ url: string }> = ({ url }) => {
|
|
||||||
return (
|
|
||||||
// Provide the client to your App
|
|
||||||
<QueryClientProvider client={queryClient}>
|
|
||||||
<TableInner url={url} />
|
|
||||||
</QueryClientProvider>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const TableInner: React.FC<{ url: string }> = ({ url }) => {
|
|
||||||
const { data: csvString, isLoading: isDownloadingCSV } = useQuery(
|
|
||||||
['dataCsv', url],
|
|
||||||
() => getCsv(url)
|
|
||||||
);
|
|
||||||
const { data: parsedData, isLoading: isParsing } = useQuery(
|
|
||||||
['dataPreview', csvString],
|
|
||||||
() => parseCsv(csvString),
|
|
||||||
{ enabled: !!csvString }
|
|
||||||
);
|
|
||||||
if (isParsing || isDownloadingCSV)
|
|
||||||
<div className="w-full">
|
|
||||||
<Spinning />
|
|
||||||
</div>;
|
|
||||||
if (parsedData)
|
|
||||||
return (
|
|
||||||
<div className="h-[500px] w-full">
|
|
||||||
<Grid data={parsedData.data} />
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
import Image from 'next/image';
|
|
||||||
import { Container } from './Container';
|
|
||||||
import logo from '../public/logo.svg';
|
|
||||||
import Link from 'next/link';
|
|
||||||
import { useRouter } from 'next/router';
|
|
||||||
import { Bars3Icon } from '@heroicons/react/24/outline';
|
|
||||||
import { useState } from 'react';
|
|
||||||
|
|
||||||
export function Header() {
|
|
||||||
const [menuOpen, setMenuOpen] = useState<boolean>(false);
|
|
||||||
|
|
||||||
const router = useRouter();
|
|
||||||
|
|
||||||
const isActive = (navLink) => {
|
|
||||||
return router.asPath.split('?')[0] == navLink.href;
|
|
||||||
};
|
|
||||||
|
|
||||||
const navLinks = [
|
|
||||||
{
|
|
||||||
title: 'Home',
|
|
||||||
href: '/',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Datasets',
|
|
||||||
href: '/#datasets',
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// title: "Community",
|
|
||||||
// href: "https://community.openspending.org/"
|
|
||||||
// }
|
|
||||||
];
|
|
||||||
|
|
||||||
return (
|
|
||||||
<header className="relative z-50 pb-11 lg:pt-11">
|
|
||||||
<Container className="flex flex-wrap items-center justify-between lg:flex-nowrap mt-10 lg:mt-0">
|
|
||||||
<Link href="/" className="lg:mt-0 lg:grow lg:basis-0 flex items-center">
|
|
||||||
<Image src={logo} alt="OpenSpending" className="h-12 w-auto" />
|
|
||||||
</Link>
|
|
||||||
<ul className="hidden list-none sm:flex gap-x-5 text-base font-medium">
|
|
||||||
{navLinks.map((link, i) => (
|
|
||||||
<li key={`nav-link-${i}`}>
|
|
||||||
<Link
|
|
||||||
className={`text-emerald-900 hover:text-emerald-600 ${
|
|
||||||
isActive(link) ? 'text-emerald-600' : ''
|
|
||||||
}`}
|
|
||||||
href={link.href}
|
|
||||||
scroll={false}
|
|
||||||
>
|
|
||||||
{link.title}
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
))}
|
|
||||||
</ul>
|
|
||||||
<div className="hidden xl:block xl:grow"></div>
|
|
||||||
<div className="sm:hidden sm:mt-10 lg:mt-0 lg:grow lg:basis-0 lg:justify-end">
|
|
||||||
<button onClick={() => setMenuOpen(!menuOpen)}>
|
|
||||||
<Bars3Icon className="w-8 h-8" />
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
{menuOpen && (
|
|
||||||
<div className={`sm:hidden basis-full mt-5 text-center`}>
|
|
||||||
<ul className="gap-x-5 text-base font-medium">
|
|
||||||
{navLinks.map((link, i) => (
|
|
||||||
<li key={`nav-link-${i}`}>
|
|
||||||
<Link
|
|
||||||
className={`text-emerald-900 hover:text-emerald-600 ${
|
|
||||||
isActive(link) ? 'text-emerald-600' : ''
|
|
||||||
}`}
|
|
||||||
href={link.href}
|
|
||||||
scroll={false}
|
|
||||||
>
|
|
||||||
{link.title}
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
))}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</Container>
|
|
||||||
</header>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
import { Button } from './Button';
|
|
||||||
import { Container } from './Container';
|
|
||||||
|
|
||||||
export function Hero({ countriesCount, datasetsCount, filesCount }) {
|
|
||||||
return (
|
|
||||||
<div className="relative pb-20 pt-10 sm:py-40" id="hero">
|
|
||||||
<div className="absolute inset-x-0 -bottom-14 -top-48 overflow-hidden bg-green-50 bg-opacity-50">
|
|
||||||
<div className="absolute inset-x-0 top-0 h-40 bg-gradient-to-b from-white" />
|
|
||||||
<div className="absolute inset-x-0 bottom-0 h-40 bg-gradient-to-t from-white" />
|
|
||||||
</div>
|
|
||||||
<Container className="relative">
|
|
||||||
<div className="mx-auto max-w-2xl lg:max-w-4xl lg:px-12">
|
|
||||||
<h1 className="font-display text-5xl font-bold tracking-tighter text-emerald-600 sm:text-7xl">
|
|
||||||
It's our money!
|
|
||||||
</h1>
|
|
||||||
<div className="mt-6 space-y-6 font-display text-2xl tracking-tight text-emerald-900">
|
|
||||||
<p>
|
|
||||||
By understanding how governments spend money in our name can we
|
|
||||||
have a say in how that money will affect our own lives. The
|
|
||||||
journey starts here.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
OpenSpending is a free, open and global platform to search,
|
|
||||||
visualise and analyse fiscal data in the public sphere.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<Button href="#datasets" className="mt-10">
|
|
||||||
Search datasets
|
|
||||||
</Button>
|
|
||||||
<dl className="mt-10 grid grid-cols-2 gap-x-10 gap-y-6 sm:mt-16 sm:gap-x-16 sm:gap-y-10 sm:text-center lg:auto-cols-auto lg:grid-flow-col lg:grid-cols-none lg:justify-start lg:text-left">
|
|
||||||
{[
|
|
||||||
// Added the plus sign because some datasets do not
|
|
||||||
// contain defined countries
|
|
||||||
['Countries', '+' + countriesCount],
|
|
||||||
['Datasets', datasetsCount],
|
|
||||||
['Files', filesCount],
|
|
||||||
].map(([name, value]) => (
|
|
||||||
<div key={name}>
|
|
||||||
<dt className="font-mono text-sm text-emerald-600">{name}</dt>
|
|
||||||
<dd className="mt-0.5 text-2xl font-semibold tracking-tight text-emerald-900">
|
|
||||||
{value}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
</Container>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
import Link from "next/link";
|
|
||||||
import HomeIcon from "../icons/HomeIcon";
|
|
||||||
|
|
||||||
export default function Breadcrumbs({ links }: { links: { title: string, href?: string, target?: string }[] }) {
|
|
||||||
const current = links.at(-1);
|
|
||||||
|
|
||||||
return <div className="flex items-center uppercase font-black text-xs">
|
|
||||||
<Link className="flex items-center" href='/'><HomeIcon /></Link>
|
|
||||||
|
|
||||||
{/* {links.length > 1 && links.slice(0, -1).map((link) => {
|
|
||||||
return <>
|
|
||||||
<span className="mx-4">/</span>
|
|
||||||
<Link href={link.href}>{link.title}</Link>
|
|
||||||
</>
|
|
||||||
})} */}
|
|
||||||
|
|
||||||
<span className="mx-4">/</span>
|
|
||||||
<span>{current.title}</span>
|
|
||||||
</div >
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
import { Header } from '../Header';
|
|
||||||
|
|
||||||
export default function Layout({ children }) {
|
|
||||||
return (
|
|
||||||
<div className="bg-white min-h-screen pb-32">
|
|
||||||
<Header />
|
|
||||||
{children}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
export default function ExternalLinkIcon({ className = "" }) {
|
|
||||||
return <div className={`inline-block w-4 ${className}`}><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" fill="currentColor"><path d="M 40 10 C 38.896 10 38 10.896 38 12 C 38 13.104 38.896 14 40 14 L 47.171875 14 L 30.585938 30.585938 C 29.804938 31.366938 29.804938 32.633063 30.585938 33.414062 C 30.976938 33.805063 31.488 34 32 34 C 32.512 34 33.023063 33.805062 33.414062 33.414062 L 50 16.828125 L 50 24 C 50 25.104 50.896 26 52 26 C 53.104 26 54 25.104 54 24 L 54 12 C 54 10.896 53.104 10 52 10 L 40 10 z M 18 12 C 14.691 12 12 14.691 12 18 L 12 46 C 12 49.309 14.691 52 18 52 L 46 52 C 49.309 52 52 49.309 52 46 L 52 34 C 52 32.896 51.104 32 50 32 C 48.896 32 48 32.896 48 34 L 48 46 C 48 47.103 47.103 48 46 48 L 18 48 C 16.897 48 16 47.103 16 46 L 16 18 C 16 16.897 16.897 16 18 16 L 30 16 C 31.104 16 32 15.104 32 14 C 32 12.896 31.104 12 30 12 L 18 12 z"/></svg></div>
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
export default function HomeIcon({ className = "" }) {
|
|
||||||
return <div className={`inline-block w-4 ${className}`}><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <path d="M 12 2 A 1 1 0 0 0 11.289062 2.296875 L 1.203125 11.097656 A 0.5 0.5 0 0 0 1 11.5 A 0.5 0.5 0 0 0 1.5 12 L 4 12 L 4 20 C 4 20.552 4.448 21 5 21 L 9 21 C 9.552 21 10 20.552 10 20 L 10 14 L 14 14 L 14 20 C 14 20.552 14.448 21 15 21 L 19 21 C 19.552 21 20 20.552 20 20 L 20 12 L 22.5 12 A 0.5 0.5 0 0 0 23 11.5 A 0.5 0.5 0 0 0 22.796875 11.097656 L 12.716797 2.3027344 A 1 1 0 0 0 12.710938 2.296875 A 1 1 0 0 0 12 2 z"/></svg></div>
|
|
||||||
}
|
|
||||||
@@ -1,289 +0,0 @@
|
|||||||
/**
|
|
||||||
* Fiscal Data Package is a simple specification for data access and delivery of fiscal data.
|
|
||||||
*/
|
|
||||||
export type FiscalDataPackage = TabularDataPackage & {
|
|
||||||
countryCode?: ISO31661Alpha2CountryCode
|
|
||||||
regionCode?: string
|
|
||||||
cityCode?: string
|
|
||||||
author?: string
|
|
||||||
readme?: string
|
|
||||||
granularity?: GranularityOfResources
|
|
||||||
fiscalPeriod?: FiscalPeriodForTheBudget
|
|
||||||
[k: string]: unknown
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* The profile of this descriptor.
|
|
||||||
*/
|
|
||||||
export type Profile = "tabular-data-package"
|
|
||||||
/**
|
|
||||||
* An identifier string. Lower case characters with `.`, `_`, `-` and `/` are allowed.
|
|
||||||
*/
|
|
||||||
export type Name = string
|
|
||||||
/**
|
|
||||||
* A property reserved for globally unique identifiers. Examples of identifiers that are unique include UUIDs and DOIs.
|
|
||||||
*/
|
|
||||||
export type ID = string
|
|
||||||
/**
|
|
||||||
* A human-readable title.
|
|
||||||
*/
|
|
||||||
export type Title = string
|
|
||||||
/**
|
|
||||||
* A text description. Markdown is encouraged.
|
|
||||||
*/
|
|
||||||
export type Description = string
|
|
||||||
/**
|
|
||||||
* The home on the web that is related to this data package.
|
|
||||||
*/
|
|
||||||
export type HomePage = string
|
|
||||||
/**
|
|
||||||
* The datetime on which this descriptor was created.
|
|
||||||
*/
|
|
||||||
export type Created = string
|
|
||||||
/**
|
|
||||||
* The contributors to this descriptor.
|
|
||||||
*/
|
|
||||||
export type Contributors = [Contributor, ...Contributor[]]
|
|
||||||
/**
|
|
||||||
* A human-readable title.
|
|
||||||
*/
|
|
||||||
export type Title1 = string
|
|
||||||
/**
|
|
||||||
* A fully qualified URL, or a POSIX file path.
|
|
||||||
*/
|
|
||||||
export type Path = string
|
|
||||||
/**
|
|
||||||
* An email address.
|
|
||||||
*/
|
|
||||||
export type Email = string
|
|
||||||
/**
|
|
||||||
* An organizational affiliation for this contributor.
|
|
||||||
*/
|
|
||||||
export type Organization = string
|
|
||||||
/**
|
|
||||||
* A list of keywords that describe this package.
|
|
||||||
*/
|
|
||||||
export type Keywords = [string, ...string[]]
|
|
||||||
/**
|
|
||||||
* A image to represent this package.
|
|
||||||
*/
|
|
||||||
export type Image = string
|
|
||||||
/**
|
|
||||||
* The license(s) under which this package is published.
|
|
||||||
*/
|
|
||||||
export type Licenses = [License, ...License[]]
|
|
||||||
/**
|
|
||||||
* A license for this descriptor.
|
|
||||||
*/
|
|
||||||
export type License =
|
|
||||||
| {
|
|
||||||
[k: string]: unknown
|
|
||||||
}
|
|
||||||
| {
|
|
||||||
[k: string]: unknown
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* An `array` of Tabular Data Resource objects, each compliant with the [Tabular Data Resource](/tabular-data-resource/) specification.
|
|
||||||
*
|
|
||||||
/**
|
|
||||||
* A Tabular Data Resource.
|
|
||||||
*/
|
|
||||||
export interface TabularDataResource {
|
|
||||||
format?: string;
|
|
||||||
name: string;
|
|
||||||
description?: string;
|
|
||||||
title?: string;
|
|
||||||
schema?: Schema;
|
|
||||||
sample?: any[];
|
|
||||||
profile?: string;
|
|
||||||
key?: string;
|
|
||||||
path?: string;
|
|
||||||
size?: number;
|
|
||||||
bytes?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Field {
|
|
||||||
name: string;
|
|
||||||
type: FieldType;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Schema {
|
|
||||||
fields: Field[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export const OptionsFields = [
|
|
||||||
"any",
|
|
||||||
"array",
|
|
||||||
"boolean",
|
|
||||||
"date",
|
|
||||||
"datetime",
|
|
||||||
"duration",
|
|
||||||
"geojson",
|
|
||||||
"geopoint",
|
|
||||||
"integer",
|
|
||||||
"number",
|
|
||||||
"object",
|
|
||||||
"string",
|
|
||||||
"time",
|
|
||||||
"year",
|
|
||||||
"yearmonth",
|
|
||||||
] as const;
|
|
||||||
|
|
||||||
type FieldType = typeof OptionsFields[number];
|
|
||||||
/**
|
|
||||||
* A human-readable title.
|
|
||||||
*/
|
|
||||||
export type Title2 = string
|
|
||||||
/**
|
|
||||||
* A fully qualified URL, or a POSIX file path.
|
|
||||||
*/
|
|
||||||
export type Path1 = string
|
|
||||||
/**
|
|
||||||
* An email address.
|
|
||||||
*/
|
|
||||||
export type Email1 = string
|
|
||||||
/**
|
|
||||||
* The raw sources for this resource.
|
|
||||||
*/
|
|
||||||
export type Sources = Source[]
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A keyword that represents the direction of the spend, either expenditure or revenue.
|
|
||||||
*/
|
|
||||||
export type DirectionOfTheSpending = "expenditure" | "revenue"
|
|
||||||
/**
|
|
||||||
* A keyword that represents the phase of the data, can be proposed for a budget proposal, approved for an approved budget, adjusted for modified budget or executed for the enacted budget
|
|
||||||
*/
|
|
||||||
export type BudgetPhase = "proposed" | "approved" | "adjusted" | "executed"
|
|
||||||
/**
|
|
||||||
* Either an array of strings corresponding to the name attributes in a set of field objects in the fields array or a single string corresponding to one of these names. The value of primaryKey indicates the primary key or primary keys for the dimension.
|
|
||||||
*/
|
|
||||||
export type PrimaryKey = string | [string, ...string[]]
|
|
||||||
/**
|
|
||||||
* Describes what kind of a dimension it is.
|
|
||||||
*/
|
|
||||||
export type DimensionType =
|
|
||||||
| "datetime"
|
|
||||||
| "entity"
|
|
||||||
| "classification"
|
|
||||||
| "activity"
|
|
||||||
| "fact"
|
|
||||||
| "location"
|
|
||||||
| "other"
|
|
||||||
/**
|
|
||||||
* The type of the classification.
|
|
||||||
*/
|
|
||||||
export type ClassificationType = "functional" | "administrative" | "economic"
|
|
||||||
/**
|
|
||||||
* A valid 2-digit ISO country code (ISO 3166-1 alpha-2), or, an array of valid ISO codes.
|
|
||||||
*/
|
|
||||||
export type ISO31661Alpha2CountryCode = string | [string, ...string[]]
|
|
||||||
/**
|
|
||||||
* A keyword that represents the type of spend data, eiter aggregated or transactional
|
|
||||||
*/
|
|
||||||
export type GranularityOfResources = "aggregated" | "transactional"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tabular Data Package
|
|
||||||
*/
|
|
||||||
export interface TabularDataPackage {
|
|
||||||
profile: Profile
|
|
||||||
name?: Name
|
|
||||||
id?: ID
|
|
||||||
title?: Title
|
|
||||||
description?: Description
|
|
||||||
homepage?: HomePage
|
|
||||||
created?: Created
|
|
||||||
contributors?: Contributors
|
|
||||||
keywords?: Keywords
|
|
||||||
image?: Image
|
|
||||||
licenses?: Licenses
|
|
||||||
resources: TabularDataResource[]
|
|
||||||
sources?: Sources
|
|
||||||
[k: string]: unknown
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* A contributor to this descriptor.
|
|
||||||
*/
|
|
||||||
export interface Contributor {
|
|
||||||
title: Title1
|
|
||||||
path?: Path
|
|
||||||
email?: Email
|
|
||||||
organization?: Organization
|
|
||||||
role?: string
|
|
||||||
[k: string]: unknown
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* A source file.
|
|
||||||
*/
|
|
||||||
export interface Source {
|
|
||||||
title: Title2
|
|
||||||
path?: Path1
|
|
||||||
email?: Email1
|
|
||||||
[k: string]: unknown
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Measures are numerical and correspond to financial amounts in the source data.
|
|
||||||
*/
|
|
||||||
export interface Measures {
|
|
||||||
[k: string]: Measure
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Measure.
|
|
||||||
*
|
|
||||||
* This interface was referenced by `Measures`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^\w+".
|
|
||||||
*/
|
|
||||||
export interface Measure {
|
|
||||||
source: string
|
|
||||||
resource?: string
|
|
||||||
currency: string
|
|
||||||
factor?: number
|
|
||||||
direction?: DirectionOfTheSpending
|
|
||||||
phase?: BudgetPhase
|
|
||||||
[k: string]: unknown
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Dimensions are groups of related fields. Dimensions cover all items other than the measure.
|
|
||||||
*/
|
|
||||||
export interface Dimensions {
|
|
||||||
[k: string]: Dimension
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Dimension.
|
|
||||||
*
|
|
||||||
* This interface was referenced by `Dimensions`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^\w+".
|
|
||||||
*/
|
|
||||||
export interface Dimension {
|
|
||||||
attributes: Attributes
|
|
||||||
primaryKey: PrimaryKey
|
|
||||||
dimensionType?: DimensionType
|
|
||||||
classificationType?: ClassificationType
|
|
||||||
[k: string]: unknown
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Attribute objects that make up the dimension
|
|
||||||
*/
|
|
||||||
export interface Attributes {
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `Attributes`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^\w+".
|
|
||||||
*/
|
|
||||||
[k: string]: {
|
|
||||||
source: string
|
|
||||||
resource?: string
|
|
||||||
constant?: string | number
|
|
||||||
parent?: string
|
|
||||||
labelfor?: string
|
|
||||||
[k: string]: unknown
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* The fiscal period of the dataset
|
|
||||||
*/
|
|
||||||
export interface FiscalPeriodForTheBudget {
|
|
||||||
start: string
|
|
||||||
end?: string
|
|
||||||
[k: string]: unknown
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
import { FiscalDataPackage } from './datapackage.interface';
|
|
||||||
import { Project } from './project.interface';
|
|
||||||
|
|
||||||
export function loadDataPackage(datapackage: FiscalDataPackage, repo): Project {
|
|
||||||
return {
|
|
||||||
name: datapackage.name,
|
|
||||||
title: datapackage.title,
|
|
||||||
description: datapackage.description || null,
|
|
||||||
owner: {
|
|
||||||
name: repo.owner.login,
|
|
||||||
logo: repo.owner.avatar_url,
|
|
||||||
// TODO: make this title work
|
|
||||||
title: repo.owner.login,
|
|
||||||
},
|
|
||||||
repo: { name: repo.name, full_name: repo.full_name, url: repo.html_url },
|
|
||||||
files: datapackage.resources,
|
|
||||||
author: datapackage.author ? datapackage.author : null,
|
|
||||||
cityCode: datapackage.cityCode ? datapackage.cityCode : null,
|
|
||||||
countryCode: datapackage.countryCode
|
|
||||||
? (datapackage.countryCode as string)
|
|
||||||
: null,
|
|
||||||
fiscalPeriod: datapackage.fiscalPeriod
|
|
||||||
? {
|
|
||||||
start: datapackage.fiscalPeriod.start
|
|
||||||
? datapackage.fiscalPeriod.start
|
|
||||||
: null,
|
|
||||||
end: datapackage.fiscalPeriod.end
|
|
||||||
? datapackage.fiscalPeriod.end
|
|
||||||
: null,
|
|
||||||
}
|
|
||||||
: null,
|
|
||||||
readme: datapackage.readme ? datapackage.readme : '',
|
|
||||||
datapackage,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user