@docsvision/webclient
Version:
Type definitions for DocsVision WebClient scripts and extensions.
112 lines (111 loc) • 5.77 kB
TypeScript
import { ExistingCardLinkDialog } from "@docsvision/webclient/BackOffice/ExistingCardLinkDialog";
import { GenModels } from "@docsvision/webclient/Generated/DocsVision.WebClient.Models";
import { PerformOnce } from "@docsvision/webclient/Legacy/Utils";
import { CardLinkParams } from "@docsvision/webclient/Platform/CardLink";
import { IBindingResult } from "@docsvision/webclient/System/IBindingResult";
import { RequestHelper } from "@docsvision/webclient/System/RequestHelper";
import { SimpleEvent } from "@docsvision/webclient/System/SimpleEvent";
import { IValidationResult } from "@docsvision/webclient/System/IValidationResult";
import React from "react";
import { $LinksSearchCards } from '@docsvision/webclient/BackOffice/$LinksSearchCardsService';
import { $LayoutLinksController } from '@docsvision/webclient/Generated/DocsVision.WebClient.Controllers';
import { $CardId, $CardTimestamp } from '@docsvision/webclient/System/LayoutServices';
import { InputBasedControlImpl, InputBasedControlState } from "@docsvision/webclient/System/InputBasedControlImpl";
import { Typeahead } from "@docsvision/webclient/Helpers/Typeahead/Typeahead";
import { IBoxWithButtonsButtonInfo } from "@docsvision/webclient/Helpers/BoxWithButtons";
import { ITypeaheadSearchQuery } from "@docsvision/webclient/Helpers/Typeahead/Models/ITypeaheadSearchQuery";
import { ITypeaheadSearchResult } from "@docsvision/webclient/Helpers/Typeahead/Models/ITypeaheadSearchResult";
import { ITypeaheadVariant } from "@docsvision/webclient/Helpers/Typeahead/Models/ITypeaheadVariant";
/** @internal */
export interface ICardLinkState extends CardLinkParams, InputBasedControlState<GenModels.CardLinkDataModel> {
addExistingCardLinkDialog: ExistingCardLinkDialog;
saveHelper: RequestHelper;
validationMessage: string;
bindingInfo: IBindingResult<GenModels.CardLinkDataModel>;
inputKeyDown: SimpleEvent<React.KeyboardEvent>;
lastMaximized: boolean;
}
export interface CardLinkState extends ICardLinkState {
}
/** @internal */
export declare class CardLinkImpl extends InputBasedControlImpl<GenModels.CardLinkDataModel, CardLinkParams, CardLinkState> {
private typeahead;
performOnce: PerformOnce;
constructor(props: CardLinkParams, state: ICardLinkState);
setValue(value: GenModels.CardLinkDataModel, forceUpdate?: boolean): Promise<unknown>;
set value(newVal: GenModels.CardLinkDataModel);
get value(): GenModels.CardLinkDataModel;
protected get isQueryCondition(): boolean;
protected get isShowLabel(): true | GenModels.CardLinkDataModel;
componentDidMount(): void;
componentWillUnmount(): void;
protected onDocumentClick: (e: MouseEvent) => void;
protected onDocumentKeyDown: (ev: KeyboardEvent) => void;
protected onDocumentMouseDown: (event: any) => void;
protected dialogClosed: () => void;
getLinkUrl(cardId: string): string;
openMenu: () => void;
closeMenu: () => void;
toggleMenu: () => void;
openLinkedCard: () => void;
openFilePreview: () => void;
protected onAddExistingCardLink(services: $LinksSearchCards & $LayoutLinksController & $CardId & $CardTimestamp, callback?: Function): Promise<unknown>;
protected getShowFilesForLinksTypesIds: () => string[];
openSelectCardDialog: () => Promise<void>;
setLastMaximized: (value: any) => void;
deleteLinkedCard: () => void;
onOpenLinkedCardMenuClick: () => void;
onViewFileMenuClick: () => void;
onOpenSelectCardDialogMenuClick: () => void;
onDeleteLinkedCardMenuClick: () => void;
onTextClick: () => void;
onMenuClick: (ev: React.MouseEvent) => void;
hasValue: () => boolean;
get isLoading(): boolean;
get isMenuAvailable(): boolean;
get cardViewAllowed(): boolean;
get mainFileReadAllowed(): boolean;
get isTextClickable(): boolean;
validate(params: unknown): IValidationResult;
protected renderValidationMessage(): JSX.Element;
protected updateValidationMessage(): void;
protected getCssClass(): string;
protected getTextValue(): string;
/** Вызывается в режиме View и в режиме когда не задан searchQueryParamName */
protected getLabeledTextValue(): string;
protected getTextTabIndex(): 0 | -1;
protected onTextKeyDown: (event: React.KeyboardEvent) => void;
protected onMenuKeyDown: (event: React.KeyboardEvent) => void;
protected onSelected: (variant: ITypeaheadVariant) => Promise<void>;
protected attachTypeahead: (t: Typeahead) => void;
protected findItems: (typeaheadQuery: ITypeaheadSearchQuery) => Promise<ITypeaheadSearchResult>;
protected renderInto(props: CardLinkParams, container: HTMLElement): void;
protected onValueClick(): void;
protected afterOpenCallback: () => void;
protected onInputChange(event: any): void;
protected get iconClassDialog(): string;
protected get isShowIcon(): boolean;
protected renderWithTextValue(): string | JSX.Element;
protected renderWithText(): JSX.Element;
protected renderLabeledText(): JSX.Element;
/**
* Renders settings menu and its icon to open menu
*/
protected renderSettingsMenu(isVisibleButton?: boolean): JSX.Element;
protected editInPlaceModeRender(): JSX.Element;
protected onMouseDownIcon: () => void;
protected onButtonBlur(event: React.FocusEvent<HTMLButtonElement>): void;
protected get buttonsTypeahead(): {
left: IBoxWithButtonsButtonInfo[];
extra: IBoxWithButtonsButtonInfo[];
};
/**
* Render search with query parameter
*/
protected renderInputWithPlaceholder(): JSX.Element;
/**
* Renders label value
*/
protected renderLabeledTextValue(): JSX.Element;
renderControl(): {};
}