@umbraco-cms/backoffice 16.0.0-rc3 → 16.0.0-rc4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cms/apps/backoffice/backoffice.context.js +5 -1
- package/dist-cms/apps/backoffice/components/backoffice-main.element.js +3 -1
- package/dist-cms/css/uui-css.css +438 -108
- package/dist-cms/custom-elements.json +20 -15
- package/dist-cms/external/uui/index.js +370 -336
- package/dist-cms/libs/context-api/consume/context-consumer.js +1 -2
- package/dist-cms/libs/controller-api/controller-host.mixin.js +2 -2
- package/dist-cms/packages/block/block/context/block-entry.context.js +10 -3
- package/dist-cms/packages/block/block/workspace/views/edit/block-workspace-view-edit.element.js +1 -0
- package/dist-cms/packages/block/block-list/components/block-list-entry/block-list-entry.element.js +2 -1
- package/dist-cms/packages/content/content/components/property-type-based-property/index.d.ts +2 -0
- package/dist-cms/packages/content/content/components/property-type-based-property/index.js +2 -0
- package/dist-cms/packages/content/content/components/property-type-based-property/property-type-based-property.context-token.d.ts +8 -0
- package/dist-cms/packages/content/content/components/property-type-based-property/property-type-based-property.context-token.js +7 -0
- package/dist-cms/packages/content/content/{content-property.context.d.ts → components/property-type-based-property/property-type-based-property.context.d.ts} +6 -1
- package/dist-cms/packages/content/content/components/property-type-based-property/property-type-based-property.context.js +19 -0
- package/dist-cms/packages/content/content/components/property-type-based-property/property-type-based-property.element.d.ts +1 -1
- package/dist-cms/packages/content/content/components/property-type-based-property/property-type-based-property.element.js +8 -7
- package/dist-cms/packages/content/content/global-components/content-workspace-property.element.d.ts +26 -0
- package/dist-cms/packages/content/content/global-components/content-workspace-property.element.js +104 -0
- package/dist-cms/packages/content/content/global-components/index.d.ts +1 -0
- package/dist-cms/packages/content/content/global-components/index.js +1 -0
- package/dist-cms/packages/content/content/index.d.ts +1 -2
- package/dist-cms/packages/content/content/index.js +1 -2
- package/dist-cms/packages/content/content/workspace/content-detail-workspace-base.js +2 -1
- package/dist-cms/packages/content/content/workspace/views/edit/content-editor-properties.element.d.ts +1 -3
- package/dist-cms/packages/content/content/workspace/views/edit/content-editor-properties.element.js +8 -48
- package/dist-cms/packages/content/content/workspace/views/edit/content-editor.element.js +1 -0
- package/dist-cms/packages/content/content-type/structure/content-type-property-structure-helper.class.d.ts +1 -0
- package/dist-cms/packages/content/content-type/structure/content-type-property-structure-helper.class.js +1 -0
- package/dist-cms/packages/content/content-type/structure/content-type-structure-manager.class.d.ts +1 -0
- package/dist-cms/packages/content/content-type/structure/content-type-structure-manager.class.js +3 -3
- package/dist-cms/packages/content/content-type/workspace/views/design/content-type-design-editor.element.js +11 -7
- package/dist-cms/packages/content/property-type/workspace/property-type-workspace.context.js +5 -1
- package/dist-cms/packages/core/collection/collection-view.manager.js +4 -4
- package/dist-cms/packages/core/components/input-number-range/input-number-range.element.d.ts +4 -1
- package/dist-cms/packages/core/components/input-number-range/input-number-range.element.js +27 -3
- package/dist-cms/packages/core/components/input-with-alias/input-with-alias.element.js +0 -2
- package/dist-cms/packages/core/repository/detail/detail-repository-base.js +6 -7
- package/dist-cms/packages/core/repository/item/item-repository-base.d.ts +1 -1
- package/dist-cms/packages/core/repository/item/item-repository-base.js +25 -9
- package/dist-cms/packages/core/repository/item/item-repository.interface.d.ts +1 -1
- package/dist-cms/packages/core/router/router-slot/model.d.ts +1 -0
- package/dist-cms/packages/core/router/router-slot/router-slot.d.ts +1 -0
- package/dist-cms/packages/core/router/router-slot/router-slot.js +30 -0
- package/dist-cms/packages/core/tree/data/tree-repository-base.d.ts +5 -1
- package/dist-cms/packages/core/tree/data/tree-repository-base.js +27 -13
- package/dist-cms/packages/core/tree/tree-item/tree-item.element.js +1 -1
- package/dist-cms/packages/core/validation/controllers/validation.controller.js +1 -1
- package/dist-cms/packages/core/workspace/components/workspace-action/common/save/save.action.js +3 -1
- package/dist-cms/packages/core/workspace/components/workspace-split-view/workspace-split-view-variant-selector.element.js +2 -2
- package/dist-cms/packages/core/workspace/controllers/workspace-is-new-redirect.controller.d.ts +7 -0
- package/dist-cms/packages/core/workspace/controllers/workspace-is-new-redirect.controller.js +31 -10
- package/dist-cms/packages/core/workspace/controllers/workspace-route-manager.controller.js +5 -5
- package/dist-cms/packages/core/workspace/entity-detail/entity-detail-workspace-base.js +1 -1
- package/dist-cms/packages/core/workspace/submittable/submittable-workspace-context-base.d.ts +1 -0
- package/dist-cms/packages/core/workspace/submittable/submittable-workspace-context-base.js +10 -0
- package/dist-cms/packages/data-type/collection/repository/data-type-collection.repository.js +6 -1
- package/dist-cms/packages/data-type/repository/detail/data-type-detail.repository.js +6 -1
- package/dist-cms/packages/documents/document-blueprints/workspace/document-blueprint-workspace-editor.element.js +5 -4
- package/dist-cms/packages/documents/documents/publishing/workspace-context/document-publishing.workspace-context.js +12 -2
- package/dist-cms/packages/documents/documents/types.d.ts +1 -0
- package/dist-cms/packages/documents/documents/url/index.d.ts +1 -0
- package/dist-cms/packages/documents/documents/url/index.js +1 -0
- package/dist-cms/packages/documents/documents/url/types.d.ts +1 -0
- package/dist-cms/packages/documents/documents/url/types.js +1 -0
- package/dist-cms/packages/documents/documents/user-permissions/document/conditions/document-user-permission.condition.js +3 -1
- package/dist-cms/packages/documents/documents/workspace/actions/save.action.js +4 -2
- package/dist-cms/packages/documents/documents/workspace/document-workspace-editor.element.js +13 -7
- package/dist-cms/packages/media/media/dashboard/media-dashboard.element.js +1 -0
- package/dist-cms/packages/media/media/workspace/media-workspace-editor.element.js +1 -0
- package/dist-cms/packages/members/member/repository/member-repository-base.d.ts +8 -8
- package/dist-cms/packages/members/member/repository/member-repository-base.js +13 -12
- package/dist-cms/packages/members/member/workspace/member/member-workspace-editor.element.js +1 -0
- package/dist-cms/packages/packages/package-section/views/created/created-packages-section-view.element.js +1 -0
- package/dist-cms/packages/segment/package.json +8 -0
- package/dist-cms/packages/settings/package.json +8 -0
- package/dist-cms/packages/settings/vite.config.d.ts +2 -0
- package/dist-cms/packages/settings/vite.config.js +11 -0
- package/dist-cms/packages/translation/package.json +8 -0
- package/dist-cms/packages/user/current-user/current-user.context.js +4 -1
- package/dist-cms/packages/user/current-user/repository/current-user.repository.d.ts +2 -2
- package/dist-cms/packages/user/current-user/repository/current-user.repository.js +8 -5
- package/dist-cms/packages/user/user/repository/user-repository-base.d.ts +7 -7
- package/dist-cms/packages/user/user/repository/user-repository-base.js +13 -12
- package/dist-cms/packages/user/user-group/collection/repository/user-group-collection.repository.js +4 -1
- package/dist-cms/packages/webhook/webhook-event/repository/webhook-event.repository.d.ts +4 -0
- package/dist-cms/packages/webhook/webhook-event/repository/webhook-event.repository.js +7 -1
- package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
- package/dist-cms/umbraco-package.json +1 -1
- package/dist-cms/vscode-html-custom-data.json +14 -8
- package/examples/modal-routed/dashboard.element.ts +1 -0
- package/examples/modal-routed/modal/example-modal.element.ts +1 -0
- package/examples/validation-context/validation-context-dashboard.ts +12 -12
- package/package.json +7 -7
- package/dist-cms/packages/content/content/content-property.context-token.d.ts +0 -3
- package/dist-cms/packages/content/content/content-property.context-token.js +0 -2
- package/dist-cms/packages/content/content/content-property.context.js +0 -14
- package/dist-cms/packages/content/content/workspace/views/edit/content-editor-property.element.d.ts +0 -21
- package/dist-cms/packages/content/content/workspace/views/edit/content-editor-property.element.js +0 -63
|
@@ -12,6 +12,7 @@ export type * from './modals/types.js';
|
|
|
12
12
|
export type * from './publishing/types.js';
|
|
13
13
|
export type * from './recycle-bin/types.js';
|
|
14
14
|
export type * from './tree/types.js';
|
|
15
|
+
export type * from './url/types.js';
|
|
15
16
|
export type * from './user-permissions/types.js';
|
|
16
17
|
export type * from './workspace/types.js';
|
|
17
18
|
export interface UmbDocumentDetailModel extends UmbContentDetailModel {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from './repository/types.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -19,8 +19,10 @@ export class UmbDocumentUserPermissionCondition extends UmbConditionBase {
|
|
|
19
19
|
}, 'umbUserPermissionConditionObserver');
|
|
20
20
|
});
|
|
21
21
|
this.consumeContext(UMB_ENTITY_CONTEXT, (context) => {
|
|
22
|
-
if (!context)
|
|
22
|
+
if (!context) {
|
|
23
|
+
this.removeUmbControllerByAlias('umbUserPermissionEntityContextObserver');
|
|
23
24
|
return;
|
|
25
|
+
}
|
|
24
26
|
this.observe(observeMultiple([context.entityType, context.unique]), ([entityType, unique]) => {
|
|
25
27
|
this.#entityType = entityType;
|
|
26
28
|
this.#unique = unique;
|
|
@@ -7,9 +7,11 @@ export class UmbDocumentSaveWorkspaceAction extends UmbSaveWorkspaceAction {
|
|
|
7
7
|
}
|
|
8
8
|
async hasAdditionalOptions() {
|
|
9
9
|
await this._retrieveWorkspaceContext;
|
|
10
|
-
const variantOptions = await this.observe(this._workspaceContext.variantOptions)
|
|
10
|
+
const variantOptions = await this.observe(this._workspaceContext.variantOptions)
|
|
11
|
+
.asPromise()
|
|
12
|
+
.catch(() => undefined);
|
|
11
13
|
const cultureVariantOptions = variantOptions?.filter((option) => option.culture);
|
|
12
|
-
return cultureVariantOptions?.length > 1;
|
|
14
|
+
return cultureVariantOptions ? cultureVariantOptions?.length > 1 : false;
|
|
13
15
|
}
|
|
14
16
|
_gotWorkspaceContext() {
|
|
15
17
|
super._gotWorkspaceContext();
|
package/dist-cms/packages/documents/documents/workspace/document-workspace-editor.element.js
CHANGED
|
@@ -48,8 +48,10 @@ let UmbDocumentWorkspaceEditorElement = class UmbDocumentWorkspaceEditorElement
|
|
|
48
48
|
this.#workspaceContext?.splitView.setActiveVariant(index, culture, segment);
|
|
49
49
|
}
|
|
50
50
|
#generateRoutes() {
|
|
51
|
-
if (!this.#variants || !this.#appCulture)
|
|
51
|
+
if (!this.#variants || !this.#appCulture) {
|
|
52
|
+
this._routes = [];
|
|
52
53
|
return;
|
|
54
|
+
}
|
|
53
55
|
// Generate split view routes for all available routes
|
|
54
56
|
const routes = [];
|
|
55
57
|
// Split view routes:
|
|
@@ -86,10 +88,14 @@ let UmbDocumentWorkspaceEditorElement = class UmbDocumentWorkspaceEditorElement
|
|
|
86
88
|
// Using first single view as the default route for now (hence the math below):
|
|
87
89
|
routes.push({
|
|
88
90
|
path: '',
|
|
89
|
-
|
|
91
|
+
pathMatch: 'full',
|
|
92
|
+
resolve: async () => {
|
|
93
|
+
if (!this.#workspaceContext) {
|
|
94
|
+
throw new Error('Workspace context is not available when resolving the default route.');
|
|
95
|
+
}
|
|
90
96
|
const route = routes.find((route) => route.path === this.#appCulture);
|
|
91
97
|
if (!route) {
|
|
92
|
-
const firstVariantPath = routes.find((route) => route.path === this.#variants?.[0]
|
|
98
|
+
const firstVariantPath = routes.find((route) => route.path === this.#variants?.[0]?.unique)?.path;
|
|
93
99
|
if (firstVariantPath) {
|
|
94
100
|
history.replaceState({}, '', `${this.#workspaceRoute}/${firstVariantPath}`);
|
|
95
101
|
return;
|
|
@@ -102,11 +108,11 @@ let UmbDocumentWorkspaceEditorElement = class UmbDocumentWorkspaceEditorElement
|
|
|
102
108
|
history.replaceState({}, '', `${this.#workspaceRoute}/${route?.path}`);
|
|
103
109
|
},
|
|
104
110
|
});
|
|
111
|
+
routes.push({
|
|
112
|
+
path: `**`,
|
|
113
|
+
component: async () => (await import('@umbraco-cms/backoffice/router')).UmbRouteNotFoundElement,
|
|
114
|
+
});
|
|
105
115
|
}
|
|
106
|
-
routes.push({
|
|
107
|
-
path: `**`,
|
|
108
|
-
component: async () => (await import('@umbraco-cms/backoffice/router')).UmbRouteNotFoundElement,
|
|
109
|
-
});
|
|
110
116
|
this._routes = routes;
|
|
111
117
|
}
|
|
112
118
|
render() {
|
|
@@ -74,6 +74,7 @@ let UmbMediaWorkspaceEditorElement = class UmbMediaWorkspaceEditorElement extend
|
|
|
74
74
|
// Using first single view as the default route for now (hence the math below):
|
|
75
75
|
routes.push({
|
|
76
76
|
path: '',
|
|
77
|
+
pathMatch: 'full',
|
|
77
78
|
redirectTo: routes[variants.length * variants.length]?.path,
|
|
78
79
|
});
|
|
79
80
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import type { UmbNotificationContext } from '@umbraco-cms/backoffice/notification';
|
|
1
|
+
import { UMB_MEMBER_ITEM_STORE_CONTEXT } from '../item/repository/member-item.store.context-token.js';
|
|
2
|
+
import { UMB_MEMBER_DETAIL_STORE_CONTEXT } from './detail/member-detail.store.context-token.js';
|
|
3
|
+
import { UMB_NOTIFICATION_CONTEXT } from '@umbraco-cms/backoffice/notification';
|
|
5
4
|
import { UmbRepositoryBase } from '@umbraco-cms/backoffice/repository';
|
|
5
|
+
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
|
6
6
|
export declare abstract class UmbMemberRepositoryBase extends UmbRepositoryBase {
|
|
7
|
-
protected init: Promise<[UmbMemberDetailStore | undefined, UmbMemberItemStore | undefined, UmbNotificationContext | undefined]>;
|
|
8
|
-
protected detailStore?:
|
|
9
|
-
protected itemStore?:
|
|
10
|
-
protected notificationContext?:
|
|
7
|
+
protected init: Promise<[import("./detail/member-detail.store.js").UmbMemberDetailStore | undefined, import("../item/repository/member-item.store.js").UmbMemberItemStore | undefined, import("@umbraco-cms/backoffice/notification").UmbNotificationContext | undefined]>;
|
|
8
|
+
protected detailStore?: typeof UMB_MEMBER_DETAIL_STORE_CONTEXT.TYPE;
|
|
9
|
+
protected itemStore?: typeof UMB_MEMBER_ITEM_STORE_CONTEXT.TYPE;
|
|
10
|
+
protected notificationContext?: typeof UMB_NOTIFICATION_CONTEXT.TYPE;
|
|
11
11
|
constructor(host: UmbControllerHost);
|
|
12
12
|
}
|
|
@@ -7,20 +7,21 @@ export class UmbMemberRepositoryBase extends UmbRepositoryBase {
|
|
|
7
7
|
super(host);
|
|
8
8
|
this.init = Promise.all([
|
|
9
9
|
this.consumeContext(UMB_MEMBER_DETAIL_STORE_CONTEXT, (instance) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
10
|
+
this.detailStore = instance;
|
|
11
|
+
})
|
|
12
|
+
.asPromise({ preventTimeout: true })
|
|
13
|
+
// Ignore the error, we can assume that the flow was stopped (asPromise failed), but it does not mean that the consumption was not successful.
|
|
14
|
+
.catch(() => undefined),
|
|
14
15
|
this.consumeContext(UMB_MEMBER_ITEM_STORE_CONTEXT, (instance) => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
16
|
+
this.itemStore = instance;
|
|
17
|
+
})
|
|
18
|
+
.asPromise({ preventTimeout: true })
|
|
19
|
+
.catch(() => undefined),
|
|
19
20
|
this.consumeContext(UMB_NOTIFICATION_CONTEXT, (instance) => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
21
|
+
this.notificationContext = instance;
|
|
22
|
+
})
|
|
23
|
+
.asPromise({ preventTimeout: true })
|
|
24
|
+
.catch(() => undefined),
|
|
24
25
|
]);
|
|
25
26
|
}
|
|
26
27
|
}
|
package/dist-cms/packages/members/member/workspace/member/member-workspace-editor.element.js
CHANGED
|
@@ -75,6 +75,7 @@ let UmbMemberWorkspaceEditorElement = class UmbMemberWorkspaceEditorElement exte
|
|
|
75
75
|
// Using first single view as the default route for now (hence the math below):
|
|
76
76
|
routes.push({
|
|
77
77
|
path: '',
|
|
78
|
+
pathMatch: 'full',
|
|
78
79
|
redirectTo: routes[options.length * options.length]?.path,
|
|
79
80
|
});
|
|
80
81
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import { rmSync } from 'fs';
|
|
3
|
+
import { getDefaultConfig } from '../../vite-config-base';
|
|
4
|
+
const dist = '../../../dist-cms/packages/settings';
|
|
5
|
+
// delete the unbundled dist folder
|
|
6
|
+
rmSync(dist, { recursive: true, force: true });
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
...getDefaultConfig({
|
|
9
|
+
dist,
|
|
10
|
+
}),
|
|
11
|
+
});
|
|
@@ -49,7 +49,10 @@ export class UmbCurrentUserContext extends UmbContextBase {
|
|
|
49
49
|
if (asObservable) {
|
|
50
50
|
await this.observe(asObservable(), (currentUser) => {
|
|
51
51
|
this.#currentUser?.setValue(currentUser);
|
|
52
|
-
})
|
|
52
|
+
})
|
|
53
|
+
.asPromise()
|
|
54
|
+
// Ignore the error, we can assume that the flow was stopped (asPromise failed), but it does not mean that the consumption was not successful.
|
|
55
|
+
.catch(() => undefined);
|
|
53
56
|
}
|
|
54
57
|
}
|
|
55
58
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
|
2
2
|
import { UmbRepositoryBase } from '@umbraco-cms/backoffice/repository';
|
|
3
|
-
import
|
|
3
|
+
import { UMB_NOTIFICATION_CONTEXT } from '@umbraco-cms/backoffice/notification';
|
|
4
4
|
/**
|
|
5
5
|
* A repository for the current user
|
|
6
6
|
* @class UmbCurrentUserRepository
|
|
@@ -8,7 +8,7 @@ import type { UmbNotificationContext } from '@umbraco-cms/backoffice/notificatio
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class UmbCurrentUserRepository extends UmbRepositoryBase {
|
|
10
10
|
#private;
|
|
11
|
-
protected notificationContext?:
|
|
11
|
+
protected notificationContext?: typeof UMB_NOTIFICATION_CONTEXT.TYPE;
|
|
12
12
|
constructor(host: UmbControllerHost);
|
|
13
13
|
/**
|
|
14
14
|
* Request the current user
|
|
@@ -18,12 +18,15 @@ export class UmbCurrentUserRepository extends UmbRepositoryBase {
|
|
|
18
18
|
if (instance) {
|
|
19
19
|
this.#currentUserStore = instance;
|
|
20
20
|
}
|
|
21
|
-
})
|
|
21
|
+
})
|
|
22
|
+
.asPromise({ preventTimeout: true })
|
|
23
|
+
// Ignore the error, we can assume that the flow was stopped (asPromise failed), but it does not mean that the consumption was not successful.
|
|
24
|
+
.catch(() => undefined),
|
|
22
25
|
this.consumeContext(UMB_NOTIFICATION_CONTEXT, (instance) => {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
26
|
+
this.notificationContext = instance;
|
|
27
|
+
})
|
|
28
|
+
.asPromise({ preventTimeout: true })
|
|
29
|
+
.catch(() => undefined),
|
|
27
30
|
]);
|
|
28
31
|
}
|
|
29
32
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { UMB_USER_DETAIL_STORE_CONTEXT } from './detail/user-detail.store.token.js';
|
|
2
|
+
import { UMB_USER_ITEM_STORE_CONTEXT } from './item/user-item.store.token.js';
|
|
3
3
|
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
|
4
|
-
import
|
|
4
|
+
import { UMB_NOTIFICATION_CONTEXT } from '@umbraco-cms/backoffice/notification';
|
|
5
5
|
import { UmbRepositoryBase } from '@umbraco-cms/backoffice/repository';
|
|
6
6
|
export declare abstract class UmbUserRepositoryBase extends UmbRepositoryBase {
|
|
7
|
-
protected init: Promise<[UmbUserDetailStore | undefined, UmbUserItemStore | undefined, UmbNotificationContext | undefined]>;
|
|
8
|
-
protected detailStore?:
|
|
9
|
-
protected itemStore?:
|
|
10
|
-
protected notificationContext?:
|
|
7
|
+
protected init: Promise<[import("./index.js").UmbUserDetailStore | undefined, import("./item/user-item.store.js").UmbUserItemStore | undefined, import("@umbraco-cms/backoffice/notification").UmbNotificationContext | undefined]>;
|
|
8
|
+
protected detailStore?: typeof UMB_USER_DETAIL_STORE_CONTEXT.TYPE;
|
|
9
|
+
protected itemStore?: typeof UMB_USER_ITEM_STORE_CONTEXT.TYPE;
|
|
10
|
+
protected notificationContext?: typeof UMB_NOTIFICATION_CONTEXT.TYPE;
|
|
11
11
|
constructor(host: UmbControllerHost);
|
|
12
12
|
}
|
|
@@ -7,20 +7,21 @@ export class UmbUserRepositoryBase extends UmbRepositoryBase {
|
|
|
7
7
|
super(host);
|
|
8
8
|
this.init = Promise.all([
|
|
9
9
|
this.consumeContext(UMB_USER_DETAIL_STORE_CONTEXT, (instance) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
10
|
+
this.detailStore = instance;
|
|
11
|
+
})
|
|
12
|
+
.asPromise({ preventTimeout: true })
|
|
13
|
+
// Ignore the error, we can assume that the flow was stopped (asPromise failed), but it does not mean that the consumption was not successful.
|
|
14
|
+
.catch(() => undefined),
|
|
14
15
|
this.consumeContext(UMB_USER_ITEM_STORE_CONTEXT, (instance) => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
16
|
+
this.itemStore = instance;
|
|
17
|
+
})
|
|
18
|
+
.asPromise({ preventTimeout: true })
|
|
19
|
+
.catch(() => undefined),
|
|
19
20
|
this.consumeContext(UMB_NOTIFICATION_CONTEXT, (instance) => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
21
|
+
this.notificationContext = instance;
|
|
22
|
+
})
|
|
23
|
+
.asPromise({ preventTimeout: true })
|
|
24
|
+
.catch(() => undefined),
|
|
24
25
|
]);
|
|
25
26
|
}
|
|
26
27
|
}
|
package/dist-cms/packages/user/user-group/collection/repository/user-group-collection.repository.js
CHANGED
|
@@ -10,7 +10,10 @@ export class UmbUserGroupCollectionRepository extends UmbControllerBase {
|
|
|
10
10
|
this.#collectionSource = new UmbUserGroupCollectionServerDataSource(this._host);
|
|
11
11
|
this.#init = this.consumeContext(UMB_USER_GROUP_DETAIL_STORE_CONTEXT, (instance) => {
|
|
12
12
|
this.#detailStore = instance;
|
|
13
|
-
})
|
|
13
|
+
})
|
|
14
|
+
.asPromise({ preventTimeout: true })
|
|
15
|
+
// Ignore the error, we can assume that the flow was stopped (asPromise failed), but it does not mean that the consumption was not successful.
|
|
16
|
+
.catch(() => undefined);
|
|
14
17
|
}
|
|
15
18
|
async requestCollection(filter = { skip: 0, take: 100 }) {
|
|
16
19
|
await this.#init;
|
|
@@ -5,6 +5,10 @@ export declare class UmbWebhookEventRepository extends UmbRepositoryBase impleme
|
|
|
5
5
|
#private;
|
|
6
6
|
constructor(host: UmbControllerHost);
|
|
7
7
|
requestEvents(): Promise<{
|
|
8
|
+
data?: undefined;
|
|
9
|
+
error?: undefined;
|
|
10
|
+
asObservable?: undefined;
|
|
11
|
+
} | {
|
|
8
12
|
data: {
|
|
9
13
|
items: {
|
|
10
14
|
eventName: string;
|
|
@@ -12,11 +12,17 @@ export class UmbWebhookEventRepository extends UmbRepositoryBase {
|
|
|
12
12
|
if (instance) {
|
|
13
13
|
this.#store = instance;
|
|
14
14
|
}
|
|
15
|
-
})
|
|
15
|
+
})
|
|
16
|
+
.asPromise({ preventTimeout: true })
|
|
17
|
+
// Ignore the error, we can assume that the flow was stopped (asPromise failed), but it does not mean that the consumption was not successful.
|
|
18
|
+
.catch(() => undefined);
|
|
16
19
|
}
|
|
17
20
|
async requestEvents() {
|
|
18
21
|
await this.#init;
|
|
19
22
|
const { data, error } = await this.#source.getAll();
|
|
23
|
+
if (!this.#store) {
|
|
24
|
+
return {};
|
|
25
|
+
}
|
|
20
26
|
if (data) {
|
|
21
27
|
this.#store.appendItems(data.items);
|
|
22
28
|
}
|