Skip to content

Commit

Permalink
correctly take added callbacks into account
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-burel committed Oct 3, 2022
1 parent 79346fc commit d9e6a62
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 97 deletions.
7 changes: 3 additions & 4 deletions packages/react-ui/components/form/core/Form/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -340,15 +340,14 @@ export const Form = (props: FormProps) => {
};
const allProps = { ...defaultProps, ...props };
const defaultValues = {};
const submitFormCallbacks: Array<Function> = [];
const successFormCallbacks: Array<Function> = [];
const failureFormCallbacks: Array<Function> = [];
const intl = useIntlContext();

// TODO: call those callbacks where appropriate
const { callbacks, addToFailureForm, addToSubmitForm, addToSuccessForm } =
useSubmitCallbacks();

const { submitFormCallbacks, successFormCallbacks, failureFormCallbacks } =
callbacks;

// --------------------------------------------------------------------- //
// ------------------------------- Errors ------------------------------ //
// --------------------------------------------------------------------- //
Expand Down
186 changes: 93 additions & 93 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10819,25 +10819,25 @@ __metadata:
languageName: node
linkType: hard

"@vulcanjs/core@^0.7.2-alpha.3, @vulcanjs/core@workspace:packages/core":
"@vulcanjs/core@^0.7.2-alpha.8, @vulcanjs/core@workspace:packages/core":
version: 0.0.0-use.local
resolution: "@vulcanjs/core@workspace:packages/core"
dependencies:
"@vulcanjs/utils": ^0.7.2-alpha.3
"@vulcanjs/utils": ^0.7.2-alpha.8
debug: ^4.3.1
lodash: ^4.17.21
languageName: unknown
linkType: soft

"@vulcanjs/crud@^0.7.2-alpha.3, @vulcanjs/crud@workspace:packages/crud":
"@vulcanjs/crud@^0.7.2-alpha.8, @vulcanjs/crud@workspace:packages/crud":
version: 0.0.0-use.local
resolution: "@vulcanjs/crud@workspace:packages/crud"
dependencies:
"@vulcanjs/core": ^0.7.2-alpha.3
"@vulcanjs/model": ^0.7.2-alpha.3
"@vulcanjs/permissions": ^0.7.2-alpha.3
"@vulcanjs/schema": ^0.7.2-alpha.3
"@vulcanjs/utils": ^0.7.2-alpha.3
"@vulcanjs/core": ^0.7.2-alpha.8
"@vulcanjs/model": ^0.7.2-alpha.8
"@vulcanjs/permissions": ^0.7.2-alpha.8
"@vulcanjs/schema": ^0.7.2-alpha.8
"@vulcanjs/utils": ^0.7.2-alpha.8
debug: ^4.3.1
lodash: ^4.17.21
msw: ^0.35.0
Expand All @@ -10864,16 +10864,16 @@ __metadata:
languageName: unknown
linkType: soft

"@vulcanjs/graphql@^0.7.2-alpha.3, @vulcanjs/graphql@workspace:packages/graphql":
"@vulcanjs/graphql@^0.7.2-alpha.8, @vulcanjs/graphql@workspace:packages/graphql":
version: 0.0.0-use.local
resolution: "@vulcanjs/graphql@workspace:packages/graphql"
dependencies:
"@vulcanjs/crud": ^0.7.2-alpha.3
"@vulcanjs/i18n": ^0.7.2-alpha.3
"@vulcanjs/model": ^0.7.2-alpha.3
"@vulcanjs/permissions": ^0.7.2-alpha.3
"@vulcanjs/schema": ^0.7.2-alpha.3
"@vulcanjs/utils": ^0.7.2-alpha.3
"@vulcanjs/crud": ^0.7.2-alpha.8
"@vulcanjs/i18n": ^0.7.2-alpha.8
"@vulcanjs/model": ^0.7.2-alpha.8
"@vulcanjs/permissions": ^0.7.2-alpha.8
"@vulcanjs/schema": ^0.7.2-alpha.8
"@vulcanjs/utils": ^0.7.2-alpha.8
apollo-datasource: ^3.3.1
debug: ^4.3.1
deepmerge: ^4.2.2
Expand All @@ -10893,54 +10893,54 @@ __metadata:
languageName: unknown
linkType: soft

