@depay/widgets 9.2.3 → 9.3.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/dist/esm/index.bundle.js +31 -16
- package/dist/esm/index.js +137 -21
- package/dist/umd/index.bundle.js +31 -16
- package/dist/umd/index.js +137 -21
- package/package.json +1 -1
package/dist/umd/index.js
CHANGED
|
@@ -528,7 +528,7 @@
|
|
|
528
528
|
close = _useContext2.close,
|
|
529
529
|
closable = _useContext2.closable;
|
|
530
530
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
531
|
-
className: "Dialog"
|
|
531
|
+
className: ["Dialog", props.className].join(' ')
|
|
532
532
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
533
533
|
className: ["DialogHeader", props.stacked ? 'TextCenter' : ''].join(' ')
|
|
534
534
|
}, props.stacked && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -541,7 +541,7 @@
|
|
|
541
541
|
title: "Go back"
|
|
542
542
|
}, /*#__PURE__*/React__default["default"].createElement(ChevronLeft, null))), props.header, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
543
543
|
className: "DialogHeaderActionRight PaddingTopS PaddingLeftS PaddingRightS"
|
|
544
|
-
}, closable && /*#__PURE__*/React__default["default"].createElement("button", {
|
|
544
|
+
}, closable && props.closable !== false && /*#__PURE__*/React__default["default"].createElement("button", {
|
|
545
545
|
onClick: close,
|
|
546
546
|
className: "ButtonCircular",
|
|
547
547
|
title: "Close dialog"
|
|
@@ -1221,7 +1221,7 @@
|
|
|
1221
1221
|
});
|
|
1222
1222
|
|
|
1223
1223
|
var DialogStyle = (function (style) {
|
|
1224
|
-
return "\n\n .ReactDialogBackground {\n backdrop-filter: blur(5px);\n background: rgba(0,0,0,0.7);\n }\n\n .contained .ReactDialog {\n position: absolute;\n height: 100%;\n min-height: 100%;\n width: 100%;\n min-width: 100%;\n }\n\n .contained .ReactDialogBackground {\n position: absolute;\n }\n\n .contained .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n top: 0;\n }\n\n .Dialog {\n margin: 0 auto;\n position: relative;\n width: 420px;\n box-shadow: 0 0 20px rgba(0,0,0,0.2);\n border-radius: 13px;\n background: rgb(248,248,248);\n }\n\n @media (max-width: 450px) {\n\n .Dialog {\n border-radius: 0;\n width: 100%;\n }\n }\n\n @media (orientation: portrait) and (max-width: 800px) {\n\n .ReactDialogAnimation {\n width: 100%;\n }\n\n .ReactDialog {\n height: 100%;\n min-height: 100%;\n }\n\n .ReactDialogStack {\n align-items: flex-end;\n }\n\n .Dialog {\n align-content: stretch;\n border-radius: 13px;\n border-top-radius: 13px;\n display: flex;\n flex-direction: column;\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n .DialogBody {\n flex: 1;\n align-items: flex-end;\n }\n\n .DialogFooter {\n padding-bottom: 20px;\n }\n\n .ReactDialogAnimation {\n margin-bottom: -100px !important;\n top: inherit !important;\n position: relative;\n transition: opacity 0.4s ease, margin-bottom 0.4s ease;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n margin-bottom: 0px !important;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n .ReactShadowDOMInsideContainer > .ReactDialog {\n align-items: flex-end;\n }\n }\n\n .DialogBody {\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .DialogBody.ScrollHeight {\n height: 30vh !important;\n max-height: 30vh !important;\n }\n\n .DialogHeader {\n border-top-left-radius: 13px;\n border-top-right-radius: 13px;\n min-height: 54px;\n position: relative;\n width: 100%;\n }\n\n .DialogHeaderActionRight {\n position: absolute;\n top: 0;\n right: 0;\n height: 48px;\n }\n\n .DialogHeaderActionLeft {\n position: absolute;\n top: 0;\n left: 0;\n height: 48px;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 13px;\n border-bottom-right-radius: 13px;\n line-height: 24px;\n min-height: 32px;\n position: relative;\n text-align: center;\n }\n\n ";
|
|
1224
|
+
return "\n\n .ReactDialogBackground {\n z-index: -2;\n backdrop-filter: blur(5px);\n background: rgba(0,0,0,0.7);\n }\n\n .contained .ReactDialog {\n position: absolute;\n height: 100%;\n min-height: 100%;\n width: 100%;\n min-width: 100%;\n }\n\n .contained .ReactDialogBackground {\n position: absolute;\n }\n\n .contained .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n top: 0;\n }\n\n .Dialog {\n margin: 0 auto;\n position: relative;\n width: 420px;\n box-shadow: 0 0 20px rgba(0,0,0,0.2);\n border-radius: 13px;\n background: rgb(248,248,248);\n }\n\n @media (max-width: 450px) {\n\n .Dialog {\n border-radius: 0;\n width: 100%;\n }\n }\n\n @media (orientation: portrait) and (max-width: 800px) {\n\n .ReactDialogAnimation {\n width: 100%;\n }\n\n .ReactDialog {\n height: 100%;\n min-height: 100%;\n }\n\n .ReactDialogStack {\n align-items: flex-end;\n }\n\n .Dialog {\n align-content: stretch;\n border-radius: 13px;\n border-top-radius: 13px;\n display: flex;\n flex-direction: column;\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n .DialogBody {\n flex: 1;\n align-items: flex-end;\n }\n\n .DialogFooter {\n padding-bottom: 20px;\n }\n\n .ReactDialogAnimation {\n margin-bottom: -100px !important;\n top: inherit !important;\n position: relative;\n transition: opacity 0.4s ease, margin-bottom 0.4s ease;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n margin-bottom: 0px !important;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n .ReactShadowDOMInsideContainer > .ReactDialog {\n align-items: flex-end;\n }\n }\n\n .DialogBody {\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .DialogBody.ScrollHeight {\n height: 30vh !important;\n max-height: 30vh !important;\n }\n\n .DialogBody.MinHeight {\n height: 120px !important;\n max-height: 120px !important;\n }\n\n .DialogHeader {\n border-top-left-radius: 13px;\n border-top-right-radius: 13px;\n min-height: 54px;\n position: relative;\n width: 100%;\n }\n\n .DialogHeaderActionRight {\n position: absolute;\n top: 0;\n right: 0;\n height: 48px;\n }\n\n .DialogHeaderActionLeft {\n position: absolute;\n top: 0;\n left: 0;\n height: 48px;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 13px;\n border-bottom-right-radius: 13px;\n line-height: 24px;\n min-height: 32px;\n position: relative;\n text-align: center;\n }\n\n ";
|
|
1225
1225
|
});
|
|
1226
1226
|
|
|
1227
1227
|
var FontStyle = (function (style) {
|
|
@@ -20583,8 +20583,9 @@
|
|
|
20583
20583
|
_useContext.errorCallback;
|
|
20584
20584
|
var _useContext2 = React.useContext(ConfigurationContext),
|
|
20585
20585
|
track = _useContext2.track,
|
|
20586
|
-
validated = _useContext2.validated
|
|
20587
|
-
|
|
20586
|
+
validated = _useContext2.validated;
|
|
20587
|
+
_useContext2.failed;
|
|
20588
|
+
var integration = _useContext2.integration,
|
|
20588
20589
|
link = _useContext2.link,
|
|
20589
20590
|
type = _useContext2.type;
|
|
20590
20591
|
var _useContext3 = React.useContext(WalletContext),
|
|
@@ -20638,8 +20639,8 @@
|
|
|
20638
20639
|
var _useContext4 = React.useContext(ClosableContext),
|
|
20639
20640
|
setClosable = _useContext4.setClosable;
|
|
20640
20641
|
var _useContext5 = React.useContext(NavigateContext),
|
|
20641
|
-
navigate = _useContext5.navigate
|
|
20642
|
-
_useContext5.set;
|
|
20642
|
+
navigate = _useContext5.navigate,
|
|
20643
|
+
set = _useContext5.set;
|
|
20643
20644
|
var openSocket = function openSocket(transaction) {
|
|
20644
20645
|
var socket = new WebSocket('wss://integrate.depay.com/cable');
|
|
20645
20646
|
socket.onopen = function (event) {
|
|
@@ -20665,18 +20666,24 @@
|
|
|
20665
20666
|
if (item.type === "ping" || !item.message) {
|
|
20666
20667
|
return;
|
|
20667
20668
|
}
|
|
20669
|
+
var success = item.message.status == 'success';
|
|
20668
20670
|
if (validated) {
|
|
20669
|
-
validated(
|
|
20671
|
+
validated(success);
|
|
20670
20672
|
}
|
|
20671
20673
|
if (item.message.release) {
|
|
20672
|
-
setRelease(true);
|
|
20673
|
-
setClosable(!item.message.forward_to);
|
|
20674
|
-
setForwardTo(item.message.forward_to);
|
|
20675
20674
|
socket.close(1000);
|
|
20676
|
-
if (
|
|
20677
|
-
|
|
20678
|
-
|
|
20679
|
-
|
|
20675
|
+
if (success) {
|
|
20676
|
+
setRelease(true);
|
|
20677
|
+
setClosable(!item.message.forward_to);
|
|
20678
|
+
setForwardTo(item.message.forward_to);
|
|
20679
|
+
if (!!item.message.forward_to) {
|
|
20680
|
+
setTimeout(function () {
|
|
20681
|
+
props.document.location.href = item.message.forward_to;
|
|
20682
|
+
}, 200);
|
|
20683
|
+
}
|
|
20684
|
+
} else if (success == false) {
|
|
20685
|
+
setClosable(true);
|
|
20686
|
+
set(['PaymentFailed']);
|
|
20680
20687
|
}
|
|
20681
20688
|
} else if (item.message.confirmations) {
|
|
20682
20689
|
setConfirmationsRequired(item.message.confirmations.required);
|
|
@@ -21295,6 +21302,111 @@
|
|
|
21295
21302
|
};
|
|
21296
21303
|
}();
|
|
21297
21304
|
|
|
21305
|
+
var LoadingDialog = (function (props) {
|
|
21306
|
+
var _useContext = React.useContext(ConfigurationContext),
|
|
21307
|
+
text = _useContext.text;
|
|
21308
|
+
return /*#__PURE__*/React__default["default"].createElement(Dialog$1, {
|
|
21309
|
+
closable: false,
|
|
21310
|
+
header: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21311
|
+
className: "PaddingTopS PaddingLeftM PaddingRightM TextLeft"
|
|
21312
|
+
}, /*#__PURE__*/React__default["default"].createElement("h1", {
|
|
21313
|
+
className: "LineHeightL FontSizeL"
|
|
21314
|
+
}, "Payment")),
|
|
21315
|
+
body: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21316
|
+
className: "PaddingLeftM PaddingRightM PaddingBottomXS"
|
|
21317
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21318
|
+
className: "Card Skeleton"
|
|
21319
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21320
|
+
className: "SkeletonBackground"
|
|
21321
|
+
}))),
|
|
21322
|
+
footer: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21323
|
+
className: "PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomS"
|
|
21324
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21325
|
+
className: "SkeletonWrapper"
|
|
21326
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21327
|
+
className: "ButtonPrimary Skeleton"
|
|
21328
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21329
|
+
className: "SkeletonBackground"
|
|
21330
|
+
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21331
|
+
className: "TextCenter Opacity05 PaddingTopS"
|
|
21332
|
+
}, /*#__PURE__*/React__default["default"].createElement("strong", null, text)))
|
|
21333
|
+
});
|
|
21334
|
+
});
|
|
21335
|
+
|
|
21336
|
+
var LoadingStack = (function (props) {
|
|
21337
|
+
var _useContext = React.useContext(ClosableContext),
|
|
21338
|
+
open = _useContext.open,
|
|
21339
|
+
close = _useContext.close;
|
|
21340
|
+
var _useContext2 = React.useContext(NavigateContext),
|
|
21341
|
+
setNavigator = _useContext2.setNavigator;
|
|
21342
|
+
return /*#__PURE__*/React__default["default"].createElement(reactDialogStack.ReactDialogStack, {
|
|
21343
|
+
setNavigator: setNavigator,
|
|
21344
|
+
open: open,
|
|
21345
|
+
close: close,
|
|
21346
|
+
start: "Loading",
|
|
21347
|
+
container: props.container,
|
|
21348
|
+
document: props.document,
|
|
21349
|
+
dialogs: {
|
|
21350
|
+
Loading: /*#__PURE__*/React__default["default"].createElement(LoadingDialog, null)
|
|
21351
|
+
}
|
|
21352
|
+
});
|
|
21353
|
+
});
|
|
21354
|
+
|
|
21355
|
+
var Loading = /*#__PURE__*/function () {
|
|
21356
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(_ref) {
|
|
21357
|
+
var text, style, error, critical, container, document, unmount;
|
|
21358
|
+
return regenerator.wrap(function _callee$(_context) {
|
|
21359
|
+
while (1) switch (_context.prev = _context.next) {
|
|
21360
|
+
case 0:
|
|
21361
|
+
text = _ref.text, style = _ref.style, error = _ref.error, critical = _ref.critical, container = _ref.container, _ref.before, document = _ref.document;
|
|
21362
|
+
requireReactVersion();
|
|
21363
|
+
_context.prev = 2;
|
|
21364
|
+
unmount = mount({
|
|
21365
|
+
style: style,
|
|
21366
|
+
container: container,
|
|
21367
|
+
document: ensureDocument(document),
|
|
21368
|
+
closed: closed
|
|
21369
|
+
}, function (unmount) {
|
|
21370
|
+
return function (container) {
|
|
21371
|
+
return /*#__PURE__*/React__default["default"].createElement(ErrorProvider, {
|
|
21372
|
+
errorCallback: error,
|
|
21373
|
+
container: container,
|
|
21374
|
+
unmount: unmount
|
|
21375
|
+
}, /*#__PURE__*/React__default["default"].createElement(ConfigurationProvider, {
|
|
21376
|
+
configuration: {
|
|
21377
|
+
text: text
|
|
21378
|
+
}
|
|
21379
|
+
}, /*#__PURE__*/React__default["default"].createElement(UpdatableProvider, null, /*#__PURE__*/React__default["default"].createElement(ClosableProvider, {
|
|
21380
|
+
unmount: unmount,
|
|
21381
|
+
closable: false
|
|
21382
|
+
}, /*#__PURE__*/React__default["default"].createElement(NavigateProvider, null, /*#__PURE__*/React__default["default"].createElement(LoadingStack, {
|
|
21383
|
+
document: document,
|
|
21384
|
+
container: container
|
|
21385
|
+
}), /*#__PURE__*/React__default["default"].createElement(PoweredBy, null))))));
|
|
21386
|
+
};
|
|
21387
|
+
});
|
|
21388
|
+
window._depayUnmountLoading = unmount;
|
|
21389
|
+
return _context.abrupt("return", {
|
|
21390
|
+
unmount: unmount
|
|
21391
|
+
});
|
|
21392
|
+
case 8:
|
|
21393
|
+
_context.prev = 8;
|
|
21394
|
+
_context.t0 = _context["catch"](2);
|
|
21395
|
+
console.log('critical error', _context.t0);
|
|
21396
|
+
if (critical != undefined) {
|
|
21397
|
+
critical(_context.t0);
|
|
21398
|
+
}
|
|
21399
|
+
case 12:
|
|
21400
|
+
case "end":
|
|
21401
|
+
return _context.stop();
|
|
21402
|
+
}
|
|
21403
|
+
}, _callee, null, [[2, 8]]);
|
|
21404
|
+
}));
|
|
21405
|
+
return function Loading(_x) {
|
|
21406
|
+
return _ref2.apply(this, arguments);
|
|
21407
|
+
};
|
|
21408
|
+
}();
|
|
21409
|
+
|
|
21298
21410
|
var SignLoginDialog = (function (props) {
|
|
21299
21411
|
var _useContext = React.useContext(ErrorContext),
|
|
21300
21412
|
setError = _useContext.setError;
|
|
@@ -21512,7 +21624,7 @@
|
|
|
21512
21624
|
className: "SkeletonBackground"
|
|
21513
21625
|
}))),
|
|
21514
21626
|
footer: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21515
|
-
className: "PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM
|
|
21627
|
+
className: ["PaddingTopXS PaddingRightM PaddingLeftM", selectedRoute == undefined && slowRouting ? 'PaddingBottomS' : 'PaddingBottomM'].join(' ')
|
|
21516
21628
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21517
21629
|
className: "SkeletonWrapper"
|
|
21518
21630
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -21783,6 +21895,9 @@
|
|
|
21783
21895
|
recover: recover
|
|
21784
21896
|
});
|
|
21785
21897
|
case 5:
|
|
21898
|
+
if (typeof window._depayUnmountLoading == 'function') {
|
|
21899
|
+
window._depayUnmountLoading();
|
|
21900
|
+
}
|
|
21786
21901
|
unmount = mount({
|
|
21787
21902
|
style: style,
|
|
21788
21903
|
container: container,
|
|
@@ -21845,18 +21960,18 @@
|
|
|
21845
21960
|
return _context2.abrupt("return", {
|
|
21846
21961
|
unmount: unmount
|
|
21847
21962
|
});
|
|
21848
|
-
case
|
|
21849
|
-
_context2.prev =
|
|
21963
|
+
case 10:
|
|
21964
|
+
_context2.prev = 10;
|
|
21850
21965
|
_context2.t0 = _context2["catch"](2);
|
|
21851
21966
|
console.log('critical error', _context2.t0);
|
|
21852
21967
|
if (critical != undefined) {
|
|
21853
21968
|
critical(_context2.t0);
|
|
21854
21969
|
}
|
|
21855
|
-
case
|
|
21970
|
+
case 14:
|
|
21856
21971
|
case "end":
|
|
21857
21972
|
return _context2.stop();
|
|
21858
21973
|
}
|
|
21859
|
-
}, _callee2, null, [[2,
|
|
21974
|
+
}, _callee2, null, [[2, 10]]);
|
|
21860
21975
|
}));
|
|
21861
21976
|
return function Payment(_x2) {
|
|
21862
21977
|
return _ref4.apply(this, arguments);
|
|
@@ -23669,7 +23784,8 @@
|
|
|
23669
23784
|
Login: Login,
|
|
23670
23785
|
Payment: Payment,
|
|
23671
23786
|
Sale: Sale,
|
|
23672
|
-
Select: Select
|
|
23787
|
+
Select: Select,
|
|
23788
|
+
Loading: Loading
|
|
23673
23789
|
};
|
|
23674
23790
|
|
|
23675
23791
|
return DePayWidgets;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depay/widgets",
|
|
3
3
|
"moduleName": "DePayWidgets",
|
|
4
|
-
"version": "9.
|
|
4
|
+
"version": "9.3.1",
|
|
5
5
|
"description": "Web3 Payments with any token. DePay simplifies and improves Web3 Payments with the power of DeFi. Accept any token with on-the-fly conversion.",
|
|
6
6
|
"main": "./dist/umd/index.js",
|
|
7
7
|
"module": "./dist/esm/index.js",
|