@sawport/react-sdk 0.1.0-alpha.60 → 0.1.0-alpha.62
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.js +5 -5
- package/dist/index.umd.js +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -71885,7 +71885,7 @@ function ChatWidgetScreen({
|
|
|
71885
71885
|
const [popupVisible, setPopupVisible] = useState(false);
|
|
71886
71886
|
const [offlineMode, setOfflineMode] = useState(false);
|
|
71887
71887
|
const [timeoutTriggered, setTimeoutTriggered] = useState(false);
|
|
71888
|
-
const popupTime = (_a = company == null ? void 0 : company.options) == null ? void 0 : _a.schedulePopUpTime;
|
|
71888
|
+
const popupTime = ((_a = company == null ? void 0 : company.options) == null ? void 0 : _a.schedulePopUpTime) || 5;
|
|
71889
71889
|
const {
|
|
71890
71890
|
state: {
|
|
71891
71891
|
data: {
|
|
@@ -72014,7 +72014,7 @@ function ChatWidgetScreen({
|
|
|
72014
72014
|
if (timer)
|
|
72015
72015
|
clearTimeout(timer);
|
|
72016
72016
|
return;
|
|
72017
|
-
} else if (popupTime && !agentDetails || !timeoutTriggered) {
|
|
72017
|
+
} else if (popupTime && !agentDetails && dataRef.current.wait.status === "waiting" || !timeoutTriggered && dataRef.current.wait.status === "waiting") {
|
|
72018
72018
|
clearTimeout(timer);
|
|
72019
72019
|
timer = setTimeout(() => {
|
|
72020
72020
|
setPopupVisible(true);
|
|
@@ -72518,8 +72518,8 @@ function WidgetOfflineHeader({
|
|
|
72518
72518
|
}), /* @__PURE__ */ jsx(SubTitle, {
|
|
72519
72519
|
from_day: company == null ? void 0 : company.from_day.substring(0, 3),
|
|
72520
72520
|
to_day: company == null ? void 0 : company.to_day.substring(0, 3),
|
|
72521
|
-
from_time: hooks(
|
|
72522
|
-
to_time: hooks(
|
|
72521
|
+
from_time: hooks(company == null ? void 0 : company.from_time, "hh:mm").format("hh:mm A"),
|
|
72522
|
+
to_time: hooks(company == null ? void 0 : company.to_time, "hh:mm").format("hh:mm A")
|
|
72523
72523
|
})]
|
|
72524
72524
|
});
|
|
72525
72525
|
}
|
|
@@ -74048,7 +74048,7 @@ function UnwrapWidget({
|
|
|
74048
74048
|
const endtime = hooks(company == null ? void 0 : company.to_time, "hh:mm:ss");
|
|
74049
74049
|
return !(cDay >= startDay && cDay <= endDay && now2.isAfter(time2) && now2.isBefore(endtime));
|
|
74050
74050
|
}
|
|
74051
|
-
}, [isLoadingCompany, company == null ? void 0 : company.name]);
|
|
74051
|
+
}, [isLoadingCompany, company == null ? void 0 : company.name, company == null ? void 0 : company.timezone]);
|
|
74052
74052
|
react.exports.useEffect(() => {
|
|
74053
74053
|
if (!isLoadingCompany) {
|
|
74054
74054
|
const timeout = setTimeout(() => setShowTip(true), 100);
|