@openlettermarketing/olc-react-sdk 2.1.4 → 2.1.5-beta.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.
Files changed (230) hide show
  1. package/.eslintignore +1 -0
  2. package/.eslintrc.cjs +18 -0
  3. package/.eslintrc.yml +47 -0
  4. package/.github/workflows/publish-beta.yml +154 -0
  5. package/.github/workflows/publish-production.yml +143 -0
  6. package/.prettierignore +3 -0
  7. package/.prettierrc.yml +5 -0
  8. package/CHANGELOG.md +4 -0
  9. package/babel.config.json +10 -0
  10. package/build/index.js +82 -82
  11. package/build/index.js.map +1 -1
  12. package/build/types/version.d.ts +1 -1
  13. package/examples/.eslintrc.yml +4 -0
  14. package/index.html +18 -0
  15. package/package.json +1 -1
  16. package/public/vite.svg +1 -0
  17. package/src/App.tsx +209 -0
  18. package/src/assets/Fonts/Lexi-Regular.ttf +0 -0
  19. package/src/assets/images/create-template/prebuilt.svg +13 -0
  20. package/src/assets/images/create-template/scratch.svg +4 -0
  21. package/src/assets/images/input/cancel.tsx +20 -0
  22. package/src/assets/images/input/search.tsx +20 -0
  23. package/src/assets/images/input/select-cancel.tsx +17 -0
  24. package/src/assets/images/modal-icons/add.tsx +36 -0
  25. package/src/assets/images/modal-icons/cancel-file.tsx +12 -0
  26. package/src/assets/images/modal-icons/cancel-input.tsx +13 -0
  27. package/src/assets/images/modal-icons/cancel.tsx +35 -0
  28. package/src/assets/images/modal-icons/close-new.svg +3 -0
  29. package/src/assets/images/modal-icons/confirm-close-icon.tsx +14 -0
  30. package/src/assets/images/modal-icons/confirm-new.tsx +22 -0
  31. package/src/assets/images/modal-icons/confirm.svg +12 -0
  32. package/src/assets/images/modal-icons/cross.tsx +23 -0
  33. package/src/assets/images/modal-icons/del.tsx +19 -0
  34. package/src/assets/images/modal-icons/design-icon.tsx +22 -0
  35. package/src/assets/images/modal-icons/doc.tsx +43 -0
  36. package/src/assets/images/modal-icons/docx.tsx +43 -0
  37. package/src/assets/images/modal-icons/envelope-icon.tsx +26 -0
  38. package/src/assets/images/modal-icons/info.tsx +19 -0
  39. package/src/assets/images/modal-icons/jpeg.tsx +43 -0
  40. package/src/assets/images/modal-icons/jpg.tsx +43 -0
  41. package/src/assets/images/modal-icons/modal-cros.svg +4 -0
  42. package/src/assets/images/modal-icons/modal-cross.tsx +37 -0
  43. package/src/assets/images/modal-icons/new-cancel.tsx +11 -0
  44. package/src/assets/images/modal-icons/order-download.tsx +42 -0
  45. package/src/assets/images/modal-icons/pdf.tsx +51 -0
  46. package/src/assets/images/modal-icons/png.tsx +43 -0
  47. package/src/assets/images/modal-icons/save.tsx +23 -0
  48. package/src/assets/images/modal-icons/template-copy.tsx +25 -0
  49. package/src/assets/images/modal-icons/tool-cancel.tsx +25 -0
  50. package/src/assets/images/products/bi-new.svg +23 -0
  51. package/src/assets/images/products/left-arrow.svg +17 -0
  52. package/src/assets/images/products/personal-new.tsx +31 -0
  53. package/src/assets/images/products/postcard-new.tsx +27 -0
  54. package/src/assets/images/products/professional-new.tsx +24 -0
  55. package/src/assets/images/products/real-new.tsx +30 -0
  56. package/src/assets/images/products/right-arrow.svg +17 -0
  57. package/src/assets/images/products/snap-new.svg +31 -0
  58. package/src/assets/images/templates/actions.svg +3 -0
  59. package/src/assets/images/templates/address-block-icon.tsx +62 -0
  60. package/src/assets/images/templates/archive.svg +3 -0
  61. package/src/assets/images/templates/arrow-down.tsx +27 -0
  62. package/src/assets/images/templates/back-arrow.tsx +19 -0
  63. package/src/assets/images/templates/bi-fold-self-mailers.tsx +28 -0
  64. package/src/assets/images/templates/check.svg +3 -0
  65. package/src/assets/images/templates/code.svg +10 -0
  66. package/src/assets/images/templates/content-copy-icon.tsx +24 -0
  67. package/src/assets/images/templates/custom-add-on-icon.tsx +18 -0
  68. package/src/assets/images/templates/custom-qr-section-icon.tsx +9 -0
  69. package/src/assets/images/templates/custom-template.tsx +23 -0
  70. package/src/assets/images/templates/designer.tsx +43 -0
  71. package/src/assets/images/templates/dot.tsx +22 -0
  72. package/src/assets/images/templates/download-v2.svg +4 -0
  73. package/src/assets/images/templates/download.svg +4 -0
  74. package/src/assets/images/templates/dummy-template.tsx +76 -0
  75. package/src/assets/images/templates/dynamic-field.tsx +119 -0
  76. package/src/assets/images/templates/edit-pencil-icon.tsx +21 -0
  77. package/src/assets/images/templates/edit.svg +3 -0
  78. package/src/assets/images/templates/epo-icon.tsx +16 -0
  79. package/src/assets/images/templates/field.tsx +29 -0
  80. package/src/assets/images/templates/gsv-icon.tsx +31 -0
  81. package/src/assets/images/templates/info-icon.tsx +37 -0
  82. package/src/assets/images/templates/left-arrow.svg +17 -0
  83. package/src/assets/images/templates/pencil.svg +3 -0
  84. package/src/assets/images/templates/personal-letter.tsx +53 -0
  85. package/src/assets/images/templates/postcard.tsx +32 -0
  86. package/src/assets/images/templates/professional-letter.tsx +53 -0
  87. package/src/assets/images/templates/qr-code.tsx +13 -0
  88. package/src/assets/images/templates/real-penned-letters.tsx +57 -0
  89. package/src/assets/images/templates/right-arrow.svg +17 -0
  90. package/src/assets/images/templates/size-image-lg.tsx +20 -0
  91. package/src/assets/images/templates/size-image-mid.tsx +20 -0
  92. package/src/assets/images/templates/size-image-xl.tsx +20 -0
  93. package/src/assets/images/templates/size-image.tsx +20 -0
  94. package/src/assets/images/templates/snap-pack.tsx +67 -0
  95. package/src/assets/images/templates/template-default-design.tsx +21 -0
  96. package/src/assets/images/templates/trash-upload.svg +3 -0
  97. package/src/assets/images/templates/trash.svg +3 -0
  98. package/src/assets/images/templates/tri-fold-self-mailers.tsx +93 -0
  99. package/src/assets/images/templates/upload-image.svg +10 -0
  100. package/src/assets/images/templates/x.svg +3 -0
  101. package/src/assets/images/thumbnails/one.svg +9 -0
  102. package/src/assets/images/tooltip/tool-arrow.tsx +25 -0
  103. package/src/components/CreateTemplate/V2/index.tsx +525 -0
  104. package/src/components/CreateTemplate/V2/styles.scss +372 -0
  105. package/src/components/CreateTemplate/index.tsx +508 -0
  106. package/src/components/CreateTemplate/styles.scss +404 -0
  107. package/src/components/GenericUIBlocks/Button/index.tsx +54 -0
  108. package/src/components/GenericUIBlocks/Button/styles.scss +43 -0
  109. package/src/components/GenericUIBlocks/CircularProgress/index.tsx +18 -0
  110. package/src/components/GenericUIBlocks/CircularProgress/styles.scss +93 -0
  111. package/src/components/GenericUIBlocks/CustomTooltip/index.tsx +88 -0
  112. package/src/components/GenericUIBlocks/CustomTooltip/styles.scss +19 -0
  113. package/src/components/GenericUIBlocks/Dialog/V2/index.tsx +227 -0
  114. package/src/components/GenericUIBlocks/Dialog/V2/styles.scss +289 -0
  115. package/src/components/GenericUIBlocks/Dialog/index.tsx +185 -0
  116. package/src/components/GenericUIBlocks/Dialog/styles.scss +227 -0
  117. package/src/components/GenericUIBlocks/Divider/index.tsx +12 -0
  118. package/src/components/GenericUIBlocks/Divider/styles.scss +7 -0
  119. package/src/components/GenericUIBlocks/GeneralSelect/index.tsx +114 -0
  120. package/src/components/GenericUIBlocks/GeneralSelect/styles.scss +406 -0
  121. package/src/components/GenericUIBlocks/GeneralTooltip/index.tsx +25 -0
  122. package/src/components/GenericUIBlocks/GeneralTooltip/styles.scss +20 -0
  123. package/src/components/GenericUIBlocks/GenericSnackbar/Toast/index.tsx +91 -0
  124. package/src/components/GenericUIBlocks/GenericSnackbar/Toast/styles.scss +92 -0
  125. package/src/components/GenericUIBlocks/Grid/index.tsx +82 -0
  126. package/src/components/GenericUIBlocks/Input/index.tsx +269 -0
  127. package/src/components/GenericUIBlocks/Input/styles.scss +332 -0
  128. package/src/components/GenericUIBlocks/Tabs/index.tsx +71 -0
  129. package/src/components/GenericUIBlocks/Tabs/styles.scss +42 -0
  130. package/src/components/GenericUIBlocks/Typography/index.tsx +18 -0
  131. package/src/components/GenericUIBlocks/Typography/styles.scss +27 -0
  132. package/src/components/SidePanel/CustomAddOns/index.tsx +342 -0
  133. package/src/components/SidePanel/CustomAddOns/styles.scss +86 -0
  134. package/src/components/SidePanel/CustomBlockColors/index.tsx +211 -0
  135. package/src/components/SidePanel/CustomBlockColors/styles.scss +80 -0
  136. package/src/components/SidePanel/CustomFields/customFieldSection.tsx +547 -0
  137. package/src/components/SidePanel/CustomFields/styles.scss +64 -0
  138. package/src/components/SidePanel/CustomQRCode/V2/QRCodeModal/index.tsx +172 -0
  139. package/src/components/SidePanel/CustomQRCode/V2/QRCodeModal/styles.scss +46 -0
  140. package/src/components/SidePanel/CustomQRCode/index.tsx +1070 -0
  141. package/src/components/SidePanel/CustomQRCode/styles.scss +149 -0
  142. package/src/components/SidePanel/CustomUploads/V2/index.tsx +542 -0
  143. package/src/components/SidePanel/CustomUploads/V2/styles.scss +267 -0
  144. package/src/components/SidePanel/CustomUploads/index.tsx +301 -0
  145. package/src/components/SidePanel/Templates/ModalGallery/HireDesigner/index.tsx +424 -0
  146. package/src/components/SidePanel/Templates/ModalGallery/HireDesigner/styles.scss +180 -0
  147. package/src/components/SidePanel/Templates/ModalGallery/V2/index.tsx +235 -0
  148. package/src/components/SidePanel/Templates/ModalGallery/V2/styles.scss +244 -0
  149. package/src/components/SidePanel/Templates/ModalGallery/index.tsx +231 -0
  150. package/src/components/SidePanel/Templates/SideBarGallery/index.tsx +233 -0
  151. package/src/components/SidePanel/Templates/SideBarGallery/styles.scss +152 -0
  152. package/src/components/SidePanel/Templates/TemplatesCard/V2/index.tsx +149 -0
  153. package/src/components/SidePanel/Templates/TemplatesCard/V2/styles.scss +156 -0
  154. package/src/components/SidePanel/Templates/TemplatesCard/index.tsx +160 -0
  155. package/src/components/SidePanel/Templates/TemplatesCard/styles.scss +98 -0
  156. package/src/components/SidePanel/Templates/customTemplateSection.tsx +793 -0
  157. package/src/components/SidePanel/Templates/styles.scss +244 -0
  158. package/src/components/SidePanel/index.tsx +160 -0
  159. package/src/components/TemplateBuilder/index.tsx +585 -0
  160. package/src/components/TemplateBuilder/styles.scss +100 -0
  161. package/src/components/TemplateTypes/index.tsx +96 -0
  162. package/src/components/TemplateTypes/styles.scss +91 -0
  163. package/src/components/TopNavigation/ConfirmNavigateDialog/index.tsx +81 -0
  164. package/src/components/TopNavigation/ConfirmNavigateDialog/styles.scss +123 -0
  165. package/src/components/TopNavigation/DuplicateTemplateModal.tsx +103 -0
  166. package/src/components/TopNavigation/EditTemplateNameModel/index.tsx +71 -0
  167. package/src/components/TopNavigation/EditTemplateNameModel/styles.scss +88 -0
  168. package/src/components/TopNavigation/SaveTemplateModel/index.tsx +201 -0
  169. package/src/components/TopNavigation/SaveTemplateModel/styles.scss +128 -0
  170. package/src/components/TopNavigation/index.tsx +938 -0
  171. package/src/components/TopNavigation/styles.scss +303 -0
  172. package/src/importMeta.d.ts +31 -0
  173. package/src/index.scss +131 -0
  174. package/src/index.tsx +238 -0
  175. package/src/libs/test.ts +7 -0
  176. package/src/redux/actions/action-types.ts +52 -0
  177. package/src/redux/actions/customQRCodeActions.ts +54 -0
  178. package/src/redux/actions/snackbarActions.ts +16 -0
  179. package/src/redux/actions/templateActions.ts +236 -0
  180. package/src/redux/reducers/customFieldReducer.ts +99 -0
  181. package/src/redux/reducers/customQRCodeReducer.ts +58 -0
  182. package/src/redux/reducers/index.ts +15 -0
  183. package/src/redux/reducers/snackbarReducer.ts +40 -0
  184. package/src/redux/reducers/templateReducer.ts +485 -0
  185. package/src/redux/store.ts +18 -0
  186. package/src/styles/colors.scss +61 -0
  187. package/src/test/mocks.js +89 -0
  188. package/src/test/setupJest.js +1 -0
  189. package/src/utils/api.ts +36 -0
  190. package/src/utils/constants.ts +182 -0
  191. package/src/utils/customStyles.ts +45 -0
  192. package/src/utils/fetchWrapper.ts +73 -0
  193. package/src/utils/fonts.json +1597 -0
  194. package/src/utils/helper.ts +205 -0
  195. package/src/utils/local-storage.ts +15 -0
  196. package/src/utils/message.ts +162 -0
  197. package/src/utils/products.ts +186 -0
  198. package/src/utils/template-builder.ts +328 -0
  199. package/src/utils/templateIdentifierArea/biFold.ts +107 -0
  200. package/src/utils/templateIdentifierArea/index.ts +35 -0
  201. package/src/utils/templateIdentifierArea/personal.ts +107 -0
  202. package/src/utils/templateIdentifierArea/postCards.ts +163 -0
  203. package/src/utils/templateIdentifierArea/professional.ts +125 -0
  204. package/src/utils/templateIdentifierArea/snapPack.ts +107 -0
  205. package/src/utils/templateIdentifierArea/triFold.ts +107 -0
  206. package/src/utils/templateRestrictedArea/biFold.ts +329 -0
  207. package/src/utils/templateRestrictedArea/nonWindowProfessional.ts +90 -0
  208. package/src/utils/templateRestrictedArea/personal.ts +90 -0
  209. package/src/utils/templateRestrictedArea/postCard.ts +334 -0
  210. package/src/utils/templateRestrictedArea/postCardJumbo.tsx +408 -0
  211. package/src/utils/templateRestrictedArea/professional.ts +318 -0
  212. package/src/utils/templateRestrictedArea/realPenned.ts +233 -0
  213. package/src/utils/templateRestrictedArea/snapPack.ts +1009 -0
  214. package/src/utils/templateRestrictedArea/triFold.ts +330 -0
  215. package/src/utils/templateSafetyBorders/biFold.ts +91 -0
  216. package/src/utils/templateSafetyBorders/index.ts +43 -0
  217. package/src/utils/templateSafetyBorders/personal.ts +41 -0
  218. package/src/utils/templateSafetyBorders/postCards.ts +259 -0
  219. package/src/utils/templateSafetyBorders/professional.ts +78 -0
  220. package/src/utils/templateSafetyBorders/snapPack.ts +165 -0
  221. package/src/utils/templateSafetyBorders/triFold.ts +114 -0
  222. package/src/utils/templateSafetyBorders/types.d.ts +68 -0
  223. package/src/utils/types.ts +12 -0
  224. package/src/v2Theme.scss +142 -0
  225. package/tsconfig.json +29 -0
  226. package/tsconfig.node.json +12 -0
  227. package/update-version.js +23 -0
  228. package/version.js +1 -0
  229. package/vite.config.ts +8 -0
  230. package/webpack.config.js +80 -0
