@openlettermarketing/olc-react-sdk 1.6.8-beta.0 → 1.6.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openlettermarketing/olc-react-sdk",
3
3
  "private": false,
4
- "version": "1.6.8-beta.0",
4
+ "version": "1.6.8-beta.1",
5
5
  "type": "module",
6
6
  "description": "Simplify template builder integration for any product.",
7
7
  "main": "build/index.js",
@@ -14,6 +14,7 @@
14
14
  "test": "jest --silent",
15
15
  "coverage": "npm run test -- --coverage",
16
16
  "prepare": "npm run build",
17
+ "publish:beta": "npm publish --access public --beta",
17
18
  "publish": "npm publish --access public"
18
19
  },
19
20
  "publishConfig": {
package/src/index.tsx CHANGED
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import ReactDOM from 'react-dom/client';
3
- import { BrowserRouter as Router } from 'react-router-dom';
4
- import { Provider } from 'react-redux';
3
+ import {BrowserRouter as Router} from 'react-router-dom';
4
+ import {Provider} from 'react-redux';
5
5
  import store from './redux/store';
6
6
  import App from './App';
7
7
  import './index.scss';
@@ -13,8 +13,8 @@ import '@fontsource/inter/600.css';
13
13
  import '@fontsource/inter/700.css';
14
14
 
15
15
  // utils
16
- import { CustomCSSProperties } from './utils/customStyles';
17
- import { setIsSandbox, setPublicApiKey } from './utils/helper';
16
+ import {CustomCSSProperties} from './utils/customStyles';
17
+ import {setIsSandbox, setPublicApiKey} from './utils/helper';
18
18
 
19
19
  interface TemplateBuilderProps {
20
20
  container: HTMLElement | null;
@@ -105,34 +105,34 @@ const TemplateBuilder = ({
105
105
  //@ts-ignore
106
106
  return {
107
107
  destroy() {
108
- console.log("React template builder destroyed");
108
+ console.log('React template builder destroyed');
109
109
  root.unmount();
110
- }
111
- }
110
+ },
111
+ };
112
112
  };
113
113
 
114
114
  // Example to run the project locally for development. Comment out these lines when building the application
115
115
 
116
- const rootElement = document.getElementById('root');
117
- if (rootElement) {
118
- console.log("React SDK Loaded");
119
- TemplateBuilder({
120
- container: rootElement,
121
- secretKey: import.meta.env.VITE_APP_PLOTNO_API_KEY,
122
- publicApiKey: import.meta.env.VITE_APP_PUBLIC_API_KEY,
123
- sandbox: true,
124
- allowSenderFields: true,
125
- allowPropertyFields: true,
126
- templateGalleryModal: false,
127
- excludedFields: ['{{C.FIRST_NAME}}', '{{C.ADDRESS_1}}', '{{SPF.FIRST_NAME}}'],
128
- // onGetOneTemplate: getOneTemplate,
129
- // olcTemplate: olcTemplateData,
130
- // onGetTemplates: getAllTemplatesByTab,
131
- // onSubmit: createTemplate,
132
- styles: {}
133
- });
134
- } else {
135
- console.error("Root element '#root' not found in the document.");
136
- }
116
+ // const rootElement = document.getElementById('root');
117
+ // if (rootElement) {
118
+ // console.log("React SDK Loaded");
119
+ // TemplateBuilder({
120
+ // container: rootElement,
121
+ // secretKey: import.meta.env.VITE_APP_PLOTNO_API_KEY,
122
+ // publicApiKey: import.meta.env.VITE_APP_PUBLIC_API_KEY,
123
+ // sandbox: true,
124
+ // allowSenderFields: true,
125
+ // allowPropertyFields: true,
126
+ // templateGalleryModal: false,
127
+ // excludedFields: ['{{C.FIRST_NAME}}', '{{C.ADDRESS_1}}', '{{SPF.FIRST_NAME}}'],
128
+ // // onGetOneTemplate: getOneTemplate,
129
+ // // olcTemplate: olcTemplateData,
130
+ // // onGetTemplates: getAllTemplatesByTab,
131
+ // // onSubmit: createTemplate,
132
+ // styles: {}
133
+ // });
134
+ // } else {
135
+ // console.error("Root element '#root' not found in the document.");
136
+ // }
137
137
 
138
138
  export default TemplateBuilder;