@firecms/core 3.0.0-canary.16 → 3.0.0-canary.160

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 (329) hide show
  1. package/README.md +3 -3
  2. package/dist/app/AppBar.d.ts +12 -0
  3. package/dist/app/Drawer.d.ts +16 -0
  4. package/dist/app/Scaffold.d.ts +30 -0
  5. package/dist/app/index.d.ts +4 -0
  6. package/dist/app/useApp.d.ts +16 -0
  7. package/dist/components/ArrayContainer.d.ts +19 -6
  8. package/dist/components/CircularProgressCenter.d.ts +1 -1
  9. package/dist/components/ClearFilterSortButton.d.ts +5 -0
  10. package/dist/components/{DeleteConfirmationDialog.d.ts → ConfirmationDialog.d.ts} +1 -1
  11. package/dist/components/EntityCollectionTable/EntityCollectionRowActions.d.ts +11 -12
  12. package/dist/components/EntityCollectionTable/EntityCollectionTable.d.ts +1 -1
  13. package/dist/components/EntityCollectionTable/EntityCollectionTableProps.d.ts +7 -5
  14. package/dist/components/EntityCollectionTable/PropertyTableCell.d.ts +1 -0
  15. package/dist/components/EntityCollectionTable/column_utils.d.ts +1 -2
  16. package/dist/components/EntityCollectionTable/fields/TableReferenceField.d.ts +3 -1
  17. package/dist/components/EntityCollectionTable/internal/CollectionTableToolbar.d.ts +1 -4
  18. package/dist/components/EntityCollectionTable/internal/EntityTableCell.d.ts +2 -2
  19. package/dist/components/EntityCollectionTable/internal/popup_field/PopupFormField.d.ts +7 -4
  20. package/dist/components/EntityCollectionView/EntityCollectionView.d.ts +12 -2
  21. package/dist/components/EntityCollectionView/EntityCollectionViewStartActions.d.ts +11 -0
  22. package/dist/components/EntityCollectionView/utils.d.ts +3 -0
  23. package/dist/components/EntityPreview.d.ts +7 -6
  24. package/dist/components/ErrorView.d.ts +1 -1
  25. package/dist/components/HomePage/DefaultHomePage.d.ts +1 -1
  26. package/dist/components/HomePage/NavigationCardBinding.d.ts +1 -1
  27. package/dist/components/PropertyConfigBadge.d.ts +2 -1
  28. package/dist/components/PropertyIdCopyTooltip.d.ts +8 -0
  29. package/dist/components/ReferenceWidget.d.ts +3 -1
  30. package/dist/components/SelectableTable/SelectableTable.d.ts +1 -1
  31. package/dist/components/SelectableTable/filters/ReferenceFilterField.d.ts +2 -1
  32. package/dist/components/VirtualTable/VirtualTableProps.d.ts +15 -12
  33. package/dist/components/VirtualTable/types.d.ts +3 -3
  34. package/dist/components/{EntityCollectionTable/internal → common}/default_entity_actions.d.ts +1 -1
  35. package/dist/components/common/index.d.ts +1 -0
  36. package/dist/components/common/table_height.d.ts +5 -0
  37. package/dist/components/common/types.d.ts +4 -6
  38. package/dist/components/common/useColumnsIds.d.ts +2 -1
  39. package/dist/components/common/useDataSourceEntityCollectionTableController.d.ts +4 -1
  40. package/dist/components/index.d.ts +4 -2
  41. package/dist/{components/FireCMSAppBar.d.ts → core/DefaultAppBar.d.ts} +6 -9
  42. package/dist/core/DefaultDrawer.d.ts +19 -0
  43. package/dist/core/DrawerNavigationItem.d.ts +10 -0
  44. package/dist/core/EntityEditView.d.ts +18 -4
  45. package/dist/core/FireCMS.d.ts +2 -2
  46. package/dist/core/NavigationRoutes.d.ts +3 -3
  47. package/dist/core/index.d.ts +3 -4
  48. package/dist/form/PropertyFieldBinding.d.ts +1 -1
  49. package/dist/form/components/ErrorFocus.d.ts +1 -1
  50. package/dist/form/components/FieldHelperText.d.ts +3 -3
  51. package/dist/form/components/LabelWithIcon.d.ts +1 -1
  52. package/dist/form/components/LabelWithIconAndTooltip.d.ts +15 -0
  53. package/dist/form/components/StorageItemPreview.d.ts +4 -4
  54. package/dist/form/components/index.d.ts +1 -1
  55. package/dist/form/field_bindings/ArrayCustomShapedFieldBinding.d.ts +1 -1
  56. package/dist/form/field_bindings/ArrayOfReferencesFieldBinding.d.ts +1 -1
  57. package/dist/form/field_bindings/BlockFieldBinding.d.ts +1 -1
  58. package/dist/form/field_bindings/KeyValueFieldBinding.d.ts +1 -1
  59. package/dist/form/field_bindings/MapFieldBinding.d.ts +1 -1
  60. package/dist/form/field_bindings/MarkdownEditorFieldBinding.d.ts +11 -0
  61. package/dist/form/field_bindings/{MultiSelectBinding.d.ts → MultiSelectFieldBinding.d.ts} +1 -1
  62. package/dist/form/field_bindings/ReadOnlyFieldBinding.d.ts +1 -1
  63. package/dist/form/field_bindings/ReferenceFieldBinding.d.ts +2 -2
  64. package/dist/form/field_bindings/RepeatFieldBinding.d.ts +1 -1
  65. package/dist/form/field_bindings/SelectFieldBinding.d.ts +1 -1
  66. package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +3 -5
  67. package/dist/form/field_bindings/SwitchFieldBinding.d.ts +1 -2
  68. package/dist/form/field_bindings/TextFieldBinding.d.ts +1 -1
  69. package/dist/form/index.d.ts +3 -5
  70. package/dist/form/useClearRestoreValue.d.ts +2 -2
  71. package/dist/hooks/data/delete.d.ts +4 -4
  72. package/dist/hooks/data/save.d.ts +4 -5
  73. package/dist/hooks/data/useCollectionFetch.d.ts +1 -1
  74. package/dist/hooks/data/useEntityFetch.d.ts +3 -3
  75. package/dist/hooks/index.d.ts +1 -0
  76. package/dist/hooks/useAuthController.d.ts +1 -1
  77. package/dist/hooks/useBuildNavigationController.d.ts +3 -4
  78. package/dist/hooks/useFireCMSContext.d.ts +1 -1
  79. package/dist/hooks/useProjectLog.d.ts +8 -2
  80. package/dist/hooks/useResolvedNavigationFrom.d.ts +3 -3
  81. package/dist/hooks/useValidateAuthenticator.d.ts +5 -9
  82. package/dist/index.d.ts +1 -0
  83. package/dist/index.es.js +20202 -14110
  84. package/dist/index.es.js.map +1 -1
  85. package/dist/index.umd.js +22773 -588
  86. package/dist/index.umd.js.map +1 -1
  87. package/dist/internal/useBuildDataSource.d.ts +1 -16
  88. package/dist/preview/PropertyPreviewProps.d.ts +6 -1
  89. package/dist/preview/components/EnumValuesChip.d.ts +1 -1
  90. package/dist/preview/components/ReferencePreview.d.ts +3 -2
  91. package/dist/preview/components/StorageThumbnail.d.ts +2 -1
  92. package/dist/preview/components/UrlComponentPreview.d.ts +2 -1
  93. package/dist/preview/util.d.ts +3 -3
  94. package/dist/types/auth.d.ts +8 -10
  95. package/dist/types/collections.d.ts +53 -18
  96. package/dist/types/datasource.d.ts +51 -35
  97. package/dist/types/entities.d.ts +6 -1
  98. package/dist/types/entity_actions.d.ts +18 -4
  99. package/dist/types/entity_callbacks.d.ts +16 -16
  100. package/dist/types/entity_overrides.d.ts +2 -2
  101. package/dist/types/export_import.d.ts +4 -4
  102. package/dist/types/fields.d.ts +63 -41
  103. package/dist/types/firecms.d.ts +6 -2
  104. package/dist/types/firecms_context.d.ts +1 -1
  105. package/dist/types/index.d.ts +0 -1
  106. package/dist/types/navigation.d.ts +6 -5
  107. package/dist/types/permissions.d.ts +4 -4
  108. package/dist/types/plugins.d.ts +22 -12
  109. package/dist/types/properties.d.ts +34 -21
  110. package/dist/types/property_config.d.ts +0 -2
  111. package/dist/types/side_dialogs_controller.d.ts +10 -0
  112. package/dist/types/storage.d.ts +86 -3
  113. package/dist/types/user.d.ts +1 -0
  114. package/dist/util/builders.d.ts +2 -2
  115. package/dist/util/entities.d.ts +2 -2
  116. package/dist/util/icon_list.d.ts +5 -1
  117. package/dist/util/icon_synonyms.d.ts +1 -97
  118. package/dist/util/icons.d.ts +6 -3
  119. package/dist/util/index.d.ts +1 -0
  120. package/dist/util/navigation_utils.d.ts +2 -2
  121. package/dist/util/objects.d.ts +2 -1
  122. package/dist/util/permissions.d.ts +4 -4
  123. package/dist/util/plurals.d.ts +0 -2
  124. package/dist/util/property_utils.d.ts +3 -3
  125. package/dist/util/resolutions.d.ts +30 -16
  126. package/dist/util/storage.d.ts +23 -2
  127. package/dist/util/useStorageUploadController.d.ts +3 -3
  128. package/package.json +59 -44
  129. package/src/app/AppBar.tsx +18 -0
  130. package/src/app/Drawer.tsx +24 -0
  131. package/src/app/Scaffold.tsx +243 -0
  132. package/src/app/index.ts +4 -0
  133. package/src/app/useApp.tsx +32 -0
  134. package/src/components/ArrayContainer.tsx +92 -25
  135. package/src/components/CircularProgressCenter.tsx +2 -2
  136. package/src/components/ClearFilterSortButton.tsx +41 -0
  137. package/src/components/{DeleteConfirmationDialog.tsx → ConfirmationDialog.tsx} +3 -3
  138. package/src/components/DeleteEntityDialog.tsx +9 -18
  139. package/src/components/EntityCollectionTable/EntityCollectionRowActions.tsx +13 -20
  140. package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +28 -25
  141. package/src/components/EntityCollectionTable/EntityCollectionTableProps.tsx +12 -8
  142. package/src/components/EntityCollectionTable/PropertyTableCell.tsx +47 -39
  143. package/src/components/EntityCollectionTable/column_utils.tsx +3 -3
  144. package/src/components/EntityCollectionTable/fields/TableReferenceField.tsx +31 -17
  145. package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +16 -8
  146. package/src/components/EntityCollectionTable/internal/CollectionTableToolbar.tsx +30 -35
  147. package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +36 -34
  148. package/src/components/EntityCollectionTable/internal/EntityTableCellActions.tsx +19 -7
  149. package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +82 -75
  150. package/src/components/EntityCollectionView/EntityCollectionView.tsx +139 -87
  151. package/src/components/EntityCollectionView/EntityCollectionViewStartActions.tsx +68 -0
  152. package/src/components/EntityCollectionView/useSelectionController.tsx +19 -7
  153. package/src/components/EntityCollectionView/utils.ts +19 -0
  154. package/src/components/EntityPreview.tsx +55 -51
  155. package/src/components/EntityView.tsx +10 -10
  156. package/src/components/ErrorView.tsx +4 -4
  157. package/src/components/HomePage/DefaultHomePage.tsx +26 -19
  158. package/src/components/HomePage/FavouritesView.tsx +1 -1
  159. package/src/components/HomePage/NavigationCard.tsx +4 -4
  160. package/src/components/HomePage/NavigationCardBinding.tsx +2 -2
  161. package/src/components/HomePage/NavigationGroup.tsx +2 -2
  162. package/src/components/HomePage/SmallNavigationCard.tsx +5 -6
  163. package/src/components/PropertyConfigBadge.tsx +9 -3
  164. package/src/components/PropertyIdCopyTooltip.tsx +48 -0
  165. package/src/components/ReferenceTable/ReferenceSelectionTable.tsx +8 -7
  166. package/src/components/ReferenceWidget.tsx +22 -12
  167. package/src/components/SearchIconsView.tsx +10 -7
  168. package/src/components/SelectableTable/SelectableTable.tsx +9 -9
  169. package/src/components/SelectableTable/filters/BooleanFilterField.tsx +2 -3
  170. package/src/components/SelectableTable/filters/DateTimeFilterField.tsx +25 -8
  171. package/src/components/SelectableTable/filters/ReferenceFilterField.tsx +30 -6
  172. package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +90 -21
  173. package/src/components/VirtualTable/VirtualTable.tsx +77 -46
  174. package/src/components/VirtualTable/VirtualTableCell.tsx +1 -9
  175. package/src/components/VirtualTable/VirtualTableHeader.tsx +10 -10
  176. package/src/components/VirtualTable/VirtualTableHeaderRow.tsx +2 -2
  177. package/src/components/VirtualTable/VirtualTableProps.tsx +18 -14
  178. package/src/components/VirtualTable/VirtualTableRow.tsx +5 -6
  179. package/src/components/VirtualTable/fields/VirtualTableDateField.tsx +5 -5
  180. package/src/components/VirtualTable/fields/VirtualTableInput.tsx +2 -1
  181. package/src/components/VirtualTable/fields/VirtualTableNumberInput.tsx +2 -1
  182. package/src/components/VirtualTable/fields/VirtualTableSelect.tsx +16 -28
  183. package/src/components/VirtualTable/types.tsx +2 -3
  184. package/src/components/{EntityCollectionTable/internal → common}/default_entity_actions.tsx +8 -4
  185. package/src/components/common/index.ts +1 -0
  186. package/src/components/{VirtualTable/common.tsx → common/table_height.tsx} +5 -2
  187. package/src/components/common/types.tsx +4 -6
  188. package/src/components/common/useColumnsIds.tsx +23 -2
  189. package/src/components/common/useDataSourceEntityCollectionTableController.tsx +25 -14
  190. package/src/components/common/useTableSearchHelper.ts +53 -12
  191. package/src/components/index.tsx +4 -2
  192. package/src/contexts/DialogsProvider.tsx +2 -2
  193. package/src/contexts/SnackbarProvider.tsx +2 -0
  194. package/src/core/DefaultAppBar.tsx +178 -0
  195. package/src/core/DefaultDrawer.tsx +183 -0
  196. package/src/core/DrawerNavigationItem.tsx +66 -0
  197. package/src/core/EntityEditView.tsx +721 -156
  198. package/src/core/EntitySidePanel.tsx +1 -2
  199. package/src/core/FireCMS.tsx +57 -53
  200. package/src/core/NavigationRoutes.tsx +7 -8
  201. package/src/core/SideDialogs.tsx +2 -1
  202. package/src/core/field_configs.tsx +9 -10
  203. package/src/core/index.tsx +3 -4
  204. package/src/form/PropertyFieldBinding.tsx +74 -35
  205. package/src/form/components/CustomIdField.tsx +6 -2
  206. package/src/form/components/FieldHelperText.tsx +4 -4
  207. package/src/form/components/LabelWithIcon.tsx +27 -19
  208. package/src/form/components/LabelWithIconAndTooltip.tsx +28 -0
  209. package/src/form/components/StorageItemPreview.tsx +22 -12
  210. package/src/form/components/StorageUploadProgress.tsx +3 -4
  211. package/src/form/components/index.tsx +1 -1
  212. package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +29 -17
  213. package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +45 -35
  214. package/src/form/field_bindings/BlockFieldBinding.tsx +53 -33
  215. package/src/form/field_bindings/DateTimeFieldBinding.tsx +17 -14
  216. package/src/form/field_bindings/KeyValueFieldBinding.tsx +60 -51
  217. package/src/form/field_bindings/MapFieldBinding.tsx +67 -48
  218. package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +150 -0
  219. package/src/form/field_bindings/{MultiSelectBinding.tsx → MultiSelectFieldBinding.tsx} +25 -20
  220. package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +11 -16
  221. package/src/form/field_bindings/ReferenceFieldBinding.tsx +42 -31
  222. package/src/form/field_bindings/RepeatFieldBinding.tsx +52 -34
  223. package/src/form/field_bindings/SelectFieldBinding.tsx +21 -13
  224. package/src/form/field_bindings/StorageUploadFieldBinding.tsx +37 -47
  225. package/src/form/field_bindings/SwitchFieldBinding.tsx +28 -24
  226. package/src/form/field_bindings/TextFieldBinding.tsx +26 -23
  227. package/src/form/index.tsx +4 -9
  228. package/src/form/useClearRestoreValue.tsx +2 -2
  229. package/src/form/validation.ts +1 -17
  230. package/src/hooks/data/delete.ts +6 -5
  231. package/src/hooks/data/save.ts +12 -8
  232. package/src/hooks/data/useCollectionFetch.tsx +2 -2
  233. package/src/hooks/data/useDataSource.tsx +11 -3
  234. package/src/hooks/data/useEntityFetch.tsx +5 -5
  235. package/src/hooks/index.tsx +1 -0
  236. package/src/hooks/useAuthController.tsx +1 -1
  237. package/src/hooks/useBuildLocalConfigurationPersistence.tsx +8 -10
  238. package/src/hooks/useBuildModeController.tsx +11 -5
  239. package/src/hooks/useBuildNavigationController.tsx +92 -34
  240. package/src/hooks/useFireCMSContext.tsx +5 -5
  241. package/src/hooks/useProjectLog.tsx +32 -10
  242. package/src/hooks/useResolvedNavigationFrom.tsx +6 -6
  243. package/src/hooks/useValidateAuthenticator.tsx +21 -41
  244. package/src/index.ts +1 -0
  245. package/src/internal/useBuildDataSource.ts +72 -82
  246. package/src/internal/useBuildSideDialogsController.tsx +1 -0
  247. package/src/internal/useBuildSideEntityController.tsx +102 -22
  248. package/src/internal/useUnsavedChangesDialog.tsx +5 -3
  249. package/src/preview/PropertyPreview.tsx +11 -18
  250. package/src/preview/PropertyPreviewProps.tsx +7 -1
  251. package/src/preview/components/BooleanPreview.tsx +2 -2
  252. package/src/preview/components/EmptyValue.tsx +1 -1
  253. package/src/preview/components/EnumValuesChip.tsx +2 -2
  254. package/src/preview/components/ImagePreview.tsx +25 -35
  255. package/src/preview/components/ReferencePreview.tsx +23 -34
  256. package/src/preview/components/StorageThumbnail.tsx +5 -1
  257. package/src/preview/components/UrlComponentPreview.tsx +44 -11
  258. package/src/preview/property_previews/ArrayOfMapsPreview.tsx +2 -3
  259. package/src/preview/property_previews/ArrayOfReferencesPreview.tsx +4 -3
  260. package/src/preview/property_previews/ArrayOfStorageComponentsPreview.tsx +2 -3
  261. package/src/preview/property_previews/ArrayOfStringsPreview.tsx +1 -2
  262. package/src/preview/property_previews/ArrayOneOfPreview.tsx +4 -5
  263. package/src/preview/property_previews/ArrayPropertyPreview.tsx +4 -5
  264. package/src/preview/property_previews/MapPropertyPreview.tsx +9 -9
  265. package/src/preview/property_previews/SkeletonPropertyComponent.tsx +12 -12
  266. package/src/preview/property_previews/StringPropertyPreview.tsx +3 -3
  267. package/src/preview/util.ts +10 -10
  268. package/src/types/auth.tsx +9 -13
  269. package/src/types/collections.ts +62 -20
  270. package/src/types/customization_controller.tsx +0 -1
  271. package/src/types/datasource.ts +60 -43
  272. package/src/types/entities.ts +11 -1
  273. package/src/types/entity_actions.tsx +20 -7
  274. package/src/types/entity_callbacks.ts +18 -18
  275. package/src/types/entity_overrides.tsx +2 -2
  276. package/src/types/export_import.ts +4 -4
  277. package/src/types/fields.tsx +69 -45
  278. package/src/types/firecms.tsx +7 -2
  279. package/src/types/firecms_context.tsx +1 -1
  280. package/src/types/index.ts +0 -1
  281. package/src/types/navigation.ts +7 -7
  282. package/src/types/permissions.ts +5 -5
  283. package/src/types/plugins.tsx +24 -14
  284. package/src/types/properties.ts +39 -22
  285. package/src/types/property_config.tsx +0 -2
  286. package/src/types/side_dialogs_controller.tsx +13 -0
  287. package/src/types/storage.ts +94 -3
  288. package/src/types/user.ts +2 -0
  289. package/src/util/builders.ts +6 -6
  290. package/src/util/entities.ts +6 -5
  291. package/src/util/enums.ts +1 -1
  292. package/src/util/icon_list.ts +15 -10
  293. package/src/util/icon_synonyms.ts +3 -99
  294. package/src/util/icons.tsx +17 -7
  295. package/src/util/index.ts +1 -0
  296. package/src/util/make_properties_editable.ts +13 -5
  297. package/src/util/navigation_utils.ts +6 -6
  298. package/src/util/objects.ts +45 -28
  299. package/src/util/permissions.ts +9 -8
  300. package/src/util/plurals.ts +0 -2
  301. package/src/util/property_utils.tsx +11 -4
  302. package/src/util/references.ts +3 -0
  303. package/src/util/resolutions.ts +79 -46
  304. package/src/util/storage.ts +79 -21
  305. package/src/util/strings.ts +2 -2
  306. package/src/util/useStorageUploadController.tsx +34 -8
  307. package/src/util/useTraceUpdate.tsx +1 -0
  308. package/dist/components/PropertyIdCopyTooltipContent.d.ts +0 -3
  309. package/dist/components/VirtualTable/common.d.ts +0 -2
  310. package/dist/core/Drawer.d.ts +0 -23
  311. package/dist/core/Scaffold.d.ts +0 -55
  312. package/dist/core/SideEntityView.d.ts +0 -7
  313. package/dist/form/EntityForm.d.ts +0 -77
  314. package/dist/form/components/FormikArrayContainer.d.ts +0 -18
  315. package/dist/form/field_bindings/MarkdownFieldBinding.d.ts +0 -9
  316. package/dist/internal/useBuildCustomizationController.d.ts +0 -2
  317. package/dist/internal/useLocaleConfig.d.ts +0 -1
  318. package/dist/types/appcheck.d.ts +0 -26
  319. package/src/components/FireCMSAppBar.tsx +0 -165
  320. package/src/components/PropertyIdCopyTooltipContent.tsx +0 -28
  321. package/src/core/Drawer.tsx +0 -191
  322. package/src/core/Scaffold.tsx +0 -281
  323. package/src/core/SideEntityView.tsx +0 -38
  324. package/src/form/EntityForm.tsx +0 -728
  325. package/src/form/components/FormikArrayContainer.tsx +0 -44
  326. package/src/form/field_bindings/MarkdownFieldBinding.tsx +0 -695
  327. package/src/internal/useBuildCustomizationController.tsx +0 -5
  328. package/src/internal/useLocaleConfig.tsx +0 -18
  329. package/src/types/appcheck.ts +0 -29
