@bigbinary/neeto-payments-frontend 3.2.1 → 3.2.3
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/app/javascript/src/translations/en.json +15 -5
- package/dist/SplitTransfersDashboard.js +132 -37
- package/dist/SplitTransfersDashboard.js.map +1 -1
- package/dist/UpiPayment.js +68 -52
- package/dist/UpiPayment.js.map +1 -1
- package/dist/cjs/SplitTransfersDashboard.js +131 -36
- package/dist/cjs/SplitTransfersDashboard.js.map +1 -1
- package/dist/cjs/UpiPayment.js +67 -51
- package/dist/cjs/UpiPayment.js.map +1 -1
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpiPayment.js","sources":["../../app/javascript/src/components/UpiPayment/constants.js","../../app/javascript/src/components/UpiPayment/utils.js","../../app/javascript/src/components/UpiPayment/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport * as yup from \"yup\";\n\nexport const VALIDATION_SCHEMA = yup.object({\n
|
|
1
|
+
{"version":3,"file":"UpiPayment.js","sources":["../../app/javascript/src/components/UpiPayment/constants.js","../../app/javascript/src/components/UpiPayment/utils.js","../../app/javascript/src/components/UpiPayment/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport * as yup from \"yup\";\n\nexport const VALIDATION_SCHEMA = yup.object({\n identifier: yup\n .string()\n .required(t(\"neetoPayments.upi.payment.transaction.required\"))\n .min(6, t(\"neetoPayments.upi.payment.transaction.sixCharacters\"))\n .max(6, t(\"neetoPayments.upi.payment.transaction.sixCharacters\")),\n});\n","export const vpaIdToQrCodeValue = vpaId => `upi://pay?pa=${vpaId}`;\n","import { noop, isPresent } from \"neetocist\";\nimport { Typography } from \"neetoui\";\nimport { ActionBlock, Form, Input } from \"neetoui/formik\";\nimport QRCodeImage from \"qrcode.react\";\nimport { pluck } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { useCreateUpiPayment } from \"hooks/reactQuery/upi/usePaymentsApi\";\n\nimport { VALIDATION_SCHEMA } from \"./constants\";\nimport { vpaIdToQrCodeValue } from \"./utils\";\n\nconst UpiPayment = ({\n fee,\n payableId,\n discountCode,\n handleCancel,\n onBeforePayment = noop,\n onFailedPayment = noop,\n onSuccessfulPayment = noop,\n}) => {\n const { t } = useTranslation();\n\n const vpaIds = pluck(\"address\", fee?.vpas);\n\n const { isPending, mutate: createPayment } = useCreateUpiPayment({\n onSuccess: onSuccessfulPayment,\n onError: onFailedPayment,\n });\n\n const handleSubmit = values => {\n onBeforePayment();\n const payload = { ...values, payableId, discountCode };\n createPayment(payload);\n };\n\n return (\n <div>\n <Form\n className=\"space-y-4\"\n formikProps={{\n onSubmit: handleSubmit,\n initialValues: { identifier: \"\" },\n validationSchema: VALIDATION_SCHEMA,\n }}\n >\n {({ dirty }) => (\n <>\n <Typography style=\"body1\">\n {t(\"neetoPayments.upi.payment.vpaText\", { count: vpaIds.length })}\n </Typography>\n {isPresent(vpaIds) && (\n <div className=\"grid grid-cols-1 gap-8 gap-y-4 sm:grid-cols-2\">\n {vpaIds.map(vpaId => (\n <div\n className=\"flex flex-col items-center justify-center\"\n key={vpaId}\n >\n <QRCodeImage\n size={256}\n style={{ width: 80, height: 80 }}\n value={vpaIdToQrCodeValue(vpaId)}\n />\n <Typography\n className=\"mt-2 w-full break-words text-center\"\n style=\"body2\"\n >\n {vpaId}\n </Typography>\n </div>\n ))}\n </div>\n )}\n <Input\n required\n label={t(\"neetoPayments.upi.payment.transaction.label\")}\n name=\"identifier\"\n placeholder={t(\n \"neetoPayments.upi.payment.transaction.placeholder\"\n )}\n />\n <ActionBlock\n cancelButtonProps={{\n label: t(\"neetoPayments.upi.payment.buttons.back\"),\n onClick: handleCancel,\n disabled: isPending,\n }}\n submitButtonProps={{\n label: t(\"neetoPayments.upi.payment.buttons.submit\"),\n disabled: !dirty || isPending,\n loading: isPending,\n }}\n />\n </>\n )}\n </Form>\n </div>\n );\n};\n\nexport default UpiPayment;\n"],"names":["VALIDATION_SCHEMA","yup","object","identifier","string","required","t","min","max","vpaIdToQrCodeValue","vpaId","concat","UpiPayment","_ref","fee","payableId","discountCode","handleCancel","_ref$onBeforePayment","onBeforePayment","noop","_ref$onFailedPayment","onFailedPayment","_ref$onSuccessfulPaym","onSuccessfulPayment","_useTranslation","useTranslation","vpaIds","pluck","vpas","_useCreateUpiPayment","useCreateUpiPayment","onSuccess","onError","isPending","createPayment","mutate","handleSubmit","values","payload","_objectSpread","_jsx","children","Form","className","formikProps","onSubmit","initialValues","validationSchema","_ref2","dirty","_jsxs","_Fragment","Typography","style","count","length","isPresent","map","QRCodeImage","size","width","height","value","Input","label","name","placeholder","ActionBlock","cancelButtonProps","onClick","disabled","submitButtonProps","loading"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,IAAMA,iBAAiB,GAAGC,cAAG,CAACC,MAAM,CAAC;AAC1CC,EAAAA,UAAU,EAAEF,cAAG,CACZG,MAAM,EAAE,CACRC,QAAQ,CAACC,SAAC,CAAC,gDAAgD,CAAC,CAAC,CAC7DC,GAAG,CAAC,CAAC,EAAED,SAAC,CAAC,qDAAqD,CAAC,CAAC,CAChEE,GAAG,CAAC,CAAC,EAAEF,SAAC,CAAC,qDAAqD,CAAC;AACpE,CAAC,CAAC;;ACTK,IAAMG,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAGC,KAAK,EAAA;EAAA,OAAAC,eAAAA,CAAAA,MAAA,CAAoBD,KAAK,CAAA;AAAA,CAAE;;;;ACYlE,IAAME,UAAU,GAAG,SAAbA,UAAUA,CAAAC,IAAA,EAQV;AAAA,EAAA,IAPJC,GAAG,GAAAD,IAAA,CAAHC,GAAG;IACHC,SAAS,GAAAF,IAAA,CAATE,SAAS;IACTC,YAAY,GAAAH,IAAA,CAAZG,YAAY;IACZC,YAAY,GAAAJ,IAAA,CAAZI,YAAY;IAAAC,oBAAA,GAAAL,IAAA,CACZM,eAAe;AAAfA,IAAAA,eAA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AA,KAAK,EAAE3D,CAAC,CAAC,6CAA6C,CAAE;AACxD4D,YAAAA,IAAI,EAAC,YAAY;YACjBC,WAAW,EAAE7D,CAAC,CACZ,mDACF;AAAE,WACH,CAAC,eACFmC,cAAA,CAAC2B,WAAW,EAAA;AACVC,YAAAA,iBAAiB,EAAE;AACjBJ,cAAAA,KAAK,EAAE3D,CAAC,CAAC,wCAAwC,CAAC;AAClDgE,cAAAA,OAAO,EAAErD,YAAY;AACrBsD,cAAAA,QAAQ,EAAErC;aACV;AACFsC,YAAAA,iBAAiB,EAAE;AACjBP,cAAAA,KAAK,EAAE3D,CAAC,CAAC,0CAA0C,CAAC;AACpDiE,cAAAA,QAAQ,EAAE,CAACrB,KAAK,IAAIhB,SAAS;AAC7BuC,cAAAA,OAAO,EAAEvC;AACX;AAAE,WACH,CAAC;AAAA,SACF,CAAC;AAAA;KAED;AAAC,GACJ,CAAC;AAEV;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-payments-frontend",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.3",
|
|
4
4
|
"description": "To manage payments across the neeto products.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://github.com/bigbinary/neeto-payments-nano",
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
"@bigbinary/eslint-plugin-neeto": "1.5.6",
|
|
62
62
|
"@bigbinary/neeto-cist": "1.0.14",
|
|
63
63
|
"@bigbinary/neeto-commons-frontend": "4.13.14",
|
|
64
|
-
"@bigbinary/neeto-editor": "1.
|
|
65
|
-
"@bigbinary/neeto-filters-frontend": "4.3.
|
|
66
|
-
"@bigbinary/neeto-icons": "1.20.
|
|
67
|
-
"@bigbinary/neeto-molecules": "3.15.
|
|
68
|
-
"@bigbinary/neetoui": "8.2.
|
|
64
|
+
"@bigbinary/neeto-editor": "1.45.0",
|
|
65
|
+
"@bigbinary/neeto-filters-frontend": "4.3.13",
|
|
66
|
+
"@bigbinary/neeto-icons": "1.20.23",
|
|
67
|
+
"@bigbinary/neeto-molecules": "3.15.6",
|
|
68
|
+
"@bigbinary/neetoui": "8.2.54",
|
|
69
69
|
"@emotion/is-prop-valid": "1.2.0",
|
|
70
70
|
"@faker-js/faker": "8.2.0",
|
|
71
71
|
"@honeybadger-io/js": "6.10.1",
|
|
@@ -171,11 +171,11 @@
|
|
|
171
171
|
"@babel/runtime": "7.26.0",
|
|
172
172
|
"@bigbinary/neeto-cist": "1.0.14",
|
|
173
173
|
"@bigbinary/neeto-commons-frontend": "4.13.14",
|
|
174
|
-
"@bigbinary/neeto-editor": "1.
|
|
175
|
-
"@bigbinary/neeto-filters-frontend": "4.3.
|
|
176
|
-
"@bigbinary/neeto-icons": "1.20.
|
|
177
|
-
"@bigbinary/neeto-molecules": "3.15.
|
|
178
|
-
"@bigbinary/neetoui": "8.2.
|
|
174
|
+
"@bigbinary/neeto-editor": "1.45.0",
|
|
175
|
+
"@bigbinary/neeto-filters-frontend": "4.3.13",
|
|
176
|
+
"@bigbinary/neeto-icons": "1.20.23",
|
|
177
|
+
"@bigbinary/neeto-molecules": "3.15.6",
|
|
178
|
+
"@bigbinary/neetoui": "8.2.54",
|
|
179
179
|
"@honeybadger-io/js": "6.10.1",
|
|
180
180
|
"@honeybadger-io/react": "6.1.25",
|
|
181
181
|
"@tailwindcss/container-queries": "^0.1.1",
|