mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Fix cell attachment types (#14485)
This commit is contained in:
6
src/sql/azdata.proposed.d.ts
vendored
6
src/sql/azdata.proposed.d.ts
vendored
@@ -83,10 +83,12 @@ declare module 'azdata' {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface ICellContents {
|
export interface ICellContents {
|
||||||
attachments?: ICellAttachment;
|
attachments?: ICellAttachments;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ICellAttachment = { [key: string]: { [key: string]: string } };
|
export type ICellAttachments = { [key: string]: ICellAttachment };
|
||||||
|
export type ICellAttachment = { [key: string]: string };
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SqlDbType = 'BigInt' | 'Binary' | 'Bit' | 'Char' | 'DateTime' | 'Decimal'
|
export type SqlDbType = 'BigInt' | 'Binary' | 'Bit' | 'Char' | 'DateTime' | 'Decimal'
|
||||||
|
|||||||
@@ -34,9 +34,9 @@ export abstract class CellView extends AngularDisposable implements OnDestroy, I
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface IMarkdownStringWithCellAttachments extends IMarkdownString {
|
export interface IMarkdownStringWithCellAttachments extends IMarkdownString {
|
||||||
readonly cellAttachments?: nb.ICellAttachment
|
readonly cellAttachments?: nb.ICellAttachments
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MarkdownRenderOptionsWithCellAttachments extends MarkdownRenderOptions {
|
export interface MarkdownRenderOptionsWithCellAttachments extends MarkdownRenderOptions {
|
||||||
readonly cellAttachments?: nb.ICellAttachment
|
readonly cellAttachments?: nb.ICellAttachments
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -264,7 +264,7 @@ export class NotebookMarkdownRenderer {
|
|||||||
* In a cell, the above attachment would be referenced in markdown like this:
|
* In a cell, the above attachment would be referenced in markdown like this:
|
||||||
* 
|
* 
|
||||||
*/
|
*/
|
||||||
function findAttachmentIfExists(href: string, cellAttachments: nb.ICellAttachment): string {
|
function findAttachmentIfExists(href: string, cellAttachments: nb.ICellAttachments): string {
|
||||||
if (href.startsWith('attachment:') && cellAttachments) {
|
if (href.startsWith('attachment:') && cellAttachments) {
|
||||||
const imageName = href.replace('attachment:', '');
|
const imageName = href.replace('attachment:', '');
|
||||||
const imageDefinition = cellAttachments[imageName];
|
const imageDefinition = cellAttachments[imageName];
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ export class CellModel extends Disposable implements ICellModel {
|
|||||||
private _isParameter: boolean;
|
private _isParameter: boolean;
|
||||||
private _onParameterStateChanged = new Emitter<boolean>();
|
private _onParameterStateChanged = new Emitter<boolean>();
|
||||||
private _isInjectedParameter: boolean;
|
private _isInjectedParameter: boolean;
|
||||||
private _attachments: nb.ICellAttachment;
|
private _attachments: nb.ICellAttachments;
|
||||||
|
|
||||||
constructor(cellData: nb.ICellContents,
|
constructor(cellData: nb.ICellContents,
|
||||||
private _options: ICellModelOptions,
|
private _options: ICellModelOptions,
|
||||||
|
|||||||
@@ -530,7 +530,7 @@ export interface ICellModel {
|
|||||||
sendChangeToNotebook(change: NotebookChangeType): void;
|
sendChangeToNotebook(change: NotebookChangeType): void;
|
||||||
cellSourceChanged: boolean;
|
cellSourceChanged: boolean;
|
||||||
readonly savedConnectionName: string | undefined;
|
readonly savedConnectionName: string | undefined;
|
||||||
readonly attachments: nb.ICellAttachment;
|
readonly attachments: nb.ICellAttachments;
|
||||||
readonly currentMode: CellEditModes;
|
readonly currentMode: CellEditModes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user