oolib 2.199.8 → 2.199.10
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const GroupHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
2
|
export const GroupDivider: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
-
export function ListGroup({ id, group, index, value, focussedOp, scrollFocussedOpIntoView, onChange: parentOnChange, optionsClassName, invert, S, observerRef, isMulti, isTagsStyle, setFocusSelectTagsInput, setSearchString, setSearchBarFocus, }: {
|
|
3
|
+
export function ListGroup({ id, group, index, value, focussedOp, scrollFocussedOpIntoView, onChange: parentOnChange, optionsClassName, invert, S, observerRef, isMulti, isTagsStyle, setFocusSelectTagsInput, setSearchString, setSearchBarFocus, groupHeaderStickyTop }: {
|
|
4
4
|
id: any;
|
|
5
5
|
group: any;
|
|
6
6
|
index: any;
|
|
@@ -17,5 +17,6 @@ export function ListGroup({ id, group, index, value, focussedOp, scrollFocussedO
|
|
|
17
17
|
setFocusSelectTagsInput: any;
|
|
18
18
|
setSearchString: any;
|
|
19
19
|
setSearchBarFocus: any;
|
|
20
|
+
groupHeaderStickyTop?: number;
|
|
20
21
|
}): React.JSX.Element;
|
|
21
22
|
import React from 'react';
|
|
@@ -14,14 +14,17 @@ var Divider_1 = require("../../Divider");
|
|
|
14
14
|
var themes_1 = require("../../../themes");
|
|
15
15
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
16
16
|
var ListItem_1 = require("./ListItem");
|
|
17
|
-
exports.GroupHeader = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 0.4rem 0.8rem;\n color: ", ";\n position: sticky;\n top:
|
|
17
|
+
exports.GroupHeader = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 0.4rem 0.8rem;\n color: ", ";\n position: sticky;\n top: ", ";\n width: 100%;\n background: white;\n z-index: 1000;\n"], ["\n padding: 0.4rem 0.8rem;\n color: ", ";\n position: sticky;\n top: ", ";\n width: 100%;\n background: white;\n z-index: 1000;\n"])), themes_1.colors.grey50, function (_a) {
|
|
18
|
+
var groupHeaderStickyTop = _a.groupHeaderStickyTop;
|
|
19
|
+
return groupHeaderStickyTop;
|
|
20
|
+
});
|
|
18
21
|
exports.GroupDivider = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin: 0.4rem 0 0.8rem 0;\n"], ["\n margin: 0.4rem 0 0.8rem 0;\n"])));
|
|
19
22
|
var ListGroup = function (_a) {
|
|
20
|
-
var id = _a.id, group = _a.group, index = _a.index, value = _a.value, focussedOp = _a.focussedOp, scrollFocussedOpIntoView = _a.scrollFocussedOpIntoView, parentOnChange = _a.onChange, optionsClassName = _a.optionsClassName, invert = _a.invert, S = _a.S, observerRef = _a.observerRef, isMulti = _a.isMulti, isTagsStyle = _a.isTagsStyle, setFocusSelectTagsInput = _a.setFocusSelectTagsInput, setSearchString = _a.setSearchString, setSearchBarFocus = _a.setSearchBarFocus;
|
|
23
|
+
var id = _a.id, group = _a.group, index = _a.index, value = _a.value, focussedOp = _a.focussedOp, scrollFocussedOpIntoView = _a.scrollFocussedOpIntoView, parentOnChange = _a.onChange, optionsClassName = _a.optionsClassName, invert = _a.invert, S = _a.S, observerRef = _a.observerRef, isMulti = _a.isMulti, isTagsStyle = _a.isTagsStyle, setFocusSelectTagsInput = _a.setFocusSelectTagsInput, setSearchString = _a.setSearchString, setSearchBarFocus = _a.setSearchBarFocus, _b = _a.groupHeaderStickyTop, groupHeaderStickyTop = _b === void 0 ? 0 : _b;
|
|
21
24
|
return (react_1.default.createElement("div", null,
|
|
22
25
|
index > 0 && (react_1.default.createElement(exports.GroupDivider, null,
|
|
23
26
|
react_1.default.createElement(Divider_1.Divider, null))),
|
|
24
|
-
react_1.default.createElement(exports.GroupHeader,
|
|
27
|
+
react_1.default.createElement(exports.GroupHeader, { groupHeaderStickyTop: groupHeaderStickyTop },
|
|
25
28
|
react_1.default.createElement(Typo2_1.UI_TAG, null, group.display)),
|
|
26
29
|
group.options.map(function (option, idx) { return (react_1.default.createElement(ListItem_1.ListItem, { key: option.value, option: option, isSelected: (!option.loading && (value === null || value === void 0 ? void 0 : value.value) === option.value), isFocussed: focussedOp === idx, index: idx, scrollFocussedOpIntoView: scrollFocussedOpIntoView, onChange: function () {
|
|
27
30
|
if (!option.loading) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const StyledListWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
2
|
export function isGroupedData(options: any): boolean;
|
|
3
|
-
export function List({ id, options, value, focussedOp, scrollFocussedOpIntoView, onChange: parentOnChange, optionsClassName, invert, S, observerRef, isMulti, isTagsStyle, setFocusSelectTagsInput, disableShadow, isSearchable, searchbarPlaceholder, searchBarFocus, searchString, setSearchString, setSearchBarFocus, children, enableBorder, style }: {
|
|
3
|
+
export function List({ id, options, value, focussedOp, scrollFocussedOpIntoView, onChange: parentOnChange, optionsClassName, invert, S, observerRef, isMulti, isTagsStyle, setFocusSelectTagsInput, disableShadow, isSearchable, searchbarPlaceholder, searchBarFocus, searchString, setSearchString, setSearchBarFocus, children, enableBorder, style, groupHeaderStickyTop }: {
|
|
4
4
|
id: any;
|
|
5
5
|
options?: any[];
|
|
6
6
|
value: any;
|
|
@@ -24,5 +24,6 @@ export function List({ id, options, value, focussedOp, scrollFocussedOpIntoView,
|
|
|
24
24
|
children: any;
|
|
25
25
|
enableBorder: any;
|
|
26
26
|
style: any;
|
|
27
|
+
groupHeaderStickyTop: any;
|
|
27
28
|
}): React.JSX.Element;
|
|
28
29
|
import React from 'react';
|
|
@@ -67,13 +67,13 @@ var isGroupedData = function (options) {
|
|
|
67
67
|
exports.isGroupedData = isGroupedData;
|
|
68
68
|
var List = function (_a) {
|
|
69
69
|
// const theme = useTheme();
|
|
70
|
-
var id = _a.id, _b = _a.options, options = _b === void 0 ? [] : _b, value = _a.value, focussedOp = _a.focussedOp, scrollFocussedOpIntoView = _a.scrollFocussedOpIntoView, parentOnChange = _a.onChange, optionsClassName = _a.optionsClassName, invert = _a.invert, S = _a.S, observerRef = _a.observerRef, _c = _a.isMulti, isMulti = _c === void 0 ? false : _c, isTagsStyle = _a.isTagsStyle, setFocusSelectTagsInput = _a.setFocusSelectTagsInput, disableShadow = _a.disableShadow, isSearchable = _a.isSearchable, searchbarPlaceholder = _a.searchbarPlaceholder, searchBarFocus = _a.searchBarFocus, searchString = _a.searchString, setSearchString = _a.setSearchString, setSearchBarFocus = _a.setSearchBarFocus, children = _a.children, enableBorder = _a.enableBorder, style = _a.style;
|
|
70
|
+
var id = _a.id, _b = _a.options, options = _b === void 0 ? [] : _b, value = _a.value, focussedOp = _a.focussedOp, scrollFocussedOpIntoView = _a.scrollFocussedOpIntoView, parentOnChange = _a.onChange, optionsClassName = _a.optionsClassName, invert = _a.invert, S = _a.S, observerRef = _a.observerRef, _c = _a.isMulti, isMulti = _c === void 0 ? false : _c, isTagsStyle = _a.isTagsStyle, setFocusSelectTagsInput = _a.setFocusSelectTagsInput, disableShadow = _a.disableShadow, isSearchable = _a.isSearchable, searchbarPlaceholder = _a.searchbarPlaceholder, searchBarFocus = _a.searchBarFocus, searchString = _a.searchString, setSearchString = _a.setSearchString, setSearchBarFocus = _a.setSearchBarFocus, children = _a.children, enableBorder = _a.enableBorder, style = _a.style, groupHeaderStickyTop = _a.groupHeaderStickyTop;
|
|
71
71
|
var renderListItems = function () {
|
|
72
72
|
if (options.length === 0) {
|
|
73
73
|
return react_1.default.createElement(NoOptionResultsComp_1.NoOptionResultsComp, { S: S });
|
|
74
74
|
}
|
|
75
75
|
if ((0, exports.isGroupedData)(options)) {
|
|
76
|
-
return (react_1.default.createElement(react_1.Fragment, null, options.map(function (group, index) { return (react_1.default.createElement(ListGroup_1.ListGroup, { id: id, key: "group-".concat(index), group: group, index: index, value: value, focussedOp: focussedOp, scrollFocussedOpIntoView: scrollFocussedOpIntoView, onChange: parentOnChange, optionsClassName: optionsClassName, invert: invert, S: S, observerRef: observerRef, isMulti: isMulti, isTagsStyle: isTagsStyle, setFocusSelectTagsInput: setFocusSelectTagsInput, setSearchString: setSearchString, setSearchBarFocus: setSearchBarFocus, disableShadow: disableShadow })); })));
|
|
76
|
+
return (react_1.default.createElement(react_1.Fragment, null, options.map(function (group, index) { return (react_1.default.createElement(ListGroup_1.ListGroup, { id: id, key: "group-".concat(index), group: group, index: index, value: value, focussedOp: focussedOp, scrollFocussedOpIntoView: scrollFocussedOpIntoView, onChange: parentOnChange, optionsClassName: optionsClassName, invert: invert, S: S, observerRef: observerRef, isMulti: isMulti, isTagsStyle: isTagsStyle, setFocusSelectTagsInput: setFocusSelectTagsInput, setSearchString: setSearchString, setSearchBarFocus: setSearchBarFocus, disableShadow: disableShadow, groupHeaderStickyTop: groupHeaderStickyTop })); })));
|
|
77
77
|
}
|
|
78
78
|
return options.map(function (option, index) { return (react_1.default.createElement(ListItem_1.ListItem, { key: option.value, option: option, isSelected: (!option.loading && (value === null || value === void 0 ? void 0 : value.value) === option.value), isFocussed: focussedOp === index, index: index, scrollFocussedOpIntoView: scrollFocussedOpIntoView, onChange: function () {
|
|
79
79
|
if (!option.loading) {
|
|
@@ -55,8 +55,8 @@ var CustomizedLabel_1 = require("./comps/CustomizedLabel");
|
|
|
55
55
|
var __1 = require("../../../..");
|
|
56
56
|
var usePrepareData_1 = require("../utils/usePrepareData");
|
|
57
57
|
var _base_barchart_ui_configs_1 = require("./_base_barchart_ui_configs");
|
|
58
|
+
var CustomTooltip_1 = __importDefault(require("./comps/CustomTooltip"));
|
|
58
59
|
var Legend_1 = require("./comps/Legend");
|
|
59
|
-
var OptimizedTooltip_1 = __importDefault(require("./comps/CustomTooltip/OptimizedTooltip"));
|
|
60
60
|
var useTrackMousePosition = function () {
|
|
61
61
|
var _a = (0, react_1.useState)({
|
|
62
62
|
x: 0,
|
|
@@ -268,7 +268,20 @@ var BarChartRenderer = function (_a) {
|
|
|
268
268
|
} },
|
|
269
269
|
react_1.default.createElement(recharts_1.XAxis, { hide: true, type: "number", domain: [0, dataMaxValue] }),
|
|
270
270
|
react_1.default.createElement(recharts_1.YAxis, { hide: true, type: "category" }),
|
|
271
|
-
isBreakdown && (react_1.default.createElement(recharts_1.Tooltip, { cursor: false,
|
|
271
|
+
isBreakdown && (react_1.default.createElement(recharts_1.Tooltip, { cursor: false,
|
|
272
|
+
// content={<OptimizedTooltip />}
|
|
273
|
+
// animationDuration={0}
|
|
274
|
+
// isAnimationActive={false}
|
|
275
|
+
// allowEscapeViewBox={{ x: false, y: false }}
|
|
276
|
+
// position={{ x: undefined, y: undefined }}
|
|
277
|
+
content: function (props) {
|
|
278
|
+
var _a;
|
|
279
|
+
return (react_1.default.createElement(CustomTooltip_1.default, __assign({}, props, { breakdownCategoryName: breakdownCategoryName, activeBar: activeBar, mousePosition: mousePosition, showPercent: showPercent,
|
|
280
|
+
// god knows why the dataindex gets stored against props.label.
|
|
281
|
+
// this is some internal recharts thing for tooltips specifically.
|
|
282
|
+
// we dont do this.
|
|
283
|
+
value: (_a = data[props.label]) === null || _a === void 0 ? void 0 : _a.map(function (item, idx) { return (__assign({}, item.labels)); }) })));
|
|
284
|
+
}, allowEscapeViewBox: { x: true, y: true } })),
|
|
272
285
|
isBreakdown
|
|
273
286
|
? data[0].map(function (_, stackIndex) {
|
|
274
287
|
//note that this map renders the individual bars within a breakdown group
|