"@vulcanjs/i18n@^0.7.2-alpha.3, @vulcanjs/i18n@workspace:packages/i18n":
"@vulcanjs/i18n@^0.7.2-alpha.8, @vulcanjs/i18n@workspace:packages/i18n":
version: 0.0.0-use.local
resolution: "@vulcanjs/i18n@workspace:packages/i18n"
dependencies:
"@vulcanjs/schema": ^0.7.2-alpha.3
"@vulcanjs/utils": ^0.7.2-alpha.3
"@vulcanjs/schema": ^0.7.2-alpha.8
"@vulcanjs/utils": ^0.7.2-alpha.8
prop-types: ^15.7.2
simpl-schema: ^1.12.0
peerDependencies:
"@apollo/client": ^3.5.5
languageName: unknown
linkType: soft

"@vulcanjs/mdx@^0.7.2-alpha.3, @vulcanjs/mdx@workspace:packages/mdx":
"@vulcanjs/mdx@^0.7.2-alpha.8, @vulcanjs/mdx@workspace:packages/mdx":
version: 0.0.0-use.local
resolution: "@vulcanjs/mdx@workspace:packages/mdx"
languageName: unknown
linkType: soft

"@vulcanjs/meteor-legacy@^0.7.2-alpha.3, @vulcanjs/meteor-legacy@workspace:packages/meteor-legacy":
"@vulcanjs/meteor-legacy@^0.7.2-alpha.8, @vulcanjs/meteor-legacy@workspace:packages/meteor-legacy":
version: 0.0.0-use.local
resolution: "@vulcanjs/meteor-legacy@workspace:packages/meteor-legacy"
dependencies:
"@vulcanjs/graphql": ^0.7.2-alpha.3
"@vulcanjs/graphql": ^0.7.2-alpha.8
lodash: ^4.17.21
peerDependencies:
"@apollo/client": ">= 3.2.0"
graphql: ">= 15.3.0"
languageName: unknown
linkType: soft

"@vulcanjs/model@^0.7.2-alpha.3, @vulcanjs/model@workspace:packages/model":
"@vulcanjs/model@^0.7.2-alpha.8, @vulcanjs/model@workspace:packages/model":
version: 0.0.0-use.local
resolution: "@vulcanjs/model@workspace:packages/model"
dependencies:
"@vulcanjs/schema": ^0.7.2-alpha.3
"@vulcanjs/schema": ^0.7.2-alpha.8
lodash: ^4.17.21
languageName: unknown
linkType: soft

"@vulcanjs/mongo-apollo@^0.7.2-alpha.3, @vulcanjs/mongo-apollo@workspace:packages/mongo-apollo":
"@vulcanjs/mongo-apollo@^0.7.2-alpha.8, @vulcanjs/mongo-apollo@workspace:packages/mongo-apollo":
version: 0.0.0-use.local
resolution: "@vulcanjs/mongo-apollo@workspace:packages/mongo-apollo"
dependencies:
"@vulcanjs/crud": ^0.7.2-alpha.3
"@vulcanjs/graphql": ^0.7.2-alpha.3
"@vulcanjs/mongo": ^0.7.2-alpha.3
"@vulcanjs/utils": ^0.7.2-alpha.3
"@vulcanjs/crud": ^0.7.2-alpha.8
"@vulcanjs/graphql": ^0.7.2-alpha.8
"@vulcanjs/mongo": ^0.7.2-alpha.8
"@vulcanjs/utils": ^0.7.2-alpha.8
apollo-datasource-mongodb: ^0.5.2
graphql-objectid-scalar: ^1.0.4
peerDependencies:
Expand All @@ -10949,15 +10949,15 @@ __metadata:
languageName: unknown
linkType: soft

"@vulcanjs/mongo@^0.7.2-alpha.3, @vulcanjs/mongo@workspace:packages/mongo":
"@vulcanjs/mongo@^0.7.2-alpha.8, @vulcanjs/mongo@workspace:packages/mongo":
version: 0.0.0-use.local
resolution: "@vulcanjs/mongo@workspace:packages/mongo"
dependencies:
"@vulcanjs/crud": ^0.7.2-alpha.3
"@vulcanjs/model": ^0.7.2-alpha.3
"@vulcanjs/permissions": ^0.7.2-alpha.3
"@vulcanjs/schema": ^0.7.2-alpha.3
"@vulcanjs/utils": ^0.7.2-alpha.3
"@vulcanjs/crud": ^0.7.2-alpha.8
"@vulcanjs/model": ^0.7.2-alpha.8
"@vulcanjs/permissions": ^0.7.2-alpha.8
"@vulcanjs/schema": ^0.7.2-alpha.8
"@vulcanjs/utils": ^0.7.2-alpha.8
lodash: ^4.17.20
mongodb-memory-server: ^8.4.0
peerDependencies:
Expand All @@ -10969,29 +10969,29 @@ __metadata:
languageName: unknown
linkType: soft

