@openlettermarketing/olc-react-sdk 0.0.2
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/LICENSE +21 -0
- package/README.md +30 -0
- package/build/078b970ed8544b3c1d6a.woff2 +1 -0
- package/build/08a02fd275ecea6ef662f3ec8daaa32b.woff +0 -0
- package/build/0b74aa87abece70366c1771c4acca4e6.woff2 +0 -0
- package/build/0f46f8d8d4c86e97ab79680929430b5a.woff +0 -0
- package/build/0f9e8d4e940df8f6edfe114f2693359e.woff2 +0 -0
- package/build/10bbca98a818154c8140.woff +1 -0
- package/build/1b4b5615c2cc1d3b3562e46a4639071f.woff +0 -0
- package/build/1e2b9039d9ecdbea5d80be9f5d2d8ac0.woff2 +0 -0
- package/build/1eeaf1d0bde712085ffc7693bc6b6e3b.woff +0 -0
- package/build/20cbef325a3893fe67ad3f0c2720261f.woff2 +0 -0
- package/build/226db02060758b02ee1d.woff2 +1 -0
- package/build/229bcc3370343b068b96.woff +1 -0
- package/build/2ab03962aa9aa9a835c6.woff +1 -0
- package/build/2b4b00a609df7b5f0629.woff +1 -0
- package/build/31161fccc41bc72f7c300394137a632c.woff2 +0 -0
- package/build/33051edcbe786e6ffb9e.woff2 +1 -0
- package/build/37a1043b1a05d05ecd6b.woff2 +1 -0
- package/build/3b0f8e16e5bcd8f12096.woff2 +1 -0
- package/build/3dad27bec33be7aca881.woff +1 -0
- package/build/40b3b0d5e09a90fb6e3eda90583d9060.woff +0 -0
- package/build/4191c49f85cf8d80a464dfdbc4dae020.woff2 +0 -0
- package/build/4262c811b890c5f39daa.woff +1 -0
- package/build/42ce943388c4ff9a05a1827bd417762b.woff +0 -0
- package/build/45ef043c386456f5b09e.woff2 +1 -0
- package/build/47ae969018277a34c57a.woff +1 -0
- package/build/4c2578dbd1ff5ea1417281bd5e9635f3.woff +0 -0
- package/build/4cc5eccdc5c999a2f26de3d2288a3be3.woff +0 -0
- package/build/5245d2dfa665c22ee628.woff2 +1 -0
- package/build/544acdec5810964d78ffa5f80880a685.woff2 +0 -0
- package/build/55bbeb2a455ee4d261df347a1bf23272.woff +0 -0
- package/build/576f4f3d30f1a74c0e6e.woff +1 -0
- package/build/5952d3d3c5df5a2f8e09159d3e87bbd2.woff2 +0 -0
- package/build/5d2eaa33f8194c062cad2a48ea271f20.woff2 +0 -0
- package/build/5f7fdbd0ba543a7a2c59.woff2 +1 -0
- package/build/635c633f87deb3bb6c94.woff +1 -0
- package/build/63a3bb0067edaf8596bcc9e05335a08f.woff2 +0 -0
- package/build/63fbd5c46deac46bc49d.woff2 +1 -0
- package/build/65678f6198b402319e1556408d4dca17.woff2 +0 -0
- package/build/65d7177279840c70fd98.woff +1 -0
- package/build/6672663822e45eb08a26.woff +1 -0
- package/build/6c13238f0b1bd29762a9.woff2 +1 -0
- package/build/6eab7f5e6cae783b49bf13d5d03778aa.woff +0 -0
- package/build/6efafe4a5a505ed66087.woff2 +1 -0
- package/build/708f2f7425851a3b7633ad76610902cb.woff +0 -0
- package/build/71c75c707fa65ae2e020.woff +1 -0
- package/build/71fe56d0eae817ea6306a608c3ed8e29.ttf +0 -0
- package/build/7cabe478a7dd00f2be5e.woff2 +1 -0
- package/build/862bc70ae0a0695770e7075a1f7190d4.woff2 +0 -0
- package/build/91c4ed20ea233963e54fdfd7c94bbb3c.woff +0 -0
- package/build/967ff698d058fd7afc9471f46a7c6ebf.woff +0 -0
- package/build/99e09492528287bd42d3.woff2 +1 -0
- package/build/9cab44e73e21bce8d0ec19926a90a6cc.woff2 +0 -0
- package/build/9e418f84ee90e15d0251f040ea885b1c.woff +0 -0
- package/build/a09f33b5a3e7968c63b4.woff +1 -0
- package/build/a183ee79cca1f8c65af3.woff +1 -0
- package/build/a72b6dcf32e1950961ff.woff2 +1 -0
- package/build/a74efd2eea3c4e386507.woff2 +1 -0
- package/build/a797c6df2a7f3307ec1447aea8430ea9.woff +0 -0
- package/build/ac62c8eba7f954b48546cfea5ace5bdf.woff2 +0 -0
- package/build/afbcb5ba2915e27272bc.woff +1 -0
- package/build/b4118e4ad76754e71d0b83b5dfa34574.woff2 +0 -0
- package/build/b42ff4f76286c2718c6a28e8988a2ca9.woff +0 -0
- package/build/b5907ba78848350cc015775558fffd18.woff2 +0 -0
- package/build/b61f9df87fe302b1bada.woff +1 -0
- package/build/b7a60a349aea44e3fa5d.woff2 +1 -0
- package/build/bb55db38ba23eafee35c.woff2 +1 -0
- package/build/be0e76b30a7663adf9eb4a9605c287b6.woff2 +0 -0
- package/build/c9f54ac8a46a41a3e42e.woff +1 -0
- package/build/cd2ad378115f549d3c5b311fe2f1b5ef.woff +0 -0
- package/build/d0a064c5281603dbff7e.woff +1 -0
- package/build/d311f70377911d4de94e.woff +1 -0
- package/build/d364ef973d16c473e75b.woff2 +1 -0
- package/build/d559bd0e015df10bf067.woff2 +1 -0
- package/build/d734ef5c1391f85dfa86a8df4240b867.woff +0 -0
- package/build/dd25e4776efe42c2253f674251b1f6bc.woff +0 -0
- package/build/e18e42b90e145975a8d5.woff2 +1 -0
- package/build/e3bd0ea116d26368ddb7bbea8b6d46c9.woff2 +0 -0
- package/build/e4e658bd15474bdf1f720924cfa2df5b.woff +0 -0
- package/build/ed6d45d8f05318f8fb35.woff +1 -0
- package/build/f1535355a7df553be385f90ff3a00f7a.woff2 +0 -0
- package/build/f25a8073a166dea985ec.woff2 +1 -0
- package/build/f46a1ac3f31c2604b7f2.woff +1 -0
- package/build/f5d386a9b66422144df379be5b249a14.woff2 +0 -0
- package/build/fa67b2dd0048a5433bd5ce386f4760fc.woff +0 -0
- package/build/fa78d8d6788399bf6527af32633fd8dc.woff2 +0 -0
- package/build/index.js +539 -0
- package/build/index.js.map +1 -0
- package/build/types/App.d.ts +8 -0
- package/build/types/assets/images/input/cancel.d.ts +3 -0
- package/build/types/assets/images/input/search.d.ts +3 -0
- package/build/types/assets/images/modal-icons/modal-cross.d.ts +3 -0
- package/build/types/assets/images/modal-icons/save.d.ts +3 -0
- package/build/types/assets/images/templates/content-copy-icon.d.ts +3 -0
- package/build/types/assets/images/templates/custom-template.d.ts +3 -0
- package/build/types/assets/images/templates/dynamic-field.d.ts +3 -0
- package/build/types/assets/images/templates/info-icon.d.ts +3 -0
- package/build/types/assets/images/templates/size-image-lg.d.ts +3 -0
- package/build/types/assets/images/templates/size-image-mid.d.ts +3 -0
- package/build/types/assets/images/templates/size-image.d.ts +3 -0
- package/build/types/components/CreateTemplate/index.d.ts +7 -0
- package/build/types/components/GenericUIBlocks/Button/index.d.ts +10 -0
- package/build/types/components/GenericUIBlocks/CircularProgress/index.d.ts +7 -0
- package/build/types/components/GenericUIBlocks/Dialog/index.d.ts +19 -0
- package/build/types/components/GenericUIBlocks/Divider/index.d.ts +4 -0
- package/build/types/components/GenericUIBlocks/GeneralSelect/index.d.ts +18 -0
- package/build/types/components/GenericUIBlocks/GeneralTooltip/index.d.ts +10 -0
- package/build/types/components/GenericUIBlocks/GenericSnackbar/index.d.ts +5 -0
- package/build/types/components/GenericUIBlocks/Grid/index.d.ts +3 -0
- package/build/types/components/GenericUIBlocks/Input/index.d.ts +19 -0
- package/build/types/components/GenericUIBlocks/Typography/index.d.ts +10 -0
- package/build/types/components/SidePanel/customFields/customFieldSection.d.ts +5 -0
- package/build/types/components/SidePanel/index.d.ts +7 -0
- package/build/types/components/SidePanel/templates/customTemplateSection.d.ts +23 -0
- package/build/types/components/TemplateBuilder/index.d.ts +21 -0
- package/build/types/components/TopNavigation/ConfirmNavigateDialog/index.d.ts +9 -0
- package/build/types/components/TopNavigation/EditTemplateNameModel/index.d.ts +17 -0
- package/build/types/components/TopNavigation/SaveTemplateModel/index.d.ts +10 -0
- package/build/types/components/TopNavigation/index.d.ts +8 -0
- package/build/types/index.d.ts +15 -0
- package/build/types/redux/actions/action-types.d.ts +29 -0
- package/build/types/redux/actions/customFieldAction.d.ts +4 -0
- package/build/types/redux/actions/snackbarActions.d.ts +5 -0
- package/build/types/redux/actions/templateActions.d.ts +209 -0
- package/build/types/redux/reducers/customFieldReducer.d.ts +8 -0
- package/build/types/redux/reducers/index.d.ts +13 -0
- package/build/types/redux/reducers/snackbarReducer.d.ts +16 -0
- package/build/types/redux/reducers/templateReducer.d.ts +58 -0
- package/build/types/redux/store.d.ts +10 -0
- package/build/types/utils/api.d.ts +5 -0
- package/build/types/utils/constants.d.ts +9 -0
- package/build/types/utils/fetchWrapper.d.ts +8 -0
- package/build/types/utils/helper.d.ts +5 -0
- package/build/types/utils/local-storage.d.ts +4 -0
- package/build/types/utils/message.d.ts +64 -0
- package/build/types/utils/template-builder.d.ts +18 -0
- package/build/types/utils/templateRestrictedArea/biFold.d.ts +78 -0
- package/build/types/utils/templateRestrictedArea/postCard.d.ts +78 -0
- package/build/types/utils/templateRestrictedArea/professional.d.ts +78 -0
- package/build/types/utils/templateRestrictedArea/realPenned.d.ts +78 -0
- package/build/types/utils/templateRestrictedArea/triFold.d.ts +78 -0
- package/package.json +99 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export interface DynamicField {
|
|
2
|
+
value: string;
|
|
3
|
+
key: string;
|
|
4
|
+
defaultValue: string;
|
|
5
|
+
}
|
|
6
|
+
export interface Template {
|
|
7
|
+
title: string;
|
|
8
|
+
product: Product | null;
|
|
9
|
+
templateType: string;
|
|
10
|
+
}
|
|
11
|
+
export interface Product {
|
|
12
|
+
size: Array<{
|
|
13
|
+
size: string;
|
|
14
|
+
}>;
|
|
15
|
+
productType: string;
|
|
16
|
+
}
|
|
17
|
+
export interface TemplatesState {
|
|
18
|
+
count: number;
|
|
19
|
+
rows: any[];
|
|
20
|
+
currentPage: number;
|
|
21
|
+
lastPage: number;
|
|
22
|
+
from: number;
|
|
23
|
+
to: number;
|
|
24
|
+
perPage: number;
|
|
25
|
+
total: number;
|
|
26
|
+
loading: boolean;
|
|
27
|
+
totalRecordsInDB: number | null;
|
|
28
|
+
}
|
|
29
|
+
export interface PaginationState {
|
|
30
|
+
page: number;
|
|
31
|
+
pageSize: number;
|
|
32
|
+
loading: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface TemplateState {
|
|
35
|
+
title: string;
|
|
36
|
+
product: Product | null;
|
|
37
|
+
dynamicField: string;
|
|
38
|
+
dynamicFields: Record<string, DynamicField>;
|
|
39
|
+
defaultDynamicFieldsHashMap: Record<string, DynamicField>;
|
|
40
|
+
defaultDynamicFields: DynamicField[];
|
|
41
|
+
products: any[];
|
|
42
|
+
productDetailByTemplate: any[];
|
|
43
|
+
templates: TemplatesState;
|
|
44
|
+
templatesPagination: PaginationState;
|
|
45
|
+
template: Template | null;
|
|
46
|
+
totalRecordsInDB: number | null;
|
|
47
|
+
search: string;
|
|
48
|
+
searchProductIds: string;
|
|
49
|
+
searchCreator: string;
|
|
50
|
+
templateType: string;
|
|
51
|
+
envelopeType: string;
|
|
52
|
+
templateLoading: boolean | null;
|
|
53
|
+
}
|
|
54
|
+
declare const templateReducer: (state: TemplateState | undefined, { type, payload }: {
|
|
55
|
+
type: any;
|
|
56
|
+
payload: any;
|
|
57
|
+
}) => TemplateState;
|
|
58
|
+
export { templateReducer };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const store: import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<{
|
|
2
|
+
templates: import("./reducers/templateReducer").TemplateState;
|
|
3
|
+
customFields: import("./reducers/customFieldReducer").CustomFieldState;
|
|
4
|
+
snackbarReducers: {
|
|
5
|
+
snackbar: any;
|
|
6
|
+
};
|
|
7
|
+
}, any, any>;
|
|
8
|
+
export type RootState = ReturnType<typeof store.getState>;
|
|
9
|
+
export type AppDispatch = typeof store.dispatch;
|
|
10
|
+
export default store;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const get: (endpoint: string, params?: any) => Promise<unknown>;
|
|
2
|
+
export declare const post: (endpoint: string, body: any) => Promise<unknown>;
|
|
3
|
+
export declare const put: (endpoint: string, body: any) => Promise<unknown>;
|
|
4
|
+
export declare const patch: (endpoint: string, body: any) => Promise<unknown>;
|
|
5
|
+
export declare const del: (endpoint: string, params?: Record<string, string>) => Promise<unknown>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const DPI: number;
|
|
2
|
+
export declare const Barcode: string;
|
|
3
|
+
export declare const PRODUCT_LEARN_URL: string;
|
|
4
|
+
export declare const multiPageLetters: string[];
|
|
5
|
+
export declare const templateTypes: {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}[];
|
|
9
|
+
export declare const sortOrderForTemplates: string[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface RequestOptions {
|
|
2
|
+
method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
3
|
+
headers?: Record<string, string>;
|
|
4
|
+
body?: any;
|
|
5
|
+
params?: Record<string, string>;
|
|
6
|
+
}
|
|
7
|
+
declare const fetchWrapper: (endpoint: string, options: RequestOptions) => Promise<unknown>;
|
|
8
|
+
export default fetchWrapper;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export declare const MESSAGES: {
|
|
2
|
+
readonly GENERAL_ERROR: "Internal Server Error";
|
|
3
|
+
readonly TEMPLATE: {
|
|
4
|
+
readonly SEARCH_PLACE_HOLDER: "Search by template name or template ID";
|
|
5
|
+
readonly NAME_REQUIRED: "Template Name is required";
|
|
6
|
+
readonly TYPE_REQUIRED: "Template Type is required";
|
|
7
|
+
readonly PRODUCT_TYPE_REQUIRED: "Product Type is required";
|
|
8
|
+
readonly ENVELOPE_TYPE_REQUIRED: "Envelope Type is required";
|
|
9
|
+
readonly POSTCARD_SIZE_REQUIRED: "Postcard Size is required";
|
|
10
|
+
readonly NAME_LESS_50: "Template Name should be less than or equal to 50 characters";
|
|
11
|
+
readonly CREATE: {
|
|
12
|
+
readonly TITLE: "Create New Template";
|
|
13
|
+
readonly TEMPLATE_LABEL: "Template Name*";
|
|
14
|
+
readonly PRODUCT_LABEL: "Product Type*";
|
|
15
|
+
readonly LEARN_TEXT: "Learn More";
|
|
16
|
+
readonly CANCEL_BUTTON: "Cancel";
|
|
17
|
+
readonly SUBMIT_BUTTON: "Next";
|
|
18
|
+
};
|
|
19
|
+
readonly LIMIT_MODAL: {
|
|
20
|
+
readonly TITLE: "Limit Reached";
|
|
21
|
+
readonly HEADING: "You've reached your template limit";
|
|
22
|
+
readonly SUB_HEADING: "Please Upgrade your subscription to add more templates";
|
|
23
|
+
readonly CANCEL_BUTTON: "Cancel";
|
|
24
|
+
readonly SUBMIT_BUTTON: "View Plans";
|
|
25
|
+
};
|
|
26
|
+
readonly DELETE: {
|
|
27
|
+
readonly TITLE: "Delete Template";
|
|
28
|
+
readonly HEADING: "Are you sure you want to delete this Template?";
|
|
29
|
+
readonly PARAGRAPH: "This template will be deleted from your Templates list but will still be included in associated orders.";
|
|
30
|
+
};
|
|
31
|
+
readonly SAVE: {
|
|
32
|
+
readonly TITLE: "Confirm Save Template";
|
|
33
|
+
readonly HEADING: "Are you sure you want to save this template?";
|
|
34
|
+
readonly PARAGRAPH: "The updates provided will be used right away for any orders referencing this template.";
|
|
35
|
+
readonly CANCEL_BUTTON: "Cancel";
|
|
36
|
+
readonly SUBMIT_BUTTON: "Save";
|
|
37
|
+
};
|
|
38
|
+
readonly CANCEL: {
|
|
39
|
+
readonly TITLE: "Confirm Cancel Template";
|
|
40
|
+
readonly HEADING: "Are you sure you want to cancel this Template?";
|
|
41
|
+
readonly PARAGRAPH: "You will lose your changes after canceling.";
|
|
42
|
+
readonly BACK_BUTTON: "Go Back";
|
|
43
|
+
readonly CANCEL_BUTTON: "Cancel";
|
|
44
|
+
};
|
|
45
|
+
readonly DESIGN_YOUR_OWN: {
|
|
46
|
+
readonly TITLE: "Confirm";
|
|
47
|
+
readonly HEADING: "Are you sure you want to discard these changes?";
|
|
48
|
+
readonly PARAGRAPH: "You will lose your changes. Please save your changes or click ok to proceed.";
|
|
49
|
+
};
|
|
50
|
+
readonly SELECT_TEMPLATE: {
|
|
51
|
+
readonly TITLE: "Confirm";
|
|
52
|
+
readonly HEADING: "Are you sure you want to change current template with this one?";
|
|
53
|
+
readonly PARAGRAPH: "You will lose your changes. Please save your changes or click ok to proceed.";
|
|
54
|
+
readonly SUBMIT_BUTTON: "OK";
|
|
55
|
+
readonly CANCEL_BUTTON: "Cancel";
|
|
56
|
+
};
|
|
57
|
+
readonly DOWNLOAD_PROOF_BUTTON: "Download Proof";
|
|
58
|
+
readonly CANCEL_BUTTON: "Cancel";
|
|
59
|
+
readonly SUBMIT_BUTTON: "Save";
|
|
60
|
+
};
|
|
61
|
+
readonly SNACKBAR: {
|
|
62
|
+
readonly HEADING: "Notifications";
|
|
63
|
+
};
|
|
64
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const addressPrinting: {
|
|
2
|
+
[key: string]: boolean;
|
|
3
|
+
};
|
|
4
|
+
export declare const multiPageTemplates: string[];
|
|
5
|
+
export interface EnvelopeType {
|
|
6
|
+
id: number;
|
|
7
|
+
label: string;
|
|
8
|
+
type: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const envelopeTypes: EnvelopeType[];
|
|
11
|
+
export declare const getFileAsBlob: (url: string, returnType?: string) => Promise<any>;
|
|
12
|
+
export declare const blobToString: (blob: Blob) => Promise<string>;
|
|
13
|
+
export declare const downloadPDF: (title: string, url: string) => void;
|
|
14
|
+
export interface Product {
|
|
15
|
+
productType: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const drawRestrictedAreaOnPage: (store: any, product: Product, envelopeType: string) => void;
|
|
18
|
+
export declare const extractFontFamilies: (jsonData: any[]) => string[];
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
interface Element {
|
|
2
|
+
id: string;
|
|
3
|
+
type: string;
|
|
4
|
+
name: string;
|
|
5
|
+
opacity: number;
|
|
6
|
+
visible: boolean;
|
|
7
|
+
selectable: boolean;
|
|
8
|
+
removable: boolean;
|
|
9
|
+
alwaysOnTop: boolean;
|
|
10
|
+
showInExport: boolean;
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
rotation: number;
|
|
16
|
+
animations?: any[];
|
|
17
|
+
blurEnabled?: boolean;
|
|
18
|
+
blurRadius?: number;
|
|
19
|
+
brightnessEnabled?: boolean;
|
|
20
|
+
brightness?: number;
|
|
21
|
+
sepiaEnabled?: boolean;
|
|
22
|
+
grayscaleEnabled?: boolean;
|
|
23
|
+
shadowEnabled?: boolean;
|
|
24
|
+
shadowBlur?: number;
|
|
25
|
+
shadowOffsetX?: number;
|
|
26
|
+
shadowOffsetY?: number;
|
|
27
|
+
shadowColor?: string;
|
|
28
|
+
shadowOpacity?: number;
|
|
29
|
+
draggable?: boolean;
|
|
30
|
+
resizable?: boolean;
|
|
31
|
+
contentEditable: boolean;
|
|
32
|
+
styleEditable: boolean;
|
|
33
|
+
subType?: string;
|
|
34
|
+
fill?: string;
|
|
35
|
+
dash?: any[];
|
|
36
|
+
strokeWidth?: number;
|
|
37
|
+
stroke?: string;
|
|
38
|
+
cornerRadius?: number;
|
|
39
|
+
text?: string;
|
|
40
|
+
placeholder?: string;
|
|
41
|
+
fontSize?: number;
|
|
42
|
+
fontFamily?: string;
|
|
43
|
+
fontStyle?: string;
|
|
44
|
+
fontWeight?: string;
|
|
45
|
+
textDecoration?: string;
|
|
46
|
+
align?: string;
|
|
47
|
+
verticalAlign?: string;
|
|
48
|
+
lineHeight?: number;
|
|
49
|
+
letterSpacing?: number;
|
|
50
|
+
backgroundEnabled?: boolean;
|
|
51
|
+
backgroundColor?: string;
|
|
52
|
+
backgroundOpacity?: number;
|
|
53
|
+
backgroundCornerRadius?: number;
|
|
54
|
+
backgroundPadding?: number;
|
|
55
|
+
src?: string;
|
|
56
|
+
cropX?: number;
|
|
57
|
+
cropY?: number;
|
|
58
|
+
cropWidth?: number;
|
|
59
|
+
cropHeight?: number;
|
|
60
|
+
flipX?: boolean;
|
|
61
|
+
flipY?: boolean;
|
|
62
|
+
clipSrc?: string;
|
|
63
|
+
borderSize?: number;
|
|
64
|
+
keepRatio?: boolean;
|
|
65
|
+
}
|
|
66
|
+
interface Page {
|
|
67
|
+
addElement: (element: Element) => void;
|
|
68
|
+
}
|
|
69
|
+
interface Store {
|
|
70
|
+
width: number;
|
|
71
|
+
height: number;
|
|
72
|
+
pages: Page[];
|
|
73
|
+
history: {
|
|
74
|
+
clear: () => void;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export declare const addRestrictedAreaToBiFold: (store: Store, size: [number, number], barcodeSrc: string) => void;
|
|
78
|
+
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
interface Element {
|
|
2
|
+
id: string;
|
|
3
|
+
type: string;
|
|
4
|
+
name: string;
|
|
5
|
+
opacity: number;
|
|
6
|
+
visible: boolean;
|
|
7
|
+
selectable: boolean;
|
|
8
|
+
removable: boolean;
|
|
9
|
+
alwaysOnTop: boolean;
|
|
10
|
+
showInExport: boolean;
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
rotation: number;
|
|
16
|
+
animations?: any[];
|
|
17
|
+
blurEnabled?: boolean;
|
|
18
|
+
blurRadius?: number;
|
|
19
|
+
brightnessEnabled?: boolean;
|
|
20
|
+
brightness?: number;
|
|
21
|
+
sepiaEnabled?: boolean;
|
|
22
|
+
grayscaleEnabled?: boolean;
|
|
23
|
+
shadowEnabled?: boolean;
|
|
24
|
+
shadowBlur?: number;
|
|
25
|
+
shadowOffsetX?: number;
|
|
26
|
+
shadowOffsetY?: number;
|
|
27
|
+
shadowColor?: string;
|
|
28
|
+
shadowOpacity?: number;
|
|
29
|
+
draggable?: boolean;
|
|
30
|
+
resizable?: boolean;
|
|
31
|
+
contentEditable: boolean;
|
|
32
|
+
styleEditable: boolean;
|
|
33
|
+
subType?: string;
|
|
34
|
+
fill?: string;
|
|
35
|
+
dash?: any[];
|
|
36
|
+
strokeWidth?: number;
|
|
37
|
+
stroke?: string;
|
|
38
|
+
cornerRadius?: number;
|
|
39
|
+
text?: string;
|
|
40
|
+
placeholder?: string;
|
|
41
|
+
fontSize?: number;
|
|
42
|
+
fontFamily?: string;
|
|
43
|
+
fontStyle?: string;
|
|
44
|
+
fontWeight?: string;
|
|
45
|
+
textDecoration?: string;
|
|
46
|
+
align?: string;
|
|
47
|
+
verticalAlign?: string;
|
|
48
|
+
lineHeight?: number;
|
|
49
|
+
letterSpacing?: number;
|
|
50
|
+
backgroundEnabled?: boolean;
|
|
51
|
+
backgroundColor?: string;
|
|
52
|
+
backgroundOpacity?: number;
|
|
53
|
+
backgroundCornerRadius?: number;
|
|
54
|
+
backgroundPadding?: number;
|
|
55
|
+
src?: string;
|
|
56
|
+
cropX?: number;
|
|
57
|
+
cropY?: number;
|
|
58
|
+
cropWidth?: number;
|
|
59
|
+
cropHeight?: number;
|
|
60
|
+
flipX?: boolean;
|
|
61
|
+
flipY?: boolean;
|
|
62
|
+
clipSrc?: string;
|
|
63
|
+
borderSize?: number;
|
|
64
|
+
keepRatio?: boolean;
|
|
65
|
+
}
|
|
66
|
+
interface Page {
|
|
67
|
+
addElement: (element: Element) => void;
|
|
68
|
+
}
|
|
69
|
+
interface Store {
|
|
70
|
+
width: number;
|
|
71
|
+
height: number;
|
|
72
|
+
pages: Page[];
|
|
73
|
+
history: {
|
|
74
|
+
clear: () => void;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export declare const addRestrictedAreaToPostCard: (store: Store, size: [number, number], barcodeSrc: string) => void;
|
|
78
|
+
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
interface Element {
|
|
2
|
+
id: string;
|
|
3
|
+
type: string;
|
|
4
|
+
name: string;
|
|
5
|
+
opacity: number;
|
|
6
|
+
visible: boolean;
|
|
7
|
+
selectable: boolean;
|
|
8
|
+
removable: boolean;
|
|
9
|
+
alwaysOnTop: boolean;
|
|
10
|
+
showInExport: boolean;
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
rotation: number;
|
|
16
|
+
animations?: any[];
|
|
17
|
+
blurEnabled?: boolean;
|
|
18
|
+
blurRadius?: number;
|
|
19
|
+
brightnessEnabled?: boolean;
|
|
20
|
+
brightness?: number;
|
|
21
|
+
sepiaEnabled?: boolean;
|
|
22
|
+
grayscaleEnabled?: boolean;
|
|
23
|
+
shadowEnabled?: boolean;
|
|
24
|
+
shadowBlur?: number;
|
|
25
|
+
shadowOffsetX?: number;
|
|
26
|
+
shadowOffsetY?: number;
|
|
27
|
+
shadowColor?: string;
|
|
28
|
+
shadowOpacity?: number;
|
|
29
|
+
draggable?: boolean;
|
|
30
|
+
resizable?: boolean;
|
|
31
|
+
contentEditable: boolean;
|
|
32
|
+
styleEditable: boolean;
|
|
33
|
+
subType?: string;
|
|
34
|
+
fill?: string;
|
|
35
|
+
dash?: any[];
|
|
36
|
+
strokeWidth?: number;
|
|
37
|
+
stroke?: string;
|
|
38
|
+
cornerRadius?: number;
|
|
39
|
+
text?: string;
|
|
40
|
+
placeholder?: string;
|
|
41
|
+
fontSize?: number;
|
|
42
|
+
fontFamily?: string;
|
|
43
|
+
fontStyle?: string;
|
|
44
|
+
fontWeight?: string;
|
|
45
|
+
textDecoration?: string;
|
|
46
|
+
align?: string;
|
|
47
|
+
verticalAlign?: string;
|
|
48
|
+
lineHeight?: number;
|
|
49
|
+
letterSpacing?: number;
|
|
50
|
+
backgroundEnabled?: boolean;
|
|
51
|
+
backgroundColor?: string;
|
|
52
|
+
backgroundOpacity?: number;
|
|
53
|
+
backgroundCornerRadius?: number;
|
|
54
|
+
backgroundPadding?: number;
|
|
55
|
+
src?: string;
|
|
56
|
+
cropX?: number;
|
|
57
|
+
cropY?: number;
|
|
58
|
+
cropWidth?: number;
|
|
59
|
+
cropHeight?: number;
|
|
60
|
+
flipX?: boolean;
|
|
61
|
+
flipY?: boolean;
|
|
62
|
+
clipSrc?: string;
|
|
63
|
+
borderSize?: number;
|
|
64
|
+
keepRatio?: boolean;
|
|
65
|
+
}
|
|
66
|
+
interface Page {
|
|
67
|
+
addElement: (element: Element) => void;
|
|
68
|
+
}
|
|
69
|
+
interface Store {
|
|
70
|
+
width: number;
|
|
71
|
+
height: number;
|
|
72
|
+
pages: Page[];
|
|
73
|
+
history: {
|
|
74
|
+
clear: () => void;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export declare const addAreaToProfessionalLetters: (store: Store, barcodeSrc: string) => void;
|
|
78
|
+
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
interface Element {
|
|
2
|
+
id: string;
|
|
3
|
+
type: string;
|
|
4
|
+
name: string;
|
|
5
|
+
opacity: number;
|
|
6
|
+
visible: boolean;
|
|
7
|
+
selectable: boolean;
|
|
8
|
+
removable: boolean;
|
|
9
|
+
alwaysOnTop: boolean;
|
|
10
|
+
showInExport: boolean;
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
rotation: number;
|
|
16
|
+
animations?: any[];
|
|
17
|
+
blurEnabled?: boolean;
|
|
18
|
+
blurRadius?: number;
|
|
19
|
+
brightnessEnabled?: boolean;
|
|
20
|
+
brightness?: number;
|
|
21
|
+
sepiaEnabled?: boolean;
|
|
22
|
+
grayscaleEnabled?: boolean;
|
|
23
|
+
shadowEnabled?: boolean;
|
|
24
|
+
shadowBlur?: number;
|
|
25
|
+
shadowOffsetX?: number;
|
|
26
|
+
shadowOffsetY?: number;
|
|
27
|
+
shadowColor?: string;
|
|
28
|
+
shadowOpacity?: number;
|
|
29
|
+
draggable?: boolean;
|
|
30
|
+
resizable?: boolean;
|
|
31
|
+
contentEditable: boolean;
|
|
32
|
+
styleEditable: boolean;
|
|
33
|
+
subType?: string;
|
|
34
|
+
fill?: string;
|
|
35
|
+
dash?: any[];
|
|
36
|
+
strokeWidth?: number;
|
|
37
|
+
stroke?: string;
|
|
38
|
+
cornerRadius?: number;
|
|
39
|
+
text?: string;
|
|
40
|
+
placeholder?: string;
|
|
41
|
+
fontSize?: number;
|
|
42
|
+
fontFamily?: string;
|
|
43
|
+
fontStyle?: string;
|
|
44
|
+
fontWeight?: string;
|
|
45
|
+
textDecoration?: string;
|
|
46
|
+
align?: string;
|
|
47
|
+
verticalAlign?: string;
|
|
48
|
+
lineHeight?: number;
|
|
49
|
+
letterSpacing?: number;
|
|
50
|
+
backgroundEnabled?: boolean;
|
|
51
|
+
backgroundColor?: string;
|
|
52
|
+
backgroundOpacity?: number;
|
|
53
|
+
backgroundCornerRadius?: number;
|
|
54
|
+
backgroundPadding?: number;
|
|
55
|
+
src?: string;
|
|
56
|
+
cropX?: number;
|
|
57
|
+
cropY?: number;
|
|
58
|
+
cropWidth?: number;
|
|
59
|
+
cropHeight?: number;
|
|
60
|
+
flipX?: boolean;
|
|
61
|
+
flipY?: boolean;
|
|
62
|
+
clipSrc?: string;
|
|
63
|
+
borderSize?: number;
|
|
64
|
+
keepRatio?: boolean;
|
|
65
|
+
}
|
|
66
|
+
interface Page {
|
|
67
|
+
addElement: (element: Element) => void;
|
|
68
|
+
}
|
|
69
|
+
interface Store {
|
|
70
|
+
width: number;
|
|
71
|
+
height: number;
|
|
72
|
+
pages: Page[];
|
|
73
|
+
history: {
|
|
74
|
+
clear: () => void;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export declare const addElementsforRealPennedLetters: (store: Store) => void;
|
|
78
|
+
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
interface Element {
|
|
2
|
+
id: string;
|
|
3
|
+
type: string;
|
|
4
|
+
name: string;
|
|
5
|
+
opacity: number;
|
|
6
|
+
visible: boolean;
|
|
7
|
+
selectable: boolean;
|
|
8
|
+
removable: boolean;
|
|
9
|
+
alwaysOnTop: boolean;
|
|
10
|
+
showInExport: boolean;
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
rotation: number;
|
|
16
|
+
animations?: any[];
|
|
17
|
+
blurEnabled?: boolean;
|
|
18
|
+
blurRadius?: number;
|
|
19
|
+
brightnessEnabled?: boolean;
|
|
20
|
+
brightness?: number;
|
|
21
|
+
sepiaEnabled?: boolean;
|
|
22
|
+
grayscaleEnabled?: boolean;
|
|
23
|
+
shadowEnabled?: boolean;
|
|
24
|
+
shadowBlur?: number;
|
|
25
|
+
shadowOffsetX?: number;
|
|
26
|
+
shadowOffsetY?: number;
|
|
27
|
+
shadowColor?: string;
|
|
28
|
+
shadowOpacity?: number;
|
|
29
|
+
draggable?: boolean;
|
|
30
|
+
resizable?: boolean;
|
|
31
|
+
contentEditable: boolean;
|
|
32
|
+
styleEditable: boolean;
|
|
33
|
+
subType?: string;
|
|
34
|
+
fill?: string;
|
|
35
|
+
dash?: any[];
|
|
36
|
+
strokeWidth?: number;
|
|
37
|
+
stroke?: string;
|
|
38
|
+
cornerRadius?: number;
|
|
39
|
+
text?: string;
|
|
40
|
+
placeholder?: string;
|
|
41
|
+
fontSize?: number;
|
|
42
|
+
fontFamily?: string;
|
|
43
|
+
fontStyle?: string;
|
|
44
|
+
fontWeight?: string;
|
|
45
|
+
textDecoration?: string;
|
|
46
|
+
align?: string;
|
|
47
|
+
verticalAlign?: string;
|
|
48
|
+
lineHeight?: number;
|
|
49
|
+
letterSpacing?: number;
|
|
50
|
+
backgroundEnabled?: boolean;
|
|
51
|
+
backgroundColor?: string;
|
|
52
|
+
backgroundOpacity?: number;
|
|
53
|
+
backgroundCornerRadius?: number;
|
|
54
|
+
backgroundPadding?: number;
|
|
55
|
+
src?: string;
|
|
56
|
+
cropX?: number;
|
|
57
|
+
cropY?: number;
|
|
58
|
+
cropWidth?: number;
|
|
59
|
+
cropHeight?: number;
|
|
60
|
+
flipX?: boolean;
|
|
61
|
+
flipY?: boolean;
|
|
62
|
+
clipSrc?: string;
|
|
63
|
+
borderSize?: number;
|
|
64
|
+
keepRatio?: boolean;
|
|
65
|
+
}
|
|
66
|
+
interface Page {
|
|
67
|
+
addElement: (element: Element) => void;
|
|
68
|
+
}
|
|
69
|
+
interface Store {
|
|
70
|
+
width: number;
|
|
71
|
+
height: number;
|
|
72
|
+
pages: Page[];
|
|
73
|
+
history: {
|
|
74
|
+
clear: () => void;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export declare const addRestrictedAreaToTriFold: (store: Store, size: [number, number], barcodeSrc: string) => void;
|
|
78
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@openlettermarketing/olc-react-sdk",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.0.2",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "Simplify template builder integration for any product.",
|
|
7
|
+
"main": "build/index.js",
|
|
8
|
+
"types": "build/types/index.d.ts",
|
|
9
|
+
"author": "Open Letter Marketing",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"dev": "vite",
|
|
13
|
+
"build": "webpack && tsc",
|
|
14
|
+
"test": "jest --silent",
|
|
15
|
+
"coverage": "npm run test -- --coverage",
|
|
16
|
+
"prepare": "npm run build",
|
|
17
|
+
"publish": "npm publish --access public"
|
|
18
|
+
},
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git@github.com:Open-Letter-Marketing/olc-react-sdk.git"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"olc",
|
|
28
|
+
"olm",
|
|
29
|
+
"open-letter-connect",
|
|
30
|
+
"open-letter-marketing",
|
|
31
|
+
"openlettermarketing",
|
|
32
|
+
"react",
|
|
33
|
+
"sdk",
|
|
34
|
+
"react-sdk",
|
|
35
|
+
"template",
|
|
36
|
+
"builder",
|
|
37
|
+
"template-builder",
|
|
38
|
+
"olc-integration",
|
|
39
|
+
"olcintegration"
|
|
40
|
+
],
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@fontsource/inter": "^5.0.18",
|
|
43
|
+
"deepmerge": "^4.3.1",
|
|
44
|
+
"mobx-react-lite": "^4.0.7",
|
|
45
|
+
"polotno": "^2.4.5",
|
|
46
|
+
"react": "^18.2.0",
|
|
47
|
+
"react-dom": "^18.2.0",
|
|
48
|
+
"react-redux": "^9.1.2",
|
|
49
|
+
"redux": "^5.0.1",
|
|
50
|
+
"@reduxjs/toolkit": "^1.9.7",
|
|
51
|
+
"react-router-dom": "^6.18.0",
|
|
52
|
+
"react-select": "^5.8.0",
|
|
53
|
+
"react-toastify": "^10.0.5",
|
|
54
|
+
"react-tooltip": "^5.26.4",
|
|
55
|
+
"styled-components": "^6.1.11"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@babel/cli": "^7.23.4",
|
|
59
|
+
"@babel/core": "^7.24.7",
|
|
60
|
+
"@babel/plugin-transform-runtime": "^7.23.7",
|
|
61
|
+
"@babel/plugin-transform-typescript": "^7.24.7",
|
|
62
|
+
"@babel/preset-env": "^7.24.7",
|
|
63
|
+
"@babel/preset-react": "^7.24.7",
|
|
64
|
+
"@babel/preset-typescript": "^7.24.7",
|
|
65
|
+
"@parcel/packager-ts": "2.12.0",
|
|
66
|
+
"@parcel/transformer-sass": "2.12.0",
|
|
67
|
+
"@parcel/transformer-typescript-types": "2.12.0",
|
|
68
|
+
"@testing-library/jest-dom": "^5.16.4",
|
|
69
|
+
"@testing-library/react": "^13.1.1",
|
|
70
|
+
"@tsconfig/node16": "^16.1.1",
|
|
71
|
+
"@types/sortablejs": "1",
|
|
72
|
+
"@types/jest": "^29.5.11",
|
|
73
|
+
"@types/react": "^18.2.66",
|
|
74
|
+
"@types/react-dom": "^18.3.0",
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "^6.17.0",
|
|
76
|
+
"@typescript-eslint/parser": "^6.17.0",
|
|
77
|
+
"@vitejs/plugin-react": "^4.3.0",
|
|
78
|
+
"babel-loader": "^9.1.3",
|
|
79
|
+
"css-loader": "^7.1.2",
|
|
80
|
+
"eslint": "^8.56.0",
|
|
81
|
+
"sass": "^1.77.4",
|
|
82
|
+
"eslint-config-prettier": "~9.1.0",
|
|
83
|
+
"eslint-plugin-jest": "~27.6.1",
|
|
84
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
85
|
+
"file-loader": "^6.2.0",
|
|
86
|
+
"jest": "^29.7.0",
|
|
87
|
+
"parcel": "^2.12.0",
|
|
88
|
+
"prettier": "^3.1.1",
|
|
89
|
+
"sass-loader": "^14.2.1",
|
|
90
|
+
"style-loader": "^4.0.0",
|
|
91
|
+
"svg-url-loader": "^8.0.0",
|
|
92
|
+
"terser-webpack-plugin": "^5.3.10",
|
|
93
|
+
"typescript": "^5.3.3",
|
|
94
|
+
"vite": "^5.2.0",
|
|
95
|
+
"webpack": "^5.92.0",
|
|
96
|
+
"webpack-cli": "^5.1.4",
|
|
97
|
+
"webpack-dev-server": "4.13.3"
|
|
98
|
+
}
|
|
99
|
+
}
|