From f88f717094291ac7c97b77b3b7d416a3cd129f41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matias=20Niemel=C3=A4?= Date: Tue, 17 Sep 2019 13:26:52 -0700 Subject: [PATCH] refactor(ivy): remame `styling_next` directory to `styling` (#32731) PR Close #32731 --- packages/core/src/debug/debug_node.ts | 6 +++--- packages/core/src/render3/di.ts | 2 +- packages/core/src/render3/instructions/all.ts | 2 +- .../src/render3/instructions/class_map_interpolation.ts | 2 +- packages/core/src/render3/instructions/element.ts | 6 +++--- .../core/src/render3/instructions/element_container.ts | 2 +- packages/core/src/render3/instructions/lview_debug.ts | 6 +++--- packages/core/src/render3/instructions/shared.ts | 2 +- .../src/render3/instructions/style_prop_interpolation.ts | 2 +- packages/core/src/render3/interfaces/node.ts | 2 +- packages/core/src/render3/node_selector_matcher.ts | 2 +- .../src/render3/{styling_next => styling}/bindings.ts | 2 +- .../src/render3/{styling_next => styling}/instructions.ts | 0 .../src/render3/{styling_next => styling}/interfaces.ts | 2 +- .../{styling_next => styling}/map_based_bindings.ts | 0 .../core/src/render3/{styling_next => styling}/state.ts | 0 .../render3/{styling_next => styling}/styling_debug.ts | 0 .../core/src/render3/{styling_next => styling}/util.ts | 0 .../bundling/core_all/bundle.golden_size_map_ivy.json | 2 +- .../core_all/bundle.golden_size_map_view_engine.json | 4 ++-- .../perf/map_based_style_and_class_bindings/index.ts | 2 +- .../test/render3/perf/style_and_class_bindings/index.ts | 2 +- packages/core/test/render3/perf/style_binding/index.ts | 2 +- .../test/render3/styling_next/map_based_bindings_spec.ts | 2 +- .../test/render3/styling_next/styling_context_spec.ts | 8 ++++---- .../core/test/render3/styling_next/styling_debug_spec.ts | 6 +++--- 26 files changed, 33 insertions(+), 33 deletions(-) rename packages/core/src/render3/{styling_next => styling}/bindings.ts (99%) rename packages/core/src/render3/{styling_next => styling}/instructions.ts (100%) rename packages/core/src/render3/{styling_next => styling}/interfaces.ts (99%) rename packages/core/src/render3/{styling_next => styling}/map_based_bindings.ts (100%) rename packages/core/src/render3/{styling_next => styling}/state.ts (100%) rename packages/core/src/render3/{styling_next => styling}/styling_debug.ts (100%) rename packages/core/src/render3/{styling_next => styling}/util.ts (100%) diff --git a/packages/core/src/debug/debug_node.ts b/packages/core/src/debug/debug_node.ts index b1e6102f59..5e3a546491 100644 --- a/packages/core/src/debug/debug_node.ts +++ b/packages/core/src/debug/debug_node.ts @@ -12,9 +12,9 @@ import {CONTAINER_HEADER_OFFSET, LContainer, NATIVE} from '../render3/interfaces import {TElementNode, TNode, TNodeFlags, TNodeType} from '../render3/interfaces/node'; import {isComponentHost, isLContainer} from '../render3/interfaces/type_checks'; import {LView, PARENT, TData, TVIEW, T_HOST} from '../render3/interfaces/view'; -import {StylingMapArray, TStylingContext} from '../render3/styling_next/interfaces'; -import {NodeStylingDebug} from '../render3/styling_next/styling_debug'; -import {isStylingContext, stylingMapToStringMap} from '../render3/styling_next/util'; +import {StylingMapArray, TStylingContext} from '../render3/styling/interfaces'; +import {NodeStylingDebug} from '../render3/styling/styling_debug'; +import {isStylingContext, stylingMapToStringMap} from '../render3/styling/util'; import {getComponent, getContext, getInjectionTokens, getInjector, getListeners, getLocalRefs, isBrowserEvents, loadLContext} from '../render3/util/discovery_utils'; import {INTERPOLATION_DELIMITER, renderStringify} from '../render3/util/misc_utils'; import {findComponentView} from '../render3/util/view_traversal_utils'; diff --git a/packages/core/src/render3/di.ts b/packages/core/src/render3/di.ts index bf928e308b..933040d212 100644 --- a/packages/core/src/render3/di.ts +++ b/packages/core/src/render3/di.ts @@ -24,7 +24,7 @@ import {isComponentDef, isComponentHost} from './interfaces/type_checks'; import {DECLARATION_VIEW, INJECTOR, LView, TData, TVIEW, TView, T_HOST} from './interfaces/view'; import {assertNodeOfPossibleTypes} from './node_assert'; import {getLView, getPreviousOrParentTNode, setTNodeAndViewData} from './state'; -import {getInitialStylingValue} from './styling_next/util'; +import {getInitialStylingValue} from './styling/util'; import {isNameOnlyAttributeMarker} from './util/attrs_utils'; import {getParentInjectorIndex, getParentInjectorView, hasParentInjector} from './util/injector_utils'; import {stringifyForError} from './util/misc_utils'; diff --git a/packages/core/src/render3/instructions/all.ts b/packages/core/src/render3/instructions/all.ts index eb2911e06b..3da86419c1 100644 --- a/packages/core/src/render3/instructions/all.ts +++ b/packages/core/src/render3/instructions/all.ts @@ -43,7 +43,7 @@ export * from './projection'; export * from './property'; export * from './property_interpolation'; export * from './advance'; -export * from '../styling_next/instructions'; +export * from '../styling/instructions'; export * from './text'; export * from './text_interpolation'; export * from './class_map_interpolation'; diff --git a/packages/core/src/render3/instructions/class_map_interpolation.ts b/packages/core/src/render3/instructions/class_map_interpolation.ts index ae968fb34c..4ee32b3331 100644 --- a/packages/core/src/render3/instructions/class_map_interpolation.ts +++ b/packages/core/src/render3/instructions/class_map_interpolation.ts @@ -7,7 +7,7 @@ */ import {getLView, getSelectedIndex} from '../state'; -import {classMapInternal} from '../styling_next/instructions'; +import {classMapInternal} from '../styling/instructions'; import {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation'; diff --git a/packages/core/src/render3/instructions/element.ts b/packages/core/src/render3/instructions/element.ts index 573fc4711a..64297afa2d 100644 --- a/packages/core/src/render3/instructions/element.ts +++ b/packages/core/src/render3/instructions/element.ts @@ -17,9 +17,9 @@ import {BINDING_INDEX, HEADER_OFFSET, LView, RENDERER, TVIEW, T_HOST} from '../i import {assertNodeType} from '../node_assert'; import {appendChild} from '../node_manipulation'; import {decreaseElementDepthCount, getElementDepthCount, getIsParent, getLView, getNamespace, getPreviousOrParentTNode, getSelectedIndex, increaseElementDepthCount, setIsNotParent, setPreviousOrParentTNode} from '../state'; -import {registerInitialStylingOnTNode} from '../styling_next/instructions'; -import {StylingMapArray, TStylingContext} from '../styling_next/interfaces'; -import {getInitialStylingValue, hasClassInput, hasStyleInput} from '../styling_next/util'; +import {registerInitialStylingOnTNode} from '../styling/instructions'; +import {StylingMapArray, TStylingContext} from '../styling/interfaces'; +import {getInitialStylingValue, hasClassInput, hasStyleInput} from '../styling/util'; import {setUpAttributes} from '../util/attrs_utils'; import {getNativeByTNode, getTNode} from '../util/view_utils'; diff --git a/packages/core/src/render3/instructions/element_container.ts b/packages/core/src/render3/instructions/element_container.ts index 1c922de370..6903736b3c 100644 --- a/packages/core/src/render3/instructions/element_container.ts +++ b/packages/core/src/render3/instructions/element_container.ts @@ -15,7 +15,7 @@ import {BINDING_INDEX, HEADER_OFFSET, RENDERER, TVIEW, T_HOST} from '../interfac import {assertNodeType} from '../node_assert'; import {appendChild} from '../node_manipulation'; import {getIsParent, getLView, getPreviousOrParentTNode, setIsNotParent, setPreviousOrParentTNode} from '../state'; -import {registerInitialStylingOnTNode} from '../styling_next/instructions'; +import {registerInitialStylingOnTNode} from '../styling/instructions'; import {createDirectivesInstances, executeContentQueries, getOrCreateTNode, resolveDirectives, saveResolvedLocalsInData} from './shared'; diff --git a/packages/core/src/render3/instructions/lview_debug.ts b/packages/core/src/render3/instructions/lview_debug.ts index 03c00f44c4..326a08a49e 100644 --- a/packages/core/src/render3/instructions/lview_debug.ts +++ b/packages/core/src/render3/instructions/lview_debug.ts @@ -19,9 +19,9 @@ import {SelectorFlags} from '../interfaces/projection'; import {TQueries} from '../interfaces/query'; import {RComment, RElement, RNode} from '../interfaces/renderer'; import {BINDING_INDEX, CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTEXT, DECLARATION_VIEW, ExpandoInstructions, FLAGS, HEADER_OFFSET, HOST, HookData, INJECTOR, LView, LViewFlags, NEXT, PARENT, QUERIES, RENDERER, RENDERER_FACTORY, SANITIZER, TData, TVIEW, TView as ITView, TView, T_HOST} from '../interfaces/view'; -import {TStylingContext} from '../styling_next/interfaces'; -import {DebugStyling as DebugNewStyling, NodeStylingDebug} from '../styling_next/styling_debug'; -import {isStylingContext} from '../styling_next/util'; +import {TStylingContext} from '../styling/interfaces'; +import {DebugStyling as DebugNewStyling, NodeStylingDebug} from '../styling/styling_debug'; +import {isStylingContext} from '../styling/util'; import {attachDebugObject} from '../util/debug_utils'; import {getTNode, unwrapRNode} from '../util/view_utils'; diff --git a/packages/core/src/render3/instructions/shared.ts b/packages/core/src/render3/instructions/shared.ts index 74fd5e88da..8054fde5f5 100644 --- a/packages/core/src/render3/instructions/shared.ts +++ b/packages/core/src/render3/instructions/shared.ts @@ -31,7 +31,7 @@ import {BINDING_INDEX, CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTEXT, DECLARATION_VIE import {assertNodeOfPossibleTypes} from '../node_assert'; import {isNodeMatchingSelectorList} from '../node_selector_matcher'; import {ActiveElementFlags, executeElementExitFn, getBindingsEnabled, getCheckNoChangesMode, getIsParent, getPreviousOrParentTNode, getSelectedIndex, hasActiveElementFlag, incrementActiveDirectiveId, namespaceHTMLInternal, selectView, setActiveHostElement, setBindingRoot, setCheckNoChangesMode, setCurrentDirectiveDef, setCurrentQueryIndex, setPreviousOrParentTNode, setSelectedIndex} from '../state'; -import {renderStylingMap} from '../styling_next/bindings'; +import {renderStylingMap} from '../styling/bindings'; import {NO_CHANGE} from '../tokens'; import {ANIMATION_PROP_PREFIX, isAnimationProp} from '../util/attrs_utils'; import {INTERPOLATION_DELIMITER, renderStringify, stringifyForError} from '../util/misc_utils'; diff --git a/packages/core/src/render3/instructions/style_prop_interpolation.ts b/packages/core/src/render3/instructions/style_prop_interpolation.ts index 76e0c6af6f..feadfbcf2a 100644 --- a/packages/core/src/render3/instructions/style_prop_interpolation.ts +++ b/packages/core/src/render3/instructions/style_prop_interpolation.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ import {getLView, getSelectedIndex} from '../state'; -import {stylePropInternal} from '../styling_next/instructions'; +import {stylePropInternal} from '../styling/instructions'; import {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation'; import {TsickleIssue1009} from './shared'; diff --git a/packages/core/src/render3/interfaces/node.ts b/packages/core/src/render3/interfaces/node.ts index 8d82dc7959..a8dff1faf6 100644 --- a/packages/core/src/render3/interfaces/node.ts +++ b/packages/core/src/render3/interfaces/node.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import {StylingMapArray, TStylingContext} from '../styling_next/interfaces'; +import {StylingMapArray, TStylingContext} from '../styling/interfaces'; import {CssSelector} from './projection'; import {RNode} from './renderer'; import {LView, TView} from './view'; diff --git a/packages/core/src/render3/node_selector_matcher.ts b/packages/core/src/render3/node_selector_matcher.ts index 6d0a6b711e..5098ae87ad 100644 --- a/packages/core/src/render3/node_selector_matcher.ts +++ b/packages/core/src/render3/node_selector_matcher.ts @@ -12,7 +12,7 @@ import {assertDefined, assertNotEqual} from '../util/assert'; import {AttributeMarker, TAttributes, TNode, TNodeType, unusedValueExportToPlacateAjd as unused1} from './interfaces/node'; import {CssSelector, CssSelectorList, SelectorFlags, unusedValueExportToPlacateAjd as unused2} from './interfaces/projection'; -import {getInitialStylingValue} from './styling_next/util'; +import {getInitialStylingValue} from './styling/util'; import {isNameOnlyAttributeMarker} from './util/attrs_utils'; const unusedValueToPlacateAjd = unused1 + unused2; diff --git a/packages/core/src/render3/styling_next/bindings.ts b/packages/core/src/render3/styling/bindings.ts similarity index 99% rename from packages/core/src/render3/styling_next/bindings.ts rename to packages/core/src/render3/styling/bindings.ts index 5d9653696e..e75f464699 100644 --- a/packages/core/src/render3/styling_next/bindings.ts +++ b/packages/core/src/render3/styling/bindings.ts @@ -514,7 +514,7 @@ function updateInitialStylingOnContext( * map-based bindings up to sync with the application of prop-based * bindings. * - * Visit `styling_next/map_based_bindings.ts` to learn more about how the + * Visit `styling/map_based_bindings.ts` to learn more about how the * algorithm works for map-based styling bindings. * * Note that this function is not designed to be called in isolation (use diff --git a/packages/core/src/render3/styling_next/instructions.ts b/packages/core/src/render3/styling/instructions.ts similarity index 100% rename from packages/core/src/render3/styling_next/instructions.ts rename to packages/core/src/render3/styling/instructions.ts diff --git a/packages/core/src/render3/styling_next/interfaces.ts b/packages/core/src/render3/styling/interfaces.ts similarity index 99% rename from packages/core/src/render3/styling_next/interfaces.ts rename to packages/core/src/render3/styling/interfaces.ts index b2597e19d8..b6a14e692e 100644 --- a/packages/core/src/render3/styling_next/interfaces.ts +++ b/packages/core/src/render3/styling/interfaces.ts @@ -287,7 +287,7 @@ import {LView} from '../interfaces/view'; * For the algorithm to apply styling values efficiently, the * styling map entries must be applied in sync (property by property) * with prop-based bindings. (The map-based algorithm is described - * more inside of the `render3/styling_next/map_based_bindings.ts` file.) + * more inside of the `render3/styling/map_based_bindings.ts` file.) * * ## Sanitization * Sanitization is used to prevent invalid style values from being applied to diff --git a/packages/core/src/render3/styling_next/map_based_bindings.ts b/packages/core/src/render3/styling/map_based_bindings.ts similarity index 100% rename from packages/core/src/render3/styling_next/map_based_bindings.ts rename to packages/core/src/render3/styling/map_based_bindings.ts diff --git a/packages/core/src/render3/styling_next/state.ts b/packages/core/src/render3/styling/state.ts similarity index 100% rename from packages/core/src/render3/styling_next/state.ts rename to packages/core/src/render3/styling/state.ts diff --git a/packages/core/src/render3/styling_next/styling_debug.ts b/packages/core/src/render3/styling/styling_debug.ts similarity index 100% rename from packages/core/src/render3/styling_next/styling_debug.ts rename to packages/core/src/render3/styling/styling_debug.ts diff --git a/packages/core/src/render3/styling_next/util.ts b/packages/core/src/render3/styling/util.ts similarity index 100% rename from packages/core/src/render3/styling_next/util.ts rename to packages/core/src/render3/styling/util.ts diff --git a/packages/core/test/bundling/core_all/bundle.golden_size_map_ivy.json b/packages/core/test/bundling/core_all/bundle.golden_size_map_ivy.json index e86c014871..1d5e934e79 100644 --- a/packages/core/test/bundling/core_all/bundle.golden_size_map_ivy.json +++ b/packages/core/test/bundling/core_all/bundle.golden_size_map_ivy.json @@ -192,7 +192,7 @@ "pure_function.ts": 1274, "query.ts": 5226, "state.ts": 1312, - "styling_next/": { + "styling/": { "size": 8202, "bindings.ts": 2430, "instructions.ts": 1821, diff --git a/packages/core/test/bundling/core_all/bundle.golden_size_map_view_engine.json b/packages/core/test/bundling/core_all/bundle.golden_size_map_view_engine.json index c05c1f577e..cb8af03ae7 100644 --- a/packages/core/test/bundling/core_all/bundle.golden_size_map_view_engine.json +++ b/packages/core/test/bundling/core_all/bundle.golden_size_map_view_engine.json @@ -192,7 +192,7 @@ "pure_function.ts": 1274, "query.ts": 5226, "state.ts": 1312, - "styling_next/": { + "styling/": { "size": 8202, "bindings.ts": 2430, "instructions.ts": 1821, @@ -362,4 +362,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/core/test/render3/perf/map_based_style_and_class_bindings/index.ts b/packages/core/test/render3/perf/map_based_style_and_class_bindings/index.ts index cc104fb6fb..82810655a6 100644 --- a/packages/core/test/render3/perf/map_based_style_and_class_bindings/index.ts +++ b/packages/core/test/render3/perf/map_based_style_and_class_bindings/index.ts @@ -10,7 +10,7 @@ import {ɵɵelement, ɵɵelementEnd, ɵɵelementStart} from '../../../../src/ren import {refreshView} from '../../../../src/render3/instructions/shared'; import {RenderFlags} from '../../../../src/render3/interfaces/definition'; import {TVIEW} from '../../../../src/render3/interfaces/view'; -import {ɵɵclassMap, ɵɵstyleMap} from '../../../../src/render3/styling_next/instructions'; +import {ɵɵclassMap, ɵɵstyleMap} from '../../../../src/render3/styling/instructions'; import {createBenchmark} from '../micro_bench'; import {setupRootViewWithEmbeddedViews} from '../setup'; diff --git a/packages/core/test/render3/perf/style_and_class_bindings/index.ts b/packages/core/test/render3/perf/style_and_class_bindings/index.ts index ef2e8e9115..eb55377a92 100644 --- a/packages/core/test/render3/perf/style_and_class_bindings/index.ts +++ b/packages/core/test/render3/perf/style_and_class_bindings/index.ts @@ -11,7 +11,7 @@ import {refreshView} from '../../../../src/render3/instructions/shared'; import {RenderFlags} from '../../../../src/render3/interfaces/definition'; import {AttributeMarker} from '../../../../src/render3/interfaces/node'; import {TVIEW} from '../../../../src/render3/interfaces/view'; -import {ɵɵclassProp, ɵɵstyleProp} from '../../../../src/render3/styling_next/instructions'; +import {ɵɵclassProp, ɵɵstyleProp} from '../../../../src/render3/styling/instructions'; import {createBenchmark} from '../micro_bench'; import {setupRootViewWithEmbeddedViews} from '../setup'; diff --git a/packages/core/test/render3/perf/style_binding/index.ts b/packages/core/test/render3/perf/style_binding/index.ts index 37b7b1bf5e..48cf17135c 100644 --- a/packages/core/test/render3/perf/style_binding/index.ts +++ b/packages/core/test/render3/perf/style_binding/index.ts @@ -10,7 +10,7 @@ import {ɵɵelement, ɵɵelementEnd, ɵɵelementStart} from '../../../../src/ren import {refreshView} from '../../../../src/render3/instructions/shared'; import {RenderFlags} from '../../../../src/render3/interfaces/definition'; import {TVIEW} from '../../../../src/render3/interfaces/view'; -import {ɵɵstyleProp} from '../../../../src/render3/styling_next/instructions'; +import {ɵɵstyleProp} from '../../../../src/render3/styling/instructions'; import {createBenchmark} from '../micro_bench'; import {setupRootViewWithEmbeddedViews} from '../setup'; diff --git a/packages/core/test/render3/styling_next/map_based_bindings_spec.ts b/packages/core/test/render3/styling_next/map_based_bindings_spec.ts index 99161b8d84..f895aba302 100644 --- a/packages/core/test/render3/styling_next/map_based_bindings_spec.ts +++ b/packages/core/test/render3/styling_next/map_based_bindings_spec.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import {normalizeIntoStylingMap as createMap} from '../../../src/render3/styling_next/util'; +import {normalizeIntoStylingMap as createMap} from '../../../src/render3/styling/util'; describe('map-based bindings', () => { describe('StylingMapArray construction', () => { diff --git a/packages/core/test/render3/styling_next/styling_context_spec.ts b/packages/core/test/render3/styling_next/styling_context_spec.ts index 3d26c61f9e..c4ba6186d9 100644 --- a/packages/core/test/render3/styling_next/styling_context_spec.ts +++ b/packages/core/test/render3/styling_next/styling_context_spec.ts @@ -5,11 +5,11 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import {registerBinding} from '@angular/core/src/render3/styling_next/bindings'; -import {attachStylingDebugObject} from '@angular/core/src/render3/styling_next/styling_debug'; -import {DEFAULT_GUARD_MASK_VALUE} from '@angular/core/src/render3/styling_next/util'; +import {registerBinding} from '@angular/core/src/render3/styling/bindings'; +import {attachStylingDebugObject} from '@angular/core/src/render3/styling/styling_debug'; +import {DEFAULT_GUARD_MASK_VALUE} from '@angular/core/src/render3/styling/util'; -import {allocTStylingContext} from '../../../src/render3/styling_next/util'; +import {allocTStylingContext} from '../../../src/render3/styling/util'; describe('styling context', () => { it('should register a series of entries into the context', () => { diff --git a/packages/core/test/render3/styling_next/styling_debug_spec.ts b/packages/core/test/render3/styling_next/styling_debug_spec.ts index 256e5c09c9..53237c8215 100644 --- a/packages/core/test/render3/styling_next/styling_debug_spec.ts +++ b/packages/core/test/render3/styling_next/styling_debug_spec.ts @@ -5,9 +5,9 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import {registerBinding} from '@angular/core/src/render3/styling_next/bindings'; -import {NodeStylingDebug, attachStylingDebugObject} from '@angular/core/src/render3/styling_next/styling_debug'; -import {allocTStylingContext} from '@angular/core/src/render3/styling_next/util'; +import {registerBinding} from '@angular/core/src/render3/styling/bindings'; +import {NodeStylingDebug, attachStylingDebugObject} from '@angular/core/src/render3/styling/styling_debug'; +import {allocTStylingContext} from '@angular/core/src/render3/styling/util'; describe('styling debugging tools', () => { describe('NodeStylingDebug', () => {