/**
* WordPress dependencies
*/
import { useBlockProps, RichText } from "@wordpress/block-editor";
import { omit } from "lodash";
const { EBDisplayIcon, sanitizeURL } = window.EBControls;
import attributes from "./attributes";
const deprecated = [
{
attributes: { ...attributes },
supports: {
anchor: true,
},
save: ({ attributes }) => {
const {
blockId,
flipType,
frontIconOrImage,
frontImageUrl,
frontImageAlt,
frontIcon,
showFrontTitle,
frontTitle,
showFrontContent,
frontContent,
backIconOrImage,
backImageUrl,
backImageAlt,
backIcon,
showBackTitle,
backTitle,
showBackContent,
backContent,
link,
linkType,
buttonText,
buttonIcon,
buttonClasses,
contentPosition,
linkOpenNewTab,
flipMode,
isMouseLeaveOn,
classHook,
} = attributes;
const alignmentClass =
contentPosition === "center"
? " eb-flipbox-align-center"
: contentPosition === "right"
? " eb-flipbox-align-right"
: "";
const flipModeClass =
flipMode === "hover" ? " eb-hover-mode" : " eb-click-mode";
return (
{frontIconOrImage !== "none" && (
{frontIconOrImage === "image" &&
frontImageUrl && (
)}
{frontIconOrImage === "icon" &&
frontIcon && (
)}
)}
{showFrontTitle && (
{linkType === "title" && link ? (
) : (
)}
)}
{showFrontContent && (
)}
{backIconOrImage !== "none" && (
{backIconOrImage === "image" &&
backImageUrl && (
)}
{backIconOrImage === "icon" &&
backIcon && (
)}
)}
{showBackTitle && (
{linkType === "title" && link ? (
) : (
)}
)}
{showBackContent && (
)}
{linkType === "button" && (
)}
);
},
},
{
attributes: { ...attributes },
supports: {
anchor: true,
},
save: ({ attributes }) => {
const {
blockId,
flipType,
frontIconOrImage,
frontImageUrl,
frontImageAlt,
frontIcon,
showFrontTitle,
frontTitle,
showFrontContent,
frontContent,
backIconOrImage,
backImageUrl,
backImageAlt,
backIcon,
showBackTitle,
backTitle,
showBackContent,
backContent,
link,
linkType,
buttonText,
buttonIcon,
buttonClasses,
contentPosition,
linkOpenNewTab,
flipMode,
isMouseLeaveOn,
classHook,
} = attributes;
const alignmentClass =
contentPosition === "center"
? " eb-flipbox-align-center"
: contentPosition === "right"
? " eb-flipbox-align-right"
: "";
const flipModeClass =
flipMode === "hover" ? " eb-hover-mode" : " eb-click-mode";
return (
{frontIconOrImage !== "none" && (
{frontIconOrImage === "image" &&
frontImageUrl && (
)}
{frontIconOrImage === "icon" &&
frontIcon && (
)}
)}
{showFrontTitle && (
{linkType === "title" && link ? (
) : (
)}
)}
{showFrontContent && (
)}
{backIconOrImage !== "none" && (
{backIconOrImage === "image" &&
backImageUrl && (
)}
{backIconOrImage === "icon" &&
backIcon && (
)}
)}
{showBackTitle && (
{linkType === "title" && link ? (
) : (
)}
)}
{showBackContent && (
)}
{linkType === "button" && (
)}
);
},
},
{
attributes: omit({ ...attributes }, ["flipMode", "isMouseLeaveOn"]),
supports: {
anchor: true,
},
save: ({ attributes }) => {
const {
blockId,
flipType,
frontIconOrImage,
frontImageUrl,
frontImageAlt,
frontIcon,
showFrontTitle,
frontTitle,
showFrontContent,
frontContent,
backIconOrImage,
backImageUrl,
backImageAlt,
backIcon,
showBackTitle,
backTitle,
showBackContent,
backContent,
link,
linkType,
buttonText,
buttonIcon,
buttonClasses,
contentPosition,
linkOpenNewTab,
classHook,
} = attributes;
const alignmentClass =
contentPosition === "center"
? " eb-flipbox-align-center"
: contentPosition === "right"
? " eb-flipbox-align-right"
: "";
return (
{frontIconOrImage !== "none" && (
{frontIconOrImage === "image" &&
frontImageUrl && (
)}
{frontIconOrImage === "icon" &&
frontIcon && (
)}
)}
{showFrontTitle && (
{linkType === "title" &&
link ? (
) : (
)}
)}
{showFrontContent && (
)}
{backIconOrImage !== "none" && (
{backIconOrImage === "image" &&
backImageUrl && (
)}
{backIconOrImage === "icon" &&
backIcon && (
)}
)}
{showBackTitle && (
{linkType === "title" &&
link ? (
) : (
)}
)}
{showBackContent && (
)}
{linkType === "button" && (
)}
);
},
},
{
attributes: omit({ ...attributes }, ["frontImageAlt", "backImageAlt"]),
supports: {
anchor: true,
},
save: ({ attributes }) => {
const {
blockId,
flipType,
frontIconOrImage,
frontImageUrl,
frontIcon,
showFrontTitle,
frontTitle,
showFrontContent,
frontContent,
backIconOrImage,
backImageUrl,
backIcon,
showBackTitle,
backTitle,
showBackContent,
backContent,
link,
linkType,
buttonText,
buttonIcon,
buttonClasses,
contentPosition,
linkOpenNewTab,
classHook,
} = attributes;
const alignmentClass =
contentPosition === "center"
? " eb-flipbox-align-center"
: contentPosition === "right"
? " eb-flipbox-align-right"
: "";
return (
{frontIconOrImage !== "none" && (
{frontIconOrImage === "image" &&
frontImageUrl && (
)}
{frontIconOrImage === "icon" &&
frontIcon && (
)}
)}
{showFrontTitle && (
{linkType === "title" &&
link ? (
) : (
)}
)}
{showFrontContent && (
)}
{backIconOrImage !== "none" && (
{backIconOrImage === "image" &&
backImageUrl && (
)}
{backIconOrImage === "icon" &&
backIcon && (
)}
)}
{showBackTitle && (
{linkType === "title" &&
link ? (
) : (
)}
)}
{showBackContent && (
)}
{linkType === "button" && (
)}
);
},
},
{
attributes: { ...attributes },
supports: {
anchor: true,
},
save: ({ attributes }) => {
const {
blockId,
flipType,
frontIconOrImage,
frontImageUrl,
frontIcon,
showFrontTitle,
frontTitle,
showFrontContent,
frontContent,
backIconOrImage,
backImageUrl,
backIcon,
showBackTitle,
backTitle,
showBackContent,
backContent,
link,
linkType,
buttonText,
buttonIcon,
buttonClasses,
contentPosition,
linkOpenNewTab,
classHook,
} = attributes;
const alignmentClass =
contentPosition === "center"
? " eb-flipbox-align-center"
: contentPosition === "right"
? " eb-flipbox-align-right"
: "";
return (
{frontIconOrImage !== "none" && (
{frontIconOrImage === "image" &&
frontImageUrl && (
)}
{frontIconOrImage === "icon" &&
frontIcon && (
)}
)}
{showFrontTitle && (
{linkType === "title" &&
link ? (
{frontTitle}
) : (
{frontTitle}
)}
)}
{showFrontContent && (
)}
{backIconOrImage !== "none" && (
{backIconOrImage === "image" &&
backImageUrl && (
)}
{backIconOrImage === "icon" &&
backIcon && (
)}
)}
{showBackTitle && (
{linkType === "title" &&
link ? (
{backTitle}
) : (
{backTitle}
)}
)}
{showBackContent && (
)}
{linkType === "button" && (
)}
);
},
},
{
attributes: { ...attributes },
supports: {
anchor: true,
},
save: ({ attributes }) => {
const {
blockId,
flipType,
frontIconOrImage,
frontImageUrl,
frontIcon,
showFrontTitle,
frontTitle,
showFrontContent,
frontContent,
backIconOrImage,
backImageUrl,
backIcon,
showBackTitle,
backTitle,
showBackContent,
backContent,
link,
linkType,
buttonText,
buttonIcon,
buttonClasses,
contentPosition,
} = attributes;
const alignmentClass =
contentPosition === "center"
? " eb-flipbox-align-center"
: contentPosition === "right"
? " eb-flipbox-align-right"
: "";
return (
{frontIconOrImage !== "none" && (
{frontIconOrImage === "image" &&
frontImageUrl && (
)}
{frontIconOrImage === "icon" &&
frontIcon && (
)}
)}
{showFrontTitle && (
{linkType === "title" && link ? (
{frontTitle}
) : (
{frontTitle}
)}
)}
{showFrontContent && (
)}
{backIconOrImage !== "none" && (
{backIconOrImage === "image" &&
backImageUrl && (
)}
{backIconOrImage === "icon" &&
backIcon && (
)}
)}
{showBackTitle && (
{linkType === "title" && link ? (
{backTitle}
) : (
{backTitle}
)}
)}
{showBackContent && (
)}
{linkType === "button" && (
)}
);
},
},
{
attributes: omit(
{
...attributes,
},
["contentPosition"]
),
save: ({ attributes }) => {
const {
blockId,
flipType,
frontIconOrImage,
frontImageUrl,
frontIcon,
showFrontTitle,
frontTitle,
showFrontContent,
frontContent,
backIconOrImage,
backImageUrl,
backIcon,
showBackTitle,
backTitle,
showBackContent,
backContent,
link,
linkType,
buttonText,
buttonIcon,
buttonClasses,
} = attributes;
return (
{frontIconOrImage !== "none" && (
{frontIconOrImage === "image" &&
frontImageUrl && (
)}
{frontIconOrImage === "icon" &&
frontIcon && (
)}
)}
{showFrontTitle && (
{linkType === "title" && link ? (
{frontTitle}
) : (
{frontTitle}
)}
)}
{showFrontContent && (
)}
{backIconOrImage !== "none" && (
{backIconOrImage === "image" &&
backImageUrl && (
)}
{backIconOrImage === "icon" &&
backIcon && (
)}
)}
{showBackTitle && (
{linkType === "title" && link ? (
{backTitle}
) : (
{backTitle}
)}
)}
{showBackContent && (
)}
{linkType === "button" && (
)}
);
},
},
];
export default deprecated;
adlen, Author at SIPSA FILAHA
Aller au contenu