@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.
Files changed (100) hide show
  1. package/dist-cms/apps/backoffice/backoffice.context.js +5 -1
  2. package/dist-cms/apps/backoffice/components/backoffice-main.element.js +3 -1
  3. package/dist-cms/css/uui-css.css +438 -108
  4. package/dist-cms/custom-elements.json +20 -15
  5. package/dist-cms/external/uui/index.js +370 -336
  6. package/dist-cms/libs/context-api/consume/context-consumer.js +1 -2
  7. package/dist-cms/libs/controller-api/controller-host.mixin.js +2 -2
  8. package/dist-cms/packages/block/block/context/block-entry.context.js +10 -3
  9. package/dist-cms/packages/block/block/workspace/views/edit/block-workspace-view-edit.element.js +1 -0
  10. package/dist-cms/packages/block/block-list/components/block-list-entry/block-list-entry.element.js +2 -1
  11. package/dist-cms/packages/content/content/components/property-type-based-property/index.d.ts +2 -0
  12. package/dist-cms/packages/content/content/components/property-type-based-property/index.js +2 -0
  13. package/dist-cms/packages/content/content/components/property-type-based-property/property-type-based-property.context-token.d.ts +8 -0
  14. package/dist-cms/packages/content/content/components/property-type-based-property/property-type-based-property.context-token.js +7 -0
  15. 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
  16. package/dist-cms/packages/content/content/components/property-type-based-property/property-type-based-property.context.js +19 -0
  17. package/dist-cms/packages/content/content/components/property-type-based-property/property-type-based-property.element.d.ts +1 -1
  18. package/dist-cms/packages/content/content/components/property-type-based-property/property-type-based-property.element.js +8 -7
  19. package/dist-cms/packages/content/content/global-components/content-workspace-property.element.d.ts +26 -0
  20. package/dist-cms/packages/content/content/global-components/content-workspace-property.element.js +104 -0
  21. package/dist-cms/packages/content/content/global-components/index.d.ts +1 -0
  22. package/dist-cms/packages/content/content/global-components/index.js +1 -0
  23. package/dist-cms/packages/content/content/index.d.ts +1 -2
  24. package/dist-cms/packages/content/content/index.js +1 -2
  25. package/dist-cms/packages/content/content/workspace/content-detail-workspace-base.js +2 -1
  26. package/dist-cms/packages/content/content/workspace/views/edit/content-editor-properties.element.d.ts +1 -3
  27. package/dist-cms/packages/content/content/workspace/views/edit/content-editor-properties.element.js +8 -48
  28. package/dist-cms/packages/content/content/workspace/views/edit/content-editor.element.js +1 -0
  29. package/dist-cms/packages/content/content-type/structure/content-type-property-structure-helper.class.d.ts +1 -0
  30. package/dist-cms/packages/content/content-type/structure/content-type-property-structure-helper.class.js +1 -0
  31. package/dist-cms/packages/content/content-type/structure/content-type-structure-manager.class.d.ts +1 -0
  32. package/dist-cms/packages/content/content-type/structure/content-type-structure-manager.class.js +3 -3
  33. package/dist-cms/packages/content/content-type/workspace/views/design/content-type-design-editor.element.js +11 -7
  34. package/dist-cms/packages/content/property-type/workspace/property-type-workspace.context.js +5 -1
  35. package/dist-cms/packages/core/collection/collection-view.manager.js +4 -4
  36. package/dist-cms/packages/core/components/input-number-range/input-number-range.element.d.ts +4 -1
  37. package/dist-cms/packages/core/components/input-number-range/input-number-range.element.js +27 -3
  38. package/dist-cms/packages/core/components/input-with-alias/input-with-alias.element.js +0 -2
  39. package/dist-cms/packages/core/repository/detail/detail-repository-base.js +6 -7
  40. package/dist-cms/packages/core/repository/item/item-repository-base.d.ts +1 -1
  41. package/dist-cms/packages/core/repository/item/item-repository-base.js +25 -9
  42. package/dist-cms/packages/core/repository/item/item-repository.interface.d.ts +1 -1
  43. package/dist-cms/packages/core/router/router-slot/model.d.ts +1 -0
  44. package/dist-cms/packages/core/router/router-slot/router-slot.d.ts +1 -0
  45. package/dist-cms/packages/core/router/router-slot/router-slot.js +30 -0
  46. package/dist-cms/packages/core/tree/data/tree-repository-base.d.ts +5 -1
  47. package/dist-cms/packages/core/tree/data/tree-repository-base.js +27 -13
  48. package/dist-cms/packages/core/tree/tree-item/tree-item.element.js +1 -1
  49. package/dist-cms/packages/core/validation/controllers/validation.controller.js +1 -1
  50. package/dist-cms/packages/core/workspace/components/workspace-action/common/save/save.action.js +3 -1
  51. package/dist-cms/packages/core/workspace/components/workspace-split-view/workspace-split-view-variant-selector.element.js +2 -2
  52. package/dist-cms/packages/core/workspace/controllers/workspace-is-new-redirect.controller.d.ts +7 -0
  53. package/dist-cms/packages/core/workspace/controllers/workspace-is-new-redirect.controller.js +31 -10
  54. package/dist-cms/packages/core/workspace/controllers/workspace-route-manager.controller.js +5 -5
  55. package/dist-cms/packages/core/workspace/entity-detail/entity-detail-workspace-base.js +1 -1
  56. package/dist-cms/packages/core/workspace/submittable/submittable-workspace-context-base.d.ts +1 -0
  57. package/dist-cms/packages/core/workspace/submittable/submittable-workspace-context-base.js +10 -0
  58. package/dist-cms/packages/data-type/collection/repository/data-type-collection.repository.js +6 -1
  59. package/dist-cms/packages/data-type/repository/detail/data-type-detail.repository.js +6 -1
  60. package/dist-cms/packages/documents/document-blueprints/workspace/document-blueprint-workspace-editor.element.js +5 -4
  61. package/dist-cms/packages/documents/documents/publishing/workspace-context/document-publishing.workspace-context.js +12 -2
  62. package/dist-cms/packages/documents/documents/types.d.ts +1 -0
  63. package/dist-cms/packages/documents/documents/url/index.d.ts +1 -0
  64. package/dist-cms/packages/documents/documents/url/index.js +1 -0
  65. package/dist-cms/packages/documents/documents/url/types.d.ts +1 -0
  66. package/dist-cms/packages/documents/documents/url/types.js +1 -0
  67. package/dist-cms/packages/documents/documents/user-permissions/document/conditions/document-user-permission.condition.js +3 -1
  68. package/dist-cms/packages/documents/documents/workspace/actions/save.action.js +4 -2
  69. package/dist-cms/packages/documents/documents/workspace/document-workspace-editor.element.js +13 -7
  70. package/dist-cms/packages/media/media/dashboard/media-dashboard.element.js +1 -0
  71. package/dist-cms/packages/media/media/workspace/media-workspace-editor.element.js +1 -0
  72. package/dist-cms/packages/members/member/repository/member-repository-base.d.ts +8 -8
  73. package/dist-cms/packages/members/member/repository/member-repository-base.js +13 -12
  74. package/dist-cms/packages/members/member/workspace/member/member-workspace-editor.element.js +1 -0
  75. package/dist-cms/packages/packages/package-section/views/created/created-packages-section-view.element.js +1 -0
  76. package/dist-cms/packages/segment/package.json +8 -0
  77. package/dist-cms/packages/settings/package.json +8 -0
  78. package/dist-cms/packages/settings/vite.config.d.ts +2 -0
  79. package/dist-cms/packages/settings/vite.config.js +11 -0
  80. package/dist-cms/packages/translation/package.json +8 -0
  81. package/dist-cms/packages/user/current-user/current-user.context.js +4 -1
  82. package/dist-cms/packages/user/current-user/repository/current-user.repository.d.ts +2 -2
  83. package/dist-cms/packages/user/current-user/repository/current-user.repository.js +8 -5
  84. package/dist-cms/packages/user/user/repository/user-repository-base.d.ts +7 -7
  85. package/dist-cms/packages/user/user/repository/user-repository-base.js +13 -12
  86. package/dist-cms/packages/user/user-group/collection/repository/user-group-collection.repository.js +4 -1
  87. package/dist-cms/packages/webhook/webhook-event/repository/webhook-event.repository.d.ts +4 -0
  88. package/dist-cms/packages/webhook/webhook-event/repository/webhook-event.repository.js +7 -1
  89. package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
  90. package/dist-cms/umbraco-package.json +1 -1
  91. package/dist-cms/vscode-html-custom-data.json +14 -8
  92. package/examples/modal-routed/dashboard.element.ts +1 -0
  93. package/examples/modal-routed/modal/example-modal.element.ts +1 -0
  94. package/examples/validation-context/validation-context-dashboard.ts +12 -12
  95. package/package.json +7 -7
  96. package/dist-cms/packages/content/content/content-property.context-token.d.ts +0 -3
  97. package/dist-cms/packages/content/content/content-property.context-token.js +0 -2
  98. package/dist-cms/packages/content/content/content-property.context.js +0 -14
  99. package/dist-cms/packages/content/content/workspace/views/edit/content-editor-property.element.d.ts +0 -21
  100. 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 {
@@ -1,3 +1,4 @@
1
1
  export { UmbDocumentUrlRepository, UMB_DOCUMENT_URL_REPOSITORY_ALIAS } from './repository/index.js';
2
+ export * from './repository/index.js';
2
3
  export * from './constants.js';
3
4
  export * from './document-urls-data-resolver.js';
@@ -1,3 +1,4 @@
1
1
  export { UmbDocumentUrlRepository, UMB_DOCUMENT_URL_REPOSITORY_ALIAS } from './repository/index.js';
2
+ export * from './repository/index.js';
2
3
  export * from './constants.js';
3
4
  export * from './document-urls-data-resolver.js';
@@ -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).asPromise();
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();
@@ -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
- resolve: () => {
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].unique)?.path;
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() {
@@ -42,6 +42,7 @@ let UmbMediaDashboardElement = class UmbMediaDashboardElement extends UmbLitElem
42
42
  },
