@firecms/core 3.0.0-canary.102 → 3.0.0-canary.103

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 (55) hide show
  1. package/dist/components/EntityCollectionTable/internal/popup_field/PopupFormField.d.ts +1 -1
  2. package/dist/form/PropertyFieldBinding.d.ts +1 -1
  3. package/dist/form/field_bindings/ArrayCustomShapedFieldBinding.d.ts +1 -1
  4. package/dist/form/field_bindings/ArrayOfReferencesFieldBinding.d.ts +1 -1
  5. package/dist/form/field_bindings/BlockFieldBinding.d.ts +1 -1
  6. package/dist/form/field_bindings/KeyValueFieldBinding.d.ts +1 -1
  7. package/dist/form/field_bindings/MapFieldBinding.d.ts +1 -1
  8. package/dist/form/field_bindings/MarkdownEditorFieldBinding.d.ts +9 -0
  9. package/dist/form/field_bindings/ReadOnlyFieldBinding.d.ts +1 -1
  10. package/dist/form/field_bindings/RepeatFieldBinding.d.ts +1 -1
  11. package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +1 -1
  12. package/dist/form/index.d.ts +2 -2
  13. package/dist/index.es.js +264 -816
  14. package/dist/index.es.js.map +1 -1
  15. package/dist/index.umd.js +263 -814
  16. package/dist/index.umd.js.map +1 -1
  17. package/dist/types/collections.d.ts +5 -0
  18. package/dist/types/datasource.d.ts +12 -12
  19. package/dist/types/entities.d.ts +1 -0
  20. package/dist/types/fields.d.ts +5 -13
  21. package/dist/util/index.d.ts +1 -0
  22. package/dist/util/storage.d.ts +1 -1
  23. package/package.json +5 -5
  24. package/src/components/EntityCollectionTable/PropertyTableCell.tsx +4 -2
  25. package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +3 -5
  26. package/src/components/EntityCollectionView/EntityCollectionView.tsx +4 -4
  27. package/src/components/common/useTableSearchHelper.ts +1 -0
  28. package/src/core/DefaultDrawer.tsx +1 -1
  29. package/src/core/EntityEditView.tsx +3 -4
  30. package/src/core/field_configs.tsx +2 -2
  31. package/src/form/PropertyFieldBinding.tsx +4 -8
  32. package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +4 -5
  33. package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +3 -3
  34. package/src/form/field_bindings/BlockFieldBinding.tsx +5 -6
  35. package/src/form/field_bindings/KeyValueFieldBinding.tsx +5 -5
  36. package/src/form/field_bindings/MapFieldBinding.tsx +6 -8
  37. package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +133 -0
  38. package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +5 -5
  39. package/src/form/field_bindings/RepeatFieldBinding.tsx +6 -7
  40. package/src/form/field_bindings/StorageUploadFieldBinding.tsx +2 -2
  41. package/src/form/index.tsx +2 -2
  42. package/src/hooks/data/save.ts +5 -1
  43. package/src/internal/useBuildDataSource.ts +29 -14
  44. package/src/preview/PropertyPreview.tsx +2 -2
  45. package/src/types/collections.ts +6 -0
  46. package/src/types/datasource.ts +13 -16
  47. package/src/types/entities.ts +2 -0
  48. package/src/types/fields.tsx +5 -15
  49. package/src/util/index.ts +1 -0
  50. package/src/util/storage.ts +1 -1
  51. package/src/util/useStorageUploadController.tsx +2 -2
  52. package/dist/form/PropertiesForm.d.ts +0 -8
  53. package/dist/form/field_bindings/MarkdownFieldBinding.d.ts +0 -9
  54. package/src/form/PropertiesForm.tsx +0 -81
  55. package/src/form/field_bindings/MarkdownFieldBinding.tsx +0 -695
@@ -44,6 +44,11 @@ export interface EntityCollection<M extends Record<string, any> = any, UserType
44
44
  * This path also determines the URL in FireCMS, unless an alias is specified
45
45
  */
46
46
  path: string;
47
+ /**
48
+ * Optional database id of this collection. If not specified, the default
49
+ * database id will be used.
50
+ */
51
+ databaseId?: string;
47
52
  /**
48
53
  * If this collection is a top level navigation entry, you can set this
49
54
  * property to `true` to indicate that this collection is a collection group.
@@ -14,6 +14,7 @@ export interface FetchEntityProps<M extends Record<string, any> = any> {
14
14
  * @group Datasource
15
15
  */
