@importcsv/react 0.2.13 → 0.3.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 +6815 -3493
- package/build/bundled/index.esm.js.map +1 -1
- package/build/bundled/index.js +32 -31
- package/build/bundled/index.js.map +1 -1
- package/build/bundled/index.umd.js +32 -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 +6484 -3161
- package/build/preact/index.esm.js.map +1 -1
- package/build/preact/index.js +30 -29
- package/build/preact/index.js.map +1 -1
- package/build/{preact/types → react}/index.d.ts +45 -24
- package/build/react/index.esm.js +6489 -3163
- package/build/react/index.esm.js.map +1 -1
- package/build/react/index.js +30 -29
- 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 +29 -8
- 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/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
|
@@ -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,43 @@
|
|
|
1
|
+
export * from "react";
|
|
2
|
+
export { default } from "react";
|
|
3
|
+
export const useState: typeof React.useState;
|
|
4
|
+
export const useEffect: typeof React.useEffect;
|
|
5
|
+
export const useContext: typeof React.useContext;
|
|
6
|
+
export const useReducer: typeof React.useReducer;
|
|
7
|
+
export const useCallback: typeof React.useCallback;
|
|
8
|
+
export const useMemo: typeof React.useMemo;
|
|
9
|
+
export const useRef: typeof React.useRef;
|
|
10
|
+
export const useImperativeHandle: typeof React.useImperativeHandle;
|
|
11
|
+
export const useLayoutEffect: typeof React.useLayoutEffect;
|
|
12
|
+
export const useDebugValue: typeof React.useDebugValue;
|
|
13
|
+
export const createContext: typeof React.createContext;
|
|
14
|
+
export const createElement: typeof React.createElement;
|
|
15
|
+
export const createRef: typeof React.createRef;
|
|
16
|
+
export const Component: typeof React.Component;
|
|
17
|
+
export const PureComponent: typeof React.PureComponent;
|
|
18
|
+
export const memo: typeof React.memo;
|
|
19
|
+
export const forwardRef: typeof React.forwardRef;
|
|
20
|
+
export const lazy: typeof React.lazy;
|
|
21
|
+
export const Suspense: React.ExoticComponent<React.SuspenseProps>;
|
|
22
|
+
export const Fragment: React.ExoticComponent<{
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
}>;
|
|
25
|
+
export const StrictMode: React.ExoticComponent<{
|
|
26
|
+
children?: React.ReactNode;
|
|
27
|
+
}>;
|
|
28
|
+
export const isValidElement: typeof React.isValidElement;
|
|
29
|
+
export const cloneElement: typeof React.cloneElement;
|
|
30
|
+
export const Children: {
|
|
31
|
+
map<T, C>(children: C | readonly C[], fn: (child: C, index: number) => T): C extends null | undefined ? C : Exclude<T, boolean | null | undefined>[];
|
|
32
|
+
forEach<C_1>(children: C_1 | readonly C_1[], fn: (child: C_1, index: number) => void): void;
|
|
33
|
+
count(children: any): number;
|
|
34
|
+
only<C_2>(children: C_2): C_2 extends any[] ? never : C_2;
|
|
35
|
+
toArray(children: React.ReactNode | React.ReactNode[]): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal)[];
|
|
36
|
+
};
|
|
37
|
+
export const createPortal: typeof ReactDOM.createPortal;
|
|
38
|
+
export const render: ReactDOM.Renderer;
|
|
39
|
+
export const hydrate: ReactDOM.Renderer;
|
|
40
|
+
export const unmountComponentAtNode: typeof ReactDOM.unmountComponentAtNode;
|
|
41
|
+
export const findDOMNode: typeof ReactDOM.findDOMNode;
|
|
42
|
+
import * as React from "react";
|
|
43
|
+
import * as ReactDOM from "react-dom";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loads a CSV fixture file and parses it into rows
|
|
3
|
+
*/
|
|
4
|
+
export declare function loadCSVFixture(filename: string): {
|
|
5
|
+
headers: string[];
|
|
6
|
+
rows: Record<string, any>[];
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Sample data generators for common use cases
|
|
10
|
+
*/
|
|
11
|
+
export declare const fixtures: {
|
|
12
|
+
valid: () => {
|
|
13
|
+
headers: string[];
|
|
14
|
+
rows: Record<string, any>[];
|
|
15
|
+
};
|
|
16
|
+
malformed: () => {
|
|
17
|
+
headers: string[];
|
|
18
|
+
rows: Record<string, any>[];
|
|
19
|
+
};
|
|
20
|
+
empty: () => {
|
|
21
|
+
headers: string[];
|
|
22
|
+
rows: Record<string, any>[];
|
|
23
|
+
};
|
|
24
|
+
large: () => {
|
|
25
|
+
headers: string[];
|
|
26
|
+
rows: Record<string, any>[];
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mock fetch for API tests
|
|
3
|
+
*/
|
|
4
|
+
export declare function mockFetch(response: any, ok?: boolean): import("@vitest/spy").Mock<(...args: any[]) => any>;
|
|
5
|
+
/**
|
|
6
|
+
* Mock fetch with error
|
|
7
|
+
*/
|
|
8
|
+
export declare function mockFetchError(error: Error): import("@vitest/spy").Mock<(...args: any[]) => any>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function mockLocalStorage(): {
|
|
2
|
+
getItem: import("@vitest/spy").Mock<(key: string) => string | null>;
|
|
3
|
+
setItem: import("@vitest/spy").Mock<(key: string, value: string) => void>;
|
|
4
|
+
removeItem: import("@vitest/spy").Mock<(key: string) => void>;
|
|
5
|
+
clear: import("@vitest/spy").Mock<() => void>;
|
|
6
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ThemeConfig } from './theme';
|
|
2
1
|
export interface Column {
|
|
3
2
|
id: string;
|
|
4
3
|
label: string;
|
|
@@ -93,10 +92,16 @@ type CustomTranslationResource = {
|
|
|
93
92
|
[key: string]: string;
|
|
94
93
|
};
|
|
95
94
|
};
|
|
96
|
-
|
|
95
|
+
import { ThemeConfig } from './theme';
|
|
96
|
+
import { z } from 'zod';
|
|
97
|
+
export type CSVImporterProps<TSchema = any> = {
|
|
98
|
+
schema?: z.ZodSchema<TSchema>;
|
|
99
|
+
/**
|
|
100
|
+
* @deprecated Use `schema` prop instead for better type safety
|
|
101
|
+
*/
|
|
97
102
|
columns?: Column[];
|
|
98
103
|
importerKey?: string;
|
|
99
|
-
onComplete?: (data:
|
|
104
|
+
onComplete?: (data: TSchema[]) => void;
|
|
100
105
|
backendUrl?: string;
|
|
101
106
|
user?: Record<string, any>;
|
|
102
107
|
metadata?: Record<string, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@importcsv/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "AI-powered CSV importer for React. Smart column mapping with OpenAI, natural language transformations. Self-hosted.",
|
|
5
5
|
"main": "build/react/index.js",
|
|
6
6
|
"module": "build/react/index.esm.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
],
|
|
34
34
|
"repository": {
|
|
35
35
|
"type": "git",
|
|
36
|
-
"url": "git+https://github.com/
|
|
36
|
+
"url": "git+https://github.com/importcsv/importcsv.git"
|
|
37
37
|
},
|
|
38
38
|
"keywords": [
|
|
39
39
|
"csv",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"homepage": "https://github.com/importcsv/importcsv#readme",
|
|
53
53
|
"types": "build/react/index.d.ts",
|
|
54
54
|
"scripts": {
|
|
55
|
-
"build:react": "vite build --mode react",
|
|
55
|
+
"build:react": "vite build --mode react && cp types/index.d.ts build/react/index.d.ts",
|
|
56
56
|
"build:preact": "vite build --mode preact",
|
|
57
57
|
"build:bundled": "vite build --mode bundled",
|
|
58
58
|
"build": "npm-run-all --parallel build:react build:preact build:bundled",
|
|
@@ -67,13 +67,20 @@
|
|
|
67
67
|
"publish:react:major": "npm version major && npm run build:react && npm publish",
|
|
68
68
|
"yalc:publish": "npm run build:react && yalc publish --push",
|
|
69
69
|
"yalc:watch": "npm run watch:react & yalc publish --push --changed",
|
|
70
|
+
"test": "vitest run",
|
|
71
|
+
"test:watch": "vitest",
|
|
72
|
+
"test:ui": "vitest --ui",
|
|
73
|
+
"test:coverage": "vitest run --coverage",
|
|
74
|
+
"test:visual": "playwright test",
|
|
75
|
+
"test:all": "npm run test && npm run test:visual",
|
|
70
76
|
"test:local": "npm run build:react && npm link && echo 'Package linked! Run \"npm link @importcsv/react\" in your test app'",
|
|
71
77
|
"test:app": "cd /Users/abhishekray/Projects/importcsv/test/csv-importer-test && npm link @importcsv/react && npm run dev"
|
|
72
78
|
},
|
|
73
79
|
"peerDependencies": {
|
|
74
80
|
"preact": "^10.0.0",
|
|
75
81
|
"react": "^16.8.0 || ^17 || ^18 || ^19",
|
|
76
|
-
"react-dom": "^16.8.0 || ^17 || ^18 || ^19"
|
|
82
|
+
"react-dom": "^16.8.0 || ^17 || ^18 || ^19",
|
|
83
|
+
"zod": "^3.20.0"
|
|
77
84
|
},
|
|
78
85
|
"peerDependenciesMeta": {
|
|
79
86
|
"react": {
|
|
@@ -84,6 +91,9 @@
|
|
|
84
91
|
},
|
|
85
92
|
"preact": {
|
|
86
93
|
"optional": true
|
|
94
|
+
},
|
|
95
|
+
"zod": {
|
|
96
|
+
"optional": true
|
|
87
97
|
}
|
|
88
98
|
},
|
|
89
99
|
"optionalDependencies": {
|
|
@@ -95,6 +105,9 @@
|
|
|
95
105
|
"@babel/preset-typescript": "^7.21.5",
|
|
96
106
|
"@preact/compat": "^18.3.1",
|
|
97
107
|
"@preact/preset-vite": "^2.10.2",
|
|
108
|
+
"@testing-library/jest-dom": "^6.9.0",
|
|
109
|
+
"@testing-library/preact": "^3.2.4",
|
|
110
|
+
"@testing-library/user-event": "^14.6.1",
|
|
98
111
|
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
|
|
99
112
|
"@types/babel__core": "^7.20.1",
|
|
100
113
|
"@types/jest": "^24.9.1",
|
|
@@ -106,14 +119,20 @@
|
|
|
106
119
|
"@typescript-eslint/eslint-plugin": "^5.56.0",
|
|
107
120
|
"@typescript-eslint/parser": "^5.56.0",
|
|
108
121
|
"@vitejs/plugin-react": "^5.0.1",
|
|
122
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
123
|
+
"@vitest/ui": "^3.2.4",
|
|
124
|
+
"autoprefixer": "^10.4.21",
|
|
109
125
|
"core-js": "^3.22.7",
|
|
110
126
|
"css-loader": "^6.8.1",
|
|
111
127
|
"eslint-config-prettier": "^8.8.0",
|
|
112
128
|
"eslint-plugin-prettier": "^4.2.1",
|
|
113
129
|
"eslint-plugin-react": "^7.32.2",
|
|
130
|
+
"happy-dom": "^19.0.2",
|
|
114
131
|
"identity-obj-proxy": "^3.0.0",
|
|
115
132
|
"jest": "^26.6.3",
|
|
133
|
+
"jsdom": "^27.0.0",
|
|
116
134
|
"npm-run-all": "^4.1.5",
|
|
135
|
+
"postcss": "^8.5.3",
|
|
117
136
|
"postcss-import": "^16.1.1",
|
|
118
137
|
"postcss-prefix-selector": "^2.1.1",
|
|
119
138
|
"prettier": "^2.8.6",
|
|
@@ -121,22 +140,24 @@
|
|
|
121
140
|
"style-loader": "^3.3.3",
|
|
122
141
|
"tailwindcss": "^3.4.0",
|
|
123
142
|
"ts-jest": "^26.5.6",
|
|
143
|
+
"tsd": "^0.33.0",
|
|
124
144
|
"typescript": "^4.5.5",
|
|
125
145
|
"typescript-plugin-css-modules": "^3.4.0",
|
|
126
146
|
"use-sync-external-store": "^1.2.0",
|
|
127
147
|
"vite": "^7.1.3",
|
|
128
148
|
"vite-plugin-css-injected-by-js": "^3.5.2",
|
|
129
|
-
"vite-plugin-dts": "^4.5.4"
|
|
149
|
+
"vite-plugin-dts": "^4.5.4",
|
|
150
|
+
"vitest": "^3.2.4",
|
|
151
|
+
"vitest-axe": "^0.1.0",
|
|
152
|
+
"zod": "^3.25.76"
|
|
130
153
|
},
|
|
131
154
|
"dependencies": {
|
|
155
|
+
"@radix-ui/react-slot": "^1.2.3",
|
|
132
156
|
"@tanstack/react-virtual": "^3.13.12",
|
|
133
|
-
"autoprefixer": "^10.4.21",
|
|
134
157
|
"class-variance-authority": "^0.7.1",
|
|
135
158
|
"clsx": "^2.1.1",
|
|
136
159
|
"lucide-react": "^0.507.0",
|
|
137
160
|
"papaparse": "^5.4.1",
|
|
138
|
-
"postcss": "^8.5.3",
|
|
139
|
-
"preact": "^10.0.0",
|
|
140
161
|
"react-hotkeys-hook": "^5.1.0",
|
|
141
162
|
"tailwind-merge": "^3.2.0",
|
|
142
163
|
"zustand": "^4.4.7"
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ComponentChildren } from 'preact';
|
|
2
|
-
interface ModalProps {
|
|
3
|
-
isOpen: boolean;
|
|
4
|
-
onClose: () => void;
|
|
5
|
-
children: ComponentChildren;
|
|
6
|
-
closeOnOutsideClick?: boolean;
|
|
7
|
-
className?: string;
|
|
8
|
-
overlayClassName?: string;
|
|
9
|
-
contentClassName?: string;
|
|
10
|
-
}
|
|
11
|
-
declare const Modal: ({ isOpen, onClose, children, closeOnOutsideClick, className, overlayClassName, contentClassName }: ModalProps) => import('preact').VNode<any> | null;
|
|
12
|
-
export default Modal;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes, InputHTMLAttributes, ReactElement } from 'preact/hooks';
|
|
2
|
-
export type inputTypes = "date" | "datetime-local" | "email" | "file" | "month" | "number" | "password" | "search" | "tel" | "text" | "time" | "url" | "week";
|
|
3
|
-
export type InputVariants = "fluid" | "small";
|
|
4
|
-
export type InputOption = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
5
|
-
required?: boolean;
|
|
6
|
-
};
|
|
7
|
-
export type InputProps = InputHTMLAttributes<HTMLInputElement> & InputHTMLAttributes<HTMLSelectElement> & InputHTMLAttributes<HTMLTextAreaElement> & {
|
|
8
|
-
as?: "input" | "textarea";
|
|
9
|
-
label?: string | ReactElement;
|
|
10
|
-
icon?: ReactElement;
|
|
11
|
-
iconAfter?: ReactElement;
|
|
12
|
-
error?: string;
|
|
13
|
-
options?: {
|
|
14
|
-
[key: string]: InputOption;
|
|
15
|
-
};
|
|
16
|
-
variants?: InputVariants[];
|
|
17
|
-
type?: inputTypes;
|
|
18
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ComponentChildren } from 'preact';
|
|
2
|
-
interface RootProps {
|
|
3
|
-
children?: ComponentChildren;
|
|
4
|
-
className?: string;
|
|
5
|
-
primaryColor?: string;
|
|
6
|
-
}
|
|
7
|
-
declare const _default: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<RootProps> & {
|
|
8
|
-
ref?: import('preact').Ref<HTMLDivElement> | undefined;
|
|
9
|
-
}>;
|
|
10
|
-
export default _default;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'preact/hooks';
|
|
2
|
-
export type AsMap = {
|
|
3
|
-
div: JSX.HTMLAttributes<HTMLDivElement>;
|
|
4
|
-
span: JSX.HTMLAttributes<HTMLSpanElement>;
|
|
5
|
-
p: JSX.HTMLAttributes<HTMLParagraphElement>;
|
|
6
|
-
};
|
|
7
|
-
export type TooltipProps<T extends keyof AsMap = "span"> = {
|
|
8
|
-
as?: T;
|
|
9
|
-
title?: string | ReactNode;
|
|
10
|
-
icon?: ReactNode;
|
|
11
|
-
} & AsMap[T];
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { JSX } from 'preact';
|
|
2
|
-
import { FileRow } from '../../features/main/types';
|
|
3
|
-
interface VirtualTableProps {
|
|
4
|
-
headers: string[];
|
|
5
|
-
rows: FileRow[];
|
|
6
|
-
renderCell: (row: FileRow, colIdx: number, actualRowIdx: number) => JSX.Element;
|
|
7
|
-
onCellEdit?: (rowIdx: number, colIdx: number, value: string) => void;
|
|
8
|
-
rowHeight?: number;
|
|
9
|
-
overscan?: number;
|
|
10
|
-
stickyHeader?: boolean;
|
|
11
|
-
stickyFirstColumn?: boolean;
|
|
12
|
-
getRowClassName?: (row: FileRow, actualRowIdx: number) => string;
|
|
13
|
-
headerRowIndex?: number;
|
|
14
|
-
includedColumns: number[];
|
|
15
|
-
}
|
|
16
|
-
export default function VirtualTable({ headers, rows, renderCell, rowHeight, overscan, stickyHeader, stickyFirstColumn, getRowClassName, headerRowIndex, includedColumns, }: VirtualTableProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
declare const Alert: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<JSX.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
3
|
-
variant?: "default" | "destructive" | null | undefined;
|
|
4
|
-
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string>> & {
|
|
5
|
-
ref?: import('preact').Ref<HTMLDivElement> | undefined;
|
|
6
|
-
}>;
|
|
7
|
-
declare const AlertTitle: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<JSX.HTMLAttributes<HTMLHeadingElement>> & {
|
|
8
|
-
ref?: import('preact').Ref<HTMLParagraphElement> | undefined;
|
|
9
|
-
}>;
|
|
10
|
-
declare const AlertDescription: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<JSX.HTMLAttributes<HTMLParagraphElement>> & {
|
|
11
|
-
ref?: import('preact').Ref<HTMLParagraphElement> | undefined;
|
|
12
|
-
}>;
|
|
13
|
-
export { Alert, AlertTitle, AlertDescription };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
declare const Card: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<JSX.HTMLAttributes<HTMLDivElement>> & {
|
|
2
|
-
ref?: import('preact').Ref<HTMLDivElement> | undefined;
|
|
3
|
-
}>;
|
|
4
|
-
declare const CardHeader: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<JSX.HTMLAttributes<HTMLDivElement>> & {
|
|
5
|
-
ref?: import('preact').Ref<HTMLDivElement> | undefined;
|
|
6
|
-
}>;
|
|
7
|
-
declare const CardTitle: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<JSX.HTMLAttributes<HTMLHeadingElement>> & {
|
|
8
|
-
ref?: import('preact').Ref<HTMLParagraphElement> | undefined;
|
|
9
|
-
}>;
|
|
10
|
-
declare const CardDescription: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<JSX.HTMLAttributes<HTMLParagraphElement>> & {
|
|
11
|
-
ref?: import('preact').Ref<HTMLParagraphElement> | undefined;
|
|
12
|
-
}>;
|
|
13
|
-
declare const CardContent: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<JSX.HTMLAttributes<HTMLDivElement>> & {
|
|
14
|
-
ref?: import('preact').Ref<HTMLDivElement> | undefined;
|
|
15
|
-
}>;
|
|
16
|
-
declare const CardFooter: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<JSX.HTMLAttributes<HTMLDivElement>> & {
|
|
17
|
-
ref?: import('preact').Ref<HTMLDivElement> | undefined;
|
|
18
|
-
}>;
|
|
19
|
-
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export interface CheckboxProps extends JSX.HTMLAttributes<HTMLInputElement> {
|
|
2
|
-
onCheckedChange?: (checked: boolean) => void;
|
|
3
|
-
}
|
|
4
|
-
declare const Checkbox: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<CheckboxProps> & {
|
|
5
|
-
ref?: import('preact').Ref<HTMLInputElement> | undefined;
|
|
6
|
-
}>;
|
|
7
|
-
export { Checkbox };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { h, ComponentChildren, JSX } from 'preact';
|
|
2
|
-
interface DialogProps {
|
|
3
|
-
open?: boolean;
|
|
4
|
-
onOpenChange?: (open: boolean) => void;
|
|
5
|
-
children: ComponentChildren;
|
|
6
|
-
}
|
|
7
|
-
declare const Dialog: ({ open, onOpenChange, children }: DialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
declare const DialogTrigger: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<h.JSX.HTMLAttributes<HTMLButtonElement>> & {
|
|
9
|
-
ref?: import('preact').Ref<HTMLButtonElement> | undefined;
|
|
10
|
-
}>;
|
|
11
|
-
interface DialogContentProps extends JSX.HTMLAttributes<HTMLDialogElement> {
|
|
12
|
-
onClose?: () => void;
|
|
13
|
-
}
|
|
14
|
-
declare const DialogContent: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<DialogContentProps> & {
|
|
15
|
-
ref?: import('preact').Ref<HTMLDialogElement> | undefined;
|
|
16
|
-
}>;
|
|
17
|
-
declare const DialogHeader: {
|
|
18
|
-
({ className, ...props }: JSX.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
displayName: string;
|
|
20
|
-
};
|
|
21
|
-
declare const DialogFooter: {
|
|
22
|
-
({ className, ...props }: JSX.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
displayName: string;
|
|
24
|
-
};
|
|
25
|
-
declare const DialogTitle: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<h.JSX.HTMLAttributes<HTMLHeadingElement>> & {
|
|
26
|
-
ref?: import('preact').Ref<HTMLHeadingElement> | undefined;
|
|
27
|
-
}>;
|
|
28
|
-
declare const DialogDescription: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<h.JSX.HTMLAttributes<HTMLParagraphElement>> & {
|
|
29
|
-
ref?: import('preact').Ref<HTMLParagraphElement> | undefined;
|
|
30
|
-
}>;
|
|
31
|
-
declare const DialogPortal: ({ children }: {
|
|
32
|
-
children: ComponentChildren;
|
|
33
|
-
}) => ComponentChildren;
|
|
34
|
-
declare const DialogOverlay: () => null;
|
|
35
|
-
declare const DialogClose: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<h.JSX.HTMLAttributes<HTMLButtonElement>> & {
|
|
36
|
-
ref?: import('preact').Ref<HTMLButtonElement> | undefined;
|
|
37
|
-
}>;
|
|
38
|
-
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
interface FlexProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
2
|
-
direction?: "row" | "column" | "row-reverse" | "column-reverse";
|
|
3
|
-
align?: "start" | "center" | "end" | "stretch" | "baseline";
|
|
4
|
-
justify?: "start" | "center" | "end" | "between" | "around" | "evenly";
|
|
5
|
-
wrap?: boolean;
|
|
6
|
-
gap?: number | string;
|
|
7
|
-
}
|
|
8
|
-
declare const Flex: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<FlexProps> & {
|
|
9
|
-
ref?: import('preact').Ref<HTMLDivElement> | undefined;
|
|
10
|
-
}>;
|
|
11
|
-
declare const Box: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<JSX.HTMLAttributes<HTMLDivElement>> & {
|
|
12
|
-
ref?: import('preact').Ref<HTMLDivElement> | undefined;
|
|
13
|
-
}>;
|
|
14
|
-
declare const HStack: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<Omit<FlexProps, "direction">> & {
|
|
15
|
-
ref?: import('preact').Ref<HTMLDivElement> | undefined;
|
|
16
|
-
}>;
|
|
17
|
-
declare const VStack: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<Omit<FlexProps, "direction">> & {
|
|
18
|
-
ref?: import('preact').Ref<HTMLDivElement> | undefined;
|
|
19
|
-
}>;
|
|
20
|
-
declare const Text: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<JSX.HTMLAttributes<HTMLDivElement>> & {
|
|
21
|
-
ref?: import('preact').Ref<HTMLDivElement> | undefined;
|
|
22
|
-
}>;
|
|
23
|
-
export { Flex, Box, HStack, VStack, Text };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export interface InputProps extends JSX.HTMLAttributes<HTMLInputElement> {
|
|
2
|
-
}
|
|
3
|
-
declare const Input: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<InputProps> & {
|
|
4
|
-
ref?: import('preact').Ref<HTMLInputElement> | undefined;
|
|
5
|
-
}>;
|
|
6
|
-
export { Input };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
interface SelectProps extends JSX.SelectHTMLAttributes<HTMLSelectElement> {
|
|
2
|
-
placeholder?: string;
|
|
3
|
-
options?: Array<{
|
|
4
|
-
value: string;
|
|
5
|
-
label: string;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
}>;
|
|
8
|
-
onValueChange?: (value: string) => void;
|
|
9
|
-
}
|
|
10
|
-
declare const Select: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<SelectProps> & {
|
|
11
|
-
ref?: import('preact').Ref<HTMLSelectElement> | undefined;
|
|
12
|
-
}>;
|
|
13
|
-
export { Select };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export interface SwitchProps extends Omit<JSX.HTMLAttributes<HTMLInputElement>, 'type'> {
|
|
2
|
-
onCheckedChange?: (checked: boolean) => void;
|
|
3
|
-
}
|
|
4
|
-
declare const Switch: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<SwitchProps> & {
|
|
5
|
-
ref?: import('preact').Ref<HTMLInputElement> | undefined;
|
|
6
|
-
}>;
|
|
7
|
-
export { Switch };
|