@solidexpert/csv-importer-angular 21.0.39 → 22.0.41

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.
@@ -1,170 +1,215 @@
1
- import * as i0 from '@angular/core';
2
- import { OnInit, OnChanges, AfterViewInit, EventEmitter, ElementRef, SimpleChanges } from '@angular/core';
3
-
4
- interface Template {
5
- columns: TemplateColumn[];
6
- }
7
- interface TemplateColumn {
8
- name: string;
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ import * as i0 from "@angular/core";
5
+ import { AfterViewInit, ElementRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from "@angular/core";
6
+ export interface Template {
7
+ columns: TemplateColumn[];
8
+ }
9
+ export interface TemplateColumn {
10
+ name: string;
11
+ key: string;
12
+ description?: string;
13
+ required?: boolean;
14
+ suggested_mappings?: string[];
15
+ multiple?: boolean;
16
+ combiner?: (values: string[]) => string;
17
+ }
18
+ export interface UploadColumn {
19
+ index: number;
20
+ name: string;
21
+ sample_data: string[];
22
+ }
23
+ export interface FileRow {
24
+ index: number;
25
+ values: string[];
26
+ }
27
+ export interface FileData {
28
+ fileName: string;
29
+ rows: FileRow[];
30
+ sheetList: string[];
31
+ errors: string[];
32
+ }
33
+ export interface TemplateColumnMapping {
34
+ key: string;
35
+ include: boolean;
36
+ selected?: boolean;
37
+ isMultiple?: boolean;
38
+ }
39
+ export interface CSVImporterConfig {
40
+ isModal?: boolean;
41
+ modalIsOpen?: boolean;
42
+ modalCloseOnOutsideClick?: boolean;
43
+ template?: Template | string;
44
+ darkMode?: boolean;
45
+ primaryColor?: string;
46
+ className?: string;
47
+ showDownloadTemplateButton?: boolean;
48
+ skipHeaderRowSelection?: boolean;
49
+ language?: string;
50
+ customTranslations?: Record<string, Record<string, string>>;
51
+ customStyles?: Record<string, string> | string;
52
+ }
53
+ export interface ImportResult {
54
+ num_rows: number;
55
+ num_columns: number;
56
+ error: string | null;
57
+ columns: {
9
58
  key: string;
10
- description?: string;
11
- required?: boolean;
12
- suggested_mappings?: string[];
13
- multiple?: boolean;
14
- combiner?: (values: string[]) => string;
15
- }
16
- interface UploadColumn {
17
- index: number;
18
59
  name: string;
19
- sample_data: string[];
20
- }
21
- interface FileRow {
22
- index: number;
23
- values: string[];
60
+ }[];
61
+ rows: MappedRow[];
62
+ }
63
+ export interface MappedRow {
64
+ index: number;
65
+ values: Record<string, string | number>;
66
+ }
67
+ export interface StepConfig {
68
+ label: string;
69
+ id: string;
70
+ disabled?: boolean;
71
+ }
72
+ export declare enum StepEnum {
73
+ Upload = 0,
74
+ RowSelection = 1,
75
+ MapColumns = 2,
76
+ Complete = 3
77
+ }
78
+ export interface InputOption {
79
+ value: string;
80
+ required?: boolean;
81
+ multiple?: boolean;
82
+ }
83
+ export interface TableCell {
84
+ raw?: string | number | boolean;
85
+ content?: string;
86
+ tooltip?: string;
87
+ }
88
+ export type TableRow = Record<string, TableCell | string | number | boolean>;
89
+ export declare class I18nService {
90
+ private resources;
91
+ private currentLanguage;
92
+ get language(): string;
93
+ setLanguage(lang: string): void;
94
+ addTranslations(lang: string, translations: Record<string, string>): void;
95
+ t(key: string, params?: Record<string, string>): string;
96
+ static ɵfac: i0.ɵɵFactoryDeclaration<I18nService, never>;
97
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
24
98
  }
25
- interface FileData {
26
- fileName: string;
27
- rows: FileRow[];
28
- sheetList: string[];
29
- errors: string[];
30
- }
31
- interface TemplateColumnMapping {
32
- key: string;
33
- include: boolean;
34
- selected?: boolean;
35
- isMultiple?: boolean;
36
- }
37
- interface CSVImporterConfig {
38
- isModal?: boolean;
39
- modalIsOpen?: boolean;
40
- modalCloseOnOutsideClick?: boolean;
41
- template?: Template | string;
42
- darkMode?: boolean;
43
- primaryColor?: string;
44
- className?: string;
45
- showDownloadTemplateButton?: boolean;
46
- skipHeaderRowSelection?: boolean;
47
- language?: string;
48
- customTranslations?: Record<string, Record<string, string>>;
49
- customStyles?: Record<string, string> | string;
50
- }
51
- interface ImportResult {
52
- num_rows: number;
53
- num_columns: number;
54
- error: string | null;
55
- columns: {
56
- key: string;
57
- name: string;
58
- }[];
59
- rows: MappedRow[];
60
- }
61
- interface MappedRow {
62
- index: number;
63
- values: Record<string, string | number>;
64
- }
65
- interface StepConfig {
66
- label: string;
67
- id: string;
68
- disabled?: boolean;
69
- }
70
- declare enum StepEnum {
71
- Upload = 0,
72
- RowSelection = 1,
73
- MapColumns = 2,
74
- Complete = 3
75
- }
76
- interface InputOption {
77
- value: string;
78
- required?: boolean;
79
- multiple?: boolean;
80
- }
81
- interface TableCell {
82
- raw?: string | number | boolean;
83
- content?: string;
84
- tooltip?: string;
85
- }
86
- type TableRow = Record<string, TableCell | string | number | boolean>;
87
-
88
- declare class I18nService {
89
- private resources;
90
- private currentLanguage;
91
- get language(): string;
92
- setLanguage(lang: string): void;
93
- addTranslations(lang: string, translations: Record<string, string>): void;
94
- t(key: string, params?: Record<string, string>): string;
95
- static ɵfac: i0.ɵɵFactoryDeclaration<I18nService, never>;
96
- static ɵprov: i0.ɵɵInjectableDeclaration<I18nService>;
97
- }
98
-
99
99
  type Theme = 'light' | 'dark';
100
100
  declare class ThemeService {
101
- private currentTheme;
102
- get theme(): Theme;
103
- setTheme(theme: Theme): void;
104
- static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, never>;
105
- static ɵprov: i0.ɵɵInjectableDeclaration<ThemeService>;
106
- }
107
-
108
- declare class CsvImporterComponent implements OnInit, OnChanges, AfterViewInit {
109
- private i18n;
110
- private themeService;
111
- isModal: boolean;
112
- modalIsOpen: boolean;
113
- modalCloseOnOutsideClick: boolean;
114
- template?: Template | string;
115
- darkMode: boolean;
116
- primaryColor: string;
117
- className?: string;
118
- showDownloadTemplateButton: boolean;
119
- skipHeaderRowSelection: boolean;
120
- language: string;
121
- customTranslations?: Record<string, Record<string, string>>;
122
- customStyles?: Record<string, string> | string;
123
- complete: EventEmitter<ImportResult>;
124
- modalClose: EventEmitter<void>;
125
- dialogRef?: ElementRef<HTMLDialogElement>;
126
- StepEnum: typeof StepEnum;
127
- constructor(i18n: I18nService, themeService: ThemeService);
128
- currentStep: StepEnum;
129
- initializationError: string | null;
130
- dataError: string | null;
131
- isSubmitting: boolean;
132
- parsedTemplate: Template;
133
- data: FileData;
134
- selectedHeaderRow: number;
135
- columnMapping: Record<number, TemplateColumnMapping>;
136
- stepperSteps: StepConfig[];
137
- ngOnInit(): void;
138
- ngOnChanges(changes: SimpleChanges): void;
139
- ngAfterViewInit(): void;
140
- private updateDialogState;
141
- private initializeLanguage;
142
- private initializeTheme;
143
- private initializeTemplate;
144
- private initializeSteps;
145
- private applyPrimaryColor;
146
- private applyCustomStyles;
147
- private calculateNextStep;
148
- goNext(): void;
149
- goBack(): void;
150
- reload(): void;
151
- requestClose(): void;
152
- onBackdropClick(event: MouseEvent): void;
153
- onDataError(error: string): void;
154
- onFileUploaded(file: File): void;
155
- onMapColumnsCancel(): void;
156
- onMappingComplete(mapping: Record<number, TemplateColumnMapping>): void;
157
- static ɵfac: i0.ɵɵFactoryDeclaration<CsvImporterComponent, never>;
158
- static ɵcmp: i0.ɵɵComponentDeclaration<CsvImporterComponent, "csv-importer", never, { "isModal": { "alias": "isModal"; "required": false; }; "modalIsOpen": { "alias": "modalIsOpen"; "required": false; }; "modalCloseOnOutsideClick": { "alias": "modalCloseOnOutsideClick"; "required": false; }; "template": { "alias": "template"; "required": false; }; "darkMode": { "alias": "darkMode"; "required": false; }; "primaryColor": { "alias": "primaryColor"; "required": false; }; "className": { "alias": "className"; "required": false; }; "showDownloadTemplateButton": { "alias": "showDownloadTemplateButton"; "required": false; }; "skipHeaderRowSelection": { "alias": "skipHeaderRowSelection"; "required": false; }; "language": { "alias": "language"; "required": false; }; "customTranslations": { "alias": "customTranslations"; "required": false; }; "customStyles": { "alias": "customStyles"; "required": false; }; }, { "complete": "complete"; "modalClose": "modalClose"; }, never, never, true, never>;
159
- }
160
-
161
- declare const enTranslations: Record<string, string>;
162
-
163
- declare const esTranslations: Record<string, string>;
164
-
165
- declare const frTranslations: Record<string, string>;
166
-
167
- declare const deTranslations: Record<string, string>;
168
-
169
- export { CsvImporterComponent, I18nService, StepEnum, deTranslations, enTranslations, esTranslations, frTranslations };
170
- export type { CSVImporterConfig, FileData, FileRow, ImportResult, InputOption, MappedRow, StepConfig, TableCell, TableRow, Template, TemplateColumn, TemplateColumnMapping, UploadColumn };
101
+ private currentTheme;
102
+ get theme(): Theme;
103
+ setTheme(theme: Theme): void;
104
+ static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, never>;
105
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
106
+ }
107
+ export declare class CsvImporterComponent implements OnInit, OnChanges, AfterViewInit {
108
+ private i18n;
109
+ private themeService;
110
+ isModal: boolean;
111
+ modalIsOpen: boolean;
112
+ modalCloseOnOutsideClick: boolean;
113
+ template?: Template | string;
114
+ darkMode: boolean;
115
+ primaryColor: string;
116
+ className?: string;
117
+ showDownloadTemplateButton: boolean;
118
+ skipHeaderRowSelection: boolean;
119
+ language: string;
120
+ customTranslations?: Record<string, Record<string, string>>;
121
+ customStyles?: Record<string, string> | string;
122
+ complete: EventEmitter<ImportResult>;
123
+ modalClose: EventEmitter<void>;
124
+ dialogRef?: ElementRef<HTMLDialogElement>;
125
+ StepEnum: typeof StepEnum;
126
+ constructor(i18n: I18nService, themeService: ThemeService);
127
+ currentStep: StepEnum;
128
+ initializationError: string | null;
129
+ dataError: string | null;
130
+ isSubmitting: boolean;
131
+ parsedTemplate: Template;
132
+ data: FileData;
133
+ selectedHeaderRow: number;
134
+ columnMapping: Record<number, TemplateColumnMapping>;
135
+ stepperSteps: StepConfig[];
136
+ ngOnInit(): void;
137
+ ngOnChanges(changes: SimpleChanges): void;
138
+ ngAfterViewInit(): void;
139
+ private updateDialogState;
140
+ private initializeLanguage;
141
+ private initializeTheme;
142
+ private initializeTemplate;
143
+ private initializeSteps;
144
+ private applyPrimaryColor;
145
+ private applyCustomStyles;
146
+ private calculateNextStep;
147
+ goNext(): void;
148
+ goBack(): void;
149
+ reload(): void;
150
+ requestClose(): void;
151
+ onBackdropClick(event: MouseEvent): void;
152
+ onDataError(error: string): void;
153
+ onFileUploaded(file: File): void;
154
+ onMapColumnsCancel(): void;
155
+ onMappingComplete(mapping: Record<number, TemplateColumnMapping>): void;
156
+ static ɵfac: i0.ɵɵFactoryDeclaration<CsvImporterComponent, never>;
157
+ static ɵcmp: i0.ɵɵComponentDeclaration<CsvImporterComponent, "csv-importer", never, {
158
+ "isModal": {
159
+ "alias": "isModal";
160
+ "required": false;
161
+ };
162
+ "modalIsOpen": {
163
+ "alias": "modalIsOpen";
164
+ "required": false;
165
+ };
166
+ "modalCloseOnOutsideClick": {
167
+ "alias": "modalCloseOnOutsideClick";
168
+ "required": false;
169
+ };
170
+ "template": {
171
+ "alias": "template";
172
+ "required": false;
173
+ };
174
+ "darkMode": {
175
+ "alias": "darkMode";
176
+ "required": false;
177
+ };
178
+ "primaryColor": {
179
+ "alias": "primaryColor";
180
+ "required": false;
181
+ };
182
+ "className": {
183
+ "alias": "className";
184
+ "required": false;
185
+ };
186
+ "showDownloadTemplateButton": {
187
+ "alias": "showDownloadTemplateButton";
188
+ "required": false;
189
+ };
190
+ "skipHeaderRowSelection": {
191
+ "alias": "skipHeaderRowSelection";
192
+ "required": false;
193
+ };
194
+ "language": {
195
+ "alias": "language";
196
+ "required": false;
197
+ };
198
+ "customTranslations": {
199
+ "alias": "customTranslations";
200
+ "required": false;
201
+ };
202
+ "customStyles": {
203
+ "alias": "customStyles";
204
+ "required": false;
205
+ };
206
+ }, {
207
+ "complete": "complete";
208
+ "modalClose": "modalClose";
209
+ }, never, never, true, never>;
210
+ }
211
+ export declare const enTranslations: Record<string, string>;
212
+ export declare const esTranslations: Record<string, string>;
213
+ export declare const frTranslations: Record<string, string>;
214
+ export declare const deTranslations: Record<string, string>;
215
+ export {};