@rebilly/framepay-react 1.5.1 → 1.6.0
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 +36 -2
 - package/build/index.spec.d.ts +1 -0
 - package/build/index.spec.js +43 -0
 - package/build/lib/components/elements/applepay-element.js +7 -5
 - package/build/lib/components/elements/bank-element.js +10 -8
 - package/build/lib/components/elements/base-element.js +20 -12
 - package/build/lib/components/elements/card-element.js +10 -8
 - package/build/lib/components/elements/googlepay-element.js +7 -5
 - package/build/lib/components/elements/iban-element.js +16 -10
 - package/build/lib/components/elements/paypal-element.js +7 -5
 - package/build/lib/components/injector.d.ts +28 -56
 - package/build/lib/components/injector.js +26 -20
 - package/build/lib/components/provider.js +18 -12
 - package/build/lib/constants.js +16 -12
 - package/build/lib/context.js +8 -4
 - package/build/lib/dom-util.js +5 -3
 - package/package.json +32 -67
 - package/types/provider.d.ts +1 -0
 - package/CHANGELOG.md +0 -0
 
    
        package/package.json
    CHANGED
    
    | 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            {
         
     | 
| 
       2 
2 
     | 
    
         
             
                "name": "@rebilly/framepay-react",
         
     | 
| 
       3 
     | 
    
         
            -
                "version": "1. 
     | 
| 
      
 3 
     | 
    
         
            +
                "version": "1.6.0",
         
     | 
| 
       4 
4 
     | 
    
         
             
                "description": "A React wrapper for Rebilly's FramePay offering out-of-the-box support for Redux and other common React features",
         
     | 
| 
       5 
5 
     | 
    
         
             
                "main": "build/index.js",
         
     | 
| 
       6 
6 
     | 
    
         
             
                "author": "Rebilly",
         
     | 
| 
         @@ -26,29 +26,30 @@ 
     | 
|
| 
       26 
26 
     | 
    
         
             
                    "set-react-17": "cross-env REACT_VERSION=17 node ./test/e2e/switch-react-version",
         
     | 
| 
       27 
27 
     | 
    
         
             
                    "set-react-18": "cross-env REACT_VERSION=18 node ./test/e2e/switch-react-version",
         
     | 
| 
       28 
28 
     | 
    
         
             
                    "clean-react-alias": "cross-env REACT_VERSION=clean node ./test/e2e/switch-react-version",
         
     | 
| 
       29 
     | 
    
         
            -
                    "run-jest": "node test/e2e/jest.js --env=node --no-cache --colors test/e2e/specs --setupFilesAfterEnv ./test/e2e/setup.js --preset jest-puppeteer",
         
     | 
| 
       30 
29 
     | 
    
         
             
                    "dotenv": "node ./env.js",
         
     | 
| 
       31 
30 
     | 
    
         
             
                    "build": "cross-env NODE_ENV=production tsc -p tsconfig.json",
         
     | 
| 
       32 
31 
     | 
    
         
             
                    "build:e2e": "cross-env NODE_ENV=production run-s dotenv build clean:e2e && parcel build ./test/e2e/fixtures/* --no-minify --no-cache --out-dir test/e2e/build",
         
     | 
| 
       33 
32 
     | 
    
         
             
                    "dev:e2e": "cross-env NODE_ENV=development && run-s dotenv && parcel ./test/e2e/fixtures/* --no-cache --out-dir test/e2e/build",
         
     | 
| 
       34 
     | 
    
         
            -
                    "serve:e2e": "run-s dotenv build:* && node test/e2e/local-server. 
     | 
| 
      
 33 
     | 
    
         
            +
                    "serve:e2e": "run-s dotenv build:* && node test/e2e/local-server.mjs",
         
     | 
| 
      
 34 
     | 
    
         
            +
                    "serve:e2e:no-build": "node test/e2e/local-server.mjs",
         
     | 
| 
       35 
35 
     | 
    
         
             
                    "fix": "run-s fix:*",
         
     | 
| 
       36 
36 
     | 
    
         
             
                    "fix:prettier": "prettier \"src/**/*.ts\" \"src/**/*.tsx\" \"test/**/*.ts\" \"test/**/*.tsx\" \"./*.json\"  --write",
         
     | 
| 
       37 
37 
     | 
    
         
             
                    "fix:tslint": "tslint --fix --project .",
         
     | 
| 
       38 
     | 
    
         
            -
                    "test": "run-s test:e2e",
         
     | 
| 
       39 
38 
     | 
    
         
             
                    "test:lint": "tslint --project . && prettier \"src/**/*.ts\" \"src/**/*.tsx\" \"test/**/*.ts\" \"test/**/*.tsx\" \"./*.json\" --list-different",
         
     | 
| 
       40 
     | 
    
         
            -
                    "test:unit": "jest -- 
     | 
| 
       41 
     | 
    
         
            -
                    "test: 
     | 
| 
       42 
     | 
    
         
            -
                    "test: 
     | 
| 
       43 
     | 
    
         
            -
                    "test: 
     | 
| 
       44 
     | 
    
         
            -
                    "test: 
     | 
| 
       45 
     | 
    
         
            -
                    "test: 
     | 
| 
       46 
     | 
    
         
            -
                    "test: 
     | 
| 
      
 39 
     | 
    
         
            +
                    "test:unit": "jest --config ./test/unit/jest.config.js",
         
     | 
| 
      
 40 
     | 
    
         
            +
                    "test:cypress:ci": "START_SERVER_AND_TEST_INSECURE=1 start-server-and-test serve:e2e:no-build https-get://localhost:8000 test:cypress:run",
         
     | 
| 
      
 41 
     | 
    
         
            +
                    "test:cypress:ci:react-14": "cross-env REACT_VERSION=0.14.0 run-s set-react-14 dotenv build:e2e clean-react-alias test:cypress:ci",
         
     | 
| 
      
 42 
     | 
    
         
            +
                    "test:cypress:ci:react-15": "cross-env REACT_VERSION=15.0.0 run-s set-react-15 dotenv build:e2e clean-react-alias test:cypress:ci",
         
     | 
| 
      
 43 
     | 
    
         
            +
                    "test:cypress:ci:react-16": "cross-env REACT_VERSION=16 run-s set-react-16 dotenv build:e2e clean-react-alias test:cypress:ci",
         
     | 
| 
      
 44 
     | 
    
         
            +
                    "test:cypress:ci:react-17": "cross-env REACT_VERSION=17 run-s set-react-17 dotenv build:e2e clean-react-alias test:cypress:ci",
         
     | 
| 
      
 45 
     | 
    
         
            +
                    "test:cypress:ci:react-18": "cross-env REACT_VERSION=18 run-s set-react-18 dotenv build:e2e clean-react-alias test:cypress:ci",
         
     | 
| 
      
 46 
     | 
    
         
            +
                    "test:cypress:ci:all": "run-s test:cypress:ci:react-*",
         
     | 
| 
      
 47 
     | 
    
         
            +
                    "test:cypress:open": "cypress open",
         
     | 
| 
      
 48 
     | 
    
         
            +
                    "test:cypress:run": "cypress run",
         
     | 
| 
       47 
49 
     | 
    
         
             
                    "watch": "run-s build && run-p \"build -- --w\"",
         
     | 
| 
       48 
     | 
    
         
            -
                    "clean:e2e": " 
     | 
| 
      
 50 
     | 
    
         
            +
                    "clean:e2e": "rm -rf test/e2e/build",
         
     | 
| 
       49 
51 
     | 
    
         
             
                    "precommit": "run-s fix",
         
     | 
| 
       50 
     | 
    
         
            -
                    "prepush": "run-s fix" 
     | 
| 
       51 
     | 
    
         
            -
                    "all": "run-s fix:* test:* build"
         
     | 
| 
      
 52 
     | 
    
         
            +
                    "prepush": "run-s fix"
         
     | 
| 
       52 
53 
     | 
    
         
             
                },
         
     | 
