Cloud Defense Logo

Products

Solutions

Company

Book A Live Demo

Top 9 Examples of "deprecated-decorator in functional component" in JavaScript

Dive into secure and efficient coding practices with our curated list of the top 10 examples showcasing 'deprecated-decorator' in functional components in JavaScript. Our advanced machine learning engine meticulously scans each line of code, cross-referencing millions of open source libraries to ensure your implementation is not just functional, but also robust and secure. Elevate your React applications to new heights by mastering the art of handling side effects, API calls, and asynchronous operations with confidence and precision.

import deprecated from 'deprecated-decorator';
import { ActionSheetMock } from './action-sheet';
import { BaseMock } from '../base.mock';

const METHODS: string[] = [
    'create'
];

export class ActionSheetControllerMock extends BaseMock {

    constructor(actionSheet?: ActionSheetMock) {
        super('ActionSheet', METHODS);
        this.spyObj.create.and.returnValue(actionSheet || new ActionSheetMock());
    }

    @deprecated('new ActionSheetControllerMock()')
    public static instance(actionSheet?: ActionSheetMock): any {
        return new ActionSheetControllerMock(actionSheet);
    }
}
import deprecated from 'deprecated-decorator';
import React from 'react';
import Type from 'prop-types';

import Link from '../link/link';

import cn from '../cn';
import performance from '../performance';

/**
 * @deprecated since v9.5.0
 *
 * Компонент копирайта: отображает данные о лицензии Альфа-Банка.
 */
@deprecated('arui-private')
@cn('copyright')
@performance()
class Copyright extends React.Component {
    static propTypes = {
        /** Дочерние элементы `Copyright`, заменяют собой стандартный текст copyright'а */
        children: Type.oneOfType([Type.arrayOf(Type.node), Type.node]),
        /** Дополнительный класс */
        className: Type.oneOfType([Type.func, Type.string]),
        /** Идентификатор компонента в DOM */
        id: Type.string,
        /** Отображение годов */
        showYears: Type.bool,
        /** Тема компонента */
        theme: Type.oneOf(['alfa-on-color', 'alfa-on-white'])
    };
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

import deprecated from 'deprecated-decorator';
import React from 'react';
import Type from 'prop-types';

import cn from '../cn';
import performance from '../performance';

/**
 * @deprecated since v9.5.0
 *
 * Компонент меню страницы.
 * Обычно используется совместно с компонентом `Page`.
 */
@deprecated('arui-private')
@cn('app')
@performance()
class AppMenu extends React.Component {
    static propTypes = {
        /** Дочерние элементы `AppMenu` */
        children: Type.oneOfType([Type.arrayOf(Type.node), Type.node]),
        /** Дополнительный класс */
        className: Type.oneOfType([Type.func, Type.string]),
        /** Идентификатор компонента в DOM */
        id: Type.string,
        /** Тема компонента */
        theme: Type.oneOf(['alfa-on-color', 'alfa-on-white'])
    };

    render(cn) {
        return (
import deprecated from 'deprecated-decorator';
import { AlertMock } from './alert';
import { BaseMock } from '../base.mock';

const METHODS = ['create'];

export class AlertControllerMock extends BaseMock {

    constructor(alertMock?: AlertMock) {
        super('AlertController', METHODS);
        this.spyObj.create.and.returnValue(alertMock || new AlertMock());
    }

    @deprecated('new AlertControllerMock()')
    public static instance(alertMock?: AlertMock): any {
        return new AlertControllerMock(alertMock);
    }
}
*
 * Компонент страницы ошибки.
 * Как правило является корневым компонентом страницы.
 * Используется вместо компонента Page.
 *
 * ```javascript
 * import ErrorPage from 'arui-feather/error-page';
 * import Header from 'arui-feather/header';
 *
 *  }
 * />
 * ```
 */
@deprecated('arui-private')
@cn('error-page')
class ErrorPage extends React.Component {
    static propTypes = {
        /** Заголовок ошибки */
        title: Type.string,
        /** Сообщение ошибки */
        text: Type.string,
        /** Шапка страницы */
        header: Type.node,
        /** href для ссылки 'Вернуться в интернет-банк' */
        returnUrl: Type.string,
        /** Альтернативный текст для ссылки 'Вернуться в интернет-банк' */
        returnTitle: Type.string
    };

    static defaultProps = {
this['contentHeight'] = 10;
        this['contentTop'] = 10;
        this['directionX'] = 'left';
        this['directionY'] = 'up';
        this['isScrolling'] = false;
        this['scrollHeight'] = 10;
        this['scrollLeft'] = 10;
        this['scrollTop'] = 10;
        this['scrollWidth'] = 10;
        this.spyObj.getContentDimensions.and.returnValue({});
        this.spyObj.scrollTo.and.returnValue(Promise.resolve());
        this.spyObj.scrollToBottom.and.returnValue(Promise.resolve());
        this.spyObj.scrollToTop.and.returnValue(Promise.resolve());
    }

    @deprecated('new ContentMock()')
    public static instance(): any {
        return new ContentMock();
    }
}
import { BaseMock } from '../base.mock';
import deprecated from 'deprecated-decorator';

const METHODS = ['present', 'dismiss', 'setContent', 'setSpinner'];
export class LoadingMock extends BaseMock {
    constructor() {
        super('Loading', METHODS);
        this.spyObj.present.and.returnValue(Promise.resolve());
    }

    @deprecated('new LoadingMock()')
    public static instance(): any {
        return new LoadingMock();
    }
}
'didShow',
    'eventsAvailable',
    'hasFocusedTextInput',
    'isOpen',
    'onClose',
    'willHide',
    'willShow'
];

export class KeyboardMock extends BaseMock {
    constructor() {
        super('Keyboard', METHODS);
        this.setReturn('isOpen', false);
    }

    @deprecated('new Keyboard()')
    public static instance(): any {
        return new KeyboardMock();
    }
}
import { BaseMock } from '../base.mock';
import deprecated from 'deprecated-decorator';

const METHODS = ['present', 'dismiss', 'onDidDismiss'];

export class AlertMock extends BaseMock {

    constructor() {
        super('Alert', METHODS);

        this.spyObj.present.and.returnValue(Promise.resolve());
    }

    @deprecated('new AlertMock()')
    public static instance(): any {
        return new AlertMock();
    }
}

Is your System Free of Underlying Vulnerabilities?
Find Out Now