UNPKG

@angular2-material/core

Version:
67 lines (65 loc) 3.2 kB
var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; import { MdError } from '../errors/error'; /** Exception thrown when a ComponentPortal is attached to a DomPortalHost without an origin. */ export var MdComponentPortalAttachedToDomWithoutOriginError = (function (_super) { __extends(MdComponentPortalAttachedToDomWithoutOriginError, _super); function MdComponentPortalAttachedToDomWithoutOriginError() { _super.call(this, 'A ComponentPortal must have an origin set when attached to a DomPortalHost ' + 'because the DOM element is not part of the Angular application context.'); } return MdComponentPortalAttachedToDomWithoutOriginError; }(MdError)); /** Exception thrown when attempting to attach a null portal to a host. */ export var MdNullPortalError = (function (_super) { __extends(MdNullPortalError, _super); function MdNullPortalError() { _super.call(this, 'Must provide a portal to attach'); } return MdNullPortalError; }(MdError)); /** Exception thrown when attempting to attach a portal to a host that is already attached. */ export var MdPortalAlreadyAttachedError = (function (_super) { __extends(MdPortalAlreadyAttachedError, _super); function MdPortalAlreadyAttachedError() { _super.call(this, 'Host already has a portal attached'); } return MdPortalAlreadyAttachedError; }(MdError)); /** Exception thrown when attempting to attach a portal to an already-disposed host. */ export var MdPortalHostAlreadyDisposedError = (function (_super) { __extends(MdPortalHostAlreadyDisposedError, _super); function MdPortalHostAlreadyDisposedError() { _super.call(this, 'This PortalHost has already been disposed'); } return MdPortalHostAlreadyDisposedError; }(MdError)); /** Exception thrown when attempting to attach an unknown portal type. */ export var MdUnknownPortalTypeError = (function (_super) { __extends(MdUnknownPortalTypeError, _super); function MdUnknownPortalTypeError() { _super.call(this, 'Attempting to attach an unknown Portal type. ' + 'BasePortalHost accepts either a ComponentPortal or a TemplatePortal.'); } return MdUnknownPortalTypeError; }(MdError)); /** Exception thrown when attempting to attach a portal to a null host. */ export var MdNullPortalHostError = (function (_super) { __extends(MdNullPortalHostError, _super); function MdNullPortalHostError() { _super.call(this, 'Attempting to attach a portal to a null PortalHost'); } return MdNullPortalHostError; }(MdError)); /** Exception thrown when attempting to detach a portal that is not attached. */ export var MdNoPortalAttachedError = (function (_super) { __extends(MdNoPortalAttachedError, _super); function MdNoPortalAttachedError() { _super.call(this, 'Attempting to detach a portal that is not attached to a host'); } return MdNoPortalAttachedError; }(MdError)); //# sourceMappingURL=portal-errors.js.map