@openlettermarketing/olc-react-sdk 1.3.2 → 1.5.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/README.md +2 -0
- package/build/index.js +4 -4
- package/build/index.js.map +1 -1
- package/build/types/App.d.ts +2 -0
- package/build/types/components/SidePanel/Templates/ModalGallery/index.d.ts +31 -0
- package/build/types/components/SidePanel/Templates/SideBarGallery/index.d.ts +26 -0
- package/build/types/components/SidePanel/Templates/customTemplateSection.d.ts +5 -0
- package/build/types/components/SidePanel/index.d.ts +2 -0
- package/build/types/components/TemplateBuilder/index.d.ts +2 -0
- package/build/types/index.d.ts +3 -1
- package/build/types/redux/reducers/templateReducer.d.ts +1 -0
- package/build/types/utils/helper.d.ts +1 -0
- package/package.json +1 -1
package/build/types/App.d.ts
CHANGED
|
@@ -2,10 +2,12 @@ import React from 'react';
|
|
|
2
2
|
interface AppProps {
|
|
3
3
|
secretKey: string;
|
|
4
4
|
platformName?: string | null;
|
|
5
|
+
templateGalleryModal?: boolean;
|
|
5
6
|
createTemplateRoute?: string | null;
|
|
6
7
|
templateBuilderRoute?: string | null;
|
|
7
8
|
olcTemplate?: Record<string, any>;
|
|
8
9
|
allowSenderFields?: boolean;
|
|
10
|
+
allowPropertyFields?: boolean;
|
|
9
11
|
styles?: any;
|
|
10
12
|
onReturnAndNavigate?: () => void;
|
|
11
13
|
onGetOneTemplate?: (payload: any) => Promise<any>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TemplateCategory, TemplateRecord, TemplateType } from '../customTemplateSection';
|
|
3
|
+
type CustomTemplateSectionProps = {
|
|
4
|
+
product: any;
|
|
5
|
+
openGalleryModal: boolean;
|
|
6
|
+
selectedCategory: TemplateCategory | null;
|
|
7
|
+
templateCategories: TemplateCategory[];
|
|
8
|
+
currentTemplateType: TemplateType | undefined;
|
|
9
|
+
templateTypes: [TemplateType] | null | undefined;
|
|
10
|
+
search: any;
|
|
11
|
+
searchApplied: boolean;
|
|
12
|
+
loader: boolean;
|
|
13
|
+
platformName: any;
|
|
14
|
+
myTemplates: TemplateRecord[];
|
|
15
|
+
teamTemplates: TemplateRecord[];
|
|
16
|
+
olcTemplates: TemplateRecord[];
|
|
17
|
+
pagination: any;
|
|
18
|
+
setSearch: any;
|
|
19
|
+
handleSearch: any;
|
|
20
|
+
removeSearchInput: any;
|
|
21
|
+
searchKeyDown: any;
|
|
22
|
+
currentTemplateTypeRef: any;
|
|
23
|
+
setCurrentTemplateType: any;
|
|
24
|
+
setSelectedCategory: any;
|
|
25
|
+
handleLoadTemplateModel: any;
|
|
26
|
+
handleTabChange: any;
|
|
27
|
+
handleDialogChange: any;
|
|
28
|
+
closeGalleryModal: any;
|
|
29
|
+
};
|
|
30
|
+
declare const ModalGallery: (props: CustomTemplateSectionProps) => React.JSX.Element;
|
|
31
|
+
export default ModalGallery;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TemplateCategory, TemplateRecord, TemplateType } from '../customTemplateSection';
|
|
3
|
+
import './styles.scss';
|
|
4
|
+
type CustomTemplateSectionProps = {
|
|
5
|
+
selectedCategory: TemplateCategory | null;
|
|
6
|
+
templateCategories: TemplateCategory[];
|
|
7
|
+
currentTemplateType: TemplateType | undefined;
|
|
8
|
+
templateTypes: [TemplateType] | null | undefined;
|
|
9
|
+
search: any;
|
|
10
|
+
searchApplied: boolean;
|
|
11
|
+
loader: boolean;
|
|
12
|
+
platformName: any;
|
|
13
|
+
myTemplates: TemplateRecord[];
|
|
14
|
+
teamTemplates: TemplateRecord[];
|
|
15
|
+
olcTemplates: TemplateRecord[];
|
|
16
|
+
setSearch: any;
|
|
17
|
+
handleSearch: any;
|
|
18
|
+
removeSearchInput: any;
|
|
19
|
+
searchKeyDown: any;
|
|
20
|
+
setCurrentTemplateType: any;
|
|
21
|
+
setSelectedCategory: any;
|
|
22
|
+
handleLoadTemplateModel: any;
|
|
23
|
+
handleDialogChange: any;
|
|
24
|
+
};
|
|
25
|
+
declare const SideBarSelction: (props: CustomTemplateSectionProps) => React.JSX.Element;
|
|
26
|
+
export default SideBarSelction;
|
|
@@ -19,5 +19,10 @@ export type TemplateCategory = {
|
|
|
19
19
|
totalTemplates: number;
|
|
20
20
|
label?: string;
|
|
21
21
|
};
|
|
22
|
+
export type TemplateRecord = {
|
|
23
|
+
id: string;
|
|
24
|
+
thumbnailUrl: string;
|
|
25
|
+
title: string;
|
|
26
|
+
};
|
|
22
27
|
declare const CustomTemplateSection: SideSection;
|
|
23
28
|
export default CustomTemplateSection;
|
|
@@ -4,8 +4,10 @@ interface Props {
|
|
|
4
4
|
store: StoreType;
|
|
5
5
|
currentTemplateType: string;
|
|
6
6
|
platformName?: string | null;
|
|
7
|
+
templateGalleryModal?: boolean;
|
|
7
8
|
selectedSection?: string;
|
|
8
9
|
allowSenderFields?: boolean;
|
|
10
|
+
allowPropertyFields?: boolean;
|
|
9
11
|
onGetOneTemplate?: (payload: any) => Promise<any>;
|
|
10
12
|
onGetTemplates?: (payload: any) => Promise<any>;
|
|
11
13
|
onGetCustomFields?: () => Promise<any>;
|
|
@@ -15,9 +15,11 @@ import './styles.scss';
|
|
|
15
15
|
interface TemplateBuilderProps {
|
|
16
16
|
store: StoreType;
|
|
17
17
|
platformName?: string | null;
|
|
18
|
+
templateGalleryModal?: boolean;
|
|
18
19
|
createTemplateRoute?: string | null;
|
|
19
20
|
olcTemplate?: Record<string, any>;
|
|
20
21
|
allowSenderFields?: boolean;
|
|
22
|
+
allowPropertyFields?: boolean;
|
|
21
23
|
onReturnAndNavigate?: () => void;
|
|
22
24
|
onGetCustomFields?: () => Promise<any>;
|
|
23
25
|
onGetOneTemplate?: (payload: any) => Promise<any>;
|
package/build/types/index.d.ts
CHANGED
|
@@ -9,11 +9,13 @@ interface TemplateBuilderProps {
|
|
|
9
9
|
secretKey: string;
|
|
10
10
|
publicApiKey: string;
|
|
11
11
|
platformName?: string | null;
|
|
12
|
+
templateGalleryModal?: boolean;
|
|
12
13
|
createTemplateRoute?: string | null;
|
|
13
14
|
templateBuilderRoute?: string | null;
|
|
14
15
|
olcTemplate?: Record<string, any>;
|
|
15
16
|
sandbox?: boolean;
|
|
16
17
|
allowSenderFields?: boolean;
|
|
18
|
+
allowPropertyFields?: boolean;
|
|
17
19
|
onReturnAndNavigate?: () => void;
|
|
18
20
|
onGetOneTemplate?: (payload: any) => Promise<any>;
|
|
19
21
|
onGetTemplates?: (payload: any) => Promise<any>;
|
|
@@ -23,5 +25,5 @@ interface TemplateBuilderProps {
|
|
|
23
25
|
root?: CustomCSSProperties;
|
|
24
26
|
};
|
|
25
27
|
}
|
|
26
|
-
declare const TemplateBuilder: ({ container, secretKey, publicApiKey, platformName, createTemplateRoute, templateBuilderRoute, olcTemplate, sandbox, allowSenderFields, onReturnAndNavigate, onGetOneTemplate, onGetTemplates, onGetCustomFields, onSubmit, styles, }: TemplateBuilderProps) => void;
|
|
28
|
+
declare const TemplateBuilder: ({ container, secretKey, publicApiKey, platformName, templateGalleryModal, createTemplateRoute, templateBuilderRoute, olcTemplate, sandbox, allowSenderFields, allowPropertyFields, onReturnAndNavigate, onGetOneTemplate, onGetTemplates, onGetCustomFields, onSubmit, styles, }: TemplateBuilderProps) => void;
|
|
27
29
|
export default TemplateBuilder;
|
|
@@ -39,6 +39,7 @@ export interface TemplateState {
|
|
|
39
39
|
defaultDynamicFieldsHashMap: Record<string, DynamicField>;
|
|
40
40
|
defaultDynamicFields: DynamicField[];
|
|
41
41
|
defaultSenderFields: DynamicField[];
|
|
42
|
+
defaultPropertyFields: DynamicField[];
|
|
42
43
|
products: any[];
|
|
43
44
|
productDetailByTemplate: any[];
|
|
44
45
|
templates: TemplatesState;
|
|
@@ -6,3 +6,4 @@ export declare const setPublicApiKey: (key: string) => void;
|
|
|
6
6
|
export declare const getIsSandbox: () => boolean;
|
|
7
7
|
export declare const setIsSandbox: (sandbox: boolean) => void;
|
|
8
8
|
export declare const removeSThroughOne: (input: string) => string;
|
|
9
|
+
export declare const hexToRgba: (hex: any, opacity: any) => string;
|