@nulogy/components 10.2.7 → 10.2.9
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/main.js +16 -10
- package/dist/main.module.js +16 -10
- package/dist/src/Alert/Alert.story.d.ts +1 -4
- package/dist/src/Table/Table.d.ts +3 -3
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -21218,7 +21218,15 @@
|
|
|
21218
21218
|
showArrow = _ref.showArrow,
|
|
21219
21219
|
openAriaLabel = _ref.openAriaLabel,
|
|
21220
21220
|
closeAriaLabel = _ref.closeAriaLabel;
|
|
21221
|
-
|
|
21221
|
+
// We're going to manage the ID of the timeout in a ref so that we can examine
|
|
21222
|
+
// it without causing a re-render. Note that "0" will denote "no jobs running",
|
|
21223
|
+
// whereas positive values are the ID of the running job.
|
|
21224
|
+
var timeoutId = React.useRef(0);
|
|
21225
|
+
|
|
21226
|
+
var resetTimeoutId = function resetTimeoutId() {
|
|
21227
|
+
clearTimeout(timeoutId.current);
|
|
21228
|
+
timeoutId.current = 0;
|
|
21229
|
+
};
|
|
21222
21230
|
|
|
21223
21231
|
var _useState = React.useState(defaultOpen),
|
|
21224
21232
|
isOpen = _useState[0],
|
|
@@ -21230,14 +21238,14 @@
|
|
|
21230
21238
|
}
|
|
21231
21239
|
|
|
21232
21240
|
if (!skipDelay) {
|
|
21233
|
-
|
|
21241
|
+
timeoutId.current = setTimeout(fnc, delay);
|
|
21234
21242
|
} else {
|
|
21235
21243
|
fnc();
|
|
21236
21244
|
}
|
|
21237
21245
|
};
|
|
21238
21246
|
|
|
21239
21247
|
var setPopUpState = function setPopUpState(nextIsOpenState, skipDelay) {
|
|
21240
|
-
|
|
21248
|
+
resetTimeoutId();
|
|
21241
21249
|
conditionallyApplyDelay(function () {
|
|
21242
21250
|
return setIsOpen(nextIsOpenState);
|
|
21243
21251
|
}, nextIsOpenState ? showDelay : hideDelay, skipDelay);
|
|
@@ -21248,19 +21256,17 @@
|
|
|
21248
21256
|
};
|
|
21249
21257
|
|
|
21250
21258
|
React.useEffect(function () {
|
|
21251
|
-
|
|
21252
|
-
|
|
21253
|
-
|
|
21254
|
-
closePopUp();
|
|
21255
|
-
break;
|
|
21259
|
+
function handleKeyDown(event) {
|
|
21260
|
+
if (event.code === "Escape") {
|
|
21261
|
+
closePopUp();
|
|
21256
21262
|
}
|
|
21257
|
-
}
|
|
21263
|
+
}
|
|
21258
21264
|
|
|
21259
21265
|
document.addEventListener("keydown", handleKeyDown);
|
|
21260
21266
|
|
|
21261
21267
|
var cleanup = function cleanup() {
|
|
21262
21268
|
document.removeEventListener("keydown", handleKeyDown);
|
|
21263
|
-
|
|
21269
|
+
resetTimeoutId();
|
|
21264
21270
|
};
|
|
21265
21271
|
|
|
21266
21272
|
return cleanup;
|
package/dist/main.module.js
CHANGED
|
@@ -21201,7 +21201,15 @@ var Popper$2 = /*#__PURE__*/React__default.forwardRef(function (_ref, popperRef)
|
|
|
21201
21201
|
showArrow = _ref.showArrow,
|
|
21202
21202
|
openAriaLabel = _ref.openAriaLabel,
|
|
21203
21203
|
closeAriaLabel = _ref.closeAriaLabel;
|
|
21204
|
-
|
|
21204
|
+
// We're going to manage the ID of the timeout in a ref so that we can examine
|
|
21205
|
+
// it without causing a re-render. Note that "0" will denote "no jobs running",
|
|
21206
|
+
// whereas positive values are the ID of the running job.
|
|
21207
|
+
var timeoutId = useRef(0);
|
|
21208
|
+
|
|
21209
|
+
var resetTimeoutId = function resetTimeoutId() {
|
|
21210
|
+
clearTimeout(timeoutId.current);
|
|
21211
|
+
timeoutId.current = 0;
|
|
21212
|
+
};
|
|
21205
21213
|
|
|
21206
21214
|
var _useState = useState(defaultOpen),
|
|
21207
21215
|
isOpen = _useState[0],
|
|
@@ -21213,14 +21221,14 @@ var Popper$2 = /*#__PURE__*/React__default.forwardRef(function (_ref, popperRef)
|
|
|
21213
21221
|
}
|
|
21214
21222
|
|
|
21215
21223
|
if (!skipDelay) {
|
|
21216
|
-
|
|
21224
|
+
timeoutId.current = setTimeout(fnc, delay);
|
|
21217
21225
|
} else {
|
|
21218
21226
|
fnc();
|
|
21219
21227
|
}
|
|
21220
21228
|
};
|
|
21221
21229
|
|
|
21222
21230
|
var setPopUpState = function setPopUpState(nextIsOpenState, skipDelay) {
|
|
21223
|
-
|
|
21231
|
+
resetTimeoutId();
|
|
21224
21232
|
conditionallyApplyDelay(function () {
|
|
21225
21233
|
return setIsOpen(nextIsOpenState);
|
|
21226
21234
|
}, nextIsOpenState ? showDelay : hideDelay, skipDelay);
|
|
@@ -21231,19 +21239,17 @@ var Popper$2 = /*#__PURE__*/React__default.forwardRef(function (_ref, popperRef)
|
|
|
21231
21239
|
};
|
|
21232
21240
|
|
|
21233
21241
|
useEffect(function () {
|
|
21234
|
-
|
|
21235
|
-
|
|
21236
|
-
|
|
21237
|
-
closePopUp();
|
|
21238
|
-
break;
|
|
21242
|
+
function handleKeyDown(event) {
|
|
21243
|
+
if (event.code === "Escape") {
|
|
21244
|
+
closePopUp();
|
|
21239
21245
|
}
|
|
21240
|
-
}
|
|
21246
|
+
}
|
|
21241
21247
|
|
|
21242
21248
|
document.addEventListener("keydown", handleKeyDown);
|
|
21243
21249
|
|
|
21244
21250
|
var cleanup = function cleanup() {
|
|
21245
21251
|
document.removeEventListener("keydown", handleKeyDown);
|
|
21246
|
-
|
|
21252
|
+
resetTimeoutId();
|
|
21247
21253
|
};
|
|
21248
21254
|
|
|
21249
21255
|
return cleanup;
|
|
@@ -3,10 +3,7 @@ declare const _default: {
|
|
|
3
3
|
title: string;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const Informative: () => React.JSX.Element;
|
|
8
|
-
export declare const Success: () => React.JSX.Element;
|
|
9
|
-
export declare const Warning: () => React.JSX.Element;
|
|
6
|
+
export declare const AlertTypes: () => React.JSX.Element;
|
|
10
7
|
export declare const WithACloseButton: {
|
|
11
8
|
(): React.JSX.Element;
|
|
12
9
|
story: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { StatefulTableProps } from "./StatefulTable";
|
|
3
3
|
import { ColumnType, RowType, CellInfoType } from "./Table.types";
|
|
4
|
-
export type TableProps<ColumnMetadata> = StatefulTableProps<ColumnMetadata>;
|
|
5
|
-
export type TableColumnType<ColumnMetadata> = ColumnType<ColumnMetadata>;
|
|
4
|
+
export type TableProps<ColumnMetadata = unknown> = StatefulTableProps<ColumnMetadata>;
|
|
5
|
+
export type TableColumnType<ColumnMetadata = unknown> = ColumnType<ColumnMetadata>;
|
|
6
6
|
export type TableRowType = RowType;
|
|
7
|
-
export type TableCellInfoType<ColumnMetadata> = CellInfoType<ColumnMetadata>;
|
|
7
|
+
export type TableCellInfoType<ColumnMetadata = unknown> = CellInfoType<ColumnMetadata>;
|
|
8
8
|
declare function Table<ColumnMetadata>({ hasSelectableRows, rowsPerPage, hasExpandableRows, selectedRows, onRowSelectionChange, onRowExpansionChange, onPageChange, selectAllAriaLabel, deselectAllAriaLabel, paginationCss, paginationProps, ...props }: TableProps<ColumnMetadata>): React.JSX.Element;
|
|
9
9
|
declare namespace Table {
|
|
10
10
|
var SortingHeader: {
|