403Webshell
Server IP : 192.158.238.246  /  Your IP : 18.227.183.215
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/7779/cwd/plugins/gutenkit-blocks-addon/src/blocks/business-hours/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/7779/cwd/plugins/gutenkit-blocks-addon/src/blocks/business-hours/style.js
const BlockStyle = (attributes) => {
	const {
		parseCSS,
		backgroundGenerator,
		getBoxValue,
		getBorderValue,
		getTypographyValue,
	} = window.gutenkit.helpers;
	const WRAPPER = attributes.blockClass;
	const getRepeaterValue = (repeaterKey) => {
		const repeaterValue = repeaterKey.map((key, index) => {
			return [
				{
					selector: `.${WRAPPER} .gkit-business-hours .gkit-single-day-item-${Number(index)}.gkit-highlight-this-day`,
					'background': key['gkitSingleBusinessBackgroundColor'],
				},
				{
					selector: `.${WRAPPER} .gkit-business-hours .gkit-single-day-item-${Number(index)}.gkit-highlight-this-day .gkit-business-day`,
					'color': key['gkitSingleBusinessDayColor'],
				},
				{
					selector: `.${WRAPPER} .gkit-business-hours .gkit-single-day-item-${Number(index)}.gkit-highlight-this-day .gkit-business-time`,
					'color': key['gkitSingleBusinessTimeColor'],
				},
			]
		})
		let CSSVALUE = [];
		repeaterValue.forEach((item) => {
			CSSVALUE = [...CSSVALUE, ...item];
		})

		return CSSVALUE;
	}

	const rawSyle = {
		desktop: [
			{
				selector: `.${WRAPPER}.wp-block-gutenkit-business-hours .gkit-business-hours .gkit-single-day`,
				...getBoxValue(attributes?.gkitBusinessItemMarginDesktop, "margin"),
				...getBoxValue(attributes?.gkitBusinessItemPaddingDesktop, "padding"),
				...backgroundGenerator(attributes?.gkitBusinessItemBackground, "Desktop"),
				...getBoxValue(attributes?.gkitBusinessItemItemRadiusDesktop, "border-radius"),
				...getBorderValue(attributes?.gkitBusinessItemBorder),
			},
			...getRepeaterValue(attributes?.gkitBusinessOpendayList),
			{
				selector: `.${WRAPPER} .gkit-business-hours .gkit-single-day .gkit-business-day`,
				'color': attributes?.gkitBusinessDayColor,
				...getTypographyValue(attributes?.gkitBusinessDayTypography, "Desktop"),
				...backgroundGenerator(attributes?.gkitBusinessDayBackground, "Desktop"),
				...getBoxValue(attributes?.gkitBusinessItemDayRadiusDesktop, "border-radius"),
				...getBoxValue(attributes?.gkitBusinessItemDayPaddingDesktop, "padding"),
			},
			{
				selector: `.${WRAPPER} .gkit-business-hours .gkit-single-day .gkit-business-time`,
				'color': attributes?.gkitBusinessTimeColor,
				...getTypographyValue(attributes?.gkitBusinessTimeTypography, "Desktop"),
				...backgroundGenerator(attributes?.gkitBusinessTimeBackground, "Desktop"),
				...getBoxValue(attributes?.gkitBusinessItemTimeRadiusDesktop, "border-radius"),
				...getBoxValue(attributes?.gkitBusinessItemTimePaddingDesktop, "padding"),
			},
		],
		tablet: [
			{
				selector: `.${WRAPPER} .gkit-business-hours .gkit-single-day`,
				...getBoxValue(attributes?.gkitBusinessItemMarginTablet, "margin"),
				...getBoxValue(attributes?.gkitBusinessItemPaddingTablet, "padding"),
				...backgroundGenerator(attributes?.gkitBusinessItemBackground, "Tablet"),
				...getBoxValue(attributes?.gkitBusinessItemItemRadiusTablet, "border-radius"),
			},
			{
				selector: `.${WRAPPER} .gkit-business-hours .gkit-single-day .gkit-business-day`,
				...getTypographyValue(attributes?.gkitBusinessDayTypography, "Tablet"),
				...backgroundGenerator(attributes?.gkitBusinessDayBackground, "Tablet"),
				...getBoxValue(attributes?.gkitBusinessItemDayRadiusTablet, "border-radius"),
				...getBoxValue(attributes?.gkitBusinessItemDayPaddingTablet, "padding"),
			},
			{
				selector: `.${WRAPPER} .gkit-business-hours .gkit-single-day .gkit-business-time`,
				...getTypographyValue(attributes?.gkitBusinessTimeTypography, "Tablet"),
				...backgroundGenerator(attributes?.gkitBusinessTimeBackground, "Tablet"),
				...getBoxValue(attributes?.gkitBusinessItemTimeRadiusTablet, "border-radius"),
				...getBoxValue(attributes?.gkitBusinessItemTimePaddingTablet, "padding"),
			},
		],
		mobile: [
			{
				selector: `.${WRAPPER} .gkit-business-hours .gkit-single-day`,
				...getBoxValue(attributes?.gkitBusinessItemMarginMobile, "margin"),
				...getBoxValue(attributes?.gkitBusinessItemPaddingMobile, "padding"),
				...backgroundGenerator(attributes?.gkitBusinessItemBackground, "Mobile"),
				...getBoxValue(attributes?.gkitBusinessItemItemRadiusMobile, "border-radius"),
			},
			{
				selector: `.${WRAPPER} .gkit-business-hours .gkit-single-day .gkit-business-day`,
				...getTypographyValue(attributes?.gkitBusinessDayTypography, "Mobile"),
				...backgroundGenerator(attributes?.gkitBusinessDayBackground, "Mobile"),
				...getBoxValue(attributes?.gkitBusinessItemDayRadiusMobile, "border-radius"),
				...getBoxValue(attributes?.gkitBusinessItemDayPaddingMobile, "padding"),
			},
			{
				selector: `.${WRAPPER} .gkit-business-hours .gkit-single-day .gkit-business-time`,
				...getTypographyValue(attributes?.gkitBusinessTimeTypography, "Mobile"),
				...backgroundGenerator(attributes?.gkitBusinessTimeBackground, "Mobile"),
				...getBoxValue(attributes?.gkitBusinessItemTimeRadiusMobile, "border-radius"),
				...getBoxValue(attributes?.gkitBusinessItemTimePaddingMobile, "padding"),
			},
		]
	}

	return parseCSS(rawSyle);
}

export default BlockStyle;

Youez - 2016 - github.com/yon3zu
LinuXploit