Merge branch 'main' of github.com:sartography/spiff-arena
This commit is contained in:
commit
826a16f0ea
|
@ -21,10 +21,10 @@
|
||||||
"@monaco-editor/react": "^4.4.5",
|
"@monaco-editor/react": "^4.4.5",
|
||||||
"@mui/material": "^5.10.14",
|
"@mui/material": "^5.10.14",
|
||||||
"@react-icons/all-files": "^4.1.0",
|
"@react-icons/all-files": "^4.1.0",
|
||||||
"@rjsf/core": "5.0.0-beta.20",
|
"@rjsf/core": "5.18.1",
|
||||||
"@rjsf/mui": "5.0.0-beta.20",
|
"@rjsf/mui": "5.18.1",
|
||||||
"@rjsf/utils": "5.0.0-beta.20",
|
"@rjsf/utils": "5.18.1",
|
||||||
"@rjsf/validator-ajv8": "5.0.0-beta.20",
|
"@rjsf/validator-ajv8": "5.18.1",
|
||||||
"@tanstack/react-query": "^5.28.6",
|
"@tanstack/react-query": "^5.28.6",
|
||||||
"@tanstack/react-query-devtools": "^5.28.6",
|
"@tanstack/react-query-devtools": "^5.28.6",
|
||||||
"@testing-library/jest-dom": "^6.4.2",
|
"@testing-library/jest-dom": "^6.4.2",
|
||||||
|
@ -4945,27 +4945,28 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rjsf/core": {
|
"node_modules/@rjsf/core": {
|
||||||
"version": "5.0.0-beta.20",
|
"version": "5.18.1",
|
||||||
"resolved": "https://registry.npmjs.org/@rjsf/core/-/core-5.0.0-beta.20.tgz",
|
"resolved": "https://registry.npmjs.org/@rjsf/core/-/core-5.18.1.tgz",
|
||||||
"integrity": "sha512-dPm7Wbm5ZT9y5frr0vtcr0MvpitbO6ApITmavIGN2tIdQveVVzavSJ4kZR7T17R6aw71TMtD3UOobwIh8IslLQ==",
|
"integrity": "sha512-325fOPqupCkEkH4/ufeAbaezyknCTRQx8XeK9PhtWBSwpVggJg003C2RFL7g7HdFkz546KjEBGKeJ74HXC/kVg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.21",
|
||||||
"lodash-es": "^4.17.15",
|
"lodash-es": "^4.17.21",
|
||||||
"nanoid": "^3.3.4",
|
"markdown-to-jsx": "^7.4.1",
|
||||||
"prop-types": "^15.7.2"
|
"nanoid": "^3.3.7",
|
||||||
|
"prop-types": "^15.8.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14"
|
"node": ">=14"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@rjsf/utils": "^5.0.0-beta.1",
|
"@rjsf/utils": "^5.18.x",
|
||||||
"react": "^16.14.0 || >=17"
|
"react": "^16.14.0 || >=17"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rjsf/mui": {
|
"node_modules/@rjsf/mui": {
|
||||||
"version": "5.0.0-beta.20",
|
"version": "5.18.1",
|
||||||
"resolved": "https://registry.npmjs.org/@rjsf/mui/-/mui-5.0.0-beta.20.tgz",
|
"resolved": "https://registry.npmjs.org/@rjsf/mui/-/mui-5.18.1.tgz",
|
||||||
"integrity": "sha512-DEZakIemrOSS4wQGTrvYVgwWXUCWaV4MQdPUC0rp7YQUKrB88V7Ys7rV2BLn5Iq/wcMyu35o+zwDAQv6YaEAEw==",
|
"integrity": "sha512-QVu62jWmFLJD/16F11frSAIp6JpR5TGLsNbpgYp8r7d+SxnIfUPzzhlIplNBcVXqzBujWYkSd+cGQH8bevw/MA==",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14"
|
"node": ">=14"
|
||||||
},
|
},
|
||||||
|
@ -4974,20 +4975,20 @@
|
||||||
"@emotion/styled": "^11.6.0",
|
"@emotion/styled": "^11.6.0",
|
||||||
"@mui/icons-material": "^5.2.0",
|
"@mui/icons-material": "^5.2.0",
|
||||||
"@mui/material": "^5.2.2",
|
"@mui/material": "^5.2.2",
|
||||||
"@rjsf/core": "^5.0.0-beta.1",
|
"@rjsf/core": "^5.18.x",
|
||||||
"@rjsf/utils": "^5.0.0-beta.1",
|
"@rjsf/utils": "^5.18.x",
|
||||||
"react": ">=17"
|
"react": ">=17"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rjsf/utils": {
|
"node_modules/@rjsf/utils": {
|
||||||
"version": "5.0.0-beta.20",
|
"version": "5.18.1",
|
||||||
"resolved": "https://registry.npmjs.org/@rjsf/utils/-/utils-5.0.0-beta.20.tgz",
|
"resolved": "https://registry.npmjs.org/@rjsf/utils/-/utils-5.18.1.tgz",
|
||||||
"integrity": "sha512-ToYHJj6s9TrcHULmx1nDEVOk+TxmpylsFBUnVV8Wm2e5SFqs4TQ5cJLD84h1BP8Cv5OeEdarq7Q6uhiNjs0Qxg==",
|
"integrity": "sha512-BxXd5C8gxOSDCSgfDT+XZHpBZtu4F0jJZsnMQstWJ+9QKpmTiuvbkjk3c1J4zZ3CRNgGghVH5otU5gvzVWIxpQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"json-schema-merge-allof": "^0.8.1",
|
"json-schema-merge-allof": "^0.8.1",
|
||||||
"jsonpointer": "^5.0.1",
|
"jsonpointer": "^5.0.1",
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.21",
|
||||||
"lodash-es": "^4.17.15",
|
"lodash-es": "^4.17.21",
|
||||||
"react-is": "^18.2.0"
|
"react-is": "^18.2.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
@ -4998,20 +4999,20 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rjsf/validator-ajv8": {
|
"node_modules/@rjsf/validator-ajv8": {
|
||||||
"version": "5.0.0-beta.20",
|
"version": "5.18.1",
|
||||||
"resolved": "https://registry.npmjs.org/@rjsf/validator-ajv8/-/validator-ajv8-5.0.0-beta.20.tgz",
|
"resolved": "https://registry.npmjs.org/@rjsf/validator-ajv8/-/validator-ajv8-5.18.1.tgz",
|
||||||
"integrity": "sha512-QzNX76ec7EoyazMZ/yJRo+DbSWKVLJghZxVOBYU8vm0jL7sK/lqROjeQUJuD2TVyT5zJC7QimFAIKSEKZQz/vg==",
|
"integrity": "sha512-Cb4++kru+XL8q5FJDWMpongtY7zLUoNqZaHDbYdkPWLl0Q7duGMfYOIRAhPpWhaI9KAjj19kCpAjQicA8gEgaw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ajv": "^8.11.0",
|
"ajv": "^8.12.0",
|
||||||
"ajv-formats": "^2.1.1",
|
"ajv-formats": "^2.1.1",
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.21",
|
||||||
"lodash-es": "^4.17.15"
|
"lodash-es": "^4.17.21"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14"
|
"node": ">=14"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@rjsf/utils": "^5.0.0-beta.16"
|
"@rjsf/utils": "^5.18.x"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/plugin-babel": {
|
"node_modules/@rollup/plugin-babel": {
|
||||||
|
@ -22121,6 +22122,17 @@
|
||||||
"url": "https://github.com/sponsors/wooorm"
|
"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": {
|
"node_modules/matcher": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",
|
||||||
|
@ -23278,9 +23290,9 @@
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"node_modules/nanoid": {
|
"node_modules/nanoid": {
|
||||||
"version": "3.3.6",
|
"version": "3.3.7",
|
||||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
|
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
|
||||||
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
|
"integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "github",
|
"type": "github",
|
||||||
|
@ -37810,43 +37822,44 @@
|
||||||
"integrity": "sha512-zcU0gM3z+3iqj8UX45AmWY810l3oUmXM7uH4dt5xtzvMhRtYVhKGOmgOd1877dOPPepfCjUv57w+syamWIYe7w=="
|
"integrity": "sha512-zcU0gM3z+3iqj8UX45AmWY810l3oUmXM7uH4dt5xtzvMhRtYVhKGOmgOd1877dOPPepfCjUv57w+syamWIYe7w=="
|
||||||
},
|
},
|
||||||
"@rjsf/core": {
|
"@rjsf/core": {
|
||||||
"version": "5.0.0-beta.20",
|
"version": "5.18.1",
|
||||||
"resolved": "https://registry.npmjs.org/@rjsf/core/-/core-5.0.0-beta.20.tgz",
|
"resolved": "https://registry.npmjs.org/@rjsf/core/-/core-5.18.1.tgz",
|
||||||
"integrity": "sha512-dPm7Wbm5ZT9y5frr0vtcr0MvpitbO6ApITmavIGN2tIdQveVVzavSJ4kZR7T17R6aw71TMtD3UOobwIh8IslLQ==",
|
"integrity": "sha512-325fOPqupCkEkH4/ufeAbaezyknCTRQx8XeK9PhtWBSwpVggJg003C2RFL7g7HdFkz546KjEBGKeJ74HXC/kVg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.21",
|
||||||
"lodash-es": "^4.17.15",
|
"lodash-es": "^4.17.21",
|
||||||
"nanoid": "^3.3.4",
|
"markdown-to-jsx": "^7.4.1",
|
||||||
"prop-types": "^15.7.2"
|
"nanoid": "^3.3.7",
|
||||||
|
"prop-types": "^15.8.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@rjsf/mui": {
|
"@rjsf/mui": {
|
||||||
"version": "5.0.0-beta.20",
|
"version": "5.18.1",
|
||||||
"resolved": "https://registry.npmjs.org/@rjsf/mui/-/mui-5.0.0-beta.20.tgz",
|
"resolved": "https://registry.npmjs.org/@rjsf/mui/-/mui-5.18.1.tgz",
|
||||||
"integrity": "sha512-DEZakIemrOSS4wQGTrvYVgwWXUCWaV4MQdPUC0rp7YQUKrB88V7Ys7rV2BLn5Iq/wcMyu35o+zwDAQv6YaEAEw==",
|
"integrity": "sha512-QVu62jWmFLJD/16F11frSAIp6JpR5TGLsNbpgYp8r7d+SxnIfUPzzhlIplNBcVXqzBujWYkSd+cGQH8bevw/MA==",
|
||||||
"requires": {}
|
"requires": {}
|
||||||
},
|
},
|
||||||
"@rjsf/utils": {
|
"@rjsf/utils": {
|
||||||
"version": "5.0.0-beta.20",
|
"version": "5.18.1",
|
||||||
"resolved": "https://registry.npmjs.org/@rjsf/utils/-/utils-5.0.0-beta.20.tgz",
|
"resolved": "https://registry.npmjs.org/@rjsf/utils/-/utils-5.18.1.tgz",
|
||||||
"integrity": "sha512-ToYHJj6s9TrcHULmx1nDEVOk+TxmpylsFBUnVV8Wm2e5SFqs4TQ5cJLD84h1BP8Cv5OeEdarq7Q6uhiNjs0Qxg==",
|
"integrity": "sha512-BxXd5C8gxOSDCSgfDT+XZHpBZtu4F0jJZsnMQstWJ+9QKpmTiuvbkjk3c1J4zZ3CRNgGghVH5otU5gvzVWIxpQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"json-schema-merge-allof": "^0.8.1",
|
"json-schema-merge-allof": "^0.8.1",
|
||||||
"jsonpointer": "^5.0.1",
|
"jsonpointer": "^5.0.1",
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.21",
|
||||||
"lodash-es": "^4.17.15",
|
"lodash-es": "^4.17.21",
|
||||||
"react-is": "^18.2.0"
|
"react-is": "^18.2.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@rjsf/validator-ajv8": {
|
"@rjsf/validator-ajv8": {
|
||||||
"version": "5.0.0-beta.20",
|
"version": "5.18.1",
|
||||||
"resolved": "https://registry.npmjs.org/@rjsf/validator-ajv8/-/validator-ajv8-5.0.0-beta.20.tgz",
|
"resolved": "https://registry.npmjs.org/@rjsf/validator-ajv8/-/validator-ajv8-5.18.1.tgz",
|
||||||
"integrity": "sha512-QzNX76ec7EoyazMZ/yJRo+DbSWKVLJghZxVOBYU8vm0jL7sK/lqROjeQUJuD2TVyT5zJC7QimFAIKSEKZQz/vg==",
|
"integrity": "sha512-Cb4++kru+XL8q5FJDWMpongtY7zLUoNqZaHDbYdkPWLl0Q7duGMfYOIRAhPpWhaI9KAjj19kCpAjQicA8gEgaw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"ajv": "^8.11.0",
|
"ajv": "^8.12.0",
|
||||||
"ajv-formats": "^2.1.1",
|
"ajv-formats": "^2.1.1",
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.21",
|
||||||
"lodash-es": "^4.17.15"
|
"lodash-es": "^4.17.21"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@rollup/plugin-babel": {
|
"@rollup/plugin-babel": {
|
||||||
|
@ -50893,6 +50906,12 @@
|
||||||
"resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.3.tgz",
|
||||||
"integrity": "sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw=="
|
"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": {
|
"matcher": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",
|
||||||
|
@ -51690,9 +51709,9 @@
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"nanoid": {
|
"nanoid": {
|
||||||
"version": "3.3.6",
|
"version": "3.3.7",
|
||||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
|
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
|
||||||
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA=="
|
"integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g=="
|
||||||
},
|
},
|
||||||
"nanolru": {
|
"nanolru": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
|
|
@ -16,10 +16,10 @@
|
||||||
"@monaco-editor/react": "^4.4.5",
|
"@monaco-editor/react": "^4.4.5",
|
||||||
"@mui/material": "^5.10.14",
|
"@mui/material": "^5.10.14",
|
||||||
"@react-icons/all-files": "^4.1.0",
|
"@react-icons/all-files": "^4.1.0",
|
||||||
"@rjsf/core": "5.0.0-beta.20",
|
"@rjsf/core": "5.18.1",
|
||||||
"@rjsf/mui": "5.0.0-beta.20",
|
"@rjsf/mui": "5.18.1",
|
||||||
"@rjsf/utils": "5.0.0-beta.20",
|
"@rjsf/utils": "5.18.1",
|
||||||
"@rjsf/validator-ajv8": "5.0.0-beta.20",
|
"@rjsf/validator-ajv8": "5.18.1",
|
||||||
"@tanstack/react-query": "^5.28.6",
|
"@tanstack/react-query": "^5.28.6",
|
||||||
"@tanstack/react-query-devtools": "^5.28.6",
|
"@tanstack/react-query-devtools": "^5.28.6",
|
||||||
"@testing-library/jest-dom": "^6.4.2",
|
"@testing-library/jest-dom": "^6.4.2",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Select, SelectItem } from '@carbon/react';
|
import { Select, SelectItem } from '@carbon/react';
|
||||||
import { WidgetProps, processSelectValue } from '@rjsf/utils';
|
import { WidgetProps, enumOptionsValueForIndex } from '@rjsf/utils';
|
||||||
import { getCommonAttributes } from '../../helpers';
|
import { getCommonAttributes } from '../../helpers';
|
||||||
|
|
||||||
function SelectWidget({
|
function SelectWidget({
|
||||||
|
@ -20,21 +20,21 @@ function SelectWidget({
|
||||||
placeholder,
|
placeholder,
|
||||||
rawErrors = [],
|
rawErrors = [],
|
||||||
}: WidgetProps) {
|
}: WidgetProps) {
|
||||||
const { enumOptions } = options;
|
const { enumOptions, emptyValue: optEmptyVal } = options;
|
||||||
let { enumDisabled } = options;
|
let { enumDisabled } = options;
|
||||||
|
|
||||||
const emptyValue = multiple ? [] : '';
|
const emptyValue = multiple ? [] : '';
|
||||||
|
|
||||||
const _onChange = ({
|
const _onChange = ({
|
||||||
target: { value },
|
target: { value },
|
||||||
}: React.ChangeEvent<{ name?: string; value: unknown }>) =>
|
}: React.ChangeEvent<{ name?: string; value: string }>) =>
|
||||||
onChange(processSelectValue(schema, value, options));
|
onChange(enumOptionsValueForIndex(value, enumOptions, optEmptyVal));
|
||||||
const _onBlur = ({ target: { value } }: React.FocusEvent<HTMLInputElement>) =>
|
const _onBlur = ({ target: { value } }: React.FocusEvent<HTMLInputElement>) =>
|
||||||
onBlur(id, processSelectValue(schema, value, options));
|
onBlur(id, enumOptionsValueForIndex(value, enumOptions, optEmptyVal));
|
||||||
const _onFocus = ({
|
const _onFocus = ({
|
||||||
target: { value },
|
target: { value },
|
||||||
}: React.FocusEvent<HTMLInputElement>) =>
|
}: React.FocusEvent<HTMLInputElement>) =>
|
||||||
onFocus(id, processSelectValue(schema, value, options));
|
onFocus(id, enumOptionsValueForIndex(value, enumOptions, optEmptyVal));
|
||||||
|
|
||||||
const commonAttributes = getCommonAttributes(
|
const commonAttributes = getCommonAttributes(
|
||||||
label,
|
label,
|
||||||
|
|
Loading…
Reference in New Issue