@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
|
@@ -833,8 +833,8 @@
|
|
|
833
833
|
const submitBody = {
|
|
834
834
|
typeForm,
|
|
835
835
|
[isIndividualType ? 'regionBranch' : 'region']: region,
|
|
836
|
-
[isIndividualType ? 'phoneNumber' : 'phone']: formatPhone(phone),
|
|
837
836
|
[isIndividualType ? 'email' : 'mail']: email,
|
|
837
|
+
...getPhone(phone),
|
|
838
838
|
...(isIndividualType ? { birthday: birthday?.toLocaleString() } : { inn, fullName }),
|
|
839
839
|
...(typeForm === 'FEEDBACK'
|
|
840
840
|
? {}
|
|
@@ -867,6 +867,7 @@
|
|
|
867
867
|
send,
|
|
868
868
|
};
|
|
869
869
|
}
|
|
870
|
+
const getPhone = (phone, isIndividual) => phone ? { [isIndividual ? 'phoneNumber' : 'phone']: formatPhone(phone) } : {};
|
|
870
871
|
const getSecondaryPhone = (secondaryPhone) => !secondaryPhone || secondaryPhone === '+7 ('
|
|
871
872
|
? {}
|
|
872
873
|
: { secondaryPhoneNumber: formatPhone(secondaryPhone) };
|
|
@@ -1328,8 +1329,8 @@
|
|
|
1328
1329
|
return result || EMPTY_VALUE$3;
|
|
1329
1330
|
};
|
|
1330
1331
|
|
|
1331
|
-
const REGIONS_URL$1 = '/api/v1/
|
|
1332
|
-
function
|
|
1332
|
+
const REGIONS_URL$1 = '/api/v1/branchesByRegions';
|
|
1333
|
+
function useBranchesByRegions() {
|
|
1333
1334
|
const { data } = useAsyncData(REGIONS_URL$1, fetchJSONUnsafe);
|
|
1334
1335
|
return Array.isArray(data) ? data : [];
|
|
1335
1336
|
}
|
|
@@ -1378,7 +1379,7 @@
|
|
|
1378
1379
|
const regionKey = field('region')?.value?.key;
|
|
1379
1380
|
const regionText = field('region')?.value?.text;
|
|
1380
1381
|
const addressBranch = isPremium
|
|
1381
|
-
?
|
|
1382
|
+
? useBranchesByRegions()?.find((_) => _?.region === regionText)?.branches
|
|
1382
1383
|
: useBranches(regionKey)?.filter((branch) => branch?.address);
|
|
1383
1384
|
useEffect(() => {
|
|
1384
1385
|
if (field('region')?.value?.key !== '') {
|
|
@@ -1685,10 +1686,10 @@
|
|
|
1685
1686
|
|
|
1686
1687
|
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);
|
|
1687
1688
|
|
|
1688
|
-
const PosTerminalField = JSX(({ field }) => isAcquiringTrade(field('acquiringType')?.value?.key) ? (jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443
|
|
1689
|
+
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);
|
|
1689
1690
|
|
|
1690
1691
|
const RegionPremiumField = JSX(({ field, input }) => {
|
|
1691
|
-
const branchByRegions =
|
|
1692
|
+
const branchByRegions = useBranchesByRegions();
|
|
1692
1693
|
const regions = useMemo(() => branchByRegions?.map(({ region }) => ({
|
|
1693
1694
|
key: region,
|
|
1694
1695
|
text: region,
|
|
@@ -1717,6 +1718,12 @@
|
|
|
1717
1718
|
];
|
|
1718
1719
|
const VedField = JSX(({ field }) => {
|
|
1719
1720
|
const { value, onChange } = field('vedTypes');
|
|
1721
|
+
useEffect(() => {
|
|
1722
|
+
if (value !== 'currencyControl') {
|
|
1723
|
+
field?.('inn')?.onChange?.('');
|
|
1724
|
+
field?.('region')?.onChange?.('');
|
|
1725
|
+
}
|
|
1726
|
+
}, [value]);
|
|
1720
1727
|
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 })] }));
|
|
1721
1728
|
});
|
|
1722
1729
|
|
|
@@ -1738,6 +1745,7 @@
|
|
|
1738
1745
|
addressBranch: jsx(AddressBranchField, { field: field, input: input, isPremium: isPremium }),
|
|
1739
1746
|
birthday: (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...getValidation(field('birthday'), validatorObj.birthday, required) })),
|
|
1740
1747
|
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"' })),
|
|
1748
|
+
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" })),
|
|
1741
1749
|
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 })),
|
|
1742
1750
|
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) })),
|
|
1743
1751
|
acquiringType: jsx(AcquiringField, { field: field, input: input }),
|
|
@@ -1809,6 +1817,7 @@
|
|
|
1809
1817
|
isClient: false,
|
|
1810
1818
|
onlineCheckout: false,
|
|
1811
1819
|
posTerminal: false,
|
|
1820
|
+
consentToReceiveMaterials: false,
|
|
1812
1821
|
consentDataProcessing: false,
|
|
1813
1822
|
};
|
|
1814
1823
|
const getInitialFormState = (inputs, typeForm = '') => {
|
|
@@ -5641,7 +5650,7 @@
|
|
|
5641
5650
|
|
|
5642
5651
|
const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
|
|
5643
5652
|
|
|
5644
|
-
const packageVersion = "0.14.
|
|
5653
|
+
const packageVersion = "0.14.236";
|
|
5645
5654
|
|
|
5646
5655
|
exports.Blocks = Blocks;
|
|
5647
5656
|
exports.ContentPage = ContentPage;
|