diff --git a/.github/workflows/build-publish.yaml b/.github/workflows/build-publish.yaml index 9c4f99d..9102c45 100644 --- a/.github/workflows/build-publish.yaml +++ b/.github/workflows/build-publish.yaml @@ -18,10 +18,10 @@ jobs: - uses: actions/setup-node@v4 with: node-version: "20" - - run: yarn install + - run: yarn install --frozen-lockfile - run: yarn test - uses: JS-DevTools/npm-publish@v3 if: startsWith(github.ref, 'refs/tags/v') with: token: ${{ secrets.NPM_TOKEN }} - access: public \ No newline at end of file + access: public diff --git a/README.md b/README.md index d882581..82aeb50 100644 --- a/README.md +++ b/README.md @@ -381,7 +381,7 @@ It contains all the data and methods needed to handle the form. #### Defined in -[index.ts:297](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L297) +[index.ts:298](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L298) ### Core Types #### Errors @@ -408,7 +408,7 @@ and age is a non valid field, errors object will look like this #### Defined in -[index.ts:78](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L78) +[index.ts:78](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L78) #### Form Ƭ **Form**: [`FormbitValues`](#formbitvalues) @@ -417,7 +417,7 @@ Object containing the updated form. #### Defined in -[index.ts:55](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L55) +[index.ts:55](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L55) #### FormState Ƭ **FormState**\<`Values`\>: `Object` @@ -442,7 +442,7 @@ Internal form state storing all the data of the form (except the validation sche #### Defined in -[index.ts:110](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L110) +[index.ts:110](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L110) #### FormbitValues Ƭ **FormbitValues**: \{ `__metadata?`: `FormbitRecord` } & `FormbitRecord` @@ -451,7 +451,7 @@ Base type for form values: a record of string keys with an optional `__metadata` #### Defined in -[index.ts:52](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L52) +[index.ts:52](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L52) #### InitialValues Ƭ **InitialValues**: [`FormbitValues`](#formbitvalues) @@ -460,7 +460,7 @@ InitialValues used to set up formbit; also used to reset the form to its origina #### Defined in -[index.ts:58](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L58) +[index.ts:58](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L58) #### LiveValidation Ƭ **LiveValidation**: `Record`\<`string`, ``true``\> @@ -490,7 +490,7 @@ and age is a field that is being live-validated, liveValidation object will look #### Defined in -[index.ts:103](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L103) +[index.ts:103](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L103) ### Callback Types #### CheckErrorCallback @@ -524,7 +524,7 @@ Invoked in case of errors raised by validation of check method. #### Defined in -[index.ts:171](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L171) +[index.ts:171](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L171) #### CheckSuccessCallback Ƭ **CheckSuccessCallback**\<`Values`\>: (`json`: [`Form`](#form), `writer`: [`FormState`](#formstate)\<`Values`\>, `setError`: [`SetError`](#seterror)) => `void` @@ -555,7 +555,7 @@ Success callback invoked by the check method when the operation is successful. #### Defined in -[index.ts:162](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L162) +[index.ts:162](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L162) #### ErrorCallback Ƭ **ErrorCallback**\<`Values`\>: (`writer`: [`FormState`](#formstate)\<`Values`\>, `setError`: [`SetError`](#seterror)) => `void` @@ -585,7 +585,7 @@ Invoked in case of errors raised by validation. #### Defined in -[index.ts:157](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L157) +[index.ts:157](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L157) #### SubmitSuccessCallback Ƭ **SubmitSuccessCallback**\<`Values`\>: (`writer`: [`FormState`](#formstate)\<`Values` \| `Omit`\<`Values`, ``"__metadata"``\>\>, `setError`: [`SetError`](#seterror), `clearIsDirty`: () => `void`) => `void` @@ -617,7 +617,7 @@ Is the right place to send your data to the backend. #### Defined in -[index.ts:181](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L181) +[index.ts:181](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L181) #### SuccessCallback Ƭ **SuccessCallback**\<`Values`\>: (`writer`: [`FormState`](#formstate)\<`Values`\>, `setError`: [`SetError`](#seterror)) => `void` @@ -647,7 +647,7 @@ Success callback invoked by some formbit methods when the operation is successfu #### Defined in -[index.ts:152](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L152) +[index.ts:152](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L152) ### Method Types #### Check @@ -679,7 +679,7 @@ See [FormbitObject.check](#check). #### Defined in -[index.ts:213](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L213) +[index.ts:214](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L214) #### Initialize Ƭ **Initialize**\<`Values`\>: (`values`: `Partial`\<`Values`\>) => `void` @@ -708,7 +708,7 @@ See [FormbitObject.initialize](#initialize). #### Defined in -[index.ts:217](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L217) +[index.ts:218](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L218) #### Remove Ƭ **Remove**\<`Values`\>: (`path`: `string`, `options?`: [`WriteFnOptions`](#writefnoptions)\<`Values`\>) => `void` @@ -738,7 +738,7 @@ See [FormbitObject.remove](#remove). #### Defined in -[index.ts:220](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L220) +[index.ts:221](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L221) #### RemoveAll Ƭ **RemoveAll**\<`Values`\>: (`arr`: `string`[], `options?`: [`WriteFnOptions`](#writefnoptions)\<`Values`\>) => `void` @@ -768,7 +768,7 @@ See [FormbitObject.removeAll](#removeall). #### Defined in -[index.ts:255](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L255) +[index.ts:256](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L256) #### SetError Ƭ **SetError**: (`path`: `string`, `value`: `string`) => `void` @@ -792,7 +792,7 @@ See [FormbitObject.setError](#seterror). #### Defined in -[index.ts:223](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L223) +[index.ts:224](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L224) #### SetSchema Ƭ **SetSchema**\<`Values`\>: (`newSchema`: [`ValidationSchema`](#validationschema)\<`Values`\>) => `void` @@ -821,7 +821,7 @@ See [FormbitObject.setSchema](#setschema). #### Defined in -[index.ts:226](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L226) +[index.ts:227](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L227) #### SubmitForm Ƭ **SubmitForm**\<`Values`\>: (`successCallback`: [`SubmitSuccessCallback`](#submitsuccesscallback)\<`Values`\>, `errorCallback?`: [`ErrorCallback`](#errorcallback)\<`Partial`\<`Values`\>\>, `options?`: [`ValidateOptions`](#validateoptions)) => `void` @@ -852,7 +852,7 @@ See [FormbitObject.submitForm](#submitform). #### Defined in -[index.ts:229](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L229) +[index.ts:230](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L230) #### Validate Ƭ **Validate**\<`Values`\>: (`path`: `string`, `options?`: [`ValidateFnOptions`](#validatefnoptions)\<`Values`\>) => `void` @@ -882,7 +882,7 @@ See [FormbitObject.validate](#validate). #### Defined in -[index.ts:235](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L235) +[index.ts:236](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L236) #### ValidateAll Ƭ **ValidateAll**\<`Values`\>: (`paths`: `string`[], `options?`: [`ValidateFnOptions`](#validatefnoptions)\<`Values`\>) => `void` @@ -912,7 +912,7 @@ See [FormbitObject.validateAll](#validateall). #### Defined in -[index.ts:238](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L238) +[index.ts:239](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L239) #### ValidateForm Ƭ **ValidateForm**\<`Values`\>: (`successCallback?`: [`SuccessCallback`](#successcallback)\<`Values`\>, `errorCallback?`: [`ErrorCallback`](#errorcallback)\<`Values`\>, `options?`: [`ValidateOptions`](#validateoptions)) => `void` @@ -943,7 +943,7 @@ See [FormbitObject.validateForm](#validateform). #### Defined in -[index.ts:241](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L241) +[index.ts:242](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L242) #### Write Ƭ **Write**\<`Values`\>: (`path`: keyof `Values` \| `string`, `value`: `unknown`, `options?`: [`WriteFnOptions`](#writefnoptions)\<`Values`\>) => `void` @@ -974,7 +974,7 @@ See [FormbitObject.write](#write). #### Defined in -[index.ts:247](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L247) +[index.ts:248](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L248) #### WriteAll Ƭ **WriteAll**\<`Values`\>: (`arr`: [`WriteAllValue`](#writeallvalue)\<`Values`\>[], `options?`: [`WriteFnOptions`](#writefnoptions)\<`Values`\>) => `void` @@ -1004,7 +1004,7 @@ See [FormbitObject.writeAll](#writeall). #### Defined in -[index.ts:251](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L251) +[index.ts:252](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L252) ### Options Types #### CheckFnOptions @@ -1029,7 +1029,7 @@ Options object to change the behavior of the check method. #### Defined in -[index.ts:268](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L268) +[index.ts:269](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L269) #### ValidateFnOptions Ƭ **ValidateFnOptions**\<`Values`\>: `Object` @@ -1052,7 +1052,7 @@ Options object to change the behavior of the validate methods. #### Defined in -[index.ts:277](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L277) +[index.ts:278](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L278) #### WriteAllValue Ƭ **WriteAllValue**\<`Values`\>: [keyof `Values` \| `string`, `unknown`] @@ -1067,7 +1067,7 @@ Tuple of [key, value] pair. #### Defined in -[index.ts:261](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L261) +[index.ts:262](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L262) #### WriteFnOptions Ƭ **WriteFnOptions**\<`Values`\>: \{ `noLiveValidation?`: `boolean` ; `pathsToValidate?`: `string`[] } & [`ValidateFnOptions`](#validatefnoptions)\<`Values`\> @@ -1082,7 +1082,7 @@ Options object to change the behavior of the write methods. #### Defined in -[index.ts:286](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L286) +[index.ts:287](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L287) ### Yup Re-Exports #### ValidateOptions @@ -1096,7 +1096,7 @@ Link to the Yup documentation [https://github.com/jquense/yup](https://github.co #### Defined in -[index.ts:137](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L137) +[index.ts:137](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L137) #### ValidationError Ƭ **ValidationError**: `YupValidationError` @@ -1108,7 +1108,7 @@ Link to the Yup documentation [https://github.com/jquense/yup](https://github.co #### Defined in -[index.ts:145](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L145) +[index.ts:145](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L145) #### ValidationSchema Ƭ **ValidationSchema**\<`Values`\>: `ObjectSchema`\<`Values`\> @@ -1126,7 +1126,7 @@ Link to the Yup documentation [https://github.com/jquense/yup](https://github.co #### Defined in -[index.ts:129](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L129) +[index.ts:129](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L129) ### Deprecated Types
@@ -1150,7 +1150,7 @@ Inlined into [FormbitObject](#formbitobject). #### Defined in -[index.ts:199](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L199) +[index.ts:200](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L200) #### ErrorCheckCallback Ƭ **ErrorCheckCallback**\<`Values`\>: [`CheckErrorCallback`](#checkerrorcallback)\<`Values`\> @@ -1167,7 +1167,7 @@ Use [CheckErrorCallback](#checkerrorcallback) instead. #### Defined in -[index.ts:175](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L175) +[index.ts:175](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L175) #### ErrorFn Ƭ **ErrorFn**: (`path`: `string`) => `string` \| `undefined` @@ -1192,7 +1192,7 @@ Inlined into [FormbitObject](#formbitobject). #### Defined in -[index.ts:190](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L190) +[index.ts:191](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L191) #### IsDirty Ƭ **IsDirty**: `boolean` @@ -1203,7 +1203,7 @@ Inlined into [FormbitObject](#formbitobject). #### Defined in -[index.ts:208](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L208) +[index.ts:209](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L209) #### IsFormInvalid Ƭ **IsFormInvalid**: () => `boolean` @@ -1222,7 +1222,7 @@ Inlined into [FormbitObject](#formbitobject). #### Defined in -[index.ts:196](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L196) +[index.ts:197](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L197) #### IsFormValid Ƭ **IsFormValid**: () => `boolean` @@ -1241,7 +1241,7 @@ Inlined into [FormbitObject](#formbitobject). #### Defined in -[index.ts:193](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L193) +[index.ts:194](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L194) #### LiveValidationFn Ƭ **LiveValidationFn**: (`path`: `string`) => ``true`` \| `undefined` @@ -1266,7 +1266,7 @@ Inlined into [FormbitObject](#formbitobject). #### Defined in -[index.ts:205](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L205) +[index.ts:206](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L206) #### Object Ƭ **Object**: `FormbitRecord` @@ -1277,7 +1277,7 @@ Use FormbitRecord instead. Renamed to avoid shadowing the global `Object`. #### Defined in -[index.ts:19](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L19) +[index.ts:19](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L19) #### ResetForm Ƭ **ResetForm**: () => `void` @@ -1296,7 +1296,7 @@ Inlined into [FormbitObject](#formbitobject). #### Defined in -[index.ts:202](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L202) +[index.ts:203](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L203) #### SuccessCheckCallback Ƭ **SuccessCheckCallback**\<`Values`\>: [`CheckSuccessCallback`](#checksuccesscallback)\<`Values`\> @@ -1313,7 +1313,7 @@ Use [CheckSuccessCallback](#checksuccesscallback) instead. #### Defined in -[index.ts:166](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L166) +[index.ts:166](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L166) #### Writer Ƭ **Writer**\<`Values`\>: [`FormState`](#formstate)\<`Values`\> @@ -1330,7 +1330,7 @@ Use [FormState](#formstate) instead. #### Defined in -[index.ts:119](https://github.com/radicalbit/formbit/blob/1136d0a/src/types/index.ts#L119) +[index.ts:119](https://github.com/radicalbit/formbit/blob/a7ecd8e/src/types/index.ts#L119)
diff --git a/example/.eslintrc.cjs b/example/.eslintrc.cjs index 81b15e1..76185b7 100644 --- a/example/.eslintrc.cjs +++ b/example/.eslintrc.cjs @@ -1,13 +1,77 @@ module.exports = { root: true, - env: { browser: true, es2020: true }, + parser: '@typescript-eslint/parser', + plugins: [ + 'sonarjs', + '@typescript-eslint', + 'react-refresh', + ], extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', + 'standard', + 'standard-react', + 'plugin:sonarjs/recommended', 'plugin:react-hooks/recommended', ], + env: { + browser: true, + node: true, + es2020: true, + }, + parserOptions: { + ecmaVersion: 2020, + ecmaFeatures: { + jsx: true, + }, + }, ignorePatterns: ['dist', '.eslintrc.cjs'], - parser: '@typescript-eslint/parser', - plugins: ['react-refresh'], - rules: {}, + overrides: [ + { + files: ['cypress/**/*.ts', 'cypress/**/*.tsx', 'src/__tests__/**/*.ts', 'src/__tests__/**/*.tsx'], + env: { + 'cypress/globals': true, + }, + plugins: ['cypress'], + rules: { + 'sonarjs/no-duplicate-string': 'off', + }, + }, + { + files: ['**/*.d.ts'], + rules: { + 'no-undef': 'off', + }, + }, + ], + settings: { + react: { + version: '18', + }, + }, + rules: { + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': [ + 'error', + { + args: 'all', + argsIgnorePattern: '^_', + caughtErrors: 'all', + caughtErrorsIgnorePattern: '^_', + destructuredArrayIgnorePattern: '^_', + varsIgnorePattern: '^_', + ignoreRestSiblings: true, + }, + ], + 'no-use-before-define': 'off', + 'no-shadow': 'off', + 'react/react-in-jsx-scope': 'off', + 'standard/no-callback-literal': 'off', + 'no-unused-expressions': 'off', + 'space-before-function-paren': 0, + 'react/prop-types': 0, + 'react/jsx-handler-names': 0, + 'react/jsx-fragments': 0, + 'react/no-unused-prop-types': 0, + 'import/export': 0, + 'max-len': ['error', { code: 120 }], + }, } diff --git a/example/cypress.config.ts b/example/cypress.config.ts index 03fba84..f0622c6 100644 --- a/example/cypress.config.ts +++ b/example/cypress.config.ts @@ -1,12 +1,12 @@ -import { defineConfig } from "cypress"; +import { defineConfig } from 'cypress' export default defineConfig({ component: { devServer: { - framework: "react", - bundler: "vite", + framework: 'react', + bundler: 'vite' }, viewportWidth: 1200, viewportHeight: 800 - }, -}); + } +}) diff --git a/example/cypress/support/commands.ts b/example/cypress/support/commands.ts index 2d018b8..ca185f9 100644 --- a/example/cypress/support/commands.ts +++ b/example/cypress/support/commands.ts @@ -36,16 +36,12 @@ // } // } +const getTab = (tab: string) => cy.get('[role="tab"]').contains(tab, { matchCase: false }) - - -const getTab = (tab: string) => cy.get(`[role="tab"]`).contains(tab, { matchCase: false }) - -const shouldSubmit = (...args: unknown[]) => cy.get('@console-log').should('be.calledWith','Submitted Form', ...args) +const shouldSubmit = (...args: unknown[]) => cy.get('@console-log').should('be.calledWith', 'Submitted Form', ...args) const shouldNotSubmit = () => { cy.get('@console-log').should('not.be.called') } const button = (text: string) => cy.get('button').contains(text, { matchCase: false }).parent() - -Cypress.Commands.addAll({ button, getTab, shouldSubmit, shouldNotSubmit}) +Cypress.Commands.addAll({ button, getTab, shouldSubmit, shouldNotSubmit }) diff --git a/example/cypress/support/component.tsx b/example/cypress/support/component.tsx index cb52d1f..8a17aac 100644 --- a/example/cypress/support/component.tsx +++ b/example/cypress/support/component.tsx @@ -1,6 +1,5 @@ /// -/* eslint-disable @typescript-eslint/no-namespace */ // *********************************************************** // This example support/component.ts is processed and // loaded automatically before your test files. @@ -19,21 +18,19 @@ // Import commands.js using ES2015 syntax: import './commands' +import { mount } from 'cypress/react18' + // Alternatively you can use CommonJS syntax: // require('./commands') - -global.process = global.process || {}; -global.process.env = global.process.env || {}; - -import { mount } from 'cypress/react18' - +global.process = global.process || {} +global.process.env = global.process.env || {} Cypress.Commands.add('mount', mount) beforeEach(() => { - cy.spy(window.console, 'log').as('console-log') + cy.spy(window.console, 'log').as('console-log') }) // Example use: -// cy.mount() \ No newline at end of file +// cy.mount() diff --git a/example/cypress/support/index.d.ts b/example/cypress/support/index.d.ts index 290110f..2bd4f49 100644 --- a/example/cypress/support/index.d.ts +++ b/example/cypress/support/index.d.ts @@ -1,4 +1,4 @@ -import { mount } from "cypress/react18"; +import { mount } from 'cypress/react18' declare global { namespace Cypress { @@ -10,4 +10,4 @@ declare global { shouldNotSubmit: () => void } } - } \ No newline at end of file + } diff --git a/example/package.json b/example/package.json index c87e4be..63682d5 100644 --- a/example/package.json +++ b/example/package.json @@ -26,9 +26,17 @@ "@typescript-eslint/eslint-plugin": "^7.2.0", "@typescript-eslint/parser": "^7.2.0", "@vitejs/plugin-react": "^4.2.1", - "eslint": "^8.57.0", + "eslint": "8.57.0", + "eslint-config-standard": "^17.1.0", + "eslint-config-standard-react": "^13.0.0", + "eslint-plugin-cypress": "^2.15.0", + "eslint-plugin-import": "^2.29.1", + "eslint-plugin-n": "^16.6.2", + "eslint-plugin-promise": "^4.2.1", + "eslint-plugin-react": "^7.17.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.6", + "eslint-plugin-sonarjs": "^0.25.0", "tailwindcss": "3.4.3", "typescript": "^5.2.2", "vite": "^5.2.0" diff --git a/example/src/App.tsx b/example/src/App.tsx index dc894dd..f700de4 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -1,12 +1,12 @@ -import { Tabs } from "@radicalbit/radicalbit-design-system" -import { BasicFormContext } from './forms/basic-form-context' -import { BasicFormHook } from './forms/basic-form-hook' -import { MultipleStepsForm } from './forms/multiple-steps' -import { AddableFieldsForm } from './forms/addable-fields' -import { EditLikeForm } from './forms/edit-like' -import { FakeApiProvider } from "./forms/context/api-context" -import Logo from "./img/LogoRB_PositivoBN.png" -import { WriteRemoveAllForm } from "./forms/remove-all" +import { Tabs } from '@radicalbit/radicalbit-design-system' +import { BasicFormHook } from './forms/a-basic-form-hook' +import { BasicFormContext } from './forms/b-basic-form-context' +import { AddableFieldsForm } from './forms/c-addable-fields' +import { EditLikeForm } from './forms/d-edit-like' +import { MultipleStepsForm } from './forms/e-multiple-steps' +import { WriteRemoveAllForm } from './forms/f-remove-all' +import { FakeApiProvider } from './forms/fake-api-context' +import Logo from './img/LogoRB_PositivoBN.png' enum EXAMPLES { CONTEXT = 'context', @@ -14,7 +14,26 @@ enum EXAMPLES { MULTI = 'multi', ADDABLE = 'addable', EDIT = 'edit', - WRITEREMOVEALL = 'write/remove all', + WRITEREMOVEALL = 'write-remove-all', +} + +const QUERY_PARAM = 'example' + +const getActiveTab = (): string => { + const params = new URLSearchParams(window.location.search) + const tab = params.get(QUERY_PARAM) + + if (tab && Object.values(EXAMPLES).includes(tab)) { + return tab + } + + return EXAMPLES.HOOK +} + +const setActiveTab = (key: string) => { + const params = new URLSearchParams(window.location.search) + params.set(QUERY_PARAM, key) + window.history.replaceState({}, '', `?${params.toString()}`) } function App() { @@ -28,7 +47,8 @@ function App() { }, - { - label: 'Multi-step Form', - key: EXAMPLES.MULTI, - children: - }, { label: 'Addable-Fields Form', key: EXAMPLES.ADDABLE, @@ -57,20 +72,33 @@ function App() { key: EXAMPLES.EDIT, children: }, + { + label: 'Multi-step Form', + key: EXAMPLES.MULTI, + children: + }, { label: 'Write/Remove All Form', key: EXAMPLES.WRITEREMOVEALL, children: - }, + } ]} /> ) } -export default App \ No newline at end of file +export default App diff --git a/example/src/__tests__/addable-fields.cy.tsx b/example/src/__tests__/addable-fields.cy.tsx index d2e6a67..d6f92bc 100644 --- a/example/src/__tests__/addable-fields.cy.tsx +++ b/example/src/__tests__/addable-fields.cy.tsx @@ -1,118 +1,113 @@ -import App from "../App" - +import App from '../App' describe('', () => { - beforeEach(() => { - cy.mount() - cy.getTab('addable').click() - - }) - - it('Name input should exist', () => { - cy.get('input').eq(0).should('exist') - }) - - it('Surname input should exist', () => { - cy.get('input').eq(1).should('exist') + beforeEach(() => { + cy.mount() + cy.getTab('addable').click() + }) + + it('Name input should exist', () => { + cy.get('input').eq(0).should('exist') + }) + + it('Surname input should exist', () => { + cy.get('input').eq(1).should('exist') + }) + + it('Add Friend Name input should exist', () => { + cy.get('input').eq(2).should('exist') + }) + + it('Add Friend Surname input should exist', () => { + cy.get('input').eq(3).should('exist') + }) + + describe('', () => { + describe('Submit', () => { + beforeEach(() => { + cy.get('input').eq(0).as('name') + cy.get('input').eq(1).as('surname') + cy.get('input').eq(2).as('friendName') + cy.get('input').eq(3).as('friendSurname') + }) + + it('Submit button should exist', () => { + cy.button('submit').should('exist') + }) + + it('Submit button should be disabled when form is rendered', () => { + cy.button('submit').should('be.disabled') + }) + + it('Should be submittable', () => { + cy.get('@name').type('Harry') + cy.get('@surname').type('Potter') + cy.get('@friendName').type('Ron') + cy.get('@friendSurname').type('Weasley') + + cy.get('.c-form-multiple__add').click() + + cy.button('submit').click() + + cy.shouldSubmit({ name: 'Harry', surname: 'Potter', friends: [{ name: 'Ron', surname: 'Weasley' }] }) + }) + + it('Should not submit form when not valid', () => { + cy.get('@name').type('Harry') + cy.button('submit').click() + + cy.shouldNotSubmit() + }) }) - it('Add Friend Name input should exist', () => { - cy.get('input').eq(2).should('exist') - }) - - it('Add Friend Surname input should exist', () => { - cy.get('input').eq(3).should('exist') - }) - - describe('', () => { - describe('Submit', () => { - beforeEach(() => { - cy.get('input').eq(0).as('name') - cy.get('input').eq(1).as('surname') - cy.get('input').eq(2).as('friendName') - cy.get('input').eq(3).as('friendSurname') - }) - - it('Submit button should exist', () => { - cy.button('submit').should('exist') - }) - - it('Submit button should be disabled when form is rendered', () => { - cy.button('submit').should("be.disabled") - }) + describe('Reset', () => { + beforeEach(() => { + cy.get('input').eq(0).as('name') + cy.get('input').eq(1).as('surname') + cy.get('input').eq(2).as('friendName') + cy.get('input').eq(3).as('friendSurname') + }) - it('Should be submittable', () => { - cy.get('@name').type('Harry') - cy.get('@surname').type('Potter') - cy.get('@friendName').type('Ron') - cy.get('@friendSurname').type('Weasley') + it('Reset button should exist', () => { + cy.button('reset').should('exist') + }) - cy.get('.c-form-multiple__add').click() + describe('Can be reset to original state', () => { + it('Should reset name field', () => { + cy.get('@name').type('Ada') + cy.button('reset').click() - - cy.button('submit').click() - - cy.shouldSubmit({ name: 'Harry', surname: 'Potter', friends: [{ name: 'Ron', surname: 'Weasley' }] }) - }) - - it('Should not submit form when not valid', () => { - cy.get('@name').type('Harry') - cy.button('submit').click() - - cy.shouldNotSubmit() - }) + cy.get('@name').should('be.empty') }) - describe('Reset', () => { - beforeEach(() => { - cy.get('input').eq(0).as('name') - cy.get('input').eq(1).as('surname') - cy.get('input').eq(2).as('friendName') - cy.get('input').eq(3).as('friendSurname') - }) - - it('Reset button should exist', () => { - cy.button('reset').should('exist') - }) - - describe('Can be reset to original state', () => { - it('Should reset name field', () => { - cy.get('@name').type('Ada') - cy.button('reset').click() + it('Should reset surname field', () => { + cy.get('@surname').type('Lovelace') + cy.button('reset').click() - cy.get('@name').should('be.empty') - }) - - it('Should reset surname field', () => { - cy.get('@surname').type('Lovelace') - cy.button('reset').click() - - cy.get('@surname').should('be.empty') - }) + cy.get('@surname').should('be.empty') + }) - describe('', () => { - beforeEach(() => { - cy.get('@friendName').type('Ron') - cy.get('@friendSurname').type('Weasley') + describe('', () => { + beforeEach(() => { + cy.get('@friendName').type('Ron') + cy.get('@friendSurname').type('Weasley') - cy.get('.c-form-multiple__add').click() - }) + cy.get('.c-form-multiple__add').click() + }) - it('Should reset friend name field', () => { - cy.button('reset').click() + it('Should reset friend name field', () => { + cy.button('reset').click() - cy.get('@friendName').should('be.empty') - }) + cy.get('@friendName').should('be.empty') + }) - it('Should reset friend surname field', () => { - cy.button('reset').click() + it('Should reset friend surname field', () => { + cy.button('reset').click() - cy.get('@friendName').should('be.empty') - }) - }) - }) + cy.get('@friendName').should('be.empty') + }) }) - + }) }) - -}) \ No newline at end of file + }) +}) diff --git a/example/src/__tests__/basic-form-context.cy.tsx b/example/src/__tests__/basic-form-context.cy.tsx index 5521f49..3160384 100644 --- a/example/src/__tests__/basic-form-context.cy.tsx +++ b/example/src/__tests__/basic-form-context.cy.tsx @@ -1,94 +1,90 @@ -import App from "../App" - +import App from '../App' describe('', () => { - beforeEach(() => { - cy.mount() - cy.getTab('context').click() - - }) - - it('Name input should exist', () => { - cy.get('input').eq(0).should('exist') - }) - - it('Surname input should exist', () => { - cy.get('input').eq(1).should('exist') - }) - - it('Age input should exist', () => { - cy.get('input').eq(2).should('exist') + beforeEach(() => { + cy.mount() + cy.getTab('context').click() + }) + + it('Name input should exist', () => { + cy.get('input').eq(0).should('exist') + }) + + it('Surname input should exist', () => { + cy.get('input').eq(1).should('exist') + }) + + it('Age input should exist', () => { + cy.get('input').eq(2).should('exist') + }) + + describe('', () => { + describe('Submit', () => { + beforeEach(() => { + cy.get('input').eq(0).as('name') + cy.get('input').eq(1).as('surname') + cy.get('input').eq(2).as('age') + }) + + it('Submit button should exist', () => { + cy.button('submit').should('exist') + }) + + it('Submit button should be disabled when form is rendered', () => { + cy.button('submit').should('be.disabled') + }) + + it('Should be submittable', () => { + cy.get('@name').type('Ada') + cy.get('@surname').type('Lovelace') + cy.get('@age').type('20') + + cy.button('submit').click() + + cy.shouldSubmit({ name: 'Ada', surname: 'Lovelace', age: 20 }) + }) + + it('Should not submit form when not valid', () => { + cy.get('@name').type('Ada') + cy.button('submit').click() + + cy.shouldNotSubmit() + }) }) - describe('', () => { - describe('Submit', () => { - beforeEach(() => { - cy.get('input').eq(0).as('name') - cy.get('input').eq(1).as('surname') - cy.get('input').eq(2).as('age') - }) - - it('Submit button should exist', () => { - cy.button('submit').should('exist') - }) - - it('Submit button should be disabled when form is rendered', () => { - cy.button('submit').should("be.disabled") - }) + describe('Reset', () => { + beforeEach(() => { + cy.get('input').eq(0).as('name') + cy.get('input').eq(1).as('surname') + cy.get('input').eq(2).as('age') + }) - it('Should be submittable', () => { - cy.get('@name').type('Ada') - cy.get('@surname').type('Lovelace') - cy.get('@age').type('20') + it('Reset button should exist', () => { + cy.button('reset').should('exist') + }) - cy.button('submit').click() + describe('Can be reset to original state', () => { + it('Should reset name field', () => { + cy.get('@name').type('Ada') + cy.button('reset').click() - cy.shouldSubmit({ name: 'Ada', surname: 'Lovelace', age: 20 }) - }) - - it('Should not submit form when not valid', () => { - cy.get('@name').type('Ada') - cy.button('submit').click() - - cy.shouldNotSubmit() - }) + cy.get('@name').should('be.empty') }) - describe('Reset', () => { - beforeEach(() => { - cy.get('input').eq(0).as('name') - cy.get('input').eq(1).as('surname') - cy.get('input').eq(2).as('age') - }) - - it('Reset button should exist', () => { - cy.button('reset').should('exist') - }) - - describe('Can be reset to original state', () => { - it('Should reset name field', () => { - cy.get('@name').type('Ada') - cy.button('reset').click() - - cy.get('@name').should('be.empty') - }) + it('Should reset surname field', () => { + cy.get('@surname').type('Lovelace') + cy.button('reset').click() - it('Should reset surname field', () => { - cy.get('@surname').type('Lovelace') - cy.button('reset').click() - - cy.get('@surname').should('be.empty') - }) + cy.get('@surname').should('be.empty') + }) - it('Should reset age field', () => { - cy.get('@age').type('20') - cy.button('reset').click() + it('Should reset age field', () => { + cy.get('@age').type('20') + cy.button('reset').click() - cy.get('@age').should('be.empty') - }) - }) + cy.get('@age').should('be.empty') }) + }) }) - - -}) \ No newline at end of file + }) +}) diff --git a/example/src/__tests__/basic-form-hook.cy.tsx b/example/src/__tests__/basic-form-hook.cy.tsx index fac895f..fec893b 100644 --- a/example/src/__tests__/basic-form-hook.cy.tsx +++ b/example/src/__tests__/basic-form-hook.cy.tsx @@ -1,11 +1,9 @@ -import App from "../App" - +import App from '../App' describe('', () => { beforeEach(() => { cy.mount() cy.getTab('hook').click() - }) it('Name input should exist', () => { @@ -28,7 +26,7 @@ describe('', () => { }) it('Submit button should be disabled when form is rendered', () => { - cy.button('submit').should("be.disabled") + cy.button('submit').should('be.disabled') }) it('Should be submittable', () => { @@ -75,4 +73,4 @@ describe('', () => { }) }) }) -}) \ No newline at end of file +}) diff --git a/example/src/__tests__/edit-like.cy.tsx b/example/src/__tests__/edit-like.cy.tsx index f5b8066..8384167 100644 --- a/example/src/__tests__/edit-like.cy.tsx +++ b/example/src/__tests__/edit-like.cy.tsx @@ -1,64 +1,61 @@ -import App from "../App" - +import App from '../App' describe('', () => { - beforeEach(() => { - cy.mount() - cy.getTab('edit').click() - }) - - it('Name input should exist', () => { - cy.get('input').eq(0).should('exist') - }) + beforeEach(() => { + cy.mount() + cy.getTab('edit').click() + }) - it('Surname input should exist', () => { - cy.get('input').eq(1).should('exist') - }) + it('Name input should exist', () => { + cy.get('input').eq(0).should('exist') + }) - it('Email input should exist', () => { - cy.get('input').eq(2).should('exist') - }) + it('Surname input should exist', () => { + cy.get('input').eq(1).should('exist') + }) - it('Should render skeleton on render', () => { - cy.get('.ant-skeleton-input').should('have.length', 3) - }) + it('Email input should exist', () => { + cy.get('input').eq(2).should('exist') + }) - describe('', () => { - describe('Submit', () => { - beforeEach(() => { - cy.get('.ant-skeleton-input').should('not.exist') + it('Should render skeleton on render', () => { + cy.get('.ant-skeleton-input').should('have.length', 3) + }) - cy.get('input').eq(0).as('name') - cy.get('input').eq(1).as('surname') - cy.get('input').eq(2).as('email') - }) + describe('', () => { + describe('Submit', () => { + beforeEach(() => { + cy.get('.ant-skeleton-input').should('not.exist') - it('Submit button should exist', () => { - cy.button('submit').should('exist') - }) + cy.get('input').eq(0).as('name') + cy.get('input').eq(1).as('surname') + cy.get('input').eq(2).as('email') + }) - it('Submit button should be disabled when form is rendered', () => { - cy.button('submit').should("be.disabled") - }) + it('Submit button should exist', () => { + cy.button('submit').should('exist') + }) - it('Should be submittable', () => { - cy.get('@name').clear().type('Harry') - cy.get('@surname').clear().type('Potter') - cy.get('@email').clear().type('harry@potter.com') + it('Submit button should be disabled when form is rendered', () => { + cy.button('submit').should('be.disabled') + }) - cy.button('submit').click() + it('Should be submittable', () => { + cy.get('@name').clear().type('Harry') + cy.get('@surname').clear().type('Potter') + cy.get('@email').clear().type('harry@potter.com') - cy.shouldSubmit({ name: 'Harry', surname: 'Potter', email: 'harry@potter.com' }) - }) + cy.button('submit').click() - it('Should not submit form when not valid', () => { - cy.get('@name').clear() - cy.button('submit').click() + cy.shouldSubmit({ name: 'Harry', surname: 'Potter', email: 'harry@potter.com' }) + }) - cy.shouldNotSubmit() - }) - }) + it('Should not submit form when not valid', () => { + cy.get('@name').clear() + cy.button('submit').click() + cy.shouldNotSubmit() + }) }) - -}) \ No newline at end of file + }) +}) diff --git a/example/src/__tests__/multi-steps.cy.tsx b/example/src/__tests__/multi-steps.cy.tsx index 0506baa..fb2490d 100644 --- a/example/src/__tests__/multi-steps.cy.tsx +++ b/example/src/__tests__/multi-steps.cy.tsx @@ -1,165 +1,159 @@ -import App from "../App" - +import App from '../App' describe('', () => { - beforeEach(() => { - cy.mount() - cy.getTab('multi').click() + beforeEach(() => { + cy.mount() + cy.getTab('multi').click() + }) + + describe('', () => { + it('Name input should exist', () => { + cy.get('input').eq(0).should('exist') + }) + it('Surname input should exist', () => { + cy.get('input').eq(1).should('exist') }) - describe('', () => { - it('Name input should exist', () => { - cy.get('input').eq(0).should('exist') + describe('', () => { + describe('Next', () => { + beforeEach(() => { + cy.get('input').eq(0).as('name') + cy.get('input').eq(1).as('surname') }) - it('Surname input should exist', () => { - cy.get('input').eq(1).should('exist') + it('Next button should exist', () => { + cy.button('next').should('exist') }) - describe('', () => { - describe('Next', () => { - beforeEach(() => { - cy.get('input').eq(0).as('name') - cy.get('input').eq(1).as('surname') - }) - - it('Next button should exist', () => { - cy.button('next').should('exist') - }) + it('Should not submit form when not valid', () => { + cy.get('@name').type('Ada') + cy.button('next').click() - it('Should not submit form when not valid', () => { - cy.get('@name').type('Ada') - cy.button('next').click() - - cy.shouldNotSubmit() - }) - - it('Should be submittable', () => { - cy.get('@name').type('Ada') - cy.get('@surname').type('Lovelace') + cy.shouldNotSubmit() + }) - cy.button('next').click() + it('Should be submittable', () => { + cy.get('@name').type('Ada') + cy.get('@surname').type('Lovelace') - cy.get('input').eq(0).should('have.attr', 'placeholder', 'Age') - }) - }) + cy.button('next').click() + cy.get('input').eq(0).should('have.attr', 'placeholder', 'Age') }) + }) }) + }) + describe('', () => { + beforeEach(() => { + cy.get('input').eq(0).type('Ada') + cy.get('input').eq(1).type('Lovelace') - describe('', () => { - beforeEach(() => { - cy.get('input').eq(0).type('Ada') - cy.get('input').eq(1).type('Lovelace') + cy.button('next').click() + }) - cy.button('next').click() - }) + it('Age input should exist', () => { + cy.get('input').eq(0).should('exist') + }) - it('Age input should exist', () => { - cy.get('input').eq(0).should('exist') + describe('', () => { + describe('Back', () => { + it('Back button should exist', () => { + cy.button('prev').should('exist') }) - describe('', () => { - describe('Back', () => { - it('Back button should exist', () => { - cy.button('prev').should('exist') - }) + it('Back button should take to the prev form', () => { + cy.button('prev').click() - it('Back button should take to the prev form', () => { - cy.button('prev').click() + cy.get('input').eq(0).should('have.attr', 'placeholder', 'Name') - cy.get('input').eq(0).should('have.attr', 'placeholder', 'Name') - - cy.button('next').click() - }) - }) - - describe('Next', () => { - beforeEach(() => { - cy.get('input').eq(0).as('age') - }) + cy.button('next').click() + }) + }) - it('Next button should exist', () => { - cy.button('next').should('exist') - }) + describe('Next', () => { + beforeEach(() => { + cy.get('input').eq(0).as('age') + }) - it('Should not submit form when not valid', () => { - cy.get('@age').type('10') - cy.button('next').click() + it('Next button should exist', () => { + cy.button('next').should('exist') + }) - cy.shouldNotSubmit() - }) + it('Should not submit form when not valid', () => { + cy.get('@age').type('10') + cy.button('next').click() - it('Should be submittable', () => { - cy.get('@age').type('20') + cy.shouldNotSubmit() + }) - cy.button('next').click() + it('Should be submittable', () => { + cy.get('@age').type('20') - cy.get('input').eq(0).should('have.attr', 'placeholder', 'Email') - }) - }) + cy.button('next').click() + cy.get('input').eq(0).should('have.attr', 'placeholder', 'Email') }) + }) }) + }) - describe('', () => { - beforeEach(() => { - cy.get('input').eq(0).type('Ada') - cy.get('input').eq(1).type('Lovelace') - - cy.button('next').click() + describe('', () => { + beforeEach(() => { + cy.get('input').eq(0).type('Ada') + cy.get('input').eq(1).type('Lovelace') - cy.get('input').eq(0).type('20') + cy.button('next').click() - cy.button('next').click() - }) + cy.get('input').eq(0).type('20') - it('Email input should exist', () => { - cy.get('input').eq(0).should('exist') - }) + cy.button('next').click() + }) - describe('', () => { - describe('Reset', () => { - it('Back button should exist', () => { - cy.button('reset').should('exist') - }) + it('Email input should exist', () => { + cy.get('input').eq(0).should('exist') + }) - it('Back button should take to the prev form', () => { - cy.button('reset').click() + describe('', () => { + describe('Reset', () => { + it('Back button should exist', () => { + cy.button('reset').should('exist') + }) - cy.get('input').eq(0).should('have.attr', 'placeholder', 'Name') - }) - }) + it('Back button should take to the prev form', () => { + cy.button('reset').click() - describe('Submit', () => { - beforeEach(() => { - cy.get('input').eq(0).as('email') - }) + cy.get('input').eq(0).should('have.attr', 'placeholder', 'Name') + }) + }) - it('Next button should exist', () => { - cy.button('submit').should('exist') - }) + describe('Submit', () => { + beforeEach(() => { + cy.get('input').eq(0).as('email') + }) - it('Should not submit form when not valid', () => { - cy.get('@email').type('invalid-email') - cy.button('submit').click() + it('Next button should exist', () => { + cy.button('submit').should('exist') + }) - cy.shouldNotSubmit() - }) + it('Should not submit form when not valid', () => { + cy.get('@email').type('invalid-email') + cy.button('submit').click() - it('Should be submittable', () => { - cy.get('@email').type('ada@lovelace.com') + cy.shouldNotSubmit() + }) - cy.button('submit').click() + it('Should be submittable', () => { + cy.get('@email').type('ada@lovelace.com') - cy.shouldSubmit({ - name: 'Ada', surname: 'Lovelace', age: 20, email: 'ada@lovelace.com' - }) - }) - }) + cy.button('submit').click() + cy.shouldSubmit({ + name: 'Ada', surname: 'Lovelace', age: 20, email: 'ada@lovelace.com' + }) }) + }) }) -}) \ No newline at end of file + }) +}) diff --git a/example/src/forms/basic-form-hook/index.tsx b/example/src/forms/a-basic-form-hook/index.tsx similarity index 68% rename from example/src/forms/basic-form-hook/index.tsx rename to example/src/forms/a-basic-form-hook/index.tsx index 36006fc..8bb73cb 100644 --- a/example/src/forms/basic-form-hook/index.tsx +++ b/example/src/forms/a-basic-form-hook/index.tsx @@ -1,15 +1,15 @@ -import useFormbit from 'formbit'; +import useFormbit from 'formbit' import { Button, FormField, Input, - SectionTitle, -} from "@radicalbit/radicalbit-design-system"; -import { InputRef } from 'rc-input'; -import { ChangeEvent } from 'react'; -import { usePost } from '../context/api-context'; -import { useAutoFocus } from '../../helpers/use-autofocus'; -import { success } from '../../helpers/message'; -import { FormData, schema } from './schema'; + SectionTitle +} from '@radicalbit/radicalbit-design-system' +import { InputRef } from 'rc-input' +import { ChangeEvent } from 'react' +import { useFakeApiContext } from '../fake-api-context' +import { useAutoFocus } from '../../helpers/use-autofocus' +import { success } from '../../helpers/message' +import { FormData, schema } from './schema' type FieldProps = { value?: string, @@ -26,24 +26,27 @@ type ActionsProps = { } export function BasicFormHook() { - const [triggerMutation, isLoading] = usePost() + const { fakePost } = useFakeApiContext() + const { mutate, isLoading } = fakePost - const { form, error, write, resetForm, submitForm, isFormInvalid, isDirty } = useFormbit({ initialValues: {}, yup: schema }); + const { + form, error, write, resetForm, submitForm, isFormInvalid, isDirty + } = useFormbit({ initialValues: {}, yup: schema }) - const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value); - const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value); + const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value) + const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value) const isSubmitDisabled = isFormInvalid() || !isDirty const handleOnSubmit = () => { - if (isSubmitDisabled || isLoading) return; + if (isSubmitDisabled || isLoading) return submitForm(async ({ form }) => { - await triggerMutation(form) + await mutate(form) success(form) resetForm() - }); - }; + }) + } return (
@@ -51,15 +54,19 @@ export function BasicFormHook() { - +
- ); + ) } - function Name({ value, error, onChange, onSubmit }: FieldProps) { const ref = useAutoFocus() @@ -74,7 +81,7 @@ function Name({ value, error, onChange, onSubmit }: FieldProps) { required /> - ); + ) } function Surname({ value, error, onChange, onSubmit }: FieldProps) { @@ -89,7 +96,6 @@ function Surname({ value, error, onChange, onSubmit }: FieldProps) { /> ) - } function Actions({ onSubmit, onReset, isLoading, isDisabled }: ActionsProps) { diff --git a/example/src/forms/a-basic-form-hook/schema.ts b/example/src/forms/a-basic-form-hook/schema.ts new file mode 100644 index 0000000..719602e --- /dev/null +++ b/example/src/forms/a-basic-form-hook/schema.ts @@ -0,0 +1,8 @@ +import * as yup from 'yup' + +export const schema = yup.object().shape({ + name: yup.string().min(2).required(), + surname: yup.string().min(2).required() +}) + +export type FormData = yup.InferType diff --git a/example/src/forms/basic-form-context/index.tsx b/example/src/forms/b-basic-form-context/index.tsx similarity index 67% rename from example/src/forms/basic-form-context/index.tsx rename to example/src/forms/b-basic-form-context/index.tsx index e0a3c25..01d5be8 100644 --- a/example/src/forms/basic-form-context/index.tsx +++ b/example/src/forms/b-basic-form-context/index.tsx @@ -1,23 +1,21 @@ -import { FormbitContextProvider, useFormbitContext } from 'formbit'; +import { FormbitContextProvider, useFormbitContext } from 'formbit' import { Button, FormField, Input, InputNumber, SectionTitle -} from "@radicalbit/radicalbit-design-system"; -import { InputRef } from 'rc-input'; -import { ChangeEvent } from 'react'; -import { useAutoFocus } from '../../helpers/use-autofocus'; -import { useHandleOnSubmit } from '../context/use-handle-on-submit'; -import { FormData, schema } from './schema'; - -const useBasicFormContext = () => useFormbitContext(); +} from '@radicalbit/radicalbit-design-system' +import { InputRef } from 'rc-input' +import { ChangeEvent } from 'react' +import { useAutoFocus } from '../../helpers/use-autofocus' +import { useHandleOnSubmit } from './use-handle-on-submit' +import { FormData, schema } from './schema' export function BasicFormContext() { return ( - ); + ) } function BasicFormInner() { @@ -33,15 +31,15 @@ function BasicFormInner() { - ); + ) } function Name() { - const { form, error, write } = useBasicFormContext(); + const { form, error, write } = useFormbitContext() - const [handleOnSubmit] = useHandleOnSubmit() + const { handleOnSubmit } = useHandleOnSubmit() - const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value); + const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value) const ref = useAutoFocus() @@ -56,15 +54,15 @@ function Name() { required /> - ); + ) } function Surname() { - const { form, error, write } = useBasicFormContext(); + const { form, error, write } = useFormbitContext() - const [handleOnSubmit] = useHandleOnSubmit() + const { handleOnSubmit } = useHandleOnSubmit() - const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value); + const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value) return ( @@ -80,19 +78,17 @@ function Surname() { } function Age() { - const { form, error, write } = useBasicFormContext() + const { form, error, write } = useFormbitContext() - const [handleOnSubmit] = useHandleOnSubmit() + const { handleOnSubmit } = useHandleOnSubmit() - const handleOnChangeAge = (value?: number | null) => write('age', value); + const handleOnChangeAge = (value?: number | null) => write('age', value) return ( () - const [handleOnSubmit, isSubmitDisabled, isLoading] = useHandleOnSubmit() + const { handleOnSubmit, isSubmitDisabled, args: { isLoading } } = useHandleOnSubmit() return ( <> @@ -122,4 +118,4 @@ function Actions() { ) -} \ No newline at end of file +} diff --git a/example/src/forms/basic-form-hook/schema.ts b/example/src/forms/b-basic-form-context/schema.ts similarity index 60% rename from example/src/forms/basic-form-hook/schema.ts rename to example/src/forms/b-basic-form-context/schema.ts index 66bf878..528c61a 100644 --- a/example/src/forms/basic-form-hook/schema.ts +++ b/example/src/forms/b-basic-form-context/schema.ts @@ -3,6 +3,7 @@ import * as yup from 'yup' export const schema = yup.object().shape({ name: yup.string().min(2).required(), surname: yup.string().min(2).required(), -}); + age: yup.number().min(18).max(200).required() +}) -export type FormData = yup.InferType \ No newline at end of file +export type FormData = yup.InferType diff --git a/example/src/forms/b-basic-form-context/use-handle-on-submit-types.ts b/example/src/forms/b-basic-form-context/use-handle-on-submit-types.ts new file mode 100644 index 0000000..4b9a251 --- /dev/null +++ b/example/src/forms/b-basic-form-context/use-handle-on-submit-types.ts @@ -0,0 +1,7 @@ +import type { UseFakePostResult } from '../fake-api-context/use-fake-post-types' + +export interface UseHandleOnSubmitResult { + handleOnSubmit: () => void + isSubmitDisabled: boolean + args: Omit +} diff --git a/example/src/forms/b-basic-form-context/use-handle-on-submit.tsx b/example/src/forms/b-basic-form-context/use-handle-on-submit.tsx new file mode 100644 index 0000000..0702172 --- /dev/null +++ b/example/src/forms/b-basic-form-context/use-handle-on-submit.tsx @@ -0,0 +1,29 @@ +import { useFormbitContext } from 'formbit' +import { success } from '../../helpers/message' +import { useFakeApiContext } from '../fake-api-context' +import type { UseHandleOnSubmitResult } from './use-handle-on-submit-types' +import type { FormData } from './schema' + +export const useHandleOnSubmit = (): UseHandleOnSubmitResult => { + const { submitForm, isFormInvalid, resetForm, isDirty } = useFormbitContext() + + const { fakePost } = useFakeApiContext() + const { mutate, ...args } = fakePost + + const isSubmitDisabled = isFormInvalid() || !isDirty + + const handleOnSubmit = () => { + if (isSubmitDisabled) { + return + } + + submitForm(async ({ form }, _setError, clearIsDirty) => { + await mutate(form) + success(form) + resetForm() + clearIsDirty() + }) + } + + return { handleOnSubmit, isSubmitDisabled, args } +} diff --git a/example/src/forms/basic-form-context/schema.ts b/example/src/forms/basic-form-context/schema.ts deleted file mode 100644 index b7d42e2..0000000 --- a/example/src/forms/basic-form-context/schema.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as yup from 'yup' - -export const schema = yup.object().shape({ - name: yup.string().min(2).required(), - surname: yup.string().min(2).required(), - age: yup.number().min(18).required() -}); - -export type FormData = yup.InferType \ No newline at end of file diff --git a/example/src/forms/addable-fields/index.tsx b/example/src/forms/c-addable-fields/index.tsx similarity index 77% rename from example/src/forms/addable-fields/index.tsx rename to example/src/forms/c-addable-fields/index.tsx index aa63f78..be84464 100644 --- a/example/src/forms/addable-fields/index.tsx +++ b/example/src/forms/c-addable-fields/index.tsx @@ -1,31 +1,28 @@ -import { faPlus, faXmark } from '@fortawesome/free-solid-svg-icons'; -import { FormbitContextProvider, useFormbitContext } from 'formbit'; +import { faPlus, faXmark } from '@fortawesome/free-solid-svg-icons' +import { FormbitContextProvider, useFormbitContext } from 'formbit' import { Button, FontAwesomeIcon, FormField, FormMultiple, Input, SectionTitle -} from "@radicalbit/radicalbit-design-system"; -import { InputRef } from 'rc-input'; -import { ChangeEvent, ChangeEventHandler, useRef, useState } from 'react'; -import { useAutoFocus } from '../../helpers/use-autofocus'; -import { useHandleOnSubmit } from '../context/use-handle-on-submit'; -import { FormData, schema } from './schema'; - -const useAddableFieldsForm = () => useFormbitContext(); +} from '@radicalbit/radicalbit-design-system' +import { InputRef } from 'rc-input' +import { ChangeEvent, ChangeEventHandler, useRef, useState } from 'react' +import { useAutoFocus } from '../../helpers/use-autofocus' +import { useHandleOnSubmit } from './use-handle-on-submit' +import { FormData, schema } from './schema' export function AddableFieldsForm() { return ( - ); + ) } function BasicFormInner() { - const { form } = useAddableFieldsForm() - - const friends = form?.friends + const { form } = useFormbitContext() + const friends = form?.friends ?? [] return (
@@ -35,24 +32,22 @@ function BasicFormInner() { -
- {friends?.map((_, i) => )} + {friends.map((_, i) => )}
-
- ); + ) } function Name() { - const { form, error, write } = useAddableFieldsForm(); + const { form, error, write } = useFormbitContext() - const [handleOnSubmit] = useHandleOnSubmit(); + const { handleOnSubmit } = useHandleOnSubmit() - const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value); + const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value) const ref = useAutoFocus() @@ -67,14 +62,14 @@ function Name() { ref={ref} />
- ); + ) } function Surname() { - const { form, error, write } = useAddableFieldsForm(); - const [handleOnSubmit] = useHandleOnSubmit(); + const { form, error, write } = useFormbitContext() + const { handleOnSubmit } = useHandleOnSubmit() - const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value); + const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value) return ( @@ -92,14 +87,14 @@ function Surname() { function FriendInput() { const inputNameRef = useRef(null) - const { write, form, error } = useAddableFieldsForm(); + const { write, form, error } = useFormbitContext() const friends = form?.friends ?? [] const [name, setName] = useState() const [surname, setSurname] = useState() - const handleChangeName: ChangeEventHandler = ({ target: { value } }) => setName(value); - const handleChangeSurname: ChangeEventHandler = ({ target: { value } }) => setSurname(value); + const handleChangeName: ChangeEventHandler = ({ target: { value } }) => setName(value) + const handleChangeSurname: ChangeEventHandler = ({ target: { value } }) => setSurname(value) const handleAddFriend = () => { write('friends', [...friends, { name, surname }]) @@ -108,7 +103,6 @@ function FriendInput() { inputNameRef.current?.focus() } - return ( } @@ -135,25 +129,24 @@ function FriendInput() { /> - ); + ) } function Friend({ index }: { index: number }) { - const { error, write, validate, form } = useAddableFieldsForm() + const { error, write, validate, form } = useFormbitContext() const name = form.friends?.[index].name const surname = form.friends?.[index].surname - - const handleOnBlurFriendName = () => validate(`headers[${index}].name`); - const handleOnBlurFriendSurname = () => validate(`headers[${index}].surname`); + const handleOnBlurFriendName = () => validate(`headers[${index}].name`) + const handleOnBlurFriendSurname = () => validate(`headers[${index}].surname`) const handleOnChangeFriendName: ChangeEventHandler = - ({ target }) => write(`friends[${index}].key`, target.value); + ({ target }) => write(`friends[${index}].key`, target.value) const handleOnChangeFriendSurname: ChangeEventHandler = - ({ target }) => write(`friends[${index}].key`, target.value); + ({ target }) => write(`friends[${index}].key`, target.value) - const handleOnRemoveFriend = () => write('friends', form.friends?.filter((_, i) => index !== i)); + const handleOnRemoveFriend = () => write('friends', form.friends?.filter((_, i) => index !== i)) const errorMessage = error(`headers[${index}].name`) || error(`headers[${index}].surname`) @@ -179,11 +172,10 @@ function Friend({ index }: { index: number }) { ) } - function Actions() { - const { resetForm } = useAddableFieldsForm(); + const { resetForm } = useFormbitContext() - const [handleOnSubmit, isSubmitDisabled, isLoading] = useHandleOnSubmit() + const { handleOnSubmit, isSubmitDisabled, args: { isLoading } } = useHandleOnSubmit() return <> - } diff --git a/example/src/forms/addable-fields/schema.ts b/example/src/forms/c-addable-fields/schema.ts similarity index 72% rename from example/src/forms/addable-fields/schema.ts rename to example/src/forms/c-addable-fields/schema.ts index 1a1e465..62fde23 100644 --- a/example/src/forms/addable-fields/schema.ts +++ b/example/src/forms/c-addable-fields/schema.ts @@ -6,11 +6,9 @@ export const schema = yup.object().shape({ friends: yup.array().of( yup.object().shape({ name: yup.string().min(2).required(), - surname: yup.string().min(2).required(), + surname: yup.string().min(2).required() }) ).required() -}); - - -export type FormData = yup.InferType +}) +export type FormData = yup.InferType diff --git a/example/src/forms/c-addable-fields/use-handle-on-submit-types.ts b/example/src/forms/c-addable-fields/use-handle-on-submit-types.ts new file mode 100644 index 0000000..4b9a251 --- /dev/null +++ b/example/src/forms/c-addable-fields/use-handle-on-submit-types.ts @@ -0,0 +1,7 @@ +import type { UseFakePostResult } from '../fake-api-context/use-fake-post-types' + +export interface UseHandleOnSubmitResult { + handleOnSubmit: () => void + isSubmitDisabled: boolean + args: Omit +} diff --git a/example/src/forms/c-addable-fields/use-handle-on-submit.tsx b/example/src/forms/c-addable-fields/use-handle-on-submit.tsx new file mode 100644 index 0000000..0702172 --- /dev/null +++ b/example/src/forms/c-addable-fields/use-handle-on-submit.tsx @@ -0,0 +1,29 @@ +import { useFormbitContext } from 'formbit' +import { success } from '../../helpers/message' +import { useFakeApiContext } from '../fake-api-context' +import type { UseHandleOnSubmitResult } from './use-handle-on-submit-types' +import type { FormData } from './schema' + +export const useHandleOnSubmit = (): UseHandleOnSubmitResult => { + const { submitForm, isFormInvalid, resetForm, isDirty } = useFormbitContext() + + const { fakePost } = useFakeApiContext() + const { mutate, ...args } = fakePost + + const isSubmitDisabled = isFormInvalid() || !isDirty + + const handleOnSubmit = () => { + if (isSubmitDisabled) { + return + } + + submitForm(async ({ form }, _setError, clearIsDirty) => { + await mutate(form) + success(form) + resetForm() + clearIsDirty() + }) + } + + return { handleOnSubmit, isSubmitDisabled, args } +} diff --git a/example/src/forms/context/api-context.tsx b/example/src/forms/context/api-context.tsx deleted file mode 100644 index 46fe43f..0000000 --- a/example/src/forms/context/api-context.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { PropsWithChildren, useContext, createContext } from "react" -import { useFakePost } from "./use-fake-post" -import { useGetFakeUser } from "./use-get-fake-user" - -type Context = { - fakePost: ReturnType - fakeUser: ReturnType -} | undefined - -const FakeApiContext = createContext(undefined) - -export function FakeApiProvider({ children }: PropsWithChildren) { - const fakePost = useFakePost() - const fakeUser = useGetFakeUser() - - return {children} -} - - -export const useGetUser = () => { - const context = useContext(FakeApiContext) - - if (!context) { - throw Error('FakeApiContext not found') - } - - return context.fakeUser -} - -export const usePost = () => { - const context = useContext(FakeApiContext) - - if (!context) { - throw Error('FakeApiContext not found') - } - - return context.fakePost -} \ No newline at end of file diff --git a/example/src/forms/context/use-fake-post.ts b/example/src/forms/context/use-fake-post.ts deleted file mode 100644 index 7a6bfcc..0000000 --- a/example/src/forms/context/use-fake-post.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { useState } from "react"; - -const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); - -export const useFakePost = () => { - const [isLoading, setIsLoading] = useState(false) - - const fakePost = async (body?: unknown) => { - setIsLoading(true) - - await sleep(1000) - - setIsLoading(false) - - return body - } - - return [fakePost, isLoading] as const -} - - diff --git a/example/src/forms/context/use-get-fake-user.ts b/example/src/forms/context/use-get-fake-user.ts deleted file mode 100644 index 662e6f0..0000000 --- a/example/src/forms/context/use-get-fake-user.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { useEffect, useState } from "react" - -const fakeUser = { - name: 'Ada', - surname: 'Lovelace', - email: 'ada@example.com' -} - -type User = Partial - -export const useGetFakeUser = () => { - const [user, setUser] = useState() - const [isLoading, setIsLoading] = useState(true) - - - useEffect(() => { - const fakeGet = () => { - setUser(fakeUser) - setIsLoading(false) - } - - const timeout = setTimeout(() => { - fakeGet() - }, 2000) - - return () => clearTimeout(timeout) - - }, []) - - return [user, isLoading] as const -} \ No newline at end of file diff --git a/example/src/forms/context/use-handle-on-submit.tsx b/example/src/forms/context/use-handle-on-submit.tsx deleted file mode 100644 index b769a3d..0000000 --- a/example/src/forms/context/use-handle-on-submit.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { useFormbitContext, type FormbitValues } from "formbit"; -import { success } from "../../helpers/message"; -import { usePost } from "./api-context"; - -type Context = FormbitValues & { - __metadata?: { - resetSteps?: () => void - } -} - -export const useHandleOnSubmit = () => { - const { form: { __metadata }, submitForm, isFormInvalid, resetForm, isDirty } = useFormbitContext(); - - const [triggerMutation, isLoading] = usePost(); - - const resetSteps = __metadata?.resetSteps; - - const isSubmitDisabled = isFormInvalid() || !isDirty; - - const handleOnSubmit = () => { - if (isSubmitDisabled || isLoading) return; - - submitForm(async ({ form }, _setError, clearIsDirty) => { - await triggerMutation(form); - success(form); - resetForm(); - clearIsDirty(); - resetSteps?.(); - }); - }; - - return [handleOnSubmit, isSubmitDisabled, isLoading] as const; -} \ No newline at end of file diff --git a/example/src/forms/d-edit-like/index.tsx b/example/src/forms/d-edit-like/index.tsx new file mode 100644 index 0000000..e83a558 --- /dev/null +++ b/example/src/forms/d-edit-like/index.tsx @@ -0,0 +1,180 @@ +import { + Button, + FormField, + Input, + SectionTitle, + Void +} from '@radicalbit/radicalbit-design-system' +import { FormbitContextProvider, useFormbitContext } from 'formbit' +import { InputRef } from 'rc-input' +import { ChangeEvent } from 'react' +import { useAutoFocus } from '../../helpers/use-autofocus' +import { useFakeApiContext } from '../fake-api-context' +import { FormData, schema } from './schema' +import { useHandleOnSubmit } from './use-handle-on-submit' +import { useInitializeForm } from './use-initialize-form' + +export function EditLikeForm() { + return ( + + + + ) +} + +function EditLikeInner() { + const { fakeUser } = useFakeApiContext() + const { isLoading, isSuccess, isError } = fakeUser + + if (isLoading) { + return + } + + if (isError) { + return + } + + if (isSuccess) { + return + } + + return null +} + +function IsLoading() { + return ( +
+ + + + + + + + + + + + + +
+ ) +} + +function IsError() { + const { fakeUser } = useFakeApiContext() + const { refetch, isLoading } = fakeUser + + return ( +
+ + Something went wrong. Failed +
+ to load user data + } + actions={ + + } + /> +
+ ) +} + +function IsSuccess() { + useInitializeForm() + + return ( +
+ + + + + + + + + +
+ ) +} + +function Name() { + const ref = useAutoFocus() + const { form, error, write } = useFormbitContext() + + const { handleOnSubmit } = useHandleOnSubmit() + + const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value) + + return ( + + + + ) +} + +function Surname() { + const { form, error, write } = useFormbitContext() + + const { handleOnSubmit } = useHandleOnSubmit() + + const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value) + + return ( + + + + ) +} + +function Email() { + const { form, error, write } = useFormbitContext() + + const { handleOnSubmit } = useHandleOnSubmit() + + const handleChangeEmail = (e: ChangeEvent) => write('email', e.target.value) + + return ( + + + + ) +} + +function Actions() { + const { handleOnSubmit, isSubmitDisabled, args: { isLoading } } = useHandleOnSubmit() + + return ( + + ) +} diff --git a/example/src/forms/edit-like/schema.ts b/example/src/forms/d-edit-like/schema.ts similarity index 78% rename from example/src/forms/edit-like/schema.ts rename to example/src/forms/d-edit-like/schema.ts index 6fd4700..1ae1fdc 100644 --- a/example/src/forms/edit-like/schema.ts +++ b/example/src/forms/d-edit-like/schema.ts @@ -4,6 +4,6 @@ export const schema = yup.object().shape({ name: yup.string().min(2).required(), surname: yup.string().min(2).required(), email: yup.string().email().required() -}); +}) -export type FormData = yup.InferType \ No newline at end of file +export type FormData = yup.InferType diff --git a/example/src/forms/d-edit-like/use-handle-on-submit-types.ts b/example/src/forms/d-edit-like/use-handle-on-submit-types.ts new file mode 100644 index 0000000..4b9a251 --- /dev/null +++ b/example/src/forms/d-edit-like/use-handle-on-submit-types.ts @@ -0,0 +1,7 @@ +import type { UseFakePostResult } from '../fake-api-context/use-fake-post-types' + +export interface UseHandleOnSubmitResult { + handleOnSubmit: () => void + isSubmitDisabled: boolean + args: Omit +} diff --git a/example/src/forms/d-edit-like/use-handle-on-submit.tsx b/example/src/forms/d-edit-like/use-handle-on-submit.tsx new file mode 100644 index 0000000..e02ac66 --- /dev/null +++ b/example/src/forms/d-edit-like/use-handle-on-submit.tsx @@ -0,0 +1,29 @@ +import { useFormbitContext } from 'formbit' +import { success } from '../../helpers/message' +import { useFakeApiContext } from '../fake-api-context' +import { FormData } from './schema' +import type { UseHandleOnSubmitResult } from './use-handle-on-submit-types' + +export const useHandleOnSubmit = (): UseHandleOnSubmitResult => { + const { submitForm, isFormInvalid, resetForm, isDirty } = useFormbitContext() + + const { fakePost } = useFakeApiContext() + const { mutate, ...args } = fakePost + + const isSubmitDisabled = isFormInvalid() || !isDirty + + const handleOnSubmit = () => { + if (isSubmitDisabled) { + return + } + + submitForm(async ({ form }, _setError, clearIsDirty) => { + await mutate(form) + success(form) + resetForm() + clearIsDirty() + }) + } + + return { handleOnSubmit, isSubmitDisabled, args } +} diff --git a/example/src/forms/d-edit-like/use-initialize-form.ts b/example/src/forms/d-edit-like/use-initialize-form.ts new file mode 100644 index 0000000..4badf58 --- /dev/null +++ b/example/src/forms/d-edit-like/use-initialize-form.ts @@ -0,0 +1,17 @@ +import { useFormbitContext } from 'formbit' +import { useEffect } from 'react' +import { useFakeApiContext } from '../fake-api-context' +import { FormData } from './schema' + +export const useInitializeForm = () => { + const { initialize } = useFormbitContext() + + const { fakeUser } = useFakeApiContext() + const { data: user } = fakeUser + + useEffect(() => { + if (user) { + initialize({ ...user }) + } + }, [initialize, user]) +} diff --git a/example/src/forms/multiple-steps/index.tsx b/example/src/forms/e-multiple-steps/index.tsx similarity index 76% rename from example/src/forms/multiple-steps/index.tsx rename to example/src/forms/e-multiple-steps/index.tsx index cb42556..321b8a3 100644 --- a/example/src/forms/multiple-steps/index.tsx +++ b/example/src/forms/e-multiple-steps/index.tsx @@ -1,10 +1,10 @@ -import { FormbitContextProvider } from 'formbit'; -import { Steps } from "@radicalbit/radicalbit-design-system"; -import { useState } from 'react'; -import { schema } from './schema'; -import { StepOne } from './step-one'; -import { StepThree } from './step-three'; -import { StepTwo } from './step-two'; +import { FormbitContextProvider } from 'formbit' +import { Steps } from '@radicalbit/radicalbit-design-system' +import { useState } from 'react' +import { schema } from './schema' +import { StepOne } from './step-one' +import { StepThree } from './step-three' +import { StepTwo } from './step-two' const items = [{ title: 'Step One', @@ -53,8 +53,5 @@ export function MultipleStepsForm() { - ); + ) } - - - diff --git a/example/src/forms/multiple-steps/schema.ts b/example/src/forms/e-multiple-steps/schema.ts similarity index 77% rename from example/src/forms/multiple-steps/schema.ts rename to example/src/forms/e-multiple-steps/schema.ts index d69c422..f2cf9fd 100644 --- a/example/src/forms/multiple-steps/schema.ts +++ b/example/src/forms/e-multiple-steps/schema.ts @@ -3,10 +3,10 @@ import * as yup from 'yup' export const schema = yup.object().shape({ name: yup.string().min(2).required(), surname: yup.string().min(2).required(), - age: yup.number().min(18).required(), - email: yup.string().email().required(), - -}); + age: yup.number().min(18).max(200).required(), + email: yup.string().email().required() + +}) export type FormData = yup.InferType & { __metadata: { @@ -15,4 +15,4 @@ export type FormData = yup.InferType & { prevStep?: () => void, resetSteps?: () => void } -} \ No newline at end of file +} diff --git a/example/src/forms/multiple-steps/step-one.tsx b/example/src/forms/e-multiple-steps/step-one.tsx similarity index 50% rename from example/src/forms/multiple-steps/step-one.tsx rename to example/src/forms/e-multiple-steps/step-one.tsx index 596f3cd..9f6b59f 100644 --- a/example/src/forms/multiple-steps/step-one.tsx +++ b/example/src/forms/e-multiple-steps/step-one.tsx @@ -1,15 +1,13 @@ -import { useFormbitContext } from "formbit"; -import { Button, FormField, Input, SectionTitle } from "@radicalbit/radicalbit-design-system"; -import { InputRef } from 'rc-input'; -import { ChangeEvent } from "react"; -import { useAutoFocus } from "../../helpers/use-autofocus"; -import { FormData } from "./schema"; -import { useHandleNextStep } from "./use-handle-next-step"; - -const useMultipleStepsForm = () => useFormbitContext(); +import { useFormbitContext } from 'formbit' +import { Button, FormField, Input, SectionTitle } from '@radicalbit/radicalbit-design-system' +import { InputRef } from 'rc-input' +import { ChangeEvent } from 'react' +import { useAutoFocus } from '../../helpers/use-autofocus' +import { FormData } from './schema' +import { useHandleNextStep } from './use-handle-next-step' export function StepOne() { - return <> + return <>
@@ -23,15 +21,15 @@ export function StepOne() { } function Name() { - const { form, error, write } = useMultipleStepsForm(); + const { form, error, write } = useFormbitContext() - const [handleOnNext] = useHandleNextStep(['name', 'surname']) + const [handleOnNext] = useHandleNextStep(['name', 'surname']) - const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value); + const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value) - const ref = useAutoFocus() + const ref = useAutoFocus() - return ( + return ( - ); + ) } function Surname() { - const { form, error, write } = useMultipleStepsForm(); + const { form, error, write } = useFormbitContext() - const [handleOnNext] = useHandleNextStep(['name', 'surname']) + const [handleOnNext] = useHandleNextStep(['name', 'surname']) - const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value); + const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value) - return ( + return ( - ) + ) } function Actions() { - const [handleOnNext, isStepInvalid] = useHandleNextStep(['name', 'surname']) + const [handleOnNext, isStepInvalid] = useHandleNextStep(['name', 'surname']) - return ( + return ( - ) + ) } - diff --git a/example/src/forms/e-multiple-steps/step-three.tsx b/example/src/forms/e-multiple-steps/step-three.tsx new file mode 100644 index 0000000..ac256ce --- /dev/null +++ b/example/src/forms/e-multiple-steps/step-three.tsx @@ -0,0 +1,59 @@ +import { useFormbitContext } from 'formbit' +import { Button, FormField, Input, SectionTitle } from '@radicalbit/radicalbit-design-system' +import { InputRef } from 'rc-input' +import { ChangeEvent } from 'react' +import { useAutoFocus } from '../../helpers/use-autofocus' +import { useHandleOnSubmit } from './use-handle-on-submit' +import { FormData } from './schema' + +export function StepThree() { + return ( +
+ + + + + +
) +} + +function Email() { + const { form, error, write } = useFormbitContext() + + const { handleOnSubmit } = useHandleOnSubmit() + + const handleOnChangeEmail = (e: ChangeEvent) => write('email', e.target.value) + + const ref = useAutoFocus() + + return ( + + + + ) +} + +function Actions() { + const { form: { __metadata } } = useFormbitContext() + + const handleReset = __metadata?.resetSteps + + const { handleOnSubmit, isSubmitDisabled, args: { isLoading } } = useHandleOnSubmit() + + return <> + + + + +} diff --git a/example/src/forms/multiple-steps/step-two.tsx b/example/src/forms/e-multiple-steps/step-two.tsx similarity index 51% rename from example/src/forms/multiple-steps/step-two.tsx rename to example/src/forms/e-multiple-steps/step-two.tsx index c337807..9b40589 100644 --- a/example/src/forms/multiple-steps/step-two.tsx +++ b/example/src/forms/e-multiple-steps/step-two.tsx @@ -1,14 +1,11 @@ -import { useFormbitContext } from "formbit"; -import { Button, FormField, InputNumber, SectionTitle } from "@radicalbit/radicalbit-design-system"; -import { useAutoFocus } from "../../helpers/use-autofocus"; -import { FormData } from "./schema"; -import { useHandleNextStep } from "./use-handle-next-step"; - - -const useMultipleStepsForm = () => useFormbitContext(); +import { useFormbitContext } from 'formbit' +import { Button, FormField, InputNumber, SectionTitle } from '@radicalbit/radicalbit-design-system' +import { useAutoFocus } from '../../helpers/use-autofocus' +import { FormData } from './schema' +import { useHandleNextStep } from './use-handle-next-step' export function StepTwo() { - return <> + return <>
@@ -20,21 +17,19 @@ export function StepTwo() { } function Age() { - const { form, error, write } = useMultipleStepsForm() + const { form, error, write } = useFormbitContext() - const [handleOnNext] = useHandleNextStep(['age']) + const [handleOnNext] = useHandleNextStep(['age']) - const handleOnChangeInputNumber = (value?: number | null) => write('age', value); + const handleOnChangeInputNumber = (value?: number | null) => write('age', value) - const ref = useAutoFocus() + const ref = useAutoFocus() - return ( + return ( () - const [handleOnNext, isStepInvalid] = useHandleNextStep(['age']); + const [handleOnNext, isStepInvalid] = useHandleNextStep(['age']) - const prevStep = __metadata?.prevStep; + const prevStep = __metadata?.prevStep - return ( + return ( <> - ) + ) } diff --git a/example/src/forms/e-multiple-steps/use-handle-next-step.ts b/example/src/forms/e-multiple-steps/use-handle-next-step.ts new file mode 100644 index 0000000..cc6abaa --- /dev/null +++ b/example/src/forms/e-multiple-steps/use-handle-next-step.ts @@ -0,0 +1,23 @@ +import { useFormbitContext, type FormbitValues } from 'formbit' +import { useCallback } from 'react' + +type Context = FormbitValues & { + __metadata: { + nextStep?: () => void + } +} + +export const useHandleNextStep = (fields: string[]) => { + const { form: { __metadata }, validateAll, error } = useFormbitContext() + + const nextStep = __metadata?.nextStep + + const handleOnNext = useCallback( + () => validateAll(fields, { successCallback: nextStep }), + [fields, nextStep, validateAll] + ) + + const isStepInvalid = fields?.some(field => error(field)) + + return [handleOnNext, isStepInvalid] as const +} diff --git a/example/src/forms/e-multiple-steps/use-handle-on-submit-types.ts b/example/src/forms/e-multiple-steps/use-handle-on-submit-types.ts new file mode 100644 index 0000000..946a51e --- /dev/null +++ b/example/src/forms/e-multiple-steps/use-handle-on-submit-types.ts @@ -0,0 +1,14 @@ +import type { FormbitValues } from 'formbit' +import type { UseFakePostResult } from '../fake-api-context/use-fake-post-types' + +export interface UseHandleOnSubmitResult { + handleOnSubmit: () => void + isSubmitDisabled: boolean + args: Omit +} + +export type Context = FormbitValues & { + __metadata?: { + resetSteps?: () => void + } +} diff --git a/example/src/forms/e-multiple-steps/use-handle-on-submit.tsx b/example/src/forms/e-multiple-steps/use-handle-on-submit.tsx new file mode 100644 index 0000000..b1e0c5e --- /dev/null +++ b/example/src/forms/e-multiple-steps/use-handle-on-submit.tsx @@ -0,0 +1,30 @@ +import { useFormbitContext } from 'formbit' +import { success } from '../../helpers/message' +import { useFakeApiContext } from '../fake-api-context' +import type { Context, UseHandleOnSubmitResult } from './use-handle-on-submit-types' + +export const useHandleOnSubmit = (): UseHandleOnSubmitResult => { + const { form: { __metadata }, submitForm, isFormInvalid, resetForm, isDirty } = useFormbitContext() + const resetSteps = __metadata?.resetSteps + + const { fakePost } = useFakeApiContext() + const { mutate, ...args } = fakePost + + const isSubmitDisabled = isFormInvalid() || !isDirty + + const handleOnSubmit = () => { + if (isSubmitDisabled) { + return + } + + submitForm(async ({ form }, _setError, clearIsDirty) => { + await mutate(form) + success(form) + resetForm() + clearIsDirty() + resetSteps?.() + }) + } + + return { handleOnSubmit, isSubmitDisabled, args } +} diff --git a/example/src/forms/edit-like/index.tsx b/example/src/forms/edit-like/index.tsx deleted file mode 100644 index dc2ca56..0000000 --- a/example/src/forms/edit-like/index.tsx +++ /dev/null @@ -1,137 +0,0 @@ -import { FormbitContextProvider, useFormbitContext } from 'formbit'; -import { - Button, - FormField, - Input, - SectionTitle -} from "@radicalbit/radicalbit-design-system"; -import { InputRef } from 'rc-input'; -import { ChangeEvent, useEffect } from 'react'; -import { FakeApiProvider, useGetUser } from '../context/api-context'; -import { useAutoFocus } from '../../helpers/use-autofocus'; -import { useHandleOnSubmit } from '../context/use-handle-on-submit'; -import { FormData, schema } from './schema'; - -const useEditLikeContext = () => useFormbitContext(); - -export function EditLikeForm() { - return ( - - - - - - ); -} - -function EditLikeInner() { - const [user] = useGetUser() - const { initialize } = useEditLikeContext() - - useEffect(() => { - if (user) { - initialize({ ...user }) - } - }, [initialize, user]) - - return ( -
- - - - - - - - - -
- ); -} - -function Name() { - const [, isLoading] = useGetUser() - - const { form, error, write } = useEditLikeContext(); - - const [handleOnSubmit] = useHandleOnSubmit(); - - const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value); - - const ref = useAutoFocus(isLoading) - - return ( - - - - ); -} - -function Surname() { - const [, isLoading] = useGetUser() - const { form, error, write } = useEditLikeContext(); - - const [handleOnSubmit] = useHandleOnSubmit(); - - const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value); - - return ( - - - - ) -} - -function Email() { - const [, isLoading] = useGetUser() - const { form, error, write } = useEditLikeContext() - - const [handleOnSubmit] = useHandleOnSubmit(); - - const handleChangeEmail = (e: ChangeEvent) => write('email', e.target.value); - - return ( - - - - ) -} -function Actions() { - const [, isLoadingUser] = useGetUser() - - const [handleOnSubmit, isSubmitDisabled, isLoading] = useHandleOnSubmit() - - return ( - - ) - -} diff --git a/example/src/forms/f-remove-all/index.tsx b/example/src/forms/f-remove-all/index.tsx new file mode 100644 index 0000000..8f8c31a --- /dev/null +++ b/example/src/forms/f-remove-all/index.tsx @@ -0,0 +1,199 @@ +import { + Button, + FormField, Input, InputNumber, + SectionTitle, + Void +} from '@radicalbit/radicalbit-design-system' +import { FormbitContextProvider, useFormbitContext } from 'formbit' +import { InputRef } from 'rc-input' +import { ChangeEvent } from 'react' +import { useAutoFocus } from '../../helpers/use-autofocus' +import { FormData, schema } from './schema' +import { useHandleOnSubmit } from './use-handle-on-submit' +import { useInitializeForm } from './use-initialize-form' +import { useFakeApiContext } from '../fake-api-context' + +export function WriteRemoveAllForm() { + return ( + + + + ) +} + +function WriteRemoveAllInner() { + const { fakeUser } = useFakeApiContext() + const { isLoading, isSuccess, isError } = fakeUser + + if (isLoading) { + return + } + + if (isError) { + return + } + + if (isSuccess) { + return + } + + return null +} + +function IsLoading() { + return ( +
+ + + + + + + + + + + + + +
+ ) +} + +function IsError() { + const { fakeUser } = useFakeApiContext() + const { refetch, isLoading } = fakeUser + + return ( +
+ + Something went wrong. Failed +
+ to load user data + } + actions={ + + } + /> +
+ ) +} + +function IsSuccess() { + useInitializeForm() + return ( +
+ + + + + + + + + +
+ ) +} + +function Name() { + const { form, error, write } = useFormbitContext() + + const { handleOnSubmit } = useHandleOnSubmit() + + const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value) + + const ref = useAutoFocus() + + return ( + + + + ) +} + +function Surname() { + const { form, error, write } = useFormbitContext() + + const { handleOnSubmit } = useHandleOnSubmit() + + const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value) + + return ( + + + + ) +} + +function Age() { + const { form, error, write } = useFormbitContext() + + const { handleOnSubmit } = useHandleOnSubmit() + + const handleOnChangeAge = (value?: number | null) => write('age', value) + + return ( + + + ) +} + +function Actions() { + const { resetForm, removeAll, writeAll } = useFormbitContext() + + const { handleOnSubmit, isSubmitDisabled, args: { isLoading } } = useHandleOnSubmit() + + const handleRemoveAll = () => removeAll(['name', 'surname']) + + const handlWriteAll = () => writeAll([['name', 'Johnny'], ['surname', 'Doey']]) + + return ( + <> + + + + + + + + + ) +} diff --git a/example/src/forms/remove-all/schema.ts b/example/src/forms/f-remove-all/schema.ts similarity index 60% rename from example/src/forms/remove-all/schema.ts rename to example/src/forms/f-remove-all/schema.ts index b7d42e2..528c61a 100644 --- a/example/src/forms/remove-all/schema.ts +++ b/example/src/forms/f-remove-all/schema.ts @@ -3,7 +3,7 @@ import * as yup from 'yup' export const schema = yup.object().shape({ name: yup.string().min(2).required(), surname: yup.string().min(2).required(), - age: yup.number().min(18).required() -}); + age: yup.number().min(18).max(200).required() +}) -export type FormData = yup.InferType \ No newline at end of file +export type FormData = yup.InferType diff --git a/example/src/forms/f-remove-all/use-handle-on-submit-types.ts b/example/src/forms/f-remove-all/use-handle-on-submit-types.ts new file mode 100644 index 0000000..4b9a251 --- /dev/null +++ b/example/src/forms/f-remove-all/use-handle-on-submit-types.ts @@ -0,0 +1,7 @@ +import type { UseFakePostResult } from '../fake-api-context/use-fake-post-types' + +export interface UseHandleOnSubmitResult { + handleOnSubmit: () => void + isSubmitDisabled: boolean + args: Omit +} diff --git a/example/src/forms/f-remove-all/use-handle-on-submit.tsx b/example/src/forms/f-remove-all/use-handle-on-submit.tsx new file mode 100644 index 0000000..0702172 --- /dev/null +++ b/example/src/forms/f-remove-all/use-handle-on-submit.tsx @@ -0,0 +1,29 @@ +import { useFormbitContext } from 'formbit' +import { success } from '../../helpers/message' +import { useFakeApiContext } from '../fake-api-context' +import type { UseHandleOnSubmitResult } from './use-handle-on-submit-types' +import type { FormData } from './schema' + +export const useHandleOnSubmit = (): UseHandleOnSubmitResult => { + const { submitForm, isFormInvalid, resetForm, isDirty } = useFormbitContext() + + const { fakePost } = useFakeApiContext() + const { mutate, ...args } = fakePost + + const isSubmitDisabled = isFormInvalid() || !isDirty + + const handleOnSubmit = () => { + if (isSubmitDisabled) { + return + } + + submitForm(async ({ form }, _setError, clearIsDirty) => { + await mutate(form) + success(form) + resetForm() + clearIsDirty() + }) + } + + return { handleOnSubmit, isSubmitDisabled, args } +} diff --git a/example/src/forms/f-remove-all/use-initialize-form.ts b/example/src/forms/f-remove-all/use-initialize-form.ts new file mode 100644 index 0000000..4badf58 --- /dev/null +++ b/example/src/forms/f-remove-all/use-initialize-form.ts @@ -0,0 +1,17 @@ +import { useFormbitContext } from 'formbit' +import { useEffect } from 'react' +import { useFakeApiContext } from '../fake-api-context' +import { FormData } from './schema' + +export const useInitializeForm = () => { + const { initialize } = useFormbitContext() + + const { fakeUser } = useFakeApiContext() + const { data: user } = fakeUser + + useEffect(() => { + if (user) { + initialize({ ...user }) + } + }, [initialize, user]) +} diff --git a/example/src/forms/fake-api-context/index.tsx b/example/src/forms/fake-api-context/index.tsx new file mode 100644 index 0000000..f748bd1 --- /dev/null +++ b/example/src/forms/fake-api-context/index.tsx @@ -0,0 +1,27 @@ +import { PropsWithChildren, useContext, createContext } from 'react' +import { useFakePost } from './use-fake-post' +import { useGetFakeUser } from './use-get-fake-user' + +type Context = { + fakePost: ReturnType + fakeUser: ReturnType +} | undefined + +const FakeApiContext = createContext(undefined) + +export function FakeApiProvider({ children }: PropsWithChildren) { + const fakePost = useFakePost() + const fakeUser = useGetFakeUser() + + return {children} +} + +export const useFakeApiContext = () => { + const context = useContext(FakeApiContext) + + if (!context) { + throw Error('FakeApiContext not found') + } + + return context +} diff --git a/example/src/forms/fake-api-context/use-fake-post-types.ts b/example/src/forms/fake-api-context/use-fake-post-types.ts new file mode 100644 index 0000000..f9719c6 --- /dev/null +++ b/example/src/forms/fake-api-context/use-fake-post-types.ts @@ -0,0 +1,7 @@ +export interface UseFakePostResult { + mutate: (body?: unknown) => Promise + isLoading: boolean + isError: boolean + isSuccess: boolean + error: Error | undefined +} diff --git a/example/src/forms/fake-api-context/use-fake-post.ts b/example/src/forms/fake-api-context/use-fake-post.ts new file mode 100644 index 0000000..9f8f6c5 --- /dev/null +++ b/example/src/forms/fake-api-context/use-fake-post.ts @@ -0,0 +1,31 @@ +import { useState } from 'react' +import type { UseFakePostResult } from './use-fake-post-types' + +const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)) + +export const useFakePost = (): UseFakePostResult => { + const [isLoading, setIsLoading] = useState(false) + const [isSuccess, setIsSuccess] = useState(false) + const [error, setError] = useState() + + const mutate = async (body?: unknown) => { + setIsLoading(true) + setIsSuccess(false) + setError(undefined) + + await sleep(1000) + + setIsLoading(false) + setIsSuccess(true) + + return body + } + + return { + mutate, + isLoading, + isError: !!error, + isSuccess, + error + } +} diff --git a/example/src/forms/fake-api-context/use-get-fake-user-types.ts b/example/src/forms/fake-api-context/use-get-fake-user-types.ts new file mode 100644 index 0000000..ae3027c --- /dev/null +++ b/example/src/forms/fake-api-context/use-get-fake-user-types.ts @@ -0,0 +1,14 @@ +export interface User { + name?: string + surname?: string + email?: string +} + +export interface UseGetFakeUserResult { + data: User | undefined + isLoading: boolean + isError: boolean + isSuccess: boolean + error: Error | undefined + refetch: () => void +} diff --git a/example/src/forms/fake-api-context/use-get-fake-user.ts b/example/src/forms/fake-api-context/use-get-fake-user.ts new file mode 100644 index 0000000..553a3ec --- /dev/null +++ b/example/src/forms/fake-api-context/use-get-fake-user.ts @@ -0,0 +1,52 @@ +import { useCallback, useEffect, useState } from 'react' +import type { User, UseGetFakeUserResult } from './use-get-fake-user-types' + +const fakeUser: User = { + name: 'Ada', + surname: 'Lovelace', + email: 'ada@example.com' +} + +export const useGetFakeUser = (): UseGetFakeUserResult => { + const [user, setUser] = useState() + const [isLoading, setIsLoading] = useState(false) + const [isSuccess, setIsSuccess] = useState(false) + const [error, setError] = useState() + const [fetchCount, setFetchCount] = useState(0) + + const refetch = useCallback(() => { + setFetchCount(prev => prev + 1) + }, []) + + useEffect(() => { + setIsLoading(true) + setError(undefined) + setIsSuccess(false) + + const fakeGet = () => { + if (Math.random() < 0.2) { + setError(new Error('Failed to fetch user')) + setUser(undefined) + } else { + setUser(fakeUser) + setIsSuccess(true) + } + setIsLoading(false) + } + + const timeout = setTimeout(() => { + fakeGet() + }, 2000) + + return () => clearTimeout(timeout) + }, [fetchCount]) + + return { + data: user, + isLoading, + isError: !!error, + isSuccess, + error, + refetch + } +} diff --git a/example/src/forms/multiple-steps/step-three.tsx b/example/src/forms/multiple-steps/step-three.tsx deleted file mode 100644 index be5068e..0000000 --- a/example/src/forms/multiple-steps/step-three.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import { useFormbitContext } from "formbit"; -import { Button, FormField, Input, SectionTitle } from "@radicalbit/radicalbit-design-system"; -import { InputRef } from 'rc-input'; -import { ChangeEvent } from "react"; -import { useAutoFocus } from "../../helpers/use-autofocus"; -import { useHandleOnSubmit } from "../context/use-handle-on-submit"; -import { FormData } from "./schema"; - -const useMultipleStepsForm = () => useFormbitContext(); - -export function StepThree() { - return <> -
- - - - - -
- -} - -function Email() { - const { form, error, write } = useMultipleStepsForm(); - - const [handleOnSubmit] = useHandleOnSubmit(); - - const handleOnChangeEmail = (e: ChangeEvent) => write('email', e.target.value); - - const ref = useAutoFocus() - - return ( - - - - ); -} - -function Actions() { - const { form: { __metadata } } = useMultipleStepsForm(); - - const handleReset = __metadata?.resetSteps; - - const [handleOnSubmit, isSubmitDisabled, isLoading] = useHandleOnSubmit(); - - return <> - - - - - -} \ No newline at end of file diff --git a/example/src/forms/multiple-steps/use-handle-next-step.ts b/example/src/forms/multiple-steps/use-handle-next-step.ts deleted file mode 100644 index 0cc5f3b..0000000 --- a/example/src/forms/multiple-steps/use-handle-next-step.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { useFormbitContext, type FormbitValues } from "formbit"; -import { useCallback } from "react"; - -type Context = FormbitValues & { - __metadata: { - nextStep?: () => void - } -} - -export const useHandleNextStep = (fields: string[]) => { - const { form: { __metadata }, validateAll, error } = useFormbitContext(); - - const nextStep = __metadata?.nextStep - - const handleOnNext = useCallback( - () => validateAll(fields, { successCallback: nextStep }), - [fields, nextStep, validateAll] - ); - - const isStepInvalid = fields?.some(field => error(field)) - - return [handleOnNext, isStepInvalid] as const -} \ No newline at end of file diff --git a/example/src/forms/remove-all/index.tsx b/example/src/forms/remove-all/index.tsx deleted file mode 100644 index dd34319..0000000 --- a/example/src/forms/remove-all/index.tsx +++ /dev/null @@ -1,138 +0,0 @@ -import { FormbitContextProvider, useFormbitContext } from 'formbit'; -import { - Button, - FormField, Input, InputNumber, - SectionTitle -} from "@radicalbit/radicalbit-design-system"; -import { InputRef } from 'rc-input'; -import { ChangeEvent } from 'react'; -import { useAutoFocus } from '../../helpers/use-autofocus'; -import { useHandleOnSubmit } from '../context/use-handle-on-submit'; -import { FormData, schema } from './schema'; - -const useBasicFormContext = () => useFormbitContext(); - -export function WriteRemoveAllForm() { - return ( - - - - ); -} - -function WriteRemoveAllInner() { - return ( -
- - - - - - - - - -
- ); -} - -function Name() { - const { form, error, write } = useBasicFormContext(); - - const [handleOnSubmit] = useHandleOnSubmit() - - const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value); - - const ref = useAutoFocus() - - return ( - - - - ); -} - -function Surname() { - const { form, error, write } = useBasicFormContext(); - - const [handleOnSubmit] = useHandleOnSubmit() - - const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value); - - return ( - - - - ) -} - -function Age() { - const { form, error, write } = useBasicFormContext() - - const [handleOnSubmit] = useHandleOnSubmit() - - const handleOnChangeAge = (value?: number | null) => write('age', value); - - return ( - - - ) -} - -function Actions() { - const { resetForm, removeAll, writeAll } = useBasicFormContext(); - - const [handleOnSubmit, isSubmitDisabled, isLoading] = useHandleOnSubmit() - - const handleRemoveAll = () => removeAll(['name', 'surname']) - - const handlWriteAll = () => writeAll([['name', 'Johnny'], ['surname','Doey']]) - - return ( - <> - - - - - - - - - - ) -} \ No newline at end of file diff --git a/example/src/helpers/message.ts b/example/src/helpers/message.ts index 61ed8d1..bc64320 100644 --- a/example/src/helpers/message.ts +++ b/example/src/helpers/message.ts @@ -1,6 +1,6 @@ -import { Message } from "@radicalbit/radicalbit-design-system" +import { Message } from '@radicalbit/radicalbit-design-system' export const success = (json: Record) => { - Message.success('Form Sent') - console.log('Submitted Form', json) -} \ No newline at end of file + Message.success('Form Sent') + console.log('Submitted Form', json) +} diff --git a/example/src/helpers/use-autofocus.ts b/example/src/helpers/use-autofocus.ts index 321feff..6022c19 100644 --- a/example/src/helpers/use-autofocus.ts +++ b/example/src/helpers/use-autofocus.ts @@ -1,12 +1,12 @@ -import { useEffect, useRef } from 'react'; +import { useEffect, useRef } from 'react' -type InputLike = Pick +type InputLike = Pick export const useAutoFocus = (shouldRefocus?: unknown) => { const ref = useRef(null) useEffect(() => { - ref.current?.focus(); - }, [ref, shouldRefocus]); + ref.current?.focus() + }, [ref, shouldRefocus]) return ref -}; +} diff --git a/example/src/main.tsx b/example/src/main.tsx index 3d7150d..c4fc9bb 100644 --- a/example/src/main.tsx +++ b/example/src/main.tsx @@ -6,5 +6,5 @@ import './index.css' ReactDOM.createRoot(document.getElementById('root')!).render( - , + ) diff --git a/example/vite.config.ts b/example/vite.config.ts index 5a33944..b1b5f91 100644 --- a/example/vite.config.ts +++ b/example/vite.config.ts @@ -3,5 +3,5 @@ import react from '@vitejs/plugin-react' // https://vitejs.dev/config/ export default defineConfig({ - plugins: [react()], + plugins: [react()] }) diff --git a/example/yarn.lock b/example/yarn.lock index 383863c..d089724 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -496,6 +496,13 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz#acad351d582d157bb145535db2a6ff53dd514b5c" integrity sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw== +"@eslint-community/eslint-utils@^4.1.2": + version "4.9.1" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz#4e90af67bc51ddee6cdef5284edf572ec376b595" + integrity sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ== + dependencies: + eslint-visitor-keys "^3.4.3" + "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" @@ -508,6 +515,11 @@ resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.1.tgz#361461e5cb3845d874e61731c11cfedd664d83a0" integrity sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA== +"@eslint-community/regexpp@^4.11.0": + version "4.12.2" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.2.tgz#bccdf615bcf7b6e8db830ec0b8d21c9a25de597b" + integrity sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew== + "@eslint/eslintrc@^2.1.4": version "2.1.4" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" @@ -904,6 +916,11 @@ resolved "https://registry.yarnpkg.com/@rooks/use-mutation-observer/-/use-mutation-observer-4.11.2.tgz#a0466c4338e0a4487ea19253c86bcd427c29f4af" integrity sha512-vpsdrZdr6TkB1zZJcHx+fR1YC/pHs2BaqcuYiEGjBVbwY5xcC49+h0hAUtQKHth3oJqXfIX/Ng8S7s5HFHdM/A== +"@rtsao/scc@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8" + integrity sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g== + "@types/babel__core@^7.20.5": version "7.20.5" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" @@ -968,6 +985,11 @@ dependencies: "@types/unist" "*" +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== + "@types/lodash@^4.14.178", "@types/lodash@^4.14.194": version "4.17.5" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.5.tgz#e6c29b58e66995d57cd170ce3e2a61926d55ee04" @@ -1293,11 +1315,102 @@ argparse@^2.0.1: resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== +array-buffer-byte-length@^1.0.1, array-buffer-byte-length@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz#384d12a37295aec3769ab022ad323a18a51ccf8b" + integrity sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw== + dependencies: + call-bound "^1.0.3" + is-array-buffer "^3.0.5" + +array-includes@^3.1.6, array-includes@^3.1.8, array-includes@^3.1.9: + version "3.1.9" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.9.tgz#1f0ccaa08e90cdbc3eb433210f903ad0f17c3f3a" + integrity sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.4" + define-properties "^1.2.1" + es-abstract "^1.24.0" + es-object-atoms "^1.1.1" + get-intrinsic "^1.3.0" + is-string "^1.1.1" + math-intrinsics "^1.1.0" + array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== +array.prototype.findlast@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz#3e4fbcb30a15a7f5bf64cf2faae22d139c2e4904" + integrity sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-shim-unscopables "^1.0.2" + +array.prototype.findlastindex@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz#cfa1065c81dcb64e34557c9b81d012f6a421c564" + integrity sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.4" + define-properties "^1.2.1" + es-abstract "^1.23.9" + es-errors "^1.3.0" + es-object-atoms "^1.1.1" + es-shim-unscopables "^1.1.0" + +array.prototype.flat@^1.3.1, array.prototype.flat@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz#534aaf9e6e8dd79fb6b9a9917f839ef1ec63afe5" + integrity sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg== + dependencies: + call-bind "^1.0.8" + define-properties "^1.2.1" + es-abstract "^1.23.5" + es-shim-unscopables "^1.0.2" + +array.prototype.flatmap@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz#712cc792ae70370ae40586264629e33aab5dd38b" + integrity sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg== + dependencies: + call-bind "^1.0.8" + define-properties "^1.2.1" + es-abstract "^1.23.5" + es-shim-unscopables "^1.0.2" + +array.prototype.tosorted@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz#fe954678ff53034e717ea3352a03f0b0b86f7ffc" + integrity sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.3" + es-errors "^1.3.0" + es-shim-unscopables "^1.0.2" + +arraybuffer.prototype.slice@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz#9d760d84dbdd06d0cbf92c8849615a1a7ab3183c" + integrity sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ== + dependencies: + array-buffer-byte-length "^1.0.1" + call-bind "^1.0.8" + define-properties "^1.2.1" + es-abstract "^1.23.5" + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + is-array-buffer "^3.0.4" + asn1@~0.2.3: version "0.2.6" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" @@ -1315,6 +1428,11 @@ astral-regex@^2.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== +async-function@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/async-function/-/async-function-1.0.0.tgz#509c9fca60eaf85034c6829838188e4e4c8ffb2b" + integrity sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA== + async@^3.2.0: version "3.2.5" resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66" @@ -1330,6 +1448,13 @@ at-least-node@^1.0.0: resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== +available-typed-arrays@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" + integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== + dependencies: + possible-typed-array-names "^1.0.0" + aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -1443,11 +1568,31 @@ buffer@^5.7.1: base64-js "^1.3.1" ieee754 "^1.1.13" +builtin-modules@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" + integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== + +builtins@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.1.0.tgz#6d85eeb360c4ebc166c3fdef922a15aa7316a5e8" + integrity sha512-SW9lzGTLvWTP1AY8xeAMZimqDrIaSdLQUcVr9DMef51niJ022Ri87SwRRKYm4A6iHfkPaiVUu/Duw2Wc4J7kKg== + dependencies: + semver "^7.0.0" + cachedir@^2.3.0: version "2.4.0" resolved "https://registry.yarnpkg.com/cachedir/-/cachedir-2.4.0.tgz#7fef9cf7367233d7c88068fe6e34ed0d355a610d" integrity sha512-9EtFOZR8g22CL7BWjJ9BUx1+A/djkofnyW3aOXZORNW2kxoUpx2h+uN2cOqwPmFhnpVmxg+KW2OjOSgChTEvsQ== +call-bind-apply-helpers@^1.0.0, call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6" + integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + call-bind@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" @@ -1459,6 +1604,24 @@ call-bind@^1.0.7: get-intrinsic "^1.2.4" set-function-length "^1.2.1" +call-bind@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.8.tgz#0736a9660f537e3388826f440d5ec45f744eaa4c" + integrity sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww== + dependencies: + call-bind-apply-helpers "^1.0.0" + es-define-property "^1.0.0" + get-intrinsic "^1.2.4" + set-function-length "^1.2.2" + +call-bound@^1.0.2, call-bound@^1.0.3, call-bound@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.4.tgz#238de935d2a2a692928c538c7ccfa91067fd062a" + integrity sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg== + dependencies: + call-bind-apply-helpers "^1.0.2" + get-intrinsic "^1.3.0" + callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -1792,6 +1955,33 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +data-view-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.2.tgz#211a03ba95ecaf7798a8c7198d79536211f88570" + integrity sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ== + dependencies: + call-bound "^1.0.3" + es-errors "^1.3.0" + is-data-view "^1.0.2" + +data-view-byte-length@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz#9e80f7ca52453ce3e93d25a35318767ea7704735" + integrity sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ== + dependencies: + call-bound "^1.0.3" + es-errors "^1.3.0" + is-data-view "^1.0.2" + +data-view-byte-offset@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz#068307f9b71ab76dbbe10291389e020856606191" + integrity sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + is-data-view "^1.0.1" + dayjs@^1.10.4: version "1.11.11" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.11.tgz#dfe0e9d54c5f8b68ccf8ca5f72ac603e7e5ed59e" @@ -1802,7 +1992,7 @@ dayjs@^1.11.11: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.19.tgz#15dc98e854bb43917f12021806af897c58ae2938" integrity sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw== -debug@^3.1.0: +debug@^3.1.0, debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== @@ -1828,7 +2018,7 @@ deep-is@^0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== -define-data-property@^1.1.4: +define-data-property@^1.0.1, define-data-property@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== @@ -1837,6 +2027,15 @@ define-data-property@^1.1.4: es-errors "^1.3.0" gopd "^1.0.1" +define-properties@^1.1.3, define-properties@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" + integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== + dependencies: + define-data-property "^1.0.1" + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -1890,6 +2089,13 @@ dnd-core@14.0.1: "@react-dnd/invariant" "^2.0.0" redux "^4.1.1" +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + doctrine@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" @@ -1902,6 +2108,15 @@ dom-walk@^0.1.0: resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== +dunder-proto@^1.0.0, dunder-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" + integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== + dependencies: + call-bind-apply-helpers "^1.0.1" + es-errors "^1.3.0" + gopd "^1.2.0" + eastasianwidth@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" @@ -1958,6 +2173,66 @@ enquirer@^2.3.6: ansi-colors "^4.1.1" strip-ansi "^6.0.1" +es-abstract@^1.17.5, es-abstract@^1.23.2, es-abstract@^1.23.3, es-abstract@^1.23.5, es-abstract@^1.23.6, es-abstract@^1.23.9, es-abstract@^1.24.0, es-abstract@^1.24.1: + version "1.24.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.24.1.tgz#f0c131ed5ea1bb2411134a8dd94def09c46c7899" + integrity sha512-zHXBLhP+QehSSbsS9Pt23Gg964240DPd6QCf8WpkqEXxQ7fhdZzYsocOr5u7apWonsS5EjZDmTF+/slGMyasvw== + dependencies: + array-buffer-byte-length "^1.0.2" + arraybuffer.prototype.slice "^1.0.4" + available-typed-arrays "^1.0.7" + call-bind "^1.0.8" + call-bound "^1.0.4" + data-view-buffer "^1.0.2" + data-view-byte-length "^1.0.2" + data-view-byte-offset "^1.0.1" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.1.1" + es-set-tostringtag "^2.1.0" + es-to-primitive "^1.3.0" + function.prototype.name "^1.1.8" + get-intrinsic "^1.3.0" + get-proto "^1.0.1" + get-symbol-description "^1.1.0" + globalthis "^1.0.4" + gopd "^1.2.0" + has-property-descriptors "^1.0.2" + has-proto "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + internal-slot "^1.1.0" + is-array-buffer "^3.0.5" + is-callable "^1.2.7" + is-data-view "^1.0.2" + is-negative-zero "^2.0.3" + is-regex "^1.2.1" + is-set "^2.0.3" + is-shared-array-buffer "^1.0.4" + is-string "^1.1.1" + is-typed-array "^1.1.15" + is-weakref "^1.1.1" + math-intrinsics "^1.1.0" + object-inspect "^1.13.4" + object-keys "^1.1.1" + object.assign "^4.1.7" + own-keys "^1.0.1" + regexp.prototype.flags "^1.5.4" + safe-array-concat "^1.1.3" + safe-push-apply "^1.0.0" + safe-regex-test "^1.1.0" + set-proto "^1.0.0" + stop-iteration-iterator "^1.1.0" + string.prototype.trim "^1.2.10" + string.prototype.trimend "^1.0.9" + string.prototype.trimstart "^1.0.8" + typed-array-buffer "^1.0.3" + typed-array-byte-length "^1.0.3" + typed-array-byte-offset "^1.0.4" + typed-array-length "^1.0.7" + unbox-primitive "^1.1.0" + which-typed-array "^1.1.19" + es-define-property@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" @@ -1965,11 +2240,71 @@ es-define-property@^1.0.0: dependencies: get-intrinsic "^1.2.4" +es-define-property@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" + integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== + es-errors@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== +es-iterator-helpers@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.2.2.tgz#d979a9f686e2b0b72f88dbead7229924544720bc" + integrity sha512-BrUQ0cPTB/IwXj23HtwHjS9n7O4h9FX94b4xc5zlTHxeLgTAdzYUDyy6KdExAl9lbN5rtfe44xpjpmj9grxs5w== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.4" + define-properties "^1.2.1" + es-abstract "^1.24.1" + es-errors "^1.3.0" + es-set-tostringtag "^2.1.0" + function-bind "^1.1.2" + get-intrinsic "^1.3.0" + globalthis "^1.0.4" + gopd "^1.2.0" + has-property-descriptors "^1.0.2" + has-proto "^1.2.0" + has-symbols "^1.1.0" + internal-slot "^1.1.0" + iterator.prototype "^1.1.5" + safe-array-concat "^1.1.3" + +es-object-atoms@^1.0.0, es-object-atoms@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1" + integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA== + dependencies: + es-errors "^1.3.0" + +es-set-tostringtag@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz#f31dbbe0c183b00a6d26eb6325c810c0fd18bd4d" + integrity sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA== + dependencies: + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + has-tostringtag "^1.0.2" + hasown "^2.0.2" + +es-shim-unscopables@^1.0.2, es-shim-unscopables@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz#438df35520dac5d105f3943d927549ea3b00f4b5" + integrity sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw== + dependencies: + hasown "^2.0.2" + +es-to-primitive@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.3.0.tgz#96c89c82cc49fd8794a24835ba3e1ff87f214e18" + integrity sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g== + dependencies: + is-callable "^1.2.7" + is-date-object "^1.0.5" + is-symbol "^1.0.4" + esbuild@^0.21.3: version "0.21.5" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.21.5.tgz#9ca301b120922959b766360d8ac830da0d02997d" @@ -2019,6 +2354,102 @@ escape-string-regexp@^5.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz#4683126b500b61762f2dbebace1806e8be31b1c8" integrity sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw== +eslint-compat-utils@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/eslint-compat-utils/-/eslint-compat-utils-0.5.1.tgz#7fc92b776d185a70c4070d03fd26fde3d59652e4" + integrity sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q== + dependencies: + semver "^7.5.4" + +eslint-config-standard-react@^13.0.0: + version "13.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-standard-react/-/eslint-config-standard-react-13.0.0.tgz#dcc85bc3210dac858bc94ac53d024a5488ce5568" + integrity sha512-HrVPGj8UncHfV+BsdJTuJpVsomn6AIrke3Af2Fh4XFvQQDU+iO6N2ZL+UsC+scExft4fU3uf7fJwj7PKWnXJDA== + +eslint-config-standard@^17.1.0: + version "17.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-17.1.0.tgz#40ffb8595d47a6b242e07cbfd49dc211ed128975" + integrity sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q== + +eslint-import-resolver-node@^0.3.9: + version "0.3.9" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac" + integrity sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g== + dependencies: + debug "^3.2.7" + is-core-module "^2.13.0" + resolve "^1.22.4" + +eslint-module-utils@^2.12.1: + version "2.12.1" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.12.1.tgz#f76d3220bfb83c057651359295ab5854eaad75ff" + integrity sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw== + dependencies: + debug "^3.2.7" + +eslint-plugin-cypress@^2.15.0: + version "2.15.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-cypress/-/eslint-plugin-cypress-2.15.2.tgz#f22e12fad4c434edad7b298ef92bac8fa087ffa0" + integrity sha512-CtcFEQTDKyftpI22FVGpx8bkpKyYXBlNge6zSo0pl5/qJvBAnzaD76Vu2AsP16d6mTj478Ldn2mhgrWV+Xr0vQ== + dependencies: + globals "^13.20.0" + +eslint-plugin-es-x@^7.5.0: + version "7.8.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-es-x/-/eslint-plugin-es-x-7.8.0.tgz#a207aa08da37a7923f2a9599e6d3eb73f3f92b74" + integrity sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ== + dependencies: + "@eslint-community/eslint-utils" "^4.1.2" + "@eslint-community/regexpp" "^4.11.0" + eslint-compat-utils "^0.5.1" + +eslint-plugin-import@^2.29.1: + version "2.32.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz#602b55faa6e4caeaa5e970c198b5c00a37708980" + integrity sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA== + dependencies: + "@rtsao/scc" "^1.1.0" + array-includes "^3.1.9" + array.prototype.findlastindex "^1.2.6" + array.prototype.flat "^1.3.3" + array.prototype.flatmap "^1.3.3" + debug "^3.2.7" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.9" + eslint-module-utils "^2.12.1" + hasown "^2.0.2" + is-core-module "^2.16.1" + is-glob "^4.0.3" + minimatch "^3.1.2" + object.fromentries "^2.0.8" + object.groupby "^1.0.3" + object.values "^1.2.1" + semver "^6.3.1" + string.prototype.trimend "^1.0.9" + tsconfig-paths "^3.15.0" + +eslint-plugin-n@^16.6.2: + version "16.6.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-16.6.2.tgz#6a60a1a376870064c906742272074d5d0b412b0b" + integrity sha512-6TyDmZ1HXoFQXnhCTUjVFULReoBPOAjpuiKELMkeP40yffI/1ZRO+d9ug/VC6fqISo2WkuIBk3cvuRPALaWlOQ== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + builtins "^5.0.1" + eslint-plugin-es-x "^7.5.0" + get-tsconfig "^4.7.0" + globals "^13.24.0" + ignore "^5.2.4" + is-builtin-module "^3.2.1" + is-core-module "^2.12.1" + minimatch "^3.1.2" + resolve "^1.22.2" + semver "^7.5.3" + +eslint-plugin-promise@^4.2.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.3.1.tgz#61485df2a359e03149fdafc0a68b0e030ad2ac45" + integrity sha512-bY2sGqyptzFBDLh/GMbAxfdJC+b0f23ME63FOE4+Jao0oZ3E1LEwFtWJX/1pGMJLiTtrSSern2CRM/g+dfc0eQ== + eslint-plugin-react-hooks@^4.6.0: version "4.6.2" resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz#c829eb06c0e6f484b3fbb85a97e57784f328c596" @@ -2029,6 +2460,35 @@ eslint-plugin-react-refresh@^0.4.6: resolved "https://registry.yarnpkg.com/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.7.tgz#1f597f9093b254f10ee0961c139a749acb19af7d" integrity sha512-yrj+KInFmwuQS2UQcg1SF83ha1tuHC1jMQbRNyuWtlEzzKRDgAl7L4Yp4NlDUZTZNlWvHEzOtJhMi40R7JxcSw== +eslint-plugin-react@^7.17.0: + version "7.37.5" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz#2975511472bdda1b272b34d779335c9b0e877065" + integrity sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA== + dependencies: + array-includes "^3.1.8" + array.prototype.findlast "^1.2.5" + array.prototype.flatmap "^1.3.3" + array.prototype.tosorted "^1.1.4" + doctrine "^2.1.0" + es-iterator-helpers "^1.2.1" + estraverse "^5.3.0" + hasown "^2.0.2" + jsx-ast-utils "^2.4.1 || ^3.0.0" + minimatch "^3.1.2" + object.entries "^1.1.9" + object.fromentries "^2.0.8" + object.values "^1.2.1" + prop-types "^15.8.1" + resolve "^2.0.0-next.5" + semver "^6.3.1" + string.prototype.matchall "^4.0.12" + string.prototype.repeat "^1.0.0" + +eslint-plugin-sonarjs@^0.25.0: + version "0.25.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-0.25.1.tgz#0619798dbc27b04fd0a8e6d0fb6adf7fa2cb5041" + integrity sha512-5IOKvj/GMBNqjxBdItfotfRHo7w48496GOu1hxdeXuD0mB1JBlDCViiLHETDTfA8pDAVSBimBEQoetRXYceQEw== + eslint-scope@^7.2.2: version "7.2.2" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" @@ -2109,7 +2569,7 @@ esrecurse@^4.3.0: dependencies: estraverse "^5.2.0" -estraverse@^5.1.0, estraverse@^5.2.0: +estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== @@ -2272,6 +2732,13 @@ focus-outline-manager@^1.0.2: resolved "https://registry.yarnpkg.com/focus-outline-manager/-/focus-outline-manager-1.0.2.tgz#7bf3658865341fb6b08d042a037b9d2868b119b5" integrity sha512-bHWEmjLsTjGP9gVs7P3Hyl+oY5NlMW8aTSPdTJ+X2GKt6glDctt9fUCLbRV+d/l8NDC40+FxMjp9WlTQXaQALw== +for-each@^0.3.3, for-each@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.5.tgz#d650688027826920feeb0af747ee7b9421a41d47" + integrity sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg== + dependencies: + is-callable "^1.2.7" + foreground-child@^3.1.0: version "3.2.1" resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.2.1.tgz#767004ccf3a5b30df39bed90718bab43fe0a59f7" @@ -2323,6 +2790,28 @@ function-bind@^1.1.2: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== +function.prototype.name@^1.1.6, function.prototype.name@^1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.8.tgz#e68e1df7b259a5c949eeef95cdbde53edffabb78" + integrity sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + define-properties "^1.2.1" + functions-have-names "^1.2.3" + hasown "^2.0.2" + is-callable "^1.2.7" + +functions-have-names@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== + +generator-function@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/generator-function/-/generator-function-2.0.1.tgz#0e75dd410d1243687a0ba2e951b94eedb8f737a2" + integrity sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g== + gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" @@ -2339,6 +2828,30 @@ get-intrinsic@^1.1.3, get-intrinsic@^1.2.4: has-symbols "^1.0.3" hasown "^2.0.0" +get-intrinsic@^1.2.5, get-intrinsic@^1.2.6, get-intrinsic@^1.2.7, get-intrinsic@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01" + integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ== + dependencies: + call-bind-apply-helpers "^1.0.2" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.1.1" + function-bind "^1.1.2" + get-proto "^1.0.1" + gopd "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + math-intrinsics "^1.1.0" + +get-proto@^1.0.0, get-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" + integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== + dependencies: + dunder-proto "^1.0.1" + es-object-atoms "^1.0.0" + get-stream@^5.0.0, get-stream@^5.1.0: version "5.2.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" @@ -2346,6 +2859,22 @@ get-stream@^5.0.0, get-stream@^5.1.0: dependencies: pump "^3.0.0" +get-symbol-description@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.1.0.tgz#7bdd54e0befe8ffc9f3b4e203220d9f1e881b6ee" + integrity sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg== + dependencies: + call-bound "^1.0.3" + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + +get-tsconfig@^4.7.0: + version "4.13.6" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.13.6.tgz#2fbfda558a98a691a798f123afd95915badce876" + integrity sha512-shZT/QMiSHc/YBLxxOkMtgSid5HFoauqCE3/exfsEcwg1WkeqjG+V40yBbBrsD+jW2HDXcs28xOfcbm2jI8Ddw== + dependencies: + resolve-pkg-maps "^1.0.0" + getos@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/getos/-/getos-3.2.1.tgz#0134d1f4e00eb46144c5a9c0ac4dc087cbb27dc5" @@ -2418,13 +2947,21 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^13.19.0: +globals@^13.19.0, globals@^13.20.0, globals@^13.24.0: version "13.24.0" resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== dependencies: type-fest "^0.20.2" +globalthis@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.4.tgz#7430ed3a975d97bfb59bcce41f5cabbafa651236" + integrity sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ== + dependencies: + define-properties "^1.2.1" + gopd "^1.0.1" + globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" @@ -2444,6 +2981,11 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" +gopd@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== + graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" @@ -2454,6 +2996,11 @@ graphemer@^1.4.0: resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== +has-bigints@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.1.0.tgz#28607e965ac967e03cd2a2c70a2636a1edad49fe" + integrity sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg== + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -2464,7 +3011,7 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has-property-descriptors@^1.0.2: +has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== @@ -2476,12 +3023,31 @@ has-proto@^1.0.1: resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== +has-proto@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.2.0.tgz#5de5a6eabd95fdffd9818b43055e8065e39fe9d5" + integrity sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ== + dependencies: + dunder-proto "^1.0.0" + has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== -hasown@^2.0.0: +has-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== + +has-tostringtag@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== + dependencies: + has-symbols "^1.0.3" + +hasown@^2.0.0, hasown@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== @@ -2557,6 +3123,11 @@ ignore@^5.2.0, ignore@^5.3.1: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== +ignore@^5.2.4: + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== + immutability-helper@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/immutability-helper/-/immutability-helper-3.1.1.tgz#2b86b2286ed3b1241c9e23b7b21e0444f52f77b7" @@ -2603,6 +3174,15 @@ inline-style-parser@0.2.3: resolved "https://registry.yarnpkg.com/inline-style-parser/-/inline-style-parser-0.2.3.tgz#e35c5fb45f3a83ed7849fe487336eb7efa25971c" integrity sha512-qlD8YNDqyTKTyuITrDOffsl6Tdhv+UC4hcdAVuQsK4IMQ99nSgd1MIA/Q+jQYoh9r3hVUXhYh7urSRmXPkW04g== +internal-slot@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.1.0.tgz#1eac91762947d2f7056bc838d93e13b2e9604961" + integrity sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw== + dependencies: + es-errors "^1.3.0" + hasown "^2.0.2" + side-channel "^1.1.0" + is-alphabetical@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-2.0.1.tgz#01072053ea7c1036df3c7d19a6daaec7f19e789b" @@ -2616,11 +3196,38 @@ is-alphanumerical@^2.0.0: is-alphabetical "^2.0.0" is-decimal "^2.0.0" +is-array-buffer@^3.0.4, is-array-buffer@^3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.5.tgz#65742e1e687bd2cc666253068fd8707fe4d44280" + integrity sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + get-intrinsic "^1.2.6" + is-arrayish@^0.3.1: version "0.3.2" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== +is-async-function@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-async-function/-/is-async-function-2.1.1.tgz#3e69018c8e04e73b738793d020bfe884b9fd3523" + integrity sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ== + dependencies: + async-function "^1.0.0" + call-bound "^1.0.3" + get-proto "^1.0.1" + has-tostringtag "^1.0.2" + safe-regex-test "^1.1.0" + +is-bigint@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.1.0.tgz#dda7a3445df57a42583db4228682eba7c4170672" + integrity sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ== + dependencies: + has-bigints "^1.0.2" + is-binary-path@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" @@ -2628,6 +3235,26 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" +is-boolean-object@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.2.2.tgz#7067f47709809a393c71ff5bb3e135d8a9215d9e" + integrity sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A== + dependencies: + call-bound "^1.0.3" + has-tostringtag "^1.0.2" + +is-builtin-module@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.2.1.tgz#f03271717d8654cfcaf07ab0463faa3571581169" + integrity sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A== + dependencies: + builtin-modules "^3.3.0" + +is-callable@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" + integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== + is-ci@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867" @@ -2635,6 +3262,13 @@ is-ci@^3.0.1: dependencies: ci-info "^3.2.0" +is-core-module@^2.12.1, is-core-module@^2.16.1: + version "2.16.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.1.tgz#2a98801a849f43e2add644fbb6bc6229b19a4ef4" + integrity sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w== + dependencies: + hasown "^2.0.2" + is-core-module@^2.13.0: version "2.13.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" @@ -2642,6 +3276,23 @@ is-core-module@^2.13.0: dependencies: hasown "^2.0.0" +is-data-view@^1.0.1, is-data-view@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-data-view/-/is-data-view-1.0.2.tgz#bae0a41b9688986c2188dda6657e56b8f9e63b8e" + integrity sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw== + dependencies: + call-bound "^1.0.2" + get-intrinsic "^1.2.6" + is-typed-array "^1.1.13" + +is-date-object@^1.0.5, is-date-object@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.1.0.tgz#ad85541996fc7aa8b2729701d27b7319f95d82f7" + integrity sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg== + dependencies: + call-bound "^1.0.2" + has-tostringtag "^1.0.2" + is-decimal@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-2.0.1.tgz#9469d2dc190d0214fd87d78b78caecc0cc14eef7" @@ -2652,11 +3303,29 @@ is-extglob@^2.1.1: resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== +is-finalizationregistry@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz#eefdcdc6c94ddd0674d9c85887bf93f944a97c90" + integrity sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg== + dependencies: + call-bound "^1.0.3" + is-fullwidth-code-point@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== +is-generator-function@^1.0.10: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.1.2.tgz#ae3b61e3d5ea4e4839b90bad22b02335051a17d5" + integrity sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA== + dependencies: + call-bound "^1.0.4" + generator-function "^2.0.0" + get-proto "^1.0.1" + has-tostringtag "^1.0.2" + safe-regex-test "^1.1.0" + is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" @@ -2677,6 +3346,24 @@ is-installed-globally@~0.4.0: global-dirs "^3.0.0" is-path-inside "^3.0.2" +is-map@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.3.tgz#ede96b7fe1e270b3c4465e3a465658764926d62e" + integrity sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw== + +is-negative-zero@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747" + integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== + +is-number-object@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.1.1.tgz#144b21e95a1bc148205dcc2814a9134ec41b2541" + integrity sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw== + dependencies: + call-bound "^1.0.3" + has-tostringtag "^1.0.2" + is-number@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" @@ -2692,11 +3379,57 @@ is-plain-obj@^4.0.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-4.1.0.tgz#d65025edec3657ce032fd7db63c97883eaed71f0" integrity sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg== +is-regex@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.2.1.tgz#76d70a3ed10ef9be48eb577887d74205bf0cad22" + integrity sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g== + dependencies: + call-bound "^1.0.2" + gopd "^1.2.0" + has-tostringtag "^1.0.2" + hasown "^2.0.2" + +is-set@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.3.tgz#8ab209ea424608141372ded6e0cb200ef1d9d01d" + integrity sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg== + +is-shared-array-buffer@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz#9b67844bd9b7f246ba0708c3a93e34269c774f6f" + integrity sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A== + dependencies: + call-bound "^1.0.3" + is-stream@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== +is-string@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.1.1.tgz#92ea3f3d5c5b6e039ca8677e5ac8d07ea773cbb9" + integrity sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA== + dependencies: + call-bound "^1.0.3" + has-tostringtag "^1.0.2" + +is-symbol@^1.0.4, is-symbol@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.1.1.tgz#f47761279f532e2b05a7024a7506dbbedacd0634" + integrity sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w== + dependencies: + call-bound "^1.0.2" + has-symbols "^1.1.0" + safe-regex-test "^1.1.0" + +is-typed-array@^1.1.13, is-typed-array@^1.1.14, is-typed-array@^1.1.15: + version "1.1.15" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.15.tgz#4bfb4a45b61cee83a5a46fba778e4e8d59c0ce0b" + integrity sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ== + dependencies: + which-typed-array "^1.1.16" + is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -2712,11 +3445,36 @@ is-url-superb@^4.0.0: resolved "https://registry.yarnpkg.com/is-url-superb/-/is-url-superb-4.0.0.tgz#b54d1d2499bb16792748ac967aa3ecb41a33a8c2" integrity sha512-GI+WjezhPPcbM+tqE9LnmsY5qqjwHzTvjJ36wxYX5ujNXefSUJ/T17r5bqDV8yLhcgB59KTPNOc9O9cmHTPWsA== +is-weakmap@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.2.tgz#bf72615d649dfe5f699079c54b83e47d1ae19cfd" + integrity sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w== + +is-weakref@^1.0.2, is-weakref@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.1.1.tgz#eea430182be8d64174bd96bffbc46f21bf3f9293" + integrity sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew== + dependencies: + call-bound "^1.0.3" + +is-weakset@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.4.tgz#c9f5deb0bc1906c6d6f1027f284ddf459249daca" + integrity sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ== + dependencies: + call-bound "^1.0.3" + get-intrinsic "^1.2.6" + is-what@^3.3.1: version "3.14.1" resolved "https://registry.yarnpkg.com/is-what/-/is-what-3.14.1.tgz#e1222f46ddda85dead0fd1c9df131760e77755c1" integrity sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA== +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -2727,6 +3485,18 @@ isstream@~0.1.2: resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== +iterator.prototype@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/iterator.prototype/-/iterator.prototype-1.1.5.tgz#12c959a29de32de0aa3bbbb801f4d777066dae39" + integrity sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g== + dependencies: + define-data-property "^1.1.4" + es-object-atoms "^1.0.0" + get-intrinsic "^1.2.6" + get-proto "^1.0.0" + has-symbols "^1.1.0" + set-function-name "^2.0.2" + jackspeak@^3.1.2: version "3.4.0" resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.0.tgz#a75763ff36ad778ede6a156d8ee8b124de445b4a" @@ -2795,6 +3565,13 @@ json2mq@^0.2.0: dependencies: string-convert "^0.2.0" +json5@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" + integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== + dependencies: + minimist "^1.2.0" + json5@^2.1.2, json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" @@ -2819,6 +3596,16 @@ jsprim@^2.0.2: json-schema "0.4.0" verror "1.10.0" +"jsx-ast-utils@^2.4.1 || ^3.0.0": + version "3.3.5" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz#4766bd05a8e2a11af222becd19e15575e52a853a" + integrity sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ== + dependencies: + array-includes "^3.1.6" + array.prototype.flat "^1.3.1" + object.assign "^4.1.4" + object.values "^1.1.6" + keyv@^4.5.3: version "4.5.4" resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" @@ -2976,6 +3763,11 @@ material-colors@^1.2.1: resolved "https://registry.yarnpkg.com/material-colors/-/material-colors-1.2.6.tgz#6d1958871126992ceecc72f4bcc4d8f010865f46" integrity sha512-6qE4B9deFBIa9YSpOc9O0Sgc43zTeVYbgDT5veRKSlB2+ZuHNoVVxA1L/ckMUayV9Ay9y7Z/SZCLcGteW9i7bg== +math-intrinsics@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" + integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== + mdast-util-find-and-replace@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.1.tgz#a6fc7b62f0994e973490e45262e4bc07607b04e0" @@ -3502,7 +4294,7 @@ minimatch@^9.0.4: dependencies: brace-expansion "^2.0.1" -minimist@^1.2.8: +minimist@^1.2.0, minimist@^1.2.6, minimist@^1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== @@ -3551,6 +4343,16 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== +node-exports-info@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/node-exports-info/-/node-exports-info-1.6.0.tgz#1aedafb01a966059c9a5e791a94a94d93f5c2a13" + integrity sha512-pyFS63ptit/P5WqUkt+UUfe+4oevH+bFeIiPPdfb0pFeYEu/1ELnJu5l+5EcTKYL5M7zaAa7S8ddywgXypqKCw== + dependencies: + array.prototype.flatmap "^1.3.3" + es-errors "^1.3.0" + object.entries "^1.1.9" + semver "^6.3.1" + node-releases@^2.0.14: version "2.0.14" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" @@ -3583,6 +4385,67 @@ object-inspect@^1.13.1: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== +object-inspect@^1.13.3, object-inspect@^1.13.4: + version "1.13.4" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.4.tgz#8375265e21bc20d0fa582c22e1b13485d6e00213" + integrity sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew== + +object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object.assign@^4.1.4, object.assign@^4.1.7: + version "4.1.7" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.7.tgz#8c14ca1a424c6a561b0bb2a22f66f5049a945d3d" + integrity sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + has-symbols "^1.1.0" + object-keys "^1.1.1" + +object.entries@^1.1.9: + version "1.1.9" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.9.tgz#e4770a6a1444afb61bd39f984018b5bede25f8b3" + integrity sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.4" + define-properties "^1.2.1" + es-object-atoms "^1.1.1" + +object.fromentries@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.8.tgz#f7195d8a9b97bd95cbc1999ea939ecd1a2b00c65" + integrity sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" + +object.groupby@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.3.tgz#9b125c36238129f6f7b61954a1e7176148d5002e" + integrity sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + +object.values@^1.1.6, object.values@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.2.1.tgz#deed520a50809ff7f75a7cfd4bc64c7a038c6216" + integrity sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -3614,6 +4477,15 @@ ospath@^1.2.2: resolved "https://registry.yarnpkg.com/ospath/-/ospath-1.2.2.tgz#1276639774a3f8ef2572f7fe4280e0ea4550c07b" integrity sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA== +own-keys@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/own-keys/-/own-keys-1.0.1.tgz#e4006910a2bf913585289676eebd6f390cf51358" + integrity sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg== + dependencies: + get-intrinsic "^1.2.6" + object-keys "^1.1.1" + safe-push-apply "^1.0.0" + p-limit@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" @@ -3729,6 +4601,11 @@ pirates@^4.0.1: resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== +possible-typed-array-names@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz#93e3582bc0e5426586d9d07b79ee40fc841de4ae" + integrity sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg== + postcss-custom-properties@^11.0.0: version "11.0.0" resolved "https://registry.yarnpkg.com/postcss-custom-properties/-/postcss-custom-properties-11.0.0.tgz#f98cd192cd8dfcd8afa3baa1ad5b5d91d01292f3" @@ -4489,6 +5366,20 @@ redux@^4.1.1: dependencies: "@babel/runtime" "^7.9.2" +reflect.getprototypeof@^1.0.6, reflect.getprototypeof@^1.0.9: + version "1.0.10" + resolved "https://registry.yarnpkg.com/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz#c629219e78a3316d8b604c765ef68996964e7bf9" + integrity sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw== + dependencies: + call-bind "^1.0.8" + define-properties "^1.2.1" + es-abstract "^1.23.9" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + get-intrinsic "^1.2.7" + get-proto "^1.0.1" + which-builtin-type "^1.2.1" + regenerator-runtime@^0.13.4: version "0.13.11" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" @@ -4499,6 +5390,18 @@ regenerator-runtime@^0.14.0: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== +regexp.prototype.flags@^1.5.3, regexp.prototype.flags@^1.5.4: + version "1.5.4" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz#1ad6c62d44a259007e55b3970e00f746efbcaa19" + integrity sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA== + dependencies: + call-bind "^1.0.8" + define-properties "^1.2.1" + es-errors "^1.3.0" + get-proto "^1.0.1" + gopd "^1.2.0" + set-function-name "^2.0.2" + remark-gfm@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/remark-gfm/-/remark-gfm-4.0.0.tgz#aea777f0744701aa288b67d28c43565c7e8c35de" @@ -4563,6 +5466,11 @@ resolve-from@^4.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== +resolve-pkg-maps@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" + integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== + resolve@^1.1.7, resolve@^1.22.2: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" @@ -4572,6 +5480,27 @@ resolve@^1.1.7, resolve@^1.22.2: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +resolve@^1.22.4: + version "1.22.11" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.11.tgz#aad857ce1ffb8bfa9b0b1ac29f1156383f68c262" + integrity sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ== + dependencies: + is-core-module "^2.16.1" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +resolve@^2.0.0-next.5: + version "2.0.0-next.6" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.6.tgz#b3961812be69ace7b3bc35d5bf259434681294af" + integrity sha512-3JmVl5hMGtJ3kMmB3zi3DL25KfkCEyy3Tw7Gmw7z5w8M9WlwoPFnIvwChzu1+cF3iaK3sp18hhPz8ANeimdJfA== + dependencies: + es-errors "^1.3.0" + is-core-module "^2.16.1" + node-exports-info "^1.6.0" + object-keys "^1.1.1" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + restore-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" @@ -4636,11 +5565,39 @@ rxjs@^7.5.1: dependencies: tslib "^2.1.0" +safe-array-concat@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.3.tgz#c9e54ec4f603b0bbb8e7e5007a5ee7aecd1538c3" + integrity sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.2" + get-intrinsic "^1.2.6" + has-symbols "^1.1.0" + isarray "^2.0.5" + safe-buffer@^5.0.1, safe-buffer@^5.1.2: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +safe-push-apply@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/safe-push-apply/-/safe-push-apply-1.0.0.tgz#01850e981c1602d398c85081f360e4e6d03d27f5" + integrity sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA== + dependencies: + es-errors "^1.3.0" + isarray "^2.0.5" + +safe-regex-test@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.1.0.tgz#7f87dfb67a3150782eaaf18583ff5d1711ac10c1" + integrity sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + is-regex "^1.2.1" + safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -4675,12 +5632,17 @@ semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== +semver@^7.0.0, semver@^7.5.4: + version "7.7.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.4.tgz#28464e36060e991fa7a11d0279d2d3f3b57a7e8a" + integrity sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA== + semver@^7.3.4, semver@^7.5.3, semver@^7.6.0: version "7.6.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== -set-function-length@^1.2.1: +set-function-length@^1.2.1, set-function-length@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== @@ -4692,6 +5654,25 @@ set-function-length@^1.2.1: gopd "^1.0.1" has-property-descriptors "^1.0.2" +set-function-name@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985" + integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + functions-have-names "^1.2.3" + has-property-descriptors "^1.0.2" + +set-proto@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/set-proto/-/set-proto-1.0.0.tgz#0760dbcff30b2d7e801fd6e19983e56da337565e" + integrity sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw== + dependencies: + dunder-proto "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + shallowequal@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8" @@ -4716,6 +5697,35 @@ shortid@^2.2.14: dependencies: nanoid "^2.1.0" +side-channel-list@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/side-channel-list/-/side-channel-list-1.0.0.tgz#10cb5984263115d3b7a0e336591e290a830af8ad" + integrity sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA== + dependencies: + es-errors "^1.3.0" + object-inspect "^1.13.3" + +side-channel-map@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/side-channel-map/-/side-channel-map-1.0.1.tgz#d6bb6b37902c6fef5174e5f533fab4c732a26f42" + integrity sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + get-intrinsic "^1.2.5" + object-inspect "^1.13.3" + +side-channel-weakmap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz#11dda19d5368e40ce9ec2bdc1fb0ecbc0790ecea" + integrity sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + get-intrinsic "^1.2.5" + object-inspect "^1.13.3" + side-channel-map "^1.0.1" + side-channel@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" @@ -4726,6 +5736,17 @@ side-channel@^1.0.4: get-intrinsic "^1.2.4" object-inspect "^1.13.1" +side-channel@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.1.0.tgz#c3fcff9c4da932784873335ec9765fa94ff66bc9" + integrity sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw== + dependencies: + es-errors "^1.3.0" + object-inspect "^1.13.3" + side-channel-list "^1.0.0" + side-channel-map "^1.0.1" + side-channel-weakmap "^1.0.2" + signal-exit@^3.0.2: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" @@ -4808,6 +5829,14 @@ sshpk@^1.14.1: safer-buffer "^2.0.2" tweetnacl "~0.14.0" +stop-iteration-iterator@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz#f481ff70a548f6124d0312c3aa14cbfa7aa542ad" + integrity sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ== + dependencies: + es-errors "^1.3.0" + internal-slot "^1.1.0" + string-convert@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/string-convert/-/string-convert-0.2.1.tgz#6982cc3049fbb4cd85f8b24568b9d9bf39eeff97" @@ -4840,6 +5869,65 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" +string.prototype.matchall@^4.0.12: + version "4.0.12" + resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz#6c88740e49ad4956b1332a911e949583a275d4c0" + integrity sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + define-properties "^1.2.1" + es-abstract "^1.23.6" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + get-intrinsic "^1.2.6" + gopd "^1.2.0" + has-symbols "^1.1.0" + internal-slot "^1.1.0" + regexp.prototype.flags "^1.5.3" + set-function-name "^2.0.2" + side-channel "^1.1.0" + +string.prototype.repeat@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz#e90872ee0308b29435aa26275f6e1b762daee01a" + integrity sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +string.prototype.trim@^1.2.10: + version "1.2.10" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz#40b2dd5ee94c959b4dcfb1d65ce72e90da480c81" + integrity sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.2" + define-data-property "^1.1.4" + define-properties "^1.2.1" + es-abstract "^1.23.5" + es-object-atoms "^1.0.0" + has-property-descriptors "^1.0.2" + +string.prototype.trimend@^1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz#62e2731272cd285041b36596054e9f66569b6942" + integrity sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.2" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + +string.prototype.trimstart@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz#7ee834dda8c7c17eff3118472bb35bfedaa34dde" + integrity sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + stringify-entities@^4.0.0: version "4.0.4" resolved "https://registry.yarnpkg.com/stringify-entities/-/stringify-entities-4.0.4.tgz#b3b79ef5f277cc4ac73caeb0236c5ba939b3a4f3" @@ -4869,6 +5957,11 @@ strip-ansi@^7.0.1: dependencies: ansi-regex "^6.0.1" +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== + strip-final-newline@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" @@ -5104,6 +6197,16 @@ ts-loader@9.5.1: semver "^7.3.4" source-map "^0.7.4" +tsconfig-paths@^3.15.0: + version "3.15.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4" + integrity sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.2" + minimist "^1.2.6" + strip-bom "^3.0.0" + tslib@^2.0.0, tslib@^2.0.3, tslib@^2.1.0: version "2.6.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" @@ -5143,6 +6246,51 @@ type-fest@^2.19.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b" integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== +typed-array-buffer@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz#a72395450a4869ec033fd549371b47af3a2ee536" + integrity sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw== + dependencies: + call-bound "^1.0.3" + es-errors "^1.3.0" + is-typed-array "^1.1.14" + +typed-array-byte-length@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz#8407a04f7d78684f3d252aa1a143d2b77b4160ce" + integrity sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg== + dependencies: + call-bind "^1.0.8" + for-each "^0.3.3" + gopd "^1.2.0" + has-proto "^1.2.0" + is-typed-array "^1.1.14" + +typed-array-byte-offset@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz#ae3698b8ec91a8ab945016108aef00d5bff12355" + integrity sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.8" + for-each "^0.3.3" + gopd "^1.2.0" + has-proto "^1.2.0" + is-typed-array "^1.1.15" + reflect.getprototypeof "^1.0.9" + +typed-array-length@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.7.tgz#ee4deff984b64be1e118b0de8c9c877d5ce73d3d" + integrity sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg== + dependencies: + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + is-typed-array "^1.1.13" + possible-typed-array-names "^1.0.0" + reflect.getprototypeof "^1.0.6" + typescript@5.1.6: version "5.1.6" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274" @@ -5153,6 +6301,16 @@ typescript@^5.2.2: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== +unbox-primitive@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.1.0.tgz#8d9d2c9edeea8460c7f35033a88867944934d1e2" + integrity sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw== + dependencies: + call-bound "^1.0.3" + has-bigints "^1.0.2" + has-symbols "^1.1.0" + which-boxed-primitive "^1.1.1" + undici-types@~5.26.4: version "5.26.5" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" @@ -5322,6 +6480,59 @@ vite@^5.2.0: optionalDependencies: fsevents "~2.3.3" +which-boxed-primitive@^1.1.0, which-boxed-primitive@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz#d76ec27df7fa165f18d5808374a5fe23c29b176e" + integrity sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA== + dependencies: + is-bigint "^1.1.0" + is-boolean-object "^1.2.1" + is-number-object "^1.1.1" + is-string "^1.1.1" + is-symbol "^1.1.1" + +which-builtin-type@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/which-builtin-type/-/which-builtin-type-1.2.1.tgz#89183da1b4907ab089a6b02029cc5d8d6574270e" + integrity sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q== + dependencies: + call-bound "^1.0.2" + function.prototype.name "^1.1.6" + has-tostringtag "^1.0.2" + is-async-function "^2.0.0" + is-date-object "^1.1.0" + is-finalizationregistry "^1.1.0" + is-generator-function "^1.0.10" + is-regex "^1.2.1" + is-weakref "^1.0.2" + isarray "^2.0.5" + which-boxed-primitive "^1.1.0" + which-collection "^1.0.2" + which-typed-array "^1.1.16" + +which-collection@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.2.tgz#627ef76243920a107e7ce8e96191debe4b16c2a0" + integrity sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw== + dependencies: + is-map "^2.0.3" + is-set "^2.0.3" + is-weakmap "^2.0.2" + is-weakset "^2.0.3" + +which-typed-array@^1.1.16, which-typed-array@^1.1.19: + version "1.1.20" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.20.tgz#3fdb7adfafe0ea69157b1509f3a1cd892bd1d122" + integrity sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.8" + call-bound "^1.0.4" + for-each "^0.3.5" + get-proto "^1.0.1" + gopd "^1.2.0" + has-tostringtag "^1.0.2" + which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" diff --git a/package.json b/package.json index 0ce7923..5501cd7 100644 --- a/package.json +++ b/package.json @@ -51,11 +51,12 @@ "@typescript-eslint/parser": "^7.4.0", "cross-env": "^7.0.2", "doctoc": "^2.2.1", - "eslint": "^8.57.0", + "eslint": "8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-config-react-app": "^7.0.1", "eslint-config-standard": "^17.1.0", "eslint-config-standard-react": "^13.0.0", + "eslint-plugin-cypress": "^2.15.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-jest": "^27.9.0", "eslint-plugin-n": "^16.6.2", diff --git a/src/types/index.ts b/src/types/index.ts index 20dddb5..0151805 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -181,7 +181,8 @@ export type ErrorCheckCallback = CheckErrorCallbac export type SubmitSuccessCallback = ( writer: FormState>, - setError: SetError, clearIsDirty: () => void + setError: SetError, + clearIsDirty: () => void ) => void // ─── Deprecated Single-Use Aliases (kept for backward compatibility) ───────── diff --git a/tsconfig.json b/tsconfig.json index 86679cc..89c9d6c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,6 +23,7 @@ "jsx": "preserve" }, "include": [ - "src", + "src/**/*.ts", + "src/**/*.tsx", ] } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index e17afd9..7db43ed 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6149,6 +6149,13 @@ eslint-module-utils@^2.8.0: dependencies: debug "^3.2.7" +eslint-plugin-cypress@^2.15.0: + version "2.15.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-cypress/-/eslint-plugin-cypress-2.15.2.tgz#f22e12fad4c434edad7b298ef92bac8fa087ffa0" + integrity sha512-CtcFEQTDKyftpI22FVGpx8bkpKyYXBlNge6zSo0pl5/qJvBAnzaD76Vu2AsP16d6mTj478Ldn2mhgrWV+Xr0vQ== + dependencies: + globals "^13.20.0" + eslint-plugin-es-x@^7.5.0: version "7.6.0" resolved "https://registry.yarnpkg.com/eslint-plugin-es-x/-/eslint-plugin-es-x-7.6.0.tgz#ccee7a4556c0f816d1ae88fd0eea21540e8ccd65" @@ -6392,7 +6399,7 @@ eslint-webpack-plugin@^3.1.1: normalize-path "^3.0.0" schema-utils "^4.0.0" -eslint@^8.3.0, eslint@^8.57.0: +eslint@8.57.0, eslint@^8.3.0: version "8.57.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== @@ -7123,7 +7130,7 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^13.19.0, globals@^13.24.0: +globals@^13.19.0, globals@^13.20.0, globals@^13.24.0: version "13.24.0" resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==