oolib 2.193.0 → 2.193.2
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,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.ListItem = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
4
8
|
var styled_components_1 = require("styled-components");
|
|
5
9
|
var TextLoader_1 = require("../../../../components/LoadersAndProgress/TextLoader");
|
|
6
10
|
// import { genProfileImg } from "../../Dropdowns/utils/genProfileImg";
|
|
@@ -24,26 +28,26 @@ var ListItem = function (_a) {
|
|
|
24
28
|
}
|
|
25
29
|
};
|
|
26
30
|
if (loading) {
|
|
27
|
-
return (
|
|
28
|
-
|
|
31
|
+
return (react_1.default.createElement(styled_1.StyledListItemWrapper, { isSelected: isSelected, isFocussed: isFocussed, className: "OKE-Dropdown__option", S: S },
|
|
32
|
+
react_1.default.createElement(TextLoader_1.TextLoader, { style: { width: "8rem", height: "1.5rem" } })));
|
|
29
33
|
}
|
|
30
34
|
var opIsSelected = function (thisOpData) {
|
|
31
35
|
return value === null || value === void 0 ? void 0 : value.some(function (d) { return d.value === thisOpData.value; });
|
|
32
36
|
};
|
|
33
|
-
return (
|
|
34
|
-
|
|
37
|
+
return (react_1.default.createElement(styled_1.StyledListItemWrapper, { index: index, isSelected: isSelected, isFocussed: isFocussed, className: "OKE-Dropdown__option", ref: function (el) { return isFocussed && el && scrollFocussedOpIntoView(el); }, onClick: handleClick, S: S, style: { pointerEvents: disabled && "none" } },
|
|
38
|
+
react_1.default.createElement("div", { ref: observerRef, style: {
|
|
35
39
|
display: "flex",
|
|
36
40
|
alignItems: "flex-start",
|
|
37
41
|
maxWidth: "36rem",
|
|
38
42
|
gap: icon ? "0.6rem" : "0.8rem",
|
|
39
43
|
} },
|
|
40
|
-
(image || icon || color || isMulti) && (
|
|
44
|
+
(image || icon || color || isMulti) && (react_1.default.createElement("div", { style: {
|
|
41
45
|
marginTop: "0.1rem",
|
|
42
46
|
display: "flex",
|
|
43
47
|
alignItems: "center",
|
|
44
48
|
gap: "0.5rem"
|
|
45
49
|
} },
|
|
46
|
-
isMulti && !isTagsStyle ?
|
|
50
|
+
isMulti && !isTagsStyle ? react_1.default.createElement(RadioAndCheckbox_1.CheckboxButton, { isSelected: opIsSelected(option) }) : null,
|
|
47
51
|
icon &&
|
|
48
52
|
(0, genIcon_1.genIcon)({
|
|
49
53
|
icon: icon,
|
|
@@ -52,8 +56,8 @@ var ListItem = function (_a) {
|
|
|
52
56
|
disabled: disabled
|
|
53
57
|
}),
|
|
54
58
|
color && (0, genColor_1.genColor)({ color: color }))),
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
desc && (
|
|
59
|
+
react_1.default.createElement("div", null,
|
|
60
|
+
react_1.default.createElement(TypoComp, { semibold: desc ? true : false, className: "OKE-Dropdown__optionText ".concat(optionsClassName || ""), style: { color: disabled ? grey40 : grey80 } }, (0, getText_1.getText)(display)),
|
|
61
|
+
desc && (react_1.default.createElement(Typo2_1.UI_CAPTION_DF, { className: "OKE-Dropdown__optionDesc", style: { color: disabled ? grey40 : grey60, marginTop: "0.2rem" } }, (0, getText_1.getText)(desc)))))));
|
|
58
62
|
};
|
|
59
63
|
exports.ListItem = ListItem;
|
|
@@ -77,7 +77,16 @@ var generateYAxisValues = function (barDivisions) {
|
|
|
77
77
|
}
|
|
78
78
|
// Ensure the last value is exactly barDivisions to avoid rounding errors
|
|
79
79
|
values[values.length - 1] = barDivisions;
|
|
80
|
-
|
|
80
|
+
var uniqueValues = [];
|
|
81
|
+
var seen = new Set();
|
|
82
|
+
for (var _i = 0, values_1 = values; _i < values_1.length; _i++) {
|
|
83
|
+
var value = values_1[_i];
|
|
84
|
+
if (!seen.has(value)) {
|
|
85
|
+
uniqueValues.push(value);
|
|
86
|
+
seen.add(value);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return uniqueValues;
|
|
81
90
|
};
|
|
82
91
|
exports.generateYAxisValues = generateYAxisValues;
|
|
83
92
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|