@seamlessdocs/payment-modals 1.0.43 → 1.0.45

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/index.html CHANGED
@@ -21,29 +21,29 @@
21
21
  <script src="https://core.spreedly.com/iframe/express-2.min.js"></script>
22
22
  <script src="./build/payment-modals.js"></script>
23
23
  <script>
24
- const triggers = document.querySelectorAll('.links a');
25
- const callbacks = {
26
- withoutPay: () => {
24
+ var triggers = document.querySelectorAll('.links a');
25
+ var callbacks = {
26
+ withoutPay: function() {
27
27
  console.log('withoutPay');
28
28
  },
29
- withPay: () => {
29
+ withPay: function() {
30
30
  console.log('withPay');
31
31
  },
32
- close: () => {
32
+ close: function() {
33
33
  console.log('close');
34
34
  },
35
- skip: () => {
35
+ skip: function() {
36
36
  console.log('skip');
37
37
  },
38
- retry: () => {
38
+ retry: function() {
39
39
  console.log('retry');
40
40
  },
41
- successModalContinue: () => {
41
+ successModalContinue: function() {
42
42
  console.log('successModalContinue');
43
43
  }
44
44
  };
45
45
 
46
- triggers[0].addEventListener('click', event => {
46
+ triggers[0].addEventListener('click', function(event) {
47
47
  window.handlePaymentModal.chooseModal({
48
48
  title: 'Pay now or later',
49
49
  description:
@@ -56,10 +56,10 @@
56
56
  }
57
57
  });
58
58
  });
59
- triggers[1].addEventListener('click', event => {
59
+ triggers[1].addEventListener('click', function(event) {
60
60
  window.handlePaymentModal.processingModal();
61
61
  });
62
- triggers[2].addEventListener('click', event => {
62
+ triggers[2].addEventListener('click', function(event) {
63
63
  window.handlePaymentModal.errorModal({
64
64
  isOptional: false,
65
65
  callbacks: {
@@ -68,7 +68,7 @@
68
68
  }
69
69
  });
70
70
  });
71
- triggers[3].addEventListener('click', event => {
71
+ triggers[3].addEventListener('click', function(event) {
72
72
  window.handlePaymentModal.errorModal({
73
73
  isOptional: true,
74
74
  errorText: 'error',
@@ -79,11 +79,11 @@
79
79
  }
80
80
  });
81
81
  });
82
- triggers[4].addEventListener('click', event => {
82
+ triggers[4].addEventListener('click', function(event) {
83
83
  window.handlePaymentModal.successModal({ description: 'my text' });
84
84
  });
85
85
 
86
- triggers[5].addEventListener('click', event => {
86
+ triggers[5].addEventListener('click', function(event) {
87
87
  window.handlePaymentModal.selectPaymentModal({
88
88
  isPaymentRequired: false,
89
89
  bankAccountValue: 25,
@@ -93,23 +93,23 @@
93
93
  isCreditCardFeeEnable: true,
94
94
  isBankAccountFeeEnable: false,
95
95
  callbacks: {
96
- onPayByBank: () => {
96
+ onPayByBank: function() {
97
97
  console.log('pay by bank');
98
98
  },
99
- onPayByCreditCard: () => {
99
+ onPayByCreditCard: function() {
100
100
  console.log('pay by credit card');
101
101
  },
102
- onClose: () => {
102
+ onClose: function() {
103
103
  console.log('close');
104
104
  },
105
- onSkipPayment: () => {
105
+ onSkipPayment: function() {
106
106
  console.log('onSkipPayment');
107
107
  }
108
108
  }
109
109
  });
110
110
  });
111
111
 
112
- triggers[6].addEventListener('click', event => {
112
+ triggers[6].addEventListener('click', function(event) {
113
113
  window.handlePaymentModal.achPaymentModal({
114
114
  amount: 22,
115
115
  totalAmount: 24.24,
@@ -117,19 +117,19 @@
117
117
  description: 'Text from the description field in the gateway details modal.',
118
118
  feeName: 'ololo',
119
119
  callbacks: {
120
- onPay: (...args) => {
121
- setTimeout(() => {
122
- alert(JSON.stringify(args, null, 2));
120
+ onPay: function() {
121
+ setTimeout(function() {
122
+ console.log('Pay');
123
123
  }, 400);
124
124
  },
125
- onClose: () => {
125
+ onClose: function() {
126
126
  console.log('close');
127
127
  }
128
128
  }
129
129
  });
130
130
  });
131
131
 
132
- triggers[7].addEventListener('click', event => {
132
+ triggers[7].addEventListener('click', function(event) {
133
133
  window.handlePaymentModal.none();
134
134
  });
135
135
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamlessdocs/payment-modals",
3
- "version": "1.0.43",
3
+ "version": "1.0.45",
4
4
  "description": "",
5
5
  "main": "build/payment-modals.js",
6
6
  "scripts": {
@@ -17,6 +17,7 @@
17
17
  "@babel/runtime": "^7.4.5",
18
18
  "babel-eslint": "^10.0.1",
19
19
  "babel-loader": "^8.0.6",
20
+ "babel-polyfill": "^6.26.0",
20
21
  "babel-plugin-transform-class-properties": "^6.24.1",
21
22
  "css-loader": "^2.1.1",
22
23
  "eslint": "^5.16.0",
@@ -41,6 +42,7 @@
41
42
  "webpack-dev-server": "^3.2.1"
42
43
  },
43
44
  "dependencies": {
45
+ "@babel/polyfill": "^7.12.1",
44
46
  "babel-plugin-import": "^1.11.0",
45
47
  "base64-image-loader": "^1.2.1",
46
48
  "classnames": "^2.2.6",
@@ -121,3 +121,20 @@
121
121
  .moneyValue {
122
122
  word-break: break-all;
123
123
  }
124
+
125
+ @media (max-width: 520px) {
126
+ .modal {
127
+ flex-direction: column;
128
+ }
129
+
130
+ .paymentInfoContainer {
131
+ width: 100%;
132
+
133
+ border-radius: 6px 6px 0px 0px;
134
+ }
135
+
136
+ .paymentFormContainer {
137
+ box-sizing: border-box;
138
+ padding: 15px 15px 0px;
139
+ }
140
+ }
@@ -153,11 +153,11 @@
153
153
 
154
154
  @media (max-width: 520px) {
155
155
  .modal {
156
- padding: 35px 35px 0px 35px;
156
+ padding: 15px 15px 0px 15px;
157
157
  }
158
158
 
159
159
  .header {
160
- font-size: 26px;
160
+ font-size: 20px;
161
161
  }
162
162
 
163
163
  .withoutPaymentBtn {
@@ -167,10 +167,20 @@
167
167
  .contentContainer {
168
168
  margin-top: 10px;
169
169
  }
170
- }
171
170
 
172
- @media (max-width: 360px) {
173
- .header {
174
- font-size: 24px;
171
+ .paymentTypeContainer {
172
+ padding: 10px 14px 14px 14px;
173
+ }
174
+
175
+ .payButton {
176
+ margin-top: 5px;
177
+ padding: 5px 0;
178
+ }
179
+
180
+ .paymentTypeLabel {
181
+ margin-top: 10px;
182
+
183
+ font-size: 17px;
184
+ line-height: 17px;
175
185
  }
176
186
  }
package/src/index.jsx CHANGED
@@ -1,3 +1,5 @@
1
+ import '@babel/polyfill';
2
+
1
3
  import React from 'react';
2
4
  import ReactDOM from 'react-dom';
3
5