| 
       53 
54 
     | 
    
         
             
                "peerDependencies": {
         
     | 
| 
       54 
55 
     | 
    
         
             
                    "react": "^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0",
         
     | 
| 
         @@ -59,74 +60,38 @@ 
     | 
|
| 
       59 
60 
     | 
    
         
             
                },
         
     | 
| 
       60 
61 
     | 
    
         
             
                "devDependencies": {
         
     | 
| 
       61 
62 
     | 
    
         
             
                    "@fluffy-spoon/substitute": "^1.89.0",
         
     | 
| 
       62 
     | 
    
         
            -
                    "@ 
     | 
| 
       63 
     | 
    
         
            -
                    "@ 
     | 
| 
       64 
     | 
    
         
            -
                    "@ 
     | 
| 
       65 
     | 
    
         
            -
                    "@ 
     | 
| 
       66 
     | 
    
         
            -
                    "@types/ 
     | 
| 
       67 
     | 
    
         
            -
                    "@types/ 
     | 
| 
       68 
     | 
    
         
            -
                    "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
         
     | 
| 
      
 63 
     | 
    
         
            +
                    "@small-tech/auto-encrypt-localhost": "^7.2.0",
         
     | 
| 
      
 64 
     | 
    
         
            +
                    "@testing-library/cypress": "^9.0.0",
         
     | 
| 
      
 65 
     | 
    
         
            +
                    "@testing-library/jest-dom": "^5.16.5",
         
     | 
| 
      
 66 
     | 
    
         
            +
                    "@testing-library/react": "^13.4.0",
         
     | 
| 
      
 67 
     | 
    
         
            +
                    "@types/jest": "^29.2.5",
         
     | 
| 
      
 68 
     | 
    
         
            +
                    "@types/node": "^18.11.18",
         
     | 
| 
       69 
69 
     | 
    
         
             
                    "core-js": "3",
         
     | 
| 
       70 
70 
     | 
    
         
             
                    "cross-env": "^5.2.0",
         
     | 
| 
      
 71 
     | 
    
         
            +
                    "cypress": "^12.3.0",
         
     | 
| 
      
 72 
     | 
    
         
            +
                    "cypress-iframe": "^1.0.1",
         
     | 
| 
       71 
73 
     | 
    
         
             
                    "dotenv": "^7.0.0",
         
     | 
| 
       72 
     | 
    
         
            -
                    "enzyme": "^3.9.0",
         
     | 
| 
       73 
74 
     | 
    
         
             
                    "express": "^4.16.4",
         
     | 
| 
       74 
75 
     | 
    
         
             
                    "husky": "^1.3.1",
         
     | 
| 
       75 
     | 
    
         
            -
                    "jest": "^ 
     | 
| 
       76 
     | 
    
         
            -
                    "jest- 
     | 
| 
       77 
     | 
    
         
            -
                    "jest-puppeteer": "^4.1.0",
         
     | 
| 
       78 
     | 
    
         
            -
                    "jest-resolve": "^24.6.0",
         
     | 
| 
       79 
     | 
    
         
            -
                    "jest-watch-typeahead": "^0.3.0",
         
     | 
| 
       80 
     | 
    
         
            -
                    "jsdom": "^16.5.0",
         
     | 
| 
       81 
     | 
    
         
            -
                    "jsdom-global": "^3.0.2",
         
     | 
| 
      
 76 
     | 
    
         
            +
                    "jest": "^29.3.1",
         
     | 
| 
      
 77 
     | 
    
         
            +
                    "jest-environment-jsdom": "^29.3.1",
         
     | 
| 
       82 
78 
     | 
    
         
             
                    "npm-run-all": "^4.1.5",
         
     | 
| 
       83 
79 
     | 
    
         
             
                    "parcel-bundler": "^1.12.5",
         
     | 
| 
       84 
80 
     | 
    
         
             
                    "portfinder": "^1.0.20",
         
     | 
| 
       85 
81 
     | 
    
         
             
                    "prettier": "^1.15.2",
         
     | 
| 
       86 
     | 
    
         
            -
                    " 
     | 
| 
       87 
     | 
    
         
            -
                    "react": "^ 
     | 
| 
       88 
     | 
    
         
            -
                    "react-dom": "^ 
     | 
| 
       89 
     | 
    
         
            -
                    " 
     | 
| 
       90 
     | 
    
         
            -
                    "ts-jest": "^ 
     | 
| 
      
 82 
     | 
    
         
            +
                    "prop-types": "^15.0.0",
         
     | 
| 
      
 83 
     | 
    
         
            +
                    "react": "^18.2.0",
         
     | 
| 
      
 84 
     | 
    
         
            +
                    "react-dom": "^18.2.0",
         
     | 
| 
      
 85 
     | 
    
         
            +
                    "start-server-and-test": "^1.15.2",
         
     | 
| 
      
 86 
     | 
    
         
            +
                    "ts-jest": "^29.0.3",
         
     | 
| 
       91 
87 
     | 
    
         
             
                    "tslint": "^5.11.0",
         
     | 
| 
       92 
88 
     | 
    
         
             
                    "tslint-config-prettier": "^1.17.0",
         
     | 
| 
       93 
89 
     | 
    
         
             
                    "tslint-immutable": "^5.0.0",
         
     | 
| 
       94 
     | 
    
         
            -
                    "typescript": " 
     | 
| 
       95 
     | 
    
         
            -
                },
         
     | 
