@redneckz/wildless-cms-uni-blocks 0.14.1056 → 0.14.1058
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/bin/migration-scripts/0.14.1058.js +21 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +63 -38
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/CreditCardForm/getCreditCardFormTaskData.d.ts +3 -2
- package/bundle/model/LinkProps.d.ts +0 -2
- package/bundle/ui-kit/LinkButton/LinkButtonContent.d.ts +4 -0
- package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +16 -2
- package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/dist/components/CreditCardForm/getCreditCardFormTaskData.d.ts +3 -2
- package/dist/components/CreditCardForm/getCreditCardFormTaskData.js +38 -24
- package/dist/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
- package/dist/components/CreditCardForm/useCreditCardFormAPI.js +1 -1
- package/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/dist/model/LinkProps.d.ts +0 -2
- package/dist/ui-kit/LinkButton/LinkButton.js +9 -9
- package/dist/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/dist/ui-kit/LinkButton/LinkButtonContent.d.ts +4 -0
- package/dist/ui-kit/UserSurveyDialog/useUserSurveyDialog.js +1 -1
- package/dist/ui-kit/UserSurveyDialog/useUserSurveyDialog.js.map +1 -1
- package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +16 -2
- package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/lib/components/CreditCardForm/getCreditCardFormTaskData.d.ts +3 -2
- package/lib/components/CreditCardForm/getCreditCardFormTaskData.js +38 -24
- package/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
- package/lib/components/CreditCardForm/useCreditCardFormAPI.js +1 -1
- package/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/lib/model/LinkProps.d.ts +0 -2
- package/lib/ui-kit/LinkButton/LinkButton.js +9 -9
- package/lib/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/lib/ui-kit/LinkButton/LinkButtonContent.d.ts +4 -0
- package/lib/ui-kit/UserSurveyDialog/useUserSurveyDialog.js +1 -1
- package/lib/ui-kit/UserSurveyDialog/useUserSurveyDialog.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +63 -38
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/CreditCardForm/getCreditCardFormTaskData.d.ts +3 -2
- package/mobile/bundle/model/LinkProps.d.ts +0 -2
- package/mobile/bundle/ui-kit/LinkButton/LinkButtonContent.d.ts +4 -0
- package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +16 -2
- package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.d.ts +3 -2
- package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.js +38 -24
- package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js +1 -1
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/mobile/dist/model/LinkProps.d.ts +0 -2
- package/mobile/dist/ui-kit/LinkButton/LinkButton.js +9 -9
- package/mobile/dist/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/mobile/dist/ui-kit/LinkButton/LinkButtonContent.d.ts +4 -0
- package/mobile/dist/ui-kit/UserSurveyDialog/useUserSurveyDialog.js +1 -1
- package/mobile/dist/ui-kit/UserSurveyDialog/useUserSurveyDialog.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +16 -2
- package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.d.ts +3 -2
- package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.js +38 -24
- package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js +1 -1
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/mobile/lib/model/LinkProps.d.ts +0 -2
- package/mobile/lib/ui-kit/LinkButton/LinkButton.js +9 -9
- package/mobile/lib/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/mobile/lib/ui-kit/LinkButton/LinkButtonContent.d.ts +4 -0
- package/mobile/lib/ui-kit/UserSurveyDialog/useUserSurveyDialog.js +1 -1
- package/mobile/lib/ui-kit/UserSurveyDialog/useUserSurveyDialog.js.map +1 -1
- package/mobile/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +16 -2
- package/mobile/src/components/CreditCardForm/getCreditCardFormTaskData.ts +43 -26
- package/mobile/src/components/CreditCardForm/useCreditCardFormAPI.tsx +1 -1
- package/mobile/src/components/CreditForm/CreditFormStatusTracker.tsx +1 -0
- package/mobile/src/model/LinkProps.ts +0 -2
- package/mobile/src/ui-kit/LinkButton/LinkButton.tsx +11 -10
- package/mobile/src/ui-kit/LinkButton/LinkButtonContent.ts +4 -0
- package/mobile/src/ui-kit/UserSurveyDialog/useUserSurveyDialog.ts +1 -1
- package/package.json +1 -1
- package/src/components/ButtonsBlock/ButtonsBlock.fixture.tsx +2 -1
- package/src/components/CreditCardForm/CreditCardForm.fixture.mobile.tsx +0 -4
- package/src/components/CreditCardForm/CreditCardForm.fixture.tsx +7 -13
- package/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +16 -2
- package/src/components/CreditCardForm/getCreditCardFormTaskData.ts +43 -26
- package/src/components/CreditCardForm/useCreditCardFormAPI.tsx +1 -1
- package/src/components/CreditForm/CreditForm.fixture.mobile.tsx +0 -4
- package/src/components/CreditForm/CreditFormStatusTracker.tsx +1 -0
- package/src/model/LinkProps.ts +0 -2
- package/src/ui-kit/LinkButton/LinkButton.tsx +11 -10
- package/src/ui-kit/LinkButton/LinkButtonContent.ts +4 -0
- package/src/ui-kit/UserSurveyDialog/useUserSurveyDialog.ts +1 -1
- package/bundle/retail/utils/mockLocalStorage.d.ts +0 -1
- package/dist/retail/utils/mockLocalStorage.d.ts +0 -1
- package/dist/retail/utils/mockLocalStorage.js +0 -38
- package/dist/retail/utils/mockLocalStorage.js.map +0 -1
- package/lib/retail/utils/mockLocalStorage.d.ts +0 -1
- package/lib/retail/utils/mockLocalStorage.js +0 -35
- package/lib/retail/utils/mockLocalStorage.js.map +0 -1
- package/mobile/bundle/retail/utils/mockLocalStorage.d.ts +0 -1
- package/mobile/dist/retail/utils/mockLocalStorage.d.ts +0 -1
- package/mobile/dist/retail/utils/mockLocalStorage.js +0 -38
- package/mobile/dist/retail/utils/mockLocalStorage.js.map +0 -1
- package/mobile/lib/retail/utils/mockLocalStorage.d.ts +0 -1
- package/mobile/lib/retail/utils/mockLocalStorage.js +0 -35
- package/mobile/lib/retail/utils/mockLocalStorage.js.map +0 -1
- package/mobile/src/retail/utils/mockLocalStorage.ts +0 -44
- package/src/retail/utils/mockLocalStorage.ts +0 -44
package/bundle/bundle.umd.js
CHANGED
|
@@ -706,15 +706,15 @@
|
|
|
706
706
|
}, [method, href]);
|
|
707
707
|
|
|
708
708
|
/** @deprecated */
|
|
709
|
-
const LinkButton = JSX(({ disabled, children, method = 'LINK', href, id,
|
|
709
|
+
const LinkButton = JSX(({ disabled, children, method = 'LINK', href, id, additionalHref, chance, ...rest }) => {
|
|
710
710
|
const [currentLink, setCurrentLink] = useState();
|
|
711
711
|
const handleFormSubmit = useFormSubmit({ method, href });
|
|
712
712
|
const linksStore = useLocalStore();
|
|
713
713
|
useEffect(() => {
|
|
714
|
-
|
|
714
|
+
additionalHref && saveLinksToStore({ linksStore, href, id, additionalHref, chance });
|
|
715
715
|
const adjustedHref = (linksStore.links || []).find((store) => store.id === id)?.lastLink;
|
|
716
716
|
setCurrentLink(adjustedHref ?? href);
|
|
717
|
-
}, [
|
|
717
|
+
}, [additionalHref, href]);
|
|
718
718
|
const link = useLink();
|
|
719
719
|
const adjustedProps = link({ onClick: handleFormSubmit, href: currentLink, ...rest });
|
|
720
720
|
const buttonInner = children ?? jsx(ButtonInner, { ...adjustedProps });
|
|
@@ -722,22 +722,22 @@
|
|
|
722
722
|
});
|
|
723
723
|
const RegularButton = JSX(({ className = '', href, rel, target, ariaLabel, version, rounded, onClick, type, data, children, text, }) => (jsx("a", { className: getRegularButtonClasses({ className, version, rounded }), href: href, rel: rel, target: target, "aria-label": ariaLabel || `Ссылка на ${text}`, role: href ? 'link' : 'button', onClick: onClick, type: type, ...getAspectsAttributes(data), children: children })));
|
|
724
724
|
const DisabledButton = JSX(({ className, ariaLabel, version, rounded, children }) => (jsx("button", { type: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: -1, className: getDisabledButtonClasses({ className, rounded, version }), children: children })));
|
|
725
|
-
const getRandomHref = (href = '',
|
|
726
|
-
const
|
|
727
|
-
return
|
|
725
|
+
const getRandomHref = (href = '', additionalHref = '', chance = 50) => {
|
|
726
|
+
const randomNumber = Math.random() * 100;
|
|
727
|
+
return randomNumber < chance ? additionalHref : href;
|
|
728
728
|
};
|
|
729
729
|
// Отсчитываем 7 длей с текущей даты
|
|
730
730
|
const getTimeAfter7days = () => Date.now() + 7 * 24 * 60 * 60 * 1000;
|
|
731
731
|
// Сохраняем или заменяем рандомную ссылку в localStorage
|
|
732
|
-
const saveLinksToStore = ({ linksStore, id, href,
|
|
732
|
+
const saveLinksToStore = ({ linksStore, id, href, additionalHref, chance }) => {
|
|
733
733
|
const buttonLinkStore = (linksStore.links || []).find((store) => store.id === id);
|
|
734
734
|
// Если хранилища вообще нет
|
|
735
735
|
if (!linksStore.links) {
|
|
736
736
|
linksStore.links = [];
|
|
737
737
|
}
|
|
738
|
-
if ((!buttonLinkStore || buttonLinkStore.nextDueAt <= Date.now()) &&
|
|
738
|
+
if ((!buttonLinkStore || buttonLinkStore.nextDueAt <= Date.now()) && additionalHref) {
|
|
739
739
|
// Получаем рандомную ссылку
|
|
740
|
-
const randomHref = getRandomHref(href,
|
|
740
|
+
const randomHref = getRandomHref(href, additionalHref, chance);
|
|
741
741
|
// При наличии ссылки для этой кнопки в хранилище удаляем этот элемент из массива ссылок
|
|
742
742
|
const updatedLinks = linksStore.links?.filter((item) => item.id !== id);
|
|
743
743
|
// Добавляем новый элемент
|
|
@@ -2041,7 +2041,7 @@
|
|
|
2041
2041
|
? Date.now() - Number.parseInt(sessionStore.surveyTimerStart)
|
|
2042
2042
|
: 0;
|
|
2043
2043
|
const isShowSurvey = !isSurveySkipped &&
|
|
2044
|
-
!isOtherLanguagePortal &&
|
|
2044
|
+
!isOtherLanguagePortal() &&
|
|
2045
2045
|
(!userSurveyStore.userSurvey || userSurveyStore.userSurvey?.nextDueAt <= Date.now());
|
|
2046
2046
|
const handleSkipSurvey = useCallback(() => {
|
|
2047
2047
|
sessionStore.isSurveySkipped = true;
|
|
@@ -10526,13 +10526,25 @@
|
|
|
10526
10526
|
'CREATE_APPLICATION_SHORT_SIGNAL',
|
|
10527
10527
|
'CREATE_APPLICATION_LOAN_V3_SIGNAL',
|
|
10528
10528
|
];
|
|
10529
|
+
const MESSAGE_NAMES$1 = [
|
|
10530
|
+
'CREATE_APPLICATION_SHORT_MESSAGE',
|
|
10531
|
+
// 'CREATE_APPLICATION_LOAN_MESSAGE',
|
|
10532
|
+
];
|
|
10529
10533
|
const CreditCardFormStatusTracker = JSX(() => {
|
|
10534
|
+
const isNewMicroservice = checkNewMicroservice();
|
|
10530
10535
|
const [status, setStatus] = useState(STATUS_TYPE.process);
|
|
10531
10536
|
const { taskId } = useRetailFormStore();
|
|
10532
10537
|
useEffect(() => {
|
|
10533
10538
|
(async () => {
|
|
10534
|
-
|
|
10535
|
-
|
|
10539
|
+
if (isNewMicroservice) {
|
|
10540
|
+
for (const messageName of MESSAGE_NAMES$1) {
|
|
10541
|
+
await sendMessage({ messageName, taskId });
|
|
10542
|
+
}
|
|
10543
|
+
}
|
|
10544
|
+
else {
|
|
10545
|
+
for (const signalType of SIGNAL_TYPES$1) {
|
|
10546
|
+
await sendSignalToProcess({ signalType, taskId });
|
|
10547
|
+
}
|
|
10536
10548
|
}
|
|
10537
10549
|
})();
|
|
10538
10550
|
}, [taskId]);
|
|
@@ -10842,31 +10854,44 @@
|
|
|
10842
10854
|
: {};
|
|
10843
10855
|
};
|
|
10844
10856
|
|
|
10845
|
-
const getCreditCardFormTaskData = ({ participantId, taskId, profileId, formData, step = 0, }) =>
|
|
10846
|
-
|
|
10847
|
-
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
participants: [
|
|
10853
|
-
{
|
|
10854
|
-
id: participantId,
|
|
10855
|
-
profile: {
|
|
10856
|
-
id: profileId,
|
|
10857
|
-
},
|
|
10858
|
-
roleCd: {
|
|
10859
|
-
key: 'BORROWER',
|
|
10860
|
-
value: 'Заемщик',
|
|
10861
|
-
},
|
|
10862
|
-
...getCurrentStepData$2(step, formData),
|
|
10857
|
+
const getCreditCardFormTaskData = ({ participantId, taskId, profileId, formData, step = 0, }) => {
|
|
10858
|
+
const isNewMicroservice = checkNewMicroservice();
|
|
10859
|
+
const participantInfo = {
|
|
10860
|
+
id: participantId,
|
|
10861
|
+
...(!isNewMicroservice && {
|
|
10862
|
+
profile: {
|
|
10863
|
+
id: profileId,
|
|
10863
10864
|
},
|
|
10864
|
-
|
|
10865
|
-
|
|
10866
|
-
|
|
10867
|
-
|
|
10868
|
-
|
|
10869
|
-
|
|
10865
|
+
}),
|
|
10866
|
+
roleCd: {
|
|
10867
|
+
key: 'BORROWER',
|
|
10868
|
+
value: 'Заемщик',
|
|
10869
|
+
},
|
|
10870
|
+
...getCurrentStepData$2(step, formData),
|
|
10871
|
+
};
|
|
10872
|
+
return {
|
|
10873
|
+
sendToBank: true,
|
|
10874
|
+
taskKind: 'UNITED',
|
|
10875
|
+
task: {
|
|
10876
|
+
id: taskId,
|
|
10877
|
+
...getOfficeCode$1(formData),
|
|
10878
|
+
authorizedAgentId: formData?.bankEmployeeCode,
|
|
10879
|
+
...(isNewMicroservice
|
|
10880
|
+
? {
|
|
10881
|
+
participant: participantInfo,
|
|
10882
|
+
}
|
|
10883
|
+
: {
|
|
10884
|
+
participants: [participantInfo],
|
|
10885
|
+
}),
|
|
10886
|
+
...getCardOptionsData(formData),
|
|
10887
|
+
...getDeliveryData$1(formData),
|
|
10888
|
+
esiaAccountTypeCd: {
|
|
10889
|
+
key: formData?.esiaAccountTypeCd?.key,
|
|
10890
|
+
},
|
|
10891
|
+
files: formData?.files,
|
|
10892
|
+
},
|
|
10893
|
+
};
|
|
10894
|
+
};
|
|
10870
10895
|
const getCurrentStepData$2 = (step, formData) => {
|
|
10871
10896
|
switch (step) {
|
|
10872
10897
|
case 0:
|
|
@@ -10909,7 +10934,7 @@
|
|
|
10909
10934
|
retailFormStore.leadForm = formData;
|
|
10910
10935
|
try {
|
|
10911
10936
|
const { taskId, profileId, participantId } = retailFormStore;
|
|
10912
|
-
if (taskId
|
|
10937
|
+
if (taskId) {
|
|
10913
10938
|
const response = await updateUserTask(getCreditCardFormTaskData({
|
|
10914
10939
|
participantId,
|
|
10915
10940
|
taskId,
|
|
@@ -14793,7 +14818,7 @@
|
|
|
14793
14818
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
14794
14819
|
});
|
|
14795
14820
|
|
|
14796
|
-
const packageVersion = "0.14.
|
|
14821
|
+
const packageVersion = "0.14.1057";
|
|
14797
14822
|
|
|
14798
14823
|
exports.Blocks = Blocks;
|
|
14799
14824
|
exports.ContentPage = ContentPage;
|