@firecms/collection_editor 3.0.0-canary.43 → 3.0.0-canary.44

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,16 +1,16 @@
1
1
  {
2
2
  "name": "@firecms/collection_editor",
3
3
  "type": "module",
4
- "version": "3.0.0-canary.43",
4
+ "version": "3.0.0-canary.44",
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_import_export": "^3.0.0-canary.43",
11
- "@firecms/formex": "^3.0.0-canary.43",
12
- "@firecms/schema_inference": "^3.0.0-canary.43",
13
- "@firecms/ui": "^3.0.0-canary.43",
10
+ "@firecms/data_import_export": "^3.0.0-canary.44",
11
+ "@firecms/formex": "^3.0.0-canary.44",
12
+ "@firecms/schema_inference": "^3.0.0-canary.44",
13
+ "@firecms/ui": "^3.0.0-canary.44",
14
14
  "json5": "^2.2.3",
15
15
  "prism-react-renderer": "^2.3.1"
16
16
  },
@@ -81,5 +81,5 @@
81
81
  "publishConfig": {
82
82
  "access": "public"
83
83
  },
84
- "gitHead": "fedcb0d43c504245dd76b702e4ab4479fa8592df"
84
+ "gitHead": "15e52171f137c2876a3566bbc2752d140b9d0c7a"
85
85
  }
@@ -47,6 +47,7 @@ export function CollectionEditorImportDataPreview({
47
47
  key: p,
48
48
  disabled: false
49
49
  }))}
50
- properties={properties}/>
50
+ properties={properties}
51
+ enablePopupIcon={false}/>
51
52
 
52
53
  }
@@ -2,11 +2,17 @@ import React, { useCallback, useState } from "react";
2
2
  import { AddIcon, Button, Paper, Typography } from "@firecms/ui";
3
3
  import { getIn, useFormex } from "@firecms/formex";
4
4
  import { PropertyFormDialog } from "../PropertyEditView";
5
- import { getFullId, idToPropertiesPath, namespaceToPropertiesOrderPath } from "../util";
5
+ import { getFullId, idToPropertiesPath, namespaceToPropertiesOrderPath, namespaceToPropertiesPath } from "../util";
6
6
  import { PropertyTree } from "../PropertyTree";
7
7
  import { ArrayProperty, Property, PropertyConfig } from "@firecms/core";
8
8
 
9
- export function BlockPropertyField({ disabled, getData, allowDataInference, propertyConfigs, collectionEditable }: {
9
+ export function BlockPropertyField({
10
+ disabled,
11
+ getData,
12
+ allowDataInference,
13
+ propertyConfigs,
14
+ collectionEditable
15
+ }: {
10
16
  disabled: boolean;
11
17
  getData?: () => Promise<object[]>;
12
18
  allowDataInference: boolean;
@@ -50,7 +56,7 @@ export function BlockPropertyField({ disabled, getData, allowDataInference, prop
50
56
 
51
57
  setFieldValue(`oneOf.${idToPropertiesPath(fullId)}`, undefined, false);
52
58
  const propertiesOrderPath = `oneOf.${namespaceToPropertiesOrderPath(namespace)}`;
53
- const currentPropertiesOrder: string[] = getIn(values, propertiesOrderPath);
59
+ const currentPropertiesOrder: string[] = getIn(values, propertiesOrderPath) ?? Object.keys(getIn(values, namespaceToPropertiesPath(namespace)));
54
60
  setFieldValue(propertiesOrderPath, currentPropertiesOrder.filter((p) => p !== propertyKey), false);
55
61
 
56
62
  setPropertyDialogOpen(false);