From 81fdda0252a14e52627c93368ad93afbc952b732 Mon Sep 17 00:00:00 2001 From: Riddhi Agrawal Date: Fri, 1 Dec 2023 18:12:03 +0530 Subject: [PATCH] feat: ConnectorIcons and Searchbar for conenctor --- public/hyperswitch/Gateway/ACI.svg | 25 ++- public/hyperswitch/Gateway/ADYEN.svg | 8 +- public/hyperswitch/Gateway/AIRWALLEX.svg | 38 +--- .../hyperswitch/Gateway/AUTHORIZEDOTNET.svg | 18 +- public/hyperswitch/Gateway/BAMBORA.svg | 125 +++++++++--- public/hyperswitch/Gateway/BANKOFAMERICA.svg | 43 ++--- public/hyperswitch/Gateway/BITPAY.svg | 46 ++--- public/hyperswitch/Gateway/BLUESNAP.svg | 33 +--- public/hyperswitch/Gateway/BRAINTREE,.svg | 11 -- public/hyperswitch/Gateway/BRAINTREE.svg | 5 +- public/hyperswitch/Gateway/CASHTOCODE.svg | 31 +-- public/hyperswitch/Gateway/CHECKOUT.svg | 5 +- public/hyperswitch/Gateway/COINBASE.svg | 12 +- public/hyperswitch/Gateway/CRYPTOPAY.svg | 34 +--- public/hyperswitch/Gateway/CYBERSOURCE.svg | 9 +- public/hyperswitch/Gateway/DLOCAL.svg | 33 +--- public/hyperswitch/Gateway/FISERV.svg | 73 ++++--- public/hyperswitch/Gateway/FORTE.svg | 37 +--- public/hyperswitch/Gateway/GLOBALPAY.svg | 26 +-- public/hyperswitch/Gateway/GLOBEPAY.svg | 19 +- public/hyperswitch/Gateway/GOCARDLESS.svg | 16 +- public/hyperswitch/Gateway/IATAPAY.svg | 36 ++-- public/hyperswitch/Gateway/KLARNA.svg | 20 +- public/hyperswitch/Gateway/MOLLIE.svg | 32 +--- public/hyperswitch/Gateway/MULTISAFEPAY.svg | 33 +--- public/hyperswitch/Gateway/NEXINETS.svg | 35 +--- public/hyperswitch/Gateway/NMI.svg | 38 +--- public/hyperswitch/Gateway/NOON.svg | 77 +------- public/hyperswitch/Gateway/NUVEI.svg | 44 ++--- public/hyperswitch/Gateway/OPENNODE.svg | 23 ++- public/hyperswitch/Gateway/PAYME.svg | 19 +- public/hyperswitch/Gateway/PAYPAL.svg | 9 +- public/hyperswitch/Gateway/PAYU.svg | 12 +- public/hyperswitch/Gateway/POWERTRANZ.svg | 12 +- public/hyperswitch/Gateway/PROPHETPAY.svg | 13 +- public/hyperswitch/Gateway/RAPYD.svg | 43 ++--- public/hyperswitch/Gateway/SHIFT4.svg | 43 ++--- public/hyperswitch/Gateway/STAX.svg | 39 ++-- public/hyperswitch/Gateway/STRIPE.svg | 19 +- public/hyperswitch/Gateway/TRUSTPAY.svg | 7 +- public/hyperswitch/Gateway/TSYS.svg | 20 +- public/hyperswitch/Gateway/VOLT.svg | 21 +- public/hyperswitch/Gateway/WORLDLINE.svg | 44 ++--- public/hyperswitch/Gateway/WORLDPAY.svg | 48 +---- public/hyperswitch/Gateway/ZEN.svg | 13 +- .../priority-logics/AddPLGateway.res | 1 + .../Connectors/ConnectorAccountDetails.res | 4 +- .../HyperSwitch/Connectors/ConnectorList.res | 180 ++++++++++++------ .../Connectors/ConnectorPaymentMethod.res | 4 +- .../Connectors/ConnectorPreview.res | 3 +- .../Connectors/ConnectorWebhooks.res | 4 +- .../HyperSwitch/HSwitchRemoteFilter.res | 2 +- .../Utils/HSwitchGlobalSearchBar.res | 45 ++--- src/utils/LogicUtils.res | 30 +++ 54 files changed, 630 insertions(+), 990 deletions(-) delete mode 100644 public/hyperswitch/Gateway/BRAINTREE,.svg diff --git a/public/hyperswitch/Gateway/ACI.svg b/public/hyperswitch/Gateway/ACI.svg index b03aa675f..1ed65dcd3 100644 --- a/public/hyperswitch/Gateway/ACI.svg +++ b/public/hyperswitch/Gateway/ACI.svg @@ -1,9 +1,18 @@ - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/public/hyperswitch/Gateway/ADYEN.svg b/public/hyperswitch/Gateway/ADYEN.svg index 1cfb88e78..f4095e3b9 100644 --- a/public/hyperswitch/Gateway/ADYEN.svg +++ b/public/hyperswitch/Gateway/ADYEN.svg @@ -1,5 +1,5 @@ - - - - + + + + diff --git a/public/hyperswitch/Gateway/AIRWALLEX.svg b/public/hyperswitch/Gateway/AIRWALLEX.svg index 9414ff88a..5defb5f9d 100644 --- a/public/hyperswitch/Gateway/AIRWALLEX.svg +++ b/public/hyperswitch/Gateway/AIRWALLEX.svg @@ -1,29 +1,11 @@ - - - - - - - - + + + + + + + + + + diff --git a/public/hyperswitch/Gateway/AUTHORIZEDOTNET.svg b/public/hyperswitch/Gateway/AUTHORIZEDOTNET.svg index ed45d04db..1894e1a85 100644 --- a/public/hyperswitch/Gateway/AUTHORIZEDOTNET.svg +++ b/public/hyperswitch/Gateway/AUTHORIZEDOTNET.svg @@ -1,14 +1,6 @@ - - - - - - - - - - - - - + + + + + diff --git a/public/hyperswitch/Gateway/BAMBORA.svg b/public/hyperswitch/Gateway/BAMBORA.svg index 18babfc47..6c8c94cf9 100644 --- a/public/hyperswitch/Gateway/BAMBORA.svg +++ b/public/hyperswitch/Gateway/BAMBORA.svg @@ -1,29 +1,98 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/hyperswitch/Gateway/BANKOFAMERICA.svg b/public/hyperswitch/Gateway/BANKOFAMERICA.svg index dffcb704c..518551a55 100644 --- a/public/hyperswitch/Gateway/BANKOFAMERICA.svg +++ b/public/hyperswitch/Gateway/BANKOFAMERICA.svg @@ -1,29 +1,16 @@ - - - - - - - - + + + + + + + + + + + + + + + diff --git a/public/hyperswitch/Gateway/BITPAY.svg b/public/hyperswitch/Gateway/BITPAY.svg index a273cffa8..03ac70f7d 100644 --- a/public/hyperswitch/Gateway/BITPAY.svg +++ b/public/hyperswitch/Gateway/BITPAY.svg @@ -1,30 +1,18 @@ - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/public/hyperswitch/Gateway/BLUESNAP.svg b/public/hyperswitch/Gateway/BLUESNAP.svg index ba0493c94..7257803b5 100644 --- a/public/hyperswitch/Gateway/BLUESNAP.svg +++ b/public/hyperswitch/Gateway/BLUESNAP.svg @@ -1,29 +1,6 @@ - - - - - - - - + + + + + diff --git a/public/hyperswitch/Gateway/BRAINTREE,.svg b/public/hyperswitch/Gateway/BRAINTREE,.svg deleted file mode 100644 index e2cf25df9..000000000 --- a/public/hyperswitch/Gateway/BRAINTREE,.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/public/hyperswitch/Gateway/BRAINTREE.svg b/public/hyperswitch/Gateway/BRAINTREE.svg index a3c1080b1..6140a3f81 100644 --- a/public/hyperswitch/Gateway/BRAINTREE.svg +++ b/public/hyperswitch/Gateway/BRAINTREE.svg @@ -1,4 +1,5 @@ - - + + + diff --git a/public/hyperswitch/Gateway/CASHTOCODE.svg b/public/hyperswitch/Gateway/CASHTOCODE.svg index 0136f6cc6..8e253649e 100644 --- a/public/hyperswitch/Gateway/CASHTOCODE.svg +++ b/public/hyperswitch/Gateway/CASHTOCODE.svg @@ -1,26 +1,7 @@ - - - - - - - - + + + + + + diff --git a/public/hyperswitch/Gateway/CHECKOUT.svg b/public/hyperswitch/Gateway/CHECKOUT.svg index f68198419..0c2026c20 100644 --- a/public/hyperswitch/Gateway/CHECKOUT.svg +++ b/public/hyperswitch/Gateway/CHECKOUT.svg @@ -1,4 +1,5 @@ - - + + + diff --git a/public/hyperswitch/Gateway/COINBASE.svg b/public/hyperswitch/Gateway/COINBASE.svg index 8581d97e0..448c42433 100644 --- a/public/hyperswitch/Gateway/COINBASE.svg +++ b/public/hyperswitch/Gateway/COINBASE.svg @@ -1,9 +1,5 @@ - - - - - - - - + + + + diff --git a/public/hyperswitch/Gateway/CRYPTOPAY.svg b/public/hyperswitch/Gateway/CRYPTOPAY.svg index 56e18e4f0..c223f189e 100644 --- a/public/hyperswitch/Gateway/CRYPTOPAY.svg +++ b/public/hyperswitch/Gateway/CRYPTOPAY.svg @@ -1,31 +1,5 @@ - - - - - - - - - - - - - + + + + diff --git a/public/hyperswitch/Gateway/CYBERSOURCE.svg b/public/hyperswitch/Gateway/CYBERSOURCE.svg index 387a3a2c9..e79e20c75 100644 --- a/public/hyperswitch/Gateway/CYBERSOURCE.svg +++ b/public/hyperswitch/Gateway/CYBERSOURCE.svg @@ -1,6 +1,7 @@ - - - - + + + + + diff --git a/public/hyperswitch/Gateway/DLOCAL.svg b/public/hyperswitch/Gateway/DLOCAL.svg index c64144a70..c59c83768 100644 --- a/public/hyperswitch/Gateway/DLOCAL.svg +++ b/public/hyperswitch/Gateway/DLOCAL.svg @@ -1,29 +1,6 @@ - - - - - - - - + + + + + diff --git a/public/hyperswitch/Gateway/FISERV.svg b/public/hyperswitch/Gateway/FISERV.svg index 4446c6eaf..26a34922d 100644 --- a/public/hyperswitch/Gateway/FISERV.svg +++ b/public/hyperswitch/Gateway/FISERV.svg @@ -1,41 +1,34 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/hyperswitch/Gateway/FORTE.svg b/public/hyperswitch/Gateway/FORTE.svg index e358cd7a0..b32ccdfc4 100644 --- a/public/hyperswitch/Gateway/FORTE.svg +++ b/public/hyperswitch/Gateway/FORTE.svg @@ -1,29 +1,10 @@ - - - - - - - - + + + + + + + + + diff --git a/public/hyperswitch/Gateway/GLOBALPAY.svg b/public/hyperswitch/Gateway/GLOBALPAY.svg index 25197f302..991324a6a 100644 --- a/public/hyperswitch/Gateway/GLOBALPAY.svg +++ b/public/hyperswitch/Gateway/GLOBALPAY.svg @@ -1,22 +1,6 @@ - - - - - - - - - - + + + + + diff --git a/public/hyperswitch/Gateway/GLOBEPAY.svg b/public/hyperswitch/Gateway/GLOBEPAY.svg index b0248394d..876ba1f17 100644 --- a/public/hyperswitch/Gateway/GLOBEPAY.svg +++ b/public/hyperswitch/Gateway/GLOBEPAY.svg @@ -1,14 +1,7 @@ - - - - - - - - - - - - - + + + + + + diff --git a/public/hyperswitch/Gateway/GOCARDLESS.svg b/public/hyperswitch/Gateway/GOCARDLESS.svg index d6900cff7..d57bc7176 100644 --- a/public/hyperswitch/Gateway/GOCARDLESS.svg +++ b/public/hyperswitch/Gateway/GOCARDLESS.svg @@ -1,12 +1,6 @@ - - - - - - - - - - - + + + + + diff --git a/public/hyperswitch/Gateway/IATAPAY.svg b/public/hyperswitch/Gateway/IATAPAY.svg index 3d579b30f..7e3b5a85a 100644 --- a/public/hyperswitch/Gateway/IATAPAY.svg +++ b/public/hyperswitch/Gateway/IATAPAY.svg @@ -1,26 +1,12 @@ - - - - - - - - + + + + + + + + + + + diff --git a/public/hyperswitch/Gateway/KLARNA.svg b/public/hyperswitch/Gateway/KLARNA.svg index 4bedd5c42..358ff6e37 100644 --- a/public/hyperswitch/Gateway/KLARNA.svg +++ b/public/hyperswitch/Gateway/KLARNA.svg @@ -1,17 +1,5 @@ - - - - - - - - - - - - - - - - + + + + diff --git a/public/hyperswitch/Gateway/MOLLIE.svg b/public/hyperswitch/Gateway/MOLLIE.svg index 5dcfe70ee..9f932bd9d 100644 --- a/public/hyperswitch/Gateway/MOLLIE.svg +++ b/public/hyperswitch/Gateway/MOLLIE.svg @@ -1,29 +1,5 @@ - - - - - - - - + + + + diff --git a/public/hyperswitch/Gateway/MULTISAFEPAY.svg b/public/hyperswitch/Gateway/MULTISAFEPAY.svg index 2ab336149..74bb05262 100644 --- a/public/hyperswitch/Gateway/MULTISAFEPAY.svg +++ b/public/hyperswitch/Gateway/MULTISAFEPAY.svg @@ -1,29 +1,6 @@ - - - - - - - - + + + + + diff --git a/public/hyperswitch/Gateway/NEXINETS.svg b/public/hyperswitch/Gateway/NEXINETS.svg index 831c9f5e9..ec146a66b 100644 --- a/public/hyperswitch/Gateway/NEXINETS.svg +++ b/public/hyperswitch/Gateway/NEXINETS.svg @@ -1,29 +1,8 @@ - - - - - - - - + + + + + + + diff --git a/public/hyperswitch/Gateway/NMI.svg b/public/hyperswitch/Gateway/NMI.svg index 0df7ff847..4c2a942da 100644 --- a/public/hyperswitch/Gateway/NMI.svg +++ b/public/hyperswitch/Gateway/NMI.svg @@ -1,29 +1,11 @@ - - - - - - - - + + + + + + + + + + diff --git a/public/hyperswitch/Gateway/NOON.svg b/public/hyperswitch/Gateway/NOON.svg index a402e66cc..63fea799f 100644 --- a/public/hyperswitch/Gateway/NOON.svg +++ b/public/hyperswitch/Gateway/NOON.svg @@ -1,73 +1,6 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + diff --git a/public/hyperswitch/Gateway/NUVEI.svg b/public/hyperswitch/Gateway/NUVEI.svg index b8f69dab3..fbb6c15ad 100644 --- a/public/hyperswitch/Gateway/NUVEI.svg +++ b/public/hyperswitch/Gateway/NUVEI.svg @@ -1,29 +1,17 @@ - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/public/hyperswitch/Gateway/OPENNODE.svg b/public/hyperswitch/Gateway/OPENNODE.svg index 0d56fea6c..256d4e285 100644 --- a/public/hyperswitch/Gateway/OPENNODE.svg +++ b/public/hyperswitch/Gateway/OPENNODE.svg @@ -1,9 +1,20 @@ - - + + + + + + + + + + + + + + - - - - + + + diff --git a/public/hyperswitch/Gateway/PAYME.svg b/public/hyperswitch/Gateway/PAYME.svg index 5e11c8ad5..d3940a755 100644 --- a/public/hyperswitch/Gateway/PAYME.svg +++ b/public/hyperswitch/Gateway/PAYME.svg @@ -1,14 +1,7 @@ - - - - - - - - - - - - - + + + + + + diff --git a/public/hyperswitch/Gateway/PAYPAL.svg b/public/hyperswitch/Gateway/PAYPAL.svg index ec0d03537..f05d99443 100644 --- a/public/hyperswitch/Gateway/PAYPAL.svg +++ b/public/hyperswitch/Gateway/PAYPAL.svg @@ -1,6 +1,7 @@ - - - - + + + + + diff --git a/public/hyperswitch/Gateway/PAYU.svg b/public/hyperswitch/Gateway/PAYU.svg index 86df94018..db9c7fa38 100644 --- a/public/hyperswitch/Gateway/PAYU.svg +++ b/public/hyperswitch/Gateway/PAYU.svg @@ -1,4 +1,12 @@ - - + + + + + + + + + + diff --git a/public/hyperswitch/Gateway/POWERTRANZ.svg b/public/hyperswitch/Gateway/POWERTRANZ.svg index 7d644a886..fd31975f0 100644 --- a/public/hyperswitch/Gateway/POWERTRANZ.svg +++ b/public/hyperswitch/Gateway/POWERTRANZ.svg @@ -1,9 +1,5 @@ - - - - - - - - + + + + diff --git a/public/hyperswitch/Gateway/PROPHETPAY.svg b/public/hyperswitch/Gateway/PROPHETPAY.svg index 822a035c5..55476013f 100644 --- a/public/hyperswitch/Gateway/PROPHETPAY.svg +++ b/public/hyperswitch/Gateway/PROPHETPAY.svg @@ -1,9 +1,6 @@ - - - - - - - - + + + + + diff --git a/public/hyperswitch/Gateway/RAPYD.svg b/public/hyperswitch/Gateway/RAPYD.svg index 58faf2eed..c8c934616 100644 --- a/public/hyperswitch/Gateway/RAPYD.svg +++ b/public/hyperswitch/Gateway/RAPYD.svg @@ -1,29 +1,16 @@ - - - - - - - - + + + + + + + + + + + + + + + diff --git a/public/hyperswitch/Gateway/SHIFT4.svg b/public/hyperswitch/Gateway/SHIFT4.svg index d56d816cd..7c71eb7bd 100644 --- a/public/hyperswitch/Gateway/SHIFT4.svg +++ b/public/hyperswitch/Gateway/SHIFT4.svg @@ -1,29 +1,16 @@ - - - - - - - - + + + + + + + + + + + + + + + diff --git a/public/hyperswitch/Gateway/STAX.svg b/public/hyperswitch/Gateway/STAX.svg index d9d338cc1..3ba608d3f 100644 --- a/public/hyperswitch/Gateway/STAX.svg +++ b/public/hyperswitch/Gateway/STAX.svg @@ -1,29 +1,12 @@ - - - - - - - - + + + + + + + + + + + diff --git a/public/hyperswitch/Gateway/STRIPE.svg b/public/hyperswitch/Gateway/STRIPE.svg index 62a4d5dfa..5c81cb479 100644 --- a/public/hyperswitch/Gateway/STRIPE.svg +++ b/public/hyperswitch/Gateway/STRIPE.svg @@ -1,12 +1,11 @@ - - - - - - + + + + - - - + + + + - + \ No newline at end of file diff --git a/public/hyperswitch/Gateway/TRUSTPAY.svg b/public/hyperswitch/Gateway/TRUSTPAY.svg index 208e4c1b4..98845d079 100644 --- a/public/hyperswitch/Gateway/TRUSTPAY.svg +++ b/public/hyperswitch/Gateway/TRUSTPAY.svg @@ -1,5 +1,6 @@ - - - + + + + diff --git a/public/hyperswitch/Gateway/TSYS.svg b/public/hyperswitch/Gateway/TSYS.svg index db3ea804d..348da1e25 100644 --- a/public/hyperswitch/Gateway/TSYS.svg +++ b/public/hyperswitch/Gateway/TSYS.svg @@ -1,14 +1,8 @@ - - - - - - - - - - - - - + + + + + + + diff --git a/public/hyperswitch/Gateway/VOLT.svg b/public/hyperswitch/Gateway/VOLT.svg index 623d2e63c..f1fd13a0c 100644 --- a/public/hyperswitch/Gateway/VOLT.svg +++ b/public/hyperswitch/Gateway/VOLT.svg @@ -1,17 +1,6 @@ - - - - + + + + + diff --git a/public/hyperswitch/Gateway/WORLDLINE.svg b/public/hyperswitch/Gateway/WORLDLINE.svg index e3d73b7a2..1f0f23fad 100644 --- a/public/hyperswitch/Gateway/WORLDLINE.svg +++ b/public/hyperswitch/Gateway/WORLDLINE.svg @@ -1,26 +1,20 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/public/hyperswitch/Gateway/WORLDPAY.svg b/public/hyperswitch/Gateway/WORLDPAY.svg index 04cc3c665..7b6a7b169 100644 --- a/public/hyperswitch/Gateway/WORLDPAY.svg +++ b/public/hyperswitch/Gateway/WORLDPAY.svg @@ -1,45 +1,5 @@ - - - - - - - - - - - - - - - - - + + + + diff --git a/public/hyperswitch/Gateway/ZEN.svg b/public/hyperswitch/Gateway/ZEN.svg index c94e7fd9f..10b921919 100644 --- a/public/hyperswitch/Gateway/ZEN.svg +++ b/public/hyperswitch/Gateway/ZEN.svg @@ -1,9 +1,6 @@ - - - - - - - - + + + + + diff --git a/src/components/priority-logics/AddPLGateway.res b/src/components/priority-logics/AddPLGateway.res index 1df692d5c..6001c2f9b 100644 --- a/src/components/priority-logics/AddPLGateway.res +++ b/src/components/priority-logics/AddPLGateway.res @@ -231,6 +231,7 @@ let make = ( fixedDropDownDirection=SelectBox.TopRight searchable=true defaultLeftIcon={FontAwesome("plus")} + maxHeight="max-h-full sm:max-h-64" /> {React.string("*")} diff --git a/src/screens/HyperSwitch/Connectors/ConnectorAccountDetails.res b/src/screens/HyperSwitch/Connectors/ConnectorAccountDetails.res index b70337231..b0dcafced 100644 --- a/src/screens/HyperSwitch/Connectors/ConnectorAccountDetails.res +++ b/src/screens/HyperSwitch/Connectors/ConnectorAccountDetails.res @@ -481,9 +481,7 @@ let make = ( formClass="flex flex-col ">
- Js.String2.toUpperCase} className="w-14 h-14 rounded-full" - /> + Js.String2.toUpperCase} className="w-14 h-14" />

