@redneckz/wildless-cms-uni-blocks 0.14.309 → 0.14.311
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 +12 -9
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/OfficesAtmsMap/renderFiltrationForm.d.ts +2 -2
- package/dist/components/OfficesAtmsMap/Badge.js +1 -1
- package/dist/components/OfficesAtmsMap/Badge.js.map +1 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/dist/components/OfficesAtmsMap/renderAtmCard.js +1 -1
- package/dist/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
- package/dist/components/OfficesAtmsMap/renderFiltrationForm.d.ts +2 -2
- package/dist/components/OfficesAtmsMap/renderFiltrationForm.js +5 -4
- package/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/dist/ui-kit/BlockWrapper.js +2 -1
- package/dist/ui-kit/BlockWrapper.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/OfficesAtmsMapLayout.js +2 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/lib/components/OfficesAtmsMap/renderAtmCard.js +1 -1
- package/lib/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
- package/lib/components/OfficesAtmsMap/renderFiltrationForm.d.ts +2 -2
- package/lib/components/OfficesAtmsMap/renderFiltrationForm.js +5 -4
- package/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/lib/ui-kit/BlockWrapper.js +2 -1
- package/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +12 -9
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/OfficesAtmsMap/renderFiltrationForm.d.ts +2 -2
- package/mobile/dist/components/OfficesAtmsMap/Badge.js +1 -1
- package/mobile/dist/components/OfficesAtmsMap/Badge.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderAtmCard.js +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.d.ts +2 -2
- package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js +5 -4
- package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/mobile/dist/ui-kit/BlockWrapper.js +2 -1
- package/mobile/dist/ui-kit/BlockWrapper.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/OfficesAtmsMapLayout.js +2 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderAtmCard.js +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.d.ts +2 -2
- package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js +5 -4
- package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/mobile/lib/ui-kit/BlockWrapper.js +2 -1
- package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/src/components/OfficesAtmsMap/Badge.tsx +1 -1
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMap.example.json +26 -6
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +4 -2
- package/mobile/src/components/OfficesAtmsMap/renderAtmCard.tsx +3 -1
- package/mobile/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +25 -25
- package/mobile/src/ui-kit/BlockWrapper.tsx +4 -1
- package/package.json +1 -1
- package/src/components/OfficesAtmsMap/Badge.tsx +1 -1
- package/src/components/OfficesAtmsMap/OfficesAtmsMap.example.json +26 -6
- package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +4 -2
- package/src/components/OfficesAtmsMap/renderAtmCard.tsx +3 -1
- package/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +25 -25
- package/src/ui-kit/BlockWrapper.tsx +4 -1
package/bundle/bundle.umd.js
CHANGED
|
@@ -143,7 +143,8 @@
|
|
|
143
143
|
const router = useRouter();
|
|
144
144
|
const [isHidden, setHidden] = useState(false);
|
|
145
145
|
useEffect(() => defaultEventBus.subscribe('tab', (event) => {
|
|
146
|
-
if (
|
|
146
|
+
if (event.type === 'group' &&
|
|
147
|
+
(!event.groupName || event.groupName === block?.labelGroup)) {
|
|
147
148
|
setHidden(Boolean(event.label && block?.labels?.length && !block.labels.includes(event.label)));
|
|
148
149
|
}
|
|
149
150
|
}), [block, router]);
|
|
@@ -4975,23 +4976,25 @@
|
|
|
4975
4976
|
transferringDataToBiometricSystem: 'Передача фото и голоса в Единую биометрическую систему',
|
|
4976
4977
|
};
|
|
4977
4978
|
const COMMON_FILTERS_STYLES = 'flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl';
|
|
4978
|
-
const renderFiltrationForm = (filters, { field, reset },
|
|
4979
|
+
const renderFiltrationForm = (filters, { field, reset }, onlyOffice) => {
|
|
4980
|
+
const visibleFiltersNum = onlyOffice ? 3 : 4;
|
|
4979
4981
|
const filtersCheckbox = (filters || []).map((key) => (jsx(Checkbox, { text: FILTRATION_LABELS[key], ...field(key) }, key)));
|
|
4980
4982
|
const [visibleFilters, hiddenFilters] = visibleFiltersNum > 0
|
|
4981
4983
|
? [filtersCheckbox.slice(0, visibleFiltersNum), filtersCheckbox.slice(visibleFiltersNum)]
|
|
4982
4984
|
: [filtersCheckbox, []];
|
|
4983
|
-
return (jsx("div", { children: filters?.length ? (jsx("div", { children:
|
|
4985
|
+
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$2(reset, onlyOffice) }) })) : null }));
|
|
4984
4986
|
};
|
|
4985
|
-
const renderFoldButton$2 = (reset) => ({ isUnfolded, onToggle }) => {
|
|
4987
|
+
const renderFoldButton$2 = (reset, onlyOffice) => ({ isUnfolded, onToggle }) => {
|
|
4986
4988
|
const labels = ['Больше фильтров', 'Меньше фильтров'];
|
|
4987
4989
|
const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
4988
|
-
return (jsxs("div", { className: "flex", children: [jsx(LinkButton, { version: "transparent", className: "text-secondary-text [&>*]:p-0
|
|
4990
|
+
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, text: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440", appendRight: jsx(Icon, { name: "CloseIcon", width: "16", height: "16" }) })] }));
|
|
4989
4991
|
};
|
|
4990
4992
|
|
|
4991
4993
|
const defaultEmptyFunction = () => void 0;
|
|
4992
4994
|
const defaultFilterItems = () => [];
|
|
4993
4995
|
const filtersVisibleStyles = (activeButton) => activeButton === 'all' ? 'block' : 'hidden';
|
|
4994
4996
|
const OfficesAtmsMapLayout = JSX(({ className, data = [], renderCard = defaultEmptyFunction, filterItems = defaultFilterItems, getBalloon = defaultEmptyFunction, initFilterState = {}, descriptionData, title, }) => {
|
|
4997
|
+
const onlyOffice = title?.includes('Офис');
|
|
4995
4998
|
const [filtrationState, { field, reset }] = useForm(initFilterState);
|
|
4996
4999
|
const [filteredItems, points, lengthItems] = useMemo(() => {
|
|
4997
5000
|
const _filteredItems = filterItems(data, filtrationState);
|
|
@@ -5004,7 +5007,7 @@
|
|
|
5004
5007
|
return [_filteredItems, _points, _filteredItems.length];
|
|
5005
5008
|
}, [data, filtrationState]);
|
|
5006
5009
|
const [activeButton, setActiveButton] = useState('all');
|
|
5007
|
-
return (jsxs("div", { className: style('space-y-1', className), children: [jsxs("div", { className: "bg-white", children: [jsxs("div", { className: "p-6xl pb-0", children: [jsxs("div", { className: "flex flex-col sm:flex-row gap-xs mb-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, renderButtonsGroup(data, activeButton, setActiveButton), jsx("div", { className: style('pb-2xl', filtersVisibleStyles(activeButton)), children: 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)] }));
|
|
5010
|
+
return (jsxs("div", { className: style('space-y-1', className), children: [jsxs("div", { className: "bg-white", children: [jsxs("div", { className: "p-6xl pb-0", children: [jsxs("div", { className: "flex flex-col sm:flex-row gap-xs mb-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, onlyOffice && renderButtonsGroup(data, activeButton, setActiveButton), jsx("div", { className: style('pb-2xl', filtersVisibleStyles(activeButton)), children: renderFiltrationForm(Object.keys(initFilterState), { field, reset }, onlyOffice) })] }), jsx("div", { className: "h-[600px]", children: jsx(ClientOnly, { children: jsx(YandexMap, { points: points, className: "h-full" }) }) })] }), filteredItems.map(renderCard)] }));
|
|
5008
5011
|
});
|
|
5009
5012
|
const renderButtonsGroup = (data, activeButton, setActiveButton) => {
|
|
5010
5013
|
const allButtonVersion = activeButton === 'all' ? 'primary' : 'secondary';
|
|
@@ -5028,7 +5031,7 @@
|
|
|
5028
5031
|
gray: { border: 'border-gray', text: 'text-secondary-text' },
|
|
5029
5032
|
red: { border: 'border-error/30', text: 'text-error' },
|
|
5030
5033
|
};
|
|
5031
|
-
const Badge = JSX(({ className, children, color = 'gray' }) => (jsxs("div", { className: style('sm:p-s sm:border sm:border-
|
|
5034
|
+
const Badge = JSX(({ className, children, color = 'gray' }) => (jsxs("div", { className: style('sm:p-s sm:border sm:border-green rounded-md flex items-center', colorStyle[color].border, className), children: [jsx("div", { className: "block pr-m sm:pr-0 sm:hidden", children: jsx(Img, { image: { icon: 'SmallClockIcon' }, width: "24", height: "24" }) }), jsx(Text, { size: "text-m", color: colorStyle[color].text, children: children })] })));
|
|
5032
5035
|
|
|
5033
5036
|
const CardCell = JSX(({ value, subText, children, ...props }) => {
|
|
5034
5037
|
const textItems = (Array.isArray(value) ? value : value?.split(',') ?? []).filter(Boolean);
|
|
@@ -5063,7 +5066,7 @@
|
|
|
5063
5066
|
},
|
|
5064
5067
|
{ label: 'Регистрационный номер', value: atmCode },
|
|
5065
5068
|
];
|
|
5066
|
-
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$1(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$1(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 }) => {
|
|
5069
|
+
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$1(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, { color: "green", children: capitalizedFirstLetter$1(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 }) => {
|
|
5067
5070
|
return (jsx(FoldableSection, { isUnfolded: isUnfolded, children: jsx(CardRow, { className: "flex-wrap", children: additionalInfo?.map(renderInfo) }) }));
|
|
5068
5071
|
},
|
|
5069
5072
|
//** TODO: Remove styles with refactoring DefaultFoldButton*/
|
|
@@ -6188,7 +6191,7 @@
|
|
|
6188
6191
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6189
6192
|
});
|
|
6190
6193
|
|
|
6191
|
-
const packageVersion = "0.14.
|
|
6194
|
+
const packageVersion = "0.14.310";
|
|
6192
6195
|
|
|
6193
6196
|
exports.Blocks = Blocks;
|
|
6194
6197
|
exports.ContentPage = ContentPage;
|