@mychoice/mychoice-sdk-modules 2.1.1 → 2.1.2
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 +1 -55
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/init/index.d.ts +0 -1
- package/dist/esm/index.js +2 -55
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/init/index.d.ts +0 -1
- package/dist/index.d.ts +1 -7
- package/package.json +3 -3
package/dist/cjs/index.js
CHANGED
|
@@ -3983,7 +3983,7 @@ const AppRouteWrapper = (props) => {
|
|
|
3983
3983
|
}
|
|
3984
3984
|
}
|
|
3985
3985
|
}, [carPostal, homePostal, lifePostal, isReady]);
|
|
3986
|
-
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: isReady && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(AppHeader, {}), jsxRuntime.jsx(AppModal, {}), insuranceType && (jsxRuntime.jsx(NavigationTop, { title: `${insuranceType.replace(/^./, insuranceType[0].toUpperCase())} Insurance Quote`, postalCode: postalCode, formSteps: steps, validationHooks: validationHooks, clearForm: clearFormData, propertyIsCompleted: isCompleted })), insuranceType && appType === mychoiceSdkComponents.AppTypes.MyChoice && (jsxRuntime.jsx("div", { className: "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 }), !appLoaderState.isOpen && jsxRuntime.jsx(ProviderImageFooter, {})] })) }));
|
|
3986
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: isReady && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(AppHeader, {}), jsxRuntime.jsx(AppModal, {}), insuranceType && (jsxRuntime.jsx(NavigationTop, { title: `${insuranceType.replace(/^./, insuranceType[0].toUpperCase())} Insurance Quote`, postalCode: postalCode, formSteps: steps, validationHooks: validationHooks, clearForm: clearFormData, propertyIsCompleted: isCompleted })), insuranceType && appType === mychoiceSdkComponents.AppTypes.MyChoice && (jsxRuntime.jsx("div", { className: "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 }), !appLoaderState.isOpen && insuranceType === mychoiceSdkComponents.InsuranceTypes.Car && jsxRuntime.jsx(ProviderImageFooter, {})] })) }));
|
|
3987
3987
|
};
|
|
3988
3988
|
const NestedRoutes = () => {
|
|
3989
3989
|
const insuranceType = mychoiceSdkComponents.getInsuranceType();
|
|
@@ -4309,59 +4309,6 @@ AppWrapper.defaultProps = {
|
|
|
4309
4309
|
insuranceType: mychoiceSdkComponents.InsuranceTypes.Car,
|
|
4310
4310
|
};
|
|
4311
4311
|
|
|
4312
|
-
const StoreConfig = () => {
|
|
4313
|
-
const { dispatchAppConfigState } = mychoiceSdkStore.useStoreAppConfig();
|
|
4314
|
-
const { dispatchDriverBaseState } = mychoiceSdkStore.useStoreFormCarDriverBase();
|
|
4315
|
-
const { dispatchVehicleState } = mychoiceSdkStore.useStoreFormCarVehicle();
|
|
4316
|
-
const { dispatchDeviceState } = mychoiceSdkStore.useStoreAppDevice();
|
|
4317
|
-
const windowResize = () => {
|
|
4318
|
-
dispatchDeviceState({
|
|
4319
|
-
type: mychoiceSdkStore.StoreConfigAppDeviceActionTypes.AppDeviceSetSize,
|
|
4320
|
-
payload: {
|
|
4321
|
-
width: window.innerWidth,
|
|
4322
|
-
height: window.innerHeight,
|
|
4323
|
-
},
|
|
4324
|
-
});
|
|
4325
|
-
};
|
|
4326
|
-
mychoiceSdkComponents.useEffectOnce(() => {
|
|
4327
|
-
dispatchDriverBaseState({
|
|
4328
|
-
type: mychoiceSdkStore.StoreFormCarDriverBaseActionTypes.FormCarDriverGetLocal,
|
|
4329
|
-
});
|
|
4330
|
-
dispatchVehicleState({
|
|
4331
|
-
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarVehicleGetLocal,
|
|
4332
|
-
});
|
|
4333
|
-
dispatchAppConfigState({
|
|
4334
|
-
type: mychoiceSdkStore.StoreConfigAppConfigActionTypes.AppConfigSetIsReady,
|
|
4335
|
-
payload: true,
|
|
4336
|
-
});
|
|
4337
|
-
window.addEventListener('resize', windowResize);
|
|
4338
|
-
windowResize();
|
|
4339
|
-
});
|
|
4340
|
-
return null;
|
|
4341
|
-
};
|
|
4342
|
-
const StoryAppWrapperConfig = (props) => {
|
|
4343
|
-
const { children } = props;
|
|
4344
|
-
const { appConfigState, dispatchAppConfigState } = mychoiceSdkStore.useStoreAppConfig();
|
|
4345
|
-
mychoiceSdkComponents.useEffectOnce(() => {
|
|
4346
|
-
dispatchAppConfigState({
|
|
4347
|
-
type: mychoiceSdkStore.StoreConfigAppConfigActionTypes.AppConfigSetDrawWrapper,
|
|
4348
|
-
payload: true,
|
|
4349
|
-
});
|
|
4350
|
-
});
|
|
4351
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(StoreConfig, {}), appConfigState.drawWrapper
|
|
4352
|
-
&& (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(AppModal, {}), children] }))] }));
|
|
4353
|
-
};
|
|
4354
|
-
const StoryAppWrapper = (props) => {
|
|
4355
|
-
const { appType, children } = props;
|
|
4356
|
-
mychoiceSdkComponents.useEffectOnce(() => {
|
|
4357
|
-
mychoiceSdkStore.initHttpResponse();
|
|
4358
|
-
});
|
|
4359
|
-
return (jsxRuntime.jsx(mychoiceSdkStore.StoreProvider, { children: jsxRuntime.jsx(reactRouterDom.BrowserRouter, { children: jsxRuntime.jsx(StoryAppWrapperConfig, { appType: appType, children: children }) }) }));
|
|
4360
|
-
};
|
|
4361
|
-
StoryAppWrapper.defaultProps = {
|
|
4362
|
-
appType: mychoiceSdkComponents.AppTypes.MyChoice,
|
|
4363
|
-
};
|
|
4364
|
-
|
|
4365
4312
|
exports.AppWrapper = AppWrapper;
|
|
4366
4313
|
exports.DateSelectFormBox = DateSelectFormBox;
|
|
4367
4314
|
exports.HeaderMyChoice = HeaderMyChoice;
|
|
@@ -4400,7 +4347,6 @@ exports.PageProperty = PageProperty;
|
|
|
4400
4347
|
exports.PageVehicle = PageVehicle;
|
|
4401
4348
|
exports.ProviderImageFooter = ProviderImageFooter;
|
|
4402
4349
|
exports.SelectFormBox = SelectFormBox;
|
|
4403
|
-
exports.StoryAppWrapper = StoryAppWrapper;
|
|
4404
4350
|
exports.SwitchButtonBox = SwitchButtonBox;
|
|
4405
4351
|
exports.capitalize = capitalize;
|
|
4406
4352
|
exports.formSteps = formSteps;
|