From 5a4958ce6b86d9c40b430e440c4db8f8f9e2b331 Mon Sep 17 00:00:00 2001 From: Harshith Kanigalpula S Date: Wed, 7 Feb 2024 00:30:41 +0530 Subject: [PATCH] added few bank logos --- dist/image-library.js | 54 ++++++++++++++++++++++++++++++++----------- package.json | 2 +- src/nameMapping.js | 33 ++++++++++++++++++++++---- src/utility.js | 17 ++++++++++++-- 4 files changed, 85 insertions(+), 21 deletions(-) diff --git a/dist/image-library.js b/dist/image-library.js index ee9c334..159c7be 100644 --- a/dist/image-library.js +++ b/dist/image-library.js @@ -33,7 +33,7 @@ a.r(b), a.d(b, { default: () => l, - getIcon: () => s, + getIcon: () => t, getIcons: () => o, getModesIcons: () => k, }); @@ -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"], @@ -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"], @@ -262,6 +269,7 @@ simpl: ["simpl"], zestmoneypaylater: ["zestmoney", "zestmoneypaylater"], mobikwik: ["mobikwikpaylater"], + ringpaylater: ["ringpay", "ringpaylater"], }, upi: { bhim: ["bhim", "upi"], @@ -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" }, @@ -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", @@ -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) @@ -451,13 +477,13 @@ 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]) && @@ -465,13 +491,13 @@ 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; })() ); diff --git a/package.json b/package.json index 6a73950..904c0fa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "payments-icons-library", - "version": "1.0.9", + "version": "1.1.0", "description": "", "main": "dist/image-library.js", "scripts": { diff --git a/src/nameMapping.js b/src/nameMapping.js index eea93ca..c9b2a8d 100644 --- a/src/nameMapping.js +++ b/src/nameMapping.js @@ -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", @@ -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"], @@ -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", @@ -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"], @@ -199,6 +219,7 @@ export const nameMapping = { simpl: ["simpl"], zestmoneypaylater: ["zestmoney", "zestmoneypaylater"], mobikwik: ["mobikwikpaylater"], + ringpaylater: ["ringpay", "ringpaylater"], }, upi: { bhim: ["bhim", "upi"], @@ -231,8 +252,12 @@ export const nameMapping = { paytm: ["paytm"], phonepe: ["phonepe"], paypal: ["paypal"], + payzapp: ["payzapp"], }, cardless: { flexipay: ["flexipay"], + snapmint: ["snapmint"], + cashe: ["cashe"], + kreditbee: ["kreditbee"], }, }; diff --git a/src/utility.js b/src/utility.js index 644317a..2706b62 100644 --- a/src/utility.js +++ b/src/utility.js @@ -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", @@ -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" }, };