@redneckz/wildless-cms-uni-blocks 0.14.974 → 0.14.976
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 +30 -143
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -7
- package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -1
- package/bundle/components/GalleryLayout/utils.d.ts +1 -1
- package/bundle/components/ProductBlock/ProductBlock.d.ts +1 -1
- package/bundle/components/ProductBlock/ProductBlockContent.d.ts +2 -2
- package/bundle/model/HeadlineType.d.ts +15 -8
- package/bundle/retail/api/createUserTaskDebit.d.ts +0 -1
- package/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -7
- package/dist/components/ApplicationLeadForm/getLeadFormTaskData.js +1 -2
- package/dist/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +4 -24
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +0 -4
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/dist/components/GalleryLayout/utils.d.ts +1 -1
- package/dist/components/ProductBlock/ProductBlock.d.ts +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +15 -10
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -2
- package/dist/model/HeadlineType.d.ts +15 -8
- package/dist/retail/api/createUserTaskDebit.d.ts +0 -1
- package/dist/retail/api/createUserTaskDebit.js.map +1 -1
- package/dist/retail/components/Fields/AddressRetailField.js +0 -20
- package/dist/retail/components/Fields/AddressRetailField.js.map +1 -1
- package/dist/retail/components/Fields/PaymentSystemField.js +2 -14
- package/dist/retail/components/Fields/PaymentSystemField.js.map +1 -1
- package/dist/retail/components/Fields/RegionRetailField.js +7 -20
- package/dist/retail/components/Fields/RegionRetailField.js.map +1 -1
- package/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -7
- package/lib/components/ApplicationLeadForm/getLeadFormTaskData.js +1 -2
- package/lib/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +4 -24
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +0 -4
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/lib/components/GalleryLayout/utils.d.ts +1 -1
- package/lib/components/ProductBlock/ProductBlock.d.ts +1 -1
- package/lib/components/ProductBlock/ProductBlock.js +15 -10
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -2
- package/lib/model/HeadlineType.d.ts +15 -8
- package/lib/retail/api/createUserTaskDebit.d.ts +0 -1
- package/lib/retail/api/createUserTaskDebit.js.map +1 -1
- package/lib/retail/components/Fields/AddressRetailField.js +0 -20
- package/lib/retail/components/Fields/AddressRetailField.js.map +1 -1
- package/lib/retail/components/Fields/PaymentSystemField.js +2 -14
- package/lib/retail/components/Fields/PaymentSystemField.js.map +1 -1
- package/lib/retail/components/Fields/RegionRetailField.js +7 -20
- package/lib/retail/components/Fields/RegionRetailField.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +30 -143
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -7
- package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -1
- package/mobile/bundle/components/GalleryLayout/utils.d.ts +1 -1
- package/mobile/bundle/components/ProductBlock/ProductBlock.d.ts +1 -1
- package/mobile/bundle/components/ProductBlock/ProductBlockContent.d.ts +2 -2
- package/mobile/bundle/model/HeadlineType.d.ts +15 -8
- package/mobile/bundle/retail/api/createUserTaskDebit.d.ts +0 -1
- package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -7
- package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.js +1 -2
- package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +4 -24
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +0 -4
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/dist/components/GalleryLayout/utils.d.ts +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlock.d.ts +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlock.js +15 -10
- package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -2
- package/mobile/dist/model/HeadlineType.d.ts +15 -8
- package/mobile/dist/retail/api/createUserTaskDebit.d.ts +0 -1
- package/mobile/dist/retail/api/createUserTaskDebit.js.map +1 -1
- package/mobile/dist/retail/components/Fields/AddressRetailField.js +0 -20
- package/mobile/dist/retail/components/Fields/AddressRetailField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/PaymentSystemField.js +2 -14
- package/mobile/dist/retail/components/Fields/PaymentSystemField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/RegionRetailField.js +7 -20
- package/mobile/dist/retail/components/Fields/RegionRetailField.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -7
- package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.js +1 -2
- package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +4 -24
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +0 -4
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/lib/components/GalleryLayout/utils.d.ts +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlock.d.ts +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlock.js +15 -10
- package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -2
- package/mobile/lib/model/HeadlineType.d.ts +15 -8
- package/mobile/lib/retail/api/createUserTaskDebit.d.ts +0 -1
- package/mobile/lib/retail/api/createUserTaskDebit.js.map +1 -1
- package/mobile/lib/retail/components/Fields/AddressRetailField.js +0 -20
- package/mobile/lib/retail/components/Fields/AddressRetailField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/PaymentSystemField.js +2 -14
- package/mobile/lib/retail/components/Fields/PaymentSystemField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/RegionRetailField.js +7 -20
- package/mobile/lib/retail/components/Fields/RegionRetailField.js.map +1 -1
- package/mobile/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +5 -14
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +3 -32
- package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +0 -6
- package/mobile/src/components/ProductBlock/ProductBlock.tsx +26 -17
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +2 -5
- package/mobile/src/model/HeadlineType.ts +16 -8
- package/mobile/src/retail/api/createUserTaskDebit.ts +0 -1
- package/mobile/src/retail/components/Fields/AddressRetailField.tsx +0 -26
- package/mobile/src/retail/components/Fields/PaymentSystemField.tsx +2 -21
- package/mobile/src/retail/components/Fields/RegionRetailField.tsx +7 -22
- package/package.json +2 -2
- package/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +5 -14
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +3 -32
- package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +0 -6
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +16 -7
- package/src/components/ProductBlock/ProductBlock.tsx +26 -17
- package/src/components/ProductBlock/ProductBlockContent.ts +2 -5
- package/src/model/HeadlineType.ts +16 -8
- package/src/retail/api/createUserTaskDebit.ts +0 -1
- package/src/retail/components/Fields/AddressRetailField.tsx +0 -26
- package/src/retail/components/Fields/PaymentSystemField.tsx +2 -21
- package/src/retail/components/Fields/RegionRetailField.tsx +7 -22
- package/bundle/retail/api/getClaimChannel.d.ts +0 -8
- package/bundle/retail/hooks/useBiblioglobusDefaultRegion.d.ts +0 -14
- package/bundle/retail/utils/filterPaymentSystems.d.ts +0 -4
- package/bundle/retail/utils/hasDelivery.d.ts +0 -10
- package/bundle/utils/getSlugFromUrl.d.ts +0 -1
- package/dist/retail/api/getClaimChannel.d.ts +0 -8
- package/dist/retail/api/getClaimChannel.js +0 -9
- package/dist/retail/api/getClaimChannel.js.map +0 -1
- package/dist/retail/hooks/useBiblioglobusDefaultRegion.d.ts +0 -14
- package/dist/retail/hooks/useBiblioglobusDefaultRegion.js +0 -34
- package/dist/retail/hooks/useBiblioglobusDefaultRegion.js.map +0 -1
- package/dist/retail/utils/filterPaymentSystems.d.ts +0 -4
- package/dist/retail/utils/filterPaymentSystems.js +0 -13
- package/dist/retail/utils/filterPaymentSystems.js.map +0 -1
- package/dist/retail/utils/hasDelivery.d.ts +0 -10
- package/dist/retail/utils/hasDelivery.js +0 -13
- package/dist/retail/utils/hasDelivery.js.map +0 -1
- package/dist/utils/getSlugFromUrl.d.ts +0 -1
- package/dist/utils/getSlugFromUrl.js +0 -12
- package/dist/utils/getSlugFromUrl.js.map +0 -1
- package/lib/retail/api/getClaimChannel.d.ts +0 -8
- package/lib/retail/api/getClaimChannel.js +0 -6
- package/lib/retail/api/getClaimChannel.js.map +0 -1
- package/lib/retail/hooks/useBiblioglobusDefaultRegion.d.ts +0 -14
- package/lib/retail/hooks/useBiblioglobusDefaultRegion.js +0 -31
- package/lib/retail/hooks/useBiblioglobusDefaultRegion.js.map +0 -1
- package/lib/retail/utils/filterPaymentSystems.d.ts +0 -4
- package/lib/retail/utils/filterPaymentSystems.js +0 -10
- package/lib/retail/utils/filterPaymentSystems.js.map +0 -1
- package/lib/retail/utils/hasDelivery.d.ts +0 -10
- package/lib/retail/utils/hasDelivery.js +0 -9
- package/lib/retail/utils/hasDelivery.js.map +0 -1
- package/lib/utils/getSlugFromUrl.d.ts +0 -1
- package/lib/utils/getSlugFromUrl.js +0 -9
- package/lib/utils/getSlugFromUrl.js.map +0 -1
- package/mobile/bundle/retail/api/getClaimChannel.d.ts +0 -8
- package/mobile/bundle/retail/hooks/useBiblioglobusDefaultRegion.d.ts +0 -14
- package/mobile/bundle/retail/utils/filterPaymentSystems.d.ts +0 -4
- package/mobile/bundle/retail/utils/hasDelivery.d.ts +0 -10
- package/mobile/bundle/utils/getSlugFromUrl.d.ts +0 -1
- package/mobile/dist/retail/api/getClaimChannel.d.ts +0 -8
- package/mobile/dist/retail/api/getClaimChannel.js +0 -9
- package/mobile/dist/retail/api/getClaimChannel.js.map +0 -1
- package/mobile/dist/retail/hooks/useBiblioglobusDefaultRegion.d.ts +0 -14
- package/mobile/dist/retail/hooks/useBiblioglobusDefaultRegion.js +0 -34
- package/mobile/dist/retail/hooks/useBiblioglobusDefaultRegion.js.map +0 -1
- package/mobile/dist/retail/utils/filterPaymentSystems.d.ts +0 -4
- package/mobile/dist/retail/utils/filterPaymentSystems.js +0 -13
- package/mobile/dist/retail/utils/filterPaymentSystems.js.map +0 -1
- package/mobile/dist/retail/utils/hasDelivery.d.ts +0 -10
- package/mobile/dist/retail/utils/hasDelivery.js +0 -13
- package/mobile/dist/retail/utils/hasDelivery.js.map +0 -1
- package/mobile/dist/utils/getSlugFromUrl.d.ts +0 -1
- package/mobile/dist/utils/getSlugFromUrl.js +0 -12
- package/mobile/dist/utils/getSlugFromUrl.js.map +0 -1
- package/mobile/lib/retail/api/getClaimChannel.d.ts +0 -8
- package/mobile/lib/retail/api/getClaimChannel.js +0 -6
- package/mobile/lib/retail/api/getClaimChannel.js.map +0 -1
- package/mobile/lib/retail/hooks/useBiblioglobusDefaultRegion.d.ts +0 -14
- package/mobile/lib/retail/hooks/useBiblioglobusDefaultRegion.js +0 -31
- package/mobile/lib/retail/hooks/useBiblioglobusDefaultRegion.js.map +0 -1
- package/mobile/lib/retail/utils/filterPaymentSystems.d.ts +0 -4
- package/mobile/lib/retail/utils/filterPaymentSystems.js +0 -10
- package/mobile/lib/retail/utils/filterPaymentSystems.js.map +0 -1
- package/mobile/lib/retail/utils/hasDelivery.d.ts +0 -10
- package/mobile/lib/retail/utils/hasDelivery.js +0 -9
- package/mobile/lib/retail/utils/hasDelivery.js.map +0 -1
- package/mobile/lib/utils/getSlugFromUrl.d.ts +0 -1
- package/mobile/lib/utils/getSlugFromUrl.js +0 -9
- package/mobile/lib/utils/getSlugFromUrl.js.map +0 -1
- package/mobile/src/retail/api/getClaimChannel.ts +0 -18
- package/mobile/src/retail/hooks/useBiblioglobusDefaultRegion.ts +0 -56
- package/mobile/src/retail/utils/filterPaymentSystems.ts +0 -14
- package/mobile/src/retail/utils/hasDelivery.ts +0 -22
- package/mobile/src/utils/getSlugFromUrl.ts +0 -10
- package/src/retail/api/getClaimChannel.ts +0 -18
- package/src/retail/hooks/useBiblioglobusDefaultRegion.ts +0 -56
- package/src/retail/utils/filterPaymentSystems.ts +0 -14
- package/src/retail/utils/hasDelivery.ts +0 -22
- package/src/utils/getSlugFromUrl.ts +0 -10
package/bundle/bundle.umd.js
CHANGED
|
@@ -986,20 +986,25 @@
|
|
|
986
986
|
return result;
|
|
987
987
|
}
|
|
988
988
|
|
|
989
|
-
const ProductBlock = UniBlock(({ className, padding, defaultPadding,
|
|
990
|
-
const
|
|
991
|
-
|
|
989
|
+
const ProductBlock = UniBlock(({ className, padding, defaultPadding, dynamicQueryParamText = {}, dynamicTextSource, description, title, ...rest }) => {
|
|
990
|
+
const { textType } = dynamicQueryParamText;
|
|
991
|
+
const formatText = getFormatDescription(dynamicQueryParamText, dynamicTextSource?.list, textType === 'title' ? title : description);
|
|
992
|
+
const textProps = {
|
|
993
|
+
title: textType === 'title' ? formatText : title,
|
|
994
|
+
description: textType === 'description' ? formatText : description,
|
|
995
|
+
};
|
|
996
|
+
return (jsx(BlockWrapper, { className: style('overflow-hidden flex flex-col gap-3xl box-border', className), padding: "p-0", ...rest, children: jsx(BaseProductTile, { defaultPadding: defaultPadding || 'p-6xl', padding: padding, className: "grow h-full", ...textProps, ...rest }) }));
|
|
992
997
|
});
|
|
993
|
-
const getFormatDescription = (
|
|
994
|
-
const {
|
|
998
|
+
const getFormatDescription = (dynamicQueryParamText = {}, valuesList = [], text = '') => {
|
|
999
|
+
const { queryParam, value } = dynamicQueryParamText;
|
|
995
1000
|
const sessionQuery = saveSessionQuery();
|
|
996
|
-
const utmValue =
|
|
997
|
-
const dynamicValue = valuesList.find((item) => item?.id === utmValue)?.value;
|
|
998
|
-
return dynamicValue ?
|
|
1001
|
+
const utmValue = getQueryParamValue(queryParam ?? 'utm_source', sessionQuery);
|
|
1002
|
+
const dynamicValue = valuesList.find((item) => item?.id?.toLowerCase() === utmValue?.toLowerCase())?.value;
|
|
1003
|
+
return dynamicValue ? text?.replace(String(value), dynamicValue) : text;
|
|
999
1004
|
};
|
|
1000
|
-
const
|
|
1005
|
+
const getQueryParamValue = (queryParam, queryString) => {
|
|
1001
1006
|
const params = new URLSearchParams(queryString);
|
|
1002
|
-
return params.get(
|
|
1007
|
+
return params.get(queryParam);
|
|
1003
1008
|
};
|
|
1004
1009
|
|
|
1005
1010
|
const AdTile = JSX((props) => {
|
|
@@ -4556,15 +4561,6 @@
|
|
|
4556
4561
|
const mapByIndex = (points, index) => points.map((_) => _.coords?.[index]);
|
|
4557
4562
|
const getArraySumAndAverage = (arr) => arr.length && arr.reduce((a, b) => a + b) / arr.length;
|
|
4558
4563
|
|
|
4559
|
-
function getCardSlugFromUrl(url) {
|
|
4560
|
-
const lastSegment = url.split('/').filter(Boolean).pop();
|
|
4561
|
-
if (!lastSegment) {
|
|
4562
|
-
return null;
|
|
4563
|
-
}
|
|
4564
|
-
const parts = lastSegment.split('-');
|
|
4565
|
-
return parts.length > 1 ? parts[parts.length - 1] : null;
|
|
4566
|
-
}
|
|
4567
|
-
|
|
4568
4564
|
const fetchRegionOffices = async (regionKey) => {
|
|
4569
4565
|
const response = await fetchRetailJSON('/public-data/regionOffices', 'POST', {
|
|
4570
4566
|
regionRfCd: {
|
|
@@ -4593,21 +4589,9 @@
|
|
|
4593
4589
|
return result || [];
|
|
4594
4590
|
};
|
|
4595
4591
|
|
|
4596
|
-
const BIBLIOGLOBUS_SLUG = 'biblioglobus';
|
|
4597
|
-
const UNIONPAY_TEXT = 'UnionPay';
|
|
4598
|
-
const filterPaymentSystems = (systems, slug) => {
|
|
4599
|
-
if (slug !== BIBLIOGLOBUS_SLUG) {
|
|
4600
|
-
return systems;
|
|
4601
|
-
}
|
|
4602
|
-
return systems.filter((system) => system.text === UNIONPAY_TEXT);
|
|
4603
|
-
};
|
|
4604
|
-
|
|
4605
|
-
const BIBLIOGLOBUS_OFFICE_ID = '714680716';
|
|
4606
4592
|
const AddressRetailField = JSX(({ field, input }) => {
|
|
4607
4593
|
const [offices, setOffices] = useState([]);
|
|
4608
4594
|
const { data } = useLeadFormData('REGION_RF');
|
|
4609
|
-
const sessionStore = useSessionStore();
|
|
4610
|
-
const referrerUrl = sessionStore.referrerUrl;
|
|
4611
4595
|
const regionValue = field('regionRetail')?.value || {};
|
|
4612
4596
|
const addressField = field(input?.name ?? '');
|
|
4613
4597
|
useEffect(() => {
|
|
@@ -4619,20 +4603,6 @@
|
|
|
4619
4603
|
addressField.onChange?.('');
|
|
4620
4604
|
}
|
|
4621
4605
|
}, [regionValue.key]);
|
|
4622
|
-
// Логика для biblioglobus - выбор отделения по умолчанию
|
|
4623
|
-
useEffect(() => {
|
|
4624
|
-
if (!referrerUrl || !offices.length) {
|
|
4625
|
-
return;
|
|
4626
|
-
}
|
|
4627
|
-
const slug = getCardSlugFromUrl(referrerUrl);
|
|
4628
|
-
if (slug === BIBLIOGLOBUS_SLUG) {
|
|
4629
|
-
const defaultOffice = offices.find((office) => office.id?.toString() === BIBLIOGLOBUS_OFFICE_ID);
|
|
4630
|
-
addressField.onChange?.({
|
|
4631
|
-
key: defaultOffice?.id?.toString() || '',
|
|
4632
|
-
text: defaultOffice?.address || '',
|
|
4633
|
-
});
|
|
4634
|
-
}
|
|
4635
|
-
}, [referrerUrl, offices]);
|
|
4636
4606
|
const { points } = useOfficesAtmsMapData({
|
|
4637
4607
|
data: offices,
|
|
4638
4608
|
filtrationState: {},
|
|
@@ -5741,21 +5711,12 @@
|
|
|
5741
5711
|
const PaymentSystemField = JSX(({ field, input }) => {
|
|
5742
5712
|
const [paymentSystemOptions, setPaymentSystemOptions] = useState([]);
|
|
5743
5713
|
const localStore = useLocalStore();
|
|
5744
|
-
const sessionStore = useSessionStore();
|
|
5745
5714
|
useAsyncEffect(async () => {
|
|
5746
5715
|
const { programId } = localStore;
|
|
5747
|
-
if (
|
|
5748
|
-
|
|
5749
|
-
}
|
|
5750
|
-
const fetchedPaymentSystems = await getPaymentSystems(programId);
|
|
5751
|
-
const referrerUrl = sessionStore.referrerUrl;
|
|
5752
|
-
if (!referrerUrl) {
|
|
5716
|
+
if (programId) {
|
|
5717
|
+
const fetchedPaymentSystems = await getPaymentSystems(programId);
|
|
5753
5718
|
setPaymentSystemOptions(fetchedPaymentSystems ?? []);
|
|
5754
|
-
return;
|
|
5755
5719
|
}
|
|
5756
|
-
const slug = getCardSlugFromUrl(referrerUrl);
|
|
5757
|
-
const filteredSystems = filterPaymentSystems(fetchedPaymentSystems ?? [], slug);
|
|
5758
|
-
setPaymentSystemOptions(filteredSystems);
|
|
5759
5720
|
}, []);
|
|
5760
5721
|
const items = useMemo(() => paymentSystemOptions?.map((_) => ({ id: _.key, text: _.text })) ?? [], [paymentSystemOptions]);
|
|
5761
5722
|
return (jsx(RadioButtonGroupControl, { label: "\u041F\u043B\u0430\u0442\u0435\u0436\u043D\u0430\u044F \u0441\u0438\u0441\u0442\u0435\u043C\u0430", orientation: "horizontal", items: items, ...field(input?.name ?? '', {
|
|
@@ -5774,49 +5735,11 @@
|
|
|
5774
5735
|
return res || undefined;
|
|
5775
5736
|
};
|
|
5776
5737
|
|
|
5777
|
-
const useBiblioglobusDefaultRegion = (args) => {
|
|
5778
|
-
const { referrerUrl, regions, regionsDelivery, onRegionChange, onRegionHasDeliveryChange, onMethodObtainChange, } = args;
|
|
5779
|
-
const slug = referrerUrl ? getCardSlugFromUrl(referrerUrl) : '';
|
|
5780
|
-
const defaultRegion = regions?.find((region) => region.key === 'REGION_77');
|
|
5781
|
-
const regionHasDelivery = Boolean(regionsDelivery?.find((rd) => rd.regionCode === 'REGION_77')?.deliveryFlg);
|
|
5782
|
-
const isReady = Boolean(referrerUrl &&
|
|
5783
|
-
regions &&
|
|
5784
|
-
regionsDelivery &&
|
|
5785
|
-
slug === BIBLIOGLOBUS_SLUG &&
|
|
5786
|
-
defaultRegion?.key &&
|
|
5787
|
-
defaultRegion?.value);
|
|
5788
|
-
useEffect(() => {
|
|
5789
|
-
if (!isReady || !defaultRegion || !defaultRegion.key || !defaultRegion.value) {
|
|
5790
|
-
return;
|
|
5791
|
-
}
|
|
5792
|
-
onRegionChange?.({ key: defaultRegion.key, text: defaultRegion.value });
|
|
5793
|
-
onRegionHasDeliveryChange?.(regionHasDelivery);
|
|
5794
|
-
onMethodObtainChange?.(regionHasDelivery ? 'courier' : 'office');
|
|
5795
|
-
}, [
|
|
5796
|
-
isReady,
|
|
5797
|
-
defaultRegion,
|
|
5798
|
-
regionHasDelivery,
|
|
5799
|
-
onRegionChange,
|
|
5800
|
-
onRegionHasDeliveryChange,
|
|
5801
|
-
onMethodObtainChange,
|
|
5802
|
-
]);
|
|
5803
|
-
};
|
|
5804
|
-
|
|
5805
|
-
const getRegionDeliveryStatus = (regionsDelivery, value) => regionsDelivery?.find((_) => _.regionCode === String(value.key))?.deliveryFlg;
|
|
5806
|
-
const calculateRegionHasDelivery = (args) => {
|
|
5807
|
-
const { isDebit, isEsiaAuth, isSalaryCard, isDeliveryActive, regionDelivery } = args;
|
|
5808
|
-
if (isDebit) {
|
|
5809
|
-
return isEsiaAuth && !isSalaryCard && isDeliveryActive && regionDelivery;
|
|
5810
|
-
}
|
|
5811
|
-
return isDeliveryActive && regionDelivery;
|
|
5812
|
-
};
|
|
5813
|
-
|
|
5814
5738
|
const RegionRetailField = JSX(({ field, input }) => {
|
|
5815
5739
|
const { programId, productType } = useRetailFormStore();
|
|
5816
5740
|
const { data: regions } = useLeadFormData('REGION_RF');
|
|
5817
5741
|
const { data: regionsDelivery } = useAsyncData('regionsDelivery', getRegionsCardDelivery);
|
|
5818
5742
|
const { data: productSettings } = useLeadFormData(getCurrentProductSettings(productType));
|
|
5819
|
-
const sessionStore = useSessionStore();
|
|
5820
5743
|
const isDebit = productType === 'debitCard';
|
|
5821
5744
|
const isSalaryCard = programId === '38';
|
|
5822
5745
|
const isEsiaAuth = Boolean(field('esiaAccountTypeCd')?.value?.key);
|
|
@@ -5825,26 +5748,17 @@
|
|
|
5825
5748
|
const handleChangeRegion = field('regionRetail')?.onChange;
|
|
5826
5749
|
const handleChangeRegionHasDelivery = field('regionHasDelivery')?.onChange;
|
|
5827
5750
|
const handleChangeMethodObtain = field('methodObtain')?.onChange;
|
|
5828
|
-
useBiblioglobusDefaultRegion({
|
|
5829
|
-
referrerUrl: sessionStore.referrerUrl ?? undefined,
|
|
5830
|
-
regions,
|
|
5831
|
-
regionsDelivery,
|
|
5832
|
-
onRegionChange: handleChangeRegion,
|
|
5833
|
-
onRegionHasDeliveryChange: handleChangeRegionHasDelivery,
|
|
5834
|
-
onMethodObtainChange: handleChangeMethodObtain,
|
|
5835
|
-
});
|
|
5836
5751
|
const onChange = useCallback((value) => {
|
|
5837
|
-
const regionHasDelivery =
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
});
|
|
5752
|
+
const regionHasDelivery = isDebit
|
|
5753
|
+
? isEsiaAuth &&
|
|
5754
|
+
!isSalaryCard &&
|
|
5755
|
+
isDeliveryActive &&
|
|
5756
|
+
regionsDelivery?.find((_) => _.regionCode === value.key)?.deliveryFlg
|
|
5757
|
+
: isDeliveryActive && regionsDelivery?.find((_) => _.regionCode === value.key)?.deliveryFlg;
|
|
5844
5758
|
handleChangeRegionHasDelivery?.(regionHasDelivery);
|
|
5845
5759
|
handleChangeMethodObtain?.(regionHasDelivery ? 'courier' : 'office');
|
|
5846
5760
|
handleChangeRegion?.(value);
|
|
5847
|
-
}, [
|
|
5761
|
+
}, [regionsDelivery, isDeliveryActive, isEsiaAuth]);
|
|
5848
5762
|
useEffect(() => {
|
|
5849
5763
|
if (!isEsiaAuth && isDebit) {
|
|
5850
5764
|
handleChangeRegionHasDelivery?.(false);
|
|
@@ -6048,11 +5962,6 @@
|
|
|
6048
5962
|
return res || {};
|
|
6049
5963
|
};
|
|
6050
5964
|
|
|
6051
|
-
const getClaimChannel = async () => {
|
|
6052
|
-
const res = await fetchRetailJSON('light-api-cash/v1/claimChannel/', 'GET');
|
|
6053
|
-
return res || [];
|
|
6054
|
-
};
|
|
6055
|
-
|
|
6056
5965
|
const getLastTaskStatus = async (body) => {
|
|
6057
5966
|
const res = await fetchRetailJSON('/user-data/getLastStatus', 'POST', body);
|
|
6058
5967
|
return res?.statusCd === 'DRAFT' ? res?.taskId : null;
|
|
@@ -6740,7 +6649,7 @@
|
|
|
6740
6649
|
...consents,
|
|
6741
6650
|
};
|
|
6742
6651
|
};
|
|
6743
|
-
const getDebitLeadFormTaskData = (
|
|
6652
|
+
const getDebitLeadFormTaskData = (formData, programId, marketingInfo) => {
|
|
6744
6653
|
const { name, surname, middleName, limitedBirthday, phone, email } = formData;
|
|
6745
6654
|
const taskSource = getTaskSource(marketingInfo?.utm_source);
|
|
6746
6655
|
return {
|
|
@@ -6763,7 +6672,6 @@
|
|
|
6763
6672
|
],
|
|
6764
6673
|
marketingInfo,
|
|
6765
6674
|
},
|
|
6766
|
-
...(claimChannelCode ? { claimChannelCode } : {}),
|
|
6767
6675
|
};
|
|
6768
6676
|
};
|
|
6769
6677
|
const getTaskSource = (source) => {
|
|
@@ -6839,7 +6747,6 @@
|
|
|
6839
6747
|
});
|
|
6840
6748
|
const referalData = leadFormStore.referalData;
|
|
6841
6749
|
const marketingInfo = sessionStore.marketingInfo;
|
|
6842
|
-
const referrerUrl = sessionStore.referrerUrl;
|
|
6843
6750
|
if (!profileId) {
|
|
6844
6751
|
throw new Error();
|
|
6845
6752
|
}
|
|
@@ -6853,7 +6760,6 @@
|
|
|
6853
6760
|
marketingInfo,
|
|
6854
6761
|
saveUserData,
|
|
6855
6762
|
sendAspects,
|
|
6856
|
-
referrerUrl,
|
|
6857
6763
|
});
|
|
6858
6764
|
verifyPhoneDialog.close();
|
|
6859
6765
|
if (productType === 'debitCard') {
|
|
@@ -6970,29 +6876,14 @@
|
|
|
6970
6876
|
.filter((_) => formData[_])
|
|
6971
6877
|
.map((_) => consents[_]?.text);
|
|
6972
6878
|
};
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
|
-
|
|
6976
|
-
return undefined;
|
|
6977
|
-
}
|
|
6978
|
-
const claimData = await getClaimChannel();
|
|
6979
|
-
return claimData.find((item) => item.key === slug)?.code;
|
|
6980
|
-
};
|
|
6981
|
-
const updateUserData = async ({ programId, profileId, formData, productType, referalData, marketingInfo, saveUserData, sendAspects, referrerUrl, }) => {
|
|
6879
|
+
const updateUserData = async ({ programId, profileId, formData, productType, referalData, marketingInfo, saveUserData, sendAspects, }) => {
|
|
6880
|
+
let taskId;
|
|
6881
|
+
let participantId;
|
|
6982
6882
|
const transformedConsents = transformConsentsFields(formData, productType);
|
|
6983
|
-
const slug = getCardSlugFromUrl(referrerUrl);
|
|
6984
6883
|
await updateUserProfile(getUpdateUserProfileData(profileId, formData, transformedConsents));
|
|
6985
6884
|
try {
|
|
6986
|
-
let taskId;
|
|
6987
|
-
let participantId;
|
|
6988
6885
|
if (productType === 'debitCard') {
|
|
6989
|
-
const
|
|
6990
|
-
const debitData = await createUserTaskDebit(getDebitLeadFormTaskData({
|
|
6991
|
-
formData,
|
|
6992
|
-
programId,
|
|
6993
|
-
marketingInfo,
|
|
6994
|
-
claimChannelCode,
|
|
6995
|
-
}));
|
|
6886
|
+
const debitData = await createUserTaskDebit(getDebitLeadFormTaskData(formData, programId, marketingInfo));
|
|
6996
6887
|
taskId = debitData.taskId;
|
|
6997
6888
|
participantId = debitData.participantId;
|
|
6998
6889
|
}
|
|
@@ -7422,10 +7313,6 @@
|
|
|
7422
7313
|
leadFormStore.productType = productType;
|
|
7423
7314
|
sessionStore.marketingInfo = getMarketingInfo(queryFromStorage, sessionStore);
|
|
7424
7315
|
sessionStore.isNewMicroservice = isNewMicroservice || null;
|
|
7425
|
-
const referrer = globalThis.document.referrer;
|
|
7426
|
-
if (referrer) {
|
|
7427
|
-
sessionStore.referrerUrl = referrer;
|
|
7428
|
-
}
|
|
7429
7316
|
}, [queryFromStorage]);
|
|
7430
7317
|
useEffect(() => {
|
|
7431
7318
|
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
@@ -13187,7 +13074,7 @@
|
|
|
13187
13074
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
13188
13075
|
});
|
|
13189
13076
|
|
|
13190
|
-
const packageVersion = "0.14.
|
|
13077
|
+
const packageVersion = "0.14.975";
|
|
13191
13078
|
|
|
13192
13079
|
exports.Blocks = Blocks;
|
|
13193
13080
|
exports.ContentPage = ContentPage;
|