From 72dfe80843b8d29794875f7c7a538775d2b3fc2b Mon Sep 17 00:00:00 2001 From: Eduard Heimbuch Date: Mon, 2 Jan 2023 08:59:07 +0100 Subject: [PATCH] Introduce ui-forms framework Adding a new ui framework to make creating forms as easy and consistent as possible. It wraps a lot of boilerplate code and enforces good practices for make the forms in the "SCM-Manager way". Co-authored-by: Florian Scholdei Co-authored-by: Konstantin Schaper Reviewed-by: Rene Pfeuffer --- scm-ui/ui-buttons/package.json | 7 +- ...{button.stories.tsx => Button.stories.tsx} | 2 +- ...st.stories.mdx => Button.test.stories.mdx} | 5 +- .../ui-buttons/src/{button.tsx => Button.tsx} | 35 +- scm-ui/ui-buttons/src/index.ts | 2 +- scm-ui/ui-components/package.json | 4 +- .../src/__snapshots__/storyshots.test.ts.snap | 152 +- .../src/markdown/LazyMarkdownView.tsx | 2 +- .../ui-forms/.storybook/RemoveThemesPlugin.js | 57 + scm-ui/ui-forms/.storybook/main.js | 92 + scm-ui/ui-forms/.storybook/preview-head.html | 26 + scm-ui/ui-forms/.storybook/preview.js | 72 + scm-ui/ui-forms/package.json | 49 + scm-ui/ui-forms/src/Form.stories.mdx | 160 ++ scm-ui/ui-forms/src/Form.tsx | 161 ++ scm-ui/ui-forms/src/FormRow.tsx | 37 + scm-ui/ui-forms/src/ScmFormContext.tsx | 42 + scm-ui/ui-forms/src/base/Control.tsx | 34 + scm-ui/ui-forms/src/base/Field.tsx | 33 + .../src/base/field-message/FieldMessage.tsx | 34 + scm-ui/ui-forms/src/base/help/Help.tsx | 36 + scm-ui/ui-forms/src/base/label/Label.tsx | 33 + .../src/checkbox/Checkbox.stories.mdx | 26 + scm-ui/ui-forms/src/checkbox/Checkbox.tsx | 85 + .../ui-forms/src/checkbox/CheckboxField.tsx | 39 + .../ControlledCheckboxField.stories.mdx | 36 + .../src/checkbox/ControlledCheckboxField.tsx | 76 + scm-ui/ui-forms/src/index.ts | 26 + .../input/ControlledInputField.stories.mdx | 36 + .../src/input/ControlledInputField.tsx | 77 + ...trolledSecretConfirmationField.stories.mdx | 39 + .../ControlledSecretConfirmationField.tsx | 121 ++ scm-ui/ui-forms/src/input/Input.stories.mdx | 22 + scm-ui/ui-forms/src/input/Input.tsx | 46 + .../ui-forms/src/input/InputField.stories.mdx | 22 + scm-ui/ui-forms/src/input/InputField.tsx | 60 + scm-ui/ui-forms/src/resourceHooks.ts | 152 ++ scm-ui/ui-forms/src/variants.ts | 27 + scm-ui/ui-forms/tsconfig.json | 3 + scm-ui/ui-plugins/package.json | 4 +- scm-ui/ui-shortcuts/package.json | 4 +- scm-ui/ui-shortcuts/src/useShortcut.ts | 2 +- scm-ui/ui-webapp/package.json | 11 +- scm-ui/ui-webapp/public/locales/de/users.json | 47 +- scm-ui/ui-webapp/public/locales/en/users.json | 47 +- scm-ui/ui-webapp/public/locales/es/users.json | 45 +- scm-ui/ui-webapp/src/i18n.ts | 14 +- .../src/users/components/UserForm.test.tsx | 210 --- .../src/users/components/UserForm.tsx | 210 --- .../src/users/containers/CreateUser.tsx | 97 +- .../src/users/containers/EditUser.tsx | 42 +- yarn.lock | 1558 ++++++++++++++++- 52 files changed, 3711 insertions(+), 548 deletions(-) rename scm-ui/ui-buttons/src/{button.stories.tsx => Button.stories.tsx} (99%) rename scm-ui/ui-buttons/src/{button.test.stories.mdx => Button.test.stories.mdx} (91%) rename scm-ui/ui-buttons/src/{button.tsx => Button.tsx} (71%) create mode 100644 scm-ui/ui-forms/.storybook/RemoveThemesPlugin.js create mode 100644 scm-ui/ui-forms/.storybook/main.js create mode 100644 scm-ui/ui-forms/.storybook/preview-head.html create mode 100644 scm-ui/ui-forms/.storybook/preview.js create mode 100644 scm-ui/ui-forms/package.json create mode 100644 scm-ui/ui-forms/src/Form.stories.mdx create mode 100644 scm-ui/ui-forms/src/Form.tsx create mode 100644 scm-ui/ui-forms/src/FormRow.tsx create mode 100644 scm-ui/ui-forms/src/ScmFormContext.tsx create mode 100644 scm-ui/ui-forms/src/base/Control.tsx create mode 100644 scm-ui/ui-forms/src/base/Field.tsx create mode 100644 scm-ui/ui-forms/src/base/field-message/FieldMessage.tsx create mode 100644 scm-ui/ui-forms/src/base/help/Help.tsx create mode 100644 scm-ui/ui-forms/src/base/label/Label.tsx create mode 100644 scm-ui/ui-forms/src/checkbox/Checkbox.stories.mdx create mode 100644 scm-ui/ui-forms/src/checkbox/Checkbox.tsx create mode 100644 scm-ui/ui-forms/src/checkbox/CheckboxField.tsx create mode 100644 scm-ui/ui-forms/src/checkbox/ControlledCheckboxField.stories.mdx create mode 100644 scm-ui/ui-forms/src/checkbox/ControlledCheckboxField.tsx create mode 100644 scm-ui/ui-forms/src/index.ts create mode 100644 scm-ui/ui-forms/src/input/ControlledInputField.stories.mdx create mode 100644 scm-ui/ui-forms/src/input/ControlledInputField.tsx create mode 100644 scm-ui/ui-forms/src/input/ControlledSecretConfirmationField.stories.mdx create mode 100644 scm-ui/ui-forms/src/input/ControlledSecretConfirmationField.tsx create mode 100644 scm-ui/ui-forms/src/input/Input.stories.mdx create mode 100644 scm-ui/ui-forms/src/input/Input.tsx create mode 100644 scm-ui/ui-forms/src/input/InputField.stories.mdx create mode 100644 scm-ui/ui-forms/src/input/InputField.tsx create mode 100644 scm-ui/ui-forms/src/resourceHooks.ts create mode 100644 scm-ui/ui-forms/src/variants.ts create mode 100644 scm-ui/ui-forms/tsconfig.json delete mode 100644 scm-ui/ui-webapp/src/users/components/UserForm.test.tsx delete mode 100644 scm-ui/ui-webapp/src/users/components/UserForm.tsx diff --git a/scm-ui/ui-buttons/package.json b/scm-ui/ui-buttons/package.json index c92e8f3f94..58e31de6d9 100644 --- a/scm-ui/ui-buttons/package.json +++ b/scm-ui/ui-buttons/package.json @@ -23,7 +23,8 @@ "react": "^17.0.1", "react-dom": "^17.0.1", "react-router-dom": "^5.3.1", - "classnames": "^2.2.6" + "classnames": "^2.2.6", + "@scm-manager/ui-components": "2.40.2-SNAPSHOT" }, "devDependencies": { "@scm-manager/prettier-config": "^2.11.1", @@ -57,7 +58,7 @@ "html-webpack-plugin": "^5.5.0", "react-query": "^3.25.1", "i18next": "^19.9.2", - "react-i18next": "^10.13.2", + "react-i18next": "11", "i18next-fetch-backend": "^2.3.1", "depcheck": "^1.4.3" }, @@ -80,4 +81,4 @@ "publishConfig": { "access": "restricted" } -} \ No newline at end of file +} diff --git a/scm-ui/ui-buttons/src/button.stories.tsx b/scm-ui/ui-buttons/src/Button.stories.tsx similarity index 99% rename from scm-ui/ui-buttons/src/button.stories.tsx rename to scm-ui/ui-buttons/src/Button.stories.tsx index b5cddfd31f..72fe5f1e6d 100644 --- a/scm-ui/ui-buttons/src/button.stories.tsx +++ b/scm-ui/ui-buttons/src/Button.stories.tsx @@ -30,7 +30,7 @@ import { ButtonVariants, ExternalLinkButton as ExternalLinkButtonComponent, LinkButton as LinkButtonComponent, -} from "./button"; +} from "./Button"; import StoryRouter from "storybook-react-router"; import { StoryFn } from "@storybook/react"; diff --git a/scm-ui/ui-buttons/src/button.test.stories.mdx b/scm-ui/ui-buttons/src/Button.test.stories.mdx similarity index 91% rename from scm-ui/ui-buttons/src/button.test.stories.mdx rename to scm-ui/ui-buttons/src/Button.test.stories.mdx index 015b24e6c4..0a6db5dccd 100644 --- a/scm-ui/ui-buttons/src/button.test.stories.mdx +++ b/scm-ui/ui-buttons/src/Button.test.stories.mdx @@ -1,5 +1,5 @@ import { Meta, Story } from "@storybook/addon-docs"; -import { Button, ButtonVariantList } from "./button"; +import { Button, ButtonVariantList } from "./Button"; @@ -18,9 +18,10 @@ import { Button, ButtonVariantList } from "./button"; STATE {ButtonVariantList.map(variant => {variant.toUpperCase()})} - {["Normal", "Hover", "Active", "Focus", "Disabled"].map(state => + {["Normal", "Hover", "Active", "Focus", "Disabled", "Loading"].map(state => {state} {ButtonVariantList.map(variant => )} )} diff --git a/scm-ui/ui-buttons/src/button.tsx b/scm-ui/ui-buttons/src/Button.tsx similarity index 71% rename from scm-ui/ui-buttons/src/button.tsx rename to scm-ui/ui-buttons/src/Button.tsx index cc0c79d1b4..946a744f31 100644 --- a/scm-ui/ui-buttons/src/button.tsx +++ b/scm-ui/ui-buttons/src/Button.tsx @@ -25,6 +25,7 @@ import React, { AnchorHTMLAttributes, ButtonHTMLAttributes } from "react"; import { Link as ReactRouterLink, LinkProps as ReactRouterLinkProps } from "react-router-dom"; import classNames from "classnames"; +import { createAttributesForTesting } from "@scm-manager/ui-components"; export const ButtonVariants = { PRIMARY: "primary", @@ -37,16 +38,19 @@ export const ButtonVariantList = Object.values(ButtonVariants); type ButtonVariant = typeof ButtonVariants[keyof typeof ButtonVariants]; -const createButtonClasses = (variant?: ButtonVariant) => +const createButtonClasses = (variant?: ButtonVariant, isLoading?: boolean) => classNames("button", { "is-primary": variant === "primary", "is-primary is-outlined": variant === "secondary", "is-primary is-inverted": variant === "tertiary", "is-warning": variant === "signal", + "is-loading": isLoading, }); type BaseButtonProps = { - variant: ButtonVariant; + variant?: ButtonVariant; + isLoading?: boolean; + testId?: string; }; type ButtonProps = BaseButtonProps & ButtonHTMLAttributes; @@ -55,8 +59,13 @@ type ButtonProps = BaseButtonProps & ButtonHTMLAttributes; * Styled html button */ export const Button = React.forwardRef( - ({ className, variant, children, ...props }, ref) => ( - ) @@ -68,8 +77,13 @@ type LinkButtonProps = BaseButtonProps & ReactRouterLinkProps; * Styled react router link */ export const LinkButton = React.forwardRef( - ({ className, variant, children, ...props }, ref) => ( - + ({ className, variant, isLoading, testId, children, ...props }, ref) => ( + {children} ) @@ -81,8 +95,13 @@ type ExternalLinkButtonProps = BaseButtonProps & AnchorHTMLAttributes( - ({ className, variant, children, ...props }, ref) => ( - + ({ className, variant, isLoading, testId, children, ...props }, ref) => ( + {children} ) diff --git a/scm-ui/ui-buttons/src/index.ts b/scm-ui/ui-buttons/src/index.ts index af2328da83..c87c506ac1 100644 --- a/scm-ui/ui-buttons/src/index.ts +++ b/scm-ui/ui-buttons/src/index.ts @@ -22,4 +22,4 @@ * SOFTWARE. */ -export { Button, LinkButton, ExternalLinkButton, ButtonVariants } from "./button"; +export { Button, LinkButton, ExternalLinkButton, ButtonVariants } from "./Button"; diff --git a/scm-ui/ui-components/package.json b/scm-ui/ui-components/package.json index 265b1f4089..5460affce7 100644 --- a/scm-ui/ui-components/package.json +++ b/scm-ui/ui-components/package.json @@ -79,7 +79,7 @@ "react-diff-view": "^2.4.10", "react-dom": "^17.0.1", "react-hook-form": "^7.5.1", - "react-i18next": "^10.13.1", + "react-i18next": "11", "react-router": "^5.3.1", "react-router-dom": "^5.3.1", "react-select": "^2.1.2", @@ -108,4 +108,4 @@ "publishConfig": { "access": "public" } -} \ No newline at end of file +} diff --git a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap index 597f2f2f9e..0e11dcff36 100644 --- a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap +++ b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap @@ -20156,10 +20156,14 @@ exports[`Storyshots Repositories/Changesets Co-Authors with avatar 1`] = `

+ > + repos:changeset.summary +

+ > + repos:changeset.shortSummary +

@@ -20324,10 +20328,14 @@ exports[`Storyshots Repositories/Changesets Commiter and Co-Authors with avatar

+ > + repos:changeset.summary +

+ > + repos:changeset.shortSummary +

@@ -20468,10 +20476,14 @@ exports[`Storyshots Repositories/Changesets Default 1`] = `

+ > + repos:changeset.summary +

+ > + repos:changeset.shortSummary +

@@ -20583,10 +20595,14 @@ exports[`Storyshots Repositories/Changesets List with navigation 1`] = `

+ > + repos:changeset.summary +

+ > + repos:changeset.shortSummary +

@@ -20712,10 +20728,14 @@ exports[`Storyshots Repositories/Changesets List with navigation 1`] = `

+ > + repos:changeset.summary +

+ > + repos:changeset.shortSummary +

@@ -20832,10 +20852,14 @@ exports[`Storyshots Repositories/Changesets List with navigation 1`] = `

+ > + repos:changeset.summary +

+ > + repos:changeset.shortSummary +

@@ -20957,10 +20981,14 @@ exports[`Storyshots Repositories/Changesets Replacements 1`] = `

+ > + repos:changeset.summary +

+ > + repos:changeset.shortSummary +

@@ -21072,10 +21100,14 @@ exports[`Storyshots Repositories/Changesets With Committer 1`] = `

+ > + repos:changeset.summary +

+ > + repos:changeset.shortSummary +

@@ -21199,10 +21231,14 @@ exports[`Storyshots Repositories/Changesets With Committer and Co-Author 1`] = `

+ > + repos:changeset.summary +

+ > + repos:changeset.shortSummary +

@@ -21348,10 +21384,14 @@ exports[`Storyshots Repositories/Changesets With avatar 1`] = `

+ > + repos:changeset.summary +

+ > + repos:changeset.shortSummary +

@@ -21463,10 +21503,14 @@ exports[`Storyshots Repositories/Changesets With contactless signature 1`] = `

+ > + repos:changeset.summary +

+ > + repos:changeset.shortSummary +

@@ -21587,10 +21631,14 @@ exports[`Storyshots Repositories/Changesets With invalid signature 1`] = `

+ > + repos:changeset.summary +

+ > + repos:changeset.shortSummary +

@@ -21711,10 +21759,14 @@ exports[`Storyshots Repositories/Changesets With multiple Co-Authors 1`] = `

+ > + repos:changeset.summary +

+ > + repos:changeset.shortSummary +

@@ -21839,10 +21891,14 @@ exports[`Storyshots Repositories/Changesets With multiple signatures and invalid

+ > + repos:changeset.summary +

+ > + repos:changeset.shortSummary +

@@ -21963,10 +22019,14 @@ exports[`Storyshots Repositories/Changesets With multiple signatures and not fou

+ > + repos:changeset.summary +

+ > + repos:changeset.shortSummary +

@@ -22087,10 +22147,14 @@ exports[`Storyshots Repositories/Changesets With multiple signatures and valid s

+ > + repos:changeset.summary +

+ > + repos:changeset.shortSummary +

@@ -22211,10 +22275,14 @@ exports[`Storyshots Repositories/Changesets With unknown signature 1`] = `

+ > + repos:changeset.summary +

+ > + repos:changeset.shortSummary +

@@ -22335,10 +22403,14 @@ exports[`Storyshots Repositories/Changesets With unowned signature 1`] = `

+ > + repos:changeset.summary +

+ > + repos:changeset.shortSummary +

@@ -22459,10 +22531,14 @@ exports[`Storyshots Repositories/Changesets With valid signature 1`] = `

+ > + repos:changeset.summary +

+ > + repos:changeset.shortSummary +

diff --git a/scm-ui/ui-components/src/markdown/LazyMarkdownView.tsx b/scm-ui/ui-components/src/markdown/LazyMarkdownView.tsx index 9f5aac0226..b26a7c913e 100644 --- a/scm-ui/ui-components/src/markdown/LazyMarkdownView.tsx +++ b/scm-ui/ui-components/src/markdown/LazyMarkdownView.tsx @@ -241,4 +241,4 @@ class LazyMarkdownView extends React.Component { } } -export default withRouter(withTranslation("repos")(LazyMarkdownView)); +export default withTranslation("repos")(withRouter(LazyMarkdownView)); diff --git a/scm-ui/ui-forms/.storybook/RemoveThemesPlugin.js b/scm-ui/ui-forms/.storybook/RemoveThemesPlugin.js new file mode 100644 index 0000000000..9976554354 --- /dev/null +++ b/scm-ui/ui-forms/.storybook/RemoveThemesPlugin.js @@ -0,0 +1,57 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +const HtmlWebpackPlugin = require('html-webpack-plugin'); + +class RemoveThemesPlugin { + apply (compiler) { + compiler.hooks.compilation.tap('RemoveThemesPlugin', (compilation) => { + + HtmlWebpackPlugin.getHooks(compilation).beforeAssetTagGeneration.tapAsync( + 'RemoveThemesPlugin', + (data, cb) => { + + // remove generated style-loader bundles from the page + // there should be a better way, which does not generate the bundles at all + // but for now it works + if (data.assets.js) { + data.assets.js = data.assets.js.filter(bundle => !bundle.startsWith("ui-theme-")) + .filter(bundle => !bundle.startsWith("runtime~ui-theme-")) + } + + // remove css links to avoid conflicts with the themes + // so we remove all and add our own via preview-head.html + if (data.assets.css) { + data.assets.css = data.assets.css.filter(css => !css.startsWith("ui-theme-")) + } + + // Tell webpack to move on + cb(null, data) + } + ) + }) + } +} + +module.exports = RemoveThemesPlugin diff --git a/scm-ui/ui-forms/.storybook/main.js b/scm-ui/ui-forms/.storybook/main.js new file mode 100644 index 0000000000..ca2439380d --- /dev/null +++ b/scm-ui/ui-forms/.storybook/main.js @@ -0,0 +1,92 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +const path = require("path"); +const fs = require("fs"); +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); +const RemoveThemesPlugin = require("./RemoveThemesPlugin"); +const ReactDOM = require("react-dom"); + +const root = path.resolve(".."); + +const themedir = path.join(root, "ui-styles", "src"); + +ReactDOM.createPortal = (node) => node; + +const themes = fs + .readdirSync(themedir) + .map((filename) => path.parse(filename)) + .filter((p) => p.ext === ".scss") + .reduce((entries, current) => ({ ...entries, [`ui-theme-${current.name}`]: path.join(themedir, current.base) }), {}); + +module.exports = { + typescript: { reactDocgen: false }, + core: { + builder: "webpack5", + }, + stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"], + addons: [ + "storybook-addon-i18next", + "storybook-addon-themes", + "@storybook/addon-links", + "@storybook/addon-essentials", + "@storybook/addon-interactions", + "@storybook/addon-a11y", + "storybook-addon-pseudo-states", + "storybook-addon-mock", + ], + framework: "@storybook/react", + webpackFinal: async (config) => { + // add our themes to webpack entry points + config.entry = { + main: config.entry, + ...themes, + }; + + // create separate css files for our themes + config.plugins.push( + new MiniCssExtractPlugin({ + filename: "[name].css", + ignoreOrder: false, + }) + ); + + config.module.rules.push({ + test: /\.scss$/, + use: [MiniCssExtractPlugin.loader, "css-loader", "sass-loader"], + }); + + // the html-webpack-plugin adds the generated css and js files to the iframe, + // which overrides our manually loaded css files. + // So we use a custom plugin which uses a hook of html-webpack-plugin + // to filter our themes from the output. + config.plugins.push(new RemoveThemesPlugin()); + + // force cjs instead of esm + // https://github.com/tannerlinsley/react-query/issues/3513 + config.resolve.alias["react-query/devtools"] = require.resolve("react-query/devtools"); + + return config; + }, +}; diff --git a/scm-ui/ui-forms/.storybook/preview-head.html b/scm-ui/ui-forms/.storybook/preview-head.html new file mode 100644 index 0000000000..d1c34ac7ef --- /dev/null +++ b/scm-ui/ui-forms/.storybook/preview-head.html @@ -0,0 +1,26 @@ + + + + diff --git a/scm-ui/ui-forms/.storybook/preview.js b/scm-ui/ui-forms/.storybook/preview.js new file mode 100644 index 0000000000..bcf0b7184a --- /dev/null +++ b/scm-ui/ui-forms/.storybook/preview.js @@ -0,0 +1,72 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import React, { useEffect } from "react"; +import { I18nextProvider, initReactI18next } from "react-i18next"; +import i18n from "i18next"; + +i18n.use(initReactI18next).init({ + whitelist: ["en", "de"], + lng: "en", + fallbackLng: "en", + interpolation: { + escapeValue: false, + }, + react: { + useSuspense: false, + }, + +}); + +const Decorator = ({ children, themeName }) => { + useEffect(() => { + const link = document.querySelector("#ui-theme"); + if (link && link["data-theme"] !== themeName) { + link.href = `ui-theme-${themeName}.css`; + link["data-theme"] = themeName; + } + }, [themeName]); + return <>{children}; +}; + +export const parameters = { + actions: { argTypesRegex: "^on[A-Z].*" }, + decorators: [ + (Story) => ( + + + + ), + ], + themes: { + Decorator, + clearable: false, + default: "light", + list: [ + { name: "light", color: "#fff" }, + { name: "highcontrast", color: "#050514" }, + { name: "dark", color: "#121212" }, + ], + }, +}; diff --git a/scm-ui/ui-forms/package.json b/scm-ui/ui-forms/package.json new file mode 100644 index 0000000000..04e72c8cf9 --- /dev/null +++ b/scm-ui/ui-forms/package.json @@ -0,0 +1,49 @@ +{ + "name": "@scm-manager/ui-forms", + "private": true, + "version": "2.40.2-SNAPSHOT", + "main": "build/index.js", + "types": "build/index.d.ts", + "module": "build/index.mjs", + "license": "MIT", + "scripts": { + "build": "tsup ./src/index.ts -d build --format esm,cjs --dts", + "storybook": "start-storybook -p 6006", + "build-storybook": "build-storybook" + }, + "devDependencies": { + "@babel/core": "^7.19.0", + "@scm-manager/eslint-config": "^2.16.0", + "@scm-manager/prettier-config": "^2.10.1", + "@scm-manager/tsconfig": "^2.13.0", + "@scm-manager/ui-styles": "2.40.2-SNAPSHOT", + "@storybook/addon-actions": "^6.5.10", + "@storybook/addon-essentials": "^6.5.10", + "@storybook/addon-interactions": "^6.5.10", + "@storybook/addon-links": "^6.5.10", + "@storybook/builder-webpack5": "^6.5.10", + "@storybook/manager-webpack5": "^6.5.10", + "@storybook/react": "^6.5.10", + "@storybook/testing-library": "^0.0.13", + "@storybook/addon-docs": "^6.5.14", + "babel-loader": "^8.2.5", + "storybook-addon-mock": "^3.2.0", + "storybook-addon-themes": "^6.1.0", + "tsup": "^6.2.3" + }, + "peerDependencies": { + "@scm-manager/ui-components": "^2.40.2-SNAPSHOT", + "classnames": "^2.3.1", + "react": "17", + "react-hook-form": "7", + "react-i18next": "11", + "react-query": "3" + }, + "dependencies": { + "@scm-manager/ui-buttons": "^2.40.2-SNAPSHOT" + }, + "prettier": "@scm-manager/prettier-config", + "eslintConfig": { + "extends": "@scm-manager/eslint-config" + } +} diff --git a/scm-ui/ui-forms/src/Form.stories.mdx b/scm-ui/ui-forms/src/Form.stories.mdx new file mode 100644 index 0000000000..e9982c6a65 --- /dev/null +++ b/scm-ui/ui-forms/src/Form.stories.mdx @@ -0,0 +1,160 @@ +import { Meta, Story } from "@storybook/addon-docs"; +import Form from "./Form"; +import FormRow from "./FormRow"; +import ControlledInputField from "./input/ControlledInputField"; +import ControlledSecretConfirmationField from "./input/ControlledSecretConfirmationField"; +import ControlledCheckboxField from "./checkbox/ControlledCheckboxField"; + + + + +
+ + + + + + + + + +
+
+ + +
+ + + + + + + + + +
+
+ + +
+ {({ watch }) => ( + <> + + + + + + + + + + + + + + + + + + + + + )} +
+
+ + +
+ + + + + + + +
+ + +
+ + + + + + + + + +
+
diff --git a/scm-ui/ui-forms/src/Form.tsx b/scm-ui/ui-forms/src/Form.tsx new file mode 100644 index 0000000000..28431eac0e --- /dev/null +++ b/scm-ui/ui-forms/src/Form.tsx @@ -0,0 +1,161 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import React, { FC, useCallback, useEffect, useState } from "react"; +import { DeepPartial, SubmitHandler, useForm, UseFormReturn } from "react-hook-form"; +import { ErrorNotification, Level } from "@scm-manager/ui-components"; +import { ScmFormContextProvider } from "./ScmFormContext"; +import { useTranslation } from "react-i18next"; +import { Button } from "@scm-manager/ui-buttons"; +import FormRow from "./FormRow"; +import ControlledInputField from "./input/ControlledInputField"; +import ControlledCheckboxField from "./checkbox/ControlledCheckboxField"; +import ControlledSecretConfirmationField from "./input/ControlledSecretConfirmationField"; +import { HalRepresentation } from "@scm-manager/ui-types"; + +type RenderProps> = Omit< + UseFormReturn, + "register" | "unregister" | "handleSubmit" | "control" +>; + +const SuccessNotification: FC<{ label?: string; hide: () => void }> = ({ label, hide }) => { + if (!label) { + return null; + } + + return ( +
+
+ ); +}; + +type Props, DefaultValues extends FormType> = { + children: ((renderProps: RenderProps) => React.ReactNode | React.ReactNode[]) | React.ReactNode; + translationPath: [namespace: string, prefix: string]; + onSubmit: SubmitHandler; + defaultValues: Omit; + readOnly?: boolean; + submitButtonTestId?: string; +}; + +function Form, DefaultValues extends FormType>({ + children, + onSubmit, + defaultValues, + translationPath, + readOnly, + submitButtonTestId, +}: Props) { + const form = useForm({ + mode: "onChange", + defaultValues: defaultValues as DeepPartial, + }); + const { formState, handleSubmit, reset } = form; + const [ns, prefix] = translationPath; + const { t } = useTranslation(ns, { keyPrefix: prefix }); + const { isDirty, isValid, isSubmitting, isSubmitSuccessful } = formState; + const [error, setError] = useState(); + const [showSuccessNotification, setShowSuccessNotification] = useState(false); + + // See https://react-hook-form.com/api/useform/reset/ + useEffect(() => { + if (isSubmitSuccessful) { + setShowSuccessNotification(true); + reset(defaultValues as never); + } + /* eslint-disable-next-line react-hooks/exhaustive-deps */ + }, [isSubmitSuccessful]); + + useEffect(() => { + if (isDirty) { + setShowSuccessNotification(false); + } + }, [isDirty]); + + const translateWithFallback = useCallback( + (key, ...args) => { + const translation = t(key, ...(args as any)); + if (translation === `${prefix}.${key}`) { + return ""; + } + return translation; + }, + [prefix, t] + ); + + const submit = useCallback( + async (data) => { + setError(null); + try { + return await onSubmit(data); + } catch (e) { + if (e instanceof Error) { + setError(e); + } else { + throw e; + } + } + }, + [onSubmit] + ); + + return ( + +
+ {showSuccessNotification ? ( + setShowSuccessNotification(false)} + /> + ) : null} + {typeof children === "function" ? children(form) : children} + {error ? : null} + {!readOnly ? ( + + {t("submit")} + + } + /> + ) : null} + +
+ ); +} + +export default Object.assign(Form, { + Row: FormRow, + Input: ControlledInputField, + Checkbox: ControlledCheckboxField, + SecretConfirmation: ControlledSecretConfirmationField, +}); diff --git a/scm-ui/ui-forms/src/FormRow.tsx b/scm-ui/ui-forms/src/FormRow.tsx new file mode 100644 index 0000000000..b385e988ad --- /dev/null +++ b/scm-ui/ui-forms/src/FormRow.tsx @@ -0,0 +1,37 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import React, { HTMLProps } from "react"; +import classNames from "classnames"; + +const FormRow = React.forwardRef>( + ({ className, children, hidden, ...rest }, ref) => + hidden ? null : ( +
+ {children} +
+ ) +); + +export default FormRow; diff --git a/scm-ui/ui-forms/src/ScmFormContext.tsx b/scm-ui/ui-forms/src/ScmFormContext.tsx new file mode 100644 index 0000000000..4d70876de7 --- /dev/null +++ b/scm-ui/ui-forms/src/ScmFormContext.tsx @@ -0,0 +1,42 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import React, { PropsWithChildren, useContext } from "react"; +import { UseFormReturn } from "react-hook-form"; +import type { TFunction } from "i18next"; + +type ContextType = UseFormReturn & { + t: TFunction; + readOnly?: boolean; +}; + +const ScmFormContext = React.createContext(null as unknown as ContextType); + +export function ScmFormContextProvider({ children, ...props }: PropsWithChildren>) { + return {children}; +} + +export function useScmFormContext() { + return useContext(ScmFormContext); +} diff --git a/scm-ui/ui-forms/src/base/Control.tsx b/scm-ui/ui-forms/src/base/Control.tsx new file mode 100644 index 0000000000..7db727ba0c --- /dev/null +++ b/scm-ui/ui-forms/src/base/Control.tsx @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import React, { FC, HTMLProps } from "react"; +import classNames from "classnames"; + +const Control: FC> = ({ className, children, ...rest }) => ( +
+ {children} +
+); + +export default Control; diff --git a/scm-ui/ui-forms/src/base/Field.tsx b/scm-ui/ui-forms/src/base/Field.tsx new file mode 100644 index 0000000000..16e180ae94 --- /dev/null +++ b/scm-ui/ui-forms/src/base/Field.tsx @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import React, { FC, HTMLProps } from "react"; +import classNames from "classnames"; + +const Field: FC> = ({ className, children, ...rest }) => ( +
+ {children} +
+); +export default Field; diff --git a/scm-ui/ui-forms/src/base/field-message/FieldMessage.tsx b/scm-ui/ui-forms/src/base/field-message/FieldMessage.tsx new file mode 100644 index 0000000000..42a55bf72e --- /dev/null +++ b/scm-ui/ui-forms/src/base/field-message/FieldMessage.tsx @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import React, { ReactNode } from "react"; +import classNames from "classnames"; +import { createVariantClass, Variant } from "../../variants"; + +type Props = { variant?: Variant; className?: string; children?: ReactNode }; + +const FieldMessage = ({ variant, className, children }: Props) => ( +

{children}

+); +export default FieldMessage; diff --git a/scm-ui/ui-forms/src/base/help/Help.tsx b/scm-ui/ui-forms/src/base/help/Help.tsx new file mode 100644 index 0000000000..ad4e08619e --- /dev/null +++ b/scm-ui/ui-forms/src/base/help/Help.tsx @@ -0,0 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import React from "react"; +import classNames from "classnames"; + +type Props = { text?: string; className?: string }; + +/** + * TODO: Implement tooltip + */ +const Help = ({ text, className }: Props) => ( + +); +export default Help; diff --git a/scm-ui/ui-forms/src/base/label/Label.tsx b/scm-ui/ui-forms/src/base/label/Label.tsx new file mode 100644 index 0000000000..79d468fce2 --- /dev/null +++ b/scm-ui/ui-forms/src/base/label/Label.tsx @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import React, { FC, HTMLProps } from "react"; +import classNames from "classnames"; + +const Label: FC> = ({ className, children, ...rest }) => ( + +); +export default Label; diff --git a/scm-ui/ui-forms/src/checkbox/Checkbox.stories.mdx b/scm-ui/ui-forms/src/checkbox/Checkbox.stories.mdx new file mode 100644 index 0000000000..2f7ed30a8b --- /dev/null +++ b/scm-ui/ui-forms/src/checkbox/Checkbox.stories.mdx @@ -0,0 +1,26 @@ +import {Meta, Story} from "@storybook/addon-docs"; +import Checkbox from "./Checkbox"; + + + + + + + + + + + + + + + + + + + + + + diff --git a/scm-ui/ui-forms/src/checkbox/Checkbox.tsx b/scm-ui/ui-forms/src/checkbox/Checkbox.tsx new file mode 100644 index 0000000000..f80d547bd6 --- /dev/null +++ b/scm-ui/ui-forms/src/checkbox/Checkbox.tsx @@ -0,0 +1,85 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import React, { InputHTMLAttributes } from "react"; +import { createAttributesForTesting } from "@scm-manager/ui-components"; +import Help from "../base/help/Help"; + +type InputFieldProps = { + label: string; + helpText?: string; + testId?: string; +} & Omit, "type">; + +/** + * @see https://bulma.io/documentation/form/checkbox/ + */ +const Checkbox = React.forwardRef( + ({ readOnly, label, value, name, checked, defaultChecked, defaultValue, testId, helpText, ...props }, ref) => ( + // @ts-ignore bulma uses the disabled attribute on labels, although it is not part of the html spec + + ) +); +export default Checkbox; diff --git a/scm-ui/ui-forms/src/checkbox/CheckboxField.tsx b/scm-ui/ui-forms/src/checkbox/CheckboxField.tsx new file mode 100644 index 0000000000..03fc6f82fa --- /dev/null +++ b/scm-ui/ui-forms/src/checkbox/CheckboxField.tsx @@ -0,0 +1,39 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import React from "react"; +import Field from "../base/Field"; +import Control from "../base/Control"; +import Checkbox from "./Checkbox"; + +type Props = React.ComponentProps; + +const CheckboxField = React.forwardRef(({ className, ...props }, ref) => ( + + + + + +)); +export default CheckboxField; diff --git a/scm-ui/ui-forms/src/checkbox/ControlledCheckboxField.stories.mdx b/scm-ui/ui-forms/src/checkbox/ControlledCheckboxField.stories.mdx new file mode 100644 index 0000000000..466161e437 --- /dev/null +++ b/scm-ui/ui-forms/src/checkbox/ControlledCheckboxField.stories.mdx @@ -0,0 +1,36 @@ +import { Meta, Story } from "@storybook/addon-docs"; +import Form from "../Form"; +import ControlledCheckboxField from "./ControlledCheckboxField"; + + ( +
+ + + ), + ]} +/> + + + + + + + + + + + + + + + + + + + + + + diff --git a/scm-ui/ui-forms/src/checkbox/ControlledCheckboxField.tsx b/scm-ui/ui-forms/src/checkbox/ControlledCheckboxField.tsx new file mode 100644 index 0000000000..ae20e877dc --- /dev/null +++ b/scm-ui/ui-forms/src/checkbox/ControlledCheckboxField.tsx @@ -0,0 +1,76 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import React, { ComponentProps } from "react"; +import { Controller, ControllerRenderProps, Path, RegisterOptions } from "react-hook-form"; +import classNames from "classnames"; +import { useScmFormContext } from "../ScmFormContext"; +import CheckboxField from "./CheckboxField"; + +type Props> = Omit< + ComponentProps, + "label" | "defaultValue" | "required" | keyof ControllerRenderProps +> & { + name: Path; + label?: string; + rules?: Pick; +}; + +function ControlledInputField>({ + name, + label, + helpText, + rules, + className, + testId, + defaultChecked, + readOnly, + ...props +}: Props) { + const { control, t, readOnly: formReadonly } = useScmFormContext(); + const labelTranslation = label || t(`${name}.label`) || ""; + const helpTextTranslation = helpText || t(`${name}.helpText`); + return ( + ( + + )} + /> + ); +} + +export default ControlledInputField; diff --git a/scm-ui/ui-forms/src/index.ts b/scm-ui/ui-forms/src/index.ts new file mode 100644 index 0000000000..c590733aed --- /dev/null +++ b/scm-ui/ui-forms/src/index.ts @@ -0,0 +1,26 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +export { default as Form } from "./Form"; +export * from "./resourceHooks"; diff --git a/scm-ui/ui-forms/src/input/ControlledInputField.stories.mdx b/scm-ui/ui-forms/src/input/ControlledInputField.stories.mdx new file mode 100644 index 0000000000..93493ea9b1 --- /dev/null +++ b/scm-ui/ui-forms/src/input/ControlledInputField.stories.mdx @@ -0,0 +1,36 @@ +import { Meta, Story } from "@storybook/addon-docs"; +import Form from "../Form"; +import ControlledInputField from "./ControlledInputField"; + + ( +
+ + + ), + ]} +/> + + + + + + + + + + + + + + + + + + + + diff --git a/scm-ui/ui-forms/src/input/ControlledInputField.tsx b/scm-ui/ui-forms/src/input/ControlledInputField.tsx new file mode 100644 index 0000000000..d1503e03d4 --- /dev/null +++ b/scm-ui/ui-forms/src/input/ControlledInputField.tsx @@ -0,0 +1,77 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import React, { ComponentProps } from "react"; +import { Controller, ControllerRenderProps, Path } from "react-hook-form"; +import classNames from "classnames"; +import { useScmFormContext } from "../ScmFormContext"; +import InputField from "./InputField"; + +type Props> = Omit< + ComponentProps, + "error" | "label" | "defaultChecked" | "required" | keyof ControllerRenderProps +> & { + rules?: ComponentProps["rules"]; + name: Path; + label?: string; +}; + +function ControlledInputField>({ + name, + label, + helpText, + rules, + className, + testId, + defaultValue, + readOnly, + ...props +}: Props) { + const { control, t, readOnly: formReadonly } = useScmFormContext(); + const labelTranslation = label || t(`${name}.label`) || ""; + const helpTextTranslation = helpText || t(`${name}.helpText`); + return ( + ( + + )} + /> + ); +} + +export default ControlledInputField; diff --git a/scm-ui/ui-forms/src/input/ControlledSecretConfirmationField.stories.mdx b/scm-ui/ui-forms/src/input/ControlledSecretConfirmationField.stories.mdx new file mode 100644 index 0000000000..4745b7b8cd --- /dev/null +++ b/scm-ui/ui-forms/src/input/ControlledSecretConfirmationField.stories.mdx @@ -0,0 +1,39 @@ +import { Meta, Story } from "@storybook/addon-docs"; +import Form from "../Form"; +import ControlledSecretConfirmationField from "./ControlledSecretConfirmationField"; + + ( +
+ + + ), + ]} +/> + + + + + + + + + + + + + + + + + + + + diff --git a/scm-ui/ui-forms/src/input/ControlledSecretConfirmationField.tsx b/scm-ui/ui-forms/src/input/ControlledSecretConfirmationField.tsx new file mode 100644 index 0000000000..e571eaeb60 --- /dev/null +++ b/scm-ui/ui-forms/src/input/ControlledSecretConfirmationField.tsx @@ -0,0 +1,121 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import React, { ComponentProps } from "react"; +import { Controller, ControllerRenderProps, Path } from "react-hook-form"; +import classNames from "classnames"; +import { useScmFormContext } from "../ScmFormContext"; +import InputField from "./InputField"; + +type Props> = Omit< + ComponentProps, + "error" | "label" | "defaultChecked" | "required" | keyof ControllerRenderProps +> & { + rules?: ComponentProps["rules"]; + name: Path; + label?: string; + confirmationLabel?: string; + confirmationHelpText?: string; + confirmationErrorMessage?: string; + confirmationTestId?: string; +}; + +export default function ControlledSecretConfirmationField>({ + name, + label, + confirmationLabel, + helpText, + confirmationHelpText, + rules, + confirmationErrorMessage, + className, + testId, + confirmationTestId, + defaultValue, + readOnly, + ...props +}: Props) { + const { control, watch, t, readOnly: formReadonly } = useScmFormContext(); + const labelTranslation = label || t(`${name}.label`) || ""; + const helpTextTranslation = helpText || t(`${name}.helpText`); + const confirmationLabelTranslation = confirmationLabel || t(`${name}.confirmation.label`) || ""; + const confirmationHelpTextTranslation = confirmationHelpText || t(`${name}.confirmation.helpText`); + const confirmationErrorMessageTranslation = confirmationErrorMessage || t(`${name}.confirmation.errorMessage`); + const secretValue = watch(name); + + return ( + <> + ( + + )} + /> + ( + + )} + rules={{ + validate: (value) => secretValue === value || confirmationErrorMessageTranslation, + }} + /> + + ); +} diff --git a/scm-ui/ui-forms/src/input/Input.stories.mdx b/scm-ui/ui-forms/src/input/Input.stories.mdx new file mode 100644 index 0000000000..32970386b1 --- /dev/null +++ b/scm-ui/ui-forms/src/input/Input.stories.mdx @@ -0,0 +1,22 @@ +import { Meta, Story } from "@storybook/addon-docs"; +import Input from "./Input" + + + +This will be our latest input component + + + + + + + + + + + + + + + {r.focus()}} /> + diff --git a/scm-ui/ui-forms/src/input/Input.tsx b/scm-ui/ui-forms/src/input/Input.tsx new file mode 100644 index 0000000000..cc72eb04ed --- /dev/null +++ b/scm-ui/ui-forms/src/input/Input.tsx @@ -0,0 +1,46 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import React, { InputHTMLAttributes } from "react"; +import classNames from "classnames"; +import { createVariantClass, Variant } from "../variants"; +import { createAttributesForTesting } from "@scm-manager/ui-components"; + +type Props = { + variant?: Variant; + testId?: string; +} & InputHTMLAttributes; + +const Input = React.forwardRef(({ variant, className, testId, ...props }, ref) => { + return ( + + ); +}); + +export default Input; diff --git a/scm-ui/ui-forms/src/input/InputField.stories.mdx b/scm-ui/ui-forms/src/input/InputField.stories.mdx new file mode 100644 index 0000000000..761470af7e --- /dev/null +++ b/scm-ui/ui-forms/src/input/InputField.stories.mdx @@ -0,0 +1,22 @@ +import { Meta, Story } from "@storybook/addon-docs"; +import InputField from "./InputField"; + + + +This will be our first form field molecule + + + + + + + + + + + + + + + + diff --git a/scm-ui/ui-forms/src/input/InputField.tsx b/scm-ui/ui-forms/src/input/InputField.tsx new file mode 100644 index 0000000000..c10f61b344 --- /dev/null +++ b/scm-ui/ui-forms/src/input/InputField.tsx @@ -0,0 +1,60 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import React from "react"; +import Field from "../base/Field"; +import Control from "../base/Control"; +import Label from "../base/label/Label"; +import FieldMessage from "../base/field-message/FieldMessage"; +import Input from "./Input"; +import Help from "../base/help/Help"; + +type InputFieldProps = { + label: string; + helpText?: string; + error?: string; + type?: "text" | "password" | "email" | "tel"; +} & Omit, "type">; + +/** + * @see https://bulma.io/documentation/form/input/ + */ +const InputField = React.forwardRef( + ({ label, helpText, error, className, ...props }, ref) => { + const variant = error ? "danger" : undefined; + return ( + + + + + + {error ? {error} : null} + + ); + } +); +export default InputField; diff --git a/scm-ui/ui-forms/src/resourceHooks.ts b/scm-ui/ui-forms/src/resourceHooks.ts new file mode 100644 index 0000000000..4e8ace4621 --- /dev/null +++ b/scm-ui/ui-forms/src/resourceHooks.ts @@ -0,0 +1,152 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import { apiClient, requiredLink } from "@scm-manager/ui-api"; +import { useMutation, useQueryClient } from "react-query"; +import { HalRepresentation, Link } from "@scm-manager/ui-types"; + +type QueryKeyPair = [singular: string, plural: string]; +type LinkOrHalLink = string | [entity: HalRepresentation, link: string] | HalRepresentation; +const unwrapLink = (input: LinkOrHalLink, linkName: string) => { + if (Array.isArray(input)) { + return requiredLink(input[0], input[1]); + } else if (typeof input === "string") { + return input; + } else { + return (input._links[linkName] as Link).href; + } +}; + +type MutationResult = { + submit: (resource: I) => Promise; + isLoading: boolean; + error: Error | null; + submissionResult?: O; +}; + +type MutatingResourceOptions = { + contentType?: string; +}; + +const createResource = (link: string, contentType: string) => { + return (payload: I): Promise => { + return apiClient + .post(link, payload, contentType) + .then((response) => { + const location = response.headers.get("Location"); + if (!location) { + throw new Error("Server does not return required Location header"); + } + return apiClient.get(location); + }) + .then((response) => response.json()); + }; +}; + +type CreateResourceOptions = MutatingResourceOptions; + +export const useCreateResource = ( + link: string, + [entityKey, collectionName]: QueryKeyPair, + idFactory: (createdResource: O) => string, + { contentType = "application/json" }: CreateResourceOptions = {} +): MutationResult => { + const queryClient = useQueryClient(); + const { mutateAsync, data, isLoading, error } = useMutation(createResource(link, contentType), { + onSuccess: (result) => { + queryClient.setQueryData([entityKey, idFactory(result)], result); + return queryClient.invalidateQueries(collectionName); + }, + }); + return { + submit: (payload: I) => mutateAsync(payload), + isLoading, + error, + submissionResult: data, + }; +}; + +type UpdateResourceOptions = MutatingResourceOptions & { + collectionName?: QueryKeyPair; +}; + +export const useUpdateResource = ( + link: LinkOrHalLink, + idFactory: (createdResource: T) => string, + { + contentType = "application/json", + collectionName: [entityQueryKey, collectionName] = ["", ""], + }: UpdateResourceOptions = {} +): MutationResult => { + const queryClient = useQueryClient(); + const { mutateAsync, isLoading, error, data } = useMutation( + (resource) => apiClient.put(unwrapLink(link, "update"), resource, contentType), + { + onSuccess: async (_, payload) => { + await queryClient.invalidateQueries(entityQueryKey ? [entityQueryKey, idFactory(payload)] : idFactory(payload)); + if (collectionName) { + await queryClient.invalidateQueries(collectionName); + } + }, + } + ); + return { + submit: (resource: T) => mutateAsync(resource), + isLoading, + error, + submissionResult: data, + }; +}; + +type DeleteResourceOptions = { + collectionName?: QueryKeyPair; +}; + +export const useDeleteResource = ( + idFactory: (createdResource: T) => string, + { collectionName: [entityQueryKey, collectionName] = ["", ""] }: DeleteResourceOptions = {} +): MutationResult => { + const queryClient = useQueryClient(); + const { mutateAsync, isLoading, error, data } = useMutation( + (resource) => { + const deleteUrl = (resource._links.delete as Link).href; + return apiClient.delete(deleteUrl); + }, + { + onSuccess: async (_, resource) => { + const id = idFactory(resource); + await queryClient.removeQueries(entityQueryKey ? [entityQueryKey, id] : id); + if (collectionName) { + await queryClient.invalidateQueries(collectionName); + } + }, + } + ); + return { + submit: (resource: T) => mutateAsync(resource), + isLoading, + error, + submissionResult: data, + }; +}; diff --git a/scm-ui/ui-forms/src/variants.ts b/scm-ui/ui-forms/src/variants.ts new file mode 100644 index 0000000000..bf86eeb543 --- /dev/null +++ b/scm-ui/ui-forms/src/variants.ts @@ -0,0 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +export const variants = ["danger"] as const; +export type Variant = typeof variants[number]; +export const createVariantClass = (variant?: Variant) => (variant ? `is-${variant}` : undefined); diff --git a/scm-ui/ui-forms/tsconfig.json b/scm-ui/ui-forms/tsconfig.json new file mode 100644 index 0000000000..7e3ee63a2d --- /dev/null +++ b/scm-ui/ui-forms/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "@scm-manager/tsconfig" +} diff --git a/scm-ui/ui-plugins/package.json b/scm-ui/ui-plugins/package.json index 916c7cf1ba..377aba0155 100644 --- a/scm-ui/ui-plugins/package.json +++ b/scm-ui/ui-plugins/package.json @@ -12,7 +12,7 @@ "query-string": "6.14.1", "react": "^17.0.1", "react-hook-form": "^7.5.1", - "react-i18next": "^10.13.1", + "react-i18next": "11", "react-redux": "^5.0.7", "react-router": "^5.3.1", "react-router-dom": "^5.3.1", @@ -43,4 +43,4 @@ "publishConfig": { "access": "public" } -} \ No newline at end of file +} diff --git a/scm-ui/ui-shortcuts/package.json b/scm-ui/ui-shortcuts/package.json index 92fd6d851a..196e1e2c84 100644 --- a/scm-ui/ui-shortcuts/package.json +++ b/scm-ui/ui-shortcuts/package.json @@ -18,7 +18,7 @@ }, "peerDependencies": { "react": "17", - "react-i18next": "10" + "react-i18next": "11" }, "dependencies": { "mousetrap": "1.6.5" @@ -50,4 +50,4 @@ "jest-extended/all" ] } -} \ No newline at end of file +} diff --git a/scm-ui/ui-shortcuts/src/useShortcut.ts b/scm-ui/ui-shortcuts/src/useShortcut.ts index 690a800b0b..f2785e7652 100644 --- a/scm-ui/ui-shortcuts/src/useShortcut.ts +++ b/scm-ui/ui-shortcuts/src/useShortcut.ts @@ -39,7 +39,7 @@ export type UseShortcutOptions = { * * If no description is supplied, there will be no entry in the shortcut summary table. */ - description?: string; + description?: string | null; }; /** diff --git a/scm-ui/ui-webapp/package.json b/scm-ui/ui-webapp/package.json index 4b807aae1e..85c99b9f22 100644 --- a/scm-ui/ui-webapp/package.json +++ b/scm-ui/ui-webapp/package.json @@ -12,16 +12,17 @@ "@scm-manager/ui-text": "2.40.2-SNAPSHOT", "@scm-manager/ui-shortcuts": "2.40.2-SNAPSHOT", "@scm-manager/ui-legacy": "2.40.2-SNAPSHOT", + "@scm-manager/ui-forms": "2.40.2-SNAPSHOT", "classnames": "^2.2.5", "history": "^4.10.1", - "i18next": "^19.6.0", - "i18next-browser-languagedetector": "^4.0.0", - "i18next-fetch-backend": "^2.2.0", + "i18next": "21", + "i18next-browser-languagedetector": "6", + "i18next-fetch-backend": "4", "query-string": "6.14.1", "react": "^17.0.1", "react-dom": "^17.0.1", "react-hook-form": "^7.5.1", - "react-i18next": "^10.13.1", + "react-i18next": "11", "react-router": "^5.3.1", "react-router-dom": "^5.3.1", "react-select": "^2.1.2", @@ -69,4 +70,4 @@ "publishConfig": { "access": "public" } -} \ No newline at end of file +} diff --git a/scm-ui/ui-webapp/public/locales/de/users.json b/scm-ui/ui-webapp/public/locales/de/users.json index 388e0cd752..d8b3f2945e 100644 --- a/scm-ui/ui-webapp/public/locales/de/users.json +++ b/scm-ui/ui-webapp/public/locales/de/users.json @@ -49,7 +49,52 @@ }, "createUser": { "title": "Benutzer erstellen", - "subtitle": "Erstellen eines neuen Benutzers" + "subtitle": "Erstellen eines neuen Benutzers", + "form": { + "submit": "Speichern", + "submit-success-notification": "Der Benutzer wurde erfolgreich aktualisiert", + "name": { + "label": "Benutzername", + "helpText": "Einzigartiger Name des Benutzers.", + "error": { + "validate": "Dieser Name ist ungültig" + } + }, + "displayName": { + "label": "Anzeigename", + "helpText": "Anzeigename des Benutzers.", + "error": { + "validate": "Dieser Anzeigename ist ungültig" + } + }, + "mail": { + "label": "E-Mail", + "helpText": "E-Mail Adresse des Benutzers.", + "error": { + "validate": "Diese E-Mail ist ungültig" + } + }, + "external": { + "label": "Extern", + "helpText": "Der Benutzer wird über ein Fremdsystem verwaltet." + }, + "password": { + "label": "Neues Passwort", + "error": { + "validate": "Das Passwort muss zwischen 6 und 1024 Zeichen lang sein" + }, + "confirmation": { + "label": "Passwort wiederholen", + "error": { + "validate": "Passwörter müssen identisch sein" + } + } + }, + "active": { + "label": "Aktiv", + "helpText": "Aktivierung oder Deaktivierung eines Benutzers." + } + } }, "deleteUser": { "button": "Benutzer löschen", diff --git a/scm-ui/ui-webapp/public/locales/en/users.json b/scm-ui/ui-webapp/public/locales/en/users.json index 903153a0ec..2f68df6d88 100644 --- a/scm-ui/ui-webapp/public/locales/en/users.json +++ b/scm-ui/ui-webapp/public/locales/en/users.json @@ -49,7 +49,52 @@ }, "createUser": { "title": "Create User", - "subtitle": "Create a new user" + "subtitle": "Create a new user", + "form": { + "submit": "Submit", + "submit-success-notification": "The user was updated successfully", + "name": { + "label": "User Name", + "helpText": "Unique name of the user.", + "error": { + "validate": "This name is invalid" + } + }, + "displayName": { + "label": "Display Name", + "helpText": "Display name of the user.", + "error": { + "validate": "This display name is invalid" + } + }, + "mail": { + "label": "Email", + "helpText": "Email address of the user.", + "error": { + "validate": "This email address is invalid" + } + }, + "external": { + "label": "External", + "helpText": "This user is managed by an external system." + }, + "password": { + "label": "New Password", + "error": { + "validate": "Password has to be between 6 and 1024 characters" + }, + "confirmation": { + "label": "Confirm New Password", + "error": { + "validate": "Passwords have to be identical" + } + } + }, + "active": { + "label": "Active", + "helpText": "Activate or deactivate the user." + } + } }, "deleteUser": { "button": "Delete User", diff --git a/scm-ui/ui-webapp/public/locales/es/users.json b/scm-ui/ui-webapp/public/locales/es/users.json index 05f8fa14e3..8895eeb024 100644 --- a/scm-ui/ui-webapp/public/locales/es/users.json +++ b/scm-ui/ui-webapp/public/locales/es/users.json @@ -42,7 +42,50 @@ }, "createUser": { "title": "Crear usuario", - "subtitle": "Crear un nuevo usuario" + "subtitle": "Crear un nuevo usuario", + "form": { + "name": { + "label": "Nombre de usuario", + "helpText": "Nombre único del usuario.", + "error": { + "validate": "El nombre es incorrecto" + } + }, + "displayName": { + "label": "Nombre a mostrar", + "helpText": "Nombre de usuario a mostrar.", + "error": { + "validate": "El nombre a mostrar es incorrecto" + } + }, + "mail": { + "label": "Correo electrónico", + "helpText": "Dirección de correo electrónico del usuario.", + "error": { + "validate": "El correo electrónico es incorrecto" + } + }, + "external": { + "label": "Externo", + "helpText": "This user is managed by an external system." + }, + "password": { + "label": "Nueva contraseña", + "error": { + "validate": "La contraseña debe tener entre 6 y 1024 caracteres" + }, + "confirmation": { + "label": "Confirme la contraseña", + "error": { + "validate": "Las contraseñas deben ser identicas" + } + } + }, + "active": { + "label": "Activo", + "helpText": "Activar o desactivar el usuario." + } + } }, "deleteUser": { "button": "Borrar usuario", diff --git a/scm-ui/ui-webapp/src/i18n.ts b/scm-ui/ui-webapp/src/i18n.ts index a3b6c2eba6..c4d3028f91 100644 --- a/scm-ui/ui-webapp/src/i18n.ts +++ b/scm-ui/ui-webapp/src/i18n.ts @@ -23,7 +23,6 @@ */ import i18n from "i18next"; -// @ts-ignore import Backend from "i18next-fetch-backend"; import LanguageDetector from "i18next-browser-languagedetector"; import { initReactI18next } from "react-i18next"; @@ -48,19 +47,18 @@ i18n debug: false, interpolation: { - escapeValue: false // not needed for react!! + escapeValue: false, // not needed for react!! }, react: { - wait: true, - useSuspense: false + useSuspense: false, }, backend: { loadPath: loadPath, init: { - credentials: "same-origin" - } + credentials: "same-origin", + }, }, // configure LanguageDetector @@ -69,8 +67,8 @@ i18n // we only use browser configuration order: ["navigator"], // we do not cache the detected language - caches: [] - } + caches: [], + }, }); export default i18n; diff --git a/scm-ui/ui-webapp/src/users/components/UserForm.test.tsx b/scm-ui/ui-webapp/src/users/components/UserForm.test.tsx deleted file mode 100644 index f5ce5415b6..0000000000 --- a/scm-ui/ui-webapp/src/users/components/UserForm.test.tsx +++ /dev/null @@ -1,210 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2020-present Cloudogu GmbH and Contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import * as React from "react"; -import { fireEvent, render, screen } from "@testing-library/react"; - -import UserForm from "./UserForm"; -import { User } from "@scm-manager/ui-types"; -import "@scm-manager/ui-tests"; - -describe("for user creation", () => { - const fillForm = (userId: string, displayName: string, password: string, confirmation: string) => { - fireEvent.change(screen.getByTestId("input-username"), { - target: { value: userId }, - }); - - fireEvent.change(screen.getByTestId("input-displayname"), { - target: { value: displayName }, - }); - - fireEvent.change(screen.getByTestId("input-password"), { - target: { value: password }, - }); - - fireEvent.change(screen.getByTestId("input-password-confirmation"), { - target: { value: confirmation }, - }); - }; - - it("should allow to create user", () => { - const mockSubmitForm = jest.fn(); - - render(); - - fillForm("trillian", "Tricia McMillan", "password", "password"); - - fireEvent.click(screen.getByTestId("submit-button")); - - expect(mockSubmitForm).toBeCalled(); - }); - - it("should prevent to submit empty form", () => { - const mockSubmitForm = jest.fn(); - - render(); - - fireEvent.click(screen.getByTestId("submit-button")); - - expect(mockSubmitForm).not.toBeCalled(); - }); - - it("should prevent to submit form without user id", () => { - const mockSubmitForm = jest.fn(); - - render(); - - fillForm("", "Arthur Dent", "password", "password"); - - fireEvent.click(screen.getByTestId("submit-button")); - - expect(mockSubmitForm).not.toBeCalled(); - }); - - it("should prevent to submit form without display name", () => { - const mockSubmitForm = jest.fn(); - - render(); - - fillForm("trillian", "", "password", "password"); - - fireEvent.click(screen.getByTestId("submit-button")); - - expect(mockSubmitForm).not.toBeCalled(); - }); - - it("should prevent to submit form without password", () => { - const mockSubmitForm = jest.fn(); - - render(); - - fillForm("trillian", "Tricia McMillan", "", ""); - - fireEvent.click(screen.getByTestId("submit-button")); - - expect(mockSubmitForm).not.toBeCalled(); - }); - - it("should prevent to submit form with wrong password confirmation", () => { - const mockSubmitForm = jest.fn(); - - render(); - - fillForm("trillian", "Tricia McMillan", "password", "different"); - - fireEvent.click(screen.getByTestId("submit-button")); - - expect(mockSubmitForm).not.toBeCalled(); - }); -}); - -describe("for user edit", () => { - const user: User = { - name: "trillian", - mail: "tricia@hog.space", - displayName: "Tricia McMillan", - password: undefined, - active: true, - external: false, - _links: {}, - }; - - it("should allow to edit user with changed display name", () => { - const mockSubmitForm = jest.fn(); - - render(); - - fireEvent.change(screen.getByTestId("input-displayname"), { - target: { value: "Just Tricia" }, - }); - - fireEvent.click(screen.getByTestId("submit-button")); - - expect(mockSubmitForm).toBeCalled(); - }); - - it("should allow to edit user with changed email", () => { - const mockSubmitForm = jest.fn(); - - render(); - - fireEvent.change(screen.getByTestId("input-mail"), { - target: { value: "tricia@hg2g.com" }, - }); - - fireEvent.click(screen.getByTestId("submit-button")); - - expect(mockSubmitForm).toBeCalled(); - }); - - it("should allow to edit user with changed active flag", () => { - const mockSubmitForm = jest.fn(); - - render(); - - fireEvent.click(screen.getByTestId("checkbox-active")); - - fireEvent.click(screen.getByTestId("submit-button")); - - expect(mockSubmitForm).toBeCalled(); - }); - - it("should prevent to submit unchanged user", () => { - const mockSubmitForm = jest.fn(); - - render(); - - fireEvent.click(screen.getByTestId("submit-button")); - - expect(mockSubmitForm).not.toBeCalled(); - }); - - it("should prevent to edit user with incorrect email", () => { - const mockSubmitForm = jest.fn(); - - render(); - - fireEvent.change(screen.getByTestId("input-mail"), { - target: { value: "do_not_reply" }, - }); - - fireEvent.click(screen.getByTestId("submit-button")); - - expect(mockSubmitForm).not.toBeCalled(); - }); - - it("should prevent to edit user with empty display name", () => { - const mockSubmitForm = jest.fn(); - - render(); - - fireEvent.change(screen.getByTestId("input-displayname"), { - target: { value: "" }, - }); - - fireEvent.click(screen.getByTestId("submit-button")); - - expect(mockSubmitForm).not.toBeCalled(); - }); -}); diff --git a/scm-ui/ui-webapp/src/users/components/UserForm.tsx b/scm-ui/ui-webapp/src/users/components/UserForm.tsx deleted file mode 100644 index eadc519130..0000000000 --- a/scm-ui/ui-webapp/src/users/components/UserForm.tsx +++ /dev/null @@ -1,210 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2020-present Cloudogu GmbH and Contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -import React, { FC, FormEvent, useEffect, useState } from "react"; -import { useTranslation } from "react-i18next"; -import { User } from "@scm-manager/ui-types"; -import { - Checkbox, - InputField, - Level, - PasswordConfirmation, - SubmitButton, - Subtitle, - validation as validator, -} from "@scm-manager/ui-components"; -import * as userValidator from "./userValidation"; - -type Props = { - submitForm: (p: User) => void; - user?: User; - loading?: boolean; -}; - -const UserForm: FC = ({ submitForm, user, loading }) => { - const [t] = useTranslation("users"); - const [userState, setUserState] = useState({ - name: "", - displayName: "", - mail: "", - password: "", - active: true, - external: false, - _links: {}, - }); - const [mailValidationError, setMailValidationError] = useState(false); - const [displayNameValidationError, setDisplayNameValidationError] = useState(false); - const [nameValidationError, setNameValidationError] = useState(false); - const [passwordValid, setPasswordValid] = useState(false); - - useEffect(() => { - if (user) { - setUserState(user); - } - }, [user]); - - const createUserComponentsAreInvalid = () => { - if (!user) { - return nameValidationError || !userState.name || (!userState.external && !passwordValid); - } else { - return false; - } - }; - - const editUserComponentsAreUnchanged = () => { - if (user) { - return ( - user.displayName === userState.displayName && - user.mail === userState.mail && - user.active === userState.active && - user.external === userState.external - ); - } else { - return false; - } - }; - - const isInvalid = () => { - return ( - createUserComponentsAreInvalid() || - editUserComponentsAreUnchanged() || - mailValidationError || - displayNameValidationError || - nameValidationError || - (!user && userState && !userState.external && !userState.password) || - !userState.displayName - ); - }; - - const submit = (event: FormEvent) => { - event.preventDefault(); - if (!isInvalid()) { - submitForm(userState); - } - }; - - const passwordChangeField = ( - { - setPasswordValid(isPasswordValid); - setUserState({ ...userState, password }); - }} - /> - ); - let nameField = null; - let subtitle = null; - if (!user) { - // create new user - nameField = ( -
- { - setNameValidationError(!!name && !validator.isNameValid(name)); - setUserState({ ...userState, name }); - }} - value={userState ? userState.name : ""} - validationError={nameValidationError} - errorMessage={t("validation.name-invalid")} - helpText={t("help.usernameHelpText")} - testId="input-username" - /> -
- ); - } else { - // edit existing user - subtitle = ; - } - - return ( - <> - {subtitle} -
-
- {nameField} -
- { - setDisplayNameValidationError(!userValidator.isDisplayNameValid(displayName)); - setUserState({ ...userState, displayName }); - }} - value={userState ? userState.displayName : ""} - validationError={displayNameValidationError} - errorMessage={t("validation.displayname-invalid")} - helpText={t("help.displayNameHelpText")} - testId="input-displayname" - /> -
-
- { - setMailValidationError(!!mail && !validator.isMailValid(mail)); - setUserState({ ...userState, mail }); - }} - value={userState ? userState.mail : ""} - validationError={mailValidationError} - errorMessage={t("validation.mail-invalid")} - helpText={t("help.mailHelpText")} - testId="input-mail" - /> -
-
- {!user && ( - <> -
-
- setUserState({ ...userState, external })} - checked={userState.external} - helpText={t("help.externalFlagHelpText")} - /> -
-
- - )} - {!userState.external && ( - <> - {!user && passwordChangeField} -
-
- setUserState({ ...userState, active })} - checked={userState ? userState.active : false} - helpText={t("help.activeHelpText")} - testId="checkbox-active" - /> -
-
- - )} - } /> - - - ); -}; - -export default UserForm; diff --git a/scm-ui/ui-webapp/src/users/containers/CreateUser.tsx b/scm-ui/ui-webapp/src/users/containers/CreateUser.tsx index 97b331f4f9..50b9458457 100644 --- a/scm-ui/ui-webapp/src/users/containers/CreateUser.tsx +++ b/scm-ui/ui-webapp/src/users/containers/CreateUser.tsx @@ -22,28 +22,97 @@ * SOFTWARE. */ import React, { FC } from "react"; -import { useTranslation } from "react-i18next"; -import { Page } from "@scm-manager/ui-components"; -import UserForm from "../components/UserForm"; -import { useCreateUser } from "@scm-manager/ui-api"; import { Redirect } from "react-router-dom"; +import { useTranslation } from "react-i18next"; +import { useRequiredIndexLink } from "@scm-manager/ui-api"; +import { Page } from "@scm-manager/ui-components"; +import { Form, useCreateResource } from "@scm-manager/ui-forms"; +import * as userValidator from "../components/userValidation"; +import { User, UserCreation } from "@scm-manager/ui-types"; + +type UserCreationForm = Pick & { + passwordConfirmation: string; +}; const CreateUser: FC = () => { const [t] = useTranslation("users"); - const { error, isLoading, user, create } = useCreateUser(); + const indexLink = useRequiredIndexLink("users"); + const { submit, submissionResult: createdUser } = useCreateResource( + indexLink, + ["user", "users"], + (user) => user.name, + { + contentType: "application/vnd.scmm-user+json;v=2", + } + ); - if (!!user) { - return ; + if (!!createdUser) { + return ; } return ( - - + +
+ {({ watch }) => ( + <> + + + + + + !email || userValidator.isMailValid(email), + }} + /> + + + + + + + + )} +
); }; diff --git a/scm-ui/ui-webapp/src/users/containers/EditUser.tsx b/scm-ui/ui-webapp/src/users/containers/EditUser.tsx index 6072289689..fb29874798 100644 --- a/scm-ui/ui-webapp/src/users/containers/EditUser.tsx +++ b/scm-ui/ui-webapp/src/users/containers/EditUser.tsx @@ -22,30 +22,52 @@ * SOFTWARE. */ import React, { FC } from "react"; -import UserForm from "../components/UserForm"; import DeleteUser from "./DeleteUser"; import { User } from "@scm-manager/ui-types"; -import { ErrorNotification } from "@scm-manager/ui-components"; import UserConverter from "../components/UserConverter"; -import { useUpdateUser } from "@scm-manager/ui-api"; -import UpdateNotification from "../../components/UpdateNotification"; +import { Form, useUpdateResource } from "@scm-manager/ui-forms"; +import * as userValidator from "../components/userValidation"; +import { Subtitle } from "@scm-manager/ui-components"; +import { useTranslation } from "react-i18next"; type Props = { user: User; }; const EditUser: FC = ({ user }) => { - const { error, isLoading, update, isUpdated } = useUpdateUser(); + const [t] = useTranslation("users"); + const { submit } = useUpdateResource(user, (user) => user.name, { + contentType: "application/vnd.scmm-user+json;v=2", + collectionName: ["user", "users"], + }); return ( -
- - - + <> + +
+ + + !email || userValidator.isMailValid(email), + }} + /> + + +

-
+ ); }; diff --git a/yarn.lock b/yarn.lock index 8834652f9b..c322449ab8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -60,6 +60,11 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.8.tgz#2483f565faca607b8535590e84e7de323f27764d" integrity sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ== +"@babel/compat-data@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.19.0.tgz#2a592fd89bacb1fcde68de31bee4f2f2dacb0e86" + integrity sha512-y5rqgTTPTmaF5e2nVhOxw+Ur9HDJLsWb6U/KpgUzRZEdPfE6VOubXBKLdbcUTijzRptednSBDQbYZBOSqJxpJw== + "@babel/core@7.12.9": version "7.12.9" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.9.tgz#fd450c4ec10cdbb980e2928b7aa7a28484593fc8" @@ -103,6 +108,27 @@ json5 "^2.2.1" semver "^6.3.0" +"@babel/core@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.19.0.tgz#d2f5f4f2033c00de8096be3c9f45772563e150c3" + integrity sha512-reM4+U7B9ss148rh2n1Qs9ASS+w94irYXga7c2jaQv9RVzpS7Mv1a9rnYYwuDa45G+DkORt9g6An2k/V4d9LbQ== + dependencies: + "@ampproject/remapping" "^2.1.0" + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.19.0" + "@babel/helper-compilation-targets" "^7.19.0" + "@babel/helper-module-transforms" "^7.19.0" + "@babel/helpers" "^7.19.0" + "@babel/parser" "^7.19.0" + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.19.0" + "@babel/types" "^7.19.0" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.1" + semver "^6.3.0" + "@babel/generator@^7.12.11", "@babel/generator@^7.12.5", "@babel/generator@^7.18.9", "@babel/generator@^7.4.0": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.9.tgz#68337e9ea8044d6ddc690fb29acae39359cca0a5" @@ -112,6 +138,15 @@ "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" +"@babel/generator@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.19.0.tgz#785596c06425e59334df2ccee63ab166b738419a" + integrity sha512-S1ahxf1gZ2dpoiFgA+ohK9DIpz50bJ0CWs7Zlzb54Z4sG8qmdIrGrVqmy1sAtTVRb+9CU6U8VqT9L0Zj7hxHVg== + dependencies: + "@babel/types" "^7.19.0" + "@jridgewell/gen-mapping" "^0.3.2" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.15.4", "@babel/helper-annotate-as-pure@^7.16.0", "@babel/helper-annotate-as-pure@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" @@ -137,6 +172,16 @@ browserslist "^4.20.2" semver "^6.3.0" +"@babel/helper-compilation-targets@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.0.tgz#537ec8339d53e806ed422f1e06c8f17d55b96bb0" + integrity sha512-Ai5bNWXIvwDvWM7njqsG3feMlL9hCVQsPYXodsZyLwshYkZVJt59Gftau4VrE8S9IT9asd2uSP1hG6wCNw+sXA== + dependencies: + "@babel/compat-data" "^7.19.0" + "@babel/helper-validator-option" "^7.18.6" + browserslist "^4.20.2" + semver "^6.3.0" + "@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.9.tgz#d802ee16a64a9e824fcbf0a2ffc92f19d58550ce" @@ -204,6 +249,14 @@ "@babel/template" "^7.18.6" "@babel/types" "^7.18.9" +"@babel/helper-function-name@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz#941574ed5390682e872e52d3f38ce9d1bef4648c" + integrity sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w== + dependencies: + "@babel/template" "^7.18.10" + "@babel/types" "^7.19.0" + "@babel/helper-hoist-variables@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" @@ -239,6 +292,20 @@ "@babel/traverse" "^7.18.9" "@babel/types" "^7.18.9" +"@babel/helper-module-transforms@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz#309b230f04e22c58c6a2c0c0c7e50b216d350c30" + integrity sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ== + dependencies: + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-module-imports" "^7.18.6" + "@babel/helper-simple-access" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/helper-validator-identifier" "^7.18.6" + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.19.0" + "@babel/types" "^7.19.0" + "@babel/helper-optimise-call-expression@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" @@ -298,6 +365,11 @@ dependencies: "@babel/types" "^7.18.6" +"@babel/helper-string-parser@^7.18.10": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz#181f22d28ebe1b3857fa575f5c290b1aaf659b56" + integrity sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw== + "@babel/helper-validator-identifier@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" @@ -327,6 +399,15 @@ "@babel/traverse" "^7.18.9" "@babel/types" "^7.18.9" +"@babel/helpers@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.19.0.tgz#f30534657faf246ae96551d88dd31e9d1fa1fc18" + integrity sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg== + dependencies: + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.19.0" + "@babel/types" "^7.19.0" + "@babel/highlight@^7.10.4", "@babel/highlight@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" @@ -346,6 +427,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.9.tgz#f2dde0c682ccc264a9a8595efd030a5cc8fd2539" integrity sha512-9uJveS9eY9DJ0t64YbIBZICtJy8a5QrDEVdiLCG97fVLpDTpGX7t8mMSb6OWw6Lrnjqj4O8zwjELX3dhoMgiBg== +"@babel/parser@^7.18.10", "@babel/parser@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.19.0.tgz#497fcafb1d5b61376959c1c338745ef0577aa02c" + integrity sha512-74bEXKX2h+8rrfQUfsBfuZZHzsEs6Eql4pqy/T4Nn6Y9wNPggQOqD6z6pn5Bl8ZfysKouFZT/UXEH94ummEeQw== + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2" @@ -1150,13 +1236,20 @@ dependencies: regenerator-runtime "^0.13.2" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.5", "@babel/runtime@^7.15.3", "@babel/runtime@^7.17.2", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.9", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.5", "@babel/runtime@^7.15.3", "@babel/runtime@^7.17.2", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.9", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.9.tgz#b4fcfce55db3d2e5e080d2490f608a3b9f407f4a" integrity sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw== dependencies: regenerator-runtime "^0.13.4" +"@babel/runtime@^7.12.0", "@babel/runtime@^7.19.0": + version "7.20.6" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.6.tgz#facf4879bfed9b5326326273a64220f099b0fce3" + integrity sha512-Q+8MqP7TiHMWzSfwiJwXCjyf4GYA4Dgw3emg/7xmwsdLJOZUp+nMqcOwOzzYheuM1rhDu8FSj2l0aoMygEuXuA== + dependencies: + regenerator-runtime "^0.13.11" + "@babel/runtime@~7.5.4": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.5.5.tgz#74fba56d35efbeca444091c7850ccd494fd2f132" @@ -1173,6 +1266,15 @@ "@babel/parser" "^7.18.6" "@babel/types" "^7.18.6" +"@babel/template@^7.18.10": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71" + integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/parser" "^7.18.10" + "@babel/types" "^7.18.10" + "@babel/traverse@^7.1.0", "@babel/traverse@^7.1.6", "@babel/traverse@^7.12.11", "@babel/traverse@^7.12.5", "@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.18.9", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.5", "@babel/traverse@^7.7.0": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.9.tgz#deeff3e8f1bad9786874cb2feda7a2d77a904f98" @@ -1189,6 +1291,22 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.19.0.tgz#eb9c561c7360005c592cc645abafe0c3c4548eed" + integrity sha512-4pKpFRDh+utd2mbRC8JLnlsMUii3PMHjpL6a0SZ4NMZy7YFP9aXORxEhdMVOc9CpWtDF09IkciQLEhK7Ml7gRA== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.19.0" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.19.0" + "@babel/helper-hoist-variables" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/parser" "^7.19.0" + "@babel/types" "^7.19.0" + debug "^4.1.0" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.12.11", "@babel/types@^7.12.7", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.5", "@babel/types@^7.7.0": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.9.tgz#7148d64ba133d8d73a41b3172ac4b83a1452205f" @@ -1197,6 +1315,15 @@ "@babel/helper-validator-identifier" "^7.18.6" to-fast-properties "^2.0.0" +"@babel/types@^7.18.10", "@babel/types@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.0.tgz#75f21d73d73dc0351f3368d28db73465f4814600" + integrity sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA== + dependencies: + "@babel/helper-string-parser" "^7.18.10" + "@babel/helper-validator-identifier" "^7.18.6" + to-fast-properties "^2.0.0" + "@base2/pretty-print-object@1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@base2/pretty-print-object/-/pretty-print-object-1.0.1.tgz#371ba8be66d556812dc7fb169ebc3c08378f69d4" @@ -1474,6 +1601,11 @@ resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== +"@esbuild/linux-loong64@0.15.7": + version "0.15.7" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.15.7.tgz#1ec4af4a16c554cbd402cc557ccdd874e3f7be53" + integrity sha512-IKznSJOsVUuyt7cDzzSZyqBEcZe+7WlBqTVXiF1OXP/4Nm387ToaXZ0fyLwI1iBlI/bzpxVq411QE2/Bt2XWWw== + "@eslint/eslintrc@^0.4.3": version "0.4.3" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" @@ -2242,7 +2374,7 @@ "@babel/preset-typescript" "^7.16.7" babel-plugin-styled-components "^1.13.3" -"@scm-manager/eslint-config@2.17.0", "@scm-manager/eslint-config@^2.17.0": +"@scm-manager/eslint-config@2.17.0", "@scm-manager/eslint-config@^2.16.0", "@scm-manager/eslint-config@^2.17.0": version "2.17.0" resolved "https://registry.yarnpkg.com/@scm-manager/eslint-config/-/eslint-config-2.17.0.tgz#b29b65f131a520cb47b5355d16fac99beb1ca881" integrity sha512-wbYI6g09NNhpyHSjRwStB7P0xRE6WxC30HZzmNpTN+2aqI0UZidkybCzTKMjAwW587uitg0z1g/cbntyXwYQFw== @@ -2382,6 +2514,31 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" +"@storybook/addon-actions@6.5.10", "@storybook/addon-actions@^6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-6.5.10.tgz#83ec807a899e0412cf98037647f256c45cc32bf5" + integrity sha512-vpCnEu81fmtYzOf0QsRYoDuf9wXgVVl2VysE1dWRebRhIUDU0JurrthTnw322e38D4FzaoNGqZE7wnBYBohzZA== + dependencies: + "@storybook/addons" "6.5.10" + "@storybook/api" "6.5.10" + "@storybook/client-logger" "6.5.10" + "@storybook/components" "6.5.10" + "@storybook/core-events" "6.5.10" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + "@storybook/theming" "6.5.10" + core-js "^3.8.2" + fast-deep-equal "^3.1.3" + global "^4.4.0" + lodash "^4.17.21" + polished "^4.2.2" + prop-types "^15.7.2" + react-inspector "^5.1.0" + regenerator-runtime "^0.13.7" + telejson "^6.0.8" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + uuid-browser "^3.1.0" + "@storybook/addon-actions@6.5.9", "@storybook/addon-actions@^6.4.20": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-6.5.9.tgz#d50d65631403e1a5b680961429d9c0d7bd383e68" @@ -2407,6 +2564,25 @@ util-deprecate "^1.0.2" uuid-browser "^3.1.0" +"@storybook/addon-backgrounds@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/addon-backgrounds/-/addon-backgrounds-6.5.10.tgz#9ab2d2165fe35d265d9d6013fc174fa8528a272f" + integrity sha512-5uzQda3dh891h7BL8e9Ymk7BI+QgkkzDJXuA4mHjOXfIiD3S3efhJI8amXuBC2ZpIr6zmVit0MqZVyoVve46cQ== + dependencies: + "@storybook/addons" "6.5.10" + "@storybook/api" "6.5.10" + "@storybook/client-logger" "6.5.10" + "@storybook/components" "6.5.10" + "@storybook/core-events" "6.5.10" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + "@storybook/theming" "6.5.10" + core-js "^3.8.2" + global "^4.4.0" + memoizerific "^1.11.3" + regenerator-runtime "^0.13.7" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + "@storybook/addon-backgrounds@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/addon-backgrounds/-/addon-backgrounds-6.5.9.tgz#a9579fc9d73f783a768c6c6ceb97193c5a1ee708" @@ -2426,6 +2602,24 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" +"@storybook/addon-controls@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/addon-controls/-/addon-controls-6.5.10.tgz#275ddcd0f4dc1a107777b425417a8f252f52a91e" + integrity sha512-lC2y3XcolmQAJwFurIyGrynAHPWmfNtTCdu3rQBTVGwyxCoNwdOOeC2jV0BRqX2+CW6OHzJr9frNWXPSaZ8c4w== + dependencies: + "@storybook/addons" "6.5.10" + "@storybook/api" "6.5.10" + "@storybook/client-logger" "6.5.10" + "@storybook/components" "6.5.10" + "@storybook/core-common" "6.5.10" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + "@storybook/node-logger" "6.5.10" + "@storybook/store" "6.5.10" + "@storybook/theming" "6.5.10" + core-js "^3.8.2" + lodash "^4.17.21" + ts-dedent "^2.0.0" + "@storybook/addon-controls@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/addon-controls/-/addon-controls-6.5.9.tgz#8f6ef939c87b3dbad98f8bda7e124f0b34f668d2" @@ -2444,6 +2638,40 @@ lodash "^4.17.21" ts-dedent "^2.0.0" +"@storybook/addon-docs@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/addon-docs/-/addon-docs-6.5.10.tgz#dde18b5659e8033651e139a231a7f69306433b92" + integrity sha512-1kgjo3f0vL6GN8fTwLL05M/q/kDdzvuqwhxPY/v5hubFb3aQZGr2yk9pRBaLAbs4bez0yG0ASXcwhYnrEZUppg== + dependencies: + "@babel/plugin-transform-react-jsx" "^7.12.12" + "@babel/preset-env" "^7.12.11" + "@jest/transform" "^26.6.2" + "@mdx-js/react" "^1.6.22" + "@storybook/addons" "6.5.10" + "@storybook/api" "6.5.10" + "@storybook/components" "6.5.10" + "@storybook/core-common" "6.5.10" + "@storybook/core-events" "6.5.10" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + "@storybook/docs-tools" "6.5.10" + "@storybook/mdx1-csf" "^0.0.1" + "@storybook/node-logger" "6.5.10" + "@storybook/postinstall" "6.5.10" + "@storybook/preview-web" "6.5.10" + "@storybook/source-loader" "6.5.10" + "@storybook/store" "6.5.10" + "@storybook/theming" "6.5.10" + babel-loader "^8.0.0" + core-js "^3.8.2" + fast-deep-equal "^3.1.3" + global "^4.4.0" + lodash "^4.17.21" + regenerator-runtime "^0.13.7" + remark-external-links "^8.0.0" + remark-slug "^6.0.0" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + "@storybook/addon-docs@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/addon-docs/-/addon-docs-6.5.9.tgz#32b27fb298624afd738c1371a764d7ff4831fe6d" @@ -2478,6 +2706,40 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" +"@storybook/addon-docs@^6.5.14": + version "6.5.14" + resolved "https://registry.yarnpkg.com/@storybook/addon-docs/-/addon-docs-6.5.14.tgz#5df8bd132890828320cfb5b4769f098142e57a4c" + integrity sha512-gapuzDY+dqgS4/Ap9zj5L76OSExBYtVNYej9xTiF+v0Gh4/kty9FIGlVWiqskffOmixL4nlyImpfsSH8V0JnCw== + dependencies: + "@babel/plugin-transform-react-jsx" "^7.12.12" + "@babel/preset-env" "^7.12.11" + "@jest/transform" "^26.6.2" + "@mdx-js/react" "^1.6.22" + "@storybook/addons" "6.5.14" + "@storybook/api" "6.5.14" + "@storybook/components" "6.5.14" + "@storybook/core-common" "6.5.14" + "@storybook/core-events" "6.5.14" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + "@storybook/docs-tools" "6.5.14" + "@storybook/mdx1-csf" "^0.0.1" + "@storybook/node-logger" "6.5.14" + "@storybook/postinstall" "6.5.14" + "@storybook/preview-web" "6.5.14" + "@storybook/source-loader" "6.5.14" + "@storybook/store" "6.5.14" + "@storybook/theming" "6.5.14" + babel-loader "^8.0.0" + core-js "^3.8.2" + fast-deep-equal "^3.1.3" + global "^4.4.0" + lodash "^4.17.21" + regenerator-runtime "^0.13.7" + remark-external-links "^8.0.0" + remark-slug "^6.0.0" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + "@storybook/addon-essentials@^6.4.20": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/addon-essentials/-/addon-essentials-6.5.9.tgz#32ba63acba4d153f4cf6ac33cbbf14b87d260788" @@ -2499,6 +2761,27 @@ regenerator-runtime "^0.13.7" ts-dedent "^2.0.0" +"@storybook/addon-essentials@^6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/addon-essentials/-/addon-essentials-6.5.10.tgz#d56f0f972e3bd5eae6c79b2126f510c5c020b62d" + integrity sha512-PT2aiR4vgAyB0pl3HNBUa4/a7NDRxASxAazz7zt9ZDirkipDKfxwdcLeRoJzwSngVDWEhuz5/paN5x4eNp4Hww== + dependencies: + "@storybook/addon-actions" "6.5.10" + "@storybook/addon-backgrounds" "6.5.10" + "@storybook/addon-controls" "6.5.10" + "@storybook/addon-docs" "6.5.10" + "@storybook/addon-measure" "6.5.10" + "@storybook/addon-outline" "6.5.10" + "@storybook/addon-toolbars" "6.5.10" + "@storybook/addon-viewport" "6.5.10" + "@storybook/addons" "6.5.10" + "@storybook/api" "6.5.10" + "@storybook/core-common" "6.5.10" + "@storybook/node-logger" "6.5.10" + core-js "^3.8.2" + regenerator-runtime "^0.13.7" + ts-dedent "^2.0.0" + "@storybook/addon-interactions@^6.4.20": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/addon-interactions/-/addon-interactions-6.5.9.tgz#4356e96beae8f44000955d8870c3acc6c8d1fb3a" @@ -2520,6 +2803,27 @@ polished "^4.2.2" ts-dedent "^2.2.0" +"@storybook/addon-interactions@^6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/addon-interactions/-/addon-interactions-6.5.10.tgz#c1d635b972bb7d21ccfe9b3bd928916683d92b26" + integrity sha512-+O/ZuQjonpFmTdFRqjCimQTx4S4c1+S3dYCn6gD/E4xzqlQn1BQaER3paX/aBUKb3oRaSO9RUQ+uxePM4zBEwA== + dependencies: + "@devtools-ds/object-inspector" "^1.1.2" + "@storybook/addons" "6.5.10" + "@storybook/api" "6.5.10" + "@storybook/client-logger" "6.5.10" + "@storybook/components" "6.5.10" + "@storybook/core-common" "6.5.10" + "@storybook/core-events" "6.5.10" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + "@storybook/instrumenter" "6.5.10" + "@storybook/theming" "6.5.10" + core-js "^3.8.2" + global "^4.4.0" + jest-mock "^27.0.6" + polished "^4.2.2" + ts-dedent "^2.2.0" + "@storybook/addon-links@^6.4.20": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/addon-links/-/addon-links-6.5.9.tgz#91cbca0c044796badf2498723fdd10dacea5748b" @@ -2538,6 +2842,38 @@ regenerator-runtime "^0.13.7" ts-dedent "^2.0.0" +"@storybook/addon-links@^6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/addon-links/-/addon-links-6.5.10.tgz#f66568fbc84b942032ac2de85f799d69fcf77922" + integrity sha512-r3WzYIPz7WjHiaPObC2Tg6bHuZRBb/Kt/X+Eitw+jTqBel7ksvkO36tn81q8Eyj61qIdNQmUWAaX/0aewT0kLA== + dependencies: + "@storybook/addons" "6.5.10" + "@storybook/client-logger" "6.5.10" + "@storybook/core-events" "6.5.10" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + "@storybook/router" "6.5.10" + "@types/qs" "^6.9.5" + core-js "^3.8.2" + global "^4.4.0" + prop-types "^15.7.2" + qs "^6.10.0" + regenerator-runtime "^0.13.7" + ts-dedent "^2.0.0" + +"@storybook/addon-measure@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/addon-measure/-/addon-measure-6.5.10.tgz#afac72a15d927f9f2119e2218017d757a8c8c6a4" + integrity sha512-ss7L1H5K5hXygDIoVwj+QyVXbve5V67x7CofLiLCgQYuJzfO16+sPGjiTGWMpTb4ijox2uKWnTkpilt5bCjXgw== + dependencies: + "@storybook/addons" "6.5.10" + "@storybook/api" "6.5.10" + "@storybook/client-logger" "6.5.10" + "@storybook/components" "6.5.10" + "@storybook/core-events" "6.5.10" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + core-js "^3.8.2" + global "^4.4.0" + "@storybook/addon-measure@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/addon-measure/-/addon-measure-6.5.9.tgz#f949d4f5f4025c839634114365f1399ea04bd0ae" @@ -2552,6 +2888,22 @@ core-js "^3.8.2" global "^4.4.0" +"@storybook/addon-outline@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/addon-outline/-/addon-outline-6.5.10.tgz#a49164697344de1bd11d35a5ce21e59afc0dd19c" + integrity sha512-AjdaeQ+/iBKmGrAqRW4niwMB6AkgGnYmSzVs5Cf6F/Sb4Dp+vzgLNOwLABD9qs8Ri8dvHl5J4QpVwQKUhYZaOQ== + dependencies: + "@storybook/addons" "6.5.10" + "@storybook/api" "6.5.10" + "@storybook/client-logger" "6.5.10" + "@storybook/components" "6.5.10" + "@storybook/core-events" "6.5.10" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + core-js "^3.8.2" + global "^4.4.0" + regenerator-runtime "^0.13.7" + ts-dedent "^2.0.0" + "@storybook/addon-outline@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/addon-outline/-/addon-outline-6.5.9.tgz#6ce9b3fb77e6a1a59607d7657c359c69f26cf6dd" @@ -2608,6 +2960,19 @@ regenerator-runtime "^0.13.7" ts-dedent "^2.0.0" +"@storybook/addon-toolbars@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/addon-toolbars/-/addon-toolbars-6.5.10.tgz#750e6c7fa50a54dac7fe5df7b7c239fb02a4456c" + integrity sha512-S0Ljc6Wv+bPbx2e0iTveJ6bBDqjsemu+FZD4qDLsHreoI7DAcqyrF5Def1l8xNohixIVpx8dQpYXRtyzNlXekg== + dependencies: + "@storybook/addons" "6.5.10" + "@storybook/api" "6.5.10" + "@storybook/client-logger" "6.5.10" + "@storybook/components" "6.5.10" + "@storybook/theming" "6.5.10" + core-js "^3.8.2" + regenerator-runtime "^0.13.7" + "@storybook/addon-toolbars@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/addon-toolbars/-/addon-toolbars-6.5.9.tgz#feedfdac08482d43bb1f3cc00840d80322c5eace" @@ -2621,6 +2986,23 @@ core-js "^3.8.2" regenerator-runtime "^0.13.7" +"@storybook/addon-viewport@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/addon-viewport/-/addon-viewport-6.5.10.tgz#4c6151d7e8177b07df8dcb4c61e842dac949215b" + integrity sha512-RFMd+4kZljyuJjR9OJ2bFXHrSG7VTi5FDZYWEU+4W1sBxzC+JhnVnUP+HJH3gUxEFIRQC5neRzwWRE9RUUoALQ== + dependencies: + "@storybook/addons" "6.5.10" + "@storybook/api" "6.5.10" + "@storybook/client-logger" "6.5.10" + "@storybook/components" "6.5.10" + "@storybook/core-events" "6.5.10" + "@storybook/theming" "6.5.10" + core-js "^3.8.2" + global "^4.4.0" + memoizerific "^1.11.3" + prop-types "^15.7.2" + regenerator-runtime "^0.13.7" + "@storybook/addon-viewport@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/addon-viewport/-/addon-viewport-6.5.9.tgz#fc390ccebea56d2e874ed2fda085c09fe04dd240" @@ -2638,6 +3020,40 @@ prop-types "^15.7.2" regenerator-runtime "^0.13.7" +"@storybook/addons@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-6.5.10.tgz#bff2f8fb8453e9df04fa6dbc41341fd05f4cdeba" + integrity sha512-VD4tBCQ23PkSeDoxuHcKy0RfhIs3oMYjBacOZx7d0bvOzK9WjPyvE2ysDAh7r/ceqnwmWHAScIpE+I1RU7gl+g== + dependencies: + "@storybook/api" "6.5.10" + "@storybook/channels" "6.5.10" + "@storybook/client-logger" "6.5.10" + "@storybook/core-events" "6.5.10" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + "@storybook/router" "6.5.10" + "@storybook/theming" "6.5.10" + "@types/webpack-env" "^1.16.0" + core-js "^3.8.2" + global "^4.4.0" + regenerator-runtime "^0.13.7" + +"@storybook/addons@6.5.14": + version "6.5.14" + resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-6.5.14.tgz#855ddd85533ffa596b7684f3df7b91b833fdf3f7" + integrity sha512-8wVy1eDKipj+dmWpVmmPa1p2jYVqDvrkWll4IsP/KU7AYFCiyCiVAd1ZPDv9EhDnwArfYYjrdJjAl6gmP0UMag== + dependencies: + "@storybook/api" "6.5.14" + "@storybook/channels" "6.5.14" + "@storybook/client-logger" "6.5.14" + "@storybook/core-events" "6.5.14" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + "@storybook/router" "6.5.14" + "@storybook/theming" "6.5.14" + "@types/webpack-env" "^1.16.0" + core-js "^3.8.2" + global "^4.4.0" + regenerator-runtime "^0.13.7" + "@storybook/addons@6.5.9", "@storybook/addons@^6.0.0", "@storybook/addons@^6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-6.5.9.tgz#5a9d7395c579a9cbc44dfc122362fb3c95dfb9d5" @@ -2694,6 +3110,52 @@ telejson "^3.2.0" util-deprecate "^1.0.2" +"@storybook/api@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/api/-/api-6.5.10.tgz#215623844648f0da2ac646fdcdd1345c2e1a8490" + integrity sha512-AkmgSPNEGdKp4oZA4KQ+RJsacw7GwfvjsVDnCkcXqS9zmSr/RNL0fhpcd60KKkmx/hGKPTDFpK3ZayxDrJ/h4A== + dependencies: + "@storybook/channels" "6.5.10" + "@storybook/client-logger" "6.5.10" + "@storybook/core-events" "6.5.10" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + "@storybook/router" "6.5.10" + "@storybook/semver" "^7.3.2" + "@storybook/theming" "6.5.10" + core-js "^3.8.2" + fast-deep-equal "^3.1.3" + global "^4.4.0" + lodash "^4.17.21" + memoizerific "^1.11.3" + regenerator-runtime "^0.13.7" + store2 "^2.12.0" + telejson "^6.0.8" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + +"@storybook/api@6.5.14": + version "6.5.14" + resolved "https://registry.yarnpkg.com/@storybook/api/-/api-6.5.14.tgz#e0caaee2d8634857ac428acc93db62aba744c1c1" + integrity sha512-RpgEWV4mxD1mNsGWkjSNq3+B/LFNIhXZc4OapEEK5u0jgCZKB7OCsRL9NJZB5WfpyN+vx8SwbUTgo8DIkes3qw== + dependencies: + "@storybook/channels" "6.5.14" + "@storybook/client-logger" "6.5.14" + "@storybook/core-events" "6.5.14" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + "@storybook/router" "6.5.14" + "@storybook/semver" "^7.3.2" + "@storybook/theming" "6.5.14" + core-js "^3.8.2" + fast-deep-equal "^3.1.3" + global "^4.4.0" + lodash "^4.17.21" + memoizerific "^1.11.3" + regenerator-runtime "^0.13.7" + store2 "^2.12.0" + telejson "^6.0.8" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + "@storybook/api@6.5.9", "@storybook/api@^6.0.0": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/api/-/api-6.5.9.tgz#303733214c9de0422d162f7c54ae05d088b89bf9" @@ -2722,6 +3184,59 @@ resolved "https://registry.yarnpkg.com/@storybook/babel-plugin-require-context-hook/-/babel-plugin-require-context-hook-1.0.1.tgz#0a4ec9816f6c7296ebc97dd8de3d2b7ae76f2e26" integrity sha512-WM4vjgSVi8epvGiYfru7BtC3f0tGwNs7QK3Uc4xQn4t5hHQvISnCqbNrHdDYmNW56Do+bBztE8SwP6NGUvd7ww== +"@storybook/builder-webpack4@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/builder-webpack4/-/builder-webpack4-6.5.10.tgz#79e95323577a37349ab3c81193fa249ac5c50173" + integrity sha512-AoKjsCNoQQoZXYwBDxO8s+yVEd5FjBJAaysEuUTHq2fb81jwLrGcEOo6hjw4jqfugZQIzYUEjPazlvubS78zpw== + dependencies: + "@babel/core" "^7.12.10" + "@storybook/addons" "6.5.10" + "@storybook/api" "6.5.10" + "@storybook/channel-postmessage" "6.5.10" + "@storybook/channels" "6.5.10" + "@storybook/client-api" "6.5.10" + "@storybook/client-logger" "6.5.10" + "@storybook/components" "6.5.10" + "@storybook/core-common" "6.5.10" + "@storybook/core-events" "6.5.10" + "@storybook/node-logger" "6.5.10" + "@storybook/preview-web" "6.5.10" + "@storybook/router" "6.5.10" + "@storybook/semver" "^7.3.2" + "@storybook/store" "6.5.10" + "@storybook/theming" "6.5.10" + "@storybook/ui" "6.5.10" + "@types/node" "^14.0.10 || ^16.0.0" + "@types/webpack" "^4.41.26" + autoprefixer "^9.8.6" + babel-loader "^8.0.0" + case-sensitive-paths-webpack-plugin "^2.3.0" + core-js "^3.8.2" + css-loader "^3.6.0" + file-loader "^6.2.0" + find-up "^5.0.0" + fork-ts-checker-webpack-plugin "^4.1.6" + glob "^7.1.6" + glob-promise "^3.4.0" + global "^4.4.0" + html-webpack-plugin "^4.0.0" + pnp-webpack-plugin "1.6.4" + postcss "^7.0.36" + postcss-flexbugs-fixes "^4.2.1" + postcss-loader "^4.2.0" + raw-loader "^4.0.2" + stable "^0.1.8" + style-loader "^1.3.0" + terser-webpack-plugin "^4.2.3" + ts-dedent "^2.0.0" + url-loader "^4.1.1" + util-deprecate "^1.0.2" + webpack "4" + webpack-dev-middleware "^3.7.3" + webpack-filter-warnings-plugin "^1.2.1" + webpack-hot-middleware "^2.25.1" + webpack-virtual-modules "^0.2.2" + "@storybook/builder-webpack4@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/builder-webpack4/-/builder-webpack4-6.5.9.tgz#4b37e1fa23a25aa4bfeaba640e5d318fcd511f95" @@ -2819,6 +3334,76 @@ webpack-hot-middleware "^2.25.1" webpack-virtual-modules "^0.4.1" +"@storybook/builder-webpack5@^6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/builder-webpack5/-/builder-webpack5-6.5.10.tgz#de78a8a262410bbe65eecc62f2beaed1fe44dd5d" + integrity sha512-Hcsm/TzGRXHndgQCftt+pzI7GQJRqAv8A8ie5b3aFcodhJfK0qzZsQD4Y4ZWxXh1I/xe5t74Kl2qUJ40PX+geA== + dependencies: + "@babel/core" "^7.12.10" + "@storybook/addons" "6.5.10" + "@storybook/api" "6.5.10" + "@storybook/channel-postmessage" "6.5.10" + "@storybook/channels" "6.5.10" + "@storybook/client-api" "6.5.10" + "@storybook/client-logger" "6.5.10" + "@storybook/components" "6.5.10" + "@storybook/core-common" "6.5.10" + "@storybook/core-events" "6.5.10" + "@storybook/node-logger" "6.5.10" + "@storybook/preview-web" "6.5.10" + "@storybook/router" "6.5.10" + "@storybook/semver" "^7.3.2" + "@storybook/store" "6.5.10" + "@storybook/theming" "6.5.10" + "@types/node" "^14.0.10 || ^16.0.0" + babel-loader "^8.0.0" + babel-plugin-named-exports-order "^0.0.2" + browser-assert "^1.2.1" + case-sensitive-paths-webpack-plugin "^2.3.0" + core-js "^3.8.2" + css-loader "^5.0.1" + fork-ts-checker-webpack-plugin "^6.0.4" + glob "^7.1.6" + glob-promise "^3.4.0" + html-webpack-plugin "^5.0.0" + path-browserify "^1.0.1" + process "^0.11.10" + stable "^0.1.8" + style-loader "^2.0.0" + terser-webpack-plugin "^5.0.3" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + webpack "^5.9.0" + webpack-dev-middleware "^4.1.0" + webpack-hot-middleware "^2.25.1" + webpack-virtual-modules "^0.4.1" + +"@storybook/channel-postmessage@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/channel-postmessage/-/channel-postmessage-6.5.10.tgz#be8971b4b7f91b664bb2c6965fdfb073d541a03e" + integrity sha512-t9PTA0UzFvYa3IlOfpBOolfrRMPTjUMIeCQ6FNyM0aj5GqLKSvoQzP8NeoRpIrvyf6ljFKKdaMaZ3fiCvh45ag== + dependencies: + "@storybook/channels" "6.5.10" + "@storybook/client-logger" "6.5.10" + "@storybook/core-events" "6.5.10" + core-js "^3.8.2" + global "^4.4.0" + qs "^6.10.0" + telejson "^6.0.8" + +"@storybook/channel-postmessage@6.5.14": + version "6.5.14" + resolved "https://registry.yarnpkg.com/@storybook/channel-postmessage/-/channel-postmessage-6.5.14.tgz#17d6071b3563819092ef3e18f8ca7946c2532823" + integrity sha512-0Cmdze5G3Qwxf7yYPGlJxGiY+KiEUQ+8GfpohsKGfvrP8cfSrx6VhxupHA7hDNyRh75hqZq5BrkW4HO9Ypbt5A== + dependencies: + "@storybook/channels" "6.5.14" + "@storybook/client-logger" "6.5.14" + "@storybook/core-events" "6.5.14" + core-js "^3.8.2" + global "^4.4.0" + qs "^6.10.0" + telejson "^6.0.8" + "@storybook/channel-postmessage@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/channel-postmessage/-/channel-postmessage-6.5.9.tgz#9cf4530f0364cee0d5e58f92d6fb5ce98e10257b" @@ -2832,6 +3417,17 @@ qs "^6.10.0" telejson "^6.0.8" +"@storybook/channel-websocket@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/channel-websocket/-/channel-websocket-6.5.10.tgz#bd1316a9b555229b215e5054a76b57c503dd8adc" + integrity sha512-RTXMZbMWCS3xU+4GVIdfnUXsKcwg/WTozy88/5OxaKjGw6KgRedqLAQJKJ6Y5XlnwIcWelirkHj/COwTTXhbPg== + dependencies: + "@storybook/channels" "6.5.10" + "@storybook/client-logger" "6.5.10" + core-js "^3.8.2" + global "^4.4.0" + telejson "^6.0.8" + "@storybook/channel-websocket@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/channel-websocket/-/channel-websocket-6.5.9.tgz#6b7a0127fec58ee5be4f6aebcf460adc564f2f34" @@ -2850,6 +3446,24 @@ dependencies: core-js "^3.0.1" +"@storybook/channels@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-6.5.10.tgz#fca5b0d1ea8d30b022e805301ed436407c867ac4" + integrity sha512-lo26YZ6kWpHXLhuHJF4P/bICY7jD/rXEZqReKtGOSk1Lv99/xvG6pqmcy3hWLf3v3Dy/8otjRPSR7izFVIIZgQ== + dependencies: + core-js "^3.8.2" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + +"@storybook/channels@6.5.14": + version "6.5.14" + resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-6.5.14.tgz#dcb73496a771dafb77a9e25dce2ba1adaa352df9" + integrity sha512-hHpr4Sya6fuEDhy7vnfD2QnL5wy1CaAK9BC0FLupndXnQyKJtygfIaUP4a0B2KntuNPbzPhclb2Hb4yM7CExmQ== + dependencies: + core-js "^3.8.2" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + "@storybook/channels@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-6.5.9.tgz#abfab89a6587a2688e9926d4aafeb11c9d8b2e79" @@ -2859,6 +3473,32 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" +"@storybook/client-api@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/client-api/-/client-api-6.5.10.tgz#0bc3f68ce014ce1ffd560472a893ba04be370f09" + integrity sha512-3wBWZl3NvMFgMovgEh+euiARAT2FXzpvTF4Q1gerGMNNDlrGxHnFvSuy4FHg/irtOGLa4yLz43ULFbYtpKw0Lg== + dependencies: + "@storybook/addons" "6.5.10" + "@storybook/channel-postmessage" "6.5.10" + "@storybook/channels" "6.5.10" + "@storybook/client-logger" "6.5.10" + "@storybook/core-events" "6.5.10" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + "@storybook/store" "6.5.10" + "@types/qs" "^6.9.5" + "@types/webpack-env" "^1.16.0" + core-js "^3.8.2" + fast-deep-equal "^3.1.3" + global "^4.4.0" + lodash "^4.17.21" + memoizerific "^1.11.3" + qs "^6.10.0" + regenerator-runtime "^0.13.7" + store2 "^2.12.0" + synchronous-promise "^2.0.15" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + "@storybook/client-api@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/client-api/-/client-api-6.5.9.tgz#3e4a8ec1d277fd81325c5d959c553161a85fa182" @@ -2892,6 +3532,22 @@ dependencies: core-js "^3.0.1" +"@storybook/client-logger@6.5.10", "@storybook/client-logger@^6.4.0": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-6.5.10.tgz#cfea823a5b8444409daa74f854c5d05367986b34" + integrity sha512-/xA0MHOevXev68hyLMQw8Qo8KczSIdXOxliAgrycMTkDmw5eKeA8TP7B8zP3wGuq/e3MrdD9/8MWhb/IQBNC3w== + dependencies: + core-js "^3.8.2" + global "^4.4.0" + +"@storybook/client-logger@6.5.14": + version "6.5.14" + resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-6.5.14.tgz#ec178f31e70969ae22399ce4207c05e4f1d480a8" + integrity sha512-r1pY69DGKzX9/GngkudthaaPxPlka16zjG7Y58psunwcoUuH3riAP1cjqhXt5+S8FKCNI/MGb82PLlCPX2Liuw== + dependencies: + core-js "^3.8.2" + global "^4.4.0" + "@storybook/client-logger@6.5.9", "@storybook/client-logger@^6.4.0 || >=6.5.0-0": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-6.5.9.tgz#dc1669abe8c45af1cc38f74c6f4b15ff33e63014" @@ -2900,6 +3556,34 @@ core-js "^3.8.2" global "^4.4.0" +"@storybook/components@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/components/-/components-6.5.10.tgz#268e1269bc3d262f7dcec13f96c3b844919687b8" + integrity sha512-9OhgB8YQfGwOKjo/N96N5mrtJ6qDVVoEM1zuhea32tJUd2eYf0aSWpryA9VnOM0V1q/8DAoCg5rPBMYWMBU5uw== + dependencies: + "@storybook/client-logger" "6.5.10" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + "@storybook/theming" "6.5.10" + core-js "^3.8.2" + memoizerific "^1.11.3" + qs "^6.10.0" + regenerator-runtime "^0.13.7" + util-deprecate "^1.0.2" + +"@storybook/components@6.5.14": + version "6.5.14" + resolved "https://registry.yarnpkg.com/@storybook/components/-/components-6.5.14.tgz#e4d35b689674a16d88d0d16f50319865387497dd" + integrity sha512-wqB9CF3sjxtgffnDW1G/W5SsKumsFQ0ftn/3PdrsvKULu5LM5bjNEqC2cTCWrk9vQhj+EVQxzdVM/BlPl/lSwg== + dependencies: + "@storybook/client-logger" "6.5.14" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + "@storybook/theming" "6.5.14" + core-js "^3.8.2" + memoizerific "^1.11.3" + qs "^6.10.0" + regenerator-runtime "^0.13.7" + util-deprecate "^1.0.2" + "@storybook/components@6.5.9", "@storybook/components@^6.0.0": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/components/-/components-6.5.9.tgz#97e07ffe11ab76c01ccee380888991bd161f75b2" @@ -2943,6 +3627,32 @@ simplebar-react "^1.0.0-alpha.6" ts-dedent "^1.1.0" +"@storybook/core-client@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/core-client/-/core-client-6.5.10.tgz#90c86923236c8efff33d454a0dc552f6df4346b1" + integrity sha512-THsIjNrOrampTl0Lgfjvfjk1JnktKb4CQLOM80KpQb4cjDqorBjJmErzUkUQ2y3fXvrDmQ/kUREkShET4XEdtA== + dependencies: + "@storybook/addons" "6.5.10" + "@storybook/channel-postmessage" "6.5.10" + "@storybook/channel-websocket" "6.5.10" + "@storybook/client-api" "6.5.10" + "@storybook/client-logger" "6.5.10" + "@storybook/core-events" "6.5.10" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + "@storybook/preview-web" "6.5.10" + "@storybook/store" "6.5.10" + "@storybook/ui" "6.5.10" + airbnb-js-shims "^2.2.1" + ansi-to-html "^0.6.11" + core-js "^3.8.2" + global "^4.4.0" + lodash "^4.17.21" + qs "^6.10.0" + regenerator-runtime "^0.13.7" + ts-dedent "^2.0.0" + unfetch "^4.2.0" + util-deprecate "^1.0.2" + "@storybook/core-client@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/core-client/-/core-client-6.5.9.tgz#ea6035d1c90d2c68e860e3cf629979491856cd88" @@ -2969,6 +3679,118 @@ unfetch "^4.2.0" util-deprecate "^1.0.2" +"@storybook/core-common@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/core-common/-/core-common-6.5.10.tgz#6b93449548b0890f5c68d89f0ca78e092026182c" + integrity sha512-Bx+VKkfWdrAmD8T51Sjq/mMhRaiapBHcpG4cU5bc3DMbg+LF2/yrgqv/cjVu+m5gHAzYCac5D7gqzBgvG7Myww== + dependencies: + "@babel/core" "^7.12.10" + "@babel/plugin-proposal-class-properties" "^7.12.1" + "@babel/plugin-proposal-decorators" "^7.12.12" + "@babel/plugin-proposal-export-default-from" "^7.12.1" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.12.1" + "@babel/plugin-proposal-object-rest-spread" "^7.12.1" + "@babel/plugin-proposal-optional-chaining" "^7.12.7" + "@babel/plugin-proposal-private-methods" "^7.12.1" + "@babel/plugin-proposal-private-property-in-object" "^7.12.1" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" + "@babel/plugin-transform-arrow-functions" "^7.12.1" + "@babel/plugin-transform-block-scoping" "^7.12.12" + "@babel/plugin-transform-classes" "^7.12.1" + "@babel/plugin-transform-destructuring" "^7.12.1" + "@babel/plugin-transform-for-of" "^7.12.1" + "@babel/plugin-transform-parameters" "^7.12.1" + "@babel/plugin-transform-shorthand-properties" "^7.12.1" + "@babel/plugin-transform-spread" "^7.12.1" + "@babel/preset-env" "^7.12.11" + "@babel/preset-react" "^7.12.10" + "@babel/preset-typescript" "^7.12.7" + "@babel/register" "^7.12.1" + "@storybook/node-logger" "6.5.10" + "@storybook/semver" "^7.3.2" + "@types/node" "^14.0.10 || ^16.0.0" + "@types/pretty-hrtime" "^1.0.0" + babel-loader "^8.0.0" + babel-plugin-macros "^3.0.1" + babel-plugin-polyfill-corejs3 "^0.1.0" + chalk "^4.1.0" + core-js "^3.8.2" + express "^4.17.1" + file-system-cache "^1.0.5" + find-up "^5.0.0" + fork-ts-checker-webpack-plugin "^6.0.4" + fs-extra "^9.0.1" + glob "^7.1.6" + handlebars "^4.7.7" + interpret "^2.2.0" + json5 "^2.1.3" + lazy-universal-dotenv "^3.0.1" + picomatch "^2.3.0" + pkg-dir "^5.0.0" + pretty-hrtime "^1.0.3" + resolve-from "^5.0.0" + slash "^3.0.0" + telejson "^6.0.8" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + webpack "4" + +"@storybook/core-common@6.5.14": + version "6.5.14" + resolved "https://registry.yarnpkg.com/@storybook/core-common/-/core-common-6.5.14.tgz#162f321d0c3011ece84b324f584c641c474e20d9" + integrity sha512-MrxhYXYrtN6z/+tydjPkCIwDQm5q8Jx+w4TPdLKBZu7vzfp6T3sT12Ym96j9MJ42CvE4vSDl/Njbw6C0D+yEVw== + dependencies: + "@babel/core" "^7.12.10" + "@babel/plugin-proposal-class-properties" "^7.12.1" + "@babel/plugin-proposal-decorators" "^7.12.12" + "@babel/plugin-proposal-export-default-from" "^7.12.1" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.12.1" + "@babel/plugin-proposal-object-rest-spread" "^7.12.1" + "@babel/plugin-proposal-optional-chaining" "^7.12.7" + "@babel/plugin-proposal-private-methods" "^7.12.1" + "@babel/plugin-proposal-private-property-in-object" "^7.12.1" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" + "@babel/plugin-transform-arrow-functions" "^7.12.1" + "@babel/plugin-transform-block-scoping" "^7.12.12" + "@babel/plugin-transform-classes" "^7.12.1" + "@babel/plugin-transform-destructuring" "^7.12.1" + "@babel/plugin-transform-for-of" "^7.12.1" + "@babel/plugin-transform-parameters" "^7.12.1" + "@babel/plugin-transform-shorthand-properties" "^7.12.1" + "@babel/plugin-transform-spread" "^7.12.1" + "@babel/preset-env" "^7.12.11" + "@babel/preset-react" "^7.12.10" + "@babel/preset-typescript" "^7.12.7" + "@babel/register" "^7.12.1" + "@storybook/node-logger" "6.5.14" + "@storybook/semver" "^7.3.2" + "@types/node" "^14.0.10 || ^16.0.0" + "@types/pretty-hrtime" "^1.0.0" + babel-loader "^8.0.0" + babel-plugin-macros "^3.0.1" + babel-plugin-polyfill-corejs3 "^0.1.0" + chalk "^4.1.0" + core-js "^3.8.2" + express "^4.17.1" + file-system-cache "^1.0.5" + find-up "^5.0.0" + fork-ts-checker-webpack-plugin "^6.0.4" + fs-extra "^9.0.1" + glob "^7.1.6" + handlebars "^4.7.7" + interpret "^2.2.0" + json5 "^2.1.3" + lazy-universal-dotenv "^3.0.1" + picomatch "^2.3.0" + pkg-dir "^5.0.0" + pretty-hrtime "^1.0.3" + resolve-from "^5.0.0" + slash "^3.0.0" + telejson "^6.0.8" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + webpack "4" + "@storybook/core-common@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/core-common/-/core-common-6.5.9.tgz#7ca8258ea2634b1d64695c1e4262f71cc7457989" @@ -3032,6 +3854,20 @@ dependencies: core-js "^3.0.1" +"@storybook/core-events@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/core-events/-/core-events-6.5.10.tgz#66d87c8ea18db8e448018a16a3d0198ddbcbc683" + integrity sha512-EVb1gO1172klVIAABLOoigFMx0V88uctY0K/qVCO8n6v+wd2+0Ccn63kl+gTxsAC3WZ8XhXh9q2w5ImHklVECw== + dependencies: + core-js "^3.8.2" + +"@storybook/core-events@6.5.14": + version "6.5.14" + resolved "https://registry.yarnpkg.com/@storybook/core-events/-/core-events-6.5.14.tgz#5b4f94d336cd14f0e8e213a0f3cf9a098c45d1dc" + integrity sha512-PLu0M8Mqt9ruN5RupgcFKHEybiSm3CdWQyylWO5FRGg+WZV3BCm0aI8ujvO1GAm+YEi57Lull+M9d6NUycTpRg== + dependencies: + core-js "^3.8.2" + "@storybook/core-events@6.5.9", "@storybook/core-events@^6.0.0": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/core-events/-/core-events-6.5.9.tgz#5b0783c7d22a586c0f5e927a61fe1b1223e19637" @@ -3039,6 +3875,57 @@ dependencies: core-js "^3.8.2" +"@storybook/core-server@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/core-server/-/core-server-6.5.10.tgz#ada3d647833c02cb8c742281c1f314ff866f96f8" + integrity sha512-jqwpA0ccA8X5ck4esWBid04+cEIVqirdAcqJeNb9IZAD+bRreO4Im8ilzr7jc5AmQ9fkqHs2NByFKh9TITp8NQ== + dependencies: + "@discoveryjs/json-ext" "^0.5.3" + "@storybook/builder-webpack4" "6.5.10" + "@storybook/core-client" "6.5.10" + "@storybook/core-common" "6.5.10" + "@storybook/core-events" "6.5.10" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + "@storybook/csf-tools" "6.5.10" + "@storybook/manager-webpack4" "6.5.10" + "@storybook/node-logger" "6.5.10" + "@storybook/semver" "^7.3.2" + "@storybook/store" "6.5.10" + "@storybook/telemetry" "6.5.10" + "@types/node" "^14.0.10 || ^16.0.0" + "@types/node-fetch" "^2.5.7" + "@types/pretty-hrtime" "^1.0.0" + "@types/webpack" "^4.41.26" + better-opn "^2.1.1" + boxen "^5.1.2" + chalk "^4.1.0" + cli-table3 "^0.6.1" + commander "^6.2.1" + compression "^1.7.4" + core-js "^3.8.2" + cpy "^8.1.2" + detect-port "^1.3.0" + express "^4.17.1" + fs-extra "^9.0.1" + global "^4.4.0" + globby "^11.0.2" + ip "^2.0.0" + lodash "^4.17.21" + node-fetch "^2.6.7" + open "^8.4.0" + pretty-hrtime "^1.0.3" + prompts "^2.4.0" + regenerator-runtime "^0.13.7" + serve-favicon "^2.5.0" + slash "^3.0.0" + telejson "^6.0.8" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + watchpack "^2.2.0" + webpack "4" + ws "^8.2.3" + x-default-browser "^0.4.0" + "@storybook/core-server@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/core-server/-/core-server-6.5.9.tgz#749a881c1a81d7cf1a69f3782c06a7f0c39a505c" @@ -3090,6 +3977,14 @@ ws "^8.2.3" x-default-browser "^0.4.0" +"@storybook/core@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/core/-/core-6.5.10.tgz#15ec8be85943251e25c2c24e80e20dcacc4fed65" + integrity sha512-K86yYa0tYlMxADlwQTculYvPROokQau09SCVqpsLg3wJCTvYFL4+SIqcYoyBSbFmHOdnYbJgPydjN33MYLiOZQ== + dependencies: + "@storybook/core-client" "6.5.10" + "@storybook/core-server" "6.5.10" + "@storybook/core@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/core/-/core-6.5.9.tgz#da4f237391d99aed1228323f24b335cafbdf3499" @@ -3098,6 +3993,26 @@ "@storybook/core-client" "6.5.9" "@storybook/core-server" "6.5.9" +"@storybook/csf-tools@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/csf-tools/-/csf-tools-6.5.10.tgz#ae6f1ebd4951e8978c8fe3e08ddd2bd269bf922b" + integrity sha512-H77kZQEisu7+skzeIbNZwmE09OqLjwJTeFhLN1pcjxKVa30LEI3pBHcNBxVKqgxl+Yg3KkB7W/ArLO2N+i2ohw== + dependencies: + "@babel/core" "^7.12.10" + "@babel/generator" "^7.12.11" + "@babel/parser" "^7.12.11" + "@babel/plugin-transform-react-jsx" "^7.12.12" + "@babel/preset-env" "^7.12.11" + "@babel/traverse" "^7.12.11" + "@babel/types" "^7.12.11" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + "@storybook/mdx1-csf" "^0.0.1" + core-js "^3.8.2" + fs-extra "^9.0.1" + global "^4.4.0" + regenerator-runtime "^0.13.7" + ts-dedent "^2.0.0" + "@storybook/csf-tools@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/csf-tools/-/csf-tools-6.5.9.tgz#8e01df2305b53e228229f0b45ada3720e6e42a1c" @@ -3132,6 +4047,32 @@ dependencies: lodash "^4.17.15" +"@storybook/docs-tools@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/docs-tools/-/docs-tools-6.5.10.tgz#30baa62c1ca3a18b13625b6b305e23e39f404416" + integrity sha512-/bvYgOO+CxMEcHifkjJg0A60OTGOhcjGxnsB1h0gJuxMrqA/7Qwc108bFmPiX0eiD1BovFkZLJV4O6OY7zP5Vw== + dependencies: + "@babel/core" "^7.12.10" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + "@storybook/store" "6.5.10" + core-js "^3.8.2" + doctrine "^3.0.0" + lodash "^4.17.21" + regenerator-runtime "^0.13.7" + +"@storybook/docs-tools@6.5.14": + version "6.5.14" + resolved "https://registry.yarnpkg.com/@storybook/docs-tools/-/docs-tools-6.5.14.tgz#68d9c156cdc80a906570807f1d116be103032656" + integrity sha512-qA0UWvrZ7XyIWD+01NGHiiGPSbfercrxjphM9wHgF6KrO6e5iykNKIEL4elsM+EV4szfhlalQdtpnwM7WtXODA== + dependencies: + "@babel/core" "^7.12.10" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + "@storybook/store" "6.5.14" + core-js "^3.8.2" + doctrine "^3.0.0" + lodash "^4.17.21" + regenerator-runtime "^0.13.7" + "@storybook/docs-tools@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/docs-tools/-/docs-tools-6.5.9.tgz#5ff304f881e972ce14923a5ffcfed3f052094889" @@ -3145,6 +4086,17 @@ lodash "^4.17.21" regenerator-runtime "^0.13.7" +"@storybook/instrumenter@6.5.10", "@storybook/instrumenter@^6.4.0": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/instrumenter/-/instrumenter-6.5.10.tgz#5443f5fdb25ddb589ede2e2f0147becaffd405cb" + integrity sha512-3yKJW68wTnGYEts2mJQG6M7ZE+fe54fuy5lBBzRtvWnC15uWTxuaiFp2kxH5b+stSCi4m71ws45RNiEafdBgEQ== + dependencies: + "@storybook/addons" "6.5.10" + "@storybook/client-logger" "6.5.10" + "@storybook/core-events" "6.5.10" + core-js "^3.8.2" + global "^4.4.0" + "@storybook/instrumenter@6.5.9", "@storybook/instrumenter@^6.4.0 || >=6.5.0-0": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/instrumenter/-/instrumenter-6.5.9.tgz#885d9dec31b7b7fa6ea29b446105480450e527b8" @@ -3156,6 +4108,47 @@ core-js "^3.8.2" global "^4.4.0" +"@storybook/manager-webpack4@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/manager-webpack4/-/manager-webpack4-6.5.10.tgz#41bae252b863484f293954ef2d2dc80bf3e028f1" + integrity sha512-N/TlNDhuhARuFipR/ZJ/xEVESz23iIbCsZ4VNehLHm8PpiGlQUehk+jMjWmz5XV0bJItwjRclY+CU3GjZKblfQ== + dependencies: + "@babel/core" "^7.12.10" + "@babel/plugin-transform-template-literals" "^7.12.1" + "@babel/preset-react" "^7.12.10" + "@storybook/addons" "6.5.10" + "@storybook/core-client" "6.5.10" + "@storybook/core-common" "6.5.10" + "@storybook/node-logger" "6.5.10" + "@storybook/theming" "6.5.10" + "@storybook/ui" "6.5.10" + "@types/node" "^14.0.10 || ^16.0.0" + "@types/webpack" "^4.41.26" + babel-loader "^8.0.0" + case-sensitive-paths-webpack-plugin "^2.3.0" + chalk "^4.1.0" + core-js "^3.8.2" + css-loader "^3.6.0" + express "^4.17.1" + file-loader "^6.2.0" + find-up "^5.0.0" + fs-extra "^9.0.1" + html-webpack-plugin "^4.0.0" + node-fetch "^2.6.7" + pnp-webpack-plugin "1.6.4" + read-pkg-up "^7.0.1" + regenerator-runtime "^0.13.7" + resolve-from "^5.0.0" + style-loader "^1.3.0" + telejson "^6.0.8" + terser-webpack-plugin "^4.2.3" + ts-dedent "^2.0.0" + url-loader "^4.1.1" + util-deprecate "^1.0.2" + webpack "4" + webpack-dev-middleware "^3.7.3" + webpack-virtual-modules "^0.2.2" + "@storybook/manager-webpack4@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/manager-webpack4/-/manager-webpack4-6.5.9.tgz#c75d2cced4550c8a786f00b0e57b203d613e706c" @@ -3235,6 +4228,44 @@ webpack-dev-middleware "^4.1.0" webpack-virtual-modules "^0.4.1" +"@storybook/manager-webpack5@^6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/manager-webpack5/-/manager-webpack5-6.5.10.tgz#dff8e53615906284b68df013935e8a6234ddaafe" + integrity sha512-uRo+6e5MiVOtyFVMYIKVqvpDveCjHyzXBfetSYR7rKEZoaDMEnLLiuF7DIH12lzxwmzCJ1gIc4lf5HFiTMNkgw== + dependencies: + "@babel/core" "^7.12.10" + "@babel/plugin-transform-template-literals" "^7.12.1" + "@babel/preset-react" "^7.12.10" + "@storybook/addons" "6.5.10" + "@storybook/core-client" "6.5.10" + "@storybook/core-common" "6.5.10" + "@storybook/node-logger" "6.5.10" + "@storybook/theming" "6.5.10" + "@storybook/ui" "6.5.10" + "@types/node" "^14.0.10 || ^16.0.0" + babel-loader "^8.0.0" + case-sensitive-paths-webpack-plugin "^2.3.0" + chalk "^4.1.0" + core-js "^3.8.2" + css-loader "^5.0.1" + express "^4.17.1" + find-up "^5.0.0" + fs-extra "^9.0.1" + html-webpack-plugin "^5.0.0" + node-fetch "^2.6.7" + process "^0.11.10" + read-pkg-up "^7.0.1" + regenerator-runtime "^0.13.7" + resolve-from "^5.0.0" + style-loader "^2.0.0" + telejson "^6.0.8" + terser-webpack-plugin "^5.0.3" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + webpack "^5.9.0" + webpack-dev-middleware "^4.1.0" + webpack-virtual-modules "^0.4.1" + "@storybook/mdx1-csf@^0.0.1": version "0.0.1" resolved "https://registry.yarnpkg.com/@storybook/mdx1-csf/-/mdx1-csf-0.0.1.tgz#d4184e3f6486fade9f7a6bfaf934d9bc07718d5b" @@ -3252,6 +4283,28 @@ prettier ">=2.2.1 <=2.3.0" ts-dedent "^2.0.0" +"@storybook/node-logger@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/node-logger/-/node-logger-6.5.10.tgz#bce4c04009c4b62d6d2fb617176d7ef0084e9e89" + integrity sha512-bYswXIKV7Stru8vYfkjUMNN8UhF7Qg7NRsUvG5Djt5lLIae1XmUIgnH40mU/nW4X4BSfcR9MKxsSsngvn2WmQg== + dependencies: + "@types/npmlog" "^4.1.2" + chalk "^4.1.0" + core-js "^3.8.2" + npmlog "^5.0.1" + pretty-hrtime "^1.0.3" + +"@storybook/node-logger@6.5.14": + version "6.5.14" + resolved "https://registry.yarnpkg.com/@storybook/node-logger/-/node-logger-6.5.14.tgz#5d85c475c0afd4124f86fae559bcb35db92f35b2" + integrity sha512-MbEEgUEfrDN8Y0vzZJqPcxwWvX0l8zAsXy6d/DORP2AmwuNmnWTy++BE9YhxH6HMdM1ivRDmBbT30+KBUWhnUA== + dependencies: + "@types/npmlog" "^4.1.2" + chalk "^4.1.0" + core-js "^3.8.2" + npmlog "^5.0.1" + pretty-hrtime "^1.0.3" + "@storybook/node-logger@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/node-logger/-/node-logger-6.5.9.tgz#129cfe0d0f79cab4f6a2ba194d39516680b1626f" @@ -3263,6 +4316,20 @@ npmlog "^5.0.1" pretty-hrtime "^1.0.3" +"@storybook/postinstall@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/postinstall/-/postinstall-6.5.10.tgz#b25378da036bce7b318c6732733aa5ad43449f37" + integrity sha512-xqUdpnFHYkn8MgtV+QztvIsRWa6jQUk7QT1Mu17Y0S7PbslNGsuskRPHenHhACXBJF+TM86R+4BaAhnVYTmElw== + dependencies: + core-js "^3.8.2" + +"@storybook/postinstall@6.5.14": + version "6.5.14" + resolved "https://registry.yarnpkg.com/@storybook/postinstall/-/postinstall-6.5.14.tgz#492d45008c39c4274dfc1a69ef5f31981e913f99" + integrity sha512-vtnQczSSkz7aPIc2dsDaZWlCDAcJb258KGXk72w7MEY9/zLlr6tdQLI30B6SkRNFnR8fQQf4H2gbFq/GM0EF5A== + dependencies: + core-js "^3.8.2" + "@storybook/postinstall@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/postinstall/-/postinstall-6.5.9.tgz#a5a2565808e9d7bc310e78c279b09ce337fe3457" @@ -3270,6 +4337,50 @@ dependencies: core-js "^3.8.2" +"@storybook/preview-web@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/preview-web/-/preview-web-6.5.10.tgz#81bf5d3f5fca9e26099c057206bd8e684225989b" + integrity sha512-sTC/o5gkvALOtcNgtApGKGN9EavvSxRHBeBh+5BQjV2qQ8ap+26RsfUizNBECAa2Jrn4osaDYn9HRhJLFL69WA== + dependencies: + "@storybook/addons" "6.5.10" + "@storybook/channel-postmessage" "6.5.10" + "@storybook/client-logger" "6.5.10" + "@storybook/core-events" "6.5.10" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + "@storybook/store" "6.5.10" + ansi-to-html "^0.6.11" + core-js "^3.8.2" + global "^4.4.0" + lodash "^4.17.21" + qs "^6.10.0" + regenerator-runtime "^0.13.7" + synchronous-promise "^2.0.15" + ts-dedent "^2.0.0" + unfetch "^4.2.0" + util-deprecate "^1.0.2" + +"@storybook/preview-web@6.5.14": + version "6.5.14" + resolved "https://registry.yarnpkg.com/@storybook/preview-web/-/preview-web-6.5.14.tgz#acfd5e3ba72a00405f9ad5925a9a7844b36602c4" + integrity sha512-ey2E7222xw0itPgCWH7ZIrdgM1yCdYte/QxRvwv/O4us4SUs/RQaL1aoCD+hCRwd0BNyZUk/u1KnqB4y0MnHww== + dependencies: + "@storybook/addons" "6.5.14" + "@storybook/channel-postmessage" "6.5.14" + "@storybook/client-logger" "6.5.14" + "@storybook/core-events" "6.5.14" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + "@storybook/store" "6.5.14" + ansi-to-html "^0.6.11" + core-js "^3.8.2" + global "^4.4.0" + lodash "^4.17.21" + qs "^6.10.0" + regenerator-runtime "^0.13.7" + synchronous-promise "^2.0.15" + ts-dedent "^2.0.0" + unfetch "^4.2.0" + util-deprecate "^1.0.2" + "@storybook/preview-web@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/preview-web/-/preview-web-6.5.9.tgz#557d919e6df50d66259521aa36ebf4055bbd236e" @@ -3346,6 +4457,47 @@ util-deprecate "^1.0.2" webpack ">=4.43.0 <6.0.0" +"@storybook/react@^6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/react/-/react-6.5.10.tgz#6e9f5cf5e4c81d966774c08c87fb2414052db454" + integrity sha512-m8S1qQrwA7pDGwdKEvL6LV3YKvSzVUY297Fq+xcTU3irnAy4sHDuFoLqV6Mi1510mErK1r8+rf+0R5rEXB219g== + dependencies: + "@babel/preset-flow" "^7.12.1" + "@babel/preset-react" "^7.12.10" + "@pmmmwh/react-refresh-webpack-plugin" "^0.5.3" + "@storybook/addons" "6.5.10" + "@storybook/client-logger" "6.5.10" + "@storybook/core" "6.5.10" + "@storybook/core-common" "6.5.10" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + "@storybook/docs-tools" "6.5.10" + "@storybook/node-logger" "6.5.10" + "@storybook/react-docgen-typescript-plugin" "1.0.2-canary.6.9d540b91e815f8fc2f8829189deb00553559ff63.0" + "@storybook/semver" "^7.3.2" + "@storybook/store" "6.5.10" + "@types/estree" "^0.0.51" + "@types/node" "^14.14.20 || ^16.0.0" + "@types/webpack-env" "^1.16.0" + acorn "^7.4.1" + acorn-jsx "^5.3.1" + acorn-walk "^7.2.0" + babel-plugin-add-react-displayname "^0.0.5" + babel-plugin-react-docgen "^4.2.1" + core-js "^3.8.2" + escodegen "^2.0.0" + fs-extra "^9.0.1" + global "^4.4.0" + html-tags "^3.1.0" + lodash "^4.17.21" + prop-types "^15.7.2" + react-element-to-jsx-string "^14.3.4" + react-refresh "^0.11.0" + read-pkg-up "^7.0.1" + regenerator-runtime "^0.13.7" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + webpack ">=4.43.0 <6.0.0" + "@storybook/router@5.3.22": version "5.3.22" resolved "https://registry.yarnpkg.com/@storybook/router/-/router-5.3.22.tgz#03ca154cbc63c7124cc1d334569c4f4ac41d92b5" @@ -3361,6 +4513,28 @@ qs "^6.6.0" util-deprecate "^1.0.2" +"@storybook/router@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/router/-/router-6.5.10.tgz#b0c342e080c1d2b5344603bc43a6c75734a4a879" + integrity sha512-O+vNW/eEpYFF8eCg5jZjNQ6q2DKQVxqDRPCy9pJdEbvavMDZn6AFYgVK+VJe5F4211WW2yncOu922xObCxXJYg== + dependencies: + "@storybook/client-logger" "6.5.10" + core-js "^3.8.2" + memoizerific "^1.11.3" + qs "^6.10.0" + regenerator-runtime "^0.13.7" + +"@storybook/router@6.5.14": + version "6.5.14" + resolved "https://registry.yarnpkg.com/@storybook/router/-/router-6.5.14.tgz#8cb959c8cfece2a948cd6a4e14ac0fa1cece3095" + integrity sha512-AvHbpRUAHnzm5pmwFPjDR09uPjQITD6kA0QNa2pe+7/Q/b4k40z5dHvHZJ/YhWhwVwGqGBG20KdDOl30wLXAZw== + dependencies: + "@storybook/client-logger" "6.5.14" + core-js "^3.8.2" + memoizerific "^1.11.3" + qs "^6.10.0" + regenerator-runtime "^0.13.7" + "@storybook/router@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/router/-/router-6.5.9.tgz#4740248f8517425b2056273fb366ace8a17c65e8" @@ -3380,6 +4554,38 @@ core-js "^3.6.5" find-up "^4.1.0" +"@storybook/source-loader@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/source-loader/-/source-loader-6.5.10.tgz#f62b4c7b1933976a20913ddc149d55026ef4c872" + integrity sha512-1RxxRumpjs8VUUwES9LId+cuNQnixhZAcwCxd6jaKkTZbjiQCtAhXX6DBTjJGV1u/JnCsqEp5b1wB8j/EioNHw== + dependencies: + "@storybook/addons" "6.5.10" + "@storybook/client-logger" "6.5.10" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + core-js "^3.8.2" + estraverse "^5.2.0" + global "^4.4.0" + loader-utils "^2.0.0" + lodash "^4.17.21" + prettier ">=2.2.1 <=2.3.0" + regenerator-runtime "^0.13.7" + +"@storybook/source-loader@6.5.14": + version "6.5.14" + resolved "https://registry.yarnpkg.com/@storybook/source-loader/-/source-loader-6.5.14.tgz#cf4e78166a40edd7dd3df3563face750f70c29df" + integrity sha512-0GKMZ6IMVGxfQn/RYdRdnzxCe4+zZsxHBY9SQB2bbYWyfjJQ5rCJvmYQuMAuuuUmXBv9gk50iJLwai+lb4tbFg== + dependencies: + "@storybook/addons" "6.5.14" + "@storybook/client-logger" "6.5.14" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + core-js "^3.8.2" + estraverse "^5.2.0" + global "^4.4.0" + loader-utils "^2.0.4" + lodash "^4.17.21" + prettier ">=2.2.1 <=2.3.0" + regenerator-runtime "^0.13.7" + "@storybook/source-loader@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/source-loader/-/source-loader-6.5.9.tgz#7b6f065c6a6108c4b4ca7e45bfd78707373d84ac" @@ -3396,6 +4602,48 @@ prettier ">=2.2.1 <=2.3.0" regenerator-runtime "^0.13.7" +"@storybook/store@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/store/-/store-6.5.10.tgz#85df17a8d57af0cba3934b3c6046537e2bca9abd" + integrity sha512-RswrSYh2IiKkytFPxP9AvP+hekjrvHK2ILvyDk2ZgduCN4n5ivsekOb+N3M2t+dq1eLuW9or5n2T4OWwAwjxxQ== + dependencies: + "@storybook/addons" "6.5.10" + "@storybook/client-logger" "6.5.10" + "@storybook/core-events" "6.5.10" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + core-js "^3.8.2" + fast-deep-equal "^3.1.3" + global "^4.4.0" + lodash "^4.17.21" + memoizerific "^1.11.3" + regenerator-runtime "^0.13.7" + slash "^3.0.0" + stable "^0.1.8" + synchronous-promise "^2.0.15" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + +"@storybook/store@6.5.14": + version "6.5.14" + resolved "https://registry.yarnpkg.com/@storybook/store/-/store-6.5.14.tgz#92b67aac8c6a55beff934e135937a1c6e1e77879" + integrity sha512-s07Vw4nbShPYwBJmVXzptuyCkrDQD3khcrKB5L7NsHHgWsm2QI0OyiPMuMbSvgipjcMc/oRqdL3tFUeFak9EMg== + dependencies: + "@storybook/addons" "6.5.14" + "@storybook/client-logger" "6.5.14" + "@storybook/core-events" "6.5.14" + "@storybook/csf" "0.0.2--canary.4566f4d.1" + core-js "^3.8.2" + fast-deep-equal "^3.1.3" + global "^4.4.0" + lodash "^4.17.21" + memoizerific "^1.11.3" + regenerator-runtime "^0.13.7" + slash "^3.0.0" + stable "^0.1.8" + synchronous-promise "^2.0.15" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + "@storybook/store@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/store/-/store-6.5.9.tgz#dc9963fc013636569082bd8f7200804866373735" @@ -3417,6 +4665,24 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" +"@storybook/telemetry@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/telemetry/-/telemetry-6.5.10.tgz#742b05a55dfe8470ce4cb371f3f3f2c02f96e816" + integrity sha512-+M5HILDFS8nDumLxeSeAwi1MTzIuV6UWzV4yB2wcsEXOBTdplcl9oYqFKtlst78oOIdGtpPYxYfivDlqxC2K4g== + dependencies: + "@storybook/client-logger" "6.5.10" + "@storybook/core-common" "6.5.10" + chalk "^4.1.0" + core-js "^3.8.2" + detect-package-manager "^2.0.1" + fetch-retry "^5.0.2" + fs-extra "^9.0.1" + global "^4.4.0" + isomorphic-unfetch "^3.1.0" + nanoid "^3.3.1" + read-pkg-up "^7.0.1" + regenerator-runtime "^0.13.7" + "@storybook/telemetry@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/telemetry/-/telemetry-6.5.9.tgz#8e1e0d4a89fc2387620045e5ea96c109d16a7247" @@ -3435,6 +4701,17 @@ read-pkg-up "^7.0.1" regenerator-runtime "^0.13.7" +"@storybook/testing-library@^0.0.13": + version "0.0.13" + resolved "https://registry.yarnpkg.com/@storybook/testing-library/-/testing-library-0.0.13.tgz#417c87d4ea62895092ec5fdf67027ae201254f45" + integrity sha512-vRMeIGer4EjJkTgI8sQyK9W431ekPWYCWL//OmSDJ64IT3h7FnW7Xg6p+eqM3oII98/O5pcya5049GxnjaPtxw== + dependencies: + "@storybook/client-logger" "^6.4.0" + "@storybook/instrumenter" "^6.4.0" + "@testing-library/dom" "^8.3.0" + "@testing-library/user-event" "^13.2.1" + ts-dedent "^2.2.0" + "@storybook/testing-library@^0.0.9": version "0.0.9" resolved "https://registry.yarnpkg.com/@storybook/testing-library/-/testing-library-0.0.9.tgz#e3d6e8077d58305bb352903e820dcae9306e7a7f" @@ -3464,6 +4741,26 @@ resolve-from "^5.0.0" ts-dedent "^1.1.0" +"@storybook/theming@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-6.5.10.tgz#052100979c1270fc8f60653c1a13a6f047318109" + integrity sha512-BvTQBBcSEwKKcsVmF+Ol6v0RIQUr+bxP7gb10wtfBd23mZTEFA0C1N5FnZr/dDeiBKG1pvf1UKvoYA731y0BsA== + dependencies: + "@storybook/client-logger" "6.5.10" + core-js "^3.8.2" + memoizerific "^1.11.3" + regenerator-runtime "^0.13.7" + +"@storybook/theming@6.5.14": + version "6.5.14" + resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-6.5.14.tgz#4cc7e568b9641112f35abe0606cc6925952cb647" + integrity sha512-3ff6RLZGaIil/AFJ0/BRlE2hhdPrC5v6wGbRfroZVmGldRCxio/7+KAA3LH6cuHnjK5MeBcCBaHuxzXqGmbEFw== + dependencies: + "@storybook/client-logger" "6.5.14" + core-js "^3.8.2" + memoizerific "^1.11.3" + regenerator-runtime "^0.13.7" + "@storybook/theming@6.5.9", "@storybook/theming@^6.0.0": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-6.5.9.tgz#13f60a3a3cd73ceb5caf9f188e1627e79f1891aa" @@ -3474,6 +4771,26 @@ memoizerific "^1.11.3" regenerator-runtime "^0.13.7" +"@storybook/ui@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@storybook/ui/-/ui-6.5.10.tgz#f56095a1a39ae5a203f2ac7f3dba86341a5927d5" + integrity sha512-6iaoaRAiTqB1inTw35vao+5hjcDE0Qa0A3a9ZIeNa6yHvpB1k0lO/N/0PMrRdVvySYpXVD1iry4z4QYdo1rU+w== + dependencies: + "@storybook/addons" "6.5.10" + "@storybook/api" "6.5.10" + "@storybook/channels" "6.5.10" + "@storybook/client-logger" "6.5.10" + "@storybook/components" "6.5.10" + "@storybook/core-events" "6.5.10" + "@storybook/router" "6.5.10" + "@storybook/semver" "^7.3.2" + "@storybook/theming" "6.5.10" + core-js "^3.8.2" + memoizerific "^1.11.3" + qs "^6.10.0" + regenerator-runtime "^0.13.7" + resolve-from "^5.0.0" + "@storybook/ui@6.5.9": version "6.5.9" resolved "https://registry.yarnpkg.com/@storybook/ui/-/ui-6.5.9.tgz#41e59279323cccc0d613974ec9782d797220c8a7" @@ -5370,7 +6687,7 @@ babel-jest@^26.6.3: graceful-fs "^4.2.4" slash "^3.0.0" -babel-loader@^8.0.0, babel-loader@^8.2.3, babel-loader@^8.2.4: +babel-loader@^8.0.0, babel-loader@^8.2.3, babel-loader@^8.2.4, babel-loader@^8.2.5: version "8.2.5" resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.5.tgz#d45f585e654d5a5d90f5350a779d7647c5ed512e" integrity sha512-OSiFfH89LrEMiWd4pLNqGz4CwJDtbs2ZVc+iGu2HrkRfPxId9F2anQj38IxWpmRfsUY0aBZYi1EFcd3mhtRMLQ== @@ -6023,6 +7340,13 @@ bundle-require@^3.0.2: dependencies: load-tsconfig "^0.2.0" +bundle-require@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/bundle-require/-/bundle-require-3.1.0.tgz#e07256ff02c72cd3a665afa84ce930d111ae4252" + integrity sha512-IIXtAO7fKcwPHNPt9kY/WNVJqy7NDy6YqJvv6ENH0TOZoJ+yjpEsn1w40WKZbR2ibfu5g1rfgJTvmFHpm5aOMA== + dependencies: + load-tsconfig "^0.2.0" + bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" @@ -8202,101 +9526,201 @@ esbuild-android-64@0.14.50: resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.50.tgz#a46fc80fa2007690e647680d837483a750a3097f" integrity sha512-H7iUEm7gUJHzidsBlFPGF6FTExazcgXL/46xxLo6i6bMtPim6ZmXyTccS8yOMpy6HAC6dPZ/JCQqrkkin69n6Q== +esbuild-android-64@0.15.7: + version "0.15.7" + resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.15.7.tgz#a521604d8c4c6befc7affedc897df8ccde189bea" + integrity sha512-p7rCvdsldhxQr3YHxptf1Jcd86dlhvc3EQmQJaZzzuAxefO9PvcI0GLOa5nCWem1AJ8iMRu9w0r5TG8pHmbi9w== + esbuild-android-arm64@0.14.50: version "0.14.50" resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.50.tgz#bdda7851fa7f5f770d6ff0ad593a8945d3a0fcdd" integrity sha512-NFaoqEwa+OYfoYVpQWDMdKII7wZZkAjtJFo1WdnBeCYlYikvUhTnf2aPwPu5qEAw/ie1NYK0yn3cafwP+kP+OQ== +esbuild-android-arm64@0.15.7: + version "0.15.7" + resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.15.7.tgz#307b81f1088bf1e81dfe5f3d1d63a2d2a2e3e68e" + integrity sha512-L775l9ynJT7rVqRM5vo+9w5g2ysbOCfsdLV4CWanTZ1k/9Jb3IYlQ06VCI1edhcosTYJRECQFJa3eAvkx72eyQ== + esbuild-darwin-64@0.14.50: version "0.14.50" resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.50.tgz#f0535435f9760766f30db14a991ee5ca94c022a4" integrity sha512-gDQsCvGnZiJv9cfdO48QqxkRV8oKAXgR2CGp7TdIpccwFdJMHf8hyIJhMW/05b/HJjET/26Us27Jx91BFfEVSA== +esbuild-darwin-64@0.15.7: + version "0.15.7" + resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.15.7.tgz#270117b0c4ec6bcbc5cf3a297a7d11954f007e11" + integrity sha512-KGPt3r1c9ww009t2xLB6Vk0YyNOXh7hbjZ3EecHoVDxgtbUlYstMPDaReimKe6eOEfyY4hBEEeTvKwPsiH5WZg== + esbuild-darwin-arm64@0.14.50: version "0.14.50" resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.50.tgz#76a41a40e8947a15ae62970e9ed2853883c4b16c" integrity sha512-36nNs5OjKIb/Q50Sgp8+rYW/PqirRiFN0NFc9hEvgPzNJxeJedktXwzfJSln4EcRFRh5Vz4IlqFRScp+aiBBzA== +esbuild-darwin-arm64@0.15.7: + version "0.15.7" + resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.7.tgz#97851eacd11dacb7719713602e3319e16202fc77" + integrity sha512-kBIHvtVqbSGajN88lYMnR3aIleH3ABZLLFLxwL2stiuIGAjGlQW741NxVTpUHQXUmPzxi6POqc9npkXa8AcSZQ== + esbuild-freebsd-64@0.14.50: version "0.14.50" resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.50.tgz#2ed6633c17ed42c20a1bd68e82c4bbc75ea4fb57" integrity sha512-/1pHHCUem8e/R86/uR+4v5diI2CtBdiWKiqGuPa9b/0x3Nwdh5AOH7lj+8823C6uX1e0ufwkSLkS+aFZiBCWxA== +esbuild-freebsd-64@0.15.7: + version "0.15.7" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.7.tgz#1de15ffaf5ae916aa925800aa6d02579960dd8c4" + integrity sha512-hESZB91qDLV5MEwNxzMxPfbjAhOmtfsr9Wnuci7pY6TtEh4UDuevmGmkUIjX/b+e/k4tcNBMf7SRQ2mdNuK/HQ== + esbuild-freebsd-arm64@0.14.50: version "0.14.50" resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.50.tgz#cb115f4cdafe9cdbe58875ba482fccc54d32aa43" integrity sha512-iKwUVMQztnPZe5pUYHdMkRc9aSpvoV1mkuHlCoPtxZA3V+Kg/ptpzkcSY+fKd0kuom+l6Rc93k0UPVkP7xoqrw== +esbuild-freebsd-arm64@0.15.7: + version "0.15.7" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.7.tgz#0f160dbf5c9a31a1d8dd87acbbcb1a04b7031594" + integrity sha512-dLFR0ChH5t+b3J8w0fVKGvtwSLWCv7GYT2Y2jFGulF1L5HftQLzVGN+6pi1SivuiVSmTh28FwUhi9PwQicXI6Q== + esbuild-linux-32@0.14.50: version "0.14.50" resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.50.tgz#fe2b724994dcf1d4e48dc4832ff008ad7d00bcfd" integrity sha512-sWUwvf3uz7dFOpLzYuih+WQ7dRycrBWHCdoXJ4I4XdMxEHCECd8b7a9N9u7FzT6XR2gHPk9EzvchQUtiEMRwqw== +esbuild-linux-32@0.15.7: + version "0.15.7" + resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.15.7.tgz#422eb853370a5e40bdce8b39525380de11ccadec" + integrity sha512-v3gT/LsONGUZcjbt2swrMjwxo32NJzk+7sAgtxhGx1+ZmOFaTRXBAi1PPfgpeo/J//Un2jIKm/I+qqeo4caJvg== + esbuild-linux-64@0.14.50: version "0.14.50" resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.50.tgz#7851ab5151df9501a2187bd4909c594ad232b623" integrity sha512-u0PQxPhaeI629t4Y3EEcQ0wmWG+tC/LpP2K7yDFvwuPq0jSQ8SIN+ARNYfRjGW15O2we3XJvklbGV0wRuUCPig== +esbuild-linux-64@0.15.7: + version "0.15.7" + resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.15.7.tgz#f89c468453bb3194b14f19dc32e0b99612e81d2b" + integrity sha512-LxXEfLAKwOVmm1yecpMmWERBshl+Kv5YJ/1KnyAr6HRHFW8cxOEsEfisD3sVl/RvHyW//lhYUVSuy9jGEfIRAQ== + esbuild-linux-arm64@0.14.50: version "0.14.50" resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.50.tgz#76a76afef484a0512f1fbbcc762edd705dee8892" integrity sha512-ZyfoNgsTftD7Rp5S7La5auomKdNeB3Ck+kSKXC4pp96VnHyYGjHHXWIlcbH8i+efRn9brszo1/Thl1qn8RqmhQ== +esbuild-linux-arm64@0.15.7: + version "0.15.7" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.7.tgz#68a79d6eb5e032efb9168a0f340ccfd33d6350a1" + integrity sha512-P3cfhudpzWDkglutWgXcT2S7Ft7o2e3YDMrP1n0z2dlbUZghUkKCyaWw0zhp4KxEEzt/E7lmrtRu/pGWnwb9vw== + esbuild-linux-arm@0.14.50: version "0.14.50" resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.50.tgz#6d7a8c0712091b0c3a668dd5d8b5c924adbaeb12" integrity sha512-VALZq13bhmFJYFE/mLEb+9A0w5vo8z+YDVOWeaf9vOTrSC31RohRIwtxXBnVJ7YKLYfEMzcgFYf+OFln3Y0cWg== +esbuild-linux-arm@0.15.7: + version "0.15.7" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.15.7.tgz#2b7c784d0b3339878013dfa82bf5eaf82c7ce7d3" + integrity sha512-JKgAHtMR5f75wJTeuNQbyznZZa+pjiUHV7sRZp42UNdyXC6TiUYMW/8z8yIBAr2Fpad8hM1royZKQisqPABPvQ== + esbuild-linux-mips64le@0.14.50: version "0.14.50" resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.50.tgz#43426909c1884c5dc6b40765673a08a7ec1d2064" integrity sha512-ygo31Vxn/WrmjKCHkBoutOlFG5yM9J2UhzHb0oWD9O61dGg+Hzjz9hjf5cmM7FBhAzdpOdEWHIrVOg2YAi6rTw== +esbuild-linux-mips64le@0.15.7: + version "0.15.7" + resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.7.tgz#bb8330a50b14aa84673816cb63cc6c8b9beb62cc" + integrity sha512-T7XKuxl0VpeFLCJXub6U+iybiqh0kM/bWOTb4qcPyDDwNVhLUiPcGdG2/0S7F93czUZOKP57YiLV8YQewgLHKw== + esbuild-linux-ppc64le@0.14.50: version "0.14.50" resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.50.tgz#c754ea3da1dd180c6e9b6b508dc18ce983d92b11" integrity sha512-xWCKU5UaiTUT6Wz/O7GKP9KWdfbsb7vhfgQzRfX4ahh5NZV4ozZ4+SdzYG8WxetsLy84UzLX3Pi++xpVn1OkFQ== +esbuild-linux-ppc64le@0.15.7: + version "0.15.7" + resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.7.tgz#52544e7fa992811eb996674090d0bc41f067a14b" + integrity sha512-6mGuC19WpFN7NYbecMIJjeQgvDb5aMuvyk0PDYBJrqAEMkTwg3Z98kEKuCm6THHRnrgsdr7bp4SruSAxEM4eJw== + esbuild-linux-riscv64@0.14.50: version "0.14.50" resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.50.tgz#f3b2dd3c4c2b91bf191d3b98a9819c8aa6f5ad7f" integrity sha512-0+dsneSEihZTopoO9B6Z6K4j3uI7EdxBP7YSF5rTwUgCID+wHD3vM1gGT0m+pjCW+NOacU9kH/WE9N686FHAJg== +esbuild-linux-riscv64@0.15.7: + version "0.15.7" + resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.7.tgz#a43ae60697992b957e454cbb622f7ee5297e8159" + integrity sha512-uUJsezbswAYo/X7OU/P+PuL/EI9WzxsEQXDekfwpQ23uGiooxqoLFAPmXPcRAt941vjlY9jtITEEikWMBr+F/g== + esbuild-linux-s390x@0.14.50: version "0.14.50" resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.50.tgz#3dfbc4578b2a81995caabb79df2b628ea86a5390" integrity sha512-tVjqcu8o0P9H4StwbIhL1sQYm5mWATlodKB6dpEZFkcyTI8kfIGWiWcrGmkNGH2i1kBUOsdlBafPxR3nzp3TDA== +esbuild-linux-s390x@0.15.7: + version "0.15.7" + resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.7.tgz#8c76a125dd10a84c166294d77416caaf5e1c7b64" + integrity sha512-+tO+xOyTNMc34rXlSxK7aCwJgvQyffqEM5MMdNDEeMU3ss0S6wKvbBOQfgd5jRPblfwJ6b+bKiz0g5nABpY0QQ== + esbuild-netbsd-64@0.14.50: version "0.14.50" resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.50.tgz#17dbf51eaa48d983e794b588d195415410ef8c85" integrity sha512-0R/glfqAQ2q6MHDf7YJw/TulibugjizBxyPvZIcorH0Mb7vSimdHy0XF5uCba5CKt+r4wjax1mvO9lZ4jiAhEg== +esbuild-netbsd-64@0.15.7: + version "0.15.7" + resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.7.tgz#19b2e75449d7d9c32b5d8a222bac2f1e0c3b08fd" + integrity sha512-yVc4Wz+Pu3cP5hzm5kIygNPrjar/v5WCSoRmIjCPWfBVJkZNb5brEGKUlf+0Y759D48BCWa0WHrWXaNy0DULTQ== + esbuild-openbsd-64@0.14.50: version "0.14.50" resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.50.tgz#cf6b1a50c8cf67b0725aaa4bce9773976168c50e" integrity sha512-7PAtmrR5mDOFubXIkuxYQ4bdNS6XCK8AIIHUiZxq1kL8cFIH5731jPcXQ4JNy/wbj1C9sZ8rzD8BIM80Tqk29w== +esbuild-openbsd-64@0.15.7: + version "0.15.7" + resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.7.tgz#1357b2bf72fd037d9150e751420a1fe4c8618ad7" + integrity sha512-GsimbwC4FSR4lN3wf8XmTQ+r8/0YSQo21rWDL0XFFhLHKlzEA4SsT1Tl8bPYu00IU6UWSJ+b3fG/8SB69rcuEQ== + esbuild-sunos-64@0.14.50: version "0.14.50" resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.50.tgz#f705ae0dd914c3b45dc43319c4f532216c3d841f" integrity sha512-gBxNY/wyptvD7PkHIYcq7se6SQEXcSC8Y7mE0FJB+CGgssEWf6vBPfTTZ2b6BWKnmaP6P6qb7s/KRIV5T2PxsQ== +esbuild-sunos-64@0.15.7: + version "0.15.7" + resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.15.7.tgz#87ab2c604592a9c3c763e72969da0d72bcde91d2" + integrity sha512-8CDI1aL/ts0mDGbWzjEOGKXnU7p3rDzggHSBtVryQzkSOsjCHRVe0iFYUuhczlxU1R3LN/E7HgUO4NXzGGP/Ag== + esbuild-windows-32@0.14.50: version "0.14.50" resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.50.tgz#6364905a99c1e6c1e2fe7bfccebd958131b1cd6c" integrity sha512-MOOe6J9cqe/iW1qbIVYSAqzJFh0p2LBLhVUIWdMVnNUNjvg2/4QNX4oT4IzgDeldU+Bym9/Tn6+DxvUHJXL5Zw== +esbuild-windows-32@0.15.7: + version "0.15.7" + resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.15.7.tgz#c81e688c0457665a8d463a669e5bf60870323e99" + integrity sha512-cOnKXUEPS8EGCzRSFa1x6NQjGhGsFlVgjhqGEbLTPsA7x4RRYiy2RKoArNUU4iR2vHmzqS5Gr84MEumO/wxYKA== + esbuild-windows-64@0.14.50: version "0.14.50" resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.50.tgz#56603cb6367e30d14098deb77de6aa18d76dd89b" integrity sha512-r/qE5Ex3w1jjGv/JlpPoWB365ldkppUlnizhMxJgojp907ZF1PgLTuW207kgzZcSCXyquL9qJkMsY+MRtaZ5yQ== +esbuild-windows-64@0.15.7: + version "0.15.7" + resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.15.7.tgz#2421d1ae34b0561a9d6767346b381961266c4eff" + integrity sha512-7MI08Ec2sTIDv+zH6StNBKO+2hGUYIT42GmFyW6MBBWWtJhTcQLinKS6ldIN1d52MXIbiJ6nXyCJ+LpL4jBm3Q== + esbuild-windows-arm64@0.14.50: version "0.14.50" resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.50.tgz#e7ddde6a97194051a5a4ac05f4f5900e922a7ea5" integrity sha512-EMS4lQnsIe12ZyAinOINx7eq2mjpDdhGZZWDwPZE/yUTN9cnc2Ze/xUTYIAyaJqrqQda3LnDpADKpvLvol6ENQ== +esbuild-windows-arm64@0.15.7: + version "0.15.7" + resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.7.tgz#7d5e9e060a7b454cb2f57f84a3f3c23c8f30b7d2" + integrity sha512-R06nmqBlWjKHddhRJYlqDd3Fabx9LFdKcjoOy08YLimwmsswlFBJV4rXzZCxz/b7ZJXvrZgj8DDv1ewE9+StMw== + esbuild@^0.14.25: version "0.14.50" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.50.tgz#7a665392c8df94bf6e1ae1e999966a5ee62c6cbc" @@ -8323,6 +9747,33 @@ esbuild@^0.14.25: esbuild-windows-64 "0.14.50" esbuild-windows-arm64 "0.14.50" +esbuild@^0.15.1: + version "0.15.7" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.15.7.tgz#8a1f1aff58671a3199dd24df95314122fc1ddee8" + integrity sha512-7V8tzllIbAQV1M4QoE52ImKu8hT/NLGlGXkiDsbEU5PS6K8Mn09ZnYoS+dcmHxOS9CRsV4IRAMdT3I67IyUNXw== + optionalDependencies: + "@esbuild/linux-loong64" "0.15.7" + esbuild-android-64 "0.15.7" + esbuild-android-arm64 "0.15.7" + esbuild-darwin-64 "0.15.7" + esbuild-darwin-arm64 "0.15.7" + esbuild-freebsd-64 "0.15.7" + esbuild-freebsd-arm64 "0.15.7" + esbuild-linux-32 "0.15.7" + esbuild-linux-64 "0.15.7" + esbuild-linux-arm "0.15.7" + esbuild-linux-arm64 "0.15.7" + esbuild-linux-mips64le "0.15.7" + esbuild-linux-ppc64le "0.15.7" + esbuild-linux-riscv64 "0.15.7" + esbuild-linux-s390x "0.15.7" + esbuild-netbsd-64 "0.15.7" + esbuild-openbsd-64 "0.15.7" + esbuild-sunos-64 "0.15.7" + esbuild-windows-32 "0.15.7" + esbuild-windows-64 "0.15.7" + esbuild-windows-arm64 "0.15.7" + escalade@^3.1.0, escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -10103,13 +11554,6 @@ html-minifier-terser@^6.0.2: relateurl "^0.2.7" terser "^5.10.0" -html-parse-stringify2@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/html-parse-stringify2/-/html-parse-stringify2-2.0.1.tgz#dc5670b7292ca158b7bc916c9a6735ac8872834a" - integrity sha512-wMKQ3aJ/dwXzDHPpA7XgsRXXCkEhHkAF6Ioh7D51lgZO7Qy0LmcFddC9TI/qNQJvSM1KL8KbcR3FtuybsrzFlQ== - dependencies: - void-elements "^2.0.1" - html-parse-stringify@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/html-parse-stringify/-/html-parse-stringify-3.0.1.tgz#dfc1017347ce9f77c8141a507f233040c59c55d2" @@ -10327,12 +11771,17 @@ husky@^4.2.5: slash "^3.0.0" which-pm-runs "^1.0.0" -i18next-browser-languagedetector@^4.0.0: - version "4.3.1" - resolved "https://registry.yarnpkg.com/i18next-browser-languagedetector/-/i18next-browser-languagedetector-4.3.1.tgz#005d2db6204b0a4af5f01c7987f5ccaf4ef97da5" - integrity sha512-KIToAzf8zwWvacgnRwJp63ase26o24AuNUlfNVJ5YZAFmdGhsJpmFClxXPuk9rv1FMI4lnc8zLSqgZPEZMrW4g== +i18next-browser-languagedetector@6: + version "6.1.8" + resolved "https://registry.yarnpkg.com/i18next-browser-languagedetector/-/i18next-browser-languagedetector-6.1.8.tgz#8e9c61b32a4dfe9b959b38bc9d2a8b95f799b27c" + integrity sha512-Svm+MduCElO0Meqpj1kJAriTC6OhI41VhlT/A0UPjGoPZBhAHIaGE5EfsHlTpgdH09UVX7rcc72pSDDBeKSQQA== dependencies: - "@babel/runtime" "^7.5.5" + "@babel/runtime" "^7.19.0" + +i18next-fetch-backend@4: + version "4.1.3" + resolved "https://registry.yarnpkg.com/i18next-fetch-backend/-/i18next-fetch-backend-4.1.3.tgz#738ab985f8c77aff85319d0bd57e0d40f0b28888" + integrity sha512-y2QBzUpMlF6oDUGfpUbaXp2OeTrKiPTk2OmTSN4ys/HpZ8NTPpXeBgLhrGAir9Jmq3UFabvsqn+BUWZ65jedbQ== i18next-fetch-backend@^2.2.0, i18next-fetch-backend@^2.3.1: version "2.3.1" @@ -10346,7 +11795,14 @@ i18next@*: dependencies: "@babel/runtime" "^7.17.2" -i18next@^19.6.0, i18next@^19.9.2: +i18next@21: + version "21.10.0" + resolved "https://registry.yarnpkg.com/i18next/-/i18next-21.10.0.tgz#85429af55fdca4858345d0e16b584ec29520197d" + integrity sha512-YeuIBmFsGjUfO3qBmMOc0rQaun4mIpGKET5WDwvu8lU7gvwpcariZLNtL0Fzj+zazcHUrlXHiptcFhBMFaxzfg== + dependencies: + "@babel/runtime" "^7.17.2" + +i18next@^19.9.2: version "19.9.2" resolved "https://registry.yarnpkg.com/i18next/-/i18next-19.9.2.tgz#ea5a124416e3c5ab85fddca2c8e3c3669a8da397" integrity sha512-0i6cuo6ER6usEOtKajUUDj92zlG+KArFia0857xxiEHAQcUwh/RtOQocui1LPJwunSYT574Pk64aNva1kwtxZg== @@ -12620,6 +14076,15 @@ loader-utils@^2.0.0: emojis-list "^3.0.0" json5 "^2.1.2" +loader-utils@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.4.tgz#8b5cb38b5c34a9a018ee1fc0e6a066d1dfcc528c" + integrity sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw== + dependencies: + big.js "^5.2.2" + emojis-list "^3.0.0" + json5 "^2.1.2" + loader-utils@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-3.2.0.tgz#bcecc51a7898bee7473d4bc6b845b23af8304d4f" @@ -13483,6 +14948,11 @@ mkdirp@^1.0.3, mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== +mock-xmlhttprequest@^7.0.3: + version "7.0.4" + resolved "https://registry.yarnpkg.com/mock-xmlhttprequest/-/mock-xmlhttprequest-7.0.4.tgz#5e188da009cf46900e522f690cbea8d26274a872" + integrity sha512-hA0fIHy/74p5DE0rdmrpU0sV1U+gnWTcgShWequGRLy0L1eT+zY0ozFukawpLaxMwIA+orRcqFRElYwT+5p81A== + moment@^2.18.1: version "2.29.4" resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" @@ -14454,6 +15924,11 @@ path-to-regexp@^2.2.1: resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-2.4.0.tgz#35ce7f333d5616f1c1e1bfe266c3aba2e5b2e704" integrity sha512-G6zHoVqC6GGTQkZwF4lkuEyMbVOjoBKAEybQUypI1WTkqinCOrq2x6U2+phkJ1XsEMTy4LjtwPI7HW+NVrRR2w== +path-to-regexp@^6.2.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.2.1.tgz#d54934d6798eb9e5ef14e7af7962c945906918e5" + integrity sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw== + path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" @@ -15583,13 +17058,13 @@ react-hook-form@^7.5.1: resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-7.33.1.tgz#8c4410e3420788d3b804d62cc4c142915c2e46d0" integrity sha512-ydTfTxEJdvgjCZBj5DDXRc58oTEfnFupEwwTAQ9FSKzykEJkX+3CiAkGtAMiZG7IPWHuzgT6AOBfogiKhUvKgg== -react-i18next@^10.13.1, react-i18next@^10.13.2: - version "10.13.2" - resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-10.13.2.tgz#2943705fa751d366fc95b3755520ebe6eeed2408" - integrity sha512-DGoauWUdPEv/+PLa03nN+wlW31XrGmQJz+zIyOA+tRTIwlRaNgeM62nGP1WG3g7fJrphMZUwPcAQqNv6XBYM4w== +react-i18next@11: + version "11.18.6" + resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.18.6.tgz#e159c2960c718c1314f1e8fcaa282d1c8b167887" + integrity sha512-yHb2F9BiT0lqoQDt8loZ5gWP331GwctHz9tYQ8A2EIEUu+CcEdjBLQWli1USG3RdWQt3W+jqQLg/d4rrQR96LA== dependencies: - "@babel/runtime" "^7.3.1" - html-parse-stringify2 "2.0.1" + "@babel/runtime" "^7.14.5" + html-parse-stringify "^3.0.1" react-i18next@^11.3.3: version "11.18.1" @@ -16008,6 +17483,11 @@ regenerator-runtime@^0.11.0: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== +regenerator-runtime@^0.13.11: + version "0.13.11" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" + integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== + regenerator-runtime@^0.13.2, regenerator-runtime@^0.13.4, regenerator-runtime@^0.13.7: version "0.13.9" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" @@ -17469,6 +18949,15 @@ storybook-addon-i18next@^1.3.0: prop-types "^15.7.2" react-i18next "^11.3.3" +storybook-addon-mock@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/storybook-addon-mock/-/storybook-addon-mock-3.2.0.tgz#5832b1e49ff39ffab7a0ae8ec7de8bfdb8ddea45" + integrity sha512-LaggsF/6Lt0AyHiotIEVQpwKfIiZ3KsNqtdXKVnIdOetjaD7GaOQeX0jIZiZUFX/i6QLmMuNoXFngqqkdVtfSg== + dependencies: + mock-xmlhttprequest "^7.0.3" + path-to-regexp "^6.2.0" + polished "^4.2.2" + storybook-addon-pseudo-states@^1.15.1: version "1.15.1" resolved "https://registry.yarnpkg.com/storybook-addon-pseudo-states/-/storybook-addon-pseudo-states-1.15.1.tgz#2a03b8a7c307be63ec10595c490b6c76673caa0e" @@ -18443,6 +19932,26 @@ tsup@^6.1.2: sucrase "^3.20.3" tree-kill "^1.2.2" +tsup@^6.2.3: + version "6.2.3" + resolved "https://registry.yarnpkg.com/tsup/-/tsup-6.2.3.tgz#87f57b2e53d49f1c1ab89aba21fed96aaab0ec9f" + integrity sha512-J5Pu2Dx0E1wlpIEsVFv9ryzP1pZ1OYsJ2cBHZ7GrKteytNdzaSz5hmLX7/nAxtypq+jVkVvA79d7S83ETgHQ5w== + dependencies: + bundle-require "^3.1.0" + cac "^6.7.12" + chokidar "^3.5.1" + debug "^4.3.1" + esbuild "^0.15.1" + execa "^5.0.0" + globby "^11.0.3" + joycon "^3.0.1" + postcss-load-config "^3.0.1" + resolve-from "^5.0.0" + rollup "^2.74.1" + source-map "0.8.0-beta.0" + sucrase "^3.20.3" + tree-kill "^1.2.2" + tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -19175,11 +20684,6 @@ void-elements@3.1.0: resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-3.1.0.tgz#614f7fbf8d801f0bb5f0661f5b2f5785750e4f09" integrity sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w== -void-elements@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" - integrity sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung== - w3c-hr-time@^1.0.1, w3c-hr-time@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd"