sag_components 2.0.0-beta173 → 2.0.0-beta175
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 +279 -109
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +279 -109
- package/dist/index.js.map +1 -1
- package/dist/types/components/Table/DropMenus/Dropdown.d.ts +31 -0
- package/dist/types/components/Table/DropMenus/Dropdown.styles.d.ts +5 -0
- package/dist/types/components/Table/data.d.ts +7 -0
- package/dist/types/icons/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -449,6 +449,25 @@ const Calendar = () => /*#__PURE__*/React$1.createElement("svg", {
|
|
|
449
449
|
fill: "#568202"
|
|
450
450
|
}));
|
|
451
451
|
|
|
452
|
+
// eslint-disable-next-line react/prop-types
|
|
453
|
+
const ErrorIcon = _ref => {
|
|
454
|
+
let {
|
|
455
|
+
color = '#FF3949',
|
|
456
|
+
width = '18',
|
|
457
|
+
height = '18'
|
|
458
|
+
} = _ref;
|
|
459
|
+
return /*#__PURE__*/React$1.createElement("svg", {
|
|
460
|
+
width: width,
|
|
461
|
+
height: height,
|
|
462
|
+
viewBox: "0 0 14 13",
|
|
463
|
+
fill: "none",
|
|
464
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
465
|
+
}, /*#__PURE__*/React$1.createElement("path", {
|
|
466
|
+
d: "M7 1.625C5.24219 1.625 3.64844 2.5625 2.75781 4.0625C1.89062 5.58594 1.89062 7.4375 2.75781 8.9375C3.64844 10.4609 5.24219 11.375 7 11.375C8.73438 11.375 10.3281 10.4609 11.2188 8.9375C12.0859 7.4375 12.0859 5.58594 11.2188 4.0625C10.3281 2.5625 8.73438 1.625 7 1.625ZM7 12.5C4.84375 12.5 2.875 11.375 1.79688 9.5C0.71875 7.64844 0.71875 5.375 1.79688 3.5C2.875 1.64844 4.84375 0.5 7 0.5C9.13281 0.5 11.1016 1.64844 12.1797 3.5C13.2578 5.375 13.2578 7.64844 12.1797 9.5C11.1016 11.375 9.13281 12.5 7 12.5ZM7 3.5C7.30469 3.5 7.5625 3.75781 7.5625 4.0625V6.6875C7.5625 7.01562 7.30469 7.25 7 7.25C6.67188 7.25 6.4375 7.01562 6.4375 6.6875V4.0625C6.4375 3.75781 6.67188 3.5 7 3.5ZM7.75 8.75C7.75 9.17188 7.39844 9.5 7 9.5C6.57812 9.5 6.25 9.17188 6.25 8.75C6.25 8.35156 6.57812 8 7 8C7.39844 8 7.75 8.35156 7.75 8.75Z",
|
|
467
|
+
fill: color
|
|
468
|
+
}));
|
|
469
|
+
};
|
|
470
|
+
|
|
452
471
|
const ChervronRightIcon = _ref => {
|
|
453
472
|
let {
|
|
454
473
|
width = "8",
|
|
@@ -10429,23 +10448,24 @@ const QuarterPopupPicker = ({
|
|
|
10429
10448
|
};
|
|
10430
10449
|
|
|
10431
10450
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
10432
|
-
const QuarterPicker =
|
|
10433
|
-
|
|
10434
|
-
|
|
10435
|
-
|
|
10436
|
-
|
|
10437
|
-
|
|
10438
|
-
|
|
10439
|
-
|
|
10440
|
-
|
|
10441
|
-
|
|
10442
|
-
|
|
10443
|
-
|
|
10444
|
-
|
|
10445
|
-
|
|
10446
|
-
|
|
10447
|
-
|
|
10448
|
-
|
|
10451
|
+
const QuarterPicker = _ref => {
|
|
10452
|
+
let {
|
|
10453
|
+
availableQuarters,
|
|
10454
|
+
// ["Q1-2024"]
|
|
10455
|
+
label,
|
|
10456
|
+
onChange,
|
|
10457
|
+
borderRadius,
|
|
10458
|
+
required,
|
|
10459
|
+
width,
|
|
10460
|
+
height,
|
|
10461
|
+
placeholder,
|
|
10462
|
+
disabled,
|
|
10463
|
+
borderColor,
|
|
10464
|
+
borderColorFocus,
|
|
10465
|
+
textColor,
|
|
10466
|
+
selectedValue,
|
|
10467
|
+
startYear
|
|
10468
|
+
} = _ref;
|
|
10449
10469
|
const [isFocused, setIsFocused] = useState(false);
|
|
10450
10470
|
const [isOpen, setIsOpen] = useState(false);
|
|
10451
10471
|
const [value, setValue] = useState('');
|
|
@@ -10887,22 +10907,23 @@ const MonthPopupPicker = ({
|
|
|
10887
10907
|
};
|
|
10888
10908
|
|
|
10889
10909
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
10890
|
-
const MonthPicker =
|
|
10891
|
-
|
|
10892
|
-
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
|
|
10903
|
-
|
|
10904
|
-
|
|
10905
|
-
|
|
10910
|
+
const MonthPicker = _ref => {
|
|
10911
|
+
let {
|
|
10912
|
+
availableMonths,
|
|
10913
|
+
label,
|
|
10914
|
+
onChange,
|
|
10915
|
+
borderRadius,
|
|
10916
|
+
required,
|
|
10917
|
+
width,
|
|
10918
|
+
height,
|
|
10919
|
+
placeholder,
|
|
10920
|
+
disabled,
|
|
10921
|
+
borderColor,
|
|
10922
|
+
borderColorFocus,
|
|
10923
|
+
textColor,
|
|
10924
|
+
selectedValue,
|
|
10925
|
+
startYear
|
|
10926
|
+
} = _ref;
|
|
10906
10927
|
const [isFocused, setIsFocused] = useState(false);
|
|
10907
10928
|
const [isOpen, setIsOpen] = useState(false);
|
|
10908
10929
|
const [value, setValue] = useState('');
|
|
@@ -34199,25 +34220,6 @@ const InsightsCarousel = _ref => {
|
|
|
34199
34220
|
})))));
|
|
34200
34221
|
};
|
|
34201
34222
|
|
|
34202
|
-
// eslint-disable-next-line react/prop-types
|
|
34203
|
-
const ErrorIcon = _ref => {
|
|
34204
|
-
let {
|
|
34205
|
-
color = '#FF3949',
|
|
34206
|
-
width = '18',
|
|
34207
|
-
height = '18'
|
|
34208
|
-
} = _ref;
|
|
34209
|
-
return /*#__PURE__*/React$1.createElement("svg", {
|
|
34210
|
-
width: width,
|
|
34211
|
-
height: height,
|
|
34212
|
-
viewBox: "0 0 14 13",
|
|
34213
|
-
fill: "none",
|
|
34214
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
34215
|
-
}, /*#__PURE__*/React$1.createElement("path", {
|
|
34216
|
-
d: "M7 1.625C5.24219 1.625 3.64844 2.5625 2.75781 4.0625C1.89062 5.58594 1.89062 7.4375 2.75781 8.9375C3.64844 10.4609 5.24219 11.375 7 11.375C8.73438 11.375 10.3281 10.4609 11.2188 8.9375C12.0859 7.4375 12.0859 5.58594 11.2188 4.0625C10.3281 2.5625 8.73438 1.625 7 1.625ZM7 12.5C4.84375 12.5 2.875 11.375 1.79688 9.5C0.71875 7.64844 0.71875 5.375 1.79688 3.5C2.875 1.64844 4.84375 0.5 7 0.5C9.13281 0.5 11.1016 1.64844 12.1797 3.5C13.2578 5.375 13.2578 7.64844 12.1797 9.5C11.1016 11.375 9.13281 12.5 7 12.5ZM7 3.5C7.30469 3.5 7.5625 3.75781 7.5625 4.0625V6.6875C7.5625 7.01562 7.30469 7.25 7 7.25C6.67188 7.25 6.4375 7.01562 6.4375 6.6875V4.0625C6.4375 3.75781 6.67188 3.5 7 3.5ZM7.75 8.75C7.75 9.17188 7.39844 9.5 7 9.5C6.57812 9.5 6.25 9.17188 6.25 8.75C6.25 8.35156 6.57812 8 7 8C7.39844 8 7.75 8.35156 7.75 8.75Z",
|
|
34217
|
-
fill: color
|
|
34218
|
-
}));
|
|
34219
|
-
};
|
|
34220
|
-
|
|
34221
34223
|
// eslint-disable-next-line react/prop-types
|
|
34222
34224
|
const SucceededIcon = _ref => {
|
|
34223
34225
|
let {
|
|
@@ -35614,9 +35616,12 @@ const ToggleSwitchLabel = styled.label`
|
|
|
35614
35616
|
position: relative;
|
|
35615
35617
|
cursor: pointer;
|
|
35616
35618
|
user-select: none;
|
|
35617
|
-
opacity: ${
|
|
35618
|
-
|
|
35619
|
-
|
|
35619
|
+
opacity: ${_ref => {
|
|
35620
|
+
let {
|
|
35621
|
+
disabled
|
|
35622
|
+
} = _ref;
|
|
35623
|
+
return disabled ? 0.5 : 1;
|
|
35624
|
+
}};
|
|
35620
35625
|
`;
|
|
35621
35626
|
const ToggleInput = styled.input`
|
|
35622
35627
|
display: none;
|
|
@@ -35624,15 +35629,19 @@ const ToggleInput = styled.input`
|
|
|
35624
35629
|
const ToggleSlider = styled.span`
|
|
35625
35630
|
display: block;
|
|
35626
35631
|
position: relative;
|
|
35627
|
-
background: ${
|
|
35628
|
-
|
|
35629
|
-
|
|
35630
|
-
|
|
35632
|
+
background: ${_ref2 => {
|
|
35633
|
+
let {
|
|
35634
|
+
checked,
|
|
35635
|
+
disabled
|
|
35636
|
+
} = _ref2;
|
|
35637
|
+
return checked ? disabled ? "#7bb1b0" : "#006d6a" : "#cfd8dc";
|
|
35638
|
+
}};
|
|
35631
35639
|
border-radius: 999px;
|
|
35632
35640
|
transition: background 0.2s;
|
|
35633
|
-
${
|
|
35634
|
-
|
|
35635
|
-
|
|
35641
|
+
${_ref3 => {
|
|
35642
|
+
let {
|
|
35643
|
+
size
|
|
35644
|
+
} = _ref3;
|
|
35636
35645
|
switch (size) {
|
|
35637
35646
|
case "s":
|
|
35638
35647
|
return css`width: 40px; height: 20px;`;
|
|
@@ -35651,9 +35660,10 @@ const ToggleSlider = styled.span`
|
|
|
35651
35660
|
background: #fff;
|
|
35652
35661
|
border-radius: 50%;
|
|
35653
35662
|
transition: left 0.2s, width 0.2s, height 0.2s;
|
|
35654
|
-
${
|
|
35655
|
-
|
|
35656
|
-
|
|
35663
|
+
${_ref4 => {
|
|
35664
|
+
let {
|
|
35665
|
+
size
|
|
35666
|
+
} = _ref4;
|
|
35657
35667
|
switch (size) {
|
|
35658
35668
|
case "s":
|
|
35659
35669
|
return css`width: 14px; height: 14px;`;
|
|
@@ -35663,10 +35673,11 @@ const ToggleSlider = styled.span`
|
|
|
35663
35673
|
return css`width: 20px; height: 20px;`;
|
|
35664
35674
|
}
|
|
35665
35675
|
}}
|
|
35666
|
-
left: ${
|
|
35667
|
-
|
|
35668
|
-
|
|
35669
|
-
|
|
35676
|
+
left: ${_ref5 => {
|
|
35677
|
+
let {
|
|
35678
|
+
checked,
|
|
35679
|
+
size
|
|
35680
|
+
} = _ref5;
|
|
35670
35681
|
if (!checked) return "3px";
|
|
35671
35682
|
switch (size) {
|
|
35672
35683
|
case "s":
|
|
@@ -38731,13 +38742,13 @@ const ExpandedContent = styled.div`
|
|
|
38731
38742
|
`;
|
|
38732
38743
|
|
|
38733
38744
|
// DROPDOWN STYLES
|
|
38734
|
-
|
|
38745
|
+
styled.div`
|
|
38735
38746
|
position: relative;
|
|
38736
38747
|
display: inline-block;
|
|
38737
38748
|
width: 100%;
|
|
38738
38749
|
font-family: "Poppins", sans-serif;
|
|
38739
38750
|
`;
|
|
38740
|
-
|
|
38751
|
+
styled.button`
|
|
38741
38752
|
display: flex;
|
|
38742
38753
|
align-items: center;
|
|
38743
38754
|
justify-content: space-between;
|
|
@@ -38770,7 +38781,7 @@ const DropdownButton$1 = styled.button`
|
|
|
38770
38781
|
flex: 1;
|
|
38771
38782
|
}
|
|
38772
38783
|
`;
|
|
38773
|
-
|
|
38784
|
+
styled.div`
|
|
38774
38785
|
display: flex;
|
|
38775
38786
|
align-items: center;
|
|
38776
38787
|
justify-content: center;
|
|
@@ -38785,7 +38796,7 @@ const DropdownIcon = styled.div`
|
|
|
38785
38796
|
transform: rotate(180deg);
|
|
38786
38797
|
`}
|
|
38787
38798
|
`;
|
|
38788
|
-
|
|
38799
|
+
styled.div`
|
|
38789
38800
|
position: absolute;
|
|
38790
38801
|
top: calc(100%);
|
|
38791
38802
|
left: 0;
|
|
@@ -38818,7 +38829,7 @@ const DropdownMenu = styled.div`
|
|
|
38818
38829
|
background: #94a3b8;
|
|
38819
38830
|
}
|
|
38820
38831
|
`;
|
|
38821
|
-
|
|
38832
|
+
styled.div`
|
|
38822
38833
|
display: flex;
|
|
38823
38834
|
align-items: center;
|
|
38824
38835
|
justify-content: space-between;
|
|
@@ -39066,6 +39077,177 @@ const DisabledTrashIcon = ({
|
|
|
39066
39077
|
}));
|
|
39067
39078
|
};
|
|
39068
39079
|
|
|
39080
|
+
// DROPDOWN STYLES
|
|
39081
|
+
const DropdownContainer$1 = styled.div`
|
|
39082
|
+
position: relative;
|
|
39083
|
+
display: inline-block;
|
|
39084
|
+
width: 100%;
|
|
39085
|
+
font-family: "Poppins", sans-serif;
|
|
39086
|
+
`;
|
|
39087
|
+
const DropdownButton$1 = styled.button`
|
|
39088
|
+
display: flex;
|
|
39089
|
+
align-items: center;
|
|
39090
|
+
justify-content: space-between;
|
|
39091
|
+
width: 100%;
|
|
39092
|
+
min-width: 120px;
|
|
39093
|
+
background-color: ${props => props.$isRowFocused || props.$isRowHovered ? props.$selectedColor : "white"};
|
|
39094
|
+
border: none;
|
|
39095
|
+
border-radius: 0;
|
|
39096
|
+
font-family: "Poppins", sans-serif;
|
|
39097
|
+
font-size: 14px;
|
|
39098
|
+
font-weight: 400;
|
|
39099
|
+
color: #212121;
|
|
39100
|
+
cursor: pointer;
|
|
39101
|
+
transition: all 0.2s ease;
|
|
39102
|
+
|
|
39103
|
+
&:hover {
|
|
39104
|
+
background-color: #D1E7E7;
|
|
39105
|
+
}
|
|
39106
|
+
|
|
39107
|
+
&:focus {
|
|
39108
|
+
outline: none;
|
|
39109
|
+
background-color: #E6F0F0;
|
|
39110
|
+
}
|
|
39111
|
+
|
|
39112
|
+
span {
|
|
39113
|
+
overflow: hidden;
|
|
39114
|
+
text-overflow: ellipsis;
|
|
39115
|
+
white-space: nowrap;
|
|
39116
|
+
text-align: left;
|
|
39117
|
+
flex: 1;
|
|
39118
|
+
}
|
|
39119
|
+
`;
|
|
39120
|
+
const DropdownIcon = styled.div`
|
|
39121
|
+
display: flex;
|
|
39122
|
+
align-items: center;
|
|
39123
|
+
justify-content: center;
|
|
39124
|
+
width: 20px;
|
|
39125
|
+
height: 20px;
|
|
39126
|
+
background-color: ${props => props.$isRowFocused || props.$isRowHovered ? '#B4D1D2' : 'white'};
|
|
39127
|
+
border-radius: 4px;
|
|
39128
|
+
margin-left: 8px;
|
|
39129
|
+
transition: all 0.2s ease;
|
|
39130
|
+
|
|
39131
|
+
${props => props.$isOpen && `
|
|
39132
|
+
transform: rotate(180deg);
|
|
39133
|
+
`}
|
|
39134
|
+
`;
|
|
39135
|
+
const DropdownMenu = styled.div`
|
|
39136
|
+
position: absolute;
|
|
39137
|
+
top: calc(100%);
|
|
39138
|
+
left: 0;
|
|
39139
|
+
right: 0;
|
|
39140
|
+
z-index: 1000;
|
|
39141
|
+
background-color: white;
|
|
39142
|
+
border: none;
|
|
39143
|
+
border-radius: 0;
|
|
39144
|
+
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
|
|
39145
|
+
font-family: "Poppins", sans-serif;
|
|
39146
|
+
max-height: ${props => props.$maxDropdownHeight || '200px'};
|
|
39147
|
+
overflow-y: auto;
|
|
39148
|
+
padding: 16px;
|
|
39149
|
+
|
|
39150
|
+
/* Custom scrollbar */
|
|
39151
|
+
&::-webkit-scrollbar {
|
|
39152
|
+
width: 4px;
|
|
39153
|
+
}
|
|
39154
|
+
|
|
39155
|
+
&::-webkit-scrollbar-track {
|
|
39156
|
+
background: transparent;
|
|
39157
|
+
}
|
|
39158
|
+
|
|
39159
|
+
&::-webkit-scrollbar-thumb {
|
|
39160
|
+
background: #cbd5e1;
|
|
39161
|
+
border-radius: 2px;
|
|
39162
|
+
}
|
|
39163
|
+
|
|
39164
|
+
&::-webkit-scrollbar-thumb:hover {
|
|
39165
|
+
background: #94a3b8;
|
|
39166
|
+
}
|
|
39167
|
+
`;
|
|
39168
|
+
const DropdownOption = styled.div`
|
|
39169
|
+
display: flex;
|
|
39170
|
+
align-items: center;
|
|
39171
|
+
justify-content: space-between;
|
|
39172
|
+
padding: 8px;
|
|
39173
|
+
font-size: 14px;
|
|
39174
|
+
font-weight: 400;
|
|
39175
|
+
color: #374151;
|
|
39176
|
+
cursor: pointer;
|
|
39177
|
+
transition: all 0.15s ease;
|
|
39178
|
+
border-radius: 0;
|
|
39179
|
+
border-left: 3px solid transparent;
|
|
39180
|
+
background-color: white;
|
|
39181
|
+
|
|
39182
|
+
&:hover {
|
|
39183
|
+
background-color: #E6F0F0;
|
|
39184
|
+
}
|
|
39185
|
+
|
|
39186
|
+
${props => props.$isSelected && `
|
|
39187
|
+
background-color: #B4D1D2;
|
|
39188
|
+
color: #374151;
|
|
39189
|
+
font-weight: 500;
|
|
39190
|
+
border-left: 3px solid #066768;
|
|
39191
|
+
|
|
39192
|
+
&:hover {
|
|
39193
|
+
background-color: #A3C9CA;
|
|
39194
|
+
}
|
|
39195
|
+
`}
|
|
39196
|
+
`;
|
|
39197
|
+
|
|
39198
|
+
const Dropdown = ({
|
|
39199
|
+
isOpen,
|
|
39200
|
+
options,
|
|
39201
|
+
selectedValue,
|
|
39202
|
+
displayText,
|
|
39203
|
+
onToggle,
|
|
39204
|
+
onOptionSelect,
|
|
39205
|
+
maxDropdownHeight,
|
|
39206
|
+
isRowFocused = false,
|
|
39207
|
+
isRowHovered = false,
|
|
39208
|
+
selectedColor
|
|
39209
|
+
}) => {
|
|
39210
|
+
return /*#__PURE__*/React$1.createElement(DropdownContainer$1, null, /*#__PURE__*/React$1.createElement(DropdownButton$1, {
|
|
39211
|
+
onClick: onToggle,
|
|
39212
|
+
$isOpen: isOpen,
|
|
39213
|
+
$isRowFocused: isRowFocused,
|
|
39214
|
+
$selectedColor: selectedColor
|
|
39215
|
+
}, /*#__PURE__*/React$1.createElement("span", null, displayText), /*#__PURE__*/React$1.createElement(DropdownIcon, {
|
|
39216
|
+
$isOpen: isOpen,
|
|
39217
|
+
$isRowFocused: isRowFocused,
|
|
39218
|
+
$isRowHovered: isRowHovered
|
|
39219
|
+
}, /*#__PURE__*/React$1.createElement(MenuItemOpenIcon, {
|
|
39220
|
+
width: "10",
|
|
39221
|
+
height: "6",
|
|
39222
|
+
color: "#212121"
|
|
39223
|
+
}))), isOpen && /*#__PURE__*/React$1.createElement(DropdownMenu, {
|
|
39224
|
+
$maxDropdownHeight: maxDropdownHeight
|
|
39225
|
+
}, options.map((option, index) => /*#__PURE__*/React$1.createElement(DropdownOption, {
|
|
39226
|
+
key: index,
|
|
39227
|
+
onClick: e => onOptionSelect(option, e),
|
|
39228
|
+
$isSelected: option.value === selectedValue
|
|
39229
|
+
}, /*#__PURE__*/React$1.createElement("span", null, option.label), option.value === selectedValue && /*#__PURE__*/React$1.createElement(OkIcon, {
|
|
39230
|
+
width: "24",
|
|
39231
|
+
height: "24",
|
|
39232
|
+
color: "#066768"
|
|
39233
|
+
})))));
|
|
39234
|
+
};
|
|
39235
|
+
Dropdown.propTypes = {
|
|
39236
|
+
isOpen: PropTypes.bool.isRequired,
|
|
39237
|
+
options: PropTypes.arrayOf(PropTypes.shape({
|
|
39238
|
+
value: PropTypes.string.isRequired,
|
|
39239
|
+
label: PropTypes.string.isRequired
|
|
39240
|
+
})).isRequired,
|
|
39241
|
+
selectedValue: PropTypes.string,
|
|
39242
|
+
displayText: PropTypes.string.isRequired,
|
|
39243
|
+
onToggle: PropTypes.func.isRequired,
|
|
39244
|
+
onOptionSelect: PropTypes.func.isRequired,
|
|
39245
|
+
maxDropdownHeight: PropTypes.string,
|
|
39246
|
+
isRowFocused: PropTypes.bool,
|
|
39247
|
+
isRowHovered: PropTypes.bool,
|
|
39248
|
+
selectedColor: PropTypes.string
|
|
39249
|
+
};
|
|
39250
|
+
|
|
39069
39251
|
// TableBody.jsx
|
|
39070
39252
|
const TableBody = ({
|
|
39071
39253
|
columns,
|
|
@@ -39455,30 +39637,18 @@ const TableBody = ({
|
|
|
39455
39637
|
// Find the current selected option to display its label
|
|
39456
39638
|
const currentOption = dropdownOptions.find(option => option.value === value);
|
|
39457
39639
|
const displayText = currentOption ? currentOption.label : value || 'Select...';
|
|
39458
|
-
return /*#__PURE__*/React$1.createElement(
|
|
39459
|
-
|
|
39460
|
-
|
|
39461
|
-
|
|
39462
|
-
|
|
39463
|
-
|
|
39464
|
-
|
|
39465
|
-
|
|
39466
|
-
|
|
39467
|
-
|
|
39468
|
-
|
|
39469
|
-
|
|
39470
|
-
color: "#212121"
|
|
39471
|
-
}))), isOpen && /*#__PURE__*/React$1.createElement(DropdownMenu, {
|
|
39472
|
-
$maxDropdownHeight: maxDropdownHeight
|
|
39473
|
-
}, dropdownOptions.map((option, index) => /*#__PURE__*/React$1.createElement(DropdownOption, {
|
|
39474
|
-
key: index,
|
|
39475
|
-
onClick: e => handleDropdownOptionClick(row, rowIndex, column.key, option, e),
|
|
39476
|
-
$isSelected: option.value === value
|
|
39477
|
-
}, /*#__PURE__*/React$1.createElement("span", null, option.label), option.value === value && /*#__PURE__*/React$1.createElement(OkIcon, {
|
|
39478
|
-
width: "24",
|
|
39479
|
-
height: "24",
|
|
39480
|
-
color: "#066768"
|
|
39481
|
-
})))));
|
|
39640
|
+
return /*#__PURE__*/React$1.createElement(Dropdown, {
|
|
39641
|
+
isOpen: isOpen,
|
|
39642
|
+
options: dropdownOptions,
|
|
39643
|
+
selectedValue: value,
|
|
39644
|
+
displayText: displayText,
|
|
39645
|
+
onToggle: e => handleDropdownClick(rowIndex, column.key, e),
|
|
39646
|
+
onOptionSelect: (option, e) => handleDropdownOptionClick(row, rowIndex, column.key, option, e),
|
|
39647
|
+
maxDropdownHeight: maxDropdownHeight,
|
|
39648
|
+
isRowFocused: focusedRowIndex === rowIndex,
|
|
39649
|
+
isRowHovered: hoveredRowIndex === rowIndex,
|
|
39650
|
+
selectedColor: selectedColor
|
|
39651
|
+
});
|
|
39482
39652
|
default:
|
|
39483
39653
|
// Treat default as text
|
|
39484
39654
|
return value.toString();
|
|
@@ -39519,9 +39689,9 @@ const TableBody = ({
|
|
|
39519
39689
|
[dropdownKey]: false
|
|
39520
39690
|
}));
|
|
39521
39691
|
|
|
39522
|
-
// Fire the onDropdownSelected event
|
|
39692
|
+
// Fire the onDropdownSelected event with columnKey instead of columnName
|
|
39523
39693
|
if (onDropdownSelected) {
|
|
39524
|
-
onDropdownSelected(row, selectedOption);
|
|
39694
|
+
onDropdownSelected(row, selectedOption, columnKey);
|
|
39525
39695
|
}
|
|
39526
39696
|
};
|
|
39527
39697
|
|
|
@@ -54123,7 +54293,7 @@ const tagTemplates = {
|
|
|
54123
54293
|
received: {
|
|
54124
54294
|
backgroundColor: '#B9D5D54D',
|
|
54125
54295
|
borderColor: '#B9D5D5',
|
|
54126
|
-
textColor: '#
|
|
54296
|
+
textColor: '#084141',
|
|
54127
54297
|
text: 'Received'
|
|
54128
54298
|
},
|
|
54129
54299
|
approved: {
|
|
@@ -54132,16 +54302,16 @@ const tagTemplates = {
|
|
|
54132
54302
|
textColor: '#074310',
|
|
54133
54303
|
text: 'Approved'
|
|
54134
54304
|
},
|
|
54135
|
-
|
|
54305
|
+
cancelled: {
|
|
54136
54306
|
backgroundColor: '#EBA6AF4D',
|
|
54137
54307
|
borderColor: '#EBA6AF',
|
|
54138
54308
|
textColor: '#44070F',
|
|
54139
|
-
text: '
|
|
54309
|
+
text: 'Cancelled'
|
|
54140
54310
|
}
|
|
54141
54311
|
};
|
|
54142
54312
|
const Tag = props => {
|
|
54143
54313
|
const {
|
|
54144
|
-
type
|
|
54314
|
+
type,
|
|
54145
54315
|
size = 'small',
|
|
54146
54316
|
backgroundColor,
|
|
54147
54317
|
borderColor,
|
|
@@ -54149,15 +54319,15 @@ const Tag = props => {
|
|
|
54149
54319
|
borderRadius = "62px",
|
|
54150
54320
|
text
|
|
54151
54321
|
} = props;
|
|
54152
|
-
const template = tagTemplates[type];
|
|
54322
|
+
const template = type ? tagTemplates[type] : null;
|
|
54153
54323
|
const height = size === 'small' ? '21px' : size === 'medium' ? '32px' : '35px';
|
|
54154
54324
|
return /*#__PURE__*/React$1.createElement(StatusCell, {
|
|
54155
|
-
backgroundColor: backgroundColor || template
|
|
54156
|
-
borderColor: borderColor || template
|
|
54157
|
-
color: textColor || template
|
|
54325
|
+
backgroundColor: backgroundColor || template?.backgroundColor,
|
|
54326
|
+
borderColor: borderColor || template?.borderColor,
|
|
54327
|
+
color: textColor || template?.textColor,
|
|
54158
54328
|
height: height,
|
|
54159
54329
|
borderRadius: borderRadius
|
|
54160
|
-
}, /*#__PURE__*/React$1.createElement("span", null, text || template
|
|
54330
|
+
}, /*#__PURE__*/React$1.createElement("span", null, text || template?.text));
|
|
54161
54331
|
};
|
|
54162
54332
|
|
|
54163
54333
|
export { AdvancedThresholds, Analytics, AreaChart, BannerEventBoxList, BarChart, BarChartTwoRows, BarChartWithAreaChart, BarChartsByWeeks, BatteryChart, BreakdownPanel, BrushChart, BubbleChart, Budgets, Build, Button$1 as Button, Campaigns, CheckBox, CollapseData, CollapseHeader, ContainerTable, Coupons, CustomerSegments, Dashboard, DialogOverlay$1 as DialogOverlay, DoubleBarSingleLine, DoublePanelDataRow, DownloadProgress, DropdownNew, EventDetailsCard, EventList, Execute, FilterPanel, FilterPop, GroupBuilder, Heatmap, IconButton$1 as IconButton, Input$2 as Input, InsightsCarousel, ItemManagerPanel, ItemsStores, LinkButton, LinnerDataBox, MarketShareDescription, MenuRoute, MessageBox, ModalDrawer, ModalWithOverlay, OneColumnContainer, OverlayDropdown, PerformanceAnalyticsLegend, PieChart, PopupCharts, PreTestWhatIf, QuickFilter, QuickFilterCards, RangePicker, RangePop, ReportTable, RulesEngine, SampleRunEngine, SearchInput, SingleBarLineCharts, SortPop, TabMenu, Table, Tag, ToasterMessageBox, ToggleSwitch, Tooltip$2 as Tooltip, TopToggleList, TotalDoughnutChart, TotalHorizontalCharts, Track, TwoBarCharts, WeeksPicker };
|