16
16
  export type ListenEntityProps<M extends Record<string, any> = any> = FetchEntityProps<M> & {
17
+ databaseId?: string;
17
18
  onUpdate: (entity: Entity<M>) => void;
18
19
  onError?: (error: Error) => void;
19
20
  };
@@ -131,7 +132,7 @@ export interface DataSource {
131
132
  * @param entityId
132
133
  * @return `true` if there are no other fields besides the given entity
133
134
  */
134
- checkUniqueField(path: string, name: string, value: any, entityId?: string): Promise<boolean>;
135
+ checkUniqueField(path: string, name: string, value: any, entityId?: string, databaseId?: string): Promise<boolean>;
135
136
  /**
136
137
  * Generate an id for a new entity
137
138
  */
@@ -163,13 +164,9 @@ export type FilterCombinationValidProps = {
163
164
  filterValues: FilterValues<any>;
164
165
  sortBy?: [string, "asc" | "desc"];
165
166
  };
166
- export type SaveEntityDelegateProps<M extends Record<string, any> = any> = Omit<SaveEntityProps<M>, "collection">;
167
- export type FetchCollectionDelegateProps<M extends Record<string, any> = any> = Omit<FetchCollectionProps<M>, "collection"> & {
168
- isCollectionGroup?: boolean;
169
- };
170
- export type ListenCollectionDelegateProps<M extends Record<string, any> = any> = ListenCollectionProps<M> & {
171
- isCollectionGroup?: boolean;
172
- };
167
+ export type SaveEntityDelegateProps<M extends Record<string, any> = any> = SaveEntityProps<M>;
168
+ export type FetchCollectionDelegateProps<M extends Record<string, any> = any> = FetchCollectionProps<M>;
169
+ export type ListenCollectionDelegateProps<M extends Record<string, any> = any> = ListenCollectionProps<M>;
173
170
  export interface DataSourceDelegate {
174
171
  /**
175
172
  * Key that identifies this data source delegate
@@ -213,7 +210,7 @@ export interface DataSourceDelegate {
213
210
  * @param path
214
211
  * @param entityId
215
212
  */
216
- fetchEntity<M extends Record<string, any> = any>({ path, entityId, }: Omit<FetchEntityProps<M>, "collection">): Promise<Entity<M> | undefined>;
213
+ fetchEntity<M extends Record<string, any> = any>({ path, entityId, }: FetchEntityProps<M>): Promise<Entity<M> | undefined>;
217
214
  /**
218
215
  * Get realtime updates on one entity.
219
216
  * @param path
@@ -223,7 +220,7 @@ export interface DataSourceDelegate {
223
220
  * @param onError
224
221
  * @return Function to cancel subscription
225
222
  */
226
- listenEntity?<M extends Record<string, any> = any>({ path, entityId, onUpdate, onError }: Omit<ListenEntityProps<M>, "collection">): () => void;
223
+ listenEntity?<M extends Record<string, any> = any>({ path, entityId, onUpdate, onError }: ListenEntityProps<M>): () => void;
227
224
  /**
228
225
  * Save entity to the specified path
229
226
  * @param path
@@ -246,7 +243,7 @@ export interface DataSourceDelegate {
246
243
  * @param entityId
247
244
  * @return `true` if there are no other fields besides the given entity
248
245
  */
249
- checkUniqueField(path: string, name: string, value: any, entityId?: string): Promise<boolean>;
246
+ checkUniqueField(path: string, name: string, value: any, entityId?: string, databaseId?: string): Promise<boolean>;
250
247
  /**
251
248
  * Generate an id for a new entity
252
249
  */
@@ -259,7 +256,9 @@ export interface DataSourceDelegate {
259
256
  * Check if the given filter combination is valid
260
257
  * @param props
261
258
  */
262
- isFilterCombinationValid?(props: Omit<FilterCombinationValidProps, "collection">): boolean;
259
+ isFilterCombinationValid?(props: Omit<FilterCombinationValidProps, "collection"> & {
260
+ databaseId?: string;
261
+ }): boolean;
263
262
  /**
264
263
  * Get the object to generate the current time in the datasource
265
264
  */
@@ -270,6 +269,7 @@ export interface DataSourceDelegate {
270
269
  initTextSearch?: (props: {
271
270
  context: FireCMSContext;
272
271
  path: string;
272
+ databaseId?: string;
273
273
  collection: EntityCollection;
274
274
  parentCollectionIds?: string[];
275
275
  }) => Promise<boolean>;
@@ -21,6 +21,7 @@ export interface Entity<M extends object> {
21
21
  * Current values
22
22
  */
23
23
  values: EntityValues<M>;
24
+ databaseId?: string;
24
25
  }
25
26
  /**
26
27
  * This type represents a record of key value pairs as described in an
@@ -67,13 +67,9 @@ export interface FieldProps<T extends CMSType = any, CustomProps = any, M extend
67
67
  */
68
68
  partOfArray?: boolean;
69
69
  /**
70
- * Is this field part of a block (oneOf array)
71
- */
72
- partOfBlock?: boolean;
73
- /**
74
- * Is this field being rendered in the entity table popup
70
+ * Should this field render with the minimal amount of UI elements
75
71
  */
76
- tableMode?: boolean;
72
+ minimalistView?: boolean;
77
73
  /**
78
74
  * Should this field autofocus on mount
79
75
  */
@@ -81,7 +77,7 @@ export interface FieldProps<T extends CMSType = any, CustomProps = any, M extend
81
77
  /**
82
78
  * Additional properties set by the developer
83
79
  */
84
- customProps?: CustomProps;
80
+ customProps: CustomProps;
85
81
  /**
86
82
  * Additional values related to the state of the form or the entity
87
83
  */
@@ -118,7 +114,7 @@ export interface FormContext<M extends Record<string, any> = any> {
118
114
  /**
119
115
  * Entity id, it can be null if it's a new entity
120
116
  */
121
- entityId?: string;
117
+ entityId: string;
122
118
  /**
123
119
  * Path this entity is located at
124
120
  */
@@ -157,10 +153,6 @@ export interface PropertyFieldBindingProps<T extends CMSType, M extends Record<s
157
153
  * field is being edited
158
154
  */
159
155
  underlyingValueHasChanged?: boolean;
160
- /**
161
- * Is this field being rendered in a table
162
- */
163
- tableMode?: boolean;
164
156
  /**
165
157
  * Is this field part of an array
166
158
  */
@@ -168,7 +160,7 @@ export interface PropertyFieldBindingProps<T extends CMSType, M extends Record<s
168
160
  /**
169
161
  * Is this field part of a block (oneOf array)
170
162
  */
171
- partOfBlock?: boolean;
163
+ minimalistView?: boolean;
172
164
  /**
173
165
  * Should the field take focus when rendered. When opening the popup view
174
166
  * in table mode, it makes sense to put the focus on the only field rendered.
@@ -21,3 +21,4 @@ export * from "./make_properties_editable";
21
21
  export * from "./join_collections";
22
22
  export * from "./builders";
23
23
  export * from "./useTraceUpdate";
24
+ export * from "./storage";
@@ -9,7 +9,7 @@ interface ResolveFilenameStringParams<M extends object> {
9
9
  file: File;
10
10
  propertyKey: string;
11
11
  }
12
- export declare function resolveFilenameString<M extends object>({ input, storage, values, entityId, path, property, file, propertyKey }: ResolveFilenameStringParams<M>): Promise<string>;
12
+ export declare function resolveStorageFilenameString<M extends object>({ input, storage, values, entityId, path, property, file, propertyKey }: ResolveFilenameStringParams<M>): Promise<string>;
13
13
  interface ResolveStoragePathStringParams<M extends object> {
14
14
  input: string | ((context: UploadedFileContext) => string);
15
15
  storage: StorageConfig;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@firecms/core",
3
3
  "type": "module",
4
- "version": "3.0.0-canary.102",
4
+ "version": "3.0.0-canary.103",
5
5
  "description": "Awesome Firebase/Firestore-based headless open-source CMS",
6
6
  "funding": {
7
7
  "url": "https://github.com/sponsors/firecmsco"
@@ -46,8 +46,9 @@
46
46
  "./package.json": "./package.json"
47
47
  },
48
48
  "dependencies": {
49
- "@firecms/formex": "^3.0.0-canary.102",
50
- "@firecms/ui": "^3.0.0-canary.102",
49
+ "@firecms/editor": "^3.0.0-canary.103",
50
+ "@firecms/formex": "^3.0.0-canary.103",
51
+ "@firecms/ui": "^3.0.0-canary.103",
51
52
  "@hello-pangea/dnd": "^16.6.0",
52
53
  "@radix-ui/react-portal": "^1.1.1",
53
54
  "clsx": "^2.1.1",
@@ -60,7 +61,6 @@
60
61
  "react-dropzone": "^14.2.3",
61
62
  "react-fast-compare": "^3.2.2",
62
63
  "react-image-file-resizer": "^0.4.8",
63
- "react-markdown-editor-lite": "^1.3.4",
64
64
  "react-transition-group": "^4.4.5",
65
65
  "react-use-measure": "^2.1.1",
66
66
  "react-window": "^1.8.10",
@@ -100,7 +100,7 @@
100
100
  "dist",
101
101
  "src"
102
102
  ],
103
- "gitHead": "db22751d03517d639f4b23a26aa1fff81b11ee8d",
103
+ "gitHead": "c33fe736fee99aaf30789aed66e4385563011783",
104
104
  "publishConfig": {
105
105
  "access": "public"
106
106
  },
@@ -49,6 +49,8 @@ export interface PropertyTableCellProps<T extends CMSType> {
49
49
  }
50
50
 
51
51
  function isStorageProperty(property: ResolvedProperty) {
52
+ if (property.dataType === "string" && property.markdown)
53
+ return false;
52
54
  if (property.dataType === "string" && (property as ResolvedStringProperty).storage)
53
55
  return true;
54
56
  if (property.dataType === "array") {
@@ -147,7 +149,7 @@ export const PropertyTableCell = React.memo<PropertyTableCellProps<any>>(
147
149
  onValueUpdated,
148
150
  data: entity,
149
151
  });
150
- } catch (e:any) {
152
+ } catch (e: any) {
151
153
  console.error("onValueChange error", e);
152
154
  setError(e);
153
155
  }
@@ -306,7 +308,7 @@ export const PropertyTableCell = React.memo<PropertyTableCellProps<any>>(
306
308
  updateValue={updateValue}
307
309
  />;
308
310
  fullHeight = true;
309
- } else if (!stringProperty.storage) {
311
+ } else if (stringProperty.markdown || !stringProperty.storage) {
310
312
  const multiline = Boolean(stringProperty.multiline) || Boolean(stringProperty.markdown);
311
313
  innerComponent = <VirtualTableInput error={validationError ?? error}
312
314
  disabled={disabled}
@@ -27,7 +27,7 @@ import { useCustomizationController, useFireCMSContext } from "../../../../hooks
27
27
  import { OnCellValueChangeParams } from "../../../common";
28
28
 
29
29
  interface PopupFormFieldProps<M extends Record<string, any>> {
30
- entity?: Entity<M>;
30
+ entity: Entity<M>;
31
31
  customFieldValidator?: CustomFieldValidator;
32
32
  path: string;
33
33
  tableKey: string;
@@ -74,7 +74,7 @@ export function PopupFormFieldInternal<M extends Record<string, any>>({
74
74
  y: number
75
75
  }>();
76
76
 
77
- const entityId = entityProp?.id;
77
+ const entityId = entityProp.id;
78
78
  const [entity, setEntity] = useState<Entity<M> | undefined>(entityProp);
79
79
  // useEffect(() => {
80
80
  // if (entityId && inputCollection) {
@@ -217,7 +217,6 @@ export function PopupFormFieldInternal<M extends Record<string, any>>({
217
217
  if (!entity)
218
218
  return <></>;
219
219
 
220
- // enableReinitialize={true}
221
220
  // eslint-disable-next-line react-hooks/rules-of-hooks
222
221
  const formex = useCreateFormex<M>({
223
222
  initialValues: (entity?.values ?? {}) as EntityValues<M>,
@@ -277,9 +276,8 @@ export function PopupFormFieldInternal<M extends Record<string, any>>({
277
276
  includeDescription: false,
278
277
  underlyingValueHasChanged: false,
279
278
  context: formContext,
280
- tableMode: true,
281
279
  partOfArray: false,
282
- partOfBlock: false,
280
+ minimalistView: false,
283
281
  autoFocus: open
284
282
  }
285
283
  : undefined;
@@ -306,7 +306,7 @@ export const EntityCollectionView = React.memo(
306
306
  value,
307
307
  property,
308
308
  entityId
309
- }) => dataSource.checkUniqueField(fullPath, name, value, entityId),
309
+ }) => dataSource.checkUniqueField(fullPath, name, value, entityId, collection.databaseId),
310
310
  [fullPath]);
311
311
 
312
312
  const onValueChange: OnCellValueChange<any, any> = ({
@@ -661,19 +661,19 @@ export const EntityCollectionView = React.memo(
661
661
  collection={collection}/>}
662
662
  />
663
663
 
664
- <PopupFormField
664
+ {popupCell && <PopupFormField
665
665
  key={`popup_form_${popupCell?.propertyKey}_${popupCell?.entity?.id}`}
666
666
  open={Boolean(popupCell)}
667
667
  onClose={onPopupClose}
668
668
  cellRect={popupCell?.cellRect}
669
669
  propertyKey={popupCell?.propertyKey}
670
670
  collection={collection}
671
- entity={popupCell?.entity}
671
+ entity={popupCell.entity}
672
672
  tableKey={tableKey.current}
673
673
  customFieldValidator={uniqueFieldValidator}
674
674
  path={resolvedFullPath}
675
675
  onCellValueChange={onValueChange}
676
- container={containerRef.current}/>
676
+ container={containerRef.current}/>}
677
677
 
678
678
  {deleteEntityClicked &&
679
679
  <DeleteEntityDialog
@@ -28,6 +28,7 @@ export function useTableSearchHelper<M extends Record<string, any>>({
28
28
  const props = {
29
29
  context,
30
30
  path: fullPath,
31
+ databaseId: collection.databaseId,
31
32
  collection,
32
33
  parentCollectionIds
33
34
  };
@@ -78,7 +78,7 @@ export function DefaultDrawer({
78
78
 
79
79
  <DrawerLogo logo={logo}/>
80
80
 
81
- <div className={"overflow-scroll no-scrollbar"}>
81
+ <div className={"flex-grow overflow-scroll no-scrollbar"}>
82
82
 
83
83
  {groupsWithoutAdmin.map((group) => (
84
84
  <React.Fragment
@@ -482,7 +482,7 @@ export function EntityEditViewInner<M extends Record<string, any>>({
482
482
  setFieldValue: useCallback(formex.setFieldValue, []),
483
483
  values: formex.values,
484
484
  collection: resolvedCollection,
485
- entityId,
485
+ entityId: entityId as string,
486
486
  path,
487
487
  save,
488
488
  formex
@@ -677,7 +677,7 @@ export function EntityEditViewInner<M extends Record<string, any>>({
677
677
  name,
678
678
  value,
679
679
  property
680
- }) => dataSource.checkUniqueField(path, name, value, entityId),
680
+ }) => dataSource.checkUniqueField(path, name, value, entityId, collection.databaseId),
681
681
  [dataSource, path, entityId]);
682
682
 
683
683
  const validationSchema = useMemo(() => entityId
@@ -755,9 +755,8 @@ export function EntityEditViewInner<M extends Record<string, any>>({
755
755
  includeDescription: property.description || property.longDescription,
756
756
  underlyingValueHasChanged: underlyingValueHasChanged && !autoSave,
757
757
  context: formContext,
758
- tableMode: false,
759
758
  partOfArray: false,
760
- partOfBlock: false,
759
+ minimalistView: false,
761
760
  autoFocus: false
762
761
  };
763
762
 
@@ -8,7 +8,7 @@ import {
8
8
  DateTimeFieldBinding,
9
9
  KeyValueFieldBinding,
10
10
  MapFieldBinding,
11
- MarkdownFieldBinding,
11
+ MarkdownEditorFieldBinding,
12
12
  MultiSelectBinding,
13
13
  ReferenceFieldBinding,
14
14
  RepeatFieldBinding,
@@ -77,7 +77,7 @@ export const DEFAULT_FIELD_CONFIGS: Record<string, PropertyConfig<any>> = {
77
77
  property: {
78
78
  dataType: "string",
79
79
  markdown: true,
80
- Field: MarkdownFieldBinding
80
+ Field: MarkdownEditorFieldBinding
81
81
  }
82
82
  },
83
83
  url: {
@@ -78,9 +78,8 @@ function PropertyFieldBindingInternal<T extends CMSType = CMSType, M extends Rec
78
78
  includeDescription,
79
79
  underlyingValueHasChanged,
80
80
  disabled,
81
- tableMode,
82
81
  partOfArray,
83
- partOfBlock,
82
+ minimalistView,
84
83
  autoFocus,
85
84
  index,
86
85
  }: PropertyFieldBindingProps<T, M>): ReactElement<PropertyFieldBindingProps<T, M>> {
@@ -150,9 +149,8 @@ function PropertyFieldBindingInternal<T extends CMSType = CMSType, M extends Rec
150
149
  underlyingValueHasChanged,
151
150
  context,
152
151
  disabled,
153
- tableMode,
154
152
  partOfArray,
155
- partOfBlock,
153
+ minimalistView,
156
154
  autoFocus
157
155
  };
158
156
 
@@ -180,9 +178,8 @@ function FieldInternal<T extends CMSType, CustomProps, M extends Record<string,
180
178
  property,
181
179
  includeDescription,
182
180
  underlyingValueHasChanged,
183
- tableMode,
184
181
  partOfArray,
185
- partOfBlock,
182
+ minimalistView,
186
183
  autoFocus,
187
184
  context,
188
185
  disabled
@@ -243,9 +240,8 @@ function FieldInternal<T extends CMSType, CustomProps, M extends Record<string,
243
240
  property: property as ResolvedProperty<T>,
244
241
  disabled: disabled ?? false,
245
242
  underlyingValueHasChanged: underlyingValueHasChanged ?? false,
246
- tableMode: tableMode ?? false,
247
243
  partOfArray: partOfArray ?? false,
248
- partOfBlock: partOfBlock ?? false,
244
+ minimalistView: minimalistView ?? false,
249
245
  autoFocus: autoFocus ?? false,
250
246
  customProps: customFieldProps,
251
247
  context
@@ -20,7 +20,7 @@ export function ArrayCustomShapedFieldBinding<T extends Array<any>>({
20
20
  showError,
21
21
  isSubmitting,
22
22
  setValue,
23
- tableMode,
23
+ minimalistView,
24
24
  property,
25
25
  includeDescription,
26
26
  underlyingValueHasChanged,
@@ -55,9 +55,8 @@ export function ArrayCustomShapedFieldBinding<T extends Array<any>>({
55
55
  includeDescription,
56
56
  underlyingValueHasChanged,
57
57
  context,
58
- tableMode: false,
59
58
  partOfArray: true,
60
- partOfBlock: false,
59
+ minimalistView: false,
61
60
  autoFocus: false
62
61
  };
63
62
  return <div key={`custom_shaped_array_${index}`} className="pb-4">
@@ -69,14 +68,14 @@ export function ArrayCustomShapedFieldBinding<T extends Array<any>>({
69
68
 
70
69
  <>
71
70
 
72
- {!tableMode &&
71
+ {!minimalistView &&
73
72
  <ExpandablePanel initiallyExpanded={expanded}
74
73
  title={title}
75
74
  className={"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2"}>
76
75
  {body}
77
76
  </ExpandablePanel>}
78
77
 
79
- {tableMode && body}
78
+ {minimalistView && body}
80
79
 
81
80
  <FieldHelperText includeDescription={includeDescription}
82
81
  showError={showError}
@@ -25,7 +25,7 @@ export function ArrayOfReferencesFieldBinding({
25
25
  showError,
26
26
  disabled,
27
27
  isSubmitting,
28
- tableMode,
28
+ minimalistView,
29
29
  property,
30
30
  includeDescription,
31
31
  setValue,
@@ -130,7 +130,7 @@ export function ArrayOfReferencesFieldBinding({
130
130
  return (
131
131
  <>
132
132
 
133
- {!tableMode &&
133
+ {!minimalistView &&
134
134
  <ExpandablePanel
135
135
  titleClassName={fieldBackgroundMixin}
136
136
  className={cls("px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2", fieldBackgroundMixin)}
@@ -139,7 +139,7 @@ export function ArrayOfReferencesFieldBinding({
139
139
  {body}
140
140
  </ExpandablePanel>}
141
141
 
142
- {tableMode && body}
142
+ {minimalistView && body}
143
143
 
144
144
  <FieldHelperText includeDescription={includeDescription}
145
145
  showError={showError}
@@ -27,7 +27,7 @@ export function BlockFieldBinding<T extends Array<any>>({
27
27
  isSubmitting,
28
28
  setValue,
29
29
  setFieldValue,
30
- tableMode,
30
+ minimalistView,
31
31
  property,
32
32
  includeDescription,
33
33
  underlyingValueHasChanged,
@@ -84,7 +84,7 @@ export function BlockFieldBinding<T extends Array<any>>({
84
84
 
85
85
  <>
86
86
 
87
- {!tableMode &&
87
+ {!minimalistView &&
88
88
  <ExpandablePanel
89
89
  className={"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2"}
90
90
  initiallyExpanded={expanded}
@@ -92,7 +92,7 @@ export function BlockFieldBinding<T extends Array<any>>({
92
92
  {body}
93
93
  </ExpandablePanel>}
94
94
 
95
- {tableMode && body}
95
+ {minimalistView && body}
96
96
 
97
97
  <FieldHelperText includeDescription={includeDescription}
98
98
  showError={showError}
@@ -179,8 +179,7 @@ function BlockEntry({
179
179
  context,
180
180
  autoFocus,
181
181
  partOfArray: false,
182
- partOfBlock: true,
183
- tableMode: false
182
+ minimalistView: true
184
183
  }
185
184
  : undefined;
186
185
 
@@ -193,7 +192,7 @@ function BlockEntry({
193
192
  };
194
193
 
195
194
  return (
196
- <div className={cls(paperMixin, "bg-transparent p-4 my-4 py-8")}>
195
+ <div className={cls(paperMixin, "bg-transparent p-2 mb-4")}>
197
196
 
198
197
  <Field
199
198
  name={typeFieldName}
@@ -41,7 +41,7 @@ export function KeyValueFieldBinding({
41
41
  disabled,
42
42
  property,
43
43
  setValue,
44
- tableMode,
44
+ minimalistView,
45
45
  includeDescription,
46
46
  underlyingValueHasChanged,
47
47
  autoFocus,
@@ -71,11 +71,11 @@ export function KeyValueFieldBinding({
71
71
  return (
72
72
  <>
73
73
 
74
- {!tableMode && <ExpandablePanel initiallyExpanded={expanded}
75
- title={title}
76
- className={"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2"}>{mapFormView}</ExpandablePanel>}
74
+ {!minimalistView && <ExpandablePanel initiallyExpanded={expanded}
75
+ title={title}
76
+ className={"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2"}>{mapFormView}</ExpandablePanel>}
77
77
 
78
- {tableMode && mapFormView}
78
+ {minimalistView && mapFormView}
79
79
 
80
80
  <FieldHelperText includeDescription={includeDescription}
81
81
  showError={showError}
@@ -29,8 +29,7 @@ export function MapFieldBinding({
29
29
  error,
30
30
  disabled,
31
31
  property,
32
- partOfBlock,
33
- tableMode,
32
+ minimalistView,
34
33
  includeDescription,
35
34
  underlyingValueHasChanged,
36
35
  autoFocus,
@@ -70,9 +69,8 @@ export function MapFieldBinding({
70
69
  includeDescription,
71
70
  underlyingValueHasChanged,
72
71
  context,
73
- tableMode: false,
74
72
  partOfArray: false,
75
- partOfBlock: false,
73
+ minimalistView: false,
76
74
  autoFocus: autoFocus && index === 0
77
75
  };
78
76
 
@@ -102,11 +100,11 @@ export function MapFieldBinding({
102
100
  return (
103
101
  <ErrorBoundary>
104
102
 
105
- {!tableMode && !partOfBlock && <ExpandablePanel initiallyExpanded={expanded}
106
- className={"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2 bg-slate-50 bg-opacity-50 dark:bg-gray-900"}
107
- title={title}>{mapFormView}</ExpandablePanel>}
103
+ {!minimalistView && !minimalistView && <ExpandablePanel initiallyExpanded={expanded}
104
+ className={"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2 bg-slate-50 bg-opacity-50 dark:bg-gray-900"}
105
+ title={title}>{mapFormView}</ExpandablePanel>}
108
106
 
109
- {(tableMode || partOfBlock) && mapFormView}
107
+ {(minimalistView || minimalistView) && mapFormView}
110
108
 
111
109
  <FieldHelperText includeDescription={includeDescription}
112
110
  showError={showError ?? false}