@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 +14 -10
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +14 -10
- package/dist/index.js.map +1 -1
- package/dist/ui/chatbot-popup/options-list-screen/helpscreen-list.d.ts +1 -0
- package/package.json +1 -1
- package/src/ui/chatbot-popup/options-list-screen/helpscreen-list.tsx +3 -1
- package/src/ui/chatbot-popup/options-list-screen/helpscreen-option.tsx +19 -11
- package/src/ui/chatbot-popup/options-list-screen/index.tsx +1 -0
package/dist/index.js
CHANGED
|
@@ -39560,17 +39560,19 @@ var HelpscreenOption = _ref => {
|
|
|
39560
39560
|
isSelected,
|
|
39561
39561
|
onClick
|
|
39562
39562
|
} = _ref;
|
|
39563
|
+
var _a;
|
|
39564
|
+
var chatWithUs = (_a = option.chatWithUs) !== null && _a !== void 0 ? _a : true;
|
|
39563
39565
|
return jsxRuntime.jsxs("div", {
|
|
39564
|
-
role:
|
|
39565
|
-
tabIndex: 0,
|
|
39566
|
-
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
|
|
39567
|
-
onClick: onClick,
|
|
39568
|
-
onKeyDown: e => {
|
|
39566
|
+
role: chatWithUs ? 'button' : undefined,
|
|
39567
|
+
tabIndex: chatWithUs ? 0 : undefined,
|
|
39568
|
+
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'),
|
|
39569
|
+
onClick: chatWithUs ? onClick : undefined,
|
|
39570
|
+
onKeyDown: chatWithUs ? e => {
|
|
39569
39571
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
39570
39572
|
e.preventDefault();
|
|
39571
39573
|
onClick();
|
|
39572
39574
|
}
|
|
39573
|
-
},
|
|
39575
|
+
} : undefined,
|
|
39574
39576
|
children: [jsxRuntime.jsx("h2", {
|
|
39575
39577
|
className: "babylai:text-base! babylai:font-semibold! babylai:text-card-foreground",
|
|
39576
39578
|
dir: "auto",
|
|
@@ -39590,7 +39592,8 @@ var HelpscreenList = _ref => {
|
|
|
39590
39592
|
selectedOption,
|
|
39591
39593
|
onToggleOption,
|
|
39592
39594
|
onStartChat,
|
|
39593
|
-
showChatNowButton = true
|
|
39595
|
+
showChatNowButton = true,
|
|
39596
|
+
chatWithUs = true
|
|
39594
39597
|
} = _ref;
|
|
39595
39598
|
var {
|
|
39596
39599
|
t
|
|
@@ -39609,7 +39612,7 @@ var HelpscreenList = _ref => {
|
|
|
39609
39612
|
children: jsxRuntime.jsxs(Button, {
|
|
39610
39613
|
variant: 'default',
|
|
39611
39614
|
onClick: onStartChat,
|
|
39612
|
-
disabled: !selectedOption,
|
|
39615
|
+
disabled: !selectedOption || !chatWithUs,
|
|
39613
39616
|
children: [t('homeSdk.chatNow'), jsxRuntime.jsx(ForwardRef$8, {
|
|
39614
39617
|
className: "babylai:w-6 babylai:h-6"
|
|
39615
39618
|
})]
|
|
@@ -39626,7 +39629,7 @@ var OptionsListScreen = _ref => {
|
|
|
39626
39629
|
handleMinimize,
|
|
39627
39630
|
hasActiveSession = false
|
|
39628
39631
|
} = _ref;
|
|
39629
|
-
var _a, _b, _c, _d;
|
|
39632
|
+
var _a, _b, _c, _d, _e;
|
|
39630
39633
|
var [selectedOption, setSelectedOption] = React.useState(null);
|
|
39631
39634
|
React.useEffect(() => {
|
|
39632
39635
|
// Reset selected option when helpScreen changes
|
|
@@ -39662,7 +39665,8 @@ var OptionsListScreen = _ref => {
|
|
|
39662
39665
|
selectedOption: selectedOption,
|
|
39663
39666
|
onToggleOption: handleToggleExpandOption,
|
|
39664
39667
|
onStartChat: handleStartChatWithSelected,
|
|
39665
|
-
showChatNowButton: !hasActiveSession
|
|
39668
|
+
showChatNowButton: !hasActiveSession,
|
|
39669
|
+
chatWithUs: (_e = helpScreen === null || helpScreen === void 0 ? void 0 : helpScreen.chatWithUs) !== null && _e !== void 0 ? _e : true
|
|
39666
39670
|
})]
|
|
39667
39671
|
}), jsxRuntime.jsx(PoweredBy, {})]
|
|
39668
39672
|
});
|