sceyt-chat-react-uikit 1.7.5-beta.2 → 1.7.5-beta.4

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.
@@ -24,6 +24,6 @@ declare const OGMetadata: ({ attachments, state, incoming, ogShowUrl, ogShowTitl
24
24
  infoPadding?: string | undefined;
25
25
  ogContainerMargin?: string | undefined;
26
26
  target?: string | undefined;
27
- metadataGetSuccessCallback?: ((success: boolean) => void) | undefined;
27
+ metadataGetSuccessCallback?: ((success: boolean, hasImage: boolean) => void) | undefined;
28
28
  }) => React.JSX.Element;
29
29
  export { OGMetadata };
package/index.js CHANGED
@@ -32617,10 +32617,10 @@ var OGMetadata = function OGMetadata(_ref) {
32617
32617
  }, [order]);
32618
32618
  React.useEffect(function () {
32619
32619
  if (metadataLoaded || oGMetadata !== null && oGMetadata !== void 0 && oGMetadata[attachment === null || attachment === void 0 ? void 0 : attachment.url]) {
32620
- if (metadata && metadataGetSuccessCallback && hasImage) {
32621
- metadataGetSuccessCallback(true);
32620
+ if (metadata && metadataGetSuccessCallback && (hasImage || faviconUrl)) {
32621
+ metadataGetSuccessCallback(true, hasImage);
32622
32622
  } else {
32623
- metadataGetSuccessCallback === null || metadataGetSuccessCallback === void 0 ? void 0 : metadataGetSuccessCallback(false);
32623
+ metadataGetSuccessCallback === null || metadataGetSuccessCallback === void 0 ? void 0 : metadataGetSuccessCallback(false, false);
32624
32624
  }
32625
32625
  }
32626
32626
  }, [metadata, metadataGetSuccessCallback, metadataLoaded, oGMetadata, attachment === null || attachment === void 0 ? void 0 : attachment.url, hasImage]);
@@ -32700,9 +32700,7 @@ var OGMetadata = function OGMetadata(_ref) {
32700
32700
  alt: ''
32701
32701
  })))) : textContent;
32702
32702
  }, [hasImage, elements, shouldAnimate, ogContainerShowBackground, ogShowFavicon, faviconUrl, textContent]);
32703
- return /*#__PURE__*/React__default.createElement("div", {
32704
- className: 'ogmetadata-container'
32705
- }, /*#__PURE__*/React__default.createElement(OGMetadataContainer, {
32703
+ return /*#__PURE__*/React__default.createElement(OGMetadataContainer, {
32706
32704
  showOGMetadata: !!showOGMetadata,
32707
32705
  bgColor: incoming ? incomingMessageBackgroundX : outgoingMessageBackgroundX,
32708
32706
  showBackground: ogContainerShowBackground,
@@ -32715,7 +32713,7 @@ var OGMetadata = function OGMetadata(_ref) {
32715
32713
  href: attachment === null || attachment === void 0 ? void 0 : attachment.url,
32716
32714
  target: target,
32717
32715
  rel: target === '_blank' ? 'noopener noreferrer' : undefined
32718
- }, content));
32716
+ }, content);
32719
32717
  };
32720
32718
  var sharedKeyframes = "\n @keyframes fadeInSlideUp {\n from {\n opacity: 0;\n transform: translateY(10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes expandHeight {\n from {\n max-height: 0;\n opacity: 0;\n }\n to {\n max-height: 1000px;\n opacity: 1;\n }\n }\n";
32721
32719
  var OGMetadataContainer = styled__default.div(_templateObject$C || (_templateObject$C = _taggedTemplateLiteralLoose(["\n min-width: inherit;\n max-width: inherit;\n width: 100%;\n display: grid;\n grid-template-columns: 1fr;\n background-color: ", ";\n border-radius: ", ";\n margin: ", ";\n // margin-bottom: ", ";\n padding: ", ";\n text-decoration: none;\n color: inherit;\n &:hover {\n opacity: 0.9;\n cursor: pointer;\n }\n"])), function (_ref2) {
package/index.modern.js CHANGED
@@ -32616,10 +32616,10 @@ var OGMetadata = function OGMetadata(_ref) {
32616
32616
  }, [order]);
32617
32617
  useEffect(function () {
32618
32618
  if (metadataLoaded || oGMetadata !== null && oGMetadata !== void 0 && oGMetadata[attachment === null || attachment === void 0 ? void 0 : attachment.url]) {
32619
- if (metadata && metadataGetSuccessCallback && hasImage) {
32620
- metadataGetSuccessCallback(true);
32619
+ if (metadata && metadataGetSuccessCallback && (hasImage || faviconUrl)) {
32620
+ metadataGetSuccessCallback(true, hasImage);
32621
32621
  } else {
32622
- metadataGetSuccessCallback === null || metadataGetSuccessCallback === void 0 ? void 0 : metadataGetSuccessCallback(false);
32622
+ metadataGetSuccessCallback === null || metadataGetSuccessCallback === void 0 ? void 0 : metadataGetSuccessCallback(false, false);
32623
32623
  }
32624
32624
  }
32625
32625
  }, [metadata, metadataGetSuccessCallback, metadataLoaded, oGMetadata, attachment === null || attachment === void 0 ? void 0 : attachment.url, hasImage]);
@@ -32699,9 +32699,7 @@ var OGMetadata = function OGMetadata(_ref) {
32699
32699
  alt: ''
32700
32700
  })))) : textContent;
32701
32701
  }, [hasImage, elements, shouldAnimate, ogContainerShowBackground, ogShowFavicon, faviconUrl, textContent]);
32702
- return /*#__PURE__*/React__default.createElement("div", {
32703
- className: 'ogmetadata-container'
32704
- }, /*#__PURE__*/React__default.createElement(OGMetadataContainer, {
32702
+ return /*#__PURE__*/React__default.createElement(OGMetadataContainer, {
32705
32703
  showOGMetadata: !!showOGMetadata,
32706
32704
  bgColor: incoming ? incomingMessageBackgroundX : outgoingMessageBackgroundX,
32707
32705
  showBackground: ogContainerShowBackground,
@@ -32714,7 +32712,7 @@ var OGMetadata = function OGMetadata(_ref) {
32714
32712
  href: attachment === null || attachment === void 0 ? void 0 : attachment.url,
32715
32713
  target: target,
32716
32714
  rel: target === '_blank' ? 'noopener noreferrer' : undefined
32717
- }, content));
32715
+ }, content);
32718
32716
  };
32719
32717
  var sharedKeyframes = "\n @keyframes fadeInSlideUp {\n from {\n opacity: 0;\n transform: translateY(10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes expandHeight {\n from {\n max-height: 0;\n opacity: 0;\n }\n to {\n max-height: 1000px;\n opacity: 1;\n }\n }\n";
32720
32718
  var OGMetadataContainer = styled.div(_templateObject$C || (_templateObject$C = _taggedTemplateLiteralLoose(["\n min-width: inherit;\n max-width: inherit;\n width: 100%;\n display: grid;\n grid-template-columns: 1fr;\n background-color: ", ";\n border-radius: ", ";\n margin: ", ";\n // margin-bottom: ", ";\n padding: ", ";\n text-decoration: none;\n color: inherit;\n &:hover {\n opacity: 0.9;\n cursor: pointer;\n }\n"])), function (_ref2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sceyt-chat-react-uikit",
3
- "version": "1.7.5-beta.2",
3
+ "version": "1.7.5-beta.4",
4
4
  "description": "Interactive React UI Components for Sceyt Chat.",
5
5
  "author": "Sceyt",
6
6
  "license": "MIT",