sag_components 2.0.0-beta336 → 2.0.0-beta338
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 +52 -57
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +52 -57
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -10792,24 +10792,23 @@ const QuarterPopupPicker = ({
|
|
|
10792
10792
|
};
|
|
10793
10793
|
|
|
10794
10794
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
10795
|
-
const QuarterPicker =
|
|
10796
|
-
|
|
10797
|
-
|
|
10798
|
-
|
|
10799
|
-
|
|
10800
|
-
|
|
10801
|
-
|
|
10802
|
-
|
|
10803
|
-
|
|
10804
|
-
|
|
10805
|
-
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
|
|
10809
|
-
|
|
10810
|
-
|
|
10811
|
-
|
|
10812
|
-
} = _ref;
|
|
10795
|
+
const QuarterPicker = ({
|
|
10796
|
+
availableQuarters,
|
|
10797
|
+
// ["Q1-2024"]
|
|
10798
|
+
label,
|
|
10799
|
+
onChange,
|
|
10800
|
+
borderRadius,
|
|
10801
|
+
required,
|
|
10802
|
+
width,
|
|
10803
|
+
height,
|
|
10804
|
+
placeholder,
|
|
10805
|
+
disabled,
|
|
10806
|
+
borderColor,
|
|
10807
|
+
borderColorFocus,
|
|
10808
|
+
textColor,
|
|
10809
|
+
selectedValue,
|
|
10810
|
+
startYear
|
|
10811
|
+
}) => {
|
|
10813
10812
|
const [isFocused, setIsFocused] = useState(false);
|
|
10814
10813
|
const [isOpen, setIsOpen] = useState(false);
|
|
10815
10814
|
const [value, setValue] = useState('');
|
|
@@ -11251,23 +11250,22 @@ const MonthPopupPicker = ({
|
|
|
11251
11250
|
};
|
|
11252
11251
|
|
|
11253
11252
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
11254
|
-
const MonthPicker =
|
|
11255
|
-
|
|
11256
|
-
|
|
11257
|
-
|
|
11258
|
-
|
|
11259
|
-
|
|
11260
|
-
|
|
11261
|
-
|
|
11262
|
-
|
|
11263
|
-
|
|
11264
|
-
|
|
11265
|
-
|
|
11266
|
-
|
|
11267
|
-
|
|
11268
|
-
|
|
11269
|
-
|
|
11270
|
-
} = _ref;
|
|
11253
|
+
const MonthPicker = ({
|
|
11254
|
+
availableMonths,
|
|
11255
|
+
label,
|
|
11256
|
+
onChange,
|
|
11257
|
+
borderRadius,
|
|
11258
|
+
required,
|
|
11259
|
+
width,
|
|
11260
|
+
height,
|
|
11261
|
+
placeholder,
|
|
11262
|
+
disabled,
|
|
11263
|
+
borderColor,
|
|
11264
|
+
borderColorFocus,
|
|
11265
|
+
textColor,
|
|
11266
|
+
selectedValue,
|
|
11267
|
+
startYear
|
|
11268
|
+
}) => {
|
|
11271
11269
|
const [isFocused, setIsFocused] = useState(false);
|
|
11272
11270
|
const [isOpen, setIsOpen] = useState(false);
|
|
11273
11271
|
const [value, setValue] = useState('');
|
|
@@ -11590,7 +11588,9 @@ const FilterPanel = props => {
|
|
|
11590
11588
|
};
|
|
11591
11589
|
const getSelectedValueYear = item => {
|
|
11592
11590
|
let selectedValueYear = [];
|
|
11593
|
-
if (item?.
|
|
11591
|
+
if (item?.selectedValue?.length > 0) {
|
|
11592
|
+
selectedValueYear = item.selectedValue;
|
|
11593
|
+
} else if (item?.defaultValueYears?.value) {
|
|
11594
11594
|
selectedValueYear = [item?.defaultValueYears];
|
|
11595
11595
|
}
|
|
11596
11596
|
return selectedValueYear;
|
|
@@ -40717,6 +40717,7 @@ const RangePop = props => {
|
|
|
40717
40717
|
params = [],
|
|
40718
40718
|
paramType = "Week",
|
|
40719
40719
|
onApply = () => {},
|
|
40720
|
+
onCancel = () => {},
|
|
40720
40721
|
buttonColor = "#066768",
|
|
40721
40722
|
hoverColor = "#066768",
|
|
40722
40723
|
initialValues = null
|
|
@@ -40787,6 +40788,7 @@ const RangePop = props => {
|
|
|
40787
40788
|
const handleCancel = () => {
|
|
40788
40789
|
reset();
|
|
40789
40790
|
setSelectedRadio(radioOptions[0].toLowerCase());
|
|
40791
|
+
onCancel();
|
|
40790
40792
|
};
|
|
40791
40793
|
|
|
40792
40794
|
// Validation rules
|
|
@@ -41331,7 +41333,7 @@ const TableHeader = ({
|
|
|
41331
41333
|
return true;
|
|
41332
41334
|
}
|
|
41333
41335
|
if (filterData.selectedRadio) {
|
|
41334
|
-
return filterData.selectedRadio
|
|
41336
|
+
return filterData.selectedRadio !== 'custom range';
|
|
41335
41337
|
}
|
|
41336
41338
|
return filterData.isSelectAll && filterData.excluded?.length === 0 && filterData.included?.length === 0;
|
|
41337
41339
|
};
|
|
@@ -41614,30 +41616,22 @@ const TableHeader = ({
|
|
|
41614
41616
|
} else if (rangeFilter) {
|
|
41615
41617
|
const currentFilterState = filterState[key];
|
|
41616
41618
|
|
|
41617
|
-
// Determine
|
|
41618
|
-
const isPriceColumn = key.toLowerCase().includes('price') || key.toLowerCase().includes('cost')
|
|
41619
|
+
// Determine symbol: use column prop if provided, otherwise auto-detect
|
|
41620
|
+
const isPriceColumn = key.toLowerCase().includes('price') || key.toLowerCase().includes('cost');
|
|
41621
|
+
const symbol = column.rangeFilterSymbol !== undefined ? column.rangeFilterSymbol : isPriceColumn ? '$' : '';
|
|
41622
|
+
const inputType = symbol !== undefined && symbol !== 'week' ? 'price' : 'week';
|
|
41619
41623
|
|
|
41620
41624
|
// Configure RangePop based on column type
|
|
41621
|
-
const rangeConfig =
|
|
41622
|
-
paramType: '
|
|
41623
|
-
params: [{
|
|
41624
|
-
label: 'From $',
|
|
41625
|
-
type: 'price'
|
|
41626
|
-
}, {
|
|
41627
|
-
label: 'To $',
|
|
41628
|
-
type: 'price'
|
|
41629
|
-
}],
|
|
41630
|
-
radioOptions: ['All Prices', 'Custom Range']
|
|
41631
|
-
} : {
|
|
41632
|
-
paramType: 'Week',
|
|
41625
|
+
const rangeConfig = {
|
|
41626
|
+
paramType: symbol || '#',
|
|
41633
41627
|
params: [{
|
|
41634
|
-
label: 'From',
|
|
41635
|
-
type:
|
|
41628
|
+
label: symbol ? `From ${symbol}` : 'From',
|
|
41629
|
+
type: inputType
|
|
41636
41630
|
}, {
|
|
41637
|
-
label: 'To',
|
|
41638
|
-
type:
|
|
41631
|
+
label: symbol ? `To ${symbol}` : 'To',
|
|
41632
|
+
type: inputType
|
|
41639
41633
|
}],
|
|
41640
|
-
radioOptions: [
|
|
41634
|
+
radioOptions: [`All ${title}`, 'Custom Range']
|
|
41641
41635
|
};
|
|
41642
41636
|
return /*#__PURE__*/React$1.createElement(RangePop, {
|
|
41643
41637
|
menuName: title,
|
|
@@ -41659,7 +41653,8 @@ const TableHeader = ({
|
|
|
41659
41653
|
[key]: data
|
|
41660
41654
|
}));
|
|
41661
41655
|
setVisibleFilterPopWrapper(null);
|
|
41662
|
-
}
|
|
41656
|
+
},
|
|
41657
|
+
onCancel: () => setVisibleFilterPopWrapper(null)
|
|
41663
41658
|
});
|
|
41664
41659
|
} else {
|
|
41665
41660
|
// Check if this column has an active filter (not in default state)
|