@importcsv/react 0.4.5 → 0.4.7

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.
Files changed (182) hide show
  1. package/README.md +47 -84
  2. package/build/preact/index.esm.js +2180 -2259
  3. package/build/preact/index.esm.js.map +1 -1
  4. package/build/preact/index.js +16 -117
  5. package/build/preact/index.js.map +1 -1
  6. package/build/react/index.esm.js +2473 -2522
  7. package/build/react/index.esm.js.map +1 -1
  8. package/build/react/index.js +16 -117
  9. package/build/react/index.js.map +1 -1
  10. package/package.json +11 -10
  11. package/build/App.d.ts +0 -2
  12. package/build/bundled/index.esm.js +0 -11531
  13. package/build/bundled/index.esm.js.map +0 -1
  14. package/build/bundled/index.js +0 -139
  15. package/build/bundled/index.js.map +0 -1
  16. package/build/bundled/index.umd.js +0 -139
  17. package/build/bundled/index.umd.js.map +0 -1
  18. package/build/bundled-styles.d.ts +0 -1
  19. package/build/components/CSVImporter/index.d.ts +0 -55
  20. package/build/components/CSVImporter/index.test.d.ts +0 -1
  21. package/build/components/CSVImporterHeadless.d.ts +0 -46
  22. package/build/components/ColumnMapper.d.ts +0 -28
  23. package/build/components/Modal/index.d.ts +0 -12
  24. package/build/components/Uploader.d.ts +0 -27
  25. package/build/components/Validator.d.ts +0 -28
  26. package/build/components/__tests__/CSVImporterHeadless.test.d.ts +0 -1
  27. package/build/components/__tests__/ColumnMapper.test.d.ts +0 -1
  28. package/build/components/__tests__/Uploader.test.d.ts +0 -1
  29. package/build/components/__tests__/Validator.test.d.ts +0 -1
  30. package/build/components/index.d.ts +0 -3
  31. package/build/config/index.d.ts +0 -5
  32. package/build/headless/__tests__/integration.test.d.ts +0 -10
  33. package/build/headless/__tests__/root.test.d.ts +0 -1
  34. package/build/headless/__tests__/root.types.test-d.d.ts +0 -1
  35. package/build/headless/__tests__/slot-components.test.d.ts +0 -1
  36. package/build/headless/__tests__/validator.test.d.ts +0 -1
  37. package/build/headless/back-button.d.ts +0 -29
  38. package/build/headless/index.d.ts +0 -45
  39. package/build/headless/next-button.d.ts +0 -29
  40. package/build/headless/root.d.ts +0 -40
  41. package/build/headless/submit-button.d.ts +0 -29
  42. package/build/headless/types.d.ts +0 -52
  43. package/build/headless/upload-trigger.d.ts +0 -29
  44. package/build/headless/utils/slot.d.ts +0 -20
  45. package/build/headless/utils/zodSchemaToColumns.d.ts +0 -25
  46. package/build/headless/utils/zodSchemaToColumns.test.d.ts +0 -1
  47. package/build/headless/validator.d.ts +0 -28
  48. package/build/i18n/de.d.ts +0 -32
  49. package/build/i18n/es.d.ts +0 -32
  50. package/build/i18n/fr.d.ts +0 -32
  51. package/build/i18n/i18n.d.ts +0 -6
  52. package/build/i18n/it.d.ts +0 -32
  53. package/build/i18n/useTranslation.d.ts +0 -9
  54. package/build/importer/components/Box/index.d.ts +0 -2
  55. package/build/importer/components/Box/index.test.d.ts +0 -1
  56. package/build/importer/components/Box/types/index.d.ts +0 -6
  57. package/build/importer/components/Checkbox/index.d.ts +0 -3
  58. package/build/importer/components/Checkbox/index.test.d.ts +0 -1
  59. package/build/importer/components/Checkbox/types/index.d.ts +0 -8
  60. package/build/importer/components/Errors/index.d.ts +0 -4
  61. package/build/importer/components/Input/index.d.ts +0 -2
  62. package/build/importer/components/Input/index.test.d.ts +0 -1
  63. package/build/importer/components/Input/types/index.d.ts +0 -24
  64. package/build/importer/components/Root/index.d.ts +0 -2
  65. package/build/importer/components/StepLayout/index.d.ts +0 -19
  66. package/build/importer/components/Stepper/hooks/useStepper.d.ts +0 -4
  67. package/build/importer/components/Stepper/hooks/useStepper.test.d.ts +0 -1
  68. package/build/importer/components/Stepper/index.d.ts +0 -2
  69. package/build/importer/components/Stepper/index.test.d.ts +0 -1
  70. package/build/importer/components/Stepper/types/index.d.ts +0 -14
  71. package/build/importer/components/Table/index.d.ts +0 -9
  72. package/build/importer/components/Table/types/index.d.ts +0 -43
  73. package/build/importer/components/ToggleFilter/index.d.ts +0 -3
  74. package/build/importer/components/ToggleFilter/types/index.d.ts +0 -11
  75. package/build/importer/components/Tooltip/index.d.ts +0 -2
  76. package/build/importer/components/Tooltip/types/index.d.ts +0 -11
  77. package/build/importer/components/UploaderWrapper/NativeDropzone.d.ts +0 -12
  78. package/build/importer/components/UploaderWrapper/UploaderWrapper.d.ts +0 -2
  79. package/build/importer/components/UploaderWrapper/types/index.d.ts +0 -2
  80. package/build/importer/components/VirtualTable/index.d.ts +0 -17
  81. package/build/importer/components/VirtualTable/index.test.d.ts +0 -1
  82. package/build/importer/components/ui/alert.d.ts +0 -15
  83. package/build/importer/components/ui/button.d.ts +0 -15
  84. package/build/importer/components/ui/card.d.ts +0 -20
  85. package/build/importer/components/ui/checkbox.d.ts +0 -10
  86. package/build/importer/components/ui/dialog.d.ts +0 -39
  87. package/build/importer/components/ui/flex.d.ts +0 -24
  88. package/build/importer/components/ui/input.d.ts +0 -8
  89. package/build/importer/components/ui/select.d.ts +0 -17
  90. package/build/importer/components/ui/switch.d.ts +0 -11
  91. package/build/importer/components/ui/toast.d.ts +0 -22
  92. package/build/importer/components/ui/toaster.d.ts +0 -2
  93. package/build/importer/components/ui/tooltip.d.ts +0 -25
  94. package/build/importer/components/ui/use-toast.d.ts +0 -46
  95. package/build/importer/features/complete/index.d.ts +0 -2
  96. package/build/importer/features/complete/types/index.d.ts +0 -5
  97. package/build/importer/features/configure-import/index.d.ts +0 -14
  98. package/build/importer/features/configure-import/types/index.d.ts +0 -13
  99. package/build/importer/features/main/hooks/useMutableLocalStorage.d.ts +0 -1
  100. package/build/importer/features/main/hooks/useMutableLocalStorage.test.d.ts +0 -1
  101. package/build/importer/features/main/hooks/useStepNavigation.d.ts +0 -17
  102. package/build/importer/features/main/hooks/useStepNavigation.test.d.ts +0 -1
  103. package/build/importer/features/main/index.d.ts +0 -2
  104. package/build/importer/features/main/types/index.d.ts +0 -16
  105. package/build/importer/features/map-columns/components/DropDownFields.d.ts +0 -22
  106. package/build/importer/features/map-columns/hooks/useMapColumnsTable.d.ts +0 -17
  107. package/build/importer/features/map-columns/index.d.ts +0 -3
  108. package/build/importer/features/map-columns/types/index.d.ts +0 -16
  109. package/build/importer/features/row-selection/index.d.ts +0 -3
  110. package/build/importer/features/row-selection/types/index.d.ts +0 -8
  111. package/build/importer/features/uploader/hooks/useTemplateTable.d.ts +0 -10
  112. package/build/importer/features/uploader/index.d.ts +0 -2
  113. package/build/importer/features/uploader/types/index.d.ts +0 -9
  114. package/build/importer/features/validation/Validation.d.ts +0 -3
  115. package/build/importer/features/validation/__tests__/Validation.zod.test.d.ts +0 -1
  116. package/build/importer/features/validation/components/TransformModal.d.ts +0 -19
  117. package/build/importer/features/validation/components/TransformPanel.d.ts +0 -19
  118. package/build/importer/features/validation/index.d.ts +0 -1
  119. package/build/importer/features/validation/types.d.ts +0 -34
  120. package/build/importer/hooks/useClickOutside.d.ts +0 -1
  121. package/build/importer/hooks/useClickOutside.test.d.ts +0 -1
  122. package/build/importer/hooks/useCustomStyles.d.ts +0 -1
  123. package/build/importer/hooks/useCustomStyles.test.d.ts +0 -1
  124. package/build/importer/hooks/useEventListener.d.ts +0 -4
  125. package/build/importer/hooks/useEventListener.test.d.ts +0 -1
  126. package/build/importer/hooks/useIsomorphicLayoutEffect.d.ts +0 -3
  127. package/build/importer/hooks/useIsomorphicLayoutEffect.test.d.ts +0 -1
  128. package/build/importer/hooks/useRect.d.ts +0 -12
  129. package/build/importer/hooks/useRect.test.d.ts +0 -1
  130. package/build/importer/hooks/useWindowSize.d.ts +0 -1
  131. package/build/importer/hooks/useWindowSize.test.d.ts +0 -1
  132. package/build/importer/providers/Theme.d.ts +0 -10
  133. package/build/importer/providers/index.d.ts +0 -5
  134. package/build/importer/providers/types/index.d.ts +0 -10
  135. package/build/importer/services/api.d.ts +0 -1
  136. package/build/importer/services/mapping.d.ts +0 -31
  137. package/build/importer/services/mapping.test.d.ts +0 -1
  138. package/build/importer/services/transformation.d.ts +0 -70
  139. package/build/importer/services/transformation.test.d.ts +0 -1
  140. package/build/importer/settings/theme/colors.d.ts +0 -4
  141. package/build/importer/settings/theme/index.d.ts +0 -2
  142. package/build/importer/settings/theme/sizes.d.ts +0 -7
  143. package/build/importer/stores/theme.d.ts +0 -17
  144. package/build/importer/theme/index.d.ts +0 -8
  145. package/build/importer/theme/presets.d.ts +0 -314
  146. package/build/importer/theme/runtime.d.ts +0 -66
  147. package/build/importer/theme/styles.d.ts +0 -120
  148. package/build/importer/types/index.d.ts +0 -9
  149. package/build/importer/utils/colorUtils.d.ts +0 -48
  150. package/build/importer/utils/colorUtils.test.d.ts +0 -1
  151. package/build/importer/utils/errorAnalysis.d.ts +0 -25
  152. package/build/importer/utils/errorAnalysis.test.d.ts +0 -1
  153. package/build/importer/utils/getStringLengthOfChildren.d.ts +0 -2
  154. package/build/importer/utils/getStringLengthOfChildren.test.d.ts +0 -1
  155. package/build/importer/utils/stringSimilarity.d.ts +0 -1
  156. package/build/importer/utils/stringSimilarity.test.d.ts +0 -1
  157. package/build/importer/utils/template.d.ts +0 -2
  158. package/build/importer/utils/template.test.d.ts +0 -1
  159. package/build/importer/utils/themeUtils.d.ts +0 -24
  160. package/build/importer/utils/themeUtils.test.d.ts +0 -1
  161. package/build/importer/utils/utils.d.ts +0 -19
  162. package/build/importer/utils/utils.test.d.ts +0 -1
  163. package/build/index.d.ts +0 -10
  164. package/build/index.dev.d.ts +0 -1
  165. package/build/js.d.ts +0 -57
  166. package/build/services/api.d.ts +0 -50
  167. package/build/services/apiClient.d.ts +0 -55
  168. package/build/settings/defaults.d.ts +0 -3
  169. package/build/shims/react-compat-shim.d.ts +0 -43
  170. package/build/shims/react-hooks-shim.d.ts +0 -2
  171. package/build/styles.d.ts +0 -1
  172. package/build/test/helpers.d.ts +0 -28
  173. package/build/test/mocks/api.d.ts +0 -8
  174. package/build/test/mocks/localStorage.d.ts +0 -6
  175. package/build/test/setup.d.ts +0 -1
  176. package/build/types/index.d.ts +0 -137
  177. package/build/types/theme.d.ts +0 -153
  178. package/build/utils/cn.d.ts +0 -6
  179. package/build/utils/cn.test.d.ts +0 -1
  180. package/build/validation/transformationStages.d.ts +0 -26
  181. package/build/validation/transformer.d.ts +0 -17
  182. package/build/validation/validator.d.ts +0 -23
