@influenzanet/case-web-app-core 2.9.0-staging → 2.9.1-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
@@ -22736,7 +22736,7 @@ var VerifyWhatsApp = function () {
22736
22736
  if (!open) {
22737
22737
  return null;
22738
22738
  }
22739
- return (jsxs(Dialog, __assign({ open: open, title: t('verifyWhatsApp.title'), ariaLabelledBy: "verify-whatsapp-title", onClose: close, size: "sm" }, { children: [jsxs("div", __assign({ className: "".concat(defaultDialogPaddingXClass, " py-3") }, { children: [jsx("div", __assign({ className: "mb-3" }, { children: jsx("p", __assign({ className: "mb-2 small" }, { children: t("verifyWhatsApp.info") }), void 0) }), void 0), error && (jsx(AlertBox, { type: "danger", content: error, className: "mb-3" }, void 0)), jsx("div", __assign({ className: "mb-3" }, { children: jsx(TextField, { id: "verification-code", name: "verificationCode", label: t('verifyWhatsApp.codeInputLabel'), placeholder: t('verifyWhatsApp.codeInputPlaceholder'), value: verificationCode, onChange: function (event) { return setVerificationCode(event.target.value); }, maxLength: 6, autoComplete: "off" }, void 0) }), void 0)] }), void 0), jsxs("div", __assign({ className: "d-flex justify-content-between align-items-center gap-2 p-3 border-top" }, { children: [jsx(DialogBtn, { type: "button", onClick: resendCode, label: t('verifyWhatsApp.resendBtn'), loading: resendLoading, disabled: loading || !phoneNumber, className: "btn-sm" }, void 0), jsxs("div", __assign({ className: "d-flex gap-2" }, { children: [jsx(DialogBtn, { type: "button", onClick: close, label: t('verifyWhatsApp.cancelBtn'), disabled: loading || resendLoading, className: "btn-sm" }, void 0), jsx(DialogBtn, { type: "button", onClick: verifyCode, color: "primary", label: t('verifyWhatsApp.submitBtn'), loading: loading, disabled: !verificationCode.trim() || resendLoading, className: "btn-sm" }, void 0)] }), void 0)] }), void 0)] }), void 0));
22739
+ return (jsxs(Dialog, __assign({ open: open, title: t('verifyWhatsApp.title'), ariaLabelledBy: "verify-whatsapp-title", onClose: close }, { children: [jsxs("div", __assign({ className: "".concat(defaultDialogPaddingXClass, " py-4") }, { children: [jsx("div", __assign({ className: "mb-4" }, { children: jsx("p", __assign({ className: "mb-2" }, { children: t("verifyWhatsApp.info") }), void 0) }), void 0), error && (jsx(AlertBox, { type: "danger", content: error, className: "mb-3" }, void 0)), jsx("div", __assign({ className: "mb-3" }, { children: jsx(TextField, { id: "verification-code", name: "verificationCode", label: t('verifyWhatsApp.codeInputLabel'), placeholder: t('verifyWhatsApp.codeInputPlaceholder'), value: verificationCode, onChange: function (event) { return setVerificationCode(event.target.value); }, maxLength: 6, autoComplete: "off" }, void 0) }), void 0)] }), void 0), jsxs("div", __assign({ className: "d-flex justify-content-between align-items-center gap-3 p-3 border-top" }, { children: [jsx(DialogBtn, { type: "button", onClick: resendCode, label: t('verifyWhatsApp.resendBtn'), loading: resendLoading, disabled: loading || !phoneNumber }, void 0), jsxs("div", __assign({ className: "d-flex gap-3" }, { children: [jsx(DialogBtn, { type: "button", onClick: close, label: t('verifyWhatsApp.cancelBtn'), disabled: loading || resendLoading }, void 0), jsx(DialogBtn, { type: "button", onClick: verifyCode, color: "primary", label: t('verifyWhatsApp.submitBtn'), loading: loading, disabled: !verificationCode.trim() || resendLoading }, void 0)] }), void 0)] }), void 0)] }), void 0));
22740
22740
  };
22741
22741
 
22742
22742
  var GlobalDialogs = function (props) {
@@ -34563,24 +34563,20 @@ var PhoneVerificationBanner = function () {
34563
34563
  var isAuth = useIsAuthenticated();
34564
34564
  var history = useHistory();
34565
34565
  var currentUser = useSelector(function (state) { return state.user.currentUser; });
34566
- // Early returns for safety
34567
34566
  if (!isAuth || !currentUser) {
34568
34567
  return null;
34569
34568
  }
34570
- // Safely check for contactInfos
34571
34569
  if (!currentUser.contactInfos || !Array.isArray(currentUser.contactInfos)) {
34572
34570
  return null;
34573
34571
  }
34574
- // Check if user has an unverified phone number
34575
34572
  var phoneInfo = currentUser.contactInfos.find(function (info) { return info.type === 'phone'; });
34576
- // Don't show banner if no phone or phone is already verified
34577
34573
  if (!phoneInfo || (phoneInfo.confirmedAt && phoneInfo.confirmedAt > 0)) {
34578
34574
  return null;
34579
34575
  }
34580
34576
  var handleGoToProfile = function () {
34581
34577
  history.push('/settings');
34582
34578
  };
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));
34579
+ 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('phoneVerificationBanner.title') }, void 0), ' ', t('phoneVerificationBanner.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('phoneVerificationBanner.button') }), void 0) }), void 0)] }), void 0) }), void 0) }), void 0));
34584
34580
  };
34585
34581
 
34586
34582
  var coreReduxActions = {