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.
Files changed (320) hide show
  1. package/README.md +92 -0
  2. package/build/MockData.js +2311 -0
  3. package/build/components/oa-component-accordion/Accordion.js +195 -0
  4. package/build/components/oa-component-accordion/styles.js +13 -0
  5. package/build/components/oa-component-auto-complete/CustomAutoComplete.js +167 -0
  6. package/build/components/oa-component-bar-chart/BarChart.js +295 -0
  7. package/build/components/oa-component-bread-crumb/CustomBreadCrumb.js +47 -0
  8. package/build/components/oa-component-button/CustomButton.js +108 -0
  9. package/build/components/oa-component-button/styles.js +41 -0
  10. package/build/components/oa-component-checkbox/CustomCheckBox.js +115 -0
  11. package/build/components/oa-component-checkbox/styles.js +12 -0
  12. package/build/components/oa-component-count-card/CustomCountCard.js +74 -0
  13. package/build/components/oa-component-count-card/styles.js +12 -0
  14. package/build/components/oa-component-datepicker/CustomDatePicker.js +134 -0
  15. package/build/components/oa-component-demo-border-radius/BorderRadiusDemo.js +35 -0
  16. package/build/components/oa-component-demo-border-radius/styles.js +12 -0
  17. package/build/components/oa-component-demo-color-variables/ColorVariablesDemo.js +34 -0
  18. package/build/components/oa-component-demo-color-variables/styles.js +12 -0
  19. package/build/components/oa-component-demo-elevation/ElevationDemo.js +22 -0
  20. package/build/components/oa-component-demo-elevation/styles.js +12 -0
  21. package/build/components/oa-component-demo-spacing/SpacingScales.js +26 -0
  22. package/build/components/oa-component-demo-spacing/styles.js +259 -0
  23. package/build/components/oa-component-drawer/CustomDrawer.js +178 -0
  24. package/build/components/oa-component-drawer/styles.js +16 -0
  25. package/build/components/oa-component-dropdown/CustomDropdown.js +102 -0
  26. package/build/components/oa-component-dropdown/customClass.css +9 -0
  27. package/build/components/oa-component-dropdown/styles.js +12 -0
  28. package/build/components/oa-component-feedback-form/FeedbackForm.js +75 -0
  29. package/build/components/oa-component-feedback-tooltip/FeedbackTooltip.js +69 -0
  30. package/build/components/oa-component-form-item/CustomFormItem.js +74 -0
  31. package/build/components/oa-component-header/CustomHeader.js +104 -0
  32. package/build/components/oa-component-header/styles.js +12 -0
  33. package/build/components/oa-component-icons/CustomIcon.js +92 -0
  34. package/build/components/oa-component-icons/MaterialIcon.js +70 -0
  35. package/build/components/oa-component-icons/SizedSvg.js +42 -0
  36. package/build/components/oa-component-info/CustomInfo.js +119 -0
  37. package/build/components/oa-component-info/styles.js +15 -0
  38. package/build/components/oa-component-input/CustomInput.js +131 -0
  39. package/build/components/oa-component-input-number/CustomInputNumber.js +140 -0
  40. package/build/components/oa-component-lable/CustomLable.js +37 -0
  41. package/build/components/oa-component-lable/styles.js +12 -0
  42. package/build/components/oa-component-loader/CustomLoader.js +66 -0
  43. package/build/components/oa-component-modal/CustomModal.js +153 -0
  44. package/build/components/oa-component-modal/styles.js +14 -0
  45. package/build/components/oa-component-notification/CustomNotification.js +152 -0
  46. package/build/components/oa-component-notification/styles.js +12 -0
  47. package/build/components/oa-component-notification/usage-example.md +44 -0
  48. package/build/components/oa-component-pagination/CustomPagination.js +111 -0
  49. package/build/components/oa-component-pagination/styles.js +12 -0
  50. package/build/components/oa-component-popover/CustomPopover.js +58 -0
  51. package/build/components/oa-component-progress-bar/CustomProgressBar.js +68 -0
  52. package/build/components/oa-component-progress-bar/styles.js +12 -0
  53. package/build/components/oa-component-radio/CustomRadio.js +112 -0
  54. package/build/components/oa-component-radio/styles.js +13 -0
  55. package/build/components/oa-component-rating/CustomRating.js +13 -0
  56. package/build/components/oa-component-select/CustomSelect.js +432 -0
  57. package/build/components/oa-component-steps/CustomSteps.js +117 -0
  58. package/build/components/oa-component-steps/styles.js +12 -0
  59. package/build/components/oa-component-table/CustomTable.js +300 -0
  60. package/build/components/oa-component-table/CustomTableV1.js +610 -0
  61. package/build/components/oa-component-table/styles.js +14 -0
  62. package/build/components/oa-component-table/stylesV1.js +19 -0
  63. package/build/components/oa-component-tabs/CustomTabs.js +102 -0
  64. package/build/components/oa-component-tabs/styles.js +13 -0
  65. package/build/components/oa-component-tag/CustomTag.js +66 -0
  66. package/build/components/oa-component-tag/styles.js +75 -0
  67. package/build/components/oa-component-textarea/CustomTextArea.js +74 -0
  68. package/build/components/oa-component-textarea/styles.js +16 -0
  69. package/build/components/oa-component-timeline/CustomTimeline.js +65 -0
  70. package/build/components/oa-component-timeline/styles.js +15 -0
  71. package/build/components/oa-component-timepicker/CustomTimePicker.js +104 -0
  72. package/build/components/oa-component-toggle/CustomToggle.js +111 -0
  73. package/build/components/oa-component-toggle/styles.js +43 -0
  74. package/build/components/oa-component-tooltip/CustomTooltip.js +70 -0
  75. package/build/components/oa-component-typography/Typography.js +58 -0
  76. package/build/components/oa-component-typography/styles.js +13 -0
  77. package/build/components/oa-component-upload/CustomUpload.js +332 -0
  78. package/build/components/oa-component-upload/styles.js +13 -0
  79. package/build/components/oa-component-viewer/CustomViewer.js +273 -0
  80. package/build/components/oa-component-viewer/styles.js +14 -0
  81. package/build/constants/ratingConstants.js +194 -0
  82. package/build/dev/oa-component-document-viewer/CustomDocumentViewer.js +367 -0
  83. package/build/dev/oa-component-document-viewer/styles.js +12 -0
  84. package/build/dev/oa-component-timeline/CustomTimeline.js +53 -0
  85. package/build/dev/oa-component-timeline/styles.js +15 -0
  86. package/build/dev/oa-component-upload/CustomUpload.js +285 -0
  87. package/build/dev/oa-component-upload/styles.js +13 -0
  88. package/build/dev/oa-component-viewer/CustomViewer.js +326 -0
  89. package/build/dev/oa-component-viewer/styles.js +14 -0
  90. package/build/dev/oa-widget-document-modal/DocumentSideModal.js +166 -0
  91. package/build/dev/oa-widget-document-modal/styles.js +12 -0
  92. package/build/dev/oa-widget-document-side-drawer/DocumentSideDrawer.js +196 -0
  93. package/build/dev/oa-widget-document-side-drawer/styles.js +12 -0
  94. package/build/dev/oa-widget-document-upload-card/DocUploadCardWidget.js +179 -0
  95. package/build/dev/oa-widget-document-upload-card/styles.js +13 -0
  96. package/build/global-css/BorderRadius.js +22 -0
  97. package/build/global-css/ColorVariables.js +26 -0
  98. package/build/global-css/ColorVariablesMap.js +29 -0
  99. package/build/global-css/CustomDropDownThemes.js +31 -0
  100. package/build/global-css/Elevation.js +35 -0
  101. package/build/global-css/GlobalCss.js +26 -0
  102. package/build/global-css/GridLayout.js +25 -0
  103. package/build/global-css/SpacingScales.js +11 -0
  104. package/build/global-css/Typographies.js +26 -0
  105. package/build/global-css/TypographiesMap.js +71 -0
  106. package/build/global-css/color-options.js +8 -0
  107. package/build/global-css/commonStyles.js +11 -0
  108. package/build/global-css/tooltip-placement-option.js +8 -0
  109. package/build/global-css/typography-options.js +8 -0
  110. package/build/images/AC.png +0 -0
  111. package/build/images/Car.png +0 -0
  112. package/build/images/Cooler.png +0 -0
  113. package/build/images/Default.png +0 -0
  114. package/build/images/Footwear.png +0 -0
  115. package/build/images/Furniture.png +0 -0
  116. package/build/images/Glasses.png +0 -0
  117. package/build/images/HA.png +0 -0
  118. package/build/images/Laptop.png +0 -0
  119. package/build/images/Luggage.png +0 -0
  120. package/build/images/Microwave.png +0 -0
  121. package/build/images/Mobile.png +0 -0
  122. package/build/images/PdfSampleImage.png +0 -0
  123. package/build/images/Refrigerator.png +0 -0
  124. package/build/images/Shirts.png +0 -0
  125. package/build/images/Tablets.png +0 -0
  126. package/build/images/Television.png +0 -0
  127. package/build/images/TwoWheeler.png +0 -0
  128. package/build/images/Wallet.png +0 -0
  129. package/build/images/WashingMachine.png +0 -0
  130. package/build/images/WaterPurifier.png +0 -0
  131. package/build/images/Wearable.png +0 -0
  132. package/build/images/ajax-loader.gif +0 -0
  133. package/build/images/astronaut_emptystate.png +0 -0
  134. package/build/images/caution.svg +3 -0
  135. package/build/images/close.svg +3 -0
  136. package/build/images/current-location.svg +3 -0
  137. package/build/images/delete.svg +8 -0
  138. package/build/images/exportGrp01.png +0 -0
  139. package/build/images/exportGrp02.png +0 -0
  140. package/build/images/exportGrp03.png +0 -0
  141. package/build/images/hand-icon.svg +4 -0
  142. package/build/images/iphone.svg +9 -0
  143. package/build/images/left-icon.svg +28 -0
  144. package/build/images/map_pointer.svg +25 -0
  145. package/build/images/modal-img.svg +8 -0
  146. package/build/images/oaChat.svg +5 -0
  147. package/build/images/offer.svg +3 -0
  148. package/build/images/oneassist-logo.png +0 -0
  149. package/build/images/outOfStock.png +0 -0
  150. package/build/images/right-icon.svg +28 -0
  151. package/build/images/search_ic.svg +3 -0
  152. package/build/images/search_not_found.svg +7 -0
  153. package/build/images/upload.svg +8 -0
  154. package/build/images/zoom.svg +4 -0
  155. package/build/index.js +763 -0
  156. package/build/layout/DetailDataLayout/DetailDataLayout.js +20 -0
  157. package/build/layout/DetailDataLayout/components/Form.js +22 -0
  158. package/build/layout/DetailDataLayout/components/Header.js +32 -0
  159. package/build/layout/DetailDataLayout/style.css +9 -0
  160. package/build/layout/DetailDataLayout/styles.js +12 -0
  161. package/build/layout/EntityOverviewLayout/EntityOverviewLayout.js +235 -0
  162. package/build/layout/EntityOverviewLayout/reducer/entityOverviewLayoutReducer.js +63 -0
  163. package/build/layout/EntityOverviewLayout/styles.js +13 -0
  164. package/build/layout/GenricLayOut/GenricLayOut.js +2293 -0
  165. package/build/layout/GenricLayOut/components/AppliedFilters.js +84 -0
  166. package/build/layout/GenricLayOut/components/CardList.js +34 -0
  167. package/build/layout/GenricLayOut/components/DropdownSearch.js +48 -0
  168. package/build/layout/GenricLayOut/components/Header.js +74 -0
  169. package/build/layout/GenricLayOut/components/Modal.js +85 -0
  170. package/build/layout/GenricLayOut/components/ProfileSection.js +87 -0
  171. package/build/layout/GenricLayOut/components/Search.js +51 -0
  172. package/build/layout/GenricLayOut/components/StaticFilter.css +73 -0
  173. package/build/layout/GenricLayOut/components/StaticFilter.js +37 -0
  174. package/build/layout/GenricLayOut/reducer/layoutReducer.js +294 -0
  175. package/build/layout/GenricLayOut/resolver/staticConfigResolver.js +98 -0
  176. package/build/layout/GenricLayOut/styles.js +25 -0
  177. package/build/layout/paymentAndConsent/CancelScreen.js +46 -0
  178. package/build/layout/paymentAndConsent/ConsentCard.js +68 -0
  179. package/build/layout/paymentAndConsent/DetailsCard.js +75 -0
  180. package/build/layout/paymentAndConsent/DetailsList.js +38 -0
  181. package/build/layout/paymentAndConsent/Header.js +33 -0
  182. package/build/layout/paymentAndConsent/InProgressScreen.js +46 -0
  183. package/build/layout/paymentAndConsent/Loader.js +21 -0
  184. package/build/layout/paymentAndConsent/Modal.js +28 -0
  185. package/build/layout/paymentAndConsent/PaymentAndConsent.js +22 -0
  186. package/build/layout/paymentAndConsent/PaymentCard.js +83 -0
  187. package/build/layout/paymentAndConsent/Section.js +34 -0
  188. package/build/layout/paymentAndConsent/SuccessScreen.js +46 -0
  189. package/build/layout/paymentAndConsent/TimeLineCard.js +28 -0
  190. package/build/layout/paymentAndConsent/TncList.js +32 -0
  191. package/build/layout/paymentAndConsent/style.js +12 -0
  192. package/build/utils/common.js +20 -0
  193. package/build/utils/download-file.js +23 -0
  194. package/build/utils/fix-decimal-places.js +24 -0
  195. package/build/utils/get-uuid.js +41 -0
  196. package/build/utils/hex-to-rgb.js +30 -0
  197. package/build/utils/index.js +78 -0
  198. package/build/utils/random-generators.js +19 -0
  199. package/build/utils/rupee-formatters.js +69 -0
  200. package/build/utils/type-checkers.js +16 -0
  201. package/build/widgets/oa-form-widget/FormWidget.js +544 -0
  202. package/build/widgets/oa-form-widget/FormWidgetStyle.js +18 -0
  203. package/build/widgets/oa-widget-add-spare-part/AddSparePartCollapseWidget.js +461 -0
  204. package/build/widgets/oa-widget-add-spare-part/AddSparePartWidget.js +355 -0
  205. package/build/widgets/oa-widget-add-spare-part/styles.js +12 -0
  206. package/build/widgets/oa-widget-address/AddressWidget.js +55 -0
  207. package/build/widgets/oa-widget-address/styles.js +13 -0
  208. package/build/widgets/oa-widget-approval/ApprovalWidget.js +200 -0
  209. package/build/widgets/oa-widget-approval/ApprovalWidgetNew.js +492 -0
  210. package/build/widgets/oa-widget-approval/styles.js +13 -0
  211. package/build/widgets/oa-widget-chat/ChatWidget.js +261 -0
  212. package/build/widgets/oa-widget-chat/styles.js +17 -0
  213. package/build/widgets/oa-widget-close-claim/CloseClaimWidget.js +256 -0
  214. package/build/widgets/oa-widget-close-claim/styles.js +12 -0
  215. package/build/widgets/oa-widget-collapsible-key-value/CollapsibleKeyValueWidget.js +395 -0
  216. package/build/widgets/oa-widget-collapsible-key-value/styles.js +16 -0
  217. package/build/widgets/oa-widget-content-panel/ContentPanel.js +82 -0
  218. package/build/widgets/oa-widget-content-panel/styles.js +12 -0
  219. package/build/widgets/oa-widget-custom-details/CustomDetails.js +41 -0
  220. package/build/widgets/oa-widget-customer-rating-card/CustomerRatingCard.js +147 -0
  221. package/build/widgets/oa-widget-customer-rating-card/styles.js +12 -0
  222. package/build/widgets/oa-widget-date-dropdown/DateDropDown.js +385 -0
  223. package/build/widgets/oa-widget-date-dropdown/styles.js +12 -0
  224. package/build/widgets/oa-widget-detailcard/MembershipDetailCard.js +182 -0
  225. package/build/widgets/oa-widget-detailcard/styles.js +12 -0
  226. package/build/widgets/oa-widget-document-upload/DocUploadWidget.js +264 -0
  227. package/build/widgets/oa-widget-document-upload/styles.js +13 -0
  228. package/build/widgets/oa-widget-document-upload-card/DocUploadCardWidget.js +178 -0
  229. package/build/widgets/oa-widget-document-upload-card/styles.js +13 -0
  230. package/build/widgets/oa-widget-dropdown-search-input/DropdownSearchInput.js +200 -0
  231. package/build/widgets/oa-widget-dropdown-search-input/styles.js +12 -0
  232. package/build/widgets/oa-widget-feedback/FeedbackWidget.js +83 -0
  233. package/build/widgets/oa-widget-feedback/styles.js +13 -0
  234. package/build/widgets/oa-widget-form/CustomFormWidget.js +51 -0
  235. package/build/widgets/oa-widget-form/styles.js +12 -0
  236. package/build/widgets/oa-widget-googlerating/GoogleRating.js +55 -0
  237. package/build/widgets/oa-widget-googlerating/styles.js +12 -0
  238. package/build/widgets/oa-widget-guide/GuideWidget.js +70 -0
  239. package/build/widgets/oa-widget-guide/GuideWidgetStyle.js +12 -0
  240. package/build/widgets/oa-widget-header/CustomHeaderWidget.js +98 -0
  241. package/build/widgets/oa-widget-header/styles.js +12 -0
  242. package/build/widgets/oa-widget-hub-automation-modal/HubAutomationDeleteBiker.js +24 -0
  243. package/build/widgets/oa-widget-hub-automation-modal/HubAutomationModal.js +34 -0
  244. package/build/widgets/oa-widget-hub-automation-modal/HubAutomationModalStyle.js +13 -0
  245. package/build/widgets/oa-widget-image-carousel/ImageCarouselWidget.js +256 -0
  246. package/build/widgets/oa-widget-image-carousel/styles.js +23 -0
  247. package/build/widgets/oa-widget-image-gallery/FullscreenViewer.js +169 -0
  248. package/build/widgets/oa-widget-image-gallery/ImageGallery.js +87 -0
  249. package/build/widgets/oa-widget-image-gallery/ThumbnailGrid.js +146 -0
  250. package/build/widgets/oa-widget-image-gallery/imageCache.js +15 -0
  251. package/build/widgets/oa-widget-image-gallery/imageGalleryStyle.js +16 -0
  252. package/build/widgets/oa-widget-input-pattern-pin/CustomPinPatternCaptureWidget.js +395 -0
  253. package/build/widgets/oa-widget-input-pattern-pin/styles.js +12 -0
  254. package/build/widgets/oa-widget-item-info-card/InfoCardListWidget.js +60 -0
  255. package/build/widgets/oa-widget-item-info-card/ItemInfoCardWidget.js +77 -0
  256. package/build/widgets/oa-widget-item-info-card/styles.css +50 -0
  257. package/build/widgets/oa-widget-item-info-card/styles.js +14 -0
  258. package/build/widgets/oa-widget-key-value/KeyValueWidget.js +121 -0
  259. package/build/widgets/oa-widget-key-value/styles.js +14 -0
  260. package/build/widgets/oa-widget-kpi/KPICardWidget.js +86 -0
  261. package/build/widgets/oa-widget-kpi/styles.js +12 -0
  262. package/build/widgets/oa-widget-location-access/LocationAccessWidget.js +92 -0
  263. package/build/widgets/oa-widget-location-access/styles.js +12 -0
  264. package/build/widgets/oa-widget-map-base-location/AddressDetails.js +84 -0
  265. package/build/widgets/oa-widget-map-base-location/AddressForm.js +106 -0
  266. package/build/widgets/oa-widget-map-base-location/CustomModalComponent.js +58 -0
  267. package/build/widgets/oa-widget-map-base-location/MapBaseLocation.js +93 -0
  268. package/build/widgets/oa-widget-map-base-location/MapComponent.js +167 -0
  269. package/build/widgets/oa-widget-map-base-location/styles.js +12 -0
  270. package/build/widgets/oa-widget-membershipcard/MembershipCard.js +266 -0
  271. package/build/widgets/oa-widget-membershipcard/styles.js +13 -0
  272. package/build/widgets/oa-widget-multiple-collapse-with-slots/MultipleCollapseWithSlots.js +85 -0
  273. package/build/widgets/oa-widget-multiple-collapse-with-slots/checkactive.svg +8 -0
  274. package/build/widgets/oa-widget-multiple-collapse-with-slots/checkhover.svg +8 -0
  275. package/build/widgets/oa-widget-multiple-collapse-with-slots/styles.js +16 -0
  276. package/build/widgets/oa-widget-notes/NotesWidget.js +135 -0
  277. package/build/widgets/oa-widget-notes/styles.js +13 -0
  278. package/build/widgets/oa-widget-pincode-base-location/PincodeBaseLocation.js +281 -0
  279. package/build/widgets/oa-widget-pincode-base-location/styles.js +12 -0
  280. package/build/widgets/oa-widget-plan-card/PlanCard.js +183 -0
  281. package/build/widgets/oa-widget-plan-card/styles.js +13 -0
  282. package/build/widgets/oa-widget-preview/Preview.js +172 -0
  283. package/build/widgets/oa-widget-preview/ZoomImageComponent.js +95 -0
  284. package/build/widgets/oa-widget-preview/styles.js +12 -0
  285. package/build/widgets/oa-widget-profile-data/ProfileDataWidget.js +117 -0
  286. package/build/widgets/oa-widget-profile-data/styles.js +13 -0
  287. package/build/widgets/oa-widget-progressive-steps/ProgressiveStepsWidget.js +362 -0
  288. package/build/widgets/oa-widget-progressive-steps/styles.js +12 -0
  289. package/build/widgets/oa-widget-reimbursement-breakup/ReimbursementBreakupWidget.js +141 -0
  290. package/build/widgets/oa-widget-reimbursement-breakup/styles.js +12 -0
  291. package/build/widgets/oa-widget-repair-service/RepairServiceWidget.js +79 -0
  292. package/build/widgets/oa-widget-repair-service/styles.js +12 -0
  293. package/build/widgets/oa-widget-reupload-drawer/ReUploadDrawer.js +164 -0
  294. package/build/widgets/oa-widget-send-payment-link/SendPaymentLinkWidget.js +224 -0
  295. package/build/widgets/oa-widget-send-payment-link/styles.js +15 -0
  296. package/build/widgets/oa-widget-servicecard/ServiceCard.js +185 -0
  297. package/build/widgets/oa-widget-servicecard/styles.js +13 -0
  298. package/build/widgets/oa-widget-sidebar/SidebarWidget.js +105 -0
  299. package/build/widgets/oa-widget-sidebar/components/Header.js +33 -0
  300. package/build/widgets/oa-widget-sidebar/sidebar.css +0 -0
  301. package/build/widgets/oa-widget-sidebar/styles.js +13 -0
  302. package/build/widgets/oa-widget-spare-part/SparePartsCollapseWidget.js +127 -0
  303. package/build/widgets/oa-widget-spare-part/SparePartsWidget.js +294 -0
  304. package/build/widgets/oa-widget-spare-part/styles.js +18 -0
  305. package/build/widgets/oa-widget-stage-timeline/StageTimelineWidget.js +159 -0
  306. package/build/widgets/oa-widget-stage-timeline/styles.js +29 -0
  307. package/build/widgets/oa-widget-track-shipment/TrackShipmentWidget.js +232 -0
  308. package/build/widgets/oa-widget-track-shipment/styles.js +13 -0
  309. package/build/widgets/oa-widget-track-shipment-list/TrackShipmentWidgetList.js +103 -0
  310. package/build/widgets/oa-widget-track-shipment-list/fn.js +81 -0
  311. package/build/widgets/oa-widget-track-shipment-list/styles.js +13 -0
  312. package/build/widgets/oa-widget-upload-download/UploadDownloadWidget.js +167 -0
  313. package/build/widgets/oa-widget-upload-download/styles.js +14 -0
  314. package/build/widgets/oa-widget-user-management/UserManagementWidget.js +352 -0
  315. package/build/widgets/oa-widget-user-management/styles.js +15 -0
  316. package/build/widgets/oa-widget-view-history/ViewHistoryWidget.js +181 -0
  317. package/build/widgets/oa-widget-view-history/styles.js +12 -0
  318. package/build/widgets/oa-widget-view-previous-description/ViewPreviousDescriptionWidget.js +188 -0
  319. package/build/widgets/oa-widget-view-previous-description/styles.js +16 -0
  320. package/package.json +100 -0
