@importcsv/react 0.2.14 → 0.4.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/README.md +2 -0
- package/build/App.d.ts +2 -0
- package/build/bundled/index.esm.js +7797 -4626
- package/build/bundled/index.esm.js.map +1 -1
- package/build/bundled/index.js +58 -31
- package/build/bundled/index.js.map +1 -1
- package/build/bundled/index.umd.js +58 -31
- package/build/bundled/index.umd.js.map +1 -1
- package/build/components/CSVImporter/index.d.ts +55 -0
- package/build/components/CSVImporterHeadless.d.ts +46 -0
- package/build/components/ColumnMapper.d.ts +28 -0
- package/build/{preact/components → components}/Modal/index.d.ts +1 -1
- package/build/components/Uploader.d.ts +27 -0
- package/build/components/Validator.d.ts +28 -0
- package/build/components/__tests__/ColumnMapper.test.d.ts +1 -0
- package/build/components/__tests__/Uploader.test.d.ts +1 -0
- package/build/components/__tests__/Validator.test.d.ts +1 -0
- package/build/components/index.d.ts +3 -0
- package/build/config/index.d.ts +5 -0
- package/build/headless/__tests__/integration.test.d.ts +10 -0
- package/build/headless/__tests__/root.test.d.ts +1 -0
- package/build/headless/__tests__/root.types.test-d.d.ts +1 -0
- package/build/headless/__tests__/slot-components.test.d.ts +1 -0
- package/build/headless/__tests__/validator.test.d.ts +1 -0
- package/build/headless/back-button.d.ts +29 -0
- package/build/headless/index.d.ts +45 -0
- package/build/headless/next-button.d.ts +29 -0
- package/build/headless/root.d.ts +40 -0
- package/build/headless/submit-button.d.ts +29 -0
- package/build/headless/types.d.ts +52 -0
- package/build/headless/upload-trigger.d.ts +29 -0
- package/build/headless/utils/slot.d.ts +20 -0
- package/build/headless/utils/zodSchemaToColumns.d.ts +25 -0
- package/build/headless/utils/zodSchemaToColumns.test.d.ts +1 -0
- package/build/headless/validator.d.ts +28 -0
- package/build/importer/components/Box/index.d.ts +2 -0
- package/build/importer/components/Box/index.test.d.ts +1 -0
- package/build/{preact/importer → importer}/components/Box/types/index.d.ts +1 -0
- package/build/importer/components/Checkbox/index.d.ts +3 -0
- package/build/importer/components/Checkbox/index.test.d.ts +1 -0
- package/build/importer/components/Checkbox/types/index.d.ts +8 -0
- package/build/{bundled/importer → importer}/components/Errors/index.d.ts +1 -1
- package/build/{bundled/importer → importer}/components/Input/index.d.ts +2 -2
- package/build/importer/components/Input/index.test.d.ts +1 -0
- package/build/importer/components/Input/types/index.d.ts +24 -0
- package/build/importer/components/Root/index.d.ts +2 -0
- package/build/{bundled/importer → importer}/components/StepLayout/index.d.ts +3 -2
- package/build/importer/components/Stepper/hooks/useStepper.d.ts +4 -0
- package/build/importer/components/Stepper/hooks/useStepper.test.d.ts +1 -0
- package/build/importer/components/Stepper/index.d.ts +2 -0
- package/build/importer/components/Stepper/index.test.d.ts +1 -0
- package/build/{bundled/importer → importer}/components/Stepper/types/index.d.ts +3 -3
- package/build/{bundled/importer → importer}/components/Table/index.d.ts +2 -2
- package/build/{bundled/importer → importer}/components/Table/types/index.d.ts +6 -5
- package/build/importer/components/ToggleFilter/index.d.ts +3 -0
- package/build/{bundled/importer → importer}/components/Tooltip/index.d.ts +2 -2
- package/build/{preact/importer → importer}/components/Tooltip/types/index.d.ts +3 -3
- package/build/{bundled/importer → importer}/components/UploaderWrapper/NativeDropzone.d.ts +3 -2
- package/build/importer/components/UploaderWrapper/UploaderWrapper.d.ts +2 -0
- package/build/{bundled/importer → importer}/components/UploaderWrapper/types/index.d.ts +1 -1
- package/build/{preact/importer → importer}/components/VirtualTable/index.d.ts +3 -3
- package/build/importer/components/VirtualTable/index.test.d.ts +1 -0
- package/build/importer/components/ui/alert.d.ts +15 -0
- package/build/{bundled/importer → importer}/components/ui/button.d.ts +8 -5
- package/build/importer/components/ui/card.d.ts +20 -0
- package/build/importer/components/ui/checkbox.d.ts +10 -0
- package/build/importer/components/ui/dialog.d.ts +39 -0
- package/build/importer/components/ui/flex.d.ts +24 -0
- package/build/importer/components/ui/input.d.ts +8 -0
- package/build/importer/components/ui/select.d.ts +17 -0
- package/build/importer/components/ui/switch.d.ts +11 -0
- package/build/importer/components/ui/toast.d.ts +22 -0
- package/build/importer/components/ui/toaster.d.ts +2 -0
- package/build/importer/components/ui/tooltip.d.ts +25 -0
- package/build/{preact/importer → importer}/components/ui/use-toast.d.ts +2 -2
- package/build/importer/features/complete/index.d.ts +2 -0
- package/build/{bundled/importer → importer}/features/configure-import/index.d.ts +2 -1
- package/build/importer/features/main/hooks/useMutableLocalStorage.test.d.ts +1 -0
- package/build/{preact/importer → importer}/features/main/hooks/useStepNavigation.d.ts +1 -1
- package/build/importer/features/main/hooks/useStepNavigation.test.d.ts +1 -0
- package/build/importer/features/main/index.d.ts +2 -0
- package/build/{bundled/importer → importer}/features/map-columns/components/DropDownFields.d.ts +3 -2
- package/build/{bundled/importer → importer}/features/map-columns/hooks/useMapColumnsTable.d.ts +6 -5
- package/build/importer/features/map-columns/index.d.ts +3 -0
- package/build/{bundled/importer → importer}/features/map-columns/types/index.d.ts +2 -2
- package/build/{bundled/importer → importer}/features/row-selection/index.d.ts +3 -2
- package/build/{preact/importer → importer}/features/row-selection/types/index.d.ts +1 -1
- package/build/importer/features/uploader/hooks/useTemplateTable.d.ts +10 -0
- package/build/{bundled/importer → importer}/features/uploader/index.d.ts +2 -2
- package/build/{bundled/importer → importer}/features/uploader/types/index.d.ts +3 -3
- package/build/importer/features/validation/Validation.d.ts +3 -0
- package/build/importer/features/validation/__tests__/Validation.zod.test.d.ts +1 -0
- package/build/{bundled/importer → importer}/features/validation/components/TransformModal.d.ts +2 -1
- package/build/{bundled/importer → importer}/features/validation/components/TransformPanel.d.ts +2 -1
- package/build/{bundled/importer → importer}/features/validation/types.d.ts +5 -3
- package/build/importer/hooks/useClickOutside.test.d.ts +1 -0
- package/build/importer/hooks/useCustomStyles.test.d.ts +1 -0
- package/build/{bundled/importer → importer}/hooks/useEventListener.d.ts +1 -1
- package/build/importer/hooks/useEventListener.test.d.ts +1 -0
- package/build/{bundled/importer → importer}/hooks/useIsomorphicLayoutEffect.d.ts +1 -1
- package/build/importer/hooks/useIsomorphicLayoutEffect.test.d.ts +1 -0
- package/build/importer/hooks/useRect.test.d.ts +1 -0
- package/build/importer/hooks/useWindowSize.test.d.ts +1 -0
- package/build/{bundled/importer → importer}/providers/Theme.d.ts +3 -3
- package/build/{bundled/importer → importer}/providers/index.d.ts +3 -3
- package/build/{preact/importer → importer}/providers/types/index.d.ts +1 -1
- package/build/importer/services/api.d.ts +1 -0
- package/build/importer/services/mapping.test.d.ts +1 -0
- package/build/importer/services/transformation.test.d.ts +1 -0
- package/build/importer/settings/theme/index.d.ts +2 -0
- package/build/{preact/importer → importer}/stores/theme.d.ts +3 -3
- package/build/{preact/importer → importer}/theme/runtime.d.ts +4 -0
- package/build/importer/utils/colorUtils.test.d.ts +1 -0
- package/build/importer/utils/errorAnalysis.test.d.ts +1 -0
- package/build/{bundled/importer → importer}/utils/getStringLengthOfChildren.d.ts +1 -1
- package/build/importer/utils/getStringLengthOfChildren.test.d.ts +1 -0
- package/build/importer/utils/stringSimilarity.test.d.ts +1 -0
- package/build/{bundled/importer → importer}/utils/template.d.ts +1 -1
- package/build/importer/utils/template.test.d.ts +1 -0
- package/build/{preact/importer → importer}/utils/themeUtils.d.ts +4 -1
- package/build/importer/utils/themeUtils.test.d.ts +1 -0
- package/build/importer/utils/utils.test.d.ts +1 -0
- package/build/index.d.ts +10 -0
- package/build/index.dev.d.ts +1 -0
- package/build/js.d.ts +57 -0
- package/build/preact/index.esm.js +7219 -4047
- package/build/preact/index.esm.js.map +1 -1
- package/build/preact/index.js +58 -31
- package/build/preact/index.js.map +1 -1
- package/build/react/index.esm.js +7226 -4051
- package/build/react/index.esm.js.map +1 -1
- package/build/react/index.js +58 -31
- package/build/react/index.js.map +1 -1
- package/build/services/api.d.ts +50 -0
- package/build/services/apiClient.d.ts +55 -0
- package/build/{bundled/settings → settings}/defaults.d.ts +1 -1
- package/build/shims/react-compat-shim.d.ts +43 -0
- package/build/shims/react-hooks-shim.d.ts +2 -0
- package/build/test/helpers.d.ts +28 -0
- package/build/test/mocks/api.d.ts +8 -0
- package/build/test/mocks/localStorage.d.ts +6 -0
- package/build/test/setup.d.ts +1 -0
- package/build/{bundled/types → types}/index.d.ts +8 -3
- package/build/{bundled/utils → utils}/cn.d.ts +1 -1
- package/build/utils/cn.test.d.ts +1 -0
- package/package.json +35 -10
- package/build/bundled/components/CSVImporter/index.d.ts +0 -5
- package/build/bundled/components/Modal/index.d.ts +0 -12
- package/build/bundled/importer/components/Box/index.d.ts +0 -2
- package/build/bundled/importer/components/Box/types/index.d.ts +0 -5
- package/build/bundled/importer/components/Checkbox/index.d.ts +0 -2
- package/build/bundled/importer/components/Checkbox/types/index.d.ts +0 -4
- package/build/bundled/importer/components/Input/types/index.d.ts +0 -18
- package/build/bundled/importer/components/Root/index.d.ts +0 -10
- package/build/bundled/importer/components/Stepper/hooks/useStepper.d.ts +0 -2
- package/build/bundled/importer/components/Stepper/index.d.ts +0 -2
- package/build/bundled/importer/components/ToggleFilter/index.d.ts +0 -3
- package/build/bundled/importer/components/Tooltip/types/index.d.ts +0 -11
- package/build/bundled/importer/components/UploaderWrapper/UploaderWrapper.d.ts +0 -2
- package/build/bundled/importer/components/VirtualTable/index.d.ts +0 -17
- package/build/bundled/importer/components/ui/alert.d.ts +0 -13
- package/build/bundled/importer/components/ui/card.d.ts +0 -19
- package/build/bundled/importer/components/ui/checkbox.d.ts +0 -7
- package/build/bundled/importer/components/ui/dialog.d.ts +0 -38
- package/build/bundled/importer/components/ui/flex.d.ts +0 -23
- package/build/bundled/importer/components/ui/input.d.ts +0 -6
- package/build/bundled/importer/components/ui/select.d.ts +0 -13
- package/build/bundled/importer/components/ui/switch.d.ts +0 -7
- package/build/bundled/importer/components/ui/toast.d.ts +0 -22
- package/build/bundled/importer/components/ui/toaster.d.ts +0 -1
- package/build/bundled/importer/components/ui/tooltip.d.ts +0 -24
- package/build/bundled/importer/components/ui/use-toast.d.ts +0 -46
- package/build/bundled/importer/features/complete/index.d.ts +0 -2
- package/build/bundled/importer/features/main/hooks/useStepNavigation.d.ts +0 -17
- package/build/bundled/importer/features/main/index.d.ts +0 -2
- package/build/bundled/importer/features/map-columns/index.d.ts +0 -2
- package/build/bundled/importer/features/row-selection/types/index.d.ts +0 -8
- package/build/bundled/importer/features/uploader/hooks/useTemplateTable.d.ts +0 -10
- package/build/bundled/importer/features/validation/Validation.d.ts +0 -2
- package/build/bundled/importer/providers/types/index.d.ts +0 -10
- package/build/bundled/importer/settings/theme/index.d.ts +0 -2
- package/build/bundled/importer/stores/theme.d.ts +0 -17
- package/build/bundled/importer/theme/runtime.d.ts +0 -62
- package/build/bundled/importer/utils/themeUtils.d.ts +0 -21
- package/build/bundled/index.d.ts +0 -5
- package/build/bundled/js.d.ts +0 -12
- package/build/preact/bundled-styles.d.ts +0 -1
- package/build/preact/components/CSVImporter/index.d.ts +0 -5
- package/build/preact/i18n/de.d.ts +0 -32
- package/build/preact/i18n/es.d.ts +0 -32
- package/build/preact/i18n/fr.d.ts +0 -32
- package/build/preact/i18n/i18n.d.ts +0 -6
- package/build/preact/i18n/it.d.ts +0 -32
- package/build/preact/i18n/useTranslation.d.ts +0 -9
- package/build/preact/importer/components/Box/index.d.ts +0 -2
- package/build/preact/importer/components/Checkbox/index.d.ts +0 -2
- package/build/preact/importer/components/Checkbox/types/index.d.ts +0 -4
- package/build/preact/importer/components/Errors/index.d.ts +0 -4
- package/build/preact/importer/components/Input/index.d.ts +0 -2
- package/build/preact/importer/components/Input/types/index.d.ts +0 -18
- package/build/preact/importer/components/Root/index.d.ts +0 -10
- package/build/preact/importer/components/StepLayout/index.d.ts +0 -18
- package/build/preact/importer/components/Stepper/hooks/useStepper.d.ts +0 -2
- package/build/preact/importer/components/Stepper/index.d.ts +0 -2
- package/build/preact/importer/components/Stepper/types/index.d.ts +0 -14
- package/build/preact/importer/components/Table/index.d.ts +0 -9
- package/build/preact/importer/components/Table/types/index.d.ts +0 -42
- package/build/preact/importer/components/ToggleFilter/index.d.ts +0 -3
- package/build/preact/importer/components/ToggleFilter/types/index.d.ts +0 -11
- package/build/preact/importer/components/Tooltip/index.d.ts +0 -2
- package/build/preact/importer/components/UploaderWrapper/NativeDropzone.d.ts +0 -11
- package/build/preact/importer/components/UploaderWrapper/UploaderWrapper.d.ts +0 -2
- package/build/preact/importer/components/UploaderWrapper/types/index.d.ts +0 -2
- package/build/preact/importer/components/ui/alert.d.ts +0 -13
- package/build/preact/importer/components/ui/button.d.ts +0 -12
- package/build/preact/importer/components/ui/card.d.ts +0 -19
- package/build/preact/importer/components/ui/checkbox.d.ts +0 -7
- package/build/preact/importer/components/ui/dialog.d.ts +0 -38
- package/build/preact/importer/components/ui/flex.d.ts +0 -23
- package/build/preact/importer/components/ui/input.d.ts +0 -6
- package/build/preact/importer/components/ui/select.d.ts +0 -13
- package/build/preact/importer/components/ui/switch.d.ts +0 -7
- package/build/preact/importer/components/ui/toast.d.ts +0 -22
- package/build/preact/importer/components/ui/toaster.d.ts +0 -1
- package/build/preact/importer/components/ui/tooltip.d.ts +0 -24
- package/build/preact/importer/features/complete/index.d.ts +0 -2
- package/build/preact/importer/features/complete/types/index.d.ts +0 -5
- package/build/preact/importer/features/configure-import/index.d.ts +0 -13
- package/build/preact/importer/features/configure-import/types/index.d.ts +0 -13
- package/build/preact/importer/features/main/hooks/useMutableLocalStorage.d.ts +0 -1
- package/build/preact/importer/features/main/index.d.ts +0 -2
- package/build/preact/importer/features/main/types/index.d.ts +0 -16
- package/build/preact/importer/features/map-columns/components/DropDownFields.d.ts +0 -21
- package/build/preact/importer/features/map-columns/hooks/useMapColumnsTable.d.ts +0 -16
- package/build/preact/importer/features/map-columns/index.d.ts +0 -2
- package/build/preact/importer/features/map-columns/types/index.d.ts +0 -16
- package/build/preact/importer/features/row-selection/index.d.ts +0 -2
- package/build/preact/importer/features/uploader/hooks/useTemplateTable.d.ts +0 -10
- package/build/preact/importer/features/uploader/index.d.ts +0 -2
- package/build/preact/importer/features/uploader/types/index.d.ts +0 -9
- package/build/preact/importer/features/validation/Validation.d.ts +0 -2
- package/build/preact/importer/features/validation/components/TransformModal.d.ts +0 -18
- package/build/preact/importer/features/validation/components/TransformPanel.d.ts +0 -18
- package/build/preact/importer/features/validation/index.d.ts +0 -1
- package/build/preact/importer/features/validation/types.d.ts +0 -32
- package/build/preact/importer/hooks/useClickOutside.d.ts +0 -1
- package/build/preact/importer/hooks/useCustomStyles.d.ts +0 -1
- package/build/preact/importer/hooks/useEventListener.d.ts +0 -4
- package/build/preact/importer/hooks/useIsomorphicLayoutEffect.d.ts +0 -3
- package/build/preact/importer/hooks/useRect.d.ts +0 -12
- package/build/preact/importer/hooks/useWindowSize.d.ts +0 -1
- package/build/preact/importer/providers/Theme.d.ts +0 -10
- package/build/preact/importer/providers/index.d.ts +0 -5
- package/build/preact/importer/services/mapping.d.ts +0 -31
- package/build/preact/importer/services/transformation.d.ts +0 -70
- package/build/preact/importer/settings/theme/colors.d.ts +0 -4
- package/build/preact/importer/settings/theme/index.d.ts +0 -2
- package/build/preact/importer/settings/theme/sizes.d.ts +0 -7
- package/build/preact/importer/theme/index.d.ts +0 -8
- package/build/preact/importer/theme/presets.d.ts +0 -314
- package/build/preact/importer/theme/styles.d.ts +0 -120
- package/build/preact/importer/types/index.d.ts +0 -9
- package/build/preact/importer/utils/colorUtils.d.ts +0 -48
- package/build/preact/importer/utils/errorAnalysis.d.ts +0 -25
- package/build/preact/importer/utils/getStringLengthOfChildren.d.ts +0 -2
- package/build/preact/importer/utils/stringSimilarity.d.ts +0 -1
- package/build/preact/importer/utils/template.d.ts +0 -2
- package/build/preact/importer/utils/utils.d.ts +0 -19
- package/build/preact/index.d.ts +0 -5
- package/build/preact/js.d.ts +0 -12
- package/build/preact/settings/defaults.d.ts +0 -3
- package/build/preact/styles.d.ts +0 -1
- package/build/preact/types/index.d.ts +0 -132
- package/build/preact/types/theme.d.ts +0 -153
- package/build/preact/utils/cn.d.ts +0 -6
- package/build/preact/validation/transformationStages.d.ts +0 -26
- package/build/preact/validation/transformer.d.ts +0 -17
- package/build/preact/validation/validator.d.ts +0 -23
- /package/build/{bundled/bundled-styles.d.ts → bundled-styles.d.ts} +0 -0
- /package/build/{bundled/importer/services/api.d.ts → components/CSVImporter/index.test.d.ts} +0 -0
- /package/build/{preact/importer/services/api.d.ts → components/__tests__/CSVImporterHeadless.test.d.ts} +0 -0
- /package/build/{bundled/i18n → i18n}/de.d.ts +0 -0
- /package/build/{bundled/i18n → i18n}/es.d.ts +0 -0
- /package/build/{bundled/i18n → i18n}/fr.d.ts +0 -0
- /package/build/{bundled/i18n → i18n}/i18n.d.ts +0 -0
- /package/build/{bundled/i18n → i18n}/it.d.ts +0 -0
- /package/build/{bundled/i18n → i18n}/useTranslation.d.ts +0 -0
- /package/build/{bundled/importer → importer}/components/ToggleFilter/types/index.d.ts +0 -0
- /package/build/{bundled/importer → importer}/features/complete/types/index.d.ts +0 -0
- /package/build/{bundled/importer → importer}/features/configure-import/types/index.d.ts +0 -0
- /package/build/{bundled/importer → importer}/features/main/hooks/useMutableLocalStorage.d.ts +0 -0
- /package/build/{bundled/importer → importer}/features/main/types/index.d.ts +0 -0
- /package/build/{bundled/importer → importer}/features/validation/index.d.ts +0 -0
- /package/build/{bundled/importer → importer}/hooks/useClickOutside.d.ts +0 -0
- /package/build/{bundled/importer → importer}/hooks/useCustomStyles.d.ts +0 -0
- /package/build/{bundled/importer → importer}/hooks/useRect.d.ts +0 -0
- /package/build/{bundled/importer → importer}/hooks/useWindowSize.d.ts +0 -0
- /package/build/{bundled/importer → importer}/services/mapping.d.ts +0 -0
- /package/build/{bundled/importer → importer}/services/transformation.d.ts +0 -0
- /package/build/{bundled/importer → importer}/settings/theme/colors.d.ts +0 -0
- /package/build/{bundled/importer → importer}/settings/theme/sizes.d.ts +0 -0
- /package/build/{bundled/importer → importer}/theme/index.d.ts +0 -0
- /package/build/{bundled/importer → importer}/theme/presets.d.ts +0 -0
- /package/build/{bundled/importer → importer}/theme/styles.d.ts +0 -0
- /package/build/{bundled/importer → importer}/types/index.d.ts +0 -0
- /package/build/{bundled/importer → importer}/utils/colorUtils.d.ts +0 -0
- /package/build/{bundled/importer → importer}/utils/errorAnalysis.d.ts +0 -0
- /package/build/{bundled/importer → importer}/utils/stringSimilarity.d.ts +0 -0
- /package/build/{bundled/importer → importer}/utils/utils.d.ts +0 -0
- /package/build/{bundled/styles.d.ts → styles.d.ts} +0 -0
- /package/build/{bundled/types → types}/theme.d.ts +0 -0
- /package/build/{bundled/validation → validation}/transformationStages.d.ts +0 -0
- /package/build/{bundled/validation → validation}/transformer.d.ts +0 -0
- /package/build/{bundled/validation → validation}/validator.d.ts +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h } from 'preact';
|
|
2
|
+
import type { ComponentChildren } from 'preact';
|
|
2
3
|
interface StepLayoutProps {
|
|
3
4
|
title?: string;
|
|
4
5
|
subtitle?: string;
|
|
@@ -14,5 +15,5 @@ interface StepLayoutProps {
|
|
|
14
15
|
* Consistent layout wrapper for all importer steps
|
|
15
16
|
* Ensures uniform spacing, typography, and structure
|
|
16
17
|
*/
|
|
17
|
-
export default function StepLayout({ title, subtitle, children, headerContent, footerContent, showHeader, showFooter, className, contentClassName, }: StepLayoutProps):
|
|
18
|
+
export default function StepLayout({ title, subtitle, children, headerContent, footerContent, showHeader, showFooter, className, contentClassName, }: StepLayoutProps): h.JSX.Element;
|
|
18
19
|
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Step, StepperProps } from "../types";
|
|
2
|
+
type UseStepperReturn = Required<Pick<StepperProps, 'steps' | 'current' | 'step' | 'setCurrent' | 'skipHeader'>>;
|
|
3
|
+
export default function useStepper(steps: Step[], initialStep: number | undefined, skipHeader: boolean): UseStepperReturn;
|
|
4
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -6,9 +6,9 @@ export type Step = {
|
|
|
6
6
|
export type StepperProps = {
|
|
7
7
|
steps: Step[];
|
|
8
8
|
current: number;
|
|
9
|
-
setCurrent
|
|
10
|
-
step
|
|
9
|
+
setCurrent?: (step: number) => void;
|
|
10
|
+
step?: Step;
|
|
11
11
|
clickable?: boolean;
|
|
12
|
-
skipHeader
|
|
12
|
+
skipHeader?: boolean;
|
|
13
13
|
hide?: boolean;
|
|
14
14
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { JSX } from 'preact';
|
|
2
|
-
import { TableProps } from
|
|
1
|
+
import type { JSX } from 'preact';
|
|
2
|
+
import { TableProps } from "./types";
|
|
3
3
|
export default function Table({ data, // An array of objects with the data to be displayed
|
|
4
4
|
keyAsId, // Has to be a unique property in the data array to be used as key
|
|
5
5
|
theme, // A CSS module object to style the table
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JSX } from 'preact';
|
|
1
|
+
import type { JSX, VNode, ComponentChildren } from 'preact';
|
|
2
2
|
type Style = {
|
|
3
3
|
readonly [key: string]: string;
|
|
4
4
|
};
|
|
@@ -21,8 +21,8 @@ export type TableProps = {
|
|
|
21
21
|
mergeThemes?: boolean;
|
|
22
22
|
highlightColumns?: string[];
|
|
23
23
|
hideColumns?: string[];
|
|
24
|
-
emptyState?:
|
|
25
|
-
heading?:
|
|
24
|
+
emptyState?: VNode;
|
|
25
|
+
heading?: VNode;
|
|
26
26
|
background?: "zebra" | "dark" | "light" | "transparent";
|
|
27
27
|
columnWidths?: string[];
|
|
28
28
|
columnAlignments?: ("left" | "center" | "right" | "")[];
|
|
@@ -34,9 +34,10 @@ export type RowProps = {
|
|
|
34
34
|
isHeading?: boolean;
|
|
35
35
|
onClick?: (row: TableDatum) => void;
|
|
36
36
|
};
|
|
37
|
-
export type CellProps =
|
|
37
|
+
export type CellProps = {
|
|
38
|
+
children?: ComponentChildren;
|
|
38
39
|
cellClass?: string;
|
|
39
40
|
cellStyle: Style;
|
|
40
41
|
tooltip?: string;
|
|
41
|
-
}
|
|
42
|
+
};
|
|
42
43
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AsMap, TooltipProps } from
|
|
2
|
-
export default function Tooltip<T extends keyof AsMap>({ as, className, title, children, icon, ...props }: TooltipProps<T>): import("
|
|
1
|
+
import { AsMap, TooltipProps } from "./types";
|
|
2
|
+
export default function Tooltip<T extends keyof AsMap>({ as, className, title, children, icon, ...props }: TooltipProps<T>): import("preact").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { JSX, ComponentChildren } from "preact";
|
|
2
2
|
export type AsMap = {
|
|
3
3
|
div: JSX.HTMLAttributes<HTMLDivElement>;
|
|
4
4
|
span: JSX.HTMLAttributes<HTMLSpanElement>;
|
|
@@ -6,6 +6,6 @@ export type AsMap = {
|
|
|
6
6
|
};
|
|
7
7
|
export type TooltipProps<T extends keyof AsMap = "span"> = {
|
|
8
8
|
as?: T;
|
|
9
|
-
title?: string |
|
|
10
|
-
icon?:
|
|
9
|
+
title?: string | ComponentChildren;
|
|
10
|
+
icon?: ComponentChildren;
|
|
11
11
|
} & AsMap[T];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h } from 'preact';
|
|
2
|
+
import type { ComponentChildren } from 'preact';
|
|
2
3
|
interface NativeDropzoneProps {
|
|
3
4
|
onFileSelect: (file: File) => void;
|
|
4
5
|
accept?: Record<string, string[]>;
|
|
@@ -7,5 +8,5 @@ interface NativeDropzoneProps {
|
|
|
7
8
|
className?: string;
|
|
8
9
|
children?: ComponentChildren;
|
|
9
10
|
}
|
|
10
|
-
export default function NativeDropzone({ onFileSelect, accept, disabled, loading, className, children }: NativeDropzoneProps):
|
|
11
|
+
export default function NativeDropzone({ onFileSelect, accept, disabled, loading, className, children }: NativeDropzoneProps): h.JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { UploaderProps } from
|
|
1
|
+
import { UploaderProps } from "../../../features/uploader/types";
|
|
2
2
|
export type UploaderWrapperProps = Omit<UploaderProps, "template"> & {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { JSX } from 'preact';
|
|
2
|
-
import { FileRow } from '../../features/main/types';
|
|
1
|
+
import type { JSX } from 'preact';
|
|
2
|
+
import type { FileRow } from '../../features/main/types';
|
|
3
3
|
interface VirtualTableProps {
|
|
4
4
|
headers: string[];
|
|
5
5
|
rows: FileRow[];
|
|
@@ -13,5 +13,5 @@ interface VirtualTableProps {
|
|
|
13
13
|
headerRowIndex?: number;
|
|
14
14
|
includedColumns: number[];
|
|
15
15
|
}
|
|
16
|
-
export default function VirtualTable({ headers, rows, renderCell, rowHeight, overscan, stickyHeader, stickyFirstColumn, getRowClassName, headerRowIndex, includedColumns, }: VirtualTableProps):
|
|
16
|
+
export default function VirtualTable({ headers, rows, renderCell, rowHeight, overscan, stickyHeader, stickyFirstColumn, getRowClassName, headerRowIndex, includedColumns, }: VirtualTableProps): JSX.Element;
|
|
17
17
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { JSX } from 'preact';
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const alertVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare const Alert: (props: JSX.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants> & {
|
|
7
|
+
ref?: any;
|
|
8
|
+
}) => JSX.Element;
|
|
9
|
+
declare const AlertTitle: (props: JSX.HTMLAttributes<HTMLHeadingElement> & {
|
|
10
|
+
ref?: any;
|
|
11
|
+
}) => JSX.Element;
|
|
12
|
+
declare const AlertDescription: (props: JSX.HTMLAttributes<HTMLParagraphElement> & {
|
|
13
|
+
ref?: any;
|
|
14
|
+
}) => JSX.Element;
|
|
15
|
+
export { Alert, AlertTitle, AlertDescription };
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { JSX } from 'preact';
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
3
|
declare const buttonVariants: (props?: ({
|
|
3
4
|
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
4
5
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
5
|
-
} & import(
|
|
6
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
7
|
export interface ButtonProps extends JSX.HTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
+
type?: 'button' | 'submit' | 'reset';
|
|
7
9
|
isLoading?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
8
11
|
}
|
|
9
|
-
declare const Button:
|
|
10
|
-
ref?:
|
|
11
|
-
}
|
|
12
|
+
declare const Button: (props: ButtonProps & {
|
|
13
|
+
ref?: any;
|
|
14
|
+
}) => JSX.Element;
|
|
12
15
|
export { Button, buttonVariants };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { h } from 'preact';
|
|
2
|
+
declare const Card: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<h.JSX.HTMLAttributes<HTMLDivElement>> & {
|
|
3
|
+
ref?: import("preact").Ref<HTMLDivElement> | undefined;
|
|
4
|
+
}>;
|
|
5
|
+
declare const CardHeader: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<h.JSX.HTMLAttributes<HTMLDivElement>> & {
|
|
6
|
+
ref?: import("preact").Ref<HTMLDivElement> | undefined;
|
|
7
|
+
}>;
|
|
8
|
+
declare const CardTitle: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<h.JSX.HTMLAttributes<HTMLHeadingElement>> & {
|
|
9
|
+
ref?: import("preact").Ref<HTMLParagraphElement> | undefined;
|
|
10
|
+
}>;
|
|
11
|
+
declare const CardDescription: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<h.JSX.HTMLAttributes<HTMLParagraphElement>> & {
|
|
12
|
+
ref?: import("preact").Ref<HTMLParagraphElement> | undefined;
|
|
13
|
+
}>;
|
|
14
|
+
declare const CardContent: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<h.JSX.HTMLAttributes<HTMLDivElement>> & {
|
|
15
|
+
ref?: import("preact").Ref<HTMLDivElement> | undefined;
|
|
16
|
+
}>;
|
|
17
|
+
declare const CardFooter: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<h.JSX.HTMLAttributes<HTMLDivElement>> & {
|
|
18
|
+
ref?: import("preact").Ref<HTMLDivElement> | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { JSX } from 'preact';
|
|
2
|
+
export interface CheckboxProps extends Omit<JSX.HTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
3
|
+
checked?: boolean;
|
|
4
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
5
|
+
onChange?: (e: JSX.TargetedEvent<HTMLInputElement>) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const Checkbox: (props: CheckboxProps & {
|
|
8
|
+
ref?: any;
|
|
9
|
+
}) => JSX.Element;
|
|
10
|
+
export { Checkbox };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { h } from 'preact';
|
|
2
|
+
import type { ComponentChildren, JSX } from 'preact';
|
|
3
|
+
interface DialogProps {
|
|
4
|
+
open?: boolean;
|
|
5
|
+
onOpenChange?: (open: boolean) => void;
|
|
6
|
+
children: ComponentChildren;
|
|
7
|
+
}
|
|
8
|
+
declare const Dialog: ({ open, onOpenChange, children }: DialogProps) => JSX.Element;
|
|
9
|
+
declare const DialogTrigger: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<h.JSX.HTMLAttributes<HTMLButtonElement>> & {
|
|
10
|
+
ref?: import("preact").Ref<HTMLButtonElement> | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
interface DialogContentProps extends JSX.HTMLAttributes<HTMLDialogElement> {
|
|
13
|
+
onClose?: () => void;
|
|
14
|
+
}
|
|
15
|
+
declare const DialogContent: (props: DialogContentProps & {
|
|
16
|
+
ref?: any;
|
|
17
|
+
}) => JSX.Element;
|
|
18
|
+
declare const DialogHeader: {
|
|
19
|
+
({ className, ...props }: JSX.HTMLAttributes<HTMLDivElement>): JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
declare const DialogFooter: {
|
|
23
|
+
({ className, ...props }: JSX.HTMLAttributes<HTMLDivElement>): JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
26
|
+
declare const DialogTitle: (props: JSX.HTMLAttributes<HTMLHeadingElement> & {
|
|
27
|
+
ref?: any;
|
|
28
|
+
}) => JSX.Element;
|
|
29
|
+
declare const DialogDescription: (props: JSX.HTMLAttributes<HTMLParagraphElement> & {
|
|
30
|
+
ref?: any;
|
|
31
|
+
}) => JSX.Element;
|
|
32
|
+
declare const DialogPortal: ({ children }: {
|
|
33
|
+
children: ComponentChildren;
|
|
34
|
+
}) => ComponentChildren;
|
|
35
|
+
declare const DialogOverlay: () => null;
|
|
36
|
+
declare const DialogClose: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<h.JSX.HTMLAttributes<HTMLButtonElement>> & {
|
|
37
|
+
ref?: import("preact").Ref<HTMLButtonElement> | undefined;
|
|
38
|
+
}>;
|
|
39
|
+
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { JSX } from 'preact';
|
|
2
|
+
interface FlexProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
direction?: "row" | "column" | "row-reverse" | "column-reverse";
|
|
4
|
+
align?: "start" | "center" | "end" | "stretch" | "baseline";
|
|
5
|
+
justify?: "start" | "center" | "end" | "between" | "around" | "evenly";
|
|
6
|
+
wrap?: boolean;
|
|
7
|
+
gap?: number | string;
|
|
8
|
+
}
|
|
9
|
+
declare const Flex: (props: FlexProps & {
|
|
10
|
+
ref?: any;
|
|
11
|
+
}) => JSX.Element;
|
|
12
|
+
declare const Box: (props: JSX.HTMLAttributes<HTMLDivElement> & {
|
|
13
|
+
ref?: any;
|
|
14
|
+
}) => JSX.Element;
|
|
15
|
+
declare const HStack: (props: Omit<FlexProps, "direction"> & {
|
|
16
|
+
ref?: any;
|
|
17
|
+
}) => JSX.Element;
|
|
18
|
+
declare const VStack: (props: Omit<FlexProps, "direction"> & {
|
|
19
|
+
ref?: any;
|
|
20
|
+
}) => JSX.Element;
|
|
21
|
+
declare const Text: (props: JSX.HTMLAttributes<HTMLDivElement> & {
|
|
22
|
+
ref?: any;
|
|
23
|
+
}) => JSX.Element;
|
|
24
|
+
export { Flex, Box, HStack, VStack, Text };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { JSX } from 'preact';
|
|
2
|
+
interface SelectProps extends JSX.HTMLAttributes<HTMLSelectElement> {
|
|
3
|
+
placeholder?: string;
|
|
4
|
+
options?: Array<{
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}>;
|
|
9
|
+
onValueChange?: (value: string) => void;
|
|
10
|
+
value?: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const Select: (props: SelectProps & {
|
|
15
|
+
ref?: any;
|
|
16
|
+
}) => JSX.Element;
|
|
17
|
+
export { Select };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JSX } from 'preact';
|
|
2
|
+
export interface SwitchProps extends Omit<JSX.HTMLAttributes<HTMLInputElement>, 'type'> {
|
|
3
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
onChange?: (e: JSX.TargetedEvent<HTMLInputElement>) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const Switch: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<SwitchProps> & {
|
|
9
|
+
ref?: import("preact").Ref<HTMLInputElement> | undefined;
|
|
10
|
+
}>;
|
|
11
|
+
export { Switch };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { JSX } from 'preact';
|
|
2
|
+
export interface ToastProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
variant?: 'default' | 'destructive';
|
|
4
|
+
onClose?: () => void;
|
|
5
|
+
}
|
|
6
|
+
declare const Toast: (props: ToastProps & {
|
|
7
|
+
ref?: any;
|
|
8
|
+
}) => JSX.Element;
|
|
9
|
+
declare const ToastAction: (props: JSX.HTMLAttributes<HTMLButtonElement> & {
|
|
10
|
+
ref?: any;
|
|
11
|
+
}) => JSX.Element;
|
|
12
|
+
declare const ToastClose: (props: JSX.HTMLAttributes<HTMLButtonElement> & {
|
|
13
|
+
ref?: any;
|
|
14
|
+
}) => JSX.Element;
|
|
15
|
+
declare const ToastTitle: (props: JSX.HTMLAttributes<HTMLDivElement> & {
|
|
16
|
+
ref?: any;
|
|
17
|
+
}) => JSX.Element;
|
|
18
|
+
declare const ToastDescription: (props: JSX.HTMLAttributes<HTMLDivElement> & {
|
|
19
|
+
ref?: any;
|
|
20
|
+
}) => JSX.Element;
|
|
21
|
+
type ToastActionElement = JSX.Element;
|
|
22
|
+
export { Toast, ToastAction, ToastClose, ToastTitle, ToastDescription, type ToastActionElement, };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { h } from 'preact';
|
|
2
|
+
import type { ComponentChildren } from 'preact';
|
|
3
|
+
interface TooltipProps {
|
|
4
|
+
content: ComponentChildren;
|
|
5
|
+
children: ComponentChildren;
|
|
6
|
+
delayDuration?: number;
|
|
7
|
+
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const Tooltip: ({ content, children, delayDuration, side, className }: TooltipProps) => h.JSX.Element;
|
|
11
|
+
declare const TooltipProvider: ({ children }: {
|
|
12
|
+
children: ComponentChildren;
|
|
13
|
+
}) => h.JSX.Element;
|
|
14
|
+
declare const TooltipRoot: ({ content, children, delayDuration, side, className }: TooltipProps) => h.JSX.Element;
|
|
15
|
+
declare const TooltipTrigger: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<h.JSX.HTMLAttributes<HTMLDivElement> & {
|
|
16
|
+
asChild?: boolean | undefined;
|
|
17
|
+
}> & {
|
|
18
|
+
ref?: import("preact").Ref<HTMLDivElement> | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
declare const TooltipContent: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<h.JSX.HTMLAttributes<HTMLDivElement> & {
|
|
21
|
+
sideOffset?: number | undefined;
|
|
22
|
+
}> & {
|
|
23
|
+
ref?: import("preact").Ref<HTMLDivElement> | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
export { Tooltip, TooltipRoot, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentChildren } from 'preact';
|
|
2
|
-
import { ToastActionElement, ToastProps } from
|
|
1
|
+
import type { ComponentChildren } from 'preact';
|
|
2
|
+
import type { ToastActionElement, ToastProps } from "./toast";
|
|
3
3
|
type ToasterToast = ToastProps & {
|
|
4
4
|
id: string;
|
|
5
5
|
title?: ComponentChildren;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { JSX } from 'preact';
|
|
1
2
|
import { Column, ColumnMappingDictionary } from '../../../types';
|
|
2
3
|
interface ConfigureImportProps {
|
|
3
4
|
columns?: Column[];
|
|
@@ -9,5 +10,5 @@ interface ConfigureImportProps {
|
|
|
9
10
|
backendUrl?: string;
|
|
10
11
|
isDemoMode?: boolean;
|
|
11
12
|
}
|
|
12
|
-
export default function ConfigureImport({ columns, data, onSuccess, onCancel, isSubmitting, importerKey, backendUrl, isDemoMode, }: ConfigureImportProps):
|
|
13
|
+
export default function ConfigureImport({ columns, data, onSuccess, onCancel, isSubmitting, importerKey, backendUrl, isDemoMode, }: ConfigureImportProps): JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -10,7 +10,7 @@ declare function useStepNavigation(initialStep: number, skipHeader: boolean, isD
|
|
|
10
10
|
setStep: (newStep: number) => void;
|
|
11
11
|
goBack: (backStep?: number) => void;
|
|
12
12
|
goNext: (nextStep?: number) => void;
|
|
13
|
-
stepper: import(
|
|
13
|
+
stepper: Required<Pick<import("../../../components/Stepper/types").StepperProps, "steps" | "current" | "skipHeader" | "step" | "setCurrent">>;
|
|
14
14
|
stepId: string | number | undefined;
|
|
15
15
|
setStorageStep: any;
|
|
16
16
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/build/{bundled/importer → importer}/features/map-columns/components/DropDownFields.d.ts
RENAMED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { JSX } from "preact";
|
|
2
|
+
import { InputOption } from "../../../components/Input/types";
|
|
2
3
|
type DropdownFieldsProps = {
|
|
3
4
|
options: {
|
|
4
5
|
[key: string]: InputOption;
|
|
@@ -17,5 +18,5 @@ type DropdownFieldsProps = {
|
|
|
17
18
|
selected: boolean | undefined;
|
|
18
19
|
}[]) => void;
|
|
19
20
|
};
|
|
20
|
-
export default function DropdownFields({ options, value, placeholder, onChange, selectedValues, updateSelectedValues }: DropdownFieldsProps):
|
|
21
|
+
export default function DropdownFields({ options, value, placeholder, onChange, selectedValues, updateSelectedValues }: DropdownFieldsProps): JSX.Element;
|
|
21
22
|
export {};
|
package/build/{bundled/importer → importer}/features/map-columns/hooks/useMapColumnsTable.d.ts
RENAMED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { JSX } from "preact";
|
|
2
|
+
import { UploadColumn } from "../../../types";
|
|
3
|
+
import { Column } from "../../../../types";
|
|
4
|
+
import { TemplateColumnMapping } from "../types";
|
|
4
5
|
export default function useMapColumnsTable(uploadColumns: UploadColumn[], templateColumns: Column[] | undefined, columnsValues: {
|
|
5
6
|
[uploadColumnIndex: number]: TemplateColumnMapping;
|
|
6
7
|
}, isLoading?: boolean, importerKey?: string, backendUrl?: string): {
|
|
7
8
|
rows: {
|
|
8
9
|
[x: string]: {
|
|
9
10
|
raw: string | boolean;
|
|
10
|
-
content: string |
|
|
11
|
+
content: string | JSX.Element;
|
|
11
12
|
};
|
|
12
13
|
}[];
|
|
13
14
|
formValues: {
|
|
14
|
-
[key: number]: import(
|
|
15
|
+
[key: number]: import("../types").ColumnMapping;
|
|
15
16
|
};
|
|
16
17
|
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { JSX } from "preact";
|
|
2
|
+
import { MapColumnsProps } from "./types";
|
|
3
|
+
export default function MapColumns({ columns, data, columnMapping, selectedHeaderRow, skipHeaderRowSelection, onSuccess, onCancel, isSubmitting, importerKey, backendUrl, }: MapColumnsProps): JSX.Element | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Column, ColumnMapping, ColumnMappingDictionary } from
|
|
2
|
-
import { FileData } from
|
|
1
|
+
import { Column, ColumnMapping, ColumnMappingDictionary } from "../../../../types";
|
|
2
|
+
import { FileData } from "../../main/types";
|
|
3
3
|
export type { ColumnMapping, ColumnMappingDictionary };
|
|
4
4
|
export type TemplateColumnMapping = ColumnMapping;
|
|
5
5
|
export type MapColumnsProps = {
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import type { JSX } from "preact";
|
|
2
|
+
import { RowSelectionProps } from "./types";
|
|
3
|
+
export default function RowSelection({ data, onSuccess, onCancel, selectedHeaderRow, setSelectedHeaderRow }: RowSelectionProps): JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Column } from "../../../../types";
|
|
2
|
+
export default function useTemplateTable(fields?: Column[]): {
|
|
3
|
+
[x: string]: string | {
|
|
4
|
+
raw: string;
|
|
5
|
+
content: import("preact").JSX.Element;
|
|
6
|
+
} | {
|
|
7
|
+
raw: number;
|
|
8
|
+
content: import("preact").JSX.Element;
|
|
9
|
+
};
|
|
10
|
+
}[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { UploaderProps } from
|
|
2
|
-
export default function Uploader({ columns, skipHeaderRowSelection, onSuccess, showDownloadTemplateButton, setDataError }: UploaderProps): import("
|
|
1
|
+
import { UploaderProps } from "./types";
|
|
2
|
+
export default function Uploader({ columns, skipHeaderRowSelection, onSuccess, showDownloadTemplateButton, setDataError }: UploaderProps): import("preact").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Column } from
|
|
2
|
-
import {
|
|
1
|
+
import { Column } from "../../../../types";
|
|
2
|
+
import { StateUpdater } from 'preact/hooks';
|
|
3
3
|
export type UploaderProps = {
|
|
4
4
|
columns?: Column[];
|
|
5
5
|
skipHeaderRowSelection: boolean;
|
|
6
6
|
onSuccess: (file: File) => void;
|
|
7
7
|
showDownloadTemplateButton?: boolean;
|
|
8
|
-
setDataError:
|
|
8
|
+
setDataError: StateUpdater<string | null>;
|
|
9
9
|
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { JSX } from 'preact';
|
|
2
|
+
import { ValidationProps } from './types';
|
|
3
|
+
export default function Validation({ columns, schema, data: fileData, columnMapping, selectedHeaderRow, onSuccess, onCancel, isSubmitting, backendUrl, importerKey, filterInvalidRows, disableOnInvalidRows, }: ValidationProps): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/build/{bundled/importer → importer}/features/validation/components/TransformModal.d.ts
RENAMED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { JSX } from 'preact';
|
|
1
2
|
import { TransformationChange } from '../../../services/transformation';
|
|
2
3
|
interface TransformModalProps {
|
|
3
4
|
isOpen: boolean;
|
|
@@ -14,5 +15,5 @@ interface TransformModalProps {
|
|
|
14
15
|
}>;
|
|
15
16
|
onApplyTransformations: (changes: TransformationChange[]) => void;
|
|
16
17
|
}
|
|
17
|
-
export default function TransformModal({ isOpen, onClose, data, columnMapping, backendUrl, importerKey, validationErrors, onApplyTransformations }: TransformModalProps):
|
|
18
|
+
export default function TransformModal({ isOpen, onClose, data, columnMapping, backendUrl, importerKey, validationErrors, onApplyTransformations }: TransformModalProps): JSX.Element;
|
|
18
19
|
export {};
|
package/build/{bundled/importer → importer}/features/validation/components/TransformPanel.d.ts
RENAMED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { JSX } from 'preact';
|
|
1
2
|
import { TransformationChange } from '../../../services/transformation';
|
|
2
3
|
interface TransformPanelProps {
|
|
3
4
|
isOpen: boolean;
|
|
@@ -14,5 +15,5 @@ interface TransformPanelProps {
|
|
|
14
15
|
}>;
|
|
15
16
|
onApplyTransformations: (changes: TransformationChange[]) => void;
|
|
16
17
|
}
|
|
17
|
-
export default function TransformPanel({ isOpen, onClose, data, columnMapping, backendUrl, importerKey, validationErrors, onApplyTransformations }: TransformPanelProps):
|
|
18
|
+
export default function TransformPanel({ isOpen, onClose, data, columnMapping, backendUrl, importerKey, validationErrors, onApplyTransformations }: TransformPanelProps): JSX.Element | null;
|
|
18
19
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { FileData } from
|
|
2
|
-
import { TemplateColumnMapping } from
|
|
3
|
-
import { Column } from
|
|
1
|
+
import { FileData } from "../main/types";
|
|
2
|
+
import { TemplateColumnMapping } from "../map-columns/types";
|
|
3
|
+
import { Column } from "../../../types";
|
|
4
|
+
import { z } from 'zod';
|
|
4
5
|
export interface ValidationError {
|
|
5
6
|
rowIndex: number;
|
|
6
7
|
columnIndex: number;
|
|
@@ -9,6 +10,7 @@ export interface ValidationError {
|
|
|
9
10
|
}
|
|
10
11
|
export interface ValidationProps {
|
|
11
12
|
columns?: Column[];
|
|
13
|
+
schema?: z.ZodSchema<any>;
|
|
12
14
|
data: FileData;
|
|
13
15
|
columnMapping: {
|
|
14
16
|
[index: number]: TemplateColumnMapping;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RefObject } from
|
|
1
|
+
import type { RefObject } from "preact";
|
|
2
2
|
declare function useEventListener<K extends keyof WindowEventMap>(eventName: K, handler: (event: WindowEventMap[K]) => void): void;
|
|
3
3
|
declare function useEventListener<K extends keyof HTMLElementEventMap, T extends HTMLElement = HTMLDivElement>(eventName: K, handler: (event: HTMLElementEventMap[K]) => void, element: RefObject<T>): void;
|
|
4
4
|
export default useEventListener;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|