oolib 2.122.1 → 2.123.0

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.
@@ -25,20 +25,20 @@ var icons_1 = require("../../../icons");
25
25
  var Tags_1 = require("../../Tags");
26
26
  var CrownSimple = icons_1.icons.CrownSimple;
27
27
  var CardContent = function (_a) {
28
- var _b, _c;
28
+ var _b, _c, _d;
29
29
  var id = _a.id, data = _a.data, config = _a.config, to = _a.to, onClick = _a.onClick, openInNewTab = _a.openInNewTab, actions = _a.actions;
30
30
  var theme = (0, styled_components_1.useTheme)();
31
31
  var parseSpecialSyntax = (theme || {}).parseSpecialSyntax;
32
32
  var showEmbedSection = !!((config === null || config === void 0 ? void 0 : config.image) || (config === null || config === void 0 ? void 0 : config.video));
33
- var _d = (0, parseCardConfig_1.parseCardConfig)({
33
+ var _e = (0, parseCardConfig_1.parseCardConfig)({
34
34
  config: config,
35
35
  data: data,
36
36
  parseSpecialSyntax: parseSpecialSyntax
37
- }), cardLabel = _d.cardLabel, title = _d.title, video = _d.video, image = _d.image, metaBlock = _d.metaBlock, tagDisplay = _d.tagDisplay, variant = _d.variant;
37
+ }), cardLabel = _e.cardLabel, title = _e.title, video = _e.video, image = _e.image, metaBlock = _e.metaBlock, tagDisplay = _e.tagDisplay, variant = _e.variant;
38
38
  var dontRenderRes = (0, dontRenderIfBothOnClickAndTo_1.dontRenderIfBothOnClickAndTo)({ onClick: onClick, to: to });
39
39
  if (dontRenderRes)
40
40
  return dontRenderRes;
41
- var _e = (0, decideLinkCompAndTarget_1.decideLinkCompAndTarget)({ to: to, openInNewTab: openInNewTab }), LinkComp = _e.LinkComp, target = _e.target, externalUrl = _e.externalUrl;
41
+ var _f = (0, decideLinkCompAndTarget_1.decideLinkCompAndTarget)({ to: to, openInNewTab: openInNewTab }), LinkComp = _f.LinkComp, target = _f.target, externalUrl = _f.externalUrl;
42
42
  return (react_1.default.createElement(LinkComp, { target: target, href: (0, injectHttps_1.injectHttps)(to), to: to },
43
43
  react_1.default.createElement(styled_2.StyledCardWrapper, { id: id, variant: variant, onClick: onClick ? function (e) { return onClick(e, data); } : undefined },
44
44
  (variant === "success") && react_1.default.createElement(styled_2.StyledCrownWrapper, null,
@@ -62,7 +62,7 @@ var CardContent = function (_a) {
62
62
  react_1.default.createElement(LineClampWrapper_1.LineClampWrapper, { noOfLines_M: 6, title: title },
63
63
  react_1.default.createElement(styled_1.StyledTitle, { capitalize: true, className: "StyledTitle" },
64
64
  react_1.default.createElement(styled_1.StyledTitleSpan, { className: "StyledTitleSpan" }, title))))) : null),
65
- ((Array.isArray(tagDisplay.data) && (tagDisplay === null || tagDisplay === void 0 ? void 0 : tagDisplay.data.length) > 0) || typeof tagDisplay === "string") && react_1.default.createElement(Tags_1.TagLink, { display: Array.isArray(tagDisplay.data) ? (_b = tagDisplay === null || tagDisplay === void 0 ? void 0 : tagDisplay.data[0]) === null || _b === void 0 ? void 0 : _b.display : tagDisplay, to: (tagDisplay === null || tagDisplay === void 0 ? void 0 : tagDisplay.collectionId) ? "/published-page/".concat(tagDisplay === null || tagDisplay === void 0 ? void 0 : tagDisplay.collectionId, "?id=").concat((_c = tagDisplay === null || tagDisplay === void 0 ? void 0 : tagDisplay.data[0]) === null || _c === void 0 ? void 0 : _c._id) : "#", color: "green" }),
65
+ ((Array.isArray(tagDisplay === null || tagDisplay === void 0 ? void 0 : tagDisplay.data) && ((_b = tagDisplay === null || tagDisplay === void 0 ? void 0 : tagDisplay.data) === null || _b === void 0 ? void 0 : _b.length) > 0) || typeof tagDisplay === "string") && react_1.default.createElement(Tags_1.TagLink, { display: Array.isArray(tagDisplay === null || tagDisplay === void 0 ? void 0 : tagDisplay.data) ? (_c = tagDisplay === null || tagDisplay === void 0 ? void 0 : tagDisplay.data[0]) === null || _c === void 0 ? void 0 : _c.display : tagDisplay, to: (tagDisplay === null || tagDisplay === void 0 ? void 0 : tagDisplay.collectionId) ? "/published-page/".concat(tagDisplay === null || tagDisplay === void 0 ? void 0 : tagDisplay.collectionId, "?id=").concat((_d = tagDisplay === null || tagDisplay === void 0 ? void 0 : tagDisplay.data[0]) === null || _d === void 0 ? void 0 : _d._id) : "#", color: "green" }),
66
66
  (metaBlock === null || metaBlock === void 0 ? void 0 : metaBlock.length) > 0 ? (react_1.default.createElement(MetaBlock_1.default, { data: data, config: metaBlock }) //show only two meta for cardContent
67
67
  ) : null),
68
68
  showEmbedSection && (react_1.default.createElement(styled_2.StyledEmbedSection, null,
@@ -19,3 +19,5 @@ export { useScreenWidth } from "../customHooks/useScreenWidth";
19
19
  export { useContainerQuery } from "../customHooks/useContainerQuery";
20
20
  export { getDaysDiff } from "../momentjs/getDaysDiff";
21
21
  export { stitchLink } from "../stitchLink";
22
+ export { decideLinkCompAndTarget } from "../../components/cards/utils/decideLinkCompAndTarget";
23
+ export { isExternalUrl } from "../../components/cards/utils/isExternalUrl";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stitchLink = exports.getDaysDiff = exports.useContainerQuery = exports.useScreenWidth = exports.testJSON = exports.useHandleClickOutside = exports.usePopOutOfOverflowHiddenParent = exports.useScroll = exports.isStringMatch = exports.sortData = exports.makeArrayFromLength = exports.toArray = exports.formatCamelCaseToSentenceCase = exports.formatTextToCamelCase = exports.injectHttps = exports.getBlockLabelProps = exports.getKeyCode = exports.getText = exports.deleteVal = exports.setVal = exports.getVal = void 0;
3
+ exports.isExternalUrl = exports.decideLinkCompAndTarget = exports.stitchLink = exports.getDaysDiff = exports.useContainerQuery = exports.useScreenWidth = exports.testJSON = exports.useHandleClickOutside = exports.usePopOutOfOverflowHiddenParent = exports.useScroll = exports.isStringMatch = exports.sortData = exports.makeArrayFromLength = exports.toArray = exports.formatCamelCaseToSentenceCase = exports.formatTextToCamelCase = exports.injectHttps = exports.getBlockLabelProps = exports.getKeyCode = exports.getText = exports.deleteVal = exports.setVal = exports.getVal = void 0;
4
4
  //the holy setter, getter & deleter
5
5
  var getVal_1 = require("../getterSetterDeleter/getVal");
6
6
  Object.defineProperty(exports, "getVal", { enumerable: true, get: function () { return getVal_1.getVal; } });
@@ -48,3 +48,7 @@ var getDaysDiff_1 = require("../momentjs/getDaysDiff");
48
48
  Object.defineProperty(exports, "getDaysDiff", { enumerable: true, get: function () { return getDaysDiff_1.getDaysDiff; } });
49
49
  var stitchLink_1 = require("../stitchLink");
50
50
  Object.defineProperty(exports, "stitchLink", { enumerable: true, get: function () { return stitchLink_1.stitchLink; } });
51
+ var decideLinkCompAndTarget_1 = require("../../components/cards/utils/decideLinkCompAndTarget");
52
+ Object.defineProperty(exports, "decideLinkCompAndTarget", { enumerable: true, get: function () { return decideLinkCompAndTarget_1.decideLinkCompAndTarget; } });
53
+ var isExternalUrl_1 = require("../../components/cards/utils/isExternalUrl");
54
+ Object.defineProperty(exports, "isExternalUrl", { enumerable: true, get: function () { return isExternalUrl_1.isExternalUrl; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.122.1",
3
+ "version": "2.123.0",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",