@longline/aqua-ui 1.0.142 → 1.0.144
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/inputs/DateInput/Body.js
CHANGED
|
@@ -52,7 +52,7 @@ var BodyBase = React.forwardRef(function (props, ref) {
|
|
|
52
52
|
var handleYear = function (year) {
|
|
53
53
|
date.setFullYear(year);
|
|
54
54
|
};
|
|
55
|
-
return (React.createElement("div", __assign({ style: props.styles.popper }, props.attributes.popper, { className: props.className, tabIndex: -1, ref: ref }),
|
|
55
|
+
return (React.createElement("div", __assign({ style: props.styles.popper }, props.attributes.popper, { className: props.className, tabIndex: -1, ref: ref, onClick: function (e) { return e.stopPropagation(); } }),
|
|
56
56
|
React.createElement(Navbar, { date: date, onPrevYear: handlePrevYear, onNextYear: handleNextYear, onPrevMonth: handlePrevMonth, onNextMonth: handleNextMonth, onMonth: handleMonth, onYear: handleYear }),
|
|
57
57
|
React.createElement(Calendar, { date: date, selectedDate: props.value, nofuture: props.nofuture, onClick: handleDayClick })));
|
|
58
58
|
});
|
package/package.json
CHANGED
|
@@ -82,7 +82,7 @@ declare const Dialog: {
|
|
|
82
82
|
* with an Axios response object, and reports it to the user.
|
|
83
83
|
*/
|
|
84
84
|
Xhr: {
|
|
85
|
-
({ open, ...props }: import("./XhrDialog").IXhrDialogProps): React.JSX.Element;
|
|
85
|
+
({ open, title, ...props }: import("./XhrDialog").IXhrDialogProps): React.JSX.Element;
|
|
86
86
|
displayName: string;
|
|
87
87
|
};
|
|
88
88
|
};
|
|
@@ -20,6 +20,11 @@ interface IXhrDialogProps {
|
|
|
20
20
|
* for setting `open` to false in order to close the Dialog.
|
|
21
21
|
*/
|
|
22
22
|
onRetry?: () => void;
|
|
23
|
+
/**
|
|
24
|
+
* Title for dialog.
|
|
25
|
+
* @default "Network error"
|
|
26
|
+
*/
|
|
27
|
+
title?: string;
|
|
23
28
|
}
|
|
24
29
|
/**
|
|
25
30
|
* A `Dialog.Xhr` is a preset dialog that takes an `error` object from an
|
|
@@ -28,7 +33,7 @@ interface IXhrDialogProps {
|
|
|
28
33
|
* a "Retry" button.
|
|
29
34
|
*/
|
|
30
35
|
declare const XhrDialog: {
|
|
31
|
-
({ open, ...props }: IXhrDialogProps): React.JSX.Element;
|
|
36
|
+
({ open, title, ...props }: IXhrDialogProps): React.JSX.Element;
|
|
32
37
|
displayName: string;
|
|
33
38
|
};
|
|
34
39
|
export { XhrDialog, IXhrDialogProps };
|
|
@@ -124,7 +124,7 @@ var HttpStatusCodes = {
|
|
|
124
124
|
},
|
|
125
125
|
404: {
|
|
126
126
|
header: "Resource not found",
|
|
127
|
-
desc: "The
|
|
127
|
+
desc: "The requested resource could not be found on the server."
|
|
128
128
|
},
|
|
129
129
|
405: {
|
|
130
130
|
header: "Method not allowed",
|
|
@@ -274,7 +274,7 @@ var HttpStatusCodes = {
|
|
|
274
274
|
* a "Retry" button.
|
|
275
275
|
*/
|
|
276
276
|
var XhrDialog = function (_a) {
|
|
277
|
-
var _b = _a.open, open = _b === void 0 ? false : _b, props = __rest(_a, ["open"]);
|
|
277
|
+
var _b = _a.open, open = _b === void 0 ? false : _b, _c = _a.title, title = _c === void 0 ? "Network error" : _c, props = __rest(_a, ["open", "title"]);
|
|
278
278
|
var getStatusHeader = function () {
|
|
279
279
|
if (props.error.response) {
|
|
280
280
|
var status_1 = HttpStatusCodes[props.error.response.status];
|
|
@@ -300,8 +300,9 @@ var XhrDialog = function (_a) {
|
|
|
300
300
|
}
|
|
301
301
|
};
|
|
302
302
|
return (React.createElement(Dialog, { open: open, onClose: props.onClose },
|
|
303
|
-
React.createElement(Dialog.Header, null,
|
|
303
|
+
React.createElement(Dialog.Header, null, title),
|
|
304
304
|
React.createElement(Dialog.Content, null,
|
|
305
|
+
props.error && React.createElement("p", { style: { fontWeight: 700 } }, getStatusHeader()),
|
|
305
306
|
props.error && React.createElement("p", null, getStatusText()),
|
|
306
307
|
props.error && props.error.response && props.error.response.status === 422 && props.error.response.data &&
|
|
307
308
|
React.createElement(React.Fragment, null,
|