@redneckz/wildless-cms-uni-blocks 0.14.842 → 0.14.843
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 +14 -127
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Blocks.js +0 -4
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Blocks.mobile.js +0 -4
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Blocks.js +0 -4
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Blocks.mobile.js +0 -4
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/Carousel/Carousel.fixture.d.ts +0 -2
- package/lib/components/Carousel/Carousel.fixture.mobile.d.ts +0 -1
- package/mobile/bundle/bundle.umd.js +7 -127
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/Blocks.js +0 -4
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/Blocks.js +0 -4
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/src/components/Blocks.ts +0 -4
- package/package.json +2 -2
- package/src/components/Blocks.mobile.ts +0 -4
- package/src/components/Blocks.ts +0 -4
- package/src/components/Carousel/Carousel.fixture.mobile.tsx +0 -16
- package/src/components/Carousel/Carousel.fixture.tsx +0 -35
- package/bundle/components/CarouselCard/CarouselCard.d.ts +0 -5
- package/bundle/components/CarouselCard/CarouselCardContent.d.ts +0 -11
- package/bundle/components/CarouselCard/constants.d.ts +0 -2
- package/bundle/components/CarouselCard/titleSize.d.ts +0 -1
- package/bundle/components/CarouselCard/titleSize.mobile.d.ts +0 -1
- package/bundle/components/Depository/Depository.d.ts +0 -11
- package/bundle/components/Depository/DepositoryContent.d.ts +0 -5
- package/bundle/components/Depository/DepositoryFilter.d.ts +0 -9
- package/bundle/components/Depository/DepositoryItem.d.ts +0 -2
- package/bundle/components/Depository/useDepository.d.ts +0 -15
- package/bundle/ui-kit/Unit/Unit.d.ts +0 -2
- package/bundle/ui-kit/Unit/UnitProps.d.ts +0 -8
- package/dist/components/CarouselCard/CarouselCard.d.ts +0 -5
- package/dist/components/CarouselCard/CarouselCard.js +0 -16
- package/dist/components/CarouselCard/CarouselCard.js.map +0 -1
- package/dist/components/CarouselCard/CarouselCardContent.d.ts +0 -11
- package/dist/components/CarouselCard/CarouselCardContent.js +0 -2
- package/dist/components/CarouselCard/CarouselCardContent.js.map +0 -1
- package/dist/components/CarouselCard/constants.d.ts +0 -2
- package/dist/components/CarouselCard/constants.js +0 -7
- package/dist/components/CarouselCard/constants.js.map +0 -1
- package/dist/components/CarouselCard/titleSize.d.ts +0 -1
- package/dist/components/CarouselCard/titleSize.js +0 -4
- package/dist/components/CarouselCard/titleSize.js.map +0 -1
- package/dist/components/CarouselCard/titleSize.mobile.d.ts +0 -1
- package/dist/components/CarouselCard/titleSize.mobile.js +0 -4
- package/dist/components/CarouselCard/titleSize.mobile.js.map +0 -1
- package/dist/components/Depository/Depository.d.ts +0 -11
- package/dist/components/Depository/Depository.js +0 -42
- package/dist/components/Depository/Depository.js.map +0 -1
- package/dist/components/Depository/DepositoryContent.d.ts +0 -5
- package/dist/components/Depository/DepositoryContent.js +0 -2
- package/dist/components/Depository/DepositoryContent.js.map +0 -1
- package/dist/components/Depository/DepositoryFilter.d.ts +0 -9
- package/dist/components/Depository/DepositoryFilter.js +0 -9
- package/dist/components/Depository/DepositoryFilter.js.map +0 -1
- package/dist/components/Depository/DepositoryItem.d.ts +0 -2
- package/dist/components/Depository/DepositoryItem.js +0 -15
- package/dist/components/Depository/DepositoryItem.js.map +0 -1
- package/dist/components/Depository/useDepository.d.ts +0 -15
- package/dist/components/Depository/useDepository.js +0 -22
- package/dist/components/Depository/useDepository.js.map +0 -1
- package/dist/ui-kit/Unit/Unit.d.ts +0 -2
- package/dist/ui-kit/Unit/Unit.js +0 -9
- package/dist/ui-kit/Unit/Unit.js.map +0 -1
- package/dist/ui-kit/Unit/UnitProps.d.ts +0 -8
- package/dist/ui-kit/Unit/UnitProps.js +0 -2
- package/dist/ui-kit/Unit/UnitProps.js.map +0 -1
- package/lib/components/CarouselCard/CarouselCard.d.ts +0 -5
- package/lib/components/CarouselCard/CarouselCard.fixture.d.ts +0 -11
- package/lib/components/CarouselCard/CarouselCard.fixture.mobile.d.ts +0 -7
- package/lib/components/CarouselCard/CarouselCard.js +0 -14
- package/lib/components/CarouselCard/CarouselCard.js.map +0 -1
- package/lib/components/CarouselCard/CarouselCardContent.d.ts +0 -11
- package/lib/components/CarouselCard/CarouselCardContent.js +0 -2
- package/lib/components/CarouselCard/CarouselCardContent.js.map +0 -1
- package/lib/components/CarouselCard/constants.d.ts +0 -2
- package/lib/components/CarouselCard/constants.js +0 -5
- package/lib/components/CarouselCard/constants.js.map +0 -1
- package/lib/components/CarouselCard/titleSize.d.ts +0 -1
- package/lib/components/CarouselCard/titleSize.js +0 -2
- package/lib/components/CarouselCard/titleSize.js.map +0 -1
- package/lib/components/CarouselCard/titleSize.mobile.d.ts +0 -1
- package/lib/components/CarouselCard/titleSize.mobile.js +0 -2
- package/lib/components/CarouselCard/titleSize.mobile.js.map +0 -1
- package/lib/components/Depository/Depository.d.ts +0 -11
- package/lib/components/Depository/Depository.fixture.d.ts +0 -5
- package/lib/components/Depository/Depository.fixture.mobile.d.ts +0 -5
- package/lib/components/Depository/Depository.js +0 -40
- package/lib/components/Depository/Depository.js.map +0 -1
- package/lib/components/Depository/DepositoryContent.d.ts +0 -5
- package/lib/components/Depository/DepositoryContent.js +0 -2
- package/lib/components/Depository/DepositoryContent.js.map +0 -1
- package/lib/components/Depository/DepositoryFilter.d.ts +0 -9
- package/lib/components/Depository/DepositoryFilter.js +0 -7
- package/lib/components/Depository/DepositoryFilter.js.map +0 -1
- package/lib/components/Depository/DepositoryItem.d.ts +0 -2
- package/lib/components/Depository/DepositoryItem.js +0 -13
- package/lib/components/Depository/DepositoryItem.js.map +0 -1
- package/lib/components/Depository/useDepository.d.ts +0 -15
- package/lib/components/Depository/useDepository.js +0 -19
- package/lib/components/Depository/useDepository.js.map +0 -1
- package/lib/ui-kit/Unit/Unit.d.ts +0 -2
- package/lib/ui-kit/Unit/Unit.js +0 -7
- package/lib/ui-kit/Unit/Unit.js.map +0 -1
- package/lib/ui-kit/Unit/UnitProps.d.ts +0 -8
- package/lib/ui-kit/Unit/UnitProps.js +0 -2
- package/lib/ui-kit/Unit/UnitProps.js.map +0 -1
- package/mobile/bundle/components/CarouselCard/CarouselCard.d.ts +0 -5
- package/mobile/bundle/components/CarouselCard/CarouselCardContent.d.ts +0 -11
- package/mobile/bundle/components/CarouselCard/constants.d.ts +0 -2
- package/mobile/bundle/components/CarouselCard/titleSize.d.ts +0 -1
- package/mobile/bundle/components/Depository/Depository.d.ts +0 -11
- package/mobile/bundle/components/Depository/DepositoryContent.d.ts +0 -5
- package/mobile/bundle/components/Depository/DepositoryFilter.d.ts +0 -9
- package/mobile/bundle/components/Depository/DepositoryItem.d.ts +0 -2
- package/mobile/bundle/components/Depository/useDepository.d.ts +0 -15
- package/mobile/bundle/ui-kit/Unit/Unit.d.ts +0 -2
- package/mobile/bundle/ui-kit/Unit/UnitProps.d.ts +0 -8
- package/mobile/dist/components/CarouselCard/CarouselCard.d.ts +0 -5
- package/mobile/dist/components/CarouselCard/CarouselCard.js +0 -16
- package/mobile/dist/components/CarouselCard/CarouselCard.js.map +0 -1
- package/mobile/dist/components/CarouselCard/CarouselCardContent.d.ts +0 -11
- package/mobile/dist/components/CarouselCard/CarouselCardContent.js +0 -2
- package/mobile/dist/components/CarouselCard/CarouselCardContent.js.map +0 -1
- package/mobile/dist/components/CarouselCard/constants.d.ts +0 -2
- package/mobile/dist/components/CarouselCard/constants.js +0 -7
- package/mobile/dist/components/CarouselCard/constants.js.map +0 -1
- package/mobile/dist/components/CarouselCard/titleSize.d.ts +0 -1
- package/mobile/dist/components/CarouselCard/titleSize.js +0 -4
- package/mobile/dist/components/CarouselCard/titleSize.js.map +0 -1
- package/mobile/dist/components/Depository/Depository.d.ts +0 -11
- package/mobile/dist/components/Depository/Depository.js +0 -42
- package/mobile/dist/components/Depository/Depository.js.map +0 -1
- package/mobile/dist/components/Depository/DepositoryContent.d.ts +0 -5
- package/mobile/dist/components/Depository/DepositoryContent.js +0 -2
- package/mobile/dist/components/Depository/DepositoryContent.js.map +0 -1
- package/mobile/dist/components/Depository/DepositoryFilter.d.ts +0 -9
- package/mobile/dist/components/Depository/DepositoryFilter.js +0 -9
- package/mobile/dist/components/Depository/DepositoryFilter.js.map +0 -1
- package/mobile/dist/components/Depository/DepositoryItem.d.ts +0 -2
- package/mobile/dist/components/Depository/DepositoryItem.js +0 -15
- package/mobile/dist/components/Depository/DepositoryItem.js.map +0 -1
- package/mobile/dist/components/Depository/useDepository.d.ts +0 -15
- package/mobile/dist/components/Depository/useDepository.js +0 -22
- package/mobile/dist/components/Depository/useDepository.js.map +0 -1
- package/mobile/dist/ui-kit/Unit/Unit.d.ts +0 -2
- package/mobile/dist/ui-kit/Unit/Unit.js +0 -9
- package/mobile/dist/ui-kit/Unit/Unit.js.map +0 -1
- package/mobile/dist/ui-kit/Unit/UnitProps.d.ts +0 -8
- package/mobile/dist/ui-kit/Unit/UnitProps.js +0 -2
- package/mobile/dist/ui-kit/Unit/UnitProps.js.map +0 -1
- package/mobile/lib/components/CarouselCard/CarouselCard.d.ts +0 -5
- package/mobile/lib/components/CarouselCard/CarouselCard.js +0 -14
- package/mobile/lib/components/CarouselCard/CarouselCard.js.map +0 -1
- package/mobile/lib/components/CarouselCard/CarouselCardContent.d.ts +0 -11
- package/mobile/lib/components/CarouselCard/CarouselCardContent.js +0 -2
- package/mobile/lib/components/CarouselCard/CarouselCardContent.js.map +0 -1
- package/mobile/lib/components/CarouselCard/constants.d.ts +0 -2
- package/mobile/lib/components/CarouselCard/constants.js +0 -5
- package/mobile/lib/components/CarouselCard/constants.js.map +0 -1
- package/mobile/lib/components/CarouselCard/titleSize.d.ts +0 -1
- package/mobile/lib/components/CarouselCard/titleSize.js +0 -2
- package/mobile/lib/components/CarouselCard/titleSize.js.map +0 -1
- package/mobile/lib/components/Depository/Depository.d.ts +0 -11
- package/mobile/lib/components/Depository/Depository.js +0 -40
- package/mobile/lib/components/Depository/Depository.js.map +0 -1
- package/mobile/lib/components/Depository/DepositoryContent.d.ts +0 -5
- package/mobile/lib/components/Depository/DepositoryContent.js +0 -2
- package/mobile/lib/components/Depository/DepositoryContent.js.map +0 -1
- package/mobile/lib/components/Depository/DepositoryFilter.d.ts +0 -9
- package/mobile/lib/components/Depository/DepositoryFilter.js +0 -7
- package/mobile/lib/components/Depository/DepositoryFilter.js.map +0 -1
- package/mobile/lib/components/Depository/DepositoryItem.d.ts +0 -2
- package/mobile/lib/components/Depository/DepositoryItem.js +0 -13
- package/mobile/lib/components/Depository/DepositoryItem.js.map +0 -1
- package/mobile/lib/components/Depository/useDepository.d.ts +0 -15
- package/mobile/lib/components/Depository/useDepository.js +0 -19
- package/mobile/lib/components/Depository/useDepository.js.map +0 -1
- package/mobile/lib/ui-kit/Unit/Unit.d.ts +0 -2
- package/mobile/lib/ui-kit/Unit/Unit.js +0 -7
- package/mobile/lib/ui-kit/Unit/Unit.js.map +0 -1
- package/mobile/lib/ui-kit/Unit/UnitProps.d.ts +0 -8
- package/mobile/lib/ui-kit/Unit/UnitProps.js +0 -2
- package/mobile/lib/ui-kit/Unit/UnitProps.js.map +0 -1
- package/mobile/src/components/CarouselCard/CarouselCard.example.json +0 -14
- package/mobile/src/components/CarouselCard/CarouselCard.tsx +0 -47
- package/mobile/src/components/CarouselCard/CarouselCard.ui.json +0 -1
- package/mobile/src/components/CarouselCard/CarouselCardContent.ts +0 -13
- package/mobile/src/components/CarouselCard/constants.ts +0 -6
- package/mobile/src/components/CarouselCard/titleSize.tsx +0 -1
- package/mobile/src/components/Depository/Depository.example.json +0 -6
- package/mobile/src/components/Depository/Depository.tsx +0 -84
- package/mobile/src/components/Depository/Depository.ui.json +0 -1
- package/mobile/src/components/Depository/DepositoryContent.ts +0 -6
- package/mobile/src/components/Depository/DepositoryFilter.tsx +0 -41
- package/mobile/src/components/Depository/DepositoryItem.tsx +0 -31
- package/mobile/src/components/Depository/useDepository.ts +0 -46
- package/mobile/src/ui-kit/Unit/Unit.tsx +0 -26
- package/mobile/src/ui-kit/Unit/UnitProps.ts +0 -8
- package/src/components/CarouselCard/CarouselCard.example.json +0 -14
- package/src/components/CarouselCard/CarouselCard.fixture.mobile.tsx +0 -28
- package/src/components/CarouselCard/CarouselCard.fixture.tsx +0 -53
- package/src/components/CarouselCard/CarouselCard.tsx +0 -47
- package/src/components/CarouselCard/CarouselCard.ui.json +0 -1
- package/src/components/CarouselCard/CarouselCardContent.ts +0 -13
- package/src/components/CarouselCard/constants.ts +0 -6
- package/src/components/CarouselCard/titleSize.mobile.tsx +0 -1
- package/src/components/CarouselCard/titleSize.tsx +0 -1
- package/src/components/Depository/Depository.example.json +0 -6
- package/src/components/Depository/Depository.fixture.mobile.tsx +0 -12
- package/src/components/Depository/Depository.fixture.tsx +0 -12
- package/src/components/Depository/Depository.tsx +0 -84
- package/src/components/Depository/Depository.ui.json +0 -1
- package/src/components/Depository/DepositoryContent.ts +0 -6
- package/src/components/Depository/DepositoryFilter.tsx +0 -41
- package/src/components/Depository/DepositoryItem.tsx +0 -31
- package/src/components/Depository/useDepository.ts +0 -46
- package/src/ui-kit/Unit/Unit.tsx +0 -26
- package/src/ui-kit/Unit/UnitProps.ts +0 -8
|
@@ -5092,7 +5092,7 @@
|
|
|
5092
5092
|
.then((res) => res.text())
|
|
5093
5093
|
.then((text) => text === 'OK');
|
|
5094
5094
|
|
|
5095
|
-
const ICON_SIZE
|
|
5095
|
+
const ICON_SIZE = { width: '103', height: '21' };
|
|
5096
5096
|
|
|
5097
5097
|
const logoTitleSizeStyle = 'text-s';
|
|
5098
5098
|
|
|
@@ -5118,7 +5118,7 @@
|
|
|
5118
5118
|
'bg-white': 'text-primary-text',
|
|
5119
5119
|
transparent: 'text-white',
|
|
5120
5120
|
};
|
|
5121
|
-
const Logo = JSX(({ className, href = '/', logo, children, targetBlank, bgColor = 'bg-white', showTitle = true, data, }) => (jsxs("a", { className: style('inline-flex items-center font-sans no-underline', className), href: logo?.href ?? href, target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title ?? 'Россельхозбанк', ...getAspectsAttributes(data), children: [renderImage(bgColor, logo?.image, ICON_SIZE
|
|
5121
|
+
const Logo = JSX(({ className, href = '/', logo, children, targetBlank, bgColor = 'bg-white', showTitle = true, data, }) => (jsxs("a", { className: style('inline-flex items-center font-sans no-underline', className), href: logo?.href ?? href, target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title ?? 'Россельхозбанк', ...getAspectsAttributes(data), children: [renderImage(bgColor, logo?.image, ICON_SIZE), showTitle
|
|
5122
5122
|
? children ?? (jsx("div", { className: "ml-s", children: jsx(Text, { font: "font-medium", color: TEXT_COLOR[bgColor], size: logoTitleSizeStyle, children: logo?.title ?? 'Россельхозбанк' }) }))
|
|
5123
5123
|
: null] })));
|
|
5124
5124
|
|
|
@@ -6590,9 +6590,9 @@
|
|
|
6590
6590
|
};
|
|
6591
6591
|
|
|
6592
6592
|
const EMPTY_SCHEMA = {};
|
|
6593
|
-
const initialFiltrationState$
|
|
6593
|
+
const initialFiltrationState$1 = {};
|
|
6594
6594
|
const BankAccountFiltration = UniBlock(({ className, filtrationSchema = EMPTY_SCHEMA, consumerField = {}, resetButton, ...rest }) => {
|
|
6595
|
-
const [, { blocksToRender }, { field, reset }] = useFiltrationForm(initialFiltrationState$
|
|
6595
|
+
const [, { blocksToRender }, { field, reset }] = useFiltrationForm(initialFiltrationState$1, {
|
|
6596
6596
|
block: rest.block,
|
|
6597
6597
|
page: rest.options?.page,
|
|
6598
6598
|
});
|
|
@@ -7438,15 +7438,6 @@
|
|
|
7438
7438
|
};
|
|
7439
7439
|
}) ?? [];
|
|
7440
7440
|
|
|
7441
|
-
const titleSize = 'XS';
|
|
7442
|
-
|
|
7443
|
-
const layerBaseStyle = 'z-10 border border-solid w-full h-full';
|
|
7444
|
-
const layerStyle = style(layerBaseStyle, 'absolute hidden @xl:block border-transparent');
|
|
7445
|
-
const CarouselCard = JSX(({ className, title, description, button, ...rest }) => (jsx(BlockWrapper, { className: style('sm:pl-6xl sm:pb-4xl @container-normal', className), defaultPadding: "p-0", ...rest, children: jsxs("div", { className: "relative h-full", children: [jsx("div", { className: style(layerStyle, 'top-9 right-12 bg-green-dark') }), jsx("div", { className: style(layerStyle, 'top-6 right-8 bg-green') }), jsx("div", { className: style(layerStyle, 'top-3 right-4 bg-green-light') }), jsxs("div", { className: style(layerBaseStyle, 'relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light'), children: [jsx(Headline, { title: title, description: description, headlineVersion: titleSize, align: "text-left", isEmbedded: true }), renderButtonsSection([button], {
|
|
7446
|
-
className: 'mt-m sm:mt-6xl sm:justify-center',
|
|
7447
|
-
isVertical: true,
|
|
7448
|
-
})] })] }) })));
|
|
7449
|
-
|
|
7450
7441
|
const cardStyleMap = {
|
|
7451
7442
|
black: 'bg-black',
|
|
7452
7443
|
white: 'bg-white',
|
|
@@ -8960,7 +8951,7 @@
|
|
|
8960
8951
|
|
|
8961
8952
|
const DEFAULT_MIN_SUM = 500;
|
|
8962
8953
|
const DEFAULT_MAX_SUM = 1000000000;
|
|
8963
|
-
const initialFiltrationState
|
|
8954
|
+
const initialFiltrationState = {
|
|
8964
8955
|
sum: {
|
|
8965
8956
|
min: 10000,
|
|
8966
8957
|
max: DEFAULT_MAX_SUM,
|
|
@@ -8968,7 +8959,7 @@
|
|
|
8968
8959
|
period: 3,
|
|
8969
8960
|
};
|
|
8970
8961
|
const DepositFiltration = UniBlock(({ className, filtrationSchema = {}, resetButton, sumInput, periodInput, ...rest }) => {
|
|
8971
|
-
const [, { blocksToRender, blocksWithProps }, { field, reset }] = useFiltrationForm(initialFiltrationState
|
|
8962
|
+
const [, { blocksToRender, blocksWithProps }, { field, reset }] = useFiltrationForm(initialFiltrationState, {
|
|
8972
8963
|
block: rest.block,
|
|
8973
8964
|
page: rest.options?.page,
|
|
8974
8965
|
normalize: (content) => ({ ...content, period: getPeriod(content) }),
|
|
@@ -8997,115 +8988,6 @@
|
|
|
8997
8988
|
.filter(isRateRow)
|
|
8998
8989
|
.flatMap((_) => numberRange(_.minMonths, _.maxMonths))).sort((a, b) => a - b) || [];
|
|
8999
8990
|
|
|
9000
|
-
const DEFAULT_OPTIONS = [{ key: '10' }, { key: '50' }, { key: '100' }];
|
|
9001
|
-
const PageSizeSelector = ({ itemCount, onItemCountChange }) => {
|
|
9002
|
-
const handleItemCountChange = useCallback(({ key }) => onItemCountChange(Number(key)), []);
|
|
9003
|
-
return (jsxs("div", { className: "mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex", children: [jsx("span", { children: "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u043E" }), jsx(Select, { className: "min-w-20", onChange: handleItemCountChange, value: { key: String(itemCount) }, options: DEFAULT_OPTIONS, iconVersion: "black" })] }));
|
|
9004
|
-
};
|
|
9005
|
-
|
|
9006
|
-
const paginationBlockStyle = 'py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white';
|
|
9007
|
-
|
|
9008
|
-
const checkPageRange = (page, currentPage, totalPages) => (currentPage <= 2 && page <= currentPage + 2) ||
|
|
9009
|
-
(currentPage >= totalPages - 1 && page >= totalPages - 3);
|
|
9010
|
-
const shouldRenderPage = (page, currentPage, totalPages) => (page < currentPage && page >= currentPage - 1) ||
|
|
9011
|
-
(page <= currentPage + 1 && page > currentPage) ||
|
|
9012
|
-
checkPageRange(page, currentPage, totalPages);
|
|
9013
|
-
|
|
9014
|
-
const renderPages = (pagesParams, index) => {
|
|
9015
|
-
const { currentPage, onPageChange, totalPages } = pagesParams;
|
|
9016
|
-
const page = index + 1;
|
|
9017
|
-
if (page === currentPage) {
|
|
9018
|
-
return (jsx("div", { "aria-current": "true", className: "py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md", children: page }, String(index)));
|
|
9019
|
-
}
|
|
9020
|
-
if (page !== 1 && page !== totalPages && shouldRenderPage(page, currentPage, totalPages)) {
|
|
9021
|
-
return (jsx("div", { onClick: () => onPageChange(page), className: paginationBlockStyle, "aria-label": `Страница ${page}`, children: page }, String(index)));
|
|
9022
|
-
}
|
|
9023
|
-
return null;
|
|
9024
|
-
};
|
|
9025
|
-
|
|
9026
|
-
const ICON_SIZE = { width: '24', height: '24' };
|
|
9027
|
-
const PaginationContainer = ({ currentPage, onPageChange, totalPages, }) => {
|
|
9028
|
-
const pages = useMemo(() => Array.from({ length: totalPages }).fill({
|
|
9029
|
-
currentPage,
|
|
9030
|
-
onPageChange,
|
|
9031
|
-
totalPages,
|
|
9032
|
-
}), [totalPages, currentPage]);
|
|
9033
|
-
const handlePrevPage = useCallback(() => {
|
|
9034
|
-
if (currentPage > 1) {
|
|
9035
|
-
onPageChange(currentPage - 1);
|
|
9036
|
-
}
|
|
9037
|
-
}, [currentPage]);
|
|
9038
|
-
const handleNextPage = useCallback(() => {
|
|
9039
|
-
if (currentPage < totalPages) {
|
|
9040
|
-
onPageChange(currentPage + 1);
|
|
9041
|
-
}
|
|
9042
|
-
}, [currentPage, totalPages]);
|
|
9043
|
-
const handleFirstPage = useCallback(() => onPageChange(1), []);
|
|
9044
|
-
const handleLastPage = useCallback(() => onPageChange(totalPages), [totalPages]);
|
|
9045
|
-
return (jsxs("div", { className: "flex gap-m items-center", children: [jsx("div", { onClick: handlePrevPage, children: jsx(Icon, { name: "ArrowLeftIcon", iconVersion: "black", imageClassName: getIconStyle(currentPage === 1), ...ICON_SIZE }) }), jsxs("div", { className: "flex @lg:gap-2xs", children: [currentPage > 1 ? (jsx("div", { onClick: handleFirstPage, className: paginationBlockStyle, "aria-label": "\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 1", children: "1" })) : null, currentPage > 3 ? jsx("div", { className: "py-m @lg:px-s", children: "..." }) : null, pages.map(renderPages), currentPage < totalPages - 2 ? jsx("div", { className: "py-m @lg:px-s", children: "..." }) : null, currentPage < totalPages ? (jsx("div", { onClick: handleLastPage, className: paginationBlockStyle, "aria-label": `Страница ${totalPages}`, children: totalPages })) : null] }), jsx("div", { onClick: handleNextPage, children: jsx(Icon, { className: "rotate-180", name: "ArrowLeftIcon", iconVersion: "black", imageClassName: getIconStyle(currentPage === totalPages), ...ICON_SIZE }) })] }));
|
|
9046
|
-
};
|
|
9047
|
-
const getIconStyle = (condition) => condition ? 'opacity-20' : 'cursor-pointer hover:opacity-60';
|
|
9048
|
-
|
|
9049
|
-
const Pagination = ({ currentPage, onPageChange, totalPages, itemCount, onItemCountChange, }) => (jsxs("div", { className: "mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none", role: "navigation", "aria-label": "\u041F\u0430\u0433\u0438\u043D\u0430\u0446\u0438\u044F", children: [jsx(PaginationContainer, { currentPage: currentPage, onPageChange: onPageChange, totalPages: totalPages }), itemCount && onItemCountChange ? (jsx(PageSizeSelector, { itemCount: itemCount, onItemCountChange: onItemCountChange })) : null] }));
|
|
9050
|
-
|
|
9051
|
-
const SearchInput = JSX(({ className, value, autoFocus, onChange, onFocus, placeholder = 'Поиск по сайту' }) => {
|
|
9052
|
-
const handleChange = useCallback((ev) => {
|
|
9053
|
-
onChange && onChange(ev.target?.value || '');
|
|
9054
|
-
}, [onChange]);
|
|
9055
|
-
return (jsxs("div", { className: style('relative', className), role: "form", children: [jsx("div", { className: "absolute h-full flex items-center pl-m pointer-events-none", children: jsx(Img, { image: { icon: 'LoupeIcon', iconVersion: 'black' }, width: "24", height: "24" }) }), jsx("input", { className: style('h-14 w-full px-10 text-l text-black box-border rounded-md', inputValidStyle), value: value, type: "text", name: "search-bar-input", placeholder: placeholder, autoFocus: autoFocus, onChange: handleChange, onFocus: onFocus })] }));
|
|
9056
|
-
});
|
|
9057
|
-
|
|
9058
|
-
const DepositoryFilter = JSX(({ field, onClearFilter, filtrationState }) => (jsxs("div", { className: "grid grid-cols-12 mb-3xl @lg:space-x-xl", children: [jsx(SearchInput, { className: "col-span-12 @lg:col-span-4 mt-auto", placeholder: "\u041F\u043E\u0438\u0441\u043A", ...field('query') }), jsx(DatePicker, { className: "col-span-12 @lg:col-span-3 mt-4 @lg:mt-0", label: "\u041F\u0435\u0440\u0438\u043E\u0434 \u043E\u0442", maxDate: filtrationState.endDate, ...field('startDate') }), jsx(DatePicker, { className: "col-span-12 @lg:col-span-3 mt-4 @lg:mt-0", label: "\u041F\u0435\u0440\u0438\u043E\u0434 \u0434\u043E", minDate: filtrationState.startDate, ...field('endDate') }), jsx("div", { className: "col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto", children: jsx(Button, { type: "reset", className: "w-full", version: "secondary", onClick: onClearFilter, children: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C" }) })] })));
|
|
9059
|
-
|
|
9060
|
-
const DepositoryItem = JSX(({ title, timestamp, publicId }) => {
|
|
9061
|
-
const link = useLink();
|
|
9062
|
-
const { href } = link({ href: `${API_BASE_URI$1}/depository/${publicId}/file` });
|
|
9063
|
-
return (jsxs("div", { className: "flex gap-3 items-center py-lg border-gray border-opacity-50 border-b", children: [jsx(RoundedIcon, { className: "shrink-0", icon: "DocDownloadIcon", iconVersion: "black" }), jsxs("div", { className: "flex flex-col gap-x-6xl lg:flex-row lg:items-center", children: [timestamp ? (jsx(Text, { size: "text-m", "font-weight": "font-light", children: formatDate(timestamp) })) : null, jsx("a", { className: "text-h6 hover:text-primary-active", href: href, download: true, "aria-label": "\u0421\u043A\u0430\u0447\u0430\u0442\u044C", children: title })] })] }, publicId));
|
|
9064
|
-
});
|
|
9065
|
-
|
|
9066
|
-
const DEPOSITARY_URL = `${API_BASE_URI$1}/depository`;
|
|
9067
|
-
const useDepository = ({ size, page, query, startDate, endDate }) => {
|
|
9068
|
-
const formatStartDate = startDate ? formatDate(startDate, true) : '';
|
|
9069
|
-
const formatEndDate = endDate ? formatDate(endDate, true) : '';
|
|
9070
|
-
const searchParams = new URLSearchParams(DEPOSITARY_URL);
|
|
9071
|
-
searchParams.set('page', String(page));
|
|
9072
|
-
searchParams.set('size', String(size));
|
|
9073
|
-
searchParams.set('query', query);
|
|
9074
|
-
searchParams.set('timestampStart', formatStartDate);
|
|
9075
|
-
searchParams.set('timestampEnd', formatEndDate);
|
|
9076
|
-
const queryString = `?${searchParams.toString()}`;
|
|
9077
|
-
const { data } = useAsyncData(DEPOSITARY_URL + queryString, fetchJSONUnsafe);
|
|
9078
|
-
return { items: data?.content, totalPages: data?.totalPages };
|
|
9079
|
-
};
|
|
9080
|
-
|
|
9081
|
-
const DEFAULT_ITEMS_COUNT = 10;
|
|
9082
|
-
const initialFiltrationState = {
|
|
9083
|
-
startDate: undefined,
|
|
9084
|
-
endDate: undefined,
|
|
9085
|
-
query: '',
|
|
9086
|
-
};
|
|
9087
|
-
const Depository = UniBlock(({ className, ...rest }) => {
|
|
9088
|
-
const [currentPage, setCurrentPage] = useState(0);
|
|
9089
|
-
const [itemCount, setItemCount] = useState(DEFAULT_ITEMS_COUNT);
|
|
9090
|
-
const [filtrationState, { field, reset }] = useForm(initialFiltrationState);
|
|
9091
|
-
const { totalPages = 0, items = [] } = useDepository({
|
|
9092
|
-
size: itemCount,
|
|
9093
|
-
page: currentPage,
|
|
9094
|
-
...filtrationState,
|
|
9095
|
-
});
|
|
9096
|
-
const handleChangePage = useCallback((page) => setCurrentPage(page - 1), []);
|
|
9097
|
-
const handleItemCountChange = useCallback((count) => {
|
|
9098
|
-
if (itemCount !== count) {
|
|
9099
|
-
setItemCount(count);
|
|
9100
|
-
setCurrentPage(0);
|
|
9101
|
-
}
|
|
9102
|
-
else {
|
|
9103
|
-
setItemCount(count);
|
|
9104
|
-
}
|
|
9105
|
-
}, []);
|
|
9106
|
-
return (jsxs(BlockWrapper, { className: style(className, 'container p-6xl'), ...rest, children: [jsx(DepositoryFilter, { filtrationState: filtrationState, field: field, onClearFilter: reset }), jsxs("div", { className: "flex flex-col", children: [jsxs("div", { className: "grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b", children: [jsx("div", { className: "col-span-4 @lg:col-span-2 hidden @lg:block", children: jsx(Text, { size: "text-m", color: "text-secondary-text", children: "\u0414\u0430\u0442\u0430" }) }), jsx("span", { className: "col-span-8 @lg:col-span-10 hidden @lg:block", children: jsx(Text, { size: "text-m", color: "text-secondary-text", children: "\u0422\u0435\u043C\u0430" }) })] }), items.length ? (items.map((params) => jsx(DepositoryItem, { ...params }, String(params.publicId)))) : (jsx(NotFound, { title: "\u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E", description: "\u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440\u044B" })), jsx(Pagination, { currentPage: currentPage + 1, onPageChange: handleChangePage, totalPages: totalPages, itemCount: itemCount, onItemCountChange: handleItemCountChange })] })] }));
|
|
9107
|
-
});
|
|
9108
|
-
|
|
9109
8991
|
const renderErrorContent = (error) => {
|
|
9110
8992
|
if (error?.contentType === 'Image' && error?.image) {
|
|
9111
8993
|
return jsx(Img, { image: error.image });
|
|
@@ -10417,12 +10299,10 @@
|
|
|
10417
10299
|
CalculatorRefinancing,
|
|
10418
10300
|
CardTransfer,
|
|
10419
10301
|
Carousel,
|
|
10420
|
-
CarouselCard,
|
|
10421
10302
|
CarouselCatalogCard,
|
|
10422
10303
|
CarouselRecommendationCard,
|
|
10423
10304
|
CarouselTariffsCard,
|
|
10424
10305
|
DepositFiltration,
|
|
10425
|
-
Depository,
|
|
10426
10306
|
ErrorBlock,
|
|
10427
10307
|
Footer,
|
|
10428
10308
|
GalleryLayout,
|
|
@@ -10567,7 +10447,7 @@
|
|
|
10567
10447
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10568
10448
|
});
|
|
10569
10449
|
|
|
10570
|
-
const packageVersion = "0.14.
|
|
10450
|
+
const packageVersion = "0.14.842";
|
|
10571
10451
|
|
|
10572
10452
|
exports.Blocks = Blocks;
|
|
10573
10453
|
exports.ContentPage = ContentPage;
|