@openlettermarketing/olc-react-sdk 1.6.4 → 1.6.5
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 +13 -13
- package/build/index.js.map +1 -1
- package/build/types/assets/images/templates/custom-qr-section-icon.d.ts +3 -0
- package/build/types/components/SidePanel/CustomQRCode/index.d.ts +13 -0
- package/build/types/utils/helper.d.ts +1 -0
- package/build/types/utils/message.d.ts +8 -0
- package/build/types/utils/template-builder.d.ts +1 -0
- package/package.json +4 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { StoreType } from 'polotno/model/store';
|
|
3
|
+
interface CustomQRProps {
|
|
4
|
+
store: StoreType;
|
|
5
|
+
}
|
|
6
|
+
declare const CustomQRCode: {
|
|
7
|
+
name: string;
|
|
8
|
+
Tab: (props: any) => React.JSX.Element;
|
|
9
|
+
Panel: (({ store }: CustomQRProps) => React.JSX.Element) & {
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default CustomQRCode;
|
|
@@ -6,6 +6,7 @@ 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 validURL: (str: string) => boolean;
|
|
9
10
|
export declare const hexToRgba: (hex: any, opacity: any) => string;
|
|
10
11
|
export declare const getType: (file: any) => "svg" | "image" | "video";
|
|
11
12
|
export declare const cleanString: (input: string) => string;
|
|
@@ -16,6 +16,7 @@ export declare const MESSAGES: {
|
|
|
16
16
|
readonly NAME_LESS_50: "Template Name should be less than or equal to 50 characters";
|
|
17
17
|
readonly GSV_RESTRICT_ONE_PER_PAGE: "Only one GSV image is allowed per page.";
|
|
18
18
|
readonly EMOJI_NOT_ALLOWED: "Emojis are not allowed in the template. Please remove them before saving.";
|
|
19
|
+
readonly EMPTY_QR_NOT_ALLOWED: "Please add a URL to your QR code in order to save the template.";
|
|
19
20
|
readonly CREATE: {
|
|
20
21
|
readonly TITLE: "Create New Template";
|
|
21
22
|
readonly TEMPLATE_LABEL: "Template Name*";
|
|
@@ -70,6 +71,13 @@ export declare const MESSAGES: {
|
|
|
70
71
|
readonly TYPE_VALIDATION: "Only image files with extensions jpeg, png, or svg are allowed.";
|
|
71
72
|
readonly SIZE_VALIDATION: "File size must be under 5MB.";
|
|
72
73
|
};
|
|
74
|
+
readonly QR_SECTION: {
|
|
75
|
+
readonly EMPTY_QR: "Please add a URL to your QR code.";
|
|
76
|
+
readonly QR_PLACEHOLDER: "Type a URL";
|
|
77
|
+
readonly INVALID_URL: "Please add a valid URL to your QR code.";
|
|
78
|
+
readonly SUBMIT_BUTTON: "Add new QR code";
|
|
79
|
+
readonly UPDATE_BUTTON: "Update QR code";
|
|
80
|
+
};
|
|
73
81
|
readonly DOWNLOAD_PROOF_BUTTON: "Download Proof";
|
|
74
82
|
readonly CANCEL_BUTTON: "Cancel";
|
|
75
83
|
readonly SUBMIT_BUTTON: "Save";
|
|
@@ -21,3 +21,4 @@ export declare const extractFontFamilies: (jsonData: any[]) => string[];
|
|
|
21
21
|
export declare const removeBracketsFromRPL: (jsonData: any[]) => any;
|
|
22
22
|
export declare const validateGSV: (pages: any) => boolean;
|
|
23
23
|
export declare const validateEmoji: (pages: any) => boolean;
|
|
24
|
+
export declare const isValidQR: (pages: any) => boolean;
|
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.
|
|
4
|
+
"version": "1.6.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Simplify template builder integration for any product.",
|
|
7
7
|
"main": "build/index.js",
|
|
@@ -44,7 +44,8 @@
|
|
|
44
44
|
"@fontsource/raleway": "^5.0.19",
|
|
45
45
|
"@reduxjs/toolkit": "^1.9.7",
|
|
46
46
|
"mobx-react-lite": "^4.0.7",
|
|
47
|
-
"polotno": "^2.
|
|
47
|
+
"polotno": "^2.14.1",
|
|
48
|
+
"qrcode": "^1.5.4",
|
|
48
49
|
"react": "^18.3.1",
|
|
49
50
|
"react-dom": "^18.3.1",
|
|
50
51
|
"react-redux": "^9.1.2",
|
|
@@ -69,6 +70,7 @@
|
|
|
69
70
|
"@testing-library/react": "^13.1.1",
|
|
70
71
|
"@tsconfig/node16": "^16.1.1",
|
|
71
72
|
"@types/jest": "^29.5.11",
|
|
73
|
+
"@types/qrcode": "^1.5.5",
|
|
72
74
|
"@types/react": "^18.2.66",
|
|
73
75
|
"@types/react-dom": "^18.3.0",
|
|
74
76
|
"@types/sortablejs": "1",
|