@@ -4,7 +4,7 @@ import { Entity, EntityCollection, EntityReference, FilterValues } from "../type
4
4
  import { getReferenceFrom } from "../util";
5
5
  import { PreviewSize, ReferencePreview } from "../preview";
6
6
  import { useNavigationController, useReferenceDialog } from "../hooks";
7
- import { Button, cn } from "@firecms/ui";
7
+ import { Button, cls } from "@firecms/ui";
8
8
 
9
9
  export type ReferenceWidgetProps<M extends Record<string, any>> = {
10
10
  name?: string,
@@ -27,6 +27,8 @@ export type ReferenceWidgetProps<M extends Record<string, any>> = {
27
27
  forceFilter?: FilterValues<string>;
28
28
  size: PreviewSize;
29
29
  className?: string;
30
+ includeId?: boolean;
31
+ includeEntityLink?: boolean;
30
32
  };
31
33
 
32
34
  /**
@@ -43,25 +45,26 @@ export function ReferenceWidget<M extends Record<string, any>>({
43
45
  previewProperties,
44
46
  forceFilter,
45
47
  size,
46
- className
48
+ className,
49
+ includeId,
50
+ includeEntityLink
47
51
  }: ReferenceWidgetProps<M>) {
48
52
 
49
53
  const navigationController = useNavigationController();
50
54
 
51
55
  const collection: EntityCollection | undefined = useMemo(() => {
52
56
  return navigationController.getCollection(path);
53
- }, [path, navigationController]);
54
-
55
- // if (!collection) {
56
- // throw Error(`Couldn't find the corresponding collection for the path: ${path}`);
57
- // }
57
+ }, [path, navigationController.getCollection]);
58
58
 
59
59
  const onSingleEntitySelected = useCallback((entity: Entity<M> | null) => {
60
60
  if (disabled)
61
61
  return;
62
62
  if (onReferenceSelected) {
63
63
  const reference = entity ? getReferenceFrom(entity) : null;
64
- onReferenceSelected?.({ reference, entity });
64
+ onReferenceSelected?.({
65
+ reference,
66
+ entity
67
+ });
65
68
  }
66
69
  }, [disabled, onReferenceSelected]);
67
70
 
@@ -70,7 +73,10 @@ export function ReferenceWidget<M extends Record<string, any>>({
70
73
  return;
71
74
  if (onMultipleReferenceSelected) {
72
75
  const references = entities ? entities.map(e => getReferenceFrom(e)) : null;
73
- onMultipleReferenceSelected({ references, entities });
76
+ onMultipleReferenceSelected({
77
+ references,
78
+ entities
79
+ });
74
80
  }
75
81
  }, [disabled, onReferenceSelected]);
76
82
 
@@ -110,7 +116,9 @@ export function ReferenceWidget<M extends Record<string, any>>({
110
116
  reference={ref}
111
117
  disabled={disabled}
112
118
  previewProperties={previewProperties}
113
- size={size}/>
119
+ size={size}
120
+ includeId={includeId}
121
+ includeEntityLink={includeEntityLink}/>
114
122
  })}
115
123
  </div>
116
124
  } else if (value?.isEntityReference && value?.isEntityReference()) {
@@ -119,10 +127,12 @@ export function ReferenceWidget<M extends Record<string, any>>({
119
127
  onClick={onEntryClick}
120
128
  disabled={disabled}
121
129
  previewProperties={previewProperties}
122
- size={size}/>
130
+ size={size}
131
+ includeId={includeId}
132
+ includeEntityLink={includeEntityLink}/>
123
133
 
124
134
  }
125
- return <div className={cn("text-sm font-medium text-gray-500",
135
+ return <div className={cls("text-sm font-medium",
126
136
  "min-w-80 flex flex-col gap-4",
127
137
  "relative transition-colors duration-200 ease-in rounded font-medium",
128
138
  disabled ? "bg-opacity-50" : "hover:bg-opacity-75",
@@ -1,14 +1,14 @@
1
1
  import React from "react";
2
2
 
3
3
  import { coolIconKeys, debounce, Icon, IconButton, iconKeys, SearchBar, Tooltip } from "@firecms/ui";
4
- import { icon_synonyms, iconsSearch } from "../util";
4
+ import { iconSynonyms, iconsSearch } from "../util";
5
5
 
6
6
  const UPDATE_SEARCH_INDEX_WAIT_MS = 220;
7
7
 
8
- if (process.env.NODE_ENV !== "production") {
9
- Object.keys(icon_synonyms).forEach((icon: string) => {
8
+ if (iconSynonyms && process.env.NODE_ENV !== "production") {
9
+ Object.keys(iconSynonyms).forEach((icon: string) => {
10
10
  if (!iconKeys.includes(icon)) {
11
- console.warn(`The icon ${icon} no longer exists. Remove it from \`icon_synonyms\``);
11
+ console.warn(`The icon ${icon} no longer exists. Remove it from \`iconSynonyms\``);
12
12
  }
13
13
  });
14
14
  }
@@ -31,7 +31,9 @@ export function SearchIconsView({
31
31
  setKeys(null);
32
32
  } else {
33
33
  const searchResult = iconsSearch.search(value);
34
- setKeys(searchResult.map((e: any) => e.key));
34
+ const limit = 50;
35
+ const limited = searchResult.slice(0, limit);
36
+ setKeys(limited.map((e) => e.item.key));
35
37
  }
36
38
  }, UPDATE_SEARCH_INDEX_WAIT_MS), []
37
39
  );
@@ -48,7 +50,7 @@ export function SearchIconsView({
48
50
  return (
49
51
  <>
50
52
  <SearchBar
51
- autoFocus
53
+ autoFocus={false}
52
54
  innerClassName={"w-full sticky top-0 z-10"}
53
55
  onTextSearch={(value?: string) => setQuery(value ?? "")}
54
56
  placeholder="Search for more icons…"
@@ -57,7 +59,8 @@ export function SearchIconsView({
57
59
  <div className={"flex max-w-full flex-wrap mt-4"}>
58
60
  {icons.map((icon: string) => {
59
61
  return (
60
- <Tooltip title={icon} key={icon}>
62
+ <Tooltip title={icon} key={icon}
63
+ asChild={true}>
61
64
  <IconButton
62
65
  shape={"square"}
63
66
  toggled={selectedIcon === icon}
@@ -10,7 +10,7 @@ import {
10
10
  } from "../../types";
11
11
  import { CellRendererParams, VirtualTable, VirtualTableColumn } from "../VirtualTable";
12
12
  import { enumToObjectEntries } from "../../util";
13
- import { OnCellValueChange, OnColumnResizeParams } from "../common/types";
13
+ import { OnCellValueChange, OnColumnResizeParams } from "../common";
14
14
  import { FilterFormFieldProps } from "../VirtualTable/VirtualTableHeader";
15
15
  import { ReferenceFilterField } from "./filters/ReferenceFilterField";
16
16
  import { StringNumberFilterField } from "./filters/StringNumberFilterField";
@@ -18,6 +18,7 @@ import { BooleanFilterField } from "./filters/BooleanFilterField";
18
18
  import { DateTimeFilterField } from "./filters/DateTimeFilterField";
19
19
  import { useOutsideAlerter } from "@firecms/ui";
20
20
  import { SelectableTableContext } from "./SelectableTableContext";
21
+ import { getRowHeight } from "../common/table_height";
21
22
 
22
23
  export type SelectableTableProps<M extends Record<string, any>> = {
23
24
 
@@ -115,7 +116,7 @@ export const SelectableTable = React.memo<SelectableTableProps<any>>(
115
116
  onEntityClick,
116
117
  onColumnResize,
117
118
  hoverRow = true,
118
- size,
119
+ size = "m",
119
120
  inlineEditing = false,
120
121
  tableController:
121
122
  {
@@ -127,8 +128,6 @@ export const SelectableTable = React.memo<SelectableTableProps<any>>(
127
128
  setFilterValues,
128
129
  sortBy,
129
130
  setSortBy,
130
- setSearchString,
131
- clearFilter,
132
131
  itemCount,
133
132
  setItemCount,
134
133
  pageSize = 50,
@@ -211,7 +210,7 @@ export const SelectableTable = React.memo<SelectableTableProps<any>>(
211
210
  selectedCell,
212
211
  }}
213
212
  >
214
- <div className="h-full w-full flex flex-col bg-white dark:bg-gray-950"
213
+ <div className="h-full w-full flex flex-col bg-white dark:bg-surface-950"
215
214
  ref={ref}>
216
215
 
217
216
  <VirtualTable
@@ -222,9 +221,8 @@ export const SelectableTable = React.memo<SelectableTableProps<any>>(
222
221
  onEndReached={loadNextPage}
223
222
  onResetPagination={resetPagination}
224
223
  error={dataLoadingError}
225
- paginationEnabled={paginationEnabled}
226
224
  onColumnResize={onColumnResize}
227
- size={size}
225
+ rowHeight={getRowHeight(size)}
228
226
  loading={dataLoading}
229
227
  filter={filterValues}
230
228
  onFilterUpdate={setFilterValues ? onFilterUpdate : undefined}
@@ -234,7 +232,7 @@ export const SelectableTable = React.memo<SelectableTableProps<any>>(
234
232
  checkFilterCombination={checkFilterCombination}
235
233
  createFilterField={filterable ? createFilterField : undefined}
236
234
  rowClassName={useCallback((entity: Entity<M>) => {
237
- return highlightedRow?.(entity) ? "bg-gray-100 bg-opacity-75 dark:bg-gray-800 dark:bg-opacity-75" : "";
235
+ return highlightedRow?.(entity) ? "bg-surface-100 bg-opacity-75 dark:bg-surface-800 dark:bg-opacity-75" : "";
238
236
  }, [highlightedRow])}
239
237
  className="flex-grow"
240
238
  emptyComponent={emptyComponent}
@@ -247,7 +245,8 @@ export const SelectableTable = React.memo<SelectableTableProps<any>>(
247
245
  );
248
246
 
249
247
  },
250
- equal
248
+ () => false,
249
+ // equal
251
250
  );
252
251
 
253
252
  function createFilterField({
@@ -280,6 +279,7 @@ function createFilterField({
280
279
  isArray={isArray}
281
280
  path={baseProperty.path}
282
281
  title={resolvedProperty?.name}
282
+ includeId={baseProperty.includeId}
283
283
  previewProperties={baseProperty?.previewProperties}
284
284
  hidden={hidden}
285
285
  setHidden={setHidden}/>;
@@ -32,7 +32,7 @@ export function BooleanFilterField({
32
32
  const valueSet = !!value;
33
33
 
34
34
  return (
35
- <div className="w-[200px]">
35
+ <div className="w-[300px]">
36
36
  <BooleanSwitchWithLabel
37
37
  value={valueSetToTrue}
38
38
  allowIndeterminate={true}
@@ -44,6 +44,5 @@ export function BooleanFilterField({
44
44
  : `${title} is false`}
45
45
  />
46
46
  </div>
47
- )
48
- ;
47
+ );
49
48
  }
@@ -1,6 +1,6 @@
1
1
  import React, { useState } from "react";
2
2
  import { VirtualTableWhereFilterOp } from "../../VirtualTable";
3
- import { DateTimeField, Select, SelectItem } from "@firecms/ui";
3
+ import { Checkbox, DateTimeField, Label, Select, SelectItem } from "@firecms/ui";
4
4
  import { useCustomizationController } from "../../../hooks";
5
5
 
6
6
  interface DateTimeFilterFieldProps {
@@ -43,10 +43,10 @@ export function DateTimeFilterField({
43
43
 
44
44
  const [fieldOperation, fieldValue] = value || [possibleOperations[0], undefined];
45
45
  const [operation, setOperation] = useState<VirtualTableWhereFilterOp>(fieldOperation);
46
- const [internalValue, setInternalValue] = useState<Date | undefined>(fieldValue);
46
+ const [internalValue, setInternalValue] = useState<Date | null | undefined>(fieldValue);
47
47
 
48
- function updateFilter(op: VirtualTableWhereFilterOp, val: Date | undefined) {
49
- let newValue: Date | undefined = val;
48
+ function updateFilter(op: VirtualTableWhereFilterOp, val: Date | undefined | null) {
49
+ let newValue: Date | null | undefined = val;
50
50
  const prevOpIsArray = multipleSelectOperations.includes(operation);
51
51
  const newOpIsArray = multipleSelectOperations.includes(op);
52
52
  if (prevOpIsArray !== newOpIsArray) {
@@ -73,9 +73,11 @@ export function DateTimeFilterField({
73
73
 
74
74
  return (
75
75
 
76
- <div className="flex w-[440px] items-center">
76
+ <div className="flex w-[440px]">
77
77
  <div className="w-[80px]">
78
78
  <Select value={operation}
79
+ size={"large"}
80
+ fullWidth={true}
79
81
  onValueChange={(value) => {
80
82
  updateFilter(value as VirtualTableWhereFilterOp, internalValue);
81
83
  }}
@@ -88,19 +90,34 @@ export function DateTimeFilterField({
88
90
  </Select>
89
91
  </div>
90
92
 
91
- <div className="flex-grow ml-2">
93
+ <div className="flex-grow ml-2 flex flex-col gap-2">
92
94
 
93
95
  <DateTimeField
94
96
  mode={mode}
95
- size={"medium"}
97
+ size={"large"}
96
98
  locale={locale}
97
- value={internalValue}
99
+ value={internalValue ?? undefined}
98
100
  onChange={(dateValue: Date | null) => {
99
101
  updateFilter(operation, dateValue === null ? undefined : dateValue);
100
102
  }}
101
103
  clearable={true}
102
104
  />
103
105
 
106
+ <Label
107
+ className="border cursor-pointer rounded-md p-2 flex items-center gap-2 [&:has(:checked)]:bg-surface-100 dark:[&:has(:checked)]:bg-surface-800"
108
+ htmlFor="null-filter"
109
+ >
110
+ <Checkbox id="null-filter"
111
+ checked={internalValue === null}
112
+ size={"small"}
113
+ onCheckedChange={(checked) => {
114
+ if (internalValue !== null)
115
+ updateFilter(operation, null);
116
+ else updateFilter(operation, undefined);
117
+ }}/>
118
+ Filter for null values
119
+ </Label>
120
+
104
121
  </div>
105
122
 
106
123
  </div>
@@ -4,7 +4,7 @@ import { Entity, EntityCollection, EntityReference } from "../../../types";
4
4
  import { ReferencePreview } from "../../../preview";
5
5
  import { getReferenceFrom } from "../../../util";
6
6
  import { useNavigationController, useReferenceDialog } from "../../../hooks";
7
- import { Button, Select, SelectItem } from "@firecms/ui";
7
+ import { Button, Checkbox, Label, Select, SelectItem } from "@firecms/ui";
8
8
 
9
9
  interface ReferenceFilterFieldProps {
10
10
  name: string,
@@ -13,6 +13,7 @@ interface ReferenceFilterFieldProps {
13
13
  isArray?: boolean;
14
14
  path?: string;
15
15
  title?: string;
16
+ includeId?: boolean;
16
17
  previewProperties?: string[];
17
18
  hidden: boolean;
18
19
  setHidden: (hidden: boolean) => void;
@@ -40,6 +41,7 @@ export function ReferenceFilterField({
40
41
  isArray,
41
42
  path,
42
43
  title,
44
+ includeId = true,
43
45
  previewProperties,
44
46
  setHidden
45
47
  }: ReferenceFilterFieldProps) {
@@ -54,7 +56,7 @@ export function ReferenceFilterField({
54
56
 
55
57
  const [fieldOperation, fieldValue] = value || [possibleOperations[0], undefined];
56
58
  const [operation, setOperation] = useState<VirtualTableWhereFilterOp>(fieldOperation);
57
- const [internalValue, setInternalValue] = useState<EntityReference | EntityReference[] | undefined>(fieldValue);
59
+ const [internalValue, setInternalValue] = useState<EntityReference | EntityReference[] | undefined | null>(fieldValue);
58
60
 
59
61
  const selectedEntityIds = internalValue
60
62
  ? (Array.isArray(internalValue) ? internalValue.map((ref) => {
@@ -65,7 +67,7 @@ export function ReferenceFilterField({
65
67
  }).filter(Boolean) as string[] : [internalValue.id])
66
68
  : [];
67
69
 
68
- function updateFilter(op: VirtualTableWhereFilterOp, val?: EntityReference | EntityReference[]) {
70
+ function updateFilter(op: VirtualTableWhereFilterOp, val?: EntityReference | EntityReference[] | null) {
69
71
 
70
72
  const prevOpIsArray = multipleSelectOperations.includes(operation);
71
73
  const newOpIsArray = multipleSelectOperations.includes(op);
@@ -134,7 +136,8 @@ export function ReferenceFilterField({
134
136
  onClick={doOpenDialog}
135
137
  reference={reference}
136
138
  hover={true}
137
- allowEntityNavigation={false}
139
+ includeId={includeId}
140
+ includeEntityLink={false}
138
141
  />
139
142
  );
140
143
  };
@@ -142,8 +145,10 @@ export function ReferenceFilterField({
142
145
  return (
143
146
 
144
147
  <div className="flex w-[440px] flex-row">
145
- <div className="w-[120px]">
148
+ <div className="w-[140px]">
146
149
  <Select value={operation}
150
+ size={"large"}
151
+ fullWidth={true}
147
152
  onValueChange={(value) => {
148
153
  updateFilter(value as VirtualTableWhereFilterOp, internalValue);
149
154
  }}
@@ -156,21 +161,40 @@ export function ReferenceFilterField({
156
161
  </Select>
157
162
  </div>
158
163
 
159
- <div className="flex-grow ml-2 h-full">
164
+ <div className="flex-grow ml-2 h-full gap-2 flex flex-col">
160
165
 
161
166
  {internalValue && Array.isArray(internalValue) && <div>
162
167
  {internalValue.map((ref, index) => buildEntry(ref))}
163
168
  </div>}
169
+
164
170
  {internalValue && !Array.isArray(internalValue) && <div>
165
171
  {buildEntry(internalValue)}
166
172
  </div>}
173
+
167
174
  {(!internalValue || (Array.isArray(internalValue) && internalValue.length === 0)) &&
168
175
  <Button onClick={doOpenDialog}
169
176
  variant={"outlined"}
177
+ size={"large"}
170
178
  className="h-full w-full">
171
179
  {multiple ? "Select references" : "Select reference"}
172
180
  </Button>
173
181
  }
182
+
183
+ {!isArray && <Label
184
+ className="border cursor-pointer rounded-md p-2 flex items-center gap-2 [&:has(:checked)]:bg-surface-100 dark:[&:has(:checked)]:bg-surface-800"
185
+ htmlFor="null-filter"
186
+ >
187
+ <Checkbox id="null-filter"
188
+ checked={internalValue === null}
189
+ size={"small"}
190
+ onCheckedChange={(checked) => {
191
+ if (internalValue !== null)
192
+ updateFilter(operation, null);
193
+ else updateFilter(operation, undefined);
194
+ }}/>
195
+ Filter for null values
196
+ </Label>}
197
+
174
198
  </div>
175
199
 
176
200
  </div>
@@ -1,7 +1,17 @@
1
1
  import React, { useState } from "react";
2
2
  import { EnumValuesChip } from "../../../preview";
3
3
  import { VirtualTableWhereFilterOp } from "../../VirtualTable";
4
- import { ClearIcon, IconButton, Select, SelectItem, TextField } from "@firecms/ui";
4
+ import {
5
+ Checkbox,
6
+ ClearIcon,
7
+ IconButton,
8
+ Label,
9
+ MultiSelect,
10
+ MultiSelectItem,
11
+ Select,
12
+ SelectItem,
13
+ TextField
14
+ } from "@firecms/ui";
5
15
  import { EnumValueConfig } from "../../../types";
6
16
 
7
17
  interface StringNumberFilterFieldProps {
@@ -50,15 +60,15 @@ export function StringNumberFilterField({
50
60
 
51
61
  const [fieldOperation, fieldValue] = value || [possibleOperations[0], undefined];
52
62
  const [operation, setOperation] = useState<VirtualTableWhereFilterOp>(fieldOperation);
53
- const [internalValue, setInternalValue] = useState<string | number | string[] | number[] | undefined>(fieldValue);
63
+ const [internalValue, setInternalValue] = useState<string | number | string[] | number[] | null | undefined>(fieldValue);
54
64
 
55
- function updateFilter(op: VirtualTableWhereFilterOp, val: string | number | string[] | number[] | undefined) {
65
+ function updateFilter(op: VirtualTableWhereFilterOp, val: string | number | string[] | number[] | null | undefined) {
56
66
  let newValue = val;
57
67
  const prevOpIsArray = multipleSelectOperations.includes(operation);
58
68
  const newOpIsArray = multipleSelectOperations.includes(op);
59
69
  if (prevOpIsArray !== newOpIsArray) {
60
70
  // @ts-ignore
61
- newValue = newOpIsArray ? (typeof val === "string" || typeof val === "number" ? [val] : []) : "";
71
+ newValue = newOpIsArray ? (typeof val === "string" || typeof val === "number" ? [val] : []) : undefined;
62
72
  }
63
73
 
64
74
  if (typeof newValue === "number" && isNaN(newValue))
@@ -82,11 +92,13 @@ export function StringNumberFilterField({
82
92
  }
83
93
 
84
94
  const multiple = multipleSelectOperations.includes(operation);
95
+
85
96
  return (
86
97
 
87
- <div className="flex w-[440px] items-center">
98
+ <div className="flex w-[440px]">
88
99
  <div className={"w-[80px]"}>
89
100
  <Select value={operation}
101
+ fullWidth={true}
90
102
  position={"item-aligned"}
91
103
  onValueChange={(value) => {
92
104
  updateFilter(value as VirtualTableWhereFilterOp, internalValue);
@@ -100,11 +112,11 @@ export function StringNumberFilterField({
100
112
  </Select>
101
113
  </div>
102
114
 
103
- <div className="flex-grow ml-2">
115
+ <div className="flex-grow ml-2 flex flex-col gap-2">
104
116
 
105
117
  {!enumValues && <TextField
106
118
  type={dataType === "number" ? "number" : undefined}
107
- value={internalValue !== undefined ? String(internalValue) : ""}
119
+ value={internalValue !== undefined && internalValue != null ? String(internalValue) : ""}
108
120
  onChange={(evt) => {
109
121
  const val = dataType === "number"
110
122
  ? parseFloat(evt.target.value)
@@ -117,29 +129,34 @@ export function StringNumberFilterField({
117
129
  </IconButton>}
118
130
  />}
119
131
 
120
- {enumValues &&
121
-
132
+ {enumValues && !multiple &&
122
133
  <Select
123
134
  position={"item-aligned"}
124
- value={internalValue !== undefined
125
- ? (Array.isArray(internalValue) ? internalValue.map(e => String(e)) : String(internalValue))
126
- : isArray ? [] : ""}
135
+ fullWidth={true}
136
+ value={typeof internalValue === "string" ? internalValue : ""}
127
137
  onValueChange={(value) => {
128
- updateFilter(operation, dataType === "number" ? parseInt(value as string) : value as string)
138
+ if (value !== "")
139
+ updateFilter(operation, dataType === "number" ? parseInt(value as string) : value as string)
129
140
  }}
130
- multiple={multiple}
131
141
  endAdornment={internalValue && <IconButton
132
- className="absolute right-3 top-2"
142
+ className="absolute right-2 top-3"
133
143
  onClick={(e) => updateFilter(operation, undefined)}>
134
144
  <ClearIcon/>
135
145
  </IconButton>}
136
- renderValue={(enumKey) => <EnumValuesChip
137
- key={`select_value_${name}_${enumKey}`}
138
- enumKey={enumKey}
139
- enumValues={enumValues}
140
- size={"small"}/>}>
146
+ renderValue={(enumKey) => {
147
+ if (enumKey === null)
148
+ return "Filter for null values";
149
+ if (enumKey === undefined)
150
+ return null;
151
+
152
+ return <EnumValuesChip
153
+ key={`select_value_${name}_${enumKey}`}
154
+ enumKey={enumKey}
155
+ enumValues={enumValues}
156
+ size={"small"}/>;
157
+ }}>
141
158
  {enumValues.map((enumConfig) => (
142
- <SelectItem key={`select_value_${name}_${enumConfig.id}`}
159
+ <SelectItem key={`select_item_${name}_${enumConfig.id}`}
143
160
  value={String(enumConfig.id)}>
144
161
  <EnumValuesChip
145
162
  enumKey={String(enumConfig.id)}
@@ -150,6 +167,58 @@ export function StringNumberFilterField({
150
167
  </Select>
151
168
  }
152
169
 
170
+ {enumValues && multiple &&
171
+ <MultiSelect
172
+ position={"item-aligned"}
173
+ value={Array.isArray(internalValue) ? internalValue.map(e => String(e)) : []}
174
+ onValueChange={(value) => {
175
+ updateFilter(operation, dataType === "number" ? value.map(v => parseInt(v)) : value)
176
+ }}
177
+ multiple={multiple}
178
+ endAdornment={internalValue && <IconButton
179
+ className="absolute right-2 top-3"
180
+ onClick={(e) => updateFilter(operation, undefined)}>
181
+ <ClearIcon/>
182
+ </IconButton>}
183
+ // renderValues={(enumKeys) => {
184
+ // console.log("renderValues", enumKeys);
185
+ // if (enumKeys === null)
186
+ // return "Filter for null values";
187
+ //
188
+ // return enumKeys.map(key => <EnumValuesChip
189
+ // key={`select_value_${name}_${enumKeys}`}
190
+ // enumKey={key}
191
+ // enumValues={enumValues}
192
+ // size={"small"}/>);
193
+ // }}
194
+ >
195
+ {enumValues.map((enumConfig) => (
196
+ <MultiSelectItem key={`select_value_${name}_${enumConfig.id}`}
197
+ value={String(enumConfig.id)}>
198
+ <EnumValuesChip
199
+ enumKey={String(enumConfig.id)}
200
+ enumValues={enumValues}
201
+ size={"small"}/>
202
+ </MultiSelectItem>
203
+ ))}
204
+ </MultiSelect>
205
+ }
206
+
207
+ {!isArray && <Label
208
+ className="border cursor-pointer rounded-md p-2 flex items-center gap-2 [&:has(:checked)]:bg-surface-100 dark:[&:has(:checked)]:bg-surface-800"
209
+ htmlFor="null-filter"
210
+ >
211
+ <Checkbox id="null-filter"
212
+ checked={internalValue === null}
213
+ size={"small"}
214
+ onCheckedChange={(checked) => {
215
+ if (internalValue !== null)
216
+ updateFilter(operation, null);
217
+ else updateFilter(operation, undefined);
218
+ }}/>
219
+ Filter for null values
220
+ </Label>}
221
+
153
222
  </div>
154
223
 
155
224
  </div>