fastapi-rtk 0.1.35 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.bundled/jsonforms/cjs/index.cjs +10 -2
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineDateTimeInput.cjs +8 -2
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineFileInput.cjs +33 -0
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineImageInput.cjs +21 -0
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineJsonInput.cjs +1 -1
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineTimeInput.cjs +21 -0
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/cells/MantineFileCell.cjs +11 -0
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/cells/MantineImageCell.cjs +11 -0
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/cells/MantineTimeCell.cjs +10 -0
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/controls/MantineDateControl.cjs +1 -1
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/controls/MantineDateTimeControl.cjs +1 -1
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/controls/MantineFileControl.cjs +12 -0
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/controls/MantineImageControl.cjs +12 -0
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/controls/MantineTimeControl.cjs +11 -0
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/hooks/useDateProps.cjs +12 -21
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/hooks/useFileProps.cjs +19 -0
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/hooks/useTimeProps.cjs +6 -0
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/renderers/mantineCells.cjs +13 -5
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/renderers/mantineRenderers.cjs +11 -5
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/testers/isFileControl.cjs +20 -0
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/testers/isImageControl.cjs +16 -0
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/utils/utcConverter.cjs +4 -9
- package/dist/.bundled/jsonforms/esm/index.mjs +12 -4
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineDateTimeInput.mjs +9 -3
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineFileInput.mjs +33 -0
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineImageInput.mjs +21 -0
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineJsonInput.mjs +1 -1
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineTimeInput.mjs +21 -0
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/cells/MantineFileCell.mjs +11 -0
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/cells/MantineImageCell.mjs +11 -0
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/cells/MantineTimeCell.mjs +10 -0
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/controls/MantineDateControl.mjs +1 -1
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/controls/MantineDateTimeControl.mjs +1 -1
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/controls/MantineFileControl.mjs +12 -0
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/controls/MantineImageControl.mjs +12 -0
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/controls/MantineTimeControl.mjs +11 -0
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/hooks/useDateProps.mjs +13 -22
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/hooks/useFileProps.mjs +19 -0
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/hooks/useTimeProps.mjs +6 -0
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/renderers/mantineCells.mjs +13 -5
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/renderers/mantineRenderers.mjs +11 -5
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/testers/isFileControl.mjs +20 -0
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/testers/isImageControl.mjs +16 -0
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/utils/utcConverter.mjs +4 -9
- package/dist/.external/cjs/@jsonforms_core@3.6.0/@jsonforms/core/lib/jsonforms-core.esm.cjs +2 -1
- package/dist/.external/cjs/{@tanstack_react-query@5.81.2_react@18.3.1 → @tanstack_react-query@5.81.5_react@18.3.1}/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs +1 -1
- package/dist/.external/cjs/{@tanstack_react-query@5.81.2_react@18.3.1 → @tanstack_react-query@5.81.5_react@18.3.1}/@tanstack/react-query/build/modern/useBaseQuery.cjs +2 -2
- package/dist/.external/cjs/{@tanstack_react-query@5.81.2_react@18.3.1 → @tanstack_react-query@5.81.5_react@18.3.1}/@tanstack/react-query/build/modern/useQuery.cjs +1 -1
- package/dist/.external/esm/@jsonforms_core@3.6.0/@jsonforms/core/lib/jsonforms-core.esm.mjs +2 -1
- package/dist/.external/esm/{@tanstack_react-query@5.81.2_react@18.3.1 → @tanstack_react-query@5.81.5_react@18.3.1}/@tanstack/react-query/build/modern/errorBoundaryUtils.mjs +1 -1
- package/dist/.external/esm/{@tanstack_react-query@5.81.2_react@18.3.1 → @tanstack_react-query@5.81.5_react@18.3.1}/@tanstack/react-query/build/modern/useBaseQuery.mjs +2 -2
- package/dist/.external/esm/{@tanstack_react-query@5.81.2_react@18.3.1 → @tanstack_react-query@5.81.5_react@18.3.1}/@tanstack/react-query/build/modern/useQuery.mjs +1 -1
- package/dist/core/cjs/ActionIcons/utils/convertToFormInputs.cjs +6 -8
- package/dist/core/cjs/Tables/DataGrid/FormField/Inputs/FormDatePicker.cjs +1 -14
- package/dist/core/cjs/Tables/DataGrid/FormField/Inputs/FormDateTimePicker.cjs +1 -14
- package/dist/core/cjs/Tables/DataGrid/Toolbar/Filter/FilterMenu.cjs +1 -1
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilter.cjs +4 -0
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilterInput/ColumnHeaderFilterInput.cjs +42 -15
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilterInput/HeaderInputs/HeaderDateInput.cjs +1 -1
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/useColumns.cjs +4 -0
- package/dist/core/cjs/Wrappers/ApiProvider/Contexts/ApiContext.cjs +1 -1
- package/dist/core/cjs/Wrappers/ApiProvider/hooks/useProvideApi.cjs +14 -4
- package/dist/core/cjs/Wrappers/ApiProvider/hooks/useProvideForm.cjs +1 -1
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/formCreateItem.cjs +19 -0
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/formUpdateItem.cjs +19 -0
- package/dist/core/cjs/Wrappers/ApiProvider/utils/api/utils/convertToFormData.cjs +32 -0
- package/dist/core/cjs/Wrappers/Provider/Provider.cjs +2 -2
- package/dist/core/cjs/Wrappers/Provider/hooks/useProvideAuth.cjs +2 -2
- package/dist/core/cjs/Wrappers/Provider/hooks/useProvideInfo.cjs +1 -1
- package/dist/core/cjs/fab-react-toolkit-patch/api/hooks/useProvideApi.cjs +2 -2
- package/dist/core/cjs/fab-react-toolkit-patch/auth/hooks/useProvideAuth.cjs +2 -2
- package/dist/core/cjs/fab-react-toolkit-patch/auth/hooks/useProvideInfo.cjs +1 -1
- package/dist/core/cjs/index.cjs +8 -0
- package/dist/core/esm/ActionIcons/utils/convertToFormInputs.mjs +6 -8
- package/dist/core/esm/Tables/DataGrid/FormField/Inputs/FormDatePicker.mjs +1 -14
- package/dist/core/esm/Tables/DataGrid/FormField/Inputs/FormDateTimePicker.mjs +1 -14
- package/dist/core/esm/Tables/DataGrid/Toolbar/Filter/FilterMenu.mjs +1 -1
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilter.mjs +4 -0
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilterInput/ColumnHeaderFilterInput.mjs +42 -15
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilterInput/HeaderInputs/HeaderDateInput.mjs +1 -1
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/useColumns.mjs +4 -0
- package/dist/core/esm/Wrappers/ApiProvider/Contexts/ApiContext.mjs +1 -1
- package/dist/core/esm/Wrappers/ApiProvider/hooks/useProvideApi.mjs +14 -4
- package/dist/core/esm/Wrappers/ApiProvider/hooks/useProvideForm.mjs +1 -1
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/formCreateItem.mjs +19 -0
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/formUpdateItem.mjs +19 -0
- package/dist/core/esm/Wrappers/ApiProvider/utils/api/utils/convertToFormData.mjs +32 -0
- package/dist/core/esm/Wrappers/Provider/Provider.mjs +2 -2
- package/dist/core/esm/Wrappers/Provider/hooks/useProvideAuth.mjs +2 -2
- package/dist/core/esm/Wrappers/Provider/hooks/useProvideInfo.mjs +1 -1
- package/dist/core/esm/fab-react-toolkit-patch/api/hooks/useProvideApi.mjs +2 -2
- package/dist/core/esm/fab-react-toolkit-patch/auth/hooks/useProvideAuth.mjs +2 -2
- package/dist/core/esm/fab-react-toolkit-patch/auth/hooks/useProvideInfo.mjs +1 -1
- package/dist/core/esm/index.mjs +8 -0
- package/dist/core/lib/Tables/NextGenDataGrid/NextGenDataGrid.d.ts +8 -0
- package/dist/core/lib/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilter.d.ts +3 -1
- package/dist/core/lib/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilterInput/ColumnHeaderFilterInput.d.ts +3 -1
- package/dist/core/lib/Wrappers/ApiProvider/Contexts/ApiContext.d.ts +3 -3
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/formCreateItem.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/formUpdateItem.d.ts +1 -0
- package/dist/core/lib/Wrappers/ApiProvider/utils/api/utils/convertToFormData.d.ts +1 -0
- package/dist/core/lib/hooks/api/useApi.d.ts +2 -2
- package/dist/core/lib/index.d.ts +4 -0
- package/dist/jsonforms/cjs/MantineInputs/MantineDateTimeInput.cjs +8 -2
- package/dist/jsonforms/cjs/MantineInputs/MantineFileInput.cjs +33 -0
- package/dist/jsonforms/cjs/MantineInputs/MantineImageInput.cjs +21 -0
- package/dist/jsonforms/cjs/MantineInputs/MantineJsonInput.cjs +1 -1
- package/dist/jsonforms/cjs/MantineInputs/MantineTimeInput.cjs +21 -0
- package/dist/jsonforms/cjs/cells/MantineFileCell.cjs +11 -0
- package/dist/jsonforms/cjs/cells/MantineImageCell.cjs +11 -0
- package/dist/jsonforms/cjs/cells/MantineTimeCell.cjs +10 -0
- package/dist/jsonforms/cjs/controls/MantineDateControl.cjs +1 -1
- package/dist/jsonforms/cjs/controls/MantineDateTimeControl.cjs +1 -1
- package/dist/jsonforms/cjs/controls/MantineFileControl.cjs +12 -0
- package/dist/jsonforms/cjs/controls/MantineImageControl.cjs +12 -0
- package/dist/jsonforms/cjs/controls/MantineTimeControl.cjs +11 -0
- package/dist/jsonforms/cjs/hooks/useDateProps.cjs +12 -21
- package/dist/jsonforms/cjs/hooks/useFileProps.cjs +19 -0
- package/dist/jsonforms/cjs/hooks/useTimeProps.cjs +6 -0
- package/dist/jsonforms/cjs/index.cjs +10 -2
- package/dist/jsonforms/cjs/renderers/mantineCells.cjs +13 -5
- package/dist/jsonforms/cjs/renderers/mantineRenderers.cjs +11 -5
- package/dist/jsonforms/cjs/testers/isFileControl.cjs +20 -0
- package/dist/jsonforms/cjs/testers/isImageControl.cjs +16 -0
- package/dist/jsonforms/cjs/utils/utcConverter.cjs +4 -9
- package/dist/jsonforms/esm/MantineInputs/MantineDateTimeInput.mjs +9 -3
- package/dist/jsonforms/esm/MantineInputs/MantineFileInput.mjs +33 -0
- package/dist/jsonforms/esm/MantineInputs/MantineImageInput.mjs +21 -0
- package/dist/jsonforms/esm/MantineInputs/MantineJsonInput.mjs +1 -1
- package/dist/jsonforms/esm/MantineInputs/MantineTimeInput.mjs +21 -0
- package/dist/jsonforms/esm/cells/MantineFileCell.mjs +11 -0
- package/dist/jsonforms/esm/cells/MantineImageCell.mjs +11 -0
- package/dist/jsonforms/esm/cells/MantineTimeCell.mjs +10 -0
- package/dist/jsonforms/esm/controls/MantineDateControl.mjs +1 -1
- package/dist/jsonforms/esm/controls/MantineDateTimeControl.mjs +1 -1
- package/dist/jsonforms/esm/controls/MantineFileControl.mjs +12 -0
- package/dist/jsonforms/esm/controls/MantineImageControl.mjs +12 -0
- package/dist/jsonforms/esm/controls/MantineTimeControl.mjs +11 -0
- package/dist/jsonforms/esm/hooks/useDateProps.mjs +13 -22
- package/dist/jsonforms/esm/hooks/useFileProps.mjs +19 -0
- package/dist/jsonforms/esm/hooks/useTimeProps.mjs +6 -0
- package/dist/jsonforms/esm/index.mjs +12 -4
- package/dist/jsonforms/esm/renderers/mantineCells.mjs +13 -5
- package/dist/jsonforms/esm/renderers/mantineRenderers.mjs +11 -5
- package/dist/jsonforms/esm/testers/isFileControl.mjs +20 -0
- package/dist/jsonforms/esm/testers/isImageControl.mjs +16 -0
- package/dist/jsonforms/esm/utils/utcConverter.mjs +4 -9
- package/dist/jsonforms/lib/MantineInputs/MantineFileInput.d.ts +10 -0
- package/dist/jsonforms/lib/MantineInputs/MantineImageInput.d.ts +4 -0
- package/dist/jsonforms/lib/MantineInputs/MantineTimeInput.d.ts +4 -0
- package/dist/jsonforms/lib/cells/MantineFileCell.d.ts +2 -0
- package/dist/jsonforms/lib/cells/MantineImageCell.d.ts +2 -0
- package/dist/jsonforms/lib/cells/MantineTimeCell.d.ts +2 -0
- package/dist/jsonforms/lib/controls/MantineFileControl.d.ts +2 -0
- package/dist/jsonforms/lib/controls/MantineImageControl.d.ts +2 -0
- package/dist/jsonforms/lib/controls/MantineTimeControl.d.ts +2 -0
- package/dist/jsonforms/lib/hooks/useDateProps.d.ts +2 -5
- package/dist/jsonforms/lib/hooks/useFileProps.d.ts +22 -0
- package/dist/jsonforms/lib/hooks/useTimeProps.d.ts +14 -0
- package/dist/jsonforms/lib/index.d.ts +5 -1
- package/dist/jsonforms/lib/testers/isFileControl.d.ts +14 -0
- package/dist/jsonforms/lib/testers/isImageControl.d.ts +13 -0
- package/dist/jsonforms/lib/utils/utcConverter.d.ts +2 -25
- package/dist/zustand/cjs/useProxy/useProxy.cjs +1 -1
- package/dist/zustand/esm/useProxy/useProxy.mjs +1 -1
- package/package.json +9 -9
- /package/dist/.external/cjs/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/focusManager.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/mutation.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/mutationCache.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/notifyManager.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/onlineManager.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/query.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/queryCache.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/queryClient.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/queryObserver.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/removable.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/retryer.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/subscribable.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/thenable.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/utils.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_react-query@5.81.2_react@18.3.1 → @tanstack_react-query@5.81.5_react@18.3.1}/@tanstack/react-query/build/modern/IsRestoringProvider.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_react-query@5.81.2_react@18.3.1 → @tanstack_react-query@5.81.5_react@18.3.1}/@tanstack/react-query/build/modern/QueryClientProvider.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_react-query@5.81.2_react@18.3.1 → @tanstack_react-query@5.81.5_react@18.3.1}/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_react-query@5.81.2_react@18.3.1 → @tanstack_react-query@5.81.5_react@18.3.1}/@tanstack/react-query/build/modern/suspense.cjs +0 -0
- /package/dist/.external/cjs/{mantine-form-yup-resolver@2.0.0_@mantine_form@7.17.8_yup@1.6.1 → mantine-form-yup-resolver@2.0.0_@mantine_form@8.1.3_yup@1.6.1}/mantine-form-yup-resolver/dist/esm/index.cjs +0 -0
- /package/dist/.external/cjs/{zustand@5.0.5_@types_react@18.3.23_react@18.3.1 → zustand@5.0.6_@types_react@18.3.23_react@18.3.1}/zustand/esm/react.cjs +0 -0
- /package/dist/.external/cjs/{zustand@5.0.5_@types_react@18.3.23_react@18.3.1 → zustand@5.0.6_@types_react@18.3.23_react@18.3.1}/zustand/esm/vanilla.cjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/focusManager.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/infiniteQueryBehavior.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/mutation.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/mutationCache.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/notifyManager.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/onlineManager.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/query.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/queryCache.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/queryClient.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/queryObserver.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/removable.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/retryer.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/subscribable.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/thenable.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.81.2 → @tanstack_query-core@5.81.5}/@tanstack/query-core/build/modern/utils.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_react-query@5.81.2_react@18.3.1 → @tanstack_react-query@5.81.5_react@18.3.1}/@tanstack/react-query/build/modern/IsRestoringProvider.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_react-query@5.81.2_react@18.3.1 → @tanstack_react-query@5.81.5_react@18.3.1}/@tanstack/react-query/build/modern/QueryClientProvider.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_react-query@5.81.2_react@18.3.1 → @tanstack_react-query@5.81.5_react@18.3.1}/@tanstack/react-query/build/modern/QueryErrorResetBoundary.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_react-query@5.81.2_react@18.3.1 → @tanstack_react-query@5.81.5_react@18.3.1}/@tanstack/react-query/build/modern/suspense.mjs +0 -0
- /package/dist/.external/esm/{mantine-form-yup-resolver@2.0.0_@mantine_form@7.17.8_yup@1.6.1 → mantine-form-yup-resolver@2.0.0_@mantine_form@8.1.3_yup@1.6.1}/mantine-form-yup-resolver/dist/esm/index.mjs +0 -0
- /package/dist/.external/esm/{zustand@5.0.5_@types_react@18.3.23_react@18.3.1 → zustand@5.0.6_@types_react@18.3.23_react@18.3.1}/zustand/esm/react.mjs +0 -0
- /package/dist/.external/esm/{zustand@5.0.5_@types_react@18.3.23_react@18.3.1 → zustand@5.0.6_@types_react@18.3.23_react@18.3.1}/zustand/esm/vanilla.mjs +0 -0
|
@@ -7,14 +7,18 @@ const useBooleanProps = require("./packages/jsonforms/src/hooks/useBooleanProps.
|
|
|
7
7
|
const useCommonProps = require("./packages/jsonforms/src/hooks/useCommonProps.cjs");
|
|
8
8
|
const useContextProps = require("./packages/jsonforms/src/hooks/useContextProps.cjs");
|
|
9
9
|
const useDateProps = require("./packages/jsonforms/src/hooks/useDateProps.cjs");
|
|
10
|
+
const useFileProps = require("./packages/jsonforms/src/hooks/useFileProps.cjs");
|
|
10
11
|
const useJsonProps = require("./packages/jsonforms/src/hooks/useJsonProps.cjs");
|
|
11
12
|
const useMultiSelectProps = require("./packages/jsonforms/src/hooks/useMultiSelectProps.cjs");
|
|
12
13
|
const useNumberProps = require("./packages/jsonforms/src/hooks/useNumberProps.cjs");
|
|
13
14
|
const useSelectProps = require("./packages/jsonforms/src/hooks/useSelectProps.cjs");
|
|
14
15
|
const useTextProps = require("./packages/jsonforms/src/hooks/useTextProps.cjs");
|
|
15
16
|
const useThemeCustomizer = require("./packages/jsonforms/src/hooks/useThemeCustomizer.cjs");
|
|
17
|
+
const useTimeProps = require("./packages/jsonforms/src/hooks/useTimeProps.cjs");
|
|
16
18
|
const isEnumArrayArrayControl = require("./packages/jsonforms/src/testers/isEnumArrayArrayControl.cjs");
|
|
17
19
|
const isEnumArrayControl = require("./packages/jsonforms/src/testers/isEnumArrayControl.cjs");
|
|
20
|
+
const isFileControl = require("./packages/jsonforms/src/testers/isFileControl.cjs");
|
|
21
|
+
const isImageControl = require("./packages/jsonforms/src/testers/isImageControl.cjs");
|
|
18
22
|
const isJsonArrayControl = require("./packages/jsonforms/src/testers/isJsonArrayControl.cjs");
|
|
19
23
|
const isJsonControl = require("./packages/jsonforms/src/testers/isJsonControl.cjs");
|
|
20
24
|
const isSchemaTypeInclude = require("./packages/jsonforms/src/utils/isSchemaTypeInclude.cjs");
|
|
@@ -26,16 +30,20 @@ exports.useBooleanProps = useBooleanProps.useBooleanProps;
|
|
|
26
30
|
exports.useCommonProps = useCommonProps.useCommonProps;
|
|
27
31
|
exports.useContextProps = useContextProps.useContextProps;
|
|
28
32
|
exports.useDateProps = useDateProps.useDateProps;
|
|
33
|
+
exports.useFileProps = useFileProps.useFileProps;
|
|
29
34
|
exports.useJsonProps = useJsonProps.useJsonProps;
|
|
30
35
|
exports.useMultiSelectProps = useMultiSelectProps.useMultiSelectProps;
|
|
31
36
|
exports.useNumberProps = useNumberProps.useNumberProps;
|
|
32
37
|
exports.useSelectProps = useSelectProps.useSelectProps;
|
|
33
38
|
exports.useTextProps = useTextProps.useTextProps;
|
|
34
39
|
exports.useThemeCustomizer = useThemeCustomizer.useThemeCustomizer;
|
|
40
|
+
exports.useTimeProps = useTimeProps.useTimeProps;
|
|
35
41
|
exports.isEnumArrayArrayControl = isEnumArrayArrayControl.isEnumArrayArrayControl;
|
|
36
42
|
exports.isEnumArrayControl = isEnumArrayControl.isEnumArrayControl;
|
|
43
|
+
exports.isFileControl = isFileControl.isFileControl;
|
|
44
|
+
exports.isImageControl = isImageControl.isImageControl;
|
|
37
45
|
exports.isJsonArrayControl = isJsonArrayControl.isJsonArrayControl;
|
|
38
46
|
exports.isJsonControl = isJsonControl.isJsonControl;
|
|
39
47
|
exports.isSchemaTypeInclude = isSchemaTypeInclude.isSchemaTypeInclude;
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
48
|
+
exports.convertLocalStringToUTCString = utcConverter.convertLocalStringToUTCString;
|
|
49
|
+
exports.convertUTCStringToLocalString = utcConverter.convertUTCStringToLocalString;
|
package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineDateTimeInput.cjs
CHANGED
|
@@ -10,15 +10,21 @@ const useContextProps = require("../hooks/useContextProps.cjs");
|
|
|
10
10
|
const useDateProps = require("../hooks/useDateProps.cjs");
|
|
11
11
|
function MantineDateTimeInput({ margin, ...props }) {
|
|
12
12
|
const commonProps = useCommonProps.useCommonProps(props);
|
|
13
|
-
const { path, data } = props;
|
|
13
|
+
const { path, data, uischema } = props;
|
|
14
|
+
const { initialUTC: __initialUTC } = uischema.options || {};
|
|
14
15
|
const _dateProps = useDateProps.useDateProps("date-time", false, { data, toggle: () => null, onChange: commonProps.onChange });
|
|
15
16
|
const [, { initialUTC }] = useContextProps.useContextProps("DateTime", path, { ...commonProps, ..._dateProps }, props);
|
|
16
|
-
const [isUTC, { toggle }] = hooks.useDisclosure(initialUTC);
|
|
17
|
+
const [isUTC, { open: setToUTC, close: setToLocal, toggle }] = hooks.useDisclosure(initialUTC ?? __initialUTC);
|
|
17
18
|
const { initialUTC: _initialUTC, ...dateProps } = useDateProps.useDateProps("date-time", isUTC, {
|
|
18
19
|
data,
|
|
19
20
|
toggle,
|
|
20
21
|
onChange: commonProps.onChange
|
|
21
22
|
});
|
|
23
|
+
React.useEffect(() => {
|
|
24
|
+
if (data) {
|
|
25
|
+
data.endsWith("Z") ? setToUTC() : setToLocal();
|
|
26
|
+
}
|
|
27
|
+
}, [data, setToLocal, setToUTC]);
|
|
22
28
|
const componentProps = React.useMemo(() => ({ ...commonProps, ...dateProps }), [commonProps, dateProps]);
|
|
23
29
|
const [Component, _props] = useContextProps.useContextProps("DateTime", path, componentProps, props);
|
|
24
30
|
if (!props.visible) {
|
|
@@ -0,0 +1,33 @@
|
|
|
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 core = require("@mantine/core");
|
|
6
|
+
const React = require("react");
|
|
7
|
+
const useCommonProps = require("../hooks/useCommonProps.cjs");
|
|
8
|
+
const useContextProps = require("../hooks/useContextProps.cjs");
|
|
9
|
+
const useFileProps = require("../hooks/useFileProps.cjs");
|
|
10
|
+
const InnerMantineFileInput = ({ contextName, margin, children, ...props }) => {
|
|
11
|
+
const commonProps = useCommonProps.useCommonProps(props);
|
|
12
|
+
const { path, data, schema, errors } = props;
|
|
13
|
+
const fileProps = useFileProps.useFileProps({
|
|
14
|
+
data,
|
|
15
|
+
onChange: commonProps.onChange,
|
|
16
|
+
contentMediaType: schema.contentMediaType,
|
|
17
|
+
errors
|
|
18
|
+
});
|
|
19
|
+
const componentProps = React.useMemo(() => ({ ...commonProps, ...fileProps }), [commonProps, fileProps]);
|
|
20
|
+
const [Component, _props] = useContextProps.useContextProps(contextName, path, componentProps, props);
|
|
21
|
+
if (!props.visible) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(core.Box, { m: Component === null ? void 0 : margin, children: [
|
|
25
|
+
Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.FileInput, { ..._props }) : Component,
|
|
26
|
+
utils.parseFromValuesOrFunc(children, { componentProps, jsonFormsProps: props })
|
|
27
|
+
] });
|
|
28
|
+
};
|
|
29
|
+
function MantineFileInput({ margin, ...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsxRuntime.jsx(InnerMantineFileInput, { ...props, contextName: "File", margin });
|
|
31
|
+
}
|
|
32
|
+
exports.InnerMantineFileInput = InnerMantineFileInput;
|
|
33
|
+
exports.MantineFileInput = MantineFileInput;
|
package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineImageInput.cjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const core = require("fastapi-rtk/core");
|
|
5
|
+
const core$1 = require("@mantine/core");
|
|
6
|
+
const MantineFileInput = require("./MantineFileInput.cjs");
|
|
7
|
+
function MantineImageInput({ margin, ...props }) {
|
|
8
|
+
const { path } = core.useApi();
|
|
9
|
+
return /* @__PURE__ */ jsxRuntime.jsx(MantineFileInput.InnerMantineFileInput, { ...props, contextName: "Image", margin, children: ({ jsonFormsProps }) => jsonFormsProps.data ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
|
+
core$1.Image,
|
|
11
|
+
{
|
|
12
|
+
src: typeof jsonFormsProps.data === "string" ? `${path}/_image/${jsonFormsProps.data}` : URL.createObjectURL(jsonFormsProps.data),
|
|
13
|
+
alt: "Uploaded file preview",
|
|
14
|
+
mah: 200,
|
|
15
|
+
fit: "scale-down",
|
|
16
|
+
radius: "md",
|
|
17
|
+
mt: "sm"
|
|
18
|
+
}
|
|
19
|
+
) : void 0 });
|
|
20
|
+
}
|
|
21
|
+
exports.MantineImageInput = MantineImageInput;
|
package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineJsonInput.cjs
CHANGED
|
@@ -11,7 +11,7 @@ function MantineJsonInput({ margin, ...props }) {
|
|
|
11
11
|
const { path, data } = props;
|
|
12
12
|
const jsonProps = useJsonProps.useJsonProps({ data, onChange: commonProps.onChange });
|
|
13
13
|
const componentProps = React.useMemo(() => ({ ...commonProps, ...jsonProps }), [commonProps, jsonProps]);
|
|
14
|
-
const [Component, _props] = useContextProps.useContextProps("
|
|
14
|
+
const [Component, _props] = useContextProps.useContextProps("Json", path, componentProps, props);
|
|
15
15
|
if (!props.visible) {
|
|
16
16
|
return null;
|
|
17
17
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const core = require("@mantine/core");
|
|
5
|
+
const dates = require("@mantine/dates");
|
|
6
|
+
const React = require("react");
|
|
7
|
+
const useCommonProps = require("../hooks/useCommonProps.cjs");
|
|
8
|
+
const useContextProps = require("../hooks/useContextProps.cjs");
|
|
9
|
+
const useTimeProps = require("../hooks/useTimeProps.cjs");
|
|
10
|
+
function MantineTimeInput({ margin, ...props }) {
|
|
11
|
+
const commonProps = useCommonProps.useCommonProps(props);
|
|
12
|
+
const { path, data } = props;
|
|
13
|
+
const textProps = useTimeProps.useTimeProps({ data });
|
|
14
|
+
const componentProps = React.useMemo(() => ({ ...commonProps, ...textProps }), [commonProps, textProps]);
|
|
15
|
+
const [Component, _props] = useContextProps.useContextProps("Time", path, componentProps, props);
|
|
16
|
+
if (!props.visible) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
return /* @__PURE__ */ jsxRuntime.jsx(core.Box, { m: Component === null ? void 0 : margin, children: Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(dates.TimePicker, { ..._props }) : Component });
|
|
20
|
+
}
|
|
21
|
+
exports.MantineTimeInput = MantineTimeInput;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const jsonformsCore_esm = require("../../../../../../../.external/cjs/@jsonforms_core@3.6.0/@jsonforms/core/lib/jsonforms-core.esm.cjs");
|
|
5
|
+
const jsonformsReact_esm = require("../../../../../../../.external/cjs/@jsonforms_react@3.6.0_@jsonforms_core@3.6.0_react@18.3.1/@jsonforms/react/lib/jsonforms-react.esm.cjs");
|
|
6
|
+
const MantineFileInput = require("../MantineInputs/MantineFileInput.cjs");
|
|
7
|
+
const isFileControl = require("../testers/isFileControl.cjs");
|
|
8
|
+
const mantineFileCellTester = jsonformsCore_esm.rankWith(3, isFileControl.isFileControl);
|
|
9
|
+
const MantineFileCell = jsonformsReact_esm.withJsonFormsCellProps((props) => /* @__PURE__ */ jsxRuntime.jsx(MantineFileInput.MantineFileInput, { ...props }));
|
|
10
|
+
exports.MantineFileCell = MantineFileCell;
|
|
11
|
+
exports.mantineFileCellTester = mantineFileCellTester;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const jsonformsCore_esm = require("../../../../../../../.external/cjs/@jsonforms_core@3.6.0/@jsonforms/core/lib/jsonforms-core.esm.cjs");
|
|
5
|
+
const jsonformsReact_esm = require("../../../../../../../.external/cjs/@jsonforms_react@3.6.0_@jsonforms_core@3.6.0_react@18.3.1/@jsonforms/react/lib/jsonforms-react.esm.cjs");
|
|
6
|
+
const MantineImageInput = require("../MantineInputs/MantineImageInput.cjs");
|
|
7
|
+
const isImageControl = require("../testers/isImageControl.cjs");
|
|
8
|
+
const mantineImageCellTester = jsonformsCore_esm.rankWith(4, isImageControl.isImageControl);
|
|
9
|
+
const MantineImageCell = jsonformsReact_esm.withJsonFormsCellProps((props) => /* @__PURE__ */ jsxRuntime.jsx(MantineImageInput.MantineImageInput, { ...props }));
|
|
10
|
+
exports.MantineImageCell = MantineImageCell;
|
|
11
|
+
exports.mantineImageCellTester = mantineImageCellTester;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const jsonformsCore_esm = require("../../../../../../../.external/cjs/@jsonforms_core@3.6.0/@jsonforms/core/lib/jsonforms-core.esm.cjs");
|
|
5
|
+
const jsonformsReact_esm = require("../../../../../../../.external/cjs/@jsonforms_react@3.6.0_@jsonforms_core@3.6.0_react@18.3.1/@jsonforms/react/lib/jsonforms-react.esm.cjs");
|
|
6
|
+
const MantineTimeInput = require("../MantineInputs/MantineTimeInput.cjs");
|
|
7
|
+
const mantineTimeCellTester = jsonformsCore_esm.rankWith(2, jsonformsCore_esm.isTimeControl);
|
|
8
|
+
const MantineTimeCell = jsonformsReact_esm.withJsonFormsCellProps((props) => /* @__PURE__ */ jsxRuntime.jsx(MantineTimeInput.MantineTimeInput, { ...props }));
|
|
9
|
+
exports.MantineTimeCell = MantineTimeCell;
|
|
10
|
+
exports.mantineTimeCellTester = mantineTimeCellTester;
|
|
@@ -5,7 +5,7 @@ const jsonformsCore_esm = require("../../../../../../../.external/cjs/@jsonforms
|
|
|
5
5
|
const jsonformsReact_esm = require("../../../../../../../.external/cjs/@jsonforms_react@3.6.0_@jsonforms_core@3.6.0_react@18.3.1/@jsonforms/react/lib/jsonforms-react.esm.cjs");
|
|
6
6
|
const MantineDateInput = require("../MantineInputs/MantineDateInput.cjs");
|
|
7
7
|
const constants = require("../utils/constants.cjs");
|
|
8
|
-
const mantineDateControlTester = jsonformsCore_esm.rankWith(
|
|
8
|
+
const mantineDateControlTester = jsonformsCore_esm.rankWith(2, jsonformsCore_esm.isDateControl);
|
|
9
9
|
const MantineDateControl = jsonformsReact_esm.withJsonFormsControlProps((props) => /* @__PURE__ */ jsxRuntime.jsx(MantineDateInput.MantineDateInput, { margin: constants.DEFAULT_MARGIN, ...props }));
|
|
10
10
|
exports.MantineDateControl = MantineDateControl;
|
|
11
11
|
exports.mantineDateControlTester = mantineDateControlTester;
|
package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/controls/MantineDateTimeControl.cjs
CHANGED
|
@@ -5,7 +5,7 @@ const jsonformsCore_esm = require("../../../../../../../.external/cjs/@jsonforms
|
|
|
5
5
|
const jsonformsReact_esm = require("../../../../../../../.external/cjs/@jsonforms_react@3.6.0_@jsonforms_core@3.6.0_react@18.3.1/@jsonforms/react/lib/jsonforms-react.esm.cjs");
|
|
6
6
|
const MantineDateTimeInput = require("../MantineInputs/MantineDateTimeInput.cjs");
|
|
7
7
|
const constants = require("../utils/constants.cjs");
|
|
8
|
-
const mantineDateTimeControlTester = jsonformsCore_esm.rankWith(
|
|
8
|
+
const mantineDateTimeControlTester = jsonformsCore_esm.rankWith(2, jsonformsCore_esm.isDateTimeControl);
|
|
9
9
|
const MantineDateTimeControl = jsonformsReact_esm.withJsonFormsControlProps((props) => /* @__PURE__ */ jsxRuntime.jsx(MantineDateTimeInput.MantineDateTimeInput, { margin: constants.DEFAULT_MARGIN, ...props }));
|
|
10
10
|
exports.MantineDateTimeControl = MantineDateTimeControl;
|
|
11
11
|
exports.mantineDateTimeControlTester = mantineDateTimeControlTester;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const jsonformsCore_esm = require("../../../../../../../.external/cjs/@jsonforms_core@3.6.0/@jsonforms/core/lib/jsonforms-core.esm.cjs");
|
|
5
|
+
const jsonformsReact_esm = require("../../../../../../../.external/cjs/@jsonforms_react@3.6.0_@jsonforms_core@3.6.0_react@18.3.1/@jsonforms/react/lib/jsonforms-react.esm.cjs");
|
|
6
|
+
const MantineFileInput = require("../MantineInputs/MantineFileInput.cjs");
|
|
7
|
+
const isFileControl = require("../testers/isFileControl.cjs");
|
|
8
|
+
const constants = require("../utils/constants.cjs");
|
|
9
|
+
const mantineFileControlTester = jsonformsCore_esm.rankWith(3, isFileControl.isFileControl);
|
|
10
|
+
const MantineFileControl = jsonformsReact_esm.withJsonFormsControlProps((props) => /* @__PURE__ */ jsxRuntime.jsx(MantineFileInput.MantineFileInput, { margin: constants.DEFAULT_MARGIN, ...props }));
|
|
11
|
+
exports.MantineFileControl = MantineFileControl;
|
|
12
|
+
exports.mantineFileControlTester = mantineFileControlTester;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const jsonformsCore_esm = require("../../../../../../../.external/cjs/@jsonforms_core@3.6.0/@jsonforms/core/lib/jsonforms-core.esm.cjs");
|
|
5
|
+
const jsonformsReact_esm = require("../../../../../../../.external/cjs/@jsonforms_react@3.6.0_@jsonforms_core@3.6.0_react@18.3.1/@jsonforms/react/lib/jsonforms-react.esm.cjs");
|
|
6
|
+
const MantineImageInput = require("../MantineInputs/MantineImageInput.cjs");
|
|
7
|
+
const isImageControl = require("../testers/isImageControl.cjs");
|
|
8
|
+
const constants = require("../utils/constants.cjs");
|
|
9
|
+
const mantineImageControlTester = jsonformsCore_esm.rankWith(4, isImageControl.isImageControl);
|
|
10
|
+
const MantineImageControl = jsonformsReact_esm.withJsonFormsControlProps((props) => /* @__PURE__ */ jsxRuntime.jsx(MantineImageInput.MantineImageInput, { margin: constants.DEFAULT_MARGIN, ...props }));
|
|
11
|
+
exports.MantineImageControl = MantineImageControl;
|
|
12
|
+
exports.mantineImageControlTester = mantineImageControlTester;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const jsonformsCore_esm = require("../../../../../../../.external/cjs/@jsonforms_core@3.6.0/@jsonforms/core/lib/jsonforms-core.esm.cjs");
|
|
5
|
+
const jsonformsReact_esm = require("../../../../../../../.external/cjs/@jsonforms_react@3.6.0_@jsonforms_core@3.6.0_react@18.3.1/@jsonforms/react/lib/jsonforms-react.esm.cjs");
|
|
6
|
+
const MantineTimeInput = require("../MantineInputs/MantineTimeInput.cjs");
|
|
7
|
+
const constants = require("../utils/constants.cjs");
|
|
8
|
+
const mantineTimeControlTester = jsonformsCore_esm.rankWith(2, jsonformsCore_esm.isTimeControl);
|
|
9
|
+
const MantineTimeControl = jsonformsReact_esm.withJsonFormsControlProps((props) => /* @__PURE__ */ jsxRuntime.jsx(MantineTimeInput.MantineTimeInput, { margin: constants.DEFAULT_MARGIN, ...props }));
|
|
10
|
+
exports.MantineTimeControl = MantineTimeControl;
|
|
11
|
+
exports.mantineTimeControlTester = mantineTimeControlTester;
|
|
@@ -6,24 +6,15 @@ const core = require("@mantine/core");
|
|
|
6
6
|
const utcConverter = require("../utils/utcConverter.cjs");
|
|
7
7
|
function useDateProps(type, isUTC, { data, toggle, onChange }) {
|
|
8
8
|
const theme = core.useMantineTheme();
|
|
9
|
-
const props = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
onChange
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
data2 = utcConverter.convertLocalToUTCISOString(data2);
|
|
19
|
-
} else {
|
|
20
|
-
data2 = data2.toISOString();
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
onChange(data2 || void 0);
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
if (type !== "date") {
|
|
9
|
+
const props = { clearable: true };
|
|
10
|
+
if (type === "date") {
|
|
11
|
+
props.valueFormat = "DD.MM.YYYY";
|
|
12
|
+
props.value = data || null;
|
|
13
|
+
props.onChange = (data2) => onChange(data2 || void 0);
|
|
14
|
+
} else {
|
|
15
|
+
props.valueFormat = isUTC ? "DD.MM.YYYY HH:mm (UTC)" : "DD.MM.YYYY HH:mm";
|
|
16
|
+
props.value = data ? isUTC ? utcConverter.convertUTCStringToLocalString(data) : data : null;
|
|
17
|
+
props.onChange = (data2) => onChange(data2 ? isUTC ? utcConverter.convertLocalStringToUTCString(data2) : data2 : void 0);
|
|
27
18
|
props.placeholder = isUTC ? "DD.MM.YYYY HH:mm (UTC)" : "DD.MM.YYYY HH:mm";
|
|
28
19
|
props.rightSection = /* @__PURE__ */ jsxRuntime.jsxs(core.Group, { gap: "0.25rem", wrap: "nowrap", children: [
|
|
29
20
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -32,7 +23,7 @@ function useDateProps(type, isUTC, { data, toggle, onChange }) {
|
|
|
32
23
|
variant: "transparent",
|
|
33
24
|
size: "sm",
|
|
34
25
|
onClick: () => onChange(void 0),
|
|
35
|
-
style: { visibility:
|
|
26
|
+
style: { visibility: props.value ? void 0 : "hidden" }
|
|
36
27
|
}
|
|
37
28
|
),
|
|
38
29
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -43,8 +34,8 @@ function useDateProps(type, isUTC, { data, toggle, onChange }) {
|
|
|
43
34
|
size: "sm",
|
|
44
35
|
onClick: () => {
|
|
45
36
|
toggle();
|
|
46
|
-
if (
|
|
47
|
-
onChange(
|
|
37
|
+
if (props.value) {
|
|
38
|
+
onChange(isUTC ? utcConverter.convertUTCStringToLocalString(props.value) : utcConverter.convertLocalStringToUTCString(props.value));
|
|
48
39
|
}
|
|
49
40
|
},
|
|
50
41
|
icon: /* @__PURE__ */ jsxRuntime.jsx(iconify.Icon, { icon: "tabler:timezone", color: isUTC ? theme.primaryColor : "gray" })
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
function useFileProps({ data, onChange, contentMediaType, errors }) {
|
|
5
|
+
var _a;
|
|
6
|
+
const filteredErrors = (_a = errors == null ? void 0 : errors.split("\n").filter((error) => !error.startsWith("must be string"))) == null ? void 0 : _a.join("\n");
|
|
7
|
+
let value = data || null;
|
|
8
|
+
if (typeof value === "string") {
|
|
9
|
+
value = new File([value], value);
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
value,
|
|
13
|
+
onChange: (value2) => onChange(value2 || void 0),
|
|
14
|
+
accept: contentMediaType || void 0,
|
|
15
|
+
error: filteredErrors ? filteredErrors.split("\n").map((error) => /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "block" }, children: error }, error)) : void 0,
|
|
16
|
+
clearable: true
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
exports.useFileProps = useFileProps;
|
|
@@ -5,21 +5,29 @@ const MantineDateCell = require("../cells/MantineDateCell.cjs");
|
|
|
5
5
|
const MantineDateTimeCell = require("../cells/MantineDateTimeCell.cjs");
|
|
6
6
|
const MantineEnumArrayCell = require("../cells/MantineEnumArrayCell.cjs");
|
|
7
7
|
const MantineEnumCell = require("../cells/MantineEnumCell.cjs");
|
|
8
|
+
const MantineFileCell = require("../cells/MantineFileCell.cjs");
|
|
9
|
+
const MantineImageCell = require("../cells/MantineImageCell.cjs");
|
|
8
10
|
const MantineIntegerCell = require("../cells/MantineIntegerCell.cjs");
|
|
9
11
|
const MantineJsonCell = require("../cells/MantineJsonCell.cjs");
|
|
10
12
|
const MantineNumberCell = require("../cells/MantineNumberCell.cjs");
|
|
11
13
|
const MantineOneOfEnumCell = require("../cells/MantineOneOfEnumCell.cjs");
|
|
12
14
|
const MantineTextCell = require("../cells/MantineTextCell.cjs");
|
|
15
|
+
const MantineTimeCell = require("../cells/MantineTimeCell.cjs");
|
|
13
16
|
const mantineCells = [
|
|
17
|
+
// Cells
|
|
14
18
|
{ tester: MantineTextCell.mantineTextCellTester, cell: MantineTextCell.MantineTextCell },
|
|
15
|
-
{ tester: MantineNumberCell.mantineNumberCellTester, cell: MantineNumberCell.MantineNumberCell },
|
|
16
|
-
{ tester: MantineIntegerCell.mantineIntegerCellTester, cell: MantineIntegerCell.MantineIntegerCell },
|
|
17
|
-
{ tester: MantineBooleanCell.mantineBooleanCellTester, cell: MantineBooleanCell.MantineBooleanCell },
|
|
18
|
-
{ tester: MantineDateCell.mantineDateCellTester, cell: MantineDateCell.MantineDateCell },
|
|
19
|
-
{ tester: MantineDateTimeCell.mantineDateTimeCellTester, cell: MantineDateTimeCell.MantineDateTimeCell },
|
|
20
19
|
{ tester: MantineEnumCell.mantineEnumCellTester, cell: MantineEnumCell.MantineEnumCell },
|
|
21
20
|
{ tester: MantineOneOfEnumCell.mantineOneOfEnumCellTester, cell: MantineOneOfEnumCell.MantineOneOfEnumCell },
|
|
21
|
+
{ tester: MantineDateCell.mantineDateCellTester, cell: MantineDateCell.MantineDateCell },
|
|
22
|
+
{ tester: MantineTimeCell.mantineTimeCellTester, cell: MantineTimeCell.MantineTimeCell },
|
|
23
|
+
{ tester: MantineDateTimeCell.mantineDateTimeCellTester, cell: MantineDateTimeCell.MantineDateTimeCell },
|
|
22
24
|
{ tester: MantineJsonCell.mantineJsonCellTester, cell: MantineJsonCell.MantineJsonCell },
|
|
25
|
+
{ tester: MantineFileCell.mantineFileCellTester, cell: MantineFileCell.MantineFileCell },
|
|
26
|
+
{ tester: MantineImageCell.mantineImageCellTester, cell: MantineImageCell.MantineImageCell },
|
|
27
|
+
{ tester: MantineNumberCell.mantineNumberCellTester, cell: MantineNumberCell.MantineNumberCell },
|
|
28
|
+
{ tester: MantineIntegerCell.mantineIntegerCellTester, cell: MantineIntegerCell.MantineIntegerCell },
|
|
29
|
+
{ tester: MantineBooleanCell.mantineBooleanCellTester, cell: MantineBooleanCell.MantineBooleanCell },
|
|
30
|
+
// Complex Cells
|
|
23
31
|
{ tester: MantineEnumArrayCell.mantineEnumArrayCellTester, cell: MantineEnumArrayCell.MantineEnumArrayCell }
|
|
24
32
|
];
|
|
25
33
|
exports.mantineCells = mantineCells;
|
|
@@ -7,30 +7,36 @@ const MantineBooleanControl = require("../controls/MantineBooleanControl.cjs");
|
|
|
7
7
|
const MantineDateControl = require("../controls/MantineDateControl.cjs");
|
|
8
8
|
const MantineDateTimeControl = require("../controls/MantineDateTimeControl.cjs");
|
|
9
9
|
const MantineEnumControl = require("../controls/MantineEnumControl.cjs");
|
|
10
|
+
const MantineFileControl = require("../controls/MantineFileControl.cjs");
|
|
11
|
+
const MantineImageControl = require("../controls/MantineImageControl.cjs");
|
|
10
12
|
const MantineIntegerControl = require("../controls/MantineIntegerControl.cjs");
|
|
11
13
|
const MantineJsonControl = require("../controls/MantineJsonControl.cjs");
|
|
12
14
|
const MantineNumberControl = require("../controls/MantineNumberControl.cjs");
|
|
13
15
|
const MantineOneOfEnumControl = require("../controls/MantineOneOfEnumControl.cjs");
|
|
14
16
|
const MantineTextControl = require("../controls/MantineTextControl.cjs");
|
|
17
|
+
const MantineTimeControl = require("../controls/MantineTimeControl.cjs");
|
|
15
18
|
const MantineLabelRenderer = require("../labels/MantineLabelRenderer.cjs");
|
|
16
19
|
const MantineGroupLayoutRenderer = require("../layouts/MantineGroupLayoutRenderer.cjs");
|
|
17
20
|
const MantineHotizontalLayoutRenderer = require("../layouts/MantineHotizontalLayoutRenderer.cjs");
|
|
18
21
|
const MantineVerticalLayoutRenderer = require("../layouts/MantineVerticalLayoutRenderer.cjs");
|
|
19
22
|
const mantineRenderers = [
|
|
20
23
|
// Controls
|
|
24
|
+
{ tester: MantineTextControl.mantineTextControlTester, renderer: MantineTextControl.MantineTextControl },
|
|
25
|
+
{ tester: MantineEnumControl.mantineEnumControlTester, renderer: MantineEnumControl.MantineEnumControl },
|
|
26
|
+
{ tester: MantineOneOfEnumControl.mantineOneOfEnumControlTester, renderer: MantineOneOfEnumControl.MantineOneOfEnumControl },
|
|
21
27
|
{ tester: MantineDateControl.mantineDateControlTester, renderer: MantineDateControl.MantineDateControl },
|
|
28
|
+
{ tester: MantineTimeControl.mantineTimeControlTester, renderer: MantineTimeControl.MantineTimeControl },
|
|
22
29
|
{ tester: MantineDateTimeControl.mantineDateTimeControlTester, renderer: MantineDateTimeControl.MantineDateTimeControl },
|
|
30
|
+
{ tester: MantineJsonControl.mantineJsonControlTester, renderer: MantineJsonControl.MantineJsonControl },
|
|
31
|
+
{ tester: MantineFileControl.mantineFileControlTester, renderer: MantineFileControl.MantineFileControl },
|
|
32
|
+
{ tester: MantineImageControl.mantineImageControlTester, renderer: MantineImageControl.MantineImageControl },
|
|
23
33
|
{ tester: MantineNumberControl.mantineNumberControlTester, renderer: MantineNumberControl.MantineNumberControl },
|
|
24
34
|
{ tester: MantineIntegerControl.mantineIntegerControlTester, renderer: MantineIntegerControl.MantineIntegerControl },
|
|
25
|
-
{ tester: MantineTextControl.mantineTextControlTester, renderer: MantineTextControl.MantineTextControl },
|
|
26
35
|
{ tester: MantineBooleanControl.mantineBooleanControlTester, renderer: MantineBooleanControl.MantineBooleanControl },
|
|
27
|
-
{ tester: MantineEnumControl.mantineEnumControlTester, renderer: MantineEnumControl.MantineEnumControl },
|
|
28
|
-
{ tester: MantineOneOfEnumControl.mantineOneOfEnumControlTester, renderer: MantineOneOfEnumControl.MantineOneOfEnumControl },
|
|
29
|
-
{ tester: MantineJsonControl.mantineJsonControlTester, renderer: MantineJsonControl.MantineJsonControl },
|
|
30
36
|
// Complex
|
|
37
|
+
{ tester: MantineObjectControl.MantineObjectControlTester, renderer: MantineObjectControl.MantineObjectControl },
|
|
31
38
|
{ tester: MantineArrayControl.mantineArrayControlTester, renderer: MantineArrayControl.MantineArrayControlRenderer },
|
|
32
39
|
{ tester: MantineEnumArrayControl.mantineEnumArrayRendererTester, renderer: MantineEnumArrayControl.MantineEnumArrayRenderer },
|
|
33
|
-
{ tester: MantineObjectControl.MantineObjectControlTester, renderer: MantineObjectControl.MantineObjectControl },
|
|
34
40
|
// Layouts
|
|
35
41
|
{ tester: MantineHotizontalLayoutRenderer.mantineHorizontalLayoutTester, renderer: MantineHotizontalLayoutRenderer.MantineHorizontalLayoutRenderer },
|
|
36
42
|
{ tester: MantineVerticalLayoutRenderer.mantineVerticalLayoutTester, renderer: MantineVerticalLayoutRenderer.MantineVerticalLayoutRenderer },
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsonformsCore_esm = require("../../../../../../../.external/cjs/@jsonforms_core@3.6.0/@jsonforms/core/lib/jsonforms-core.esm.cjs");
|
|
4
|
+
const isSchemaTypeInclude = require("../utils/isSchemaTypeInclude.cjs");
|
|
5
|
+
const isFileSchema = (schema) => {
|
|
6
|
+
return isSchemaTypeInclude.isSchemaTypeInclude(schema.type, "string") && "contentMediaType" in schema;
|
|
7
|
+
};
|
|
8
|
+
function isFileControl(uischema, schema) {
|
|
9
|
+
if (!uischema.scope || uischema.type !== "Control") {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
const resolvedSchema = jsonformsCore_esm.resolveSchema(schema, uischema.scope);
|
|
13
|
+
try {
|
|
14
|
+
return isFileSchema(resolvedSchema);
|
|
15
|
+
} catch {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.isFileControl = isFileControl;
|
|
20
|
+
exports.isFileSchema = isFileSchema;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsonformsCore_esm = require("../../../../../../../.external/cjs/@jsonforms_core@3.6.0/@jsonforms/core/lib/jsonforms-core.esm.cjs");
|
|
4
|
+
const isFileControl = require("./isFileControl.cjs");
|
|
5
|
+
function isImageControl(uischema, schema) {
|
|
6
|
+
if (!uischema.scope || uischema.type !== "Control") {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
const resolvedSchema = jsonformsCore_esm.resolveSchema(schema, uischema.scope);
|
|
10
|
+
try {
|
|
11
|
+
return isFileControl.isFileSchema(resolvedSchema) && resolvedSchema.contentMediaType.startsWith("image/");
|
|
12
|
+
} catch {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.isImageControl = isImageControl;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const date = new Date(dateString);
|
|
8
|
-
return new Date(date.getTime() + date.getTimezoneOffset() * 6e4);
|
|
9
|
-
}
|
|
10
|
-
exports.convertLocalToUTCISOString = convertLocalToUTCISOString;
|
|
11
|
-
exports.convertUTCISOStringToLocal = convertUTCISOStringToLocal;
|
|
3
|
+
const convertLocalStringToUTCString = (dateString) => (/* @__PURE__ */ new Date(dateString.replace(" ", "T") + "Z")).toISOString();
|
|
4
|
+
const convertUTCStringToLocalString = (dateString) => dateString.replace("T", " ").replace("Z", "");
|
|
5
|
+
exports.convertLocalStringToUTCString = convertLocalStringToUTCString;
|
|
6
|
+
exports.convertUTCStringToLocalString = convertUTCStringToLocalString;
|
|
@@ -5,24 +5,30 @@ import { useBooleanProps } from "./packages/jsonforms/src/hooks/useBooleanProps.
|
|
|
5
5
|
import { useCommonProps } from "./packages/jsonforms/src/hooks/useCommonProps.mjs";
|
|
6
6
|
import { useContextProps } from "./packages/jsonforms/src/hooks/useContextProps.mjs";
|
|
7
7
|
import { useDateProps } from "./packages/jsonforms/src/hooks/useDateProps.mjs";
|
|
8
|
+
import { useFileProps } from "./packages/jsonforms/src/hooks/useFileProps.mjs";
|
|
8
9
|
import { useJsonProps } from "./packages/jsonforms/src/hooks/useJsonProps.mjs";
|
|
9
10
|
import { useMultiSelectProps } from "./packages/jsonforms/src/hooks/useMultiSelectProps.mjs";
|
|
10
11
|
import { useNumberProps } from "./packages/jsonforms/src/hooks/useNumberProps.mjs";
|
|
11
12
|
import { useSelectProps } from "./packages/jsonforms/src/hooks/useSelectProps.mjs";
|
|
12
13
|
import { useTextProps } from "./packages/jsonforms/src/hooks/useTextProps.mjs";
|
|
13
14
|
import { useThemeCustomizer } from "./packages/jsonforms/src/hooks/useThemeCustomizer.mjs";
|
|
15
|
+
import { useTimeProps } from "./packages/jsonforms/src/hooks/useTimeProps.mjs";
|
|
14
16
|
import { isEnumArrayArrayControl } from "./packages/jsonforms/src/testers/isEnumArrayArrayControl.mjs";
|
|
15
17
|
import { isEnumArrayControl } from "./packages/jsonforms/src/testers/isEnumArrayControl.mjs";
|
|
18
|
+
import { isFileControl } from "./packages/jsonforms/src/testers/isFileControl.mjs";
|
|
19
|
+
import { isImageControl } from "./packages/jsonforms/src/testers/isImageControl.mjs";
|
|
16
20
|
import { isJsonArrayControl } from "./packages/jsonforms/src/testers/isJsonArrayControl.mjs";
|
|
17
21
|
import { isJsonControl } from "./packages/jsonforms/src/testers/isJsonControl.mjs";
|
|
18
22
|
import { isSchemaTypeInclude } from "./packages/jsonforms/src/utils/isSchemaTypeInclude.mjs";
|
|
19
|
-
import {
|
|
23
|
+
import { convertLocalStringToUTCString, convertUTCStringToLocalString } from "./packages/jsonforms/src/utils/utcConverter.mjs";
|
|
20
24
|
export {
|
|
21
25
|
JsonFormsWithCustomizer,
|
|
22
|
-
|
|
23
|
-
|
|
26
|
+
convertLocalStringToUTCString,
|
|
27
|
+
convertUTCStringToLocalString,
|
|
24
28
|
isEnumArrayArrayControl,
|
|
25
29
|
isEnumArrayControl,
|
|
30
|
+
isFileControl,
|
|
31
|
+
isImageControl,
|
|
26
32
|
isJsonArrayControl,
|
|
27
33
|
isJsonControl,
|
|
28
34
|
isSchemaTypeInclude,
|
|
@@ -32,10 +38,12 @@ export {
|
|
|
32
38
|
useCommonProps,
|
|
33
39
|
useContextProps,
|
|
34
40
|
useDateProps,
|
|
41
|
+
useFileProps,
|
|
35
42
|
useJsonProps,
|
|
36
43
|
useMultiSelectProps,
|
|
37
44
|
useNumberProps,
|
|
38
45
|
useSelectProps,
|
|
39
46
|
useTextProps,
|
|
40
|
-
useThemeCustomizer
|
|
47
|
+
useThemeCustomizer,
|
|
48
|
+
useTimeProps
|
|
41
49
|
};
|
package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineDateTimeInput.mjs
CHANGED
|
@@ -2,21 +2,27 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Box } from "@mantine/core";
|
|
3
3
|
import { DateTimePicker } from "@mantine/dates";
|
|
4
4
|
import { useDisclosure } from "@mantine/hooks";
|
|
5
|
-
import { useMemo } from "react";
|
|
5
|
+
import { useEffect, useMemo } from "react";
|
|
6
6
|
import { useCommonProps } from "../hooks/useCommonProps.mjs";
|
|
7
7
|
import { useContextProps } from "../hooks/useContextProps.mjs";
|
|
8
8
|
import { useDateProps } from "../hooks/useDateProps.mjs";
|
|
9
9
|
function MantineDateTimeInput({ margin, ...props }) {
|
|
10
10
|
const commonProps = useCommonProps(props);
|
|
11
|
-
const { path, data } = props;
|
|
11
|
+
const { path, data, uischema } = props;
|
|
12
|
+
const { initialUTC: __initialUTC } = uischema.options || {};
|
|
12
13
|
const _dateProps = useDateProps("date-time", false, { data, toggle: () => null, onChange: commonProps.onChange });
|
|
13
14
|
const [, { initialUTC }] = useContextProps("DateTime", path, { ...commonProps, ..._dateProps }, props);
|
|
14
|
-
const [isUTC, { toggle }] = useDisclosure(initialUTC);
|
|
15
|
+
const [isUTC, { open: setToUTC, close: setToLocal, toggle }] = useDisclosure(initialUTC ?? __initialUTC);
|
|
15
16
|
const { initialUTC: _initialUTC, ...dateProps } = useDateProps("date-time", isUTC, {
|
|
16
17
|
data,
|
|
17
18
|
toggle,
|
|
18
19
|
onChange: commonProps.onChange
|
|
19
20
|
});
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (data) {
|
|
23
|
+
data.endsWith("Z") ? setToUTC() : setToLocal();
|
|
24
|
+
}
|
|
25
|
+
}, [data, setToLocal, setToUTC]);
|
|
20
26
|
const componentProps = useMemo(() => ({ ...commonProps, ...dateProps }), [commonProps, dateProps]);
|
|
21
27
|
const [Component, _props] = useContextProps("DateTime", path, componentProps, props);
|
|
22
28
|
if (!props.visible) {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { parseFromValuesOrFunc } from "fastapi-rtk/utils";
|
|
3
|
+
import { Box, FileInput } from "@mantine/core";
|
|
4
|
+
import { useMemo } from "react";
|
|
5
|
+
import { useCommonProps } from "../hooks/useCommonProps.mjs";
|
|
6
|
+
import { useContextProps } from "../hooks/useContextProps.mjs";
|
|
7
|
+
import { useFileProps } from "../hooks/useFileProps.mjs";
|
|
8
|
+
const InnerMantineFileInput = ({ contextName, margin, children, ...props }) => {
|
|
9
|
+
const commonProps = useCommonProps(props);
|
|
10
|
+
const { path, data, schema, errors } = props;
|
|
11
|
+
const fileProps = useFileProps({
|
|
12
|
+
data,
|
|
13
|
+
onChange: commonProps.onChange,
|
|
14
|
+
contentMediaType: schema.contentMediaType,
|
|
15
|
+
errors
|
|
16
|
+
});
|
|
17
|
+
const componentProps = useMemo(() => ({ ...commonProps, ...fileProps }), [commonProps, fileProps]);
|
|
18
|
+
const [Component, _props] = useContextProps(contextName, path, componentProps, props);
|
|
19
|
+
if (!props.visible) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
return /* @__PURE__ */ jsxs(Box, { m: Component === null ? void 0 : margin, children: [
|
|
23
|
+
Component === void 0 ? /* @__PURE__ */ jsx(FileInput, { ..._props }) : Component,
|
|
24
|
+
parseFromValuesOrFunc(children, { componentProps, jsonFormsProps: props })
|
|
25
|
+
] });
|
|
26
|
+
};
|
|
27
|
+
function MantineFileInput({ margin, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsx(InnerMantineFileInput, { ...props, contextName: "File", margin });
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
InnerMantineFileInput,
|
|
32
|
+
MantineFileInput
|
|
33
|
+
};
|
package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineImageInput.mjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useApi } from "fastapi-rtk/core";
|
|
3
|
+
import { Image } from "@mantine/core";
|
|
4
|
+
import { InnerMantineFileInput } from "./MantineFileInput.mjs";
|
|
5
|
+
function MantineImageInput({ margin, ...props }) {
|
|
6
|
+
const { path } = useApi();
|
|
7
|
+
return /* @__PURE__ */ jsx(InnerMantineFileInput, { ...props, contextName: "Image", margin, children: ({ jsonFormsProps }) => jsonFormsProps.data ? /* @__PURE__ */ jsx(
|
|
8
|
+
Image,
|
|
9
|
+
{
|
|
10
|
+
src: typeof jsonFormsProps.data === "string" ? `${path}/_image/${jsonFormsProps.data}` : URL.createObjectURL(jsonFormsProps.data),
|
|
11
|
+
alt: "Uploaded file preview",
|
|
12
|
+
mah: 200,
|
|
13
|
+
fit: "scale-down",
|
|
14
|
+
radius: "md",
|
|
15
|
+
mt: "sm"
|
|
16
|
+
}
|
|
17
|
+
) : void 0 });
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
MantineImageInput
|
|
21
|
+
};
|