This commit is contained in:
Niels Lyngsø
2023-11-09 09:51:05 +01:00
parent 545d93008e
commit 11c05908c3
2 changed files with 22 additions and 0 deletions

View File

@@ -5,6 +5,17 @@ import { ManifestCondition, ManifestWithDynamicConditions } from '../types.js';
import { UmbBaseExtensionController } from './base-extension-controller.js';
import { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
/**
* This Controller manages a single Extension and its Element.
* When the extension is permitted to be used, its Element will be instantiated and available for the consumer.
*
* @example
* ```ts
* const controller = new UmbExtensionElementController(host, extensionRegistry, alias, (permitted, ctrl) => { console.log("Extension is permitted and this is the element: ", ctrl.component) }));
* ```
* @export
* @class UmbCodeEditor
*/
export class UmbExtensionElementController<
ManifestType extends ManifestWithDynamicConditions = ManifestWithDynamicConditions,
ControllerType extends UmbExtensionElementController<ManifestType, any> = any

View File

@@ -3,6 +3,17 @@ import type { UmbExtensionRegistry } from '../registry/extension.registry.js';
import { UmbBaseExtensionController } from './base-extension-controller.js';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
/**
* This Controller manages a single Extension and its Manifest.
* When the extension is permitted to be used, the manifest is available for the consumer.
*
* @example
* ```ts
* const controller = new UmbExtensionManifestController(host, extensionRegistry, alias, (permitted, ctrl) => { console.log("Extension is permitted and this is the manifest: ", ctrl.manifest) }));
* ```
* @export
* @class UmbCodeEditor
*/
export class UmbExtensionManifestController<
ManifestType extends ManifestWithDynamicConditions = ManifestWithDynamicConditions,
ControllerType extends UmbBaseExtensionController<ManifestType, any> = any