@@ -1,24 +0,0 @@
1
- import { JSX, VNode } from "preact";
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 = JSX.HTMLAttributes<HTMLButtonElement> & {
5
- required?: boolean;
6
- value?: string;
7
- };
8
- export type InputProps = Omit<JSX.HTMLAttributes<HTMLInputElement>, 'label'> & Omit<JSX.HTMLAttributes<HTMLSelectElement>, 'label'> & Omit<JSX.HTMLAttributes<HTMLTextAreaElement>, 'label'> & {
9
- as?: "input" | "textarea";
10
- label?: string | VNode;
11
- icon?: VNode;
12
- iconAfter?: VNode;
13
- error?: string;
14
- options?: {
15
- [key: string]: InputOption;
16
- };
17
- variants?: InputVariants[];
18
- type?: inputTypes;
19
- name?: string;
20
- disabled?: boolean;
21
- value?: string;
22
- onChange?: (value: string) => void;
23
- placeholder?: string;
24
- };
@@ -1,2 +0,0 @@
1
- declare const Root: any;
2
- export default Root;
@@ -1,19 +0,0 @@
1
- import { h } from 'preact';
2
- import type { ComponentChildren } from 'preact';
3
- interface StepLayoutProps {
4
- title?: string;
5
- subtitle?: string;
6
- children: ComponentChildren;
7
- headerContent?: ComponentChildren;
8
- footerContent?: ComponentChildren;
9
- showHeader?: boolean;
10
- showFooter?: boolean;
11
- className?: string;
12
- contentClassName?: string;
13
- }
14
- /**
15
- * Consistent layout wrapper for all importer steps
16
- * Ensures uniform spacing, typography, and structure
17
- */
18
- export default function StepLayout({ title, subtitle, children, headerContent, footerContent, showHeader, showFooter, className, contentClassName, }: StepLayoutProps): h.JSX.Element;
19
- export {};
@@ -1,4 +0,0 @@
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 {};
@@ -1,2 +0,0 @@
1
- import { StepperProps } from "./types";
2
- export default function Stepper({ steps, current, hide, skipHeader }: StepperProps): import("preact").JSX.Element | null;
@@ -1 +0,0 @@
1
- export {};
@@ -1,14 +0,0 @@
1
- export type Step = {
2
- label: string;
3
- id?: string | number;
4
- disabled?: boolean;
5
- };
6
- export type StepperProps = {
7
- steps: Step[];
8
- current: number;
9
- setCurrent?: (step: number) => void;
10
- step?: Step;
11
- clickable?: boolean;
12
- skipHeader?: boolean;
13
- hide?: boolean;
14
- };
@@ -1,9 +0,0 @@
1
- import type { JSX } from 'preact';
2
- import { TableProps } from "./types";
3
- export default function Table({ data, // An array of objects with the data to be displayed
4
- keyAsId, // Has to be a unique property in the data array to be used as key
5
- theme, // A CSS module object to style the table
6
- mergeThemes, // Should 'theme' be the only style applied (false) or be merged with the default style (true)
7
- highlightColumns, // Columns that should use the highlighted style
8
- hideColumns, // Array of columns to be hidden in the display
9
- emptyState, heading, background, columnWidths, columnAlignments, fixHeader, onRowClick, }: TableProps): JSX.Element;
@@ -1,43 +0,0 @@
1
- import type { JSX, VNode, ComponentChildren } from 'preact';
2
- type Style = {
3
- readonly [key: string]: string;
4
- };
5
- type Primitive = string | number | boolean | null | undefined;
6
- export type TableComposite = {
7
- raw: Primitive;
8
- content: Primitive | JSX.Element;
9
- tooltip?: string;
10
- captionInfo?: string;
11
- };
12
- export type TableValue = Primitive | TableComposite;
13
- export type TableDatum = {
14
- [key: string]: TableValue;
15
- };
16
- export type TableData = TableDatum[];
17
- export type TableProps = {
18
- data: TableData;
19
- keyAsId?: string;
20
- theme?: Style;
21
- mergeThemes?: boolean;
22
- highlightColumns?: string[];
23
- hideColumns?: string[];
24
- emptyState?: VNode;
25
- heading?: VNode;
26
- background?: "zebra" | "dark" | "light" | "transparent";
27
- columnWidths?: string[];
28
- columnAlignments?: ("left" | "center" | "right" | "")[];
29
- fixHeader?: boolean;
30
- onRowClick?: (row: TableDatum) => void;
31
- };
32
- export type RowProps = {
33
- datum: TableDatum;
34
- isHeading?: boolean;
35
- onClick?: (row: TableDatum) => void;
36
- };
37
- export type CellProps = {
38
- children?: ComponentChildren;
39
- cellClass?: string;
40
- cellStyle: Style;
41
- tooltip?: string;
42
- };
43
- export {};
@@ -1,3 +0,0 @@
1
- import { ToggleFilterProps } from "./types";
2
- declare function ToggleFilter({ options, onChange, className }: ToggleFilterProps): import("preact").JSX.Element;
3
- export default ToggleFilter;
@@ -1,11 +0,0 @@
1
- export interface Option {
2
- label: string;
3
- filterValue: string;
4
- selected: boolean;
5
- color?: string;
6
- }
7
- export interface ToggleFilterProps {
8
- options: Option[];
9
- className?: string;
10
- onChange: (option: string) => void;
11
- }
@@ -1,2 +0,0 @@
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,11 +0,0 @@
1
- import { JSX, ComponentChildren } from "preact";
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 | ComponentChildren;
10
- icon?: ComponentChildren;
11
- } & AsMap[T];
@@ -1,12 +0,0 @@
1
- import { h } from 'preact';
2
- import type { ComponentChildren } from 'preact';
3
- interface NativeDropzoneProps {
4
- onFileSelect: (file: File) => void;
5
- accept?: Record<string, string[]>;
6
- disabled?: boolean;
7
- loading?: boolean;
8
- className?: string;
9
- children?: ComponentChildren;
10
- }
11
- export default function NativeDropzone({ onFileSelect, accept, disabled, loading, className, children }: NativeDropzoneProps): h.JSX.Element;
12
- export {};
@@ -1,2 +0,0 @@
1
- import { UploaderWrapperProps } from "./types";
2
- export default function UploaderWrapper({ onSuccess, setDataError, ...props }: UploaderWrapperProps): import("preact").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { UploaderProps } from "../../../features/uploader/types";
2
- export type UploaderWrapperProps = Omit<UploaderProps, "template"> & {};
@@ -1,17 +0,0 @@
1
- import type { JSX } from 'preact';
2
- import type { 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): JSX.Element;
17
- export {};
@@ -1,15 +0,0 @@
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,15 +0,0 @@
1
- import { JSX } from 'preact';
2
- import { type VariantProps } from "class-variance-authority";
3
- declare const buttonVariants: (props?: ({
4
- variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
5
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
- export interface ButtonProps extends JSX.HTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
- type?: 'button' | 'submit' | 'reset';
9
- isLoading?: boolean;
10
- disabled?: boolean;
11
- }
12
- declare const Button: (props: ButtonProps & {
13
- ref?: any;
14
- }) => JSX.Element;
15
- export { Button, buttonVariants };
@@ -1,20 +0,0 @@
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 };
@@ -1,10 +0,0 @@
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 };
@@ -1,39 +0,0 @@
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, };
@@ -1,24 +0,0 @@
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 };
@@ -1,8 +0,0 @@
1
- import { JSX } from 'preact';
2
- export interface InputProps extends JSX.HTMLAttributes<HTMLInputElement> {
3
- type?: string;
4
- }
5
- declare const Input: (props: InputProps & {
6
- ref?: any;
7
- }) => JSX.Element;
8
- export { Input };
@@ -1,17 +0,0 @@
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 };
@@ -1,11 +0,0 @@
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 };
@@ -1,22 +0,0 @@
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, };
@@ -1,2 +0,0 @@
1
- import type { JSX } from 'preact';
2
- export declare function Toaster(): JSX.Element;
@@ -1,25 +0,0 @@
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,46 +0,0 @@
1
- import type { ComponentChildren } from 'preact';
2
- import type { ToastActionElement, ToastProps } from "./toast";
3
- type ToasterToast = ToastProps & {
4
- id: string;
5
- title?: ComponentChildren;
6
- description?: ComponentChildren;
7
- action?: ToastActionElement;
8
- open?: boolean;
9
- onOpenChange?: (open: boolean) => void;
10
- };
11
- declare const actionTypes: {
12
- readonly ADD_TOAST: "ADD_TOAST";
13
- readonly UPDATE_TOAST: "UPDATE_TOAST";
14
- readonly DISMISS_TOAST: "DISMISS_TOAST";
15
- readonly REMOVE_TOAST: "REMOVE_TOAST";
16
- };
17
- type ActionType = typeof actionTypes;
18
- type Action = {
19
- type: ActionType["ADD_TOAST"];
20
- toast: ToasterToast;
21
- } | {
22
- type: ActionType["UPDATE_TOAST"];
23
- toast: Partial<ToasterToast>;
24
- } | {
25
- type: ActionType["DISMISS_TOAST"];
26
- toastId?: ToasterToast["id"];
27
- } | {
28
- type: ActionType["REMOVE_TOAST"];
29
- toastId?: ToasterToast["id"];
30
- };
31
- interface State {
32
- toasts: ToasterToast[];
33
- }
34
- export declare const reducer: (state: State, action: Action) => State;
35
- type Toast = Omit<ToasterToast, "id">;
36
- declare function toast({ ...props }: Toast): {
37
- id: string;
38
- dismiss: () => void;
39
- update: () => void;
40
- };
41
- declare function useToast(): {
42
- toast: typeof toast;
43
- dismiss: (toastId?: string) => void;
44
- toasts: ToasterToast[];
45
- };
46
- export { useToast, toast };
@@ -1,2 +0,0 @@
1
- import { CompleteProps } from "./types";
2
- export default function Complete({ reload, close, isModal }: CompleteProps): import("preact").JSX.Element;
@@ -1,5 +0,0 @@
1
- export type CompleteProps = {
2
- reload: () => void;
3
- close: () => void;
4
- isModal: boolean;
5
- };
@@ -1,14 +0,0 @@
1
- import type { JSX } from 'preact';
2
- import { Column, ColumnMappingDictionary } from '../../../types';
3
- interface ConfigureImportProps {
4
- columns?: Column[];
5
- data: any;
6
- onSuccess: (mapping: ColumnMappingDictionary, headerRow: number) => void;
7
- onCancel?: () => void;
8
- isSubmitting?: boolean;
9
- importerKey?: string;
10
- backendUrl?: string;
11
- isDemoMode?: boolean;
12
- }
13
- export default function ConfigureImport({ columns, data, onSuccess, onCancel, isSubmitting, importerKey, backendUrl, isDemoMode, }: ConfigureImportProps): JSX.Element;
14
- export {};
@@ -1,13 +0,0 @@
1
- import { Template } from '../../../types';
2
- import { ColumnMapping, ColumnMappingDictionary } from '../../../../types';
3
- export interface ConfigureImportProps {
4
- template: Template;
5
- data: any;
6
- onSuccess: (mapping: ColumnMappingDictionary, headerRow: number) => void;
7
- onCancel?: () => void;
8
- isSubmitting?: boolean;
9
- importerKey?: string;
10
- backendUrl?: string;
11
- isDemoMode?: boolean;
12
- }
13
- export type { ColumnMapping, ColumnMappingDictionary };
@@ -1 +0,0 @@
1
- export default function useMutableLocalStorage(key: string, initialValue: any): any[];
@@ -1,17 +0,0 @@
1
- export declare const StepEnum: {
2
- Upload: number;
3
- RowSelection: number;
4
- MapColumns: number;
5
- Validation: number;
6
- Complete: number;
7
- };
8
- declare function useStepNavigation(initialStep: number, skipHeader: boolean, isDemoMode?: boolean): {
9
- currentStep: any;
10
- setStep: (newStep: number) => void;
11
- goBack: (backStep?: number) => void;
12
- goNext: (nextStep?: number) => void;
13
- stepper: Required<Pick<import("../../../components/Stepper/types").StepperProps, "steps" | "current" | "skipHeader" | "step" | "setCurrent">>;
14
- stepId: string | number | undefined;
15
- setStorageStep: any;
16
- };
17
- export default useStepNavigation;
@@ -1,2 +0,0 @@
1
- import { CSVImporterProps } from "../../../types";
2
- export default function Main(props: CSVImporterProps): import("preact").JSX.Element;
@@ -1,16 +0,0 @@
1
- export declare enum Steps {
2
- Upload = "upload",
3
- RowSelection = "row-selection",
4
- MapColumns = "map-columns",
5
- Validation = "validation"
6
- }
7
- export type FileRow = {
8
- index: number;
9
- values: string[];
10
- };
11
- export type FileData = {
12
- fileName: string;
13
- rows: FileRow[];
14
- sheetList: string[];
15
- errors: string[];
16
- };
@@ -1,22 +0,0 @@
1
- import type { JSX } from "preact";
2
- import { InputOption } from "../../../components/Input/types";
3
- type DropdownFieldsProps = {
4
- options: {
5
- [key: string]: InputOption;
6
- };
7
- value: string;
8
- placeholder: string;
9
- onChange: (value: string) => void;
10
- selectedValues: {
11
- id?: string;
12
- key?: string;
13
- selected: boolean | undefined;
14
- }[];
15
- updateSelectedValues: (updatedValues: {
16
- id?: string;
17
- key?: string;
18
- selected: boolean | undefined;
19
- }[]) => void;
20
- };
21
- export default function DropdownFields({ options, value, placeholder, onChange, selectedValues, updateSelectedValues }: DropdownFieldsProps): JSX.Element;
22
- export {};
@@ -1,17 +0,0 @@
1
- import type { JSX } from "preact";
2
- import { UploadColumn } from "../../../types";
3
- import { Column } from "../../../../types";
4
- import { TemplateColumnMapping } from "../types";
5
- export default function useMapColumnsTable(uploadColumns: UploadColumn[], templateColumns: Column[] | undefined, columnsValues: {
6
- [uploadColumnIndex: number]: TemplateColumnMapping;
7
- }, isLoading?: boolean, importerKey?: string, backendUrl?: string): {
8
- rows: {
9
- [x: string]: {
10
- raw: string | boolean;
11
- content: string | JSX.Element;
12
- };
13
- }[];
14
- formValues: {
15
- [key: number]: import("../types").ColumnMapping;
16
- };
17
- };
@@ -1,3 +0,0 @@
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;