@openlettermarketing/olc-react-sdk 2.1.7 → 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,585 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
-
|
|
3
|
-
// Import Polotno and third-party libraries
|
|
4
|
-
import { PolotnoContainer, WorkspaceWrap } from 'polotno';
|
|
5
|
-
import { Toolbar } from 'polotno/toolbar/toolbar';
|
|
6
|
-
import { ZoomButtons } from 'polotno/toolbar/zoom-buttons';
|
|
7
|
-
import { Workspace } from 'polotno/canvas/workspace';
|
|
8
|
-
import { setGoogleFonts } from 'polotno/config';
|
|
9
|
-
|
|
10
|
-
// Hooks
|
|
11
|
-
import { useDispatch, useSelector } from 'react-redux';
|
|
12
|
-
import { useParams, useNavigate } from 'react-router-dom';
|
|
13
|
-
import { RootState } from '../../redux/reducers';
|
|
14
|
-
import { AppDispatch } from '../../redux/store';
|
|
15
|
-
import { StoreType } from 'polotno/model/store';
|
|
16
|
-
|
|
17
|
-
// Actions
|
|
18
|
-
import {
|
|
19
|
-
CLEAR_REDUX,
|
|
20
|
-
GET_ONE_TEMPLATE,
|
|
21
|
-
SET_BLOCK_COLOR,
|
|
22
|
-
SET_CUSTOM_FIELDS,
|
|
23
|
-
SET_CUSTOM_FIELDS_V2,
|
|
24
|
-
SET_PLATFORM_FIELDS,
|
|
25
|
-
SET_ROS_OFFER_PERCENTAGE,
|
|
26
|
-
TEMPLATE_LOADING,
|
|
27
|
-
} from '../../redux/actions/action-types';
|
|
28
|
-
import { failure } from '../../redux/actions/snackbarActions';
|
|
29
|
-
import {
|
|
30
|
-
searchAndAdvanceChange,
|
|
31
|
-
selectProduct,
|
|
32
|
-
setPageCount,
|
|
33
|
-
} from '../../redux/actions/templateActions';
|
|
34
|
-
import { clearQrFields } from '../../redux/actions/customQRCodeActions';
|
|
35
|
-
|
|
36
|
-
// Utils
|
|
37
|
-
import {
|
|
38
|
-
changeColorOfBoxesForSnapPack,
|
|
39
|
-
drawRestrictedAreaOnPage,
|
|
40
|
-
extractCustomRistrictedBoxColor,
|
|
41
|
-
getFileAsBlob,
|
|
42
|
-
} from '../../utils/template-builder';
|
|
43
|
-
import { addIdentifiersForTemplates } from '../../utils/templateIdentifierArea';
|
|
44
|
-
import { addElementsforRealPennedLetters } from '../../utils/templateRestrictedArea/realPenned';
|
|
45
|
-
import { DEFAULT_RESTRICTED_AREA_BG, DPI, allowedImageTypes, multiPageLetters } from '../../utils/constants';
|
|
46
|
-
import { addSafetyBordersForTemplates } from '../../utils/templateSafetyBorders';
|
|
47
|
-
import { MESSAGES } from '../../utils/message';
|
|
48
|
-
import { removeItem } from '../../utils/local-storage';
|
|
49
|
-
|
|
50
|
-
// @ts-ignore
|
|
51
|
-
import fonts from '../../utils/fonts.json';
|
|
52
|
-
// @ts-ignore
|
|
53
|
-
import LexiRegularFont from '../../assets/Fonts/Lexi-Regular.ttf';
|
|
54
|
-
|
|
55
|
-
// Components
|
|
56
|
-
import TopNavigation from '../TopNavigation';
|
|
57
|
-
import SidePanel from '../SidePanel';
|
|
58
|
-
import Typography from '../GenericUIBlocks/Typography';
|
|
59
|
-
import GenericSnackbar from '../GenericUIBlocks/GenericSnackbar/Toast';
|
|
60
|
-
|
|
61
|
-
import './styles.scss';
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* This code defines a React functional component called `TemplateBuilder` that is responsible for rendering a template builder interface.
|
|
65
|
-
* It includes various useEffect hooks to handle component lifecycle events and state updates.
|
|
66
|
-
* The component uses the `polotno` library to create a canvas workspace where users can design templates.
|
|
67
|
-
* It also includes a side panel with different sections for adding and customizing elements on the canvas.
|
|
68
|
-
*
|
|
69
|
-
* @param {Object} props - The component props.
|
|
70
|
-
* @param {Object} props.store - The store object passed as a prop to the `TemplateBuilder` component.
|
|
71
|
-
* @param {Object} props.styles - The styles contain CSS Properties passed as a prop to the `TemplateBuilder` component.
|
|
72
|
-
* @returns {JSX.Element} The rendered template builder interface.
|
|
73
|
-
*/
|
|
74
|
-
|
|
75
|
-
interface TemplateBuilderProps {
|
|
76
|
-
store: StoreType;
|
|
77
|
-
platformName?: string | null;
|
|
78
|
-
templateGalleryModal?: boolean;
|
|
79
|
-
createTemplateRoute?: string | null;
|
|
80
|
-
olcTemplate?: Record<string, any>;
|
|
81
|
-
designerTemplateQuery?: Record<string, any> | null;
|
|
82
|
-
allowSenderFields?: boolean;
|
|
83
|
-
allowPropertyFields?: boolean;
|
|
84
|
-
allowAdditionalPage?: boolean;
|
|
85
|
-
excludedFields?: string[] | null;
|
|
86
|
-
designerQueryAmount?: string | number;
|
|
87
|
-
allowedAddOns?: any;
|
|
88
|
-
allowedTemplateSections?: any;
|
|
89
|
-
propertyOfferCost?: number;
|
|
90
|
-
customPropertyOfferCost?: number;
|
|
91
|
-
gsvCost?: number;
|
|
92
|
-
selectedTemplateType?: string | null;
|
|
93
|
-
currentTheme?: string | null | undefined;
|
|
94
|
-
onReturnAndNavigate?: () => void;
|
|
95
|
-
onGetCustomFields?: () => Promise<any>;
|
|
96
|
-
onDuplicateTemplate?: (payload: any) => Promise<any>;
|
|
97
|
-
onCreateCustomTemplateQuery?: (payload: any) => Promise<any>;
|
|
98
|
-
onGetOneTemplate?: (payload: any) => Promise<any>;
|
|
99
|
-
onGetTemplates?: (payload: any) => Promise<any>;
|
|
100
|
-
onSubmit?: (payload: any) => Promise<any>;
|
|
101
|
-
onGetBrandingImages?: (payload: any) => Promise<any>;
|
|
102
|
-
onDeleteBrandingImage?: (id: string | number) => Promise<void>;
|
|
103
|
-
onUploadBrandingImage?: (payload: any) => Promise<any>;
|
|
104
|
-
onGetQRCodes?: (payload: any) => Promise<any>;
|
|
105
|
-
onDeleteQRCodes?: (id: string | number) => Promise<void>;
|
|
106
|
-
onUploadQRCode?: (payload: any) => Promise<any>;
|
|
107
|
-
onEditQRCode?: (payload: any) => Promise<any>;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
const TemplateBuilder: React.FC<TemplateBuilderProps> = ({
|
|
111
|
-
store,
|
|
112
|
-
platformName,
|
|
113
|
-
templateGalleryModal,
|
|
114
|
-
createTemplateRoute,
|
|
115
|
-
designerTemplateQuery,
|
|
116
|
-
olcTemplate,
|
|
117
|
-
allowSenderFields,
|
|
118
|
-
excludedFields,
|
|
119
|
-
designerQueryAmount,
|
|
120
|
-
allowPropertyFields,
|
|
121
|
-
allowedAddOns,
|
|
122
|
-
allowedTemplateSections,
|
|
123
|
-
allowAdditionalPage,
|
|
124
|
-
propertyOfferCost,
|
|
125
|
-
customPropertyOfferCost,
|
|
126
|
-
gsvCost,
|
|
127
|
-
selectedTemplateType,
|
|
128
|
-
currentTheme,
|
|
129
|
-
onCreateCustomTemplateQuery,
|
|
130
|
-
onReturnAndNavigate,
|
|
131
|
-
onGetOneTemplate,
|
|
132
|
-
onGetCustomFields,
|
|
133
|
-
onDuplicateTemplate,
|
|
134
|
-
onGetTemplates,
|
|
135
|
-
onSubmit,
|
|
136
|
-
onGetBrandingImages,
|
|
137
|
-
onDeleteBrandingImage,
|
|
138
|
-
onUploadBrandingImage,
|
|
139
|
-
onGetQRCodes,
|
|
140
|
-
onDeleteQRCodes,
|
|
141
|
-
onUploadQRCode,
|
|
142
|
-
onEditQRCode,
|
|
143
|
-
}) => {
|
|
144
|
-
const [isStoreUpdated, setIsStoreUpdated] = useState(false);
|
|
145
|
-
const [isDuplication, setIsDuplication] = useState(false);
|
|
146
|
-
const [switchTabCount, setSwitchTabCount] = useState(1);
|
|
147
|
-
const [selectedSection, setSelectedSection] = useState('text');
|
|
148
|
-
|
|
149
|
-
const { id } = useParams();
|
|
150
|
-
const dispatch: AppDispatch = useDispatch();
|
|
151
|
-
const navigate = useNavigate();
|
|
152
|
-
|
|
153
|
-
const template = useSelector(
|
|
154
|
-
(state: RootState) => state.templates.template
|
|
155
|
-
) as Record<string, any>;
|
|
156
|
-
const product = useSelector(
|
|
157
|
-
(state: RootState) => state.templates.product
|
|
158
|
-
) as Record<string, any>;
|
|
159
|
-
const envelopeType = useSelector(
|
|
160
|
-
(state: RootState) => state.templates.envelopeType
|
|
161
|
-
);
|
|
162
|
-
const allProducts = useSelector((state: RootState) => state.templates.products);
|
|
163
|
-
|
|
164
|
-
const currentTemplateType = product?.productType;
|
|
165
|
-
|
|
166
|
-
const currentProductId = +product?.id;
|
|
167
|
-
|
|
168
|
-
const containerStyle = {
|
|
169
|
-
width: '100vw',
|
|
170
|
-
height: currentTheme === 'v2' ? 'calc(100vh - 106px)' : '90vh',
|
|
171
|
-
position: 'relative',
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
useEffect(() => {
|
|
175
|
-
if (olcTemplate) {
|
|
176
|
-
handleLoadTemplate();
|
|
177
|
-
}
|
|
178
|
-
}, [olcTemplate]);
|
|
179
|
-
|
|
180
|
-
useEffect(() => {
|
|
181
|
-
if (designerTemplateQuery) {
|
|
182
|
-
setTimeout(() => {
|
|
183
|
-
handleLoadDesignerTemplate();
|
|
184
|
-
}, 100);
|
|
185
|
-
}
|
|
186
|
-
}, [designerTemplateQuery]);
|
|
187
|
-
|
|
188
|
-
// Event listener for visibility change
|
|
189
|
-
useEffect(() => {
|
|
190
|
-
const handleVisibilityChange = () => {
|
|
191
|
-
if (document.hidden) {
|
|
192
|
-
setSwitchTabCount((prev) => prev + 1);
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
const handleClick = (event: MouseEvent) => {
|
|
197
|
-
if (
|
|
198
|
-
event.target instanceof Element &&
|
|
199
|
-
event.target.closest('.polotno-side-tabs-container') &&
|
|
200
|
-
store?.openedSidePanel !== 'Templates'
|
|
201
|
-
) {
|
|
202
|
-
setSelectedSection(store?.openedSidePanel);
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
document.addEventListener('click', handleClick);
|
|
207
|
-
document.addEventListener('visibilitychange', handleVisibilityChange);
|
|
208
|
-
|
|
209
|
-
return () => {
|
|
210
|
-
document.removeEventListener('visibilitychange', handleVisibilityChange);
|
|
211
|
-
document.removeEventListener('click', handleClick);
|
|
212
|
-
};
|
|
213
|
-
}, []);
|
|
214
|
-
|
|
215
|
-
useEffect(() => {
|
|
216
|
-
removeItem('hireDesignerFormState');
|
|
217
|
-
removeItem('queryFiles');
|
|
218
|
-
}, [])
|
|
219
|
-
|
|
220
|
-
useEffect(() => {
|
|
221
|
-
if (!product && !olcTemplate && !id && !designerTemplateQuery) {
|
|
222
|
-
navigate(createTemplateRoute || '/create-template');
|
|
223
|
-
}
|
|
224
|
-
}, []);
|
|
225
|
-
|
|
226
|
-
// @ts-ignore
|
|
227
|
-
useEffect(() => {
|
|
228
|
-
if (product || (id && onGetOneTemplate)) {
|
|
229
|
-
setGoogleFonts(fonts);
|
|
230
|
-
|
|
231
|
-
if (id && onGetOneTemplate) {
|
|
232
|
-
try {
|
|
233
|
-
onGetOneTemplate(id).then((template) => {
|
|
234
|
-
if (template) {
|
|
235
|
-
dispatch({ type: GET_ONE_TEMPLATE, payload: { data: template } });
|
|
236
|
-
addSafetyBordersForTemplates(template?.product?.id, store);
|
|
237
|
-
dispatch({ type: TEMPLATE_LOADING, payload: true });
|
|
238
|
-
} else {
|
|
239
|
-
dispatch(failure('Unable to load the Template'));
|
|
240
|
-
setTimeout(() => {
|
|
241
|
-
navigate(createTemplateRoute || '/create-template');
|
|
242
|
-
}, 1000);
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
} catch (error) {
|
|
246
|
-
return error;
|
|
247
|
-
} finally {
|
|
248
|
-
dispatch({ type: TEMPLATE_LOADING, payload: false });
|
|
249
|
-
}
|
|
250
|
-
// @ts-ignore
|
|
251
|
-
} else if (store.pages.length === 0 && !olcTemplate) {
|
|
252
|
-
createInitialPage();
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
fetchCustomFields();
|
|
256
|
-
|
|
257
|
-
const handleChange = () => {
|
|
258
|
-
if (!isStoreUpdated) {
|
|
259
|
-
setIsStoreUpdated(true);
|
|
260
|
-
setIsDuplication(false);
|
|
261
|
-
}
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
const off = store.on('change', handleChange);
|
|
265
|
-
|
|
266
|
-
return () => {
|
|
267
|
-
store.history.clear();
|
|
268
|
-
store.clear();
|
|
269
|
-
dispatch(clearQrFields());
|
|
270
|
-
dispatch({ type: SET_ROS_OFFER_PERCENTAGE, payload: '' });
|
|
271
|
-
dispatch({ type: SET_BLOCK_COLOR, payload: DEFAULT_RESTRICTED_AREA_BG });
|
|
272
|
-
dispatch(setPageCount(store?.pages?.length));
|
|
273
|
-
off();
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
}, []);
|
|
277
|
-
|
|
278
|
-
useEffect(() => {
|
|
279
|
-
if (!id && !olcTemplate && product && store.pages.length === 0) {
|
|
280
|
-
createInitialPage();
|
|
281
|
-
}
|
|
282
|
-
}, [product]);
|
|
283
|
-
|
|
284
|
-
useEffect(() => {
|
|
285
|
-
const handleBeforeUnload = (event: { returnValue: string }) => {
|
|
286
|
-
const message = 'Are you sure you want to leave?';
|
|
287
|
-
event.returnValue = message;
|
|
288
|
-
return message;
|
|
289
|
-
};
|
|
290
|
-
|
|
291
|
-
const addBeforeUnloadListener = () => {
|
|
292
|
-
window.removeEventListener('beforeunload', handleBeforeUnload);
|
|
293
|
-
window.addEventListener('beforeunload', handleBeforeUnload);
|
|
294
|
-
};
|
|
295
|
-
|
|
296
|
-
const removeBeforeUnloadListener = () => {
|
|
297
|
-
window.removeEventListener('beforeunload', handleBeforeUnload);
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
if (isStoreUpdated && !isDuplication) {
|
|
301
|
-
addBeforeUnloadListener();
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
return () => {
|
|
305
|
-
removeBeforeUnloadListener();
|
|
306
|
-
};
|
|
307
|
-
}, [isStoreUpdated, isDuplication]);
|
|
308
|
-
|
|
309
|
-
const fetchCustomFields = async () => {
|
|
310
|
-
if (onGetCustomFields) {
|
|
311
|
-
const allCustomFields: any = await onGetCustomFields();
|
|
312
|
-
const platformFields: any = [];
|
|
313
|
-
const customFields: any = [];
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
if (allCustomFields?.version === 'v2') {
|
|
317
|
-
const flattenedFields = allCustomFields.customFields.flatMap((section: { fields: any; }) => section.fields);
|
|
318
|
-
|
|
319
|
-
for (const field of flattenedFields) {
|
|
320
|
-
(field.isPlatformField ? platformFields : customFields).push(field);
|
|
321
|
-
}
|
|
322
|
-
const filteredCustomFields = allCustomFields?.customFields
|
|
323
|
-
.map((customField: any) => ({
|
|
324
|
-
...customField,
|
|
325
|
-
fields: customField.fields.filter((field: any) => customFields.includes(field))
|
|
326
|
-
}))
|
|
327
|
-
.filter((section: { fields: any[] }) => section.fields.length > 0);
|
|
328
|
-
|
|
329
|
-
if (allCustomFields?.customFields?.length) {
|
|
330
|
-
dispatch({ type: SET_CUSTOM_FIELDS, payload: [] });
|
|
331
|
-
dispatch({ type: SET_CUSTOM_FIELDS_V2, payload: filteredCustomFields });
|
|
332
|
-
} else {
|
|
333
|
-
dispatch({ type: SET_CUSTOM_FIELDS, payload: [] });
|
|
334
|
-
dispatch({ type: SET_CUSTOM_FIELDS_V2, payload: [] });
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
if (platformFields.length) {
|
|
338
|
-
dispatch({ type: SET_PLATFORM_FIELDS, payload: platformFields });
|
|
339
|
-
} else {
|
|
340
|
-
dispatch({ type: SET_PLATFORM_FIELDS, payload: [] });
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
} else {
|
|
344
|
-
|
|
345
|
-
for (const field of allCustomFields) {
|
|
346
|
-
(field.isPlatformField ? platformFields : customFields).push(field);
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
if (customFields.length) {
|
|
350
|
-
dispatch({ type: SET_CUSTOM_FIELDS, payload: customFields });
|
|
351
|
-
} else {
|
|
352
|
-
dispatch({ type: SET_CUSTOM_FIELDS, payload: [] });
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
if (platformFields.length) {
|
|
356
|
-
dispatch({ type: SET_PLATFORM_FIELDS, payload: platformFields });
|
|
357
|
-
} else {
|
|
358
|
-
dispatch({ type: SET_PLATFORM_FIELDS, payload: [] });
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
};
|
|
363
|
-
|
|
364
|
-
const createInitialPage = async () => {
|
|
365
|
-
if (product) {
|
|
366
|
-
const activePanel = selectedTemplateType === 'prebuilt' ? 'Templates' : 'text';
|
|
367
|
-
activePanel === 'text' && store.openSidePanel(activePanel);
|
|
368
|
-
store.addPage();
|
|
369
|
-
const paperSize = product?.selectedSize?.split('x');
|
|
370
|
-
store.setUnit({
|
|
371
|
-
unit: 'in',
|
|
372
|
-
dpi: DPI,
|
|
373
|
-
});
|
|
374
|
-
store.setSize(+paperSize[1] * DPI, +paperSize[0] * DPI);
|
|
375
|
-
if (multiPageLetters.includes(product.productType)) {
|
|
376
|
-
store.addPage();
|
|
377
|
-
store.selectPage(store.pages[0].id);
|
|
378
|
-
}
|
|
379
|
-
//@ts-ignore
|
|
380
|
-
drawRestrictedAreaOnPage(store, product, envelopeType);
|
|
381
|
-
addIdentifiersForTemplates(product.id, store);
|
|
382
|
-
if (currentTemplateType === 'Real Penned Letter' && +product?.id === 16) {
|
|
383
|
-
handleRealPennedLetters();
|
|
384
|
-
}
|
|
385
|
-
dispatch(clearQrFields());
|
|
386
|
-
dispatch({ type: SET_ROS_OFFER_PERCENTAGE, payload: '' });
|
|
387
|
-
dispatch({ type: SET_BLOCK_COLOR, payload: DEFAULT_RESTRICTED_AREA_BG });
|
|
388
|
-
dispatch(setPageCount(store?.pages?.length));
|
|
389
|
-
if (activePanel === 'Templates') {
|
|
390
|
-
setTimeout(() => {
|
|
391
|
-
store.openSidePanel(activePanel);
|
|
392
|
-
}, 1500)
|
|
393
|
-
}
|
|
394
|
-
store.history.clear();
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
setIsStoreUpdated(false);
|
|
398
|
-
};
|
|
399
|
-
|
|
400
|
-
const handleRealPennedLetters = async () => {
|
|
401
|
-
try {
|
|
402
|
-
// Load Lexi Regular Fonts Into Store
|
|
403
|
-
store.addFont({
|
|
404
|
-
fontFamily: 'lexi Regular',
|
|
405
|
-
url: LexiRegularFont,
|
|
406
|
-
});
|
|
407
|
-
addElementsforRealPennedLetters(store);
|
|
408
|
-
|
|
409
|
-
const response = await fetch(LexiRegularFont);
|
|
410
|
-
const blob = await response.blob();
|
|
411
|
-
|
|
412
|
-
const reader = new FileReader();
|
|
413
|
-
// Load Lexi Regular Base64 into JSON
|
|
414
|
-
reader.onloadend = () => {
|
|
415
|
-
store.addFont({
|
|
416
|
-
fontFamily: 'lexi Regular',
|
|
417
|
-
url: reader.result,
|
|
418
|
-
} as any);
|
|
419
|
-
};
|
|
420
|
-
reader.readAsDataURL(blob);
|
|
421
|
-
} catch (error) {
|
|
422
|
-
console.error('Error loading the font file:', error);
|
|
423
|
-
}
|
|
424
|
-
};
|
|
425
|
-
|
|
426
|
-
const handleLoadDesignerTemplate = async () => {
|
|
427
|
-
if (designerTemplateQuery?.title && designerTemplateQuery?.product) {
|
|
428
|
-
const flatProducts = allProducts.flatMap(product =>
|
|
429
|
-
product.size.map((sizeItem: any) => ({
|
|
430
|
-
id: sizeItem.id || product.id,
|
|
431
|
-
title: product.title,
|
|
432
|
-
productType: product.productType,
|
|
433
|
-
size: [{ id: sizeItem.id || product.id, size: sizeItem.size }],
|
|
434
|
-
...(product.windowed !== undefined && { windowed: product.windowed })
|
|
435
|
-
}))
|
|
436
|
-
);
|
|
437
|
-
const selectedProduct = flatProducts.find((product) => product.id === designerTemplateQuery?.product?.id);
|
|
438
|
-
if (selectedProduct) {
|
|
439
|
-
dispatch({ type: CLEAR_REDUX });
|
|
440
|
-
dispatch({ type: SET_ROS_OFFER_PERCENTAGE, payload: '' });
|
|
441
|
-
dispatch({ type: SET_BLOCK_COLOR, payload: DEFAULT_RESTRICTED_AREA_BG });
|
|
442
|
-
dispatch(setPageCount(store?.pages?.length));
|
|
443
|
-
store.clear();
|
|
444
|
-
store.history.clear();
|
|
445
|
-
dispatch(searchAndAdvanceChange('title', designerTemplateQuery?.title));
|
|
446
|
-
if (selectedProduct.productType === 'Professional Letters') {
|
|
447
|
-
let selectedEnvelope = selectedProduct.id == 2 ? '#10 Double-Window' : '#10 Grey'
|
|
448
|
-
dispatch(searchAndAdvanceChange('envelopeType', selectedEnvelope));
|
|
449
|
-
}
|
|
450
|
-
dispatch(selectProduct(selectedProduct));
|
|
451
|
-
return;
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
onReturnAndNavigate ? onReturnAndNavigate() : navigate(createTemplateRoute || '/');
|
|
455
|
-
};
|
|
456
|
-
|
|
457
|
-
const handleLoadTemplate = async () => {
|
|
458
|
-
const existingTemplate = olcTemplate;
|
|
459
|
-
if (existingTemplate) {
|
|
460
|
-
dispatch({ type: GET_ONE_TEMPLATE, payload: { data: existingTemplate } });
|
|
461
|
-
const workspaceElement = document.querySelector(
|
|
462
|
-
'.polotno-workspace-container'
|
|
463
|
-
);
|
|
464
|
-
if (workspaceElement) {
|
|
465
|
-
workspaceElement.classList.add('show-loader');
|
|
466
|
-
}
|
|
467
|
-
// @ts-ignore
|
|
468
|
-
const paperDimensions = existingTemplate?.product?.paperSize.split('x');
|
|
469
|
-
store.setUnit({
|
|
470
|
-
unit: 'in',
|
|
471
|
-
dpi: 96,
|
|
472
|
-
});
|
|
473
|
-
store.setSize(+paperDimensions[1] * DPI, +paperDimensions[0] * DPI);
|
|
474
|
-
let jsonData = await getFileAsBlob(existingTemplate?.templateUrl);
|
|
475
|
-
if (existingTemplate?.product?.productType === 'Snap Pack Mailers') {
|
|
476
|
-
const updatedBoxes = changeColorOfBoxesForSnapPack(jsonData, true, true);
|
|
477
|
-
jsonData = updatedBoxes;
|
|
478
|
-
}
|
|
479
|
-
if (existingTemplate?.product?.productType === 'Real Penned Letter' && +existingTemplate?.product?.id === 16) {
|
|
480
|
-
let clonedJson = JSON.stringify(jsonData)
|
|
481
|
-
.replace(/{{/g, '((')
|
|
482
|
-
.replace(/}}/g, '))');
|
|
483
|
-
jsonData = JSON.parse(clonedJson);
|
|
484
|
-
}
|
|
485
|
-
const RistrictedBoxColor = extractCustomRistrictedBoxColor(jsonData);
|
|
486
|
-
dispatch({ type: SET_BLOCK_COLOR, payload: RistrictedBoxColor ? RistrictedBoxColor : DEFAULT_RESTRICTED_AREA_BG });
|
|
487
|
-
dispatch(setPageCount(store?.pages?.length));
|
|
488
|
-
store.loadJSON(jsonData);
|
|
489
|
-
await store.waitLoading();
|
|
490
|
-
dispatch(clearQrFields());
|
|
491
|
-
if (allowedAddOns?.includes('custom_property_offer') && existingTemplate?.meta?.rosOfferPercentage) {
|
|
492
|
-
dispatch({ type: SET_ROS_OFFER_PERCENTAGE, payload: existingTemplate?.meta?.rosOfferPercentage });
|
|
493
|
-
} else {
|
|
494
|
-
dispatch({ type: SET_ROS_OFFER_PERCENTAGE, payload: '' });
|
|
495
|
-
}
|
|
496
|
-
setIsStoreUpdated(false);
|
|
497
|
-
addSafetyBordersForTemplates(existingTemplate?.product?.id, store);
|
|
498
|
-
dispatch({ type: TEMPLATE_LOADING, payload: false });
|
|
499
|
-
if (workspaceElement) {
|
|
500
|
-
workspaceElement.classList.add('hide-loader');
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
};
|
|
504
|
-
|
|
505
|
-
// Incase of Real Penned Letters hide tooltip
|
|
506
|
-
const Tooltip = () => null;
|
|
507
|
-
|
|
508
|
-
return (
|
|
509
|
-
<>
|
|
510
|
-
<Typography className="hideTemplateBuilder">
|
|
511
|
-
{MESSAGES.TEMPLATE_MESSAGE_ON_SMALL_SCREEN}
|
|
512
|
-
</Typography>
|
|
513
|
-
<div className="polotno-container">
|
|
514
|
-
{switchTabCount > 0 && (
|
|
515
|
-
<div className="builder-wrapper">
|
|
516
|
-
<TopNavigation
|
|
517
|
-
store={store}
|
|
518
|
-
isStoreUpdated={isStoreUpdated}
|
|
519
|
-
olcTemplate={olcTemplate}
|
|
520
|
-
designerTemplateQuery={designerTemplateQuery}
|
|
521
|
-
onDuplicateTemplate={onDuplicateTemplate}
|
|
522
|
-
setIsDuplication={setIsDuplication}
|
|
523
|
-
onReturnAndNavigate={onReturnAndNavigate}
|
|
524
|
-
allowedAddOns={allowedAddOns}
|
|
525
|
-
allowAdditionalPage={allowAdditionalPage}
|
|
526
|
-
currentTheme={currentTheme}
|
|
527
|
-
onSubmit={onSubmit}
|
|
528
|
-
/>
|
|
529
|
-
|
|
530
|
-
<PolotnoContainer style={containerStyle}>
|
|
531
|
-
<SidePanel
|
|
532
|
-
store={store}
|
|
533
|
-
currentTemplateType={currentTemplateType}
|
|
534
|
-
currentProductId={currentProductId}
|
|
535
|
-
platformName={platformName}
|
|
536
|
-
templateGalleryModal={templateGalleryModal}
|
|
537
|
-
allowSenderFields={allowSenderFields}
|
|
538
|
-
allowPropertyFields={allowPropertyFields}
|
|
539
|
-
excludedFields={excludedFields}
|
|
540
|
-
designerQueryAmount={designerQueryAmount}
|
|
541
|
-
allowedAddOns={allowedAddOns}
|
|
542
|
-
allowedTemplateSections={allowedTemplateSections}
|
|
543
|
-
propertyOfferCost={propertyOfferCost}
|
|
544
|
-
customPropertyOfferCost={customPropertyOfferCost}
|
|
545
|
-
gsvCost={gsvCost}
|
|
546
|
-
selectedSection={selectedSection}
|
|
547
|
-
currentTheme={currentTheme}
|
|
548
|
-
onGetTemplates={onGetTemplates}
|
|
549
|
-
onGetOneTemplate={onGetOneTemplate}
|
|
550
|
-
onGetCustomFields={onGetCustomFields}
|
|
551
|
-
onCreateCustomTemplateQuery={onCreateCustomTemplateQuery}
|
|
552
|
-
onGetBrandingImages={onGetBrandingImages}
|
|
553
|
-
onDeleteBrandingImage={onDeleteBrandingImage}
|
|
554
|
-
onUploadBrandingImage={onUploadBrandingImage}
|
|
555
|
-
onGetQRCodes={onGetQRCodes}
|
|
556
|
-
onDeleteQRCodes={onDeleteQRCodes}
|
|
557
|
-
onUploadQRCode={onUploadQRCode}
|
|
558
|
-
onEditQRCode={onEditQRCode}
|
|
559
|
-
selectedTemplateType={selectedTemplateType}
|
|
560
|
-
/>
|
|
561
|
-
<WorkspaceWrap>
|
|
562
|
-
{+product?.id !== 16 && (
|
|
563
|
-
<Toolbar store={store} downloadButtonEnabled={false} />
|
|
564
|
-
)}
|
|
565
|
-
{+product?.id !== 16 ? (
|
|
566
|
-
<Workspace store={store} pageControlsEnabled={false} />
|
|
567
|
-
) : (
|
|
568
|
-
<Workspace
|
|
569
|
-
store={store}
|
|
570
|
-
pageControlsEnabled={false}
|
|
571
|
-
components={{ Tooltip }}
|
|
572
|
-
/>
|
|
573
|
-
)}
|
|
574
|
-
<ZoomButtons store={store} />
|
|
575
|
-
</WorkspaceWrap>
|
|
576
|
-
</PolotnoContainer>
|
|
577
|
-
<GenericSnackbar />
|
|
578
|
-
</div>
|
|
579
|
-
)}
|
|
580
|
-
</div>
|
|
581
|
-
</>
|
|
582
|
-
);
|
|
583
|
-
};
|
|
584
|
-
|
|
585
|
-
export default TemplateBuilder;
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
.polotno-container {
|
|
2
|
-
.builder-wrapper {
|
|
3
|
-
@media (max-width: 600px) {
|
|
4
|
-
display: none;
|
|
5
|
-
}
|
|
6
|
-
.polotno-side-panel {
|
|
7
|
-
& .polotno-side-tabs-container {
|
|
8
|
-
& .polotno-side-tabs-inner {
|
|
9
|
-
& .polotno-side-panel-tab {
|
|
10
|
-
color: var(--text-color);
|
|
11
|
-
&.active,
|
|
12
|
-
&:hover {
|
|
13
|
-
background-color: var(--secondary-color);
|
|
14
|
-
opacity: 0.8;
|
|
15
|
-
color: var(--primary-color);
|
|
16
|
-
svg {
|
|
17
|
-
color: var(--primary-color);
|
|
18
|
-
path {
|
|
19
|
-
fill: var(--primary-color) !important;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
.address-block-icon{
|
|
23
|
-
path {
|
|
24
|
-
fill: transparent !important;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
& .polotno-panel-container {
|
|
32
|
-
& > div > p {
|
|
33
|
-
display: none;
|
|
34
|
-
}
|
|
35
|
-
.bp5-tabs {
|
|
36
|
-
.bp5-tab-list {
|
|
37
|
-
.bp5-tab-indicator-wrapper {
|
|
38
|
-
.bp5-tab-indicator {
|
|
39
|
-
background-color: var(--primary-color);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
.bp5-tab[aria-selected='true'] {
|
|
43
|
-
color: var(--primary-color);
|
|
44
|
-
&:focus {
|
|
45
|
-
outline: none;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
.bp5-tab[aria-selected='false'] {
|
|
49
|
-
color: #000;
|
|
50
|
-
&:focus {
|
|
51
|
-
outline: none;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
.polotno-workspace-container {
|
|
59
|
-
background-color: transparent !important;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.show-loader {
|
|
64
|
-
&::after {
|
|
65
|
-
content: '';
|
|
66
|
-
position: absolute;
|
|
67
|
-
width: 50px;
|
|
68
|
-
height: 50px;
|
|
69
|
-
top: 50%;
|
|
70
|
-
left: 50%;
|
|
71
|
-
border-radius: 50%;
|
|
72
|
-
border: 4px solid var(--primary-color);
|
|
73
|
-
border-right: 3px solid transparent;
|
|
74
|
-
transform: translate(-50%, -50%);
|
|
75
|
-
display: flex;
|
|
76
|
-
justify-content: center;
|
|
77
|
-
align-items: center;
|
|
78
|
-
animation: circularAnimation 2s linear infinite;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
@keyframes circularAnimation {
|
|
82
|
-
0% {
|
|
83
|
-
transform: translate(-50%, -50%) rotate(0deg);
|
|
84
|
-
}
|
|
85
|
-
100% {
|
|
86
|
-
transform: translate(-50%, -50%) rotate(360deg);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.hide-loader {
|
|
92
|
-
&::after {
|
|
93
|
-
display: none !important; /* Hide the pseudo-element */
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.bp5-popover-transition-container {
|
|
98
|
-
z-index: 2200 !important;
|
|
99
|
-
}
|
|
100
|
-
}
|