@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/esm/index.js
CHANGED
|
@@ -533,7 +533,7 @@ var Dialog$1 = (function (props) {
|
|
|
533
533
|
close = _useContext2.close,
|
|
534
534
|
closable = _useContext2.closable;
|
|
535
535
|
return /*#__PURE__*/React.createElement("div", {
|
|
536
|
-
className: "Dialog"
|
|
536
|
+
className: ["Dialog", props.className].join(' ')
|
|
537
537
|
}, /*#__PURE__*/React.createElement("div", {
|
|
538
538
|
className: ["DialogHeader", props.stacked ? 'TextCenter' : ''].join(' ')
|
|
539
539
|
}, props.stacked && /*#__PURE__*/React.createElement("div", {
|
|
@@ -546,7 +546,7 @@ var Dialog$1 = (function (props) {
|
|
|
546
546
|
title: "Go back"
|
|
547
547
|
}, /*#__PURE__*/React.createElement(ChevronLeft, null))), props.header, /*#__PURE__*/React.createElement("div", {
|
|
548
548
|
className: "DialogHeaderActionRight PaddingTopS PaddingLeftS PaddingRightS"
|
|
549
|
-
}, closable && /*#__PURE__*/React.createElement("button", {
|
|
549
|
+
}, closable && props.closable !== false && /*#__PURE__*/React.createElement("button", {
|
|
550
550
|
onClick: close,
|
|
551
551
|
className: "ButtonCircular",
|
|
552
552
|
title: "Close dialog"
|
|
@@ -1226,7 +1226,7 @@ var CardStyle = (function (style) {
|
|
|
1226
1226
|
});
|
|
1227
1227
|
|
|
1228
1228
|
var DialogStyle = (function (style) {
|
|
1229
|
-
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 ";
|
|
1229
|
+
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 ";
|
|
1230
1230
|
});
|
|
1231
1231
|
|
|
1232
1232
|
var FontStyle = (function (style) {
|
|
@@ -21300,6 +21300,111 @@ var Donation = /*#__PURE__*/function () {
|
|
|
21300
21300
|
};
|
|
21301
21301
|
}();
|
|
21302
21302
|
|
|
21303
|
+
var LoadingDialog = (function (props) {
|
|
21304
|
+
var _useContext = useContext(ConfigurationContext),
|
|
21305
|
+
text = _useContext.text;
|
|
21306
|
+
return /*#__PURE__*/React.createElement(Dialog$1, {
|
|
21307
|
+
closable: false,
|
|
21308
|
+
header: /*#__PURE__*/React.createElement("div", {
|
|
21309
|
+
className: "PaddingTopS PaddingLeftM PaddingRightM TextLeft"
|
|
21310
|
+
}, /*#__PURE__*/React.createElement("h1", {
|
|
21311
|
+
className: "LineHeightL FontSizeL"
|
|
21312
|
+
}, "Payment")),
|
|
21313
|
+
body: /*#__PURE__*/React.createElement("div", {
|
|
21314
|
+
className: "PaddingLeftM PaddingRightM PaddingBottomXS"
|
|
21315
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
21316
|
+
className: "Card Skeleton"
|
|
21317
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
21318
|
+
className: "SkeletonBackground"
|
|
21319
|
+
}))),
|
|
21320
|
+
footer: /*#__PURE__*/React.createElement("div", {
|
|
21321
|
+
className: "PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomS"
|
|
21322
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
21323
|
+
className: "SkeletonWrapper"
|
|
21324
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
21325
|
+
className: "ButtonPrimary Skeleton"
|
|
21326
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
21327
|
+
className: "SkeletonBackground"
|
|
21328
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
21329
|
+
className: "TextCenter Opacity05 PaddingTopS"
|
|
21330
|
+
}, /*#__PURE__*/React.createElement("strong", null, text)))
|
|
21331
|
+
});
|
|
21332
|
+
});
|
|
21333
|
+
|
|
21334
|
+
var LoadingStack = (function (props) {
|
|
21335
|
+
var _useContext = useContext(ClosableContext),
|
|
21336
|
+
open = _useContext.open,
|
|
21337
|
+
close = _useContext.close;
|
|
21338
|
+
var _useContext2 = useContext(NavigateContext),
|
|
21339
|
+
setNavigator = _useContext2.setNavigator;
|
|
21340
|
+
return /*#__PURE__*/React.createElement(ReactDialogStack, {
|
|
21341
|
+
setNavigator: setNavigator,
|
|
21342
|
+
open: open,
|
|
21343
|
+
close: close,
|
|
21344
|
+
start: "Loading",
|
|
21345
|
+
container: props.container,
|
|
21346
|
+
document: props.document,
|
|
21347
|
+
dialogs: {
|
|
21348
|
+
Loading: /*#__PURE__*/React.createElement(LoadingDialog, null)
|
|
21349
|
+
}
|
|
21350
|
+
});
|
|
21351
|
+
});
|
|
21352
|
+
|
|
21353
|
+
var Loading = /*#__PURE__*/function () {
|
|
21354
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(_ref) {
|
|
21355
|
+
var text, style, error, critical, container, document, unmount;
|
|
21356
|
+
return regenerator.wrap(function _callee$(_context) {
|
|
21357
|
+
while (1) switch (_context.prev = _context.next) {
|
|
21358
|
+
case 0:
|
|
21359
|
+
text = _ref.text, style = _ref.style, error = _ref.error, critical = _ref.critical, container = _ref.container, _ref.before, document = _ref.document;
|
|
21360
|
+
requireReactVersion();
|
|
21361
|
+
_context.prev = 2;
|
|
21362
|
+
unmount = mount({
|
|
21363
|
+
style: style,
|
|
21364
|
+
container: container,
|
|
21365
|
+
document: ensureDocument(document),
|
|
21366
|
+
closed: closed
|
|
21367
|
+
}, function (unmount) {
|
|
21368
|
+
return function (container) {
|
|
21369
|
+
return /*#__PURE__*/React.createElement(ErrorProvider, {
|
|
21370
|
+
errorCallback: error,
|
|
21371
|
+
container: container,
|
|
21372
|
+
unmount: unmount
|
|
21373
|
+
}, /*#__PURE__*/React.createElement(ConfigurationProvider, {
|
|
21374
|
+
configuration: {
|
|
21375
|
+
text: text
|
|
21376
|
+
}
|
|
21377
|
+
}, /*#__PURE__*/React.createElement(UpdatableProvider, null, /*#__PURE__*/React.createElement(ClosableProvider, {
|
|
21378
|
+
unmount: unmount,
|
|
21379
|
+
closable: false
|
|
21380
|
+
}, /*#__PURE__*/React.createElement(NavigateProvider, null, /*#__PURE__*/React.createElement(LoadingStack, {
|
|
21381
|
+
document: document,
|
|
21382
|
+
container: container
|
|
21383
|
+
}), /*#__PURE__*/React.createElement(PoweredBy, null))))));
|
|
21384
|
+
};
|
|
21385
|
+
});
|
|
21386
|
+
window._depayUnmountLoading = unmount;
|
|
21387
|
+
return _context.abrupt("return", {
|
|
21388
|
+
unmount: unmount
|
|
21389
|
+
});
|
|
21390
|
+
case 8:
|
|
21391
|
+
_context.prev = 8;
|
|
21392
|
+
_context.t0 = _context["catch"](2);
|
|
21393
|
+
console.log('critical error', _context.t0);
|
|
21394
|
+
if (critical != undefined) {
|
|
21395
|
+
critical(_context.t0);
|
|
21396
|
+
}
|
|
21397
|
+
case 12:
|
|
21398
|
+
case "end":
|
|
21399
|
+
return _context.stop();
|
|
21400
|
+
}
|
|
21401
|
+
}, _callee, null, [[2, 8]]);
|
|
21402
|
+
}));
|
|
21403
|
+
return function Loading(_x) {
|
|
21404
|
+
return _ref2.apply(this, arguments);
|
|
21405
|
+
};
|
|
21406
|
+
}();
|
|
21407
|
+
|
|
21303
21408
|
var SignLoginDialog = (function (props) {
|
|
21304
21409
|
var _useContext = useContext(ErrorContext),
|
|
21305
21410
|
setError = _useContext.setError;
|
|
@@ -21517,7 +21622,7 @@ var PaymentOverviewSkeleton = (function (props) {
|
|
|
21517
21622
|
className: "SkeletonBackground"
|
|
21518
21623
|
}))),
|
|
21519
21624
|
footer: /*#__PURE__*/React.createElement("div", {
|
|
21520
|
-
className: "PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM
|
|
21625
|
+
className: ["PaddingTopXS PaddingRightM PaddingLeftM", selectedRoute == undefined && slowRouting ? 'PaddingBottomS' : 'PaddingBottomM'].join(' ')
|
|
21521
21626
|
}, /*#__PURE__*/React.createElement("div", {
|
|
21522
21627
|
className: "SkeletonWrapper"
|
|
21523
21628
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -21788,6 +21893,9 @@ var Payment = /*#__PURE__*/function () {
|
|
|
21788
21893
|
recover: recover
|
|
21789
21894
|
});
|
|
21790
21895
|
case 5:
|
|
21896
|
+
if (typeof window._depayUnmountLoading == 'function') {
|
|
21897
|
+
window._depayUnmountLoading();
|
|
21898
|
+
}
|
|
21791
21899
|
unmount = mount({
|
|
21792
21900
|
style: style,
|
|
21793
21901
|
container: container,
|
|
@@ -21850,18 +21958,18 @@ var Payment = /*#__PURE__*/function () {
|
|
|
21850
21958
|
return _context2.abrupt("return", {
|
|
21851
21959
|
unmount: unmount
|
|
21852
21960
|
});
|
|
21853
|
-
case
|
|
21854
|
-
_context2.prev =
|
|
21961
|
+
case 10:
|
|
21962
|
+
_context2.prev = 10;
|
|
21855
21963
|
_context2.t0 = _context2["catch"](2);
|
|
21856
21964
|
console.log('critical error', _context2.t0);
|
|
21857
21965
|
if (critical != undefined) {
|
|
21858
21966
|
critical(_context2.t0);
|
|
21859
21967
|
}
|
|
21860
|
-
case
|
|
21968
|
+
case 14:
|
|
21861
21969
|
case "end":
|
|
21862
21970
|
return _context2.stop();
|
|
21863
21971
|
}
|
|
21864
|
-
}, _callee2, null, [[2,
|
|
21972
|
+
}, _callee2, null, [[2, 10]]);
|
|
21865
21973
|
}));
|
|
21866
21974
|
return function Payment(_x2) {
|
|
21867
21975
|
return _ref4.apply(this, arguments);
|
|
@@ -23674,7 +23782,8 @@ var DePayWidgets = {
|
|
|
23674
23782
|
Login: Login,
|
|
23675
23783
|
Payment: Payment,
|
|
23676
23784
|
Sale: Sale,
|
|
23677
|
-
Select: Select
|
|
23785
|
+
Select: Select,
|
|
23786
|
+
Loading: Loading
|
|
23678
23787
|
};
|
|
23679
23788
|
|
|
23680
23789
|
export { DePayWidgets as default };
|