43
43
  {
44
44
  path: '',
45
+ pathMatch: 'full',
45
46
  redirectTo: 'collection',
46
47
  },
47
48
  {
@@ -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 type { UmbMemberItemStore } from '../item/repository/member-item.store.js';
2
- import type { UmbMemberDetailStore } from './detail/member-detail.store.js';
3
- import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
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?: UmbMemberDetailStore;
9
- protected itemStore?: UmbMemberItemStore;
10
- protected notificationContext?: UmbNotificationContext;
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
- if (instance) {
11
- this.detailStore = instance;
12
- }
13
- }).asPromise({ preventTimeout: true }),
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
- if (instance) {
16
- this.itemStore = instance;
17
- }
18
- }).asPromise({ preventTimeout: true }),
16
+ this.itemStore = instance;
17
+ })
18
+ .asPromise({ preventTimeout: true })
19
+ .catch(() => undefined),
19
20
  this.consumeContext(UMB_NOTIFICATION_CONTEXT, (instance) => {
20
- if (instance) {
21
- this.notificationContext = instance;
22
- }
23
- }).asPromise({ preventTimeout: true }),
21
+ this.notificationContext = instance;
22
+ })
23
+ .asPromise({ preventTimeout: true })
24
+ .catch(() => undefined),
24
25
  ]);
