@rjsf/utils 5.11.2 → 5.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (303) hide show
  1. package/dist/index.js +2544 -5
  2. package/dist/index.js.map +7 -0
  3. package/dist/utils.esm.js +1228 -2113
  4. package/dist/utils.esm.js.map +7 -1
  5. package/dist/utils.umd.js +2414 -0
  6. package/lib/ErrorSchemaBuilder.d.ts +60 -0
  7. package/lib/ErrorSchemaBuilder.js +103 -0
  8. package/lib/ErrorSchemaBuilder.js.map +1 -0
  9. package/lib/allowAdditionalItems.d.ts +8 -0
  10. package/lib/allowAdditionalItems.js +14 -0
  11. package/lib/allowAdditionalItems.js.map +1 -0
  12. package/lib/asNumber.d.ts +10 -0
  13. package/lib/asNumber.js +36 -0
  14. package/lib/asNumber.js.map +1 -0
  15. package/lib/canExpand.d.ts +11 -0
  16. package/lib/canExpand.js +26 -0
  17. package/lib/canExpand.js.map +1 -0
  18. package/lib/constants.d.ts +31 -0
  19. package/lib/constants.js +32 -0
  20. package/lib/constants.js.map +1 -0
  21. package/lib/createErrorHandler.d.ts +7 -0
  22. package/lib/createErrorHandler.js +31 -0
  23. package/lib/createErrorHandler.js.map +1 -0
  24. package/lib/createSchemaUtils.d.ts +10 -0
  25. package/lib/createSchemaUtils.js +207 -0
  26. package/lib/createSchemaUtils.js.map +1 -0
  27. package/lib/dataURItoBlob.d.ts +16 -0
  28. package/lib/dataURItoBlob.js +43 -0
  29. package/lib/dataURItoBlob.js.map +1 -0
  30. package/lib/deepEquals.d.ts +8 -0
  31. package/lib/deepEquals.js +19 -0
  32. package/lib/deepEquals.js.map +1 -0
  33. package/lib/englishStringTranslator.d.ts +10 -0
  34. package/lib/englishStringTranslator.js +13 -0
  35. package/lib/englishStringTranslator.js.map +1 -0
  36. package/lib/enumOptionsDeselectValue.d.ts +14 -0
  37. package/lib/enumOptionsDeselectValue.js +22 -0
  38. package/lib/enumOptionsDeselectValue.js.map +1 -0
  39. package/lib/enumOptionsIndexForValue.d.ts +13 -0
  40. package/lib/enumOptionsIndexForValue.js +22 -0
  41. package/lib/enumOptionsIndexForValue.js.map +1 -0
  42. package/lib/enumOptionsIsSelected.d.ts +8 -0
  43. package/lib/enumOptionsIsSelected.js +14 -0
  44. package/lib/enumOptionsIsSelected.js.map +1 -0
  45. package/lib/enumOptionsSelectValue.d.ts +10 -0
  46. package/lib/enumOptionsSelectValue.js +23 -0
  47. package/lib/enumOptionsSelectValue.js.map +1 -0
  48. package/lib/enumOptionsValueForIndex.d.ts +13 -0
  49. package/lib/enumOptionsValueForIndex.js +21 -0
  50. package/lib/enumOptionsValueForIndex.js.map +1 -0
  51. package/lib/enums.d.ts +72 -0
  52. package/lib/enums.js +76 -0
  53. package/lib/enums.js.map +1 -0
  54. package/lib/findSchemaDefinition.d.ts +20 -0
  55. package/lib/findSchemaDefinition.js +49 -0
  56. package/lib/findSchemaDefinition.js.map +1 -0
  57. package/lib/getDiscriminatorFieldFromSchema.d.ts +8 -0
  58. package/lib/getDiscriminatorFieldFromSchema.js +20 -0
  59. package/lib/getDiscriminatorFieldFromSchema.js.map +1 -0
  60. package/lib/getInputProps.d.ts +10 -0
  61. package/lib/getInputProps.js +41 -0
  62. package/lib/getInputProps.js.map +1 -0
  63. package/lib/getSchemaType.d.ts +13 -0
  64. package/lib/getSchemaType.js +29 -0
  65. package/lib/getSchemaType.js.map +1 -0
  66. package/lib/getSubmitButtonOptions.d.ts +10 -0
  67. package/lib/getSubmitButtonOptions.js +25 -0
  68. package/lib/getSubmitButtonOptions.js.map +1 -0
  69. package/lib/getTemplate.d.ts +10 -0
  70. package/lib/getTemplate.js +19 -0
  71. package/lib/getTemplate.js.map +1 -0
  72. package/lib/getUiOptions.d.ts +9 -0
  73. package/lib/getUiOptions.js +25 -0
  74. package/lib/getUiOptions.js.map +1 -0
  75. package/lib/getWidget.d.ts +13 -0
  76. package/lib/getWidget.js +118 -0
  77. package/lib/getWidget.js.map +1 -0
  78. package/lib/guessType.d.ts +7 -0
  79. package/lib/guessType.js +29 -0
  80. package/lib/guessType.js.map +1 -0
  81. package/lib/hasWidget.d.ts +10 -0
  82. package/lib/hasWidget.js +23 -0
  83. package/lib/hasWidget.js.map +1 -0
  84. package/lib/hashForSchema.d.ts +8 -0
  85. package/lib/hashForSchema.js +29 -0
  86. package/lib/hashForSchema.js.map +1 -0
  87. package/lib/idGenerators.d.ts +47 -0
  88. package/lib/idGenerators.js +73 -0
  89. package/lib/idGenerators.js.map +1 -0
  90. package/lib/index.d.ts +57 -0
  91. package/lib/index.js +58 -0
  92. package/lib/index.js.map +1 -0
  93. package/lib/isConstant.d.ts +8 -0
  94. package/lib/isConstant.js +11 -0
  95. package/lib/isConstant.js.map +1 -0
  96. package/lib/isCustomWidget.d.ts +7 -0
  97. package/lib/isCustomWidget.js +13 -0
  98. package/lib/isCustomWidget.js.map +1 -0
  99. package/lib/isFixedItems.d.ts +8 -0
  100. package/lib/isFixedItems.js +11 -0
  101. package/lib/isFixedItems.js.map +1 -0
  102. package/lib/isObject.d.ts +7 -0
  103. package/lib/isObject.js +16 -0
  104. package/lib/isObject.js.map +1 -0
  105. package/lib/labelValue.d.ts +13 -0
  106. package/lib/labelValue.js +4 -0
  107. package/lib/labelValue.js.map +1 -0
  108. package/lib/localToUTC.d.ts +6 -0
  109. package/lib/localToUTC.js +9 -0
  110. package/lib/localToUTC.js.map +1 -0
  111. package/lib/mergeDefaultsWithFormData.d.ts +17 -0
  112. package/lib/mergeDefaultsWithFormData.js +43 -0
  113. package/lib/mergeDefaultsWithFormData.js.map +1 -0
  114. package/lib/mergeObjects.d.ts +11 -0
  115. package/lib/mergeObjects.js +35 -0
  116. package/lib/mergeObjects.js.map +1 -0
  117. package/lib/mergeSchemas.d.ts +10 -0
  118. package/lib/mergeSchemas.js +35 -0
  119. package/lib/mergeSchemas.js.map +1 -0
  120. package/lib/optionsList.d.ts +10 -0
  121. package/lib/optionsList.js +36 -0
  122. package/lib/optionsList.js.map +1 -0
  123. package/lib/orderProperties.d.ts +11 -0
  124. package/lib/orderProperties.js +38 -0
  125. package/lib/orderProperties.js.map +1 -0
  126. package/lib/pad.d.ts +7 -0
  127. package/lib/pad.js +14 -0
  128. package/lib/pad.js.map +1 -0
  129. package/lib/parseDateString.d.ts +9 -0
  130. package/lib/parseDateString.js +32 -0
  131. package/lib/parseDateString.js.map +1 -0
  132. package/lib/parser/ParserValidator.d.ts +70 -0
  133. package/lib/parser/ParserValidator.js +93 -0
  134. package/lib/parser/ParserValidator.js.map +1 -0
  135. package/lib/parser/index.d.ts +4 -0
  136. package/lib/parser/index.js +3 -0
  137. package/lib/parser/index.js.map +1 -0
  138. package/lib/parser/schemaParser.d.ts +9 -0
  139. package/lib/parser/schemaParser.js +48 -0
  140. package/lib/parser/schemaParser.js.map +1 -0
  141. package/lib/rangeSpec.d.ts +9 -0
  142. package/lib/rangeSpec.js +20 -0
  143. package/lib/rangeSpec.js.map +1 -0
  144. package/lib/replaceStringParameters.d.ts +9 -0
  145. package/lib/replaceStringParameters.js +23 -0
  146. package/lib/replaceStringParameters.js.map +1 -0
  147. package/lib/schema/getClosestMatchingOption.d.ts +49 -0
  148. package/lib/schema/getClosestMatchingOption.js +154 -0
  149. package/lib/schema/getClosestMatchingOption.js.map +1 -0
  150. package/lib/schema/getDefaultFormState.d.ts +66 -0
  151. package/lib/schema/getDefaultFormState.js +351 -0
  152. package/lib/schema/getDefaultFormState.js.map +1 -0
  153. package/lib/schema/getDisplayLabel.d.ts +12 -0
  154. package/lib/schema/getDisplayLabel.js +39 -0
  155. package/lib/schema/getDisplayLabel.js.map +1 -0
  156. package/lib/schema/getFirstMatchingOption.d.ts +13 -0
  157. package/lib/schema/getFirstMatchingOption.js +16 -0
  158. package/lib/schema/getFirstMatchingOption.js.map +1 -0
  159. package/lib/schema/getMatchingOption.d.ts +14 -0
  160. package/lib/schema/getMatchingOption.js +80 -0
  161. package/lib/schema/getMatchingOption.js.map +1 -0
  162. package/lib/schema/index.d.ts +14 -0
  163. package/lib/schema/index.js +15 -0
  164. package/lib/schema/index.js.map +1 -0
  165. package/lib/schema/isFilesArray.d.ts +10 -0
  166. package/lib/schema/isFilesArray.js +21 -0
  167. package/lib/schema/isFilesArray.js.map +1 -0
  168. package/lib/schema/isMultiSelect.d.ts +9 -0
  169. package/lib/schema/isMultiSelect.js +15 -0
  170. package/lib/schema/isMultiSelect.js.map +1 -0
  171. package/lib/schema/isSelect.d.ts +9 -0
  172. package/lib/schema/isSelect.js +21 -0
  173. package/lib/schema/isSelect.js.map +1 -0
  174. package/lib/schema/mergeValidationData.d.ts +14 -0
  175. package/lib/schema/mergeValidationData.js +28 -0
  176. package/lib/schema/mergeValidationData.js.map +1 -0
  177. package/lib/schema/retrieveSchema.d.ts +170 -0
  178. package/lib/schema/retrieveSchema.js +437 -0
  179. package/lib/schema/retrieveSchema.js.map +1 -0
  180. package/lib/schema/sanitizeDataForNewSchema.d.ts +49 -0
  181. package/lib/schema/sanitizeDataForNewSchema.js +173 -0
  182. package/lib/schema/sanitizeDataForNewSchema.js.map +1 -0
  183. package/lib/schema/toIdSchema.d.ts +13 -0
  184. package/lib/schema/toIdSchema.js +59 -0
  185. package/lib/schema/toIdSchema.js.map +1 -0
  186. package/lib/schema/toPathSchema.d.ts +11 -0
  187. package/lib/schema/toPathSchema.js +68 -0
  188. package/lib/schema/toPathSchema.js.map +1 -0
  189. package/lib/schemaRequiresTrueValue.d.ts +11 -0
  190. package/lib/schemaRequiresTrueValue.js +34 -0
  191. package/lib/schemaRequiresTrueValue.js.map +1 -0
  192. package/lib/shouldRender.d.ts +10 -0
  193. package/lib/shouldRender.js +14 -0
  194. package/lib/shouldRender.js.map +1 -0
  195. package/lib/toConstant.d.ts +9 -0
  196. package/lib/toConstant.js +18 -0
  197. package/lib/toConstant.js.map +1 -0
  198. package/lib/toDateString.d.ts +9 -0
  199. package/lib/toDateString.js +14 -0
  200. package/lib/toDateString.js.map +1 -0
  201. package/lib/toErrorList.d.ts +8 -0
  202. package/lib/toErrorList.js +34 -0
  203. package/lib/toErrorList.js.map +1 -0
  204. package/lib/toErrorSchema.d.ts +21 -0
  205. package/lib/toErrorSchema.js +41 -0
  206. package/lib/toErrorSchema.js.map +1 -0
  207. package/lib/types.d.ts +982 -0
  208. package/lib/types.js +2 -0
  209. package/lib/types.js.map +1 -0
  210. package/lib/unwrapErrorHandler.d.ts +7 -0
  211. package/lib/unwrapErrorHandler.js +21 -0
  212. package/lib/unwrapErrorHandler.js.map +1 -0
  213. package/lib/utcToLocal.d.ts +6 -0
  214. package/lib/utcToLocal.js +26 -0
  215. package/lib/utcToLocal.js.map +1 -0
  216. package/lib/validationDataMerge.d.ts +11 -0
  217. package/lib/validationDataMerge.js +26 -0
  218. package/lib/validationDataMerge.js.map +1 -0
  219. package/lib/withIdRefPrefix.d.ts +8 -0
  220. package/lib/withIdRefPrefix.js +47 -0
  221. package/lib/withIdRefPrefix.js.map +1 -0
  222. package/package.json +20 -13
  223. package/src/ErrorSchemaBuilder.ts +112 -0
  224. package/src/allowAdditionalItems.ts +15 -0
  225. package/src/asNumber.ts +38 -0
  226. package/src/canExpand.ts +31 -0
  227. package/src/constants.ts +31 -0
  228. package/src/createErrorHandler.ts +33 -0
  229. package/src/createSchemaUtils.ts +298 -0
  230. package/src/dataURItoBlob.ts +42 -0
  231. package/src/deepEquals.ts +19 -0
  232. package/src/englishStringTranslator.ts +14 -0
  233. package/src/enumOptionsDeselectValue.ts +28 -0
  234. package/src/enumOptionsIndexForValue.ts +27 -0
  235. package/src/enumOptionsIsSelected.ts +19 -0
  236. package/src/enumOptionsSelectValue.ts +28 -0
  237. package/src/enumOptionsValueForIndex.ts +26 -0
  238. package/src/enums.ts +74 -0
  239. package/src/findSchemaDefinition.ts +54 -0
  240. package/src/getDiscriminatorFieldFromSchema.ts +21 -0
  241. package/src/getInputProps.ts +55 -0
  242. package/src/getSchemaType.ts +37 -0
  243. package/src/getSubmitButtonOptions.ts +32 -0
  244. package/src/getTemplate.ts +26 -0
  245. package/src/getUiOptions.ts +32 -0
  246. package/src/getWidget.tsx +133 -0
  247. package/src/guessType.ts +28 -0
  248. package/src/hasWidget.ts +27 -0
  249. package/src/hashForSchema.ts +31 -0
  250. package/src/idGenerators.ts +81 -0
  251. package/src/index.ts +118 -0
  252. package/src/isConstant.ts +12 -0
  253. package/src/isCustomWidget.ts +19 -0
  254. package/src/isFixedItems.ts +12 -0
  255. package/src/isObject.ts +15 -0
  256. package/src/labelValue.ts +16 -0
  257. package/src/localToUTC.ts +8 -0
  258. package/src/mergeDefaultsWithFormData.ts +53 -0
  259. package/src/mergeObjects.ts +39 -0
  260. package/src/mergeSchemas.ts +38 -0
  261. package/src/optionsList.ts +41 -0
  262. package/src/orderProperties.ts +44 -0
  263. package/src/pad.ts +13 -0
  264. package/src/parseDateString.ts +33 -0
  265. package/src/parser/ParserValidator.ts +132 -0
  266. package/src/parser/index.ts +6 -0
  267. package/src/parser/schemaParser.ts +60 -0
  268. package/src/rangeSpec.ts +22 -0
  269. package/src/replaceStringParameters.ts +22 -0
  270. package/src/schema/getClosestMatchingOption.ts +191 -0
  271. package/src/schema/getDefaultFormState.ts +447 -0
  272. package/src/schema/getDisplayLabel.ts +59 -0
  273. package/src/schema/getFirstMatchingOption.ts +27 -0
  274. package/src/schema/getMatchingOption.ts +95 -0
  275. package/src/schema/index.ts +29 -0
  276. package/src/schema/isFilesArray.ts +27 -0
  277. package/src/schema/isMultiSelect.ts +21 -0
  278. package/src/schema/isSelect.ts +26 -0
  279. package/src/schema/mergeValidationData.ts +38 -0
  280. package/src/schema/retrieveSchema.ts +614 -0
  281. package/src/schema/sanitizeDataForNewSchema.ts +197 -0
  282. package/src/schema/toIdSchema.ts +105 -0
  283. package/src/schema/toPathSchema.ts +121 -0
  284. package/src/schemaRequiresTrueValue.ts +40 -0
  285. package/src/shouldRender.ts +16 -0
  286. package/src/toConstant.ts +19 -0
  287. package/src/toDateString.ts +15 -0
  288. package/src/toErrorList.ts +41 -0
  289. package/src/toErrorSchema.ts +43 -0
  290. package/src/types.ts +1139 -0
  291. package/src/unwrapErrorHandler.ts +25 -0
  292. package/src/utcToLocal.ts +30 -0
  293. package/src/validationDataMerge.ts +31 -0
  294. package/src/withIdRefPrefix.ts +49 -0
  295. package/dist/index.d.ts +0 -1911
  296. package/dist/utils.cjs.development.js +0 -3522
  297. package/dist/utils.cjs.development.js.map +0 -1
  298. package/dist/utils.cjs.production.min.js +0 -2
  299. package/dist/utils.cjs.production.min.js.map +0 -1
  300. package/dist/utils.umd.development.js +0 -3504
  301. package/dist/utils.umd.development.js.map +0 -1
  302. package/dist/utils.umd.production.min.js +0 -2
  303. package/dist/utils.umd.production.min.js.map +0 -1
