@openlettermarketing/olc-react-sdk 0.0.18 → 0.0.20

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 (138) hide show
  1. package/build/index.js +3 -3
  2. package/build/index.js.map +1 -1
  3. package/build/types/App.d.ts +1 -0
  4. package/build/types/components/TemplateBuilder/index.d.ts +1 -0
  5. package/build/types/components/TopNavigation/index.d.ts +1 -0
  6. package/build/types/index.d.ts +3 -2
  7. package/package.json +1 -1
  8. package/.eslintignore +0 -1
  9. package/.eslintrc.cjs +0 -18
  10. package/.eslintrc.yml +0 -47
  11. package/.prettierignore +0 -3
  12. package/.prettierrc.yml +0 -5
  13. package/CHANGELOG.md +0 -4
  14. package/babel.config.json +0 -10
  15. package/examples/.eslintrc.yml +0 -4
  16. package/index.html +0 -18
  17. package/public/vite.svg +0 -1
  18. package/src/App.tsx +0 -72
  19. package/src/assets/Fonts/Lexi-Regular.ttf +0 -0
  20. package/src/assets/images/input/cancel.tsx +0 -20
  21. package/src/assets/images/input/search.tsx +0 -20
  22. package/src/assets/images/modal-icons/cancelIcon.png +0 -0
  23. package/src/assets/images/modal-icons/del.tsx +0 -19
  24. package/src/assets/images/modal-icons/delete.svg +0 -3
  25. package/src/assets/images/modal-icons/modal-cross.tsx +0 -23
  26. package/src/assets/images/modal-icons/save.tsx +0 -23
  27. package/src/assets/images/templates/add-icon.svg +0 -5
  28. package/src/assets/images/templates/back-arrow.tsx +0 -19
  29. package/src/assets/images/templates/back-dialog-icon.png +0 -0
  30. package/src/assets/images/templates/back-dialog-icon.svg +0 -3
  31. package/src/assets/images/templates/barcode.png +0 -0
  32. package/src/assets/images/templates/bi-fold-self-mailers.tsx +0 -28
  33. package/src/assets/images/templates/black-trash-icon.svg +0 -3
  34. package/src/assets/images/templates/cancel.svg +0 -4
  35. package/src/assets/images/templates/cancelIcon.png +0 -0
  36. package/src/assets/images/templates/clipboard.svg +0 -3
  37. package/src/assets/images/templates/contact-search.svg +0 -3
  38. package/src/assets/images/templates/content-copy-icon.tsx +0 -24
  39. package/src/assets/images/templates/cross.svg +0 -3
  40. package/src/assets/images/templates/custom-template-icon-black.svg +0 -3
  41. package/src/assets/images/templates/custom-template-icon.svg +0 -3
  42. package/src/assets/images/templates/custom-template.tsx +0 -23
  43. package/src/assets/images/templates/dummy-template.svg +0 -21
  44. package/src/assets/images/templates/dynamic-field.tsx +0 -119
  45. package/src/assets/images/templates/edit-pencil-icon.tsx +0 -21
  46. package/src/assets/images/templates/filter-2.svg +0 -13
  47. package/src/assets/images/templates/info-icon.svg +0 -12
  48. package/src/assets/images/templates/info-icon.tsx +0 -37
  49. package/src/assets/images/templates/one-barcode.png +0 -0
  50. package/src/assets/images/templates/personal-letter.tsx +0 -53
  51. package/src/assets/images/templates/plus-icon.svg +0 -5
  52. package/src/assets/images/templates/postcard.tsx +0 -32
  53. package/src/assets/images/templates/professional-letter.tsx +0 -53
  54. package/src/assets/images/templates/real-penned-letters.tsx +0 -57
  55. package/src/assets/images/templates/search.svg +0 -3
  56. package/src/assets/images/templates/size-image-lg.tsx +0 -20
  57. package/src/assets/images/templates/size-image-mid.tsx +0 -20
  58. package/src/assets/images/templates/size-image.tsx +0 -20
  59. package/src/assets/images/templates/template-copy.svg +0 -3
  60. package/src/assets/images/templates/template-default-design.tsx +0 -21
  61. package/src/assets/images/templates/template-delete.svg +0 -3
  62. package/src/assets/images/templates/template-edit.svg +0 -4
  63. package/src/assets/images/templates/template-save-icon.svg +0 -3
  64. package/src/assets/images/templates/template-search-2.svg +0 -9
  65. package/src/assets/images/templates/template-search.svg +0 -4
  66. package/src/assets/images/templates/thumbnail.svg +0 -10
  67. package/src/assets/images/templates/trash-icon.svg +0 -13
  68. package/src/assets/images/templates/tri-fold-self-mailers.tsx +0 -93
  69. package/src/components/CreateTemplate/index.tsx +0 -379
  70. package/src/components/CreateTemplate/styles.scss +0 -363
  71. package/src/components/GenericUIBlocks/Button/index.tsx +0 -21
  72. package/src/components/GenericUIBlocks/Button/styles.scss +0 -15
  73. package/src/components/GenericUIBlocks/CircularProgress/index.tsx +0 -18
  74. package/src/components/GenericUIBlocks/CircularProgress/styles.scss +0 -98
  75. package/src/components/GenericUIBlocks/Dialog/index.tsx +0 -127
  76. package/src/components/GenericUIBlocks/Dialog/styles.scss +0 -106
  77. package/src/components/GenericUIBlocks/Divider/index.tsx +0 -12
  78. package/src/components/GenericUIBlocks/Divider/styles.scss +0 -7
  79. package/src/components/GenericUIBlocks/GeneralSelect/index.tsx +0 -86
  80. package/src/components/GenericUIBlocks/GeneralSelect/styles.scss +0 -77
  81. package/src/components/GenericUIBlocks/GeneralTooltip/index.tsx +0 -24
  82. package/src/components/GenericUIBlocks/GeneralTooltip/styles.scss +0 -9
  83. package/src/components/GenericUIBlocks/GenericSnackbar/index.tsx +0 -53
  84. package/src/components/GenericUIBlocks/GenericSnackbar/styles.scss +0 -34
  85. package/src/components/GenericUIBlocks/Grid/index.tsx +0 -82
  86. package/src/components/GenericUIBlocks/Input/index.tsx +0 -89
  87. package/src/components/GenericUIBlocks/Input/styles.scss +0 -80
  88. package/src/components/GenericUIBlocks/Typography/index.tsx +0 -18
  89. package/src/components/GenericUIBlocks/Typography/styles.scss +0 -27
  90. package/src/components/SidePanel/customFields/customFieldSection.tsx +0 -173
  91. package/src/components/SidePanel/customFields/styles.scss +0 -47
  92. package/src/components/SidePanel/index.tsx +0 -42
  93. package/src/components/SidePanel/templates/customTemplateSection.tsx +0 -503
  94. package/src/components/SidePanel/templates/styles.scss +0 -151
  95. package/src/components/TemplateBuilder/index.tsx +0 -301
  96. package/src/components/TemplateBuilder/styles.scss +0 -66
  97. package/src/components/TopNavigation/ConfirmNavigateDialog/index.tsx +0 -58
  98. package/src/components/TopNavigation/ConfirmNavigateDialog/styles.scss +0 -123
  99. package/src/components/TopNavigation/EditTemplateNameModel/index.tsx +0 -98
  100. package/src/components/TopNavigation/EditTemplateNameModel/styles.scss +0 -88
  101. package/src/components/TopNavigation/SaveTemplateModel/index.tsx +0 -60
  102. package/src/components/TopNavigation/SaveTemplateModel/styles.scss +0 -128
  103. package/src/components/TopNavigation/index.tsx +0 -405
  104. package/src/components/TopNavigation/styles.scss +0 -83
  105. package/src/importMeta.d.ts +0 -9
  106. package/src/index.scss +0 -137
  107. package/src/index.tsx +0 -80
  108. package/src/libs/test.ts +0 -7
  109. package/src/redux/actions/action-types.ts +0 -42
  110. package/src/redux/actions/customFieldAction.ts +0 -28
  111. package/src/redux/actions/snackbarActions.ts +0 -16
  112. package/src/redux/actions/templateActions.ts +0 -456
  113. package/src/redux/reducers/customFieldReducer.ts +0 -97
  114. package/src/redux/reducers/index.ts +0 -14
  115. package/src/redux/reducers/snackbarReducer.ts +0 -41
  116. package/src/redux/reducers/templateReducer.ts +0 -353
  117. package/src/redux/store.ts +0 -18
  118. package/src/styles/colors.scss +0 -61
  119. package/src/test/mocks.js +0 -89
  120. package/src/test/setupJest.js +0 -1
  121. package/src/utils/api.ts +0 -36
  122. package/src/utils/constants.ts +0 -40
  123. package/src/utils/customStyles.ts +0 -135
  124. package/src/utils/fetchWrapper.ts +0 -68
  125. package/src/utils/fonts.json +0 -1597
  126. package/src/utils/helper.ts +0 -19
  127. package/src/utils/local-storage.ts +0 -15
  128. package/src/utils/message.ts +0 -71
  129. package/src/utils/template-builder.ts +0 -147
  130. package/src/utils/templateRestrictedArea/biFold.ts +0 -433
  131. package/src/utils/templateRestrictedArea/postCard.ts +0 -439
  132. package/src/utils/templateRestrictedArea/professional.ts +0 -422
  133. package/src/utils/templateRestrictedArea/realPenned.ts +0 -244
  134. package/src/utils/templateRestrictedArea/triFold.ts +0 -434
  135. package/tsconfig.json +0 -29
  136. package/tsconfig.node.json +0 -12
  137. package/vite.config.ts +0 -8
  138. package/webpack.config.js +0 -80
