@openlettermarketing/olc-react-sdk 1.7.6 → 1.7.8-beta.1

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.
@@ -12,6 +12,7 @@ interface AppProps {
12
12
  designerQueryAmount?: string | number;
13
13
  allowPropertyFields?: boolean;
14
14
  allowedAddOns?: any;
15
+ allowedTemplateSections?: any;
15
16
  restrictedProducts?: any;
16
17
  styles?: any;
17
18
  onReturnAndNavigate?: () => void;
@@ -6,7 +6,7 @@ type CustomTemplateSectionProps = {
6
6
  selectedCategory: TemplateCategory | null;
7
7
  templateCategories: TemplateCategory[];
8
8
  currentTemplateType: TemplateType | undefined;
9
- templateTypes: [TemplateType] | null | undefined;
9
+ templateTypes: TemplateType[] | null | undefined;
10
10
  designerQueryAmount?: string | number;
11
11
  search: any;
12
12
  searchApplied: boolean;
@@ -5,7 +5,7 @@ type CustomTemplateSectionProps = {
5
5
  selectedCategory: TemplateCategory | null;
6
6
  templateCategories: TemplateCategory[];
7
7
  currentTemplateType: TemplateType | undefined;
8
- templateTypes: [TemplateType] | null | undefined;
8
+ templateTypes: TemplateType[] | null | undefined;
9
9
  search: any;
10
10
  searchApplied: boolean;
11
11
  loader: boolean;
@@ -12,6 +12,7 @@ export type Payload = {
12
12
  export type TemplateType = {
13
13
  id: string;
14
14
  label: string;
15
+ value: string;
15
16
  };
16
17
  export type TemplateCategory = {
17
18
  id: string;
@@ -11,6 +11,7 @@ interface Props {
11
11
  designerQueryAmount?: string | number;
12
12
  allowPropertyFields?: boolean;
13
13
  allowedAddOns?: any;
14
+ allowedTemplateSections?: any;
14
15
  onGetOneTemplate?: (payload: any) => Promise<any>;
15
16
  onCreateCustomTemplateQuery?: (payload: any) => Promise<any>;
16
17
  onGetTemplates?: (payload: any) => Promise<any>;
@@ -24,6 +24,7 @@ interface TemplateBuilderProps {
24
24
  excludedFields?: string[] | null;
25
25
  designerQueryAmount?: string | number;
26
26
  allowedAddOns?: any;
27
+ allowedTemplateSections?: any;
27
28
  onReturnAndNavigate?: () => void;
28
29
  onGetCustomFields?: () => Promise<any>;
29
30
  onCreateCustomTemplateQuery?: (payload: any) => Promise<any>;
@@ -4,7 +4,7 @@ import '@fontsource/inter/500.css';
4
4
  import '@fontsource/inter/600.css';
5
5
  import '@fontsource/inter/700.css';
6
6
  import { CustomCSSProperties } from './utils/customStyles';
7
- import { AddOnTypes } from './utils/addOnTypes';
7
+ import { AddOnTypes, TemplateTypes } from './utils/types';
8
8
  interface TemplateBuilderProps {
9
9
  container: HTMLElement | null;
10
10
  secretKey: string;
@@ -21,6 +21,7 @@ interface TemplateBuilderProps {
21
21
  excludedFields?: string[] | null;
22
22
  designerQueryAmount?: string | number;
23
23
  allowedAddOns?: AddOnTypes[] | string[] | null | undefined;
24
+ allowedTemplateSections?: TemplateTypes[] | string[] | null | undefined;
24
25
  env?: string;
25
26
  restrictedProducts?: number[] | null | undefined;
26
27
  onReturnAndNavigate?: () => void;
@@ -33,5 +34,5 @@ interface TemplateBuilderProps {
33
34
  root?: CustomCSSProperties;
34
35
  };
35
36
  }
36
- declare const TemplateBuilder: ({ container, secretKey, publicApiKey, platformName, templateGalleryModal, createTemplateRoute, templateBuilderRoute, olcTemplate, designerTemplateQuery, sandbox, allowSenderFields, allowPropertyFields, excludedFields, designerQueryAmount, allowedAddOns, env, restrictedProducts, onReturnAndNavigate, onCreateCustomTemplateQuery, onGetOneTemplate, onGetTemplates, onGetCustomFields, onSubmit, styles, }: TemplateBuilderProps) => void;
37
+ declare const TemplateBuilder: ({ container, secretKey, publicApiKey, platformName, templateGalleryModal, createTemplateRoute, templateBuilderRoute, olcTemplate, designerTemplateQuery, sandbox, allowSenderFields, allowPropertyFields, excludedFields, designerQueryAmount, allowedAddOns, allowedTemplateSections, env, restrictedProducts, onReturnAndNavigate, onCreateCustomTemplateQuery, onGetOneTemplate, onGetTemplates, onGetCustomFields, onSubmit, styles, }: TemplateBuilderProps) => void;
37
38
  export default TemplateBuilder;
@@ -13,5 +13,6 @@ export declare const CLEAR_TEMPLATE: string;
13
13
  export declare const SELECT_PRODUCT: string;
14
14
  export declare const SELECT_POSTCARD: string;
15
15
  export declare const SET_CUSTOM_FIELDS = "SET_CUSTOM_FIELDS";
16
+ export declare const SET_CUSTOM_FIELDS_V2 = "SET_CUSTOM_FIELDS_V2";
16
17
  export declare const SET_PLATFORM_FIELDS = "SET_PLATFORM_FIELDS";
17
18
  export declare const CLEAR_REDUX: string;
@@ -1,5 +1,6 @@
1
1
  export interface CustomFieldState {
2
2
  customFields: any[];
3
+ customFieldsV2: any[];
3
4
  platformFields: any[];
4
5
  defaultDynamicFields: any[];
5
6
  }
@@ -16,6 +16,7 @@ export declare const allowedImageTypes: string[];
16
16
  interface TemplateTypes {
17
17
  id: string;
18
18
  label: string;
19
+ value: string;
19
20
  }
20
21
  export declare const defaultTemplateTypes: TemplateTypes[];
21
22
  export declare const sortOrderForTemplates: string[];
@@ -0,0 +1,8 @@
1
+ export type AddOnValue = 'gsv' | 'property_offer';
2
+ export type TemplateTypesValue = 'my_templates' | 'team_templates' | 'olc-templates';
3
+ export type AddOnTypes = {
4
+ [key in AddOnValue]?: string;
5
+ };
6
+ export type TemplateTypes = {
7
+ [key in AddOnValue]?: string;
8
+ };
@@ -1 +1 @@
1
- export const SDK_VERSION: "1.7.6";
1
+ export const SDK_VERSION: "1.7.8-beta.1";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openlettermarketing/olc-react-sdk",
3
3
  "private": false,
4
- "version": "1.7.6",
4
+ "version": "1.7.8-beta.1",
5
5
  "type": "module",
6
6
  "description": "Simplify template builder integration for any product.",
7
7
  "main": "build/index.js",
@@ -1,4 +0,0 @@
1
- export type AddOnValue = 'gsv' | 'property_offer';
2
- export type AddOnTypes = {
3
- [key in AddOnValue]?: string;
4
- };