@rebasepro/admin 0.2.3 → 0.3.0

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 (210) hide show
  1. package/dist/{CollectionEditorDialog-CmGXXSY9.js → CollectionEditorDialog-D0VqpLPO.js} +70 -77
  2. package/dist/CollectionEditorDialog-D0VqpLPO.js.map +1 -0
  3. package/dist/{CollectionsStudioView-DcLHT5bU.js → CollectionsStudioView-Bc3Rxxc2.js} +5 -4
  4. package/dist/{CollectionsStudioView-DcLHT5bU.js.map → CollectionsStudioView-Bc3Rxxc2.js.map} +1 -1
  5. package/dist/{ExportCollectionAction-BfN34eWX.js → ExportCollectionAction-Ckc-09BQ.js} +4 -3
  6. package/dist/ExportCollectionAction-Ckc-09BQ.js.map +1 -0
  7. package/dist/{ImportCollectionAction-SZrInjhx.js → ImportCollectionAction-BqjIrC3Z.js} +3 -2
  8. package/dist/{ImportCollectionAction-SZrInjhx.js.map → ImportCollectionAction-BqjIrC3Z.js.map} +1 -1
  9. package/dist/{PropertyEditView-Cvryrb3B.js → PropertyEditView-CvRSV-A2.js} +128 -121
  10. package/dist/PropertyEditView-CvRSV-A2.js.map +1 -0
  11. package/dist/collection_editor/ConfigControllerProvider.d.ts +0 -5
  12. package/dist/collection_editor/index.d.ts +0 -1
  13. package/dist/collection_editor/types/collection_editor_controller.d.ts +0 -2
  14. package/dist/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.d.ts +3 -3
  15. package/dist/collection_editor_ui.js +3 -3
  16. package/dist/components/ArrayContainer.d.ts +2 -2
  17. package/dist/components/DefaultAppBar.d.ts +18 -1
  18. package/dist/components/DefaultDrawer.d.ts +51 -3
  19. package/dist/components/EntityCollectionTable/fields/TableStorageUpload.d.ts +2 -2
  20. package/dist/components/EntityCollectionTable/internal/EntityTableCell.d.ts +2 -2
  21. package/dist/components/EntityCollectionTable/table_bindings.d.ts +4 -3
  22. package/dist/components/EntityCollectionView/hooks/useKanbanDragAndDrop.d.ts +4 -3
  23. package/dist/components/EntityEditView.d.ts +2 -1
  24. package/dist/components/HomePage/HomePageDnD.d.ts +3 -3
  25. package/dist/components/PropertyCollectionView.d.ts +1 -1
  26. package/dist/components/PropertyIdCopyTooltip.d.ts +1 -1
  27. package/dist/components/SelectableTable/SelectionStore.d.ts +4 -1
  28. package/dist/components/SelectableTable/filters/BooleanFilterField.d.ts +2 -2
  29. package/dist/components/SelectableTable/filters/DateTimeFilterField.d.ts +2 -2
  30. package/dist/components/SelectableTable/filters/ReferenceFilterField.d.ts +2 -2
  31. package/dist/components/SelectableTable/filters/StringNumberFilterField.d.ts +2 -2
  32. package/dist/components/admin/RolesView.d.ts +3 -3
  33. package/dist/components/admin/UsersView.d.ts +3 -3
  34. package/dist/components/app/Drawer.d.ts +8 -1
  35. package/dist/data_export/export/export.d.ts +3 -3
  36. package/dist/editor/components/editor-bubble.d.ts +5 -1
  37. package/dist/editor/components/image-bubble.d.ts +5 -1
  38. package/dist/editor/components/index.d.ts +3 -3
  39. package/dist/editor/components/table-bubble.d.ts +5 -1
  40. package/dist/editor/nodeViews/ReactNodeView.d.ts +4 -1
  41. package/dist/editor/useProseMirror.d.ts +2 -2
  42. package/dist/editor/utils/remove_classes.d.ts +1 -1
  43. package/dist/editor.js +15 -14
  44. package/dist/editor.js.map +1 -1
  45. package/dist/form/EntityForm.d.ts +2 -2
  46. package/dist/form/components/StorageUploadProgress.d.ts +2 -2
  47. package/dist/form/field_bindings/MultiSelectFieldBinding.d.ts +1 -1
  48. package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +1 -1
  49. package/dist/form/validation.d.ts +3 -3
  50. package/dist/hooks/navigation/useResolvedCollections.d.ts +6 -0
  51. package/dist/hooks/navigation/useResolvedViews.d.ts +3 -4
  52. package/dist/{index-PLIQXpTt.js → index-BCcLwgfe.js} +3 -2
  53. package/dist/{index-PLIQXpTt.js.map → index-BCcLwgfe.js.map} +1 -1
  54. package/dist/{index-DjduZG1T.js → index-DY2k5TtG.js} +3 -3
  55. package/dist/index-DY2k5TtG.js.map +1 -0
  56. package/dist/{index-MKPc70-v.js → index-UQOMHwt1.js} +3 -3
  57. package/dist/index-UQOMHwt1.js.map +1 -0
  58. package/dist/index.d.ts +1 -1
  59. package/dist/index.js +2813 -372
  60. package/dist/index.js.map +1 -1
  61. package/dist/{markdown-z2Ir7Cgo.js → markdown-DD2JDU1X.js} +2 -2
  62. package/dist/markdown-DD2JDU1X.js.map +1 -0
  63. package/dist/preview/components/UrlComponentPreview.d.ts +1 -0
  64. package/dist/types/components/EntityFormActionsProps.d.ts +1 -1
  65. package/dist/types/components/EntityFormProps.d.ts +2 -2
  66. package/dist/types/fields.d.ts +1 -1
  67. package/dist/{util-DbWax_sV.js → util-ZM9gQuCv.js} +2031 -2078
  68. package/dist/util-ZM9gQuCv.js.map +1 -0
  69. package/package.json +8 -8
  70. package/src/collection_editor/ConfigControllerProvider.tsx +3 -13
  71. package/src/collection_editor/index.ts +1 -3
  72. package/src/collection_editor/types/collection_editor_controller.tsx +0 -3
  73. package/src/collection_editor/ui/EditorCollectionAction.tsx +1 -6
  74. package/src/collection_editor/ui/EditorCollectionActionStart.tsx +1 -6
  75. package/src/collection_editor/ui/EditorEntityAction.tsx +1 -6
  76. package/src/collection_editor/ui/HomePageEditorCollectionAction.tsx +7 -14
  77. package/src/collection_editor/ui/NewCollectionCard.tsx +1 -5
  78. package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +3 -8
  79. package/src/collection_editor/ui/collection_editor/CollectionJsonImportDialog.tsx +8 -12
  80. package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +21 -21
  81. package/src/collection_editor/ui/collection_editor/CollectionRLSTab.tsx +4 -4
  82. package/src/collection_editor/ui/collection_editor/EnumForm.tsx +1 -1
  83. package/src/collection_editor/ui/collection_editor/properties/BlockPropertyField.tsx +3 -3
  84. package/src/collection_editor/ui/collection_editor/properties/CommonPropertyFields.tsx +3 -3
  85. package/src/collection_editor/ui/collection_editor/properties/DateTimePropertyField.tsx +8 -8
  86. package/src/collection_editor/ui/collection_editor/properties/EnumPropertyField.tsx +5 -5
  87. package/src/collection_editor/ui/collection_editor/properties/MapPropertyField.tsx +2 -2
  88. package/src/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.tsx +5 -5
  89. package/src/collection_editor/ui/collection_editor/properties/NumberPropertyField.tsx +5 -5
  90. package/src/collection_editor/ui/collection_editor/properties/ReferencePropertyField.tsx +2 -2
  91. package/src/collection_editor/ui/collection_editor/properties/RepeatPropertyField.tsx +2 -2
  92. package/src/collection_editor/ui/collection_editor/properties/StoragePropertyField.tsx +8 -8
  93. package/src/collection_editor/ui/collection_editor/properties/StringPropertyField.tsx +5 -5
  94. package/src/collection_editor/ui/collection_editor/properties/UrlPropertyField.tsx +3 -2
  95. package/src/collection_editor/ui/collection_editor/properties/VectorPropertyField.tsx +2 -2
  96. package/src/collection_editor/ui/collection_editor/properties/validation/ArrayPropertyValidation.tsx +2 -2
  97. package/src/collection_editor/ui/collection_editor/properties/validation/GeneralPropertyValidation.tsx +1 -1
  98. package/src/collection_editor/ui/collection_editor/properties/validation/NumberPropertyValidation.tsx +4 -7
  99. package/src/collection_editor/ui/collection_editor/properties/validation/StringPropertyValidation.tsx +4 -4
  100. package/src/components/ArrayContainer.tsx +3 -3
  101. package/src/components/DefaultAppBar.tsx +52 -31
  102. package/src/components/DefaultDrawer.tsx +279 -66
  103. package/src/components/DrawerNavigationItem.tsx +1 -1
  104. package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +6 -5
  105. package/src/components/EntityCollectionTable/PropertyTableCell.tsx +9 -7
  106. package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +5 -5
  107. package/src/components/EntityCollectionTable/fields/VirtualTableNumberInput.tsx +12 -9
  108. package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +2 -2
  109. package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +1 -1
  110. package/src/components/EntityCollectionTable/table_bindings.tsx +5 -4
  111. package/src/components/EntityCollectionView/EntityCollectionView.tsx +6 -4
  112. package/src/components/EntityCollectionView/hooks/useCollectionInlineEditor.ts +1 -1
  113. package/src/components/EntityCollectionView/hooks/useKanbanDragAndDrop.ts +7 -6
  114. package/src/components/EntityDetailView.tsx +46 -24
  115. package/src/components/EntityEditView.tsx +51 -28
  116. package/src/components/EntityEditViewFormActions.tsx +4 -4
  117. package/src/components/EntityPreview.tsx +9 -4
  118. package/src/components/HomePage/HomePageDnD.tsx +3 -2
  119. package/src/components/PropertyCollectionView.tsx +1 -1
  120. package/src/components/PropertyIdCopyTooltip.tsx +1 -1
  121. package/src/components/RebaseLayout.tsx +5 -1
  122. package/src/components/RebaseNavigation.tsx +2 -2
  123. package/src/components/RebaseRouteDefs.tsx +4 -7
  124. package/src/components/RebaseShell.tsx +16 -13
  125. package/src/components/SearchIconsView.tsx +1 -8
  126. package/src/components/SelectableTable/SelectableTable.tsx +8 -11
  127. package/src/components/SelectableTable/SelectionStore.ts +1 -1
  128. package/src/components/SelectableTable/filters/BooleanFilterField.tsx +3 -3
  129. package/src/components/SelectableTable/filters/DateTimeFilterField.tsx +3 -3
  130. package/src/components/SelectableTable/filters/ReferenceFilterField.tsx +5 -5
  131. package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +3 -3
  132. package/src/components/SideEntityProvider.tsx +2 -1
  133. package/src/components/admin/RolesView.tsx +7 -2
  134. package/src/components/admin/UsersView.tsx +12 -6
  135. package/src/components/app/Drawer.tsx +9 -1
  136. package/src/components/app/Scaffold.tsx +5 -1
  137. package/src/data_export/export/export.ts +17 -17
  138. package/src/data_import/components/DataNewPropertiesMapping.tsx +1 -1
  139. package/src/editor/components/editor-bubble.tsx +32 -9
  140. package/src/editor/components/image-bubble.tsx +27 -11
  141. package/src/editor/components/index.ts +3 -3
  142. package/src/editor/components/table-bubble.tsx +79 -17
  143. package/src/editor/extensions/HighlightDecorationExtension.ts +3 -2
  144. package/src/editor/nodeViews/ReactNodeView.tsx +1 -1
  145. package/src/editor/nodeViews/TaskItemComponent.tsx +9 -8
  146. package/src/editor/schema.ts +135 -59
  147. package/src/editor/selectors/link-selector.tsx +8 -5
  148. package/src/editor/useProseMirror.ts +2 -2
  149. package/src/editor/utils/remove_classes.ts +6 -5
  150. package/src/form/EntityForm.tsx +15 -15
  151. package/src/form/EntityFormActions.tsx +2 -2
  152. package/src/form/PropertyFieldBinding.tsx +64 -64
  153. package/src/form/components/FieldHelperText.tsx +4 -4
  154. package/src/form/components/StorageUploadProgress.tsx +2 -2
  155. package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +1 -1
  156. package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +1 -1
  157. package/src/form/field_bindings/BlockFieldBinding.tsx +54 -53
  158. package/src/form/field_bindings/KeyValueFieldBinding.tsx +290 -289
  159. package/src/form/field_bindings/MapFieldBinding.tsx +2 -2
  160. package/src/form/field_bindings/MultiSelectFieldBinding.tsx +2 -2
  161. package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +1 -1
  162. package/src/form/field_bindings/ReferenceAsStringFieldBinding.tsx +1 -1
  163. package/src/form/field_bindings/ReferenceFieldBinding.tsx +8 -6
  164. package/src/form/field_bindings/RelationFieldBinding.tsx +4 -4
  165. package/src/form/field_bindings/RepeatFieldBinding.tsx +1 -1
  166. package/src/form/field_bindings/SelectFieldBinding.tsx +1 -1
  167. package/src/form/field_bindings/StorageUploadFieldBinding.tsx +84 -84
  168. package/src/form/field_bindings/SwitchFieldBinding.tsx +16 -16
  169. package/src/form/field_bindings/TextFieldBinding.tsx +77 -73
  170. package/src/form/field_bindings/UserSelectFieldBinding.tsx +17 -17
  171. package/src/form/validation.ts +43 -43
  172. package/src/hooks/navigation/useBuildNavigationStateController.tsx +3 -5
  173. package/src/hooks/navigation/useResolvedCollections.ts +27 -7
  174. package/src/hooks/navigation/useResolvedViews.tsx +24 -44
  175. package/src/index.ts +2 -0
  176. package/src/preview/PropertyPreview.tsx +2 -2
  177. package/src/preview/components/ImagePreview.tsx +2 -1
  178. package/src/preview/components/UrlComponentPreview.tsx +11 -2
  179. package/src/preview/components/UserPreview.tsx +1 -1
  180. package/src/preview/property_previews/ArrayOfMapsPreview.tsx +2 -2
  181. package/src/preview/property_previews/ArrayOfReferencesPreview.tsx +4 -4
  182. package/src/preview/property_previews/ArrayOfRelationsPreview.tsx +3 -3
  183. package/src/preview/property_previews/ArrayOfStorageComponentsPreview.tsx +3 -3
  184. package/src/preview/property_previews/ArrayOfStringsPreview.tsx +3 -2
  185. package/src/preview/property_previews/ArrayOneOfPreview.tsx +6 -8
  186. package/src/preview/property_previews/ArrayPropertyEnumPreview.tsx +1 -1
  187. package/src/preview/property_previews/ArrayPropertyPreview.tsx +3 -3
  188. package/src/preview/property_previews/MapPropertyPreview.tsx +4 -3
  189. package/src/preview/property_previews/NumberPropertyPreview.tsx +5 -3
  190. package/src/preview/property_previews/StringPropertyPreview.tsx +10 -8
  191. package/src/types/components/EntityFormActionsProps.tsx +1 -1
  192. package/src/types/components/EntityFormProps.tsx +2 -2
  193. package/src/types/fields.tsx +2 -2
  194. package/dist/CollectionEditorDialog-CmGXXSY9.js.map +0 -1
  195. package/dist/ContentHomePage-C7vFqKSe.js +0 -1784
  196. package/dist/ContentHomePage-C7vFqKSe.js.map +0 -1
  197. package/dist/ExportCollectionAction-BfN34eWX.js.map +0 -1
  198. package/dist/PropertyEditView-Cvryrb3B.js.map +0 -1
  199. package/dist/RoleChip-QtUFXeTp.js +0 -67
  200. package/dist/RoleChip-QtUFXeTp.js.map +0 -1
  201. package/dist/RolesView-BCb7qwWs.js +0 -437
  202. package/dist/RolesView-BCb7qwWs.js.map +0 -1
  203. package/dist/UsersView-Cex24r8H.js +0 -408
  204. package/dist/UsersView-Cex24r8H.js.map +0 -1
  205. package/dist/collection_editor/types/config_permissions.d.ts +0 -19
  206. package/dist/index-DjduZG1T.js.map +0 -1
  207. package/dist/index-MKPc70-v.js.map +0 -1
  208. package/dist/markdown-z2Ir7Cgo.js.map +0 -1
  209. package/dist/util-DbWax_sV.js.map +0 -1
  210. package/src/collection_editor/types/config_permissions.ts +0 -20
