@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
package/bundle/bundle.umd.js
CHANGED
|
@@ -5084,7 +5084,7 @@
|
|
|
5084
5084
|
.then((res) => res.text())
|
|
5085
5085
|
.then((text) => text === 'OK');
|
|
5086
5086
|
|
|
5087
|
-
const ICON_SIZE
|
|
5087
|
+
const ICON_SIZE = { width: '118', height: '24' };
|
|
5088
5088
|
|
|
5089
5089
|
const logoTitleSizeStyle = '';
|
|
5090
5090
|
|
|
@@ -5110,7 +5110,7 @@
|
|
|
5110
5110
|
'bg-white': 'text-primary-text',
|
|
5111
5111
|
transparent: 'text-white',
|
|
5112
5112
|
};
|
|
5113
|
-
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
|
|
5113
|
+
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
|
|
5114
5114
|
? children ?? (jsx("div", { className: "ml-s", children: jsx(Text, { font: "font-medium", color: TEXT_COLOR[bgColor], size: logoTitleSizeStyle, children: logo?.title ?? 'Россельхозбанк' }) }))
|
|
5115
5115
|
: null] })));
|
|
5116
5116
|
|
|
@@ -6582,9 +6582,9 @@
|
|
|
6582
6582
|
};
|
|
6583
6583
|
|
|
6584
6584
|
const EMPTY_SCHEMA = {};
|
|
6585
|
-
const initialFiltrationState$
|
|
6585
|
+
const initialFiltrationState$1 = {};
|
|
6586
6586
|
const BankAccountFiltration = UniBlock(({ className, filtrationSchema = EMPTY_SCHEMA, consumerField = {}, resetButton, ...rest }) => {
|
|
6587
|
-
const [, { blocksToRender }, { field, reset }] = useFiltrationForm(initialFiltrationState$
|
|
6587
|
+
const [, { blocksToRender }, { field, reset }] = useFiltrationForm(initialFiltrationState$1, {
|
|
6588
6588
|
block: rest.block,
|
|
6589
6589
|
page: rest.options?.page,
|
|
6590
6590
|
});
|
|
@@ -7442,15 +7442,6 @@
|
|
|
7442
7442
|
};
|
|
7443
7443
|
}) ?? [];
|
|
7444
7444
|
|
|
7445
|
-
const titleSize = 'XS';
|
|
7446
|
-
|
|
7447
|
-
const layerBaseStyle = 'z-10 border border-solid w-full h-full';
|
|
7448
|
-
const layerStyle = style(layerBaseStyle, 'absolute hidden @xl:block border-transparent');
|
|
7449
|
-
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], {
|
|
7450
|
-
className: 'mt-m sm:mt-6xl sm:justify-center',
|
|
7451
|
-
isVertical: true,
|
|
7452
|
-
})] })] }) })));
|
|
7453
|
-
|
|
7454
7445
|
const cardStyleMap = {
|
|
7455
7446
|
black: 'bg-black',
|
|
7456
7447
|
white: 'bg-white',
|
|
@@ -9357,7 +9348,7 @@
|
|
|
9357
9348
|
|
|
9358
9349
|
const DEFAULT_MIN_SUM = 500;
|
|
9359
9350
|
const DEFAULT_MAX_SUM = 1000000000;
|
|
9360
|
-
const initialFiltrationState
|
|
9351
|
+
const initialFiltrationState = {
|
|
9361
9352
|
sum: {
|
|
9362
9353
|
min: 10000,
|
|
9363
9354
|
max: DEFAULT_MAX_SUM,
|
|
@@ -9365,7 +9356,7 @@
|
|
|
9365
9356
|
period: 3,
|
|
9366
9357
|
};
|
|
9367
9358
|
const DepositFiltration = UniBlock(({ className, filtrationSchema = {}, resetButton, sumInput, periodInput, ...rest }) => {
|
|
9368
|
-
const [, { blocksToRender, blocksWithProps }, { field, reset }] = useFiltrationForm(initialFiltrationState
|
|
9359
|
+
const [, { blocksToRender, blocksWithProps }, { field, reset }] = useFiltrationForm(initialFiltrationState, {
|
|
9369
9360
|
block: rest.block,
|
|
9370
9361
|
page: rest.options?.page,
|
|
9371
9362
|
normalize: (content) => ({ ...content, period: getPeriod(content) }),
|
|
@@ -9394,115 +9385,6 @@
|
|
|
9394
9385
|
.filter(isRateRow)
|
|
9395
9386
|
.flatMap((_) => numberRange(_.minMonths, _.maxMonths))).sort((a, b) => a - b) || [];
|
|
9396
9387
|
|
|
9397
|
-
const DEFAULT_OPTIONS = [{ key: '10' }, { key: '50' }, { key: '100' }];
|
|
9398
|
-
const PageSizeSelector = ({ itemCount, onItemCountChange }) => {
|
|
9399
|
-
const handleItemCountChange = useCallback(({ key }) => onItemCountChange(Number(key)), []);
|
|
9400
|
-
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" })] }));
|
|
9401
|
-
};
|
|
9402
|
-
|
|
9403
|
-
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';
|
|
9404
|
-
|
|
9405
|
-
const checkPageRange = (page, currentPage, totalPages) => (currentPage <= 2 && page <= currentPage + 2) ||
|
|
9406
|
-
(currentPage >= totalPages - 1 && page >= totalPages - 3);
|
|
9407
|
-
const shouldRenderPage = (page, currentPage, totalPages) => (page < currentPage && page >= currentPage - 1) ||
|
|
9408
|
-
(page <= currentPage + 1 && page > currentPage) ||
|
|
9409
|
-
checkPageRange(page, currentPage, totalPages);
|
|
9410
|
-
|
|
9411
|
-
const renderPages = (pagesParams, index) => {
|
|
9412
|
-
const { currentPage, onPageChange, totalPages } = pagesParams;
|
|
9413
|
-
const page = index + 1;
|
|
9414
|
-
if (page === currentPage) {
|
|
9415
|
-
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)));
|
|
9416
|
-
}
|
|
9417
|
-
if (page !== 1 && page !== totalPages && shouldRenderPage(page, currentPage, totalPages)) {
|
|
9418
|
-
return (jsx("div", { onClick: () => onPageChange(page), className: paginationBlockStyle, "aria-label": `Страница ${page}`, children: page }, String(index)));
|
|
9419
|
-
}
|
|
9420
|
-
return null;
|
|
9421
|
-
};
|
|
9422
|
-
|
|
9423
|
-
const ICON_SIZE = { width: '24', height: '24' };
|
|
9424
|
-
const PaginationContainer = ({ currentPage, onPageChange, totalPages, }) => {
|
|
9425
|
-
const pages = useMemo(() => Array.from({ length: totalPages }).fill({
|
|
9426
|
-
currentPage,
|
|
9427
|
-
onPageChange,
|
|
9428
|
-
totalPages,
|
|
9429
|
-
}), [totalPages, currentPage]);
|
|
9430
|
-
const handlePrevPage = useCallback(() => {
|
|
9431
|
-
if (currentPage > 1) {
|
|
9432
|
-
onPageChange(currentPage - 1);
|
|
9433
|
-
}
|
|
9434
|
-
}, [currentPage]);
|
|
9435
|
-
const handleNextPage = useCallback(() => {
|
|
9436
|
-
if (currentPage < totalPages) {
|
|
9437
|
-
onPageChange(currentPage + 1);
|
|
9438
|
-
}
|
|
9439
|
-
}, [currentPage, totalPages]);
|
|
9440
|
-
const handleFirstPage = useCallback(() => onPageChange(1), []);
|
|
9441
|
-
const handleLastPage = useCallback(() => onPageChange(totalPages), [totalPages]);
|
|
9442
|
-
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 }) })] }));
|
|
9443
|
-
};
|
|
9444
|
-
const getIconStyle = (condition) => condition ? 'opacity-20' : 'cursor-pointer hover:opacity-60';
|
|
9445
|
-
|
|
9446
|
-
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] }));
|
|
9447
|
-
|
|
9448
|
-
const SearchInput = JSX(({ className, value, autoFocus, onChange, onFocus, placeholder = 'Поиск по сайту' }) => {
|
|
9449
|
-
const handleChange = useCallback((ev) => {
|
|
9450
|
-
onChange && onChange(ev.target?.value || '');
|
|
9451
|
-
}, [onChange]);
|
|
9452
|
-
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 })] }));
|
|
9453
|
-
});
|
|
9454
|
-
|
|
9455
|
-
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" }) })] })));
|
|
9456
|
-
|
|
9457
|
-
const DepositoryItem = JSX(({ title, timestamp, publicId }) => {
|
|
9458
|
-
const link = useLink();
|
|
9459
|
-
const { href } = link({ href: `${API_BASE_URI$1}/depository/${publicId}/file` });
|
|
9460
|
-
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));
|
|
9461
|
-
});
|
|
9462
|
-
|
|
9463
|
-
const DEPOSITARY_URL = `${API_BASE_URI$1}/depository`;
|
|
9464
|
-
const useDepository = ({ size, page, query, startDate, endDate }) => {
|
|
9465
|
-
const formatStartDate = startDate ? formatDate(startDate, true) : '';
|
|
9466
|
-
const formatEndDate = endDate ? formatDate(endDate, true) : '';
|
|
9467
|
-
const searchParams = new URLSearchParams(DEPOSITARY_URL);
|
|
9468
|
-
searchParams.set('page', String(page));
|
|
9469
|
-
searchParams.set('size', String(size));
|
|
9470
|
-
searchParams.set('query', query);
|
|
9471
|
-
searchParams.set('timestampStart', formatStartDate);
|
|
9472
|
-
searchParams.set('timestampEnd', formatEndDate);
|
|
9473
|
-
const queryString = `?${searchParams.toString()}`;
|
|
9474
|
-
const { data } = useAsyncData(DEPOSITARY_URL + queryString, fetchJSONUnsafe);
|
|
9475
|
-
return { items: data?.content, totalPages: data?.totalPages };
|
|
9476
|
-
};
|
|
9477
|
-
|
|
9478
|
-
const DEFAULT_ITEMS_COUNT = 10;
|
|
9479
|
-
const initialFiltrationState = {
|
|
9480
|
-
startDate: undefined,
|
|
9481
|
-
endDate: undefined,
|
|
9482
|
-
query: '',
|
|
9483
|
-
};
|
|
9484
|
-
const Depository = UniBlock(({ className, ...rest }) => {
|
|
9485
|
-
const [currentPage, setCurrentPage] = useState(0);
|
|
9486
|
-
const [itemCount, setItemCount] = useState(DEFAULT_ITEMS_COUNT);
|
|
9487
|
-
const [filtrationState, { field, reset }] = useForm(initialFiltrationState);
|
|
9488
|
-
const { totalPages = 0, items = [] } = useDepository({
|
|
9489
|
-
size: itemCount,
|
|
9490
|
-
page: currentPage,
|
|
9491
|
-
...filtrationState,
|
|
9492
|
-
});
|
|
9493
|
-
const handleChangePage = useCallback((page) => setCurrentPage(page - 1), []);
|
|
9494
|
-
const handleItemCountChange = useCallback((count) => {
|
|
9495
|
-
if (itemCount !== count) {
|
|
9496
|
-
setItemCount(count);
|
|
9497
|
-
setCurrentPage(0);
|
|
9498
|
-
}
|
|
9499
|
-
else {
|
|
9500
|
-
setItemCount(count);
|
|
9501
|
-
}
|
|
9502
|
-
}, []);
|
|
9503
|
-
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 })] })] }));
|
|
9504
|
-
});
|
|
9505
|
-
|
|
9506
9388
|
const renderErrorContent = (error) => {
|
|
9507
9389
|
if (error?.contentType === 'Image' && error?.image) {
|
|
9508
9390
|
return jsx(Img, { image: error.image });
|
|
@@ -9728,6 +9610,13 @@
|
|
|
9728
9610
|
};
|
|
9729
9611
|
};
|
|
9730
9612
|
|
|
9613
|
+
const SearchInput = JSX(({ className, value, autoFocus, onChange, onFocus, placeholder = 'Поиск по сайту' }) => {
|
|
9614
|
+
const handleChange = useCallback((ev) => {
|
|
9615
|
+
onChange && onChange(ev.target?.value || '');
|
|
9616
|
+
}, [onChange]);
|
|
9617
|
+
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 })] }));
|
|
9618
|
+
});
|
|
9619
|
+
|
|
9731
9620
|
const SearchDialog = JSX(({ initialQuery, navigationItems, onClose }) => {
|
|
9732
9621
|
const basePathList = useMemo(() => navigationItems?.map((_) => _.href || '/'), [navigationItems]);
|
|
9733
9622
|
const [searchResult, searchInputProps] = useSearch({
|
|
@@ -10975,13 +10864,11 @@
|
|
|
10975
10864
|
CalculatorRefinancing,
|
|
10976
10865
|
CardTransfer,
|
|
10977
10866
|
Carousel,
|
|
10978
|
-
CarouselCard,
|
|
10979
10867
|
CarouselCatalogCard,
|
|
10980
10868
|
CarouselRecommendationCard,
|
|
10981
10869
|
CarouselTariffsCard,
|
|
10982
10870
|
ContactsBlock,
|
|
10983
10871
|
DepositFiltration,
|
|
10984
|
-
Depository,
|
|
10985
10872
|
ErrorBlock,
|
|
10986
10873
|
Footer,
|
|
10987
10874
|
GalleryLayout,
|
|
@@ -11148,7 +11035,7 @@
|
|
|
11148
11035
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
11149
11036
|
});
|
|
11150
11037
|
|
|
11151
|
-
const packageVersion = "0.14.
|
|
11038
|
+
const packageVersion = "0.14.842";
|
|
11152
11039
|
|
|
11153
11040
|
exports.Blocks = Blocks;
|
|
11154
11041
|
exports.ContentPage = ContentPage;
|