@tap-payments/os-micro-frontend-shared 0.3.29 → 0.3.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/_chunks/{chunk-PASL6KWI.js → chunk-2CPNOT3J.js} +1 -1
- package/build/_chunks/{chunk-4N4YBG7Y.js → chunk-2LTJGTU4.js} +1 -1
- package/build/_chunks/{chunk-JEICZHGL.js → chunk-2TCBTF25.js} +1 -1
- package/build/_chunks/{chunk-57IZKCTX.js → chunk-2U3LOQFG.js} +1 -1
- package/build/_chunks/{chunk-JQ5V7JJR.js → chunk-33IPHQRF.js} +1 -1
- package/build/_chunks/{chunk-BGYQKEH4.js → chunk-3DLBDPQS.js} +1 -1
- package/build/_chunks/{chunk-BFYHQH3M.js → chunk-3ISZITQ3.js} +1 -1
- package/build/_chunks/{chunk-52ZY2SFF.js → chunk-3JGD4PPG.js} +1 -1
- package/build/_chunks/{chunk-E3LEQY3P.js → chunk-3NOAPCBD.js} +1 -1
- package/build/_chunks/{chunk-NAJQUPFB.js → chunk-3QY6ERII.js} +1 -1
- package/build/_chunks/{chunk-KV7RNQIH.js → chunk-3RBPKC7D.js} +1 -1
- package/build/_chunks/{chunk-O7VXWCQH.js → chunk-3X4ZBS7U.js} +1 -1
- package/build/_chunks/{chunk-7ZHAFW7H.js → chunk-43GG5XMM.js} +1 -1
- package/build/_chunks/chunk-4KWLRMRN.js +1 -0
- package/build/_chunks/chunk-4NESBBQ5.js +1 -0
- package/build/_chunks/{chunk-SHUHGHAI.js → chunk-4ZCORZ57.js} +1 -1
- package/build/_chunks/{chunk-VN6QL6H7.js → chunk-4ZUBEXBD.js} +1 -1
- package/build/_chunks/{chunk-I5QH3YUQ.js → chunk-5MR34WB7.js} +1 -1
- package/build/_chunks/{chunk-OB2LASWR.js → chunk-67IM2YAF.js} +1 -1
- package/build/_chunks/{chunk-A7X2X3UL.js → chunk-7TVW7YQQ.js} +1 -1
- package/build/_chunks/{chunk-L75FKUUD.js → chunk-7UMUTMW5.js} +1 -1
- package/build/_chunks/{chunk-I6TVZZRM.js → chunk-AB2X3XRB.js} +1 -1
- package/build/_chunks/{chunk-EI2QQ3FL.js → chunk-AJBFP5I6.js} +1 -1
- package/build/_chunks/{chunk-77LO6FE5.js → chunk-ALVYHOVH.js} +1 -1
- package/build/_chunks/{chunk-4VEXHGOG.js → chunk-AOSZKAOT.js} +1 -1
- package/build/_chunks/{chunk-ZDAQ4LQ3.js → chunk-AR62ECSF.js} +1 -1
- package/build/_chunks/chunk-B75BO3RI.js +2 -0
- package/build/_chunks/{chunk-USKDMJPB.js → chunk-BAWOSUO6.js} +1 -1
- package/build/_chunks/{chunk-VXRKCZTT.js → chunk-BMZ3TZKG.js} +1 -1
- package/build/_chunks/{chunk-3IDHJM4W.js → chunk-BNOR7BTK.js} +1 -1
- package/build/_chunks/{chunk-N4TBHB3Z.js → chunk-BZK6ACMR.js} +1 -1
- package/build/_chunks/{chunk-6LIGMKIB.js → chunk-C6LGOHSD.js} +1 -1
- package/build/_chunks/{chunk-SENINKAQ.js → chunk-D3QBMAFS.js} +1 -1
- package/build/_chunks/{chunk-YEUHJU7X.js → chunk-DNBMVC4L.js} +1 -1
- package/build/_chunks/{chunk-3B6VYVIY.js → chunk-DUFPY4VS.js} +1 -1
- package/build/_chunks/{chunk-6TGHYOO5.js → chunk-DUNJ3GBD.js} +1 -1
- package/build/_chunks/{chunk-XFFKD7WO.js → chunk-DVCE7ZZZ.js} +1 -1
- package/build/_chunks/{chunk-PKTMWSV2.js → chunk-E3RGJZ4K.js} +2 -2
- package/build/_chunks/{chunk-3KA5T7WV.js → chunk-E45DSLUY.js} +1 -1
- package/build/_chunks/{chunk-EATPDOU2.js → chunk-ET4XPMUX.js} +1 -1
- package/build/_chunks/{chunk-FHJWJ53U.js → chunk-F6QSKDIU.js} +1 -1
- package/build/_chunks/{chunk-QYS2UNHT.js → chunk-FI2VNGJY.js} +1 -1
- package/build/_chunks/{chunk-B63K56UX.js → chunk-FK7WBNB4.js} +1 -1
- package/build/_chunks/{chunk-MRIJSE7V.js → chunk-FM4JAAIM.js} +1 -1
- package/build/_chunks/{chunk-EKOXQUSJ.js → chunk-FUKW5NXB.js} +1 -1
- package/build/_chunks/{chunk-JWQBGHVQ.js → chunk-G5BBSHQW.js} +1 -1
- package/build/_chunks/{chunk-PCUBROQH.js → chunk-GA2FILY7.js} +1 -1
- package/build/_chunks/{chunk-6F7CGNED.js → chunk-GE72N6QO.js} +1 -1
- package/build/_chunks/{chunk-FU5YS27X.js → chunk-GS3QPF7T.js} +1 -1
- package/build/_chunks/{chunk-CYFZ7H6K.js → chunk-GVI26L2O.js} +1 -1
- package/build/_chunks/{chunk-V2XFUF7R.js → chunk-HV67Q3BH.js} +1 -1
- package/build/_chunks/{chunk-PUDF3MGR.js → chunk-IBZN2BA2.js} +1 -1
- package/build/_chunks/{chunk-CP4AJBXH.js → chunk-IG667KW3.js} +1 -1
- package/build/_chunks/{chunk-4BVFIKDI.js → chunk-JFLUHEXZ.js} +1 -1
- package/build/_chunks/{chunk-BA7XWXLC.js → chunk-JKKOD3QX.js} +1 -1
- package/build/_chunks/{chunk-ICCHS4MG.js → chunk-JX7TWI7X.js} +1 -1
- package/build/_chunks/{chunk-53W2AFZS.js → chunk-KEXNVPHC.js} +1 -1
- package/build/_chunks/{chunk-IPS2LPDR.js → chunk-KNPVTLVV.js} +1 -1
- package/build/_chunks/chunk-KW7K557I.js +1 -0
- package/build/_chunks/{chunk-HID43SDT.js → chunk-L6Z6VLJ2.js} +1 -1
- package/build/_chunks/{chunk-XF26PMG3.js → chunk-LFL66DMX.js} +1 -1
- package/build/_chunks/{chunk-PV7X7SXA.js → chunk-LMCW646D.js} +1 -1
- package/build/_chunks/{chunk-7WCLIUSB.js → chunk-M3ZVFZ6O.js} +1 -1
- package/build/_chunks/{chunk-SKAQS5ML.js → chunk-M5L2JW6T.js} +1 -1
- package/build/_chunks/{chunk-Z45UP3A4.js → chunk-M6MHR2UM.js} +1 -1
- package/build/_chunks/{chunk-V7QLQDJ7.js → chunk-MB2LC72Z.js} +1 -1
- package/build/_chunks/{chunk-4EIPPJUA.js → chunk-MYKDRHE3.js} +1 -1
- package/build/_chunks/{chunk-ODCGP6QY.js → chunk-NCCXUMRS.js} +1 -1
- package/build/_chunks/{chunk-UIPHUTZL.js → chunk-NEOEKPIQ.js} +1 -1
- package/build/_chunks/{chunk-WAJXXB2B.js → chunk-OZGZLWJ2.js} +1 -1
- package/build/_chunks/{chunk-UCZYXKNB.js → chunk-P2BGQFDL.js} +1 -1
- package/build/_chunks/{chunk-4YMQA5DJ.js → chunk-PEABY5S3.js} +1 -1
- package/build/_chunks/{chunk-6YNVC4FT.js → chunk-PLH4I55I.js} +1 -1
- package/build/_chunks/{chunk-BVWMYKKV.js → chunk-PUE2YZXC.js} +1 -1
- package/build/_chunks/{chunk-3EJTIBHC.js → chunk-PXV74IUA.js} +1 -1
- package/build/_chunks/{chunk-LZVIK4HM.js → chunk-PZY3HICJ.js} +1 -1
- package/build/_chunks/{chunk-WPNUBJWG.js → chunk-QKNDEA5K.js} +1 -1
- package/build/_chunks/{chunk-W43NRJJH.js → chunk-QNMDN2UM.js} +1 -1
- package/build/_chunks/{chunk-GFRGQBZJ.js → chunk-R77L45PQ.js} +1 -1
- package/build/_chunks/{chunk-TUR7XO3E.js → chunk-R7EUYUIK.js} +1 -1
- package/build/_chunks/{chunk-WWUCJ45J.js → chunk-RU2VNNA5.js} +1 -1
- package/build/_chunks/{chunk-UXF3YGKO.js → chunk-RWWU4LGX.js} +1 -1
- package/build/_chunks/{chunk-K3QVNBIT.js → chunk-S4HTCR2F.js} +1 -1
- package/build/_chunks/{chunk-5CRSRCD3.js → chunk-S6PL6BXX.js} +1 -1
- package/build/_chunks/{chunk-YA27C2AC.js → chunk-SOEJOBJJ.js} +2 -2
- package/build/_chunks/{chunk-4C7A45LE.js → chunk-SU535LFR.js} +1 -1
- package/build/_chunks/{chunk-65IBAMBY.js → chunk-TQLVEE6D.js} +1 -1
- package/build/_chunks/{chunk-EONK7NDO.js → chunk-U4F32GEP.js} +1 -1
- package/build/_chunks/{chunk-AYMUVBOK.js → chunk-UAL36NUI.js} +1 -1
- package/build/_chunks/{chunk-GRRMFF24.js → chunk-UK3IXYRM.js} +1 -1
- package/build/_chunks/{chunk-YA2XHXSP.js → chunk-ULTZSXGL.js} +1 -1
- package/build/_chunks/{chunk-URKLILFD.js → chunk-URNOM7FQ.js} +1 -1
- package/build/_chunks/chunk-UX76H3LK.js +1 -0
- package/build/_chunks/{chunk-WG3Q2IKJ.js → chunk-UXXTKKBH.js} +1 -1
- package/build/_chunks/{chunk-CEYEY7YB.js → chunk-VJ3GZXWB.js} +1 -1
- package/build/_chunks/{chunk-T2EPOEFC.js → chunk-W3UCTYNR.js} +1 -1
- package/build/_chunks/{chunk-GD6V56NO.js → chunk-WG3WCFPA.js} +1 -1
- package/build/_chunks/{chunk-BS3YO47L.js → chunk-WIOYRAEZ.js} +1 -1
- package/build/_chunks/{chunk-2QZ4IOL5.js → chunk-WWX26QY3.js} +1 -1
- package/build/_chunks/{chunk-ABRMR2FW.js → chunk-XAGLFLVC.js} +1 -1
- package/build/_chunks/{chunk-ZH7QVAHJ.js → chunk-XQCGUFI2.js} +1 -1
- package/build/_chunks/{chunk-N44VXGQ6.js → chunk-YO2DJVRO.js} +1 -1
- package/build/_chunks/chunk-Z55SVEYQ.js +1 -0
- package/build/_chunks/{chunk-5YY4V2BQ.js → chunk-Z6RMAXWB.js} +2 -2
- package/build/_chunks/{chunk-FJAZ7EJ3.js → chunk-Z7MOO4NI.js} +1 -1
- package/build/components/Accordion/index.js +1 -1
- package/build/components/AccountDropdown/index.js +1 -1
- package/build/components/ActionMenu/index.js +1 -1
- package/build/components/ActionsDropdownMenu/index.js +1 -1
- package/build/components/ActiveFilterChip/index.js +1 -1
- package/build/components/ActivityAreaChart/index.js +1 -1
- package/build/components/Amount/index.js +1 -1
- package/build/components/AmountConversionFilter/index.js +1 -1
- package/build/components/AmountInput/index.js +1 -1
- package/build/components/AmountSlider/index.js +1 -1
- package/build/components/AmountStatusChip/index.js +1 -1
- package/build/components/AnimatedSpinnerIcon/index.js +1 -1
- package/build/components/AnimatedSpinnerIcon/style.d.ts +1 -1
- package/build/components/AppServices/index.js +1 -1
- package/build/components/AppServicesBar/index.js +1 -1
- package/build/components/AppWindowWrapper/index.js +1 -1
- package/build/components/AuthenticationTypeChip/index.js +1 -1
- package/build/components/Autocomplete/index.js +1 -1
- package/build/components/BetaBanner/index.js +1 -1
- package/build/components/BrandLogo/index.js +1 -1
- package/build/components/Button/index.js +1 -1
- package/build/components/Calender/index.js +1 -1
- package/build/components/CardEmptyState/index.js +1 -1
- package/build/components/Checkbox/index.js +1 -1
- package/build/components/Chip/index.js +1 -1
- package/build/components/Chip/style.d.ts +1 -1
- package/build/components/ChipStack/index.js +1 -1
- package/build/components/CircularProgressWithLabel/index.js +1 -1
- package/build/components/Collapse/index.js +1 -1
- package/build/components/ColorPicker/index.js +1 -1
- package/build/components/ColumnViews/index.js +1 -1
- package/build/components/ColumnViews/styles.d.ts +1 -1
- package/build/components/ConfirmDialog/index.js +1 -1
- package/build/components/CopyImage/index.js +1 -1
- package/build/components/CountBadge/index.js +1 -1
- package/build/components/CountBadge/style.d.ts +1 -1
- package/build/components/CountryFilter/index.js +1 -1
- package/build/components/CountryFlag/index.js +1 -1
- package/build/components/CurrencyAmount/index.js +1 -1
- package/build/components/CurrencyFilter/index.js +1 -1
- package/build/components/CurrencySymbol/index.js +1 -1
- package/build/components/CustomBackdrop/index.js +1 -1
- package/build/components/Customer/index.js +1 -1
- package/build/components/DateFilter/index.js +1 -1
- package/build/components/DeviceIcon/index.js +1 -1
- package/build/components/Dialog/index.js +1 -1
- package/build/components/Dialog/style.d.ts +1 -1
- package/build/components/Discount/index.js +1 -1
- package/build/components/DisplayAmount/index.js +1 -1
- package/build/components/Dropdown2/index.js +1 -1
- package/build/components/DropdownButton/index.js +1 -1
- package/build/components/DropdownMenu/index.js +1 -1
- package/build/components/Error/index.js +1 -1
- package/build/components/ErrorToast/index.js +1 -1
- package/build/components/ExpandableSideBar/index.js +1 -1
- package/build/components/FieldFeedback/index.js +1 -1
- package/build/components/FileInputPreview/index.js +1 -1
- package/build/components/FilePreview/index.js +1 -1
- package/build/components/FileUpload/index.js +1 -1
- package/build/components/FileUploader/index.js +1 -1
- package/build/components/FilterDropdown/index.js +1 -1
- package/build/components/Filters/index.js +1 -1
- package/build/components/FlagDetails/index.js +1 -1
- package/build/components/FlippingCard/index.js +1 -1
- package/build/components/FlippingCard/style.d.ts +1 -1
- package/build/components/HeatMap/index.js +1 -1
- package/build/components/IOSSwitch/index.js +1 -1
- package/build/components/Icon/index.js +1 -1
- package/build/components/IconWithBadge/index.js +1 -1
- package/build/components/ImageWrapper/ImageWrapper.d.ts +1 -1
- package/build/components/Input/index.js +1 -1
- package/build/components/InputBase/index.js +1 -1
- package/build/components/InputNumber/index.js +1 -1
- package/build/components/Inputs/index.js +1 -1
- package/build/components/JSONViewer/components/JSONSearchBar/styles.d.ts +4 -4
- package/build/components/JSONViewer/index.js +1 -1
- package/build/components/JSONViewer/style.d.ts +2 -2
- package/build/components/LanguageDropdown/index.js +1 -1
- package/build/components/LazyImage/index.js +1 -1
- package/build/components/LeftPeekRightExpandingChip/index.js +1 -1
- package/build/components/LeftPeekRightExpandingChip/style.d.ts +3 -3
- package/build/components/ListColumnFilter/index.js +1 -1
- package/build/components/ListHeader/index.js +1 -1
- package/build/components/ListLayout/index.js +1 -1
- package/build/components/Loader/index.js +1 -1
- package/build/components/MFWidgetLoader/index.js +1 -1
- package/build/components/MaskedText/index.js +1 -1
- package/build/components/Menu/index.js +1 -1
- package/build/components/MenuItem/index.js +1 -1
- package/build/components/MerchantCurrencyDropdown/index.js +1 -1
- package/build/components/MerchantLogo/index.js +1 -1
- package/build/components/MerchantsDropdown/index.js +1 -1
- package/build/components/MultiDatakeyDonut/index.js +1 -1
- package/build/components/MultiSelectDropdownButton/index.js +1 -1
- package/build/components/MultiSelectWithSearch/index.js +1 -1
- package/build/components/NestedDropdown/index.js +1 -1
- package/build/components/NoInternet/index.js +1 -1
- package/build/components/OpenFileInNewTab/index.js +1 -1
- package/build/components/PartnersFilter/index.js +1 -1
- package/build/components/PaymentSourceFilter/index.js +1 -1
- package/build/components/PhoneFilter/index.js +1 -1
- package/build/components/ProgressBar/index.js +1 -1
- package/build/components/ProgressRing/index.js +1 -1
- package/build/components/RFH/index.js +1 -1
- package/build/components/RadioButton/index.js +1 -1
- package/build/components/RadioGroup/index.js +1 -1
- package/build/components/RangeCalender/index.js +1 -1
- package/build/components/ReceiptsViewer/index.js +1 -1
- package/build/components/ReferenceTypeFilter/index.js +1 -1
- package/build/components/ResizableHeightInput/index.js +1 -1
- package/build/components/RightLeftExpandingCenterChip/index.js +1 -1
- package/build/components/RightLeftExpandingCenterChip/style.d.ts +13 -13
- package/build/components/SalesChannelFilter/index.js +1 -1
- package/build/components/ScrollLoader/index.js +1 -1
- package/build/components/SearchButton/index.js +1 -1
- package/build/components/SearchButton/styles.d.ts +2 -2
- package/build/components/SearchListInput/index.js +1 -1
- package/build/components/SelectDropdown/index.js +1 -1
- package/build/components/SelectWithSearch/index.js +1 -1
- package/build/components/SimpleDialog/index.js +1 -1
- package/build/components/Skeleton/index.js +1 -1
- package/build/components/Slider/index.js +1 -1
- package/build/components/StatusBar/index.js +1 -1
- package/build/components/StatusButton/index.js +1 -1
- package/build/components/StatusChip/index.js +1 -1
- package/build/components/StatusChipWithCopy/index.js +1 -1
- package/build/components/StatusFilter/index.js +1 -1
- package/build/components/StatusGroupChips/index.js +1 -1
- package/build/components/StatusIcons/AuthIcons/style.d.ts +2 -2
- package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +1 -1
- package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +6 -6
- package/build/components/StatusIcons/GeographyIcon/style.d.ts +1 -1
- package/build/components/StatusIcons/SourceIcons/style.d.ts +1 -1
- package/build/components/StatusIcons/index.js +1 -1
- package/build/components/StatusLabel/index.js +1 -1
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/AgreementCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +2 -2
- package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +5 -5
- package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +5 -5
- package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +5 -5
- package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/IDButton/style.d.ts +2 -2
- package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/PayoutReportCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +5 -5
- package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +2 -2
- package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +6 -6
- package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +5 -5
- package/build/components/TableCells/CustomCells/style.d.ts +2 -2
- package/build/components/TableCells/index.js +1 -1
- package/build/components/TableReports/components/DownloadButton/style.d.ts +1 -1
- package/build/components/TableReports/index.js +1 -1
- package/build/components/TableReports/style.d.ts +1 -1
- package/build/components/Timepicker/index.js +1 -1
- package/build/components/ToggleButtons/index.js +1 -1
- package/build/components/ToggleView/index.js +1 -1
- package/build/components/Toolbar/index.js +1 -1
- package/build/components/TooltipChip/index.js +1 -1
- package/build/components/TreeDropdown/index.js +1 -1
- package/build/components/VAT/index.js +1 -1
- package/build/components/VerificationIcon/index.js +1 -1
- package/build/components/ViewColumnRadioFilter/index.js +1 -1
- package/build/components/VirtualTables/components/style.d.ts +1 -1
- package/build/components/VirtualTables/index.js +1 -1
- package/build/components/Widget/index.js +1 -1
- package/build/components/Window/style.d.ts +2 -2
- package/build/components/WindowAppIcon/index.js +1 -1
- package/build/components/WindowBackdrop/index.js +1 -1
- package/build/components/WindowSideBar/index.js +1 -1
- package/build/components/_v2/index.js +1 -1
- package/build/components/index.js +1 -1
- package/build/hooks/index.js +1 -1
- package/build/index.js +1 -1
- package/build/utils/currency.d.ts +2 -9
- package/build/utils/date.d.ts +3 -18
- package/build/utils/download.d.ts +11 -1
- package/build/utils/geography.d.ts +0 -5
- package/build/utils/index.d.ts +0 -8
- package/build/utils/index.js +1 -1
- package/build/utils/language.d.ts +0 -13
- package/build/utils/localStorage.d.ts +1 -8
- package/build/utils/navigation.d.ts +1 -13
- package/build/utils/number.d.ts +0 -2
- package/build/utils/payout.d.ts +0 -32
- package/build/utils/string.d.ts +0 -2
- package/build/utils/table.d.ts +0 -1
- package/package.json +2 -5
- package/build/_chunks/chunk-GXKKW3US.js +0 -2
- package/build/_chunks/chunk-ITNYA2BL.js +0 -1
- package/build/_chunks/chunk-MEHO7E4N.js +0 -1
- package/build/_chunks/chunk-SNYZMQPA.js +0 -1
- package/build/_chunks/chunk-ST43DROT.js +0 -2
- package/build/_chunks/chunk-TPMYBLI5.js +0 -1
- package/build/utils/billing.d.ts +0 -39
- package/build/utils/day.d.ts +0 -2
- package/build/utils/flag.d.ts +0 -21
- package/build/utils/merchant.d.ts +0 -3
- package/build/utils/url.d.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$4}from'./chunk-ZDAQ4LQ3.js';import {a as a$3}from'./chunk-5CRSRCD3.js';import {j,a as a$5}from'./chunk-VN6QL6H7.js';import {a}from'./chunk-GFRGQBZJ.js';import {a as a$2}from'./chunk-FHJWJ53U.js';import {a as a$1}from'./chunk-JWQBGHVQ.js';import {cd,pd,C}from'./chunk-ST43DROT.js';import {Rc,Sc,Ki,Li,Mi,ac,bc,Ni,an,$b}from'./chunk-IUXIBZV3.js';import {memo,forwardRef,useState,useMemo,useRef,useId,useEffect,useCallback}from'react';import S from'@mui/material/Box';import Rt from'@mui/material/Collapse';import xt from'@mui/material/Popper';import Pt from'dayjs';import {useTranslation}from'react-i18next';import {Calendar,DateObject}from'react-multi-date-picker';import No from'@mui/material/ClickAwayListener';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';import he from'@mui/material/Button';import q from'react-date-object';import et from'react-date-object/calendars/arabic';import ot from'react-date-object/calendars/gregorian';import tt from'react-date-object/locales/arabic_ar';import rt from'react-date-object/locales/arabic_en';import nt from'react-date-object/locales/gregorian_ar';import it from'react-date-object/locales/gregorian_en';var Ue=styled(S)(({theme:e})=>({color:e.palette.grey[700],fontSize:"9px",fontWeight:500,marginBottom:"6px"})),Ne=styled(S,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:o})=>({borderRadius:"4px",border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,height:32,padding:"8px",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",...o&&{border:`1px solid ${e.palette.info.dark}`,background:e.palette.common.white,boxShadow:e.shadows[7]}})),Ke=styled(S)(({theme:e})=>({borderRadius:"8px",background:e.palette.common.white,boxShadow:"0px 8px 36px 0px rgba(0, 0, 0, 0.15)",textAlign:"center",color:e.palette.grey[900],fontSize:"12px",fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px",padding:"16px",display:"flex",alignItems:"center",justifyContent:"center",gap:"12px",flexDirection:"column"})),_e=styled(S)(({theme:e})=>({width:71,padding:"4px 0",cursor:"pointer","&:hover, &.active":{borderRadius:"100px",background:e.palette.info.light}}));var Ze={day:"Day",month:"Month",quarter:"Quarter",year:"Year"};function _o({sx:e,groupBy:o,isCalenderOpen:a$1,onUpdate:t}){let[n,p]=useState(null),l=!!n&&a$1,{t:m}=useTranslation(),c=()=>{p(null);},u=d=>{p(d.currentTarget);},s=d=>{t?.(d),c();};return jsx(No,{onClickAway:c,children:jsxs(S,{sx:e,children:[jsx(Ue,{children:m("groupedBy")}),jsxs(Ne,{onClick:u,open:l,children:[jsx("span",{children:Ze[o]}),jsx(S,{component:"img",src:Sc,alt:"arrow",sx:{...l&&{transform:"rotate(180deg)"}}})]}),jsx(a,{open:l,anchorEl:n,children:jsx(Ke,{sx:{width:n?.clientWidth},children:Object.entries(Ze).map(([d,i])=>jsx(_e,{onClick:()=>{s(d);},className:o===d?"active":"",children:i},`${d}-groupedBy`))})})]})})}var Xe=memo(_o);var Ve=Xe;var eo=styled(S)(({theme:e})=>({border:"1px solid",borderColor:e.palette.divider,borderRadius:"50px",paddingInline:"6px 12px",color:e.palette.text.primary,fontSize:"11px",display:"flex",gap:"8px",alignItems:"center",justifyContent:"space-between",height:32,marginTop:"8px",img:{width:16,height:16},"& > div":{display:"flex",alignItems:"center",gap:"2px"}}));function le({isHijri:e,onCalendarModeSwitch:o}){let{t:a}=useTranslation(),t=()=>{o?.(e?"gregorian":"hijri");};return jsx(S,{children:jsxs(eo,{children:[jsxs(S,{children:[jsx("img",{src:$b,alt:"hijri"}),jsx("span",{children:a("hijri")})]}),jsx(a$4,{checked:e,onChange:t})]})})}var ro=le;var io=styled(he)(({theme:e})=>({cursor:"pointer",borderRadius:"50px",border:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,color:e.palette.text.primary,fontSize:"11px",fontWeight:e.typography.fontWeightRegular,paddingInline:"12px",height:32,width:"max-content",textTransform:"unset","&:hover":{boxShadow:e.shadows[7],border:"1px solid",borderColor:e.palette.info.dark}})),ao=styled(S)(()=>({display:"flex",flexDirection:"column",gap:"8px"}));var Z=({isHijri:e,isAr:o=false})=>e?o?tt:rt:o?nt:it,J=e=>e?et:ot,M=e=>e.setHour(0).setMinute(0).setSecond(0).setMillisecond(0),B=e=>e.setHour(23).setMinute(59).setSecond(59).setMillisecond(999),X=e=>{if(!(e?.[0]instanceof Date)||!(e?.[1]instanceof Date)){let[o,a]=C();return [new q(o),new q(a)]}return [new q(e?.[0]),new q(e?.[1])]};function ce({onChange:e,isHijri:o,isAr:a=false}){let t={locale:Z({isHijri:o,isAr:a}),calendar:J(o)},n=useMemo(()=>[{id:"today",value:[new DateObject(t),new DateObject(t)]},{id:"lastWeek",value:[new DateObject(t).subtract(6,"day"),new DateObject(t)]},{id:"lastMonth",value:[new DateObject(t).subtract(30,"day"),new DateObject(t)]},{id:new DateObject(t).subtract(1,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(1,"month").toFirstOfMonth(),new DateObject(t).subtract(1,"month").toLastOfMonth()]},{id:new DateObject(t).subtract(2,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(2,"month").toFirstOfMonth(),new DateObject(t).subtract(2,"month").toLastOfMonth()]},{id:new DateObject(t).subtract(3,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(3,"month").toFirstOfMonth(),new DateObject(t).subtract(3,"month").toLastOfMonth()]}],[o,a]),{t:p}=useTranslation();return jsx(S,{"data-testid":"RangeCalender_QuickFilters",children:jsx(ao,{children:n.map(l=>jsx(io,{onClick:m=>{m.preventDefault(),e(l.value);},children:p(l.id)},l.id))})})}var po=ce;var so=styled(he)(()=>({minWidth:"auto",padding:0,"& > img":{cursor:"pointer"}}));var ut=["Su","Mo","Tu","We","Th","Fr","Sa"];function ft({isAr:e=false,isHijri:o,values:a,onChange:t,numberOfMonths:n=2,...p},l){let m=c=>c==="right"?e?ac:bc:e?bc:ac;return jsx(Calendar,{ref:l,numberOfMonths:n,value:a,onChange:t,calendar:J(o),locale:Z({isHijri:o,isAr:e}),range:true,format:"MMM DD",monthYearSeparator:" ",renderButton:(c,u)=>jsx(so,{onClick:u,children:jsx("img",{src:m(c),alt:"arrow"})}),weekDays:e?void 0:ut,maxDate:new Date,...p})}var lo=forwardRef(ft);var mo=lo;var co=styled(S)(()=>({'[class$="-IndicatorsContainer2"]':{display:"none"},"#react-select-2-listbox":{width:300}})),V=styled(S)(({theme:e})=>({borderRadius:e.spacing(.5),border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,boxShadow:e.shadows[10],minWidth:200,width:"max-content",overflow:"auto"})),uo=styled(S,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:o})=>({width:156,fontSize:"11px",color:e.palette.text.primary,border:"1px solid",borderColor:e.palette.divider,minHeight:32,borderRadius:"4px",padding:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",cursor:"pointer",display:"flex",alignItems:"center",gap:e.spacing(1),fontWeight:500,...o&&{borderRadius:"4px",boxShadow:e.shadows[7],border:"1px solid",borderColor:e.palette.info.dark,background:e.palette.common.white},span:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}})),L=styled(S)(({theme:e})=>({padding:e.spacing(1),color:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",gap:e.spacing(1),height:33,cursor:"pointer","&:hover":{boxShadow:"0px 0px 16px 0px #00000021"},"&+&":{borderTop:"1px solid",borderColor:e.palette.divider},"&.active span":{fontWeight:500},span:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}})),A=styled(S)(()=>({width:12,height:12})),W=styled(S)(({theme:e})=>({fontSize:"11px",color:e.palette.text.secondary,lineHeight:"15.03px","&.selected":{color:e.palette.info.dark}}));function ge({selectedTimezone:e,onChange:o,timezoneCountriesCodes:a,defaultCountryTimezone:t}){let[n,p]=useState(null),l=i=>{n||p(i.currentTarget);},m=()=>{n&&p(null);},c=(i,D)=>{i.stopPropagation(),o(D);},u=useMemo(()=>a?.map(i=>cd(i)),[a]),s=useMemo(()=>u?.some(i=>e?.timezone===i?.timezone),[u,e]),d=useMemo(()=>e&&s?e:t,[e,t,s]);return jsxs(L,{onMouseEnter:l,onMouseLeave:m,onClick:()=>{e&&o(d);},children:[s?jsx("img",{src:Ni,alt:"icon"}):jsx(A,{}),jsx("img",{src:Li,alt:"entity-timezone"}),jsx(a$1,{countryCode:d?.countryCode}),jsx(W,{className:s?"selected":"",children:s?e?.label:t?.label}),jsx(xt,{open:!!n,anchorEl:n,placement:"right-start",sx:{zIndex:3},disablePortal:true,children:jsx(V,{sx:{maxHeight:300},children:u?.map((i,D)=>{let j=i?.timezone===e?.timezone;return jsxs(L,{onClick:te=>{c(te,i);},sx:{gap:"4px"},children:[j?jsx("img",{src:Ni,alt:"icon"}):jsx(A,{}),jsx(a$1,{countryCode:i?.countryCode}),jsx(W,{className:j?"selected":"",children:i?.label})]},`timezone-item-${D}`)})})})]})}function xe({onChange:e,selectedTimezone:o,browserTimezone:a}){let t=useMemo(()=>an.find(({timezone:l})=>l===a),[a]),n=()=>{t&&e(t);},p=t?.timezone===o?.timezone;return jsxs(L,{onClick:n,children:[p?jsx("img",{src:Ni,alt:"icon"}):jsx(A,{}),jsx("img",{src:Ki,alt:"user-timezone"}),jsx(a$1,{countryCode:t?.countryCode}),jsx(W,{className:p?"selected":"",children:t?.label})]})}function zt({onChange:e,selectedTimezone:o,browserTimezone:a,defaultCountryTimezone:t,timezoneCountriesCodes:n}){let[p,l]=useState(null),m=!!p,c=()=>{l(null);},u=i=>{e(i),c();},s=i=>{l(i.currentTarget);},d=useMemo(()=>a===o?.timezone?Ki:o?.timezone===t.timezone?Li:Mi,[a,t.timezone,o?.timezone]);return jsx(No,{onClickAway:c,children:jsxs(co,{"data-testid":"CustomTimezone",children:[jsxs(uo,{open:m,onClick:s,children:[jsx("img",{src:d,alt:"timezone-icon"}),jsx(a$1,{countryCode:o?.countryCode}),jsx("span",{children:o?.label})]}),jsx(xt,{open:m,anchorEl:p,placement:"top-start",sx:{zIndex:1400},children:jsxs(V,{"data-testid":"CustomTimezone_dropdown",children:[jsx(ge,{onChange:u,selectedTimezone:o,defaultCountryTimezone:t,timezoneCountriesCodes:n}),jsx(xe,{onChange:u,selectedTimezone:o,browserTimezone:a})]})})]})})}var go=memo(zt);var xo=go;var bo=styled(S)(({theme:e})=>({display:"flex",marginTop:"8px",background:e.palette.common.white,boxShadow:e.shadows[9],borderRadius:e.spacing(1),color:e.palette.text.primary,fontSize:"11px",".rmdp-calendar":{padding:"8px 16px 16px"},".rmdp-rtl *":{fontFamily:"Tajawal"},".rmdp-rtl .sd":{paddingTop:"4px"},".rmdp-wrapper":{position:"relative",borderRadius:"8px",boxShadow:"none"},".rmdp-day span":{fontSize:"11px",fontWeight:500},".rmdp-day, .rmdp-week-day":{width:40,height:40,marginBottom:"2px",padding:"4px",fontSize:"11px",color:e.palette.grey[900]},".rmdp-day-picker":{padding:0},".rmdp-day.rmdp-today span":{backgroundColor:"transparent !important",color:e.palette.info.dark},".rmdp-day.rmdp-today.end span, .rmdp-day.rmdp-today.end span":{color:e.palette.common.white},".rmdp-range, .rmdp-day:not(.rmdp-disabled):not(.rmdp-day-hidden) span:hover":{background:e.palette.info.light,boxShadow:"none",color:e.palette.grey[900]},".rmdp-range-hover.start, .rmdp-range.start, .rmdp-range-hover.end, .rmdp-range.end, .rmdp-rtl .rmdp-range-hover.start, .rmdp-rtl .rmdp-range.start, .rmdp-rtl .rmdp-range-hover.end, .rmdp-rtl .rmdp-range.end":{borderRadius:"50%",background:e.palette.background.gradient.darkShadedBlue,color:e.palette.common.white},".rmdp-range.start:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",right:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.start:after":{right:"unset",left:0},".rmdp-range.end:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",left:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.end:after":{left:"unset",right:0},".rmdp-week-day":{color:e.palette.grey[700],marginBottom:"4px",fontSize:"11px",padding:"4px"},".rmdp-header-values":{color:e.palette.grey[900],fontSize:"12px",fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px"},".rmdp-header-values span:nth-of-type(2)":{display:"none"},".rmdp-header":{padding:"4px 0",margin:0,fontSize:"12px"},".rmdp-top-class":{display:"block !important"},".rmdp-day.rmdp-selected span:not(.highlight)":{background:e.palette.info.dark},".rmdp-day.start.end":{overflow:"hidden"},".rmdp-day.rmdp-disabled":{color:"#ccc",cursor:"not-allowed"}})),ho=styled(he)(({theme:e})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",background:"transparent",color:e.palette.text.primary,border:"1px solid",borderColor:e.palette.divider,fontWeight:500,borderRadius:"4px","&:hover":{background:"transparent",color:e.palette.text.primary}})),yo=styled(he)(({theme:e})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",borderRadius:"4px",fontWeight:700,background:e.palette.info.dark,"&:hover":{background:e.palette.info.dark}})),wo=styled(S)(()=>({display:"flex",gap:8})),Co=styled(he,{shouldForwardProp:e=>e!=="open"})(({open:e,theme:o})=>({color:o.palette.text.primary,fontSize:"11px",fontWeight:500,padding:o.spacing(1),borderRadius:"4px",border:"1px solid",borderColor:o.palette.divider,background:o.palette.common.white,textTransform:"none",height:32,...e&&{border:"1px solid",borderColor:o.palette.info.dark,boxShadow:o.shadows[7]}})),To=styled(S)(({theme:e})=>({background:e.palette.common.white,display:"flex",justifyContent:"space-between",alignItems:"center",gap:10,padding:"16px",borderTop:"1px solid",borderColor:e.palette.divider,borderBottomRightRadius:"8px"})),ko=styled(S)(({theme:e})=>({padding:16,paddingInlineEnd:"23px",borderRight:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,width:"max-content",borderTopLeftRadius:"8px",borderBottomLeftRadius:"8px",display:"flex",flexDirection:"column",gap:10,justifyContent:"space-between"})),zo=styled(S)(()=>({display:"flex",alignItems:"center",gap:"10px"})),So=styled(S)(()=>({position:"relative"})),vo=styled(S)(()=>({display:"flex",flexDirection:"column",gap:"24px"}));var Do=styled(S,{shouldForwardProp:e=>e!=="isAllDay"})(({theme:e,isAllDay:o})=>({display:"flex",alignItems:"center",gap:e.spacing(1),position:"relative",paddingInline:"5px",".label":{width:"max-content"},...!o&&{paddingRight:e.spacing(1),"&:after":{content:'""',position:"absolute",width:"1px",background:e.palette.divider,right:0,height:17}}})),Mo=styled(S)(()=>({width:235})),Bo=styled(S)(({theme:e})=>({display:"flex",gap:"4px",".rmdp-input":{width:"64px",borderRadius:"19px",border:"1px solid",borderColor:e.palette.divider,color:e.palette.text.primary,fontSize:"11px",fontWeight:500,background:"transparent",cursor:"pointer"},".rmdp-input:focus":{boxShadow:e.shadows[7],border:`1px solid ${e.palette.info.dark}`,borderRadius:"19px"},".rmdp-time-picker":{boxShadow:e.shadows[5],borderRadius:e.spacing(1),padding:e.spacing(2),minWidth:"auto !important",div:{marginTop:0,display:"block"},"> div":{width:32,height:64},".rmdp-arrow":{borderColor:`${e.palette.background.transparent[1]} !important`},".rmdp-arrow-container":{justifyContent:"center","&:hover":{backgroundColor:"transparent",boxShadow:"unset"}},input:{borderRadius:"4px",border:`1px solid ${e.palette.divider}`,padding:0,width:32,height:32,fontSize:"11px",color:e.palette.text.primary,fontWeight:500,"&:focus, &:focus-visible":{border:`1px solid ${e.palette.info.dark}`,outline:"unset"}},".dvdr":{margin:"7px 4px 0"},".rmdp-am, .rmdp-pm":{margin:0,width:32,height:32,flex:"auto",justifyContent:"center",fontSize:"11px",color:e.palette.text.primary,fontWeight:500,display:"flex",cursor:"default"},"> div:last-child":{marginInlineStart:"4px",display:"block !important"},".rmdp-down, .rmdp-up":{position:"relative",i:{display:"none"},"&:before":{content:'""',position:"absolute",top:"5px",width:"10px",height:"10px",backgroundImage:`url(${Rc})`}},".rmdp-down:before":{transform:"rotate(180deg)"}},".rmdp-container":{position:"relative","> div":{top:"unset !important",bottom:"28px",transform:"unset !important"}}})),Eo=styled(S)(({theme:e})=>({display:"flex",gap:"8px",alignItems:"center",borderRadius:"50px",border:"1px solid",borderColor:e.palette.divider,paddingInline:"5px",width:"fit-content",height:32}));function Dt({values:e,setValues:o}){let{t:a}=useTranslation(),t=new DateObject(e[0]),n=new DateObject(e[1]),[p,l]=useState(t.dayOfYear===n.dayOfYear&&t.hour===0&&t.minute===0&&n.hour===23&&n.minute===59),m=({period:s,hour:d})=>s==="PM"&&d!==12?d+12:s==="AM"&&d===12?0:d,c=({hour:s,minute:d,period:i})=>{o([t.setHour(m({hour:s,period:i})).setMinute(d).setSecond(0),n]);},u=({hour:s,minute:d,period:i})=>{o([t,n.setHour(m({hour:s,period:i})).setMinute(d).setSecond(59)]);};return jsx(Mo,{children:jsxs(Eo,{children:[jsxs(Do,{isAllDay:p,children:[jsx("span",{className:"label",children:a("allDay")}),jsx(a$4,{checked:p,onChange:s=>{l(!p),s.target.checked?o([M(e[0]),B(e[1])]):o(e);}})]}),!p&&jsxs(Bo,{children:[jsx(j,{defaultTime:{hour:a$5(t.hour),minute:t.minute,period:t.hour>=12?"PM":"AM"},size:"small",onChange:c,enableRealTimeChange:true},`${e[0]?.toString()}-start`),jsx(j,{defaultTime:{hour:a$5(n.hour),minute:n.minute,period:n.hour>=12?"PM":"AM"},size:"small",onChange:u,enableRealTimeChange:true},`${e[1]?.toString()}-end`)]})]})})}var Ro=Dt;var Io=Ro;function At({defaultDate:e,onDateChange:o,mode:a="gregorian",onCalendarModeSwitch:t,numberOfMonths:n,noTimezone:p,noQuickFilter:l,maxDateRange:m,onCalendarGroupChange:c,groupBy:u,timezone:s,onChangeTimezone:d,browserTimezone:i,renderCalendarButton:D,mainSx:j,popperProps:te,rangeDatePickerProps:Ao,defaultCountryTimezone:Ce,timezoneCountriesCodes:Te}){let[w,ke]=useState(X(e)),[x,C]=useState(w),[ze,Se]=useState(s??null),[ve,Wo]=useState(u||"day"),[De,Me]=useState(null),y=!!De,[Be,Ee]=useState(false),{t:re}=useTranslation(),I=useRef(null),Fo=pd(useId(),"range-calender"),ne=a==="hijri",Y=()=>{Me(null);},Oe=r=>{Me(r.currentTarget);};useEffect(()=>{if(!y){if(n===1)return;C(X(e));}},[y]),useEffect(()=>{if(e){let r=X(e);ke(r),C(r),I.current&&I.current.set("date",r[0]);}},[e]),useEffect(()=>{Se(s??null);},[s,y]);let Re=()=>{ke(x),Y();let r;x[0].dayOfYear===x[1].dayOfYear?r=[x[0],x[1]]:r=[M(x[0]),B(x[1])],o([r[0].toDate(),r[1].toDate()]),c?.(ve||"day"),d?.(ze);},Ho=useCallback(()=>{let r=w[0].format("MMM D"),G=w[1]?w[1].format("MMM D"):w[0].format("MMM D");return r===G&&!p?r:`${r} - ${G}`},[w,p]),jo=r=>{if(r.length<2||!m){C(r);return}let G=M(r[0]).toDate(),$o=B(r[1]).toDate(),Ie=Pt($o).diff(G,"day");if(Ie<=m){C(r);return}Ee(true),C([r[0],r[1].subtract(Ie-m,"d")]),setTimeout(()=>{Ee(false);},3e3);},Yo=r=>{C([M(r[0]),B(r[1])]),I.current&&I.current.set("date",r[0]);},Go=r=>{r.key==="Enter"&&x[1]&&!Be?(r.stopPropagation(),Re()):r.key==="Escape"&&(r.stopPropagation(),Y());};return jsxs(So,{id:Fo,"data-testid":"RangeCalender",sx:j,children:[D?D(y,Oe):jsx(Co,{onClick:Oe,open:y,children:(w[0]||w[1])&&Ho()}),y&&jsx(a$2,{onClick:r=>{r.stopPropagation(),Y();}}),jsx(xt,{open:y,anchorEl:De,placement:"bottom-end",...te,children:jsxs(bo,{onKeyDown:Go,children:[!l&&jsxs(ko,{children:[jsx(po,{onChange:Yo,isHijri:ne}),jsxs(vo,{children:[u&&jsx(Ve,{groupBy:ve,isCalenderOpen:y,onUpdate:r=>{Wo(r);}}),jsx(ro,{isHijri:ne,onCalendarModeSwitch:t})]})]}),jsxs(S,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[jsx(mo,{values:x,onChange:jo,isHijri:ne,ref:I,numberOfMonths:n,...Ao}),jsx(Rt,{in:Be&&!!m,children:jsx(a$3,{error:re("dateRangeError",{number:m}),sx:{marginInline:"16px",marginBottom:"16px"}})}),jsxs(To,{sx:{borderBottomLeftRadius:"8px"},children:[!p&&Ce&&i&&Te?jsx(zo,{children:jsx(xo,{onChange:Se,selectedTimezone:ze,browserTimezone:i,defaultCountryTimezone:Ce,timezoneCountriesCodes:Te},String(y))}):jsx("div",{}),new DateObject(x[0]).dayOfYear===new DateObject(x[1]).dayOfYear&&jsx(Io,{values:x,setValues:C}),jsxs(wo,{children:[jsx(ho,{variant:"contained",onClick:Y,children:re("cancel")}),jsx(yo,{variant:"contained",onClick:Re,disabled:!x[1],children:re("okay")})]})]})]})]})})]})}var Lo=At;var xi=Lo;export{xi as a};
|
|
1
|
+
import {a as a$4}from'./chunk-AR62ECSF.js';import {a as a$3}from'./chunk-S6PL6BXX.js';import {j,a as a$5}from'./chunk-4ZUBEXBD.js';import {a}from'./chunk-R77L45PQ.js';import {a as a$2}from'./chunk-F6QSKDIU.js';import {a as a$1}from'./chunk-G5BBSHQW.js';import {vc,Ic,y}from'./chunk-4NESBBQ5.js';import {Rc,Sc,Ki,Li,Mi,ac,bc,Ni,an,$b}from'./chunk-IUXIBZV3.js';import {memo,forwardRef,useState,useMemo,useRef,useId,useEffect,useCallback}from'react';import S from'@mui/material/Box';import Rt from'@mui/material/Collapse';import xt from'@mui/material/Popper';import Pt from'dayjs';import {useTranslation}from'react-i18next';import {Calendar,DateObject}from'react-multi-date-picker';import No from'@mui/material/ClickAwayListener';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';import he from'@mui/material/Button';import q from'react-date-object';import et from'react-date-object/calendars/arabic';import ot from'react-date-object/calendars/gregorian';import tt from'react-date-object/locales/arabic_ar';import rt from'react-date-object/locales/arabic_en';import nt from'react-date-object/locales/gregorian_ar';import it from'react-date-object/locales/gregorian_en';var Ue=styled(S)(({theme:e})=>({color:e.palette.grey[700],fontSize:"9px",fontWeight:500,marginBottom:"6px"})),Ne=styled(S,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:o})=>({borderRadius:"4px",border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,height:32,padding:"8px",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",...o&&{border:`1px solid ${e.palette.info.dark}`,background:e.palette.common.white,boxShadow:e.shadows[7]}})),Ke=styled(S)(({theme:e})=>({borderRadius:"8px",background:e.palette.common.white,boxShadow:"0px 8px 36px 0px rgba(0, 0, 0, 0.15)",textAlign:"center",color:e.palette.grey[900],fontSize:"12px",fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px",padding:"16px",display:"flex",alignItems:"center",justifyContent:"center",gap:"12px",flexDirection:"column"})),_e=styled(S)(({theme:e})=>({width:71,padding:"4px 0",cursor:"pointer","&:hover, &.active":{borderRadius:"100px",background:e.palette.info.light}}));var Ze={day:"Day",month:"Month",quarter:"Quarter",year:"Year"};function _o({sx:e,groupBy:o,isCalenderOpen:a$1,onUpdate:t}){let[n,p]=useState(null),l=!!n&&a$1,{t:m}=useTranslation(),c=()=>{p(null);},u=d=>{p(d.currentTarget);},s=d=>{t?.(d),c();};return jsx(No,{onClickAway:c,children:jsxs(S,{sx:e,children:[jsx(Ue,{children:m("groupedBy")}),jsxs(Ne,{onClick:u,open:l,children:[jsx("span",{children:Ze[o]}),jsx(S,{component:"img",src:Sc,alt:"arrow",sx:{...l&&{transform:"rotate(180deg)"}}})]}),jsx(a,{open:l,anchorEl:n,children:jsx(Ke,{sx:{width:n?.clientWidth},children:Object.entries(Ze).map(([d,i])=>jsx(_e,{onClick:()=>{s(d);},className:o===d?"active":"",children:i},`${d}-groupedBy`))})})]})})}var Xe=memo(_o);var Ve=Xe;var eo=styled(S)(({theme:e})=>({border:"1px solid",borderColor:e.palette.divider,borderRadius:"50px",paddingInline:"6px 12px",color:e.palette.text.primary,fontSize:"11px",display:"flex",gap:"8px",alignItems:"center",justifyContent:"space-between",height:32,marginTop:"8px",img:{width:16,height:16},"& > div":{display:"flex",alignItems:"center",gap:"2px"}}));function le({isHijri:e,onCalendarModeSwitch:o}){let{t:a}=useTranslation(),t=()=>{o?.(e?"gregorian":"hijri");};return jsx(S,{children:jsxs(eo,{children:[jsxs(S,{children:[jsx("img",{src:$b,alt:"hijri"}),jsx("span",{children:a("hijri")})]}),jsx(a$4,{checked:e,onChange:t})]})})}var ro=le;var io=styled(he)(({theme:e})=>({cursor:"pointer",borderRadius:"50px",border:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,color:e.palette.text.primary,fontSize:"11px",fontWeight:e.typography.fontWeightRegular,paddingInline:"12px",height:32,width:"max-content",textTransform:"unset","&:hover":{boxShadow:e.shadows[7],border:"1px solid",borderColor:e.palette.info.dark}})),ao=styled(S)(()=>({display:"flex",flexDirection:"column",gap:"8px"}));var Z=({isHijri:e,isAr:o=false})=>e?o?tt:rt:o?nt:it,J=e=>e?et:ot,M=e=>e.setHour(0).setMinute(0).setSecond(0).setMillisecond(0),B=e=>e.setHour(23).setMinute(59).setSecond(59).setMillisecond(999),X=e=>{if(!(e?.[0]instanceof Date)||!(e?.[1]instanceof Date)){let[o,a]=y();return [new q(o),new q(a)]}return [new q(e?.[0]),new q(e?.[1])]};function ce({onChange:e,isHijri:o,isAr:a=false}){let t={locale:Z({isHijri:o,isAr:a}),calendar:J(o)},n=useMemo(()=>[{id:"today",value:[new DateObject(t),new DateObject(t)]},{id:"lastWeek",value:[new DateObject(t).subtract(6,"day"),new DateObject(t)]},{id:"lastMonth",value:[new DateObject(t).subtract(30,"day"),new DateObject(t)]},{id:new DateObject(t).subtract(1,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(1,"month").toFirstOfMonth(),new DateObject(t).subtract(1,"month").toLastOfMonth()]},{id:new DateObject(t).subtract(2,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(2,"month").toFirstOfMonth(),new DateObject(t).subtract(2,"month").toLastOfMonth()]},{id:new DateObject(t).subtract(3,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(3,"month").toFirstOfMonth(),new DateObject(t).subtract(3,"month").toLastOfMonth()]}],[o,a]),{t:p}=useTranslation();return jsx(S,{"data-testid":"RangeCalender_QuickFilters",children:jsx(ao,{children:n.map(l=>jsx(io,{onClick:m=>{m.preventDefault(),e(l.value);},children:p(l.id)},l.id))})})}var po=ce;var so=styled(he)(()=>({minWidth:"auto",padding:0,"& > img":{cursor:"pointer"}}));var ut=["Su","Mo","Tu","We","Th","Fr","Sa"];function ft({isAr:e=false,isHijri:o,values:a,onChange:t,numberOfMonths:n=2,...p},l){let m=c=>c==="right"?e?ac:bc:e?bc:ac;return jsx(Calendar,{ref:l,numberOfMonths:n,value:a,onChange:t,calendar:J(o),locale:Z({isHijri:o,isAr:e}),range:true,format:"MMM DD",monthYearSeparator:" ",renderButton:(c,u)=>jsx(so,{onClick:u,children:jsx("img",{src:m(c),alt:"arrow"})}),weekDays:e?void 0:ut,maxDate:new Date,...p})}var lo=forwardRef(ft);var mo=lo;var co=styled(S)(()=>({'[class$="-IndicatorsContainer2"]':{display:"none"},"#react-select-2-listbox":{width:300}})),V=styled(S)(({theme:e})=>({borderRadius:e.spacing(.5),border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,boxShadow:e.shadows[10],minWidth:200,width:"max-content",overflow:"auto"})),uo=styled(S,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:o})=>({width:156,fontSize:"11px",color:e.palette.text.primary,border:"1px solid",borderColor:e.palette.divider,minHeight:32,borderRadius:"4px",padding:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",cursor:"pointer",display:"flex",alignItems:"center",gap:e.spacing(1),fontWeight:500,...o&&{borderRadius:"4px",boxShadow:e.shadows[7],border:"1px solid",borderColor:e.palette.info.dark,background:e.palette.common.white},span:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}})),L=styled(S)(({theme:e})=>({padding:e.spacing(1),color:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",gap:e.spacing(1),height:33,cursor:"pointer","&:hover":{boxShadow:"0px 0px 16px 0px #00000021"},"&+&":{borderTop:"1px solid",borderColor:e.palette.divider},"&.active span":{fontWeight:500},span:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}})),A=styled(S)(()=>({width:12,height:12})),W=styled(S)(({theme:e})=>({fontSize:"11px",color:e.palette.text.secondary,lineHeight:"15.03px","&.selected":{color:e.palette.info.dark}}));function ge({selectedTimezone:e,onChange:o,timezoneCountriesCodes:a,defaultCountryTimezone:t}){let[n,p]=useState(null),l=i=>{n||p(i.currentTarget);},m=()=>{n&&p(null);},c=(i,D)=>{i.stopPropagation(),o(D);},u=useMemo(()=>a?.map(i=>vc(i)),[a]),s=useMemo(()=>u?.some(i=>e?.timezone===i?.timezone),[u,e]),d=useMemo(()=>e&&s?e:t,[e,t,s]);return jsxs(L,{onMouseEnter:l,onMouseLeave:m,onClick:()=>{e&&o(d);},children:[s?jsx("img",{src:Ni,alt:"icon"}):jsx(A,{}),jsx("img",{src:Li,alt:"entity-timezone"}),jsx(a$1,{countryCode:d?.countryCode}),jsx(W,{className:s?"selected":"",children:s?e?.label:t?.label}),jsx(xt,{open:!!n,anchorEl:n,placement:"right-start",sx:{zIndex:3},disablePortal:true,children:jsx(V,{sx:{maxHeight:300},children:u?.map((i,D)=>{let j=i?.timezone===e?.timezone;return jsxs(L,{onClick:te=>{c(te,i);},sx:{gap:"4px"},children:[j?jsx("img",{src:Ni,alt:"icon"}):jsx(A,{}),jsx(a$1,{countryCode:i?.countryCode}),jsx(W,{className:j?"selected":"",children:i?.label})]},`timezone-item-${D}`)})})})]})}function xe({onChange:e,selectedTimezone:o,browserTimezone:a}){let t=useMemo(()=>an.find(({timezone:l})=>l===a),[a]),n=()=>{t&&e(t);},p=t?.timezone===o?.timezone;return jsxs(L,{onClick:n,children:[p?jsx("img",{src:Ni,alt:"icon"}):jsx(A,{}),jsx("img",{src:Ki,alt:"user-timezone"}),jsx(a$1,{countryCode:t?.countryCode}),jsx(W,{className:p?"selected":"",children:t?.label})]})}function zt({onChange:e,selectedTimezone:o,browserTimezone:a,defaultCountryTimezone:t,timezoneCountriesCodes:n}){let[p,l]=useState(null),m=!!p,c=()=>{l(null);},u=i=>{e(i),c();},s=i=>{l(i.currentTarget);},d=useMemo(()=>a===o?.timezone?Ki:o?.timezone===t.timezone?Li:Mi,[a,t.timezone,o?.timezone]);return jsx(No,{onClickAway:c,children:jsxs(co,{"data-testid":"CustomTimezone",children:[jsxs(uo,{open:m,onClick:s,children:[jsx("img",{src:d,alt:"timezone-icon"}),jsx(a$1,{countryCode:o?.countryCode}),jsx("span",{children:o?.label})]}),jsx(xt,{open:m,anchorEl:p,placement:"top-start",sx:{zIndex:1400},children:jsxs(V,{"data-testid":"CustomTimezone_dropdown",children:[jsx(ge,{onChange:u,selectedTimezone:o,defaultCountryTimezone:t,timezoneCountriesCodes:n}),jsx(xe,{onChange:u,selectedTimezone:o,browserTimezone:a})]})})]})})}var go=memo(zt);var xo=go;var bo=styled(S)(({theme:e})=>({display:"flex",marginTop:"8px",background:e.palette.common.white,boxShadow:e.shadows[9],borderRadius:e.spacing(1),color:e.palette.text.primary,fontSize:"11px",".rmdp-calendar":{padding:"8px 16px 16px"},".rmdp-rtl *":{fontFamily:"Tajawal"},".rmdp-rtl .sd":{paddingTop:"4px"},".rmdp-wrapper":{position:"relative",borderRadius:"8px",boxShadow:"none"},".rmdp-day span":{fontSize:"11px",fontWeight:500},".rmdp-day, .rmdp-week-day":{width:40,height:40,marginBottom:"2px",padding:"4px",fontSize:"11px",color:e.palette.grey[900]},".rmdp-day-picker":{padding:0},".rmdp-day.rmdp-today span":{backgroundColor:"transparent !important",color:e.palette.info.dark},".rmdp-day.rmdp-today.end span, .rmdp-day.rmdp-today.end span":{color:e.palette.common.white},".rmdp-range, .rmdp-day:not(.rmdp-disabled):not(.rmdp-day-hidden) span:hover":{background:e.palette.info.light,boxShadow:"none",color:e.palette.grey[900]},".rmdp-range-hover.start, .rmdp-range.start, .rmdp-range-hover.end, .rmdp-range.end, .rmdp-rtl .rmdp-range-hover.start, .rmdp-rtl .rmdp-range.start, .rmdp-rtl .rmdp-range-hover.end, .rmdp-rtl .rmdp-range.end":{borderRadius:"50%",background:e.palette.background.gradient.darkShadedBlue,color:e.palette.common.white},".rmdp-range.start:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",right:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.start:after":{right:"unset",left:0},".rmdp-range.end:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",left:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.end:after":{left:"unset",right:0},".rmdp-week-day":{color:e.palette.grey[700],marginBottom:"4px",fontSize:"11px",padding:"4px"},".rmdp-header-values":{color:e.palette.grey[900],fontSize:"12px",fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px"},".rmdp-header-values span:nth-of-type(2)":{display:"none"},".rmdp-header":{padding:"4px 0",margin:0,fontSize:"12px"},".rmdp-top-class":{display:"block !important"},".rmdp-day.rmdp-selected span:not(.highlight)":{background:e.palette.info.dark},".rmdp-day.start.end":{overflow:"hidden"},".rmdp-day.rmdp-disabled":{color:"#ccc",cursor:"not-allowed"}})),ho=styled(he)(({theme:e})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",background:"transparent",color:e.palette.text.primary,border:"1px solid",borderColor:e.palette.divider,fontWeight:500,borderRadius:"4px","&:hover":{background:"transparent",color:e.palette.text.primary}})),yo=styled(he)(({theme:e})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",borderRadius:"4px",fontWeight:700,background:e.palette.info.dark,"&:hover":{background:e.palette.info.dark}})),wo=styled(S)(()=>({display:"flex",gap:8})),Co=styled(he,{shouldForwardProp:e=>e!=="open"})(({open:e,theme:o})=>({color:o.palette.text.primary,fontSize:"11px",fontWeight:500,padding:o.spacing(1),borderRadius:"4px",border:"1px solid",borderColor:o.palette.divider,background:o.palette.common.white,textTransform:"none",height:32,...e&&{border:"1px solid",borderColor:o.palette.info.dark,boxShadow:o.shadows[7]}})),To=styled(S)(({theme:e})=>({background:e.palette.common.white,display:"flex",justifyContent:"space-between",alignItems:"center",gap:10,padding:"16px",borderTop:"1px solid",borderColor:e.palette.divider,borderBottomRightRadius:"8px"})),ko=styled(S)(({theme:e})=>({padding:16,paddingInlineEnd:"23px",borderRight:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,width:"max-content",borderTopLeftRadius:"8px",borderBottomLeftRadius:"8px",display:"flex",flexDirection:"column",gap:10,justifyContent:"space-between"})),zo=styled(S)(()=>({display:"flex",alignItems:"center",gap:"10px"})),So=styled(S)(()=>({position:"relative"})),vo=styled(S)(()=>({display:"flex",flexDirection:"column",gap:"24px"}));var Do=styled(S,{shouldForwardProp:e=>e!=="isAllDay"})(({theme:e,isAllDay:o})=>({display:"flex",alignItems:"center",gap:e.spacing(1),position:"relative",paddingInline:"5px",".label":{width:"max-content"},...!o&&{paddingRight:e.spacing(1),"&:after":{content:'""',position:"absolute",width:"1px",background:e.palette.divider,right:0,height:17}}})),Mo=styled(S)(()=>({width:235})),Bo=styled(S)(({theme:e})=>({display:"flex",gap:"4px",".rmdp-input":{width:"64px",borderRadius:"19px",border:"1px solid",borderColor:e.palette.divider,color:e.palette.text.primary,fontSize:"11px",fontWeight:500,background:"transparent",cursor:"pointer"},".rmdp-input:focus":{boxShadow:e.shadows[7],border:`1px solid ${e.palette.info.dark}`,borderRadius:"19px"},".rmdp-time-picker":{boxShadow:e.shadows[5],borderRadius:e.spacing(1),padding:e.spacing(2),minWidth:"auto !important",div:{marginTop:0,display:"block"},"> div":{width:32,height:64},".rmdp-arrow":{borderColor:`${e.palette.background.transparent[1]} !important`},".rmdp-arrow-container":{justifyContent:"center","&:hover":{backgroundColor:"transparent",boxShadow:"unset"}},input:{borderRadius:"4px",border:`1px solid ${e.palette.divider}`,padding:0,width:32,height:32,fontSize:"11px",color:e.palette.text.primary,fontWeight:500,"&:focus, &:focus-visible":{border:`1px solid ${e.palette.info.dark}`,outline:"unset"}},".dvdr":{margin:"7px 4px 0"},".rmdp-am, .rmdp-pm":{margin:0,width:32,height:32,flex:"auto",justifyContent:"center",fontSize:"11px",color:e.palette.text.primary,fontWeight:500,display:"flex",cursor:"default"},"> div:last-child":{marginInlineStart:"4px",display:"block !important"},".rmdp-down, .rmdp-up":{position:"relative",i:{display:"none"},"&:before":{content:'""',position:"absolute",top:"5px",width:"10px",height:"10px",backgroundImage:`url(${Rc})`}},".rmdp-down:before":{transform:"rotate(180deg)"}},".rmdp-container":{position:"relative","> div":{top:"unset !important",bottom:"28px",transform:"unset !important"}}})),Eo=styled(S)(({theme:e})=>({display:"flex",gap:"8px",alignItems:"center",borderRadius:"50px",border:"1px solid",borderColor:e.palette.divider,paddingInline:"5px",width:"fit-content",height:32}));function Dt({values:e,setValues:o}){let{t:a}=useTranslation(),t=new DateObject(e[0]),n=new DateObject(e[1]),[p,l]=useState(t.dayOfYear===n.dayOfYear&&t.hour===0&&t.minute===0&&n.hour===23&&n.minute===59),m=({period:s,hour:d})=>s==="PM"&&d!==12?d+12:s==="AM"&&d===12?0:d,c=({hour:s,minute:d,period:i})=>{o([t.setHour(m({hour:s,period:i})).setMinute(d).setSecond(0),n]);},u=({hour:s,minute:d,period:i})=>{o([t,n.setHour(m({hour:s,period:i})).setMinute(d).setSecond(59)]);};return jsx(Mo,{children:jsxs(Eo,{children:[jsxs(Do,{isAllDay:p,children:[jsx("span",{className:"label",children:a("allDay")}),jsx(a$4,{checked:p,onChange:s=>{l(!p),s.target.checked?o([M(e[0]),B(e[1])]):o(e);}})]}),!p&&jsxs(Bo,{children:[jsx(j,{defaultTime:{hour:a$5(t.hour),minute:t.minute,period:t.hour>=12?"PM":"AM"},size:"small",onChange:c,enableRealTimeChange:true},`${e[0]?.toString()}-start`),jsx(j,{defaultTime:{hour:a$5(n.hour),minute:n.minute,period:n.hour>=12?"PM":"AM"},size:"small",onChange:u,enableRealTimeChange:true},`${e[1]?.toString()}-end`)]})]})})}var Ro=Dt;var Io=Ro;function At({defaultDate:e,onDateChange:o,mode:a="gregorian",onCalendarModeSwitch:t,numberOfMonths:n,noTimezone:p,noQuickFilter:l,maxDateRange:m,onCalendarGroupChange:c,groupBy:u,timezone:s,onChangeTimezone:d,browserTimezone:i,renderCalendarButton:D,mainSx:j,popperProps:te,rangeDatePickerProps:Ao,defaultCountryTimezone:Ce,timezoneCountriesCodes:Te}){let[w,ke]=useState(X(e)),[x,C]=useState(w),[ze,Se]=useState(s??null),[ve,Wo]=useState(u||"day"),[De,Me]=useState(null),y=!!De,[Be,Ee]=useState(false),{t:re}=useTranslation(),I=useRef(null),Fo=Ic(useId(),"range-calender"),ne=a==="hijri",Y=()=>{Me(null);},Oe=r=>{Me(r.currentTarget);};useEffect(()=>{if(!y){if(n===1)return;C(X(e));}},[y]),useEffect(()=>{if(e){let r=X(e);ke(r),C(r),I.current&&I.current.set("date",r[0]);}},[e]),useEffect(()=>{Se(s??null);},[s,y]);let Re=()=>{ke(x),Y();let r;x[0].dayOfYear===x[1].dayOfYear?r=[x[0],x[1]]:r=[M(x[0]),B(x[1])],o([r[0].toDate(),r[1].toDate()]),c?.(ve||"day"),d?.(ze);},Ho=useCallback(()=>{let r=w[0].format("MMM D"),G=w[1]?w[1].format("MMM D"):w[0].format("MMM D");return r===G&&!p?r:`${r} - ${G}`},[w,p]),jo=r=>{if(r.length<2||!m){C(r);return}let G=M(r[0]).toDate(),$o=B(r[1]).toDate(),Ie=Pt($o).diff(G,"day");if(Ie<=m){C(r);return}Ee(true),C([r[0],r[1].subtract(Ie-m,"d")]),setTimeout(()=>{Ee(false);},3e3);},Yo=r=>{C([M(r[0]),B(r[1])]),I.current&&I.current.set("date",r[0]);},Go=r=>{r.key==="Enter"&&x[1]&&!Be?(r.stopPropagation(),Re()):r.key==="Escape"&&(r.stopPropagation(),Y());};return jsxs(So,{id:Fo,"data-testid":"RangeCalender",sx:j,children:[D?D(y,Oe):jsx(Co,{onClick:Oe,open:y,children:(w[0]||w[1])&&Ho()}),y&&jsx(a$2,{onClick:r=>{r.stopPropagation(),Y();}}),jsx(xt,{open:y,anchorEl:De,placement:"bottom-end",...te,children:jsxs(bo,{onKeyDown:Go,children:[!l&&jsxs(ko,{children:[jsx(po,{onChange:Yo,isHijri:ne}),jsxs(vo,{children:[u&&jsx(Ve,{groupBy:ve,isCalenderOpen:y,onUpdate:r=>{Wo(r);}}),jsx(ro,{isHijri:ne,onCalendarModeSwitch:t})]})]}),jsxs(S,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[jsx(mo,{values:x,onChange:jo,isHijri:ne,ref:I,numberOfMonths:n,...Ao}),jsx(Rt,{in:Be&&!!m,children:jsx(a$3,{error:re("dateRangeError",{number:m}),sx:{marginInline:"16px",marginBottom:"16px"}})}),jsxs(To,{sx:{borderBottomLeftRadius:"8px"},children:[!p&&Ce&&i&&Te?jsx(zo,{children:jsx(xo,{onChange:Se,selectedTimezone:ze,browserTimezone:i,defaultCountryTimezone:Ce,timezoneCountriesCodes:Te},String(y))}):jsx("div",{}),new DateObject(x[0]).dayOfYear===new DateObject(x[1]).dayOfYear&&jsx(Io,{values:x,setValues:C}),jsxs(wo,{children:[jsx(ho,{variant:"contained",onClick:Y,children:re("cancel")}),jsx(yo,{variant:"contained",onClick:Re,disabled:!x[1],children:re("okay")})]})]})]})]})})]})}var Lo=At;var xi=Lo;export{xi as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {f}from'./chunk-
|
|
1
|
+
import {f}from'./chunk-S4HTCR2F.js';import {Ic}from'./chunk-4NESBBQ5.js';import {memo,useId,useState,useRef,useMemo}from'react';import {useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import C from'@mui/material/Box';import v from'@mui/material/Button';import {styled,alpha}from'@mui/material/styles';function m({isActive:o}){let[t,r]=useState(false),a=useTheme(),s=()=>{r(true);},p=()=>{r(false);},l=o?a.palette.common.white:a.palette.grey[700],c=t?a.palette.common.black:"transparent";return jsx("svg",{width:"27",height:"30",viewBox:"0 0 27 32",xmlns:"http://www.w3.org/2000/svg",children:jsxs("g",{id:"Group 140343",children:[jsx("path",{id:"Active",d:"M0 0H11C19.8366 0 27 7.16344 27 16C27 24.8366 19.8366 32 11 32H0V0Z",fill:c,fillOpacity:"0.1",onMouseEnter:s,onMouseLeave:p}),jsx("path",{id:"Union",fillRule:"evenodd",clipRule:"evenodd",d:"M15.6941 15.0078C15.6494 15.0193 15.6083 15.043 15.5758 15.0769L12.5026 18.1501L12.5025 18.1501L15.5756 15.0769C15.6082 15.043 15.6493 15.0193 15.6941 15.0078ZM12.5619 18.7465C12.5426 18.7512 12.5227 18.7536 12.5026 18.7536C12.4363 18.7536 12.3727 18.7273 12.3258 18.6804L9.07581 15.4304C9.04012 15.3957 9.01559 15.3512 9.00535 15.3025C8.99511 15.2538 8.99963 15.2032 9.01833 15.1571C9.03703 15.111 9.06907 15.0715 9.11033 15.0437C9.13446 15.0275 9.16112 15.0156 9.18904 15.0086C9.16105 15.0156 9.13433 15.0275 9.11013 15.0438C9.06887 15.0716 9.03684 15.111 9.01814 15.1571C8.99944 15.2032 8.99492 15.2539 9.00516 15.3026C9.0154 15.3513 9.03993 15.3958 9.07562 15.4305L12.3256 18.6805C12.3725 18.7273 12.4361 18.7537 12.5024 18.7537C12.5226 18.7537 12.5426 18.7512 12.5619 18.7465ZM16.1965 15.342C16.1781 15.4301 16.1338 15.5105 16.0693 15.5731L12.8205 18.8219C12.7361 18.9063 12.6217 18.9537 12.5024 18.9537C12.3831 18.9537 12.2686 18.9062 12.1842 18.8219L8.93507 15.5728C8.87148 15.5105 8.82775 15.4308 8.80944 15.3437C8.79101 15.2561 8.79914 15.165 8.8328 15.082C8.86646 14.999 8.92412 14.9279 8.99839 14.8779C9.07266 14.8279 9.16022 14.8011 9.24978 14.8011C9.30998 14.8011 9.36958 14.8132 9.42503 14.8366C9.47997 14.8599 9.52973 14.8938 9.57144 14.9364L12.5024 17.8673L15.433 14.9368C15.5151 14.852 15.6273 14.803 15.7454 14.8002C15.836 14.798 15.9252 14.8233 16.0013 14.8728C16.0773 14.9222 16.1367 14.9935 16.1715 15.0772C16.2063 15.1609 16.2151 15.2533 16.1965 15.342Z",fill:l})]})})}var y=o=>({...o.typography.subtitle1,borderRadius:"50px",borderWidth:"1px",borderStyle:"solid",minWidth:"135.11px",height:"32px",display:"flex",justifyContent:"center",alignItems:"center",gap:"8px",textTransform:"none",transition:"none",paddingInline:o.spacing(2)}),B=styled(v)(({theme:o})=>({...y(o),background:o.palette.background.gradient.shadedBlue,color:o.palette.common.white,"&:hover":{background:o.palette.background.gradient.shadedBlue,opacity:.8}})),b=styled(v)(({theme:o})=>({...y(o),backgroundColor:o.palette.common.white,borderColor:o.palette.grey[100],color:o.palette.text.primary,"&:hover":{backgroundColor:o.palette.common.white,opacity:.7}}));styled(C)(({theme:o,variant:t})=>({borderRadius:"50px",backgroundColor:t==="active"?alpha(o.palette.text.primary,.1):o.palette.grey[100],display:"flex",justifyContent:"center",alignItems:"center",paddingInline:o.spacing(.5),paddingBlock:o.spacing(.25),color:t==="active"?o.palette.common.white:o.palette.text.primary,fontSize:"8px",fontWeight:700,lineHeight:"10px"}));styled("img")(({theme:o,variant:t})=>({fill:t==="active"?o.palette.common.white:o.palette.text.primary,color:t==="active"?o.palette.common.white:o.palette.text.primary,maxWidth:"14px",maxHeight:"14px"}));styled("p")(({theme:o})=>({fontSize:"0.6875rem",color:o.palette.background.default,fontStyle:"normal",margin:"auto",textTransform:"capitalize"}));var I=styled(f)(({theme:o})=>({backgroundColor:"white",boxShadow:o.shadows[21],borderRadius:"0.25rem","& .MuiPaper-root":{borderRadius:"0.25rem",width:"12.5rem"}})),D=styled("span")(()=>({width:"27px",height:"100%",maxHeight:"100%",position:"absolute",top:"0",right:"0",bottom:"0",overflow:"hidden"})),L=styled(C)(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"100%"})),k=styled(C)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"0.5rem"}));var M={active:B,inActive:b};function R({variant:o="inActive",label:t,dropdownOptions:r,...a}){let s=Ic(useId(),"dropdown-button"),[p,l]=useState(null),c=useRef(null),f=!!p,g=()=>{l(null);},H=M[o],d=r&&r.length>0,h=d?jsx(m,{isActive:o==="active"}):null,T=n=>{n.stopPropagation(),n.preventDefault(),d&&l(c.current);},P=useMemo(()=>(r||[]).map(n=>({...n,onClick:A=>{n?.onClick?.(A),g();}})),[r]);return jsxs(Fragment,{children:[jsx(H,{id:s,"data-testid":"StatusButton",...a,ref:c,onClick:n=>{a?.onClick?.(n),T(n);},sx:{...d&&{paddingInlineEnd:"27px"}},children:jsxs(L,{children:[jsx(k,{children:t}),h&&jsx(D,{children:h})]})}),f&&jsx(I,{open:f,onClose:g,anchorEl:p,menuItems:P})]})}R.displayName="DropdownButton";var E=memo(R);var go=E;
|
|
2
2
|
export{m as a,go as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-2CPNOT3J.js';import {Ic}from'./chunk-4NESBBQ5.js';import {kh,z}from'./chunk-IUXIBZV3.js';import {useId}from'react';import g from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var s=styled(a)(({theme:o})=>({border:`1px solid ${o.palette.divider}`,".icon":{width:14}})),d=styled(g)(()=>({padding:"8px 16px","> div + div":{marginTop:"8px"}}));var v=({value:o,name:c,placeholder:l,onSearchChange:u,onSearchReset:f,...h})=>{let I=Ic(useId(),"search-list-input");return jsx(d,{id:I,"data-testid":"SearchListInput",...h,children:jsx(s,{className:"input",name:c,placeholder:l,onChange:t=>u(t.target.value),onKeyDown:t=>t.stopPropagation(),value:o,inputProps:{autoComplete:"off"},endAdornment:jsx(g,{component:"img","data-icon":o?"close":"search",src:o?kh:z,alt:"search",className:"icon",sx:{cursor:o?"pointer":"default"},onClick:f})})})},m=v;var R=m;export{R as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-43GG5XMM.js';import {a as a$1}from'./chunk-KHM5KW53.js';import {Ic}from'./chunk-4NESBBQ5.js';import {useId}from'react';import i from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var u=styled(i)(({rows:e,columns:t})=>({display:"grid",gridTemplateColumns:`repeat(${t}, 1fr)`,gridTemplateRows:`repeat(${e}, 1fr)`,gap:"6px"})),g=styled(i)(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",fontSize:"10px",fontWeight:500,color:e.palette.grey[700],lineHeight:"100%",letterSpacing:"0"})),$=styled(i)(({theme:e,percentage:t=0})=>({width:"24px",height:"8px",borderRadius:"1px",backgroundColor:t===0?alpha(e.palette.grey[700],.1):alpha(e.palette.info.dark,t)})),M=styled(g)(()=>({fontSize:"9px"})),O=styled(i)(()=>({display:"flex",flexDirection:"row",gap:"10px",padding:"22px 12px"}));function x({xAxis:e,yAxis:t,series:n,isLoading:m,tooltip:l}){let s=Ic(useId(),"heat-map"),c=e.labels,d=t.labels;return jsxs(O,{id:s,"data-testid":"HeatMap",children:[jsxs(u,{rows:d.length,columns:1,children:[jsx("span",{}),d.map((r,o)=>jsx(M,{sx:{minWidth:"25px"},children:t.render?t.render(r):r},`${o}-${r}`))]}),jsxs(u,{rows:d.length,columns:c.length,children:[c.map((r,o)=>jsx(g,{children:e.render?e.render(r):r},`${o}-${r}`)),d.map(r=>c.map((o,h)=>{if(m)return jsx(a,{variant:"rectangular",width:"24px",height:"8px"},`${o}-${h}`);let f=n?.[o]?.[r]??{};return jsx(a$1,{title:l?.render&&f?.value?l.render(f,o,r):null,children:jsx($,{percentage:f?.colorOpacityDegree})},`${o}-${h}`)}))]})]})}var k=[.06,.1,.2,.3,.4,.5,.6,.7,.8,.9,1];function D(e,t,n){if(t===n)return 0;let m=n-t,l=(e-t)/m,s=Math.floor(l*10);return k[Math.max(0,Math.min(10,s))]}var B=x;export{D as a,B as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Ic}from'./chunk-4NESBBQ5.js';import {On,Nn}from'./chunk-IUXIBZV3.js';import {memo,useId}from'react';import {Checkbox}from'@mui/material';import {jsx}from'react/jsx-runtime';function p(o){let m=Ic(useId(),"checkbox");return jsx(Checkbox,{id:m,"data-testid":"Checkbox",disableRipple:true,sx:r=>({'[data-testid="IndeterminateCheckBoxIcon"]':{fill:r.palette.info.dark,width:"16px !important",height:"16px !important"}}),checkedIcon:o.disabled?On:Nn,...o})}p.displayName="CheckboxInput";var d=memo(p);var u=d;export{u as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Ic,Ja,Ka}from'./chunk-4NESBBQ5.js';import {Bb,Sc}from'./chunk-IUXIBZV3.js';import co,{useId,useState,useRef,useCallback,useEffect,useMemo}from'react';import B from'@mui/material/Box';import mo from'@mui/material/ClickAwayListener';import to from'@mui/material/Stack';import Q from'@mui/material/Typography';import {styled,alpha}from'@mui/material/styles';import L from'@mui/material/Button';import io from'@mui/material/TextField';import lo from'@mui/material/MenuList';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useTranslation}from'react-i18next';import {RgbColorPicker,RgbaColorPicker}from'react-colorful';import Ho from'@mui/material/Divider';import uo from'@mui/material/Popper';import q from'@mui/material/MenuItem';import Y from'@mui/material/InputAdornment';import v from'color';import {Popper}from'@mui/material';var O=styled("button")({background:"transparent",border:"none",padding:0,margin:0,cursor:"pointer",width:10,height:10,display:"flex",justifyContent:"center",alignItems:"center","&:disabled, &.Mui-disabled":{opacity:.5,cursor:"not-allowed"}}),G=styled(B)(({theme:o})=>({boxShadow:"0px 8px 30px rgba(0, 0, 0, 0.16)",width:264,backgroundColor:"#ffffff",padding:"12px",borderRadius:o.spacing(1),"& .react-colorful":{width:"100%","&__saturation":{minHeight:152,borderRadius:"4px",marginBottom:o.spacing(2),border:0,"&-pointer":{width:13,height:13}},"&__hue":{borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}},"&__alpha":{marginTop:o.spacing(2),marginBottom:0,border:0,borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}}}})),D=styled(B)(()=>({display:"flex",gap:"8px",justifyContent:"flex-end"})),V=styled(o=>jsx(Q,{...o,component:"button"}))(({theme:o})=>({fontWeight:500,fontSize:"9px",color:o.palette.info.dark,textDecoration:"underline",cursor:"pointer",background:"transparent",border:"none",padding:0,margin:0,"&:disabled, &.Mui-disabled":{color:alpha(o.palette.info.dark,.5),textDecoration:"none"},"&:hover":{textDecoration:"none"}})),X=styled(L)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.info.dark}`,backgroundColor:o.palette.info.dark,fontWeight:700,fontSize:"11px",color:o.palette.common.white,"&:hover":{backgroundColor:o.palette.info.dark}})),$=styled(L)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.divider}`,backgroundColor:o.palette.common.white,fontWeight:500,fontSize:"11px",color:o.palette.text.primary,"&:hover":{background:"transparent"}})),U=styled(B,{shouldForwardProp:o=>o!=="active"})(({theme:o,active:s})=>({display:"flex",justifyContent:"space-between",alignItems:"center",color:o.palette.text.primary,border:"1px solid #F2F2F2",fontSize:12,fontWeight:500,backgroundColor:"transparent",padding:"4px 8px",borderRadius:"4px",minWidth:70,cursor:"pointer",...s&&{border:"1px solid #1F88D0",boxShadow:"0px 0px 4px 0px #1F88D080"}})),Z=styled(lo)({backgroundColor:"#ffffff",borderRadius:"4px",boxShadow:"0px 8px 30px 0px #00000029",minWidth:70,"& .MuiMenuItem-root":{fontSize:12,fontWeight:500,padding:"4px 8px"}}),x=styled(io)(({theme:o})=>({"& .MuiOutlinedInput-root":{fontSize:"12px",fontWeight:500,borderRadius:"4px","& input":{padding:"4px","&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},"&[type=number]":{MozAppearance:"textfield"}},"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"},"&:hover, &.Mui-focused":{"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"}}}}));var go=({scheme:o,setScheme:s})=>{let[n,r]=co.useState(null),m=!!n,a=useCallback(c=>{r(n?null:c.currentTarget);},[n]),i=useCallback(()=>{r(null);},[]),d=useCallback(c=>{i(),s(c);},[i,s]);return jsxs(Fragment,{children:[jsxs(U,{component:"button",active:m,onClick:a,children:[o,jsx(B,{component:"img",sx:{transform:m?"rotateZ(180deg)":"rotateZ(0)",transition:"200ms transform ease-out"},src:Sc})]}),jsx(uo,{anchorEl:n,open:!!n,placement:"bottom",disablePortal:true,keepMounted:true,modifiers:[{name:"offset",options:{offset:[0,4]}}],children:jsx(mo,{onClickAway:c=>{n?.contains(c.target)||i();},children:jsxs(Z,{children:[jsx(q,{onClick:()=>d("RGB"),children:"RGB"}),jsx(q,{onClick:()=>d("HEX"),children:"HEX"})]})})})]})},J=go;var So=({value:o,onChange:s,disableAlpha:n=false})=>{let[r,m]=useState(o),{r:a,g:i,b:d,a:c}=r;useEffect(()=>{m(o);},[o]);let u=useCallback((l,f)=>(isNaN(l)&&(l=0),l<0&&(l=0),l>f&&(l=f),console.log("num",l),l),[]),t=useCallback((l,f)=>P=>{m({...r,[l]:u(+P.target.value,f)});},[r,u]),e=useCallback((l,f)=>{s({...r,[l]:u(r[l],f)});},[s,r,u]);return jsxs(to,{direction:"row",spacing:1,...n&&{flex:1},children:[jsx(x,{type:"number",value:a,onBlur:()=>e("r",255),onChange:t("r",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),jsx(x,{type:"number",value:i,onBlur:()=>e("g",255),onChange:t("g",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),jsx(x,{type:"number",value:d,onBlur:()=>e("b",255),onChange:t("b",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),!n&&jsx(x,{type:"number",value:c,onBlur:()=>e("a",100),onChange:t("a",100),inputProps:{min:0,max:100,style:{textAlign:"center"}},variant:"outlined",sx:{"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(Y,{position:"end",sx:{m:0},children:jsx(Q,{component:"span",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})},size:"small"})]})},K=So;var _o=({value:o,onChange:s,disableAlpha:n=false})=>{let r=useMemo(()=>v.rgb(o.r,o.g,o.b,o.a).hex().replace("#",""),[o]),[m,a]=useState(r),i=Math.round(o.a*100);return useEffect(()=>{let t=v.rgb(o.r,o.g,o.b).hex().replace("#","");a(t);},[o.r,o.g,o.b]),jsxs(to,{direction:"row",spacing:1,alignItems:"flex-start",children:[jsx(x,{value:m,onChange:t=>{let e=t.target.value.replace(/[^0-9a-fA-F]/g,"").toUpperCase();e.length>6&&(e=e.slice(0,6)),a(e);},onBlur:()=>{let t=m;if(t.length===3&&(t=t.split("").map(e=>e+e).join(""),a(t)),t.length===6)try{let e=v(`#${t}`).alpha(o.a);s({r:e.red(),g:e.green(),b:e.blue(),a:e.alpha()});}catch{a(r);}else a(r);},placeholder:"FFFFFF",sx:{flex:1.4,"& .MuiOutlinedInput-root":{pl:1}},InputProps:{startAdornment:jsx(Y,{position:"start",sx:{m:0},children:jsx(Q,{component:"span",color:t=>alpha(t.palette.text.primary,.5),display:"inline-block",fontSize:12,fontWeight:500,children:"#"})})}}),!n&&jsx(x,{type:"number",value:i,onChange:t=>{let e=parseInt(t.target.value,10);isNaN(e)&&(e=0),e<0&&(e=0),e>100&&(e=100),s({...o,a:e/100});},inputProps:{min:0,max:100},sx:{flex:.8,"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(Y,{position:"end",sx:{m:0},children:jsx(Q,{component:"span",color:"text.primary",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})}})]})},j=_o;var Wo=({initialValue:o="#ffffff",onCancel:s,onConfirm:n,disableAlpha:r=false})=>{let[m,a]=useState("RGB"),[i,d]=useState(()=>{let{alpha:p,...y}=Ja(o).value;return {...y,a:p}}),{t:c}=useTranslation(),u=useCallback(()=>{let{alpha:p,...y}=Ja(o).value;d({...y,a:p}),s();},[o,s]),t=useCallback(()=>{let{a:p,...y}=i;n(Ka({...y,alpha:r?1:p}));},[i,n,r]),e=useCallback(p=>{d(r?{...p,a:1}:p);},[r]),l=useCallback(p=>{d({...p,a:p.a/100});},[]),f=useCallback(p=>{d({...p,a:p.a});},[]);return jsxs(G,{className:"color-picker__widget",children:[jsx(r?RgbColorPicker:RgbaColorPicker,{color:i,onChange:e}),jsxs(to,{mt:2,spacing:1,direction:"row",children:[jsx(J,{scheme:m,setScheme:a}),m==="RGB"?jsx(K,{value:{...i,a:Math.round(i.a*100)},onChange:l,disableAlpha:r}):jsx(j,{value:{...i,a:i.a},onChange:f,disableAlpha:r})]}),jsx(Ho,{sx:{my:"12px"}}),jsxs(D,{className:"color-picker__widget-actions",children:[jsx($,{className:"color-picker__widget-actions__cancel",onClick:u,children:c("cancel")}),jsx(X,{className:"color-picker__widget-actions__confirm",onClick:t,children:c("okay")})]})]})},eo=Wo;var ro={hideReset:false,disableAlpha:false},Vo=({value:o="#ffffff",onChange:s,onReset:n,sx:r,options:m=ro,disabled:a=false})=>{let i=Ic(useId(),"color-picker"),[d,c]=useState(null),{disableAlpha:u=false,hideReset:t=false}={...ro,...m},e=useRef(null),l=useCallback(()=>{a||c(e.current);},[a]),f=useCallback(()=>{a||c(null);},[a]),P=useCallback(p=>{s(u?p.substring(0,7):p),c(null);},[s,u]);return jsx(mo,{onClickAway:()=>c(null),children:jsxs(to,{ref:e,id:i,"data-testid":"ColorPicker",bgcolor:"grey.400",borderRadius:"4px",p:"4px",pr:"12px",direction:"row",justifyContent:"space-between",spacing:1,alignItems:"center",className:"color-picker",sx:r,children:[jsxs(to,{direction:"row",spacing:1,alignItems:"center",className:"color-picker__controls-wrapper",children:[jsx(B,{borderRadius:"5px",width:32,height:32,sx:{backgroundColor:o},className:"color-picker__viewer"}),jsxs(B,{className:"color-picker__actions-wrapper",children:[jsx(Q,{className:"color-picker__label",fontWeight:500,fontSize:9,color:"text.primary",textTransform:"uppercase",children:o}),jsx(V,{className:"color-picker__edit-btn",type:"button",onClick:l,disabled:a,children:"Edit"})]})]}),t?jsx("div",{}):jsx(O,{className:"color-picker__close-btn",type:"button",disabled:a,onClick:n,children:jsx(B,{component:"img",src:Bb,width:10,height:10})}),jsx(Popper,{anchorEl:d,open:!!d,placement:"top",children:jsx(eo,{initialValue:o,onCancel:f,onConfirm:P,disableAlpha:u})})]})})},no=Vo;var ot=no;export{ot as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Ic}from'./chunk-4NESBBQ5.js';import {s,r}from'./chunk-IUXIBZV3.js';import {useId}from'react';import S from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,Fragment}from'react/jsx-runtime';var c=styled(S)(()=>({height:10}));styled("span")(({theme:o})=>({fontSize:o.typography.body2.fontSize,lineHeight:"17px",fontWeight:"700"}));styled("span")(()=>({fontWeight:"400"}));var l=styled("span")(({symbol:o,fontSize:e,color:t})=>({display:"inline-block",height:e,width:e,backgroundColor:t,maskImage:`url("${o}")`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:`url("${o}")`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}));var u={SAR:r,AED:s};function g({currency:o,fontSize:e,color:t,sx:m={}}){let a=Ic(useId(),"currency-symbol"),n=u[o];return n?t?jsx(l,{id:a,"data-testid":"CurrencySymbol",symbol:n,fontSize:e,color:t,"aria-label":o,role:"img",sx:m}):jsx(c,{id:a,"data-testid":"CurrencySymbol",component:"img",src:n,alt:o,sx:{height:e,...m}}):jsx(Fragment,{children:o})}var b=g;var B=b;export{B as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-IWLYUUDJ.js';import {
|
|
1
|
+
import {a as a$1}from'./chunk-IWLYUUDJ.js';import {Ic}from'./chunk-4NESBBQ5.js';import {forwardRef,useId,useMemo,Children,useCallback,memo}from'react';import C from'@mui/material/Popper';import y from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var a=styled(y,{shouldForwardProp:o=>o!=="showShadow"})(({theme:o,showShadow:e})=>({borderRadius:o.spacing(.5),background:o.palette.background.default,width:"max-content",cursor:"pointer",boxShadow:o.shadows[11],display:"flex",flexDirection:"column",overflowY:"scroll",maxHeight:"432px","&:focus":{outline:"none"},".menu-item + .menu-item":{borderTop:`1px solid ${o.palette.divider}`},"&::after":{content:'""',width:"100%",height:"34px",position:"fixed",bottom:0,pointerEvents:"none",zIndex:999999,background:"linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 100%)",transition:o.transitions.create("opacity",{duration:250}),...e?{opacity:1}:{opacity:0}}}));var R=forwardRef(({open:o,anchorEl:e,children:r,sx:c,placement:m,popperSx:u,dropdownProps:w,...f},h)=>{let x=Ic(useId(),"menu"),{onScrollHandler:t,showShadow:S}=a$1(),{onScroll:n,...P}=w||{},b=useMemo(()=>Children.count(r),[r])>12&&S,g=useCallback(p=>{t(p),n?.(p);},[t,n]);return jsx(C,{ref:h,id:x,"data-testid":"Menu",open:o,anchorEl:e,placement:m||"bottom-start",sx:u,...f,children:jsx(a,{showShadow:b,onScroll:g,className:"MuiPopper-dropdown",sx:c,...P,children:r})},"menu")}),l=memo(R);var K=l;export{K as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Ic}from'./chunk-4NESBBQ5.js';import {useId}from'react';import {styled}from'@mui/material/styles';import {Box,Typography}from'@mui/material';import {jsx,jsxs}from'react/jsx-runtime';var a=styled(Box,{shouldForwardProp:r=>!["value","isDecimal"].includes(r)})(({value:r,isDecimal:e,theme:o})=>({width:`${r}%`,minWidth:r>=10?"28px":"24px",height:"18px",borderRadius:"50px",background:o.palette.background.gradient.darkShadedBlue,display:"flex",alignItems:"center",justifyContent:r>10?"flex-end":"center",paddingInlineEnd:r>10?"2px":"0px",...r===0&&{background:"#20232B1A"},...e&&{minWidth:r>=10?"40px":"36px"}})),d=styled(Box,{shouldForwardProp:r=>r!=="value"})(({value:r})=>({height:"14px",maxWidth:"36px",minWidth:"20px",background:"#20232B1A",borderRadius:"50px",display:"flex",alignItems:"center",justifyContent:"center",padding:0,...r===0&&{background:"#20232B00"}})),p=styled(Typography,{shouldForwardProp:r=>r!=="value"})(({value:r})=>({fontSize:"8px",fontWeight:700,color:"#FFF",padding:"2px 4px",...r===0&&{color:"#8D8D9480"}}));function s({value:r}){let e=Ic(useId(),"progress-bar"),o=!Number.isInteger(r);return jsx(a,{id:e,"data-testid":"ProgressBar",value:r,isDecimal:o,children:jsx(d,{value:r,children:jsxs(p,{value:r,children:[Number(r.toFixed(2)),"%"]})})})}var I=s;export{I as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Ic}from'./chunk-4NESBBQ5.js';import {oe}from'./chunk-IUXIBZV3.js';import {useId}from'react';import {styled,Box,Typography}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var n=styled(Box,{shouldForwardProp:o=>o!=="toastPosition"})(({theme:o,toastPosition:t})=>({width:160,position:"absolute",bottom:12,zIndex:1e3,display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:o.palette.background.paper,height:31,gap:o.spacing(1),borderRadius:o.shape.borderRadius,borderWidth:1,padding:o.spacing(1),border:`1px solid ${o.palette.divider}`,boxShadow:"0px 0px 16px 0px #00000014",animation:"slideIn 0.5s ease-out",...t==="bottom-center"&&{left:"50%",transform:"translateX(-50%)"},...t==="bottom-right"&&{right:12,transform:"none"},...t==="bottom-left"&&{left:12,transform:"none"},"@keyframes slideIn":{"0%":{opacity:0,transform:t==="bottom-center"?"translate(-50%, 100%)":t==="bottom-right"?"translateX(100%)":"translateX(-100%)"},"100%":{opacity:1,transform:t==="bottom-center"?"translate(-50%, 0)":"translateX(0)"}}})),s=styled("img")({cursor:"pointer"}),p=styled(Typography)(({theme:o})=>({fontSize:11,fontWeight:500,color:o.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}));function g({message:o="Something went wrong",onRetry:t,position:l="bottom-center",iconSrc:m}){let c=Ic(useId(),"error-toast");return jsxs(n,{id:c,"data-testid":"ErrorToast",toastPosition:l,children:[jsx(p,{children:o}),jsx(s,{onClick:f=>t?.(f),src:m||oe,alt:"toast-icon"})]})}var d=g;var v=d;export{v as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Ic}from'./chunk-4NESBBQ5.js';import {memo,useId}from'react';import {Typography}from'@mui/material';import i from'@mui/material/Box';import u,{circularProgressClasses}from'@mui/material/CircularProgress';import {styled,alpha}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var n=styled(u)(({theme:r})=>({color:r.palette.common.blue,background:alpha(r.palette.info.dark,.05),borderRadius:"50%",[`& .${circularProgressClasses.circle}`]:{strokeLinecap:"round"}})),p=styled(Typography)(()=>({fontSize:"14px",fontWeight:700,color:"#3B4152"})),s=styled(i)(()=>({position:"relative",display:"inline-flex"})),l=styled(i)(()=>({top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"}));function c({variant:r="determinate",...t}){let m=Ic(useId(),"circular-progress-with-label");return jsxs(s,{id:m,"data-testid":"CircularProgressWithLabel",children:[jsx(n,{variant:r,...t}),r==="determinate"&&jsx(l,{children:jsx(p,{variant:"caption",color:"text.secondary",children:`${Math.round(t?.value??0)}%`})})]})}c.displayName="CircularProgressWithLabel";var d=memo(c);var z=d;export{z as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-PZY3HICJ.js';import {Ic}from'./chunk-4NESBBQ5.js';import {useId}from'react';import {styled,MenuItem,Menu,ListItemIcon,ListItemText,Select,alpha,useTheme,Divider,Box}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var m=styled(MenuItem,{shouldForwardProp:t=>t!=="alwaysShowRightAction"})(({theme:t,alwaysShowRightAction:n})=>({backgroundColor:n?t.palette.common.lightOrange:"","&:hover":{backgroundColor:n?t.palette.common.lightOrange:"",boxShadow:t.shadows[10],":hover":{"& .sandbox-Icon":{left:"-16px !important",transition:"all 0.3s ease-in-out"},"& .close-Icon":{display:"block !important"}}}})),g=styled(Menu,{shouldForwardProp:t=>t!=="minWidth"})(({theme:t,minWidth:n})=>({".MuiMenu-paper":{borderRadius:4,minWidth:n},".MuiMenuItem-root":{display:"flex",gap:"4px",minHeight:"36px",alignItems:"center",paddingInline:8,transition:t.transitions.create(["visibility"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.complex}),".menu-right-action":{visibility:"hidden"},"&:hover":{".menu-right-action":{visibility:"visible"}}},"&.tap-dropdown":{zIndex:2e3,".MuiList-root":{padding:0}}})),h=styled(ListItemIcon)(()=>({minWidth:"16px !important"})),x=styled(ListItemText)(()=>({".MuiTypography-root":{fontSize:"0.6875rem"}})),D=styled(Select)(({theme:t})=>({padding:"0.25rem 0.34rem 0.25rem 0.5rem",display:"flex",justifyContent:"center",alignItems:"center",gap:"0.19rem",width:"auto",flexShrink:0,borderRadius:"0.5rem",boxShadow:t.shadows[5],cursor:"pointer",outline:t.palette.background.default,border:"none",backgroundColor:t.palette.background.default,"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiMenuList-root":{padding:"0px !important",margin:0},"& .MuiSelect-outlined":{padding:"0px !important"}})),z=styled(MenuItem)(({theme:t})=>({display:"flex",height:"2.5rem",width:"10.43rem",alignItems:"center",gap:"0.5",alignSelf:"stretch",transition:"boxShadow 0.2s ease-in-out",backgroundColor:"inherit !important",margin:0,padding:0,paddingTop:"0px !important",paddingBottom:"0px !important","&:hover":{boxSizing:"border-box",boxShadow:`${t.shadows[3]}`}})),A=styled("p")(({theme:t})=>({color:t.palette.text.primary,fontSize:"0.68rem",fontWeight:600,textAlign:"center",padding:"0 !important",margin:"0 !important",textTransform:"capitalize",".MuiOutlinedInput-input":{paddingRight:0},"MuiInputBase-input":{paddingRight:0},".MuiSelect-select":{paddingRight:0}})),W=styled("p")(({theme:t})=>({fontSize:"0.75rem",fontWeight:500,color:t.palette.text.primary,paddingLeft:"1rem !important",transition:"boxShadow 0.2s ease-in-out"})),B=styled("img")(()=>({width:"0.75rem",height:"auto",padding:0,paddingBottom:.5,margin:0,verticalAlign:"middle",boxSizing:"border-box"})),S=styled(a)(({theme:t})=>({padding:0,paddingRight:"4px",width:"14px !important",svg:{width:"12px !important",height:"12px !important"},"&.Mui-disabled":{'[data-testid="IndeterminateCheckBoxIcon"]':{fill:alpha(t.palette.common.black,.26)}}}));function H({open:t,menuItems:n,anchorEl:a,onClose:d,footer:I,selected:f,multiple:w,allowShadows:p=true,...M}){let k=Ic(useId(),"dropdown-menu"),l=useTheme();return jsxs(g,{id:k,"data-testid":"DropdownMenu",open:t,anchorEl:a,onClose:d,onContextMenu:o=>{o.preventDefault(),d();},...M,className:"tap-dropdown",minWidth:a?.clientWidth||"auto",children:[n.map((o,r)=>o.name==="divider"?jsx(Divider,{sx:{margin:"0 !important"}},`${o.label}-${r}`):jsx("div",{children:o.label&&jsxs(m,{alwaysShowRightAction:o.alwaysShowRightAction,onClick:C=>{o.onClick&&o.onClick(C);},onContextMenu:o.onRightClick,selected:o.selected,sx:{"&:hover":{backgroundColor:"transparent",boxShadow:p?l.shadows[10]:"none","& .sandbox-Icon":{display:"none"},"& .close-Icon":{display:"block !important"}},...r===f&&{backgroundColor:"transparent",boxShadow:p?l.shadows[10]:"none"},...o.sx},children:[w&&jsx(S,{size:"small",checked:o.selected}),o.icon&&jsx(h,{children:o.icon}),jsx(x,{children:o.label}),jsx(Box,{className:o.alwaysShowRightAction?"":"menu-right-action",children:o.rightAction&&o.rightAction})]})},`${o.label}-${r}`)),I]})}var b=H;var Y=b;export{D as a,z as b,A as c,W as d,B as e,Y as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Ic}from'./chunk-4NESBBQ5.js';import {Jc}from'./chunk-IUXIBZV3.js';import {memo,useId}from'react';import d from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var e=styled(d)(({theme:r})=>({fontSize:"10px",color:r.palette.error.light,padding:"8px",background:r.palette.background.gradient.error,borderRadius:"4px",display:"flex",gap:"4px",alignItems:"center",height:32}));function l({error:r,...i}){let n=Ic(useId(),"error");return jsxs(e,{...i,id:n,"data-testid":"Error",children:[jsx("img",{src:Jc,alt:"w"}),r]})}var p=memo(l);var k=p;export{k as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$6}from'./chunk-
|
|
1
|
+
import {a as a$6}from'./chunk-FM4JAAIM.js';import {a,b,f,d,c as c$1,h,i,e}from'./chunk-LMCW646D.js';import {a as a$3}from'./chunk-AR62ECSF.js';import {c,b as b$1,g}from'./chunk-L6Z6VLJ2.js';import {a as a$7}from'./chunk-2LTJGTU4.js';import {a as a$4}from'./chunk-E3RGJZ4K.js';import {a as a$5,b as b$2}from'./chunk-MUR4ILTY.js';import {b as b$3}from'./chunk-U4F32GEP.js';import {a as a$1}from'./chunk-PZY3HICJ.js';import {a as a$2}from'./chunk-GNY2VGGW.js';import {Ic}from'./chunk-4NESBBQ5.js';import {Mc,z as z$1}from'./chunk-IUXIBZV3.js';import*as se from'react';import se__default,{useId,useState,useEffect,useMemo,useRef,useCallback}from'react';import {useFormContext,Controller,FormProvider,useForm}from'react-hook-form';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import oe from'@mui/material/Box';import xt from'@mui/material/Button';import yt from'@mui/material/Input';import ao from'@mui/material/ListSubheader';import lo from'@mui/material/MenuItem';import {keyframes,styled}from'@mui/material/styles';import Pt from'@mui/material/Popper';import Mt from'@mui/material/TextField';function ct({onSubmit:e,methods:t,children:o}){let r=Ic(useId(),"default-form");return jsx(FormProvider,{...t,children:jsx("form",{id:r,"data-testid":"DefaultForm",onSubmit:e,noValidate:true,children:o})})}var pt=se__default.memo(ct);var Qe=se.forwardRef(({name:e,helperText:t,hideArrows:o,feedback:r,...n},i)=>{let{control:s}=useFormContext();return jsx(Controller,{name:e,control:s,defaultValue:n.defaultValue,render:({field:d,fieldState:u})=>jsx(a,{...n,...d,ref:i,hasError:!!u.error,helperText:t??u.error?.message,feedback:r,hideArrows:o,onChange:m=>{d.onChange(m),n.onChange?.(m);},onWheel:m=>{m.target instanceof HTMLElement&&m.target.blur();}})})});Qe.displayName="RFHFormInput";var Xe=se.memo(Qe);var dt=Xe;function eo({phoneName:e,countries:t,countryName:o,helperText:r,isCountriesLoading:n,disabled:i,feedback:s,...d}){let{control:u,watch:m,setValue:f}=useFormContext(),F=m(o),S=x=>{f(o,x);};return jsx(Controller,{name:e,control:u,render:({field:{onChange:x,value:l},fieldState:a})=>jsx(h,{...d,phoneValue:l,countries:t,hasError:!!a.error,helperText:r??a.error?.message,feedback:s,onPhoneChange:h=>{x(h);},disabled:i,countryValue:F,onCountryChange:S,isCountriesLoading:n})})}eo.displayName="RFHPhoneInput";var oo=eo;var ft=oo;var Ce=(e,t)=>e.toFixed(t);function no({amountName:e,currencies:t,currencyName:o,helperText:r,isCurrenciesLoading:n,...i$1}){let{control:s,watch:d,setValue:u}=useFormContext(),m=d(o),f=d(e),F=S=>{u(o,S),u(e,Ce(Number(f),S?.decimals||2));};return jsx(Controller,{name:e,control:s,render:({field:{onChange:S,value:x},fieldState:l})=>jsx(i,{...i$1,amountValue:x??"",currencies:t,hasError:!!l.error,helperText:r??l.error?.message,onAmountChange:a=>{S(a);},onAmountBlur:a=>{S(Ce(Number(a),m?.decimals||2));},currencyValue:m,onCurrencyChange:F,isCurrenciesLoading:n})})}no.displayName="RFHAmountInput";var ro=no;var bt=ro;var Ct=keyframes`
|
|
2
2
|
0% {
|
|
3
3
|
transform: rotate(-90deg);
|
|
4
4
|
}
|
|
@@ -12,4 +12,4 @@ import {a as a$6}from'./chunk-MRIJSE7V.js';import {a,b,f,d,c as c$1,h,i,e}from'.
|
|
|
12
12
|
100% {
|
|
13
13
|
transform: rotate(270deg);
|
|
14
14
|
}
|
|
15
|
-
`,yo=styled(oe)({width:12,height:12,display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:"100%",height:"100%",display:"block"},animation:`${Lt} 2s linear infinite`}),de=styled(oe)(({theme:e})=>({position:"relative",width:11,height:11,transform:"rotate(0deg)",color:e.palette.common.black,"& svg":{width:"100%",height:"100%",display:"block"}})),Fo=styled(z)({paddingTop:"8px"}),Pe=styled("ul")({listStyle:"none",margin:0,padding:0}),Co=styled(lo)(({theme:e})=>({display:"flex",alignItems:"center",gap:"8px",padding:"8px",justifyContent:"space-between",fontSize:"10px",fontWeight:500,cursor:"default",pointerEvents:"none",backgroundColor:e.palette.common.white,"&.Mui-disabled":{opacity:1,color:"#8D8D94"}})),Io=styled(lo,{shouldForwardProp:e=>e!=="$selected"})(({theme:e,$selected:t})=>({fontSize:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),backgroundColor:t?e.palette.action.hover:e.palette.common.white})),me=styled("span")({flex:1,minWidth:0}),he=styled("img")({width:10,height:7.5,flexShrink:0}),Po=styled("li",{shouldForwardProp:e=>!["$selected","$optionDisabled"].includes(String(e))})(({theme:e,$selected:t,$optionDisabled:o})=>({fontSize:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),minHeight:48,paddingLeft:e.spacing(2),paddingRight:e.spacing(2),backgroundColor:t?e.palette.action.hover:e.palette.common.white,"&.Mui-focused":{backgroundColor:e.palette.action.hover},...o&&{opacity:.38,pointerEvents:"none"}})),Me=styled("span")({fontSize:"10px",fontWeight:500,color:"#8D8D94"}),Mo=styled(Mt,{shouldForwardProp:e=>!["feedbackType","hasFeedback","hasLabel"].includes(e)})(({theme:e,error:t,feedbackType:o,hasFeedback:r,hasLabel:n})=>{let{borderColor:i}=o?c(e,o):{borderColor:void 0},s=r?"4px 4px 0 0":"4px";return {width:"100%","& .MuiInputLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)",color:`${e.palette.grey[700]} !important`},"& .MuiInputLabel-root.MuiInputLabel-shrink":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiInputLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiFilledInput-root":{height:"40px",maxHeight:"40px",overflow:"hidden",borderRadius:s,backgroundColor:e.palette.grey[400],paddingTop:n?"11px":"0px",paddingBottom:n?"4px":"0px",paddingLeft:"8px",boxSizing:"border-box",display:"inline-flex",alignItems:n?"stretch":"center","&:before, &:after":{display:"none"},"&:hover":{backgroundColor:e.palette.grey[400]},"&.Mui-focused":{backgroundColor:e.palette.grey[400]},"&.Mui-disabled":{backgroundColor:e.palette.grey[400]}},"& .MuiFilledInput-input":{padding:"0 !important",minHeight:0,height:"auto",boxSizing:"border-box",display:"flex",alignItems:n?"flex-end":"center",alignSelf:n?"flex-end":"center",fontSize:"11px",lineHeight:"11px",color:e.palette.common.black,paddingBottom:n?"1px !important":"0 !important"},"& .MuiFilledInput-root.MuiInputBase-adornedEnd .MuiAutocomplete-input":{flex:"1 1 0%",minWidth:30,width:0,maxWidth:"100%"},"& .MuiAutocomplete-endAdornment":{display:"flex",alignItems:"center",gap:"8px",top:"50%",transform:"translateY(-50%)",right:9},"& .MuiAutocomplete-popupIndicator":{transform:"none",padding:"1px",marginRight:0,marginLeft:0},"& .MuiAutocomplete-popupIndicator.MuiAutocomplete-popupIndicatorOpen":{transform:"none"},"& .MuiAutocomplete-clearIndicator":{visibility:"visible",padding:"1px",marginRight:0,marginLeft:0},...o&&i&&{"& .MuiFilledInput-root":{border:`1px solid ${i}`}},...r&&{"& .MuiFilledInput-root":{borderBottom:"none",borderBottomLeftRadius:0,borderBottomRightRadius:0}},...t&&{"& .MuiFilledInput-root":{border:`1px solid ${e.palette.error.main}`}}}}),go=e=>({display:"flex",alignItems:"center",gap:"8px",padding:"8px",justifyContent:"space-between",fontSize:"10px",fontWeight:500,cursor:"default",pointerEvents:"none",backgroundColor:e.palette.common.white,color:"#8D8D94"}),Ro=styled(Pt,{shouldForwardProp:e=>!["$menuHasLoadingText","$suppressAutocompleteNoOptions","$suppressEmptyMenuSurface"].includes(e)})(({theme:e,$menuHasLoadingText:t,$suppressAutocompleteNoOptions:o,$suppressEmptyMenuSurface:r})=>({"& .MuiPaper-root":r?{boxShadow:"none",border:"none",backgroundColor:"transparent",margin:0,marginTop:0,padding:0,maxHeight:0,minHeight:0,overflow:"hidden",borderRadius:0,pointerEvents:"none"}:{marginTop:4,borderRadius:4,boxShadow:e.shadows[8],border:"1px solid #F2F2F2",backgroundColor:e.palette.common.white},"& .MuiAutocomplete-listbox":{padding:0,...r?{maxHeight:0,minHeight:0,overflow:"hidden"}:{maxHeight:320}},"& .MuiAutocomplete-noOptions":o?{display:"none !important"}:go(e),"& .MuiAutocomplete-loading":{...go(e),...!t&&{display:"none"}}}));function fe({placeholder:e,value:t,onValueChange:o,isLoading:r}){let n=pd(useId(),"form-select-menu-search-input");return jsx(ue,{id:n,"data-testid":"FormSelectMenuSearchInput",placeholder:e,value:t,onChange:i=>o(i.target.value),onKeyDown:i=>i.stopPropagation(),onKeyUp:i=>i.stopPropagation(),disableUnderline:true,fullWidth:true,inputProps:{"aria-label":e},endAdornment:r?jsx(yo,{"aria-hidden":true,children:jsx(b$2,{})}):jsx(de,{"aria-hidden":true,children:jsx(a$5,{})})})}var Se=jsx(Me,{children:"No results found"}),Lo=jsx(Me,{children:"Loading\u2026"});function ge(e,t,o){return t?t(e):o?o(e):e?.label}function Re(e,t,o){let r=t.toLowerCase().trim(),n=(o?o(e):e?.label)??"";return String(n).toLowerCase().includes(r)}function wo(e){return e}function ko(e){let t=se__default.forwardRef(function(r,n){let{children:i,className:s,...d}=r,u=e.current;return u?jsxs(Fragment,{children:[jsx(Fo,{disableSticky:true,children:jsx(fe,{placeholder:u.menuSearchPlaceholder,value:u.searchValue,onValueChange:u.setSearchValue,isLoading:u.isLoading})}),jsx(Pe,{ref:n,className:s,...d,children:i})]}):jsx(Pe,{ref:n,className:s,...d,children:i})});return t.displayName="FormSelectMenuSearchListbox",t}function Oo({menuSearchPlaceholder:e,searchValue:t,onSearchChange:o,isLoading:r,menuHasNoOptionsText:n,menuNoOptionsText:i,optionsWithoutEmptyValue:s,getOptionValue:d,getOptionLabel:u,renderOption:m,isOptionEqualToValue:f,menuHasSelectedCheckMark:F,valueOnly:S,getOptionId:x,field:l}){return jsxs(Fragment,{children:[jsx(z,{disableSticky:true,children:jsx(fe,{placeholder:e,value:t,onValueChange:o,isLoading:r})}),n&&t.trim()&&s.length===0?jsx(Co,{disabled:true,value:"__form_select_no_results__",children:i??Se}):s.map((a,h)=>{let g=f?f(a,l.value):a?.id===l.value?.id,M=ge(a,m,u);return jsxs(Io,{disabled:!!a.disabled,$selected:g,value:(d?d(a):a?.id)??"",onClick:()=>{l.onChange(S?x(a):a);},children:[jsx(me,{children:M}),F&&g?jsx(he,{src:Mc,alt:""}):null]},`form-select-item-${(d?d(a):a?.id)??h}`)})]})}var be={menuHasLoadingText:false,suppressAutocompleteNoOptions:false,suppressEmptyMenuSurface:false};function Et(e,t){e!=null&&(typeof e=="function"?e(t):e.current=t);}function Ht(...e){return t=>{for(let o of e)Et(o,t);}}function Bt(e){let t=o=>{let r=e.current;return jsx(Ro,{...o,$menuHasLoadingText:r.menuHasLoadingText,$suppressAutocompleteNoOptions:r.suppressAutocompleteNoOptions,$suppressEmptyMenuSurface:r.suppressEmptyMenuSurface})};return t.displayName="FormSelectSearchableAutocompletePopper",t}function Eo(e){let t=pd(useId(),"form-select-searchable-field"),o=useRef(null),r=useRef(be);o.current=e.menuSearchable?{searchValue:e.inMenuSearchContextValue.searchValue,setSearchValue:e.inMenuSearchContextValue.setSearchValue,menuSearchPlaceholder:e.inMenuSearchContextValue.menuSearchPlaceholder,isLoading:e.inMenuSearchContextValue.isLoading}:null,r.current=e.searchableAutocompletePopperFlags;let n=useMemo(()=>ko(o),[]),i=useMemo(()=>Bt(r),[]),s=b$1(e.feedback),d$1=!!e.fieldState.error&&!s,u=e.helperText??e.fieldState.error?.message,m=e.internalValue!=null&&e.internalValue!==""&&typeof e.internalValue=="object"?e.internalValue:null,f=e.getOptionLabel??(l=>String(l?.label??"")),F=e.isOptionEqualToValue??((l,a)=>l&&a?l.id===a.id:l===a),S=e.ClearIconComponent??b,x=e.label!=null&&e.label!=="";return jsxs(d,{id:t,"data-testid":"FormSelectSearchableField",children:[jsx(a$4,{...e.autocompleteRest,disableClearable:!e.showClearIcon,clearIcon:jsx(S,{sx:{fontSize:8,width:8,height:8}}),ListboxComponent:e.menuSearchable?n:void 0,PopperComponent:i,options:e.optionsWithClearFilterOnly,value:m,onChange:(l,a,h)=>{if(a==null&&e.onClear&&h==="clear"){e.onClear();return}if(e.valueOnly){let g=a==null?null:e.getOptionId(a);e.field.onChange(g);}else e.field.onChange(a);},onInputChange:(l,a,h)=>{e.setSearchableInputValue(a),(h==="input"||h==="clear")&&e.scheduleSearchNotification(a);},slotProps:e.slotProps??{},filterOptions:e.menuSearchable?e.autocompleteFilterOptions:wo,loading:!!e.isLoading,disabled:!!e.disabled,getOptionLabel:f,getOptionDisabled:l=>!!l.disabled,isOptionEqualToValue:F,renderOption:e.renderAutocompleteOption,noOptionsText:e.menuNoOptionsText??Se,loadingText:e.menuHasLoadingText?e.menuLoadingText??Lo:null,popupIcon:jsx(de,{children:jsx(a$5,{})}),renderInput:l=>{let{inputProps:a,...h}=l,{ref:g,...M}=a;return jsx(Mo,{...h,variant:"filled",label:e.label,placeholder:e.placeholder,required:e.required,error:d$1,helperText:null,feedbackType:s?.type,hasFeedback:!!s,hasLabel:x,inputRef:Ht(g,e.field.ref,e.inputRef),InputProps:{...l.InputProps,disableUnderline:true},inputProps:{...M,name:e.field.name,onBlur:e.field.onBlur}})}}),s?jsx(g,{...s}):jsx(c$1,{children:u})]})}function No(e){let{name:t,helperText:o,feedback:r,menuSearchable:n=false,showClearIcon:i=false,ClearIconComponent:s=b,onClear:d,menuSearchPlaceholder:u="Search",getOptionValue:m,getOptionLabel:f$1,renderOption:F,isOptionEqualToValue:S,options:x,MenuProps:l,valueOnly:a=false,menuHasSelectedCheckMark:h=false,searchable:g=false,onSearchInputChange:M,searchDebounceMs:V=300,minSearchLength:T,menuLoadingText:ye,menuHasLoadingText:b$1=false,menuHasNoOptionsText:R=true,menuNoOptionsText:A,label:te,placeholder:U,required:c,disabled:N,isLoading:L,inputRef:Fe,...K}=e,{control:W}=useFormContext(),[C,G]=useState(""),[Y,j]=useState("");useEffect(()=>{g||j("");},[g]);let Jo=useMemo(()=>({searchValue:C,setSearchValue:G,menuSearchPlaceholder:u,isLoading:!!L}),[C,u,L]),J=useRef(void 0),ne=useRef(M);ne.current=M,useEffect(()=>()=>{J.current&&clearTimeout(J.current);},[]);let Qo=useCallback(p=>{if(!ne.current)return;let y=p.trim();J.current&&clearTimeout(J.current),J.current=setTimeout(()=>{if(y===""){ne.current?.("");return}T!=null&&y.length<T||ne.current?.(y);},V);},[V,T]),D=useMemo(()=>{let p=x??[];return !i||!m?p:p.filter(y=>{let w=m(y);return w!=null&&w!==""})},[i,m,x]),Ae=useMemo(()=>!n||!C.trim()?D:D.filter(p=>Re(p,C,f$1)),[n,C,D,f$1]),Q=useMemo(()=>n?Ae:D,[n,Ae,D]),Xo=useCallback(p=>!n||!C.trim()?p:p.filter(y=>Re(y,C,f$1)),[n,C,f$1]),Zo=useMemo(()=>{if(!g)return be;let p=Y.trim(),y=p.length===0||T!=null&&p.length>0&&p.length<T,w=n&&!!C.trim()&&Q.length===0,H=y&&!w||!R,ae=Q.length>0;return {menuHasLoadingText:b$1,suppressAutocompleteNoOptions:H,suppressEmptyMenuSurface:!ae&&!(!H&&!ae)&&!!!(L&&b$1)}},[g,Y,T,n,C,Q,R,L,b$1]),et={...l,autoFocus:false,disableEnforceFocus:true},re=p=>(m?m(p):p?.id)??"",ot=p=>!a||!p?p:x?.find(y=>re(y)===p)??p,tt=useCallback((p,y,w)=>{let H=ge(y,F,f$1),ae=!!y.disabled;return jsxs(Po,{...p,$selected:w.selected,$optionDisabled:ae,children:[jsx(me,{children:H}),h&&w.selected?jsx(he,{src:Mc,alt:""}):null]})},[f$1,F,h]),Oe={...K};for(let p of ["IconComponent","startComponent"])delete Oe[p];let{slotProps:nt={},...rt}=Oe;return jsx(Controller,{name:t,control:W,render:({field:p,fieldState:y})=>{let w=ot(p.value);return g?jsx(Eo,{menuSearchable:n,inMenuSearchContextValue:Jo,searchableAutocompletePopperFlags:Zo,optionsWithClearFilterOnly:D,autocompleteFilterOptions:Xo,slotProps:nt,autocompleteRest:rt,inputRef:Fe,showClearIcon:i,ClearIconComponent:s,menuHasLoadingText:b$1,menuLoadingText:ye,menuNoOptionsText:A,isLoading:L,disabled:N,label:te,placeholder:U,required:c,valueOnly:a,getOptionId:re,scheduleSearchNotification:Qo,setSearchableInputValue:j,renderAutocompleteOption:tt,onClear:d,feedback:r,helperText:o,field:p,fieldState:y,internalValue:w,getOptionLabel:f$1,isOptionEqualToValue:S}):jsx(f,{...K,...p,label:te,placeholder:U,required:c,disabled:N,isLoading:L,value:w,menuHasSelectedCheckMark:h,showClearIcon:i,ClearIconComponent:s,onClear:d,options:Q,getOptionValue:m,getOptionLabel:f$1,renderOption:F,isOptionEqualToValue:S,hasError:!!y.error,helperText:o??y.error?.message,feedback:r,onChange:H=>p.onChange(a?re(H):H),MenuProps:et,children:n?jsx(Oo,{menuSearchPlaceholder:u,searchValue:C,onSearchChange:G,isLoading:L,menuHasNoOptionsText:R,menuNoOptionsText:A,optionsWithoutEmptyValue:Q,getOptionValue:m,getOptionLabel:f$1,renderOption:F,isOptionEqualToValue:S,menuHasSelectedCheckMark:h,valueOnly:a,getOptionId:re,field:p}):void 0})}})}No.displayName="RFHSelect";var Wo=se__default.memo(No);var we=Wo;function zo({name:e,disabled:t,...o}){let{control:r}=useFormContext();return jsx(Controller,{name:e,control:r,render:({field:{name:n,onBlur:i,onChange:s,value:d,disabled:u}})=>jsx(a$3,{...o,onChange:s,onBlur:i,name:n,disabled:u||t,checked:d??false})})}zo.displayName="RFHSWitch";var qo=se.memo(zo);var _t=qo;var _o=styled(a$2)(({theme:e})=>({fontSize:"10px",color:e.palette.grey[700],fontWeight:600,lineHeight:"10px"}));styled(a$2)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,fontWeight:600,lineHeight:"14.3px",width:200}));var Uo=styled(oe)(()=>({display:"flex",flexDirection:"column",maxHeight:180,overflow:"auto",scrollbarWidth:"thin",scrollbarColor:"#E5E5E5 #E5E5E5"}));styled(yt)(({theme:e})=>({width:"inherit",height:32,padding:"11px 12px",fontSize:"10px",borderRadius:"5px",backgroundColor:"#F9F9F9",border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.info.dark}}));var Ko=styled(oe)(()=>({display:"flex",flexDirection:"column",gap:"8px"}));styled(oe)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap",paddingInlineEnd:"20px"}));styled(oe)(({theme:e,maxWidth:t})=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:`${e.palette.info.dark}1a`,fontSize:"10px",fontWeight:500,cursor:"pointer",...t&&{maxWidth:`${t}%`}}));var Go=styled(a$2)(({theme:e})=>({display:"flex",gap:"8px",alignItems:"center",justifyContent:"space-between",fontSize:"10px",fontWeight:500,color:e.palette.common.black,cursor:"pointer",padding:"8px 20px"}));styled(oe)(({theme:e})=>({width:"100%",flexDirection:"column",border:`1px solid ${e.palette.grey[100]}`,borderRadius:"4px",backgroundColor:e.palette.grey[400]}));function Yt({name:e,options:t,...o}){let r=pd(useId(),"select-with-accordion"),[n,i]=useState(null),[s,d]=useState(0),u=!!n,m=l=>{i(u?null:l.currentTarget);},f=()=>{i(null);},{watch:F,setValue:S}=useFormContext(),x=F(e);return jsx(a$6,{id:r,"data-testid":"SelectWithAccordion",open:u,anchorEl:n,onOpen:m,onClose:f,trigger:jsx(we,{name:e,options:[],...o,open:false}),hideArrow:true,listWrapperSx:{padding:0,margin:0},children:jsx(Ko,{onClick:l=>l.stopPropagation(),onMouseDown:l=>l.stopPropagation(),children:jsx(Uo,{"data-testid":"AccordionWrapper",children:t.map?.((l,a)=>{let h=s===a;return jsx(b$3,{expanded:h,onChange:g=>d(g?a:null),label:jsx(_o,{variant:"caption",children:l.group}),content:(l?.options||[]).map((g,M)=>{let V=o?.isOptionEqualToValue?.(g,x);return jsxs(Go,{onClick:()=>{S(e,g,{shouldDirty:true,shouldTouch:true,shouldValidate:true}),f();},children:[o.renderOption?.(g)||g.label,V&&jsx(a$7,{src:Mc,alt:"blue-check",sx:{width:14,height:10}})]},`${g.value}-${g.label}-${M}`)}),slotProps:{root:{sx:{flexShrink:0,border:0,...h&&{borderBottom:"1px solid #0000001A",borderTop:"1px solid #0000001A"}}},label:{sx:{backgroundColor:h?"#F8F8F8":"#ffffff",borderBottom:"1px solid #0000001A",minHeight:28}},content:{sx:{borderTop:"none"}}}},`${l.group}-group-${a}`)})})})})}var jo=Yt;var Jt=jo;function ke({name:e$1,helperText:t,getOptionValue:o,getOptionLabel:r,renderOption:n,isOptionEqualToValue:i,getOptionDisabled:s,menuSearchable:d=false,menuSearchPlaceholder:u="Search",showCheckbox:m=true,menuHasSelectionSummary:f=false,valueOnly:F=false,options:S,isLoading:x,...l}){let{control:a}=useFormContext(),[h,g]=useState(""),M=b=>(o?o(b):b?.id)??"",V=b=>!F||!b?.length?b??[]:b.map(R=>S?.find(A=>M(A)===R)).filter(Boolean),T=b=>b?.map(M)??[],ye=useMemo(()=>{if(!d||!h.trim())return S??[];let b=h.toLowerCase().trim();return (S??[]).filter(R=>{let A=(r?r(R):R?.label)??"";return String(A).toLowerCase().includes(b)})},[S,d,h,r]);return jsx(Controller,{name:e$1,control:a,defaultValue:[],render:({field:b,fieldState:R})=>{let A=Array.isArray(b.value)?b.value.filter(c=>c!=null).length:0,te=f&&A>0,U=V(b.value);return jsxs(e,{...l,isLoading:x,...b,options:S??[],value:U,getOptionLabel:r,hasError:!!R.error,helperText:t??R.error?.message,onChange:c=>b.onChange(F?T(c):c),MenuProps:{...l.MenuProps,autoFocus:false,disableEnforceFocus:true},children:[d&&jsx(z,{disableSticky:true,children:jsx(ue,{placeholder:u,value:h,onChange:c=>g(c.target.value),onKeyDown:c=>c.stopPropagation(),onKeyUp:c=>c.stopPropagation(),disableUnderline:true,fullWidth:true,inputProps:{"aria-label":u},endAdornment:x?jsx(io,{"aria-hidden":true,children:jsx(b$2,{})}):jsx(mo,{src:z$1,alt:"search"})})}),te&&jsx(so,{disableSticky:true,children:jsxs(po,{children:[jsxs(co,{children:[A," selected"]}),jsx(uo,{type:"button",variant:"text",disableRipple:true,"aria-label":"Clear all selected options",onMouseDown:c=>{c.preventDefault(),c.stopPropagation();},onClick:c=>{c.preventDefault(),c.stopPropagation(),l.onClear?l.onClear():b.onChange([]);},children:"Clear"})]})}),ye?.map(c=>{let N=U?.some(W=>{if(W==null)return false;if(i)return i(c,W);if(o){let Y=o(c),j=o(W);return Y===j||String(Y)===String(j)}let C=c?.id,G=W?.id;return C===G||String(C)===String(G)}),L=s?s(c):false,Fe=r?r(c):c.label,K=n?n(c):Fe;return jsx(fo,{value:(o?o(c):c?.id)??"",disabled:L,$selected:N,children:m?jsxs(ho,{children:[jsx(So,{checked:N,$mutedRect:N&&L}),K]}):K},(o?o(c):c?.id)??"")})]})}})}var tn=useForm;export{pt as a,dt as b,ft as c,bt as d,we as e,_t as f,Jt as g,ke as h,tn as i};
|
|
15
|
+
`,yo=styled(oe)({width:12,height:12,display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:"100%",height:"100%",display:"block"},animation:`${Lt} 2s linear infinite`}),de=styled(oe)(({theme:e})=>({position:"relative",width:11,height:11,transform:"rotate(0deg)",color:e.palette.common.black,"& svg":{width:"100%",height:"100%",display:"block"}})),Fo=styled(z)({paddingTop:"8px"}),Pe=styled("ul")({listStyle:"none",margin:0,padding:0}),Co=styled(lo)(({theme:e})=>({display:"flex",alignItems:"center",gap:"8px",padding:"8px",justifyContent:"space-between",fontSize:"10px",fontWeight:500,cursor:"default",pointerEvents:"none",backgroundColor:e.palette.common.white,"&.Mui-disabled":{opacity:1,color:"#8D8D94"}})),Io=styled(lo,{shouldForwardProp:e=>e!=="$selected"})(({theme:e,$selected:t})=>({fontSize:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),backgroundColor:t?e.palette.action.hover:e.palette.common.white})),me=styled("span")({flex:1,minWidth:0}),he=styled("img")({width:10,height:7.5,flexShrink:0}),Po=styled("li",{shouldForwardProp:e=>!["$selected","$optionDisabled"].includes(String(e))})(({theme:e,$selected:t,$optionDisabled:o})=>({fontSize:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),minHeight:48,paddingLeft:e.spacing(2),paddingRight:e.spacing(2),backgroundColor:t?e.palette.action.hover:e.palette.common.white,"&.Mui-focused":{backgroundColor:e.palette.action.hover},...o&&{opacity:.38,pointerEvents:"none"}})),Me=styled("span")({fontSize:"10px",fontWeight:500,color:"#8D8D94"}),Mo=styled(Mt,{shouldForwardProp:e=>!["feedbackType","hasFeedback","hasLabel"].includes(e)})(({theme:e,error:t,feedbackType:o,hasFeedback:r,hasLabel:n})=>{let{borderColor:i}=o?c(e,o):{borderColor:void 0},s=r?"4px 4px 0 0":"4px";return {width:"100%","& .MuiInputLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)",color:`${e.palette.grey[700]} !important`},"& .MuiInputLabel-root.MuiInputLabel-shrink":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiInputLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiFilledInput-root":{height:"40px",maxHeight:"40px",overflow:"hidden",borderRadius:s,backgroundColor:e.palette.grey[400],paddingTop:n?"11px":"0px",paddingBottom:n?"4px":"0px",paddingLeft:"8px",boxSizing:"border-box",display:"inline-flex",alignItems:n?"stretch":"center","&:before, &:after":{display:"none"},"&:hover":{backgroundColor:e.palette.grey[400]},"&.Mui-focused":{backgroundColor:e.palette.grey[400]},"&.Mui-disabled":{backgroundColor:e.palette.grey[400]}},"& .MuiFilledInput-input":{padding:"0 !important",minHeight:0,height:"auto",boxSizing:"border-box",display:"flex",alignItems:n?"flex-end":"center",alignSelf:n?"flex-end":"center",fontSize:"11px",lineHeight:"11px",color:e.palette.common.black,paddingBottom:n?"1px !important":"0 !important"},"& .MuiFilledInput-root.MuiInputBase-adornedEnd .MuiAutocomplete-input":{flex:"1 1 0%",minWidth:30,width:0,maxWidth:"100%"},"& .MuiAutocomplete-endAdornment":{display:"flex",alignItems:"center",gap:"8px",top:"50%",transform:"translateY(-50%)",right:9},"& .MuiAutocomplete-popupIndicator":{transform:"none",padding:"1px",marginRight:0,marginLeft:0},"& .MuiAutocomplete-popupIndicator.MuiAutocomplete-popupIndicatorOpen":{transform:"none"},"& .MuiAutocomplete-clearIndicator":{visibility:"visible",padding:"1px",marginRight:0,marginLeft:0},...o&&i&&{"& .MuiFilledInput-root":{border:`1px solid ${i}`}},...r&&{"& .MuiFilledInput-root":{borderBottom:"none",borderBottomLeftRadius:0,borderBottomRightRadius:0}},...t&&{"& .MuiFilledInput-root":{border:`1px solid ${e.palette.error.main}`}}}}),go=e=>({display:"flex",alignItems:"center",gap:"8px",padding:"8px",justifyContent:"space-between",fontSize:"10px",fontWeight:500,cursor:"default",pointerEvents:"none",backgroundColor:e.palette.common.white,color:"#8D8D94"}),Ro=styled(Pt,{shouldForwardProp:e=>!["$menuHasLoadingText","$suppressAutocompleteNoOptions","$suppressEmptyMenuSurface"].includes(e)})(({theme:e,$menuHasLoadingText:t,$suppressAutocompleteNoOptions:o,$suppressEmptyMenuSurface:r})=>({"& .MuiPaper-root":r?{boxShadow:"none",border:"none",backgroundColor:"transparent",margin:0,marginTop:0,padding:0,maxHeight:0,minHeight:0,overflow:"hidden",borderRadius:0,pointerEvents:"none"}:{marginTop:4,borderRadius:4,boxShadow:e.shadows[8],border:"1px solid #F2F2F2",backgroundColor:e.palette.common.white},"& .MuiAutocomplete-listbox":{padding:0,...r?{maxHeight:0,minHeight:0,overflow:"hidden"}:{maxHeight:320}},"& .MuiAutocomplete-noOptions":o?{display:"none !important"}:go(e),"& .MuiAutocomplete-loading":{...go(e),...!t&&{display:"none"}}}));function fe({placeholder:e,value:t,onValueChange:o,isLoading:r}){let n=Ic(useId(),"form-select-menu-search-input");return jsx(ue,{id:n,"data-testid":"FormSelectMenuSearchInput",placeholder:e,value:t,onChange:i=>o(i.target.value),onKeyDown:i=>i.stopPropagation(),onKeyUp:i=>i.stopPropagation(),disableUnderline:true,fullWidth:true,inputProps:{"aria-label":e},endAdornment:r?jsx(yo,{"aria-hidden":true,children:jsx(b$2,{})}):jsx(de,{"aria-hidden":true,children:jsx(a$5,{})})})}var Se=jsx(Me,{children:"No results found"}),Lo=jsx(Me,{children:"Loading\u2026"});function ge(e,t,o){return t?t(e):o?o(e):e?.label}function Re(e,t,o){let r=t.toLowerCase().trim(),n=(o?o(e):e?.label)??"";return String(n).toLowerCase().includes(r)}function wo(e){return e}function ko(e){let t=se__default.forwardRef(function(r,n){let{children:i,className:s,...d}=r,u=e.current;return u?jsxs(Fragment,{children:[jsx(Fo,{disableSticky:true,children:jsx(fe,{placeholder:u.menuSearchPlaceholder,value:u.searchValue,onValueChange:u.setSearchValue,isLoading:u.isLoading})}),jsx(Pe,{ref:n,className:s,...d,children:i})]}):jsx(Pe,{ref:n,className:s,...d,children:i})});return t.displayName="FormSelectMenuSearchListbox",t}function Oo({menuSearchPlaceholder:e,searchValue:t,onSearchChange:o,isLoading:r,menuHasNoOptionsText:n,menuNoOptionsText:i,optionsWithoutEmptyValue:s,getOptionValue:d,getOptionLabel:u,renderOption:m,isOptionEqualToValue:f,menuHasSelectedCheckMark:F,valueOnly:S,getOptionId:x,field:l}){return jsxs(Fragment,{children:[jsx(z,{disableSticky:true,children:jsx(fe,{placeholder:e,value:t,onValueChange:o,isLoading:r})}),n&&t.trim()&&s.length===0?jsx(Co,{disabled:true,value:"__form_select_no_results__",children:i??Se}):s.map((a,h)=>{let g=f?f(a,l.value):a?.id===l.value?.id,M=ge(a,m,u);return jsxs(Io,{disabled:!!a.disabled,$selected:g,value:(d?d(a):a?.id)??"",onClick:()=>{l.onChange(S?x(a):a);},children:[jsx(me,{children:M}),F&&g?jsx(he,{src:Mc,alt:""}):null]},`form-select-item-${(d?d(a):a?.id)??h}`)})]})}var be={menuHasLoadingText:false,suppressAutocompleteNoOptions:false,suppressEmptyMenuSurface:false};function Et(e,t){e!=null&&(typeof e=="function"?e(t):e.current=t);}function Ht(...e){return t=>{for(let o of e)Et(o,t);}}function Bt(e){let t=o=>{let r=e.current;return jsx(Ro,{...o,$menuHasLoadingText:r.menuHasLoadingText,$suppressAutocompleteNoOptions:r.suppressAutocompleteNoOptions,$suppressEmptyMenuSurface:r.suppressEmptyMenuSurface})};return t.displayName="FormSelectSearchableAutocompletePopper",t}function Eo(e){let t=Ic(useId(),"form-select-searchable-field"),o=useRef(null),r=useRef(be);o.current=e.menuSearchable?{searchValue:e.inMenuSearchContextValue.searchValue,setSearchValue:e.inMenuSearchContextValue.setSearchValue,menuSearchPlaceholder:e.inMenuSearchContextValue.menuSearchPlaceholder,isLoading:e.inMenuSearchContextValue.isLoading}:null,r.current=e.searchableAutocompletePopperFlags;let n=useMemo(()=>ko(o),[]),i=useMemo(()=>Bt(r),[]),s=b$1(e.feedback),d$1=!!e.fieldState.error&&!s,u=e.helperText??e.fieldState.error?.message,m=e.internalValue!=null&&e.internalValue!==""&&typeof e.internalValue=="object"?e.internalValue:null,f=e.getOptionLabel??(l=>String(l?.label??"")),F=e.isOptionEqualToValue??((l,a)=>l&&a?l.id===a.id:l===a),S=e.ClearIconComponent??b,x=e.label!=null&&e.label!=="";return jsxs(d,{id:t,"data-testid":"FormSelectSearchableField",children:[jsx(a$4,{...e.autocompleteRest,disableClearable:!e.showClearIcon,clearIcon:jsx(S,{sx:{fontSize:8,width:8,height:8}}),ListboxComponent:e.menuSearchable?n:void 0,PopperComponent:i,options:e.optionsWithClearFilterOnly,value:m,onChange:(l,a,h)=>{if(a==null&&e.onClear&&h==="clear"){e.onClear();return}if(e.valueOnly){let g=a==null?null:e.getOptionId(a);e.field.onChange(g);}else e.field.onChange(a);},onInputChange:(l,a,h)=>{e.setSearchableInputValue(a),(h==="input"||h==="clear")&&e.scheduleSearchNotification(a);},slotProps:e.slotProps??{},filterOptions:e.menuSearchable?e.autocompleteFilterOptions:wo,loading:!!e.isLoading,disabled:!!e.disabled,getOptionLabel:f,getOptionDisabled:l=>!!l.disabled,isOptionEqualToValue:F,renderOption:e.renderAutocompleteOption,noOptionsText:e.menuNoOptionsText??Se,loadingText:e.menuHasLoadingText?e.menuLoadingText??Lo:null,popupIcon:jsx(de,{children:jsx(a$5,{})}),renderInput:l=>{let{inputProps:a,...h}=l,{ref:g,...M}=a;return jsx(Mo,{...h,variant:"filled",label:e.label,placeholder:e.placeholder,required:e.required,error:d$1,helperText:null,feedbackType:s?.type,hasFeedback:!!s,hasLabel:x,inputRef:Ht(g,e.field.ref,e.inputRef),InputProps:{...l.InputProps,disableUnderline:true},inputProps:{...M,name:e.field.name,onBlur:e.field.onBlur}})}}),s?jsx(g,{...s}):jsx(c$1,{children:u})]})}function No(e){let{name:t,helperText:o,feedback:r,menuSearchable:n=false,showClearIcon:i=false,ClearIconComponent:s=b,onClear:d,menuSearchPlaceholder:u="Search",getOptionValue:m,getOptionLabel:f$1,renderOption:F,isOptionEqualToValue:S,options:x,MenuProps:l,valueOnly:a=false,menuHasSelectedCheckMark:h=false,searchable:g=false,onSearchInputChange:M,searchDebounceMs:V=300,minSearchLength:T,menuLoadingText:ye,menuHasLoadingText:b$1=false,menuHasNoOptionsText:R=true,menuNoOptionsText:A,label:te,placeholder:U,required:c,disabled:N,isLoading:L,inputRef:Fe,...K}=e,{control:W}=useFormContext(),[C,G]=useState(""),[Y,j]=useState("");useEffect(()=>{g||j("");},[g]);let Jo=useMemo(()=>({searchValue:C,setSearchValue:G,menuSearchPlaceholder:u,isLoading:!!L}),[C,u,L]),J=useRef(void 0),ne=useRef(M);ne.current=M,useEffect(()=>()=>{J.current&&clearTimeout(J.current);},[]);let Qo=useCallback(p=>{if(!ne.current)return;let y=p.trim();J.current&&clearTimeout(J.current),J.current=setTimeout(()=>{if(y===""){ne.current?.("");return}T!=null&&y.length<T||ne.current?.(y);},V);},[V,T]),D=useMemo(()=>{let p=x??[];return !i||!m?p:p.filter(y=>{let w=m(y);return w!=null&&w!==""})},[i,m,x]),Ae=useMemo(()=>!n||!C.trim()?D:D.filter(p=>Re(p,C,f$1)),[n,C,D,f$1]),Q=useMemo(()=>n?Ae:D,[n,Ae,D]),Xo=useCallback(p=>!n||!C.trim()?p:p.filter(y=>Re(y,C,f$1)),[n,C,f$1]),Zo=useMemo(()=>{if(!g)return be;let p=Y.trim(),y=p.length===0||T!=null&&p.length>0&&p.length<T,w=n&&!!C.trim()&&Q.length===0,H=y&&!w||!R,ae=Q.length>0;return {menuHasLoadingText:b$1,suppressAutocompleteNoOptions:H,suppressEmptyMenuSurface:!ae&&!(!H&&!ae)&&!!!(L&&b$1)}},[g,Y,T,n,C,Q,R,L,b$1]),et={...l,autoFocus:false,disableEnforceFocus:true},re=p=>(m?m(p):p?.id)??"",ot=p=>!a||!p?p:x?.find(y=>re(y)===p)??p,tt=useCallback((p,y,w)=>{let H=ge(y,F,f$1),ae=!!y.disabled;return jsxs(Po,{...p,$selected:w.selected,$optionDisabled:ae,children:[jsx(me,{children:H}),h&&w.selected?jsx(he,{src:Mc,alt:""}):null]})},[f$1,F,h]),Oe={...K};for(let p of ["IconComponent","startComponent"])delete Oe[p];let{slotProps:nt={},...rt}=Oe;return jsx(Controller,{name:t,control:W,render:({field:p,fieldState:y})=>{let w=ot(p.value);return g?jsx(Eo,{menuSearchable:n,inMenuSearchContextValue:Jo,searchableAutocompletePopperFlags:Zo,optionsWithClearFilterOnly:D,autocompleteFilterOptions:Xo,slotProps:nt,autocompleteRest:rt,inputRef:Fe,showClearIcon:i,ClearIconComponent:s,menuHasLoadingText:b$1,menuLoadingText:ye,menuNoOptionsText:A,isLoading:L,disabled:N,label:te,placeholder:U,required:c,valueOnly:a,getOptionId:re,scheduleSearchNotification:Qo,setSearchableInputValue:j,renderAutocompleteOption:tt,onClear:d,feedback:r,helperText:o,field:p,fieldState:y,internalValue:w,getOptionLabel:f$1,isOptionEqualToValue:S}):jsx(f,{...K,...p,label:te,placeholder:U,required:c,disabled:N,isLoading:L,value:w,menuHasSelectedCheckMark:h,showClearIcon:i,ClearIconComponent:s,onClear:d,options:Q,getOptionValue:m,getOptionLabel:f$1,renderOption:F,isOptionEqualToValue:S,hasError:!!y.error,helperText:o??y.error?.message,feedback:r,onChange:H=>p.onChange(a?re(H):H),MenuProps:et,children:n?jsx(Oo,{menuSearchPlaceholder:u,searchValue:C,onSearchChange:G,isLoading:L,menuHasNoOptionsText:R,menuNoOptionsText:A,optionsWithoutEmptyValue:Q,getOptionValue:m,getOptionLabel:f$1,renderOption:F,isOptionEqualToValue:S,menuHasSelectedCheckMark:h,valueOnly:a,getOptionId:re,field:p}):void 0})}})}No.displayName="RFHSelect";var Wo=se__default.memo(No);var we=Wo;function zo({name:e,disabled:t,...o}){let{control:r}=useFormContext();return jsx(Controller,{name:e,control:r,render:({field:{name:n,onBlur:i,onChange:s,value:d,disabled:u}})=>jsx(a$3,{...o,onChange:s,onBlur:i,name:n,disabled:u||t,checked:d??false})})}zo.displayName="RFHSWitch";var qo=se.memo(zo);var _t=qo;var _o=styled(a$2)(({theme:e})=>({fontSize:"10px",color:e.palette.grey[700],fontWeight:600,lineHeight:"10px"}));styled(a$2)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,fontWeight:600,lineHeight:"14.3px",width:200}));var Uo=styled(oe)(()=>({display:"flex",flexDirection:"column",maxHeight:180,overflow:"auto",scrollbarWidth:"thin",scrollbarColor:"#E5E5E5 #E5E5E5"}));styled(yt)(({theme:e})=>({width:"inherit",height:32,padding:"11px 12px",fontSize:"10px",borderRadius:"5px",backgroundColor:"#F9F9F9",border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.info.dark}}));var Ko=styled(oe)(()=>({display:"flex",flexDirection:"column",gap:"8px"}));styled(oe)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap",paddingInlineEnd:"20px"}));styled(oe)(({theme:e,maxWidth:t})=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:`${e.palette.info.dark}1a`,fontSize:"10px",fontWeight:500,cursor:"pointer",...t&&{maxWidth:`${t}%`}}));var Go=styled(a$2)(({theme:e})=>({display:"flex",gap:"8px",alignItems:"center",justifyContent:"space-between",fontSize:"10px",fontWeight:500,color:e.palette.common.black,cursor:"pointer",padding:"8px 20px"}));styled(oe)(({theme:e})=>({width:"100%",flexDirection:"column",border:`1px solid ${e.palette.grey[100]}`,borderRadius:"4px",backgroundColor:e.palette.grey[400]}));function Yt({name:e,options:t,...o}){let r=Ic(useId(),"select-with-accordion"),[n,i]=useState(null),[s,d]=useState(0),u=!!n,m=l=>{i(u?null:l.currentTarget);},f=()=>{i(null);},{watch:F,setValue:S}=useFormContext(),x=F(e);return jsx(a$6,{id:r,"data-testid":"SelectWithAccordion",open:u,anchorEl:n,onOpen:m,onClose:f,trigger:jsx(we,{name:e,options:[],...o,open:false}),hideArrow:true,listWrapperSx:{padding:0,margin:0},children:jsx(Ko,{onClick:l=>l.stopPropagation(),onMouseDown:l=>l.stopPropagation(),children:jsx(Uo,{"data-testid":"AccordionWrapper",children:t.map?.((l,a)=>{let h=s===a;return jsx(b$3,{expanded:h,onChange:g=>d(g?a:null),label:jsx(_o,{variant:"caption",children:l.group}),content:(l?.options||[]).map((g,M)=>{let V=o?.isOptionEqualToValue?.(g,x);return jsxs(Go,{onClick:()=>{S(e,g,{shouldDirty:true,shouldTouch:true,shouldValidate:true}),f();},children:[o.renderOption?.(g)||g.label,V&&jsx(a$7,{src:Mc,alt:"blue-check",sx:{width:14,height:10}})]},`${g.value}-${g.label}-${M}`)}),slotProps:{root:{sx:{flexShrink:0,border:0,...h&&{borderBottom:"1px solid #0000001A",borderTop:"1px solid #0000001A"}}},label:{sx:{backgroundColor:h?"#F8F8F8":"#ffffff",borderBottom:"1px solid #0000001A",minHeight:28}},content:{sx:{borderTop:"none"}}}},`${l.group}-group-${a}`)})})})})}var jo=Yt;var Jt=jo;function ke({name:e$1,helperText:t,getOptionValue:o,getOptionLabel:r,renderOption:n,isOptionEqualToValue:i,getOptionDisabled:s,menuSearchable:d=false,menuSearchPlaceholder:u="Search",showCheckbox:m=true,menuHasSelectionSummary:f=false,valueOnly:F=false,options:S,isLoading:x,...l}){let{control:a}=useFormContext(),[h,g]=useState(""),M=b=>(o?o(b):b?.id)??"",V=b=>!F||!b?.length?b??[]:b.map(R=>S?.find(A=>M(A)===R)).filter(Boolean),T=b=>b?.map(M)??[],ye=useMemo(()=>{if(!d||!h.trim())return S??[];let b=h.toLowerCase().trim();return (S??[]).filter(R=>{let A=(r?r(R):R?.label)??"";return String(A).toLowerCase().includes(b)})},[S,d,h,r]);return jsx(Controller,{name:e$1,control:a,defaultValue:[],render:({field:b,fieldState:R})=>{let A=Array.isArray(b.value)?b.value.filter(c=>c!=null).length:0,te=f&&A>0,U=V(b.value);return jsxs(e,{...l,isLoading:x,...b,options:S??[],value:U,getOptionLabel:r,hasError:!!R.error,helperText:t??R.error?.message,onChange:c=>b.onChange(F?T(c):c),MenuProps:{...l.MenuProps,autoFocus:false,disableEnforceFocus:true},children:[d&&jsx(z,{disableSticky:true,children:jsx(ue,{placeholder:u,value:h,onChange:c=>g(c.target.value),onKeyDown:c=>c.stopPropagation(),onKeyUp:c=>c.stopPropagation(),disableUnderline:true,fullWidth:true,inputProps:{"aria-label":u},endAdornment:x?jsx(io,{"aria-hidden":true,children:jsx(b$2,{})}):jsx(mo,{src:z$1,alt:"search"})})}),te&&jsx(so,{disableSticky:true,children:jsxs(po,{children:[jsxs(co,{children:[A," selected"]}),jsx(uo,{type:"button",variant:"text",disableRipple:true,"aria-label":"Clear all selected options",onMouseDown:c=>{c.preventDefault(),c.stopPropagation();},onClick:c=>{c.preventDefault(),c.stopPropagation(),l.onClear?l.onClear():b.onChange([]);},children:"Clear"})]})}),ye?.map(c=>{let N=U?.some(W=>{if(W==null)return false;if(i)return i(c,W);if(o){let Y=o(c),j=o(W);return Y===j||String(Y)===String(j)}let C=c?.id,G=W?.id;return C===G||String(C)===String(G)}),L=s?s(c):false,Fe=r?r(c):c.label,K=n?n(c):Fe;return jsx(fo,{value:(o?o(c):c?.id)??"",disabled:L,$selected:N,children:m?jsxs(ho,{children:[jsx(So,{checked:N,$mutedRect:N&&L}),K]}):K},(o?o(c):c?.id)??"")})]})}})}var tn=useForm;export{pt as a,dt as b,ft as c,bt as d,we as e,_t as f,Jt as g,ke as h,tn as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Ic}from'./chunk-4NESBBQ5.js';import {useId}from'react';import a from'@mui/material/Box';import {motion}from'framer-motion';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var e=styled(motion.div)(()=>({width:"100%",height:"100%",cursor:"pointer",".card-front > div, .card-back > div, .card-container":{width:"inherit",height:"inherit"},".card-container":{perspective:"1000px"},".card":{width:"100%",height:"100%",position:"relative",transformStyle:"preserve-3d"},".card-front, .card-back":{position:"absolute",backfaceVisibility:"hidden",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},".card-back":{transform:"rotateY(180deg)"}}));function t({frontCard:d,backCard:n,isFlipped:p,isHovered:c}){let m=Ic(useId(),"flipping-card");return jsx(e,{id:m,"data-testid":"FlippingCard",children:jsx(motion.div,{className:"card-container",children:jsxs(motion.div,{className:"card",animate:{rotateY:p?180:c?20:0},transition:{duration:.3},children:[jsx(motion.div,{className:"card-front",children:jsx(a,{children:d})}),jsx(motion.div,{className:"card-back",children:jsx(a,{children:n})})]})})})}var N=t;export{N as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-KW7K557I.js';import {a}from'./chunk-R77L45PQ.js';import {a as a$2}from'./chunk-F6QSKDIU.js';import {Ic}from'./chunk-4NESBBQ5.js';import {zb}from'./chunk-IUXIBZV3.js';import {Box}from'@mui/material';import r from'@mui/material/Box';import {styled}from'@mui/material/styles';import {useId,useState}from'react';import {jsxs,jsx}from'react/jsx-runtime';var h=styled(r,{shouldForwardProp:o=>o!=="open"})(({theme:o,open:a})=>({minWidth:105,height:32,cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"1px",border:`1px solid ${o.palette.divider}`,borderRadius:"4px",padding:"7px 8px",paddingRight:"4px",...a&&{boxShadow:o.shadows[7],borderColor:o.palette.info.dark}})),w=styled(r)(()=>({display:"flex",flexDirection:"column",gap:"1px"})),b=styled(r)(()=>({fontWeight:600,fontSize:"8px",color:"#8D8D94"})),v=styled(r)(({theme:o})=>({fontWeight:500,fontSize:"11px",lineHeight:1.1,color:o.palette.text.primary}));function i({defaultValue:o,label:a$3,onChange:D,options:l}){let M=Ic(useId(),"dropdown2"),[d,s]=useState(null),[y,E]=useState(o),t=!!d,W=e=>{t||s(e.currentTarget);},m=()=>{t&&s(null);},k=e=>{E(e),D?.(e),m();};return jsxs(h,{onClick:W,open:t,id:M,"data-testid":"Dropdown2",children:[jsxs(w,{children:[jsx(b,{children:a$3}),jsx(v,{children:y})]}),jsx(Box,{component:"img",src:zb,alt:"down arrow",sx:{width:15,...t&&{transform:"rotate(180deg)"}}}),jsx(a,{open:t,anchorEl:d,sx:{minWidth:105,marginTop:"8px",marginBottom:"8px"},placement:"top",children:l.map((e,B)=>jsx(a$1,{onClick:()=>{k(e.value);},sx:T=>({...B!==l.length-1&&{borderBottom:`1px solid ${T.palette.divider}`}}),children:e.label},e.value))}),t&&jsx(a$2,{onClick:m})]})}var Q=i;export{Q as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Ic}from'./chunk-4NESBBQ5.js';import {memo,useId}from'react';import {Box}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import W from'@mui/material/Accordion';import $ from'@mui/material/AccordionDetails';import T from'@mui/material/AccordionSummary';import {styled}from'@mui/material/styles';function f({sx:o}){return jsx(Box,{component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",transform:"rotate(0deg)",...o},children:jsx("svg",{width:"9",height:"5",viewBox:"0 0 9 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{d:"M0.0501709 0.427246C0.0493864 0.478467 0.0592757 0.529176 0.0784912 0.57666C0.0976579 0.623937 0.125505 0.667471 0.161499 0.703613L3.82556 4.47803C3.86116 4.51465 3.90353 4.54403 3.95056 4.56396C3.99773 4.58391 4.04876 4.59422 4.09998 4.59424C4.15123 4.59424 4.20218 4.58392 4.24939 4.56396C4.29655 4.54401 4.33969 4.51476 4.37537 4.47803L8.03845 0.703613C8.07407 0.667816 8.10232 0.625348 8.12146 0.578613C8.14069 0.531638 8.15017 0.480932 8.14978 0.430176C8.14935 0.379519 8.13942 0.329298 8.11951 0.282715C8.09956 0.236042 8.06999 0.19405 8.03357 0.158691C7.99716 0.123349 7.95384 0.0952198 7.90662 0.0766602C7.8595 0.0582058 7.80878 0.0491929 7.75818 0.050293C7.70763 0.0514427 7.65792 0.0629948 7.61169 0.0834961C7.56537 0.104067 7.52346 0.13358 7.48865 0.17041L4.09998 3.65967L0.711304 0.17041C0.65912 0.115154 0.592066 0.0759001 0.517944 0.059082C0.443585 0.0422622 0.365385 0.0481013 0.294312 0.0756836C0.22324 0.103266 0.162075 0.15178 0.11853 0.214355C0.0750125 0.276905 0.05135 0.351058 0.0501709 0.427246Z",fill:"#20232B",stroke:"#20232B",strokeWidth:"0.1"})})})}f.displayName="AccordionExpandIcon";var i=memo(f);var A="#f2f2f2",G="#fbfbfb",u=styled(W)(({theme:o})=>({overflow:"hidden",border:`1px solid ${A}`,borderWidth:1,borderRadius:o.shape.borderRadius,margin:0,background:o.palette.background.paper,"&:before":{content:"unset"},"&.Mui-expanded":{margin:0}})),g=styled(T)(()=>({background:G,minHeight:"40px",height:"40px",padding:"10px","&.Mui-expanded":{minHeight:"40px",height:"40px"},"& .MuiAccordionSummary-content":{margin:0,display:"flex",flexDirection:"row",alignItems:"center",flexGrow:1,minWidth:0,gap:10},"& .MuiAccordionSummary-expandIconWrapper":{marginLeft:8}})),h=styled($)(()=>({padding:0,borderTop:`1px solid ${A}`}));function C({expanded:o,onChange:I,label:w,content:S,labelStartAdornment:a,labelEndAdornment:p,slotProps:r={},disabled:L=false,expandIcon:B}){let e=Ic(useId()),E=`accordion-${e}`,l=`accordion-content-${e}`,s=`accordion-label-${e}`,{showArrow:m,...P}=r?.label??{},R=m===true||m===void 0,k=jsxs(Fragment,{children:[a!=null&&jsx(Box,{component:"span",sx:{flexShrink:0},children:a}),jsx(Box,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:w}),p!=null&&jsx(Box,{component:"span",sx:{flexShrink:0,marginLeft:"auto"},children:p})]}),v=B??(R?jsx(i,{}):null);return jsxs(u,{id:E,"data-testid":"Accordion",disabled:L,expanded:o,onChange:()=>I(!o),...r.root,children:[jsx(g,{"aria-controls":l,"aria-expanded":o,expandIcon:v,id:s,...P,children:k}),jsx(h,{id:l,role:"region","aria-labelledby":s,...r.content,children:S})]})}C.displayName="Accordion";var b=memo(C);var io=b;
|
|
2
2
|
export{i as a,io as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-ET4XPMUX.js';import {Ic}from'./chunk-4NESBBQ5.js';import {createContext,useState,useMemo,useContext,useId}from'react';import {styled,Button}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var u=styled("div")(({theme:o})=>({display:"flex",flexDirection:"column",gap:o.spacing(2),minWidth:"256px",padding:"16px"})),y=styled("p")(({theme:o})=>({fontSize:"13px",fontWeight:700,lineHeight:o.typography.h6.lineHeight,borderBottom:`1px solid ${o.palette.divider}`,margin:0,padding:"16px 16px 16px 12px",color:o.palette.text.primary})),P=styled("p")(({theme:o})=>({fontSize:o.typography.fontSize,fontWeight:o.typography.fontWeightMedium,lineHeight:o.typography.body1.lineHeight,margin:0})),h=styled("div")(({theme:o})=>({display:"flex",gap:o.spacing(1),justifyContent:"flex-end"})),c=styled(Button)(({theme:o})=>({paddingInline:o.spacing(3),paddingBlock:o.spacing(1),borderRadius:o.spacing(.5),fontSize:"11px",fontWeight:o.typography.fontWeightMedium,boxShadow:"none",border:`1px solid ${o.palette.divider}`,color:o.palette.text.primary,textTransform:"none","&:hover":{boxShadow:"none"}}));var r=createContext([{onClose:()=>{},open:false,message:"",title:"",confirmText:"",cancelText:"",onConfirm:()=>{},onCancel:()=>{}},()=>{}]);function E({children:o}){let[i,e]=useState({onClose:()=>{},open:false,message:"",title:"",onConfirm:()=>{},onCancel:()=>{},cancelText:"",confirmText:""}),t=useMemo(()=>[i,e],[i]);return jsxs(r.Provider,{value:t,children:[o,jsx(S,{})]})}var v=()=>{let[o,i]=useContext(r);return {...o,isConfirmed:({message:t,title:l,confirmText:p,cancelText:m,style:s})=>new Promise((g,T)=>{i({...o,open:true,message:t,title:l,cancelText:m,confirmText:p,style:s,onConfirm:g,onCancel:T});}).then(()=>(i({...o,open:false}),true),()=>(i({...o,open:false}),false))}};function d(){let o=Ic(useId(),"confirm-dialog"),{open:i,onClose:e,onConfirm:t,onCancel:l,confirmText:p,cancelText:m,message:s,title:f,style:g}=v();return jsxs(a,{open:i,onClose:e,sx:g,id:o,"data-testid":"ConfirmDialog",children:[f&&jsx(y,{className:"title",children:f}),jsxs(u,{children:[jsx(P,{className:"message",children:s}),jsxs(h,{children:[jsx(c,{className:"cancel",onClick:l,children:m||"No"}),jsx(c,{className:"confirm",onClick:t,children:p||"Yes"})]})]})]})}var S=d;export{r as a,E as b,v as c,S as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Ic}from'./chunk-4NESBBQ5.js';import {w}from'./chunk-IUXIBZV3.js';import {memo,useId,useCallback}from'react';import {Slider}from'@mui/material';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var p=["0px 0px 1.25px 0px rgba(0, 0, 0, 0.1)","0px 1.25px 1.25px 0px rgba(0, 0, 0, 0.09)","0px 3.75px 2.5px 0px rgba(0, 0, 0, 0.05)","0px 7.5px 2.5px 0px rgba(0, 0, 0, 0.01)","0px 11.25px 3.75px 0px rgba(0, 0, 0, 0)"].join(", "),d=styled(Slider)(({theme:e})=>({color:e.palette.info.dark,height:8,padding:0,"& .MuiSlider-rail":{backgroundColor:"#CFCFCF",opacity:1},"& .MuiSlider-thumb":{height:20,width:20,backgroundColor:e.palette.common.white,border:"none",backgroundImage:`url(${w})`,backgroundRepeat:"no-repeat",backgroundPosition:"center",boxShadow:p,"&:focus, &:hover, &.Mui-active, &.Mui-focusVisible":{boxShadow:p}}}));function t({value:e,min:a,max:n,step:l,disabled:m,onChange:r}){let u=Ic(useId(),"slider"),b=useCallback((k,x)=>{r(x);},[r]);return jsx(d,{id:u,"data-testid":"Slider",value:e,min:a,max:n,step:l,disabled:m,onChange:b})}t.displayName="Slider";var h=memo(t);export{h as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-3X4ZBS7U.js';import {e}from'./chunk-M6MHR2UM.js';import {Ic}from'./chunk-4NESBBQ5.js';import {Fg}from'./chunk-IUXIBZV3.js';import {memo,useId}from'react';import {styled,Box}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var l=styled(Box,{shouldForwardProp:t=>t!=="isLongLabel"})(({theme:t,isLongLabel:i})=>({display:"flex",justifyContent:"center",alignItems:"center",padding:"6px 16px",height:"32px",background:t.palette.background.gradient.shadedBlue,color:t.palette.common.white,borderRadius:"50px",fontSize:"11px",gap:t.spacing(1),minWidth:i?"12rem":"8.4rem",marginRight:"auto",position:"relative"}));function u({ids:t,visible:i,label:o,onDismiss:d,dismissible:m=true}){let c=Ic(useId(),"active-filter-chip");return i?jsxs(l,{id:c,"data-testid":"ActiveFilterChip",isLongLabel:(o?.length??0)>11,children:[o?jsx(b,{children:o}):jsx("span",{children:t?.join(",")}),m&&jsx(e,{pointer:true,round:true,onClick:d,variant:"active",sx:{position:"absolute",right:"8px"},children:jsx("img",{src:Fg,alt:"close",style:{width:"8px",height:"7px"}})})]}):null}var s=memo(u);var N=s;export{N as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import'./chunk-
|
|
1
|
+
import'./chunk-AOSZKAOT.js';import {b as b$1}from'./chunk-U4F32GEP.js';import {Ic}from'./chunk-4NESBBQ5.js';import {memo,useId,useState,useEffect}from'react';import d from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsx,Fragment}from'react/jsx-runtime';var s="32px";var f=styled(d,{shouldForwardProp:e=>e!=="isMaximized"})(({theme:e,isMaximized:r})=>({background:alpha(e.palette.common.white,.7),backdropFilter:"blur(8px)",width:183,position:"sticky",padding:"16px 8px",paddingTop:r?s:"16px",height:"100%",overflow:"auto"})),b=styled(d)(()=>({display:"flex",flexDirection:"column",gap:"8px"})),g=styled(d,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:r})=>({background:r?"linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)":"transparent",borderRadius:"4px",padding:"4px 8px",color:r?e.palette.common.white:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px",cursor:"pointer",fontWeight:600})),S=styled(d,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:r})=>({background:r?"#FFFFFF":"transparent",borderRadius:"4px",padding:"4px 8px",color:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px",cursor:"pointer",fontWeight:600}));function H({sections:e,isMaximized:r,onClick:x,activeSection:h,activeSubSection:E}){let A=Ic(useId(),"expandable-side-bar"),i=h||e?.[0]?.id,k=E||e?.[0]?.subSections?.[0]?.id,[I,c]=useState({});return useEffect(()=>{e?.length&&c(t=>{let o=false,a={...t};for(let l of e)l.id in a||(a[l.id]=i===l.id,o=true);return o?a:t});},[e,i]),useEffect(()=>{i&&c(t=>({...t,[i]:true}));},[i]),jsx(f,{isMaximized:r,id:A,"data-testid":"ExpandableSideBar",children:jsx(b,{children:e?.map(t=>jsx(b$1,{expanded:I[t.id]??false,onChange:o=>c(a=>({...a,[t.id]:o})),label:jsx(S,{onClick:()=>{x?.(t.id,t.subSections?.[0]?.id);},isActive:i===t.id,children:t.title}),content:jsx(Fragment,{children:t.subSections?.map(o=>jsx(g,{onClick:()=>{x?.(t.id,o.id);},isActive:k===o.id,children:o.title},`${t.id}-${o.id}`))}),slotProps:{root:{component:"section",sx:{background:"transparent",border:"none !important","&.MuiAccordion-root":{borderRadius:"4px !important"}}},label:{sx:{padding:0,paddingRight:1,minHeight:0,marginBottom:"4px",borderRadius:"4px !important","& .MuiAccordionSummary-content":{margin:"0 !important"}}},content:{sx:{borderTop:"none",padding:0}}}},`${t.id}`))})})}var B=memo(H);var K=B;export{K as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {Ic}from'./chunk-4NESBBQ5.js';import {useId}from'react';import r from'@mui/material/Collapse';import {jsx}from'react/jsx-runtime';function o({children:e,...l}){let t=Ic(useId(),"collapse");return jsx(r,{id:t,"data-testid":"Collapse",unmountOnExit:true,timeout:500,...l,children:e})}var I=o;export{I as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Ic}from'./chunk-4NESBBQ5.js';import {useId,useState,useRef,useCallback,useEffect}from'react';import v from'@mui/material/Stack';import {jsx}from'react/jsx-runtime';var E=50,g=(t,s=E)=>{let e=t.scrollTop+t.clientHeight;return t.scrollHeight-e<=s},H=t=>{let{component:s=v,loadMoreItems:e,hasMore:l,loading:i,isFetchingNextPage:a,children:S,...R}=t,C=Ic(useId(),"scroll-loader"),[m,L]=useState(false),p=useRef(e),r=useRef(null);p.current=e;let k=s,n=useCallback(()=>{l&&!a&&p.current();},[l,a]),c=useCallback(()=>{let o=r.current;if(!o)return;g(o)&&n();},[n]);return useEffect(()=>{let o=r.current;if(o)return o.addEventListener("scroll",c),()=>o.removeEventListener("scroll",c)},[c]),useEffect(()=>{let o=r.current;if(!o||i||m)return;let d=setTimeout(()=>{L(true),g(o)&&n();},1e3);return ()=>{clearTimeout(d);}},[i,n,m]),jsx(k,{id:C,"data-testid":"ScrollLoader",overflow:"auto",ref:r,style:{overflow:"auto",height:"100%",maxHeight:"100%"},...R,children:S})},I=H;var q=I;export{q as a};
|