diff --git a/package.json b/package.json index 851ad416b..a4a82d72d 100644 --- a/package.json +++ b/package.json @@ -31,9 +31,9 @@ }, "devDependencies": { "@adyen/adyen-web-server": "1.0.0", - "@changesets/cli": "2.27.10", + "@changesets/cli": "2.27.11", "@changesets/get-github-info": "0.6.0", "concurrently": "8.2.2", - "prettier": "3.3.3" + "prettier": "3.4.2" } } diff --git a/packages/lib/package.json b/packages/lib/package.json index 3c36dbe33..df37c87d9 100644 --- a/packages/lib/package.json +++ b/packages/lib/package.json @@ -87,7 +87,7 @@ "@rollup/plugin-commonjs": "26.0.3", "@rollup/plugin-eslint": "9.0.5", "@rollup/plugin-json": "6.1.0", - "@rollup/plugin-node-resolve": "15.3.0", + "@rollup/plugin-node-resolve": "15.3.1", "@rollup/plugin-replace": "5.0.7", "@rollup/plugin-terser": "0.4.4", "@size-limit/preset-big-lib": "11.1.6", @@ -113,9 +113,9 @@ "eslint-plugin-import": "2.31.0", "eslint-plugin-jsx-a11y": "6.10.2", "eslint-plugin-react": "7.37.2", - "eslint-plugin-storybook": "0.8.0", - "eslint-plugin-testing-library": "6.2.2", - "globals": "15.8.0", + "eslint-plugin-storybook": "0.11.1", + "eslint-plugin-testing-library": "6.5.0", + "globals": "15.14.0", "husky": "9.1.7", "jest": "29.7.0", "jest-environment-jsdom": "29.7.0", diff --git a/packages/lib/src/components/PayTo/PayTo.tsx b/packages/lib/src/components/PayTo/PayTo.tsx index abcb11e23..bf4bf4465 100644 --- a/packages/lib/src/components/PayTo/PayTo.tsx +++ b/packages/lib/src/components/PayTo/PayTo.tsx @@ -9,9 +9,10 @@ Types (previously in their own file) */ import { UIElementProps } from '../internal/UIElement/types'; import { TxVariants } from '../tx-variants'; -import PayToInput from './components/PayToInput'; import { PayIdFormData } from './components/PayIDInput'; import { PayToIdentifierEnum } from './components/IdentifierSelector'; +import PayToComponent, { PayToComponentData } from './components/PayToComponent'; +import { BSBFormData } from './components/BSBInput'; export interface PayToConfiguration extends UIElementProps { paymentData?: any; @@ -19,7 +20,7 @@ export interface PayToConfiguration extends UIElementProps { placeholders?: any; //TODO } -export interface PayToData extends PayIdFormData { +export interface PayToData extends PayIdFormData, BSBFormData, PayToComponentData { shopperAccountIdentifier: string; } @@ -38,15 +39,22 @@ const config = { }; const getAccountIdentifier = (state: PayToData) => { - switch (state.selectedIdentifier) { - case PayToIdentifierEnum.email: - return state.email; - case PayToIdentifierEnum.abn: - return state.abn; - case PayToIdentifierEnum.orgid: - return state.orgid; - case PayToIdentifierEnum.phone: - return `${state.phonePrefix}-${state.phoneNumber}`; + // if it's BSB Input type merge bankAccount with BSB + if (state.selectedInput === 'bsb-option') { + return `${state.bsb}-${state.bankAccountNumber}`; + } else if (state.selectedInput === 'payid-option') { + // otherwise use the option in the dropdown + switch (state.selectedIdentifier) { + case PayToIdentifierEnum.email: + return state.email; + case PayToIdentifierEnum.abn: + return state.abn; + case PayToIdentifierEnum.orgid: + return state.orgid; + case PayToIdentifierEnum.phone: + // merge the phone prefix and number - see comment in ticket + return `${state.phonePrefix}-${state.phoneNumber}`; + } } }; /** @@ -118,7 +126,7 @@ export class PayToElement extends UIElement { return ( - void; + setComponentRef: (ref: ComponentMethodsRef) => void; +} + +const BASE_SCHEMA = ['bankAccountNumber', 'bsb', 'firstName', 'lastName']; + +export default function BSBInput({ setComponentRef, defaultData, placeholders, onChange }: BSBInputProps) { + const { i18n } = useCoreContext(); + + const form = useForm({ + schema: BASE_SCHEMA, + defaultData: defaultData, + rules: bsbValidationRules, + formatters: phoneFormatters + }); + const { handleChangeFor, triggerValidation, data, errors, valid, isValid } = form; + + // standard onChange propagate to parent state + useEffect(() => { + onChange({ data, valid, errors, isValid }); + }, [data, valid, errors, isValid]); + + const payToRef = useRef({ + showValidation: triggerValidation + }); + + useEffect(() => { + setComponentRef(payToRef.current); + }, [setComponentRef]); + + return ( +
+ + + - // TODO type this - // const { handleChangeFor, triggerValidation, data, valid, errors } = useForm({ - // schema: ['beneficiaryId'] - // }); - // - // const [status, setStatus] = useState('ready'); + + + - // this.setStatus = setStatus; - // this.showValidation = triggerValidation; + + + - return

BSBInput.tsx

; + + + +
+ ); } diff --git a/packages/lib/src/components/PayTo/components/PayIDInput.scss b/packages/lib/src/components/PayTo/components/PayIDInput.scss index 5c2cada5d..4fc2bd9c0 100644 --- a/packages/lib/src/components/PayTo/components/PayIDInput.scss +++ b/packages/lib/src/components/PayTo/components/PayIDInput.scss @@ -1,10 +1,12 @@ @import 'styles/variable-generator'; -.adyen-checkout__fieldset--payto__payid_input { - margin-top: token(spacer-070); - - .adyen-checkout__fieldset__fields { +.adyen-checkout__payto-component { + .adyen-checkout__fieldset { margin-top: token(spacer-070); - gap: 0 token(spacer-060); + + .adyen-checkout__fieldset__fields { + margin-top: token(spacer-070); + gap: 0 token(spacer-060); + } } } diff --git a/packages/lib/src/components/PayTo/components/PayToComponent.tsx b/packages/lib/src/components/PayTo/components/PayToComponent.tsx new file mode 100644 index 000000000..703722a63 --- /dev/null +++ b/packages/lib/src/components/PayTo/components/PayToComponent.tsx @@ -0,0 +1,76 @@ +import { h } from 'preact'; +import LoadingWrapper from '../../internal/LoadingWrapper'; +import SegmentedControl from '../../internal/SegmentedControl'; +import { useState } from 'preact/hooks'; +import { SegmentedControlOptions } from '../../internal/SegmentedControl/SegmentedControl'; +import PayIDInput from './PayIDInput'; +import BSBInput from './BSBInput'; +import { useCoreContext } from '../../../core/Context/CoreProvider'; + +export type PayToInputOption = 'payid-option' | 'bsb-option'; + +export type PayToComponentData = { selectedInput: PayToInputOption }; + +const inputOptions: SegmentedControlOptions = [ + { + value: 'payid-option', + label: 'PayID', + htmlProps: { + id: 'payid-option', // TODO move this to i18n + 'aria-controls': 'payid-input', + 'aria-expanded': true // TODO move this logic to segmented controller + } + }, + { + value: 'bsb-option', + label: 'BSB and account number', // TODO move this to i18n + htmlProps: { + id: 'bsb-option', + 'aria-controls': 'bsb-input', + 'aria-expanded': false // TODO move this logic to segmented controller + } + } +]; + +export default function PayToComponent(props) { + const { i18n } = useCoreContext(); + + const [status, setStatus] = useState('ready'); + + this.setStatus = setStatus; + + const defaultOption = inputOptions[0].value; + const [selectedInput, setSelectedInput] = useState(defaultOption); + + const onChange = ({ data, valid, errors, isValid }) => { + // merge selected input to as data, this keep the input layers untouched + props.onChange({ data: { selectedInput: selectedInput, ...data }, valid, errors, isValid }); + }; + + return ( + +
+ + {selectedInput === 'payid-option' && ( + + )} + {selectedInput === 'bsb-option' && ( + + )} + + {props.showPayButton && props.payButton({ status, label: i18n.get('confirmPurchase') })} +
+
+ ); +} diff --git a/packages/lib/src/components/PayTo/components/PayToInput.tsx b/packages/lib/src/components/PayTo/components/PayToInput.tsx deleted file mode 100644 index 7a0c2839f..000000000 --- a/packages/lib/src/components/PayTo/components/PayToInput.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { h } from 'preact'; -import LoadingWrapper from '../../internal/LoadingWrapper'; -import SegmentedControl from '../../internal/SegmentedControl'; -import { useState } from 'preact/hooks'; -import { SegmentedControlOptions } from '../../internal/SegmentedControl/SegmentedControl'; -import PayIDInput from './PayIDInput'; -import BSBInput from './BSBInput'; -import { useCoreContext } from '../../../core/Context/CoreProvider'; - -const inputOptions: SegmentedControlOptions = [ - { - value: 'payid-option', - label: 'PayID', - htmlProps: { - id: 'payid-option', // TODO move this to i18n - 'aria-controls': 'payid-input', - 'aria-expanded': true // TODO move this logic to segmented controller - } - }, - { - value: 'bsb-option', - label: 'BSB and account number', // TODO move this to i18n - htmlProps: { - id: 'bsb-option', - 'aria-controls': 'bsb-input', - 'aria-expanded': false // TODO move this logic to segmented controller - } - } -]; - -export default function PayToInput(props) { - const { i18n } = useCoreContext(); - - const [status, setStatus] = useState('ready'); - - this.setStatus = setStatus; - - const defaultOption = inputOptions[0].value; - const [selectedInput, setSelectedInput] = useState(defaultOption); - - const onChange = ({ data, valid, errors, isValid }) => { - props.onChange({ data, valid, errors, isValid }); - }; - - return ( - - - {selectedInput === 'payid-option' && ( - - )} - {selectedInput === 'bsb-option' && } - - {props.showPayButton && props.payButton({ status, label: i18n.get('confirmPurchase') })} - - ); -} diff --git a/packages/lib/src/components/PayTo/components/validate.ts b/packages/lib/src/components/PayTo/components/validate.ts index 6666f96af..fb81089d2 100644 --- a/packages/lib/src/components/PayTo/components/validate.ts +++ b/packages/lib/src/components/PayTo/components/validate.ts @@ -74,3 +74,34 @@ export const payIdValidationRules: ValidatorRules = { errorMessage: 'mobileNumber.invalid' } }; + +//original regex /^\d{6}-[ -~]{1,28}$/ +const bsbRegex = /^\d{6}$/; +const bankAccountNumberRegex = /^[ -~]{1,28}$/; + +const bsbValidatorRule: ValidatorRule = { + validate: value => validationFromRegex(value, bsbRegex, bsbValidatorRule), + errorMessage: 'bsb.invalid', + modes: ['blur'] +}; + +const bankAccountNumberValidatorRule: ValidatorRule = { + validate: value => validationFromRegex(value, bankAccountNumberRegex, bankAccountNumberValidatorRule), + errorMessage: 'bankAccountNumber.invalid', + modes: ['blur'] +}; + +export const bsbValidationRules: ValidatorRules = { + bsb: bsbValidatorRule, + bankAccountNumber: bankAccountNumberValidatorRule, + firstName: { + validate: value => (isEmpty(value) ? null : true), // valid, if there are chars other than spaces, + errorMessage: 'firstName.invalid', + modes: ['blur'] + }, + lastName: { + validate: value => (isEmpty(value) ? null : true), + errorMessage: 'lastName.invalid', + modes: ['blur'] + } +}; diff --git a/packages/server/translations/en-US.json b/packages/server/translations/en-US.json index 0daa27cb2..d8a14a46e 100644 --- a/packages/server/translations/en-US.json +++ b/packages/server/translations/en-US.json @@ -333,5 +333,9 @@ "payto.payid.option.phone": "Mobile", "payto.payid.option.email": "Email", "payto.payid.option.abn": "ABN", - "payto.payid.option.orgid": "Organization ID" + "payto.payid.option.orgid": "Organization ID", + "payto.bsb.header": "BSB", + "payto.bsb.description" : "Enter the bank account number and the Bank State Branch that is connected to your account to continue", + "payto.bsb.label.bankAccountNumber": "Bank account number", + "payto.bsb.label.bsb": "Bank State Branch" } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index ec50e5a62..0e111da50 100644 --- a/yarn.lock +++ b/yarn.lock @@ -365,12 +365,12 @@ "@types/tough-cookie" "^4.0.5" tough-cookie "^4.1.4" -"@changesets/apply-release-plan@^7.0.6": - version "7.0.6" - resolved "https://registry.yarnpkg.com/@changesets/apply-release-plan/-/apply-release-plan-7.0.6.tgz#39af3f80f3ba287920271d1a542ef5394eb0bf8a" - integrity sha512-TKhVLtiwtQOgMAC0fCJfmv93faiViKSDqr8oMEqrnNs99gtSC1sZh/aEMS9a+dseU1ESZRCK+ofLgGY7o0fw/Q== +"@changesets/apply-release-plan@^7.0.7": + version "7.0.7" + resolved "https://registry.yarnpkg.com/@changesets/apply-release-plan/-/apply-release-plan-7.0.7.tgz#cabeaed77de07c6bd9878a9bc5ffd3ea7db7f7ff" + integrity sha512-qnPOcmmmnD0MfMg9DjU1/onORFyRpDXkMMl2IJg9mECY6RnxL3wN0TCCc92b2sXt1jt8DgjAUUsZYGUGTdYIXA== dependencies: - "@changesets/config" "^3.0.4" + "@changesets/config" "^3.0.5" "@changesets/get-version-range-type" "^0.4.0" "@changesets/git" "^3.0.2" "@changesets/should-skip-package" "^0.1.1" @@ -403,18 +403,18 @@ dependencies: "@changesets/types" "^6.0.0" -"@changesets/cli@2.27.10": - version "2.27.10" - resolved "https://registry.yarnpkg.com/@changesets/cli/-/cli-2.27.10.tgz#b2b98caaf6f8a6630592456f07a881e7684f6ada" - integrity sha512-PfeXjvs9OfQJV8QSFFHjwHX3QnUL9elPEQ47SgkiwzLgtKGyuikWjrdM+lO9MXzOE22FO9jEGkcs4b+B6D6X0Q== +"@changesets/cli@2.27.11": + version "2.27.11" + resolved "https://registry.yarnpkg.com/@changesets/cli/-/cli-2.27.11.tgz#1d510044b350a7c78a8b55a0591637d7ad224469" + integrity sha512-1QislpE+nvJgSZZo9+Lj3Lno5pKBgN46dAV8IVxKJy9wX8AOrs9nn5pYVZuDpoxWJJCALmbfOsHkyxujgetQSg== dependencies: - "@changesets/apply-release-plan" "^7.0.6" + "@changesets/apply-release-plan" "^7.0.7" "@changesets/assemble-release-plan" "^6.0.5" "@changesets/changelog-git" "^0.2.0" - "@changesets/config" "^3.0.4" + "@changesets/config" "^3.0.5" "@changesets/errors" "^0.2.0" "@changesets/get-dependents-graph" "^2.1.2" - "@changesets/get-release-plan" "^4.0.5" + "@changesets/get-release-plan" "^4.0.6" "@changesets/git" "^3.0.2" "@changesets/logger" "^0.1.1" "@changesets/pre" "^2.0.1" @@ -425,7 +425,7 @@ "@manypkg/get-packages" "^1.1.3" ansi-colors "^4.1.3" ci-info "^3.7.0" - enquirer "^2.3.0" + enquirer "^2.4.1" external-editor "^3.1.0" fs-extra "^7.0.1" mri "^1.2.0" @@ -437,10 +437,10 @@ spawndamnit "^3.0.1" term-size "^2.1.0" -"@changesets/config@^3.0.4": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@changesets/config/-/config-3.0.4.tgz#2acfdf3e09424149684b3bd10c88074becf251aa" - integrity sha512-+DiIwtEBpvvv1z30f8bbOsUQGuccnZl9KRKMM/LxUHuDu5oEjmN+bJQ1RIBKNJjfYMQn8RZzoPiX0UgPaLQyXw== +"@changesets/config@^3.0.5": + version "3.0.5" + resolved "https://registry.yarnpkg.com/@changesets/config/-/config-3.0.5.tgz#cb59e9f338a4b35d3266af8a32799cb940d54ee0" + integrity sha512-QyXLSSd10GquX7hY0Mt4yQFMEeqnO5z/XLpbIr4PAkNNoQNKwDyiSrx4yd749WddusH1v3OSiA0NRAYmH/APpQ== dependencies: "@changesets/errors" "^0.2.0" "@changesets/get-dependents-graph" "^2.1.2" @@ -475,13 +475,13 @@ dataloader "^1.4.0" node-fetch "^2.5.0" -"@changesets/get-release-plan@^4.0.5": - version "4.0.5" - resolved "https://registry.yarnpkg.com/@changesets/get-release-plan/-/get-release-plan-4.0.5.tgz#2c857ce2f1942b88ff6ffcb24667edc52bcbfaea" - integrity sha512-E6wW7JoSMcctdVakut0UB76FrrN3KIeJSXvB+DHMFo99CnC3ZVnNYDCVNClMlqAhYGmLmAj77QfApaI3ca4Fkw== +"@changesets/get-release-plan@^4.0.6": + version "4.0.6" + resolved "https://registry.yarnpkg.com/@changesets/get-release-plan/-/get-release-plan-4.0.6.tgz#40d70c2524be51a70b7e1a778826854bb6c8562a" + integrity sha512-FHRwBkY7Eili04Y5YMOZb0ezQzKikTka4wL753vfUA5COSebt7KThqiuCN9BewE4/qFGgF/5t3AuzXx1/UAY4w== dependencies: "@changesets/assemble-release-plan" "^6.0.5" - "@changesets/config" "^3.0.4" + "@changesets/config" "^3.0.5" "@changesets/pre" "^2.0.1" "@changesets/read" "^0.6.2" "@changesets/types" "^6.0.0" @@ -1423,10 +1423,10 @@ dependencies: "@rollup/pluginutils" "^5.1.0" -"@rollup/plugin-node-resolve@15.3.0": - version "15.3.0" - resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.3.0.tgz#efbb35515c9672e541c08d59caba2eff492a55d5" - integrity sha512-9eO5McEICxMzJpDW9OnMYSv4Sta3hmt7VtBFz5zR9273suNOydOyq/FrGeGy+KsTRFm8w0SLVhzig2ILFT63Ag== +"@rollup/plugin-node-resolve@15.3.1": + version "15.3.1" + resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.3.1.tgz#66008953c2524be786aa319d49e32f2128296a78" + integrity sha512-tgg6b91pAybXHJQMAAwW9VuWBO6Thi+q7BCNARLwSqlmsHz0XYURtGvh/AuwSADXSI4h/2uHbs7s4FzlZDGSGA== dependencies: "@rollup/pluginutils" "^5.0.1" "@types/resolve" "1.20.2" @@ -1871,13 +1871,6 @@ dependencies: unplugin "^1.3.1" -"@storybook/csf@^0.0.1": - version "0.0.1" - resolved "https://registry.yarnpkg.com/@storybook/csf/-/csf-0.0.1.tgz#95901507dc02f0bc6f9ac8ee1983e2fc5bb98ce6" - integrity sha512-USTLkZze5gkel8MYCujSRBVIrUQ3YPBrLOx7GNk/0wttvVtlzWXAq9eLbQ4p/NicGxP+3T7KPEMVV//g+yubpw== - dependencies: - lodash "^4.17.15" - "@storybook/csf@^0.1.11": version "0.1.11" resolved "https://registry.yarnpkg.com/@storybook/csf/-/csf-0.1.11.tgz#ad685a4fe564a47a6b73571c2e7c07b526f4f71b" @@ -2494,6 +2487,14 @@ "@typescript-eslint/types" "7.16.1" "@typescript-eslint/visitor-keys" "7.16.1" +"@typescript-eslint/scope-manager@8.19.1": + version "8.19.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.19.1.tgz#794cfc8add4f373b9cd6fa32e367e7565a0e231b" + integrity sha512-60L9KIuN/xgmsINzonOcMDSB8p82h95hoBfSBtXuO4jlR1R9L1xSkmVZKgCPVfavDlXihh4ARNjXhh1gGnLC7Q== + dependencies: + "@typescript-eslint/types" "8.19.1" + "@typescript-eslint/visitor-keys" "8.19.1" + "@typescript-eslint/type-utils@7.16.1": version "7.16.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.16.1.tgz#4d7ae4f3d9e3c8cbdabae91609b1a431de6aa6ca" @@ -2514,6 +2515,11 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.16.1.tgz#bbab066276d18e398bc64067b23f1ce84dfc6d8c" integrity sha512-AQn9XqCzUXd4bAVEsAXM/Izk11Wx2u4H3BAfQVhSfzfDOm/wAON9nP7J5rpkCxts7E5TELmN845xTUCQrD1xIQ== +"@typescript-eslint/types@8.19.1": + version "8.19.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.19.1.tgz#015a991281754ed986f2e549263a1188d6ed0a8c" + integrity sha512-JBVHMLj7B1K1v1051ZaMMgLW4Q/jre5qGK0Ew6UgXz1Rqh+/xPzV1aW581OM00X6iOfyr1be+QyW8LOUf19BbA== + "@typescript-eslint/typescript-estree@5.62.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" @@ -2541,6 +2547,20 @@ semver "^7.6.0" ts-api-utils "^1.3.0" +"@typescript-eslint/typescript-estree@8.19.1": + version "8.19.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.19.1.tgz#c1094bb00bc251ac76cf215569ca27236435036b" + integrity sha512-jk/TZwSMJlxlNnqhy0Eod1PNEvCkpY6MXOXE/WLlblZ6ibb32i2We4uByoKPv1d0OD2xebDv4hbs3fm11SMw8Q== + dependencies: + "@typescript-eslint/types" "8.19.1" + "@typescript-eslint/visitor-keys" "8.19.1" + debug "^4.3.4" + fast-glob "^3.3.2" + is-glob "^4.0.3" + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^2.0.0" + "@typescript-eslint/utils@7.16.1": version "7.16.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.16.1.tgz#df42dc8ca5a4603016fd102db0346cdab415cdb7" @@ -2551,7 +2571,7 @@ "@typescript-eslint/types" "7.16.1" "@typescript-eslint/typescript-estree" "7.16.1" -"@typescript-eslint/utils@^5.58.0", "@typescript-eslint/utils@^5.62.0": +"@typescript-eslint/utils@^5.62.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== @@ -2565,6 +2585,16 @@ eslint-scope "^5.1.1" semver "^7.3.7" +"@typescript-eslint/utils@^8.8.1": + version "8.19.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.19.1.tgz#dd8eabd46b92bf61e573286e1c0ba6bd243a185b" + integrity sha512-IxG5gLO0Ne+KaUc8iW1A+XuKLd63o4wlbI1Zp692n1xojCl/THvgIKXJXBZixTh5dd5+yTJ/VXH7GJaaw21qXA== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@typescript-eslint/scope-manager" "8.19.1" + "@typescript-eslint/types" "8.19.1" + "@typescript-eslint/typescript-estree" "8.19.1" + "@typescript-eslint/visitor-keys@5.62.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" @@ -2581,6 +2611,14 @@ "@typescript-eslint/types" "7.16.1" eslint-visitor-keys "^3.4.3" +"@typescript-eslint/visitor-keys@8.19.1": + version "8.19.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.19.1.tgz#fce54d7cfa5351a92387d6c0c5be598caee072e0" + integrity sha512-fzmjU8CHK853V/avYZAvuVut3ZTfwN5YtMaoi+X9Y9MA9keaWNHC3zEQ9zvyX/7Hj+5JkNyK1l7TOR2hevHB6Q== + dependencies: + "@typescript-eslint/types" "8.19.1" + eslint-visitor-keys "^4.2.0" + "@ungap/structured-clone@^1.0.0", "@ungap/structured-clone@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" @@ -3808,10 +3846,10 @@ cookie-signature@1.0.6: resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== -cookie@0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051" - integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw== +cookie@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.1.tgz#2f73c42142d5d5cf71310a74fc4ae61670e5dbc9" + integrity sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w== cookie@^0.7.2: version "0.7.2" @@ -4582,7 +4620,7 @@ enhanced-resolve@^5.17.1: graceful-fs "^4.2.4" tapable "^2.2.0" -enquirer@^2.3.0: +enquirer@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.4.1.tgz#93334b3fbd74fc7097b224ab4a8fb7e40bf4ae56" integrity sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ== @@ -5087,22 +5125,21 @@ eslint-plugin-react@7.37.2: string.prototype.matchall "^4.0.11" string.prototype.repeat "^1.0.0" -eslint-plugin-storybook@0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-storybook/-/eslint-plugin-storybook-0.8.0.tgz#23185ecabdc289cae55248c090f0c1d8fbae6c41" - integrity sha512-CZeVO5EzmPY7qghO2t64oaFM+8FTaD4uzOEjHKp516exyTKo+skKAL9GI3QALS2BXhyALJjNtwbmr1XinGE8bA== +eslint-plugin-storybook@0.11.1: + version "0.11.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-storybook/-/eslint-plugin-storybook-0.11.1.tgz#4ef4f3550855fdc4a902296dfc278340ec287506" + integrity sha512-yGKpAYkBm/Q2hZg476vRUAvd9lAccjjSvzU5nYy3BSQbKTPy7uopx7JEpwk2vSuw4weTMZzWF64z9/gp/K5RCg== dependencies: - "@storybook/csf" "^0.0.1" - "@typescript-eslint/utils" "^5.62.0" - requireindex "^1.2.0" + "@storybook/csf" "^0.1.11" + "@typescript-eslint/utils" "^8.8.1" ts-dedent "^2.2.0" -eslint-plugin-testing-library@6.2.2: - version "6.2.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-testing-library/-/eslint-plugin-testing-library-6.2.2.tgz#67e84ff891a2b3a8078ced0afa95ee6f343c00c1" - integrity sha512-1E94YOTUDnOjSLyvOwmbVDzQi/WkKm3WVrMXu6SmBr6DN95xTGZmI6HJ/eOkSXh/DlheRsxaPsJvZByDBhWLVQ== +eslint-plugin-testing-library@6.5.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-testing-library/-/eslint-plugin-testing-library-6.5.0.tgz#02532698270f525be8ceeb4740f66eef0f6f4729" + integrity sha512-Ls5TUfLm5/snocMAOlofSOJxNN0aKqwTlco7CrNtMjkTdQlkpSMaeTCDHCuXfzrI97xcx2rSCNeKeJjtpkNC1w== dependencies: - "@typescript-eslint/utils" "^5.58.0" + "@typescript-eslint/utils" "^5.62.0" eslint-scope@5.1.1, eslint-scope@^5.1.1: version "5.1.1" @@ -5138,6 +5175,11 @@ eslint-visitor-keys@^4.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz#e3adc021aa038a2a8e0b2f8b0ce8f66b9483b1fb" integrity sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw== +eslint-visitor-keys@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz#687bacb2af884fcdda8a6e7d65c606f46a14cd45" + integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw== + eslint@9.7.0: version "9.7.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.7.0.tgz#bedb48e1cdc2362a0caaa106a4c6ed943e8b09e4" @@ -5367,36 +5409,36 @@ expect@^29.0.0, expect@^29.7.0: jest-util "^29.7.0" express@^4.17.3, express@^4.19.2, express@^4.20.0: - version "4.20.0" - resolved "https://registry.yarnpkg.com/express/-/express-4.20.0.tgz#f1d08e591fcec770c07be4767af8eb9bcfd67c48" - integrity sha512-pLdae7I6QqShF5PnNTCVn4hI91Dx0Grkn2+IAsMTgMIKuQVte2dN9PeGSSAME2FR8anOhVA62QDIUaWVfEXVLw== + version "4.21.2" + resolved "https://registry.yarnpkg.com/express/-/express-4.21.2.tgz#cf250e48362174ead6cea4a566abef0162c1ec32" + integrity sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA== dependencies: accepts "~1.3.8" array-flatten "1.1.1" body-parser "1.20.3" content-disposition "0.5.4" content-type "~1.0.4" - cookie "0.6.0" + cookie "0.7.1" cookie-signature "1.0.6" debug "2.6.9" depd "2.0.0" encodeurl "~2.0.0" escape-html "~1.0.3" etag "~1.8.1" - finalhandler "1.2.0" + finalhandler "1.3.1" fresh "0.5.2" http-errors "2.0.0" merge-descriptors "1.0.3" methods "~1.1.2" on-finished "2.4.1" parseurl "~1.3.3" - path-to-regexp "0.1.10" + path-to-regexp "0.1.12" proxy-addr "~2.0.7" - qs "6.11.0" + qs "6.13.0" range-parser "~1.2.1" safe-buffer "5.2.1" send "0.19.0" - serve-static "1.16.0" + serve-static "1.16.2" setprototypeof "1.2.0" statuses "2.0.1" type-is "~1.6.18" @@ -5537,13 +5579,13 @@ fill-range@^7.1.1: dependencies: to-regex-range "^5.0.1" -finalhandler@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" - integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== +finalhandler@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.3.1.tgz#0c575f1d1d324ddd1da35ad7ece3df7d19088019" + integrity sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ== dependencies: debug "2.6.9" - encodeurl "~1.0.2" + encodeurl "~2.0.0" escape-html "~1.0.3" on-finished "2.4.1" parseurl "~1.3.3" @@ -5918,10 +5960,10 @@ global-prefix@^3.0.0: kind-of "^6.0.2" which "^1.3.1" -globals@15.8.0: - version "15.8.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-15.8.0.tgz#e64bb47b619dd8cbf32b3c1a0a61714e33cbbb41" - integrity sha512-VZAJ4cewHTExBWDHR6yptdIBlx9YSSZuwojj9Nt5mBRXQzrKakDsVKQ1J63sklLvzAJm0X5+RpO4i3Y2hcOnFw== +globals@15.14.0: + version "15.14.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-15.14.0.tgz#b8fd3a8941ff3b4d38f3319d433b61bbb482e73f" + integrity sha512-OkToC372DtlQeje9/zHIo5CT8lRP/FUgEOKBEhU4e0abL7J7CD24fD9ohiLN5hagG/kWCYj4K5oaxxtj2Z0Dig== globals@^11.1.0: version "11.12.0" @@ -7649,7 +7691,7 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ== -lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21: +lodash@^4.17.20, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -7952,9 +7994,9 @@ ms@2.1.3, ms@^2.1.1, ms@^2.1.3: integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== msw@^2.6.4: - version "2.6.8" - resolved "https://registry.yarnpkg.com/msw/-/msw-2.6.8.tgz#0cc4d92526444f958829f3fb263ab55ca7437b1d" - integrity sha512-nxXxnH6WALZ9a7rsQp4HU2AaD4iGAiouMmE/MY4al7pXTibgA6OZOuKhmN2WBIM6w9qMKwRtX8p2iOb45B2M/Q== + version "2.7.0" + resolved "https://registry.yarnpkg.com/msw/-/msw-2.7.0.tgz#d13ff87f7e018fc4c359800ff72ba5017033fb56" + integrity sha512-BIodwZ19RWfCbYTxWTUfTXc+sg4OwjCAgxU1ZsgmggX/7S3LdUifsbUPJs61j0rWb19CZRGY5if77duhc0uXzw== dependencies: "@bundled-es-modules/cookie" "^2.0.1" "@bundled-es-modules/statuses" "^1.0.1" @@ -7965,12 +8007,12 @@ msw@^2.6.4: "@open-draft/until" "^2.1.0" "@types/cookie" "^0.6.0" "@types/statuses" "^2.0.4" - chalk "^4.1.2" graphql "^16.8.1" headers-polyfill "^4.0.2" is-node-process "^1.2.0" outvariant "^1.4.3" path-to-regexp "^6.3.0" + picocolors "^1.1.1" strict-event-emitter "^0.5.1" type-fest "^4.26.1" yargs "^17.7.2" @@ -8487,10 +8529,10 @@ path-scurry@^1.11.1: lru-cache "^10.2.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" -path-to-regexp@0.1.10: - version "0.1.10" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.10.tgz#67e9108c5c0551b9e5326064387de4763c4d5f8b" - integrity sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w== +path-to-regexp@0.1.12: + version "0.1.12" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.12.tgz#d5e1a12e478a976d432ef3c58d534b9923164bb7" + integrity sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ== path-to-regexp@^6.3.0: version "6.3.0" @@ -9109,10 +9151,10 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier@3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105" - integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew== +prettier@3.4.2: + version "3.4.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.4.2.tgz#a5ce1fb522a588bf2b78ca44c6e6fe5aa5a2b13f" + integrity sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ== prettier@^2.7.1: version "2.8.8" @@ -9248,13 +9290,6 @@ pure-rand@^6.0.0: resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.1.0.tgz#d173cf23258231976ccbdb05247c9787957604f2" integrity sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA== -qs@6.11.0: - version "6.11.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" - integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== - dependencies: - side-channel "^1.0.4" - qs@6.13.0: version "6.13.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" @@ -9514,11 +9549,6 @@ require-from-string@^2.0.2: resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== -requireindex@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.2.0.tgz#3463cdb22ee151902635aa6c9535d4de9c2ef1ef" - integrity sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww== - requires-port@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" @@ -9885,25 +9915,6 @@ semver@^7.3.2, semver@^7.3.4, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4, semve resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== -send@0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" - integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== - dependencies: - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "2.0.0" - mime "1.6.0" - ms "2.1.3" - on-finished "2.4.1" - range-parser "~1.2.1" - statuses "2.0.1" - send@0.19.0: version "0.19.0" resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8" @@ -9943,15 +9954,15 @@ serve-index@^1.9.1: mime-types "~2.1.17" parseurl "~1.3.2" -serve-static@1.16.0: - version "1.16.0" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.0.tgz#2bf4ed49f8af311b519c46f272bf6ac3baf38a92" - integrity sha512-pDLK8zwl2eKaYrs8mrPZBJua4hMplRWJ1tIFksVC3FtBEBnl8dxgeHtsaMS8DhS9i4fLObaon6ABoc4/hQGdPA== +serve-static@1.16.2: + version "1.16.2" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.2.tgz#b6a5343da47f6bdd2673848bf45754941e803296" + integrity sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw== dependencies: - encodeurl "~1.0.2" + encodeurl "~2.0.0" escape-html "~1.0.3" parseurl "~1.3.3" - send "0.18.0" + send "0.19.0" set-function-length@^1.2.1, set-function-length@^1.2.2: version "1.2.2" @@ -10899,6 +10910,11 @@ ts-api-utils@^1.3.0: resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1" integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== +ts-api-utils@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-2.0.0.tgz#b9d7d5f7ec9f736f4d0f09758b8607979044a900" + integrity sha512-xCt/TOAc+EOHS1XPnijD3/yzpH6qg2xppZO1YDqGoVsNXfQfzHpOdNuXwrwOU8u4ITXJyDCTyt8w5g1sZv9ynQ== + ts-dedent@^2.0.0, ts-dedent@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/ts-dedent/-/ts-dedent-2.2.0.tgz#39e4bd297cd036292ae2394eb3412be63f563bb5"