@firecms/core 3.0.0-canary.287 → 3.0.0-canary.289
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/components/PropertyCollectionView.d.ts +23 -0
- package/dist/form/EntityForm.d.ts +1 -0
- package/dist/index.es.js +624 -158
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +630 -164
- package/dist/index.umd.js.map +1 -1
- package/dist/util/entity_cache.d.ts +1 -0
- package/dist/util/objects.d.ts +1 -0
- package/package.json +5 -5
- package/src/components/EntityCollectionTable/EntityCollectionRowActions.tsx +44 -47
- package/src/components/EntityView.tsx +29 -40
- package/src/components/PropertyCollectionView.tsx +329 -0
- package/src/form/EntityForm.tsx +63 -11
- package/src/form/components/LocalChangesMenu.tsx +38 -55
- package/src/preview/property_previews/MapPropertyPreview.tsx +2 -2
- package/src/preview/property_previews/NumberPropertyPreview.tsx +2 -2
- package/src/util/entity_cache.ts +35 -0
- package/src/util/objects.ts +40 -2
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PreviewSize } from "../preview";
|
|
2
|
+
import { ResolvedProperties, ResolvedProperty } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Build a readable label for a path and resolve the property
|
|
5
|
+
* Supports map and array (including arrays of maps)
|
|
6
|
+
*/
|
|
7
|
+
export declare function buildPropertyLabelAndGetProperty(properties: ResolvedProperties, key: string): {
|
|
8
|
+
label: string;
|
|
9
|
+
property: ResolvedProperty | undefined;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Improved simple layout for nested changes:
|
|
13
|
+
* - Map or Array-of-Map -> section header + indented rows
|
|
14
|
+
* - Leaf or Array-of-Primitives -> single row with label and value
|
|
15
|
+
*/
|
|
16
|
+
export declare const PropertyCollectionView: ({ data, properties, baseKey, suppressHeader, size }: {
|
|
17
|
+
data: any;
|
|
18
|
+
properties: ResolvedProperties;
|
|
19
|
+
baseKey?: string;
|
|
20
|
+
suppressHeader?: boolean;
|
|
21
|
+
size?: PreviewSize;
|
|
22
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
23
|
+
export declare function buildDataFromPaths(values: object, paths: string[]): object;
|
|
@@ -47,6 +47,7 @@ export type EntityFormProps<M extends Record<string, any>> = {
|
|
|
47
47
|
children?: React.ReactNode;
|
|
48
48
|
};
|
|
49
49
|
export declare function extractTouchedValues(values: any, touched: Record<string, boolean>): Record<string, any>;
|
|
50
|
+
export declare function getChanges<T extends object>(source: Partial<T>, comparison: Partial<T>): Partial<T>;
|
|
50
51
|
export declare function EntityForm<M extends Record<string, any>>({ path, fullIdPath, entityId: entityIdProp, collection, onValuesModified, onIdChange, onSaved, entity, initialDirtyValues, onFormContextReady, forceActionsAtTheBottom, initialStatus, className, onStatusChange, onEntityChange, openEntityMode, formex: formexProp, disabled: disabledProp, Builder, EntityFormActionsComponent, showDefaultActions, showEntityPath, children }: EntityFormProps<M>): import("react/jsx-runtime").JSX.Element;
|
|
51
52
|
export declare function getInitialEntityValues<M extends object>(authController: AuthController, collection: EntityCollection, path: string, status: "new" | "existing" | "copy", entity: Entity<M> | undefined, propertyConfigs?: Record<string, PropertyConfig>): Partial<EntityValues<M>>;
|
|
52
53
|
export declare function yupToFormErrors(yupError: ValidationError): Record<string, any>;
|