@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
package/bundle/bundle.umd.js
CHANGED
|
@@ -1630,7 +1630,7 @@
|
|
|
1630
1630
|
|
|
1631
1631
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1632
1632
|
const getFormatData = (data) => {
|
|
1633
|
-
const { acquiringType, onlineCheckout, posTerminal, amount, term, annualRevenue, serviceType, vedTypes, region, inn, sufferedFrom, situationDescription, applierType, isPremium, dadataPartyNameSelect,
|
|
1633
|
+
const { acquiringType, onlineCheckout, posTerminal, amount, term, annualRevenue, serviceType, vedTypes, region, inn, sufferedFrom, situationDescription, applierType, isPremium, dadataPartyNameSelect, dadataPartyInnSelect, ...usedData } = data;
|
|
1634
1634
|
const partnerComments = acquiringType || annualRevenue ? getPartnerComments(data) : null;
|
|
1635
1635
|
const formatData = {
|
|
1636
1636
|
...usedData,
|
|
@@ -1737,7 +1737,7 @@
|
|
|
1737
1737
|
const formatPhone = (phone) => phone?.replace(/[^+\d]/g, '');
|
|
1738
1738
|
|
|
1739
1739
|
const getSubmitBody = (body, isNaturalPerson, router) => {
|
|
1740
|
-
const { typeForm, region, phone = '', email, birthday, desiredMeetingDate, inn, fullRegion, addressBranch, secondaryPhone = '', bankEmpolee, applicationDate, partnerName, russianPhone, ...staticBody } = body;
|
|
1740
|
+
const { typeForm, region, phone = '', email, birthday, desiredMeetingDate, inn, fullRegion, addressBranch, secondaryPhone = '', bankEmpolee, applicationDate, partnerName, russianPhone, partnerSymbolCode, ...staticBody } = body;
|
|
1741
1741
|
return {
|
|
1742
1742
|
typeForm,
|
|
1743
1743
|
...getRegion(region, isNaturalPerson),
|
|
@@ -1758,6 +1758,7 @@
|
|
|
1758
1758
|
...formatPFForm(typeForm, {
|
|
1759
1759
|
fullRegion,
|
|
1760
1760
|
partnerName,
|
|
1761
|
+
partnerSymbolCode,
|
|
1761
1762
|
}),
|
|
1762
1763
|
...staticBody,
|
|
1763
1764
|
};
|
|
@@ -1782,6 +1783,7 @@
|
|
|
1782
1783
|
? {
|
|
1783
1784
|
region: data?.fullRegion,
|
|
1784
1785
|
partner: data?.partnerName,
|
|
1786
|
+
partnerId: data?.partnerSymbolCode,
|
|
1785
1787
|
}
|
|
1786
1788
|
: {};
|
|
1787
1789
|
const addPageSlug = (typeForm, router) => typeForm === 'UNIVERSAL'
|
|
@@ -1922,8 +1924,8 @@
|
|
|
1922
1924
|
}
|
|
1923
1925
|
}
|
|
1924
1926
|
};
|
|
1925
|
-
const handleDefault = async ({ formatData, data, aspects = {}, ev, router, responseTypeDialog, }) => {
|
|
1926
|
-
const ok = Boolean(await API$2.send(formatData, router,
|
|
1927
|
+
const handleDefault = async ({ formatData, data, aspects = {}, ev, router, responseTypeDialog, endpoint, }) => {
|
|
1928
|
+
const ok = Boolean(await API$2.send(formatData, router, endpoint === 'lead'));
|
|
1927
1929
|
responseTypeDialog.open({ ok });
|
|
1928
1930
|
if (ok) {
|
|
1929
1931
|
handleAspects({ aspectsAttributes: data, aspects, ev });
|
|
@@ -3042,7 +3044,9 @@
|
|
|
3042
3044
|
callback: handleCallback,
|
|
3043
3045
|
default: handleDefault,
|
|
3044
3046
|
};
|
|
3045
|
-
const ApplicationForm = UniBlock(
|
|
3047
|
+
const ApplicationForm = UniBlock(
|
|
3048
|
+
// eslint-disable-next-line max-lines-per-function
|
|
3049
|
+
({ className, title, typeForm = '', sections = [], button, link, endpoint, additionalParams, isContacts, data, onSuccess, ...rest }) => {
|
|
3046
3050
|
const inputs = useMemo(() => (sections?.flatMap((_) => _?.inputs) || []), [sections]);
|
|
3047
3051
|
const initialFormState = useMemo(() => getInitialFormState$2(inputs, typeForm), [inputs, typeForm]);
|
|
3048
3052
|
const router = useRouter();
|
|
@@ -3062,6 +3066,7 @@
|
|
|
3062
3066
|
responseTypeDialog,
|
|
3063
3067
|
verifyPhoneDialog,
|
|
3064
3068
|
onSuccess,
|
|
3069
|
+
endpoint,
|
|
3065
3070
|
});
|
|
3066
3071
|
}, [typeForm]);
|
|
3067
3072
|
const [, { field, onSubmit }] = useForm(initialFormState, {
|
|
@@ -12589,7 +12594,7 @@
|
|
|
12589
12594
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
12590
12595
|
});
|
|
12591
12596
|
|
|
12592
|
-
const packageVersion = "0.14.
|
|
12597
|
+
const packageVersion = "0.14.943";
|
|
12593
12598
|
|
|
12594
12599
|
exports.Blocks = Blocks;
|
|
12595
12600
|
exports.ContentPage = ContentPage;
|