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,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _utils = require("../../utils");
|
|
11
|
+
var _CustomTag = _interopRequireDefault(require("../../components/oa-component-tag/CustomTag"));
|
|
12
|
+
var _styles = require("./styles");
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
/* eslint-disable */
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Renders a view displaying key-value pairs in a structured format.
|
|
18
|
+
*
|
|
19
|
+
* @param {Object} props - The properties passed to the component.
|
|
20
|
+
* @param {Object} props.data - An object containing key-value pairs to be displayed.
|
|
21
|
+
* @param {Array<number>} [props.columnLayout] - An array defining the number of items per column.
|
|
22
|
+
* @param {Object} [props.info] - An object containing information about a key-value pair.
|
|
23
|
+
* @param {boolean} [props.fullWidth] - If true, uses 30%/70% width distribution, otherwise uses previous layout.
|
|
24
|
+
*
|
|
25
|
+
* @returns {JSX.Element} A component that renders key-value pairs in a grid layout.
|
|
26
|
+
*/
|
|
27
|
+
function KeyValueDataView(_ref) {
|
|
28
|
+
let {
|
|
29
|
+
data,
|
|
30
|
+
columnLayout,
|
|
31
|
+
info,
|
|
32
|
+
tagStatus,
|
|
33
|
+
customClassName,
|
|
34
|
+
fullWidth = false
|
|
35
|
+
} = _ref;
|
|
36
|
+
let actualColumnLayout = [];
|
|
37
|
+
if (columnLayout.length === 0) {
|
|
38
|
+
actualColumnLayout[0] = Object.keys(data).length;
|
|
39
|
+
} else {
|
|
40
|
+
actualColumnLayout = columnLayout;
|
|
41
|
+
}
|
|
42
|
+
let entryIdx = 0;
|
|
43
|
+
const colWidth = actualColumnLayout.length > 0 ? Math.floor(12 / actualColumnLayout.length) : 4;
|
|
44
|
+
const className = "col-sm-12 col-md-".concat(colWidth, " col-lg-").concat(colWidth, " gutter");
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement(_styles.KeyValueGroups, null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_styles.KeyValueGroup, {
|
|
46
|
+
className: "row"
|
|
47
|
+
}, actualColumnLayout.map((element, layoutIdx) => {
|
|
48
|
+
entryIdx += layoutIdx - 1 >= 0 ? actualColumnLayout[layoutIdx - 1] : 0;
|
|
49
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
50
|
+
className: customClassName !== null && customClassName !== void 0 ? customClassName : className,
|
|
51
|
+
key: (0, _utils.getUUID)()
|
|
52
|
+
}, Object.entries(data).splice(entryIdx, element).map(_ref2 => {
|
|
53
|
+
let [key, value] = _ref2;
|
|
54
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
55
|
+
className: "valuestyle ".concat(fullWidth ? "full-width" : null),
|
|
56
|
+
key: (0, _utils.getUUID)()
|
|
57
|
+
}, (info === null || info === void 0 ? void 0 : info.infoKey) === key ? /*#__PURE__*/_react.default.createElement("b", {
|
|
58
|
+
className: "type-b2-400"
|
|
59
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
60
|
+
style: {
|
|
61
|
+
color: "var(--color-primary-content)"
|
|
62
|
+
}
|
|
63
|
+
}, key, /*#__PURE__*/_react.default.createElement("em", {
|
|
64
|
+
style: {
|
|
65
|
+
marginLeft: "4px",
|
|
66
|
+
position: "relative",
|
|
67
|
+
top: "3px",
|
|
68
|
+
color: "var(--color-secondary-content)"
|
|
69
|
+
}
|
|
70
|
+
}, info === null || info === void 0 ? void 0 : info.infoData))) : /*#__PURE__*/_react.default.createElement("b", {
|
|
71
|
+
className: "type-b2-400"
|
|
72
|
+
}, key, ":"), /*#__PURE__*/_react.default.createElement("span", {
|
|
73
|
+
style: {
|
|
74
|
+
display: "flex",
|
|
75
|
+
alignItems: "center",
|
|
76
|
+
gap: "8px"
|
|
77
|
+
}
|
|
78
|
+
}, ((0, _utils.isString)(value) || (0, _utils.isNumber)(value)) && /*#__PURE__*/_react.default.createElement("span", {
|
|
79
|
+
className: "type-b2-400",
|
|
80
|
+
title: value
|
|
81
|
+
}, value) || _react.default.isValidElement && /*#__PURE__*/_react.default.createElement("span", null, value), (tagStatus === null || tagStatus === void 0 ? void 0 : tagStatus.tagKey) === key && (tagStatus === null || tagStatus === void 0 ? void 0 : tagStatus.tagData) && /*#__PURE__*/_react.default.createElement(_CustomTag.default, {
|
|
82
|
+
style: {
|
|
83
|
+
width: "100px"
|
|
84
|
+
},
|
|
85
|
+
type: tagStatus.tagData.type || "success",
|
|
86
|
+
label: tagStatus.tagData.label,
|
|
87
|
+
size: tagStatus.tagData.size || "small"
|
|
88
|
+
})));
|
|
89
|
+
}));
|
|
90
|
+
}))));
|
|
91
|
+
}
|
|
92
|
+
KeyValueDataView.propTypes = {
|
|
93
|
+
columnLayout: _propTypes.default.arrayOf(_propTypes.default.number),
|
|
94
|
+
data: _propTypes.default.objectOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.node])).isRequired,
|
|
95
|
+
info: _propTypes.default.shape({
|
|
96
|
+
infoData: _propTypes.default.node,
|
|
97
|
+
infoKey: _propTypes.default.string
|
|
98
|
+
}),
|
|
99
|
+
tagStatus: _propTypes.default.shape({
|
|
100
|
+
tagKey: _propTypes.default.string,
|
|
101
|
+
tagData: _propTypes.default.shape({
|
|
102
|
+
type: _propTypes.default.string,
|
|
103
|
+
label: _propTypes.default.string,
|
|
104
|
+
size: _propTypes.default.string
|
|
105
|
+
})
|
|
106
|
+
}),
|
|
107
|
+
customClassName: _propTypes.default.string,
|
|
108
|
+
fullWidth: _propTypes.default.bool
|
|
109
|
+
};
|
|
110
|
+
KeyValueDataView.defaultProps = {
|
|
111
|
+
columnLayout: [],
|
|
112
|
+
info: {
|
|
113
|
+
infoData: null,
|
|
114
|
+
infoKey: ""
|
|
115
|
+
},
|
|
116
|
+
tagStatus: {
|
|
117
|
+
tagKey: "",
|
|
118
|
+
tagData: null
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
var _default = exports.default = KeyValueDataView;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StyledSpan = exports.StyledBold = exports.KeyValueGroups = exports.KeyValueGroup = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4; // KeyValueWidgetStyles.js
|
|
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 KeyValueGroup = exports.KeyValueGroup = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .col-md-4:last-child,.col-md-12:last-child,.col-md-3:last-child,.col-md-6:last-child {\n padding: 0;\n }\n \n .valuestyle {\n display: flex;\n gap: 16px;\n padding: 0 0 8px;\n }\n\n .valuestyle b {\n width: 38.734%;\n font-style: normal;\n color: var(--color-primary-content); \n }\n\n .valuestyle span {\n width: 180px;\n word-wrap: break-word;\n font-style: normal;\n color: var(--color-secondary-content); }\n\n .valuestyle span + span{\n color: var(--color-primary-content);\n font-size: 14px;\n padding: 0 4px 0 0;\n }\n\n /* Add these CSS rules for full-width */\n .valuestyle.full-width {\n display: flex;\n gap: 16px;\n padding: 0 0 8px;\n }\n\n .valuestyle.full-width b {\n width: 30%;\n }\n\n .valuestyle.full-width span {\n width: 100%;\n }\n\n"])));
|
|
12
|
+
const KeyValueGroups = exports.KeyValueGroups = _styledComponents.default.section(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n.container {\n max-width: 1154px;\n margin: 0 auto;\n padding: 0 16px;\n}\n.container-fluid{\n width: 100%;\n padding: 0 16px;\n}\n.row {\n display: flex;\n flex-direction: column;\n}\n.row::after {\n content: \"\";\n clear: both;\n display: table;\n}\n.col-xs-1 {\n width: 8.33333%;\n}\n\n.col-xs-2 {\n width: 16.66667%;\n}\n\n.col-xs-3 {\n width: 25%;\n}\n\n.col-xs-4 {\n width: 33.33333%;\n}\n\n.col-xs-5 {\n width: 41.66667%;\n}\n\n.col-xs-6 {\n width: 50%;\n}\n\n.col-xs-7 {\n width: 58.33333%;\n}\n\n.col-xs-8 {\n width: 66.66667%;\n}\n\n.col-xs-9 {\n width: 75%;\n}\n\n.col-xs-10 {\n width: 83.33333%;\n}\n\n.col-xs-11 {\n width: 91.66667%;\n}\n\n.col-xs-12 {\n width: 100%;\n}\n@media (min-width: 768px) {\n .row {\n flex-direction: row;\n}\n .col-sm-1 {\n width: 8.33333%;\n }\n\n .col-sm-2 {\n width: 16.66667%;\n }\n\n .col-sm-3 {\n width: 25%;\n }\n\n .col-sm-4 {\n width: 33.33333%;\n }\n\n .col-sm-5 {\n width: 41.66667%;\n }\n\n .col-sm-6 {\n width: 50%;\n }\n .col-sm-7 {\n width: 58.33333%;\n }\n .col-sm-8 {\n width: 66.66667%;\n }\n .col-sm-9 {\n width: 75%;\n }\n .col-sm-10 {\n width: 83.33333%;\n }\n .col-sm-11 {\n width: 91.66667%;\n }\n .col-sm-12 {\n width: 100%;\n }\n}\n\n@media (min-width: 768px) {\n .col-md-1 {\n width: 8.33333%;\n }\n .col-md-2 {\n width: 16.66667%;\n }\n .col-md-3 {\n width: 25%;\n }\n .col-md-4 {\n width: 33.33333%;\n float: left;\n }\n\n .col-md-5 {\n width: 41.66667%;\n }\n\n .col-md-6 {\n width: 50%;\n }\n\n .col-md-7 {\n width: 58.33333%;\n }\n\n .col-md-8 {\n width: 66.66667%;\n }\n\n .col-md-9 {\n width: 75%;\n }\n\n .col-md-10 {\n width: 83.33333%;\n }\n .col-md-11 {\n width: 91.66667%;\n }\n\n .col-md-12 {\n width: 100%;\n }\n\n}\n/* Large Devices (desktops) */\n@media (min-width: 992px) {\n .gutter{\n padding: 0 24px 0 0;\n }\n .col-lg-1 {\n width: 8.33333%;\n }\n .col-lg-2 {\n width: 16.66667%;\n }\n .col-lg-3 {\n width: 25%;\n float: left;\n }\n .col-lg-4 {\n width: 33.33333%;\n float: left;\n }\n .col-lg-5 {\n width: 41.66667%;\n }\n .col-lg-6 {\n width: 50%;\n }\n .col-lg-7 {\n width: 58.33333%;\n }\n .col-lg-8 {\n width: 66.66667%;\n }\n .col-lg-9 {\n width: 75%;\n }\n .col-lg-10 {\n width: 83.33333%;\n }\n\n .col-lg-11 {\n width: 91.66667%;\n }\n\n .col-lg-12 {\n width: 100%;\n }\n}\n\n@media (min-width: 1200px) {\n .gutter{\n padding: 0 32px 0 0;\n }\n .col-xl-1 {\n width: 8.33333%;\n }\n\n \n}\n@media (max-width: 767px) {\n .gutter{\n padding: 0;\n }\n}\n"])));
|
|
13
|
+
const StyledBold = exports.StyledBold = _styledComponents.default.b(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: var(--color-primary-content);\n font-weight: 400;\n"])));
|
|
14
|
+
const StyledSpan = exports.StyledSpan = _styledComponents.default.span(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n /* vertical-align: bottom; */\n color: var(--color-secondary-content);\n font-weight: 400;\n word-break: break-word;\n"])));
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _antd = require("antd");
|
|
10
|
+
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
11
|
+
var _MaterialIcon = _interopRequireDefault(require("../../components/oa-component-icons/MaterialIcon"));
|
|
12
|
+
var _CustomTooltip = _interopRequireDefault(require("../../components/oa-component-tooltip/CustomTooltip"));
|
|
13
|
+
var _styles = _interopRequireDefault(require("./styles"));
|
|
14
|
+
var _AccessAlarmOutlined = _interopRequireDefault(require("@material-ui/icons/AccessAlarmOutlined"));
|
|
15
|
+
const _excluded = ["type", "iconConfig", "tooltip"];
|
|
16
|
+
/* eslint-disable */
|
|
17
|
+
// ✅ no curly braces
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
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; }
|
|
20
|
+
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; }
|
|
21
|
+
function KPICardWidget(_ref) {
|
|
22
|
+
let {
|
|
23
|
+
title,
|
|
24
|
+
subTitle,
|
|
25
|
+
subText,
|
|
26
|
+
titleSubConfig
|
|
27
|
+
} = _ref;
|
|
28
|
+
const renderTitleSubConfig = () => {
|
|
29
|
+
if (!titleSubConfig) return null;
|
|
30
|
+
const {
|
|
31
|
+
type,
|
|
32
|
+
iconConfig,
|
|
33
|
+
tooltip
|
|
34
|
+
} = titleSubConfig,
|
|
35
|
+
config = _objectWithoutProperties(titleSubConfig, _excluded);
|
|
36
|
+
if (type === "tooltip" && iconConfig && tooltip) {
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement(_CustomTooltip.default, {
|
|
38
|
+
title: tooltip,
|
|
39
|
+
placement: config.placement || "top"
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, iconConfig));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Add more types here as needed
|
|
44
|
+
// if (type === "button" && iconConfig) {
|
|
45
|
+
// return <CustomButton {...config} iconConfig={iconConfig} />;
|
|
46
|
+
// }
|
|
47
|
+
|
|
48
|
+
return null;
|
|
49
|
+
};
|
|
50
|
+
return /*#__PURE__*/_react.default.createElement(_styles.default, null, /*#__PURE__*/_react.default.createElement(_antd.Card, null, title && /*#__PURE__*/_react.default.createElement("div", {
|
|
51
|
+
className: "title-container"
|
|
52
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
53
|
+
typography: "type-t2-700",
|
|
54
|
+
color: "parimary-content"
|
|
55
|
+
}, title, " ", renderTitleSubConfig())), subTitle && /*#__PURE__*/_react.default.createElement("div", {
|
|
56
|
+
className: "padding-top-8 inclGst"
|
|
57
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
58
|
+
typography: "type-h1-500",
|
|
59
|
+
color: "parimary-content"
|
|
60
|
+
}, subTitle), subText && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
61
|
+
typography: "type-t2-700",
|
|
62
|
+
color: "secondary-content"
|
|
63
|
+
}, subText))));
|
|
64
|
+
}
|
|
65
|
+
KPICardWidget.propTypes = {
|
|
66
|
+
title: _propTypes.default.string,
|
|
67
|
+
subTitle: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
68
|
+
subText: _propTypes.default.string,
|
|
69
|
+
titleSubConfig: _propTypes.default.shape({
|
|
70
|
+
type: _propTypes.default.oneOf(["tooltip", "button"]),
|
|
71
|
+
// Add more types as needed
|
|
72
|
+
iconConfig: _propTypes.default.object,
|
|
73
|
+
// MaterialIcon props (same as SidebarWidget)
|
|
74
|
+
tooltip: _propTypes.default.string,
|
|
75
|
+
// For tooltip type
|
|
76
|
+
placement: _propTypes.default.string // Tooltip placement
|
|
77
|
+
// Add more config options as needed
|
|
78
|
+
})
|
|
79
|
+
};
|
|
80
|
+
KPICardWidget.defaultProps = {
|
|
81
|
+
title: "Total Active Orders",
|
|
82
|
+
subTitle: "",
|
|
83
|
+
subText: "",
|
|
84
|
+
titleSubConfig: null
|
|
85
|
+
};
|
|
86
|
+
var _default = exports.default = KPICardWidget;
|
|
@@ -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; // styles.js
|
|
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 OaCardStyle = _styledComponents.default.aside(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n .ant-card-body {\n padding: 24px 16px !important;\n border-radius: 16px;\n background: #f6f6f6;\n }\n .ant-card-bordered {\n border: none;\n }\n .padding-top-8 {\n padding: 8px 0 0;\n }\n\n .inclGst {\n display: flex;\n flex-direction: row;\n gap: 6px;\n align-items: anchor-center;\n }\n\n .title-container {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n }\n\n .title-container span{\n display: flex; align-items: center;\n gap: 4px;\n }\n\n .title-container .ant-typography {\n flex: 1;\n }\n"])));
|
|
12
|
+
var _default = exports.default = OaCardStyle;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _LocationOff = _interopRequireDefault(require("@material-ui/icons/LocationOff"));
|
|
10
|
+
var _LocationOnOutlined = _interopRequireDefault(require("@material-ui/icons/LocationOnOutlined"));
|
|
11
|
+
var _ArrowForwardIosOutlined = _interopRequireDefault(require("@material-ui/icons/ArrowForwardIosOutlined"));
|
|
12
|
+
var _InfoOutlined = _interopRequireDefault(require("@material-ui/icons/InfoOutlined"));
|
|
13
|
+
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
14
|
+
var _MaterialIcon = _interopRequireDefault(require("../../components/oa-component-icons/MaterialIcon"));
|
|
15
|
+
var _CustomButton = _interopRequireDefault(require("../../components/oa-component-button/CustomButton"));
|
|
16
|
+
var _CustomInfo = _interopRequireDefault(require("../../components/oa-component-info/CustomInfo"));
|
|
17
|
+
var _styles = require("./styles");
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
const buttonConfig = {
|
|
20
|
+
label: 'Change',
|
|
21
|
+
type: 'text-only'
|
|
22
|
+
};
|
|
23
|
+
const iconConfigInfo = {
|
|
24
|
+
icon: /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
25
|
+
color: "primary",
|
|
26
|
+
icon: _LocationOnOutlined.default
|
|
27
|
+
}),
|
|
28
|
+
position: 'left'
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* LocationAccessWidget renders a component that displays a material icon, a title, a description, and an optional button.
|
|
32
|
+
* It is used to display the location access status of a user.
|
|
33
|
+
*
|
|
34
|
+
* @param {React.ReactElement} materialIcon - The material icon to be displayed.
|
|
35
|
+
* @param {string} buttonLabel - The label of the button.
|
|
36
|
+
* @param {string} locationAccessTitle - The title of the location access component.
|
|
37
|
+
* @param {string} locationAccessDescription - The description of the location access component.
|
|
38
|
+
* @param {boolean} showOrHideTypography - A boolean that determines whether to show or hide the typography.
|
|
39
|
+
* @param {function} onClick - The callback function when the button is clicked.
|
|
40
|
+
*
|
|
41
|
+
* @returns {React.ReactElement} - A React element representing the LocationAccessWidget.
|
|
42
|
+
*/
|
|
43
|
+
function LocationAccessWidget(_ref) {
|
|
44
|
+
let {
|
|
45
|
+
materialIcon,
|
|
46
|
+
buttonLabel,
|
|
47
|
+
locationAccessTitle,
|
|
48
|
+
locationAccessDescription,
|
|
49
|
+
showOrHideTypography,
|
|
50
|
+
onClick
|
|
51
|
+
} = _ref;
|
|
52
|
+
return /*#__PURE__*/_react.default.createElement(_styles.LocationAccessStyle, null, materialIcon && /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
53
|
+
color: "primary",
|
|
54
|
+
icon: materialIcon,
|
|
55
|
+
size: 72
|
|
56
|
+
}), /*#__PURE__*/_react.default.createElement("ul", null, /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
57
|
+
typography: "type-t1-500",
|
|
58
|
+
color: "primary-content"
|
|
59
|
+
}, locationAccessTitle)), /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
60
|
+
typography: "type-b1-400",
|
|
61
|
+
color: "secondary-content"
|
|
62
|
+
}, locationAccessDescription)), showOrHideTypography && /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("hr", null), /*#__PURE__*/_react.default.createElement("small", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
63
|
+
typography: "type-b1-400",
|
|
64
|
+
color: "primary-content"
|
|
65
|
+
}), ' ', "or")))), buttonLabel && /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
66
|
+
size: "large",
|
|
67
|
+
label: buttonLabel,
|
|
68
|
+
onClick: onClick
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
LocationAccessWidget.propTypes = {
|
|
72
|
+
materialIcon: _propTypes.default.object,
|
|
73
|
+
buttonLabel: _propTypes.default.string,
|
|
74
|
+
locationAccessTitle: _propTypes.default.string,
|
|
75
|
+
locationAccessDescription: _propTypes.default.string,
|
|
76
|
+
showOrHideTypography: _propTypes.default.bool,
|
|
77
|
+
onClick: _propTypes.default.func
|
|
78
|
+
};
|
|
79
|
+
LocationAccessWidget.defaultProps = {
|
|
80
|
+
materialIcon: null,
|
|
81
|
+
// Provide a default value, e.g., null
|
|
82
|
+
buttonLabel: '',
|
|
83
|
+
// Provide a default value, e.g., an empty string
|
|
84
|
+
locationAccessTitle: '',
|
|
85
|
+
// Provide a default value, e.g., an empty string
|
|
86
|
+
locationAccessDescription: '',
|
|
87
|
+
// Provide a default value, e.g., an empty string
|
|
88
|
+
showOrHideTypography: false,
|
|
89
|
+
// Provide a default value, e.g., false
|
|
90
|
+
onClick: () => {}
|
|
91
|
+
};
|
|
92
|
+
var _default = exports.default = LocationAccessWidget;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.LocationAccessStyle = 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
|
+
var _default = exports.default = {};
|
|
12
|
+
const LocationAccessStyle = exports.LocationAccessStyle = _styledComponents.default.aside(_templateObject || (_templateObject = _taggedTemplateLiteral(["\npadding: 32px;\n display: flex;\n flex-direction: column;\n align-items: center;\n border: 1px solid var(--color-divider);\nul{\n margin: 16px 0 32px;\n list-style: none;\n padding: 0;\n width: 100%;\n text-align: center;\n}\nli{\n padding: 0 0 16px;\n}\nli:last-child{\n padding: 0;\n}\n p{\n display: block;\n padding: 32px 0 0;\n position: relative;\n }\n hr{\n background: var(--color-divider);\n height: 1px;\n width: 100%;\n border: none;\n margin: 0;\n position: absolute;\n bottom: 9px;\n }\n button{\n width: 100%;\n }\n p small{\n background: #fff;\n display: inline-block;\n z-index: 1;\n padding: 0 8px;\n position: relative;\n }\n section{\n width: 100%;\n }\n section h3{\n text-align: center;\n margin: 0;\n }\n section iframe{\n width: 100%;\n height: 240px;\n }\n section iframe + section{\n justify-content: space-between;\n }\n section aside{\n border: 1px solid var(--color-divider);\n margin: 16px 0 32px;\n border-radius: 4px;\n }\n section button{\n width: auto;\n }\n"])));
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
require("core-js/modules/es.array.includes.js");
|
|
8
|
+
require("core-js/modules/es.string.includes.js");
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _EditOutlined = _interopRequireDefault(require("@material-ui/icons/EditOutlined"));
|
|
11
|
+
var _MaterialIcon = _interopRequireDefault(require("../../components/oa-component-icons/MaterialIcon"));
|
|
12
|
+
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
13
|
+
var _CustomButton = _interopRequireDefault(require("../../components/oa-component-button/CustomButton"));
|
|
14
|
+
var _AddressForm = _interopRequireDefault(require("./AddressForm"));
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
/* eslint-disable */
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Address Details component.
|
|
20
|
+
* This component renders the address details and edit button.
|
|
21
|
+
* @param {Object} props Component props.
|
|
22
|
+
* @param {Object} props.geolocationData Geolocation data.
|
|
23
|
+
* @param {boolean} props.pinCodeServisible Flag to indicate
|
|
24
|
+
* if the pin code is serviceable.
|
|
25
|
+
* @param {Function} props.editLocationHandler Function to handle edit location.
|
|
26
|
+
* @param {Function} props.onFinish Function to call on address form submission.
|
|
27
|
+
* @returns {React.ReactNode} Address Details component.
|
|
28
|
+
*/
|
|
29
|
+
function AddressDetails(_ref) {
|
|
30
|
+
var _geolocationData$addr, _geolocationData$addr2;
|
|
31
|
+
let {
|
|
32
|
+
geolocationData,
|
|
33
|
+
pinCodeServisible,
|
|
34
|
+
editLocationHandler,
|
|
35
|
+
onFinish,
|
|
36
|
+
showAddressType,
|
|
37
|
+
isSaveButtonDisabled
|
|
38
|
+
} = _ref;
|
|
39
|
+
const showPinCode = () => {
|
|
40
|
+
var _addressLine2$mainAdd, _addressLine2$seconda;
|
|
41
|
+
const {
|
|
42
|
+
addressLine2,
|
|
43
|
+
pincode
|
|
44
|
+
} = geolocationData;
|
|
45
|
+
const isPincodeIncluded = (addressLine2 === null || addressLine2 === void 0 || (_addressLine2$mainAdd = addressLine2.mainAddress) === null || _addressLine2$mainAdd === void 0 ? void 0 : _addressLine2$mainAdd.includes(pincode)) || (addressLine2 === null || addressLine2 === void 0 || (_addressLine2$seconda = addressLine2.secondaryAddress) === null || _addressLine2$seconda === void 0 ? void 0 : _addressLine2$seconda.includes(pincode));
|
|
46
|
+
if (isPincodeIncluded) return "";
|
|
47
|
+
if (pincode) return ", ".concat(pincode);
|
|
48
|
+
return "";
|
|
49
|
+
};
|
|
50
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
51
|
+
className: "addresBoxDiv"
|
|
52
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
53
|
+
className: "addressEdit"
|
|
54
|
+
}, pinCodeServisible && /*#__PURE__*/_react.default.createElement("div", {
|
|
55
|
+
className: "addressDetails"
|
|
56
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
57
|
+
className: "type-t1-400",
|
|
58
|
+
color: "primary-content"
|
|
59
|
+
}, (_geolocationData$addr = geolocationData.addressLine2) === null || _geolocationData$addr === void 0 ? void 0 : _geolocationData$addr.mainAddress), /*#__PURE__*/_react.default.createElement("div", {
|
|
60
|
+
className: "margin-top-4"
|
|
61
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
62
|
+
className: "type-b3-400",
|
|
63
|
+
color: "secondary-content"
|
|
64
|
+
}, (_geolocationData$addr2 = geolocationData.addressLine2) === null || _geolocationData$addr2 === void 0 ? void 0 : _geolocationData$addr2.secondaryAddress, showPinCode()))), pinCodeServisible && /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
65
|
+
iconConfig: {
|
|
66
|
+
icon: /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
67
|
+
icon: _EditOutlined.default
|
|
68
|
+
}),
|
|
69
|
+
position: "left"
|
|
70
|
+
},
|
|
71
|
+
size: "small",
|
|
72
|
+
label: "Edit location",
|
|
73
|
+
type: "text-only",
|
|
74
|
+
onClick: editLocationHandler
|
|
75
|
+
})), pinCodeServisible ? /*#__PURE__*/_react.default.createElement(_AddressForm.default, {
|
|
76
|
+
geolocationData: geolocationData,
|
|
77
|
+
onFinish: onFinish,
|
|
78
|
+
showAddressType: showAddressType,
|
|
79
|
+
isSaveButtonDisabled: isSaveButtonDisabled
|
|
80
|
+
}) : /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
81
|
+
color: "negative"
|
|
82
|
+
}, "Pincode according to your pin on map is Non-serviceable, please move the pin to serviceable pincode."));
|
|
83
|
+
}
|
|
84
|
+
var _default = exports.default = AddressDetails;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _antd = require("antd");
|
|
10
|
+
var _CustomInput = _interopRequireDefault(require("../../components/oa-component-input/CustomInput"));
|
|
11
|
+
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
12
|
+
var _CustomButton = _interopRequireDefault(require("../../components/oa-component-button/CustomButton"));
|
|
13
|
+
var _CustomRadio = _interopRequireDefault(require("../../components/oa-component-radio/CustomRadio"));
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
/* eslint-disable */
|
|
16
|
+
|
|
17
|
+
// Address Form Component
|
|
18
|
+
/**
|
|
19
|
+
* @description
|
|
20
|
+
* Address Form component.
|
|
21
|
+
* Component props:
|
|
22
|
+
* - `geolocationData`: Geolocation data.
|
|
23
|
+
* - `onFinish`: Function to call on address form submission.
|
|
24
|
+
*
|
|
25
|
+
* @param {Object} props Component props.
|
|
26
|
+
* @returns {React.ReactNode} Address Form component.
|
|
27
|
+
*/
|
|
28
|
+
function AddressForm(props) {
|
|
29
|
+
const [form] = _antd.Form.useForm();
|
|
30
|
+
const {
|
|
31
|
+
geolocationData,
|
|
32
|
+
onFinish,
|
|
33
|
+
showAddressType,
|
|
34
|
+
isSaveButtonDisabled = false
|
|
35
|
+
} = props;
|
|
36
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Form, {
|
|
37
|
+
form: form,
|
|
38
|
+
initialValues: {
|
|
39
|
+
houseNo: (geolocationData === null || geolocationData === void 0 ? void 0 : geolocationData.addressLine1) || undefined,
|
|
40
|
+
landmark: (geolocationData === null || geolocationData === void 0 ? void 0 : geolocationData.landmark) || undefined
|
|
41
|
+
},
|
|
42
|
+
name: "getCompleteAddress",
|
|
43
|
+
onFinish: onFinish
|
|
44
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
45
|
+
className: "margin-top-12"
|
|
46
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
47
|
+
color: "primary-content",
|
|
48
|
+
className: "type-b2-400"
|
|
49
|
+
}, "House no./Flat/Floor", /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
50
|
+
color: "negative"
|
|
51
|
+
}, "*")), /*#__PURE__*/_react.default.createElement("div", {
|
|
52
|
+
className: "margin-top-4"
|
|
53
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
54
|
+
name: "houseNo",
|
|
55
|
+
rules: [{
|
|
56
|
+
required: true,
|
|
57
|
+
message: "Please input your House no. / Flat / Floor!"
|
|
58
|
+
}]
|
|
59
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomInput.default, {
|
|
60
|
+
placeholder: "Type here",
|
|
61
|
+
autoFocus: true,
|
|
62
|
+
maxLength: 250
|
|
63
|
+
})))), /*#__PURE__*/_react.default.createElement("div", {
|
|
64
|
+
className: "margin-top-12"
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
66
|
+
color: "primary-content",
|
|
67
|
+
className: "type-b2-400"
|
|
68
|
+
}, "Nearby Landmark"), /*#__PURE__*/_react.default.createElement("div", {
|
|
69
|
+
className: "margin-top-4"
|
|
70
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
71
|
+
name: "landmark"
|
|
72
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomInput.default, {
|
|
73
|
+
placeholder: "Type here",
|
|
74
|
+
maxLength: 100
|
|
75
|
+
})))), showAddressType && /*#__PURE__*/_react.default.createElement("div", {
|
|
76
|
+
className: "margin-top-12"
|
|
77
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
78
|
+
color: "primary-content",
|
|
79
|
+
className: "type-b2-400"
|
|
80
|
+
}, "Address Type", /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
81
|
+
color: "negative"
|
|
82
|
+
}, "*")), /*#__PURE__*/_react.default.createElement("div", {
|
|
83
|
+
className: "margin-top-4"
|
|
84
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
85
|
+
name: "addressType",
|
|
86
|
+
rules: [{
|
|
87
|
+
required: true,
|
|
88
|
+
message: "Please select Address Type"
|
|
89
|
+
}]
|
|
90
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomRadio.default.Group, null, /*#__PURE__*/_react.default.createElement(_CustomRadio.default, {
|
|
91
|
+
value: "RESIDENTIAL",
|
|
92
|
+
label: "Residential"
|
|
93
|
+
}), /*#__PURE__*/_react.default.createElement(_CustomRadio.default, {
|
|
94
|
+
value: "COMMERCIAL",
|
|
95
|
+
label: "Commercial"
|
|
96
|
+
}))))), /*#__PURE__*/_react.default.createElement("div", {
|
|
97
|
+
className: "buttonBottom margin-top-24"
|
|
98
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Form.Item, null, /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
99
|
+
disabled: isSaveButtonDisabled || false,
|
|
100
|
+
type: "primary",
|
|
101
|
+
size: "large",
|
|
102
|
+
label: "Save and Proceed",
|
|
103
|
+
htmlType: "submit"
|
|
104
|
+
}))));
|
|
105
|
+
}
|
|
106
|
+
var _default = exports.default = AddressForm;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _LocationOff = _interopRequireDefault(require("@material-ui/icons/LocationOff"));
|
|
9
|
+
var _MaterialIcon = _interopRequireDefault(require("../../components/oa-component-icons/MaterialIcon"));
|
|
10
|
+
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
11
|
+
var _CustomModal = _interopRequireDefault(require("../../components/oa-component-modal/CustomModal"));
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
/* eslint-disable */
|
|
14
|
+
|
|
15
|
+
// Custom Modal Component
|
|
16
|
+
/**
|
|
17
|
+
* CustomModalComponent is a modal that informs the user when their location cannot be detected.
|
|
18
|
+
*
|
|
19
|
+
* @param {Object} props - The component props.
|
|
20
|
+
* @param {boolean} props.open - Determines if the modal is open.
|
|
21
|
+
* @param {Function} props.setOpenLocationNotDetectedModal - Function to toggle the modal's open state.
|
|
22
|
+
*
|
|
23
|
+
* @returns {JSX.Element} A modal component displaying a message about location detection issues.
|
|
24
|
+
*/
|
|
25
|
+
function CustomModalComponent(_ref) {
|
|
26
|
+
let {
|
|
27
|
+
open,
|
|
28
|
+
setOpenLocationNotDetectedModal
|
|
29
|
+
} = _ref;
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement(_CustomModal.default, {
|
|
31
|
+
className: "noLoacationMadalCustom",
|
|
32
|
+
open: open,
|
|
33
|
+
buttonConfig: [{
|
|
34
|
+
callback: () => setOpenLocationNotDetectedModal(false),
|
|
35
|
+
label: 'Okay, Got it',
|
|
36
|
+
width: '100%'
|
|
37
|
+
}],
|
|
38
|
+
onCancel: () => setOpenLocationNotDetectedModal(false),
|
|
39
|
+
width: "388px"
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
41
|
+
className: "noLocationSection"
|
|
42
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
43
|
+
color: "primary",
|
|
44
|
+
size: 72,
|
|
45
|
+
icon: _LocationOff.default
|
|
46
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
47
|
+
className: "margin-top-12"
|
|
48
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
49
|
+
color: "primary-content",
|
|
50
|
+
className: "type-t1-500"
|
|
51
|
+
}, "Location not detected")), /*#__PURE__*/_react.default.createElement("div", {
|
|
52
|
+
className: "margin-top-12"
|
|
53
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
54
|
+
color: "secondary-content",
|
|
55
|
+
className: "type-b1-400"
|
|
56
|
+
}, "We are having trouble finding your location. Please allow location access from your browser settings."))));
|
|
57
|
+
}
|
|
58
|
+
var _default = exports.default = CustomModalComponent;
|