@seamlessdocs/payment-modals 1.0.59 → 1.0.61
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/build/payment-modals.js +10 -10
- package/package.json +1 -1
- package/src/index.jsx +4 -4
- package/src/shims.js +4 -4
package/package.json
CHANGED
package/src/index.jsx
CHANGED
|
@@ -12,7 +12,7 @@ import GovOSPayACHPaymentModal from './Components/GovOSPayACHPaymentModal';
|
|
|
12
12
|
import GovOSPayCardPaymentModal from './Components/GovOSPayCardPaymentModal';
|
|
13
13
|
import GovOSPayInvoiceSummaryModal from './Components/GovOSPayInvoiceSummaryModal';
|
|
14
14
|
|
|
15
|
-
import { restoreNativeEventConstructor,
|
|
15
|
+
import { restoreNativeEventConstructor, restoreExtendedEventConstructor } from './shims';
|
|
16
16
|
|
|
17
17
|
import './OpenViewStyles.css';
|
|
18
18
|
|
|
@@ -104,7 +104,7 @@ handlePaymentModal.govOSPayACHPaymentModal = settings => {
|
|
|
104
104
|
/>,
|
|
105
105
|
document.getElementById('payment-modal')
|
|
106
106
|
);
|
|
107
|
-
|
|
107
|
+
restoreExtendedEventConstructor();
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
// TODO: Remove use of shims when mootools is removed
|
|
@@ -122,7 +122,7 @@ handlePaymentModal.govOSPayCardPaymentModal = settings => {
|
|
|
122
122
|
/>,
|
|
123
123
|
document.getElementById('payment-modal')
|
|
124
124
|
);
|
|
125
|
-
|
|
125
|
+
restoreExtendedEventConstructor();
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
// TODO: Remove use of shims when mootools is removed
|
|
@@ -136,7 +136,7 @@ handlePaymentModal.govOSPayInvoiceSummaryModal = settings => {
|
|
|
136
136
|
/>,
|
|
137
137
|
document.getElementById('payment-modal')
|
|
138
138
|
);
|
|
139
|
-
|
|
139
|
+
restoreExtendedEventConstructor();
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
handlePaymentModal.none = () => {
|
package/src/shims.js
CHANGED
|
@@ -11,14 +11,14 @@ export function getNativeEventConstructor() {
|
|
|
11
11
|
// This function is used to restore the native Event constructor
|
|
12
12
|
// when the Event constructor is overridden by mootools
|
|
13
13
|
export function restoreNativeEventConstructor() {
|
|
14
|
-
|
|
14
|
+
global.ExtendedEvent = global.Event;
|
|
15
15
|
const nativeEvent = getNativeEventConstructor();
|
|
16
|
-
|
|
16
|
+
global.Event = nativeEvent;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
// This function is used to restore the Extended Event constructor
|
|
20
20
|
// so that mootools can continue to work
|
|
21
21
|
export function restoreExtendedEventConstructor() {
|
|
22
|
-
|
|
23
|
-
delete
|
|
22
|
+
global.Event = global.ExtendedEvent;
|
|
23
|
+
delete global.ExtendedEvent;
|
|
24
24
|
}
|