@openlettermarketing/olc-react-sdk 0.0.22 → 0.0.24
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/9742aeccae90d0af63fa303150f4dc14.png +0 -0
- package/build/index.js +4 -4
- package/build/index.js.map +1 -1
- package/build/types/assets/images/modal-icons/cross.d.ts +3 -0
- package/build/types/index.d.ts +5 -3
- package/build/types/utils/constants.d.ts +1 -1
- package/build/types/utils/customStyles.d.ts +5 -46
- package/build/types/utils/helper.d.ts +6 -0
- package/package.json +7 -5
- package/build/types/assets/images/modal-icons/modal-cross.d.ts +0 -3
package/build/types/index.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import './index.scss';
|
|
2
2
|
import '@fontsource/inter/400.css';
|
|
3
|
-
import '@fontsource/inter/700.css';
|
|
4
|
-
import '@fontsource/inter/600.css';
|
|
5
3
|
import '@fontsource/inter/500.css';
|
|
4
|
+
import '@fontsource/inter/600.css';
|
|
5
|
+
import '@fontsource/inter/700.css';
|
|
6
6
|
import { CustomCSSProperties } from './utils/customStyles';
|
|
7
7
|
interface TemplateBuilderProps {
|
|
8
8
|
container: HTMLElement | null;
|
|
9
9
|
secretKey: string;
|
|
10
|
+
basicAuthUsername: string;
|
|
11
|
+
basicAuthPassword: string;
|
|
10
12
|
returnRoute?: string | null;
|
|
11
13
|
onGetTemplates?: (payload: any) => Promise<any>;
|
|
12
14
|
onGetCustomFields?: () => Promise<any>;
|
|
@@ -15,5 +17,5 @@ interface TemplateBuilderProps {
|
|
|
15
17
|
root?: CustomCSSProperties;
|
|
16
18
|
};
|
|
17
19
|
}
|
|
18
|
-
declare const TemplateBuilder: ({ container, secretKey, returnRoute, onGetTemplates, onGetCustomFields, onSubmit, styles, }: TemplateBuilderProps) => void;
|
|
20
|
+
declare const TemplateBuilder: ({ container, secretKey, basicAuthUsername, basicAuthPassword, returnRoute, onGetTemplates, onGetCustomFields, onSubmit, styles, }: TemplateBuilderProps) => void;
|
|
19
21
|
export default TemplateBuilder;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const API_BASE_URL = "https://api.openletterconnect.com/api/v1";
|
|
1
|
+
export declare const API_BASE_URL = "https://api.openletterconnect.com/api/v1/sdk";
|
|
2
2
|
export declare const DPI: number;
|
|
3
3
|
export declare const Barcode: string;
|
|
4
4
|
export declare const PRODUCT_LEARN_URL: string;
|
|
@@ -1,56 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface CustomCSSProperties extends React.CSSProperties {
|
|
3
|
-
'--
|
|
3
|
+
'--font-family'?: string;
|
|
4
4
|
'--sb-thumb-color'?: string;
|
|
5
5
|
'--primaryColor'?: string;
|
|
6
|
+
'--secondaryColor'?: string;
|
|
6
7
|
'--svgColor'?: string;
|
|
8
|
+
'--svgColorNotActive'?: string;
|
|
9
|
+
'--mainBackgroundColor'?: string;
|
|
7
10
|
'--textColor'?: string;
|
|
8
|
-
'--productCardBgColor'?: string;
|
|
9
|
-
'--productCardBackgroundColorActive'?: string;
|
|
10
|
-
'--postCardBgColor'?: string;
|
|
11
|
-
'--postCardBackgroundColorActive'?: string;
|
|
12
|
-
'--postCardSVGColor'?: string;
|
|
13
|
-
'--inputBgColor'?: string;
|
|
14
|
-
'--inputTextColor'?: string;
|
|
15
|
-
'--inputBorderColor'?: string;
|
|
16
|
-
'--inputSearchAppliedBg'?: string;
|
|
17
|
-
'--inputSearchIcon'?: string;
|
|
18
|
-
'--selectBgColor'?: string;
|
|
19
|
-
'--selectTextColor'?: string;
|
|
20
|
-
'--selectBorderColor'?: string;
|
|
21
|
-
'--selectMenuBgColor'?: string;
|
|
22
|
-
'--selectOptionTextColor'?: string;
|
|
23
|
-
'--selectOptionBorderColor'?: string;
|
|
24
|
-
'--selectOptionFocusedColor'?: string;
|
|
25
|
-
'--selectOptionFocusedTextColor'?: string;
|
|
26
|
-
'--selectOptionSelectedColor'?: string;
|
|
27
|
-
'--selectOptionSelectedTextColor'?: string;
|
|
28
|
-
'--selectOptionSelectedBg'?: string;
|
|
29
|
-
'--topbarBgColor'?: string;
|
|
30
|
-
'--sidepanelBgColor'?: string;
|
|
31
|
-
'--sidepanelTextColor'?: string;
|
|
32
|
-
'--sidepanelTextColorHover'?: string;
|
|
33
|
-
'--sidepanelSVGColor'?: string;
|
|
34
|
-
'--sidepanelSVGColorActive'?: string;
|
|
35
|
-
'--sidepanelOptionHoverColor'?: string;
|
|
36
|
-
'--customFieldBorderColor'?: string;
|
|
37
|
-
'--customFieldTextColor'?: string;
|
|
38
|
-
'--customFieldCopySVGColor'?: string;
|
|
39
|
-
'--cardBgColor'?: string;
|
|
40
|
-
'--cardTextColor'?: string;
|
|
41
|
-
'--dialogModalBgColor'?: string;
|
|
42
|
-
'--dialogModalHeadingColor'?: string;
|
|
43
|
-
'--dialogModalTextColor'?: string;
|
|
44
|
-
'--dialogModalSVGColor'?: string;
|
|
45
11
|
'--borderColor'?: string;
|
|
46
|
-
'--
|
|
47
|
-
'--secondaryButtonTextColor'?: string;
|
|
48
|
-
'--primaryButtonBgColor'?: string;
|
|
49
|
-
'--primaryButtonTextColor'?: string;
|
|
50
|
-
'--iconHoverBgColor'?: string;
|
|
51
|
-
'--mainBackgroundColor'?: string;
|
|
52
|
-
'--footerBgColor'?: string;
|
|
53
|
-
'--red'?: string;
|
|
12
|
+
'--errorColor'?: string;
|
|
54
13
|
}
|
|
55
14
|
export interface Styles {
|
|
56
15
|
root: CustomCSSProperties;
|
|
@@ -1 +1,7 @@
|
|
|
1
|
+
export declare let basicAuthUsername: string;
|
|
2
|
+
export declare let basicAuthPassword: string;
|
|
1
3
|
export declare const copyToClipboard: (text: string) => void;
|
|
4
|
+
export declare const getAuthUserName: () => string;
|
|
5
|
+
export declare const getAuthUserPassword: () => string;
|
|
6
|
+
export declare const setAuthUserName: (name: string) => void;
|
|
7
|
+
export declare const setAuthUserPassword: (password: string) => void;
|
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.
|
|
4
|
+
"version": "0.0.24",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Simplify template builder integration for any product.",
|
|
7
7
|
"main": "build/index.js",
|
|
@@ -40,17 +40,19 @@
|
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@fontsource/inter": "^5.0.18",
|
|
43
|
+
"@fontsource/poppins": "^5.0.14",
|
|
44
|
+
"@fontsource/raleway": "^5.0.19",
|
|
45
|
+
"@reduxjs/toolkit": "^1.9.7",
|
|
43
46
|
"mobx-react-lite": "^4.0.7",
|
|
44
47
|
"polotno": "^2.4.5",
|
|
45
48
|
"react": "^18.3.1",
|
|
46
49
|
"react-dom": "^18.3.1",
|
|
47
50
|
"react-redux": "^9.1.2",
|
|
48
|
-
"redux": "^5.0.1",
|
|
49
|
-
"@reduxjs/toolkit": "^1.9.7",
|
|
50
51
|
"react-router-dom": "^6.23.1",
|
|
51
52
|
"react-select": "^5.8.0",
|
|
52
53
|
"react-toastify": "^10.0.5",
|
|
53
54
|
"react-tooltip": "^5.27.0",
|
|
55
|
+
"redux": "^5.0.1",
|
|
54
56
|
"styled-components": "^6.1.11"
|
|
55
57
|
},
|
|
56
58
|
"devDependencies": {
|
|
@@ -67,17 +69,16 @@
|
|
|
67
69
|
"@testing-library/jest-dom": "^5.16.4",
|
|
68
70
|
"@testing-library/react": "^13.1.1",
|
|
69
71
|
"@tsconfig/node16": "^16.1.1",
|
|
70
|
-
"@types/sortablejs": "1",
|
|
71
72
|
"@types/jest": "^29.5.11",
|
|
72
73
|
"@types/react": "^18.2.66",
|
|
73
74
|
"@types/react-dom": "^18.3.0",
|
|
75
|
+
"@types/sortablejs": "1",
|
|
74
76
|
"@typescript-eslint/eslint-plugin": "^6.17.0",
|
|
75
77
|
"@typescript-eslint/parser": "^6.17.0",
|
|
76
78
|
"@vitejs/plugin-react": "^4.3.0",
|
|
77
79
|
"babel-loader": "^9.1.3",
|
|
78
80
|
"css-loader": "^7.1.2",
|
|
79
81
|
"eslint": "^8.56.0",
|
|
80
|
-
"sass": "^1.77.4",
|
|
81
82
|
"eslint-config-prettier": "~9.1.0",
|
|
82
83
|
"eslint-plugin-jest": "~27.6.1",
|
|
83
84
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
@@ -85,6 +86,7 @@
|
|
|
85
86
|
"jest": "^29.7.0",
|
|
86
87
|
"parcel": "^2.12.0",
|
|
87
88
|
"prettier": "^3.1.1",
|
|
89
|
+
"sass": "^1.77.4",
|
|
88
90
|
"sass-loader": "^14.2.1",
|
|
89
91
|
"style-loader": "^4.0.0",
|
|
90
92
|
"svg-url-loader": "^8.0.0",
|