Skip to content

Commit 61ff42a

Browse files
dgp1130thePunderWoman
authored andcommitted
refactor(devtools): remove Props suffix from DirectivePropertyResolver names (angular#60475)
This suffix will be confusing as we introduce new variants for Wiz in particular. PR Close angular#60475
1 parent d47cf58 commit 61ff42a

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-resolver/directive-property-resolver.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ export class DirectivePropertyResolver {
6767
private _props: Properties,
6868
private _directivePosition: DirectivePosition,
6969
) {
70-
const {inputProps, outputProps, stateProps} = this._classifyProperties();
70+
const {inputs, outputs, state} = this._classifyProperties();
7171

72-
this._inputsDataSource = this._createDataSourceFromProps(inputProps);
73-
this._outputsDataSource = this._createDataSourceFromProps(outputProps);
74-
this._stateDataSource = this._createDataSourceFromProps(stateProps);
72+
this._inputsDataSource = this._createDataSourceFromProps(inputs);
73+
this._outputsDataSource = this._createDataSourceFromProps(outputs);
74+
this._stateDataSource = this._createDataSourceFromProps(state);
7575
}
7676

7777
get directiveInputControls(): DirectiveTreeData {
@@ -116,11 +116,11 @@ export class DirectivePropertyResolver {
116116

117117
updateProperties(newProps: Properties): void {
118118
this._props = newProps;
119-
const {inputProps, outputProps, stateProps} = this._classifyProperties();
119+
const {inputs, outputs, state} = this._classifyProperties();
120120

121-
this._inputsDataSource.update(inputProps);
122-
this._outputsDataSource.update(outputProps);
123-
this._stateDataSource.update(stateProps);
121+
this._inputsDataSource.update(inputs);
122+
this._outputsDataSource.update(outputs);
123+
this._stateDataSource.update(state);
124124
}
125125

126126
updateValue(node: FlatNode, newValue: unknown): void {
@@ -141,31 +141,31 @@ export class DirectivePropertyResolver {
141141
}
142142

143143
private _classifyProperties(): {
144-
inputProps: {[name: string]: Descriptor};
145-
outputProps: {[name: string]: Descriptor};
146-
stateProps: {[name: string]: Descriptor};
144+
inputs: {[name: string]: Descriptor};
145+
outputs: {[name: string]: Descriptor};
146+
state: {[name: string]: Descriptor};
147147
} {
148148
const inputLabels: Set<string> = new Set(Object.values(this._props.metadata?.inputs || {}));
149149
const outputLabels: Set<string> = new Set(Object.values(this._props.metadata?.outputs || {}));
150150

151-
const inputProps = {};
152-
const outputProps = {};
153-
const stateProps = {};
151+
const inputs = {};
152+
const outputs = {};
153+
const state = {};
154154
let propPointer: {[name: string]: Descriptor};
155155

156156
Object.keys(this.directiveProperties).forEach((propName) => {
157157
propPointer = inputLabels.has(propName)
158-
? inputProps
158+
? inputs
159159
: outputLabels.has(propName)
160-
? outputProps
161-
: stateProps;
160+
? outputs
161+
: state;
162162
propPointer[propName] = this.directiveProperties[propName];
163163
});
164164

165165
return {
166-
inputProps,
167-
outputProps,
168-
stateProps,
166+
inputs,
167+
outputs,
168+
state,
169169
};
170170
}
171171
}

0 commit comments

Comments
 (0)