@firecms/collection_editor 3.0.0-alpha.70 → 3.0.0-alpha.72
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 +2041 -4017
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +5 -5
- package/src/ui/EditorCollectionAction.tsx +44 -32
- package/src/ui/collection_editor/CollectionDetailsForm.tsx +3 -5
- package/src/ui/collection_editor/CollectionEditorWelcomeView.tsx +1 -1
- package/src/ui/collection_editor/PropertyEditView.tsx +0 -1
- package/src/ui/collection_editor/utils/strings.ts +1 -1
- package/dist/ui/collection_editor/SelectIcons.d.ts +0 -6
- package/dist/utils/icons.d.ts +0 -1
- package/dist/utils/synonyms.d.ts +0 -1951
- package/src/ui/collection_editor/SelectIcons.tsx +0 -72
- package/src/utils/icons.ts +0 -17
- package/src/utils/synonyms.ts +0 -1952
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firecms/collection_editor",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.0-alpha.
|
|
4
|
+
"version": "3.0.0-alpha.72",
|
|
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-alpha.
|
|
11
|
-
"@firecms/schema_inference": "^3.0.0-alpha.
|
|
12
|
-
"@firecms/ui": "^3.0.0-alpha.
|
|
10
|
+
"@firecms/data_import_export": "^3.0.0-alpha.72",
|
|
11
|
+
"@firecms/schema_inference": "^3.0.0-alpha.72",
|
|
12
|
+
"@firecms/ui": "^3.0.0-alpha.72",
|
|
13
13
|
"json5": "^2.2.3",
|
|
14
14
|
"prism-react-renderer": "^2.3.0"
|
|
15
15
|
},
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "7f6599121c226abbb4fb4dccbe109b2c8ba6e23e"
|
|
76
76
|
}
|
|
@@ -7,13 +7,7 @@ import {
|
|
|
7
7
|
useNavigationController,
|
|
8
8
|
useSnackbarController
|
|
9
9
|
} from "@firecms/core";
|
|
10
|
-
import {
|
|
11
|
-
Button,
|
|
12
|
-
IconButton,
|
|
13
|
-
SaveIcon,
|
|
14
|
-
SettingsIcon,
|
|
15
|
-
Tooltip,
|
|
16
|
-
} from "@firecms/ui";
|
|
10
|
+
import { Button, IconButton, SaveIcon, SettingsIcon, Tooltip, } from "@firecms/ui";
|
|
17
11
|
|
|
18
12
|
import { useCollectionEditorController } from "../useCollectionEditorController";
|
|
19
13
|
import { useCollectionsConfigController } from "../useCollectionsConfigController";
|
|
@@ -44,31 +38,49 @@ export function EditorCollectionAction({
|
|
|
44
38
|
let saveDefaultFilterButton = null;
|
|
45
39
|
if (!equal(getObjectOrNull(tableController.filterValues), getObjectOrNull(collection.initialFilter)) ||
|
|
46
40
|
!equal(getObjectOrNull(tableController.sortBy), getObjectOrNull(collection.initialSort))) {
|
|
47
|
-
saveDefaultFilterButton =
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
41
|
+
saveDefaultFilterButton = <>
|
|
42
|
+
{collection.initialFilter || collection.initialSort && <Tooltip
|
|
43
|
+
title={"Reset to default filter and sort"}>
|
|
44
|
+
<Button
|
|
45
|
+
color={"primary"}
|
|
46
|
+
size={"small"}
|
|
47
|
+
variant={"text"}
|
|
48
|
+
onClick={() => {
|
|
49
|
+
tableController.clearFilter?.();
|
|
50
|
+
if (collection?.initialFilter)
|
|
51
|
+
tableController.setFilterValues?.(collection?.initialFilter);
|
|
52
|
+
if (collection?.initialSort)
|
|
53
|
+
tableController.setSortBy?.(collection?.initialSort);
|
|
54
|
+
}}>
|
|
55
|
+
<SaveIcon/>
|
|
56
|
+
</Button>
|
|
57
|
+
</Tooltip>}
|
|
58
|
+
|
|
59
|
+
<Tooltip
|
|
60
|
+
title={tableController.sortBy || tableController.filterValues ? "Save default filter and sort" : "Clear default filter and sort"}>
|
|
61
|
+
<Button
|
|
62
|
+
color={"primary"}
|
|
63
|
+
size={"small"}
|
|
64
|
+
variant={"outlined"}
|
|
65
|
+
onClick={() => configController
|
|
66
|
+
?.saveCollection({
|
|
67
|
+
id: collection.path,
|
|
68
|
+
parentCollectionIds,
|
|
69
|
+
collectionData: mergeDeep(collection as PersistedCollection,
|
|
70
|
+
{
|
|
71
|
+
initialFilter: tableController.filterValues ?? null,
|
|
72
|
+
initialSort: tableController.sortBy ?? null
|
|
73
|
+
})
|
|
74
|
+
}).then(() => {
|
|
75
|
+
snackbarController.open({
|
|
76
|
+
type: "success",
|
|
77
|
+
message: "Default config saved"
|
|
78
|
+
});
|
|
79
|
+
})}>
|
|
80
|
+
<SaveIcon/>
|
|
81
|
+
</Button>
|
|
82
|
+
</Tooltip>
|
|
83
|
+
</>;
|
|
72
84
|
}
|
|
73
85
|
|
|
74
86
|
const editorButton = <Tooltip
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from "react";
|
|
2
|
-
import { EntityCollection, getIconForView, singular, toSnakeCase, } from "@firecms/core";
|
|
2
|
+
import { EntityCollection, getIconForView, SearchIconsView, singular, toSnakeCase, } from "@firecms/core";
|
|
3
3
|
import {
|
|
4
4
|
Autocomplete,
|
|
5
5
|
AutocompleteItem,
|
|
@@ -21,8 +21,6 @@ import {
|
|
|
21
21
|
} from "@firecms/ui";
|
|
22
22
|
import { Field, getIn, useFormikContext } from "formik";
|
|
23
23
|
|
|
24
|
-
//@ts-ignore
|
|
25
|
-
import { SearchIcons } from "./SelectIcons";
|
|
26
24
|
import { FieldHelperView } from "./properties/FieldHelperView";
|
|
27
25
|
|
|
28
26
|
export function CollectionDetailsForm({
|
|
@@ -353,8 +351,8 @@ export function CollectionDetailsForm({
|
|
|
353
351
|
fullWidth
|
|
354
352
|
>
|
|
355
353
|
<div className={"p-4 overflow-auto min-h-[200px]"}>
|
|
356
|
-
<
|
|
357
|
-
|
|
354
|
+
<SearchIconsView selectedIcon={values.icon}
|
|
355
|
+
onIconSelected={(icon: string) => {
|
|
358
356
|
setIconDialogOpen(false);
|
|
359
357
|
setFieldValue("icon", icon);
|
|
360
358
|
}}/>
|
|
@@ -101,7 +101,7 @@ export function CollectionEditorWelcomeView({
|
|
|
101
101
|
</Chip>
|
|
102
102
|
))}
|
|
103
103
|
|
|
104
|
-
{!loadingPathSuggestions && filteredPathSuggestions?.length === 0 &&
|
|
104
|
+
{!loadingPathSuggestions && (filteredPathSuggestions ?? [])?.length === 0 &&
|
|
105
105
|
<Typography variant={"caption"}>
|
|
106
106
|
No suggestions
|
|
107
107
|
</Typography>
|
package/dist/utils/icons.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const iconsSearch: any;
|