@rebasepro/admin 0.2.3 → 0.2.4

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
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rebasepro/admin",
3
3
  "type": "module",
4
- "version": "0.2.3",
4
+ "version": "0.2.4",
5
5
  "description": "Rebase CMS — content management views, forms, and routing",
6
6
  "funding": {
7
7
  "url": "https://github.com/sponsors/rebaseco"
@@ -84,13 +84,13 @@
84
84
  "react-dropzone": "^14.4.1",
85
85
  "react-use-measure": "^2.1.7",
86
86
  "zod": "^3.25.76",
87
- "@rebasepro/common": "0.2.3",
88
- "@rebasepro/formex": "0.2.3",
89
- "@rebasepro/core": "0.2.3",
90
- "@rebasepro/schema-inference": "0.2.3",
91
- "@rebasepro/ui": "0.2.3",
92
- "@rebasepro/utils": "0.2.3",
93
- "@rebasepro/types": "0.2.3"
87
+ "@rebasepro/common": "0.2.4",
88
+ "@rebasepro/formex": "0.2.4",
89
+ "@rebasepro/core": "0.2.4",
90
+ "@rebasepro/schema-inference": "0.2.4",
91
+ "@rebasepro/types": "0.2.4",
92
+ "@rebasepro/utils": "0.2.4",
93
+ "@rebasepro/ui": "0.2.4"
94
94
  },