{connector->LogicUtils.capitalizeString->React.string}

diff --git a/src/screens/HyperSwitch/Connectors/ConnectorList.res b/src/screens/HyperSwitch/Connectors/ConnectorList.res index 8cca1013e..3b4b45736 100644 --- a/src/screens/HyperSwitch/Connectors/ConnectorList.res +++ b/src/screens/HyperSwitch/Connectors/ConnectorList.res @@ -1,3 +1,6 @@ +external formEventToStr: ReactEvent.Form.t => string = "%identity" + +let p1MediumTextStyle = HSwitchUtils.getTextClass(~textVariant=P1, ~paragraphTextVariant=Medium, ()) module NewProcessorCards = { @react.component let make = ( @@ -24,6 +27,7 @@ module NewProcessorCards = { ) let (showModal, setShowModal) = React.useState(_ => false) + let (searchedConnector, setSearchedConnector) = React.useState(_ => "") let urlPrefix = isPayoutFlow ? "payoutconnectors/new" : "connectors/new" let handleClick = connectorName => { @@ -31,7 +35,25 @@ module NewProcessorCards = { } let unConfiguredConnectorsCount = unConfiguredConnectors->Js.Array2.length - let descriptedConnectors = (connectorList, heading, showRequestConnectorBtn) => { + let input: ReactFinalForm.fieldRenderPropsInput = { + name: "string", + onBlur: _ev => (), + onChange: ev => { + let value = {ev->ReactEvent.Form.target}["value"] + setSearchedConnector(_ => value) + }, + onFocus: _ev => (), + value: searchedConnector->Js.Json.string, + checked: true, + } + + let descriptedConnectors = ( + connectorList, + heading, + showRequestConnectorBtn, + ~showSearch=true, + (), + ) => { <>

-
- {connectorList - ->Array.mapWithIndex((connector, i) => { - let connectorName = connector->ConnectorUtils.getConnectorNameString - let connectorInfo = connector->ConnectorUtils.getConnectorInfo - let size = switch connectorName->ConnectorUtils.getConnectorNameTypeFromString { - | PHONYPAY | PRETENDPAY | FAUXPAY => "w-8 h-8" - | _ => "w-14 h-14 rounded-full" - } + + } + /> + + Js.Array2.length > 0}> +
+ {connectorList + ->Array.mapWithIndex((connector, i) => { + let connectorName = connector->ConnectorUtils.getConnectorNameString + let connectorInfo = connector->ConnectorUtils.getConnectorInfo + let size = "w-14 h-14 rounded-sm" -
string_of_int} - className="border p-8 gap-4 bg-white rounded flex flex-col justify-between"> -
- Js.String2.toUpperCase} className=size /> -

- {connectorName->LogicUtils.capitalizeString->React.string} -

-
-
- {connectorInfo.description->React.string} +
string_of_int} + className="border p-6 gap-4 bg-white rounded flex flex-col justify-between"> +
+ Js.String2.toUpperCase} className=size /> +

+ {connectorName->LogicUtils.capitalizeString->React.string} +

+
+
+ {connectorInfo.description->React.string} +
+
-
- }) - ->React.array} -
+ }) + ->React.array} +
+
+ Js.Array2.length === 0}> +

