@smartbit4all/ng-client 6.0.0 → 6.0.2

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.
@@ -7,6 +7,7 @@ import { SmartTranslateService, SmartViewContextApiError, SmartViewContextApiErr
7
7
  import { SmartSubject } from '../smart-subject/projects';
8
8
  import { SmartViewContextDialogService } from './smart-view-context-dialog.service';
9
9
  import { ComponentLibrary } from './utility/componentLibrary';
10
+ import { SlotKind } from './view-slot-resolution';
10
11
  import { DefaultViewComponentEntry } from './default-view-components.token';
11
12
  import * as i0 from "@angular/core";
12
13
  export declare const SmartViewContextErrorDialogButtonLabel = "SmartViewContextErrorDialogButtonLabel";
@@ -57,7 +58,7 @@ export declare class SmartViewContextService implements OnDestroy {
57
58
  ngOnDestroy(): void;
58
59
  follow(uuid: string, detectChange: SmartSubject<any>): void;
59
60
  unfollow(uuid: string): void;
60
- registerEmbeddedSlot(containerUuid: string, containerId: string, vcRef: ViewContainerRef): void;
61
+ registerEmbeddedSlot(containerUuid: string, containerId: string, vcRef: ViewContainerRef, kind: SlotKind): void;
61
62
  detachAllEmbeddedViews(containerUuid: string): void;
62
63
  cleanupOrphanedEmbeddedViews(containerUuid: string): void;
63
64
  getCompositeModel(containerUuid: string): {
@@ -4,6 +4,18 @@ import { ViewData } from './api/model/viewData';
4
4
  export declare const ROOT_CONTAINER_UUID = "__ROOT__";
5
5
  /** Conventional containerId for the single "current page" slot that replaces <router-outlet>. */
6
6
  export declare const ROUTER_SLOT_ID = "router-outlet";
7
+ /**
8
+ * Lifecycle class of an embedded slot, declared by whoever registers it:
9
+ * - 'stable': a SmartEmbeddedSlotDirective slot (e.g. the host root slot or a
10
+ * page's router-outlet slot). Registered once in ngOnInit and lives OUTSIDE any
11
+ * layout *ngFor, so it survives a parent layout re-render. Its mounted child must
12
+ * NOT be detached by the layout detach/cleanup dance.
13
+ * - 'layout': a SmartComponentLayoutComponent EMBEDDED_SLOT widget slot. Lives
14
+ * INSIDE the re-rendering layout *ngFor tree, so a top-level layout re-render
15
+ * destroys and recreates it; its child must be detached first to survive the
16
+ * *ngFor destruction, then reattaches on re-registration. (#28870)
17
+ */
18
+ export type SlotKind = 'stable' | 'layout';
7
19
  export interface ResolvedSlot {
8
20
  containerUuid: string;
9
21
  containerId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartbit4all/ng-client",
3
- "version": "6.0.0",
3
+ "version": "6.0.2",
4
4
  "description": "Angular client library for the smartbit4all platform — a server-driven UI framework that renders views, pages, forms, grids, trees and dialogs from backend (ViewApi/PageApi) definitions. Provides reactive view-context state management, dynamic component layouts and OpenAPI-generated BFF clients.",
5
5
  "peerDependencies": {
6
6
  "@angular/animations": "^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0",
Binary file
Binary file