@tap-payments/auth-jsconnect 2.1.100-test → 2.2.0
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/@types/app.d.ts +298 -7
- package/build/@types/app.js +12 -0
- package/build/@types/form.d.ts +29 -26
- package/build/@types/redux.d.ts +4 -0
- package/build/@types/theme.d.ts +1 -1
- package/build/@types/user.d.ts +39 -3
- package/build/api/account.d.ts +2 -2
- package/build/api/auth.d.ts +11 -11
- package/build/api/availabilityServices.d.ts +3 -3
- package/build/api/axios.js +1 -1
- package/build/api/board.d.ts +3 -3
- package/build/api/brand.d.ts +7 -0
- package/build/api/brand.js +10 -1
- package/build/api/country.d.ts +1 -1
- package/build/api/data.d.ts +18 -10
- package/build/api/data.js +34 -2
- package/build/api/document.d.ts +25 -0
- package/build/api/document.js +38 -0
- package/build/api/entity.d.ts +24 -24
- package/build/api/entity.js +22 -5
- package/build/api/file.d.ts +2 -1
- package/build/api/file.js +14 -1
- package/build/api/index.d.ts +36 -6
- package/build/api/index.js +5 -1
- package/build/api/individual.d.ts +32 -14
- package/build/api/individual.js +9 -1
- package/build/api/init.d.ts +16 -0
- package/build/api/init.js +13 -0
- package/build/api/lead.d.ts +18 -11
- package/build/api/lead.js +9 -1
- package/build/api/operator.d.ts +1 -1
- package/build/api/operator.js +1 -1
- package/build/api/user.d.ts +2 -2
- package/build/app/settings.d.ts +19 -9
- package/build/app/settings.js +69 -24
- package/build/app/store.d.ts +4 -4
- package/build/assets/locales/ar.json +27 -1
- package/build/assets/locales/en.json +27 -1
- package/build/components/AnimationFlow/AnimationFlow.d.ts +4 -2
- package/build/components/AnimationFlow/AnimationFlow.js +4 -4
- package/build/components/AnimationFlow/BottomSheet.d.ts +4 -1
- package/build/components/AnimationFlow/BottomSheet.js +43 -19
- package/build/components/AnimationFlow/Dialog.d.ts +4 -2
- package/build/components/AnimationFlow/Dialog.js +30 -7
- package/build/components/DatePicker/DatePicker.d.ts +3 -1
- package/build/components/DatePicker/DatePicker.js +20 -15
- package/build/components/LogoBadge/LogoBadge.js +3 -0
- package/build/components/RadioGroup/RadioGroup.d.ts +5 -2
- package/build/components/RadioGroup/RadioGroup.js +5 -9
- package/build/components/RadioGroup/index.d.ts +1 -1
- package/build/components/SimpleList/SimpleList.d.ts +5 -2
- package/build/components/SimpleList/SimpleList.js +31 -11
- package/build/components/Slide/Slide.d.ts +1 -1
- package/build/constants/api.d.ts +7 -0
- package/build/constants/api.js +14 -1
- package/build/constants/app.d.ts +45 -0
- package/build/constants/app.js +101 -52
- package/build/constants/assets.d.ts +7 -0
- package/build/constants/assets.js +7 -0
- package/build/constants/validation.d.ts +1 -0
- package/build/constants/validation.js +1 -0
- package/build/features/app/bank/bankStore.d.ts +88 -12
- package/build/features/app/bank/bankStore.js +153 -107
- package/build/features/app/brand/brandStore.d.ts +158 -21
- package/build/features/app/brand/brandStore.js +401 -221
- package/build/features/app/business/businessStore.d.ts +176 -29
- package/build/features/app/business/businessStore.js +343 -282
- package/build/features/app/connect/connectStore.d.ts +150 -14
- package/build/features/app/connect/connectStore.js +185 -67
- package/build/features/app/connectExpress/connectExpressStore.d.ts +223 -20
- package/build/features/app/connectExpress/connectExpressStore.js +234 -101
- package/build/features/app/entity/entityStore.d.ts +93 -23
- package/build/features/app/entity/entityStore.js +273 -237
- package/build/features/app/individual/individualStore.d.ts +192 -27
- package/build/features/app/individual/individualStore.js +504 -380
- package/build/features/app/password/passwordStore.d.ts +106 -12
- package/build/features/app/password/passwordStore.js +84 -36
- package/build/features/app/signIn/signInStore.d.ts +61 -7
- package/build/features/app/signIn/signInStore.js +1 -1
- package/build/features/app/tax/taxStore.d.ts +76 -9
- package/build/features/app/tax/taxStore.js +136 -89
- package/build/features/bank/Bank.js +10 -6
- package/build/features/bank/screens/BankDetails/BankDetails.js +43 -17
- package/build/features/bank/screens/BankDetails/BankName.d.ts +5 -1
- package/build/features/bank/screens/BankDetails/BankName.js +9 -9
- package/build/features/bank/screens/BankDetails/BankStatement.d.ts +6 -2
- package/build/features/bank/screens/BankDetails/BankStatement.js +7 -10
- package/build/features/bank/screens/BankDetails/Beneficiary.d.ts +3 -1
- package/build/features/bank/screens/BankDetails/Beneficiary.js +6 -7
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.d.ts +4 -1
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.js +12 -13
- package/build/features/bank/screens/BankDetails/IBAN.d.ts +3 -1
- package/build/features/bank/screens/BankDetails/IBAN.js +4 -6
- package/build/features/bank/screens/BankDetails/validation.d.ts +8 -8
- package/build/features/bank/screens/BankDetails/validation.js +6 -17
- package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -4
- package/build/features/bank/screens/Verify/OTPInput.js +5 -3
- package/build/features/bank/screens/Verify/Verify.js +1 -5
- package/build/features/brand/Brand.js +10 -6
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +13 -30
- package/build/features/brand/screens/BrandActivities/ActivitiesList.js +50 -34
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +41 -9
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +14 -41
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +21 -32
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +3 -1
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +22 -19
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +3 -1
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +28 -19
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +15 -8
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +23 -12
- package/build/features/brand/screens/BrandActivities/TAC.d.ts +14 -2
- package/build/features/brand/screens/BrandActivities/TAC.js +21 -12
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.d.ts +4 -1
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +18 -4
- package/build/features/brand/screens/BrandActivities/validation.d.ts +7 -7
- package/build/features/brand/screens/BrandActivities/validation.js +10 -19
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +40 -33
- package/build/features/brand/screens/BrandInfo/BrandLogo.d.ts +9 -0
- package/build/features/brand/screens/BrandInfo/BrandLogo.js +41 -0
- package/build/features/brand/screens/BrandInfo/BrandName.d.ts +3 -2
- package/build/features/brand/screens/BrandInfo/BrandName.js +5 -8
- package/build/features/brand/screens/BrandInfo/SalesChannels.d.ts +2 -1
- package/build/features/brand/screens/BrandInfo/SalesChannels.js +20 -26
- package/build/features/brand/screens/BrandInfo/validation.d.ts +7 -13
- package/build/features/brand/screens/BrandInfo/validation.js +37 -47
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.d.ts +5 -0
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +102 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentLocations.d.ts +10 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentLocations.js +69 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.d.ts +10 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.js +69 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentTechs.d.ts +10 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentTechs.js +69 -0
- package/build/features/{connect/screens/Merchant → brand/screens/BrandSegmentInfo}/TeamSize.d.ts +3 -1
- package/build/features/brand/screens/{BrandInfo → BrandSegmentInfo}/TeamSize.js +20 -25
- package/build/features/brand/screens/BrandSegmentInfo/index.d.ts +2 -0
- package/build/features/brand/screens/BrandSegmentInfo/index.js +2 -0
- package/build/features/brand/screens/BrandSegmentInfo/validation.d.ts +17 -0
- package/build/features/brand/screens/BrandSegmentInfo/validation.js +9 -0
- package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -4
- package/build/features/brand/screens/Verify/OTPInput.js +5 -3
- package/build/features/brand/screens/Verify/Verify.js +7 -20
- package/build/features/business/Business.js +7 -5
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +17 -70
- package/build/features/business/screens/Activities/ActivitiesList.js +226 -98
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +3 -3
- package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
- package/build/features/business/screens/Activities/validation.d.ts +165 -30
- package/build/features/business/screens/Activities/validation.js +5 -2
- package/build/features/business/screens/BrandDetails/BrandDetails.d.ts +5 -0
- package/build/features/business/screens/BrandDetails/BrandDetails.js +39 -0
- package/build/features/business/screens/BrandDetails/BrandName.d.ts +5 -0
- package/build/features/business/screens/BrandDetails/BrandName.js +36 -0
- package/build/features/business/screens/BrandDetails/Header.d.ts +5 -0
- package/build/features/business/screens/BrandDetails/Header.js +49 -0
- package/build/features/business/screens/BrandDetails/LicenseInfo.d.ts +5 -0
- package/build/features/business/screens/BrandDetails/LicenseInfo.js +38 -0
- package/build/features/{brand/screens/BrandActivities/OperationStartDate.d.ts → business/screens/BrandDetails/SalesChannel.d.ts} +6 -8
- package/build/features/business/screens/BrandDetails/SalesChannel.js +48 -0
- package/build/features/business/screens/BrandDetails/index.d.ts +3 -0
- package/build/features/business/screens/BrandDetails/index.js +2 -0
- package/build/features/business/screens/BusinessType/Article.d.ts +4 -2
- package/build/features/business/screens/BusinessType/Article.js +19 -54
- package/build/features/business/screens/BusinessType/BusinessType.js +35 -11
- package/build/features/business/screens/BusinessType/EntityLicenseList.d.ts +9 -0
- package/build/features/business/screens/BusinessType/EntityLicenseList.js +129 -0
- package/build/features/business/screens/BusinessType/EntityName.js +6 -7
- package/build/features/business/screens/BusinessType/LicenseCertificate.js +2 -1
- package/build/features/business/screens/BusinessType/LicenseList.d.ts +1 -0
- package/build/features/business/screens/BusinessType/LicenseList.js +7 -22
- package/build/features/business/screens/BusinessType/LicenseNumber.d.ts +1 -2
- package/build/features/business/screens/BusinessType/LicenseNumber.js +4 -2
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +3 -3
- package/build/features/business/screens/CivilID/IDNumber.js +2 -3
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +47 -40
- package/build/features/business/screens/Customers/CustomerLocations.js +35 -19
- package/build/features/business/screens/Customers/Customers.js +27 -16
- package/build/features/business/screens/Customers/ExpectedCustomers.js +12 -4
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +14 -6
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +7 -7
- package/build/features/business/screens/Customers/RefundPolicy.js +15 -4
- package/build/features/business/screens/Customers/TransactionPolicy.js +19 -9
- package/build/features/business/screens/IDBOD/DOB.js +2 -2
- package/build/features/business/screens/IDBOD/ID.js +2 -3
- package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +8 -3
- package/build/features/business/screens/Verify/OTPInput.js +5 -3
- package/build/features/connect/Connect.js +28 -8
- package/build/features/connect/screens/BrandSegment/BrandSegment.d.ts +5 -0
- package/build/features/connect/screens/BrandSegment/BrandSegment.js +84 -0
- package/build/features/connect/screens/BrandSegment/SegmentLocations.d.ts +8 -0
- package/build/features/connect/screens/{Merchant/Segments.js → BrandSegment/SegmentLocations.js} +17 -25
- package/build/features/connect/screens/BrandSegment/SegmentProfits.d.ts +8 -0
- package/build/features/{brand/screens/BrandInfo/Segments.js → connect/screens/BrandSegment/SegmentProfits.js} +18 -26
- package/build/features/connect/screens/BrandSegment/SegmentTechs.d.ts +8 -0
- package/build/features/connect/screens/BrandSegment/SegmentTechs.js +66 -0
- package/build/features/connect/screens/{Merchant → BrandSegment}/TeamSize.js +12 -20
- package/build/features/connect/screens/BrandSegment/index.d.ts +3 -0
- package/build/features/connect/screens/BrandSegment/index.js +2 -0
- package/build/features/connect/screens/BrandSegment/validation.d.ts +17 -0
- package/build/features/connect/screens/BrandSegment/validation.js +9 -0
- package/build/features/connect/screens/CivilID/CivilID.js +5 -13
- package/build/features/connect/screens/CivilID/IDNumber.js +5 -6
- package/build/features/connect/screens/Individual/Email.js +18 -28
- package/build/features/connect/screens/Individual/Individual.js +8 -1
- package/build/features/connect/screens/Individual/MobileNumber.js +16 -15
- package/build/features/connect/screens/Individual/Name.js +11 -15
- package/build/features/connect/screens/Merchant/BrandList.js +4 -22
- package/build/features/connect/screens/Merchant/BrandName.js +5 -8
- package/build/features/connect/screens/Merchant/Merchant.js +13 -15
- package/build/features/connect/screens/Merchant/validation.d.ts +3 -6
- package/build/features/connect/screens/Merchant/validation.js +6 -9
- package/build/features/connect/screens/Mobile/Mobile.js +13 -16
- package/build/features/connect/screens/Mobile/MobileNumber.js +14 -10
- package/build/features/connect/screens/NID/DOB.js +1 -1
- package/build/features/connect/screens/NID/IDNumber.js +6 -7
- package/build/features/connect/screens/NID/NID.js +6 -0
- package/build/features/connect/screens/OTP/OTP.js +13 -15
- package/build/features/connect/screens/OTP/OTPInput.js +10 -0
- package/build/features/connect/screens/ThankYou/ThankYou.js +17 -2
- package/build/features/connectExpress/ConnectExpress.d.ts +1 -0
- package/build/features/connectExpress/ConnectExpress.js +78 -13
- package/build/features/connectExpress/screens/Brand/Brand.js +1 -1
- package/build/features/connectExpress/screens/CivilID/IDNumber.js +6 -7
- package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.js +6 -7
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.d.ts +2 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +6 -8
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +7 -4
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.d.ts +2 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +9 -14
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +5 -4
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.js +4 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +14 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +9 -10
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +11 -6
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.d.ts +2 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +7 -15
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +6 -2
- package/build/features/connectExpress/screens/CollectIndividualInfo/Name.d.ts +2 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/Name.js +3 -4
- package/build/features/connectExpress/screens/IdentityOTP/OTPInput.js +2 -2
- package/build/features/connectExpress/screens/Mobile/Mobile.js +4 -3
- package/build/features/connectExpress/screens/Mobile/MobileNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/Mobile/MobileNumber.js +6 -2
- package/build/features/connectExpress/screens/Mobile/TAC.d.ts +2 -1
- package/build/features/connectExpress/screens/Mobile/TAC.js +3 -1
- package/build/features/connectExpress/screens/NID/DOB.d.ts +2 -1
- package/build/features/connectExpress/screens/NID/DOB.js +2 -2
- package/build/features/connectExpress/screens/NID/IDNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/NID/IDNumber.js +3 -4
- package/build/features/connectExpress/screens/NID/NID.js +4 -2
- package/build/features/connectExpress/screens/NID/TAC.d.ts +14 -1
- package/build/features/connectExpress/screens/NID/TAC.js +9 -10
- package/build/features/connectExpress/screens/NIDMissed/DOB.js +1 -1
- package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +2 -3
- package/build/features/connectExpress/screens/OTP/OTPInput.js +3 -3
- package/build/features/entity/Entity.js +10 -6
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +17 -70
- package/build/features/entity/screens/EntityCapital/ActivityList.js +219 -108
- package/build/features/entity/screens/EntityCapital/CapitalPaid.d.ts +3 -1
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +14 -16
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.d.ts +3 -1
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +10 -12
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.d.ts +3 -1
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +15 -17
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +31 -20
- package/build/features/entity/screens/EntityCapital/validation.d.ts +175 -40
- package/build/features/entity/screens/EntityCapital/validation.js +9 -12
- package/build/features/entity/screens/EntityName/Article.d.ts +6 -2
- package/build/features/entity/screens/EntityName/Article.js +20 -54
- package/build/features/entity/screens/EntityName/EntityName.js +60 -16
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +13 -30
- package/build/features/entity/screens/EntityName/EntityTypeList.js +28 -45
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +6 -4
- package/build/features/entity/screens/EntityName/ExpiryDate.js +6 -8
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +6 -4
- package/build/features/entity/screens/EntityName/IssuingDate.js +5 -8
- package/build/features/entity/screens/EntityName/LegalName.d.ts +3 -1
- package/build/features/entity/screens/EntityName/LegalName.js +10 -9
- package/build/features/entity/screens/EntityName/LicenseCertificate.d.ts +4 -1
- package/build/features/entity/screens/EntityName/LicenseCertificate.js +13 -7
- package/build/features/entity/screens/EntityName/LicenseNumber.d.ts +3 -1
- package/build/features/entity/screens/EntityName/LicenseNumber.js +13 -11
- package/build/features/entity/screens/EntityName/UnifiedNumber.d.ts +3 -1
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +11 -10
- package/build/features/entity/screens/EntityName/validation.d.ts +35 -35
- package/build/features/entity/screens/EntityName/validation.js +68 -93
- package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -4
- package/build/features/entity/screens/Verify/OTPInput.js +5 -3
- package/build/features/entity/screens/Verify/Verify.js +7 -20
- package/build/features/featuresScreens.js +13 -1
- package/build/features/individual/Individual.js +10 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +3 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +54 -23
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.d.ts +7 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +29 -10
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.d.ts +3 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +18 -15
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +30 -42
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +3 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +94 -56
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +5 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +18 -15
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.js +9 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +13 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.d.ts +4 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.js +14 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +32 -43
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +8 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +7 -11
- package/build/features/individual/screens/IndividualList/CollectPhoneEmail.js +1 -1
- package/build/features/individual/screens/IndividualList/Email.js +1 -1
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +6 -6
- package/build/features/individual/screens/IndividualList/MobileNumber.js +0 -1
- package/build/features/individual/screens/IndividualList/UserList.js +15 -6
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.d.ts +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +14 -20
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.d.ts +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.js +8 -14
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +3 -1
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +3 -3
- package/build/features/individual/screens/IndividualPersonalInfo/Email.d.ts +3 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +4 -12
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +3 -1
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +5 -8
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +6 -4
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.js +5 -2
- package/build/features/individual/screens/IndividualPersonalInfo/ID.d.ts +3 -1
- package/build/features/individual/screens/IndividualPersonalInfo/ID.js +4 -12
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +3 -3
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +79 -36
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.d.ts +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +14 -26
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.d.ts +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +18 -21
- package/build/features/individual/screens/IndividualPersonalInfo/Name.d.ts +3 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Name.js +4 -12
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.d.ts +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +14 -26
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.d.ts +1 -0
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +6 -3
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +6 -3
- package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +8 -3
- package/build/features/individual/screens/Verify/OTPInput.js +5 -3
- package/build/features/individual/screens/Verify/Verify.js +1 -5
- package/build/features/password/Password.js +7 -5
- package/build/features/password/screens/CreatePassword/CreatePassword.js +9 -16
- package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +8 -3
- package/build/features/password/screens/Verify/OTPInput.js +5 -3
- package/build/features/password/screens/Verify/Verify.js +7 -20
- package/build/features/shared/Address/CountryList.d.ts +10 -10
- package/build/features/shared/Address/CountryList.js +1 -1
- package/build/features/shared/Address/InputSelect.d.ts +10 -10
- package/build/features/shared/Address/InputSelect.js +2 -2
- package/build/features/shared/Button/Button.d.ts +3 -1
- package/build/features/shared/Button/Button.js +3 -3
- package/build/features/shared/Button/EmailProvidersButtons.d.ts +1 -1
- package/build/features/shared/Button/EmailProvidersButtons.js +9 -2
- package/build/features/shared/Button/FlowsButtons.d.ts +1 -1
- package/build/features/shared/Button/FlowsButtons.js +23 -21
- package/build/features/shared/Button/IndividualActionButtons.d.ts +21 -0
- package/build/features/shared/Button/IndividualActionButtons.js +156 -0
- package/build/features/shared/Button/index.d.ts +1 -1
- package/build/features/shared/Button/index.js +1 -1
- package/build/features/shared/CheckIcon/CheckIcon.d.ts +7 -1
- package/build/features/shared/CheckIcon/CheckIcon.js +7 -6
- package/build/features/shared/Chip/Chip.d.ts +3 -0
- package/build/features/shared/Chip/Chip.js +21 -0
- package/build/features/shared/Chip/index.d.ts +2 -0
- package/build/features/shared/Chip/index.js +2 -0
- package/build/features/shared/Containers/FeatureContainer.d.ts +4 -1
- package/build/features/shared/Containers/FeatureContainer.js +5 -4
- package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
- package/build/features/shared/Dot/Dot.d.ts +8 -0
- package/build/features/shared/Dot/Dot.js +29 -0
- package/build/features/shared/Dot/index.d.ts +2 -0
- package/build/features/shared/Dot/index.js +2 -0
- package/build/features/shared/EndAdornment/EndAdornment.d.ts +10 -0
- package/build/features/shared/EndAdornment/EndAdornment.js +17 -0
- package/build/features/shared/EndAdornment/EndAdornmentExpanded.d.ts +7 -0
- package/build/features/shared/EndAdornment/EndAdornmentExpanded.js +13 -0
- package/build/features/shared/EndAdornment/index.d.ts +3 -0
- package/build/features/shared/EndAdornment/index.js +3 -0
- package/build/features/shared/Footer/Footer.js +8 -0
- package/build/features/shared/Footer/PoweredByFooter.d.ts +9 -0
- package/build/features/shared/Footer/PoweredByFooter.js +36 -0
- package/build/features/shared/Footer/index.d.ts +3 -2
- package/build/features/shared/Footer/index.js +3 -2
- package/build/features/shared/GenericError/GenericError.js +1 -1
- package/build/features/shared/Input/Input.d.ts +6 -7
- package/build/features/shared/Input/Input.js +2 -3
- package/build/features/shared/Input/index.d.ts +2 -1
- package/build/features/shared/InputSelect/InputSelect.d.ts +4 -0
- package/build/features/shared/InputSelect/InputSelect.js +33 -0
- package/build/features/shared/InputSelect/index.d.ts +2 -0
- package/build/features/shared/InputSelect/index.js +2 -0
- package/build/features/shared/OTP/OTP.d.ts +2 -1
- package/build/features/shared/OTP/OTP.js +2 -2
- package/build/features/shared/SalesChannels/SaleChannelIconsInput.d.ts +3 -1
- package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +8 -6
- package/build/features/shared/SalesChannels/SalesChannel.d.ts +3 -1
- package/build/features/shared/SalesChannels/SalesChannel.js +9 -4
- package/build/features/shared/Search/Search.d.ts +2 -1
- package/build/features/shared/Search/Search.js +2 -2
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +14 -5
- package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +3 -1
- package/build/features/shared/SuccessScreen/SuccessScreen.js +3 -2
- package/build/features/shared/UploadFile/FileUpload.d.ts +32 -0
- package/build/features/shared/UploadFile/FileUpload.js +267 -0
- package/build/features/shared/UploadFile/UploadFile.d.ts +2 -2
- package/build/features/shared/UploadFile/UploadFile.js +7 -7
- package/build/features/shared/UploadFile/UploadWrapper.d.ts +36 -0
- package/build/features/shared/UploadFile/UploadWrapper.js +115 -0
- package/build/features/shared/UploadFile/index.d.ts +2 -1
- package/build/features/shared/UploadFile/index.js +2 -1
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +11 -20
- package/build/features/shared/UploadMultipleFile/UploadFile.js +119 -30
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +8 -4
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +28 -21
- package/build/features/signIn/SignIn.js +3 -4
- package/build/features/tax/Tax.js +10 -6
- package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -4
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.d.ts +4 -1
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.js +12 -12
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +23 -10
- package/build/features/tax/screens/TaxDetails/TaxDocument.d.ts +4 -1
- package/build/features/tax/screens/TaxDetails/TaxDocument.js +7 -5
- package/build/features/tax/screens/TaxDetails/VATId.d.ts +5 -1
- package/build/features/tax/screens/TaxDetails/VATId.js +5 -10
- package/build/features/tax/screens/TaxDetails/validation.d.ts +4 -4
- package/build/features/tax/screens/TaxDetails/validation.js +2 -5
- package/build/features/tax/screens/Verify/OTPInput.js +5 -3
- package/build/features/tax/screens/Verify/Verify.js +6 -22
- package/build/hooks/index.d.ts +5 -0
- package/build/hooks/index.js +5 -0
- package/build/hooks/useAppConfig.d.ts +4 -2
- package/build/hooks/useAppConfig.js +10 -5
- package/build/hooks/useDataNoneEditable.d.ts +2 -0
- package/build/hooks/useDataNoneEditable.js +19 -0
- package/build/hooks/useDataVerified.d.ts +6 -0
- package/build/hooks/useDataVerified.js +19 -0
- package/build/hooks/useErrorListener.d.ts +2 -1
- package/build/hooks/useErrorListener.js +16 -1
- package/build/hooks/useExcludeReadOnlyFelids.d.ts +11 -0
- package/build/hooks/useExcludeReadOnlyFelids.js +33 -0
- package/build/hooks/useFormErrorAndUpdateReadOnly.d.ts +6 -0
- package/build/hooks/useFormErrorAndUpdateReadOnly.js +48 -0
- package/build/hooks/useFormReadOnly.d.ts +6 -0
- package/build/hooks/useFormReadOnly.js +40 -0
- package/build/hooks/useVerifyToken.js +1 -1
- package/build/index.d.ts +2 -2
- package/build/index.js +4 -3
- package/build/theme/shadows.js +1 -1
- package/build/utils/array.d.ts +17 -3
- package/build/utils/array.js +220 -6
- package/build/utils/date.d.ts +1 -0
- package/build/utils/date.js +6 -0
- package/build/utils/error.d.ts +1 -0
- package/build/utils/error.js +3 -0
- package/build/utils/gtm.d.ts +6 -0
- package/build/utils/gtm.js +29 -0
- package/build/utils/index.d.ts +1 -0
- package/build/utils/index.js +1 -0
- package/build/utils/object.d.ts +4 -0
- package/build/utils/object.js +17 -0
- package/build/utils/string.d.ts +5 -2
- package/build/utils/string.js +28 -7
- package/package.json +4 -2
- package/build/features/brand/screens/BrandActivities/OperationStartDate.js +0 -45
- package/build/features/brand/screens/BrandInfo/Segments.d.ts +0 -8
- package/build/features/connect/screens/Merchant/Segments.d.ts +0 -8
- package/build/features/shared/Button/ListButton.d.ts +0 -18
- package/build/features/shared/Button/ListButton.js +0 -125
- /package/build/features/{brand/screens/BrandInfo → connect/screens/BrandSegment}/TeamSize.d.ts +0 -0
|
@@ -6,7 +6,7 @@ export var useVerifyToken = function (_a) {
|
|
|
6
6
|
var verify = _a.verify, internalToken = _a.internalToken, navigation = _a.navigation, open = _a.open, settingLoading = _a.settingLoading, loadingScreenName = _a.loadingScreenName;
|
|
7
7
|
var dispatch = useAppDispatch();
|
|
8
8
|
var verifyTokenFun = function () {
|
|
9
|
-
var token = getParameterByName('token')
|
|
9
|
+
var token = internalToken ? internalToken : getParameterByName('token');
|
|
10
10
|
var lang = getParameterByName('lang');
|
|
11
11
|
if (lang)
|
|
12
12
|
dispatch(handleLanguage(lang));
|
package/build/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
import './i18n';
|
|
3
3
|
import { ConnectElement, ConnectLibProps } from './features/connect';
|
|
4
|
-
import { ConnectExpressElement,
|
|
4
|
+
import { ConnectExpressElement, ConnectExpressLibProps } from './features/connectExpress';
|
|
5
5
|
import { BusinessElement, BusinessLibProps } from './features/business';
|
|
6
6
|
import { PasswordElement, PasswordLibProps } from './features/password';
|
|
7
7
|
import { IndividualElement, IndividualLibProps } from './features/individual';
|
|
@@ -11,4 +11,4 @@ import { SignInElement, SignInLibProps } from './features/signIn';
|
|
|
11
11
|
import { EntityElement, EntityLibProps } from './features/entity';
|
|
12
12
|
import { BrandElement, BrandLibProps } from './features/brand';
|
|
13
13
|
export type { ConnectLibProps, ConnectExpressLibProps, BusinessLibProps, PasswordLibProps, IndividualLibProps, BankLibProps, TaxLibProps, EntityLibProps, BrandLibProps, SignInLibProps };
|
|
14
|
-
export { ConnectElement, ConnectExpressElement, BusinessElement, PasswordElement, IndividualElement, BankElement, TaxElement, EntityElement, BrandElement, SignInElement
|
|
14
|
+
export { ConnectElement, ConnectExpressElement, BusinessElement, PasswordElement, IndividualElement, BankElement, TaxElement, EntityElement, BrandElement, SignInElement };
|
package/build/index.js
CHANGED
|
@@ -7,10 +7,10 @@ import { PasswordElement, renderPasswordLib } from './features/password';
|
|
|
7
7
|
import { IndividualElement, renderIndividualLib } from './features/individual';
|
|
8
8
|
import { BankElement, renderBankLib } from './features/bank';
|
|
9
9
|
import { TaxElement, renderTaxLib } from './features/tax';
|
|
10
|
-
import { SignInElement } from './features/signIn';
|
|
10
|
+
import { SignInElement, renderSignInLib } from './features/signIn';
|
|
11
11
|
import { EntityElement, renderEntityLib } from './features/entity';
|
|
12
12
|
import { BrandElement, renderBrandLib } from './features/brand';
|
|
13
|
-
export { ConnectElement, ConnectExpressElement, BusinessElement, PasswordElement, IndividualElement, BankElement, TaxElement, EntityElement, BrandElement, SignInElement
|
|
13
|
+
export { ConnectElement, ConnectExpressElement, BusinessElement, PasswordElement, IndividualElement, BankElement, TaxElement, EntityElement, BrandElement, SignInElement };
|
|
14
14
|
window['TapAuth'] = {
|
|
15
15
|
renderConnectLib: renderConnectLib,
|
|
16
16
|
renderConnectExpressLib: renderConnectExpressLib,
|
|
@@ -20,6 +20,7 @@ window['TapAuth'] = {
|
|
|
20
20
|
renderBankLib: renderBankLib,
|
|
21
21
|
renderTaxLib: renderTaxLib,
|
|
22
22
|
renderEntityLib: renderEntityLib,
|
|
23
|
-
renderBrandLib: renderBrandLib
|
|
23
|
+
renderBrandLib: renderBrandLib,
|
|
24
|
+
renderSignInLib: renderSignInLib
|
|
24
25
|
};
|
|
25
26
|
console.log("TapAuth version: ".concat(require('../package.json').version));
|
package/build/theme/shadows.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export var shadows = [
|
|
2
2
|
'none',
|
|
3
3
|
'0 0 0 1px rgb(63 63 68 / 5%), 0 1px 2px 0 rgb(63 63 68 / 15%)',
|
|
4
|
-
'0px
|
|
4
|
+
'0px 0px 2px rgba(0, 0, 0, 0.08)',
|
|
5
5
|
'0px 1px 8px 0px rgba(0,0,0,0.2),0px 3px 4px 0px rgba(0,0,0,0.14),0px 3px 3px -2px rgba(0,0,0,0.12)',
|
|
6
6
|
'0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)',
|
|
7
7
|
'0px 3px 5px -1px rgba(0,0,0,0.2),0px 5px 8px 0px rgba(0,0,0,0.14),0px 1px 14px 0px rgba(0,0,0,0.12)',
|
package/build/utils/array.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Activity, CountryCode, SaleChannel } from '../@types';
|
|
1
|
+
import { ActivitiesIsIc, Activity, ActivityParams, CountryCode, SaleChannel, User } from '../@types';
|
|
2
2
|
export declare const isArray: (value: any) => value is any[];
|
|
3
3
|
export declare const joinArray: (items: Array<any>, joiner?: string) => string;
|
|
4
4
|
export declare const replaceStringArrayItems: (items: Array<string>, include: string, withThis: string) => string[];
|
|
@@ -61,5 +61,19 @@ export declare const fixBrandList: (items: Array<{
|
|
|
61
61
|
channel_services: any[];
|
|
62
62
|
}[];
|
|
63
63
|
export declare const findFirstId: (items: Array<SaleChannel>) => string;
|
|
64
|
-
export declare const sortActivitiesByName: (items: Array<
|
|
65
|
-
export declare const
|
|
64
|
+
export declare const sortActivitiesByName: (items: Array<ActivityParams>, path: string) => ActivityParams[];
|
|
65
|
+
export declare const getFileDetailsFromDocument: (documents: Array<any>, purpose: string) => any;
|
|
66
|
+
export declare const getRecentDocumentBasedOnPurpose: (documents: Array<any>, purpose: string) => any;
|
|
67
|
+
export declare const findInArrayOrSubArray: (items: Array<any>, value: string | number) => null;
|
|
68
|
+
export declare const groupSectionWithSelectedActivitiesAtBeginning: (sections: Array<ActivitiesIsIc>, selectedActivities: Array<Activity>) => ActivitiesIsIc[];
|
|
69
|
+
export declare const filterActivitiesByName: (activityList: Array<ActivitiesIsIc>, value: string) => ActivityParams[];
|
|
70
|
+
export declare const mapUserList: (individuals: any) => any;
|
|
71
|
+
export declare const sortUserList: (list: Array<User>) => User[];
|
|
72
|
+
export declare const getIndividualType: (objects: Array<string>) => {
|
|
73
|
+
isUser: boolean;
|
|
74
|
+
isShareholder: boolean;
|
|
75
|
+
isBoardMember: boolean;
|
|
76
|
+
isBuyer: boolean;
|
|
77
|
+
isCustomer: boolean;
|
|
78
|
+
};
|
|
79
|
+
export declare function retrieveIndividualData(type: string, boardData: any, serviceCallback: () => Promise<any>): Promise<any>;
|
package/build/utils/array.js
CHANGED
|
@@ -9,7 +9,53 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
+
function step(op) {
|
|
26
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
+
switch (op[0]) {
|
|
31
|
+
case 0: case 1: t = op; break;
|
|
32
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
+
default:
|
|
36
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
+
if (t[2]) _.ops.pop();
|
|
41
|
+
_.trys.pop(); continue;
|
|
42
|
+
}
|
|
43
|
+
op = body.call(thisArg, _);
|
|
44
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
49
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
50
|
+
if (ar || !(i in from)) {
|
|
51
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
52
|
+
ar[i] = from[i];
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
56
|
+
};
|
|
12
57
|
import get from 'lodash-es/get';
|
|
58
|
+
import { IndividualType } from '../@types';
|
|
13
59
|
export var isArray = function (value) { return Array.isArray(value); };
|
|
14
60
|
export var joinArray = function (items, joiner) {
|
|
15
61
|
if (joiner === void 0) { joiner = '__'; }
|
|
@@ -142,11 +188,179 @@ export var sortActivitiesByName = function (items, path) {
|
|
|
142
188
|
return get(a, path).trim().toLowerCase().localeCompare(get(b, path).trim().toLowerCase().trim().toLowerCase());
|
|
143
189
|
});
|
|
144
190
|
};
|
|
145
|
-
export var
|
|
146
|
-
|
|
147
|
-
|
|
191
|
+
export var getFileDetailsFromDocument = function (documents, purpose) {
|
|
192
|
+
if ((documents || []).length === 0)
|
|
193
|
+
return [];
|
|
194
|
+
return documents.reduce(function (acc, document) {
|
|
195
|
+
var fileDetails = (document.file_details || []).filter(function (file) { return file.purpose === purpose; });
|
|
196
|
+
return acc.concat(fileDetails.map(function (f) { return (__assign(__assign({}, f), { docId: document.id })); }));
|
|
197
|
+
}, []);
|
|
198
|
+
};
|
|
199
|
+
export var getRecentDocumentBasedOnPurpose = function (documents, purpose) {
|
|
200
|
+
if ((documents || []).length === 0)
|
|
148
201
|
return [];
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
202
|
+
var filteredByPurpose = documents.filter(function (doc) {
|
|
203
|
+
return doc.type === purpose;
|
|
204
|
+
});
|
|
205
|
+
if ((filteredByPurpose || []).length > 0) {
|
|
206
|
+
return filteredByPurpose.sort(function (a, b) { return b.created - a.created; })[0];
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
return documents
|
|
210
|
+
.filter(function (doc) { var _a; return !((_a = doc.file_details) === null || _a === void 0 ? void 0 : _a.length) && doc.id; })
|
|
211
|
+
.sort(function (a, b) { return b.created - a.created; })[0];
|
|
212
|
+
}
|
|
152
213
|
};
|
|
214
|
+
export var findInArrayOrSubArray = function (items, value) {
|
|
215
|
+
var found = null;
|
|
216
|
+
items.forEach(function (item) {
|
|
217
|
+
if (item.id === value)
|
|
218
|
+
found = item;
|
|
219
|
+
if (Array.isArray(item.sub)) {
|
|
220
|
+
item.sub.forEach(function (subItem) {
|
|
221
|
+
if (subItem.id === value)
|
|
222
|
+
found = subItem;
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
return found;
|
|
227
|
+
};
|
|
228
|
+
export var groupSectionWithSelectedActivitiesAtBeginning = function (sections, selectedActivities) {
|
|
229
|
+
if ((selectedActivities === null || selectedActivities === void 0 ? void 0 : selectedActivities.length) === 0)
|
|
230
|
+
return sections || [];
|
|
231
|
+
if ((sections === null || sections === void 0 ? void 0 : sections.length) === 0)
|
|
232
|
+
return [];
|
|
233
|
+
var filteredSections = sections.filter(function (section) {
|
|
234
|
+
var _a;
|
|
235
|
+
return (selectedActivities.find(function (_a) {
|
|
236
|
+
var id = _a.id;
|
|
237
|
+
return id === section.id;
|
|
238
|
+
}) ||
|
|
239
|
+
((_a = section.divisions) === null || _a === void 0 ? void 0 : _a.some(function (division) {
|
|
240
|
+
var _a;
|
|
241
|
+
return (selectedActivities.find(function (_a) {
|
|
242
|
+
var id = _a.id;
|
|
243
|
+
return id === division.id;
|
|
244
|
+
}) ||
|
|
245
|
+
((_a = division === null || division === void 0 ? void 0 : division.activities) === null || _a === void 0 ? void 0 : _a.some(function (activity) {
|
|
246
|
+
return selectedActivities.find(function (_a) {
|
|
247
|
+
var id = _a.id;
|
|
248
|
+
return id === activity.id;
|
|
249
|
+
});
|
|
250
|
+
})));
|
|
251
|
+
})));
|
|
252
|
+
});
|
|
253
|
+
var mapSelectedDivisionBeginning = filteredSections.map(function (section) {
|
|
254
|
+
var _a, _b;
|
|
255
|
+
var selectedDivision = ((_a = section.divisions) === null || _a === void 0 ? void 0 : _a.filter(function (division) {
|
|
256
|
+
var _a;
|
|
257
|
+
return (selectedActivities.find(function (_a) {
|
|
258
|
+
var id = _a.id;
|
|
259
|
+
return id === division.id;
|
|
260
|
+
}) ||
|
|
261
|
+
((_a = division === null || division === void 0 ? void 0 : division.activities) === null || _a === void 0 ? void 0 : _a.some(function (activity) {
|
|
262
|
+
return selectedActivities.find(function (_a) {
|
|
263
|
+
var id = _a.id;
|
|
264
|
+
return id === activity.id;
|
|
265
|
+
});
|
|
266
|
+
})));
|
|
267
|
+
})) || [];
|
|
268
|
+
var remainingDivision = ((_b = section.divisions) === null || _b === void 0 ? void 0 : _b.filter(function (division) { return !selectedDivision.includes(division); })) || [];
|
|
269
|
+
var divisions = __spreadArray(__spreadArray([], selectedDivision, true), remainingDivision, true);
|
|
270
|
+
return __assign(__assign({}, section), { divisions: divisions });
|
|
271
|
+
});
|
|
272
|
+
var mapSelectedActivitiesBeginning = mapSelectedDivisionBeginning.map(function (section) {
|
|
273
|
+
var _a;
|
|
274
|
+
var divisions = (_a = section.divisions) === null || _a === void 0 ? void 0 : _a.map(function (division) {
|
|
275
|
+
var _a, _b;
|
|
276
|
+
var filterSelectedActivities = ((_a = division === null || division === void 0 ? void 0 : division.activities) === null || _a === void 0 ? void 0 : _a.filter(function (activity) {
|
|
277
|
+
return selectedActivities.find(function (_a) {
|
|
278
|
+
var id = _a.id;
|
|
279
|
+
return id === activity.id;
|
|
280
|
+
});
|
|
281
|
+
})) || [];
|
|
282
|
+
var remainingActivities = ((_b = division.activities) === null || _b === void 0 ? void 0 : _b.filter(function (activity) { return !filterSelectedActivities.includes(activity); })) || [];
|
|
283
|
+
var activities = __spreadArray(__spreadArray([], filterSelectedActivities, true), remainingActivities, true);
|
|
284
|
+
return __assign(__assign({}, division), { activities: activities });
|
|
285
|
+
});
|
|
286
|
+
return __assign(__assign({}, section), { divisions: divisions });
|
|
287
|
+
});
|
|
288
|
+
var remainingSections = sections.filter(function (section) { return !filteredSections.includes(section); });
|
|
289
|
+
return __spreadArray(__spreadArray([], mapSelectedActivitiesBeginning, true), remainingSections, true);
|
|
290
|
+
};
|
|
291
|
+
export var filterActivitiesByName = function (activityList, value) {
|
|
292
|
+
return (activityList || [])
|
|
293
|
+
.flatMap(function (s) { return s.divisions || []; })
|
|
294
|
+
.flatMap(function (d) { return d.activities || []; })
|
|
295
|
+
.filter(function (a) {
|
|
296
|
+
var _a, _b, _c, _d;
|
|
297
|
+
return ((_b = (_a = a === null || a === void 0 ? void 0 : a.name) === null || _a === void 0 ? void 0 : _a.en) === null || _b === void 0 ? void 0 : _b.toLowerCase().includes(value.toLowerCase())) || ((_d = (_c = a === null || a === void 0 ? void 0 : a.name) === null || _c === void 0 ? void 0 : _c.ar) === null || _d === void 0 ? void 0 : _d.toLowerCase().includes(value.toLowerCase()));
|
|
298
|
+
});
|
|
299
|
+
};
|
|
300
|
+
export var mapUserList = function (individuals) {
|
|
301
|
+
return (individuals || []).map(function (_a) {
|
|
302
|
+
var list = _a.list, data_state = _a.data_state;
|
|
303
|
+
return list.reduce(function (acc, obj) {
|
|
304
|
+
var objects = acc.object ? [acc.object] : [];
|
|
305
|
+
var ids = acc.id ? [acc.id] : [];
|
|
306
|
+
if (obj.object) {
|
|
307
|
+
objects.push(obj.object);
|
|
308
|
+
}
|
|
309
|
+
if (obj.id) {
|
|
310
|
+
ids.push(obj.id);
|
|
311
|
+
}
|
|
312
|
+
return __assign(__assign(__assign({}, acc), obj), { individual_data_state: data_state, objects: objects, ids: ids });
|
|
313
|
+
}, {});
|
|
314
|
+
});
|
|
315
|
+
};
|
|
316
|
+
export var sortUserList = function (list) {
|
|
317
|
+
if (!(list === null || list === void 0 ? void 0 : list.length))
|
|
318
|
+
return [];
|
|
319
|
+
return list.sort(function (a, b) { return a.names.en.first.localeCompare(b.names.en.first); });
|
|
320
|
+
};
|
|
321
|
+
export var getIndividualType = function (objects) {
|
|
322
|
+
var isUser = false, isShareholder = false, isBoardMember = false, isBuyer = false, isCustomer = false;
|
|
323
|
+
objects === null || objects === void 0 ? void 0 : objects.forEach(function (type) {
|
|
324
|
+
if (type === IndividualType.USER)
|
|
325
|
+
isUser = true;
|
|
326
|
+
else if (type === IndividualType.SHARE_HOLDER)
|
|
327
|
+
isShareholder = true;
|
|
328
|
+
else if (type === IndividualType.BOARD_MEMBER)
|
|
329
|
+
isBoardMember = true;
|
|
330
|
+
else if (type === IndividualType.BUYER)
|
|
331
|
+
isBuyer = true;
|
|
332
|
+
else if (type === IndividualType.CUSTOMER)
|
|
333
|
+
isCustomer = true;
|
|
334
|
+
});
|
|
335
|
+
return { isUser: isUser, isShareholder: isShareholder, isBoardMember: isBoardMember, isBuyer: isBuyer, isCustomer: isCustomer };
|
|
336
|
+
};
|
|
337
|
+
export function retrieveIndividualData(type, boardData, serviceCallback) {
|
|
338
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
339
|
+
var _a, isShareholder, isBoardMember, isBuyer, isCustomer, data, individualRes, _b, data_state, is_authorized, boardRes, individuals;
|
|
340
|
+
return __generator(this, function (_c) {
|
|
341
|
+
switch (_c.label) {
|
|
342
|
+
case 0:
|
|
343
|
+
_a = getIndividualType([type]), isShareholder = _a.isShareholder, isBoardMember = _a.isBoardMember, isBuyer = _a.isBuyer, isCustomer = _a.isCustomer;
|
|
344
|
+
return [4, serviceCallback()];
|
|
345
|
+
case 1:
|
|
346
|
+
data = _c.sent();
|
|
347
|
+
individualRes = data === null || data === void 0 ? void 0 : data.user;
|
|
348
|
+
if (isShareholder)
|
|
349
|
+
individualRes = data === null || data === void 0 ? void 0 : data.shareholder;
|
|
350
|
+
else if (isBoardMember)
|
|
351
|
+
individualRes = data === null || data === void 0 ? void 0 : data.board_member;
|
|
352
|
+
else if (isBuyer)
|
|
353
|
+
individualRes = data === null || data === void 0 ? void 0 : data.buyer;
|
|
354
|
+
else if (isCustomer)
|
|
355
|
+
individualRes = data === null || data === void 0 ? void 0 : data.customer;
|
|
356
|
+
_b = individualRes || {}, data_state = _b.data_state, is_authorized = _b.is_authorized;
|
|
357
|
+
boardRes = boardData || {};
|
|
358
|
+
if (!is_authorized) {
|
|
359
|
+
individuals = (boardRes || {}).individuals;
|
|
360
|
+
boardRes = __assign(__assign(__assign({}, boardRes), (!is_authorized && { user: individualRes })), { individuals: __assign(__assign({}, individuals), (!!data_state && { data_state: data_state })) });
|
|
361
|
+
}
|
|
362
|
+
return [2, { boardRes: boardRes, individualRes: individualRes }];
|
|
363
|
+
}
|
|
364
|
+
});
|
|
365
|
+
});
|
|
366
|
+
}
|
package/build/utils/date.d.ts
CHANGED
package/build/utils/date.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import moment from 'moment';
|
|
2
|
+
import { convertNumbers2English } from './string';
|
|
2
3
|
export var dateFormat = function (date, fmt) {
|
|
3
4
|
if (fmt === void 0) { fmt = 'YYYY-MM-DD'; }
|
|
4
5
|
return moment(date).format(fmt);
|
|
@@ -9,3 +10,8 @@ export var getFutureDate = function (years) {
|
|
|
9
10
|
maxDate.setFullYear(maxDate.getFullYear() + futureY);
|
|
10
11
|
return maxDate;
|
|
11
12
|
};
|
|
13
|
+
export var convertToEnglishDateFormat = function (d) {
|
|
14
|
+
var date = new Date(d);
|
|
15
|
+
var formattedDate = dateFormat(date, 'YYYY-MM-DD');
|
|
16
|
+
return convertNumbers2English(formattedDate);
|
|
17
|
+
};
|
package/build/utils/error.d.ts
CHANGED
package/build/utils/error.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export var isNetworkError = function (error) {
|
|
2
2
|
return ['network error', 'network request failed'].includes((error || '').trim().toLowerCase());
|
|
3
3
|
};
|
|
4
|
+
export var isTokenExpired = function (error) {
|
|
5
|
+
return ['token expired'].includes((error || '').trim().toLowerCase());
|
|
6
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CountryTrackingData, DataLayer, LeadIdentificationData, PageTrackingData, EventPageTrackingData } from '../@types';
|
|
2
|
+
export declare const pushToDataLayer: (data: DataLayer | CountryTrackingData | LeadIdentificationData | EventPageTrackingData) => void;
|
|
3
|
+
export declare const initializeGTM: () => void;
|
|
4
|
+
export declare const sendCustomEventToGTM: (data: DataLayer) => void;
|
|
5
|
+
export declare const sendCustomDimension: (data: CountryTrackingData | LeadIdentificationData | EventPageTrackingData) => void;
|
|
6
|
+
export declare const sendPageView: (data: PageTrackingData) => void;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import TagManager from 'react-gtm-module';
|
|
13
|
+
export var pushToDataLayer = function (data) {
|
|
14
|
+
if (window.dataLayer) {
|
|
15
|
+
window.dataLayer.push(data);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
export var initializeGTM = function () {
|
|
19
|
+
TagManager.initialize({ gtmId: 'GTM-5RR5CKD' });
|
|
20
|
+
};
|
|
21
|
+
export var sendCustomEventToGTM = function (data) {
|
|
22
|
+
pushToDataLayer(__assign({ event_value: 0, event_noninteraction: 0, event_label: '' }, data));
|
|
23
|
+
};
|
|
24
|
+
export var sendCustomDimension = function (data) {
|
|
25
|
+
pushToDataLayer(data);
|
|
26
|
+
};
|
|
27
|
+
export var sendPageView = function (data) {
|
|
28
|
+
sendCustomDimension(__assign({ event: 'PageView' }, data));
|
|
29
|
+
};
|
package/build/utils/index.d.ts
CHANGED
package/build/utils/index.js
CHANGED
package/build/utils/object.d.ts
CHANGED
|
@@ -3,3 +3,7 @@ export declare const encodeObjectBase64: (obj: any) => string;
|
|
|
3
3
|
export declare const decodeObjectBase64: (str: string) => any;
|
|
4
4
|
export declare const hasKey: (obj: any, key: string) => boolean;
|
|
5
5
|
export declare const concatenateObjectValues: (data: Record<string, any>, keys: Array<string>) => string;
|
|
6
|
+
export declare const hasKeyValue: (obj: any, path: string, value: string | number | boolean) => boolean;
|
|
7
|
+
export declare const hasNoneEditableValue: (obj: any, path: string) => boolean;
|
|
8
|
+
export declare const hasEditableValue: (obj: any, path: string) => boolean;
|
|
9
|
+
export declare const hasVerifiedValue: (obj: any, path: string) => boolean;
|
package/build/utils/object.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { get } from 'lodash-es';
|
|
2
|
+
import { FieldType, VerificationStatus } from '../@types';
|
|
1
3
|
export var compareTwoObjects = function (obj1, obj2) {
|
|
2
4
|
if (obj1 === obj2)
|
|
3
5
|
return true;
|
|
@@ -33,3 +35,18 @@ export var concatenateObjectValues = function (data, keys) {
|
|
|
33
35
|
}
|
|
34
36
|
return result.trim();
|
|
35
37
|
};
|
|
38
|
+
export var hasKeyValue = function (obj, path, value) {
|
|
39
|
+
return get(obj, path) === value;
|
|
40
|
+
};
|
|
41
|
+
export var hasNoneEditableValue = function (obj, path) {
|
|
42
|
+
var value = FieldType.NON_EDITABLE;
|
|
43
|
+
return hasKeyValue(obj, path, value);
|
|
44
|
+
};
|
|
45
|
+
export var hasEditableValue = function (obj, path) {
|
|
46
|
+
var value = FieldType.EDITABLE;
|
|
47
|
+
return hasKeyValue(obj, path, value);
|
|
48
|
+
};
|
|
49
|
+
export var hasVerifiedValue = function (obj, path) {
|
|
50
|
+
var value = VerificationStatus.VERIFIED;
|
|
51
|
+
return hasKeyValue(obj, path, value);
|
|
52
|
+
};
|
package/build/utils/string.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DeviceInfo, User } from '../@types';
|
|
1
|
+
import { DeviceInfo, License, User } from '../@types';
|
|
2
2
|
export declare const maskPhone: (str?: string) => string;
|
|
3
3
|
export declare const shortenString: (str: string, length: number) => string;
|
|
4
4
|
export declare const maskID: (str: string) => string;
|
|
@@ -42,7 +42,7 @@ export declare const getRequestHeaders: (deviceInfo: DeviceInfo) => {
|
|
|
42
42
|
};
|
|
43
43
|
export declare const removeRequestHeaders: () => void;
|
|
44
44
|
export declare const getBaseUrl: () => string;
|
|
45
|
-
export declare const getScreenNameBasedOnFlow: (flow: string, isAuthorizedUser?: boolean) => "CONNECT_NID_STEP" | "" | "BUSINESS_BUSINESS_TYPE_STEP" | "INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP" | "INDIVIDUAL_LIST_STEP" | "BANK_BANK_DETAILS_STEP" | "TAX_TAX_DETAILS_STEP";
|
|
45
|
+
export declare const getScreenNameBasedOnFlow: (flow: string, isAuthorizedUser?: boolean) => "CONNECT_NID_STEP" | "" | "BUSINESS_BUSINESS_TYPE_STEP" | "INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP" | "INDIVIDUAL_LIST_STEP" | "BANK_BANK_DETAILS_STEP" | "TAX_TAX_DETAILS_STEP" | "ENTITY_NAME_STEP" | "BRAND_INFO_STEP";
|
|
46
46
|
export declare const getEighteenYearsAgo: () => string;
|
|
47
47
|
export declare const isKW: (flag: string) => boolean;
|
|
48
48
|
export declare const isSA: (flag: string) => boolean;
|
|
@@ -69,3 +69,6 @@ export declare const getUserNameObject: (name: string) => {
|
|
|
69
69
|
last: string;
|
|
70
70
|
};
|
|
71
71
|
export declare const getFileType: (type: string) => "" | "image/jpeg" | "image/png" | "image/jpg" | "application/pdf";
|
|
72
|
+
export declare const isStringHasOneAsterisk: (value: string) => boolean;
|
|
73
|
+
export declare const isOtherLicense: (item?: License) => boolean;
|
|
74
|
+
export declare const formatNumberAsCurrency: (number: string) => string;
|
package/build/utils/string.js
CHANGED
|
@@ -29,13 +29,13 @@ export var maskEmail = function (str) {
|
|
|
29
29
|
return '';
|
|
30
30
|
};
|
|
31
31
|
export var shortenBrand = function (str) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return
|
|
32
|
+
var trimmedStr = str === null || str === void 0 ? void 0 : str.trim();
|
|
33
|
+
if (!trimmedStr)
|
|
34
|
+
return '';
|
|
35
|
+
var name = trimmedStr.split(' ');
|
|
36
|
+
if (name.length > 1)
|
|
37
|
+
return name[0][0].toUpperCase() + name[name.length - 1][0].toUpperCase();
|
|
38
|
+
return name[0][0].toUpperCase();
|
|
39
39
|
};
|
|
40
40
|
export var showLastFour = function (str) {
|
|
41
41
|
if (str && str.length >= 4) {
|
|
@@ -188,6 +188,12 @@ export var getScreenNameBasedOnFlow = function (flow, isAuthorizedUser) {
|
|
|
188
188
|
if (flow === FlowsTypes.TAX) {
|
|
189
189
|
return 'TAX_TAX_DETAILS_STEP';
|
|
190
190
|
}
|
|
191
|
+
if (flow === FlowsTypes.BRAND) {
|
|
192
|
+
return 'BRAND_INFO_STEP';
|
|
193
|
+
}
|
|
194
|
+
if (flow === FlowsTypes.ENTITY) {
|
|
195
|
+
return 'ENTITY_NAME_STEP';
|
|
196
|
+
}
|
|
191
197
|
return '';
|
|
192
198
|
};
|
|
193
199
|
export var getEighteenYearsAgo = function () {
|
|
@@ -292,3 +298,18 @@ export var getFileType = function (type) {
|
|
|
292
298
|
return '';
|
|
293
299
|
}
|
|
294
300
|
};
|
|
301
|
+
export var isStringHasOneAsterisk = function (value) {
|
|
302
|
+
if (!value)
|
|
303
|
+
return false;
|
|
304
|
+
return value.includes('*') ? true : false;
|
|
305
|
+
};
|
|
306
|
+
export var isOtherLicense = function (item) {
|
|
307
|
+
var _a;
|
|
308
|
+
var number = (_a = item === null || item === void 0 ? void 0 : item.license) === null || _a === void 0 ? void 0 : _a.number;
|
|
309
|
+
return number === 'other_fl' || number === 'other_cr' || number === 'other_entity';
|
|
310
|
+
};
|
|
311
|
+
export var formatNumberAsCurrency = function (number) {
|
|
312
|
+
if (!number)
|
|
313
|
+
return '';
|
|
314
|
+
return parseInt(number).toLocaleString();
|
|
315
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tap-payments/auth-jsconnect",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "connect library, auth",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "build/index.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"README.md"
|
|
12
12
|
],
|
|
13
13
|
"scripts": {
|
|
14
|
-
"
|
|
14
|
+
"prepare": "npx husky install",
|
|
15
15
|
"prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\" *.json *.js",
|
|
16
16
|
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\" *.json *.js",
|
|
17
17
|
"lint": "eslint src --color --ext .js,.jsx,.ts,.tsx,.json",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"@types/react": "^18.0.15",
|
|
39
39
|
"@types/react-calendar": "~3.5.1",
|
|
40
40
|
"@types/react-dom": "^18.0.6",
|
|
41
|
+
"@types/react-gtm-module": "^2.0.1",
|
|
41
42
|
"@typescript-eslint/eslint-plugin": "^5.30.5",
|
|
42
43
|
"@typescript-eslint/parser": "^5.30.5",
|
|
43
44
|
"babel-loader": "^8.2.5",
|
|
@@ -95,6 +96,7 @@
|
|
|
95
96
|
"react-device-detect": "^2.2.2",
|
|
96
97
|
"react-dom": "^18.2.0",
|
|
97
98
|
"react-dropzone": "^14.2.2",
|
|
99
|
+
"react-gtm-module": "^2.0.11",
|
|
98
100
|
"react-hook-form": "^7.33.1",
|
|
99
101
|
"react-i18next": "^11.18.1",
|
|
100
102
|
"react-multi-date-picker": "^3.3.4",
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { useTranslation } from 'react-i18next';
|
|
14
|
-
import { useController, useFormContext } from 'react-hook-form';
|
|
15
|
-
import DatePicker from '../../../../components/DatePicker';
|
|
16
|
-
import Text from '../../../../components/Text';
|
|
17
|
-
import { ScreenContainer } from '../../../shared/Containers';
|
|
18
|
-
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
19
|
-
import { brandSelector, clearError } from '../../../app/brand/brandStore';
|
|
20
|
-
import { alpha, styled } from '@mui/material/styles';
|
|
21
|
-
export var InputLabelStyled = styled(Text)(function (_a) {
|
|
22
|
-
var theme = _a.theme;
|
|
23
|
-
return (__assign({ margin: theme.spacing(2.5, 2.5, 1.5, 2.5), color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
|
|
24
|
-
});
|
|
25
|
-
export var MandatoryStyled = styled('span')(function (_a) {
|
|
26
|
-
var theme = _a.theme;
|
|
27
|
-
return (__assign(__assign({ color: alpha(theme.palette.error.light, 0.4) }, theme.typography.h6), { fontWeight: theme.typography.fontWeightLight, verticalAlign: 'sub' }));
|
|
28
|
-
});
|
|
29
|
-
var OperationStartDate = function (_a) {
|
|
30
|
-
var _b;
|
|
31
|
-
var onDateClicked = _a.onDateClicked;
|
|
32
|
-
var t = useTranslation().t;
|
|
33
|
-
var dispatch = useAppDispatch();
|
|
34
|
-
var control = useFormContext().control;
|
|
35
|
-
var error = useAppSelector(brandSelector).error;
|
|
36
|
-
var oDateControl = useController({ control: control, name: 'operationStartDate' });
|
|
37
|
-
var handleOperationStartDateChange = function (data) {
|
|
38
|
-
if (error)
|
|
39
|
-
dispatch(clearError());
|
|
40
|
-
oDateControl.field.onChange(data);
|
|
41
|
-
};
|
|
42
|
-
var dateValue = (_b = oDateControl === null || oDateControl === void 0 ? void 0 : oDateControl.field) === null || _b === void 0 ? void 0 : _b.value;
|
|
43
|
-
return (_jsxs(ScreenContainer, { children: [_jsxs(InputLabelStyled, { children: [t('business_start_date'), _jsx(MandatoryStyled, { children: "*" })] }), _jsx(DatePicker, { readOnly: true, defaultValue: dateValue ? new Date(dateValue) : new Date(), dir: 'ltr', locale: 'en', onClick: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(true); }, onDatePicked: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(false); }, onDateChange: handleOperationStartDateChange })] }));
|
|
44
|
-
};
|
|
45
|
-
export default OperationStartDate;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ButtonProps } from '../../../components/Button';
|
|
3
|
-
declare type buttonProps = {
|
|
4
|
-
title: string;
|
|
5
|
-
loading: boolean;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
9
|
-
};
|
|
10
|
-
interface ListButtonProps extends ButtonProps {
|
|
11
|
-
isAr: boolean;
|
|
12
|
-
requestEmail: buttonProps & {
|
|
13
|
-
isRequested: boolean;
|
|
14
|
-
};
|
|
15
|
-
addDetails: buttonProps;
|
|
16
|
-
}
|
|
17
|
-
export default function ListButton({ isAr, requestEmail, addDetails }: ListButtonProps): JSX.Element;
|
|
18
|
-
export {};
|