+ {"No processor found !!"->React.string} +

+
} - let iconsConnectors = (connectorList, heading, showRequestConnectorBtn) => { + let iconsConnectors = ( + connectorList, + heading, + showRequestConnectorBtn, + ~showSearch=true, + (), + ) => { <>

-
- {connectorList - ->Array.mapWithIndex((connector, i) => { - let connectorName = connector->ConnectorUtils.getConnectorNameString - let size = switch connectorName->ConnectorUtils.getConnectorNameTypeFromString { - | PHONYPAY | PRETENDPAY | FAUXPAY => "w-8 h-8" - | _ => "w-14 h-14 rounded-full" - } - string_of_int} - description={connectorName->LogicUtils.capitalizeString} - toolTipFor={
handleClick(connectorName)}> - Js.String2.toUpperCase} className=size /> -
} - toolTipPosition={Top} - tooltipWidthClass="w-30" - /> - }) - ->React.array} + + } + /> + +
+ Js.Array2.length > 0}> + {connectorList + ->Array.mapWithIndex((connector, i) => { + let connectorName = connector->ConnectorUtils.getConnectorNameString + let size = "w-14 h-14 rounded-sm" + string_of_int} + description={connectorName->LogicUtils.capitalizeString} + toolTipFor={
handleClick(connectorName)}> + Js.String2.toUpperCase} className=size /> +
} + toolTipPosition={Top} + tooltipWidthClass="w-30" + /> + }) + ->React.array} +
+ Js.Array2.length === 0}> +

