@firecms/collection_editor 3.0.0-alpha.37 → 3.0.0-alpha.39

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,4 +1,4 @@
1
- import { ImportConfig } from "@firecms/data_import";
1
+ import { ImportConfig } from "@firecms/data_import_export";
2
2
  import { Properties } from "@firecms/core";
3
3
  export declare function CollectionEditorImportDataPreview({ importConfig, properties, propertiesOrder }: {
4
4
  importConfig: ImportConfig;
@@ -1,4 +1,4 @@
1
- import { ImportConfig } from "@firecms/data_import";
1
+ import { ImportConfig } from "@firecms/data_import_export";
2
2
  import { PropertyConfig } from "@firecms/core";
3
3
  export declare function CollectionEditorImportMapping({ importConfig, propertyConfigs, collectionEditable }: {
4
4
  importConfig: ImportConfig;
@@ -1,5 +1,5 @@
1
1
  import { Properties } from "@firecms/core";
2
- import { ImportConfig } from "@firecms/data_import";
2
+ import { ImportConfig } from "@firecms/data_import_export";
3
3
  export declare function cleanPropertiesFromImport(properties: Properties, parentSlug?: string): {
4
4
  headersMapping: ImportConfig["headersMapping"];
5
5
  properties: Properties;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firecms/collection_editor",
3
- "version": "3.0.0-alpha.37",
3
+ "version": "3.0.0-alpha.39",
4
4
  "main": "./dist/index.umd.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "types": "dist/index.d.ts",
@@ -14,8 +14,8 @@
14
14
  "./package.json": "./package.json"
15
15
  },
16
16
  "dependencies": {
17
- "@firecms/data_import": "^3.0.0-alpha.37",
18
- "@firecms/schema_inference": "^3.0.0-alpha.37",
17
+ "@firecms/data_import_export": "^3.0.0-alpha.39",
18
+ "@firecms/schema_inference": "^3.0.0-alpha.39",
19
19
  "json5": "^2.2.3",
20
20
  "prism-react-renderer": "^2.3.0"
21
21
  },
@@ -51,24 +51,24 @@
51
51
  },
52
52
  "devDependencies": {
53
53
  "@jest/globals": "^29.7.0",
54
- "@types/react": "^18.2.33",
55
- "@types/react-dom": "^18.2.14",
54
+ "@types/react": "^18.2.45",
55
+ "@types/react-dom": "^18.2.17",
56
56
  "@typescript-eslint/eslint-plugin": "^5.62.0",
57
57
  "@typescript-eslint/parser": "^5.62.0",
58
- "@vitejs/plugin-react": "^4.1.0",
59
- "eslint": "^8.52.0",
58
+ "@vitejs/plugin-react": "^4.2.1",
59
+ "eslint": "^8.55.0",
60
60
  "eslint-config-standard": "^17.1.0",
61
- "eslint-plugin-import": "^2.29.0",
61
+ "eslint-plugin-import": "^2.29.1",
62
62
  "eslint-plugin-n": "^15.7.0",
63
63
  "eslint-plugin-promise": "^6.1.1",
64
64
  "eslint-plugin-react": "^7.33.2",
65
65
  "eslint-plugin-react-hooks": "^4.6.0",
66
66
  "jest": "^29.7.0",
67
- "react-router": "^6.17.0",
68
- "react-router-dom": "^6.17.0",
67
+ "react-router": "^6.21.0",
68
+ "react-router-dom": "^6.21.0",
69
69
  "ts-jest": "^29.1.1",
70
- "typescript": "^5.3.0",
71
- "vite": "^4.5.0",
70
+ "typescript": "^5.3.3",
71
+ "vite": "^4.5.1",
72
72
  "vite-plugin-fonts": "^0.7.0"
73
73
  },
74
74
  "files": [
@@ -78,5 +78,5 @@
78
78
  "publishConfig": {
79
79
  "access": "public"
80
80
  },
81
- "gitHead": "bfe341a3a8e3d2b33d4dc3f48fabc350eccace1b"
81
+ "gitHead": "5908ef529f511bdb4c600f159e45fe12085e8262"
82
82
  }
package/src/index.ts CHANGED
@@ -31,4 +31,5 @@ export type {
31
31
  } from "./types/collection_inference";
32
32
 
33
33
  export { MissingReferenceWidget } from "./ui/MissingReferenceWidget";
34
+
34
35
  export * from "./ui/collection_editor/util";
@@ -30,7 +30,7 @@ export function NewCollectionCard({
30
30
 
31
31
  <div
32
32
  className="flex flex-col items-start h-full w-full items-center justify-center h-full w-full flex-grow flex-col">
33
- <AddIcon color="primary"/>
33
+ <AddIcon color="primary" size={"large"}/>
34
34
  <Typography color="primary"
35
35
  variant={"caption"}
36
36
  className={"font-medium"}>{"Add new collection".toUpperCase()}</Typography>
@@ -43,7 +43,7 @@ import { SubcollectionsEditTab } from "./SubcollectionsEditTab";
43
43
  import { CollectionsConfigController } from "../../types/config_controller";
44
44
  import { CollectionEditorWelcomeView } from "./CollectionEditorWelcomeView";
45
45
  import { CollectionInference } from "../../types/collection_inference";
46
- import { getInferenceType, ImportSaveInProgress, useImportConfig } from "@firecms/data_import";
46
+ import { getInferenceType, ImportSaveInProgress, useImportConfig } from "@firecms/data_import_export";
47
47
  import { buildEntityPropertiesFromData } from "@firecms/schema_inference";
48
48
  import { CollectionEditorImportMapping } from "./import/CollectionEditorImportMapping";
49
49
  import { CollectionEditorImportDataPreview } from "./import/CollectionEditorImportDataPreview";
@@ -17,7 +17,7 @@ import { useFormikContext } from "formik";
17
17
  import { productsCollectionTemplate } from "./templates/products_template";
18
18
  import { blogCollectionTemplate } from "./templates/blog_template";
19
19
  import { usersCollectionTemplate } from "./templates/users_template";
20
- import { ImportFileUpload } from "@firecms/data_import";
20
+ import { ImportFileUpload } from "@firecms/data_import_export";
21
21
 
22
22
  export function CollectionEditorWelcomeView({
23
23
  path,
@@ -23,6 +23,11 @@ export function EntityCustomViewsSelectDialog({ open, onClose }: { open: boolean
23
23
  {view.name} ({view.key})
24
24
  </Button>;
25
25
  })}
26
+ {(entityViews ?? []).length === 0 &&
27
+ <Typography variant={"body2"}>
28
+ No custom views defined
29
+ </Typography>
30
+ }
26
31
  </DialogContent>
27
32
  <DialogActions>
28
33
  <Button onClick={() => onClose()}>Cancel</Button>
@@ -456,7 +456,7 @@ function PropertyEditView({
456
456
  <div className="flex mt-2 justify-between">
457
457
  <div className={"w-full flex flex-col gap-2"}>
458
458
  <Select
459
- className={"w-full"}
459
+ // className={"w-full"}
460
460
  error={Boolean(selectedWidgetError)}
461
461
  value={selectedFieldConfigId ?? ""}
462
462
  placeholder={"Select a property widget"}
@@ -1,4 +1,4 @@
1
- import { convertDataToEntity, getPropertiesMapping, ImportConfig } from "@firecms/data_import";
1
+ import { convertDataToEntity, getPropertiesMapping, ImportConfig } from "@firecms/data_import_export";
2
2
  import { EntityCollectionTable, Properties, Typography, useSelectionController } from "@firecms/core";
3
3
  import { useEffect } from "react";
4
4
 
@@ -3,7 +3,7 @@ import {
3
3
  getInferenceType,
4
4
  ImportConfig,
5
5
  ImportNewPropertyFieldPreview
6
- } from "@firecms/data_import";
6
+ } from "@firecms/data_import_export";
7
7
  import { getIn, useFormikContext } from "formik";
8
8
 
9
9
  import {
@@ -1,5 +1,5 @@
1
1
  import { Properties, slugify } from "@firecms/core";
2
- import { ImportConfig } from "@firecms/data_import";
2
+ import { ImportConfig } from "@firecms/data_import_export";
3
3
 
4
4
  export function cleanPropertiesFromImport(properties: Properties, parentSlug = ""): {
5
5
  headersMapping: ImportConfig["headersMapping"],