Skip to content

Commit 2bff02c

Browse files
committed
Revert changes made to 14 docs
1 parent cf9bc5b commit 2bff02c

File tree

8 files changed

+39
-43
lines changed

8 files changed

+39
-43
lines changed

14/umbraco-cms/customizing/extending-overview/extension-types/condition.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,16 @@ You can make your own Conditions by creating a class that implements the `UmbExt
3737

3838
```typescript
3939
import {
40+
ManifestCondition,
4041
UmbConditionConfigBase,
4142
UmbConditionControllerArguments,
4243
UmbExtensionCondition
4344
} from '@umbraco-cms/backoffice/extension-api';
4445
import { UmbConditionBase } from '@umbraco-cms/backoffice/extension-registry';
4546
import { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
4647

47-
export type MyExtensionConditionConfig = UmbConditionConfigBase<'My.Condition.CustomName'> & {
48-
match?: string;
48+
export type MyExtensionConditionConfig = UmbConditionConfigBase & {
49+
match: string;
4950
};
5051

5152
export class MyExtensionCondition extends UmbConditionBase<MyExtensionConditionConfig> implements UmbExtensionCondition {
@@ -63,28 +64,26 @@ export class MyExtensionCondition extends UmbConditionBase<MyExtensionConditionC
6364
// Declare the Condition Configuration Type in the global UmbExtensionConditionConfigMap interface:
6465
declare global {
6566
interface UmbExtensionConditionConfigMap {
66-
MyExtensionConditionConfig: MyExtensionConditionConfig;
67+
MyExtensionConditionConfig: MyExtensionCondition;
6768
}
6869
}
6970
```
7071

71-
The global declaration on the last five lines makes your Condition appear valid for manifests using the type `UmbExtensionManifest`. Also, the Condition Config Type alias should match the alias given when registering the condition below.
72-
73-
The Condition then needs to be registered in the Extension Registry:
72+
This has to be registered in the extension registry, shown below:
7473

7574
```typescript
76-
export const manifest: UmbExtensionManifest = {
75+
export const manifest: ManifestCondition = {
7776
type: 'condition',
7877
name: 'My Condition',
7978
alias: 'My.Condition.CustomName',
8079
api: MyExtensionCondition,
8180
};
8281
```
8382

84-
Finally, you can make use of your condition in any manifests:
83+
Finally, you can make use of the condition in your configuration. See an example of this below:
8584

8685
```typescript
87-
export const manifest: UmbExtensionManifest = {
86+
{
8887
type: 'workspaceAction',
8988
name: 'example-workspace-action',
9089
alias: 'My.Example.WorkspaceAction',
@@ -101,7 +100,7 @@ export const manifest: UmbExtensionManifest = {
101100
}
102101
```
103102

104-
As shown in the code above, the configuration property `match` isn't used for our condition. We can do this by replacing the timeout with some other check:
103+
As can be seen in the code above, we never make use of `match`. We can do this by replacing the timeout with some other check.
105104

106105
```typescript
107106
// ...

14/umbraco-cms/customizing/extending-overview/extension-types/header-apps.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ This is a continuation of the above steps from the **Button Header App with Mani
9393

9494
{% code title="my-element.ts" lineNumbers="true" %}
9595
```typescript
96-
import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
96+
import { ManifestHeaderAppButtonKind, umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
9797

98-
const manifest: UmbExtensionManifest = {
98+
const manifest: ManifestHeaderAppButtonKind = {
9999
type: "headerApp",
100100
alias: "My.HeaderApp.Documentation",
101101
name: "My Header App Documentation",

14/umbraco-cms/customizing/extending-overview/extension-types/kind.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ description: A kind extension provides the preset for other extensions to use
88
This page is a work in progress and may undergo further revisions, updates, or amendments. The information contained herein is subject to change without notice.
99
{% endhint %}
1010

11-
## Kind
12-
1311
A kind is matched with a specific type. When another extension uses that type and kind it will inherit the preset manifest of the kind extension.
1412

1513
The registration of Kinds is done in the same manner as the registration of other extensions. But the format of it is different. Let's take a look at an example of how to implement the `Kind registration` for a [**Header App**](../extension-types/header-apps.md) **Button Kind**.
@@ -18,10 +16,10 @@ The registration of Kinds is done in the same manner as the registration of othe
1816

1917
The root properties of this object define the `Kind registration`. Then the manifest property holds the preset for the extension using this kind to be based upon. This object can hold the property values that make sense for the Kind.
2018

21-
```ts
19+
```typescript
2220
...
2321

24-
const manifest: UmbExtensionManifestKind = {
22+
const manifest: ManifestKind = {
2523
type: 'kind',
2624
alias: 'Umb.Kind.MyButtonKind',
2725
matchType: 'headerApp',
@@ -36,7 +34,7 @@ const manifest: UmbExtensionManifestKind = {
3634

3735
For the kind to be used, it needs to match up with the registration of the extension using it. This happens when the extension uses a type, which matches the value of `matchType` of the Kind. As well the extension has to utilize that kind, by setting the value of `kind` to the value of `matchKind` the Kind.
3836

39-
```ts
37+
```typescript
4038
...
4139

4240
const manifest = {
@@ -52,10 +50,11 @@ const manifest = {
5250

5351
In the following example, a kind is registered. This kind provides a default element for extensions utilizing this kind.
5452

55-
```ts
56-
import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
53+
```typescript
54+
import { ManifestHeaderAppButtonKind, umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
55+
import { ManifestKind } from '@umbraco-cms/backoffice/extension-api';
5756

58-
const manifest: UmbExtensionManifest = {
57+
const manifest: ManifestKind<ManifestHeaderAppButtonKind> = {
5958
type: 'kind',
6059
alias: 'Umb.Kind.MyButtonKind',
6160
matchType: 'headerApp',
@@ -72,7 +71,7 @@ This enables other extensions to use this kind and inherit the manifest properti
7271

7372
In this example a **Header App** is registered without defining an element, this is possible because the registration inherits the elementName from the kind.
7473

75-
```ts
74+
```typescript
7675
import { extensionRegistry } from '@umbraco-cms/extension-registry';
7776

7877
const manifest = {

14/umbraco-cms/customizing/extending-overview/extension-types/section.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ This is not recommended as it limits the content of your section to this element
6161
If you like to have full control, you can define an element like this:
6262

6363
```typescript
64-
const section : UmbExtensionManifest = {
64+
const section : ManifestSection = {
6565
type: "section",
6666
alias: "Empty.Section",
6767
name : 'Empty Section',

14/umbraco-commerce/key-concepts/ui-extensions/store-menu-items.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ Here:
6363
To handle requests to this endpoint, you should define a workspace manifest for the given entity type.
6464

6565
```typescript
66-
const manifests: UmbExtensionManifest[] = [
66+
import { ManifestWorkspace } from '@umbraco-cms/backoffice/extension-registry';
67+
68+
const manifests: ManifestWorkspace[] = [
6769
{
6870
type: 'workspace',
6971
kind: 'routable',

15/umbraco-cms/customizing/extending-overview/extension-types/condition.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,15 @@ You can make your own Conditions by creating a class that implements the `UmbExt
2020

2121
```typescript
2222
import {
23-
ManifestCondition,
2423
UmbConditionConfigBase,
2524
UmbConditionControllerArguments,
2625
UmbExtensionCondition
2726
} from '@umbraco-cms/backoffice/extension-api';
2827
import { UmbConditionBase } from '@umbraco-cms/backoffice/extension-registry';
2928
import { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
3029

31-
export type MyExtensionConditionConfig = UmbConditionConfigBase & {
32-
match: string;
30+
export type MyExtensionConditionConfig = UmbConditionConfigBase<'My.Condition.CustomName'> & {
31+
match?: string;
3332
};
3433

3534
export class MyExtensionCondition extends UmbConditionBase<MyExtensionConditionConfig> implements UmbExtensionCondition {
@@ -47,12 +46,14 @@ export class MyExtensionCondition extends UmbConditionBase<MyExtensionConditionC
4746
// Declare the Condition Configuration Type in the global UmbExtensionConditionConfigMap interface:
4847
declare global {
4948
interface UmbExtensionConditionConfigMap {
50-
MyExtensionConditionConfig: MyExtensionCondition;
49+
MyExtensionConditionConfig: MyExtensionConditionConfig;
5150
}
5251
}
5352
```
5453

55-
This has to be registered in the extension registry, shown below:
54+
The global declaration on the last five lines makes your Condition appear valid for manifests using the type `UmbExtensionManifest`. Also, the Condition Config Type alias should match the alias given when registering the condition below.
55+
56+
The Condition then needs to be registered in the Extension Registry:
5657

5758
```typescript
5859
export const manifest: UmbExtensionManifest = {
@@ -63,10 +64,10 @@ export const manifest: UmbExtensionManifest = {
6364
};
6465
```
6566

66-
Finally, you can make use of the condition in your configuration. See an example of this below:
67+
Finally, you can make use of your condition in any manifests:
6768

6869
```typescript
69-
{
70+
export const manifest: UmbExtensionManifest = {
7071
type: 'workspaceAction',
7172
name: 'example-workspace-action',
7273
alias: 'My.Example.WorkspaceAction',
@@ -83,7 +84,7 @@ Finally, you can make use of the condition in your configuration. See an example
8384
}
8485
```
8586

86-
As can be seen in the code above, we never make use of `match`. We can do this by replacing the timeout with some other check.
87+
As shown in the code above, the configuration property `match` isn't used for our condition. We can do this by replacing the timeout with some other check:
8788

8889
```typescript
8990
// ...

15/umbraco-cms/customizing/extending-overview/extension-types/kind.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ description: A kind extension provides the preset for other extensions to use
88
This page is a work in progress and may undergo further revisions, updates, or amendments. The information contained herein is subject to change without notice.
99
{% endhint %}
1010

11-
## Kind
12-
1311
A kind is matched with a specific type. When another extension uses that type and kind it will inherit the preset manifest of the kind extension.
1412

1513
The registration of Kinds is done in the same manner as the registration of other extensions. But the format of it is different. Let's take a look at an example of how to implement the `Kind registration` for a [**Header App**](../extension-types/header-apps.md) **Button Kind**.
@@ -18,7 +16,7 @@ The registration of Kinds is done in the same manner as the registration of othe
1816

1917
The root properties of this object define the `Kind registration`. Then the manifest property holds the preset for the extension using this kind to be based upon. This object can hold the property values that make sense for the Kind.
2018

21-
```ts
19+
```typescript
2220
...
2321

2422
const manifest: ManifestKind = {
@@ -36,7 +34,7 @@ const manifest: ManifestKind = {
3634

3735
For the kind to be used, it needs to match up with the registration of the extension using it. This happens when the extension uses a type, which matches the value of `matchType` of the Kind. As well the extension has to utilize that kind, by setting the value of `kind` to the value of `matchKind` the Kind.
3836

39-
```ts
37+
```typescript
4038
...
4139

4240
const manifest = {
@@ -52,11 +50,10 @@ const manifest = {
5250

5351
In the following example, a kind is registered. This kind provides a default element for extensions utilizing this kind.
5452

55-
```ts
56-
import { ManifestHeaderAppButtonKind, umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
57-
import { ManifestKind } from '@umbraco-cms/backoffice/extension-api';
53+
```typescript
54+
import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
5855

59-
const manifest: ManifestKind<ManifestHeaderAppButtonKind> = {
56+
const manifest: UmbExtensionManifest = {
6057
type: 'kind',
6158
alias: 'Umb.Kind.MyButtonKind',
6259
matchType: 'headerApp',
@@ -73,7 +70,7 @@ This enables other extensions to use this kind and inherit the manifest properti
7370

7471
In this example a **Header App** is registered without defining an element, this is possible because the registration inherits the elementName from the kind.
7572

76-
```ts
73+
```typescript
7774
import { extensionRegistry } from '@umbraco-cms/extension-registry';
7875

7976
const manifest = {

15/umbraco-commerce/key-concepts/ui-extensions/store-menu-items.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ Here:
6363
To handle requests to this endpoint, you should define a workspace manifest for the given entity type.
6464

6565
```typescript
66-
import { ManifestWorkspace } from '@umbraco-cms/backoffice/extension-registry';
67-
68-
const manifests: ManifestWorkspace[] = [
66+
const manifests: UmbExtensionManifest[] = [
6967
{
7068
type: 'workspace',
7169
kind: 'routable',

0 commit comments

Comments
 (0)