sag_components 2.0.0-beta217 → 2.0.0-beta219
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 +139 -74
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +139 -74
- package/dist/index.js.map +1 -1
- package/dist/types/components/Table/TableBody.styles.d.ts +1 -0
- package/dist/types/components/Table/data.d.ts +17 -0
- package/dist/types/icons/HeroIcon.d.ts +6 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10590,23 +10590,24 @@ const QuarterPopupPicker = ({
|
|
|
10590
10590
|
};
|
|
10591
10591
|
|
|
10592
10592
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
10593
|
-
const QuarterPicker =
|
|
10594
|
-
|
|
10595
|
-
|
|
10596
|
-
|
|
10597
|
-
|
|
10598
|
-
|
|
10599
|
-
|
|
10600
|
-
|
|
10601
|
-
|
|
10602
|
-
|
|
10603
|
-
|
|
10604
|
-
|
|
10605
|
-
|
|
10606
|
-
|
|
10607
|
-
|
|
10608
|
-
|
|
10609
|
-
|
|
10593
|
+
const QuarterPicker = _ref => {
|
|
10594
|
+
let {
|
|
10595
|
+
availableQuarters,
|
|
10596
|
+
// ["Q1-2024"]
|
|
10597
|
+
label,
|
|
10598
|
+
onChange,
|
|
10599
|
+
borderRadius,
|
|
10600
|
+
required,
|
|
10601
|
+
width,
|
|
10602
|
+
height,
|
|
10603
|
+
placeholder,
|
|
10604
|
+
disabled,
|
|
10605
|
+
borderColor,
|
|
10606
|
+
borderColorFocus,
|
|
10607
|
+
textColor,
|
|
10608
|
+
selectedValue,
|
|
10609
|
+
startYear
|
|
10610
|
+
} = _ref;
|
|
10610
10611
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
10611
10612
|
const [isOpen, setIsOpen] = React$1.useState(false);
|
|
10612
10613
|
const [value, setValue] = React$1.useState('');
|
|
@@ -11048,22 +11049,23 @@ const MonthPopupPicker = ({
|
|
|
11048
11049
|
};
|
|
11049
11050
|
|
|
11050
11051
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
11051
|
-
const MonthPicker =
|
|
11052
|
-
|
|
11053
|
-
|
|
11054
|
-
|
|
11055
|
-
|
|
11056
|
-
|
|
11057
|
-
|
|
11058
|
-
|
|
11059
|
-
|
|
11060
|
-
|
|
11061
|
-
|
|
11062
|
-
|
|
11063
|
-
|
|
11064
|
-
|
|
11065
|
-
|
|
11066
|
-
|
|
11052
|
+
const MonthPicker = _ref => {
|
|
11053
|
+
let {
|
|
11054
|
+
availableMonths,
|
|
11055
|
+
label,
|
|
11056
|
+
onChange,
|
|
11057
|
+
borderRadius,
|
|
11058
|
+
required,
|
|
11059
|
+
width,
|
|
11060
|
+
height,
|
|
11061
|
+
placeholder,
|
|
11062
|
+
disabled,
|
|
11063
|
+
borderColor,
|
|
11064
|
+
borderColorFocus,
|
|
11065
|
+
textColor,
|
|
11066
|
+
selectedValue,
|
|
11067
|
+
startYear
|
|
11068
|
+
} = _ref;
|
|
11067
11069
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
11068
11070
|
const [isOpen, setIsOpen] = React$1.useState(false);
|
|
11069
11071
|
const [value, setValue] = React$1.useState('');
|
|
@@ -24174,21 +24176,22 @@ const DeleteIcon = styled__default["default"].div`
|
|
|
24174
24176
|
position: absolute;
|
|
24175
24177
|
`;
|
|
24176
24178
|
|
|
24177
|
-
const QuickFilterDropdownSingle =
|
|
24178
|
-
|
|
24179
|
-
|
|
24180
|
-
|
|
24181
|
-
|
|
24182
|
-
|
|
24183
|
-
|
|
24184
|
-
|
|
24185
|
-
|
|
24186
|
-
|
|
24187
|
-
|
|
24188
|
-
|
|
24189
|
-
|
|
24190
|
-
|
|
24191
|
-
|
|
24179
|
+
const QuickFilterDropdownSingle = _ref => {
|
|
24180
|
+
let {
|
|
24181
|
+
label,
|
|
24182
|
+
hoverColor,
|
|
24183
|
+
options,
|
|
24184
|
+
selectedValue,
|
|
24185
|
+
placeHolder,
|
|
24186
|
+
onChange,
|
|
24187
|
+
disabled,
|
|
24188
|
+
width,
|
|
24189
|
+
error,
|
|
24190
|
+
errorMessage,
|
|
24191
|
+
xIconShow,
|
|
24192
|
+
labelColor,
|
|
24193
|
+
showLabelOnTop
|
|
24194
|
+
} = _ref;
|
|
24192
24195
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
24193
24196
|
const [showOptions, setShowOptions] = React$1.useState(false);
|
|
24194
24197
|
const [inputValue, setInputValue] = React$1.useState("");
|
|
@@ -24645,25 +24648,26 @@ const IconContainer$2 = styled__default["default"].div`
|
|
|
24645
24648
|
cursor: pointer;
|
|
24646
24649
|
`;
|
|
24647
24650
|
|
|
24648
|
-
const QuickFilterDropdownMultiSelection =
|
|
24649
|
-
|
|
24650
|
-
|
|
24651
|
-
|
|
24652
|
-
|
|
24653
|
-
|
|
24654
|
-
|
|
24655
|
-
|
|
24656
|
-
|
|
24657
|
-
|
|
24658
|
-
|
|
24659
|
-
|
|
24660
|
-
|
|
24661
|
-
|
|
24662
|
-
|
|
24663
|
-
|
|
24664
|
-
|
|
24665
|
-
|
|
24666
|
-
|
|
24651
|
+
const QuickFilterDropdownMultiSelection = _ref => {
|
|
24652
|
+
let {
|
|
24653
|
+
label,
|
|
24654
|
+
labelEmptyValue,
|
|
24655
|
+
options,
|
|
24656
|
+
selectedValue,
|
|
24657
|
+
placeHolder,
|
|
24658
|
+
onChange,
|
|
24659
|
+
required,
|
|
24660
|
+
disabled,
|
|
24661
|
+
width,
|
|
24662
|
+
height,
|
|
24663
|
+
error,
|
|
24664
|
+
errorMessage,
|
|
24665
|
+
labelColor,
|
|
24666
|
+
xIconShow,
|
|
24667
|
+
checkBoxColor,
|
|
24668
|
+
showLabelOnTop,
|
|
24669
|
+
dropdownHeight
|
|
24670
|
+
} = _ref;
|
|
24667
24671
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
24668
24672
|
const [showOptions, setShowOptions] = React$1.useState(false);
|
|
24669
24673
|
const [inputValue, setInputValue] = React$1.useState('');
|
|
@@ -36147,9 +36151,9 @@ const ToggleSlider = styled__default["default"].span`
|
|
|
36147
36151
|
}
|
|
36148
36152
|
`;
|
|
36149
36153
|
|
|
36150
|
-
/**
|
|
36151
|
-
* ToggleSwitch component for on/off states.
|
|
36152
|
-
* Supports small/large sizes and disabled state.
|
|
36154
|
+
/**
|
|
36155
|
+
* ToggleSwitch component for on/off states.
|
|
36156
|
+
* Supports small/large sizes and disabled state.
|
|
36153
36157
|
*/
|
|
36154
36158
|
function ToggleSwitch(_ref) {
|
|
36155
36159
|
let {
|
|
@@ -39621,6 +39625,14 @@ styled__default["default"].div`
|
|
|
39621
39625
|
}
|
|
39622
39626
|
`}
|
|
39623
39627
|
`;
|
|
39628
|
+
const HeroButton = styled__default["default"].button`
|
|
39629
|
+
display: flex;
|
|
39630
|
+
align-items: center;
|
|
39631
|
+
justify-content: center;
|
|
39632
|
+
cursor: pointer;
|
|
39633
|
+
background-color: transparent;
|
|
39634
|
+
border: none;
|
|
39635
|
+
`;
|
|
39624
39636
|
|
|
39625
39637
|
// MessageBox.styles.js
|
|
39626
39638
|
const ModalOverlay = styled__default["default"].div`
|
|
@@ -40084,6 +40096,38 @@ Dropdown.propTypes = {
|
|
|
40084
40096
|
placeholder: PropTypes.string
|
|
40085
40097
|
};
|
|
40086
40098
|
|
|
40099
|
+
const HeroIcon = ({
|
|
40100
|
+
width = '12',
|
|
40101
|
+
height = '16',
|
|
40102
|
+
full = false
|
|
40103
|
+
}) => full ? /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
40104
|
+
width: width,
|
|
40105
|
+
height: height,
|
|
40106
|
+
viewBox: "0 0 12 16",
|
|
40107
|
+
fill: "none",
|
|
40108
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
40109
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
40110
|
+
d: "M0 1.5V15.2406C0 15.6594 0.340625 16 0.759375 16C0.915625 16 1.06875 15.9531 1.19687 15.8625L6 12.5L10.8031 15.8625C10.9313 15.9531 11.0844 16 11.2406 16C11.6594 16 12 15.6594 12 15.2406V1.5C12 0.671875 11.3281 0 10.5 0H1.5C0.671875 0 0 0.671875 0 1.5Z",
|
|
40111
|
+
fill: "#066768"
|
|
40112
|
+
})) : /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
40113
|
+
width: width,
|
|
40114
|
+
height: height,
|
|
40115
|
+
viewBox: "0 0 12 16",
|
|
40116
|
+
fill: "none",
|
|
40117
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
40118
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
40119
|
+
"clip-path": "url(#clip0_2338_96732)"
|
|
40120
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
40121
|
+
d: "M0 1.5C0 0.671875 0.671875 0 1.5 0H10.5C11.3281 0 12 0.671875 12 1.5V15.3094C12 15.6906 11.6906 16 11.3094 16C11.1719 16 11.0406 15.9594 10.925 15.8844L6 12.6L1.075 15.8844C0.9625 15.9594 0.828125 16 0.690625 16C0.309375 16 0 15.6906 0 15.3094V1.5ZM1.5 1C1.225 1 1 1.225 1 1.5V14.7312L5.72188 11.5844C5.89062 11.4719 6.10938 11.4719 6.27812 11.5844L11 14.7312V1.5C11 1.225 10.775 1 10.5 1H1.5Z",
|
|
40122
|
+
fill: "#066768"
|
|
40123
|
+
})), /*#__PURE__*/React__default["default"].createElement("defs", null, /*#__PURE__*/React__default["default"].createElement("clipPath", {
|
|
40124
|
+
id: "clip0_2338_96732"
|
|
40125
|
+
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
40126
|
+
width: "12",
|
|
40127
|
+
height: "16",
|
|
40128
|
+
fill: "white"
|
|
40129
|
+
}))));
|
|
40130
|
+
|
|
40087
40131
|
// combinedShimmerHooks.js - Chrome shimmer effect integrated with your hooks
|
|
40088
40132
|
|
|
40089
40133
|
// Chrome Shimmer Component
|
|
@@ -40183,7 +40227,8 @@ const TableBody = /*#__PURE__*/React$1.forwardRef(({
|
|
|
40183
40227
|
expandedBackgroundColor = "#E6F0F0",
|
|
40184
40228
|
onDropdownSelected = () => {},
|
|
40185
40229
|
onCheckboxClick = () => {},
|
|
40186
|
-
onHeaderCheckboxClick = () => {}
|
|
40230
|
+
onHeaderCheckboxClick = () => {},
|
|
40231
|
+
onHeroClick = () => {}
|
|
40187
40232
|
}, ref) => {
|
|
40188
40233
|
// MOVE ALL VALIDATION TO THE VERY TOP BEFORE ANY HOOKS
|
|
40189
40234
|
if (!Array.isArray(data) || !Array.isArray(columns)) {
|
|
@@ -40721,6 +40766,23 @@ const TableBody = /*#__PURE__*/React$1.forwardRef(({
|
|
|
40721
40766
|
console.warn('Error formatting checkbox:', e);
|
|
40722
40767
|
return String(value || "");
|
|
40723
40768
|
}
|
|
40769
|
+
case "hero":
|
|
40770
|
+
try {
|
|
40771
|
+
if (value === null || value === undefined) return null;
|
|
40772
|
+
return /*#__PURE__*/React__default["default"].createElement(HeroButton, {
|
|
40773
|
+
onClick: e => {
|
|
40774
|
+
// e.stopPropagation();
|
|
40775
|
+
if (onHeroClick) {
|
|
40776
|
+
onHeroClick(row, !value);
|
|
40777
|
+
}
|
|
40778
|
+
}
|
|
40779
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeroIcon, {
|
|
40780
|
+
full: Boolean(value)
|
|
40781
|
+
}));
|
|
40782
|
+
} catch (e) {
|
|
40783
|
+
console.warn('Error formatting hero icon:', e);
|
|
40784
|
+
return null;
|
|
40785
|
+
}
|
|
40724
40786
|
default:
|
|
40725
40787
|
return String(value || "");
|
|
40726
40788
|
}
|
|
@@ -40954,7 +41016,8 @@ TableBody.propTypes = {
|
|
|
40954
41016
|
expandedBackgroundColor: PropTypes.string,
|
|
40955
41017
|
onDropdownSelected: PropTypes.func,
|
|
40956
41018
|
onCheckboxClick: PropTypes.func,
|
|
40957
|
-
onHeaderCheckboxClick: PropTypes.func
|
|
41019
|
+
onHeaderCheckboxClick: PropTypes.func,
|
|
41020
|
+
onHeroClick: PropTypes.func
|
|
40958
41021
|
};
|
|
40959
41022
|
TableBody.displayName = "TableBody";
|
|
40960
41023
|
|
|
@@ -44317,6 +44380,7 @@ const Table = props => {
|
|
|
44317
44380
|
onCheckboxClick = () => {},
|
|
44318
44381
|
onHeaderCheckboxClick = () => {},
|
|
44319
44382
|
headerCheckboxStates = {},
|
|
44383
|
+
onHeroClick = () => {},
|
|
44320
44384
|
// Accept ref as a regular prop
|
|
44321
44385
|
ref = null
|
|
44322
44386
|
} = props;
|
|
@@ -44468,7 +44532,8 @@ const Table = props => {
|
|
|
44468
44532
|
expandedBackgroundColor: expandedBackgroundColor,
|
|
44469
44533
|
onDropdownSelected: onDropdownSelected,
|
|
44470
44534
|
onCheckboxClick: onCheckboxClick,
|
|
44471
|
-
onHeaderCheckboxClick: onHeaderCheckboxClick
|
|
44535
|
+
onHeaderCheckboxClick: onHeaderCheckboxClick,
|
|
44536
|
+
onHeroClick: onHeroClick
|
|
44472
44537
|
})), data.length === 0 && /*#__PURE__*/React__default["default"].createElement(NoEventsParent, null, /*#__PURE__*/React__default["default"].createElement(NoEventsWrapper, null, showNoDataInSearch ? getNoDataSearchIcon(noDataSearchIcon) : getNoDataIcon(noDataIcon)), /*#__PURE__*/React__default["default"].createElement(NoEventsMessage, null, showNoDataInSearch ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("strong", null, noDataInSearchTitle), /*#__PURE__*/React__default["default"].createElement("br", null), noDataInSearchMessage) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("strong", null, noEventsTitle), /*#__PURE__*/React__default["default"].createElement("br", null), noEventsSubtitle)), !showNoDataInSearch && showNoEventsButton && /*#__PURE__*/React__default["default"].createElement(Button$1, {
|
|
44473
44538
|
height: "45px",
|
|
44474
44539
|
leftIcon: noEventsButtonIcon,
|
|
@@ -55036,7 +55101,7 @@ const OverlayDropdown = _ref => {
|
|
|
55036
55101
|
const [hoveredText, setHoveredText] = React$1.useState(null);
|
|
55037
55102
|
const [templateDialog, setTemplateDialog] = React$1.useState(null);
|
|
55038
55103
|
const [dropdownPosition, setDropdownPosition] = React$1.useState('below');
|
|
55039
|
-
const [lastDefinedGroup, setLastDefinedGroup] = React$1.useState(
|
|
55104
|
+
const [lastDefinedGroup, setLastDefinedGroup] = React$1.useState(data.find(group => group.overlayCode === 'last_defined'));
|
|
55040
55105
|
const buttonRef = React$1.useRef(null);
|
|
55041
55106
|
const dropdownRef = React$1.useRef(null);
|
|
55042
55107
|
const containerRef = React$1.useRef(null);
|