@everymatrix/cashier-page 1.99.18 → 1.99.20

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/esnext/ssr.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,16 +1,31 @@
1
1
  {
2
2
  "name": "@everymatrix/cashier-page",
3
- "version": "1.99.18",
3
+ "version": "1.99.20",
4
4
  "type": "module",
5
5
  "main": "es2015/cashier-page.cjs",
6
6
  "module": "esnext/cashier-page.js",
7
+ "types": "./types/index.d.ts",
7
8
  "exports": {
8
9
  ".": {
10
+ "types": "./types/index.d.ts",
11
+ "node": {
12
+ "import": "./esnext/ssr.js",
13
+ "require": "./es2015/cashier-page.cjs"
14
+ },
15
+ "edge-light": "./esnext/ssr.js",
16
+ "workerd": "./esnext/ssr.js",
17
+ "browser": "./esnext/cashier-page.js",
9
18
  "import": "./esnext/cashier-page.js",
10
- "require": "./es2015/cashier-page.cjs"
19
+ "require": "./es2015/cashier-page.cjs",
20
+ "default": "./esnext/cashier-page.js"
11
21
  },
22
+ "./react": {
23
+ "types": "./types/react.d.ts"
24
+ },
25
+ "./esnext/cashier-page.js": "./esnext/cashier-page.js",
12
26
  "./es2015/cashier-page.cjs": "./es2015/cashier-page.cjs",
13
- "./es2015/cashier-page.js": "./es2015/cashier-page.js"
27
+ "./es2015/cashier-page.js": "./es2015/cashier-page.js",
28
+ "./package.json": "./package.json"
14
29
  },
15
30
  "files": [
16
31
  "components/",
@@ -18,7 +33,8 @@
18
33
  "stencil",
19
34
  "angular",
20
35
  "esnext/",
21
- "umd"
36
+ "umd",
37
+ "types"
22
38
  ],
23
39
  "publishConfig": {
24
40
  "access": "public"
@@ -0,0 +1,69 @@
1
+ type BooleanString = 'true' | 'false';
2
+
3
+ export type CashierTransactionType = 'Deposit' | 'Withdraw';
4
+ export type CashierChannel = 'Desktop' | 'Mobile' | 'NativeApp';
5
+
6
+ /** Attributes accepted by `<cashier-page>`. Every value is passed as an HTML attribute string. */
7
+ export interface CashierPageAttributes {
8
+ endpoint: string;
9
+ session: string;
10
+ customerid: string;
11
+ currency?: string;
12
+ amount?: number | string;
13
+ type?: CashierTransactionType;
14
+ channel?: CashierChannel;
15
+ lang?: string;
16
+ local?: string;
17
+ successurl?: string;
18
+ failurl?: string;
19
+ cancelurl?: string;
20
+ translationurl?: string;
21
+ assetsurl?: string;
22
+ clientstyling?: string;
23
+ clientstylingurl?: string;
24
+ mbsource?: string;
25
+ showheader?: BooleanString;
26
+ showclosebutton?: BooleanString;
27
+ showsessionexpirationmodal?: BooleanString;
28
+ showverifications?: BooleanString;
29
+ showtransactionhistory?: BooleanString;
30
+ showbonuses?: BooleanString;
31
+ showvaults?: BooleanString;
32
+ depositlimitbutton?: BooleanString;
33
+ numberofmethodsshown?: string;
34
+ txncount?: string;
35
+ currencydecimals?: string;
36
+ currencysymbol?: BooleanString;
37
+ currencyposition?: string;
38
+ transactionhistorycolumns?: string;
39
+ dateformat?: string;
40
+ datetimeformat?: string;
41
+ customsucceessbuttons?: string;
42
+ custompendingbuttons?: string;
43
+ customfailedbuttons?: string;
44
+ useevents?: BooleanString;
45
+ p2p?: BooleanString;
46
+ promotedmethods?: BooleanString;
47
+ bonusescheckbox?: BooleanString;
48
+ userroles?: string;
49
+ withdrawconfirm?: BooleanString;
50
+ customverification?: BooleanString;
51
+ countrycode?: string;
52
+ }
53
+
54
+ /** Messages `<cashier-page>` posts to its own window via `window.postMessage`. */
55
+ export type CashierPageMessage =
56
+ | { type: 'CloseCashier' }
57
+ | { type: 'BackCashier' }
58
+ | { type: 'Cashier:setDepositLimit' }
59
+ | { type: 'Cashier:vendorRedirect'; redirectMode: string; redirectUrl: string }
60
+ | { type: 'ErrorResponseCode'; errorResponseCode: string; errorResponseMessage?: string }
61
+ | { type: 'DataLoading'; isDataLoaded: boolean };
62
+
63
+ export interface CashierPageElement extends HTMLElement, Omit<Partial<CashierPageAttributes>, keyof HTMLElement> {}
64
+
65
+ declare global {
66
+ interface HTMLElementTagNameMap {
67
+ 'cashier-page': CashierPageElement;
68
+ }
69
+ }
@@ -0,0 +1,14 @@
1
+ import type { DetailedHTMLProps, HTMLAttributes } from 'react';
2
+ import type { CashierPageAttributes, CashierPageElement } from './index';
3
+
4
+ /** Opt-in JSX typing for React: `import type {} from '@everymatrix/cashier-page/react';` */
5
+ declare module 'react' {
6
+ namespace JSX {
7
+ interface IntrinsicElements {
8
+ 'cashier-page': DetailedHTMLProps<HTMLAttributes<CashierPageElement>, CashierPageElement> &
9
+ Partial<CashierPageAttributes>;
10
+ }
11
+ }
12
+ }
13
+
14
+ export {};