diff --git a/src/api/types/TypeRegistry.js b/src/api/types/TypeRegistry.js index 9506992edb..1dac938fb4 100644 --- a/src/api/types/TypeRegistry.js +++ b/src/api/types/TypeRegistry.js @@ -89,6 +89,17 @@ export default class TypeRegistry { get(typeKey) { return this.types[typeKey] || UNKNOWN_TYPE; } + /** + * List all registered types. + * @returns {Type[]} all registered types + */ + getTypes() { + return Object.values(this.types); + } + /** + * Import legacy types. + * @param {TypeDefinition[]} types the types to import + */ importLegacyTypes(types) { types .filter((t) => this.get(t.key) === UNKNOWN_TYPE) diff --git a/src/plugins/inspectorViews/styles/StylesInspectorViewProvider.js b/src/plugins/inspectorViews/styles/StylesInspectorViewProvider.js index 52d79afdd4..8abc1acdc1 100644 --- a/src/plugins/inspectorViews/styles/StylesInspectorViewProvider.js +++ b/src/plugins/inspectorViews/styles/StylesInspectorViewProvider.js @@ -91,6 +91,15 @@ export default function StylesInspectorViewProvider(openmct) { ); _destroy = destroy; }, + showTab: function () { + const objectSelection = selection?.[0]; + const objectContext = objectSelection?.[0]?.context; + const layoutItem = objectContext?.layoutItem; + const domainObject = objectContext?.item; + const hasStyles = domainObject?.configuration?.objectStyles; + + return layoutItem || hasStyles; + }, priority: function () { return openmct.priority.DEFAULT; }, diff --git a/src/plugins/notebook/NotebookType.js b/src/plugins/notebook/NotebookType.js index 375c22af8a..ef299fb69c 100644 --- a/src/plugins/notebook/NotebookType.js +++ b/src/plugins/notebook/NotebookType.js @@ -28,6 +28,7 @@ export default class NotebookType { this.description = description; this.cssClass = icon; this.creatable = true; + this.annotatable = true; this.form = [ { key: 'defaultSort',