Skip to content

Commit

Permalink
Merge pull request #10 from cashfree/added-wallet-cardless-logos
Browse files Browse the repository at this point in the history
added few bank logos
  • Loading branch information
rajnandan1 authored Feb 7, 2024
2 parents e23c61a + 5a4958c commit 2e1f097
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 21 deletions.
54 changes: 40 additions & 14 deletions dist/image-library.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
a.r(b),
a.d(b, {
default: () => l,
getIcon: () => s,
getIcon: () => t,
getIcons: () => o,
getModesIcons: () => k,
});
Expand Down Expand Up @@ -110,7 +110,7 @@
"hdfcc",
"hdfc bank limited",
],
icici: ["icici", "icici bank", "icicr", "icicc"],
icici: ["icici", "icici bank", "icicir", "icicic"],
idfc: ["idfc", "idfc bank", "idfc first bank", "idfbr"],
indian: ["indian", "indian bank", "idibr"],
indusind: ["indusind", "indusind bank", "indbr"],
Expand Down Expand Up @@ -241,6 +241,13 @@
zob: ["zob", "zoroastrian cooperative bank"],
airtel: ["airtelnb"],
paytm: ["paytmnb"],
idbi: ["idbi", "idbi bank", "idbicorpnb"],
pnsb: ["pnsb", "punjab and sind bank"],
svcb: ["svcb", "shamrao vittal cooperative bank", "svbc"],
cob: ["cob", "cosmos", "cosmos bank"],
jnb: ["jnb", "jana small finance bank"],
usfb: ["usfb", "ujjivan small finance bank"],
citi: ["citi", "citi bank"],
},
cardschemes: {
amex: ["amex"],
Expand All @@ -262,6 +269,7 @@
simpl: ["simpl"],
zestmoneypaylater: ["zestmoney", "zestmoneypaylater"],
mobikwik: ["mobikwikpaylater"],
ringpaylater: ["ringpay", "ringpaylater"],
},
upi: {
bhim: ["bhim", "upi"],
Expand Down Expand Up @@ -294,8 +302,14 @@
paytm: ["paytm"],
phonepe: ["phonepe"],
paypal: ["paypal"],
payzapp: ["payzapp"],
},
cardless: {
flexipay: ["flexipay"],
snapmint: ["snapmint"],
cashe: ["cashe"],
kreditbee: ["kreditbee"],
},
cardless: { flexipay: ["flexipay"] },
},
e = { sm: "32", md: "64", lg: "128", svg: "svg" },
r = { sm: "png", md: "png", lg: "png", svg: "svg" },
Expand Down Expand Up @@ -410,13 +424,25 @@
vijaya: "nb",
vrb: "nb",
zob: "nb",
idbi: "nb",
pnsb: "nb",
svcb: "nb",
cob: "nb",
jnb: "nb",
usfb: "nb",
citi: "nb",
payzapp: "wallet",
ringpaylater: "paylater",
snapmint: "cardless",
cashe: "cardless",
kreditbee: "cardless",
};
function t(a) {
function s(a) {
let b;
return (b = ["sm", "md", "lg", "svg"].includes(a) ? a : "sm"), b;
}
function s(a, b) {
let s = t(b),
function t(a, b) {
let t = s(b),
o = {
icon_name: "default",
icon_version: "1",
Expand All @@ -429,12 +455,12 @@
let n = !0;
return (
Object.keys(b).every(
(t) =>
!b[t].includes(a) ||
(s) =>
!b[s].includes(a) ||
((o = {
icon_name: t,
icon_name: s,
icon_version: "1",
icon_url: `${i}/${c[t]}/${e[s]}/${t}.${r[s]}`,
icon_url: `${i}/${c[s]}/${e[t]}/${s}.${r[t]}`,
}),
(n = !1),
!1)
Expand All @@ -451,27 +477,27 @@
let e = [];
return (
a.forEach((a) => {
e.push(s(a, n));
e.push(t(a, n));
}),
e
);
}
function k(a, b) {
let s = t(b),
let t = s(b),
o = [];
return (
Object.keys(n[a]) &&
Object.keys(n[a]).forEach((a) => {
o.push({
icon_name: a,
icon_version: "1",
icon_url: `${i}/${c[a]}/${e[s]}/${a}.${r[s]}`,
icon_url: `${i}/${c[a]}/${e[t]}/${a}.${r[t]}`,
});
}),
o
);
}
const l = { getIcon: s, getIcons: o, getModesIcons: k };
const l = { getIcon: t, getIcons: o, getModesIcons: k };
return b;
})()
);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "payments-icons-library",
"version": "1.0.9",
"version": "1.1.0",
"description": "",
"main": "dist/image-library.js",
"scripts": {
Expand Down
33 changes: 29 additions & 4 deletions src/nameMapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@ export const nameMapping = {
cub: ["city union bank", "cub", "ciubr", "ciubc", "cubc"],
dbs: ["dbs", "dbs bank", "digibank", "dbssr"],
deutsche: ["deutsche", "deutsche bank", "deutr"],
dhanlakshmi: ["dhanlakshmi", "dhanlakshmi bank", "dlxbr", "dlxbc", "dhanc"],
dhanlakshmi: [
"dhanlakshmi",
"dhanlakshmi bank",
"dlxbr",
"dlxbc",
"dhanc",
],
equitas: [
"equitas small finance bank",
"equitas",
Expand All @@ -59,7 +65,7 @@ export const nameMapping = {
],
federal: ["federal bank", "federal", "fdrlr"],
hdfc: ["hdfc", "hdfc bank", "hdfcr", "hdfcc", "hdfc bank limited"],
icici: ["icici", "icici bank", "icicr", "icicc"],
icici: ["icici", "icici bank", "icicir", "icicic"],
idfc: ["idfc", "idfc bank", "idfc first bank", "idfbr"],
indian: ["indian", "indian bank", "idibr"],
indusind: ["indusind", "indusind bank", "indbr"],
Expand Down Expand Up @@ -137,7 +143,14 @@ export const nameMapping = {
sur: ["sur", "sur bank", "surat peoples cooperative bank"],
tamcop: ["tamcop", "tamcop bank"],
tammerc: ["tammerc", "tammerc bank"],
uco: ["uco", "uco bank", "united commercial bank", "ucbar", "ucbac", "ucc"],
uco: [
"uco",
"uco bank",
"united commercial bank",
"ucbar",
"ucbac",
"ucc",
],
union: ["union", "union bank", "ubinr", "ubinc", "ubic"],
utk: [
"utk",
Expand Down Expand Up @@ -177,7 +190,14 @@ export const nameMapping = {
vrb: ["vrb", "varachha", "varachha cooperative bank"],
zob: ["zob", "zoroastrian cooperative bank"],
airtel: ["airtelnb"],
paytm: ["paytmnb"]
paytm: ["paytmnb"],
idbi: ["idbi", "idbi bank", "idbicorpnb"],
pnsb: ["pnsb", "punjab and sind bank"],
svcb: ["svcb", "shamrao vittal cooperative bank", "svbc"],
cob: ["cob", "cosmos", "cosmos bank"],
jnb: ["jnb", "jana small finance bank"],
usfb: ["usfb", "ujjivan small finance bank"],
citi: ["citi", "citi bank"],
},
cardschemes: {
amex: ["amex"],
Expand All @@ -199,6 +219,7 @@ export const nameMapping = {
simpl: ["simpl"],
zestmoneypaylater: ["zestmoney", "zestmoneypaylater"],
mobikwik: ["mobikwikpaylater"],
ringpaylater: ["ringpay", "ringpaylater"],
},
upi: {
bhim: ["bhim", "upi"],
Expand Down Expand Up @@ -231,8 +252,12 @@ export const nameMapping = {
paytm: ["paytm"],
phonepe: ["phonepe"],
paypal: ["paypal"],
payzapp: ["payzapp"],
},
cardless: {
flexipay: ["flexipay"],
snapmint: ["snapmint"],
cashe: ["cashe"],
kreditbee: ["kreditbee"],
},
};
17 changes: 15 additions & 2 deletions src/utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export default {
svg: "svg",
},
IMAGE_URL: "https://cashfreelogo.cashfree.com/assets_images/pg",
DEFAULT_URL: "https://cashfreelogo.cashfree.com/assets_images/pg/nb/svg/default.svg",
DEFAULT_URL:
"https://cashfreelogo.cashfree.com/assets_images/pg/nb/svg/default.svg",
PAYMENT_MODE_MAPPING: {
aus: "nb",
axis: "nb",
Expand Down Expand Up @@ -122,6 +123,18 @@ export default {
tjb: "nb",
vijaya: "nb",
vrb: "nb",
zob: "nb"
zob: "nb",
idbi: "nb",
pnsb: "nb",
svcb: "nb",
cob: "nb",
jnb: "nb",
usfb: "nb",
citi: "nb",
payzapp: "wallet",
ringpaylater: "paylater",
snapmint: "cardless",
cashe: "cardless",
kreditbee: "cardless"
},
};

0 comments on commit 2e1f097

Please sign in to comment.