@firecms/core 3.0.0-beta.2 → 3.0.0-beta.4.pre.1

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 (157) hide show
  1. package/README.md +1 -1
  2. package/dist/components/EntityCollectionTable/EntityCollectionRowActions.d.ts +3 -7
  3. package/dist/components/EntityCollectionTable/EntityCollectionTable.d.ts +2 -2
  4. package/dist/components/EntityCollectionTable/PropertyTableCell.d.ts +2 -2
  5. package/dist/components/EntityCollectionView/EntityCollectionView.d.ts +1 -2
  6. package/dist/components/EntityCollectionView/useSelectionController.d.ts +2 -0
  7. package/dist/components/EntityPreview.d.ts +25 -7
  8. package/dist/components/EntityView.d.ts +11 -0
  9. package/dist/components/FieldCaption.d.ts +4 -0
  10. package/dist/components/HomePage/NavigationCard.d.ts +8 -0
  11. package/dist/components/HomePage/{NavigationCollectionCard.d.ts → NavigationCardBinding.d.ts} +2 -2
  12. package/dist/components/HomePage/SmallNavigationCard.d.ts +6 -0
  13. package/dist/components/HomePage/index.d.ts +3 -1
  14. package/dist/components/ReferenceWidget.d.ts +3 -3
  15. package/dist/components/VirtualTable/VirtualTableProps.d.ts +1 -1
  16. package/dist/components/index.d.ts +4 -3
  17. package/dist/{internal/EntityView.d.ts → core/EntityEditView.d.ts} +2 -2
  18. package/dist/core/SideEntityView.d.ts +7 -0
  19. package/dist/core/index.d.ts +0 -2
  20. package/dist/form/EntityForm.d.ts +1 -1
  21. package/dist/form/components/StorageItemPreview.d.ts +3 -2
  22. package/dist/form/components/StorageUploadProgress.d.ts +1 -1
  23. package/dist/form/components/index.d.ts +1 -0
  24. package/dist/form/field_bindings/KeyValueFieldBinding.d.ts +1 -1
  25. package/dist/form/field_bindings/MapFieldBinding.d.ts +1 -1
  26. package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +4 -3
  27. package/dist/form/field_bindings/TextFieldBinding.d.ts +2 -2
  28. package/dist/form/index.d.ts +1 -0
  29. package/dist/form/validation.d.ts +1 -1
  30. package/dist/hooks/data/useDataSource.d.ts +2 -2
  31. package/dist/hooks/index.d.ts +2 -1
  32. package/dist/{core → hooks}/useBuildModeController.d.ts +1 -1
  33. package/dist/hooks/useBuildNavigationController.d.ts +5 -2
  34. package/dist/hooks/useProjectLog.d.ts +5 -1
  35. package/dist/hooks/useStorageSource.d.ts +2 -2
  36. package/dist/index.es.js +8444 -8152
  37. package/dist/index.es.js.map +1 -1
  38. package/dist/index.umd.js +5 -5
  39. package/dist/index.umd.js.map +1 -1
  40. package/dist/internal/useBuildDataSource.d.ts +4 -0
  41. package/dist/internal/useRestoreScroll.d.ts +1 -1
  42. package/dist/preview/PropertyPreview.d.ts +1 -1
  43. package/dist/preview/components/BooleanPreview.d.ts +5 -1
  44. package/dist/preview/components/EnumValuesChip.d.ts +1 -1
  45. package/dist/preview/components/ReferencePreview.d.ts +1 -7
  46. package/dist/types/analytics.d.ts +1 -1
  47. package/dist/types/auth.d.ts +8 -1
  48. package/dist/types/collections.d.ts +14 -1
  49. package/dist/types/entities.d.ts +1 -0
  50. package/dist/types/entity_overrides.d.ts +6 -0
  51. package/dist/types/index.d.ts +1 -0
  52. package/dist/types/navigation.d.ts +10 -9
  53. package/dist/types/permissions.d.ts +5 -1
  54. package/dist/types/plugins.d.ts +15 -17
  55. package/dist/types/properties.d.ts +2 -2
  56. package/dist/types/property_config.d.ts +2 -2
  57. package/dist/util/collections.d.ts +9 -1
  58. package/dist/util/icons.d.ts +8 -2
  59. package/dist/util/index.d.ts +1 -0
  60. package/dist/util/permissions.d.ts +4 -4
  61. package/dist/util/references.d.ts +4 -2
  62. package/dist/util/resolutions.d.ts +1 -1
  63. package/package.json +31 -23
  64. package/src/components/DeleteEntityDialog.tsx +4 -4
  65. package/src/components/EntityCollectionTable/EntityCollectionRowActions.tsx +35 -39
  66. package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +276 -282
  67. package/src/components/EntityCollectionTable/EntityCollectionTableProps.tsx +1 -1
  68. package/src/components/EntityCollectionTable/PropertyTableCell.tsx +13 -13
  69. package/src/components/EntityCollectionTable/fields/TableReferenceField.tsx +9 -16
  70. package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +3 -3
  71. package/src/components/EntityCollectionTable/internal/CollectionTableToolbar.tsx +1 -1
  72. package/src/components/EntityCollectionTable/internal/default_entity_actions.tsx +9 -5
  73. package/src/components/EntityCollectionView/EntityCollectionView.tsx +37 -58
  74. package/src/components/EntityCollectionView/EntityCollectionViewActions.tsx +5 -6
  75. package/src/components/EntityCollectionView/useSelectionController.tsx +30 -0
  76. package/src/components/EntityPreview.tsx +204 -70
  77. package/src/components/EntityView.tsx +84 -0
  78. package/src/components/FieldCaption.tsx +13 -0
  79. package/src/components/FireCMSAppBar.tsx +8 -0
  80. package/src/components/HomePage/DefaultHomePage.tsx +13 -9
  81. package/src/components/HomePage/NavigationCard.tsx +69 -0
  82. package/src/components/HomePage/NavigationCardBinding.tsx +116 -0
  83. package/src/components/HomePage/SmallNavigationCard.tsx +45 -0
  84. package/src/components/HomePage/index.tsx +3 -1
  85. package/src/components/ReferenceTable/ReferenceSelectionTable.tsx +3 -4
  86. package/src/components/ReferenceWidget.tsx +7 -7
  87. package/src/components/SelectableTable/filters/ReferenceFilterField.tsx +11 -19
  88. package/src/components/VirtualTable/VirtualTableProps.tsx +1 -1
  89. package/src/components/common/useDataSourceEntityCollectionTableController.tsx +1 -1
  90. package/src/components/index.tsx +4 -3
  91. package/src/core/Drawer.tsx +66 -39
  92. package/src/{internal/EntityView.tsx → core/EntityEditView.tsx} +22 -39
  93. package/src/core/EntitySidePanel.tsx +2 -2
  94. package/src/core/FireCMS.tsx +18 -2
  95. package/src/core/NavigationRoutes.tsx +8 -0
  96. package/src/core/SideEntityView.tsx +38 -0
  97. package/src/core/index.tsx +0 -2
  98. package/src/form/EntityForm.tsx +19 -11
  99. package/src/form/components/StorageItemPreview.tsx +5 -3
  100. package/src/form/components/StorageUploadProgress.tsx +6 -5
  101. package/src/form/components/index.tsx +1 -0
  102. package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +2 -3
  103. package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +12 -15
  104. package/src/form/field_bindings/BlockFieldBinding.tsx +2 -3
  105. package/src/form/field_bindings/DateTimeFieldBinding.tsx +3 -3
  106. package/src/form/field_bindings/KeyValueFieldBinding.tsx +18 -18
  107. package/src/form/field_bindings/MapFieldBinding.tsx +17 -17
  108. package/src/form/field_bindings/MarkdownFieldBinding.tsx +1 -2
  109. package/src/form/field_bindings/MultiSelectBinding.tsx +2 -3
  110. package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +3 -3
  111. package/src/form/field_bindings/ReferenceFieldBinding.tsx +6 -4
  112. package/src/form/field_bindings/RepeatFieldBinding.tsx +3 -3
  113. package/src/form/field_bindings/SelectFieldBinding.tsx +2 -3
  114. package/src/form/field_bindings/StorageUploadFieldBinding.tsx +15 -6
  115. package/src/form/field_bindings/SwitchFieldBinding.tsx +2 -3
  116. package/src/form/field_bindings/TextFieldBinding.tsx +10 -9
  117. package/src/form/index.tsx +1 -0
  118. package/src/form/validation.ts +3 -4
  119. package/src/hooks/data/useCollectionFetch.tsx +1 -1
  120. package/src/hooks/data/useDataSource.tsx +8 -3
  121. package/src/hooks/data/useEntityFetch.tsx +1 -1
  122. package/src/hooks/index.tsx +3 -1
  123. package/src/{core → hooks}/useBuildModeController.tsx +1 -1
  124. package/src/hooks/useBuildNavigationController.tsx +105 -49
  125. package/src/hooks/useProjectLog.tsx +11 -3
  126. package/src/hooks/useReferenceDialog.tsx +2 -2
  127. package/src/hooks/useStorageSource.tsx +7 -2
  128. package/src/internal/useBuildDataSource.ts +7 -2
  129. package/src/preview/PropertyPreview.tsx +2 -2
  130. package/src/preview/components/BooleanPreview.tsx +16 -3
  131. package/src/preview/components/EnumValuesChip.tsx +1 -1
  132. package/src/preview/components/ReferencePreview.tsx +55 -147
  133. package/src/preview/property_previews/StringPropertyPreview.tsx +8 -7
  134. package/src/types/analytics.ts +1 -0
  135. package/src/types/auth.tsx +11 -1
  136. package/src/types/collections.ts +16 -1
  137. package/src/types/entities.ts +4 -0
  138. package/src/types/entity_actions.tsx +4 -0
  139. package/src/types/entity_overrides.tsx +7 -0
  140. package/src/types/firecms.tsx +0 -1
  141. package/src/types/index.ts +1 -0
  142. package/src/types/navigation.ts +11 -10
  143. package/src/types/permissions.ts +6 -1
  144. package/src/types/plugins.tsx +22 -25
  145. package/src/types/properties.ts +1 -1
  146. package/src/types/property_config.tsx +2 -2
  147. package/src/types/side_entity_controller.tsx +1 -0
  148. package/src/util/collections.ts +22 -0
  149. package/src/util/icons.tsx +11 -3
  150. package/src/util/index.ts +1 -0
  151. package/src/util/permissions.ts +11 -8
  152. package/src/util/references.ts +36 -5
  153. package/src/components/HomePage/NavigationCollectionCard.tsx +0 -146
  154. /package/dist/{components → form/components}/LabelWithIcon.d.ts +0 -0
  155. /package/dist/{core → hooks}/useBuildLocalConfigurationPersistence.d.ts +0 -0
  156. /package/src/{components → form/components}/LabelWithIcon.tsx +0 -0
  157. /package/src/{core → hooks}/useBuildLocalConfigurationPersistence.tsx +0 -0
