@bigbinary/neeto-molecules 1.0.38 → 1.0.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.
@@ -3010,7 +3010,9 @@ var SelectionTabs = function SelectionTabs(_ref) {
3010
3010
  };
3011
3011
 
3012
3012
  var EmbedCode = function EmbedCode(_ref) {
3013
- var _ref$primaryApp = _ref.primaryApp,
3013
+ var showSessionContext = _ref.showSessionContext,
3014
+ showUserIdentity = _ref.showUserIdentity,
3015
+ _ref$primaryApp = _ref.primaryApp,
3014
3016
  primaryApp = _ref$primaryApp === void 0 ? "" : _ref$primaryApp,
3015
3017
  _ref$maxWidth = _ref.maxWidth,
3016
3018
  maxWidth = _ref$maxWidth === void 0 ? "max-w-3xl" : _ref$maxWidth;
@@ -3050,6 +3052,8 @@ var EmbedCode = function EmbedCode(_ref) {
3050
3052
  var enabledWidgets = fromPairs(selectedWidgets.map(function (widget) {
3051
3053
  return [widget, true];
3052
3054
  }));
3055
+ var shouldShowUserIdentity = showUserIdentity !== null && showUserIdentity !== void 0 ? showUserIdentity : enabledWidgets.chat || enabledWidgets.replay;
3056
+ var shouldShowSessionContext = showSessionContext !== null && showSessionContext !== void 0 ? showSessionContext : enabledWidgets.replay;
3053
3057
  var updateSelectedWidgets = function updateSelectedWidgets(widget) {
3054
3058
  var widgetId = neetoWidgetTokens.find(function (item) {
3055
3059
  return item.clientApplicationName.toLowerCase() === widget;
@@ -3217,7 +3221,7 @@ var EmbedCode = function EmbedCode(_ref) {
3217
3221
  })
3218
3222
  },
3219
3223
  i18nKey: isNotEmpty(selectedWidgets) ? "neetoMolecules.widget.installation.instructions.placement.selectedWidgets" : "neetoMolecules.widget.installation.instructions.placement.noneOfThese"
3220
- }))), enabledWidgets.chat || enabledWidgets.replay ? /*#__PURE__*/React.createElement("div", {
3224
+ }))), shouldShowUserIdentity ? /*#__PURE__*/React.createElement("div", {
3221
3225
  className: "mb-8 w-full flex-grow flex-col items-center justify-start"
3222
3226
  }, /*#__PURE__*/React.createElement("div", {
3223
3227
  className: "mx-auto mb-2 w-full"
@@ -3243,7 +3247,7 @@ var EmbedCode = function EmbedCode(_ref) {
3243
3247
  })))
3244
3248
  })), /*#__PURE__*/React.createElement("div", {
3245
3249
  className: "w-full"
3246
- }, t("neetoMolecules.widget.installation.instructions.userIdentity"))) : null, enabledWidgets.replay ? /*#__PURE__*/React.createElement("div", {
3250
+ }, t("neetoMolecules.widget.installation.instructions.userIdentity"))) : null, shouldShowSessionContext ? /*#__PURE__*/React.createElement("div", {
3247
3251
  className: "w-full flex-grow flex-col items-center justify-start"
3248
3252
  }, /*#__PURE__*/React.createElement("div", {
3249
3253
  className: "mx-auto mb-2 w-full"