@mychoice/mychoice-sdk-modules 2.1.62 → 2.1.64

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 CHANGED
@@ -3015,6 +3015,11 @@ const SectionCoverage = () => {
3015
3015
  });
3016
3016
  };
3017
3017
  const newLifeOptions = React.useMemo(() => {
3018
+ if (process.env.REACT_APP_ENV !== 'production') {
3019
+ return {
3020
+ options: mychoiceSdkComponents.lifeInsuranceTypeOptions,
3021
+ };
3022
+ }
3018
3023
  // Use different set for Ontario
3019
3024
  if (isMychoice && province === '9') {
3020
3025
  return {
@@ -3639,7 +3644,7 @@ NavigationBottomTheBig.defaultProps = {
3639
3644
 
3640
3645
  const NavigationTab = React__default["default"].memo((props) => {
3641
3646
  const { className, name, addButtonLabel, items, selectItem, removeItem, createItem, activeItemIndex = 0, maxItemCount = 5, readOnly, } = props;
3642
- const { appConfigState: { appType } } = mychoiceSdkStore.useStoreAppConfig();
3647
+ const { appConfigState: { appType }, } = mychoiceSdkStore.useStoreAppConfig();
3643
3648
  const isThebig = appType === mychoiceSdkComponents.AppTypes.TheBig;
3644
3649
  const handleButtonClick = (index) => () => {
3645
3650
  if (selectItem) {
@@ -3655,20 +3660,18 @@ const NavigationTab = React__default["default"].memo((props) => {
3655
3660
  const handleArrowClick = (direction) => {
3656
3661
  if (selectItem) {
3657
3662
  if (direction === mychoiceSdkComponents.DirectionTypes.Left) {
3658
- selectItem(((activeItemIndex - 1) > -1) ? activeItemIndex - 1 : 0);
3663
+ selectItem(activeItemIndex - 1 > -1 ? activeItemIndex - 1 : 0);
3659
3664
  }
3660
3665
  if (direction === mychoiceSdkComponents.DirectionTypes.Right) {
3661
- selectItem(((activeItemIndex + 1) < maxItemCount) ? activeItemIndex + 1 : maxItemCount);
3666
+ selectItem(activeItemIndex + 1 < maxItemCount ? activeItemIndex + 1 : maxItemCount);
3662
3667
  }
3663
3668
  }
3664
3669
  };
3665
3670
  const reduceCount = activeItemIndex === 4 ? 2 : 1;
3666
- return (jsxRuntime.jsxs("div", { className: `navigation-tab-box ${className}`, children: [(activeItemIndex > 1) && jsxRuntime.jsx(mychoiceSdkComponents.ButtonTabArrow, { onClick: () => handleArrowClick(mychoiceSdkComponents.DirectionTypes.Left) }), (activeItemIndex <= items.length - 2
3667
- && activeItemIndex < 3
3668
- && ((items.length > 2 && createItem) || (items.length > 3 && !createItem)))
3669
- && jsxRuntime.jsx(mychoiceSdkComponents.ButtonTabArrow, { onClick: () => handleArrowClick(mychoiceSdkComponents.DirectionTypes.Right), direction: mychoiceSdkComponents.DirectionTypes.Right }), jsxRuntime.jsxs("div", { className: "navigation-tab-container", style: { marginLeft: `${activeItemIndex > 1 ? `-${(activeItemIndex - reduceCount) * 9.875}rem` : '0'}` }, children: [items.map((tab, index) => (jsxRuntime.jsx(mychoiceSdkComponents.ButtonTab, { className: `${activeItemIndex === index ? 'active-tab' : 'inactive-tab'} ${isThebig ? 'thebig-bold' : 'mychoice'}`, label: tab.name, buttonClick: handleButtonClick(index), iconClick: handleIconClick(index), selfDelete: index !== 0 && !readOnly }, `${name}-${index}`))), (items.length < maxItemCount && createItem) && (jsxRuntime.jsx(mychoiceSdkComponents.ButtonTab, { className: isThebig ? 'add-thebig-medium' : 'add mychoice', label: addButtonLabel, buttonClick: createItem, selfDelete: false }))] })] }));
3670
- }, (prevProps, nextProps) => !((prevProps.items !== nextProps.items
3671
- || prevProps.activeItemIndex !== nextProps.activeItemIndex)));
3671
+ return (jsxRuntime.jsxs("div", { className: `navigation-tab-box ${className}`, children: [activeItemIndex > 1 && jsxRuntime.jsx(mychoiceSdkComponents.ButtonTabArrow, { onClick: () => handleArrowClick(mychoiceSdkComponents.DirectionTypes.Left) }), activeItemIndex <= items.length - 2 &&
3672
+ activeItemIndex < 3 &&
3673
+ ((items.length > 2 && createItem) || (items.length > 3 && !createItem)) && (jsxRuntime.jsx(mychoiceSdkComponents.ButtonTabArrow, { onClick: () => handleArrowClick(mychoiceSdkComponents.DirectionTypes.Right), direction: mychoiceSdkComponents.DirectionTypes.Right })), jsxRuntime.jsxs("div", { className: "navigation-tab-container", style: { marginLeft: `${activeItemIndex > 1 ? `-${(activeItemIndex - reduceCount) * 9.875}rem` : '0'}` }, children: [items.map((tab, index) => (jsxRuntime.jsx(mychoiceSdkComponents.ButtonTab, { className: `${activeItemIndex === index ? 'active-tab' : 'inactive-tab'} ${isThebig ? 'thebig-bold' : 'mychoice'}`, label: tab.name, buttonClick: handleButtonClick(index), iconClick: handleIconClick(index), selfDelete: index !== 0 && !readOnly }, `${name}-${index}`))), items.length < maxItemCount && createItem && (jsxRuntime.jsx(mychoiceSdkComponents.ButtonTab, { className: isThebig ? 'add-thebig-medium' : 'add mychoice', label: addButtonLabel, buttonClick: createItem, selfDelete: false }))] })] }));
3674
+ }, (prevProps, nextProps) => !(prevProps.items !== nextProps.items || prevProps.activeItemIndex !== nextProps.activeItemIndex));
3672
3675
  NavigationTab.defaultProps = {
3673
3676
  className: '',
3674
3677
  items: [],