oa-componentbook 0.0.0-sit1.1
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/README.md +92 -0
- package/build/MockData.js +2311 -0
- package/build/components/oa-component-accordion/Accordion.js +195 -0
- package/build/components/oa-component-accordion/styles.js +13 -0
- package/build/components/oa-component-auto-complete/CustomAutoComplete.js +167 -0
- package/build/components/oa-component-bar-chart/BarChart.js +295 -0
- package/build/components/oa-component-bread-crumb/CustomBreadCrumb.js +47 -0
- package/build/components/oa-component-button/CustomButton.js +108 -0
- package/build/components/oa-component-button/styles.js +41 -0
- package/build/components/oa-component-checkbox/CustomCheckBox.js +115 -0
- package/build/components/oa-component-checkbox/styles.js +12 -0
- package/build/components/oa-component-count-card/CustomCountCard.js +74 -0
- package/build/components/oa-component-count-card/styles.js +12 -0
- package/build/components/oa-component-datepicker/CustomDatePicker.js +134 -0
- package/build/components/oa-component-demo-border-radius/BorderRadiusDemo.js +35 -0
- package/build/components/oa-component-demo-border-radius/styles.js +12 -0
- package/build/components/oa-component-demo-color-variables/ColorVariablesDemo.js +34 -0
- package/build/components/oa-component-demo-color-variables/styles.js +12 -0
- package/build/components/oa-component-demo-elevation/ElevationDemo.js +22 -0
- package/build/components/oa-component-demo-elevation/styles.js +12 -0
- package/build/components/oa-component-demo-spacing/SpacingScales.js +26 -0
- package/build/components/oa-component-demo-spacing/styles.js +259 -0
- package/build/components/oa-component-drawer/CustomDrawer.js +178 -0
- package/build/components/oa-component-drawer/styles.js +16 -0
- package/build/components/oa-component-dropdown/CustomDropdown.js +102 -0
- package/build/components/oa-component-dropdown/customClass.css +9 -0
- package/build/components/oa-component-dropdown/styles.js +12 -0
- package/build/components/oa-component-feedback-form/FeedbackForm.js +75 -0
- package/build/components/oa-component-feedback-tooltip/FeedbackTooltip.js +69 -0
- package/build/components/oa-component-form-item/CustomFormItem.js +74 -0
- package/build/components/oa-component-header/CustomHeader.js +104 -0
- package/build/components/oa-component-header/styles.js +12 -0
- package/build/components/oa-component-icons/CustomIcon.js +92 -0
- package/build/components/oa-component-icons/MaterialIcon.js +70 -0
- package/build/components/oa-component-icons/SizedSvg.js +42 -0
- package/build/components/oa-component-info/CustomInfo.js +119 -0
- package/build/components/oa-component-info/styles.js +15 -0
- package/build/components/oa-component-input/CustomInput.js +131 -0
- package/build/components/oa-component-input-number/CustomInputNumber.js +140 -0
- package/build/components/oa-component-lable/CustomLable.js +37 -0
- package/build/components/oa-component-lable/styles.js +12 -0
- package/build/components/oa-component-loader/CustomLoader.js +66 -0
- package/build/components/oa-component-modal/CustomModal.js +153 -0
- package/build/components/oa-component-modal/styles.js +14 -0
- package/build/components/oa-component-notification/CustomNotification.js +152 -0
- package/build/components/oa-component-notification/styles.js +12 -0
- package/build/components/oa-component-notification/usage-example.md +44 -0
- package/build/components/oa-component-pagination/CustomPagination.js +111 -0
- package/build/components/oa-component-pagination/styles.js +12 -0
- package/build/components/oa-component-popover/CustomPopover.js +58 -0
- package/build/components/oa-component-progress-bar/CustomProgressBar.js +68 -0
- package/build/components/oa-component-progress-bar/styles.js +12 -0
- package/build/components/oa-component-radio/CustomRadio.js +112 -0
- package/build/components/oa-component-radio/styles.js +13 -0
- package/build/components/oa-component-rating/CustomRating.js +13 -0
- package/build/components/oa-component-select/CustomSelect.js +432 -0
- package/build/components/oa-component-steps/CustomSteps.js +117 -0
- package/build/components/oa-component-steps/styles.js +12 -0
- package/build/components/oa-component-table/CustomTable.js +300 -0
- package/build/components/oa-component-table/CustomTableV1.js +610 -0
- package/build/components/oa-component-table/styles.js +14 -0
- package/build/components/oa-component-table/stylesV1.js +19 -0
- package/build/components/oa-component-tabs/CustomTabs.js +102 -0
- package/build/components/oa-component-tabs/styles.js +13 -0
- package/build/components/oa-component-tag/CustomTag.js +66 -0
- package/build/components/oa-component-tag/styles.js +75 -0
- package/build/components/oa-component-textarea/CustomTextArea.js +74 -0
- package/build/components/oa-component-textarea/styles.js +16 -0
- package/build/components/oa-component-timeline/CustomTimeline.js +65 -0
- package/build/components/oa-component-timeline/styles.js +15 -0
- package/build/components/oa-component-timepicker/CustomTimePicker.js +104 -0
- package/build/components/oa-component-toggle/CustomToggle.js +111 -0
- package/build/components/oa-component-toggle/styles.js +43 -0
- package/build/components/oa-component-tooltip/CustomTooltip.js +70 -0
- package/build/components/oa-component-typography/Typography.js +58 -0
- package/build/components/oa-component-typography/styles.js +13 -0
- package/build/components/oa-component-upload/CustomUpload.js +332 -0
- package/build/components/oa-component-upload/styles.js +13 -0
- package/build/components/oa-component-viewer/CustomViewer.js +273 -0
- package/build/components/oa-component-viewer/styles.js +14 -0
- package/build/constants/ratingConstants.js +194 -0
- package/build/dev/oa-component-document-viewer/CustomDocumentViewer.js +367 -0
- package/build/dev/oa-component-document-viewer/styles.js +12 -0
- package/build/dev/oa-component-timeline/CustomTimeline.js +53 -0
- package/build/dev/oa-component-timeline/styles.js +15 -0
- package/build/dev/oa-component-upload/CustomUpload.js +285 -0
- package/build/dev/oa-component-upload/styles.js +13 -0
- package/build/dev/oa-component-viewer/CustomViewer.js +326 -0
- package/build/dev/oa-component-viewer/styles.js +14 -0
- package/build/dev/oa-widget-document-modal/DocumentSideModal.js +166 -0
- package/build/dev/oa-widget-document-modal/styles.js +12 -0
- package/build/dev/oa-widget-document-side-drawer/DocumentSideDrawer.js +196 -0
- package/build/dev/oa-widget-document-side-drawer/styles.js +12 -0
- package/build/dev/oa-widget-document-upload-card/DocUploadCardWidget.js +179 -0
- package/build/dev/oa-widget-document-upload-card/styles.js +13 -0
- package/build/global-css/BorderRadius.js +22 -0
- package/build/global-css/ColorVariables.js +26 -0
- package/build/global-css/ColorVariablesMap.js +29 -0
- package/build/global-css/CustomDropDownThemes.js +31 -0
- package/build/global-css/Elevation.js +35 -0
- package/build/global-css/GlobalCss.js +26 -0
- package/build/global-css/GridLayout.js +25 -0
- package/build/global-css/SpacingScales.js +11 -0
- package/build/global-css/Typographies.js +26 -0
- package/build/global-css/TypographiesMap.js +71 -0
- package/build/global-css/color-options.js +8 -0
- package/build/global-css/commonStyles.js +11 -0
- package/build/global-css/tooltip-placement-option.js +8 -0
- package/build/global-css/typography-options.js +8 -0
- package/build/images/AC.png +0 -0
- package/build/images/Car.png +0 -0
- package/build/images/Cooler.png +0 -0
- package/build/images/Default.png +0 -0
- package/build/images/Footwear.png +0 -0
- package/build/images/Furniture.png +0 -0
- package/build/images/Glasses.png +0 -0
- package/build/images/HA.png +0 -0
- package/build/images/Laptop.png +0 -0
- package/build/images/Luggage.png +0 -0
- package/build/images/Microwave.png +0 -0
- package/build/images/Mobile.png +0 -0
- package/build/images/PdfSampleImage.png +0 -0
- package/build/images/Refrigerator.png +0 -0
- package/build/images/Shirts.png +0 -0
- package/build/images/Tablets.png +0 -0
- package/build/images/Television.png +0 -0
- package/build/images/TwoWheeler.png +0 -0
- package/build/images/Wallet.png +0 -0
- package/build/images/WashingMachine.png +0 -0
- package/build/images/WaterPurifier.png +0 -0
- package/build/images/Wearable.png +0 -0
- package/build/images/ajax-loader.gif +0 -0
- package/build/images/astronaut_emptystate.png +0 -0
- package/build/images/caution.svg +3 -0
- package/build/images/close.svg +3 -0
- package/build/images/current-location.svg +3 -0
- package/build/images/delete.svg +8 -0
- package/build/images/exportGrp01.png +0 -0
- package/build/images/exportGrp02.png +0 -0
- package/build/images/exportGrp03.png +0 -0
- package/build/images/hand-icon.svg +4 -0
- package/build/images/iphone.svg +9 -0
- package/build/images/left-icon.svg +28 -0
- package/build/images/map_pointer.svg +25 -0
- package/build/images/modal-img.svg +8 -0
- package/build/images/oaChat.svg +5 -0
- package/build/images/offer.svg +3 -0
- package/build/images/oneassist-logo.png +0 -0
- package/build/images/outOfStock.png +0 -0
- package/build/images/right-icon.svg +28 -0
- package/build/images/search_ic.svg +3 -0
- package/build/images/search_not_found.svg +7 -0
- package/build/images/upload.svg +8 -0
- package/build/images/zoom.svg +4 -0
- package/build/index.js +763 -0
- package/build/layout/DetailDataLayout/DetailDataLayout.js +20 -0
- package/build/layout/DetailDataLayout/components/Form.js +22 -0
- package/build/layout/DetailDataLayout/components/Header.js +32 -0
- package/build/layout/DetailDataLayout/style.css +9 -0
- package/build/layout/DetailDataLayout/styles.js +12 -0
- package/build/layout/EntityOverviewLayout/EntityOverviewLayout.js +235 -0
- package/build/layout/EntityOverviewLayout/reducer/entityOverviewLayoutReducer.js +63 -0
- package/build/layout/EntityOverviewLayout/styles.js +13 -0
- package/build/layout/GenricLayOut/GenricLayOut.js +2293 -0
- package/build/layout/GenricLayOut/components/AppliedFilters.js +84 -0
- package/build/layout/GenricLayOut/components/CardList.js +34 -0
- package/build/layout/GenricLayOut/components/DropdownSearch.js +48 -0
- package/build/layout/GenricLayOut/components/Header.js +74 -0
- package/build/layout/GenricLayOut/components/Modal.js +85 -0
- package/build/layout/GenricLayOut/components/ProfileSection.js +87 -0
- package/build/layout/GenricLayOut/components/Search.js +51 -0
- package/build/layout/GenricLayOut/components/StaticFilter.css +73 -0
- package/build/layout/GenricLayOut/components/StaticFilter.js +37 -0
- package/build/layout/GenricLayOut/reducer/layoutReducer.js +294 -0
- package/build/layout/GenricLayOut/resolver/staticConfigResolver.js +98 -0
- package/build/layout/GenricLayOut/styles.js +25 -0
- package/build/layout/paymentAndConsent/CancelScreen.js +46 -0
- package/build/layout/paymentAndConsent/ConsentCard.js +68 -0
- package/build/layout/paymentAndConsent/DetailsCard.js +75 -0
- package/build/layout/paymentAndConsent/DetailsList.js +38 -0
- package/build/layout/paymentAndConsent/Header.js +33 -0
- package/build/layout/paymentAndConsent/InProgressScreen.js +46 -0
- package/build/layout/paymentAndConsent/Loader.js +21 -0
- package/build/layout/paymentAndConsent/Modal.js +28 -0
- package/build/layout/paymentAndConsent/PaymentAndConsent.js +22 -0
- package/build/layout/paymentAndConsent/PaymentCard.js +83 -0
- package/build/layout/paymentAndConsent/Section.js +34 -0
- package/build/layout/paymentAndConsent/SuccessScreen.js +46 -0
- package/build/layout/paymentAndConsent/TimeLineCard.js +28 -0
- package/build/layout/paymentAndConsent/TncList.js +32 -0
- package/build/layout/paymentAndConsent/style.js +12 -0
- package/build/utils/common.js +20 -0
- package/build/utils/download-file.js +23 -0
- package/build/utils/fix-decimal-places.js +24 -0
- package/build/utils/get-uuid.js +41 -0
- package/build/utils/hex-to-rgb.js +30 -0
- package/build/utils/index.js +78 -0
- package/build/utils/random-generators.js +19 -0
- package/build/utils/rupee-formatters.js +69 -0
- package/build/utils/type-checkers.js +16 -0
- package/build/widgets/oa-form-widget/FormWidget.js +544 -0
- package/build/widgets/oa-form-widget/FormWidgetStyle.js +18 -0
- package/build/widgets/oa-widget-add-spare-part/AddSparePartCollapseWidget.js +461 -0
- package/build/widgets/oa-widget-add-spare-part/AddSparePartWidget.js +355 -0
- package/build/widgets/oa-widget-add-spare-part/styles.js +12 -0
- package/build/widgets/oa-widget-address/AddressWidget.js +55 -0
- package/build/widgets/oa-widget-address/styles.js +13 -0
- package/build/widgets/oa-widget-approval/ApprovalWidget.js +200 -0
- package/build/widgets/oa-widget-approval/ApprovalWidgetNew.js +492 -0
- package/build/widgets/oa-widget-approval/styles.js +13 -0
- package/build/widgets/oa-widget-chat/ChatWidget.js +261 -0
- package/build/widgets/oa-widget-chat/styles.js +17 -0
- package/build/widgets/oa-widget-close-claim/CloseClaimWidget.js +256 -0
- package/build/widgets/oa-widget-close-claim/styles.js +12 -0
- package/build/widgets/oa-widget-collapsible-key-value/CollapsibleKeyValueWidget.js +395 -0
- package/build/widgets/oa-widget-collapsible-key-value/styles.js +16 -0
- package/build/widgets/oa-widget-content-panel/ContentPanel.js +82 -0
- package/build/widgets/oa-widget-content-panel/styles.js +12 -0
- package/build/widgets/oa-widget-custom-details/CustomDetails.js +41 -0
- package/build/widgets/oa-widget-customer-rating-card/CustomerRatingCard.js +147 -0
- package/build/widgets/oa-widget-customer-rating-card/styles.js +12 -0
- package/build/widgets/oa-widget-date-dropdown/DateDropDown.js +385 -0
- package/build/widgets/oa-widget-date-dropdown/styles.js +12 -0
- package/build/widgets/oa-widget-detailcard/MembershipDetailCard.js +182 -0
- package/build/widgets/oa-widget-detailcard/styles.js +12 -0
- package/build/widgets/oa-widget-document-upload/DocUploadWidget.js +264 -0
- package/build/widgets/oa-widget-document-upload/styles.js +13 -0
- package/build/widgets/oa-widget-document-upload-card/DocUploadCardWidget.js +178 -0
- package/build/widgets/oa-widget-document-upload-card/styles.js +13 -0
- package/build/widgets/oa-widget-dropdown-search-input/DropdownSearchInput.js +200 -0
- package/build/widgets/oa-widget-dropdown-search-input/styles.js +12 -0
- package/build/widgets/oa-widget-feedback/FeedbackWidget.js +83 -0
- package/build/widgets/oa-widget-feedback/styles.js +13 -0
- package/build/widgets/oa-widget-form/CustomFormWidget.js +51 -0
- package/build/widgets/oa-widget-form/styles.js +12 -0
- package/build/widgets/oa-widget-googlerating/GoogleRating.js +55 -0
- package/build/widgets/oa-widget-googlerating/styles.js +12 -0
- package/build/widgets/oa-widget-guide/GuideWidget.js +70 -0
- package/build/widgets/oa-widget-guide/GuideWidgetStyle.js +12 -0
- package/build/widgets/oa-widget-header/CustomHeaderWidget.js +98 -0
- package/build/widgets/oa-widget-header/styles.js +12 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationDeleteBiker.js +24 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationModal.js +34 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationModalStyle.js +13 -0
- package/build/widgets/oa-widget-image-carousel/ImageCarouselWidget.js +256 -0
- package/build/widgets/oa-widget-image-carousel/styles.js +23 -0
- package/build/widgets/oa-widget-image-gallery/FullscreenViewer.js +169 -0
- package/build/widgets/oa-widget-image-gallery/ImageGallery.js +87 -0
- package/build/widgets/oa-widget-image-gallery/ThumbnailGrid.js +146 -0
- package/build/widgets/oa-widget-image-gallery/imageCache.js +15 -0
- package/build/widgets/oa-widget-image-gallery/imageGalleryStyle.js +16 -0
- package/build/widgets/oa-widget-input-pattern-pin/CustomPinPatternCaptureWidget.js +395 -0
- package/build/widgets/oa-widget-input-pattern-pin/styles.js +12 -0
- package/build/widgets/oa-widget-item-info-card/InfoCardListWidget.js +60 -0
- package/build/widgets/oa-widget-item-info-card/ItemInfoCardWidget.js +77 -0
- package/build/widgets/oa-widget-item-info-card/styles.css +50 -0
- package/build/widgets/oa-widget-item-info-card/styles.js +14 -0
- package/build/widgets/oa-widget-key-value/KeyValueWidget.js +121 -0
- package/build/widgets/oa-widget-key-value/styles.js +14 -0
- package/build/widgets/oa-widget-kpi/KPICardWidget.js +86 -0
- package/build/widgets/oa-widget-kpi/styles.js +12 -0
- package/build/widgets/oa-widget-location-access/LocationAccessWidget.js +92 -0
- package/build/widgets/oa-widget-location-access/styles.js +12 -0
- package/build/widgets/oa-widget-map-base-location/AddressDetails.js +84 -0
- package/build/widgets/oa-widget-map-base-location/AddressForm.js +106 -0
- package/build/widgets/oa-widget-map-base-location/CustomModalComponent.js +58 -0
- package/build/widgets/oa-widget-map-base-location/MapBaseLocation.js +93 -0
- package/build/widgets/oa-widget-map-base-location/MapComponent.js +167 -0
- package/build/widgets/oa-widget-map-base-location/styles.js +12 -0
- package/build/widgets/oa-widget-membershipcard/MembershipCard.js +266 -0
- package/build/widgets/oa-widget-membershipcard/styles.js +13 -0
- package/build/widgets/oa-widget-multiple-collapse-with-slots/MultipleCollapseWithSlots.js +85 -0
- package/build/widgets/oa-widget-multiple-collapse-with-slots/checkactive.svg +8 -0
- package/build/widgets/oa-widget-multiple-collapse-with-slots/checkhover.svg +8 -0
- package/build/widgets/oa-widget-multiple-collapse-with-slots/styles.js +16 -0
- package/build/widgets/oa-widget-notes/NotesWidget.js +135 -0
- package/build/widgets/oa-widget-notes/styles.js +13 -0
- package/build/widgets/oa-widget-pincode-base-location/PincodeBaseLocation.js +281 -0
- package/build/widgets/oa-widget-pincode-base-location/styles.js +12 -0
- package/build/widgets/oa-widget-plan-card/PlanCard.js +183 -0
- package/build/widgets/oa-widget-plan-card/styles.js +13 -0
- package/build/widgets/oa-widget-preview/Preview.js +172 -0
- package/build/widgets/oa-widget-preview/ZoomImageComponent.js +95 -0
- package/build/widgets/oa-widget-preview/styles.js +12 -0
- package/build/widgets/oa-widget-profile-data/ProfileDataWidget.js +117 -0
- package/build/widgets/oa-widget-profile-data/styles.js +13 -0
- package/build/widgets/oa-widget-progressive-steps/ProgressiveStepsWidget.js +362 -0
- package/build/widgets/oa-widget-progressive-steps/styles.js +12 -0
- package/build/widgets/oa-widget-reimbursement-breakup/ReimbursementBreakupWidget.js +141 -0
- package/build/widgets/oa-widget-reimbursement-breakup/styles.js +12 -0
- package/build/widgets/oa-widget-repair-service/RepairServiceWidget.js +79 -0
- package/build/widgets/oa-widget-repair-service/styles.js +12 -0
- package/build/widgets/oa-widget-reupload-drawer/ReUploadDrawer.js +164 -0
- package/build/widgets/oa-widget-send-payment-link/SendPaymentLinkWidget.js +224 -0
- package/build/widgets/oa-widget-send-payment-link/styles.js +15 -0
- package/build/widgets/oa-widget-servicecard/ServiceCard.js +185 -0
- package/build/widgets/oa-widget-servicecard/styles.js +13 -0
- package/build/widgets/oa-widget-sidebar/SidebarWidget.js +105 -0
- package/build/widgets/oa-widget-sidebar/components/Header.js +33 -0
- package/build/widgets/oa-widget-sidebar/sidebar.css +0 -0
- package/build/widgets/oa-widget-sidebar/styles.js +13 -0
- package/build/widgets/oa-widget-spare-part/SparePartsCollapseWidget.js +127 -0
- package/build/widgets/oa-widget-spare-part/SparePartsWidget.js +294 -0
- package/build/widgets/oa-widget-spare-part/styles.js +18 -0
- package/build/widgets/oa-widget-stage-timeline/StageTimelineWidget.js +159 -0
- package/build/widgets/oa-widget-stage-timeline/styles.js +29 -0
- package/build/widgets/oa-widget-track-shipment/TrackShipmentWidget.js +232 -0
- package/build/widgets/oa-widget-track-shipment/styles.js +13 -0
- package/build/widgets/oa-widget-track-shipment-list/TrackShipmentWidgetList.js +103 -0
- package/build/widgets/oa-widget-track-shipment-list/fn.js +81 -0
- package/build/widgets/oa-widget-track-shipment-list/styles.js +13 -0
- package/build/widgets/oa-widget-upload-download/UploadDownloadWidget.js +167 -0
- package/build/widgets/oa-widget-upload-download/styles.js +14 -0
- package/build/widgets/oa-widget-user-management/UserManagementWidget.js +352 -0
- package/build/widgets/oa-widget-user-management/styles.js +15 -0
- package/build/widgets/oa-widget-view-history/ViewHistoryWidget.js +181 -0
- package/build/widgets/oa-widget-view-history/styles.js +12 -0
- package/build/widgets/oa-widget-view-previous-description/ViewPreviousDescriptionWidget.js +188 -0
- package/build/widgets/oa-widget-view-previous-description/styles.js +16 -0
- package/package.json +100 -0
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.assign.js");
|
|
4
|
+
require("core-js/modules/es.weak-map.js");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
require("core-js/modules/es.promise.js");
|
|
10
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
11
|
+
var _icons = require("@ant-design/icons");
|
|
12
|
+
var _antd = require("antd");
|
|
13
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
var _CustomModal = _interopRequireDefault(require("../../components/oa-component-modal/CustomModal"));
|
|
16
|
+
var _CustomViewer = _interopRequireDefault(require("../oa-component-viewer/CustomViewer"));
|
|
17
|
+
var _ColorVariablesMap = _interopRequireDefault(require("../../global-css/ColorVariablesMap"));
|
|
18
|
+
var _handIcon = _interopRequireDefault(require("../../images/hand-icon.svg"));
|
|
19
|
+
var _PdfSampleImage = _interopRequireDefault(require("../../images/PdfSampleImage.png"));
|
|
20
|
+
var _styles = require("./styles");
|
|
21
|
+
const _excluded = ["uploadedDocuments", "handleCustomOnChange", "multipleDoc", "showDelete", "formName", "getPreview", "isMandatory", "noOfUpload", "downloadCallback", "showDownloadButton", "showDeleteButton", "deleteHandler", "showRoateButton", "showZoomInButton", "showZoomOutButton"];
|
|
22
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
23
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
26
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
27
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
28
|
+
/**
|
|
29
|
+
* Takes a file and returns a Promise that resolves with the file as a base64 encoded string.
|
|
30
|
+
* The Promise is rejected if there is an error reading the file.
|
|
31
|
+
* @param {File} file The file to be converted to base64
|
|
32
|
+
* @returns {Promise<string>} A Promise that resolves with the file as a base64 encoded string
|
|
33
|
+
*/
|
|
34
|
+
const getBase64 = file => new Promise((resolve, reject) => {
|
|
35
|
+
const reader = new FileReader();
|
|
36
|
+
reader.readAsDataURL(file);
|
|
37
|
+
reader.onload = () => resolve(reader.result);
|
|
38
|
+
reader.onerror = error => reject(error);
|
|
39
|
+
});
|
|
40
|
+
/**
|
|
41
|
+
* Downloads a file from a base64 encoded string.
|
|
42
|
+
* @param {string} base64String The base64 encoded string of the file to be downloaded
|
|
43
|
+
* @param {string} [fileName] The name of the file to be downloaded. If not provided, the file will be downloaded with the name 'download'.
|
|
44
|
+
* @returns {undefined}
|
|
45
|
+
*/
|
|
46
|
+
const downloadFile = (base64String, fileName) => {
|
|
47
|
+
const link = document.createElement('a');
|
|
48
|
+
link.href = base64String;
|
|
49
|
+
link.download = fileName || 'download';
|
|
50
|
+
link.click();
|
|
51
|
+
};
|
|
52
|
+
function isImageFile(fileName) {
|
|
53
|
+
var _fileName$split;
|
|
54
|
+
// Extract the file extension from the file name
|
|
55
|
+
const fileExtension = fileName === null || fileName === void 0 || (_fileName$split = fileName.split('.')) === null || _fileName$split === void 0 || (_fileName$split = _fileName$split.pop()) === null || _fileName$split === void 0 ? void 0 : _fileName$split.toLowerCase();
|
|
56
|
+
|
|
57
|
+
// Define an array of image file extensions
|
|
58
|
+
const imageFileExtensions = ['jpg', 'jpeg', 'png'];
|
|
59
|
+
|
|
60
|
+
// Check if the file extension is in the array of image file extensions
|
|
61
|
+
if (imageFileExtensions.indexOf(fileExtension) !== -1) {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* DocumentUpload is a component that allows users to upload documents. It takes a number of props which control its behavior.
|
|
68
|
+
* @param {object} props The props passed to the component
|
|
69
|
+
* @param {array} [props.uploadedDocuments=[]] An array of documents that have already been uploaded
|
|
70
|
+
* @param {function} props.handleCustomOnChange A function that is called whenever the list of uploaded documents changes
|
|
71
|
+
* @param {number} [props.multipleDoc=0] The maximum number of documents that can be uploaded. If set to 0, there is no limit
|
|
72
|
+
* @param {boolean} [props.showDelete=false] Whether or not to show a delete button next to each uploaded document
|
|
73
|
+
* @param {string} [props.formName] The name of the form field that the uploaded documents should be associated with
|
|
74
|
+
* @param {function} [props.getPreview] A function that is called whenever the user clicks on an uploaded document. It should return a Promise that resolves with the URL of the document
|
|
75
|
+
* @param {boolean} [props.isMandatory=false] Whether or not the component is mandatory
|
|
76
|
+
* @param {number} [props.noOfUpload=1] The number of document that can be uploaded.
|
|
77
|
+
* @param {function} [props.downloadCallback] A function that is called whenever the user clicks on the download button. It should return a Promise that resolves with the URL of the document
|
|
78
|
+
* @param {function} [props.deleteHandler] A function that is called whenever the user clicks on the delete button. It should return a Promise that resolves with the deleted document
|
|
79
|
+
* @returns {object} A React component
|
|
80
|
+
*/
|
|
81
|
+
function DocumentUpload(_ref) {
|
|
82
|
+
let {
|
|
83
|
+
uploadedDocuments = [],
|
|
84
|
+
handleCustomOnChange,
|
|
85
|
+
multipleDoc,
|
|
86
|
+
showDelete,
|
|
87
|
+
formName,
|
|
88
|
+
getPreview,
|
|
89
|
+
isMandatory,
|
|
90
|
+
noOfUpload,
|
|
91
|
+
downloadCallback,
|
|
92
|
+
showDownloadButton,
|
|
93
|
+
showDeleteButton,
|
|
94
|
+
deleteHandler,
|
|
95
|
+
showRoateButton,
|
|
96
|
+
showZoomInButton,
|
|
97
|
+
showZoomOutButton
|
|
98
|
+
} = _ref,
|
|
99
|
+
antDesignProps = _objectWithoutProperties(_ref, _excluded);
|
|
100
|
+
const [previewOpen, setPreviewOpen] = (0, _react.useState)(false);
|
|
101
|
+
const [previewImage, setPreviewImage] = (0, _react.useState)(null);
|
|
102
|
+
const [previewTitle, setPreviewTitle] = (0, _react.useState)('');
|
|
103
|
+
const [loading, setLoading] = (0, _react.useState)(false);
|
|
104
|
+
const [fileList, setFileList] = (0, _react.useState)(uploadedDocuments);
|
|
105
|
+
const [deleteConfirmation, setDeleteConfirmation] = (0, _react.useState)(false);
|
|
106
|
+
const [selectedFile, setSelectedFile] = (0, _react.useState)(null);
|
|
107
|
+
const [selectedDocumentData, setSelectedDocumentData] = (0, _react.useState)({});
|
|
108
|
+
(0, _react.useEffect)(() => {
|
|
109
|
+
setFileList(uploadedDocuments);
|
|
110
|
+
}, [uploadedDocuments === null || uploadedDocuments === void 0 ? void 0 : uploadedDocuments.length]);
|
|
111
|
+
const handlePreview = async file => {
|
|
112
|
+
if (file !== null && file !== void 0 && file.originFileObj) {
|
|
113
|
+
setPreviewImage(file);
|
|
114
|
+
} else if ((file === null || file === void 0 ? void 0 : file.fileType) === 'thumbnail') {
|
|
115
|
+
const url = await getPreview();
|
|
116
|
+
setPreviewImage(url);
|
|
117
|
+
} else {
|
|
118
|
+
setPreviewImage(file === null || file === void 0 ? void 0 : file.url);
|
|
119
|
+
}
|
|
120
|
+
setPreviewTitle(file === null || file === void 0 ? void 0 : file.name);
|
|
121
|
+
setPreviewOpen(true);
|
|
122
|
+
setSelectedDocumentData(file);
|
|
123
|
+
};
|
|
124
|
+
const handleChange = async _ref2 => {
|
|
125
|
+
let {
|
|
126
|
+
fileList: newFileList,
|
|
127
|
+
file
|
|
128
|
+
} = _ref2;
|
|
129
|
+
const modifiedList = await Promise.all(newFileList.map(async files => {
|
|
130
|
+
let modifiedFile = files;
|
|
131
|
+
setLoading(true);
|
|
132
|
+
try {
|
|
133
|
+
if ((file === null || file === void 0 ? void 0 : file.uid) === (files === null || files === void 0 ? void 0 : files.uid)) {
|
|
134
|
+
await handleCustomOnChange(files);
|
|
135
|
+
modifiedFile.status = 'done';
|
|
136
|
+
if (!isImageFile(file === null || file === void 0 ? void 0 : file.name)) {
|
|
137
|
+
modifiedFile.url = _PdfSampleImage.default;
|
|
138
|
+
// delete modifiedFile?.type;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
} catch (error) {
|
|
142
|
+
modifiedFile = null;
|
|
143
|
+
}
|
|
144
|
+
setLoading(false);
|
|
145
|
+
return modifiedFile;
|
|
146
|
+
}));
|
|
147
|
+
const tempList = modifiedList === null || modifiedList === void 0 ? void 0 : modifiedList.filter(Boolean);
|
|
148
|
+
setFileList(tempList);
|
|
149
|
+
};
|
|
150
|
+
const uploadButton = /*#__PURE__*/_react.default.createElement("button", {
|
|
151
|
+
style: {
|
|
152
|
+
border: 0,
|
|
153
|
+
background: 'none'
|
|
154
|
+
},
|
|
155
|
+
type: "button"
|
|
156
|
+
}, loading ? /*#__PURE__*/_react.default.createElement(_icons.LoadingOutlined, null) :
|
|
157
|
+
/*#__PURE__*/
|
|
158
|
+
// <CustomIcon
|
|
159
|
+
// className="UploadImg"
|
|
160
|
+
// alt="phone img"
|
|
161
|
+
// src={offerImg}
|
|
162
|
+
// />
|
|
163
|
+
_react.default.createElement(_icons.UploadOutlined, null), /*#__PURE__*/_react.default.createElement("div", null, "Upload"));
|
|
164
|
+
const DeleteFile = async () => {
|
|
165
|
+
await deleteHandler(selectedFile);
|
|
166
|
+
setDeleteConfirmation(false);
|
|
167
|
+
if (showDeleteButton) {
|
|
168
|
+
setPreviewOpen(false);
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
const handleRemove = file => new Promise((resolve, reject) => {
|
|
172
|
+
setSelectedFile(file);
|
|
173
|
+
setDeleteConfirmation(true);
|
|
174
|
+
resolve(false);
|
|
175
|
+
});
|
|
176
|
+
const handleModalDeleteButton = file => {
|
|
177
|
+
setSelectedFile(file);
|
|
178
|
+
setDeleteConfirmation(true);
|
|
179
|
+
};
|
|
180
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.MainStyleSec, null, /*#__PURE__*/_react.default.createElement(_styles.StyledSection, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
181
|
+
className: "uploadDiv"
|
|
182
|
+
}, multipleDoc > 0 && /*#__PURE__*/_react.default.createElement("em", null, multipleDoc), /*#__PURE__*/_react.default.createElement(_antd.ConfigProvider, {
|
|
183
|
+
theme: {
|
|
184
|
+
token: {
|
|
185
|
+
colorBorder: _ColorVariablesMap.default['--color-divider'],
|
|
186
|
+
borderRadiusLG: 4,
|
|
187
|
+
colorPrimaryHover: _ColorVariablesMap.default['--color-primary'],
|
|
188
|
+
colorPrimaryBorder: _ColorVariablesMap.default['--color-divider'],
|
|
189
|
+
colorFillAlter: _ColorVariablesMap.default['--color-secondary-background'],
|
|
190
|
+
colorError: _ColorVariablesMap.default['--color-negative'],
|
|
191
|
+
colorText: _ColorVariablesMap.default['--color-secondary-content']
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
195
|
+
name: formName,
|
|
196
|
+
rules: [{
|
|
197
|
+
validator: (rule, value) => {
|
|
198
|
+
if (isMandatory && !(value !== null && value !== void 0 && value.length)) {
|
|
199
|
+
if (typeof value === 'object' && Object.keys(value).length > 0) {
|
|
200
|
+
return Promise.resolve();
|
|
201
|
+
}
|
|
202
|
+
return Promise.reject(new Error('Please upload the document.'));
|
|
203
|
+
}
|
|
204
|
+
return Promise.resolve();
|
|
205
|
+
}
|
|
206
|
+
}]
|
|
207
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Upload, _extends({
|
|
208
|
+
customRequest: () => {},
|
|
209
|
+
listType: "picture-card",
|
|
210
|
+
fileList: fileList,
|
|
211
|
+
onPreview: handlePreview,
|
|
212
|
+
onChange: handleChange,
|
|
213
|
+
onRemove: handleRemove,
|
|
214
|
+
showUploadList: {
|
|
215
|
+
showDownloadIcon: false,
|
|
216
|
+
showRemoveIcon: showDelete,
|
|
217
|
+
removeIcon: /*#__PURE__*/_react.default.createElement(_icons.DeleteFilled, null),
|
|
218
|
+
previewIcon: /*#__PURE__*/_react.default.createElement(_icons.EyeFilled, null)
|
|
219
|
+
}
|
|
220
|
+
}, antDesignProps), (fileList === null || fileList === void 0 ? void 0 : fileList.length) >= noOfUpload ? null : uploadButton)))))), previewOpen && /*#__PURE__*/_react.default.createElement(_CustomViewer.default, {
|
|
221
|
+
open: previewOpen,
|
|
222
|
+
previewFile: previewImage,
|
|
223
|
+
title: previewTitle,
|
|
224
|
+
onCancel: () => setPreviewOpen(false),
|
|
225
|
+
downloadCallback: downloadCallback,
|
|
226
|
+
deleteCallback: handleModalDeleteButton,
|
|
227
|
+
selectedDocumentData: selectedDocumentData,
|
|
228
|
+
showDownloadButton: showDownloadButton,
|
|
229
|
+
showDeleteButton: showDeleteButton,
|
|
230
|
+
showRoateButton: showRoateButton,
|
|
231
|
+
showZoomInButton: showZoomInButton,
|
|
232
|
+
showZoomOutButton: showZoomOutButton
|
|
233
|
+
}), deleteConfirmation && /*#__PURE__*/_react.default.createElement(_CustomModal.default, {
|
|
234
|
+
buttonConfig: [{
|
|
235
|
+
callback: () => DeleteFile(),
|
|
236
|
+
label: 'Yes, Delete',
|
|
237
|
+
type: 'danger-primary'
|
|
238
|
+
}],
|
|
239
|
+
imgSrc: _handIcon.default,
|
|
240
|
+
open: deleteConfirmation,
|
|
241
|
+
onCancel: () => setDeleteConfirmation(false),
|
|
242
|
+
title: "Delete Item?",
|
|
243
|
+
className: "delete-modal-confirmation"
|
|
244
|
+
}, "This action will permanently delete the selected item"));
|
|
245
|
+
}
|
|
246
|
+
DocumentUpload.propTypes = {
|
|
247
|
+
uploadedDocuments: _propTypes.default.array,
|
|
248
|
+
handleCustomOnChange: _propTypes.default.func,
|
|
249
|
+
deleteHandler: _propTypes.default.func,
|
|
250
|
+
formName: _propTypes.default.string,
|
|
251
|
+
showDelete: _propTypes.default.bool,
|
|
252
|
+
multipleDoc: _propTypes.default.number,
|
|
253
|
+
getPreview: _propTypes.default.func,
|
|
254
|
+
// Define the getPreview prop type
|
|
255
|
+
isMandatory: _propTypes.default.bool,
|
|
256
|
+
noOfUpload: _propTypes.default.number,
|
|
257
|
+
downloadCallback: _propTypes.default.func,
|
|
258
|
+
// function will be used to download the document
|
|
259
|
+
deleteCallback: _propTypes.default.func,
|
|
260
|
+
// function will be used to delete the document
|
|
261
|
+
showDownloadButton: _propTypes.default.bool,
|
|
262
|
+
showDeleteButton: _propTypes.default.bool,
|
|
263
|
+
showRoateButton: _propTypes.default.bool,
|
|
264
|
+
showZoomInButton: _propTypes.default.bool,
|
|
265
|
+
showZoomOutButton: _propTypes.default.bool
|
|
266
|
+
};
|
|
267
|
+
DocumentUpload.defaultProps = {
|
|
268
|
+
uploadedDocuments: [],
|
|
269
|
+
handleCustomOnChange: () => {},
|
|
270
|
+
formName: '',
|
|
271
|
+
multipleDoc: 0,
|
|
272
|
+
showDelete: true,
|
|
273
|
+
getPreview: () => {},
|
|
274
|
+
isMandatory: true,
|
|
275
|
+
deleteHandler: () => {},
|
|
276
|
+
noOfUpload: 1,
|
|
277
|
+
downloadCallback: () => {},
|
|
278
|
+
deleteCallback: () => {},
|
|
279
|
+
showDeleteButton: false,
|
|
280
|
+
showDownloadButton: true,
|
|
281
|
+
showRoateButton: true,
|
|
282
|
+
showZoomInButton: true,
|
|
283
|
+
showZoomOutButton: true
|
|
284
|
+
};
|
|
285
|
+
var _default = exports.default = DocumentUpload;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StyledSection = exports.MainStyleSec = void 0;
|
|
7
|
+
var _antd = require("antd");
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
var _templateObject, _templateObject2;
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
12
|
+
const MainStyleSec = exports.MainStyleSec = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.ant-upload-list{\n display: flex !important;\n gap: 16px !important;\n flex-wrap: wrap !important;\n}\n.ant-upload-wrapper .ant-upload-list::before {\n display: none;\n}\n.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload.ant-upload-select,.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container{\n width: 96px;\n height: 96px;\n margin-block: 0;\n margin-inline: 0;\n}\n.ant-upload-select button > span.UploadImg{\n width: 24px !important;\n height: 24px;\n}\n.ant-upload-select button > span.UploadImg > img{\n width: 100% !important;\n}\n.ant-upload-list-item-container:last-child{\n margin: 0 !important;\n}\n.ant-form-item{\n margin-bottom: 0;\n}\n.ant-upload button{\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n} \n\n.uploadSecPad div{\n padding: 0 0 8px;\n}\n.anticon-upload{\n font-size: 24px;\n}\n.ant-upload-disabled .button{\n cursor: not-allowed;\n}\n.uploadSecPad{\n width: 100%;\n}\n.uploadSecPad div:last-child{\n padding: 0;\n}\n display: flex;\n flex-direction: column;\n gap: 24px;\n .ant-upload-list-item-done,.ant-upload-list-item-A{\n border: 1px solid var(--color-divider) !important;\n }\n \n .ant-upload-list-item-actions{\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 16px;\n }\n \n.ant-upload-list-item-actions button{\n background: #212121;\n border-radius: 50px;\n height: 24px !important;\n display: flex;\n align-items: center;\n}\n.ant-btn-text:not(:disabled):not(.ant-btn-disabled):hover{\n background: #212121;\n}\n .ant-upload-list-item-actions a{\n background: #212121;\n border-radius: 50px;\n height: 24px;\n display: flex;\n }\n \n .ant-upload-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item{\n opacity: 1 !important;\n }\n \n @media only screen and (max-width: 600px) {\n .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container,.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload.ant-upload-select{\n width: 64px;\n height: 64px;\n }\n .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item::before,.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-actions,.ant-upload-wrapper .ant-upload-list .ant-upload-list-item .ant-upload-list-item-actions .ant-upload-list-item-action {\n opacity: 1;\n }\n .ant-upload-list-item-actions a {\n height: 16px;\n align-items: center;\n justify-content: center;\n width: 16px !important;\n }\n .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-eye, .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-delete {\n font-size: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0px !important;\n padding: 0px !important;\n color: #fff;\n}\n }\n"])));
|
|
13
|
+
const StyledSection = exports.StyledSection = _styledComponents.default.section(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n gap: 16px;\n justify-content: space-between;\n h2{\n margin: 0;\n }\n \n @media only screen and (max-width: 600px) {\n \n .ant-upload-list-item-actions button {\n height: 16px!important;\n width: 16px !important;\n justify-content: center;\n }\n .ant-upload-list-item-actions a {\n height: 16px;\n width: 16px !important;\n align-items: center;\n justify-content: center;\n}\n .ant-upload-list-item-actions {\n gap: 8px;\n }\n .ant-upload button span + div{\n display: none;\n }\n }\n"])));
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.assign.js");
|
|
4
|
+
require("core-js/modules/es.weak-map.js");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
10
|
+
require("core-js/modules/web.url.js");
|
|
11
|
+
require("core-js/modules/web.url-search-params.js");
|
|
12
|
+
require("core-js/modules/es.array.includes.js");
|
|
13
|
+
var _Add = _interopRequireDefault(require("@material-ui/icons/Add"));
|
|
14
|
+
var _ArrowBackIos = _interopRequireDefault(require("@material-ui/icons/ArrowBackIos"));
|
|
15
|
+
var _ArrowForwardIos = _interopRequireDefault(require("@material-ui/icons/ArrowForwardIos"));
|
|
16
|
+
var _DeleteOutline = _interopRequireDefault(require("@material-ui/icons/DeleteOutline"));
|
|
17
|
+
var _Remove = _interopRequireDefault(require("@material-ui/icons/Remove"));
|
|
18
|
+
var _Rotate90DegreesCcw = _interopRequireDefault(require("@material-ui/icons/Rotate90DegreesCcw"));
|
|
19
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
20
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
21
|
+
var _reactPdf = require("react-pdf");
|
|
22
|
+
require("react-pdf/dist/esm/Page/AnnotationLayer.css");
|
|
23
|
+
var _reactZoomPanPinch = require("react-zoom-pan-pinch");
|
|
24
|
+
var _MaterialIcon = _interopRequireDefault(require("../../components/oa-component-icons/MaterialIcon"));
|
|
25
|
+
var _CustomLoader = _interopRequireDefault(require("../../components/oa-component-loader/CustomLoader"));
|
|
26
|
+
var _CustomModal = _interopRequireDefault(require("../../components/oa-component-modal/CustomModal"));
|
|
27
|
+
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
28
|
+
var _styles = require("./styles");
|
|
29
|
+
const _excluded = ["downloadCallback", "deleteCallback", "title", "selectedDocumentData", "previewFile", "fileName", "showDownloadButton", "showDeleteButton", "showRoateButton", "showZoomInButton", "showZoomOutButton"],
|
|
30
|
+
_excluded2 = ["zoomIn", "zoomOut"];
|
|
31
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
32
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
33
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
34
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
35
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
36
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
37
|
+
_reactPdf.pdfjs.GlobalWorkerOptions.workerSrc = "//cdnjs.cloudflare.com/ajax/libs/pdf.js/".concat(_reactPdf.pdfjs.version, "/pdf.worker.js");
|
|
38
|
+
const supportedImage = ['png', 'jpeg', 'jpg'];
|
|
39
|
+
const supportedPdf = ['pdf'];
|
|
40
|
+
const supportedVideos = ['mp4', 'mkv', 'webm'];
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Renders content based on the specified format.
|
|
44
|
+
*
|
|
45
|
+
* @param {string} format - The format of the content to render ('PDF' or 'IMAGE').
|
|
46
|
+
* @param {boolean} file - Indicates if a file is present.
|
|
47
|
+
* @param {string} url - The URL of the file to render.
|
|
48
|
+
* @param {number} pageNumber - The page number to render for PDF files.
|
|
49
|
+
* @param {function} onDocumentLoadSuccess - Callback function to handle successful document load.
|
|
50
|
+
*
|
|
51
|
+
* @returns {React.ReactElement} - A React element representing the rendered content.
|
|
52
|
+
* If the format is 'PDF' and a file is present, it renders a PDF document.
|
|
53
|
+
* If the format is 'IMAGE' and a file is present, it renders an image.
|
|
54
|
+
* Displays a loader if the file is not present.
|
|
55
|
+
* Returns a message for unsupported file formats.
|
|
56
|
+
*/
|
|
57
|
+
const renderContent = (format, file, url, pageNumber, onDocumentLoadSuccess) => {
|
|
58
|
+
if (format === 'PDF') {
|
|
59
|
+
return file ? /*#__PURE__*/_react.default.createElement(_reactPdf.Document, {
|
|
60
|
+
file: url,
|
|
61
|
+
onLoadSuccess: onDocumentLoadSuccess
|
|
62
|
+
}, /*#__PURE__*/_react.default.createElement(_reactPdf.Page, {
|
|
63
|
+
pageNumber: pageNumber
|
|
64
|
+
})) : /*#__PURE__*/_react.default.createElement(_CustomLoader.default, null);
|
|
65
|
+
}
|
|
66
|
+
if (format === 'IMAGE') {
|
|
67
|
+
return file ? /*#__PURE__*/_react.default.createElement("div", {
|
|
68
|
+
className: "overflowScroll"
|
|
69
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
70
|
+
alt: "example",
|
|
71
|
+
style: {
|
|
72
|
+
width: '100%'
|
|
73
|
+
},
|
|
74
|
+
src: url
|
|
75
|
+
})) : /*#__PURE__*/_react.default.createElement(_CustomLoader.default, null);
|
|
76
|
+
}
|
|
77
|
+
if (format === 'VIDEO') {
|
|
78
|
+
return file ? /*#__PURE__*/_react.default.createElement("video", {
|
|
79
|
+
controls: true,
|
|
80
|
+
style: {
|
|
81
|
+
width: '100%'
|
|
82
|
+
},
|
|
83
|
+
src: url
|
|
84
|
+
}, /*#__PURE__*/_react.default.createElement("track", {
|
|
85
|
+
kind: "captions"
|
|
86
|
+
})) : /*#__PURE__*/_react.default.createElement(_CustomLoader.default, null);
|
|
87
|
+
}
|
|
88
|
+
return /*#__PURE__*/_react.default.createElement("div", null, "Unsupported file format");
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Component that renders controls for zooming, rotating and navigating through the pages of a PDF document.
|
|
93
|
+
*
|
|
94
|
+
* @param {function} setRotationDegree - Callback function to change the rotation degree of the document.
|
|
95
|
+
* @param {number} pageNumber - The current page number of the document.
|
|
96
|
+
* @param {number} numPages - The total number of pages in the document.
|
|
97
|
+
* @param {function} setPageNumber - Callback function to change the current page number of the document.
|
|
98
|
+
* @param {function} getFileFormat - Function that returns the format of the document ('PDF' or 'IMAGE').
|
|
99
|
+
* @param {function} handleZoomIn - Callback function to handle zooming in.
|
|
100
|
+
* @param {function} handleZoomOut - Callback function to handle zooming out.
|
|
101
|
+
*
|
|
102
|
+
* @returns {React.ReactElement} - A React element that renders the controls.
|
|
103
|
+
*/
|
|
104
|
+
function Controls(_ref) {
|
|
105
|
+
let {
|
|
106
|
+
setRotationDegree,
|
|
107
|
+
pageNumber,
|
|
108
|
+
numPages,
|
|
109
|
+
setPageNumber,
|
|
110
|
+
getFileFormat,
|
|
111
|
+
handleZoomIn,
|
|
112
|
+
handleZoomOut,
|
|
113
|
+
showRoateButton,
|
|
114
|
+
showZoomInButton,
|
|
115
|
+
showZoomOutButton
|
|
116
|
+
} = _ref;
|
|
117
|
+
const rotate = () => {
|
|
118
|
+
setRotationDegree(prevRotationDegree => prevRotationDegree + 90);
|
|
119
|
+
};
|
|
120
|
+
const handleKeyPress = (event, callback) => {
|
|
121
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
122
|
+
callback();
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
return /*#__PURE__*/_react.default.createElement(_styles.StyledZoom, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
126
|
+
className: "flextBodyContain"
|
|
127
|
+
}, showZoomInButton && /*#__PURE__*/_react.default.createElement("div", {
|
|
128
|
+
role: "button",
|
|
129
|
+
tabIndex: 0,
|
|
130
|
+
onClick: handleZoomIn,
|
|
131
|
+
onKeyDown: event => handleKeyPress(event, handleZoomIn),
|
|
132
|
+
className: "iconWidthPad"
|
|
133
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
134
|
+
size: 18,
|
|
135
|
+
icon: _Add.default,
|
|
136
|
+
color: "primary"
|
|
137
|
+
})), showZoomOutButton && /*#__PURE__*/_react.default.createElement("div", {
|
|
138
|
+
role: "button",
|
|
139
|
+
tabIndex: 0,
|
|
140
|
+
onClick: handleZoomOut,
|
|
141
|
+
onKeyDown: event => handleKeyPress(event, handleZoomOut),
|
|
142
|
+
className: "iconWidthPad"
|
|
143
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
144
|
+
size: 18,
|
|
145
|
+
icon: _Remove.default,
|
|
146
|
+
color: "primary"
|
|
147
|
+
}))), getFileFormat === 'PDF' && /*#__PURE__*/_react.default.createElement("div", {
|
|
148
|
+
className: "flextBodyContain pdfFlexStyles"
|
|
149
|
+
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
150
|
+
type: "button",
|
|
151
|
+
tabIndex: 0,
|
|
152
|
+
onClick: () => setPageNumber(pageNumber - 1),
|
|
153
|
+
onKeyDown: event => handleKeyPress(event, () => setPageNumber(pageNumber - 1)),
|
|
154
|
+
className: "iconWidthPad iconWidthPadPdf",
|
|
155
|
+
disabled: pageNumber <= 1
|
|
156
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
157
|
+
size: 18,
|
|
158
|
+
icon: _ArrowBackIos.default
|
|
159
|
+
})), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
160
|
+
className: "type-b2-400",
|
|
161
|
+
color: "primary-content"
|
|
162
|
+
}, "Page", ' ', pageNumber, ' ', "of", ' ', numPages), /*#__PURE__*/_react.default.createElement("button", {
|
|
163
|
+
type: "button",
|
|
164
|
+
tabIndex: 0,
|
|
165
|
+
onClick: () => setPageNumber(pageNumber + 1),
|
|
166
|
+
onKeyDown: event => handleKeyPress(event, () => setPageNumber(pageNumber + 1)),
|
|
167
|
+
className: "iconWidthPad iconWidthPadPdf",
|
|
168
|
+
disabled: pageNumber >= numPages
|
|
169
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
170
|
+
size: 18,
|
|
171
|
+
icon: _ArrowForwardIos.default
|
|
172
|
+
}))), showRoateButton && /*#__PURE__*/_react.default.createElement("div", {
|
|
173
|
+
role: "button",
|
|
174
|
+
tabIndex: 0,
|
|
175
|
+
onClick: rotate,
|
|
176
|
+
onKeyDown: event => handleKeyPress(event, rotate),
|
|
177
|
+
className: "iconWidthPad posroated"
|
|
178
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
179
|
+
size: 18,
|
|
180
|
+
icon: _Rotate90DegreesCcw.default,
|
|
181
|
+
color: "primary"
|
|
182
|
+
})));
|
|
183
|
+
}
|
|
184
|
+
Controls.propTypes = {
|
|
185
|
+
setRotationDegree: _propTypes.default.func.isRequired,
|
|
186
|
+
pageNumber: _propTypes.default.number.isRequired,
|
|
187
|
+
numPages: _propTypes.default.number.isRequired,
|
|
188
|
+
setPageNumber: _propTypes.default.func.isRequired,
|
|
189
|
+
getFileFormat: _propTypes.default.string.isRequired,
|
|
190
|
+
handleZoomIn: _propTypes.default.func.isRequired,
|
|
191
|
+
handleZoomOut: _propTypes.default.func.isRequired,
|
|
192
|
+
showRoateButton: _propTypes.default.bool.isRequired,
|
|
193
|
+
showZoomInButton: _propTypes.default.bool.isRequired,
|
|
194
|
+
showZoomOutButton: _propTypes.default.bool.isRequired
|
|
195
|
+
};
|
|
196
|
+
function CustomViewer(_ref2) {
|
|
197
|
+
let {
|
|
198
|
+
downloadCallback,
|
|
199
|
+
deleteCallback,
|
|
200
|
+
title,
|
|
201
|
+
selectedDocumentData,
|
|
202
|
+
previewFile,
|
|
203
|
+
fileName = 'download',
|
|
204
|
+
showDownloadButton,
|
|
205
|
+
showDeleteButton,
|
|
206
|
+
showRoateButton,
|
|
207
|
+
showZoomInButton,
|
|
208
|
+
showZoomOutButton
|
|
209
|
+
} = _ref2,
|
|
210
|
+
antDesignProps = _objectWithoutProperties(_ref2, _excluded);
|
|
211
|
+
const [rotationDegree, setRotationDegree] = (0, _react.useState)(0);
|
|
212
|
+
const [numPages, setNumPages] = (0, _react.useState)(null);
|
|
213
|
+
const [pageNumber, setPageNumber] = (0, _react.useState)(1);
|
|
214
|
+
const [initialScale, setInitialScale] = (0, _react.useState)(1);
|
|
215
|
+
const [scale, setScale] = (0, _react.useState)(1);
|
|
216
|
+
const onDocumentLoadSuccess = _ref3 => {
|
|
217
|
+
let {
|
|
218
|
+
numPages: pages
|
|
219
|
+
} = _ref3;
|
|
220
|
+
setNumPages(pages);
|
|
221
|
+
setPageNumber(1);
|
|
222
|
+
};
|
|
223
|
+
const handleZoomIn = () => {
|
|
224
|
+
setScale(scale + 0.1);
|
|
225
|
+
};
|
|
226
|
+
const handleZoomOut = () => {
|
|
227
|
+
if (scale > initialScale) {
|
|
228
|
+
setScale(scale - 0.1);
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
const getUrl = (0, _react.useMemo)(() => {
|
|
232
|
+
if (typeof previewFile === 'string') {
|
|
233
|
+
return previewFile;
|
|
234
|
+
}
|
|
235
|
+
if (typeof previewFile === 'object' && previewFile) {
|
|
236
|
+
return URL.createObjectURL(previewFile.originFileObj);
|
|
237
|
+
}
|
|
238
|
+
return null;
|
|
239
|
+
}, [previewFile]);
|
|
240
|
+
const getFileFormat = (0, _react.useMemo)(() => {
|
|
241
|
+
var _title$split, _previewFile$type;
|
|
242
|
+
const fileExtension = typeof previewFile === 'string' ? title === null || title === void 0 || (_title$split = title.split('.')) === null || _title$split === void 0 || (_title$split = _title$split.pop()) === null || _title$split === void 0 ? void 0 : _title$split.toLowerCase() : previewFile === null || previewFile === void 0 || (_previewFile$type = previewFile.type) === null || _previewFile$type === void 0 ? void 0 : _previewFile$type.split('/')[1];
|
|
243
|
+
if (supportedImage.includes(fileExtension)) {
|
|
244
|
+
return 'IMAGE';
|
|
245
|
+
}
|
|
246
|
+
if (supportedPdf.includes(fileExtension)) {
|
|
247
|
+
return 'PDF';
|
|
248
|
+
}
|
|
249
|
+
if (supportedVideos.includes(fileExtension)) {
|
|
250
|
+
return 'VIDEO';
|
|
251
|
+
}
|
|
252
|
+
return 'UNSUPPORTED';
|
|
253
|
+
}, [previewFile, title]);
|
|
254
|
+
return /*#__PURE__*/_react.default.createElement(_CustomModal.default, _extends({
|
|
255
|
+
width: 860,
|
|
256
|
+
className: "imageZoom",
|
|
257
|
+
buttonConfig: [...(showDownloadButton ? [{
|
|
258
|
+
callback: () => {
|
|
259
|
+
downloadCallback(selectedDocumentData);
|
|
260
|
+
},
|
|
261
|
+
label: 'Download'
|
|
262
|
+
}] : []), ...(showDeleteButton ? [{
|
|
263
|
+
callback: () => {
|
|
264
|
+
deleteCallback(selectedDocumentData);
|
|
265
|
+
},
|
|
266
|
+
label: 'Delete',
|
|
267
|
+
type: 'danger-text-only',
|
|
268
|
+
iconConfig: {
|
|
269
|
+
icon: /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
270
|
+
icon: _DeleteOutline.default,
|
|
271
|
+
size: 24
|
|
272
|
+
}),
|
|
273
|
+
position: 'left'
|
|
274
|
+
}
|
|
275
|
+
}] : [])]
|
|
276
|
+
}, antDesignProps), /*#__PURE__*/_react.default.createElement(_reactZoomPanPinch.TransformWrapper, null, _ref4 => {
|
|
277
|
+
let {
|
|
278
|
+
zoomIn,
|
|
279
|
+
zoomOut
|
|
280
|
+
} = _ref4,
|
|
281
|
+
rest = _objectWithoutProperties(_ref4, _excluded2);
|
|
282
|
+
return /*#__PURE__*/_react.default.createElement(_styles.PdfStyles, null, /*#__PURE__*/_react.default.createElement(Controls, {
|
|
283
|
+
setRotationDegree: setRotationDegree,
|
|
284
|
+
pageNumber: pageNumber,
|
|
285
|
+
numPages: numPages,
|
|
286
|
+
setPageNumber: setPageNumber,
|
|
287
|
+
getFileFormat: getFileFormat,
|
|
288
|
+
handleZoomIn: handleZoomIn,
|
|
289
|
+
handleZoomOut: handleZoomOut,
|
|
290
|
+
showRoateButton: showRoateButton,
|
|
291
|
+
showZoomInButton: showZoomInButton,
|
|
292
|
+
showZoomOutButton: showZoomOutButton
|
|
293
|
+
}), /*#__PURE__*/_react.default.createElement(_reactZoomPanPinch.TransformComponent, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
294
|
+
style: {
|
|
295
|
+
transform: "rotate(".concat(rotationDegree, "deg) scale(").concat(scale, ")")
|
|
296
|
+
}
|
|
297
|
+
}, renderContent(getFileFormat, previewFile, getUrl, pageNumber, onDocumentLoadSuccess))));
|
|
298
|
+
}));
|
|
299
|
+
}
|
|
300
|
+
CustomViewer.propTypes = {
|
|
301
|
+
title: _propTypes.default.string.isRequired,
|
|
302
|
+
previewFile: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object]).isRequired,
|
|
303
|
+
fileName: _propTypes.default.string,
|
|
304
|
+
antDesignProps: _propTypes.default.object,
|
|
305
|
+
downloadCallback: _propTypes.default.func,
|
|
306
|
+
selectedDocumentData: _propTypes.default.object,
|
|
307
|
+
showDownloadButton: _propTypes.default.bool,
|
|
308
|
+
showDeleteButton: _propTypes.default.bool,
|
|
309
|
+
deleteCallback: _propTypes.default.func,
|
|
310
|
+
showRoateButton: _propTypes.default.bool,
|
|
311
|
+
showZoomInButton: _propTypes.default.bool,
|
|
312
|
+
showZoomOutButton: _propTypes.default.bool
|
|
313
|
+
};
|
|
314
|
+
CustomViewer.defaultProps = {
|
|
315
|
+
fileName: 'download',
|
|
316
|
+
antDesignProps: {},
|
|
317
|
+
downloadCallback: () => {},
|
|
318
|
+
selectedDocumentData: {},
|
|
319
|
+
showDownloadButton: true,
|
|
320
|
+
showDeleteButton: false,
|
|
321
|
+
deleteCallback: () => {},
|
|
322
|
+
showRoateButton: true,
|
|
323
|
+
showZoomInButton: true,
|
|
324
|
+
showZoomOutButton: true
|
|
325
|
+
};
|
|
326
|
+
var _default = exports.default = CustomViewer;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.mainStyle = exports.StyledZoom = exports.PdfStyles = void 0;
|
|
7
|
+
var _antd = require("antd");
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
12
|
+
const mainStyle = exports.mainStyle = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\nposition: relative;\nbackground: red;\n"])));
|
|
13
|
+
const StyledZoom = exports.StyledZoom = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n.flextBodyContain{\n position: absolute;\n right: 52px;\n bottom: 116px;\n flex-direction: column;\n z-index: 9999;\n display: flex;\n border-radius: 4px;\n overflow: hidden;\n box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);\n}\n.posroated{\n position: absolute;\n right: 52px;\n box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);\n top: 68px;\n z-index: 999;\n border-radius: 4px;\n}\n.iconWidthPad{\n cursor: pointer;\n background: var(--color-primary-background); \n padding: 6px;\n height: 32px;\n width: 32px;\n border-bottom: 1px solid var(--color-divider);\n}\n.iconWidthPad:last-child{\n border: none;\n}\n@media screen and (max-width: 992px) {\n .posroated,.flextBodyContain{\n right: 38px;\n }\n }\n"])));
|
|
14
|
+
const PdfStyles = exports.PdfStyles = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\ncanvas{\n margin: 0 auto;\n}\n.pdfFlexStyles{\n left: 0;\n right: 0;\n bottom: 92px;\n width: fit-content;\n display: flex;\n flex-direction: row;\n align-items: center;\n background: #fff;\n margin-left: auto;\n margin-right: auto;\n padding: 8px;\n gap: 12px;\n}\n.iconWidthPadPdf {\n width: auto;\n height: auto;\n padding: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 8px;\n border: none;\n border-bottom: none;\n}\n\nbutton:disabled {\n color: var(--color-disabled-button);\n cursor: not-allowed; \n border:none;\n }\n button{\n color: var(--color-primary-content);\n }\n@media screen and (max-width: 600px) {\n\n canvas {\n width: 100% !important;\n height: auto !important;\n }\n }\n"])));
|