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,63 @@
|
|
|
1
|
+
import { urlJoin } from "fastapi-rtk/utils";
|
|
2
|
+
import { parseResponse } from "../utils/parseResponse/parseResponse.mjs";
|
|
3
|
+
import { buildRequest } from "../fetchers/request.mjs";
|
|
4
|
+
async function authSignin(adapters, baseUrl, credentials) {
|
|
5
|
+
const { fetchPath, options } = await buildRequest(
|
|
6
|
+
{ path: urlJoin(baseUrl, "auth", adapters.authTransport.loginPath), method: "POST" },
|
|
7
|
+
adapters
|
|
8
|
+
);
|
|
9
|
+
const res = await adapters.network.request(fetchPath, {
|
|
10
|
+
...options,
|
|
11
|
+
headers: { ...options.headers, "Content-Type": "application/x-www-form-urlencoded" },
|
|
12
|
+
body: adapters.authTransport.buildLoginBody(credentials)
|
|
13
|
+
});
|
|
14
|
+
if (!res.ok) {
|
|
15
|
+
if (res.status === 400) {
|
|
16
|
+
throw new Error("Username or password wrong.");
|
|
17
|
+
} else {
|
|
18
|
+
throw new Error("Failed to sign in.");
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
await adapters.authTransport.persistLogin(res);
|
|
22
|
+
}
|
|
23
|
+
async function authSignout(adapters, baseUrl) {
|
|
24
|
+
const { fetchPath, options } = await buildRequest(
|
|
25
|
+
{ path: urlJoin(baseUrl, "auth/logout"), method: "POST" },
|
|
26
|
+
adapters
|
|
27
|
+
);
|
|
28
|
+
const res = await adapters.network.request(fetchPath, options);
|
|
29
|
+
if (!res.ok) {
|
|
30
|
+
throw new Error("Failed to sign out.");
|
|
31
|
+
}
|
|
32
|
+
await adapters.authTransport.clearLogin();
|
|
33
|
+
}
|
|
34
|
+
async function authResetPassword(adapters, baseUrl, newPassword, { email }) {
|
|
35
|
+
const { fetchPath, options } = await buildRequest(
|
|
36
|
+
{ path: urlJoin(baseUrl, "auth/forgot-password"), method: "POST", body: { email } },
|
|
37
|
+
adapters
|
|
38
|
+
);
|
|
39
|
+
const forgotPasswordRes = await adapters.network.request(fetchPath, options);
|
|
40
|
+
const { token } = await parseResponse(forgotPasswordRes);
|
|
41
|
+
const { fetchPath: fetchPath2, options: options2 } = await buildRequest(
|
|
42
|
+
{ path: urlJoin(baseUrl, "auth/reset-password"), method: "POST", body: { token, password: newPassword } },
|
|
43
|
+
adapters
|
|
44
|
+
);
|
|
45
|
+
const resetPasswordRes = await adapters.network.request(fetchPath2, options2);
|
|
46
|
+
await parseResponse(resetPasswordRes);
|
|
47
|
+
}
|
|
48
|
+
async function authOAuthSignin(adapters, baseUrl, provider, popup, afterSigninPopup) {
|
|
49
|
+
const url = urlJoin(baseUrl, "auth/login", provider);
|
|
50
|
+
await adapters.oauthOpener.open(url, { popup, onClose: afterSigninPopup });
|
|
51
|
+
}
|
|
52
|
+
async function authInfo(adapters, baseUrl, signal) {
|
|
53
|
+
const { fetchPath, options } = await buildRequest({ path: urlJoin(baseUrl, "info/"), method: "GET" }, adapters);
|
|
54
|
+
const res = await adapters.network.request(fetchPath, { signal, ...options });
|
|
55
|
+
return await parseResponse(res);
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
authInfo,
|
|
59
|
+
authOAuthSignin,
|
|
60
|
+
authResetPassword,
|
|
61
|
+
authSignin,
|
|
62
|
+
authSignout
|
|
63
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { urlJoin } from "fastapi-rtk/utils";
|
|
2
|
+
import { parseResponse } from "../utils/parseResponse/parseResponse.mjs";
|
|
3
|
+
import { buildRequest } from "../fetchers/request.mjs";
|
|
4
|
+
async function getUser(adapters, baseUrl, signal) {
|
|
5
|
+
const { fetchPath, options } = await buildRequest({ path: urlJoin(baseUrl, "auth/user"), method: "GET" }, adapters);
|
|
6
|
+
const res = await adapters.network.request(fetchPath, { signal, ...options });
|
|
7
|
+
return await parseResponse(res);
|
|
8
|
+
}
|
|
9
|
+
async function updateUser(adapters, baseUrl, userData) {
|
|
10
|
+
const { fetchPath, options } = await buildRequest(
|
|
11
|
+
{ path: urlJoin(baseUrl, "auth/user"), method: "PUT", body: userData },
|
|
12
|
+
adapters
|
|
13
|
+
);
|
|
14
|
+
const res = await adapters.network.request(fetchPath, options);
|
|
15
|
+
return await parseResponse(res);
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
getUser,
|
|
19
|
+
updateUser
|
|
20
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { urlJoin } from "fastapi-rtk/utils";
|
|
2
|
+
import { parseResponse } from "../utils/parseResponse/parseResponse.mjs";
|
|
3
|
+
import { buildRequest } from "./request.mjs";
|
|
4
|
+
const createItem = async (adapters, path, data, options) => {
|
|
5
|
+
const { fetchPath, options: fetchOptions } = await buildRequest(
|
|
6
|
+
{ path: urlJoin(path, "/"), method: "POST", body: data, options },
|
|
7
|
+
adapters
|
|
8
|
+
);
|
|
9
|
+
const response = await adapters.network.request(fetchPath, fetchOptions);
|
|
10
|
+
return await parseResponse(response);
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
createItem
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { urlJoin } from "fastapi-rtk/utils";
|
|
2
|
+
import { parseResponse } from "../utils/parseResponse/parseResponse.mjs";
|
|
3
|
+
import { buildRequest } from "./request.mjs";
|
|
4
|
+
const deleteItem = async (adapters, path, id, options) => {
|
|
5
|
+
const { fetchPath, options: fetchOptions } = await buildRequest(
|
|
6
|
+
{ path: urlJoin(path, id.toString()), method: "DELETE", options },
|
|
7
|
+
adapters
|
|
8
|
+
);
|
|
9
|
+
const response = await adapters.network.request(fetchPath, fetchOptions);
|
|
10
|
+
return await parseResponse(response);
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
deleteItem
|
|
14
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { urlJoin } from "fastapi-rtk/utils";
|
|
2
|
+
import { parseResponse } from "../utils/parseResponse/parseResponse.mjs";
|
|
3
|
+
import { buildRequest } from "./request.mjs";
|
|
4
|
+
const downloadItems = async (adapters, path, queryParams, { label, export_mode, delimiter, quotechar } = {}) => {
|
|
5
|
+
const _queryParams = { ...queryParams, check_validity: true };
|
|
6
|
+
if (label) {
|
|
7
|
+
_queryParams.label = label;
|
|
8
|
+
}
|
|
9
|
+
if (export_mode) {
|
|
10
|
+
_queryParams.export_mode = export_mode;
|
|
11
|
+
}
|
|
12
|
+
if (delimiter) {
|
|
13
|
+
_queryParams.delimiter = delimiter;
|
|
14
|
+
}
|
|
15
|
+
if (quotechar) {
|
|
16
|
+
_queryParams.quotechar = quotechar;
|
|
17
|
+
}
|
|
18
|
+
const { fetchPath: fetchPatchCheck, options: optionsCheck } = await buildRequest(
|
|
19
|
+
{ path: urlJoin(path, "/download"), method: "GET", queryParams: _queryParams },
|
|
20
|
+
adapters
|
|
21
|
+
);
|
|
22
|
+
const response = await adapters.network.request(fetchPatchCheck, optionsCheck);
|
|
23
|
+
await parseResponse(response);
|
|
24
|
+
delete _queryParams.check_validity;
|
|
25
|
+
const { fetchPath, options } = await buildRequest(
|
|
26
|
+
{ path: urlJoin(path, "/download"), method: "GET", queryParams: _queryParams },
|
|
27
|
+
adapters
|
|
28
|
+
);
|
|
29
|
+
await adapters.fileDownload.save({ url: fetchPath, filename: label, headers: options.headers });
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
downloadItems
|
|
33
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { urlJoin } from "fastapi-rtk/utils";
|
|
2
|
+
import { convertToFormData } from "../utils/convertToFormData/convertToFormData.mjs";
|
|
3
|
+
import { parseResponse } from "../utils/parseResponse/parseResponse.mjs";
|
|
4
|
+
import { buildRequest } from "./request.mjs";
|
|
5
|
+
const formCreateItem = async (adapters, path, data, options) => {
|
|
6
|
+
const formData = convertToFormData(data, adapters.formData);
|
|
7
|
+
const { fetchPath, options: fetchOptions } = await buildRequest(
|
|
8
|
+
{ path: urlJoin(path, "/"), method: "POST", options },
|
|
9
|
+
adapters
|
|
10
|
+
);
|
|
11
|
+
delete fetchOptions["headers"]["Content-Type"];
|
|
12
|
+
fetchOptions["body"] = formData;
|
|
13
|
+
const response = await adapters.network.request(fetchPath, fetchOptions);
|
|
14
|
+
return await parseResponse(response);
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
formCreateItem
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { urlJoin } from "fastapi-rtk/utils";
|
|
2
|
+
import { convertToFormData } from "../utils/convertToFormData/convertToFormData.mjs";
|
|
3
|
+
import { parseResponse } from "../utils/parseResponse/parseResponse.mjs";
|
|
4
|
+
import { buildRequest } from "./request.mjs";
|
|
5
|
+
const formUpdateItem = async (adapters, path, id, data, options) => {
|
|
6
|
+
const formData = convertToFormData(data, adapters.formData);
|
|
7
|
+
const { fetchPath, options: fetchOptions } = await buildRequest(
|
|
8
|
+
{ path: urlJoin(path, id.toString()), method: "PUT", options },
|
|
9
|
+
adapters
|
|
10
|
+
);
|
|
11
|
+
delete fetchOptions["headers"]["Content-Type"];
|
|
12
|
+
fetchOptions["body"] = formData;
|
|
13
|
+
const response = await adapters.network.request(fetchPath, fetchOptions);
|
|
14
|
+
return await parseResponse(response);
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
formUpdateItem
|
|
18
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { parseResponse } from "../utils/parseResponse/parseResponse.mjs";
|
|
2
|
+
import { buildRequest } from "./request.mjs";
|
|
3
|
+
const getInfo = async (adapters, path, options) => {
|
|
4
|
+
const { fetchPath, options: fetchOptions } = await buildRequest({ path, method: "GET", options }, adapters);
|
|
5
|
+
const response = await adapters.network.request(fetchPath, fetchOptions);
|
|
6
|
+
return await parseResponse(response);
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
getInfo
|
|
10
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { urlJoin } from "fastapi-rtk/utils";
|
|
2
|
+
import { parseResponse } from "../utils/parseResponse/parseResponse.mjs";
|
|
3
|
+
import { buildRequest } from "./request.mjs";
|
|
4
|
+
const getItem = async (adapters, path, id, options) => {
|
|
5
|
+
const { fetchPath, options: fetchOptions } = await buildRequest(
|
|
6
|
+
{ path: urlJoin(path, id.toString()), method: "GET", options },
|
|
7
|
+
adapters
|
|
8
|
+
);
|
|
9
|
+
const response = await adapters.network.request(fetchPath, fetchOptions);
|
|
10
|
+
return await parseResponse(response);
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
getItem
|
|
14
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { parseResponse } from "../utils/parseResponse/parseResponse.mjs";
|
|
2
|
+
import { buildRequest } from "./request.mjs";
|
|
3
|
+
const getItems = async (adapters, path, queryParams, options) => {
|
|
4
|
+
const { fetchPath, options: fetchOptions } = await buildRequest(
|
|
5
|
+
{ path, method: "GET", queryParams, options },
|
|
6
|
+
adapters
|
|
7
|
+
);
|
|
8
|
+
const response = await adapters.network.request(fetchPath, fetchOptions);
|
|
9
|
+
return await parseResponse(response);
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
getItems
|
|
13
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { urlJoin } from "fastapi-rtk/utils";
|
|
2
|
+
import { parseResponse } from "../utils/parseResponse/parseResponse.mjs";
|
|
3
|
+
import { buildRequest } from "./request.mjs";
|
|
4
|
+
const postBulk = async (adapters, path, handler, data, options) => {
|
|
5
|
+
const { fetchPath, options: fetchOptions } = await buildRequest(
|
|
6
|
+
{ path: urlJoin(path, "/bulk", handler), method: "POST", body: data, options },
|
|
7
|
+
adapters
|
|
8
|
+
);
|
|
9
|
+
const response = await adapters.network.request(fetchPath, fetchOptions);
|
|
10
|
+
return await parseResponse(response);
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
postBulk
|
|
14
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createFetchParams } from "../utils/createFetchParams/createFetchParams.mjs";
|
|
2
|
+
const buildRequest = async (args, adapters) => {
|
|
3
|
+
const { fetchPath, options } = createFetchParams(args);
|
|
4
|
+
const decorated = await adapters.authTransport.decorateRequest(options);
|
|
5
|
+
return { fetchPath, options: decorated };
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
buildRequest
|
|
9
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { urlJoin } from "fastapi-rtk/utils";
|
|
2
|
+
import { parseResponse } from "../utils/parseResponse/parseResponse.mjs";
|
|
3
|
+
import { buildRequest } from "./request.mjs";
|
|
4
|
+
const updateItem = async (adapters, path, id, data, options) => {
|
|
5
|
+
const { fetchPath, options: fetchOptions } = await buildRequest(
|
|
6
|
+
{ path: urlJoin(path, id.toString()), method: "PUT", body: data, options },
|
|
7
|
+
adapters
|
|
8
|
+
);
|
|
9
|
+
const response = await adapters.network.request(fetchPath, fetchOptions);
|
|
10
|
+
return await parseResponse(response);
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
updateItem
|
|
14
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { urlJoin } from "fastapi-rtk/utils";
|
|
2
|
+
import { parseResponse } from "../utils/parseResponse/parseResponse.mjs";
|
|
3
|
+
import { buildRequest } from "./request.mjs";
|
|
4
|
+
const uploadItems = async (adapters, path, file, { delimiter, quotechar } = {}) => {
|
|
5
|
+
const formData = new FormData();
|
|
6
|
+
adapters.formData.appendFile(formData, "file", file);
|
|
7
|
+
const queryParams = {};
|
|
8
|
+
if (delimiter) {
|
|
9
|
+
queryParams.delimiter = delimiter;
|
|
10
|
+
}
|
|
11
|
+
if (quotechar) {
|
|
12
|
+
queryParams.quotechar = quotechar;
|
|
13
|
+
}
|
|
14
|
+
const { fetchPath, options } = await buildRequest(
|
|
15
|
+
{ path: urlJoin(path, "/upload"), method: "POST", queryParams },
|
|
16
|
+
adapters
|
|
17
|
+
);
|
|
18
|
+
delete options.headers["Content-Type"];
|
|
19
|
+
const response = await adapters.network.request(fetchPath, { ...options, body: formData });
|
|
20
|
+
return await parseResponse(response);
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
uploadItems
|
|
24
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useAuthProvider } from "../../
|
|
1
|
+
import { useAuthProvider } from "../../Provider/Contexts/AuthContext.mjs";
|
|
2
2
|
const useAuth = (options) => (
|
|
3
3
|
// #MUSTASSERT the AuthContext is created from an untyped createSafeContext, so the provider hook returns unknown
|
|
4
4
|
useAuthProvider(options)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useInfoProvider } from "../../
|
|
1
|
+
import { useInfoProvider } from "../../Provider/Contexts/InfoContext.mjs";
|
|
2
2
|
const useInfo = (options) => (
|
|
3
3
|
// #MUSTASSERT the InfoContext is created from an untyped createSafeContext, so the provider hook returns unknown
|
|
4
4
|
useInfoProvider(options)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useRef, useEffect } from "react";
|
|
2
|
+
const useDidUpdate = (fn, dependencies) => {
|
|
3
|
+
const mounted = useRef(false);
|
|
4
|
+
useEffect(
|
|
5
|
+
() => () => {
|
|
6
|
+
mounted.current = false;
|
|
7
|
+
},
|
|
8
|
+
[]
|
|
9
|
+
);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
if (mounted.current) {
|
|
12
|
+
return fn();
|
|
13
|
+
}
|
|
14
|
+
mounted.current = true;
|
|
15
|
+
return void 0;
|
|
16
|
+
}, dependencies);
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
useDidUpdate
|
|
20
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { AdaptersProvider, useAdapters, useAdaptersProvider } from "./adapters/AdaptersContext.mjs";
|
|
2
|
+
import { authInfo, authOAuthSignin, authResetPassword, authSignin, authSignout } from "./auth/authFetch.mjs";
|
|
3
|
+
import { getUser, updateUser } from "./auth/userCRUD.mjs";
|
|
4
|
+
import { convertToFormData } from "./utils/convertToFormData/convertToFormData.mjs";
|
|
5
|
+
import { createFetchParams } from "./utils/createFetchParams/createFetchParams.mjs";
|
|
6
|
+
import { parseResponse } from "./utils/parseResponse/parseResponse.mjs";
|
|
7
|
+
import { buildRequest } from "./fetchers/request.mjs";
|
|
8
|
+
import { getItems } from "./fetchers/getItems.mjs";
|
|
9
|
+
import { getItem } from "./fetchers/getItem.mjs";
|
|
10
|
+
import { createItem } from "./fetchers/createItem.mjs";
|
|
11
|
+
import { updateItem } from "./fetchers/updateItem.mjs";
|
|
12
|
+
import { deleteItem } from "./fetchers/deleteItem.mjs";
|
|
13
|
+
import { getInfo } from "./fetchers/getInfo.mjs";
|
|
14
|
+
import { formCreateItem } from "./fetchers/formCreateItem.mjs";
|
|
15
|
+
import { formUpdateItem } from "./fetchers/formUpdateItem.mjs";
|
|
16
|
+
import { uploadItems } from "./fetchers/uploadItems.mjs";
|
|
17
|
+
import { downloadItems } from "./fetchers/downloadItems.mjs";
|
|
18
|
+
import { postBulk } from "./fetchers/postBulkAction.mjs";
|
|
19
|
+
import { Provider, withProvider } from "./Provider/Provider.mjs";
|
|
20
|
+
import { AuthContextProvider, useAuthProvider } from "./Provider/Contexts/AuthContext.mjs";
|
|
21
|
+
import { InfoContextProvider, useInfoProvider } from "./Provider/Contexts/InfoContext.mjs";
|
|
22
|
+
import { ApiProvider, withApiProvider } from "./ApiProvider/ApiProvider.mjs";
|
|
23
|
+
import { BulkActionsContextProvider, useBulkActionsProvider } from "./ApiProvider/Contexts/BulkActionsContext.mjs";
|
|
24
|
+
import { FormContextAddProvider, FormContextDeleteProvider, FormContextEditProvider, FormContextViewProvider, useFormAddProvider, useFormDeleteProvider, useFormEditProvider, useFormViewProvider } from "./ApiProvider/Contexts/FormContext.mjs";
|
|
25
|
+
import { useAuth } from "./hooks/auth/useAuth.mjs";
|
|
26
|
+
import { useInfo } from "./hooks/auth/useInfo.mjs";
|
|
27
|
+
import { useDidUpdate } from "./hooks/useDidUpdate.mjs";
|
|
28
|
+
import * as index from "../../.external/esm/@tanstack_react-query@5.90.20_react@19.2.3/@tanstack/react-query/build/modern/index.mjs";
|
|
29
|
+
export {
|
|
30
|
+
AdaptersProvider,
|
|
31
|
+
ApiProvider,
|
|
32
|
+
AuthContextProvider,
|
|
33
|
+
BulkActionsContextProvider,
|
|
34
|
+
FormContextAddProvider,
|
|
35
|
+
FormContextDeleteProvider,
|
|
36
|
+
FormContextEditProvider,
|
|
37
|
+
FormContextViewProvider,
|
|
38
|
+
InfoContextProvider,
|
|
39
|
+
Provider,
|
|
40
|
+
authInfo,
|
|
41
|
+
authOAuthSignin,
|
|
42
|
+
authResetPassword,
|
|
43
|
+
authSignin,
|
|
44
|
+
authSignout,
|
|
45
|
+
buildRequest,
|
|
46
|
+
convertToFormData,
|
|
47
|
+
createFetchParams,
|
|
48
|
+
createItem,
|
|
49
|
+
deleteItem,
|
|
50
|
+
downloadItems,
|
|
51
|
+
formCreateItem,
|
|
52
|
+
formUpdateItem,
|
|
53
|
+
getInfo,
|
|
54
|
+
getItem,
|
|
55
|
+
getItems,
|
|
56
|
+
getUser,
|
|
57
|
+
parseResponse,
|
|
58
|
+
postBulk,
|
|
59
|
+
index as rq,
|
|
60
|
+
updateItem,
|
|
61
|
+
updateUser,
|
|
62
|
+
uploadItems,
|
|
63
|
+
useAdapters,
|
|
64
|
+
useAdaptersProvider,
|
|
65
|
+
useAuth,
|
|
66
|
+
useAuthProvider,
|
|
67
|
+
useBulkActionsProvider,
|
|
68
|
+
useDidUpdate,
|
|
69
|
+
useFormAddProvider,
|
|
70
|
+
useFormDeleteProvider,
|
|
71
|
+
useFormEditProvider,
|
|
72
|
+
useFormViewProvider,
|
|
73
|
+
useInfo,
|
|
74
|
+
useInfoProvider,
|
|
75
|
+
withApiProvider,
|
|
76
|
+
withProvider
|
|
77
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const convertToFormData = (data) => {
|
|
1
|
+
const convertToFormData = (data, formDataAdapter) => {
|
|
2
2
|
const formData = new FormData();
|
|
3
3
|
Object.entries(data).forEach(([key, value]) => {
|
|
4
4
|
if (value === void 0) {
|
|
@@ -9,17 +9,17 @@ const convertToFormData = (data) => {
|
|
|
9
9
|
formData.append(key, null);
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
|
-
const files = value.filter((item) => item
|
|
13
|
-
const stringValues = value.filter((item) => !(item
|
|
12
|
+
const files = value.filter((item) => formDataAdapter.isFilePart(item));
|
|
13
|
+
const stringValues = value.filter((item) => !formDataAdapter.isFilePart(item));
|
|
14
14
|
files.forEach((file) => {
|
|
15
|
-
|
|
15
|
+
formDataAdapter.appendFile(formData, key, file);
|
|
16
16
|
});
|
|
17
17
|
stringValues.forEach((file) => {
|
|
18
18
|
formData.append(key, file);
|
|
19
19
|
});
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
|
-
if (value && typeof value === "object" && !(value
|
|
22
|
+
if (value && typeof value === "object" && !formDataAdapter.isFilePart(value)) {
|
|
23
23
|
formData.append(key, JSON.stringify(value));
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createSearchParams } from "react-router";
|
|
2
1
|
function createFetchParams(args) {
|
|
3
2
|
const { method, body, queryParams, options: userOptions } = args;
|
|
4
3
|
let path = args.path;
|
|
@@ -9,7 +8,7 @@ function createFetchParams(args) {
|
|
|
9
8
|
acc[key] = String(value);
|
|
10
9
|
return acc;
|
|
11
10
|
}, {});
|
|
12
|
-
const searchParams =
|
|
11
|
+
const searchParams = new URLSearchParams(data);
|
|
13
12
|
if (searchParams.size > 0) {
|
|
14
13
|
path = path + "?" + searchParams;
|
|
15
14
|
}
|
|
@@ -17,7 +16,6 @@ function createFetchParams(args) {
|
|
|
17
16
|
// #MUSTANNOTATE string literals like 'include' widen to string without the annotation; indexed-access type constrains them
|
|
18
17
|
method,
|
|
19
18
|
mode: "cors",
|
|
20
|
-
credentials: "include",
|
|
21
19
|
redirect: "follow",
|
|
22
20
|
referrerPolicy: "no-referrer",
|
|
23
21
|
body: body ? JSON.stringify(body) : null,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { ApiProviderProps, WithApiProviderOptions } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Provides the API context, bulk actions context, and form contexts to its children.
|
|
5
|
+
*/
|
|
6
|
+
export declare function ApiProvider<TQuery extends object = object>(props: ApiProviderProps<TQuery>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
/**
|
|
8
|
+
* Higher-order component to wrap a component with ApiProvider.
|
|
9
|
+
*
|
|
10
|
+
* @param apiProviderProps - The props to be passed to the ApiProvider or a function that returns them.
|
|
11
|
+
* @param Component - The component to be wrapped.
|
|
12
|
+
* @param options - Additional options for the HOC.
|
|
13
|
+
* @returns The wrapped component.
|
|
14
|
+
*/
|
|
15
|
+
export declare const withApiProvider: <P extends object>(apiProviderProps: ApiProviderProps | ((props: P) => ApiProviderProps), Component: ComponentType<P>, options?: WithApiProviderOptions) => ComponentType<P> & {
|
|
16
|
+
displayName?: string;
|
|
17
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BulkActionsContextValue } from '
|
|
1
|
+
import { BulkActionsContextValue } from '../hooks/types';
|
|
2
2
|
export declare const BulkActionsContextProvider: import('react').Provider<BulkActionsContextValue | null>, useBulkActionsProvider: (options?: import('fastapi-rtk/utils').SafeContextOptions<BulkActionsContextValue>) => BulkActionsContextValue;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FormsContextValue } from '../hooks/types';
|
|
2
|
+
export declare const FormContextViewProvider: import('react').Provider<FormsContextValue<import('fastapi-rtk/api-types').ResultRow> | null>, useFormViewProvider: (options?: import('fastapi-rtk/utils').SafeContextOptions<FormsContextValue<import('fastapi-rtk/api-types').ResultRow>>) => FormsContextValue<import('fastapi-rtk/api-types').ResultRow>;
|
|
3
|
+
export declare const FormContextAddProvider: import('react').Provider<FormsContextValue<import('fastapi-rtk/api-types').ResultRow> | null>, useFormAddProvider: (options?: import('fastapi-rtk/utils').SafeContextOptions<FormsContextValue<import('fastapi-rtk/api-types').ResultRow>>) => FormsContextValue<import('fastapi-rtk/api-types').ResultRow>;
|
|
4
|
+
export declare const FormContextEditProvider: import('react').Provider<FormsContextValue<import('fastapi-rtk/api-types').ResultRow> | null>, useFormEditProvider: (options?: import('fastapi-rtk/utils').SafeContextOptions<FormsContextValue<import('fastapi-rtk/api-types').ResultRow>>) => FormsContextValue<import('fastapi-rtk/api-types').ResultRow>;
|
|
5
|
+
export declare const FormContextDeleteProvider: import('react').Provider<FormsContextValue<import('fastapi-rtk/api-types').ResultRow> | null>, useFormDeleteProvider: (options?: import('fastapi-rtk/utils').SafeContextOptions<FormsContextValue<import('fastapi-rtk/api-types').ResultRow>>) => FormsContextValue<import('fastapi-rtk/api-types').ResultRow>;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { convertId } from 'fastapi-rtk/utils';
|
|
2
|
+
import { EntryRow } from 'fastapi-rtk/contexts';
|
|
3
|
+
import { InfiniteData, QueryKey, UseInfiniteQueryOptions, UseInfiniteQueryResult, UseQueryOptions, UseQueryResult } from '../../../../.external/lib/@tanstack/react-query';
|
|
4
|
+
import { RefObject } from 'react';
|
|
5
|
+
import { Adapters } from '../../adapters/types';
|
|
6
|
+
import { createItem } from '../../fetchers/createItem';
|
|
7
|
+
import { deleteItem } from '../../fetchers/deleteItem';
|
|
8
|
+
import { downloadItems } from '../../fetchers/downloadItems';
|
|
9
|
+
import { formCreateItem } from '../../fetchers/formCreateItem';
|
|
10
|
+
import { formUpdateItem } from '../../fetchers/formUpdateItem';
|
|
11
|
+
import { getInfo } from '../../fetchers/getInfo';
|
|
12
|
+
import { getItem } from '../../fetchers/getItem';
|
|
13
|
+
import { getItems } from '../../fetchers/getItems';
|
|
14
|
+
import { updateItem } from '../../fetchers/updateItem';
|
|
15
|
+
import { uploadItems } from '../../fetchers/uploadItems';
|
|
16
|
+
import { postBulk } from '../../fetchers/postBulkAction';
|
|
17
|
+
import { BulkActionResponse } from '../../fetchers/bulkActions.types';
|
|
18
|
+
import { DataPage, PrimaryKey, StreamingPage, ValidationError } from 'fastapi-rtk/api-types';
|
|
19
|
+
import { CoreConvertedInfo, QueryParams } from '../utils/types';
|
|
20
|
+
export type { DataPage, StreamingPage };
|
|
21
|
+
/** An entry identifier as accepted by the action functions before conversion. */
|
|
22
|
+
export type EntryId = Parameters<typeof convertId>[0];
|
|
23
|
+
/** The converted `/_info` data as held by the info query, tagged with the resource path. */
|
|
24
|
+
export type InfoQueryData = CoreConvertedInfo & {
|
|
25
|
+
path: string;
|
|
26
|
+
};
|
|
27
|
+
/** The set of API functions the provider hooks dispatch through. */
|
|
28
|
+
export interface ApiFunctions {
|
|
29
|
+
getItem: typeof getItem;
|
|
30
|
+
getItems: typeof getItems;
|
|
31
|
+
createItem: typeof createItem;
|
|
32
|
+
updateItem: typeof updateItem;
|
|
33
|
+
deleteItem: typeof deleteItem;
|
|
34
|
+
downloadItems: typeof downloadItems;
|
|
35
|
+
uploadItems: typeof uploadItems;
|
|
36
|
+
getInfo: typeof getInfo;
|
|
37
|
+
formCreateItem: typeof formCreateItem;
|
|
38
|
+
formUpdateItem: typeof formUpdateItem;
|
|
39
|
+
}
|
|
40
|
+
/** The set of bulk-action functions the bulk provider dispatches through. */
|
|
41
|
+
export interface BulkFunctions {
|
|
42
|
+
postBulk: typeof postBulk;
|
|
43
|
+
}
|
|
44
|
+
/** A relation reference seeded into the query filters by the provider. */
|
|
45
|
+
export interface RelationParam {
|
|
46
|
+
foreign_key?: string;
|
|
47
|
+
type?: string;
|
|
48
|
+
id?: PrimaryKey | null;
|
|
49
|
+
id_?: PrimaryKey | null;
|
|
50
|
+
}
|
|
51
|
+
/** The arguments accepted by `useApiActions`. */
|
|
52
|
+
export interface UseApiActionsParams {
|
|
53
|
+
api: ApiFunctions;
|
|
54
|
+
adapters: Adapters;
|
|
55
|
+
path: string;
|
|
56
|
+
pathRef: RefObject<string>;
|
|
57
|
+
infoRef: RefObject<InfoQueryData | undefined>;
|
|
58
|
+
queryParamsRef: RefObject<QueryParams | null>;
|
|
59
|
+
currentLanguage: string;
|
|
60
|
+
}
|
|
61
|
+
/** The options accepted by the provider's download action. */
|
|
62
|
+
export interface DownloadActionOptions {
|
|
63
|
+
export_mode?: string;
|
|
64
|
+
delimiter?: string;
|
|
65
|
+
quotechar?: string;
|
|
66
|
+
}
|
|
67
|
+
/** The options accepted by the provider's upload action. */
|
|
68
|
+
export interface UploadActionOptions {
|
|
69
|
+
delimiter?: string;
|
|
70
|
+
quotechar?: string;
|
|
71
|
+
}
|
|
72
|
+
/** The arguments accepted by `useStreamingData`. */
|
|
73
|
+
export interface UseStreamingDataParams {
|
|
74
|
+
streamingMode: boolean;
|
|
75
|
+
dataQuery: UseQueryResult<DataPage | null>;
|
|
76
|
+
streamingQuery: UseInfiniteQueryResult<InfiniteData<StreamingPage | null>>;
|
|
77
|
+
streamingQueryKey: QueryKey;
|
|
78
|
+
}
|
|
79
|
+
/** The configuration object accepted by `useProvideApi`. */
|
|
80
|
+
export interface UseProvideApiParams {
|
|
81
|
+
path: string;
|
|
82
|
+
initialQueryParams?: QueryParams;
|
|
83
|
+
relation?: RelationParam;
|
|
84
|
+
fetchInfo?: boolean;
|
|
85
|
+
clearInfoOnRefetch?: boolean;
|
|
86
|
+
clearDataOnRefetch?: boolean;
|
|
87
|
+
refetchInfoBasedOnLang?: boolean;
|
|
88
|
+
refetchDataBasedOnLang?: boolean;
|
|
89
|
+
resetQueryParamsOnPathChange?: boolean;
|
|
90
|
+
infoQueryProps?: Partial<UseQueryOptions<InfoQueryData>>;
|
|
91
|
+
dataQueryProps?: Partial<UseQueryOptions<DataPage | null>>;
|
|
92
|
+
streamingQueryProps?: Partial<UseInfiniteQueryOptions<StreamingPage | null, Error, InfiniteData<StreamingPage | null>, QueryKey, number>>;
|
|
93
|
+
streaming?: boolean;
|
|
94
|
+
}
|
|
95
|
+
export interface BulkActions {
|
|
96
|
+
/** An array of currently selected IDs for bulk actions. */
|
|
97
|
+
selectedIds: Array<string | number>;
|
|
98
|
+
/** A function to set the selected IDs. */
|
|
99
|
+
setSelectedIds: (ids: Array<string | number>) => void;
|
|
100
|
+
}
|
|
101
|
+
export interface BulkActionsContextValue {
|
|
102
|
+
/** An object containing the selected IDs and a function to set them. */
|
|
103
|
+
bulkActions: BulkActions;
|
|
104
|
+
/**
|
|
105
|
+
* Dispatches a bulk action; falls back to the currently selected IDs when `data` is omitted.
|
|
106
|
+
* Resolves to `undefined` when the action throws (the error is surfaced via `error`).
|
|
107
|
+
*/
|
|
108
|
+
dispatchBulkActions: (handler: string, data?: Array<string | number>) => Promise<BulkActionResponse | undefined>;
|
|
109
|
+
/** An error object if the bulk action failed. */
|
|
110
|
+
error?: {
|
|
111
|
+
message: string;
|
|
112
|
+
originalError: Error;
|
|
113
|
+
};
|
|
114
|
+
/** A function to reset the error state. */
|
|
115
|
+
resetError: () => void;
|
|
116
|
+
}
|
|
117
|
+
export type FormType = 'view' | 'add' | 'edit' | 'delete';
|
|
118
|
+
export type FormViewMode = 'normal' | 'fullScreen' | 'overlay';
|
|
119
|
+
export interface FormState {
|
|
120
|
+
errors: ValidationError[];
|
|
121
|
+
data: EntryRow | undefined;
|
|
122
|
+
}
|
|
123
|
+
export interface FormsContextValue<TItem = EntryRow> {
|
|
124
|
+
/** Indicates whether the form is currently opened. */
|
|
125
|
+
opened: boolean;
|
|
126
|
+
/** A function to get the current opened state of the form. */
|
|
127
|
+
getOpened: () => boolean;
|
|
128
|
+
/** A function to set the opened state of the form. */
|
|
129
|
+
setOpened: (newOpened: boolean) => void;
|
|
130
|
+
/** The current view mode of the form. See `VIEW_MODE` from `@fastapi-rtk/constants` for more details. */
|
|
131
|
+
view: FormViewMode;
|
|
132
|
+
/** A function to get the current view mode of the form. */
|
|
133
|
+
getView: () => FormViewMode;
|
|
134
|
+
/** A function to set the view mode of the form. */
|
|
135
|
+
setView: (newView: FormViewMode) => void;
|
|
136
|
+
/** The current state of the form, including errors and data. */
|
|
137
|
+
state: FormState;
|
|
138
|
+
/** A function to get the current state of the form. */
|
|
139
|
+
getState: () => FormState;
|
|
140
|
+
/** A function to set the state of the form. */
|
|
141
|
+
setState: (newState: FormState) => void;
|
|
142
|
+
/** A function to reset the form state to its initial state. */
|
|
143
|
+
reset: () => void;
|
|
144
|
+
/** The current item being edited in the form, if applicable. */
|
|
145
|
+
item: TItem | undefined;
|
|
146
|
+
/** A function to get the current item in the form. */
|
|
147
|
+
getItem: () => TItem | undefined;
|
|
148
|
+
/** A function to set the current item in the form. */
|
|
149
|
+
setItem: (newItem: TItem | undefined) => void;
|
|
150
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BulkActionsContextValue, BulkFunctions } from './types';
|
|
2
|
+
export declare const defaultBulk: {
|
|
3
|
+
postBulk: (adapters: import('../..').Adapters, path: string, handler: string, data: import('../..').BulkActionPayload, options?: import('../..').FetchOptions) => Promise<import('../..').BulkActionResponse>;
|
|
4
|
+
};
|
|
5
|
+
export declare const useProvideBulk: (params: {
|
|
6
|
+
path: string;
|
|
7
|
+
}, bulk?: BulkFunctions) => BulkActionsContextValue;
|