@firecms/data_import_export 3.0.0-canary.49 → 3.0.0-canary.50

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/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@firecms/data_import_export",
3
3
  "type": "module",
4
- "version": "3.0.0-canary.49",
4
+ "version": "3.0.0-canary.50",
5
5
  "access": "public",
6
6
  "main": "./dist/index.umd.js",
7
7
  "module": "./dist/index.es.js",
8
8
  "types": "./dist/index.d.ts",
9
9
  "source": "src/index.ts",
10
10
  "dependencies": {
11
- "@firecms/core": "^3.0.0-canary.49",
12
- "@firecms/formex": "^3.0.0-canary.49",
13
- "@firecms/schema_inference": "^3.0.0-canary.49",
14
- "@firecms/ui": "^3.0.0-canary.49",
11
+ "@firecms/core": "^3.0.0-canary.50",
12
+ "@firecms/formex": "^3.0.0-canary.50",
13
+ "@firecms/schema_inference": "^3.0.0-canary.50",
14
+ "@firecms/ui": "^3.0.0-canary.50",
15
15
  "xlsx": "^0.18.5"
16
16
  },
17
17
  "peerDependencies": {
@@ -101,5 +101,5 @@
101
101
  "publishConfig": {
102
102
  "access": "public"
103
103
  },
104
- "gitHead": "ceeb7b89aac080a290671b5d4e4dbe72ea693c8c"
104
+ "gitHead": "e5d125d95a0c858bbcc9a57acc1adb3b61c64f23"
105
105
  }
@@ -384,10 +384,6 @@ export function ImportDataPreview<M extends Record<string, any>>({
384
384
 
385
385
  useEffect(() => {
386
386
  const mappedData = importConfig.importData.map(d => convertDataToEntity(d, importConfig.idColumn, importConfig.headersMapping, properties, "TEMP_PATH", importConfig.defaultValues));
387
- console.log("Mapped data", {
388
- importConfig,
389
- mappedData
390
- })
391
387
  importConfig.setEntities(mappedData);
392
388
  }, []);
393
389
 
@@ -101,6 +101,10 @@ function getExportHeaders<M extends Record<string, any>>(properties: ResolvedPro
101
101
  ...(propertiesOrder ?? Object.keys(properties))
102
102
  .flatMap((childKey) => {
103
103
  const property = properties[childKey];
104
+ if(!property) {
105
+ console.warn("Property not found", childKey, properties);
106
+ return [];
107
+ }
104
108
  if (arrayValuesCount && arrayValuesCount[childKey] > 1) {
105
109
  return Array.from({ length: arrayValuesCount[childKey] },
106
110
  (_, i) => getHeaders(property as ResolvedProperty, `${childKey}[${i}]`, ""))