@firecms/collection_editor 3.0.0-canary.211 → 3.0.0-canary.213

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,18 +1,18 @@
1
1
  {
2
2
  "name": "@firecms/collection_editor",
3
3
  "type": "module",
4
- "version": "3.0.0-canary.211",
4
+ "version": "3.0.0-canary.213",
5
5
  "main": "./dist/index.umd.js",
6
6
  "module": "./dist/index.es.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "source": "src/index.ts",
9
9
  "dependencies": {
10
- "@firecms/data_export": "^3.0.0-canary.211",
11
- "@firecms/data_import": "^3.0.0-canary.211",
12
- "@firecms/data_import_export": "^3.0.0-canary.211",
13
- "@firecms/formex": "^3.0.0-canary.211",
14
- "@firecms/schema_inference": "^3.0.0-canary.211",
15
- "@firecms/ui": "^3.0.0-canary.211",
10
+ "@firecms/data_export": "^3.0.0-canary.213",
11
+ "@firecms/data_import": "^3.0.0-canary.213",
12
+ "@firecms/data_import_export": "^3.0.0-canary.213",
13
+ "@firecms/formex": "^3.0.0-canary.213",
14
+ "@firecms/schema_inference": "^3.0.0-canary.213",
15
+ "@firecms/ui": "^3.0.0-canary.213",
16
16
  "@hello-pangea/dnd": "^17.0.0",
17
17
  "json5": "^2.2.3",
18
18
  "prism-react-renderer": "^2.4.1"
@@ -70,5 +70,5 @@
70
70
  "publishConfig": {
71
71
  "access": "public"
72
72
  },
73
- "gitHead": "ee9fd6ecade3bb23be5cfa025117be9fe2b6fd7f"
73
+ "gitHead": "e57f5d7fbaf78a58ac7eb116efde1c1445b0e5cd"
74
74
  }
@@ -197,7 +197,7 @@ function EnumFormFields({
197
197
  size={"small"}
198
198
  buildEntry={buildEntry}
199
199
  onInternalIdAdded={setLastInternalIdAdded}
200
- includeAddButton={true}
200
+ canAddElements={true}
201
201
  onValueChange={(value) => setFieldValue(enumValuesPath, value)}
202
202
  newDefaultEntry={{ id: "", label: "" }}/>
203
203
 
@@ -1,5 +1,11 @@
1
1
  import { convertDataToEntity, ImportConfig } from "@firecms/data_import_export";
2
- import { CircularProgressCenter, EntityCollectionTable, Properties, useSelectionController } from "@firecms/core";
2
+ import {
3
+ CircularProgressCenter,
4
+ EntityCollectionTable,
5
+ Properties,
6
+ useAuthController,
7
+ useSelectionController
8
+ } from "@firecms/core";
3
9
  import { useEffect, useState } from "react";
4
10
  import { Typography } from "@firecms/ui";
5
11
 
@@ -13,11 +19,12 @@ export function CollectionEditorImportDataPreview({
13
19
  propertiesOrder: string[]
14
20
  }) {
15
21
 
22
+ const authController = useAuthController();
16
23
  const [loading, setLoading] = useState<boolean>(false);
17
24
 
18
25
  async function loadEntities() {
19
26
  // const propertiesMapping = getPropertiesMapping(importConfig.originProperties, properties, importConfig.headersMapping);
20
- const mappedData = importConfig.importData.map(d => convertDataToEntity(d, importConfig.idColumn, importConfig.headersMapping, properties, "TEMP_PATH", importConfig.defaultValues));
27
+ const mappedData = importConfig.importData.map(d => convertDataToEntity(authController, d, importConfig.idColumn, importConfig.headersMapping, properties, "TEMP_PATH", importConfig.defaultValues));
21
28
  importConfig.setEntities(mappedData);
22
29
  }
23
30