@depay/widgets 9.2.3 → 9.3.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/dist/esm/index.bundle.js +16 -16
- package/dist/esm/index.js +118 -9
- package/dist/umd/index.bundle.js +16 -16
- package/dist/umd/index.js +118 -9
- 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) {
|
|
@@ -21295,6 +21295,111 @@
|
|
|
21295
21295
|
};
|
|
21296
21296
|
}();
|
|
21297
21297
|
|
|
21298
|
+
var LoadingDialog = (function (props) {
|
|
21299
|
+
var _useContext = React.useContext(ConfigurationContext),
|
|
21300
|
+
text = _useContext.text;
|
|
21301
|
+
return /*#__PURE__*/React__default["default"].createElement(Dialog$1, {
|
|
21302
|
+
closable: false,
|
|
21303
|
+
header: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21304
|
+
className: "PaddingTopS PaddingLeftM PaddingRightM TextLeft"
|
|
21305
|
+
}, /*#__PURE__*/React__default["default"].createElement("h1", {
|
|
21306
|
+
className: "LineHeightL FontSizeL"
|
|
21307
|
+
}, "Payment")),
|
|
21308
|
+
body: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21309
|
+
className: "PaddingLeftM PaddingRightM PaddingBottomXS"
|
|
21310
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21311
|
+
className: "Card Skeleton"
|
|
21312
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21313
|
+
className: "SkeletonBackground"
|
|
21314
|
+
}))),
|
|
21315
|
+
footer: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21316
|
+
className: "PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomS"
|
|
21317
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21318
|
+
className: "SkeletonWrapper"
|
|
21319
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21320
|
+
className: "ButtonPrimary Skeleton"
|
|
21321
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21322
|
+
className: "SkeletonBackground"
|
|
21323
|
+
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21324
|
+
className: "TextCenter Opacity05 PaddingTopS"
|
|
21325
|
+
}, /*#__PURE__*/React__default["default"].createElement("strong", null, text)))
|
|
21326
|
+
});
|
|
21327
|
+
});
|
|
21328
|
+
|
|
21329
|
+
var LoadingStack = (function (props) {
|
|
21330
|
+
var _useContext = React.useContext(ClosableContext),
|
|
21331
|
+
open = _useContext.open,
|
|
21332
|
+
close = _useContext.close;
|
|
21333
|
+
var _useContext2 = React.useContext(NavigateContext),
|
|
21334
|
+
setNavigator = _useContext2.setNavigator;
|
|
21335
|
+
return /*#__PURE__*/React__default["default"].createElement(reactDialogStack.ReactDialogStack, {
|
|
21336
|
+
setNavigator: setNavigator,
|
|
21337
|
+
open: open,
|
|
21338
|
+
close: close,
|
|
21339
|
+
start: "Loading",
|
|
21340
|
+
container: props.container,
|
|
21341
|
+
document: props.document,
|
|
21342
|
+
dialogs: {
|
|
21343
|
+
Loading: /*#__PURE__*/React__default["default"].createElement(LoadingDialog, null)
|
|
21344
|
+
}
|
|
21345
|
+
});
|
|
21346
|
+
});
|
|
21347
|
+
|
|
21348
|
+
var Loading = /*#__PURE__*/function () {
|
|
21349
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(_ref) {
|
|
21350
|
+
var text, style, error, critical, container, document, unmount;
|
|
21351
|
+
return regenerator.wrap(function _callee$(_context) {
|
|
21352
|
+
while (1) switch (_context.prev = _context.next) {
|
|
21353
|
+
case 0:
|
|
21354
|
+
text = _ref.text, style = _ref.style, error = _ref.error, critical = _ref.critical, container = _ref.container, _ref.before, document = _ref.document;
|
|
21355
|
+
requireReactVersion();
|
|
21356
|
+
_context.prev = 2;
|
|
21357
|
+
unmount = mount({
|
|
21358
|
+
style: style,
|
|
21359
|
+
container: container,
|
|
21360
|
+
document: ensureDocument(document),
|
|
21361
|
+
closed: closed
|
|
21362
|
+
}, function (unmount) {
|
|
21363
|
+
return function (container) {
|
|
21364
|
+
return /*#__PURE__*/React__default["default"].createElement(ErrorProvider, {
|
|
21365
|
+
errorCallback: error,
|
|
21366
|
+
container: container,
|
|
21367
|
+
unmount: unmount
|
|
21368
|
+
}, /*#__PURE__*/React__default["default"].createElement(ConfigurationProvider, {
|
|
21369
|
+
configuration: {
|
|
21370
|
+
text: text
|
|
21371
|
+
}
|
|
21372
|
+
}, /*#__PURE__*/React__default["default"].createElement(UpdatableProvider, null, /*#__PURE__*/React__default["default"].createElement(ClosableProvider, {
|
|
21373
|
+
unmount: unmount,
|
|
21374
|
+
closable: false
|
|
21375
|
+
}, /*#__PURE__*/React__default["default"].createElement(NavigateProvider, null, /*#__PURE__*/React__default["default"].createElement(LoadingStack, {
|
|
21376
|
+
document: document,
|
|
21377
|
+
container: container
|
|
21378
|
+
}), /*#__PURE__*/React__default["default"].createElement(PoweredBy, null))))));
|
|
21379
|
+
};
|
|
21380
|
+
});
|
|
21381
|
+
window._depayUnmountLoading = unmount;
|
|
21382
|
+
return _context.abrupt("return", {
|
|
21383
|
+
unmount: unmount
|
|
21384
|
+
});
|
|
21385
|
+
case 8:
|
|
21386
|
+
_context.prev = 8;
|
|
21387
|
+
_context.t0 = _context["catch"](2);
|
|
21388
|
+
console.log('critical error', _context.t0);
|
|
21389
|
+
if (critical != undefined) {
|
|
21390
|
+
critical(_context.t0);
|
|
21391
|
+
}
|
|
21392
|
+
case 12:
|
|
21393
|
+
case "end":
|
|
21394
|
+
return _context.stop();
|
|
21395
|
+
}
|
|
21396
|
+
}, _callee, null, [[2, 8]]);
|
|
21397
|
+
}));
|
|
21398
|
+
return function Loading(_x) {
|
|
21399
|
+
return _ref2.apply(this, arguments);
|
|
21400
|
+
};
|
|
21401
|
+
}();
|
|
21402
|
+
|
|
21298
21403
|
var SignLoginDialog = (function (props) {
|
|
21299
21404
|
var _useContext = React.useContext(ErrorContext),
|
|
21300
21405
|
setError = _useContext.setError;
|
|
@@ -21512,7 +21617,7 @@
|
|
|
21512
21617
|
className: "SkeletonBackground"
|
|
21513
21618
|
}))),
|
|
21514
21619
|
footer: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21515
|
-
className: "PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM
|
|
21620
|
+
className: ["PaddingTopXS PaddingRightM PaddingLeftM", selectedRoute == undefined && slowRouting ? 'PaddingBottomS' : 'PaddingBottomM'].join(' ')
|
|
21516
21621
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21517
21622
|
className: "SkeletonWrapper"
|
|
21518
21623
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -21783,6 +21888,9 @@
|
|
|
21783
21888
|
recover: recover
|
|
21784
21889
|
});
|
|
21785
21890
|
case 5:
|
|
21891
|
+
if (typeof window._depayUnmountLoading == 'function') {
|
|
21892
|
+
window._depayUnmountLoading();
|
|
21893
|
+
}
|
|
21786
21894
|
unmount = mount({
|
|
21787
21895
|
style: style,
|
|
21788
21896
|
container: container,
|
|
@@ -21845,18 +21953,18 @@
|
|
|
21845
21953
|
return _context2.abrupt("return", {
|
|
21846
21954
|
unmount: unmount
|
|
21847
21955
|
});
|
|
21848
|
-
case
|
|
21849
|
-
_context2.prev =
|
|
21956
|
+
case 10:
|
|
21957
|
+
_context2.prev = 10;
|
|
21850
21958
|
_context2.t0 = _context2["catch"](2);
|
|
21851
21959
|
console.log('critical error', _context2.t0);
|
|
21852
21960
|
if (critical != undefined) {
|
|
21853
21961
|
critical(_context2.t0);
|
|
21854
21962
|
}
|
|
21855
|
-
case
|
|
21963
|
+
case 14:
|
|
21856
21964
|
case "end":
|
|
21857
21965
|
return _context2.stop();
|
|
21858
21966
|
}
|
|
21859
|
-
}, _callee2, null, [[2,
|
|
21967
|
+
}, _callee2, null, [[2, 10]]);
|
|
21860
21968
|
}));
|
|
21861
21969
|
return function Payment(_x2) {
|
|
21862
21970
|
return _ref4.apply(this, arguments);
|
|
@@ -23669,7 +23777,8 @@
|
|
|
23669
23777
|
Login: Login,
|
|
23670
23778
|
Payment: Payment,
|
|
23671
23779
|
Sale: Sale,
|
|
23672
|
-
Select: Select
|
|
23780
|
+
Select: Select,
|
|
23781
|
+
Loading: Loading
|
|
23673
23782
|
};
|
|
23674
23783
|
|
|
23675
23784
|
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.0",
|
|
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",
|