type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
ArrowFunction
thread => thread.resource && thread.resource.toString() === editorURI.toString()
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
thread => { let matchedZones = this._commentWidgets.filter(zoneWidget => zoneWidget.owner === e.owner && zoneWidget.commentThread.threadId === thread.threadId && zoneWidget.commentThread.threadId !== ''); if (matchedZones.length) { let matchedZone = matchedZones[0]; let index = this._commentWidgets.i...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
zoneWidget => zoneWidget.owner === e.owner && zoneWidget.commentThread.threadId === thread.threadId && zoneWidget.commentThread.threadId !== ''
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
thread => { let matchedZones = this._commentWidgets.filter(zoneWidget => zoneWidget.owner === e.owner && zoneWidget.commentThread.threadId === thread.threadId); if (matchedZones.length) { let matchedZone = matchedZones[0]; matchedZone.update(thread); } }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
zoneWidget => zoneWidget.owner === e.owner && zoneWidget.commentThread.threadId === thread.threadId
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
thread => { let matchedZones = this._commentWidgets.filter(zoneWidget => zoneWidget.owner === e.owner && zoneWidget.commentThread.threadId === thread.threadId); if (matchedZones.length) { return; } let matchedNewCommentThreadZones = this._commentWidgets.filter(zoneWidget => zoneWidget.owner === e...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
zoneWidget => zoneWidget.owner === e.owner && (zoneWidget.commentThread as any).commentThreadHandle === -1 && Range.equalsRange(zoneWidget.commentThread.range, thread.range)
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
() => { if (this._commentWidgets.length && (this.configurationService.getValue<ICommentsConfiguration>(COMMENTS_SECTION).openView === 'file')) { this.viewsService.openView(COMMENTS_VIEW_ID); } }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
widget => widget.getGlyphPosition() === commentRange.endLineNumber
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
widget => widget.toggleExpand(commentRange.endLineNumber)
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
() => anchor
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
() => this.getContextMenuActions(newCommentInfos, range)
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
() => newCommentInfos.length ? newCommentInfos[0] : undefined
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
() => { this._addInProgress = false; }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
pick => { if (!pick) { return; } const commentInfos = newCommentInfos.filter(info => info.ownerId === pick.id); if (commentInfos.length) { const { ownerId } = commentInfos[0]; this.addCommentAtLine2(range, ownerId); } }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
info => info.ownerId === pick.id
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
() => { this._addInProgress = false; }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
(commentInfo) => { const { ownerId, extensionId, label } = commentInfo; return <IQuickPickItem>{ label: label || extensionId, id: ownerId }; }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
commentInfo => { const { ownerId, extensionId, label } = commentInfo; actions.push(new Action( 'addCommentThread', `${label || extensionId}`, undefined, true, () => { this.addCommentAtLine2(commentRange, ownerId); return Promise.resolve(); } )); }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
() => { this.addCommentAtLine2(commentRange, ownerId); return Promise.resolve(); }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
info => Boolean(info.commentingRanges && (Array.isArray(info.commentingRanges) ? info.commentingRanges : info.commentingRanges.ranges).length)
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
info => { let providerCacheStore = this._pendingCommentCache[info.owner]; info.threads = info.threads.filter(thread => !thread.isDisposed); info.threads.forEach(thread => { let pendingComment: string | null = null; if (providerCacheStore) { pendingComment = providerCacheStore[thread.threadId!]; ...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
thread => !thread.isDisposed
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
thread => { let pendingComment: string | null = null; if (providerCacheStore) { pendingComment = providerCacheStore[thread.threadId!]; } if (pendingComment) { thread.collapsibleState = languages.CommentThreadCollapsibleState.Expanded; } this.displayCommentThread(info.owner, thread, ...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
widget => widget.hide()
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
zone => { let pendingComment = zone.getPendingComment(); let providerCacheStore = this._pendingCommentCache[zone.owner]; if (pendingComment) { if (!providerCacheStore) { this._pendingCommentCache[zone.owner] = {}; } this._pendingCommentCache[zone.owner][zone.commentThread.threadId!] ...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
(accessor) => { const activeEditor = getActiveEditor(accessor); if (!activeEditor) { return Promise.resolve(); } const controller = CommentController.get(activeEditor); if (!controller) { return Promise.resolve(); } const position = activeEditor.getSelection(); return controller.addOrToggleComm...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
(accessor, args) => { const activeCodeEditor = accessor.get(ICodeEditorService).getFocusedCodeEditor(); if (activeCodeEditor instanceof SimpleCommentEditor) { activeCodeEditor.getParentThread().submitComment(); } }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
(accessor, args) => { const activeCodeEditor = accessor.get(ICodeEditorService).getFocusedCodeEditor(); if (activeCodeEditor instanceof SimpleCommentEditor) { activeCodeEditor.getParentThread().collapse(); } }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
(theme, collector) => { const peekViewBackground = theme.getColor(peekViewResultsBackground); if (peekViewBackground) { collector.addRule( `.monaco-editor .review-widget,` + `.monaco-editor .review-widget {` + ` background-color: ${peekViewBackground};` + `}`); } const monacoEditorBackground = theme...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ClassDeclaration
export class ReviewViewZone implements IViewZone { public readonly afterLineNumber: number; public readonly domNode: HTMLElement; private callback: (top: number) => void; constructor(afterLineNumber: number, onDomNodeTop: (top: number) => void) { this.afterLineNumber = afterLineNumber; this.callback = onDomNo...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ClassDeclaration
class CommentingRangeDecoration implements IModelDeltaDecoration { private _decorationId: string | undefined; private _startLineNumber: number; private _endLineNumber: number; public get id(): string | undefined { return this._decorationId; } public set id(id: string | undefined) { this._decorationId = id;...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ClassDeclaration
class CommentingRangeDecorator { public static description = 'commenting-range-decorator'; private decorationOptions!: ModelDecorationOptions; private hoverDecorationOptions!: ModelDecorationOptions; private commentingRangeDecorations: CommentingRangeDecoration[] = []; private decorationIds: string[] = []; priva...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ClassDeclaration
export class NextCommentThreadAction extends EditorAction { constructor() { super({ id: 'editor.action.nextCommentThreadAction', label: nls.localize('nextCommentThreadAction', "Go to Next Comment Thread"), alias: 'Go to Next Comment Thread', precondition: undefined, kbOpts: { kbExpr: EditorContex...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ClassDeclaration
export class PreviousCommentThreadAction extends EditorAction { constructor() { super({ id: 'editor.action.previousCommentThreadAction', label: nls.localize('previousCommentThreadAction', "Go to Previous Comment Thread"), alias: 'Go to Previous Comment Thread', precondition: undefined, kbOpts: { ...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
InterfaceDeclaration
interface CommentRangeAction { ownerId: string; extensionId: string | undefined; label: string | undefined; commentingRangesInfo: languages.CommentingRanges; }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
onDomNodeTop(top: number): void { this.callback(top); }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
public getCommentAction(): CommentRangeAction { return { extensionId: this._extensionId, label: this._label, ownerId: this._ownerId, commentingRangesInfo: this.commentingRangesInfo }; }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
public getOriginalRange() { return this._range; }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
public getActiveRange() { return this.id ? this._editor.getModel()!.getDecorationRange(this.id) : undefined; }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
public updateHover(hoverLine?: number) { if (this._editor && this._infos && (hoverLine !== this._lastHover)) { this._doUpdate(this._editor, this._infos, hoverLine); } this._lastHover = hoverLine ?? -1; }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
public update(editor: ICodeEditor, commentInfos: ICommentInfo[]) { this._editor = editor; this._infos = commentInfos; this._doUpdate(editor, commentInfos); }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
private _doUpdate(editor: ICodeEditor, commentInfos: ICommentInfo[], hoverLine: number = -1) { let model = editor.getModel(); if (!model) { return; } let commentingRangeDecorations: CommentingRangeDecoration[] = []; for (const info of commentInfos) { info.commentingRanges.ranges.forEach(range => { ...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
public getMatchedCommentAction(commentRange: Range): CommentRangeAction[] { // keys is ownerId const foundHoverActions = new Map<string, { range: Range; action: CommentRangeAction }>(); for (const decoration of this.commentingRangeDecorations) { const range = decoration.getActiveRange(); if (range && ((ran...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
public dispose(): void { this.commentingRangeDecorations = []; }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
private registerEditorListeners() { this._editorDisposables = []; this._editorDisposables.push(this.editor.onMouseMove(e => this.onEditorMouseMove(e))); this._editorDisposables.push(this.editor.onDidChangeCursorPosition(e => this.onEditorChangeCursorPosition(e.position))); this._editorDisposables.push(this.edi...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
private clearEditorListeners() { this._editorDisposables?.forEach(disposable => disposable.dispose()); this._editorDisposables = undefined; }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
private onEditorMouseMove(e: IEditorMouseEvent): void { this._commentingRangeDecorator.updateHover(e.target.position?.lineNumber); }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
private onEditorChangeCursorPosition(e: Position | null) { const decorations = e ? this.editor.getDecorationsInRange(Range.fromPositions(e, { column: -1, lineNumber: e.lineNumber })) : undefined; let hasCommentingRange = false; if (decorations) { for (const decoration of decorations) { if (decoration.opti...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
private beginCompute(): Promise<void> { this._computePromise = createCancelablePromise(token => { const editorURI = this.editor && this.editor.hasModel() && this.editor.getModel().uri; if (editorURI) { return this.commentService.getDocumentComments(editorURI); } return Promise.resolve([]); }); ...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
private beginComputeCommentingRanges() { if (this._computeCommentingRangeScheduler) { if (this._computeCommentingRangePromise) { this._computeCommentingRangePromise.cancel(); this._computeCommentingRangePromise = null; } this._computeCommentingRangeScheduler.trigger(() => { const editorURI = th...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
public static get(editor: ICodeEditor): CommentController | null { return editor.getContribution<CommentController>(ID); }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
public revealCommentThread(threadId: string, commentUniqueId: number, fetchOnceIfNotExist: boolean): void { const commentThreadWidget = this._commentWidgets.filter(widget => widget.commentThread.threadId === threadId); if (commentThreadWidget.length === 1) { commentThreadWidget[0].reveal(commentUniqueId); } e...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
public nextCommentThread(): void { this._findNearestCommentThread(); }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
private _findNearestCommentThread(reverse?: boolean): void { if (!this._commentWidgets.length || !this.editor.hasModel()) { return; } const after = this.editor.getSelection().getEndPosition(); const sortedWidgets = this._commentWidgets.sort((a, b) => { if (reverse) { const temp = a; a = b; b...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
public previousCommentThread(): void { this._findNearestCommentThread(true); }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
public dispose(): void { this.globalToDispose.dispose(); this.localToDispose.dispose(); this._editorDisposables?.forEach(disposable => disposable.dispose()); this._commentWidgets.forEach(widget => widget.dispose()); this.editor = null!; // Strict null override - nulling out in dispose }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
public onModelChanged(e: IModelChangedEvent): void { this.localToDispose.clear(); this.removeCommentWidgetsAndStoreCache(); this.localToDispose.add(this.editor.onMouseDown(e => this.onEditorMouseDown(e))); this.localToDispose.add(this.editor.onMouseUp(e => this.onEditorMouseUp(e))); if (this._editorDisposa...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
private displayCommentThread(owner: string, thread: languages.CommentThread, pendingComment: string | null): void { const zoneWidget = this.instantiationService.createInstance(ReviewZoneWidget, this.editor, owner, thread, pendingComment); zoneWidget.display(thread.range.startLineNumber); this._commentWidgets.pus...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
private onEditorMouseDown(e: IEditorMouseEvent): void { this.mouseDownInfo = parseMouseDownInfoFromEvent(e); }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
private onEditorMouseUp(e: IEditorMouseEvent): void { const matchedLineNumber = isMouseUpEventMatchMouseDown(this.mouseDownInfo, e); this.mouseDownInfo = null; if (matchedLineNumber === null || !e.target.element) { return; } if (e.target.element.className.indexOf('comment-diff-added') >= 0) { const l...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
public async addOrToggleCommentAtLine(commentRange: Range, e: IEditorMouseEvent | undefined): Promise<void> { // If an add is already in progress, queue the next add and process it after the current one finishes to // prevent empty comment threads from being added to the same line. if (!this._addInProgress) { ...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
private processNextThreadToAdd(): void { this._addInProgress = false; const info = this._emptyThreadsToAddQueue.shift(); if (info) { this.addOrToggleCommentAtLine(info[0], info[1]); } }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
public addCommentAtLine(range: Range, e: IEditorMouseEvent | undefined): Promise<void> { const newCommentInfos = this._commentingRangeDecorator.getMatchedCommentAction(range); if (!newCommentInfos.length || !this.editor.hasModel()) { return Promise.resolve(); } if (newCommentInfos.length > 1) { if (e) {...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
private getCommentProvidersQuickPicks(commentInfos: { ownerId: string; extensionId: string | undefined; label: string | undefined; commentingRangesInfo: languages.CommentingRanges | undefined }[]) { const picks: QuickPickInput[] = commentInfos.map((commentInfo) => { const { ownerId, extensionId, label } = comment...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
private getContextMenuActions(commentInfos: { ownerId: string; extensionId: string | undefined; label: string | undefined; commentingRangesInfo: languages.CommentingRanges }[], commentRange: Range): IAction[] { const actions: IAction[] = []; commentInfos.forEach(commentInfo => { const { ownerId, extensionId, l...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
public addCommentAtLine2(range: Range, ownerId: string) { this.commentService.createCommentThreadTemplate(ownerId, this.editor.getModel()!.uri, range); this.processNextThreadToAdd(); return; }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
private setComments(commentInfos: ICommentInfo[]): void { if (!this.editor) { return; } this._commentInfos = commentInfos; let lineDecorationsWidth: number = this.editor.getLayoutInfo().decorationsWidth; if (this._commentInfos.some(info => Boolean(info.commentingRanges && (Array.isArray(info.commentingR...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
public closeWidget(): void { if (this._commentWidgets) { this._commentWidgets.forEach(widget => widget.hide()); } this.editor.focus(); this.editor.revealRangeInCenter(this.editor.getSelection()!); }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
private removeCommentWidgetsAndStoreCache() { if (this._commentWidgets) { this._commentWidgets.forEach(zone => { let pendingComment = zone.getPendingComment(); let providerCacheStore = this._pendingCommentCache[zone.owner]; if (pendingComment) { if (!providerCacheStore) { this._pendingComm...
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
public hasComments(): boolean { return !!this._commentWidgets.length; }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
public run(accessor: ServicesAccessor, editor: ICodeEditor): void { let controller = CommentController.get(editor); if (controller) { controller.nextCommentThread(); } }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
MethodDeclaration
public run(accessor: ServicesAccessor, editor: ICodeEditor): void { let controller = CommentController.get(editor); if (controller) { controller.previousCommentThread(); } }
CUBETIQ/vscode
src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts
TypeScript
ArrowFunction
({ className, stop, color, onChange, onFocus, onRemove, globalMin, globalMax, localMin, localMax, min, max, isRangeMin = false, isRangeMax = false, parentRef, colorPickerMode, colorPickerShowAlpha, colorPickerSwatches, disabled, readOnly, isPopoverOpen, openPopover, closeP...
ChrisJamesC/eui
src/components/color_picker/color_stops/color_stop_thumb.tsx
TypeScript
ArrowFunction
() => { const chromaColor = getChromaColor(color, colorPickerShowAlpha); return chromaColor ? chromaColor.css() : undefined; }
ChrisJamesC/eui
src/components/color_picker/color_stops/color_stop_thumb.tsx
TypeScript
ArrowFunction
() => { if (isPopoverOpen && popoverRef && popoverRef.current) { popoverRef.current.positionPopoverFixed(); } }
ChrisJamesC/eui
src/components/color_picker/color_stops/color_stop_thumb.tsx
TypeScript
ArrowFunction
(location: { x: number; y: number }) => { // Guard against `null` ref in usage return getStopFromMouseLocation(location, parentRef!, globalMin, globalMax); }
ChrisJamesC/eui
src/components/color_picker/color_stops/color_stop_thumb.tsx
TypeScript
ArrowFunction
(stop: ColorStop['stop']) => { // Guard against `null` ref in usage return getPositionFromStop(stop, parentRef!, globalMin, globalMax); }
ChrisJamesC/eui
src/components/color_picker/color_stops/color_stop_thumb.tsx
TypeScript
ArrowFunction
() => { if (onRemove) { closePopover(); onRemove(); } }
ChrisJamesC/eui
src/components/color_picker/color_stops/color_stop_thumb.tsx
TypeScript
ArrowFunction
() => { setHasFocus(true); if (onFocus) { onFocus(); } }
ChrisJamesC/eui
src/components/color_picker/color_stops/color_stop_thumb.tsx
TypeScript
ArrowFunction
() => setHasFocus(true)
ChrisJamesC/eui
src/components/color_picker/color_stops/color_stop_thumb.tsx
TypeScript
ArrowFunction
() => setHasFocus(false)
ChrisJamesC/eui
src/components/color_picker/color_stops/color_stop_thumb.tsx
TypeScript
ArrowFunction
(value: ColorStop['color']) => { setColorIsInvalid(isColorInvalid(value, colorPickerShowAlpha)); onChange({ stop, color: value }); }
ChrisJamesC/eui
src/components/color_picker/color_stops/color_stop_thumb.tsx
TypeScript
ArrowFunction
(value: ColorStop['stop']) => { const willBeInvalid = value > localMax || value < localMin; if (willBeInvalid) { if (value > localMax) { value = localMax; } if (value < localMin) { value = localMin; } } setStopIsInvalid(isStopInvalid(value)); onChange({ stop...
ChrisJamesC/eui
src/components/color_picker/color_stops/color_stop_thumb.tsx
TypeScript
ArrowFunction
(e: React.ChangeEvent<HTMLInputElement>) => { let value = parseFloat(e.target.value); const willBeInvalid = value > globalMax || value < globalMin; if (willBeInvalid) { if (value > globalMax && max != null) { value = globalMax; } if (value < globalMin && min != null) { v...
ChrisJamesC/eui
src/components/color_picker/color_stops/color_stop_thumb.tsx
TypeScript
ArrowFunction
( location: { x: number; y: number }, isFirstInteraction?: boolean ) => { if (isFirstInteraction) return; // Prevents change on the initial MouseDown event if (parentRef == null) { return; } const newStop = getStopFromMouseLocationFn(location); handleStopChange(newStop); }
ChrisJamesC/eui
src/components/color_picker/color_stops/color_stop_thumb.tsx
TypeScript
ArrowFunction
(event: React.KeyboardEvent<HTMLButtonElement>) => { switch (event.key) { case keys.ENTER: event.preventDefault(); openPopover(); break; case keys.ARROW_LEFT: event.preventDefault(); if (readOnly) return; handleStopChange(stop - 1); break; ...
ChrisJamesC/eui
src/components/color_picker/color_stops/color_stop_thumb.tsx
TypeScript
ArrowFunction
(e: React.MouseEvent<HTMLButtonElement>) => { if (!readOnly) { handleMouseDown(e); } openPopover(); }
ChrisJamesC/eui
src/components/color_picker/color_stops/color_stop_thumb.tsx
TypeScript
ArrowFunction
(e: React.TouchEvent<HTMLButtonElement>) => { if (!readOnly) { handleInteraction(e); } }
ChrisJamesC/eui
src/components/color_picker/color_stops/color_stop_thumb.tsx
TypeScript
ArrowFunction
(e: React.TouchEvent<HTMLButtonElement>) => { handleTouchInteraction(e); if (!isPopoverOpen) { openPopover(); } }
ChrisJamesC/eui
src/components/color_picker/color_stops/color_stop_thumb.tsx
TypeScript
InterfaceDeclaration
export interface ColorStop { stop: number; color: string; }
ChrisJamesC/eui
src/components/color_picker/color_stops/color_stop_thumb.tsx
TypeScript
InterfaceDeclaration
interface EuiColorStopThumbProps extends CommonProps, ColorStop { className?: string; onChange: (colorStop: ColorStop) => void; onFocus?: () => void; onRemove?: () => void; globalMin: number; globalMax: number; localMin: number; localMax: number; min?: number; max?: number; isRangeMin?: boolean; ...
ChrisJamesC/eui
src/components/color_picker/color_stops/color_stop_thumb.tsx
TypeScript
MethodDeclaration
isStopInvalid(stop)
ChrisJamesC/eui
src/components/color_picker/color_stops/color_stop_thumb.tsx
TypeScript
ArrowFunction
() => { return ( <div css={containerStyles}> <Global styles={globalStyles} /> <Router> <Redirect from="/" to="/page/0" /> <MerchantListView path="/page/:pageId" /> <MerchantView path="/merchant/:merchantId" /> ...
are/auto1-zadanie
src/App.tsx
TypeScript
EnumDeclaration
export enum Status { Online = "online", DoNotDisturb = "dnd", Idle = "idle", AFK = "idle", Invisible = "invisible", Offline = "offline", }
edqx/Wilson
packages/constants/lib/gateway/Status.ts
TypeScript
ArrowFunction
(txtype:number, ...args:Array<any>):BaseTx => { if (txtype === AVMConstants.BASETX) { return new BaseTx(...args); } else if (txtype === AVMConstants.CREATEASSETTX) { return new CreateAssetTx(...args); } else if (txtype === AVMConstants.OPERATIONTX) { return new OperationTx(...args); } else if (txty...
Dijets-Inc/dijetsJS
src/apis/avm/tx.ts
TypeScript
ClassDeclaration
export class UnsignedTx extends StandardUnsignedTx<KeyPair, KeyChain, BaseTx> { protected _typeName = "UnsignedTx"; protected _typeID = undefined; //serialize is inherited deserialize(fields:object, encoding:SerializedEncoding = "hex") { super.deserialize(fields, encoding); this.transaction = SelectT...
Dijets-Inc/dijetsJS
src/apis/avm/tx.ts
TypeScript
ClassDeclaration
export class Tx extends StandardTx<KeyPair, KeyChain, UnsignedTx> { protected _typeName = "Tx"; protected _typeID = undefined; //serialize is inherited deserialize(fields:object, encoding:SerializedEncoding = "hex") { super.deserialize(fields, encoding); this.unsignedTx = new UnsignedTx(); this.u...
Dijets-Inc/dijetsJS
src/apis/avm/tx.ts
TypeScript
MethodDeclaration
//serialize is inherited deserialize(fields:object, encoding:SerializedEncoding = "hex") { super.deserialize(fields, encoding); this.transaction = SelectTxClass(fields["transaction"]["_typeID"]); this.transaction.deserialize(fields["transaction"], encoding); }
Dijets-Inc/dijetsJS
src/apis/avm/tx.ts
TypeScript
MethodDeclaration
getTransaction():BaseTx{ return this.transaction as BaseTx; }
Dijets-Inc/dijetsJS
src/apis/avm/tx.ts
TypeScript