@redneckz/wildless-cms-uni-blocks 0.14.742 → 0.14.743
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/bundle.umd.js +109 -153
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/OfficesAtmsMap/{renderFiltrationForm.d.ts → FiltrationForm.d.ts} +2 -2
- package/bundle/components/OfficesAtmsMap/FoldableCardContent.d.ts +1 -0
- package/bundle/components/OfficesAtmsMap/renderOfficeCard.d.ts +1 -1
- package/bundle/ui-kit/BaseFiltration/GridBlocks.d.ts +8 -0
- package/bundle/ui-kit/Button/IconButton.d.ts +10 -0
- package/bundle/ui-kit/Foldable/Foldable.d.ts +0 -6
- package/bundle/utils/capitalize.d.ts +1 -0
- package/bundle/utils/dataAttributes.d.ts +2 -2
- package/dist/components/ApplicationLeadForm/GroupedConsents.js +6 -7
- package/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +6 -5
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/{lib/components/OfficesAtmsMap/renderFiltrationForm.d.ts → dist/components/OfficesAtmsMap/FiltrationForm.d.ts} +2 -2
- package/dist/components/OfficesAtmsMap/FiltrationForm.js +24 -0
- package/dist/components/OfficesAtmsMap/FiltrationForm.js.map +1 -0
- package/dist/components/OfficesAtmsMap/FoldableCardContent.d.ts +1 -0
- package/dist/components/OfficesAtmsMap/FoldableCardContent.js +13 -0
- package/dist/components/OfficesAtmsMap/FoldableCardContent.js.map +1 -0
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -8
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/dist/components/OfficesAtmsMap/renderAtmCard.js +6 -12
- package/dist/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
- package/dist/components/OfficesAtmsMap/renderFoldButton.js +2 -4
- package/dist/components/OfficesAtmsMap/renderFoldButton.js.map +1 -1
- package/dist/components/OfficesAtmsMap/renderOfficeCard.d.ts +1 -1
- package/dist/components/OfficesAtmsMap/renderOfficeCard.js +5 -29
- package/dist/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
- package/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +3 -11
- package/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -1
- package/dist/components/RollupItem/RollupItem.js +17 -13
- package/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTable.js +3 -1
- package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/dist/ui-kit/BaseFiltration/FilteredBlocks.js +2 -2
- package/dist/ui-kit/BaseFiltration/FilteredBlocks.js.map +1 -1
- package/dist/ui-kit/BaseFiltration/GridBlocks.d.ts +8 -0
- package/dist/ui-kit/BaseFiltration/{renderGridBlocks.js → GridBlocks.js} +8 -7
- package/dist/ui-kit/BaseFiltration/GridBlocks.js.map +1 -0
- package/dist/ui-kit/Button/IconButton.d.ts +10 -0
- package/dist/ui-kit/Button/IconButton.js +13 -0
- package/dist/ui-kit/Button/IconButton.js.map +1 -0
- package/dist/ui-kit/Foldable/DefaultFoldButton.js +1 -5
- package/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/dist/ui-kit/Foldable/Foldable.d.ts +0 -6
- package/dist/ui-kit/Foldable/Foldable.js +3 -10
- package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/dist/utils/capitalize.d.ts +1 -0
- package/dist/utils/capitalize.js +5 -0
- package/dist/utils/capitalize.js.map +1 -0
- package/dist/utils/dataAttributes.d.ts +2 -2
- package/dist/utils/dataAttributes.js +1 -6
- package/dist/utils/dataAttributes.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationLeadForm/GroupedConsents.js +7 -8
- package/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +6 -5
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/{dist/components/OfficesAtmsMap/renderFiltrationForm.d.ts → lib/components/OfficesAtmsMap/FiltrationForm.d.ts} +2 -2
- package/lib/components/OfficesAtmsMap/FiltrationForm.js +21 -0
- package/lib/components/OfficesAtmsMap/FiltrationForm.js.map +1 -0
- package/lib/components/OfficesAtmsMap/FoldableCardContent.d.ts +1 -0
- package/lib/components/OfficesAtmsMap/FoldableCardContent.js +11 -0
- package/lib/components/OfficesAtmsMap/FoldableCardContent.js.map +1 -0
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -8
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/lib/components/OfficesAtmsMap/renderAtmCard.js +6 -12
- package/lib/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
- package/lib/components/OfficesAtmsMap/renderFoldButton.js +3 -5
- package/lib/components/OfficesAtmsMap/renderFoldButton.js.map +1 -1
- package/lib/components/OfficesAtmsMap/renderOfficeCard.d.ts +1 -1
- package/lib/components/OfficesAtmsMap/renderOfficeCard.js +5 -29
- package/lib/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
- package/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +3 -11
- package/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -1
- package/lib/components/RollupItem/RollupItem.js +18 -14
- package/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTable.js +3 -1
- package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/lib/ui-kit/BaseFiltration/FilteredBlocks.js +3 -3
- package/lib/ui-kit/BaseFiltration/FilteredBlocks.js.map +1 -1
- package/lib/ui-kit/BaseFiltration/GridBlocks.d.ts +8 -0
- package/{mobile/lib/ui-kit/BaseFiltration/renderGridBlocks.js → lib/ui-kit/BaseFiltration/GridBlocks.js} +7 -5
- package/lib/ui-kit/BaseFiltration/GridBlocks.js.map +1 -0
- package/lib/ui-kit/Button/IconButton.d.ts +10 -0
- package/lib/ui-kit/Button/IconButton.js +11 -0
- package/lib/ui-kit/Button/IconButton.js.map +1 -0
- package/lib/ui-kit/Foldable/DefaultFoldButton.js +1 -5
- package/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/lib/ui-kit/Foldable/Foldable.d.ts +0 -6
- package/lib/ui-kit/Foldable/Foldable.js +4 -11
- package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/lib/utils/capitalize.d.ts +1 -0
- package/lib/utils/capitalize.js +2 -0
- package/lib/utils/capitalize.js.map +1 -0
- package/lib/utils/dataAttributes.d.ts +2 -2
- package/lib/utils/dataAttributes.js +1 -6
- package/lib/utils/dataAttributes.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +109 -153
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/OfficesAtmsMap/{renderFiltrationForm.d.ts → FiltrationForm.d.ts} +2 -2
- package/mobile/bundle/components/OfficesAtmsMap/FoldableCardContent.d.ts +1 -0
- package/mobile/bundle/components/OfficesAtmsMap/renderOfficeCard.d.ts +1 -1
- package/mobile/bundle/ui-kit/BaseFiltration/GridBlocks.d.ts +8 -0
- package/mobile/bundle/ui-kit/Button/IconButton.d.ts +10 -0
- package/mobile/bundle/ui-kit/Foldable/Foldable.d.ts +0 -6
- package/mobile/bundle/utils/capitalize.d.ts +1 -0
- package/mobile/bundle/utils/dataAttributes.d.ts +2 -2
- package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js +6 -7
- package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +6 -5
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/FiltrationForm.d.ts +13 -0
- package/mobile/dist/components/OfficesAtmsMap/FiltrationForm.js +24 -0
- package/mobile/dist/components/OfficesAtmsMap/FiltrationForm.js.map +1 -0
- package/mobile/dist/components/OfficesAtmsMap/FoldableCardContent.d.ts +1 -0
- package/mobile/dist/components/OfficesAtmsMap/FoldableCardContent.js +13 -0
- package/mobile/dist/components/OfficesAtmsMap/FoldableCardContent.js.map +1 -0
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -8
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderAtmCard.js +6 -12
- package/mobile/dist/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderFoldButton.js +2 -4
- package/mobile/dist/components/OfficesAtmsMap/renderFoldButton.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderOfficeCard.d.ts +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderOfficeCard.js +5 -29
- package/mobile/dist/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +3 -11
- package/mobile/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -1
- package/mobile/dist/components/RollupItem/RollupItem.js +17 -13
- package/mobile/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTable.js +3 -1
- package/mobile/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/FilteredBlocks.js +2 -2
- package/mobile/dist/ui-kit/BaseFiltration/FilteredBlocks.js.map +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/GridBlocks.d.ts +8 -0
- package/mobile/dist/ui-kit/BaseFiltration/{renderGridBlocks.js → GridBlocks.js} +8 -7
- package/mobile/dist/ui-kit/BaseFiltration/GridBlocks.js.map +1 -0
- package/mobile/dist/ui-kit/Button/IconButton.d.ts +10 -0
- package/mobile/dist/ui-kit/Button/IconButton.js +13 -0
- package/mobile/dist/ui-kit/Button/IconButton.js.map +1 -0
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js +1 -5
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.d.ts +0 -6
- package/mobile/dist/ui-kit/Foldable/Foldable.js +3 -10
- package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/dist/utils/capitalize.d.ts +1 -0
- package/mobile/dist/utils/capitalize.js +5 -0
- package/mobile/dist/utils/capitalize.js.map +1 -0
- package/mobile/dist/utils/dataAttributes.d.ts +2 -2
- package/mobile/dist/utils/dataAttributes.js +1 -6
- package/mobile/dist/utils/dataAttributes.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js +7 -8
- package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +6 -5
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/FiltrationForm.d.ts +13 -0
- package/mobile/lib/components/OfficesAtmsMap/FiltrationForm.js +21 -0
- package/mobile/lib/components/OfficesAtmsMap/FiltrationForm.js.map +1 -0
- package/mobile/lib/components/OfficesAtmsMap/FoldableCardContent.d.ts +1 -0
- package/mobile/lib/components/OfficesAtmsMap/FoldableCardContent.js +11 -0
- package/mobile/lib/components/OfficesAtmsMap/FoldableCardContent.js.map +1 -0
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -8
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderAtmCard.js +6 -12
- package/mobile/lib/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderFoldButton.js +3 -5
- package/mobile/lib/components/OfficesAtmsMap/renderFoldButton.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderOfficeCard.d.ts +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderOfficeCard.js +5 -29
- package/mobile/lib/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +3 -11
- package/mobile/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -1
- package/mobile/lib/components/RollupItem/RollupItem.js +18 -14
- package/mobile/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTable.js +3 -1
- package/mobile/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/FilteredBlocks.js +3 -3
- package/mobile/lib/ui-kit/BaseFiltration/FilteredBlocks.js.map +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/GridBlocks.d.ts +8 -0
- package/{lib/ui-kit/BaseFiltration/renderGridBlocks.js → mobile/lib/ui-kit/BaseFiltration/GridBlocks.js} +7 -5
- package/mobile/lib/ui-kit/BaseFiltration/GridBlocks.js.map +1 -0
- package/mobile/lib/ui-kit/Button/IconButton.d.ts +10 -0
- package/mobile/lib/ui-kit/Button/IconButton.js +11 -0
- package/mobile/lib/ui-kit/Button/IconButton.js.map +1 -0
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js +1 -5
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.d.ts +0 -6
- package/mobile/lib/ui-kit/Foldable/Foldable.js +4 -11
- package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/lib/utils/capitalize.d.ts +1 -0
- package/mobile/lib/utils/capitalize.js +2 -0
- package/mobile/lib/utils/capitalize.js.map +1 -0
- package/mobile/lib/utils/dataAttributes.d.ts +2 -2
- package/mobile/lib/utils/dataAttributes.js +1 -6
- package/mobile/lib/utils/dataAttributes.js.map +1 -1
- package/mobile/src/components/ApplicationLeadForm/GroupedConsents.tsx +26 -44
- package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +21 -36
- package/mobile/src/components/OfficesAtmsMap/FiltrationForm.tsx +79 -0
- package/mobile/src/components/OfficesAtmsMap/FoldableCardContent.tsx +16 -0
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +7 -9
- package/mobile/src/components/OfficesAtmsMap/renderAtmCard.tsx +12 -27
- package/mobile/src/components/OfficesAtmsMap/renderFoldButton.tsx +6 -12
- package/mobile/src/components/OfficesAtmsMap/renderOfficeCard.tsx +9 -56
- package/mobile/src/components/OfficesAtmsMap/renderRemoteWorkplaceCard.tsx +4 -21
- package/mobile/src/components/RollupItem/RollupItem.tsx +29 -27
- package/mobile/src/components/TariffsTable/TariffsTable.tsx +10 -9
- package/mobile/src/ui-kit/BaseFiltration/FilteredBlocks.tsx +2 -2
- package/mobile/src/ui-kit/BaseFiltration/{renderGridBlocks.tsx → GridBlocks.tsx} +29 -32
- package/mobile/src/ui-kit/Button/IconButton.tsx +36 -0
- package/mobile/src/ui-kit/Foldable/DefaultFoldButton.tsx +7 -12
- package/mobile/src/ui-kit/Foldable/Foldable.tsx +7 -37
- package/mobile/src/utils/capitalize.ts +2 -0
- package/mobile/src/utils/dataAttributes.ts +1 -7
- package/package.json +1 -1
- package/src/components/ApplicationLeadForm/GroupedConsents.tsx +26 -44
- package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +21 -36
- package/src/components/OfficesAtmsMap/FiltrationForm.tsx +79 -0
- package/src/components/OfficesAtmsMap/FoldableCardContent.tsx +16 -0
- package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +7 -9
- package/src/components/OfficesAtmsMap/renderAtmCard.tsx +12 -27
- package/src/components/OfficesAtmsMap/renderFoldButton.tsx +6 -12
- package/src/components/OfficesAtmsMap/renderOfficeCard.tsx +9 -56
- package/src/components/OfficesAtmsMap/renderRemoteWorkplaceCard.tsx +4 -21
- package/src/components/RollupItem/RollupItem.tsx +29 -27
- package/src/components/TariffsTable/TariffsTable.tsx +10 -9
- package/src/icons/IconName.ts +4 -4
- package/src/ui-kit/BaseFiltration/FilteredBlocks.tsx +2 -2
- package/src/ui-kit/BaseFiltration/{renderGridBlocks.tsx → GridBlocks.tsx} +29 -32
- package/src/ui-kit/Button/IconButton.tsx +36 -0
- package/src/ui-kit/Foldable/DefaultFoldButton.tsx +7 -12
- package/src/ui-kit/Foldable/Foldable.tsx +7 -37
- package/src/utils/capitalize.ts +2 -0
- package/src/utils/dataAttributes.ts +1 -7
- package/bundle/ui-kit/BaseFiltration/renderGridBlocks.d.ts +0 -9
- package/dist/components/OfficesAtmsMap/renderFiltrationForm.js +0 -26
- package/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +0 -1
- package/dist/ui-kit/BaseFiltration/renderGridBlocks.d.ts +0 -9
- package/dist/ui-kit/BaseFiltration/renderGridBlocks.js.map +0 -1
- package/lib/components/OfficesAtmsMap/renderFiltrationForm.js +0 -22
- package/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +0 -1
- package/lib/ui-kit/BaseFiltration/renderGridBlocks.d.ts +0 -9
- package/lib/ui-kit/BaseFiltration/renderGridBlocks.js.map +0 -1
- package/mobile/bundle/ui-kit/BaseFiltration/renderGridBlocks.d.ts +0 -9
- package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.d.ts +0 -13
- package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js +0 -26
- package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +0 -1
- package/mobile/dist/ui-kit/BaseFiltration/renderGridBlocks.d.ts +0 -9
- package/mobile/dist/ui-kit/BaseFiltration/renderGridBlocks.js.map +0 -1
- package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.d.ts +0 -13
- package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js +0 -22
- package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +0 -1
- package/mobile/lib/ui-kit/BaseFiltration/renderGridBlocks.d.ts +0 -9
- package/mobile/lib/ui-kit/BaseFiltration/renderGridBlocks.js.map +0 -1
- package/mobile/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +0 -87
- package/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +0 -87
|
@@ -528,13 +528,8 @@
|
|
|
528
528
|
};
|
|
529
529
|
|
|
530
530
|
const getAspectsAttributes = (data) => {
|
|
531
|
-
if (!Array.isArray(data) || !data.length) {
|
|
532
|
-
return {};
|
|
533
|
-
}
|
|
534
531
|
try {
|
|
535
|
-
return {
|
|
536
|
-
'data-aspects': JSON.stringify(data),
|
|
537
|
-
};
|
|
532
|
+
return Array.isArray(data) && data.length ? { 'data-aspects': JSON.stringify(data) } : {};
|
|
538
533
|
}
|
|
539
534
|
catch (_) {
|
|
540
535
|
return {};
|
|
@@ -3322,15 +3317,21 @@
|
|
|
3322
3317
|
};
|
|
3323
3318
|
const formatCoordinate = (coordinate) => Number(coordinate.toString().replace(',', '.'));
|
|
3324
3319
|
|
|
3325
|
-
const
|
|
3326
|
-
const
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
}
|
|
3330
|
-
|
|
3331
|
-
const buttonNode = renderFoldButton ? renderFoldButton({ isUnfolded, onToggle }) : null;
|
|
3332
|
-
return isFoldButtonOnTop ? (jsxs("div", { className: className, role: "group", children: [buttonNode, sectionNode] })) : (jsxs("div", { className: className, role: "group", children: [sectionNode, buttonNode] }));
|
|
3320
|
+
const CardCell = JSX(({ value, subText, children, isPhone, ...props }) => {
|
|
3321
|
+
const textItems = (Array.isArray(value) ? value : value?.split(',') ?? []).filter(Boolean);
|
|
3322
|
+
if ([textItems.length, children, subText].every((_) => !_)) {
|
|
3323
|
+
return null;
|
|
3324
|
+
}
|
|
3325
|
+
return renderCardCell({ textItems, subText, children, isPhone, ...props });
|
|
3333
3326
|
});
|
|
3327
|
+
const renderCardCell = ({ label, labelSize = 'text-m', textItems, subColor, subText, className, children, isPhone = false, }) => (jsxs("div", { className: style('flex gap-2xs flex-col h-full max-w-[300px]', className), children: [label ? (jsx(Text, { color: "text-secondary-text", font: "font-light", size: labelSize, children: label })) : null, children || renderTextItems(textItems, isPhone), subText ? (jsx(Text, { color: subColor, size: "text-m", children: subText })) : null] }));
|
|
3328
|
+
const renderTextItems = (textItems, isPhone) => textItems.filter(Boolean).map((text, i) => (jsx(Text, { size: "text-l", children: isPhone ? jsx("a", { href: `tel:${cleanPhoneNumber(text)}`, children: text.trim() }) : text.trim() }, String(i))));
|
|
3329
|
+
const cleanPhoneNumber = (phone) => phone.replace(/\D/g, '');
|
|
3330
|
+
|
|
3331
|
+
const CardRow = JSX(({ className, children }) => (jsx("div", { className: style('flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl', className), children: children })));
|
|
3332
|
+
|
|
3333
|
+
// TODO Не особо полезно, в итоге
|
|
3334
|
+
const Foldable = JSX(({ className, children }) => (jsx("div", { className: style(className), role: "group", children: children })));
|
|
3334
3335
|
|
|
3335
3336
|
function useResizeObserver(callback, deps) {
|
|
3336
3337
|
const ref = useRef(null);
|
|
@@ -3362,18 +3363,17 @@
|
|
|
3362
3363
|
return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''} `, children: jsx("div", { className: className, ref: childrenWrapperRef, children: children }) }));
|
|
3363
3364
|
});
|
|
3364
3365
|
|
|
3365
|
-
const
|
|
3366
|
-
const
|
|
3367
|
-
|
|
3368
|
-
return null;
|
|
3369
|
-
}
|
|
3370
|
-
return renderCardCell({ textItems, subText, children, isPhone, ...props });
|
|
3366
|
+
const IconButton = JSX(({ className, name, text, data, onClick }) => {
|
|
3367
|
+
const aspectsAttrs = useMemo(() => getAspectsAttributes(data), [data]);
|
|
3368
|
+
return (jsxs("button", { className: style('text-primary-main flex justify-between items-center border-none px-m', text ? 'pt-lg' : 'py-2xs', className), type: "button", ...aspectsAttrs, onClick: onClick, children: [text ? jsx("div", { className: "pr-m", children: text }) : null, jsx(Icon, { className: "text-primary-text", name: name, width: "16", height: "16" })] }));
|
|
3371
3369
|
});
|
|
3372
|
-
const renderCardCell = ({ label, labelSize = 'text-m', textItems, subColor, subText, className, children, isPhone = false, }) => (jsxs("div", { className: style('flex gap-2xs flex-col h-full max-w-[300px]', className), children: [label ? (jsx(Text, { color: "text-secondary-text", font: "font-light", size: labelSize, children: label })) : null, children || renderTextItems(textItems, isPhone), subText ? (jsx(Text, { color: subColor, size: "text-m", children: subText })) : null] }));
|
|
3373
|
-
const renderTextItems = (textItems, isPhone) => textItems.filter(Boolean).map((text, i) => (jsx(Text, { size: "text-l", children: isPhone ? jsx("a", { href: `tel:${cleanPhoneNumber(text)}`, children: text.trim() }) : text.trim() }, String(i))));
|
|
3374
|
-
const cleanPhoneNumber = (phone) => phone.replace(/\D/g, '');
|
|
3375
3370
|
|
|
3376
|
-
const
|
|
3371
|
+
const renderFoldButton$2 = ({ isUnfolded, onToggle }) => (jsx(IconButton, { className: "w-full border-b border-solid border-main-divider", name: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', text: isUnfolded ? 'Скрыть' : 'Подробнее', onClick: onToggle }));
|
|
3372
|
+
|
|
3373
|
+
const FoldableCardContent = JSX(({ children }) => {
|
|
3374
|
+
const [isUnfolded, { toggle }] = useBool(false);
|
|
3375
|
+
return (jsxs(Foldable, { className: "block sm:hidden", children: [jsx(FoldableSection, { isUnfolded: isUnfolded, children: children }), renderFoldButton$2({ isUnfolded, onToggle: toggle })] }));
|
|
3376
|
+
});
|
|
3377
3377
|
|
|
3378
3378
|
const getScheduleDescription = (workScheduleWeek) => {
|
|
3379
3379
|
const rows = getDateDescription(workScheduleWeek);
|
|
@@ -3484,10 +3484,6 @@
|
|
|
3484
3484
|
};
|
|
3485
3485
|
const renderDay = ({ title, status, workTime, lunchHour, hasLunch }, i) => (jsx(CardCell, { label: title, value: status && workTime ? workTime : '', subText: getSubTextLunch({ lunchHour, hasLunch, status }), subColor: !status || hasLunch ? 'text-error' : 'text-green-dark' }, String(i)));
|
|
3486
3486
|
|
|
3487
|
-
const ICONS$1 = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
3488
|
-
const labels = ['Подробнее', 'Скрыть'];
|
|
3489
|
-
const renderFoldButton$2 = ({ isUnfolded, onToggle }) => (jsxs("button", { className: "w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider", onClick: onToggle, type: "button", children: [jsx("div", { className: "pr-m", children: labels[Number(isUnfolded)] }), jsx(Icon, { className: "text-primary-text", name: ICONS$1[Number(isUnfolded)], width: "16", height: "16" })] }));
|
|
3490
|
-
|
|
3491
3487
|
const renderWorkSchedule = (workSchedule) => {
|
|
3492
3488
|
const workScheduleWeek = getWorkScheduleWeek(workSchedule);
|
|
3493
3489
|
const timeOfWork = workSchedule ? getDateDescription(workScheduleWeek) : '';
|
|
@@ -3508,34 +3504,12 @@
|
|
|
3508
3504
|
const renderMatchingTimeOfWork = (timeOfWork) => `<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${timeOfWork}</p>`;
|
|
3509
3505
|
const renderDefaultTimeOfWork = (timeOfWork, businessTimeOfWork) => `<p><b>Режим обслуживания физ.лиц:<br/></b>${timeOfWork}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${businessTimeOfWork}</p>`;
|
|
3510
3506
|
|
|
3511
|
-
const renderOfficeCard = (
|
|
3512
|
-
if (!workSchedule) {
|
|
3507
|
+
const renderOfficeCard = (branch, i) => {
|
|
3508
|
+
if (!branch.workSchedule) {
|
|
3513
3509
|
return null;
|
|
3514
3510
|
}
|
|
3515
|
-
const workScheduleWeek = getWorkScheduleWeek(workSchedule);
|
|
3516
|
-
return (jsxs("div", { className: "bg-white col-span-12 p-3xl sm:border-green sm:border", children: [jsxs("div", { className: "sm:flex sm:justify-between", children: [jsxs("div", { children: [jsx(Text, { size: "text-h4", children: name }), address ? (jsxs("div", { className: "flex pb-xl pt-xs gap-2xs", children: [jsx(Icon, { name: "GeolocationIcon", width: "24", height: "24" }), jsx(Text, { size: "text-l", children: address })] })) : null] }), renderCurrentDaySchedule(workScheduleWeek)] }), jsx("div", { className: "hidden sm:block", children: renderCardContent$1({
|
|
3517
|
-
phone,
|
|
3518
|
-
fax,
|
|
3519
|
-
phoneBusiness,
|
|
3520
|
-
phoneNatural,
|
|
3521
|
-
phoneCallCentre,
|
|
3522
|
-
phoneCurrencyControl,
|
|
3523
|
-
workSchedule,
|
|
3524
|
-
exchangeRate,
|
|
3525
|
-
}) }), jsx(Foldable, { className: "block sm:hidden", renderFoldableSection: ({ isUnfolded }) => {
|
|
3526
|
-
return (jsx(FoldableSection, { isUnfolded: isUnfolded, children: renderCardContent$1({
|
|
3527
|
-
phone,
|
|
3528
|
-
fax,
|
|
3529
|
-
phoneBusiness,
|
|
3530
|
-
phoneNatural,
|
|
3531
|
-
phoneCallCentre,
|
|
3532
|
-
phoneCurrencyControl,
|
|
3533
|
-
workSchedule,
|
|
3534
|
-
exchangeRate,
|
|
3535
|
-
}) }));
|
|
3536
|
-
},
|
|
3537
|
-
//** TODO: remove styles with refactoring DefaultFoldButton*/
|
|
3538
|
-
renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton$2({ isUnfolded, onToggle }) })] }, String(i)));
|
|
3511
|
+
const workScheduleWeek = getWorkScheduleWeek(branch.workSchedule);
|
|
3512
|
+
return (jsxs("div", { className: "bg-white col-span-12 p-3xl sm:border-green sm:border", children: [jsxs("div", { className: "sm:flex sm:justify-between", children: [jsxs("div", { children: [jsx(Text, { size: "text-h4", children: branch.name }), branch.address ? (jsxs("div", { className: "flex pb-xl pt-xs gap-2xs", children: [jsx(Icon, { name: "GeolocationIcon", width: "24", height: "24" }), jsx(Text, { size: "text-l", children: branch.address })] })) : null] }), renderCurrentDaySchedule(workScheduleWeek)] }), jsx("div", { className: "hidden sm:block", children: renderCardContent$1(branch) }), jsx(FoldableCardContent, { children: renderCardContent$1(branch) })] }, String(i)));
|
|
3539
3513
|
};
|
|
3540
3514
|
const renderCardContent$1 = ({ phone, fax, phoneBusiness, phoneNatural, phoneCallCentre, phoneCurrencyControl, workSchedule, exchangeRate, }) => {
|
|
3541
3515
|
const workScheduleWeek = getWorkScheduleWeek(workSchedule);
|
|
@@ -3546,9 +3520,9 @@
|
|
|
3546
3520
|
? renderBusinessSchedule(workSchedule?.businessScheduleDescription)
|
|
3547
3521
|
: null, exchangeRate?.currencies?.length ? (jsx(CardRow, { className: "flex-wrap", children: exchangeRate?.currencies?.map(renderCurrency) })) : null] }));
|
|
3548
3522
|
};
|
|
3549
|
-
const capitalizedFirstLetter
|
|
3523
|
+
const capitalizedFirstLetter = (text) => text ? `${text?.charAt(0)?.toUpperCase()}${text?.slice(1)}` : '';
|
|
3550
3524
|
const getOfficePoint = ({ name = '', address = '', workSchedule }) => {
|
|
3551
|
-
const header = capitalizedFirstLetter
|
|
3525
|
+
const header = capitalizedFirstLetter(name);
|
|
3552
3526
|
const body = `${address} ${renderWorkSchedule(workSchedule)}`;
|
|
3553
3527
|
return { header, body };
|
|
3554
3528
|
};
|
|
@@ -4468,20 +4442,18 @@
|
|
|
4468
4442
|
const CONSENT_REQUIRED = 'Отметьте все обязательные соглашения';
|
|
4469
4443
|
const GroupedConsents = JSX(({ inputs = [], field, key }) => {
|
|
4470
4444
|
const isChecked = inputs.every((_) => Boolean(field(_.name).value));
|
|
4471
|
-
const handleGeneralToggle = (value) => {
|
|
4445
|
+
const handleGeneralToggle = useCallback((value) => {
|
|
4472
4446
|
for (const item of inputs) {
|
|
4473
4447
|
const itemField = field(item.name);
|
|
4474
4448
|
itemField.onChange?.(value);
|
|
4475
4449
|
}
|
|
4476
|
-
};
|
|
4450
|
+
}, [inputs]);
|
|
4477
4451
|
const hasValidationErrors = useMemo(() => inputs
|
|
4478
4452
|
?.filter((_) => _.required)
|
|
4479
4453
|
?.some((_) => Boolean(withValidator(field(_?.name), validatorObj[_?.name]).error)), [inputs]);
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
inputs.map(getField(field, {}, { ...InputsConsentsMap })) })), renderFoldButton: renderGeneralCheckbox(jsxs("div", { children: [jsx(Checkbox, { value: isChecked, onChange: handleGeneralToggle, text: CONSENT_ALL_DOCS_TEXT }, key), renderErrorText(hasValidationErrors ? CONSENT_REQUIRED : '')] })) }) }));
|
|
4454
|
+
const [isUnfolded, { toggle }] = useBool(true);
|
|
4455
|
+
return (jsx("div", { className: "w-fit", children: jsxs(Foldable, { children: [jsxs("div", { className: "flex items-start", children: [jsxs("div", { children: [jsx(Checkbox, { text: CONSENT_ALL_DOCS_TEXT, value: isChecked, onChange: handleGeneralToggle }, key), renderErrorText(hasValidationErrors ? CONSENT_REQUIRED : '')] }), jsx(IconButton, { name: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', onClick: toggle })] }), jsx(FoldableSection, { className: "flex flex-col pl-2xl", isUnfolded: isUnfolded, children: inputs.map(getField(field, {}, InputsConsentsMap)) })] }) }));
|
|
4483
4456
|
});
|
|
4484
|
-
const renderGeneralCheckbox = (generalCheckBox) => (foldableData) => (jsxs("div", { className: "flex items-start", children: [generalCheckBox, jsx("button", { onClick: foldableData.onToggle, className: "px-m py-2xs", type: "button", children: jsx(Icon, { className: "text-primary-text", name: foldableData.isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16" }) })] }));
|
|
4485
4457
|
|
|
4486
4458
|
const renderInputs$2 = ({ field, inputs }) => {
|
|
4487
4459
|
const { consentInputs, restInputs } = splitInputs(inputs || []);
|
|
@@ -5430,6 +5402,30 @@
|
|
|
5430
5402
|
return (jsxs("div", { className: "bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center", children: [jsx(Img, { image: { icon: 'MagnifierIcon', iconVersion: 'normal' }, width: "120", height: "120" }), jsx(Headline, { title: title, description: description, headlineVersion: isMobileMode ? 'L' : 'S', isEmbedded: true, className: "space-y-s" })] }));
|
|
5431
5403
|
});
|
|
5432
5404
|
|
|
5405
|
+
const isOdd = (n) => n % 2 !== 0;
|
|
5406
|
+
|
|
5407
|
+
const TextWithIcon = JSX(({ textNode, iconNode, tag, onClick, justifyContent = 'between', className, role, ...rest }) => {
|
|
5408
|
+
const Tag = tag;
|
|
5409
|
+
return (jsxs(Tag, { tag: tag, className: style('flex items-center w-full gap-1', justifyContent === 'between' ? 'justify-between' : 'justify-center', className), onClick: onClick, role: role, ...rest, children: [textNode ? jsx("div", { children: textNode }) : null, iconNode ? jsx("div", { children: iconNode }) : null] }));
|
|
5410
|
+
});
|
|
5411
|
+
|
|
5412
|
+
const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = 'pc', disabled = false, onClick }) => (jsx(TextWithIcon, { tag: "button", onClick: onClick, disabled: disabled, "data-theme": dataTheme, justifyContent: "center", role: "button", className: style('py-4 border border-transparent outline-none focus:border-primary-text space-x-s', disabled
|
|
5413
|
+
? 'bg-main-divider text-main-disabled hover:bg-main-divider'
|
|
5414
|
+
: 'bg-primary-main text-white hover:bg-primary-hove', className), textNode: jsx(Text, { size: "text-h4", children: label }), iconNode: icon ? (jsx(Img, { image: {
|
|
5415
|
+
icon,
|
|
5416
|
+
iconVersion: 'white',
|
|
5417
|
+
}, className: "my-auto", width: "20", height: "20" })) : null })));
|
|
5418
|
+
const renderDefaultFoldButton = ({ isUnfolded, onToggle }) => (jsx(DefaultFoldButton, { icon: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', label: isUnfolded ? 'Скрыть' : 'Развернуть', onClick: onToggle }));
|
|
5419
|
+
|
|
5420
|
+
const resultsGridStyle = 'space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs';
|
|
5421
|
+
const GridBlocks = JSX(({ topItemsCount = 0, label = '', block, blocksToRender = [], ...rest }) => {
|
|
5422
|
+
const [visibleBlocks, hiddenBlocks] = topItemsCount > 0
|
|
5423
|
+
? [blocksToRender.slice(0, topItemsCount), blocksToRender.slice(topItemsCount)]
|
|
5424
|
+
: [blocksToRender, []];
|
|
5425
|
+
const [isUnfolded, { toggle }] = useBool(false);
|
|
5426
|
+
return (jsxs("div", { className: style('space-y-2xs', { hidden: !blocksToRender.length }), children: [jsxs("div", { className: style(resultsGridStyle), children: [renderBlocksList(visibleBlocks, { ...rest.options, parent: block }), isOdd(visibleBlocks.length) ? jsx(AdTile, { className: "col-span-6", ...rest }) : null] }), jsxs(Foldable, { children: [jsxs(FoldableSection, { className: style(resultsGridStyle), isUnfolded: isUnfolded, children: [renderBlocksList(hiddenBlocks, { ...rest.options, parent: block }), isOdd(hiddenBlocks.length) ? jsx(AdTile, { className: "col-span-6", ...rest }) : null] }), jsx(DefaultFoldButton, { className: style({ hidden: topItemsCount < 1 }), dataTheme: rest.options?.page?.colorPalette, disabled: !hiddenBlocks?.length, label: label, icon: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', onClick: toggle })] })] }));
|
|
5427
|
+
});
|
|
5428
|
+
|
|
5433
5429
|
const getBorderStyle = (showBorder = false) => showBorder
|
|
5434
5430
|
? 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider'
|
|
5435
5431
|
: '';
|
|
@@ -5690,38 +5686,10 @@
|
|
|
5690
5686
|
renderProps: (block, options, i) => (jsx("div", { className: style('relative min-w-80', getBorderStyle(true)), children: renderBlock$1(block, options) }, String(i))),
|
|
5691
5687
|
}) }));
|
|
5692
5688
|
|
|
5693
|
-
const isOdd = (n) => n % 2 !== 0;
|
|
5694
|
-
|
|
5695
|
-
const TextWithIcon = JSX(({ textNode, iconNode, tag, onClick, justifyContent = 'between', className, role, ...rest }) => {
|
|
5696
|
-
const Tag = tag;
|
|
5697
|
-
return (jsxs(Tag, { tag: tag, className: style('flex items-center w-full gap-1', justifyContent === 'between' ? 'justify-between' : 'justify-center', className), onClick: onClick, role: role, ...rest, children: [textNode ? jsx("div", { children: textNode }) : null, iconNode ? jsx("div", { children: iconNode }) : null] }));
|
|
5698
|
-
});
|
|
5699
|
-
|
|
5700
|
-
const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = 'pc', disabled = false, onClick }) => (jsx(TextWithIcon, { tag: "button", onClick: onClick, disabled: disabled, "data-theme": dataTheme, justifyContent: "center", role: "button", className: style('py-4 border border-transparent outline-none focus:border-primary-text space-x-s', disabled
|
|
5701
|
-
? 'bg-main-divider text-main-disabled hover:bg-main-divider'
|
|
5702
|
-
: 'bg-primary-main text-white hover:bg-primary-hove', className), textNode: jsx(Text, { size: "text-h4", children: label }), iconNode: icon ? (jsx(Img, { image: {
|
|
5703
|
-
icon,
|
|
5704
|
-
iconVersion: 'white',
|
|
5705
|
-
}, className: "my-auto", width: "20", height: "20" })) : null })));
|
|
5706
|
-
const renderDefaultFoldButton = ({ isUnfolded, onToggle }) => {
|
|
5707
|
-
const labels = ['Развернуть', 'Скрыть'];
|
|
5708
|
-
const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
5709
|
-
return (jsx(DefaultFoldButton, { icon: icons[Number(isUnfolded)], label: labels[Number(isUnfolded)], onClick: onToggle }));
|
|
5710
|
-
};
|
|
5711
|
-
|
|
5712
|
-
const ICONS = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
5713
|
-
const resultsGridStyle = 'space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs';
|
|
5714
|
-
const renderGridBlocks = ({ topItemsCount = 0, label = '', block, blocksToRender = [], ...rest }) => {
|
|
5715
|
-
const [visibleBlocks, hiddenBlocks] = topItemsCount > 0
|
|
5716
|
-
? [blocksToRender.slice(0, topItemsCount), blocksToRender.slice(topItemsCount)]
|
|
5717
|
-
: [blocksToRender, []];
|
|
5718
|
-
return (jsxs("div", { className: style('space-y-2xs', { hidden: !blocksToRender.length }), children: [jsxs("div", { className: style(resultsGridStyle), children: [renderBlocksList(visibleBlocks, { ...rest.options, parent: block }), isOdd(visibleBlocks.length) ? jsx(AdTile, { className: "col-span-6", ...rest }) : null] }), jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs(FoldableSection, { className: style(resultsGridStyle), isUnfolded: isUnfolded, children: [renderBlocksList(hiddenBlocks, { ...rest.options, parent: block }), isOdd(hiddenBlocks.length) ? jsx(AdTile, { className: "col-span-6", ...rest }) : null] })), renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(DefaultFoldButton, { className: style({ hidden: topItemsCount < 1 }), disabled: !hiddenBlocks?.length, label: label, icon: ICONS[Number(isUnfolded)], dataTheme: rest.options?.page?.colorPalette, onClick: onToggle })) })] }));
|
|
5719
|
-
};
|
|
5720
|
-
|
|
5721
5689
|
const FilteredBlocks = JSX(({ blocksSection, blocksToRender = [], notFound, ...rest }) => {
|
|
5722
5690
|
switch (blocksSection?.view) {
|
|
5723
5691
|
case 'grid':
|
|
5724
|
-
return (jsxs("div", { children: [renderNotFound(notFound, blocksToRender),
|
|
5692
|
+
return (jsxs("div", { children: [renderNotFound(notFound, blocksToRender), jsx(GridBlocks, { ...blocksSection, ...rest, blocksToRender: blocksToRender })] }));
|
|
5725
5693
|
case 'carousel':
|
|
5726
5694
|
return (jsxs("div", { className: "relative", children: [renderNotFound(notFound, blocksToRender), renderCarouselBlocks({ ...rest, blocksToRender })] }));
|
|
5727
5695
|
default:
|
|
@@ -5748,7 +5716,7 @@
|
|
|
5748
5716
|
return items.map((item) => (jsx(SlideCheckbox, { text: item?.title, value: [value].flatMap((_) => _).includes(item.value), onChange: () => handleChange(item.value), type: multiple ? 'checkbox' : 'radio' }, item.value)));
|
|
5749
5717
|
});
|
|
5750
5718
|
|
|
5751
|
-
const FiltrationForm = JSX(({ children, filtrationSchema, resetButton, field, reset }) => (jsxs("form", { className: "flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0", children: [jsxs("div", { className: "flex flex-col @4xl:flex-row gap-xl", children: [children, joinList((jsx("div", { className: "h-full w-px bg-gray hidden @4xl:block" })))(Object.entries(filtrationSchema).map(renderFormItem(field)).filter(Boolean))] }), resetButton ? (jsx("div", { children: jsx(Button, { type: "reset", className: "w-full @4xl:w-56 @4xl:ml-s", onClick: reset, children: resetButton?.text }) })) : null] })));
|
|
5719
|
+
const FiltrationForm$1 = JSX(({ children, filtrationSchema, resetButton, field, reset }) => (jsxs("form", { className: "flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0", children: [jsxs("div", { className: "flex flex-col @4xl:flex-row gap-xl", children: [children, joinList((jsx("div", { className: "h-full w-px bg-gray hidden @4xl:block" })))(Object.entries(filtrationSchema).map(renderFormItem(field)).filter(Boolean))] }), resetButton ? (jsx("div", { children: jsx(Button, { type: "reset", className: "w-full @4xl:w-56 @4xl:ml-s", onClick: reset, children: resetButton?.text }) })) : null] })));
|
|
5752
5720
|
const renderFormItem = (field) => ([key, item]) => {
|
|
5753
5721
|
const type = item?.type;
|
|
5754
5722
|
switch (type) {
|
|
@@ -5830,7 +5798,7 @@
|
|
|
5830
5798
|
parse: ({ key }) => [key],
|
|
5831
5799
|
format: ([value] = []) => stringArrayToOptions(consumerField).find((_) => _.key === value) || { key: '' },
|
|
5832
5800
|
}) }));
|
|
5833
|
-
return (jsxs(BlockWrapper, { className: style(className), defaultPadding: "p-0", version: "transparent", ...rest, children: [jsx(FiltrationForm, { filtrationSchema: filtrationSchema, field: field, reset: reset, children: jsxs("div", { children: [ConsumerSelect, jsx("div", { children: jsx(Button, { type: "reset", className: "mt-lg w-64", onClick: reset, version: resetButton?.version, children: resetButton?.text }) })] }) }), jsx(FilteredBlocks, { blocksToRender: blocksToRender, ...rest })] }));
|
|
5801
|
+
return (jsxs(BlockWrapper, { className: style(className), defaultPadding: "p-0", version: "transparent", ...rest, children: [jsx(FiltrationForm$1, { filtrationSchema: filtrationSchema, field: field, reset: reset, children: jsxs("div", { children: [ConsumerSelect, jsx("div", { children: jsx(Button, { type: "reset", className: "mt-lg w-64", onClick: reset, version: resetButton?.version, children: resetButton?.text }) })] }) }), jsx(FilteredBlocks, { blocksToRender: blocksToRender, ...rest })] }));
|
|
5834
5802
|
}, {
|
|
5835
5803
|
childrenTypes: ['CarouselTariffsCard'],
|
|
5836
5804
|
childSchema: (content) => ({
|
|
@@ -6748,16 +6716,18 @@
|
|
|
6748
6716
|
setIsVisible(event.isUnfolded);
|
|
6749
6717
|
}
|
|
6750
6718
|
}), [options?.parent]);
|
|
6751
|
-
const
|
|
6719
|
+
const handleFold = useCallback(() => {
|
|
6752
6720
|
carouselTariffsCardEventBus.fire('fold', {
|
|
6753
6721
|
type: 'fold',
|
|
6754
6722
|
isUnfolded: !isVisible,
|
|
6755
6723
|
parent: options?.parent,
|
|
6756
6724
|
});
|
|
6757
6725
|
}, [isVisible, options?.parent]);
|
|
6758
|
-
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 ? (
|
|
6726
|
+
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 ? (jsxs(Foldable, { children: [jsxs("div", { children: [visibleCells, jsx(FoldableSection, { isUnfolded: isVisible, children: hiddenCells })] }), cardCells.length >= visibleCellsCount ? (jsx(FoldButton, { isUnfolded: isVisible, data: data, onClick: handleFold })) : null] })) : (jsx("div", { children: visibleCells }))] }));
|
|
6759
6727
|
});
|
|
6760
|
-
const FoldButton = JSX(({ data, isUnfolded
|
|
6728
|
+
const FoldButton = JSX(({ data, isUnfolded, onClick }) => (jsx(IconButton, { className: "w-full", ...(isUnfolded
|
|
6729
|
+
? { name: 'ArrowUpIcon', text: 'Скрыть', data }
|
|
6730
|
+
: { name: 'ArrowDownIcon', text: 'Подробнее о тарифе' }), onClick: onClick })));
|
|
6761
6731
|
|
|
6762
6732
|
const PORTAL_NATURAL_URL = '/';
|
|
6763
6733
|
const UPDATING_INTERVAL = 60000 * 4;
|
|
@@ -8169,7 +8139,7 @@
|
|
|
8169
8139
|
});
|
|
8170
8140
|
const rateRows = blocksWithProps.map(([, _]) => _?.paramsSource?.rows?.[0]?.rates);
|
|
8171
8141
|
const months = getMonths(rateRows);
|
|
8172
|
-
return (jsxs(BlockWrapper, { className: style('space-y-2xs', className), defaultPadding: "p-0", version: "transparent", ...rest, children: [jsx(FiltrationForm, { filtrationSchema: filtrationSchema, resetButton: resetButton, field: field, reset: reset, children: jsxs("div", { className: "@4xl:max-w-xs space-y-lg", children: [jsx(CurrencyInput, { label: sumInput?.title, min: DEFAULT_MIN_SUM, max: DEFAULT_MAX_SUM, ...field('sum', {
|
|
8142
|
+
return (jsxs(BlockWrapper, { className: style('space-y-2xs', className), defaultPadding: "p-0", version: "transparent", ...rest, children: [jsx(FiltrationForm$1, { filtrationSchema: filtrationSchema, resetButton: resetButton, field: field, reset: reset, children: jsxs("div", { className: "@4xl:max-w-xs space-y-lg", children: [jsx(CurrencyInput, { label: sumInput?.title, min: DEFAULT_MIN_SUM, max: DEFAULT_MAX_SUM, ...field('sum', {
|
|
8173
8143
|
parse: (min) => ({ min: Number(min), max: DEFAULT_MAX_SUM }),
|
|
8174
8144
|
format: ({ min }) => String(min),
|
|
8175
8145
|
}) }), jsx(InputRange, { title: periodInput?.title, items: ['От 3 мес', 'До 5 лет'], list: months, ...field('period') })] }) }), jsx(FilteredBlocks, { blocksToRender: blocksToRender, ...rest })] }));
|
|
@@ -8545,22 +8515,25 @@
|
|
|
8545
8515
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8546
8516
|
version, role, ...rest }) => {
|
|
8547
8517
|
const isMobile = useMobileMode();
|
|
8548
|
-
|
|
8549
|
-
|
|
8550
|
-
|
|
8551
|
-
|
|
8552
|
-
|
|
8553
|
-
|
|
8554
|
-
|
|
8555
|
-
|
|
8556
|
-
|
|
8557
|
-
|
|
8558
|
-
|
|
8559
|
-
|
|
8518
|
+
const [isUnfolded, { toggle }] = useBool(isExpanded);
|
|
8519
|
+
const foldableSection = (jsx(FoldableSection, { className: style('gap-lg', getFoldableStyles(isMobile)), isUnfolded: isUnfolded, children: renderChildren({
|
|
8520
|
+
...rest,
|
|
8521
|
+
extraProps: { className: 'w-full', padding: 'p-0' },
|
|
8522
|
+
}) }));
|
|
8523
|
+
const foldButton = renderFoldButton$1({
|
|
8524
|
+
foldButtonVersion,
|
|
8525
|
+
label,
|
|
8526
|
+
labelIcon,
|
|
8527
|
+
labelIconBgVersion,
|
|
8528
|
+
isMobile,
|
|
8529
|
+
isUnfolded,
|
|
8530
|
+
onToggle: toggle,
|
|
8531
|
+
});
|
|
8532
|
+
return (jsx(BlockWrapper, { className: style('w-full border-0 border-b border-solid border-main-divider last:border-b-0', className), defaultPadding: "p-0", tag: "div", version: "transparent", role: role, ...rest, children: jsxs(Foldable, { children: [isFoldButtonOnTop ? foldButton : foldableSection, isFoldButtonOnTop ? foldableSection : foldButton] }) }));
|
|
8560
8533
|
}, {
|
|
8561
8534
|
childrenTypes: { exclude: ['RollupItem'] },
|
|
8562
8535
|
});
|
|
8563
|
-
const renderFoldButton$1 = ({ foldButtonVersion, label: defaultLabel, labelIcon, labelIconBgVersion, isUnfolded,
|
|
8536
|
+
const renderFoldButton$1 = ({ foldButtonVersion, label: defaultLabel, labelIcon, labelIconBgVersion, isUnfolded, isMobile = false, onToggle, }) => {
|
|
8564
8537
|
const label = defaultLabel || (isUnfolded ? 'Скрыть' : 'Развернуть');
|
|
8565
8538
|
const icon = getIconName(isUnfolded, isMobile);
|
|
8566
8539
|
return foldButtonVersion === 'accordion' ? (jsx(AccordionFoldButton, { label: label, labelIcon: labelIcon, labelIconBgVersion: labelIconBgVersion, icon: icon, onToggle: onToggle })) : (jsx(DefaultFoldButton, { label: label, icon: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', onClick: onToggle }));
|
|
@@ -8919,12 +8892,25 @@
|
|
|
8919
8892
|
blocks: rest.block?.blocks,
|
|
8920
8893
|
onFiltrationStateChange: handleFiltrationStateChange,
|
|
8921
8894
|
});
|
|
8922
|
-
return (jsxs(BlockWrapper, { className: style('space-y-2xs', className), defaultPadding: "p-0", version: "transparent", ...rest, children: [jsx(TabsControl, { ...tabsControlProps }), jsx(FiltrationForm, { filtrationSchema: filtrationSchema, resetButton: resetButton, field: field, reset: reset }), jsx(FilteredBlocks, { blocksToRender: blocksToRender, ...rest })] }));
|
|
8895
|
+
return (jsxs(BlockWrapper, { className: style('space-y-2xs', className), defaultPadding: "p-0", version: "transparent", ...rest, children: [jsx(TabsControl, { ...tabsControlProps }), jsx(FiltrationForm$1, { filtrationSchema: filtrationSchema, resetButton: resetButton, field: field, reset: reset }), jsx(FilteredBlocks, { blocksToRender: blocksToRender, ...rest })] }));
|
|
8923
8896
|
}, {
|
|
8924
8897
|
childrenTypes: ['ProductBlock'],
|
|
8925
8898
|
childSchema: (content) => content?.filtrationSchema || {},
|
|
8926
8899
|
});
|
|
8927
8900
|
|
|
8901
|
+
const COMMON_FILTERS_STYLES = 'flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl';
|
|
8902
|
+
const FiltrationForm = JSX(({ filters, field: { field, reset }, onlyOffice, labels }) => {
|
|
8903
|
+
const visibleFiltersNum = onlyOffice ? 5 : 6;
|
|
8904
|
+
const filtersCheckbox = (filters || []).map((key) => (jsx(Checkbox, { text: labels[key], ...field(key) }, key)));
|
|
8905
|
+
const [visibleFilters, hiddenFilters] = visibleFiltersNum > 0
|
|
8906
|
+
? [filtersCheckbox.slice(0, visibleFiltersNum), filtersCheckbox.slice(visibleFiltersNum)]
|
|
8907
|
+
: [filtersCheckbox, []];
|
|
8908
|
+
const [isUnfolded, { toggle }] = useBool(false);
|
|
8909
|
+
return (jsx("div", { children: filters?.length ? (jsx("div", { children: jsxs(Foldable, { children: [jsxs("div", { children: [jsx("div", { className: COMMON_FILTERS_STYLES, children: visibleFilters }), jsx(FoldableSection, { className: COMMON_FILTERS_STYLES, isUnfolded: isUnfolded, children: hiddenFilters })] }), renderFoldButton(reset, onlyOffice)({ isUnfolded, onToggle: toggle })] }) })) : null }));
|
|
8910
|
+
});
|
|
8911
|
+
// TODO Столько разных кнопок с иконками, но эта самая творчески-ударённая реализация))
|
|
8912
|
+
const renderFoldButton = (reset, onlyOffice = false) => ({ isUnfolded, onToggle }) => (jsxs("div", { className: "flex space-x-lg", children: [onlyOffice ? (jsx(LinkButton, { version: "transparent", className: "text-secondary-text [&>*]:p-0", appendRight: jsx(Icon, { name: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16" }), text: isUnfolded ? 'Меньше фильтров' : 'Больше фильтров', onClick: onToggle })) : null, jsx(LinkButton, { version: "transparent", className: "text-secondary-text [&>*]:p-0", onClick: reset, children: jsxs("div", { className: "flex items-center", children: ["\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440", jsx(Icon, { name: "CloseIcon", width: "16", height: "16", className: "ml-2xs" })] }) })] }));
|
|
8913
|
+
|
|
8928
8914
|
const renderButtonsGroup = (data, activeButton, onButtonClick) => {
|
|
8929
8915
|
const allButtonVersion = getVersion(activeButton === 'all');
|
|
8930
8916
|
const businessButtonVersion = getVersion(activeButton === 'business');
|
|
@@ -8941,22 +8927,6 @@
|
|
|
8941
8927
|
|
|
8942
8928
|
const renderDescriptionBlock$1 = ({ __html, list, richVersion }) => __html || list?.length ? (jsxs("div", { className: "mb-2xl border-b sm:border border-main-divider sm:rounded-md", children: [__html ? (jsx("div", { className: "mb-2xl", children: jsx(RichText, { __html: __html, richVersion: richVersion }) })) : null, list?.length ? (jsx("div", { className: "flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl", children: list.map((item, i) => (jsxs("div", { className: "flex gap-xs items-center", children: [item?.image ? jsx(Img, { image: item.image }) : null, item?.text ? (jsx(Text, { size: "text-m", font: "font-light", children: item.text })) : null] }, String(i)))) })) : null] })) : null;
|
|
8943
8929
|
|
|
8944
|
-
const COMMON_FILTERS_STYLES = 'flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl';
|
|
8945
|
-
const renderFiltrationForm = ({ filters, field: { field, reset }, onlyOffice, labels, }) => {
|
|
8946
|
-
const visibleFiltersNum = onlyOffice ? 5 : 6;
|
|
8947
|
-
const filtersCheckbox = (filters || []).map((key) => (jsx(Checkbox, { text: labels[key], ...field(key) }, key)));
|
|
8948
|
-
const [visibleFilters, hiddenFilters] = visibleFiltersNum > 0
|
|
8949
|
-
? [filtersCheckbox.slice(0, visibleFiltersNum), filtersCheckbox.slice(visibleFiltersNum)]
|
|
8950
|
-
: [filtersCheckbox, []];
|
|
8951
|
-
return (jsx("div", { children: filters?.length ? (jsx("div", { children: jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs("div", { children: [jsx("div", { className: COMMON_FILTERS_STYLES, children: visibleFilters }), jsx(FoldableSection, { className: COMMON_FILTERS_STYLES, isUnfolded: isUnfolded, children: hiddenFilters })] })), renderFoldButton: renderFoldButton(reset, onlyOffice) }) })) : null }));
|
|
8952
|
-
};
|
|
8953
|
-
const renderFoldButton = (reset, onlyOffice = false) => ({ isUnfolded, onToggle }) => {
|
|
8954
|
-
const labels = ['Больше фильтров', 'Меньше фильтров'];
|
|
8955
|
-
const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
8956
|
-
return (jsxs("div", { className: "flex space-x-lg", children: [onlyOffice ? (jsx(LinkButton, { version: "transparent", className: "text-secondary-text [&>*]:p-0", appendRight: jsx(Icon, { name: icons[Number(isUnfolded)], width: "16", height: "16" }), text: labels[Number(isUnfolded)], onClick: onToggle })) : null, jsx(LinkButton, { version: "transparent", className: "text-secondary-text [&>*]:p-0", onClick: reset, children: renderBtnInner() })] }));
|
|
8957
|
-
};
|
|
8958
|
-
const renderBtnInner = () => (jsxs("div", { className: "flex items-center", children: ["\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440", jsx(Icon, { name: "CloseIcon", width: "16", height: "16", className: "ml-2xs" })] }));
|
|
8959
|
-
|
|
8960
8930
|
const renderHeading = (title, lengthItems) => (jsx("div", { className: "flex flex-col sm:flex-row gap-xs mb-2xl", children: jsxs(Heading, { headingType: "h3", children: [jsx("span", { suppressHydrationWarning: true, children: title }), lengthItems ? (jsx(Text, { size: "text-h2", color: "text-secondary-text", children: jsx("span", { suppressHydrationWarning: true, children: ` (${lengthItems})` }) })) : null] }) }));
|
|
8961
8931
|
|
|
8962
8932
|
const defaultEmptyFunction = () => void 0;
|
|
@@ -8972,21 +8942,17 @@
|
|
|
8972
8942
|
getBalloonRemoteWorkplaces,
|
|
8973
8943
|
});
|
|
8974
8944
|
const [activeButton, setActiveButton] = useState('all');
|
|
8975
|
-
|
|
8976
|
-
filters: getFiltersWithNonEmptyData([...data, ...remoteWorkplaces]),
|
|
8977
|
-
field: { field, reset },
|
|
8978
|
-
onlyOffice,
|
|
8979
|
-
labels: FILTRATION_LABELS,
|
|
8980
|
-
};
|
|
8981
|
-
return (jsxs("div", { className: style('space-y-1', className), children: [jsxs("div", { className: "bg-white", children: [jsxs("div", { className: "p-3xl pb-0", children: [renderHeading(title, lengthItems), descriptionData ? renderDescriptionBlock$1(descriptionData) : null, onlyOffice && renderButtonsGroup(data, activeButton, setActiveButton), jsx("div", { className: style('pb-3xl', filtersVisibleStyles(activeButton)), children: renderFiltrationForm(filterOptions) })] }), jsx("div", { className: "h-[600px]", children: jsx(ClientOnly, { children: jsx(YandexMap, { points: points, isLoad: isLoad, className: "h-full" }) }) })] }), jsxs(ClientOnly, { children: [filteredItems.map(renderCard), filteredRemoteWorkplaces.map(renderRemoteWorkplaceCard)] })] }));
|
|
8945
|
+
return (jsxs("div", { className: style('space-y-1', className), children: [jsxs("div", { className: "bg-white", children: [jsxs("div", { className: "p-3xl pb-0", children: [renderHeading(title, lengthItems), descriptionData ? renderDescriptionBlock$1(descriptionData) : null, onlyOffice && renderButtonsGroup(data, activeButton, setActiveButton), jsx("div", { className: style('pb-3xl', filtersVisibleStyles(activeButton)), children: jsx(FiltrationForm, { filters: getFiltersWithNonEmptyData([...data, ...remoteWorkplaces]), field: { field, reset }, onlyOffice: onlyOffice, labels: FILTRATION_LABELS }) })] }), jsx("div", { className: "h-[600px]", children: jsx(ClientOnly, { children: jsx(YandexMap, { points: points, isLoad: isLoad, className: "h-full" }) }) })] }), jsxs(ClientOnly, { children: [filteredItems.map(renderCard), filteredRemoteWorkplaces.map(renderRemoteWorkplaceCard)] })] }));
|
|
8982
8946
|
});
|
|
8983
8947
|
const getFiltersWithNonEmptyData = (data) => Object.keys(INITIAL_FILTRATION_STATE$1).filter((_) => data.filter((item) => FILTRATION_PREDICATES$1[_](item)).length);
|
|
8984
8948
|
|
|
8949
|
+
const capitalize = (text) => text ? `${text.charAt(0).toUpperCase()}${text.slice(1)}` : '';
|
|
8950
|
+
|
|
8985
8951
|
const renderAtmCard = ({ location, address, billAcceptorType, terminalType, billAcceptorEnable, atmCode = '', atmAccess = '', workTime, }, i) => {
|
|
8986
8952
|
const additionalInfo = [
|
|
8987
8953
|
{
|
|
8988
8954
|
label: 'Устройство',
|
|
8989
|
-
value:
|
|
8955
|
+
value: capitalize(terminalType),
|
|
8990
8956
|
},
|
|
8991
8957
|
{ label: 'Модуль приема наличных', value: billAcceptorEnable ? 'Да' : 'Нет' },
|
|
8992
8958
|
{
|
|
@@ -8999,19 +8965,14 @@
|
|
|
8999
8965
|
},
|
|
9000
8966
|
{ label: 'Регистрационный номер', value: atmCode },
|
|
9001
8967
|
];
|
|
9002
|
-
return (jsxs("div", { className: "bg-white col-span-12 p-3xl sm:border-green sm:border", children: [jsxs("div", { className: "sm:flex sm:justify-between", children: [jsxs("div", { children: [jsx(Text, { size: "text-h4", children:
|
|
9003
|
-
return (jsx(FoldableSection, { isUnfolded: isUnfolded, children: jsx(CardRow, { className: "flex-wrap", children: additionalInfo?.map(renderInfo) }) }));
|
|
9004
|
-
},
|
|
9005
|
-
//** TODO: Remove styles with refactoring DefaultFoldButton*/
|
|
9006
|
-
renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton$2({ isUnfolded, onToggle }) })] }, String(i)));
|
|
8968
|
+
return (jsxs("div", { className: "bg-white col-span-12 p-3xl sm:border-green sm:border", children: [jsxs("div", { className: "sm:flex sm:justify-between", children: [jsxs("div", { children: [jsx(Text, { size: "text-h4", children: capitalize(location) }), address ? (jsxs("div", { className: "flex pb-xl pt-xs gap-2xs", children: [jsx(Icon, { name: "GeolocationIcon", width: "24", height: "24" }), jsx(Text, { size: "text-l", children: address })] })) : null] }), jsx("div", { className: "whitespace-nowrap", children: jsx(Badge$1, { color: "green", children: capitalize(workTime) }) })] }), jsx("div", { className: "hidden sm:block", children: jsx(CardRow, { className: "flex-wrap", children: additionalInfo?.map(renderInfo) }) }), jsx(FoldableCardContent, { children: jsx(CardRow, { className: "flex-wrap", children: additionalInfo?.map(renderInfo) }) })] }, String(i)));
|
|
9007
8969
|
};
|
|
9008
8970
|
const getAtmPoint = ({ address = '', terminalType, atmCode = '' }) => {
|
|
9009
|
-
const header = `${
|
|
8971
|
+
const header = `${capitalize(terminalType)} №${atmCode}`;
|
|
9010
8972
|
const body = address.toUpperCase();
|
|
9011
8973
|
return { header, body };
|
|
9012
8974
|
};
|
|
9013
|
-
const renderInfo = (item, i) =>
|
|
9014
|
-
const capitalizedFirstLetter = (text) => text ? `${text?.charAt(0)?.toUpperCase()}${text?.slice(1)}` : '';
|
|
8975
|
+
const renderInfo = (item, i) => jsx(CardCell, { ...item }, String(i));
|
|
9015
8976
|
|
|
9016
8977
|
const EMPTY_VALUE$2 = [];
|
|
9017
8978
|
function useAtms(regionCode) {
|
|
@@ -9063,15 +9024,9 @@
|
|
|
9063
9024
|
if (!workScheduleDescription) {
|
|
9064
9025
|
return null;
|
|
9065
9026
|
}
|
|
9066
|
-
return (jsxs("div", { className: "bg-white col-span-12 p-3xl sm:border-yellow sm:border", children: [jsx("div", { className: "sm:flex sm:justify-between", children: jsxs("div", { children: [jsx(Text, { size: "text-h4", children: "\u0423\u0434\u0430\u043B\u0435\u043D\u043D\u043E\u0435 \u0440\u0430\u0431\u043E\u0447\u0435\u0435 \u043C\u0435\u0441\u0442\u043E" }), address ? (jsxs("div", { className: "flex pb-xl pt-xs gap-2xs", children: [jsx(Icon, { name: "GeolocationIcon", width: "24", height: "24" }), jsx(Text, { size: "text-l", children: address })] })) : null] }) }), jsx("div", { className: "hidden sm:block", children: renderCardContent({
|
|
9067
|
-
workScheduleDescription,
|
|
9068
|
-
}) }), jsx(Foldable, { className: "block sm:hidden", renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { isUnfolded: isUnfolded, children: renderCardContent({
|
|
9069
|
-
workScheduleDescription,
|
|
9070
|
-
}) })),
|
|
9071
|
-
//** TODO: remove styles with refactoring DefaultFoldButton*/
|
|
9072
|
-
renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton$2({ isUnfolded, onToggle }) })] }, String(i)));
|
|
9027
|
+
return (jsxs("div", { className: "bg-white col-span-12 p-3xl sm:border-yellow sm:border", children: [jsx("div", { className: "sm:flex sm:justify-between", children: jsxs("div", { children: [jsx(Text, { size: "text-h4", children: "\u0423\u0434\u0430\u043B\u0435\u043D\u043D\u043E\u0435 \u0440\u0430\u0431\u043E\u0447\u0435\u0435 \u043C\u0435\u0441\u0442\u043E" }), address ? (jsxs("div", { className: "flex pb-xl pt-xs gap-2xs", children: [jsx(Icon, { name: "GeolocationIcon", width: "24", height: "24" }), jsx(Text, { size: "text-l", children: address })] })) : null] }) }), jsx("div", { className: "hidden sm:block", children: renderCardContent(workScheduleDescription) }), jsx(FoldableCardContent, { children: renderCardContent(workScheduleDescription) })] }, String(i)));
|
|
9073
9028
|
};
|
|
9074
|
-
const renderCardContent = (
|
|
9029
|
+
const renderCardContent = (workScheduleDescription) => {
|
|
9075
9030
|
return (jsxs("div", { children: [jsxs(CardRow, { className: "flex", children: [jsx(CardCell, { label: "\u041E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043B\u044F \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043B\u0438\u0446", children: jsx(Text, { children: "\u041E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u0435 \u0438 \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u0435 \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432, \u0441\u0447\u0435\u0442\u043E\u0432, \u0432\u043A\u043B\u0430\u0434\u043E\u0432" }) }), jsx(CardCell, { label: "\u041E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043B\u044F \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043B\u0438\u0446", children: jsx(Text, { children: "\u041E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u0435 \u0438 \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0445 \u043A\u0430\u0440\u0442" }) }), jsx(CardCell, { label: "\u041E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043B\u044F \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043B\u0438\u0446", children: jsx(Text, { children: "\u0418\u043D\u0432\u0435\u0441\u0442\u0438\u0446\u0438\u043E\u043D\u043D\u043E\u0435 \u0438 \u043D\u0430\u043A\u043E\u043F\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u043D\u0438\u0435" }) }), jsx(CardCell, { label: "\u041E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043B\u044F \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043B\u0438\u0446", children: jsx(Text, { children: "\u0411\u0435\u0437\u043D\u0430\u043B\u0438\u0447\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u0440\u0443\u0431\u043B\u044F\u0445, \u043F\u0435\u0440\u0435\u0432\u043E\u0434\u044B \u0431\u0435\u0437 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F \u0441\u0447\u0451\u0442\u0430" }) })] }), jsx("hr", { className: "text-main-divider pb-xl" }), jsx(CardCell, { label: "\u0420\u0435\u0436\u0438\u043C \u0440\u0430\u0431\u043E\u0442\u044B", className: "max-w-none", children: jsx(Text, { children: workScheduleDescription }) })] }));
|
|
9076
9031
|
};
|
|
9077
9032
|
const getRemoteWorkplacePoint = ({ address = '', workScheduleDescription, }) => {
|
|
@@ -9866,7 +9821,8 @@
|
|
|
9866
9821
|
});
|
|
9867
9822
|
const rows = (rowData || []).map((row, i) => (jsx(TariffsTableRow, { row: row, activeIndex: activeIndex, rowIdx: i, ...rest }, String(i))));
|
|
9868
9823
|
const [visibleRows, hiddenRows] = hiddenRowsNum > 0 ? [rows.slice(0, -hiddenRowsNum), rows.slice(-hiddenRowsNum)] : [rows, []];
|
|
9869
|
-
|
|
9824
|
+
const [isUnfolded, { toggle }] = useBool(false);
|
|
9825
|
+
return (jsxs(BlockWrapper, { className: style('relative space-y-6xl @4xl:space-y-xl', className), defaultPadding: "p-6xl", ...rest, children: [jsx(Headline, { title: title, description: description, headlineVersion: "M", isEmbedded: true, align: "text-center" }), jsx("div", { className: "space-y-m overflow-hidden", children: hiddenRowsNum > 0 ? (jsxs(Foldable, { children: [jsxs(TariffsTableWrapper, { controls: controls, children: [visibleRows, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenRows })] }), renderDefaultFoldButton({ isUnfolded, onToggle: toggle })] })) : (jsx(TariffsTableWrapper, { controls: controls, children: rows })) })] }));
|
|
9870
9826
|
});
|
|
9871
9827
|
|
|
9872
9828
|
const TextBlock = JSX(({ className = '', title, description, iconVersion, __html, richVersion, ...rest }) => (jsxs(BlockWrapper, { className: style('flex gap-s sm:gap-m group-data-secondary:bg-primary-main/10', className), ...rest, children: [iconVersion === 'small' ? renderIcon() : null, jsxs("div", { className: "flex flex-col w-fit gap-2xs sm:gap-xs", children: [title ? (jsx(Text, { size: "text-l", font: "font-normal", color: "text-primary-text group-data-secondary:text-white", children: title })) : null, description ? renderDescription(description) : null, __html ? jsx(RichText, { richVersion: richVersion, __html: __html }) : null] })] })));
|
|
@@ -10053,7 +10009,7 @@
|
|
|
10053
10009
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10054
10010
|
});
|
|
10055
10011
|
|
|
10056
|
-
const packageVersion = "0.14.
|
|
10012
|
+
const packageVersion = "0.14.742";
|
|
10057
10013
|
|
|
10058
10014
|
exports.Blocks = Blocks;
|
|
10059
10015
|
exports.ContentPage = ContentPage;
|