sag_components 2.0.0-beta326 → 2.0.0-beta328
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 +1 -0
- package/dist/index.esm.js +145 -82
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +145 -82
- package/dist/index.js.map +1 -1
- package/dist/types/components/DropdownMultiNew/DropdownMultiNew.d.ts +2 -1
- package/dist/types/components/DropdownNew/DropdownNew.stories.d.ts +22 -0
- package/dist/types/components/FilterPanel/FilterPanel.d.ts +1 -0
- package/dist/types/icons/CheckBoxIndeterminateIcon.d.ts +6 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9307,6 +9307,34 @@ const CheckBoxNotCheckedIcon = _ref => {
|
|
|
9307
9307
|
}));
|
|
9308
9308
|
};
|
|
9309
9309
|
|
|
9310
|
+
const CheckBoxIndeterminateIcon = ({
|
|
9311
|
+
width = "16",
|
|
9312
|
+
height = "16",
|
|
9313
|
+
color = "#1B30AA"
|
|
9314
|
+
}) => {
|
|
9315
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
9316
|
+
width: width,
|
|
9317
|
+
height: height,
|
|
9318
|
+
viewBox: "0 0 13 13",
|
|
9319
|
+
fill: "none",
|
|
9320
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9321
|
+
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
9322
|
+
x: "0.5",
|
|
9323
|
+
y: "0.642578",
|
|
9324
|
+
width: "12.25",
|
|
9325
|
+
height: "12.25",
|
|
9326
|
+
rx: "1.75",
|
|
9327
|
+
fill: color
|
|
9328
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
9329
|
+
x: "3",
|
|
9330
|
+
y: "5.892578",
|
|
9331
|
+
width: "7.25",
|
|
9332
|
+
height: "2",
|
|
9333
|
+
rx: "1",
|
|
9334
|
+
fill: "white"
|
|
9335
|
+
}));
|
|
9336
|
+
};
|
|
9337
|
+
|
|
9310
9338
|
/* eslint-disable no-nested-ternary */
|
|
9311
9339
|
const scrollableStyles$d = `
|
|
9312
9340
|
overflow-y: auto;
|
|
@@ -9545,7 +9573,8 @@ const DropdownMultiNew = ({
|
|
|
9545
9573
|
checkBoxColor,
|
|
9546
9574
|
showLabelOnTop,
|
|
9547
9575
|
orderBy,
|
|
9548
|
-
elementType
|
|
9576
|
+
elementType,
|
|
9577
|
+
showSelectAll = false
|
|
9549
9578
|
}) => {
|
|
9550
9579
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
9551
9580
|
const [showOptions, setShowOptions] = React$1.useState(false);
|
|
@@ -9651,6 +9680,22 @@ const DropdownMultiNew = ({
|
|
|
9651
9680
|
setIsFocused(true);
|
|
9652
9681
|
}
|
|
9653
9682
|
};
|
|
9683
|
+
const allSelected = options?.length > 0 && selectedOptions.length === options.length;
|
|
9684
|
+
const someSelected = selectedOptions.length > 0 && selectedOptions.length < options.length;
|
|
9685
|
+
const handleSelectAllClick = () => {
|
|
9686
|
+
if (disabled) return;
|
|
9687
|
+
if (allSelected || someSelected) {
|
|
9688
|
+
setSelectedOptions([]);
|
|
9689
|
+
onChange({
|
|
9690
|
+
newValue: []
|
|
9691
|
+
});
|
|
9692
|
+
} else {
|
|
9693
|
+
setSelectedOptions(options);
|
|
9694
|
+
onChange({
|
|
9695
|
+
newValue: options
|
|
9696
|
+
});
|
|
9697
|
+
}
|
|
9698
|
+
};
|
|
9654
9699
|
const handleClearClick = () => {
|
|
9655
9700
|
if (disabled) return;
|
|
9656
9701
|
setSelectedOptions([]);
|
|
@@ -9786,7 +9831,25 @@ const DropdownMultiNew = ({
|
|
|
9786
9831
|
showabove: showAbove,
|
|
9787
9832
|
disabled: disabled,
|
|
9788
9833
|
filteredoptions: filteredOptions
|
|
9789
|
-
},
|
|
9834
|
+
}, showSelectAll && /*#__PURE__*/React__default["default"].createElement(OptionItem$2, {
|
|
9835
|
+
className: "OptionItem",
|
|
9836
|
+
onClick: handleSelectAllClick,
|
|
9837
|
+
selected: allSelected
|
|
9838
|
+
}, /*#__PURE__*/React__default["default"].createElement(IconContainer$4, {
|
|
9839
|
+
className: "IconContainer"
|
|
9840
|
+
}, allSelected ? /*#__PURE__*/React__default["default"].createElement(CheckBoxCheckedIcon, {
|
|
9841
|
+
width: "14px",
|
|
9842
|
+
height: "14px",
|
|
9843
|
+
color: disabled ? "#888" : checkBoxColor
|
|
9844
|
+
}) : someSelected ? /*#__PURE__*/React__default["default"].createElement(CheckBoxIndeterminateIcon, {
|
|
9845
|
+
width: "14px",
|
|
9846
|
+
height: "14px",
|
|
9847
|
+
color: disabled ? "#888" : checkBoxColor
|
|
9848
|
+
}) : /*#__PURE__*/React__default["default"].createElement(CheckBoxNotCheckedIcon, {
|
|
9849
|
+
width: "14px",
|
|
9850
|
+
height: "14px",
|
|
9851
|
+
color: disabled ? "#888" : "#212121"
|
|
9852
|
+
})), "Select All"), filteredOptions.map(option => /*#__PURE__*/React__default["default"].createElement(OptionItem$2, {
|
|
9790
9853
|
className: "OptionItem",
|
|
9791
9854
|
key: option.value,
|
|
9792
9855
|
onClick: () => toggleOption(option),
|
|
@@ -9844,7 +9907,8 @@ const DropdownNew = props => {
|
|
|
9844
9907
|
errorMessage = "",
|
|
9845
9908
|
labelColor = "#066768",
|
|
9846
9909
|
checkBoxColor = "#229E38",
|
|
9847
|
-
xIconShow = true
|
|
9910
|
+
xIconShow = true,
|
|
9911
|
+
showSelectAll = false
|
|
9848
9912
|
} = props;
|
|
9849
9913
|
const handleOnChange = event => {
|
|
9850
9914
|
if (event && event.newValue && event.newValue[0]) {
|
|
@@ -9880,7 +9944,8 @@ const DropdownNew = props => {
|
|
|
9880
9944
|
onChange: handleOnChange,
|
|
9881
9945
|
showLabelOnTop: showLabelOnTop,
|
|
9882
9946
|
orderBy: orderBy,
|
|
9883
|
-
elementType: elementType
|
|
9947
|
+
elementType: elementType,
|
|
9948
|
+
showSelectAll: showSelectAll
|
|
9884
9949
|
}) : /*#__PURE__*/React__default["default"].createElement(DropdownSingleNew, {
|
|
9885
9950
|
className: "DropdownSingleNew",
|
|
9886
9951
|
placeHolder: placeHolder,
|
|
@@ -10659,24 +10724,23 @@ const QuarterPopupPicker = ({
|
|
|
10659
10724
|
};
|
|
10660
10725
|
|
|
10661
10726
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
10662
|
-
const QuarterPicker =
|
|
10663
|
-
|
|
10664
|
-
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
|
|
10670
|
-
|
|
10671
|
-
|
|
10672
|
-
|
|
10673
|
-
|
|
10674
|
-
|
|
10675
|
-
|
|
10676
|
-
|
|
10677
|
-
|
|
10678
|
-
|
|
10679
|
-
} = _ref;
|
|
10727
|
+
const QuarterPicker = ({
|
|
10728
|
+
availableQuarters,
|
|
10729
|
+
// ["Q1-2024"]
|
|
10730
|
+
label,
|
|
10731
|
+
onChange,
|
|
10732
|
+
borderRadius,
|
|
10733
|
+
required,
|
|
10734
|
+
width,
|
|
10735
|
+
height,
|
|
10736
|
+
placeholder,
|
|
10737
|
+
disabled,
|
|
10738
|
+
borderColor,
|
|
10739
|
+
borderColorFocus,
|
|
10740
|
+
textColor,
|
|
10741
|
+
selectedValue,
|
|
10742
|
+
startYear
|
|
10743
|
+
}) => {
|
|
10680
10744
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
10681
10745
|
const [isOpen, setIsOpen] = React$1.useState(false);
|
|
10682
10746
|
const [value, setValue] = React$1.useState('');
|
|
@@ -11118,23 +11182,22 @@ const MonthPopupPicker = ({
|
|
|
11118
11182
|
};
|
|
11119
11183
|
|
|
11120
11184
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
11121
|
-
const MonthPicker =
|
|
11122
|
-
|
|
11123
|
-
|
|
11124
|
-
|
|
11125
|
-
|
|
11126
|
-
|
|
11127
|
-
|
|
11128
|
-
|
|
11129
|
-
|
|
11130
|
-
|
|
11131
|
-
|
|
11132
|
-
|
|
11133
|
-
|
|
11134
|
-
|
|
11135
|
-
|
|
11136
|
-
|
|
11137
|
-
} = _ref;
|
|
11185
|
+
const MonthPicker = ({
|
|
11186
|
+
availableMonths,
|
|
11187
|
+
label,
|
|
11188
|
+
onChange,
|
|
11189
|
+
borderRadius,
|
|
11190
|
+
required,
|
|
11191
|
+
width,
|
|
11192
|
+
height,
|
|
11193
|
+
placeholder,
|
|
11194
|
+
disabled,
|
|
11195
|
+
borderColor,
|
|
11196
|
+
borderColorFocus,
|
|
11197
|
+
textColor,
|
|
11198
|
+
selectedValue,
|
|
11199
|
+
startYear
|
|
11200
|
+
}) => {
|
|
11138
11201
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
11139
11202
|
const [isOpen, setIsOpen] = React$1.useState(false);
|
|
11140
11203
|
const [value, setValue] = React$1.useState('');
|
|
@@ -11800,7 +11863,8 @@ const FilterPanel = props => {
|
|
|
11800
11863
|
onChange: eventDropdownMulti => onChangeDropdownMultiHandler(eventDropdownMulti, item),
|
|
11801
11864
|
options: item.dropdownOptions || [],
|
|
11802
11865
|
width: "100%",
|
|
11803
|
-
height: dropdownHeight
|
|
11866
|
+
height: dropdownHeight,
|
|
11867
|
+
showSelectAll: item.showSelectAll
|
|
11804
11868
|
});
|
|
11805
11869
|
break;
|
|
11806
11870
|
case 'datepicker':
|
|
@@ -11984,6 +12048,7 @@ FilterPanel.propTypes = {
|
|
|
11984
12048
|
placeHolder: PropTypes.string,
|
|
11985
12049
|
xIconShow: PropTypes.bool,
|
|
11986
12050
|
label: PropTypes.string,
|
|
12051
|
+
showSelectAll: PropTypes.bool,
|
|
11987
12052
|
labelEmptyValue: PropTypes.string,
|
|
11988
12053
|
name: PropTypes.string,
|
|
11989
12054
|
periodPickerSelectedValue: PropTypes.string,
|
|
@@ -24251,24 +24316,23 @@ const DeleteIcon = styled__default["default"].div`
|
|
|
24251
24316
|
position: absolute;
|
|
24252
24317
|
`;
|
|
24253
24318
|
|
|
24254
|
-
const QuickFilterDropdownSingle =
|
|
24255
|
-
|
|
24256
|
-
|
|
24257
|
-
|
|
24258
|
-
|
|
24259
|
-
|
|
24260
|
-
|
|
24261
|
-
|
|
24262
|
-
|
|
24263
|
-
|
|
24264
|
-
|
|
24265
|
-
|
|
24266
|
-
|
|
24267
|
-
|
|
24268
|
-
|
|
24269
|
-
|
|
24270
|
-
|
|
24271
|
-
} = _ref;
|
|
24319
|
+
const QuickFilterDropdownSingle = ({
|
|
24320
|
+
label,
|
|
24321
|
+
hoverColor,
|
|
24322
|
+
options,
|
|
24323
|
+
selectedValue,
|
|
24324
|
+
placeHolder,
|
|
24325
|
+
optionHoverColor = '#edf6ff',
|
|
24326
|
+
selectedOptionColor = "#C7E4FF",
|
|
24327
|
+
onChange,
|
|
24328
|
+
disabled,
|
|
24329
|
+
width,
|
|
24330
|
+
error,
|
|
24331
|
+
errorMessage,
|
|
24332
|
+
xIconShow,
|
|
24333
|
+
labelColor,
|
|
24334
|
+
showLabelOnTop
|
|
24335
|
+
}) => {
|
|
24272
24336
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
24273
24337
|
const [showOptions, setShowOptions] = React$1.useState(false);
|
|
24274
24338
|
const [inputValue, setInputValue] = React$1.useState("");
|
|
@@ -24726,27 +24790,26 @@ const IconContainer$2 = styled__default["default"].div`
|
|
|
24726
24790
|
cursor: pointer;
|
|
24727
24791
|
`;
|
|
24728
24792
|
|
|
24729
|
-
const QuickFilterDropdownMultiSelection =
|
|
24730
|
-
|
|
24731
|
-
|
|
24732
|
-
|
|
24733
|
-
|
|
24734
|
-
|
|
24735
|
-
|
|
24736
|
-
|
|
24737
|
-
|
|
24738
|
-
|
|
24739
|
-
|
|
24740
|
-
|
|
24741
|
-
|
|
24742
|
-
|
|
24743
|
-
|
|
24744
|
-
|
|
24745
|
-
|
|
24746
|
-
|
|
24747
|
-
|
|
24748
|
-
|
|
24749
|
-
} = _ref;
|
|
24793
|
+
const QuickFilterDropdownMultiSelection = ({
|
|
24794
|
+
label,
|
|
24795
|
+
labelEmptyValue,
|
|
24796
|
+
options,
|
|
24797
|
+
selectedValue,
|
|
24798
|
+
placeHolder,
|
|
24799
|
+
onChange,
|
|
24800
|
+
required,
|
|
24801
|
+
disabled,
|
|
24802
|
+
width,
|
|
24803
|
+
height,
|
|
24804
|
+
error,
|
|
24805
|
+
errorMessage,
|
|
24806
|
+
labelColor,
|
|
24807
|
+
optionHoverColor = '#edf6ff',
|
|
24808
|
+
xIconShow,
|
|
24809
|
+
checkBoxColor,
|
|
24810
|
+
showLabelOnTop,
|
|
24811
|
+
dropdownHeight
|
|
24812
|
+
}) => {
|
|
24750
24813
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
24751
24814
|
const [showOptions, setShowOptions] = React$1.useState(false);
|
|
24752
24815
|
const [inputValue, setInputValue] = React$1.useState('');
|
|
@@ -36297,9 +36360,9 @@ const ToggleSlider = styled__default["default"].span`
|
|
|
36297
36360
|
}
|
|
36298
36361
|
`;
|
|
36299
36362
|
|
|
36300
|
-
/**
|
|
36301
|
-
* ToggleSwitch component for on/off states.
|
|
36302
|
-
* Supports small/large sizes and disabled state.
|
|
36363
|
+
/**
|
|
36364
|
+
* ToggleSwitch component for on/off states.
|
|
36365
|
+
* Supports small/large sizes and disabled state.
|
|
36303
36366
|
*/
|
|
36304
36367
|
function ToggleSwitch(_ref) {
|
|
36305
36368
|
let {
|