oolib 2.213.1 → 2.213.3
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.
|
@@ -74,7 +74,7 @@ var BlockLabel = function (props) {
|
|
|
74
74
|
? "danger"
|
|
75
75
|
: errorMsgs[0].type || "danger";
|
|
76
76
|
var LABEL_TYPO = readOnly ? Typo2_1.UI_BODY_BOLD_SM_DF : Typo2_1.UI_BODY_SM_DF;
|
|
77
|
-
return (shouldCompRender && (react_1.default.createElement(index_styled_1.StyledBlockLabel, { style: __assign(__assign({}, style), { marginBottom: (marginBottom || (sublabel ? '0.6rem' : '0.4rem')) }), className: className,
|
|
77
|
+
return (shouldCompRender && (react_1.default.createElement(index_styled_1.StyledBlockLabel, { style: __assign(__assign({}, style), { marginBottom: (marginBottom || (sublabel ? '0.6rem' : '0.4rem')) }), className: className, sublabel: sublabel, S: S },
|
|
78
78
|
react_1.default.createElement("div", { style: { display: "flex", gap: "0.4rem" } },
|
|
79
79
|
(label || inputOnlyLabel) && (react_1.default.createElement(LABEL_TYPO, { color: disabled ? colors_1.colors.grey40 : colors_1.colors.grey80 }, label || inputOnlyLabel)),
|
|
80
80
|
!readOnly && (errorMsgs === null || errorMsgs === void 0 ? void 0 : errorMsgs.length) > 0 ? (react_1.default.createElement(InlineAlert_1.InlineAlert, { text: errText, type: errType, link: errLink, invert: invert })) : null,
|
|
@@ -11,11 +11,12 @@ var parseMetaBlockConfig = function (_a) {
|
|
|
11
11
|
//else
|
|
12
12
|
return config
|
|
13
13
|
.map(function (d) {
|
|
14
|
-
var key = d.key, valuePath = d.valuePath,
|
|
14
|
+
var key = d.key, valuePath = d.valuePath, value = d.value, //can pass a direct value instead of valuepath approach
|
|
15
|
+
prefix = d.prefix, icon = d.icon, linkConfig = d.linkConfig;
|
|
15
16
|
var display;
|
|
16
17
|
switch (key) {
|
|
17
18
|
case "name":
|
|
18
|
-
display = (0, getVal_1.getVal)(data, valuePath);
|
|
19
|
+
display = value || (0, getVal_1.getVal)(data, valuePath);
|
|
19
20
|
if (display && typeof display === 'string') {
|
|
20
21
|
//reduce surname down to initials
|
|
21
22
|
var split = display.split(" ");
|
|
@@ -25,11 +26,11 @@ var parseMetaBlockConfig = function (_a) {
|
|
|
25
26
|
}
|
|
26
27
|
break;
|
|
27
28
|
case "date":
|
|
28
|
-
display = (0, createFormattedDate_1.createFormattedDate)((0, getVal_1.getVal)(data, valuePath));
|
|
29
|
+
display = (0, createFormattedDate_1.createFormattedDate)(value || (0, getVal_1.getVal)(data, valuePath));
|
|
29
30
|
break;
|
|
30
31
|
case "text":
|
|
31
32
|
default:
|
|
32
|
-
display = (0, getVal_1.getVal)(data, valuePath);
|
|
33
|
+
display = value || (0, getVal_1.getVal)(data, valuePath);
|
|
33
34
|
}
|
|
34
35
|
if (prefix) {
|
|
35
36
|
display = "".concat(localize(prefix)).concat(display);
|
|
@@ -39,7 +40,9 @@ var parseMetaBlockConfig = function (_a) {
|
|
|
39
40
|
if (icon)
|
|
40
41
|
toReturn.icon = icon;
|
|
41
42
|
if (linkConfig)
|
|
42
|
-
toReturn.to =
|
|
43
|
+
toReturn.to = typeof linkConfig === 'string'
|
|
44
|
+
? linkConfig // basically means you can pass a direct link also
|
|
45
|
+
: (0, stitchLink_1.stitchLink)({ data: data, config: linkConfig });
|
|
43
46
|
return toReturn;
|
|
44
47
|
})
|
|
45
48
|
.filter(function (d) { return d.display !== undefined; });
|