@aslaluroba/help-center-react 3.2.13 → 3.2.14

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/index.esm.js CHANGED
@@ -39540,17 +39540,19 @@ var HelpscreenOption = _ref => {
39540
39540
  isSelected,
39541
39541
  onClick
39542
39542
  } = _ref;
39543
+ var _a;
39544
+ var chatWithUs = (_a = option.chatWithUs) !== null && _a !== void 0 ? _a : true;
39543
39545
  return jsxs("div", {
39544
- role: "button",
39545
- tabIndex: 0,
39546
- className: cn('babylai:flex babylai:flex-col babylai:gap-2 babylai:p-6 babylai:rounded-3xl babylai:text-start babylai:border babylai:border-black-white-200 babylai:bg-card babylai:cursor-pointer', 'babylai:transition-all babylai:duration-200 babylai:ease-out', 'babylai:active:scale-[0.98] babylai:active:opacity-95', isSelected && 'babylai:ring babylai:ring-primary-500 babylai:shadow-md'),
39547
- onClick: onClick,
39548
- onKeyDown: e => {
39546
+ role: chatWithUs ? 'button' : undefined,
39547
+ tabIndex: chatWithUs ? 0 : undefined,
39548
+ className: cn('babylai:flex babylai:flex-col babylai:gap-2 babylai:p-6 babylai:rounded-3xl babylai:text-start babylai:border babylai:border-black-white-200 babylai:bg-card', 'babylai:transition-all babylai:duration-200 babylai:ease-out', chatWithUs ? 'babylai:cursor-pointer babylai:active:scale-[0.98] babylai:active:opacity-95' : 'babylai:cursor-default', isSelected && 'babylai:ring babylai:ring-primary-500 babylai:shadow-md'),
39549
+ onClick: chatWithUs ? onClick : undefined,
39550
+ onKeyDown: chatWithUs ? e => {
39549
39551
  if (e.key === 'Enter' || e.key === ' ') {
39550
39552
  e.preventDefault();
39551
39553
  onClick();
39552
39554
  }
39553
- },
39555
+ } : undefined,
39554
39556
  children: [jsx("h2", {
39555
39557
  className: "babylai:text-base! babylai:font-semibold! babylai:text-card-foreground",
39556
39558
  dir: "auto",
@@ -39570,7 +39572,8 @@ var HelpscreenList = _ref => {
39570
39572
  selectedOption,
39571
39573
  onToggleOption,
39572
39574
  onStartChat,
39573
- showChatNowButton = true
39575
+ showChatNowButton = true,
39576
+ chatWithUs = true
39574
39577
  } = _ref;
39575
39578
  var {
39576
39579
  t
@@ -39589,7 +39592,7 @@ var HelpscreenList = _ref => {
39589
39592
  children: jsxs(Button, {
39590
39593
  variant: 'default',
39591
39594
  onClick: onStartChat,
39592
- disabled: !selectedOption,
39595
+ disabled: !selectedOption || !chatWithUs,
39593
39596
  children: [t('homeSdk.chatNow'), jsx(ForwardRef$8, {
39594
39597
  className: "babylai:w-6 babylai:h-6"
39595
39598
  })]
@@ -39606,7 +39609,7 @@ var OptionsListScreen = _ref => {
39606
39609
  handleMinimize,
39607
39610
  hasActiveSession = false
39608
39611
  } = _ref;
39609
- var _a, _b, _c, _d;
39612
+ var _a, _b, _c, _d, _e;
39610
39613
  var [selectedOption, setSelectedOption] = useState(null);
39611
39614
  useEffect(() => {
39612
39615
  // Reset selected option when helpScreen changes
@@ -39642,7 +39645,8 @@ var OptionsListScreen = _ref => {
39642
39645
  selectedOption: selectedOption,
39643
39646
  onToggleOption: handleToggleExpandOption,
39644
39647
  onStartChat: handleStartChatWithSelected,
39645
- showChatNowButton: !hasActiveSession
39648
+ showChatNowButton: !hasActiveSession,
39649
+ chatWithUs: (_e = helpScreen === null || helpScreen === void 0 ? void 0 : helpScreen.chatWithUs) !== null && _e !== void 0 ? _e : true
39646
39650
  })]
39647
39651
  }), jsx(PoweredBy, {})]
39648
39652
  });