@@ -0,0 +1,14 @@
1
+ import getDefaultFormState from './getDefaultFormState';
2
+ import getDisplayLabel from './getDisplayLabel';
3
+ import getClosestMatchingOption from './getClosestMatchingOption';
4
+ import getFirstMatchingOption from './getFirstMatchingOption';
5
+ import getMatchingOption from './getMatchingOption';
6
+ import isFilesArray from './isFilesArray';
7
+ import isMultiSelect from './isMultiSelect';
8
+ import isSelect from './isSelect';
9
+ import mergeValidationData from './mergeValidationData';
10
+ import retrieveSchema from './retrieveSchema';
11
+ import sanitizeDataForNewSchema from './sanitizeDataForNewSchema';
12
+ import toIdSchema from './toIdSchema';
13
+ import toPathSchema from './toPathSchema';
14
+ export { getDefaultFormState, getDisplayLabel, getClosestMatchingOption, getFirstMatchingOption, getMatchingOption, isFilesArray, isMultiSelect, isSelect, mergeValidationData, retrieveSchema, sanitizeDataForNewSchema, toIdSchema, toPathSchema, };
@@ -0,0 +1,15 @@
1
+ import getDefaultFormState from './getDefaultFormState';
2
+ import getDisplayLabel from './getDisplayLabel';
3
+ import getClosestMatchingOption from './getClosestMatchingOption';
4
+ import getFirstMatchingOption from './getFirstMatchingOption';
5
+ import getMatchingOption from './getMatchingOption';
6
+ import isFilesArray from './isFilesArray';
7
+ import isMultiSelect from './isMultiSelect';
8
+ import isSelect from './isSelect';
9
+ import mergeValidationData from './mergeValidationData';
10
+ import retrieveSchema from './retrieveSchema';
11
+ import sanitizeDataForNewSchema from './sanitizeDataForNewSchema';
12
+ import toIdSchema from './toIdSchema';
13
+ import toPathSchema from './toPathSchema';
14
+ export { getDefaultFormState, getDisplayLabel, getClosestMatchingOption, getFirstMatchingOption, getMatchingOption, isFilesArray, isMultiSelect, isSelect, mergeValidationData, retrieveSchema, sanitizeDataForNewSchema, toIdSchema, toPathSchema, };
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,wBAAwB,EACxB,sBAAsB,EACtB,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,mBAAmB,EACnB,cAAc,EACd,wBAAwB,EACxB,UAAU,EACV,YAAY,GACb,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { FormContextType, RJSFSchema, StrictRJSFSchema, UiSchema, ValidatorType } from '../types';
2
+ /** Checks to see if the `schema` and `uiSchema` combination represents an array of files
3
+ *
4
+ * @param validator - An implementation of the `ValidatorType` interface that will be used when necessary
5
+ * @param schema - The schema for which check for array of files flag is desired
6
+ * @param [uiSchema={}] - The UI schema from which to check the widget
7
+ * @param [rootSchema] - The root schema, used to primarily to look up `$ref`s
8
+ * @returns - True if schema/uiSchema contains an array of files, otherwise false
9
+ */
10
+ export default function isFilesArray<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(validator: ValidatorType<T, S, F>, schema: S, uiSchema?: UiSchema<T, S, F>, rootSchema?: S): boolean;
@@ -0,0 +1,21 @@
1
+ import { UI_WIDGET_KEY } from '../constants';
2
+ import retrieveSchema from './retrieveSchema';
3
+ /** Checks to see if the `schema` and `uiSchema` combination represents an array of files
4
+ *
5
+ * @param validator - An implementation of the `ValidatorType` interface that will be used when necessary
6
+ * @param schema - The schema for which check for array of files flag is desired
7
+ * @param [uiSchema={}] - The UI schema from which to check the widget
8
+ * @param [rootSchema] - The root schema, used to primarily to look up `$ref`s
9
+ * @returns - True if schema/uiSchema contains an array of files, otherwise false
10
+ */
11
+ export default function isFilesArray(validator, schema, uiSchema = {}, rootSchema) {
12
+ if (uiSchema[UI_WIDGET_KEY] === 'files') {
13
+ return true;
14
+ }
15
+ if (schema.items) {
16
+ const itemsSchema = retrieveSchema(validator, schema.items, rootSchema);
17
+ return itemsSchema.type === 'string' && itemsSchema.format === 'data-url';
18
+ }
19
+ return false;
20
+ }
21
+ //# sourceMappingURL=isFilesArray.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isFilesArray.js","sourceRoot":"","sources":["../../src/schema/isFilesArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,SAAiC,EACjC,MAAS,EACT,WAA8B,EAAE,EAChC,UAAc;IAEd,IAAI,QAAQ,CAAC,aAAa,CAAC,KAAK,OAAO,EAAE;QACvC,OAAO,IAAI,CAAC;KACb;IACD,IAAI,MAAM,CAAC,KAAK,EAAE;QAChB,MAAM,WAAW,GAAG,cAAc,CAAU,SAAS,EAAE,MAAM,CAAC,KAAU,EAAE,UAAU,CAAC,CAAC;QACtF,OAAO,WAAW,CAAC,IAAI,KAAK,QAAQ,IAAI,WAAW,CAAC,MAAM,KAAK,UAAU,CAAC;KAC3E;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { FormContextType, RJSFSchema, StrictRJSFSchema, ValidatorType } from '../types';
2
+ /** Checks to see if the `schema` combination represents a multi-select
3
+ *
4
+ * @param validator - An implementation of the `ValidatorType` interface that will be used when necessary
5
+ * @param schema - The schema for which check for a multi-select flag is desired
6
+ * @param [rootSchema] - The root schema, used to primarily to look up `$ref`s
7
+ * @returns - True if schema contains a multi-select, otherwise false
8
+ */
9
+ export default function isMultiSelect<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(validator: ValidatorType<T, S, F>, schema: S, rootSchema?: S): boolean;
@@ -0,0 +1,15 @@
1
+ import isSelect from './isSelect';
2
+ /** Checks to see if the `schema` combination represents a multi-select
3
+ *
4
+ * @param validator - An implementation of the `ValidatorType` interface that will be used when necessary
5
+ * @param schema - The schema for which check for a multi-select flag is desired
6
+ * @param [rootSchema] - The root schema, used to primarily to look up `$ref`s
7
+ * @returns - True if schema contains a multi-select, otherwise false
8
+ */
9
+ export default function isMultiSelect(validator, schema, rootSchema) {
10
+ if (!schema.uniqueItems || !schema.items || typeof schema.items === 'boolean') {
11
+ return false;
12
+ }
13
+ return isSelect(validator, schema.items, rootSchema);
14
+ }
15
+ //# sourceMappingURL=isMultiSelect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isMultiSelect.js","sourceRoot":"","sources":["../../src/schema/isMultiSelect.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAInC,SAAiC,EAAE,MAAS,EAAE,UAAc;IAC5D,IAAI,CAAC,MAAM,CAAC,WAAW,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,SAAS,EAAE;QAC7E,OAAO,KAAK,CAAC;KACd;IACD,OAAO,QAAQ,CAAU,SAAS,EAAE,MAAM,CAAC,KAAU,EAAE,UAAU,CAAC,CAAC;AACrE,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { FormContextType, RJSFSchema, StrictRJSFSchema, ValidatorType } from '../types';
2
+ /** Checks to see if the `schema` combination represents a select
3
+ *
4
+ * @param validator - An implementation of the `ValidatorType` interface that will be used when necessary
5
+ * @param theSchema - The schema for which check for a select flag is desired
6
+ * @param [rootSchema] - The root schema, used to primarily to look up `$ref`s
7
+ * @returns - True if schema contains a select, otherwise false
8
+ */
9
+ export default function isSelect<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(validator: ValidatorType<T, S, F>, theSchema: S, rootSchema?: S): boolean;
@@ -0,0 +1,21 @@
1
+ import isConstant from '../isConstant';
2
+ import retrieveSchema from './retrieveSchema';
3
+ /** Checks to see if the `schema` combination represents a select
4
+ *
5
+ * @param validator - An implementation of the `ValidatorType` interface that will be used when necessary
6
+ * @param theSchema - The schema for which check for a select flag is desired
7
+ * @param [rootSchema] - The root schema, used to primarily to look up `$ref`s
8
+ * @returns - True if schema contains a select, otherwise false
9
+ */
10
+ export default function isSelect(validator, theSchema, rootSchema = {}) {
11
+ const schema = retrieveSchema(validator, theSchema, rootSchema, undefined);
12
+ const altSchemas = schema.oneOf || schema.anyOf;
13
+ if (Array.isArray(schema.enum)) {
14
+ return true;
15
+ }
16
+ if (Array.isArray(altSchemas)) {
17
+ return altSchemas.every((altSchemas) => typeof altSchemas !== 'boolean' && isConstant(altSchemas));
18
+ }
19
+ return false;
20
+ }
21
+ //# sourceMappingURL=isSelect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isSelect.js","sourceRoot":"","sources":["../../src/schema/isSelect.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,eAAe,CAAC;AAEvC,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAC9B,SAAiC,EACjC,SAAY,EACZ,aAAgB,EAAO;IAEvB,MAAM,MAAM,GAAG,cAAc,CAAU,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;IACpF,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC;IAChD,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;QAC9B,OAAO,IAAI,CAAC;KACb;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;QAC7B,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,OAAO,UAAU,KAAK,SAAS,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;KACpG;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { ErrorSchema, FormContextType, RJSFSchema, StrictRJSFSchema, ValidationData, ValidatorType } from '../types';
2
+ /** Merges the errors in `additionalErrorSchema` into the existing `validationData` by combining the hierarchies in the
3
+ * two `ErrorSchema`s and then appending the error list from the `additionalErrorSchema` obtained by calling
4
+ * `validator.toErrorList()` onto the `errors` in the `validationData`. If no `additionalErrorSchema` is passed, then
5
+ * `validationData` is returned.
6
+ *
7
+ * @param validator - The validator used to convert an ErrorSchema to a list of errors
8
+ * @param validationData - The current `ValidationData` into which to merge the additional errors
9
+ * @param [additionalErrorSchema] - The additional set of errors in an `ErrorSchema`
10
+ * @returns - The `validationData` with the additional errors from `additionalErrorSchema` merged into it, if provided.
11
+ * @deprecated - Use the `validationDataMerge()` function exported from `@rjsf/utils` instead. This function will be
12
+ * removed in the next major release.
13
+ */
14
+ export default function mergeValidationData<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(validator: ValidatorType<T, S, F>, validationData: ValidationData<T>, additionalErrorSchema?: ErrorSchema<T>): ValidationData<T>;
@@ -0,0 +1,28 @@
1
+ import isEmpty from 'lodash/isEmpty';
2
+ import mergeObjects from '../mergeObjects';
3
+ /** Merges the errors in `additionalErrorSchema` into the existing `validationData` by combining the hierarchies in the
4
+ * two `ErrorSchema`s and then appending the error list from the `additionalErrorSchema` obtained by calling
5
+ * `validator.toErrorList()` onto the `errors` in the `validationData`. If no `additionalErrorSchema` is passed, then
6
+ * `validationData` is returned.
7
+ *
8
+ * @param validator - The validator used to convert an ErrorSchema to a list of errors
9
+ * @param validationData - The current `ValidationData` into which to merge the additional errors
10
+ * @param [additionalErrorSchema] - The additional set of errors in an `ErrorSchema`
11
+ * @returns - The `validationData` with the additional errors from `additionalErrorSchema` merged into it, if provided.
12
+ * @deprecated - Use the `validationDataMerge()` function exported from `@rjsf/utils` instead. This function will be
13
+ * removed in the next major release.
14
+ */
15
+ export default function mergeValidationData(validator, validationData, additionalErrorSchema) {
16
+ if (!additionalErrorSchema) {
17
+ return validationData;
18
+ }
19
+ const { errors: oldErrors, errorSchema: oldErrorSchema } = validationData;
20
+ let errors = validator.toErrorList(additionalErrorSchema);
21
+ let errorSchema = additionalErrorSchema;
22
+ if (!isEmpty(oldErrorSchema)) {
23
+ errorSchema = mergeObjects(oldErrorSchema, additionalErrorSchema, true);
24
+ errors = [...oldErrors].concat(errors);
25
+ }
26
+ return { errorSchema, errors };
27
+ }
28
+ //# sourceMappingURL=mergeValidationData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mergeValidationData.js","sourceRoot":"","sources":["../../src/schema/mergeValidationData.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAErC,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAG3C;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAKzC,SAAiC,EACjC,cAAiC,EACjC,qBAAsC;IAEtC,IAAI,CAAC,qBAAqB,EAAE;QAC1B,OAAO,cAAc,CAAC;KACvB;IACD,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,GAAG,cAAc,CAAC;IAC1E,IAAI,MAAM,GAAG,SAAS,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;IAC1D,IAAI,WAAW,GAAG,qBAAqB,CAAC;IACxC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;QAC5B,WAAW,GAAG,YAAY,CAAC,cAAc,EAAE,qBAAqB,EAAE,IAAI,CAAmB,CAAC;QAC1F,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;KACxC;IACD,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC;AACjC,CAAC"}
@@ -0,0 +1,170 @@
1
+ import { FormContextType, RJSFSchema, StrictRJSFSchema, ValidatorType } from '../types';
2
+ /** Retrieves an expanded schema that has had all of its conditions, additional properties, references and dependencies
3
+ * resolved and merged into the `schema` given a `validator`, `rootSchema` and `rawFormData` that is used to do the
4
+ * potentially recursive resolution.
5
+ *
6
+ * @param validator - An implementation of the `ValidatorType` interface that will be forwarded to all the APIs
7
+ * @param schema - The schema for which retrieving a schema is desired
8
+ * @param [rootSchema={}] - The root schema that will be forwarded to all the APIs
9
+ * @param [rawFormData] - The current formData, if any, to assist retrieving a schema
10
+ * @returns - The schema having its conditions, additional properties, references and dependencies resolved
11
+ */
12
+ export default function retrieveSchema<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(validator: ValidatorType<T, S, F>, schema: S, rootSchema?: S, rawFormData?: T): S;
13
+ /** Resolves a conditional block (if/else/then) by removing the condition and merging the appropriate conditional branch
14
+ * with the rest of the schema. If `expandAllBranches` is true, then the `retrieveSchemaInteral()` results for both
15
+ * conditions will be returned.
16
+ *
17
+ * @param validator - An implementation of the `ValidatorType` interface that is used to detect valid schema conditions
18
+ * @param schema - The schema for which resolving a condition is desired
19
+ * @param rootSchema - The root schema that will be forwarded to all the APIs
20
+ * @param expandAllBranches - Flag, if true, will return all possible branches of conditions, any/oneOf and
21
+ * dependencies as a list of schemas
22
+ * @param [formData] - The current formData to assist retrieving a schema
23
+ * @returns - A list of schemas with the appropriate conditions resolved, possibly with all branches expanded
24
+ */
25
+ export declare function resolveCondition<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(validator: ValidatorType<T, S, F>, schema: S, rootSchema: S, expandAllBranches: boolean, formData?: T): S[];
26
+ /** Given a list of lists of allOf, anyOf or oneOf values, create a list of lists of all permutations of the values. The
27
+ * `listOfLists` is expected to be all resolved values of the 1st...nth schemas within an `allOf`, `anyOf` or `oneOf`.
28
+ * From those lists, build a matrix for each `xxxOf` where there is more than one schema for a row in the list of lists.
29
+ *
30
+ * For example:
31
+ * - If there are three xxxOf rows (A, B, C) and they have been resolved such that there is only one A, two B and three
32
+ * C schemas then:
33
+ * - The permutation for the first row is `[[A]]`
34
+ * - The permutations for the second row are `[[A,B1], [A,B2]]`
35
+ * - The permutations for the third row are `[[A,B1,C1], [A,B1,C2], [A,B1,C3], [A,B2,C1], [A,B2,C2], [A,B2,C3]]`
36
+ *
37
+ * @param listOfLists - The list of lists of elements that represent the allOf, anyOf or oneOf resolved values in order
38
+ * @returns - The list of all permutations of schemas for a set of `xxxOf`s
39
+ */
40
+ export declare function getAllPermutationsOfXxxOf<S extends StrictRJSFSchema = RJSFSchema>(listOfLists: S[][]): S[][];
41
+ /** Resolves references and dependencies within a schema and its 'allOf' children. Passes the `expandAllBranches` flag
42
+ * down to the `retrieveSchemaInternal()`, `resolveReference()` and `resolveDependencies()` helper calls. If
43
+ * `expandAllBranches` is true, then all possible dependencies and/or allOf branches are returned.
44
+ *
45
+ * @param validator - An implementation of the `ValidatorType` interface that will be forwarded to all the APIs
46
+ * @param schema - The schema for which resolving a schema is desired
47
+ * @param rootSchema - The root schema that will be forwarded to all the APIs
48
+ * @param expandAllBranches - Flag, if true, will return all possible branches of conditions, any/oneOf and dependencies
49
+ * as a list of schemas
50
+ * @param [formData] - The current formData, if any, to assist retrieving a schema
51
+ * @returns - The list of schemas having its references, dependencies and allOf schemas resolved
52
+ */
53
+ export declare function resolveSchema<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(validator: ValidatorType<T, S, F>, schema: S, rootSchema: S, expandAllBranches: boolean, formData?: T): S[];
54
+ /** Resolves references within a schema and then returns the `retrieveSchemaInternal()` of the resolved schema. Passes
55
+ * the `expandAllBranches` flag down to the `retrieveSchemaInternal()` helper call.
56
+ *
57
+ * @param validator - An implementation of the `ValidatorType` interface that will be forwarded to all the APIs
58
+ * @param schema - The schema for which resolving a reference is desired
59
+ * @param rootSchema - The root schema that will be forwarded to all the APIs
60
+ * @param expandAllBranches - Flag, if true, will return all possible branches of conditions, any/oneOf and dependencies
61
+ * as a list of schemas
62
+ * @param [formData] - The current formData, if any, to assist retrieving a schema
63
+ * @returns - The list schemas retrieved after having all references resolved
64
+ */
65
+ export declare function resolveReference<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(validator: ValidatorType<T, S, F>, schema: S, rootSchema: S, expandAllBranches: boolean, formData?: T): S[];
66
+ /** Resolves all references within a schema's properties and array items.
67
+ *
68
+ * @param schema - The schema for which resolving all references is desired
69
+ * @param rootSchema - The root schema that will be forwarded to all the APIs
70
+ * @returns - given schema will all references resolved
71
+ */
72
+ export declare function resolveAllReferences<S extends StrictRJSFSchema = RJSFSchema>(schema: S, rootSchema: S): S;
73
+ /** Creates new 'properties' items for each key in the `formData`
74
+ *
75
+ * @param validator - An implementation of the `ValidatorType` interface that will be used when necessary
76
+ * @param theSchema - The schema for which the existing additional properties is desired
77
+ * @param [rootSchema] - The root schema, used to primarily to look up `$ref`s * @param validator
78
+ * @param [aFormData] - The current formData, if any, to assist retrieving a schema
79
+ * @returns - The updated schema with additional properties stubbed
80
+ */
81
+ export declare function stubExistingAdditionalProperties<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(validator: ValidatorType<T, S, F>, theSchema: S, rootSchema?: S, aFormData?: T): S;
82
+ /** Internal handler that retrieves an expanded schema that has had all of its conditions, additional properties,
83
+ * references and dependencies resolved and merged into the `schema` given a `validator`, `rootSchema` and `rawFormData`
84
+ * that is used to do the potentially recursive resolution. If `expandAllBranches` is true, then all possible branches
85
+ * of the schema and its references, conditions and dependencies are returned.
86
+ *
87
+ * @param validator - An implementation of the `ValidatorType` interface that will be forwarded to all the APIs
88
+ * @param schema - The schema for which retrieving a schema is desired
89
+ * @param rootSchema - The root schema that will be forwarded to all the APIs
90
+ * @param [rawFormData] - The current formData, if any, to assist retrieving a schema
91
+ * @param [expandAllBranches=false] - Flag, if true, will return all possible branches of conditions, any/oneOf and
92
+ * dependencies as a list of schemas
93
+ * @returns - The schema(s) resulting from having its conditions, additional properties, references and dependencies
94
+ * resolved. Multiple schemas may be returned if `expandAllBranches` is true.
95
+ */
96
+ export declare function retrieveSchemaInternal<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(validator: ValidatorType<T, S, F>, schema: S, rootSchema: S, rawFormData?: T, expandAllBranches?: boolean): S[];
97
+ /** Resolves an `anyOf` or `oneOf` within a schema (if present) to the list of schemas returned from
98
+ * `retrieveSchemaInternal()` for the best matching option. If `expandAllBranches` is true, then a list of schemas for ALL
99
+ * options are retrieved and returned.
100
+ *
101
+ * @param validator - An implementation of the `ValidatorType` interface that will be forwarded to all the APIs
102
+ * @param schema - The schema for which retrieving a schema is desired
103
+ * @param rootSchema - The root schema that will be forwarded to all the APIs
104
+ * @param expandAllBranches - Flag, if true, will return all possible branches of conditions, any/oneOf and dependencies
105
+ * as a list of schemas
106
+ * @param [rawFormData] - The current formData, if any, to assist retrieving a schema, defaults to an empty object
107
+ * @returns - Either an array containing the best matching option or all options if `expandAllBranches` is true
108
+ */
109
+ export declare function resolveAnyOrOneOfSchemas<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(validator: ValidatorType<T, S, F>, schema: S, rootSchema: S, expandAllBranches: boolean, rawFormData?: T): S[];
110
+ /** Resolves dependencies within a schema and its 'anyOf/oneOf' children. Passes the `expandAllBranches` flag down to
111
+ * the `resolveAnyOrOneOfSchema()` and `processDependencies()` helper calls.
112
+ *
113
+ * @param validator - An implementation of the `ValidatorType` interface that will be forwarded to all the APIs
114
+ * @param schema - The schema for which resolving a dependency is desired
115
+ * @param rootSchema - The root schema that will be forwarded to all the APIs
116
+ * @param expandAllBranches - Flag, if true, will return all possible branches of conditions, any/oneOf and dependencies
117
+ * as a list of schemas
118
+ * @param [formData] - The current formData, if any, to assist retrieving a schema
119
+ * @returns - The list of schemas with their dependencies resolved
120
+ */
121
+ export declare function resolveDependencies<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(validator: ValidatorType<T, S, F>, schema: S, rootSchema: S, expandAllBranches: boolean, formData?: T): S[];
122
+ /** Processes all the `dependencies` recursively into the list of `resolvedSchema`s as needed. Passes the
123
+ * `expandAllBranches` flag down to the `withDependentSchema()` and the recursive `processDependencies()` helper calls.
124
+ *
125
+ * @param validator - An implementation of the `ValidatorType` interface that will be forwarded to all the APIs
126
+ * @param dependencies - The set of dependencies that needs to be processed
127
+ * @param resolvedSchema - The schema for which processing dependencies is desired
128
+ * @param rootSchema - The root schema that will be forwarded to all the APIs
129
+ * @param expandAllBranches - Flag, if true, will return all possible branches of conditions, any/oneOf and dependencies
130
+ * as a list of schemas
131
+ * @param [formData] - The current formData, if any, to assist retrieving a schema
132
+ * @returns - The schema with the `dependencies` resolved into it
133
+ */
134
+ export declare function processDependencies<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(validator: ValidatorType<T, S, F>, dependencies: S['dependencies'], resolvedSchema: S, rootSchema: S, expandAllBranches: boolean, formData?: T): S[];
135
+ /** Updates a schema with additionally required properties added
136
+ *
137
+ * @param schema - The schema for which resolving a dependent properties is desired
138
+ * @param [additionallyRequired] - An optional array of additionally required names
139
+ * @returns - The schema with the additional required values merged in
140
+ */
141
+ export declare function withDependentProperties<S extends StrictRJSFSchema = RJSFSchema>(schema: S, additionallyRequired?: string[]): S;
142
+ /** Merges a dependent schema into the `schema` dealing with oneOfs and references. Passes the `expandAllBranches` flag
143
+ * down to the `retrieveSchemaInternal()`, `resolveReference()` and `withExactlyOneSubschema()` helper calls.
144
+ *
145
+ * @param validator - An implementation of the `ValidatorType` interface that will be forwarded to all the APIs
146
+ * @param schema - The schema for which resolving a dependent schema is desired
147
+ * @param rootSchema - The root schema that will be forwarded to all the APIs
148
+ * @param dependencyKey - The key name of the dependency
149
+ * @param dependencyValue - The potentially dependent schema
150
+ * @param expandAllBranches - Flag, if true, will return all possible branches of conditions, any/oneOf and dependencies
151
+ * as a list of schemas
152
+ * @param [formData]- The current formData to assist retrieving a schema
153
+ * @returns - The list of schemas with the dependent schema resolved into them
154
+ */
155
+ export declare function withDependentSchema<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(validator: ValidatorType<T, S, F>, schema: S, rootSchema: S, dependencyKey: string, dependencyValue: S, expandAllBranches: boolean, formData?: T): S[];
156
+ /** Returns a list of `schema`s with the best choice from the `oneOf` options merged into it. If `expandAllBranches` is
157
+ * true, then a list of schemas for ALL options are retrieved and returned. Passes the `expandAllBranches` flag down to
158
+ * the `retrieveSchemaInternal()` helper call.
159
+ *
160
+ * @param validator - An implementation of the `ValidatorType` interface that will be used to validate oneOf options
161
+ * @param schema - The schema for which resolving a oneOf subschema is desired
162
+ * @param rootSchema - The root schema that will be forwarded to all the APIs
163
+ * @param dependencyKey - The key name of the oneOf dependency
164
+ * @param oneOf - The list of schemas representing the oneOf options
165
+ * @param expandAllBranches - Flag, if true, will return all possible branches of conditions, any/oneOf and dependencies
166
+ * as a list of schemas
167
+ * @param [formData] - The current formData to assist retrieving a schema
168
+ * @returns - Either an array containing the best matching option or all options if `expandAllBranches` is true
169
+ */
170
+ export declare function withExactlyOneSubschema<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(validator: ValidatorType<T, S, F>, schema: S, rootSchema: S, dependencyKey: string, oneOf: S['oneOf'], expandAllBranches: boolean, formData?: T): S[];