dce-reactkit 3.5.6 → 3.5.7
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/cjs/index.js +14 -12
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/{ScrollLockToBottomContainer.d.ts → AutoscrollToBottomContainer.d.ts} +5 -3
- package/dist/cjs/types/index.d.ts +2 -2
- package/dist/esm/index.js +14 -12
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/{ScrollLockToBottomContainer.d.ts → AutoscrollToBottomContainer.d.ts} +5 -3
- package/dist/esm/types/index.d.ts +2 -2
- package/dist/index.d.ts +5 -3
- package/package.json +1 -1
- package/src/components/{ScrollLockToBottomContainer.tsx → AutoscrollToBottomContainer.tsx} +14 -12
- package/src/index.ts +2 -2
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Container that automatically scrolls when new items are added,
|
|
3
3
|
* lets the user scroll up to see old items, but resumes
|
|
4
|
-
* autoscroll when the user scrolls back to the bottom
|
|
4
|
+
* autoscroll when the user scrolls back to the bottom.
|
|
5
|
+
* Note: takes up full height of parent, so parent should
|
|
6
|
+
* have a determined height for the scroll to work.
|
|
5
7
|
* @author Gabe Abrams
|
|
6
8
|
*/
|
|
7
9
|
import React from 'react';
|
|
@@ -15,5 +17,5 @@ type AutoScrollItem = {
|
|
|
15
17
|
id: string | number;
|
|
16
18
|
item: React.ReactNode;
|
|
17
19
|
};
|
|
18
|
-
declare const
|
|
19
|
-
export default
|
|
20
|
+
declare const AutoscrollToBottomContainer: React.FC<Props>;
|
|
21
|
+
export default AutoscrollToBottomContainer;
|
|
@@ -19,7 +19,7 @@ import CSVDownloadButton from './components/CSVDownloadButton';
|
|
|
19
19
|
import DBEntryManagerPanel from './components/DBEntryManagerPanel';
|
|
20
20
|
import Tooltip from './components/Tooltip';
|
|
21
21
|
import ToggleSwitch from './components/ToggleSwitch';
|
|
22
|
-
import
|
|
22
|
+
import AutoscrollToBottomContainer from './components/AutoscrollToBottomContainer';
|
|
23
23
|
import ErrorWithCode from './errors/ErrorWithCode';
|
|
24
24
|
import MINUTE_IN_MS from './constants/MINUTE_IN_MS';
|
|
25
25
|
import HOUR_IN_MS from './constants/HOUR_IN_MS';
|
|
@@ -83,4 +83,4 @@ import PickableItem from './components/ItemPicker/types/PickableItem';
|
|
|
83
83
|
import DBEntry from './components/DBEntryManagerPanel/types/DBEntry';
|
|
84
84
|
import DBEntryField from './components/DBEntryManagerPanel/types/DBEntryField';
|
|
85
85
|
import DBEntryFieldType from './components/DBEntryManagerPanel/types/DBEntryFieldType';
|
|
86
|
-
export { AppWrapper, LoadingSpinner, ErrorBox, Modal, TabBox, RadioButton, CheckboxButton, ButtonInputGroup, SimpleDateChooser, Drawer, PopSuccessMark, PopFailureMark, PopPendingMark, CopiableBox, ItemPicker, LogReviewer, IntelliTable, CSVDownloadButton, DBEntryManagerPanel, Tooltip, ToggleSwitch,
|
|
86
|
+
export { AppWrapper, LoadingSpinner, ErrorBox, Modal, TabBox, RadioButton, CheckboxButton, ButtonInputGroup, SimpleDateChooser, Drawer, PopSuccessMark, PopFailureMark, PopPendingMark, CopiableBox, ItemPicker, LogReviewer, IntelliTable, CSVDownloadButton, DBEntryManagerPanel, Tooltip, ToggleSwitch, AutoscrollToBottomContainer, alert, confirm, showFatalError, ErrorWithCode, MINUTE_IN_MS, HOUR_IN_MS, DAY_IN_MS, DynamicWord, abbreviate, avg, ceilToNumDecimals, floorToNumDecimals, forceNumIntoBounds, padDecimalZeros, padZerosLeft, roundToNumDecimals, sum, waitMs, getOrdinal, getTimeInfoInET, stubServerEndpoint, startMinWait, getHumanReadableDate, getPartOfDay, stringsToHumanReadableList, onlyKeepLetters, parallelLimit, getMonthName, genCSV, canReviewLogs, isMobileOrTablet, extractProp, compareArraysByProp, genCommaList, validateEmail, validatePhoneNumber, validateString, getLocalTimeInfo, idify, initClient, visitServerEndpoint, logClientEvent, addFatalErrorHandler, initServer, genRouteHandler, handleError, handleSuccess, initLogCollection, addDBEditorEndpoints, ModalButtonType, ModalSize, ModalType, ReactKitErrorCode, Variant, DayOfWeek, Log, LogType, LogSource, LogAction, LogBuiltInMetadata, LogMetadataType, IntelliTableColumn, PickableItem, DBEntry, DBEntryField, DBEntryFieldType, ParamType, };
|
package/dist/esm/index.js
CHANGED
|
@@ -40707,20 +40707,22 @@ const idify = (str) => {
|
|
|
40707
40707
|
/**
|
|
40708
40708
|
* Container that automatically scrolls when new items are added,
|
|
40709
40709
|
* lets the user scroll up to see old items, but resumes
|
|
40710
|
-
* autoscroll when the user scrolls back to the bottom
|
|
40710
|
+
* autoscroll when the user scrolls back to the bottom.
|
|
40711
|
+
* Note: takes up full height of parent, so parent should
|
|
40712
|
+
* have a determined height for the scroll to work.
|
|
40711
40713
|
* @author Gabe Abrams
|
|
40712
40714
|
*/
|
|
40713
40715
|
/*------------------------------------------------------------------------*/
|
|
40714
40716
|
/* -------------------------------- Style ------------------------------- */
|
|
40715
40717
|
/*------------------------------------------------------------------------*/
|
|
40716
40718
|
const style = `
|
|
40717
|
-
.
|
|
40719
|
+
.AutoscrollToBottomContainer-outer-container {
|
|
40718
40720
|
/* Take up all space */
|
|
40719
40721
|
height: 100%;
|
|
40720
40722
|
position: relative;
|
|
40721
40723
|
}
|
|
40722
40724
|
|
|
40723
|
-
.
|
|
40725
|
+
.AutoscrollToBottomContainer-scrollable-container {
|
|
40724
40726
|
/* Take up max 100% height, don't take it up if not needed */
|
|
40725
40727
|
/* (so column-reverse layout doesn't start at the bottom) */
|
|
40726
40728
|
max-height: 100%;
|
|
@@ -40735,7 +40737,7 @@ const style = `
|
|
|
40735
40737
|
flex-direction: column-reverse;
|
|
40736
40738
|
}
|
|
40737
40739
|
|
|
40738
|
-
.
|
|
40740
|
+
.AutoscrollToBottomContainer-jump-to-bottom-container {
|
|
40739
40741
|
/* Don't take any space in parent */
|
|
40740
40742
|
height: 0;
|
|
40741
40743
|
overflow: visible;
|
|
@@ -40752,7 +40754,7 @@ const style = `
|
|
|
40752
40754
|
text-align: center;
|
|
40753
40755
|
}
|
|
40754
40756
|
|
|
40755
|
-
.
|
|
40757
|
+
.AutoscrollToBottomContainer-item-container {
|
|
40756
40758
|
/* Normal Height */
|
|
40757
40759
|
position: relative;
|
|
40758
40760
|
z-index: 1;
|
|
@@ -40824,7 +40826,7 @@ const reducer = (state, action) => {
|
|
|
40824
40826
|
/*------------------------------------------------------------------------*/
|
|
40825
40827
|
/* ------------------------------ Component ----------------------------- */
|
|
40826
40828
|
/*------------------------------------------------------------------------*/
|
|
40827
|
-
const
|
|
40829
|
+
const AutoscrollToBottomContainer = (props) => {
|
|
40828
40830
|
/*------------------------------------------------------------------------*/
|
|
40829
40831
|
/* -------------------------------- Setup ------------------------------- */
|
|
40830
40832
|
/*------------------------------------------------------------------------*/
|
|
@@ -40960,22 +40962,22 @@ const ScrollLockToBottom = (props) => {
|
|
|
40960
40962
|
// Jump to Bottom button
|
|
40961
40963
|
let jumpToBottomButton;
|
|
40962
40964
|
if (jumpToBottomButtonVisible) {
|
|
40963
|
-
jumpToBottomButton = (React__default.createElement("div", { className: `
|
|
40964
|
-
React__default.createElement("button", { type: "button", className: `
|
|
40965
|
+
jumpToBottomButton = (React__default.createElement("div", { className: `AutoscrollToBottomContainer-jump-to-bottom-container AutoscrollToBottomContainer-for-${idify(itemsName !== null && itemsName !== void 0 ? itemsName : 'items')}` },
|
|
40966
|
+
React__default.createElement("button", { type: "button", className: `AutoscrollToBottomContainer-jump-to-bottom-button AutoscrollToBottomContainer-jump-to-bottom-button-for-${idify(itemsName !== null && itemsName !== void 0 ? itemsName : 'items')} btn btn-sm btn-${jumpToBottomButtonVariant} pt-0 pb-0`, onClick: scrollToBottom, "aria-label": "scroll back to bottom and show new content" },
|
|
40965
40967
|
"New",
|
|
40966
40968
|
' ', itemsName !== null && itemsName !== void 0 ? itemsName : 'Content',
|
|
40967
40969
|
React__default.createElement(FontAwesomeIcon, { icon: faChevronDown, className: "ms-1" }))));
|
|
40968
40970
|
}
|
|
40969
40971
|
// Main UI
|
|
40970
|
-
return (React__default.createElement("div", { className: "
|
|
40972
|
+
return (React__default.createElement("div", { className: "AutoscrollToBottomContainer-outer-container" },
|
|
40971
40973
|
React__default.createElement("style", null, style),
|
|
40972
40974
|
jumpToBottomButton,
|
|
40973
|
-
React__default.createElement("div", { className: "
|
|
40975
|
+
React__default.createElement("div", { className: "AutoscrollToBottomContainer-scrollable-container", onScroll: () => {
|
|
40974
40976
|
handleScroll();
|
|
40975
40977
|
}, ref: container }, items
|
|
40976
40978
|
// Render each item with a key
|
|
40977
40979
|
.map((item) => {
|
|
40978
|
-
return (React__default.createElement("div", { className: "
|
|
40980
|
+
return (React__default.createElement("div", { className: "AutoscrollToBottomContainer-item-container", key: item.id }, item.item));
|
|
40979
40981
|
})
|
|
40980
40982
|
// Reverse order because flex column is reverse
|
|
40981
40983
|
.reverse())));
|
|
@@ -42860,5 +42862,5 @@ var DayOfWeek;
|
|
|
42860
42862
|
})(DayOfWeek || (DayOfWeek = {}));
|
|
42861
42863
|
var DayOfWeek$1 = DayOfWeek;
|
|
42862
42864
|
|
|
42863
|
-
export { AppWrapper, ButtonInputGroup, CSVDownloadButton, CheckboxButton, CopiableBox, DAY_IN_MS, DBEntryFieldType$1 as DBEntryFieldType, DBEntryManagerPanel, DayOfWeek$1 as DayOfWeek, Drawer, DynamicWord, ErrorBox, ErrorWithCode, HOUR_IN_MS, IntelliTable, ItemPicker, LoadingSpinner, LogAction$1 as LogAction, LogBuiltInMetadata, LogReviewer, LogSource$1 as LogSource, LogType$1 as LogType, MINUTE_IN_MS, Modal, ModalButtonType$1 as ModalButtonType, ModalSize$1 as ModalSize, ModalType$1 as ModalType, ParamType$1 as ParamType, PopFailureMark, PopPendingMark, PopSuccessMark, RadioButton, ReactKitErrorCode$1 as ReactKitErrorCode,
|
|
42865
|
+
export { AppWrapper, AutoscrollToBottomContainer, ButtonInputGroup, CSVDownloadButton, CheckboxButton, CopiableBox, DAY_IN_MS, DBEntryFieldType$1 as DBEntryFieldType, DBEntryManagerPanel, DayOfWeek$1 as DayOfWeek, Drawer, DynamicWord, ErrorBox, ErrorWithCode, HOUR_IN_MS, IntelliTable, ItemPicker, LoadingSpinner, LogAction$1 as LogAction, LogBuiltInMetadata, LogReviewer, LogSource$1 as LogSource, LogType$1 as LogType, MINUTE_IN_MS, Modal, ModalButtonType$1 as ModalButtonType, ModalSize$1 as ModalSize, ModalType$1 as ModalType, ParamType$1 as ParamType, PopFailureMark, PopPendingMark, PopSuccessMark, RadioButton, ReactKitErrorCode$1 as ReactKitErrorCode, SimpleDateChooser, TabBox, ToggleSwitch, Tooltip, Variant$1 as Variant, abbreviate, addDBEditorEndpoints, addFatalErrorHandler, alert$1 as alert, avg, canReviewLogs, ceilToNumDecimals, compareArraysByProp, confirm, extractProp, floorToNumDecimals, forceNumIntoBounds, genCSV, genCommaList, genRouteHandler, getHumanReadableDate, getLocalTimeInfo, getMonthName, getOrdinal, getPartOfDay, getTimeInfoInET, handleError, handleSuccess, idify, initClient, initLogCollection, initServer, isMobileOrTablet, logClientEvent, onlyKeepLetters, padDecimalZeros, padZerosLeft, parallelLimit, roundToNumDecimals, showFatalError, startMinWait, stringsToHumanReadableList, stubServerEndpoint, sum, validateEmail, validatePhoneNumber, validateString, visitServerEndpoint, waitMs };
|
|
42864
42866
|
//# sourceMappingURL=index.js.map
|