diff --git a/packages/core/src/render3/i18n.ts b/packages/core/src/render3/i18n.ts index 868d8ede3a..0b82ab5a1b 100644 --- a/packages/core/src/render3/i18n.ts +++ b/packages/core/src/render3/i18n.ts @@ -6,29 +6,31 @@ * found in the LICENSE file at https://angular.io/license */ +import { getPluralCase } from '../i18n/localization'; +import { getTemplateContent, SRCSET_ATTRS, URI_ATTRS, VALID_ATTRS, VALID_ELEMENTS } from '../sanitization/html_sanitizer'; +import { InertBodyHelper } from '../sanitization/inert_body'; +import { sanitizeSrcset, _sanitizeUrl } from '../sanitization/url_sanitizer'; +import { addAllToArray } from '../util/array_utils'; +import { assertDataInRange, assertDefined, assertEqual, assertGreaterThan } from '../util/assert'; import '../util/ng_i18n_closure_mode'; -import {getPluralCase} from '../i18n/localization'; -import {SRCSET_ATTRS, URI_ATTRS, VALID_ATTRS, VALID_ELEMENTS, getTemplateContent} from '../sanitization/html_sanitizer'; -import {InertBodyHelper} from '../sanitization/inert_body'; -import {_sanitizeUrl, sanitizeSrcset} from '../sanitization/url_sanitizer'; -import {addAllToArray} from '../util/array_utils'; -import {assertDataInRange, assertDefined, assertEqual, assertGreaterThan} from '../util/assert'; -import {attachPatchData} from './context_discovery'; -import {attachI18nOpCodesDebug} from './debug'; -import {elementAttributeInternal, ɵɵload, ɵɵtextBinding} from './instructions/all'; -import {allocExpando, elementPropertyInternal, getOrCreateTNode, setInputsForProperty} from './instructions/shared'; -import {LContainer, NATIVE} from './interfaces/container'; -import {COMMENT_MARKER, ELEMENT_MARKER, I18nMutateOpCode, I18nMutateOpCodes, I18nUpdateOpCode, I18nUpdateOpCodes, IcuType, TI18n, TIcu} from './interfaces/i18n'; -import {TElementNode, TIcuContainerNode, TNode, TNodeType} from './interfaces/node'; -import {RComment, RElement, RText} from './interfaces/renderer'; -import {SanitizerFn} from './interfaces/sanitization'; -import {StylingContext} from './interfaces/styling'; -import {BINDING_INDEX, HEADER_OFFSET, LView, RENDERER, TVIEW, TView, T_HOST} from './interfaces/view'; -import {appendChild, createTextNode, nativeRemoveNode} from './node_manipulation'; -import {getIsParent, getLView, getPreviousOrParentTNode, setIsNotParent, setPreviousOrParentTNode} from './state'; -import {NO_CHANGE} from './tokens'; -import {renderStringify} from './util/misc_utils'; -import {getNativeByIndex, getNativeByTNode, getTNode, isLContainer} from './util/view_utils'; +import { attachPatchData } from './context_discovery'; +import { attachI18nOpCodesDebug } from './debug'; +import { elementAttributeInternal, ɵɵload, ɵɵtextBinding } from './instructions/all'; +import { allocExpando, elementPropertyInternal, getOrCreateTNode, setInputsForProperty } from './instructions/shared'; +import { LContainer, NATIVE } from './interfaces/container'; +import { COMMENT_MARKER, ELEMENT_MARKER, I18nMutateOpCode, I18nMutateOpCodes, I18nUpdateOpCode, I18nUpdateOpCodes, IcuType, TI18n, TIcu } from './interfaces/i18n'; +import { TElementNode, TIcuContainerNode, TNode, TNodeType } from './interfaces/node'; +import { RComment, RElement, RText } from './interfaces/renderer'; +import { SanitizerFn } from './interfaces/sanitization'; +import { StylingContext } from './interfaces/styling'; +import { BINDING_INDEX, HEADER_OFFSET, LView, RENDERER, TVIEW, TView, T_HOST } from './interfaces/view'; +import { appendChild, createTextNode, nativeRemoveNode } from './node_manipulation'; +import { getIsParent, getLView, getPreviousOrParentTNode, setIsNotParent, setPreviousOrParentTNode } from './state'; +import { NO_CHANGE } from './tokens'; +import { renderStringify } from './util/misc_utils'; +import { getNativeByIndex, getNativeByTNode, getTNode, isLContainer } from './util/view_utils'; + + const MARKER = `�`; diff --git a/packages/core/src/render3/debug.ts b/packages/core/src/render3/instructions/lview_debug.ts similarity index 95% rename from packages/core/src/render3/debug.ts rename to packages/core/src/render3/instructions/lview_debug.ts index 0d186a5568..dcf9badded 100644 --- a/packages/core/src/render3/debug.ts +++ b/packages/core/src/render3/instructions/lview_debug.ts @@ -6,19 +6,19 @@ * found in the LICENSE file at https://angular.io/license */ -import {assertDefined} from '../util/assert'; +import {assertDefined} from '../../util/assert'; -import {ACTIVE_INDEX, CONTAINER_HEADER_OFFSET, LContainer, NATIVE} from './interfaces/container'; -import {COMMENT_MARKER, ELEMENT_MARKER, I18nMutateOpCode, I18nMutateOpCodes, I18nUpdateOpCode, I18nUpdateOpCodes, TIcu} from './interfaces/i18n'; -import {TNode} from './interfaces/node'; -import {LQueries} from './interfaces/query'; -import {RComment, RElement} from './interfaces/renderer'; -import {StylingContext} from './interfaces/styling'; -import {BINDING_INDEX, CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTENT_QUERIES, CONTEXT, DECLARATION_VIEW, FLAGS, HEADER_OFFSET, HOST, INJECTOR, LView, LViewFlags, NEXT, PARENT, QUERIES, RENDERER, RENDERER_FACTORY, SANITIZER, TVIEW, T_HOST} from './interfaces/view'; -import {runtimeIsNewStylingInUse} from './styling_next/state'; -import {DebugStyling as DebugNewStyling, NodeStylingDebug} from './styling_next/styling_debug'; -import {attachDebugObject} from './util/debug_utils'; -import {getTNode, isStylingContext, unwrapRNode} from './util/view_utils'; +import {ACTIVE_INDEX, CONTAINER_HEADER_OFFSET, LContainer, NATIVE} from '../interfaces/container'; +import {COMMENT_MARKER, ELEMENT_MARKER, I18nMutateOpCode, I18nMutateOpCodes, I18nUpdateOpCode, I18nUpdateOpCodes, TIcu} from '../interfaces/i18n'; +import {TNode} from '../interfaces/node'; +import {LQueries} from '../interfaces/query'; +import {RComment, RElement} from '../interfaces/renderer'; +import {StylingContext} from '../interfaces/styling'; +import {BINDING_INDEX, CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTENT_QUERIES, CONTEXT, DECLARATION_VIEW, FLAGS, HEADER_OFFSET, HOST, INJECTOR, LView, LViewFlags, NEXT, PARENT, QUERIES, RENDERER, RENDERER_FACTORY, SANITIZER, TVIEW, T_HOST} from '../interfaces/view'; +import {runtimeIsNewStylingInUse} from '../styling_next/state'; +import {DebugStyling as DebugNewStyling, NodeStylingDebug} from '../styling_next/styling_debug'; +import {attachDebugObject} from '../util/debug_utils'; +import {getTNode, isStylingContext, unwrapRNode} from '../util/view_utils'; /* * This file contains conditionally attached classes which provide human readable (debug) level diff --git a/packages/core/src/render3/instructions/shared.ts b/packages/core/src/render3/instructions/shared.ts index 41ebfb15b2..2a869d7dc9 100644 --- a/packages/core/src/render3/instructions/shared.ts +++ b/packages/core/src/render3/instructions/shared.ts @@ -15,7 +15,6 @@ import {assertDataInRange, assertDefined, assertDomNode, assertEqual, assertLess import {normalizeDebugBindingName, normalizeDebugBindingValue} from '../../util/ng_reflect'; import {assertLView, assertPreviousIsParent} from '../assert'; import {attachPatchData, getComponentViewByInstance} from '../context_discovery'; -import {attachLContainerDebug, attachLViewDebug} from '../debug'; import {diPublicInInjector, getNodeInjectable, getOrCreateNodeInjectorForNode} from '../di'; import {throwMultipleComponentError} from '../errors'; import {executeHooks, executePreOrderHooks, registerPreOrderHooks} from '../hooks'; @@ -38,6 +37,7 @@ import {attrsStylingIndexOf} from '../util/attrs_utils'; import {INTERPOLATION_DELIMITER, stringifyForError} from '../util/misc_utils'; import {getLViewParent, getRootContext} from '../util/view_traversal_utils'; import {getComponentViewByIndex, getNativeByIndex, getNativeByTNode, getTNode, isComponent, isComponentDef, isContentQueryHost, isLContainer, isRootView, readPatchedLView, resetPreOrderHookFlags, unwrapRNode, viewAttachedToChangeDetector} from '../util/view_utils'; +import {attachLContainerDebug, attachLViewDebug} from './lview_debug'; @@ -605,7 +605,6 @@ export function createTView( schemas: schemas, }; } - function createViewBlueprint(bindingStartIndex: number, initialViewLength: number): LView { const blueprint = new Array(initialViewLength) .fill(null, 0, bindingStartIndex) diff --git a/packages/core/test/render3/debug_spec.ts b/packages/core/test/render3/debug_spec.ts index 794dfb9d56..35937c0c61 100644 --- a/packages/core/test/render3/debug_spec.ts +++ b/packages/core/test/render3/debug_spec.ts @@ -7,8 +7,8 @@ */ import {getLContext} from '../../src/render3/context_discovery'; -import {LViewDebug, toDebug} from '../../src/render3/debug'; import {RenderFlags, ɵɵdefineComponent, ɵɵelementEnd, ɵɵelementStart, ɵɵtext} from '../../src/render3/index'; +import {LViewDebug, toDebug} from '../../src/render3/instructions/lview_debug'; import {ComponentFixture} from './render_util';