Skip to content

Commit 45593c6

Browse files
committed
Merge branch 'release/16.0'
# Conflicts: # version.json
2 parents 225fed5 + 2b714d3 commit 45593c6

File tree

11 files changed

+43
-9
lines changed

11 files changed

+43
-9
lines changed

src/Umbraco.Web.UI.Client/src/packages/block/block-type/components/input-block-type/input-block-type.element.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ export class UmbInputBlockTypeElement<
116116
// Only pick elements:
117117
docType.isElement &&
118118
// Prevent picking the an already used element type:
119-
this.#filter &&
120-
this.#filter.find((x) => x.contentElementTypeKey === docType.unique) === undefined,
119+
this.#filter?.find((x) => x.contentElementTypeKey === docType.unique) === undefined,
121120
},
122121
value: {
123122
selection: [],

src/Umbraco.Web.UI.Client/src/packages/clipboard/property/value-translator/copy/clipboard-copy-translator-value-resolver.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,14 @@ export class UmbClipboardCopyPropertyValueTranslatorValueResolver extends UmbCon
2424
}
2525

2626
// Create translators
27-
const apiPromises = manifests.map((manifest) => createExtensionApi(this, manifest));
27+
const apiPromises = manifests.map((manifest) =>
28+
createExtensionApi(this, manifest).then((api) => {
29+
if (api) {
30+
(api as any).manifest = manifest;
31+
}
32+
return api;
33+
}),
34+
);
2835
const apis = await Promise.all(apiPromises);
2936

3037
// Translate values

src/Umbraco.Web.UI.Client/src/packages/content/content/controller/merge-content-variant-data.controller.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ export class UmbMergeContentVariantDataController extends UmbControllerBase {
136136
// If api is not to be found, then we can continue using the draftValue as is.
137137
return draftValue;
138138
}
139+
(api as any).manifest = manifest;
139140

140141
let newValue = draftValue;
141142

src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,10 @@ export class UmbEntityActionsBundleElement extends UmbLitElement {
7474
this._firstActionApi = await createExtensionApi(this, this._firstActionManifest, [
7575
{ unique: this.unique, entityType: this.entityType, meta: this._firstActionManifest.meta },
7676
]);
77-
78-
this._firstActionHref = await this._firstActionApi?.getHref();
77+
if (this._firstActionApi) {
78+
(this._firstActionApi as any).manifest = this._firstActionManifest;
79+
this._firstActionHref = await this._firstActionApi.getHref();
80+
}
7981
}
8082

8183
async #onFirstActionClick(event: PointerEvent) {

src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export class UmbCreateEntityAction extends UmbEntityActionBase<MetaEntityActionC
8181

8282
if (!api) throw new Error(`Could not create api for ${manifest.alias}`);
8383

84+
(api as any).manifest = manifest;
8485
this.#singleOptionApi = api;
8586
}
8687
}

src/Umbraco.Web.UI.Client/src/packages/core/picker/search/picker-search-result.element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export class UmbPickerSearchResultElement extends UmbLitElement {
7474
.filter=${(manifest: ManifestPickerSearchResultItem) => manifest.forEntityTypes.includes(item.entityType)}
7575
.elementProps=${{
7676
item,
77-
disabled: !this.pickableFilter(item),
77+
disabled: this.pickableFilter ? !this.pickableFilter(item) : undefined,
7878
}}></umb-extension-with-api-slot>
7979
`;
8080
}

src/Umbraco.Web.UI.Client/src/packages/core/property/property-value-cloner/property-value-clone.controller.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ export class UmbPropertyValueCloneController extends UmbControllerBase {
5050
return incomingProperty;
5151
}
5252

53+
(api as any).manifest = manifest;
54+
5355
let clonedProperty = incomingProperty;
5456

5557
if (api.cloneValue) {
@@ -86,6 +88,8 @@ export class UmbPropertyValueCloneController extends UmbControllerBase {
8688
return incomingProperty;
8789
}
8890

91+
(api as any).manifest = manifest;
92+
8993
if (api.processValues) {
9094
return (
9195
(await api.processValues(incomingProperty, async (properties) => {

src/Umbraco.Web.UI.Client/src/packages/core/property/property-value-preset/property-value-preset-builder.controller.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,18 @@ export class UmbPropertyValuePresetBuilderController<
5454
// Find a preset for this editor alias:
5555
const manifests = umbExtensionsRegistry.getByTypeAndFilter('propertyValuePreset', filter);
5656

57-
const apis = (await Promise.all(manifests.map((x) => createExtensionApi(this, x)))).filter(
58-
(x) => x !== undefined,
59-
) as Array<UmbPropertyValuePreset>;
57+
const apis = (
58+
await Promise.all(
59+
manifests.map((x) =>
60+
createExtensionApi(this, x).then((x) => {
61+
if (x) {
62+
(x as any).manifest = x;
63+
}
64+
return x;
65+
}),
66+
),
67+
)
68+
).filter((x) => x !== undefined) as Array<UmbPropertyValuePreset>;
6069

6170
const result = await this._generatePropertyValues(apis, propertyType);
6271

src/Umbraco.Web.UI.Client/src/packages/core/section/section-default.element.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ export class UmbSectionDefaultElement extends UmbLitElement implements UmbSectio
8383
extensionsWithElement.map(async (extensionController) => {
8484
const api = await createExtensionApi(this, extensionController.manifest);
8585

86+
if (api) {
87+
(api as any).manifest = extensionController.manifest;
88+
}
89+
8690
return {
8791
path:
8892
api?.getPath?.() ||

src/Umbraco.Web.UI.Client/src/packages/core/validation/controllers/validation-path-translation/validation-property-path-translation.controller.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ export class UmbValidationPropertyPathTranslationController extends UmbControlle
5555
return propertyPaths;
5656
}
5757

58+
(api as any).manifest = manifest;
59+
5860
propertyPaths = (await api.translate(propertyPaths, propertyData)) ?? propertyPaths;
5961

6062
return propertyPaths;

src/Umbraco.Web.UI.Client/src/packages/markdown-editor/components/input-markdown-editor/input-markdown.element.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ export class UmbInputMarkdownElement extends UmbFormControlMixin<string, typeof
8787
this.observe(umbExtensionsRegistry.byType('monacoMarkdownEditorAction'), (manifests) => {
8888
manifests.forEach(async (manifest) => {
8989
const api = await createExtensionApi(this, manifest, [this]);
90+
91+
if (api) {
92+
(api as any).manifest = manifest;
93+
}
94+
9095
const action: UmbMarkdownEditorAction = {
9196
id: manifest.alias ?? api.getUnique(),
9297
label: this.localize.string(manifest.meta?.label ?? api.getLabel()),

0 commit comments

Comments
 (0)