@royaloperahouse/chord 0.7.40 → 0.7.42

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.
package/dist/chord.esm.js CHANGED
@@ -4690,11 +4690,12 @@ var DIV_ID = 'tdWebchat';
4690
4690
  var THEME_ICON = 'https://static.roh.org.uk/logos/crest.svg';
4691
4691
  var THEME_FONT_BODY = fontFamilies.sansSerifFallback;
4692
4692
  var THEME_COLOR = core.colors.core;
4693
- var THEME_COLOR_LIGHT = core.colors.core + '99';
4694
- var THEME_COLOR_USER = core.colors.lightgrey;
4693
+ var THEME_COLOR_LIGHT = core.colors.core + '80';
4694
+ var THEME_COLOR_BLACK = core.colors.black;
4695
+ var THEME_COLOR_LIGHTGREY = core.colors.lightgrey;
4695
4696
  var THEME_COLOR_WHITE = core.colors.white;
4696
- console.log(THEME_FONT_BODY);
4697
- var SCRIPT_CONTENT = "var webchat;\n((window, document, node, props, configs) => {\n if (window.TalkdeskChatSDK) {\n console.error(\"TalkdeskChatSDK already included\");\n return;\n }\n var divContainer = document.createElement(\"div\");\n divContainer.id = node;\n document.body.appendChild(divContainer);\n var currentDate = new Date().getTime();\n var src = \"" + SCRIPT_SRC + "\" + currentDate;\n var script = document.createElement(\"script\");\n var firstScriptTag = document.getElementsByTagName(\"script\")[0];\n script.type = \"text/javascript\";\n script.charset = \"UTF-8\";\n script.id = \"tdwebchatscript\";\n script.src = src;\n script.async = true;\n firstScriptTag.parentNode.insertBefore(script, firstScriptTag);\n script.onload = () => {\n webchat = TalkdeskChatSDK(node, props);\n webchat.init(configs);\n };\n})(\n window,\n document,\n \"" + DIV_ID + "\",\n { flowId: \"cd19d348b5fb4a0ab0d3277686f28d1e\", accountId: \"\", region: \"td-us-1\" },\n { enableEmoji: true, enableUserInput: true, styles :{\n \"botIcon\": \"" + THEME_ICON + "\",\n \"chatTitle\": \"Royal Opera House\",\n \"chatThemeColor\": \"" + THEME_COLOR + "\",\n \"chatTitleIcon\": \"" + THEME_ICON + "\",\n \"customButtonColor\" : \"" + THEME_COLOR + "\",\n \"customButtonBackgroundColor\": \"" + THEME_COLOR + "\",\n \"customButtonBorderColor\": \"" + THEME_COLOR + "\",\n \"customButtonColor\": \"" + THEME_COLOR_WHITE + "\",\n \"userBackgroundColor\":\"" + THEME_COLOR_USER + "\",\n \"welcomeMessageBackgroundColor\": \"" + THEME_COLOR_LIGHT + "\",\n \"welcomeMessageContentFontSize\": \"18px\",\n \"welcomeMessageTitleFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"welcomeMessageContentFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"customMessageFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"customMessageNoBubbleFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"customButtonFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"customFieldLabelFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"customFieldInputFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"customDropdownLabelFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"customDropdownInputFontFamily\": \"" + THEME_FONT_BODY + "\",\n }}\n);";
4697
+ var THEME_COLOR_MIDGREY = core.colors.midgrey;
4698
+ var SCRIPT_CONTENT = "var webchat;\n((window, document, node, props, configs) => {\n if (window.TalkdeskChatSDK) {\n console.error(\"TalkdeskChatSDK already included\");\n return;\n }\n var divContainer = document.createElement(\"div\");\n divContainer.id = node;\n document.body.appendChild(divContainer);\n var currentDate = new Date().getTime();\n var src = \"" + SCRIPT_SRC + "\" + currentDate;\n var script = document.createElement(\"script\");\n var firstScriptTag = document.getElementsByTagName(\"script\")[0];\n script.type = \"text/javascript\";\n script.charset = \"UTF-8\";\n script.id = \"tdwebchatscript\";\n script.src = src;\n script.async = true;\n firstScriptTag.parentNode.insertBefore(script, firstScriptTag);\n script.onload = () => {\n webchat = TalkdeskChatSDK(node, props);\n webchat.init(configs);\n };\n})(\n window,\n document,\n \"" + DIV_ID + "\",\n { flowId: \"cd19d348b5fb4a0ab0d3277686f28d1e\", accountId: \"\", region: \"td-us-1\" },\n { enableEmoji: true, enableUserInput: true, styles :{\n \"botIcon\": \"" + THEME_ICON + "\",\n \"botBackgroundColor\":\"" + THEME_COLOR_LIGHTGREY + "\",\n \"botTextColor\": \"" + THEME_COLOR_BLACK + "\",\n \"chatTitle\": \"Royal Opera House\",\n \"chatThemeColor\": \"" + THEME_COLOR + "\",\n \"chatTitleIcon\": \"" + THEME_ICON + "\",\n \"customButtonBackgroundColor\": \"" + THEME_COLOR + "\",\n \"customButtonBorderColor\": \"" + THEME_COLOR + "\",\n \"customButtonColor\": \"" + THEME_COLOR_WHITE + "\",\n \"userBackgroundColor\":\"" + THEME_COLOR_LIGHTGREY + "\",\n \"userTextColor\": \"" + THEME_COLOR_BLACK + "\",\n \"userBackgroundColor\":\"" + THEME_COLOR_MIDGREY + "\",\n \"userTextColor\": \"" + THEME_COLOR_BLACK + "\",\n \"welcomeMessageBackgroundColor\": \"" + THEME_COLOR_LIGHT + "\",\n \"welcomeMessageContentFontSize\": \"18px\",\n \"welcomeMessageTitleFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"welcomeMessageContentFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"customMessageFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"customMessageNoBubbleFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"customButtonFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"customFieldLabelFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"customFieldInputFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"customDropdownLabelFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"customDropdownInputFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"startChatButtonBackgroundColor\": \"" + THEME_COLOR + "\",\n \"startChatButtonBorderColor\": \"" + THEME_COLOR + "\",\n \"startChatButtonTextColor\": \"" + THEME_COLOR_WHITE + "\",\n \"startChatButtonHoverBackgroundColor\": \"" + THEME_COLOR + "\",\n \"startChatButtonHoverBorderColor\": \"" + THEME_COLOR + "\",\n \"startChatButtonHoverTextColor\": \"" + THEME_COLOR_WHITE + "\",\n \"startChatButtonFontFamily\": \"" + THEME_FONT_BODY + "\",\n }}\n);";
4698
4699
 
