* fix: fix id of anyof select
* test: add tests for oneof and anyof ids
* test fix: change oneof to anyof in test
* properly use __anyof_select or __oneof_select based on schema
* prettier
* refactor validation tests to not use internal state
* fix key warning
* more refactoring
* refactored uischema to use event assertion
* refactored arrayfield tests to use event assertion
* refactored form tests to use event assertion
* Update packages/core/test/Form_test.js
Co-Authored-By: Ashwin Ramaswami <aramaswamis@gmail.com>
* rename tests
* added test case for liveValidate true with custom validate function
* refactored stringfield tests to use change event assertions
* added test case for invalid date
* removed compontentWillReceiveProps test assertion
* removed performance tests
* revert adding schema to validation function
Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
* fix: schema of type string shows defaults when cleared
* feat: add unit test
* Update test/StringField_test.js
Co-Authored-By: Ashwin Ramaswami <aramaswamis@gmail.com>
* Capitalized default Yes and No values in BooleanField
* Capitalized expected default Yes and No values
* Capitalized expected default Yes and No values in uiSchema_test
* Adds support for the "examples" keyword
* Adds example in playground for "examples" keyword
* runs cs-format on examples.js
* Includes default in examples
* Examples overlapping with default does not duplicate default
* Adds tests for examples keyword
* Test default value with no examples
* feat: add allOf support
* use patch version of json-schema-merge-allof
* fix: publicPath for netlify builds
* fix typo
* fix: pass around shouldMergeAllOf a bit
* fix: remove shouldMergeAllOf
* fix: resolve allOf when calculating idSchema and pathSchema
* Revert "Fix dependency defaults for uncontrolled components (#1371)"
This reverts commit 6728977b00.
* Revert "Revert "Fix dependency defaults for uncontrolled components (#1371)""
This reverts commit ad2bd6841b9218622a2a4bc92a07f4e8b88ce636.
* test: start writing some basic tests
* add doc on allOf
* add allOf playground sample
* handle merging errors by removing allOf
* add test for nested allOf's
* clarify that allOf keyword is dropped
* don't use merge allof fork
* remove change to package-lock.json
* prettier format
* refactored a few test fields to assert on change events instead of internal state
* remove unnecessary async await
* update test description
* fix broken performance test
* updated sinon + changed test assertions
* refactored anyOf tests to onChange
* refactored oneOf tests to use onChange event
* refactored ObjectField tests to use onChange event
* remove .only
* isDebugMode property is added for ObjectField and order list warning about extraneous property can hide if it is needed
* uiSchema order list contains extraneous warning is completely removed
* Inject defaults in arrays
When using dependencies in array items, defaults are now injected.
This adjusts injecting arrays into the form data from defaults to be
in line with the previous behaviour. So the defaults are injected when
there is either no value defined in the form data or when an array is
already set in the form data, injects only into existing entries.
This makes sure that we don't change any existing behaviour by creating
array entries where we did not create them before.
For example for following schema:
{
"type": "array",
"minItems": 2,
"items": {
"title": "asd",
"type": "object",
"properties": {
"item": {
"type": "string",
"default": "foo"
}
}
}
}
and following form data:
[{}]
The result will be (note how it did not full up the array to min items)
[{ "item": "foo" }]
* Remove redundant comment
* Add documentation and example
* Merge arrays defined in parent schema by overwriting same level arrays
* fix typo
* fix typos
* wording changes
Co-Authored-By: Dominik del Bondio <dominik.del.bondio@bitextender.com>
* fix: update arrays correctly when changing index
* fix: Update anyOf schema to correctly update items in an array
* fix: update schema to re-render when idschema changes
* implement errorSchema
* add an example to the playground
* improve playground for errorschema
* fix jumpy state changes when typing
* add documentation
* fix typo
* definately fixed documentation this time
* some tests for the async errors
* conform to style
* add an extra test to make sure async errors do not block submission
* change errorSchema prop to extraErrors
* Allow memo components on custom widgets/fields. ref #1309
* Revert accidental deletion of required prop fields in types.
* Add tests to memo components as widgets.
* Update prop-types to version 15.7.2
* Add material-ui theme
Related to issue #1222
* Delete LICENSE and update README
This is according to PR conversation
* Move material-ui theme into themes folder and delete example folder
* upgrade to react 16
* bump react peer dependency to 16
* remove react-lifecycles polyfill
* unskip react 16 test
* Fix array tests, fixes#1427
componentWillReceiveProps is not called after setState, but
getDerivedStateFromProps is called after setState. This caused the array
key tests to fail, because when onAddIndexClick is called, it sets the
state first to update keyedFormData. Only afterwards is the onChange
handler called with the new form data. And, getDerivedStateFromProps is
called in between, so it ends up being called with the old form data
instead of the new one.
Used the technique in https://stackoverflow.com/a/57208053 to work
around this, by not calculating derived state in
getDerivedStateFromProps when keyed form data is
updated.
* Remove console.error stub to fix tests
* Fix getWidget behavior for forwarded refs
* Replace componentWillReceiveProps with UNSAFE_componentWillReceiveProps
* Fixed disappearing empty objects and arrays
* Fixed some tests
* Fixed bugs
* Updated toPathSchema tests
* Added tests from #1418
* Uncommented test cases
* Remove unecessary or
* Update usage of toPathSchema
* Revert back to old period separation style in toPathSchema
* Converted change props with liveOmit test to only test for liveOmit
* Revert one other case of period positioning
* Changed according to review suggestions
* Adding support for $ref pointers to additionalProperties.
* Adding a form test for `$ref` support on `additionalProperties`.
* Inlining a definitions retireval from the registry.
* Prioritizing an additionalProperties $ref over set property types.