@openlettermarketing/olc-react-sdk 1.5.8 → 1.5.9

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.
@@ -1,5 +1,5 @@
1
1
  import type { TemplatesSection } from 'polotno/side-panel';
2
2
  import './styles.scss';
3
3
  type SideSection = typeof TemplatesSection;
4
- declare const customFieldSection: SideSection;
5
- export default customFieldSection;
4
+ declare const CustomFieldSection: SideSection;
5
+ export default CustomFieldSection;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { StoreType } from 'polotno/model/store';
3
+ interface UploadPanelProps {
4
+ store: StoreType;
5
+ }
6
+ export declare const UploadPanel: (({ store }: UploadPanelProps) => React.JSX.Element) & {
7
+ displayName: string;
8
+ };
9
+ export default UploadPanel;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  import './styles.scss';
3
3
  declare const TemplatesCard: (props: any) => React.JSX.Element;
4
4
  export default TemplatesCard;
@@ -5,6 +5,7 @@ export declare const GET_ONE_TEMPLATE: string;
5
5
  export declare const TEMPLATE_LOADING: string;
6
6
  export declare const TEMPLATE_PAGINATION_CHANGE: string;
7
7
  export declare const TEMPLATE_SEARCH: string;
8
+ export declare const SET_UPLOADED_IMAGES: string;
8
9
  export declare const CLEAR_ALL_TEMPLATE: string;
9
10
  export declare const CLEAR_TEMPLATE_FIELDS: string;
10
11
  export declare const LOAD_DATA_FROM_LOCAL_STORAGE: string;
@@ -52,6 +52,7 @@ export interface TemplateState {
52
52
  templateType: string;
53
53
  envelopeType: string;
54
54
  templateLoading: boolean | null;
55
+ uploadedImages: any[];
55
56
  }
56
57
  declare const templateReducer: (state: TemplateState | undefined, { type, payload }: {
57
58
  type: any;
@@ -1,12 +1,10 @@
1
- declare const store: import("@reduxjs/toolkit").EnhancedStore<{
1
+ declare const store: import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<{
2
2
  templates: import("./reducers/templateReducer").TemplateState;
3
3
  customFields: import("./reducers/customFieldReducer").CustomFieldState;
4
4
  snackbarReducers: {
5
5
  snackbar: any;
6
6
  };
7
- }, any, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
8
- dispatch: {};
9
- }>, import("redux").StoreEnhancer]>>;
7
+ }, any, any>;
10
8
  export type RootState = ReturnType<typeof store.getState>;
11
9
  export type AppDispatch = typeof store.dispatch;
12
10
  export default store;
@@ -7,3 +7,5 @@ export declare const getIsSandbox: () => boolean;
7
7
  export declare const setIsSandbox: (sandbox: boolean) => void;
8
8
  export declare const removeSThroughOne: (input: string) => string;
9
9
  export declare const hexToRgba: (hex: any, opacity: any) => string;
10
+ export declare const getType: (file: any) => "svg" | "image" | "video";
11
+ export declare const cleanString: (input: string) => string;
@@ -62,6 +62,14 @@ export declare const MESSAGES: {
62
62
  readonly SUBMIT_BUTTON: "OK";
63
63
  readonly CANCEL_BUTTON: "Cancel";
64
64
  };
65
+ readonly CUSTOM_UPLOAD_SECTION: {
66
+ readonly HEADING: "Do you want to upload your own images?";
67
+ readonly ACCEPTED_FORMATS: "Accepted File Formats: JPEG, PNG, SVG";
68
+ readonly MAX_SIZE: "Max File Size Limits: 5MB";
69
+ readonly UPLOAD_BTN_TEXT: "Upload Image";
70
+ readonly TYPE_VALIDATION: "Only image files with extensions jpeg, png, or svg are allowed.";
71
+ readonly SIZE_VALIDATION: "File size must be under 5MB.";
72
+ };
65
73
  readonly DOWNLOAD_PROOF_BUTTON: "Download Proof";
66
74
  readonly CANCEL_BUTTON: "Cancel";
67
75
  readonly SUBMIT_BUTTON: "Save";
@@ -16,5 +16,6 @@ export interface Product {
16
16
  }
17
17
  export declare const drawRestrictedAreaOnPage: (store: any, product: Product, envelopeType: string) => void;
18
18
  export declare const extractFontFamilies: (jsonData: any[]) => string[];
19
+ export declare const removeBracketsFromRPL: (jsonData: any[]) => any;
19
20
  export declare const validateGSV: (pages: any) => boolean;
20
21
  export declare const validateEmoji: (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.5.8",
4
+ "version": "1.5.9",
5
5
  "type": "module",
6
6
  "description": "Simplify template builder integration for any product.",
7
7
  "main": "build/index.js",