oolib 2.213.0 → 2.213.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.
@@ -90,7 +90,7 @@ var variants = {
90
90
  var forceHover = _a.forceHover;
91
91
  return forceHover && (0, baseStyling_1.applyBlackOverlayOnHover)();
92
92
  }, (0, baseStyling_1.applyBlackOverlayOnHover)()),
93
- tertiary: (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: transparent;\n color: ", ";\n /* border: 1px solid ", "; */\n box-sizing: border-box;\n outline: 1px solid ", ";\n ", "\n\n ", "\n\n @media (hover: hover) {\n &:hover {\n ", "\n }\n }\n "], ["\n background-color: transparent;\n color: ", ";\n /* border: 1px solid ", "; */\n box-sizing: border-box;\n outline: 1px solid ", ";\n ", "\n\n ", "\n\n @media (hover: hover) {\n &:hover {\n ", "\n }\n }\n "])), grey80, colors_1.colors.grey10, grey10, function (_a) {
93
+ tertiary: (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: transparent;\n color: ", ";\n /* border: 1px solid ", "; */\n box-sizing: border-box;\n box-shadow: inset 0 0 0 1px ", ";\n ", "\n\n ", "\n\n @media (hover: hover) {\n &:hover {\n ", "\n }\n }\n "], ["\n background-color: transparent;\n color: ", ";\n /* border: 1px solid ", "; */\n box-sizing: border-box;\n box-shadow: inset 0 0 0 1px ", ";\n ", "\n\n ", "\n\n @media (hover: hover) {\n &:hover {\n ", "\n }\n }\n "])), grey80, colors_1.colors.grey10, grey10, function (_a) {
94
94
  var disabled = _a.disabled;
95
95
  return disabled && (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n pointer-events: none;\n "], ["\n color: ", ";\n pointer-events: none;\n "])), grey40);
96
96
  }, function (_a) {
@@ -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, prefix = d.prefix, icon = d.icon, linkConfig = d.linkConfig;
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 = (0, stitchLink_1.stitchLink)({ data: data, config: linkConfig });
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; });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.213.0",
3
+ "version": "2.213.2",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",