"@vulcanjs/permissions@^0.7.2-alpha.3, @vulcanjs/permissions@workspace:packages/permissions":
"@vulcanjs/permissions@^0.7.2-alpha.8, @vulcanjs/permissions@workspace:packages/permissions":
version: 0.0.0-use.local
resolution: "@vulcanjs/permissions@workspace:packages/permissions"
dependencies:
"@types/lodash": ^4.14.168
"@vulcanjs/model": ^0.7.2-alpha.3
"@vulcanjs/schema": ^0.7.2-alpha.3
"@vulcanjs/model": ^0.7.2-alpha.8
"@vulcanjs/schema": ^0.7.2-alpha.8
lodash: ^4.17.21
peerDependencies:
react: ^17.0.1
react-dom: ^17.0.1
languageName: unknown
linkType: soft

"@vulcanjs/react-hooks@^0.7.2-alpha.3, @vulcanjs/react-hooks@workspace:packages/react-hooks":
"@vulcanjs/react-hooks@^0.7.2-alpha.8, @vulcanjs/react-hooks@workspace:packages/react-hooks":
version: 0.0.0-use.local
resolution: "@vulcanjs/react-hooks@workspace:packages/react-hooks"
dependencies:
"@testing-library/react-hooks": ^3.4.1
"@vulcanjs/crud": ^0.7.2-alpha.3
"@vulcanjs/graphql": ^0.7.2-alpha.3
"@vulcanjs/mongo": ^0.7.2-alpha.3
"@vulcanjs/schema": ^0.7.2-alpha.3
"@vulcanjs/crud": ^0.7.2-alpha.8
"@vulcanjs/graphql": ^0.7.2-alpha.8
"@vulcanjs/mongo": ^0.7.2-alpha.8
"@vulcanjs/schema": ^0.7.2-alpha.8
debug: ^4.3.1
lodash: ^4.17.20
mingo: ^3.0.6
Expand All @@ -11005,12 +11005,12 @@ __metadata:
languageName: unknown
linkType: soft

"@vulcanjs/react-i18n@^0.7.2-alpha.4, @vulcanjs/react-i18n@workspace:packages/react-i18n":
"@vulcanjs/react-i18n@^0.7.2-alpha.8, @vulcanjs/react-i18n@workspace:packages/react-i18n":
version: 0.0.0-use.local
resolution: "@vulcanjs/react-i18n@workspace:packages/react-i18n"
dependencies:
"@vulcanjs/i18n": ^0.7.2-alpha.3
"@vulcanjs/utils": ^0.7.2-alpha.3
"@vulcanjs/i18n": ^0.7.2-alpha.8
"@vulcanjs/utils": ^0.7.2-alpha.8
prop-types: ^15.7.2
peerDependencies:
"@apollo/client": ^3.5.5
Expand All @@ -11024,9 +11024,9 @@ __metadata:
dependencies:
"@types/lodash": ^4.14.168
"@types/underscore": ^1.11.1
"@vulcanjs/graphql": ^0.7.2-alpha.3
"@vulcanjs/model": ^0.7.2-alpha.3
"@vulcanjs/schema": ^0.7.2-alpha.3
"@vulcanjs/graphql": ^0.7.2-alpha.8
"@vulcanjs/model": ^0.7.2-alpha.8
"@vulcanjs/schema": ^0.7.2-alpha.8
classnames: ^2.3.1
debug: ^4.3.1
lodash: ^4.17.21
Expand All @@ -11042,20 +11042,20 @@ __metadata:
languageName: unknown
linkType: soft

