From 817d3bbb68ab977d58cf548587b45139903f9f14 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Mon, 23 Nov 2020 17:51:04 +0100 Subject: Add frontend implementation --- frontend/package.json | 6 +- frontend/public/index.html | 4 +- frontend/src/app.css | 12 + frontend/src/app.js | 582 ++++++++++++++++++++++++++++++++++++++++++++- frontend/src/auth.js | 17 +- frontend/src/index.js | 40 +++- frontend/yarn.lock | 104 +++++++- 7 files changed, 738 insertions(+), 27 deletions(-) create mode 100644 frontend/src/app.css diff --git a/frontend/package.json b/frontend/package.json index ce00852..71801a3 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,5 +1,5 @@ { - "name": "inventory", + "name": "unmess", "version": "0.1.0", "private": true, "dependencies": { @@ -7,8 +7,10 @@ "@testing-library/react": "^11.1.0", "@testing-library/user-event": "^12.1.10", "bootstrap": "^4.5.3", + "luxon": "^1.25.0", "react": "^17.0.1", "react-bootstrap": "^1.4.0", + "react-bootstrap-typeahead": "^5.1.2", "react-dom": "^17.0.1", "react-jwt": "^1.0.7", "react-router-dom": "^5.2.0", @@ -38,5 +40,5 @@ "last 1 safari version" ] }, - "proxy": "http://inventory.localhost:5000" + "proxy": "http://unmess.localhost:5000" } diff --git a/frontend/public/index.html b/frontend/public/index.html index 4b00122..2bf0fff 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -5,10 +5,10 @@ - + - Inventory + Unmess diff --git a/frontend/src/app.css b/frontend/src/app.css new file mode 100644 index 0000000..78aca4a --- /dev/null +++ b/frontend/src/app.css @@ -0,0 +1,12 @@ +.card .breadcrumb { + padding: 0em; + background-color: inherit; +} + +@media (min-width: 576px) { + #root .card-deck .card, + #root .card-columns .card, + #root .card-group .card { + min-width: 20rem; + } +} diff --git a/frontend/src/app.js b/frontend/src/app.js index d445faa..d9be619 100644 --- a/frontend/src/app.js +++ b/frontend/src/app.js @@ -1,9 +1,381 @@ import React, { useContext } from 'react'; -import { Jumbotron } from 'react-bootstrap'; +import { Breadcrumb, Spinner, CardColumns, Card, Jumbotron, Row, Col, Form, Button } from 'react-bootstrap'; +import { Redirect, Link } from 'react-router-dom'; import { UserContext } from './auth.js'; +import { DateTime } from 'luxon'; +import { AsyncTypeahead } from 'react-bootstrap-typeahead'; +import './app.css'; -function UserHome() { - return 'user logged in'; +// Set parent on all node children +function set_children_parents(node) { + if (node.children) { + node.children.forEach(function(item) { + item.parent = node; + set_children_parents(item); + }); + } + return node; +} + +function Node(props) { + const node = props.node; + let change_datetime = null; + if (node.updated_at) { + const updated_at = node.updated_at ? DateTime.fromISO(node.updated_at).toLocal() : null; + change_datetime = Updated {updated_at.toRelative()}; + } else { + const created_at = DateTime.fromISO(node.created_at).toLocal(); + change_datetime = Created {created_at.toRelative()}; + } + let parents = []; + parents.push({node.name}); + //parents.push(
  • + // {node.name} + //
  • ); + for (let current = node.parent; current; current = current.parent) { + parents.push(
  • + {current.name} +
  • ); + } + if (parents.length > 1) { + parents.reverse(); + parents = {parents}; + } else { + parents = ''; + } + let children = ''; + if (node.children && node.children.length > 0) { + children = node.children.map(item => + + {item.name} + {item.children ? '+' : ''} + + ); + } + let fields = node.fields.map((field, index) => + + {field.name} + {field.value} + + ); + let buttons = ''; + if (props.editable) { + // Using Button here throws errors because of some navigation attribute, so just set the class names manually + buttons = <> + Edit + Delete + ; + } + return + + {change_datetime} + {buttons} + + + {parents} + {node.name} + + {fields} + + + + {children} + {props.editable ? Add : ''} + + ; +} + +class NodeEditor extends React.Component { + static contextType = UserContext; + constructor(props) { + super(props); + this.state = { + loading: false, + name: '', + errors: {}, + parent: '', + parent_id: null, + validated: false, + fields: [], + parents_searching: false, + parents: [], + redirect_id: null, + }; + if (props.location.state !== undefined) { + const node = props.location.state.node; + if (node !== undefined) { + this.state.id = node.id; + this.state.name = node.name; + this.state.parent = node.parent ? node.parent.name : ''; + this.state.parent_id = node.parent_id; + this.state.fields = [...node.fields]; + } + const parent = props.location.state.parent; + const parent_id = props.location.state.parent_id; + if (parent !== undefined && parent_id !== undefined) { + this.state.parent = parent; + this.state.parent_id = parent_id; + } + } + this.on_name_change = this.on_name_change.bind(this); + this.on_parent_change = this.on_parent_change.bind(this); + this.add_field = this.add_field.bind(this); + this.remove_field = this.remove_field.bind(this); + this.on_field_change = this.on_field_change.bind(this); + this.on_parents_search = this.on_parents_search.bind(this); + this.save = this.save.bind(this); + } + render() { + if (this.state.redirect_id !== null) { + return ; + } + if (this.state.loading) { + return + Loading… + ; + } + const that = this; + return
    +

    {this.title}

    +
    + + Name + + {this.state.errors.name} + + + Parent + true} + labelKey="name" + isLoading={this.state.parents_searching} + getSuggestionValue={value => value} + renderMenuItemChildren={(option, props) => (
    {option.name}
    )} + /> + {this.state.errors.parent} +
    + + Fields + {this.state.fields.map(function(field, index) { + return + + + {that.state.errors[`field-${index}-name`]} + + + + {that.state.errors[`field-${index}-value`]} + + + + + ; + })} + + + + + +
    +
    ; + } + on_name_change(event) { + this.setState({name: event.target.value}); + } + on_parent_change(items) { + let item = items[0] || {}; + this.setState({parent: item.name || '', parent_id: item.id || null}); + } + add_field(event) { + event.preventDefault(); + this.setState({fields: [...this.state.fields, {name: '', value: ''}], validated: false}); + } + remove_field(event) { + let fields = [...this.state.fields]; + fields.splice(event.target.dataset.index, 1); + this.setState({fields: fields, validated: false}); + } + on_field_change(event) { + const index = event.target.dataset.index; + let fields = [...this.state.fields]; + let field = {...this.state.fields[index]}; + field[event.target.dataset.field] = event.target.value; + fields[index] = field; + this.setState({fields: fields, validated: false}); + } + async on_parents_search(q) { + this.setState({parents_searching: true}); + let token = await this.context.get_token(); + let response = await fetch('/api/search', { + method: 'POST', + headers: { + 'Authorization': 'Bearer ' + token, + 'Content-Type': 'application/x-www-form-urlencoded', + }, + body: 'q=' + encodeURIComponent(q), + }); + let data = await response.json(); + this.setState({parents: data, parents_searching: false}); + } + validate() { + let errors = {}; + if (this.state.name === '') { + errors.name = 'Name must be specified'; + } + if (this.state.parent !== '' && this.state.parent_id === null) { + errors.parent = 'Parent must be empty or set to a valid value'; + } + this.state.fields.forEach(function(field, index) { + if (field.name === '') { + errors[`field-${index}-name`] = 'Name must be specified'; + } + if (field.value === '') { + errors[`field-${index}-value`] = 'Value must be specified'; + } + }); + this.setState({validated: true, errors: errors}); + // Clear existing errors + document.querySelectorAll('form :invalid').forEach(e => e.setCustomValidity('')); + for (let key in errors) { + document.getElementById(key).setCustomValidity(errors[key]); + } + if (errors.length > 0) { + return false; + } + return true; + } +} + +class ViewNode extends React.Component { + static contextType = UserContext; + constructor(props) { + super(props); + let node = null; + if (props.location.state !== undefined) { + node = props.location.state.node; + } + this.state = { + ready: node !== null, + node: node, + }; + this.mounted = false; + this.loading_id = null; + this.load_abort = null; + this.load_signal = null; + } + async componentDidMount() { + this.mounted = true; + try { + await this.load(); + } catch (error) { + if (!(error instanceof DOMException && error.code === 20)) { + throw error; + } + } + } + componentWillUnmount() { + this.mounted = false; + } + async componentDidUpdate() { + // Set and reload if we have received a new node in the location state + if (this.state.node !== null && this.props.location.state !== undefined && this.props.location.state.node !== null + && this.state.node.id !== this.props.location.state.node.id) { + this.setState({node: this.props.location.state.node}); + try { + await this.load(); + } catch (error) { + if (!(error instanceof DOMException && error.code === 20)) { + throw error; + } + } + } + // Load if the current node is not set, or if the node's id does not match the param id + if (this.state.node === null || this.props.match.params.id !== this.state.node.id) { + try { + await this.load(); + } catch (error) { + if (!(error instanceof DOMException && error.code === 20)) { + throw error; + } + } + } + } + render() { + if (!this.state.ready) { + return + Loading… + ; + } + return ; + } + async load() { + if (!this.mounted || this.loading_id === this.props.match.params.id) { + return; + } + if (this.load_abort !== null && !this.load_signal.aborted) { + this.load_abort.abort(); + } + let abort = this.load_abort = new AbortController(); + let signal = this.load_signal = abort.signal; + this.loading_id = this.props.match.params.id; + if (this.state.node === null && this.state.ready) { + this.setState({ready: false}); + } + const token = await this.context.get_token(); + let response = await fetch(`/api/nodes/${this.props.match.params.id}`, { + headers: { + Authorization: `Bearer ${token}`, + }, + signal: signal, + }); + const node = await response.json(); + if (signal.aborted) { + return; + } + set_children_parents(node); + if (this.mounted && node.id === this.props.match.params.id) { + this.setState({node: node, ready: true}); + } + } +} + +class UserHome extends React.Component { + static contextType = UserContext; + constructor(props) { + super(props); + this.state = { + ready: false, + nodes: [], + }; + } + async componentDidMount() { + const token = await this.context.get_token() + let response = await fetch('/api/nodes', { + headers: { + Authorization: `Bearer ${token}`, + } + }); + const nodes = await response.json(); + nodes.forEach(set_children_parents); + this.setState({nodes: nodes, ready: true}); + } + render() { + if (!this.state.ready) { + return + Loading… + ; + } + return + {this.state.nodes.map(item => )} + ; + } } function Main() { @@ -12,9 +384,209 @@ function Main() { return ; } return -

    Inventory

    +

    Unmess

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla pharetra fringilla dolor, sed tempor est. Maecenas malesuada feugiat nisl ut hendrerit. Donec faucibus augue quis mi fermentum, ac tempus neque dignissim. Nullam egestas bibendum enim, at feugiat lorem consectetur eu. Ut faucibus, dolor gravida ultricies malesuada, leo ex volutpat turpis, at placerat lectus mauris ut tortor. Phasellus sit amet lorem laoreet nunc sollicitudin pharetra. Pellentesque laoreet est lacinia velit porta aliquam ut quis sem. Sed vel convallis purus. Nunc elementum fermentum leo sit amet elementum.

    } -export default Main; +class AddNode extends NodeEditor { + componentDidMount() { + this.title = 'Add new item'; + } + async save(event) { + if (!this.validate()) { + return; + } + let node = { + name: this.state.name, + parent_id: this.state.parent_id, + fields: this.state.fields, + } + let token = await this.context.get_token(); + let response = await fetch('/api/nodes', { + method: 'POST', + headers: { + 'Authorization': 'Bearer ' + token, + 'Content-Type': 'application/json', + }, + body: JSON.stringify(node), + }); + let data = await response.json(); + if (!response.ok) { + window.flash({header: 'Add node', text: 'Adding node failed'}); + return; + } + this.setState({redirect_id: data.id}); + } +} + +class EditNode extends NodeEditor { + async componentDidMount() { + this.title = 'Edit item'; + if (this.state.name === '') { + this.setState({loading: true}); + this.load(); + } + } + async load() { + let token = await this.context.get_token(); + let response = await fetch(`/api/nodes/${this.props.match.params.id}`, { + method: 'GET', + headers: { + 'Authorization': 'Bearer ' + token, + }, + }); + if (!response.ok) { + window.flash({header: 'Edit node', text: 'Failed to load node'}); + return; + } + let node = await response.json(); + this.setState({ + loading: false, + id: node.id, + name: node.name, + parent: node.parent ? node.parent.name : '', + parent_id: node.parent_id, + fields: [...node.fields], + }); + } + async save(event) { + if (!this.validate()) { + return; + } + let node = { + name: this.state.name, + parent_id: this.state.parent_id, + fields: this.state.fields, + }; + let token = await this.context.get_token(); + let response = await fetch(`/api/nodes/${this.state.id}`, { + method: 'PUT', + headers: { + 'Authorization': 'Bearer ' + token, + 'Content-Type': 'application/json', + }, + body: JSON.stringify(node), + }); + if (!response.ok) { + window.flash({header: 'Edit node', text: 'Saving node failed'}); + return; + } + this.setState({redirect_id: this.state.id}); + } +} + +class DeleteNode extends React.Component { + static contextType = UserContext; + constructor(props) { + super(props); + let node = null; + if (props.location.state !== undefined) { + node = props.location.state.node; + } + this.state = { + node: node, + redirect: null, + }; + this.on_delete = this.on_delete.bind(this); + this.on_cancel = this.on_cancel.bind(this); + } + render() { + if (this.state.redirect) { + return ; + } + return
    + +

    Delete {this.state.node.name}

    +
    + + + + +
    ; + } + async on_delete() { + let path = '/'; + if (this.state.node.parent != null) { + path = `/node/${this.state.node.parent.id}`; + } + let token = await this.context.get_token(); + let response = await fetch(`/api/nodes/${this.state.node.id}`, { + method: 'DELETE', + headers: { + Authorization: `Bearer ${token}`, + }, + }); + if (!response.ok) { + window.flash({header: `Delete ${this.state.node.name}`, text: 'Deletion failed'}); + return; + } + window.flash({header: `Delete ${this.state.node.name}`, text: `${this.state.node.name} has been deleted`}); + this.setState({redirect: path}); + } + on_cancel() { + this.setState({redirect: `/node/${this.state.node.id}`}); + } +} + +class SearchNodes extends React.Component { + static contextType = UserContext; + constructor(props) { + super(props); + let params = new URLSearchParams(props.location.search); + this.state = { + query: params.get('q'), + loading: true, + results: [], + }; + this.last_query = null; + } + componentDidMount() { + this.search(); + } + componentDidUpdate() { + let params = new URLSearchParams(this.props.location.search); + let new_query = params.get('q'); + if (new_query !== this.state.query) { + this.setState({query: new_query}); + } + if (this.last_query !== this.state.query) { + this.search(); + } + } + render() { + if (this.state.loading) { + return + Loading… + ; + } + if (this.state.results.length === 0) { + return
    + No results were found for {this.state.query}. +
    ; + } + return + {this.state.results.map(item => )} + ; + } + async search() { + this.last_query = this.state.query; + this.setState({loading: true}); + let token = await this.context.get_token(); + let response = await fetch(`/api/search`, { + method: 'POST', + headers: { + Authorization: `Bearer ${token}`, + 'Content-Type': 'application/x-www-form-urlencoded', + }, + body: 'q=' + encodeURIComponent(this.state.query), + }); + let results = await response.json(); + this.setState({ + loading: false, + results: results, + }); + } +} + +export { Main, AddNode, EditNode, DeleteNode, ViewNode, SearchNodes }; diff --git a/frontend/src/auth.js b/frontend/src/auth.js index 0ed1e1a..2f32c33 100644 --- a/frontend/src/auth.js +++ b/frontend/src/auth.js @@ -1,5 +1,6 @@ import React from 'react'; import { Redirect, generatePath } from 'react-router-dom'; +import { Spinner } from 'react-bootstrap'; import { isExpired } from 'react-jwt'; const UserContext = React.createContext(); @@ -18,7 +19,9 @@ class Login extends React.Component { if (this.state.url) { return
    Redirecting to {this.state.url}
    ; } - return
    Logging in…
    ; + return + Logging in… + ; } async get_oauth_url() { let redirect_uri = window.location.origin + generatePath('/oauth-callback'); @@ -50,7 +53,9 @@ class Logout extends React.Component { if (this.state.done) { return ; } - return
    Logging out…
    ; + return + Logging out… + ; } } @@ -88,7 +93,7 @@ class OauthCallback extends React.Component { const user = await this.context.get_user(); if (user) { this.setState({error: null, done: true}); - window.flash({header: 'Logged in', text: 'You are now logged in as ' + user.username + '.'}); + window.flash({header: 'Logged in', text: `You are now logged in as ${user.username}.`}); } else { window.flash({header: 'Login failed', text: 'Something failed during authentication.'}); } @@ -100,7 +105,9 @@ class OauthCallback extends React.Component { if (this.state.done) { return ; } - return 'Logging in…'; + return + Logging in… + ; } } @@ -146,7 +153,7 @@ class AuthenticationProvider extends React.Component { } let response = await fetch('/api/user',{ headers: { - Authorization: 'Bearer ' + token, + Authorization: `Bearer ${token}`, } }); if (response.ok) { diff --git a/frontend/src/index.js b/frontend/src/index.js index c2a2b74..75cdf35 100644 --- a/frontend/src/index.js +++ b/frontend/src/index.js @@ -1,21 +1,43 @@ -import React from 'react'; +import React, { useState } from 'react'; import ReactDOM from 'react-dom'; -import { BrowserRouter, Link, Switch, Route } from 'react-router-dom'; -import { Navbar, Nav, Container } from 'react-bootstrap'; +import { BrowserRouter, Link, Switch, Route, useHistory } from 'react-router-dom'; +import { Navbar, Nav, Container, Form, Button } from 'react-bootstrap'; import { UserContext, Login, Logout, OauthCallback, AuthenticationProvider } from './auth.js'; import { Flash } from './flash'; import { ThemeContext, ThemeProvider, ThemeSwitcher } from './theme.js'; -import Main from './app'; +import { AddNode, EditNode, DeleteNode, ViewNode, SearchNodes, Main } from './app'; function LoginNavigation(props) { if (!props.value.is_logged_in) { return Login } return <> + Add Logout [{props.value.username}] ; } +function SearchBox(props) { + const [query, setQuery] = useState(''); + let history = useHistory(); + function on_search_change(event) { + setQuery(event.target.value); + } + function on_submit(event) { + event.preventDefault(); + //this.setState({search: true}); + //console.log('this', this); + history.push('/search?q=' + encodeURIComponent(query)); + } + if (!props.value.is_logged_in) { + return ''; + } + return
    + + + ; +} + function Navigation() { return {theme => ( @@ -29,6 +51,9 @@ function Navigation() { {value => } + + {value => } + )} @@ -39,11 +64,16 @@ function Router() { return - + + + + + + diff --git a/frontend/yarn.lock b/frontend/yarn.lock index aed056b..81e1512 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -970,7 +970,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.1.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.4.2", "@babel/runtime@^7.6.3", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.1.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.3.4", "@babel/runtime@^7.4.2", "@babel/runtime@^7.4.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": version "7.12.5" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz#410e7e487441e1b360c29be715d870d9b985882e" integrity sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg== @@ -1329,7 +1329,7 @@ resolved "https://registry.yarnpkg.com/@restart/context/-/context-2.1.4.tgz#a99d87c299a34c28bd85bb489cb07bfd23149c02" integrity sha512-INJYZQJP7g+IoDUh/475NlGiTeMfwTXUEr3tmRneckHIxNolGOW9CTq83S8cxq0CgJwwcMzMJFchxvlwe7Rk8Q== -"@restart/hooks@^0.3.21", "@restart/hooks@^0.3.25": +"@restart/hooks@^0.3.12", "@restart/hooks@^0.3.21", "@restart/hooks@^0.3.22", "@restart/hooks@^0.3.25": version "0.3.25" resolved "https://registry.yarnpkg.com/@restart/hooks/-/hooks-0.3.25.tgz#11004139ad1c70d2f5965a8939dcb5aeb96aa652" integrity sha512-m2v3N5pxTsIiSH74/sb1yW8D9RxkJidGW+5Mfwn/lHb2QzhZNlaU1su7abSyT9EGf0xS/0waLjrf7/XxQHUk7w== @@ -3132,7 +3132,7 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" -classnames@^2.2.6: +classnames@^2.2.0, classnames@^2.2.6: version "2.2.6" resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce" integrity sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q== @@ -3330,6 +3330,11 @@ compression@^1.7.4: safe-buffer "5.1.2" vary "~1.1.2" +compute-scroll-into-view@^1.0.16: + version "1.0.16" + resolved "https://registry.yarnpkg.com/compute-scroll-into-view/-/compute-scroll-into-view-1.0.16.tgz#5b7bf4f7127ea2c19b750353d7ce6776a90ee088" + integrity sha512-a85LHKY81oQnikatZYA90pufpZ6sQx++BoCxOEMsjpZx+ZnaKGQnCyCehTRr/1p9GBIAHTjcU9k71kSYWloLiQ== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -3501,6 +3506,14 @@ create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: safe-buffer "^5.0.1" sha.js "^2.4.8" +create-react-context@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.3.0.tgz#546dede9dc422def0d3fc2fe03afe0bc0f4f7d8c" + integrity sha512-dNldIoSuNSvlTJ7slIKC/ZFGKexBMBrrcc+TTe1NdmROnaASuLPvqpwj9v4XS4uXZ8+YPu0sNmShX2rXI5LNsw== + dependencies: + gud "^1.0.0" + warning "^4.0.3" + cross-spawn@7.0.3, cross-spawn@^7.0.0, cross-spawn@^7.0.2: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -3858,7 +3871,7 @@ dedent@^0.7.0: resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw= -deep-equal@^1.0.1: +deep-equal@^1.0.1, deep-equal@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a" integrity sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g== @@ -4051,7 +4064,7 @@ dom-converter@^0.2: dependencies: utila "~0.4" -dom-helpers@^5.0.1, dom-helpers@^5.1.2, dom-helpers@^5.2.0: +dom-helpers@^5.0.1, dom-helpers@^5.1.0, dom-helpers@^5.1.2, dom-helpers@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-5.2.0.tgz#57fd054c5f8f34c52a3eeffdb7e7e93cd357d95b" integrity sha512-Ru5o9+V8CpunKnz5LGgWXkmrH/20cGKwcHwS4m73zIvs54CN9epEmT/HLqFJW3kXpakAFkEdzgy1hzlJe3E4OQ== @@ -5291,6 +5304,11 @@ growly@^1.3.0: resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= +gud@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gud/-/gud-1.0.0.tgz#a489581b17e6a70beca9abe3ae57de7a499852c0" + integrity sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw== + gzip-size@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-5.1.1.tgz#cb9bee692f87c0612b232840a873904e4c135274" @@ -5778,7 +5796,7 @@ internal-slot@^1.0.2: has "^1.0.3" side-channel "^1.0.2" -invariant@^2.2.4: +invariant@^2.2.1, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== @@ -6971,6 +6989,11 @@ lodash._reinterpolate@^3.0.0: resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= +lodash.debounce@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" + integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= + lodash.memoize@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" @@ -7039,6 +7062,11 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +luxon@^1.25.0: + version "1.25.0" + resolved "https://registry.yarnpkg.com/luxon/-/luxon-1.25.0.tgz#d86219e90bc0102c0eb299d65b2f5e95efe1fe72" + integrity sha512-hEgLurSH8kQRjY6i4YLey+mcKVAWXbDNlZRmM6AgWDJ1cY3atl8Ztf5wEY7VBReFbmGnwQPz7KYJblL8B2k0jQ== + lz-string@^1.4.4: version "1.4.4" resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.4.4.tgz#c0d8eaf36059f705796e1e344811cf4c498d3a26" @@ -8113,6 +8141,11 @@ pnp-webpack-plugin@1.6.4: dependencies: ts-pnp "^1.1.6" +popper.js@^1.14.4, popper.js@^1.15.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.16.1.tgz#2a223cb3dc7b6213d740e40372be40de43e65b1b" + integrity sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ== + portfinder@^1.0.26: version "1.0.28" resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.28.tgz#67c4622852bd5374dd1dd900f779f53462fac778" @@ -8890,7 +8923,7 @@ prop-types-extra@^1.1.0: react-is "^16.3.2" warning "^4.0.0" -prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@^15.5.8, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== @@ -9056,6 +9089,23 @@ react-app-polyfill@^2.0.0: regenerator-runtime "^0.13.7" whatwg-fetch "^3.4.1" +react-bootstrap-typeahead@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/react-bootstrap-typeahead/-/react-bootstrap-typeahead-5.1.2.tgz#ff91a04fbfbc5b48742b55f32576c5b176a82a5e" + integrity sha512-GQ6lRtVkgE5UcQPBgX4foJ/WcRdMgXzi1x1eg9RyXRLF0G3m/TfUJ6+kGkLg+X7U3b1/r+21JurH1OQ2gf1uBg== + dependencies: + "@babel/runtime" "^7.3.4" + "@restart/hooks" "^0.3.22" + classnames "^2.2.0" + fast-deep-equal "^3.1.1" + invariant "^2.2.1" + lodash.debounce "^4.0.8" + prop-types "^15.5.8" + react-overlays "^2.0.0" + react-popper "^1.0.0" + scroll-into-view-if-needed "^2.2.20" + warning "^4.0.1" + react-bootstrap@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/react-bootstrap/-/react-bootstrap-1.4.0.tgz#806a8b48b065cedfb28c6c5c7b0c0e3c3b53445d" @@ -9144,6 +9194,19 @@ react-lifecycles-compat@^3.0.4: resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== +react-overlays@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/react-overlays/-/react-overlays-2.1.1.tgz#ffe2090c4a10da6b8947a1c7b1a67d0457648a0d" + integrity sha512-gaQJwmb8Ij2IGVt4D1HmLtl4A0mDVYxlsv/8i0dHWK7Mw0kNat6ORelbbEWzaXTK1TqMeQtJw/jraL3WOADz3w== + dependencies: + "@babel/runtime" "^7.4.5" + "@restart/hooks" "^0.3.12" + dom-helpers "^5.1.0" + popper.js "^1.15.0" + prop-types "^15.7.2" + uncontrollable "^7.0.0" + warning "^4.0.3" + react-overlays@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/react-overlays/-/react-overlays-4.1.1.tgz#0060107cbe1c5171a744ccda3fbf0556d064bc5f" @@ -9158,6 +9221,19 @@ react-overlays@^4.1.0: uncontrollable "^7.0.0" warning "^4.0.3" +react-popper@^1.0.0: + version "1.3.7" + resolved "https://registry.yarnpkg.com/react-popper/-/react-popper-1.3.7.tgz#f6a3471362ef1f0d10a4963673789de1baca2324" + integrity sha512-nmqYTx7QVjCm3WUZLeuOomna138R1luC4EqkW3hxJUrAe+3eNz3oFCLYdnPwILfn0mX1Ew2c3wctrjlUMYYUww== + dependencies: + "@babel/runtime" "^7.1.2" + create-react-context "^0.3.0" + deep-equal "^1.1.1" + popper.js "^1.14.4" + prop-types "^15.6.1" + typed-styles "^0.0.7" + warning "^4.0.2" + react-refresh@^0.8.3: version "0.8.3" resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.8.3.tgz#721d4657672d400c5e3c75d063c4a85fb2d5d68f" @@ -9833,6 +9909,13 @@ schema-utils@^3.0.0: ajv "^6.12.5" ajv-keywords "^3.5.2" +scroll-into-view-if-needed@^2.2.20: + version "2.2.26" + resolved "https://registry.yarnpkg.com/scroll-into-view-if-needed/-/scroll-into-view-if-needed-2.2.26.tgz#e4917da0c820135ff65ad6f7e4b7d7af568c4f13" + integrity sha512-SQ6AOKfABaSchokAmmaxVnL9IArxEnLEX9j4wAZw+x4iUTb40q7irtHG3z4GtAWz5veVZcCnubXDBRyLVQaohw== + dependencies: + compute-scroll-into-view "^1.0.16" + select-hose@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" @@ -10889,6 +10972,11 @@ type@^2.0.0: resolved "https://registry.yarnpkg.com/type/-/type-2.1.0.tgz#9bdc22c648cf8cf86dd23d32336a41cfb6475e3f" integrity sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA== +typed-styles@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/typed-styles/-/typed-styles-0.0.7.tgz#93392a008794c4595119ff62dde6809dbc40a3d9" + integrity sha512-pzP0PWoZUhsECYjABgCGQlRGL1n7tOHsgwYv3oIiEpJwGhFTuty/YNeduxQYzXXa3Ge5BdT6sHYIQYpl4uJ+5Q== + typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" @@ -11179,7 +11267,7 @@ walker@^1.0.7, walker@~1.0.5: dependencies: makeerror "1.0.x" -warning@^4.0.0, warning@^4.0.3: +warning@^4.0.0, warning@^4.0.1, warning@^4.0.2, warning@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3" integrity sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w== -- cgit v1.2.3