| 
       96 
     | 
    
         
            -
                "jest": {
         
     | 
| 
       97 
     | 
    
         
            -
                    "globals": {
         
     | 
| 
       98 
     | 
    
         
            -
                        "ts-jest": {
         
     | 
| 
       99 
     | 
    
         
            -
                            "diagnostics": {
         
     | 
| 
       100 
     | 
    
         
            -
                                "warnOnly": true
         
     | 
| 
       101 
     | 
    
         
            -
                            },
         
     | 
| 
       102 
     | 
    
         
            -
                            "tsConfig": "tsconfig.spec.json"
         
     | 
| 
       103 
     | 
    
         
            -
                        }
         
     | 
| 
       104 
     | 
    
         
            -
                    },
         
     | 
| 
       105 
     | 
    
         
            -
                    "restoreMocks": true,
         
     | 
| 
       106 
     | 
    
         
            -
                    "transform": {
         
     | 
| 
       107 
     | 
    
         
            -
                        ".(ts|tsx)": "ts-jest"
         
     | 
| 
       108 
     | 
    
         
            -
                    },
         
     | 
| 
       109 
     | 
    
         
            -
                    "moduleFileExtensions": [
         
     | 
| 
       110 
     | 
    
         
            -
                        "json",
         
     | 
| 
       111 
     | 
    
         
            -
                        "ts",
         
     | 
| 
       112 
     | 
    
         
            -
                        "tsx",
         
     | 
| 
       113 
     | 
    
         
            -
                        "js"
         
     | 
| 
       114 
     | 
    
         
            -
                    ],
         
     | 
| 
       115 
     | 
    
         
            -
                    "preset": "jest-puppeteer",
         
     | 
| 
       116 
     | 
    
         
            -
                    "moduleDirectories": [
         
     | 
| 
       117 
     | 
    
         
            -
                        "node_modules",
         
     | 
| 
       118 
     | 
    
         
            -
                        "src",
         
     | 
| 
       119 
     | 
    
         
            -
                        "types"
         
     | 
| 
       120 
     | 
    
         
            -
                    ]
         
     | 
| 
      
 90 
     | 
    
         
            +
                    "typescript": "4.9.4"
         
     | 
| 
       121 
91 
     | 
    
         
             
                },
         
     | 
