@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/umd/index.js
CHANGED
|
@@ -1318,7 +1318,7 @@
|
|
|
1318
1318
|
});
|
|
1319
1319
|
|
|
1320
1320
|
var DialogStyle = (function (style) {
|
|
1321
|
-
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.
|
|
1321
|
+
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 ";
|
|
1322
1322
|
});
|
|
1323
1323
|
|
|
1324
1324
|
var FontStyle = (function (style) {
|
|
@@ -1362,7 +1362,7 @@
|
|
|
1362
1362
|
});
|
|
1363
1363
|
|
|
1364
1364
|
var PoweredByStyle = (function (style) {
|
|
1365
|
-
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
|
|
1365
|
+
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 ";
|
|
1366
1366
|
});
|
|
1367
1367
|
|
|
1368
1368
|
var RangeSliderStyle = (function (style) {
|
|
@@ -1406,16 +1406,18 @@
|
|
|
1406
1406
|
});
|
|
1407
1407
|
|
|
1408
1408
|
var styleRenderer = (function (style) {
|
|
1409
|
-
|
|
1410
|
-
|
|
1409
|
+
var _style, _style2;
|
|
1410
|
+
|
|
1411
|
+
style = {
|
|
1412
|
+
colors: Object.assign({
|
|
1411
1413
|
primary: '#ea357a',
|
|
1412
1414
|
buttonText: '#ffffff',
|
|
1413
1415
|
icons: '#000000',
|
|
1414
1416
|
text: '#212529'
|
|
1415
|
-
},
|
|
1416
|
-
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'
|
|
1417
|
-
}
|
|
1418
|
-
return [ResetStyle(), DialogStyle(), ButtonCircularStyle(), ButtonPrimaryStyle(style), CardStyle(style), PoweredByStyle(
|
|
1417
|
+
}, ((_style = style) === null || _style === void 0 ? void 0 : _style.colors) || {}),
|
|
1418
|
+
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"'
|
|
1419
|
+
};
|
|
1420
|
+
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('');
|
|
1419
1421
|
});
|
|
1420
1422
|
|
|
1421
1423
|
var mount = (function (_ref, content) {
|
|
@@ -19059,13 +19061,13 @@
|
|
|
19059
19061
|
}).then(function (readableMaxAmount) {
|
|
19060
19062
|
var slippage = 1.01;
|
|
19061
19063
|
var maxAmount = parseFloat(new decimal_js.Decimal(readableMaxAmount).div(slippage).mul(conversionRate).toString());
|
|
19062
|
-
setMaxAmount(maxAmount > 10 ? Math.round(maxAmount) : round(maxAmount));
|
|
19064
|
+
setMaxAmount(maxAmount > 10 ? Math.round(maxAmount - 1) : round(maxAmount - 1));
|
|
19063
19065
|
})["catch"](setError);
|
|
19064
19066
|
})["catch"](setError);
|
|
19065
19067
|
} else if (maxRoute.fromToken.address == web3Constants.CONSTANTS[maxRoute.blockchain].USD) {
|
|
19066
19068
|
var _maxAmount = parseFloat(new decimal_js.Decimal(readableMaxAmount).mul(conversionRate).toString());
|
|
19067
19069
|
|
|
19068
|
-
setMaxAmount(_maxAmount > 10 ? Math.round(_maxAmount) : _maxAmount);
|
|
19070
|
+
setMaxAmount(_maxAmount > 10 ? Math.round(_maxAmount - 1) : _maxAmount - 1);
|
|
19069
19071
|
} else {
|
|
19070
19072
|
web3Exchanges.route({
|
|
19071
19073
|
blockchain: maxRoute.blockchain,
|
|
@@ -20357,7 +20359,9 @@
|
|
|
20357
20359
|
className: "PaddingLeftM PaddingRightM"
|
|
20358
20360
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
20359
20361
|
className: "PaddingTopS TextCenter PaddingBottomL"
|
|
20360
|
-
}, /*#__PURE__*/React__default["default"].createElement("div",
|
|
20362
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
20363
|
+
className: "PaddingBottomM"
|
|
20364
|
+
}, /*#__PURE__*/React__default["default"].createElement("input", {
|
|
20361
20365
|
max: parseFloat(maxAmount),
|
|
20362
20366
|
min: min,
|
|
20363
20367
|
step: step,
|
|
@@ -20377,12 +20381,12 @@
|
|
|
20377
20381
|
}
|
|
20378
20382
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
20379
20383
|
className: "FontSizeS"
|
|
20380
|
-
}, format(toValidStep(maxAmount)), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
20384
|
+
}, format(toValidStep(maxAmount)), /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
20381
20385
|
className: "TextButton",
|
|
20382
20386
|
onClick: function onClick() {
|
|
20383
20387
|
changeAmount(toValidValue(maxAmount));
|
|
20384
20388
|
}
|
|
20385
|
-
}, "(Max)")))))),
|
|
20389
|
+
}, "(Max)"))))))),
|
|
20386
20390
|
footer: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
20387
20391
|
className: "PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"
|
|
20388
20392
|
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
@@ -20532,12 +20536,15 @@
|
|
|
20532
20536
|
});
|
|
20533
20537
|
|
|
20534
20538
|
var DonationOverviewSkeleton = (function (props) {
|
|
20539
|
+
var _useContext = React.useContext(ConfigurationContext),
|
|
20540
|
+
title = _useContext.title;
|
|
20541
|
+
|
|
20535
20542
|
return /*#__PURE__*/React__default["default"].createElement(Dialog$1, {
|
|
20536
20543
|
header: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
20537
20544
|
className: "PaddingTopS PaddingLeftM PaddingRightM TextLeft"
|
|
20538
20545
|
}, /*#__PURE__*/React__default["default"].createElement("h1", {
|
|
20539
20546
|
className: "LineHeightL FontSizeL"
|
|
20540
|
-
},
|
|
20547
|
+
}, title || 'Donation')),
|
|
20541
20548
|
body: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
20542
20549
|
className: "PaddingLeftM PaddingRightM PaddingBottomXS"
|
|
20543
20550
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -20891,7 +20898,8 @@
|
|
|
20891
20898
|
|
|
20892
20899
|
var DonationOverviewDialog = (function (props) {
|
|
20893
20900
|
var _useContext = React.useContext(ConfigurationContext),
|
|
20894
|
-
currencyCode = _useContext.currencyCode
|
|
20901
|
+
currencyCode = _useContext.currencyCode,
|
|
20902
|
+
title = _useContext.title;
|
|
20895
20903
|
|
|
20896
20904
|
var _useContext2 = React.useContext(ChangableAmountContext),
|
|
20897
20905
|
amount = _useContext2.amount;
|
|
@@ -20913,7 +20921,7 @@
|
|
|
20913
20921
|
className: "PaddingTopS PaddingLeftM PaddingRightM TextLeft"
|
|
20914
20922
|
}, /*#__PURE__*/React__default["default"].createElement("h1", {
|
|
20915
20923
|
className: "LineHeightL FontSizeL"
|
|
20916
|
-
},
|
|
20924
|
+
}, title || 'Donation')),
|
|
20917
20925
|
body: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
20918
20926
|
className: "PaddingLeftM PaddingRightM PaddingBottomXS"
|
|
20919
20927
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -21678,12 +21686,12 @@
|
|
|
21678
21686
|
|
|
21679
21687
|
var Donation = /*#__PURE__*/function () {
|
|
21680
21688
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(_ref3) {
|
|
21681
|
-
var amount, accept, event, sent, confirmed, validated, failed, error, critical, style, blacklist, providers, currency, connected, closed, track, fee, closable, integration, link, container, document, unmount;
|
|
21689
|
+
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;
|
|
21682
21690
|
return regenerator.wrap(function _callee2$(_context2) {
|
|
21683
21691
|
while (1) {
|
|
21684
21692
|
switch (_context2.prev = _context2.next) {
|
|
21685
21693
|
case 0:
|
|
21686
|
-
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;
|
|
21694
|
+
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;
|
|
21687
21695
|
requireReactVersion();
|
|
21688
21696
|
_context2.prev = 2;
|
|
21689
21697
|
_context2.next = 5;
|
|
@@ -21719,7 +21727,8 @@
|
|
|
21719
21727
|
blacklist: blacklist,
|
|
21720
21728
|
providers: providers,
|
|
21721
21729
|
integration: integration,
|
|
21722
|
-
link: link
|
|
21730
|
+
link: link,
|
|
21731
|
+
title: title
|
|
21723
21732
|
}
|
|
21724
21733
|
}, /*#__PURE__*/React__default["default"].createElement(UpdatableProvider, null, /*#__PURE__*/React__default["default"].createElement(ClosableProvider, {
|
|
21725
21734
|
unmount: unmount,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depay/widgets",
|
|
3
3
|
"moduleName": "DePayWidgets",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.14.2",
|
|
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",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@depay/web3-exchanges": "^9.2.0",
|
|
47
47
|
"@depay/web3-payments": "^10.6.0",
|
|
48
48
|
"@depay/web3-tokens": "^8.2.0",
|
|
49
|
-
"@depay/web3-wallets": "^11.1.
|
|
49
|
+
"@depay/web3-wallets": "^11.1.1",
|
|
50
50
|
"decimal.js": "^10.3.1"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|