@@ -0,0 +1,182 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ require("core-js/modules/es.symbol.description.js");
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _propTypes = _interopRequireDefault(require("prop-types"));
10
+ var _InfoOutlined = _interopRequireDefault(require("@material-ui/icons/InfoOutlined"));
11
+ var _ArrowForwardIosSharp = _interopRequireDefault(require("@material-ui/icons/ArrowForwardIosSharp"));
12
+ var _ArrowForwardIos = _interopRequireDefault(require("@material-ui/icons/ArrowForwardIos"));
13
+ var _CustomTooltip = _interopRequireDefault(require("../../components/oa-component-tooltip/CustomTooltip"));
14
+ var _CustomButton = _interopRequireDefault(require("../../components/oa-component-button/CustomButton"));
15
+ var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
16
+ var _MaterialIcon = _interopRequireDefault(require("../../components/oa-component-icons/MaterialIcon"));
17
+ var _styles = require("./styles");
18
+ var _offer = _interopRequireDefault(require("../../images/offer.svg"));
19
+ var _CustomIcon = _interopRequireDefault(require("../../components/oa-component-icons/CustomIcon"));
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
+ /**
22
+ * MembershipDetailCard component
23
+ *
24
+ * @param {Object} card - The card object which contains all the necessary data to render the component
25
+ * @param {Object} card.body - The body object which contains the properties for the card
26
+ * @param {string} card.body.heading - The heading of the card
27
+ * @param {string} card.body.subHeading - The subheading of the card
28
+ * @param {Object} card.body.primaryInfo - The primary info object which contains the label and type of the primary info
29
+ * @param {string} card.body.primaryInfo.label - The label of the primary info
30
+ * @param {string} card.body.primaryInfo.type - The type of the primary info
31
+ * @param {Object} card.body.primaryPanel - The primary panel object which contains the label, icon and function to be called on click
32
+ * @param {string} card.body.primaryPanel.label - The label of the primary panel
33
+ * @param {function} card.body.primaryPanel.name - The function to be called on click
34
+ * @param {Object} card.body.primaryPanel.icon - The icon of the primary panel
35
+ * @param {string} card.body.secondaryInfo - The secondary info of the card
36
+ * @param {Array} card.body.alert - The alert array which contains objects with heading, subheading, description and actions
37
+ * @param {Object} card.body.alert[i] - The alert object
38
+ * @param {string} card.body.alert[i].heading - The heading of the alert
39
+ * @param {string} card.body.alert[i].subHeading - The subheading of the alert
40
+ * @param {Object} card.body.alert[i].description - The description object of the alert
41
+ * @param {string} card.body.alert[i].description.text - The description text of the alert
42
+ * @param {Array} card.body.alert[i].actions - The actions array of the alert
43
+ * @param {Object} card.body.alert[i].actions[j] - The action object
44
+ * @param {string} card.body.alert[i].actions[j].label - The label of the action
45
+ * @param {string} card.body.alert[i].actions[j].type - The type of the action
46
+ * @param {function} card.body.alert[i].actions[j].name - The function to be called on click
47
+ * @returns {React.ReactElement} The rendered component
48
+ */
49
+ function MembershipDetailCard(_ref) {
50
+ let {
51
+ card
52
+ } = _ref;
53
+ const {
54
+ body
55
+ } = card;
56
+ const {
57
+ heading,
58
+ subHeading,
59
+ primaryInfo,
60
+ primaryPanel,
61
+ secondaryInfo,
62
+ alert
63
+ } = body || {};
64
+ return /*#__PURE__*/_react.default.createElement(_styles.MembershipCardStyle, null, body && /*#__PURE__*/_react.default.createElement(_styles.CardBody, null, /*#__PURE__*/_react.default.createElement("div", {
65
+ className: "cardHead"
66
+ }, /*#__PURE__*/_react.default.createElement("div", null, subHeading && /*#__PURE__*/_react.default.createElement(_Typography.default, {
67
+ className: "type-sl1-700",
68
+ color: "secondary-content"
69
+ }, subHeading), heading && /*#__PURE__*/_react.default.createElement("div", {
70
+ className: "titleHead"
71
+ }, /*#__PURE__*/_react.default.createElement(_Typography.default, {
72
+ color: "primary-content",
73
+ className: "type-t1-500"
74
+ }, heading))), (primaryInfo || secondaryInfo) && /*#__PURE__*/_react.default.createElement("div", {
75
+ className: "primary-info"
76
+ }, secondaryInfo && /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
77
+ color: "secondary-content",
78
+ className: "type-b2-400"
79
+ }, secondaryInfo)), /*#__PURE__*/_react.default.createElement("label", null, ' ', primaryInfo && /*#__PURE__*/_react.default.createElement(_Typography.default, {
80
+ color: (primaryInfo === null || primaryInfo === void 0 ? void 0 : primaryInfo.type) === 'success' ? 'positive' : 'negative',
81
+ className: "type-b2-400"
82
+ }, primaryInfo.label)))), primaryPanel && /*#__PURE__*/_react.default.createElement("div", {
83
+ className: "primaryInfo",
84
+ onClick: primaryPanel.name,
85
+ onKeyDown: e => {
86
+ if (e.key === 'Enter') primaryPanel.name();
87
+ },
88
+ tabIndex: 0,
89
+ role: "button"
90
+ }, /*#__PURE__*/_react.default.createElement("div", {
91
+ className: "paraWithIcon"
92
+ }, /*#__PURE__*/_react.default.createElement(_CustomIcon.default, {
93
+ style: {
94
+ width: '24px'
95
+ },
96
+ alt: "phone img",
97
+ src: _offer.default
98
+ }), /*#__PURE__*/_react.default.createElement("label", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
99
+ color: "primary-background",
100
+ className: "type-link-button-500"
101
+ }, primaryPanel.label))), /*#__PURE__*/_react.default.createElement("div", {
102
+ className: "displayFlex"
103
+ }, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
104
+ color: "primary-background",
105
+ icon: _ArrowForwardIos.default
106
+ }))), alert.length > 0 && alert.map((item, i) => {
107
+ var _item$description, _item$description2, _item$description3, _item$description4;
108
+ return ((item === null || item === void 0 ? void 0 : item.subHeading) !== '' || (item === null || item === void 0 ? void 0 : item.heading) !== '' || (item === null || item === void 0 || (_item$description = item.description) === null || _item$description === void 0 ? void 0 : _item$description.text) !== undefined) && /*#__PURE__*/_react.default.createElement("div", {
109
+ className: item !== null && item !== void 0 && (_item$description2 = item.description) !== null && _item$description2 !== void 0 && _item$description2.text && (item === null || item === void 0 || (_item$description3 = item.description) === null || _item$description3 === void 0 ? void 0 : _item$description3.text) !== '' ? "toolTipInfo ".concat(item.type) : "toolTipInfo ".concat(item.type, " flexChangeBody")
110
+ }, /*#__PURE__*/_react.default.createElement("div", {
111
+ className: "toolTip"
112
+ }, item.tooltip && /*#__PURE__*/_react.default.createElement(_CustomTooltip.default, {
113
+ isDisplayed: true
114
+ }, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
115
+ color: item.type,
116
+ icon: _InfoOutlined.default,
117
+ size: 24
118
+ })), /*#__PURE__*/_react.default.createElement("div", {
119
+ className: "flexGap"
120
+ }, (item === null || item === void 0 ? void 0 : item.subHeading) && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h3", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
121
+ color: "secondary-content",
122
+ className: "type-sl1-700"
123
+ }, item === null || item === void 0 ? void 0 : item.subHeading))), (item === null || item === void 0 ? void 0 : item.heading) && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h4", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
124
+ color: "primary-content",
125
+ className: "type-t2-700"
126
+ }, item === null || item === void 0 ? void 0 : item.heading))), (item === null || item === void 0 ? void 0 : item.description) && (item === null || item === void 0 || (_item$description4 = item.description) === null || _item$description4 === void 0 ? void 0 : _item$description4.text) && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("p", {
127
+ className: "preline"
128
+ }, /*#__PURE__*/_react.default.createElement(_Typography.default, {
129
+ color: "primary-content",
130
+ className: "type-b2-400"
131
+ }, item.description.text))))), item.actions && /*#__PURE__*/_react.default.createElement("div", {
132
+ className: "viewStatus"
133
+ }, item.actions.map((action, index) => /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
134
+ key: action.label,
135
+ label: action.label,
136
+ type: action.type,
137
+ onClick: action.name,
138
+ iconConfig: {
139
+ icon: /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
140
+ icon: _ArrowForwardIosSharp.default,
141
+ size: 16
142
+ }),
143
+ position: 'right'
144
+ }
145
+ }))));
146
+ })));
147
+ }
148
+ MembershipDetailCard.propTypes = {
149
+ card: _propTypes.default.shape({
150
+ body: _propTypes.default.shape({
151
+ heading: _propTypes.default.string,
152
+ subHeading: _propTypes.default.string,
153
+ primaryInfo: _propTypes.default.shape({
154
+ label: _propTypes.default.string,
155
+ type: _propTypes.default.string
156
+ }),
157
+ secondaryInfo: _propTypes.default.string,
158
+ primaryPanel: _propTypes.default.shape({
159
+ icon: _propTypes.default.node,
160
+ label: _propTypes.default.string,
161
+ name: _propTypes.default.func
162
+ }),
163
+ alert: _propTypes.default.shape({
164
+ tooltip: _propTypes.default.string,
165
+ subHeading: _propTypes.default.string,
166
+ heading: _propTypes.default.string,
167
+ description: _propTypes.default.shape({
168
+ text: _propTypes.default.string
169
+ }),
170
+ actions: _propTypes.default.arrayOf(_propTypes.default.shape({
171
+ label: _propTypes.default.string,
172
+ type: _propTypes.default.string,
173
+ name: _propTypes.default.func
174
+ }))
175
+ })
176
+ })
177
+ })
178
+ };
179
+ MembershipDetailCard.defaultProps = {
180
+ card: null
181
+ };
182
+ var _default = exports.default = MembershipDetailCard;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.MembershipCardStyle = exports.CardBody = void 0;
7
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
8
+ var _templateObject, _templateObject2;
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 MembershipCardStyle = exports.MembershipCardStyle = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.flexGap div{\n padding: 0 0 8px;\n}\n.viewStatus button{\n padding: 16px 0 0;\n}\n.flexGap div:last-child{\n padding: 0;\n}\n.primaryInfo svg{\n cursor: pointer;\n}\np,h2,h3{\n margin: 0;\n}\n padding: 24px;\n background: var(--color-primary-background);\n border-radius: 12px;\n box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);\n position: relative;\n border: 1px solid var(--color-divider);\n margin: 0 0 24px;\n @media only screen and (max-width: 600px) {\n gap: 16px;\n padding: 16px;\n }\n .primaryInfo{\n display: flex;\n padding: 12px 8px;\n justify-content: space-between;\n background: var(--color-primary);\n border-radius: 8px;\n align-items: center;\n cursor: pointer;\n }\n .primaryInfo img{\n width: 24px;\n height: 24px;\n }\n .toolTipInfo .text-container svg {\n font-size: 16px !important;\n }\n .paraWithIcon{\n display: flex;\n gap: 8px;\n align-items: center;\n }\n .toolTipInfo{\n display: flex;\n background: var(--color-background-positive);\n padding: 12px;\n border-radius: 8px;\n flex-direction: column;\n justify-content: space-between;\n }\n .flexChangeBody{\n flex-direction: row;\n align-items: center;\n }\n\n .toolTipInfo .toolTip + div{\n display: flex;\n justify-content: end;\n }\n .error{\n background: var(--color-background-negative);\n }\n .error .toolTip svg{\n color: var(--color-negative);\n }\n .warning{\n background: var(--color-background-warning);\n }\n .warning .toolTip svg{\n color: var(--color-warning);\n }\n .success{\n background: var(--color-background-positive);\n }\n \n .intermediate{\n background: var(--color-background-info);\n }\n\n .success .toolTip svg{\n color: var(--color-positive);\n }\n .toolTip{\n display: flex;\n gap: 8px;\n }\n .cardHead{\n display: flex;\n justify-content: space-between;\n gap: 32px;\n flex-direction: column;\n }\n .imgBg{\n border-radius: 8px;\n background: #DEF1FB;\n min-width: 56px;\n height: 56px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n \n .ant-modal-footer{\n display: none;\n }\n .toolTip svg{\n margin: 0px 0 0;\n }\n .displayFlex{\n display: flex;\n }\n\n.preline span{\n white-space: pre-line;\n}\n\n @media only screen and (max-width: 600px) {\n .toolTipInfo {\n flex-direction: column;\n gap: 0;\n align-items: unset;\n }\n .cardHead{\n gap: 24px;\n }\n .cardHead .titleHead > span{\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n }\n }\n"])));
12
+ const CardBody = exports.CardBody = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\ndisplay: flex;\nflex-direction: column;\ngap: 32px;\n@media only screen and (max-width: 600px) {\n gap: 24px;\n}\n"])));
@@ -0,0 +1,264 @@
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 _RemoveRedEye = _interopRequireDefault(require("@material-ui/icons/RemoveRedEye"));
15
+ var _CustomInfo = _interopRequireDefault(require("../../components/oa-component-info/CustomInfo"));
16
+ var _MaterialIcon = _interopRequireDefault(require("../../components/oa-component-icons/MaterialIcon"));
17
+ var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
18
+ var _ColorVariablesMap = _interopRequireDefault(require("../../global-css/ColorVariablesMap"));
19
+ var _styles = require("./styles");
20
+ var _CustomModal = _interopRequireDefault(require("../../components/oa-component-modal/CustomModal"));
21
+ var _CustomLoader = _interopRequireDefault(require("../../components/oa-component-loader/CustomLoader"));
22
+ var _PdfSampleImage = _interopRequireDefault(require("../../images/PdfSampleImage.png"));
23
+ var _upload = _interopRequireDefault(require("../../images/upload.svg"));
24
+ var _CustomIcon = _interopRequireDefault(require("../../components/oa-component-icons/CustomIcon"));
25
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26
+ 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); }
27
+ 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; }
28
+ /**
29
+ * Takes a file and returns a Promise that resolves with the file as a base64 encoded string.
30
+ * The Promise is rejected if there is an error reading the file.
31
+ * @param {File} file The file to be converted to base64
32
+ * @returns {Promise<string>} A Promise that resolves with the file as a base64 encoded string
33
+ */
34
+ const getBase64 = file => new Promise((resolve, reject) => {
35
+ const reader = new FileReader();
36
+ reader.readAsDataURL(file);
37
+ reader.onload = () => resolve(reader.result);
38
+ reader.onerror = error => reject(error);
39
+ });
40
+ /**
41
+ * Downloads a file from a base64 encoded string.
42
+ * @param {string} base64String The base64 encoded string of the file to be downloaded
43
+ * @param {string} [fileName] The name of the file to be downloaded. If not provided, the file will be downloaded with the name 'download'.
44
+ * @returns {undefined}
45
+ */
46
+ const downloadFile = (base64String, fileName) => {
47
+ const link = document.createElement('a');
48
+ link.href = base64String;
49
+ link.download = fileName || 'download';
50
+ link.click();
51
+ };
52
+
53
+ /**
54
+ * DocumentUpload is a component that allows users to upload documents. It takes a number of props which control its behavior.
55
+ * @param {object} props The props passed to the component
56
+ * @param {array} [props.uploadedDocuments=[]] An array of documents that have already been uploaded
57
+ * @param {function} props.onChange A function that is called whenever the list of uploaded documents changes
58
+ * @param {number} [props.multipleDoc=0] The maximum number of documents that can be uploaded. If set to 0, there is no limit
59
+ * @param {boolean} [props.showDelete=false] Whether or not to show a delete button next to each uploaded document
60
+ * @param {string} [props.subText] A string that is displayed below the heading
61
+ * @param {string} [props.heading] A string that is displayed above the upload button
62
+ * @param {string} [props.formName] The name of the form field that the uploaded documents should be associated with
63
+ * @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
64
+ * @param {string} [props.infoText] A string that is displayed below the subText
65
+ * @param {boolean} [props.isMandatory=false] Whether or not the component is mandatory
66
+ * @returns {object} A React component
67
+ */
68
+ function DocumentUpload(props) {
69
+ const {
70
+ uploadedDocuments = [],
71
+ onChange,
72
+ multipleDoc,
73
+ showDelete,
74
+ subText,
75
+ heading,
76
+ formName,
77
+ getPreview,
78
+ infoText,
79
+ isMandatory
80
+ } = props;
81
+ const [previewOpen, setPreviewOpen] = (0, _react.useState)(false);
82
+ const [previewImage, setPreviewImage] = (0, _react.useState)(null);
83
+ const [previewTitle, setPreviewTitle] = (0, _react.useState)('');
84
+ const [loading, setLoading] = (0, _react.useState)(false);
85
+ const [fileList, setFileList] = (0, _react.useState)(uploadedDocuments);
86
+ const handleCancel = () => setPreviewOpen(false);
87
+
88
+ /**
89
+ * Determines if the given file is an image file based on its file extension.
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
+ /**
109
+ * Opens a preview of the given file, or downloads the file if it is not an image.
110
+ * If the file is an image, the preview is displayed in a modal dialog.
111
+ * If the file is not an image, the file is downloaded to the user's computer.
112
+ * @param {Object} file The file to be previewed or downloaded.
113
+ */
114
+ const handlePreview = async file => {
115
+ if (file !== null && file !== void 0 && file.originFileObj) {
116
+ if (isImageFile(file === null || file === void 0 ? void 0 : file.name)) {
117
+ const base64Preview = await getBase64(file.originFileObj);
118
+ setPreviewImage(base64Preview);
119
+ setPreviewOpen(true);
120
+ } else {
121
+ const base64Preview = await getBase64(file.originFileObj);
122
+ downloadFile(base64Preview, file === null || file === void 0 ? void 0 : file.name);
123
+ }
124
+ } else if (isImageFile(file === null || file === void 0 ? void 0 : file.name)) {
125
+ const url = await getPreview();
126
+ setPreviewOpen(true);
127
+ setPreviewImage(url);
128
+ } else {
129
+ const url = await getPreview();
130
+ downloadFile(url, file === null || file === void 0 ? void 0 : file.name);
131
+ }
132
+ setPreviewTitle(file === null || file === void 0 ? void 0 : file.name);
133
+ };
134
+ /**
135
+ * Called whenever the list of uploaded documents changes.
136
+ * If the file that was added/removed is an image, it is displayed in a modal dialog.
137
+ * If the file that was added/removed is not an image, it is downloaded to the user's computer.
138
+ * @param {{ fileList: Object[], file: Object }} props An object containing the new list of uploaded documents and the file that was added/removed
139
+ * @returns {Promise<void>} A Promise that resolves when the operation is complete
140
+ */
141
+ const handleChange = async _ref => {
142
+ let {
143
+ fileList: newFileList,
144
+ file
145
+ } = _ref;
146
+ if (file.status === 'removed') {
147
+ onChange(null, 'removed');
148
+ }
149
+ const modifiedList = await Promise.all(newFileList.map(async files => {
150
+ let modifiedFile = files;
151
+ setLoading(true);
152
+ try {
153
+ await onChange(files);
154
+ modifiedFile.status = 'done';
155
+ if (!isImageFile(file === null || file === void 0 ? void 0 : file.name)) {
156
+ modifiedFile.url = _PdfSampleImage.default;
157
+ }
158
+ } catch (error) {
159
+ modifiedFile = null;
160
+ }
161
+ setLoading(false);
162
+ return modifiedFile;
163
+ }));
164
+ const tempList = modifiedList === null || modifiedList === void 0 ? void 0 : modifiedList.filter(Boolean);
165
+ setFileList(tempList);
166
+ };
167
+ const uploadButton = /*#__PURE__*/_react.default.createElement("button", {
168
+ style: {
169
+ border: 0,
170
+ background: 'none'
171
+ },
172
+ type: "button"
173
+ }, loading ? /*#__PURE__*/_react.default.createElement(_icons.LoadingOutlined, null) : /*#__PURE__*/_react.default.createElement(_CustomIcon.default, {
174
+ className: "UploadImg",
175
+ alt: "phone img",
176
+ src: _upload.default
177
+ }), /*#__PURE__*/_react.default.createElement("div", null, "Upload"));
178
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.MainStyleSec, null, /*#__PURE__*/_react.default.createElement(_styles.StyledSection, null, (heading || subText) && /*#__PURE__*/_react.default.createElement("div", {
179
+ className: "uploadSecPad"
180
+ }, heading && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
181
+ color: "primary-content",
182
+ className: "type-t2-700"
183
+ }, heading, isMandatory && /*#__PURE__*/_react.default.createElement(_Typography.default, {
184
+ color: "negative"
185
+ }, " *"))), subText && /*#__PURE__*/_react.default.createElement("div", {
186
+ style: {
187
+ whiteSpace: 'pre-line'
188
+ }
189
+ }, /*#__PURE__*/_react.default.createElement(_Typography.default, {
190
+ color: "secondary-content",
191
+ className: "type-b2-400"
192
+ }, subText)), infoText && /*#__PURE__*/_react.default.createElement(_Typography.default, {
193
+ color: "negative",
194
+ className: "type-b2-400"
195
+ }, infoText)), /*#__PURE__*/_react.default.createElement("div", {
196
+ className: "uploadDiv"
197
+ }, multipleDoc > 0 && /*#__PURE__*/_react.default.createElement("em", null, multipleDoc), /*#__PURE__*/_react.default.createElement(_antd.ConfigProvider, {
198
+ theme: {
199
+ token: {
200
+ colorBorder: _ColorVariablesMap.default['--color-primary'],
201
+ borderRadiusLG: 4,
202
+ colorPrimaryBorder: _ColorVariablesMap.default['--color-divider'],
203
+ colorFillAlter: _ColorVariablesMap.default['--color-secondary-background'],
204
+ colorError: _ColorVariablesMap.default['--color-negative'],
205
+ colorText: _ColorVariablesMap.default['--color-primary']
206
+ }
207
+ }
208
+ }, /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
209
+ name: formName
210
+ }, /*#__PURE__*/_react.default.createElement(_antd.Upload, {
211
+ customRequest: () => {},
212
+ listType: "picture-card",
213
+ fileList: fileList,
214
+ onPreview: handlePreview,
215
+ onChange: handleChange,
216
+ showUploadList: {
217
+ showDownloadIcon: false,
218
+ showRemoveIcon: showDelete,
219
+ removeIcon: /*#__PURE__*/_react.default.createElement(_icons.DeleteFilled, null),
220
+ previewIcon: /*#__PURE__*/_react.default.createElement(_icons.EyeFilled, null)
221
+ }
222
+ }, (fileList === null || fileList === void 0 ? void 0 : fileList.length) >= 1 ? null : uploadButton)))))), previewOpen && /*#__PURE__*/_react.default.createElement(_CustomModal.default, {
223
+ open: previewOpen,
224
+ title: previewTitle,
225
+ footer: null,
226
+ onCancel: handleCancel
227
+ }, /*#__PURE__*/_react.default.createElement("div", {
228
+ style: {
229
+ textAlign: 'center'
230
+ }
231
+ }, ' ', previewImage ? /*#__PURE__*/_react.default.createElement("img", {
232
+ alt: "example",
233
+ style: {
234
+ width: '100%'
235
+ },
236
+ src: previewImage
237
+ }) : /*#__PURE__*/_react.default.createElement(_CustomLoader.default, null))));
238
+ }
239
+ DocumentUpload.propTypes = {
240
+ uploadedDocuments: _propTypes.default.array,
241
+ onChange: _propTypes.default.func,
242
+ subText: _propTypes.default.string,
243
+ heading: _propTypes.default.string,
244
+ formName: _propTypes.default.string,
245
+ infoText: _propTypes.default.string,
246
+ showDelete: _propTypes.default.bool,
247
+ multipleDoc: _propTypes.default.number,
248
+ getPreview: _propTypes.default.func,
249
+ // Define the getPreview prop type
250
+ isMandatory: _propTypes.default.bool
251
+ };
252
+ DocumentUpload.defaultProps = {
253
+ uploadedDocuments: [],
254
+ onChange: () => {},
255
+ subText: '',
256
+ heading: '',
257
+ formName: '',
258
+ infoText: '',
259
+ multipleDoc: 0,
260
+ showDelete: true,
261
+ getPreview: () => {},
262
+ isMandatory: true
263
+ };
264
+ var _default = exports.default = DocumentUpload;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StyledSection = exports.MainStyleSec = void 0;
7
+ var _antd = require("antd");
8
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
9
+ var _templateObject, _templateObject2;
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
12
+ const MainStyleSec = exports.MainStyleSec = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.ant-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"])));