"@vulcanjs/react-ui-lite@^0.7.2-alpha.6, @vulcanjs/react-ui-lite@workspace:packages/react-ui-lite":
"@vulcanjs/react-ui-lite@^0.7.2-alpha.8, @vulcanjs/react-ui-lite@workspace:packages/react-ui-lite":
version: 0.0.0-use.local
resolution: "@vulcanjs/react-ui-lite@workspace:packages/react-ui-lite"
dependencies:
"@types/lodash": ^4.14.168
"@vulcanjs/graphql": ^0.7.2-alpha.3
"@vulcanjs/i18n": ^0.7.2-alpha.3
"@vulcanjs/model": ^0.7.2-alpha.3
"@vulcanjs/permissions": ^0.7.2-alpha.3
"@vulcanjs/react-hooks": ^0.7.2-alpha.3
"@vulcanjs/react-i18n": ^0.7.2-alpha.4
"@vulcanjs/react-ui": ^0.7.2-alpha.5
"@vulcanjs/schema": ^0.7.2-alpha.3
"@vulcanjs/utils": ^0.7.2-alpha.3
"@vulcanjs/graphql": ^0.7.2-alpha.8
"@vulcanjs/i18n": ^0.7.2-alpha.8
"@vulcanjs/model": ^0.7.2-alpha.8
"@vulcanjs/permissions": ^0.7.2-alpha.8
"@vulcanjs/react-hooks": ^0.7.2-alpha.8
"@vulcanjs/react-i18n": ^0.7.2-alpha.8
"@vulcanjs/react-ui": ^0.7.2-alpha.8
"@vulcanjs/schema": ^0.7.2-alpha.8
"@vulcanjs/utils": ^0.7.2-alpha.8
classnames: ^2.3.1
debug: ^4.3.1
lodash: ^4.17.21
Expand All @@ -11079,14 +11079,14 @@ __metadata:
"@mui/styles": ^5.2.1
"@types/lodash": ^4.14.168
"@types/underscore": ^1.11.1
"@vulcanjs/core": ^0.7.2-alpha.3
"@vulcanjs/graphql": ^0.7.2-alpha.3
"@vulcanjs/model": ^0.7.2-alpha.3
"@vulcanjs/permissions": ^0.7.2-alpha.3
"@vulcanjs/react-hooks": ^0.7.2-alpha.3
"@vulcanjs/react-i18n": ^0.7.2-alpha.4
"@vulcanjs/schema": ^0.7.2-alpha.3
"@vulcanjs/utils": ^0.7.2-alpha.3
"@vulcanjs/core": ^0.7.2-alpha.8
"@vulcanjs/graphql": ^0.7.2-alpha.8
"@vulcanjs/model": ^0.7.2-alpha.8
"@vulcanjs/permissions": ^0.7.2-alpha.8
"@vulcanjs/react-hooks": ^0.7.2-alpha.8
"@vulcanjs/react-i18n": ^0.7.2-alpha.8
"@vulcanjs/schema": ^0.7.2-alpha.8
"@vulcanjs/utils": ^0.7.2-alpha.8
autosuggest-highlight: ^3.2.0
classnames: ^2.3.1
create-react-class: ^15.7.0
Expand All @@ -11105,21 +11105,21 @@ __metadata:
languageName: unknown
linkType: soft

"@vulcanjs/react-ui@^0.7.2-alpha.5, @vulcanjs/react-ui@workspace:packages/react-ui":
"@vulcanjs/react-ui@^0.7.2-alpha.8, @vulcanjs/react-ui@workspace:packages/react-ui":
version: 0.0.0-use.local
resolution: "@vulcanjs/react-ui@workspace:packages/react-ui"
dependencies:
"@types/lodash": ^4.14.168
"@types/underscore": ^1.11.1
"@vulcanjs/core": ^0.7.2-alpha.3
"@vulcanjs/graphql": ^0.7.2-alpha.3
"@vulcanjs/i18n": ^0.7.2-alpha.3
"@vulcanjs/model": ^0.7.2-alpha.3
"@vulcanjs/permissions": ^0.7.2-alpha.3
"@vulcanjs/react-hooks": ^0.7.2-alpha.3
"@vulcanjs/react-i18n": ^0.7.2-alpha.4
"@vulcanjs/schema": ^0.7.2-alpha.3
"@vulcanjs/utils": ^0.7.2-alpha.3
"@vulcanjs/core": ^0.7.2-alpha.8
"@vulcanjs/graphql": ^0.7.2-alpha.8
"@vulcanjs/i18n": ^0.7.2-alpha.8
"@vulcanjs/model": ^0.7.2-alpha.8
"@vulcanjs/permissions": ^0.7.2-alpha.8
"@vulcanjs/react-hooks": ^0.7.2-alpha.8
"@vulcanjs/react-i18n": ^0.7.2-alpha.8
"@vulcanjs/schema": ^0.7.2-alpha.8
"@vulcanjs/utils": ^0.7.2-alpha.8
classnames: ^2.3.1
debug: ^4.3.1
lodash: ^4.17.21
Expand Down Expand Up @@ -11163,7 +11163,7 @@ __metadata:
languageName: unknown
linkType: soft

