@fat-zebra/sdk 1.5.2 → 1.5.3-beta.1
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.dev.md +5 -0
- package/build-styles.js +8 -1
- package/dist/index.js +3 -2
- package/package.json +2 -2
- package/tsconfig.package.json +2 -1
- package/dist/local/fatzebra.css +0 -91
- package/dist/local/fatzebra.js +0 -18990
- package/dist/local/fatzebra.js.map +0 -1
- package/dist/local/index.html +0 -247
- package/dist/paypal/paypal-button.d.ts +0 -31
- package/dist/paypal/paypal-button.js +0 -199
- package/dist/paypal/paypal-checkout.d.ts +0 -21
- package/dist/paypal/paypal-checkout.js +0 -100
- package/dist/paypal/types.d.ts +0 -188
- package/dist/paypal/types.js +0 -5
- package/dist/paypal/validation.d.ts +0 -4
- package/dist/paypal/validation.js +0 -65
- package/dist/production/fatzebra.css +0 -91
- package/dist/production/fatzebra.js +0 -2
- package/dist/production/fatzebra.js.LICENSE.txt +0 -1
- package/dist/staging/fatzebra.css +0 -91
- package/dist/staging/fatzebra.js +0 -17717
- package/dist/staging/fatzebra.js.map +0 -1
- package/dist/staging/index.html +0 -247
package/README.dev.md
CHANGED
|
@@ -180,3 +180,8 @@ The release of the sdk follows a weekly schedule. In the beginning of a new rele
|
|
|
180
180
|
11. Push git tag. `git push origin vX.X.X`.
|
|
181
181
|
|
|
182
182
|
Upon successful CI , a new entry with title 'Merged in release/vX.X,X' will be visible in the master branch page. This provides us with a clear view of what gets released in the past. Moreoever, we can quickly find out the list of features/bug fixes in a release by referring to the PR of the release candidate.
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
## Rollback management
|
|
186
|
+
|
|
187
|
+
The CDN is now versioned across staging, sandbox and production environments. The pipeline will upload a version to override the existing deployment, but also a version of the build to a folder in s3. The folder will be a shortened version of the commit hash. This will allow us to advise merchants to rollback to a specific working commit hash, or for us to test different versions in gazelle to facilitate a rollback if necessary.
|
package/build-styles.js
CHANGED
|
@@ -3,7 +3,14 @@ const path = require('path');
|
|
|
3
3
|
|
|
4
4
|
// Define the source file and the destination folder
|
|
5
5
|
const sourceFile = path.join(__dirname, './src/styles.css');
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
let destinationFolder;
|
|
8
|
+
if (process.env.REACT) {
|
|
9
|
+
destinationFolder = path.join(__dirname, 'dist');
|
|
10
|
+
} else {
|
|
11
|
+
destinationFolder = path.join(__dirname, 'dist/' + process.env.ENVIRONMENT);
|
|
12
|
+
}
|
|
13
|
+
|
|
7
14
|
const destinationFile = path.join(destinationFolder, 'fatzebra.css');
|
|
8
15
|
|
|
9
16
|
// Copy the file
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import "ts-polyfill";
|
|
2
2
|
import "custom-event-polyfill";
|
|
3
|
-
|
|
3
|
+
const FatZebra = require("./main").FatZebra;
|
|
4
4
|
import { PublicEvent } from "./shared/types";
|
|
5
5
|
import { Environment } from "./shared/env";
|
|
6
6
|
export { PublicEvent, Environment };
|
|
7
|
-
|
|
7
|
+
// Assign window.FatZebra conditionally
|
|
8
|
+
if (typeof window !== "undefined" && FatZebra) {
|
|
8
9
|
window.FatZebra = FatZebra;
|
|
9
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fat-zebra/sdk",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.3-beta.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"build:staging": "cp .env.staging .env && export ENVIRONMENT=staging && npx webpack --config webpack.config.dev.js && node build-styles.js",
|
|
10
10
|
"build:sandbox": "cp .env.sandbox .env && export ENVIRONMENT=sandbox && npx webpack --config webpack.config.prod.js && node build-styles.js",
|
|
11
11
|
"build:production": "cp .env.production .env && export ENVIRONMENT=production && npx webpack --config webpack.config.prod.js && node build-styles.js",
|
|
12
|
-
"build:package": "tsc -p tsconfig.package.json && ENVIRONMENT=production node build-styles.js",
|
|
12
|
+
"build:package": "tsc -p tsconfig.package.json && REACT=true ENVIRONMENT=production node build-styles.js",
|
|
13
13
|
"start:local:api": "export MERCHANT_MODE=api && npm run build:local --watch && webpack serve --config webpack.config.dev.js --open 'Google Chrome'",
|
|
14
14
|
"start:local:hpp": "export MERCHANT_MODE=hpp && npm run build:local --watch && webpack serve --config webpack.config.dev.js --open 'Google Chrome'",
|
|
15
15
|
"start:staging:api": "export MERCHANT_MODE=api && npm run build:staging --watch && webpack serve --config webpack.config.dev.js --open 'Google Chrome'",
|
package/tsconfig.package.json
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"declaration": true,
|
|
4
4
|
"outDir": "./dist/",
|
|
5
5
|
"jsx": "react",
|
|
6
|
+
"skipLibCheck": true,
|
|
6
7
|
"esModuleInterop": true,
|
|
7
8
|
"sourceMap": false,
|
|
8
9
|
"noImplicitAny": true,
|
|
@@ -16,7 +17,7 @@
|
|
|
16
17
|
"isolatedModules": true,
|
|
17
18
|
},
|
|
18
19
|
"include": [
|
|
19
|
-
"./src/**/*"
|
|
20
|
+
"./src/**/*",
|
|
20
21
|
],
|
|
21
22
|
"exclude": [
|
|
22
23
|
"node_modules",
|
package/dist/local/fatzebra.css
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
.checkout-button-wrapper {
|
|
2
|
-
display: flex;
|
|
3
|
-
justify-content: center;
|
|
4
|
-
align-items: center;
|
|
5
|
-
height: 200px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.iframe-checkout {
|
|
9
|
-
flex: 1;
|
|
10
|
-
border: none;
|
|
11
|
-
width: 100%;
|
|
12
|
-
height: 100%;
|
|
13
|
-
min-height: 0;
|
|
14
|
-
overflow: auto;
|
|
15
|
-
-webkit-overflow-scrolling: touch;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.iframe-foreground,
|
|
19
|
-
.iframe-background {
|
|
20
|
-
top: 0;
|
|
21
|
-
left: 0;
|
|
22
|
-
right: 0;
|
|
23
|
-
bottom: 0;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.iframe-foreground,
|
|
28
|
-
.iframe-background {
|
|
29
|
-
position: fixed;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.iframe-foreground {
|
|
33
|
-
z-index: -1;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.iframe-background {
|
|
37
|
-
background: rgba(0, 0, 0, 0.5);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.iframe-foreground {
|
|
41
|
-
flex-grow: 1;
|
|
42
|
-
top: auto;
|
|
43
|
-
width: 100%;
|
|
44
|
-
max-width: 480px;
|
|
45
|
-
height: 80vh;
|
|
46
|
-
background-color: #ffffff;
|
|
47
|
-
border-radius: 25px 25px 0 0;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.slide-in .iframe-foreground {
|
|
51
|
-
transform: translateY(100vh);
|
|
52
|
-
transition: transform 0.4s ease, z-index 0.3s ease 0.4s;
|
|
53
|
-
z-index: -1;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.slide-in .iframe-background {
|
|
57
|
-
opacity: 0;
|
|
58
|
-
z-index: -1;
|
|
59
|
-
transition: opacity 0.3s ease, z-index 0.3s ease 0.3s;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.slide-in.show .iframe-foreground {
|
|
63
|
-
transform: none;
|
|
64
|
-
transition: transform 0.4s ease;
|
|
65
|
-
z-index: 100;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.slide-in.show .iframe-background {
|
|
69
|
-
opacity: 1;
|
|
70
|
-
z-index: 0;
|
|
71
|
-
transition: opacity 0.3s ease;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
@media only screen and (min-width: 480px) {
|
|
75
|
-
.iframe-foreground {
|
|
76
|
-
margin: 0 auto;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
@media only screen and (min-width: 768px) {
|
|
81
|
-
.iframe-foreground {
|
|
82
|
-
margin: 0;
|
|
83
|
-
width: 400px;
|
|
84
|
-
height: 100vh;
|
|
85
|
-
left: 0;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.slide-in .iframe-foreground {
|
|
89
|
-
transform: translateX(-400px);
|
|
90
|
-
}
|
|
91
|
-
}
|