diff --git a/appv2/package-lock.json b/appv2/package-lock.json index 95ebeceb4..a8b521863 100644 --- a/appv2/package-lock.json +++ b/appv2/package-lock.json @@ -34,10 +34,10 @@ "@mui/x-data-grid": "^5.17.18", "@react-leaflet/core": "^2.1.0", "@reduxjs/toolkit": "^1.9.5", - "@rjsf/core": "^5.0.0-beta.15", - "@rjsf/mui": "^5.0.0-beta.15", - "@rjsf/utils": "^5.0.0-beta.15", - "@rjsf/validator-ajv6": "^5.0.0-beta.15", + "@rjsf/core": "^5.15.0", + "@rjsf/mui": "^5.15.0", + "@rjsf/utils": "^5.15.0", + "@rjsf/validator-ajv8": "^5.15.0", "@testing-library/jest-dom": "^4.2.4", "@testing-library/user-event": "^8.1.3", "@tmcw/togeojson": "^4.4.1", @@ -3106,9 +3106,9 @@ } }, "node_modules/@rjsf/core": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@rjsf/core/-/core-5.12.1.tgz", - "integrity": "sha512-1YFhZ90/uHRx1akQmDdIjBxGMjs/5gtuTLUFwl6GbOwTm2fhZRh3qXRFyTXz81Oy6TGcbrxBJEYvFg2iHjYKCA==", + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/@rjsf/core/-/core-5.15.0.tgz", + "integrity": "sha512-tD+S0Sx6TtiW1Wp2E8fLArlKcPDXaOS0MBnM6FNWZuum1bbQFoavjm/wf0PpKQ2AohsKGvWXjIAajC+HX4Anww==", "dependencies": { "lodash": "^4.17.21", "lodash-es": "^4.17.21", @@ -3120,14 +3120,14 @@ "node": ">=14" }, "peerDependencies": { - "@rjsf/utils": "^5.8.x", + "@rjsf/utils": "^5.12.x", "react": "^16.14.0 || >=17" } }, "node_modules/@rjsf/mui": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@rjsf/mui/-/mui-5.12.1.tgz", - "integrity": "sha512-d7cNFIdt6N24m5NPrNSqfCe2SUyUjX48Goo7z4J9vOHWxo5kdDfBEa3UwNA/DR9lo+9cYY7QTvKbgrTkxWU58A==", + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/@rjsf/mui/-/mui-5.15.0.tgz", + "integrity": "sha512-OQ2fivrW2O0mMQx7pJGe5zLyaAPyqvFyktatWpNQV2Gge/Ge0IDmtN0VMU6Im48JZECjO35l5W+LGEEABQ/UNA==", "engines": { "node": ">=14" }, @@ -3136,15 +3136,15 @@ "@emotion/styled": "^11.6.0", "@mui/icons-material": "^5.2.0", "@mui/material": "^5.2.2", - "@rjsf/core": "^5.8.x", - "@rjsf/utils": "^5.8.x", + "@rjsf/core": "^5.12.x", + "@rjsf/utils": "^5.12.x", "react": ">=17" } }, "node_modules/@rjsf/utils": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@rjsf/utils/-/utils-5.12.1.tgz", - "integrity": "sha512-/k8+7WdLwhaYsOQvH5BQINipj2IJvjEW3QQv4jQQ7sXtkpdUjieZayRfaE8DHfRdm9HjgJURJFDy3EODkWPl6A==", + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/@rjsf/utils/-/utils-5.15.0.tgz", + "integrity": "sha512-+K+WA/tGD8jSDRB6QzCvyCY0/rVZ+q/u0f07AGfx/h/ICVcJjOy5fWtUANQ0bBltLNPqjXqpFb3e3SxDXzSVaA==", "dependencies": { "json-schema-merge-allof": "^0.8.1", "jsonpointer": "^5.0.1", @@ -3159,12 +3159,13 @@ "react": "^16.14.0 || >=17" } }, - "node_modules/@rjsf/validator-ajv6": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@rjsf/validator-ajv6/-/validator-ajv6-5.12.1.tgz", - "integrity": "sha512-NzywRc+lX7POq3iSGgjXAiMMYuQnoLoGbC32DYgmQ2st+LOuws5Yc6ToG5dX05uEuL95MOjnOk+f+3vSPiLL1A==", + "node_modules/@rjsf/validator-ajv8": { + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/@rjsf/validator-ajv8/-/validator-ajv8-5.15.0.tgz", + "integrity": "sha512-+kSemuPRZzayt+CQHu2f4oN6CeCn7gSxQYC8CU3gDZXL48HKlvnq8VlgFWetbtawojQ7x8NjAyuBTJDIP/TqZg==", "dependencies": { - "ajv": "^6.12.6", + "ajv": "^8.12.0", + "ajv-formats": "^2.1.1", "lodash": "^4.17.21", "lodash-es": "^4.17.21" }, @@ -3172,9 +3173,29 @@ "node": ">=14" }, "peerDependencies": { - "@rjsf/utils": "^5.8.x" + "@rjsf/utils": "^5.12.x" } }, + "node_modules/@rjsf/validator-ajv8/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@rjsf/validator-ajv8/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, "node_modules/@rollup/plugin-commonjs": { "version": "24.1.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-24.1.0.tgz", @@ -5907,6 +5928,42 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-formats/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, "node_modules/ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -16398,7 +16455,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -21659,9 +21715,9 @@ } }, "@rjsf/core": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@rjsf/core/-/core-5.12.1.tgz", - "integrity": "sha512-1YFhZ90/uHRx1akQmDdIjBxGMjs/5gtuTLUFwl6GbOwTm2fhZRh3qXRFyTXz81Oy6TGcbrxBJEYvFg2iHjYKCA==", + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/@rjsf/core/-/core-5.15.0.tgz", + "integrity": "sha512-tD+S0Sx6TtiW1Wp2E8fLArlKcPDXaOS0MBnM6FNWZuum1bbQFoavjm/wf0PpKQ2AohsKGvWXjIAajC+HX4Anww==", "requires": { "lodash": "^4.17.21", "lodash-es": "^4.17.21", @@ -21671,14 +21727,14 @@ } }, "@rjsf/mui": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@rjsf/mui/-/mui-5.12.1.tgz", - "integrity": "sha512-d7cNFIdt6N24m5NPrNSqfCe2SUyUjX48Goo7z4J9vOHWxo5kdDfBEa3UwNA/DR9lo+9cYY7QTvKbgrTkxWU58A==" + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/@rjsf/mui/-/mui-5.15.0.tgz", + "integrity": "sha512-OQ2fivrW2O0mMQx7pJGe5zLyaAPyqvFyktatWpNQV2Gge/Ge0IDmtN0VMU6Im48JZECjO35l5W+LGEEABQ/UNA==" }, "@rjsf/utils": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@rjsf/utils/-/utils-5.12.1.tgz", - "integrity": "sha512-/k8+7WdLwhaYsOQvH5BQINipj2IJvjEW3QQv4jQQ7sXtkpdUjieZayRfaE8DHfRdm9HjgJURJFDy3EODkWPl6A==", + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/@rjsf/utils/-/utils-5.15.0.tgz", + "integrity": "sha512-+K+WA/tGD8jSDRB6QzCvyCY0/rVZ+q/u0f07AGfx/h/ICVcJjOy5fWtUANQ0bBltLNPqjXqpFb3e3SxDXzSVaA==", "requires": { "json-schema-merge-allof": "^0.8.1", "jsonpointer": "^5.0.1", @@ -21687,14 +21743,33 @@ "react-is": "^18.2.0" } }, - "@rjsf/validator-ajv6": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@rjsf/validator-ajv6/-/validator-ajv6-5.12.1.tgz", - "integrity": "sha512-NzywRc+lX7POq3iSGgjXAiMMYuQnoLoGbC32DYgmQ2st+LOuws5Yc6ToG5dX05uEuL95MOjnOk+f+3vSPiLL1A==", + "@rjsf/validator-ajv8": { + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/@rjsf/validator-ajv8/-/validator-ajv8-5.15.0.tgz", + "integrity": "sha512-+kSemuPRZzayt+CQHu2f4oN6CeCn7gSxQYC8CU3gDZXL48HKlvnq8VlgFWetbtawojQ7x8NjAyuBTJDIP/TqZg==", "requires": { - "ajv": "^6.12.6", + "ajv": "^8.12.0", + "ajv-formats": "^2.1.1", "lodash": "^4.17.21", "lodash-es": "^4.17.21" + }, + "dependencies": { + "ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + } } }, "@rollup/plugin-commonjs": { @@ -23874,6 +23949,32 @@ "uri-js": "^4.2.2" } }, + "ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "requires": { + "ajv": "^8.0.0" + }, + "dependencies": { + "ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + } + } + }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -31841,8 +31942,7 @@ "require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" }, "require-main-filename": { "version": "2.0.0", diff --git a/appv2/package.json b/appv2/package.json index 7dd0be70d..f8b4c1698 100644 --- a/appv2/package.json +++ b/appv2/package.json @@ -37,10 +37,10 @@ "@mui/x-data-grid": "^5.17.18", "@react-leaflet/core": "^2.1.0", "@reduxjs/toolkit": "^1.9.5", - "@rjsf/core": "^5.0.0-beta.15", - "@rjsf/mui": "^5.0.0-beta.15", - "@rjsf/utils": "^5.0.0-beta.15", - "@rjsf/validator-ajv6": "^5.0.0-beta.15", + "@rjsf/core": "^5.15.0", + "@rjsf/mui": "^5.15.0", + "@rjsf/utils": "^5.15.0", + "@rjsf/validator-ajv8": "^5.15.0", "@testing-library/jest-dom": "^4.2.4", "@testing-library/user-event": "^8.1.3", "@tmcw/togeojson": "^4.4.1", diff --git a/appv2/src/UI/Overlay/Admin/email-setup/EmailSettings.tsx b/appv2/src/UI/Overlay/Admin/email-setup/EmailSettings.tsx index a47347ace..a5136de40 100644 --- a/appv2/src/UI/Overlay/Admin/email-setup/EmailSettings.tsx +++ b/appv2/src/UI/Overlay/Admin/email-setup/EmailSettings.tsx @@ -1,5 +1,5 @@ import { RJSFSchema, UiSchema } from '@rjsf/utils'; -import validator from '@rjsf/validator-ajv6'; +import validator from '@rjsf/validator-ajv8'; import React, { useEffect } from 'react'; import { Form } from '@rjsf/mui'; import { diff --git a/appv2/src/UI/Overlay/Admin/email-setup/EmailTemplates.tsx b/appv2/src/UI/Overlay/Admin/email-setup/EmailTemplates.tsx index d8c75c5ad..9ccb60093 100644 --- a/appv2/src/UI/Overlay/Admin/email-setup/EmailTemplates.tsx +++ b/appv2/src/UI/Overlay/Admin/email-setup/EmailTemplates.tsx @@ -1,7 +1,7 @@ import { Card, CardContent, Grid } from '@mui/material'; import { Form } from '@rjsf/mui'; import { RJSFSchema, UiSchema } from '@rjsf/utils'; -import validator from '@rjsf/validator-ajv6'; +import validator from '@rjsf/validator-ajv8'; import React, { useEffect } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { EMAIL_TEMPLATES_RETRIEVE_REQUEST, EMAIL_TEMPLATES_SET_ACTIVE, EMAIL_TEMPLATES_UPDATE } from 'state/actions'; diff --git a/appv2/src/UI/Overlay/Records/Activity/form/FormContainer.tsx b/appv2/src/UI/Overlay/Records/Activity/form/FormContainer.tsx index 4cf42bea0..31319f788 100644 --- a/appv2/src/UI/Overlay/Records/Activity/form/FormContainer.tsx +++ b/appv2/src/UI/Overlay/Records/Activity/form/FormContainer.tsx @@ -32,7 +32,7 @@ import { selectActivity } from 'state/reducers/activity'; import { useDispatch } from 'react-redux'; import { ACTIVITY_CHEM_TREATMENT_DETAILS_FORM_ON_CHANGE_REQUEST, ACTIVITY_ON_FORM_CHANGE_REQUEST } from 'state/actions'; import { selectUserSettings } from 'state/reducers/userSettings'; -import validator from '@rjsf/validator-ajv6'; +import validator from '@rjsf/validator-ajv8'; import 'UI/Overlay/Records/Activity/form/aditionalFormStyles.css' import { getCustomErrorTransformer } from 'rjsf/business-rules/customErrorTransformer'; import _ from 'lodash'; @@ -76,7 +76,7 @@ const FormContainer: React.FC = (props) => { const dispatch = useDispatch(); console.log('rendering') - const debouncedFormChange = + const debouncedFormChange = _.debounce((event, ref, lastField, callbackFun) => { //(event, ref, lastField, callbackFun) => { dispatch({ @@ -313,7 +313,6 @@ const FormContainer: React.FC = (props) => { debouncedFormChange(event, formRef, focusedFieldArgs, (updatedFormData) => { //setformData(updatedFormData); }); - console.log('AFTER DEBOUNCE') }} onError={(error) => { if (!props.onFormSubmitError) { diff --git a/database/src/migrations/fix.sql b/database/src/migrations/fix.sql new file mode 100644 index 000000000..e69de29bb