@royaloperahouse/chord 0.7.38 → 0.7.39

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/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## [0.7.39]
4
+ - Livechat: restyling
5
+
3
6
  ## [0.7.38]
4
7
  - PromoWithTitle: add styles for headings
5
8
 
@@ -102,7 +102,8 @@ var fontFamilies = {
102
102
  gothamSSmMedium: '"Gotham SSm A","Gotham SSm B","Montserrat",sans-serif',
103
103
  gothamSSm: '"Gotham SSm A","Gotham SSm B","Montserrat",sans-serif',
104
104
  sabonNextLTProRegular: 'Sabon Next LT Pro Regular',
105
- sabonNextLTProRegularItalics: 'Sabon Next LT Pro Regular Italics'
105
+ sabonNextLTProRegularItalics: 'Sabon Next LT Pro Regular Italics',
106
+ sansSerifFallback: 'Montserrat, sans-serif'
106
107
  };
107
108
  var common = {
108
109
  fonts: {
@@ -558,7 +559,8 @@ var cinema = /*#__PURE__*/_extends({}, common, {
558
559
  var themes = {
559
560
  core: core,
560
561
  stream: stream,
561
- cinema: cinema
562
+ cinema: cinema,
563
+ fontFamilies: fontFamilies
562
564
  };
563
565
 
564
566
  var _templateObject$2;
@@ -4680,12 +4682,17 @@ var TitleWithCTA = function TitleWithCTA(_ref) {
4680
4682
  };
4681
4683
 
4682
4684
  var SCRIPT_SRC = 'https://talkdeskchatsdk.talkdeskapp.com/talkdeskchatsdk.js?t=';
4683
- var THEME_COLOR = core.colors.core;
4684
4685
  var DATA_BIND = '5ea4b1ad-1a17-11ec-af32-06f09e0065e0';
4685
4686
  var DATA_ORG = '';
4686
4687
  var DIV_ID = 'tdWebchat';
4687
- var THEME_ICON = 'https://static.roh.org.uk/images/logo-crest.png';
4688
- 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 \"chatThemeColor\": \"" + THEME_COLOR + "\",\n \"chatTitleIcon\": \"" + THEME_ICON + "\"\n }}\n);";
4688
+ var THEME_ICON = 'https://static.roh.org.uk/logos/crest.svg';
4689
+ var THEME_FONT_BODY = fontFamilies.sansSerifFallback;
4690
+ var THEME_COLOR = core.colors.core;
4691
+ var THEME_COLOR_LIGHT = core.colors.core + '99';
4692
+ var THEME_COLOR_USER = core.colors.lightgrey;
4693
+ var THEME_COLOR_WHITE = core.colors.white;
4694
+ console.log(THEME_FONT_BODY);
4695
+ 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);";
4689
4696
 
4690
4697
  var loadLiveChatScript = function loadLiveChatScript(callback) {
4691
4698
  var existingScript = document.getElementById(DIV_ID);