@redneckz/wildless-cms-uni-blocks 0.14.890 → 0.14.893

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.
@@ -0,0 +1,16 @@
1
+ import { traversePageBlocks } from '../utils.js';
2
+
3
+ export const description = 'v0.14.891';
4
+
5
+ export default traversePageBlocks(adjustEndpoint);
6
+
7
+ function adjustEndpoint(block) {
8
+ const content = block?.content;
9
+
10
+ if (
11
+ block?.type === 'ApplicationForm' &&
12
+ (content?.typeForm === 'ACQR' || content?.typeForm === 'DPST')
13
+ ) {
14
+ content.endpoint = 'initcorporatelead';
15
+ }
16
+ }
@@ -1783,22 +1783,23 @@
1783
1783
  const VerifyPhoneDialog = JSX(({ phone, withDescription = true, consents, onSuccess = noop, onClose = noop, formatData, reqId, isRetail = true, }) => {
1784
1784
  const [values, setValues] = useState(Array(CODE_LENGTH).fill(''));
1785
1785
  const sessionStore = useSessionStore();
1786
+ const [requestId, setRequestId] = useState(reqId);
1786
1787
  const { handleSubmit, hasError, errorText, isLoading, timeNextReq, isSubmitButtonDisabled, setTimeNextReq, setErrorText, } = useVerifyPhoneDialogSubmit({
1787
1788
  values,
1788
1789
  onSuccess,
1789
1790
  formatData,
1790
- reqId,
1791
+ reqId: requestId,
1791
1792
  isRetail,
1792
1793
  });
1793
1794
  const captchaDialog = useDialog(CaptchaDialog);
1794
1795
  const phoneNumber = formatPhone(phone);
1795
1796
  const restartTimer = useCountDownTimer({ seconds: timeNextReq, onTick: setTimeNextReq });
1796
1797
  const handleSendCode = useCallback(async () => {
1797
- const isSuccessSendCode = await sendCode({
1798
+ const response = await sendCode({
1798
1799
  phoneNumber,
1799
1800
  smsCodesSetName: { key: 'AUTHENTICATION' },
1800
1801
  }, isRetail);
1801
- if (isSuccessSendCode) {
1802
+ if (response) {
1802
1803
  setTimeNextReq(TIME_TO_RESEND);
1803
1804
  restartTimer(TIME_TO_RESEND);
1804
1805
  setErrorText('');
@@ -1806,6 +1807,9 @@
1806
1807
  sendTime: Date.now(),
1807
1808
  attempts: 0,
1808
1809
  };
1810
+ if (!isRetail) {
1811
+ setRequestId(String(response));
1812
+ }
1809
1813
  }
1810
1814
  else {
1811
1815
  captchaDialog.open({ phoneNumber, sendCode: handleSendCode });
@@ -11640,7 +11644,7 @@
11640
11644
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
11641
11645
  });
11642
11646
 
11643
- const packageVersion = "0.14.889";
11647
+ const packageVersion = "0.14.892";
11644
11648
 
11645
11649
  exports.Blocks = Blocks;
11646
11650
  exports.ContentPage = ContentPage;