react-bricks 4.2.0-beta.2 → 4.2.0-beta.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.
package/react-bricks.d.ts CHANGED
@@ -373,6 +373,15 @@ declare namespace types {
373
373
  export type Props = {
374
374
  [key: string]: any;
375
375
  };
376
+ /**
377
+ * Options passed to the fetch function
378
+ */
379
+ export type FetchOptions = {
380
+ cache?: string;
381
+ next?: {
382
+ [key: string]: any;
383
+ };
384
+ };
376
385
  /**
377
386
  * Interface for the Schema of a Brick
378
387
  */
@@ -386,6 +395,7 @@ declare namespace types {
386
395
  newItemMenuOpen?: boolean;
387
396
  groupByRepeater?: boolean;
388
397
  mapExternalDataToProps?: (externalData: Props, brickProps?: T) => Partial<T>;
398
+ getData?: (page: Page, brickProps?: T) => Promise<Partial<T>>;
389
399
  playgroundLinkUrl?: string;
390
400
  playgroundLinkLabel?: string;
391
401
  theme?: string;
@@ -836,6 +846,10 @@ interface FileProps {
836
846
  propName: string;
837
847
  renderBlock: (props: types.IFileSource | null) => JSX.Element;
838
848
  allowedExtensions?: string[];
849
+ /**
850
+ * Field used with React Server Components
851
+ */
852
+ source?: types.IFileSource;
839
853
  }
840
854
  declare const File$1: React__default.FC<FileProps>;
841
855
 
@@ -872,6 +886,10 @@ interface SharedImageProps {
872
886
  useNativeLazyLoading?: boolean;
873
887
  useWebP?: boolean;
874
888
  placeholder?: (props: PlaceholderProps) => string;
889
+ /**
890
+ * Field used with React Server Components
891
+ */
892
+ source?: types.IImageSource;
875
893
  }
876
894
  interface EditableImage extends SharedImageProps {
877
895
  readonly?: false;
@@ -899,6 +917,10 @@ interface RepeaterProps {
899
917
  itemProps?: types.Props;
900
918
  renderWrapper?: (items: React.ReactElement) => React.ReactElement;
901
919
  renderItemWrapper?: (item: React.ReactElement, index: number, itemsCount: number) => React.ReactElement;
920
+ /**
921
+ * Field used with React Server Components
922
+ */
923
+ items?: types.RepeaterItems;
902
924
  }
903
925
  declare const Repeater: React.FC<RepeaterProps>;
904
926
 
@@ -937,18 +959,24 @@ interface BaseRichTextProps {
937
959
  }
938
960
  interface RichTextPropsWithPropName extends BaseRichTextProps {
939
961
  propName: string;
962
+ /**
963
+ * Field used with React Server Components
964
+ */
965
+ value?: Descendant[] | string;
940
966
  metaFieldName?: never;
941
967
  customFieldName?: never;
942
968
  customFieldPlainText?: never;
943
969
  }
944
970
  interface RichTextPropsWithMetaFieldName extends BaseRichTextProps {
945
971
  propName?: never;
972
+ value?: never;
946
973
  metaFieldName: 'title' | 'description' | 'language';
947
974
  customFieldName?: never;
948
975
  customFieldPlainText?: never;
949
976
  }
950
977
  interface RichTextPropsWithCustomFieldName extends BaseRichTextProps {
951
978
  propName?: never;
979
+ value?: never;
952
980
  metaFieldName?: never;
953
981
  customFieldName: string;
954
982
  customFieldPlainText?: boolean;
@@ -972,6 +1000,10 @@ interface RichTextProps {
972
1000
  multiline?: boolean;
973
1001
  softLineBreak?: boolean;
974
1002
  propName?: string;
1003
+ /**
1004
+ * Field used with React Server Components
1005
+ */
1006
+ value?: Descendant[] | string;
975
1007
  metaFieldName?: 'title' | 'description' | 'language';
976
1008
  customFieldName?: string;
977
1009
  customFieldPlainText?: boolean;
@@ -1012,16 +1044,22 @@ interface BaseTextProps {
1012
1044
  }
1013
1045
  interface TextPropsWithPropName extends BaseTextProps {
1014
1046
  propName: string;
1047
+ /**
1048
+ * Field used with React Server Components
1049
+ */
1050
+ value?: Descendant[] | string;
1015
1051
  metaFieldName?: never;
1016
1052
  customFieldName?: never;
1017
1053
  }
1018
1054
  interface TextPropsWithMetaFieldName extends BaseTextProps {
1019
1055
  propName?: never;
1056
+ value?: never;
1020
1057
  metaFieldName: 'title' | 'description' | 'language';
1021
1058
  customFieldName?: never;
1022
1059
  }
1023
1060
  interface TextPropsWithCustomFieldName extends BaseTextProps {
1024
1061
  propName?: never;
1062
+ value?: never;
1025
1063
  metaFieldName?: never;
1026
1064
  customFieldName: string;
1027
1065
  }