@firecms/core 3.0.0-alpha.71 → 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/components/EntityCollectionTable/EntityCollectionTable.d.ts +5 -5
- package/dist/components/EntityCollectionTable/EntityCollectionTableProps.d.ts +1 -1
- package/dist/components/EntityCollectionTable/index.d.ts +1 -1
- package/dist/components/EntityCollectionTable/types.d.ts +15 -1
- package/dist/components/EntityCollectionTable/useDataSourceEntityCollectionTableController.d.ts +32 -0
- package/dist/components/SearchIconsView.d.ts +5 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/hooks/useVerifyLicense.d.ts +0 -0
- package/dist/index.es.js +8902 -7487
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +4 -587
- package/dist/index.umd.js.map +1 -1
- package/dist/util/icon_list.d.ts +1 -0
- package/dist/util/icon_synonyms.d.ts +1950 -0
- package/dist/util/index.d.ts +2 -0
- package/package.json +3 -5
- package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +5 -6
- package/src/components/EntityCollectionTable/EntityCollectionTableProps.tsx +1 -1
- package/src/components/EntityCollectionTable/index.tsx +1 -1
- package/src/components/EntityCollectionTable/types.tsx +15 -1
- package/src/components/EntityCollectionTable/{useEntityCollectionTableController.tsx → useDataSourceEntityCollectionTableController.tsx} +16 -4
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +2 -2
- package/src/components/ReferenceSelectionInner.tsx +2 -2
- package/src/components/SearchIconsView.tsx +75 -0
- package/src/components/index.tsx +1 -0
- package/src/form/field_bindings/MarkdownFieldBinding.tsx +585 -585
- package/src/hooks/useVerifyLicense.tsx +1 -0
- package/src/util/icon_list.ts +17 -0
- package/src/util/icon_synonyms.ts +1950 -0
- package/src/util/index.ts +2 -0
- package/dist/components/EntityCollectionTable/useEntityCollectionTableController.d.ts +0 -21
- package/src/components/ArrayContainer.d.ts +0 -42
- package/src/components/CircularProgressCenter.d.ts +0 -11
- package/src/components/DeleteConfirmationDialog.d.ts +0 -9
- package/src/components/EntityCollectionTable/EntityCollectionTable.d.ts +0 -30
- package/src/components/EntityCollectionTable/EntityCollectionTableProps.d.ts +0 -106
- package/src/components/EntityCollectionTable/fields/TableReferenceField.d.ts +0 -15
- package/src/components/EntityCollectionTable/fields/TableStorageUpload.d.ts +0 -33
- package/src/components/EntityCollectionTable/filters/BooleanFilterField.d.ts +0 -9
- package/src/components/EntityCollectionTable/filters/DateTimeFilterField.d.ts +0 -11
- package/src/components/EntityCollectionTable/filters/ReferenceFilterField.d.ts +0 -14
- package/src/components/EntityCollectionTable/filters/StringNumberFilterField.d.ts +0 -13
- package/src/components/EntityCollectionTable/index.d.ts +0 -4
- package/src/components/EntityCollectionTable/internal/CollectionTableToolbar.d.ts +0 -18
- package/src/components/EntityCollectionTable/internal/DeleteEntityDialog.d.ts +0 -12
- package/src/components/EntityCollectionTable/internal/EntityCollectionRowActions.d.ts +0 -35
- package/src/components/EntityCollectionTable/internal/EntityTableCell.d.ts +0 -26
- package/src/components/EntityCollectionTable/internal/EntityTableCellActions.d.ts +0 -9
- package/src/components/EntityCollectionTable/internal/PropertyTableCell.d.ts +0 -18
- package/src/components/EntityCollectionTable/internal/common.d.ts +0 -4
- package/src/components/EntityCollectionTable/internal/default_entity_actions.d.ts +0 -6
- package/src/components/EntityCollectionTable/internal/popup_field/ElementResizeListener.d.ts +0 -5
- package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.d.ts +0 -23
- package/src/components/EntityCollectionTable/internal/popup_field/useDraggable.d.ts +0 -13
- package/src/components/EntityCollectionTable/internal/popup_field/useWindowSize.d.ts +0 -6
- package/src/components/EntityCollectionTable/types.d.ts +0 -39
- package/src/components/EntityCollectionTable/useDebouncedData.d.ts +0 -9
- package/src/components/EntityCollectionTable/useEntityCollectionTableController.d.ts +0 -21
- package/src/components/EntityCollectionView/EntityCollectionView.d.ts +0 -37
- package/src/components/EntityCollectionView/EntityCollectionViewActions.d.ts +0 -14
- package/src/components/EntityCollectionView/useColumnsIds.d.ts +0 -4
- package/src/components/EntityPreview.d.ts +0 -11
- package/src/components/ErrorBoundary.d.ts +0 -11
- package/src/components/ErrorTooltip.d.ts +0 -2
- package/src/components/ErrorView.d.ts +0 -19
- package/src/components/FieldConfigBadge.d.ts +0 -4
- package/src/components/FireCMSAppBar.d.ts +0 -26
- package/src/components/FireCMSLogo.d.ts +0 -7
- package/src/components/HomePage/DefaultHomePage.d.ts +0 -21
- package/src/components/HomePage/FavouritesView.d.ts +0 -3
- package/src/components/HomePage/NavigationCollectionCard.d.ts +0 -17
- package/src/components/HomePage/NavigationGroup.d.ts +0 -4
- package/src/components/HomePage/index.d.ts +0 -3
- package/src/components/LabelWithIcon.d.ts +0 -14
- package/src/components/NotFoundPage.d.ts +0 -1
- package/src/components/ReferenceSelectionInner.d.ts +0 -58
- package/src/components/ReferenceWidget.d.ts +0 -28
- package/src/components/VirtualTable/VirtualTable.d.ts +0 -11
- package/src/components/VirtualTable/VirtualTableCell.d.ts +0 -14
- package/src/components/VirtualTable/VirtualTableHeader.d.ts +0 -27
- package/src/components/VirtualTable/VirtualTableHeaderRow.d.ts +0 -2
- package/src/components/VirtualTable/VirtualTableProps.d.ts +0 -215
- package/src/components/VirtualTable/VirtualTableRow.d.ts +0 -3
- package/src/components/VirtualTable/common.d.ts +0 -2
- package/src/components/VirtualTable/fields/VirtualTableDateField.d.ts +0 -11
- package/src/components/VirtualTable/fields/VirtualTableInput.d.ts +0 -8
- package/src/components/VirtualTable/fields/VirtualTableNumberInput.d.ts +0 -8
- package/src/components/VirtualTable/fields/VirtualTableSelect.d.ts +0 -15
- package/src/components/VirtualTable/fields/VirtualTableSwitch.d.ts +0 -7
- package/src/components/VirtualTable/index.d.ts +0 -2
- package/src/components/VirtualTable/types.d.ts +0 -34
- package/src/components/index.d.ts +0 -20
- package/src/contexts/AuthControllerContext.d.ts +0 -3
- package/src/contexts/DataSourceContext.d.ts +0 -3
- package/src/contexts/DialogsProvider.d.ts +0 -4
- package/src/contexts/ModeController.d.ts +0 -4
- package/src/contexts/NavigationContext.d.ts +0 -3
- package/src/contexts/SideDialogsControllerContext.d.ts +0 -3
- package/src/contexts/SideEntityControllerContext.d.ts +0 -3
- package/src/contexts/SnackbarProvider.d.ts +0 -2
- package/src/contexts/StorageSourceContext.d.ts +0 -3
- package/src/contexts/UserConfigurationPersistenceContext.d.ts +0 -3
- package/src/contexts/index.d.ts +0 -3
- package/src/core/Drawer.d.ts +0 -23
- package/src/core/EntitySidePanel.d.ts +0 -10
- package/src/core/FireCMS.d.ts +0 -14
- package/src/core/NavigationRoutes.d.ts +0 -21
- package/src/core/Scaffold.d.ts +0 -52
- package/src/core/SideDialogs.d.ts +0 -23
- package/src/core/field_configs.d.ts +0 -7
- package/src/core/index.d.ts +0 -10
- package/src/core/useBuildLocalConfigurationPersistence.d.ts +0 -2
- package/src/core/useBuildModeController.d.ts +0 -6
- package/src/form/EntityForm.d.ts +0 -75
- package/src/form/PropertyFieldBinding.d.ts +0 -30
- package/src/form/components/CustomIdField.d.ts +0 -9
- package/src/form/components/ErrorFocus.d.ts +0 -4
- package/src/form/components/FieldHelperText.d.ts +0 -12
- package/src/form/components/FormikArrayContainer.d.ts +0 -18
- package/src/form/components/StorageItemPreview.d.ts +0 -13
- package/src/form/components/StorageUploadProgress.d.ts +0 -10
- package/src/form/components/SwitchControl.d.ts +0 -8
- package/src/form/components/index.d.ts +0 -3
- package/src/form/field_bindings/ArrayCustomShapedFieldBinding.d.ts +0 -9
- package/src/form/field_bindings/ArrayOfReferencesFieldBinding.d.ts +0 -11
- package/src/form/field_bindings/BlockFieldBinding.d.ts +0 -10
- package/src/form/field_bindings/DateTimeFieldBinding.d.ts +0 -11
- package/src/form/field_bindings/KeyValueFieldBinding.d.ts +0 -7
- package/src/form/field_bindings/MapFieldBinding.d.ts +0 -9
- package/src/form/field_bindings/MarkdownFieldBinding.d.ts +0 -9
- package/src/form/field_bindings/MultiSelectBinding.d.ts +0 -9
- package/src/form/field_bindings/ReadOnlyFieldBinding.d.ts +0 -10
- package/src/form/field_bindings/ReferenceFieldBinding.d.ts +0 -9
- package/src/form/field_bindings/RepeatFieldBinding.d.ts +0 -10
- package/src/form/field_bindings/SelectFieldBinding.d.ts +0 -12
- package/src/form/field_bindings/StorageUploadFieldBinding.d.ts +0 -28
- package/src/form/field_bindings/SwitchFieldBinding.d.ts +0 -12
- package/src/form/field_bindings/TextFieldBinding.d.ts +0 -12
- package/src/form/index.d.ts +0 -20
- package/src/form/useClearRestoreValue.d.ts +0 -13
- package/src/form/validation.d.ts +0 -25
- package/src/hooks/data/delete.d.ts +0 -37
- package/src/hooks/data/save.d.ts +0 -42
- package/src/hooks/data/useCollectionFetch.d.ts +0 -50
- package/src/hooks/data/useDataOrder.d.ts +0 -12
- package/src/hooks/data/useDataSource.d.ts +0 -6
- package/src/hooks/data/useEntityFetch.d.ts +0 -28
- package/src/hooks/index.d.ts +0 -19
- package/src/hooks/useAuthController.d.ts +0 -11
- package/src/hooks/useBrowserTitleAndIcon.d.ts +0 -6
- package/src/hooks/useClipboard.d.ts +0 -57
- package/src/hooks/useDialogsController.d.ts +0 -11
- package/src/hooks/useFireCMSContext.d.ts +0 -12
- package/src/hooks/useLargeLayout.d.ts +0 -1
- package/src/hooks/useModeController.d.ts +0 -20
- package/src/hooks/useNavigationController.d.ts +0 -9
- package/src/hooks/useReferenceDialog.d.ts +0 -18
- package/src/hooks/useResolvedNavigationFrom.d.ts +0 -72
- package/src/hooks/useSideDialogsController.d.ts +0 -18
- package/src/hooks/useSideEntityController.d.ts +0 -12
- package/src/hooks/useSnackbarController.d.ts +0 -41
- package/src/hooks/useStorageSource.d.ts +0 -6
- package/src/hooks/useUserConfigurationPersistence.d.ts +0 -8
- package/src/index.d.ts +0 -8
- package/src/internal/EntityView.d.ts +0 -22
- package/src/internal/common.d.ts +0 -3
- package/src/internal/useBuildDataSource.d.ts +0 -22
- package/src/internal/useBuildNavigationController.d.ts +0 -14
- package/src/internal/useBuildSideDialogsController.d.ts +0 -2
- package/src/internal/useBuildSideEntityController.d.ts +0 -4
- package/src/internal/useLocaleConfig.d.ts +0 -1
- package/src/internal/useRestoreScroll.d.ts +0 -6
- package/src/internal/useUnsavedChangesDialog.d.ts +0 -14
- package/src/preview/PropertyPreview.d.ts +0 -7
- package/src/preview/PropertyPreviewProps.d.ts +0 -43
- package/src/preview/components/ArrayEnumPreview.d.ts +0 -11
- package/src/preview/components/AsyncPreviewComponent.d.ts +0 -11
- package/src/preview/components/BooleanPreview.d.ts +0 -7
- package/src/preview/components/DatePreview.d.ts +0 -7
- package/src/preview/components/EmptyValue.d.ts +0 -4
- package/src/preview/components/EnumValuesChip.d.ts +0 -13
- package/src/preview/components/ImagePreview.d.ts +0 -12
- package/src/preview/components/ReferencePreview.d.ts +0 -22
- package/src/preview/components/StorageThumbnail.d.ts +0 -13
- package/src/preview/components/UrlComponentPreview.d.ts +0 -12
- package/src/preview/index.d.ts +0 -23
- package/src/preview/property_previews/ArrayOfMapsPreview.d.ts +0 -5
- package/src/preview/property_previews/ArrayOfReferencesPreview.d.ts +0 -5
- package/src/preview/property_previews/ArrayOfStorageComponentsPreview.d.ts +0 -5
- package/src/preview/property_previews/ArrayOfStringsPreview.d.ts +0 -5
- package/src/preview/property_previews/ArrayOneOfPreview.d.ts +0 -5
- package/src/preview/property_previews/ArrayPropertyEnumPreview.d.ts +0 -5
- package/src/preview/property_previews/ArrayPropertyPreview.d.ts +0 -5
- package/src/preview/property_previews/MapPropertyPreview.d.ts +0 -8
- package/src/preview/property_previews/NumberPropertyPreview.d.ts +0 -6
- package/src/preview/property_previews/SkeletonPropertyComponent.d.ts +0 -14
- package/src/preview/property_previews/StringPropertyPreview.d.ts +0 -6
- package/src/preview/util.d.ts +0 -7
- package/src/types/analytics.d.ts +0 -1
- package/src/types/appcheck.d.ts +0 -26
- package/src/types/auth.d.ts +0 -40
- package/src/types/collections.d.ts +0 -451
- package/src/types/datasource.d.ts +0 -262
- package/src/types/dialogs_controller.d.ts +0 -32
- package/src/types/entities.d.ts +0 -57
- package/src/types/entity_actions.d.ts +0 -35
- package/src/types/entity_callbacks.d.ts +0 -171
- package/src/types/entity_link_builder.d.ts +0 -7
- package/src/types/export_import.d.ts +0 -21
- package/src/types/fields.d.ts +0 -181
- package/src/types/firecms.d.ts +0 -151
- package/src/types/firecms_context.d.ts +0 -110
- package/src/types/index.d.ts +0 -26
- package/src/types/local_config_persistence.d.ts +0 -21
- package/src/types/locales.d.ts +0 -4
- package/src/types/modify_collections.d.ts +0 -5
- package/src/types/navigation.d.ts +0 -178
- package/src/types/permissions.d.ts +0 -63
- package/src/types/plugins.d.ts +0 -179
- package/src/types/properties.d.ts +0 -681
- package/src/types/property_config.d.ts +0 -42
- package/src/types/resolved_entities.d.ts +0 -98
- package/src/types/side_dialogs_controller.d.ts +0 -57
- package/src/types/side_entity_controller.d.ts +0 -83
- package/src/types/storage.d.ts +0 -82
- package/src/types/user.d.ts +0 -36
- package/src/util/arrays.d.ts +0 -1
- package/src/util/builders.d.ts +0 -64
- package/src/util/chip_utils.d.ts +0 -3
- package/src/util/collections.d.ts +0 -3
- package/src/util/common.d.ts +0 -2
- package/src/util/dates.d.ts +0 -1
- package/src/util/entities.d.ts +0 -28
- package/src/util/enums.d.ts +0 -7
- package/src/util/flatten_object.d.ts +0 -3
- package/src/util/hash.d.ts +0 -1
- package/src/util/icons.d.ts +0 -4
- package/src/util/index.d.ts +0 -20
- package/src/util/join_collections.d.ts +0 -9
- package/src/util/make_properties_editable.d.ts +0 -3
- package/src/util/navigation_from_path.d.ts +0 -24
- package/src/util/navigation_utils.d.ts +0 -20
- package/src/util/objects.d.ts +0 -10
- package/src/util/parent_references_from_path.d.ts +0 -6
- package/src/util/paths.d.ts +0 -14
- package/src/util/permissions.d.ts +0 -5
- package/src/util/plurals.d.ts +0 -18
- package/src/util/property_utils.d.ts +0 -23
- package/src/util/references.d.ts +0 -2
- package/src/util/regexp.d.ts +0 -7
- package/src/util/resolutions.d.ts +0 -64
- package/src/util/storage.d.ts +0 -3
- package/src/util/strings.d.ts +0 -6
- package/src/util/useDebounce.d.ts +0 -1
- package/src/util/useStorageUploadController.d.ts +0 -36
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { AuthController, Entity, EntityCollection, Permissions, User } from "../types";
|
|
2
|
-
export declare function resolvePermissions<M extends Record<string, any>, UserType extends User>(collection: EntityCollection<M>, authController: AuthController<UserType>, pathSegments: string[], entity: Entity<M> | null): Permissions;
|
|
3
|
-
export declare function canEditEntity<M extends Record<string, any>, UserType extends User>(collection: EntityCollection<M>, authController: AuthController<UserType>, paths: string[], entity: Entity<M> | null): boolean;
|
|
4
|
-
export declare function canCreateEntity<M extends Record<string, any>, UserType extends User>(collection: EntityCollection<M>, authController: AuthController<UserType>, paths: string[], entity: Entity<M> | null): boolean;
|
|
5
|
-
export declare function canDeleteEntity<M extends Record<string, any>, UserType extends User>(collection: EntityCollection<M>, authController: AuthController<UserType>, paths: string[], entity: Entity<M> | null): boolean;
|
package/src/util/plurals.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns the plural of an English word.
|
|
3
|
-
*
|
|
4
|
-
* @export
|
|
5
|
-
* @param {string} word
|
|
6
|
-
* @param {number} [amount]
|
|
7
|
-
* @returns {string}
|
|
8
|
-
*/
|
|
9
|
-
export declare function plural(word: string, amount?: number): string;
|
|
10
|
-
/**
|
|
11
|
-
* Returns the singular of an English word.
|
|
12
|
-
*
|
|
13
|
-
* @export
|
|
14
|
-
* @param {string} word
|
|
15
|
-
* @param {number} [amount]
|
|
16
|
-
* @returns {string}
|
|
17
|
-
*/
|
|
18
|
-
export declare function singular(word: string, amount?: number): string;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { EntityCollection, PropertiesOrBuilders, PropertyConfig, PropertyOrBuilder, ResolvedProperty } from "../types";
|
|
3
|
-
export declare function isReferenceProperty(propertyOrBuilder: PropertyOrBuilder, fields: Record<string, PropertyConfig>): boolean | null;
|
|
4
|
-
export declare function getIdIcon(size: "small" | "medium" | "large"): React.ReactNode;
|
|
5
|
-
export declare function getIconForWidget(widget: PropertyConfig | undefined, size: "small" | "medium" | "large"): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export declare function getIconForProperty(property: PropertyOrBuilder | ResolvedProperty, size?: "small" | "medium" | "large", fields?: Record<string, PropertyConfig>): React.ReactNode;
|
|
7
|
-
export declare function getColorForProperty(property: PropertyOrBuilder, fields: Record<string, PropertyConfig>): string;
|
|
8
|
-
/**
|
|
9
|
-
* Get a property in a property tree from a path like
|
|
10
|
-
* `address.street`
|
|
11
|
-
* @param properties
|
|
12
|
-
* @param path
|
|
13
|
-
*/
|
|
14
|
-
export declare function getPropertyInPath<M extends Record<string, any>>(properties: PropertiesOrBuilders<M>, path: string): PropertyOrBuilder<any, M> | undefined;
|
|
15
|
-
export declare function getResolvedPropertyInPath(properties: Record<string, ResolvedProperty>, path: string): ResolvedProperty | undefined;
|
|
16
|
-
export declare function getBracketNotation(path: string): string;
|
|
17
|
-
/**
|
|
18
|
-
* Get properties exclusively indexed by their order
|
|
19
|
-
* @param properties
|
|
20
|
-
* @param propertiesOrder
|
|
21
|
-
*/
|
|
22
|
-
export declare function getPropertiesWithPropertiesOrder<M extends Record<string, any>>(properties: PropertiesOrBuilders<M>, propertiesOrder?: Extract<keyof M, string>[]): PropertiesOrBuilders<M>;
|
|
23
|
-
export declare function getDefaultPropertiesOrder(collection: EntityCollection<any>): string[];
|
package/src/util/references.d.ts
DELETED
package/src/util/regexp.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare function serializeRegExp(input: RegExp): string;
|
|
2
|
-
/**
|
|
3
|
-
* Get a RegExp out of a serialized string
|
|
4
|
-
* @param input
|
|
5
|
-
*/
|
|
6
|
-
export declare function hydrateRegExp(input?: string): RegExp | undefined;
|
|
7
|
-
export declare function isValidRegExp(input: string): boolean;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { ArrayProperty, CMSType, EntityCollection, EntityCustomView, EntityValues, EnumValueConfig, EnumValues, NumberProperty, PropertiesOrBuilders, PropertyConfig, PropertyOrBuilder, ResolvedArrayProperty, ResolvedEntityCollection, ResolvedNumberProperty, ResolvedProperties, ResolvedProperty, ResolvedStringProperty, StringProperty, UserConfigurationPersistence } from "../types";
|
|
2
|
-
export declare const resolveCollection: <M extends Record<string, any>>({ collection, path, entityId, values, previousValues, userConfigPersistence, fields }: {
|
|
3
|
-
collection: EntityCollection<M, import("../types").User> | ResolvedEntityCollection<M>;
|
|
4
|
-
path: string;
|
|
5
|
-
entityId?: string | undefined;
|
|
6
|
-
values?: Partial<M> | undefined;
|
|
7
|
-
previousValues?: Partial<M> | undefined;
|
|
8
|
-
userConfigPersistence?: UserConfigurationPersistence | undefined;
|
|
9
|
-
fields?: Record<string, PropertyConfig> | undefined;
|
|
10
|
-
}) => ResolvedEntityCollection<M>;
|
|
11
|
-
/**
|
|
12
|
-
* Resolve property builders, enums and arrays.
|
|
13
|
-
* @param propertyOrBuilder
|
|
14
|
-
* @param propertyValue
|
|
15
|
-
* @param values
|
|
16
|
-
*/
|
|
17
|
-
export declare function resolveProperty<T extends CMSType = CMSType, M extends Record<string, any> = any>({ propertyOrBuilder, propertyValue, fromBuilder, ...props }: {
|
|
18
|
-
propertyKey?: string;
|
|
19
|
-
propertyOrBuilder: PropertyOrBuilder<T, M> | ResolvedProperty<T>;
|
|
20
|
-
propertyValue?: unknown;
|
|
21
|
-
values?: Partial<M>;
|
|
22
|
-
previousValues?: Partial<M>;
|
|
23
|
-
path?: string;
|
|
24
|
-
entityId?: string;
|
|
25
|
-
index?: number;
|
|
26
|
-
fromBuilder?: boolean;
|
|
27
|
-
fields?: Record<string, PropertyConfig<any>>;
|
|
28
|
-
}): ResolvedProperty<T> | null;
|
|
29
|
-
export declare function resolveArrayProperty<T extends any[], M>({ propertyKey, property, propertyValue, ...props }: {
|
|
30
|
-
propertyKey?: string;
|
|
31
|
-
property: ArrayProperty<T> | ResolvedArrayProperty<T>;
|
|
32
|
-
propertyValue: any;
|
|
33
|
-
values?: Partial<M>;
|
|
34
|
-
previousValues?: Partial<M>;
|
|
35
|
-
path?: string;
|
|
36
|
-
entityId?: string;
|
|
37
|
-
index?: number;
|
|
38
|
-
fromBuilder?: boolean;
|
|
39
|
-
fields?: Record<string, PropertyConfig>;
|
|
40
|
-
}): ResolvedArrayProperty;
|
|
41
|
-
/**
|
|
42
|
-
* Resolve enums and arrays for properties
|
|
43
|
-
* @param properties
|
|
44
|
-
* @param value
|
|
45
|
-
*/
|
|
46
|
-
export declare function resolveProperties<M extends Record<string, any>>({ properties, propertyValue, ...props }: {
|
|
47
|
-
properties: PropertiesOrBuilders<M>;
|
|
48
|
-
propertyValue: unknown;
|
|
49
|
-
values?: Partial<M>;
|
|
50
|
-
previousValues?: Partial<M>;
|
|
51
|
-
path?: string;
|
|
52
|
-
entityId?: string;
|
|
53
|
-
index?: number;
|
|
54
|
-
fromBuilder?: boolean;
|
|
55
|
-
fields?: Record<string, PropertyConfig>;
|
|
56
|
-
}): ResolvedProperties<M>;
|
|
57
|
-
/**
|
|
58
|
-
* Resolve enum aliases for a string or number property
|
|
59
|
-
* @param property
|
|
60
|
-
* @param fromBuilder
|
|
61
|
-
*/
|
|
62
|
-
export declare function resolvePropertyEnum(property: StringProperty | NumberProperty, fromBuilder?: boolean): ResolvedStringProperty | ResolvedNumberProperty;
|
|
63
|
-
export declare function resolveEnumValues(input: EnumValues): EnumValueConfig[] | undefined;
|
|
64
|
-
export declare function resolveEntityView(entityView: string | EntityCustomView<any>, contextEntityViews?: EntityCustomView<any>[]): EntityCustomView<any> | undefined;
|
package/src/util/storage.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { EntityValues, ResolvedArrayProperty, ResolvedStringProperty, StorageConfig, UploadedFileContext } from "../types";
|
|
2
|
-
export declare function resolveFilenameString<M extends object>(input: string | ((context: UploadedFileContext) => Promise<string> | string), storage: StorageConfig, values: EntityValues<M>, entityId: string, path: string, property: ResolvedStringProperty | ResolvedArrayProperty<string[]>, file: File, propertyKey: string): Promise<string>;
|
|
3
|
-
export declare function resolveStoragePathString<M extends object>(input: string | ((context: UploadedFileContext) => string), storage: StorageConfig, values: EntityValues<M>, entityId: string, path: string, property: ResolvedStringProperty | ResolvedArrayProperty<string[]>, file: File, propertyKey: string): string;
|
package/src/util/strings.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const toKebabCase: (str: string) => string;
|
|
2
|
-
export declare const toSnakeCase: (str: string) => string;
|
|
3
|
-
export declare function randomString(strLength?: number): string;
|
|
4
|
-
export declare function randomColor(): string;
|
|
5
|
-
export declare function slugify(text?: string, separator?: string, lowercase?: boolean): string;
|
|
6
|
-
export declare function unslugify(slug: string): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useDebounce<T>(value: T, callback: () => void, immediate: boolean, timeoutMs?: number): void;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { EntityValues, ResolvedArrayProperty, ResolvedStringProperty, StorageConfig, StorageSource } from "../types";
|
|
2
|
-
import { PreviewSize } from "../preview";
|
|
3
|
-
/**
|
|
4
|
-
* Internal representation of an item in the storage
|
|
5
|
-
* It can have two states, having a storagePathOrDownloadUrl set,
|
|
6
|
-
* which means the file has been uploaded, and it is rendered as a preview
|
|
7
|
-
* Or have a pending file being uploaded.
|
|
8
|
-
*/
|
|
9
|
-
export interface StorageFieldItem {
|
|
10
|
-
id: number;
|
|
11
|
-
storagePathOrDownloadUrl?: string;
|
|
12
|
-
file?: File;
|
|
13
|
-
fileName?: string;
|
|
14
|
-
metadata?: any;
|
|
15
|
-
size: PreviewSize;
|
|
16
|
-
}
|
|
17
|
-
export declare function useStorageUploadController<M extends object>({ entityId, entityValues, path, value, property, propertyKey, storageSource, disabled, onChange }: {
|
|
18
|
-
entityId: string;
|
|
19
|
-
entityValues: EntityValues<M>;
|
|
20
|
-
value: string | string[] | null;
|
|
21
|
-
path: string;
|
|
22
|
-
propertyKey: string;
|
|
23
|
-
property: ResolvedStringProperty | ResolvedArrayProperty<string[]>;
|
|
24
|
-
storageSource: StorageSource;
|
|
25
|
-
disabled: boolean;
|
|
26
|
-
onChange: (value: string | string[] | null) => void;
|
|
27
|
-
}): {
|
|
28
|
-
internalValue: StorageFieldItem[];
|
|
29
|
-
setInternalValue: import("react").Dispatch<import("react").SetStateAction<StorageFieldItem[]>>;
|
|
30
|
-
storage: StorageConfig;
|
|
31
|
-
fileNameBuilder: (file: File) => Promise<string>;
|
|
32
|
-
storagePathBuilder: (file: File) => string;
|
|
33
|
-
onFileUploadComplete: (uploadedPath: string, entry: StorageFieldItem, metadata?: any) => Promise<void>;
|
|
34
|
-
onFilesAdded: (acceptedFiles: File[]) => Promise<void>;
|
|
35
|
-
multipleFilesSupported: boolean;
|
|
36
|
-
};
|