@firecms/collection_editor 3.0.0-alpha.16 → 3.0.0-alpha.17
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/ConfigControllerProvider.d.ts +1 -1
- package/dist/components/RootCollectionSuggestions.d.ts +1 -0
- package/dist/components/collection_editor/CollectionEditorDialog.d.ts +7 -3
- package/dist/components/collection_editor/CollectionPropertiesEditorForm.d.ts +5 -3
- package/dist/components/collection_editor/EntityCustomViewsSelectDialog.d.ts +4 -0
- package/dist/components/collection_editor/PropertyEditView.d.ts +5 -4
- package/dist/components/collection_editor/PropertyFieldPreview.d.ts +4 -3
- package/dist/components/collection_editor/PropertySelectItem.d.ts +2 -2
- package/dist/components/collection_editor/PropertyTree.d.ts +6 -5
- package/dist/components/collection_editor/import/CollectionEditorImportMapping.d.ts +3 -1
- package/dist/components/collection_editor/properties/BlockPropertyField.d.ts +3 -1
- package/dist/components/collection_editor/properties/MapPropertyField.d.ts +3 -1
- package/dist/components/collection_editor/properties/RepeatPropertyField.d.ts +3 -1
- package/dist/components/collection_editor/utils/update_property_for_widget.d.ts +2 -3
- package/dist/index.d.ts +0 -1
- package/dist/index.es.js +2221 -1889
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/types/collection_editor_controller.d.ts +6 -1
- package/dist/types/config_controller.d.ts +2 -2
- package/dist/types/persisted_collection.d.ts +3 -2
- package/dist/utils/entities.d.ts +3 -4
- package/dist/utils/icons.d.ts +1 -2
- package/dist/utils/join_collections.d.ts +14 -0
- package/package.json +8 -4
- package/dist/types/editable_properties.d.ts +0 -10
|
@@ -12,9 +12,14 @@ export interface CollectionEditorController {
|
|
|
12
12
|
parentCollection?: EntityCollection<any, any, any>;
|
|
13
13
|
}) => void;
|
|
14
14
|
createCollection: (props: {
|
|
15
|
-
|
|
15
|
+
initialValues?: {
|
|
16
|
+
group?: string;
|
|
17
|
+
path?: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
};
|
|
16
20
|
parentPathSegments: string[];
|
|
17
21
|
parentCollection?: EntityCollection<any, any, any>;
|
|
18
22
|
}) => void;
|
|
19
23
|
configPermissions: CollectionEditorPermissionsBuilder;
|
|
24
|
+
rootPathSuggestions?: string[];
|
|
20
25
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CMSType
|
|
1
|
+
import { CMSType } from "@firecms/core";
|
|
2
2
|
import { PersistedCollection } from "./persisted_collection";
|
|
3
3
|
/**
|
|
4
4
|
* Use this controller to access the configuration that is stored externally,
|
|
@@ -14,7 +14,7 @@ export interface CollectionsConfigController {
|
|
|
14
14
|
}
|
|
15
15
|
export type SaveCollectionParams<M extends Record<string, any>> = {
|
|
16
16
|
path: string;
|
|
17
|
-
collectionData:
|
|
17
|
+
collectionData: PersistedCollection<M>;
|
|
18
18
|
previousPath?: string;
|
|
19
19
|
parentPathSegments?: string[];
|
|
20
20
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { EntityCollection, User } from "@firecms/core";
|
|
2
|
-
export type PersistedCollection<M extends Record<string, any> = any, AdditionalKey extends string = string, UserType extends User = User> = EntityCollection<M, AdditionalKey, UserType> & {
|
|
1
|
+
import { EntityCollection, Properties, User } from "@firecms/core";
|
|
2
|
+
export type PersistedCollection<M extends Record<string, any> = any, AdditionalKey extends string = string, UserType extends User = User> = Omit<EntityCollection<M, AdditionalKey, UserType>, "properties"> & {
|
|
3
|
+
properties: Properties<M>;
|
|
3
4
|
ownerId: string;
|
|
4
5
|
};
|
package/dist/utils/entities.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Properties, PropertyOrBuilder } from "@firecms/core";
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function removeNonEditableProperties(properties: EditablePropertiesOrBuilders<any>): Properties;
|
|
1
|
+
import { Properties, PropertiesOrBuilders, PropertyOrBuilder } from "@firecms/core";
|
|
2
|
+
export declare function editableProperty(property: PropertyOrBuilder | PropertyOrBuilder): boolean;
|
|
3
|
+
export declare function removeNonEditableProperties(properties: PropertiesOrBuilders<any>): Properties;
|
package/dist/utils/icons.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const searchIndex: Index;
|
|
1
|
+
export declare const iconsSearch: any;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EntityCollection } from "@firecms/core";
|
|
2
|
+
import { PersistedCollection } from "../types/persisted_collection";
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @param storedCollections
|
|
6
|
+
* @param codedCollections
|
|
7
|
+
*/
|
|
8
|
+
export declare function joinCollectionLists(storedCollections: PersistedCollection[], codedCollections: EntityCollection[] | undefined): EntityCollection[];
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @param target
|
|
12
|
+
* @param source
|
|
13
|
+
*/
|
|
14
|
+
export declare function mergeCollections(target: EntityCollection, source: EntityCollection): EntityCollection;
|
package/package.json
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firecms/collection_editor",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.17",
|
|
4
4
|
"main": "./dist/index.umd.js",
|
|
5
5
|
"module": "./dist/index.es.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"source": "src/index.ts",
|
|
8
|
-
"
|
|
9
|
-
"
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.es.js",
|
|
11
|
+
"require": "./dist/index.umd.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
}
|
|
10
14
|
},
|
|
11
15
|
"peerDependencies": {
|
|
12
16
|
"@firecms/data_import": "^3.0.0-alpha.9",
|
|
@@ -67,5 +71,5 @@
|
|
|
67
71
|
"publishConfig": {
|
|
68
72
|
"access": "public"
|
|
69
73
|
},
|
|
70
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "3a2be58e39f08f1c1fe0d993acfab648e0513c53"
|
|
71
75
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { CMSType, Property, PropertyBuilderProps, ResolvedProperty } from "@firecms/core";
|
|
2
|
-
export type EditablePropertyOrBuilder = EditableProperty | EditablePropertyBuilder;
|
|
3
|
-
export type EditableProperty = Property & {
|
|
4
|
-
editable: boolean;
|
|
5
|
-
};
|
|
6
|
-
export type EditablePropertyBuilder<T extends CMSType = any, M extends Record<string, any> = any> = ({ values, previousValues, propertyValue, path, entityId }: PropertyBuilderProps<M>) => EditableProperty | null;
|
|
7
|
-
export type EditablePropertiesOrBuilders<M extends Record<string, any> = Record<string, any>> = {
|
|
8
|
-
[k in keyof M]: EditablePropertyOrBuilder;
|
|
9
|
-
};
|
|
10
|
-
export declare function isEditablePropertyBuilder<T extends CMSType, M extends Record<string, any>>(propertyOrBuilder?: EditablePropertyOrBuilder | ResolvedProperty<T>): propertyOrBuilder is EditablePropertyBuilder;
|