@firecms/core 3.0.0-alpha.71 → 3.0.0-alpha.73

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.
Files changed (268) hide show
  1. package/dist/components/EntityCollectionTable/EntityCollectionTable.d.ts +5 -5
  2. package/dist/components/EntityCollectionTable/EntityCollectionTableProps.d.ts +1 -1
  3. package/dist/components/EntityCollectionTable/index.d.ts +1 -1
  4. package/dist/components/EntityCollectionTable/types.d.ts +15 -1
  5. package/dist/components/EntityCollectionTable/useDataSourceEntityCollectionTableController.d.ts +32 -0
  6. package/dist/components/SearchIconsView.d.ts +5 -0
  7. package/dist/components/index.d.ts +1 -0
  8. package/dist/hooks/useVerifyLicense.d.ts +0 -0
  9. package/dist/index.es.js +8808 -6804
  10. package/dist/index.es.js.map +1 -1
  11. package/dist/index.umd.js +5 -5
  12. package/dist/index.umd.js.map +1 -1
  13. package/dist/util/icon_list.d.ts +1 -0
  14. package/dist/util/icon_synonyms.d.ts +1950 -0
  15. package/dist/util/index.d.ts +2 -0
  16. package/package.json +3 -5
  17. package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +5 -6
  18. package/src/components/EntityCollectionTable/EntityCollectionTableProps.tsx +1 -1
  19. package/src/components/EntityCollectionTable/index.tsx +1 -1
  20. package/src/components/EntityCollectionTable/internal/CollectionTableToolbar.tsx +2 -2
  21. package/src/components/EntityCollectionTable/types.tsx +15 -1
  22. package/src/components/EntityCollectionTable/{useEntityCollectionTableController.tsx → useDataSourceEntityCollectionTableController.tsx} +16 -4
  23. package/src/components/EntityCollectionView/EntityCollectionView.tsx +2 -2
  24. package/src/components/ReferenceSelectionInner.tsx +2 -2
  25. package/src/components/SearchIconsView.tsx +75 -0
  26. package/src/components/VirtualTable/VirtualTableRow.tsx +0 -1
  27. package/src/components/index.tsx +1 -0
  28. package/src/core/EntitySidePanel.tsx +0 -1
  29. package/src/form/EntityForm.tsx +6 -5
  30. package/src/form/PropertyFieldBinding.tsx +1 -1
  31. package/src/form/validation.ts +5 -1
  32. package/src/hooks/useVerifyLicense.tsx +1 -0
  33. package/src/internal/EntityView.tsx +6 -6
  34. package/src/internal/useBuildDataSource.ts +0 -2
  35. package/src/internal/useBuildSideEntityController.tsx +26 -15
  36. package/src/preview/property_previews/MapPropertyPreview.tsx +3 -1
  37. package/src/preview/property_previews/StringPropertyPreview.tsx +1 -2
  38. package/src/util/enums.ts +1 -2
  39. package/src/util/icon_list.ts +17 -0
  40. package/src/util/icon_synonyms.ts +1950 -0
  41. package/src/util/index.ts +2 -0
  42. package/dist/components/EntityCollectionTable/useEntityCollectionTableController.d.ts +0 -21
  43. package/dist/util/chip_utils.d.ts +0 -3
  44. package/src/components/ArrayContainer.d.ts +0 -42
  45. package/src/components/CircularProgressCenter.d.ts +0 -11
  46. package/src/components/DeleteConfirmationDialog.d.ts +0 -9
  47. package/src/components/EntityCollectionTable/EntityCollectionTable.d.ts +0 -30
  48. package/src/components/EntityCollectionTable/EntityCollectionTableProps.d.ts +0 -106
  49. package/src/components/EntityCollectionTable/fields/TableReferenceField.d.ts +0 -15
  50. package/src/components/EntityCollectionTable/fields/TableStorageUpload.d.ts +0 -33
  51. package/src/components/EntityCollectionTable/filters/BooleanFilterField.d.ts +0 -9
  52. package/src/components/EntityCollectionTable/filters/DateTimeFilterField.d.ts +0 -11
  53. package/src/components/EntityCollectionTable/filters/ReferenceFilterField.d.ts +0 -14
  54. package/src/components/EntityCollectionTable/filters/StringNumberFilterField.d.ts +0 -13
  55. package/src/components/EntityCollectionTable/index.d.ts +0 -4
  56. package/src/components/EntityCollectionTable/internal/CollectionTableToolbar.d.ts +0 -18
  57. package/src/components/EntityCollectionTable/internal/DeleteEntityDialog.d.ts +0 -12
  58. package/src/components/EntityCollectionTable/internal/EntityCollectionRowActions.d.ts +0 -35
  59. package/src/components/EntityCollectionTable/internal/EntityTableCell.d.ts +0 -26
  60. package/src/components/EntityCollectionTable/internal/EntityTableCellActions.d.ts +0 -9
  61. package/src/components/EntityCollectionTable/internal/PropertyTableCell.d.ts +0 -18
  62. package/src/components/EntityCollectionTable/internal/common.d.ts +0 -4
  63. package/src/components/EntityCollectionTable/internal/default_entity_actions.d.ts +0 -6
  64. package/src/components/EntityCollectionTable/internal/popup_field/ElementResizeListener.d.ts +0 -5
  65. package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.d.ts +0 -23
  66. package/src/components/EntityCollectionTable/internal/popup_field/useDraggable.d.ts +0 -13
  67. package/src/components/EntityCollectionTable/internal/popup_field/useWindowSize.d.ts +0 -6
  68. package/src/components/EntityCollectionTable/types.d.ts +0 -39
  69. package/src/components/EntityCollectionTable/useDebouncedData.d.ts +0 -9
  70. package/src/components/EntityCollectionTable/useEntityCollectionTableController.d.ts +0 -21
  71. package/src/components/EntityCollectionView/EntityCollectionView.d.ts +0 -37
  72. package/src/components/EntityCollectionView/EntityCollectionViewActions.d.ts +0 -14
  73. package/src/components/EntityCollectionView/useColumnsIds.d.ts +0 -4
  74. package/src/components/EntityPreview.d.ts +0 -11
  75. package/src/components/ErrorBoundary.d.ts +0 -11
  76. package/src/components/ErrorTooltip.d.ts +0 -2
  77. package/src/components/ErrorView.d.ts +0 -19
  78. package/src/components/FieldConfigBadge.d.ts +0 -4
  79. package/src/components/FireCMSAppBar.d.ts +0 -26
  80. package/src/components/FireCMSLogo.d.ts +0 -7
  81. package/src/components/HomePage/DefaultHomePage.d.ts +0 -21
  82. package/src/components/HomePage/FavouritesView.d.ts +0 -3
  83. package/src/components/HomePage/NavigationCollectionCard.d.ts +0 -17
  84. package/src/components/HomePage/NavigationGroup.d.ts +0 -4
  85. package/src/components/HomePage/index.d.ts +0 -3
  86. package/src/components/LabelWithIcon.d.ts +0 -14
  87. package/src/components/NotFoundPage.d.ts +0 -1
  88. package/src/components/ReferenceSelectionInner.d.ts +0 -58
  89. package/src/components/ReferenceWidget.d.ts +0 -28
  90. package/src/components/VirtualTable/VirtualTable.d.ts +0 -11
  91. package/src/components/VirtualTable/VirtualTableCell.d.ts +0 -14
  92. package/src/components/VirtualTable/VirtualTableHeader.d.ts +0 -27
  93. package/src/components/VirtualTable/VirtualTableHeaderRow.d.ts +0 -2
  94. package/src/components/VirtualTable/VirtualTableProps.d.ts +0 -215
  95. package/src/components/VirtualTable/VirtualTableRow.d.ts +0 -3
  96. package/src/components/VirtualTable/common.d.ts +0 -2
  97. package/src/components/VirtualTable/fields/VirtualTableDateField.d.ts +0 -11
  98. package/src/components/VirtualTable/fields/VirtualTableInput.d.ts +0 -8
  99. package/src/components/VirtualTable/fields/VirtualTableNumberInput.d.ts +0 -8
  100. package/src/components/VirtualTable/fields/VirtualTableSelect.d.ts +0 -15
  101. package/src/components/VirtualTable/fields/VirtualTableSwitch.d.ts +0 -7
  102. package/src/components/VirtualTable/index.d.ts +0 -2
  103. package/src/components/VirtualTable/types.d.ts +0 -34
  104. package/src/components/index.d.ts +0 -20
  105. package/src/contexts/AuthControllerContext.d.ts +0 -3
  106. package/src/contexts/DataSourceContext.d.ts +0 -3
  107. package/src/contexts/DialogsProvider.d.ts +0 -4
  108. package/src/contexts/ModeController.d.ts +0 -4
  109. package/src/contexts/NavigationContext.d.ts +0 -3
  110. package/src/contexts/SideDialogsControllerContext.d.ts +0 -3
  111. package/src/contexts/SideEntityControllerContext.d.ts +0 -3
  112. package/src/contexts/SnackbarProvider.d.ts +0 -2
  113. package/src/contexts/StorageSourceContext.d.ts +0 -3
  114. package/src/contexts/UserConfigurationPersistenceContext.d.ts +0 -3
  115. package/src/contexts/index.d.ts +0 -3
  116. package/src/core/Drawer.d.ts +0 -23
  117. package/src/core/EntitySidePanel.d.ts +0 -10
  118. package/src/core/FireCMS.d.ts +0 -14
  119. package/src/core/NavigationRoutes.d.ts +0 -21
  120. package/src/core/Scaffold.d.ts +0 -52
  121. package/src/core/SideDialogs.d.ts +0 -23
  122. package/src/core/field_configs.d.ts +0 -7
  123. package/src/core/index.d.ts +0 -10
  124. package/src/core/useBuildLocalConfigurationPersistence.d.ts +0 -2
  125. package/src/core/useBuildModeController.d.ts +0 -6
  126. package/src/form/EntityForm.d.ts +0 -75
  127. package/src/form/PropertyFieldBinding.d.ts +0 -30
  128. package/src/form/components/CustomIdField.d.ts +0 -9
  129. package/src/form/components/ErrorFocus.d.ts +0 -4
  130. package/src/form/components/FieldHelperText.d.ts +0 -12
  131. package/src/form/components/FormikArrayContainer.d.ts +0 -18
  132. package/src/form/components/StorageItemPreview.d.ts +0 -13
  133. package/src/form/components/StorageUploadProgress.d.ts +0 -10
  134. package/src/form/components/SwitchControl.d.ts +0 -8
  135. package/src/form/components/index.d.ts +0 -3
  136. package/src/form/field_bindings/ArrayCustomShapedFieldBinding.d.ts +0 -9
  137. package/src/form/field_bindings/ArrayOfReferencesFieldBinding.d.ts +0 -11
  138. package/src/form/field_bindings/BlockFieldBinding.d.ts +0 -10
  139. package/src/form/field_bindings/DateTimeFieldBinding.d.ts +0 -11
  140. package/src/form/field_bindings/KeyValueFieldBinding.d.ts +0 -7
  141. package/src/form/field_bindings/MapFieldBinding.d.ts +0 -9
  142. package/src/form/field_bindings/MarkdownFieldBinding.d.ts +0 -9
  143. package/src/form/field_bindings/MultiSelectBinding.d.ts +0 -9
  144. package/src/form/field_bindings/ReadOnlyFieldBinding.d.ts +0 -10
  145. package/src/form/field_bindings/ReferenceFieldBinding.d.ts +0 -9
  146. package/src/form/field_bindings/RepeatFieldBinding.d.ts +0 -10
  147. package/src/form/field_bindings/SelectFieldBinding.d.ts +0 -12
  148. package/src/form/field_bindings/StorageUploadFieldBinding.d.ts +0 -28
  149. package/src/form/field_bindings/SwitchFieldBinding.d.ts +0 -12
  150. package/src/form/field_bindings/TextFieldBinding.d.ts +0 -12
  151. package/src/form/index.d.ts +0 -20
  152. package/src/form/useClearRestoreValue.d.ts +0 -13
  153. package/src/form/validation.d.ts +0 -25
  154. package/src/hooks/data/delete.d.ts +0 -37
  155. package/src/hooks/data/save.d.ts +0 -42
  156. package/src/hooks/data/useCollectionFetch.d.ts +0 -50
  157. package/src/hooks/data/useDataOrder.d.ts +0 -12
  158. package/src/hooks/data/useDataSource.d.ts +0 -6
  159. package/src/hooks/data/useEntityFetch.d.ts +0 -28
  160. package/src/hooks/index.d.ts +0 -19
  161. package/src/hooks/useAuthController.d.ts +0 -11
  162. package/src/hooks/useBrowserTitleAndIcon.d.ts +0 -6
  163. package/src/hooks/useClipboard.d.ts +0 -57
  164. package/src/hooks/useDialogsController.d.ts +0 -11
  165. package/src/hooks/useFireCMSContext.d.ts +0 -12
  166. package/src/hooks/useLargeLayout.d.ts +0 -1
  167. package/src/hooks/useModeController.d.ts +0 -20
  168. package/src/hooks/useNavigationController.d.ts +0 -9
  169. package/src/hooks/useReferenceDialog.d.ts +0 -18
  170. package/src/hooks/useResolvedNavigationFrom.d.ts +0 -72
  171. package/src/hooks/useSideDialogsController.d.ts +0 -18
  172. package/src/hooks/useSideEntityController.d.ts +0 -12
  173. package/src/hooks/useSnackbarController.d.ts +0 -41
  174. package/src/hooks/useStorageSource.d.ts +0 -6
  175. package/src/hooks/useUserConfigurationPersistence.d.ts +0 -8
  176. package/src/index.d.ts +0 -8
  177. package/src/internal/EntityView.d.ts +0 -22
  178. package/src/internal/common.d.ts +0 -3
  179. package/src/internal/useBuildDataSource.d.ts +0 -22
  180. package/src/internal/useBuildNavigationController.d.ts +0 -14
  181. package/src/internal/useBuildSideDialogsController.d.ts +0 -2
  182. package/src/internal/useBuildSideEntityController.d.ts +0 -4
  183. package/src/internal/useLocaleConfig.d.ts +0 -1
  184. package/src/internal/useRestoreScroll.d.ts +0 -6
  185. package/src/internal/useUnsavedChangesDialog.d.ts +0 -14
  186. package/src/preview/PropertyPreview.d.ts +0 -7
  187. package/src/preview/PropertyPreviewProps.d.ts +0 -43
  188. package/src/preview/components/ArrayEnumPreview.d.ts +0 -11
  189. package/src/preview/components/AsyncPreviewComponent.d.ts +0 -11
  190. package/src/preview/components/BooleanPreview.d.ts +0 -7
  191. package/src/preview/components/DatePreview.d.ts +0 -7
  192. package/src/preview/components/EmptyValue.d.ts +0 -4
  193. package/src/preview/components/EnumValuesChip.d.ts +0 -13
  194. package/src/preview/components/ImagePreview.d.ts +0 -12
  195. package/src/preview/components/ReferencePreview.d.ts +0 -22
  196. package/src/preview/components/StorageThumbnail.d.ts +0 -13
  197. package/src/preview/components/UrlComponentPreview.d.ts +0 -12
  198. package/src/preview/index.d.ts +0 -23
  199. package/src/preview/property_previews/ArrayOfMapsPreview.d.ts +0 -5
  200. package/src/preview/property_previews/ArrayOfReferencesPreview.d.ts +0 -5
  201. package/src/preview/property_previews/ArrayOfStorageComponentsPreview.d.ts +0 -5
  202. package/src/preview/property_previews/ArrayOfStringsPreview.d.ts +0 -5
  203. package/src/preview/property_previews/ArrayOneOfPreview.d.ts +0 -5
  204. package/src/preview/property_previews/ArrayPropertyEnumPreview.d.ts +0 -5
  205. package/src/preview/property_previews/ArrayPropertyPreview.d.ts +0 -5
  206. package/src/preview/property_previews/MapPropertyPreview.d.ts +0 -8
  207. package/src/preview/property_previews/NumberPropertyPreview.d.ts +0 -6
  208. package/src/preview/property_previews/SkeletonPropertyComponent.d.ts +0 -14
  209. package/src/preview/property_previews/StringPropertyPreview.d.ts +0 -6
  210. package/src/preview/util.d.ts +0 -7
  211. package/src/types/analytics.d.ts +0 -1
  212. package/src/types/appcheck.d.ts +0 -26
  213. package/src/types/auth.d.ts +0 -40
  214. package/src/types/collections.d.ts +0 -451
  215. package/src/types/datasource.d.ts +0 -262
  216. package/src/types/dialogs_controller.d.ts +0 -32
  217. package/src/types/entities.d.ts +0 -57
  218. package/src/types/entity_actions.d.ts +0 -35
  219. package/src/types/entity_callbacks.d.ts +0 -171
  220. package/src/types/entity_link_builder.d.ts +0 -7
  221. package/src/types/export_import.d.ts +0 -21
  222. package/src/types/fields.d.ts +0 -181
  223. package/src/types/firecms.d.ts +0 -151
  224. package/src/types/firecms_context.d.ts +0 -110
  225. package/src/types/index.d.ts +0 -26
  226. package/src/types/local_config_persistence.d.ts +0 -21
  227. package/src/types/locales.d.ts +0 -4
  228. package/src/types/modify_collections.d.ts +0 -5
  229. package/src/types/navigation.d.ts +0 -178
  230. package/src/types/permissions.d.ts +0 -63
  231. package/src/types/plugins.d.ts +0 -179
  232. package/src/types/properties.d.ts +0 -681
  233. package/src/types/property_config.d.ts +0 -42
  234. package/src/types/resolved_entities.d.ts +0 -98
  235. package/src/types/side_dialogs_controller.d.ts +0 -57
  236. package/src/types/side_entity_controller.d.ts +0 -83
  237. package/src/types/storage.d.ts +0 -82
  238. package/src/types/user.d.ts +0 -36
  239. package/src/util/arrays.d.ts +0 -1
  240. package/src/util/builders.d.ts +0 -64
  241. package/src/util/chip_utils.d.ts +0 -3
  242. package/src/util/chip_utils.ts +0 -13
  243. package/src/util/collections.d.ts +0 -3
  244. package/src/util/common.d.ts +0 -2
  245. package/src/util/dates.d.ts +0 -1
  246. package/src/util/entities.d.ts +0 -28
  247. package/src/util/enums.d.ts +0 -7
  248. package/src/util/flatten_object.d.ts +0 -3
  249. package/src/util/hash.d.ts +0 -1
  250. package/src/util/icons.d.ts +0 -4
  251. package/src/util/index.d.ts +0 -20
  252. package/src/util/join_collections.d.ts +0 -9
  253. package/src/util/make_properties_editable.d.ts +0 -3
  254. package/src/util/navigation_from_path.d.ts +0 -24
  255. package/src/util/navigation_utils.d.ts +0 -20
  256. package/src/util/objects.d.ts +0 -10
  257. package/src/util/parent_references_from_path.d.ts +0 -6
  258. package/src/util/paths.d.ts +0 -14
  259. package/src/util/permissions.d.ts +0 -5
  260. package/src/util/plurals.d.ts +0 -18
  261. package/src/util/property_utils.d.ts +0 -23
  262. package/src/util/references.d.ts +0 -2
  263. package/src/util/regexp.d.ts +0 -7
  264. package/src/util/resolutions.d.ts +0 -64
  265. package/src/util/storage.d.ts +0 -3
  266. package/src/util/strings.d.ts +0 -6
  267. package/src/util/useDebounce.d.ts +0 -1
  268. package/src/util/useStorageUploadController.d.ts +0 -36
@@ -1,14 +0,0 @@
1
- export declare const COLLECTION_PATH_SEPARATOR = "::";
2
- /**
3
- * Remove the entity ids from a given path
4
- * `products/B44RG6APH/locales` => `products::locales`
5
- * @param path
6
- */
7
- export declare function stripCollectionPath(path: string): string;
8
- export declare function segmentsToStrippedPath(paths: string[]): string;
9
- /**
10
- * Extract the collection path routes
11
- * `products/B44RG6APH/locales` => [`products`, `locales`]
12
- * @param path
13
- */
14
- export declare function fullPathToCollectionSegments(path: string): string[];
@@ -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;
@@ -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[];
@@ -1,2 +0,0 @@
1
- import { EntityCollection, PropertyConfig } from "../types";
2
- export declare function getReferencePreviewKeys(targetCollection: EntityCollection<any>, fields: Record<string, PropertyConfig>, previewProperties?: string[], limit?: number): string[];
@@ -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;
@@ -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;
@@ -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
- };