From 501958e2df76ca6473b6367f76d9ad9d0e9c2a0d Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Wed, 12 Apr 2023 14:19:41 +0200 Subject: [PATCH] updated examples --- .../collection-view.models.ts | 11 ++++++---- .../extensions-registry/dashboard.models.ts | 5 ++++- .../entity-action.models.ts | 22 ++++++++++++++----- .../entity-bulk-action.models.ts | 11 ++++++++-- .../libs/extensions-registry/models.ts | 16 +++++++++----- .../libs/extensions-registry/theme.models.ts | 3 ++- .../extensions-registry/umbraco-package.ts | 2 +- 7 files changed, 50 insertions(+), 20 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/libs/extensions-registry/collection-view.models.ts b/src/Umbraco.Web.UI.Client/libs/extensions-registry/collection-view.models.ts index 4f7104b913..823ca3bc21 100644 --- a/src/Umbraco.Web.UI.Client/libs/extensions-registry/collection-view.models.ts +++ b/src/Umbraco.Web.UI.Client/libs/extensions-registry/collection-view.models.ts @@ -13,14 +13,17 @@ export interface MetaCollectionView { /** * An icon to represent the collection view - * @example 'umb:box' - * @example 'umb:grid' + * + * @examples [ + * "umb:box", + * "umb:grid" + * ] */ icon: string; /** - * The URL pathname for this collection view that can be deep linked to by sharing the url - */ + * The URL pathname for this collection view that can be deep linked to by sharing the url + */ pathName: string; } diff --git a/src/Umbraco.Web.UI.Client/libs/extensions-registry/dashboard.models.ts b/src/Umbraco.Web.UI.Client/libs/extensions-registry/dashboard.models.ts index 391853d187..d12fd07b0d 100644 --- a/src/Umbraco.Web.UI.Client/libs/extensions-registry/dashboard.models.ts +++ b/src/Umbraco.Web.UI.Client/libs/extensions-registry/dashboard.models.ts @@ -10,7 +10,10 @@ export interface MetaDashboard { * This is the URL path for the dashboard which is used for navigating or deep linking directly to the dashboard * https://yoursite.com/section/settings/dashboard/my-dashboard-path * - * @examples 'my-dashboard-path' + * @example my-dashboard-path + * @examples [ + * "my-dashboard-path" + * ] */ pathname: string; diff --git a/src/Umbraco.Web.UI.Client/libs/extensions-registry/entity-action.models.ts b/src/Umbraco.Web.UI.Client/libs/extensions-registry/entity-action.models.ts index a9cd1b27a8..4816f084fd 100644 --- a/src/Umbraco.Web.UI.Client/libs/extensions-registry/entity-action.models.ts +++ b/src/Umbraco.Web.UI.Client/libs/extensions-registry/entity-action.models.ts @@ -13,25 +13,35 @@ export interface ManifestEntityAction extends ManifestElement { export interface MetaEntityAction { /** * An icon to represent the action to be performed - * @example 'umb:box' - * @example 'umb:grid' + * + * @examples [ + * "umb:box", + * "umb:grid" + * ] */ icon?: string; /** * The friendly name of the action to perform - * @example 'Create' - * @example 'Create Content Template' + * + * @examples [ + * "Create", + * "Create Content Template" + * ] */ label: string; + /** + * @TJS-ignore + */ api: any; // create interface - /** * The alias for the repsoitory of the entity type this action is for * such as 'Umb.Repository.Documents' - * @example 'Umb.Repository.Documents' + * @examples [ + * "Umb.Repository.Documents" + * ] */ repositoryAlias: string; } diff --git a/src/Umbraco.Web.UI.Client/libs/extensions-registry/entity-bulk-action.models.ts b/src/Umbraco.Web.UI.Client/libs/extensions-registry/entity-bulk-action.models.ts index afe32fa3f8..5564bb5b5d 100644 --- a/src/Umbraco.Web.UI.Client/libs/extensions-registry/entity-bulk-action.models.ts +++ b/src/Umbraco.Web.UI.Client/libs/extensions-registry/entity-bulk-action.models.ts @@ -11,15 +11,22 @@ export interface ManifestEntityBulkAction extends ManifestElement, ManifestWithC export interface MetaEntityBulkAction { /** - * + * A friendly label for the action */ label: string; + + /** + * @TJS-ignore + */ api: any; // create interface /** * The alias for the repsoitory of the entity type this action is for * such as 'Umb.Repository.Documents' - * @example 'Umb.Repository.Documents' + * + * @examples [ + * "Umb.Repository.Documents" + * ] */ repositoryAlias: string; } diff --git a/src/Umbraco.Web.UI.Client/libs/extensions-registry/models.ts b/src/Umbraco.Web.UI.Client/libs/extensions-registry/models.ts index 274501d78a..6de04ccfcf 100644 --- a/src/Umbraco.Web.UI.Client/libs/extensions-registry/models.ts +++ b/src/Umbraco.Web.UI.Client/libs/extensions-registry/models.ts @@ -113,9 +113,10 @@ export interface ManifestBase { /** * The kind of the extension, used to group extensions together - * @example "button" + * + * @examples ["button"] */ - kind?: any; // I had to add the optional kind property set to undefined. To make the ManifestTypes recognize the Manifest Kind types. Notice that Kinds has to Omit the kind property when extending. + kind?: unknown; // I had to add the optional kind property set to undefined. To make the ManifestTypes recognize the Manifest Kind types. Notice that Kinds has to Omit the kind property when extending. /** * The friendly name of the extension @@ -137,6 +138,9 @@ export interface ManifestKind { } export interface ManifestWithConditions { + /** + * Set the conditions for when the extension should be loaded + */ conditions: ConditionsType; } @@ -155,7 +159,7 @@ export interface ManifestClass extends ManifestWithLoader { /** * The file location of the javascript file to load - * @required + * @TJS-required */ js?: string; @@ -180,7 +184,8 @@ export interface ManifestElement extends ManifestWithLoader but just the name */ elementName?: string; + //loader?: () => Promise; /** * This contains properties specific to the type of extension */ - meta?: any; + meta?: unknown; } export interface ManifestWithView extends ManifestElement { diff --git a/src/Umbraco.Web.UI.Client/libs/extensions-registry/theme.models.ts b/src/Umbraco.Web.UI.Client/libs/extensions-registry/theme.models.ts index 51704abc53..0e18a0164a 100644 --- a/src/Umbraco.Web.UI.Client/libs/extensions-registry/theme.models.ts +++ b/src/Umbraco.Web.UI.Client/libs/extensions-registry/theme.models.ts @@ -10,7 +10,8 @@ export interface ManifestTheme extends ManifestWithLoader { /** * File location of the CSS file of the theme - * @example 'themes/dark.theme.css' + * + * @examples ["themes/dark.theme.css"] */ css?: string; } diff --git a/src/Umbraco.Web.UI.Client/libs/extensions-registry/umbraco-package.ts b/src/Umbraco.Web.UI.Client/libs/extensions-registry/umbraco-package.ts index 85e0f1572d..c594bada93 100644 --- a/src/Umbraco.Web.UI.Client/libs/extensions-registry/umbraco-package.ts +++ b/src/Umbraco.Web.UI.Client/libs/extensions-registry/umbraco-package.ts @@ -11,7 +11,7 @@ export class UmbracoPackage { /** * @title The version of the Umbraco package in the style of semver - * @example 0.1.0 + * @examples ["0.1.0"] */ version?: string;