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.d.ts
CHANGED
|
@@ -133,6 +133,7 @@ declare namespace FilterPanel {
|
|
|
133
133
|
placeHolder: PropTypes.Requireable<string>;
|
|
134
134
|
xIconShow: PropTypes.Requireable<boolean>;
|
|
135
135
|
label: PropTypes.Requireable<string>;
|
|
136
|
+
showSelectAll: PropTypes.Requireable<boolean>;
|
|
136
137
|
labelEmptyValue: PropTypes.Requireable<string>;
|
|
137
138
|
name: PropTypes.Requireable<string>;
|
|
138
139
|
periodPickerSelectedValue: PropTypes.Requireable<string>;
|
package/dist/index.esm.js
CHANGED
|
@@ -9297,6 +9297,34 @@ const CheckBoxNotCheckedIcon = _ref => {
|
|
|
9297
9297
|
}));
|
|
9298
9298
|
};
|
|
9299
9299
|
|
|
9300
|
+
const CheckBoxIndeterminateIcon = ({
|
|
9301
|
+
width = "16",
|
|
9302
|
+
height = "16",
|
|
9303
|
+
color = "#1B30AA"
|
|
9304
|
+
}) => {
|
|
9305
|
+
return /*#__PURE__*/React$1.createElement("svg", {
|
|
9306
|
+
width: width,
|
|
9307
|
+
height: height,
|
|
9308
|
+
viewBox: "0 0 13 13",
|
|
9309
|
+
fill: "none",
|
|
9310
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9311
|
+
}, /*#__PURE__*/React$1.createElement("rect", {
|
|
9312
|
+
x: "0.5",
|
|
9313
|
+
y: "0.642578",
|
|
9314
|
+
width: "12.25",
|
|
9315
|
+
height: "12.25",
|
|
9316
|
+
rx: "1.75",
|
|
9317
|
+
fill: color
|
|
9318
|
+
}), /*#__PURE__*/React$1.createElement("rect", {
|
|
9319
|
+
x: "3",
|
|
9320
|
+
y: "5.892578",
|
|
9321
|
+
width: "7.25",
|
|
9322
|
+
height: "2",
|
|
9323
|
+
rx: "1",
|
|
9324
|
+
fill: "white"
|
|
9325
|
+
}));
|
|
9326
|
+
};
|
|
9327
|
+
|
|
9300
9328
|
/* eslint-disable no-nested-ternary */
|
|
9301
9329
|
const scrollableStyles$d = `
|
|
9302
9330
|
overflow-y: auto;
|
|
@@ -9535,7 +9563,8 @@ const DropdownMultiNew = ({
|
|
|
9535
9563
|
checkBoxColor,
|
|
9536
9564
|
showLabelOnTop,
|
|
9537
9565
|
orderBy,
|
|
9538
|
-
elementType
|
|
9566
|
+
elementType,
|
|
9567
|
+
showSelectAll = false
|
|
9539
9568
|
}) => {
|
|
9540
9569
|
const [isFocused, setIsFocused] = useState(false);
|
|
9541
9570
|
const [showOptions, setShowOptions] = useState(false);
|
|
@@ -9641,6 +9670,22 @@ const DropdownMultiNew = ({
|
|
|
9641
9670
|
setIsFocused(true);
|
|
9642
9671
|
}
|
|
9643
9672
|
};
|
|
9673
|
+
const allSelected = options?.length > 0 && selectedOptions.length === options.length;
|
|
9674
|
+
const someSelected = selectedOptions.length > 0 && selectedOptions.length < options.length;
|
|
9675
|
+
const handleSelectAllClick = () => {
|
|
9676
|
+
if (disabled) return;
|
|
9677
|
+
if (allSelected || someSelected) {
|
|
9678
|
+
setSelectedOptions([]);
|
|
9679
|
+
onChange({
|
|
9680
|
+
newValue: []
|
|
9681
|
+
});
|
|
9682
|
+
} else {
|
|
9683
|
+
setSelectedOptions(options);
|
|
9684
|
+
onChange({
|
|
9685
|
+
newValue: options
|
|
9686
|
+
});
|
|
9687
|
+
}
|
|
9688
|
+
};
|
|
9644
9689
|
const handleClearClick = () => {
|
|
9645
9690
|
if (disabled) return;
|
|
9646
9691
|
setSelectedOptions([]);
|
|
@@ -9776,7 +9821,25 @@ const DropdownMultiNew = ({
|
|
|
9776
9821
|
showabove: showAbove,
|
|
9777
9822
|
disabled: disabled,
|
|
9778
9823
|
filteredoptions: filteredOptions
|
|
9779
|
-
},
|
|
9824
|
+
}, showSelectAll && /*#__PURE__*/React$1.createElement(OptionItem$2, {
|
|
9825
|
+
className: "OptionItem",
|
|
9826
|
+
onClick: handleSelectAllClick,
|
|
9827
|
+
selected: allSelected
|
|
9828
|
+
}, /*#__PURE__*/React$1.createElement(IconContainer$4, {
|
|
9829
|
+
className: "IconContainer"
|
|
9830
|
+
}, allSelected ? /*#__PURE__*/React$1.createElement(CheckBoxCheckedIcon, {
|
|
9831
|
+
width: "14px",
|
|
9832
|
+
height: "14px",
|
|
9833
|
+
color: disabled ? "#888" : checkBoxColor
|
|
9834
|
+
}) : someSelected ? /*#__PURE__*/React$1.createElement(CheckBoxIndeterminateIcon, {
|
|
9835
|
+
width: "14px",
|
|
9836
|
+
height: "14px",
|
|
9837
|
+
color: disabled ? "#888" : checkBoxColor
|
|
9838
|
+
}) : /*#__PURE__*/React$1.createElement(CheckBoxNotCheckedIcon, {
|
|
9839
|
+
width: "14px",
|
|
9840
|
+
height: "14px",
|
|
9841
|
+
color: disabled ? "#888" : "#212121"
|
|
9842
|
+
})), "Select All"), filteredOptions.map(option => /*#__PURE__*/React$1.createElement(OptionItem$2, {
|
|
9780
9843
|
className: "OptionItem",
|
|
9781
9844
|
key: option.value,
|
|
9782
9845
|
onClick: () => toggleOption(option),
|
|
@@ -9834,7 +9897,8 @@ const DropdownNew = props => {
|
|
|
9834
9897
|
errorMessage = "",
|
|
9835
9898
|
labelColor = "#066768",
|
|
9836
9899
|
checkBoxColor = "#229E38",
|
|
9837
|
-
xIconShow = true
|
|
9900
|
+
xIconShow = true,
|
|
9901
|
+
showSelectAll = false
|
|
9838
9902
|
} = props;
|
|
9839
9903
|
const handleOnChange = event => {
|
|
9840
9904
|
if (event && event.newValue && event.newValue[0]) {
|
|
@@ -9870,7 +9934,8 @@ const DropdownNew = props => {
|
|
|
9870
9934
|
onChange: handleOnChange,
|
|
9871
9935
|
showLabelOnTop: showLabelOnTop,
|
|
9872
9936
|
orderBy: orderBy,
|
|
9873
|
-
elementType: elementType
|
|
9937
|
+
elementType: elementType,
|
|
9938
|
+
showSelectAll: showSelectAll
|
|
9874
9939
|
}) : /*#__PURE__*/React$1.createElement(DropdownSingleNew, {
|
|
9875
9940
|
className: "DropdownSingleNew",
|
|
9876
9941
|
placeHolder: placeHolder,
|
|
@@ -10649,24 +10714,23 @@ const QuarterPopupPicker = ({
|
|
|
10649
10714
|
};
|
|
10650
10715
|
|
|
10651
10716
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
10652
|
-
const QuarterPicker =
|
|
10653
|
-
|
|
10654
|
-
|
|
10655
|
-
|
|
10656
|
-
|
|
10657
|
-
|
|
10658
|
-
|
|
10659
|
-
|
|
10660
|
-
|
|
10661
|
-
|
|
10662
|
-
|
|
10663
|
-
|
|
10664
|
-
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
} = _ref;
|
|
10717
|
+
const QuarterPicker = ({
|
|
10718
|
+
availableQuarters,
|
|
10719
|
+
// ["Q1-2024"]
|
|
10720
|
+
label,
|
|
10721
|
+
onChange,
|
|
10722
|
+
borderRadius,
|
|
10723
|
+
required,
|
|
10724
|
+
width,
|
|
10725
|
+
height,
|
|
10726
|
+
placeholder,
|
|
10727
|
+
disabled,
|
|
10728
|
+
borderColor,
|
|
10729
|
+
borderColorFocus,
|
|
10730
|
+
textColor,
|
|
10731
|
+
selectedValue,
|
|
10732
|
+
startYear
|
|
10733
|
+
}) => {
|
|
10670
10734
|
const [isFocused, setIsFocused] = useState(false);
|
|
10671
10735
|
const [isOpen, setIsOpen] = useState(false);
|
|
10672
10736
|
const [value, setValue] = useState('');
|
|
@@ -11108,23 +11172,22 @@ const MonthPopupPicker = ({
|
|
|
11108
11172
|
};
|
|
11109
11173
|
|
|
11110
11174
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
11111
|
-
const MonthPicker =
|
|
11112
|
-
|
|
11113
|
-
|
|
11114
|
-
|
|
11115
|
-
|
|
11116
|
-
|
|
11117
|
-
|
|
11118
|
-
|
|
11119
|
-
|
|
11120
|
-
|
|
11121
|
-
|
|
11122
|
-
|
|
11123
|
-
|
|
11124
|
-
|
|
11125
|
-
|
|
11126
|
-
|
|
11127
|
-
} = _ref;
|
|
11175
|
+
const MonthPicker = ({
|
|
11176
|
+
availableMonths,
|
|
11177
|
+
label,
|
|
11178
|
+
onChange,
|
|
11179
|
+
borderRadius,
|
|
11180
|
+
required,
|
|
11181
|
+
width,
|
|
11182
|
+
height,
|
|
11183
|
+
placeholder,
|
|
11184
|
+
disabled,
|
|
11185
|
+
borderColor,
|
|
11186
|
+
borderColorFocus,
|
|
11187
|
+
textColor,
|
|
11188
|
+
selectedValue,
|
|
11189
|
+
startYear
|
|
11190
|
+
}) => {
|
|
11128
11191
|
const [isFocused, setIsFocused] = useState(false);
|
|
11129
11192
|
const [isOpen, setIsOpen] = useState(false);
|
|
11130
11193
|
const [value, setValue] = useState('');
|
|
@@ -11790,7 +11853,8 @@ const FilterPanel = props => {
|
|
|
11790
11853
|
onChange: eventDropdownMulti => onChangeDropdownMultiHandler(eventDropdownMulti, item),
|
|
11791
11854
|
options: item.dropdownOptions || [],
|
|
11792
11855
|
width: "100%",
|
|
11793
|
-
height: dropdownHeight
|
|
11856
|
+
height: dropdownHeight,
|
|
11857
|
+
showSelectAll: item.showSelectAll
|
|
11794
11858
|
});
|
|
11795
11859
|
break;
|
|
11796
11860
|
case 'datepicker':
|
|
@@ -11974,6 +12038,7 @@ FilterPanel.propTypes = {
|
|
|
11974
12038
|
placeHolder: PropTypes.string,
|
|
11975
12039
|
xIconShow: PropTypes.bool,
|
|
11976
12040
|
label: PropTypes.string,
|
|
12041
|
+
showSelectAll: PropTypes.bool,
|
|
11977
12042
|
labelEmptyValue: PropTypes.string,
|
|
11978
12043
|
name: PropTypes.string,
|
|
11979
12044
|
periodPickerSelectedValue: PropTypes.string,
|
|
@@ -24241,24 +24306,23 @@ const DeleteIcon = styled.div`
|
|
|
24241
24306
|
position: absolute;
|
|
24242
24307
|
`;
|
|
24243
24308
|
|
|
24244
|
-
const QuickFilterDropdownSingle =
|
|
24245
|
-
|
|
24246
|
-
|
|
24247
|
-
|
|
24248
|
-
|
|
24249
|
-
|
|
24250
|
-
|
|
24251
|
-
|
|
24252
|
-
|
|
24253
|
-
|
|
24254
|
-
|
|
24255
|
-
|
|
24256
|
-
|
|
24257
|
-
|
|
24258
|
-
|
|
24259
|
-
|
|
24260
|
-
|
|
24261
|
-
} = _ref;
|
|
24309
|
+
const QuickFilterDropdownSingle = ({
|
|
24310
|
+
label,
|
|
24311
|
+
hoverColor,
|
|
24312
|
+
options,
|
|
24313
|
+
selectedValue,
|
|
24314
|
+
placeHolder,
|
|
24315
|
+
optionHoverColor = '#edf6ff',
|
|
24316
|
+
selectedOptionColor = "#C7E4FF",
|
|
24317
|
+
onChange,
|
|
24318
|
+
disabled,
|
|
24319
|
+
width,
|
|
24320
|
+
error,
|
|
24321
|
+
errorMessage,
|
|
24322
|
+
xIconShow,
|
|
24323
|
+
labelColor,
|
|
24324
|
+
showLabelOnTop
|
|
24325
|
+
}) => {
|
|
24262
24326
|
const [isFocused, setIsFocused] = useState(false);
|
|
24263
24327
|
const [showOptions, setShowOptions] = useState(false);
|
|
24264
24328
|
const [inputValue, setInputValue] = useState("");
|
|
@@ -24716,27 +24780,26 @@ const IconContainer$2 = styled.div`
|
|
|
24716
24780
|
cursor: pointer;
|
|
24717
24781
|
`;
|
|
24718
24782
|
|
|
24719
|
-
const QuickFilterDropdownMultiSelection =
|
|
24720
|
-
|
|
24721
|
-
|
|
24722
|
-
|
|
24723
|
-
|
|
24724
|
-
|
|
24725
|
-
|
|
24726
|
-
|
|
24727
|
-
|
|
24728
|
-
|
|
24729
|
-
|
|
24730
|
-
|
|
24731
|
-
|
|
24732
|
-
|
|
24733
|
-
|
|
24734
|
-
|
|
24735
|
-
|
|
24736
|
-
|
|
24737
|
-
|
|
24738
|
-
|
|
24739
|
-
} = _ref;
|
|
24783
|
+
const QuickFilterDropdownMultiSelection = ({
|
|
24784
|
+
label,
|
|
24785
|
+
labelEmptyValue,
|
|
24786
|
+
options,
|
|
24787
|
+
selectedValue,
|
|
24788
|
+
placeHolder,
|
|
24789
|
+
onChange,
|
|
24790
|
+
required,
|
|
24791
|
+
disabled,
|
|
24792
|
+
width,
|
|
24793
|
+
height,
|
|
24794
|
+
error,
|
|
24795
|
+
errorMessage,
|
|
24796
|
+
labelColor,
|
|
24797
|
+
optionHoverColor = '#edf6ff',
|
|
24798
|
+
xIconShow,
|
|
24799
|
+
checkBoxColor,
|
|
24800
|
+
showLabelOnTop,
|
|
24801
|
+
dropdownHeight
|
|
24802
|
+
}) => {
|
|
24740
24803
|
const [isFocused, setIsFocused] = useState(false);
|
|
24741
24804
|
const [showOptions, setShowOptions] = useState(false);
|
|
24742
24805
|
const [inputValue, setInputValue] = useState('');
|
|
@@ -36287,9 +36350,9 @@ const ToggleSlider = styled.span`
|
|
|
36287
36350
|
}
|
|
36288
36351
|
`;
|
|
36289
36352
|
|
|
36290
|
-
/**
|
|
36291
|
-
* ToggleSwitch component for on/off states.
|
|
36292
|
-
* Supports small/large sizes and disabled state.
|
|
36353
|
+
/**
|
|
36354
|
+
* ToggleSwitch component for on/off states.
|
|
36355
|
+
* Supports small/large sizes and disabled state.
|
|
36293
36356
|
*/
|
|
36294
36357
|
function ToggleSwitch(_ref) {
|
|
36295
36358
|
let {
|