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,166 @@
|
|
|
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/es.array.includes.js");
|
|
11
|
+
require("core-js/modules/es.string.includes.js");
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
var _styles = require("./styles.js");
|
|
14
|
+
var _CustomCheckBox = _interopRequireDefault(require("../../components/oa-component-checkbox/CustomCheckBox"));
|
|
15
|
+
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
16
|
+
var _CustomButton = _interopRequireDefault(require("../../components/oa-component-button/CustomButton"));
|
|
17
|
+
var _MaterialIcon = _interopRequireDefault(require("../../components/oa-component-icons/MaterialIcon"));
|
|
18
|
+
var _CustomDocumentViewer = _interopRequireDefault(require("../oa-component-document-viewer/CustomDocumentViewer"));
|
|
19
|
+
var _Close = _interopRequireDefault(require("@material-ui/icons/Close"));
|
|
20
|
+
var _reactPdf = require("react-pdf");
|
|
21
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
+
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); }
|
|
24
|
+
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; }
|
|
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); } /* eslint-disable */
|
|
26
|
+
_reactPdf.pdfjs.GlobalWorkerOptions.workerSrc = "https://cdnjs.cloudflare.com/ajax/libs/pdf.js/".concat(_reactPdf.pdfjs.version, "/pdf.worker.min.js");
|
|
27
|
+
function DocumentSideModal(_ref) {
|
|
28
|
+
let {
|
|
29
|
+
headerIcon,
|
|
30
|
+
headerText,
|
|
31
|
+
infoIcon,
|
|
32
|
+
infoText,
|
|
33
|
+
onClose,
|
|
34
|
+
customDocumentViewerProps,
|
|
35
|
+
initialSelectedPages,
|
|
36
|
+
initialSlide,
|
|
37
|
+
updateSelectedPages,
|
|
38
|
+
maxPages
|
|
39
|
+
} = _ref;
|
|
40
|
+
const [carouselPageNumber, setcarouselPageNumber] = (0, _react.useState)(initialSlide !== null && initialSlide !== void 0 ? initialSlide : 0);
|
|
41
|
+
const [selectedPages, setSelectedPages] = (0, _react.useState)([]); //selected page
|
|
42
|
+
|
|
43
|
+
(0, _react.useEffect)(() => {
|
|
44
|
+
if (initialSelectedPages) {
|
|
45
|
+
setSelectedPages(initialSelectedPages);
|
|
46
|
+
}
|
|
47
|
+
}, [initialSelectedPages]);
|
|
48
|
+
(0, _react.useEffect)(() => {
|
|
49
|
+
document.body.style.overflow = "hidden";
|
|
50
|
+
return () => {
|
|
51
|
+
document.body.style.overflow = "";
|
|
52
|
+
};
|
|
53
|
+
}, []);
|
|
54
|
+
const pageRefs = (0, _react.useRef)([]);
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Handles the checkbox change event.
|
|
58
|
+
* @param {boolean} checked if the checkbox is checked or not.
|
|
59
|
+
* The function will add or remove the current page number from the selectedPages state
|
|
60
|
+
* depending on the checked status. If the checkbox is checked and the selectedPages state
|
|
61
|
+
* length is less than maxPages (default 2), it will add the current page number to the selectedPages state.
|
|
62
|
+
* If the checkbox is unchecked, it will remove the current page number from the selectedPages state.
|
|
63
|
+
*/
|
|
64
|
+
const handleCheckboxChange = checked => {
|
|
65
|
+
setSelectedPages(prevSelectedPages => {
|
|
66
|
+
if (checked) {
|
|
67
|
+
if (!prevSelectedPages.includes(carouselPageNumber) && prevSelectedPages.length < maxPages) {
|
|
68
|
+
return [...prevSelectedPages, carouselPageNumber];
|
|
69
|
+
}
|
|
70
|
+
return prevSelectedPages;
|
|
71
|
+
} else {
|
|
72
|
+
return prevSelectedPages.filter(page => page !== carouselPageNumber);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Updates the current carousel page number.
|
|
79
|
+
*
|
|
80
|
+
* @param {number} value - The new page number to set for the carousel.
|
|
81
|
+
*/
|
|
82
|
+
|
|
83
|
+
const setcarouselPageNumberHandler = value => {
|
|
84
|
+
setcarouselPageNumber(value);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Deletes the page from selectedPages state.
|
|
89
|
+
* @param {number} pageNumber - The page number to delete from the selectedPages state.
|
|
90
|
+
*/
|
|
91
|
+
const deleteSelectedPage = pageNumber => {
|
|
92
|
+
setSelectedPages(prevSelected => {
|
|
93
|
+
return prevSelected === null || prevSelected === void 0 ? void 0 : prevSelected.filter(item => item !== pageNumber);
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
const isPageSelected = (0, _react.useMemo)(() => selectedPages === null || selectedPages === void 0 ? void 0 : selectedPages.includes(carouselPageNumber), [selectedPages, carouselPageNumber]);
|
|
97
|
+
const disableCheckbox = (0, _react.useMemo)(() => !isPageSelected && selectedPages.length >= maxPages, [isPageSelected, selectedPages]);
|
|
98
|
+
return /*#__PURE__*/_react.default.createElement(_styles.Wrapper, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
99
|
+
className: "deviceName"
|
|
100
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
101
|
+
className: "type-t2-700",
|
|
102
|
+
color: "primary-background"
|
|
103
|
+
}, headerText), /*#__PURE__*/_react.default.createElement("div", {
|
|
104
|
+
style: {
|
|
105
|
+
cursor: "pointer"
|
|
106
|
+
}
|
|
107
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
108
|
+
icon: _Close.default,
|
|
109
|
+
size: 20,
|
|
110
|
+
onClick: onClose
|
|
111
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
112
|
+
className: "previewSec"
|
|
113
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomDocumentViewer.default, _extends({}, customDocumentViewerProps, {
|
|
114
|
+
setcarouselPageNumberHandler: setcarouselPageNumberHandler,
|
|
115
|
+
initialSlide: initialSlide,
|
|
116
|
+
selectedPages: selectedPages,
|
|
117
|
+
isFooterVisible: selectedPages.length > 0 // <-- new prop
|
|
118
|
+
,
|
|
119
|
+
carouselPageNumber: carouselPageNumber,
|
|
120
|
+
deleteSelectedPage: deleteSelectedPage
|
|
121
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
122
|
+
className: "footerSec"
|
|
123
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
124
|
+
className: "containerWidth"
|
|
125
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_CustomCheckBox.default, {
|
|
126
|
+
label: "Select Page ".concat(carouselPageNumber + 1),
|
|
127
|
+
checked: isPageSelected,
|
|
128
|
+
disabled: disableCheckbox,
|
|
129
|
+
onChange: e => handleCheckboxChange(e.target.checked)
|
|
130
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
131
|
+
className: "padding-top-4"
|
|
132
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
133
|
+
className: "type-b3-400",
|
|
134
|
+
color: disableCheckbox ? "warning" : "secondary-content"
|
|
135
|
+
}, "(Maximum ".concat(maxPages, " pages can be selected)")))), /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
136
|
+
label: selectedPages.length === 0 ? "Selected" : "".concat(selectedPages.length, " ").concat(selectedPages.length > 1 ? "" : "", " Selected"),
|
|
137
|
+
disabled: selectedPages.length === 0,
|
|
138
|
+
onClick: () => updateSelectedPages(selectedPages)
|
|
139
|
+
}))));
|
|
140
|
+
}
|
|
141
|
+
DocumentSideModal.propTypes = {
|
|
142
|
+
headerText: _propTypes.default.string,
|
|
143
|
+
initialSlide: _propTypes.default.number,
|
|
144
|
+
initialSelectedPages: _propTypes.default.arrayOf(_propTypes.default.number),
|
|
145
|
+
headerIcon: _propTypes.default.elementType,
|
|
146
|
+
// assuming it's a component like an Icon
|
|
147
|
+
infoIcon: _propTypes.default.elementType,
|
|
148
|
+
infoText: _propTypes.default.string,
|
|
149
|
+
onClose: _propTypes.default.func.isRequired,
|
|
150
|
+
customDocumentViewerProps: _propTypes.default.object,
|
|
151
|
+
updateSelectedPages: _propTypes.default.func.isRequired,
|
|
152
|
+
maxPages: _propTypes.default.number
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
// ✅ Default Props
|
|
156
|
+
DocumentSideModal.defaultProps = {
|
|
157
|
+
headerText: "",
|
|
158
|
+
initialSelectedPages: [],
|
|
159
|
+
initialSlide: 0,
|
|
160
|
+
headerIcon: null,
|
|
161
|
+
infoIcon: null,
|
|
162
|
+
infoText: "",
|
|
163
|
+
customDocumentViewerProps: {},
|
|
164
|
+
maxPages: 2
|
|
165
|
+
};
|
|
166
|
+
var _default = exports.default = DocumentSideModal;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.Wrapper = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject;
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
|
+
const Wrapper = exports.Wrapper = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.previewSec > div,.previewSec > div > div,.react-pdf__Document .ant-carousel,.slick-list,.slick-track,.slick-slide,.slick-slide > div,.slick-slide > div > div{\nheight: 100%;\n}\n.react-pdf__Document{\nheight: 100% !important;\noverflow: hidden !important;\nposition: relative;\n}\n.imgViewer .react-pdf__Page canvas{\n height: 100% !important;\n width: 100% !important;\n}\n.slick-slider{\n height: 100%;\n}\n display: flex;\n flex-direction: column;\n height: 100dvh;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1000;\n background: rgba(0, 0, 0, 0.70);\n @media screen and (-webkit-min-device-pixel-ratio: 0) {\n @supports (-webkit-overflow-scrolling: touch) {\n height: auto;\n}\n}\n@media only screen and (max-width: 600px) {\n height: auto;\n}\n \n .react-pdf__Page{\n display: flex !important;\n justify-content: center;\n \n align-items: top;\n\n }\n .carouselFooter{\n height: 88px !important;\n width: 100%;\n color: #fff;\n position: fixed;\n bottom: 72px;\n display: flex;\n align-items: center;\n background: rgba(0, 0, 0, 0.70);\n box-shadow: 0px -4px 12px 0px rgba(0, 0, 0, 0.14);\n \n }\n .footerContainer{\n max-width: 768px;\n margin: 0 auto;\n display: flex;\n gap: 20px;\n width: 100%;\n }\n .imgViewer{\n position: relative;\n width: 56px;\n height: 56px;\n border: 1px solid var(--color-primary-background);\n border-radius: 8px;\n }\n // .imgViewer .react-pdf__Page canvas{\n // position: absolute;\n // top: 0;\n // width: 100%;\n // }\n .imgViewer .react-pdf__Document{\n position: absolute;\n top: 0;\n width: 100%;\n border-radius: 8px;\n }\n .imgViewer svg{\n position: absolute;\n right: -9px;\n color: #fff;\n top: -9px;\n z-index: 9;\n background: var(--color-primary);\n border-radius: 50%;\n cursor: pointer;\n font-weight: bolder;\n padding: 2px;\n }\n .slick-prev, .slick-next{\n display: flex !important;\n }\n .ant-carousel .slick-prev::after, .ant-carousel .slick-next::after {\n display: none;\n }\n .ant-carousel .slick-next:hover,.slick-prev:hover{\n color: #fff;\n background: #212121;\n }\n .ant-carousel .slick-next::before ,.ant-carousel .slick-prev::before {display: none;}\n .slick-slide > div > div{\n display: flex !important;\n flex-direction: column-reverse;\n justify-content: center;\n align-items: center;\n padding: 0px 0 0;\n }\n .slick-disabled{\n display: none !important;\n }\n // .react-transform-component{\n // height: calc(100vh - 178px) !important;\n // }\n \n .react-pdf__Page canvas{\n width: max-content !important;\n height: calc(100dvh - 72px - 48px) !important;\n }\n .react-transform-wrapper{\n overflow-y: hidden !important;\n padding: 0 !important;\n height: 100% !important;\n }\n // .react-pdf__Page__textContent{\n // height: 80% !important;\n // width: auto !important;\n // }\n .deviceName{\n height: 48px;\n background: #212121;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .deviceName svg{\n position: absolute;\n right: 24px;\n top: 16px;\n color: #FFF;\n }\n .infoSec{\n background: var(--color-background-warning);\n height: 48px;\n color:#212121;\n align-items: center;\n justify-content: center;\n \n }\n .containerWidth{\n max-width: 768px;\n margin: 0 auto;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 8px 0 !important;\n }\n .containerWidth div{\n display: flex;\n align-items: center;\n gap: 8px;\n }\n .previewSec{\n flex: 1;\n overflow: hidden;\n }\n .withFooter{\n margin: 0 0 84px !important;\n }\n .customDocumentViewerOverlay{\n display: flex;\n flex-direction: column-reverse;\n height: calc(100vh - 180px);\n width: 100%;\n align-items: anchor-center;\n }\n .pageNumber{\n white-space: nowrap;\n }\n .customDocumentViewerOverlayHeader{\n position: fixed !important;\n bottom: 82px !important;\n }\n .controlsWithFooter .customDocumentViewerOverlayHeader{\n bottom: 170px !important;\n }\n .footerSec{\n background: var(--color-primary-background);\n height: 72px;\n }\n .footerSec .containerWidth{\n height: 72px;\n }\n .footerSec .containerWidth div{\n flex-direction: column;\n align-items: flex-start;\n gap: 0;\n }\n\n @media only screen and (max-width: 600px) {\n \n .deviceName {\n justify-content: start;\n padding: 0 16px;\n}\n .footerSec{\n padding: 0 16px;\n }\n .carouselFooter{\n display: flex;\n height: 72px;\n justify-content: flex-start;\n align-items: center;\n}\n .footerContainer{\n padding: 0 16px;\n width: 100%;\n }\n .infoSec{\n padding: 0 16px;\n }\n}\n"])));
|
|
12
|
+
var _default = exports.default = Wrapper;
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.assign.js");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
require("react-pdf/dist/esm/Page/AnnotationLayer.css");
|
|
11
|
+
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
12
|
+
var _CustomDrawer = _interopRequireDefault(require("../../components/oa-component-drawer/CustomDrawer"));
|
|
13
|
+
var _CustomDocumentViewer = _interopRequireDefault(require("../oa-component-document-viewer/CustomDocumentViewer"));
|
|
14
|
+
var _CustomTabs = _interopRequireDefault(require("../../components/oa-component-tabs/CustomTabs"));
|
|
15
|
+
var _CustomTag = _interopRequireDefault(require("../../components/oa-component-tag/CustomTag"));
|
|
16
|
+
var _CustomButton = _interopRequireDefault(require("../../components/oa-component-button/CustomButton"));
|
|
17
|
+
var _CustomTooltip = _interopRequireDefault(require("../../components/oa-component-tooltip/CustomTooltip"));
|
|
18
|
+
var _MaterialIcon = _interopRequireDefault(require("../../components/oa-component-icons/MaterialIcon"));
|
|
19
|
+
var _Close = _interopRequireDefault(require("@material-ui/icons/Close"));
|
|
20
|
+
var _Check = _interopRequireDefault(require("@material-ui/icons/Check"));
|
|
21
|
+
var _styles = _interopRequireDefault(require("./styles"));
|
|
22
|
+
const _excluded = ["title", "handleCloseDrawer", "documentConfig", "drawerWidth", "drawerButtonConfig", "drawerTagConfig", "onlyDocumentView"];
|
|
23
|
+
/* eslint-disable */
|
|
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
|
+
* DocumentSideDrawer Component
|
|
30
|
+
*
|
|
31
|
+
* A side drawer component that displays documents with optional metadata.
|
|
32
|
+
* Supports both single document (backward compatibility) and multiple documents (new feature).
|
|
33
|
+
*
|
|
34
|
+
* @param {Object} props - Component props
|
|
35
|
+
* @param {string} props.title - Drawer title
|
|
36
|
+
* @param {Function} props.handleCloseDrawer - Function to close the drawer
|
|
37
|
+
* @param {Object|Array} props.documentConfig - Single document config or array of document configs
|
|
38
|
+
* @param {string} props.drawerWidth - Custom drawer width
|
|
39
|
+
* @param {Object} props.drawerButtonConfig - Button configuration for the drawer
|
|
40
|
+
* @param {Object} props.drawerTagConfig - Tag configuration (heading, tag, viewDetails)
|
|
41
|
+
* @param {boolean} props.onlyDocumentView - Whether to show only document viewer
|
|
42
|
+
* @param {React.ReactNode} props.children - Additional content to render
|
|
43
|
+
*/
|
|
44
|
+
function DocumentSideDrawer(_ref) {
|
|
45
|
+
var _drawerTagConfig$view;
|
|
46
|
+
let {
|
|
47
|
+
title,
|
|
48
|
+
handleCloseDrawer,
|
|
49
|
+
documentConfig,
|
|
50
|
+
drawerWidth,
|
|
51
|
+
drawerButtonConfig,
|
|
52
|
+
drawerTagConfig,
|
|
53
|
+
onlyDocumentView
|
|
54
|
+
} = _ref,
|
|
55
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
56
|
+
// Calculate the drawer width based on documentConfig or fallback to 480
|
|
57
|
+
const calculatedWidth = drawerWidth !== null && drawerWidth !== void 0 ? drawerWidth : documentConfig ? 1200 : 480;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Determines if documentConfig contains multiple documents
|
|
61
|
+
* @returns {boolean} True if documentConfig is an array with multiple items
|
|
62
|
+
*/
|
|
63
|
+
const isMultipleDocuments = Array.isArray(documentConfig) && documentConfig.length > 1;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Renders the document viewer(s) based on configuration
|
|
67
|
+
* @returns {React.ReactNode} Document viewer component(s)
|
|
68
|
+
*/
|
|
69
|
+
const renderDocumentViewer = () => {
|
|
70
|
+
if (!documentConfig) return null;
|
|
71
|
+
|
|
72
|
+
// Handle multiple documents with tabs
|
|
73
|
+
if (isMultipleDocuments) {
|
|
74
|
+
return /*#__PURE__*/_react.default.createElement(_CustomTabs.default, {
|
|
75
|
+
data: {
|
|
76
|
+
tabs: documentConfig.map((doc, index) => ({
|
|
77
|
+
body: /*#__PURE__*/_react.default.createElement(_CustomDocumentViewer.default, _extends({}, doc, {
|
|
78
|
+
onlyDocumentView: onlyDocumentView
|
|
79
|
+
})),
|
|
80
|
+
key: String(index + 1),
|
|
81
|
+
label: doc.label || "Document ".concat(index + 1)
|
|
82
|
+
}))
|
|
83
|
+
},
|
|
84
|
+
"data-test": "tabs",
|
|
85
|
+
type: "card"
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Handle single document (backward compatibility)
|
|
90
|
+
const singleDocument = Array.isArray(documentConfig) ? documentConfig[0] : documentConfig;
|
|
91
|
+
return /*#__PURE__*/_react.default.createElement(_CustomDocumentViewer.default, _extends({}, singleDocument, {
|
|
92
|
+
onlyDocumentView: onlyDocumentView
|
|
93
|
+
}));
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Renders the tooltip content for view details
|
|
98
|
+
* @param {Array} items - Array of detail items
|
|
99
|
+
* @param {string} title - Tooltip title
|
|
100
|
+
* @returns {React.ReactNode} Tooltip content
|
|
101
|
+
*
|
|
102
|
+
*/
|
|
103
|
+
|
|
104
|
+
const renderTooltipContent = (items, title) => {
|
|
105
|
+
const totalItems = (items === null || items === void 0 ? void 0 : items.length) || 0;
|
|
106
|
+
if (totalItems === 0) return null;
|
|
107
|
+
const numColumns = totalItems === 1 ? 1 : 2;
|
|
108
|
+
const col1Size = Math.ceil(totalItems / numColumns);
|
|
109
|
+
const col2Size = totalItems - col1Size;
|
|
110
|
+
const columns = [items.slice(0, col1Size),
|
|
111
|
+
// First column
|
|
112
|
+
items.slice(col1Size) // Second column
|
|
113
|
+
];
|
|
114
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, title && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
115
|
+
typography: "type-sl1-700",
|
|
116
|
+
color: "secondary-content"
|
|
117
|
+
}, title), /*#__PURE__*/_react.default.createElement("div", {
|
|
118
|
+
className: "tooltip-grid",
|
|
119
|
+
style: {
|
|
120
|
+
flexDirection: totalItems === 1 ? "column" : "row",
|
|
121
|
+
width: totalItems === 1 ? "100%" : "auto"
|
|
122
|
+
}
|
|
123
|
+
}, columns.map((columnItems, colIndex) => /*#__PURE__*/_react.default.createElement("div", {
|
|
124
|
+
key: "col-".concat(colIndex),
|
|
125
|
+
className: "tooltip-column"
|
|
126
|
+
}, columnItems.map(item => /*#__PURE__*/_react.default.createElement("li", {
|
|
127
|
+
key: item.title,
|
|
128
|
+
className: "tooltip-item"
|
|
129
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
130
|
+
size: 20,
|
|
131
|
+
icon: item.type === "positive" ? _Check.default : _Close.default,
|
|
132
|
+
color: item.type === "positive" ? "positive" : "negative"
|
|
133
|
+
}), /*#__PURE__*/_react.default.createElement("p", null, item.title)))))));
|
|
134
|
+
};
|
|
135
|
+
return /*#__PURE__*/_react.default.createElement(_CustomDrawer.default, {
|
|
136
|
+
buttonConfig: drawerButtonConfig,
|
|
137
|
+
"data-test": "document-side-drawer",
|
|
138
|
+
className: "documentDrawer",
|
|
139
|
+
width: calculatedWidth,
|
|
140
|
+
onClose: handleCloseDrawer,
|
|
141
|
+
title: title
|
|
142
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.default, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
143
|
+
className: "viewerContainer"
|
|
144
|
+
}, renderDocumentViewer(), !onlyDocumentView && /*#__PURE__*/_react.default.createElement("div", {
|
|
145
|
+
className: "rightContSection"
|
|
146
|
+
}, drawerTagConfig && /*#__PURE__*/_react.default.createElement("div", {
|
|
147
|
+
className: "grayBoxSec"
|
|
148
|
+
}, drawerTagConfig.heading && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
149
|
+
className: "type-t2-700",
|
|
150
|
+
color: "primary-content"
|
|
151
|
+
}, drawerTagConfig.heading), /*#__PURE__*/_react.default.createElement("div", {
|
|
152
|
+
className: "margin-top-12 statusSec"
|
|
153
|
+
}, drawerTagConfig.tag && (
|
|
154
|
+
// Conditionally render CustomTag or Typography based on tag type
|
|
155
|
+
drawerTagConfig.tag.type ? /*#__PURE__*/_react.default.createElement(_CustomTag.default, {
|
|
156
|
+
label: drawerTagConfig.tag.label,
|
|
157
|
+
type: drawerTagConfig.tag.type
|
|
158
|
+
}) : /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
159
|
+
typography: "type-b2-400",
|
|
160
|
+
color: "primary-content"
|
|
161
|
+
}, drawerTagConfig.tag.label)), ((_drawerTagConfig$view = drawerTagConfig.viewDetails) === null || _drawerTagConfig$view === void 0 || (_drawerTagConfig$view = _drawerTagConfig$view.items) === null || _drawerTagConfig$view === void 0 ? void 0 : _drawerTagConfig$view.length) > 0 && /*#__PURE__*/_react.default.createElement(_CustomTooltip.default, {
|
|
162
|
+
overlayClassName: "multipleDocumentTooltip",
|
|
163
|
+
isDisplayed: true,
|
|
164
|
+
placement: "bottomRight",
|
|
165
|
+
title: renderTooltipContent(drawerTagConfig.viewDetails.items, drawerTagConfig.viewDetails.title)
|
|
166
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
167
|
+
type: "text-only",
|
|
168
|
+
label: drawerTagConfig.viewDetails.label
|
|
169
|
+
})))), props.children))));
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// Define the prop types to enforce correct data types for the props
|
|
173
|
+
DocumentSideDrawer.propTypes = {
|
|
174
|
+
title: _propTypes.default.string,
|
|
175
|
+
handleCloseDrawer: _propTypes.default.func,
|
|
176
|
+
documentConfig: _propTypes.default.oneOfType([_propTypes.default.object,
|
|
177
|
+
// Single document configuration
|
|
178
|
+
_propTypes.default.arrayOf(_propTypes.default.object) // Array of document configurations
|
|
179
|
+
]),
|
|
180
|
+
drawerWidth: _propTypes.default.string,
|
|
181
|
+
drawerButtonConfig: _propTypes.default.object,
|
|
182
|
+
drawerTagConfig: _propTypes.default.object,
|
|
183
|
+
onlyDocumentView: _propTypes.default.bool
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
// Default props to provide fallback values for optional props
|
|
187
|
+
DocumentSideDrawer.defaultProps = {
|
|
188
|
+
title: "",
|
|
189
|
+
handleCloseDrawer: () => {},
|
|
190
|
+
documentConfig: null,
|
|
191
|
+
drawerWidth: null,
|
|
192
|
+
drawerButtonConfig: null,
|
|
193
|
+
drawerTagConfig: null,
|
|
194
|
+
onlyDocumentView: false
|
|
195
|
+
};
|
|
196
|
+
var _default = exports.default = DocumentSideDrawer;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject;
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
|
+
const ViewerContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.ant-tabs-nav{\n margin: 0;\n}\n .ant-tabs-top>.ant-tabs-nav::before {\n border: none;\n border-right: 1px solid #E0E0E0;\n }\n .ant-tabs-content-holder .customDocumentViewerOverlayHeader{\n bottom: 60px;\n }\n .ant-tabs-tab{\n border-radius: 0px !important;\n border: none !important;\n border-bottom: 2px solid transparent !important;\n }\n .ant-tabs-tab-active{\n border-bottom: 2px solid var(--color-primary) !important;\n }\n .viewerContainer > div {\n flex: 1;\n box-sizing: border-box;\n }\n .viewerContainer {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n }\n .rightContSection {\n display: flex;\n flex-direction: column;\n padding: 24px;\n }\n .grayBoxSec {\n border-radius: 8px;\n background: #f6f6f6;\n padding: 12px 16px;\n }\n .statusSec {\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n .statusSec button {\n margin-left: 8px;\n }\n"])));
|
|
12
|
+
var _default = exports.default = ViewerContainer;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.weak-map.js");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
require("core-js/modules/es.promise.js");
|
|
9
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
+
var _icons = require("@ant-design/icons");
|
|
13
|
+
var _antd = require("antd");
|
|
14
|
+
var _CustomInfo = _interopRequireDefault(require("../../components/oa-component-info/CustomInfo"));
|
|
15
|
+
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
16
|
+
var _ColorVariablesMap = _interopRequireDefault(require("../../global-css/ColorVariablesMap"));
|
|
17
|
+
var _styles = require("./styles");
|
|
18
|
+
var _PdfSampleImage = _interopRequireDefault(require("../../images/PdfSampleImage.png"));
|
|
19
|
+
var _upload = _interopRequireDefault(require("../../images/upload.svg"));
|
|
20
|
+
var _CustomIcon = _interopRequireDefault(require("../../components/oa-component-icons/CustomIcon"));
|
|
21
|
+
var _CustomUpload = _interopRequireDefault(require("../oa-component-upload/CustomUpload"));
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
+
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); }
|
|
24
|
+
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; }
|
|
25
|
+
/**
|
|
26
|
+
* Takes a file and returns a Promise that resolves with the file as a base64 encoded string.
|
|
27
|
+
* The Promise is rejected if there is an error reading the file.
|
|
28
|
+
* @param {File} file The file to be converted to base64
|
|
29
|
+
* @returns {Promise<string>} A Promise that resolves with the file as a base64 encoded string
|
|
30
|
+
*/
|
|
31
|
+
const getBase64 = file => new Promise((resolve, reject) => {
|
|
32
|
+
const reader = new FileReader();
|
|
33
|
+
reader.readAsDataURL(file);
|
|
34
|
+
reader.onload = () => resolve(reader.result);
|
|
35
|
+
reader.onerror = error => reject(error);
|
|
36
|
+
});
|
|
37
|
+
/**
|
|
38
|
+
* Downloads a file from a base64 encoded string.
|
|
39
|
+
* @param {string} base64String The base64 encoded string of the file to be downloaded
|
|
40
|
+
* @param {string} [fileName] The name of the file to be downloaded. If not provided, the file will be downloaded with the name 'download'.
|
|
41
|
+
* @returns {undefined}
|
|
42
|
+
*/
|
|
43
|
+
const downloadFile = (base64String, fileName) => {
|
|
44
|
+
const link = document.createElement('a');
|
|
45
|
+
link.href = base64String;
|
|
46
|
+
link.download = fileName || 'download';
|
|
47
|
+
link.click();
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* A component that allows users to upload documents.
|
|
52
|
+
* The component displays the uploaded documents in a list.
|
|
53
|
+
* The component also allows users to delete the uploaded documents.
|
|
54
|
+
* @param {object} props The props passed to the component
|
|
55
|
+
* @param {array} [props.uploadedDocuments=[]] An array of documents that have already been uploaded
|
|
56
|
+
* @param {function} props.onChange A function that is called whenever the list of uploaded documents changes
|
|
57
|
+
* @param {number} [props.multipleDoc=0] The maximum number of documents that can be uploaded. If set to 0, there is no limit
|
|
58
|
+
* @param {boolean} [props.showDelete=false] Whether or not to show a delete button next to each uploaded document
|
|
59
|
+
* @param {string} [props.subText] A string that is displayed below the heading
|
|
60
|
+
* @param {string} [props.heading] A string that is displayed above the upload button
|
|
61
|
+
* @param {string} [props.formName] The name of the form field that the uploaded documents should be associated with
|
|
62
|
+
* @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
|
|
63
|
+
* @param {string} [props.infoText] A string that is displayed below the subText
|
|
64
|
+
* @param {boolean} [props.isMandatory=false] Whether or not the component is mandatory
|
|
65
|
+
* @returns {object} A React component
|
|
66
|
+
*/
|
|
67
|
+
function DocumentUploadCard(props) {
|
|
68
|
+
const {
|
|
69
|
+
uploadedDocuments = [],
|
|
70
|
+
multipleDoc,
|
|
71
|
+
showDelete,
|
|
72
|
+
subText,
|
|
73
|
+
heading,
|
|
74
|
+
formName,
|
|
75
|
+
getPreview,
|
|
76
|
+
infoText,
|
|
77
|
+
isMandatory
|
|
78
|
+
} = props;
|
|
79
|
+
const [previewOpen, setPreviewOpen] = (0, _react.useState)(false);
|
|
80
|
+
const [previewImage, setPreviewImage] = (0, _react.useState)(null);
|
|
81
|
+
const [previewTitle, setPreviewTitle] = (0, _react.useState)('');
|
|
82
|
+
const [loading, setLoading] = (0, _react.useState)(false);
|
|
83
|
+
const [fileList, setFileList] = (0, _react.useState)(uploadedDocuments);
|
|
84
|
+
const handleCancel = () => setPreviewOpen(false);
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Determines if the given file is an image file based on its file extension.
|
|
88
|
+
* @param {string} fileName The name of the file to check
|
|
89
|
+
* @returns {boolean} Whether or not the file is an image file
|
|
90
|
+
*/
|
|
91
|
+
function isImageFile(fileName) {
|
|
92
|
+
var _fileName$split;
|
|
93
|
+
// Extract the file extension from the file name
|
|
94
|
+
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();
|
|
95
|
+
|
|
96
|
+
// Define an array of image file extensions
|
|
97
|
+
const imageFileExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'svg'];
|
|
98
|
+
|
|
99
|
+
// Check if the file extension is in the array of image file extensions
|
|
100
|
+
if (imageFileExtensions.indexOf(fileExtension) !== -1) {
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
(0, _react.useEffect)(() => {
|
|
106
|
+
setFileList(uploadedDocuments);
|
|
107
|
+
}, [uploadedDocuments === null || uploadedDocuments === void 0 ? void 0 : uploadedDocuments.length]);
|
|
108
|
+
const uploadButton = /*#__PURE__*/_react.default.createElement("button", {
|
|
109
|
+
style: {
|
|
110
|
+
border: 0,
|
|
111
|
+
background: 'none'
|
|
112
|
+
},
|
|
113
|
+
type: "button"
|
|
114
|
+
}, loading ? /*#__PURE__*/_react.default.createElement(_icons.LoadingOutlined, null) : /*#__PURE__*/_react.default.createElement(_CustomIcon.default, {
|
|
115
|
+
className: "UploadImg",
|
|
116
|
+
alt: "phone img",
|
|
117
|
+
src: _upload.default
|
|
118
|
+
}), /*#__PURE__*/_react.default.createElement("div", null, "Upload"));
|
|
119
|
+
return /*#__PURE__*/_react.default.createElement(_styles.MainStyleSec, null, /*#__PURE__*/_react.default.createElement(_styles.StyledSection, null, (heading || subText) && /*#__PURE__*/_react.default.createElement("div", {
|
|
120
|
+
className: "uploadSecPad"
|
|
121
|
+
}, heading && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
122
|
+
color: "primary-content",
|
|
123
|
+
className: "type-t2-700"
|
|
124
|
+
}, heading, isMandatory && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
125
|
+
color: "negative"
|
|
126
|
+
}, " *"))), typeof subText === 'string' && /*#__PURE__*/_react.default.createElement("div", {
|
|
127
|
+
style: {
|
|
128
|
+
whiteSpace: 'pre-line'
|
|
129
|
+
}
|
|
130
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
131
|
+
color: "secondary-content",
|
|
132
|
+
className: "type-b2-400"
|
|
133
|
+
}, subText)), /*#__PURE__*/_react.default.isValidElement(subText) && /*#__PURE__*/_react.default.createElement("div", {
|
|
134
|
+
style: {
|
|
135
|
+
whiteSpace: 'pre-line'
|
|
136
|
+
}
|
|
137
|
+
}, subText), infoText && /*#__PURE__*/_react.default.createElement(_CustomInfo.default, {
|
|
138
|
+
color: "background-warning",
|
|
139
|
+
description: infoText
|
|
140
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
141
|
+
className: "uploadDiv "
|
|
142
|
+
}, multipleDoc > 0 && /*#__PURE__*/_react.default.createElement("em", null, multipleDoc), /*#__PURE__*/_react.default.createElement(_antd.ConfigProvider, {
|
|
143
|
+
theme: {
|
|
144
|
+
token: {
|
|
145
|
+
colorBorder: _ColorVariablesMap.default['--color-divider'],
|
|
146
|
+
borderRadiusLG: 4,
|
|
147
|
+
colorPrimaryHover: _ColorVariablesMap.default['--color-primary'],
|
|
148
|
+
colorPrimaryBorder: _ColorVariablesMap.default['--color-divider'],
|
|
149
|
+
colorFillAlter: _ColorVariablesMap.default['--color-secondary-background'],
|
|
150
|
+
colorError: _ColorVariablesMap.default['--color-negative'],
|
|
151
|
+
colorText: _ColorVariablesMap.default['--color-secondary-content']
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomUpload.default, props)))));
|
|
155
|
+
}
|
|
156
|
+
DocumentUploadCard.propTypes = {
|
|
157
|
+
uploadedDocuments: _propTypes.default.array,
|
|
158
|
+
subText: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.element]),
|
|
159
|
+
heading: _propTypes.default.string,
|
|
160
|
+
formName: _propTypes.default.string,
|
|
161
|
+
infoText: _propTypes.default.string,
|
|
162
|
+
showDelete: _propTypes.default.bool,
|
|
163
|
+
multipleDoc: _propTypes.default.number,
|
|
164
|
+
getPreview: _propTypes.default.func,
|
|
165
|
+
// Define the getPreview prop type
|
|
166
|
+
isMandatory: _propTypes.default.bool
|
|
167
|
+
};
|
|
168
|
+
DocumentUploadCard.defaultProps = {
|
|
169
|
+
uploadedDocuments: [],
|
|
170
|
+
subText: '',
|
|
171
|
+
heading: '',
|
|
172
|
+
formName: '',
|
|
173
|
+
infoText: '',
|
|
174
|
+
multipleDoc: 0,
|
|
175
|
+
showDelete: true,
|
|
176
|
+
getPreview: () => {},
|
|
177
|
+
isMandatory: true
|
|
178
|
+
};
|
|
179
|
+
var _default = exports.default = DocumentUploadCard;
|
|
@@ -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-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.uploadDiv{\n width: 96px;\n position: relative;\n}\n.uploadDiv em{\n position: absolute;\n right: -9px;\n top: -9px;\n font-style: normal;\n width: 20px;\n height: 20px;\n background: var(--color-warning);\n z-index: 9;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n color: #fff;\n font-size: 12px;\n line-height: 0;\n}\n.UploadImg img{\n height: 24px;\n width: 24px;\n\n}\n.UploadImg{\n justify-content: center;\n cursor: pointer;\n}\n.uploadSecPad div{\n padding: 0 0 8px;\n}\n.anticon-upload{\n font-size: 24px;\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 .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item:hover::before{\n opacity: 1 !important;\n }\n .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item:hover::before ant-upload-list-item-actions > a\n {\n background: red !important;\n }\n .ant-upload-list-item-actions{\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 16px;\n }\n .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item::before{\n background: transparent;\n opacity: 1;\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 .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-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item{\n opacity: 1 !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 color: #fff;\n }\n @media only screen and (max-width: 600px) {\n .uploadDiv {\n width: 64px;\n }\n .uploadDiv em{\n width: 16px;\n height: 16px;\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 .ant-upload-select, .ant-upload-wrapper, .ant-upload-wrapper, .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: 0;\n }\n .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload.ant-upload-select{\n width: 96px !important;\n height: 96px !important;\n margin: 0;\n }\n @media only screen and (max-width: 600px) {\n .ant-upload-select, .ant-upload-wrapper, .ant-upload-wrapper, .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container{\n width: 64px;\n height: 64px;\n }\n .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload.ant-upload-select{\n width: 64px !important;\n height: 64px !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 margin: 0 !important;\n padding: 0 !important;\n display: flex;\n align-items: center;\n justify-content: center;\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,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _styledComponents = require("styled-components");
|
|
8
|
+
var _templateObject;
|
|
9
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
10
|
+
/*
|
|
11
|
+
? Keep this at the top level of the app using any of these components.
|
|
12
|
+
* Do not add any children to it because this element does NOT render any of its children
|
|
13
|
+
|
|
14
|
+
* Instead, follow a syntax similar to this:
|
|
15
|
+
<>
|
|
16
|
+
<BorderRadius />
|
|
17
|
+
<App />
|
|
18
|
+
</>
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
const BorderRadius = (0, _styledComponents.createGlobalStyle)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.border-radius-full {\n border-radius: 9999px;\n}\n\n.border-radius-xlarge {\n border-radius: 16px;\n}\n\n.border-radius-large {\n border-radius: 12px;\n}\n\n.border-radius-medium {\n border-radius: 8px;\n}\n\n.border-radius-small {\n border-radius: 4px;\n}\n\n.border-radius-xsmall {\n border-radius: 2px;\n}\n\n.border-radius-none {\n border-radius: 0px;\n}\n"])));
|
|
22
|
+
var _default = exports.default = BorderRadius;
|