sag_components 2.0.0-beta215 → 2.0.0-beta216
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.js
CHANGED
|
@@ -24176,22 +24176,21 @@ const DeleteIcon = styled__default["default"].div`
|
|
|
24176
24176
|
position: absolute;
|
|
24177
24177
|
`;
|
|
24178
24178
|
|
|
24179
|
-
const QuickFilterDropdownSingle =
|
|
24180
|
-
|
|
24181
|
-
|
|
24182
|
-
|
|
24183
|
-
|
|
24184
|
-
|
|
24185
|
-
|
|
24186
|
-
|
|
24187
|
-
|
|
24188
|
-
|
|
24189
|
-
|
|
24190
|
-
|
|
24191
|
-
|
|
24192
|
-
|
|
24193
|
-
|
|
24194
|
-
} = _ref;
|
|
24179
|
+
const QuickFilterDropdownSingle = ({
|
|
24180
|
+
label,
|
|
24181
|
+
hoverColor,
|
|
24182
|
+
options,
|
|
24183
|
+
selectedValue,
|
|
24184
|
+
placeHolder,
|
|
24185
|
+
onChange,
|
|
24186
|
+
disabled,
|
|
24187
|
+
width,
|
|
24188
|
+
error,
|
|
24189
|
+
errorMessage,
|
|
24190
|
+
xIconShow,
|
|
24191
|
+
labelColor,
|
|
24192
|
+
showLabelOnTop
|
|
24193
|
+
}) => {
|
|
24195
24194
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
24196
24195
|
const [showOptions, setShowOptions] = React$1.useState(false);
|
|
24197
24196
|
const [inputValue, setInputValue] = React$1.useState("");
|
|
@@ -24648,26 +24647,25 @@ const IconContainer$2 = styled__default["default"].div`
|
|
|
24648
24647
|
cursor: pointer;
|
|
24649
24648
|
`;
|
|
24650
24649
|
|
|
24651
|
-
const QuickFilterDropdownMultiSelection =
|
|
24652
|
-
|
|
24653
|
-
|
|
24654
|
-
|
|
24655
|
-
|
|
24656
|
-
|
|
24657
|
-
|
|
24658
|
-
|
|
24659
|
-
|
|
24660
|
-
|
|
24661
|
-
|
|
24662
|
-
|
|
24663
|
-
|
|
24664
|
-
|
|
24665
|
-
|
|
24666
|
-
|
|
24667
|
-
|
|
24668
|
-
|
|
24669
|
-
|
|
24670
|
-
} = _ref;
|
|
24650
|
+
const QuickFilterDropdownMultiSelection = ({
|
|
24651
|
+
label,
|
|
24652
|
+
labelEmptyValue,
|
|
24653
|
+
options,
|
|
24654
|
+
selectedValue,
|
|
24655
|
+
placeHolder,
|
|
24656
|
+
onChange,
|
|
24657
|
+
required,
|
|
24658
|
+
disabled,
|
|
24659
|
+
width,
|
|
24660
|
+
height,
|
|
24661
|
+
error,
|
|
24662
|
+
errorMessage,
|
|
24663
|
+
labelColor,
|
|
24664
|
+
xIconShow,
|
|
24665
|
+
checkBoxColor,
|
|
24666
|
+
showLabelOnTop,
|
|
24667
|
+
dropdownHeight
|
|
24668
|
+
}) => {
|
|
24671
24669
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
24672
24670
|
const [showOptions, setShowOptions] = React$1.useState(false);
|
|
24673
24671
|
const [inputValue, setInputValue] = React$1.useState('');
|
|
@@ -34980,17 +34978,18 @@ styled.css`
|
|
|
34980
34978
|
* • onApply(start,end) — callback, both numbers (inclusive)
|
|
34981
34979
|
* • onCancel() — callback
|
|
34982
34980
|
*/
|
|
34983
|
-
const WeeksCalendar =
|
|
34984
|
-
|
|
34985
|
-
|
|
34986
|
-
|
|
34987
|
-
|
|
34988
|
-
|
|
34989
|
-
|
|
34990
|
-
|
|
34991
|
-
|
|
34992
|
-
|
|
34993
|
-
|
|
34981
|
+
const WeeksCalendar = _ref => {
|
|
34982
|
+
let {
|
|
34983
|
+
year,
|
|
34984
|
+
defaultStartWeek = null,
|
|
34985
|
+
defaultEndWeek = null,
|
|
34986
|
+
backgroundColor = "#066768",
|
|
34987
|
+
hoverBackgroundColor = "#E6F0F0",
|
|
34988
|
+
allowedWeekRange = null,
|
|
34989
|
+
// New prop for range restriction
|
|
34990
|
+
onApply,
|
|
34991
|
+
onCancel
|
|
34992
|
+
} = _ref;
|
|
34994
34993
|
// state -------------------------------------------------
|
|
34995
34994
|
const [startWeek, setStartWeek] = React$1.useState(defaultStartWeek);
|
|
34996
34995
|
const [endWeek, setEndWeek] = React$1.useState(defaultEndWeek);
|
|
@@ -36085,9 +36084,12 @@ const ToggleSwitchLabel = styled__default["default"].label`
|
|
|
36085
36084
|
position: relative;
|
|
36086
36085
|
cursor: pointer;
|
|
36087
36086
|
user-select: none;
|
|
36088
|
-
opacity: ${
|
|
36089
|
-
|
|
36090
|
-
|
|
36087
|
+
opacity: ${_ref => {
|
|
36088
|
+
let {
|
|
36089
|
+
disabled
|
|
36090
|
+
} = _ref;
|
|
36091
|
+
return disabled ? 0.5 : 1;
|
|
36092
|
+
}};
|
|
36091
36093
|
`;
|
|
36092
36094
|
const ToggleInput = styled__default["default"].input`
|
|
36093
36095
|
display: none;
|
|
@@ -36095,15 +36097,19 @@ const ToggleInput = styled__default["default"].input`
|
|
|
36095
36097
|
const ToggleSlider = styled__default["default"].span`
|
|
36096
36098
|
display: block;
|
|
36097
36099
|
position: relative;
|
|
36098
|
-
background: ${
|
|
36099
|
-
|
|
36100
|
-
|
|
36101
|
-
|
|
36100
|
+
background: ${_ref2 => {
|
|
36101
|
+
let {
|
|
36102
|
+
checked,
|
|
36103
|
+
disabled
|
|
36104
|
+
} = _ref2;
|
|
36105
|
+
return checked ? disabled ? "#7bb1b0" : "#006d6a" : "#cfd8dc";
|
|
36106
|
+
}};
|
|
36102
36107
|
border-radius: 999px;
|
|
36103
36108
|
transition: background 0.2s;
|
|
36104
|
-
${
|
|
36105
|
-
|
|
36106
|
-
|
|
36109
|
+
${_ref3 => {
|
|
36110
|
+
let {
|
|
36111
|
+
size
|
|
36112
|
+
} = _ref3;
|
|
36107
36113
|
switch (size) {
|
|
36108
36114
|
case "s":
|
|
36109
36115
|
return styled.css`width: 40px; height: 20px;`;
|
|
@@ -36122,9 +36128,10 @@ const ToggleSlider = styled__default["default"].span`
|
|
|
36122
36128
|
background: #fff;
|
|
36123
36129
|
border-radius: 50%;
|
|
36124
36130
|
transition: left 0.2s, width 0.2s, height 0.2s;
|
|
36125
|
-
${
|
|
36126
|
-
|
|
36127
|
-
|
|
36131
|
+
${_ref4 => {
|
|
36132
|
+
let {
|
|
36133
|
+
size
|
|
36134
|
+
} = _ref4;
|
|
36128
36135
|
switch (size) {
|
|
36129
36136
|
case "s":
|
|
36130
36137
|
return styled.css`width: 14px; height: 14px;`;
|
|
@@ -36134,10 +36141,11 @@ const ToggleSlider = styled__default["default"].span`
|
|
|
36134
36141
|
return styled.css`width: 20px; height: 20px;`;
|
|
36135
36142
|
}
|
|
36136
36143
|
}}
|
|
36137
|
-
left: ${
|
|
36138
|
-
|
|
36139
|
-
|
|
36140
|
-
|
|
36144
|
+
left: ${_ref5 => {
|
|
36145
|
+
let {
|
|
36146
|
+
checked,
|
|
36147
|
+
size
|
|
36148
|
+
} = _ref5;
|
|
36141
36149
|
if (!checked) return "3px";
|
|
36142
36150
|
switch (size) {
|
|
36143
36151
|
case "s":
|
|
@@ -36151,9 +36159,9 @@ const ToggleSlider = styled__default["default"].span`
|
|
|
36151
36159
|
}
|
|
36152
36160
|
`;
|
|
36153
36161
|
|
|
36154
|
-
/**
|
|
36155
|
-
* ToggleSwitch component for on/off states.
|
|
36156
|
-
* Supports small/large sizes and disabled state.
|
|
36162
|
+
/**
|
|
36163
|
+
* ToggleSwitch component for on/off states.
|
|
36164
|
+
* Supports small/large sizes and disabled state.
|
|
36157
36165
|
*/
|
|
36158
36166
|
function ToggleSwitch(_ref) {
|
|
36159
36167
|
let {
|
|
@@ -38765,6 +38773,7 @@ const TableHeader = ({
|
|
|
38765
38773
|
const showColumnFilter = column => {
|
|
38766
38774
|
const {
|
|
38767
38775
|
key,
|
|
38776
|
+
doubleColumn,
|
|
38768
38777
|
title,
|
|
38769
38778
|
filterOptions,
|
|
38770
38779
|
freeTextFilter,
|
|
@@ -38824,6 +38833,7 @@ const TableHeader = ({
|
|
|
38824
38833
|
color: "#066768",
|
|
38825
38834
|
isAsc: true,
|
|
38826
38835
|
list: filterOptions,
|
|
38836
|
+
doubleColumn: doubleColumn,
|
|
38827
38837
|
menuName: title,
|
|
38828
38838
|
selectedAttributes: filterSelections[key] || {},
|
|
38829
38839
|
onCheck: event => handleFilterSelectionChange(key, event),
|
|
@@ -40207,7 +40217,7 @@ const TableBody = /*#__PURE__*/React$1.forwardRef(({
|
|
|
40207
40217
|
|
|
40208
40218
|
// Handle shimmer effect changes
|
|
40209
40219
|
React$1.useEffect(() => {
|
|
40210
|
-
if (indexToShimmer >= 0
|
|
40220
|
+
if (indexToShimmer >= 0) {
|
|
40211
40221
|
setShimmerRowIndex(indexToShimmer);
|
|
40212
40222
|
setShimmerStartTime(Date.now());
|
|
40213
40223
|
|
|
@@ -40217,8 +40227,11 @@ const TableBody = /*#__PURE__*/React$1.forwardRef(({
|
|
|
40217
40227
|
setShimmerStartTime(null);
|
|
40218
40228
|
}, 5000);
|
|
40219
40229
|
return () => clearTimeout(timeout);
|
|
40230
|
+
} else if (indexToShimmer === -1) {
|
|
40231
|
+
setShimmerRowIndex(-1);
|
|
40232
|
+
setShimmerStartTime(null);
|
|
40220
40233
|
}
|
|
40221
|
-
}, [indexToShimmer
|
|
40234
|
+
}, [indexToShimmer]);
|
|
40222
40235
|
|
|
40223
40236
|
// Expose methods to parent component via ref
|
|
40224
40237
|
React$1.useImperativeHandle(ref, () => ({
|
|
@@ -40812,7 +40825,7 @@ const TableBody = /*#__PURE__*/React$1.forwardRef(({
|
|
|
40812
40825
|
key: row.id || `row-${rowIndex}`
|
|
40813
40826
|
}, /*#__PURE__*/React__default["default"].createElement(TableRow, {
|
|
40814
40827
|
"data-row-index": rowIndex,
|
|
40815
|
-
className:
|
|
40828
|
+
className: shimmerRowIndex === rowIndex ? "shimmer-row" : "",
|
|
40816
40829
|
isFocused: focusedRowIndex === rowIndex,
|
|
40817
40830
|
selectedColor: selectedColor,
|
|
40818
40831
|
onMouseEnter: () => setHoveredRowIndex(rowIndex),
|
|
@@ -45544,7 +45557,8 @@ const NewSubitem = ({
|
|
|
45544
45557
|
onBack,
|
|
45545
45558
|
addNewPackage,
|
|
45546
45559
|
updateExistingPackage,
|
|
45547
|
-
componentText = "Scale"
|
|
45560
|
+
componentText = "Scale",
|
|
45561
|
+
itemAndPackage
|
|
45548
45562
|
}) => {
|
|
45549
45563
|
const [negotiatedBrands, setNegotiatedBrands] = React$1.useState("");
|
|
45550
45564
|
const [negotiatedComponent, setNegotiatedComponent] = React$1.useState(componentText);
|
|
@@ -45559,7 +45573,9 @@ const NewSubitem = ({
|
|
|
45559
45573
|
}, [packageObject]);
|
|
45560
45574
|
React$1.useEffect(() => {
|
|
45561
45575
|
if (packageObject && packageObject.brands === negotiatedBrands) return;
|
|
45562
|
-
setIsPackageDuplicated(
|
|
45576
|
+
setIsPackageDuplicated(itemAndPackage.some(obj => {
|
|
45577
|
+
obj.name === vendor && obj.packages.some(pkg => pkg.brands === negotiatedBrands);
|
|
45578
|
+
}));
|
|
45563
45579
|
setIsApplyEnabled(negotiatedBrands.trim().length > 2 && vendor.packages.some(pkg => pkg.brands === negotiatedBrands) === false);
|
|
45564
45580
|
}, [negotiatedBrands]);
|
|
45565
45581
|
return /*#__PURE__*/React__default["default"].createElement(NewSubitemContainer, null, /*#__PURE__*/React__default["default"].createElement(Header, null, /*#__PURE__*/React__default["default"].createElement(BackButton, {
|