Skip to content

Commit c0b8d98

Browse files
authored
Merge branch 'main' into v14/feature/property-type-workspace
2 parents f2c9319 + abc40e6 commit c0b8d98

File tree

133 files changed

+370
-271
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+370
-271
lines changed

package-lock.json

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

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@
142142
"./src/packages/tags",
143143
"./src/packages/templating",
144144
"./src/packages/property-editors",
145-
"./src/packages/media"
145+
"./src/packages/media",
146+
"./src/packages/user"
146147
],
147148
"scripts": {
148149
"backoffice:test:e2e": "npx playwright test",

src/external/router-slot/router-slot.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class RouterSlot<D = any, P = any> extends HTMLElement implements IRouter
4848
/**
4949
* Method to cancel navigation if changed.
5050
*/
51-
private _cancelNavigation ?:() => void;
51+
private _cancelNavigation?: () => void;
5252

5353
/**
5454
* Listeners on the router.
@@ -208,7 +208,7 @@ export class RouterSlot<D = any, P = any> extends HTMLElement implements IRouter
208208
if (this.isConnected) {
209209
const newMatch = this.getRouteMatch();
210210
// Check if this match matches the current match (aka. If the path has changed), if so we should navigate. [NL]
211-
if(newMatch) {
211+
if (newMatch) {
212212
navigate = shouldNavigate(this.match, newMatch);
213213
}
214214
}
@@ -318,7 +318,6 @@ export class RouterSlot<D = any, P = any> extends HTMLElement implements IRouter
318318
* Returns true if a navigation was made to a new page.
319319
*/
320320
protected async renderPath(path: string | PathFragment): Promise<boolean> {
321-
322321
// Notice: Since this is never called from any other place than one higher in this file(when writing this...), we could just retrieve the path and find a match by using this.getRouteMatch() [NL]
323322
// Find the corresponding route.
324323
const match = matchRoutes(this._routes, path);
@@ -336,7 +335,6 @@ export class RouterSlot<D = any, P = any> extends HTMLElement implements IRouter
336335
// Only change route if its a new route.
337336
const navigate = shouldNavigate(this.match, match);
338337
if (navigate) {
339-
340338
// If another navigation is still begin resolved in this very moment, then we need to cancel that so it does not end up overriding this new navigation.[NL]
341339
this._cancelNavigation?.();
342340
// Listen for another push state event. If another push state event happens
@@ -412,7 +410,7 @@ export class RouterSlot<D = any, P = any> extends HTMLElement implements IRouter
412410
// We have some routes that share the same component instance, those should not be removed and re-appended [NL]
413411
const isTheSameComponent = this.firstChild === page;
414412

415-
if(!isTheSameComponent) {
413+
if (!isTheSameComponent) {
416414
// Remove the old page by clearing the slot
417415
this.clearChildren();
418416
}
@@ -421,7 +419,7 @@ export class RouterSlot<D = any, P = any> extends HTMLElement implements IRouter
421419
// We do this to ensure that we can find the match in the connectedCallback of the page.
422420
this._routeMatch = match;
423421

424-
if(!isTheSameComponent) {
422+
if (!isTheSameComponent) {
425423
if (page) {
426424
// Append the new page
427425
this.appendChild(page);
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import type UmbCurrentUserContext from './current-user.context.js';
2+
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
3+
4+
export const UMB_CURRENT_USER_CONTEXT = new UmbContextToken<UmbCurrentUserContext>('UmbCurrentUserContext');

src/packages/user/current-user/current-user.context.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { UmbCurrentUserModel } from './types.js';
22
import { UmbCurrentUserRepository } from './repository/index.js';
3-
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
3+
import { UMB_CURRENT_USER_CONTEXT } from './current-user.context.token.js';
44
import { UmbContextBase } from '@umbraco-cms/backoffice/class-api';
55
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
66
import { firstValueFrom } from '@umbraco-cms/backoffice/external/rxjs';
@@ -116,5 +116,3 @@ export class UmbCurrentUserContext extends UmbContextBase<UmbCurrentUserContext>
116116
}
117117

118118
export default UmbCurrentUserContext;
119-
120-
export const UMB_CURRENT_USER_CONTEXT = new UmbContextToken<UmbCurrentUserContext>('UmbCurrentUserContext');

src/packages/user/current-user/external-login/configure-external-login-providers-action.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ export class UmbConfigureExternalLoginProvidersApi<ArgsMetaType = never>
1616
await modalManagerContext.open(this, UMB_CURRENT_USER_EXTERNAL_LOGIN_MODAL).onSubmit();
1717
}
1818
}
19+
20+
export { UmbConfigureExternalLoginProvidersApi as api };

src/packages/user/current-user/external-login/manifests.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { UmbConfigureExternalLoginProvidersApi } from './configure-external-login-providers-action.js';
21
import type { ManifestCurrentUserActionDefaultKind, ManifestModal } from '@umbraco-cms/backoffice/extension-registry';
32

43
export const modals: Array<ManifestModal> = [
@@ -17,7 +16,7 @@ export const userProfileApps: Array<ManifestCurrentUserActionDefaultKind> = [
1716
alias: 'Umb.CurrentUser.App.ExternalLoginProviders',
1817
name: 'External Login Providers Current User App',
1918
weight: 700,
20-
api: UmbConfigureExternalLoginProvidersApi,
19+
api: () => import('./configure-external-login-providers-action.js'),
2120
meta: {
2221
label: '#defaultdialogs_externalLoginProviders',
2322
icon: 'icon-lock',

src/packages/user/current-user/history/current-user-history-user-profile-app.element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { UmbCurrentUserHistoryItem, UmbCurrentUserHistoryStore } from './current-user-history.store.js';
2-
import { UMB_CURRENT_USER_HISTORY_STORE_CONTEXT } from './current-user-history.store.js';
2+
import { UMB_CURRENT_USER_HISTORY_STORE_CONTEXT } from './current-user-history.store.token.js';
33
import { html, customElement, state, map, ifDefined, css } from '@umbraco-cms/backoffice/external/lit';
44
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
55
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import type UmbCurrentUserHistoryStore from './current-user-history.store.js';
2+
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
3+
4+
export const UMB_CURRENT_USER_HISTORY_STORE_CONTEXT = new UmbContextToken<UmbCurrentUserHistoryStore>(
5+
'UmbCurrentUserHistoryStore',
6+
);

src/packages/user/current-user/history/current-user-history.store.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
1+
import { UMB_CURRENT_USER_HISTORY_STORE_CONTEXT } from './current-user-history.store.token.js';
22
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
33
import { UmbId } from '@umbraco-cms/backoffice/id';
44
import { UmbArrayState } from '@umbraco-cms/backoffice/observable-api';
@@ -61,9 +61,5 @@ export class UmbCurrentUserHistoryStore extends UmbStoreBase<UmbCurrentUserHisto
6161
}
6262
}
6363

64-
export const UMB_CURRENT_USER_HISTORY_STORE_CONTEXT = new UmbContextToken<UmbCurrentUserHistoryStore>(
65-
'UmbCurrentUserHistoryStore',
66-
);
67-
6864
// Default export for the globalContext manifest:
6965
export default UmbCurrentUserHistoryStore;

0 commit comments

Comments
 (0)