sag_components 2.0.0-beta250 → 2.0.0-beta252
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/index.esm.js +23 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +23 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -35780,6 +35780,9 @@ const StyledInput = styled__default["default"].input`
|
|
|
35780
35780
|
border: none;
|
|
35781
35781
|
cursor: ${props => props.disabled ? 'not-allowed' : 'text'};
|
|
35782
35782
|
font-family: "Poppins", sans-serif;
|
|
35783
|
+
overflow: hidden;
|
|
35784
|
+
text-overflow: ellipsis;
|
|
35785
|
+
white-space: nowrap;
|
|
35783
35786
|
`;
|
|
35784
35787
|
const StyledTextarea = styled__default["default"].textarea`
|
|
35785
35788
|
width: 100%;
|
|
@@ -35876,11 +35879,19 @@ const Input$2 = _ref => {
|
|
|
35876
35879
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
35877
35880
|
const [inputValue, setInputValue] = React$1.useState("");
|
|
35878
35881
|
const [showPassword, setShowPassword] = React$1.useState(false);
|
|
35882
|
+
const [isOverflowing, setIsOverflowing] = React$1.useState(false);
|
|
35879
35883
|
const inputRef = React$1.useRef(null);
|
|
35880
35884
|
const containerRef = React$1.useRef(null);
|
|
35881
35885
|
React$1.useEffect(() => {
|
|
35882
35886
|
setInputValue(selectedValue);
|
|
35883
35887
|
}, [selectedValue]);
|
|
35888
|
+
React$1.useEffect(() => {
|
|
35889
|
+
if (inputRef?.current && !multiline && !isFocused) {
|
|
35890
|
+
const element = inputRef.current;
|
|
35891
|
+
const hasOverflow = element.scrollWidth > element.clientWidth;
|
|
35892
|
+
setIsOverflowing(hasOverflow);
|
|
35893
|
+
}
|
|
35894
|
+
}, [inputValue, multiline, width, isFocused]);
|
|
35884
35895
|
const handleLabelClick = () => {
|
|
35885
35896
|
if (disabled) return;
|
|
35886
35897
|
setIsFocused(true);
|
|
@@ -35974,7 +35985,8 @@ const Input$2 = _ref => {
|
|
|
35974
35985
|
disabled: disabled,
|
|
35975
35986
|
isDarkerBackground: isDarkerBackground,
|
|
35976
35987
|
multiline: multiline,
|
|
35977
|
-
onClick: handleContainerClick
|
|
35988
|
+
onClick: handleContainerClick,
|
|
35989
|
+
title: isOverflowing && inputValue && !isFocused ? inputValue : ""
|
|
35978
35990
|
}, /*#__PURE__*/React__default["default"].createElement(InputContainer, {
|
|
35979
35991
|
className: "InputContainer",
|
|
35980
35992
|
labelColor: labelColor,
|
|
@@ -42670,6 +42682,14 @@ const TableBody = /*#__PURE__*/React$1.forwardRef(({
|
|
|
42670
42682
|
const [shimmerRowIndex, setShimmerRowIndex] = React$1.useState(-1);
|
|
42671
42683
|
const [shimmerStartTime, setShimmerStartTime] = React$1.useState(null);
|
|
42672
42684
|
|
|
42685
|
+
// Helper function to get nested values from objects (e.g., "status.PackageStatusDescription")
|
|
42686
|
+
const getNestedValue = (obj, path) => {
|
|
42687
|
+
if (!path || typeof path !== 'string') return undefined;
|
|
42688
|
+
return path.split('.').reduce((current, key) => {
|
|
42689
|
+
return current && current[key] !== undefined ? current[key] : undefined;
|
|
42690
|
+
}, obj);
|
|
42691
|
+
};
|
|
42692
|
+
|
|
42673
42693
|
// Handle shimmer effect changes
|
|
42674
42694
|
React$1.useEffect(() => {
|
|
42675
42695
|
if (indexToShimmer >= 0) {
|
|
@@ -43412,7 +43432,8 @@ const TableBody = /*#__PURE__*/React$1.forwardRef(({
|
|
|
43412
43432
|
}
|
|
43413
43433
|
let value, formattedValue;
|
|
43414
43434
|
try {
|
|
43415
|
-
|
|
43435
|
+
// Support nested keys like "status.PackageStatusDescription"
|
|
43436
|
+
value = column.key.includes('.') ? getNestedValue(row, column.key) : row[column.key];
|
|
43416
43437
|
formattedValue = formatValue(value, column, row, rowIndex) || "";
|
|
43417
43438
|
} catch (e) {
|
|
43418
43439
|
console.error("Error formatting value:", e);
|