@openlettermarketing/olc-react-sdk 0.0.30 → 0.0.31

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.
@@ -2,7 +2,11 @@ import React from 'react';
2
2
  interface AppProps {
3
3
  secretKey: string;
4
4
  returnRoute?: string | null;
5
+ createTemplateRoute?: string | null;
6
+ templateBuilderRoute?: string | null;
5
7
  styles?: any;
8
+ olcTemplate?: Record<string, any>;
9
+ onGetOneTemplate?: (payload: any) => Promise<any>;
6
10
  onGetTemplates?: (payload: any) => Promise<any>;
7
11
  onGetCustomFields?: () => Promise<any>;
8
12
  onSubmit?: (payload: any) => Promise<any>;
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import './styles.scss';
3
3
  interface CreateTemplateProps {
4
4
  returnRoute?: string | null;
5
+ createTemplateRoute?: string | null;
5
6
  }
6
7
  declare const CreateTemplate: React.FC<CreateTemplateProps>;
7
8
  export default CreateTemplate;
@@ -13,6 +13,7 @@ interface GeneralSelectProps {
13
13
  selectedValue: Option | null;
14
14
  isError: boolean;
15
15
  setSelectedValue: (option: Option | null) => void;
16
+ builderSelect: boolean;
16
17
  }
17
18
  declare const GeneralSelect: React.FC<GeneralSelectProps>;
18
19
  export default GeneralSelect;
@@ -13,6 +13,7 @@ interface InputProps {
13
13
  onClick?: () => void;
14
14
  removeSearchInput?: () => void;
15
15
  onKeyDown?: () => void;
16
+ builderInput?: boolean;
16
17
  }
17
18
  declare const Input: FC<InputProps>;
18
19
  export default Input;
@@ -3,6 +3,7 @@ import type { StoreType } from 'polotno/model/store';
3
3
  interface Props {
4
4
  store: StoreType;
5
5
  currentTemplateType: string;
6
+ onGetOneTemplate?: (payload: any) => Promise<any>;
6
7
  onGetTemplates?: (payload: any) => Promise<any>;
7
8
  onGetCustomFields?: () => Promise<any>;
8
9
  }
@@ -15,7 +15,10 @@ import './styles.scss';
15
15
  interface TemplateBuilderProps {
16
16
  store: StoreType;
17
17
  returnRoute?: string | null;
18
+ createTemplateRoute?: string | null;
19
+ olcTemplate?: Record<string, any>;
18
20
  onGetCustomFields?: () => Promise<any>;
21
+ onGetOneTemplate?: (payload: any) => Promise<any>;
19
22
  onGetTemplates?: (payload: any) => Promise<any>;
20
23
  onSubmit?: (payload: any) => Promise<any>;
21
24
  }
@@ -3,6 +3,7 @@ import './styles.scss';
3
3
  interface TopNavigationProps {
4
4
  store: any;
5
5
  returnRoute?: string | null;
6
+ createTemplateRoute?: string | null;
6
7
  isStoreUpdated: boolean;
7
8
  onSubmit?: (payload: any) => Promise<any>;
8
9
  }
@@ -10,6 +10,10 @@ interface TemplateBuilderProps {
10
10
  basicAuthUsername: string;
11
11
  basicAuthPassword: string;
12
12
  returnRoute?: string | null;
13
+ createTemplateRoute?: string | null;
14
+ templateBuilderRoute?: string | null;
15
+ olcTemplate?: Record<string, any>;
16
+ onGetOneTemplate?: (payload: any) => Promise<any>;
13
17
  onGetTemplates?: (payload: any) => Promise<any>;
14
18
  onGetCustomFields?: () => Promise<any>;
15
19
  onSubmit?: (payload: any) => Promise<any>;
@@ -17,5 +21,5 @@ interface TemplateBuilderProps {
17
21
  root?: CustomCSSProperties;
18
22
  };
19
23
  }
20
- declare const TemplateBuilder: ({ container, secretKey, basicAuthUsername, basicAuthPassword, returnRoute, onGetTemplates, onGetCustomFields, onSubmit, styles, }: TemplateBuilderProps) => void;
24
+ declare const TemplateBuilder: ({ container, secretKey, basicAuthUsername, basicAuthPassword, returnRoute, createTemplateRoute, templateBuilderRoute, olcTemplate, onGetOneTemplate, onGetTemplates, onGetCustomFields, onSubmit, styles, }: TemplateBuilderProps) => void;
21
25
  export default TemplateBuilder;
@@ -1,11 +1,4 @@
1
1
  import { AppDispatch } from '../store';
2
- /**
3
- * Makes an HTTP GET request to the 'templates' endpoint and dispatches an action with the retrieved data.
4
- * @param {number} id - The ID of the template to retrieve.
5
- * @param {function} dispatch - A function used to dispatch actions to the Redux store.
6
- * @returns {void}
7
- */
8
- declare const getOneTemplate: (id: number, type?: string) => (dispatch: AppDispatch) => Promise<void>;
9
2
  /**
10
3
  * Uploads a template using the provided template form data.
11
4
  *
@@ -95,4 +88,4 @@ declare const searchAndAdvanceChange: (name: string, value: any) => (dispatch: A
95
88
  * @throws {object} - The error response if there is an error.
96
89
  */
97
90
  declare const getAllTemplateCategories: () => Promise<any>;
98
- export { uploadTemplate, getOneTemplate, createTemplate, updateTemplate, searchAndAdvanceChange, clearAllTemplates, selectProduct, selectPostCard, clearTemplateFields, loadFormDataToStore, uploadFile, downloadProof, getAllTemplateCategories };
91
+ export { uploadTemplate, createTemplate, updateTemplate, searchAndAdvanceChange, clearAllTemplates, selectProduct, selectPostCard, clearTemplateFields, loadFormDataToStore, uploadFile, downloadProof, getAllTemplateCategories };
@@ -1,4 +1,5 @@
1
1
  export declare const MESSAGES: {
2
+ readonly TEMPLATE_MESSAGE_ON_SMALL_SCREEN: "Template Builder is available on tablet and web view only.";
2
3
  readonly GENERAL_ERROR: "Internal Server Error";
3
4
  readonly TEMPLATE: {
4
5
  readonly SEARCH_PLACE_HOLDER: "Search by template name or template ID";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openlettermarketing/olc-react-sdk",
3
3
  "private": false,
4
- "version": "0.0.30",
4
+ "version": "0.0.31",
5
5
  "type": "module",
6
6
  "description": "Simplify template builder integration for any product.",
7
7
  "main": "build/index.js",