react-bricks 4.7.7 → 5.0.0-alpha.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.
package/react-bricks.d.ts CHANGED
@@ -128,6 +128,8 @@ declare namespace types {
128
128
  */
129
129
  export type Theme = {
130
130
  themeName: string;
131
+ bannerText?: string;
132
+ bannerLink?: string;
131
133
  categories: Category[];
132
134
  };
133
135
  /**
@@ -246,6 +248,15 @@ declare namespace types {
246
248
  aiText: boolean;
247
249
  aiGen: boolean;
248
250
  aiSeo: boolean;
251
+ emailMarketing: boolean;
252
+ forms: boolean;
253
+ };
254
+ emailMarketingConfig?: {
255
+ providers: Array<{
256
+ value: string;
257
+ label: string;
258
+ }>;
259
+ testRecipients: string[];
249
260
  };
250
261
  } | null;
251
262
  /**
@@ -278,6 +289,26 @@ declare namespace types {
278
289
  date: string;
279
290
  user: EditingUser;
280
291
  };
292
+ /**
293
+ * Provider to send EmailMarketing
294
+ */
295
+ export type EmailMarketingProvider = 'brevo' | 'getresponse' | 'mailchimp' | 'mailerlite' | 'resend' | 'sendgrid';
296
+ /** EmailMarketing Sender (from address) */
297
+ export type EmailMarketingSender = {
298
+ email: string;
299
+ name: string;
300
+ id?: string;
301
+ };
302
+ /**
303
+ * EmailMarketing configuration on Page
304
+ */
305
+ export type EmailMarketingConfig = {
306
+ provider: EmailMarketingProvider;
307
+ sender: string;
308
+ listId: string;
309
+ campaignName: string;
310
+ subject: string;
311
+ };
281
312
  /**
282
313
  * AppOnPage
283
314
  */
@@ -296,6 +327,7 @@ declare namespace types {
296
327
  meta: IMeta;
297
328
  customValues?: Props;
298
329
  externalData?: Props;
330
+ emailMarketingConfig?: EmailMarketingConfig;
299
331
  content: IContentBlock[];
300
332
  workingContent?: IContentBlock[];
301
333
  committedContent?: IContentBlock[];
@@ -355,6 +387,10 @@ declare namespace types {
355
387
  name: string;
356
388
  showAsBrick?: boolean;
357
389
  previewImageUrl?: string;
390
+ disabled?: boolean;
391
+ disabledIcon?: 'purchase' | 'maintenance';
392
+ disabledLink?: string;
393
+ disabledTooltip?: string;
358
394
  props: T;
359
395
  };
360
396
  type RepeaterItemDefault = IContentBlock | Omit<IContentBlock, 'id'> | Props;
@@ -407,6 +443,10 @@ declare namespace types {
407
443
  description?: string;
408
444
  getDefaultProps?: () => Partial<T>;
409
445
  hideFromAddMenu?: boolean;
446
+ disabled?: boolean;
447
+ disabledIcon?: 'purchase' | 'maintenance';
448
+ disabledLink?: string;
449
+ disabledTooltip?: string;
410
450
  sideEditProps?: Array<ISideEditProp<T> | ISideGroup<T>>;
411
451
  repeaterItems?: IRepeaterItem<T>[];
412
452
  newItemMenuOpen?: boolean;
@@ -479,10 +519,11 @@ declare namespace types {
479
519
  /**
480
520
  * Option of a select sidebar prop
481
521
  */
482
- export type RepeatserItems<T = RepeaterItemDefault> = Array<T>;
483
522
  export interface IOption<T = any> {
484
523
  value: T;
485
524
  label: string;
525
+ disabled?: boolean;
526
+ disabledTooltip?: string;
486
527
  [otherProps: string]: unknown;
487
528
  }
488
529
  /**
@@ -546,6 +587,7 @@ declare namespace types {
546
587
  multiple: boolean;
547
588
  embedValues?: boolean;
548
589
  };
590
+ onChange?: (props: T) => Partial<T>;
549
591
  }
550
592
  /**
551
593
  * Sidebar Edit Props
@@ -643,12 +685,16 @@ declare namespace types {
643
685
  editable?: boolean;
644
686
  getDefaultContent?: () => (string | IBrickStory | IContentBlock)[];
645
687
  };
646
- export type RenderEnvironment = 'Frontend' | 'Preview' | 'Admin';
688
+ export type RenderEnvironment = 'Frontend' | 'Preview' | 'Admin' | 'Email';
647
689
  export interface IRenderWrapperArgs {
648
690
  children: React__default.ReactElement;
649
691
  page: PageValues;
650
692
  renderEnvironment: RenderEnvironment;
651
693
  }
694
+ export interface IRenderEmailHtmlArgs {
695
+ children: React__default.ReactElement;
696
+ page: PageValues;
697
+ }
652
698
  /**
653
699
  * Page type
654
700
  */
@@ -670,8 +716,9 @@ declare namespace types {
670
716
  slugPrefix?: ISlugPrefix;
671
717
  template?: Array<TemplateSlot>;
672
718
  headlessView?: boolean;
673
- isEmail?: boolean;
719
+ isEmailMarketing?: boolean;
674
720
  renderWrapper?: (args: IRenderWrapperArgs) => React__default.ReactElement;
721
+ renderEmailHtml?: (args: IRenderEmailHtmlArgs) => string | Promise<string>;
675
722
  }
676
723
  /**
677
724
  * Structure returned by the cleanBlocks function
@@ -1262,6 +1309,19 @@ declare const Meta: React.FC<MetaProps>;
1262
1309
 
1263
1310
  declare const renderMeta: React.FC<types.Page>;
1264
1311
 
1312
+ interface SendFormSubmissionResult {
1313
+ success: boolean;
1314
+ statusCode: number;
1315
+ message: string;
1316
+ }
1317
+ declare const sendFormSubmission: ({ appId, appEnv, token, formId, emailAddress, data, }: SendFormSubmissionParams) => Promise<SendFormSubmissionResult>;
1318
+
1319
+ interface Form {
1320
+ id: string;
1321
+ name: string;
1322
+ }
1323
+ declare const fetchForms: () => Promise<Form[]>;
1324
+
1265
1325
  declare const usePage$1: (pageId: string, language?: string) => _tanstack_react_query.UseQueryResult<types.Page, Error>;
1266
1326
 
1267
1327
  declare const usePage: (slug: string, language?: string) => _tanstack_react_query.UseQueryResult<types.Page, Error>;
@@ -1571,4 +1631,4 @@ declare const useAuth: () => {
1571
1631
  logoutUser: () => void;
1572
1632
  };
1573
1633
 
1574
- export { Admin, AppSettings, Editor, File$1 as File, Icon, Image$1 as Image, JsonLd, Link, Login, MediaLibrary, Meta, PageViewer, _default as Plain, Playground, Preview, ReactBricks, Repeater, CompatibleRichText as RichText, RichText as RichTextExt, Slot, SsoLogin, SsoLoginFailure, SsoLoginSuccess, Text, blockPluginConstructor, blockWithModalPluginConstructor, cleanPage, fetchPage, fetchPages, fetchTags, getPagePlainText, getSchemaOrgData, markPluginConstructor, index as plugins, renderJsonLd, renderMeta, types, useAdminContext, useAuth, usePage$1 as usePage, usePage as usePagePublic, usePageValues, usePages, usePagesPublic, useReactBricksContext, useTagsPublic, useVisualEdit };
1634
+ export { Admin, AppSettings, Editor, File$1 as File, Icon, Image$1 as Image, JsonLd, Link, Login, MediaLibrary, Meta, PageViewer, _default as Plain, Playground, Preview, ReactBricks, Repeater, CompatibleRichText as RichText, RichText as RichTextExt, Slot, SsoLogin, SsoLoginFailure, SsoLoginSuccess, Text, blockPluginConstructor, blockWithModalPluginConstructor, cleanPage, fetchForms, fetchPage, fetchPages, fetchTags, getPagePlainText, getSchemaOrgData, markPluginConstructor, index as plugins, renderJsonLd, renderMeta, sendFormSubmission, types, useAdminContext, useAuth, usePage$1 as usePage, usePage as usePagePublic, usePageValues, usePages, usePagesPublic, useReactBricksContext, useTagsPublic, useVisualEdit };