fastapi-rtk 2.8.0 → 2.9.1

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 (607) hide show
  1. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineObjectInput.cjs +2 -2
  2. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/complex/MantineTableControl/MantineTableControl.cjs +6 -11
  3. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/layouts/Array/ExpandPanelRenderer.cjs +2 -2
  4. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/layouts/Array/MantineArrayLayout.cjs +3 -5
  5. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/utils/layout.cjs +2 -2
  6. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineObjectInput.mjs +2 -2
  7. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/complex/MantineTableControl/MantineTableControl.mjs +7 -12
  8. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/layouts/Array/ExpandPanelRenderer.mjs +2 -2
  9. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/layouts/Array/MantineArrayLayout.mjs +3 -5
  10. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/utils/layout.mjs +2 -2
  11. package/dist/.external/cjs/html-parse-stringify@3.0.1/html-parse-stringify/dist/html-parse-stringify.module.cjs +59 -0
  12. package/dist/.external/cjs/lodash@4.17.23/lodash/_cloneBuffer.cjs +1 -1
  13. package/dist/.external/cjs/lodash@4.17.23/lodash/_freeGlobal.cjs +1 -1
  14. package/dist/.external/cjs/lodash@4.17.23/lodash/_nodeUtil.cjs +1 -1
  15. package/dist/.external/cjs/lodash@4.17.23/lodash/isBuffer.cjs +1 -1
  16. package/dist/.external/cjs/lodash@4.17.23/lodash/lodash.cjs +2 -2
  17. package/dist/.external/cjs/mantine-react-table@2.0.0-beta.9_patch_hash_b9fcaf5fc0698f1949127d6bfb1f154a5bd28d0d1fe_7b4bd73d03bc0c4b3e9706b344be0f5a/mantine-react-table/locales/de/index.cjs +1 -1
  18. package/dist/.external/cjs/mantine-react-table@2.0.0-beta.9_patch_hash_b9fcaf5fc0698f1949127d6bfb1f154a5bd28d0d1fe_7b4bd73d03bc0c4b3e9706b344be0f5a/mantine-react-table/locales/en/index.cjs +1 -1
  19. package/dist/.external/cjs/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/I18nextProvider.cjs +3 -3
  20. package/dist/.external/cjs/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/Trans.cjs +48 -0
  21. package/dist/.external/cjs/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/TransWithoutContext.cjs +331 -0
  22. package/dist/.external/cjs/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/Translation.cjs +15 -0
  23. package/dist/.external/cjs/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/context.cjs +32 -2
  24. package/dist/.external/cjs/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/index.cjs +42 -0
  25. package/dist/.external/cjs/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/useSSR.cjs +32 -0
  26. package/dist/.external/cjs/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/useTranslation.cjs +9 -9
  27. package/dist/.external/cjs/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/utils.cjs +2 -0
  28. package/dist/.external/cjs/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/withSSR.cjs +23 -0
  29. package/dist/.external/cjs/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/withTranslation.cjs +35 -0
  30. package/dist/.external/cjs/toposort@2.0.2/toposort/index.cjs +1 -1
  31. package/dist/.external/cjs/void-elements@3.1.0/void-elements/index.cjs +26 -0
  32. package/dist/.external/cjs/yup@1.7.1/yup/index.esm.cjs +3 -1224
  33. package/dist/.external/cjs/zustand@5.0.10_@types_react@19.2.9_react@19.2.3/zustand/esm/index.cjs +7 -0
  34. package/dist/.external/esm/html-parse-stringify@3.0.1/html-parse-stringify/dist/html-parse-stringify.module.mjs +60 -0
  35. package/dist/.external/esm/lodash@4.17.23/lodash/_cloneBuffer.mjs +1 -1
  36. package/dist/.external/esm/lodash@4.17.23/lodash/_freeGlobal.mjs +1 -1
  37. package/dist/.external/esm/lodash@4.17.23/lodash/_nodeUtil.mjs +1 -1
  38. package/dist/.external/esm/lodash@4.17.23/lodash/isBuffer.mjs +1 -1
  39. package/dist/.external/esm/lodash@4.17.23/lodash/lodash.mjs +2 -2
  40. package/dist/.external/esm/mantine-react-table@2.0.0-beta.9_patch_hash_b9fcaf5fc0698f1949127d6bfb1f154a5bd28d0d1fe_7b4bd73d03bc0c4b3e9706b344be0f5a/mantine-react-table/locales/de/index.mjs +1 -1
  41. package/dist/.external/esm/mantine-react-table@2.0.0-beta.9_patch_hash_b9fcaf5fc0698f1949127d6bfb1f154a5bd28d0d1fe_7b4bd73d03bc0c4b3e9706b344be0f5a/mantine-react-table/locales/en/index.mjs +1 -1
  42. package/dist/.external/esm/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/Trans.mjs +49 -0
  43. package/dist/.external/esm/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/TransWithoutContext.mjs +331 -0
  44. package/dist/.external/esm/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/Translation.mjs +15 -0
  45. package/dist/.external/esm/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/context.mjs +32 -1
  46. package/dist/.external/esm/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/index.mjs +42 -0
  47. package/dist/.external/esm/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/useSSR.mjs +32 -0
  48. package/dist/.external/esm/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/utils.mjs +2 -0
  49. package/dist/.external/esm/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/withSSR.mjs +23 -0
  50. package/dist/.external/esm/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/withTranslation.mjs +35 -0
  51. package/dist/.external/esm/toposort@2.0.2/toposort/index.mjs +1 -1
  52. package/dist/.external/esm/void-elements@3.1.0/void-elements/index.mjs +26 -0
  53. package/dist/.external/esm/yup@1.7.1/yup/index.esm.mjs +4 -1225
  54. package/dist/.external/esm/zustand@5.0.10_@types_react@19.2.9_react@19.2.3/zustand/esm/index.mjs +7 -0
  55. package/dist/.external/esm/zustand@5.0.10_@types_react@19.2.9_react@19.2.3/zustand/esm/react.mjs +5 -5
  56. package/dist/.external/lib/type-fest/index.d.ts +95 -0
  57. package/dist/.external/lib/type-fest/source/async-return-type.d.ts +25 -0
  58. package/dist/.external/lib/type-fest/source/asyncify.d.ts +33 -0
  59. package/dist/.external/lib/type-fest/source/basic.d.ts +45 -0
  60. package/dist/.external/lib/type-fest/source/camel-case.d.ts +73 -0
  61. package/dist/.external/lib/type-fest/source/camel-cased-properties-deep.d.ts +54 -0
  62. package/dist/.external/lib/type-fest/source/camel-cased-properties.d.ts +36 -0
  63. package/dist/.external/lib/type-fest/source/conditional-except.d.ts +45 -0
  64. package/dist/.external/lib/type-fest/source/conditional-keys.d.ts +47 -0
  65. package/dist/.external/lib/type-fest/source/conditional-pick.d.ts +44 -0
  66. package/dist/.external/lib/type-fest/source/delimiter-case.d.ts +93 -0
  67. package/dist/.external/lib/type-fest/source/delimiter-cased-properties-deep.d.ts +60 -0
  68. package/dist/.external/lib/type-fest/source/delimiter-cased-properties.d.ts +37 -0
  69. package/dist/.external/lib/type-fest/source/entries.d.ts +62 -0
  70. package/dist/.external/lib/type-fest/source/entry.d.ts +65 -0
  71. package/dist/.external/lib/type-fest/source/exact.d.ts +73 -0
  72. package/dist/.external/lib/type-fest/source/except.d.ts +57 -0
  73. package/dist/.external/lib/type-fest/source/fixed-length-array.d.ts +43 -0
  74. package/dist/.external/lib/type-fest/source/get.d.ts +184 -0
  75. package/dist/.external/lib/type-fest/source/has-optional-keys.d.ts +21 -0
  76. package/dist/.external/lib/type-fest/source/has-required-keys.d.ts +59 -0
  77. package/dist/.external/lib/type-fest/source/includes.d.ts +22 -0
  78. package/dist/.external/lib/type-fest/source/internal.d.ts +59 -0
  79. package/dist/.external/lib/type-fest/source/invariant-of.d.ts +76 -0
  80. package/dist/.external/lib/type-fest/source/iterable-element.d.ts +54 -0
  81. package/dist/.external/lib/type-fest/source/join.d.ts +30 -0
  82. package/dist/.external/lib/type-fest/source/jsonify.d.ts +90 -0
  83. package/dist/.external/lib/type-fest/source/kebab-case.d.ts +38 -0
  84. package/dist/.external/lib/type-fest/source/kebab-cased-properties-deep.d.ts +47 -0
  85. package/dist/.external/lib/type-fest/source/kebab-cased-properties.d.ts +30 -0
  86. package/dist/.external/lib/type-fest/source/last-array-element.d.ts +28 -0
  87. package/dist/.external/lib/type-fest/source/literal-to-primitive.d.ts +36 -0
  88. package/dist/.external/lib/type-fest/source/literal-union.d.ts +35 -0
  89. package/dist/.external/lib/type-fest/source/merge-exclusive.d.ts +41 -0
  90. package/dist/.external/lib/type-fest/source/merge.d.ts +27 -0
  91. package/dist/.external/lib/type-fest/source/multidimensional-array.d.ts +43 -0
  92. package/dist/.external/lib/type-fest/source/multidimensional-readonly-array.d.ts +47 -0
  93. package/dist/.external/lib/type-fest/source/mutable.d.ts +5 -0
  94. package/dist/.external/lib/type-fest/source/numeric.d.ts +170 -0
  95. package/dist/.external/lib/type-fest/source/observable-like.d.ts +62 -0
  96. package/dist/.external/lib/type-fest/source/opaque.d.ts +107 -0
  97. package/dist/.external/lib/type-fest/source/optional-keys-of.d.ts +38 -0
  98. package/dist/.external/lib/type-fest/source/package-json.d.ts +663 -0
  99. package/dist/.external/lib/type-fest/source/partial-deep.d.ts +113 -0
  100. package/dist/.external/lib/type-fest/source/partial-on-undefined-deep.d.ts +70 -0
  101. package/dist/.external/lib/type-fest/source/pascal-case.d.ts +38 -0
  102. package/dist/.external/lib/type-fest/source/pascal-cased-properties-deep.d.ts +54 -0
  103. package/dist/.external/lib/type-fest/source/pascal-cased-properties.d.ts +34 -0
  104. package/dist/.external/lib/type-fest/source/primitive.d.ts +13 -0
  105. package/dist/.external/lib/type-fest/source/promisable.d.ts +25 -0
  106. package/dist/.external/lib/type-fest/source/promise-value.d.ts +29 -0
  107. package/dist/.external/lib/type-fest/source/readonly-deep.d.ts +85 -0
  108. package/dist/.external/lib/type-fest/source/readonly-tuple.d.ts +41 -0
  109. package/dist/.external/lib/type-fest/source/remove-index-signature.d.ts +104 -0
  110. package/dist/.external/lib/type-fest/source/replace.d.ts +67 -0
  111. package/dist/.external/lib/type-fest/source/require-all-or-none.d.ts +36 -0
  112. package/dist/.external/lib/type-fest/source/require-at-least-one.d.ts +35 -0
  113. package/dist/.external/lib/type-fest/source/require-exactly-one.d.ts +34 -0
  114. package/dist/.external/lib/type-fest/source/required-keys-of.d.ts +29 -0
  115. package/dist/.external/lib/type-fest/source/schema.d.ts +72 -0
  116. package/dist/.external/lib/type-fest/source/screaming-snake-case.d.ts +33 -0
  117. package/dist/.external/lib/type-fest/source/set-non-nullable.d.ts +35 -0
  118. package/dist/.external/lib/type-fest/source/set-optional.d.ts +35 -0
  119. package/dist/.external/lib/type-fest/source/set-required.d.ts +35 -0
  120. package/dist/.external/lib/type-fest/source/set-return-type.d.ts +31 -0
  121. package/dist/.external/lib/type-fest/source/simplify.d.ts +83 -0
  122. package/dist/.external/lib/type-fest/source/snake-case.d.ts +38 -0
  123. package/dist/.external/lib/type-fest/source/snake-cased-properties-deep.d.ts +47 -0
  124. package/dist/.external/lib/type-fest/source/snake-cased-properties.d.ts +30 -0
  125. package/dist/.external/lib/type-fest/source/split.d.ts +29 -0
  126. package/dist/.external/lib/type-fest/source/spread.d.ts +85 -0
  127. package/dist/.external/lib/type-fest/source/string-key-of.d.ts +25 -0
  128. package/dist/.external/lib/type-fest/source/stringified.d.ts +23 -0
  129. package/dist/.external/lib/type-fest/source/trim.d.ts +25 -0
  130. package/dist/.external/lib/type-fest/source/tsconfig-json.d.ts +1172 -0
  131. package/dist/.external/lib/type-fest/source/typed-array.d.ts +17 -0
  132. package/dist/.external/lib/type-fest/source/union-to-intersection.d.ts +60 -0
  133. package/dist/.external/lib/type-fest/source/value-of.d.ts +42 -0
  134. package/dist/.external/lib/type-fest/source/writable.d.ts +40 -0
  135. package/dist/api/cjs/ApiProvider/ApiProvider.cjs +80 -0
  136. package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/hooks/useProvideApi.cjs +22 -19
  137. package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/hooks/useProvideBulk.cjs +5 -3
  138. package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/hooks/useProvideForm.cjs +2 -2
  139. package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/hooks/utils/useApiActions.cjs +15 -15
  140. package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/hooks/utils/useStreamingData.cjs +1 -1
  141. package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/utils/getValidationSchema.cjs +3 -3
  142. package/dist/{core/cjs/Wrappers → api/cjs}/Provider/Contexts/LangContext.cjs +20 -8
  143. package/dist/api/cjs/Provider/Provider.cjs +52 -0
  144. package/dist/{core/cjs/Wrappers → api/cjs}/Provider/hooks/useProvideAuth.cjs +17 -15
  145. package/dist/{core/cjs/Wrappers → api/cjs}/Provider/hooks/useProvideInfo.cjs +5 -3
  146. package/dist/api/cjs/Provider/hooks/useProvideLang.cjs +78 -0
  147. package/dist/api/cjs/adapters/AdaptersContext.cjs +10 -0
  148. package/dist/api/cjs/auth/authFetch.cjs +63 -0
  149. package/dist/api/cjs/auth/userCRUD.cjs +20 -0
  150. package/dist/api/cjs/fetchers/createItem.cjs +14 -0
  151. package/dist/api/cjs/fetchers/deleteItem.cjs +14 -0
  152. package/dist/api/cjs/fetchers/downloadItems.cjs +33 -0
  153. package/dist/api/cjs/fetchers/formCreateItem.cjs +18 -0
  154. package/dist/api/cjs/fetchers/formUpdateItem.cjs +18 -0
  155. package/dist/api/cjs/fetchers/getInfo.cjs +10 -0
  156. package/dist/api/cjs/fetchers/getItem.cjs +14 -0
  157. package/dist/api/cjs/fetchers/getItems.cjs +13 -0
  158. package/dist/api/cjs/fetchers/postBulkAction.cjs +14 -0
  159. package/dist/api/cjs/fetchers/request.cjs +9 -0
  160. package/dist/api/cjs/fetchers/updateItem.cjs +14 -0
  161. package/dist/api/cjs/fetchers/uploadItems.cjs +24 -0
  162. package/dist/{core → api}/cjs/hooks/auth/useAuth.cjs +1 -1
  163. package/dist/{core → api}/cjs/hooks/auth/useInfo.cjs +1 -1
  164. package/dist/api/cjs/hooks/useDidUpdate.cjs +20 -0
  165. package/dist/api/cjs/index.cjs +77 -0
  166. package/dist/{utils/cjs → api/cjs/utils}/convertToFormData/convertToFormData.cjs +5 -5
  167. package/dist/{utils/cjs → api/cjs/utils}/createFetchParams/createFetchParams.cjs +1 -3
  168. package/dist/api/esm/ApiProvider/ApiProvider.mjs +80 -0
  169. package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/hooks/useProvideApi.mjs +21 -18
  170. package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/hooks/useProvideBulk.mjs +5 -3
  171. package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/hooks/useProvideForm.mjs +2 -2
  172. package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/hooks/utils/useApiActions.mjs +15 -15
  173. package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/hooks/utils/useStreamingData.mjs +1 -1
  174. package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/utils/getValidationSchema.mjs +3 -4
  175. package/dist/{core/esm/Wrappers → api/esm}/Provider/Contexts/LangContext.mjs +22 -10
  176. package/dist/api/esm/Provider/Provider.mjs +52 -0
  177. package/dist/{core/esm/Wrappers → api/esm}/Provider/hooks/useProvideAuth.mjs +17 -15
  178. package/dist/{core/esm/Wrappers → api/esm}/Provider/hooks/useProvideInfo.mjs +5 -3
  179. package/dist/api/esm/Provider/hooks/useProvideLang.mjs +78 -0
  180. package/dist/api/esm/adapters/AdaptersContext.mjs +10 -0
  181. package/dist/api/esm/auth/authFetch.mjs +63 -0
  182. package/dist/api/esm/auth/userCRUD.mjs +20 -0
  183. package/dist/api/esm/fetchers/createItem.mjs +14 -0
  184. package/dist/api/esm/fetchers/deleteItem.mjs +14 -0
  185. package/dist/api/esm/fetchers/downloadItems.mjs +33 -0
  186. package/dist/api/esm/fetchers/formCreateItem.mjs +18 -0
  187. package/dist/api/esm/fetchers/formUpdateItem.mjs +18 -0
  188. package/dist/api/esm/fetchers/getInfo.mjs +10 -0
  189. package/dist/api/esm/fetchers/getItem.mjs +14 -0
  190. package/dist/api/esm/fetchers/getItems.mjs +13 -0
  191. package/dist/api/esm/fetchers/postBulkAction.mjs +14 -0
  192. package/dist/api/esm/fetchers/request.mjs +9 -0
  193. package/dist/api/esm/fetchers/updateItem.mjs +14 -0
  194. package/dist/api/esm/fetchers/uploadItems.mjs +24 -0
  195. package/dist/{core → api}/esm/hooks/auth/useAuth.mjs +1 -1
  196. package/dist/{core → api}/esm/hooks/auth/useInfo.mjs +1 -1
  197. package/dist/api/esm/hooks/useDidUpdate.mjs +20 -0
  198. package/dist/api/esm/index.mjs +77 -0
  199. package/dist/{utils/esm → api/esm/utils}/convertToFormData/convertToFormData.mjs +5 -5
  200. package/dist/{utils/esm → api/esm/utils}/createFetchParams/createFetchParams.mjs +1 -3
  201. package/dist/api/lib/ApiProvider/ApiProvider.d.ts +17 -0
  202. package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/Contexts/BulkActionsContext.d.ts +1 -1
  203. package/dist/api/lib/ApiProvider/Contexts/FormContext.d.ts +5 -0
  204. package/dist/api/lib/ApiProvider/hooks/types.d.ts +150 -0
  205. package/dist/api/lib/ApiProvider/hooks/useProvideBulk.d.ts +7 -0
  206. package/dist/api/lib/ApiProvider/hooks/useProvideForm.d.ts +3 -0
  207. package/dist/api/lib/ApiProvider/hooks/utils/useApiActions.d.ts +11 -0
  208. package/dist/api/lib/ApiProvider/hooks/utils/useStreamingData.d.ts +193 -0
  209. package/dist/api/lib/ApiProvider/types.d.ts +51 -0
  210. package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/getDefaultValues.d.ts +2 -2
  211. package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/getValidationSchema.d.ts +1 -1
  212. package/dist/{core/lib/Wrappers → api/lib}/Provider/Contexts/AuthContext.d.ts +1 -1
  213. package/dist/{core/lib/Wrappers → api/lib}/Provider/Contexts/InfoContext.d.ts +1 -1
  214. package/dist/{core/lib/Wrappers → api/lib}/Provider/Contexts/types.d.ts +5 -4
  215. package/dist/api/lib/Provider/Provider.d.ts +14 -0
  216. package/dist/api/lib/Provider/hooks/types.d.ts +22 -0
  217. package/dist/api/lib/Provider/hooks/useProvideAuth.d.ts +17 -0
  218. package/dist/{core/lib/Wrappers → api/lib}/Provider/hooks/useProvideInfo.d.ts +2 -2
  219. package/dist/{core/lib/Wrappers → api/lib}/Provider/hooks/useProvideLang.d.ts +1 -2
  220. package/dist/api/lib/Provider/types.d.ts +35 -0
  221. package/dist/api/lib/adapters/AdaptersContext.d.ts +10 -0
  222. package/dist/api/lib/adapters/types.d.ts +79 -0
  223. package/dist/{core/lib/Wrappers/Provider/utils → api/lib/auth}/authFetch.d.ts +13 -7
  224. package/dist/api/lib/auth/types.d.ts +40 -0
  225. package/dist/api/lib/auth/userCRUD.d.ts +22 -0
  226. package/dist/{core/lib/Wrappers/ApiProvider/utils/bulkActions/types.d.ts → api/lib/fetchers/bulkActions.types.d.ts} +3 -3
  227. package/dist/api/lib/fetchers/createItem.d.ts +4 -0
  228. package/dist/api/lib/fetchers/deleteItem.d.ts +4 -0
  229. package/dist/api/lib/fetchers/downloadItems.d.ts +4 -0
  230. package/dist/api/lib/fetchers/formCreateItem.d.ts +4 -0
  231. package/dist/api/lib/fetchers/formUpdateItem.d.ts +4 -0
  232. package/dist/{core/lib/Wrappers/ApiProvider/utils/api → api/lib/fetchers}/getInfo.d.ts +3 -1
  233. package/dist/api/lib/fetchers/getItem.d.ts +4 -0
  234. package/dist/{core/lib/Wrappers/ApiProvider/utils/api → api/lib/fetchers}/getItems.d.ts +3 -1
  235. package/dist/api/lib/fetchers/postBulkAction.d.ts +4 -0
  236. package/dist/api/lib/fetchers/request.d.ts +7 -0
  237. package/dist/{core/lib/Wrappers/ApiProvider/utils/api → api/lib/fetchers}/types.d.ts +3 -7
  238. package/dist/api/lib/fetchers/updateItem.d.ts +4 -0
  239. package/dist/api/lib/fetchers/uploadItems.d.ts +3 -0
  240. package/dist/api/lib/fetchers/uploadItems.test.d.ts +1 -0
  241. package/dist/{core → api}/lib/hooks/auth/types.d.ts +1 -38
  242. package/dist/api/lib/hooks/auth/useAuth.test.d.ts +1 -0
  243. package/dist/api/lib/hooks/auth/useInfo.test.d.ts +1 -0
  244. package/dist/api/lib/hooks/useDidUpdate.d.ts +3 -0
  245. package/dist/api/lib/index.d.ts +36 -0
  246. package/dist/api/lib/utils/convertToFormData/convertToFormData.d.ts +17 -0
  247. package/dist/api/lib/utils/convertToFormData/convertToFormData.test.d.ts +1 -0
  248. package/dist/{utils/lib → api/lib/utils}/createFetchParams/createFetchParams.d.ts +3 -4
  249. package/dist/api/lib/utils/createFetchParams/createFetchParams.test.d.ts +1 -0
  250. package/dist/{utils/lib → api/lib/utils}/parseResponse/parseResponse.d.ts +1 -2
  251. package/dist/api/lib/utils/parseResponse/parseResponse.test.d.ts +1 -0
  252. package/dist/constants/cjs/index.cjs +16 -7
  253. package/dist/constants/esm/index.mjs +16 -7
  254. package/dist/constants/lib/index.d.ts +1 -6
  255. package/dist/{jsonforms → contexts}/cjs/_virtual/_commonjsHelpers.cjs +0 -2
  256. package/dist/contexts/cjs/_virtual/index.cjs +5 -0
  257. package/dist/contexts/cjs/_virtual/index2.cjs +5 -0
  258. package/dist/contexts/cjs/_virtual/index3.cjs +6 -0
  259. package/dist/{constants → contexts}/cjs/_virtual/index4.cjs +2 -2
  260. package/dist/contexts/cjs/_virtual/index5.cjs +6 -0
  261. package/dist/contexts/cjs/index.cjs +4 -0
  262. package/dist/contexts/esm/_virtual/_commonjsHelpers.mjs +6 -0
  263. package/dist/contexts/esm/_virtual/index.mjs +5 -0
  264. package/dist/contexts/esm/_virtual/index2.mjs +5 -0
  265. package/dist/contexts/esm/_virtual/index3.mjs +7 -0
  266. package/dist/contexts/esm/_virtual/index4.mjs +4 -0
  267. package/dist/contexts/esm/_virtual/index5.mjs +7 -0
  268. package/dist/contexts/esm/index.mjs +5 -1
  269. package/dist/contexts/lib/index.d.ts +2 -0
  270. package/dist/core/cjs/Dialogs/AddDialog.cjs +2 -2
  271. package/dist/core/cjs/Dialogs/EditDialog.cjs +3 -4
  272. package/dist/core/cjs/Menu/UserMenu/UserMenu.cjs +2 -2
  273. package/dist/core/cjs/Modals/CommonModal.cjs +2 -2
  274. package/dist/core/cjs/Tables/DataGrid/Toolbar/Filter/FilterMenu.cjs +8 -9
  275. package/dist/core/cjs/Tables/NextGenDataGrid/components/OptimizedMRT_RowSelectColumn/zustand.cjs +2 -2
  276. package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useActions.cjs +5 -5
  277. package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/Cell.cjs +4 -4
  278. package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilter.cjs +4 -4
  279. package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/HeaderAdvancedFiltersMenuButton.cjs +4 -4
  280. package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/useColumns.cjs +5 -5
  281. package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useOptimizations.cjs +1 -2
  282. package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useToolbar/useToolbar.cjs +9 -9
  283. package/dist/core/cjs/Wrappers/ApiProvider/ApiProvider.cjs +8 -74
  284. package/dist/core/cjs/Wrappers/Provider/Provider.cjs +18 -47
  285. package/dist/core/cjs/_virtual/index.cjs +25 -3
  286. package/dist/core/cjs/_virtual/index2.cjs +25 -3
  287. package/dist/core/cjs/_virtual/index3.cjs +3 -5
  288. package/dist/core/cjs/_virtual/index4.cjs +2 -2
  289. package/dist/core/cjs/_virtual/index5.cjs +5 -0
  290. package/dist/core/cjs/_virtual/index6.cjs +3 -0
  291. package/dist/core/cjs/_virtual/{isBuffer.cjs → index7.cjs} +2 -2
  292. package/dist/core/cjs/adapters/web/cookieTransport.cjs +15 -0
  293. package/dist/core/cjs/adapters/web/index.cjs +26 -0
  294. package/dist/core/cjs/adapters/web/webFileDownloadAdapter.cjs +16 -0
  295. package/dist/core/cjs/adapters/web/webFormDataAdapter.cjs +8 -0
  296. package/dist/core/cjs/adapters/web/webLocalizationAdapter.cjs +13 -0
  297. package/dist/core/cjs/adapters/web/webNetworkAdapter.cjs +6 -0
  298. package/dist/core/cjs/adapters/web/webOAuthOpener.cjs +26 -0
  299. package/dist/core/cjs/adapters/web/webStorageAdapter.cjs +21 -0
  300. package/dist/core/cjs/fab-react-toolkit-patch/api/hooks/useProvideApi.cjs +7 -12
  301. package/dist/core/cjs/fab-react-toolkit-patch/api/hooks/useProvideBulk.cjs +2 -2
  302. package/dist/core/cjs/fab-react-toolkit-patch/api/utils/api/downloadItems.cjs +5 -3
  303. package/dist/core/cjs/fab-react-toolkit-patch/api/utils/api/getItems.cjs +6 -5
  304. package/dist/core/cjs/fab-react-toolkit-patch/auth/utils/authFetch.cjs +19 -15
  305. package/dist/core/cjs/fab-react-toolkit-patch/auth/utils/userCRUD.cjs +9 -6
  306. package/dist/core/cjs/hooks/api/useBulkActions.cjs +2 -5
  307. package/dist/core/cjs/hooks/api/useForms.cjs +5 -5
  308. package/dist/core/cjs/index.cjs +91 -9
  309. package/dist/core/esm/Dialogs/AddDialog.mjs +1 -1
  310. package/dist/core/esm/Dialogs/EditDialog.mjs +3 -4
  311. package/dist/core/esm/Menu/UserMenu/UserMenu.mjs +1 -1
  312. package/dist/core/esm/Modals/CommonModal.mjs +1 -1
  313. package/dist/core/esm/Tables/DataGrid/Toolbar/Filter/FilterMenu.mjs +8 -9
  314. package/dist/core/esm/Tables/NextGenDataGrid/components/OptimizedMRT_RowSelectColumn/zustand.mjs +2 -2
  315. package/dist/core/esm/Tables/NextGenDataGrid/hooks/useActions.mjs +1 -1
  316. package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/Cell.mjs +1 -1
  317. package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilter.mjs +1 -1
  318. package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/HeaderAdvancedFiltersMenuButton.mjs +1 -1
  319. package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/useColumns.mjs +1 -1
  320. package/dist/core/esm/Tables/NextGenDataGrid/hooks/useOptimizations.mjs +2 -3
  321. package/dist/core/esm/Tables/NextGenDataGrid/hooks/useToolbar/useToolbar.mjs +1 -1
  322. package/dist/core/esm/Wrappers/ApiProvider/ApiProvider.mjs +5 -73
  323. package/dist/core/esm/Wrappers/Provider/Provider.mjs +15 -46
  324. package/dist/core/esm/_virtual/index.mjs +25 -3
  325. package/dist/core/esm/_virtual/index2.mjs +25 -3
  326. package/dist/core/esm/_virtual/index3.mjs +2 -5
  327. package/dist/core/esm/_virtual/index4.mjs +2 -2
  328. package/dist/core/esm/_virtual/index5.mjs +5 -0
  329. package/dist/core/esm/_virtual/index6.mjs +2 -0
  330. package/dist/core/esm/_virtual/index7.mjs +4 -0
  331. package/dist/core/esm/adapters/web/cookieTransport.mjs +15 -0
  332. package/dist/core/esm/adapters/web/index.mjs +26 -0
  333. package/dist/core/esm/adapters/web/webFileDownloadAdapter.mjs +16 -0
  334. package/dist/core/esm/adapters/web/webFormDataAdapter.mjs +8 -0
  335. package/dist/core/esm/adapters/web/webLocalizationAdapter.mjs +13 -0
  336. package/dist/core/esm/adapters/web/webNetworkAdapter.mjs +6 -0
  337. package/dist/core/esm/adapters/web/webOAuthOpener.mjs +26 -0
  338. package/dist/core/esm/adapters/web/webStorageAdapter.mjs +21 -0
  339. package/dist/core/esm/fab-react-toolkit-patch/api/hooks/useProvideApi.mjs +1 -6
  340. package/dist/core/esm/fab-react-toolkit-patch/api/hooks/useProvideBulk.mjs +1 -1
  341. package/dist/core/esm/fab-react-toolkit-patch/api/utils/api/downloadItems.mjs +5 -3
  342. package/dist/core/esm/fab-react-toolkit-patch/api/utils/api/getItems.mjs +4 -3
  343. package/dist/core/esm/fab-react-toolkit-patch/auth/utils/authFetch.mjs +15 -11
  344. package/dist/core/esm/fab-react-toolkit-patch/auth/utils/userCRUD.mjs +8 -5
  345. package/dist/core/esm/hooks/api/useBulkActions.mjs +2 -5
  346. package/dist/core/esm/hooks/api/useForms.mjs +1 -1
  347. package/dist/core/esm/index.mjs +23 -7
  348. package/dist/core/lib/Tables/NextGenDataGrid/components/OptimizedMRT_RowSelectColumn/zustand.d.ts +3 -3
  349. package/dist/core/lib/Tables/NextGenDataGrid/types.d.ts +3 -3
  350. package/dist/core/lib/Wrappers/ApiProvider/ApiProvider.d.ts +4 -17
  351. package/dist/core/lib/Wrappers/ApiProvider/types.d.ts +3 -47
  352. package/dist/core/lib/Wrappers/Provider/Provider.d.ts +4 -14
  353. package/dist/core/lib/Wrappers/Provider/types.d.ts +6 -27
  354. package/dist/core/lib/adapters/web/cookieTransport.d.ts +2 -0
  355. package/dist/core/lib/adapters/web/index.d.ts +10 -0
  356. package/dist/core/lib/adapters/web/webAdapters.test.d.ts +1 -0
  357. package/dist/core/lib/adapters/web/webFileDownloadAdapter.d.ts +2 -0
  358. package/dist/core/lib/adapters/web/webFormDataAdapter.d.ts +2 -0
  359. package/dist/core/lib/adapters/web/webLocalizationAdapter.d.ts +2 -0
  360. package/dist/core/lib/adapters/web/webNetworkAdapter.d.ts +2 -0
  361. package/dist/core/lib/adapters/web/webOAuthOpener.d.ts +2 -0
  362. package/dist/core/lib/adapters/web/webStorageAdapter.d.ts +3 -0
  363. package/dist/core/lib/fab-react-toolkit-patch/api/hooks/useProvideApi.d.ts +1 -1
  364. package/dist/core/lib/fab-react-toolkit-patch/api/hooks/useProvideBulk.d.ts +1 -1
  365. package/dist/core/lib/fab-react-toolkit-patch/api/utils/api/downloadItems.d.ts +2 -2
  366. package/dist/core/lib/fab-react-toolkit-patch/api/utils/api/getItems.d.ts +3 -2
  367. package/dist/core/lib/fab-react-toolkit-patch/auth/utils/authFetch.d.ts +11 -6
  368. package/dist/core/lib/fab-react-toolkit-patch/auth/utils/userCRUD.d.ts +5 -3
  369. package/dist/core/lib/hooks/api/types.d.ts +1 -59
  370. package/dist/core/lib/hooks/api/useForms.d.ts +1 -1
  371. package/dist/core/lib/index.d.ts +7 -8
  372. package/dist/core/lib/test-helpers/types.d.ts +1 -1
  373. package/dist/jsonforms/cjs/MantineInputs/MantineObjectInput.cjs +2 -2
  374. package/dist/jsonforms/cjs/complex/MantineTableControl/MantineTableControl.cjs +6 -11
  375. package/dist/jsonforms/cjs/layouts/Array/ExpandPanelRenderer.cjs +2 -2
  376. package/dist/jsonforms/cjs/layouts/Array/MantineArrayLayout.cjs +3 -5
  377. package/dist/jsonforms/cjs/utils/layout.cjs +2 -2
  378. package/dist/jsonforms/esm/MantineInputs/MantineObjectInput.mjs +2 -2
  379. package/dist/jsonforms/esm/complex/MantineTableControl/MantineTableControl.mjs +7 -12
  380. package/dist/jsonforms/esm/layouts/Array/ExpandPanelRenderer.mjs +2 -2
  381. package/dist/jsonforms/esm/layouts/Array/MantineArrayLayout.mjs +3 -5
  382. package/dist/jsonforms/esm/utils/layout.mjs +2 -2
  383. package/dist/jsonforms/lib/test-helpers/inputWrap.d.ts +2 -2
  384. package/dist/react-native-adapters/cjs/asyncStorageAdapter.cjs +8 -0
  385. package/dist/react-native-adapters/cjs/bearerTransport.cjs +29 -0
  386. package/dist/react-native-adapters/cjs/createReactNativeAdapters.cjs +24 -0
  387. package/dist/react-native-adapters/cjs/index.cjs +16 -0
  388. package/dist/react-native-adapters/cjs/rnFileDownloadAdapter.cjs +24 -0
  389. package/dist/react-native-adapters/cjs/rnFormDataAdapter.cjs +15 -0
  390. package/dist/react-native-adapters/cjs/rnNetworkAdapter.cjs +9 -0
  391. package/dist/react-native-adapters/cjs/rnOAuthOpener.cjs +9 -0
  392. package/dist/react-native-adapters/esm/asyncStorageAdapter.mjs +8 -0
  393. package/dist/react-native-adapters/esm/bearerTransport.mjs +29 -0
  394. package/dist/react-native-adapters/esm/createReactNativeAdapters.mjs +24 -0
  395. package/dist/react-native-adapters/esm/index.mjs +16 -0
  396. package/dist/react-native-adapters/esm/rnFileDownloadAdapter.mjs +24 -0
  397. package/dist/react-native-adapters/esm/rnFormDataAdapter.mjs +15 -0
  398. package/dist/react-native-adapters/esm/rnNetworkAdapter.mjs +9 -0
  399. package/dist/react-native-adapters/esm/rnOAuthOpener.mjs +9 -0
  400. package/dist/react-native-adapters/lib/asyncStorageAdapter.d.ts +7 -0
  401. package/dist/react-native-adapters/lib/asyncStorageAdapter.test.d.ts +1 -0
  402. package/dist/react-native-adapters/lib/bearerTransport.d.ts +5 -0
  403. package/dist/react-native-adapters/lib/bearerTransport.test.d.ts +1 -0
  404. package/dist/react-native-adapters/lib/createReactNativeAdapters.d.ts +11 -0
  405. package/dist/react-native-adapters/lib/createReactNativeAdapters.test.d.ts +1 -0
  406. package/dist/react-native-adapters/lib/index.d.ts +8 -0
  407. package/dist/react-native-adapters/lib/rnFileDownloadAdapter.d.ts +7 -0
  408. package/dist/react-native-adapters/lib/rnFileDownloadAdapter.test.d.ts +1 -0
  409. package/dist/react-native-adapters/lib/rnFormDataAdapter.d.ts +2 -0
  410. package/dist/react-native-adapters/lib/rnFormDataAdapter.test.d.ts +1 -0
  411. package/dist/react-native-adapters/lib/rnNetworkAdapter.d.ts +4 -0
  412. package/dist/react-native-adapters/lib/rnNetworkAdapter.test.d.ts +1 -0
  413. package/dist/react-native-adapters/lib/rnOAuthOpener.d.ts +5 -0
  414. package/dist/react-native-adapters/lib/rnOAuthOpener.test.d.ts +1 -0
  415. package/dist/react-native-adapters/lib/types.d.ts +23 -0
  416. package/dist/utils/cjs/Memoizer/MemoWrapper.cjs +2 -2
  417. package/dist/utils/cjs/Memoizer/RenderWrapper.cjs +2 -2
  418. package/dist/utils/cjs/_virtual/_commonjsHelpers.cjs +4 -0
  419. package/dist/utils/cjs/_virtual/lodash.cjs +6 -3
  420. package/dist/utils/cjs/index.cjs +4 -6
  421. package/dist/utils/cjs/randomId/randomId.cjs +4 -0
  422. package/dist/utils/esm/Memoizer/MemoWrapper.mjs +1 -1
  423. package/dist/utils/esm/Memoizer/RenderWrapper.mjs +1 -1
  424. package/dist/utils/esm/_virtual/_commonjsHelpers.mjs +5 -1
  425. package/dist/utils/esm/_virtual/lodash.mjs +3 -0
  426. package/dist/utils/esm/index.mjs +4 -6
  427. package/dist/utils/esm/randomId/randomId.mjs +4 -0
  428. package/dist/utils/lib/index.d.ts +3 -3
  429. package/dist/utils/lib/randomId/index.d.ts +1 -0
  430. package/dist/utils/lib/randomId/randomId.d.ts +2 -0
  431. package/dist/utils/lib/randomId/randomId.test.d.ts +1 -0
  432. package/dist/zustand/cjs/index.cjs +2 -0
  433. package/dist/zustand/esm/index.mjs +3 -1
  434. package/dist/zustand/lib/index.d.ts +1 -0
  435. package/package.json +13 -2
  436. package/dist/.bundled/jsonforms/cjs/_virtual/lodash.cjs +0 -5
  437. package/dist/.bundled/jsonforms/cjs/_virtual/lodash2.cjs +0 -4
  438. package/dist/.bundled/jsonforms/cjs/_virtual/map.cjs +0 -6
  439. package/dist/.bundled/jsonforms/cjs/_virtual/union.cjs +0 -6
  440. package/dist/.bundled/jsonforms/esm/_virtual/lodash.mjs +0 -5
  441. package/dist/.bundled/jsonforms/esm/_virtual/lodash2.mjs +0 -4
  442. package/dist/.bundled/jsonforms/esm/_virtual/map.mjs +0 -7
  443. package/dist/.bundled/jsonforms/esm/_virtual/union.mjs +0 -7
  444. package/dist/.external/cjs/lodash@4.17.23/lodash/_arrayIncludesWith.cjs +0 -20
  445. package/dist/.external/cjs/lodash@4.17.23/lodash/_baseMap.cjs +0 -21
  446. package/dist/.external/cjs/lodash@4.17.23/lodash/_baseUniq.cjs +0 -59
  447. package/dist/.external/cjs/lodash@4.17.23/lodash/_createSet.cjs +0 -19
  448. package/dist/.external/cjs/lodash@4.17.23/lodash/map.cjs +0 -20
  449. package/dist/.external/cjs/lodash@4.17.23/lodash/union.cjs +0 -19
  450. package/dist/.external/esm/lodash@4.17.23/lodash/_arrayIncludesWith.mjs +0 -20
  451. package/dist/.external/esm/lodash@4.17.23/lodash/_baseMap.mjs +0 -21
  452. package/dist/.external/esm/lodash@4.17.23/lodash/_baseUniq.mjs +0 -59
  453. package/dist/.external/esm/lodash@4.17.23/lodash/_createSet.mjs +0 -19
  454. package/dist/.external/esm/lodash@4.17.23/lodash/map.mjs +0 -20
  455. package/dist/.external/esm/lodash@4.17.23/lodash/union.mjs +0 -19
  456. package/dist/constants/cjs/_virtual/index.cjs +0 -27
  457. package/dist/constants/cjs/_virtual/index2.cjs +0 -27
  458. package/dist/constants/cjs/_virtual/index3.cjs +0 -4
  459. package/dist/constants/esm/_virtual/index.mjs +0 -27
  460. package/dist/constants/esm/_virtual/index2.mjs +0 -27
  461. package/dist/constants/esm/_virtual/index3.mjs +0 -4
  462. package/dist/constants/esm/_virtual/index4.mjs +0 -4
  463. package/dist/core/cjs/Wrappers/ApiProvider/utils/api/createItem.cjs +0 -14
  464. package/dist/core/cjs/Wrappers/ApiProvider/utils/api/deleteItem.cjs +0 -13
  465. package/dist/core/cjs/Wrappers/ApiProvider/utils/api/downloadItems.cjs +0 -39
  466. package/dist/core/cjs/Wrappers/ApiProvider/utils/api/formCreateItem.cjs +0 -12
  467. package/dist/core/cjs/Wrappers/ApiProvider/utils/api/formUpdateItem.cjs +0 -16
  468. package/dist/core/cjs/Wrappers/ApiProvider/utils/api/getInfo.cjs +0 -9
  469. package/dist/core/cjs/Wrappers/ApiProvider/utils/api/getItem.cjs +0 -13
  470. package/dist/core/cjs/Wrappers/ApiProvider/utils/api/getItems.cjs +0 -9
  471. package/dist/core/cjs/Wrappers/ApiProvider/utils/api/updateItem.cjs +0 -14
  472. package/dist/core/cjs/Wrappers/ApiProvider/utils/api/uploadItems.cjs +0 -26
  473. package/dist/core/cjs/Wrappers/ApiProvider/utils/bulkActions/postBulkAction.cjs +0 -14
  474. package/dist/core/cjs/Wrappers/Provider/hooks/useProvideLang.cjs +0 -45
  475. package/dist/core/cjs/Wrappers/Provider/utils/authFetch.cjs +0 -99
  476. package/dist/core/cjs/Wrappers/Provider/utils/userCRUD.cjs +0 -32
  477. package/dist/core/cjs/_virtual/_commonjsHelpers.cjs +0 -8
  478. package/dist/core/cjs/_virtual/_nodeUtil.cjs +0 -4
  479. package/dist/core/cjs/_virtual/isEqual.cjs +0 -6
  480. package/dist/core/cjs/_virtual/lodash.cjs +0 -5
  481. package/dist/core/cjs/_virtual/lodash2.cjs +0 -4
  482. package/dist/core/esm/Wrappers/ApiProvider/utils/api/createItem.mjs +0 -14
  483. package/dist/core/esm/Wrappers/ApiProvider/utils/api/deleteItem.mjs +0 -13
  484. package/dist/core/esm/Wrappers/ApiProvider/utils/api/downloadItems.mjs +0 -39
  485. package/dist/core/esm/Wrappers/ApiProvider/utils/api/formCreateItem.mjs +0 -12
  486. package/dist/core/esm/Wrappers/ApiProvider/utils/api/formUpdateItem.mjs +0 -16
  487. package/dist/core/esm/Wrappers/ApiProvider/utils/api/getInfo.mjs +0 -9
  488. package/dist/core/esm/Wrappers/ApiProvider/utils/api/getItem.mjs +0 -13
  489. package/dist/core/esm/Wrappers/ApiProvider/utils/api/getItems.mjs +0 -9
  490. package/dist/core/esm/Wrappers/ApiProvider/utils/api/updateItem.mjs +0 -14
  491. package/dist/core/esm/Wrappers/ApiProvider/utils/api/uploadItems.mjs +0 -26
  492. package/dist/core/esm/Wrappers/ApiProvider/utils/bulkActions/postBulkAction.mjs +0 -14
  493. package/dist/core/esm/Wrappers/Provider/hooks/useProvideLang.mjs +0 -45
  494. package/dist/core/esm/Wrappers/Provider/utils/authFetch.mjs +0 -99
  495. package/dist/core/esm/Wrappers/Provider/utils/userCRUD.mjs +0 -32
  496. package/dist/core/esm/_virtual/_commonjsHelpers.mjs +0 -8
  497. package/dist/core/esm/_virtual/_nodeUtil.mjs +0 -4
  498. package/dist/core/esm/_virtual/isBuffer.mjs +0 -4
  499. package/dist/core/esm/_virtual/isEqual.mjs +0 -7
  500. package/dist/core/esm/_virtual/lodash.mjs +0 -5
  501. package/dist/core/esm/_virtual/lodash2.mjs +0 -4
  502. package/dist/core/lib/Wrappers/ApiProvider/Contexts/FormContext.d.ts +0 -5
  503. package/dist/core/lib/Wrappers/ApiProvider/hooks/types.d.ts +0 -90
  504. package/dist/core/lib/Wrappers/ApiProvider/hooks/useProvideBulk.d.ts +0 -8
  505. package/dist/core/lib/Wrappers/ApiProvider/hooks/useProvideForm.d.ts +0 -2
  506. package/dist/core/lib/Wrappers/ApiProvider/hooks/utils/useApiActions.d.ts +0 -11
  507. package/dist/core/lib/Wrappers/ApiProvider/hooks/utils/useStreamingData.d.ts +0 -193
  508. package/dist/core/lib/Wrappers/ApiProvider/utils/api/createItem.d.ts +0 -3
  509. package/dist/core/lib/Wrappers/ApiProvider/utils/api/deleteItem.d.ts +0 -3
  510. package/dist/core/lib/Wrappers/ApiProvider/utils/api/downloadItems.d.ts +0 -3
  511. package/dist/core/lib/Wrappers/ApiProvider/utils/api/formCreateItem.d.ts +0 -3
  512. package/dist/core/lib/Wrappers/ApiProvider/utils/api/formUpdateItem.d.ts +0 -3
  513. package/dist/core/lib/Wrappers/ApiProvider/utils/api/getItem.d.ts +0 -3
  514. package/dist/core/lib/Wrappers/ApiProvider/utils/api/updateItem.d.ts +0 -3
  515. package/dist/core/lib/Wrappers/ApiProvider/utils/api/uploadItems.d.ts +0 -2
  516. package/dist/core/lib/Wrappers/ApiProvider/utils/bulkActions/postBulkAction.d.ts +0 -3
  517. package/dist/core/lib/Wrappers/Provider/hooks/types.d.ts +0 -24
  518. package/dist/core/lib/Wrappers/Provider/hooks/useProvideAuth.d.ts +0 -17
  519. package/dist/core/lib/Wrappers/Provider/utils/userCRUD.d.ts +0 -19
  520. package/dist/jsonforms/cjs/_virtual/_cloneBuffer.cjs +0 -4
  521. package/dist/jsonforms/cjs/_virtual/_nodeUtil.cjs +0 -4
  522. package/dist/jsonforms/cjs/_virtual/isBuffer.cjs +0 -4
  523. package/dist/jsonforms/cjs/_virtual/isEmpty.cjs +0 -6
  524. package/dist/jsonforms/cjs/_virtual/lodash.cjs +0 -5
  525. package/dist/jsonforms/cjs/_virtual/lodash2.cjs +0 -4
  526. package/dist/jsonforms/cjs/_virtual/map.cjs +0 -6
  527. package/dist/jsonforms/cjs/_virtual/merge.cjs +0 -6
  528. package/dist/jsonforms/cjs/_virtual/range.cjs +0 -6
  529. package/dist/jsonforms/cjs/_virtual/startCase.cjs +0 -6
  530. package/dist/jsonforms/cjs/_virtual/union.cjs +0 -6
  531. package/dist/jsonforms/esm/_virtual/_cloneBuffer.mjs +0 -4
  532. package/dist/jsonforms/esm/_virtual/_commonjsHelpers.mjs +0 -8
  533. package/dist/jsonforms/esm/_virtual/_nodeUtil.mjs +0 -4
  534. package/dist/jsonforms/esm/_virtual/isBuffer.mjs +0 -4
  535. package/dist/jsonforms/esm/_virtual/isEmpty.mjs +0 -7
  536. package/dist/jsonforms/esm/_virtual/lodash.mjs +0 -5
  537. package/dist/jsonforms/esm/_virtual/lodash2.mjs +0 -4
  538. package/dist/jsonforms/esm/_virtual/map.mjs +0 -7
  539. package/dist/jsonforms/esm/_virtual/merge.mjs +0 -7
  540. package/dist/jsonforms/esm/_virtual/range.mjs +0 -7
  541. package/dist/jsonforms/esm/_virtual/startCase.mjs +0 -7
  542. package/dist/jsonforms/esm/_virtual/union.mjs +0 -7
  543. package/dist/utils/lib/convertToFormData/convertToFormData.d.ts +0 -15
  544. /package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/Contexts/BulkActionsContext.cjs +0 -0
  545. /package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/Contexts/FormContext.cjs +0 -0
  546. /package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/hooks/utils/useLatest.cjs +0 -0
  547. /package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/utils/convertInfo.cjs +0 -0
  548. /package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/utils/createQueryParams.cjs +0 -0
  549. /package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/utils/getDefaultValues.cjs +0 -0
  550. /package/dist/{core/cjs/Wrappers → api/cjs}/Provider/Contexts/AuthContext.cjs +0 -0
  551. /package/dist/{core/cjs/Wrappers → api/cjs}/Provider/Contexts/InfoContext.cjs +0 -0
  552. /package/dist/{core → api}/cjs/translations/de.cjs +0 -0
  553. /package/dist/{utils/cjs → api/cjs/utils}/parseResponse/parseResponse.cjs +0 -0
  554. /package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/Contexts/BulkActionsContext.mjs +0 -0
  555. /package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/Contexts/FormContext.mjs +0 -0
  556. /package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/hooks/utils/useLatest.mjs +0 -0
  557. /package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/utils/convertInfo.mjs +0 -0
  558. /package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/utils/createQueryParams.mjs +0 -0
  559. /package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/utils/getDefaultValues.mjs +0 -0
  560. /package/dist/{core/esm/Wrappers → api/esm}/Provider/Contexts/AuthContext.mjs +0 -0
  561. /package/dist/{core/esm/Wrappers → api/esm}/Provider/Contexts/InfoContext.mjs +0 -0
  562. /package/dist/{core → api}/esm/translations/de.mjs +0 -0
  563. /package/dist/{utils/esm → api/esm/utils}/parseResponse/parseResponse.mjs +0 -0
  564. /package/dist/{core/lib/Wrappers/ApiProvider/hooks/useProvideApi.test.d.ts → api/lib/ApiProvider/ApiProvider.test.d.ts} +0 -0
  565. /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/Contexts/ApiContext.d.ts +0 -0
  566. /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/hooks/useProvideApi.d.ts +0 -0
  567. /package/dist/{core/lib/Wrappers/ApiProvider/hooks/useProvideBulk.test.d.ts → api/lib/ApiProvider/hooks/useProvideApi.test.d.ts} +0 -0
  568. /package/dist/{core/lib/Wrappers/ApiProvider/hooks/useProvideForm.test.d.ts → api/lib/ApiProvider/hooks/useProvideBulk.test.d.ts} +0 -0
  569. /package/dist/{core/lib/Wrappers/ApiProvider/hooks/utils/useApiActions.test.d.ts → api/lib/ApiProvider/hooks/useProvideForm.test.d.ts} +0 -0
  570. /package/dist/{core/lib/Wrappers/ApiProvider/hooks/utils/useLatest.test.d.ts → api/lib/ApiProvider/hooks/utils/useApiActions.test.d.ts} +0 -0
  571. /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/hooks/utils/useLatest.d.ts +0 -0
  572. /package/dist/{core/lib/Wrappers/ApiProvider/hooks/utils/useStreamingData.test.d.ts → api/lib/ApiProvider/hooks/utils/useLatest.test.d.ts} +0 -0
  573. /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/createItem.test.d.ts → api/lib/ApiProvider/hooks/utils/useStreamingData.test.d.ts} +0 -0
  574. /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/convertInfo.d.ts +0 -0
  575. /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/convertInfo.test.d.ts +0 -0
  576. /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/createQueryParams.d.ts +0 -0
  577. /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/createQueryParams.test.d.ts +0 -0
  578. /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/getDefaultValues.test.d.ts +0 -0
  579. /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/getValidationSchema.test.d.ts +0 -0
  580. /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/types.d.ts +0 -0
  581. /package/dist/{core/lib/Wrappers → api/lib}/Provider/Contexts/LangContext.d.ts +0 -0
  582. /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/deleteItem.test.d.ts → api/lib/Provider/Provider.test.d.ts} +0 -0
  583. /package/dist/{core/lib/Wrappers → api/lib}/Provider/hooks/useProvideAuth.test.d.ts +0 -0
  584. /package/dist/{core/lib/Wrappers → api/lib}/Provider/hooks/useProvideInfo.test.d.ts +0 -0
  585. /package/dist/{core/lib/Wrappers → api/lib}/Provider/hooks/useProvideLang.test.d.ts +0 -0
  586. /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/downloadItems.test.d.ts → api/lib/__tests__/purity.test.d.ts} +0 -0
  587. /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/formCreateItem.test.d.ts → api/lib/__tests__/smoke.test.d.ts} +0 -0
  588. /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/formUpdateItem.test.d.ts → api/lib/adapters/AdaptersContext.test.d.ts} +0 -0
  589. /package/dist/{core/lib/Wrappers/Provider/utils → api/lib/auth}/authFetch.test.d.ts +0 -0
  590. /package/dist/{core/lib/Wrappers/Provider/utils → api/lib/auth}/userCRUD.test.d.ts +0 -0
  591. /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/getInfo.test.d.ts → api/lib/fetchers/createItem.test.d.ts} +0 -0
  592. /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/getItem.test.d.ts → api/lib/fetchers/deleteItem.test.d.ts} +0 -0
  593. /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/getItems.test.d.ts → api/lib/fetchers/downloadItems.test.d.ts} +0 -0
  594. /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/updateItem.test.d.ts → api/lib/fetchers/formCreateItem.test.d.ts} +0 -0
  595. /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/uploadItems.test.d.ts → api/lib/fetchers/formUpdateItem.test.d.ts} +0 -0
  596. /package/dist/{core/lib/Wrappers/ApiProvider/utils/bulkActions/postBulkAction.test.d.ts → api/lib/fetchers/getInfo.test.d.ts} +0 -0
  597. /package/dist/{core/lib/hooks/auth/useAuth.test.d.ts → api/lib/fetchers/getItem.test.d.ts} +0 -0
  598. /package/dist/{core/lib/hooks/auth/useInfo.test.d.ts → api/lib/fetchers/getItems.test.d.ts} +0 -0
  599. /package/dist/{utils/lib/convertToFormData/convertToFormData.test.d.ts → api/lib/fetchers/postBulkAction.test.d.ts} +0 -0
  600. /package/dist/{utils/lib/createFetchParams/createFetchParams.test.d.ts → api/lib/fetchers/request.test.d.ts} +0 -0
  601. /package/dist/{utils/lib/parseResponse/parseResponse.test.d.ts → api/lib/fetchers/updateItem.test.d.ts} +0 -0
  602. /package/dist/{core → api}/lib/hooks/auth/useAuth.d.ts +0 -0
  603. /package/dist/{core → api}/lib/hooks/auth/useInfo.d.ts +0 -0
  604. /package/dist/{core → api}/lib/translations/de.d.ts +0 -0
  605. /package/dist/{utils/lib → api/lib/utils}/convertToFormData/index.d.ts +0 -0
  606. /package/dist/{utils/lib → api/lib/utils}/createFetchParams/index.d.ts +0 -0
  607. /package/dist/{utils/lib → api/lib/utils}/parseResponse/index.d.ts +0 -0
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("../../../../core/cjs/_virtual/index.cjs");
4
- const index$1 = require("../../../../core/cjs/_virtual/index2.cjs");
5
- const index$2 = require("../../../../core/cjs/_virtual/index3.cjs");
3
+ const index = require("../../../../core/cjs/_virtual/index5.cjs");
4
+ require("../../../../core/cjs/_virtual/index6.cjs");
6
5
  const toString = Object.prototype.toString;