95
95
  "peerDependencies": {
96
96
  "react": ">=19.0.0",
@@ -8,7 +8,6 @@ import { useCustomizationController, useRebaseContext, useAuthController, useSna
8
8
  import { getTableName } from "@rebasepro/common";
9
9
  import { useNavigate } from "react-router-dom";
10
10
  import { CollectionEditorController } from "./types/collection_editor_controller";
11
- import { CollectionEditorPermissionsBuilder } from "./types/config_permissions";
12
11
  import { CollectionInference } from "./types/collection_inference";
13
12
  import { CollectionGenerationCallback } from "./api/generateCollectionApi";
14
13
  import { CollectionEditorDialogsContext, CollectionEditorDialogsState } from "./CollectionEditorDialogsContext";
@@ -27,10 +26,7 @@ export interface ConfigControllerProviderProps {
27
26
  */
28
27
  collectionInference?: CollectionInference;
29
28
 
30
- /**
31
- * Use this builder to define the permissions for the configuration per user.
32
- */
33
- configPermissions?: CollectionEditorPermissionsBuilder;
29
+
34
30
 
35
31
  extraView?: {
36
32
  View: React.ComponentType<{
@@ -59,7 +55,6 @@ export const ConfigControllerProvider = React.memo(
59
55
  function ConfigControllerProvider({
60
56
  children,
61
57
  collectionConfigController,
62
- configPermissions,
63
58
  collectionInference,
64
59
  extraView,
65
60
  getUser,
@@ -123,11 +118,7 @@ export const ConfigControllerProvider = React.memo(
123
118
  collection?: EntityCollection;
124
119
  }>();
125
120
 
126
- const defaultConfigPermissions: CollectionEditorPermissionsBuilder = useCallback(() => ({
127
- createCollections: true,
128
- editCollections: true,
129
- deleteCollections: true
130
- }), []);
121
+
131
122
 
132
123
  const editCollection = useCallback(({
133
124
  id,
@@ -381,10 +372,9 @@ export const ConfigControllerProvider = React.memo(
381
372
  editCollection,
382
373
  createCollection,
383
374
  editProperty,
384
- configPermissions: configPermissions ?? defaultConfigPermissions,
385
375
  pathSuggestions,
386
376
  configController: collectionConfigController
387
- }), [editCollection, createCollection, editProperty, configPermissions, defaultConfigPermissions, pathSuggestions, collectionConfigController]);
377
+ }), [editCollection, createCollection, editProperty, pathSuggestions, collectionConfigController]);
388
378
 
389
379
  return (
390
380
  <ConfigControllerContext.Provider value={collectionConfigController}>
@@ -30,9 +30,7 @@ export type {
30
30
  export type {
31
31
  CollectionEditorController
32
32
  } from "./types/collection_editor_controller";
33
- export type {
34
- CollectionEditorPermissions, CollectionEditorPermissionsBuilder
35
- } from "./types/config_permissions";
33
+
36
34
  export type {
37
35
  CollectionInference
38
36
  } from "./types/collection_inference";
@@ -1,4 +1,3 @@
1
- import { CollectionEditorPermissionsBuilder } from "./config_permissions";
2
1
  import { CollectionsConfigController } from "./config_controller";
3
2
  import { Entity, EntityCollection, Property } from "@rebasepro/types";
4
3
 
@@ -57,8 +56,6 @@ export interface CollectionEditorController {
57
56
  */
58
57
  configController: CollectionsConfigController;
59
58
 
60
- configPermissions: CollectionEditorPermissionsBuilder;
61
-
62
59
  pathSuggestions: string[] | undefined;
63
60
 
64
61
  }
@@ -19,12 +19,7 @@ export function EditorCollectionAction({
19
19
 
20
20
  const parentCollection = parentCollectionSlugs.length > 0 ? collectionRegistry.getCollection(parentCollectionSlugs[parentCollectionSlugs.length - 1]) : undefined;
21
21
 
22
- const canEditCollection = !collectionEditorController.configController?.readOnly && (collectionEditorController.configPermissions
23
- ? collectionEditorController.configPermissions({
24
- user: authController.user,
25
- collection
26
- }).editCollections
27
- : true);
22
+ const canEditCollection = !collectionEditorController.configController?.readOnly;
28
23
 
29
24
  const tooltipTitle = collectionEditorController.configController?.readOnly
30
25
  ? (collectionEditorController.configController.readOnlyReason || t("studio_editor_collection_disabled"))
@@ -25,12 +25,7 @@ export function EditorCollectionActionStart({
25
25
  const snackbarController = useSnackbarController();
26
26
  const { t } = useTranslation();
27
27
 
28
- const canEditCollection = collectionEditorController.configPermissions
29
- ? collectionEditorController.configPermissions({
30
- user: authController.user,
31
- collection
32
- }).editCollections
33
- : true;
28
+ const canEditCollection = !configController.readOnly;
34
29
 
35
30
  let saveDefaultFilterButton = null;
36
31
  if (!equal(getObjectOrNull(tableController.filterValues), getObjectOrNull(collection.defaultFilter)) ||
@@ -19,12 +19,7 @@ export function EditorEntityAction({
19
19
 
20
20
  const parentCollection = parentCollectionSlugs.length > 0 ? collectionRegistry.getCollection(parentCollectionSlugs[parentCollectionSlugs.length - 1]) : undefined;
21
21
 
22
- const canEditCollection = collectionEditorController.configPermissions
23
- ? collectionEditorController.configPermissions({
24
- user: authController.user,
25
- collection
26
- }).editCollections
27
- : true;
22
+ const canEditCollection = !collectionEditorController.configController?.readOnly;
28
23
 
29
24
  const isDirty = formContext?.formex.dirty ?? false;
30
25
 
@@ -21,16 +21,9 @@ export function HomePageEditorCollectionAction({
21
21
  const collectionEditorController = useCollectionEditorController();
22
22
  const { t } = useTranslation();
23
23
 
24
- const permissions = collectionEditorController?.configPermissions
25
- ? collectionEditorController.configPermissions({
26
- user: authController.user,
27
- collection
28
- })
29
- : {
30
- createCollections: false,
31
- editCollections: false,
32
- deleteCollections: false
33
- };
24
+ const canCreateCollections = !configController.readOnly;
25
+ const canEditCollections = !configController.readOnly;
26
+ const canDeleteCollections = !configController.readOnly;
34
27
 
35
28
  const onEditCollectionClicked = () => {
36
29
  collectionEditorController?.editCollection({
@@ -67,13 +60,13 @@ export function HomePageEditorCollectionAction({
67
60
  return <>
68
61
 
69
62
  <div>
70
- {permissions.deleteCollections &&
63
+ {canDeleteCollections &&
71
64
  <Menu
72
65
  trigger={<IconButton size={"small"}>
73
66
  <MoreVerticalIcon/>
74
67
  </IconButton>}
75
68
  >
76
- {permissions.createCollections &&
69
+ {canCreateCollections &&
77
70
  <MenuItem
78
71
  dense={true}
79
72
  onClick={(event: React.MouseEvent) => {
@@ -100,11 +93,11 @@ export function HomePageEditorCollectionAction({
100
93
 
101
94
  }
102
95
 
103
- {permissions.editCollections &&
96
+ {canEditCollections &&
104
97
  <IconButton
105
98
  size={"small"}
106
99
  onClick={(event: React.MouseEvent) => {
107
- onEditCollectionClicked();
100
+ onEditCollectionClicked();
108
101
  }}>
109
102
  <SettingsIcon/>
110
103
  </IconButton>}
@@ -17,11 +17,7 @@ export function NewCollectionCard({
17
17
 
18
18
  if (!context.navigationStateController?.topLevelNavigation)
19
19
  return null;
20
- const canCreateCollections = collectionEditorController.configPermissions
21
- ? collectionEditorController.configPermissions({
22
- user: authController.user
23
- }).createCollections
24
- : true;
20
+ const canCreateCollections = !collectionEditorController?.configController?.readOnly;
25
21
 
26
22
  return (
27
23
  <Card className={cls("h-full p-4 min-h-[124px]")}
@@ -22,12 +22,7 @@ export function PropertyAddColumnComponent({
22
22
  const authController = useAuthController();
23
23
  const collectionEditorController = useCollectionEditorController();
24
24
  const { t } = useTranslation();
25
- const canEditCollection = collectionEditorController.configPermissions
26
- ? collectionEditorController.configPermissions({
27
- user: authController.user,
28
- collection
29
- }).editCollections
30
- : true;
25
+ const canEditCollection = !collectionEditorController.configController?.readOnly;
31
26
 
32
27
  return (
33
28
  <Tooltip
@@ -36,7 +31,7 @@ export function PropertyAddColumnComponent({
36
31
  <div
37
32
  className={"p-0.5 w-20 h-full flex items-center justify-center cursor-pointer bg-surface-100/40 bg-surface-100/40 hover:bg-surface-100 dark:bg-surface-900 dark:bg-opacity-40 dark:bg-surface-900/40 dark:hover:bg-surface-800"}
38
33
  // className={onHover ? "bg-white dark:bg-surface-900" : undefined}
39
- onClick={() => {
34
+ onClick={canEditCollection ? () => {
40
35
  collectionEditorController.editProperty({
41
36
  editedCollectionId: collection.slug,
42
37
  parentCollectionSlugs, parentEntityIds,
@@ -44,7 +39,7 @@ export function PropertyAddColumnComponent({
44
39
  collection,
45
40
  existingEntities: tableController.data
46
41
  });
47
- }}>
42
+ } : undefined}>
48
43
  <PlusIcon/>
49
44
  </div>
50
45
  </Tooltip>
@@ -10,6 +10,7 @@ import {
10
10
  DialogContent,
11
11
  DialogTitle,
12
12
  iconSize,
13
+ TextField,
13
14
  Typography
14
15
  } from "@rebasepro/ui";
15
16
  import { EntityCollection } from "@rebasepro/types";
@@ -52,7 +53,7 @@ export function CollectionJsonImportDialog({
52
53
  const [errors, setErrors] = useState<CollectionValidationError[]>([]);
53
54
  const [touched, setTouched] = useState(false);
54
55
 
55
- const handleJsonChange = useCallback((e: React.ChangeEvent<HTMLTextAreaElement>) => {
56
+ const handleJsonChange = useCallback((e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
56
57
  const value = e.target.value;
57
58
  setJsonValue(value);
58
59
  setTouched(true);
@@ -105,20 +106,15 @@ export function CollectionJsonImportDialog({
105
106
  <code className="bg-surface-200 dark:bg-surface-700 px-1 rounded">properties</code>.
106
107
  </Typography>
107
108
 
108
- <textarea
109
+ <TextField
110
+ multiline
111
+ minRows={12}
109
112
  value={jsonValue}
110
113
  onChange={handleJsonChange}
111
114
  placeholder={EXAMPLE_JSON}
112
- rows={12}
113
- className={cls(
114
- "w-full p-3 font-mono text-sm rounded-md border resize-none overflow-y-auto",
115
- "bg-surface-50 dark:bg-surface-800",
116
- "focus:outline-none focus:ring-2 focus:ring-primary",
117
- "h-[300px]",
118
- errors.length > 0 && touched
119
- ? "border-red-500 dark:border-red-400"
120
- : "border-surface-300 dark:border-surface-600"
121
- )}
115
+ error={errors.length > 0 && touched}
116
+ className="w-full"
117
+ inputClassName="font-mono text-sm resize-none overflow-y-auto h-[300px]"
122
118
  />
123
119
 
124
120
  {errors.length > 0 && touched && (
@@ -30,15 +30,15 @@ import { GetCodeDialog } from "./GetCodeDialog";
30
30
  import { useAIModifiedPaths } from "./AIModifiedPathsContext";
31
31
  import { useCollectionsConfigController } from "../../useCollectionsConfigController";
32
32
 
33
- type PropertyOrBuilder = Property | any;
33
+ type PropertyOrBuilder = Property | Record<string, unknown>;
34
34
 
35
35
  type CollectionEditorFormProps = {
36
36
  showErrors: boolean;
37
37
  isNewCollection: boolean;
38
- propertyErrorsRef?: React.MutableRefObject<any>;
39
- onPropertyError: (propertyKey: string, namespace: string | undefined, error?: Record<string, any>) => void;
38
+ propertyErrorsRef?: React.MutableRefObject<Record<string, unknown> | undefined>;
39
+ onPropertyError: (propertyKey: string, namespace: string | undefined, error?: Record<string, unknown>) => void;
40
40
  setDirty?: (dirty: boolean) => void;
41
- extraIcon: React.ReactNode | any;
41
+ extraIcon: React.ReactNode;
42
42
  getUser?: (uid: string) => User | null;
43
43
  getData?: () => Promise<object[]>;
44
44
  doCollectionInference?: (collection: EntityCollection) => Promise<Partial<EntityCollection> | null> | undefined;
@@ -138,16 +138,16 @@ export function CollectionPropertiesEditorForm({
138
138
  } else if (
139
139
  typeof newProp === "object" &&
140
140
  "type" in newProp &&
141
- newProp.dataType === "map" &&
142
- newProp.properties
141
+ (newProp as MapProperty).type === "map" &&
142
+ (newProp as MapProperty).properties
143
143
  ) {
144
144
  // This is a map property, check for new nested properties
145
145
  const existingMapProps = typeof existingProp === "object" &&
146
146
  "type" in existingProp &&
147
- existingProp.dataType === "map"
147
+ (existingProp as MapProperty).type === "map"
148
148
  ? (existingProp as MapProperty).properties
149
149
  : undefined;
150
- keys.push(...findNewPropertyKeys(existingMapProps, newProp.properties as Record<string, PropertyOrBuilder>, fullKey));
150
+ keys.push(...findNewPropertyKeys(existingMapProps, (newProp as MapProperty).properties as Record<string, PropertyOrBuilder>, fullKey));
151
151
  }
152
152
  }
153
153
  return keys;
@@ -174,11 +174,11 @@ export function CollectionPropertiesEditorForm({
174
174
  } else if (
175
175
  typeof existingProp === "object" &&
176
176
  "type" in existingProp &&
177
- existingProp.dataType === "map" &&
177
+ (existingProp as MapProperty).type === "map" &&
178
178
  typeof newProp === "object" &&
179
179
  "type" in newProp &&
180
- newProp.dataType === "map" &&
181
- newProp.properties
180
+ (newProp as MapProperty).type === "map" &&
181
+ (newProp as MapProperty).properties
182
182
  ) {
183
183
  // Both are map properties, recursively add new nested properties
184
184
  // Only if the existing map has properties, merge them; otherwise keep existing as-is
@@ -188,9 +188,9 @@ export function CollectionPropertiesEditorForm({
188
188
  ...existingProp,
189
189
  properties: addNewPropertiesOnly(
190
190
  existingMapProps,
191
- newProp.properties as Record<string, PropertyOrBuilder>
192
- )
193
- };
191
+ (newProp as MapProperty).properties as Record<string, PropertyOrBuilder>
192
+ ) as Properties
193
+ } as MapProperty;
194
194
  }
195
195
  // If existingProp doesn't have properties, keep it as-is (don't overwrite with inferred)
196
196
  }
@@ -354,7 +354,7 @@ export function CollectionPropertiesEditorForm({
354
354
 
355
355
  };
356
356
 
357
- const onPropertyErrorInternal = (id: string, namespace?: string, error?: Record<string, any>) => {
357
+ const onPropertyErrorInternal = (id: string, namespace?: string, error?: Record<string, unknown>) => {
358
358
  const propertyPath = id ? getFullId(id, namespace) : undefined;
359
359
  console.debug("onPropertyErrorInternal", {
360
360
  id,
@@ -374,7 +374,7 @@ export function CollectionPropertiesEditorForm({
374
374
  setSelectedPropertyKey(undefined);
375
375
  };
376
376
 
377
- const initialErrors = selectedPropertyKey && propertyErrorsRef?.current?.properties ? propertyErrorsRef.current.properties[selectedPropertyKey] : undefined;
377
+ const initialErrors = selectedPropertyKey && propertyErrorsRef?.current?.properties ? (propertyErrorsRef.current.properties as Record<string, unknown>)[selectedPropertyKey] as Record<string, any> | undefined : undefined;
378
378
 
379
379
  const emptyCollection = (values?.propertiesOrder === undefined || values.propertiesOrder.length === 0)
380
380
  && (!values?.properties || Object.keys(values.properties).length === 0);
@@ -496,8 +496,8 @@ export function CollectionPropertiesEditorForm({
496
496
  className="sticky top-8 min-h-full w-full flex flex-col justify-center">
497
497
 
498
498
  {selectedPropertyFullId &&
499
- selectedProperty &&
500
- !isPropertyBuilder(selectedProperty) &&
499
+ !!selectedProperty &&
500
+ !isPropertyBuilder(selectedProperty as Property) &&
501
501
  <PropertyForm
502
502
  inArray={false}
503
503
  key={`edit_view_${selectedPropertyIndex}_${generationCounter}`}
@@ -507,7 +507,7 @@ export function CollectionPropertiesEditorForm({
507
507
  autoOpenTypeSelect={false}
508
508
  propertyKey={selectedPropertyKey}
509
509
  propertyNamespace={selectedPropertyNamespace}
510
- property={selectedProperty}
510
+ property={selectedProperty as Property}
511
511
  onPropertyChanged={onPropertyChanged}
512
512
  onDelete={deleteProperty}
513
513
  onError={onPropertyErrorInternal}
@@ -534,7 +534,7 @@ export function CollectionPropertiesEditorForm({
534
534
  </Button>
535
535
  </div>}
536
536
 
537
- {selectedProperty && isPropertyBuilder(selectedProperty) &&
537
+ {!!selectedProperty && isPropertyBuilder(selectedProperty as Property) &&
538
538
  <Typography variant={"label"} className="flex items-center justify-center">
539
539
  {"This property is defined as a property builder in code"}
540
540
  </Typography>}
@@ -551,7 +551,7 @@ export function CollectionPropertiesEditorForm({
551
551
  autoOpenTypeSelect={false}
552
552
  propertyKey={selectedPropertyKey}
553
553
  propertyNamespace={selectedPropertyNamespace}
554
- property={selectedProperty}
554
+ property={selectedProperty as Property | undefined}
555
555
  onPropertyChanged={onPropertyChanged}
556
556
  onDelete={deleteProperty}
557
557
  onError={onPropertyErrorInternal}
@@ -102,7 +102,7 @@ export function CollectionRLSTab() {
102
102
  return [];
103
103
  };
104
104
  const pRows = extractRows(result);
105
- const policies: PostgresPolicy[] = pRows.map((p: any) => {
105
+ const policies: PostgresPolicy[] = pRows.map((p: Record<string, unknown>) => {
106
106
  let parsedRoles: string[] = [];
107
107
  const r = p.roles || p.ROLES;
108
108
  if (Array.isArray(r)) {
@@ -313,7 +313,7 @@ function InlinePolicyEditor({
313
313
  <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
314
314
  <div className="flex flex-col gap-1.5">
315
315
  <Typography variant="caption" className="uppercase tracking-wider text-text-secondary">Policy Name</Typography>
316
- <TextField value={name} onChange={(e: any) => setName(e.target.value)} placeholder="e.g. allow_read_all"/>
316
+ <TextField value={name} onChange={(e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => setName(e.target.value)} placeholder="e.g. allow_read_all"/>
317
317
  </div>
318
318
  <div className="flex flex-col gap-1.5">
319
319
  <Typography variant="caption" className="uppercase tracking-wider text-text-secondary">Behavior</Typography>
@@ -342,13 +342,13 @@ function InlinePolicyEditor({
342
342
  {command !== "INSERT" && (
343
343
  <div className="flex flex-col gap-1.5">
344
344
  <Typography variant="caption" className="uppercase tracking-wider text-text-secondary">USING expression</Typography>
345
- <TextField value={usingExpr} onChange={(e: any) => setUsingExpr(e.target.value)} placeholder="e.g. auth.uid() = user_id"/>
345
+ <TextField value={usingExpr} onChange={(e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => setUsingExpr(e.target.value)} placeholder="e.g. auth.uid() = user_id"/>
346
346
  </div>
347
347
  )}
348
348
  {showCheck && (
349
349
  <div className="flex flex-col gap-1.5">
350
350
  <Typography variant="caption" className="uppercase tracking-wider text-text-secondary">WITH CHECK expression</Typography>
351
- <TextField value={checkExpr} onChange={(e: any) => setCheckExpr(e.target.value)} placeholder="e.g. auth.uid() = user_id"/>
351
+ <TextField value={checkExpr} onChange={(e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => setCheckExpr(e.target.value)} placeholder="e.g. auth.uid() = user_id"/>
352
352
  </div>
353
353
  )}
354
354
  </Paper>
@@ -335,7 +335,7 @@ function EnumEntryDialog({
335
335
  errors
336
336
  } = useFormex<EnumValues>();
337
337
 
338
- const idError = index !== undefined ? getIn(errors, `${enumValuesPath}[${index}].id`) : undefined;
338
+ const idError = index !== undefined ? getIn(errors, `${enumValuesPath}[${index}].id`) as string | undefined : undefined;
339
339
  return <Dialog
340
340
  maxWidth="md"
341
341
  aria-labelledby="enum-edit-dialog"
@@ -10,7 +10,7 @@ import {
10
10
  namespaceToPropertiesPath
11
11
  } from "../util";
12
12
  import { PropertyTree } from "../PropertyTree";
13
- import { ArrayProperty, PropertyConfig } from "@rebasepro/types";
13
+ import { ArrayProperty, PropertyConfig, Property } from "@rebasepro/types";
14
14
 
15
15
  export function BlockPropertyField({
16
16
  disabled,
@@ -59,7 +59,7 @@ export function BlockPropertyField({
59
59
 
60
60
  setFieldValue(`oneOf.${idToPropertiesPath(fullId)}`, undefined, false);
61
61
  const propertiesOrderPath = `oneOf.${namespaceToPropertiesOrderPath(namespace)}`;
62
- const currentPropertiesOrder: string[] = getIn(values, propertiesOrderPath) ?? Object.keys(getIn(values, namespaceToPropertiesPath(namespace)));
62
+ const currentPropertiesOrder: string[] = (getIn(values, propertiesOrderPath) as string[] | undefined) ?? Object.keys(getIn(values, namespaceToPropertiesPath(namespace)) as object ?? {});
63
63
  setFieldValue(propertiesOrderPath, currentPropertiesOrder.filter((p) => p !== propertyKey), false);
64
64
 
65
65
  setPropertyDialogOpen(false);
@@ -134,7 +134,7 @@ export function BlockPropertyField({
134
134
  onDelete={deleteProperty}
135
135
  propertyKey={selectedPropertyKey}
136
136
  propertyNamespace={selectedPropertyNamespace}
137
- property={selectedProperty}
137
+ property={selectedProperty as Property | undefined}
138
138
  existingProperty={Boolean(selectedPropertyKey)}
139
139
  autoUpdateId={!selectedPropertyKey}
140
140
  autoOpenTypeSelect={!selectedPropertyKey}
@@ -35,13 +35,13 @@ export const CommonPropertyFields = React.forwardRef<HTMLDivElement, CommonPrope
35
35
  const { t } = useTranslation();
36
36
 
37
37
  const name = "name";
38
- const nameError = showErrors && getIn(errors, name);
38
+ const nameError = showErrors && (getIn(errors, name) as string | undefined);
39
39
 
40
40
  const id = "id";
41
- const idError = showErrors && getIn(errors, id);
41
+ const idError = showErrors && (getIn(errors, id) as string | undefined);
42
42
 
43
43
  const description = "description";
44
- const descriptionError = showErrors && getIn(errors, description);
44
+ const descriptionError = showErrors && (getIn(errors, description) as string | undefined);
45
45
 
46
46
  return (
47
47
  <div className={"flex flex-col gap-2 col-span-12"}>
@@ -117,20 +117,20 @@ export function DateTimePropertyField({ disabled }: {
117
117
  const { t } = useTranslation();
118
118
 
119
119
  const modePath = "mode";
120
- const modeValue: string | undefined = getIn(values, modePath);
121
- const modeError: string | undefined = getIn(touched, modePath) && getIn(errors, modePath);
120
+ const modeValue: string | undefined = getIn(values, modePath) as string | undefined;
121
+ const modeError: string | undefined = (getIn(touched, modePath) && getIn(errors, modePath)) as string | undefined;
122
122
 
123
123
  const autoValuePath = "autoValue";
124
- const autoValueValue: string | undefined = getIn(values, autoValuePath);
125
- const autoValueError: string | undefined = getIn(touched, autoValuePath) && getIn(errors, autoValuePath);
124
+ const autoValueValue: string | undefined = getIn(values, autoValuePath) as string | undefined;
125
+ const autoValueError: string | undefined = (getIn(touched, autoValuePath) && getIn(errors, autoValuePath)) as string | undefined;
126
126
 
127
127
  const timezonePath = "timezone";
128
- const timezoneValue: string | undefined = getIn(values, timezonePath);
129
- const timezoneError: string | undefined = getIn(touched, timezonePath) && getIn(errors, timezonePath);
128
+ const timezoneValue: string | undefined = getIn(values, timezonePath) as string | undefined;
129
+ const timezoneError: string | undefined = (getIn(touched, timezonePath) && getIn(errors, timezonePath)) as string | undefined;
130
130
 
131
131
  const columnTypePath = "columnType";
132
- const columnTypeValue: string | undefined = getIn(values, columnTypePath);
133
- const columnTypeError: string | undefined = getIn(touched, columnTypePath) && getIn(errors, columnTypePath);
132
+ const columnTypeValue: string | undefined = getIn(values, columnTypePath) as string | undefined;
133
+ const columnTypeError: string | undefined = (getIn(touched, columnTypePath) && getIn(errors, columnTypePath)) as string | undefined;
134
134
 
135
135
  return (
136
136
  <>
@@ -1,7 +1,7 @@
1
1
  import React, { useMemo } from "react";
2
2
  import { getIn, useFormex } from "@rebasepro/formex";
3
3
  import { useSnackbarController, useTranslation } from "@rebasepro/core";
4
- import { EnumValueConfig } from "@rebasepro/types";
4
+ import { EnumValueConfig, EnumValues } from "@rebasepro/types";
5
5
  import { resolveEnumValues } from "@rebasepro/common";
6
6
  import { Select, SelectItem } from "@rebasepro/ui";
7
7
  import { EnumForm } from "../EnumForm";
@@ -39,9 +39,9 @@ export function EnumPropertyField({
39
39
 
40
40
  const enumValuesPath = multiselect ? "of.enum" : "enum";
41
41
 
42
- const defaultValue = getIn(values, "defaultValue");
42
+ const defaultValue = getIn(values, "defaultValue") as string | number | undefined;
43
43
 
44
- const valuesEnumValues = getIn(values, enumValuesPath);
44
+ const valuesEnumValues = getIn(values, enumValuesPath) as EnumValues | undefined;
45
45
  const enumValues: EnumValueConfig[] = useMemo(() => {
46
46
  if (!valuesEnumValues || typeof valuesEnumValues === "boolean")
47
47
  return [] as EnumValueConfig[];
@@ -81,7 +81,7 @@ export function EnumPropertyField({
81
81
  }}
82
82
  getData={getData && fullPropertyPath
83
83
  ? () => getData()
84
- .then(res => res.map(entry => getIn(entry, fullPropertyPath)).filter(Boolean))
84
+ .then(res => res.map(entry => getIn(entry, fullPropertyPath) as string).filter(Boolean))
85
85
  : undefined}
86
86
  onValuesChanged={onValuesChanged}/>
87
87
  </div>
@@ -108,7 +108,7 @@ export function EnumPropertyField({
108
108
  setFieldValue("defaultValue", value);
109
109
  }}
110
110
  label={t("default_value")}
111
- value={defaultValue ?? ""}>
111
+ value={defaultValue?.toString() ?? ""}>
112
112
  {enumValues
113
113
  .filter((enumValue) => Boolean(enumValue?.id))
114
114
  .map((enumValue) => (
@@ -53,7 +53,7 @@ export function MapPropertyField({ disabled, getData, allowDataInference, proper
53
53
  const propertiesPath = idToPropertiesPath(fullId);
54
54
  const propertiesOrderPath = namespaceToPropertiesOrderPath(namespace);
55
55
 
56
- const currentPropertiesOrder: string[] = getIn(values, propertiesOrderPath) ?? Object.keys(getIn(values, namespaceToPropertiesPath(namespace)));
56
+ const currentPropertiesOrder: string[] = (getIn(values, propertiesOrderPath) as string[] | undefined) ?? Object.keys(getIn(values, namespaceToPropertiesPath(namespace)) as object ?? {});
57
57
 
58
58
  setFieldValue(propertiesPath, undefined, false);
59
59
  setFieldValue(propertiesOrderPath, currentPropertiesOrder.filter((p) => p !== propertyKey), false);
@@ -139,7 +139,7 @@ export function MapPropertyField({ disabled, getData, allowDataInference, proper
139
139
  onDelete={deleteProperty}
140
140
  propertyKey={selectedPropertyKey}
141
141
  propertyNamespace={selectedPropertyNamespace}
142
- property={selectedProperty}
142
+ property={selectedProperty as Property | undefined}
143
143
  existingProperty={Boolean(selectedPropertyKey)}
144
144
  autoUpdateId={!selectedPropertyKey}
145
145
  autoOpenTypeSelect={!selectedPropertyKey}
@@ -41,15 +41,15 @@ export function MarkdownPropertyField({
41
41
  const htmlPath = `${baseMarkdownPath}.html`;
42
42
  const transformPastedTextPath = `${baseMarkdownPath}.transformPastedText`;
43
43
 
44
- const fileNameValue = getIn(values, fileName) ?? "{rand}_{file}";
45
- const storagePathValue = getIn(values, storagePath) ?? "/";
44
+ const fileNameValue = (getIn(values, fileName) as string | undefined) ?? "{rand}_{file}";
45
+ const storagePathValue = (getIn(values, storagePath) as string | undefined) ?? "/";
46
46
  const maxSizeValue = getIn(values, maxSize);
47
47
 
48
48
  // Markdown config values - check if markdown is an object or boolean
49
49
  const markdownValue = getIn(values, "markdown");
50
50
  const isMarkdownObject = typeof markdownValue === "object" && markdownValue !== null;
51
- const htmlValue = isMarkdownObject ? (markdownValue.html ?? true) : true;
52
- const transformPastedTextValue = isMarkdownObject ? (markdownValue.transformPastedText ?? false) : false;
51
+ const htmlValue = isMarkdownObject ? (((markdownValue as Record<string, unknown>).html as boolean | undefined) ?? true) : true;
52
+ const transformPastedTextValue = isMarkdownObject ? (((markdownValue as Record<string, unknown>).transformPastedText as boolean | undefined) ?? false) : false;
53
53
 
54
54
  const hasFilenameCallback = typeof fileNameValue === "function";
55
55
  const hasStoragePathCallback = typeof storagePathValue === "function";
@@ -209,7 +209,7 @@ export function MarkdownPropertyField({
209
209
  setFieldValue("defaultValue", e.target.value === "" ? undefined : e.target.value);
210
210
  }}
211
211
  label={t("default_value")}
212
- value={getIn(values, "defaultValue") ?? ""}/>
212
+ value={(getIn(values, "defaultValue") as string | undefined) ?? ""}/>
213
213
 
214
214
  </div>
215
215
  </>