@depay/widgets 7.13.2 → 7.14.2
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 +3 -3
- package/dist/esm/index.js +28 -19
- package/dist/umd/index.bundle.js +3 -3
- package/dist/umd/index.js +28 -19
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -1323,7 +1323,7 @@ var CardStyle = (function (style) {
|
|
|
1323
1323
|
});
|
|
1324
1324
|
|
|
1325
1325
|
var DialogStyle = (function (style) {
|
|
1326
|
-
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.
|
|
1326
|
+
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 ";
|
|
1327
1327
|
});
|
|
1328
1328
|
|
|
1329
1329
|
var FontStyle = (function (style) {
|
|
@@ -1367,7 +1367,7 @@ var PaddingStyle = (function () {
|
|
|
1367
1367
|
});
|
|
1368
1368
|
|
|
1369
1369
|
var PoweredByStyle = (function (style) {
|
|
1370
|
-
return "\n\n .PoweredByWrapper {\n display: block;\n left: 0;\n padding-top: 3px;\n position: fixed;\n right: 0;\n text-align: center;\n top: 0;\n }\n\n .contained .PoweredByWrapper {\n position: absolute;\n }\n\n .PoweredByLink {\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\" !important;\n
|
|
1370
|
+
return "\n\n .PoweredByWrapper {\n display: block;\n left: 0;\n padding-top: 3px;\n position: fixed;\n right: 0;\n text-align: center;\n top: 0;\n }\n\n .contained .PoweredByWrapper {\n position: absolute;\n }\n\n .PoweredByLink {\n color: white;\n display: inline-block;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\" !important;\n font-size: 14px;\n font-style: italic;\n font-weight: bold;\n letter-spacing: -0.2px;\n margin-left: 8px;\n opacity: 0.5;\n text-decoration: none;\n text-shadow: black 0 0 2px;\n }\n\n .PoweredByLink:hover, .PoweredByLink:active {\n opacity: 1.0;\n }\n ";
|
|
1371
1371
|
});
|
|
1372
1372
|
|
|
1373
1373
|
var RangeSliderStyle = (function (style) {
|
|
@@ -1411,16 +1411,18 @@ var TooltipStyle = (function (style) {
|
|
|
1411
1411
|
});
|
|
1412
1412
|
|
|
1413
1413
|
var styleRenderer = (function (style) {
|
|
1414
|
-
|
|
1415
|
-
|
|
1414
|
+
var _style, _style2;
|
|
1415
|
+
|
|
1416
|
+
style = {
|
|
1417
|
+
colors: Object.assign({
|
|
1416
1418
|
primary: '#ea357a',
|
|
1417
1419
|
buttonText: '#ffffff',
|
|
1418
1420
|
icons: '#000000',
|
|
1419
1421
|
text: '#212529'
|
|
1420
|
-
},
|
|
1421
|
-
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'
|
|
1422
|
-
}
|
|
1423
|
-
return [ResetStyle(), DialogStyle(), ButtonCircularStyle(), ButtonPrimaryStyle(style), CardStyle(style), PoweredByStyle(
|
|
1422
|
+
}, ((_style = style) === null || _style === void 0 ? void 0 : _style.colors) || {}),
|
|
1423
|
+
fontFamily: ((_style2 = style) === null || _style2 === void 0 ? void 0 : _style2.fontFamily) || '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'
|
|
1424
|
+
};
|
|
1425
|
+
return [ResetStyle(), DialogStyle(), ButtonCircularStyle(), ButtonPrimaryStyle(style), CardStyle(style), PoweredByStyle(), GraphicStyle(), SkeletonStyle(), TokenAmountStyle(), TextStyle(style), FontStyle(style), IconStyle(style), OpacityStyle(), PaddingStyle(), HeightStyle(), LoadingTextStyle(style), RangeSliderStyle(style), InputStyle(), TextButtonStyle(style), ImageStyle(), BlockchainLogoStyle(), SearchStyle(style), TokenImageStyle(), AlertStyle(), TableStyle(), LinkStyle(style), TooltipStyle(style)].join('');
|
|
1424
1426
|
});
|
|
1425
1427
|
|
|
1426
1428
|
var mount = (function (_ref, content) {
|
|
@@ -19064,13 +19066,13 @@ var ChangableAmountProvider = (function (props) {
|
|
|
19064
19066
|
}).then(function (readableMaxAmount) {
|
|
19065
19067
|
var slippage = 1.01;
|
|
19066
19068
|
var maxAmount = parseFloat(new Decimal(readableMaxAmount).div(slippage).mul(conversionRate).toString());
|
|
19067
|
-
setMaxAmount(maxAmount > 10 ? Math.round(maxAmount) : round(maxAmount));
|
|
19069
|
+
setMaxAmount(maxAmount > 10 ? Math.round(maxAmount - 1) : round(maxAmount - 1));
|
|
19068
19070
|
})["catch"](setError);
|
|
19069
19071
|
})["catch"](setError);
|
|
19070
19072
|
} else if (maxRoute.fromToken.address == CONSTANTS[maxRoute.blockchain].USD) {
|
|
19071
19073
|
var _maxAmount = parseFloat(new Decimal(readableMaxAmount).mul(conversionRate).toString());
|
|
19072
19074
|
|
|
19073
|
-
setMaxAmount(_maxAmount > 10 ? Math.round(_maxAmount) : _maxAmount);
|
|
19075
|
+
setMaxAmount(_maxAmount > 10 ? Math.round(_maxAmount - 1) : _maxAmount - 1);
|
|
19074
19076
|
} else {
|
|
19075
19077
|
route({
|
|
19076
19078
|
blockchain: maxRoute.blockchain,
|
|
@@ -20362,7 +20364,9 @@ var ChangeAmountDialog = (function (props) {
|
|
|
20362
20364
|
className: "PaddingLeftM PaddingRightM"
|
|
20363
20365
|
}, /*#__PURE__*/React.createElement("div", {
|
|
20364
20366
|
className: "PaddingTopS TextCenter PaddingBottomL"
|
|
20365
|
-
}, /*#__PURE__*/React.createElement("div",
|
|
20367
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
20368
|
+
className: "PaddingBottomM"
|
|
20369
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
20366
20370
|
max: parseFloat(maxAmount),
|
|
20367
20371
|
min: min,
|
|
20368
20372
|
step: step,
|
|
@@ -20382,12 +20386,12 @@ var ChangeAmountDialog = (function (props) {
|
|
|
20382
20386
|
}
|
|
20383
20387
|
}, /*#__PURE__*/React.createElement("div", {
|
|
20384
20388
|
className: "FontSizeS"
|
|
20385
|
-
}, format(toValidStep(maxAmount)), /*#__PURE__*/React.createElement("button", {
|
|
20389
|
+
}, format(toValidStep(maxAmount)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("button", {
|
|
20386
20390
|
className: "TextButton",
|
|
20387
20391
|
onClick: function onClick() {
|
|
20388
20392
|
changeAmount(toValidValue(maxAmount));
|
|
20389
20393
|
}
|
|
20390
|
-
}, "(Max)")))))),
|
|
20394
|
+
}, "(Max)"))))))),
|
|
20391
20395
|
footer: /*#__PURE__*/React.createElement("div", {
|
|
20392
20396
|
className: "PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"
|
|
20393
20397
|
}, /*#__PURE__*/React.createElement("button", {
|
|
@@ -20537,12 +20541,15 @@ var ChangePaymentDialog = (function (props) {
|
|
|
20537
20541
|
});
|
|
20538
20542
|
|
|
20539
20543
|
var DonationOverviewSkeleton = (function (props) {
|
|
20544
|
+
var _useContext = useContext(ConfigurationContext),
|
|
20545
|
+
title = _useContext.title;
|
|
20546
|
+
|
|
20540
20547
|
return /*#__PURE__*/React.createElement(Dialog$1, {
|
|
20541
20548
|
header: /*#__PURE__*/React.createElement("div", {
|
|
20542
20549
|
className: "PaddingTopS PaddingLeftM PaddingRightM TextLeft"
|
|
20543
20550
|
}, /*#__PURE__*/React.createElement("h1", {
|
|
20544
20551
|
className: "LineHeightL FontSizeL"
|
|
20545
|
-
},
|
|
20552
|
+
}, title || 'Donation')),
|
|
20546
20553
|
body: /*#__PURE__*/React.createElement("div", {
|
|
20547
20554
|
className: "PaddingLeftM PaddingRightM PaddingBottomXS"
|
|
20548
20555
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -20896,7 +20903,8 @@ var Footer = (function () {
|
|
|
20896
20903
|
|
|
20897
20904
|
var DonationOverviewDialog = (function (props) {
|
|
20898
20905
|
var _useContext = useContext(ConfigurationContext),
|
|
20899
|
-
currencyCode = _useContext.currencyCode
|
|
20906
|
+
currencyCode = _useContext.currencyCode,
|
|
20907
|
+
title = _useContext.title;
|
|
20900
20908
|
|
|
20901
20909
|
var _useContext2 = useContext(ChangableAmountContext),
|
|
20902
20910
|
amount = _useContext2.amount;
|
|
@@ -20918,7 +20926,7 @@ var DonationOverviewDialog = (function (props) {
|
|
|
20918
20926
|
className: "PaddingTopS PaddingLeftM PaddingRightM TextLeft"
|
|
20919
20927
|
}, /*#__PURE__*/React.createElement("h1", {
|
|
20920
20928
|
className: "LineHeightL FontSizeL"
|
|
20921
|
-
},
|
|
20929
|
+
}, title || 'Donation')),
|
|
20922
20930
|
body: /*#__PURE__*/React.createElement("div", {
|
|
20923
20931
|
className: "PaddingLeftM PaddingRightM PaddingBottomXS"
|
|
20924
20932
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -21683,12 +21691,12 @@ var preflight$2 = /*#__PURE__*/function () {
|
|
|
21683
21691
|
|
|
21684
21692
|
var Donation = /*#__PURE__*/function () {
|
|
21685
21693
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(_ref3) {
|
|
21686
|
-
var amount, accept, event, sent, confirmed, validated, failed, error, critical, style, blacklist, providers, currency, connected, closed, track, fee, closable, integration, link, container, document, unmount;
|
|
21694
|
+
var amount, accept, event, sent, confirmed, validated, failed, error, critical, style, blacklist, providers, currency, connected, closed, track, fee, closable, integration, link, container, title, document, unmount;
|
|
21687
21695
|
return regenerator.wrap(function _callee2$(_context2) {
|
|
21688
21696
|
while (1) {
|
|
21689
21697
|
switch (_context2.prev = _context2.next) {
|
|
21690
21698
|
case 0:
|
|
21691
|
-
amount = _ref3.amount, accept = _ref3.accept, event = _ref3.event, sent = _ref3.sent, confirmed = _ref3.confirmed, validated = _ref3.validated, failed = _ref3.failed, error = _ref3.error, critical = _ref3.critical, style = _ref3.style, blacklist = _ref3.blacklist, providers = _ref3.providers, currency = _ref3.currency, connected = _ref3.connected, closed = _ref3.closed, track = _ref3.track, fee = _ref3.fee, closable = _ref3.closable, integration = _ref3.integration, link = _ref3.link, container = _ref3.container, document = _ref3.document;
|
|
21699
|
+
amount = _ref3.amount, accept = _ref3.accept, event = _ref3.event, sent = _ref3.sent, confirmed = _ref3.confirmed, validated = _ref3.validated, failed = _ref3.failed, error = _ref3.error, critical = _ref3.critical, style = _ref3.style, blacklist = _ref3.blacklist, providers = _ref3.providers, currency = _ref3.currency, connected = _ref3.connected, closed = _ref3.closed, track = _ref3.track, fee = _ref3.fee, closable = _ref3.closable, integration = _ref3.integration, link = _ref3.link, container = _ref3.container, title = _ref3.title, document = _ref3.document;
|
|
21692
21700
|
requireReactVersion();
|
|
21693
21701
|
_context2.prev = 2;
|
|
21694
21702
|
_context2.next = 5;
|
|
@@ -21724,7 +21732,8 @@ var Donation = /*#__PURE__*/function () {
|
|
|
21724
21732
|
blacklist: blacklist,
|
|
21725
21733
|
providers: providers,
|
|
21726
21734
|
integration: integration,
|
|
21727
|
-
link: link
|
|
21735
|
+
link: link,
|
|
21736
|
+
title: title
|
|
21728
21737
|
}
|
|
21729
21738
|
}, /*#__PURE__*/React.createElement(UpdatableProvider, null, /*#__PURE__*/React.createElement(ClosableProvider, {
|
|
21730
21739
|
unmount: unmount,
|