@importcsv/react 0.2.3 → 0.2.5

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 (134) hide show
  1. package/build/App.d.ts +2 -0
  2. package/build/bundled/importer/components/ui/use-toast.d.ts +1 -1
  3. package/build/bundled/index.esm.js +3027 -3205
  4. package/build/bundled/index.esm.js.map +1 -1
  5. package/build/bundled/index.js +30 -30
  6. package/build/bundled/index.js.map +1 -1
  7. package/build/bundled/index.umd.js +30 -30
  8. package/build/bundled/index.umd.js.map +1 -1
  9. package/build/bundled/utils/injectStyles.d.ts +14 -0
  10. package/build/bundled-styles.d.ts +1 -0
  11. package/build/components/CSVImporter/index.d.ts +9 -0
  12. package/build/components/Modal/index.d.ts +12 -0
  13. package/build/config/index.d.ts +5 -0
  14. package/build/i18n/de.d.ts +32 -0
  15. package/build/i18n/es.d.ts +32 -0
  16. package/build/i18n/fr.d.ts +32 -0
  17. package/build/i18n/i18n.d.ts +6 -0
  18. package/build/i18n/it.d.ts +32 -0
  19. package/build/i18n/useTranslation.d.ts +9 -0
  20. package/build/importer/components/Box/index.d.ts +2 -0
  21. package/build/importer/components/Box/types/index.d.ts +5 -0
  22. package/build/importer/components/Checkbox/index.d.ts +2 -0
  23. package/build/importer/components/Checkbox/types/index.d.ts +4 -0
  24. package/build/importer/components/Errors/index.d.ts +4 -0
  25. package/build/importer/components/Input/index.d.ts +2 -0
  26. package/build/importer/components/Input/types/index.d.ts +18 -0
  27. package/build/importer/components/Root/index.d.ts +10 -0
  28. package/build/importer/components/StepLayout/index.d.ts +18 -0
  29. package/build/importer/components/Stepper/hooks/useStepper.d.ts +2 -0
  30. package/build/importer/components/Stepper/index.d.ts +2 -0
  31. package/build/importer/components/Stepper/types/index.d.ts +14 -0
  32. package/build/importer/components/Table/index.d.ts +9 -0
  33. package/build/importer/components/ToggleFilter/index.d.ts +3 -0
  34. package/build/importer/components/ToggleFilter/types/index.d.ts +11 -0
  35. package/build/importer/components/Tooltip/index.d.ts +2 -0
  36. package/build/importer/components/Tooltip/types/index.d.ts +11 -0
  37. package/build/importer/components/UploaderWrapper/NativeDropzone.d.ts +11 -0
  38. package/build/importer/components/UploaderWrapper/UploaderWrapper.d.ts +2 -0
  39. package/build/importer/components/UploaderWrapper/types/index.d.ts +2 -0
  40. package/build/importer/components/VirtualTable/index.d.ts +17 -0
  41. package/build/importer/components/ui/alert.d.ts +10 -0
  42. package/build/importer/components/ui/button.d.ts +12 -0
  43. package/build/importer/components/ui/card.d.ts +19 -0
  44. package/build/importer/components/ui/checkbox.d.ts +7 -0
  45. package/build/importer/components/ui/dialog.d.ts +39 -0
  46. package/build/importer/components/ui/flex.d.ts +23 -0
  47. package/build/importer/components/ui/input.d.ts +6 -0
  48. package/build/importer/components/ui/select.d.ts +13 -0
  49. package/build/importer/components/ui/switch.d.ts +7 -0
  50. package/build/importer/components/ui/toast.d.ts +23 -0
  51. package/build/importer/components/ui/toaster.d.ts +1 -0
  52. package/build/importer/components/ui/tooltip.d.ts +20 -0
  53. package/build/importer/components/ui/use-toast.d.ts +46 -0
  54. package/build/importer/features/complete/index.d.ts +2 -0
  55. package/build/importer/features/complete/types/index.d.ts +5 -0
  56. package/build/importer/features/configure-import/index.d.ts +13 -0
  57. package/build/importer/features/configure-import/types/index.d.ts +13 -0
  58. package/build/importer/features/main/hooks/useMutableLocalStorage.d.ts +1 -0
  59. package/build/importer/features/main/hooks/useStepNavigation.d.ts +17 -0
  60. package/build/importer/features/main/index.d.ts +2 -0
  61. package/build/importer/features/main/types/index.d.ts +16 -0
  62. package/build/importer/features/map-columns/components/DropDownFields.d.ts +21 -0
  63. package/build/importer/features/map-columns/hooks/useMapColumnsTable.d.ts +16 -0
  64. package/build/importer/features/map-columns/index.d.ts +2 -0
  65. package/build/importer/features/map-columns/types/index.d.ts +16 -0
  66. package/build/importer/features/row-selection/index.d.ts +2 -0
  67. package/build/importer/features/row-selection/types/index.d.ts +8 -0
  68. package/build/importer/features/uploader/hooks/useTemplateTable.d.ts +10 -0
  69. package/build/importer/features/uploader/index.d.ts +2 -0
  70. package/build/importer/features/uploader/types/index.d.ts +9 -0
  71. package/build/importer/features/validation/Validation.d.ts +2 -0
  72. package/build/importer/features/validation/components/TransformModal.d.ts +18 -0
  73. package/build/importer/features/validation/components/TransformPanel.d.ts +18 -0
  74. package/build/importer/features/validation/index.d.ts +1 -0
  75. package/build/importer/features/validation/types.d.ts +32 -0
  76. package/build/importer/hooks/useClickOutside.d.ts +1 -0
  77. package/build/importer/hooks/useCustomStyles.d.ts +1 -0
  78. package/build/importer/hooks/useEventListener.d.ts +4 -0
  79. package/build/importer/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
  80. package/build/importer/hooks/useRect.d.ts +12 -0
  81. package/build/importer/hooks/useWindowSize.d.ts +1 -0
  82. package/build/importer/providers/Theme.d.ts +10 -0
  83. package/build/importer/providers/index.d.ts +5 -0
  84. package/build/importer/providers/types/index.d.ts +10 -0
  85. package/build/importer/services/api.d.ts +1 -0
  86. package/build/importer/services/mapping.d.ts +31 -0
  87. package/build/importer/services/transformation.d.ts +70 -0
  88. package/build/importer/settings/theme/colors.d.ts +4 -0
  89. package/build/importer/settings/theme/index.d.ts +2 -0
  90. package/build/importer/settings/theme/sizes.d.ts +7 -0
  91. package/build/importer/stores/theme.d.ts +17 -0
  92. package/build/importer/theme/index.d.ts +8 -0
  93. package/build/importer/theme/presets.d.ts +314 -0
  94. package/build/importer/theme/runtime.d.ts +66 -0
  95. package/build/importer/theme/styles.d.ts +120 -0
  96. package/build/importer/types/index.d.ts +9 -0
  97. package/build/importer/utils/colorUtils.d.ts +48 -0
  98. package/build/importer/utils/errorAnalysis.d.ts +25 -0
  99. package/build/importer/utils/getStringLengthOfChildren.d.ts +2 -0
  100. package/build/importer/utils/stringSimilarity.d.ts +1 -0
  101. package/build/importer/utils/template.d.ts +2 -0
  102. package/build/importer/utils/themeUtils.d.ts +24 -0
  103. package/build/importer/utils/utils.d.ts +19 -0
  104. package/build/index.d.ts +6 -0
  105. package/build/index.dev.d.ts +1 -0
  106. package/build/js.d.ts +12 -0
  107. package/build/preact/importer/components/ui/use-toast.d.ts +1 -1
  108. package/build/preact/index.esm.js +2053 -2231
  109. package/build/preact/index.esm.js.map +1 -1
  110. package/build/preact/index.js +30 -30
  111. package/build/preact/index.js.map +1 -1
  112. package/build/preact/utils/injectStyles.d.ts +14 -0
  113. package/build/react/components/Modal/index.d.ts +12 -0
  114. package/build/react/importer/components/Table/types/index.d.ts +42 -0
  115. package/build/react/importer/components/ui/alert.d.ts +4 -1
  116. package/build/react/importer/components/ui/tooltip.d.ts +6 -2
  117. package/build/react/index.d.ts +1 -0
  118. package/build/react/index.esm.js +3993 -3803
  119. package/build/react/index.esm.js.map +1 -1
  120. package/build/react/index.js +31 -31
  121. package/build/react/index.js.map +1 -1
  122. package/build/services/api.d.ts +50 -0
  123. package/build/services/apiClient.d.ts +55 -0
  124. package/build/settings/defaults.d.ts +3 -0
  125. package/build/shims/react-compat-shim.d.ts +2 -0
  126. package/build/shims/react-hooks-shim.d.ts +2 -0
  127. package/build/styles.d.ts +1 -0
  128. package/build/types/index.d.ts +132 -0
  129. package/build/types/theme.d.ts +153 -0
  130. package/build/utils/cn.d.ts +6 -0
  131. package/build/validation/transformationStages.d.ts +26 -0
  132. package/build/validation/transformer.d.ts +17 -0
  133. package/build/validation/validator.d.ts +23 -0
  134. package/package.json +2 -2
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Injects ImportCSV styles into the document head
3
+ * Uses a singleton pattern to prevent duplicate injection
4
+ */
5
+ export declare function injectImportCSVStyles(): void;
6
+ /**
7
+ * Removes ImportCSV styles from the DOM
8
+ * Useful for cleanup in certain scenarios
9
+ */
10
+ export declare function removeImportCSVStyles(): void;
11
+ /**
12
+ * Checks if ImportCSV styles are currently injected
13
+ */
14
+ export declare function areStylesInjected(): boolean;
@@ -0,0 +1,12 @@
1
+ import { ComponentChildren } from '../../../react';
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('react').ReactPortal | null;
12
+ export default Modal;
@@ -0,0 +1,42 @@
1
+ import { JSX } from '../../../../../react';
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?: ReactElement;
25
+ heading?: ReactElement;
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 = PropsWithChildren<{
38
+ cellClass?: string;
39
+ cellStyle: Style;
40
+ tooltip?: string;
41
+ }>;
42
+ export {};
@@ -1,4 +1,7 @@
1
- declare const Alert: import('../../../../react').FunctionalComponent<import('../../../../react').PropsWithoutRef<any> & {
1
+ import { VariantProps } from 'class-variance-authority';
2
+ declare const Alert: import('../../../../react').FunctionalComponent<import('../../../../react').PropsWithoutRef<JSX.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
3
+ variant?: "default" | "destructive" | null | undefined;
4
+ } & import('class-variance-authority/dist/types').ClassProp) | undefined) => string>> & {
2
5
  ref?: import('../../../../react').Ref<HTMLDivElement> | undefined;
3
6
  }>;
