sag_components 2.0.0-beta143 → 2.0.0-beta144
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 +81 -127
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +81 -127
- package/dist/index.js.map +1 -1
- package/dist/types/components/Table/TableBody.d.ts +3 -6
- package/dist/types/components/Table/TableBody.styles.d.ts +0 -2
- package/dist/types/components/Table/data.d.ts +16 -3
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -10317,24 +10317,23 @@ const QuarterPopupPicker = ({
|
|
|
10317
10317
|
};
|
|
10318
10318
|
|
|
10319
10319
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
10320
|
-
const QuarterPicker =
|
|
10321
|
-
|
|
10322
|
-
|
|
10323
|
-
|
|
10324
|
-
|
|
10325
|
-
|
|
10326
|
-
|
|
10327
|
-
|
|
10328
|
-
|
|
10329
|
-
|
|
10330
|
-
|
|
10331
|
-
|
|
10332
|
-
|
|
10333
|
-
|
|
10334
|
-
|
|
10335
|
-
|
|
10336
|
-
|
|
10337
|
-
} = _ref;
|
|
10320
|
+
const QuarterPicker = ({
|
|
10321
|
+
availableQuarters,
|
|
10322
|
+
// ["Q1-2024"]
|
|
10323
|
+
label,
|
|
10324
|
+
onChange,
|
|
10325
|
+
borderRadius,
|
|
10326
|
+
required,
|
|
10327
|
+
width,
|
|
10328
|
+
height,
|
|
10329
|
+
placeholder,
|
|
10330
|
+
disabled,
|
|
10331
|
+
borderColor,
|
|
10332
|
+
borderColorFocus,
|
|
10333
|
+
textColor,
|
|
10334
|
+
selectedValue,
|
|
10335
|
+
startYear
|
|
10336
|
+
}) => {
|
|
10338
10337
|
const [isFocused, setIsFocused] = useState(false);
|
|
10339
10338
|
const [isOpen, setIsOpen] = useState(false);
|
|
10340
10339
|
const [value, setValue] = useState('');
|
|
@@ -10776,23 +10775,22 @@ const MonthPopupPicker = ({
|
|
|
10776
10775
|
};
|
|
10777
10776
|
|
|
10778
10777
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
10779
|
-
const MonthPicker =
|
|
10780
|
-
|
|
10781
|
-
|
|
10782
|
-
|
|
10783
|
-
|
|
10784
|
-
|
|
10785
|
-
|
|
10786
|
-
|
|
10787
|
-
|
|
10788
|
-
|
|
10789
|
-
|
|
10790
|
-
|
|
10791
|
-
|
|
10792
|
-
|
|
10793
|
-
|
|
10794
|
-
|
|
10795
|
-
} = _ref;
|
|
10778
|
+
const MonthPicker = ({
|
|
10779
|
+
availableMonths,
|
|
10780
|
+
label,
|
|
10781
|
+
onChange,
|
|
10782
|
+
borderRadius,
|
|
10783
|
+
required,
|
|
10784
|
+
width,
|
|
10785
|
+
height,
|
|
10786
|
+
placeholder,
|
|
10787
|
+
disabled,
|
|
10788
|
+
borderColor,
|
|
10789
|
+
borderColorFocus,
|
|
10790
|
+
textColor,
|
|
10791
|
+
selectedValue,
|
|
10792
|
+
startYear
|
|
10793
|
+
}) => {
|
|
10796
10794
|
const [isFocused, setIsFocused] = useState(false);
|
|
10797
10795
|
const [isOpen, setIsOpen] = useState(false);
|
|
10798
10796
|
const [value, setValue] = useState('');
|
|
@@ -23903,22 +23901,21 @@ const DeleteIcon = styled.div`
|
|
|
23903
23901
|
position: absolute;
|
|
23904
23902
|
`;
|
|
23905
23903
|
|
|
23906
|
-
const QuickFilterDropdownSingle =
|
|
23907
|
-
|
|
23908
|
-
|
|
23909
|
-
|
|
23910
|
-
|
|
23911
|
-
|
|
23912
|
-
|
|
23913
|
-
|
|
23914
|
-
|
|
23915
|
-
|
|
23916
|
-
|
|
23917
|
-
|
|
23918
|
-
|
|
23919
|
-
|
|
23920
|
-
|
|
23921
|
-
} = _ref;
|
|
23904
|
+
const QuickFilterDropdownSingle = ({
|
|
23905
|
+
label,
|
|
23906
|
+
hoverColor,
|
|
23907
|
+
options,
|
|
23908
|
+
selectedValue,
|
|
23909
|
+
placeHolder,
|
|
23910
|
+
onChange,
|
|
23911
|
+
disabled,
|
|
23912
|
+
width,
|
|
23913
|
+
error,
|
|
23914
|
+
errorMessage,
|
|
23915
|
+
xIconShow,
|
|
23916
|
+
labelColor,
|
|
23917
|
+
showLabelOnTop
|
|
23918
|
+
}) => {
|
|
23922
23919
|
const [isFocused, setIsFocused] = useState(false);
|
|
23923
23920
|
const [showOptions, setShowOptions] = useState(false);
|
|
23924
23921
|
const [inputValue, setInputValue] = useState("");
|
|
@@ -24315,24 +24312,23 @@ const IconContainer$2 = styled.div`
|
|
|
24315
24312
|
cursor: pointer;
|
|
24316
24313
|
`;
|
|
24317
24314
|
|
|
24318
|
-
const QuickFilterDropdownMultiSelection =
|
|
24319
|
-
|
|
24320
|
-
|
|
24321
|
-
|
|
24322
|
-
|
|
24323
|
-
|
|
24324
|
-
|
|
24325
|
-
|
|
24326
|
-
|
|
24327
|
-
|
|
24328
|
-
|
|
24329
|
-
|
|
24330
|
-
|
|
24331
|
-
|
|
24332
|
-
|
|
24333
|
-
|
|
24334
|
-
|
|
24335
|
-
} = _ref;
|
|
24315
|
+
const QuickFilterDropdownMultiSelection = ({
|
|
24316
|
+
label,
|
|
24317
|
+
labelEmptyValue,
|
|
24318
|
+
options,
|
|
24319
|
+
selectedValue,
|
|
24320
|
+
placeHolder,
|
|
24321
|
+
onChange,
|
|
24322
|
+
required,
|
|
24323
|
+
disabled,
|
|
24324
|
+
width,
|
|
24325
|
+
error,
|
|
24326
|
+
errorMessage,
|
|
24327
|
+
labelColor,
|
|
24328
|
+
xIconShow,
|
|
24329
|
+
checkBoxColor,
|
|
24330
|
+
showLabelOnTop
|
|
24331
|
+
}) => {
|
|
24336
24332
|
const [isFocused, setIsFocused] = useState(false);
|
|
24337
24333
|
const [showOptions, setShowOptions] = useState(false);
|
|
24338
24334
|
const [inputValue, setInputValue] = useState('');
|
|
@@ -35564,9 +35560,9 @@ const ToggleSlider = styled.span`
|
|
|
35564
35560
|
}
|
|
35565
35561
|
`;
|
|
35566
35562
|
|
|
35567
|
-
/**
|
|
35568
|
-
* ToggleSwitch component for on/off states.
|
|
35569
|
-
* Supports small/large sizes and disabled state.
|
|
35563
|
+
/**
|
|
35564
|
+
* ToggleSwitch component for on/off states.
|
|
35565
|
+
* Supports small/large sizes and disabled state.
|
|
35570
35566
|
*/
|
|
35571
35567
|
function ToggleSwitch(_ref) {
|
|
35572
35568
|
let {
|
|
@@ -38307,21 +38303,6 @@ const DisabledTrashIconWrapper = styled.div`
|
|
|
38307
38303
|
color: #d9d9d9;
|
|
38308
38304
|
}
|
|
38309
38305
|
`;
|
|
38310
|
-
const StatusCell = styled.div`
|
|
38311
|
-
font-size: 12px;
|
|
38312
|
-
font-weight: 500;
|
|
38313
|
-
display: flex;
|
|
38314
|
-
align-items: center;
|
|
38315
|
-
gap: 6px;
|
|
38316
|
-
color: ${props => props.color || "#000"};
|
|
38317
|
-
`;
|
|
38318
|
-
const StatusCellCircle = styled.div`
|
|
38319
|
-
width: 8px;
|
|
38320
|
-
height: 8px;
|
|
38321
|
-
border-radius: 50%;
|
|
38322
|
-
border: 1px solid white;
|
|
38323
|
-
background-color: ${props => props.backgroundColor};
|
|
38324
|
-
`;
|
|
38325
38306
|
|
|
38326
38307
|
// CommentModal.styles.js
|
|
38327
38308
|
const ModalOverlay$1 = styled.div`
|
|
@@ -38692,22 +38673,10 @@ const TableBody = ({
|
|
|
38692
38673
|
buttonColor,
|
|
38693
38674
|
onDeleteClick,
|
|
38694
38675
|
selectedColor,
|
|
38695
|
-
|
|
38676
|
+
resetFocusIndex,
|
|
38677
|
+
changeFocusIndex,
|
|
38696
38678
|
onFocusChange,
|
|
38697
38679
|
indexToShimmer = 0,
|
|
38698
|
-
statuses = [{
|
|
38699
|
-
status: 'Pending',
|
|
38700
|
-
palette: ['#F5C9A7', '#8B4513']
|
|
38701
|
-
}, {
|
|
38702
|
-
status: 'Received',
|
|
38703
|
-
palette: ['#B9D5D5', '#2F4F4F']
|
|
38704
|
-
}, {
|
|
38705
|
-
status: 'Approved',
|
|
38706
|
-
palette: ['#BEDDC3', '#2D5016']
|
|
38707
|
-
}, {
|
|
38708
|
-
status: 'Cancelled',
|
|
38709
|
-
palette: ['#EBA6AF', '#8B1538']
|
|
38710
|
-
}],
|
|
38711
38680
|
onCommentSave = () => {},
|
|
38712
38681
|
ref = null
|
|
38713
38682
|
}) => {
|
|
@@ -38716,24 +38685,16 @@ const TableBody = ({
|
|
|
38716
38685
|
const [isCommentModalOpen, setIsCommentModalOpen] = useState(false);
|
|
38717
38686
|
const [currentCommentRow, setCurrentCommentRow] = useState(null); // Track which row is being edited
|
|
38718
38687
|
|
|
38719
|
-
// Expose methods to parent components via ref (if ref is provided)
|
|
38720
|
-
// useImperativeHandle(ref, () => ({
|
|
38721
|
-
// clearFocus: () => setFocusedRowIndex(null),
|
|
38722
|
-
// getFocusedRowIndex: () => focusedRowIndex
|
|
38723
|
-
// }), [focusedRowIndex]);
|
|
38724
|
-
|
|
38725
38688
|
useEffect(() => {
|
|
38726
|
-
if (
|
|
38689
|
+
if (resetFocusIndex) {
|
|
38727
38690
|
setFocusedRowIndex(null);
|
|
38728
38691
|
}
|
|
38729
|
-
}, [
|
|
38730
|
-
|
|
38731
|
-
|
|
38732
|
-
|
|
38733
|
-
|
|
38734
|
-
|
|
38735
|
-
// }
|
|
38736
|
-
// }, [focusedRowIndex, onFocusChange]);
|
|
38692
|
+
}, [resetFocusIndex]);
|
|
38693
|
+
useEffect(() => {
|
|
38694
|
+
if (changeFocusIndex) {
|
|
38695
|
+
setFocusedRowIndex(changeFocusIndex);
|
|
38696
|
+
}
|
|
38697
|
+
}, [changeFocusIndex]);
|
|
38737
38698
|
|
|
38738
38699
|
// Handle row click for focus state
|
|
38739
38700
|
const handleRowClick = (row, rowIndex) => {
|
|
@@ -38893,14 +38854,6 @@ const TableBody = ({
|
|
|
38893
38854
|
}), /*#__PURE__*/React$1.createElement("span", null, "All Sent"));
|
|
38894
38855
|
}
|
|
38895
38856
|
return value;
|
|
38896
|
-
case 'status':
|
|
38897
|
-
const statusObj = statuses.find(status => status.status === value) || {};
|
|
38898
|
-
const [palette0, palette1] = statusObj.palette;
|
|
38899
|
-
return /*#__PURE__*/React$1.createElement(StatusCell, {
|
|
38900
|
-
color: palette1
|
|
38901
|
-
}, /*#__PURE__*/React$1.createElement(StatusCellCircle, {
|
|
38902
|
-
backgroundColor: palette0
|
|
38903
|
-
}), /*#__PURE__*/React$1.createElement("span", null, value));
|
|
38904
38857
|
case 'comments':
|
|
38905
38858
|
const commentText = value || '';
|
|
38906
38859
|
const hasComments = commentText.trim().length > 0;
|
|
@@ -42264,8 +42217,8 @@ const Table = props => {
|
|
|
42264
42217
|
noDataInSearchTitle = "No Results Found",
|
|
42265
42218
|
noDataInSearchMessage = "Try to refine your query and search again",
|
|
42266
42219
|
indexToShimmer = -1,
|
|
42267
|
-
|
|
42268
|
-
|
|
42220
|
+
resetFocusIndex,
|
|
42221
|
+
changeFocusIndex,
|
|
42269
42222
|
onTableFocusChange = () => {},
|
|
42270
42223
|
clearFocusOnOutsideClick = true,
|
|
42271
42224
|
// NEW: Props for edit mode focus management
|
|
@@ -42385,7 +42338,8 @@ const Table = props => {
|
|
|
42385
42338
|
onDeleteClick: onDeleteClick,
|
|
42386
42339
|
onCommentSave: handleCommentSave,
|
|
42387
42340
|
buttonColor: buttonColor,
|
|
42388
|
-
|
|
42341
|
+
resetFocusIndex: resetFocusIndex,
|
|
42342
|
+
changeFocusIndex: changeFocusIndex,
|
|
42389
42343
|
onFocusChange: handleTableFocusChange
|
|
42390
42344
|
})), data.length === 0 && /*#__PURE__*/React$1.createElement(NoEventsParent, null, /*#__PURE__*/React$1.createElement(NoEventsWrapper, null, showNoDataInSearch ? /*#__PURE__*/React$1.createElement(NoDataInSearchIcon, null) : /*#__PURE__*/React$1.createElement(NoEvents, null)), /*#__PURE__*/React$1.createElement(NoEventsMessage, null, showNoDataInSearch ? /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("strong", null, noDataInSearchTitle), /*#__PURE__*/React$1.createElement("br", null), noDataInSearchMessage) : /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("strong", null, "You haven't created any events yet"), /*#__PURE__*/React$1.createElement("br", null), "Let's get started and create your first one!")), !showNoDataInSearch && /*#__PURE__*/React$1.createElement(Button$1, {
|
|
42391
42345
|
height: "45px",
|