+ {"No processor found !!"->React.string} +

+
} + let connectorListFiltered = { + if searchedConnector->Js.String2.length > 0 { + connectorsAvailableForIntegration->Js.Array2.filter(item => + LogicUtils.checkStringStartsWithSubstring( + ~itemToCheck=item->ConnectorUtils.getConnectorNameString, + ~searchText=searchedConnector->Js.String2.toLowerCase, + ) + ) + } else { + connectorsAvailableForIntegration + } + } 0}>
{if showIcons { <> - {connectorsAvailableForIntegration->iconsConnectors("Connect a new connector", true)} + {connectorListFiltered->iconsConnectors("Connect a new connector", true, ())} { {featureFlagDetails.testProcessors ->ConnectorUtils.dummyConnectorList - ->iconsConnectors("Connect a test connector", false)} + ->iconsConnectors("Connect a test connector", false, ~showSearch=false, ())} } } else { @@ -136,12 +201,9 @@ module NewProcessorCards = { {featureFlagDetails.testProcessors ->ConnectorUtils.dummyConnectorList - ->descriptedConnectors("Connect a test connector", false)} + ->descriptedConnectors("Connect a test connector", false, ~showSearch=false, ())} - {connectorsAvailableForIntegration->descriptedConnectors( - "Connect a new connector", - true, - )} + {connectorListFiltered->descriptedConnectors("Connect a new connector", true, ())} }}
diff --git a/src/screens/HyperSwitch/Connectors/ConnectorPaymentMethod.res b/src/screens/HyperSwitch/Connectors/ConnectorPaymentMethod.res index 05997d4a8..9aa797cd4 100644 --- a/src/screens/HyperSwitch/Connectors/ConnectorPaymentMethod.res +++ b/src/screens/HyperSwitch/Connectors/ConnectorPaymentMethod.res @@ -86,9 +86,7 @@ let make = (
- Js.String2.toUpperCase} className="w-14 h-14 rounded-full" - /> + Js.String2.toUpperCase} className="w-14 h-14" />

