@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
|
@@ -4597,9 +4597,21 @@
|
|
|
4597
4597
|
return result || [];
|
|
4598
4598
|
};
|
|
4599
4599
|
|
|
4600
|
+
const localStore = new Store(); // localStorage cache
|
|
4601
|
+
replicate(localStore, new StorageAdapter(globalThis?.localStorage));
|
|
4602
|
+
function useLocalStore(methods) {
|
|
4603
|
+
return useStore(localStore, methods);
|
|
4604
|
+
}
|
|
4605
|
+
|
|
4606
|
+
const useRetailFormStore = () => {
|
|
4607
|
+
return useLocalStore();
|
|
4608
|
+
};
|
|
4609
|
+
|
|
4600
4610
|
const AddressRetailField = JSX(({ field, input }) => {
|
|
4601
4611
|
const [offices, setOffices] = useState([]);
|
|
4602
4612
|
const { data } = useLeadFormData('REGION_RF');
|
|
4613
|
+
const { programId } = useRetailFormStore();
|
|
4614
|
+
const isSalaryCard = programId === '38';
|
|
4603
4615
|
const regionValue = field('regionRetail')?.value || {};
|
|
4604
4616
|
const addressField = field(input?.name ?? '');
|
|
4605
4617
|
useEffect(() => {
|
|
@@ -4613,22 +4625,12 @@
|
|
|
4613
4625
|
filtrationState: {},
|
|
4614
4626
|
getBalloon: getOfficePoint,
|
|
4615
4627
|
});
|
|
4616
|
-
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 = '' }) => ({
|
|
4628
|
+
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 = '' }) => ({
|
|
4617
4629
|
key: id?.toString() || '',
|
|
4618
4630
|
text: address,
|
|
4619
4631
|
})), ...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 }) }) })] }));
|
|
4620
4632
|
});
|
|
4621
4633
|
|
|
4622
|
-
const localStore = new Store(); // localStorage cache
|
|
4623
|
-
replicate(localStore, new StorageAdapter(globalThis?.localStorage));
|
|
4624
|
-
function useLocalStore(methods) {
|
|
4625
|
-
return useStore(localStore, methods);
|
|
4626
|
-
}
|
|
4627
|
-
|
|
4628
|
-
const useRetailFormStore = () => {
|
|
4629
|
-
return useLocalStore();
|
|
4630
|
-
};
|
|
4631
|
-
|
|
4632
4634
|
const SelectField = UniBlock(({ field, source, fieldName, placeholder = 'Выберите из списка',
|
|
4633
4635
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4634
4636
|
options, onChange, ...rest }) => {
|
|
@@ -4710,12 +4712,6 @@
|
|
|
4710
4712
|
const { value: selectedCardCategory, onChange: cardCategoryChange } = field('cardCategory');
|
|
4711
4713
|
const selectedPaymentSystem = field('paymentSystem')?.value?.key;
|
|
4712
4714
|
const isOffice = leadForm?.methodObtain === 'office';
|
|
4713
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
4714
|
-
const noop = () => { };
|
|
4715
|
-
const handleChangeIsMomentDebitCard = useMemo(() => {
|
|
4716
|
-
const onChange = field('isMomentDebitCard')?.onChange;
|
|
4717
|
-
return onChange ?? noop;
|
|
4718
|
-
}, [field]);
|
|
4719
4715
|
const isInstantSelectedCardCategory = field('cardCategory')
|
|
4720
4716
|
?.value?.text?.toLowerCase()
|
|
4721
4717
|
?.includes('неимен');
|
|
@@ -4727,7 +4723,7 @@
|
|
|
4727
4723
|
: null, [selectedPaymentSystem]);
|
|
4728
4724
|
const onChange = useCallback((value) => {
|
|
4729
4725
|
cardCategoryChange?.(value);
|
|
4730
|
-
|
|
4726
|
+
field('isMomentDebitCard')?.onChange?.(value?.text?.toLowerCase()?.includes('неимен'));
|
|
4731
4727
|
}, []);
|
|
4732
4728
|
useEffect(() => {
|
|
4733
4729
|
if (selectedPaymentSystem && programId) {
|
|
@@ -4741,7 +4737,7 @@
|
|
|
4741
4737
|
cardCategoryChange?.(getCardCategoryValue(actualCardTypes));
|
|
4742
4738
|
}
|
|
4743
4739
|
if (isDebit) {
|
|
4744
|
-
|
|
4740
|
+
field('isMomentDebitCard')?.onChange?.(isInstantSelectedCardCategory);
|
|
4745
4741
|
}
|
|
4746
4742
|
})();
|
|
4747
4743
|
}
|
|
@@ -5757,8 +5753,20 @@
|
|
|
5757
5753
|
text: 'Аэропорт Шереметьево, МО, г.Химки, Шереметьевское шоссе, вл39с1',
|
|
5758
5754
|
},
|
|
5759
5755
|
};
|
|
5756
|
+
const DEFAULT_SALARY_CARD_VALUES = {
|
|
5757
|
+
region: {
|
|
5758
|
+
key: 'REGION_77',
|
|
5759
|
+
text: 'Москва и Московская область',
|
|
5760
|
+
},
|
|
5761
|
+
office: {
|
|
5762
|
+
key: '3',
|
|
5763
|
+
text: 'г. Москва, Пресненская наб., д. 10, стр. 2',
|
|
5764
|
+
},
|
|
5765
|
+
};
|
|
5766
|
+
|
|
5760
5767
|
const RegionRetailField = JSX(({ field, input }) => {
|
|
5761
|
-
const { programId, productType } = useRetailFormStore();
|
|
5768
|
+
const { programId, productType, leadForm } = useRetailFormStore();
|
|
5769
|
+
const regionRetail = leadForm?.regionRetail;
|
|
5762
5770
|
const { data: regions } = useLeadFormData('REGION_RF');
|
|
5763
5771
|
const { data: regionsDelivery } = useAsyncData('regionsDelivery', getRegionsCardDelivery);
|
|
5764
5772
|
const { data: productSettings } = useLeadFormData(getCurrentProductSettings(productType));
|
|
@@ -5792,14 +5800,19 @@
|
|
|
5792
5800
|
handleChangeRegionHasDelivery?.(checkRegionDeliveryStatus(DEFAULT_BIBLIOLOBUS_VALUES.region));
|
|
5793
5801
|
handleChangeMethodObtain?.('office');
|
|
5794
5802
|
}
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
handleChangeRegionHasDelivery?.(false);
|
|
5803
|
+
if (isSalaryCard) {
|
|
5804
|
+
handleChangeRegion?.(DEFAULT_SALARY_CARD_VALUES.region);
|
|
5805
|
+
handleChangeOffice?.(DEFAULT_SALARY_CARD_VALUES.office);
|
|
5799
5806
|
handleChangeMethodObtain?.('office');
|
|
5800
5807
|
}
|
|
5801
|
-
|
|
5802
|
-
|
|
5808
|
+
if (regionRetail) {
|
|
5809
|
+
const regionHasDelivery = checkRegionDeliveryStatus(regionRetail);
|
|
5810
|
+
handleChangeRegionHasDelivery?.(regionHasDelivery);
|
|
5811
|
+
handleChangeMethodObtain?.(regionHasDelivery ? 'courier' : 'office');
|
|
5812
|
+
handleChangeRegion?.(regionRetail);
|
|
5813
|
+
}
|
|
5814
|
+
}, [checkRegionDeliveryStatus]);
|
|
5815
|
+
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 }));
|
|
5803
5816
|
});
|
|
5804
5817
|
const getCurrentProductSettings = (productType) => productType === 'debitCard' ? 'DEBIT_CARD_LEAD_PROCESS_SETTINGS' : 'CREDIT_LEAD_PROCESS_SETTINGS';
|
|
5805
5818
|
|
|
@@ -6715,8 +6728,8 @@
|
|
|
6715
6728
|
},
|
|
6716
6729
|
],
|
|
6717
6730
|
marketingInfo,
|
|
6731
|
+
claimChannelCode,
|
|
6718
6732
|
},
|
|
6719
|
-
claimChannelCode,
|
|
6720
6733
|
};
|
|
6721
6734
|
};
|
|
6722
6735
|
const getTaskSource = (source) => {
|
|
@@ -12899,7 +12912,7 @@
|
|
|
12899
12912
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
12900
12913
|
});
|
|
12901
12914
|
|
|
12902
|
-
const packageVersion = "0.14.
|
|
12915
|
+
const packageVersion = "0.14.979";
|
|
12903
12916
|
|
|
12904
12917
|
exports.Blocks = Blocks;
|
|
12905
12918
|
exports.ContentPage = ContentPage;
|