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.esm.js
CHANGED
|
@@ -35770,6 +35770,9 @@ const StyledInput = styled.input`
|
|
|
35770
35770
|
border: none;
|
|
35771
35771
|
cursor: ${props => props.disabled ? 'not-allowed' : 'text'};
|
|
35772
35772
|
font-family: "Poppins", sans-serif;
|
|
35773
|
+
overflow: hidden;
|
|
35774
|
+
text-overflow: ellipsis;
|
|
35775
|
+
white-space: nowrap;
|
|
35773
35776
|
`;
|
|
35774
35777
|
const StyledTextarea = styled.textarea`
|
|
35775
35778
|
width: 100%;
|
|
@@ -35866,11 +35869,19 @@ const Input$2 = _ref => {
|
|
|
35866
35869
|
const [isFocused, setIsFocused] = useState(false);
|
|
35867
35870
|
const [inputValue, setInputValue] = useState("");
|
|
35868
35871
|
const [showPassword, setShowPassword] = useState(false);
|
|
35872
|
+
const [isOverflowing, setIsOverflowing] = useState(false);
|
|
35869
35873
|
const inputRef = useRef(null);
|
|
35870
35874
|
const containerRef = useRef(null);
|
|
35871
35875
|
useEffect(() => {
|
|
35872
35876
|
setInputValue(selectedValue);
|
|
35873
35877
|
}, [selectedValue]);
|
|
35878
|
+
useEffect(() => {
|
|
35879
|
+
if (inputRef?.current && !multiline && !isFocused) {
|
|
35880
|
+
const element = inputRef.current;
|
|
35881
|
+
const hasOverflow = element.scrollWidth > element.clientWidth;
|
|
35882
|
+
setIsOverflowing(hasOverflow);
|
|
35883
|
+
}
|
|
35884
|
+
}, [inputValue, multiline, width, isFocused]);
|
|
35874
35885
|
const handleLabelClick = () => {
|
|
35875
35886
|
if (disabled) return;
|
|
35876
35887
|
setIsFocused(true);
|
|
@@ -35964,7 +35975,8 @@ const Input$2 = _ref => {
|
|
|
35964
35975
|
disabled: disabled,
|
|
35965
35976
|
isDarkerBackground: isDarkerBackground,
|
|
35966
35977
|
multiline: multiline,
|
|
35967
|
-
onClick: handleContainerClick
|
|
35978
|
+
onClick: handleContainerClick,
|
|
35979
|
+
title: isOverflowing && inputValue && !isFocused ? inputValue : ""
|
|
35968
35980
|
}, /*#__PURE__*/React$1.createElement(InputContainer, {
|
|
35969
35981
|
className: "InputContainer",
|
|
35970
35982
|
labelColor: labelColor,
|
|
@@ -42660,6 +42672,14 @@ const TableBody = /*#__PURE__*/forwardRef(({
|
|
|
42660
42672
|
const [shimmerRowIndex, setShimmerRowIndex] = useState(-1);
|
|
42661
42673
|
const [shimmerStartTime, setShimmerStartTime] = useState(null);
|
|
42662
42674
|
|
|
42675
|
+
// Helper function to get nested values from objects (e.g., "status.PackageStatusDescription")
|
|
42676
|
+
const getNestedValue = (obj, path) => {
|
|
42677
|
+
if (!path || typeof path !== 'string') return undefined;
|
|
42678
|
+
return path.split('.').reduce((current, key) => {
|
|
42679
|
+
return current && current[key] !== undefined ? current[key] : undefined;
|
|
42680
|
+
}, obj);
|
|
42681
|
+
};
|
|
42682
|
+
|
|
42663
42683
|
// Handle shimmer effect changes
|
|
42664
42684
|
useEffect(() => {
|
|
42665
42685
|
if (indexToShimmer >= 0) {
|
|
@@ -43402,7 +43422,8 @@ const TableBody = /*#__PURE__*/forwardRef(({
|
|
|
43402
43422
|
}
|
|
43403
43423
|
let value, formattedValue;
|
|
43404
43424
|
try {
|
|
43405
|
-
|
|
43425
|
+
// Support nested keys like "status.PackageStatusDescription"
|
|
43426
|
+
value = column.key.includes('.') ? getNestedValue(row, column.key) : row[column.key];
|
|
43406
43427
|
formattedValue = formatValue(value, column, row, rowIndex) || "";
|
|
43407
43428
|
} catch (e) {
|
|
43408
43429
|
console.error("Error formatting value:", e);
|