@angular/platform-browser 16.0.0-next.1 → 16.0.0-next.3
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/animations/index.d.ts +1 -1
- package/esm2020/animations/src/animation_builder.mjs +3 -3
- package/esm2020/animations/src/animation_renderer.mjs +3 -3
- package/esm2020/animations/src/module.mjs +8 -8
- package/esm2020/animations/src/providers.mjs +3 -3
- package/esm2020/src/browser/meta.mjs +3 -3
- package/esm2020/src/browser/title.mjs +3 -3
- package/esm2020/src/browser/transfer_state_module.mjs +4 -4
- package/esm2020/src/browser/xhr.mjs +3 -3
- package/esm2020/src/browser.mjs +11 -19
- package/esm2020/src/dom/dom_renderer.mjs +3 -3
- package/esm2020/src/dom/events/dom_events.mjs +3 -3
- package/esm2020/src/dom/events/event_manager.mjs +7 -5
- package/esm2020/src/dom/events/hammer_gestures.mjs +10 -10
- package/esm2020/src/dom/events/key_events.mjs +3 -3
- package/esm2020/src/dom/shared_styles_host.mjs +57 -15
- package/esm2020/src/dom/util.mjs +1 -9
- package/esm2020/src/private_export.mjs +1 -2
- package/esm2020/src/security/dom_sanitization_service.mjs +6 -6
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/browser.mjs +8 -8
- package/fesm2015/animations.mjs +18 -18
- package/fesm2015/platform-browser.mjs +114 -111
- package/fesm2015/platform-browser.mjs.map +1 -1
- package/fesm2015/testing.mjs +8 -8
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/animations.mjs +18 -18
- package/fesm2020/platform-browser.mjs +113 -111
- package/fesm2020/platform-browser.mjs.map +1 -1
- package/fesm2020/testing.mjs +8 -8
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +13 -15
- package/package.json +4 -4
- package/testing/index.d.ts +1 -1
- package/esm2020/src/browser/server-transition.mjs +0 -36
- package/esm2020/src/dom/debug/ng_probe.mjs +0 -32
package/fesm2020/testing.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Angular v16.0.0-next.
|
2
|
+
* @license Angular v16.0.0-next.3
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -7,7 +7,7 @@
|
|
7
7
|
import { ɵgetDOM, PlatformLocation } from '@angular/common';
|
8
8
|
import { MockPlatformLocation } from '@angular/common/testing';
|
9
9
|
import * as i0 from '@angular/core';
|
10
|
-
import { NgZone, PLATFORM_INITIALIZER, createPlatformFactory, platformCore, APP_ID, NgModule } from '@angular/core';
|
10
|
+
import { NgZone, PLATFORM_INITIALIZER, createPlatformFactory, platformCore, APP_ID, ɵprovideNgZoneChangeDetection, NgModule } from '@angular/core';
|
11
11
|
import { ɵBrowserDomAdapter, BrowserModule } from '@angular/platform-browser';
|
12
12
|
|
13
13
|
class BrowserDetection {
|
@@ -195,20 +195,20 @@ const platformBrowserTesting = createPlatformFactory(platformCore, 'browserTesti
|
|
195
195
|
*/
|
196
196
|
class BrowserTestingModule {
|
197
197
|
}
|
198
|
-
BrowserTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
199
|
-
BrowserTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.
|
200
|
-
BrowserTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.
|
198
|
+
BrowserTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: BrowserTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
199
|
+
BrowserTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.3", ngImport: i0, type: BrowserTestingModule, exports: [BrowserModule] });
|
200
|
+
BrowserTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: BrowserTestingModule, providers: [
|
201
201
|
{ provide: APP_ID, useValue: 'a' },
|
202
|
-
|
202
|
+
ɵprovideNgZoneChangeDetection(createNgZone()),
|
203
203
|
{ provide: PlatformLocation, useClass: MockPlatformLocation },
|
204
204
|
], imports: [BrowserModule] });
|
205
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
205
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: BrowserTestingModule, decorators: [{
|
206
206
|
type: NgModule,
|
207
207
|
args: [{
|
208
208
|
exports: [BrowserModule],
|
209
209
|
providers: [
|
210
210
|
{ provide: APP_ID, useValue: 'a' },
|
211
|
-
|
211
|
+
ɵprovideNgZoneChangeDetection(createNgZone()),
|
212
212
|
{ provide: PlatformLocation, useClass: MockPlatformLocation },
|
213
213
|
]
|
214
214
|
}]
|
package/fesm2020/testing.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"testing.mjs","sources":["../../../../../../packages/platform-browser/testing/src/browser_util.ts","../../../../../../packages/platform-browser/testing/src/browser.ts","../../../../../../packages/platform-browser/testing/src/testing.ts","../../../../../../packages/platform-browser/testing/public_api.ts","../../../../../../packages/platform-browser/testing/index.ts","../../../../../../packages/platform-browser/testing/testing.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.io/license\n */\n\nimport {ɵgetDOM as getDOM} from '@angular/common';\nimport {NgZone, ɵglobal as global} from '@angular/core';\n\nexport class BrowserDetection {\n private _overrideUa: string|null;\n private get _ua(): string {\n if (typeof this._overrideUa === 'string') {\n return this._overrideUa;\n }\n\n return getDOM() ? getDOM().getUserAgent() : '';\n }\n\n static setup() {\n return new BrowserDetection(null);\n }\n\n constructor(ua: string|null) {\n this._overrideUa = ua;\n }\n\n get isFirefox(): boolean {\n return this._ua.indexOf('Firefox') > -1;\n }\n\n get isAndroid(): boolean {\n return this._ua.indexOf('Mozilla/5.0') > -1 && this._ua.indexOf('Android') > -1 &&\n this._ua.indexOf('AppleWebKit') > -1 && this._ua.indexOf('Chrome') == -1 &&\n this._ua.indexOf('IEMobile') == -1;\n }\n\n get isEdge(): boolean {\n return this._ua.indexOf('Edge') > -1;\n }\n\n get isWebkit(): boolean {\n return this._ua.indexOf('AppleWebKit') > -1 && this._ua.indexOf('Edge') == -1 &&\n this._ua.indexOf('IEMobile') == -1;\n }\n\n get isIOS7(): boolean {\n return (this._ua.indexOf('iPhone OS 7') > -1 || this._ua.indexOf('iPad OS 7') > -1) &&\n this._ua.indexOf('IEMobile') == -1;\n }\n\n get isSlow(): boolean {\n return this.isAndroid || this.isIOS7;\n }\n\n get isChromeDesktop(): boolean {\n return this._ua.indexOf('Chrome') > -1 && this._ua.indexOf('Mobile Safari') == -1 &&\n this._ua.indexOf('Edge') == -1;\n }\n\n // \"Old Chrome\" means Chrome 3X, where there are some discrepancies in the Intl API.\n // Android 4.4 and 5.X have such browsers by default (respectively 30 and 39).\n get isOldChrome(): boolean {\n return this._ua.indexOf('Chrome') > -1 && this._ua.indexOf('Chrome/3') > -1 &&\n this._ua.indexOf('Edge') == -1;\n }\n\n get supportsShadowDom() {\n const testEl = document.createElement('div');\n return (typeof testEl.attachShadow !== 'undefined');\n }\n}\n\nexport const browserDetection: BrowserDetection = BrowserDetection.setup();\n\nexport function dispatchEvent(element: any, eventType: any): Event {\n const evt: Event = getDOM().getDefaultDocument().createEvent('Event');\n evt.initEvent(eventType, true, true);\n getDOM().dispatchEvent(element, evt);\n return evt;\n}\n\nexport function createMouseEvent(eventType: string): MouseEvent {\n const evt: MouseEvent = getDOM().getDefaultDocument().createEvent('MouseEvent');\n evt.initEvent(eventType, true, true);\n return evt;\n}\n\nexport function el(html: string): HTMLElement {\n return <HTMLElement>getContent(createTemplate(html)).firstChild;\n}\n\nfunction getAttributeMap(element: any): Map<string, string> {\n const res = new Map<string, string>();\n const elAttrs = element.attributes;\n for (let i = 0; i < elAttrs.length; i++) {\n const attrib = elAttrs.item(i);\n res.set(attrib.name, attrib.value);\n }\n return res;\n}\n\nconst _selfClosingTags = ['br', 'hr', 'input'];\nexport function stringifyElement(el: any /** TODO #9100 */): string {\n let result = '';\n if (getDOM().isElementNode(el)) {\n const tagName = el.tagName.toLowerCase();\n\n // Opening tag\n result += `<${tagName}`;\n\n // Attributes in an ordered way\n const attributeMap = getAttributeMap(el);\n const sortedKeys = Array.from(attributeMap.keys()).sort();\n for (const key of sortedKeys) {\n const lowerCaseKey = key.toLowerCase();\n let attValue = attributeMap.get(key);\n\n if (typeof attValue !== 'string') {\n result += ` ${lowerCaseKey}`;\n } else {\n // Browsers order style rules differently. Order them alphabetically for consistency.\n if (lowerCaseKey === 'style') {\n attValue = attValue.split(/; ?/).filter(s => !!s).sort().map(s => `${s};`).join(' ');\n }\n\n result += ` ${lowerCaseKey}=\"${attValue}\"`;\n }\n }\n result += '>';\n\n // Children\n const childrenRoot = templateAwareRoot(el);\n const children = childrenRoot ? childrenRoot.childNodes : [];\n for (let j = 0; j < children.length; j++) {\n result += stringifyElement(children[j]);\n }\n\n // Closing tag\n if (_selfClosingTags.indexOf(tagName) == -1) {\n result += `</${tagName}>`;\n }\n } else if (isCommentNode(el)) {\n result += `<!--${el.nodeValue}-->`;\n } else {\n result += el.textContent;\n }\n\n return result;\n}\n\nexport function createNgZone(): NgZone {\n return new NgZone({enableLongStackTrace: true, shouldCoalesceEventChangeDetection: false});\n}\n\nexport function isCommentNode(node: Node): boolean {\n return node.nodeType === Node.COMMENT_NODE;\n}\n\nexport function isTextNode(node: Node): boolean {\n return node.nodeType === Node.TEXT_NODE;\n}\n\nexport function getContent(node: Node): Node {\n if ('content' in node) {\n return (<any>node).content;\n } else {\n return node;\n }\n}\n\nexport function templateAwareRoot(el: Node): any {\n return getDOM().isElementNode(el) && el.nodeName === 'TEMPLATE' ? getContent(el) : el;\n}\n\nexport function setCookie(name: string, value: string) {\n // document.cookie is magical, assigning into it assigns/overrides one cookie value, but does\n // not clear other cookies.\n document.cookie = encodeURIComponent(name) + '=' + encodeURIComponent(value);\n}\n\nexport function hasStyle(element: any, styleName: string, styleValue?: string|null): boolean {\n const value = element.style[styleName] || '';\n return styleValue ? value == styleValue : value.length > 0;\n}\n\nexport function hasClass(element: any, className: string): boolean {\n return element.classList.contains(className);\n}\n\nexport function sortedClassList(element: any): any[] {\n return Array.prototype.slice.call(element.classList, 0).sort();\n}\n\nexport function createTemplate(html: any): HTMLElement {\n const t = getDOM().getDefaultDocument().createElement('template');\n t.innerHTML = html;\n return t;\n}\n\nexport function childNodesAsList(el: Node): any[] {\n const childNodes = el.childNodes;\n const res = [];\n for (let i = 0; i < childNodes.length; i++) {\n res[i] = childNodes[i];\n }\n return res;\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.io/license\n */\nimport {PlatformLocation} from '@angular/common';\nimport {MockPlatformLocation} from '@angular/common/testing';\nimport {APP_ID, createPlatformFactory, NgModule, NgZone, PLATFORM_INITIALIZER, platformCore, StaticProvider} from '@angular/core';\nimport {BrowserModule, ɵBrowserDomAdapter as BrowserDomAdapter} from '@angular/platform-browser';\n\nimport {BrowserDetection, createNgZone} from './browser_util';\n\nfunction initBrowserTests() {\n BrowserDomAdapter.makeCurrent();\n BrowserDetection.setup();\n}\n\nconst _TEST_BROWSER_PLATFORM_PROVIDERS: StaticProvider[] =\n [{provide: PLATFORM_INITIALIZER, useValue: initBrowserTests, multi: true}];\n\n/**\n * Platform for testing\n *\n * @publicApi\n */\nexport const platformBrowserTesting =\n createPlatformFactory(platformCore, 'browserTesting', _TEST_BROWSER_PLATFORM_PROVIDERS);\n\n/**\n * NgModule for testing.\n *\n * @publicApi\n */\n@NgModule({\n exports: [BrowserModule],\n providers: [\n {provide: APP_ID, useValue: 'a'},\n {provide: NgZone, useFactory: createNgZone},\n {provide: PlatformLocation, useClass: MockPlatformLocation},\n ]\n})\nexport class BrowserTestingModule {\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.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the platform-browser/testing package.\n */\nexport * from './browser';\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.io/license\n */\n\n/// <reference types=\"jasmine\" />\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/testing';\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.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["getDOM","BrowserDomAdapter"],"mappings":";;;;;;;;;;;;MAWa,gBAAgB,CAAA;AAE3B,IAAA,IAAY,GAAG,GAAA;AACb,QAAA,IAAI,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,EAAE;YACxC,OAAO,IAAI,CAAC,WAAW,CAAC;AACzB,SAAA;AAED,QAAA,OAAOA,OAAM,EAAE,GAAGA,OAAM,EAAE,CAAC,YAAY,EAAE,GAAG,EAAE,CAAC;KAChD;AAED,IAAA,OAAO,KAAK,GAAA;AACV,QAAA,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC;KACnC;AAED,IAAA,WAAA,CAAY,EAAe,EAAA;AACzB,QAAA,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;KACvB;AAED,IAAA,IAAI,SAAS,GAAA;QACX,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,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AE,gBAAgB,EAAE,QAAQ,EAAE,oBAAoB,EAAC;AAC5D,qBAAA;AACF,iBAAA,CAAA;;;AClCD;;;;AAIG;;ACJH;;ACAA;;ACRA;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"testing.mjs","sources":["../../../../../../packages/platform-browser/testing/src/browser_util.ts","../../../../../../packages/platform-browser/testing/src/browser.ts","../../../../../../packages/platform-browser/testing/src/testing.ts","../../../../../../packages/platform-browser/testing/public_api.ts","../../../../../../packages/platform-browser/testing/index.ts","../../../../../../packages/platform-browser/testing/testing.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.io/license\n */\n\nimport {ɵgetDOM as getDOM} from '@angular/common';\nimport {NgZone, ɵglobal as global} from '@angular/core';\n\nexport class BrowserDetection {\n private _overrideUa: string|null;\n private get _ua(): string {\n if (typeof this._overrideUa === 'string') {\n return this._overrideUa;\n }\n\n return getDOM() ? getDOM().getUserAgent() : '';\n }\n\n static setup() {\n return new BrowserDetection(null);\n }\n\n constructor(ua: string|null) {\n this._overrideUa = ua;\n }\n\n get isFirefox(): boolean {\n return this._ua.indexOf('Firefox') > -1;\n }\n\n get isAndroid(): boolean {\n return this._ua.indexOf('Mozilla/5.0') > -1 && this._ua.indexOf('Android') > -1 &&\n this._ua.indexOf('AppleWebKit') > -1 && this._ua.indexOf('Chrome') == -1 &&\n this._ua.indexOf('IEMobile') == -1;\n }\n\n get isEdge(): boolean {\n return this._ua.indexOf('Edge') > -1;\n }\n\n get isWebkit(): boolean {\n return this._ua.indexOf('AppleWebKit') > -1 && this._ua.indexOf('Edge') == -1 &&\n this._ua.indexOf('IEMobile') == -1;\n }\n\n get isIOS7(): boolean {\n return (this._ua.indexOf('iPhone OS 7') > -1 || this._ua.indexOf('iPad OS 7') > -1) &&\n this._ua.indexOf('IEMobile') == -1;\n }\n\n get isSlow(): boolean {\n return this.isAndroid || this.isIOS7;\n }\n\n get isChromeDesktop(): boolean {\n return this._ua.indexOf('Chrome') > -1 && this._ua.indexOf('Mobile Safari') == -1 &&\n this._ua.indexOf('Edge') == -1;\n }\n\n // \"Old Chrome\" means Chrome 3X, where there are some discrepancies in the Intl API.\n // Android 4.4 and 5.X have such browsers by default (respectively 30 and 39).\n get isOldChrome(): boolean {\n return this._ua.indexOf('Chrome') > -1 && this._ua.indexOf('Chrome/3') > -1 &&\n this._ua.indexOf('Edge') == -1;\n }\n\n get supportsShadowDom() {\n const testEl = document.createElement('div');\n return (typeof testEl.attachShadow !== 'undefined');\n }\n}\n\nexport const browserDetection: BrowserDetection = BrowserDetection.setup();\n\nexport function dispatchEvent(element: any, eventType: any): Event {\n const evt: Event = getDOM().getDefaultDocument().createEvent('Event');\n evt.initEvent(eventType, true, true);\n getDOM().dispatchEvent(element, evt);\n return evt;\n}\n\nexport function createMouseEvent(eventType: string): MouseEvent {\n const evt: MouseEvent = getDOM().getDefaultDocument().createEvent('MouseEvent');\n evt.initEvent(eventType, true, true);\n return evt;\n}\n\nexport function el(html: string): HTMLElement {\n return <HTMLElement>getContent(createTemplate(html)).firstChild;\n}\n\nfunction getAttributeMap(element: any): Map<string, string> {\n const res = new Map<string, string>();\n const elAttrs = element.attributes;\n for (let i = 0; i < elAttrs.length; i++) {\n const attrib = elAttrs.item(i);\n res.set(attrib.name, attrib.value);\n }\n return res;\n}\n\nconst _selfClosingTags = ['br', 'hr', 'input'];\nexport function stringifyElement(el: any /** TODO #9100 */): string {\n let result = '';\n if (getDOM().isElementNode(el)) {\n const tagName = el.tagName.toLowerCase();\n\n // Opening tag\n result += `<${tagName}`;\n\n // Attributes in an ordered way\n const attributeMap = getAttributeMap(el);\n const sortedKeys = Array.from(attributeMap.keys()).sort();\n for (const key of sortedKeys) {\n const lowerCaseKey = key.toLowerCase();\n let attValue = attributeMap.get(key);\n\n if (typeof attValue !== 'string') {\n result += ` ${lowerCaseKey}`;\n } else {\n // Browsers order style rules differently. Order them alphabetically for consistency.\n if (lowerCaseKey === 'style') {\n attValue = attValue.split(/; ?/).filter(s => !!s).sort().map(s => `${s};`).join(' ');\n }\n\n result += ` ${lowerCaseKey}=\"${attValue}\"`;\n }\n }\n result += '>';\n\n // Children\n const childrenRoot = templateAwareRoot(el);\n const children = childrenRoot ? childrenRoot.childNodes : [];\n for (let j = 0; j < children.length; j++) {\n result += stringifyElement(children[j]);\n }\n\n // Closing tag\n if (_selfClosingTags.indexOf(tagName) == -1) {\n result += `</${tagName}>`;\n }\n } else if (isCommentNode(el)) {\n result += `<!--${el.nodeValue}-->`;\n } else {\n result += el.textContent;\n }\n\n return result;\n}\n\nexport function createNgZone(): NgZone {\n return new NgZone({enableLongStackTrace: true, shouldCoalesceEventChangeDetection: false});\n}\n\nexport function isCommentNode(node: Node): boolean {\n return node.nodeType === Node.COMMENT_NODE;\n}\n\nexport function isTextNode(node: Node): boolean {\n return node.nodeType === Node.TEXT_NODE;\n}\n\nexport function getContent(node: Node): Node {\n if ('content' in node) {\n return (<any>node).content;\n } else {\n return node;\n }\n}\n\nexport function templateAwareRoot(el: Node): any {\n return getDOM().isElementNode(el) && el.nodeName === 'TEMPLATE' ? getContent(el) : el;\n}\n\nexport function setCookie(name: string, value: string) {\n // document.cookie is magical, assigning into it assigns/overrides one cookie value, but does\n // not clear other cookies.\n document.cookie = encodeURIComponent(name) + '=' + encodeURIComponent(value);\n}\n\nexport function hasStyle(element: any, styleName: string, styleValue?: string|null): boolean {\n const value = element.style[styleName] || '';\n return styleValue ? value == styleValue : value.length > 0;\n}\n\nexport function hasClass(element: any, className: string): boolean {\n return element.classList.contains(className);\n}\n\nexport function sortedClassList(element: any): any[] {\n return Array.prototype.slice.call(element.classList, 0).sort();\n}\n\nexport function createTemplate(html: any): HTMLElement {\n const t = getDOM().getDefaultDocument().createElement('template');\n t.innerHTML = html;\n return t;\n}\n\nexport function childNodesAsList(el: Node): any[] {\n const childNodes = el.childNodes;\n const res = [];\n for (let i = 0; i < childNodes.length; i++) {\n res[i] = childNodes[i];\n }\n return res;\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.io/license\n */\nimport {PlatformLocation} from '@angular/common';\nimport {MockPlatformLocation} from '@angular/common/testing';\nimport {APP_ID, createPlatformFactory, NgModule, PLATFORM_INITIALIZER, platformCore, StaticProvider, ɵprovideNgZoneChangeDetection as provideNgZoneChangeDetection} from '@angular/core';\nimport {BrowserModule, ɵBrowserDomAdapter as BrowserDomAdapter} from '@angular/platform-browser';\n\nimport {BrowserDetection, createNgZone} from './browser_util';\n\nfunction initBrowserTests() {\n BrowserDomAdapter.makeCurrent();\n BrowserDetection.setup();\n}\n\nconst _TEST_BROWSER_PLATFORM_PROVIDERS: StaticProvider[] =\n [{provide: PLATFORM_INITIALIZER, useValue: initBrowserTests, multi: true}];\n\n/**\n * Platform for testing\n *\n * @publicApi\n */\nexport const platformBrowserTesting =\n createPlatformFactory(platformCore, 'browserTesting', _TEST_BROWSER_PLATFORM_PROVIDERS);\n\n/**\n * NgModule for testing.\n *\n * @publicApi\n */\n@NgModule({\n exports: [BrowserModule],\n providers: [\n {provide: APP_ID, useValue: 'a'},\n provideNgZoneChangeDetection(createNgZone()),\n {provide: PlatformLocation, useClass: MockPlatformLocation},\n ]\n})\nexport class BrowserTestingModule {\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.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the platform-browser/testing package.\n */\nexport * from './browser';\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.io/license\n */\n\n/// <reference types=\"jasmine\" />\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/testing';\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.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["getDOM","BrowserDomAdapter","provideNgZoneChangeDetection"],"mappings":";;;;;;;;;;;;MAWa,gBAAgB,CAAA;AAE3B,IAAA,IAAY,GAAG,GAAA;AACb,QAAA,IAAI,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,EAAE;YACxC,OAAO,IAAI,CAAC,WAAW,CAAC;AACzB,SAAA;AAED,QAAA,OAAOA,OAAM,EAAE,GAAGA,OAAM,EAAE,CAAC,YAAY,EAAE,GAAG,EAAE,CAAC;KAChD;AAED,IAAA,OAAO,KAAK,GAAA;AACV,QAAA,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC;KACnC;AAED,IAAA,WAAA,CAAY,EAAe,EAAA;AACzB,QAAA,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;KACvB;AAED,IAAA,IAAI,SAAS,GAAA;QACX,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;KACzC;AAED,IAAA,IAAI,SAAS,GAAA;QACX,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YAC3E,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACxE,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;KACxC;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PrB,aAAa,CAAA,EAAA,CAAA,CAAA;AAOZ,oBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,EANpB,SAAA,EAAA;AACT,QAAA,EAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAC;QAChCC,6BAA4B,CAAC,YAAY,EAAE,CAAC;AAC5C,QAAA,EAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,oBAAoB,EAAC;AAC5D,KAAA,EAAA,OAAA,EAAA,CALS,aAAa,CAAA,EAAA,CAAA,CAAA;sGAOZ,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBARhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,aAAa,CAAC;AACxB,oBAAA,SAAS,EAAE;AACT,wBAAA,EAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAC;wBAChCA,6BAA4B,CAAC,YAAY,EAAE,CAAC;AAC5C,wBAAA,EAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,oBAAoB,EAAC;AAC5D,qBAAA;AACF,iBAAA,CAAA;;;AClCD;;;;AAIG;;ACJH;;ACAA;;ACRA;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
/**
|
2
|
-
* @license Angular v16.0.0-next.
|
2
|
+
* @license Angular v16.0.0-next.3
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
4
4
|
* License: MIT
|
5
5
|
*/
|
6
6
|
|
7
7
|
|
8
|
+
import { ApplicationConfig as ApplicationConfig_2 } from '@angular/core';
|
8
9
|
import { ApplicationRef } from '@angular/core';
|
9
10
|
import { ComponentRef } from '@angular/core';
|
10
11
|
import { DebugElement } from '@angular/core';
|
11
12
|
import { DebugNode } from '@angular/core';
|
12
|
-
import { EnvironmentProviders } from '@angular/core';
|
13
13
|
import { GetTestability } from '@angular/core';
|
14
14
|
import * as i0 from '@angular/core';
|
15
15
|
import * as i1 from '@angular/common';
|
@@ -41,13 +41,11 @@ import { ɵgetDOM } from '@angular/common';
|
|
41
41
|
* Set of config options available during the application bootstrap operation.
|
42
42
|
*
|
43
43
|
* @publicApi
|
44
|
+
*
|
45
|
+
* @deprecated
|
46
|
+
* `ApplicationConfig` has moved, please import `ApplicationConfig` from `@angular/core` instead.
|
44
47
|
*/
|
45
|
-
export declare
|
46
|
-
/**
|
47
|
-
* List of providers that should be available to the root component and all its children.
|
48
|
-
*/
|
49
|
-
providers: Array<Provider | EnvironmentProviders>;
|
50
|
-
}
|
48
|
+
export declare type ApplicationConfig = ApplicationConfig_2;
|
51
49
|
|
52
50
|
/**
|
53
51
|
* Bootstraps an instance of an Angular application and renders a standalone component as the
|
@@ -128,6 +126,8 @@ export declare class BrowserModule {
|
|
128
126
|
* @param params An object containing an identifier for the app to transition.
|
129
127
|
* The ID must match between the client and server versions of the app.
|
130
128
|
* @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`.
|
129
|
+
*
|
130
|
+
* @deprecated Use {@link APP_ID} instead to set the application ID.
|
131
131
|
*/
|
132
132
|
static withServerTransition(params: {
|
133
133
|
appId: string;
|
@@ -779,14 +779,18 @@ export declare class ɵDomSanitizerImpl extends DomSanitizer {
|
|
779
779
|
|
780
780
|
export declare class ɵDomSharedStylesHost extends ɵSharedStylesHost implements OnDestroy {
|
781
781
|
private readonly doc;
|
782
|
+
private appId;
|
782
783
|
private readonly styleRef;
|
783
784
|
private hostNodes;
|
784
|
-
|
785
|
+
private styleNodesInDOM;
|
786
|
+
constructor(doc: Document, appId: string);
|
785
787
|
onStyleAdded(style: string): void;
|
786
788
|
onStyleRemoved(style: string): void;
|
787
789
|
ngOnDestroy(): void;
|
788
790
|
addHost(hostNode: Node): void;
|
789
791
|
removeHost(hostNode: Node): void;
|
792
|
+
private collectServerRenderedStyles;
|
793
|
+
private getStyleElement;
|
790
794
|
private addStyleToHost;
|
791
795
|
private resetHostNodes;
|
792
796
|
static ɵfac: i0.ɵɵFactoryDeclaration<ɵDomSharedStylesHost, never>;
|
@@ -901,10 +905,4 @@ export declare function ɵshimHostAttribute(componentShortId: string): string;
|
|
901
905
|
|
902
906
|
export declare function ɵshimStyles(compId: string, styles: string[]): string[];
|
903
907
|
|
904
|
-
/**
|
905
|
-
* An id that identifies a particular application being bootstrapped, that should
|
906
|
-
* match across the client/server boundary.
|
907
|
-
*/
|
908
|
-
export declare const ɵTRANSITION_ID: InjectionToken<unknown>;
|
909
|
-
|
910
908
|
export { }
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@angular/platform-browser",
|
3
|
-
"version": "16.0.0-next.
|
3
|
+
"version": "16.0.0-next.3",
|
4
4
|
"description": "Angular - library for using Angular in a web browser",
|
5
5
|
"author": "angular",
|
6
6
|
"license": "MIT",
|
@@ -11,9 +11,9 @@
|
|
11
11
|
"tslib": "^2.3.0"
|
12
12
|
},
|
13
13
|
"peerDependencies": {
|
14
|
-
"@angular/animations": "16.0.0-next.
|
15
|
-
"@angular/core": "16.0.0-next.
|
16
|
-
"@angular/common": "16.0.0-next.
|
14
|
+
"@angular/animations": "16.0.0-next.3",
|
15
|
+
"@angular/core": "16.0.0-next.3",
|
16
|
+
"@angular/common": "16.0.0-next.3"
|
17
17
|
},
|
18
18
|
"peerDependenciesMeta": {
|
19
19
|
"@angular/animations": {
|
package/testing/index.d.ts
CHANGED
@@ -1,36 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @license
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
4
|
-
*
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
7
|
-
*/
|
8
|
-
import { DOCUMENT, ɵgetDOM as getDOM } from '@angular/common';
|
9
|
-
import { APP_INITIALIZER, ApplicationInitStatus, InjectionToken, Injector } from '@angular/core';
|
10
|
-
/**
|
11
|
-
* An id that identifies a particular application being bootstrapped, that should
|
12
|
-
* match across the client/server boundary.
|
13
|
-
*/
|
14
|
-
export const TRANSITION_ID = new InjectionToken('TRANSITION_ID');
|
15
|
-
export function appInitializerFactory(transitionId, document, injector) {
|
16
|
-
return () => {
|
17
|
-
// Wait for all application initializers to be completed before removing the styles set by
|
18
|
-
// the server.
|
19
|
-
injector.get(ApplicationInitStatus).donePromise.then(() => {
|
20
|
-
const dom = getDOM();
|
21
|
-
const styles = document.querySelectorAll(`style[ng-transition="${transitionId}"]`);
|
22
|
-
for (let i = 0; i < styles.length; i++) {
|
23
|
-
dom.remove(styles[i]);
|
24
|
-
}
|
25
|
-
});
|
26
|
-
};
|
27
|
-
}
|
28
|
-
export const SERVER_TRANSITION_PROVIDERS = [
|
29
|
-
{
|
30
|
-
provide: APP_INITIALIZER,
|
31
|
-
useFactory: appInitializerFactory,
|
32
|
-
deps: [TRANSITION_ID, DOCUMENT, Injector],
|
33
|
-
multi: true
|
34
|
-
},
|
35
|
-
];
|
36
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmVyLXRyYW5zaXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9wbGF0Zm9ybS1icm93c2VyL3NyYy9icm93c2VyL3NlcnZlci10cmFuc2l0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRztBQUVILE9BQU8sRUFBQyxRQUFRLEVBQUUsT0FBTyxJQUFJLE1BQU0sRUFBQyxNQUFNLGlCQUFpQixDQUFDO0FBQzVELE9BQU8sRUFBQyxlQUFlLEVBQUUscUJBQXFCLEVBQUUsY0FBYyxFQUFFLFFBQVEsRUFBaUIsTUFBTSxlQUFlL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F0aW9uSW5pdFN0YXR1cykuZG9uZVByb21pc2UudGhlbigoKSA9PiB7XG4gICAgICBjb25zdCBkb20gPSBnZXRET00oKTtcbiAgICAgIGNvbnN0IHN0eWxlczogSFRNTENvbGxlY3Rpb25PZjxIVE1MU3R5bGVFbGVtZW50PiA9XG4gICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbChgc3R5bGVbbmctdHJhbnNpdGlvbj1cIiR7dHJhbnNpdGlvbklkfVwiXWApO1xuICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBzdHlsZXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgZG9tLnJlbW92ZShzdHlsZXNbaV0pO1xuICAgICAgfVxuICAgIH0pO1xuICB9O1xufVxuXG5leHBvcnQgY29uc3QgU0VSVkVSX1RSQU5TSVRJT05fUFJPVklERVJTOiBTdGF0aWNQcm92aWRlcltdID0gW1xuICB7XG4gICAgcHJvdmlkZTogQVBQX0lOSVRJQUxJWkVSLFxuICAgIHVzZUZhY3Rvcnk6IGFwcEluaXRpYWxpemVyRmFjdG9yeSxcbiAgICBkZXBzOiBbVFJBTlNJVElPTl9JRCwgRE9DVU1FTlQsIEluamVjdG9yXSxcbiAgICBtdWx0aTogdHJ1ZVxuICB9LFxuXTtcbiJdfQ==
|
@@ -1,32 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @license
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
4
|
-
*
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
7
|
-
*/
|
8
|
-
import { ApplicationRef, NgZone, ɵgetDebugNodeR2 } from '@angular/core';
|
9
|
-
import { exportNgVar } from '../util';
|
10
|
-
const CORE_TOKENS = (() => ({
|
11
|
-
'ApplicationRef': ApplicationRef,
|
12
|
-
'NgZone': NgZone,
|
13
|
-
}))();
|
14
|
-
const INSPECT_GLOBAL_NAME = 'probe';
|
15
|
-
const CORE_TOKENS_GLOBAL_NAME = 'coreTokens';
|
16
|
-
/**
|
17
|
-
* Returns a {@link DebugElement} for the given native DOM element, or
|
18
|
-
* null if the given native element does not have an Angular view associated
|
19
|
-
* with it.
|
20
|
-
*/
|
21
|
-
export function inspectNativeElementR2(element) {
|
22
|
-
return ɵgetDebugNodeR2(element);
|
23
|
-
}
|
24
|
-
export function _createNgProbeR2(coreTokens) {
|
25
|
-
exportNgVar(INSPECT_GLOBAL_NAME, inspectNativeElementR2);
|
26
|
-
exportNgVar(CORE_TOKENS_GLOBAL_NAME, { ...CORE_TOKENS, ..._ngProbeTokensToMap(coreTokens || []) });
|
27
|
-
return () => inspectNativeElementR2;
|
28
|
-
}
|
29
|
-
function _ngProbeTokensToMap(tokens) {
|
30
|
-
return tokens.reduce((prev, t) => (prev[t.name] = t.token, prev), {});
|
31
|
-
}
|
32
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmdfcHJvYmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9wbGF0Zm9ybS1icm93c2VyL3NyYy9kb20vZGVidWcvbmdfcHJvYmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUgsT0FBTyxFQUFDLGNBQWMsRUFBMkIsTUFBTSxFQUFFLGVBQWUsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUUvRixPQUFPLEVBQUMsV0FBVyxFQUFDLE1BQU0sU0FBUyxDQUFDO0FBRXBDLE1BQU0sV0FBVyxHQUFHLENBQUMsR0FBRyxFQUFFLENBQUMsQ0FBQztJQUNMLGdCQUFnQixFQUFFLGNBQWM7SUFDaEMsUUFBUSxFQUFFLE1BQU07Q0FDakIsQ0FBQyxDQUFDLEVBQUUsQ0FBQztBQUUzQixNQUFNLG1CQUFtQixHQUFHLE9BQU8sQ0FBQztBQUNwQyxNQU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