@angular/cdk 20.2.0-rc.0 → 21.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/a11y-module.mjs.map +1 -1
- package/fesm2022/a11y.mjs.map +1 -1
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/activedescendant-key-manager.mjs.map +1 -1
- package/fesm2022/array.mjs.map +1 -1
- package/fesm2022/bidi.mjs.map +1 -1
- package/fesm2022/breakpoints-observer.mjs.map +1 -1
- package/fesm2022/cdk.mjs +1 -1
- package/fesm2022/cdk.mjs.map +1 -1
- package/fesm2022/clipboard.mjs.map +1 -1
- package/fesm2022/coercion/private.mjs.map +1 -1
- package/fesm2022/coercion.mjs.map +1 -1
- package/fesm2022/css-pixel-value.mjs.map +1 -1
- package/fesm2022/data-source.mjs.map +1 -1
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/directionality.mjs.map +1 -1
- package/fesm2022/dispose-view-repeater-strategy.mjs.map +1 -1
- package/fesm2022/drag-drop.mjs.map +1 -1
- package/fesm2022/element.mjs.map +1 -1
- package/fesm2022/fake-event-detection.mjs.map +1 -1
- package/fesm2022/focus-key-manager.mjs.map +1 -1
- package/fesm2022/focus-monitor.mjs.map +1 -1
- package/fesm2022/id-generator.mjs.map +1 -1
- package/fesm2022/keycodes.mjs.map +1 -1
- package/fesm2022/keycodes2.mjs.map +1 -1
- package/fesm2022/layout.mjs.map +1 -1
- package/fesm2022/list-key-manager.mjs.map +1 -1
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs +18 -3
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/observers/private.mjs.map +1 -1
- package/fesm2022/observers.mjs.map +1 -1
- package/fesm2022/overlay-module.mjs.map +1 -1
- package/fesm2022/overlay.mjs.map +1 -1
- package/fesm2022/passive-listeners.mjs.map +1 -1
- package/fesm2022/platform.mjs.map +1 -1
- package/fesm2022/platform2.mjs.map +1 -1
- package/fesm2022/portal.mjs.map +1 -1
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/recycle-view-repeater-strategy.mjs.map +1 -1
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/scrolling2.mjs.map +1 -1
- package/fesm2022/selection-model.mjs.map +1 -1
- package/fesm2022/shadow-dom.mjs.map +1 -1
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/style-loader.mjs.map +1 -1
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/test-environment.mjs.map +1 -1
- package/fesm2022/testing/selenium-webdriver.mjs.map +1 -1
- package/fesm2022/testing/testbed.mjs.map +1 -1
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/text-field.mjs.map +1 -1
- package/fesm2022/tree-key-manager.mjs.map +1 -1
- package/fesm2022/tree.mjs +1 -0
- package/fesm2022/tree.mjs.map +1 -1
- package/fesm2022/typeahead.mjs.map +1 -1
- package/fesm2022/unique-selection-dispatcher.mjs.map +1 -1
- package/menu/index.d.ts +2 -0
- package/package.json +3 -3
- package/schematics/migration.json +4 -4
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-update/index.d.ts +1 -1
- package/schematics/ng-update/index.js +3 -3
- package/schematics/update-tool/target-version.d.ts +1 -1
- package/schematics/update-tool/target-version.js +1 -1
package/fesm2022/overlay.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay.mjs","sources":["../../../../../
|
|
1
|
+
{"version":3,"file":"overlay.mjs","sources":["../../../../../k8-fastbuild-ST-c646aa77115d/bin/src/cdk/overlay/fullscreen-overlay-container.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {inject, Injectable, OnDestroy, RendererFactory2} from '@angular/core';\nimport {OverlayContainer} from './overlay-container';\n\n/**\n * Alternative to OverlayContainer that supports correct displaying of overlay elements in\n * Fullscreen mode\n * https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen\n *\n * Should be provided in the root component.\n */\n@Injectable({providedIn: 'root'})\nexport class FullscreenOverlayContainer extends OverlayContainer implements OnDestroy {\n private _renderer = inject(RendererFactory2).createRenderer(null, null);\n private _fullScreenEventName: string | undefined;\n private _cleanupFullScreenListener: (() => void) | undefined;\n\n constructor(...args: unknown[]);\n\n constructor() {\n super();\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n this._cleanupFullScreenListener?.();\n }\n\n protected override _createContainer(): void {\n const eventName = this._getEventName();\n super._createContainer();\n this._adjustParentForFullscreenChange();\n\n if (eventName) {\n this._cleanupFullScreenListener?.();\n this._cleanupFullScreenListener = this._renderer.listen('document', eventName, () => {\n this._adjustParentForFullscreenChange();\n });\n }\n }\n\n private _adjustParentForFullscreenChange(): void {\n if (this._containerElement) {\n const fullscreenElement = this.getFullscreenElement();\n const parent = fullscreenElement || this._document.body;\n parent.appendChild(this._containerElement);\n }\n }\n\n private _getEventName(): string | undefined {\n if (!this._fullScreenEventName) {\n const _document = this._document as any;\n\n if (_document.fullscreenEnabled) {\n this._fullScreenEventName = 'fullscreenchange';\n } else if (_document.webkitFullscreenEnabled) {\n this._fullScreenEventName = 'webkitfullscreenchange';\n } else if (_document.mozFullScreenEnabled) {\n this._fullScreenEventName = 'mozfullscreenchange';\n } else if (_document.msFullscreenEnabled) {\n this._fullScreenEventName = 'MSFullscreenChange';\n }\n }\n\n return this._fullScreenEventName;\n }\n\n /**\n * When the page is put into fullscreen mode, a specific element is specified.\n * Only that element and its children are visible when in fullscreen mode.\n */\n getFullscreenElement(): Element {\n const _document = this._document as any;\n\n return (\n _document.fullscreenElement ||\n _document.webkitFullscreenElement ||\n _document.mozFullScreenElement ||\n _document.msFullscreenElement ||\n null\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAWA;;;;;;AAMG;AAEG,MAAO,0BAA2B,SAA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AAA,IAAI,SAAS,CAAC,oBAAoB,EAAE;AACzC,gBAAA,IAAI,CAAC,oBAAoB,GAAG,qBAAqB;;AAC5C,iBAAA,IAAI,SAAS,CAAC,mBAAmB,EAAE;AACxC,gBAAA,IAAI,CAAC,oBAAoB,GAAG,oBAAoB;;;QAIpD,OAAO,IAAI,CAAC,oBAAoB;;AAGlC;;;AAGG;IACH,oBAAoB,GAAA;AAClB,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,SAAgB;QAEvC,QACE,SAAS,CAAC,iBAAiB;AAC3B,YAAA,SAAS,CAAC,uBAAuB;AACjC,YAAA,SAAS,CAAC,oBAAoB;AAC9B,YAAA,SAAS,CAAC,mBAAmB;AAC7B,YAAA,IAAI;;4GAnEG,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAA1B,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,aAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,cADd,MAAM,EAAA,CAAA;;gGAClB,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBADtC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"passive-listeners.mjs","sources":["../../../../../
|
|
1
|
+
{"version":3,"file":"passive-listeners.mjs","sources":["../../../../../k8-fastbuild-ST-c646aa77115d/bin/src/cdk/platform/features/passive-listeners.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/** Cached result of whether the user's browser supports passive event listeners. */\nlet supportsPassiveEvents: boolean;\n\n/**\n * Checks whether the user's browser supports passive event listeners.\n * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n */\nexport function supportsPassiveEventListeners(): boolean {\n if (supportsPassiveEvents == null && typeof window !== 'undefined') {\n try {\n window.addEventListener(\n 'test',\n null!,\n Object.defineProperty({}, 'passive', {\n get: () => (supportsPassiveEvents = true),\n }),\n );\n } finally {\n supportsPassiveEvents = supportsPassiveEvents || false;\n }\n }\n\n return supportsPassiveEvents;\n}\n\n/**\n * Normalizes an `AddEventListener` object to something that can be passed\n * to `addEventListener` on any browser, no matter whether it supports the\n * `options` parameter.\n * @param options Object to be normalized.\n */\nexport function normalizePassiveListenerOptions(\n options: AddEventListenerOptions,\n): AddEventListenerOptions | boolean {\n return supportsPassiveEventListeners() ? options : !!options.capture;\n}\n"],"names":[],"mappings":"AAQA;AACA,IAAI,qBAA8B;AAElC;;;AAGG;SACa,6BAA6B,GAAA;IAC3C,IAAI,qBAAqB,IAAI,IAAI,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AAClE,QAAA,IAAI;AACF,YAAA,MAAM,CAAC,gBAAgB,CACrB,MAAM,EACN,IAAK,EACL,MAAM,CAAC,cAAc,CAAC,EAAE,EAAE,SAAS,EAAE;gBACnC,GAAG,EAAE,OAAO,qBAAqB,GAAG,IAAI,CAAC;AAC1C,aAAA,CAAC,CACH;;gBACO;AACR,YAAA,qBAAqB,GAAG,qBAAqB,IAAI,KAAK;;;AAI1D,IAAA,OAAO,qBAAqB;AAC9B;AAEA;;;;;AAKG;AACG,SAAU,+BAA+B,CAC7C,OAAgC,EAAA;AAEhC,IAAA,OAAO,6BAA6B,EAAE,GAAG,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO;AACtE;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.mjs","sources":["../../../../../
|
|
1
|
+
{"version":3,"file":"platform.mjs","sources":["../../../../../k8-fastbuild-ST-c646aa77115d/bin/src/cdk/platform/platform-module.ts","../../../../../k8-fastbuild-ST-c646aa77115d/bin/src/cdk/platform/features/input-types.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\n\n@NgModule({})\nexport class PlatformModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/** Cached result Set of input types support by the current browser. */\nlet supportedInputTypes: Set<string>;\n\n/** Types of `<input>` that *might* be supported. */\nconst candidateInputTypes = [\n // `color` must come first. Chrome 56 shows a warning if we change the type to `color` after\n // first changing it to something else:\n // The specified value \"\" does not conform to the required format.\n // The format is \"#rrggbb\" where rr, gg, bb are two-digit hexadecimal numbers.\n 'color',\n 'button',\n 'checkbox',\n 'date',\n 'datetime-local',\n 'email',\n 'file',\n 'hidden',\n 'image',\n 'month',\n 'number',\n 'password',\n 'radio',\n 'range',\n 'reset',\n 'search',\n 'submit',\n 'tel',\n 'text',\n 'time',\n 'url',\n 'week',\n];\n\n/** @returns The input types supported by this browser. */\nexport function getSupportedInputTypes(): Set<string> {\n // Result is cached.\n if (supportedInputTypes) {\n return supportedInputTypes;\n }\n\n // We can't check if an input type is not supported until we're on the browser, so say that\n // everything is supported when not on the browser. We don't use `Platform` here since it's\n // just a helper function and can't inject it.\n if (typeof document !== 'object' || !document) {\n supportedInputTypes = new Set(candidateInputTypes);\n return supportedInputTypes;\n }\n\n let featureTestInput = document.createElement('input');\n supportedInputTypes = new Set(\n candidateInputTypes.filter(value => {\n featureTestInput.setAttribute('type', value);\n return featureTestInput.type === value;\n }),\n );\n\n return supportedInputTypes;\n}\n"],"names":[],"mappings":";;;;;;;;;MAWa,cAAc,CAAA;4GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;6GAAd,cAAc,EAAA,CAAA;6GAAd,cAAc,EAAA,CAAA;;gGAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,QAAQ;mBAAC,EAAE;;;ACFZ;AACA,IAAI,mBAAgC;AAEpC;AACA,MAAM,mBAAmB,GAAG;;;;;IAK1B,OAAO;IACP,QAAQ;IACR,UAAU;IACV,MAAM;IACN,gBAAgB;IAChB,OAAO;IACP,MAAM;IACN,QAAQ;IACR,OAAO;IACP,OAAO;IACP,QAAQ;IACR,UAAU;IACV,OAAO;IACP,OAAO;IACP,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,KAAK;IACL,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;CACP;AAED;SACgB,sBAAsB,GAAA;;IAEpC,IAAI,mBAAmB,EAAE;AACvB,QAAA,OAAO,mBAAmB;;;;;IAM5B,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,CAAC,QAAQ,EAAE;AAC7C,QAAA,mBAAmB,GAAG,IAAI,GAAG,CAAC,mBAAmB,CAAC;AAClD,QAAA,OAAO,mBAAmB;;IAG5B,IAAI,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;IACtD,mBAAmB,GAAG,IAAI,GAAG,CAC3B,mBAAmB,CAAC,MAAM,CAAC,KAAK,IAAG;AACjC,QAAA,gBAAgB,CAAC,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC;AAC5C,QAAA,OAAO,gBAAgB,CAAC,IAAI,KAAK,KAAK;KACvC,CAAC,CACH;AAED,IAAA,OAAO,mBAAmB;AAC5B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform2.mjs","sources":["../../../../../
|
|
1
|
+
{"version":3,"file":"platform2.mjs","sources":["../../../../../k8-fastbuild-ST-c646aa77115d/bin/src/cdk/platform/platform.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {inject, Injectable, PLATFORM_ID} from '@angular/core';\nimport {isPlatformBrowser} from '@angular/common';\n\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nlet hasV8BreakIterator: boolean;\n\n// We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n// cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n// the consumer is providing a polyfilled `Map`. See:\n// https://github.com/Microsoft/ChakraCore/issues/3189\n// https://github.com/angular/components/issues/15687\ntry {\n hasV8BreakIterator = typeof Intl !== 'undefined' && (Intl as any).v8BreakIterator;\n} catch {\n hasV8BreakIterator = false;\n}\n\n/**\n * Service to detect the current platform by comparing the userAgent strings and\n * checking browser-specific global properties.\n */\n@Injectable({providedIn: 'root'})\nexport class Platform {\n private _platformId = inject(PLATFORM_ID);\n\n // We want to use the Angular platform check because if the Document is shimmed\n // without the navigator, the following checks will fail. This is preferred because\n // sometimes the Document may be shimmed without the user's knowledge or intention\n /** Whether the Angular application is being rendered in the browser. */\n isBrowser: boolean = this._platformId\n ? isPlatformBrowser(this._platformId)\n : typeof document === 'object' && !!document;\n\n /** Whether the current browser is Microsoft Edge. */\n EDGE: boolean = this.isBrowser && /(edge)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Microsoft Trident. */\n TRIDENT: boolean = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);\n\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n /** Whether the current rendering engine is Blink. */\n BLINK: boolean =\n this.isBrowser &&\n !!((window as any).chrome || hasV8BreakIterator) &&\n typeof CSS !== 'undefined' &&\n !this.EDGE &&\n !this.TRIDENT;\n\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n /** Whether the current rendering engine is WebKit. */\n WEBKIT: boolean =\n this.isBrowser &&\n /AppleWebKit/i.test(navigator.userAgent) &&\n !this.BLINK &&\n !this.EDGE &&\n !this.TRIDENT;\n\n /** Whether the current platform is Apple iOS. */\n IOS: boolean =\n this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) && !('MSStream' in window);\n\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n /** Whether the current browser is Firefox. */\n FIREFOX: boolean = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);\n\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n ANDROID: boolean = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;\n\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n /** Whether the current browser is Safari. */\n SAFARI: boolean = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;\n\n /** Backwards-compatible constructor. */\n constructor(..._args: unknown[]);\n\n constructor() {}\n}\n"],"names":[],"mappings":";;;;AAWA;AACA;AACA,IAAI,kBAA2B;AAE/B;AACA;AACA;AACA;AACA;AACA,IAAI;IACF,kBAAkB,GAAG,OAAO,IAAI,KAAK,WAAW,IAAK,IAAY,CAAC,eAAe;AACnF;AAAE,MAAM;IACN,kBAAkB,GAAG,KAAK;AAC5B;AAEA;;;AAGG;MAEU,QAAQ,CAAA;AACX,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;;;;;IAMzC,SAAS,GAAY,IAAI,CAAC;AACxB,UAAE,iBAAiB,CAAC,IAAI,CAAC,WAAW;UAClC,OAAO,QAAQ,KAAK,QAAQ,IAAI,CAAC,CAAC,QAAQ;;AAG9C,IAAA,IAAI,GAAY,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;;AAGrE,IAAA,OAAO,GAAY,IAAI,CAAC,SAAS,IAAI,iBAAiB,CAAC,IAA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A,CAAA;kBADpB,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;;;;"}
|
package/fesm2022/portal.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portal.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/cdk/portal/portal-errors.ts","../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/cdk/portal/portal.ts","../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/cdk/portal/dom-portal-outlet.ts","../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/cdk/portal/portal-directives.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * Throws an exception when attempting to attach a null portal to a host.\n * @docs-private\n */\nexport function throwNullPortalError() {\n throw Error('Must provide a portal to attach');\n}\n\n/**\n * Throws an exception when attempting to attach a portal to a host that is already attached.\n * @docs-private\n */\nexport function throwPortalAlreadyAttachedError() {\n throw Error('Host already has a portal attached');\n}\n\n/**\n * Throws an exception when attempting to attach a portal to an already-disposed host.\n * @docs-private\n */\nexport function throwPortalOutletAlreadyDisposedError() {\n throw Error('This PortalOutlet has already been disposed');\n}\n\n/**\n * Throws an exception when attempting to attach an unknown portal type.\n * @docs-private\n */\nexport function throwUnknownPortalTypeError() {\n throw Error(\n 'Attempting to attach an unknown Portal type. BasePortalOutlet accepts either ' +\n 'a ComponentPortal or a TemplatePortal.',\n );\n}\n\n/**\n * Throws an exception when attempting to attach a portal to a null host.\n * @docs-private\n */\nexport function throwNullPortalOutletError() {\n throw Error('Attempting to attach a portal to a null PortalOutlet');\n}\n\n/**\n * Throws an exception when attempting to detach a portal that is not attached.\n * @docs-private\n */\nexport function throwNoPortalAttachedError() {\n throw Error('Attempting to detach a portal that is not attached to a host');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n TemplateRef,\n ViewContainerRef,\n ElementRef,\n ComponentRef,\n EmbeddedViewRef,\n Injector,\n} from '@angular/core';\nimport {\n throwNullPortalOutletError,\n throwPortalAlreadyAttachedError,\n throwNoPortalAttachedError,\n throwNullPortalError,\n throwPortalOutletAlreadyDisposedError,\n throwUnknownPortalTypeError,\n} from './portal-errors';\n\n/** Interface that can be used to generically type a class. */\nexport interface ComponentType<T> {\n new (...args: any[]): T;\n}\n\n/**\n * A `Portal` is something that you want to render somewhere else.\n * It can be attach to / detached from a `PortalOutlet`.\n */\nexport abstract class Portal<T> {\n private _attachedHost: PortalOutlet | null;\n\n /** Attach this portal to a host. */\n attach(host: PortalOutlet): T {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (host == null) {\n throwNullPortalOutletError();\n }\n\n if (host.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n }\n\n this._attachedHost = host;\n return <T>host.attach(this);\n }\n\n /** Detach this portal from its host */\n detach(): void {\n let host = this._attachedHost;\n\n if (host != null) {\n this._attachedHost = null;\n host.detach();\n } else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwNoPortalAttachedError();\n }\n }\n\n /** Whether this portal is attached to a host. */\n get isAttached(): boolean {\n return this._attachedHost != null;\n }\n\n /**\n * Sets the PortalOutlet reference without performing `attach()`. This is used directly by\n * the PortalOutlet when it is performing an `attach()` or `detach()`.\n */\n setAttachedHost(host: PortalOutlet | null) {\n this._attachedHost = host;\n }\n}\n\n/**\n * A `ComponentPortal` is a portal that instantiates some Component upon attachment.\n */\nexport class ComponentPortal<T> extends Portal<ComponentRef<T>> {\n /** The type of the component that will be instantiated for attachment. */\n component: ComponentType<T>;\n\n /**\n * Where the attached component should live in Angular's *logical* component tree.\n * This is different from where the component *renders*, which is determined by the PortalOutlet.\n * The origin is necessary when the host is outside of the Angular application context.\n */\n viewContainerRef?: ViewContainerRef | null;\n\n /** Injector used for the instantiation of the component. */\n injector?: Injector | null;\n\n /**\n * List of DOM nodes that should be projected through `<ng-content>` of the attached component.\n */\n projectableNodes?: Node[][] | null;\n\n constructor(\n component: ComponentType<T>,\n viewContainerRef?: ViewContainerRef | null,\n injector?: Injector | null,\n projectableNodes?: Node[][] | null,\n ) {\n super();\n this.component = component;\n this.viewContainerRef = viewContainerRef;\n this.injector = injector;\n this.projectableNodes = projectableNodes;\n }\n}\n\n/**\n * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).\n */\nexport class TemplatePortal<C = any> extends Portal<EmbeddedViewRef<C>> {\n constructor(\n /** The embedded template that will be used to instantiate an embedded View in the host. */\n public templateRef: TemplateRef<C>,\n /** Reference to the ViewContainer into which the template will be stamped out. */\n public viewContainerRef: ViewContainerRef,\n /** Contextual data to be passed in to the embedded view. */\n public context?: C,\n /** The injector to use for the embedded view. */\n public injector?: Injector,\n ) {\n super();\n }\n\n get origin(): ElementRef {\n return this.templateRef.elementRef;\n }\n\n /**\n * Attach the portal to the provided `PortalOutlet`.\n * When a context is provided it will override the `context` property of the `TemplatePortal`\n * instance.\n */\n override attach(host: PortalOutlet, context: C | undefined = this.context): EmbeddedViewRef<C> {\n this.context = context;\n return super.attach(host);\n }\n\n override detach(): void {\n this.context = undefined;\n return super.detach();\n }\n}\n\n/**\n * A `DomPortal` is a portal whose DOM element will be taken from its current position\n * in the DOM and moved into a portal outlet, when it is attached. On detach, the content\n * will be restored to its original position.\n */\nexport class DomPortal<T = HTMLElement> extends Portal<T> {\n /** DOM node hosting the portal's content. */\n readonly element: T;\n\n constructor(element: T | ElementRef<T>) {\n super();\n this.element = element instanceof ElementRef ? element.nativeElement : element;\n }\n}\n\n/** A `PortalOutlet` is a space that can contain a single `Portal`. */\nexport interface PortalOutlet {\n /** Attaches a portal to this outlet. */\n attach(portal: Portal<any>): any;\n\n /** Detaches the currently attached portal from this outlet. */\n detach(): any;\n\n /** Performs cleanup before the outlet is destroyed. */\n dispose(): void;\n\n /** Whether there is currently a portal attached to this outlet. */\n hasAttached(): boolean;\n}\n\n/**\n * Partial implementation of PortalOutlet that handles attaching\n * ComponentPortal and TemplatePortal.\n */\nexport abstract class BasePortalOutlet implements PortalOutlet {\n /** The portal currently attached to the host. */\n protected _attachedPortal: Portal<any> | null;\n\n /** A function that will permanently dispose this host. */\n private _disposeFn: (() => void) | null;\n\n /** Whether this host has already been permanently disposed. */\n private _isDisposed: boolean = false;\n\n /** Whether this host has an attached portal. */\n hasAttached(): boolean {\n return !!this._attachedPortal;\n }\n\n attach<T>(portal: ComponentPortal<T>): ComponentRef<T>;\n attach<T>(portal: TemplatePortal<T>): EmbeddedViewRef<T>;\n attach(portal: any): any;\n\n /** Attaches a portal. */\n attach(portal: Portal<any>): any {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!portal) {\n throwNullPortalError();\n }\n\n if (this.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n\n if (this._isDisposed) {\n throwPortalOutletAlreadyDisposedError();\n }\n }\n\n if (portal instanceof ComponentPortal) {\n this._attachedPortal = portal;\n return this.attachComponentPortal(portal);\n } else if (portal instanceof TemplatePortal) {\n this._attachedPortal = portal;\n return this.attachTemplatePortal(portal);\n // @breaking-change 10.0.0 remove null check for `this.attachDomPortal`.\n } else if (this.attachDomPortal && portal instanceof DomPortal) {\n this._attachedPortal = portal;\n return this.attachDomPortal(portal);\n }\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwUnknownPortalTypeError();\n }\n }\n\n abstract attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;\n\n abstract attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;\n\n // @breaking-change 10.0.0 `attachDomPortal` to become a required abstract method.\n readonly attachDomPortal: null | ((portal: DomPortal) => any) = null;\n\n /** Detaches a previously attached portal. */\n detach(): void {\n if (this._attachedPortal) {\n this._attachedPortal.setAttachedHost(null);\n this._attachedPortal = null;\n }\n\n this._invokeDisposeFn();\n }\n\n /** Permanently dispose of this portal host. */\n dispose(): void {\n if (this.hasAttached()) {\n this.detach();\n }\n\n this._invokeDisposeFn();\n this._isDisposed = true;\n }\n\n /** @docs-private */\n setDisposeFn(fn: () => void) {\n this._disposeFn = fn;\n }\n\n private _invokeDisposeFn() {\n if (this._disposeFn) {\n this._disposeFn();\n this._disposeFn = null;\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ApplicationRef,\n ComponentRef,\n EmbeddedViewRef,\n EnvironmentInjector,\n Injector,\n NgModuleRef,\n createComponent,\n} from '@angular/core';\nimport {BasePortalOutlet, ComponentPortal, DomPortal, TemplatePortal} from './portal';\n\n/**\n * A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular\n * application context.\n */\nexport class DomPortalOutlet extends BasePortalOutlet {\n /**\n * @param outletElement Element into which the content is projected.\n * @param _appRef Reference to the application. Only used in component portals when there\n * is no `ViewContainerRef` available.\n * @param _defaultInjector Injector to use as a fallback when the portal being attached doesn't\n * have one. Only used for component portals.\n */\n constructor(\n /** Element into which the content is projected. */\n public outletElement: Element,\n private _appRef?: ApplicationRef,\n private _defaultInjector?: Injector,\n ) {\n super();\n }\n\n /**\n * Attach the given ComponentPortal to DOM element.\n * @param portal Portal to be attached\n * @returns Reference to the created component.\n */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n let componentRef: ComponentRef<T>;\n\n // If the portal specifies a ViewContainerRef, we will use that as the attachment point\n // for the component (in terms of Angular's component tree, not rendering).\n // When the ViewContainerRef is missing, we use the factory to create the component directly\n // and then manually attach the view to the application.\n if (portal.viewContainerRef) {\n const injector = portal.injector || portal.viewContainerRef.injector;\n const ngModuleRef = injector.get(NgModuleRef, null, {optional: true}) || undefined;\n\n componentRef = portal.viewContainerRef.createComponent(portal.component, {\n index: portal.viewContainerRef.length,\n injector,\n ngModuleRef,\n projectableNodes: portal.projectableNodes || undefined,\n });\n\n this.setDisposeFn(() => componentRef.destroy());\n } else {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !this._appRef) {\n throw Error('Cannot attach component portal to outlet without an ApplicationRef.');\n }\n const appRef = this._appRef!;\n\n const elementInjector = portal.injector || this._defaultInjector || Injector.NULL;\n const environmentInjector = elementInjector.get(EnvironmentInjector, appRef.injector);\n componentRef = createComponent(portal.component, {\n elementInjector,\n environmentInjector,\n projectableNodes: portal.projectableNodes || undefined,\n });\n\n appRef.attachView(componentRef.hostView);\n this.setDisposeFn(() => {\n // Verify that the ApplicationRef has registered views before trying to detach a host view.\n // This check also protects the `detachView` from being called on a destroyed ApplicationRef.\n if (appRef.viewCount > 0) {\n appRef.detachView(componentRef.hostView);\n }\n componentRef.destroy();\n });\n }\n // At this point the component has been instantiated, so we move it to the location in the DOM\n // where we want it to be rendered.\n this.outletElement.appendChild(this._getComponentRootNode(componentRef));\n this._attachedPortal = portal;\n\n return componentRef;\n }\n\n /**\n * Attaches a template portal to the DOM as an embedded view.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n let viewContainer = portal.viewContainerRef;\n let viewRef = viewContainer.createEmbeddedView(portal.templateRef, portal.context, {\n injector: portal.injector,\n });\n\n // The method `createEmbeddedView` will add the view as a child of the viewContainer.\n // But for the DomPortalOutlet the view can be added everywhere in the DOM\n // (e.g Overlay Container) To move the view to the specified host element. We just\n // re-append the existing root nodes.\n viewRef.rootNodes.forEach(rootNode => this.outletElement.appendChild(rootNode));\n\n // Note that we want to detect changes after the nodes have been moved so that\n // any directives inside the portal that are looking at the DOM inside a lifecycle\n // hook won't be invoked too early.\n viewRef.detectChanges();\n\n this.setDisposeFn(() => {\n let index = viewContainer.indexOf(viewRef);\n if (index !== -1) {\n viewContainer.remove(index);\n }\n });\n\n this._attachedPortal = portal;\n\n // TODO(jelbourn): Return locals from view.\n return viewRef;\n }\n\n /**\n * Attaches a DOM portal by transferring its content into the outlet.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n override attachDomPortal = (portal: DomPortal) => {\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode = this.outletElement.ownerDocument.createComment('dom-portal');\n\n element.parentNode!.insertBefore(anchorNode, element);\n this.outletElement.appendChild(element);\n this._attachedPortal = portal;\n\n super.setDisposeFn(() => {\n // We can't use `replaceWith` here because IE doesn't support it.\n if (anchorNode.parentNode) {\n anchorNode.parentNode.replaceChild(element, anchorNode);\n }\n });\n };\n\n /**\n * Clears out a portal from the DOM.\n */\n override dispose(): void {\n super.dispose();\n this.outletElement.remove();\n }\n\n /** Gets the root HTMLElement for an instantiated component. */\n private _getComponentRootNode(componentRef: ComponentRef<any>): HTMLElement {\n return (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ComponentRef,\n Directive,\n EmbeddedViewRef,\n EventEmitter,\n NgModule,\n OnDestroy,\n OnInit,\n Output,\n TemplateRef,\n ViewContainerRef,\n Input,\n inject,\n NgModuleRef,\n DOCUMENT,\n} from '@angular/core';\n\nimport {BasePortalOutlet, ComponentPortal, Portal, TemplatePortal, DomPortal} from './portal';\n\n/**\n * Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,\n * the directive instance itself can be attached to a host, enabling declarative use of portals.\n */\n@Directive({\n selector: '[cdkPortal]',\n exportAs: 'cdkPortal',\n})\nexport class CdkPortal extends TemplatePortal {\n constructor(...args: unknown[]);\n\n constructor() {\n const templateRef = inject<TemplateRef<any>>(TemplateRef);\n const viewContainerRef = inject(ViewContainerRef);\n\n super(templateRef, viewContainerRef);\n }\n}\n\n/**\n * @deprecated Use `CdkPortal` instead.\n * @breaking-change 9.0.0\n */\n@Directive({\n selector: '[cdk-portal], [portal]',\n exportAs: 'cdkPortal',\n providers: [\n {\n provide: CdkPortal,\n useExisting: TemplatePortalDirective,\n },\n ],\n})\nexport class TemplatePortalDirective extends CdkPortal {}\n\n/**\n * Possible attached references to the CdkPortalOutlet.\n */\nexport type CdkPortalOutletAttachedRef = ComponentRef<any> | EmbeddedViewRef<any> | null;\n\n/**\n * Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be\n * directly attached to it, enabling declarative use.\n *\n * Usage:\n * `<ng-template [cdkPortalOutlet]=\"greeting\"></ng-template>`\n */\n@Directive({\n selector: '[cdkPortalOutlet]',\n exportAs: 'cdkPortalOutlet',\n})\nexport class CdkPortalOutlet extends BasePortalOutlet implements OnInit, OnDestroy {\n private _moduleRef = inject(NgModuleRef, {optional: true});\n private _document = inject(DOCUMENT);\n private _viewContainerRef = inject(ViewContainerRef);\n\n /** Whether the portal component is initialized. */\n private _isInitialized = false;\n\n /** Reference to the currently-attached component/view ref. */\n private _attachedRef: CdkPortalOutletAttachedRef;\n\n constructor(...args: unknown[]);\n\n constructor() {\n super();\n }\n\n /** Portal associated with the Portal outlet. */\n @Input('cdkPortalOutlet')\n get portal(): Portal<any> | null {\n return this._attachedPortal;\n }\n\n set portal(portal: Portal<any> | null | undefined | '') {\n // Ignore the cases where the `portal` is set to a falsy value before the lifecycle hooks have\n // run. This handles the cases where the user might do something like `<div cdkPortalOutlet>`\n // and attach a portal programmatically in the parent component. When Angular does the first CD\n // round, it will fire the setter with empty string, causing the user's content to be cleared.\n if (this.hasAttached() && !portal && !this._isInitialized) {\n return;\n }\n\n if (this.hasAttached()) {\n super.detach();\n }\n\n if (portal) {\n super.attach(portal);\n }\n\n this._attachedPortal = portal || null;\n }\n\n /** Emits when a portal is attached to the outlet. */\n @Output() readonly attached: EventEmitter<CdkPortalOutletAttachedRef> =\n new EventEmitter<CdkPortalOutletAttachedRef>();\n\n /** Component or view reference that is attached to the portal. */\n get attachedRef(): CdkPortalOutletAttachedRef {\n return this._attachedRef;\n }\n\n ngOnInit() {\n this._isInitialized = true;\n }\n\n ngOnDestroy() {\n super.dispose();\n this._attachedRef = this._attachedPortal = null;\n }\n\n /**\n * Attach the given ComponentPortal to this PortalOutlet.\n *\n * @param portal Portal to be attached to the portal outlet.\n * @returns Reference to the created component.\n */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n portal.setAttachedHost(this);\n\n // If the portal specifies an origin, use that as the logical location of the component\n // in the application tree. Otherwise use the location of this PortalOutlet.\n const viewContainerRef =\n portal.viewContainerRef != null ? portal.viewContainerRef : this._viewContainerRef;\n\n const ref = viewContainerRef.createComponent(portal.component, {\n index: viewContainerRef.length,\n injector: portal.injector || viewContainerRef.injector,\n projectableNodes: portal.projectableNodes || undefined,\n ngModuleRef: this._moduleRef || undefined,\n });\n\n // If we're using a view container that's different from the injected one (e.g. when the portal\n // specifies its own) we need to move the component into the outlet, otherwise it'll be rendered\n // inside of the alternate view container.\n if (viewContainerRef !== this._viewContainerRef) {\n this._getRootNode().appendChild((ref.hostView as EmbeddedViewRef<any>).rootNodes[0]);\n }\n\n super.setDisposeFn(() => ref.destroy());\n this._attachedPortal = portal;\n this._attachedRef = ref;\n this.attached.emit(ref);\n\n return ref;\n }\n\n /**\n * Attach the given TemplatePortal to this PortalHost as an embedded View.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n portal.setAttachedHost(this);\n const viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context, {\n injector: portal.injector,\n });\n super.setDisposeFn(() => this._viewContainerRef.clear());\n\n this._attachedPortal = portal;\n this._attachedRef = viewRef;\n this.attached.emit(viewRef);\n\n return viewRef;\n }\n\n /**\n * Attaches the given DomPortal to this PortalHost by moving all of the portal content into it.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n override attachDomPortal = (portal: DomPortal) => {\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode = this._document.createComment('dom-portal');\n\n portal.setAttachedHost(this);\n element.parentNode!.insertBefore(anchorNode, element);\n this._getRootNode().appendChild(element);\n this._attachedPortal = portal;\n\n super.setDisposeFn(() => {\n if (anchorNode.parentNode) {\n anchorNode.parentNode!.replaceChild(element, anchorNode);\n }\n });\n };\n\n /** Gets the root node of the portal outlet. */\n private _getRootNode(): HTMLElement {\n const nativeElement: Node = this._viewContainerRef.element.nativeElement;\n\n // The directive could be set on a template which will result in a comment\n // node being the root. Use the comment's parent node if that is the case.\n return (\n nativeElement.nodeType === nativeElement.ELEMENT_NODE\n ? nativeElement\n : nativeElement.parentNode!\n ) as HTMLElement;\n }\n}\n\n/**\n * @deprecated Use `CdkPortalOutlet` instead.\n * @breaking-change 9.0.0\n */\n@Directive({\n selector: '[cdkPortalHost], [portalHost]',\n exportAs: 'cdkPortalHost',\n inputs: [{name: 'portal', alias: 'cdkPortalHost'}],\n providers: [\n {\n provide: CdkPortalOutlet,\n useExisting: PortalHostDirective,\n },\n ],\n})\nexport class PortalHostDirective extends CdkPortalOutlet {}\n\n@NgModule({\n imports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],\n exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],\n})\nexport class PortalModule {}\n"],"names":[],"mappings":";;;AAQA;;;AAGG;SACa,oBAAoB,GAAA;AAClC,IAAA,MAAM,KAAK,CAAC,iCAAiC,CAAC;AAChD;AAEA;;;AAGG;SACa,+BAA+B,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AAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,aAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,EA9NZ,OAAA,EAAA,CAAA,SAAS,EA2CT,eAAe,EAlBf,uBAAuB,EA+LvB,mBAAmB,CAAA,EAAA,OAAA,EAAA,CAxNnB,SAAS,EA2CT,eAAe,EAlBf,uBAAuB,EA+LvB,mBAAmB,CAAA,EAAA,CAAA;6GAMnB,YAAY,EAAA,CAAA;;gGAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,SAAS,EAAE,eAAe,EAAE,uBAAuB,EAAE,mBAAmB,CAAC;oBACnF,OAAO,EAAE,CAAC,SAAS,EAAE,eAAe,EAAE,uBAAuB,EAAE,mBAAmB,CAAC;AACpF,iBAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"portal.mjs","sources":["../../../../../k8-fastbuild-ST-c646aa77115d/bin/src/cdk/portal/portal-errors.ts","../../../../../k8-fastbuild-ST-c646aa77115d/bin/src/cdk/portal/portal.ts","../../../../../k8-fastbuild-ST-c646aa77115d/bin/src/cdk/portal/dom-portal-outlet.ts","../../../../../k8-fastbuild-ST-c646aa77115d/bin/src/cdk/portal/portal-directives.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * Throws an exception when attempting to attach a null portal to a host.\n * @docs-private\n */\nexport function throwNullPortalError() {\n throw Error('Must provide a portal to attach');\n}\n\n/**\n * Throws an exception when attempting to attach a portal to a host that is already attached.\n * @docs-private\n */\nexport function throwPortalAlreadyAttachedError() {\n throw Error('Host already has a portal attached');\n}\n\n/**\n * Throws an exception when attempting to attach a portal to an already-disposed host.\n * @docs-private\n */\nexport function throwPortalOutletAlreadyDisposedError() {\n throw Error('This PortalOutlet has already been disposed');\n}\n\n/**\n * Throws an exception when attempting to attach an unknown portal type.\n * @docs-private\n */\nexport function throwUnknownPortalTypeError() {\n throw Error(\n 'Attempting to attach an unknown Portal type. BasePortalOutlet accepts either ' +\n 'a ComponentPortal or a TemplatePortal.',\n );\n}\n\n/**\n * Throws an exception when attempting to attach a portal to a null host.\n * @docs-private\n */\nexport function throwNullPortalOutletError() {\n throw Error('Attempting to attach a portal to a null PortalOutlet');\n}\n\n/**\n * Throws an exception when attempting to detach a portal that is not attached.\n * @docs-private\n */\nexport function throwNoPortalAttachedError() {\n throw Error('Attempting to detach a portal that is not attached to a host');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n TemplateRef,\n ViewContainerRef,\n ElementRef,\n ComponentRef,\n EmbeddedViewRef,\n Injector,\n} from '@angular/core';\nimport {\n throwNullPortalOutletError,\n throwPortalAlreadyAttachedError,\n throwNoPortalAttachedError,\n throwNullPortalError,\n throwPortalOutletAlreadyDisposedError,\n throwUnknownPortalTypeError,\n} from './portal-errors';\n\n/** Interface that can be used to generically type a class. */\nexport interface ComponentType<T> {\n new (...args: any[]): T;\n}\n\n/**\n * A `Portal` is something that you want to render somewhere else.\n * It can be attach to / detached from a `PortalOutlet`.\n */\nexport abstract class Portal<T> {\n private _attachedHost: PortalOutlet | null;\n\n /** Attach this portal to a host. */\n attach(host: PortalOutlet): T {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (host == null) {\n throwNullPortalOutletError();\n }\n\n if (host.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n }\n\n this._attachedHost = host;\n return <T>host.attach(this);\n }\n\n /** Detach this portal from its host */\n detach(): void {\n let host = this._attachedHost;\n\n if (host != null) {\n this._attachedHost = null;\n host.detach();\n } else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwNoPortalAttachedError();\n }\n }\n\n /** Whether this portal is attached to a host. */\n get isAttached(): boolean {\n return this._attachedHost != null;\n }\n\n /**\n * Sets the PortalOutlet reference without performing `attach()`. This is used directly by\n * the PortalOutlet when it is performing an `attach()` or `detach()`.\n */\n setAttachedHost(host: PortalOutlet | null) {\n this._attachedHost = host;\n }\n}\n\n/**\n * A `ComponentPortal` is a portal that instantiates some Component upon attachment.\n */\nexport class ComponentPortal<T> extends Portal<ComponentRef<T>> {\n /** The type of the component that will be instantiated for attachment. */\n component: ComponentType<T>;\n\n /**\n * Where the attached component should live in Angular's *logical* component tree.\n * This is different from where the component *renders*, which is determined by the PortalOutlet.\n * The origin is necessary when the host is outside of the Angular application context.\n */\n viewContainerRef?: ViewContainerRef | null;\n\n /** Injector used for the instantiation of the component. */\n injector?: Injector | null;\n\n /**\n * List of DOM nodes that should be projected through `<ng-content>` of the attached component.\n */\n projectableNodes?: Node[][] | null;\n\n constructor(\n component: ComponentType<T>,\n viewContainerRef?: ViewContainerRef | null,\n injector?: Injector | null,\n projectableNodes?: Node[][] | null,\n ) {\n super();\n this.component = component;\n this.viewContainerRef = viewContainerRef;\n this.injector = injector;\n this.projectableNodes = projectableNodes;\n }\n}\n\n/**\n * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).\n */\nexport class TemplatePortal<C = any> extends Portal<EmbeddedViewRef<C>> {\n constructor(\n /** The embedded template that will be used to instantiate an embedded View in the host. */\n public templateRef: TemplateRef<C>,\n /** Reference to the ViewContainer into which the template will be stamped out. */\n public viewContainerRef: ViewContainerRef,\n /** Contextual data to be passed in to the embedded view. */\n public context?: C,\n /** The injector to use for the embedded view. */\n public injector?: Injector,\n ) {\n super();\n }\n\n get origin(): ElementRef {\n return this.templateRef.elementRef;\n }\n\n /**\n * Attach the portal to the provided `PortalOutlet`.\n * When a context is provided it will override the `context` property of the `TemplatePortal`\n * instance.\n */\n override attach(host: PortalOutlet, context: C | undefined = this.context): EmbeddedViewRef<C> {\n this.context = context;\n return super.attach(host);\n }\n\n override detach(): void {\n this.context = undefined;\n return super.detach();\n }\n}\n\n/**\n * A `DomPortal` is a portal whose DOM element will be taken from its current position\n * in the DOM and moved into a portal outlet, when it is attached. On detach, the content\n * will be restored to its original position.\n */\nexport class DomPortal<T = HTMLElement> extends Portal<T> {\n /** DOM node hosting the portal's content. */\n readonly element: T;\n\n constructor(element: T | ElementRef<T>) {\n super();\n this.element = element instanceof ElementRef ? element.nativeElement : element;\n }\n}\n\n/** A `PortalOutlet` is a space that can contain a single `Portal`. */\nexport interface PortalOutlet {\n /** Attaches a portal to this outlet. */\n attach(portal: Portal<any>): any;\n\n /** Detaches the currently attached portal from this outlet. */\n detach(): any;\n\n /** Performs cleanup before the outlet is destroyed. */\n dispose(): void;\n\n /** Whether there is currently a portal attached to this outlet. */\n hasAttached(): boolean;\n}\n\n/**\n * Partial implementation of PortalOutlet that handles attaching\n * ComponentPortal and TemplatePortal.\n */\nexport abstract class BasePortalOutlet implements PortalOutlet {\n /** The portal currently attached to the host. */\n protected _attachedPortal: Portal<any> | null;\n\n /** A function that will permanently dispose this host. */\n private _disposeFn: (() => void) | null;\n\n /** Whether this host has already been permanently disposed. */\n private _isDisposed: boolean = false;\n\n /** Whether this host has an attached portal. */\n hasAttached(): boolean {\n return !!this._attachedPortal;\n }\n\n attach<T>(portal: ComponentPortal<T>): ComponentRef<T>;\n attach<T>(portal: TemplatePortal<T>): EmbeddedViewRef<T>;\n attach(portal: any): any;\n\n /** Attaches a portal. */\n attach(portal: Portal<any>): any {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!portal) {\n throwNullPortalError();\n }\n\n if (this.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n\n if (this._isDisposed) {\n throwPortalOutletAlreadyDisposedError();\n }\n }\n\n if (portal instanceof ComponentPortal) {\n this._attachedPortal = portal;\n return this.attachComponentPortal(portal);\n } else if (portal instanceof TemplatePortal) {\n this._attachedPortal = portal;\n return this.attachTemplatePortal(portal);\n // @breaking-change 10.0.0 remove null check for `this.attachDomPortal`.\n } else if (this.attachDomPortal && portal instanceof DomPortal) {\n this._attachedPortal = portal;\n return this.attachDomPortal(portal);\n }\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwUnknownPortalTypeError();\n }\n }\n\n abstract attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;\n\n abstract attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;\n\n // @breaking-change 10.0.0 `attachDomPortal` to become a required abstract method.\n readonly attachDomPortal: null | ((portal: DomPortal) => any) = null;\n\n /** Detaches a previously attached portal. */\n detach(): void {\n if (this._attachedPortal) {\n this._attachedPortal.setAttachedHost(null);\n this._attachedPortal = null;\n }\n\n this._invokeDisposeFn();\n }\n\n /** Permanently dispose of this portal host. */\n dispose(): void {\n if (this.hasAttached()) {\n this.detach();\n }\n\n this._invokeDisposeFn();\n this._isDisposed = true;\n }\n\n /** @docs-private */\n setDisposeFn(fn: () => void) {\n this._disposeFn = fn;\n }\n\n private _invokeDisposeFn() {\n if (this._disposeFn) {\n this._disposeFn();\n this._disposeFn = null;\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ApplicationRef,\n ComponentRef,\n EmbeddedViewRef,\n EnvironmentInjector,\n Injector,\n NgModuleRef,\n createComponent,\n} from '@angular/core';\nimport {BasePortalOutlet, ComponentPortal, DomPortal, TemplatePortal} from './portal';\n\n/**\n * A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular\n * application context.\n */\nexport class DomPortalOutlet extends BasePortalOutlet {\n /**\n * @param outletElement Element into which the content is projected.\n * @param _appRef Reference to the application. Only used in component portals when there\n * is no `ViewContainerRef` available.\n * @param _defaultInjector Injector to use as a fallback when the portal being attached doesn't\n * have one. Only used for component portals.\n */\n constructor(\n /** Element into which the content is projected. */\n public outletElement: Element,\n private _appRef?: ApplicationRef,\n private _defaultInjector?: Injector,\n ) {\n super();\n }\n\n /**\n * Attach the given ComponentPortal to DOM element.\n * @param portal Portal to be attached\n * @returns Reference to the created component.\n */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n let componentRef: ComponentRef<T>;\n\n // If the portal specifies a ViewContainerRef, we will use that as the attachment point\n // for the component (in terms of Angular's component tree, not rendering).\n // When the ViewContainerRef is missing, we use the factory to create the component directly\n // and then manually attach the view to the application.\n if (portal.viewContainerRef) {\n const injector = portal.injector || portal.viewContainerRef.injector;\n const ngModuleRef = injector.get(NgModuleRef, null, {optional: true}) || undefined;\n\n componentRef = portal.viewContainerRef.createComponent(portal.component, {\n index: portal.viewContainerRef.length,\n injector,\n ngModuleRef,\n projectableNodes: portal.projectableNodes || undefined,\n });\n\n this.setDisposeFn(() => componentRef.destroy());\n } else {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !this._appRef) {\n throw Error('Cannot attach component portal to outlet without an ApplicationRef.');\n }\n const appRef = this._appRef!;\n\n const elementInjector = portal.injector || this._defaultInjector || Injector.NULL;\n const environmentInjector = elementInjector.get(EnvironmentInjector, appRef.injector);\n componentRef = createComponent(portal.component, {\n elementInjector,\n environmentInjector,\n projectableNodes: portal.projectableNodes || undefined,\n });\n\n appRef.attachView(componentRef.hostView);\n this.setDisposeFn(() => {\n // Verify that the ApplicationRef has registered views before trying to detach a host view.\n // This check also protects the `detachView` from being called on a destroyed ApplicationRef.\n if (appRef.viewCount > 0) {\n appRef.detachView(componentRef.hostView);\n }\n componentRef.destroy();\n });\n }\n // At this point the component has been instantiated, so we move it to the location in the DOM\n // where we want it to be rendered.\n this.outletElement.appendChild(this._getComponentRootNode(componentRef));\n this._attachedPortal = portal;\n\n return componentRef;\n }\n\n /**\n * Attaches a template portal to the DOM as an embedded view.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n let viewContainer = portal.viewContainerRef;\n let viewRef = viewContainer.createEmbeddedView(portal.templateRef, portal.context, {\n injector: portal.injector,\n });\n\n // The method `createEmbeddedView` will add the view as a child of the viewContainer.\n // But for the DomPortalOutlet the view can be added everywhere in the DOM\n // (e.g Overlay Container) To move the view to the specified host element. We just\n // re-append the existing root nodes.\n viewRef.rootNodes.forEach(rootNode => this.outletElement.appendChild(rootNode));\n\n // Note that we want to detect changes after the nodes have been moved so that\n // any directives inside the portal that are looking at the DOM inside a lifecycle\n // hook won't be invoked too early.\n viewRef.detectChanges();\n\n this.setDisposeFn(() => {\n let index = viewContainer.indexOf(viewRef);\n if (index !== -1) {\n viewContainer.remove(index);\n }\n });\n\n this._attachedPortal = portal;\n\n // TODO(jelbourn): Return locals from view.\n return viewRef;\n }\n\n /**\n * Attaches a DOM portal by transferring its content into the outlet.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n override attachDomPortal = (portal: DomPortal) => {\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode = this.outletElement.ownerDocument.createComment('dom-portal');\n\n element.parentNode!.insertBefore(anchorNode, element);\n this.outletElement.appendChild(element);\n this._attachedPortal = portal;\n\n super.setDisposeFn(() => {\n // We can't use `replaceWith` here because IE doesn't support it.\n if (anchorNode.parentNode) {\n anchorNode.parentNode.replaceChild(element, anchorNode);\n }\n });\n };\n\n /**\n * Clears out a portal from the DOM.\n */\n override dispose(): void {\n super.dispose();\n this.outletElement.remove();\n }\n\n /** Gets the root HTMLElement for an instantiated component. */\n private _getComponentRootNode(componentRef: ComponentRef<any>): HTMLElement {\n return (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ComponentRef,\n Directive,\n EmbeddedViewRef,\n EventEmitter,\n NgModule,\n OnDestroy,\n OnInit,\n Output,\n TemplateRef,\n ViewContainerRef,\n Input,\n inject,\n NgModuleRef,\n DOCUMENT,\n} from '@angular/core';\n\nimport {BasePortalOutlet, ComponentPortal, Portal, TemplatePortal, DomPortal} from './portal';\n\n/**\n * Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,\n * the directive instance itself can be attached to a host, enabling declarative use of portals.\n */\n@Directive({\n selector: '[cdkPortal]',\n exportAs: 'cdkPortal',\n})\nexport class CdkPortal extends TemplatePortal {\n constructor(...args: unknown[]);\n\n constructor() {\n const templateRef = inject<TemplateRef<any>>(TemplateRef);\n const viewContainerRef = inject(ViewContainerRef);\n\n super(templateRef, viewContainerRef);\n }\n}\n\n/**\n * @deprecated Use `CdkPortal` instead.\n * @breaking-change 9.0.0\n */\n@Directive({\n selector: '[cdk-portal], [portal]',\n exportAs: 'cdkPortal',\n providers: [\n {\n provide: CdkPortal,\n useExisting: TemplatePortalDirective,\n },\n ],\n})\nexport class TemplatePortalDirective extends CdkPortal {}\n\n/**\n * Possible attached references to the CdkPortalOutlet.\n */\nexport type CdkPortalOutletAttachedRef = ComponentRef<any> | EmbeddedViewRef<any> | null;\n\n/**\n * Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be\n * directly attached to it, enabling declarative use.\n *\n * Usage:\n * `<ng-template [cdkPortalOutlet]=\"greeting\"></ng-template>`\n */\n@Directive({\n selector: '[cdkPortalOutlet]',\n exportAs: 'cdkPortalOutlet',\n})\nexport class CdkPortalOutlet extends BasePortalOutlet implements OnInit, OnDestroy {\n private _moduleRef = inject(NgModuleRef, {optional: true});\n private _document = inject(DOCUMENT);\n private _viewContainerRef = inject(ViewContainerRef);\n\n /** Whether the portal component is initialized. */\n private _isInitialized = false;\n\n /** Reference to the currently-attached component/view ref. */\n private _attachedRef: CdkPortalOutletAttachedRef;\n\n constructor(...args: unknown[]);\n\n constructor() {\n super();\n }\n\n /** Portal associated with the Portal outlet. */\n @Input('cdkPortalOutlet')\n get portal(): Portal<any> | null {\n return this._attachedPortal;\n }\n\n set portal(portal: Portal<any> | null | undefined | '') {\n // Ignore the cases where the `portal` is set to a falsy value before the lifecycle hooks have\n // run. This handles the cases where the user might do something like `<div cdkPortalOutlet>`\n // and attach a portal programmatically in the parent component. When Angular does the first CD\n // round, it will fire the setter with empty string, causing the user's content to be cleared.\n if (this.hasAttached() && !portal && !this._isInitialized) {\n return;\n }\n\n if (this.hasAttached()) {\n super.detach();\n }\n\n if (portal) {\n super.attach(portal);\n }\n\n this._attachedPortal = portal || null;\n }\n\n /** Emits when a portal is attached to the outlet. */\n @Output() readonly attached: EventEmitter<CdkPortalOutletAttachedRef> =\n new EventEmitter<CdkPortalOutletAttachedRef>();\n\n /** Component or view reference that is attached to the portal. */\n get attachedRef(): CdkPortalOutletAttachedRef {\n return this._attachedRef;\n }\n\n ngOnInit() {\n this._isInitialized = true;\n }\n\n ngOnDestroy() {\n super.dispose();\n this._attachedRef = this._attachedPortal = null;\n }\n\n /**\n * Attach the given ComponentPortal to this PortalOutlet.\n *\n * @param portal Portal to be attached to the portal outlet.\n * @returns Reference to the created component.\n */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n portal.setAttachedHost(this);\n\n // If the portal specifies an origin, use that as the logical location of the component\n // in the application tree. Otherwise use the location of this PortalOutlet.\n const viewContainerRef =\n portal.viewContainerRef != null ? portal.viewContainerRef : this._viewContainerRef;\n\n const ref = viewContainerRef.createComponent(portal.component, {\n index: viewContainerRef.length,\n injector: portal.injector || viewContainerRef.injector,\n projectableNodes: portal.projectableNodes || undefined,\n ngModuleRef: this._moduleRef || undefined,\n });\n\n // If we're using a view container that's different from the injected one (e.g. when the portal\n // specifies its own) we need to move the component into the outlet, otherwise it'll be rendered\n // inside of the alternate view container.\n if (viewContainerRef !== this._viewContainerRef) {\n this._getRootNode().appendChild((ref.hostView as EmbeddedViewRef<any>).rootNodes[0]);\n }\n\n super.setDisposeFn(() => ref.destroy());\n this._attachedPortal = portal;\n this._attachedRef = ref;\n this.attached.emit(ref);\n\n return ref;\n }\n\n /**\n * Attach the given TemplatePortal to this PortalHost as an embedded View.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n portal.setAttachedHost(this);\n const viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context, {\n injector: portal.injector,\n });\n super.setDisposeFn(() => this._viewContainerRef.clear());\n\n this._attachedPortal = portal;\n this._attachedRef = viewRef;\n this.attached.emit(viewRef);\n\n return viewRef;\n }\n\n /**\n * Attaches the given DomPortal to this PortalHost by moving all of the portal content into it.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n override attachDomPortal = (portal: DomPortal) => {\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode = this._document.createComment('dom-portal');\n\n portal.setAttachedHost(this);\n element.parentNode!.insertBefore(anchorNode, element);\n this._getRootNode().appendChild(element);\n this._attachedPortal = portal;\n\n super.setDisposeFn(() => {\n if (anchorNode.parentNode) {\n anchorNode.parentNode!.replaceChild(element, anchorNode);\n }\n });\n };\n\n /** Gets the root node of the portal outlet. */\n private _getRootNode(): HTMLElement {\n const nativeElement: Node = this._viewContainerRef.element.nativeElement;\n\n // The directive could be set on a template which will result in a comment\n // node being the root. Use the comment's parent node if that is the case.\n return (\n nativeElement.nodeType === nativeElement.ELEMENT_NODE\n ? nativeElement\n : nativeElement.parentNode!\n ) as HTMLElement;\n }\n}\n\n/**\n * @deprecated Use `CdkPortalOutlet` instead.\n * @breaking-change 9.0.0\n */\n@Directive({\n selector: '[cdkPortalHost], [portalHost]',\n exportAs: 'cdkPortalHost',\n inputs: [{name: 'portal', alias: 'cdkPortalHost'}],\n providers: [\n {\n provide: CdkPortalOutlet,\n useExisting: PortalHostDirective,\n },\n ],\n})\nexport class PortalHostDirective extends CdkPortalOutlet {}\n\n@NgModule({\n imports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],\n exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],\n})\nexport class PortalModule {}\n"],"names":[],"mappings":";;;AAQA;;;AAGG;SACa,oBAAoB,GAAA;AAClC,IAAA,MAAM,KAAK,CAAC,iCAAiC,CAAC;AAChD;AAEA;;;AAGG;SACa,+BAA+B,GAAA;AAC7C,IAAA,MAAM,KAAK,CAAC,oCAAoC,CAAC;AACnD;AAEA;;;AAGG;SACa,qCAAqC,GAAA;AACnD,IAAA,MAAM,KAAK,CAAC,6CAA6C,CAAC;AAC5D;AAEA;;;AAGG;SACa,2BAA2B,GAAA;IACzC,MAAM,KAAK,CACT,+EAA+E;AAC7E,QAAA,wCAAwC,CAC3C;AACH;AAEA;;;AAGG;SACa,0BAA0B,GAAA;AACxC,IAAA,MAAM,KAAK,CAAC,sDAAsD,CAAC;AACrE;AAEA;;;AAGG;SACa,0BAA0B,GAAA;AACxC,IAAA,MAAM,KAAK,CAAC,8DAA8D,CAAC;AAC7E;;AC3BA;;;AAGG;MACmB,MAAM,CAAA;AAClB,IAAA,aAAa;;AAGrB,IAAA,MAAM,CAAC,IAAkB,EAAA;AACvB,QAAA,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,SAAS,EAAE;AACjD,YAAA,IAAI,IAAI,IAAI,IAAI,EAAE;AAChB,gBAAA,0BAA0B,EAAE;;AAG9B,YAAA,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE;AACtB,gBAAA,+BAA+B,EAAE;;;AAIrC,QAAA,IAAI,CAAC,aAAa,GAAG,IAAI;AACzB,QAAA,OAAU,IAAI,CAAC,MAAM,CAAC,IA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B;AACzC,oBAAA,QAAQ,EAAE,eAAe;oBACzB,MAAM,EAAE,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,eAAe,EAAC,CAAC;AAClD,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,eAAe;AACxB,4BAAA,WAAW,EAAqB,mBAAA;AACjC,yBAAA;AACF,qBAAA;AACF,iBAAA;;MAOY,YAAY,CAAA;4GAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAZ,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,aAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,EA9NZ,OAAA,EAAA,CAAA,SAAS,EA2CT,eAAe,EAlBf,uBAAuB,EA+LvB,mBAAmB,CAAA,EAAA,OAAA,EAAA,CAxNnB,SAAS,EA2CT,eAAe,EAlBf,uBAAuB,EA+LvB,mBAAmB,CAAA,EAAA,CAAA;6GAMnB,YAAY,EAAA,CAAA;;gGAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,SAAS,EAAE,eAAe,EAAE,uBAAuB,EAAE,mBAAmB,CAAC;oBACnF,OAAO,EAAE,CAAC,SAAS,EAAE,eAAe,EAAE,uBAAuB,EAAE,mBAAmB,CAAC;AACpF,iBAAA;;;;;"}
|
package/fesm2022/private.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private.mjs","sources":["../../../../../
|
|
1
|
+
{"version":3,"file":"private.mjs","sources":["../../../../../k8-fastbuild-ST-c646aa77115d/bin/src/cdk/private/visually-hidden/visually-hidden.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';\n\n/**\n * Component used to load the .cdk-visually-hidden styles.\n * @docs-private\n */\n@Component({\n styleUrl: 'visually-hidden.css',\n exportAs: 'cdkVisuallyHidden',\n encapsulation: ViewEncapsulation.None,\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class _VisuallyHiddenLoader {}\n"],"names":[],"mappings":";;;;AAUA;;;AAGG;MAQU,qBAAqB,CAAA;4GAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAArB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,aAAA,EAAA,IAAA,EAAA,qBAAqB,yGAHtB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,oQAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;gGAGD,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAPjC,SAAS;+BAEE,mBAAmB,EAAA,aAAA,EACd,iBAAiB,CAAC,IAAI,YAC3B,EAAE,EAAA,eAAA,EACK,uBAAuB,CAAC,MAAM,EAAA,MAAA,EAAA,CAAA,oQAAA,CAAA,EAAA;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recycle-view-repeater-strategy.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/cdk/collections/array-data-source.ts","../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/cdk/collections/view-repeater.ts","../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/cdk/collections/recycle-view-repeater-strategy.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Observable, isObservable, of as observableOf} from 'rxjs';\nimport {DataSource} from './data-source';\n\n/** DataSource wrapper for a native array. */\nexport class ArrayDataSource<T> extends DataSource<T> {\n constructor(private _data: readonly T[] | Observable<readonly T[]>) {\n super();\n }\n\n connect(): Observable<readonly T[]> {\n return isObservable(this._data) ? this._data : observableOf(this._data);\n }\n\n disconnect() {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n InjectionToken,\n IterableChangeRecord,\n IterableChanges,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\n\n/**\n * The context for an embedded view in the repeater's view container.\n *\n * @template T The type for the embedded view's $implicit property.\n */\nexport interface _ViewRepeaterItemContext<T> {\n $implicit?: T;\n}\n\n/**\n * The arguments needed to construct an embedded view for an item in a view\n * container.\n *\n * @template C The type for the context passed to each embedded view.\n */\nexport interface _ViewRepeaterItemInsertArgs<C> {\n templateRef: TemplateRef<C>;\n context?: C;\n index?: number;\n}\n\n/**\n * A factory that derives the embedded view context for an item in a view\n * container.\n *\n * @template T The type for the embedded view's $implicit property.\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nexport type _ViewRepeaterItemContextFactory<T, R, C extends _ViewRepeaterItemContext<T>> = (\n record: IterableChangeRecord<R>,\n adjustedPreviousIndex: number | null,\n currentIndex: number | null,\n) => _ViewRepeaterItemInsertArgs<C>;\n\n/**\n * Extracts the value of an item from an `IterableChangeRecord`.\n *\n * @template T The type for the embedded view's $implicit property.\n * @template R The type for the item in each IterableDiffer change record.\n */\nexport type _ViewRepeaterItemValueResolver<T, R> = (record: IterableChangeRecord<R>) => T;\n\n/** Indicates how a view was changed by a `_ViewRepeater`. */\nexport enum _ViewRepeaterOperation {\n /** The content of an existing view was replaced with another item. */\n REPLACED,\n /** A new view was created with `createEmbeddedView`. */\n INSERTED,\n /** The position of a view changed, but the content remains the same. */\n MOVED,\n /** A view was detached from the view container. */\n REMOVED,\n}\n\n/**\n * Meta data describing the state of a view after it was updated by a `_ViewRepeater`.\n *\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nexport interface _ViewRepeaterItemChange<R, C> {\n /** The view's context after it was changed. */\n context?: C;\n /** Indicates how the view was changed. */\n operation: _ViewRepeaterOperation;\n /** The view's corresponding change record. */\n record: IterableChangeRecord<R>;\n}\n\n/**\n * Type for a callback to be executed after a view has changed.\n *\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nexport type _ViewRepeaterItemChanged<R, C> = (change: _ViewRepeaterItemChange<R, C>) => void;\n\n/**\n * Describes a strategy for rendering items in a `ViewContainerRef`.\n *\n * @template T The type for the embedded view's $implicit property.\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nexport interface _ViewRepeater<T, R, C extends _ViewRepeaterItemContext<T>> {\n applyChanges(\n changes: IterableChanges<R>,\n viewContainerRef: ViewContainerRef,\n itemContextFactory: _ViewRepeaterItemContextFactory<T, R, C>,\n itemValueResolver: _ViewRepeaterItemValueResolver<T, R>,\n itemViewChanged?: _ViewRepeaterItemChanged<R, C>,\n ): void;\n\n detach(): void;\n}\n\n/**\n * Injection token for `_ViewRepeater`. This token is for use by Angular Material only.\n * @docs-private\n */\nexport const _VIEW_REPEATER_STRATEGY = new InjectionToken<\n _ViewRepeater<unknown, unknown, _ViewRepeaterItemContext<unknown>>\n>('_ViewRepeater');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n EmbeddedViewRef,\n IterableChangeRecord,\n IterableChanges,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n _ViewRepeater,\n _ViewRepeaterItemChanged,\n _ViewRepeaterItemContext,\n _ViewRepeaterItemContextFactory,\n _ViewRepeaterItemInsertArgs,\n _ViewRepeaterItemValueResolver,\n _ViewRepeaterOperation,\n} from './view-repeater';\n\n/**\n * A repeater that caches views when they are removed from a\n * `ViewContainerRef`. When new items are inserted into the container,\n * the repeater will reuse one of the cached views instead of creating a new\n * embedded view. Recycling cached views reduces the quantity of expensive DOM\n * inserts.\n *\n * @template T The type for the embedded view's $implicit property.\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nexport class _RecycleViewRepeaterStrategy<T, R, C extends _ViewRepeaterItemContext<T>>\n implements _ViewRepeater<T, R, C>\n{\n /**\n * The size of the cache used to store unused views.\n * Setting the cache size to `0` will disable caching. Defaults to 20 views.\n */\n viewCacheSize: number = 20;\n\n /**\n * View cache that stores embedded view instances that have been previously stamped out,\n * but don't are not currently rendered. The view repeater will reuse these views rather than\n * creating brand new ones.\n *\n * TODO(michaeljamesparsons) Investigate whether using a linked list would improve performance.\n */\n private _viewCache: EmbeddedViewRef<C>[] = [];\n\n /** Apply changes to the DOM. */\n applyChanges(\n changes: IterableChanges<R>,\n viewContainerRef: ViewContainerRef,\n itemContextFactory: _ViewRepeaterItemContextFactory<T, R, C>,\n itemValueResolver: _ViewRepeaterItemValueResolver<T, R>,\n itemViewChanged?: _ViewRepeaterItemChanged<R, C>,\n ) {\n // Rearrange the views to put them in the right location.\n changes.forEachOperation(\n (\n record: IterableChangeRecord<R>,\n adjustedPreviousIndex: number | null,\n currentIndex: number | null,\n ) => {\n let view: EmbeddedViewRef<C> | undefined;\n let operation: _ViewRepeaterOperation;\n if (record.previousIndex == null) {\n // Item added.\n const viewArgsFactory = () =>\n itemContextFactory(record, adjustedPreviousIndex, currentIndex);\n view = this._insertView(\n viewArgsFactory,\n currentIndex!,\n viewContainerRef,\n itemValueResolver(record),\n );\n operation = view ? _ViewRepeaterOperation.INSERTED : _ViewRepeaterOperation.REPLACED;\n } else if (currentIndex == null) {\n // Item removed.\n this._detachAndCacheView(adjustedPreviousIndex!, viewContainerRef);\n operation = _ViewRepeaterOperation.REMOVED;\n } else {\n // Item moved.\n view = this._moveView(\n adjustedPreviousIndex!,\n currentIndex!,\n viewContainerRef,\n itemValueResolver(record),\n );\n operation = _ViewRepeaterOperation.MOVED;\n }\n\n if (itemViewChanged) {\n itemViewChanged({\n context: view?.context,\n operation,\n record,\n });\n }\n },\n );\n }\n\n detach() {\n for (const view of this._viewCache) {\n view.destroy();\n }\n this._viewCache = [];\n }\n\n /**\n * Inserts a view for a new item, either from the cache or by creating a new\n * one. Returns `undefined` if the item was inserted into a cached view.\n */\n private _insertView(\n viewArgsFactory: () => _ViewRepeaterItemInsertArgs<C>,\n currentIndex: number,\n viewContainerRef: ViewContainerRef,\n value: T,\n ): EmbeddedViewRef<C> | undefined {\n const cachedView = this._insertViewFromCache(currentIndex!, viewContainerRef);\n if (cachedView) {\n cachedView.context.$implicit = value;\n return undefined;\n }\n\n const viewArgs = viewArgsFactory();\n return viewContainerRef.createEmbeddedView(\n viewArgs.templateRef,\n viewArgs.context,\n viewArgs.index,\n );\n }\n\n /** Detaches the view at the given index and inserts into the view cache. */\n private _detachAndCacheView(index: number, viewContainerRef: ViewContainerRef) {\n const detachedView = viewContainerRef.detach(index) as EmbeddedViewRef<C>;\n this._maybeCacheView(detachedView, viewContainerRef);\n }\n\n /** Moves view at the previous index to the current index. */\n private _moveView(\n adjustedPreviousIndex: number,\n currentIndex: number,\n viewContainerRef: ViewContainerRef,\n value: T,\n ): EmbeddedViewRef<C> {\n const view = viewContainerRef.get(adjustedPreviousIndex!) as EmbeddedViewRef<C>;\n viewContainerRef.move(view, currentIndex);\n view.context.$implicit = value;\n return view;\n }\n\n /**\n * Cache the given detached view. If the cache is full, the view will be\n * destroyed.\n */\n private _maybeCacheView(view: EmbeddedViewRef<C>, viewContainerRef: ViewContainerRef) {\n if (this._viewCache.length < this.viewCacheSize) {\n this._viewCache.push(view);\n } else {\n const index = viewContainerRef.indexOf(view);\n\n // The host component could remove views from the container outside of\n // the view repeater. It's unlikely this will occur, but just in case,\n // destroy the view on its own, otherwise destroy it through the\n // container to ensure that all the references are removed.\n if (index === -1) {\n view.destroy();\n } else {\n viewContainerRef.remove(index);\n }\n }\n }\n\n /** Inserts a recycled view from the cache at the given index. */\n private _insertViewFromCache(\n index: number,\n viewContainerRef: ViewContainerRef,\n ): EmbeddedViewRef<C> | null {\n const cachedView = this._viewCache.pop();\n if (cachedView) {\n viewContainerRef.insert(cachedView, index);\n }\n return cachedView || null;\n }\n}\n"],"names":["observableOf"],"mappings":";;;;AAWA;AACM,MAAO,eAAmB,SAAQ,UAAa,CAAA;AAC/B,IAAA,KAAA;AAApB,IAAA,WAAA,CAAoB,KAA8C,EAAA;AAChE,QAAA,KAAK,EAAE;QADW,IAAK,CAAA,KAAA,GAAL,KAAK;;IAIzB,OAAO,GAAA;QACL,OAAO,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,GAAGA,EAAY,CAAC,IAAI,CAAC,KAAK,CAAC;;AAGzE,IAAA,UAAU;AACX;;ACqCD;IACY;AAAZ,CAAA,UAAY,sBAAsB,EAAA;;AAEhC,IAAA,sBAAA,CAAA,sBAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAQ;;AAER,IAAA,sBAAA,CAAA,sBAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAQ;;AAER,IAAA,sBAAA,CAAA,sBAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAK;;AAEL,IAAA,sBAAA,CAAA,sBAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAO;AACT,CAAC,EATW,sBAAsB,KAAtB,sBAAsB,GASjC,EAAA,CAAA,CAAA;AA4CD;;;AAGG;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,IAAI,CAAC,IAAI,CAAC;;aACrB;YACL,MAAM,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC;;;;;AAM5C,YAAA,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;gBAChB,IAAI,CAAC,OAAO,EAAE;;iBACT;AACL,gBAAA,gBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC;;;;;IAM5B,oBAAoB,CAC1B,KAAa,EACb,gBAAkC,EAAA;QAElC,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE;QACxC,IAAI,UAAU,EAAE;AACd,YAAA,gBAAgB,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC;;QAE5C,OAAO,UAAU,IAAI,IAAI;;AAE5B;;;;"}
|
|
1
|
+
{"version":3,"file":"recycle-view-repeater-strategy.mjs","sources":["../../../../../k8-fastbuild-ST-c646aa77115d/bin/src/cdk/collections/array-data-source.ts","../../../../../k8-fastbuild-ST-c646aa77115d/bin/src/cdk/collections/view-repeater.ts","../../../../../k8-fastbuild-ST-c646aa77115d/bin/src/cdk/collections/recycle-view-repeater-strategy.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Observable, isObservable, of as observableOf} from 'rxjs';\nimport {DataSource} from './data-source';\n\n/** DataSource wrapper for a native array. */\nexport class ArrayDataSource<T> extends DataSource<T> {\n constructor(private _data: readonly T[] | Observable<readonly T[]>) {\n super();\n }\n\n connect(): Observable<readonly T[]> {\n return isObservable(this._data) ? this._data : observableOf(this._data);\n }\n\n disconnect() {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n InjectionToken,\n IterableChangeRecord,\n IterableChanges,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\n\n/**\n * The context for an embedded view in the repeater's view container.\n *\n * @template T The type for the embedded view's $implicit property.\n */\nexport interface _ViewRepeaterItemContext<T> {\n $implicit?: T;\n}\n\n/**\n * The arguments needed to construct an embedded view for an item in a view\n * container.\n *\n * @template C The type for the context passed to each embedded view.\n */\nexport interface _ViewRepeaterItemInsertArgs<C> {\n templateRef: TemplateRef<C>;\n context?: C;\n index?: number;\n}\n\n/**\n * A factory that derives the embedded view context for an item in a view\n * container.\n *\n * @template T The type for the embedded view's $implicit property.\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nexport type _ViewRepeaterItemContextFactory<T, R, C extends _ViewRepeaterItemContext<T>> = (\n record: IterableChangeRecord<R>,\n adjustedPreviousIndex: number | null,\n currentIndex: number | null,\n) => _ViewRepeaterItemInsertArgs<C>;\n\n/**\n * Extracts the value of an item from an `IterableChangeRecord`.\n *\n * @template T The type for the embedded view's $implicit property.\n * @template R The type for the item in each IterableDiffer change record.\n */\nexport type _ViewRepeaterItemValueResolver<T, R> = (record: IterableChangeRecord<R>) => T;\n\n/** Indicates how a view was changed by a `_ViewRepeater`. */\nexport enum _ViewRepeaterOperation {\n /** The content of an existing view was replaced with another item. */\n REPLACED,\n /** A new view was created with `createEmbeddedView`. */\n INSERTED,\n /** The position of a view changed, but the content remains the same. */\n MOVED,\n /** A view was detached from the view container. */\n REMOVED,\n}\n\n/**\n * Meta data describing the state of a view after it was updated by a `_ViewRepeater`.\n *\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nexport interface _ViewRepeaterItemChange<R, C> {\n /** The view's context after it was changed. */\n context?: C;\n /** Indicates how the view was changed. */\n operation: _ViewRepeaterOperation;\n /** The view's corresponding change record. */\n record: IterableChangeRecord<R>;\n}\n\n/**\n * Type for a callback to be executed after a view has changed.\n *\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nexport type _ViewRepeaterItemChanged<R, C> = (change: _ViewRepeaterItemChange<R, C>) => void;\n\n/**\n * Describes a strategy for rendering items in a `ViewContainerRef`.\n *\n * @template T The type for the embedded view's $implicit property.\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nexport interface _ViewRepeater<T, R, C extends _ViewRepeaterItemContext<T>> {\n applyChanges(\n changes: IterableChanges<R>,\n viewContainerRef: ViewContainerRef,\n itemContextFactory: _ViewRepeaterItemContextFactory<T, R, C>,\n itemValueResolver: _ViewRepeaterItemValueResolver<T, R>,\n itemViewChanged?: _ViewRepeaterItemChanged<R, C>,\n ): void;\n\n detach(): void;\n}\n\n/**\n * Injection token for `_ViewRepeater`. This token is for use by Angular Material only.\n * @docs-private\n */\nexport const _VIEW_REPEATER_STRATEGY = new InjectionToken<\n _ViewRepeater<unknown, unknown, _ViewRepeaterItemContext<unknown>>\n>('_ViewRepeater');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n EmbeddedViewRef,\n IterableChangeRecord,\n IterableChanges,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n _ViewRepeater,\n _ViewRepeaterItemChanged,\n _ViewRepeaterItemContext,\n _ViewRepeaterItemContextFactory,\n _ViewRepeaterItemInsertArgs,\n _ViewRepeaterItemValueResolver,\n _ViewRepeaterOperation,\n} from './view-repeater';\n\n/**\n * A repeater that caches views when they are removed from a\n * `ViewContainerRef`. When new items are inserted into the container,\n * the repeater will reuse one of the cached views instead of creating a new\n * embedded view. Recycling cached views reduces the quantity of expensive DOM\n * inserts.\n *\n * @template T The type for the embedded view's $implicit property.\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nexport class _RecycleViewRepeaterStrategy<T, R, C extends _ViewRepeaterItemContext<T>>\n implements _ViewRepeater<T, R, C>\n{\n /**\n * The size of the cache used to store unused views.\n * Setting the cache size to `0` will disable caching. Defaults to 20 views.\n */\n viewCacheSize: number = 20;\n\n /**\n * View cache that stores embedded view instances that have been previously stamped out,\n * but don't are not currently rendered. The view repeater will reuse these views rather than\n * creating brand new ones.\n *\n * TODO(michaeljamesparsons) Investigate whether using a linked list would improve performance.\n */\n private _viewCache: EmbeddedViewRef<C>[] = [];\n\n /** Apply changes to the DOM. */\n applyChanges(\n changes: IterableChanges<R>,\n viewContainerRef: ViewContainerRef,\n itemContextFactory: _ViewRepeaterItemContextFactory<T, R, C>,\n itemValueResolver: _ViewRepeaterItemValueResolver<T, R>,\n itemViewChanged?: _ViewRepeaterItemChanged<R, C>,\n ) {\n // Rearrange the views to put them in the right location.\n changes.forEachOperation(\n (\n record: IterableChangeRecord<R>,\n adjustedPreviousIndex: number | null,\n currentIndex: number | null,\n ) => {\n let view: EmbeddedViewRef<C> | undefined;\n let operation: _ViewRepeaterOperation;\n if (record.previousIndex == null) {\n // Item added.\n const viewArgsFactory = () =>\n itemContextFactory(record, adjustedPreviousIndex, currentIndex);\n view = this._insertView(\n viewArgsFactory,\n currentIndex!,\n viewContainerRef,\n itemValueResolver(record),\n );\n operation = view ? _ViewRepeaterOperation.INSERTED : _ViewRepeaterOperation.REPLACED;\n } else if (currentIndex == null) {\n // Item removed.\n this._detachAndCacheView(adjustedPreviousIndex!, viewContainerRef);\n operation = _ViewRepeaterOperation.REMOVED;\n } else {\n // Item moved.\n view = this._moveView(\n adjustedPreviousIndex!,\n currentIndex!,\n viewContainerRef,\n itemValueResolver(record),\n );\n operation = _ViewRepeaterOperation.MOVED;\n }\n\n if (itemViewChanged) {\n itemViewChanged({\n context: view?.context,\n operation,\n record,\n });\n }\n },\n );\n }\n\n detach() {\n for (const view of this._viewCache) {\n view.destroy();\n }\n this._viewCache = [];\n }\n\n /**\n * Inserts a view for a new item, either from the cache or by creating a new\n * one. Returns `undefined` if the item was inserted into a cached view.\n */\n private _insertView(\n viewArgsFactory: () => _ViewRepeaterItemInsertArgs<C>,\n currentIndex: number,\n viewContainerRef: ViewContainerRef,\n value: T,\n ): EmbeddedViewRef<C> | undefined {\n const cachedView = this._insertViewFromCache(currentIndex!, viewContainerRef);\n if (cachedView) {\n cachedView.context.$implicit = value;\n return undefined;\n }\n\n const viewArgs = viewArgsFactory();\n return viewContainerRef.createEmbeddedView(\n viewArgs.templateRef,\n viewArgs.context,\n viewArgs.index,\n );\n }\n\n /** Detaches the view at the given index and inserts into the view cache. */\n private _detachAndCacheView(index: number, viewContainerRef: ViewContainerRef) {\n const detachedView = viewContainerRef.detach(index) as EmbeddedViewRef<C>;\n this._maybeCacheView(detachedView, viewContainerRef);\n }\n\n /** Moves view at the previous index to the current index. */\n private _moveView(\n adjustedPreviousIndex: number,\n currentIndex: number,\n viewContainerRef: ViewContainerRef,\n value: T,\n ): EmbeddedViewRef<C> {\n const view = viewContainerRef.get(adjustedPreviousIndex!) as EmbeddedViewRef<C>;\n viewContainerRef.move(view, currentIndex);\n view.context.$implicit = value;\n return view;\n }\n\n /**\n * Cache the given detached view. If the cache is full, the view will be\n * destroyed.\n */\n private _maybeCacheView(view: EmbeddedViewRef<C>, viewContainerRef: ViewContainerRef) {\n if (this._viewCache.length < this.viewCacheSize) {\n this._viewCache.push(view);\n } else {\n const index = viewContainerRef.indexOf(view);\n\n // The host component could remove views from the container outside of\n // the view repeater. It's unlikely this will occur, but just in case,\n // destroy the view on its own, otherwise destroy it through the\n // container to ensure that all the references are removed.\n if (index === -1) {\n view.destroy();\n } else {\n viewContainerRef.remove(index);\n }\n }\n }\n\n /** Inserts a recycled view from the cache at the given index. */\n private _insertViewFromCache(\n index: number,\n viewContainerRef: ViewContainerRef,\n ): EmbeddedViewRef<C> | null {\n const cachedView = this._viewCache.pop();\n if (cachedView) {\n viewContainerRef.insert(cachedView, index);\n }\n return cachedView || null;\n }\n}\n"],"names":["observableOf"],"mappings":";;;;AAWA;AACM,MAAO,eAAmB,SAAQ,UAAa,CAAA;AAC/B,IAAA,KAAA;AAApB,IAAA,WAAA,CAAoB,KAA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