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
@@ -0,0 +1,37 @@
1
+ import type {DelimiterCase} from './delimiter-case';
2
+
3
+ /**
4
+ Convert object properties to delimiter case but not recursively.
5
+
6
+ This can be useful when, for example, converting some API types from a different style.
7
+
8
+ @see DelimiterCase
9
+ @see DelimiterCasedPropertiesDeep
10
+
11
+ @example
12
+ ```
13
+ import type {DelimiterCasedProperties} from '..';
14
+
15
+ interface User {
16
+ userId: number;
17
+ userName: string;
18
+ }
19
+
20
+ const result: DelimiterCasedProperties<User, '-'> = {
21
+ 'user-id': 1,
22
+ 'user-name': 'Tom',
23
+ };
24
+ ```
25
+
26
+ @category Change case
27
+ @category Template literal
28
+ @category Object
29
+ */
30
+ export type DelimiterCasedProperties<
31
+ Value,
32
+ Delimiter extends string,
33
+ > = Value extends Function
34
+ ? Value
35
+ : Value extends Array<infer U>
36
+ ? Value
37
+ : {[K in keyof Value as DelimiterCase<K, Delimiter>]: Value[K]};
@@ -0,0 +1,62 @@
1
+ import type {ArrayEntry, MapEntry, ObjectEntry, SetEntry} from './entry';
2
+
3
+ type ArrayEntries<BaseType extends readonly unknown[]> = Array<ArrayEntry<BaseType>>;
4
+ type MapEntries<BaseType> = Array<MapEntry<BaseType>>;
5
+ type ObjectEntries<BaseType> = Array<ObjectEntry<BaseType>>;
6
+ type SetEntries<BaseType extends Set<unknown>> = Array<SetEntry<BaseType>>;
7
+
8
+ /**
9
+ Many collections have an `entries` method which returns an array of a given object's own enumerable string-keyed property [key, value] pairs. The `Entries` type will return the type of that collection's entries.
10
+
11
+ For example the {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries|`Object`}, {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/entries|`Map`}, {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/entries|`Array`}, and {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/entries|`Set`} collections all have this method. Note that `WeakMap` and `WeakSet` do not have this method since their entries are not enumerable.
12
+
13
+ @see `Entry` if you want to just access the type of a single entry.
14
+
15
+ @example
16
+ ```
17
+ import type {Entries} from '..';
18
+
19
+ interface Example {
20
+ someKey: number;
21
+ }
22
+
23
+ const manipulatesEntries = (examples: Entries<Example>) => examples.map(example => [
24
+ // Does some arbitrary processing on the key (with type information available)
25
+ example[0].toUpperCase(),
26
+
27
+ // Does some arbitrary processing on the value (with type information available)
28
+ example[1].toFixed()
29
+ ]);
30
+
31
+ const example: Example = {someKey: 1};
32
+ const entries = Object.entries(example) as Entries<Example>;
33
+ const output = manipulatesEntries(entries);
34
+
35
+ // Objects
36
+ const objectExample = {a: 1};
37
+ const objectEntries: Entries<typeof objectExample> = [['a', 1]];
38
+
39
+ // Arrays
40
+ const arrayExample = ['a', 1];
41
+ const arrayEntries: Entries<typeof arrayExample> = [[0, 'a'], [1, 1]];
42
+
43
+ // Maps
44
+ const mapExample = new Map([['a', 1]]);
45
+ const mapEntries: Entries<typeof map> = [['a', 1]];
46
+
47
+ // Sets
48
+ const setExample = new Set(['a', 1]);
49
+ const setEntries: Entries<typeof setExample> = [['a', 'a'], [1, 1]];
50
+ ```
51
+
52
+ @category Object
53
+ @category Map
54
+ @category Set
55
+ @category Array
56
+ */
57
+ export type Entries<BaseType> =
58
+ BaseType extends Map<unknown, unknown> ? MapEntries<BaseType>
59
+ : BaseType extends Set<unknown> ? SetEntries<BaseType>
60
+ : BaseType extends readonly unknown[] ? ArrayEntries<BaseType>
61
+ : BaseType extends object ? ObjectEntries<BaseType>
62
+ : never;
@@ -0,0 +1,65 @@
1
+ type MapKey<BaseType> = BaseType extends Map<infer KeyType, unknown> ? KeyType : never;
2
+ type MapValue<BaseType> = BaseType extends Map<unknown, infer ValueType> ? ValueType : never;
3
+
4
+ export type ArrayEntry<BaseType extends readonly unknown[]> = [number, BaseType[number]];
5
+ export type MapEntry<BaseType> = [MapKey<BaseType>, MapValue<BaseType>];
6
+ export type ObjectEntry<BaseType> = [keyof BaseType, BaseType[keyof BaseType]];
7
+ export type SetEntry<BaseType> = BaseType extends Set<infer ItemType> ? [ItemType, ItemType] : never;
8
+
9
+ /**
10
+ Many collections have an `entries` method which returns an array of a given object's own enumerable string-keyed property [key, value] pairs. The `Entry` type will return the type of that collection's entry.
11
+
12
+ For example the {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries|`Object`}, {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/entries|`Map`}, {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/entries|`Array`}, and {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/entries|`Set`} collections all have this method. Note that `WeakMap` and `WeakSet` do not have this method since their entries are not enumerable.
13
+
14
+ @see `Entries` if you want to just access the type of the array of entries (which is the return of the `.entries()` method).
15
+
16
+ @example
17
+ ```
18
+ import type {Entry} from '..';
19
+
20
+ interface Example {
21
+ someKey: number;
22
+ }
23
+
24
+ const manipulatesEntry = (example: Entry<Example>) => [
25
+ // Does some arbitrary processing on the key (with type information available)
26
+ example[0].toUpperCase(),
27
+
28
+ // Does some arbitrary processing on the value (with type information available)
29
+ example[1].toFixed(),
30
+ ];
31
+
32
+ const example: Example = {someKey: 1};
33
+ const entry = Object.entries(example)[0] as Entry<Example>;
34
+ const output = manipulatesEntry(entry);
35
+
36
+ // Objects
37
+ const objectExample = {a: 1};
38
+ const objectEntry: Entry<typeof objectExample> = ['a', 1];
39
+
40
+ // Arrays
41
+ const arrayExample = ['a', 1];
42
+ const arrayEntryString: Entry<typeof arrayExample> = [0, 'a'];
43
+ const arrayEntryNumber: Entry<typeof arrayExample> = [1, 1];
44
+
45
+ // Maps
46
+ const mapExample = new Map([['a', 1]]);
47
+ const mapEntry: Entry<typeof mapExample> = ['a', 1];
48
+
49
+ // Sets
50
+ const setExample = new Set(['a', 1]);
51
+ const setEntryString: Entry<typeof setExample> = ['a', 'a'];
52
+ const setEntryNumber: Entry<typeof setExample> = [1, 1];
53
+ ```
54
+
55
+ @category Object
56
+ @category Map
57
+ @category Array
58
+ @category Set
59
+ */
60
+ export type Entry<BaseType> =
61
+ BaseType extends Map<unknown, unknown> ? MapEntry<BaseType>
62
+ : BaseType extends Set<unknown> ? SetEntry<BaseType>
63
+ : BaseType extends readonly unknown[] ? ArrayEntry<BaseType>
64
+ : BaseType extends object ? ObjectEntry<BaseType>
65
+ : never;
@@ -0,0 +1,73 @@
1
+ import type {KeysOfUnion} from './internal';
2
+
3
+ /**
4
+ Extract the element of an array that also works for array union.
5
+
6
+ Returns `never` if T is not an array.
7
+
8
+ It creates a type-safe way to access the element type of `unknown` type.
9
+ */
10
+ type ArrayElement<T> = T extends readonly unknown[] ? T[0] : never;
11
+
12
+ /**
13
+ Extract the object field type if T is an object and K is a key of T, return `never` otherwise.
14
+
15
+ It creates a type-safe way to access the member type of `unknown` type.
16
+ */
17
+ type ObjectValue<T, K> = K extends keyof T ? T[K] : never;
18
+
19
+ /**
20
+ Create a type from `ParameterType` and `InputType` and change keys exclusive to `InputType` to `never`.
21
+ - Generate a list of keys that exists in `InputType` but not in `ParameterType`.
22
+ - Mark these excess keys as `never`.
23
+ */
24
+ type ExactObject<ParameterType, InputType> = {[Key in keyof ParameterType]: Exact<ParameterType[Key], ObjectValue<InputType, Key>>}
25
+ & Record<Exclude<keyof InputType, KeysOfUnion<ParameterType>>, never>;
26
+
27
+ /**
28
+ Create a type that does not allow extra properties, meaning it only allows properties that are explicitly declared.
29
+
30
+ This is useful for function type-guarding to reject arguments with excess properties. Due to the nature of TypeScript, it does not complain if excess properties are provided unless the provided value is an object literal.
31
+
32
+ *Please upvote [this issue](https://github.com/microsoft/TypeScript/issues/12936) if you want to have this type as a built-in in TypeScript.*
33
+
34
+ @example
35
+ ```
36
+ type OnlyAcceptName = {name: string};
37
+
38
+ function onlyAcceptName(args: OnlyAcceptName) {}
39
+
40
+ // TypeScript complains about excess properties when an object literal is provided.
41
+ onlyAcceptName({name: 'name', id: 1});
42
+ //=> `id` is excess
43
+
44
+ // TypeScript does not complain about excess properties when the provided value is a variable (not an object literal).
45
+ const invalidInput = {name: 'name', id: 1};
46
+ onlyAcceptName(invalidInput); // No errors
47
+ ```
48
+
49
+ Having `Exact` allows TypeScript to reject excess properties.
50
+
51
+ @example
52
+ ```
53
+ import {Exact} from '..';
54
+
55
+ type OnlyAcceptName = {name: string};
56
+
57
+ function onlyAcceptNameImproved<T extends Exact<OnlyAcceptName, T>>(args: T) {}
58
+
59
+ const invalidInput = {name: 'name', id: 1};
60
+ onlyAcceptNameImproved(invalidInput); // Compilation error
61
+ ```
62
+
63
+ [Read more](https://stackoverflow.com/questions/49580725/is-it-possible-to-restrict-typescript-object-to-contain-only-properties-defined)
64
+
65
+ @category Utilities
66
+ */
67
+ export type Exact<ParameterType, InputType> =
68
+ // Convert union of array to array of union: A[] & B[] => (A & B)[]
69
+ ParameterType extends unknown[] ? Array<Exact<ArrayElement<ParameterType>, ArrayElement<InputType>>>
70
+ // In TypeScript, Array is a subtype of ReadonlyArray, so always test Array before ReadonlyArray.
71
+ : ParameterType extends readonly unknown[] ? ReadonlyArray<Exact<ArrayElement<ParameterType>, ArrayElement<InputType>>>
72
+ : ParameterType extends object ? ExactObject<ParameterType, InputType>
73
+ : ParameterType;
@@ -0,0 +1,57 @@
1
+ import type {IsEqual} from './internal';
2
+
3
+ /**
4
+ Filter out keys from an object.
5
+
6
+ Returns `never` if `Exclude` is strictly equal to `Key`.
7
+ Returns `never` if `Key` extends `Exclude`.
8
+ Returns `Key` otherwise.
9
+
10
+ @example
11
+ ```
12
+ type Filtered = Filter<'foo', 'foo'>;
13
+ //=> never
14
+ ```
15
+
16
+ @example
17
+ ```
18
+ type Filtered = Filter<'bar', string>;
19
+ //=> never
20
+ ```
21
+
22
+ @example
23
+ ```
24
+ type Filtered = Filter<'bar', 'foo'>;
25
+ //=> 'bar'
26
+ ```
27
+
28
+ @see {Except}
29
+ */
30
+ type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
31
+
32
+ /**
33
+ Create a type from an object type without certain keys.
34
+
35
+ This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically.
36
+
37
+ This type was proposed to the TypeScript team, which declined it, saying they prefer that libraries implement stricter versions of the built-in types ([microsoft/TypeScript#30825](https://github.com/microsoft/TypeScript/issues/30825#issuecomment-523668235)).
38
+
39
+ @example
40
+ ```
41
+ import type {Except} from '..';
42
+
43
+ type Foo = {
44
+ a: number;
45
+ b: string;
46
+ c: boolean;
47
+ };
48
+
49
+ type FooWithoutA = Except<Foo, 'a' | 'c'>;
50
+ //=> {b: string};
51
+ ```
52
+
53
+ @category Object
54
+ */
55
+ export type Except<ObjectType, KeysType extends keyof ObjectType> = {
56
+ [KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
57
+ };
@@ -0,0 +1,43 @@
1
+ /**
2
+ Methods to exclude.
3
+ */
4
+ type ArrayLengthMutationKeys = 'splice' | 'push' | 'pop' | 'shift' | 'unshift';
5
+
6
+ /**
7
+ Create a type that represents an array of the given type and length. The array's length and the `Array` prototype methods that manipulate its length are excluded in the resulting type.
8
+
9
+ Please participate in [this issue](https://github.com/microsoft/TypeScript/issues/26223) if you want to have a similiar type built into TypeScript.
10
+
11
+ Use-cases:
12
+ - Declaring fixed-length tuples or arrays with a large number of items.
13
+ - Creating a range union (for example, `0 | 1 | 2 | 3 | 4` from the keys of such a type) without having to resort to recursive types.
14
+ - Creating an array of coordinates with a static length, for example, length of 3 for a 3D vector.
15
+
16
+ Note: This type does not prevent out-of-bounds access. Prefer `ReadonlyTuple` unless you need mutability.
17
+
18
+ @example
19
+ ```
20
+ import type {FixedLengthArray} from '..';
21
+
22
+ type FencingTeam = FixedLengthArray<string, 3>;
23
+
24
+ const guestFencingTeam: FencingTeam = ['Josh', 'Michael', 'Robert'];
25
+
26
+ const homeFencingTeam: FencingTeam = ['George', 'John'];
27
+ //=> error TS2322: Type string[] is not assignable to type 'FencingTeam'
28
+
29
+ guestFencingTeam.push('Sam');
30
+ //=> error TS2339: Property 'push' does not exist on type 'FencingTeam'
31
+ ```
32
+
33
+ @category Array
34
+ @see ReadonlyTuple
35
+ */
36
+ export type FixedLengthArray<Element, Length extends number, ArrayPrototype = [Element, ...Element[]]> = Pick<
37
+ ArrayPrototype,
38
+ Exclude<keyof ArrayPrototype, ArrayLengthMutationKeys>
39
+ > & {
40
+ [index: number]: Element;
41
+ [Symbol.iterator]: () => IterableIterator<Element>;
42
+ readonly length: Length;
43
+ };
@@ -0,0 +1,184 @@
1
+ import type {StringDigit} from '../source/internal';
2
+ import type {Split} from './split';
3
+ import type {StringKeyOf} from './string-key-of';
4
+
5
+ type GetOptions = {
6
+ strict?: boolean;
7
+ };
8
+
9
+ /**
10
+ Like the `Get` type but receives an array of strings as a path parameter.
11
+ */
12
+ type GetWithPath<BaseType, Keys extends readonly string[], Options extends GetOptions = {}> =
13
+ Keys extends []
14
+ ? BaseType
15
+ : Keys extends readonly [infer Head, ...infer Tail]
16
+ ? GetWithPath<
17
+ PropertyOf<BaseType, Extract<Head, string>, Options>,
18
+ Extract<Tail, string[]>,
19
+ Options
20
+ >
21
+ : never;
22
+
23
+ /**
24
+ Adds `undefined` to `Type` if `strict` is enabled.
25
+ */
26
+ type Strictify<Type, Options extends GetOptions> =
27
+ Options['strict'] extends true ? Type | undefined : Type;
28
+
29
+ /**
30
+ If `Options['strict']` is `true`, includes `undefined` in the returned type when accessing properties on `Record<string, any>`.
31
+
32
+ Known limitations:
33
+ - Does not include `undefined` in the type on object types with an index signature (for example, `{a: string; [key: string]: string}`).
34
+ */
35
+ type StrictPropertyOf<BaseType, Key extends keyof BaseType, Options extends GetOptions> =
36
+ Record<string, any> extends BaseType
37
+ ? string extends keyof BaseType
38
+ ? Strictify<BaseType[Key], Options> // Record<string, any>
39
+ : BaseType[Key] // Record<'a' | 'b', any> (Records with a string union as keys have required properties)
40
+ : BaseType[Key];
41
+
42
+ /**
43
+ Splits a dot-prop style path into a tuple comprised of the properties in the path. Handles square-bracket notation.
44
+
45
+ @example
46
+ ```
47
+ ToPath<'foo.bar.baz'>
48
+ //=> ['foo', 'bar', 'baz']
49
+
50
+ ToPath<'foo[0].bar.baz'>
51
+ //=> ['foo', '0', 'bar', 'baz']
52
+ ```
53
+ */
54
+ type ToPath<S extends string> = Split<FixPathSquareBrackets<S>, '.'>;
55
+
56
+ /**
57
+ Replaces square-bracketed dot notation with dots, for example, `foo[0].bar` -> `foo.0.bar`.
58
+ */
59
+ type FixPathSquareBrackets<Path extends string> =
60
+ Path extends `[${infer Head}]${infer Tail}`
61
+ ? Tail extends `[${string}`
62
+ ? `${Head}.${FixPathSquareBrackets<Tail>}`
63
+ : `${Head}${FixPathSquareBrackets<Tail>}`
64
+ : Path extends `${infer Head}[${infer Middle}]${infer Tail}`
65
+ ? `${Head}.${FixPathSquareBrackets<`[${Middle}]${Tail}`>}`
66
+ : Path;
67
+
68
+ /**
69
+ Returns true if `LongString` is made up out of `Substring` repeated 0 or more times.
70
+
71
+ @example
72
+ ```
73
+ ConsistsOnlyOf<'aaa', 'a'> //=> true
74
+ ConsistsOnlyOf<'ababab', 'ab'> //=> true
75
+ ConsistsOnlyOf<'aBa', 'a'> //=> false
76
+ ConsistsOnlyOf<'', 'a'> //=> true
77
+ ```
78
+ */
79
+ type ConsistsOnlyOf<LongString extends string, Substring extends string> =
80
+ LongString extends ''
81
+ ? true
82
+ : LongString extends `${Substring}${infer Tail}`
83
+ ? ConsistsOnlyOf<Tail, Substring>
84
+ : false;
85
+
86
+ /**
87
+ Convert a type which may have number keys to one with string keys, making it possible to index using strings retrieved from template types.
88
+
89
+ @example
90
+ ```
91
+ type WithNumbers = {foo: string; 0: boolean};
92
+ type WithStrings = WithStringKeys<WithNumbers>;
93
+
94
+ type WithNumbersKeys = keyof WithNumbers;
95
+ //=> 'foo' | 0
96
+ type WithStringsKeys = keyof WithStrings;
97
+ //=> 'foo' | '0'
98
+ ```
99
+ */
100
+ type WithStringKeys<BaseType> = {
101
+ [Key in StringKeyOf<BaseType>]: UncheckedIndex<BaseType, Key>
102
+ };
103
+
104
+ /**
105
+ Perform a `T[U]` operation if `T` supports indexing.
106
+ */
107
+ type UncheckedIndex<T, U extends string | number> = [T] extends [Record<string | number, any>] ? T[U] : never;
108
+
109
+ /**
110
+ Get a property of an object or array. Works when indexing arrays using number-literal-strings, for example, `PropertyOf<number[], '0'> = number`, and when indexing objects with number keys.
111
+
112
+ Note:
113
+ - Returns `unknown` if `Key` is not a property of `BaseType`, since TypeScript uses structural typing, and it cannot be guaranteed that extra properties unknown to the type system will exist at runtime.
114
+ - Returns `undefined` from nullish values, to match the behaviour of most deep-key libraries like `lodash`, `dot-prop`, etc.
115
+ */
116
+ type PropertyOf<BaseType, Key extends string, Options extends GetOptions = {}> =
117
+ BaseType extends null | undefined
118
+ ? undefined
119
+ : Key extends keyof BaseType
120
+ ? StrictPropertyOf<BaseType, Key, Options>
121
+ : BaseType extends [] | [unknown, ...unknown[]]
122
+ ? unknown // It's a tuple, but `Key` did not extend `keyof BaseType`. So the index is out of bounds.
123
+ : BaseType extends {
124
+ [n: number]: infer Item;
125
+ length: number; // Note: This is needed to avoid being too lax with records types using number keys like `{0: string; 1: boolean}`.
126
+ }
127
+ ? (
128
+ ConsistsOnlyOf<Key, StringDigit> extends true
129
+ ? Strictify<Item, Options>
130
+ : unknown
131
+ )
132
+ : Key extends keyof WithStringKeys<BaseType>
133
+ ? StrictPropertyOf<WithStringKeys<BaseType>, Key, Options>
134
+ : unknown;
135
+
136
+ // This works by first splitting the path based on `.` and `[...]` characters into a tuple of string keys. Then it recursively uses the head key to get the next property of the current object, until there are no keys left. Number keys extract the item type from arrays, or are converted to strings to extract types from tuples and dictionaries with number keys.
137
+ /**
138
+ Get a deeply-nested property from an object using a key path, like Lodash's `.get()` function.
139
+
140
+ Use-case: Retrieve a property from deep inside an API response or some other complex object.
141
+
142
+ @example
143
+ ```
144
+ import type {Get} from '..';
145
+ import * as lodash from '../../lodash';
146
+
147
+ const get = <BaseType, Path extends string | readonly string[]>(object: BaseType, path: Path): Get<BaseType, Path> =>
148
+ lodash.get(object, path);
149
+
150
+ interface ApiResponse {
151
+ hits: {
152
+ hits: Array<{
153
+ _id: string
154
+ _source: {
155
+ name: Array<{
156
+ given: string[]
157
+ family: string
158
+ }>
159
+ birthDate: string
160
+ }
161
+ }>
162
+ }
163
+ }
164
+
165
+ const getName = (apiResponse: ApiResponse) =>
166
+ get(apiResponse, 'hits.hits[0]._source.name');
167
+ //=> Array<{given: string[]; family: string}>
168
+
169
+ // Path also supports a readonly array of strings
170
+ const getNameWithPathArray = (apiResponse: ApiResponse) =>
171
+ get(apiResponse, ['hits','hits', '0', '_source', 'name'] as const);
172
+ //=> Array<{given: string[]; family: string}>
173
+
174
+ // Strict mode:
175
+ Get<string[], '3', {strict: true}> //=> string | undefined
176
+ Get<Record<string, string>, 'foo', {strict: true}> // => string | undefined
177
+ ```
178
+
179
+ @category Object
180
+ @category Array
181
+ @category Template literal
182
+ */
183
+ export type Get<BaseType, Path extends string | readonly string[], Options extends GetOptions = {}> =
184
+ GetWithPath<BaseType, Path extends string ? ToPath<Path> : Path, Options>;
@@ -0,0 +1,21 @@
1
+ import {OptionalKeysOf} from './optional-keys-of';
2
+
3
+ /**
4
+ Creates a type that represents `true` or `false` depending on whether the given type has any optional fields.
5
+
6
+ This is useful when you want to create an API whose behavior depends on the presence or absence of optional fields.
7
+
8
+ @example
9
+ ```
10
+ import type {HasOptionalKeys, OptionalKeysOf} from '..';
11
+
12
+ type UpdateService<Entity extends object> = {
13
+ removeField: HasOptionalKeys<Entity> extends true
14
+ ? (field: OptionalKeysOf<Entity>) => Promise<void>
15
+ : never
16
+ }
17
+ ```
18
+
19
+ @category Utilities
20
+ */
21
+ export type HasOptionalKeys<BaseType extends object> = OptionalKeysOf<BaseType> extends never ? false : true;
@@ -0,0 +1,59 @@
1
+ import {RequiredKeysOf} from './required-keys-of';
2
+
3
+ /**
4
+ Creates a type that represents `true` or `false` depending on whether the given type has any required fields.
5
+
6
+ This is useful when you want to create an API whose behavior depends on the presence or absence of required fields.
7
+
8
+ @example
9
+ ```
10
+ import type {HasRequiredKeys} from '..';
11
+
12
+ type GeneratorOptions<Template extends object> = {
13
+ prop1: number;
14
+ prop2: string;
15
+ } & (HasRequiredKeys<Template> extends true
16
+ ? {template: Template}
17
+ : {template?: Template});
18
+
19
+ interface Template1 {
20
+ optionalSubParam?: string;
21
+ }
22
+
23
+ interface Template2 {
24
+ requiredSubParam: string;
25
+ }
26
+
27
+ type Options1 = GeneratorOptions<Template1>;
28
+ type Options2 = GeneratorOptions<Template2>;
29
+
30
+ const optA: Options1 = {
31
+ prop1: 0,
32
+ prop2: 'hi'
33
+ };
34
+ const optB: Options1 = {
35
+ prop1: 0,
36
+ prop2: 'hi',
37
+ template: {}
38
+ };
39
+ const optC: Options1 = {
40
+ prop1: 0,
41
+ prop2: 'hi',
42
+ template: {
43
+ optionalSubParam: 'optional value'
44
+ }
45
+ };
46
+
47
+ const optD: Options2 = {
48
+ prop1: 0,
49
+ prop2: 'hi',
50
+ template: {
51
+ requiredSubParam: 'required value'
52
+ }
53
+ };
54
+
55
+ ```
56
+
57
+ @category Utilities
58
+ */
59
+ export type HasRequiredKeys<BaseType extends object> = RequiredKeysOf<BaseType> extends never ? false : true;
@@ -0,0 +1,22 @@
1
+ import type {IsEqual} from './internal';
2
+
3
+ /**
4
+ Returns a boolean for whether the given array includes the given item.
5
+
6
+ This can be useful if another type wants to make a decision based on whether the array includes that item.
7
+
8
+ @example
9
+ ```
10
+ import type {Includes} from '..';
11
+
12
+ type hasRed<array extends any[]> = Includes<array, 'red'>;
13
+ ```
14
+
15
+ @category Array
16
+ */
17
+ export type Includes<Value extends readonly any[], Item> =
18
+ Value extends readonly [Value[0], ...infer rest]
19
+ ? IsEqual<Value[0], Item> extends true
20
+ ? true
21
+ : Includes<rest, Item>
22
+ : false;