@importcsv/react 0.2.1 → 0.2.4
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/README.md +100 -427
- package/build/App.d.ts +2 -0
- package/build/bundled/bundled-styles.d.ts +1 -0
- package/build/bundled/components/CSVImporter/index.d.ts +5 -0
- package/build/bundled/i18n/de.d.ts +32 -0
- package/build/bundled/i18n/es.d.ts +32 -0
- package/build/bundled/i18n/fr.d.ts +32 -0
- package/build/bundled/i18n/i18n.d.ts +6 -0
- package/build/bundled/i18n/it.d.ts +32 -0
- package/build/bundled/i18n/useTranslation.d.ts +9 -0
- package/build/bundled/importer/components/Box/index.d.ts +2 -0
- package/build/bundled/importer/components/Box/types/index.d.ts +5 -0
- package/build/bundled/importer/components/Checkbox/index.d.ts +2 -0
- package/build/bundled/importer/components/Checkbox/types/index.d.ts +4 -0
- package/build/bundled/importer/components/Errors/index.d.ts +4 -0
- package/build/bundled/importer/components/Input/index.d.ts +2 -0
- package/build/bundled/importer/components/Input/types/index.d.ts +18 -0
- package/build/bundled/importer/components/Root/index.d.ts +10 -0
- package/build/bundled/importer/components/StepLayout/index.d.ts +18 -0
- package/build/bundled/importer/components/Stepper/hooks/useStepper.d.ts +2 -0
- package/build/bundled/importer/components/Stepper/index.d.ts +2 -0
- package/build/bundled/importer/components/Stepper/types/index.d.ts +14 -0
- package/build/bundled/importer/components/Table/index.d.ts +9 -0
- package/build/bundled/importer/components/ToggleFilter/index.d.ts +3 -0
- package/build/bundled/importer/components/ToggleFilter/types/index.d.ts +11 -0
- package/build/bundled/importer/components/Tooltip/index.d.ts +2 -0
- package/build/bundled/importer/components/Tooltip/types/index.d.ts +11 -0
- package/build/bundled/importer/components/UploaderWrapper/NativeDropzone.d.ts +11 -0
- package/build/bundled/importer/components/UploaderWrapper/UploaderWrapper.d.ts +2 -0
- package/build/bundled/importer/components/UploaderWrapper/types/index.d.ts +2 -0
- package/build/bundled/importer/components/VirtualTable/index.d.ts +17 -0
- package/build/bundled/importer/components/ui/alert.d.ts +10 -0
- package/build/bundled/importer/components/ui/button.d.ts +12 -0
- package/build/bundled/importer/components/ui/card.d.ts +19 -0
- package/build/bundled/importer/components/ui/checkbox.d.ts +7 -0
- package/build/bundled/importer/components/ui/dialog.d.ts +38 -0
- package/build/bundled/importer/components/ui/flex.d.ts +23 -0
- package/build/bundled/importer/components/ui/input.d.ts +6 -0
- package/build/bundled/importer/components/ui/select.d.ts +13 -0
- package/build/bundled/importer/components/ui/switch.d.ts +7 -0
- package/build/bundled/importer/components/ui/toast.d.ts +22 -0
- package/build/bundled/importer/components/ui/toaster.d.ts +1 -0
- package/build/bundled/importer/components/ui/tooltip.d.ts +20 -0
- package/build/bundled/importer/components/ui/use-toast.d.ts +46 -0
- package/build/bundled/importer/features/complete/index.d.ts +2 -0
- package/build/bundled/importer/features/complete/types/index.d.ts +5 -0
- package/build/bundled/importer/features/configure-import/index.d.ts +13 -0
- package/build/bundled/importer/features/configure-import/types/index.d.ts +13 -0
- package/build/bundled/importer/features/main/hooks/useMutableLocalStorage.d.ts +1 -0
- package/build/bundled/importer/features/main/hooks/useStepNavigation.d.ts +17 -0
- package/build/bundled/importer/features/main/index.d.ts +2 -0
- package/build/bundled/importer/features/main/types/index.d.ts +16 -0
- package/build/bundled/importer/features/map-columns/components/DropDownFields.d.ts +21 -0
- package/build/bundled/importer/features/map-columns/hooks/useMapColumnsTable.d.ts +16 -0
- package/build/bundled/importer/features/map-columns/index.d.ts +2 -0
- package/build/bundled/importer/features/map-columns/types/index.d.ts +16 -0
- package/build/bundled/importer/features/row-selection/index.d.ts +2 -0
- package/build/bundled/importer/features/row-selection/types/index.d.ts +8 -0
- package/build/bundled/importer/features/uploader/hooks/useTemplateTable.d.ts +10 -0
- package/build/bundled/importer/features/uploader/index.d.ts +2 -0
- package/build/bundled/importer/features/uploader/types/index.d.ts +9 -0
- package/build/bundled/importer/features/validation/Validation.d.ts +2 -0
- package/build/bundled/importer/features/validation/components/TransformModal.d.ts +18 -0
- package/build/bundled/importer/features/validation/components/TransformPanel.d.ts +18 -0
- package/build/bundled/importer/features/validation/index.d.ts +1 -0
- package/build/bundled/importer/features/validation/types.d.ts +32 -0
- package/build/bundled/importer/hooks/useClickOutside.d.ts +1 -0
- package/build/bundled/importer/hooks/useCustomStyles.d.ts +1 -0
- package/build/bundled/importer/hooks/useEventListener.d.ts +4 -0
- package/build/bundled/importer/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
- package/build/bundled/importer/hooks/useRect.d.ts +12 -0
- package/build/bundled/importer/hooks/useWindowSize.d.ts +1 -0
- package/build/bundled/importer/providers/Theme.d.ts +10 -0
- package/build/bundled/importer/providers/index.d.ts +5 -0
- package/build/bundled/importer/providers/types/index.d.ts +10 -0
- package/build/bundled/importer/services/api.d.ts +1 -0
- package/build/bundled/importer/services/mapping.d.ts +31 -0
- package/build/bundled/importer/services/transformation.d.ts +70 -0
- package/build/bundled/importer/settings/theme/colors.d.ts +4 -0
- package/build/bundled/importer/settings/theme/index.d.ts +2 -0
- package/build/bundled/importer/settings/theme/sizes.d.ts +7 -0
- package/build/bundled/importer/stores/theme.d.ts +17 -0
- package/build/bundled/importer/theme/index.d.ts +8 -0
- package/build/bundled/importer/theme/presets.d.ts +314 -0
- package/build/bundled/importer/theme/runtime.d.ts +62 -0
- package/build/bundled/importer/theme/styles.d.ts +120 -0
- package/build/bundled/importer/types/index.d.ts +9 -0
- package/build/bundled/importer/utils/colorUtils.d.ts +48 -0
- package/build/bundled/importer/utils/errorAnalysis.d.ts +25 -0
- package/build/bundled/importer/utils/getStringLengthOfChildren.d.ts +2 -0
- package/build/bundled/importer/utils/stringSimilarity.d.ts +1 -0
- package/build/bundled/importer/utils/template.d.ts +2 -0
- package/build/bundled/importer/utils/themeUtils.d.ts +21 -0
- package/build/bundled/importer/utils/utils.d.ts +19 -0
- package/build/bundled/index.d.ts +4 -0
- package/build/bundled/index.esm.js +8189 -0
- package/build/bundled/index.esm.js.map +1 -0
- package/build/bundled/index.js +112 -0
- package/build/bundled/index.js.map +1 -0
- package/build/bundled/index.umd.js +112 -0
- package/build/bundled/index.umd.js.map +1 -0
- package/build/bundled/js.d.ts +12 -0
- package/build/bundled/settings/defaults.d.ts +3 -0
- package/build/bundled/styles.d.ts +1 -0
- package/build/bundled/types/index.d.ts +132 -0
- package/build/bundled/types/theme.d.ts +153 -0
- package/build/bundled/utils/cn.d.ts +6 -0
- package/build/bundled/utils/injectStyles.d.ts +14 -0
- package/build/bundled/validation/transformationStages.d.ts +26 -0
- package/build/bundled/validation/transformer.d.ts +17 -0
- package/build/bundled/validation/validator.d.ts +23 -0
- package/build/bundled-styles.d.ts +1 -1
- package/build/components/CSVImporter/index.d.ts +8 -31
- package/build/components/Modal/index.d.ts +12 -0
- package/build/config/index.d.ts +5 -0
- package/build/importer/components/Box/index.d.ts +1 -1
- package/build/importer/components/Box/types/index.d.ts +1 -2
- package/build/importer/components/Checkbox/index.d.ts +1 -1
- package/build/importer/components/Checkbox/types/index.d.ts +1 -1
- package/build/importer/components/Input/index.d.ts +1 -1
- package/build/importer/components/Input/types/index.d.ts +1 -1
- package/build/importer/components/Root/index.d.ts +10 -0
- package/build/importer/components/StepLayout/index.d.ts +18 -0
- package/build/importer/components/Stepper/hooks/useStepper.d.ts +1 -1
- package/build/importer/components/Stepper/index.d.ts +1 -1
- package/build/importer/components/Table/index.d.ts +3 -3
- package/build/importer/components/ToggleFilter/index.d.ts +1 -1
- package/build/importer/components/Tooltip/index.d.ts +1 -1
- package/build/importer/components/Tooltip/types/index.d.ts +4 -4
- package/build/importer/components/UploaderWrapper/NativeDropzone.d.ts +11 -0
- package/build/importer/components/UploaderWrapper/UploaderWrapper.d.ts +1 -1
- package/build/importer/components/UploaderWrapper/types/index.d.ts +1 -1
- package/build/importer/components/VirtualTable/index.d.ts +17 -0
- package/build/importer/components/ui/alert.d.ts +9 -7
- package/build/importer/components/ui/button.d.ts +6 -6
- package/build/importer/components/ui/card.d.ts +18 -7
- package/build/importer/components/ui/checkbox.d.ts +6 -3
- package/build/importer/components/ui/dialog.d.ts +32 -12
- package/build/importer/components/ui/flex.d.ts +16 -7
- package/build/importer/components/ui/input.d.ts +4 -3
- package/build/importer/components/ui/select.d.ts +13 -13
- package/build/importer/components/ui/switch.d.ts +6 -3
- package/build/importer/components/ui/toast.d.ts +23 -15
- package/build/importer/components/ui/tooltip.d.ts +16 -9
- package/build/importer/components/ui/use-toast.d.ts +7 -5
- package/build/importer/features/complete/index.d.ts +1 -1
- package/build/importer/features/main/hooks/useStepNavigation.d.ts +1 -1
- package/build/importer/features/main/index.d.ts +1 -1
- package/build/importer/features/map-columns/components/DropDownFields.d.ts +1 -1
- package/build/importer/features/map-columns/hooks/useMapColumnsTable.d.ts +4 -4
- package/build/importer/features/map-columns/index.d.ts +1 -1
- package/build/importer/features/map-columns/types/index.d.ts +2 -2
- package/build/importer/features/row-selection/index.d.ts +1 -1
- package/build/importer/features/row-selection/types/index.d.ts +1 -1
- package/build/importer/features/uploader/hooks/useTemplateTable.d.ts +1 -1
- package/build/importer/features/uploader/index.d.ts +1 -1
- package/build/importer/features/uploader/types/index.d.ts +2 -2
- package/build/importer/features/validation/components/TransformPanel.d.ts +18 -0
- package/build/importer/features/validation/types.d.ts +3 -3
- package/build/importer/hooks/useEventListener.d.ts +1 -1
- package/build/importer/hooks/useIsomorphicLayoutEffect.d.ts +1 -1
- package/build/importer/providers/Theme.d.ts +7 -2
- package/build/importer/providers/index.d.ts +4 -4
- package/build/importer/providers/types/index.d.ts +10 -4
- package/build/importer/settings/theme/index.d.ts +2 -2
- package/build/importer/stores/theme.d.ts +3 -3
- package/build/importer/theme/index.d.ts +8 -0
- package/build/importer/theme/presets.d.ts +314 -0
- package/build/importer/theme/runtime.d.ts +66 -0
- package/build/importer/theme/styles.d.ts +120 -0
- package/build/importer/utils/errorAnalysis.d.ts +25 -0
- package/build/importer/utils/getStringLengthOfChildren.d.ts +2 -2
- package/build/importer/utils/template.d.ts +1 -1
- package/build/importer/utils/themeUtils.d.ts +24 -0
- package/build/index.d.ts +5 -3
- package/build/index.dev.d.ts +1 -0
- package/build/js.d.ts +4 -31
- package/build/preact/bundled-styles.d.ts +1 -0
- package/build/preact/components/CSVImporter/index.d.ts +5 -0
- package/build/preact/i18n/de.d.ts +32 -0
- package/build/preact/i18n/es.d.ts +32 -0
- package/build/preact/i18n/fr.d.ts +32 -0
- package/build/preact/i18n/i18n.d.ts +6 -0
- package/build/preact/i18n/it.d.ts +32 -0
- package/build/preact/i18n/useTranslation.d.ts +9 -0
- package/build/preact/importer/components/Box/index.d.ts +2 -0
- package/build/preact/importer/components/Box/types/index.d.ts +5 -0
- package/build/preact/importer/components/Checkbox/index.d.ts +2 -0
- package/build/preact/importer/components/Checkbox/types/index.d.ts +4 -0
- package/build/preact/importer/components/Errors/index.d.ts +4 -0
- package/build/preact/importer/components/Input/index.d.ts +2 -0
- package/build/preact/importer/components/Input/types/index.d.ts +18 -0
- package/build/preact/importer/components/Root/index.d.ts +10 -0
- package/build/preact/importer/components/StepLayout/index.d.ts +18 -0
- package/build/preact/importer/components/Stepper/hooks/useStepper.d.ts +2 -0
- package/build/preact/importer/components/Stepper/index.d.ts +2 -0
- package/build/preact/importer/components/Stepper/types/index.d.ts +14 -0
- package/build/preact/importer/components/Table/index.d.ts +9 -0
- package/build/preact/importer/components/ToggleFilter/index.d.ts +3 -0
- package/build/preact/importer/components/ToggleFilter/types/index.d.ts +11 -0
- package/build/preact/importer/components/Tooltip/index.d.ts +2 -0
- package/build/preact/importer/components/Tooltip/types/index.d.ts +11 -0
- package/build/preact/importer/components/UploaderWrapper/NativeDropzone.d.ts +11 -0
- package/build/preact/importer/components/UploaderWrapper/UploaderWrapper.d.ts +2 -0
- package/build/preact/importer/components/UploaderWrapper/types/index.d.ts +2 -0
- package/build/preact/importer/components/VirtualTable/index.d.ts +17 -0
- package/build/preact/importer/components/ui/alert.d.ts +10 -0
- package/build/preact/importer/components/ui/button.d.ts +12 -0
- package/build/preact/importer/components/ui/card.d.ts +19 -0
- package/build/preact/importer/components/ui/checkbox.d.ts +7 -0
- package/build/preact/importer/components/ui/dialog.d.ts +38 -0
- package/build/preact/importer/components/ui/flex.d.ts +23 -0
- package/build/preact/importer/components/ui/input.d.ts +6 -0
- package/build/preact/importer/components/ui/select.d.ts +13 -0
- package/build/preact/importer/components/ui/switch.d.ts +7 -0
- package/build/preact/importer/components/ui/toast.d.ts +22 -0
- package/build/preact/importer/components/ui/toaster.d.ts +1 -0
- package/build/preact/importer/components/ui/tooltip.d.ts +20 -0
- package/build/preact/importer/components/ui/use-toast.d.ts +46 -0
- package/build/preact/importer/features/complete/index.d.ts +2 -0
- package/build/preact/importer/features/complete/types/index.d.ts +5 -0
- package/build/preact/importer/features/configure-import/index.d.ts +13 -0
- package/build/preact/importer/features/configure-import/types/index.d.ts +13 -0
- package/build/preact/importer/features/main/hooks/useMutableLocalStorage.d.ts +1 -0
- package/build/preact/importer/features/main/hooks/useStepNavigation.d.ts +17 -0
- package/build/preact/importer/features/main/index.d.ts +2 -0
- package/build/preact/importer/features/main/types/index.d.ts +16 -0
- package/build/preact/importer/features/map-columns/components/DropDownFields.d.ts +21 -0
- package/build/preact/importer/features/map-columns/hooks/useMapColumnsTable.d.ts +16 -0
- package/build/preact/importer/features/map-columns/index.d.ts +2 -0
- package/build/preact/importer/features/map-columns/types/index.d.ts +16 -0
- package/build/preact/importer/features/row-selection/index.d.ts +2 -0
- package/build/preact/importer/features/row-selection/types/index.d.ts +8 -0
- package/build/preact/importer/features/uploader/hooks/useTemplateTable.d.ts +10 -0
- package/build/preact/importer/features/uploader/index.d.ts +2 -0
- package/build/preact/importer/features/uploader/types/index.d.ts +9 -0
- package/build/preact/importer/features/validation/Validation.d.ts +2 -0
- package/build/preact/importer/features/validation/components/TransformModal.d.ts +18 -0
- package/build/preact/importer/features/validation/components/TransformPanel.d.ts +18 -0
- package/build/preact/importer/features/validation/index.d.ts +1 -0
- package/build/preact/importer/features/validation/types.d.ts +32 -0
- package/build/preact/importer/hooks/useClickOutside.d.ts +1 -0
- package/build/preact/importer/hooks/useCustomStyles.d.ts +1 -0
- package/build/preact/importer/hooks/useEventListener.d.ts +4 -0
- package/build/preact/importer/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
- package/build/preact/importer/hooks/useRect.d.ts +12 -0
- package/build/preact/importer/hooks/useWindowSize.d.ts +1 -0
- package/build/preact/importer/providers/Theme.d.ts +10 -0
- package/build/preact/importer/providers/index.d.ts +5 -0
- package/build/preact/importer/providers/types/index.d.ts +10 -0
- package/build/preact/importer/services/api.d.ts +1 -0
- package/build/preact/importer/services/mapping.d.ts +31 -0
- package/build/preact/importer/services/transformation.d.ts +70 -0
- package/build/preact/importer/settings/theme/colors.d.ts +4 -0
- package/build/preact/importer/settings/theme/index.d.ts +2 -0
- package/build/preact/importer/settings/theme/sizes.d.ts +7 -0
- package/build/preact/importer/stores/theme.d.ts +17 -0
- package/build/preact/importer/theme/index.d.ts +8 -0
- package/build/preact/importer/theme/presets.d.ts +314 -0
- package/build/preact/importer/theme/runtime.d.ts +62 -0
- package/build/preact/importer/theme/styles.d.ts +120 -0
- package/build/preact/importer/types/index.d.ts +9 -0
- package/build/preact/importer/utils/colorUtils.d.ts +48 -0
- package/build/preact/importer/utils/errorAnalysis.d.ts +25 -0
- package/build/preact/importer/utils/getStringLengthOfChildren.d.ts +2 -0
- package/build/preact/importer/utils/stringSimilarity.d.ts +1 -0
- package/build/preact/importer/utils/template.d.ts +2 -0
- package/build/preact/importer/utils/themeUtils.d.ts +21 -0
- package/build/preact/importer/utils/utils.d.ts +19 -0
- package/build/preact/index.d.ts +4 -0
- package/build/preact/index.esm.js +7370 -0
- package/build/preact/index.esm.js.map +1 -0
- package/build/preact/index.js +112 -0
- package/build/preact/index.js.map +1 -0
- package/build/preact/js.d.ts +12 -0
- package/build/preact/settings/defaults.d.ts +3 -0
- package/build/preact/styles.d.ts +1 -0
- package/build/preact/types/index.d.ts +132 -0
- package/build/preact/types/theme.d.ts +153 -0
- package/build/preact/utils/cn.d.ts +6 -0
- package/build/preact/utils/injectStyles.d.ts +14 -0
- package/build/preact/validation/transformationStages.d.ts +26 -0
- package/build/preact/validation/transformer.d.ts +17 -0
- package/build/preact/validation/validator.d.ts +23 -0
- package/build/react/bundled-styles.d.ts +1 -0
- package/build/react/components/CSVImporter/index.d.ts +5 -0
- package/build/react/components/Modal/index.d.ts +12 -0
- package/build/react/i18n/de.d.ts +32 -0
- package/build/react/i18n/es.d.ts +32 -0
- package/build/react/i18n/fr.d.ts +32 -0
- package/build/react/i18n/i18n.d.ts +6 -0
- package/build/react/i18n/it.d.ts +32 -0
- package/build/react/i18n/useTranslation.d.ts +9 -0
- package/build/react/importer/components/Box/index.d.ts +2 -0
- package/build/react/importer/components/Box/types/index.d.ts +5 -0
- package/build/react/importer/components/Checkbox/index.d.ts +2 -0
- package/build/react/importer/components/Checkbox/types/index.d.ts +4 -0
- package/build/react/importer/components/Errors/index.d.ts +4 -0
- package/build/react/importer/components/Input/index.d.ts +2 -0
- package/build/react/importer/components/Input/types/index.d.ts +18 -0
- package/build/react/importer/components/Root/index.d.ts +10 -0
- package/build/react/importer/components/StepLayout/index.d.ts +18 -0
- package/build/react/importer/components/Stepper/hooks/useStepper.d.ts +2 -0
- package/build/react/importer/components/Stepper/index.d.ts +2 -0
- package/build/react/importer/components/Stepper/types/index.d.ts +14 -0
- package/build/react/importer/components/Table/index.d.ts +9 -0
- package/build/{importer → react/importer}/components/Table/types/index.d.ts +2 -2
- package/build/react/importer/components/ToggleFilter/index.d.ts +3 -0
- package/build/react/importer/components/ToggleFilter/types/index.d.ts +11 -0
- package/build/react/importer/components/Tooltip/index.d.ts +2 -0
- package/build/react/importer/components/Tooltip/types/index.d.ts +11 -0
- package/build/react/importer/components/UploaderWrapper/NativeDropzone.d.ts +11 -0
- package/build/react/importer/components/UploaderWrapper/UploaderWrapper.d.ts +2 -0
- package/build/react/importer/components/UploaderWrapper/types/index.d.ts +2 -0
- package/build/react/importer/components/VirtualTable/index.d.ts +17 -0
- package/build/react/importer/components/ui/alert.d.ts +13 -0
- package/build/react/importer/components/ui/button.d.ts +12 -0
- package/build/react/importer/components/ui/card.d.ts +19 -0
- package/build/react/importer/components/ui/checkbox.d.ts +7 -0
- package/build/react/importer/components/ui/dialog.d.ts +38 -0
- package/build/react/importer/components/ui/flex.d.ts +23 -0
- package/build/react/importer/components/ui/input.d.ts +6 -0
- package/build/react/importer/components/ui/select.d.ts +13 -0
- package/build/react/importer/components/ui/switch.d.ts +7 -0
- package/build/react/importer/components/ui/toast.d.ts +22 -0
- package/build/react/importer/components/ui/toaster.d.ts +1 -0
- package/build/react/importer/components/ui/tooltip.d.ts +24 -0
- package/build/react/importer/components/ui/use-toast.d.ts +46 -0
- package/build/react/importer/features/complete/index.d.ts +2 -0
- package/build/react/importer/features/complete/types/index.d.ts +5 -0
- package/build/react/importer/features/configure-import/index.d.ts +13 -0
- package/build/react/importer/features/configure-import/types/index.d.ts +13 -0
- package/build/react/importer/features/main/hooks/useMutableLocalStorage.d.ts +1 -0
- package/build/react/importer/features/main/hooks/useStepNavigation.d.ts +17 -0
- package/build/react/importer/features/main/index.d.ts +2 -0
- package/build/react/importer/features/main/types/index.d.ts +16 -0
- package/build/react/importer/features/map-columns/components/DropDownFields.d.ts +21 -0
- package/build/react/importer/features/map-columns/hooks/useMapColumnsTable.d.ts +16 -0
- package/build/react/importer/features/map-columns/index.d.ts +2 -0
- package/build/react/importer/features/map-columns/types/index.d.ts +16 -0
- package/build/react/importer/features/row-selection/index.d.ts +2 -0
- package/build/react/importer/features/row-selection/types/index.d.ts +8 -0
- package/build/react/importer/features/uploader/hooks/useTemplateTable.d.ts +10 -0
- package/build/react/importer/features/uploader/index.d.ts +2 -0
- package/build/react/importer/features/uploader/types/index.d.ts +9 -0
- package/build/react/importer/features/validation/Validation.d.ts +2 -0
- package/build/react/importer/features/validation/components/TransformModal.d.ts +18 -0
- package/build/react/importer/features/validation/components/TransformPanel.d.ts +18 -0
- package/build/react/importer/features/validation/index.d.ts +1 -0
- package/build/react/importer/features/validation/types.d.ts +32 -0
- package/build/react/importer/hooks/useClickOutside.d.ts +1 -0
- package/build/react/importer/hooks/useCustomStyles.d.ts +1 -0
- package/build/react/importer/hooks/useEventListener.d.ts +4 -0
- package/build/react/importer/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
- package/build/react/importer/hooks/useRect.d.ts +12 -0
- package/build/react/importer/hooks/useWindowSize.d.ts +1 -0
- package/build/react/importer/providers/Theme.d.ts +10 -0
- package/build/react/importer/providers/index.d.ts +5 -0
- package/build/react/importer/providers/types/index.d.ts +10 -0
- package/build/react/importer/services/api.d.ts +1 -0
- package/build/react/importer/services/mapping.d.ts +31 -0
- package/build/react/importer/services/transformation.d.ts +70 -0
- package/build/react/importer/settings/theme/colors.d.ts +4 -0
- package/build/react/importer/settings/theme/index.d.ts +2 -0
- package/build/react/importer/settings/theme/sizes.d.ts +7 -0
- package/build/react/importer/stores/theme.d.ts +17 -0
- package/build/react/importer/theme/index.d.ts +8 -0
- package/build/react/importer/theme/presets.d.ts +314 -0
- package/build/react/importer/theme/runtime.d.ts +62 -0
- package/build/react/importer/theme/styles.d.ts +120 -0
- package/build/react/importer/types/index.d.ts +9 -0
- package/build/react/importer/utils/colorUtils.d.ts +48 -0
- package/build/react/importer/utils/errorAnalysis.d.ts +25 -0
- package/build/react/importer/utils/getStringLengthOfChildren.d.ts +2 -0
- package/build/react/importer/utils/stringSimilarity.d.ts +1 -0
- package/build/react/importer/utils/template.d.ts +2 -0
- package/build/react/importer/utils/themeUtils.d.ts +21 -0
- package/build/react/importer/utils/utils.d.ts +19 -0
- package/build/react/index.d.ts +5 -0
- package/build/react/index.esm.js +7541 -0
- package/build/react/index.esm.js.map +1 -0
- package/build/react/index.js +112 -0
- package/build/react/index.js.map +1 -0
- package/build/react/js.d.ts +12 -0
- package/build/react/settings/defaults.d.ts +3 -0
- package/build/react/styles.d.ts +1 -0
- package/build/react/types/index.d.ts +132 -0
- package/build/react/types/theme.d.ts +153 -0
- package/build/react/utils/cn.d.ts +6 -0
- package/build/react/validation/transformationStages.d.ts +26 -0
- package/build/react/validation/transformer.d.ts +17 -0
- package/build/react/validation/validator.d.ts +23 -0
- package/build/services/api.d.ts +50 -0
- package/build/services/apiClient.d.ts +55 -0
- package/build/settings/defaults.d.ts +1 -1
- package/build/shims/react-compat-shim.d.ts +2 -0
- package/build/shims/react-hooks-shim.d.ts +2 -0
- package/build/types/index.d.ts +27 -0
- package/build/types/theme.d.ts +153 -0
- package/build/utils/cn.d.ts +1 -1
- package/build/validation/transformationStages.d.ts +26 -0
- package/build/validation/transformer.d.ts +10 -26
- package/package.json +64 -32
- package/build/bundle.css +0 -1
- package/build/importer/components/IframeWrapper/index.d.ts +0 -25
- package/build/importer/components/ImporterLayout.d.ts +0 -15
- package/build/importer/hooks/useDemoData.d.ts +0 -16
- package/build/importer/hooks/useImporterSchema.d.ts +0 -21
- package/build/importer/services/dataProcessor.d.ts +0 -38
- package/build/index.esm.js +0 -14394
- package/build/index.esm.js.map +0 -1
- package/build/index.js +0 -327
- package/build/index.js.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CSVImporterProps } from './types';
|
|
2
|
+
type CreateImporterProps = CSVImporterProps & {
|
|
3
|
+
domElement?: Element;
|
|
4
|
+
};
|
|
5
|
+
export declare function createCSVImporter(props: CreateImporterProps): {
|
|
6
|
+
instance: (import('../react').FunctionalComponent<import('../react').PropsWithoutRef<CSVImporterProps> & {
|
|
7
|
+
ref?: import('../react').Ref<unknown> | undefined;
|
|
8
|
+
}> & HTMLDialogElement) | null;
|
|
9
|
+
showModal: () => void;
|
|
10
|
+
closeModal: () => void;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const importcsvStyles: string;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { ThemeConfig } from './theme';
|
|
2
|
+
export interface Column {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
type?: 'string' | 'number' | 'email' | 'date' | 'phone' | 'select';
|
|
6
|
+
validators?: Validator[];
|
|
7
|
+
transformations?: Transformer[];
|
|
8
|
+
options?: string[];
|
|
9
|
+
description?: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
}
|
|
12
|
+
export type Validator = {
|
|
13
|
+
type: 'required';
|
|
14
|
+
message?: string;
|
|
15
|
+
} | {
|
|
16
|
+
type: 'unique';
|
|
17
|
+
message?: string;
|
|
18
|
+
} | {
|
|
19
|
+
type: 'regex';
|
|
20
|
+
pattern: string;
|
|
21
|
+
message?: string;
|
|
22
|
+
} | {
|
|
23
|
+
type: 'min';
|
|
24
|
+
value: number;
|
|
25
|
+
message?: string;
|
|
26
|
+
} | {
|
|
27
|
+
type: 'max';
|
|
28
|
+
value: number;
|
|
29
|
+
message?: string;
|
|
30
|
+
} | {
|
|
31
|
+
type: 'min_length';
|
|
32
|
+
value: number;
|
|
33
|
+
message?: string;
|
|
34
|
+
} | {
|
|
35
|
+
type: 'max_length';
|
|
36
|
+
value: number;
|
|
37
|
+
message?: string;
|
|
38
|
+
};
|
|
39
|
+
export type TransformationStage = 'pre' | 'post';
|
|
40
|
+
export type Transformer = {
|
|
41
|
+
type: 'trim';
|
|
42
|
+
stage?: TransformationStage;
|
|
43
|
+
} | {
|
|
44
|
+
type: 'uppercase';
|
|
45
|
+
stage?: TransformationStage;
|
|
46
|
+
} | {
|
|
47
|
+
type: 'lowercase';
|
|
48
|
+
stage?: TransformationStage;
|
|
49
|
+
} | {
|
|
50
|
+
type: 'capitalize';
|
|
51
|
+
stage?: TransformationStage;
|
|
52
|
+
} | {
|
|
53
|
+
type: 'remove_special_chars';
|
|
54
|
+
stage?: TransformationStage;
|
|
55
|
+
} | {
|
|
56
|
+
type: 'normalize_phone';
|
|
57
|
+
stage?: TransformationStage;
|
|
58
|
+
} | {
|
|
59
|
+
type: 'normalize_date';
|
|
60
|
+
format?: string;
|
|
61
|
+
stage?: TransformationStage;
|
|
62
|
+
} | {
|
|
63
|
+
type: 'default';
|
|
64
|
+
value: string;
|
|
65
|
+
stage?: TransformationStage;
|
|
66
|
+
} | {
|
|
67
|
+
type: 'replace';
|
|
68
|
+
find: string;
|
|
69
|
+
replace: string;
|
|
70
|
+
stage?: TransformationStage;
|
|
71
|
+
} | {
|
|
72
|
+
type: 'custom';
|
|
73
|
+
fn: (value: any) => any;
|
|
74
|
+
stage?: TransformationStage;
|
|
75
|
+
};
|
|
76
|
+
export interface ColumnMapping {
|
|
77
|
+
id: string;
|
|
78
|
+
label?: string;
|
|
79
|
+
include: boolean;
|
|
80
|
+
selected?: boolean;
|
|
81
|
+
}
|
|
82
|
+
export interface ColumnMappingDictionary {
|
|
83
|
+
[uploadColumnIndex: number]: ColumnMapping;
|
|
84
|
+
}
|
|
85
|
+
type ModalParams = {
|
|
86
|
+
isModal?: boolean;
|
|
87
|
+
modalIsOpen?: boolean;
|
|
88
|
+
modalOnCloseTriggered?: () => void;
|
|
89
|
+
modalCloseOnOutsideClick?: boolean;
|
|
90
|
+
};
|
|
91
|
+
type CustomTranslationResource = {
|
|
92
|
+
[language: string]: {
|
|
93
|
+
[key: string]: string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
export type CSVImporterProps = {
|
|
97
|
+
columns?: Column[];
|
|
98
|
+
importerKey?: string;
|
|
99
|
+
onComplete?: (data: any) => void;
|
|
100
|
+
backendUrl?: string;
|
|
101
|
+
user?: Record<string, any>;
|
|
102
|
+
metadata?: Record<string, any>;
|
|
103
|
+
theme?: ThemeConfig | 'default' | 'minimal' | 'modern' | 'compact' | 'dark';
|
|
104
|
+
darkMode?: boolean;
|
|
105
|
+
primaryColor?: string;
|
|
106
|
+
className?: string;
|
|
107
|
+
customStyles?: Record<string, string> | string;
|
|
108
|
+
classNames?: {
|
|
109
|
+
root?: string;
|
|
110
|
+
modal?: string;
|
|
111
|
+
header?: string;
|
|
112
|
+
stepper?: string;
|
|
113
|
+
content?: string;
|
|
114
|
+
footer?: string;
|
|
115
|
+
button?: string;
|
|
116
|
+
input?: string;
|
|
117
|
+
table?: string;
|
|
118
|
+
dropzone?: string;
|
|
119
|
+
};
|
|
120
|
+
showDownloadTemplateButton?: boolean;
|
|
121
|
+
skipHeaderRowSelection?: boolean;
|
|
122
|
+
waitOnComplete?: boolean;
|
|
123
|
+
invalidRowHandling?: 'include' | 'exclude' | 'block';
|
|
124
|
+
includeUnmatchedColumns?: boolean;
|
|
125
|
+
language?: string;
|
|
126
|
+
customTranslations?: CustomTranslationResource;
|
|
127
|
+
demoData?: {
|
|
128
|
+
fileName: string;
|
|
129
|
+
csvContent: string;
|
|
130
|
+
};
|
|
131
|
+
} & ModalParams;
|
|
132
|
+
export {};
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme configuration types for CSV Importer
|
|
3
|
+
*/
|
|
4
|
+
export interface ThemeConfig {
|
|
5
|
+
colors?: {
|
|
6
|
+
primary?: string;
|
|
7
|
+
primaryHover?: string;
|
|
8
|
+
primaryForeground?: string;
|
|
9
|
+
secondary?: string;
|
|
10
|
+
secondaryHover?: string;
|
|
11
|
+
secondaryForeground?: string;
|
|
12
|
+
background?: string;
|
|
13
|
+
foreground?: string;
|
|
14
|
+
card?: string;
|
|
15
|
+
cardForeground?: string;
|
|
16
|
+
border?: string;
|
|
17
|
+
input?: string;
|
|
18
|
+
ring?: string;
|
|
19
|
+
muted?: string;
|
|
20
|
+
mutedForeground?: string;
|
|
21
|
+
accent?: string;
|
|
22
|
+
accentForeground?: string;
|
|
23
|
+
destructive?: string;
|
|
24
|
+
destructiveForeground?: string;
|
|
25
|
+
success?: string;
|
|
26
|
+
successForeground?: string;
|
|
27
|
+
warning?: string;
|
|
28
|
+
warningForeground?: string;
|
|
29
|
+
info?: string;
|
|
30
|
+
infoForeground?: string;
|
|
31
|
+
};
|
|
32
|
+
typography?: {
|
|
33
|
+
fontFamily?: string;
|
|
34
|
+
fontFamilyMono?: string;
|
|
35
|
+
fontSize?: {
|
|
36
|
+
xs?: string;
|
|
37
|
+
sm?: string;
|
|
38
|
+
base?: string;
|
|
39
|
+
lg?: string;
|
|
40
|
+
xl?: string;
|
|
41
|
+
'2xl'?: string;
|
|
42
|
+
'3xl'?: string;
|
|
43
|
+
};
|
|
44
|
+
fontWeight?: {
|
|
45
|
+
light?: number;
|
|
46
|
+
normal?: number;
|
|
47
|
+
medium?: number;
|
|
48
|
+
semibold?: number;
|
|
49
|
+
bold?: number;
|
|
50
|
+
};
|
|
51
|
+
lineHeight?: {
|
|
52
|
+
tight?: string;
|
|
53
|
+
normal?: string;
|
|
54
|
+
relaxed?: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
spacing?: {
|
|
58
|
+
xs?: string;
|
|
59
|
+
sm?: string;
|
|
60
|
+
md?: string;
|
|
61
|
+
lg?: string;
|
|
62
|
+
xl?: string;
|
|
63
|
+
'2xl'?: string;
|
|
64
|
+
'3xl'?: string;
|
|
65
|
+
};
|
|
66
|
+
borders?: {
|
|
67
|
+
radius?: {
|
|
68
|
+
none?: string;
|
|
69
|
+
sm?: string;
|
|
70
|
+
md?: string;
|
|
71
|
+
lg?: string;
|
|
72
|
+
xl?: string;
|
|
73
|
+
full?: string;
|
|
74
|
+
};
|
|
75
|
+
width?: {
|
|
76
|
+
none?: string;
|
|
77
|
+
thin?: string;
|
|
78
|
+
medium?: string;
|
|
79
|
+
thick?: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
components?: {
|
|
83
|
+
button?: {
|
|
84
|
+
padding?: string;
|
|
85
|
+
fontSize?: string;
|
|
86
|
+
fontWeight?: string;
|
|
87
|
+
borderRadius?: string;
|
|
88
|
+
height?: string;
|
|
89
|
+
minWidth?: string;
|
|
90
|
+
};
|
|
91
|
+
input?: {
|
|
92
|
+
padding?: string;
|
|
93
|
+
fontSize?: string;
|
|
94
|
+
borderRadius?: string;
|
|
95
|
+
borderWidth?: string;
|
|
96
|
+
height?: string;
|
|
97
|
+
background?: string;
|
|
98
|
+
};
|
|
99
|
+
modal?: {
|
|
100
|
+
width?: string;
|
|
101
|
+
maxWidth?: string;
|
|
102
|
+
maxHeight?: string;
|
|
103
|
+
padding?: string;
|
|
104
|
+
borderRadius?: string;
|
|
105
|
+
backdropOpacity?: string;
|
|
106
|
+
};
|
|
107
|
+
table?: {
|
|
108
|
+
headerBackground?: string;
|
|
109
|
+
headerForeground?: string;
|
|
110
|
+
rowHoverBackground?: string;
|
|
111
|
+
borderColor?: string;
|
|
112
|
+
cellPadding?: string;
|
|
113
|
+
};
|
|
114
|
+
stepper?: {
|
|
115
|
+
activeColor?: string;
|
|
116
|
+
inactiveColor?: string;
|
|
117
|
+
completedColor?: string;
|
|
118
|
+
lineColor?: string;
|
|
119
|
+
dotSize?: string;
|
|
120
|
+
};
|
|
121
|
+
dropzone?: {
|
|
122
|
+
borderStyle?: string;
|
|
123
|
+
borderColor?: string;
|
|
124
|
+
borderColorHover?: string;
|
|
125
|
+
backgroundColor?: string;
|
|
126
|
+
backgroundColorHover?: string;
|
|
127
|
+
padding?: string;
|
|
128
|
+
borderRadius?: string;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
shadows?: {
|
|
132
|
+
sm?: string;
|
|
133
|
+
md?: string;
|
|
134
|
+
lg?: string;
|
|
135
|
+
xl?: string;
|
|
136
|
+
};
|
|
137
|
+
animations?: {
|
|
138
|
+
duration?: {
|
|
139
|
+
fast?: string;
|
|
140
|
+
normal?: string;
|
|
141
|
+
slow?: string;
|
|
142
|
+
};
|
|
143
|
+
easing?: string;
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
export declare const defaultTheme: ThemeConfig;
|
|
147
|
+
export declare const presetThemes: {
|
|
148
|
+
default: ThemeConfig;
|
|
149
|
+
minimal: ThemeConfig;
|
|
150
|
+
modern: ThemeConfig;
|
|
151
|
+
compact: ThemeConfig;
|
|
152
|
+
dark: ThemeConfig;
|
|
153
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transformation stage definitions for smart auto-detection
|
|
3
|
+
*
|
|
4
|
+
* Pre-validation transformations clean and normalize data before validation rules are applied.
|
|
5
|
+
* Post-validation transformations enrich and format data after validation passes.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Transformations that should run BEFORE validation
|
|
9
|
+
* These typically clean or normalize input to prepare it for validation
|
|
10
|
+
*/
|
|
11
|
+
export declare const PRE_VALIDATION_TRANSFORMS: readonly ["trim", "uppercase", "lowercase", "remove_special_chars", "normalize_phone", "normalize_date"];
|
|
12
|
+
/**
|
|
13
|
+
* Transformations that should run AFTER validation
|
|
14
|
+
* These typically format, enrich, or provide defaults for valid data
|
|
15
|
+
*/
|
|
16
|
+
export declare const POST_VALIDATION_TRANSFORMS: readonly ["default", "capitalize", "replace", "custom"];
|
|
17
|
+
export type PreValidationTransform = typeof PRE_VALIDATION_TRANSFORMS[number];
|
|
18
|
+
export type PostValidationTransform = typeof POST_VALIDATION_TRANSFORMS[number];
|
|
19
|
+
/**
|
|
20
|
+
* Check if a transformation type should run before validation
|
|
21
|
+
*/
|
|
22
|
+
export declare function isPreValidationTransform(type: string): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Check if a transformation type should run after validation
|
|
25
|
+
*/
|
|
26
|
+
export declare function isPostValidationTransform(type: string): boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Transformer } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Apply transformations to a value
|
|
4
|
+
* @param value The value to transform
|
|
5
|
+
* @param transformations Array of transformations to apply
|
|
6
|
+
* @returns Transformed value
|
|
7
|
+
*/
|
|
8
|
+
export declare function applyTransformations(value: any, transformations?: Transformer[]): any;
|
|
9
|
+
/**
|
|
10
|
+
* Categorize transformations into pre-validation and post-validation stages
|
|
11
|
+
* @param transformations Array of transformations to categorize
|
|
12
|
+
* @returns Object with pre and post transformation arrays
|
|
13
|
+
*/
|
|
14
|
+
export declare function categorizeTransformations(transformations?: Transformer[]): {
|
|
15
|
+
pre: Transformer[];
|
|
16
|
+
post: Transformer[];
|
|
17
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Column } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a single value against a column's validators
|
|
4
|
+
* @param value The value to validate
|
|
5
|
+
* @param column The column definition with validators
|
|
6
|
+
* @returns Error message if validation fails, null if valid
|
|
7
|
+
*/
|
|
8
|
+
export declare function validateColumn(value: any, column: Column): string | null;
|
|
9
|
+
/**
|
|
10
|
+
* Validates uniqueness across all rows for a column
|
|
11
|
+
* @param rows All data rows
|
|
12
|
+
* @param columnIndex The column index to check
|
|
13
|
+
* @param column The column definition
|
|
14
|
+
* @returns Array of row indices that have duplicate values
|
|
15
|
+
*/
|
|
16
|
+
export declare function validateUniqueness(rows: any[][], columnIndex: number, column: Column): number[];
|
|
17
|
+
/**
|
|
18
|
+
* Batch validation for all rows
|
|
19
|
+
* @param rows Data rows to validate
|
|
20
|
+
* @param columns Column definitions
|
|
21
|
+
* @returns Validation results with errors per cell
|
|
22
|
+
*/
|
|
23
|
+
export declare function validateBatch(rows: any[][], columns: Column[]): Map<string, string>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export function createApi(backendUrl: any, importerKey: any): {
|
|
2
|
+
auth: {
|
|
3
|
+
/**
|
|
4
|
+
* Login to get access token
|
|
5
|
+
* @param {string} email - User email
|
|
6
|
+
* @param {string} password - User password
|
|
7
|
+
* @returns {Promise<Object>} - Response with access token
|
|
8
|
+
*/
|
|
9
|
+
login: (email: string, password: string) => Promise<Object>;
|
|
10
|
+
/**
|
|
11
|
+
* Get current user information
|
|
12
|
+
* @param {string} token - Access token
|
|
13
|
+
* @returns {Promise<Object>} - User information
|
|
14
|
+
*/
|
|
15
|
+
getCurrentUser: (token: string) => Promise<Object>;
|
|
16
|
+
};
|
|
17
|
+
schema: {
|
|
18
|
+
/**
|
|
19
|
+
* Get all schemas
|
|
20
|
+
* @param {string} token - Access token
|
|
21
|
+
* @returns {Promise<Array>} - List of schemas
|
|
22
|
+
*/
|
|
23
|
+
getSchemas: (token: string) => Promise<any[]>;
|
|
24
|
+
/**
|
|
25
|
+
* Get schema template for CSV importer
|
|
26
|
+
* @param {string} token - Access token
|
|
27
|
+
* @param {number} schemaId - Schema ID
|
|
28
|
+
* @returns {Promise<Object>} - Schema template
|
|
29
|
+
*/
|
|
30
|
+
getSchemaTemplate: (token: string, schemaId: number) => Promise<Object>;
|
|
31
|
+
};
|
|
32
|
+
import: {
|
|
33
|
+
/**
|
|
34
|
+
* Process CSV data from the frontend importer
|
|
35
|
+
* @param {string} token - Access token
|
|
36
|
+
* @param {number} schemaId - Schema ID
|
|
37
|
+
* @param {Object} importData - Data from CSV importer
|
|
38
|
+
* @returns {Promise<Object>} - Import job information
|
|
39
|
+
*/
|
|
40
|
+
processCSVData: (token: string, schemaId: number, importData: Object) => Promise<Object>;
|
|
41
|
+
/**
|
|
42
|
+
* Get import job status
|
|
43
|
+
* @param {string} token - Access token
|
|
44
|
+
* @param {number} jobId - Import job ID
|
|
45
|
+
* @returns {Promise<Object>} - Import job status
|
|
46
|
+
*/
|
|
47
|
+
getImportJobStatus: (token: string, jobId: number) => Promise<Object>;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
export default createApi;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export default createApiMethods;
|
|
2
|
+
/**
|
|
3
|
+
* Authentication API
|
|
4
|
+
*/
|
|
5
|
+
export function createApiMethods(backendUrl: any, importerKey: any): {
|
|
6
|
+
client: any;
|
|
7
|
+
auth: {
|
|
8
|
+
/**
|
|
9
|
+
* Login to get access token
|
|
10
|
+
* @param {string} email - User email
|
|
11
|
+
* @param {string} password - User password
|
|
12
|
+
* @returns {Promise<Object>} - Response with access token
|
|
13
|
+
*/
|
|
14
|
+
login: (email: string, password: string) => Promise<Object>;
|
|
15
|
+
/**
|
|
16
|
+
* Logout the current user
|
|
17
|
+
*/
|
|
18
|
+
logout: () => Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Get current user information
|
|
21
|
+
* @returns {Promise<Object>} - User information
|
|
22
|
+
*/
|
|
23
|
+
getCurrentUser: () => Promise<Object>;
|
|
24
|
+
};
|
|
25
|
+
schema: {
|
|
26
|
+
/**
|
|
27
|
+
* Get all schemas
|
|
28
|
+
* @returns {Promise<Array>} - List of schemas
|
|
29
|
+
*/
|
|
30
|
+
getSchemas: () => Promise<any[]>;
|
|
31
|
+
/**
|
|
32
|
+
* Get schema template for CSV importer
|
|
33
|
+
* @param {number} schemaId - Schema ID
|
|
34
|
+
* @returns {Promise<Object>} - Schema template
|
|
35
|
+
*/
|
|
36
|
+
getSchemaTemplate: (schemaId: number) => Promise<Object>;
|
|
37
|
+
};
|
|
38
|
+
import: {
|
|
39
|
+
/**
|
|
40
|
+
* Process CSV data from the frontend importer
|
|
41
|
+
* @param {number} schemaId - Schema ID
|
|
42
|
+
* @param {Object} importData - Data from CSV importer
|
|
43
|
+
* @returns {Promise<Object>} - Import job information
|
|
44
|
+
*/
|
|
45
|
+
processCSVData: (schemaId: number, importData: Object) => Promise<Object>;
|
|
46
|
+
/**
|
|
47
|
+
* Get import job status
|
|
48
|
+
* @param {number} jobId - Import job ID
|
|
49
|
+
* @returns {Promise<Object>} - Import job status
|
|
50
|
+
*/
|
|
51
|
+
getImportJobStatus: (jobId: number) => Promise<Object>;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
export function createApiClient(backendUrl: any, importerKey: any): any;
|
|
55
|
+
export function setupInterceptors(apiClient: any, baseUrl: any): any;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { createPortal } from "react-dom";
|
|
2
|
+
export { Component, PureComponent, memo, createElement, cloneElement, isValidElement, createContext, forwardRef, lazy, Suspense, Fragment, StrictMode, Profiler, useState, useEffect, useContext, useReducer, useCallback, useMemo, useRef, useImperativeHandle, useLayoutEffect, useDebugValue, useTransition, useDeferredValue, useId, useSyncExternalStore, Children, version, default } from "react";
|
package/build/types/index.d.ts
CHANGED
|
@@ -35,31 +35,42 @@ export type Validator = {
|
|
|
35
35
|
value: number;
|
|
36
36
|
message?: string;
|
|
37
37
|
};
|
|
38
|
+
export type TransformationStage = 'pre' | 'post';
|
|
38
39
|
export type Transformer = {
|
|
39
40
|
type: 'trim';
|
|
41
|
+
stage?: TransformationStage;
|
|
40
42
|
} | {
|
|
41
43
|
type: 'uppercase';
|
|
44
|
+
stage?: TransformationStage;
|
|
42
45
|
} | {
|
|
43
46
|
type: 'lowercase';
|
|
47
|
+
stage?: TransformationStage;
|
|
44
48
|
} | {
|
|
45
49
|
type: 'capitalize';
|
|
50
|
+
stage?: TransformationStage;
|
|
46
51
|
} | {
|
|
47
52
|
type: 'remove_special_chars';
|
|
53
|
+
stage?: TransformationStage;
|
|
48
54
|
} | {
|
|
49
55
|
type: 'normalize_phone';
|
|
56
|
+
stage?: TransformationStage;
|
|
50
57
|
} | {
|
|
51
58
|
type: 'normalize_date';
|
|
52
59
|
format?: string;
|
|
60
|
+
stage?: TransformationStage;
|
|
53
61
|
} | {
|
|
54
62
|
type: 'default';
|
|
55
63
|
value: string;
|
|
64
|
+
stage?: TransformationStage;
|
|
56
65
|
} | {
|
|
57
66
|
type: 'replace';
|
|
58
67
|
find: string;
|
|
59
68
|
replace: string;
|
|
69
|
+
stage?: TransformationStage;
|
|
60
70
|
} | {
|
|
61
71
|
type: 'custom';
|
|
62
72
|
fn: (value: any) => any;
|
|
73
|
+
stage?: TransformationStage;
|
|
63
74
|
};
|
|
64
75
|
export interface ColumnMapping {
|
|
65
76
|
id: string;
|
|
@@ -81,6 +92,7 @@ type CustomTranslationResource = {
|
|
|
81
92
|
[key: string]: string;
|
|
82
93
|
};
|
|
83
94
|
};
|
|
95
|
+
import { ThemeConfig } from './theme';
|
|
84
96
|
export type CSVImporterProps = {
|
|
85
97
|
columns?: Column[];
|
|
86
98
|
importerKey?: string;
|
|
@@ -88,13 +100,28 @@ export type CSVImporterProps = {
|
|
|
88
100
|
backendUrl?: string;
|
|
89
101
|
user?: Record<string, any>;
|
|
90
102
|
metadata?: Record<string, any>;
|
|
103
|
+
theme?: ThemeConfig | 'default' | 'minimal' | 'modern' | 'compact' | 'dark';
|
|
91
104
|
darkMode?: boolean;
|
|
92
105
|
primaryColor?: string;
|
|
93
106
|
className?: string;
|
|
94
107
|
customStyles?: Record<string, string> | string;
|
|
108
|
+
classNames?: {
|
|
109
|
+
root?: string;
|
|
110
|
+
modal?: string;
|
|
111
|
+
header?: string;
|
|
112
|
+
stepper?: string;
|
|
113
|
+
content?: string;
|
|
114
|
+
footer?: string;
|
|
115
|
+
button?: string;
|
|
116
|
+
input?: string;
|
|
117
|
+
table?: string;
|
|
118
|
+
dropzone?: string;
|
|
119
|
+
};
|
|
95
120
|
showDownloadTemplateButton?: boolean;
|
|
96
121
|
skipHeaderRowSelection?: boolean;
|
|
97
122
|
waitOnComplete?: boolean;
|
|
123
|
+
invalidRowHandling?: 'include' | 'exclude' | 'block';
|
|
124
|
+
includeUnmatchedColumns?: boolean;
|
|
98
125
|
language?: string;
|
|
99
126
|
customTranslations?: CustomTranslationResource;
|
|
100
127
|
demoData?: {
|