@@ -1,422 +0,0 @@
1
- import { DPI } from "../constants";
2
-
3
- // Define the type for the element being added
4
- interface Element {
5
- id: string;
6
- type: string;
7
- name: string;
8
- opacity: number;
9
- visible: boolean;
10
- selectable: boolean;
11
- removable: boolean;
12
- alwaysOnTop: boolean;
13
- showInExport: boolean;
14
- x: number;
15
- y: number;
16
- width: number;
17
- height: number;
18
- rotation: number;
19
- animations?: any[];
20
- blurEnabled?: boolean;
21
- blurRadius?: number;
22
- brightnessEnabled?: boolean;
23
- brightness?: number;
24
- sepiaEnabled?: boolean;
25
- grayscaleEnabled?: boolean;
26
- shadowEnabled?: boolean;
27
- shadowBlur?: number;
28
- shadowOffsetX?: number;
29
- shadowOffsetY?: number;
30
- shadowColor?: string;
31
- shadowOpacity?: number;
32
- draggable?: boolean;
33
- resizable?: boolean;
34
- contentEditable: boolean;
35
- styleEditable: boolean;
36
- subType?: string;
37
- fill?: string;
38
- dash?: any[];
39
- strokeWidth?: number;
40
- stroke?: string;
41
- cornerRadius?: number;
42
- text?: string;
43
- placeholder?: string;
44
- fontSize?: number;
45
- fontFamily?: string;
46
- fontStyle?: string;
47
- fontWeight?: string;
48
- textDecoration?: string;
49
- align?: string;
50
- verticalAlign?: string;
51
- lineHeight?: number;
52
- letterSpacing?: number;
53
- backgroundEnabled?: boolean;
54
- backgroundColor?: string;
55
- backgroundOpacity?: number;
56
- backgroundCornerRadius?: number;
57
- backgroundPadding?: number;
58
- src?: string;
59
- cropX?: number;
60
- cropY?: number;
61
- cropWidth?: number;
62
- cropHeight?: number;
63
- flipX?: boolean;
64
- flipY?: boolean;
65
- clipSrc?: string;
66
- borderSize?: number;
67
- keepRatio?: boolean;
68
- }
69
-
70
- // Define the type for the page
71
- interface Page {
72
- addElement: (element: Element) => void;
73
- }
74
-
75
- // Define the type for the store
76
- interface Store {
77
- width: number;
78
- height: number;
79
- pages: Page[];
80
- history: {
81
- clear: () => void;
82
- };
83
- }
84
-
85
- export const addAreaToProfessionalLetters = (store: Store, barcodeSrc: string): void => {
86
- const page = store.pages[0];
87
- const position = [0.6, 0.84];
88
- const position1 = [0.63, 1.71];
89
-
90
- const elements: Element[] = [
91
- {
92
- id: 'figure-2',
93
- type: 'figure',
94
- name: '',
95
- opacity: 1,
96
- visible: true,
97
- selectable: false,
98
- removable: false,
99
- alwaysOnTop: true,
100
- showInExport: true,
101
- x: 0.63 * DPI,
102
- y: 0.5 * DPI,
103
- width: 3.25 * DPI,
104
- height: 0.875 * DPI,
105
- rotation: 0,
106
- animations: [],
107
- blurEnabled: false,
108
- blurRadius: 10,
109
- brightnessEnabled: false,
110
- brightness: 0,
111
- sepiaEnabled: false,
112
- grayscaleEnabled: false,
113
- shadowEnabled: false,
114
- shadowBlur: 5,
115
- shadowOffsetX: 0,
116
- shadowOffsetY: 0,
117
- shadowColor: 'black',
118
- shadowOpacity: 1,
119
- draggable: false,
120
- resizable: false,
121
- contentEditable: false,
122
- styleEditable: false,
123
- subType: 'rect',
124
- fill: 'white',
125
- dash: [],
126
- strokeWidth: 0,
127
- stroke: '#0c0c0c',
128
- cornerRadius: 0,
129
- },
130
- {
131
- id: 'figure-3',
132
- type: 'figure',
133
- name: '',
134
- opacity: 1,
135
- visible: true,
136
- selectable: false,
137
- removable: false,
138
- alwaysOnTop: true,
139
- showInExport: true,
140
- x: 0.63 * DPI,
141
- y: 1.71 * DPI,
142
- width: 4 * DPI,
143
- height: 1 * DPI,
144
- rotation: 0,
145
- animations: [],
146
- blurEnabled: false,
147
- blurRadius: 10,
148
- brightnessEnabled: false,
149
- brightness: 0,
150
- sepiaEnabled: false,
151
- grayscaleEnabled: false,
152
- shadowEnabled: false,
153
- shadowBlur: 5,
154
- shadowOffsetX: 0,
155
- shadowOffsetY: 0,
156
- shadowColor: 'black',
157
- shadowOpacity: 1,
158
- draggable: false,
159
- resizable: false,
160
- contentEditable: false,
161
- styleEditable: false,
162
- subType: 'rect',
163
- fill: 'white',
164
- dash: [],
165
- strokeWidth: 0,
166
- stroke: '#0c0c0c',
167
- cornerRadius: 0,
168
- },
169
- {
170
- id: 'return-address',
171
- type: 'text',
172
- name: '',
173
- opacity: 1,
174
- visible: true,
175
- selectable: false,
176
- removable: false,
177
- alwaysOnTop: true,
178
- showInExport: true,
179
- x: position[0] * DPI + 10,
180
- y: position[1] * DPI - 10,
181
- width: 200,
182
- height: 18,
183
- rotation: 0,
184
- animations: [],
185
- blurEnabled: false,
186
- blurRadius: 10,
187
- brightnessEnabled: false,
188
- brightness: 0,
189
- sepiaEnabled: false,
190
- grayscaleEnabled: false,
191
- shadowEnabled: false,
192
- shadowBlur: 5,
193
- shadowOffsetX: 0,
194
- shadowOffsetY: 0,
195
- shadowColor: 'black',
196
- shadowOpacity: 1,
197
- draggable: false,
198
- resizable: false,
199
- contentEditable: false,
200
- styleEditable: false,
201
- text: 'YOUR RETURN ADDRESS \nWILL AUTOMATICALLY \nBE PRINTED IN THIS \nPOSITION',
202
- placeholder: '',
203
- fontSize: 12,
204
- fontFamily: 'Roboto',
205
- fontStyle: 'normal',
206
- fontWeight: 'normal',
207
- textDecoration: '',
208
- fill: 'black',
209
- align: 'start',
210
- verticalAlign: 'top',
211
- strokeWidth: 0,
212
- stroke: 'black',
213
- lineHeight: 1.2,
214
- letterSpacing: 0,
215
- backgroundEnabled: false,
216
- backgroundColor: '#7ED321',
217
- backgroundOpacity: 1,
218
- backgroundCornerRadius: 0.5,
219
- backgroundPadding: 0.5,
220
- },
221
- {
222
- id: 'barcode',
223
- type: 'image',
224
- name: '',
225
- opacity: 1,
226
- visible: true,
227
- selectable: false,
228
- removable: false,
229
- alwaysOnTop: true,
230
- showInExport: true,
231
- x: position1[0] * DPI + 10,
232
- y: position1[1] * DPI + 70,
233
- width: 215,
234
- height: 12,
235
- rotation: 0,
236
- animations: [],
237
- blurEnabled: false,
238
- brightnessEnabled: false,
239
- brightness: 0,
240
- sepiaEnabled: false,
241
- grayscaleEnabled: false,
242
- shadowEnabled: false,
243
- shadowOffsetX: 0,
244
- shadowOffsetY: 0,
245
- shadowOpacity: 1,
246
- draggable: false,
247
- resizable: false,
248
- contentEditable: false,
249
- styleEditable: false,
250
- src: barcodeSrc,
251
- cropX: 0,
252
- cropY: 0,
253
- cropWidth: 1,
254
- cropHeight: 1,
255
- cornerRadius: 0,
256
- flipX: false,
257
- flipY: false,
258
- clipSrc: '',
259
- borderSize: 0,
260
- keepRatio: false,
261
- },
262
- {
263
- id: 'recipient-address',
264
- type: 'text',
265
- name: '',
266
- opacity: 1,
267
- visible: true,
268
- selectable: false,
269
- removable: false,
270
- alwaysOnTop: true,
271
- showInExport: true,
272
- x: position1[0] * DPI + 10,
273
- y: position1[1] * DPI + 10,
274
- width: 165,
275
- height: 21,
276
- rotation: 0,
277
- animations: [],
278
- blurEnabled: false,
279
- blurRadius: 10,
280
- brightnessEnabled: false,
281
- brightness: 0,
282
- sepiaEnabled: false,
283
- grayscaleEnabled: false,
284
- shadowEnabled: false,
285
- shadowBlur: 5,
286
- shadowOffsetX: 0,
287
- shadowOffsetY: 0,
288
- shadowColor: 'black',
289
- shadowOpacity: 1,
290
- draggable: false,
291
- resizable: false,
292
- contentEditable: false,
293
- styleEditable: false,
294
- text: 'RECIPIENT ADDRESS \nWILL AUTOMATICALLY \nBE PRINTED IN THIS \nPOSITION',
295
- placeholder: '',
296
- fontSize: 12,
297
- fontFamily: 'Roboto',
298
- fontStyle: 'normal',
299
- fontWeight: 'normal',
300
- textDecoration: '',
301
- fill: 'black',
302
- align: 'start',
303
- verticalAlign: 'top',
304
- strokeWidth: 0,
305
- stroke: 'black',
306
- lineHeight: 1.2,
307
- letterSpacing: 0,
308
- backgroundEnabled: false,
309
- backgroundColor: '#7ED321',
310
- backgroundOpacity: 1,
311
- backgroundCornerRadius: 0.5,
312
- backgroundPadding: 0.5,
313
- },
314
- {
315
- id: 'sequence',
316
- type: 'text',
317
- name: '',
318
- opacity: 1,
319
- visible: true,
320
- selectable: false,
321
- removable: false,
322
- alwaysOnTop: true,
323
- showInExport: true,
324
- x: position1[0] * DPI + 280,
325
- y: position1[1] * DPI + 64,
326
- width: 111,
327
- height: 40,
328
- rotation: 0,
329
- animations: [],
330
- blurEnabled: false,
331
- blurRadius: 10,
332
- brightnessEnabled: false,
333
- brightness: 0,
334
- sepiaEnabled: false,
335
- grayscaleEnabled: false,
336
- shadowEnabled: false,
337
- shadowBlur: 5,
338
- shadowOffsetX: 0,
339
- shadowOffsetY: 0,
340
- shadowColor: 'black',
341
- shadowOpacity: 1,
342
- draggable: false,
343
- resizable: false,
344
- contentEditable: false,
345
- styleEditable: false,
346
- text: `Sequence`,
347
- placeholder: '',
348
- fontSize: 8,
349
- fontFamily: 'Roboto',
350
- fontStyle: 'normal',
351
- fontWeight: 'normal',
352
- textDecoration: '',
353
- fill: 'black',
354
- align: 'center',
355
- verticalAlign: 'top',
356
- strokeWidth: 0,
357
- stroke: 'black',
358
- lineHeight: 1.2,
359
- letterSpacing: 0,
360
- backgroundEnabled: false,
361
- backgroundColor: '#7ED321',
362
- backgroundOpacity: 1,
363
- backgroundCornerRadius: 0.5,
364
- backgroundPadding: 0.5,
365
- },
366
- {
367
- id: 'contId',
368
- type: 'text',
369
- name: '',
370
- opacity: 1,
371
- visible: true,
372
- selectable: false,
373
- removable: false,
374
- alwaysOnTop: true,
375
- showInExport: true,
376
- x: position1[0] * DPI + 280,
377
- y: position1[1] * DPI + 74,
378
- width: 111,
379
- height: 40,
380
- rotation: 0,
381
- animations: [],
382
- blurEnabled: false,
383
- blurRadius: 10,
384
- brightnessEnabled: false,
385
- brightness: 0,
386
- sepiaEnabled: false,
387
- grayscaleEnabled: false,
388
- shadowEnabled: false,
389
- shadowBlur: 5,
390
- shadowOffsetX: 0,
391
- shadowOffsetY: 0,
392
- shadowColor: 'black',
393
- shadowOpacity: 1,
394
- draggable: false,
395
- resizable: false,
396
- contentEditable: false,
397
- styleEditable: false,
398
- text: `Cont ID`,
399
- placeholder: '',
400
- fontSize: 8,
401
- fontFamily: 'Roboto',
402
- fontStyle: 'normal',
403
- fontWeight: 'normal',
404
- textDecoration: '',
405
- fill: 'black',
406
- align: 'center',
407
- verticalAlign: 'top',
408
- strokeWidth: 0,
409
- stroke: 'black',
410
- lineHeight: 1.2,
411
- letterSpacing: 0,
412
- backgroundEnabled: false,
413
- backgroundColor: '#7ED321',
414
- backgroundOpacity: 1,
415
- backgroundCornerRadius: 0.5,
416
- backgroundPadding: 0.5,
417
- }
418
- ];
419
-
420
- elements.forEach(element => page.addElement(element));
421
- store.history.clear();
422
- };
@@ -1,244 +0,0 @@
1
- // Define the type for the element being added
2
- interface Element {
3
- id: string;
4
- type: string;
5
- name: string;
6
- opacity: number;
7
- visible: boolean;
8
- selectable: boolean;
9
- removable: boolean;
10
- alwaysOnTop: boolean;
11
- showInExport: boolean;
12
- x: number;
13
- y: number;
14
- width: number;
15
- height: number;
16
- rotation: number;
17
- animations?: any[];
18
- blurEnabled?: boolean;
19
- blurRadius?: number;
20
- brightnessEnabled?: boolean;
21
- brightness?: number;
22
- sepiaEnabled?: boolean;
23
- grayscaleEnabled?: boolean;
24
- shadowEnabled?: boolean;
25
- shadowBlur?: number;
26
- shadowOffsetX?: number;
27
- shadowOffsetY?: number;
28
- shadowColor?: string;
29
- shadowOpacity?: number;
30
- draggable?: boolean;
31
- resizable?: boolean;
32
- contentEditable: boolean;
33
- styleEditable: boolean;
34
- subType?: string;
35
- fill?: string;
36
- dash?: any[];
37
- strokeWidth?: number;
38
- stroke?: string;
39
- cornerRadius?: number;
40
- text?: string;
41
- placeholder?: string;
42
- fontSize?: number;
43
- fontFamily?: string;
44
- fontStyle?: string;
45
- fontWeight?: string;
46
- textDecoration?: string;
47
- align?: string;
48
- verticalAlign?: string;
49
- lineHeight?: number;
50
- letterSpacing?: number;
51
- backgroundEnabled?: boolean;
52
- backgroundColor?: string;
53
- backgroundOpacity?: number;
54
- backgroundCornerRadius?: number;
55
- backgroundPadding?: number;
56
- src?: string;
57
- cropX?: number;
58
- cropY?: number;
59
- cropWidth?: number;
60
- cropHeight?: number;
61
- flipX?: boolean;
62
- flipY?: boolean;
63
- clipSrc?: string;
64
- borderSize?: number;
65
- keepRatio?: boolean;
66
- }
67
-
68
- // Define the type for the page
69
- interface Page {
70
- addElement: (element: Element) => void;
71
- }
72
-
73
- // Define the type for the store
74
- interface Store {
75
- width: number;
76
- height: number;
77
- pages: Page[];
78
- history: {
79
- clear: () => void;
80
- };
81
- }
82
-
83
- export const addElementsforRealPennedLetters = (store: Store): void => {
84
- const page = store.pages[0];
85
-
86
- const elements: Element[] = [
87
- {
88
- id: 'header',
89
- type: 'text',
90
- name: '',
91
- opacity: 1,
92
- visible: true,
93
- selectable: true,
94
- removable: false,
95
- alwaysOnTop: true,
96
- showInExport: true,
97
- x: 25,
98
- y: 130,
99
- width: 480,
100
- height: 40,
101
- rotation: 0,
102
- animations: [],
103
- blurEnabled: false,
104
- blurRadius: 10,
105
- brightnessEnabled: false,
106
- brightness: 0,
107
- sepiaEnabled: false,
108
- grayscaleEnabled: false,
109
- shadowEnabled: false,
110
- shadowBlur: 5,
111
- shadowOffsetX: 0,
112
- shadowOffsetY: 0,
113
- shadowColor: 'black',
114
- shadowOpacity: 1,
115
- draggable: false,
116
- resizable: false,
117
- contentEditable: true,
118
- styleEditable: false,
119
- text: "Hi ((C.FIRST_NAME)),",
120
- fontSize: 20,
121
- fontFamily: 'lexi Regular',
122
- fontStyle: 'normal',
123
- fontWeight: 'normal',
124
- textDecoration: '',
125
- fill: 'blue',
126
- align: 'start',
127
- verticalAlign: 'top',
128
- strokeWidth: 0,
129
- stroke: 'black',
130
- lineHeight: 1.75,
131
- letterSpacing: 0,
132
- backgroundEnabled: false,
133
- backgroundColor: '#7ED321',
134
- backgroundOpacity: 1,
135
- backgroundCornerRadius: 0.5,
136
- backgroundPadding: 0.5,
137
- },
138
- {
139
- id: 'content',
140
- type: 'text',
141
- name: '',
142
- opacity: 1,
143
- visible: true,
144
- selectable: true,
145
- removable: false,
146
- alwaysOnTop: true,
147
- showInExport: true,
148
- x: 25.499999994998234,
149
- y: 220.60449354986338,
150
- width: 477,
151
- height: 400,
152
- rotation: 0,
153
- animations: [],
154
- blurEnabled: false,
155
- blurRadius: 10,
156
- brightnessEnabled: false,
157
- brightness: 0,
158
- sepiaEnabled: false,
159
- grayscaleEnabled: false,
160
- shadowEnabled: false,
161
- shadowBlur: 5,
162
- shadowOffsetX: 0,
163
- shadowOffsetY: 0,
164
- shadowColor: 'black',
165
- shadowOpacity: 1,
166
- draggable: false,
167
- resizable: false,
168
- contentEditable: true,
169
- styleEditable: false,
170
- text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. In recent projects, we've focused heavily on OLC to enhance digital engagement. Real Penned Letters, is a unique initiative.\n\nAs we continue to develop OLC platforms, we remain committed to integrating elements like Real Penned Letters to enhance digital and personal communication. \n",
171
- fontSize: 20,
172
- fontFamily: 'lexi Regular',
173
- fontStyle: 'normal',
174
- fontWeight: 'normal',
175
- textDecoration: '',
176
- fill: 'blue',
177
- align: 'start',
178
- verticalAlign: 'top',
179
- strokeWidth: 0,
180
- stroke: 'black',
181
- lineHeight: 1.75,
182
- letterSpacing: 0,
183
- backgroundEnabled: false,
184
- backgroundColor: '#7ED321',
185
- backgroundOpacity: 1,
186
- backgroundCornerRadius: 0.5,
187
- backgroundPadding: 0.5,
188
- },
189
- {
190
- id: 'footer',
191
- type: 'text',
192
- name: '',
193
- opacity: 1,
194
- visible: true,
195
- selectable: true,
196
- removable: false,
197
- alwaysOnTop: true,
198
- showInExport: true,
199
- x: 165.49999999499846,
200
- y: 651.7346179851188,
201
- width: 335,
202
- height: 75,
203
- rotation: 0,
204
- animations: [],
205
- blurEnabled: false,
206
- blurRadius: 10,
207
- brightnessEnabled: false,
208
- brightness: 0,
209
- sepiaEnabled: false,
210
- grayscaleEnabled: false,
211
- shadowEnabled: false,
212
- shadowBlur: 5,
213
- shadowOffsetX: 0,
214
- shadowOffsetY: 0,
215
- shadowColor: 'black',
216
- shadowOpacity: 1,
217
- draggable: false,
218
- resizable: false,
219
- contentEditable: true,
220
- styleEditable: false,
221
- text: "Regards,\nYour Name",
222
- fontSize: 20,
223
- fontFamily: 'lexi Regular',
224
- fontStyle: 'normal',
225
- fontWeight: 'normal',
226
- textDecoration: '',
227
- fill: 'blue',
228
- align: 'start',
229
- verticalAlign: 'top',
230
- strokeWidth: 0,
231
- stroke: 'black',
232
- lineHeight: 1.75,
233
- letterSpacing: 0,
234
- backgroundEnabled: false,
235
- backgroundColor: '#7ED321',
236
- backgroundOpacity: 1,
237
- backgroundCornerRadius: 0.5,
238
- backgroundPadding: 0.5,
239
- },
240
- ]
241
-
242
- elements.forEach(element => page.addElement(element));
243
- store.history.clear();
244
- }