From 64b72f439beef6d6564b4affe1ee831bdff663c0 Mon Sep 17 00:00:00 2001 From: jasquat Date: Tue, 2 Apr 2024 12:55:43 -0400 Subject: [PATCH] Revert "Bump @rjsf/utils from 5.0.0-beta.20 to 5.18.1 in /spiffworkflow-frontend (#1301)" This reverts commit 659112a3e47669a9ee32147eef4dbb10b23faf25. --- spiffworkflow-frontend/package-lock.json | 131 ++++++++---------- spiffworkflow-frontend/package.json | 8 +- .../SelectWidget/SelectWidget.tsx | 12 +- 3 files changed, 66 insertions(+), 85 deletions(-) diff --git a/spiffworkflow-frontend/package-lock.json b/spiffworkflow-frontend/package-lock.json index 2f58622a2..a865a644f 100644 --- a/spiffworkflow-frontend/package-lock.json +++ b/spiffworkflow-frontend/package-lock.json @@ -21,10 +21,10 @@ "@monaco-editor/react": "^4.4.5", "@mui/material": "^5.10.14", "@react-icons/all-files": "^4.1.0", - "@rjsf/core": "5.18.1", - "@rjsf/mui": "5.18.1", - "@rjsf/utils": "5.18.1", - "@rjsf/validator-ajv8": "5.18.1", + "@rjsf/core": "5.0.0-beta.20", + "@rjsf/mui": "5.0.0-beta.20", + "@rjsf/utils": "5.0.0-beta.20", + "@rjsf/validator-ajv8": "5.0.0-beta.20", "@tanstack/react-query": "^5.28.6", "@tanstack/react-query-devtools": "^5.28.6", "@testing-library/jest-dom": "^6.4.2", @@ -4945,28 +4945,27 @@ } }, "node_modules/@rjsf/core": { - "version": "5.18.1", - "resolved": "https://registry.npmjs.org/@rjsf/core/-/core-5.18.1.tgz", - "integrity": "sha512-325fOPqupCkEkH4/ufeAbaezyknCTRQx8XeK9PhtWBSwpVggJg003C2RFL7g7HdFkz546KjEBGKeJ74HXC/kVg==", + "version": "5.0.0-beta.20", + "resolved": "https://registry.npmjs.org/@rjsf/core/-/core-5.0.0-beta.20.tgz", + "integrity": "sha512-dPm7Wbm5ZT9y5frr0vtcr0MvpitbO6ApITmavIGN2tIdQveVVzavSJ4kZR7T17R6aw71TMtD3UOobwIh8IslLQ==", "dependencies": { - "lodash": "^4.17.21", - "lodash-es": "^4.17.21", - "markdown-to-jsx": "^7.4.1", - "nanoid": "^3.3.7", - "prop-types": "^15.8.1" + "lodash": "^4.17.15", + "lodash-es": "^4.17.15", + "nanoid": "^3.3.4", + "prop-types": "^15.7.2" }, "engines": { "node": ">=14" }, "peerDependencies": { - "@rjsf/utils": "^5.18.x", + "@rjsf/utils": "^5.0.0-beta.1", "react": "^16.14.0 || >=17" } }, "node_modules/@rjsf/mui": { - "version": "5.18.1", - "resolved": "https://registry.npmjs.org/@rjsf/mui/-/mui-5.18.1.tgz", - "integrity": "sha512-QVu62jWmFLJD/16F11frSAIp6JpR5TGLsNbpgYp8r7d+SxnIfUPzzhlIplNBcVXqzBujWYkSd+cGQH8bevw/MA==", + "version": "5.0.0-beta.20", + "resolved": "https://registry.npmjs.org/@rjsf/mui/-/mui-5.0.0-beta.20.tgz", + "integrity": "sha512-DEZakIemrOSS4wQGTrvYVgwWXUCWaV4MQdPUC0rp7YQUKrB88V7Ys7rV2BLn5Iq/wcMyu35o+zwDAQv6YaEAEw==", "engines": { "node": ">=14" }, @@ -4975,20 +4974,20 @@ "@emotion/styled": "^11.6.0", "@mui/icons-material": "^5.2.0", "@mui/material": "^5.2.2", - "@rjsf/core": "^5.18.x", - "@rjsf/utils": "^5.18.x", + "@rjsf/core": "^5.0.0-beta.1", + "@rjsf/utils": "^5.0.0-beta.1", "react": ">=17" } }, "node_modules/@rjsf/utils": { - "version": "5.18.1", - "resolved": "https://registry.npmjs.org/@rjsf/utils/-/utils-5.18.1.tgz", - "integrity": "sha512-BxXd5C8gxOSDCSgfDT+XZHpBZtu4F0jJZsnMQstWJ+9QKpmTiuvbkjk3c1J4zZ3CRNgGghVH5otU5gvzVWIxpQ==", + "version": "5.0.0-beta.20", + "resolved": "https://registry.npmjs.org/@rjsf/utils/-/utils-5.0.0-beta.20.tgz", + "integrity": "sha512-ToYHJj6s9TrcHULmx1nDEVOk+TxmpylsFBUnVV8Wm2e5SFqs4TQ5cJLD84h1BP8Cv5OeEdarq7Q6uhiNjs0Qxg==", "dependencies": { "json-schema-merge-allof": "^0.8.1", "jsonpointer": "^5.0.1", - "lodash": "^4.17.21", - "lodash-es": "^4.17.21", + "lodash": "^4.17.15", + "lodash-es": "^4.17.15", "react-is": "^18.2.0" }, "engines": { @@ -4999,20 +4998,20 @@ } }, "node_modules/@rjsf/validator-ajv8": { - "version": "5.18.1", - "resolved": "https://registry.npmjs.org/@rjsf/validator-ajv8/-/validator-ajv8-5.18.1.tgz", - "integrity": "sha512-Cb4++kru+XL8q5FJDWMpongtY7zLUoNqZaHDbYdkPWLl0Q7duGMfYOIRAhPpWhaI9KAjj19kCpAjQicA8gEgaw==", + "version": "5.0.0-beta.20", + "resolved": "https://registry.npmjs.org/@rjsf/validator-ajv8/-/validator-ajv8-5.0.0-beta.20.tgz", + "integrity": "sha512-QzNX76ec7EoyazMZ/yJRo+DbSWKVLJghZxVOBYU8vm0jL7sK/lqROjeQUJuD2TVyT5zJC7QimFAIKSEKZQz/vg==", "dependencies": { - "ajv": "^8.12.0", + "ajv": "^8.11.0", "ajv-formats": "^2.1.1", - "lodash": "^4.17.21", - "lodash-es": "^4.17.21" + "lodash": "^4.17.15", + "lodash-es": "^4.17.15" }, "engines": { "node": ">=14" }, "peerDependencies": { - "@rjsf/utils": "^5.18.x" + "@rjsf/utils": "^5.0.0-beta.16" } }, "node_modules/@rollup/plugin-babel": { @@ -22122,17 +22121,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/markdown-to-jsx": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/markdown-to-jsx/-/markdown-to-jsx-7.4.5.tgz", - "integrity": "sha512-c8NB0H/ig+FOWssE9be0PKsYbCDhcWEkicxMnpdfUuHbFljnen4LAdgUShOyR/PgO3/qKvt9cwfQ0U/zQvZ44A==", - "engines": { - "node": ">= 10" - }, - "peerDependencies": { - "react": ">= 0.14.0" - } - }, "node_modules/matcher": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz", @@ -23290,9 +23278,9 @@ "optional": true }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", "funding": [ { "type": "github", @@ -37822,44 +37810,43 @@ "integrity": "sha512-zcU0gM3z+3iqj8UX45AmWY810l3oUmXM7uH4dt5xtzvMhRtYVhKGOmgOd1877dOPPepfCjUv57w+syamWIYe7w==" }, "@rjsf/core": { - "version": "5.18.1", - "resolved": "https://registry.npmjs.org/@rjsf/core/-/core-5.18.1.tgz", - "integrity": "sha512-325fOPqupCkEkH4/ufeAbaezyknCTRQx8XeK9PhtWBSwpVggJg003C2RFL7g7HdFkz546KjEBGKeJ74HXC/kVg==", + "version": "5.0.0-beta.20", + "resolved": "https://registry.npmjs.org/@rjsf/core/-/core-5.0.0-beta.20.tgz", + "integrity": "sha512-dPm7Wbm5ZT9y5frr0vtcr0MvpitbO6ApITmavIGN2tIdQveVVzavSJ4kZR7T17R6aw71TMtD3UOobwIh8IslLQ==", "requires": { - "lodash": "^4.17.21", - "lodash-es": "^4.17.21", - "markdown-to-jsx": "^7.4.1", - "nanoid": "^3.3.7", - "prop-types": "^15.8.1" + "lodash": "^4.17.15", + "lodash-es": "^4.17.15", + "nanoid": "^3.3.4", + "prop-types": "^15.7.2" } }, "@rjsf/mui": { - "version": "5.18.1", - "resolved": "https://registry.npmjs.org/@rjsf/mui/-/mui-5.18.1.tgz", - "integrity": "sha512-QVu62jWmFLJD/16F11frSAIp6JpR5TGLsNbpgYp8r7d+SxnIfUPzzhlIplNBcVXqzBujWYkSd+cGQH8bevw/MA==", + "version": "5.0.0-beta.20", + "resolved": "https://registry.npmjs.org/@rjsf/mui/-/mui-5.0.0-beta.20.tgz", + "integrity": "sha512-DEZakIemrOSS4wQGTrvYVgwWXUCWaV4MQdPUC0rp7YQUKrB88V7Ys7rV2BLn5Iq/wcMyu35o+zwDAQv6YaEAEw==", "requires": {} }, "@rjsf/utils": { - "version": "5.18.1", - "resolved": "https://registry.npmjs.org/@rjsf/utils/-/utils-5.18.1.tgz", - "integrity": "sha512-BxXd5C8gxOSDCSgfDT+XZHpBZtu4F0jJZsnMQstWJ+9QKpmTiuvbkjk3c1J4zZ3CRNgGghVH5otU5gvzVWIxpQ==", + "version": "5.0.0-beta.20", + "resolved": "https://registry.npmjs.org/@rjsf/utils/-/utils-5.0.0-beta.20.tgz", + "integrity": "sha512-ToYHJj6s9TrcHULmx1nDEVOk+TxmpylsFBUnVV8Wm2e5SFqs4TQ5cJLD84h1BP8Cv5OeEdarq7Q6uhiNjs0Qxg==", "requires": { "json-schema-merge-allof": "^0.8.1", "jsonpointer": "^5.0.1", - "lodash": "^4.17.21", - "lodash-es": "^4.17.21", + "lodash": "^4.17.15", + "lodash-es": "^4.17.15", "react-is": "^18.2.0" } }, "@rjsf/validator-ajv8": { - "version": "5.18.1", - "resolved": "https://registry.npmjs.org/@rjsf/validator-ajv8/-/validator-ajv8-5.18.1.tgz", - "integrity": "sha512-Cb4++kru+XL8q5FJDWMpongtY7zLUoNqZaHDbYdkPWLl0Q7duGMfYOIRAhPpWhaI9KAjj19kCpAjQicA8gEgaw==", + "version": "5.0.0-beta.20", + "resolved": "https://registry.npmjs.org/@rjsf/validator-ajv8/-/validator-ajv8-5.0.0-beta.20.tgz", + "integrity": "sha512-QzNX76ec7EoyazMZ/yJRo+DbSWKVLJghZxVOBYU8vm0jL7sK/lqROjeQUJuD2TVyT5zJC7QimFAIKSEKZQz/vg==", "requires": { - "ajv": "^8.12.0", + "ajv": "^8.11.0", "ajv-formats": "^2.1.1", - "lodash": "^4.17.21", - "lodash-es": "^4.17.21" + "lodash": "^4.17.15", + "lodash-es": "^4.17.15" } }, "@rollup/plugin-babel": { @@ -50906,12 +50893,6 @@ "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.3.tgz", "integrity": "sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==" }, - "markdown-to-jsx": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/markdown-to-jsx/-/markdown-to-jsx-7.4.5.tgz", - "integrity": "sha512-c8NB0H/ig+FOWssE9be0PKsYbCDhcWEkicxMnpdfUuHbFljnen4LAdgUShOyR/PgO3/qKvt9cwfQ0U/zQvZ44A==", - "requires": {} - }, "matcher": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz", @@ -51709,9 +51690,9 @@ "optional": true }, "nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==" + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==" }, "nanolru": { "version": "1.0.0", diff --git a/spiffworkflow-frontend/package.json b/spiffworkflow-frontend/package.json index e6fbe7c09..b97c45fdf 100644 --- a/spiffworkflow-frontend/package.json +++ b/spiffworkflow-frontend/package.json @@ -16,10 +16,10 @@ "@monaco-editor/react": "^4.4.5", "@mui/material": "^5.10.14", "@react-icons/all-files": "^4.1.0", - "@rjsf/core": "5.18.1", - "@rjsf/mui": "5.18.1", - "@rjsf/utils": "5.18.1", - "@rjsf/validator-ajv8": "5.18.1", + "@rjsf/core": "5.0.0-beta.20", + "@rjsf/mui": "5.0.0-beta.20", + "@rjsf/utils": "5.0.0-beta.20", + "@rjsf/validator-ajv8": "5.0.0-beta.20", "@tanstack/react-query": "^5.28.6", "@tanstack/react-query-devtools": "^5.28.6", "@testing-library/jest-dom": "^6.4.2", diff --git a/spiffworkflow-frontend/src/rjsf/carbon_theme/SelectWidget/SelectWidget.tsx b/spiffworkflow-frontend/src/rjsf/carbon_theme/SelectWidget/SelectWidget.tsx index b9751c024..525f78594 100644 --- a/spiffworkflow-frontend/src/rjsf/carbon_theme/SelectWidget/SelectWidget.tsx +++ b/spiffworkflow-frontend/src/rjsf/carbon_theme/SelectWidget/SelectWidget.tsx @@ -1,5 +1,5 @@ import { Select, SelectItem } from '@carbon/react'; -import { WidgetProps, enumOptionsValueForIndex } from '@rjsf/utils'; +import { WidgetProps, processSelectValue } from '@rjsf/utils'; import { getCommonAttributes } from '../../helpers'; function SelectWidget({ @@ -20,21 +20,21 @@ function SelectWidget({ placeholder, rawErrors = [], }: WidgetProps) { - const { enumOptions, emptyValue: optEmptyVal } = options; + const { enumOptions } = options; let { enumDisabled } = options; const emptyValue = multiple ? [] : ''; const _onChange = ({ target: { value }, - }: React.ChangeEvent<{ name?: string; value: string }>) => - onChange(enumOptionsValueForIndex(value, enumOptions, optEmptyVal)); + }: React.ChangeEvent<{ name?: string; value: unknown }>) => + onChange(processSelectValue(schema, value, options)); const _onBlur = ({ target: { value } }: React.FocusEvent) => - onBlur(id, enumOptionsValueForIndex(value, enumOptions, optEmptyVal)); + onBlur(id, processSelectValue(schema, value, options)); const _onFocus = ({ target: { value }, }: React.FocusEvent) => - onFocus(id, enumOptionsValueForIndex(value, enumOptions, optEmptyVal)); + onFocus(id, processSelectValue(schema, value, options)); const commonAttributes = getCommonAttributes( label,