@redneckz/wildless-cms-uni-blocks 0.14.978 → 0.14.980
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/bundle.umd.js +41 -28
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/retail/api/createUserTaskDebit.d.ts +1 -1
- package/bundle/retail/utils/rshbConstants.d.ts +20 -0
- package/dist/components/ApplicationLeadForm/getLeadFormTaskData.js +1 -1
- package/dist/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/dist/retail/api/createUserTaskDebit.d.ts +1 -1
- package/dist/retail/components/Fields/AddressRetailField.js +4 -1
- package/dist/retail/components/Fields/AddressRetailField.js.map +1 -1
- package/dist/retail/components/Fields/CardCategoryField.js +2 -8
- package/dist/retail/components/Fields/CardCategoryField.js.map +1 -1
- package/dist/retail/components/Fields/RegionRetailField.js +17 -20
- package/dist/retail/components/Fields/RegionRetailField.js.map +1 -1
- package/dist/retail/utils/rshbConstants.d.ts +20 -0
- package/dist/retail/utils/rshbConstants.js +23 -0
- package/dist/retail/utils/rshbConstants.js.map +1 -0
- package/lib/components/ApplicationLeadForm/getLeadFormTaskData.js +1 -1
- package/lib/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/lib/retail/api/createUserTaskDebit.d.ts +1 -1
- package/lib/retail/components/Fields/AddressRetailField.js +4 -1
- package/lib/retail/components/Fields/AddressRetailField.js.map +1 -1
- package/lib/retail/components/Fields/CardCategoryField.js +2 -8
- package/lib/retail/components/Fields/CardCategoryField.js.map +1 -1
- package/lib/retail/components/Fields/RegionRetailField.js +14 -17
- package/lib/retail/components/Fields/RegionRetailField.js.map +1 -1
- package/lib/retail/utils/rshbConstants.d.ts +20 -0
- package/lib/retail/utils/rshbConstants.js +21 -0
- package/lib/retail/utils/rshbConstants.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +41 -28
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/retail/api/createUserTaskDebit.d.ts +1 -1
- package/mobile/bundle/retail/utils/rshbConstants.d.ts +20 -0
- package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.js +1 -1
- package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/mobile/dist/retail/api/createUserTaskDebit.d.ts +1 -1
- package/mobile/dist/retail/components/Fields/AddressRetailField.js +4 -1
- package/mobile/dist/retail/components/Fields/AddressRetailField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/CardCategoryField.js +2 -8
- package/mobile/dist/retail/components/Fields/CardCategoryField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/RegionRetailField.js +17 -20
- package/mobile/dist/retail/components/Fields/RegionRetailField.js.map +1 -1
- package/mobile/dist/retail/utils/rshbConstants.d.ts +20 -0
- package/mobile/dist/retail/utils/rshbConstants.js +23 -0
- package/mobile/dist/retail/utils/rshbConstants.js.map +1 -0
- package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.js +1 -1
- package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/mobile/lib/retail/api/createUserTaskDebit.d.ts +1 -1
- package/mobile/lib/retail/components/Fields/AddressRetailField.js +4 -1
- package/mobile/lib/retail/components/Fields/AddressRetailField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/CardCategoryField.js +2 -8
- package/mobile/lib/retail/components/Fields/CardCategoryField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/RegionRetailField.js +14 -17
- package/mobile/lib/retail/components/Fields/RegionRetailField.js.map +1 -1
- package/mobile/lib/retail/utils/rshbConstants.d.ts +20 -0
- package/mobile/lib/retail/utils/rshbConstants.js +21 -0
- package/mobile/lib/retail/utils/rshbConstants.js.map +1 -0
- package/mobile/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +1 -1
- package/mobile/src/retail/api/createUserTaskDebit.ts +1 -1
- package/mobile/src/retail/components/Fields/AddressRetailField.tsx +4 -0
- package/mobile/src/retail/components/Fields/CardCategoryField.tsx +2 -10
- package/mobile/src/retail/components/Fields/RegionRetailField.tsx +14 -18
- package/mobile/src/retail/utils/rshbConstants.ts +21 -0
- package/package.json +1 -1
- package/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +1 -1
- package/src/retail/api/createUserTaskDebit.ts +1 -1
- package/src/retail/components/Fields/AddressRetailField.tsx +4 -0
- package/src/retail/components/Fields/CardCategoryField.tsx +2 -10
- package/src/retail/components/Fields/RegionRetailField.tsx +14 -18
- package/src/retail/utils/rshbConstants.ts +21 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -4589,9 +4589,21 @@
|
|
|
4589
4589
|
return result || [];
|
|
4590
4590
|
};
|
|
4591
4591
|
|
|
4592
|
+
const localStore = new Store(); // localStorage cache
|
|
4593
|
+
replicate(localStore, new StorageAdapter(globalThis?.localStorage));
|
|
4594
|
+
function useLocalStore(methods) {
|
|
4595
|
+
return useStore(localStore, methods);
|
|
4596
|
+
}
|
|
4597
|
+
|
|
4598
|
+
const useRetailFormStore = () => {
|
|
4599
|
+
return useLocalStore();
|
|
4600
|
+
};
|
|
4601
|
+
|
|
4592
4602
|
const AddressRetailField = JSX(({ field, input }) => {
|
|
4593
4603
|
const [offices, setOffices] = useState([]);
|
|
4594
4604
|
const { data } = useLeadFormData('REGION_RF');
|
|
4605
|
+
const { programId } = useRetailFormStore();
|
|
4606
|
+
const isSalaryCard = programId === '38';
|
|
4595
4607
|
const regionValue = field('regionRetail')?.value || {};
|
|
4596
4608
|
const addressField = field(input?.name ?? '');
|
|
4597
4609
|
useEffect(() => {
|
|
@@ -4605,22 +4617,12 @@
|
|
|
4605
4617
|
filtrationState: {},
|
|
4606
4618
|
getBalloon: getOfficePoint,
|
|
4607
4619
|
});
|
|
4608
|
-
return (jsxs("div", { children: [jsx(SelectControl, { label: "\u0410\u0434\u0440\u0435\u0441 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u044F", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435", options: offices.map(({ id, address = '' }) => ({
|
|
4620
|
+
return (jsxs("div", { children: [jsx(SelectControl, { label: "\u0410\u0434\u0440\u0435\u0441 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u044F", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435", disabled: isSalaryCard, options: offices.map(({ id, address = '' }) => ({
|
|
4609
4621
|
key: id?.toString() || '',
|
|
4610
4622
|
text: address,
|
|
4611
4623
|
})), ...addressField, isSearch: true }), jsx("div", { className: "h-[600px]", children: jsx(ClientOnly, { children: jsx(YandexMap, { points: points, isLoad: !data, className: "h-full", selectedAddress: addressField?.value?.text }) }) })] }));
|
|
4612
4624
|
});
|
|
4613
4625
|
|
|
4614
|
-
const localStore = new Store(); // localStorage cache
|
|
4615
|
-
replicate(localStore, new StorageAdapter(globalThis?.localStorage));
|
|
4616
|
-
function useLocalStore(methods) {
|
|
4617
|
-
return useStore(localStore, methods);
|
|
4618
|
-
}
|
|
4619
|
-
|
|
4620
|
-
const useRetailFormStore = () => {
|
|
4621
|
-
return useLocalStore();
|
|
4622
|
-
};
|
|
4623
|
-
|
|
4624
4626
|
const SelectField = UniBlock(({ field, source, fieldName, placeholder = 'Выберите из списка',
|
|
4625
4627
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4626
4628
|
options, onChange, ...rest }) => {
|
|
@@ -4702,12 +4704,6 @@
|
|
|
4702
4704
|
const { value: selectedCardCategory, onChange: cardCategoryChange } = field('cardCategory');
|
|
4703
4705
|
const selectedPaymentSystem = field('paymentSystem')?.value?.key;
|
|
4704
4706
|
const isOffice = leadForm?.methodObtain === 'office';
|
|
4705
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
4706
|
-
const noop = () => { };
|
|
4707
|
-
const handleChangeIsMomentDebitCard = useMemo(() => {
|
|
4708
|
-
const onChange = field('isMomentDebitCard')?.onChange;
|
|
4709
|
-
return onChange ?? noop;
|
|
4710
|
-
}, [field]);
|
|
4711
4707
|
const isInstantSelectedCardCategory = field('cardCategory')
|
|
4712
4708
|
?.value?.text?.toLowerCase()
|
|
4713
4709
|
?.includes('неимен');
|
|
@@ -4719,7 +4715,7 @@
|
|
|
4719
4715
|
: null, [selectedPaymentSystem]);
|
|
4720
4716
|
const onChange = useCallback((value) => {
|
|
4721
4717
|
cardCategoryChange?.(value);
|
|
4722
|
-
|
|
4718
|
+
field('isMomentDebitCard')?.onChange?.(value?.text?.toLowerCase()?.includes('неимен'));
|
|
4723
4719
|
}, []);
|
|
4724
4720
|
useEffect(() => {
|
|
4725
4721
|
if (selectedPaymentSystem && programId) {
|
|
@@ -4733,7 +4729,7 @@
|
|
|
4733
4729
|
cardCategoryChange?.(getCardCategoryValue(actualCardTypes));
|
|
4734
4730
|
}
|
|
4735
4731
|
if (isDebit) {
|
|
4736
|
-
|
|
4732
|
+
field('isMomentDebitCard')?.onChange?.(isInstantSelectedCardCategory);
|
|
4737
4733
|
}
|
|
4738
4734
|
})();
|
|
4739
4735
|
}
|
|
@@ -5749,8 +5745,20 @@
|
|
|
5749
5745
|
text: 'Аэропорт Шереметьево, МО, г.Химки, Шереметьевское шоссе, вл39с1',
|
|
5750
5746
|
},
|
|
5751
5747
|
};
|
|
5748
|
+
const DEFAULT_SALARY_CARD_VALUES = {
|
|
5749
|
+
region: {
|
|
5750
|
+
key: 'REGION_77',
|
|
5751
|
+
text: 'Москва и Московская область',
|
|
5752
|
+
},
|
|
5753
|
+
office: {
|
|
5754
|
+
key: '3',
|
|
5755
|
+
text: 'г. Москва, Пресненская наб., д. 10, стр. 2',
|
|
5756
|
+
},
|
|
5757
|
+
};
|
|
5758
|
+
|
|
5752
5759
|
const RegionRetailField = JSX(({ field, input }) => {
|
|
5753
|
-
const { programId, productType } = useRetailFormStore();
|
|
5760
|
+
const { programId, productType, leadForm } = useRetailFormStore();
|
|
5761
|
+
const regionRetail = leadForm?.regionRetail;
|
|
5754
5762
|
const { data: regions } = useLeadFormData('REGION_RF');
|
|
5755
5763
|
const { data: regionsDelivery } = useAsyncData('regionsDelivery', getRegionsCardDelivery);
|
|
5756
5764
|
const { data: productSettings } = useLeadFormData(getCurrentProductSettings(productType));
|
|
@@ -5784,14 +5792,19 @@
|
|
|
5784
5792
|
handleChangeRegionHasDelivery?.(checkRegionDeliveryStatus(DEFAULT_BIBLIOLOBUS_VALUES.region));
|
|
5785
5793
|
handleChangeMethodObtain?.('office');
|
|
5786
5794
|
}
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
handleChangeRegionHasDelivery?.(false);
|
|
5795
|
+
if (isSalaryCard) {
|
|
5796
|
+
handleChangeRegion?.(DEFAULT_SALARY_CARD_VALUES.region);
|
|
5797
|
+
handleChangeOffice?.(DEFAULT_SALARY_CARD_VALUES.office);
|
|
5791
5798
|
handleChangeMethodObtain?.('office');
|
|
5792
5799
|
}
|
|
5793
|
-
|
|
5794
|
-
|
|
5800
|
+
if (regionRetail) {
|
|
5801
|
+
const regionHasDelivery = checkRegionDeliveryStatus(regionRetail);
|
|
5802
|
+
handleChangeRegionHasDelivery?.(regionHasDelivery);
|
|
5803
|
+
handleChangeMethodObtain?.(regionHasDelivery ? 'courier' : 'office');
|
|
5804
|
+
handleChangeRegion?.(regionRetail);
|
|
5805
|
+
}
|
|
5806
|
+
}, [checkRegionDeliveryStatus]);
|
|
5807
|
+
return (jsx(SelectControl, { label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, disabled: isSalaryCard, options: formatRegions, ...field(input?.name ?? ''), ...input, onChange: onChange }));
|
|
5795
5808
|
});
|
|
5796
5809
|
const getCurrentProductSettings = (productType) => productType === 'debitCard' ? 'DEBIT_CARD_LEAD_PROCESS_SETTINGS' : 'CREDIT_LEAD_PROCESS_SETTINGS';
|
|
5797
5810
|
|
|
@@ -6707,8 +6720,8 @@
|
|
|
6707
6720
|
},
|
|
6708
6721
|
],
|
|
6709
6722
|
marketingInfo,
|
|
6723
|
+
claimChannelCode,
|
|
6710
6724
|
},
|
|
6711
|
-
claimChannelCode,
|
|
6712
6725
|
};
|
|
6713
6726
|
};
|
|
6714
6727
|
const getTaskSource = (source) => {
|
|
@@ -13117,7 +13130,7 @@
|
|
|
13117
13130
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
13118
13131
|
});
|
|
13119
13132
|
|
|
13120
|
-
const packageVersion = "0.14.
|
|
13133
|
+
const packageVersion = "0.14.979";
|
|
13121
13134
|
|
|
13122
13135
|
exports.Blocks = Blocks;
|
|
13123
13136
|
exports.ContentPage = ContentPage;
|