UNPKG

survey-creator-core

Version:

Use SurveyJS Creator to create or edit JSON for SurveyJS Form Library.

49 lines (48 loc) 1.89 kB
import { Base, ItemValue, QuestionSelectBase, ITargets } from "survey-core"; import { SurveyCreatorModel } from "../creator-base"; import "./item-value.scss"; export declare class ItemValueWrapperViewModel extends Base { creator: SurveyCreatorModel; question: QuestionSelectBase; item: ItemValue; isNew: boolean; isDragging: boolean; isDragDropGhost: boolean; isDragDropMoveDown: boolean; isDragDropMoveUp: boolean; ghostPosition: string; constructor(creator: SurveyCreatorModel, question: QuestionSelectBase, item: ItemValue); private dragOrClickHelper; private allowItemOperations; private canTouchItems; private focusCameFromDown; private collectionProperty; get canBeDragged(): boolean; private isBanStartDrag; private updateNewItemValue; private registerOnPropertyChanged; private get collectionPropertyName(); onPointerDown(pointerDownEvent: PointerEvent): boolean; startDragItemValue: (pointerDownEvent: PointerEvent, targets: ITargets) => void; private get dragDropHelper(); dispose(): void; private getGhostPosition; private handleDragDropGhostPositionChanged; get isDraggable(): boolean; isDraggableItem(item: ItemValue): boolean; private getSpecificProp; add(model: ItemValueWrapperViewModel): void; addNewItem(item: ItemValue, question: QuestionSelectBase, creator: SurveyCreatorModel): void; remove(model: ItemValueWrapperViewModel): void; onFocusOut(event: any): void; private findNextElementIndexToRemove; private focusNextElementToRemove; private updateIsNew; private updateIsNewVisibility; get allowRemove(): boolean; get tooltip(): string; get dragTooltip(): string; get allowAdd(): boolean; select(model: ItemValueWrapperViewModel, event: Event | undefined): void; private isAutoGeneratedItem; }