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/im/v2/application/quick-access/src/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/im/v2/application/quick-access/src/quick-access.js
import { Core } from 'im.v2.application.core';
import { QuickAccess } from 'im.v2.component.quick-access';

type QuickAccessApplicationParams = {
	node?: string | HTMLElement,
	preloadedList?: Object,
	loggerConfig?: Object,
}

export class QuickAccessApplication
{
	params: QuickAccessApplicationParams;
	inited: boolean = false;
	initPromise: Promise = null;
	initPromiseResolver: Function = null;
	rootNode: string | HTMLElement = null;
	vueInstance: Object = null;
	controller: Object = null;

	#applicationName = 'Sidebar';

	constructor(params: QuickAccessApplicationParams = {})
	{
		this.initPromise = new Promise((resolve) => {
			this.initPromiseResolver = resolve;
		});

		this.params = params;

		this.rootNode = this.params.node || document.createElement('div');

		// eslint-disable-next-line promise/catch-or-return
		this.initCore()
			.then(() => this.initComponent())
			.then(() => this.initComplete())
		;
	}

	async initCore(): Promise
	{
		Core.setApplicationData(this.params);
		this.controller = await Core.ready();

		return true;
	}

	async initComponent(): Promise
	{
		this.vueInstance = await this.controller.createVue(this, {
			name: this.#applicationName,
			el: this.rootNode,
			components: { QuickAccess },
			template: '<QuickAccess />',
		});

		return true;
	}

	initComplete(): Promise
	{
		this.inited = true;
		this.initPromiseResolver(this);

		return Promise.resolve();
	}

	ready(): Promise
	{
		if (this.inited)
		{
			return Promise.resolve(this);
		}

		return this.initPromise;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit