@redneckz/wildless-cms-uni-blocks 0.14.880 → 0.14.882
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/bundle/bundle.umd.js +41 -37
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/retail/api/updateRefreshToken.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +1 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/dist/retail/api/esiaRequestProfile.js +7 -1
- package/dist/retail/api/esiaRequestProfile.js.map +1 -1
- package/dist/retail/api/updateRefreshToken.d.ts +1 -1
- package/dist/retail/api/updateRefreshToken.js +3 -3
- package/dist/retail/api/updateRefreshToken.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +1 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/lib/retail/api/esiaRequestProfile.js +7 -1
- package/lib/retail/api/esiaRequestProfile.js.map +1 -1
- package/lib/retail/api/updateRefreshToken.d.ts +1 -1
- package/lib/retail/api/updateRefreshToken.js +3 -3
- package/lib/retail/api/updateRefreshToken.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +41 -37
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/retail/api/updateRefreshToken.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/dist/retail/api/esiaRequestProfile.js +7 -1
- package/mobile/dist/retail/api/esiaRequestProfile.js.map +1 -1
- package/mobile/dist/retail/api/updateRefreshToken.d.ts +1 -1
- package/mobile/dist/retail/api/updateRefreshToken.js +3 -3
- package/mobile/dist/retail/api/updateRefreshToken.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/lib/retail/api/esiaRequestProfile.js +7 -1
- package/mobile/lib/retail/api/esiaRequestProfile.js.map +1 -1
- package/mobile/lib/retail/api/updateRefreshToken.d.ts +1 -1
- package/mobile/lib/retail/api/updateRefreshToken.js +3 -3
- package/mobile/lib/retail/api/updateRefreshToken.js.map +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +1 -1
- package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +1 -1
- package/mobile/src/retail/api/esiaRequestProfile.ts +8 -2
- package/mobile/src/retail/api/updateRefreshToken.ts +3 -3
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationForm.example.json +1 -1
- package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +1 -1
- package/src/icons/IconName.ts +4 -4
- package/src/retail/api/esiaRequestProfile.ts +8 -2
- package/src/retail/api/updateRefreshToken.ts +3 -3
package/bundle/bundle.umd.js
CHANGED
|
@@ -6142,7 +6142,45 @@
|
|
|
6142
6142
|
}
|
|
6143
6143
|
}, [target, key]);
|
|
6144
6144
|
|
|
6145
|
-
const
|
|
6145
|
+
const PORTAL_NATURAL_URL = '/';
|
|
6146
|
+
const UPDATING_INTERVAL = 60000 * 4;
|
|
6147
|
+
const updateRefreshToken = (isFromLeadForm = false) => {
|
|
6148
|
+
const refreshToken = globalThis.sessionStorage?.getItem('refreshToken');
|
|
6149
|
+
const accessToken = globalThis.sessionStorage?.getItem('accessToken');
|
|
6150
|
+
const taskId = globalThis.localStorage.getItem('taskId');
|
|
6151
|
+
const navigator = locationNavigator();
|
|
6152
|
+
if (!accessToken || !refreshToken || (!taskId && !isFromLeadForm)) {
|
|
6153
|
+
navigator.assign(PORTAL_NATURAL_URL);
|
|
6154
|
+
return () => {
|
|
6155
|
+
// do nothing
|
|
6156
|
+
};
|
|
6157
|
+
}
|
|
6158
|
+
const updateTokenRequest = async () => {
|
|
6159
|
+
const res = await doRequest('/auth/refresh', 'POST', {
|
|
6160
|
+
// eslint-disable-next-line camelcase
|
|
6161
|
+
refresh_token: refreshToken,
|
|
6162
|
+
// eslint-disable-next-line camelcase
|
|
6163
|
+
access_token: accessToken,
|
|
6164
|
+
});
|
|
6165
|
+
if (Number(res?.status) === 401) {
|
|
6166
|
+
navigator.assign(PORTAL_NATURAL_URL);
|
|
6167
|
+
}
|
|
6168
|
+
if (res?.ok) {
|
|
6169
|
+
const data = await res.json();
|
|
6170
|
+
globalThis.sessionStorage.setItem('refreshToken', data.refresh_token);
|
|
6171
|
+
globalThis.sessionStorage.setItem('accessToken', data.access_token);
|
|
6172
|
+
}
|
|
6173
|
+
};
|
|
6174
|
+
!isFromLeadForm && updateTokenRequest();
|
|
6175
|
+
const timer = setInterval(updateTokenRequest, UPDATING_INTERVAL);
|
|
6176
|
+
return () => clearInterval(timer);
|
|
6177
|
+
};
|
|
6178
|
+
|
|
6179
|
+
const esiaRequestProfile = (body) => fetchRetailJSON('/esia/requestProfile', 'POST', body).then((res) => {
|
|
6180
|
+
saveToken(res);
|
|
6181
|
+
updateRefreshToken(true);
|
|
6182
|
+
return res;
|
|
6183
|
+
});
|
|
6146
6184
|
|
|
6147
6185
|
const initialFormState = {
|
|
6148
6186
|
surname: '',
|
|
@@ -6360,7 +6398,7 @@
|
|
|
6360
6398
|
code,
|
|
6361
6399
|
state,
|
|
6362
6400
|
redirectUri: globalThis.location?.href,
|
|
6363
|
-
authorize:
|
|
6401
|
+
authorize: true,
|
|
6364
6402
|
});
|
|
6365
6403
|
if (data) {
|
|
6366
6404
|
const parsedData = await parseEsiaProfile(data, productType === 'debitCard');
|
|
@@ -7848,40 +7886,6 @@
|
|
|
7848
7886
|
const renderBlocks = (info) => (jsx("div", { className: "flex gap-5xl grow basis-0", children: info.map((column, i) => renderBlocksColumn({ column, i })) }));
|
|
7849
7887
|
const renderBlocksColumn = ({ column, i }) => column ? (jsx("div", { className: "flex flex-col gap-xl grow basis-0", children: column.map(({ title = '', description, additionalDescription, button }, key) => (jsxs("div", { children: [jsx(Headline, { title: title, description: description, headlineVersion: "XS", align: "text-left", isEmbedded: true }), additionalDescription ? (jsx("div", { className: "mt-xs opacity-80", children: jsx(Paragraph, { size: "text-m", font: "font-light", children: additionalDescription }) })) : null, jsx("div", { className: style({ 'mt-xl': Boolean(button?.text) }), children: renderButtonsSection([button]) })] }, String(key)))) }, `col-${String(i)}`)) : null;
|
|
7850
7888
|
|
|
7851
|
-
const PORTAL_NATURAL_URL = '/';
|
|
7852
|
-
const UPDATING_INTERVAL = 60000 * 4;
|
|
7853
|
-
const updateRefreshToken = () => {
|
|
7854
|
-
const refreshToken = globalThis.sessionStorage?.getItem('refreshToken');
|
|
7855
|
-
const accessToken = globalThis.sessionStorage?.getItem('accessToken');
|
|
7856
|
-
const taskId = globalThis.localStorage.getItem('taskId');
|
|
7857
|
-
const navigator = locationNavigator();
|
|
7858
|
-
if (!accessToken || !refreshToken || !taskId) {
|
|
7859
|
-
navigator.assign(PORTAL_NATURAL_URL);
|
|
7860
|
-
return () => {
|
|
7861
|
-
// do nothing
|
|
7862
|
-
};
|
|
7863
|
-
}
|
|
7864
|
-
const updateTokenRequest = async () => {
|
|
7865
|
-
const res = await doRequest('/auth/refresh', 'POST', {
|
|
7866
|
-
// eslint-disable-next-line camelcase
|
|
7867
|
-
refresh_token: refreshToken,
|
|
7868
|
-
// eslint-disable-next-line camelcase
|
|
7869
|
-
access_token: accessToken,
|
|
7870
|
-
});
|
|
7871
|
-
if (Number(res?.status) === 401) {
|
|
7872
|
-
navigator.assign(PORTAL_NATURAL_URL);
|
|
7873
|
-
}
|
|
7874
|
-
if (res?.ok) {
|
|
7875
|
-
const data = await res.json();
|
|
7876
|
-
globalThis.sessionStorage.setItem('refreshToken', data.refresh_token);
|
|
7877
|
-
globalThis.sessionStorage.setItem('accessToken', data.access_token);
|
|
7878
|
-
}
|
|
7879
|
-
};
|
|
7880
|
-
updateTokenRequest();
|
|
7881
|
-
const timer = setInterval(updateTokenRequest, UPDATING_INTERVAL);
|
|
7882
|
-
return () => clearInterval(timer);
|
|
7883
|
-
};
|
|
7884
|
-
|
|
7885
7889
|
const ProgressBar = JSX(({ step = 10, description, showPercentage = true }) => (jsxs("div", { children: [jsx("div", { className: "h-4 w-full bg-gray relative", children: jsx("div", { className: "h-4 bg-green", style: { width: `${step}%` } }) }), jsxs("div", { className: "relative", children: [showPercentage ? jsxs("div", { className: "absolute left-2/4 text-green", children: [step, "%"] }) : null, description ? jsx("div", { className: "text-right pr-m text-gray", children: description }) : null] })] })));
|
|
7886
7890
|
|
|
7887
7891
|
const CreditCardFormProgress = JSX(({ step = 1, totalSteps = 6, stepsTitles = [] }) => {
|
|
@@ -11358,7 +11362,7 @@
|
|
|
11358
11362
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
11359
11363
|
});
|
|
11360
11364
|
|
|
11361
|
-
const packageVersion = "0.14.
|
|
11365
|
+
const packageVersion = "0.14.881";
|
|
11362
11366
|
|
|
11363
11367
|
exports.Blocks = Blocks;
|
|
11364
11368
|
exports.ContentPage = ContentPage;
|