fuse-importer 0.0.9-testing → 0.1.2-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.js +1 -1
- package/lib/esm/Importer/Review/ReviewContextProvider.js +8 -5
- package/lib/esm/Importer/common/Spreadsheet/common/index.js +1 -1
- package/lib/esm/Importer/common/Spreadsheet/components/SpreadsheetRowCheckboxes.js +7 -1
- package/lib/esm/Importer/common/Spreadsheet/components/fields/SpreadsheetInput.js +16 -12
- package/lib/esm/Importer/common/Spreadsheet/components/fields/index.d.ts +2 -1
- package/lib/esm/Importer/common/Spreadsheet/components/fields/index.js +24 -13
- package/lib/esm/Importer/common/Spreadsheet/components/fields/utils.d.ts +11 -0
- package/lib/esm/Importer/common/Spreadsheet/components/fields/utils.js +29 -0
- package/lib/esm/Importer/common/Spreadsheet/hooks.js +47 -18
- package/lib/esm/Importer/common/Spreadsheet/transformation/transformators.js +39 -7
- package/lib/esm/Importer/contexts/ImporterContextProvider.d.ts +4 -2
- package/lib/esm/Importer/contexts/ImporterContextProvider.js +2 -1
- package/lib/esm/Importer/data/index.js +22 -2
- 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 +81 -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/FilterByErrors/FilterByErrors.js +2 -2
- package/lib/esm/common/Table/TableActions/RowFilters.js +4 -4
- 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/TransformedRecordsCount.js +15 -3
- 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/columnsValidations.d.ts +0 -26
- package/lib/esm/common/columnsValidations.js +1 -287
- package/lib/esm/common/datePatterns.d.ts +26 -0
- package/lib/esm/common/datePatterns.js +327 -0
- package/lib/esm/common/index.d.ts +1 -0
- package/lib/esm/common/index.js +1 -0
- package/lib/esm/common/inputs/SelectMenu.d.ts +2 -1
- package/lib/esm/common/inputs/SelectMenu.js +9 -2
- package/lib/esm/index.d.ts +3 -1
- package/lib/esm/index.js +9 -2
- package/lib/esm/locales/de.d.ts +6 -0
- package/lib/esm/locales/de.js +7 -1
- package/lib/esm/locales/en.d.ts +6 -0
- package/lib/esm/locales/en.js +7 -1
- package/lib/esm/locales/es.d.ts +6 -0
- package/lib/esm/locales/es.js +7 -1
- package/lib/esm/locales/fr.d.ts +6 -0
- package/lib/esm/locales/fr.js +7 -1
- package/lib/esm/types.d.ts +13 -4
- package/lib/esm/utils/index.d.ts +1 -0
- package/lib/esm/utils/index.js +4 -0
- package/lib/main.js +10 -10
- package/package.json +1 -1
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
export var datePatterns = [
|
|
2
|
+
{
|
|
3
|
+
value: "MM/dd/yyyy",
|
|
4
|
+
label: "MM/dd/yyyy (e.g. 08/31/2023)",
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
value: "MMM dd yyyy",
|
|
8
|
+
label: "MMM dd yyyy (e.g. Jan 15 1990)",
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
value: "yyyy-MM-dd",
|
|
12
|
+
label: "yyyy-MM-dd (e.g. 2023-08-31",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
value: "dd/MM/yyyy",
|
|
16
|
+
label: "dd/MM/yyyy (e.g. 31/08/2023",
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
value: "MM-dd-yyyy",
|
|
20
|
+
label: "MM-dd-yyyy (e.g. 08-31-2023)",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
value: "yyyy/MM/dd",
|
|
24
|
+
label: "yyyy/MM/dd (e.g. 2023/08/31)",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
value: "dd-MMMM-yyyy",
|
|
28
|
+
label: "dd-MMMM-yyyy (e.g. 31-August-2023)",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
value: "MMMM dd, yyyy",
|
|
32
|
+
label: "MMMM dd, yyyy (e.g. August 31, 2023)",
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
value: "dd/MM/yy",
|
|
36
|
+
label: "dd/MM/yy (e.g. 31/08/23)",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
value: "MMMM dd, yy",
|
|
40
|
+
label: "MMMM dd, yy (e.g. August 31, 23)",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
value: "yy/MM/dd",
|
|
44
|
+
label: "yy/MM/dd (e.g. 23/08/31)",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
value: "EEEE MMMM yyyy",
|
|
48
|
+
label: "Day MMMM Year (e.g. Tuesday August 2023)",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
value: "EEEE dd MMMM yyyy",
|
|
52
|
+
label: "Day Day-of-Month Month Year (e.g. Tuesday 08 August 2023)",
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
value: "MM-dd-yy",
|
|
56
|
+
label: "MM-dd-yy (e.g. 01-15-90)",
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
value: "M-dd-yy",
|
|
60
|
+
label: "M-dd-yy (e.g. 1-15-90)",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
value: "dd-MM-yy",
|
|
64
|
+
label: "dd-MM-yy (e.g. 15-01-90)",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
value: "dd-MM-yyyy",
|
|
68
|
+
label: "dd-MM-yyyy (e.g. 15-01-1990)",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
value: "dd-M-yy",
|
|
72
|
+
label: "dd-M-yy (e.g. 15-1-90)",
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
value: "MM/dd/yy",
|
|
76
|
+
label: "MM/dd/yy (e.g. 01/15/90)",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
value: "M/dd/yy",
|
|
80
|
+
label: "M/dd/yy (e.g. 1/15/90)",
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
value: "MM.dd.yy",
|
|
84
|
+
label: "MM.dd.yy (e.g. 01.15.90)",
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
value: "M.dd.yy",
|
|
88
|
+
label: "M.dd.yy (e.g. 1.15.90)",
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
value: "MMM-dd-yy",
|
|
92
|
+
label: "MMM-dd-yy (e.g. Jan-15-90)",
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
value: "MMMM-dd-yy",
|
|
96
|
+
label: "MMMM-dd-yy (e.g. January-15-90)",
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
value: "dd-MMM-yy",
|
|
100
|
+
label: "dd-MMM-yy (e.g. 15-Jan-90)",
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
value: "yyyy-M-dd",
|
|
104
|
+
label: "yyyy-M-dd (e.g. 1990-1-15)",
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
value: "M-dd-yyyy",
|
|
108
|
+
label: "M-dd-yyyy (e.g. 1-15-1990)",
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
value: "M/dd/yyyy",
|
|
112
|
+
label: "M/dd/yyyy (e.g. 1/15/1990)",
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
value: "dd/M/yyyy",
|
|
116
|
+
label: "dd/M/yyyy (e.g. 15/1/1990)",
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
value: "yyyy/M/dd",
|
|
120
|
+
label: "yyyy/M/dd (e.g. 1990/1/15)",
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
value: "dd.MM.yyyy",
|
|
124
|
+
label: "dd.MM.yyyy (e.g. 15.01.1990)",
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
value: "dd.M.yyyy",
|
|
128
|
+
label: "dd.M.yyyy (e.g. 15.1.1990)",
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
value: "yyyy.MM.dd",
|
|
132
|
+
label: "yyyy.MM.dd (e.g. 1990.01.15)",
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
value: "yyyy.M.dd",
|
|
136
|
+
label: "yyyy.M.dd (e.g. 1990.1.15)",
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
value: "MMM. dd, yyyy",
|
|
140
|
+
label: "MMM. dd, yyyy (e.g. Jan. 15, 1990)",
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
value: "dd MMM. yyyy",
|
|
144
|
+
label: "dd MMM. yyyy (e.g. 15 Jan. 1990)",
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
value: "MMM dd",
|
|
148
|
+
label: "MMM dd (e.g. Jan 15)",
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
value: "MMMM dd",
|
|
152
|
+
label: "MMMM dd (e.g. January 15)",
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
value: "MMM d",
|
|
156
|
+
label: "MMM d (e.g. Jan 5)",
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
value: "MMMM d",
|
|
160
|
+
label: "MMMM d (e.g. January 5)",
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
value: "dd. MMM. yyyy",
|
|
164
|
+
label: "dd. MMM. yyyy (e.g. 15. Jan. 1990)",
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
value: "EEE, MMM dd, yyyy",
|
|
168
|
+
label: "EEE, MMM dd, yyyy (e.g. Mon, Jan 15, 1990)",
|
|
169
|
+
},
|
|
170
|
+
];
|
|
171
|
+
export var dateTimePatterns = [
|
|
172
|
+
{
|
|
173
|
+
value: "MM/dd/yyyy HH:mm",
|
|
174
|
+
label: "MM/dd/yyyy HH:mm (e.g. 08/31/2023 12:30)",
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
value: "MM/dd/yyyy HH:mm:ss",
|
|
178
|
+
label: "MM/dd/yyyy HH:mm:ss (e.g. 08/31/2023 12:30:45)",
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
value: "MM/dd/yyyy HH:mm:ss.SSS",
|
|
182
|
+
label: "MM/dd/yyyy HH:mm:ss.SSS (e.g. 08/31/2023 12:30:45.500)",
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
value: "MM/dd/yyyy h:mm a",
|
|
186
|
+
label: "MM/dd/yyyy h:mm a (e.g. 08/31/2023 1:30 PM)",
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
value: "MM/dd/yyyy h:mm:ss a",
|
|
190
|
+
label: "MM/dd/yyyy h:mm:ss a (e.g. 08/31/2023 1:30:45 PM)",
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
value: "MMM dd HH:mm:ss yyyy",
|
|
194
|
+
label: "MMM dd HH:mm:ss yyyy (e.g. Jan 15 00:34:59 1990)",
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
value: "MMM dd yyyy HH:mm:ss",
|
|
198
|
+
label: "MMM dd yyyy HH:mm:ss (e.g. Jan 15 1990 00:34:59)",
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
value: "dd MMM HH:mm:ss yyyy",
|
|
202
|
+
label: "dd MMM HH:mm:ss yyyy (e.g. 15 Jan 00:34:59 1990)",
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
value: "MM/dd/yyyy h:mm:ss.SSS a",
|
|
206
|
+
label: "MM/dd/yyyy h:mm:ss.SSS a (e.g. 08/31/2023 1:30:45.500 PM)",
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
value: "MMMM dd, yyyy HH:mm",
|
|
210
|
+
label: "MMMM dd, yyyy HH:mm (e.g. August 31, 2023 12:30)",
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
value: "MMMM dd, yyyy HH:mm:ss",
|
|
214
|
+
label: "MMMM dd, yyyy HH:mm:ss (e.g. August 31, 2023 12:30:45)",
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
value: "MMMM dd, yyyy h:mm a",
|
|
218
|
+
label: "MMMM dd, yyyy h:mm a (e.g. August 31, 2023 1:30 PM)",
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
value: "MMMM dd, yyyy h:mm:ss a",
|
|
222
|
+
label: "MMMM dd, yyyy h:mm:ss a (e.g. August 31, 2023 1:30:45 PM)",
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
value: "MMMM dd, yyyy h:mm:ss.SSS a",
|
|
226
|
+
label: "MMMM dd, yyyy h:mm:ss.SSS a (e.g. August 31, 2023 1:30:45.500 PM)",
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
value: "MM-dd-yy HH:mm",
|
|
230
|
+
label: "MM-dd-yy HH:mm (e.g. 01-15-90 10:10)",
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
value: "dd-MM-yyyy HH:mm",
|
|
234
|
+
label: "dd-MM-yyyy HH:mm (e.g. 15-01-1990 10:10)",
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
value: "dd/MM/yyyy HH:mm",
|
|
238
|
+
label: "dd/MM/yyyy HH:mm (e.g. 15/01/1990 10:10)",
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
value: "dd-MM-yyyy h:mm a",
|
|
242
|
+
label: "dd-MM-yyyy h:mm a (e.g. 15-01-1990 10:10 AM)",
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
value: "dd/MM/yyyy h:mm a",
|
|
246
|
+
label: "dd/MM/yyyy h:mm a (e.g. 15/01/1990 10:10 AM)",
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
value: "MM/dd/yy HH:mm",
|
|
250
|
+
label: "MM/dd/yy HH:mm (e.g. 01/15/90 10:10)",
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
value: "MM/dd/yy HH:mm:ss",
|
|
254
|
+
label: "MM/dd/yy HH:mm:ss (e.g. 01/15/90 10:10:14)",
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
value: "MM/dd/yy h:mm:ss a",
|
|
258
|
+
label: "MM/dd/yy h:mm:ss a (e.g. 01/15/90 5:10:14 AM)",
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
value: "yyyy/MM/dd HH:mm",
|
|
262
|
+
label: "yyyy/MM/dd HH:mm (e.g. 1990/01/15 10:10)",
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
value: "MM-dd-yyyy HH:mm",
|
|
266
|
+
label: "MM-dd-yyyy HH:mm (e.g. 01-15-1990 10:10)",
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
value: "yyyy-MM-dd HH:mm",
|
|
270
|
+
label: "yyyy-MM-dd HH:mm (e.g. 1990-01-15 10:10)",
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
value: "MMM dd HH:mm:ss",
|
|
274
|
+
label: "MMM dd HH:mm:ss (e.g. Jan 15 10:10:25)",
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
value: "MMMM dd HH:mm:ss",
|
|
278
|
+
label: "MMMM dd HH:mm:ss (e.g. January 15 10:10:25)",
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
value: "MMM d HH:mm:ss",
|
|
282
|
+
label: "MMM d HH:mm:ss (e.g. Jan 5 10:10:25)",
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
value: "MMMM d HH:mm:ss",
|
|
286
|
+
label: "MMMM d HH:mm:ss (e.g. January 5 10:10:25)",
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
value: "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
|
|
290
|
+
label: "ISO 8601 (e.g. 1990-01-15T00:34:55.020+09:30)",
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
value: "yyyy-MM-dd'T'HH:mm:ss.SSS",
|
|
294
|
+
label: "ISO 8601 without timezone offset (e.g. 1990-01-15T00:34:55.020)",
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
value: "yyyy-MM-dd'T'HH:mmZ",
|
|
298
|
+
label: "yyyy-MM-dd'T'HH:mm+offset (e.g. 1990-01-15T10:10+09:30)",
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
value: "yyyy-MM-dd'T'HH:mm",
|
|
302
|
+
label: "yyyy-MM-dd'T'HH:mm (e.g. 1990-01-15T10:10)",
|
|
303
|
+
},
|
|
304
|
+
];
|
|
305
|
+
export var timePatterns = [
|
|
306
|
+
{
|
|
307
|
+
value: "HH:mm",
|
|
308
|
+
label: "HH:mm (e.g. 12:30)",
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
value: "HH:mm:ss",
|
|
312
|
+
label: "HH:mm:ss (e.g. 12:30:45)",
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
value: "hh:mm a",
|
|
316
|
+
label: "hh:mm a (e.g. 01:30 PM)",
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
value: "hh:mm:ss a",
|
|
320
|
+
label: "hh:mm:ss a (e.g. 01:30:45 PM)",
|
|
321
|
+
},
|
|
322
|
+
];
|
|
323
|
+
export var allowedPatterns = {
|
|
324
|
+
date: datePatterns,
|
|
325
|
+
datetime: dateTimePatterns,
|
|
326
|
+
time: timePatterns,
|
|
327
|
+
};
|
package/lib/esm/common/index.js
CHANGED
|
@@ -42,4 +42,5 @@ export * from "./TooltipProvider";
|
|
|
42
42
|
export * from "./ConfirmationModal";
|
|
43
43
|
export * from "./columnsValidations";
|
|
44
44
|
export * from "./columnsTransformations";
|
|
45
|
+
export * from "./datePatterns";
|
|
45
46
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
@@ -9,6 +9,7 @@ type Props = {
|
|
|
9
9
|
children: any;
|
|
10
10
|
placement?: Placement;
|
|
11
11
|
referenceElement: any;
|
|
12
|
+
selectMenuClassName?: string;
|
|
12
13
|
} & DivCSSProps;
|
|
13
|
-
export declare const SelectMenu: ({ isOpen, onClose, placement, referenceElement, children, ...props }: Props) => JSX.Element;
|
|
14
|
+
export declare const SelectMenu: ({ isOpen, onClose, placement, referenceElement, children, selectMenuClassName, ...props }: Props) => JSX.Element;
|
|
14
15
|
export {};
|
|
@@ -37,7 +37,7 @@ export var SelectMenuScrollArea = styled(Div)(function (_a) {
|
|
|
37
37
|
});
|
|
38
38
|
export var SelectMenu = function (_a) {
|
|
39
39
|
var _b;
|
|
40
|
-
var _c = _a.isOpen, isOpen = _c === void 0 ? false : _c, _d = _a.onClose, onClose = _d === void 0 ? null : _d, _e = _a.placement, placement = _e === void 0 ? "auto" : _e, referenceElement = _a.referenceElement, children = _a.children, props = __rest(_a, ["isOpen", "onClose", "placement", "referenceElement", "children"]);
|
|
40
|
+
var _c = _a.isOpen, isOpen = _c === void 0 ? false : _c, _d = _a.onClose, onClose = _d === void 0 ? null : _d, _e = _a.placement, placement = _e === void 0 ? "auto" : _e, referenceElement = _a.referenceElement, children = _a.children, selectMenuClassName = _a.selectMenuClassName, props = __rest(_a, ["isOpen", "onClose", "placement", "referenceElement", "children", "selectMenuClassName"]);
|
|
41
41
|
var _f = useState(null), popperElement = _f[0], setPopperElement = _f[1];
|
|
42
42
|
var _g = useState(null), width = _g[0], setWidth = _g[1];
|
|
43
43
|
var options = {
|
|
@@ -50,6 +50,13 @@ export var SelectMenu = function (_a) {
|
|
|
50
50
|
offset: [2, 3],
|
|
51
51
|
},
|
|
52
52
|
},
|
|
53
|
+
{
|
|
54
|
+
name: "preventOverflow",
|
|
55
|
+
options: {
|
|
56
|
+
altAxis: true,
|
|
57
|
+
boundary: "viewport",
|
|
58
|
+
},
|
|
59
|
+
},
|
|
53
60
|
],
|
|
54
61
|
};
|
|
55
62
|
var _h = usePopper(referenceElement, popperElement, options), styles = _h.styles, attributes = _h.attributes, update = _h.update;
|
|
@@ -62,6 +69,6 @@ export var SelectMenu = function (_a) {
|
|
|
62
69
|
if (referenceElement)
|
|
63
70
|
setWidth(referenceElementWidth);
|
|
64
71
|
}, [referenceElementWidth]);
|
|
65
|
-
return (_jsx(_Fragment, { children: isOpen && (_jsxs(Div, __assign({ pRelative: true }, props, { children: [_jsx(SelectMenuBackdrop, { onClick: onClose }), _jsx(SelectMenuDiv, __assign({ ref: setPopperElement, style: __assign(__assign({}, styles.popper), { width: width }) }, attributes.popper, { children: _jsx(SelectMenuScrollArea, { children: children }) }))] }))) }));
|
|
72
|
+
return (_jsx(_Fragment, { children: isOpen && (_jsxs(Div, __assign({ pRelative: true }, props, { children: [_jsx(SelectMenuBackdrop, { onClick: onClose }), _jsx(SelectMenuDiv, __assign({ ref: setPopperElement, style: __assign(__assign({}, styles.popper), { width: width }), className: selectMenuClassName }, attributes.popper, { children: _jsx(SelectMenuScrollArea, { children: children }) }))] }))) }));
|
|
66
73
|
};
|
|
67
74
|
var templateObject_1, templateObject_2, templateObject_3;
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ColumnRequiredProps, EnvironmentType, FieldTypesAsUnion, FormatRecord, ImporterOptions, OnSubmit, OnValidateRecord, Record } from "./types";
|
|
1
|
+
import { ColumnRequiredProps, CustomAction, CustomActionTypes, EnvironmentType, FieldTypesAsUnion, FormatRecord, ImporterOptions, OnSubmit, OnValidateRecord, Record } from "./types";
|
|
2
2
|
declare class FuseImporter {
|
|
3
3
|
apiToken: string;
|
|
4
4
|
templateSlug: string;
|
|
@@ -8,6 +8,7 @@ declare class FuseImporter {
|
|
|
8
8
|
records: Record[];
|
|
9
9
|
constructor(apiToken: string, templateSlug: string, options?: ImporterOptions);
|
|
10
10
|
private dynamicColumns;
|
|
11
|
+
private customActions;
|
|
11
12
|
private cleanupIframe;
|
|
12
13
|
formatRecord: FormatRecord;
|
|
13
14
|
onValidateRecord: OnValidateRecord;
|
|
@@ -17,6 +18,7 @@ declare class FuseImporter {
|
|
|
17
18
|
close(): void;
|
|
18
19
|
show(): Promise<void>;
|
|
19
20
|
addColumn<T extends FieldTypesAsUnion>(columnData: ColumnRequiredProps<T>): void;
|
|
21
|
+
addCustomAction<T extends CustomActionTypes>(actions: CustomAction<T>[] | CustomAction<T>): void;
|
|
20
22
|
private renderImporterComponent;
|
|
21
23
|
private createDivComponent;
|
|
22
24
|
private createIframe;
|
package/lib/esm/index.js
CHANGED
|
@@ -68,6 +68,7 @@ var FuseImporter = /** @class */ (function () {
|
|
|
68
68
|
function FuseImporter(apiToken, templateSlug, options) {
|
|
69
69
|
if (options === void 0) { options = {}; }
|
|
70
70
|
this.dynamicColumns = [];
|
|
71
|
+
this.customActions = [];
|
|
71
72
|
this.cleanupIframe = null;
|
|
72
73
|
this.windowScrollPosition = {
|
|
73
74
|
x: 0,
|
|
@@ -139,6 +140,12 @@ var FuseImporter = /** @class */ (function () {
|
|
|
139
140
|
};
|
|
140
141
|
this.dynamicColumns.push(column);
|
|
141
142
|
};
|
|
143
|
+
FuseImporter.prototype.addCustomAction = function (actions) {
|
|
144
|
+
var _a;
|
|
145
|
+
if (!Array.isArray(actions))
|
|
146
|
+
actions = [actions];
|
|
147
|
+
(_a = this.customActions).push.apply(_a, actions);
|
|
148
|
+
};
|
|
142
149
|
FuseImporter.prototype.renderImporterComponent = function () {
|
|
143
150
|
var importerDiv = this.createDivComponent();
|
|
144
151
|
var importerComponent = this.createImporterComponent();
|
|
@@ -160,9 +167,9 @@ var FuseImporter = /** @class */ (function () {
|
|
|
160
167
|
};
|
|
161
168
|
FuseImporter.prototype.createImporterComponent = function () {
|
|
162
169
|
var _this = this;
|
|
163
|
-
return (_jsx(Importer, { apiToken: this.apiToken, templateSlug: this.templateSlug, options: this.options, formatRecord: this.formatRecord, onValidateRecord: this.onValidateRecord, onSubmit: this.onSubmit, onClose: function () {
|
|
170
|
+
return (_jsx(Importer, { apiToken: this.apiToken, templateSlug: this.templateSlug, options: this.options, formatRecord: this.formatRecord, onValidateRecord: this.onValidateRecord, dynamicColumns: this.dynamicColumns, customActions: this.customActions, onSubmit: this.onSubmit, onClose: function () {
|
|
164
171
|
_this.close();
|
|
165
|
-
}
|
|
172
|
+
} }));
|
|
166
173
|
};
|
|
167
174
|
FuseImporter.prototype.configureIframe = function (iframe, importerComponent) {
|
|
168
175
|
var onLoadCallback = function () {
|
package/lib/esm/locales/de.d.ts
CHANGED
package/lib/esm/locales/de.js
CHANGED
|
@@ -80,10 +80,16 @@ export default {
|
|
|
80
80
|
tooltip: "Exportiere deine Daten",
|
|
81
81
|
},
|
|
82
82
|
transformed_records: {
|
|
83
|
-
auto_corrections_done: "
|
|
83
|
+
auto_corrections_done: "zellen automatisch korrigiert",
|
|
84
84
|
example: "Beispiel",
|
|
85
85
|
auto_corrections_amount: "Wir haben {{amount}} Probleme automatisch korrigiert.",
|
|
86
86
|
},
|
|
87
|
+
custom_actions: {
|
|
88
|
+
label: "Weitere Aktionen",
|
|
89
|
+
general_error_toast: "Die Aktion konnte nicht ausgeführt werden. Bitte versuchen Sie es erneut.",
|
|
90
|
+
error_toast: 'Beim Ausführen der Aktion "{{actionName}}" auf den ausgewählten Zeilen ist ein Fehler aufgetreten. Bitte überprüfen Sie die Code-Implementierung und versuchen Sie es erneut.',
|
|
91
|
+
success_toast: 'Die Aktion "{{actionName}}" wurde erfolgreich auf den ausgewählten Zeilen ausgeführt.',
|
|
92
|
+
},
|
|
87
93
|
},
|
|
88
94
|
},
|
|
89
95
|
general: {
|
package/lib/esm/locales/en.d.ts
CHANGED
package/lib/esm/locales/en.js
CHANGED
|
@@ -80,10 +80,16 @@ export default {
|
|
|
80
80
|
tooltip: "Export your data",
|
|
81
81
|
},
|
|
82
82
|
transformed_records: {
|
|
83
|
-
auto_corrections_done: "auto-
|
|
83
|
+
auto_corrections_done: "cells auto-corrected",
|
|
84
84
|
example: "Example",
|
|
85
85
|
auto_corrections_amount: "We have auto-corrected {{amount}} issues.",
|
|
86
86
|
},
|
|
87
|
+
custom_actions: {
|
|
88
|
+
label: "More actions",
|
|
89
|
+
general_error_toast: "It was not possible to run the action. Please try again.",
|
|
90
|
+
error_toast: 'Error occurred while running action "{{actionName}} on selected rows". Please check the code implementation and try again.',
|
|
91
|
+
success_toast: 'Action "{{actionName}}" was executed successfully on the selected rows.',
|
|
92
|
+
},
|
|
87
93
|
},
|
|
88
94
|
},
|
|
89
95
|
general: {
|
package/lib/esm/locales/es.d.ts
CHANGED
package/lib/esm/locales/es.js
CHANGED
|
@@ -80,10 +80,16 @@ export default {
|
|
|
80
80
|
tooltip: "Exporta tus datos",
|
|
81
81
|
},
|
|
82
82
|
transformed_records: {
|
|
83
|
-
auto_corrections_done: "
|
|
83
|
+
auto_corrections_done: "celdas corregidas automáticamente",
|
|
84
84
|
example: "Ejemplo",
|
|
85
85
|
auto_corrections_amount: "Hemos corregido automáticamente {{amount}} problemas.",
|
|
86
86
|
},
|
|
87
|
+
custom_actions: {
|
|
88
|
+
label: "Más acciones",
|
|
89
|
+
general_error_toast: "No fue posible ejecutar la acción. Por favor, inténtalo nuevamente.",
|
|
90
|
+
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.',
|
|
91
|
+
success_toast: 'La acción "{{actionName}}" se ejecutó correctamente en las filas seleccionadas.',
|
|
92
|
+
},
|
|
87
93
|
},
|
|
88
94
|
},
|
|
89
95
|
general: {
|
package/lib/esm/locales/fr.d.ts
CHANGED
package/lib/esm/locales/fr.js
CHANGED
|
@@ -80,10 +80,16 @@ export default {
|
|
|
80
80
|
tooltip: "Exporter vos données",
|
|
81
81
|
},
|
|
82
82
|
transformed_records: {
|
|
83
|
-
auto_corrections_done: "
|
|
83
|
+
auto_corrections_done: "cellules corrigées automatiquement",
|
|
84
84
|
example: "Exemple",
|
|
85
85
|
auto_corrections_amount: "Nous avons corrigé automatiquement {{amount}} problèmes.",
|
|
86
86
|
},
|
|
87
|
+
custom_actions: {
|
|
88
|
+
label: "Plus d'actions",
|
|
89
|
+
general_error_toast: "Il n'a pas été possible d'exécuter l'action. Veuillez réessayer.",
|
|
90
|
+
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.",
|
|
91
|
+
success_toast: "L'action \"{{actionName}}\" a \u00E9t\u00E9 ex\u00E9cut\u00E9e avec succ\u00E8s sur les lignes s\u00E9lectionn\u00E9es.",
|
|
92
|
+
},
|
|
87
93
|
},
|
|
88
94
|
},
|
|
89
95
|
general: {
|
package/lib/esm/types.d.ts
CHANGED
|
@@ -65,11 +65,12 @@ export type RowValidationError = {
|
|
|
65
65
|
export type BatchValidationErrors = {
|
|
66
66
|
[rowId: string]: ValidationErrors;
|
|
67
67
|
};
|
|
68
|
+
export type TransformedObj = {
|
|
69
|
+
original: any;
|
|
70
|
+
transformed: any;
|
|
71
|
+
};
|
|
68
72
|
export type TransformedRecord = {
|
|
69
|
-
[recordName: string]:
|
|
70
|
-
original: any;
|
|
71
|
-
transformed: any;
|
|
72
|
-
};
|
|
73
|
+
[recordName: string]: TransformedObj;
|
|
73
74
|
};
|
|
74
75
|
export type AppResponse = {
|
|
75
76
|
recordsToDisplay?: Record[];
|
|
@@ -113,6 +114,14 @@ export type TemplateHeader = {
|
|
|
113
114
|
transformations: FieldTransformation[];
|
|
114
115
|
position: number;
|
|
115
116
|
};
|
|
117
|
+
type CARecordFn = (record: Record) => Record;
|
|
118
|
+
export type CustomActionTypes = "record";
|
|
119
|
+
type CustomActionHandler<T extends CustomActionTypes> = T extends "record" ? CARecordFn : never;
|
|
120
|
+
export type CustomAction<T extends CustomActionTypes = CustomActionTypes> = {
|
|
121
|
+
name: string;
|
|
122
|
+
actionType: T;
|
|
123
|
+
handler: CustomActionHandler<T>;
|
|
124
|
+
};
|
|
116
125
|
export type Organization = {
|
|
117
126
|
id: number;
|
|
118
127
|
name: string;
|
package/lib/esm/utils/index.d.ts
CHANGED
package/lib/esm/utils/index.js
CHANGED
|
@@ -35,3 +35,7 @@ export var getDefaultValidations = function (columnType) {
|
|
|
35
35
|
return [];
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
+
export var truncateString = function (str, maxLength) {
|
|
39
|
+
if (maxLength === void 0) { maxLength = 10; }
|
|
40
|
+
return (str === null || str === void 0 ? void 0 : str.length) > maxLength ? "".concat(str === null || str === void 0 ? void 0 : str.slice(0, maxLength), "...") : str;
|
|
41
|
+
};
|