@@ -1,5 +1,4 @@
1
1
  import React, { MouseEvent, useCallback } from "react";
2
- import equal from "react-fast-compare"
3
2
 
4
3
  import { CollectionSize, Entity, EntityAction, EntityCollection, SelectionController } from "../../types";
5
4
  import { Checkbox, cn, IconButton, Menu, MenuItem, MoreVertIcon, Skeleton, Tooltip, Typography } from "@firecms/ui";
@@ -14,46 +13,43 @@ import { useFireCMSContext, useLargeLayout } from "../../hooks";
14
13
  * @param selectionEnabled
15
14
  * @param size
16
15
  * @param toggleEntitySelection
17
- * @param onCopyClicked
18
- * @param onEditClicked
19
- * @param onDeleteClicked
20
16
  * @param hideId
21
17
  * @constructor
22
18
  *
23
19
  * @group Collection components
24
20
  */
25
- export const EntityCollectionRowActions = React.memo(function EntityCollectionRowActions({
26
- entity,
27
- collection,
28
- fullPath,
29
- width,
30
- frozen,
31
- isSelected,
32
- selectionEnabled,
33
- size,
34
- highlightEntity,
35
- onCollectionChange,
36
- unhighlightEntity,
37
- actions = [],
38
- hideId,
39
- selectionController,
40
- }:
41
- {
42
- entity: Entity<any>,
43
- collection?: EntityCollection<any>,
44
- fullPath?: string,
45
- width: number,
46
- frozen?: boolean,
47
- size: CollectionSize,
48
- isSelected?: boolean,
49
- selectionEnabled?: boolean,
50
- actions?: EntityAction[],
51
- hideId?: boolean,
52
- onCollectionChange?: () => void,
53
- selectionController?: SelectionController;
54
- highlightEntity?: (entity: Entity<any>) => void;
55
- unhighlightEntity?: (entity: Entity<any>) => void;
56
- }) {
21
+ export const EntityCollectionRowActions = function EntityCollectionRowActions({
22
+ entity,
23
+ collection,
24
+ fullPath,
25
+ width,
26
+ frozen,
27
+ isSelected,
28
+ selectionEnabled,
29
+ size,
30
+ highlightEntity,
31
+ onCollectionChange,
32
+ unhighlightEntity,
33
+ actions = [],
34
+ hideId,
35
+ selectionController,
36
+ }:
37
+ {
38
+ entity: Entity<any>,
39
+ collection?: EntityCollection<any>,
40
+ fullPath?: string,
41
+ width: number,
42
+ frozen?: boolean,
43
+ size: CollectionSize,
44
+ isSelected?: boolean,
45
+ selectionEnabled?: boolean,
46
+ actions?: EntityAction[],
47
+ hideId?: boolean,
48
+ onCollectionChange?: () => void,
49
+ selectionController?: SelectionController;
50
+ highlightEntity?: (entity: Entity<any>) => void;
51
+ unhighlightEntity?: (entity: Entity<any>) => void;
52
+ }) {
57
53
 
58
54
  const largeLayout = useLargeLayout();
59
55
 
@@ -103,7 +99,7 @@ export const EntityCollectionRowActions = React.memo(function EntityCollectionRo
103
99
  selectionController,
104
100
  highlightEntity,
105
101
  unhighlightEntity,
106
- onCollectionChange
102
+ onCollectionChange,
107
103
  });
108
104
  }}
109
105
  size={largeLayout ? "medium" : "small"}>
@@ -131,7 +127,7 @@ export const EntityCollectionRowActions = React.memo(function EntityCollectionRo
131
127
  selectionController,
132
128
  highlightEntity,
133
129
  unhighlightEntity,
134
- onCollectionChange
130
+ onCollectionChange,
135
131
  });
136
132
  }}>
137
133
  {action.icon}
@@ -171,4 +167,4 @@ export const EntityCollectionRowActions = React.memo(function EntityCollectionRo
171
167
  </div>
172
168
  );
173
169
 
174
- }, equal);
170
+ };