@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.
- package/.eslintignore +1 -0
- package/.eslintrc.cjs +18 -0
- package/.eslintrc.yml +47 -0
- package/.github/workflows/publish-beta.yml +154 -0
- package/.github/workflows/publish-production.yml +143 -0
- package/.prettierignore +3 -0
- package/.prettierrc.yml +5 -0
- package/CHANGELOG.md +4 -0
- package/babel.config.json +10 -0
- package/build/index.js +82 -82
- package/build/index.js.map +1 -1
- package/build/types/version.d.ts +1 -1
- package/examples/.eslintrc.yml +4 -0
- package/index.html +18 -0
- package/package.json +1 -1
- package/public/vite.svg +1 -0
- package/src/App.tsx +209 -0
- package/src/assets/Fonts/Lexi-Regular.ttf +0 -0
- package/src/assets/images/create-template/prebuilt.svg +13 -0
- package/src/assets/images/create-template/scratch.svg +4 -0
- package/src/assets/images/input/cancel.tsx +20 -0
- package/src/assets/images/input/search.tsx +20 -0
- package/src/assets/images/input/select-cancel.tsx +17 -0
- package/src/assets/images/modal-icons/add.tsx +36 -0
- package/src/assets/images/modal-icons/cancel-file.tsx +12 -0
- package/src/assets/images/modal-icons/cancel-input.tsx +13 -0
- package/src/assets/images/modal-icons/cancel.tsx +35 -0
- package/src/assets/images/modal-icons/close-new.svg +3 -0
- package/src/assets/images/modal-icons/confirm-close-icon.tsx +14 -0
- package/src/assets/images/modal-icons/confirm-new.tsx +22 -0
- package/src/assets/images/modal-icons/confirm.svg +12 -0
- package/src/assets/images/modal-icons/cross.tsx +23 -0
- package/src/assets/images/modal-icons/del.tsx +19 -0
- package/src/assets/images/modal-icons/design-icon.tsx +22 -0
- package/src/assets/images/modal-icons/doc.tsx +43 -0
- package/src/assets/images/modal-icons/docx.tsx +43 -0
- package/src/assets/images/modal-icons/envelope-icon.tsx +26 -0
- package/src/assets/images/modal-icons/info.tsx +19 -0
- package/src/assets/images/modal-icons/jpeg.tsx +43 -0
- package/src/assets/images/modal-icons/jpg.tsx +43 -0
- package/src/assets/images/modal-icons/modal-cros.svg +4 -0
- package/src/assets/images/modal-icons/modal-cross.tsx +37 -0
- package/src/assets/images/modal-icons/new-cancel.tsx +11 -0
- package/src/assets/images/modal-icons/order-download.tsx +42 -0
- package/src/assets/images/modal-icons/pdf.tsx +51 -0
- package/src/assets/images/modal-icons/png.tsx +43 -0
- package/src/assets/images/modal-icons/save.tsx +23 -0
- package/src/assets/images/modal-icons/template-copy.tsx +25 -0
- package/src/assets/images/modal-icons/tool-cancel.tsx +25 -0
- package/src/assets/images/products/bi-new.svg +23 -0
- package/src/assets/images/products/left-arrow.svg +17 -0
- package/src/assets/images/products/personal-new.tsx +31 -0
- package/src/assets/images/products/postcard-new.tsx +27 -0
- package/src/assets/images/products/professional-new.tsx +24 -0
- package/src/assets/images/products/real-new.tsx +30 -0
- package/src/assets/images/products/right-arrow.svg +17 -0
- package/src/assets/images/products/snap-new.svg +31 -0
- package/src/assets/images/templates/actions.svg +3 -0
- package/src/assets/images/templates/address-block-icon.tsx +62 -0
- package/src/assets/images/templates/archive.svg +3 -0
- package/src/assets/images/templates/arrow-down.tsx +27 -0
- package/src/assets/images/templates/back-arrow.tsx +19 -0
- package/src/assets/images/templates/bi-fold-self-mailers.tsx +28 -0
- package/src/assets/images/templates/check.svg +3 -0
- package/src/assets/images/templates/code.svg +10 -0
- package/src/assets/images/templates/content-copy-icon.tsx +24 -0
- package/src/assets/images/templates/custom-add-on-icon.tsx +18 -0
- package/src/assets/images/templates/custom-qr-section-icon.tsx +9 -0
- package/src/assets/images/templates/custom-template.tsx +23 -0
- package/src/assets/images/templates/designer.tsx +43 -0
- package/src/assets/images/templates/dot.tsx +22 -0
- package/src/assets/images/templates/download-v2.svg +4 -0
- package/src/assets/images/templates/download.svg +4 -0
- package/src/assets/images/templates/dummy-template.tsx +76 -0
- package/src/assets/images/templates/dynamic-field.tsx +119 -0
- package/src/assets/images/templates/edit-pencil-icon.tsx +21 -0
- package/src/assets/images/templates/edit.svg +3 -0
- package/src/assets/images/templates/epo-icon.tsx +16 -0
- package/src/assets/images/templates/field.tsx +29 -0
- package/src/assets/images/templates/gsv-icon.tsx +31 -0
- package/src/assets/images/templates/info-icon.tsx +37 -0
- package/src/assets/images/templates/left-arrow.svg +17 -0
- package/src/assets/images/templates/pencil.svg +3 -0
- package/src/assets/images/templates/personal-letter.tsx +53 -0
- package/src/assets/images/templates/postcard.tsx +32 -0
- package/src/assets/images/templates/professional-letter.tsx +53 -0
- package/src/assets/images/templates/qr-code.tsx +13 -0
- package/src/assets/images/templates/real-penned-letters.tsx +57 -0
- package/src/assets/images/templates/right-arrow.svg +17 -0
- package/src/assets/images/templates/size-image-lg.tsx +20 -0
- package/src/assets/images/templates/size-image-mid.tsx +20 -0
- package/src/assets/images/templates/size-image-xl.tsx +20 -0
- package/src/assets/images/templates/size-image.tsx +20 -0
- package/src/assets/images/templates/snap-pack.tsx +67 -0
- package/src/assets/images/templates/template-default-design.tsx +21 -0
- package/src/assets/images/templates/trash-upload.svg +3 -0
- package/src/assets/images/templates/trash.svg +3 -0
- package/src/assets/images/templates/tri-fold-self-mailers.tsx +93 -0
- package/src/assets/images/templates/upload-image.svg +10 -0
- package/src/assets/images/templates/x.svg +3 -0
- package/src/assets/images/thumbnails/one.svg +9 -0
- package/src/assets/images/tooltip/tool-arrow.tsx +25 -0
- package/src/components/CreateTemplate/V2/index.tsx +525 -0
- package/src/components/CreateTemplate/V2/styles.scss +372 -0
- package/src/components/CreateTemplate/index.tsx +508 -0
- package/src/components/CreateTemplate/styles.scss +404 -0
- package/src/components/GenericUIBlocks/Button/index.tsx +54 -0
- package/src/components/GenericUIBlocks/Button/styles.scss +43 -0
- package/src/components/GenericUIBlocks/CircularProgress/index.tsx +18 -0
- package/src/components/GenericUIBlocks/CircularProgress/styles.scss +93 -0
- package/src/components/GenericUIBlocks/CustomTooltip/index.tsx +88 -0
- package/src/components/GenericUIBlocks/CustomTooltip/styles.scss +19 -0
- package/src/components/GenericUIBlocks/Dialog/V2/index.tsx +227 -0
- package/src/components/GenericUIBlocks/Dialog/V2/styles.scss +289 -0
- package/src/components/GenericUIBlocks/Dialog/index.tsx +185 -0
- package/src/components/GenericUIBlocks/Dialog/styles.scss +227 -0
- package/src/components/GenericUIBlocks/Divider/index.tsx +12 -0
- package/src/components/GenericUIBlocks/Divider/styles.scss +7 -0
- package/src/components/GenericUIBlocks/GeneralSelect/index.tsx +114 -0
- package/src/components/GenericUIBlocks/GeneralSelect/styles.scss +406 -0
- package/src/components/GenericUIBlocks/GeneralTooltip/index.tsx +25 -0
- package/src/components/GenericUIBlocks/GeneralTooltip/styles.scss +20 -0
- package/src/components/GenericUIBlocks/GenericSnackbar/Toast/index.tsx +91 -0
- package/src/components/GenericUIBlocks/GenericSnackbar/Toast/styles.scss +92 -0
- package/src/components/GenericUIBlocks/Grid/index.tsx +82 -0
- package/src/components/GenericUIBlocks/Input/index.tsx +269 -0
- package/src/components/GenericUIBlocks/Input/styles.scss +332 -0
- package/src/components/GenericUIBlocks/Tabs/index.tsx +71 -0
- package/src/components/GenericUIBlocks/Tabs/styles.scss +42 -0
- package/src/components/GenericUIBlocks/Typography/index.tsx +18 -0
- package/src/components/GenericUIBlocks/Typography/styles.scss +27 -0
- package/src/components/SidePanel/CustomAddOns/index.tsx +342 -0
- package/src/components/SidePanel/CustomAddOns/styles.scss +86 -0
- package/src/components/SidePanel/CustomBlockColors/index.tsx +211 -0
- package/src/components/SidePanel/CustomBlockColors/styles.scss +80 -0
- package/src/components/SidePanel/CustomFields/customFieldSection.tsx +547 -0
- package/src/components/SidePanel/CustomFields/styles.scss +64 -0
- package/src/components/SidePanel/CustomQRCode/V2/QRCodeModal/index.tsx +172 -0
- package/src/components/SidePanel/CustomQRCode/V2/QRCodeModal/styles.scss +46 -0
- package/src/components/SidePanel/CustomQRCode/index.tsx +1070 -0
- package/src/components/SidePanel/CustomQRCode/styles.scss +149 -0
- package/src/components/SidePanel/CustomUploads/V2/index.tsx +542 -0
- package/src/components/SidePanel/CustomUploads/V2/styles.scss +267 -0
- package/src/components/SidePanel/CustomUploads/index.tsx +301 -0
- package/src/components/SidePanel/Templates/ModalGallery/HireDesigner/index.tsx +424 -0
- package/src/components/SidePanel/Templates/ModalGallery/HireDesigner/styles.scss +180 -0
- package/src/components/SidePanel/Templates/ModalGallery/V2/index.tsx +235 -0
- package/src/components/SidePanel/Templates/ModalGallery/V2/styles.scss +244 -0
- package/src/components/SidePanel/Templates/ModalGallery/index.tsx +231 -0
- package/src/components/SidePanel/Templates/SideBarGallery/index.tsx +233 -0
- package/src/components/SidePanel/Templates/SideBarGallery/styles.scss +152 -0
- package/src/components/SidePanel/Templates/TemplatesCard/V2/index.tsx +149 -0
- package/src/components/SidePanel/Templates/TemplatesCard/V2/styles.scss +156 -0
- package/src/components/SidePanel/Templates/TemplatesCard/index.tsx +160 -0
- package/src/components/SidePanel/Templates/TemplatesCard/styles.scss +98 -0
- package/src/components/SidePanel/Templates/customTemplateSection.tsx +793 -0
- package/src/components/SidePanel/Templates/styles.scss +244 -0
- package/src/components/SidePanel/index.tsx +160 -0
- package/src/components/TemplateBuilder/index.tsx +585 -0
- package/src/components/TemplateBuilder/styles.scss +100 -0
- package/src/components/TemplateTypes/index.tsx +96 -0
- package/src/components/TemplateTypes/styles.scss +91 -0
- package/src/components/TopNavigation/ConfirmNavigateDialog/index.tsx +81 -0
- package/src/components/TopNavigation/ConfirmNavigateDialog/styles.scss +123 -0
- package/src/components/TopNavigation/DuplicateTemplateModal.tsx +103 -0
- package/src/components/TopNavigation/EditTemplateNameModel/index.tsx +71 -0
- package/src/components/TopNavigation/EditTemplateNameModel/styles.scss +88 -0
- package/src/components/TopNavigation/SaveTemplateModel/index.tsx +201 -0
- package/src/components/TopNavigation/SaveTemplateModel/styles.scss +128 -0
- package/src/components/TopNavigation/index.tsx +938 -0
- package/src/components/TopNavigation/styles.scss +303 -0
- package/src/importMeta.d.ts +31 -0
- package/src/index.scss +131 -0
- package/src/index.tsx +238 -0
- package/src/libs/test.ts +7 -0
- package/src/redux/actions/action-types.ts +52 -0
- package/src/redux/actions/customQRCodeActions.ts +54 -0
- package/src/redux/actions/snackbarActions.ts +16 -0
- package/src/redux/actions/templateActions.ts +236 -0
- package/src/redux/reducers/customFieldReducer.ts +99 -0
- package/src/redux/reducers/customQRCodeReducer.ts +58 -0
- package/src/redux/reducers/index.ts +15 -0
- package/src/redux/reducers/snackbarReducer.ts +40 -0
- package/src/redux/reducers/templateReducer.ts +485 -0
- package/src/redux/store.ts +18 -0
- package/src/styles/colors.scss +61 -0
- package/src/test/mocks.js +89 -0
- package/src/test/setupJest.js +1 -0
- package/src/utils/api.ts +36 -0
- package/src/utils/constants.ts +182 -0
- package/src/utils/customStyles.ts +45 -0
- package/src/utils/fetchWrapper.ts +73 -0
- package/src/utils/fonts.json +1597 -0
- package/src/utils/helper.ts +205 -0
- package/src/utils/local-storage.ts +15 -0
- package/src/utils/message.ts +162 -0
- package/src/utils/products.ts +186 -0
- package/src/utils/template-builder.ts +328 -0
- package/src/utils/templateIdentifierArea/biFold.ts +107 -0
- package/src/utils/templateIdentifierArea/index.ts +35 -0
- package/src/utils/templateIdentifierArea/personal.ts +107 -0
- package/src/utils/templateIdentifierArea/postCards.ts +163 -0
- package/src/utils/templateIdentifierArea/professional.ts +125 -0
- package/src/utils/templateIdentifierArea/snapPack.ts +107 -0
- package/src/utils/templateIdentifierArea/triFold.ts +107 -0
- package/src/utils/templateRestrictedArea/biFold.ts +329 -0
- package/src/utils/templateRestrictedArea/nonWindowProfessional.ts +90 -0
- package/src/utils/templateRestrictedArea/personal.ts +90 -0
- package/src/utils/templateRestrictedArea/postCard.ts +334 -0
- package/src/utils/templateRestrictedArea/postCardJumbo.tsx +408 -0
- package/src/utils/templateRestrictedArea/professional.ts +318 -0
- package/src/utils/templateRestrictedArea/realPenned.ts +233 -0
- package/src/utils/templateRestrictedArea/snapPack.ts +1009 -0
- package/src/utils/templateRestrictedArea/triFold.ts +330 -0
- package/src/utils/templateSafetyBorders/biFold.ts +91 -0
- package/src/utils/templateSafetyBorders/index.ts +43 -0
- package/src/utils/templateSafetyBorders/personal.ts +41 -0
- package/src/utils/templateSafetyBorders/postCards.ts +259 -0
- package/src/utils/templateSafetyBorders/professional.ts +78 -0
- package/src/utils/templateSafetyBorders/snapPack.ts +165 -0
- package/src/utils/templateSafetyBorders/triFold.ts +114 -0
- package/src/utils/templateSafetyBorders/types.d.ts +68 -0
- package/src/utils/types.ts +12 -0
- package/src/v2Theme.scss +142 -0
- package/tsconfig.json +29 -0
- package/tsconfig.node.json +12 -0
- package/update-version.js +23 -0
- package/version.js +1 -0
- package/vite.config.ts +8 -0
- package/webpack.config.js +80 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
.polotno-panel-container {
|
|
2
|
+
overflow-y: auto;
|
|
3
|
+
|
|
4
|
+
& .custom-template-section {
|
|
5
|
+
display: 'flex';
|
|
6
|
+
flex-wrap: 'wrap';
|
|
7
|
+
overflow-y: 'scroll';
|
|
8
|
+
|
|
9
|
+
& .title {
|
|
10
|
+
& span {
|
|
11
|
+
font-size: 16px;
|
|
12
|
+
font-weight: 600;
|
|
13
|
+
color: #ed5c2f;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
@mixin designCommonStyles {
|
|
17
|
+
width: 320px;
|
|
18
|
+
height: 224px;
|
|
19
|
+
border-radius: 3px;
|
|
20
|
+
border: 0.5px solid var(--border-color);
|
|
21
|
+
margin: 10px auto;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
}
|
|
24
|
+
& .default-design {
|
|
25
|
+
@include designCommonStyles;
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
& p {
|
|
31
|
+
color: #303030;
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
font-size: 12px;
|
|
34
|
+
line-height: 14.52px;
|
|
35
|
+
margin-top: 5px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
& .design-template {
|
|
39
|
+
@include designCommonStyles;
|
|
40
|
+
& img {
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 100%;
|
|
43
|
+
object-fit: cover;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.dummy-image {
|
|
49
|
+
padding: 85px;
|
|
50
|
+
object-fit: fill !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.MuiTabs-indicator {
|
|
54
|
+
background-color: #ed5c2f !important;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.templateTabsWrapper {
|
|
58
|
+
width: 100%;
|
|
59
|
+
max-width: 480px;
|
|
60
|
+
|
|
61
|
+
@media (width <= 800px) {
|
|
62
|
+
max-width: none !important;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.templateTabs {
|
|
66
|
+
.MuiTabScrollButton-root {
|
|
67
|
+
width: 15px;
|
|
68
|
+
opacity: 1 !important;
|
|
69
|
+
&:hover {
|
|
70
|
+
svg {
|
|
71
|
+
color: #ed5c2f !important;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
.Mui-disabled {
|
|
75
|
+
opacity: 1 !important;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.noTemplateText {
|
|
82
|
+
height: 100%;
|
|
83
|
+
min-height: 200px;
|
|
84
|
+
display: flex;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
align-items: center;
|
|
87
|
+
width: 100%;
|
|
88
|
+
p {
|
|
89
|
+
color: var(--text-color);
|
|
90
|
+
font-size: 18px;
|
|
91
|
+
font-style: normal;
|
|
92
|
+
font-weight: 400;
|
|
93
|
+
line-height: normal;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.searchWrapper {
|
|
98
|
+
margin: 16px 0;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.topBar {
|
|
103
|
+
display: flex;
|
|
104
|
+
justify-content: space-between;
|
|
105
|
+
align-items: center;
|
|
106
|
+
flex-wrap: wrap;
|
|
107
|
+
border-bottom: 0.5px solid #30303080;
|
|
108
|
+
padding: 0 35px 20px;
|
|
109
|
+
width: 100%;
|
|
110
|
+
position: relative;
|
|
111
|
+
gap: 10px;
|
|
112
|
+
|
|
113
|
+
@media (width <= 1125px){
|
|
114
|
+
flex-direction: column-reverse;
|
|
115
|
+
justify-content: center;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@media (width <= 768px){
|
|
119
|
+
padding: 0 15px 20px;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
.selectBar {
|
|
123
|
+
display: flex;
|
|
124
|
+
justify-content: space-between;
|
|
125
|
+
align-items: center;
|
|
126
|
+
width: 100%;
|
|
127
|
+
margin-top: 25px;
|
|
128
|
+
padding: 0 35px;
|
|
129
|
+
|
|
130
|
+
p {
|
|
131
|
+
color: #6A6565 !important;
|
|
132
|
+
font-weight: 400 !important;
|
|
133
|
+
font-size: 14px !important;
|
|
134
|
+
margin: 0;
|
|
135
|
+
width: 100%;
|
|
136
|
+
text-align: end;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.templatesContent {
|
|
141
|
+
display: flex;
|
|
142
|
+
justify-content: flex-start;
|
|
143
|
+
align-items: flex-start;
|
|
144
|
+
flex-direction: row;
|
|
145
|
+
flex-wrap: wrap;
|
|
146
|
+
padding: 15px 35px 0;
|
|
147
|
+
gap: 25px;
|
|
148
|
+
height: 100%;
|
|
149
|
+
max-height: calc(100vh - 248px);
|
|
150
|
+
overflow-y: scroll;
|
|
151
|
+
margin-top: 10px;
|
|
152
|
+
padding-bottom: 15px;
|
|
153
|
+
width: 100%;
|
|
154
|
+
|
|
155
|
+
@media (width <= 1340px){
|
|
156
|
+
justify-content: center !important;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
@media (width <= 1125px){
|
|
160
|
+
max-height: calc(100vh - 320px);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&::-webkit-scrollbar {
|
|
164
|
+
width: 8px;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&::-webkit-scrollbar-track {
|
|
168
|
+
background: transparent !important;
|
|
169
|
+
border-radius: 1px;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&::-webkit-scrollbar-thumb {
|
|
173
|
+
background: var(--scrollbar-thumb-color) !important;
|
|
174
|
+
border-radius: 10px;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
@supports not selector(::-webkit-scrollbar) {
|
|
178
|
+
body {
|
|
179
|
+
scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.defaultDesign {
|
|
184
|
+
display: flex;
|
|
185
|
+
flex-direction: column;
|
|
186
|
+
align-items: center;
|
|
187
|
+
justify-content: center;
|
|
188
|
+
width: 316px;
|
|
189
|
+
height: 224px;
|
|
190
|
+
border-radius: 3px;
|
|
191
|
+
cursor: pointer;
|
|
192
|
+
background-color: #fff;
|
|
193
|
+
margin-bottom: 14px;
|
|
194
|
+
padding: 1.5px;
|
|
195
|
+
border-radius: 7px;
|
|
196
|
+
|
|
197
|
+
p {
|
|
198
|
+
color: var(--text-color);
|
|
199
|
+
font-weight: 600;
|
|
200
|
+
font-size: 12px;
|
|
201
|
+
line-height: 14.52px;
|
|
202
|
+
margin-top: 5px;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
}
|
|
206
|
+
.ownHeading{
|
|
207
|
+
color: var(--text-color);
|
|
208
|
+
font-weight: 400 !important;
|
|
209
|
+
font-size: 18px !important;
|
|
210
|
+
line-height: 14.52px;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.postcard{
|
|
214
|
+
height: 211.66px !important;
|
|
215
|
+
}
|
|
216
|
+
.postcard-4x6{
|
|
217
|
+
height: 211.66px !important;
|
|
218
|
+
}
|
|
219
|
+
.postcard-6x11{
|
|
220
|
+
height: 173.73px !important;
|
|
221
|
+
}
|
|
222
|
+
.postcard-6x9{
|
|
223
|
+
height: 211.66px !important;
|
|
224
|
+
}
|
|
225
|
+
.personalLetter{
|
|
226
|
+
height: 486.73px !important;
|
|
227
|
+
}
|
|
228
|
+
.professionalLetter{
|
|
229
|
+
height: 408.06px !important;
|
|
230
|
+
}
|
|
231
|
+
.biFold{
|
|
232
|
+
height: 107.33px !important;
|
|
233
|
+
}
|
|
234
|
+
.triFold{
|
|
235
|
+
height: 420.33px !important;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.heightOLC{
|
|
240
|
+
max-height: calc(100vh - 270px);
|
|
241
|
+
@media (width <= 1125px){
|
|
242
|
+
max-height: calc(100vh - 320px);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
// Polotno and third party imports
|
|
4
|
+
import { SidePanelWrap } from 'polotno';
|
|
5
|
+
import type { StoreType } from 'polotno/model/store';
|
|
6
|
+
import {
|
|
7
|
+
SidePanel as PolotnoSidePanel,
|
|
8
|
+
DEFAULT_SECTIONS,
|
|
9
|
+
} from 'polotno/side-panel';
|
|
10
|
+
|
|
11
|
+
// Custom Sections / Components
|
|
12
|
+
import CustomTemplateSection from './Templates/customTemplateSection';
|
|
13
|
+
import CustomFieldSection from './CustomFields/customFieldSection';
|
|
14
|
+
import { CustomUploadsV2Section } from './CustomUploads';
|
|
15
|
+
import customAddOns from './CustomAddOns';
|
|
16
|
+
import CustomQRCode from './CustomQRCode';
|
|
17
|
+
import BlockColors from './CustomBlockColors';
|
|
18
|
+
|
|
19
|
+
interface Props {
|
|
20
|
+
store: StoreType;
|
|
21
|
+
currentTemplateType: string;
|
|
22
|
+
currentProductId?: number;
|
|
23
|
+
platformName?: string | null;
|
|
24
|
+
templateGalleryModal?: boolean;
|
|
25
|
+
selectedSection?: string;
|
|
26
|
+
allowSenderFields?: boolean;
|
|
27
|
+
excludedFields?: string[] | null;
|
|
28
|
+
designerQueryAmount?: string | number;
|
|
29
|
+
allowPropertyFields?: boolean;
|
|
30
|
+
allowedAddOns?: any;
|
|
31
|
+
allowedTemplateSections?: any;
|
|
32
|
+
propertyOfferCost?: number;
|
|
33
|
+
customPropertyOfferCost?: number;
|
|
34
|
+
gsvCost?: number;
|
|
35
|
+
currentTheme?: string | null | undefined;
|
|
36
|
+
onGetOneTemplate?: (payload: any) => Promise<any>;
|
|
37
|
+
onCreateCustomTemplateQuery?: (payload: any) => Promise<any>;
|
|
38
|
+
onGetTemplates?: (payload: any) => Promise<any>;
|
|
39
|
+
onGetCustomFields?: () => Promise<any>;
|
|
40
|
+
onGetBrandingImages?: (payload: any) => Promise<any>;
|
|
41
|
+
onDeleteBrandingImage?: (id: string | number) => Promise<void>;
|
|
42
|
+
onUploadBrandingImage?: (payload: any) => Promise<any>;
|
|
43
|
+
onGetQRCodes?: (payload: any) => Promise<any>;
|
|
44
|
+
onDeleteQRCodes?: (id: string | number) => Promise<void>;
|
|
45
|
+
onUploadQRCode?: (payload: any) => Promise<any>;
|
|
46
|
+
onEditQRCode?: (payload: any) => Promise<any>;
|
|
47
|
+
selectedTemplateType?: string | null;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const SidePanel: React.FC<Props> = (props) => {
|
|
51
|
+
const [hireDesignerModal, setHireDesignerModal] = useState(false);
|
|
52
|
+
|
|
53
|
+
const sections =
|
|
54
|
+
props.currentTemplateType === 'Real Penned Letter' && props.currentProductId === 16
|
|
55
|
+
? DEFAULT_SECTIONS.filter((section) => section.name === '')
|
|
56
|
+
: DEFAULT_SECTIONS.filter(
|
|
57
|
+
(section) => !['photos', 'size', 'templates', 'upload'].includes(section.name)
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<SidePanelWrap>
|
|
62
|
+
<PolotnoSidePanel
|
|
63
|
+
store={props.store}
|
|
64
|
+
sections={[
|
|
65
|
+
{
|
|
66
|
+
...CustomTemplateSection,
|
|
67
|
+
Panel: (panelProps: any) => (
|
|
68
|
+
<CustomTemplateSection.Panel
|
|
69
|
+
{...panelProps}
|
|
70
|
+
platformName={props.platformName}
|
|
71
|
+
templateGalleryModal={props.templateGalleryModal}
|
|
72
|
+
designerQueryAmount={props.designerQueryAmount}
|
|
73
|
+
selectedSection={props.selectedSection}
|
|
74
|
+
allowedTemplateSections={props.allowedTemplateSections}
|
|
75
|
+
hireDesignerModal={hireDesignerModal}
|
|
76
|
+
allowedAddOns={props.allowedAddOns}
|
|
77
|
+
currentTheme={props.currentTheme}
|
|
78
|
+
setHireDesignerModal={setHireDesignerModal}
|
|
79
|
+
onCreateCustomTemplateQuery={props.onCreateCustomTemplateQuery}
|
|
80
|
+
onGetTemplates={props.onGetTemplates}
|
|
81
|
+
onGetOneTemplate={props.onGetOneTemplate}
|
|
82
|
+
selectedTemplateType={props.selectedTemplateType}
|
|
83
|
+
/>
|
|
84
|
+
),
|
|
85
|
+
},
|
|
86
|
+
...sections,
|
|
87
|
+
...(props.currentProductId !== 16 ? [{
|
|
88
|
+
...CustomUploadsV2Section,
|
|
89
|
+
Panel: (panelProps: any) => (
|
|
90
|
+
<CustomUploadsV2Section.Panel
|
|
91
|
+
{...panelProps}
|
|
92
|
+
onGetBrandingImages={props.onGetBrandingImages}
|
|
93
|
+
onDeleteBrandingImage={props.onDeleteBrandingImage}
|
|
94
|
+
onUploadBrandingImage={props.onUploadBrandingImage}
|
|
95
|
+
/>
|
|
96
|
+
),
|
|
97
|
+
}] : []),
|
|
98
|
+
{
|
|
99
|
+
...CustomFieldSection,
|
|
100
|
+
Panel: (panelProps: any) => (
|
|
101
|
+
<CustomFieldSection.Panel
|
|
102
|
+
{...panelProps}
|
|
103
|
+
onGetCustomFields={props.onGetCustomFields}
|
|
104
|
+
allowSenderFields={props.allowSenderFields}
|
|
105
|
+
excludedFields={props.excludedFields}
|
|
106
|
+
allowPropertyFields={props.allowPropertyFields}
|
|
107
|
+
platformName={props.platformName}
|
|
108
|
+
/>
|
|
109
|
+
),
|
|
110
|
+
},
|
|
111
|
+
...(props.currentProductId !== 16
|
|
112
|
+
? [
|
|
113
|
+
...(props.currentProductId !== 4 && props.currentProductId !== 5 && props.currentProductId !== 38
|
|
114
|
+
? [
|
|
115
|
+
{
|
|
116
|
+
...BlockColors,
|
|
117
|
+
Panel: (panelProps: any) => (
|
|
118
|
+
<BlockColors.Panel {...panelProps} />
|
|
119
|
+
),
|
|
120
|
+
},
|
|
121
|
+
]
|
|
122
|
+
: []),
|
|
123
|
+
{
|
|
124
|
+
...CustomQRCode,
|
|
125
|
+
Panel: (panelProps: any) => (
|
|
126
|
+
<CustomQRCode.Panel
|
|
127
|
+
{...panelProps}
|
|
128
|
+
currentTheme={props.currentTheme}
|
|
129
|
+
allowSenderFields={props.allowSenderFields}
|
|
130
|
+
allowPropertyFields={props.allowPropertyFields}
|
|
131
|
+
excludedFields={props.excludedFields}
|
|
132
|
+
onGetQRCodes={props.onGetQRCodes}
|
|
133
|
+
onDeleteQRCodes={props.onDeleteQRCodes}
|
|
134
|
+
onUploadQRCode={props.onUploadQRCode}
|
|
135
|
+
onEditQRCode={props.onEditQRCode}
|
|
136
|
+
/>
|
|
137
|
+
),
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
...customAddOns,
|
|
141
|
+
Panel: (panelProps: any) => (
|
|
142
|
+
<customAddOns.Panel
|
|
143
|
+
{...panelProps}
|
|
144
|
+
allowedAddOns={props.allowedAddOns}
|
|
145
|
+
propertyOfferCost={props.propertyOfferCost}
|
|
146
|
+
customPropertyOfferCost={props.customPropertyOfferCost}
|
|
147
|
+
gsvCost={props.gsvCost}
|
|
148
|
+
/>
|
|
149
|
+
),
|
|
150
|
+
},
|
|
151
|
+
] : []
|
|
152
|
+
)
|
|
153
|
+
]}
|
|
154
|
+
defaultSection="text"
|
|
155
|
+
/>
|
|
156
|
+
</SidePanelWrap>
|
|
157
|
+
);
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
export default SidePanel;
|