fuse-importer 0.1.1-testing → 0.1.3-testing
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/lib/esm/Importer/ImporterWithContext.d.ts +2 -0
- package/lib/esm/Importer/ImporterWithContext.js +12 -8
- package/lib/esm/Importer/Review/ReviewContextProvider.js +1 -1
- package/lib/esm/Importer/Uploader/DragAndDropImporter/ImporterDropzone.js +19 -11
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/filterMethods.js +2 -9
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/index.d.ts +2 -3
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/index.js +66 -15
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/useSpreadsheetFilter.d.ts +1 -1
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/utils.d.ts +1 -0
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/utils.js +7 -0
- package/lib/esm/Importer/common/Spreadsheet/components/SpreadsheetData.js +2 -2
- package/lib/esm/Importer/common/Spreadsheet/components/SpreadsheetRowCheckboxes.js +8 -8
- package/lib/esm/Importer/common/Spreadsheet/components/fields/SpreadsheetInput.js +1 -1
- package/lib/esm/Importer/common/Spreadsheet/components/fields/index.js +9 -8
- package/lib/esm/Importer/common/Spreadsheet/hooks.d.ts +1 -2
- package/lib/esm/Importer/common/Spreadsheet/hooks.js +39 -28
- package/lib/esm/Importer/common/Spreadsheet/transformation/transformators.js +1 -25
- package/lib/esm/Importer/contexts/ImporterContextProvider.d.ts +4 -2
- package/lib/esm/Importer/contexts/ImporterContextProvider.js +2 -1
- package/lib/esm/Importer/index.d.ts +4 -3
- package/lib/esm/Importer/index.js +2 -2
- package/lib/esm/common/Table/TableActions/CustomActions/CustomActions.d.ts +1 -0
- package/lib/esm/common/Table/TableActions/CustomActions/CustomActions.js +131 -0
- package/lib/esm/common/Table/TableActions/CustomActions/index.d.ts +1 -0
- package/lib/esm/common/Table/TableActions/CustomActions/index.js +1 -0
- package/lib/esm/common/Table/TableActions/DeleteSelectedRows.js +9 -1
- package/lib/esm/common/Table/TableActions/FilterByErrors/FilterByErrors.js +2 -2
- package/lib/esm/common/Table/TableActions/RowFilters.js +12 -8
- package/lib/esm/common/Table/TableActions/SearchRows.js +6 -5
- package/lib/esm/common/Table/TableActions/TableActions.js +2 -1
- package/lib/esm/common/Table/TableActions/icons.d.ts +1 -0
- package/lib/esm/common/Table/TableActions/icons.js +1 -0
- package/lib/esm/common/columnsTransformations.js +0 -8
- package/lib/esm/common/inputs/SelectMenu.d.ts +2 -1
- package/lib/esm/common/inputs/SelectMenu.js +7 -3
- package/lib/esm/common/inputs/TextInput.js +1 -1
- package/lib/esm/index.d.ts +3 -1
- package/lib/esm/index.js +9 -2
- package/lib/esm/locales/de.d.ts +8 -1
- package/lib/esm/locales/de.js +8 -1
- package/lib/esm/locales/en.d.ts +8 -1
- package/lib/esm/locales/en.js +8 -1
- package/lib/esm/locales/es.d.ts +8 -1
- package/lib/esm/locales/es.js +8 -1
- package/lib/esm/locales/fr.d.ts +8 -1
- package/lib/esm/locales/fr.js +8 -1
- package/lib/esm/types.d.ts +16 -4
- package/lib/esm/types.js +0 -1
- package/lib/main.js +4 -4
- package/package.json +1 -1
package/lib/esm/locales/es.d.ts
CHANGED
|
@@ -57,8 +57,9 @@ declare const _default: {
|
|
|
57
57
|
table_actions: {
|
|
58
58
|
filters_by_rows: {
|
|
59
59
|
all_rows: string;
|
|
60
|
-
valid_rows: string;
|
|
61
60
|
invalid_rows: string;
|
|
61
|
+
duplicates: string;
|
|
62
|
+
duplicates_deleted: string;
|
|
62
63
|
};
|
|
63
64
|
search_rows: {
|
|
64
65
|
tooltip: string;
|
|
@@ -83,6 +84,12 @@ declare const _default: {
|
|
|
83
84
|
example: string;
|
|
84
85
|
auto_corrections_amount: string;
|
|
85
86
|
};
|
|
87
|
+
custom_actions: {
|
|
88
|
+
label: string;
|
|
89
|
+
general_error_toast: string;
|
|
90
|
+
error_toast: string;
|
|
91
|
+
success_toast: string;
|
|
92
|
+
};
|
|
86
93
|
};
|
|
87
94
|
};
|
|
88
95
|
general: {
|
package/lib/esm/locales/es.js
CHANGED
|
@@ -58,8 +58,9 @@ export default {
|
|
|
58
58
|
table_actions: {
|
|
59
59
|
filters_by_rows: {
|
|
60
60
|
all_rows: "Todas las Filas",
|
|
61
|
-
valid_rows: "Filas Válidas",
|
|
62
61
|
invalid_rows: "Filas Inválidas",
|
|
62
|
+
duplicates: "Duplicadas",
|
|
63
|
+
duplicates_deleted: "{{count}} duplicados eliminados",
|
|
63
64
|
},
|
|
64
65
|
search_rows: {
|
|
65
66
|
tooltip: "Buscar algo",
|
|
@@ -84,6 +85,12 @@ export default {
|
|
|
84
85
|
example: "Ejemplo",
|
|
85
86
|
auto_corrections_amount: "Hemos corregido automáticamente {{amount}} problemas.",
|
|
86
87
|
},
|
|
88
|
+
custom_actions: {
|
|
89
|
+
label: "Más acciones",
|
|
90
|
+
general_error_toast: "No fue posible ejecutar la acción. Por favor, inténtalo nuevamente.",
|
|
91
|
+
error_toast: 'Se produjo un error al ejecutar la acción "{{actionName}}" en las filas seleccionadas. Por favor, revisa la implementación del código y vuelve a intentarlo.',
|
|
92
|
+
success_toast: 'La acción "{{actionName}}" se ejecutó correctamente en las filas seleccionadas.',
|
|
93
|
+
},
|
|
87
94
|
},
|
|
88
95
|
},
|
|
89
96
|
general: {
|
package/lib/esm/locales/fr.d.ts
CHANGED
|
@@ -57,8 +57,9 @@ declare const _default: {
|
|
|
57
57
|
table_actions: {
|
|
58
58
|
filters_by_rows: {
|
|
59
59
|
all_rows: string;
|
|
60
|
-
valid_rows: string;
|
|
61
60
|
invalid_rows: string;
|
|
61
|
+
duplicates: string;
|
|
62
|
+
duplicates_deleted: string;
|
|
62
63
|
};
|
|
63
64
|
search_rows: {
|
|
64
65
|
tooltip: string;
|
|
@@ -83,6 +84,12 @@ declare const _default: {
|
|
|
83
84
|
example: string;
|
|
84
85
|
auto_corrections_amount: string;
|
|
85
86
|
};
|
|
87
|
+
custom_actions: {
|
|
88
|
+
label: string;
|
|
89
|
+
general_error_toast: string;
|
|
90
|
+
error_toast: string;
|
|
91
|
+
success_toast: string;
|
|
92
|
+
};
|
|
86
93
|
};
|
|
87
94
|
};
|
|
88
95
|
general: {
|
package/lib/esm/locales/fr.js
CHANGED
|
@@ -58,8 +58,9 @@ export default {
|
|
|
58
58
|
table_actions: {
|
|
59
59
|
filters_by_rows: {
|
|
60
60
|
all_rows: "Toutes les lignes",
|
|
61
|
-
valid_rows: "Lignes valides",
|
|
62
61
|
invalid_rows: "Lignes invalides",
|
|
62
|
+
duplicates: "Doublons",
|
|
63
|
+
duplicates_deleted: "{{count}} doublons supprimés",
|
|
63
64
|
},
|
|
64
65
|
search_rows: {
|
|
65
66
|
tooltip: "Rechercher quelque chose",
|
|
@@ -84,6 +85,12 @@ export default {
|
|
|
84
85
|
example: "Exemple",
|
|
85
86
|
auto_corrections_amount: "Nous avons corrigé automatiquement {{amount}} problèmes.",
|
|
86
87
|
},
|
|
88
|
+
custom_actions: {
|
|
89
|
+
label: "Plus d'actions",
|
|
90
|
+
general_error_toast: "Il n'a pas été possible d'exécuter l'action. Veuillez réessayer.",
|
|
91
|
+
error_toast: "Une erreur est survenue lors de l'ex\u00E9cution de l'action \"{{actionName}}\" sur les lignes s\u00E9lectionn\u00E9es. Veuillez v\u00E9rifier la mise en \u0153uvre du code et r\u00E9essayer.",
|
|
92
|
+
success_toast: "L'action \"{{actionName}}\" a \u00E9t\u00E9 ex\u00E9cut\u00E9e avec succ\u00E8s sur les lignes s\u00E9lectionn\u00E9es.",
|
|
93
|
+
},
|
|
87
94
|
},
|
|
88
95
|
},
|
|
89
96
|
general: {
|
package/lib/esm/types.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export type ImporterOptions = {
|
|
|
15
15
|
disableSubmitIfInvalid?: boolean;
|
|
16
16
|
records?: Record[];
|
|
17
17
|
language?: string;
|
|
18
|
+
modal?: boolean;
|
|
18
19
|
} & SpreadsheetOptions;
|
|
19
20
|
export declare enum FieldTypes {
|
|
20
21
|
boolean = "boolean",
|
|
@@ -83,8 +84,8 @@ export declare const validationTypesBase: readonly ["cannot_contain", "contain",
|
|
|
83
84
|
export declare const mutableValidationTypes: ("boolean" | "max_length" | "min_length" | "cannot_contain" | "contain" | "length_exactly" | "unique_case_sensitive" | "unique_case_insensitive" | "regex" | "integer" | "less_than" | "greater_than" | "even" | "odd" | "float" | "email" | "url" | "before_date" | "after_date")[];
|
|
84
85
|
export type ValidationTypes = typeof validationTypesBase[number];
|
|
85
86
|
export type TransformationOptionKeys = "prefix" | "number_of_decimals";
|
|
86
|
-
export declare const transformationTypesBase: readonly ["sentence_case", "capitalize", "uppercase", "lowercase", "trim_whitespace", "autoformat", "prefix", "number_of_decimals", "round", "floor", "ceiling"
|
|
87
|
-
export declare const mutableTransformationTypes: ("prefix" | "number_of_decimals" | "sentence_case" | "capitalize" | "uppercase" | "lowercase" | "trim_whitespace" | "autoformat" | "round" | "floor" | "ceiling"
|
|
87
|
+
export declare const transformationTypesBase: readonly ["sentence_case", "capitalize", "uppercase", "lowercase", "trim_whitespace", "autoformat", "prefix", "number_of_decimals", "round", "floor", "ceiling"];
|
|
88
|
+
export declare const mutableTransformationTypes: ("prefix" | "number_of_decimals" | "sentence_case" | "capitalize" | "uppercase" | "lowercase" | "trim_whitespace" | "autoformat" | "round" | "floor" | "ceiling")[];
|
|
88
89
|
export type TransformationTypes = typeof transformationTypesBase[number];
|
|
89
90
|
export interface FieldValidation {
|
|
90
91
|
id?: number;
|
|
@@ -114,6 +115,14 @@ export type TemplateHeader = {
|
|
|
114
115
|
transformations: FieldTransformation[];
|
|
115
116
|
position: number;
|
|
116
117
|
};
|
|
118
|
+
type CARecordFn = (record: Record) => Promise<Record> | Record;
|
|
119
|
+
export type CustomActionTypes = "record";
|
|
120
|
+
type CustomActionHandler<T extends CustomActionTypes> = T extends "record" ? CARecordFn : never;
|
|
121
|
+
export type CustomAction<T extends CustomActionTypes = CustomActionTypes> = {
|
|
122
|
+
name: string;
|
|
123
|
+
actionType: T;
|
|
124
|
+
handler: CustomActionHandler<T>;
|
|
125
|
+
};
|
|
117
126
|
export type Organization = {
|
|
118
127
|
id: number;
|
|
119
128
|
name: string;
|
|
@@ -158,7 +167,7 @@ export type ColumnRequiredProps<T extends FieldTypesAsUnion> = Partial<Pick<Temp
|
|
|
158
167
|
transformations?: ColumnTransformations<T>[];
|
|
159
168
|
} & (T extends "enum" ? EnumOptions : T extends "time" ? TimeOptions : OtherOptions);
|
|
160
169
|
export type ValidationTypesRules<T extends FieldTypesAsUnion> = T extends "integer" ? IntegerValidationRule : T extends "float" ? FloatValidationRule : T extends "string" ? StringValidationRule : T extends "email" ? EmailValidationRule : T extends "enum" ? EnumValidationRule : T extends "url" ? UrlValidationRule : T extends "boolean" ? BooleanValidationRule : T extends "date" ? DateValidationRule : T extends "datetime" ? DateTimeValidationRule : T extends "time" ? TimeValidationRule : never;
|
|
161
|
-
export type TransformationTypesRules<T extends FieldTypesAsUnion> = T extends "integer" ? IntegerTransformationRule : T extends "float" ? FloatTransformationRule : T extends "string" ? StringTransformationRule : T extends "
|
|
170
|
+
export type TransformationTypesRules<T extends FieldTypesAsUnion> = T extends "integer" ? IntegerTransformationRule : T extends "float" ? FloatTransformationRule : T extends "string" ? StringTransformationRule : T extends "url" ? UrlTransformationRule : T extends "date" | "datetime" | "time" ? DateDateTimesAndTimesTransformationRule : never;
|
|
162
171
|
export type ValidationTypeOptions<T extends ValidationTypesRules<FieldTypesAsUnion>> = T extends "cannot_contain" | "contain" | "regex" ? {
|
|
163
172
|
pattern: string;
|
|
164
173
|
} : T extends "max_length" ? {
|
|
@@ -203,7 +212,6 @@ type FloatValidationRule = "less_than" | "greater_than" | "even" | "odd" | "uniq
|
|
|
203
212
|
type FloatTransformationRule = "number_of_decimals";
|
|
204
213
|
type EmailValidationRule = "cannot_contain" | "contain" | "max_length" | "min_length" | "length_exactly" | "unique_case_sensitive" | "unique_case_insensitive" | "regex";
|
|
205
214
|
type EnumValidationRule = "unique_case_sensitive" | "unique_case_insensitive";
|
|
206
|
-
type EnumTransformationRule = "autodetect";
|
|
207
215
|
type UrlValidationRule = "cannot_contain" | "contain" | "max_length" | "min_length" | "length_exactly" | "unique_case_sensitive" | "unique_case_insensitive" | "regex";
|
|
208
216
|
type UrlTransformationRule = "prefix";
|
|
209
217
|
type BooleanValidationRule = "boolean";
|
|
@@ -211,4 +219,8 @@ type DateValidationRule = "unique_case_sensitive" | "unique_case_insensitive" |
|
|
|
211
219
|
type DateTimeValidationRule = "unique_case_sensitive" | "unique_case_insensitive" | "before_date" | "after_date";
|
|
212
220
|
type TimeValidationRule = "unique_case_sensitive" | "unique_case_insensitive";
|
|
213
221
|
type DateDateTimesAndTimesTransformationRule = "autoformat";
|
|
222
|
+
export type DuplicateRecords = {
|
|
223
|
+
records: Record;
|
|
224
|
+
count: number;
|
|
225
|
+
};
|
|
214
226
|
export {};
|