@redneckz/wildless-cms-uni-blocks 0.6.17 → 0.6.19
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/bin/migration-scripts/0.6.16.js +1 -1
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +85 -59
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/StepsBlock/renderStepContent.d.ts +2 -2
- package/bundle/components/TariffsTable/EmbeddableCellData.d.ts +7 -1
- package/bundle/components/TariffsTable/TariffsTableCell.d.ts +8 -2
- package/bundle/components/TariffsTable/TariffsTableContent.d.ts +3 -4
- package/bundle/components/TariffsTable/TariffsTableRenderCell.d.ts +11 -0
- package/bundle/components/TariffsTable/TariffsTableRow.d.ts +0 -1
- package/bundle/components/TariffsTable/TariffsTableRowContainer.d.ts +3 -1
- package/bundle/ui-kit/InnerTable/InnerTable.d.ts +1 -0
- package/bundle/ui-kit/InnerTable/InnerTableButton.d.ts +1 -0
- package/dist/components/Bonus/Bonus.js +1 -1
- package/dist/components/Bonus/Bonus.js.map +1 -1
- package/dist/components/ProductBlock/renderBackwardButton.js +1 -1
- package/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRental.js +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +3 -3
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/renderItems.js +1 -4
- package/dist/components/StepsBlock/renderItems.js.map +1 -1
- package/dist/components/StepsBlock/renderStepContent.d.ts +2 -2
- package/dist/components/StepsBlock/renderStepContent.js +13 -8
- package/dist/components/StepsBlock/renderStepContent.js.map +1 -1
- package/dist/components/TariffsTable/EmbeddableCellData.d.ts +7 -1
- package/dist/components/TariffsTable/EmbeddableCellData.js +4 -11
- package/dist/components/TariffsTable/EmbeddableCellData.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTable.js +1 -1
- package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableCell.d.ts +8 -2
- package/dist/components/TariffsTable/TariffsTableCell.js +13 -18
- package/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableContent.d.ts +3 -4
- package/dist/components/TariffsTable/TariffsTableRenderCell.d.ts +11 -0
- package/dist/components/TariffsTable/TariffsTableRenderCell.js +42 -0
- package/dist/components/TariffsTable/TariffsTableRenderCell.js.map +1 -0
- package/dist/components/TariffsTable/TariffsTableRow.d.ts +0 -1
- package/dist/components/TariffsTable/TariffsTableRow.js +6 -2
- package/dist/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableRowContainer.d.ts +3 -1
- package/dist/components/TariffsTable/TariffsTableRowContainer.js +2 -8
- package/dist/components/TariffsTable/TariffsTableRowContainer.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableTileCell.js +1 -1
- package/dist/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/dist/ui-kit/BlockWrapper.js +4 -3
- package/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/dist/ui-kit/InnerTable/InnerTable.d.ts +1 -0
- package/dist/ui-kit/InnerTable/InnerTable.js +3 -2
- package/dist/ui-kit/InnerTable/InnerTable.js.map +1 -1
- package/dist/ui-kit/InnerTable/InnerTableButton.d.ts +1 -0
- package/dist/ui-kit/InnerTable/InnerTableButton.js +2 -6
- package/dist/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/dist/ui-kit/InputRange/InputRange.js +1 -1
- package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/dist/ui-kit/Radio/Radio.js +1 -1
- package/dist/ui-kit/Radio/Radio.js.map +1 -1
- package/dist/ui-kit/Select/Select.js +1 -1
- package/dist/ui-kit/Select/Select.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Bonus/Bonus.js +1 -1
- package/lib/components/Bonus/Bonus.js.map +1 -1
- package/lib/components/ProductBlock/renderBackwardButton.js +1 -1
- package/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRental.js +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.fixture.d.ts +6 -2
- package/lib/components/StepsBlock/StepsBlock.js +3 -3
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/renderItems.js +1 -4
- package/lib/components/StepsBlock/renderItems.js.map +1 -1
- package/lib/components/StepsBlock/renderStepContent.d.ts +2 -2
- package/lib/components/StepsBlock/renderStepContent.js +14 -9
- package/lib/components/StepsBlock/renderStepContent.js.map +1 -1
- package/lib/components/TariffsTable/EmbeddableCellData.d.ts +7 -1
- package/lib/components/TariffsTable/EmbeddableCellData.js +4 -11
- package/lib/components/TariffsTable/EmbeddableCellData.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTable.js +1 -1
- package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableCell.d.ts +8 -2
- package/lib/components/TariffsTable/TariffsTableCell.js +14 -19
- package/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableContent.d.ts +3 -4
- package/lib/components/TariffsTable/TariffsTableRenderCell.d.ts +11 -0
- package/lib/components/TariffsTable/TariffsTableRenderCell.js +39 -0
- package/lib/components/TariffsTable/TariffsTableRenderCell.js.map +1 -0
- package/lib/components/TariffsTable/TariffsTableRow.d.ts +0 -1
- package/lib/components/TariffsTable/TariffsTableRow.js +6 -2
- package/lib/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableRowContainer.d.ts +3 -1
- package/lib/components/TariffsTable/TariffsTableRowContainer.js +2 -8
- package/lib/components/TariffsTable/TariffsTableRowContainer.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableTileCell.js +1 -1
- package/lib/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/lib/ui-kit/BlockWrapper.js +4 -3
- package/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/lib/ui-kit/InnerTable/InnerTable.d.ts +1 -0
- package/lib/ui-kit/InnerTable/InnerTable.js +3 -2
- package/lib/ui-kit/InnerTable/InnerTable.js.map +1 -1
- package/lib/ui-kit/InnerTable/InnerTableButton.d.ts +1 -0
- package/lib/ui-kit/InnerTable/InnerTableButton.js +2 -6
- package/lib/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/lib/ui-kit/InputRange/InputRange.js +1 -1
- package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/lib/ui-kit/Radio/Radio.js +1 -1
- package/lib/ui-kit/Radio/Radio.js.map +1 -1
- package/lib/ui-kit/Select/Select.js +1 -1
- package/lib/ui-kit/Select/Select.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +6 -5
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/StepsBlock/renderStepContent.d.ts +2 -2
- package/mobile/bundle/components/TariffsTable/TariffsTableCell.d.ts +8 -2
- package/mobile/bundle/components/TariffsTable/TariffsTableContent.d.ts +3 -4
- package/mobile/bundle/components/TariffsTable/TariffsTableRenderCell.d.ts +11 -0
- package/mobile/bundle/components/TariffsTable/TariffsTableRow.d.ts +0 -1
- package/mobile/bundle/components/TariffsTable/TariffsTableRowContainer.d.ts +3 -1
- package/mobile/bundle/ui-kit/InnerTable/InnerTable.d.ts +1 -0
- package/mobile/bundle/ui-kit/InnerTable/InnerTableButton.d.ts +1 -0
- package/mobile/dist/components/Bonus/Bonus.js +1 -1
- package/mobile/dist/components/Bonus/Bonus.js.map +1 -1
- package/mobile/dist/components/ProductBlock/renderBackwardButton.js +1 -1
- package/mobile/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/mobile/dist/components/StepsBlock/renderItems.js +1 -4
- package/mobile/dist/components/StepsBlock/renderItems.js.map +1 -1
- package/mobile/dist/components/StepsBlock/renderStepContent.d.ts +2 -2
- package/mobile/dist/components/StepsBlock/renderStepContent.js +13 -8
- package/mobile/dist/components/StepsBlock/renderStepContent.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableCell.d.ts +8 -2
- package/mobile/dist/components/TariffsTable/TariffsTableCell.js +13 -18
- package/mobile/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableContent.d.ts +3 -4
- package/mobile/dist/components/TariffsTable/TariffsTableRenderCell.d.ts +11 -0
- package/mobile/dist/components/TariffsTable/TariffsTableRenderCell.js +42 -0
- package/mobile/dist/components/TariffsTable/TariffsTableRenderCell.js.map +1 -0
- package/mobile/dist/components/TariffsTable/TariffsTableRow.d.ts +0 -1
- package/mobile/dist/components/TariffsTable/TariffsTableRow.js +6 -2
- package/mobile/dist/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableRowContainer.d.ts +3 -1
- package/mobile/dist/components/TariffsTable/TariffsTableRowContainer.js +2 -8
- package/mobile/dist/components/TariffsTable/TariffsTableRowContainer.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/mobile/dist/ui-kit/BlockWrapper.js +4 -3
- package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTable.d.ts +1 -0
- package/mobile/dist/ui-kit/InnerTable/InnerTable.js +3 -2
- package/mobile/dist/ui-kit/InnerTable/InnerTable.js.map +1 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTableButton.d.ts +1 -0
- package/mobile/dist/ui-kit/InnerTable/InnerTableButton.js +2 -6
- package/mobile/dist/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/mobile/dist/ui-kit/InputRange/InputRange.js +1 -1
- package/mobile/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/dist/ui-kit/Radio/Radio.js +1 -1
- package/mobile/dist/ui-kit/Radio/Radio.js.map +1 -1
- package/mobile/dist/ui-kit/Select/Select.js +1 -1
- package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
- package/mobile/lib/components/Bonus/Bonus.js +1 -1
- package/mobile/lib/components/Bonus/Bonus.js.map +1 -1
- package/mobile/lib/components/ProductBlock/renderBackwardButton.js +1 -1
- package/mobile/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/mobile/lib/components/StepsBlock/renderItems.js +1 -4
- package/mobile/lib/components/StepsBlock/renderItems.js.map +1 -1
- package/mobile/lib/components/StepsBlock/renderStepContent.d.ts +2 -2
- package/mobile/lib/components/StepsBlock/renderStepContent.js +14 -9
- package/mobile/lib/components/StepsBlock/renderStepContent.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableCell.d.ts +8 -2
- package/mobile/lib/components/TariffsTable/TariffsTableCell.js +14 -19
- package/mobile/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableContent.d.ts +3 -4
- package/mobile/lib/components/TariffsTable/TariffsTableRenderCell.d.ts +11 -0
- package/mobile/lib/components/TariffsTable/TariffsTableRenderCell.js +39 -0
- package/mobile/lib/components/TariffsTable/TariffsTableRenderCell.js.map +1 -0
- package/mobile/lib/components/TariffsTable/TariffsTableRow.d.ts +0 -1
- package/mobile/lib/components/TariffsTable/TariffsTableRow.js +6 -2
- package/mobile/lib/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableRowContainer.d.ts +3 -1
- package/mobile/lib/components/TariffsTable/TariffsTableRowContainer.js +2 -8
- package/mobile/lib/components/TariffsTable/TariffsTableRowContainer.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/mobile/lib/ui-kit/BlockWrapper.js +4 -3
- package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTable.d.ts +1 -0
- package/mobile/lib/ui-kit/InnerTable/InnerTable.js +3 -2
- package/mobile/lib/ui-kit/InnerTable/InnerTable.js.map +1 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTableButton.d.ts +1 -0
- package/mobile/lib/ui-kit/InnerTable/InnerTableButton.js +2 -6
- package/mobile/lib/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/mobile/lib/ui-kit/InputRange/InputRange.js +1 -1
- package/mobile/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/lib/ui-kit/Radio/Radio.js +1 -1
- package/mobile/lib/ui-kit/Radio/Radio.js.map +1 -1
- package/mobile/lib/ui-kit/Select/Select.js +1 -1
- package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
- package/mobile/src/components/Bonus/Bonus.tsx +1 -1
- package/mobile/src/components/ProductBlock/renderBackwardButton.tsx +5 -1
- package/mobile/src/components/SafeDepositRental/SafeDepositRental.tsx +6 -1
- package/mobile/src/components/StepsBlock/renderItems.tsx +5 -8
- package/mobile/src/components/StepsBlock/renderStepContent.tsx +40 -15
- package/mobile/src/components/TariffsTable/TariffsTableCell.tsx +39 -45
- package/mobile/src/components/TariffsTable/TariffsTableContent.ts +3 -4
- package/mobile/src/components/TariffsTable/TariffsTableRenderCell.tsx +88 -0
- package/mobile/src/components/TariffsTable/TariffsTableRow.tsx +18 -9
- package/mobile/src/components/TariffsTable/TariffsTableRowContainer.tsx +5 -20
- package/mobile/src/components/TariffsTable/TariffsTableTileCell.tsx +3 -1
- package/mobile/src/ui-kit/BlockWrapper.tsx +5 -3
- package/mobile/src/ui-kit/InnerTable/InnerTable.tsx +13 -4
- package/mobile/src/ui-kit/InnerTable/InnerTableButton.tsx +20 -26
- package/mobile/src/ui-kit/InputRange/InputRange.tsx +1 -1
- package/mobile/src/ui-kit/Radio/Radio.tsx +2 -2
- package/mobile/src/ui-kit/Select/Select.tsx +1 -1
- package/package.json +1 -1
- package/src/components/Bonus/Bonus.tsx +1 -1
- package/src/components/ProductBlock/renderBackwardButton.tsx +5 -1
- package/src/components/SafeDepositRental/SafeDepositRental.tsx +6 -1
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +72 -81
- package/src/components/StepsBlock/StepsBlock.tsx +3 -3
- package/src/components/StepsBlock/renderItems.tsx +5 -8
- package/src/components/StepsBlock/renderStepContent.tsx +40 -15
- package/src/components/TariffsTable/EmbeddableCellData.tsx +20 -18
- package/src/components/TariffsTable/TariffsTable.tsx +1 -2
- package/src/components/TariffsTable/TariffsTableCell.tsx +39 -45
- package/src/components/TariffsTable/TariffsTableContent.ts +3 -4
- package/src/components/TariffsTable/TariffsTableRenderCell.tsx +88 -0
- package/src/components/TariffsTable/TariffsTableRow.tsx +18 -9
- package/src/components/TariffsTable/TariffsTableRowContainer.tsx +5 -20
- package/src/components/TariffsTable/TariffsTableTileCell.tsx +3 -1
- package/src/ui-kit/BlockWrapper.tsx +5 -3
- package/src/ui-kit/InnerTable/InnerTable.tsx +13 -4
- package/src/ui-kit/InnerTable/InnerTableButton.tsx +20 -26
- package/src/ui-kit/InputRange/InputRange.tsx +1 -1
- package/src/ui-kit/Radio/Radio.tsx +2 -2
- package/src/ui-kit/Select/Select.tsx +1 -1
package/bundle/bundle.umd.js
CHANGED
|
@@ -298,6 +298,9 @@
|
|
|
298
298
|
const THRESHOLD_ACCURACY = 100; // Decimals number (100 is for two decimals number, 0.**)
|
|
299
299
|
const THRESHOLD_ARRAY_LENGTH = 18;
|
|
300
300
|
const THRESHOLD_ARRAY_START_VALUE = (THRESHOLD_ACCURACY - THRESHOLD_ARRAY_LENGTH) / THRESHOLD_ACCURACY;
|
|
301
|
+
const OBSERVER_OPTIONS = {
|
|
302
|
+
threshold: new Array(THRESHOLD_ARRAY_LENGTH).fill(0).map(getIntersectionThreshold),
|
|
303
|
+
};
|
|
301
304
|
const BlockWrapper = JSX(({ anchor, className, children, tag = 'section', labels }) => {
|
|
302
305
|
const Tag = tag;
|
|
303
306
|
const [shouldRenderBlock, setShouldRenderBlock] = useState(true);
|
|
@@ -326,9 +329,7 @@
|
|
|
326
329
|
if (!shouldRenderBlock) {
|
|
327
330
|
return null;
|
|
328
331
|
}
|
|
329
|
-
return anchor ? (jsx(IntersectionObserverTag, { tag: tag, className: className, observerCallback: observerCallback, observerOptions: {
|
|
330
|
-
threshold: new Array(THRESHOLD_ARRAY_LENGTH).fill(0).map(getIntersectionThreshold),
|
|
331
|
-
}, anchor: anchor, children: children })) : (jsx(Tag, { className: className, children: children }));
|
|
332
|
+
return anchor ? (jsx(IntersectionObserverTag, { tag: tag, className: className, observerCallback: observerCallback, observerOptions: OBSERVER_OPTIONS, anchor: anchor, children: children })) : (jsx(Tag, { className: className, children: children }));
|
|
332
333
|
});
|
|
333
334
|
function getIntersectionThreshold(_, i) {
|
|
334
335
|
const value = (i + 1) / THRESHOLD_ACCURACY + THRESHOLD_ARRAY_START_VALUE;
|
|
@@ -731,7 +732,7 @@
|
|
|
731
732
|
const { context, className = '', title, description, bonusItems, ...rest } = props;
|
|
732
733
|
return (jsx(BlockWrapper, { className: `font-sans bg-white p-[50px] pb-9 ${className}`, context: context, ...rest, children: jsxs("div", { className: "container", children: [jsx(Headline, { context: context, className: "!p-0", title: title, description: description, headlineVersion: "M", align: "center" }), jsx("div", { className: "flex flex-wrap w-full mt-9", children: bonusItems?.length
|
|
733
734
|
? bonusItems.map((_, i) => {
|
|
734
|
-
return (jsx("div", { className: "flex-grow w-[49%] border border-gray
|
|
735
|
+
return (jsx("div", { className: "flex-grow w-[49%] border border-gray p-9 mb-3 mx-2 even:mr-0 odd:ml-0 last:odd:mx-0", children: jsxs("div", { className: "flex justify-between w-full", children: [jsxs("div", { className: "flex flex-col justify-between mr-4", children: [jsxs("div", { children: [jsx("div", { className: "text-h4", children: _.title }), jsx("div", { className: "text-xl-light mt-2 max-w-[488px]", children: _.description })] }), _?.buttons?.length ? (jsx(ButtonSection, { context: context, buttons: _?.buttons })) : null] }), _.bonusItemContent?.bonusType
|
|
735
736
|
? renderBonusItemContent(_.bonusItemContent)
|
|
736
737
|
: null] }) }, String(i)));
|
|
737
738
|
})
|
|
@@ -823,7 +824,7 @@
|
|
|
823
824
|
const inputStyle = {
|
|
824
825
|
backgroundSize: `${(((value - min) * 100) / (max - min)).toFixed(2)}% 100%`,
|
|
825
826
|
};
|
|
826
|
-
return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? jsx("span", { className: "text-m-light", children: title }) : null, jsx("input", { className: `m-0 mt-2 font-sans text-h3 w-full h-14 border border-solid border-main-stroke rounded-md
|
|
827
|
+
return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? jsx("span", { className: "text-m-light text-primary-text", children: title }) : null, jsx("input", { className: `m-0 mt-2 font-sans text-h3 w-full h-14 border border-solid border-main-stroke rounded-md
|
|
827
828
|
outline-none p-0 pl-4 box-border text-primary-text hover:border-primary-hover focus:border-primary-focus ${DISABLED_INPUT_CLASSES}`, value: addSpacesBetweenNumbers(value), disabled: disabled, onChange: handleChange, onBlur: handleChange }), jsx("div", { className: "absolute inset-x-0 -bottom-1 px-4 leading-[18px]", children: jsx("input", { className: "box-border w-full m-0 cursor-pointer slider", type: "range", min: min, max: max, step: step, value: value, disabled: disabled, onChange: handleChange, style: inputStyle }) })] }), renderRangeCaption(items)] }));
|
|
828
829
|
});
|
|
829
830
|
function renderRangeCaption(items) {
|
|
@@ -1490,7 +1491,7 @@
|
|
|
1490
1491
|
useEffect(() => {
|
|
1491
1492
|
setSelectedItem(value || { key: '', text: '' });
|
|
1492
1493
|
}, [value]);
|
|
1493
|
-
return (jsxs("div", { className: `${className}`, ref: wrapperRef, children: [label ? jsx("span", { className: "mb-2 flex", children: label }) : null, jsxs("div", { className: `relative ${isOpen ? 'z-20' : 'z-10'}`, children: [jsxs("div", { className: `text-l flex justify-between items-center mb-0.5 text-primary-text cursor-pointer
|
|
1494
|
+
return (jsxs("div", { className: `${className}`, ref: wrapperRef, children: [label ? jsx("span", { className: "mb-2 flex text-primary-text", children: label }) : null, jsxs("div", { className: `relative ${isOpen ? 'z-20' : 'z-10'}`, children: [jsxs("div", { className: `text-l flex justify-between items-center mb-0.5 text-primary-text cursor-pointer
|
|
1494
1495
|
${getBorderStyle(isBorder)}`, onClick: () => setIsOpen(!isOpen), children: [jsx("p", { className: "p-4 pr-8 h-[56px] overflow-hidden text-ellipsis whitespace-nowrap", children: selectedItem?.text || placeholder }), jsx(Icon, { name: "ArrowUpIcon", width: "16", height: "16", className: `absolute right-3 ${isOpen ? '' : 'rotate-180'}` })] }), options?.length ? (jsx("div", { className: `h-0 ${renderOptionsStyle(isOpen)}`, children: jsx("div", { className: `bg-white text-l max-h-[256px] overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]`, children: options.map(renderOption(choiceOption, isOpen, isSelected)) }) })) : null] })] }));
|
|
1495
1496
|
});
|
|
1496
1497
|
const renderOptionsStyle = (isOpen) => (isOpen ? '' : 'overflow-hidden');
|
|
@@ -2788,7 +2789,7 @@
|
|
|
2788
2789
|
const { text, href, target, onClick } = button;
|
|
2789
2790
|
const iconVersion = version === 'primary' ? 'white' : 'black';
|
|
2790
2791
|
const backwardIcon = button?.icon || { icon: 'ArrowLeftIcon' };
|
|
2791
|
-
return (jsxs("div", { className: `flex items-center cursor-pointer ${className}`, onClick: onClick, children: [jsx(Button, { version: version, rounded: true, className: "w-12 h-12 min-h-12 min-w-12 flex items-center justify-center mr-3", ariaLabel: text, href: href, target: target, children: jsx(ImgInner, { className: "w-4 h-4", image: { ...backwardIcon, iconVersion }, asSVG: true }) }), text ? jsx("span", { className: "text-m", children: text }) : null] }));
|
|
2792
|
+
return (jsxs("div", { className: `flex items-center cursor-pointer ${className}`, onClick: onClick, children: [jsx(Button, { version: version, rounded: true, className: "w-12 h-12 min-h-12 min-w-12 flex items-center justify-center mr-3", ariaLabel: text, href: href, target: target, children: jsx(ImgInner, { className: "w-4 h-4", image: { ...backwardIcon, iconVersion: backwardIcon.iconVersion || iconVersion }, asSVG: true }) }), text ? jsx("span", { className: "text-m", children: text }) : null] }));
|
|
2792
2793
|
}
|
|
2793
2794
|
|
|
2794
2795
|
const breadcrumbsStyleMap = {
|
|
@@ -2953,7 +2954,7 @@
|
|
|
2953
2954
|
return (jsxs("div", { className: "flex justify-between gap-4 mb-6", children: [jsx("div", { className: "max-w-[396px] w-1/2", children: jsx(WrapperSelect, { data: regions, fieldValue: "code", fieldLabel: "name", selected: selectedRegion, setSelected: onSelectedRegion, label: "\u0420\u0435\u0433\u0438\u043E\u043D" }) }), jsx("div", { className: "max-w-[396px] w-1/2", children: jsx(WrapperSelect, { data: branches, fieldValue: "branchCode", fieldLabel: "address", selected: selectedBranch, setSelected: onSelectedBranch, label: "\u041E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435" }) })] }));
|
|
2954
2955
|
});
|
|
2955
2956
|
|
|
2956
|
-
const Radio = JSX(({ name, text, value, checked, onChange, className }) => (jsx("div", { className: className, children: jsxs("label", { className: "flex items-center relative cursor-pointer", children: [jsx("input", { className: "appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-checkbox-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer", type: "radio", value: value, name: name, checked: checked, onChange: onChange }), text ? jsx("span", { className: "
|
|
2957
|
+
const Radio = JSX(({ name, text, value, checked, onChange, className }) => (jsx("div", { className: className, children: jsxs("label", { className: "font-sans flex items-center relative cursor-pointer", children: [jsx("input", { className: "appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-checkbox-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer", type: "radio", value: value, name: name, checked: checked, onChange: onChange }), text ? jsx("span", { className: "text-primary-text ml-3 cursor-pointer", children: text }) : null] }) })));
|
|
2957
2958
|
|
|
2958
2959
|
const RenderRadioButtons = JSX(() => {
|
|
2959
2960
|
const [selectedOption, setSelectedOption] = useState('option2');
|
|
@@ -3062,29 +3063,31 @@
|
|
|
3062
3063
|
setShowMap(!showMap);
|
|
3063
3064
|
};
|
|
3064
3065
|
const points = getCoordinates(getBranch(branches, safeDepositState.selectedBranch) || branches);
|
|
3065
|
-
return (jsxs(BlockWrapper, { context: context, className: className, ...rest, children: [jsxs("div", { className: "font-sans bg-white px-8 py-12", children: [title ? (jsx(Heading, { title: title, headingType: "h3", as: "h2", className: "mb-2.5 text-center" })) : null, jsx(SafeDepositRentalForm, { regions: regions, branches: branches, data: { ...safeDepositState, selectedRegion }, onShowMapToggle: onShowMapToggle, onChange: handleChangeSafeDepositState }), footnote ? jsx("p", { className: "text-s-light text-secondary-text", children: footnote }) : null] }), points.length && showMap ? jsx(YandexMap, { points: points, className: "h-[640px]" }) : null] }));
|
|
3066
|
+
return (jsxs(BlockWrapper, { context: context, className: className, ...rest, children: [jsxs("div", { className: "font-sans bg-white px-8 py-12", children: [title ? (jsx(Heading, { title: title, headingType: "h3", as: "h2", className: "text-primary-text mb-2.5 text-center" })) : null, jsx(SafeDepositRentalForm, { regions: regions, branches: branches, data: { ...safeDepositState, selectedRegion }, onShowMapToggle: onShowMapToggle, onChange: handleChangeSafeDepositState }), footnote ? jsx("p", { className: "text-s-light text-secondary-text", children: footnote }) : null] }), points.length && showMap ? jsx(YandexMap, { points: points, className: "h-[640px]" }) : null] }));
|
|
3066
3067
|
});
|
|
3067
3068
|
const normalizeSelectedRegion = (selectedRegion, regions) => !selectedRegion && regions?.length && regions[0]?.code ? regions[0].code : selectedRegion;
|
|
3068
3069
|
|
|
3069
3070
|
const checkIsIconRenderable = (icon) => Boolean(icon?.icon || icon?.src);
|
|
3070
3071
|
|
|
3071
|
-
const renderItems = ({ items, isDotted = true, version = 'primary', className = '', }) => {
|
|
3072
|
-
const listVersion = version === 'primary' ? 'gray' : version;
|
|
3073
|
-
return items ? (jsx(List, { className: `mt-4 ${className}`, version: listVersion, items: items, listItemSize: "S", isDotted: isDotted })) : null;
|
|
3074
|
-
};
|
|
3072
|
+
const renderItems = ({ items, isDotted = true, version = 'primary', className = '', }) => items ? (jsx(List, { className: className, version: version, items: items, listItemSize: "M", isDotted: isDotted })) : null;
|
|
3075
3073
|
|
|
3076
3074
|
const renderStepContent = ({ styleMap, isMainButton, version, router, handlerDecorator, }) => (step, i, { length }) => {
|
|
3077
3075
|
const { label, description, button, items, isDotted } = step;
|
|
3078
|
-
const
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3076
|
+
const contentMarginClass = label && (description || items) ? 'mt-2' : '';
|
|
3077
|
+
return (jsxs("div", { className: `relative flex flex-col items-center text-center whitespace-pre-line overflow-hidden ${getContainerWidth(length)}`, children: [jsxs("div", { className: `${button?.text ? 'mb-8' : ''} text-center`, children: [renderStepLabel(label), jsxs("div", { className: `${contentMarginClass} flex flex-col items-center`, children: [renderStepDescription({
|
|
3078
|
+
description,
|
|
3079
|
+
className: styleMap.description,
|
|
3080
|
+
}), renderItems({
|
|
3081
|
+
items,
|
|
3082
|
+
isDotted,
|
|
3083
|
+
version,
|
|
3084
|
+
className: getItemsClasses({ className: 'text-left', description, styleMap }),
|
|
3085
|
+
})] })] }), button?.text && !isMainButton ? (jsx(Button, { className: "box-border py-3 h-12 w-full max-w-[240px] mt-auto", ...useLink({ router, handlerDecorator }, button), version: version, children: button?.text })) : null] }, String(i)));
|
|
3086
|
+
};
|
|
3087
|
+
const renderStepLabel = (label) => label ? jsx("div", { className: "text-h6", children: label }) : null;
|
|
3087
3088
|
const renderStepDescription = ({ description, className = '', }) => (description ? jsx("div", { className: className, children: description }) : null);
|
|
3089
|
+
const getItemsClasses = ({ className, description, styleMap, }) => [description ? styleMap.description : 'text-h6', description ? 'mt-0.5' : '', className].join(' ');
|
|
3090
|
+
const getContainerWidth = (length) => (length < 5 ? 'w-[276px]' : 'w-[210px]');
|
|
3088
3091
|
|
|
3089
3092
|
const STEPS_BLOCK_STYLE_MAPS = {
|
|
3090
3093
|
primary: {
|
|
@@ -3119,13 +3122,13 @@
|
|
|
3119
3122
|
const titleMargin = title ? 'mt-9' : '';
|
|
3120
3123
|
const paddingX = getPaddingX(steps.length);
|
|
3121
3124
|
return (jsxs(BlockWrapper, { className: [
|
|
3122
|
-
'box-border font-sans
|
|
3125
|
+
'box-border py-[50px] font-sans',
|
|
3123
3126
|
shortGaps ? 'px-20' : 'px-[70px]',
|
|
3124
|
-
'
|
|
3127
|
+
'flex flex-col items-center',
|
|
3125
3128
|
styleMap.background,
|
|
3126
3129
|
styleMap.title,
|
|
3127
3130
|
className,
|
|
3128
|
-
].join(' '), context: context, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", className: "max-w-[752px] text-center", title: title })) : null, steps?.length ? (jsxs("div", { className: `box-border ${titleMargin}`, children: [jsx("div", { className: `flex items-center ${paddingX}`, children: joinList(jsx("div", { className: `h-0.5 w-full bg-secondary-light ${lineOpacity}` }))(steps.map(renderStepIcon(styleMap))) }), jsx("div", { className: `flex justify-between ${shortGaps ? 'gap-x-3' : 'gap-x-[101px]'}`, children: steps.map(renderStepContent({
|
|
3131
|
+
].join(' '), context: context, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", className: "max-w-[752px] text-center", title: title })) : null, steps?.length ? (jsxs("div", { className: `box-border ${titleMargin}`, children: [jsx("div", { className: `flex items-center ${paddingX}`, children: joinList(jsx("div", { className: `h-0.5 w-full bg-secondary-light ${lineOpacity}` }))(steps.map(renderStepIcon(styleMap))) }), jsx("div", { className: `flex justify-between mt-4 ${shortGaps ? 'gap-x-3' : 'gap-x-[101px]'}`, children: steps.map(renderStepContent({
|
|
3129
3132
|
styleMap,
|
|
3130
3133
|
isMainButton: Boolean(button?.text),
|
|
3131
3134
|
version,
|
|
@@ -3232,11 +3235,8 @@
|
|
|
3232
3235
|
const COLS_LENGTH_FOR_SCROLL = 2;
|
|
3233
3236
|
const COLUMN_WIDTH$1 = 4 * 80 + 40; // w-80 + pl-10 = 360px
|
|
3234
3237
|
|
|
3235
|
-
const TableInnerButton = JSX(({ isOpen,
|
|
3236
|
-
|
|
3237
|
-
EventBus.inst.fire('tariffInnerTable', { dataUrl, pdfUrl, rowIdx, cellIdx, fieldIdx });
|
|
3238
|
-
};
|
|
3239
|
-
return (jsxs(Button, { version: "primary", onClick: handleClick, className: "w-full flex items-center justify-center rounded-none py-5", children: [jsx("div", { className: "text-h4", children: isOpen ? 'Скрыть' : 'Показать ставки по вкладу' }), jsx(Icon, { name: isOpen ? 'ArrowUpIcon' : 'ArrowDownIcon', className: "ml-3", iconVersion: "white", width: "20", height: "20", asSVG: true })] }));
|
|
3238
|
+
const TableInnerButton = JSX(({ isOpen, onClick }) => {
|
|
3239
|
+
return (jsxs(Button, { version: "primary", onClick: onClick, className: "w-full flex items-center justify-center rounded-none py-5", children: [jsx("div", { className: "text-h4", children: isOpen ? 'Скрыть' : 'Показать ставки по вкладу' }), jsx(Icon, { name: isOpen ? 'ArrowUpIcon' : 'ArrowDownIcon', className: "ml-3", iconVersion: "white", width: "20", height: "20", asSVG: true })] }));
|
|
3240
3240
|
});
|
|
3241
3241
|
|
|
3242
3242
|
const renderButtonsCellData = ({ buttons }) => buttons && buttons?.length ? (jsx("div", { children: buttons.map(({ rounded, ...buttonProps }, idx) => renderButton({
|
|
@@ -3249,15 +3249,10 @@
|
|
|
3249
3249
|
};
|
|
3250
3250
|
const renderImgCellData = ({ image }) => (image?.src ? jsx(ImgInner, { image: image }) : null);
|
|
3251
3251
|
const renderListCellData = ({ isDotted, ...rest }) => (jsx(List, { className: "flex flex-col justify-between items-start text-h6", version: "primary", isDotted: isDotted ?? true, ...rest }));
|
|
3252
|
-
const renderTableCellData = JSX((
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
const _showBtn = ['rowIdx', 'cellIdx', 'fieldIdx'].every((key) => props[key] === event[key]);
|
|
3257
|
-
setShowBtn(!_showBtn);
|
|
3258
|
-
};
|
|
3259
|
-
useEffect(() => EventBus.inst.subscribe('tariffInnerTable', tariffInnerTableSubscriber), []);
|
|
3260
|
-
return showBtn ? jsx(TableInnerButton, { ...props }) : null;
|
|
3252
|
+
const renderTableCellData = JSX(({ isVisible, displayTable, dataUrl, pdfUrl, isOpen, context }) => {
|
|
3253
|
+
return isVisible ? (jsx(TableInnerButton, { isOpen: isOpen, context: context, onClick: () => {
|
|
3254
|
+
displayTable({ dataUrl, pdfUrl });
|
|
3255
|
+
} })) : null;
|
|
3261
3256
|
});
|
|
3262
3257
|
const EmbeddableCellData = {
|
|
3263
3258
|
Buttons: renderButtonsCellData,
|
|
@@ -3267,14 +3262,31 @@
|
|
|
3267
3262
|
Table: renderTableCellData,
|
|
3268
3263
|
};
|
|
3269
3264
|
|
|
3270
|
-
const
|
|
3271
|
-
const
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3265
|
+
const renderCellInner = ({ rowIdx, context, cellIdx, setTableInner, tableInner, openTableInnerIdx, setOpenTableInnerIdx, }) => (cell, i) => {
|
|
3266
|
+
const [isVisible, setVisibility] = useState(true);
|
|
3267
|
+
useEffect(() => {
|
|
3268
|
+
if (cellIdx !== openTableInnerIdx || !tableInner) {
|
|
3269
|
+
setVisibility(true);
|
|
3270
|
+
}
|
|
3271
|
+
}, [tableInner, openTableInnerIdx]);
|
|
3272
|
+
const displayTable = (props) => {
|
|
3273
|
+
setVisibility(false);
|
|
3274
|
+
setOpenTableInnerIdx(cellIdx);
|
|
3275
|
+
setTableInner(props);
|
|
3276
|
+
};
|
|
3277
|
+
return (jsxs("div", { className: cell?.tableCellType === 'Table' ? 'ml-10' : `first:pt-5 last:pb-5 pl-10`, children: [i > 0 ? jsx("div", { className: "h-5" }) : null, renderCell({
|
|
3278
|
+
cell,
|
|
3279
|
+
cellProps: {
|
|
3280
|
+
rowIdx,
|
|
3281
|
+
cellIdx,
|
|
3282
|
+
fieldIdx: i,
|
|
3283
|
+
displayTable,
|
|
3284
|
+
isVisible,
|
|
3285
|
+
context,
|
|
3286
|
+
},
|
|
3287
|
+
})] }, String(i)));
|
|
3276
3288
|
};
|
|
3277
|
-
const renderCell = (cell,
|
|
3289
|
+
const renderCell = ({ cell, cellProps }) => {
|
|
3278
3290
|
if (!cell) {
|
|
3279
3291
|
return null;
|
|
3280
3292
|
}
|
|
@@ -3283,9 +3295,23 @@
|
|
|
3283
3295
|
return null;
|
|
3284
3296
|
}
|
|
3285
3297
|
const EmbeddableCellInner = EmbeddableCellData[type];
|
|
3286
|
-
return jsx(EmbeddableCellInner, {
|
|
3298
|
+
return jsx(EmbeddableCellInner, { ...cellProps, ...rest });
|
|
3287
3299
|
};
|
|
3288
3300
|
|
|
3301
|
+
const TariffsTableCell = JSX(({ context, cells, rowIdx, cellIdx, setTableInner, tableInner, openTableInnerIdx, setOpenTableInnerIdx, }) => {
|
|
3302
|
+
return (jsx("div", { className: "first:pl-0 w-80 flex-grow flex flex-col border-solid border-main-divider border border-t-0 border-x-0", role: "cell", children: cells?.length
|
|
3303
|
+
? cells.map(renderCellInner({
|
|
3304
|
+
rowIdx,
|
|
3305
|
+
context,
|
|
3306
|
+
cellIdx,
|
|
3307
|
+
setTableInner,
|
|
3308
|
+
tableInner,
|
|
3309
|
+
openTableInnerIdx,
|
|
3310
|
+
setOpenTableInnerIdx,
|
|
3311
|
+
}))
|
|
3312
|
+
: null }));
|
|
3313
|
+
});
|
|
3314
|
+
|
|
3289
3315
|
function useTariffsInnerTableData(directoryName) {
|
|
3290
3316
|
const { data } = useAsyncData(tariffsInnerTableDataUrl(directoryName), fetchTariffsInnerTableData);
|
|
3291
3317
|
return data || {};
|
|
@@ -3342,24 +3368,24 @@
|
|
|
3342
3368
|
|
|
3343
3369
|
const InnerTableHeader = JSX(({ currencies, linkToPDF, activeTabIndex, setActiveTabIndex }) => (jsxs("div", { className: "flex justify-between w-full pt-2.5 pb-3", children: [currencies && currencies.length > 1 ? (jsx("div", { className: "flex bg-secondary-light p-1.5 rounded-md", children: currencies.map((currency, idx) => (jsx("div", { className: `rounded-md text-xl-light px-4 py-3 cursor-pointer ${idx === activeTabIndex ? 'bg-primary-main text-white' : 'text-secondary-text'}`, onClick: () => setActiveTabIndex(idx), children: currency || idx + 1 }, currency))) })) : null, linkToPDF ? (jsxs(Button, { href: linkToPDF, version: "secondary", className: "flex justify-center items-center text-l-light text-primary-main px-8 max-h-14", target: "_blank", children: [jsx(ImgInner, { image: "DocDownloadIcon", className: "mr-2.5", width: "20", height: "20", asSVG: true }), jsx("span", { children: "\u0421\u043A\u0430\u0447\u0430\u0442\u044C \u0432 PDF" })] })) : null] })));
|
|
3344
3370
|
|
|
3345
|
-
const
|
|
3371
|
+
const EMPTY_DATA = 'Данных нет';
|
|
3372
|
+
const InnerTable = JSX(({ context, dataUrl, pdfUrl, onClick }) => {
|
|
3346
3373
|
const { tableData } = useTariffsInnerTableData(dataUrl);
|
|
3347
3374
|
const [activeTabIndex, setActiveTabIndex] = useState(0);
|
|
3348
3375
|
const items = tableData?.[activeTabIndex]?.items ?? [];
|
|
3349
3376
|
const currencies = tableData?.map((item) => item.currency ?? '');
|
|
3350
|
-
return tableData ? (jsxs("div", { className: "bg-white z-10", children: [jsx(InnerTableHeader, { currencies: currencies, activeTabIndex: activeTabIndex, setActiveTabIndex: setActiveTabIndex, linkToPDF: pdfUrl }), jsx(InnerTableBody, { context: context, activeTabIndex: activeTabIndex, items: items }), jsx(TableInnerButton, { context: context, isOpen: true })] })) :
|
|
3377
|
+
return tableData ? (jsxs("div", { className: "bg-white z-10", children: [jsx(InnerTableHeader, { currencies: currencies, activeTabIndex: activeTabIndex, setActiveTabIndex: setActiveTabIndex, linkToPDF: pdfUrl }), jsx(InnerTableBody, { context: context, activeTabIndex: activeTabIndex, items: items }), jsx(TableInnerButton, { context: context, onClick: onClick, isOpen: true })] })) : (jsxs("div", { className: "my-5 text-h6 text-center", children: [jsx("p", { children: EMPTY_DATA }), jsx(TableInnerButton, { context: context, onClick: onClick, isOpen: true })] }));
|
|
3351
3378
|
});
|
|
3352
3379
|
|
|
3353
|
-
const TariffsTableRowContainer = JSX(({ context, children,
|
|
3354
|
-
|
|
3355
|
-
useEffect(() => EventBus.inst.subscribe('tariffInnerTable', (event) => {
|
|
3356
|
-
setTableInnerData(rowIdx === event.rowIdx ? { dataUrl: event.dataUrl, pdfUrl: event.pdfUrl } : undefined);
|
|
3357
|
-
}), [rowIdx]);
|
|
3358
|
-
return (jsxs("div", { className: "self-start flex flex-col", role: "row", children: [jsx("div", { className: "flex", children: children }), tableInnerData ? (jsx("div", { className: "origin-top animate-expansion", children: jsx(InnerTable, { context: context, ...tableInnerData }) })) : null] }));
|
|
3380
|
+
const TariffsTableRowContainer = JSX(({ context, children, tableInner, onHideContentClick }) => {
|
|
3381
|
+
return (jsxs("div", { className: "self-start flex flex-col", role: "row", children: [jsx("div", { className: "flex", children: children }), tableInner ? (jsx("div", { className: "origin-top animate-expansion", children: jsx(InnerTable, { context: context, ...tableInner, onClick: onHideContentClick }) })) : null] }));
|
|
3359
3382
|
});
|
|
3360
3383
|
|
|
3361
|
-
const TariffsTableRow = JSX(({ row: { header, data }, activeCardIndex,
|
|
3362
|
-
|
|
3384
|
+
const TariffsTableRow = JSX(({ row: { header, data }, activeCardIndex, context, rowIdx }) => {
|
|
3385
|
+
const [tableInner, setTableInner] = useState(undefined);
|
|
3386
|
+
const [openTableInnerIdx, setOpenTableInnerIdx] = useState(undefined);
|
|
3387
|
+
const onHideContentClick = () => setTableInner(undefined);
|
|
3388
|
+
return (jsxs(TariffsTableRowContainer, { context: context, onHideContentClick: onHideContentClick, tableInner: tableInner, children: [jsx("div", { className: `text-s py-5 ${FIRST_CELL_CLASSES} ${DIVIDER_CLASSES}`, children: jsxs("div", { className: "flex items-center text-primary-text", role: "cell", children: [header?.icon ? (jsx(ImgInner, { className: "mr-[14px] max-w-6 max-h-6", image: header.icon, width: "24px", height: "24px", asSVG: true })) : null, header?.title ? jsx("div", { className: "text-m-light", children: header?.title }) : null] }) }), data?.length ? (jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH$1, version: "tariff", children: data.map((cells, i) => (jsx(TariffsTableCell, { cells: cells, rowIdx: rowIdx, cellIdx: i, context: context, setTableInner: setTableInner, tableInner: tableInner, openTableInnerIdx: openTableInnerIdx, setOpenTableInnerIdx: setOpenTableInnerIdx }, String(i)))) })) : null] }));
|
|
3363
3389
|
});
|
|
3364
3390
|
|
|
3365
3391
|
const TariffsTable = JSX(({ className = '', context, title, description, rowHeaders, tariffsColumns: columns, hiddenRowsNum = 0, ...rest }) => {
|
|
@@ -3376,7 +3402,7 @@
|
|
|
3376
3402
|
activeCardIndex,
|
|
3377
3403
|
setActiveCardIndex,
|
|
3378
3404
|
});
|
|
3379
|
-
const rows = (rowData || []).map((row, i
|
|
3405
|
+
const rows = (rowData || []).map((row, i) => (jsx(TariffsTableRow, { context: context, row: row, activeCardIndex: activeCardIndex, rowIdx: i }, String(i))));
|
|
3380
3406
|
const [visibleRows, hiddenRows] = hiddenRowsNum > 0 ? [rows.slice(0, -hiddenRowsNum), rows.slice(-hiddenRowsNum)] : [rows, []];
|
|
3381
3407
|
return (jsxs(BlockWrapper, { className: `bg-white font-sans p-[50px] overflow-hidden text-primary-text relative ${columnsLength > 1 ? 'pr-0' : ''} ${className}`, context: context, ...rest, children: [renderTitle({ title, description }), renderDescription(description), hiddenRowsNum > 0 ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs(Wrapper, { tableArrowScrollControlProps: tableArrowScrollControlProps, children: [visibleRows, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenRows })] })), renderFoldButton: renderDefaultFoldButton })) : (jsx(Wrapper, { tableArrowScrollControlProps: tableArrowScrollControlProps, children: rows }))] }));
|
|
3382
3408
|
});
|
|
@@ -3565,7 +3591,7 @@
|
|
|
3565
3591
|
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto", context: context }, "LikeControl") }));
|
|
3566
3592
|
}
|
|
3567
3593
|
|
|
3568
|
-
const packageVersion = "0.6.
|
|
3594
|
+
const packageVersion = "0.6.19";
|
|
3569
3595
|
|
|
3570
3596
|
exports.Blocks = Blocks;
|
|
3571
3597
|
exports.ContentPage = ContentPage;
|