| 
       122 
92 
     | 
    
         
             
                "prettier": {
         
     | 
| 
       123 
93 
     | 
    
         
             
                    "singleQuote": true
         
     | 
| 
       124 
94 
     | 
    
         
             
                },
         
     | 
| 
       125 
     | 
    
         
            -
                "nyc": {
         
     | 
| 
       126 
     | 
    
         
            -
                    "exclude": [
         
     | 
| 
       127 
     | 
    
         
            -
                        "**/*.spec.js"
         
     | 
| 
       128 
     | 
    
         
            -
                    ]
         
     | 
| 
       129 
     | 
    
         
            -
                },
         
     | 
| 
       130 
95 
     | 
    
         
             
                "resolutions": {
         
     | 
| 
       131 
96 
     | 
    
         
             
                    "yargs-parser": "^13.1.2",
         
     | 
| 
       132 
97 
     | 
    
         
             
                    "dot-prop": "^4.2.1",
         
     | 
| 
         @@ -136,4 +101,4 @@ 
     | 
|
| 
       136 
101 
     | 
    
         
             
                    "node-forge": "^0.10.0",
         
     | 
| 
       137 
102 
     | 
    
         
             
                    "postcss": "^7.0.36"
         
     | 
| 
       138 
103 
     | 
    
         
             
                }
         
     | 
| 
       139 
     | 
    
         
            -
            }
         
     | 
| 
      
 104 
     | 
    
         
            +
            }
         
     | 
    
        package/types/provider.d.ts
    CHANGED
    
    
    
        package/CHANGELOG.md
    DELETED
    
    | 
         
            File without changes
         
     |