@mychoice/mychoice-sdk-modules 2.1.33 → 2.1.34
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/cjs/index.js +15 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +15 -5
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -3265,8 +3265,13 @@ const StepsBox = ({ formSteps, validationHooks, propertyIsCompleted, }) => {
|
|
|
3265
3265
|
const [showContent, setShowContent] = React.useState(false);
|
|
3266
3266
|
React.useEffect(() => {
|
|
3267
3267
|
const checkTime = () => {
|
|
3268
|
-
const
|
|
3269
|
-
|
|
3268
|
+
const currentUTCDate = new Date();
|
|
3269
|
+
const currentHour = currentUTCDate.getUTCHours() - 5; // EST is UTC-5
|
|
3270
|
+
const currentDay = currentUTCDate.getUTCDay(); // Sunday is 0, Monday is 1, ..., Saturday is 6
|
|
3271
|
+
// Check if it's a weekday (Monday to Friday) and if the current hour is between 9 am and 6 pm
|
|
3272
|
+
const isWeekday = currentDay >= 1 && currentDay <= 5;
|
|
3273
|
+
const isWorkingHours = currentHour >= 9 && currentHour < 18;
|
|
3274
|
+
setShowContent(isWeekday && isWorkingHours);
|
|
3270
3275
|
};
|
|
3271
3276
|
checkTime(); // Initial check
|
|
3272
3277
|
const interval = setInterval(checkTime, 60000); // Check every minute
|
|
@@ -3991,8 +3996,13 @@ const AppRouteWrapper = (props) => {
|
|
|
3991
3996
|
const [showContent, setShowContent] = React.useState(false);
|
|
3992
3997
|
React.useEffect(() => {
|
|
3993
3998
|
const checkTime = () => {
|
|
3994
|
-
const
|
|
3995
|
-
|
|
3999
|
+
const currentUTCDate = new Date();
|
|
4000
|
+
const currentHour = currentUTCDate.getUTCHours() - 5; // EST is UTC-5
|
|
4001
|
+
const currentDay = currentUTCDate.getUTCDay(); // Sunday is 0, Monday is 1, ..., Saturday is 6
|
|
4002
|
+
// Check if it's a weekday (Monday to Friday) and if the current hour is between 9 am and 6 pm
|
|
4003
|
+
const isWeekday = currentDay >= 1 && currentDay <= 5;
|
|
4004
|
+
const isWorkingHours = currentHour >= 9 && currentHour < 18;
|
|
4005
|
+
setShowContent(isWeekday && isWorkingHours);
|
|
3996
4006
|
};
|
|
3997
4007
|
checkTime(); // Initial check
|
|
3998
4008
|
const interval = setInterval(checkTime, 60000); // Check every minute
|
|
@@ -4084,7 +4094,7 @@ const AppRouteWrapper = (props) => {
|
|
|
4084
4094
|
window.removeEventListener('scroll', handleScroll);
|
|
4085
4095
|
};
|
|
4086
4096
|
}, []);
|
|
4087
|
-
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: isReady && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(AppHeader, {}), jsxRuntime.jsx(AppModal, {}), insuranceType && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(NavigationTop, { title: `${insuranceType.replace(/^./, insuranceType[0].toUpperCase())} Insurance Quote`, postalCode: postalCode, formSteps: steps, validationHooks: validationHooks, clearForm: clearFormData, propertyIsCompleted: isCompleted, id: "postalCodeData" }) })), showStickyBanner && showContent && isMobile && appType === mychoiceSdkComponents.AppTypes.MyChoice && (jsxRuntime.jsxs("div", { id: "stickyBanner", style: { position: "sticky", top: 0, color: "#FFFFFF", backgroundColor: "#8ED6DC", width: "100%", height: "75px", zIndex: 5000, display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center" }, children: [jsxRuntime.jsx("
|
|
4097
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: isReady && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(AppHeader, {}), jsxRuntime.jsx(AppModal, {}), insuranceType && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(NavigationTop, { title: `${insuranceType.replace(/^./, insuranceType[0].toUpperCase())} Insurance Quote`, postalCode: postalCode, formSteps: steps, validationHooks: validationHooks, clearForm: clearFormData, propertyIsCompleted: isCompleted, id: "postalCodeData" }) })), showStickyBanner && showContent && isMobile && appType === mychoiceSdkComponents.AppTypes.MyChoice && (jsxRuntime.jsxs("div", { id: "stickyBanner", style: { position: "sticky", top: 0, color: "#FFFFFF", backgroundColor: "#8ED6DC", width: "100%", height: "75px", zIndex: 5000, display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center" }, children: [jsxRuntime.jsx("a", { style: { fontWeight: 700, fontSize: "22px" }, href: "tel:18884534644", children: "Need Help? Give us a call at" }), jsxRuntime.jsx("a", { style: { marginTop: "5px", textDecoration: "underline", fontWeight: 850 }, href: "tel:18884534644", children: "1-888-453-4644" })] })), insuranceType && appType === mychoiceSdkComponents.AppTypes.MyChoice && (jsxRuntime.jsx("div", { className: localIndex !== mychoiceSdkComponents.defaultLocalIndex ? 'step-progress-bar-partner' : 'step-progress-bar', children: jsxRuntime.jsx("span", { style: { width: progressLength } }) })), jsxRuntime.jsx("div", { className: `${insuranceType ? 'form-page-content' : ''} ${insuranceType && appType === mychoiceSdkComponents.AppTypes.MyChoice ? 'mychoice' : ''}`, children: insuranceType && appType === mychoiceSdkComponents.AppTypes.MyChoice && isDesktop && progressLength ? (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: "mychoice-content", children: [jsxRuntime.jsx(StepsBox, { className: "step-box", formSteps: steps, validationHooks: validationHooks, propertyIsCompleted: isCompleted }), children, jsxRuntime.jsx("div", { className: "empty-steps-container" })] }) })) : children }), isMychoice && !appLoaderState.isOpen && jsxRuntime.jsx(ProviderImageFooter, {})] })) }));
|
|
4088
4098
|
};
|
|
4089
4099
|
const NestedRoutes = () => {
|
|
4090
4100
|
const insuranceType = mychoiceSdkComponents.getInsuranceType();
|