@redneckz/wildless-cms-uni-blocks 0.14.79 → 0.14.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +62 -25
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +3 -3
- package/bundle/components/OfficesAtmsMap/renderCurrency.d.ts +3 -0
- package/bundle/components/OfficesAtmsMap/renderCurrentDaySchedule.d.ts +3 -0
- package/bundle/components/OfficesAtmsMap/renderDay.d.ts +3 -0
- package/bundle/components/OfficesAtmsMap/renderFoldButton.d.ts +3 -0
- package/bundle/components/OfficesAtmsMap/renderOfficeCard.d.ts +1 -4
- package/dist/components/OfficesAtmsMap/Badge.js +1 -1
- package/dist/components/OfficesAtmsMap/Badge.js.map +1 -1
- package/dist/components/OfficesAtmsMap/CardRow.js +1 -1
- package/dist/components/OfficesAtmsMap/CardRow.js.map +1 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +3 -3
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/dist/components/OfficesAtmsMap/renderAtmCard.js +8 -1
- package/dist/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
- package/dist/components/OfficesAtmsMap/renderCurrency.d.ts +3 -0
- package/dist/components/OfficesAtmsMap/renderCurrency.js +7 -0
- package/dist/components/OfficesAtmsMap/renderCurrency.js.map +1 -0
- package/dist/components/OfficesAtmsMap/renderCurrentDaySchedule.d.ts +3 -0
- package/dist/components/OfficesAtmsMap/renderCurrentDaySchedule.js +16 -0
- package/dist/components/OfficesAtmsMap/renderCurrentDaySchedule.js.map +1 -0
- package/dist/components/OfficesAtmsMap/renderDay.d.ts +3 -0
- package/dist/components/OfficesAtmsMap/renderDay.js +13 -0
- package/dist/components/OfficesAtmsMap/renderDay.js.map +1 -0
- package/dist/components/OfficesAtmsMap/renderFiltrationForm.js +1 -1
- package/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/dist/components/OfficesAtmsMap/renderFoldButton.d.ts +3 -0
- package/dist/components/OfficesAtmsMap/renderFoldButton.js +9 -0
- package/dist/components/OfficesAtmsMap/renderFoldButton.js.map +1 -0
- package/dist/components/OfficesAtmsMap/renderOfficeCard.d.ts +1 -4
- package/dist/components/OfficesAtmsMap/renderOfficeCard.js +36 -26
- package/dist/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/OfficesAtmsMap/Badge.js +1 -1
- package/lib/components/OfficesAtmsMap/Badge.js.map +1 -1
- package/lib/components/OfficesAtmsMap/CardRow.js +1 -1
- package/lib/components/OfficesAtmsMap/CardRow.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +3 -3
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/lib/components/OfficesAtmsMap/renderAtmCard.js +8 -1
- package/lib/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
- package/lib/components/OfficesAtmsMap/renderCurrency.d.ts +2 -0
- package/lib/components/OfficesAtmsMap/renderCurrency.js +4 -0
- package/lib/components/OfficesAtmsMap/renderCurrency.js.map +1 -0
- package/lib/components/OfficesAtmsMap/renderCurrentDaySchedule.d.ts +2 -0
- package/lib/components/OfficesAtmsMap/renderCurrentDaySchedule.js +13 -0
- package/lib/components/OfficesAtmsMap/renderCurrentDaySchedule.js.map +1 -0
- package/lib/components/OfficesAtmsMap/renderDay.d.ts +2 -0
- package/lib/components/OfficesAtmsMap/renderDay.js +10 -0
- package/lib/components/OfficesAtmsMap/renderDay.js.map +1 -0
- package/lib/components/OfficesAtmsMap/renderFiltrationForm.js +1 -1
- package/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/lib/components/OfficesAtmsMap/renderFoldButton.d.ts +3 -0
- package/lib/components/OfficesAtmsMap/renderFoldButton.js +6 -0
- package/lib/components/OfficesAtmsMap/renderFoldButton.js.map +1 -0
- package/lib/components/OfficesAtmsMap/renderOfficeCard.d.ts +1 -4
- package/lib/components/OfficesAtmsMap/renderOfficeCard.js +34 -21
- package/lib/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +66 -29
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +3 -3
- package/mobile/bundle/components/OfficesAtmsMap/renderCurrency.d.ts +3 -0
- package/mobile/bundle/components/OfficesAtmsMap/renderCurrentDaySchedule.d.ts +3 -0
- package/mobile/bundle/components/OfficesAtmsMap/renderDay.d.ts +3 -0
- package/mobile/bundle/components/OfficesAtmsMap/renderFoldButton.d.ts +3 -0
- package/mobile/bundle/components/OfficesAtmsMap/renderOfficeCard.d.ts +1 -4
- package/mobile/dist/components/OfficesAtmsMap/Badge.js +1 -1
- package/mobile/dist/components/OfficesAtmsMap/Badge.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/CardRow.js +1 -1
- package/mobile/dist/components/OfficesAtmsMap/CardRow.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +3 -3
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderAtmCard.js +8 -1
- package/mobile/dist/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderCurrency.d.ts +3 -0
- package/mobile/dist/components/OfficesAtmsMap/renderCurrency.js +7 -0
- package/mobile/dist/components/OfficesAtmsMap/renderCurrency.js.map +1 -0
- package/mobile/dist/components/OfficesAtmsMap/renderCurrentDaySchedule.d.ts +3 -0
- package/mobile/dist/components/OfficesAtmsMap/renderCurrentDaySchedule.js +16 -0
- package/mobile/dist/components/OfficesAtmsMap/renderCurrentDaySchedule.js.map +1 -0
- package/mobile/dist/components/OfficesAtmsMap/renderDay.d.ts +3 -0
- package/mobile/dist/components/OfficesAtmsMap/renderDay.js +13 -0
- package/mobile/dist/components/OfficesAtmsMap/renderDay.js.map +1 -0
- package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderFoldButton.d.ts +3 -0
- package/mobile/dist/components/OfficesAtmsMap/renderFoldButton.js +9 -0
- package/mobile/dist/components/OfficesAtmsMap/renderFoldButton.js.map +1 -0
- package/mobile/dist/components/OfficesAtmsMap/renderOfficeCard.d.ts +1 -4
- package/mobile/dist/components/OfficesAtmsMap/renderOfficeCard.js +36 -26
- package/mobile/dist/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/OfficesAtmsMap/Badge.js +1 -1
- package/mobile/lib/components/OfficesAtmsMap/Badge.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/CardRow.js +1 -1
- package/mobile/lib/components/OfficesAtmsMap/CardRow.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +3 -3
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderAtmCard.js +8 -1
- package/mobile/lib/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderCurrency.d.ts +3 -0
- package/mobile/lib/components/OfficesAtmsMap/renderCurrency.js +4 -0
- package/mobile/lib/components/OfficesAtmsMap/renderCurrency.js.map +1 -0
- package/mobile/lib/components/OfficesAtmsMap/renderCurrentDaySchedule.d.ts +3 -0
- package/mobile/lib/components/OfficesAtmsMap/renderCurrentDaySchedule.js +13 -0
- package/mobile/lib/components/OfficesAtmsMap/renderCurrentDaySchedule.js.map +1 -0
- package/mobile/lib/components/OfficesAtmsMap/renderDay.d.ts +3 -0
- package/mobile/lib/components/OfficesAtmsMap/renderDay.js +10 -0
- package/mobile/lib/components/OfficesAtmsMap/renderDay.js.map +1 -0
- package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderFoldButton.d.ts +3 -0
- package/mobile/lib/components/OfficesAtmsMap/renderFoldButton.js +6 -0
- package/mobile/lib/components/OfficesAtmsMap/renderFoldButton.js.map +1 -0
- package/mobile/lib/components/OfficesAtmsMap/renderOfficeCard.d.ts +1 -4
- package/mobile/lib/components/OfficesAtmsMap/renderOfficeCard.js +34 -21
- package/mobile/lib/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
- package/mobile/src/components/OfficesAtmsMap/Badge.tsx +1 -1
- package/mobile/src/components/OfficesAtmsMap/CardRow.tsx +1 -1
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapContent.ts +3 -3
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +2 -2
- package/mobile/src/components/OfficesAtmsMap/renderAtmCard.tsx +29 -10
- package/mobile/src/components/OfficesAtmsMap/renderCurrency.tsx +13 -0
- package/mobile/src/components/OfficesAtmsMap/renderCurrentDaySchedule.tsx +24 -0
- package/mobile/src/components/OfficesAtmsMap/renderDay.tsx +23 -0
- package/mobile/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +1 -1
- package/mobile/src/components/OfficesAtmsMap/renderFoldButton.tsx +17 -0
- package/mobile/src/components/OfficesAtmsMap/renderOfficeCard.tsx +72 -68
- package/package.json +1 -1
- package/src/components/OfficesAtmsMap/Badge.tsx +1 -1
- package/src/components/OfficesAtmsMap/CardRow.tsx +1 -1
- package/src/components/OfficesAtmsMap/OfficesAtmsMapContent.ts +3 -3
- package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +2 -2
- package/src/components/OfficesAtmsMap/renderAtmCard.tsx +29 -10
- package/src/components/OfficesAtmsMap/renderCurrency.tsx +13 -0
- package/src/components/OfficesAtmsMap/renderCurrentDaySchedule.tsx +24 -0
- package/src/components/OfficesAtmsMap/renderDay.tsx +23 -0
- package/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +1 -1
- package/src/components/OfficesAtmsMap/renderFoldButton.tsx +17 -0
- package/src/components/OfficesAtmsMap/renderOfficeCard.tsx +72 -68
package/bundle/bundle.umd.js
CHANGED
|
@@ -3159,9 +3159,9 @@
|
|
|
3159
3159
|
const cellsNode = cardCells.map(renderCardInfo);
|
|
3160
3160
|
const visibleCells = cellsNode.slice(0, VISIBLE_CELLS_COUNT);
|
|
3161
3161
|
const hiddenCells = cellsNode.slice(VISIBLE_CELLS_COUNT);
|
|
3162
|
-
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 ? jsx(LinkButton, { className: "w-full mt-m mb-lg", ...button }) : null, cardCells.length ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs("div", { children: [visibleCells, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenCells })] })), renderFoldButton: cardCells.length > 1 ? renderFoldButton$
|
|
3162
|
+
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 ? jsx(LinkButton, { className: "w-full mt-m mb-lg", ...button }) : null, cardCells.length ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs("div", { children: [visibleCells, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenCells })] })), renderFoldButton: cardCells.length > 1 ? renderFoldButton$2 : null })) : null] }));
|
|
3163
3163
|
});
|
|
3164
|
-
const renderFoldButton$
|
|
3164
|
+
const renderFoldButton$2 = ({ isUnfolded, onToggle }) => (jsxs("button", { className: "w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center", onClick: onToggle, children: [jsx("div", { children: isUnfolded ? 'Скрыть' : 'Подробнее о тарифе' }), jsx(Icon, { className: "text-primary-text", name: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16" })] }));
|
|
3165
3165
|
|
|
3166
3166
|
const gradientStyle = 'bg-gradient-to-r from-main-gradient-start to-main-gradient-end';
|
|
3167
3167
|
const borderStyle = 'border-gray border-solid border';
|
|
@@ -3257,7 +3257,7 @@
|
|
|
3257
3257
|
|
|
3258
3258
|
const NotFound = JSX(({ title, description }) => (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: "S", isEmbedded: true, align: AlignStyles })] })));
|
|
3259
3259
|
|
|
3260
|
-
const ICONS = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
3260
|
+
const ICONS$1 = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
3261
3261
|
const resultsGridStyle = 'space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box';
|
|
3262
3262
|
const BaseFiltrationInner = JSX(({ label = '', blocksToRender = [], topItemsCount = 0, block, notFound, ...rest }) => {
|
|
3263
3263
|
const [visibleBlocks, hiddenBlocks] = topItemsCount > 0
|
|
@@ -3265,7 +3265,7 @@
|
|
|
3265
3265
|
: [blocksToRender, []];
|
|
3266
3266
|
return (jsxs("div", { children: [jsx("div", { className: style(blocksToRender.length ? 'hidden' : 'block'), children: notFound ? jsx(NotFound, { ...notFound }) : null }), jsxs("div", { className: style('space-y-2xs', blocksToRender.length ? '' : 'hidden'), children: [jsxs("div", { className: style(resultsGridStyle), children: [renderBlocksList(visibleBlocks, { ...rest.options, parent: block }), isOdd(visibleBlocks.length) ? jsx(AdTile, { className: "col-span-6" }) : null] }), jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => {
|
|
3267
3267
|
return (jsxs(FoldableSection, { className: style(resultsGridStyle), isUnfolded: isUnfolded, children: [renderBlocksList(hiddenBlocks, { ...rest.options, parent: block }), isOdd(hiddenBlocks.length) ? jsx(AdTile, { className: "col-span-6" }) : null] }));
|
|
3268
|
-
}, renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(DefaultFoldButton, { className: style(topItemsCount < 1 ? 'hidden' : ''), disabled: !hiddenBlocks?.length, label: label, icon: ICONS[Number(isUnfolded)], dataTheme: rest.options?.page?.colorPalette, onClick: onToggle })) })] })] }));
|
|
3268
|
+
}, renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(DefaultFoldButton, { className: style(topItemsCount < 1 ? 'hidden' : ''), disabled: !hiddenBlocks?.length, label: label, icon: ICONS$1[Number(isUnfolded)], dataTheme: rest.options?.page?.colorPalette, onClick: onToggle })) })] })] }));
|
|
3269
3269
|
});
|
|
3270
3270
|
|
|
3271
3271
|
const isEmpty = (v) => v === null ||
|
|
@@ -4746,7 +4746,7 @@
|
|
|
4746
4746
|
workAllTime: 'Круглосуточно',
|
|
4747
4747
|
billAcceptorEnable: 'Прием наличных',
|
|
4748
4748
|
};
|
|
4749
|
-
const renderFiltrationForm = (filters, { field, reset }) => (jsxs("div", { className: "pb-2xl", children: [filters?.length ? (jsx("div", { className: "flex flex-wrap gap-3xl pb-2xl", children: filters.map((key) => (jsx(Checkbox, { text: FILTRATION_LABELS[key], ...field(key) }, key))) })) : null, jsx(LinkButton, { version: "transparent", className: "text-secondary-text [&>*]:p-0", onClick: reset, text: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440", appendRight: jsx(Icon, { name: "CloseIcon", width: "16", height: "16" }) })] }));
|
|
4749
|
+
const renderFiltrationForm = (filters, { field, reset }) => (jsxs("div", { className: "pb-2xl", children: [filters?.length ? (jsx("div", { className: "flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl", children: filters.map((key) => (jsx(Checkbox, { text: FILTRATION_LABELS[key], ...field(key) }, key))) })) : null, jsx(LinkButton, { version: "transparent", className: "text-secondary-text [&>*]:p-0", onClick: reset, text: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440", appendRight: jsx(Icon, { name: "CloseIcon", width: "16", height: "16" }) })] }));
|
|
4750
4750
|
|
|
4751
4751
|
const defaultRenderCard = () => null;
|
|
4752
4752
|
const defaultFilterItems = () => [];
|
|
@@ -4759,7 +4759,7 @@
|
|
|
4759
4759
|
const lengthItems = filteredItems.length;
|
|
4760
4760
|
return (jsxs("div", { className: style('space-y-1', className), children: [jsxs("div", { className: "bg-white", children: [jsxs("div", { className: "pt-6xl px-6xl", children: [jsxs("div", { className: "flex gap-xs pb-2xl", children: [jsx(Heading, { headingType: "h2", children: title }), lengthItems ? (jsx(Text, { size: "text-h2", color: "text-secondary-text", children: `(${lengthItems})` })) : null] }), descriptionData ? renderDescriptionBlock$1(descriptionData) : null, renderFiltrationForm(Object.keys(initFilterState), { field, reset })] }), jsx("div", { className: "h-[600px]", children: jsx(ClientOnly, { children: jsx(YandexMap, { points: points, className: "h-full" }) }) })] }), filteredItems.map(renderCard)] }));
|
|
4761
4761
|
});
|
|
4762
|
-
const renderDescriptionBlock$1 = ({ description, list }) => description || list?.length ? (jsxs("div", { className: "p-xl mb-2xl border border-
|
|
4762
|
+
const renderDescriptionBlock$1 = ({ description, list }) => description || list?.length ? (jsxs("div", { className: "p-xl mb-2xl border-b sm:border border-main-divider sm:rounded-md", children: [description ? (jsx(Paragraph, { size: "text-l", font: "font-light", children: description })) : null, list?.length ? (jsx("div", { className: "flex flex-col sm:flex-row gap-2xl sm:flex-wrap pt-xs", 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;
|
|
4763
4763
|
|
|
4764
4764
|
const colorStyle = {
|
|
4765
4765
|
yellow: { border: 'border-yellow-light', text: 'text-yellow' },
|
|
@@ -4767,7 +4767,7 @@
|
|
|
4767
4767
|
gray: { border: 'border-gray', text: 'text-secondary-text' },
|
|
4768
4768
|
red: { border: 'border-error/30', text: 'text-error' },
|
|
4769
4769
|
};
|
|
4770
|
-
const Badge = JSX(({ className, children, color = 'gray' }) => (jsx("div", { className: style('p-s border border-gray rounded-md flex items-center', colorStyle[color].border, className), children: jsx(Text, { size: "text-m", color: colorStyle[color].text, children: children }) })));
|
|
4770
|
+
const Badge = JSX(({ className, children, color = 'gray' }) => (jsx("div", { className: style('p-s sm:border sm:border-gray rounded-md flex items-center', colorStyle[color].border, className), children: jsx(Text, { size: "text-m", color: colorStyle[color].text, children: children }) })));
|
|
4771
4771
|
|
|
4772
4772
|
const CardCell = JSX(({ value, subText, children, ...props }) => {
|
|
4773
4773
|
const textItems = (Array.isArray(value) ? value : value?.split(',') ?? []).filter(Boolean);
|
|
@@ -4779,7 +4779,11 @@
|
|
|
4779
4779
|
const renderCardCell = ({ label, labelSize = 'text-m', textItems, subColor, subText, className, children, }) => (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 ||
|
|
4780
4780
|
textItems.filter(Boolean).map((text, i) => (jsx(Text, { size: "text-l", children: text.trim() }, String(i)))), subText ? (jsx(Text, { color: subColor, size: "text-m", children: subText })) : null] }));
|
|
4781
4781
|
|
|
4782
|
-
const CardRow = JSX(({ className, children }) => (jsx("div", { className: style('flex border-t border-solid border-main-divider py-xl gap-x-6xl gap-y-xl', className), children: children })));
|
|
4782
|
+
const CardRow = JSX(({ className, children }) => (jsx("div", { className: style('sm:flex sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl', className), children: children })));
|
|
4783
|
+
|
|
4784
|
+
const ICONS = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
4785
|
+
const labels = ['Подробнее', 'Скрыть'];
|
|
4786
|
+
const renderFoldButton$1 = ({ 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, children: [jsx("div", { className: "pr-m", children: labels[Number(isUnfolded)] }), jsx(Icon, { className: "text-primary-text", name: ICONS[Number(isUnfolded)], width: "16", height: "16" })] }));
|
|
4783
4787
|
|
|
4784
4788
|
const renderAtmCard = ({ location, address, billAcceptorType, terminalType, billAcceptorEnable, atmCode = '', atmAccess = '', workTime, }, index) => {
|
|
4785
4789
|
const additionalInfo = [
|
|
@@ -4798,7 +4802,11 @@
|
|
|
4798
4802
|
},
|
|
4799
4803
|
{ label: 'Регистрационный номер', value: atmCode },
|
|
4800
4804
|
];
|
|
4801
|
-
return (jsxs("div", { className: "bg-white col-span-12 p-3xl border-green border", children: [jsxs("div", { className: "flex justify-between", children: [
|
|
4805
|
+
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: capitalizedFirstLetter(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(Badge, { color: "green", children: capitalizedFirstLetter(workTime) })] }), jsx("div", { className: "hidden sm:block", children: jsx(CardRow, { className: "flex-wrap", children: additionalInfo?.map(renderInfo) }) }), jsx(Foldable, { className: "block sm:hidden", renderFoldableSection: ({ isUnfolded }) => {
|
|
4806
|
+
return (jsx(FoldableSection, { isUnfolded: isUnfolded, children: jsx(CardRow, { className: "flex-wrap", children: additionalInfo?.map(renderInfo) }) }));
|
|
4807
|
+
},
|
|
4808
|
+
//** TODO: Remove styles with refactoring DefaultFoldButton*/
|
|
4809
|
+
renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton$1({ isUnfolded, onToggle }) })] }, String(index)));
|
|
4802
4810
|
};
|
|
4803
4811
|
const renderInfo = (item, index) => (jsx(CardCell, { ...item }, String(index)));
|
|
4804
4812
|
const capitalizedFirstLetter = (text) => text ? `${text?.charAt(0)?.toUpperCase()}${text?.slice(1)}` : '';
|
|
@@ -4920,20 +4928,9 @@
|
|
|
4920
4928
|
};
|
|
4921
4929
|
const renderAlternativeDay = ({ short, status }, index) => (jsx("div", { className: style('w-9 h-9 rounded-md flex items-center justify-center', status ? 'bg-green-more-light text-green-dark' : 'bg-error/30 text-error'), children: jsx(Text, { size: "text-xs", children: short }) }, String(index)));
|
|
4922
4930
|
|
|
4923
|
-
const currentWeekDayIdx = new Date().getDay();
|
|
4924
|
-
const renderOfficeCard = ({ name, address, phone, fax, phoneBusiness, phoneNatural, phoneCallCentre, phoneCurrencyControl, workSchedule, exchangeRate, }, index) => {
|
|
4925
|
-
if (!workSchedule) {
|
|
4926
|
-
return null;
|
|
4927
|
-
}
|
|
4928
|
-
const workScheduleWeek = getWorkScheduleWeek(workSchedule);
|
|
4929
|
-
const labelSchedule = workSchedule?.businessScheduleVisibleTag
|
|
4930
|
-
? 'Для физических лиц'
|
|
4931
|
-
: 'Для физических и юридических лиц';
|
|
4932
|
-
return (jsxs("div", { className: "bg-white col-span-12 p-3xl border-green border", children: [jsxs("div", { className: "flex justify-between", children: [jsx(Text, { size: "text-h4", children: name }), renderCurrentDaySchedule(workScheduleWeek)] }), 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, jsxs(CardRow, { className: "flex-wrap", children: [jsx(CardCell, { label: "\u0424\u0430\u043A\u0441", value: fax }), jsx(CardCell, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D \u0444\u0438\u043B\u0438\u0430\u043B\u0430", value: phone }), jsx(CardCell, { label: "\u0414\u043B\u044F \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0439 \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043B\u0438\u0446", value: phoneBusiness }), jsx(CardCell, { label: "\u041E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u0435 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043B\u0438\u0446", value: phoneNatural }), jsx(CardCell, { label: "\u0414\u043B\u044F \u043A\u043E\u043D\u0441\u0443\u043B\u044C\u0442\u0430\u0446\u0438\u0439 \u043F\u043E \u0432\u0430\u043B\u044E\u0442\u043D\u043E\u043C\u0443 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u044E", value: phoneCurrencyControl }), jsx(CardCell, { label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442-\u0446\u0435\u043D\u0442\u0440", value: phoneCallCentre })] }), workSchedule.isMatchesPattern ? (jsx(CardRow, { children: jsx(CardCell, { label: labelSchedule, labelSize: "text-l", className: "w-full max-w-none", children: jsx("div", { className: "flex flex-wrap gap-xs sm:justify-between pt-xs", children: workScheduleWeek?.map(renderDay) }) }) })) : (jsxs(CardRow, { children: [jsx(CardCell, { label: labelSchedule, labelSize: "text-l", children: jsx("div", { className: "flex gap-1", children: workScheduleWeek?.map(renderAlternativeDay) }) }), getScheduleDescription(workScheduleWeek)] })), workSchedule?.businessScheduleVisibleTag
|
|
4933
|
-
? renderBusinessSchedule(workSchedule?.businessScheduleDescription)
|
|
4934
|
-
: null, exchangeRate?.currencies?.length ? (jsx(CardRow, { className: "flex-wrap", children: exchangeRate?.currencies?.map(renderCurrency) })) : null] }, String(index)));
|
|
4935
|
-
};
|
|
4936
4931
|
const renderCurrency = ({ currency, buyExchangeRate, saleExchangeRate }, i) => (jsxs("div", { className: "flex gap-lg h-full", children: [currency?.currency ? jsx(CardCell, { label: "\u0412\u0430\u043B\u044E\u0442\u0430", value: currency.currency }) : null, buyExchangeRate ? jsx(CardCell, { label: "\u041A\u0443\u043F\u0438\u0442\u044C", value: String(buyExchangeRate) }) : null, saleExchangeRate ? jsx(CardCell, { label: "\u041F\u0440\u043E\u0434\u0430\u0442\u044C", value: String(saleExchangeRate) }) : null] }, String(i)));
|
|
4932
|
+
|
|
4933
|
+
const currentWeekDayIdx = new Date().getDay();
|
|
4937
4934
|
//TODO: Add logic time https://github.com/redneckz/wildless-cms-uni-blocks/pull/1549
|
|
4938
4935
|
const renderCurrentDaySchedule = (workScheduleWeek) => {
|
|
4939
4936
|
const [currentWeekDay] = workScheduleWeek?.slice(currentWeekDayIdx - 1) ?? [];
|
|
@@ -4943,13 +4940,53 @@
|
|
|
4943
4940
|
const { lunchHour, status, workTime, hasLunch } = currentWeekDay;
|
|
4944
4941
|
return status ? (jsxs("div", { className: "flex gap-s items-start whitespace-nowrap", children: [workTime ? jsx(Badge, { color: "green", children: workTime }) : null, lunchHour && hasLunch ? jsx(Badge, { color: "yellow", children: `перерыв: ${lunchHour}` }) : null] })) : (jsx(Badge, { color: "red", children: "\u0412\u044B\u0445\u043E\u0434\u043D\u043E\u0439" }));
|
|
4945
4942
|
};
|
|
4946
|
-
|
|
4947
|
-
const getSubTextLunch = (lunchHour, hasLunch = false, status = false) => {
|
|
4943
|
+
|
|
4944
|
+
const getSubTextLunch = ({ lunchHour, hasLunch = false, status = false }) => {
|
|
4948
4945
|
if (!status) {
|
|
4949
4946
|
return 'Не работает';
|
|
4950
4947
|
}
|
|
4951
4948
|
return lunchHour && hasLunch ? `Перерыв ${lunchHour}` : lunchHour;
|
|
4952
4949
|
};
|
|
4950
|
+
const renderDay = ({ title, status, workTime, lunchHour, hasLunch }, index) => (jsx(CardCell, { label: title, value: status && workTime ? workTime : '', subText: getSubTextLunch({ lunchHour, hasLunch, status }), subColor: !status || hasLunch ? 'text-error' : 'text-green-dark' }, String(index)));
|
|
4951
|
+
|
|
4952
|
+
const renderOfficeCard = ({ name, address, phone, fax, phoneBusiness, phoneNatural, phoneCallCentre, phoneCurrencyControl, workSchedule, exchangeRate, }, index) => {
|
|
4953
|
+
if (!workSchedule) {
|
|
4954
|
+
return null;
|
|
4955
|
+
}
|
|
4956
|
+
const workScheduleWeek = getWorkScheduleWeek(workSchedule);
|
|
4957
|
+
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({
|
|
4958
|
+
phone,
|
|
4959
|
+
fax,
|
|
4960
|
+
phoneBusiness,
|
|
4961
|
+
phoneNatural,
|
|
4962
|
+
phoneCallCentre,
|
|
4963
|
+
phoneCurrencyControl,
|
|
4964
|
+
workSchedule,
|
|
4965
|
+
exchangeRate,
|
|
4966
|
+
}) }), jsx(Foldable, { className: "block sm:hidden", renderFoldableSection: ({ isUnfolded }) => {
|
|
4967
|
+
return (jsx(FoldableSection, { isUnfolded: isUnfolded, children: renderCardContent({
|
|
4968
|
+
phone,
|
|
4969
|
+
fax,
|
|
4970
|
+
phoneBusiness,
|
|
4971
|
+
phoneNatural,
|
|
4972
|
+
phoneCallCentre,
|
|
4973
|
+
phoneCurrencyControl,
|
|
4974
|
+
workSchedule,
|
|
4975
|
+
exchangeRate,
|
|
4976
|
+
}) }));
|
|
4977
|
+
},
|
|
4978
|
+
//** TODO: remove styles with refactoring DefaultFoldButton*/
|
|
4979
|
+
renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton$1({ isUnfolded, onToggle }) })] }, String(index)));
|
|
4980
|
+
};
|
|
4981
|
+
const renderCardContent = ({ phone, fax, phoneBusiness, phoneNatural, phoneCallCentre, phoneCurrencyControl, workSchedule, exchangeRate, }) => {
|
|
4982
|
+
const workScheduleWeek = getWorkScheduleWeek(workSchedule);
|
|
4983
|
+
const labelSchedule = workSchedule?.businessScheduleVisibleTag
|
|
4984
|
+
? 'Для физических лиц'
|
|
4985
|
+
: 'Для физических и юридических лиц';
|
|
4986
|
+
return (jsxs("div", { children: [jsxs(CardRow, { className: "flex-wrap", children: [jsx(CardCell, { label: "\u0424\u0430\u043A\u0441", value: fax }), jsx(CardCell, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D \u0444\u0438\u043B\u0438\u0430\u043B\u0430", value: phone }), jsx(CardCell, { label: "\u0414\u043B\u044F \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0439 \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043B\u0438\u0446", value: phoneBusiness }), jsx(CardCell, { label: "\u041E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u0435 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043B\u0438\u0446", value: phoneNatural }), jsx(CardCell, { label: "\u0414\u043B\u044F \u043A\u043E\u043D\u0441\u0443\u043B\u044C\u0442\u0430\u0446\u0438\u0439 \u043F\u043E \u0432\u0430\u043B\u044E\u0442\u043D\u043E\u043C\u0443 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u044E", value: phoneCurrencyControl }), jsx(CardCell, { label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442-\u0446\u0435\u043D\u0442\u0440", value: phoneCallCentre })] }), workSchedule?.isMatchesPattern ? (jsx(CardRow, { children: jsx(CardCell, { label: labelSchedule, labelSize: "text-l", className: "w-full max-w-none", children: jsx("div", { className: "flex flex-wrap gap-xs sm:justify-between pt-xs", children: workScheduleWeek?.map(renderDay) }) }) })) : (jsxs(CardRow, { children: [jsx(CardCell, { label: labelSchedule, labelSize: "text-l", children: jsx("div", { className: "flex gap-1", children: workScheduleWeek?.map(renderAlternativeDay) }) }), getScheduleDescription(workScheduleWeek)] })), workSchedule?.businessScheduleVisibleTag
|
|
4987
|
+
? renderBusinessSchedule(workSchedule?.businessScheduleDescription)
|
|
4988
|
+
: null, exchangeRate?.currencies?.length ? (jsx(CardRow, { className: "flex-wrap", children: exchangeRate?.currencies?.map(renderCurrency) })) : null] }));
|
|
4989
|
+
};
|
|
4953
4990
|
|
|
4954
4991
|
const EMPTY_VALUE$1 = [];
|
|
4955
4992
|
function useOffices(regionCode) {
|
|
@@ -5767,7 +5804,7 @@
|
|
|
5767
5804
|
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-3xl sticky bottom-0 pointer-events-auto" }) }));
|
|
5768
5805
|
}
|
|
5769
5806
|
|
|
5770
|
-
const packageVersion = "0.14.
|
|
5807
|
+
const packageVersion = "0.14.79";
|
|
5771
5808
|
|
|
5772
5809
|
exports.Blocks = Blocks;
|
|
5773
5810
|
exports.ContentPage = ContentPage;
|