Skip to content

Commit d76293b

Browse files
committed
Merge remote-tracking branch 'origin/release/16.0'
2 parents 179caac + 595e4ed commit d76293b

File tree

38 files changed

+1369
-1266
lines changed

38 files changed

+1369
-1266
lines changed

src/Umbraco.Web.UI.Client/package-lock.json

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Umbraco.Web.UI.Client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@
215215
"@tiptap/extension-underline": "2.11.7",
216216
"@tiptap/pm": "2.11.7",
217217
"@tiptap/starter-kit": "2.11.7",
218-
"@umbraco-ui/uui": "1.14.0-rc.2",
218+
"@umbraco-ui/uui": "1.14.0-rc.3",
219219
"@umbraco-ui/uui-css": "1.14.0-rc.2",
220220
"dompurify": "^3.2.5",
221221
"element-internals-polyfill": "^3.0.2",
@@ -288,4 +288,4 @@
288288
"access": "public",
289289
"registry": "https://registry.npmjs.org/"
290290
}
291-
}
291+
}

src/Umbraco.Web.UI.Client/src/apps/backoffice/backoffice.context.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ export class UmbBackofficeContext extends UmbContextBase {
7777
}
7878

7979
public async serverUpgradeCheck() {
80-
const version = await this.observe(this.version).asPromise();
80+
const version = await this.observe(this.version)
81+
.asPromise()
82+
.catch(() => null);
83+
if (!version) return null;
8184
const repository = new UmbSysinfoRepository(this);
8285
return repository.serverUpgradeCheck(version);
8386
}

src/Umbraco.Web.UI.Client/src/packages/block/block-list/components/block-list-entry/block-list-entry.element.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import type {
1616
UmbBlockEditorCustomViewProperties,
1717
} from '@umbraco-cms/backoffice/block-custom-view';
1818
import type { UmbExtensionElementInitializer } from '@umbraco-cms/backoffice/extension-api';
19-
import { UUIBlinkAnimationValue } from '@umbraco-cms/backoffice/external/uui';
19+
import { UUIBlinkAnimationValue, UUIBlinkKeyframes } from '@umbraco-cms/backoffice/external/uui';
2020
import { UMB_PROPERTY_CONTEXT, UMB_PROPERTY_DATASET_CONTEXT } from '@umbraco-cms/backoffice/property';
2121
import { UMB_CLIPBOARD_PROPERTY_CONTEXT } from '@umbraco-cms/backoffice/clipboard';
2222

@@ -481,6 +481,7 @@ export class UmbBlockListEntryElement extends UmbLitElement implements UmbProper
481481
}
482482