7
6
  const errorToString = Error.prototype.toString;
8
7
  const regExpToString = RegExp.prototype.toString;
@@ -186,7 +185,7 @@ let tuple = {
186
185
  return ValidationError.formatError(mixed.notType, params);
187
186
  }
188
187
  };
189
- var locale = Object.assign(/* @__PURE__ */ Object.create(null), {
188
+ Object.assign(/* @__PURE__ */ Object.create(null), {
190
189
  mixed,
191
190
  string,
192
191
  number,
@@ -236,9 +235,6 @@ const prefixes = {
236
235
  context: "$",
237
236
  value: "."
238
237
  };
239
- function create$9(key, options) {
240
- return new Reference(key, options);
241
- }
242
238
  class Reference {
243
239
  constructor(key, options = {}) {
244
240
  this.key = void 0;
@@ -428,9 +424,6 @@ function getIn(schema, path, value, context = value) {
428
424
  parentPath: lastPart
429
425
  };
430
426
  }
431
- function reach(obj, path, value, context) {
432
- return getIn(obj, path, value, context).schema;
433
- }
434
427
  class ReferenceSet extends Set {
435
428
  describe() {
436
429
  const description = [];
@@ -1145,96 +1138,6 @@ for (const method of ["validate", "validateSync"]) Schema.prototype[`${method}At
1145
1138
  };
1146
1139
  for (const alias of ["equals", "is"]) Schema.prototype[alias] = Schema.prototype.oneOf;
1147
1140
  for (const alias of ["not", "nope"]) Schema.prototype[alias] = Schema.prototype.notOneOf;
1148
- const returnsTrue = () => true;
1149
- function create$8(spec) {
1150
- return new MixedSchema(spec);
1151
- }
1152
- class MixedSchema extends Schema {
1153
- constructor(spec) {
1154
- super(typeof spec === "function" ? {
1155
- type: "mixed",
1156
- check: spec
1157
- } : Object.assign({
1158
- type: "mixed",
1159
- check: returnsTrue
1160
- }, spec));
1161
- }
1162
- }
1163
- create$8.prototype = MixedSchema.prototype;
1164
- function create$7() {
1165
- return new BooleanSchema();
1166
- }
1167
- class BooleanSchema extends Schema {
1168
- constructor() {
1169
- super({
1170
- type: "boolean",
1171
- check(v) {
1172
- if (v instanceof Boolean) v = v.valueOf();
1173
- return typeof v === "boolean";
1174
- }
1175
- });
1176
- this.withMutation(() => {
1177
- this.transform((value, _raw) => {
1178
- if (this.spec.coerce && !this.isType(value)) {
1179
- if (/^(true|1)$/i.test(String(value))) return true;
1180
- if (/^(false|0)$/i.test(String(value))) return false;
1181
- }
1182
- return value;
1183
- });
1184
- });
1185
- }
1186
- isTrue(message = boolean.isValue) {
1187
- return this.test({
1188
- message,
1189
- name: "is-value",
1190
- exclusive: true,
1191
- params: {
1192
- value: "true"
1193
- },
1194
- test(value) {
1195
- return isAbsent(value) || value === true;
1196
- }
1197
- });
1198
- }
1199
- isFalse(message = boolean.isValue) {
1200
- return this.test({
1201
- message,
1202
- name: "is-value",
1203
- exclusive: true,
1204
- params: {
1205
- value: "false"
1206
- },
1207
- test(value) {
1208
- return isAbsent(value) || value === false;
1209
- }
1210
- });
1211
- }
1212
- default(def) {
1213
- return super.default(def);
1214
- }
1215
- defined(msg) {
1216
- return super.defined(msg);
1217
- }
1218
- optional() {
1219
- return super.optional();
1220
- }
1221
- required(msg) {
1222
- return super.required(msg);
1223
- }
1224
- notRequired() {
1225
- return super.notRequired();
1226
- }
1227
- nullable() {
1228
- return super.nullable();
1229
- }
1230
- nonNullable(msg) {
1231
- return super.nonNullable(msg);
1232
- }
1233
- strip(v) {
1234
- return super.strip(v);
1235
- }
1236
- }
1237
- create$7.prototype = BooleanSchema.prototype;
1238
1141
  const isoReg = /^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;
1239
1142
  function parseIsoDate(date2) {
1240
1143
  const struct = parseDateStruct(date2);
@@ -1274,338 +1177,8 @@ function parseDateStruct(date2) {
1274
1177
  function toNumber(str, defaultValue = 0) {
1275
1178
  return Number(str) || defaultValue;
1276
1179
  }
1277
- let rEmail = (
1278
- // eslint-disable-next-line
1279
- /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/
1280
- );
1281
- let rUrl = (
1282
- // eslint-disable-next-line
1283
- /^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i
1284
- );
1285
- let rUUID = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
1286
- let yearMonthDay = "^\\d{4}-\\d{2}-\\d{2}";
1287
- let hourMinuteSecond = "\\d{2}:\\d{2}:\\d{2}";
1288
- let zOrOffset = "(([+-]\\d{2}(:?\\d{2})?)|Z)";
1289
- let rIsoDateTime = new RegExp(`${yearMonthDay}T${hourMinuteSecond}(\\.\\d+)?${zOrOffset}$`);
1290
- let isTrimmed = (value) => isAbsent(value) || value === value.trim();
1291
- let objStringTag = {}.toString();
1292
- function create$6() {
1293
- return new StringSchema();
1294
- }
1295
- class StringSchema extends Schema {
1296
- constructor() {
1297
- super({
1298
- type: "string",
1299
- check(value) {
1300
- if (value instanceof String) value = value.valueOf();
1301
- return typeof value === "string";
1302
- }
1303
- });
1304
- this.withMutation(() => {
1305
- this.transform((value, _raw) => {
1306
- if (!this.spec.coerce || this.isType(value)) return value;
1307
- if (Array.isArray(value)) return value;
1308
- const strValue = value != null && value.toString ? value.toString() : value;
1309
- if (strValue === objStringTag) return value;
1310
- return strValue;
1311
- });
1312
- });
1313
- }
1314
- required(message) {
1315
- return super.required(message).withMutation((schema) => schema.test({
1316
- message: message || mixed.required,
1317
- name: "required",
1318
- skipAbsent: true,
1319
- test: (value) => !!value.length
1320
- }));
1321
- }
1322
- notRequired() {
1323
- return super.notRequired().withMutation((schema) => {
1324
- schema.tests = schema.tests.filter((t) => t.OPTIONS.name !== "required");
1325
- return schema;
1326
- });
1327
- }
1328
- length(length, message = string.length) {
1329
- return this.test({
1330
- message,
1331
- name: "length",
1332
- exclusive: true,
1333
- params: {
1334
- length
1335
- },
1336
- skipAbsent: true,
1337
- test(value) {
1338
- return value.length === this.resolve(length);
1339
- }
1340
- });
1341
- }
1342
- min(min, message = string.min) {
1343
- return this.test({
1344
- message,
1345
- name: "min",
1346
- exclusive: true,
1347
- params: {
1348
- min
1349
- },
1350
- skipAbsent: true,
1351
- test(value) {
1352
- return value.length >= this.resolve(min);
1353
- }
1354
- });
1355
- }
1356
- max(max, message = string.max) {
1357
- return this.test({
1358
- name: "max",
1359
- exclusive: true,
1360
- message,
1361
- params: {
1362
- max
1363
- },
1364
- skipAbsent: true,
1365
- test(value) {
1366
- return value.length <= this.resolve(max);
1367
- }
1368
- });
1369
- }
1370
- matches(regex, options) {
1371
- let excludeEmptyString = false;
1372
- let message;
1373
- let name;
1374
- if (options) {
1375
- if (typeof options === "object") {
1376
- ({
1377
- excludeEmptyString = false,
1378
- message,
1379
- name
1380
- } = options);
1381
- } else {
1382
- message = options;
1383
- }
1384
- }
1385
- return this.test({
1386
- name: name || "matches",
1387
- message: message || string.matches,
1388
- params: {
1389
- regex
1390
- },
1391
- skipAbsent: true,
1392
- test: (value) => value === "" && excludeEmptyString || value.search(regex) !== -1
1393
- });
1394
- }
1395
- email(message = string.email) {
1396
- return this.matches(rEmail, {
1397
- name: "email",
1398
- message,
1399
- excludeEmptyString: true
1400
- });
1401
- }
1402
- url(message = string.url) {
1403
- return this.matches(rUrl, {
1404
- name: "url",
1405
- message,
1406
- excludeEmptyString: true
1407
- });
1408
- }
1409
- uuid(message = string.uuid) {
1410
- return this.matches(rUUID, {
1411
- name: "uuid",
1412
- message,
1413
- excludeEmptyString: false
1414
- });
1415
- }
1416
- datetime(options) {
1417
- let message = "";
1418
- let allowOffset;
1419
- let precision;
1420
- if (options) {
1421
- if (typeof options === "object") {
1422
- ({
1423
- message = "",
1424
- allowOffset = false,
1425
- precision = void 0
1426
- } = options);
1427
- } else {
1428
- message = options;
1429
- }
1430
- }
1431
- return this.matches(rIsoDateTime, {
1432
- name: "datetime",
1433
- message: message || string.datetime,
1434
- excludeEmptyString: true
1435
- }).test({
1436
- name: "datetime_offset",
1437
- message: message || string.datetime_offset,
1438
- params: {
1439
- allowOffset
1440
- },
1441
- skipAbsent: true,
1442
- test: (value) => {
1443
- if (!value || allowOffset) return true;
1444
- const struct = parseDateStruct(value);
1445
- if (!struct) return false;
1446
- return !!struct.z;
1447
- }
1448
- }).test({
1449
- name: "datetime_precision",
1450
- message: message || string.datetime_precision,
1451
- params: {
1452
- precision
1453
- },
1454
- skipAbsent: true,
1455
- test: (value) => {
1456
- if (!value || precision == void 0) return true;
1457
- const struct = parseDateStruct(value);
1458
- if (!struct) return false;
1459
- return struct.precision === precision;
1460
- }
1461
- });
1462
- }
1463
- //-- transforms --
1464
- ensure() {
1465
- return this.default("").transform((val) => val === null ? "" : val);
1466
- }
1467
- trim(message = string.trim) {
1468
- return this.transform((val) => val != null ? val.trim() : val).test({
1469
- message,
1470
- name: "trim",
1471
- test: isTrimmed
1472
- });
1473
- }
1474
- lowercase(message = string.lowercase) {
1475
- return this.transform((value) => !isAbsent(value) ? value.toLowerCase() : value).test({
1476
- message,
1477
- name: "string_case",
1478
- exclusive: true,
1479
- skipAbsent: true,
1480
- test: (value) => isAbsent(value) || value === value.toLowerCase()
1481
- });
1482
- }
1483
- uppercase(message = string.uppercase) {
1484
- return this.transform((value) => !isAbsent(value) ? value.toUpperCase() : value).test({
1485
- message,
1486
- name: "string_case",
1487
- exclusive: true,
1488
- skipAbsent: true,
1489
- test: (value) => isAbsent(value) || value === value.toUpperCase()
1490
- });
1491
- }
1492
- }
1493
- create$6.prototype = StringSchema.prototype;
1494
- let isNaN$1 = (value) => value != +value;
1495
- function create$5() {
1496
- return new NumberSchema();
1497
- }
1498
- class NumberSchema extends Schema {
1499
- constructor() {
1500
- super({
1501
- type: "number",
1502
- check(value) {
1503
- if (value instanceof Number) value = value.valueOf();
1504
- return typeof value === "number" && !isNaN$1(value);
1505
- }
1506
- });
1507
- this.withMutation(() => {
1508
- this.transform((value, _raw) => {
1509
- if (!this.spec.coerce) return value;
1510
- let parsed = value;
1511
- if (typeof parsed === "string") {
1512
- parsed = parsed.replace(/\s/g, "");
1513
- if (parsed === "") return NaN;
1514
- parsed = +parsed;
1515
- }
1516
- if (this.isType(parsed) || parsed === null) return parsed;
1517
- return parseFloat(parsed);
1518
- });
1519
- });
1520
- }
1521
- min(min, message = number.min) {
1522
- return this.test({
1523
- message,
1524
- name: "min",
1525
- exclusive: true,
1526
- params: {
1527
- min
1528
- },
1529
- skipAbsent: true,
1530
- test(value) {
1531
- return value >= this.resolve(min);
1532
- }
1533
- });
1534
- }
1535
- max(max, message = number.max) {
1536
- return this.test({
1537
- message,
1538
- name: "max",
1539
- exclusive: true,
1540
- params: {
1541
- max
1542
- },
1543
- skipAbsent: true,
1544
- test(value) {
1545
- return value <= this.resolve(max);
1546
- }
1547
- });
1548
- }
1549
- lessThan(less, message = number.lessThan) {
1550
- return this.test({
1551
- message,
1552
- name: "max",
1553
- exclusive: true,
1554
- params: {
1555
- less
1556
- },
1557
- skipAbsent: true,
1558
- test(value) {
1559
- return value < this.resolve(less);
1560
- }
1561
- });
1562
- }
1563
- moreThan(more, message = number.moreThan) {
1564
- return this.test({
1565
- message,
1566
- name: "min",
1567
- exclusive: true,
1568
- params: {
1569
- more
1570
- },
1571
- skipAbsent: true,
1572
- test(value) {
1573
- return value > this.resolve(more);
1574
- }
1575
- });
1576
- }
1577
- positive(msg = number.positive) {
1578
- return this.moreThan(0, msg);
1579
- }
1580
- negative(msg = number.negative) {
1581
- return this.lessThan(0, msg);
1582
- }
1583
- integer(message = number.integer) {
1584
- return this.test({
1585
- name: "integer",
1586
- message,
1587
- skipAbsent: true,
1588
- test: (val) => Number.isInteger(val)
1589
- });
1590
- }
1591
- truncate() {
1592
- return this.transform((value) => !isAbsent(value) ? value | 0 : value);
1593
- }
1594
- round(method) {
1595
- var _method;
1596
- let avail = ["ceil", "floor", "round", "trunc"];
1597
- method = ((_method = method) == null ? void 0 : _method.toLowerCase()) || "round";
1598
- if (method === "trunc") return this.truncate();
1599
- if (avail.indexOf(method.toLowerCase()) === -1) throw new TypeError("Only valid options for round() are: " + avail.join(", "));
1600
- return this.transform((value) => !isAbsent(value) ? Math[method](value) : value);
1601
- }
1602
- }
1603
- create$5.prototype = NumberSchema.prototype;
1604
1180
  let invalidDate = /* @__PURE__ */ new Date("");
1605
1181
  let isDate = (obj) => Object.prototype.toString.call(obj) === "[object Date]";
1606
- function create$4() {
1607
- return new DateSchema();
1608
- }
1609
1182
  class DateSchema extends Schema {
1610
1183
  constructor() {
1611
1184
  super({
@@ -1665,803 +1238,9 @@ class DateSchema extends Schema {
1665
1238
  }
1666
1239
  }
1667
1240
  DateSchema.INVALID_DATE = invalidDate;
1668
- create$4.prototype = DateSchema.prototype;
1669
- create$4.INVALID_DATE = invalidDate;
1670
- function sortFields(fields, excludedEdges = []) {
1671
- let edges = [];
1672
- let nodes = /* @__PURE__ */ new Set();
1673
- let excludes = new Set(excludedEdges.map(([a, b]) => `${a}-${b}`));
1674
- function addNode(depPath, key) {
1675
- let node = index.propertyExprExports.split(depPath)[0];
1676
- nodes.add(node);
1677
- if (!excludes.has(`${key}-${node}`)) edges.push([key, node]);
1678
- }
1679
- for (const key of Object.keys(fields)) {
1680
- let value = fields[key];
1681
- nodes.add(key);
1682
- if (Reference.isRef(value) && value.isSibling) addNode(value.path, key);
1683
- else if (isSchema(value) && "deps" in value) value.deps.forEach((path) => addNode(path, key));
1684
- }
1685
- return index$2.array(Array.from(nodes), edges).reverse();
1686
- }
1687
- function findIndex(arr, err) {
1688
- let idx = Infinity;
1689
- arr.some((key, ii) => {
1690
- var _err$path;
1691
- if ((_err$path = err.path) != null && _err$path.includes(key)) {
1692
- idx = ii;
1693
- return true;
1694
- }
1695
- });
1696
- return idx;
1697
- }
1698
- function sortByKeyOrder(keys) {
1699
- return (a, b) => {
1700
- return findIndex(keys, a) - findIndex(keys, b);
1701
- };
1702
- }
1703
- const parseJson = (value, _, schema) => {
1704
- if (typeof value !== "string") {
1705
- return value;
1706
- }
1707
- let parsed = value;
1708
- try {
1709
- parsed = JSON.parse(value);
1710
- } catch (err) {
1711
- }
1712
- return schema.isType(parsed) ? parsed : value;
1713
- };
1714
- function deepPartial(schema) {
1715
- if ("fields" in schema) {
1716
- const partial = {};
1717
- for (const [key, fieldSchema] of Object.entries(schema.fields)) {
1718
- partial[key] = deepPartial(fieldSchema);
1719
- }
1720
- return schema.setFields(partial);
1721
- }
1722
- if (schema.type === "array") {
1723
- const nextArray = schema.optional();
1724
- if (nextArray.innerType) nextArray.innerType = deepPartial(nextArray.innerType);
1725
- return nextArray;
1726
- }
1727
- if (schema.type === "tuple") {
1728
- return schema.optional().clone({
1729
- types: schema.spec.types.map(deepPartial)
1730
- });
1731
- }
1732
- if ("optional" in schema) {
1733
- return schema.optional();
1734
- }
1735
- return schema;
1736
- }
1737
- const deepHas = (obj, p) => {
1738
- const path = [...index.propertyExprExports.normalizePath(p)];
1739
- if (path.length === 1) return path[0] in obj;
1740
- let last = path.pop();
1741
- let parent = index.propertyExprExports.getter(index.propertyExprExports.join(path), true)(obj);
1742
- return !!(parent && last in parent);
1743
- };
1744
- let isObject = (obj) => Object.prototype.toString.call(obj) === "[object Object]";
1745
- function unknown(ctx, value) {
1746
- let known = Object.keys(ctx.fields);
1747
- return Object.keys(value).filter((key) => known.indexOf(key) === -1);
1748
- }
1749
- const defaultSort = sortByKeyOrder([]);
1750
- function create$3(spec) {
1751
- return new ObjectSchema(spec);
1752
- }
1753
- class ObjectSchema extends Schema {
1754
- constructor(spec) {
1755
- super({
1756
- type: "object",
1757
- check(value) {
1758
- return isObject(value) || typeof value === "function";
1759
- }
1760
- });
1761
- this.fields = /* @__PURE__ */ Object.create(null);
1762
- this._sortErrors = defaultSort;
1763
- this._nodes = [];
1764
- this._excludedEdges = [];
1765
- this.withMutation(() => {
1766
- if (spec) {
1767
- this.shape(spec);
1768
- }
1769
- });
1770
- }
1771
- _cast(_value, options = {}) {
1772
- var _options$stripUnknown;
1773
- let value = super._cast(_value, options);
1774
- if (value === void 0) return this.getDefault(options);
1775
- if (!this._typeCheck(value)) return value;
1776
- let fields = this.fields;
1777
- let strip = (_options$stripUnknown = options.stripUnknown) != null ? _options$stripUnknown : this.spec.noUnknown;
1778
- let props = [].concat(this._nodes, Object.keys(value).filter((v) => !this._nodes.includes(v)));
1779
- let intermediateValue = {};
1780
- let innerOptions = Object.assign({}, options, {
1781
- parent: intermediateValue,
1782
- __validating: options.__validating || false
1783
- });
1784
- let isChanged = false;
1785
- for (const prop of props) {
1786
- let field = fields[prop];
1787
- let exists = prop in value;
1788
- let inputValue = value[prop];
1789
- if (field) {
1790
- let fieldValue;
1791
- innerOptions.path = (options.path ? `${options.path}.` : "") + prop;
1792
- field = field.resolve({
1793
- value: inputValue,
1794
- context: options.context,
1795
- parent: intermediateValue
1796
- });
1797
- let fieldSpec = field instanceof Schema ? field.spec : void 0;
1798
- let strict = fieldSpec == null ? void 0 : fieldSpec.strict;
1799
- if (fieldSpec != null && fieldSpec.strip) {
1800
- isChanged = isChanged || prop in value;
1801
- continue;
1802
- }
1803
- fieldValue = !options.__validating || !strict ? field.cast(inputValue, innerOptions) : inputValue;
1804
- if (fieldValue !== void 0) {
1805
- intermediateValue[prop] = fieldValue;
1806
- }
1807
- } else if (exists && !strip) {
1808
- intermediateValue[prop] = inputValue;
1809
- }
1810
- if (exists !== prop in intermediateValue || intermediateValue[prop] !== inputValue) {
1811
- isChanged = true;
1812
- }
1813
- }
1814
- return isChanged ? intermediateValue : value;
1815
- }
1816
- _validate(_value, options = {}, panic, next) {
1817
- let {
1818
- from = [],
1819
- originalValue = _value,
1820
- recursive = this.spec.recursive
1821
- } = options;
1822
- options.from = [{
1823
- schema: this,
1824
- value: originalValue
1825
- }, ...from];
1826
- options.__validating = true;
1827
- options.originalValue = originalValue;
1828
- super._validate(_value, options, panic, (objectErrors, value) => {
1829
- if (!recursive || !isObject(value)) {
1830
- next(objectErrors, value);
1831
- return;
1832
- }
1833
- originalValue = originalValue || value;
1834
- let tests = [];
1835
- for (let key of this._nodes) {
1836
- let field = this.fields[key];
1837
- if (!field || Reference.isRef(field)) {
1838
- continue;
1839
- }
1840
- tests.push(field.asNestedTest({
1841
- options,
1842
- key,
1843
- parent: value,
1844
- parentPath: options.path,
1845
- originalParent: originalValue
1846
- }));
1847
- }
1848
- this.runTests({
1849
- tests,
1850
- value,
1851
- originalValue,
1852
- options
1853
- }, panic, (fieldErrors) => {
1854
- next(fieldErrors.sort(this._sortErrors).concat(objectErrors), value);
1855
- });
1856
- });
1857
- }
1858
- clone(spec) {
1859
- const next = super.clone(spec);
1860
- next.fields = Object.assign({}, this.fields);
1861
- next._nodes = this._nodes;
1862
- next._excludedEdges = this._excludedEdges;
1863
- next._sortErrors = this._sortErrors;
1864
- return next;
1865
- }
1866
- concat(schema) {
1867
- let next = super.concat(schema);
1868
- let nextFields = next.fields;
1869
- for (let [field, schemaOrRef] of Object.entries(this.fields)) {
1870
- const target = nextFields[field];
1871
- nextFields[field] = target === void 0 ? schemaOrRef : target;
1872
- }
1873
- return next.withMutation((s) => (
1874
- // XXX: excludes here is wrong
1875
- s.setFields(nextFields, [...this._excludedEdges, ...schema._excludedEdges])
1876
- ));
1877
- }
1878
- _getDefault(options) {
1879
- if ("default" in this.spec) {
1880
- return super._getDefault(options);
1881
- }
1882
- if (!this._nodes.length) {
1883
- return void 0;
1884
- }
1885
- let dft = {};
1886
- this._nodes.forEach((key) => {
1887
- var _innerOptions;
1888
- const field = this.fields[key];
1889
- let innerOptions = options;
1890
- if ((_innerOptions = innerOptions) != null && _innerOptions.value) {
1891
- innerOptions = Object.assign({}, innerOptions, {
1892
- parent: innerOptions.value,
1893
- value: innerOptions.value[key]
1894
- });
1895
- }
1896
- dft[key] = field && "getDefault" in field ? field.getDefault(innerOptions) : void 0;
1897
- });
1898
- return dft;
1899
- }
1900
- setFields(shape, excludedEdges) {
1901
- let next = this.clone();
1902
- next.fields = shape;
1903
- next._nodes = sortFields(shape, excludedEdges);
1904
- next._sortErrors = sortByKeyOrder(Object.keys(shape));
1905
- if (excludedEdges) next._excludedEdges = excludedEdges;
1906
- return next;
1907
- }
1908
- shape(additions, excludes = []) {
1909
- return this.clone().withMutation((next) => {
1910
- let edges = next._excludedEdges;
1911
- if (excludes.length) {
1912
- if (!Array.isArray(excludes[0])) excludes = [excludes];
1913
- edges = [...next._excludedEdges, ...excludes];
1914
- }
1915
- return next.setFields(Object.assign(next.fields, additions), edges);
1916
- });
1917
- }
1918
- partial() {
1919
- const partial = {};
1920
- for (const [key, schema] of Object.entries(this.fields)) {
1921
- partial[key] = "optional" in schema && schema.optional instanceof Function ? schema.optional() : schema;
1922
- }
1923
- return this.setFields(partial);
1924
- }
1925
- deepPartial() {
1926
- const next = deepPartial(this);
1927
- return next;
1928
- }
1929
- pick(keys) {
1930
- const picked = {};
1931
- for (const key of keys) {
1932
- if (this.fields[key]) picked[key] = this.fields[key];
1933
- }
1934
- return this.setFields(picked, this._excludedEdges.filter(([a, b]) => keys.includes(a) && keys.includes(b)));
1935
- }
1936
- omit(keys) {
1937
- const remaining = [];
1938
- for (const key of Object.keys(this.fields)) {
1939
- if (keys.includes(key)) continue;
1940
- remaining.push(key);
1941
- }
1942
- return this.pick(remaining);
1943
- }
1944
- from(from, to, alias) {
1945
- let fromGetter = index.propertyExprExports.getter(from, true);
1946
- return this.transform((obj) => {
1947
- if (!obj) return obj;
1948
- let newObj = obj;
1949
- if (deepHas(obj, from)) {
1950
- newObj = Object.assign({}, obj);
1951
- if (!alias) delete newObj[from];
1952
- newObj[to] = fromGetter(obj);
1953
- }
1954
- return newObj;
1955
- });
1956
- }
1957
- /** Parse an input JSON string to an object */
1958
- json() {
1959
- return this.transform(parseJson);
1960
- }
1961
- /**
1962
- * Similar to `noUnknown` but only validates that an object is the right shape without stripping the unknown keys
1963
- */
1964
- exact(message) {
1965
- return this.test({
1966
- name: "exact",
1967
- exclusive: true,
1968
- message: message || object.exact,
1969
- test(value) {
1970
- if (value == null) return true;
1971
- const unknownKeys = unknown(this.schema, value);
1972
- return unknownKeys.length === 0 || this.createError({
1973
- params: {
1974
- properties: unknownKeys.join(", ")
1975
- }
1976
- });
1977
- }
1978
- });
1979
- }
1980
- stripUnknown() {
1981
- return this.clone({
1982
- noUnknown: true
1983
- });
1984
- }
1985
- noUnknown(noAllow = true, message = object.noUnknown) {
1986
- if (typeof noAllow !== "boolean") {
1987
- message = noAllow;
1988
- noAllow = true;
1989
- }
1990
- let next = this.test({
1991
- name: "noUnknown",
1992
- exclusive: true,
1993
- message,
1994
- test(value) {
1995
- if (value == null) return true;
1996
- const unknownKeys = unknown(this.schema, value);
1997
- return !noAllow || unknownKeys.length === 0 || this.createError({
1998
- params: {
1999
- unknown: unknownKeys.join(", ")
2000
- }
2001
- });
2002
- }
2003
- });
2004
- next.spec.noUnknown = noAllow;
2005
- return next;
2006
- }
2007
- unknown(allow = true, message = object.noUnknown) {
2008
- return this.noUnknown(!allow, message);
2009
- }
2010
- transformKeys(fn) {
2011
- return this.transform((obj) => {
2012
- if (!obj) return obj;
2013
- const result = {};
2014
- for (const key of Object.keys(obj)) result[fn(key)] = obj[key];
2015
- return result;
2016
- });
2017
- }
2018
- camelCase() {
2019
- return this.transformKeys(index$1.tinyCaseExports.camelCase);
2020
- }
2021
- snakeCase() {
2022
- return this.transformKeys(index$1.tinyCaseExports.snakeCase);
2023
- }
2024
- constantCase() {
2025
- return this.transformKeys((key) => index$1.tinyCaseExports.snakeCase(key).toUpperCase());
2026
- }
2027
- describe(options) {
2028
- const next = (options ? this.resolve(options) : this).clone();
2029
- const base = super.describe(options);
2030
- base.fields = {};
2031
- for (const [key, value] of Object.entries(next.fields)) {
2032
- var _innerOptions2;
2033
- let innerOptions = options;
2034
- if ((_innerOptions2 = innerOptions) != null && _innerOptions2.value) {
2035
- innerOptions = Object.assign({}, innerOptions, {
2036
- parent: innerOptions.value,
2037
- value: innerOptions.value[key]
2038
- });
2039
- }
2040
- base.fields[key] = value.describe(innerOptions);
2041
- }
2042
- return base;
2043
- }
2044
- }
2045
- create$3.prototype = ObjectSchema.prototype;
2046
- function create$2(type) {
2047
- return new ArraySchema(type);
2048
- }
2049
- class ArraySchema extends Schema {
2050
- constructor(type) {
2051
- super({
2052
- type: "array",
2053
- spec: {
2054
- types: type
2055
- },
2056
- check(v) {
2057
- return Array.isArray(v);
2058
- }
2059
- });
2060
- this.innerType = void 0;
2061
- this.innerType = type;
2062
- }
2063
- _cast(_value, _opts) {
2064
- const value = super._cast(_value, _opts);
2065
- if (!this._typeCheck(value) || !this.innerType) {
2066
- return value;
2067
- }
2068
- let isChanged = false;
2069
- const castArray = value.map((v, idx) => {
2070
- const castElement = this.innerType.cast(v, Object.assign({}, _opts, {
2071
- path: `${_opts.path || ""}[${idx}]`,
2072
- parent: value,
2073
- originalValue: v,
2074
- value: v,
2075
- index: idx
2076
- }));
2077
- if (castElement !== v) {
2078
- isChanged = true;
2079
- }
2080
- return castElement;
2081
- });
2082
- return isChanged ? castArray : value;
2083
- }
2084
- _validate(_value, options = {}, panic, next) {
2085
- var _options$recursive;
2086
- let innerType = this.innerType;
2087
- let recursive = (_options$recursive = options.recursive) != null ? _options$recursive : this.spec.recursive;
2088
- options.originalValue != null ? options.originalValue : _value;
2089
- super._validate(_value, options, panic, (arrayErrors, value) => {
2090
- var _options$originalValu2;
2091
- if (!recursive || !innerType || !this._typeCheck(value)) {
2092
- next(arrayErrors, value);
2093
- return;
2094
- }
2095
- let tests = new Array(value.length);
2096
- for (let index2 = 0; index2 < value.length; index2++) {
2097
- var _options$originalValu;
2098
- tests[index2] = innerType.asNestedTest({
2099
- options,
2100
- index: index2,
2101
- parent: value,
2102
- parentPath: options.path,
2103
- originalParent: (_options$originalValu = options.originalValue) != null ? _options$originalValu : _value
2104
- });
2105
- }
2106
- this.runTests({
2107
- value,
2108
- tests,
2109
- originalValue: (_options$originalValu2 = options.originalValue) != null ? _options$originalValu2 : _value,
2110
- options
2111
- }, panic, (innerTypeErrors) => next(innerTypeErrors.concat(arrayErrors), value));
2112
- });
2113
- }
2114
- clone(spec) {
2115
- const next = super.clone(spec);
2116
- next.innerType = this.innerType;
2117
- return next;
2118
- }
2119
- /** Parse an input JSON string to an object */
2120
- json() {
2121
- return this.transform(parseJson);
2122
- }
2123
- concat(schema) {
2124
- let next = super.concat(schema);
2125
- next.innerType = this.innerType;
2126
- if (schema.innerType)
2127
- next.innerType = next.innerType ? (
2128
- // @ts-expect-error Lazy doesn't have concat and will break
2129
- next.innerType.concat(schema.innerType)
2130
- ) : schema.innerType;
2131
- return next;
2132
- }
2133
- of(schema) {
2134
- let next = this.clone();
2135
- if (!isSchema(schema)) throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: " + printValue(schema));
2136
- next.innerType = schema;
2137
- next.spec = Object.assign({}, next.spec, {
2138
- types: schema
2139
- });
2140
- return next;
2141
- }
2142
- length(length, message = array.length) {
2143
- return this.test({
2144
- message,
2145
- name: "length",
2146
- exclusive: true,
2147
- params: {
2148
- length
2149
- },
2150
- skipAbsent: true,
2151
- test(value) {
2152
- return value.length === this.resolve(length);
2153
- }
2154
- });
2155
- }
2156
- min(min, message) {
2157
- message = message || array.min;
2158
- return this.test({
2159
- message,
2160
- name: "min",
2161
- exclusive: true,
2162
- params: {
2163
- min
2164
- },
2165
- skipAbsent: true,
2166
- // FIXME(ts): Array<typeof T>
2167
- test(value) {
2168
- return value.length >= this.resolve(min);
2169
- }
2170
- });
2171
- }
2172
- max(max, message) {
2173
- message = message || array.max;
2174
- return this.test({
2175
- message,
2176
- name: "max",
2177
- exclusive: true,
2178
- params: {
2179
- max
2180
- },
2181
- skipAbsent: true,
2182
- test(value) {
2183
- return value.length <= this.resolve(max);
2184
- }
2185
- });
2186
- }
2187
- ensure() {
2188
- return this.default(() => []).transform((val, original) => {
2189
- if (this._typeCheck(val)) return val;
2190
- return original == null ? [] : [].concat(original);
2191
- });
2192
- }
2193
- compact(rejector) {
2194
- let reject = !rejector ? (v) => !!v : (v, i, a) => !rejector(v, i, a);
2195
- return this.transform((values) => values != null ? values.filter(reject) : values);
2196
- }
2197
- describe(options) {
2198
- const next = (options ? this.resolve(options) : this).clone();
2199
- const base = super.describe(options);
2200
- if (next.innerType) {
2201
- var _innerOptions;
2202
- let innerOptions = options;
2203
- if ((_innerOptions = innerOptions) != null && _innerOptions.value) {
2204
- innerOptions = Object.assign({}, innerOptions, {
2205
- parent: innerOptions.value,
2206
- value: innerOptions.value[0]
2207
- });
2208
- }
2209
- base.innerType = next.innerType.describe(innerOptions);
2210
- }
2211
- return base;
2212
- }
2213
- }
2214
- create$2.prototype = ArraySchema.prototype;
2215
- function create$1(schemas) {
2216
- return new TupleSchema(schemas);
2217
- }
2218
- class TupleSchema extends Schema {
2219
- constructor(schemas) {
2220
- super({
2221
- type: "tuple",
2222
- spec: {
2223
- types: schemas
2224
- },
2225
- check(v) {
2226
- const types = this.spec.types;
2227
- return Array.isArray(v) && v.length === types.length;
2228
- }
2229
- });
2230
- this.withMutation(() => {
2231
- this.typeError(tuple.notType);
2232
- });
2233
- }
2234
- _cast(inputValue, options) {
2235
- const {
2236
- types
2237
- } = this.spec;
2238
- const value = super._cast(inputValue, options);
2239
- if (!this._typeCheck(value)) {
2240
- return value;
2241
- }
2242
- let isChanged = false;
2243
- const castArray = types.map((type, idx) => {
2244
- const castElement = type.cast(value[idx], Object.assign({}, options, {
2245
- path: `${options.path || ""}[${idx}]`,
2246
- parent: value,
2247
- originalValue: value[idx],
2248
- value: value[idx],
2249
- index: idx
2250
- }));
2251
- if (castElement !== value[idx]) isChanged = true;
2252
- return castElement;
2253
- });
2254
- return isChanged ? castArray : value;
2255
- }
2256
- _validate(_value, options = {}, panic, next) {
2257
- let itemTypes = this.spec.types;
2258
- super._validate(_value, options, panic, (tupleErrors, value) => {
2259
- var _options$originalValu2;
2260
- if (!this._typeCheck(value)) {
2261
- next(tupleErrors, value);
2262
- return;
2263
- }
2264
- let tests = [];
2265
- for (let [index2, itemSchema] of itemTypes.entries()) {
2266
- var _options$originalValu;
2267
- tests[index2] = itemSchema.asNestedTest({
2268
- options,
2269
- index: index2,
2270
- parent: value,
2271
- parentPath: options.path,
2272
- originalParent: (_options$originalValu = options.originalValue) != null ? _options$originalValu : _value
2273
- });
2274
- }
2275
- this.runTests({
2276
- value,
2277
- tests,
2278
- originalValue: (_options$originalValu2 = options.originalValue) != null ? _options$originalValu2 : _value,
2279
- options
2280
- }, panic, (innerTypeErrors) => next(innerTypeErrors.concat(tupleErrors), value));
2281
- });
2282
- }
2283
- describe(options) {
2284
- const next = (options ? this.resolve(options) : this).clone();
2285
- const base = super.describe(options);
2286
- base.innerType = next.spec.types.map((schema, index2) => {
2287
- var _innerOptions;
2288
- let innerOptions = options;
2289
- if ((_innerOptions = innerOptions) != null && _innerOptions.value) {
2290
- innerOptions = Object.assign({}, innerOptions, {
2291
- parent: innerOptions.value,
2292
- value: innerOptions.value[index2]
2293
- });
2294
- }
2295
- return schema.describe(innerOptions);
2296
- });
2297
- return base;
2298
- }
2299
- }
2300
- create$1.prototype = TupleSchema.prototype;
2301
- function create(builder) {
2302
- return new Lazy(builder);
2303
- }
2304
- function catchValidationError(fn) {
2305
- try {
2306
- return fn();
2307
- } catch (err) {
2308
- if (ValidationError.isError(err)) return Promise.reject(err);
2309
- throw err;
2310
- }
2311
- }
2312
- class Lazy {
2313
- constructor(builder) {
2314
- this.type = "lazy";
2315
- this.__isYupSchema__ = true;
2316
- this.spec = void 0;
2317
- this._resolve = (value, options = {}) => {
2318
- let schema = this.builder(value, options);
2319
- if (!isSchema(schema)) throw new TypeError("lazy() functions must return a valid schema");
2320
- if (this.spec.optional) schema = schema.optional();
2321
- return schema.resolve(options);
2322
- };
2323
- this.builder = builder;
2324
- this.spec = {
2325
- meta: void 0,
2326
- optional: false
2327
- };
2328
- }
2329
- clone(spec) {
2330
- const next = new Lazy(this.builder);
2331
- next.spec = Object.assign({}, this.spec, spec);
2332
- return next;
2333
- }
2334
- optionality(optional) {
2335
- const next = this.clone({
2336
- optional
2337
- });
2338
- return next;
2339
- }
2340
- optional() {
2341
- return this.optionality(true);
2342
- }
2343
- resolve(options) {
2344
- return this._resolve(options.value, options);
2345
- }
2346
- cast(value, options) {
2347
- return this._resolve(value, options).cast(value, options);
2348
- }
2349
- asNestedTest(config) {
2350
- let {
2351
- key,
2352
- index: index2,
2353
- parent,
2354
- options
2355
- } = config;
2356
- let value = parent[index2 != null ? index2 : key];
2357
- return this._resolve(value, Object.assign({}, options, {
2358
- value,
2359
- parent
2360
- })).asNestedTest(config);
2361
- }
2362
- validate(value, options) {
2363
- return catchValidationError(() => this._resolve(value, options).validate(value, options));
2364
- }
2365
- validateSync(value, options) {
2366
- return this._resolve(value, options).validateSync(value, options);
2367
- }
2368
- validateAt(path, value, options) {
2369
- return catchValidationError(() => this._resolve(value, options).validateAt(path, value, options));
2370
- }
2371
- validateSyncAt(path, value, options) {
2372
- return this._resolve(value, options).validateSyncAt(path, value, options);
2373
- }
2374
- isValid(value, options) {
2375
- try {
2376
- return this._resolve(value, options).isValid(value, options);
2377
- } catch (err) {
2378
- if (ValidationError.isError(err)) {
2379
- return Promise.resolve(false);
2380
- }
2381
- throw err;
2382
- }
2383
- }
2384
- isValidSync(value, options) {
2385
- return this._resolve(value, options).isValidSync(value, options);
2386
- }
2387
- describe(options) {
2388
- return options ? this.resolve(options).describe(options) : {
2389
- type: "lazy",
2390
- meta: this.spec.meta,
2391
- label: void 0
2392
- };
2393
- }
2394
- meta(...args) {
2395
- if (args.length === 0) return this.spec.meta;
2396
- let next = this.clone();
2397
- next.spec.meta = Object.assign(next.spec.meta || {}, args[0]);
2398
- return next;
2399
- }
2400
- get ["~standard"]() {
2401
- const schema = this;
2402
- const standard = {
2403
- version: 1,
2404
- vendor: "yup",
2405
- async validate(value) {
2406
- try {
2407
- const result = await schema.validate(value, {
2408
- abortEarly: false
2409
- });
2410
- return {
2411
- value: result
2412
- };
2413
- } catch (err) {
2414
- if (ValidationError.isError(err)) {
2415
- return {
2416
- issues: issuesFromValidationError(err)
2417
- };
2418
- }
2419
- throw err;
2420
- }
2421
- }
2422
- };
2423
- return standard;
2424
- }
2425
- }
2426
- function setLocale(custom) {
2427
- Object.keys(custom).forEach((type) => {
2428
- Object.keys(custom[type]).forEach((method) => {
2429
- locale[type][method] = custom[type][method];
2430
- });
2431
- });
2432
- }
2433
- function addMethod(schemaType, name, fn) {
2434
- if (!schemaType || !isSchema(schemaType.prototype)) throw new TypeError("You must provide a yup schema constructor function");
2435
- if (typeof name !== "string") throw new TypeError("A Method name must be provided");
2436
- if (typeof fn !== "function") throw new TypeError("Method function must be provided");
2437
- schemaType.prototype[name] = fn;
2438
- }
2439
- exports.ArraySchema = ArraySchema;
2440
- exports.BooleanSchema = BooleanSchema;
2441
1241
  exports.DateSchema = DateSchema;
2442
- exports.LazySchema = Lazy;
2443
- exports.MixedSchema = MixedSchema;
2444
- exports.NumberSchema = NumberSchema;
2445
- exports.ObjectSchema = ObjectSchema;
2446
1242
  exports.Schema = Schema;
2447
- exports.StringSchema = StringSchema;
2448
- exports.TupleSchema = TupleSchema;
2449
1243
  exports.ValidationError = ValidationError;
2450
- exports.addMethod = addMethod;
2451
- exports.array = create$2;
2452
- exports.bool = create$7;
2453
- exports.boolean = create$7;
2454
- exports.date = create$4;
2455
- exports.defaultLocale = locale;
2456
1244
  exports.getIn = getIn;
2457
1245
  exports.isSchema = isSchema;
2458
- exports.lazy = create;
2459
- exports.mixed = create$8;
2460
- exports.number = create$5;
2461
- exports.object = create$3;
2462
1246
  exports.printValue = printValue;
2463
- exports.reach = reach;
2464
- exports.ref = create$9;
2465
- exports.setLocale = setLocale;
2466
- exports.string = create$6;
2467
- exports.tuple = create$1;