{connector->LogicUtils.capitalizeString->React.string}

diff --git a/src/screens/HyperSwitch/Connectors/ConnectorPreview.res b/src/screens/HyperSwitch/Connectors/ConnectorPreview.res index 2123eeab2..1a1b29226 100644 --- a/src/screens/HyperSwitch/Connectors/ConnectorPreview.res +++ b/src/screens/HyperSwitch/Connectors/ConnectorPreview.res @@ -272,8 +272,7 @@ let make = (
Js.String2.toUpperCase} - className="w-14 h-14 rounded-full" + gateway={connectorInfo.connector_name->Js.String2.toUpperCase} className="w-14 h-14" />

{connectorInfo.connector_name->LogicUtils.capitalizeString->React.string} diff --git a/src/screens/HyperSwitch/Connectors/ConnectorWebhooks.res b/src/screens/HyperSwitch/Connectors/ConnectorWebhooks.res index 614df31b3..6cde1d7c5 100644 --- a/src/screens/HyperSwitch/Connectors/ConnectorWebhooks.res +++ b/src/screens/HyperSwitch/Connectors/ConnectorWebhooks.res @@ -57,9 +57,7 @@ let make = (~connectorName, ~setCurrentStep, ~currentStep, ~isUpdateFlow) => {
- Js.String2.toUpperCase} className="w-14 h-14 rounded-full" - /> + Js.String2.toUpperCase} className="w-14 h-14" />

{connectorName->LogicUtils.capitalizeString->React.string}

diff --git a/src/screens/HyperSwitch/HSwitchRemoteFilter.res b/src/screens/HyperSwitch/HSwitchRemoteFilter.res index cafc07e40..dbe71f353 100644 --- a/src/screens/HyperSwitch/HSwitchRemoteFilter.res +++ b/src/screens/HyperSwitch/HSwitchRemoteFilter.res @@ -201,7 +201,7 @@ module SearchBarFilter = {