sag_components 2.0.0-beta110 → 2.0.0-beta111
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 +44 -31
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +44 -31
- package/dist/index.js.map +1 -1
- package/dist/types/components/ItemManagerPanel/ItemManagerPanel.stories.d.ts +5 -25
- package/dist/types/components/Table/TableBody.styles.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -27931,7 +27931,7 @@ Heatmap.propTypes = {
|
|
|
27931
27931
|
barHeight: PropTypes.string.isRequired
|
|
27932
27932
|
};
|
|
27933
27933
|
|
|
27934
|
-
const ButtonWrapper$
|
|
27934
|
+
const ButtonWrapper$3 = styled.div`
|
|
27935
27935
|
width: fit-content;
|
|
27936
27936
|
text-align: center;
|
|
27937
27937
|
`;
|
|
@@ -28082,7 +28082,7 @@ const IconButton$1 = props => {
|
|
|
28082
28082
|
const onCancelClickHandler = event => {
|
|
28083
28083
|
onCancelClick(event);
|
|
28084
28084
|
};
|
|
28085
|
-
return /*#__PURE__*/React$1.createElement(ButtonWrapper$
|
|
28085
|
+
return /*#__PURE__*/React$1.createElement(ButtonWrapper$3, {
|
|
28086
28086
|
id: "ButtonWrapper"
|
|
28087
28087
|
}, /*#__PURE__*/React$1.createElement(IconButtonContainer, {
|
|
28088
28088
|
download: true,
|
|
@@ -36385,7 +36385,7 @@ const CheckboxLabel = styled.label`
|
|
|
36385
36385
|
text-overflow: ellipsis;
|
|
36386
36386
|
}
|
|
36387
36387
|
`;
|
|
36388
|
-
const ButtonWrapper$
|
|
36388
|
+
const ButtonWrapper$2 = styled.div`
|
|
36389
36389
|
text-align: right;
|
|
36390
36390
|
`;
|
|
36391
36391
|
const ResetButton$1 = styled.button`
|
|
@@ -36648,7 +36648,7 @@ const FilterPop = props => {
|
|
|
36648
36648
|
} : null,
|
|
36649
36649
|
onChange: () => handleCheckboxChange(item.value)
|
|
36650
36650
|
}), /*#__PURE__*/React$1.createElement("span", null, item.label));
|
|
36651
|
-
})), /*#__PURE__*/React$1.createElement(ButtonWrapper$
|
|
36651
|
+
})), /*#__PURE__*/React$1.createElement(ButtonWrapper$2, null, /*#__PURE__*/React$1.createElement(ResetButton$1, {
|
|
36652
36652
|
onClick: handleReset,
|
|
36653
36653
|
disabled: areAllNonAllItemsSelected() && selectedAttributes.All
|
|
36654
36654
|
}, "Reset")));
|
|
@@ -36873,7 +36873,7 @@ const Checkmark = styled.span`
|
|
|
36873
36873
|
font-weight: bold;
|
|
36874
36874
|
font-size: 16px;
|
|
36875
36875
|
`;
|
|
36876
|
-
const ButtonWrapper = styled.div`
|
|
36876
|
+
const ButtonWrapper$1 = styled.div`
|
|
36877
36877
|
text-align: right;
|
|
36878
36878
|
padding: 4px 8px;
|
|
36879
36879
|
`;
|
|
@@ -36968,7 +36968,7 @@ const SortPop = props => {
|
|
|
36968
36968
|
}
|
|
36969
36969
|
}, /*#__PURE__*/React$1.createElement(TruncatedText$1, null, item.label), item.value === value && /*#__PURE__*/React$1.createElement(Checkmark, {
|
|
36970
36970
|
color: color
|
|
36971
|
-
}, "\u2713")))), /*#__PURE__*/React$1.createElement(ButtonWrapper, null, /*#__PURE__*/React$1.createElement(ResetButton, {
|
|
36971
|
+
}, "\u2713")))), /*#__PURE__*/React$1.createElement(ButtonWrapper$1, null, /*#__PURE__*/React$1.createElement(ResetButton, {
|
|
36972
36972
|
onClick: handleReset,
|
|
36973
36973
|
disabled: value === null // Disable reset if no value is selected
|
|
36974
36974
|
}, "Reset")));
|
|
@@ -37762,6 +37762,12 @@ styled.div`
|
|
|
37762
37762
|
align-items: center;
|
|
37763
37763
|
gap: 8px;
|
|
37764
37764
|
`;
|
|
37765
|
+
const ButtonWrapper = styled.div`
|
|
37766
|
+
display: inline-block;
|
|
37767
|
+
position: relative;
|
|
37768
|
+
|
|
37769
|
+
${tooltipStyles}
|
|
37770
|
+
`;
|
|
37765
37771
|
const SentStatus = styled.div`
|
|
37766
37772
|
display: flex;
|
|
37767
37773
|
align-items: center;
|
|
@@ -37932,7 +37938,7 @@ const TableBody = ({
|
|
|
37932
37938
|
}
|
|
37933
37939
|
return null;
|
|
37934
37940
|
};
|
|
37935
|
-
switch (column.fieldType
|
|
37941
|
+
switch (column.fieldType?.toLowerCase()) {
|
|
37936
37942
|
case 'currency':
|
|
37937
37943
|
if (column.format === '$0.00') {
|
|
37938
37944
|
return `$${parseFloat(value).toFixed(2)}`;
|
|
@@ -37961,8 +37967,28 @@ const TableBody = ({
|
|
|
37961
37967
|
}
|
|
37962
37968
|
return value;
|
|
37963
37969
|
case 'packagestatus':
|
|
37964
|
-
|
|
37965
|
-
|
|
37970
|
+
// Helper function to apply tooltip logic
|
|
37971
|
+
const applyTooltipLogic = (element, tooltipText) => {
|
|
37972
|
+
if (element && tooltipText && tooltipText.trim() !== '') {
|
|
37973
|
+
const rect = element.getBoundingClientRect();
|
|
37974
|
+
const {
|
|
37975
|
+
offset,
|
|
37976
|
+
height
|
|
37977
|
+
} = calculateTooltipOffset(tooltipText);
|
|
37978
|
+
element.style.setProperty('--tooltip-top', `${rect.top}px`);
|
|
37979
|
+
element.style.setProperty('--tooltip-left', `${rect.left}px`);
|
|
37980
|
+
element.style.setProperty('--tooltip-width', `${rect.width}px`);
|
|
37981
|
+
element.style.setProperty('--tooltip-offset', `${offset}px`);
|
|
37982
|
+
element.style.setProperty('--tooltip-height', `${height}px`);
|
|
37983
|
+
element.setAttribute('data-tooltip', tooltipText);
|
|
37984
|
+
}
|
|
37985
|
+
};
|
|
37986
|
+
const tooltipText = getTooltipText(value);
|
|
37987
|
+
const lowerValue = value?.toLowerCase();
|
|
37988
|
+
if (lowerValue === 'empty') {
|
|
37989
|
+
return /*#__PURE__*/React$1.createElement(ButtonWrapper, {
|
|
37990
|
+
ref: el => applyTooltipLogic(el, tooltipText)
|
|
37991
|
+
}, /*#__PURE__*/React$1.createElement(Button$1, {
|
|
37966
37992
|
leftIcon: "Fly",
|
|
37967
37993
|
text: "Send",
|
|
37968
37994
|
borderRadius: "8px",
|
|
@@ -37978,9 +38004,11 @@ const TableBody = ({
|
|
|
37978
38004
|
width: "100px",
|
|
37979
38005
|
height: "32px",
|
|
37980
38006
|
disabled: true
|
|
37981
|
-
});
|
|
37982
|
-
} else if (
|
|
37983
|
-
return /*#__PURE__*/React$1.createElement(
|
|
38007
|
+
}));
|
|
38008
|
+
} else if (lowerValue === 'draft') {
|
|
38009
|
+
return /*#__PURE__*/React$1.createElement(ButtonWrapper, {
|
|
38010
|
+
ref: el => applyTooltipLogic(el, tooltipText)
|
|
38011
|
+
}, /*#__PURE__*/React$1.createElement(Button$1, {
|
|
37984
38012
|
leftIcon: "Fly",
|
|
37985
38013
|
text: "Send",
|
|
37986
38014
|
borderRadius: "8px",
|
|
@@ -37994,28 +38022,13 @@ const TableBody = ({
|
|
|
37994
38022
|
width: "100px",
|
|
37995
38023
|
height: "32px",
|
|
37996
38024
|
onClick: e => {
|
|
37997
|
-
e.stopPropagation();
|
|
38025
|
+
e.stopPropagation();
|
|
37998
38026
|
onSendClick && onSendClick(row);
|
|
37999
38027
|
}
|
|
38000
|
-
});
|
|
38001
|
-
} else if (
|
|
38002
|
-
const tooltipText = getTooltipText(value);
|
|
38028
|
+
}));
|
|
38029
|
+
} else if (lowerValue === 'sent') {
|
|
38003
38030
|
return /*#__PURE__*/React$1.createElement(SentStatus, {
|
|
38004
|
-
ref: el =>
|
|
38005
|
-
if (el && tooltipText) {
|
|
38006
|
-
const rect = el.getBoundingClientRect();
|
|
38007
|
-
const {
|
|
38008
|
-
offset,
|
|
38009
|
-
height
|
|
38010
|
-
} = calculateTooltipOffset(tooltipText);
|
|
38011
|
-
el.style.setProperty('--tooltip-top', `${rect.top}px`);
|
|
38012
|
-
el.style.setProperty('--tooltip-left', `${rect.left}px`);
|
|
38013
|
-
el.style.setProperty('--tooltip-width', `${rect.width}px`);
|
|
38014
|
-
el.style.setProperty('--tooltip-offset', `${offset}px`);
|
|
38015
|
-
el.style.setProperty('--tooltip-height', `${height}px`);
|
|
38016
|
-
el.setAttribute('data-tooltip', tooltipText);
|
|
38017
|
-
}
|
|
38018
|
-
}
|
|
38031
|
+
ref: el => applyTooltipLogic(el, tooltipText)
|
|
38019
38032
|
}, /*#__PURE__*/React$1.createElement(OkIcon, {
|
|
38020
38033
|
width: "24",
|
|
38021
38034
|
height: "24",
|