import { __ } from "@wordpress/i18n"; import { Toggle, Layouts, SPRangeControl, SelectField, InputControl } from "../../components"; import { openLinksOptions } from "../../controls/constants"; import useLayouts from "../../hooks/useLayouts"; import { AlignCenter, AlignLeft, AlignRight } from "../../icons/icons"; import ContentOrientations from "../shared/templates/templates-parts/contentOrientations"; import SPToggleGroupControl from "../../components/toggleGroupControl/toggleGroupControl"; import { useMemo } from "@wordpress/element"; import ProInfo from "../../components/proInfo/proInfo"; export const PostTimelineGeneralTab = ({ attributes, setAttributes }) => { const { equalHeightEnable, blockName, generalLinkOpen, carouselGap, timelineLayout, preloaderEnable, contentOrientation, contentAlignment, postCardPadding, postCardBorder, postCardBorderWidth, contentAreaPadding, liveFilterEnable, postLimit, } = attributes; const layouts = useLayouts(blockName, timelineLayout); const orientation_five = useMemo( () => ({ postCardPadding: { ...postCardPadding, device: { ...postCardPadding.device, Desktop: { top: 15, right: 15, bottom: 15, left: 15, }, }, }, postCardBorder: { ...postCardBorder, style: "solid", color: "#dddddd", }, postCardBorderWidth: { ...postCardBorderWidth, device: { ...postCardBorderWidth.device, Desktop: { top: 1, right: 1, bottom: 1, left: 1 }, }, }, contentAlignment: "left", contentAreaPadding: { ...contentAreaPadding, device: { ...contentAreaPadding.device, Desktop: { top: "", right: "", bottom: "", left: "" }, }, }, }), [] ); const orientation_other = useMemo( () => ({ postCardPadding: { ...postCardPadding, device: { ...postCardPadding.device, Desktop: { top: "", right: "", bottom: "", left: "" }, }, }, postCardBorder: { ...postCardBorder, style: "none" }, contentAlignment: "left", contentAreaPadding: { ...contentAreaPadding, device: { ...contentAreaPadding.device, Desktop: { top: 0, right: 20, bottom: 15, left: 20 }, }, }, }), [] ); const orientationHandler = (newValue) => { if (newValue === contentOrientation) return; const newData = { ...(newValue === "orientation_five" ? orientation_five : orientation_other), contentOrientation: newValue, }; setAttributes(newData); }; return ( <> {/* */} , value: "left" }, { label: , value: "center" }, { label: , value: "right" }, ]} /> Unlock exclusive layouts and advanced display controls. Upgrade to Pro! ); }; export const PostTimelineConnectorTab = ({ attributes, setAttributes }) => { const { timelineSize, timelineWidth, timelineHeight, timelineConnectorWidth } = attributes; return ( <>
Icon Source
); }; export const PostTimelineCarouselTab = ({ attributes, setAttributes }) => { const { // postTimelineNavArrow, postTimelineAutoPlay, postTimelineAutoPlayDelay, carouselPauseOnHover, carouselDirection, carouselStyle, carouselColumn, timelineLayout, carouselSpeed, postTimelineTickerSpeed, carouselNavArrow, } = attributes; return ( <> {timelineLayout !== "timeline-three-layout-two" && ( )} {carouselStyle === "standard" && ( )} {postTimelineAutoPlay && ( <> {carouselStyle === "standard" && ( )} )} {"ticker" !== carouselStyle && ( )} {"ticker" === carouselStyle && ( )} {(postTimelineAutoPlay || carouselStyle === "ticker") && ( )} {postTimelineAutoPlay && ( <> )} {(carouselStyle === "standard" || timelineLayout === "timeline-three-layout-two") && ( )} ); };