@@ -15,12 +15,12 @@ export function NumberPropertyField({ disabled }: {
15
15
  const { t } = useTranslation();
16
16
 
17
17
  const columnTypePath = "columnType";
18
- const columnTypeValue: string | undefined = getIn(values, columnTypePath);
19
- const columnTypeError: string | undefined = getIn(touched, columnTypePath) && getIn(errors, columnTypePath);
18
+ const columnTypeValue: string | undefined = getIn(values, columnTypePath) as string | undefined;
19
+ const columnTypeError: string | undefined = (getIn(touched, columnTypePath) && getIn(errors, columnTypePath)) as string | undefined;
20
20
 
21
21
  const isIdPath = "isId";
22
- const isIdValue: string | boolean | undefined = getIn(values, isIdPath);
23
- const isIdError: string | undefined = getIn(touched, isIdPath) && getIn(errors, isIdPath);
22
+ const isIdValue: string | boolean | undefined = getIn(values, isIdPath) as string | boolean | undefined;
23
+ const isIdError: string | undefined = (getIn(touched, isIdPath) && getIn(errors, isIdPath)) as string | undefined;
24
24
 
25
25
  return (
26
26
  <>
@@ -109,7 +109,7 @@ export function NumberPropertyField({ disabled }: {
109
109
  setFieldValue("defaultValue", e.target.value === "" ? undefined : parseFloat(e.target.value));
110
110
  }}
111
111
  label={t("default_value")}
112
- value={getIn(values, "defaultValue") ?? ""}/>
112
+ value={(getIn(values, "defaultValue") as string | number | undefined) ?? ""}/>
113
113
 
114
114
  </div>
115
115
  </>
@@ -34,8 +34,8 @@ export function ReferencePropertyField({
34
34
  </div>;
35
35
 
36
36
  const pathPath = asString ? "reference.slug" : (multiple ? "of.slug" : "path");
37
- const pathValue: string | undefined = getIn(values, pathPath);
38
- const pathError: string | undefined = showErrors && getIn(errors, pathPath);
37
+ const pathValue: string | undefined = getIn(values, pathPath) as string | undefined;
38
+ const pathError: string | undefined = (showErrors && getIn(errors, pathPath)) as string | undefined;
39
39
 
40
40
  return (
41
41
  <>
@@ -33,8 +33,8 @@ export function RepeatPropertyField({
33
33
  } = useFormex<ArrayProperty>();
34
34
 
35
35
  const [propertyDialogOpen, setPropertyDialogOpen] = useState(false);
36
- const ofProperty = getIn(values, "of");
37
- const ofPropertyError = getIn(touched, "of") && getIn(errors, "of");
36
+ const ofProperty = getIn(values, "of") as Property | undefined;
37
+ const ofPropertyError = (getIn(touched, "of") && getIn(errors, "of")) as string | undefined;
38
38
 
39
39
  const onPropertyChanged = ({ id, property, namespace }:
40
40
  { id?: string, property: Property, namespace?: string }) => {
@@ -61,16 +61,16 @@ export function StoragePropertyField({
61
61
  const imageResizeFormat = `${imageResize}.format`;
62
62
  const imageResizeQuality = `${imageResize}.quality`;
63
63
 
64
- const fileNameValue = getIn(values, fileName) ?? "{rand}_{file}";
65
- const storagePathValue = getIn(values, storagePath) ?? "/";
66
- const maxSizeValue = getIn(values, maxSize);
64
+ const fileNameValue = (getIn(values, fileName) as string | undefined) ?? "{rand}_{file}";
65
+ const storagePathValue = (getIn(values, storagePath) as string | undefined) ?? "/";
66
+ const maxSizeValue = getIn(values, maxSize) as number | undefined;
67
67
 
68
68
  // Image resize values
69
- const imageResizeMaxWidthValue = getIn(values, imageResizeMaxWidth);
70
- const imageResizeMaxHeightValue = getIn(values, imageResizeMaxHeight);
71
- const imageResizeModeValue = getIn(values, imageResizeMode) ?? "cover";
72
- const imageResizeFormatValue = getIn(values, imageResizeFormat) ?? "original";
73
- const imageResizeQualityValue = getIn(values, imageResizeQuality);
69
+ const imageResizeMaxWidthValue = getIn(values, imageResizeMaxWidth) as number | undefined;
70
+ const imageResizeMaxHeightValue = getIn(values, imageResizeMaxHeight) as number | undefined;
71
+ const imageResizeModeValue = (getIn(values, imageResizeMode) as string | undefined) ?? "cover";
72
+ const imageResizeFormatValue = (getIn(values, imageResizeFormat) as string | undefined) ?? "original";
73
+ const imageResizeQualityValue = getIn(values, imageResizeQuality) as number | undefined;
74
74
 
75
75
  const storedValue = getIn(values, acceptedFiles);
76
76
  const fileTypesValue: string[] | undefined = Array.isArray(storedValue) ? storedValue : undefined;
@@ -21,12 +21,12 @@ export function StringPropertyField({
21
21
  const { t } = useTranslation();
22
22
 
23
23
  const columnTypePath = "columnType";
24
- const columnTypeValue: string | undefined = getIn(values, columnTypePath);
25
- const columnTypeError: string | undefined = getIn(touched, columnTypePath) && getIn(errors, columnTypePath);
24
+ const columnTypeValue: string | undefined = getIn(values, columnTypePath) as string | undefined;
25
+ const columnTypeError: string | undefined = (getIn(touched, columnTypePath) && getIn(errors, columnTypePath)) as string | undefined;
26
26
 
27
27
  const isIdPath = "isId";
28
- const isIdValue: string | boolean | undefined = getIn(values, isIdPath);
29
- const isIdError: string | undefined = getIn(touched, isIdPath) && getIn(errors, isIdPath);
28
+ const isIdValue: string | boolean | undefined = getIn(values, isIdPath) as string | boolean | undefined;
29
+ const isIdError: string | undefined = (getIn(touched, isIdPath) && getIn(errors, isIdPath)) as string | undefined;
30
30
 
31
31
  return (
32
32
  <>
@@ -140,7 +140,7 @@ export function StringPropertyField({
140
140
  setFieldValue("defaultValue", e.target.value === "" ? undefined : e.target.value);
141
141
  }}
142
142
  label={t("default_value")}
143
- value={getIn(values, "defaultValue") ?? ""}/>
143
+ value={(getIn(values, "defaultValue") as string | undefined) ?? ""}/>
144
144
 
145
145
  </div>
146
146
  </>
@@ -15,7 +15,8 @@ export function UrlPropertyField({
15
15
 
16
16
  const { values, setFieldValue } = useFormex();
17
17
 
18
- const urlValue = getIn(values, "url");
18
+ const urlRawValue = getIn(values, "url");
19
+ const urlValue = typeof urlRawValue === "string" ? urlRawValue : "[NONE]";
19
20
 
20
21
  return (
21
22
  <>
@@ -82,7 +83,7 @@ export function UrlPropertyField({
82
83
  setFieldValue("defaultValue", e.target.value === "" ? undefined : e.target.value);
83
84
  }}
84
85
  label={"Default value"}
85
- value={getIn(values, "defaultValue") ?? ""}/>
86
+ value={(getIn(values, "defaultValue") as string | undefined) ?? ""}/>
86
87
 
87
88
  </div>
88
89
  </>
@@ -9,8 +9,8 @@ export function VectorPropertyField({ disabled }: {
9
9
  const { values, setFieldValue, touched, errors } = useFormex();
10
10
 
11
11
  const dimensionsPath = "dimensions";
12
- const dimensionsValue = getIn(values, dimensionsPath);
13
- const dimensionsError = getIn(touched, dimensionsPath) && getIn(errors, dimensionsPath);
12
+ const dimensionsValue = getIn(values, dimensionsPath) as number | undefined;
13
+ const dimensionsError = (getIn(touched, dimensionsPath) && getIn(errors, dimensionsPath)) as string | undefined;
14
14
 
15
15
  return (
16
16
  <div className={"col-span-12"}>
@@ -30,7 +30,7 @@ export function ArrayPropertyValidation({
30
30
  <GeneralPropertyValidation disabled={disabled}/>
31
31
 
32
32
  {min && <div className={"col-span-6"}>
33
- <DebouncedTextField value={getIn(values, validationMin)}
33
+ <DebouncedTextField value={getIn(values, validationMin) as number | undefined}
34
34
  disabled={disabled}
35
35
  label={t("min_length")}
36
36
  name={validationMin}
@@ -39,7 +39,7 @@ export function ArrayPropertyValidation({
39
39
  onChange={handleChange}/>
40
40
  </div>}
41
41
  {max && <div className={"col-span-6"}>
42
- <DebouncedTextField value={getIn(values, validationMax)}
42
+ <DebouncedTextField value={getIn(values, validationMax) as number | undefined}
43
43
  disabled={disabled}
44
44
  label={t("max_length")}
45
45
  name={validationMax}
@@ -52,7 +52,7 @@ export function GeneralPropertyValidation({ disabled }: {
52
52
  {getIn(values, validationRequired) && <div className={"col-span-12"}>
53
53
  <DebouncedTextField
54
54
  disabled={disabled}
55
- value={getIn(values, validationRequiredMessage)}
55
+ value={getIn(values, validationRequiredMessage) as string | undefined}
56
56
  label={t("required_message")}
57
57
  name={validationRequiredMessage}
58
58
  size="small"
@@ -31,7 +31,7 @@ export function NumberPropertyValidation({ disabled }: {
31
31
 
32
32
 
33
33
  <div className={"col-span-6"}>
34
- <DebouncedTextField value={getIn(values, validationMin)}
34
+ <DebouncedTextField value={getIn(values, validationMin) as number | undefined}
35
35
  label={t("min_value")}
36
36
  name={validationMin}
37
37
  type="number"
@@ -41,12 +41,11 @@ export function NumberPropertyValidation({ disabled }: {
41
41
  </div>
42
42
 
43
43
  <div className={"col-span-6"}>
44
- <DebouncedTextField value={getIn(values, validationMax)}
44
+ <DebouncedTextField value={getIn(values, validationMax) as number | undefined}
45
45
  label={t("max_value")}
46
46
  name={validationMax}
47
47
  type="number"
48
48
  size="small"
49
-
50
49
  disabled={disabled}
51
50
  onChange={handleChange}/>
52
51
  </div>
@@ -54,24 +53,22 @@ export function NumberPropertyValidation({ disabled }: {
54
53
 
55
54
  <div className={"col-span-6"}>
56
55
  <DebouncedTextField
57
- value={getIn(values, validationLessThan)}
56
+ value={getIn(values, validationLessThan) as number | undefined}
58
57
  label={t("less_than")}
59
58
  name={validationLessThan}
60
59
  type="number"
61
60
  size="small"
62
-
63
61
  disabled={disabled}
64
62
  onChange={handleChange}/>
65
63
  </div>
66
64
 
67
65
  <div className={"col-span-6"}>
68
66
  <DebouncedTextField
69
- value={getIn(values, validationMoreThan)}
67
+ value={getIn(values, validationMoreThan) as number | undefined}
70
68
  label={t("more_than")}
71
69
  name={validationMoreThan}
72
70
  type="number"
73
71
  size="small"
74
-
75
72
  disabled={disabled}
76
73
  onChange={handleChange}/>
77
74
  </div>
@@ -49,7 +49,7 @@ export function StringPropertyValidation({
49
49
  const matchesError = getIn(errors, validationMatches);
50
50
 
51
51
  const matchesValue = getIn(values, validationMatches);
52
- const matchesStringValue = typeof matchesValue === "string" ? matchesValue : serializeRegExp(matchesValue);
52
+ const matchesStringValue = typeof matchesValue === "string" ? matchesValue : serializeRegExp(matchesValue as RegExp);
53
53
  return (
54
54
  <div className={"grid grid-cols-12 gap-2"}>
55
55
 
@@ -101,7 +101,7 @@ export function StringPropertyValidation({
101
101
  <div className={"grid grid-cols-12 gap-2 col-span-12"}>
102
102
  {length && <div className={"col-span-4"}>
103
103
  <DebouncedTextField
104
- value={getIn(values, validationLength)}
104
+ value={getIn(values, validationLength) as number | undefined}
105
105
  label={t("exact_length")}
106
106
  name={validationLength}
107
107
  type="number"
@@ -112,7 +112,7 @@ export function StringPropertyValidation({
112
112
  </div>}
113
113
 
114
114
  {min && <div className={"col-span-4"}>
115
- <DebouncedTextField value={getIn(values, validationMin)}
115
+ <DebouncedTextField value={getIn(values, validationMin) as number | undefined}
116
116
  label={t("min_length")}
117
117
  name={validationMin}
118
118
  type="number"
@@ -123,7 +123,7 @@ export function StringPropertyValidation({
123
123
  </div>}
124
124
 
125
125
  {max && <div className={"col-span-4"}>
126
- <DebouncedTextField value={getIn(values, validationMax)}
126
+ <DebouncedTextField value={getIn(values, validationMax) as number | undefined}
127
127
  label={t("max_length")}
128
128
  name={validationMax}
129
129
  type="number"
@@ -60,7 +60,7 @@ export interface ArrayContainerProps<T> {
60
60
  max?: number;
61
61
  }
62
62
 
63
- const buildIdsMap = (value: any[]) =>
63
+ const buildIdsMap = (value: unknown[]) =>
64
64
  value && Array.isArray(value) && value.length > 0
65
65
  ? value
66
66
  .map((v, index) => {
@@ -143,7 +143,7 @@ function SortableItem({
143
143
  type ArrayContainerItemProps = {
144
144
  nodeRef: (node: HTMLElement | null) => void;
145
145
  style: React.CSSProperties;
146
- dragHandleProps: any;
146
+ dragHandleProps: Record<string, unknown>;
147
147
  index: number;
148
148
  internalId: number;
149
149
  size?: "small" | "medium";
@@ -220,7 +220,7 @@ export function ArrayItemOptions({
220
220
  sortable,
221
221
  addInIndex
222
222
  }: {
223
- dragHandleProps: any;
223
+ dragHandleProps: Record<string, unknown>;
224
224
  direction?: "row" | "column";
225
225
  disabled: boolean;
226
226
  remove: (index: number) => void;
@@ -44,8 +44,27 @@ export type DefaultAppBarProps<ADDITIONAL_PROPS = object> = {
44
44
 
45
45
  dropDownActions?: React.ReactNode;
46
46
 
47
+ /**
48
+ * Whether to render the dark/light/system mode toggle in the app bar.
49
+ * Set to `false` when the drawer owns this action.
50
+ * @default true
51
+ */
47
52
  includeModeToggle?: boolean;
48
53
 
54
+ /**
55
+ * Whether to render the language switcher in the app bar.
56
+ * Set to `false` when the drawer owns this action.
57
+ * @default true
58
+ */
59
+ includeLanguageToggle?: boolean;
60
+
61
+ /**
62
+ * Whether to render the user avatar / menu in the app bar.
63
+ * Set to `false` when the drawer owns this action.
64
+ * @default true
65
+ */
66
+ includeUserMenu?: boolean;
67
+
49
68
  className?: string;
50
69
 
51
70
  style?: React.CSSProperties;
@@ -67,6 +86,8 @@ export const DefaultAppBar = function DefaultAppBar({
67
86
  startAdornment,
68
87
  dropDownActions,
69
88
  includeModeToggle = true,
89
+ includeLanguageToggle = true,
90
+ includeUserMenu = true,
70
91
  className,
71
92
  style,
72
93
  user: userProp,
@@ -193,8 +214,6 @@ export const DefaultAppBar = function DefaultAppBar({
193
214
  </div>
194
215
  {startAdornment}
195
216
 
196
- {startAdornment}
197
-
198
217
  <div className={"grow"}/>
199
218
 
200
219
  {endAdornment &&
@@ -202,7 +221,7 @@ export const DefaultAppBar = function DefaultAppBar({
202
221
  {endAdornment}
203
222
  </ErrorBoundary>}
204
223
 
205
- <LanguageToggle/>
224
+ {includeLanguageToggle && <LanguageToggle/>}
206
225
 
207
226
  {includeModeToggle &&
208
227
  <Menu
@@ -220,34 +239,36 @@ export const DefaultAppBar = function DefaultAppBar({
220
239
  size={iconSize.smallest}/>{t("system_mode")}</MenuItem>
221
240
  </Menu>}
222
241
 
223
- <Menu trigger={<div aria-label="User menu" role="button">{avatarComponent}</div>}>
224
- {user && <div className={"px-4 py-2 mb-2"}>
225
- {user.displayName && <Typography variant={"body1"} color={"secondary"}>
226
- {user.displayName}
227
- </Typography>}
228
- {user.email && <Typography variant={"body2"} color={"secondary"}>
229
- {user.email}
230
- </Typography>}
231
- </div>}
232
-
233
- {dropDownActions}
234
-
235
- {!dropDownActions && <>
236
- <MenuItem onClick={() => navigate("/settings")}>
237
- <SettingsIcon/>
238
- {t("project_settings")}
239
- </MenuItem>
240
- <MenuItem onClick={async () => {
241
- await authController.signOut();
242
- // replace current route with home
243
- navigate("/");
244
- }}>
245
- <LogOutIcon/>
246
- {t("log_out")}
247
- </MenuItem>
248
- </>}
249
-
250
- </Menu>
242
+
243
+ {includeUserMenu &&
244
+ <Menu trigger={<div aria-label="User menu" role="button">{avatarComponent}</div>}>
245
+ {user && <div className={"px-4 py-2 mb-2"}>
246
+ {user.displayName && <Typography variant={"body1"} color={"secondary"}>
247
+ {user.displayName}
248
+ </Typography>}
249
+ {user.email && <Typography variant={"body2"} color={"secondary"}>
250
+ {user.email}
251
+ </Typography>}
252
+ </div>}
253
+
254
+ {dropDownActions}
255
+
256
+ {!dropDownActions && <>
257
+ <MenuItem onClick={() => navigate("/settings")}>
258
+ <SettingsIcon/>
259
+ {t("account_settings")}
260
+ </MenuItem>
261
+ <MenuItem onClick={async () => {
262
+ await authController.signOut();
263
+ // replace current route with home
264
+ navigate("/");
265
+ }}>
266
+ <LogOutIcon/>
267
+ {t("log_out")}
268
+ </MenuItem>
269
+ </>}
270
+
271
+ </Menu>}
251
272
 
252
273
  </div>
253
274
  );