@influenzanet/case-web-app-core 2.8.9-staging → 2.9.0-staging

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/build/index.es.js CHANGED
@@ -28894,8 +28894,13 @@ var ContentRenderer = function (props) {
28894
28894
  return null;
28895
28895
  }
28896
28896
  var itemConfig = item.config;
28897
- var currentExtensionComponent = props.extensions.filter(function (ext) { return ext.name === itemConfig.config.type; });
28897
+ if (!itemConfig || !itemConfig.componentName) {
28898
+ console.warn("Extension item config is invalid: ".concat(JSON.stringify(item)));
28899
+ return null;
28900
+ }
28901
+ var currentExtensionComponent = props.extensions.filter(function (ext) { return ext.name === itemConfig.componentName; });
28898
28902
  if (!currentExtensionComponent || currentExtensionComponent.length < 1) {
28903
+ console.warn("No extension found with name: ".concat(itemConfig.componentName));
28899
28904
  return null;
28900
28905
  }
28901
28906
  var Component = currentExtensionComponent[0].component;
@@ -34554,11 +34559,16 @@ var InternalNavigator = function (props) {
34554
34559
  };
34555
34560
 
34556
34561
  var PhoneVerificationBanner = function () {
34557
- var t = useTranslation(['banner']).t;
34562
+ var t = useTranslation().t;
34558
34563
  var isAuth = useIsAuthenticated();
34559
34564
  var history = useHistory();
34560
34565
  var currentUser = useSelector(function (state) { return state.user.currentUser; });
34561
- if (!isAuth) {
34566
+ // Early returns for safety
34567
+ if (!isAuth || !currentUser) {
34568
+ return null;
34569
+ }
34570
+ // Safely check for contactInfos
34571
+ if (!currentUser.contactInfos || !Array.isArray(currentUser.contactInfos)) {
34562
34572
  return null;
34563
34573
  }
34564
34574
  // Check if user has an unverified phone number
@@ -34570,7 +34580,7 @@ var PhoneVerificationBanner = function () {
34570
34580
  var handleGoToProfile = function () {
34571
34581
  history.push('/settings');
34572
34582
  };
34573
- return (jsx("div", __assign({ className: "alert alert-warning mb-0", role: "alert", style: { borderRadius: 0 } }, { children: jsx("div", __assign({ className: "container" }, { children: jsxs("div", __assign({ className: "row align-items-center" }, { children: [jsxs("div", __assign({ className: "col-12 col-md-9" }, { children: [jsx("span", __assign({ className: "material-icons align-middle me-2", style: { fontSize: '1.5rem' } }, { children: "warning" }), void 0), jsx("strong", { children: t('banner:phoneVerification.title', 'Attenzione!') }, void 0), ' ', t('banner:phoneVerification.message', 'Il tuo numero di telefono non è ancora stato verificato.')] }), void 0), jsx("div", __assign({ className: "col-12 col-md-3 text-md-end mt-2 mt-md-0" }, { children: jsx("button", __assign({ className: "btn btn-sm btn-dark", onClick: handleGoToProfile }, { children: t('banner:phoneVerification.button', 'Verifica ora') }), void 0) }), void 0)] }), void 0) }), void 0) }), void 0));
34583
+ return (jsx("div", __assign({ className: "alert alert-warning mb-0", role: "alert", style: { borderRadius: 0 } }, { children: jsx("div", __assign({ className: "container" }, { children: jsxs("div", __assign({ className: "row align-items-center" }, { children: [jsxs("div", __assign({ className: "col-12 col-md-9" }, { children: [jsx("span", __assign({ className: "material-icons align-middle me-2", style: { fontSize: '1.5rem' } }, { children: "warning" }), void 0), jsx("strong", { children: t('phoneVerification.title') }, void 0), ' ', t('phoneVerification.message')] }), void 0), jsx("div", __assign({ className: "col-12 col-md-3 text-md-end mt-2 mt-md-0" }, { children: jsx("button", __assign({ className: "btn btn-sm btn-dark", onClick: handleGoToProfile }, { children: t('phoneVerification.button') }), void 0) }), void 0)] }), void 0) }), void 0) }), void 0));
34574
34584
  };
34575
34585
 
34576
34586
  var coreReduxActions = {