$56 GRAYBYTE WORDPRESS FILE MANAGER $80

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.157
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/var/softaculous/sitepad/editor/site-data/plugins/pagelayer/js/react/src/components/

HOME
Current File : /var/softaculous/sitepad/editor/site-data/plugins/pagelayer/js/react/src/components//select.js
import { useState } from '@wordpress/element';
import { LabelControl } from './label';

export const SelectControl = (props) =>{
	
	const { prop, label, value, setAttributes, attributes } = props;
	const { name } = prop['c'];
	
	const handleSelectChange = (e) => {
		var val = e.target.value;

		setAttributes({ [name]: val });

		if( name == 'animation' ){
			var jEle = jQuery(`.p-${attributes['pagelayer-id']}`);
			var sel = jQuery(e.target);
			pagelayer_trigger_anim(jEle, sel, val);
		}
	};
	
	const renderOptions = () => {
		return Object.keys(prop.list).map((groupOrValue, index) => {
			if (typeof prop.list[groupOrValue] === 'string') {
				return (
					<option
						key={index}
						value={groupOrValue}
						selected={groupOrValue == value ? 'selected' : ''}
					>
					{prop.list[groupOrValue]}
					</option>
				);
			}else{
				return (
					<optgroup key={index} label={groupOrValue}>
						{Object.keys(prop.list[groupOrValue]).map((subOption, subIndex) => (
						<option
							key={subIndex}
							value={subOption}
							selected={subOption == value ? 'selected' : ''}
						>
						{prop.list[groupOrValue][subOption]}
						</option>
						))}
					</optgroup>
				);
			}
		});
	};
	
	return (
		<div className="components-base-control pagelayer-base-control pagelayer-flex">
			<LabelControl {...props}/>
			<div className="pagelayer-elp-select-div pagelayer-elp-pos-rel">
				<select
					className="pagelayer-elp-select pagelayer-select"
					name={name}
					onChange={handleSelectChange}
				>
				{renderOptions()}
				</select>
			</div>
		</div>
	);	
}

const pagelayer_trigger_anim = (elem, sel, anim) => {

	var classList = elem.attr('class');
	classList = classList.split(/\s+/);

	jQuery(sel).find('option').each(function(){
		var found = jQuery.inArray( jQuery(this).val(), classList );
		if( found != -1){
			elem.removeClass(jQuery(this).val());
		}
	});
	
	elem.css('animation-name', '');
	elem.removeClass('pagelayer-wow').addClass(anim + ' animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){
		jQuery(this).removeClass(anim+ ' animated');
	});
}


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
21 Feb 2026 2.55 AM
root / root
0755
access.js
1.263 KB
18 Feb 2026 11.32 PM
root / root
0644
box-shadow.js
5.699 KB
18 Feb 2026 11.32 PM
root / root
0644
checkbox.js
0.638 KB
18 Feb 2026 11.32 PM
root / root
0644
color.js
4.903 KB
18 Feb 2026 11.32 PM
root / root
0644
datetime.js
0.977 KB
18 Feb 2026 11.32 PM
root / root
0644
dimension.js
1.818 KB
18 Feb 2026 11.32 PM
root / root
0644
filter.js
2.293 KB
18 Feb 2026 11.32 PM
root / root
0644
font_family.js
1.529 KB
18 Feb 2026 11.32 PM
root / root
0644
gradient.js
4.01 KB
18 Feb 2026 11.32 PM
root / root
0644
html-to-react.js
0.231 KB
18 Feb 2026 11.32 PM
root / root
0644
icon.js
5.162 KB
18 Feb 2026 11.32 PM
root / root
0644
image.js
2.26 KB
18 Feb 2026 11.32 PM
root / root
0644
label.js
1.317 KB
18 Feb 2026 11.32 PM
root / root
0644
link.js
7.388 KB
18 Feb 2026 11.32 PM
root / root
0644
media.js
1.905 KB
18 Feb 2026 11.32 PM
root / root
0644
modal.js
1.811 KB
18 Feb 2026 11.32 PM
root / root
0644
multi-image.js
2.964 KB
18 Feb 2026 11.32 PM
root / root
0644
multiselect.js
2.107 KB
18 Feb 2026 11.32 PM
root / root
0644
padding.js
2.134 KB
18 Feb 2026 11.32 PM
root / root
0644
radio.js
0.753 KB
18 Feb 2026 11.32 PM
root / root
0644
rich_text.js
4.202 KB
18 Feb 2026 11.32 PM
root / root
0644
screen-icon.js
1.081 KB
18 Feb 2026 11.32 PM
root / root
0644
select.js
2.181 KB
18 Feb 2026 11.32 PM
root / root
0644
setting-tabs-control.js
1.946 KB
18 Feb 2026 11.32 PM
root / root
0644
slider.js
1.472 KB
18 Feb 2026 11.32 PM
root / root
0644
spinner.js
0.826 KB
18 Feb 2026 11.32 PM
root / root
0644
text-shadow.js
7.212 KB
18 Feb 2026 11.32 PM
root / root
0644
textarea.js
0.677 KB
18 Feb 2026 11.32 PM
root / root
0644
typography.js
17.443 KB
18 Feb 2026 11.32 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF