@firecms/collection_editor 3.0.0-canary.154 → 3.0.0-canary.156
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/dist/index.es.js +8959 -5252
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +8951 -5245
- package/dist/index.umd.js.map +1 -1
- package/package.json +15 -13
- package/src/ui/collection_editor/CollectionDetailsForm.tsx +2 -0
- package/src/ui/collection_editor/CollectionEditorDialog.tsx +2 -0
- package/src/ui/collection_editor/EntityCustomViewsSelectDialog.tsx +6 -5
- package/src/ui/collection_editor/EnumForm.tsx +2 -1
- package/src/ui/collection_editor/GetCodeDialog.tsx +3 -4
- package/src/ui/collection_editor/PropertyEditView.tsx +2 -0
- package/src/ui/collection_editor/UnsavedChangesDialog.tsx +3 -5
- package/src/ui/collection_editor/import/CollectionEditorImportMapping.tsx +1 -0
- package/src/ui/collection_editor/properties/DateTimePropertyField.tsx +2 -0
- package/src/ui/collection_editor/properties/EnumPropertyField.tsx +1 -0
- package/src/ui/collection_editor/properties/ReferencePropertyField.tsx +1 -0
- package/src/ui/collection_editor/properties/UrlPropertyField.tsx +1 -0
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.
|
|
4
|
+
"version": "3.0.0-canary.156",
|
|
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.
|
|
11
|
-
"@firecms/data_import": "^3.0.0-canary.
|
|
12
|
-
"@firecms/data_import_export": "^3.0.0-canary.
|
|
13
|
-
"@firecms/formex": "^3.0.0-canary.
|
|
14
|
-
"@firecms/schema_inference": "^3.0.0-canary.
|
|
15
|
-
"@firecms/ui": "^3.0.0-canary.
|
|
10
|
+
"@firecms/data_export": "^3.0.0-canary.156",
|
|
11
|
+
"@firecms/data_import": "^3.0.0-canary.156",
|
|
12
|
+
"@firecms/data_import_export": "^3.0.0-canary.156",
|
|
13
|
+
"@firecms/formex": "^3.0.0-canary.156",
|
|
14
|
+
"@firecms/schema_inference": "^3.0.0-canary.156",
|
|
15
|
+
"@firecms/ui": "^3.0.0-canary.156",
|
|
16
16
|
"json5": "^2.2.3",
|
|
17
17
|
"prism-react-renderer": "^2.4.0"
|
|
18
18
|
},
|
|
@@ -52,13 +52,15 @@
|
|
|
52
52
|
"@jest/globals": "^29.7.0",
|
|
53
53
|
"@types/react": "^18.3.12",
|
|
54
54
|
"@types/react-dom": "^18.3.1",
|
|
55
|
-
"@vitejs/plugin-react": "^4.3.
|
|
55
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
56
|
+
"babel-plugin-react-compiler": "beta",
|
|
57
|
+
"eslint-plugin-react-compiler": "beta",
|
|
56
58
|
"jest": "^29.7.0",
|
|
57
|
-
"react-router": "^6.
|
|
58
|
-
"react-router-dom": "^6.
|
|
59
|
+
"react-router": "^6.28.0",
|
|
60
|
+
"react-router-dom": "^6.28.0",
|
|
59
61
|
"ts-jest": "^29.2.5",
|
|
60
|
-
"typescript": "^5.
|
|
61
|
-
"vite": "^5.4.
|
|
62
|
+
"typescript": "^5.7.2",
|
|
63
|
+
"vite": "^5.4.11"
|
|
62
64
|
},
|
|
63
65
|
"files": [
|
|
64
66
|
"dist",
|
|
@@ -67,5 +69,5 @@
|
|
|
67
69
|
"publishConfig": {
|
|
68
70
|
"access": "public"
|
|
69
71
|
},
|
|
70
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "78b61328121fb331b164ca96030419b9607971a1"
|
|
71
73
|
}
|
|
@@ -299,6 +299,7 @@ export function CollectionDetailsForm({
|
|
|
299
299
|
<Select
|
|
300
300
|
name="defaultSize"
|
|
301
301
|
size={"large"}
|
|
302
|
+
fullWidth={true}
|
|
302
303
|
label="Default row size"
|
|
303
304
|
position={"item-aligned"}
|
|
304
305
|
onChange={handleChange}
|
|
@@ -320,6 +321,7 @@ export function CollectionDetailsForm({
|
|
|
320
321
|
label="Document IDs generation"
|
|
321
322
|
position={"item-aligned"}
|
|
322
323
|
size={"large"}
|
|
324
|
+
fullWidth={true}
|
|
323
325
|
disabled={customIdValue === "code_defined"}
|
|
324
326
|
onValueChange={(v) => {
|
|
325
327
|
if (v === "code_defined")
|
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
Dialog,
|
|
33
33
|
DialogActions,
|
|
34
34
|
DialogContent,
|
|
35
|
+
DialogTitle,
|
|
35
36
|
DoneIcon,
|
|
36
37
|
IconButton,
|
|
37
38
|
LoadingButton,
|
|
@@ -114,6 +115,7 @@ export function CollectionEditorDialog(props: CollectionEditorDialogProps) {
|
|
|
114
115
|
maxWidth={"7xl"}
|
|
115
116
|
onOpenChange={(open) => !open ? handleCancel() : undefined}
|
|
116
117
|
>
|
|
118
|
+
<DialogTitle hidden>Collection editor</DialogTitle>
|
|
117
119
|
{open && <CollectionEditor {...props}
|
|
118
120
|
handleCancel={handleCancel}
|
|
119
121
|
setFormDirty={setFormDirty}/>}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { useCustomizationController } from "@firecms/core";
|
|
2
|
-
import { Button, Dialog, DialogActions, DialogContent, Typography } from "@firecms/ui";
|
|
2
|
+
import { Button, Dialog, DialogActions, DialogContent, DialogTitle, Typography } from "@firecms/ui";
|
|
3
3
|
import React from "react";
|
|
4
4
|
|
|
5
|
-
export function EntityCustomViewsSelectDialog({
|
|
5
|
+
export function EntityCustomViewsSelectDialog({
|
|
6
|
+
open,
|
|
7
|
+
onClose
|
|
8
|
+
}: { open: boolean, onClose: (selectedViewKey?: string) => void }) {
|
|
6
9
|
const {
|
|
7
10
|
entityViews,
|
|
8
11
|
} = useCustomizationController();
|
|
@@ -10,10 +13,8 @@ export function EntityCustomViewsSelectDialog({ open, onClose }: { open: boolean
|
|
|
10
13
|
return <Dialog
|
|
11
14
|
maxWidth={"md"}
|
|
12
15
|
open={open}>
|
|
16
|
+
<DialogTitle>Select custom view</DialogTitle>
|
|
13
17
|
<DialogContent className={"flex flex-col gap-4"}>
|
|
14
|
-
<Typography variant={"h6"}>
|
|
15
|
-
Select view
|
|
16
|
-
</Typography>
|
|
17
18
|
{entityViews?.map((view) => {
|
|
18
19
|
return <Button
|
|
19
20
|
key={view.key}
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
Dialog,
|
|
12
12
|
DialogActions,
|
|
13
13
|
DialogContent,
|
|
14
|
+
DialogTitle,
|
|
14
15
|
IconButton,
|
|
15
16
|
ListIcon,
|
|
16
17
|
Paper,
|
|
@@ -327,7 +328,7 @@ function EnumEntryDialog({
|
|
|
327
328
|
open={open}
|
|
328
329
|
onOpenChange={(open) => !open ? onClose() : undefined}
|
|
329
330
|
>
|
|
330
|
-
|
|
331
|
+
<DialogTitle hidden>Enum form dialog</DialogTitle>
|
|
331
332
|
<DialogContent>
|
|
332
333
|
{index !== undefined &&
|
|
333
334
|
<div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EntityCollection, isEmptyObject, useSnackbarController } from "@firecms/core";
|
|
2
|
-
import { Button, ContentCopyIcon, Dialog, DialogActions, DialogContent, Typography, } from "@firecms/ui";
|
|
2
|
+
import { Button, ContentCopyIcon, Dialog, DialogActions, DialogContent, DialogTitle, Typography, } from "@firecms/ui";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import JSON5 from "json5";
|
|
5
5
|
import { Highlight, themes } from "prism-react-renderer"
|
|
@@ -20,10 +20,9 @@ export function GetCodeDialog({
|
|
|
20
20
|
return <Dialog open={open}
|
|
21
21
|
onOpenChange={onOpenChange}
|
|
22
22
|
maxWidth={"4xl"}>
|
|
23
|
+
<DialogTitle variant={"h6"}>Code for {collection.name}</DialogTitle>
|
|
23
24
|
<DialogContent>
|
|
24
|
-
|
|
25
|
-
Code for {collection.name}
|
|
26
|
-
</Typography>
|
|
25
|
+
|
|
27
26
|
<Typography variant={"body2"} className={"my-4 mb-8"}>
|
|
28
27
|
If you want to customise the collection in code, you can add this collection code to your CMS
|
|
29
28
|
app configuration.
|
|
@@ -275,7 +275,9 @@ export function PropertyFormDialog({
|
|
|
275
275
|
e.stopPropagation();
|
|
276
276
|
formexRef.current?.handleSubmit(e)
|
|
277
277
|
}}>
|
|
278
|
+
<DialogTitle hidden>Property edit view</DialogTitle>
|
|
278
279
|
<DialogContent>
|
|
280
|
+
|
|
279
281
|
<PropertyForm {...formProps}
|
|
280
282
|
onDismiss={onCancel}
|
|
281
283
|
onPropertyChanged={(params) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Button, Dialog, DialogActions, DialogContent, Typography } from "@firecms/ui";
|
|
2
|
+
import { Button, Dialog, DialogActions, DialogContent, DialogTitle, Typography } from "@firecms/ui";
|
|
3
3
|
|
|
4
4
|
export interface UnsavedChangesDialogProps {
|
|
5
5
|
open: boolean;
|
|
@@ -24,11 +24,9 @@ export function UnsavedChangesDialog({
|
|
|
24
24
|
aria-labelledby="alert-dialog-title"
|
|
25
25
|
aria-describedby="alert-dialog-description"
|
|
26
26
|
>
|
|
27
|
-
<DialogContent>
|
|
28
|
-
<Typography variant={"h6"}>
|
|
29
|
-
{title ?? "Unsaved changes"}
|
|
30
|
-
</Typography>
|
|
31
27
|
|
|
28
|
+
<DialogTitle>{title ?? "Unsaved changes"}</DialogTitle>
|
|
29
|
+
<DialogContent>
|
|
32
30
|
{body && <Typography>
|
|
33
31
|
{body}
|
|
34
32
|
</Typography>}
|
|
@@ -34,6 +34,7 @@ export function DateTimePropertyField({ disabled }: {
|
|
|
34
34
|
size={"large"}
|
|
35
35
|
onValueChange={(v) => setFieldValue(modePath, v)}
|
|
36
36
|
label={"Mode"}
|
|
37
|
+
fullWidth={true}
|
|
37
38
|
renderValue={(v) => {
|
|
38
39
|
switch (v) {
|
|
39
40
|
case "date_time":
|
|
@@ -56,6 +57,7 @@ export function DateTimePropertyField({ disabled }: {
|
|
|
56
57
|
<Select name={autoValuePath}
|
|
57
58
|
disabled={disabled}
|
|
58
59
|
size={"large"}
|
|
60
|
+
fullWidth={true}
|
|
59
61
|
value={autoValueValue ?? ""}
|
|
60
62
|
onValueChange={(v) => setFieldValue(autoValuePath, v === "none" ? null : v)}
|
|
61
63
|
renderValue={(v) => {
|