cv-dialog-sdk
Version:
Catavolt Dialog Javascript API
23 lines (18 loc) • 600 B
text/typescript
import { DialogModeEnum, TypeNames } from './types';
export class ReferringObject {
public readonly type: string;
public readonly actionId: string;
public isDialogReferrer(): boolean {
return this.type === TypeNames.ReferringDialogTypeName;
}
public isWorkbenchReferrer(): boolean {
return this.type === TypeNames.ReferringWorkbenchTypeName;
}
public get sourceDestroyed(): boolean {
if (this.isDialogReferrer()) {
return this['dialogMode'] === DialogModeEnum.DESTROYED;
} else {
return false;
}
}
}