@redneckz/wildless-cms-uni-blocks 0.14.235 → 0.14.237
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/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +16 -7
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
- package/bundle/hooks/{usePremiumBranchesByRegions.d.ts → useBranchesByRegions.d.ts} +1 -1
- package/dist/api/LeadServiceAPI.js +2 -1
- package/dist/api/LeadServiceAPI.js.map +1 -1
- package/dist/components/ApplicationFormCustom/AddressBranchField.js +2 -2
- package/dist/components/ApplicationFormCustom/AddressBranchField.js.map +1 -1
- package/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
- package/dist/components/ApplicationFormCustom/PosTerminalField.js +1 -1
- package/dist/components/ApplicationFormCustom/PosTerminalField.js.map +1 -1
- package/dist/components/ApplicationFormCustom/RegionPremiumField.js +2 -2
- package/dist/components/ApplicationFormCustom/RegionPremiumField.js.map +1 -1
- package/dist/components/ApplicationFormCustom/VedField.js +7 -0
- package/dist/components/ApplicationFormCustom/VedField.js.map +1 -1
- package/dist/components/ApplicationFormCustom/getField.js +1 -0
- package/dist/components/ApplicationFormCustom/getField.js.map +1 -1
- package/dist/components/ApplicationFormCustom/getInitialFormState.js +1 -0
- package/dist/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
- package/dist/hooks/{usePremiumBranchesByRegions.d.ts → useBranchesByRegions.d.ts} +1 -1
- package/{mobile/dist/hooks/usePremiumBranchesByRegions.js → dist/hooks/useBranchesByRegions.js} +5 -5
- package/dist/hooks/useBranchesByRegions.js.map +1 -0
- package/lib/api/LeadServiceAPI.js +2 -1
- package/lib/api/LeadServiceAPI.js.map +1 -1
- package/lib/components/ApplicationFormCustom/AddressBranchField.js +2 -2
- package/lib/components/ApplicationFormCustom/AddressBranchField.js.map +1 -1
- package/lib/components/ApplicationFormCustom/ApplicationFormCustom.fixture.d.ts +1 -0
- package/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
- package/lib/components/ApplicationFormCustom/PosTerminalField.js +1 -1
- package/lib/components/ApplicationFormCustom/PosTerminalField.js.map +1 -1
- package/lib/components/ApplicationFormCustom/RegionPremiumField.js +2 -2
- package/lib/components/ApplicationFormCustom/RegionPremiumField.js.map +1 -1
- package/lib/components/ApplicationFormCustom/VedField.js +7 -0
- package/lib/components/ApplicationFormCustom/VedField.js.map +1 -1
- package/lib/components/ApplicationFormCustom/getField.js +1 -0
- package/lib/components/ApplicationFormCustom/getField.js.map +1 -1
- package/lib/components/ApplicationFormCustom/getInitialFormState.js +1 -0
- package/lib/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
- package/lib/hooks/{usePremiumBranchesByRegions.d.ts → useBranchesByRegions.d.ts} +1 -1
- package/lib/hooks/{usePremiumBranchesByRegions.js → useBranchesByRegions.js} +3 -3
- package/lib/hooks/useBranchesByRegions.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +16 -7
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
- package/mobile/bundle/hooks/{usePremiumBranchesByRegions.d.ts → useBranchesByRegions.d.ts} +1 -1
- package/mobile/dist/api/LeadServiceAPI.js +2 -1
- package/mobile/dist/api/LeadServiceAPI.js.map +1 -1
- package/mobile/dist/components/ApplicationFormCustom/AddressBranchField.js +2 -2
- package/mobile/dist/components/ApplicationFormCustom/AddressBranchField.js.map +1 -1
- package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
- package/mobile/dist/components/ApplicationFormCustom/PosTerminalField.js +1 -1
- package/mobile/dist/components/ApplicationFormCustom/PosTerminalField.js.map +1 -1
- package/mobile/dist/components/ApplicationFormCustom/RegionPremiumField.js +2 -2
- package/mobile/dist/components/ApplicationFormCustom/RegionPremiumField.js.map +1 -1
- package/mobile/dist/components/ApplicationFormCustom/VedField.js +7 -0
- package/mobile/dist/components/ApplicationFormCustom/VedField.js.map +1 -1
- package/mobile/dist/components/ApplicationFormCustom/getField.js +1 -0
- package/mobile/dist/components/ApplicationFormCustom/getField.js.map +1 -1
- package/mobile/dist/components/ApplicationFormCustom/getInitialFormState.js +1 -0
- package/mobile/dist/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
- package/mobile/dist/hooks/useBranchesByRegions.d.ts +8 -0
- package/{dist/hooks/usePremiumBranchesByRegions.js → mobile/dist/hooks/useBranchesByRegions.js} +5 -5
- package/mobile/dist/hooks/useBranchesByRegions.js.map +1 -0
- package/mobile/lib/api/LeadServiceAPI.js +2 -1
- package/mobile/lib/api/LeadServiceAPI.js.map +1 -1
- package/mobile/lib/components/ApplicationFormCustom/AddressBranchField.js +2 -2
- package/mobile/lib/components/ApplicationFormCustom/AddressBranchField.js.map +1 -1
- package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
- package/mobile/lib/components/ApplicationFormCustom/PosTerminalField.js +1 -1
- package/mobile/lib/components/ApplicationFormCustom/PosTerminalField.js.map +1 -1
- package/mobile/lib/components/ApplicationFormCustom/RegionPremiumField.js +2 -2
- package/mobile/lib/components/ApplicationFormCustom/RegionPremiumField.js.map +1 -1
- package/mobile/lib/components/ApplicationFormCustom/VedField.js +7 -0
- package/mobile/lib/components/ApplicationFormCustom/VedField.js.map +1 -1
- package/mobile/lib/components/ApplicationFormCustom/getField.js +1 -0
- package/mobile/lib/components/ApplicationFormCustom/getField.js.map +1 -1
- package/mobile/lib/components/ApplicationFormCustom/getInitialFormState.js +1 -0
- package/mobile/lib/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
- package/mobile/lib/hooks/useBranchesByRegions.d.ts +8 -0
- package/mobile/lib/hooks/{usePremiumBranchesByRegions.js → useBranchesByRegions.js} +3 -3
- package/mobile/lib/hooks/useBranchesByRegions.js.map +1 -0
- package/mobile/src/api/LeadServiceAPI.ts +5 -1
- package/mobile/src/components/ApplicationFormCustom/AddressBranchField.tsx +2 -2
- package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +33 -0
- package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustomContent.ts +4 -2
- package/mobile/src/components/ApplicationFormCustom/PosTerminalField.tsx +1 -1
- package/mobile/src/components/ApplicationFormCustom/RegionPremiumField.tsx +2 -2
- package/mobile/src/components/ApplicationFormCustom/VedField.tsx +7 -0
- package/mobile/src/components/ApplicationFormCustom/getField.tsx +6 -0
- package/mobile/src/components/ApplicationFormCustom/getInitialFormState.tsx +1 -0
- package/mobile/src/hooks/{usePremiumBranchesByRegions.ts → useBranchesByRegions.ts} +2 -2
- package/package.json +1 -1
- package/src/api/LeadServiceAPI.ts +5 -1
- package/src/components/ApplicationFormCustom/AddressBranchField.tsx +2 -2
- package/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +33 -0
- package/src/components/ApplicationFormCustom/ApplicationFormCustom.fixture.tsx +28 -0
- package/src/components/ApplicationFormCustom/ApplicationFormCustomContent.ts +4 -2
- package/src/components/ApplicationFormCustom/PosTerminalField.tsx +1 -1
- package/src/components/ApplicationFormCustom/RegionPremiumField.tsx +2 -2
- package/src/components/ApplicationFormCustom/VedField.tsx +7 -0
- package/src/components/ApplicationFormCustom/getField.tsx +6 -0
- package/src/components/ApplicationFormCustom/getInitialFormState.tsx +1 -0
- package/src/hooks/{usePremiumBranchesByRegions.ts → useBranchesByRegions.ts} +2 -2
- package/dist/hooks/usePremiumBranchesByRegions.js.map +0 -1
- package/lib/hooks/usePremiumBranchesByRegions.js.map +0 -1
- package/mobile/dist/hooks/usePremiumBranchesByRegions.d.ts +0 -8
- package/mobile/dist/hooks/usePremiumBranchesByRegions.js.map +0 -1
- package/mobile/lib/hooks/usePremiumBranchesByRegions.d.ts +0 -8
- package/mobile/lib/hooks/usePremiumBranchesByRegions.js.map +0 -1
package/bundle/bundle.umd.js
CHANGED
|
@@ -825,8 +825,8 @@
|
|
|
825
825
|
const submitBody = {
|
|
826
826
|
typeForm,
|
|
827
827
|
[isIndividualType ? 'regionBranch' : 'region']: region,
|
|
828
|
-
[isIndividualType ? 'phoneNumber' : 'phone']: formatPhone(phone),
|
|
829
828
|
[isIndividualType ? 'email' : 'mail']: email,
|
|
829
|
+
...getPhone(phone),
|
|
830
830
|
...(isIndividualType ? { birthday: birthday?.toLocaleString() } : { inn, fullName }),
|
|
831
831
|
...(typeForm === 'FEEDBACK'
|
|
832
832
|
? {}
|
|
@@ -859,6 +859,7 @@
|
|
|
859
859
|
send,
|
|
860
860
|
};
|
|
861
861
|
}
|
|
862
|
+
const getPhone = (phone, isIndividual) => phone ? { [isIndividual ? 'phoneNumber' : 'phone']: formatPhone(phone) } : {};
|
|
862
863
|
const getSecondaryPhone = (secondaryPhone) => !secondaryPhone || secondaryPhone === '+7 ('
|
|
863
864
|
? {}
|
|
864
865
|
: { secondaryPhoneNumber: formatPhone(secondaryPhone) };
|
|
@@ -1320,8 +1321,8 @@
|
|
|
1320
1321
|
return result || EMPTY_VALUE$3;
|
|
1321
1322
|
};
|
|
1322
1323
|
|
|
1323
|
-
const REGIONS_URL$1 = '/api/v1/
|
|
1324
|
-
function
|
|
1324
|
+
const REGIONS_URL$1 = '/api/v1/branchesByRegions';
|
|
1325
|
+
function useBranchesByRegions() {
|
|
1325
1326
|
const { data } = useAsyncData(REGIONS_URL$1, fetchJSONUnsafe);
|
|
1326
1327
|
return Array.isArray(data) ? data : [];
|
|
1327
1328
|
}
|
|
@@ -1370,7 +1371,7 @@
|
|
|
1370
1371
|
const regionKey = field('region')?.value?.key;
|
|
1371
1372
|
const regionText = field('region')?.value?.text;
|
|
1372
1373
|
const addressBranch = isPremium
|
|
1373
|
-
?
|
|
1374
|
+
? useBranchesByRegions()?.find((_) => _?.region === regionText)?.branches
|
|
1374
1375
|
: useBranches(regionKey)?.filter((branch) => branch?.address);
|
|
1375
1376
|
useEffect(() => {
|
|
1376
1377
|
if (field('region')?.value?.key !== '') {
|
|
@@ -1677,10 +1678,10 @@
|
|
|
1677
1678
|
|
|
1678
1679
|
const OnlineCheckoutField = JSX(({ field }) => isAcquiringTrade(field('acquiringType')?.value?.key) ? (jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443 \u043E\u043D\u043B\u0430\u0439\u043D-\u043A\u0430\u0441\u0441\u0443", ...field('onlineCheckout') })) : null);
|
|
1679
1680
|
|
|
1680
|
-
const PosTerminalField = JSX(({ field }) => isAcquiringTrade(field('acquiringType')?.value?.key) ? (jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443
|
|
1681
|
+
const PosTerminalField = JSX(({ field }) => isAcquiringTrade(field('acquiringType')?.value?.key) ? (jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443 POS-\u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B", ...field('posTerminal') })) : null);
|
|
1681
1682
|
|
|
1682
1683
|
const RegionPremiumField = JSX(({ field, input }) => {
|
|
1683
|
-
const branchByRegions =
|
|
1684
|
+
const branchByRegions = useBranchesByRegions();
|
|
1684
1685
|
const regions = useMemo(() => branchByRegions?.map(({ region }) => ({
|
|
1685
1686
|
key: region,
|
|
1686
1687
|
text: region,
|
|
@@ -1709,6 +1710,12 @@
|
|
|
1709
1710
|
];
|
|
1710
1711
|
const VedField = JSX(({ field }) => {
|
|
1711
1712
|
const { value, onChange } = field('vedTypes');
|
|
1713
|
+
useEffect(() => {
|
|
1714
|
+
if (value !== 'currencyControl') {
|
|
1715
|
+
field?.('inn')?.onChange?.('');
|
|
1716
|
+
field?.('region')?.onChange?.('');
|
|
1717
|
+
}
|
|
1718
|
+
}, [value]);
|
|
1712
1719
|
return (jsxs("div", { className: "py-m space-x-m grid @xl:flex @xl:items-center", children: [jsx(Radio, { name: "vedTypes", text: "\u0412\u0430\u043B\u044E\u0442\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u044C", value: "currencyControl", checked: value === 'currencyControl', onChange: onChange }), jsx(Radio, { name: "vedTypes", text: "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0440\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", value: "documentOperations", checked: value === 'documentOperations', onChange: onChange }), jsx(Radio, { name: "vedTypes", text: "\u041A\u043E\u043D\u0432\u0435\u0440\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", value: "conversionTransactions", checked: value === 'conversionTransactions', onChange: onChange }), jsx(Radio, { name: "vedTypes", text: "\u0418\u043D\u044B\u0435 \u0432\u043E\u043F\u0440\u043E\u0441\u044B \u0412\u042D\u0414", value: "otherIssues", checked: value === 'otherIssues', onChange: onChange })] }));
|
|
1713
1720
|
});
|
|
1714
1721
|
|
|
@@ -1730,6 +1737,7 @@
|
|
|
1730
1737
|
addressBranch: jsx(AddressBranchField, { field: field, input: input, isPremium: isPremium }),
|
|
1731
1738
|
birthday: (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...getValidation(field('birthday'), validatorObj.birthday, required) })),
|
|
1732
1739
|
isClient: (jsx(CheckboxWithError, { ...field('isClient'), text: '\u042F\u0432\u043B\u044F\u044E\u0441\u044C \u043A\u043B\u0438\u0435\u043D\u0442\u043E\u043C \u0431\u0430\u043D\u043A\u0430 \u0410\u041E "\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A"' })),
|
|
1740
|
+
consentToReceiveMaterials: (jsx(CheckboxWithError, { ...field('consentToReceiveMaterials'), text: "\u0421\u043E\u0433\u043B\u0430\u0441\u0435\u043D \u043D\u0430 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u0435 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0445 \u0438 \u0430\u043D\u0430\u043B\u0438\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u043E\u0432 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435" })),
|
|
1733
1741
|
partnerComments: (jsx(InputControl, { ...getValidation(field('partnerComments'), validatorObj.partnerComments, required), placeholder: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0438\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0432\u0430\u0441 \u0432\u043E\u043F\u0440\u043E\u0441", isTextarea: true, ...rest })),
|
|
1734
1742
|
collectionCount: (jsx(InputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043E\u0431\u044A\u0435\u043A\u0442\u043E\u0432 \u0438\u043D\u043A\u0430\u0441\u0441\u0430\u0446\u0438\u0438", type: "number", ...getValidation(field('partnerComments'), validatorObj.collectionCount, required) })),
|
|
1735
1743
|
acquiringType: jsx(AcquiringField, { field: field, input: input }),
|
|
@@ -1801,6 +1809,7 @@
|
|
|
1801
1809
|
isClient: false,
|
|
1802
1810
|
onlineCheckout: false,
|
|
1803
1811
|
posTerminal: false,
|
|
1812
|
+
consentToReceiveMaterials: false,
|
|
1804
1813
|
consentDataProcessing: false,
|
|
1805
1814
|
};
|
|
1806
1815
|
const getInitialFormState = (inputs, typeForm = '') => {
|
|
@@ -6015,7 +6024,7 @@
|
|
|
6015
6024
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6016
6025
|
});
|
|
6017
6026
|
|
|
6018
|
-
const packageVersion = "0.14.
|
|
6027
|
+
const packageVersion = "0.14.236";
|
|
6019
6028
|
|
|
6020
6029
|
exports.Blocks = Blocks;
|
|
6021
6030
|
exports.ContentPage = ContentPage;
|