sag_components 2.0.0-beta124 → 2.0.0-beta126
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 +72 -28
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +72 -28
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -23907,22 +23907,21 @@ const DeleteIcon = styled__default["default"].div`
|
|
|
23907
23907
|
position: absolute;
|
|
23908
23908
|
`;
|
|
23909
23909
|
|
|
23910
|
-
const QuickFilterDropdownSingle =
|
|
23911
|
-
|
|
23912
|
-
|
|
23913
|
-
|
|
23914
|
-
|
|
23915
|
-
|
|
23916
|
-
|
|
23917
|
-
|
|
23918
|
-
|
|
23919
|
-
|
|
23920
|
-
|
|
23921
|
-
|
|
23922
|
-
|
|
23923
|
-
|
|
23924
|
-
|
|
23925
|
-
} = _ref;
|
|
23910
|
+
const QuickFilterDropdownSingle = ({
|
|
23911
|
+
label,
|
|
23912
|
+
hoverColor,
|
|
23913
|
+
options,
|
|
23914
|
+
selectedValue,
|
|
23915
|
+
placeHolder,
|
|
23916
|
+
onChange,
|
|
23917
|
+
disabled,
|
|
23918
|
+
width,
|
|
23919
|
+
error,
|
|
23920
|
+
errorMessage,
|
|
23921
|
+
xIconShow,
|
|
23922
|
+
labelColor,
|
|
23923
|
+
showLabelOnTop
|
|
23924
|
+
}) => {
|
|
23926
23925
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
23927
23926
|
const [showOptions, setShowOptions] = React$1.useState(false);
|
|
23928
23927
|
const [inputValue, setInputValue] = React$1.useState("");
|
|
@@ -37609,11 +37608,22 @@ const TableRow = styled__default["default"].tr`
|
|
|
37609
37608
|
border-bottom: 1px solid #F2F2F2;
|
|
37610
37609
|
transition: background-color 0.2s;
|
|
37611
37610
|
font-family: 'Poppins', sans-serif;
|
|
37611
|
+
cursor: pointer;
|
|
37612
37612
|
|
|
37613
37613
|
&:hover {
|
|
37614
37614
|
background-color: #E6F0F0;
|
|
37615
37615
|
}
|
|
37616
37616
|
|
|
37617
|
+
/* Focus state - persistent until another row is clicked */
|
|
37618
|
+
${props => props.$isFocused && styled.css`
|
|
37619
|
+
background-color: #D1E7E7;
|
|
37620
|
+
border-left: 3px solid #066768;
|
|
37621
|
+
|
|
37622
|
+
&:hover {
|
|
37623
|
+
background-color: #C1D7D7;
|
|
37624
|
+
}
|
|
37625
|
+
`}
|
|
37626
|
+
|
|
37617
37627
|
&:last-child {
|
|
37618
37628
|
border-bottom: none;
|
|
37619
37629
|
}
|
|
@@ -37897,6 +37907,15 @@ const TableBody = ({
|
|
|
37897
37907
|
onDeleteClick
|
|
37898
37908
|
}) => {
|
|
37899
37909
|
const [hoveredRowIndex, setHoveredRowIndex] = React$1.useState(null);
|
|
37910
|
+
const [focusedRowIndex, setFocusedRowIndex] = React$1.useState(null);
|
|
37911
|
+
|
|
37912
|
+
// Handle row click for focus state
|
|
37913
|
+
const handleRowClick = (row, rowIndex) => {
|
|
37914
|
+
setFocusedRowIndex(rowIndex);
|
|
37915
|
+
if (onRowClick) {
|
|
37916
|
+
onRowClick(row);
|
|
37917
|
+
}
|
|
37918
|
+
};
|
|
37900
37919
|
|
|
37901
37920
|
// Function to calculate tooltip height based on text length
|
|
37902
37921
|
const calculateTooltipOffset = (text, isRegularCell = false) => {
|
|
@@ -37996,7 +38015,7 @@ const TableBody = ({
|
|
|
37996
38015
|
hoverBackgroundColor: "#E6F0F0",
|
|
37997
38016
|
hoverBorderColor: "#D9D9D9",
|
|
37998
38017
|
disabledTextColor: "#B1B1B1",
|
|
37999
|
-
disabledBackgroundColor: hoveredRowIndex === rowIndex ? "#E6F0F0" : "#FFF",
|
|
38018
|
+
disabledBackgroundColor: focusedRowIndex === rowIndex ? "#D1E7E7" : hoveredRowIndex === rowIndex ? "#E6F0F0" : "#FFF",
|
|
38000
38019
|
disabledBorderColor: "#D9D9D9",
|
|
38001
38020
|
width: "100px",
|
|
38002
38021
|
height: "32px",
|
|
@@ -38009,7 +38028,7 @@ const TableBody = ({
|
|
|
38009
38028
|
leftIcon: "Fly",
|
|
38010
38029
|
text: "Send",
|
|
38011
38030
|
borderRadius: "8px",
|
|
38012
|
-
backgroundColor: hoveredRowIndex === rowIndex ? "#E6F0F0" : "#FFF",
|
|
38031
|
+
backgroundColor: focusedRowIndex === rowIndex ? "#D1E7E7" : hoveredRowIndex === rowIndex ? "#E6F0F0" : "#FFF",
|
|
38013
38032
|
textColor: buttonColor,
|
|
38014
38033
|
borderColor: buttonColor,
|
|
38015
38034
|
hoverTextColor: buttonColor,
|
|
@@ -38099,8 +38118,10 @@ const TableBody = ({
|
|
|
38099
38118
|
return /*#__PURE__*/React__default["default"].createElement(StyledTableBody, null, data.map((row, rowIndex) => /*#__PURE__*/React__default["default"].createElement(TableRow, {
|
|
38100
38119
|
key: rowIndex,
|
|
38101
38120
|
"data-row-index": rowIndex,
|
|
38121
|
+
$isFocused: focusedRowIndex === rowIndex,
|
|
38102
38122
|
onMouseEnter: () => setHoveredRowIndex(rowIndex),
|
|
38103
|
-
onMouseLeave: () => setHoveredRowIndex(null)
|
|
38123
|
+
onMouseLeave: () => setHoveredRowIndex(null),
|
|
38124
|
+
onClick: () => handleRowClick(row, rowIndex)
|
|
38104
38125
|
}, columns.map(column => {
|
|
38105
38126
|
const value = row[column.key];
|
|
38106
38127
|
const formattedValue = formatValue(value, column, row, rowIndex);
|
|
@@ -38124,8 +38145,7 @@ const TableBody = ({
|
|
|
38124
38145
|
$fieldType: column.fieldType?.toLowerCase(),
|
|
38125
38146
|
$color: column.color,
|
|
38126
38147
|
$minWidth: column.minWidth,
|
|
38127
|
-
$maxWidth: column.maxWidth
|
|
38128
|
-
onClick: onRowClick ? () => onRowClick(row) : undefined
|
|
38148
|
+
$maxWidth: column.maxWidth
|
|
38129
38149
|
}, formattedValue);
|
|
38130
38150
|
}))));
|
|
38131
38151
|
};
|
|
@@ -41698,6 +41718,7 @@ const VendorPackages = styled__default["default"].div`
|
|
|
41698
41718
|
color: #8b8989;
|
|
41699
41719
|
font-size: 14px;
|
|
41700
41720
|
font-weight: 400;
|
|
41721
|
+
text-align: left;
|
|
41701
41722
|
`;
|
|
41702
41723
|
const VendorChevron = styled__default["default"].div`
|
|
41703
41724
|
font-size: 22px;
|
|
@@ -42178,7 +42199,11 @@ const NewSubitem = ({
|
|
|
42178
42199
|
size: "small",
|
|
42179
42200
|
text: "Cancel",
|
|
42180
42201
|
type: "secondary",
|
|
42181
|
-
borderRadius: "8px"
|
|
42202
|
+
borderRadius: "8px",
|
|
42203
|
+
borderColor: "#D3D3D3",
|
|
42204
|
+
hoverTextColor: "#212121",
|
|
42205
|
+
hoverBackgroundColor: "#E6F0F0",
|
|
42206
|
+
hoverBorderColor: "#D3D3D3"
|
|
42182
42207
|
}), /*#__PURE__*/React__default["default"].createElement(Button$1, {
|
|
42183
42208
|
leftIcon: "none",
|
|
42184
42209
|
onClick: () => {
|
|
@@ -42324,7 +42349,12 @@ const ConfirmationDialog = ({
|
|
|
42324
42349
|
rightIcon: "none",
|
|
42325
42350
|
size: "",
|
|
42326
42351
|
text: "Cancel",
|
|
42327
|
-
type: "secondary"
|
|
42352
|
+
type: "secondary",
|
|
42353
|
+
borderRadius: "8px",
|
|
42354
|
+
borderColor: "#D3D3D3",
|
|
42355
|
+
hoverTextColor: "#212121",
|
|
42356
|
+
hoverBackgroundColor: "#E6F0F0",
|
|
42357
|
+
hoverBorderColor: "#D3D3D3"
|
|
42328
42358
|
}), /*#__PURE__*/React__default["default"].createElement(Button$1, {
|
|
42329
42359
|
leftIcon: "none",
|
|
42330
42360
|
onClick: onConfirm,
|
|
@@ -42332,9 +42362,11 @@ const ConfirmationDialog = ({
|
|
|
42332
42362
|
size: "",
|
|
42333
42363
|
text: "Confirm & Send",
|
|
42334
42364
|
type: "primary",
|
|
42365
|
+
borderRadius: "8px",
|
|
42335
42366
|
borderColor: linkColor,
|
|
42336
42367
|
backgroundColor: linkColor,
|
|
42337
|
-
|
|
42368
|
+
hoverBackgroundColor: "#388586",
|
|
42369
|
+
hoverBorderColor: "#388586"
|
|
42338
42370
|
}))), /*#__PURE__*/React__default["default"].createElement(Dialog, null, vendors.map((vendor, idx) => /*#__PURE__*/React__default["default"].createElement(VendorSection, {
|
|
42339
42371
|
key: vendor.name
|
|
42340
42372
|
}, /*#__PURE__*/React__default["default"].createElement(VendorHeader, null, /*#__PURE__*/React__default["default"].createElement(VendorName, null, vendor.name), /*#__PURE__*/React__default["default"].createElement(NewBadge, null, vendor.newPackages.length, " New")), /*#__PURE__*/React__default["default"].createElement(PackageList, null, vendor.newPackages.map((pkg, i) => /*#__PURE__*/React__default["default"].createElement(Item, {
|
|
@@ -51045,7 +51077,10 @@ const ItemManagerPanel = _ref => {
|
|
|
51045
51077
|
type: "secondary",
|
|
51046
51078
|
borderRadius: "8px",
|
|
51047
51079
|
borderColor: linkColor,
|
|
51048
|
-
textColor: linkColor
|
|
51080
|
+
textColor: linkColor,
|
|
51081
|
+
hoverTextColor: "#ffffff",
|
|
51082
|
+
hoverBackgroundColor: linkColor,
|
|
51083
|
+
hoverBorderColor: linkColor
|
|
51049
51084
|
})), /*#__PURE__*/React__default["default"].createElement(Subtitle$1, {
|
|
51050
51085
|
color: actuallyAllFormsSent ? "#90CE9C" : "#8b8989"
|
|
51051
51086
|
}, actuallyAllFormsSent ? '✔ All Forms Sent' : itemAndPackage.filter(item => item.packages !== null).length > 0 ? `${itemAndPackage.filter(item => item.packages !== null).length.toString()} New Forms` : ''))), /*#__PURE__*/React__default["default"].createElement(AddButtonContainer$1, null, /*#__PURE__*/React__default["default"].createElement(LinkButton, {
|
|
@@ -51065,9 +51100,18 @@ const ItemManagerPanel = _ref => {
|
|
|
51065
51100
|
onClick: e => {
|
|
51066
51101
|
handleVendorClick(item);
|
|
51067
51102
|
}
|
|
51068
|
-
}, /*#__PURE__*/React__default["default"].createElement(VendorNameAndPackagesContainer$1, null, /*#__PURE__*/React__default["default"].createElement(VendorName$2, null, item.name), item.packages.length === 0 && /*#__PURE__*/React__default["default"].createElement(Subtitle$1, null, "No Packages"), item.packages.length > 0 && /*#__PURE__*/React__default["default"].createElement(Subtitle$1, null,
|
|
51069
|
-
|
|
51070
|
-
|
|
51103
|
+
}, /*#__PURE__*/React__default["default"].createElement(VendorNameAndPackagesContainer$1, null, /*#__PURE__*/React__default["default"].createElement(VendorName$2, null, item.name), item.packages.length === 0 && /*#__PURE__*/React__default["default"].createElement(Subtitle$1, null, "No Packages"), item.packages.length > 0 && /*#__PURE__*/React__default["default"].createElement(Subtitle$1, null, (() => {
|
|
51104
|
+
const packagesWithStatus = item.packages.filter(pkg => pkg.hasOwnProperty('status') && pkg.status != null && pkg.status !== undefined && pkg.status !== '');
|
|
51105
|
+
const allHaveStatus = packagesWithStatus.length === item.packages.length;
|
|
51106
|
+
const noneHaveStatus = packagesWithStatus.length === 0;
|
|
51107
|
+
if (noneHaveStatus) {
|
|
51108
|
+
return 'No Packages sent';
|
|
51109
|
+
} else if (allHaveStatus) {
|
|
51110
|
+
return `${item.packages.length} Package${item.packages.length !== 1 ? 's' : ''} Sent`;
|
|
51111
|
+
} else {
|
|
51112
|
+
return `${item.packages.length} Package${item.packages.length !== 1 ? 's' : ''}`;
|
|
51113
|
+
}
|
|
51114
|
+
})())), /*#__PURE__*/React__default["default"].createElement(VendorChevron$1, null, /*#__PURE__*/React__default["default"].createElement(ArrowRightFullIcon, null))), /*#__PURE__*/React__default["default"].createElement(Trash$1, {
|
|
51071
51115
|
className: "trash-icon",
|
|
51072
51116
|
onClick: () => {
|
|
51073
51117
|
onDeleteVendor(item);
|