4
7
  declare const AlertTitle: import('../../../../react').FunctionalComponent<import('../../../../react').PropsWithoutRef<JSX.HTMLAttributes<HTMLHeadingElement>> & {
@@ -11,10 +11,14 @@ declare const TooltipProvider: ({ children }: {
11
11
  children: ComponentChildren;
12
12
  }) => import("react/jsx-runtime").JSX.Element;
13
13
  declare const TooltipRoot: ({ content, children, delayDuration, side, className }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
14
- declare const TooltipTrigger: import('../../../../react').FunctionalComponent<import('../../../../react').PropsWithoutRef<any> & {
14
+ declare const TooltipTrigger: import('../../../../react').FunctionalComponent<import('../../../../react').PropsWithoutRef<JSX.HTMLAttributes<HTMLDivElement> & {
15
+ asChild?: boolean | undefined;
16
+ }> & {
15
17
  ref?: import('../../../../react').Ref<HTMLDivElement> | undefined;
16
18
  }>;
17
- declare const TooltipContent: import('../../../../react').FunctionalComponent<import('../../../../react').PropsWithoutRef<any> & {
19
+ declare const TooltipContent: import('../../../../react').FunctionalComponent<import('../../../../react').PropsWithoutRef<JSX.HTMLAttributes<HTMLDivElement> & {
20
+ sideOffset?: number | undefined;
21
+ }> & {
18
22
  ref?: import('../../../../react').Ref<HTMLDivElement> | undefined;
19
23
  }>;
20
24
  export { Tooltip, TooltipRoot, TooltipTrigger, TooltipContent, TooltipProvider };
@@ -1,4 +1,5 @@
1
1
  import { default as CSVImporter } from './components/CSVImporter';
2
2
  export { CSVImporter };
3
+ export default CSVImporter;
3
4
  export { importcsvStyles } from './styles';
4
5
  export type { Column, Validator, Transformer } from './types';