"@vulcanjs/schema@^0.7.2-alpha.3, @vulcanjs/schema@workspace:packages/schema":
"@vulcanjs/schema@^0.7.2-alpha.8, @vulcanjs/schema@workspace:packages/schema":
version: 0.0.0-use.local
resolution: "@vulcanjs/schema@workspace:packages/schema"
dependencies:
Expand All @@ -11172,11 +11172,11 @@ __metadata:
languageName: unknown
linkType: soft

"@vulcanjs/utils@^0.7.2-alpha.3, @vulcanjs/utils@workspace:packages/utils":
"@vulcanjs/utils@^0.7.2-alpha.8, @vulcanjs/utils@workspace:packages/utils":
version: 0.0.0-use.local
resolution: "@vulcanjs/utils@workspace:packages/utils"
dependencies:
"@vulcanjs/model": ^0.7.2-alpha.3
"@vulcanjs/model": ^0.7.2-alpha.8
debug: ^4.3.1
lodash: ^4.17.21
msw: ^0.35.0
Expand Down Expand Up @@ -37631,9 +37631,9 @@ __metadata:
resolution: "vulcan-express@workspace:starters/express"
dependencies:
"@graphql-tools/schema": ^8.3.2
"@vulcanjs/graphql": ^0.7.2-alpha.3
"@vulcanjs/mongo": ^0.7.2-alpha.3
"@vulcanjs/mongo-apollo": ^0.7.2-alpha.3
"@vulcanjs/graphql": ^0.7.2-alpha.8
"@vulcanjs/mongo": ^0.7.2-alpha.8
"@vulcanjs/mongo-apollo": ^0.7.2-alpha.8
apollo-server: 3.9
apollo-server-express: 3.9
express: ^4.17.3
Expand Down Expand Up @@ -37692,17 +37692,17 @@ __metadata:
"@types/react-dom": ^17
"@types/shelljs": ^0.8.8
"@vercel/ncc": ^0.30.0
"@vulcanjs/crud": ^0.7.2-alpha.3
"@vulcanjs/graphql": ^0.7.2-alpha.3
"@vulcanjs/mdx": ^0.7.2-alpha.3
"@vulcanjs/meteor-legacy": ^0.7.2-alpha.3
"@vulcanjs/model": ^0.7.2-alpha.3
"@vulcanjs/mongo": ^0.7.2-alpha.3
"@vulcanjs/mongo-apollo": ^0.7.2-alpha.3
"@vulcanjs/react-hooks": ^0.7.2-alpha.3
"@vulcanjs/react-ui": ^0.7.2-alpha.5
"@vulcanjs/react-ui-lite": ^0.7.2-alpha.6
"@vulcanjs/schema": ^0.7.2-alpha.3
"@vulcanjs/crud": ^0.7.2-alpha.8
"@vulcanjs/graphql": ^0.7.2-alpha.8
"@vulcanjs/mdx": ^0.7.2-alpha.8
"@vulcanjs/meteor-legacy": ^0.7.2-alpha.8
"@vulcanjs/model": ^0.7.2-alpha.8
"@vulcanjs/mongo": ^0.7.2-alpha.8
"@vulcanjs/mongo-apollo": ^0.7.2-alpha.8
"@vulcanjs/react-hooks": ^0.7.2-alpha.8
"@vulcanjs/react-ui": ^0.7.2-alpha.8
"@vulcanjs/react-ui-lite": ^0.7.2-alpha.8
"@vulcanjs/schema": ^0.7.2-alpha.8
apollo-datasource-mongodb: ^0.5.2
apollo-server: 3.9
apollo-server-core: 3.9
Expand Down

2 comments on commit d9e6a62

@vercel
Copy link

@vercel vercel bot commented on d9e6a62 Oct 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vulcan-docs – ./docusaurus

vulcan-docs-vulcan.vercel.app
vulcan-docs.vercel.app
vulcan-docs-git-main-vulcan.vercel.app

@vercel
Copy link

@vercel vercel bot commented on d9e6a62 Oct 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vulcan-npm – ./

vulcan-npm-vulcan.vercel.app
vulcan-npm.vercel.app
vulcan-npm-git-main-vulcan.vercel.app

Please sign in to comment.