@@ -0,0 +1,205 @@
1
+ export let publicApiKey: string = '';
2
+ export let isSandbox: boolean = false;
3
+ export let currentEnv: any = false;
4
+
5
+ export const copyToClipboard = (text: string): void => {
6
+ navigator.clipboard
7
+ .writeText(text)
8
+ .then(() => { })
9
+ .catch((err) => {
10
+ console.error('Failed to copy text: ', err);
11
+ });
12
+ };
13
+
14
+ export const getPublicApiKey = () => {
15
+ return publicApiKey;
16
+ };
17
+
18
+ export const setPublicApiKey = (key: string) => {
19
+ publicApiKey = key;
20
+ };
21
+
22
+ export const getIsSandbox = () => {
23
+ return isSandbox;
24
+ };
25
+
26
+ export const getEnv = () => {
27
+ return currentEnv;
28
+ };
29
+
30
+ export const setIsSandbox = (sandbox: boolean) => {
31
+ isSandbox = sandbox;
32
+ };
33
+
34
+ export const setEnv = (env: string) => {
35
+ currentEnv = env;
36
+ };
37
+
38
+ export const removeSThroughOne = (input: string) => {
39
+ // Check if the string contains exactly one '0' or one '1'
40
+ const containsExactlyOneOne = /^.*\b1\b(?!\d).*$/g.test(input) && !input.match(/1\d/);
41
+
42
+ if (containsExactlyOneOne) {
43
+ return input.endsWith('s') ? input.slice(0, -1) : input;
44
+ }
45
+
46
+ return input;
47
+ }
48
+
49
+ export const validURL = (str: string) => {
50
+ var pattern = new RegExp('^(https?:\\/\\/)?'+ // protocol
51
+ '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|'+ // domain name
52
+ '((\\d{1,3}\\.){3}\\d{1,3}))'+ // OR ip (v4) address
53
+ '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*'+ // port and path
54
+ '(\\?[;&a-z\\d%_.~+=-]*)?'+ // query string
55
+ '(\\#[-a-z\\d_]*)?$','i'); // fragment locator
56
+ return !!pattern.test(str);
57
+ }
58
+
59
+
60
+ export const hexToRgba = (hex: any, opacity: any) => {
61
+ // Remove the hash at the start if it's there
62
+ hex = hex.replace(/^#/, '');
63
+
64
+ // Parse r, g, b values
65
+ let r = parseInt(hex.substring(0, 2), 16);
66
+ let g = parseInt(hex.substring(2, 4), 16);
67
+ let b = parseInt(hex.substring(4, 6), 16);
68
+
69
+ // Return the RGBA string
70
+ return `rgba(${r}, ${g}, ${b}, ${opacity})`;
71
+ }
72
+
73
+ export const getType = (file: any) => {
74
+ const { type } = file;
75
+ if (type.indexOf('svg') >= 0) {
76
+ return 'svg';
77
+ }
78
+ if (type.indexOf('image') >= 0) {
79
+ return 'image';
80
+ }
81
+ if (type.indexOf('video') >= 0) {
82
+ return 'video';
83
+ }
84
+ return 'image';
85
+ }
86
+
87
+ export const cleanString = (input: string): string => {
88
+ var output = "";
89
+ for (var i = 0; i < input.length; i++) {
90
+ if (input.charCodeAt(i) <= 127) {
91
+ output += input.charAt(i);
92
+ }
93
+ }
94
+ return output;
95
+ }
96
+
97
+ export const createBorder = (
98
+ id: string,
99
+ x: number,
100
+ y: number,
101
+ width: number,
102
+ height: number,
103
+ rotation: number,
104
+ color: string = "rgba(48,155,95,1)",
105
+ ) => ({
106
+ id,
107
+ type: "line",
108
+ opacity: 1,
109
+ visible: true,
110
+ selectable: false,
111
+ removable: false,
112
+ alwaysOnTop: true,
113
+ showInExport: false,
114
+ x,
115
+ y,
116
+ width,
117
+ height,
118
+ rotation,
119
+ color,
120
+ dash: [4, 1],
121
+ draggable: false,
122
+ resizable: false,
123
+ });
124
+
125
+
126
+ export const createSafetyTextElement = (
127
+ id: string,
128
+ x: number,
129
+ y: number,
130
+ width: number,
131
+ text: string,
132
+ rotation: number = 0,
133
+ fontSize: number = 9,
134
+ ) => {
135
+ return {
136
+ id,
137
+ type: "text",
138
+ name: "",
139
+ opacity: 1,
140
+ visible: true,
141
+ selectable: false,
142
+ removable: false,
143
+ alwaysOnTop: true,
144
+ showInExport: false,
145
+ x,
146
+ y,
147
+ width,
148
+ height: 12,
149
+ rotation,
150
+ animations: [],
151
+ blurEnabled: false,
152
+ blurRadius: 10,
153
+ brightnessEnabled: false,
154
+ brightness: 0,
155
+ sepiaEnabled: false,
156
+ grayscaleEnabled: false,
157
+ shadowEnabled: false,
158
+ shadowBlur: 5,
159
+ shadowOffsetX: 0,
160
+ shadowOffsetY: 0,
161
+ shadowColor: "black",
162
+ shadowOpacity: 1,
163
+ draggable: false,
164
+ resizable: false,
165
+ contentEditable: false,
166
+ styleEditable: false,
167
+ text,
168
+ fontSize,
169
+ fontFamily: "Noto Sans JP",
170
+ fontStyle: "italic",
171
+ fontWeight: "normal",
172
+ fill: "rgba(74,74,74,1)",
173
+ align: "center",
174
+ verticalAlign: "top",
175
+ strokeWidth: 0,
176
+ stroke: "black",
177
+ lineHeight: 1.2,
178
+ letterSpacing: 0,
179
+ backgroundEnabled: false,
180
+ backgroundColor: "#7ED321",
181
+ backgroundOpacity: 1,
182
+ backgroundCornerRadius: 0.5,
183
+ backgroundPadding: 0.5,
184
+ };
185
+ }
186
+
187
+ export const dataURLtoBlob = (dataURL: string, type: string): Blob => {
188
+ // Extract the Base64 data by removing the prefix
189
+ const base64Index = dataURL.indexOf(";base64,") + 8;
190
+ const base64String = dataURL.substring(base64Index);
191
+
192
+ try {
193
+ const byteString = atob(base64String);
194
+ const arrayBuffer = new Uint8Array(byteString.length);
195
+
196
+ for (let i = 0; i < byteString.length; i++) {
197
+ arrayBuffer[i] = byteString.charCodeAt(i);
198
+ }
199
+
200
+ return new Blob([arrayBuffer], { type });
201
+ } catch (error) {
202
+ console.error("Failed to decode Base64 string:", error);
203
+ throw new Error("Invalid Base64 string");
204
+ }
205
+ };
@@ -0,0 +1,15 @@
1
+ export const setItem = (key: string, value: string): void => {
2
+ localStorage.setItem(key, value);
3
+ };
4
+
5
+ export const getItem = (key: string): string | null => {
6
+ return localStorage.getItem(key);
7
+ };
8
+
9
+ export const removeItem = (key: string): void => {
10
+ localStorage.removeItem(key);
11
+ };
12
+
13
+ export const clearStorage = (): void => {
14
+ localStorage.clear();
15
+ };
@@ -0,0 +1,162 @@
1
+ // Default messages and Typography
2
+
3
+ export const MESSAGES = {
4
+ TEMPLATE_MESSAGE_ON_SMALL_SCREEN: 'Template Builder is available on tablet and web view only.',
5
+ GENERAL_ERROR: "Internal Server Error",
6
+ DOWNLOAD_ERROR: 'Something went wrong. Please try again.',
7
+ CLONE_ERROR: 'We are currently unable to clone the template. Please try again later.',
8
+ TEMPLATE: {
9
+ SEARCH_PLACE_HOLDER: "Search by template name or template ID",
10
+ NAME_REQUIRED: "Template Name is required",
11
+ TYPE_REQUIRED: "Template Type is required",
12
+ DESIGN_NEW: "Design Your Own",
13
+ NO_MY_TEMPLATES: "No Templates to show",
14
+ LOADING_TEMPLATE: "Loading Templates...",
15
+ NO_TEAM_TEMPLATES: "No Team Templates to show",
16
+ NO_OLC_TEMPLATES: "No OLC Templates to show",
17
+ PRODUCT_TYPE_REQUIRED: "Product Type is required",
18
+ ENVELOPE_TYPE_REQUIRED: "Envelope Type is required",
19
+ POSTCARD_SIZE_REQUIRED: "Postcard Size is required",
20
+ NAME_LESS_50: "Template Name should be less than or equal to 50 characters",
21
+ GSV_RESTRICT_ONE_PER_PAGE: 'Only one GSV image is allowed per page.',
22
+ EMOJI_NOT_ALLOWED: 'Emojis are not allowed in the template. Please remove them before saving.',
23
+ EMPTY_QR_NOT_ALLOWED: 'Please add a URL to your QR code in order to save the template.',
24
+ SIZE_LIMIT_EXCEED: 'Template size should be less than 7MB. Please remove custom fonts or unnecessary assets.',
25
+ CREATE: {
26
+ TITLE: 'Create New Template',
27
+ TEMPLATE_LABEL: 'Template Name*',
28
+ PRODUCT_LABEL: 'Product Type*',
29
+ LEARN_TEXT: 'Learn More',
30
+ CANCEL_BUTTON: "Cancel",
31
+ SUBMIT_BUTTON: "Next",
32
+ },
33
+ LIMIT_MODAL: {
34
+ TITLE: "Limit Reached",
35
+ HEADING: "You've reached your template limit",
36
+ SUB_HEADING: "Please Upgrade your subscription to add more templates",
37
+ CANCEL_BUTTON: "Cancel",
38
+ SUBMIT_BUTTON: "View Plans",
39
+ },
40
+ DELETE: {
41
+ TITLE: "Delete Template",
42
+ HEADING: "Are you sure you want to delete this Template?",
43
+ PARAGRAPH:
44
+ "This template will be deleted from your Templates list but will still be included in associated orders.",
45
+ },
46
+ SAVE: {
47
+ TITLE: "Confirm Save Template",
48
+ HEADING: "Are you sure you want to save this template?",
49
+ PARAGRAPH:
50
+ "The updates provided will be used right away for any orders referencing this template.",
51
+ CANCEL_BUTTON: "Cancel",
52
+ SUBMIT_BUTTON: "Save"
53
+ },
54
+ CANCEL: {
55
+ TITLE: "Confirm Cancel Template",
56
+ HEADING: "Are you sure you want to cancel this Template?",
57
+ PARAGRAPH: "You will lose your changes after canceling.",
58
+ BACK_BUTTON: "Go Back",
59
+ CANCEL_BUTTON: "Cancel Template",
60
+ },
61
+ DESIGN_YOUR_OWN: {
62
+ TITLE: "Confirm",
63
+ HEADING: "Are you sure you want to discard these changes?",
64
+ PARAGRAPH:
65
+ "You will lose your changes. Please save your changes or click ok to proceed.",
66
+ },
67
+ SELECT_TEMPLATE: {
68
+ TITLE: "Confirm",
69
+ HEADING:
70
+ "Are you sure you want to change current template with this one?",
71
+ PARAGRAPH:
72
+ "You will lose your changes. Please save your changes or click ok to proceed.",
73
+ SUBMIT_BUTTON: "OK",
74
+ CANCEL_BUTTON: "Cancel",
75
+ },
76
+ CUSTOM_UPLOAD_SECTION: {
77
+ HEADING: 'Do you want to upload your own images?',
78
+ ACCEPTED_FORMATS: 'Accepted File Formats: JPEG, PNG, SVG',
79
+ MAX_SIZE: 'Max File Size Limits: 5MB',
80
+ NOTE: 'Please upload a high-resolution image to ensure better print quality for your mailer.',
81
+ UPLOAD_BTN_TEXT: 'Upload Image',
82
+ TYPE_VALIDATION: 'Only image files with extensions jpeg, png, or svg are allowed.',
83
+ SIZE_VALIDATION: 'File size must be under 5MB.',
84
+ },
85
+ QR_SECTION: {
86
+ EMPTY_QR: 'Please add a URL to your QR code.',
87
+ EMPTY_CAMPAIGN: 'Please add a Campaign Name to your QR code.',
88
+ QR_PLACEHOLDER: 'Enter QR URL',
89
+ INVALID_URL: 'Please add a valid URL to your QR code.',
90
+ FAILED_QR: 'Failed to create QR code',
91
+ SUBMIT_BUTTON: "Add new QR code",
92
+ UPDATE_BUTTON: "Update QR code",
93
+ QR_NOTE: 'Add a QR code to track engagement. Select a saved code or create a new one for this template.'
94
+ },
95
+ HIRE_DESIGNER: {
96
+ TITLE: 'Custom Design Form',
97
+ UPLOAD_HEADING: 'Upload Design Files',
98
+ UPLOADED_TEXT: 'Uploaded',
99
+ FILE_VALLIDATION: 'One or more files have unsupported formats. Please upload only .png, .jpg, .jpeg, .pdf, .doc, or .docx files.',
100
+ FILE_NUMBER: 'You can only upload up to 5 files.',
101
+ TITLE_REQUIRED: 'Template Name is required',
102
+ URL_REQUIRED: 'Video URL is required',
103
+ URL_VAIDATION: 'Video URL is not valid',
104
+ COMMENT_REQUIRED: 'Comments are required',
105
+ EMAIL_REQUIRED: 'Email is required',
106
+ EMAIL_VALIDATION: 'Email is not valid',
107
+ SUBMIT_BUTTON: "Next",
108
+ },
109
+ DUPLICATE_MODAL: {
110
+ TITLE: 'Clone Template',
111
+ NAME_PLACEHOLDER: 'Enter new template name',
112
+ CANCEL_BUTTON: 'Cancel',
113
+ SUBMIT_BUTTON: "Clone",
114
+ SUB_HEADING: 'Enter a New Name for Your Template',
115
+ DESCRIPTION: 'Create a clone of an existing template. Please provide a new name for the template to proceed.',
116
+ NOTE: " Note: Only saved changes will appear in the cloned template."
117
+ },
118
+ CUSTOM_ADD_ONS: {
119
+ TITLE: `Optional Add-On's`,
120
+ NO_RESULT: 'Add-ons are unavailable because the property address is excluded. Please update your settings to enable these features.',
121
+ DESCRIPTION: `Optional add-ons are additional services that user can choose to include with their template, enhancing their overall experience.`,
122
+ GSV: {
123
+ TITLE: 'Street View Property Image',
124
+ DESCRIPTION: '+$0.02 per mail piece',
125
+ CUSTOM_PRICE: ' per mail piece',
126
+ },
127
+ PROPERTY_OFFER : {
128
+ TITLE: 'Add an Offer',
129
+ DESCRIPTION: '(generated using Property Info)',
130
+ PRICE: '+$0.03 per mail piece',
131
+ CUSTOM_PRICE: ' per mail piece',
132
+ CUSTOM: {
133
+ TITLE: 'Add an Offer (+$0.03 per mail piece)',
134
+ DESCRIPTION: 'Unsure of your offer %?',
135
+ PRICE: '+$0.03 per mail piece',
136
+ CLICK: 'Click here',
137
+ CSV_IMPORT: 'to import a CSV to determine the best offer % for you!',
138
+ CUSTOM_PRICE: 'Enter Offer Percentage*'
139
+ }
140
+ }
141
+ },
142
+ DOWNLOAD_PROOF_BUTTON: "Download Mailer Proof",
143
+ DOWNLOAD_ENVELOPE_BUTTON: "Download Envelope Proof",
144
+ CANCEL_BUTTON: "Cancel",
145
+ SUBMIT_BUTTON: "Save"
146
+ },
147
+ QR_CODE_MODAL: {
148
+ CREATE_TITLE: "Create New QR Code",
149
+ UPDATE_TITLE: "Update QR Code",
150
+ INPUT: {
151
+ LABEL: "Campaign Name",
152
+ PLACEHOLDER: "Enter Campaign Name",
153
+ ERROR: {
154
+ REQUIRED: "QR Code URL is required",
155
+ INVALID: "QR Code URL is not valid",
156
+ }
157
+ }
158
+ },
159
+ SNACKBAR: {
160
+ HEADING: "Notifications",
161
+ },
162
+ } as const;
@@ -0,0 +1,186 @@
1
+ interface Size {
2
+ id: string;
3
+ size: string;
4
+ title?: string;
5
+ label?: string;
6
+ }
7
+
8
+ interface Product {
9
+ id: string;
10
+ title: string;
11
+ productType: string;
12
+ size: Size[];
13
+ finish?: string;
14
+ label?: string;
15
+ envelopeOptions?: string;
16
+ hasEnvelope?: boolean;
17
+ paper?: string;
18
+ envelope?: any;
19
+ nonEnvelope?: any;
20
+ ink?: string;
21
+ windowed?: boolean; // optional property
22
+ }
23
+
24
+
25
+ export const Products: Product[] = [
26
+ {
27
+ id: "9",
28
+ title: "Bi-Fold Self-Mailers",
29
+ productType: "Bi-Fold Self-Mailers",
30
+ hasEnvelope: false,
31
+ paper: '80# text',
32
+ finish: 'Glass Coated',
33
+ size: [
34
+ {
35
+ id: "9",
36
+ size: "6x18"
37
+ }
38
+ ],
39
+ },
40
+ {
41
+ id: "5",
42
+ title: "Personal Letters",
43
+ productType: "Personal Letters",
44
+ hasEnvelope: true,
45
+ paper: '60# Statement',
46
+ finish: 'Uncoated',
47
+ label: "5.5x8.5",
48
+ envelopeOptions: '4 Options',
49
+ envelope: 'A6 White / A6 Grey Herringbone',
50
+ ink: 'Full color or black & white',
51
+ size: [
52
+ {
53
+ id: "5",
54
+ size: "8.5x5.5",
55
+ label: "5.5x8.5"
56
+ }
57
+ ]
58
+ },
59
+ {
60
+ id: "13",
61
+ title: "Postcards",
62
+ productType: "Postcards",
63
+ hasEnvelope: false,
64
+ paper: '100#-120# Cover',
65
+ finish:'Glossy Front/Uncoated Back',
66
+ size: [
67
+ {
68
+ id: "13",
69
+ size: "4x6",
70
+ label: "4x6"
71
+ },
72
+ {
73
+ id: "14",
74
+ size: "6x9",
75
+ label: "6x9"
76
+ },
77
+ {
78
+ id: "15",
79
+ size: "6x11",
80
+ label: "6x11"
81
+ },
82
+ {
83
+ id: "21",
84
+ size: "12x9",
85
+ label: "9x12"
86
+ }
87
+ ]
88
+ },
89
+ {
90
+ id: "16",
91
+ title: "Real Penned Letter",
92
+ productType: "Real Penned Letter",
93
+ hasEnvelope: true,
94
+ paper: '60# Statement',
95
+ finish: 'Uncoated',
96
+ envelopeOptions: '5 Options',
97
+ envelope: 'A6 Lavender / A6 Navy Blue',
98
+ ink: 'Blue or black ink options',
99
+ size: [
100
+ {
101
+ id: "16",
102
+ size: "8.5x5.5",
103
+ title: "Personal Letter",
104
+ label: "5.5x8.5",
105
+ },
106
+ {
107
+ id: "38",
108
+ size: "11x8.5",
109
+ title: "Professional Letter",
110
+ label: "8.5x11"
111
+ }
112
+ ]
113
+ },
114
+ {
115
+ id: "11",
116
+ title: "Tri-Fold Self-Mailers",
117
+ productType: "Tri-Fold Self-Mailers",
118
+ hasEnvelope: false,
119
+ paper: '80# text',
120
+ finish: 'Glass Coated',
121
+ size: [
122
+ {
123
+ id: "11",
124
+ size: "12x9",
125
+ label: "8.5x11"
126
+ }
127
+ ]
128
+ },
129
+ {
130
+ id: "2",
131
+ title: "Professional Letters - Windowed Envelope",
132
+ productType: "Professional Letters",
133
+ hasEnvelope: true,
134
+ paper: '60# Statement',
135
+ envelope: '#10 Double-Window',
136
+ nonEnvelope: '#10 Grey',
137
+ envelopeOptions: '1 Option',
138
+ finish: 'Uncoated',
139
+ label: "8.5x11",
140
+ ink: 'Full color or black & white',
141
+ size: [
142
+ {
143
+ id: "2",
144
+ size: "11x8.5",
145
+ label: "8.5x11",
146
+ }
147
+ ],
148
+ windowed: true
149
+ },
150
+ {
151
+ id: "4",
152
+ title: "Professional Letters - Non-windowed Envelope",
153
+ productType: "Professional Letters",
154
+ hasEnvelope: true,
155
+ paper: '60# Statement',
156
+ envelopeOptions: '5 Options',
157
+ finish: 'Uncoated',
158
+ label: "8.5x11",
159
+ envelope: '#10 Grey',
160
+ ink: '',
161
+ size: [
162
+ {
163
+ id: "4",
164
+ size: "11x8.5",
165
+ label: "8.5x11",
166
+ }
167
+ ],
168
+ windowed: false
169
+ },
170
+ {
171
+ id: "18",
172
+ title: "Snap Pack Mailers",
173
+ productType: "Snap Pack Mailers",
174
+ hasEnvelope: false,
175
+ paper: '28# bond',
176
+ finish: 'Uncoated',
177
+ label: "8.5x11",
178
+ size: [
179
+ {
180
+ id: "18",
181
+ size: "11x8.5",
182
+ label: "8.5x11"
183
+ }
184
+ ]
185
+ }
186
+ ];