From 7ff18506953d9912c242634db6dbe5c122c41b50 Mon Sep 17 00:00:00 2001 From: leorigon Date: Tue, 6 Jul 2021 12:03:16 -0300 Subject: [PATCH 1/4] chore(editable-table-input): add editable table example with state controlled --- src/docz/EditableTable.mdx | 180 ++++++++++++++++++++++--------------- 1 file changed, 107 insertions(+), 73 deletions(-) diff --git a/src/docz/EditableTable.mdx b/src/docz/EditableTable.mdx index 877e3695..29152cc3 100644 --- a/src/docz/EditableTable.mdx +++ b/src/docz/EditableTable.mdx @@ -9,75 +9,114 @@ import { Playground, Props } from 'docz' # Editable Table ## Properties - + + + +## With controlled state + + + { + () => { + + const handleAdd = (item) => { + if (item.someTitle < 10) { + window.alert('error, value can be smaller than 10') + } + } + + return ( + Promise.resolve(handleAdd(item))} + columns={[ + { + title: 'some title', + field: 'someTitle', + type: 'numeric' + } + ]} + data={[ + { + someTitle: 0 + } + ]} + /> + ) + }} + ## Default + Promise.resolve(console.log(item)) } - onRowClick={ () => window.alert('hello') } + onAddRow={item => Promise.resolve(console.log(item))} + onRowClick={() => window.alert('hello')} title='adicionar' columns={[ - { - title: 'Leitura', - field: 'readAt', + { + title: 'Leitura', + field: 'readAt', initialEditValue: new Date(), type: 'datetime', cellStyle: { textAlign: 'right' }, headerStyle: { textAlign: 'right' } }, - { - title: 'Posição', - field: 'position', - type: 'numeric' + { + title: 'Posição', + field: 'position', + type: 'numeric' }, - { - title: 'Origem', - field: 'origin', - editable: 'never', + { + title: 'Origem', + field: 'origin', + editable: 'never', initialEditValue: 'Manual' } ]} data={[ - { - readAt: new Date('07/01/2019 17:21'), - position: 7000, - origin:
- 80% -
+ { + readAt: new Date('07/01/2019 17:21'), + position: 7000, + origin: ( +
+ 80% +
+ ) }, { - readAt: new Date('06/15/2019 16:01'), - position: 6740, + readAt: new Date('06/15/2019 16:01'), + position: 6740, origin: 'Manual' }, { readAt: new Date('06/01/2019 19:22'), - position: 6450, + position: 6450, origin: 'S.O. 018774' }, { readAt: new Date('05/15/2019 14:07'), - position: 5600, + position: 5600, origin: 'S.0. 018774' }, - { + { readAt: new Date('07/01/2019 19:22'), - position: 6451, + position: 6451, origin: 'S.O. 3' }, { readAt: new Date('05/12/2019 14:07'), - position: 8000, + position: 8000, origin: 'S.0. 018771' } ]} @@ -85,49 +124,44 @@ import { Playground, Props } from 'docz'
## With Autocomplete + Promise.resolve() } - onClickAdd={ () => window.alert('hello') } - columns={ - [ - { - title: 'values', - field: 'listValues', - cellStyle: { textAlign: 'right' }, - headerStyle: { textAlign: 'right' } - }, - { - title: 'Posição', - field: 'position', - type: 'numeric' - } - ] - } - data={ - [ - { - listValues: 'some values' , - autoComplete: { value: '1', label: 'some values'}, - position: 7000 - }, - { - listValues: 'any values' , - autoComplete: { value: '2', label: 'any values'}, - position: 6740 - } - ] - } + onUpdateRow={() => Promise.resolve()} + onClickAdd={() => window.alert('hello')} + columns={[ + { + title: 'values', + field: 'listValues', + cellStyle: { textAlign: 'right' }, + headerStyle: { textAlign: 'right' } + }, + { + title: 'Posição', + field: 'position', + type: 'numeric' + } + ]} + data={[ + { + listValues: 'some values', + autoComplete: { value: '1', label: 'some values' }, + position: 7000 + }, + { + listValues: 'any values', + autoComplete: { value: '2', label: 'any values' }, + position: 6740 + } + ]} /> - \ No newline at end of file + From 2cdf6da4b9157aa907cfc5916fb8aa5395f5866c Mon Sep 17 00:00:00 2001 From: leorigon Date: Tue, 6 Jul 2021 20:26:08 -0300 Subject: [PATCH 2/4] chore(editable-table-input): update material-table dependency, add example of material-table add/update --- .eslintrc.json | 420 ++++++++++++++++++------------------- package.json | 2 +- src/core/EditableTable.tsx | 81 ++++--- src/docz/EditableTable.mdx | 44 +++- yarn.lock | 295 ++++++++++++++++++-------- 5 files changed, 492 insertions(+), 350 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 7c2bb44d..7c9583b7 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,213 +1,213 @@ { - "parser": "@typescript-eslint/parser", - "parserOptions": { - "jsx": true, - "useJSXTextNode": true - }, - "extends": [ - "plugin:@typescript-eslint/recommended", - "plugin:react/recommended", - "eslint:recommended", - "prettier", - "prettier/@typescript-eslint", - "plugin:ramda/recommended" - ], - "rules": { - "no-sequences": "error", - "spaced-comment": [ - "error", - "always" - ], - "key-spacing": [ - "error", - { - "mode": "strict" - } - ], - "max-len": [ - "error", - { - "code": 85 - } - ], - "max-lines": [ - "error", - { - "max": 350, - "skipBlankLines": true - } - ], - "prefer-const": [ - "error", - { - "destructuring": "all" - } - ], - "no-var": "error", - "newline-before-return": "error", - "arrow-parens": [ - "error", - "as-needed" - ], - "no-bitwise": "error", - "max-classes-per-file": "error", - "no-duplicate-imports": "error", - "lines-between-class-members": [ - "error", - "always" - ], - "padding-line-between-statements": [ - "error", - { - "blankLine": "always", - "prev": "*", - "next": "return" - } - ], - "sort-imports": [ - "error", - { - "ignoreCase": true, - "ignoreDeclarationSort": true, - "ignoreMemberSort": true, - "memberSyntaxSortOrder": [ - "none", - "all", - "multiple", - "single" - ] - } - ], - "no-irregular-whitespace": "error", - "space-before-blocks": "error", - "no-multi-spaces": "error", - "no-trailing-spaces": "error", - "no-whitespace-before-property": "error", - "curly": "error", - "no-undef": "off", - "no-case-declarations": "off", - "indent": [ - "error", - 4 - ], - "no-unused-vars": ["off"], - "no-console": [ - "error", - { - "allow": [ - "log", - "error" - ] - } - ], - "comma-dangle": [ - "error", - "never" - ], - "semi": [ - "error", - "never" - ], - "no-multiple-empty-lines": [ - "error", - { - "max": 1 - } - ], - "quotes": [ - "error", - "single" - ], - "eol-last": [ - "error", - "always" - ], - "no-new-wrappers": "error", - "arrow-spacing": [ - "error", - { - "after": true, - "before": true - } - ], - "valid-jsdoc": "error", - "object-curly-spacing": [ - "error", - "always" - ], - "react/jsx-closing-bracket-location": [ - 1, - { - "selfClosing": "line-aligned", - "nonEmpty": "after-props" - } - ], - "react/prop-types": "off", - "react/display-name": "off", - "react/jsx-boolean-value": "off", - "react/jsx-wrap-multilines": "off", - "react/jsx-curly-spacing": [ - "error", - { - "when": "always", - "children": true - } - ], - "react/no-unescaped-entities": "off", - "prefer-arrow/prefer-arrow-functions": [ - "warn", - { - "disallowPrototype": true, - "singleReturnOnly": true, - "classPropertiesAllowed": false - } - ], - "@typescript-eslint/no-unused-vars": [ - "error", - { - "ignoreRestSiblings": true - } - ], - "@typescript-eslint/no-explicit-any": "error", - "@typescript-eslint/class-name-casing": "error", - "@typescript-eslint/member-ordering": [ - "error", - { - "classes": [ - "public-static-field", - "public-instance-field", - "private-static-field", - "private-instance-field", - "private-constructor", - "public-constructor", - "private-instance-method", - "protected-instance-method", - "public-instance-method" - ] - } - ], - "@typescript-eslint/prefer-interface": "off", - "@typescript-eslint/explicit-member-accessibility": "off", - "@typescript-eslint/no-var-requires": "off", - "@typescript-eslint/no-non-null-assertion": "off", - "@typescript-eslint/no-object-literal-type-assertion": "off", - "@typescript-eslint/interface-name-prefix": [ - "error", - "always" - ], - "@typescript-eslint/array-type": "off", - "@typescript-eslint/explicit-function-return-type": "off" - }, - "plugins": [ - "react", - "prefer-arrow", - "@typescript-eslint", - "ramda" - ], - "settings": { - "react": { - "pragma": "React", - "version": "16.8.6" + "parser": "@typescript-eslint/parser", + "parserOptions": { + "jsx": true, + "useJSXTextNode": true + }, + "extends": [ + "plugin:@typescript-eslint/recommended", + "plugin:react/recommended", + "eslint:recommended", + "prettier", + "prettier/@typescript-eslint", + "plugin:ramda/recommended" + ], + "rules": { + "template-curly-spacing": "off", + "no-sequences": "error", + "spaced-comment": [ + "error", + "always" + ], + "key-spacing": [ + "error", + { + "mode": "strict" + } + ], + "max-len": [ + "error", + { + "code": 85 + } + ], + "max-lines": [ + "error", + { + "max": 350, + "skipBlankLines": true } + ], + "prefer-const": [ + "error", + { + "destructuring": "all" + } + ], + "no-var": "error", + "newline-before-return": "error", + "arrow-parens": [ + "error", + "as-needed" + ], + "no-bitwise": "error", + "max-classes-per-file": "error", + "no-duplicate-imports": "error", + "lines-between-class-members": [ + "error", + "always" + ], + "padding-line-between-statements": [ + "error", + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "sort-imports": [ + "error", + { + "ignoreCase": true, + "ignoreDeclarationSort": true, + "ignoreMemberSort": true, + "memberSyntaxSortOrder": [ + "none", + "all", + "multiple", + "single" + ] + } + ], + "no-irregular-whitespace": "error", + "space-before-blocks": "error", + "no-multi-spaces": "error", + "no-trailing-spaces": "error", + "no-whitespace-before-property": "error", + "curly": "error", + "no-undef": "off", + "no-case-declarations": "off", + "indent": "off", + "no-unused-vars": [ + "off" + ], + "no-console": [ + "error", + { + "allow": [ + "log", + "error" + ] + } + ], + "comma-dangle": [ + "error", + "never" + ], + "semi": [ + "error", + "never" + ], + "no-multiple-empty-lines": [ + "error", + { + "max": 1 + } + ], + "quotes": [ + "error", + "single" + ], + "eol-last": [ + "error", + "always" + ], + "no-new-wrappers": "error", + "arrow-spacing": [ + "error", + { + "after": true, + "before": true + } + ], + "valid-jsdoc": "error", + "object-curly-spacing": [ + "error", + "always" + ], + "react/jsx-closing-bracket-location": [ + 1, + { + "selfClosing": "line-aligned", + "nonEmpty": "after-props" + } + ], + "react/prop-types": "off", + "react/display-name": "off", + "react/jsx-boolean-value": "off", + "react/jsx-wrap-multilines": "off", + "react/jsx-curly-spacing": [ + "error", + { + "when": "always", + "children": true + } + ], + "react/no-unescaped-entities": "off", + "prefer-arrow/prefer-arrow-functions": [ + "warn", + { + "disallowPrototype": true, + "singleReturnOnly": true, + "classPropertiesAllowed": false + } + ], + "@typescript-eslint/no-unused-vars": [ + "error", + { + "ignoreRestSiblings": true + } + ], + "@typescript-eslint/no-explicit-any": "error", + "@typescript-eslint/class-name-casing": "error", + "@typescript-eslint/member-ordering": [ + "error", + { + "classes": [ + "public-static-field", + "public-instance-field", + "private-static-field", + "private-instance-field", + "private-constructor", + "public-constructor", + "private-instance-method", + "protected-instance-method", + "public-instance-method" + ] + } + ], + "@typescript-eslint/prefer-interface": "off", + "@typescript-eslint/explicit-member-accessibility": "off", + "@typescript-eslint/no-var-requires": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/no-object-literal-type-assertion": "off", + "@typescript-eslint/interface-name-prefix": [ + "error", + "always" + ], + "@typescript-eslint/array-type": "off", + "@typescript-eslint/explicit-function-return-type": "off" + }, + "plugins": [ + "react", + "prefer-arrow", + "@typescript-eslint", + "ramda" + ], + "settings": { + "react": { + "pragma": "React", + "version": "16.8.6" } - } \ No newline at end of file + } +} \ No newline at end of file diff --git a/package.json b/package.json index 0117ca38..b7310813 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "@material-ui/lab": "4.0.0-alpha.54", "@material-ui/pickers": "3.2.6", "date-fns": "2.4.1", - "material-table": "1.59.0", + "material-table": "1.69.3", "material-ui-chip-input": "2.0.0-beta.2", "ramda": "0.25.0", "react-number-format": "4.4.1" diff --git a/src/core/EditableTable.tsx b/src/core/EditableTable.tsx index d49dfa39..4dc22afb 100644 --- a/src/core/EditableTable.tsx +++ b/src/core/EditableTable.tsx @@ -1,4 +1,4 @@ -import React, { useState, forwardRef, useRef, useEffect } from 'react' +import React, { forwardRef, useRef } from 'react' import MaterialTable, { Column, Options, @@ -21,7 +21,7 @@ import { LastPage } from '../icons' import Typography from './Typography' -import { equals, omit, contains } from 'ramda' +import { omit, contains } from 'ramda' import styled from 'styled-components' import Button from './Button' import DateTime from './DateTime' @@ -36,7 +36,7 @@ interface IProps { color?: 'primary' | 'inherit' | 'secondary' | 'disabled' columns?: Column[] data?: T[] - options?: Options + options?: Options paginationInfo?: boolean noRowsExpand?: boolean noHeader?: boolean @@ -44,10 +44,13 @@ interface IProps { autoCompleteField?: string disableAddHeader?: boolean errors?: string[] + value?: string onRowClick?: (event?: React.MouseEvent, rowData?: T) => void onUpdateRow?: (newData: object, oldData?: object) => Promise onDeleteRow?: (newData: object, oldData?: object) => Promise onAddRow?: (oldData: object) => Promise + onRowAddCancelled: (newData: object) => Promise + onRowUpdateCancelled: (newData: object) => Promise onClickAdd?(): void } @@ -104,18 +107,9 @@ const RightPagination = styled.div` } ` -const usePrevious = (data?: object[]) => { - const ref = useRef() - - useEffect(() => { ref.current = data }) - - return ref.current -} - const EditableTable = (props: IProps) => { - const [data, setData] = useState(props.data || []) - const previous = usePrevious(props.data) const addButtonColor = (props.color !== 'disabled' && props.color) || 'primary' + const valueRef = useRef() const getErrors = (field: string) => contains(field, props.errors || []) @@ -150,18 +144,10 @@ const EditableTable = (props: IProps) => { } } - useEffect(() => { - if (props.data && !equals(props.data, previous)) { - setData(props.data) - } - }, [props.data]) - const renderAddComponent = () => - - Adicionar { props.title } - + Adicionar { props.title } const pagination = !props.paginationInfo @@ -201,18 +187,16 @@ const EditableTable = (props: IProps) => { { ...itemProps } /> } - actions={ - props.onClickAdd && ( - - - Adicionar - - ) - } + actions={ props.onClickAdd && ( + + + Adicionar + + ) } /> return ( @@ -246,7 +230,11 @@ const EditableTable = (props: IProps) => { disabled={ props.disableAddHeader } variant='dashed' color={ localProps.color || 'primary' } - onClick={ localProps.action.onClick }> + onClick={ () => { + localProps.action.onClick() + valueRef.current = '' + } + }> ) @@ -270,22 +258,25 @@ const EditableTable = (props: IProps) => { } if (localProps.columnDef.type === 'numeric') { + const error = getErrors(localProps.columnDef.field) return ( localProps.onChange( - event.currentTarget.value - ) - } + onChange={ event => { + localProps.onChange(event.target.value) + valueRef.current = event.target.value + } } /> ) } @@ -354,7 +345,7 @@ const EditableTable = (props: IProps) => { flexDirection: 'column' } } columns={ props.columns || [] } - data={ data } + data={ props.data ?? [] } options={ { search: false, draggable: false, @@ -370,7 +361,9 @@ const EditableTable = (props: IProps) => { editable={ { onRowUpdate: props.onUpdateRow, onRowAdd: props.onAddRow, - onRowDelete: props.onDeleteRow + onRowDelete: props.onDeleteRow, + onRowAddCancelled: props.onRowAddCancelled, + onRowUpdateCancelled: props.onRowUpdateCancelled } } /> diff --git a/src/docz/EditableTable.mdx b/src/docz/EditableTable.mdx index 29152cc3..44e9884f 100644 --- a/src/docz/EditableTable.mdx +++ b/src/docz/EditableTable.mdx @@ -17,18 +17,43 @@ import { Playground, Props } from 'docz' { () => { - - const handleAdd = (item) => { - if (item.someTitle < 10) { - window.alert('error, value can be smaller than 10') + const [fieldError, setFieldError] = React.useState(false) + const [data, setData] = React.useState([{someTitle: 11}]) + + const handleAdd = item => new Promise((resolve, reject) => { + if (item.someTitle < 10) { + setFieldError(true) + reject() + } else { + setData([...data, item]) + setFieldError(false) + resolve() } - } + }) + + const handleUpdate = (newItem) => new Promise((resolve, reject) => { + if (newItem.someTitle < 10) { + setFieldError(true) + reject() + } else { + setData([newItem]) + setFieldError(false) + resolve() + } + }) + + const handleCancel = () => Promise.resolve(setFieldError(false)) return ( Promise.resolve(handleAdd(item))} + errors={ fieldError ? ['someTitle'] : [] } + onAddRow={handleAdd} + onUpdateRow={handleUpdate} + onRowUpdateCancelled={handleCancel} + onRowAddCancelled={handleCancel} + value="" columns={[ { title: 'some title', @@ -36,14 +61,11 @@ import { Playground, Props } from 'docz' type: 'numeric' } ]} - data={[ - { - someTitle: 0 - } - ]} + data={data} /> ) }} + ## Default diff --git a/yarn.lock b/yarn.lock index 9e2d7254..6d56f7f9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1163,14 +1163,6 @@ pirates "^4.0.0" source-map-support "^0.5.16" -"@babel/runtime-corejs2@^7.4.4": - version "7.12.5" - resolved "https://registry.npmjs.org/@babel/runtime-corejs2/-/runtime-corejs2-7.12.5.tgz#382ec38f0826365e96118e28b81249c1c61bace3" - integrity sha512-kt5YpZ7F5A05LOgQuaMXXmcxakK/qttf5C/E1BJPA3Kf5PanbjPzDoXN+PIslUnjUxpuKblCsXyP0QfMiqyKqA== - dependencies: - core-js "^2.6.5" - regenerator-runtime "^0.13.4" - "@babel/runtime-corejs3@^7.10.2": version "7.12.5" resolved "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.12.5.tgz#ffee91da0eb4c6dae080774e94ba606368e414f4" @@ -1179,6 +1171,14 @@ core-js-pure "^3.0.0" regenerator-runtime "^0.13.4" +"@babel/runtime-corejs3@^7.9.6": + version "7.14.7" + resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.14.7.tgz#0ef292bbce40ca00f874c9724ef175a12476465c" + integrity sha512-Wvzcw4mBYbTagyBVZpAJWI06auSIj033T/yNE0Zn1xcup83MieCddZA7ls3kme17L4NOGBrQ09Q+nKB41RLWBA== + dependencies: + core-js-pure "^3.15.0" + regenerator-runtime "^0.13.4" + "@babel/runtime@7.9.0": version "7.9.0" resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.0.tgz#337eda67401f5b066a6f205a3113d4ac18ba495b" @@ -1193,6 +1193,13 @@ dependencies: regenerator-runtime "^0.13.4" +"@babel/runtime@^7.2.0": + version "7.14.6" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.14.6.tgz#535203bc0892efc7dec60bdc27b2ecf6e409062d" + integrity sha512-/PCB2uJ7oM44tz8YhC4Z/6PeOKXp4K588f+5M3clr1M4zbqztlo0XEfJ2LEzj/FgwfgGcIdl8n7YYjTCI0BYwg== + dependencies: + regenerator-runtime "^0.13.4" + "@babel/template@^7.10.4", "@babel/template@^7.12.7", "@babel/template@^7.4.0", "@babel/template@^7.4.4", "@babel/template@^7.8.6": version "7.12.7" resolved "https://registry.npmjs.org/@babel/template/-/template-7.12.7.tgz#c817233696018e39fbb6c491d2fb684e05ed43bc" @@ -1234,11 +1241,18 @@ exec-sh "^0.3.2" minimist "^1.2.0" -"@date-io/core@1.x", "@date-io/core@^1.3.13", "@date-io/core@^1.3.6": +"@date-io/core@^1.1.0", "@date-io/core@^1.3.6": version "1.3.13" resolved "https://registry.npmjs.org/@date-io/core/-/core-1.3.13.tgz#90c71da493f20204b7a972929cc5c482d078b3fa" integrity sha512-AlEKV7TxjeK+jxWVKcCFrfYAk8spX9aCyiToFIiLPtfQbsjmRGLIhb5VZgptQcJdHtLXo7+m0DuurwFgUToQuA== +"@date-io/date-fns@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@date-io/date-fns/-/date-fns-1.1.0.tgz#91cd7703042513a6a0056a344b25cd74a4df643e" + integrity sha512-FMRhYWfoGiIXdN4xWAArpkdEbqsg2Fr+6Yda7Np2eVWCNx6gSMYsHIM51IIcI+3762ajYbhoEYjHYXVFNZIk1g== + dependencies: + "@date-io/core" "^1.1.0" + "@date-io/date-fns@1.3.6": version "1.3.6" resolved "https://registry.npmjs.org/@date-io/date-fns/-/date-fns-1.3.6.tgz#556fa6d324361258b7fab02d9327f80a989a7ef0" @@ -1246,13 +1260,6 @@ dependencies: "@date-io/core" "^1.3.6" -"@date-io/date-fns@^1.1.0": - version "1.3.13" - resolved "https://registry.npmjs.org/@date-io/date-fns/-/date-fns-1.3.13.tgz#7798844041640ab393f7e21a7769a65d672f4735" - integrity sha512-yXxGzcRUPcogiMj58wVgFjc9qUYrCnnU9eLcyNbsQCmae4jPuZCDoIBR21j8ZURsM7GRtU62VOw5yNd4dDHunA== - dependencies: - "@date-io/core" "^1.3.13" - "@emotion/hash@^0.8.0": version "0.8.0" resolved "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz#bbbff68978fefdbe68ccb533bc8cbe1d1afb5413" @@ -1499,24 +1506,24 @@ prop-types "^15.7.2" react-is "^16.8.0" -"@material-ui/pickers@3.2.6": - version "3.2.6" - resolved "https://registry.npmjs.org/@material-ui/pickers/-/pickers-3.2.6.tgz#5ef32a97af183e8107ab5744da4950701d9edfe5" - integrity sha512-iXE0Yz+D+m3eOPgSKiLx1BE/9MJlJmln8gkoceVcOo5Tx/+pDCzXZNPEZveo5280e1hcekSNVBx/31cCqMn9mw== +"@material-ui/pickers@3.2.2": + version "3.2.2" + resolved "https://registry.yarnpkg.com/@material-ui/pickers/-/pickers-3.2.2.tgz#9b7a67f5a8f21f8183853ebc1848e5d8dd680d4c" + integrity sha512-on/J1yyKeJ4CkLnItpf/jPDKMZVWvHDklkh5FS7wkZ0s1OPoqTsPubLWfA7eND6xREnVRyLFzVTlE3VlWYdQWw== dependencies: - "@babel/runtime" "^7.6.0" + "@babel/runtime" "^7.2.0" "@types/styled-jsx" "^2.2.8" clsx "^1.0.2" react-transition-group "^4.0.0" rifm "^0.7.0" + tslib "^1.9.3" -"@material-ui/pickers@^3.2.2": - version "3.2.10" - resolved "https://registry.npmjs.org/@material-ui/pickers/-/pickers-3.2.10.tgz#19df024895876eb0ec7cd239bbaea595f703f0ae" - integrity sha512-B8G6Obn5S3RCl7hwahkQj9sKUapwXWFjiaz/Bsw1fhYFdNMnDUolRiWQSoKPb1/oKe37Dtfszoywi1Ynbo3y8w== +"@material-ui/pickers@3.2.6": + version "3.2.6" + resolved "https://registry.npmjs.org/@material-ui/pickers/-/pickers-3.2.6.tgz#5ef32a97af183e8107ab5744da4950701d9edfe5" + integrity sha512-iXE0Yz+D+m3eOPgSKiLx1BE/9MJlJmln8gkoceVcOo5Tx/+pDCzXZNPEZveo5280e1hcekSNVBx/31cCqMn9mw== dependencies: "@babel/runtime" "^7.6.0" - "@date-io/core" "1.x" "@types/styled-jsx" "^2.2.8" clsx "^1.0.2" react-transition-group "^4.0.0" @@ -1865,7 +1872,7 @@ dependencies: "@types/unist" "*" -"@types/hoist-non-react-statics@*": +"@types/hoist-non-react-statics@*", "@types/hoist-non-react-statics@^3.3.0": version "3.3.1" resolved "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f" integrity sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA== @@ -1971,6 +1978,11 @@ resolved "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz#15925414e0ad2cd765bfef58842f7e26a7accb24" integrity sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug== +"@types/raf@^3.4.0": + version "3.4.0" + resolved "https://registry.yarnpkg.com/@types/raf/-/raf-3.4.0.tgz#2b72cbd55405e071f1c4d29992638e022b20acc2" + integrity sha512-taW5/WYqo36N7V39oYyHP9Ipfd5pNFvGTIQsNGj86xV88YQ7GnI30/yMfKDF7Zgin0m3e+ikX88FvImnK4RjGw== + "@types/ramda@0.25.36": version "0.25.36" resolved "https://registry.npmjs.org/@types/ramda/-/ramda-0.25.36.tgz#1ddaf3211c7cd7046fcaefe68c713469ccfc9504" @@ -1990,6 +2002,16 @@ dependencies: "@types/react" "*" +"@types/react-redux@^7.1.16": + version "7.1.16" + resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.16.tgz#0fbd04c2500c12105494c83d4a3e45c084e3cb21" + integrity sha512-f/FKzIrZwZk7YEO9E1yoxIuDNRiDducxkFlkw/GNMGEnK9n4K8wJzlJBghpSuOVDgEUHoDkDF7Gi9lHNQR4siw== + dependencies: + "@types/hoist-non-react-statics" "^3.3.0" + "@types/react" "*" + hoist-non-react-statics "^3.3.0" + redux "^4.0.0" + "@types/react-transition-group@^4.2.0": version "4.4.0" resolved "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.0.tgz#882839db465df1320e4753e6e9f70ca7e9b4d46d" @@ -2939,6 +2961,11 @@ balanced-match@^1.0.0: resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= +base64-arraybuffer@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.2.0.tgz#4b944fac0191aa5907afe2d8c999ccc57ce80f45" + integrity sha512-7emyCsu1/xiBXgQZrscw/8KPRT44I4Yq9Pe6EGs3aPRTsWuggML1/1DTuZUuIaJPIm1FTDUVXl4x/yW8s0kQDQ== + base64-js@^1.0.2: version "1.5.1" resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" @@ -3198,6 +3225,11 @@ bser@2.1.1: dependencies: node-int64 "^0.4.0" +btoa@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/btoa/-/btoa-1.2.1.tgz#01a9909f8b2c93f6bf680ba26131eb30f7fa3d73" + integrity sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g== + buble@0.19.6: version "0.19.6" resolved "https://registry.npmjs.org/buble/-/buble-0.19.6.tgz#915909b6bd5b11ee03b1c885ec914a8b974d34d3" @@ -3390,6 +3422,18 @@ caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30001173: resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001177.tgz#2c3b384933aafda03e29ccca7bb3d8c3389e1ece" integrity sha512-6Ld7t3ifCL02jTj3MxPMM5wAYjbo4h/TAQGFTgv1inihP1tWnWp8mxxT4ut4JBEHLbpFXEXJJQ119JCJTBkYDw== +canvg@^3.0.6: + version "3.0.7" + resolved "https://registry.yarnpkg.com/canvg/-/canvg-3.0.7.tgz#e45b87a64116af906917f7cad57d370ea372d682" + integrity sha512-4sq6iL5Q4VOXS3PL1BapiXIZItpxYyANVzsAKpTPS5oq4u3SKbGfUcbZh2gdLCQ3jWpG/y5wRkMlBBAJhXeiZA== + dependencies: + "@babel/runtime-corejs3" "^7.9.6" + "@types/raf" "^3.4.0" + raf "^3.4.1" + rgbcolor "^1.0.1" + stackblur-canvas "^2.0.0" + svg-pathdata "^5.0.5" + capitalize@^2.0.0: version "2.0.3" resolved "https://registry.npmjs.org/capitalize/-/capitalize-2.0.3.tgz#ccfeb1046d2a054eb30f34af907a70c3e90f3b73" @@ -3556,9 +3600,9 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" -classnames@^2.2.6: +classnames@2.2.6: version "2.2.6" - resolved "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce" + resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce" integrity sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q== clean-css@4.2.x, clean-css@^4.2.1: @@ -3899,6 +3943,11 @@ core-js-pure@^3.0.0: resolved "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.8.2.tgz#286f885c0dac1cdcd6d78397392abc25ddeca225" integrity sha512-v6zfIQqL/pzTVAbZvYUozsxNfxcFb6Ks3ZfEbuneJl3FW9Jb8F6vLWB6f+qTmAu72msUdyb84V8d/yBFf7FNnw== +core-js-pure@^3.15.0: + version "3.15.2" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.15.2.tgz#c8e0874822705f3385d3197af9348f7c9ae2e3ce" + integrity sha512-D42L7RYh1J2grW8ttxoY1+17Y4wXZeKe7uyplAI3FkNQyI5OgBIAjUfFiTPfL1rs0qLpxaabITNbjKl1Sp82tA== + core-js@^1.0.0: version "1.2.7" resolved "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" @@ -3909,6 +3958,11 @@ core-js@^2.4.0, core-js@^2.4.1, core-js@^2.6.5: resolved "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== +core-js@^3.6.0: + version "3.15.2" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.15.2.tgz#740660d2ff55ef34ce664d7e2455119c5bdd3d61" + integrity sha512-tKs41J7NJVuaya8DxIOCnl8QuPHx5/ZVbFo1oKgVl1qHFBBrDctzQGtuLjPpRdNTWmKPH6oEvgN/MUID+l485Q== + core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -4026,9 +4080,9 @@ crypto-browserify@^3.11.0: randombytes "^2.0.0" randomfill "^1.0.3" -css-box-model@^1.1.2: +css-box-model@^1.2.0: version "1.2.1" - resolved "https://registry.npmjs.org/css-box-model/-/css-box-model-1.2.1.tgz#59951d3b81fd6b2074a62d49444415b0d2b4d7c1" + resolved "https://registry.yarnpkg.com/css-box-model/-/css-box-model-1.2.1.tgz#59951d3b81fd6b2074a62d49444415b0d2b4d7c1" integrity sha512-a7Vr4Q/kd/aw96bnJG332W9V9LkJO69JRcaCYDUqjp6/z0w6VcZjgAcTbgFxEPfBgdnAwlh3iwu+hLopa+flJw== dependencies: tiny-invariant "^1.0.6" @@ -4038,6 +4092,13 @@ css-color-keywords@^1.0.0: resolved "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05" integrity sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU= +css-line-break@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/css-line-break/-/css-line-break-1.1.1.tgz#d5e9bdd297840099eb0503c7310fd34927a026ef" + integrity sha512-1feNVaM4Fyzdj4mKPIQNL2n70MmuYzAXZ1aytlROFX1JsOo070OsugwGjj7nl6jnDJWHDM8zRZswkmeYVWZJQA== + dependencies: + base64-arraybuffer "^0.2.0" + css-select-base-adapter@^0.1.1: version "0.1.1" resolved "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz#3b2ff4972cc362ab88561507a95408a1432135d7" @@ -4165,19 +4226,19 @@ data-urls@^1.0.0: whatwg-mimetype "^2.2.0" whatwg-url "^7.0.0" +date-fns@2.0.0-alpha.27: + version "2.0.0-alpha.27" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.0.0-alpha.27.tgz#5ecd4204ef0e7064264039570f6e8afbc014481c" + integrity sha512-cqfVLS+346P/Mpj2RpDrBv0P4p2zZhWWvfY5fuWrXNR/K38HaAGEkeOwb47hIpQP9Jr/TIxjZ2/sNMQwdXuGMg== + date-fns@2.4.1: version "2.4.1" resolved "https://registry.npmjs.org/date-fns/-/date-fns-2.4.1.tgz#b53f9bb65ae6bd9239437035710e01cf383b625e" integrity sha512-2RhmH/sjDSCYW2F3ZQxOUx/I7PvzXpi89aQL2d3OAxSTwLx6NilATeUbe0menFE3Lu5lFkOFci36ivimwYHHxw== -date-fns@^2.0.0-alpha.27: - version "2.16.1" - resolved "https://registry.npmjs.org/date-fns/-/date-fns-2.16.1.tgz#05775792c3f3331da812af253e1a935851d3834b" - integrity sha512-sAJVKx/FqrLYHAQeN7VpJrPhagZc9R4ImZIWYRFZaaohR3KzmuK88touwsSwSVT8Qcbd4zoDsnGfX4GFB4imyQ== - -debounce@^1.2.0: +debounce@1.2.0: version "1.2.0" - resolved "https://registry.npmjs.org/debounce/-/debounce-1.2.0.tgz#44a540abc0ea9943018dc0eaa95cce87f65cd131" + resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.0.tgz#44a540abc0ea9943018dc0eaa95cce87f65cd131" integrity sha512-mYtLl1xfZLi1m4RtQYlZgJUNQjl4ZxVnHzIR8nLLgi4q1YT8o/WM+MK/f8yfcc9s5Ir5zRaPZyZU6xs1Syoocg== debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.8, debug@^2.6.9: @@ -4639,6 +4700,11 @@ domexception@^1.0.1: dependencies: webidl-conversions "^4.0.2" +dompurify@^2.0.12: + version "2.3.0" + resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.3.0.tgz#07bb39515e491588e5756b1d3e8375b5964814e2" + integrity sha512-VV5C6Kr53YVHGOBKO/F86OYX6/iLTw2yVSI721gKetxpHCK/V5TaLEf9ODjRgl1KLSWRMY6cUhAbv/c+IUnwQw== + domutils@^1.7.0: version "1.7.0" resolved "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" @@ -6129,6 +6195,13 @@ html-void-elements@^1.0.0: resolved "https://registry.npmjs.org/html-void-elements/-/html-void-elements-1.0.5.tgz#ce9159494e86d95e45795b166c2021c2cfca4483" integrity sha512-uE/TxKuyNIcx44cIWnjr/rfIATDH7ZaOMmstu0CwhFG1Dunhlp4OC6/NMbhiwoq5BpW0ubi303qnEk/PZj614w== +html2canvas@^1.0.0-rc.5: + version "1.0.0" + resolved "https://registry.yarnpkg.com/html2canvas/-/html2canvas-1.0.0.tgz#05c1966aeab08c17d9f113921b6b82d4d56740a4" + integrity sha512-0d/f2Aj1Brn+EeNWkuRdtnT13qu1NdvxhBMvts3ssme7jgPU7dtuwnm1P6cXvXmnDdUUerH5XdhveWvuLfqkew== + dependencies: + css-line-break "1.1.1" + http-deceiver@^1.2.7: version "1.2.7" resolved "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" @@ -7336,6 +7409,24 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" +jspdf-autotable@3.5.9: + version "3.5.9" + resolved "https://registry.yarnpkg.com/jspdf-autotable/-/jspdf-autotable-3.5.9.tgz#8a625ef2aead44271da95e9f649843c401536925" + integrity sha512-ZRfiI5P7leJuWmvC0jGVXu227m68C2Jfz1dkDckshmDYDeVFCGxwIBYdCUXJ8Eb2CyFQC2ok82fEWO+xRDovDQ== + +jspdf@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/jspdf/-/jspdf-2.1.0.tgz#2322f8644bc41845b3abe20db4c3ca0adeadb84c" + integrity sha512-NQygqZEKhSw+nExySJxB72Ge/027YEyIM450Vh/hgay/H9cgZNnkXXOQPRspe9EuCW4sq92zg8hpAXyyBdnaIQ== + dependencies: + atob "^2.1.2" + btoa "^1.2.1" + optionalDependencies: + canvg "^3.0.6" + core-js "^3.6.0" + dompurify "^2.0.12" + html2canvas "^1.0.0-rc.5" + jsprim@^1.2.2: version "1.4.1" resolved "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" @@ -7647,7 +7738,7 @@ loglevelnext@^1.0.1, loglevelnext@^1.0.2: es6-symbol "^3.1.1" object.assign "^4.1.0" -loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -7755,20 +7846,22 @@ match-sorter@^3.0.0: dependencies: remove-accents "0.4.2" -material-table@1.59.0: - version "1.59.0" - resolved "https://registry.npmjs.org/material-table/-/material-table-1.59.0.tgz#fb1d5cafbd4322d113805a923afe9fcd54d34157" - integrity sha512-gI18QcQhtmLoMGuYdhZEdtVBQurgZkB6BGuo4PF5HogoBycJyfy3qbrjLkprLXV4WrZoBZjRThFUEKq4z6zclg== +material-table@1.69.3: + version "1.69.3" + resolved "https://registry.yarnpkg.com/material-table/-/material-table-1.69.3.tgz#3f282cffecf5461985965cd4a516bebb8069bf2d" + integrity sha512-UT/eQbUqfAg6XstcnM8dOQNgWmWbH5tbRmwqfGfPKQUQQXq/jb1z2spFHXPJBhEZFmk+Q95HlopiE6nAHymLMw== dependencies: - "@date-io/date-fns" "^1.1.0" - "@material-ui/pickers" "^3.2.2" - classnames "^2.2.6" - date-fns "^2.0.0-alpha.27" - debounce "^1.2.0" + "@date-io/date-fns" "1.1.0" + "@material-ui/pickers" "3.2.2" + classnames "2.2.6" + date-fns "2.0.0-alpha.27" + debounce "1.2.0" fast-deep-equal "2.0.1" filefy "0.1.10" - prop-types "^15.6.2" - react-beautiful-dnd "11.0.3" + jspdf "2.1.0" + jspdf-autotable "3.5.9" + prop-types "15.6.2" + react-beautiful-dnd "13.0.0" react-double-scrollbar "0.0.15" material-ui-chip-input@2.0.0-beta.2: @@ -7841,11 +7934,16 @@ media-typer@0.3.0: resolved "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= -memoize-one@^5.0.0, memoize-one@^5.0.4: +memoize-one@^5.0.0: version "5.1.1" resolved "https://registry.npmjs.org/memoize-one/-/memoize-one-5.1.1.tgz#047b6e3199b508eaec03504de71229b8eb1d75c0" integrity sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA== +memoize-one@^5.1.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e" + integrity sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q== + memory-fs@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" @@ -9034,6 +9132,14 @@ prompts@^2.0.1: kleur "^3.0.3" sisteransi "^1.0.5" +prop-types@15.6.2: + version "15.6.2" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102" + integrity sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ== + dependencies: + loose-envify "^1.3.1" + object-assign "^4.1.1" + prop-types@15.7.2, prop-types@^15.5.4, 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.npmjs.org/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" @@ -9173,10 +9279,17 @@ quick-lru@^4.0.1: resolved "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== -raf-schd@^4.0.0: - version "4.0.2" - resolved "https://registry.npmjs.org/raf-schd/-/raf-schd-4.0.2.tgz#bd44c708188f2e84c810bf55fcea9231bcaed8a0" - integrity sha512-VhlMZmGy6A6hrkJWHLNTGl5gtgMUm+xfGza6wbwnE914yeQ5Ybm18vgM734RZhMgfw4tacUrWseGZlpUrrakEQ== +raf-schd@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/raf-schd/-/raf-schd-4.0.3.tgz#5d6c34ef46f8b2a0e880a8fcdb743efc5bfdbc1a" + integrity sha512-tQkJl2GRWh83ui2DiPTJz9wEiMN20syf+5oKfB03yYP7ioZcJwsIK8FjrtLwH1m7C7e+Tt2yYBlrOpdT+dyeIQ== + +raf@^3.4.1: + version "3.4.1" + resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39" + integrity sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA== + dependencies: + performance-now "^2.1.0" ramda@0.25.0: version "0.25.0" @@ -9233,19 +9346,18 @@ re-resizable@^4.11.0: resolved "https://registry.npmjs.org/re-resizable/-/re-resizable-4.11.0.tgz#d5df10bda445c4ec0945751a223bf195afb61890" integrity sha512-dye+7rERqNf/6mDT1iwps+4Gf42420xuZgygF33uX178DxffqcyeuHbBuJ382FIcB5iP6mMZOhfW7kI0uXwb/Q== -react-beautiful-dnd@11.0.3: - version "11.0.3" - resolved "https://registry.npmjs.org/react-beautiful-dnd/-/react-beautiful-dnd-11.0.3.tgz#5678bb3e725d8b56cb7cf57f56e952105fc4f2af" - integrity sha512-2FX2SnOlKMmfn90xUHCav7cxRWXwY7FeRa6TzdxWeX7DdP5JTvVQcsWgiOkdbJSj+J+1q1nA9QO4/HQ52D0DAA== +react-beautiful-dnd@13.0.0: + version "13.0.0" + resolved "https://registry.yarnpkg.com/react-beautiful-dnd/-/react-beautiful-dnd-13.0.0.tgz#f70cc8ff82b84bc718f8af157c9f95757a6c3b40" + integrity sha512-87It8sN0ineoC3nBW0SbQuTFXM6bUqM62uJGY4BtTf0yzPl8/3+bHMWkgIe0Z6m8e+gJgjWxefGRVfpE3VcdEg== dependencies: - "@babel/runtime-corejs2" "^7.4.4" - css-box-model "^1.1.2" - memoize-one "^5.0.4" - raf-schd "^4.0.0" - react-redux "^7.0.3" - redux "^4.0.1" - tiny-invariant "^1.0.4" - use-memo-one "^1.1.0" + "@babel/runtime" "^7.8.4" + css-box-model "^1.2.0" + memoize-one "^5.1.1" + raf-schd "^4.0.2" + react-redux "^7.1.1" + redux "^4.0.4" + use-memo-one "^1.1.1" react-codemirror2@^6.0.0: version "6.0.1" @@ -9397,12 +9509,13 @@ react-perfect-scrollbar@^1.5.0: perfect-scrollbar "^1.5.0" prop-types "^15.6.1" -react-redux@^7.0.3: - version "7.2.2" - resolved "https://registry.npmjs.org/react-redux/-/react-redux-7.2.2.tgz#03862e803a30b6b9ef8582dadcc810947f74b736" - integrity sha512-8+CQ1EvIVFkYL/vu6Olo7JFLWop1qRUeb46sGtIMDCSpgwPQq8fPLpirIB0iTqFe9XYEFPHssdX8/UwN6pAkEA== +react-redux@^7.1.1: + version "7.2.4" + resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.4.tgz#1ebb474032b72d806de2e0519cd07761e222e225" + integrity sha512-hOQ5eOSkEJEXdpIKbnRyl04LhaWabkDPV+Ix97wqQX3T3d2NQ8DUblNXXtNMavc7DpswyQM6xfaN4HQDKNY2JA== dependencies: "@babel/runtime" "^7.12.1" + "@types/react-redux" "^7.1.16" hoist-non-react-statics "^3.3.2" loose-envify "^1.4.0" prop-types "^15.7.2" @@ -9571,13 +9684,12 @@ redent@^3.0.0: indent-string "^4.0.0" strip-indent "^3.0.0" -redux@^4.0.1: - version "4.0.5" - resolved "https://registry.npmjs.org/redux/-/redux-4.0.5.tgz#4db5de5816e17891de8a80c424232d06f051d93f" - integrity sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w== +redux@^4.0.0, redux@^4.0.4: + version "4.1.0" + resolved "https://registry.yarnpkg.com/redux/-/redux-4.1.0.tgz#eb049679f2f523c379f1aff345c8612f294c88d4" + integrity sha512-uI2dQN43zqLWCt6B/BMGRMY6db7TTY4qeHHfGeKb3EOhmOKjU3KdWvNLJyqaHRksv/ErdNH7cFZWg9jXtewy4g== dependencies: - loose-envify "^1.4.0" - symbol-observable "^1.2.0" + "@babel/runtime" "^7.9.2" regenerate-unicode-properties@^8.2.0: version "8.2.0" @@ -9944,6 +10056,11 @@ retry@^0.12.0: resolved "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= +rgbcolor@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/rgbcolor/-/rgbcolor-1.0.1.tgz#d6505ecdb304a6595da26fa4b43307306775945d" + integrity sha1-1lBezbMEplldom+ktDMHMGd1lF0= + rifm@^0.7.0: version "0.7.0" resolved "https://registry.npmjs.org/rifm/-/rifm-0.7.0.tgz#debe951a9c83549ca6b33e5919f716044c2230be" @@ -10515,6 +10632,11 @@ stack-utils@^1.0.1: dependencies: escape-string-regexp "^2.0.0" +stackblur-canvas@^2.0.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/stackblur-canvas/-/stackblur-canvas-2.5.0.tgz#aa87bbed1560fdcd3138fff344fc6a1c413ebac4" + integrity sha512-EeNzTVfj+1In7aSLPKDD03F/ly4RxEuF/EX0YcOG0cKoPXs+SLZxDawQbexQDBzwROs4VKLWTOaZQlZkGBFEIQ== + state-toggle@^1.0.0: version "1.0.3" resolved "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.3.tgz#e123b16a88e143139b09c6852221bc9815917dfe" @@ -10785,6 +10907,11 @@ svg-parser@^2.0.0: resolved "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.4.tgz#fdc2e29e13951736140b76cb122c8ee6630eb6b5" integrity sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ== +svg-pathdata@^5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/svg-pathdata/-/svg-pathdata-5.0.5.tgz#65e8d765642ba15fe15434444087d082bc526b29" + integrity sha512-TAAvLNSE3fEhyl/Da19JWfMAdhSXTYeviXsLSoDT1UM76ADj5ndwAPX1FKQEgB/gFMPavOy6tOqfalXKUiXrow== + svgo@^1.2.2: version "1.3.2" resolved "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz#b6dc511c063346c9e415b81e43401145b96d4167" @@ -10804,7 +10931,7 @@ svgo@^1.2.2: unquote "~1.1.1" util.promisify "~1.0.0" -symbol-observable@1.2.0, symbol-observable@^1.2.0: +symbol-observable@1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== @@ -10914,7 +11041,7 @@ timers-browserify@^2.0.4: dependencies: setimmediate "^1.0.4" -tiny-invariant@^1.0.4, tiny-invariant@^1.0.6: +tiny-invariant@^1.0.6: version "1.1.0" resolved "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.1.0.tgz#634c5f8efdc27714b7f386c35e6760991d230875" integrity sha512-ytxQvrb1cPc9WBEI/HSeYYoGD0kWnGEOR8RY6KomWLBVhqz0RgTwVO9dLrGz7dC+nN9llyI7OKAgRq8Vq4ZBSw== @@ -11060,7 +11187,7 @@ tryer@^1.0.1: resolved "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8" integrity sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA== -tslib@^1.8.1, tslib@^1.9.0: +tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: version "1.14.1" resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -11464,10 +11591,10 @@ url@^0.11.0: punycode "1.3.2" querystring "0.2.0" -use-memo-one@^1.1.0: - version "1.1.1" - resolved "https://registry.npmjs.org/use-memo-one/-/use-memo-one-1.1.1.tgz#39e6f08fe27e422a7d7b234b5f9056af313bd22c" - integrity sha512-oFfsyun+bP7RX8X2AskHNTxu+R3QdE/RC5IefMbqptmACAA/gfol1KDD5KRzPsGMa62sWxGZw+Ui43u6x4ddoQ== +use-memo-one@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/use-memo-one/-/use-memo-one-1.1.2.tgz#0c8203a329f76e040047a35a1197defe342fab20" + integrity sha512-u2qFKtxLsia/r8qG0ZKkbytbztzRb317XCkT7yP8wxL0tZ/CzK2G+WWie5vWvpyeP7+YoPIwbJoIHJ4Ba4k0oQ== use@^3.1.0: version "3.1.1" From e0bf6bda607c5d967d7427ea840054c95def8737 Mon Sep 17 00:00:00 2001 From: leorigon Date: Tue, 6 Jul 2021 20:35:14 -0300 Subject: [PATCH 3/4] chore(editable-table-input): add comment to explain the useRef aprroach, add 4 spaces in the eslint json --- .eslintrc.json | 420 ++++++++++++++++++------------------- src/core/EditableTable.tsx | 3 + 2 files changed, 213 insertions(+), 210 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 7c9583b7..f32fecc9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,213 +1,213 @@ { - "parser": "@typescript-eslint/parser", - "parserOptions": { - "jsx": true, - "useJSXTextNode": true - }, - "extends": [ - "plugin:@typescript-eslint/recommended", - "plugin:react/recommended", - "eslint:recommended", - "prettier", - "prettier/@typescript-eslint", - "plugin:ramda/recommended" - ], - "rules": { - "template-curly-spacing": "off", - "no-sequences": "error", - "spaced-comment": [ - "error", - "always" - ], - "key-spacing": [ - "error", - { - "mode": "strict" - } - ], - "max-len": [ - "error", - { - "code": 85 - } - ], - "max-lines": [ - "error", - { - "max": 350, - "skipBlankLines": true - } - ], - "prefer-const": [ - "error", - { - "destructuring": "all" - } - ], - "no-var": "error", - "newline-before-return": "error", - "arrow-parens": [ - "error", - "as-needed" - ], - "no-bitwise": "error", - "max-classes-per-file": "error", - "no-duplicate-imports": "error", - "lines-between-class-members": [ - "error", - "always" - ], - "padding-line-between-statements": [ - "error", - { - "blankLine": "always", - "prev": "*", - "next": "return" - } - ], - "sort-imports": [ - "error", - { - "ignoreCase": true, - "ignoreDeclarationSort": true, - "ignoreMemberSort": true, - "memberSyntaxSortOrder": [ - "none", - "all", - "multiple", - "single" - ] - } - ], - "no-irregular-whitespace": "error", - "space-before-blocks": "error", - "no-multi-spaces": "error", - "no-trailing-spaces": "error", - "no-whitespace-before-property": "error", - "curly": "error", - "no-undef": "off", - "no-case-declarations": "off", - "indent": "off", - "no-unused-vars": [ - "off" - ], - "no-console": [ - "error", - { - "allow": [ - "log", - "error" - ] - } - ], - "comma-dangle": [ - "error", - "never" - ], - "semi": [ - "error", - "never" - ], - "no-multiple-empty-lines": [ - "error", - { - "max": 1 - } - ], - "quotes": [ - "error", - "single" - ], - "eol-last": [ - "error", - "always" - ], - "no-new-wrappers": "error", - "arrow-spacing": [ - "error", - { - "after": true, - "before": true - } - ], - "valid-jsdoc": "error", - "object-curly-spacing": [ - "error", - "always" - ], - "react/jsx-closing-bracket-location": [ - 1, - { - "selfClosing": "line-aligned", - "nonEmpty": "after-props" - } - ], - "react/prop-types": "off", - "react/display-name": "off", - "react/jsx-boolean-value": "off", - "react/jsx-wrap-multilines": "off", - "react/jsx-curly-spacing": [ - "error", - { - "when": "always", - "children": true - } - ], - "react/no-unescaped-entities": "off", - "prefer-arrow/prefer-arrow-functions": [ - "warn", - { - "disallowPrototype": true, - "singleReturnOnly": true, - "classPropertiesAllowed": false - } - ], - "@typescript-eslint/no-unused-vars": [ - "error", - { - "ignoreRestSiblings": true - } - ], - "@typescript-eslint/no-explicit-any": "error", - "@typescript-eslint/class-name-casing": "error", - "@typescript-eslint/member-ordering": [ - "error", - { - "classes": [ - "public-static-field", - "public-instance-field", - "private-static-field", - "private-instance-field", - "private-constructor", - "public-constructor", - "private-instance-method", - "protected-instance-method", - "public-instance-method" - ] - } - ], - "@typescript-eslint/prefer-interface": "off", - "@typescript-eslint/explicit-member-accessibility": "off", - "@typescript-eslint/no-var-requires": "off", - "@typescript-eslint/no-non-null-assertion": "off", - "@typescript-eslint/no-object-literal-type-assertion": "off", - "@typescript-eslint/interface-name-prefix": [ - "error", - "always" - ], - "@typescript-eslint/array-type": "off", - "@typescript-eslint/explicit-function-return-type": "off" - }, - "plugins": [ - "react", - "prefer-arrow", - "@typescript-eslint", - "ramda" - ], - "settings": { - "react": { - "pragma": "React", - "version": "16.8.6" + "parser": "@typescript-eslint/parser", + "parserOptions": { + "jsx": true, + "useJSXTextNode": true + }, + "extends": [ + "plugin:@typescript-eslint/recommended", + "plugin:react/recommended", + "eslint:recommended", + "prettier", + "prettier/@typescript-eslint", + "plugin:ramda/recommended" + ], + "rules": { + "template-curly-spacing": "off", + "no-sequences": "error", + "spaced-comment": [ + "error", + "always" + ], + "key-spacing": [ + "error", + { + "mode": "strict" + } + ], + "max-len": [ + "error", + { + "code": 85 + } + ], + "max-lines": [ + "error", + { + "max": 350, + "skipBlankLines": true + } + ], + "prefer-const": [ + "error", + { + "destructuring": "all" + } + ], + "no-var": "error", + "newline-before-return": "error", + "arrow-parens": [ + "error", + "as-needed" + ], + "no-bitwise": "error", + "max-classes-per-file": "error", + "no-duplicate-imports": "error", + "lines-between-class-members": [ + "error", + "always" + ], + "padding-line-between-statements": [ + "error", + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "sort-imports": [ + "error", + { + "ignoreCase": true, + "ignoreDeclarationSort": true, + "ignoreMemberSort": true, + "memberSyntaxSortOrder": [ + "none", + "all", + "multiple", + "single" + ] + } + ], + "no-irregular-whitespace": "error", + "space-before-blocks": "error", + "no-multi-spaces": "error", + "no-trailing-spaces": "error", + "no-whitespace-before-property": "error", + "curly": "error", + "no-undef": "off", + "no-case-declarations": "off", + "indent": "off", + "no-unused-vars": [ + "off" + ], + "no-console": [ + "error", + { + "allow": [ + "log", + "error" + ] + } + ], + "comma-dangle": [ + "error", + "never" + ], + "semi": [ + "error", + "never" + ], + "no-multiple-empty-lines": [ + "error", + { + "max": 1 + } + ], + "quotes": [ + "error", + "single" + ], + "eol-last": [ + "error", + "always" + ], + "no-new-wrappers": "error", + "arrow-spacing": [ + "error", + { + "after": true, + "before": true + } + ], + "valid-jsdoc": "error", + "object-curly-spacing": [ + "error", + "always" + ], + "react/jsx-closing-bracket-location": [ + 1, + { + "selfClosing": "line-aligned", + "nonEmpty": "after-props" + } + ], + "react/prop-types": "off", + "react/display-name": "off", + "react/jsx-boolean-value": "off", + "react/jsx-wrap-multilines": "off", + "react/jsx-curly-spacing": [ + "error", + { + "when": "always", + "children": true + } + ], + "react/no-unescaped-entities": "off", + "prefer-arrow/prefer-arrow-functions": [ + "warn", + { + "disallowPrototype": true, + "singleReturnOnly": true, + "classPropertiesAllowed": false + } + ], + "@typescript-eslint/no-unused-vars": [ + "error", + { + "ignoreRestSiblings": true + } + ], + "@typescript-eslint/no-explicit-any": "error", + "@typescript-eslint/class-name-casing": "error", + "@typescript-eslint/member-ordering": [ + "error", + { + "classes": [ + "public-static-field", + "public-instance-field", + "private-static-field", + "private-instance-field", + "private-constructor", + "public-constructor", + "private-instance-method", + "protected-instance-method", + "public-instance-method" + ] + } + ], + "@typescript-eslint/prefer-interface": "off", + "@typescript-eslint/explicit-member-accessibility": "off", + "@typescript-eslint/no-var-requires": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/no-object-literal-type-assertion": "off", + "@typescript-eslint/interface-name-prefix": [ + "error", + "always" + ], + "@typescript-eslint/array-type": "off", + "@typescript-eslint/explicit-function-return-type": "off" + }, + "plugins": [ + "react", + "prefer-arrow", + "@typescript-eslint", + "ramda" + ], + "settings": { + "react": { + "pragma": "React", + "version": "16.8.6" + } } - } } \ No newline at end of file diff --git a/src/core/EditableTable.tsx b/src/core/EditableTable.tsx index 4dc22afb..e724b18c 100644 --- a/src/core/EditableTable.tsx +++ b/src/core/EditableTable.tsx @@ -269,6 +269,9 @@ const EditableTable = (props: IProps) => { thousandSeparator='.' decimalSeparator=',' decimalScale={ 0 } + // This approach was necessary to fix the + // library problem to handle with the state + // values of the inputs value={ error ? valueRef.current : localProps.value ?? valueRef.current } From f6fab372a184c70c7407aa0e0f800b117102b034 Mon Sep 17 00:00:00 2001 From: leorigon Date: Tue, 6 Jul 2021 20:38:09 -0300 Subject: [PATCH 4/4] chore(editable-table-input): update flipper-ui version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b7310813..fb91e9f1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flipper-ui", - "version": "0.24.8", + "version": "0.24.9", "description": "", "main": "dist/index.js", "homepage": "https://flipper-ui.vercel.app",