diff --git a/packages/console/package.json b/packages/console/package.json index 95e572196..34fe369b5 100644 --- a/packages/console/package.json +++ b/packages/console/package.json @@ -61,10 +61,10 @@ "@material-ui/core": "^4.12.4", "@material-ui/icons": "^4.11.3", "@material-ui/pickers": "^3.2.2", - "@rjsf/core": "3.2.1", - "@rjsf/material-ui": "3.2.1", - "@rjsf/utils": "^5.0.0-beta.12", - "@rjsf/validator-ajv6": "^5.0.0-beta.12", + "@rjsf/core": "^5.1.0", + "@rjsf/material-ui": "^5.1.0", + "@rjsf/utils": "^5.1.0", + "@rjsf/validator-ajv8": "^5.1.0", "@types/d3-shape": "^1.2.6", "@xstate/react": "^1.0.0", "axios": "^0.27.2", diff --git a/packages/console/src/components/Launch/LaunchForm/LaunchFormAdvancedInputs.tsx b/packages/console/src/components/Launch/LaunchForm/LaunchFormAdvancedInputs.tsx index 9811305d6..5fa632e89 100644 --- a/packages/console/src/components/Launch/LaunchForm/LaunchFormAdvancedInputs.tsx +++ b/packages/console/src/components/Launch/LaunchForm/LaunchFormAdvancedInputs.tsx @@ -12,6 +12,7 @@ import TextField from '@material-ui/core/TextField'; import Typography from '@material-ui/core/Typography'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; import Form from '@rjsf/material-ui'; +import validator from '@rjsf/validator-ajv8'; import { State } from 'xstate'; import { LaunchAdvancedOptionsRef } from './types'; import { @@ -194,6 +195,7 @@ export const LaunchFormAdvancedInputs = React.forwardRef< }} formData={labelsParamData} onChange={handleLabelsChange} + validator={validator} >
@@ -226,6 +228,7 @@ export const LaunchFormAdvancedInputs = React.forwardRef< }} formData={annotationsParamData} onChange={handleAnnotationsParamData} + validator={validator} >
diff --git a/packages/console/src/components/Launch/LaunchForm/LaunchWorkflowForm.tsx b/packages/console/src/components/Launch/LaunchForm/LaunchWorkflowForm.tsx index ee01653a8..7e6d9f663 100644 --- a/packages/console/src/components/Launch/LaunchForm/LaunchWorkflowForm.tsx +++ b/packages/console/src/components/Launch/LaunchForm/LaunchWorkflowForm.tsx @@ -134,7 +134,12 @@ export const LaunchWorkflowForm: React.FC = props => { showErrors={state.context.showErrors} /> ) : null} - + {isEnterInputsState(baseState) ? ( + + ) : null} = props => { jsonFormRenderable && value ? JSON.parse(value as string) : {}, ); - const onFormChange = ({ formData }, _e) => { + const onFormChange = React.useCallback(({ formData }) => { onChange(JSON.stringify(formData)); setParamData(formData); - }; + }, []); return jsonFormRenderable ? ( @@ -98,6 +99,7 @@ export const StructInput: React.FC = props => {
diff --git a/yarn.lock b/yarn.lock index 87381ae63..a3249fc07 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2119,10 +2119,10 @@ __metadata: "@material-ui/core": ^4.12.4 "@material-ui/icons": ^4.11.3 "@material-ui/pickers": ^3.2.2 - "@rjsf/core": 3.2.1 - "@rjsf/material-ui": 3.2.1 - "@rjsf/utils": ^5.0.0-beta.12 - "@rjsf/validator-ajv6": ^5.0.0-beta.12 + "@rjsf/core": ^5.1.0 + "@rjsf/material-ui": ^5.1.0 + "@rjsf/utils": ^5.1.0 + "@rjsf/validator-ajv8": ^5.1.0 "@types/d3-shape": ^1.2.6 "@types/debug": ^0.0.30 "@types/dom-helpers": ^3.4.1 @@ -3366,6 +3366,21 @@ __metadata: languageName: node linkType: hard +"@rjsf/core@npm:^5.1.0": + version: 5.1.0 + resolution: "@rjsf/core@npm:5.1.0" + dependencies: + lodash: ^4.17.15 + lodash-es: ^4.17.15 + nanoid: ^3.3.4 + prop-types: ^15.7.2 + peerDependencies: + "@rjsf/utils": ^5.0.0 + react: ^16.14.0 || >=17 + checksum: ff38046bb25de86b57e404c5d1ccea84b0485e916caf33a3cb25b030a38ed930a9b89a411671a7c29b047da38e0c682e20b43b13e61d77df770299385ba3c67a + languageName: node + linkType: hard + "@rjsf/material-ui@npm:3.2.1": version: 3.2.1 resolution: "@rjsf/material-ui@npm:3.2.1" @@ -3378,6 +3393,19 @@ __metadata: languageName: node linkType: hard +"@rjsf/material-ui@npm:^5.1.0": + version: 5.1.0 + resolution: "@rjsf/material-ui@npm:5.1.0" + peerDependencies: + "@material-ui/core": ^4.12.3 + "@material-ui/icons": ^4.11.2 + "@rjsf/core": ^5.0.0 + "@rjsf/utils": ^5.0.0 + react: ^16.14.0 || >=17 + checksum: f8e2c486f33a60703cae5bb42ae82bc431b3d743c239868ca71907e7b4127a39d1688200820c0c8acdf3ecd3f5eaddef4ba47264695feead28e9b439d9be7ce8 + languageName: node + linkType: hard + "@rjsf/utils@npm:^5.0.0-beta.12": version: 5.0.0-beta.14 resolution: "@rjsf/utils@npm:5.0.0-beta.14" @@ -3393,6 +3421,21 @@ __metadata: languageName: node linkType: hard +"@rjsf/utils@npm:^5.1.0": + version: 5.1.0 + resolution: "@rjsf/utils@npm:5.1.0" + dependencies: + json-schema-merge-allof: ^0.8.1 + jsonpointer: ^5.0.1 + lodash: ^4.17.15 + lodash-es: ^4.17.15 + react-is: ^18.2.0 + peerDependencies: + react: ^16.14.0 || >=17 + checksum: 76d7caf144f98b1547067bfdc2b1baecf452c63bd9d6f2cae6c162a99154bb4d2f5033f6abc0e26ab767dca9ea743f1f5a9d796696e90dd5ed1fdca5ee3c5280 + languageName: node + linkType: hard + "@rjsf/validator-ajv6@npm:^5.0.0-beta.12": version: 5.0.0-beta.14 resolution: "@rjsf/validator-ajv6@npm:5.0.0-beta.14" @@ -3406,6 +3449,20 @@ __metadata: languageName: node linkType: hard +"@rjsf/validator-ajv8@npm:^5.1.0": + version: 5.1.0 + resolution: "@rjsf/validator-ajv8@npm:5.1.0" + dependencies: + ajv: ^8.12.0 + ajv-formats: ^2.1.1 + lodash: ^4.17.15 + lodash-es: ^4.17.15 + peerDependencies: + "@rjsf/utils": ^5.0.0 + checksum: 3430a0aea8235deedd306b535ea3a62a9bcdd4dcf0bf1d022fe036041dceb5ca7c147b17ae50a0d25bb7c953729e987d96c68f5220f8fde4b56a89cf3f106a49 + languageName: node + linkType: hard + "@semantic-release/changelog@npm:^5.0.1": version: 5.0.1 resolution: "@semantic-release/changelog@npm:5.0.1" @@ -5387,12 +5444,12 @@ __metadata: languageName: node linkType: hard -"@types/morgan@npm:^1.9.3": - version: 1.9.3 - resolution: "@types/morgan@npm:1.9.3" +"@types/morgan@npm:^1.9.4": + version: 1.9.4 + resolution: "@types/morgan@npm:1.9.4" dependencies: "@types/node": "*" - checksum: 0b9bc8641ce03f7176f617523b8da300e5d47225b1667396749950ac7fdfa1f990447d490648fbaff050c2b0ef5fa60c3f2f00c6b76efec06fe5148de5020813 + checksum: d1e99c66a43501dcdf6e94e013dfff4e6c152cbb5f782d954bb722d230a9c1c0fe06fab6df3f3dfa3547735a7598f9471633cc6813d794e9562fd022e217c6ae languageName: node linkType: hard @@ -5756,14 +5813,15 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^5.47.0": - version: 5.47.0 - resolution: "@typescript-eslint/eslint-plugin@npm:5.47.0" +"@typescript-eslint/eslint-plugin@npm:^5.48.2": + version: 5.54.0 + resolution: "@typescript-eslint/eslint-plugin@npm:5.54.0" dependencies: - "@typescript-eslint/scope-manager": 5.47.0 - "@typescript-eslint/type-utils": 5.47.0 - "@typescript-eslint/utils": 5.47.0 + "@typescript-eslint/scope-manager": 5.54.0 + "@typescript-eslint/type-utils": 5.54.0 + "@typescript-eslint/utils": 5.54.0 debug: ^4.3.4 + grapheme-splitter: ^1.0.4 ignore: ^5.2.0 natural-compare-lite: ^1.4.0 regexpp: ^3.2.0 @@ -5775,43 +5833,43 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: fd867eb2b668d1f476fd28d38c2df2a680bf510a265a6e714b28d8f77e7a37e74e32294b70262a6fd1aec99ddb2fddef0212c862b4465ca4f83bb1172476f6e7 + checksum: 4fdb520b8e0f6b9eb878206ddfa4212522f170d1507d7aba8a975159a198efa37af6d2d17982dd560317452d0748f2e2da5dd7347b172bc4446d1c5562ce2e94 languageName: node linkType: hard -"@typescript-eslint/parser@npm:^5.47.0": - version: 5.47.0 - resolution: "@typescript-eslint/parser@npm:5.47.0" +"@typescript-eslint/parser@npm:^5.48.2": + version: 5.54.0 + resolution: "@typescript-eslint/parser@npm:5.54.0" dependencies: - "@typescript-eslint/scope-manager": 5.47.0 - "@typescript-eslint/types": 5.47.0 - "@typescript-eslint/typescript-estree": 5.47.0 + "@typescript-eslint/scope-manager": 5.54.0 + "@typescript-eslint/types": 5.54.0 + "@typescript-eslint/typescript-estree": 5.54.0 debug: ^4.3.4 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 5c864ca74b86ca740c73e5b87d90d43bb832b20ba6be0a39089175435771527722a7bf0a8ef7ddbd64b85235fbb7f6dbe8ae55a8bc73c6242f5559d580a8a80c + checksum: 368d6dd85be42c3f518f0ddeed23ecd1d3c9484a77ae291ee4e08e2703ed379bed613bde014cd8ab2a3e06e85dd8aef201112ae5e3d2a07deba29ae80bb1fe06 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:5.47.0": - version: 5.47.0 - resolution: "@typescript-eslint/scope-manager@npm:5.47.0" +"@typescript-eslint/scope-manager@npm:5.54.0": + version: 5.54.0 + resolution: "@typescript-eslint/scope-manager@npm:5.54.0" dependencies: - "@typescript-eslint/types": 5.47.0 - "@typescript-eslint/visitor-keys": 5.47.0 - checksum: f637268a4cb065a89bb53d72620cc553f8c0d9f00805d6e6aac558cc4d3c08f3329208b0b4d5566d21eb636b080d453e5890221baef0e4bc4d67251f07cccd0d + "@typescript-eslint/types": 5.54.0 + "@typescript-eslint/visitor-keys": 5.54.0 + checksum: e50f12396de0ddb94aab119bdd5f4769b80dd2c273e137fd25e5811e25114d7a3d3668cdb3c454aca9537e940744881d62a1fed2ec86f07f60533dc7382ae15c languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:5.47.0": - version: 5.47.0 - resolution: "@typescript-eslint/type-utils@npm:5.47.0" +"@typescript-eslint/type-utils@npm:5.54.0": + version: 5.54.0 + resolution: "@typescript-eslint/type-utils@npm:5.54.0" dependencies: - "@typescript-eslint/typescript-estree": 5.47.0 - "@typescript-eslint/utils": 5.47.0 + "@typescript-eslint/typescript-estree": 5.54.0 + "@typescript-eslint/utils": 5.54.0 debug: ^4.3.4 tsutils: ^3.21.0 peerDependencies: @@ -5819,23 +5877,23 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 504b3e883ac02cb8e69957b706e76cb79fa2192aa62702c2a658119f28f8f50f1e668efb62318e85aeda6522e1d948b59382cae4ef3300a3f4eea809a87dec26 + checksum: 9cb5b52c7277bdf74b9ea3282fc40f41fda90ea4b1d33039044476e43cf05a766b1294e7d45f429594f2776828f7d17729cfa4ea027315f3df883e748ba57514 languageName: node linkType: hard -"@typescript-eslint/types@npm:5.47.0": - version: 5.47.0 - resolution: "@typescript-eslint/types@npm:5.47.0" - checksum: 5a856e190cc2103427dbe15ccbbf87238261b5ed0859390a9e55f93afc2057f79dcbb4ac0db4d35787466f5e73f271111d19b2e725cf444af41d30e09678bf7a +"@typescript-eslint/types@npm:5.54.0": + version: 5.54.0 + resolution: "@typescript-eslint/types@npm:5.54.0" + checksum: 0f66b1b93078f3afea6dfcd3d4e2f0abea4f60cd0c613c2cf13f85098e5bf786185484c9846ed80b6c4272de2c31a70c5a8aacb91314cf1b6da7dcb8855cb7ac languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:5.47.0": - version: 5.47.0 - resolution: "@typescript-eslint/typescript-estree@npm:5.47.0" +"@typescript-eslint/typescript-estree@npm:5.54.0": + version: 5.54.0 + resolution: "@typescript-eslint/typescript-estree@npm:5.54.0" dependencies: - "@typescript-eslint/types": 5.47.0 - "@typescript-eslint/visitor-keys": 5.47.0 + "@typescript-eslint/types": 5.54.0 + "@typescript-eslint/visitor-keys": 5.54.0 debug: ^4.3.4 globby: ^11.1.0 is-glob: ^4.0.3 @@ -5844,35 +5902,35 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: a9adfe8955b7dc9dfa9f43d450b782b83f506eaadae2a13f4e1bbe6c733be446d3edb26910954aec1bdc60d94ecc55c4e200d5b19bb24e6742f02329a4fb3e8c + checksum: 377c75c34c4f95b7ab6218c1d96a6db3ea6ed6727711b6a09354582fe0157861dc1b6fb9e3f7113cd09741f713735d59d5ab5845457f5733a4ebad7470bf600a languageName: node linkType: hard -"@typescript-eslint/utils@npm:5.47.0": - version: 5.47.0 - resolution: "@typescript-eslint/utils@npm:5.47.0" +"@typescript-eslint/utils@npm:5.54.0": + version: 5.54.0 + resolution: "@typescript-eslint/utils@npm:5.54.0" dependencies: "@types/json-schema": ^7.0.9 "@types/semver": ^7.3.12 - "@typescript-eslint/scope-manager": 5.47.0 - "@typescript-eslint/types": 5.47.0 - "@typescript-eslint/typescript-estree": 5.47.0 + "@typescript-eslint/scope-manager": 5.54.0 + "@typescript-eslint/types": 5.54.0 + "@typescript-eslint/typescript-estree": 5.54.0 eslint-scope: ^5.1.1 eslint-utils: ^3.0.0 semver: ^7.3.7 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: f168920eec6f77651107f190b4ecadd82951fe4e3c0321ff660ac7380f4315d5ae30a1b63b4d2818f5e6f007a3f34c5df202619c24ec3a7e2ef25b215ec7b813 + checksum: b8f344fc2961c7af530b93e53d5a17b5084cdf550b381082e3fb7f349ef16e718d9eebde1b9fc2d8fc4ecf8d60d334b004359977247554265c1afc87323bed37 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:5.47.0": - version: 5.47.0 - resolution: "@typescript-eslint/visitor-keys@npm:5.47.0" +"@typescript-eslint/visitor-keys@npm:5.54.0": + version: 5.54.0 + resolution: "@typescript-eslint/visitor-keys@npm:5.54.0" dependencies: - "@typescript-eslint/types": 5.47.0 + "@typescript-eslint/types": 5.54.0 eslint-visitor-keys: ^3.3.0 - checksum: 2191c079154bdfd1b85b8cd24baa6c0f55c73527c6c8460789483555b4eb5c72e3dc6d1aa4bbac2cf7b86b474588b45682a8deb151e9d903cf72c8f336141f1f + checksum: 17fc323c09e6272b603cdaec30a99916600fbbb737e1fbc8c1727a487753b4363cea112277fa43e0562bff34bdd1de9ad73ff9433118b1fd469b112fad0313ca languageName: node linkType: hard @@ -6524,6 +6582,18 @@ __metadata: languageName: node linkType: hard +"ajv@npm:^8.12.0": + version: 8.12.0 + resolution: "ajv@npm:8.12.0" + dependencies: + fast-deep-equal: ^3.1.1 + json-schema-traverse: ^1.0.0 + require-from-string: ^2.0.2 + uri-js: ^4.2.2 + checksum: 4dc13714e316e67537c8b31bc063f99a1d9d9a497eb4bbd55191ac0dcd5e4985bbb71570352ad6f1e76684fb6d790928f96ba3b2d4fd6e10024be9612fe3f001 + languageName: node + linkType: hard + "ansi-align@npm:^3.0.0": version: 3.0.1 resolution: "ansi-align@npm:3.0.1" @@ -11598,11 +11668,11 @@ __metadata: "@testing-library/jest-dom": ^5.5.0 "@testing-library/react": ^10.0.3 "@testing-library/react-hooks": ^7.0.2 - "@types/morgan": ^1.9.3 - "@types/react": ^16.9.34 + "@types/morgan": ^1.9.4 + "@types/react": ^16.14.35 "@types/react-dom": ^16.9.7 - "@typescript-eslint/eslint-plugin": ^5.47.0 - "@typescript-eslint/parser": ^5.47.0 + "@typescript-eslint/eslint-plugin": ^5.48.2 + "@typescript-eslint/parser": ^5.48.2 babel-loader: ^8.2.5 chalk: ^2.0.1 compression-webpack-plugin: ^9.2.0 @@ -11627,7 +11697,7 @@ __metadata: morgan: ^1.10.0 msw: ^0.24.1 node-polyfill-webpack-plugin: ^2.0.1 - prettier: ^2.5.1 + prettier: ^2.8.3 react: ^16.13.1 react-dom: ^16.13.1 serve-static: ^1.12.3 @@ -17987,12 +18057,12 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^2.5.1": - version: 2.8.1 - resolution: "prettier@npm:2.8.1" +"prettier@npm:^2.8.3": + version: 2.8.4 + resolution: "prettier@npm:2.8.4" bin: prettier: bin-prettier.js - checksum: 4f21a0f1269f76fb36f54e9a8a1ea4c11e27478958bf860661fb4b6d7ac69aac1581f8724fa98ea3585e56d42a2ea317a17ff6e3324f40cb11ff9e20b73785cc + checksum: c173064bf3df57b6d93d19aa98753b9b9dd7657212e33b41ada8e2e9f9884066bb9ca0b4005b89b3ab137efffdf8fbe0b462785aba20364798ff4303aadda57e languageName: node linkType: hard