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.
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineObjectInput.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/complex/MantineTableControl/MantineTableControl.cjs +6 -11
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/layouts/Array/ExpandPanelRenderer.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/layouts/Array/MantineArrayLayout.cjs +3 -5
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/utils/layout.cjs +2 -2
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineObjectInput.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/complex/MantineTableControl/MantineTableControl.mjs +7 -12
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/layouts/Array/ExpandPanelRenderer.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/layouts/Array/MantineArrayLayout.mjs +3 -5
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/utils/layout.mjs +2 -2
- package/dist/.external/cjs/html-parse-stringify@3.0.1/html-parse-stringify/dist/html-parse-stringify.module.cjs +59 -0
- package/dist/.external/cjs/lodash@4.17.23/lodash/_cloneBuffer.cjs +1 -1
- package/dist/.external/cjs/lodash@4.17.23/lodash/_freeGlobal.cjs +1 -1
- package/dist/.external/cjs/lodash@4.17.23/lodash/_nodeUtil.cjs +1 -1
- package/dist/.external/cjs/lodash@4.17.23/lodash/isBuffer.cjs +1 -1
- package/dist/.external/cjs/lodash@4.17.23/lodash/lodash.cjs +2 -2
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/.external/cjs/toposort@2.0.2/toposort/index.cjs +1 -1
- package/dist/.external/cjs/void-elements@3.1.0/void-elements/index.cjs +26 -0
- package/dist/.external/cjs/yup@1.7.1/yup/index.esm.cjs +3 -1224
- package/dist/.external/cjs/zustand@5.0.10_@types_react@19.2.9_react@19.2.3/zustand/esm/index.cjs +7 -0
- package/dist/.external/esm/html-parse-stringify@3.0.1/html-parse-stringify/dist/html-parse-stringify.module.mjs +60 -0
- package/dist/.external/esm/lodash@4.17.23/lodash/_cloneBuffer.mjs +1 -1
- package/dist/.external/esm/lodash@4.17.23/lodash/_freeGlobal.mjs +1 -1
- package/dist/.external/esm/lodash@4.17.23/lodash/_nodeUtil.mjs +1 -1
- package/dist/.external/esm/lodash@4.17.23/lodash/isBuffer.mjs +1 -1
- package/dist/.external/esm/lodash@4.17.23/lodash/lodash.mjs +2 -2
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/.external/esm/toposort@2.0.2/toposort/index.mjs +1 -1
- package/dist/.external/esm/void-elements@3.1.0/void-elements/index.mjs +26 -0
- package/dist/.external/esm/yup@1.7.1/yup/index.esm.mjs +4 -1225
- package/dist/.external/esm/zustand@5.0.10_@types_react@19.2.9_react@19.2.3/zustand/esm/index.mjs +7 -0
- package/dist/.external/esm/zustand@5.0.10_@types_react@19.2.9_react@19.2.3/zustand/esm/react.mjs +5 -5
- package/dist/.external/lib/type-fest/index.d.ts +95 -0
- package/dist/.external/lib/type-fest/source/async-return-type.d.ts +25 -0
- package/dist/.external/lib/type-fest/source/asyncify.d.ts +33 -0
- package/dist/.external/lib/type-fest/source/basic.d.ts +45 -0
- package/dist/.external/lib/type-fest/source/camel-case.d.ts +73 -0
- package/dist/.external/lib/type-fest/source/camel-cased-properties-deep.d.ts +54 -0
- package/dist/.external/lib/type-fest/source/camel-cased-properties.d.ts +36 -0
- package/dist/.external/lib/type-fest/source/conditional-except.d.ts +45 -0
- package/dist/.external/lib/type-fest/source/conditional-keys.d.ts +47 -0
- package/dist/.external/lib/type-fest/source/conditional-pick.d.ts +44 -0
- package/dist/.external/lib/type-fest/source/delimiter-case.d.ts +93 -0
- package/dist/.external/lib/type-fest/source/delimiter-cased-properties-deep.d.ts +60 -0
- package/dist/.external/lib/type-fest/source/delimiter-cased-properties.d.ts +37 -0
- package/dist/.external/lib/type-fest/source/entries.d.ts +62 -0
- package/dist/.external/lib/type-fest/source/entry.d.ts +65 -0
- package/dist/.external/lib/type-fest/source/exact.d.ts +73 -0
- package/dist/.external/lib/type-fest/source/except.d.ts +57 -0
- package/dist/.external/lib/type-fest/source/fixed-length-array.d.ts +43 -0
- package/dist/.external/lib/type-fest/source/get.d.ts +184 -0
- package/dist/.external/lib/type-fest/source/has-optional-keys.d.ts +21 -0
- package/dist/.external/lib/type-fest/source/has-required-keys.d.ts +59 -0
- package/dist/.external/lib/type-fest/source/includes.d.ts +22 -0
- package/dist/.external/lib/type-fest/source/internal.d.ts +59 -0
- package/dist/.external/lib/type-fest/source/invariant-of.d.ts +76 -0
- package/dist/.external/lib/type-fest/source/iterable-element.d.ts +54 -0
- package/dist/.external/lib/type-fest/source/join.d.ts +30 -0
- package/dist/.external/lib/type-fest/source/jsonify.d.ts +90 -0
- package/dist/.external/lib/type-fest/source/kebab-case.d.ts +38 -0
- package/dist/.external/lib/type-fest/source/kebab-cased-properties-deep.d.ts +47 -0
- package/dist/.external/lib/type-fest/source/kebab-cased-properties.d.ts +30 -0
- package/dist/.external/lib/type-fest/source/last-array-element.d.ts +28 -0
- package/dist/.external/lib/type-fest/source/literal-to-primitive.d.ts +36 -0
- package/dist/.external/lib/type-fest/source/literal-union.d.ts +35 -0
- package/dist/.external/lib/type-fest/source/merge-exclusive.d.ts +41 -0
- package/dist/.external/lib/type-fest/source/merge.d.ts +27 -0
- package/dist/.external/lib/type-fest/source/multidimensional-array.d.ts +43 -0
- package/dist/.external/lib/type-fest/source/multidimensional-readonly-array.d.ts +47 -0
- package/dist/.external/lib/type-fest/source/mutable.d.ts +5 -0
- package/dist/.external/lib/type-fest/source/numeric.d.ts +170 -0
- package/dist/.external/lib/type-fest/source/observable-like.d.ts +62 -0
- package/dist/.external/lib/type-fest/source/opaque.d.ts +107 -0
- package/dist/.external/lib/type-fest/source/optional-keys-of.d.ts +38 -0
- package/dist/.external/lib/type-fest/source/package-json.d.ts +663 -0
- package/dist/.external/lib/type-fest/source/partial-deep.d.ts +113 -0
- package/dist/.external/lib/type-fest/source/partial-on-undefined-deep.d.ts +70 -0
- package/dist/.external/lib/type-fest/source/pascal-case.d.ts +38 -0
- package/dist/.external/lib/type-fest/source/pascal-cased-properties-deep.d.ts +54 -0
- package/dist/.external/lib/type-fest/source/pascal-cased-properties.d.ts +34 -0
- package/dist/.external/lib/type-fest/source/primitive.d.ts +13 -0
- package/dist/.external/lib/type-fest/source/promisable.d.ts +25 -0
- package/dist/.external/lib/type-fest/source/promise-value.d.ts +29 -0
- package/dist/.external/lib/type-fest/source/readonly-deep.d.ts +85 -0
- package/dist/.external/lib/type-fest/source/readonly-tuple.d.ts +41 -0
- package/dist/.external/lib/type-fest/source/remove-index-signature.d.ts +104 -0
- package/dist/.external/lib/type-fest/source/replace.d.ts +67 -0
- package/dist/.external/lib/type-fest/source/require-all-or-none.d.ts +36 -0
- package/dist/.external/lib/type-fest/source/require-at-least-one.d.ts +35 -0
- package/dist/.external/lib/type-fest/source/require-exactly-one.d.ts +34 -0
- package/dist/.external/lib/type-fest/source/required-keys-of.d.ts +29 -0
- package/dist/.external/lib/type-fest/source/schema.d.ts +72 -0
- package/dist/.external/lib/type-fest/source/screaming-snake-case.d.ts +33 -0
- package/dist/.external/lib/type-fest/source/set-non-nullable.d.ts +35 -0
- package/dist/.external/lib/type-fest/source/set-optional.d.ts +35 -0
- package/dist/.external/lib/type-fest/source/set-required.d.ts +35 -0
- package/dist/.external/lib/type-fest/source/set-return-type.d.ts +31 -0
- package/dist/.external/lib/type-fest/source/simplify.d.ts +83 -0
- package/dist/.external/lib/type-fest/source/snake-case.d.ts +38 -0
- package/dist/.external/lib/type-fest/source/snake-cased-properties-deep.d.ts +47 -0
- package/dist/.external/lib/type-fest/source/snake-cased-properties.d.ts +30 -0
- package/dist/.external/lib/type-fest/source/split.d.ts +29 -0
- package/dist/.external/lib/type-fest/source/spread.d.ts +85 -0
- package/dist/.external/lib/type-fest/source/string-key-of.d.ts +25 -0
- package/dist/.external/lib/type-fest/source/stringified.d.ts +23 -0
- package/dist/.external/lib/type-fest/source/trim.d.ts +25 -0
- package/dist/.external/lib/type-fest/source/tsconfig-json.d.ts +1172 -0
- package/dist/.external/lib/type-fest/source/typed-array.d.ts +17 -0
- package/dist/.external/lib/type-fest/source/union-to-intersection.d.ts +60 -0
- package/dist/.external/lib/type-fest/source/value-of.d.ts +42 -0
- package/dist/.external/lib/type-fest/source/writable.d.ts +40 -0
- package/dist/api/cjs/ApiProvider/ApiProvider.cjs +80 -0
- package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/hooks/useProvideApi.cjs +22 -19
- package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/hooks/useProvideBulk.cjs +5 -3
- package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/hooks/useProvideForm.cjs +2 -2
- package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/hooks/utils/useApiActions.cjs +15 -15
- package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/hooks/utils/useStreamingData.cjs +1 -1
- package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/utils/getValidationSchema.cjs +3 -3
- package/dist/{core/cjs/Wrappers → api/cjs}/Provider/Contexts/LangContext.cjs +20 -8
- package/dist/api/cjs/Provider/Provider.cjs +52 -0
- package/dist/{core/cjs/Wrappers → api/cjs}/Provider/hooks/useProvideAuth.cjs +17 -15
- package/dist/{core/cjs/Wrappers → api/cjs}/Provider/hooks/useProvideInfo.cjs +5 -3
- package/dist/api/cjs/Provider/hooks/useProvideLang.cjs +78 -0
- package/dist/api/cjs/adapters/AdaptersContext.cjs +10 -0
- package/dist/api/cjs/auth/authFetch.cjs +63 -0
- package/dist/api/cjs/auth/userCRUD.cjs +20 -0
- package/dist/api/cjs/fetchers/createItem.cjs +14 -0
- package/dist/api/cjs/fetchers/deleteItem.cjs +14 -0
- package/dist/api/cjs/fetchers/downloadItems.cjs +33 -0
- package/dist/api/cjs/fetchers/formCreateItem.cjs +18 -0
- package/dist/api/cjs/fetchers/formUpdateItem.cjs +18 -0
- package/dist/api/cjs/fetchers/getInfo.cjs +10 -0
- package/dist/api/cjs/fetchers/getItem.cjs +14 -0
- package/dist/api/cjs/fetchers/getItems.cjs +13 -0
- package/dist/api/cjs/fetchers/postBulkAction.cjs +14 -0
- package/dist/api/cjs/fetchers/request.cjs +9 -0
- package/dist/api/cjs/fetchers/updateItem.cjs +14 -0
- package/dist/api/cjs/fetchers/uploadItems.cjs +24 -0
- package/dist/{core → api}/cjs/hooks/auth/useAuth.cjs +1 -1
- package/dist/{core → api}/cjs/hooks/auth/useInfo.cjs +1 -1
- package/dist/api/cjs/hooks/useDidUpdate.cjs +20 -0
- package/dist/api/cjs/index.cjs +77 -0
- package/dist/{utils/cjs → api/cjs/utils}/convertToFormData/convertToFormData.cjs +5 -5
- package/dist/{utils/cjs → api/cjs/utils}/createFetchParams/createFetchParams.cjs +1 -3
- package/dist/api/esm/ApiProvider/ApiProvider.mjs +80 -0
- package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/hooks/useProvideApi.mjs +21 -18
- package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/hooks/useProvideBulk.mjs +5 -3
- package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/hooks/useProvideForm.mjs +2 -2
- package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/hooks/utils/useApiActions.mjs +15 -15
- package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/hooks/utils/useStreamingData.mjs +1 -1
- package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/utils/getValidationSchema.mjs +3 -4
- package/dist/{core/esm/Wrappers → api/esm}/Provider/Contexts/LangContext.mjs +22 -10
- package/dist/api/esm/Provider/Provider.mjs +52 -0
- package/dist/{core/esm/Wrappers → api/esm}/Provider/hooks/useProvideAuth.mjs +17 -15
- package/dist/{core/esm/Wrappers → api/esm}/Provider/hooks/useProvideInfo.mjs +5 -3
- package/dist/api/esm/Provider/hooks/useProvideLang.mjs +78 -0
- package/dist/api/esm/adapters/AdaptersContext.mjs +10 -0
- package/dist/api/esm/auth/authFetch.mjs +63 -0
- package/dist/api/esm/auth/userCRUD.mjs +20 -0
- package/dist/api/esm/fetchers/createItem.mjs +14 -0
- package/dist/api/esm/fetchers/deleteItem.mjs +14 -0
- package/dist/api/esm/fetchers/downloadItems.mjs +33 -0
- package/dist/api/esm/fetchers/formCreateItem.mjs +18 -0
- package/dist/api/esm/fetchers/formUpdateItem.mjs +18 -0
- package/dist/api/esm/fetchers/getInfo.mjs +10 -0
- package/dist/api/esm/fetchers/getItem.mjs +14 -0
- package/dist/api/esm/fetchers/getItems.mjs +13 -0
- package/dist/api/esm/fetchers/postBulkAction.mjs +14 -0
- package/dist/api/esm/fetchers/request.mjs +9 -0
- package/dist/api/esm/fetchers/updateItem.mjs +14 -0
- package/dist/api/esm/fetchers/uploadItems.mjs +24 -0
- package/dist/{core → api}/esm/hooks/auth/useAuth.mjs +1 -1
- package/dist/{core → api}/esm/hooks/auth/useInfo.mjs +1 -1
- package/dist/api/esm/hooks/useDidUpdate.mjs +20 -0
- package/dist/api/esm/index.mjs +77 -0
- package/dist/{utils/esm → api/esm/utils}/convertToFormData/convertToFormData.mjs +5 -5
- package/dist/{utils/esm → api/esm/utils}/createFetchParams/createFetchParams.mjs +1 -3
- package/dist/api/lib/ApiProvider/ApiProvider.d.ts +17 -0
- package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/Contexts/BulkActionsContext.d.ts +1 -1
- package/dist/api/lib/ApiProvider/Contexts/FormContext.d.ts +5 -0
- package/dist/api/lib/ApiProvider/hooks/types.d.ts +150 -0
- package/dist/api/lib/ApiProvider/hooks/useProvideBulk.d.ts +7 -0
- package/dist/api/lib/ApiProvider/hooks/useProvideForm.d.ts +3 -0
- package/dist/api/lib/ApiProvider/hooks/utils/useApiActions.d.ts +11 -0
- package/dist/api/lib/ApiProvider/hooks/utils/useStreamingData.d.ts +193 -0
- package/dist/api/lib/ApiProvider/types.d.ts +51 -0
- package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/getDefaultValues.d.ts +2 -2
- package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/getValidationSchema.d.ts +1 -1
- package/dist/{core/lib/Wrappers → api/lib}/Provider/Contexts/AuthContext.d.ts +1 -1
- package/dist/{core/lib/Wrappers → api/lib}/Provider/Contexts/InfoContext.d.ts +1 -1
- package/dist/{core/lib/Wrappers → api/lib}/Provider/Contexts/types.d.ts +5 -4
- package/dist/api/lib/Provider/Provider.d.ts +14 -0
- package/dist/api/lib/Provider/hooks/types.d.ts +22 -0
- package/dist/api/lib/Provider/hooks/useProvideAuth.d.ts +17 -0
- package/dist/{core/lib/Wrappers → api/lib}/Provider/hooks/useProvideInfo.d.ts +2 -2
- package/dist/{core/lib/Wrappers → api/lib}/Provider/hooks/useProvideLang.d.ts +1 -2
- package/dist/api/lib/Provider/types.d.ts +35 -0
- package/dist/api/lib/adapters/AdaptersContext.d.ts +10 -0
- package/dist/api/lib/adapters/types.d.ts +79 -0
- package/dist/{core/lib/Wrappers/Provider/utils → api/lib/auth}/authFetch.d.ts +13 -7
- package/dist/api/lib/auth/types.d.ts +40 -0
- package/dist/api/lib/auth/userCRUD.d.ts +22 -0
- package/dist/{core/lib/Wrappers/ApiProvider/utils/bulkActions/types.d.ts → api/lib/fetchers/bulkActions.types.d.ts} +3 -3
- package/dist/api/lib/fetchers/createItem.d.ts +4 -0
- package/dist/api/lib/fetchers/deleteItem.d.ts +4 -0
- package/dist/api/lib/fetchers/downloadItems.d.ts +4 -0
- package/dist/api/lib/fetchers/formCreateItem.d.ts +4 -0
- package/dist/api/lib/fetchers/formUpdateItem.d.ts +4 -0
- package/dist/{core/lib/Wrappers/ApiProvider/utils/api → api/lib/fetchers}/getInfo.d.ts +3 -1
- package/dist/api/lib/fetchers/getItem.d.ts +4 -0
- package/dist/{core/lib/Wrappers/ApiProvider/utils/api → api/lib/fetchers}/getItems.d.ts +3 -1
- package/dist/api/lib/fetchers/postBulkAction.d.ts +4 -0
- package/dist/api/lib/fetchers/request.d.ts +7 -0
- package/dist/{core/lib/Wrappers/ApiProvider/utils/api → api/lib/fetchers}/types.d.ts +3 -7
- package/dist/api/lib/fetchers/updateItem.d.ts +4 -0
- package/dist/api/lib/fetchers/uploadItems.d.ts +3 -0
- package/dist/api/lib/fetchers/uploadItems.test.d.ts +1 -0
- package/dist/{core → api}/lib/hooks/auth/types.d.ts +1 -38
- package/dist/api/lib/hooks/auth/useAuth.test.d.ts +1 -0
- package/dist/api/lib/hooks/auth/useInfo.test.d.ts +1 -0
- package/dist/api/lib/hooks/useDidUpdate.d.ts +3 -0
- package/dist/api/lib/index.d.ts +36 -0
- package/dist/api/lib/utils/convertToFormData/convertToFormData.d.ts +17 -0
- package/dist/api/lib/utils/convertToFormData/convertToFormData.test.d.ts +1 -0
- package/dist/{utils/lib → api/lib/utils}/createFetchParams/createFetchParams.d.ts +3 -4
- package/dist/api/lib/utils/createFetchParams/createFetchParams.test.d.ts +1 -0
- package/dist/{utils/lib → api/lib/utils}/parseResponse/parseResponse.d.ts +1 -2
- package/dist/api/lib/utils/parseResponse/parseResponse.test.d.ts +1 -0
- package/dist/constants/cjs/index.cjs +16 -7
- package/dist/constants/esm/index.mjs +16 -7
- package/dist/constants/lib/index.d.ts +1 -6
- package/dist/{jsonforms → contexts}/cjs/_virtual/_commonjsHelpers.cjs +0 -2
- package/dist/contexts/cjs/_virtual/index.cjs +5 -0
- package/dist/contexts/cjs/_virtual/index2.cjs +5 -0
- package/dist/contexts/cjs/_virtual/index3.cjs +6 -0
- package/dist/{constants → contexts}/cjs/_virtual/index4.cjs +2 -2
- package/dist/contexts/cjs/_virtual/index5.cjs +6 -0
- package/dist/contexts/cjs/index.cjs +4 -0
- package/dist/contexts/esm/_virtual/_commonjsHelpers.mjs +6 -0
- package/dist/contexts/esm/_virtual/index.mjs +5 -0
- package/dist/contexts/esm/_virtual/index2.mjs +5 -0
- package/dist/contexts/esm/_virtual/index3.mjs +7 -0
- package/dist/contexts/esm/_virtual/index4.mjs +4 -0
- package/dist/contexts/esm/_virtual/index5.mjs +7 -0
- package/dist/contexts/esm/index.mjs +5 -1
- package/dist/contexts/lib/index.d.ts +2 -0
- package/dist/core/cjs/Dialogs/AddDialog.cjs +2 -2
- package/dist/core/cjs/Dialogs/EditDialog.cjs +3 -4
- package/dist/core/cjs/Menu/UserMenu/UserMenu.cjs +2 -2
- package/dist/core/cjs/Modals/CommonModal.cjs +2 -2
- package/dist/core/cjs/Tables/DataGrid/Toolbar/Filter/FilterMenu.cjs +8 -9
- package/dist/core/cjs/Tables/NextGenDataGrid/components/OptimizedMRT_RowSelectColumn/zustand.cjs +2 -2
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useActions.cjs +5 -5
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/Cell.cjs +4 -4
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilter.cjs +4 -4
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/HeaderAdvancedFiltersMenuButton.cjs +4 -4
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/useColumns.cjs +5 -5
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useOptimizations.cjs +1 -2
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useToolbar/useToolbar.cjs +9 -9
- package/dist/core/cjs/Wrappers/ApiProvider/ApiProvider.cjs +8 -74
- package/dist/core/cjs/Wrappers/Provider/Provider.cjs +18 -47
- package/dist/core/cjs/_virtual/index.cjs +25 -3
- package/dist/core/cjs/_virtual/index2.cjs +25 -3
- package/dist/core/cjs/_virtual/index3.cjs +3 -5
- package/dist/core/cjs/_virtual/index4.cjs +2 -2
- package/dist/core/cjs/_virtual/index5.cjs +5 -0
- package/dist/core/cjs/_virtual/index6.cjs +3 -0
- package/dist/core/cjs/_virtual/{isBuffer.cjs → index7.cjs} +2 -2
- package/dist/core/cjs/adapters/web/cookieTransport.cjs +15 -0
- package/dist/core/cjs/adapters/web/index.cjs +26 -0
- package/dist/core/cjs/adapters/web/webFileDownloadAdapter.cjs +16 -0
- package/dist/core/cjs/adapters/web/webFormDataAdapter.cjs +8 -0
- package/dist/core/cjs/adapters/web/webLocalizationAdapter.cjs +13 -0
- package/dist/core/cjs/adapters/web/webNetworkAdapter.cjs +6 -0
- package/dist/core/cjs/adapters/web/webOAuthOpener.cjs +26 -0
- package/dist/core/cjs/adapters/web/webStorageAdapter.cjs +21 -0
- package/dist/core/cjs/fab-react-toolkit-patch/api/hooks/useProvideApi.cjs +7 -12
- package/dist/core/cjs/fab-react-toolkit-patch/api/hooks/useProvideBulk.cjs +2 -2
- package/dist/core/cjs/fab-react-toolkit-patch/api/utils/api/downloadItems.cjs +5 -3
- package/dist/core/cjs/fab-react-toolkit-patch/api/utils/api/getItems.cjs +6 -5
- package/dist/core/cjs/fab-react-toolkit-patch/auth/utils/authFetch.cjs +19 -15
- package/dist/core/cjs/fab-react-toolkit-patch/auth/utils/userCRUD.cjs +9 -6
- package/dist/core/cjs/hooks/api/useBulkActions.cjs +2 -5
- package/dist/core/cjs/hooks/api/useForms.cjs +5 -5
- package/dist/core/cjs/index.cjs +91 -9
- package/dist/core/esm/Dialogs/AddDialog.mjs +1 -1
- package/dist/core/esm/Dialogs/EditDialog.mjs +3 -4
- package/dist/core/esm/Menu/UserMenu/UserMenu.mjs +1 -1
- package/dist/core/esm/Modals/CommonModal.mjs +1 -1
- package/dist/core/esm/Tables/DataGrid/Toolbar/Filter/FilterMenu.mjs +8 -9
- package/dist/core/esm/Tables/NextGenDataGrid/components/OptimizedMRT_RowSelectColumn/zustand.mjs +2 -2
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useActions.mjs +1 -1
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/Cell.mjs +1 -1
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilter.mjs +1 -1
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/HeaderAdvancedFiltersMenuButton.mjs +1 -1
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/useColumns.mjs +1 -1
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useOptimizations.mjs +2 -3
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useToolbar/useToolbar.mjs +1 -1
- package/dist/core/esm/Wrappers/ApiProvider/ApiProvider.mjs +5 -73
- package/dist/core/esm/Wrappers/Provider/Provider.mjs +15 -46
- package/dist/core/esm/_virtual/index.mjs +25 -3
- package/dist/core/esm/_virtual/index2.mjs +25 -3
- package/dist/core/esm/_virtual/index3.mjs +2 -5
- package/dist/core/esm/_virtual/index4.mjs +2 -2
- package/dist/core/esm/_virtual/index5.mjs +5 -0
- package/dist/core/esm/_virtual/index6.mjs +2 -0
- package/dist/core/esm/_virtual/index7.mjs +4 -0
- package/dist/core/esm/adapters/web/cookieTransport.mjs +15 -0
- package/dist/core/esm/adapters/web/index.mjs +26 -0
- package/dist/core/esm/adapters/web/webFileDownloadAdapter.mjs +16 -0
- package/dist/core/esm/adapters/web/webFormDataAdapter.mjs +8 -0
- package/dist/core/esm/adapters/web/webLocalizationAdapter.mjs +13 -0
- package/dist/core/esm/adapters/web/webNetworkAdapter.mjs +6 -0
- package/dist/core/esm/adapters/web/webOAuthOpener.mjs +26 -0
- package/dist/core/esm/adapters/web/webStorageAdapter.mjs +21 -0
- package/dist/core/esm/fab-react-toolkit-patch/api/hooks/useProvideApi.mjs +1 -6
- package/dist/core/esm/fab-react-toolkit-patch/api/hooks/useProvideBulk.mjs +1 -1
- package/dist/core/esm/fab-react-toolkit-patch/api/utils/api/downloadItems.mjs +5 -3
- package/dist/core/esm/fab-react-toolkit-patch/api/utils/api/getItems.mjs +4 -3
- package/dist/core/esm/fab-react-toolkit-patch/auth/utils/authFetch.mjs +15 -11
- package/dist/core/esm/fab-react-toolkit-patch/auth/utils/userCRUD.mjs +8 -5
- package/dist/core/esm/hooks/api/useBulkActions.mjs +2 -5
- package/dist/core/esm/hooks/api/useForms.mjs +1 -1
- package/dist/core/esm/index.mjs +23 -7
- package/dist/core/lib/Tables/NextGenDataGrid/components/OptimizedMRT_RowSelectColumn/zustand.d.ts +3 -3
- package/dist/core/lib/Tables/NextGenDataGrid/types.d.ts +3 -3
- package/dist/core/lib/Wrappers/ApiProvider/ApiProvider.d.ts +4 -17
- package/dist/core/lib/Wrappers/ApiProvider/types.d.ts +3 -47
- package/dist/core/lib/Wrappers/Provider/Provider.d.ts +4 -14
- package/dist/core/lib/Wrappers/Provider/types.d.ts +6 -27
- package/dist/core/lib/adapters/web/cookieTransport.d.ts +2 -0
- package/dist/core/lib/adapters/web/index.d.ts +10 -0
- package/dist/core/lib/adapters/web/webAdapters.test.d.ts +1 -0
- package/dist/core/lib/adapters/web/webFileDownloadAdapter.d.ts +2 -0
- package/dist/core/lib/adapters/web/webFormDataAdapter.d.ts +2 -0
- package/dist/core/lib/adapters/web/webLocalizationAdapter.d.ts +2 -0
- package/dist/core/lib/adapters/web/webNetworkAdapter.d.ts +2 -0
- package/dist/core/lib/adapters/web/webOAuthOpener.d.ts +2 -0
- package/dist/core/lib/adapters/web/webStorageAdapter.d.ts +3 -0
- package/dist/core/lib/fab-react-toolkit-patch/api/hooks/useProvideApi.d.ts +1 -1
- package/dist/core/lib/fab-react-toolkit-patch/api/hooks/useProvideBulk.d.ts +1 -1
- package/dist/core/lib/fab-react-toolkit-patch/api/utils/api/downloadItems.d.ts +2 -2
- package/dist/core/lib/fab-react-toolkit-patch/api/utils/api/getItems.d.ts +3 -2
- package/dist/core/lib/fab-react-toolkit-patch/auth/utils/authFetch.d.ts +11 -6
- package/dist/core/lib/fab-react-toolkit-patch/auth/utils/userCRUD.d.ts +5 -3
- package/dist/core/lib/hooks/api/types.d.ts +1 -59
- package/dist/core/lib/hooks/api/useForms.d.ts +1 -1
- package/dist/core/lib/index.d.ts +7 -8
- package/dist/core/lib/test-helpers/types.d.ts +1 -1
- package/dist/jsonforms/cjs/MantineInputs/MantineObjectInput.cjs +2 -2
- package/dist/jsonforms/cjs/complex/MantineTableControl/MantineTableControl.cjs +6 -11
- package/dist/jsonforms/cjs/layouts/Array/ExpandPanelRenderer.cjs +2 -2
- package/dist/jsonforms/cjs/layouts/Array/MantineArrayLayout.cjs +3 -5
- package/dist/jsonforms/cjs/utils/layout.cjs +2 -2
- package/dist/jsonforms/esm/MantineInputs/MantineObjectInput.mjs +2 -2
- package/dist/jsonforms/esm/complex/MantineTableControl/MantineTableControl.mjs +7 -12
- package/dist/jsonforms/esm/layouts/Array/ExpandPanelRenderer.mjs +2 -2
- package/dist/jsonforms/esm/layouts/Array/MantineArrayLayout.mjs +3 -5
- package/dist/jsonforms/esm/utils/layout.mjs +2 -2
- package/dist/jsonforms/lib/test-helpers/inputWrap.d.ts +2 -2
- package/dist/react-native-adapters/cjs/asyncStorageAdapter.cjs +8 -0
- package/dist/react-native-adapters/cjs/bearerTransport.cjs +29 -0
- package/dist/react-native-adapters/cjs/createReactNativeAdapters.cjs +24 -0
- package/dist/react-native-adapters/cjs/index.cjs +16 -0
- package/dist/react-native-adapters/cjs/rnFileDownloadAdapter.cjs +24 -0
- package/dist/react-native-adapters/cjs/rnFormDataAdapter.cjs +15 -0
- package/dist/react-native-adapters/cjs/rnNetworkAdapter.cjs +9 -0
- package/dist/react-native-adapters/cjs/rnOAuthOpener.cjs +9 -0
- package/dist/react-native-adapters/esm/asyncStorageAdapter.mjs +8 -0
- package/dist/react-native-adapters/esm/bearerTransport.mjs +29 -0
- package/dist/react-native-adapters/esm/createReactNativeAdapters.mjs +24 -0
- package/dist/react-native-adapters/esm/index.mjs +16 -0
- package/dist/react-native-adapters/esm/rnFileDownloadAdapter.mjs +24 -0
- package/dist/react-native-adapters/esm/rnFormDataAdapter.mjs +15 -0
- package/dist/react-native-adapters/esm/rnNetworkAdapter.mjs +9 -0
- package/dist/react-native-adapters/esm/rnOAuthOpener.mjs +9 -0
- package/dist/react-native-adapters/lib/asyncStorageAdapter.d.ts +7 -0
- package/dist/react-native-adapters/lib/asyncStorageAdapter.test.d.ts +1 -0
- package/dist/react-native-adapters/lib/bearerTransport.d.ts +5 -0
- package/dist/react-native-adapters/lib/bearerTransport.test.d.ts +1 -0
- package/dist/react-native-adapters/lib/createReactNativeAdapters.d.ts +11 -0
- package/dist/react-native-adapters/lib/createReactNativeAdapters.test.d.ts +1 -0
- package/dist/react-native-adapters/lib/index.d.ts +8 -0
- package/dist/react-native-adapters/lib/rnFileDownloadAdapter.d.ts +7 -0
- package/dist/react-native-adapters/lib/rnFileDownloadAdapter.test.d.ts +1 -0
- package/dist/react-native-adapters/lib/rnFormDataAdapter.d.ts +2 -0
- package/dist/react-native-adapters/lib/rnFormDataAdapter.test.d.ts +1 -0
- package/dist/react-native-adapters/lib/rnNetworkAdapter.d.ts +4 -0
- package/dist/react-native-adapters/lib/rnNetworkAdapter.test.d.ts +1 -0
- package/dist/react-native-adapters/lib/rnOAuthOpener.d.ts +5 -0
- package/dist/react-native-adapters/lib/rnOAuthOpener.test.d.ts +1 -0
- package/dist/react-native-adapters/lib/types.d.ts +23 -0
- package/dist/utils/cjs/Memoizer/MemoWrapper.cjs +2 -2
- package/dist/utils/cjs/Memoizer/RenderWrapper.cjs +2 -2
- package/dist/utils/cjs/_virtual/_commonjsHelpers.cjs +4 -0
- package/dist/utils/cjs/_virtual/lodash.cjs +6 -3
- package/dist/utils/cjs/index.cjs +4 -6
- package/dist/utils/cjs/randomId/randomId.cjs +4 -0
- package/dist/utils/esm/Memoizer/MemoWrapper.mjs +1 -1
- package/dist/utils/esm/Memoizer/RenderWrapper.mjs +1 -1
- package/dist/utils/esm/_virtual/_commonjsHelpers.mjs +5 -1
- package/dist/utils/esm/_virtual/lodash.mjs +3 -0
- package/dist/utils/esm/index.mjs +4 -6
- package/dist/utils/esm/randomId/randomId.mjs +4 -0
- package/dist/utils/lib/index.d.ts +3 -3
- package/dist/utils/lib/randomId/index.d.ts +1 -0
- package/dist/utils/lib/randomId/randomId.d.ts +2 -0
- package/dist/utils/lib/randomId/randomId.test.d.ts +1 -0
- package/dist/zustand/cjs/index.cjs +2 -0
- package/dist/zustand/esm/index.mjs +3 -1
- package/dist/zustand/lib/index.d.ts +1 -0
- package/package.json +13 -2
- package/dist/.bundled/jsonforms/cjs/_virtual/lodash.cjs +0 -5
- package/dist/.bundled/jsonforms/cjs/_virtual/lodash2.cjs +0 -4
- package/dist/.bundled/jsonforms/cjs/_virtual/map.cjs +0 -6
- package/dist/.bundled/jsonforms/cjs/_virtual/union.cjs +0 -6
- package/dist/.bundled/jsonforms/esm/_virtual/lodash.mjs +0 -5
- package/dist/.bundled/jsonforms/esm/_virtual/lodash2.mjs +0 -4
- package/dist/.bundled/jsonforms/esm/_virtual/map.mjs +0 -7
- package/dist/.bundled/jsonforms/esm/_virtual/union.mjs +0 -7
- package/dist/.external/cjs/lodash@4.17.23/lodash/_arrayIncludesWith.cjs +0 -20
- package/dist/.external/cjs/lodash@4.17.23/lodash/_baseMap.cjs +0 -21
- package/dist/.external/cjs/lodash@4.17.23/lodash/_baseUniq.cjs +0 -59
- package/dist/.external/cjs/lodash@4.17.23/lodash/_createSet.cjs +0 -19
- package/dist/.external/cjs/lodash@4.17.23/lodash/map.cjs +0 -20
- package/dist/.external/cjs/lodash@4.17.23/lodash/union.cjs +0 -19
- package/dist/.external/esm/lodash@4.17.23/lodash/_arrayIncludesWith.mjs +0 -20
- package/dist/.external/esm/lodash@4.17.23/lodash/_baseMap.mjs +0 -21
- package/dist/.external/esm/lodash@4.17.23/lodash/_baseUniq.mjs +0 -59
- package/dist/.external/esm/lodash@4.17.23/lodash/_createSet.mjs +0 -19
- package/dist/.external/esm/lodash@4.17.23/lodash/map.mjs +0 -20
- package/dist/.external/esm/lodash@4.17.23/lodash/union.mjs +0 -19
- package/dist/constants/cjs/_virtual/index.cjs +0 -27
- package/dist/constants/cjs/_virtual/index2.cjs +0 -27
- package/dist/constants/cjs/_virtual/index3.cjs +0 -4
- package/dist/constants/esm/_virtual/index.mjs +0 -27
- package/dist/constants/esm/_virtual/index2.mjs +0 -27
- package/dist/constants/esm/_virtual/index3.mjs +0 -4
- package/dist/constants/esm/_virtual/index4.mjs +0 -4
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/createItem.cjs +0 -14
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/deleteItem.cjs +0 -13
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/downloadItems.cjs +0 -39
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/formCreateItem.cjs +0 -12
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/formUpdateItem.cjs +0 -16
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/getInfo.cjs +0 -9
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/getItem.cjs +0 -13
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/getItems.cjs +0 -9
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/updateItem.cjs +0 -14
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/uploadItems.cjs +0 -26
- package/dist/core/cjs/Wrappers/ApiProvider/utils/bulkActions/postBulkAction.cjs +0 -14
- package/dist/core/cjs/Wrappers/Provider/hooks/useProvideLang.cjs +0 -45
- package/dist/core/cjs/Wrappers/Provider/utils/authFetch.cjs +0 -99
- package/dist/core/cjs/Wrappers/Provider/utils/userCRUD.cjs +0 -32
- package/dist/core/cjs/_virtual/_commonjsHelpers.cjs +0 -8
- package/dist/core/cjs/_virtual/_nodeUtil.cjs +0 -4
- package/dist/core/cjs/_virtual/isEqual.cjs +0 -6
- package/dist/core/cjs/_virtual/lodash.cjs +0 -5
- package/dist/core/cjs/_virtual/lodash2.cjs +0 -4
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/createItem.mjs +0 -14
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/deleteItem.mjs +0 -13
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/downloadItems.mjs +0 -39
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/formCreateItem.mjs +0 -12
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/formUpdateItem.mjs +0 -16
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/getInfo.mjs +0 -9
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/getItem.mjs +0 -13
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/getItems.mjs +0 -9
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/updateItem.mjs +0 -14
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/uploadItems.mjs +0 -26
- package/dist/core/esm/Wrappers/ApiProvider/utils/bulkActions/postBulkAction.mjs +0 -14
- package/dist/core/esm/Wrappers/Provider/hooks/useProvideLang.mjs +0 -45
- package/dist/core/esm/Wrappers/Provider/utils/authFetch.mjs +0 -99
- package/dist/core/esm/Wrappers/Provider/utils/userCRUD.mjs +0 -32
- package/dist/core/esm/_virtual/_commonjsHelpers.mjs +0 -8
- package/dist/core/esm/_virtual/_nodeUtil.mjs +0 -4
- package/dist/core/esm/_virtual/isBuffer.mjs +0 -4
- package/dist/core/esm/_virtual/isEqual.mjs +0 -7
- package/dist/core/esm/_virtual/lodash.mjs +0 -5
- package/dist/core/esm/_virtual/lodash2.mjs +0 -4
- package/dist/core/lib/Wrappers/ApiProvider/Contexts/FormContext.d.ts +0 -5
- package/dist/core/lib/Wrappers/ApiProvider/hooks/types.d.ts +0 -90
- package/dist/core/lib/Wrappers/ApiProvider/hooks/useProvideBulk.d.ts +0 -8
- package/dist/core/lib/Wrappers/ApiProvider/hooks/useProvideForm.d.ts +0 -2
- package/dist/core/lib/Wrappers/ApiProvider/hooks/utils/useApiActions.d.ts +0 -11
- package/dist/core/lib/Wrappers/ApiProvider/hooks/utils/useStreamingData.d.ts +0 -193
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/createItem.d.ts +0 -3
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/deleteItem.d.ts +0 -3
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/downloadItems.d.ts +0 -3
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/formCreateItem.d.ts +0 -3
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/formUpdateItem.d.ts +0 -3
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/getItem.d.ts +0 -3
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/updateItem.d.ts +0 -3
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/uploadItems.d.ts +0 -2
- package/dist/core/lib/Wrappers/ApiProvider/utils/bulkActions/postBulkAction.d.ts +0 -3
- package/dist/core/lib/Wrappers/Provider/hooks/types.d.ts +0 -24
- package/dist/core/lib/Wrappers/Provider/hooks/useProvideAuth.d.ts +0 -17
- package/dist/core/lib/Wrappers/Provider/utils/userCRUD.d.ts +0 -19
- package/dist/jsonforms/cjs/_virtual/_cloneBuffer.cjs +0 -4
- package/dist/jsonforms/cjs/_virtual/_nodeUtil.cjs +0 -4
- package/dist/jsonforms/cjs/_virtual/isBuffer.cjs +0 -4
- package/dist/jsonforms/cjs/_virtual/isEmpty.cjs +0 -6
- package/dist/jsonforms/cjs/_virtual/lodash.cjs +0 -5
- package/dist/jsonforms/cjs/_virtual/lodash2.cjs +0 -4
- package/dist/jsonforms/cjs/_virtual/map.cjs +0 -6
- package/dist/jsonforms/cjs/_virtual/merge.cjs +0 -6
- package/dist/jsonforms/cjs/_virtual/range.cjs +0 -6
- package/dist/jsonforms/cjs/_virtual/startCase.cjs +0 -6
- package/dist/jsonforms/cjs/_virtual/union.cjs +0 -6
- package/dist/jsonforms/esm/_virtual/_cloneBuffer.mjs +0 -4
- package/dist/jsonforms/esm/_virtual/_commonjsHelpers.mjs +0 -8
- package/dist/jsonforms/esm/_virtual/_nodeUtil.mjs +0 -4
- package/dist/jsonforms/esm/_virtual/isBuffer.mjs +0 -4
- package/dist/jsonforms/esm/_virtual/isEmpty.mjs +0 -7
- package/dist/jsonforms/esm/_virtual/lodash.mjs +0 -5
- package/dist/jsonforms/esm/_virtual/lodash2.mjs +0 -4
- package/dist/jsonforms/esm/_virtual/map.mjs +0 -7
- package/dist/jsonforms/esm/_virtual/merge.mjs +0 -7
- package/dist/jsonforms/esm/_virtual/range.mjs +0 -7
- package/dist/jsonforms/esm/_virtual/startCase.mjs +0 -7
- package/dist/jsonforms/esm/_virtual/union.mjs +0 -7
- package/dist/utils/lib/convertToFormData/convertToFormData.d.ts +0 -15
- /package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/Contexts/BulkActionsContext.cjs +0 -0
- /package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/Contexts/FormContext.cjs +0 -0
- /package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/hooks/utils/useLatest.cjs +0 -0
- /package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/utils/convertInfo.cjs +0 -0
- /package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/utils/createQueryParams.cjs +0 -0
- /package/dist/{core/cjs/Wrappers → api/cjs}/ApiProvider/utils/getDefaultValues.cjs +0 -0
- /package/dist/{core/cjs/Wrappers → api/cjs}/Provider/Contexts/AuthContext.cjs +0 -0
- /package/dist/{core/cjs/Wrappers → api/cjs}/Provider/Contexts/InfoContext.cjs +0 -0
- /package/dist/{core → api}/cjs/translations/de.cjs +0 -0
- /package/dist/{utils/cjs → api/cjs/utils}/parseResponse/parseResponse.cjs +0 -0
- /package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/Contexts/BulkActionsContext.mjs +0 -0
- /package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/Contexts/FormContext.mjs +0 -0
- /package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/hooks/utils/useLatest.mjs +0 -0
- /package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/utils/convertInfo.mjs +0 -0
- /package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/utils/createQueryParams.mjs +0 -0
- /package/dist/{core/esm/Wrappers → api/esm}/ApiProvider/utils/getDefaultValues.mjs +0 -0
- /package/dist/{core/esm/Wrappers → api/esm}/Provider/Contexts/AuthContext.mjs +0 -0
- /package/dist/{core/esm/Wrappers → api/esm}/Provider/Contexts/InfoContext.mjs +0 -0
- /package/dist/{core → api}/esm/translations/de.mjs +0 -0
- /package/dist/{utils/esm → api/esm/utils}/parseResponse/parseResponse.mjs +0 -0
- /package/dist/{core/lib/Wrappers/ApiProvider/hooks/useProvideApi.test.d.ts → api/lib/ApiProvider/ApiProvider.test.d.ts} +0 -0
- /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/Contexts/ApiContext.d.ts +0 -0
- /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/hooks/useProvideApi.d.ts +0 -0
- /package/dist/{core/lib/Wrappers/ApiProvider/hooks/useProvideBulk.test.d.ts → api/lib/ApiProvider/hooks/useProvideApi.test.d.ts} +0 -0
- /package/dist/{core/lib/Wrappers/ApiProvider/hooks/useProvideForm.test.d.ts → api/lib/ApiProvider/hooks/useProvideBulk.test.d.ts} +0 -0
- /package/dist/{core/lib/Wrappers/ApiProvider/hooks/utils/useApiActions.test.d.ts → api/lib/ApiProvider/hooks/useProvideForm.test.d.ts} +0 -0
- /package/dist/{core/lib/Wrappers/ApiProvider/hooks/utils/useLatest.test.d.ts → api/lib/ApiProvider/hooks/utils/useApiActions.test.d.ts} +0 -0
- /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/hooks/utils/useLatest.d.ts +0 -0
- /package/dist/{core/lib/Wrappers/ApiProvider/hooks/utils/useStreamingData.test.d.ts → api/lib/ApiProvider/hooks/utils/useLatest.test.d.ts} +0 -0
- /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/createItem.test.d.ts → api/lib/ApiProvider/hooks/utils/useStreamingData.test.d.ts} +0 -0
- /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/convertInfo.d.ts +0 -0
- /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/convertInfo.test.d.ts +0 -0
- /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/createQueryParams.d.ts +0 -0
- /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/createQueryParams.test.d.ts +0 -0
- /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/getDefaultValues.test.d.ts +0 -0
- /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/getValidationSchema.test.d.ts +0 -0
- /package/dist/{core/lib/Wrappers → api/lib}/ApiProvider/utils/types.d.ts +0 -0
- /package/dist/{core/lib/Wrappers → api/lib}/Provider/Contexts/LangContext.d.ts +0 -0
- /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/deleteItem.test.d.ts → api/lib/Provider/Provider.test.d.ts} +0 -0
- /package/dist/{core/lib/Wrappers → api/lib}/Provider/hooks/useProvideAuth.test.d.ts +0 -0
- /package/dist/{core/lib/Wrappers → api/lib}/Provider/hooks/useProvideInfo.test.d.ts +0 -0
- /package/dist/{core/lib/Wrappers → api/lib}/Provider/hooks/useProvideLang.test.d.ts +0 -0
- /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/downloadItems.test.d.ts → api/lib/__tests__/purity.test.d.ts} +0 -0
- /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/formCreateItem.test.d.ts → api/lib/__tests__/smoke.test.d.ts} +0 -0
- /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/formUpdateItem.test.d.ts → api/lib/adapters/AdaptersContext.test.d.ts} +0 -0
- /package/dist/{core/lib/Wrappers/Provider/utils → api/lib/auth}/authFetch.test.d.ts +0 -0
- /package/dist/{core/lib/Wrappers/Provider/utils → api/lib/auth}/userCRUD.test.d.ts +0 -0
- /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/getInfo.test.d.ts → api/lib/fetchers/createItem.test.d.ts} +0 -0
- /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/getItem.test.d.ts → api/lib/fetchers/deleteItem.test.d.ts} +0 -0
- /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/getItems.test.d.ts → api/lib/fetchers/downloadItems.test.d.ts} +0 -0
- /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/updateItem.test.d.ts → api/lib/fetchers/formCreateItem.test.d.ts} +0 -0
- /package/dist/{core/lib/Wrappers/ApiProvider/utils/api/uploadItems.test.d.ts → api/lib/fetchers/formUpdateItem.test.d.ts} +0 -0
- /package/dist/{core/lib/Wrappers/ApiProvider/utils/bulkActions/postBulkAction.test.d.ts → api/lib/fetchers/getInfo.test.d.ts} +0 -0
- /package/dist/{core/lib/hooks/auth/useAuth.test.d.ts → api/lib/fetchers/getItem.test.d.ts} +0 -0
- /package/dist/{core/lib/hooks/auth/useInfo.test.d.ts → api/lib/fetchers/getItems.test.d.ts} +0 -0
- /package/dist/{utils/lib/convertToFormData/convertToFormData.test.d.ts → api/lib/fetchers/postBulkAction.test.d.ts} +0 -0
- /package/dist/{utils/lib/createFetchParams/createFetchParams.test.d.ts → api/lib/fetchers/request.test.d.ts} +0 -0
- /package/dist/{utils/lib/parseResponse/parseResponse.test.d.ts → api/lib/fetchers/updateItem.test.d.ts} +0 -0
- /package/dist/{core → api}/lib/hooks/auth/useAuth.d.ts +0 -0
- /package/dist/{core → api}/lib/hooks/auth/useInfo.d.ts +0 -0
- /package/dist/{core → api}/lib/translations/de.d.ts +0 -0
- /package/dist/{utils/lib → api/lib/utils}/convertToFormData/index.d.ts +0 -0
- /package/dist/{utils/lib → api/lib/utils}/createFetchParams/index.d.ts +0 -0
- /package/dist/{utils/lib → api/lib/utils}/parseResponse/index.d.ts +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Matches any [typed array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray), like `Uint8Array` or `Float64Array`.
|
|
3
|
+
|
|
4
|
+
@category Array
|
|
5
|
+
*/
|
|
6
|
+
export type TypedArray =
|
|
7
|
+
| Int8Array
|
|
8
|
+
| Uint8Array
|
|
9
|
+
| Uint8ClampedArray
|
|
10
|
+
| Int16Array
|
|
11
|
+
| Uint16Array
|
|
12
|
+
| Int32Array
|
|
13
|
+
| Uint32Array
|
|
14
|
+
| Float32Array
|
|
15
|
+
| Float64Array
|
|
16
|
+
| BigInt64Array
|
|
17
|
+
| BigUint64Array;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Convert a union type to an intersection type using [distributive conditional types](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#distributive-conditional-types).
|
|
3
|
+
|
|
4
|
+
Inspired by [this Stack Overflow answer](https://stackoverflow.com/a/50375286/2172153).
|
|
5
|
+
|
|
6
|
+
@example
|
|
7
|
+
```
|
|
8
|
+
import type {UnionToIntersection} from '..';
|
|
9
|
+
|
|
10
|
+
type Union = {the(): void} | {great(arg: string): void} | {escape: boolean};
|
|
11
|
+
|
|
12
|
+
type Intersection = UnionToIntersection<Union>;
|
|
13
|
+
//=> {the(): void; great(arg: string): void; escape: boolean};
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
A more applicable example which could make its way into your library code follows.
|
|
17
|
+
|
|
18
|
+
@example
|
|
19
|
+
```
|
|
20
|
+
import type {UnionToIntersection} from '..';
|
|
21
|
+
|
|
22
|
+
class CommandOne {
|
|
23
|
+
commands: {
|
|
24
|
+
a1: () => undefined,
|
|
25
|
+
b1: () => undefined,
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
class CommandTwo {
|
|
30
|
+
commands: {
|
|
31
|
+
a2: (argA: string) => undefined,
|
|
32
|
+
b2: (argB: string) => undefined,
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const union = [new CommandOne(), new CommandTwo()].map(instance => instance.commands);
|
|
37
|
+
type Union = typeof union;
|
|
38
|
+
//=> {a1(): void; b1(): void} | {a2(argA: string): void; b2(argB: string): void}
|
|
39
|
+
|
|
40
|
+
type Intersection = UnionToIntersection<Union>;
|
|
41
|
+
//=> {a1(): void; b1(): void; a2(argA: string): void; b2(argB: string): void}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
@category Type
|
|
45
|
+
*/
|
|
46
|
+
export type UnionToIntersection<Union> = (
|
|
47
|
+
// `extends unknown` is always going to be the case and is used to convert the
|
|
48
|
+
// `Union` into a [distributive conditional
|
|
49
|
+
// type](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#distributive-conditional-types).
|
|
50
|
+
Union extends unknown
|
|
51
|
+
// The union type is used as the only argument to a function since the union
|
|
52
|
+
// of function arguments is an intersection.
|
|
53
|
+
? (distributedUnion: Union) => void
|
|
54
|
+
// This won't happen.
|
|
55
|
+
: never
|
|
56
|
+
// Infer the `Intersection` type since TypeScript represents the positional
|
|
57
|
+
// arguments of unions of functions as an intersection of the union.
|
|
58
|
+
) extends ((mergedIntersection: infer Intersection) => void)
|
|
59
|
+
? Intersection
|
|
60
|
+
: never;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Create a union of the given object's values, and optionally specify which keys to get the values from.
|
|
3
|
+
|
|
4
|
+
Please upvote [this issue](https://github.com/microsoft/TypeScript/issues/31438) if you want to have this type as a built-in in TypeScript.
|
|
5
|
+
|
|
6
|
+
@example
|
|
7
|
+
```
|
|
8
|
+
// data.json
|
|
9
|
+
{
|
|
10
|
+
'foo': 1,
|
|
11
|
+
'bar': 2,
|
|
12
|
+
'biz': 3
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// main.ts
|
|
16
|
+
import type {ValueOf} from '..';
|
|
17
|
+
import data = require('./data.json');
|
|
18
|
+
|
|
19
|
+
export function getData(name: string): ValueOf<typeof data> {
|
|
20
|
+
return data[name];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function onlyBar(name: string): ValueOf<typeof data, 'bar'> {
|
|
24
|
+
return data[name];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// file.ts
|
|
28
|
+
import {getData, onlyBar} from './main';
|
|
29
|
+
|
|
30
|
+
getData('foo');
|
|
31
|
+
//=> 1
|
|
32
|
+
|
|
33
|
+
onlyBar('foo');
|
|
34
|
+
//=> TypeError ...
|
|
35
|
+
|
|
36
|
+
onlyBar('bar');
|
|
37
|
+
//=> 2
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
@category Object
|
|
41
|
+
*/
|
|
42
|
+
export type ValueOf<ObjectType, ValueType extends keyof ObjectType = keyof ObjectType> = ObjectType[ValueType];
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type {Except} from './except';
|
|
2
|
+
import type {Simplify} from './simplify';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
Create a type that strips `readonly` from all or some of an object's keys. Inverse of `Readonly<T>`.
|
|
6
|
+
|
|
7
|
+
This can be used to [store and mutate options within a class](https://github.com/sindresorhus/pageres/blob/4a5d05fca19a5fbd2f53842cbf3eb7b1b63bddd2/source/index.ts#L72), [edit `readonly` objects within tests](https://stackoverflow.com/questions/50703834), [construct a `readonly` object within a function](https://github.com/Microsoft/TypeScript/issues/24509), or to define a single model where the only thing that changes is whether or not some of the keys are writable.
|
|
8
|
+
|
|
9
|
+
@example
|
|
10
|
+
```
|
|
11
|
+
import type {Writable} from '..';
|
|
12
|
+
|
|
13
|
+
type Foo = {
|
|
14
|
+
readonly a: number;
|
|
15
|
+
readonly b: readonly string[]; // To show that only the mutability status of the properties, not their values, are affected.
|
|
16
|
+
readonly c: boolean;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const writableFoo: Writable<Foo> = {a: 1, b: ['2'], c: true};
|
|
20
|
+
writableFoo.a = 3;
|
|
21
|
+
writableFoo.b[0] = 'new value'; // Will still fail as the value of property "b" is still a readonly type.
|
|
22
|
+
writableFoo.b = ['something']; // Will work as the "b" property itself is no longer readonly.
|
|
23
|
+
|
|
24
|
+
type SomeWritable = Writable<Foo, 'b' | 'c'>;
|
|
25
|
+
// type SomeWritable = {
|
|
26
|
+
// readonly a: number;
|
|
27
|
+
// b: readonly string[]; // It's now writable. The type of the property remains unaffected.
|
|
28
|
+
// c: boolean; // It's now writable.
|
|
29
|
+
// }
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
@category Object
|
|
33
|
+
*/
|
|
34
|
+
export type Writable<BaseType, Keys extends keyof BaseType = keyof BaseType> =
|
|
35
|
+
Simplify<
|
|
36
|
+
// Pick just the keys that are not writable from the base type.
|
|
37
|
+
Except<BaseType, Keys> &
|
|
38
|
+
// Pick the keys that should be writable from the base type and make them writable by removing the `readonly` modifier from the key.
|
|
39
|
+
{-readonly [KeyType in keyof Pick<BaseType, Keys>]: Pick<BaseType, Keys>[KeyType]}
|
|
40
|
+
>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const utils = require("fastapi-rtk/utils");
|
|
5
|
+
const zustand = require("fastapi-rtk/zustand");
|
|
6
|
+
const React = require("react");
|
|
7
|
+
const useInfo = require("../hooks/auth/useInfo.cjs");
|
|
8
|
+
const contexts = require("fastapi-rtk/contexts");
|
|
9
|
+
const BulkActionsContext = require("./Contexts/BulkActionsContext.cjs");
|
|
10
|
+
const FormContext = require("./Contexts/FormContext.cjs");
|
|
11
|
+
const useProvideApi = require("./hooks/useProvideApi.cjs");
|
|
12
|
+
const useProvideBulk = require("./hooks/useProvideBulk.cjs");
|
|
13
|
+
const useProvideForm = require("./hooks/useProvideForm.cjs");
|
|
14
|
+
function ApiProvider(props) {
|
|
15
|
+
const {
|
|
16
|
+
resource_name = "",
|
|
17
|
+
initialQueryParams,
|
|
18
|
+
relation,
|
|
19
|
+
fetchInfo,
|
|
20
|
+
clearInfoOnRefetch,
|
|
21
|
+
clearDataOnRefetch,
|
|
22
|
+
refetchInfoBasedOnLang,
|
|
23
|
+
refetchDataBasedOnLang,
|
|
24
|
+
resetQueryParamsOnPathChange,
|
|
25
|
+
infoQueryProps,
|
|
26
|
+
dataQueryProps,
|
|
27
|
+
streamingQueryProps,
|
|
28
|
+
streaming,
|
|
29
|
+
apiParams,
|
|
30
|
+
bulkParams,
|
|
31
|
+
children
|
|
32
|
+
} = props;
|
|
33
|
+
const info = useInfo.useInfo();
|
|
34
|
+
const { baseUrl } = info;
|
|
35
|
+
const api = useProvideApi.useProvideApi(
|
|
36
|
+
{
|
|
37
|
+
path: utils.urlJoin(baseUrl, resource_name),
|
|
38
|
+
initialQueryParams,
|
|
39
|
+
relation,
|
|
40
|
+
fetchInfo,
|
|
41
|
+
clearInfoOnRefetch,
|
|
42
|
+
clearDataOnRefetch,
|
|
43
|
+
refetchInfoBasedOnLang,
|
|
44
|
+
refetchDataBasedOnLang,
|
|
45
|
+
resetQueryParamsOnPathChange,
|
|
46
|
+
infoQueryProps,
|
|
47
|
+
dataQueryProps,
|
|
48
|
+
streamingQueryProps,
|
|
49
|
+
streaming
|
|
50
|
+
},
|
|
51
|
+
apiParams
|
|
52
|
+
);
|
|
53
|
+
const apiProxy = zustand.useProxy(api);
|
|
54
|
+
const bulkActions = useProvideBulk.useProvideBulk(apiProxy, bulkParams);
|
|
55
|
+
const bulkActionsProxy = zustand.useProxy(bulkActions);
|
|
56
|
+
const formView = useProvideForm.useProvideForm();
|
|
57
|
+
const [formViewProxy] = React.useState(() => zustand.createProxy(formView));
|
|
58
|
+
const formAdd = useProvideForm.useProvideForm();
|
|
59
|
+
const [formAddProxy] = React.useState(() => zustand.createProxy(formAdd));
|
|
60
|
+
const formEdit = useProvideForm.useProvideForm();
|
|
61
|
+
const [formEditProxy] = React.useState(() => zustand.createProxy(formEdit));
|
|
62
|
+
const formDelete = useProvideForm.useProvideForm();
|
|
63
|
+
const [formDeleteProxy] = React.useState(() => zustand.createProxy(formDelete));
|
|
64
|
+
return /* @__PURE__ */ jsxRuntime.jsx(contexts.ApiContextProvider, { value: apiProxy, children: /* @__PURE__ */ jsxRuntime.jsx(BulkActionsContext.BulkActionsContextProvider, { value: bulkActionsProxy, children: /* @__PURE__ */ jsxRuntime.jsx(FormContext.FormContextViewProvider, { value: formViewProxy, children: /* @__PURE__ */ jsxRuntime.jsx(FormContext.FormContextAddProvider, { value: formAddProxy, children: /* @__PURE__ */ jsxRuntime.jsx(FormContext.FormContextEditProvider, { value: formEditProxy, children: /* @__PURE__ */ jsxRuntime.jsx(FormContext.FormContextDeleteProvider, { value: formDeleteProxy, children }) }) }) }) }) });
|
|
65
|
+
}
|
|
66
|
+
const withApiProvider = (apiProviderProps, Component, options = {}) => {
|
|
67
|
+
const { displayName, forwardRef: shouldForwardRef = false } = options;
|
|
68
|
+
const renderComponent = (props, ref) => {
|
|
69
|
+
const resolvedProps = utils.parseFromValuesOrFunc(apiProviderProps, props);
|
|
70
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ApiProvider, { ...resolvedProps, children: /* @__PURE__ */ jsxRuntime.jsx(Component, { ...props, ref }) });
|
|
71
|
+
};
|
|
72
|
+
const WrappedComponent = shouldForwardRef ? (
|
|
73
|
+
// #MUSTANY #MUSTUNKNOWN forwardRef's PropsWithoutRef widening over the generic P is inexpressible; the result is re-typed through unknown to ComponentType<P>
|
|
74
|
+
React.forwardRef(renderComponent)
|
|
75
|
+
) : (props) => renderComponent(props, null);
|
|
76
|
+
WrappedComponent.displayName = displayName || `withApiProvider(${Component.displayName || Component.name || "Component"})`;
|
|
77
|
+
return WrappedComponent;
|
|
78
|
+
};
|
|
79
|
+
exports.ApiProvider = ApiProvider;
|
|
80
|
+
exports.withApiProvider = withApiProvider;
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const React = require("react");
|
|
4
|
-
const utils = require("fastapi-rtk/utils");
|
|
5
|
-
const hooks = require("@mantine/hooks");
|
|
6
|
-
const utils$1 = require("../../../../../.external/cjs/@tanstack_query-core@5.90.20/@tanstack/query-core/build/modern/utils.cjs");
|
|
7
|
-
const useQuery = require("../../../../../.external/cjs/@tanstack_react-query@5.90.20_react@19.2.3/@tanstack/react-query/build/modern/useQuery.cjs");
|
|
8
|
-
const useInfiniteQuery = require("../../../../../.external/cjs/@tanstack_react-query@5.90.20_react@19.2.3/@tanstack/react-query/build/modern/useInfiniteQuery.cjs");
|
|
9
4
|
const contexts = require("fastapi-rtk/contexts");
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
5
|
+
const utils = require("fastapi-rtk/utils");
|
|
6
|
+
const utils$1 = require("../../../../.external/cjs/@tanstack_query-core@5.90.20/@tanstack/query-core/build/modern/utils.cjs");
|
|
7
|
+
const useQuery = require("../../../../.external/cjs/@tanstack_react-query@5.90.20_react@19.2.3/@tanstack/react-query/build/modern/useQuery.cjs");
|
|
8
|
+
const useInfiniteQuery = require("../../../../.external/cjs/@tanstack_react-query@5.90.20_react@19.2.3/@tanstack/react-query/build/modern/useInfiniteQuery.cjs");
|
|
9
|
+
const AdaptersContext = require("../../adapters/AdaptersContext.cjs");
|
|
10
|
+
const createItem = require("../../fetchers/createItem.cjs");
|
|
11
|
+
const deleteItem = require("../../fetchers/deleteItem.cjs");
|
|
12
|
+
const downloadItems = require("../../fetchers/downloadItems.cjs");
|
|
13
|
+
const formCreateItem = require("../../fetchers/formCreateItem.cjs");
|
|
14
|
+
const formUpdateItem = require("../../fetchers/formUpdateItem.cjs");
|
|
15
|
+
const getInfo = require("../../fetchers/getInfo.cjs");
|
|
16
|
+
const getItem = require("../../fetchers/getItem.cjs");
|
|
17
|
+
const getItems = require("../../fetchers/getItems.cjs");
|
|
18
|
+
const updateItem = require("../../fetchers/updateItem.cjs");
|
|
19
|
+
const uploadItems = require("../../fetchers/uploadItems.cjs");
|
|
20
|
+
const useDidUpdate = require("../../hooks/useDidUpdate.cjs");
|
|
20
21
|
const convertInfo = require("../utils/convertInfo.cjs");
|
|
21
22
|
const createQueryParams = require("../utils/createQueryParams.cjs");
|
|
22
23
|
const useApiActions = require("./utils/useApiActions.cjs");
|
|
@@ -59,6 +60,7 @@ function useProvideApi(params, api = defaultApi) {
|
|
|
59
60
|
streamingQueryProps,
|
|
60
61
|
streaming: streamingMode = false
|
|
61
62
|
} = params;
|
|
63
|
+
const adapters = AdaptersContext.useAdapters();
|
|
62
64
|
const [queryParams, setQueryParams] = React.useState(
|
|
63
65
|
initialQueryParams ? createQueryParams.createQueryParams(null, initialQueryParams) : null
|
|
64
66
|
);
|
|
@@ -114,7 +116,7 @@ function useProvideApi(params, api = defaultApi) {
|
|
|
114
116
|
const { currentLanguage } = contexts.useLang();
|
|
115
117
|
const infoQuery = useQuery.useQuery({
|
|
116
118
|
queryKey: [`info`, path, refetchInfoBasedOnLang ? currentLanguage : ""],
|
|
117
|
-
queryFn: ({ signal }) => api.getInfo(utils.urlJoin(path, "_info"), { signal, headers: { "Accept-Language": currentLanguage } }).then((data) => {
|
|
119
|
+
queryFn: ({ signal }) => api.getInfo(adapters, utils.urlJoin(path, "_info"), { signal, headers: { "Accept-Language": currentLanguage } }).then((data) => {
|
|
118
120
|
const converted = convertInfo.convertInfo(data);
|
|
119
121
|
if (!converted) {
|
|
120
122
|
throw new Error("Empty /_info response");
|
|
@@ -138,7 +140,7 @@ function useProvideApi(params, api = defaultApi) {
|
|
|
138
140
|
JSON.stringify(memoizedQueryParams),
|
|
139
141
|
refetchDataBasedOnLang ? currentLanguage : ""
|
|
140
142
|
],
|
|
141
|
-
queryFn: ({ signal }) => memoizedQueryParams ? api.getItems(utils.urlJoin(memoizedQueryParamsPathRef.current, "/"), memoizedQueryParams, {
|
|
143
|
+
queryFn: ({ signal }) => memoizedQueryParams ? api.getItems(adapters, utils.urlJoin(memoizedQueryParamsPathRef.current, "/"), memoizedQueryParams, {
|
|
142
144
|
signal,
|
|
143
145
|
headers: { "Accept-Language": currentLanguage }
|
|
144
146
|
}).then(
|
|
@@ -177,7 +179,7 @@ function useProvideApi(params, api = defaultApi) {
|
|
|
177
179
|
}
|
|
178
180
|
const page = pageParam ?? memoizedQueryParams.page ?? 0;
|
|
179
181
|
const params2 = { ...memoizedQueryParams, page };
|
|
180
|
-
return api.getItems(utils.urlJoin(memoizedQueryParamsPathRef.current, "/"), params2, {
|
|
182
|
+
return api.getItems(adapters, utils.urlJoin(memoizedQueryParamsPathRef.current, "/"), params2, {
|
|
181
183
|
signal,
|
|
182
184
|
headers: { "Accept-Language": currentLanguage }
|
|
183
185
|
}).then(
|
|
@@ -229,7 +231,7 @@ function useProvideApi(params, api = defaultApi) {
|
|
|
229
231
|
}
|
|
230
232
|
resetError();
|
|
231
233
|
}, [activeDataQuery.error, infoQuery.error, resetError]);
|
|
232
|
-
|
|
234
|
+
useDidUpdate.useDidUpdate(() => {
|
|
233
235
|
if (!resetQueryParamsOnPathChange) {
|
|
234
236
|
return;
|
|
235
237
|
}
|
|
@@ -241,6 +243,7 @@ function useProvideApi(params, api = defaultApi) {
|
|
|
241
243
|
}, [path]);
|
|
242
244
|
const { getEntry, addEntry, updateEntry, deleteEntry, download, upload, getItemURL } = useApiActions.useApiActions({
|
|
243
245
|
api,
|
|
246
|
+
adapters,
|
|
244
247
|
path,
|
|
245
248
|
pathRef,
|
|
246
249
|
infoRef,
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const React = require("react");
|
|
4
|
-
const
|
|
4
|
+
const AdaptersContext = require("../../adapters/AdaptersContext.cjs");
|
|
5
|
+
const postBulkAction = require("../../fetchers/postBulkAction.cjs");
|
|
5
6
|
const defaultBulk = { postBulk: postBulkAction.postBulk };
|
|
6
7
|
const useProvideBulk = (params, bulk = defaultBulk) => {
|
|
7
8
|
const { path } = params;
|
|
9
|
+
const adapters = AdaptersContext.useAdapters();
|
|
8
10
|
const [selectedIds, setSelectedIds] = React.useState([]);
|
|
9
11
|
const [error, setError] = React.useState();
|
|
10
12
|
const resetError = React.useCallback(() => setError(void 0), []);
|
|
@@ -15,13 +17,13 @@ const useProvideBulk = (params, bulk = defaultBulk) => {
|
|
|
15
17
|
if (data === void 0) {
|
|
16
18
|
data = selectedIds;
|
|
17
19
|
}
|
|
18
|
-
const response = await bulk.postBulk(path, handler, data);
|
|
20
|
+
const response = await bulk.postBulk(adapters, path, handler, data);
|
|
19
21
|
return response;
|
|
20
22
|
} catch (error2) {
|
|
21
23
|
setError({ message: `Could not perform bulk action`, originalError: error2 });
|
|
22
24
|
}
|
|
23
25
|
},
|
|
24
|
-
[bulk, path, resetError, selectedIds]
|
|
26
|
+
[adapters, bulk, path, resetError, selectedIds]
|
|
25
27
|
);
|
|
26
28
|
const bulkActions = React.useMemo(() => ({ selectedIds, setSelectedIds }), [selectedIds, setSelectedIds]);
|
|
27
29
|
return { bulkActions, dispatchBulkActions, error, resetError };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const constants = require("fastapi-rtk/constants");
|
|
4
|
+
const zustand = require("fastapi-rtk/zustand");
|
|
4
5
|
const React = require("react");
|
|
5
|
-
const react = require("../../../../../.external/cjs/zustand@5.0.10_@types_react@19.2.9_react@19.2.3/zustand/esm/react.cjs");
|
|
6
6
|
const useProvideForm = () => {
|
|
7
7
|
const [storeAdd] = React.useState(
|
|
8
|
-
() =>
|
|
8
|
+
() => zustand.zs.create((set, get) => ({
|
|
9
9
|
opened: false,
|
|
10
10
|
getOpened: () => get().opened,
|
|
11
11
|
setOpened: (newOpened) => set({ opened: newOpened }),
|
|
@@ -3,61 +3,61 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const utils = require("fastapi-rtk/utils");
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const useApiActions = (params) => {
|
|
6
|
-
const { api, path, pathRef, infoRef, queryParamsRef, currentLanguage } = params;
|
|
6
|
+
const { api, adapters, path, pathRef, infoRef, queryParamsRef, currentLanguage } = params;
|
|
7
7
|
const getEntry = React.useCallback(
|
|
8
8
|
async (id) => (
|
|
9
9
|
// #MUSTASSERT convertId returns a broad union; ids resolve to a string/number at runtime
|
|
10
|
-
api.getItem(pathRef.current, utils.convertId(id), {
|
|
10
|
+
api.getItem(adapters, pathRef.current, utils.convertId(id), {
|
|
11
11
|
headers: { "Accept-Language": currentLanguage }
|
|
12
12
|
})
|
|
13
13
|
),
|
|
14
|
-
[api, currentLanguage, pathRef]
|
|
14
|
+
[adapters, api, currentLanguage, pathRef]
|
|
15
15
|
);
|
|
16
16
|
const addEntry = React.useCallback(
|
|
17
17
|
async (item) => {
|
|
18
18
|
var _a;
|
|
19
19
|
const func = ((_a = infoRef.current) == null ? void 0 : _a.add_type) === "form" ? api.formCreateItem : api.createItem;
|
|
20
|
-
return func(pathRef.current, item, {
|
|
20
|
+
return func(adapters, pathRef.current, item, {
|
|
21
21
|
headers: { "Accept-Language": currentLanguage }
|
|
22
22
|
});
|
|
23
23
|
},
|
|
24
|
-
[api.createItem, api.formCreateItem, currentLanguage, infoRef, pathRef]
|
|
24
|
+
[adapters, api.createItem, api.formCreateItem, currentLanguage, infoRef, pathRef]
|
|
25
25
|
);
|
|
26
26
|
const updateEntry = React.useCallback(
|
|
27
27
|
async (id, item) => {
|
|
28
28
|
var _a;
|
|
29
29
|
const func = ((_a = infoRef.current) == null ? void 0 : _a.edit_type) === "form" ? api.formUpdateItem : api.updateItem;
|
|
30
|
-
return func(pathRef.current, utils.convertId(id), item, {
|
|
30
|
+
return func(adapters, pathRef.current, utils.convertId(id), item, {
|
|
31
31
|
headers: { "Accept-Language": currentLanguage }
|
|
32
32
|
});
|
|
33
33
|
},
|
|
34
|
-
[api.formUpdateItem, api.updateItem, currentLanguage, infoRef, pathRef]
|
|
34
|
+
[adapters, api.formUpdateItem, api.updateItem, currentLanguage, infoRef, pathRef]
|
|
35
35
|
);
|
|
36
36
|
const deleteEntry = React.useCallback(
|
|
37
37
|
async (id) => (
|
|
38
38
|
// #MUSTASSERT convertId returns a broad union; ids resolve to a string/number at runtime
|
|
39
|
-
api.deleteItem(pathRef.current, utils.convertId(id), {
|
|
39
|
+
api.deleteItem(adapters, pathRef.current, utils.convertId(id), {
|
|
40
40
|
headers: { "Accept-Language": currentLanguage }
|
|
41
41
|
})
|
|
42
42
|
),
|
|
43
|
-
[api, currentLanguage, pathRef]
|
|
43
|
+
[adapters, api, currentLanguage, pathRef]
|
|
44
44
|
);
|
|
45
45
|
const download = React.useCallback(
|
|
46
|
-
async (label, { export_mode, delimiter, quotechar } = {}) => api.downloadItems(pathRef.current, queryParamsRef.current ?? void 0, {
|
|
46
|
+
async (label, { export_mode, delimiter, quotechar } = {}) => api.downloadItems(adapters, pathRef.current, queryParamsRef.current ?? void 0, {
|
|
47
47
|
label,
|
|
48
48
|
export_mode,
|
|
49
49
|
delimiter,
|
|
50
50
|
quotechar
|
|
51
51
|
}),
|
|
52
|
-
[api, pathRef, queryParamsRef]
|
|
52
|
+
[adapters, api, pathRef, queryParamsRef]
|
|
53
53
|
);
|
|
54
54
|
const upload = React.useCallback(
|
|
55
|
-
async (file, { delimiter, quotechar } = {}) => api.uploadItems(pathRef.current, file, { delimiter, quotechar }),
|
|
56
|
-
[api, pathRef]
|
|
55
|
+
async (file, { delimiter, quotechar } = {}) => api.uploadItems(adapters, pathRef.current, file, { delimiter, quotechar }),
|
|
56
|
+
[adapters, api, pathRef]
|
|
57
57
|
);
|
|
58
58
|
const getItemURL = React.useCallback(
|
|
59
|
-
(type, item) => typeof item === "string" ? utils.urlJoin(path, `_${type}`, item) :
|
|
60
|
-
[path]
|
|
59
|
+
(type, item) => typeof item === "string" ? utils.urlJoin(path, `_${type}`, item) : adapters.fileDownload.objectUrl(item),
|
|
60
|
+
[adapters, path]
|
|
61
61
|
);
|
|
62
62
|
return {
|
|
63
63
|
getEntry,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const QueryClientProvider = require("
|
|
3
|
+
const QueryClientProvider = require("../../../../../.external/cjs/@tanstack_react-query@5.90.20_react@19.2.3/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const useStreamingData = (params) => {
|
|
6
6
|
var _a;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
3
|
+
const contexts = require("fastapi-rtk/contexts");
|
|
4
4
|
const getValidationSchema = (columns) => {
|
|
5
5
|
const schema = columns.reduce((schema2, column) => {
|
|
6
6
|
const { name, required } = column;
|
|
@@ -23,7 +23,7 @@ const getValidationSchema = (columns) => {
|
|
|
23
23
|
}
|
|
24
24
|
let validator;
|
|
25
25
|
try {
|
|
26
|
-
const factory =
|
|
26
|
+
const factory = contexts.yup[type];
|
|
27
27
|
if (required) {
|
|
28
28
|
validator = factory().typeError(`Field must be of type ${type}`).required("Field is required");
|
|
29
29
|
} else {
|
|
@@ -37,6 +37,6 @@ const getValidationSchema = (columns) => {
|
|
|
37
37
|
}
|
|
38
38
|
return schema2;
|
|
39
39
|
}, {});
|
|
40
|
-
return
|
|
40
|
+
return contexts.yup.object().shape(schema);
|
|
41
41
|
};
|
|
42
42
|
exports.getValidationSchema = getValidationSchema;
|
|
@@ -5,13 +5,11 @@ const constants = require("fastapi-rtk/constants");
|
|
|
5
5
|
const contexts = require("fastapi-rtk/contexts");
|
|
6
6
|
const utils = require("fastapi-rtk/utils");
|
|
7
7
|
const zustand = require("fastapi-rtk/zustand");
|
|
8
|
-
const
|
|
9
|
-
const i18next = require("../../../../../.external/cjs/i18next@25.8.0_typescript@5.9.3/i18next/dist/esm/i18next.cjs");
|
|
8
|
+
const i18next = require("../../../../.external/cjs/i18next@25.8.0_typescript@5.9.3/i18next/dist/esm/i18next.cjs");
|
|
10
9
|
const React = require("react");
|
|
11
|
-
const
|
|
10
|
+
const AdaptersContext = require("../../adapters/AdaptersContext.cjs");
|
|
11
|
+
const de = require("../../translations/de.cjs");
|
|
12
12
|
const useProvideLang = require("../hooks/useProvideLang.cjs");
|
|
13
|
-
const I18nextProvider = require("../../../../../.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");
|
|
14
|
-
const initReactI18next = require("../../../../../.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/initReactI18next.cjs");
|
|
15
13
|
const getI18n = (props = {}) => {
|
|
16
14
|
var _a, _b, _c, _d;
|
|
17
15
|
const { initProps, callback, translations } = props;
|
|
@@ -21,7 +19,7 @@ const getI18n = (props = {}) => {
|
|
|
21
19
|
return acc;
|
|
22
20
|
}, {});
|
|
23
21
|
const initResources = (initProps == null ? void 0 : initProps.resources) ?? {};
|
|
24
|
-
i18n.use(
|
|
22
|
+
i18n.use(contexts.i18nr.initReactI18next).init({
|
|
25
23
|
...initProps,
|
|
26
24
|
// the translations
|
|
27
25
|
// (tip move them in a JSON file and import them,
|
|
@@ -62,7 +60,21 @@ const InnerLangContextProvider = (props) => {
|
|
|
62
60
|
const LangContextProvider = (props) => {
|
|
63
61
|
const { children, langProps, props: contextProps } = props;
|
|
64
62
|
const i18nRef = React.useRef((langProps == null ? void 0 : langProps.i18n) ?? getI18n(langProps == null ? void 0 : langProps.getI18nProps));
|
|
65
|
-
const
|
|
63
|
+
const adapters = AdaptersContext.useAdapters();
|
|
64
|
+
const [localStorageLanguage, setLocalStorageLanguage] = React.useState(constants.LANG_LOCAL_STORAGE_PROPS.defaultValue);
|
|
65
|
+
React.useEffect(() => {
|
|
66
|
+
var _a, _b;
|
|
67
|
+
Promise.resolve(adapters.storage.get(constants.LANG_LOCAL_STORAGE_PROPS.key)).then((v) => {
|
|
68
|
+
if (v) {
|
|
69
|
+
setLocalStorageLanguage(v);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
return (_b = (_a = adapters.storage).subscribe) == null ? void 0 : _b.call(_a, constants.LANG_LOCAL_STORAGE_PROPS.key, (v) => {
|
|
73
|
+
if (v) {
|
|
74
|
+
setLocalStorageLanguage(v);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}, [adapters.storage]);
|
|
66
78
|
const language = React.useMemo(
|
|
67
79
|
() => utils.parseFromValuesOrFunc(langProps == null ? void 0 : langProps.lang, i18nRef.current) ?? localStorageLanguage,
|
|
68
80
|
[langProps == null ? void 0 : langProps.lang, localStorageLanguage]
|
|
@@ -70,7 +82,7 @@ const LangContextProvider = (props) => {
|
|
|
70
82
|
React.useEffect(() => {
|
|
71
83
|
i18nRef.current.changeLanguage(language);
|
|
72
84
|
}, [language]);
|
|
73
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
85
|
+
return /* @__PURE__ */ jsxRuntime.jsx(contexts.i18nr.I18nextProvider, { i18n: i18nRef.current, children: /* @__PURE__ */ jsxRuntime.jsx(InnerLangContextProvider, { MRTLocalization: langProps == null ? void 0 : langProps.MRTLocalization, ...contextProps, children }) });
|
|
74
86
|
};
|
|
75
87
|
Object.defineProperty(exports, "InnerInnerLangContextProvider", {
|
|
76
88
|
enumerable: true,
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const constants = require("fastapi-rtk/constants");
|
|
5
|
+
const utils = require("fastapi-rtk/utils");
|
|
6
|
+
const zustand = require("fastapi-rtk/zustand");
|
|
7
|
+
const queryClient = require("../../../.external/cjs/@tanstack_query-core@5.90.20/@tanstack/query-core/build/modern/queryClient.cjs");
|
|
8
|
+
const QueryClientProvider = require("../../../.external/cjs/@tanstack_react-query@5.90.20_react@19.2.3/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
|
|
9
|
+
const React = require("react");
|
|
10
|
+
const AdaptersContext = require("../adapters/AdaptersContext.cjs");
|
|
11
|
+
const AuthContext = require("./Contexts/AuthContext.cjs");
|
|
12
|
+
const InfoContext = require("./Contexts/InfoContext.cjs");
|
|
13
|
+
const LangContext = require("./Contexts/LangContext.cjs");
|
|
14
|
+
const useProvideAuth = require("./hooks/useProvideAuth.cjs");
|
|
15
|
+
const useProvideInfo = require("./hooks/useProvideInfo.cjs");
|
|
16
|
+
function InnerProvider(props) {
|
|
17
|
+
const defaultproviderProps = { baseUrl: "", inheritMantineTheme: false };
|
|
18
|
+
const { baseUrl, authParams, infoParams, authQueryProps, children } = {
|
|
19
|
+
...defaultproviderProps,
|
|
20
|
+
...props
|
|
21
|
+
};
|
|
22
|
+
const auth = useProvideAuth.useProvideAuth(baseUrl, authQueryProps, authParams);
|
|
23
|
+
const authProxy = zustand.useProxy(auth);
|
|
24
|
+
const info = useProvideInfo.useProvideInfo(baseUrl, auth, infoParams);
|
|
25
|
+
const infoProxy = zustand.useProxy(info);
|
|
26
|
+
React.useEffect(() => {
|
|
27
|
+
constants.setDebugMode(props.debug ?? false);
|
|
28
|
+
}, []);
|
|
29
|
+
return (
|
|
30
|
+
// #MUSTASSERT #MUSTUNKNOWN useProvideAuth exposes error as a string and a deprecated oauth_signin alias, diverging from the AuthContextValue shape consumed downstream
|
|
31
|
+
/* @__PURE__ */ jsxRuntime.jsx(AuthContext.AuthContextProvider, { value: authProxy, children: /* @__PURE__ */ jsxRuntime.jsx(InfoContext.InfoContextProvider, { value: infoProxy, children: /* @__PURE__ */ jsxRuntime.jsx(LangContext.LangContextProvider, { langProps: props.langProps, children }) }) })
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
const Provider = (props) => {
|
|
35
|
+
const [queryClient$1] = React.useState(() => new queryClient.QueryClient(props.queryClientProps));
|
|
36
|
+
return /* @__PURE__ */ jsxRuntime.jsx(QueryClientProvider.QueryClientProvider, { client: queryClient$1, children: /* @__PURE__ */ jsxRuntime.jsx(AdaptersContext.AdaptersProvider, { value: props.adapters, children: /* @__PURE__ */ jsxRuntime.jsx(InnerProvider, { ...props }) }) });
|
|
37
|
+
};
|
|
38
|
+
const withProvider = (providerProps, Component, options = {}) => {
|
|
39
|
+
const { displayName, forwardRef: shouldForwardRef = false } = options;
|
|
40
|
+
const renderComponent = (props, ref) => {
|
|
41
|
+
const resolvedProps = utils.parseFromValuesOrFunc(providerProps, props);
|
|
42
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Provider, { ...resolvedProps, children: /* @__PURE__ */ jsxRuntime.jsx(Component, { ...props, ref }) });
|
|
43
|
+
};
|
|
44
|
+
const WrappedComponent = shouldForwardRef ? (
|
|
45
|
+
// #MUSTANY ComponentProps<typeof Component> does not line up with forwardRef's PropsWithoutRef inference; the runtime render fn is correct
|
|
46
|
+
React.forwardRef(renderComponent)
|
|
47
|
+
) : (props) => renderComponent(props, null);
|
|
48
|
+
WrappedComponent.displayName = displayName || `withProvider(${Component.displayName || Component.name || "Component"})`;
|
|
49
|
+
return WrappedComponent;
|
|
50
|
+
};
|
|
51
|
+
exports.Provider = Provider;
|
|
52
|
+
exports.withProvider = withProvider;
|