sag_components 2.0.0-beta333 → 2.0.0-beta335
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.d.ts +9 -1
- package/dist/index.esm.js +399 -111
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +399 -111
- package/dist/index.js.map +1 -1
- package/dist/types/components/RangePicker/RangeDatePicker.d.ts +2 -1
- package/dist/types/components/RangePicker/RangePicker.d.ts +9 -1
- package/dist/types/components/RangePicker/RangePicker.stories.d.ts +22 -0
- package/dist/types/components/Table/Table.stories.d.ts +198 -142
- package/dist/types/components/Table/Table.style.d.ts +1 -0
- package/dist/types/components/Table/TableBody.styles.d.ts +3 -0
- package/dist/types/components/Table/data.d.ts +9 -0
- package/dist/types/icons/CalendarIcon.d.ts +3 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -634,6 +634,26 @@ const ChervronLeftIcon = _ref => {
|
|
|
634
634
|
}));
|
|
635
635
|
};
|
|
636
636
|
|
|
637
|
+
const CalendarIcon = _ref => {
|
|
638
|
+
let {
|
|
639
|
+
clicked,
|
|
640
|
+
width = "14",
|
|
641
|
+
height = "14",
|
|
642
|
+
fill = "#212121",
|
|
643
|
+
color
|
|
644
|
+
} = _ref;
|
|
645
|
+
return /*#__PURE__*/React$1.createElement("svg", {
|
|
646
|
+
width: width,
|
|
647
|
+
height: height,
|
|
648
|
+
viewBox: "0 0 11 12",
|
|
649
|
+
fill: "none",
|
|
650
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
651
|
+
}, /*#__PURE__*/React$1.createElement("path", {
|
|
652
|
+
d: "M2.625 0C2.8125 0 3 0.1875 3 0.375V1.5H7.5V0.375C7.5 0.1875 7.66406 0 7.875 0C8.0625 0 8.25 0.1875 8.25 0.375V1.5H9C9.82031 1.5 10.5 2.17969 10.5 3V3.75V4.5V10.5C10.5 11.3438 9.82031 12 9 12H1.5C0.65625 12 0 11.3438 0 10.5V4.5V3.75V3C0 2.17969 0.65625 1.5 1.5 1.5H2.25V0.375C2.25 0.1875 2.41406 0 2.625 0ZM9.75 4.5H7.3125V6.1875H9.75V4.5ZM9.75 6.9375H7.3125V8.8125H9.75V6.9375ZM9.75 9.5625H7.3125V11.25H9C9.39844 11.25 9.75 10.9219 9.75 10.5V9.5625ZM6.5625 8.8125V6.9375H3.9375V8.8125H6.5625ZM3.9375 9.5625V11.25H6.5625V9.5625H3.9375ZM3.1875 8.8125V6.9375H0.75V8.8125H3.1875ZM0.75 9.5625V10.5C0.75 10.9219 1.07812 11.25 1.5 11.25H3.1875V9.5625H0.75ZM0.75 6.1875H3.1875V4.5H0.75V6.1875ZM3.9375 6.1875H6.5625V4.5H3.9375V6.1875ZM9 2.25H1.5C1.07812 2.25 0.75 2.60156 0.75 3V3.75H9.75V3C9.75 2.60156 9.39844 2.25 9 2.25Z",
|
|
653
|
+
fill: color || fill
|
|
654
|
+
}));
|
|
655
|
+
};
|
|
656
|
+
|
|
637
657
|
const Button$1 = props => {
|
|
638
658
|
const {
|
|
639
659
|
text = "",
|
|
@@ -680,14 +700,15 @@ const Button$1 = props => {
|
|
|
680
700
|
plus: Plus,
|
|
681
701
|
left: ChervronLeftIcon,
|
|
682
702
|
right: ChervronRightIcon,
|
|
683
|
-
vicon: VIcon
|
|
703
|
+
vicon: VIcon,
|
|
704
|
+
calendar: CalendarIcon
|
|
684
705
|
};
|
|
685
706
|
const getIcon = icon => {
|
|
686
707
|
if (!icon || icon === "none") return null;
|
|
687
708
|
const IconComponent = iconMap[icon.toLowerCase()];
|
|
688
709
|
const iconProps = {
|
|
689
|
-
height: "16px",
|
|
690
|
-
width: "16px",
|
|
710
|
+
height: icon.toLowerCase() === "calendar" ? "14" : "16px",
|
|
711
|
+
width: icon.toLowerCase() === "calendar" ? "14" : "16px",
|
|
691
712
|
color: disabled ? disabledTextColor || "#B1B1B1" : hover ? hoverTextColor || (type === "secondary" ? "#229E38" : "#ffffff") : textColor || (type === "secondary" ? "#212121" : "#ffffff"),
|
|
692
713
|
fill: disabled ? disabledTextColor || "#B1B1B1" : hover ? hoverTextColor || (type === "secondary" ? "#229E38" : "#ffffff") : textColor || (type === "secondary" ? "#212121" : "#ffffff")
|
|
693
714
|
};
|
|
@@ -10182,7 +10203,8 @@ const DatePicker = ({
|
|
|
10182
10203
|
selectedColor,
|
|
10183
10204
|
hoverColor,
|
|
10184
10205
|
inRangeColor,
|
|
10185
|
-
clearButtonColor
|
|
10206
|
+
clearButtonColor,
|
|
10207
|
+
showClearButton
|
|
10186
10208
|
}) => {
|
|
10187
10209
|
const [startDate, setStartDate] = useState(null);
|
|
10188
10210
|
const [endDate, setEndDate] = useState(null);
|
|
@@ -10293,7 +10315,7 @@ const DatePicker = ({
|
|
|
10293
10315
|
return /*#__PURE__*/React$1.createElement(DateCell$2, {
|
|
10294
10316
|
key: date.toISOString()
|
|
10295
10317
|
});
|
|
10296
|
-
})), /*#__PURE__*/React$1.createElement(DatePickerFooter, null, /*#__PURE__*/React$1.createElement(ClearButton$1, {
|
|
10318
|
+
})), /*#__PURE__*/React$1.createElement(DatePickerFooter, null, showClearButton && /*#__PURE__*/React$1.createElement(ClearButton$1, {
|
|
10297
10319
|
clearButtonColor: clearButtonColor,
|
|
10298
10320
|
onClick: clearSelection
|
|
10299
10321
|
}, "Clear")));
|
|
@@ -10322,7 +10344,9 @@ const RangePicker = _ref => {
|
|
|
10322
10344
|
hoverColor,
|
|
10323
10345
|
inRangeColor,
|
|
10324
10346
|
clearButtonColor,
|
|
10325
|
-
calendarIconColor
|
|
10347
|
+
calendarIconColor,
|
|
10348
|
+
showClearButton,
|
|
10349
|
+
showOpenIcon
|
|
10326
10350
|
} = _ref;
|
|
10327
10351
|
const [isFocused, setIsFocused] = useState(false);
|
|
10328
10352
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -10437,7 +10461,7 @@ const RangePicker = _ref => {
|
|
|
10437
10461
|
}), /*#__PURE__*/React$1.createElement(CalendarDiv$3, {
|
|
10438
10462
|
className: "CalendarDiv",
|
|
10439
10463
|
onClick: toggleDatePicker
|
|
10440
|
-
}, isOpen
|
|
10464
|
+
}, isOpen && showOpenIcon ? /*#__PURE__*/React$1.createElement(CalendarInOpen, {
|
|
10441
10465
|
className: "CalendarInOpen",
|
|
10442
10466
|
fill: calendarIconColor
|
|
10443
10467
|
}) : /*#__PURE__*/React$1.createElement(Calendar, {
|
|
@@ -10458,7 +10482,8 @@ const RangePicker = _ref => {
|
|
|
10458
10482
|
selectedColor: selectedColor,
|
|
10459
10483
|
hoverColor: hoverColor,
|
|
10460
10484
|
inRangeColor: inRangeColor,
|
|
10461
|
-
clearButtonColor: clearButtonColor
|
|
10485
|
+
clearButtonColor: clearButtonColor,
|
|
10486
|
+
showClearButton: showClearButton
|
|
10462
10487
|
})));
|
|
10463
10488
|
};
|
|
10464
10489
|
RangePicker.propTypes = {
|
|
@@ -10480,7 +10505,9 @@ RangePicker.propTypes = {
|
|
|
10480
10505
|
hoverColor: PropTypes.string,
|
|
10481
10506
|
inRangeColor: PropTypes.string,
|
|
10482
10507
|
clearButtonColor: PropTypes.string,
|
|
10483
|
-
calendarIconColor: PropTypes.string
|
|
10508
|
+
calendarIconColor: PropTypes.string,
|
|
10509
|
+
showClearButton: PropTypes.bool,
|
|
10510
|
+
showOpenIcon: PropTypes.bool
|
|
10484
10511
|
};
|
|
10485
10512
|
|
|
10486
10513
|
// Adding defaultProps
|
|
@@ -10500,7 +10527,9 @@ RangePicker.defaultProps = {
|
|
|
10500
10527
|
hoverColor: '#f4faf5',
|
|
10501
10528
|
inRangeColor: '#effef2',
|
|
10502
10529
|
clearButtonColor: '#568202',
|
|
10503
|
-
calendarIconColor: '#568202'
|
|
10530
|
+
calendarIconColor: '#568202',
|
|
10531
|
+
showClearButton: true,
|
|
10532
|
+
showOpenIcon: true
|
|
10504
10533
|
};
|
|
10505
10534
|
|
|
10506
10535
|
/* eslint-disable no-nested-ternary */
|
|
@@ -10763,23 +10792,24 @@ const QuarterPopupPicker = ({
|
|
|
10763
10792
|
};
|
|
10764
10793
|
|
|
10765
10794
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
10766
|
-
const QuarterPicker =
|
|
10767
|
-
|
|
10768
|
-
|
|
10769
|
-
|
|
10770
|
-
|
|
10771
|
-
|
|
10772
|
-
|
|
10773
|
-
|
|
10774
|
-
|
|
10775
|
-
|
|
10776
|
-
|
|
10777
|
-
|
|
10778
|
-
|
|
10779
|
-
|
|
10780
|
-
|
|
10781
|
-
|
|
10782
|
-
|
|
10795
|
+
const QuarterPicker = _ref => {
|
|
10796
|
+
let {
|
|
10797
|
+
availableQuarters,
|
|
10798
|
+
// ["Q1-2024"]
|
|
10799
|
+
label,
|
|
10800
|
+
onChange,
|
|
10801
|
+
borderRadius,
|
|
10802
|
+
required,
|
|
10803
|
+
width,
|
|
10804
|
+
height,
|
|
10805
|
+
placeholder,
|
|
10806
|
+
disabled,
|
|
10807
|
+
borderColor,
|
|
10808
|
+
borderColorFocus,
|
|
10809
|
+
textColor,
|
|
10810
|
+
selectedValue,
|
|
10811
|
+
startYear
|
|
10812
|
+
} = _ref;
|
|
10783
10813
|
const [isFocused, setIsFocused] = useState(false);
|
|
10784
10814
|
const [isOpen, setIsOpen] = useState(false);
|
|
10785
10815
|
const [value, setValue] = useState('');
|
|
@@ -11221,22 +11251,23 @@ const MonthPopupPicker = ({
|
|
|
11221
11251
|
};
|
|
11222
11252
|
|
|
11223
11253
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
11224
|
-
const MonthPicker =
|
|
11225
|
-
|
|
11226
|
-
|
|
11227
|
-
|
|
11228
|
-
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
|
|
11232
|
-
|
|
11233
|
-
|
|
11234
|
-
|
|
11235
|
-
|
|
11236
|
-
|
|
11237
|
-
|
|
11238
|
-
|
|
11239
|
-
|
|
11254
|
+
const MonthPicker = _ref => {
|
|
11255
|
+
let {
|
|
11256
|
+
availableMonths,
|
|
11257
|
+
label,
|
|
11258
|
+
onChange,
|
|
11259
|
+
borderRadius,
|
|
11260
|
+
required,
|
|
11261
|
+
width,
|
|
11262
|
+
height,
|
|
11263
|
+
placeholder,
|
|
11264
|
+
disabled,
|
|
11265
|
+
borderColor,
|
|
11266
|
+
borderColorFocus,
|
|
11267
|
+
textColor,
|
|
11268
|
+
selectedValue,
|
|
11269
|
+
startYear
|
|
11270
|
+
} = _ref;
|
|
11240
11271
|
const [isFocused, setIsFocused] = useState(false);
|
|
11241
11272
|
const [isOpen, setIsOpen] = useState(false);
|
|
11242
11273
|
const [value, setValue] = useState('');
|
|
@@ -24355,23 +24386,24 @@ const DeleteIcon = styled.div`
|
|
|
24355
24386
|
position: absolute;
|
|
24356
24387
|
`;
|
|
24357
24388
|
|
|
24358
|
-
const QuickFilterDropdownSingle =
|
|
24359
|
-
|
|
24360
|
-
|
|
24361
|
-
|
|
24362
|
-
|
|
24363
|
-
|
|
24364
|
-
|
|
24365
|
-
|
|
24366
|
-
|
|
24367
|
-
|
|
24368
|
-
|
|
24369
|
-
|
|
24370
|
-
|
|
24371
|
-
|
|
24372
|
-
|
|
24373
|
-
|
|
24374
|
-
|
|
24389
|
+
const QuickFilterDropdownSingle = _ref => {
|
|
24390
|
+
let {
|
|
24391
|
+
label,
|
|
24392
|
+
hoverColor,
|
|
24393
|
+
options,
|
|
24394
|
+
selectedValue,
|
|
24395
|
+
placeHolder,
|
|
24396
|
+
optionHoverColor = '#edf6ff',
|
|
24397
|
+
selectedOptionColor = "#C7E4FF",
|
|
24398
|
+
onChange,
|
|
24399
|
+
disabled,
|
|
24400
|
+
width,
|
|
24401
|
+
error,
|
|
24402
|
+
errorMessage,
|
|
24403
|
+
xIconShow,
|
|
24404
|
+
labelColor,
|
|
24405
|
+
showLabelOnTop
|
|
24406
|
+
} = _ref;
|
|
24375
24407
|
const [isFocused, setIsFocused] = useState(false);
|
|
24376
24408
|
const [showOptions, setShowOptions] = useState(false);
|
|
24377
24409
|
const [inputValue, setInputValue] = useState("");
|
|
@@ -24829,26 +24861,27 @@ const IconContainer$2 = styled.div`
|
|
|
24829
24861
|
cursor: pointer;
|
|
24830
24862
|
`;
|
|
24831
24863
|
|
|
24832
|
-
const QuickFilterDropdownMultiSelection =
|
|
24833
|
-
|
|
24834
|
-
|
|
24835
|
-
|
|
24836
|
-
|
|
24837
|
-
|
|
24838
|
-
|
|
24839
|
-
|
|
24840
|
-
|
|
24841
|
-
|
|
24842
|
-
|
|
24843
|
-
|
|
24844
|
-
|
|
24845
|
-
|
|
24846
|
-
|
|
24847
|
-
|
|
24848
|
-
|
|
24849
|
-
|
|
24850
|
-
|
|
24851
|
-
|
|
24864
|
+
const QuickFilterDropdownMultiSelection = _ref => {
|
|
24865
|
+
let {
|
|
24866
|
+
label,
|
|
24867
|
+
labelEmptyValue,
|
|
24868
|
+
options,
|
|
24869
|
+
selectedValue,
|
|
24870
|
+
placeHolder,
|
|
24871
|
+
onChange,
|
|
24872
|
+
required,
|
|
24873
|
+
disabled,
|
|
24874
|
+
width,
|
|
24875
|
+
height,
|
|
24876
|
+
error,
|
|
24877
|
+
errorMessage,
|
|
24878
|
+
labelColor,
|
|
24879
|
+
optionHoverColor = '#edf6ff',
|
|
24880
|
+
xIconShow,
|
|
24881
|
+
checkBoxColor,
|
|
24882
|
+
showLabelOnTop,
|
|
24883
|
+
dropdownHeight
|
|
24884
|
+
} = _ref;
|
|
24852
24885
|
const [isFocused, setIsFocused] = useState(false);
|
|
24853
24886
|
const [showOptions, setShowOptions] = useState(false);
|
|
24854
24887
|
const [inputValue, setInputValue] = useState('');
|
|
@@ -36399,9 +36432,9 @@ const ToggleSlider = styled.span`
|
|
|
36399
36432
|
}
|
|
36400
36433
|
`;
|
|
36401
36434
|
|
|
36402
|
-
/**
|
|
36403
|
-
* ToggleSwitch component for on/off states.
|
|
36404
|
-
* Supports small/large sizes and disabled state.
|
|
36435
|
+
/**
|
|
36436
|
+
* ToggleSwitch component for on/off states.
|
|
36437
|
+
* Supports small/large sizes and disabled state.
|
|
36405
36438
|
*/
|
|
36406
36439
|
function ToggleSwitch(_ref) {
|
|
36407
36440
|
let {
|
|
@@ -37347,6 +37380,16 @@ const Loader = styled.span`
|
|
|
37347
37380
|
animation: ${rotation} 1.5s infinite ease;
|
|
37348
37381
|
transform: translateZ(0);
|
|
37349
37382
|
`;
|
|
37383
|
+
const DirtyFieldsCounter = styled.div`
|
|
37384
|
+
font-family: 'Poppins', sans-serif;
|
|
37385
|
+
font-size: 14px;
|
|
37386
|
+
font-weight: 500;
|
|
37387
|
+
color: ${({
|
|
37388
|
+
$dirty
|
|
37389
|
+
}) => $dirty ? '#EF4444' : '#1f7677'};
|
|
37390
|
+
padding: 6px 16px;
|
|
37391
|
+
text-align: left;
|
|
37392
|
+
`;
|
|
37350
37393
|
const LoaderWrapper = styled.div`
|
|
37351
37394
|
position: absolute;
|
|
37352
37395
|
top: 50%;
|
|
@@ -41677,7 +41720,12 @@ const TableHeader = ({
|
|
|
41677
41720
|
style: {
|
|
41678
41721
|
accentColor: '#066768'
|
|
41679
41722
|
}
|
|
41680
|
-
}), column.title && /*#__PURE__*/React$1.createElement(ColumnLabel, null, column.title
|
|
41723
|
+
}), column.title && /*#__PURE__*/React$1.createElement(ColumnLabel, null, column.title, column.required && /*#__PURE__*/React$1.createElement("span", {
|
|
41724
|
+
style: {
|
|
41725
|
+
color: '#EF4444',
|
|
41726
|
+
marginLeft: '5px'
|
|
41727
|
+
}
|
|
41728
|
+
}, "*")), (column.filter || column.sort) && /*#__PURE__*/React$1.createElement(ColumnActions, null, column.sort && /*#__PURE__*/React$1.createElement(IconButton, {
|
|
41681
41729
|
ref: el => iconRefs.current[`sort-${column.key}`] = el,
|
|
41682
41730
|
onClick: () => handleSort(column.key),
|
|
41683
41731
|
onMouseEnter: () => setFocusedSort(column.key),
|
|
@@ -41892,6 +41940,10 @@ const TableCell = styled.td`
|
|
|
41892
41940
|
position: relative;
|
|
41893
41941
|
`}
|
|
41894
41942
|
|
|
41943
|
+
${props => props.$editable && `
|
|
41944
|
+
overflow: visible;
|
|
41945
|
+
`}
|
|
41946
|
+
|
|
41895
41947
|
/* CSS-only tooltip */
|
|
41896
41948
|
&[data-tooltip]:hover::before {
|
|
41897
41949
|
content: attr(data-tooltip);
|
|
@@ -41945,6 +41997,31 @@ const TableCell = styled.td`
|
|
|
41945
41997
|
}
|
|
41946
41998
|
}
|
|
41947
41999
|
|
|
42000
|
+
input {
|
|
42001
|
+
display: block;
|
|
42002
|
+
}
|
|
42003
|
+
|
|
42004
|
+
input[type="number"]::-webkit-inner-spin-button,
|
|
42005
|
+
input[type="number"]::-webkit-outer-spin-button {
|
|
42006
|
+
-webkit-appearance: none;
|
|
42007
|
+
margin: 0;
|
|
42008
|
+
}
|
|
42009
|
+
|
|
42010
|
+
input[type="number"] {
|
|
42011
|
+
-moz-appearance: textfield;
|
|
42012
|
+
}
|
|
42013
|
+
|
|
42014
|
+
input:hover:not(:focus) {
|
|
42015
|
+
border: 1px solid rgba(0, 0, 0, 0.6) !important;
|
|
42016
|
+
border-radius: 4px;
|
|
42017
|
+
}
|
|
42018
|
+
|
|
42019
|
+
input:focus {
|
|
42020
|
+
border: 2px solid #212121 !important;
|
|
42021
|
+
border-radius: 4px;
|
|
42022
|
+
outline: none !important;
|
|
42023
|
+
}
|
|
42024
|
+
|
|
41948
42025
|
${props => {
|
|
41949
42026
|
switch (props.$fieldType) {
|
|
41950
42027
|
case "currency":
|
|
@@ -42515,6 +42592,137 @@ const PencilButton = styled.button`
|
|
|
42515
42592
|
pointer-events: none;
|
|
42516
42593
|
}
|
|
42517
42594
|
`;
|
|
42595
|
+
const NotAvailableIconButton = styled.button`
|
|
42596
|
+
position: absolute;
|
|
42597
|
+
right: 4px;
|
|
42598
|
+
top: 0;
|
|
42599
|
+
bottom: 0;
|
|
42600
|
+
margin-top: auto;
|
|
42601
|
+
margin-bottom: auto;
|
|
42602
|
+
height: fit-content;
|
|
42603
|
+
background: transparent;
|
|
42604
|
+
border: none;
|
|
42605
|
+
cursor: pointer;
|
|
42606
|
+
padding: 2px;
|
|
42607
|
+
display: flex;
|
|
42608
|
+
align-items: center;
|
|
42609
|
+
justify-content: center;
|
|
42610
|
+
color: #8B8989;
|
|
42611
|
+
opacity: 0;
|
|
42612
|
+
transition: opacity 0.15s ease, color 0.15s ease;
|
|
42613
|
+
|
|
42614
|
+
&:hover {
|
|
42615
|
+
color: #EF4444;
|
|
42616
|
+
}
|
|
42617
|
+
|
|
42618
|
+
&::before {
|
|
42619
|
+
content: 'Mark as N/A';
|
|
42620
|
+
position: absolute;
|
|
42621
|
+
bottom: calc(100% + 12px);
|
|
42622
|
+
left: 50%;
|
|
42623
|
+
transform: translateX(-50%);
|
|
42624
|
+
background: white;
|
|
42625
|
+
color: #212121;
|
|
42626
|
+
padding: 4px 8px;
|
|
42627
|
+
border-radius: 4px;
|
|
42628
|
+
font-size: 12px;
|
|
42629
|
+
font-family: 'Poppins', sans-serif;
|
|
42630
|
+
font-weight: 400;
|
|
42631
|
+
white-space: nowrap;
|
|
42632
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
42633
|
+
opacity: 0;
|
|
42634
|
+
pointer-events: none;
|
|
42635
|
+
transition: opacity 0.15s ease;
|
|
42636
|
+
z-index: 1000;
|
|
42637
|
+
}
|
|
42638
|
+
|
|
42639
|
+
&::after {
|
|
42640
|
+
content: '';
|
|
42641
|
+
position: absolute;
|
|
42642
|
+
bottom: calc(100% + 7px);
|
|
42643
|
+
left: 50%;
|
|
42644
|
+
width: 10px;
|
|
42645
|
+
height: 10px;
|
|
42646
|
+
background: white;
|
|
42647
|
+
transform: translateX(-50%) rotate(45deg);
|
|
42648
|
+
opacity: 0;
|
|
42649
|
+
pointer-events: none;
|
|
42650
|
+
transition: opacity 0.15s ease;
|
|
42651
|
+
z-index: 1001;
|
|
42652
|
+
}
|
|
42653
|
+
|
|
42654
|
+
&:hover::before,
|
|
42655
|
+
&:hover::after {
|
|
42656
|
+
opacity: 1;
|
|
42657
|
+
}
|
|
42658
|
+
`;
|
|
42659
|
+
const NotAvailableCellWrapper = styled.div`
|
|
42660
|
+
position: relative;
|
|
42661
|
+
display: flex;
|
|
42662
|
+
align-items: center;
|
|
42663
|
+
width: 100%;
|
|
42664
|
+
|
|
42665
|
+
&:hover ${NotAvailableIconButton} {
|
|
42666
|
+
opacity: 1;
|
|
42667
|
+
}
|
|
42668
|
+
`;
|
|
42669
|
+
const NotAvailableText = styled.div`
|
|
42670
|
+
position: relative;
|
|
42671
|
+
width: 100%;
|
|
42672
|
+
color: #8B8989;
|
|
42673
|
+
font-family: inherit;
|
|
42674
|
+
font-size: inherit;
|
|
42675
|
+
line-height: normal;
|
|
42676
|
+
cursor: pointer;
|
|
42677
|
+
padding: 1px 2px;
|
|
42678
|
+
border: 1px solid transparent;
|
|
42679
|
+
border-radius: 4px;
|
|
42680
|
+
|
|
42681
|
+
&:hover {
|
|
42682
|
+
border-color: rgba(0, 0, 0, 0.6);
|
|
42683
|
+
}
|
|
42684
|
+
|
|
42685
|
+
&::before {
|
|
42686
|
+
content: 'Click to make required again';
|
|
42687
|
+
position: absolute;
|
|
42688
|
+
bottom: calc(100% + 12px);
|
|
42689
|
+
left: 50%;
|
|
42690
|
+
transform: translateX(-50%);
|
|
42691
|
+
background: white;
|
|
42692
|
+
color: #212121;
|
|
42693
|
+
padding: 4px 8px;
|
|
42694
|
+
border-radius: 4px;
|
|
42695
|
+
font-size: 12px;
|
|
42696
|
+
font-family: 'Poppins', sans-serif;
|
|
42697
|
+
font-weight: 400;
|
|
42698
|
+
white-space: nowrap;
|
|
42699
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
42700
|
+
opacity: 0;
|
|
42701
|
+
pointer-events: none;
|
|
42702
|
+
transition: opacity 0.15s ease;
|
|
42703
|
+
z-index: 1000;
|
|
42704
|
+
}
|
|
42705
|
+
|
|
42706
|
+
&::after {
|
|
42707
|
+
content: '';
|
|
42708
|
+
position: absolute;
|
|
42709
|
+
bottom: calc(100% + 7px);
|
|
42710
|
+
left: 50%;
|
|
42711
|
+
width: 10px;
|
|
42712
|
+
height: 10px;
|
|
42713
|
+
background: white;
|
|
42714
|
+
transform: translateX(-50%) rotate(45deg);
|
|
42715
|
+
opacity: 0;
|
|
42716
|
+
pointer-events: none;
|
|
42717
|
+
transition: opacity 0.15s ease;
|
|
42718
|
+
z-index: 1001;
|
|
42719
|
+
}
|
|
42720
|
+
|
|
42721
|
+
&:hover::before,
|
|
42722
|
+
&:hover::after {
|
|
42723
|
+
opacity: 1;
|
|
42724
|
+
}
|
|
42725
|
+
`;
|
|
42518
42726
|
|
|
42519
42727
|
// MessageBox.styles.js
|
|
42520
42728
|
const ModalOverlay = styled.div`
|
|
@@ -43255,7 +43463,8 @@ const TableBody = /*#__PURE__*/forwardRef(({
|
|
|
43255
43463
|
onHeroClick = () => {},
|
|
43256
43464
|
onEditableClick = () => {},
|
|
43257
43465
|
isEditMode = false,
|
|
43258
|
-
editRowIndex = -1
|
|
43466
|
+
editRowIndex = -1,
|
|
43467
|
+
markAllNotValidFields = false
|
|
43259
43468
|
}, ref) => {
|
|
43260
43469
|
if (!Array.isArray(data) || !Array.isArray(columns)) {
|
|
43261
43470
|
console.warn("TableBody: Invalid data or columns prop");
|
|
@@ -43272,6 +43481,20 @@ const TableBody = /*#__PURE__*/forwardRef(({
|
|
|
43272
43481
|
const [hasInitialValue, setHasInitialValue] = useState(false);
|
|
43273
43482
|
const [shimmerRowIndex, setShimmerRowIndex] = useState(-1);
|
|
43274
43483
|
const [shimmerStartTime, setShimmerStartTime] = useState(null);
|
|
43484
|
+
const [notAvailableFields, setNotAvailableFields] = useState(() => {
|
|
43485
|
+
const initial = {};
|
|
43486
|
+
data.forEach(row => {
|
|
43487
|
+
columns.forEach(col => {
|
|
43488
|
+
if (col.allowNotAvailable && col.notAvailableValue !== undefined && row[col.key] === col.notAvailableValue) {
|
|
43489
|
+
initial[row.id] = {
|
|
43490
|
+
...(initial[row.id] ?? {}),
|
|
43491
|
+
[col.key]: true
|
|
43492
|
+
};
|
|
43493
|
+
}
|
|
43494
|
+
});
|
|
43495
|
+
});
|
|
43496
|
+
return initial;
|
|
43497
|
+
});
|
|
43275
43498
|
const getNestedValue = (obj, path) => {
|
|
43276
43499
|
if (!path || typeof path !== 'string') return undefined;
|
|
43277
43500
|
return path.split('.').reduce((current, key) => {
|
|
@@ -44091,6 +44314,14 @@ const TableBody = /*#__PURE__*/forwardRef(({
|
|
|
44091
44314
|
key: `invalid-${columnIndex}`
|
|
44092
44315
|
}, "Invalid Column");
|
|
44093
44316
|
}
|
|
44317
|
+
if (column.groupBreak && rowIndex > 0 && data[rowIndex - 1][column.key] === row[column.key]) {
|
|
44318
|
+
return /*#__PURE__*/React$1.createElement(TableCell, {
|
|
44319
|
+
key: `${column.key}-${rowIndex}`,
|
|
44320
|
+
$fieldType: column.fieldType?.toLowerCase(),
|
|
44321
|
+
$minWidth: column.minWidth,
|
|
44322
|
+
$maxWidth: column.maxWidth
|
|
44323
|
+
});
|
|
44324
|
+
}
|
|
44094
44325
|
let value, formattedValue, fieldTooltip;
|
|
44095
44326
|
try {
|
|
44096
44327
|
value = column.key.includes('.') ? getNestedValue(row, column.key) : row[column.key];
|
|
@@ -44109,7 +44340,7 @@ const TableBody = /*#__PURE__*/forwardRef(({
|
|
|
44109
44340
|
return /*#__PURE__*/React$1.createElement(TableCell, {
|
|
44110
44341
|
key: `${column.key}-${rowIndex}`,
|
|
44111
44342
|
ref: el => {
|
|
44112
|
-
if (isTextBasedField && el && formattedValue) {
|
|
44343
|
+
if (isTextBasedField && el && formattedValue && !column.editable) {
|
|
44113
44344
|
const hasOverflow = shouldShowTooltip(el);
|
|
44114
44345
|
const tooltipTextToShow = hasOverflow ? String(formattedValue) : fieldTooltip;
|
|
44115
44346
|
if (tooltipTextToShow) {
|
|
@@ -44137,12 +44368,61 @@ const TableBody = /*#__PURE__*/forwardRef(({
|
|
|
44137
44368
|
}
|
|
44138
44369
|
},
|
|
44139
44370
|
$fieldType: fieldType,
|
|
44371
|
+
$editable: !!column.editable,
|
|
44140
44372
|
$color: column.color,
|
|
44141
44373
|
$minWidth: column.minWidth,
|
|
44142
44374
|
$maxWidth: column.maxWidth
|
|
44143
44375
|
}, fieldTooltip && !isTextBasedField ? /*#__PURE__*/React$1.createElement(CellContentWrapper, {
|
|
44144
44376
|
ref: el => applyTooltip(el, fieldTooltip)
|
|
44145
|
-
}, renderCellContent(formattedValue, isTextBasedField, shouldShimmer)) : renderCellContent(formattedValue, isTextBasedField, shouldShimmer))
|
|
44377
|
+
}, renderCellContent(formattedValue, isTextBasedField, shouldShimmer)) : column.groupBreak ? /*#__PURE__*/React$1.createElement("strong", null, renderCellContent(formattedValue, isTextBasedField, shouldShimmer)) : column.editable && column.allowNotAvailable ? /*#__PURE__*/React$1.createElement(NotAvailableCellWrapper, null, notAvailableFields[row.id]?.[column.key] ? /*#__PURE__*/React$1.createElement(NotAvailableText, {
|
|
44378
|
+
onClick: () => {
|
|
44379
|
+
setNotAvailableFields(prev => ({
|
|
44380
|
+
...prev,
|
|
44381
|
+
[row.id]: {
|
|
44382
|
+
...(prev[row.id] ?? {}),
|
|
44383
|
+
[column.key]: false
|
|
44384
|
+
}
|
|
44385
|
+
}));
|
|
44386
|
+
column.onNotAvailableChange?.(row, false);
|
|
44387
|
+
}
|
|
44388
|
+
}, "N/A") : /*#__PURE__*/React$1.createElement(React$1.Fragment, null, column.renderEditableCell?.(rowIndex, row, {
|
|
44389
|
+
markAllNotValidFields
|
|
44390
|
+
}), /*#__PURE__*/React$1.createElement(NotAvailableIconButton, {
|
|
44391
|
+
type: "button",
|
|
44392
|
+
onClick: e => {
|
|
44393
|
+
e.stopPropagation();
|
|
44394
|
+
setNotAvailableFields(prev => ({
|
|
44395
|
+
...prev,
|
|
44396
|
+
[row.id]: {
|
|
44397
|
+
...(prev[row.id] ?? {}),
|
|
44398
|
+
[column.key]: true
|
|
44399
|
+
}
|
|
44400
|
+
}));
|
|
44401
|
+
column.onNotAvailableChange?.(row, true);
|
|
44402
|
+
}
|
|
44403
|
+
}, /*#__PURE__*/React$1.createElement("svg", {
|
|
44404
|
+
width: "14",
|
|
44405
|
+
height: "14",
|
|
44406
|
+
viewBox: "0 0 14 14",
|
|
44407
|
+
fill: "none",
|
|
44408
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
44409
|
+
}, /*#__PURE__*/React$1.createElement("circle", {
|
|
44410
|
+
cx: "7",
|
|
44411
|
+
cy: "7",
|
|
44412
|
+
r: "6",
|
|
44413
|
+
stroke: "currentColor",
|
|
44414
|
+
strokeWidth: "1.5"
|
|
44415
|
+
}), /*#__PURE__*/React$1.createElement("line", {
|
|
44416
|
+
x1: "2.5",
|
|
44417
|
+
y1: "11.5",
|
|
44418
|
+
x2: "11.5",
|
|
44419
|
+
y2: "2.5",
|
|
44420
|
+
stroke: "currentColor",
|
|
44421
|
+
strokeWidth: "1.5",
|
|
44422
|
+
strokeLinecap: "round"
|
|
44423
|
+
}))))) : column.editable && column.renderEditableCell ? column.renderEditableCell(rowIndex, row, {
|
|
44424
|
+
markAllNotValidFields
|
|
44425
|
+
}) : renderCellContent(formattedValue, isTextBasedField, shouldShimmer));
|
|
44146
44426
|
})), expandable && expandedRows[rowIndex] && /*#__PURE__*/React$1.createElement(ExpandedRow, {
|
|
44147
44427
|
$expandedBackgroundColor: expandedBackgroundColor
|
|
44148
44428
|
}, /*#__PURE__*/React$1.createElement(TableCell, {
|
|
@@ -47797,7 +48077,10 @@ const Table = props => {
|
|
|
47797
48077
|
showFooter = false,
|
|
47798
48078
|
total,
|
|
47799
48079
|
rowLabel = "",
|
|
47800
|
-
footerRight = null
|
|
48080
|
+
footerRight = null,
|
|
48081
|
+
showDirtyFieldsCounter = false,
|
|
48082
|
+
dirtyFieldsCount = 0,
|
|
48083
|
+
markAllNotValidFields = false
|
|
47801
48084
|
} = props;
|
|
47802
48085
|
const scrollWrapperRef = useRef(null);
|
|
47803
48086
|
const tableBodyRef = useRef(null);
|
|
@@ -47954,7 +48237,8 @@ const Table = props => {
|
|
|
47954
48237
|
onHeroClick: onHeroClick,
|
|
47955
48238
|
onEditableClick: onEditableClick,
|
|
47956
48239
|
isEditMode: isEditMode,
|
|
47957
|
-
editRowIndex: editRowIndex
|
|
48240
|
+
editRowIndex: editRowIndex,
|
|
48241
|
+
markAllNotValidFields: markAllNotValidFields
|
|
47958
48242
|
})), data.length === 0 && /*#__PURE__*/React$1.createElement(NoEventsParent, null, /*#__PURE__*/React$1.createElement(NoEventsWrapper, null, showNoDataInSearch ? getNoDataSearchIcon(noDataSearchIcon) : getNoDataIcon(noDataIcon)), /*#__PURE__*/React$1.createElement(NoEventsMessage, {
|
|
47959
48243
|
titleSize: titleSize,
|
|
47960
48244
|
subTitleSize: subTitleSize
|
|
@@ -47984,9 +48268,10 @@ const Table = props => {
|
|
|
47984
48268
|
total: total,
|
|
47985
48269
|
rowLabel: rowLabel,
|
|
47986
48270
|
isLoading: isLoading,
|
|
47987
|
-
isLoadingText: isLoadingText
|
|
47988
|
-
|
|
47989
|
-
|
|
48271
|
+
isLoadingText: isLoadingText
|
|
48272
|
+
}), showDirtyFieldsCounter && (dirtyFieldsCount > 0 ? /*#__PURE__*/React$1.createElement(DirtyFieldsCounter, {
|
|
48273
|
+
$dirty: true
|
|
48274
|
+
}, dirtyFieldsCount, " field", dirtyFieldsCount !== 1 ? 's' : '', " modified") : /*#__PURE__*/React$1.createElement(DirtyFieldsCounter, null, "\u2713 All values complete")))));
|
|
47990
48275
|
};
|
|
47991
48276
|
Table.displayName = "Table";
|
|
47992
48277
|
|
|
@@ -59513,25 +59798,28 @@ const LinkText = styled.span`
|
|
|
59513
59798
|
`;
|
|
59514
59799
|
|
|
59515
59800
|
// OkCircleIcon.jsx
|
|
59516
|
-
const OkCircleIcon =
|
|
59517
|
-
|
|
59518
|
-
|
|
59519
|
-
|
|
59520
|
-
|
|
59521
|
-
|
|
59522
|
-
|
|
59523
|
-
|
|
59524
|
-
|
|
59525
|
-
|
|
59526
|
-
|
|
59527
|
-
|
|
59528
|
-
|
|
59529
|
-
|
|
59530
|
-
|
|
59531
|
-
|
|
59532
|
-
|
|
59533
|
-
|
|
59534
|
-
|
|
59801
|
+
const OkCircleIcon = _ref => {
|
|
59802
|
+
let {
|
|
59803
|
+
width = '40',
|
|
59804
|
+
height = '40',
|
|
59805
|
+
color = '#519595'
|
|
59806
|
+
} = _ref;
|
|
59807
|
+
return /*#__PURE__*/React$1.createElement("svg", {
|
|
59808
|
+
width: width,
|
|
59809
|
+
height: height,
|
|
59810
|
+
viewBox: "0 0 40 40",
|
|
59811
|
+
fill: "none",
|
|
59812
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
59813
|
+
}, /*#__PURE__*/React$1.createElement("rect", {
|
|
59814
|
+
width: "40",
|
|
59815
|
+
height: "40",
|
|
59816
|
+
rx: "20",
|
|
59817
|
+
fill: color
|
|
59818
|
+
}), /*#__PURE__*/React$1.createElement("path", {
|
|
59819
|
+
d: "M20.0176 12.6875C17.3809 12.6875 14.9902 14.0938 13.6543 16.3438C12.3535 18.6289 12.3535 21.4062 13.6543 23.6562C14.9902 25.9414 17.3809 27.3125 20.0176 27.3125C22.6191 27.3125 25.0098 25.9414 26.3457 23.6562C27.6465 21.4062 27.6465 18.6289 26.3457 16.3438C25.0098 14.0938 22.6191 12.6875 20.0176 12.6875ZM20.0176 29C16.7832 29 13.8301 27.3125 12.2129 24.5C10.5957 21.7227 10.5957 18.3125 12.2129 15.5C13.8301 12.7227 16.7832 11 20.0176 11C23.2168 11 26.1699 12.7227 27.7871 15.5C29.4043 18.3125 29.4043 21.7227 27.7871 24.5C26.1699 27.3125 23.2168 29 20.0176 29ZM23.9902 18.3477L19.4902 22.8477C19.1387 23.1992 18.6113 23.1992 18.2949 22.8477L16.0449 20.5977C15.6934 20.2812 15.6934 19.7539 16.0449 19.4375C16.3613 19.0859 16.8887 19.0859 17.2402 19.4375L18.8926 21.0898L22.7949 17.1875C23.1113 16.8359 23.6387 16.8359 23.9902 17.1875C24.3066 17.5039 24.3066 18.0312 23.9902 18.3477Z",
|
|
59820
|
+
fill: "white"
|
|
59821
|
+
}));
|
|
59822
|
+
};
|
|
59535
59823
|
|
|
59536
59824
|
// ToasterMessageBox.jsx
|
|
59537
59825
|
const ToasterMessageBox = _ref => {
|