@redneckz/wildless-cms-uni-blocks 0.14.940 → 0.14.944
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/api/getSubmitBody.d.ts +96 -96
- package/bundle/bundle.umd.js +11 -6
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/handlers.d.ts +2 -1
- package/dist/api/getSubmitBody.d.ts +96 -96
- package/dist/api/getSubmitBody.js +3 -1
- package/dist/api/getSubmitBody.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationForm.js +4 -1
- package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/dist/components/ApplicationForm/getFormatData.js +1 -1
- package/dist/components/ApplicationForm/getFormatData.js.map +1 -1
- package/dist/components/ApplicationForm/handlers.d.ts +2 -1
- package/dist/components/ApplicationForm/handlers.js +2 -2
- package/dist/components/ApplicationForm/handlers.js.map +1 -1
- package/lib/api/getSubmitBody.d.ts +96 -96
- package/lib/api/getSubmitBody.js +3 -1
- package/lib/api/getSubmitBody.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.js +4 -1
- package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/lib/components/ApplicationForm/getFormatData.js +1 -1
- package/lib/components/ApplicationForm/getFormatData.js.map +1 -1
- package/lib/components/ApplicationForm/handlers.d.ts +2 -1
- package/lib/components/ApplicationForm/handlers.js +2 -2
- package/lib/components/ApplicationForm/handlers.js.map +1 -1
- package/mobile/bundle/api/getSubmitBody.d.ts +96 -96
- package/mobile/bundle/bundle.umd.js +11 -6
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/handlers.d.ts +2 -1
- package/mobile/dist/api/getSubmitBody.d.ts +96 -96
- package/mobile/dist/api/getSubmitBody.js +3 -1
- package/mobile/dist/api/getSubmitBody.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js +4 -1
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/getFormatData.js +1 -1
- package/mobile/dist/components/ApplicationForm/getFormatData.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/handlers.d.ts +2 -1
- package/mobile/dist/components/ApplicationForm/handlers.js +2 -2
- package/mobile/dist/components/ApplicationForm/handlers.js.map +1 -1
- package/mobile/lib/api/getSubmitBody.d.ts +96 -96
- package/mobile/lib/api/getSubmitBody.js +3 -1
- package/mobile/lib/api/getSubmitBody.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js +4 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/getFormatData.js +1 -1
- package/mobile/lib/components/ApplicationForm/getFormatData.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/handlers.d.ts +2 -1
- package/mobile/lib/components/ApplicationForm/handlers.js +2 -2
- package/mobile/lib/components/ApplicationForm/handlers.js.map +1 -1
- package/mobile/src/api/getSubmitBody.ts +4 -0
- package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +2 -0
- package/mobile/src/components/ApplicationForm/getFormatData.tsx +0 -1
- package/mobile/src/components/ApplicationForm/handlers.ts +3 -1
- package/package.json +1 -1
- package/src/api/getSubmitBody.ts +4 -0
- package/src/components/ApplicationForm/ApplicationForm.tsx +2 -0
- package/src/components/ApplicationForm/getFormatData.tsx +0 -1
- package/src/components/ApplicationForm/handlers.ts +3 -1
|
@@ -1638,7 +1638,7 @@
|
|
|
1638
1638
|
|
|
1639
1639
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1640
1640
|
const getFormatData = (data) => {
|
|
1641
|
-
const { acquiringType, onlineCheckout, posTerminal, amount, term, annualRevenue, serviceType, vedTypes, region, inn, sufferedFrom, situationDescription, applierType, isPremium, dadataPartyNameSelect,
|
|
1641
|
+
const { acquiringType, onlineCheckout, posTerminal, amount, term, annualRevenue, serviceType, vedTypes, region, inn, sufferedFrom, situationDescription, applierType, isPremium, dadataPartyNameSelect, dadataPartyInnSelect, ...usedData } = data;
|
|
1642
1642
|
const partnerComments = acquiringType || annualRevenue ? getPartnerComments(data) : null;
|
|
1643
1643
|
const formatData = {
|
|
1644
1644
|
...usedData,
|
|
@@ -1745,7 +1745,7 @@
|
|
|
1745
1745
|
const formatPhone = (phone) => phone?.replace(/[^+\d]/g, '');
|
|
1746
1746
|
|
|
1747
1747
|
const getSubmitBody = (body, isNaturalPerson, router) => {
|
|
1748
|
-
const { typeForm, region, phone = '', email, birthday, desiredMeetingDate, inn, fullRegion, addressBranch, secondaryPhone = '', bankEmpolee, applicationDate, partnerName, russianPhone, ...staticBody } = body;
|
|
1748
|
+
const { typeForm, region, phone = '', email, birthday, desiredMeetingDate, inn, fullRegion, addressBranch, secondaryPhone = '', bankEmpolee, applicationDate, partnerName, russianPhone, partnerSymbolCode, ...staticBody } = body;
|
|
1749
1749
|
return {
|
|
1750
1750
|
typeForm,
|
|
1751
1751
|
...getRegion(region, isNaturalPerson),
|
|
@@ -1766,6 +1766,7 @@
|
|
|
1766
1766
|
...formatPFForm(typeForm, {
|
|
1767
1767
|
fullRegion,
|
|
1768
1768
|
partnerName,
|
|
1769
|
+
partnerSymbolCode,
|
|
1769
1770
|
}),
|
|
1770
1771
|
...staticBody,
|
|
1771
1772
|
};
|
|
@@ -1790,6 +1791,7 @@
|
|
|
1790
1791
|
? {
|
|
1791
1792
|
region: data?.fullRegion,
|
|
1792
1793
|
partner: data?.partnerName,
|
|
1794
|
+
partnerId: data?.partnerSymbolCode,
|
|
1793
1795
|
}
|
|
1794
1796
|
: {};
|
|
1795
1797
|
const addPageSlug = (typeForm, router) => typeForm === 'UNIVERSAL'
|
|
@@ -1930,8 +1932,8 @@
|
|
|
1930
1932
|
}
|
|
1931
1933
|
}
|
|
1932
1934
|
};
|
|
1933
|
-
const handleDefault = async ({ formatData, data, aspects = {}, ev, router, responseTypeDialog, }) => {
|
|
1934
|
-
const ok = Boolean(await API$2.send(formatData, router,
|
|
1935
|
+
const handleDefault = async ({ formatData, data, aspects = {}, ev, router, responseTypeDialog, endpoint, }) => {
|
|
1936
|
+
const ok = Boolean(await API$2.send(formatData, router, endpoint === 'lead'));
|
|
1935
1937
|
responseTypeDialog.open({ ok });
|
|
1936
1938
|
if (ok) {
|
|
1937
1939
|
handleAspects({ aspectsAttributes: data, aspects, ev });
|
|
@@ -3050,7 +3052,9 @@
|
|
|
3050
3052
|
callback: handleCallback,
|
|
3051
3053
|
default: handleDefault,
|
|
3052
3054
|
};
|
|
3053
|
-
const ApplicationForm = UniBlock(
|
|
3055
|
+
const ApplicationForm = UniBlock(
|
|
3056
|
+
// eslint-disable-next-line max-lines-per-function
|
|
3057
|
+
({ className, title, typeForm = '', sections = [], button, link, endpoint, additionalParams, isContacts, data, onSuccess, ...rest }) => {
|
|
3054
3058
|
const inputs = useMemo(() => (sections?.flatMap((_) => _?.inputs) || []), [sections]);
|
|
3055
3059
|
const initialFormState = useMemo(() => getInitialFormState$2(inputs, typeForm), [inputs, typeForm]);
|
|
3056
3060
|
const router = useRouter();
|
|
@@ -3070,6 +3074,7 @@
|
|
|
3070
3074
|
responseTypeDialog,
|
|
3071
3075
|
verifyPhoneDialog,
|
|
3072
3076
|
onSuccess,
|
|
3077
|
+
endpoint,
|
|
3073
3078
|
});
|
|
3074
3079
|
}, [typeForm]);
|
|
3075
3080
|
const [, { field, onSubmit }] = useForm(initialFormState, {
|
|
@@ -12371,7 +12376,7 @@
|
|
|
12371
12376
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
12372
12377
|
});
|
|
12373
12378
|
|
|
12374
|
-
const packageVersion = "0.14.
|
|
12379
|
+
const packageVersion = "0.14.943";
|
|
12375
12380
|
|
|
12376
12381
|
exports.Blocks = Blocks;
|
|
12377
12382
|
exports.ContentPage = ContentPage;
|