@bigbinary/neeto-payments-frontend 1.3.11 → 1.3.12
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/README.md +4 -0
- package/app/javascript/src/translations/en.json +1 -0
- package/dist/index-042b6907.js +6 -0
- package/dist/index-042b6907.js.map +1 -0
- package/dist/index-87824935.js +4 -0
- package/dist/index-87824935.js.map +1 -0
- package/dist/index.cjs.js +328 -452
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +291 -415
- package/dist/index.js.map +1 -1
- package/dist/stripe.esm-115c767d.js +130 -0
- package/dist/stripe.esm-115c767d.js.map +1 -0
- package/dist/stripe.esm-4218a1e9.js +132 -0
- package/dist/stripe.esm-4218a1e9.js.map +1 -0
- package/package.json +66 -65
package/README.md
CHANGED
|
@@ -8,6 +8,7 @@ The `neeto-payments-nano` manages payments across neeto products. The nano expo
|
|
|
8
8
|
- [Usage](#usage)
|
|
9
9
|
- [Frontend package](#frontend-package)
|
|
10
10
|
- [Installation](#installation-1)
|
|
11
|
+
- [Instructions for development](#instructions-for-development)
|
|
11
12
|
- [Components](#components)
|
|
12
13
|
- [Hooks](#hooks)
|
|
13
14
|
- [Functions](#functions)
|
|
@@ -121,6 +122,9 @@ You can learn more about setup and usage here:
|
|
|
121
122
|
yarn add @bigbinary/neeto-commons-frontend@2.0.54 @bigbinary/neeto-filters-frontend@2.8.1 @bigbinary/neeto-icons@1.9.22 @bigbinary/neeto-molecules@1.0.9 @bigbinary/neetoui@4.4.10 @honeybadger-io/js@5.1.1 @honeybadger-io/react@5.1.3 axios@1.3.4 classnames@2.3.2 formik@2.2.9 js-logger@1.6.1 mixpanel-browser@2.45.0 ramda@0.28.0 react-helmet@6.1.0 react-query@3.39.3 react-router-dom@5.3.4 react-toastify@8.2.0 yup@1.0.2
|
|
122
123
|
```
|
|
123
124
|
|
|
125
|
+
### Instructions for development
|
|
126
|
+
Check the [Frontend package development guide](https://neeto-engineering.neetokb.com/p/a-d34cb4b0) for step-by-step instructions to develop the frontend package.
|
|
127
|
+
|
|
124
128
|
### Components
|
|
125
129
|
#### 1. `Dashboard` ([source code](https://github.com/bigbinary/neeto-payments-nano/blob/42ad8330442696b102d8555930162d75cf94931e/app/javascript/src/components/Dashboard/index.jsx))
|
|
126
130
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var l=(e,r,t)=>new Promise((n,i)=>{var d=o=>{try{c(t.next(o));}catch(a){i(a);}},m=o=>{try{c(t.throw(o));}catch(a){i(a);}},c=o=>o.done?n(o.value):Promise.resolve(o.value).then(d,m);c((t=t.apply(e,r)).next());});function f(e){return document.querySelector(`script[src="${e}"]`)}function S(e){let r=document.head||document.body;if(!r)throw new Error("Square.js requires a <body> or <head> element.");let t=document.createElement("script");return t.src=e,r.appendChild(t),t}var s=null;function p(e){return s!==null||(s=new Promise((r,t)=>{if(typeof window=="undefined"){r(null);return}if(window.Square){r(window.Square);return}try{let n=f(e);n||(n=S(e)),n.addEventListener("load",()=>{window.Square?r(window.Square):t(new Error("Square.js failed to load properly."));}),n.addEventListener("error",()=>{t(new Error("Error occurred while loading Square.js"));});}catch(n){t(n);}})),s}var w="v1",u=class extends Error{constructor(r="The Payment 'applicationId' option is not in the correct format."){super(r);this.name="InvalidApplicationIdError",Object.setPrototypeOf(this,u.prototype);}};function q(e){let r="";if(e.startsWith("sq0idp-")&&(r="https://web.squarecdn.com/"),e.startsWith("sandbox-sq0idb-")&&(r="https://sandbox.web.squarecdn.com/"),r.length===0)throw new u;return r+=`${w}/square.js`,r}function E(e,r,t){return l(this,null,function*(){let n=(t==null?void 0:t.scriptSrc)!==void 0?t.scriptSrc:q(e),i=yield p(n);return i===null?null:i.payments(e,r)})}
|
|
4
|
+
|
|
5
|
+
exports.payments = E;
|
|
6
|
+
//# sourceMappingURL=index-042b6907.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-042b6907.js","sources":["../node_modules/@square/web-sdk/dist/index.js"],"sourcesContent":["var l=(e,r,t)=>new Promise((n,i)=>{var d=o=>{try{c(t.next(o))}catch(a){i(a)}},m=o=>{try{c(t.throw(o))}catch(a){i(a)}},c=o=>o.done?n(o.value):Promise.resolve(o.value).then(d,m);c((t=t.apply(e,r)).next())});function f(e){return document.querySelector(`script[src=\"${e}\"]`)}function S(e){let r=document.head||document.body;if(!r)throw new Error(\"Square.js requires a <body> or <head> element.\");let t=document.createElement(\"script\");return t.src=e,r.appendChild(t),t}var s=null;function p(e){return s!==null||(s=new Promise((r,t)=>{if(typeof window==\"undefined\"){r(null);return}if(window.Square){r(window.Square);return}try{let n=f(e);n||(n=S(e)),n.addEventListener(\"load\",()=>{window.Square?r(window.Square):t(new Error(\"Square.js failed to load properly.\"))}),n.addEventListener(\"error\",()=>{t(new Error(\"Error occurred while loading Square.js\"))})}catch(n){t(n)}})),s}var w=\"v1\",u=class extends Error{constructor(r=\"The Payment 'applicationId' option is not in the correct format.\"){super(r);this.name=\"InvalidApplicationIdError\",Object.setPrototypeOf(this,u.prototype)}};function q(e){let r=\"\";if(e.startsWith(\"sq0idp-\")&&(r=\"https://web.squarecdn.com/\"),e.startsWith(\"sandbox-sq0idb-\")&&(r=\"https://sandbox.web.squarecdn.com/\"),r.length===0)throw new u;return r+=`${w}/square.js`,r}function E(e,r,t){return l(this,null,function*(){let n=(t==null?void 0:t.scriptSrc)!==void 0?t.scriptSrc:q(e),i=yield p(n);return i===null?null:i.payments(e,r)})}export{E as payments};\n"],"names":[],"mappings":";;AAAA,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,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C,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var l=(e,r,t)=>new Promise((n,i)=>{var d=o=>{try{c(t.next(o));}catch(a){i(a);}},m=o=>{try{c(t.throw(o));}catch(a){i(a);}},c=o=>o.done?n(o.value):Promise.resolve(o.value).then(d,m);c((t=t.apply(e,r)).next());});function f(e){return document.querySelector(`script[src="${e}"]`)}function S(e){let r=document.head||document.body;if(!r)throw new Error("Square.js requires a <body> or <head> element.");let t=document.createElement("script");return t.src=e,r.appendChild(t),t}var s=null;function p(e){return s!==null||(s=new Promise((r,t)=>{if(typeof window=="undefined"){r(null);return}if(window.Square){r(window.Square);return}try{let n=f(e);n||(n=S(e)),n.addEventListener("load",()=>{window.Square?r(window.Square):t(new Error("Square.js failed to load properly."));}),n.addEventListener("error",()=>{t(new Error("Error occurred while loading Square.js"));});}catch(n){t(n);}})),s}var w="v1",u=class extends Error{constructor(r="The Payment 'applicationId' option is not in the correct format."){super(r);this.name="InvalidApplicationIdError",Object.setPrototypeOf(this,u.prototype);}};function q(e){let r="";if(e.startsWith("sq0idp-")&&(r="https://web.squarecdn.com/"),e.startsWith("sandbox-sq0idb-")&&(r="https://sandbox.web.squarecdn.com/"),r.length===0)throw new u;return r+=`${w}/square.js`,r}function E(e,r,t){return l(this,null,function*(){let n=(t==null?void 0:t.scriptSrc)!==void 0?t.scriptSrc:q(e),i=yield p(n);return i===null?null:i.payments(e,r)})}
|
|
2
|
+
|
|
3
|
+
export { E as payments };
|
|
4
|
+
//# sourceMappingURL=index-87824935.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-87824935.js","sources":["../node_modules/@square/web-sdk/dist/index.js"],"sourcesContent":["var l=(e,r,t)=>new Promise((n,i)=>{var d=o=>{try{c(t.next(o))}catch(a){i(a)}},m=o=>{try{c(t.throw(o))}catch(a){i(a)}},c=o=>o.done?n(o.value):Promise.resolve(o.value).then(d,m);c((t=t.apply(e,r)).next())});function f(e){return document.querySelector(`script[src=\"${e}\"]`)}function S(e){let r=document.head||document.body;if(!r)throw new Error(\"Square.js requires a <body> or <head> element.\");let t=document.createElement(\"script\");return t.src=e,r.appendChild(t),t}var s=null;function p(e){return s!==null||(s=new Promise((r,t)=>{if(typeof window==\"undefined\"){r(null);return}if(window.Square){r(window.Square);return}try{let n=f(e);n||(n=S(e)),n.addEventListener(\"load\",()=>{window.Square?r(window.Square):t(new Error(\"Square.js failed to load properly.\"))}),n.addEventListener(\"error\",()=>{t(new Error(\"Error occurred while loading Square.js\"))})}catch(n){t(n)}})),s}var w=\"v1\",u=class extends Error{constructor(r=\"The Payment 'applicationId' option is not in the correct format.\"){super(r);this.name=\"InvalidApplicationIdError\",Object.setPrototypeOf(this,u.prototype)}};function q(e){let r=\"\";if(e.startsWith(\"sq0idp-\")&&(r=\"https://web.squarecdn.com/\"),e.startsWith(\"sandbox-sq0idb-\")&&(r=\"https://sandbox.web.squarecdn.com/\"),r.length===0)throw new u;return r+=`${w}/square.js`,r}function E(e,r,t){return l(this,null,function*(){let n=(t==null?void 0:t.scriptSrc)!==void 0?t.scriptSrc:q(e),i=yield p(n);return i===null?null:i.payments(e,r)})}export{E as payments};\n"],"names":[],"mappings":"AAAA,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CA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