@redneckz/wildless-cms-uni-blocks 0.14.462 → 0.14.463
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/migration-scripts/0.14.455.js +22 -0
- package/bundle/bundle.umd.js +4 -5
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/StepsBlock/renderStep.d.ts +0 -1
- package/dist/components/StepsBlock/StepsBlock.js +1 -2
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/renderStep.d.ts +0 -1
- package/dist/components/StepsBlock/renderStep.js +2 -2
- package/dist/components/StepsBlock/renderStep.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +1 -2
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/renderStep.d.ts +0 -1
- package/lib/components/StepsBlock/renderStep.js +2 -2
- package/lib/components/StepsBlock/renderStep.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +1 -1
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/StepsBlock/renderStep.d.ts +0 -1
- package/mobile/dist/components/StepsBlock/renderStep.d.ts +0 -1
- package/mobile/dist/components/StepsBlock/renderStep.js +2 -2
- package/mobile/dist/components/StepsBlock/renderStep.js.map +1 -1
- package/mobile/lib/components/StepsBlock/renderStep.d.ts +0 -1
- package/mobile/lib/components/StepsBlock/renderStep.js +2 -2
- package/mobile/lib/components/StepsBlock/renderStep.js.map +1 -1
- package/mobile/src/components/StepsBlock/renderStep.tsx +2 -3
- package/package.json +1 -1
- package/src/components/StepsBlock/StepsBlock.tsx +1 -3
- package/src/components/StepsBlock/renderStep.tsx +2 -3
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { traversePageBlocks } from '../utils.js';
|
|
2
|
+
|
|
3
|
+
export const description = 'v0.14.455';
|
|
4
|
+
export default traversePageBlocks(removeButtonByKey);
|
|
5
|
+
|
|
6
|
+
function removeButtonByKey(block) {
|
|
7
|
+
if (block.type !== 'StepsBlock') {
|
|
8
|
+
return block;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
if (block.content.buttons && block.content.buttons.some((button) => button.text === 'Кнопка')) {
|
|
12
|
+
delete block.content.buttons;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
block.content.steps?.forEach((step) => {
|
|
16
|
+
if (step?.button?.text === 'Кнопка') {
|
|
17
|
+
delete step.button;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
return block;
|
|
22
|
+
}
|
package/bundle/bundle.umd.js
CHANGED
|
@@ -5907,9 +5907,9 @@
|
|
|
5907
5907
|
const STEP_BREAKPOINT = 4;
|
|
5908
5908
|
// TODO: Create universal function for this case
|
|
5909
5909
|
const renderStep = (props) => (step, i, arr) => {
|
|
5910
|
-
const { styleMap,
|
|
5910
|
+
const { styleMap, version } = props;
|
|
5911
5911
|
const { label, description, button, isDotted } = step;
|
|
5912
|
-
return (jsxs("div", { className: style('relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl', getContainerWidth(arr.length)), children: [jsxs("div", { className: "space-y-xs", children: [label ? (jsx(Text, { size: "text-h6", align: "text-center", children: label })) : null, jsxs("div", { className: "flex flex-col items-center gap-3xs", children: [description ? jsx("div", { className: styleMap.description, children: description }) : null, jsx(RichText, { __html: step.__html, itemSize: "list-s", isDotted: isDotted })] })] }), button?.text
|
|
5912
|
+
return (jsxs("div", { className: style('relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl', getContainerWidth(arr.length)), children: [jsxs("div", { className: "space-y-xs", children: [label ? (jsx(Text, { size: "text-h6", align: "text-center", children: label })) : null, jsxs("div", { className: "flex flex-col items-center gap-3xs", children: [description ? jsx("div", { className: styleMap.description, children: description }) : null, jsx(RichText, { __html: step.__html, itemSize: "list-s", isDotted: isDotted })] })] }), button?.text ? (jsx(LinkButton, { className: "box-border py-s w-full max-w-60 mt-auto", version: version, ...button, children: button?.text })) : null] }, String(i)));
|
|
5913
5913
|
};
|
|
5914
5914
|
const getContainerWidth = (length) => (length < STEP_BREAKPOINT ? 'w-72' : 'w-52');
|
|
5915
5915
|
|
|
@@ -5929,8 +5929,7 @@
|
|
|
5929
5929
|
const lineOpacity = getLineOpacity(showLines);
|
|
5930
5930
|
const paddingXNormal = stepsLength < STEP_BREAKPOINT ? 'px-24' : 'px-16';
|
|
5931
5931
|
const paddingXSmall = stepsLength < STEP_BREAKPOINT ? 'px-28' : 'px-20';
|
|
5932
|
-
|
|
5933
|
-
return (jsxs(BlockWrapper, { className: style('box-border flex flex-col items-center overflow-hidden gap-y-3xl', className), defaultPadding: "p-6xl", version: version, ...rest, children: [jsx(Headline, { headlineVersion: "S", title: title, description: description, isEmbedded: true, className: "w-full", align: AlignStyles }), steps?.length ? (jsxs("div", { className: "box-border space-y-lg flex flex-col justify-center", children: [jsx("div", { className: style('flex items-center', size === 'normal' ? paddingXNormal : paddingXSmall), children: joinList(jsx("div", { className: style('h-0.5 w-full bg-secondary-light flex-1', lineOpacity) }))(steps.map(renderStepIcon(styleMap, size, stepVersion))) }), jsx("div", { className: style('flex justify-between', shortGaps ? 'gap-x-s' : 'gap-x-20'), children: steps.map(renderStep({ styleMap, isMainButton, version })) })] })) : null, renderButtonsSection(buttons)] }));
|
|
5932
|
+
return (jsxs(BlockWrapper, { className: style('box-border flex flex-col items-center overflow-hidden gap-y-3xl', className), defaultPadding: "p-6xl", version: version, ...rest, children: [jsx(Headline, { headlineVersion: "S", title: title, description: description, isEmbedded: true, className: "w-full", align: AlignStyles }), steps?.length ? (jsxs("div", { className: "box-border space-y-lg flex flex-col justify-center", children: [jsx("div", { className: style('flex items-center', size === 'normal' ? paddingXNormal : paddingXSmall), children: joinList(jsx("div", { className: style('h-0.5 w-full bg-secondary-light flex-1', lineOpacity) }))(steps.map(renderStepIcon(styleMap, size, stepVersion))) }), jsx("div", { className: style('flex justify-between', shortGaps ? 'gap-x-s' : 'gap-x-20'), children: steps.map(renderStep({ styleMap, version })) })] })) : null, renderButtonsSection(buttons)] }));
|
|
5934
5933
|
});
|
|
5935
5934
|
const renderStepIcon = (styleMap, size, stepVersion) => ({ icon }, i) => {
|
|
5936
5935
|
const iconVersion = stepVersion === 'secondary' ? 'white' : 'color';
|
|
@@ -6559,7 +6558,7 @@
|
|
|
6559
6558
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6560
6559
|
});
|
|
6561
6560
|
|
|
6562
|
-
const packageVersion = "0.14.
|
|
6561
|
+
const packageVersion = "0.14.462";
|
|
6563
6562
|
|
|
6564
6563
|
exports.Blocks = Blocks;
|
|
6565
6564
|
exports.ContentPage = ContentPage;
|