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
package/dist/cjs/index.js
CHANGED
|
@@ -40733,20 +40733,22 @@ const idify = (str) => {
|
|
|
40733
40733
|
/**
|
|
40734
40734
|
* Container that automatically scrolls when new items are added,
|
|
40735
40735
|
* lets the user scroll up to see old items, but resumes
|
|
40736
|
-
* autoscroll when the user scrolls back to the bottom
|
|
40736
|
+
* autoscroll when the user scrolls back to the bottom.
|
|
40737
|
+
* Note: takes up full height of parent, so parent should
|
|
40738
|
+
* have a determined height for the scroll to work.
|
|
40737
40739
|
* @author Gabe Abrams
|
|
40738
40740
|
*/
|
|
40739
40741
|
/*------------------------------------------------------------------------*/
|
|
40740
40742
|
/* -------------------------------- Style ------------------------------- */
|
|
40741
40743
|
/*------------------------------------------------------------------------*/
|
|
40742
40744
|
const style = `
|
|
40743
|
-
.
|
|
40745
|
+
.AutoscrollToBottomContainer-outer-container {
|
|
40744
40746
|
/* Take up all space */
|
|
40745
40747
|
height: 100%;
|
|
40746
40748
|
position: relative;
|
|
40747
40749
|
}
|
|
40748
40750
|
|
|
40749
|
-
.
|
|
40751
|
+
.AutoscrollToBottomContainer-scrollable-container {
|
|
40750
40752
|
/* Take up max 100% height, don't take it up if not needed */
|
|
40751
40753
|
/* (so column-reverse layout doesn't start at the bottom) */
|
|
40752
40754
|
max-height: 100%;
|
|
@@ -40761,7 +40763,7 @@ const style = `
|
|
|
40761
40763
|
flex-direction: column-reverse;
|
|
40762
40764
|
}
|
|
40763
40765
|
|
|
40764
|
-
.
|
|
40766
|
+
.AutoscrollToBottomContainer-jump-to-bottom-container {
|
|
40765
40767
|
/* Don't take any space in parent */
|
|
40766
40768
|
height: 0;
|
|
40767
40769
|
overflow: visible;
|
|
@@ -40778,7 +40780,7 @@ const style = `
|
|
|
40778
40780
|
text-align: center;
|
|
40779
40781
|
}
|
|
40780
40782
|
|
|
40781
|
-
.
|
|
40783
|
+
.AutoscrollToBottomContainer-item-container {
|
|
40782
40784
|
/* Normal Height */
|
|
40783
40785
|
position: relative;
|
|
40784
40786
|
z-index: 1;
|
|
@@ -40850,7 +40852,7 @@ const reducer = (state, action) => {
|
|
|
40850
40852
|
/*------------------------------------------------------------------------*/
|
|
40851
40853
|
/* ------------------------------ Component ----------------------------- */
|
|
40852
40854
|
/*------------------------------------------------------------------------*/
|
|
40853
|
-
const
|
|
40855
|
+
const AutoscrollToBottomContainer = (props) => {
|
|
40854
40856
|
/*------------------------------------------------------------------------*/
|
|
40855
40857
|
/* -------------------------------- Setup ------------------------------- */
|
|
40856
40858
|
/*------------------------------------------------------------------------*/
|
|
@@ -40986,22 +40988,22 @@ const ScrollLockToBottom = (props) => {
|
|
|
40986
40988
|
// Jump to Bottom button
|
|
40987
40989
|
let jumpToBottomButton;
|
|
40988
40990
|
if (jumpToBottomButtonVisible) {
|
|
40989
|
-
jumpToBottomButton = (React__default["default"].createElement("div", { className: `
|
|
40990
|
-
React__default["default"].createElement("button", { type: "button", className: `
|
|
40991
|
+
jumpToBottomButton = (React__default["default"].createElement("div", { className: `AutoscrollToBottomContainer-jump-to-bottom-container AutoscrollToBottomContainer-for-${idify(itemsName !== null && itemsName !== void 0 ? itemsName : 'items')}` },
|
|
40992
|
+
React__default["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" },
|
|
40991
40993
|
"New",
|
|
40992
40994
|
' ', itemsName !== null && itemsName !== void 0 ? itemsName : 'Content',
|
|
40993
40995
|
React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, { icon: freeSolidSvgIcons.faChevronDown, className: "ms-1" }))));
|
|
40994
40996
|
}
|
|
40995
40997
|
// Main UI
|
|
40996
|
-
return (React__default["default"].createElement("div", { className: "
|
|
40998
|
+
return (React__default["default"].createElement("div", { className: "AutoscrollToBottomContainer-outer-container" },
|
|
40997
40999
|
React__default["default"].createElement("style", null, style),
|
|
40998
41000
|
jumpToBottomButton,
|
|
40999
|
-
React__default["default"].createElement("div", { className: "
|
|
41001
|
+
React__default["default"].createElement("div", { className: "AutoscrollToBottomContainer-scrollable-container", onScroll: () => {
|
|
41000
41002
|
handleScroll();
|
|
41001
41003
|
}, ref: container }, items
|
|
41002
41004
|
// Render each item with a key
|
|
41003
41005
|
.map((item) => {
|
|
41004
|
-
return (React__default["default"].createElement("div", { className: "
|
|
41006
|
+
return (React__default["default"].createElement("div", { className: "AutoscrollToBottomContainer-item-container", key: item.id }, item.item));
|
|
41005
41007
|
})
|
|
41006
41008
|
// Reverse order because flex column is reverse
|
|
41007
41009
|
.reverse())));
|
|
@@ -42887,6 +42889,7 @@ var DayOfWeek;
|
|
|
42887
42889
|
var DayOfWeek$1 = DayOfWeek;
|
|
42888
42890
|
|
|
42889
42891
|
exports.AppWrapper = AppWrapper;
|
|
42892
|
+
exports.AutoscrollToBottomContainer = AutoscrollToBottomContainer;
|
|
42890
42893
|
exports.ButtonInputGroup = ButtonInputGroup;
|
|
42891
42894
|
exports.CSVDownloadButton = CSVDownloadButton;
|
|
42892
42895
|
exports.CheckboxButton = CheckboxButton;
|
|
@@ -42919,7 +42922,6 @@ exports.PopPendingMark = PopPendingMark;
|
|
|
42919
42922
|
exports.PopSuccessMark = PopSuccessMark;
|
|
42920
42923
|
exports.RadioButton = RadioButton;
|
|
42921
42924
|
exports.ReactKitErrorCode = ReactKitErrorCode$1;
|
|
42922
|
-
exports.ScrollLockToBottom = ScrollLockToBottom;
|
|
42923
42925
|
exports.SimpleDateChooser = SimpleDateChooser;
|
|
42924
42926
|
exports.TabBox = TabBox;
|
|
42925
42927
|
exports.ToggleSwitch = ToggleSwitch;
|