@openlettermarketing/olc-react-sdk 1.2.0 → 1.3.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/build/index.js +3 -3
- package/build/index.js.map +1 -1
- package/build/types/App.d.ts +2 -1
- package/build/types/components/SidePanel/index.d.ts +1 -0
- package/build/types/components/TemplateBuilder/index.d.ts +1 -0
- package/build/types/index.d.ts +3 -3
- package/build/types/redux/reducers/templateReducer.d.ts +1 -0
- package/build/types/utils/constants.d.ts +4 -2
- package/build/types/utils/helper.d.ts +3 -6
- package/package.json +1 -1
package/build/types/App.d.ts
CHANGED
|
@@ -4,9 +4,10 @@ interface AppProps {
|
|
|
4
4
|
platformName?: string | null;
|
|
5
5
|
createTemplateRoute?: string | null;
|
|
6
6
|
templateBuilderRoute?: string | null;
|
|
7
|
-
styles?: any;
|
|
8
7
|
olcTemplate?: Record<string, any>;
|
|
9
8
|
defaultCategory?: string[];
|
|
9
|
+
allowSenderFields?: boolean;
|
|
10
|
+
styles?: any;
|
|
10
11
|
onReturnAndNavigate?: () => void;
|
|
11
12
|
onGetOneTemplate?: (payload: any) => Promise<any>;
|
|
12
13
|
onGetTemplates?: (payload: any) => Promise<any>;
|
|
@@ -6,6 +6,7 @@ interface Props {
|
|
|
6
6
|
platformName?: string | null;
|
|
7
7
|
defaultCategory?: string[];
|
|
8
8
|
selectedSection?: string;
|
|
9
|
+
allowSenderFields?: boolean;
|
|
9
10
|
onGetOneTemplate?: (payload: any) => Promise<any>;
|
|
10
11
|
onGetTemplates?: (payload: any) => Promise<any>;
|
|
11
12
|
onGetCustomFields?: () => Promise<any>;
|
|
@@ -18,6 +18,7 @@ interface TemplateBuilderProps {
|
|
|
18
18
|
createTemplateRoute?: string | null;
|
|
19
19
|
olcTemplate?: Record<string, any>;
|
|
20
20
|
defaultCategory?: string[];
|
|
21
|
+
allowSenderFields?: boolean;
|
|
21
22
|
onReturnAndNavigate?: () => void;
|
|
22
23
|
onGetCustomFields?: () => Promise<any>;
|
|
23
24
|
onGetOneTemplate?: (payload: any) => Promise<any>;
|
package/build/types/index.d.ts
CHANGED
|
@@ -7,14 +7,14 @@ import { CustomCSSProperties } from './utils/customStyles';
|
|
|
7
7
|
interface TemplateBuilderProps {
|
|
8
8
|
container: HTMLElement | null;
|
|
9
9
|
secretKey: string;
|
|
10
|
-
|
|
11
|
-
basicAuthPassword: string;
|
|
10
|
+
publicApiKey: string;
|
|
12
11
|
platformName?: string | null;
|
|
13
12
|
createTemplateRoute?: string | null;
|
|
14
13
|
templateBuilderRoute?: string | null;
|
|
15
14
|
olcTemplate?: Record<string, any>;
|
|
16
15
|
defaultCategory?: string[];
|
|
17
16
|
sandbox?: boolean;
|
|
17
|
+
allowSenderFields?: boolean;
|
|
18
18
|
onReturnAndNavigate?: () => void;
|
|
19
19
|
onGetOneTemplate?: (payload: any) => Promise<any>;
|
|
20
20
|
onGetTemplates?: (payload: any) => Promise<any>;
|
|
@@ -24,5 +24,5 @@ interface TemplateBuilderProps {
|
|
|
24
24
|
root?: CustomCSSProperties;
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
declare const TemplateBuilder: ({ container, secretKey,
|
|
27
|
+
declare const TemplateBuilder: ({ container, secretKey, publicApiKey, platformName, createTemplateRoute, templateBuilderRoute, olcTemplate, defaultCategory, sandbox, allowSenderFields, onReturnAndNavigate, onGetOneTemplate, onGetTemplates, onGetCustomFields, onSubmit, styles, }: TemplateBuilderProps) => void;
|
|
28
28
|
export default TemplateBuilder;
|
|
@@ -38,6 +38,7 @@ export interface TemplateState {
|
|
|
38
38
|
dynamicFields: Record<string, DynamicField>;
|
|
39
39
|
defaultDynamicFieldsHashMap: Record<string, DynamicField>;
|
|
40
40
|
defaultDynamicFields: DynamicField[];
|
|
41
|
+
defaultSenderFields: DynamicField[];
|
|
41
42
|
products: any[];
|
|
42
43
|
productDetailByTemplate: any[];
|
|
43
44
|
templates: TemplatesState;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export declare const PROD_API_BASE_URL = "https://api.openletterconnect.com/api/v1/sdk";
|
|
2
2
|
export declare const DEMO_API_BASE_URL = "https://demoapi.openletterconnect.com/api/v1/sdk";
|
|
3
|
+
export declare const DEMO_S3_URL = "https://demoapi.openletterconnect.com/api/v1/download/s3/openletterconnect";
|
|
4
|
+
export declare const PROD_S3_URL = "https://api.openletterconnect.com/api/v1/download/s3/openletterconnect";
|
|
3
5
|
export declare const DPI: number;
|
|
4
|
-
export declare const
|
|
6
|
+
export declare const BARCODE_IMAGE_URL: string;
|
|
7
|
+
export declare const GOOGLE_STREET_VIEW_IMAGE_URL: string;
|
|
5
8
|
export declare const PRODUCT_LEARN_URL: string;
|
|
6
|
-
export declare const GOOGLE_STREET_VIEW_IMAGE_URL = "https://api.openletterconnect.com/api/v1/download/s3/openletterconnect/default_images/dummyGSV.png";
|
|
7
9
|
export declare const multiPageLetters: string[];
|
|
8
10
|
interface TemplateTypes {
|
|
9
11
|
id: string;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
export declare let
|
|
2
|
-
export declare let basicAuthPassword: string;
|
|
1
|
+
export declare let publicApiKey: string;
|
|
3
2
|
export declare let isSandbox: boolean;
|
|
4
3
|
export declare const copyToClipboard: (text: string) => void;
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
4
|
+
export declare const getPublicApiKey: () => string;
|
|
5
|
+
export declare const setPublicApiKey: (key: string) => void;
|
|
7
6
|
export declare const getIsSandbox: () => boolean;
|
|
8
|
-
export declare const setAuthUserName: (name: string) => void;
|
|
9
|
-
export declare const setAuthUserPassword: (password: string) => void;
|
|
10
7
|
export declare const setIsSandbox: (sandbox: boolean) => void;
|
|
11
8
|
export declare const removeSThroughOne: (input: string) => string;
|