25
26
  }
26
27
  }
@@ -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
  }
@@ -44,6 +44,7 @@ let UmbCreatedPackagesSectionViewElement = class UmbCreatedPackagesSectionViewEl
44
44
  });
45
45
  routes.push({
46
46
  path: '',
47
+ pathMatch: 'full',
47
48
  redirectTo: 'overview',
48
49
  });
49
50
  routes.push({
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@umbraco-backoffice/segment",
3
+ "private": true,
4
+ "type": "module",
5
+ "scripts": {
6
+ "build": "vite build"
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@umbraco-backoffice/settings",
3
+ "private": true,
4
+ "type": "module",
5
+ "scripts": {
6
+ "build": "vite build"
7
+ }
8
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfig;
2
+ export default _default;
@@ -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
+ });
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@umbraco-backoffice/translation",
3
+ "private": true,
4
+ "type": "module",
5
+ "scripts": {
6
+ "build": "vite build"
7
+ }
8
+ }
@@ -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
- }).asPromise();
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 type { UmbNotificationContext } from '@umbraco-cms/backoffice/notification';
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?: UmbNotificationContext;
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
- }).asPromise({ preventTimeout: true }),
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
- if (instance) {
24
- this.notificationContext = instance;
25
- }
26
- }).asPromise({ preventTimeout: true }),
26
+ this.notificationContext = instance;
27
+ })
28
+ .asPromise({ preventTimeout: true })
29
+ .catch(() => undefined),
27
30
  ]);
28
31
  }
29
32
  /**
@@ -1,12 +1,12 @@
1
- import type { UmbUserDetailStore } from './detail/user-detail.store.js';
2
- import type { UmbUserItemStore } from './item/user-item.store.js';
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 type { UmbNotificationContext } from '@umbraco-cms/backoffice/notification';
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?: UmbUserDetailStore;
9
- protected itemStore?: UmbUserItemStore;
10
- protected notificationContext?: UmbNotificationContext;
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
- if (instance) {
11
- this.detailStore = instance;
12
- }
13
- }).asPromise({ preventTimeout: true }),
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
- if (instance) {
16
- this.itemStore = instance;
17
- }
18
- }).asPromise({ preventTimeout: true }),
16
+ this.itemStore = instance;
17
+ })
18
+ .asPromise({ preventTimeout: true })
19
+ .catch(() => undefined),
19
20
  this.consumeContext(UMB_NOTIFICATION_CONTEXT, (instance) => {
20
- if (instance) {
21
- this.notificationContext = instance;
22
- }
23
- }).asPromise({ preventTimeout: true }),
21
+ this.notificationContext = instance;
22
+ })
23
+ .asPromise({ preventTimeout: true })
24
+ .catch(() => undefined),
24
25
  ]);
25
26
  }
26
27
  }
@@ -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
- }).asPromise({ preventTimeout: true });
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
- }).asPromise({ preventTimeout: true });
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
  }