@firecms/core 3.3.0 → 3.4.0-canary.8635253
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/app/useApp.d.ts +1 -0
- package/dist/components/EntityCollectionTable/column_utils.d.ts +4 -3
- package/dist/components/EntityCollectionView/FiltersDialog.d.ts +2 -1
- package/dist/components/EntityPreview.d.ts +3 -1
- package/dist/core/DefaultDrawer.d.ts +10 -3
- package/dist/core/field_configs.d.ts +1 -1
- package/dist/form/field_bindings/GeopointFieldBinding.d.ts +5 -0
- package/dist/form/index.d.ts +1 -0
- package/dist/index.es.js +1979 -721
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1978 -720
- package/dist/index.umd.js.map +1 -1
- package/dist/locales/pl.d.ts +2 -0
- package/dist/preview/index.d.ts +1 -0
- package/dist/preview/property_previews/GeopointPropertyPreview.d.ts +4 -0
- package/dist/types/collections.d.ts +17 -0
- package/dist/util/entities.d.ts +1 -0
- package/dist/util/geopoint.d.ts +22 -0
- package/dist/util/index.d.ts +1 -0
- package/dist/util/navigation_blocking.d.ts +22 -0
- package/dist/util/navigation_from_path.d.ts +10 -0
- package/dist/util/navigation_utils.d.ts +20 -0
- package/package.json +16 -9
- package/src/app/Scaffold.tsx +34 -44
- package/src/app/useApp.tsx +1 -0
- package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +2 -1
- package/src/components/EntityCollectionTable/column_utils.tsx +11 -19
- package/src/components/EntityCollectionTable/fields/TableReferenceField.tsx +1 -1
- package/src/components/EntityCollectionView/EntityCollectionViewStartActions.tsx +4 -1
- package/src/components/EntityCollectionView/FiltersDialog.tsx +39 -28
- package/src/components/EntityPreview.tsx +41 -40
- package/src/components/ReferenceWidget.tsx +1 -1
- package/src/components/SelectableTable/filters/ReferenceFilterField.tsx +2 -2
- package/src/components/VirtualTable/VirtualTable.tsx +19 -8
- package/src/components/common/useDataSourceTableController.tsx +66 -10
- package/src/core/DefaultDrawer.tsx +150 -64
- package/src/core/DrawerNavigationGroup.tsx +27 -29
- package/src/core/DrawerNavigationItem.tsx +10 -12
- package/src/core/EntityEditView.tsx +57 -32
- package/src/core/field_configs.tsx +15 -0
- package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +1 -1
- package/src/form/field_bindings/GeopointFieldBinding.tsx +139 -0
- package/src/form/index.tsx +1 -0
- package/src/i18n/FireCMSi18nProvider.tsx +2 -0
- package/src/internal/useBuildSideEntityController.tsx +2 -1
- package/src/locales/de.ts +2 -2
- package/src/locales/en.ts +2 -2
- package/src/locales/es.ts +2 -2
- package/src/locales/fr.ts +2 -2
- package/src/locales/hi.ts +2 -2
- package/src/locales/it.ts +2 -2
- package/src/locales/pl.ts +730 -0
- package/src/locales/pt.ts +2 -2
- package/src/preview/PropertyPreview.tsx +12 -0
- package/src/preview/index.ts +1 -0
- package/src/preview/property_previews/GeopointPropertyPreview.tsx +23 -0
- package/src/routes/FireCMSRoute.tsx +44 -25
- package/src/types/collections.ts +18 -0
- package/src/util/entities.ts +13 -0
- package/src/util/geopoint.ts +81 -0
- package/src/util/index.ts +1 -0
- package/src/util/navigation_blocking.ts +45 -0
- package/src/util/navigation_from_path.ts +23 -6
- package/src/util/navigation_utils.ts +36 -2
- package/src/util/parent_references_from_path.ts +4 -2
package/dist/app/useApp.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { ResolvedProperties, ResolvedProperty } from "../../types";
|
|
3
3
|
import { VirtualTableColumn } from "../VirtualTable";
|
|
4
4
|
export declare function buildIdColumn(largeLayout?: boolean): VirtualTableColumn;
|
|
5
5
|
export interface PropertiesToColumnsParams<M extends Record<string, any>> {
|
|
6
6
|
properties: ResolvedProperties<M>;
|
|
7
7
|
sortable?: boolean;
|
|
8
|
-
|
|
8
|
+
forcedFilters?: (keyof M)[];
|
|
9
|
+
allowedFilters?: (keyof M)[];
|
|
9
10
|
AdditionalHeaderWidget?: React.ComponentType<{
|
|
10
11
|
property: ResolvedProperty;
|
|
11
12
|
propertyKey: string;
|
|
12
13
|
onHover: boolean;
|
|
13
14
|
}>;
|
|
14
15
|
}
|
|
15
|
-
export declare function propertiesToColumns<M extends Record<string, any>>({ properties, sortable,
|
|
16
|
+
export declare function propertiesToColumns<M extends Record<string, any>>({ properties, sortable, forcedFilters, AdditionalHeaderWidget, allowedFilters }: PropertiesToColumnsParams<M>): VirtualTableColumn[];
|
|
@@ -7,9 +7,10 @@ export interface FiltersDialogProps {
|
|
|
7
7
|
filterValues: FilterValues<any> | undefined;
|
|
8
8
|
setFilterValues: (filterValues?: FilterValues<any>) => void;
|
|
9
9
|
forceFilter?: FilterValues<any>;
|
|
10
|
+
allowedFilters?: string[];
|
|
10
11
|
}
|
|
11
12
|
/**
|
|
12
13
|
* Dialog that displays all filterable properties from a collection
|
|
13
14
|
* and allows setting filter values for each.
|
|
14
15
|
*/
|
|
15
|
-
export declare function FiltersDialog({ open, onOpenChange, properties, filterValues, setFilterValues, forceFilter }: FiltersDialogProps): React.JSX.Element;
|
|
16
|
+
export declare function FiltersDialog({ open, onOpenChange, properties, filterValues, setFilterValues, forceFilter, allowedFilters }: FiltersDialogProps): React.JSX.Element;
|
|
@@ -29,4 +29,6 @@ export type EntityPreviewContainerProps = {
|
|
|
29
29
|
style?: React.CSSProperties;
|
|
30
30
|
onClick?: (e: React.SyntheticEvent) => void;
|
|
31
31
|
};
|
|
32
|
-
export declare
|
|
32
|
+
export declare function EntityPreviewContainer({ children, hover, onClick, size, style, className, fullwidth, ref }: EntityPreviewContainerProps & {
|
|
33
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
34
|
+
}): React.JSX.Element;
|
|
@@ -8,11 +8,18 @@ export declare function DefaultDrawer({ className, style, }: {
|
|
|
8
8
|
style?: React.CSSProperties;
|
|
9
9
|
}): React.JSX.Element;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* Collapse/expand toggle rendered at the bottom of the drawer.
|
|
12
|
+
* Uses double-chevron icons to indicate direction. Reads the drawer state
|
|
13
|
+
* from {@link useApp} so it can be dropped into any drawer.
|
|
14
|
+
*
|
|
15
|
+
* @group Core
|
|
16
|
+
*/
|
|
17
|
+
export declare function DrawerToggle(): React.JSX.Element;
|
|
18
|
+
/**
|
|
19
|
+
* This is the logo displayed in the drawer.
|
|
20
|
+
* A compact logo aligned to the left of the drawer header.
|
|
13
21
|
*
|
|
14
22
|
* @param logo
|
|
15
|
-
|
|
16
23
|
*/
|
|
17
24
|
export declare function DrawerLogo({ logo }: {
|
|
18
25
|
logo?: string;
|
|
@@ -3,5 +3,5 @@ export declare function isDefaultFieldConfigId(id: string): boolean;
|
|
|
3
3
|
export declare const DEFAULT_FIELD_CONFIGS: Record<string, PropertyConfig<any>>;
|
|
4
4
|
export declare function getDefaultFieldConfig(property: Property | ResolvedProperty): PropertyConfig | undefined;
|
|
5
5
|
export declare function getFieldConfig(property: Property | ResolvedProperty, propertyConfigs: Record<string, PropertyConfig<any>>): PropertyConfig | undefined;
|
|
6
|
-
export declare function getDefaultFieldId(property: Property | ResolvedProperty): "reference" | "date_time" | "text_field" | "multiline" | "markdown" | "url" | "email" | "user_select" | "select" | "multi_select" | "number_input" | "number_select" | "multi_number_select" | "file_upload" | "multi_file_upload" | "group" | "key_value" | "reference_as_string" | "multi_references" | "switch" | "repeat" | "custom_array" | "block" | undefined;
|
|
6
|
+
export declare function getDefaultFieldId(property: Property | ResolvedProperty): "reference" | "date_time" | "geopoint" | "text_field" | "multiline" | "markdown" | "url" | "email" | "user_select" | "select" | "multi_select" | "number_input" | "number_select" | "multi_number_select" | "file_upload" | "multi_file_upload" | "group" | "key_value" | "reference_as_string" | "multi_references" | "switch" | "repeat" | "custom_array" | "block" | undefined;
|
|
7
7
|
export declare function getFieldId(property: Property | ResolvedProperty): string | undefined;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FieldProps, GeoPoint } from "../../types";
|
|
3
|
+
type GeopointFieldBindingProps = FieldProps<GeoPoint>;
|
|
4
|
+
export declare function GeopointFieldBinding({ propertyKey, value, setValue, error, showError, disabled, autoFocus, property, includeDescription, size }: GeopointFieldBindingProps): React.JSX.Element;
|
|
5
|
+
export {};
|
package/dist/form/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export { StorageUploadFieldBinding } from "./field_bindings/StorageUploadFieldBi
|
|
|
7
7
|
export { TextFieldBinding } from "./field_bindings/TextFieldBinding";
|
|
8
8
|
export { SwitchFieldBinding } from "./field_bindings/SwitchFieldBinding";
|
|
9
9
|
export { DateTimeFieldBinding } from "./field_bindings/DateTimeFieldBinding";
|
|
10
|
+
export { GeopointFieldBinding } from "./field_bindings/GeopointFieldBinding";
|
|
10
11
|
export { ReferenceFieldBinding } from "./field_bindings/ReferenceFieldBinding";
|
|
11
12
|
export { ReferenceAsStringFieldBinding } from "./field_bindings/ReferenceAsStringFieldBinding";
|
|
12
13
|
export { MapFieldBinding } from "./field_bindings/MapFieldBinding";
|