@openlettermarketing/olc-react-sdk 2.1.6 → 2.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/types/version.d.ts +1 -1
- package/package.json +7 -6
- package/.eslintignore +0 -1
- package/.eslintrc.cjs +0 -18
- package/.eslintrc.yml +0 -47
- package/.github/workflows/publish-beta.yml +0 -154
- package/.github/workflows/publish-production.yml +0 -143
- package/.prettierignore +0 -3
- package/.prettierrc.yml +0 -5
- package/CHANGELOG.md +0 -4
- package/babel.config.json +0 -10
- package/examples/.eslintrc.yml +0 -4
- package/index.html +0 -18
- package/public/vite.svg +0 -1
- package/src/App.tsx +0 -209
- package/src/assets/Fonts/Lexi-Regular.ttf +0 -0
- package/src/assets/images/create-template/prebuilt.svg +0 -13
- package/src/assets/images/create-template/scratch.svg +0 -4
- package/src/assets/images/input/cancel.tsx +0 -20
- package/src/assets/images/input/search.tsx +0 -20
- package/src/assets/images/input/select-cancel.tsx +0 -17
- package/src/assets/images/modal-icons/add.tsx +0 -36
- package/src/assets/images/modal-icons/cancel-file.tsx +0 -12
- package/src/assets/images/modal-icons/cancel-input.tsx +0 -13
- package/src/assets/images/modal-icons/cancel.tsx +0 -35
- package/src/assets/images/modal-icons/close-new.svg +0 -3
- package/src/assets/images/modal-icons/confirm-close-icon.tsx +0 -14
- package/src/assets/images/modal-icons/confirm-new.tsx +0 -22
- package/src/assets/images/modal-icons/confirm.svg +0 -12
- package/src/assets/images/modal-icons/cross.tsx +0 -23
- package/src/assets/images/modal-icons/del.tsx +0 -19
- package/src/assets/images/modal-icons/design-icon.tsx +0 -22
- package/src/assets/images/modal-icons/doc.tsx +0 -43
- package/src/assets/images/modal-icons/docx.tsx +0 -43
- package/src/assets/images/modal-icons/envelope-icon.tsx +0 -26
- package/src/assets/images/modal-icons/info.tsx +0 -19
- package/src/assets/images/modal-icons/jpeg.tsx +0 -43
- package/src/assets/images/modal-icons/jpg.tsx +0 -43
- package/src/assets/images/modal-icons/modal-cros.svg +0 -4
- package/src/assets/images/modal-icons/modal-cross.tsx +0 -37
- package/src/assets/images/modal-icons/new-cancel.tsx +0 -11
- package/src/assets/images/modal-icons/order-download.tsx +0 -42
- package/src/assets/images/modal-icons/pdf.tsx +0 -51
- package/src/assets/images/modal-icons/png.tsx +0 -43
- package/src/assets/images/modal-icons/save.tsx +0 -23
- package/src/assets/images/modal-icons/template-copy.tsx +0 -25
- package/src/assets/images/modal-icons/tool-cancel.tsx +0 -25
- package/src/assets/images/products/bi-new.svg +0 -23
- package/src/assets/images/products/left-arrow.svg +0 -17
- package/src/assets/images/products/personal-new.tsx +0 -31
- package/src/assets/images/products/postcard-new.tsx +0 -27
- package/src/assets/images/products/professional-new.tsx +0 -24
- package/src/assets/images/products/real-new.tsx +0 -30
- package/src/assets/images/products/right-arrow.svg +0 -17
- package/src/assets/images/products/snap-new.svg +0 -31
- package/src/assets/images/templates/actions.svg +0 -3
- package/src/assets/images/templates/address-block-icon.tsx +0 -62
- package/src/assets/images/templates/archive.svg +0 -3
- package/src/assets/images/templates/arrow-down.tsx +0 -27
- package/src/assets/images/templates/back-arrow.tsx +0 -19
- package/src/assets/images/templates/bi-fold-self-mailers.tsx +0 -28
- package/src/assets/images/templates/check.svg +0 -3
- package/src/assets/images/templates/code.svg +0 -10
- package/src/assets/images/templates/content-copy-icon.tsx +0 -24
- package/src/assets/images/templates/custom-add-on-icon.tsx +0 -18
- package/src/assets/images/templates/custom-qr-section-icon.tsx +0 -9
- package/src/assets/images/templates/custom-template.tsx +0 -23
- package/src/assets/images/templates/designer.tsx +0 -43
- package/src/assets/images/templates/dot.tsx +0 -22
- package/src/assets/images/templates/download-v2.svg +0 -4
- package/src/assets/images/templates/download.svg +0 -4
- package/src/assets/images/templates/dummy-template.tsx +0 -76
- package/src/assets/images/templates/dynamic-field.tsx +0 -119
- package/src/assets/images/templates/edit-pencil-icon.tsx +0 -21
- package/src/assets/images/templates/edit.svg +0 -3
- package/src/assets/images/templates/epo-icon.tsx +0 -16
- package/src/assets/images/templates/field.tsx +0 -29
- package/src/assets/images/templates/gsv-icon.tsx +0 -31
- package/src/assets/images/templates/info-icon.tsx +0 -37
- package/src/assets/images/templates/left-arrow.svg +0 -17
- package/src/assets/images/templates/pencil.svg +0 -3
- package/src/assets/images/templates/personal-letter.tsx +0 -53
- package/src/assets/images/templates/postcard.tsx +0 -32
- package/src/assets/images/templates/professional-letter.tsx +0 -53
- package/src/assets/images/templates/qr-code.tsx +0 -13
- package/src/assets/images/templates/real-penned-letters.tsx +0 -57
- package/src/assets/images/templates/right-arrow.svg +0 -17
- package/src/assets/images/templates/size-image-lg.tsx +0 -20
- package/src/assets/images/templates/size-image-mid.tsx +0 -20
- package/src/assets/images/templates/size-image-xl.tsx +0 -20
- package/src/assets/images/templates/size-image.tsx +0 -20
- package/src/assets/images/templates/snap-pack.tsx +0 -67
- package/src/assets/images/templates/template-default-design.tsx +0 -21
- package/src/assets/images/templates/trash-upload.svg +0 -3
- package/src/assets/images/templates/trash.svg +0 -3
- package/src/assets/images/templates/tri-fold-self-mailers.tsx +0 -93
- package/src/assets/images/templates/upload-image.svg +0 -10
- package/src/assets/images/templates/x.svg +0 -3
- package/src/assets/images/thumbnails/one.svg +0 -9
- package/src/assets/images/tooltip/tool-arrow.tsx +0 -25
- package/src/components/CreateTemplate/V2/index.tsx +0 -527
- package/src/components/CreateTemplate/V2/styles.scss +0 -372
- package/src/components/CreateTemplate/index.tsx +0 -508
- package/src/components/CreateTemplate/styles.scss +0 -404
- package/src/components/GenericUIBlocks/Button/index.tsx +0 -54
- package/src/components/GenericUIBlocks/Button/styles.scss +0 -43
- package/src/components/GenericUIBlocks/CircularProgress/index.tsx +0 -18
- package/src/components/GenericUIBlocks/CircularProgress/styles.scss +0 -93
- package/src/components/GenericUIBlocks/CustomTooltip/index.tsx +0 -88
- package/src/components/GenericUIBlocks/CustomTooltip/styles.scss +0 -19
- package/src/components/GenericUIBlocks/Dialog/V2/index.tsx +0 -227
- package/src/components/GenericUIBlocks/Dialog/V2/styles.scss +0 -289
- package/src/components/GenericUIBlocks/Dialog/index.tsx +0 -185
- package/src/components/GenericUIBlocks/Dialog/styles.scss +0 -227
- package/src/components/GenericUIBlocks/Divider/index.tsx +0 -12
- package/src/components/GenericUIBlocks/Divider/styles.scss +0 -7
- package/src/components/GenericUIBlocks/GeneralSelect/index.tsx +0 -114
- package/src/components/GenericUIBlocks/GeneralSelect/styles.scss +0 -406
- package/src/components/GenericUIBlocks/GeneralTooltip/index.tsx +0 -25
- package/src/components/GenericUIBlocks/GeneralTooltip/styles.scss +0 -20
- package/src/components/GenericUIBlocks/GenericSnackbar/Toast/index.tsx +0 -91
- package/src/components/GenericUIBlocks/GenericSnackbar/Toast/styles.scss +0 -92
- package/src/components/GenericUIBlocks/Grid/index.tsx +0 -82
- package/src/components/GenericUIBlocks/Input/index.tsx +0 -269
- package/src/components/GenericUIBlocks/Input/styles.scss +0 -332
- package/src/components/GenericUIBlocks/Tabs/index.tsx +0 -71
- package/src/components/GenericUIBlocks/Tabs/styles.scss +0 -42
- package/src/components/GenericUIBlocks/Typography/index.tsx +0 -18
- package/src/components/GenericUIBlocks/Typography/styles.scss +0 -27
- package/src/components/SidePanel/CustomAddOns/index.tsx +0 -342
- package/src/components/SidePanel/CustomAddOns/styles.scss +0 -86
- package/src/components/SidePanel/CustomBlockColors/index.tsx +0 -211
- package/src/components/SidePanel/CustomBlockColors/styles.scss +0 -80
- package/src/components/SidePanel/CustomFields/customFieldSection.tsx +0 -547
- package/src/components/SidePanel/CustomFields/styles.scss +0 -64
- package/src/components/SidePanel/CustomQRCode/V2/QRCodeModal/index.tsx +0 -172
- package/src/components/SidePanel/CustomQRCode/V2/QRCodeModal/styles.scss +0 -46
- package/src/components/SidePanel/CustomQRCode/index.tsx +0 -1070
- package/src/components/SidePanel/CustomQRCode/styles.scss +0 -149
- package/src/components/SidePanel/CustomUploads/V2/index.tsx +0 -542
- package/src/components/SidePanel/CustomUploads/V2/styles.scss +0 -267
- package/src/components/SidePanel/CustomUploads/index.tsx +0 -301
- package/src/components/SidePanel/Templates/ModalGallery/HireDesigner/index.tsx +0 -424
- package/src/components/SidePanel/Templates/ModalGallery/HireDesigner/styles.scss +0 -180
- package/src/components/SidePanel/Templates/ModalGallery/V2/index.tsx +0 -235
- package/src/components/SidePanel/Templates/ModalGallery/V2/styles.scss +0 -244
- package/src/components/SidePanel/Templates/ModalGallery/index.tsx +0 -231
- package/src/components/SidePanel/Templates/SideBarGallery/index.tsx +0 -233
- package/src/components/SidePanel/Templates/SideBarGallery/styles.scss +0 -152
- package/src/components/SidePanel/Templates/TemplatesCard/V2/index.tsx +0 -149
- package/src/components/SidePanel/Templates/TemplatesCard/V2/styles.scss +0 -156
- package/src/components/SidePanel/Templates/TemplatesCard/index.tsx +0 -160
- package/src/components/SidePanel/Templates/TemplatesCard/styles.scss +0 -98
- package/src/components/SidePanel/Templates/customTemplateSection.tsx +0 -793
- package/src/components/SidePanel/Templates/styles.scss +0 -244
- package/src/components/SidePanel/index.tsx +0 -160
- package/src/components/TemplateBuilder/index.tsx +0 -585
- package/src/components/TemplateBuilder/styles.scss +0 -100
- package/src/components/TemplateTypes/index.tsx +0 -96
- package/src/components/TemplateTypes/styles.scss +0 -91
- package/src/components/TopNavigation/ConfirmNavigateDialog/index.tsx +0 -81
- package/src/components/TopNavigation/ConfirmNavigateDialog/styles.scss +0 -123
- package/src/components/TopNavigation/DuplicateTemplateModal.tsx +0 -103
- package/src/components/TopNavigation/EditTemplateNameModel/index.tsx +0 -71
- package/src/components/TopNavigation/EditTemplateNameModel/styles.scss +0 -88
- package/src/components/TopNavigation/SaveTemplateModel/index.tsx +0 -201
- package/src/components/TopNavigation/SaveTemplateModel/styles.scss +0 -128
- package/src/components/TopNavigation/index.tsx +0 -938
- package/src/components/TopNavigation/styles.scss +0 -303
- package/src/importMeta.d.ts +0 -31
- package/src/index.scss +0 -131
- package/src/index.tsx +0 -238
- package/src/libs/test.ts +0 -7
- package/src/redux/actions/action-types.ts +0 -52
- package/src/redux/actions/customQRCodeActions.ts +0 -54
- package/src/redux/actions/snackbarActions.ts +0 -16
- package/src/redux/actions/templateActions.ts +0 -236
- package/src/redux/reducers/customFieldReducer.ts +0 -99
- package/src/redux/reducers/customQRCodeReducer.ts +0 -58
- package/src/redux/reducers/index.ts +0 -15
- package/src/redux/reducers/snackbarReducer.ts +0 -40
- package/src/redux/reducers/templateReducer.ts +0 -485
- package/src/redux/store.ts +0 -18
- package/src/styles/colors.scss +0 -61
- package/src/test/mocks.js +0 -89
- package/src/test/setupJest.js +0 -1
- package/src/utils/api.ts +0 -36
- package/src/utils/constants.ts +0 -182
- package/src/utils/customStyles.ts +0 -45
- package/src/utils/fetchWrapper.ts +0 -73
- package/src/utils/fonts.json +0 -1597
- package/src/utils/helper.ts +0 -205
- package/src/utils/local-storage.ts +0 -15
- package/src/utils/message.ts +0 -162
- package/src/utils/products.ts +0 -186
- package/src/utils/template-builder.ts +0 -328
- package/src/utils/templateIdentifierArea/biFold.ts +0 -107
- package/src/utils/templateIdentifierArea/index.ts +0 -35
- package/src/utils/templateIdentifierArea/personal.ts +0 -107
- package/src/utils/templateIdentifierArea/postCards.ts +0 -163
- package/src/utils/templateIdentifierArea/professional.ts +0 -125
- package/src/utils/templateIdentifierArea/snapPack.ts +0 -107
- package/src/utils/templateIdentifierArea/triFold.ts +0 -107
- package/src/utils/templateRestrictedArea/biFold.ts +0 -329
- package/src/utils/templateRestrictedArea/nonWindowProfessional.ts +0 -90
- package/src/utils/templateRestrictedArea/personal.ts +0 -90
- package/src/utils/templateRestrictedArea/postCard.ts +0 -334
- package/src/utils/templateRestrictedArea/postCardJumbo.tsx +0 -408
- package/src/utils/templateRestrictedArea/professional.ts +0 -318
- package/src/utils/templateRestrictedArea/realPenned.ts +0 -233
- package/src/utils/templateRestrictedArea/snapPack.ts +0 -1009
- package/src/utils/templateRestrictedArea/triFold.ts +0 -330
- package/src/utils/templateSafetyBorders/biFold.ts +0 -91
- package/src/utils/templateSafetyBorders/index.ts +0 -43
- package/src/utils/templateSafetyBorders/personal.ts +0 -41
- package/src/utils/templateSafetyBorders/postCards.ts +0 -259
- package/src/utils/templateSafetyBorders/professional.ts +0 -78
- package/src/utils/templateSafetyBorders/snapPack.ts +0 -165
- package/src/utils/templateSafetyBorders/triFold.ts +0 -114
- package/src/utils/templateSafetyBorders/types.d.ts +0 -68
- package/src/utils/types.ts +0 -12
- package/src/v2Theme.scss +0 -142
- package/tsconfig.json +0 -29
- package/tsconfig.node.json +0 -12
- package/update-version.js +0 -23
- package/version.js +0 -1
- package/vite.config.ts +0 -8
- package/webpack.config.js +0 -80
|
@@ -1,303 +0,0 @@
|
|
|
1
|
-
.top-navigation-container {
|
|
2
|
-
background-color: white !important;
|
|
3
|
-
width: 100%;
|
|
4
|
-
padding: 23px 20px;
|
|
5
|
-
height: 100%;
|
|
6
|
-
max-height: 70px;
|
|
7
|
-
margin: 0;
|
|
8
|
-
top: 0;
|
|
9
|
-
display: flex;
|
|
10
|
-
justify-content: center;
|
|
11
|
-
align-items: center;
|
|
12
|
-
border-bottom: 0.5px solid var(--border-color);
|
|
13
|
-
|
|
14
|
-
.middle {
|
|
15
|
-
display: flex;
|
|
16
|
-
justify-content: center;
|
|
17
|
-
align-items: center;
|
|
18
|
-
gap: 5px;
|
|
19
|
-
p {
|
|
20
|
-
text-align: center;
|
|
21
|
-
margin-bottom: 0px;
|
|
22
|
-
font-size: 16px;
|
|
23
|
-
font-weight: 400;
|
|
24
|
-
text-overflow: ellipsis;
|
|
25
|
-
white-space: nowrap;
|
|
26
|
-
overflow: hidden;
|
|
27
|
-
color: var(--text-color);
|
|
28
|
-
}
|
|
29
|
-
div{
|
|
30
|
-
display: flex;
|
|
31
|
-
justify-content: center;
|
|
32
|
-
align-items: center;
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
border-radius: 50%;
|
|
35
|
-
padding: 5px;
|
|
36
|
-
transition: 0.1s ease-in-out all;
|
|
37
|
-
&:hover {
|
|
38
|
-
background-color: rgba(0, 0, 0, 0.076);
|
|
39
|
-
}
|
|
40
|
-
svg{
|
|
41
|
-
fill: var(--text-color);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
& button {
|
|
47
|
-
max-width: 120px !important;
|
|
48
|
-
text-transform: capitalize;
|
|
49
|
-
color: var(--text-color);
|
|
50
|
-
font-size: 14px;
|
|
51
|
-
font-style: normal;
|
|
52
|
-
font-weight: 500;
|
|
53
|
-
line-height: normal;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
& .MuiGrid-item {
|
|
57
|
-
padding-top: 0 !important;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
& .left {
|
|
61
|
-
justify-content: flex-start !important;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
& .right {
|
|
65
|
-
gap: 10px !important;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.actionsBtnWrapper {
|
|
69
|
-
display: flex;
|
|
70
|
-
justify-content: flex-end;
|
|
71
|
-
align-items: center;
|
|
72
|
-
flex-wrap: wrap;
|
|
73
|
-
.download, .download-envelope, .clone, .add-page, .delete-page, .undo-page{
|
|
74
|
-
max-width: 120px;
|
|
75
|
-
min-height: 40px;
|
|
76
|
-
background-color: #fff;
|
|
77
|
-
color: var(--text-color);
|
|
78
|
-
border: 0.5px solid var(--border-color);
|
|
79
|
-
font-size: 15px;
|
|
80
|
-
font-weight: 500;
|
|
81
|
-
display: flex;
|
|
82
|
-
align-items: center;
|
|
83
|
-
justify-content: center;
|
|
84
|
-
min-height: 40px;
|
|
85
|
-
font-weight: 400;
|
|
86
|
-
max-width: auto;
|
|
87
|
-
min-width: 50px;
|
|
88
|
-
border-radius: 3px;
|
|
89
|
-
cursor: pointer;
|
|
90
|
-
&:hover{
|
|
91
|
-
background: #00000012 !important;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.add-page {
|
|
96
|
-
border-color: var(--text-color);
|
|
97
|
-
&:hover {
|
|
98
|
-
background: var(--text-color);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.delete-page {
|
|
103
|
-
border-color: var(--text-color);
|
|
104
|
-
&:hover {
|
|
105
|
-
background: var(--text-color);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.undo-page {
|
|
110
|
-
border-color: var(--primary-color);
|
|
111
|
-
&:hover {
|
|
112
|
-
background: var(--primary-color)12 !important;
|
|
113
|
-
}
|
|
114
|
-
svg {
|
|
115
|
-
fill: var(--primary-color);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.delete-icon {
|
|
120
|
-
fill: #dc3545 !important;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.templateCreateBtn {
|
|
125
|
-
display: flex;
|
|
126
|
-
justify-content: center;
|
|
127
|
-
align-items: center;
|
|
128
|
-
gap: 5px;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.v2-top-navigation-container {
|
|
133
|
-
background-color: white !important;
|
|
134
|
-
width: 100%;
|
|
135
|
-
padding: 30px 40px;
|
|
136
|
-
height: 100%;
|
|
137
|
-
// max-height: 84px;
|
|
138
|
-
margin: 0;
|
|
139
|
-
top: 0;
|
|
140
|
-
display: flex;
|
|
141
|
-
justify-content: center;
|
|
142
|
-
align-items: center;
|
|
143
|
-
border-bottom: 0.5px solid var(--border-color);
|
|
144
|
-
|
|
145
|
-
.create-template-title{
|
|
146
|
-
width: 100%;
|
|
147
|
-
font-size: 20px;
|
|
148
|
-
font-weight: 600;
|
|
149
|
-
color: #000000CC;
|
|
150
|
-
margin: 0;
|
|
151
|
-
|
|
152
|
-
@media (max-width: 960px) {
|
|
153
|
-
text-align: center;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.middle-v2 {
|
|
158
|
-
display: flex;
|
|
159
|
-
justify-content: center;
|
|
160
|
-
align-items: center;
|
|
161
|
-
gap: 5px;
|
|
162
|
-
|
|
163
|
-
@media (max-width: 960px) {
|
|
164
|
-
margin: 10px 0;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.input-container{
|
|
168
|
-
border-bottom: 0.5px solid var(--border-color);
|
|
169
|
-
display: flex;
|
|
170
|
-
align-items: center;
|
|
171
|
-
gap: 5px;
|
|
172
|
-
|
|
173
|
-
input{
|
|
174
|
-
font-size: 20px;
|
|
175
|
-
font-weight: 400;
|
|
176
|
-
color: var(--text-color);
|
|
177
|
-
border: none;
|
|
178
|
-
outline: none;
|
|
179
|
-
background-color: transparent;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.pencil-icon{
|
|
184
|
-
cursor: pointer;
|
|
185
|
-
width: 20px;
|
|
186
|
-
height: 20px;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
p {
|
|
190
|
-
text-align: center;
|
|
191
|
-
margin-bottom: 0px;
|
|
192
|
-
font-size: 20px;
|
|
193
|
-
font-weight: 400;
|
|
194
|
-
text-overflow: ellipsis;
|
|
195
|
-
white-space: nowrap;
|
|
196
|
-
overflow: hidden;
|
|
197
|
-
color: var(--text-color);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.icon-v2-container{
|
|
201
|
-
display: flex;
|
|
202
|
-
justify-content: center;
|
|
203
|
-
align-items: center;
|
|
204
|
-
cursor: pointer;
|
|
205
|
-
padding: 5px;
|
|
206
|
-
transition: 0.1s ease-in-out all;
|
|
207
|
-
|
|
208
|
-
svg{
|
|
209
|
-
fill: var(--text-color);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
& button {
|
|
215
|
-
max-width: 120px !important;
|
|
216
|
-
text-transform: capitalize;
|
|
217
|
-
color: var(--text-color);
|
|
218
|
-
font-size: 14px;
|
|
219
|
-
font-style: normal;
|
|
220
|
-
font-weight: 500;
|
|
221
|
-
line-height: normal;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
& .MuiGrid-item {
|
|
225
|
-
padding-top: 0 !important;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
& .left {
|
|
229
|
-
justify-content: flex-start !important;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
& .right {
|
|
233
|
-
gap: 12px !important;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.actionsBtnWrapper {
|
|
237
|
-
display: flex;
|
|
238
|
-
justify-content: flex-end;
|
|
239
|
-
align-items: center;
|
|
240
|
-
flex-wrap: wrap;
|
|
241
|
-
gap: 12px;
|
|
242
|
-
|
|
243
|
-
@media (max-width: 960px) {
|
|
244
|
-
justify-content: center;
|
|
245
|
-
}
|
|
246
|
-
.download, .download-envelope, .clone, .add-page, .delete-page, .undo-page{
|
|
247
|
-
max-width: 120px;
|
|
248
|
-
min-height: 40px;
|
|
249
|
-
background-color: #fff;
|
|
250
|
-
color: var(--text-color);
|
|
251
|
-
border: 0.5px solid var(--border-color);
|
|
252
|
-
font-size: 15px;
|
|
253
|
-
font-weight: 500;
|
|
254
|
-
display: flex;
|
|
255
|
-
align-items: center;
|
|
256
|
-
justify-content: center;
|
|
257
|
-
min-height: 44px;
|
|
258
|
-
font-weight: 400;
|
|
259
|
-
max-width: auto;
|
|
260
|
-
min-width: 48px;
|
|
261
|
-
border-radius: 4px;
|
|
262
|
-
cursor: pointer;
|
|
263
|
-
&:hover{
|
|
264
|
-
background: #00000012 !important;
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.add-page {
|
|
269
|
-
border-color: var(--text-color);
|
|
270
|
-
&:hover {
|
|
271
|
-
background: var(--text-color);
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
.delete-page {
|
|
276
|
-
border-color: var(--text-color);
|
|
277
|
-
&:hover {
|
|
278
|
-
background: var(--text-color);
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
.undo-page {
|
|
283
|
-
border-color: var(--primary-color);
|
|
284
|
-
&:hover {
|
|
285
|
-
background: var(--primary-color)12 !important;
|
|
286
|
-
}
|
|
287
|
-
svg {
|
|
288
|
-
fill: var(--primary-color);
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
.delete-icon {
|
|
293
|
-
fill: #dc3545 !important;
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.templateCreateBtn {
|
|
298
|
-
display: flex;
|
|
299
|
-
justify-content: center;
|
|
300
|
-
align-items: center;
|
|
301
|
-
gap: 5px;
|
|
302
|
-
}
|
|
303
|
-
}
|
package/src/importMeta.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
interface ImportMetaEnv {
|
|
2
|
-
readonly VITE_APP_ACCESS_TOKEN: string;
|
|
3
|
-
readonly VITE_APP_PLOTNO_API_KEY: string;
|
|
4
|
-
readonly VITE_APP_PUBLIC_API_KEY: string;
|
|
5
|
-
// Add other environment variables here if needed
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
interface ImportMeta {
|
|
9
|
-
readonly env: ImportMetaEnv;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare module '*.png' {
|
|
13
|
-
const value: string;
|
|
14
|
-
export default value;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
declare module '*.jpg' {
|
|
19
|
-
const value: string;
|
|
20
|
-
export default value;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
declare module '*.jpeg' {
|
|
24
|
-
const value: string;
|
|
25
|
-
export default value;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
declare module '*.scss' {
|
|
29
|
-
const content: any;
|
|
30
|
-
export default content;
|
|
31
|
-
}
|
package/src/index.scss
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--font-family: 'Inter';
|
|
3
|
-
--scrollbar-thumb-color: hsl(29, 100%, 88%);
|
|
4
|
-
--scrollbar-track-color: grey;
|
|
5
|
-
--primary-color: #ED5C2F;
|
|
6
|
-
--secondary-color: #FFF8EE;
|
|
7
|
-
--svg-color: #fdb515;
|
|
8
|
-
--svg-color-not-active: #fdecd3;
|
|
9
|
-
--text-color: #000;
|
|
10
|
-
--modal-background-color: #FFF8EE;
|
|
11
|
-
--notification-background-color: #EF7820;
|
|
12
|
-
--notification-text-color: #fff;
|
|
13
|
-
--border-color: #303030;
|
|
14
|
-
--error-color: #ff0000;
|
|
15
|
-
--rt-opacity: 1 !important;
|
|
16
|
-
|
|
17
|
-
.builder-wrapper {
|
|
18
|
-
font-family: var(--font-family) !important;
|
|
19
|
-
margin: 0;
|
|
20
|
-
|
|
21
|
-
&::-webkit-scrollbar {
|
|
22
|
-
width: 10px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&::-webkit-scrollbar-track {
|
|
26
|
-
background: var(--scrollbar-track-color) !important;
|
|
27
|
-
border-radius: 3px;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&::-webkit-scrollbar-thumb {
|
|
31
|
-
background: var(--scrollbar-thumb-color) !important;
|
|
32
|
-
border-radius: 3px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@supports not selector(::-webkit-scrollbar) {
|
|
36
|
-
body {
|
|
37
|
-
scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.bp5-navbar {
|
|
42
|
-
z-index: auto !important;
|
|
43
|
-
border-bottom: 1px solid rgba(17, 20, 24, 0.1019607843) !important;
|
|
44
|
-
|
|
45
|
-
.bp5-card {
|
|
46
|
-
color: var(--text-color);
|
|
47
|
-
background-color: transparent;
|
|
48
|
-
}
|
|
49
|
-
.polotno-side-tabs-container {
|
|
50
|
-
.polotno-side-tabs-inner {
|
|
51
|
-
@media (width <= 800px) {
|
|
52
|
-
justify-content: center !important;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.polotno-font-item{
|
|
59
|
-
text-overflow: ellipsis;
|
|
60
|
-
overflow: hidden;
|
|
61
|
-
white-space: nowrap;
|
|
62
|
-
width: 100%;
|
|
63
|
-
display: block !important;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.go4160152499,
|
|
67
|
-
.polotno-workspace-inner,
|
|
68
|
-
.polotno-panel-container,
|
|
69
|
-
.polotno-panel-container > div,
|
|
70
|
-
.polotno-panel-container > div > div,
|
|
71
|
-
.polotno-panel-container > div > div > div {
|
|
72
|
-
&::-webkit-scrollbar {
|
|
73
|
-
width: 10px;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
&::-webkit-scrollbar-track {
|
|
77
|
-
background: var(--scrollbar-track-color) !important;
|
|
78
|
-
border-radius: 3px;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
&::-webkit-scrollbar-thumb {
|
|
82
|
-
background: var(--scrollbar-thumb-color) !important;
|
|
83
|
-
border-radius: 3px;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
@supports not selector(::-webkit-scrollbar) {
|
|
87
|
-
body {
|
|
88
|
-
scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.polotno-panel-container > div > div {
|
|
94
|
-
color: #000;
|
|
95
|
-
p {
|
|
96
|
-
color: #000;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.no-scroll{
|
|
102
|
-
overflow: hidden;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.fields-search{
|
|
106
|
-
position: sticky;
|
|
107
|
-
top: 0;
|
|
108
|
-
background-color: #fff;
|
|
109
|
-
padding: 10px 0;
|
|
110
|
-
height: 100%;
|
|
111
|
-
max-height: 40px;
|
|
112
|
-
display: flex;
|
|
113
|
-
justify-content: center;
|
|
114
|
-
align-items: center;
|
|
115
|
-
z-index: 9;
|
|
116
|
-
margin: 0 !important;
|
|
117
|
-
span{
|
|
118
|
-
position: absolute;
|
|
119
|
-
left: 0px;
|
|
120
|
-
top: 5px;
|
|
121
|
-
}
|
|
122
|
-
input{
|
|
123
|
-
margin: 0 !important;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
.dynamic-content{
|
|
127
|
-
margin-top: 10px !important;
|
|
128
|
-
overflow: auto !important;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
}
|
package/src/index.tsx
DELETED
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ReactDOM from 'react-dom/client';
|
|
3
|
-
import { BrowserRouter as Router } from 'react-router-dom';
|
|
4
|
-
import { Provider } from 'react-redux';
|
|
5
|
-
import store from './redux/store';
|
|
6
|
-
import App from './App';
|
|
7
|
-
|
|
8
|
-
// font families
|
|
9
|
-
import '@fontsource/inter/200.css';
|
|
10
|
-
import '@fontsource/inter/300.css';
|
|
11
|
-
import '@fontsource/inter/400.css';
|
|
12
|
-
import '@fontsource/inter/500.css';
|
|
13
|
-
import '@fontsource/inter/600.css';
|
|
14
|
-
import '@fontsource/inter/700.css';
|
|
15
|
-
import '@fontsource/inter/800.css';
|
|
16
|
-
|
|
17
|
-
// utils
|
|
18
|
-
import { CustomCSSProperties } from './utils/customStyles';
|
|
19
|
-
import { setEnv, setIsSandbox, setPublicApiKey } from './utils/helper';
|
|
20
|
-
import { AddOnTypes, TemplateTypes } from './utils/types';
|
|
21
|
-
import { SDK_VERSION } from '../version';
|
|
22
|
-
|
|
23
|
-
// Function to dynamically load stylesheets based on sandbox mode
|
|
24
|
-
const loadStylesheet = (currentTheme: string) => {
|
|
25
|
-
if (currentTheme === 'v2') {
|
|
26
|
-
import('./v2Theme.scss');
|
|
27
|
-
} else {
|
|
28
|
-
import('./index.scss');
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
interface TemplateBuilderProps {
|
|
33
|
-
container: HTMLElement | null;
|
|
34
|
-
secretKey: string;
|
|
35
|
-
publicApiKey: string;
|
|
36
|
-
platformName?: string | null;
|
|
37
|
-
templateGalleryModal?: boolean;
|
|
38
|
-
createTemplateRoute?: string | null;
|
|
39
|
-
templateBuilderRoute?: string | null;
|
|
40
|
-
olcTemplate?: Record<string, any>;
|
|
41
|
-
designerTemplateQuery?: Record<string, any> | null;
|
|
42
|
-
sandbox?: boolean;
|
|
43
|
-
allowSenderFields?: boolean;
|
|
44
|
-
allowPropertyFields?: boolean;
|
|
45
|
-
excludedFields?: string[] | null;
|
|
46
|
-
designerQueryAmount?: string | number;
|
|
47
|
-
allowedAddOns?: AddOnTypes[] | string[] | null | undefined;
|
|
48
|
-
allowedTemplateSections?: TemplateTypes[] | string[] | null | undefined;
|
|
49
|
-
env?: string;
|
|
50
|
-
restrictedProducts?: number[] | null | undefined;
|
|
51
|
-
disallowedProducts?: string[] | null | undefined;
|
|
52
|
-
propertyOfferCost?: number;
|
|
53
|
-
customPropertyOfferCost?: number;
|
|
54
|
-
gsvCost?: number;
|
|
55
|
-
allowAdditionalPage?: boolean;
|
|
56
|
-
showTemplateTypesPage?: boolean;
|
|
57
|
-
currentTheme?: string | null | undefined;
|
|
58
|
-
onReturnAndNavigate?: () => void;
|
|
59
|
-
onCreateCustomTemplateQuery?: (payload: any) => Promise<any>;
|
|
60
|
-
onGetOneTemplate?: (payload: any) => Promise<any>;
|
|
61
|
-
onGetTemplates?: (payload: any) => Promise<any>;
|
|
62
|
-
onGetCustomFields?: () => Promise<any>;
|
|
63
|
-
onDuplicateTemplate?: (payload: any) => Promise<any>;
|
|
64
|
-
onGetBrandingImages?: (payload: any) => Promise<any>;
|
|
65
|
-
onDeleteBrandingImage?: (id: string | number) => Promise<void>;
|
|
66
|
-
onUploadBrandingImage?: (payload: any) => Promise<any>;
|
|
67
|
-
onGetQRCodes?: (payload: any) => Promise<any>;
|
|
68
|
-
onDeleteQRCodes?: (id: string | number) => Promise<void>;
|
|
69
|
-
onUploadQRCode?: (payload: any) => Promise<any>;
|
|
70
|
-
onEditQRCode?: (payload: any) => Promise<any>;
|
|
71
|
-
onSubmit?: (payload: any) => Promise<any>;
|
|
72
|
-
styles?: {
|
|
73
|
-
root?: CustomCSSProperties;
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
const TemplateBuilder = ({
|
|
78
|
-
container,
|
|
79
|
-
secretKey,
|
|
80
|
-
publicApiKey,
|
|
81
|
-
platformName,
|
|
82
|
-
templateGalleryModal = true,
|
|
83
|
-
createTemplateRoute,
|
|
84
|
-
templateBuilderRoute,
|
|
85
|
-
olcTemplate,
|
|
86
|
-
designerTemplateQuery,
|
|
87
|
-
sandbox,
|
|
88
|
-
allowSenderFields,
|
|
89
|
-
allowPropertyFields,
|
|
90
|
-
allowAdditionalPage,
|
|
91
|
-
excludedFields,
|
|
92
|
-
designerQueryAmount,
|
|
93
|
-
allowedAddOns,
|
|
94
|
-
allowedTemplateSections,
|
|
95
|
-
env,
|
|
96
|
-
restrictedProducts,
|
|
97
|
-
disallowedProducts,
|
|
98
|
-
propertyOfferCost,
|
|
99
|
-
customPropertyOfferCost,
|
|
100
|
-
gsvCost,
|
|
101
|
-
showTemplateTypesPage,
|
|
102
|
-
currentTheme,
|
|
103
|
-
onReturnAndNavigate,
|
|
104
|
-
onCreateCustomTemplateQuery,
|
|
105
|
-
onGetOneTemplate,
|
|
106
|
-
onGetTemplates,
|
|
107
|
-
onGetCustomFields,
|
|
108
|
-
onDuplicateTemplate,
|
|
109
|
-
onGetBrandingImages,
|
|
110
|
-
onDeleteBrandingImage,
|
|
111
|
-
onUploadBrandingImage,
|
|
112
|
-
onGetQRCodes,
|
|
113
|
-
onDeleteQRCodes,
|
|
114
|
-
onUploadQRCode,
|
|
115
|
-
onEditQRCode,
|
|
116
|
-
onSubmit,
|
|
117
|
-
styles,
|
|
118
|
-
}: TemplateBuilderProps): void => {
|
|
119
|
-
if (!container) {
|
|
120
|
-
throw new Error('Root element not found');
|
|
121
|
-
}
|
|
122
|
-
if (!secretKey) {
|
|
123
|
-
throw new Error('secretKey not found');
|
|
124
|
-
}
|
|
125
|
-
if (!publicApiKey) {
|
|
126
|
-
throw new Error('publicApiKey not found');
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// Load appropriate stylesheet based on sandbox mode
|
|
130
|
-
loadStylesheet(currentTheme || 'default');
|
|
131
|
-
|
|
132
|
-
if (sandbox) {
|
|
133
|
-
setIsSandbox(sandbox);
|
|
134
|
-
}
|
|
135
|
-
if (env && SDK_VERSION.includes('beta')) {
|
|
136
|
-
setEnv(env);
|
|
137
|
-
}
|
|
138
|
-
setPublicApiKey(publicApiKey);
|
|
139
|
-
const root = ReactDOM.createRoot(container);
|
|
140
|
-
root.render(
|
|
141
|
-
<>
|
|
142
|
-
<Provider store={store}>
|
|
143
|
-
<Router>
|
|
144
|
-
<App
|
|
145
|
-
secretKey={secretKey}
|
|
146
|
-
styles={styles}
|
|
147
|
-
olcTemplate={olcTemplate}
|
|
148
|
-
designerTemplateQuery={designerTemplateQuery}
|
|
149
|
-
platformName={platformName}
|
|
150
|
-
templateGalleryModal={templateGalleryModal}
|
|
151
|
-
createTemplateRoute={createTemplateRoute}
|
|
152
|
-
templateBuilderRoute={templateBuilderRoute}
|
|
153
|
-
allowSenderFields={allowSenderFields}
|
|
154
|
-
allowPropertyFields={allowPropertyFields}
|
|
155
|
-
allowAdditionalPage={allowAdditionalPage}
|
|
156
|
-
excludedFields={excludedFields}
|
|
157
|
-
designerQueryAmount={designerQueryAmount}
|
|
158
|
-
allowedAddOns={allowedAddOns}
|
|
159
|
-
allowedTemplateSections={allowedTemplateSections}
|
|
160
|
-
restrictedProducts={restrictedProducts}
|
|
161
|
-
disallowedProducts={disallowedProducts}
|
|
162
|
-
propertyOfferCost={propertyOfferCost}
|
|
163
|
-
customPropertyOfferCost={customPropertyOfferCost}
|
|
164
|
-
gsvCost={gsvCost}
|
|
165
|
-
showTemplateTypesPage={showTemplateTypesPage}
|
|
166
|
-
currentTheme={currentTheme}
|
|
167
|
-
onReturnAndNavigate={onReturnAndNavigate}
|
|
168
|
-
onCreateCustomTemplateQuery={onCreateCustomTemplateQuery}
|
|
169
|
-
onGetOneTemplate={onGetOneTemplate}
|
|
170
|
-
onGetTemplates={onGetTemplates}
|
|
171
|
-
onGetCustomFields={onGetCustomFields}
|
|
172
|
-
onDuplicateTemplate={onDuplicateTemplate}
|
|
173
|
-
onGetBrandingImages={onGetBrandingImages}
|
|
174
|
-
onDeleteBrandingImage={onDeleteBrandingImage}
|
|
175
|
-
onUploadBrandingImage={onUploadBrandingImage}
|
|
176
|
-
onGetQRCodes={onGetQRCodes}
|
|
177
|
-
onDeleteQRCodes={onDeleteQRCodes}
|
|
178
|
-
onUploadQRCode={onUploadQRCode}
|
|
179
|
-
onEditQRCode={onEditQRCode}
|
|
180
|
-
onSubmit={onSubmit}
|
|
181
|
-
/>
|
|
182
|
-
</Router>
|
|
183
|
-
</Provider>
|
|
184
|
-
</>
|
|
185
|
-
);
|
|
186
|
-
|
|
187
|
-
//@ts-ignore
|
|
188
|
-
return {
|
|
189
|
-
destroy() {
|
|
190
|
-
console.log("React template builder destroyed");
|
|
191
|
-
root.unmount();
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
// Example to run the project locally for development. Comment out these lines when building the application
|
|
197
|
-
// const rootElement = document.getElementById('root');
|
|
198
|
-
// if (rootElement) {
|
|
199
|
-
// console.log("React SDK Loaded");
|
|
200
|
-
// TemplateBuilder({
|
|
201
|
-
// container: rootElement,
|
|
202
|
-
// secretKey: import.meta.env.VITE_APP_PLOTNO_API_KEY,
|
|
203
|
-
// publicApiKey: import.meta.env.VITE_APP_PUBLIC_API_KEY,
|
|
204
|
-
// sandbox: true,
|
|
205
|
-
// allowSenderFields: true,
|
|
206
|
-
// allowPropertyFields: true,
|
|
207
|
-
// templateGalleryModal: true,
|
|
208
|
-
// designerQueryAmount: 175,
|
|
209
|
-
// allowedAddOns: ['property_offer','gsv', 'custom_property_offer'],
|
|
210
|
-
// propertyOfferCost: 2.03,
|
|
211
|
-
// customPropertyOfferCost: 33,
|
|
212
|
-
// gsvCost: 10.5,
|
|
213
|
-
// excludedFields: ['{{C.FIRST_NAME}}', '{{C.ADDRESS_1}}', '{{SPF.FIRST_NAME}}'],
|
|
214
|
-
// showTemplateTypesPage: true,
|
|
215
|
-
// currentTheme: 'v2',
|
|
216
|
-
// env: 'staging',
|
|
217
|
-
// // onGetBrandingImages: getAllBrandingImages,
|
|
218
|
-
// // onDeleteBrandingImage: deleteBrandingImage,
|
|
219
|
-
// // onUploadBrandingImage: uploadBrandingImaage,
|
|
220
|
-
// // onGetQRCodes: getAllQRCodes,
|
|
221
|
-
// // onDeleteQRCodes: deleteQRCode,
|
|
222
|
-
// // onUploadQRCode: uploadQRCode,
|
|
223
|
-
// // onEditQRCode: updateQRCode,
|
|
224
|
-
// // allowedTemplateSections: ['my_templates'],
|
|
225
|
-
// // onGetCustomFields: getAllCustomFields,
|
|
226
|
-
// restrictedProducts: [38 ],
|
|
227
|
-
// // disallowedProducts: ['real_penned_letter', 'postcards'],
|
|
228
|
-
// // olcTemplate: olcTemplateData,
|
|
229
|
-
// // onGetOneTemplate: getOneTemplate,
|
|
230
|
-
// onGetTemplates: async () => {},
|
|
231
|
-
// // onSubmit: createTemplate,
|
|
232
|
-
// styles: {}
|
|
233
|
-
// });
|
|
234
|
-
// } else {
|
|
235
|
-
// console.error("Root element '#root' not found in the document.");
|
|
236
|
-
// }
|
|
237
|
-
|
|
238
|
-
export default TemplateBuilder;
|