@ponchopay/pp-browser 1.0.2 → 1.0.4

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 CHANGED
@@ -13,7 +13,7 @@ You can import the compiled file directly from our servers:
13
13
  ```html
14
14
  <script
15
15
  type="module"
16
- src="https://pay.ponchopay.com/api/integration/generic/asset/pp-browser.min.js"
16
+ src="https://pay.ponchopay.com/api/integration/generic/asset/pp-browser.<version>.min.js"
17
17
  ></script>
18
18
  ```
19
19
 
@@ -93,6 +93,14 @@ To automatically fix linting and formatting errors, run
93
93
  npm run format
94
94
  ```
95
95
 
96
+ ### Testing the project
97
+
98
+ To test the project for bugs, run
99
+
100
+ ```bash
101
+ npm run test
102
+ ```
103
+
96
104
  ### Tooling configs
97
105
 
98
106
  For most of the tools, the configuration is in the `package.json` to reduce the amount of files in the project.
@@ -2,6 +2,8 @@ export declare class PpPayment extends HTMLElement {
2
2
  private sr;
3
3
  constructor();
4
4
  private redrawContents;
5
+ set base(value: string);
6
+ get base(): string;
5
7
  set token(value: string);
6
8
  get token(): string;
7
9
  set metadata(value: string);
@@ -1,6 +1,13 @@
1
1
  import { buildButton, buildForm, buildHiddenInput, buildSlot, buildStyle, } from './utils';
2
- const PONCHO_PAY = 'https://pay.ponchopay.com/api/integration/generic/initiate';
3
- const ATTRIBUTES = ['token', 'metadata', 'urn', 'amount', 'email', 'note'];
2
+ const ENDPOINT = '/api/integration/generic/initiate';
3
+ const ATTRIBUTES = [
4
+ 'token',
5
+ 'metadata',
6
+ 'urn',
7
+ 'amount',
8
+ 'email',
9
+ 'note',
10
+ ];
4
11
  const STYLES = [
5
12
  'width: 100%',
6
13
  'background-color: #02C2A0',
@@ -33,8 +40,20 @@ export class PpPayment extends HTMLElement {
33
40
  this.redrawContents();
34
41
  }
35
42
  redrawContents() {
43
+ let base = this.base;
44
+ while (base.slice(-1) === '/')
45
+ base = base.slice(0, -1);
46
+ if (base === '')
47
+ base = 'https://pay.ponchopay.com';
36
48
  this.sr.replaceChildren();
37
- this.sr.appendChild(buildForm(PONCHO_PAY, ...ATTRIBUTES.filter(name => { var _a; return ((_a = this.getAttribute(name)) !== null && _a !== void 0 ? _a : '') !== ''; }).map(name => buildHiddenInput(name, this.getAttribute(name))), buildStyle(`button { ${STYLES.join(';')} ${this.getAttribute('style')} } button:active { transform: translate(1px,1px); }`), buildButton(buildSlot('Pay with PonchoPay'))));
49
+ this.sr.appendChild(buildForm(`${base}${ENDPOINT}`, ...ATTRIBUTES.filter(name => this[name] !== '').map(name => buildHiddenInput(name, this[name])), buildStyle(`button { ${STYLES.join(';')} ${this.getAttribute('style')} } button:active { transform: translate(1px,1px); }`), buildButton(buildSlot('Pay with PonchoPay'))));
50
+ }
51
+ set base(value) {
52
+ this.setAttribute('base', value);
53
+ }
54
+ get base() {
55
+ var _a;
56
+ return (_a = this.getAttribute('base')) !== null && _a !== void 0 ? _a : '';
38
57
  }
39
58
  set token(value) {
40
59
  this.setAttribute('token', value);
@@ -82,7 +101,7 @@ export class PpPayment extends HTMLElement {
82
101
  this.redrawContents();
83
102
  }
84
103
  static get observedAttributes() {
85
- return ATTRIBUTES;
104
+ return [...ATTRIBUTES, 'base'];
86
105
  }
87
106
  }
88
107
  //# sourceMappingURL=PpPayment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PpPayment.js","sourceRoot":"","sources":["../../src/PpPayment.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,UAAU,GACX,MAAM,SAAS,CAAC;AAEjB,MAAM,UAAU,GAAG,4DAA4D,CAAC;AAChF,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAC3E,MAAM,MAAM,GAAG;IACb,aAAa;IACb,2BAA2B;IAC3B,qBAAqB;IACrB,4BAA4B;IAC5B,uBAAuB;IACvB,2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Content":["import {\n buildButton,\n buildForm,\n buildHiddenInput,\n buildSlot,\n buildStyle,\n} from './utils';\n\nconst PONCHO_PAY = 'https://pay.ponchopay.com/api/integration/generic/initiate';\nconst ATTRIBUTES = ['token', 'metadata', 'urn', 'amount', 'email', 'note'];\nconst STYLES = [\n 'width: 100%',\n 'background-color: #02C2A0',\n 'white-space: nowrap',\n 'text-decoration-line: none',\n 'border-radius: .25rem',\n 'box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05)',\n 'text-align: center',\n 'font-size: 1.25rem',\n 'line-height: 1.75rem',\n 'color: white',\n 'margin-top: .5rem',\n 'margin-bottom: .75rem',\n 'padding: .75rem 1rem',\n 'display: flex',\n 'flex-wrap: nowrap',\n 'align-items: center',\n 'justify-content: space-evenly',\n 'cursor: pointer',\n 'text-transform: none',\n 'box-sizing: border-box',\n 'border-width: 0',\n 'border-style: solid',\n 'border-color: currentColor',\n];\n\nexport class PpPayment extends HTMLElement {\n private sr: ShadowRoot;\n\n public constructor() {\n super();\n\n this.sr = this.attachShadow({ mode: 'open' });\n this.redrawContents();\n }\n\n private redrawContents(): void {\n this.sr.replaceChildren();\n this.sr.appendChild(\n buildForm(\n PONCHO_PAY,\n ...ATTRIBUTES.filter(\n name => (this.getAttribute(name) ?? '') !== ''\n ).map(name => buildHiddenInput(name, this.getAttribute(name)!)),\n buildStyle(\n `button { ${STYLES.join(';')} ${this.getAttribute(\n 'style'\n )} } button:active { transform: translate(1px,1px); }`\n ),\n buildButton(buildSlot('Pay with PonchoPay'))\n )\n );\n }\n\n public set token(value: string) {\n this.setAttribute('token', value);\n }\n\n public get token(): string {\n return this.getAttribute('token') ?? '';\n }\n\n public set metadata(value: string) {\n this.setAttribute('metadata', value);\n }\n\n public get metadata(): string {\n return this.getAttribute('metadata') ?? '';\n }\n\n public set urn(value: string) {\n this.setAttribute('urn', value);\n }\n\n public get urn(): string {\n return this.getAttribute('urn') ?? '';\n }\n\n public set amount(value: string | number) {\n this.setAttribute('amount', String(value));\n }\n\n public get amount(): string {\n return this.getAttribute('amount') ?? '';\n }\n\n public set email(value: string) {\n this.setAttribute('email', value);\n }\n\n public get email(): string {\n return this.getAttribute('email') ?? '';\n }\n\n public set note(value: string) {\n this.setAttribute('note', value);\n }\n\n public get note(): string {\n return this.getAttribute('note') ?? '';\n }\n\n public attributeChangedCallback(): void {\n this.redrawContents();\n }\n\n public static get observedAttributes() {\n return ATTRIBUTES;\n }\n}\n"]}
1
+ {"version":3,"file":"PpPayment.js","sourceRoot":"","sources":["../../src/PpPayment.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,UAAU,GACX,MAAM,SAAS,CAAC;AAEjB,MAAM,QAAQ,GAAG,mCAAmC,CAAC;AACrD,MAAM,UAAU,GAAG;IACjB,OAAO;IACP,UAAU;IACV,KAAK;IACL,QAAQ;IACR,OAAO;IACP,MAAM;CACE,CAAC;AACX,MAAM,MAAM,GAAG;IACb,aAAa;IACb,2BAA2B;IAC3B,qBAAqB;IACrB,4BAA4B;IAC5B,uBAAuB;IACvB,2CAA2C;IAC3C,oBAAoB;IACpB,oBAAoB;IACpB,sBAAsB;IACtB,cAAc;IACd,mBAAmB;IACnB,uBAAuB;IACvB,sBAAsB;IACtB,eAAe;IACf,mBAAmB;IACnB,qBAAqB;IACrB,+BAA+B;IAC/B,iBAAiB;IACjB,sBAAsB;IACtB,wBAAwB;IACxB,iBAAiB;IACjB,qBAAqB;IACrB,4BAA4B;CAC7B,CAAC;AAEF,MAAM,OAAO,SAAU,SAAQ,WAAW;IAGxC;QACE,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;QAC9C,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IAEO,cAAc;QACpB,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACrB,OA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AC;IACvC,CAAC;IAED,IAAW,QAAQ;;QACjB,OAAO,MAAA,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,mCAAI,EAAE,CAAC;IAC7C,CAAC;IAED,IAAW,GAAG,CAAC,KAAa;QAC1B,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAClC,CAAC;IAED,IAAW,GAAG;;QACZ,OAAO,MAAA,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,mCAAI,EAAE,CAAC;IACxC,CAAC;IAED,IAAW,MAAM,CAAC,KAAsB;QACtC,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7C,CAAC;IAED,IAAW,MAAM;;QACf,OAAO,MAAA,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,mCAAI,EAAE,CAAC;IAC3C,CAAC;IAED,IAAW,KAAK,CAAC,KAAa;QAC5B,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC;IAED,IAAW,KAAK;;QACd,OAAO,MAAA,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,mCAAI,EAAE,CAAC;IAC1C,CAAC;IAED,IAAW,IAAI,CAAC,KAAa;QAC3B,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC;IAED,IAAW,IAAI;;QACb,OAAO,MAAA,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,mCAAI,EAAE,CAAC;IACzC,CAAC;IAEM,wBAAwB;QAC7B,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IAEM,MAAM,KAAK,kBAAkB;QAClC,OAAO,CAAC,GAAG,UAAU,EAAE,MAAM,CAAC,CAAC;IACjC,CAAC;CACF","sourcesContent":["import {\n buildButton,\n buildForm,\n buildHiddenInput,\n buildSlot,\n buildStyle,\n} from './utils';\n\nconst ENDPOINT = '/api/integration/generic/initiate';\nconst ATTRIBUTES = [\n 'token',\n 'metadata',\n 'urn',\n 'amount',\n 'email',\n 'note',\n] as const;\nconst STYLES = [\n 'width: 100%',\n 'background-color: #02C2A0',\n 'white-space: nowrap',\n 'text-decoration-line: none',\n 'border-radius: .25rem',\n 'box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05)',\n 'text-align: center',\n 'font-size: 1.25rem',\n 'line-height: 1.75rem',\n 'color: white',\n 'margin-top: .5rem',\n 'margin-bottom: .75rem',\n 'padding: .75rem 1rem',\n 'display: flex',\n 'flex-wrap: nowrap',\n 'align-items: center',\n 'justify-content: space-evenly',\n 'cursor: pointer',\n 'text-transform: none',\n 'box-sizing: border-box',\n 'border-width: 0',\n 'border-style: solid',\n 'border-color: currentColor',\n];\n\nexport class PpPayment extends HTMLElement {\n private sr: ShadowRoot;\n\n public constructor() {\n super();\n\n this.sr = this.attachShadow({ mode: 'open' });\n this.redrawContents();\n }\n\n private redrawContents(): void {\n let base = this.base;\n while (base.slice(-1) === '/') base = base.slice(0, -1);\n if (base === '') base = 'https://pay.ponchopay.com';\n\n this.sr.replaceChildren();\n this.sr.appendChild(\n buildForm(\n `${base}${ENDPOINT}`,\n ...ATTRIBUTES.filter(name => this[name] !== '').map(name =>\n buildHiddenInput(name, this[name])\n ),\n buildStyle(\n `button { ${STYLES.join(';')} ${this.getAttribute(\n 'style'\n )} } button:active { transform: translate(1px,1px); }`\n ),\n buildButton(buildSlot('Pay with PonchoPay'))\n )\n );\n }\n\n public set base(value: string) {\n this.setAttribute('base', value);\n }\n\n public get base(): string {\n return this.getAttribute('base') ?? '';\n }\n\n public set token(value: string) {\n this.setAttribute('token', value);\n }\n\n public get token(): string {\n return this.getAttribute('token') ?? '';\n }\n\n public set metadata(value: string) {\n this.setAttribute('metadata', value);\n }\n\n public get metadata(): string {\n return this.getAttribute('metadata') ?? '';\n }\n\n public set urn(value: string) {\n this.setAttribute('urn', value);\n }\n\n public get urn(): string {\n return this.getAttribute('urn') ?? '';\n }\n\n public set amount(value: string | number) {\n this.setAttribute('amount', String(value));\n }\n\n public get amount(): string {\n return this.getAttribute('amount') ?? '';\n }\n\n public set email(value: string) {\n this.setAttribute('email', value);\n }\n\n public get email(): string {\n return this.getAttribute('email') ?? '';\n }\n\n public set note(value: string) {\n this.setAttribute('note', value);\n }\n\n public get note(): string {\n return this.getAttribute('note') ?? '';\n }\n\n public attributeChangedCallback(): void {\n this.redrawContents();\n }\n\n public static get observedAttributes() {\n return [...ATTRIBUTES, 'base'];\n }\n}\n"]}
package/dist/src/index.js CHANGED
@@ -1,3 +1,5 @@
1
1
  import { PpPayment } from './PpPayment.js';
2
- window.customElements.define('pp-payment', PpPayment);
2
+ if (!window.customElements.get('pp-payment')) {
3
+ window.customElements.define('pp-payment', PpPayment);
4
+ }
3
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC","sourcesContent":["import { PpPayment } from './PpPayment.js';\n\nwindow.customElements.define('pp-payment', PpPayment);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE;IAC5C,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;CACvD","sourcesContent":["import { PpPayment } from './PpPayment.js';\n\nif (!window.customElements.get('pp-payment')) {\n window.customElements.define('pp-payment', PpPayment);\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ponchopay/pp-browser",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Tools to integrate PonchoPay on the browser",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",
@@ -24,13 +24,13 @@
24
24
  "clean": "rimraf build dist",
25
25
  "start": "npm run clean && tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
26
26
  "build": "npm run clean && tsc && rollup -c",
27
- "prepublish": "npm run clean && tsc",
27
+ "test": "playwright test",
28
28
  "lint": "eslint --ext .ts,.html . --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore",
29
29
  "format": "eslint --ext .ts,.html . --fix --ignore-path .gitignore && prettier \"**/*.ts\" --write --ignore-path .gitignore"
30
30
  },
31
- "dependencies": {},
32
31
  "devDependencies": {
33
32
  "@open-wc/eslint-config": "^9.2.1",
33
+ "@playwright/test": "^1.38.0",
34
34
  "@rollup/plugin-terser": "^0.4.3",
35
35
  "@typescript-eslint/eslint-plugin": "^5.48.0",
36
36
  "@typescript-eslint/parser": "^5.48.0",