@redneckz/wildless-cms-uni-blocks 0.14.244 → 0.14.246
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 -0
- package/bundle/bundle.umd.js +14 -4
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +6 -0
- package/dist/EventBus/defaultEventBus.d.ts +2 -0
- package/dist/EventBus/defaultEventBus.js.map +1 -1
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +15 -3
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +6 -0
- package/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.js +2 -0
- package/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.js.map +1 -0
- package/dist/components/Footer/Footer.mobile.js +1 -7
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/EventBus/defaultEventBus.d.ts +2 -0
- package/lib/EventBus/defaultEventBus.js.map +1 -1
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +15 -3
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +6 -0
- package/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.js +2 -0
- package/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.js.map +1 -0
- package/lib/components/Footer/Footer.mobile.js +1 -7
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/mobile/bundle/EventBus/defaultEventBus.d.ts +2 -0
- package/mobile/bundle/bundle.umd.js +17 -11
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +6 -0
- package/mobile/dist/EventBus/defaultEventBus.d.ts +2 -0
- package/mobile/dist/EventBus/defaultEventBus.js.map +1 -1
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +15 -3
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +6 -0
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.js +2 -0
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.js.map +1 -0
- package/mobile/dist/components/Footer/Footer.js +1 -7
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/EventBus/defaultEventBus.d.ts +2 -0
- package/mobile/lib/EventBus/defaultEventBus.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +15 -3
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +6 -0
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.js +2 -0
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.js.map +1 -0
- package/mobile/lib/components/Footer/Footer.js +1 -7
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/src/EventBus/defaultEventBus.ts +2 -0
- package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +40 -19
- package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCardAction.ts +6 -0
- package/mobile/src/components/Footer/Footer.tsx +6 -19
- package/package.json +1 -1
- package/src/EventBus/defaultEventBus.ts +2 -0
- package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +40 -19
- package/src/components/CarouselTariffsCard/CarouselTariffsCardAction.ts +6 -0
- package/src/components/Footer/Footer.mobile.tsx +6 -19
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type CarouselTariffsCardAction } from '../components/CarouselTariffsCard/CarouselTariffsCardAction';
|
|
1
2
|
import { type TabActivationEvent } from '../components/Tabs/TabActivationEvent';
|
|
2
3
|
import { type Region } from '../hooks/useRegions';
|
|
3
4
|
import { type DialogAction } from '../ui-kit/DialogManager/DialogAction';
|
|
@@ -8,6 +9,7 @@ interface GlobalEventMap {
|
|
|
8
9
|
dialog: DialogAction;
|
|
9
10
|
popup: PopupAction;
|
|
10
11
|
tab: TabActivationEvent;
|
|
12
|
+
fold: CarouselTariffsCardAction;
|
|
11
13
|
}
|
|
12
14
|
export declare const defaultEventBus: EventBus<GlobalEventMap>;
|
|
13
15
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultEventBus.js","sourceRoot":"","sources":["../../src/EventBus/defaultEventBus.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"defaultEventBus.js","sourceRoot":"","sources":["../../src/EventBus/defaultEventBus.ts"],"names":[],"mappings":";;AAKA,yCAAsC;AAUzB,QAAA,eAAe,GAAG,IAAI,mBAAQ,EAAkB,CAAC"}
|
|
@@ -2,6 +2,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
2
2
|
exports.CarouselTariffsCard = void 0;
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
6
|
+
const defaultEventBus_1 = require("../../EventBus/defaultEventBus");
|
|
5
7
|
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
6
8
|
const Foldable_1 = require("../../ui-kit/Foldable/Foldable");
|
|
7
9
|
const FoldableSection_1 = require("../../ui-kit/Foldable/FoldableSection");
|
|
@@ -12,12 +14,22 @@ const LinkButton_1 = require("../../ui-kit/LinkButton/LinkButton");
|
|
|
12
14
|
const isIcon_1 = require("../../utils/isIcon");
|
|
13
15
|
const style_1 = require("../../utils/style");
|
|
14
16
|
const renderCardInfo_1 = require("./renderCardInfo");
|
|
15
|
-
exports.CarouselTariffsCard = (0, uni_jsx_1.JSX)(({ className = '', title, align = 'text-center', icon, button, visibleCellsCount = 1, cardCells = [], ...rest }) => {
|
|
17
|
+
exports.CarouselTariffsCard = (0, uni_jsx_1.JSX)(({ className = '', title, align = 'text-center', icon, button, visibleCellsCount = 1, cardCells = [], options, ...rest }) => {
|
|
16
18
|
const cellsNode = cardCells.map(renderCardInfo_1.renderCardInfo);
|
|
17
19
|
const [visibleCells, hiddenCells] = visibleCellsCount > 0
|
|
18
20
|
? [cellsNode.slice(0, visibleCellsCount), cellsNode.slice(visibleCellsCount)]
|
|
19
21
|
: [cellsNode, []];
|
|
20
|
-
|
|
22
|
+
const [isVisible, setIsVisible] = (0, hooks_1.useState)(false);
|
|
23
|
+
(0, hooks_1.useEffect)(() => defaultEventBus_1.defaultEventBus.subscribe('fold', (event) => {
|
|
24
|
+
if (options?.parent !== undefined && event.parent === options?.parent) {
|
|
25
|
+
setIsVisible(event.isUnfolded);
|
|
26
|
+
}
|
|
27
|
+
}), []);
|
|
28
|
+
return ((0, jsx_runtime_1.jsxs)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)('flex flex-col', className), defaultPadding: "p-2xl", ...rest, children: [(0, isIcon_1.isIcon)(icon) ? ((0, jsx_runtime_1.jsx)("div", { className: "self-center", children: (0, jsx_runtime_1.jsx)(Img_1.Img, { image: icon }) })) : null, title ? ((0, jsx_runtime_1.jsx)(Heading_1.Heading, { className: (0, style_1.style)('pt-xs', align), headingType: "h5", title: title })) : null, button?.text ? (0, jsx_runtime_1.jsx)(LinkButton_1.LinkButton, { className: "w-full mt-m mb-lg", ...button }) : null, hiddenCells.length ? ((0, jsx_runtime_1.jsx)(Foldable_1.Foldable, { renderFoldableSection: () => ((0, jsx_runtime_1.jsxs)("div", { children: [visibleCells, (0, jsx_runtime_1.jsx)(FoldableSection_1.FoldableSection, { isUnfolded: isVisible, children: hiddenCells })] })), renderFoldButton: cardCells.length > 1 ? renderFoldButton(isVisible, options?.parent) : null })) : ((0, jsx_runtime_1.jsx)("div", { children: visibleCells }))] }));
|
|
21
29
|
});
|
|
22
|
-
const renderFoldButton = (
|
|
30
|
+
const renderFoldButton = (isUnfolded, parent) => () => ((0, jsx_runtime_1.jsxs)("button", { className: "w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center", onClick: () => {
|
|
31
|
+
if (parent !== undefined) {
|
|
32
|
+
defaultEventBus_1.defaultEventBus.fire('fold', { type: 'fold', isUnfolded: !isUnfolded, parent });
|
|
33
|
+
}
|
|
34
|
+
}, type: "button", children: [(0, jsx_runtime_1.jsx)("div", { children: isUnfolded ? 'Скрыть' : 'Подробнее о тарифе' }), (0, jsx_runtime_1.jsx)(Icon_1.Icon, { className: "text-primary-text", name: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16" })] }));
|
|
23
35
|
//# sourceMappingURL=CarouselTariffsCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CarouselTariffsCard.js","sourceRoot":"","sources":["../../../src/components/CarouselTariffsCard/CarouselTariffsCard.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;
|
|
1
|
+
{"version":3,"file":"CarouselTariffsCard.js","sourceRoot":"","sources":["../../../src/components/CarouselTariffsCard/CarouselTariffsCard.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAkE;AAClE,oEAAiE;AAGjE,4DAAyD;AACzD,6DAA0D;AAC1D,2EAAwE;AACxE,0DAAuD;AACvD,iDAA8C;AAC9C,8CAA2C;AAC3C,mEAAgE;AAEhE,+CAA4C;AAC5C,6CAA0C;AAE1C,qDAAkD;AAMrC,QAAA,mBAAmB,GAAG,IAAA,aAAG,EACpC,CAAC,EACC,SAAS,GAAG,EAAE,EACd,KAAK,EACL,KAAK,GAAG,aAAa,EACrB,IAAI,EACJ,MAAM,EACN,iBAAiB,GAAG,CAAC,EACrB,SAAS,GAAG,EAAE,EACd,OAAO,EACP,G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sourceRoot":"","sources":["../../../src/components/CarouselTariffsCard/CarouselTariffsCardAction.ts"],"names":[],"mappings":""}
|
|
@@ -3,7 +3,6 @@ exports.Footer = void 0;
|
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
5
5
|
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
6
|
-
const LinkButton_1 = require("../../ui-kit/LinkButton/LinkButton");
|
|
7
6
|
const Text_1 = require("../../ui-kit/Text/Text");
|
|
8
7
|
const UniBlock_1 = require("../../UniBlock/UniBlock");
|
|
9
8
|
const appendSlash_1 = require("../../utils/appendSlash");
|
|
@@ -11,7 +10,6 @@ const mapCookie_1 = require("../../utils/mapCookie");
|
|
|
11
10
|
const RollupItem_1 = require("../RollupItem/RollupItem");
|
|
12
11
|
const Contacts_1 = require("./Contacts");
|
|
13
12
|
const cookieReplaceData_1 = require("./cookieReplaceData");
|
|
14
|
-
const findIconByHref_1 = require("./findIconByHref");
|
|
15
13
|
const HorizontalNavigation_1 = require("./HorizontalNavigation");
|
|
16
14
|
const HorizontalNavigationLink_1 = require("./HorizontalNavigationLink");
|
|
17
15
|
const LinkList_1 = require("./LinkList");
|
|
@@ -24,13 +22,9 @@ exports.Footer = (0, UniBlock_1.UniBlock)(({ className, footer, ...rest }) => {
|
|
|
24
22
|
const [name, oldValue, newValue] = cookieReplaceData_1.COOKIE_REPLACE;
|
|
25
23
|
(0, mapCookie_1.mapCookie)(name, (value) => value?.replace(oldValue, newValue));
|
|
26
24
|
}, []);
|
|
27
|
-
return ((0, jsx_runtime_1.jsxs)(BlockWrapper_1.BlockWrapper, { tag: "footer", className: className, defaultPadding: "p-4xl pb-24", ...rest, children: [(0, jsx_runtime_1.jsx)("div", { className: "mb-lg pb-xs border-b border-main-divider", role: "menu", children: renderTopItems(topItems) }), (0, jsx_runtime_1.jsx)(Contacts_1.Contacts, { className: "overflow-hidden", items: contacts }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-xl", children: [(0, jsx_runtime_1.jsx)(SocialMedia_1.SocialMedia, { className: "mb-xl", media: socialMedia, stretched: true, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), (0, jsx_runtime_1.jsxs)("div", { className: "mb-xl", children: [(0, jsx_runtime_1.jsx)(
|
|
25
|
+
return ((0, jsx_runtime_1.jsxs)(BlockWrapper_1.BlockWrapper, { tag: "footer", className: className, defaultPadding: "p-4xl pb-24", ...rest, children: [(0, jsx_runtime_1.jsx)("div", { className: "mb-lg pb-xs border-b border-main-divider", role: "menu", children: renderTopItems(topItems) }), (0, jsx_runtime_1.jsx)(Contacts_1.Contacts, { className: "overflow-hidden", items: contacts }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-xl", children: [(0, jsx_runtime_1.jsx)(SocialMedia_1.SocialMedia, { className: "mb-xl", media: socialMedia, stretched: true, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), (0, jsx_runtime_1.jsxs)("div", { className: "mb-xl", children: [(0, jsx_runtime_1.jsx)(SocialMedia_1.SocialMedia, { className: "mb-m", media: mobileApps, stretched: true, showButtonText: false }), (0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-s", font: "font-light", color: "text-secondary-text", children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "py-lg border-t border-main-divider", children: (0, jsx_runtime_1.jsx)(HorizontalNavigationLink_1.HorizontalNavigationLink, { text: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u043F\u0440\u0435\u0436\u043D\u044E\u044E \u0432\u0435\u0440\u0441\u0438\u044E \u0441\u0430\u0439\u0442\u0430", className: "text-l font-light max-w-[292px]", href: "https://old.rshb.ru", onClick: handleOnClick }) }), (0, jsx_runtime_1.jsx)(HorizontalNavigation_1.HorizontalNavigation, { className: "py-lg border-y border-main-divider", title: horizontalNavigationTitle, links: relatedEnterprises }), (0, jsx_runtime_1.jsx)(TextInformation_1.TextInformation, { links: documents })] }));
|
|
28
26
|
});
|
|
29
27
|
const renderTopItems = (topItems) => topItems
|
|
30
28
|
?.filter((_) => _.icon)
|
|
31
29
|
.map((item, i) => ((0, jsx_runtime_1.jsx)(RollupItem_1.RollupItem, { foldButtonVersion: "accordion", label: item?.text, labelIcon: item?.icon, role: "menuitem", children: (0, jsx_runtime_1.jsx)(LinkList_1.LinkList, { items: item.items, basePath: (0, appendSlash_1.appendSlash)(item.href) }) }, String(i))));
|
|
32
|
-
const renderButton = ({ href = '/', text }, i) => {
|
|
33
|
-
const { label } = (0, findIconByHref_1.findIconByHref)(href);
|
|
34
|
-
return ((0, jsx_runtime_1.jsx)(LinkButton_1.LinkButton, { className: "w-full", text: text || label, version: "secondary", href: href, target: "_blank" }, String(i)));
|
|
35
|
-
};
|
|
36
30
|
//# sourceMappingURL=Footer.mobile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.mobile.js","sourceRoot":"","sources":["../../../src/components/Footer/Footer.mobile.tsx"],"names":[],"mappings":";;;AAAA,uDAA0D;
|
|
1
|
+
{"version":3,"file":"Footer.mobile.js","sourceRoot":"","sources":["../../../src/components/Footer/Footer.mobile.tsx"],"names":[],"mappings":";;;AAAA,uDAA0D;AAE1D,4DAAyD;AACzD,iDAA8C;AAC9C,sDAAmD;AACnD,yDAAsD;AACtD,qDAAkD;AAClD,yDAAsD;AACtD,yCAAsC;AACtC,2DAAqD;AAErD,iEAA8D;AAC9D,yEAAsE;AACtE,yCAAsC;AACtC,+CAA4C;AAC5C,uDAAoD;AAEvC,QAAA,MAAM,GAAG,IAAA,mBAAQ,EAAc,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IAC7E,MAAM,EAAE,QAAQ,EAAE,G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AI,EAAC,oLAAmC,EACxC,SAAS,EAAC,iCAAiC,EAC3C,IAAI,EAAC,qBAAqB,EAC1B,OAAO,EAAE,aAAa,GACtB,GACE,EACN,uBAAC,2CAAoB,IACnB,SAAS,EAAC,oCAAoC,EAC9C,KAAK,EAAE,yBAAyB,EAChC,KAAK,EAAE,kBAAkB,GACzB,EACF,uBAAC,iCAAe,IAAC,KAAK,EAAE,SAAS,GAAI,IACxB,CAChB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,cAAc,GAAG,CAAC,QAAwC,EAAE,EAAE,CAClE,QAAQ;IACN,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;KACtB,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAChB,uBAAC,uBAAU,IAET,iBAAiB,EAAC,WAAW,EAC7B,KAAK,EAAE,IAAI,EAAE,IAAI,EACjB,SAAS,EAAE,IAAI,EAAE,IAAI,EACrB,IAAI,EAAC,UAAU,YAEf,uBAAC,mBAAQ,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAA,yBAAW,EAAC,IAAI,CAAC,IAAI,CAAC,GAAI,IAN5D,MAAM,CAAC,CAAC,CAAC,CAOH,CACd,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type CarouselTariffsCardAction } from '../components/CarouselTariffsCard/CarouselTariffsCardAction';
|
|
1
2
|
import { type TabActivationEvent } from '../components/Tabs/TabActivationEvent';
|
|
2
3
|
import { type Region } from '../hooks/useRegions';
|
|
3
4
|
import { type DialogAction } from '../ui-kit/DialogManager/DialogAction';
|
|
@@ -8,6 +9,7 @@ interface GlobalEventMap {
|
|
|
8
9
|
dialog: DialogAction;
|
|
9
10
|
popup: PopupAction;
|
|
10
11
|
tab: TabActivationEvent;
|
|
12
|
+
fold: CarouselTariffsCardAction;
|
|
11
13
|
}
|
|
12
14
|
export declare const defaultEventBus: EventBus<GlobalEventMap>;
|
|
13
15
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultEventBus.js","sourceRoot":"","sources":["../../src/EventBus/defaultEventBus.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"defaultEventBus.js","sourceRoot":"","sources":["../../src/EventBus/defaultEventBus.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAUtC,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,QAAQ,EAAkB,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
+
import { useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
4
|
+
import { defaultEventBus } from '../../EventBus/defaultEventBus.js';
|
|
3
5
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper.js';
|
|
4
6
|
import { Foldable } from '../../ui-kit/Foldable/Foldable.js';
|
|
5
7
|
import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection.js';
|
|
@@ -10,12 +12,22 @@ import { LinkButton } from '../../ui-kit/LinkButton/LinkButton.js';
|
|
|
10
12
|
import { isIcon } from '../../utils/isIcon.js';
|
|
11
13
|
import { style } from '../../utils/style.js';
|
|
12
14
|
import { renderCardInfo } from './renderCardInfo.js';
|
|
13
|
-
export const CarouselTariffsCard = JSX(({ className = '', title, align = 'text-center', icon, button, visibleCellsCount = 1, cardCells = [], ...rest }) => {
|
|
15
|
+
export const CarouselTariffsCard = JSX(({ className = '', title, align = 'text-center', icon, button, visibleCellsCount = 1, cardCells = [], options, ...rest }) => {
|
|
14
16
|
const cellsNode = cardCells.map(renderCardInfo);
|
|
15
17
|
const [visibleCells, hiddenCells] = visibleCellsCount > 0
|
|
16
18
|
? [cellsNode.slice(0, visibleCellsCount), cellsNode.slice(visibleCellsCount)]
|
|
17
19
|
: [cellsNode, []];
|
|
18
|
-
|
|
20
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
21
|
+
useEffect(() => defaultEventBus.subscribe('fold', (event) => {
|
|
22
|
+
if (options?.parent !== undefined && event.parent === options?.parent) {
|
|
23
|
+
setIsVisible(event.isUnfolded);
|
|
24
|
+
}
|
|
25
|
+
}), []);
|
|
26
|
+
return (_jsxs(BlockWrapper, { className: style('flex flex-col', className), defaultPadding: "p-2xl", ...rest, children: [isIcon(icon) ? (_jsx("div", { className: "self-center", children: _jsx(Img, { image: icon }) })) : null, title ? (_jsx(Heading, { className: style('pt-xs', align), headingType: "h5", title: title })) : null, button?.text ? _jsx(LinkButton, { className: "w-full mt-m mb-lg", ...button }) : null, hiddenCells.length ? (_jsx(Foldable, { renderFoldableSection: () => (_jsxs("div", { children: [visibleCells, _jsx(FoldableSection, { isUnfolded: isVisible, children: hiddenCells })] })), renderFoldButton: cardCells.length > 1 ? renderFoldButton(isVisible, options?.parent) : null })) : (_jsx("div", { children: visibleCells }))] }));
|
|
19
27
|
});
|
|
20
|
-
const renderFoldButton = (
|
|
28
|
+
const renderFoldButton = (isUnfolded, parent) => () => (_jsxs("button", { className: "w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center", onClick: () => {
|
|
29
|
+
if (parent !== undefined) {
|
|
30
|
+
defaultEventBus.fire('fold', { type: 'fold', isUnfolded: !isUnfolded, parent });
|
|
31
|
+
}
|
|
32
|
+
}, type: "button", children: [_jsx("div", { children: isUnfolded ? 'Скрыть' : 'Подробнее о тарифе' }), _jsx(Icon, { className: "text-primary-text", name: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16" })] }));
|
|
21
33
|
//# sourceMappingURL=CarouselTariffsCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CarouselTariffsCard.js","sourceRoot":"","sources":["../../../src/components/CarouselTariffsCard/CarouselTariffsCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"CarouselTariffsCard.js","sourceRoot":"","sources":["../../../src/components/CarouselTariffsCard/CarouselTariffsCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAGjE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAMlD,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CACpC,CAAC,EACC,SAAS,GAAG,EAAE,EACd,KAAK,EACL,KAAK,GAAG,aAAa,EACrB,IAAI,EACJ,MAAM,EACN,iBAAiB,GAAG,CAAC,EACrB,SAAS,GAAG,EAAE,EACd,OAAO,EACP,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,SAAS,GAAG,SAAS,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAEhD,MAAM,CAAC,YAAY,EAAE,WAAW,CAAC,GAC/B,iBAAiB,GAAG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,CAAC,CAC3B,0BACG,YAAY,EACb,KAAC,eAAe,IAAC,UAAU,EAAE,SAAS,YAAG,WAAW,GAAmB,IACnE,CACP,EACD,gBAAgB,EACd,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,GAE5E,CACH,CAAC,CAAC,CAAC,CACF,wBAAM,YAAY,GAAO,CAC1B,IACY,CAChB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,UAAoB,EAAE,MAAa,EAAE,EAAE,CAAC,GAAU,EAAE,CAC5E,CACE,kBACE,SAAS,EAAC,iFAAiF,EAC3F,OAAO,EAAE,GAAG,EAAE;QACZ,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC;SACjF;IACH,CAAC,EACD,IAAI,EAAC,QAAQ,aAEb,wBAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,oBAAoB,GAAO,EACzD,KAAC,IAAI,IACH,SAAS,EAAC,mBAAmB,EAC7B,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,eAAe,EAClD,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,GACX,IACK,CACV,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CarouselTariffsCardAction.js","sourceRoot":"","sources":["../../../src/components/CarouselTariffsCard/CarouselTariffsCardAction.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper.js';
|
|
4
|
-
import { LinkButton } from '../../ui-kit/LinkButton/LinkButton.js';
|
|
5
4
|
import { Text } from '../../ui-kit/Text/Text.js';
|
|
6
5
|
import { UniBlock } from '../../UniBlock/UniBlock.js';
|
|
7
6
|
import { appendSlash } from '../../utils/appendSlash.js';
|
|
@@ -9,7 +8,6 @@ import { mapCookie } from '../../utils/mapCookie.js';
|
|
|
9
8
|
import { RollupItem } from '../RollupItem/RollupItem.js';
|
|
10
9
|
import { Contacts } from './Contacts.js';
|
|
11
10
|
import { COOKIE_REPLACE } from './cookieReplaceData.js';
|
|
12
|
-
import { findIconByHref } from './findIconByHref.js';
|
|
13
11
|
import { HorizontalNavigation } from './HorizontalNavigation.js';
|
|
14
12
|
import { HorizontalNavigationLink } from './HorizontalNavigationLink.js';
|
|
15
13
|
import { LinkList } from './LinkList.js';
|
|
@@ -22,13 +20,9 @@ export const Footer = UniBlock(({ className, footer, ...rest }) => {
|
|
|
22
20
|
const [name, oldValue, newValue] = COOKIE_REPLACE;
|
|
23
21
|
mapCookie(name, (value) => value?.replace(oldValue, newValue));
|
|
24
22
|
}, []);
|
|
25
|
-
return (_jsxs(BlockWrapper, { tag: "footer", className: className, defaultPadding: "p-4xl pb-24", ...rest, children: [_jsx("div", { className: "mb-lg pb-xs border-b border-main-divider", role: "menu", children: renderTopItems(topItems) }), _jsx(Contacts, { className: "overflow-hidden", items: contacts }), _jsxs("div", { className: "mt-xl", children: [_jsx(SocialMedia, { className: "mb-xl", media: socialMedia, stretched: true, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), _jsxs("div", { className: "mb-xl", children: [_jsx(
|
|
23
|
+
return (_jsxs(BlockWrapper, { tag: "footer", className: className, defaultPadding: "p-4xl pb-24", ...rest, children: [_jsx("div", { className: "mb-lg pb-xs border-b border-main-divider", role: "menu", children: renderTopItems(topItems) }), _jsx(Contacts, { className: "overflow-hidden", items: contacts }), _jsxs("div", { className: "mt-xl", children: [_jsx(SocialMedia, { className: "mb-xl", media: socialMedia, stretched: true, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), _jsxs("div", { className: "mb-xl", children: [_jsx(SocialMedia, { className: "mb-m", media: mobileApps, stretched: true, showButtonText: false }), _jsx(Text, { size: "text-s", font: "font-light", color: "text-secondary-text", children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] })] }), _jsx("div", { className: "py-lg border-t border-main-divider", children: _jsx(HorizontalNavigationLink, { text: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u043F\u0440\u0435\u0436\u043D\u044E\u044E \u0432\u0435\u0440\u0441\u0438\u044E \u0441\u0430\u0439\u0442\u0430", className: "text-l font-light max-w-[292px]", href: "https://old.rshb.ru", onClick: handleOnClick }) }), _jsx(HorizontalNavigation, { className: "py-lg border-y border-main-divider", title: horizontalNavigationTitle, links: relatedEnterprises }), _jsx(TextInformation, { links: documents })] }));
|
|
26
24
|
});
|
|
27
25
|
const renderTopItems = (topItems) => topItems
|
|
28
26
|
?.filter((_) => _.icon)
|
|
29
27
|
.map((item, i) => (_jsx(RollupItem, { foldButtonVersion: "accordion", label: item?.text, labelIcon: item?.icon, role: "menuitem", children: _jsx(LinkList, { items: item.items, basePath: appendSlash(item.href) }) }, String(i))));
|
|
30
|
-
const renderButton = ({ href = '/', text }, i) => {
|
|
31
|
-
const { label } = findIconByHref(href);
|
|
32
|
-
return (_jsx(LinkButton, { className: "w-full", text: text || label, version: "secondary", href: href, target: "_blank" }, String(i)));
|
|
33
|
-
};
|
|
34
28
|
//# sourceMappingURL=Footer.mobile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.mobile.js","sourceRoot":"","sources":["../../../src/components/Footer/Footer.mobile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA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B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,cAAc,GAAG,CAAC,QAAwC,EAAE,EAAE,CAClE,QAAQ;IACN,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;KACtB,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAChB,KAAC,UAAU,IAET,iBAAiB,EAAC,WAAW,EAC7B,KAAK,EAAE,IAAI,EAAE,IAAI,EACjB,SAAS,EAAE,IAAI,EAAE,IAAI,EACrB,IAAI,EAAC,UAAU,YAEf,KAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,GAAI,IAN5D,MAAM,CAAC,CAAC,CAAC,CAOH,CACd,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type CarouselTariffsCardAction } from '../components/CarouselTariffsCard/CarouselTariffsCardAction';
|
|
1
2
|
import { type TabActivationEvent } from '../components/Tabs/TabActivationEvent';
|
|
2
3
|
import { type Region } from '../hooks/useRegions';
|
|
3
4
|
import { type DialogAction } from '../ui-kit/DialogManager/DialogAction';
|
|
@@ -8,6 +9,7 @@ interface GlobalEventMap {
|
|
|
8
9
|
dialog: DialogAction;
|
|
9
10
|
popup: PopupAction;
|
|
10
11
|
tab: TabActivationEvent;
|
|
12
|
+
fold: CarouselTariffsCardAction;
|
|
11
13
|
}
|
|
12
14
|
export declare const defaultEventBus: EventBus<GlobalEventMap>;
|
|
13
15
|
export {};
|
|
@@ -618,8 +618,8 @@
|
|
|
618
618
|
/** @deprecated */
|
|
619
619
|
const renderButtonsSection = (buttons, { className, buttonClassName, isVertical } = {}) => buttons?.length && buttons.some((_) => _?.text || _?.icon?.icon) ? (jsx("div", { className: style('flex', isVertical
|
|
620
620
|
? 'flex-col gap-xs justify-items-stretch'
|
|
621
|
-
: 'flex-wrap @xl:flex-nowrap gap-lg sm:gap-m', className), role: "group", children: buttons.map(renderButton
|
|
622
|
-
const renderButton
|
|
621
|
+
: 'flex-wrap @xl:flex-nowrap gap-lg sm:gap-m', className), role: "group", children: buttons.map(renderButton(buttonClassName)) })) : null;
|
|
622
|
+
const renderButton = (buttonClassName = '') => (button, index) => {
|
|
623
623
|
const { text, icon, iconRight, version, ...rest } = button || {};
|
|
624
624
|
const iconVersion = getIconVersion(icon, version);
|
|
625
625
|
const iconRightVersion = getIconVersion(iconRight, version);
|
|
@@ -3174,14 +3174,24 @@
|
|
|
3174
3174
|
return (jsxs("div", { className: "py-lg border-b border-main-divider", children: [title ? (jsx("div", { className: "opacity-80", children: jsx(Text, { size: "text-m", color: "text-secondary-text", children: title }) })) : null, description ? (jsx("div", { className: "mt-2xs", children: jsx(Text, { size: "text-xl", color: "text-primary-text", children: description }) })) : null, buttons?.length ? (jsx("div", { className: "text-primary-main", children: renderButtonsSection(buttons) })) : null] }, String(i)));
|
|
3175
3175
|
};
|
|
3176
3176
|
|
|
3177
|
-
const CarouselTariffsCard = JSX(({ className = '', title, align = 'text-center', icon, button, visibleCellsCount = 1, cardCells = [], ...rest }) => {
|
|
3177
|
+
const CarouselTariffsCard = JSX(({ className = '', title, align = 'text-center', icon, button, visibleCellsCount = 1, cardCells = [], options, ...rest }) => {
|
|
3178
3178
|
const cellsNode = cardCells.map(renderCardInfo);
|
|
3179
3179
|
const [visibleCells, hiddenCells] = visibleCellsCount > 0
|
|
3180
3180
|
? [cellsNode.slice(0, visibleCellsCount), cellsNode.slice(visibleCellsCount)]
|
|
3181
3181
|
: [cellsNode, []];
|
|
3182
|
-
|
|
3182
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
3183
|
+
useEffect(() => defaultEventBus.subscribe('fold', (event) => {
|
|
3184
|
+
if (options?.parent !== undefined && event.parent === options?.parent) {
|
|
3185
|
+
setIsVisible(event.isUnfolded);
|
|
3186
|
+
}
|
|
3187
|
+
}), []);
|
|
3188
|
+
return (jsxs(BlockWrapper, { className: style('flex flex-col', className), defaultPadding: "p-2xl", ...rest, children: [isIcon(icon) ? (jsx("div", { className: "self-center", children: jsx(Img, { image: icon }) })) : null, title ? (jsx(Heading, { className: style('pt-xs', align), headingType: "h5", title: title })) : null, button?.text ? jsx(LinkButton, { className: "w-full mt-m mb-lg", ...button }) : null, hiddenCells.length ? (jsx(Foldable, { renderFoldableSection: () => (jsxs("div", { children: [visibleCells, jsx(FoldableSection, { isUnfolded: isVisible, children: hiddenCells })] })), renderFoldButton: cardCells.length > 1 ? renderFoldButton$3(isVisible, options?.parent) : null })) : (jsx("div", { children: visibleCells }))] }));
|
|
3183
3189
|
});
|
|
3184
|
-
const renderFoldButton$3 = (
|
|
3190
|
+
const renderFoldButton$3 = (isUnfolded, parent) => () => (jsxs("button", { className: "w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center", onClick: () => {
|
|
3191
|
+
if (parent !== undefined) {
|
|
3192
|
+
defaultEventBus.fire('fold', { type: 'fold', isUnfolded: !isUnfolded, parent });
|
|
3193
|
+
}
|
|
3194
|
+
}, type: "button", children: [jsx("div", { children: isUnfolded ? 'Скрыть' : 'Подробнее о тарифе' }), jsx(Icon, { className: "text-primary-text", name: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16" })] }));
|
|
3185
3195
|
|
|
3186
3196
|
const gradientStyle = 'bg-gradient-to-r from-main-gradient-start to-main-gradient-end';
|
|
3187
3197
|
const dividerStyle$1 = 'border-main-divider border-b';
|
|
@@ -3690,15 +3700,11 @@
|
|
|
3690
3700
|
const [name, oldValue, newValue] = COOKIE_REPLACE;
|
|
3691
3701
|
mapCookie(name, (value) => value?.replace(oldValue, newValue));
|
|
3692
3702
|
}, []);
|
|
3693
|
-
return (jsxs(BlockWrapper, { tag: "footer", className: className, defaultPadding: "p-4xl pb-24", ...rest, children: [jsx("div", { className: "mb-lg pb-xs border-b border-main-divider", role: "menu", children: renderTopItems(topItems) }), jsx(Contacts, { className: "overflow-hidden", items: contacts }), jsxs("div", { className: "mt-xl", children: [jsx(SocialMedia, { className: "mb-xl", media: socialMedia, stretched: true, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsxs("div", { className: "mb-xl", children: [jsx(
|
|
3703
|
+
return (jsxs(BlockWrapper, { tag: "footer", className: className, defaultPadding: "p-4xl pb-24", ...rest, children: [jsx("div", { className: "mb-lg pb-xs border-b border-main-divider", role: "menu", children: renderTopItems(topItems) }), jsx(Contacts, { className: "overflow-hidden", items: contacts }), jsxs("div", { className: "mt-xl", children: [jsx(SocialMedia, { className: "mb-xl", media: socialMedia, stretched: true, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsxs("div", { className: "mb-xl", children: [jsx(SocialMedia, { className: "mb-m", media: mobileApps, stretched: true, showButtonText: false }), jsx(Text, { size: "text-s", font: "font-light", color: "text-secondary-text", children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] })] }), jsx("div", { className: "py-lg border-t border-main-divider", children: jsx(HorizontalNavigationLink, { text: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u043F\u0440\u0435\u0436\u043D\u044E\u044E \u0432\u0435\u0440\u0441\u0438\u044E \u0441\u0430\u0439\u0442\u0430", className: "text-l font-light max-w-[292px]", href: "https://old.rshb.ru", onClick: handleOnClick }) }), jsx(HorizontalNavigation, { className: "py-lg border-y border-main-divider", title: horizontalNavigationTitle, links: relatedEnterprises }), jsx(TextInformation, { links: documents })] }));
|
|
3694
3704
|
});
|
|
3695
3705
|
const renderTopItems = (topItems) => topItems
|
|
3696
3706
|
?.filter((_) => _.icon)
|
|
3697
3707
|
.map((item, i) => (jsx(RollupItem, { foldButtonVersion: "accordion", label: item?.text, labelIcon: item?.icon, role: "menuitem", children: jsx(LinkList, { items: item.items, basePath: appendSlash(item.href) }) }, String(i))));
|
|
3698
|
-
const renderButton = ({ href = '/', text }, i) => {
|
|
3699
|
-
const { label } = findIconByHref(href);
|
|
3700
|
-
return (jsx(LinkButton, { className: "w-full", text: text || label, version: "secondary", href: href, target: "_blank" }, String(i)));
|
|
3701
|
-
};
|
|
3702
3708
|
|
|
3703
3709
|
const ICON_SIZE = { width: '34', height: '34' };
|
|
3704
3710
|
|
|
@@ -5665,7 +5671,7 @@
|
|
|
5665
5671
|
|
|
5666
5672
|
const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
|
|
5667
5673
|
|
|
5668
|
-
const packageVersion = "0.14.
|
|
5674
|
+
const packageVersion = "0.14.245";
|
|
5669
5675
|
|
|
5670
5676
|
exports.Blocks = Blocks;
|
|
5671
5677
|
exports.ContentPage = ContentPage;
|