@firecms/data_import_export 3.0.0-alpha.63 → 3.0.0-alpha.64

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,30 +1,32 @@
1
1
  import React, { useCallback } from "react";
2
2
 
3
+ import {
4
+ CollectionActionsProps,
5
+ Entity,
6
+ EntityCollection,
7
+ ExportConfig,
8
+ resolveCollection,
9
+ ResolvedEntityCollection,
10
+ useDataSource,
11
+ useFireCMSContext,
12
+ useNavigationController,
13
+ User
14
+ } from "@firecms/core";
3
15
  import {
4
16
  Alert,
5
17
  BooleanSwitchWithLabel,
6
18
  Button,
7
19
  CircularProgress,
8
20
  cn,
9
- CollectionActionsProps,
10
21
  Dialog,
11
22
  DialogActions,
12
23
  DialogContent,
13
- Entity,
14
- EntityCollection,
15
- ExportConfig,
16
24
  focusedMixin,
17
25
  GetAppIcon,
18
26
  IconButton,
19
- resolveCollection,
20
- ResolvedEntityCollection,
21
27
  Tooltip,
22
28
  Typography,
23
- useDataSource,
24
- useFireCMSContext,
25
- useNavigationController,
26
- User
27
- } from "@firecms/core";
29
+ } from "@firecms/ui";
28
30
  import { downloadExport } from "./export";
29
31
 
30
32
  const DOCS_LIMIT = 500;
@@ -1,32 +1,34 @@
1
1
  import React, { useCallback, useEffect } from "react";
2
2
  import {
3
- Button,
4
- cn,
5
3
  CollectionActionsProps,
6
- defaultBorderMixin,
7
- Dialog,
8
- DialogActions,
9
- DialogContent,
10
4
  EntityCollectionTable,
11
5
  FieldConfigBadge,
12
- FileUploadIcon,
13
6
  getFieldConfig,
14
7
  getPropertiesWithPropertiesOrder,
15
8
  getPropertyInPath,
16
- IconButton,
17
9
  Properties,
18
10
  Property,
19
11
  resolveCollection,
20
12
  ResolvedProperties,
21
- Select,
22
- SelectItem,
23
- Tooltip,
24
- Typography,
25
13
  useFireCMSContext,
26
14
  User,
27
15
  useSelectionController,
28
16
  useSnackbarController
29
17
  } from "@firecms/core";
18
+ import {
19
+ Button,
20
+ cn,
21
+ defaultBorderMixin,
22
+ Dialog,
23
+ DialogActions,
24
+ DialogContent,
25
+ FileUploadIcon,
26
+ IconButton,
27
+ Select,
28
+ SelectItem,
29
+ Tooltip,
30
+ Typography,
31
+ } from "@firecms/ui";
30
32
  import { buildEntityPropertiesFromData } from "@firecms/schema_inference";
31
33
  import { useImportConfig } from "../hooks";
32
34
  import { convertDataToEntity, getInferenceType, getPropertiesMapping } from "../utils";
@@ -403,7 +405,7 @@ export function ImportDataPreview<M extends Record<string, any>>({
403
405
 
404
406
  function buildHeadersMappingFromData(objArr: object[]) {
405
407
  const headersMapping: Record<string, string> = {};
406
- objArr.forEach((obj) => {
408
+ objArr.filter(Boolean).forEach((obj) => {
407
409
  Object.keys(obj).forEach((key) => {
408
410
  // @ts-ignore
409
411
  const child = obj[key];