@importcsv/react 0.1.17 → 0.2.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 +16 -6
- package/build/bundle.css +1 -0
- package/build/bundled-styles.d.ts +1 -1
- package/build/components/CSVImporter/index.d.ts +32 -35
- package/build/i18n/de.d.ts +32 -32
- package/build/i18n/es.d.ts +32 -32
- package/build/i18n/fr.d.ts +32 -32
- package/build/i18n/i18n.d.ts +6 -6
- package/build/i18n/it.d.ts +32 -32
- package/build/i18n/useTranslation.d.ts +9 -9
- package/build/importer/components/Box/index.d.ts +2 -2
- package/build/importer/components/Box/types/index.d.ts +6 -6
- package/build/importer/components/Checkbox/index.d.ts +2 -2
- package/build/importer/components/Checkbox/types/index.d.ts +4 -4
- package/build/importer/components/Errors/index.d.ts +4 -4
- package/build/importer/components/IframeWrapper/index.d.ts +25 -25
- package/build/importer/components/ImporterLayout.d.ts +15 -0
- package/build/importer/components/Input/index.d.ts +2 -2
- package/build/importer/components/Input/types/index.d.ts +18 -18
- package/build/importer/components/Stepper/hooks/useStepper.d.ts +2 -2
- package/build/importer/components/Stepper/index.d.ts +2 -2
- package/build/importer/components/Stepper/types/index.d.ts +14 -13
- package/build/importer/components/Table/index.d.ts +9 -9
- package/build/importer/components/Table/types/index.d.ts +42 -42
- package/build/importer/components/ToggleFilter/index.d.ts +3 -3
- package/build/importer/components/ToggleFilter/types/index.d.ts +11 -11
- package/build/importer/components/Tooltip/index.d.ts +2 -2
- package/build/importer/components/Tooltip/types/index.d.ts +11 -11
- package/build/importer/components/UploaderWrapper/UploaderWrapper.d.ts +2 -2
- package/build/importer/components/UploaderWrapper/types/index.d.ts +2 -2
- package/build/importer/components/ui/alert.d.ts +8 -8
- package/build/importer/components/ui/button.d.ts +12 -12
- package/build/importer/components/ui/card.d.ts +8 -8
- package/build/importer/components/ui/checkbox.d.ts +4 -4
- package/build/importer/components/ui/dialog.d.ts +19 -19
- package/build/importer/components/ui/flex.d.ts +14 -14
- package/build/importer/components/ui/input.d.ts +5 -5
- package/build/importer/components/ui/select.d.ts +13 -13
- package/build/importer/components/ui/switch.d.ts +4 -4
- package/build/importer/components/ui/toast.d.ts +15 -15
- package/build/importer/components/ui/toaster.d.ts +1 -1
- package/build/importer/components/ui/tooltip.d.ts +13 -13
- package/build/importer/components/ui/use-toast.d.ts +44 -44
- package/build/importer/features/complete/index.d.ts +2 -2
- package/build/importer/features/complete/types/index.d.ts +5 -5
- package/build/importer/features/configure-import/index.d.ts +13 -13
- package/build/importer/features/configure-import/types/index.d.ts +13 -19
- package/build/importer/features/main/hooks/useMutableLocalStorage.d.ts +1 -1
- package/build/importer/features/main/hooks/useStepNavigation.d.ts +17 -18
- package/build/importer/features/main/index.d.ts +2 -2
- package/build/importer/features/main/types/index.d.ts +16 -16
- package/build/importer/features/map-columns/components/DropDownFields.d.ts +21 -19
- package/build/importer/features/map-columns/hooks/useMapColumnsTable.d.ts +16 -15
- package/build/importer/features/map-columns/index.d.ts +2 -2
- package/build/importer/features/map-columns/types/index.d.ts +16 -23
- package/build/importer/features/row-selection/index.d.ts +2 -2
- package/build/importer/features/row-selection/types/index.d.ts +8 -8
- package/build/importer/features/uploader/hooks/useTemplateTable.d.ts +10 -10
- package/build/importer/features/uploader/index.d.ts +2 -2
- package/build/importer/features/uploader/types/index.d.ts +9 -9
- package/build/importer/features/validation/Validation.d.ts +2 -2
- package/build/importer/features/validation/components/TransformModal.d.ts +18 -18
- package/build/importer/features/validation/index.d.ts +1 -1
- package/build/importer/features/validation/types.d.ts +32 -32
- package/build/importer/hooks/useClickOutside.d.ts +1 -1
- package/build/importer/hooks/useCustomStyles.d.ts +1 -1
- package/build/importer/hooks/useDemoData.d.ts +16 -0
- package/build/importer/hooks/useEventListener.d.ts +4 -4
- package/build/importer/hooks/useImporterSchema.d.ts +21 -0
- package/build/importer/hooks/useIsomorphicLayoutEffect.d.ts +3 -3
- package/build/importer/hooks/useRect.d.ts +12 -12
- package/build/importer/hooks/useWindowSize.d.ts +1 -1
- package/build/importer/providers/Theme.d.ts +5 -6
- package/build/importer/providers/index.d.ts +5 -5
- package/build/importer/providers/types/index.d.ts +4 -4
- package/build/importer/services/api.d.ts +1 -0
- package/build/importer/services/dataProcessor.d.ts +38 -0
- package/build/importer/services/mapping.d.ts +31 -31
- package/build/importer/services/transformation.d.ts +70 -70
- package/build/importer/settings/theme/colors.d.ts +4 -4
- package/build/importer/settings/theme/index.d.ts +2 -2
- package/build/importer/settings/theme/sizes.d.ts +7 -7
- package/build/importer/stores/theme.d.ts +17 -17
- package/build/importer/types/index.d.ts +9 -17
- package/build/importer/utils/colorUtils.d.ts +48 -44
- package/build/importer/utils/getStringLengthOfChildren.d.ts +2 -2
- package/build/importer/utils/stringSimilarity.d.ts +1 -1
- package/build/importer/utils/template.d.ts +2 -2
- package/build/importer/utils/utils.d.ts +19 -11
- package/build/index.d.ts +4 -3
- package/build/index.esm.js +10896 -34418
- package/build/index.esm.js.map +1 -1
- package/build/index.js +262 -37879
- package/build/index.js.map +1 -1
- package/build/js.d.ts +39 -40
- package/build/settings/defaults.d.ts +3 -3
- package/build/styles.d.ts +1 -1
- package/build/types/index.d.ts +105 -33
- package/build/utils/cn.d.ts +6 -0
- package/build/validation/transformer.d.ts +33 -0
- package/build/validation/validator.d.ts +23 -0
- package/package.json +14 -41
- package/build/App.d.ts +0 -2
- package/build/build/bundle.css +0 -3789
- package/build/config/index.d.ts +0 -5
- package/build/importer/components/Portal/index.d.ts +0 -3
- package/build/importer/components/Portal/types/index.d.ts +0 -5
- package/build/importer/components/Table/storyData.d.ts +0 -36
- package/build/importer/features/map-columns/hooks/useNameChange.d.ts +0 -5
- package/build/importer/features/validation/SimpleValidation.d.ts +0 -2
- package/build/importer/features/validation/components/SimpleSpreadsheetGrid/SimpleSpreadsheetGrid.d.ts +0 -27
- package/build/importer/features/validation/components/SimpleSpreadsheetGrid/index.d.ts +0 -1
- package/build/importer/features/validation/components/SpreadsheetGrid/CellSelection.d.ts +0 -15
- package/build/importer/features/validation/components/SpreadsheetGrid/ClipboardManager.d.ts +0 -20
- package/build/importer/features/validation/components/SpreadsheetGrid/FindReplaceModal.d.ts +0 -14
- package/build/importer/features/validation/components/SpreadsheetGrid/SpreadsheetGrid.d.ts +0 -37
- package/build/importer/features/validation/components/SpreadsheetGrid/UndoRedoManager.d.ts +0 -15
- package/build/importer/features/validation/components/SpreadsheetGrid/index.d.ts +0 -1
- package/build/importer/hooks/useDelayLoader.d.ts +0 -2
- package/build/importer/settings/chakra/components/alert.d.ts +0 -31
- package/build/importer/settings/chakra/components/button.d.ts +0 -37
- package/build/importer/settings/chakra/components/index.d.ts +0 -2
- package/build/importer/settings/chakra/foundations/blur.d.ts +0 -11
- package/build/importer/settings/chakra/foundations/borders.d.ts +0 -8
- package/build/importer/settings/chakra/foundations/breakpoints.d.ts +0 -9
- package/build/importer/settings/chakra/foundations/colors.d.ts +0 -247
- package/build/importer/settings/chakra/foundations/index.d.ts +0 -487
- package/build/importer/settings/chakra/foundations/radius.d.ts +0 -12
- package/build/importer/settings/chakra/foundations/shadows.d.ts +0 -14
- package/build/importer/settings/chakra/foundations/sizes.d.ts +0 -60
- package/build/importer/settings/chakra/foundations/spacing.d.ts +0 -35
- package/build/importer/settings/chakra/foundations/transition.d.ts +0 -24
- package/build/importer/settings/chakra/foundations/typography.d.ts +0 -61
- package/build/importer/settings/chakra/foundations/z-index.d.ts +0 -16
- package/build/importer/settings/chakra/index.d.ts +0 -592
- package/build/importer/settings/chakra/semantic-tokens.d.ts +0 -32
- package/build/importer/settings/chakra/styles.d.ts +0 -2
- package/build/importer/settings/chakra/theme.types.d.ts +0 -93
- package/build/importer/settings/chakra/utils/is-chakra-theme.d.ts +0 -3
- package/build/importer/settings/chakra/utils/run-if-fn.d.ts +0 -1
- package/build/importer/utils/classes.d.ts +0 -2
- package/build/importer/utils/debounce.d.ts +0 -2
- package/build/index.dev.d.ts +0 -1
- package/build/package.json +0 -92
- package/build/services/api.d.ts +0 -18
- package/build/services/apiClient.d.ts +0 -21
- package/build/utils/classes.d.ts +0 -6
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Natural language data transformation service
|
|
3
|
-
*/
|
|
4
|
-
export interface TransformationChange {
|
|
5
|
-
rowIndex: number;
|
|
6
|
-
columnKey: string;
|
|
7
|
-
columnIndex?: number;
|
|
8
|
-
oldValue: any;
|
|
9
|
-
newValue: any;
|
|
10
|
-
confidence: number;
|
|
11
|
-
selected: boolean;
|
|
12
|
-
}
|
|
13
|
-
export interface TransformationResponse {
|
|
14
|
-
success: boolean;
|
|
15
|
-
changes: TransformationChange[];
|
|
16
|
-
summary: string;
|
|
17
|
-
error?: string;
|
|
18
|
-
tokensUsed?: number;
|
|
19
|
-
}
|
|
20
|
-
export interface ValidationError {
|
|
21
|
-
rowIndex: number;
|
|
22
|
-
columnKey: string;
|
|
23
|
-
message: string;
|
|
24
|
-
value?: any;
|
|
25
|
-
}
|
|
26
|
-
export interface TransformationRequest {
|
|
27
|
-
prompt: string;
|
|
28
|
-
data: any[];
|
|
29
|
-
columnMapping: Record<string, any>;
|
|
30
|
-
targetColumns?: string[];
|
|
31
|
-
validationErrors?: ValidationError[];
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Generate data transformations based on natural language prompt
|
|
35
|
-
*
|
|
36
|
-
* @param prompt - Natural language description of the transformation
|
|
37
|
-
* @param data - Current data rows
|
|
38
|
-
* @param columnMapping - Mapping of columns
|
|
39
|
-
* @param backendUrl - Backend API URL
|
|
40
|
-
* @param importerKey - Importer key for authentication
|
|
41
|
-
* @param targetColumns - Optional specific columns to transform
|
|
42
|
-
* @param validationErrors - Optional validation errors for context
|
|
43
|
-
* @returns Transformation preview with changes
|
|
44
|
-
*/
|
|
45
|
-
export declare function generateTransformations(prompt: string, data: any[], columnMapping: Record<string, any>, backendUrl: string, importerKey: string, targetColumns?: string[], validationErrors?: ValidationError[]): Promise<TransformationResponse>;
|
|
46
|
-
/**
|
|
47
|
-
* Apply selected transformations to the data
|
|
48
|
-
*
|
|
49
|
-
* @param data - Original data rows
|
|
50
|
-
* @param changes - List of transformation changes
|
|
51
|
-
* @param onlySelected - Whether to apply only selected changes
|
|
52
|
-
* @returns Modified data with transformations applied
|
|
53
|
-
*/
|
|
54
|
-
export declare function applyTransformations(data: any[], changes: TransformationChange[], onlySelected?: boolean): any[];
|
|
55
|
-
/**
|
|
56
|
-
* Count selected changes
|
|
57
|
-
*/
|
|
58
|
-
export declare function countSelectedChanges(changes: TransformationChange[]): number;
|
|
59
|
-
/**
|
|
60
|
-
* Toggle selection for a specific change
|
|
61
|
-
*/
|
|
62
|
-
export declare function toggleChangeSelection(changes: TransformationChange[], index: number): TransformationChange[];
|
|
63
|
-
/**
|
|
64
|
-
* Select or deselect all changes
|
|
65
|
-
*/
|
|
66
|
-
export declare function setAllChangesSelection(changes: TransformationChange[], selected: boolean): TransformationChange[];
|
|
67
|
-
/**
|
|
68
|
-
* Common transformation prompts for quick access
|
|
69
|
-
*/
|
|
70
|
-
export declare const COMMON_PROMPTS: string[];
|
|
1
|
+
/**
|
|
2
|
+
* Natural language data transformation service
|
|
3
|
+
*/
|
|
4
|
+
export interface TransformationChange {
|
|
5
|
+
rowIndex: number;
|
|
6
|
+
columnKey: string;
|
|
7
|
+
columnIndex?: number;
|
|
8
|
+
oldValue: any;
|
|
9
|
+
newValue: any;
|
|
10
|
+
confidence: number;
|
|
11
|
+
selected: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface TransformationResponse {
|
|
14
|
+
success: boolean;
|
|
15
|
+
changes: TransformationChange[];
|
|
16
|
+
summary: string;
|
|
17
|
+
error?: string;
|
|
18
|
+
tokensUsed?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface ValidationError {
|
|
21
|
+
rowIndex: number;
|
|
22
|
+
columnKey: string;
|
|
23
|
+
message: string;
|
|
24
|
+
value?: any;
|
|
25
|
+
}
|
|
26
|
+
export interface TransformationRequest {
|
|
27
|
+
prompt: string;
|
|
28
|
+
data: any[];
|
|
29
|
+
columnMapping: Record<string, any>;
|
|
30
|
+
targetColumns?: string[];
|
|
31
|
+
validationErrors?: ValidationError[];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Generate data transformations based on natural language prompt
|
|
35
|
+
*
|
|
36
|
+
* @param prompt - Natural language description of the transformation
|
|
37
|
+
* @param data - Current data rows
|
|
38
|
+
* @param columnMapping - Mapping of columns
|
|
39
|
+
* @param backendUrl - Backend API URL
|
|
40
|
+
* @param importerKey - Importer key for authentication
|
|
41
|
+
* @param targetColumns - Optional specific columns to transform
|
|
42
|
+
* @param validationErrors - Optional validation errors for context
|
|
43
|
+
* @returns Transformation preview with changes
|
|
44
|
+
*/
|
|
45
|
+
export declare function generateTransformations(prompt: string, data: any[], columnMapping: Record<string, any>, backendUrl: string, importerKey: string, targetColumns?: string[], validationErrors?: ValidationError[]): Promise<TransformationResponse>;
|
|
46
|
+
/**
|
|
47
|
+
* Apply selected transformations to the data
|
|
48
|
+
*
|
|
49
|
+
* @param data - Original data rows
|
|
50
|
+
* @param changes - List of transformation changes
|
|
51
|
+
* @param onlySelected - Whether to apply only selected changes
|
|
52
|
+
* @returns Modified data with transformations applied
|
|
53
|
+
*/
|
|
54
|
+
export declare function applyTransformations(data: any[], changes: TransformationChange[], onlySelected?: boolean): any[];
|
|
55
|
+
/**
|
|
56
|
+
* Count selected changes
|
|
57
|
+
*/
|
|
58
|
+
export declare function countSelectedChanges(changes: TransformationChange[]): number;
|
|
59
|
+
/**
|
|
60
|
+
* Toggle selection for a specific change
|
|
61
|
+
*/
|
|
62
|
+
export declare function toggleChangeSelection(changes: TransformationChange[], index: number): TransformationChange[];
|
|
63
|
+
/**
|
|
64
|
+
* Select or deselect all changes
|
|
65
|
+
*/
|
|
66
|
+
export declare function setAllChangesSelection(changes: TransformationChange[], selected: boolean): TransformationChange[];
|
|
67
|
+
/**
|
|
68
|
+
* Common transformation prompts for quick access
|
|
69
|
+
*/
|
|
70
|
+
export declare const COMMON_PROMPTS: string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const colors: {
|
|
2
|
-
primary: string;
|
|
3
|
-
error: string;
|
|
4
|
-
};
|
|
1
|
+
export declare const colors: {
|
|
2
|
+
primary: string;
|
|
3
|
+
error: string;
|
|
4
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from './colors';
|
|
2
|
+
export * from './sizes';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare const sizes: {
|
|
2
|
-
icon: {
|
|
3
|
-
small: string;
|
|
4
|
-
medium: string;
|
|
5
|
-
large: string;
|
|
6
|
-
};
|
|
7
|
-
};
|
|
1
|
+
export declare const sizes: {
|
|
2
|
+
icon: {
|
|
3
|
+
small: string;
|
|
4
|
+
medium: string;
|
|
5
|
+
large: string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
type Theme = "dark" | "light";
|
|
2
|
-
type themeStoreType = {
|
|
3
|
-
theme: Theme;
|
|
4
|
-
setTheme: (theme?: Theme) => void;
|
|
5
|
-
};
|
|
6
|
-
declare const useThemeStore: import(
|
|
7
|
-
persist: {
|
|
8
|
-
setOptions: (options: Partial<import(
|
|
9
|
-
clearStorage: () => void;
|
|
10
|
-
rehydrate: () => void | Promise<void>;
|
|
11
|
-
hasHydrated: () => boolean;
|
|
12
|
-
onHydrate: (fn: (state: themeStoreType) => void) => () => void;
|
|
13
|
-
onFinishHydration: (fn: (state: themeStoreType) => void) => () => void;
|
|
14
|
-
getOptions: () => Partial<import(
|
|
15
|
-
};
|
|
16
|
-
}>;
|
|
17
|
-
export default useThemeStore;
|
|
1
|
+
type Theme = "dark" | "light";
|
|
2
|
+
type themeStoreType = {
|
|
3
|
+
theme: Theme;
|
|
4
|
+
setTheme: (theme?: Theme) => void;
|
|
5
|
+
};
|
|
6
|
+
declare const useThemeStore: import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<themeStoreType>, "persist"> & {
|
|
7
|
+
persist: {
|
|
8
|
+
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<themeStoreType, themeStoreType>>) => void;
|
|
9
|
+
clearStorage: () => void;
|
|
10
|
+
rehydrate: () => void | Promise<void>;
|
|
11
|
+
hasHydrated: () => boolean;
|
|
12
|
+
onHydrate: (fn: (state: themeStoreType) => void) => () => void;
|
|
13
|
+
onFinishHydration: (fn: (state: themeStoreType) => void) => () => void;
|
|
14
|
+
getOptions: () => Partial<import('zustand/middleware').PersistOptions<themeStoreType, themeStoreType>>;
|
|
15
|
+
};
|
|
16
|
+
}>;
|
|
17
|
+
export default useThemeStore;
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
validation_format?: string;
|
|
11
|
-
type?: string;
|
|
12
|
-
};
|
|
13
|
-
export type UploadColumn = {
|
|
14
|
-
index: number;
|
|
15
|
-
name: string;
|
|
16
|
-
sample_data: string[];
|
|
17
|
-
};
|
|
1
|
+
import { Column } from '../../types';
|
|
2
|
+
export type Template = {
|
|
3
|
+
columns: Column[];
|
|
4
|
+
};
|
|
5
|
+
export type UploadColumn = {
|
|
6
|
+
index: number;
|
|
7
|
+
name: string;
|
|
8
|
+
sample_data: string[];
|
|
9
|
+
};
|
|
@@ -1,44 +1,48 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Color utility functions for theme customization
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
*/
|
|
7
|
-
export declare function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
*/
|
|
19
|
-
export declare function
|
|
20
|
-
/**
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
export declare function
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
*/
|
|
27
|
-
export declare function
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Color utility functions for theme customization
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Validate hex color format
|
|
6
|
+
*/
|
|
7
|
+
export declare function isValidColor(color: string): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Convert hex color to RGB
|
|
10
|
+
*/
|
|
11
|
+
export declare function hexToRgb(hex: string): {
|
|
12
|
+
r: number;
|
|
13
|
+
g: number;
|
|
14
|
+
b: number;
|
|
15
|
+
} | null;
|
|
16
|
+
/**
|
|
17
|
+
* Convert RGB to hex color
|
|
18
|
+
*/
|
|
19
|
+
export declare function rgbToHex(r: number, g: number, b: number): string;
|
|
20
|
+
/**
|
|
21
|
+
* Lighten a color by a percentage
|
|
22
|
+
*/
|
|
23
|
+
export declare function lightenColor(hex: string, percent: number): string;
|
|
24
|
+
/**
|
|
25
|
+
* Darken a color by a percentage
|
|
26
|
+
*/
|
|
27
|
+
export declare function darkenColor(hex: string, percent: number): string;
|
|
28
|
+
/**
|
|
29
|
+
* Generate color palette from a base color
|
|
30
|
+
*/
|
|
31
|
+
export declare function generateColorPalette(baseColor: string): {
|
|
32
|
+
50: string;
|
|
33
|
+
100: string;
|
|
34
|
+
200: string;
|
|
35
|
+
300: string;
|
|
36
|
+
400: string;
|
|
37
|
+
500: string;
|
|
38
|
+
600: string;
|
|
39
|
+
700: string;
|
|
40
|
+
800: string;
|
|
41
|
+
900: string;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Apply color palette to CSS variables
|
|
45
|
+
* @param primaryColor - The primary color to generate palette from
|
|
46
|
+
* @param targetElement - The element to apply styles to (defaults to a scoped container, not document root)
|
|
47
|
+
*/
|
|
48
|
+
export declare function applyColorPalette(primaryColor: string, targetElement?: HTMLElement): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export default function getStringLengthOfChildren(children: React.ReactNode): number;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export default function getStringLengthOfChildren(children: React.ReactNode): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function stringsSimilarity(s1: string, s2: string): number;
|
|
1
|
+
export default function stringsSimilarity(s1: string, s2: string): number;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Template } from
|
|
2
|
-
export declare function convertRawTemplate(rawTemplate?: Record<string, unknown> | string): [Template | null, string | null];
|
|
1
|
+
import { Template } from '../types';
|
|
2
|
+
export declare function convertRawTemplate(rawTemplate?: Record<string, unknown> | string): [Template | null, string | null];
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export declare const
|
|
1
|
+
/**
|
|
2
|
+
* Parse JSON input that can be either an object or a string
|
|
3
|
+
* @param param - The parameter to parse (object or JSON string)
|
|
4
|
+
* @param options - Options for parsing
|
|
5
|
+
* @returns Parsed object or stringified JSON based on options
|
|
6
|
+
*/
|
|
7
|
+
export declare function parseJSON<T extends 'object' | 'string' = 'object'>(param?: Record<string, unknown> | string, options?: {
|
|
8
|
+
returnType?: T;
|
|
9
|
+
escapePercent?: boolean;
|
|
10
|
+
}): T extends 'string' ? string : Record<string, unknown>;
|
|
11
|
+
export declare const parseObjectOrStringJSON: (name: string, param?: Record<string, unknown> | string) => string;
|
|
12
|
+
export declare const parseObjectOrStringJSONToRecord: (name: string, param?: Record<string, unknown> | string) => Record<string, unknown>;
|
|
13
|
+
export declare const validateJSON: (str: string, paramName: string) => string;
|
|
14
|
+
export declare const sanitizeKey: (input: string) => string;
|
|
15
|
+
export declare const parseOptionalBoolean: (val?: boolean) => "true" | "false" | "";
|
|
16
|
+
export declare const strToBoolean: (str: string) => boolean;
|
|
17
|
+
export declare const strToOptionalBoolean: (str: string) => boolean | undefined;
|
|
18
|
+
export declare const strToDefaultBoolean: (str: string, defaultValue: boolean) => boolean;
|
|
19
|
+
export { isValidColor, darkenColor } from './colorUtils';
|
package/build/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import CSVImporter from
|
|
2
|
-
export { CSVImporter };
|
|
3
|
-
export { importcsvStyles } from
|
|
1
|
+
import { default as CSVImporter } from './components/CSVImporter';
|
|
2
|
+
export { CSVImporter };
|
|
3
|
+
export { importcsvStyles } from './styles';
|
|
4
|
+
export type { Column, Validator } from './types';
|