4699
4700
  var loadLiveChatScript = function loadLiveChatScript(callback) {
4700
4701
  var existingScript = document.getElementById(DIV_ID);
@@ -5574,13 +5575,13 @@ var PromoWithTags = function PromoWithTags(_ref) {
5574
5575
  }, children)), /*#__PURE__*/React__default.createElement(PromoWithTagsContentWrapper, {
5575
5576
  "data-testid": "content-wrapper",
5576
5577
  imageToLeft: imageToLeft
5577
- }, /*#__PURE__*/React__default.createElement(PromoWithTagsContainer, null, (aboveTitleTags == null ? void 0 : aboveTitleTags.length) && /*#__PURE__*/React__default.createElement(PromoWithTagsTagWrapper, {
5578
+ }, /*#__PURE__*/React__default.createElement(PromoWithTagsContainer, null, !!(aboveTitleTags != null && aboveTitleTags.length) && /*#__PURE__*/React__default.createElement(PromoWithTagsTagWrapper, {
5578
5579
  marginBottom: 16
5579
5580
  }, /*#__PURE__*/React__default.createElement(TypeTags, {
5580
5581
  list: aboveTitleTags
5581
5582
  })), /*#__PURE__*/React__default.createElement(Header, {
5582
5583
  level: titleLevel
5583
- }, title)), subtitle && /*#__PURE__*/React__default.createElement(PromoWithTagsSubtitle, null, subtitle), (underTitleTags == null ? void 0 : underTitleTags.length) && /*#__PURE__*/React__default.createElement(PromoWithTagsTagWrapper, {
5584
+ }, title)), subtitle && /*#__PURE__*/React__default.createElement(PromoWithTagsSubtitle, null, subtitle), !!(underTitleTags != null && underTitleTags.length) && /*#__PURE__*/React__default.createElement(PromoWithTagsTagWrapper, {
5584
5585
  marginBottom: 4
5585
5586
  }, /*#__PURE__*/React__default.createElement(TypeTags, {
5586
5587
  list: underTitleTags
@@ -5596,7 +5597,7 @@ var PromoWithTags = function PromoWithTags(_ref) {
5596
5597
  dangerouslySetInnerHTML: {
5597
5598
  __html: bottomText
5598
5599
  }
5599
- }), (textLinks == null ? void 0 : textLinks.length) && /*#__PURE__*/React__default.createElement(TextLinksContainer, null, textLinkItems), links && /*#__PURE__*/React__default.createElement(ButtonsContainer$2, {
5600
+ }), !!(textLinks != null && textLinks.length) && /*#__PURE__*/React__default.createElement(TextLinksContainer, null, textLinkItems), links && /*#__PURE__*/React__default.createElement(ButtonsContainer$2, {
5600
5601
  hasTextLinks: !!(textLinks != null && textLinks.length),
5601
5602
  "data-testid": "buttons-wrapper",
5602
5603
  primaryButtonTextLength: primaryButtonText.length,