@redneckz/wildless-cms-uni-blocks 0.14.231 → 0.14.233
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/EventBus/defaultEventBus.d.ts +2 -2
- package/bundle/bundle.umd.js +18 -8
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +2 -2
- package/bundle/hooks/useLocation.d.ts +2 -7
- package/bundle/hooks/useRegions.d.ts +1 -0
- package/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
- package/bundle/ui-kit/LocationDialog/renderRegion.d.ts +1 -1
- package/dist/EventBus/defaultEventBus.d.ts +2 -2
- package/dist/components/Calculator/CreditCalculatorForm.js +12 -0
- package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/dist/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +2 -2
- package/dist/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -1
- package/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/dist/hooks/useLocation.d.ts +2 -7
- package/dist/hooks/useLocation.js.map +1 -1
- package/dist/hooks/useRegions.d.ts +1 -0
- package/dist/hooks/useRegions.js.map +1 -1
- package/dist/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
- package/dist/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
- package/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/dist/ui-kit/LocationDialog/LocationDialog.js +4 -3
- package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/dist/ui-kit/LocationDialog/renderRegion.d.ts +1 -1
- package/dist/ui-kit/LocationDialog/renderRegion.js +4 -3
- package/dist/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/lib/EventBus/defaultEventBus.d.ts +2 -2
- package/lib/components/Calculator/CreditCalculatorForm.js +12 -0
- package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/lib/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +2 -2
- package/lib/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -1
- package/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/lib/hooks/useLocation.d.ts +2 -7
- package/lib/hooks/useLocation.js.map +1 -1
- package/lib/hooks/useRegions.d.ts +1 -0
- package/lib/hooks/useRegions.js.map +1 -1
- package/lib/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
- package/lib/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
- package/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/lib/ui-kit/LocationDialog/LocationDialog.js +4 -3
- package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/lib/ui-kit/LocationDialog/renderRegion.d.ts +1 -1
- package/lib/ui-kit/LocationDialog/renderRegion.js +4 -3
- package/lib/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/mobile/bundle/EventBus/defaultEventBus.d.ts +2 -2
- package/mobile/bundle/bundle.umd.js +18 -8
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +2 -2
- package/mobile/bundle/hooks/useLocation.d.ts +2 -7
- package/mobile/bundle/hooks/useRegions.d.ts +1 -0
- package/mobile/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
- package/mobile/bundle/ui-kit/LocationDialog/renderRegion.d.ts +1 -1
- package/mobile/dist/EventBus/defaultEventBus.d.ts +2 -2
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js +12 -0
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +2 -2
- package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/mobile/dist/hooks/useLocation.d.ts +2 -7
- package/mobile/dist/hooks/useLocation.js.map +1 -1
- package/mobile/dist/hooks/useRegions.d.ts +1 -0
- package/mobile/dist/hooks/useRegions.js.map +1 -1
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +4 -3
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/renderRegion.d.ts +1 -1
- package/mobile/dist/ui-kit/LocationDialog/renderRegion.js +4 -3
- package/mobile/dist/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/mobile/lib/EventBus/defaultEventBus.d.ts +2 -2
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js +12 -0
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +2 -2
- package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/mobile/lib/hooks/useLocation.d.ts +2 -7
- package/mobile/lib/hooks/useLocation.js.map +1 -1
- package/mobile/lib/hooks/useRegions.d.ts +1 -0
- package/mobile/lib/hooks/useRegions.js.map +1 -1
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +4 -3
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/renderRegion.d.ts +1 -1
- package/mobile/lib/ui-kit/LocationDialog/renderRegion.js +4 -3
- package/mobile/lib/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/mobile/src/EventBus/defaultEventBus.ts +2 -2
- package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +23 -0
- package/mobile/src/components/ExchangeRateTile/useFetchExchangeRateData.ts +2 -2
- package/mobile/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +3 -2
- package/mobile/src/hooks/useLocation.ts +6 -13
- package/mobile/src/hooks/useRegions.ts +1 -0
- package/mobile/src/ui-kit/LinkWrapper/LinkWrapper.tsx +3 -2
- package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +9 -8
- package/mobile/src/ui-kit/LocationDialog/renderRegion.tsx +16 -15
- package/package.json +1 -1
- package/src/EventBus/defaultEventBus.ts +2 -2
- package/src/components/Calculator/CreditCalculatorForm.tsx +23 -0
- package/src/components/ExchangeRateTile/useFetchExchangeRateData.ts +2 -2
- package/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +3 -2
- package/src/hooks/useLocation.ts +6 -13
- package/src/hooks/useRegions.ts +1 -0
- package/src/ui-kit/LinkWrapper/LinkWrapper.tsx +3 -2
- package/src/ui-kit/LocationDialog/LocationDialog.tsx +9 -8
- package/src/ui-kit/LocationDialog/renderRegion.tsx +16 -15
|
@@ -2563,6 +2563,16 @@
|
|
|
2563
2563
|
orientation: 'vertical',
|
|
2564
2564
|
...field('isAnnuity'),
|
|
2565
2565
|
});
|
|
2566
|
+
const { onChange: setMoneyValue } = field('moneyValue');
|
|
2567
|
+
const { onChange: setMonthsValue } = field('monthsValue');
|
|
2568
|
+
useEffect(() => {
|
|
2569
|
+
setMoneyValue &&
|
|
2570
|
+
setMoneyValue(clamp(userInputParams.moneyValue, calculatorParams.minSum, calculatorParams.maxSum));
|
|
2571
|
+
}, [calculatorParams.minSum, calculatorParams.maxSum]);
|
|
2572
|
+
useEffect(() => {
|
|
2573
|
+
setMonthsValue &&
|
|
2574
|
+
setMonthsValue(clamp(userInputParams.monthsValue, calculatorParams.minMonths, calculatorParams.maxMonths));
|
|
2575
|
+
}, [calculatorParams.minMonths, calculatorParams.maxMonths]);
|
|
2566
2576
|
return (jsx(CalculatorFormLayout, { className: className, inputChildren: jsxs("div", { children: [renderWantedSumInput({
|
|
2567
2577
|
title: 'Сумма кредита, ₽',
|
|
2568
2578
|
step: 500,
|
|
@@ -3072,9 +3082,9 @@
|
|
|
3072
3082
|
.map((link, index) => (jsx(CarouselLinkButton, { ...link }, String(index)))) }, String(groupIndex)))) }));
|
|
3073
3083
|
};
|
|
3074
3084
|
|
|
3075
|
-
const LinkWrapper = JSX(({ className = '', href, target, isRemote = false, children }) => {
|
|
3085
|
+
const LinkWrapper = JSX(({ className = '', href, target, isRemote = false, onClick, children }) => {
|
|
3076
3086
|
const link = useLink({ isRemote });
|
|
3077
|
-
const linkProps = link({ href, target });
|
|
3087
|
+
const linkProps = link({ href, target, onClick });
|
|
3078
3088
|
const Tag = href ? 'a' : 'div';
|
|
3079
3089
|
return (jsx(Tag, { className: style('block', className), ...(href ? linkProps : {}), role: href ? 'link' : 'none', children: children }));
|
|
3080
3090
|
});
|
|
@@ -4847,9 +4857,9 @@
|
|
|
4847
4857
|
return (jsxs("div", { className: "flex gap-s items-center", children: [icon ? jsx(Img, { pathPrefix: "/wcms-resources/", image: icon }) : null, text ? (jsx("a", { className: "hover:text-primary-hover", href: href, target: target, onClick: onClick, children: jsx(Text, { size: "text-l", font: "font-light", color: "text-primary-text", children: text }) })) : null] }));
|
|
4848
4858
|
});
|
|
4849
4859
|
|
|
4850
|
-
const renderRegion = (onChangeLocation) => (region) => (jsx(
|
|
4851
|
-
|
|
4852
|
-
|
|
4860
|
+
const renderRegion = (onChangeLocation) => (region) => region.name ? (jsx(LinkWrapper, { isRemote: true, href: `/branches/${region.slug}`, className: "mb-xs sm:mb-2xs hover:text-primary-hover", onClick: () => {
|
|
4861
|
+
onChangeLocation && onChangeLocation(region);
|
|
4862
|
+
}, children: jsx(Text, { size: "text-l", font: "font-light", children: region.name }) }, String(region.id))) : null;
|
|
4853
4863
|
|
|
4854
4864
|
const renderRegionGroup = (onChangeLocation) => ([letter, regions]) => (jsxs("div", { className: "break-inside-avoid mb-2xl w-56", children: [jsx("div", { className: "mb-s", children: jsx(Text, { size: "text-h6", children: letter }) }), regions.map(renderRegion(onChangeLocation))] }, letter));
|
|
4855
4865
|
|
|
@@ -4861,7 +4871,7 @@
|
|
|
4861
4871
|
const SEARCH_TERM_MIN_LENGTH = 3;
|
|
4862
4872
|
const LocationDialog = JSX(({ foreignOffices, defaultLocation }) => {
|
|
4863
4873
|
const [currentLocation, selectCurrentLocation] = useLocation(defaultLocation);
|
|
4864
|
-
const link = useLink({ isRemote: true
|
|
4874
|
+
const link = useLink({ isRemote: true });
|
|
4865
4875
|
const { href } = link({ href: `/branches/${currentLocation.slug}` });
|
|
4866
4876
|
const [query, setQuery] = useState('');
|
|
4867
4877
|
const regions = cleanUpRegions(useRegions()).sort((a, b) => a.name.localeCompare(b.name));
|
|
@@ -4871,7 +4881,7 @@
|
|
|
4871
4881
|
selectCurrentLocation(region);
|
|
4872
4882
|
close();
|
|
4873
4883
|
}, []);
|
|
4874
|
-
return (jsxs(Dialog, { className: "pb-20", head: jsxs("div", { children: [jsx(Text, { size: "text-h4", color: "text-primary-text", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B" }), currentLocation ? (
|
|
4884
|
+
return (jsxs(Dialog, { className: "pb-20", head: jsxs("div", { children: [jsx(Text, { size: "text-h4", color: "text-primary-text", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B" }), currentLocation ? (jsx("div", { className: "mb-s", children: jsxs(Paragraph, { size: "text-l", color: "text-primary-text", children: ["\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:", jsx(LinkWrapper, { isRemote: true, href: href, className: "inline mx-2xs text-primary-main", children: currentLocation.name })] }) })) : null, jsx(SearchBar$1, { onSearch: setQuery, searchTerm: query })] }), children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
|
|
4875
4885
|
.filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
|
|
4876
4886
|
.map(renderRegion(handleChangeLocation)) })) : (jsx("div", { className: "columns-1 sm:columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup(handleChangeLocation)) })), renderForeignOffices(foreignOffices)] }));
|
|
4877
4887
|
});
|
|
@@ -5631,7 +5641,7 @@
|
|
|
5631
5641
|
|
|
5632
5642
|
const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
|
|
5633
5643
|
|
|
5634
|
-
const packageVersion = "0.14.
|
|
5644
|
+
const packageVersion = "0.14.232";
|
|
5635
5645
|
|
|
5636
5646
|
exports.Blocks = Blocks;
|
|
5637
5647
|
exports.ContentPage = ContentPage;
|