@haus-tech/product-import-export-plugin 2.2.3 → 2.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.
@@ -92,6 +92,10 @@ let ProductExportService = class ProductExportService {
92
92
  const selectedExportFieldsArray = selectedExportFields.split(',');
93
93
  const selectedExportFieldsSet = new Set(selectedExportFieldsArray);
94
94
  const filteredHeaders = headers.filter((header) => {
95
+ // Ensure custom fields are not filtered out
96
+ if (filteredCustomFieldNames.includes(header.id)) {
97
+ return true;
98
+ }
95
99
  if (header.id.includes(':')) {
96
100
  const field = header.id.split(':')[0];
97
101
  return selectedExportFieldsSet.has(field);
@@ -255,7 +255,10 @@ let ProductImportComponent = class ProductImportComponent {
255
255
  }
256
256
  catch (error) {
257
257
  console.log(`Invalid JSON in column: ${col}, row: ${i + 1}`);
258
- this.notificationService.error(`${this.translate.instant('product-import.notifications.invalid-json')} ${col}, row: ${i + 1}`);
258
+ this.notificationService.error(this.translate.instant('product-import.notifications.invalid-json', {
259
+ col,
260
+ row: i + 1,
261
+ }));
259
262
  resolve({ isValid: false });
260
263
  return;
261
264
  }
@@ -349,9 +349,10 @@ export class ProductImportComponent implements OnInit {
349
349
  } catch (error) {
350
350
  console.log(`Invalid JSON in column: ${col}, row: ${i + 1}`)
351
351
  this.notificationService.error(
352
- `${this.translate.instant(
353
- 'product-import.notifications.invalid-json',
354
- )} ${col}, row: ${i + 1}`,
352
+ this.translate.instant('product-import.notifications.invalid-json', {
353
+ col,
354
+ row: i + 1,
355
+ }),
355
356
  )
356
357
  resolve({ isValid: false })
357
358
  return
@@ -25,7 +25,7 @@
25
25
  "missing-column": "Kolumnen saknas: ",
26
26
  "no-lines-in-file": "Filen är tom.",
27
27
  "file-read-error": "Ett fel uppstod vid läsning av filen.",
28
- "invalid-json": "Felaktig JSON-struktur. Vänligen ladda upp en korrekt JSON-fil.",
28
+ "invalid-json": "Fältet {col} på rad {row} innehåller felaktig JSON-struktur.",
29
29
  "missing-languages": "Din CSV-fil innehåller språk som inte är tillgängliga i den här kanalen. Vänligen lägg till språken i kanalen eller ta bort de språk som inte används och försök igen.",
30
30
  "mismatched-option-values": "Antalet produktalternativ för vissa produktvarianter är felaktigt: ",
31
31
  "missing-main-language-name": "Huvudspråket saknas för namn. Vänligen lägg till huvudspråket och försök igen.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haus-tech/product-import-export-plugin",
3
- "version": "2.2.3",
3
+ "version": "2.2.5",
4
4
  "description": "A Vendure plugin for importing and exporting products using a CSV file",
5
5
  "author": "Haus Tech",
6
6
  "repository": {
@@ -23,6 +23,10 @@
23
23
  "test": "jest --preset=\"ts-jest\"",
24
24
  "prepublishOnly": "yarn && yarn build"
25
25
  },
26
+ "devDependencies": {
27
+ "csv-parse": "^5.5.6",
28
+ "csv-stringify": "^6.5.1"
29
+ },
26
30
  "peerDependencies": {
27
31
  "csv-parse": "^5.5.6",
28
32
  "csv-stringify": "^6.5.1",