483483
static override styles = [
484+
UUIBlinkKeyframes,
484485
css`
485486
:host {
486487
position: relative;

src/Umbraco.Web.UI.Client/src/packages/block/block/context/block-entry.context.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -548,18 +548,27 @@ export abstract class UmbBlockEntryContext<
548548
abstract _gotContentType(contentType: UmbContentTypeModel | undefined): void;
549549

550550
async #observeVariantId() {
551-
if (!this._manager) return;
551+
if (!this._manager) {
552+
this.removeUmbControllerByAlias('observeVariantId');
553+
return;
554+
}
552555
await this.#contentStructurePromise;
553556
if (!this.#contentStructure) {
554557
throw new Error('No contentStructure found');
555558
}
556559

560+
if (!this._manager) {
561+
// The manager maybe got removed while we awaited the promise above.
562+
this.removeUmbControllerByAlias('observeVariantId');
563+
return;
564+
}
565+
557566
// observe variantId:
558567
this.observe(
559568
observeMultiple([
560569
this._manager.variantId,
561-
this.#contentStructure?.ownerContentTypeObservablePart((x) => x?.variesByCulture),
562-
this.#contentStructure?.ownerContentTypeObservablePart((x) => x?.variesBySegment),
570+
this.#contentStructure.ownerContentTypeObservablePart((x) => x?.variesByCulture),
571+
this.#contentStructure.ownerContentTypeObservablePart((x) => x?.variesBySegment),
563572
]),
564573
([variantId, variesByCulture, variesBySegment]) => {
565574
if (!variantId || variesByCulture === undefined || variesBySegment === undefined) return;

src/Umbraco.Web.UI.Client/src/packages/content/content-type/structure/content-type-structure-manager.class.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export class UmbContentTypeStructureManager<
182182
return { data: this.getOwnerContentType(), asObservable: () => this.ownerContentType };
183183
}
184184
await this.#initRepository;
185-
this.#clear();
185+
this.clear();
186186
this.#ownerContentTypeUnique = unique;
187187
if (!unique) {
188188
this.#initRejection?.(`Content Type structure manager could not load: ${unique}`);
@@ -199,7 +199,7 @@ export class UmbContentTypeStructureManager<
199199

200200
public async createScaffold(preset?: Partial<T>): Promise<UmbRepositoryResponse<T>> {
201201
await this.#initRepository;
202-
this.#clear();
202+
this.clear();
203203

204204
const repsonse = await this.#repository!.createScaffold(preset);
205205
const { data } = repsonse;
@@ -827,7 +827,7 @@ export class UmbContentTypeStructureManager<
827827
.filter(UmbFilterDuplicateStrings);
828828
}
829829

830-
#clear() {
830+
public clear() {
831831
this.#contentTypeObservers.forEach((observer) => observer.destroy());
832832
this.#contentTypeObservers = [];
833833
this.#repoManager?.clear();

src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor.element.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -227,16 +227,16 @@ export class UmbContentTypeDesignEditorElement extends UmbLitElement implements
227227
this.#currentTabComponent = undefined;
228228
},
229229
});
230+
} else {
231+
routes.push({
232+
path: `**`,
233+
component: async () => (await import('@umbraco-cms/backoffice/router')).UmbRouteNotFoundElement,
234+
setup: () => {
235+
this.#currentTabComponent = undefined;
236+
},
237+
});
230238
}
231239

232-
routes.push({
233-
path: `**`,
234-
component: async () => (await import('@umbraco-cms/backoffice/router')).UmbRouteNotFoundElement,
235-
setup: () => {
236-
this.#currentTabComponent = undefined;
237-
},
238-
});
239-
240240
this._routes = routes;
241241

242242
// If we have a active tab, then we want to make sure its up to date with latest tab id, as an already active route is not getting its setup method triggered again [NL]

src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-detail-workspace-base.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,7 @@ export abstract class UmbContentDetailWorkspaceContextBase<
982982

983983
override resetState() {
984984
super.resetState();
985+
this.structure.clear();
985986
this.readOnlyGuard.clearRules();
986987
this.propertyViewGuard.clearRules();
987988
this.propertyWriteGuard.clearRules();

src/Umbraco.Web.UI.Client/src/packages/content/property-type/workspace/property-type-workspace.context.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ export class UmbPropertyTypeWorkspaceContext
7272
this.#contentTypeContext = context;
7373
})
7474
.skipHost()
75-
.asPromise({ preventTimeout: true });
75+
.asPromise({ preventTimeout: true })
76+
.catch(() => {
77+
// If the context is not available, we can assume that the context is not available.
78+
this.#contentTypeContext = undefined;
79+
});
7680

7781
this.routes.setRoutes([
7882
{

src/Umbraco.Web.UI.Client/src/packages/core/collection/collection-view.manager.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ export class UmbCollectionViewManager extends UmbControllerBase {
101101
this.setCurrentView(fallbackView);
102102
},
103103
});
104-
}
105104

106-
routes.push({
107-
path: `**`,
108-
component: async () => (await import('@umbraco-cms/backoffice/router')).UmbRouteNotFoundElement,
109-
});
105+
routes.push({
106+
path: `**`,
107+
component: async () => (await import('@umbraco-cms/backoffice/router')).UmbRouteNotFoundElement,
108+
});
109+
}
110110
}
111111

112112
this.#routes.setValue(routes);

0 commit comments

Comments
 (0)