feat(nx-dev): display deprecated schema options last (#14518)
This commit is contained in:
parent
f8854d7089
commit
7193b85d2d
@ -58,25 +58,28 @@ function getViewModel(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function extractPropertiesByImportance(properties: PropertyModel[]): {
|
function extractPropertiesByImportance(properties: PropertyModel[]): {
|
||||||
required: PropertyModel[];
|
deprecated: PropertyModel[];
|
||||||
important: PropertyModel[];
|
important: PropertyModel[];
|
||||||
internal: PropertyModel[];
|
internal: PropertyModel[];
|
||||||
|
required: PropertyModel[];
|
||||||
rest: PropertyModel[];
|
rest: PropertyModel[];
|
||||||
} {
|
} {
|
||||||
const result: {
|
const result: {
|
||||||
required: PropertyModel[];
|
deprecated: PropertyModel[];
|
||||||
important: PropertyModel[];
|
important: PropertyModel[];
|
||||||
internal: PropertyModel[];
|
internal: PropertyModel[];
|
||||||
|
required: PropertyModel[];
|
||||||
rest: PropertyModel[];
|
rest: PropertyModel[];
|
||||||
} = {
|
} = {
|
||||||
required: [],
|
deprecated: [],
|
||||||
important: [],
|
important: [],
|
||||||
internal: [],
|
internal: [],
|
||||||
|
required: [],
|
||||||
rest: [],
|
rest: [],
|
||||||
};
|
};
|
||||||
for (const property of properties) {
|
for (const property of properties) {
|
||||||
if (property.isRequired) {
|
if (isPropertyDeprecated(property.initialSchema)) {
|
||||||
result.required.push(property);
|
result.deprecated.push(property);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
@ -158,6 +161,7 @@ export function SchemaViewer({
|
|||||||
...categorizedProperties.important,
|
...categorizedProperties.important,
|
||||||
...categorizedProperties.rest,
|
...categorizedProperties.rest,
|
||||||
...categorizedProperties.internal,
|
...categorizedProperties.internal,
|
||||||
|
...categorizedProperties.deprecated,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const additionalProperties = new Array<JSX.Element>();
|
const additionalProperties = new Array<JSX.Element>();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user