mesauth-angular 1.20.0 → 1.22.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mesauth-angular",
3
- "version": "1.20.0",
3
+ "version": "1.22.0",
4
4
  "description": "Angular helper library to connect to a backend API and SignalR hub to surface the current logged-in user and incoming notifications with dark/light theme support",
5
5
  "keywords": [
6
6
  "angular",
@@ -545,6 +545,7 @@ declare class MaApprovalPanelComponent {
545
545
  private readonly mesAuth;
546
546
  private readonly http;
547
547
  private readonly router;
548
+ private readonly host;
548
549
  private approvalSvc;
549
550
  constructor();
550
551
  open(): void;
@@ -705,7 +706,7 @@ declare class MaAiService {
705
706
  * Uses panel-shared.css for the header/empty-state styling so it looks like the approval
706
707
  * and notification panels.
707
708
  */
708
- declare class MaAiChatPanelComponent implements AfterViewInit {
709
+ declare class MaAiChatPanelComponent implements AfterViewInit, OnDestroy {
709
710
  readonly isOpen: _angular_core.WritableSignal<boolean>;
710
711
  readonly width: _angular_core.WritableSignal<number>;
711
712
  readonly draft: _angular_core.WritableSignal<string>;
@@ -713,6 +714,8 @@ declare class MaAiChatPanelComponent implements AfterViewInit {
713
714
  private readonly router;
714
715
  private readonly themeService;
715
716
  private readonly uiConfig;
717
+ private readonly aiConfig;
718
+ private readonly panelMode;
716
719
  /** Suggested prompts shown in the empty state — manifest overridable. */
717
720
  readonly quickPrompts: _angular_core.Signal<string[]>;
718
721
  private readonly scrollContainer;
@@ -728,6 +731,8 @@ declare class MaAiChatPanelComponent implements AfterViewInit {
728
731
  private dragStartWidth;
729
732
  constructor();
730
733
  ngAfterViewInit(): void;
734
+ ngOnDestroy(): void;
735
+ private setLayoutVar;
731
736
  open(): void;
732
737
  close(): void;
733
738
  toggle(): void;
@@ -866,6 +871,7 @@ declare class NotificationPanelComponent {
866
871
  private readonly authService;
867
872
  private readonly toastService;
868
873
  private readonly themeService;
874
+ private readonly host;
869
875
  constructor();
870
876
  ngOnDestroy(): void;
871
877
  private loadNotifications;
@@ -1051,7 +1057,7 @@ interface MaUiManifest {
1051
1057
  quickPrompts?: string[];
1052
1058
  }
1053
1059
  /** Current installed package version — keep in sync with package.json. */
1054
- declare const PACKAGE_VERSION = "1.19.0";
1060
+ declare const PACKAGE_VERSION = "1.21.0";
1055
1061
  /**
1056
1062
  * Provides server-driven UI configuration loaded from the hosted manifest.
1057
1063
  * Components read `labels()` and `features()` signals instead of hardcoded strings.
@@ -1182,6 +1188,7 @@ declare function runSsoCheckHandshake(authService: MesAuthService): Promise<void
1182
1188
  */
1183
1189
  declare function runReturnViaPostMessageIfRequested(authService: MesAuthService): Promise<boolean>;
1184
1190
 
1191
+ type MaAiPanelMode = 'static' | 'floating';
1185
1192
  interface MesAuthAiConfig {
1186
1193
  /** Master switch — when false the Ask-AI button hides and the panel never opens. */
1187
1194
  enabled?: boolean;
@@ -1200,6 +1207,18 @@ interface MesAuthAiConfig {
1200
1207
  * Optional friendly name of the host app; sent to the backend each turn.
1201
1208
  */
1202
1209
  appName?: string;
1210
+ /**
1211
+ * How the panel coexists with the host app layout.
1212
+ *
1213
+ * - `'static'` (default): the panel still renders as a fixed-position drawer, but the
1214
+ * library injects a global stylesheet that sets `padding-inline-end: var(--ma-ai-panel-width)`
1215
+ * on `<body>`. When the panel opens the host's `<body>` shrinks to make room, so wide
1216
+ * content reflows instead of being hidden under the drawer. Zero-config for the host —
1217
+ * no template or CSS changes required.
1218
+ * - `'floating'`: legacy v1.21 behaviour. The panel overlays the host content at z-index 1040
1219
+ * without resizing the layout. Use this for hosts whose layout can't reflow safely.
1220
+ */
1221
+ panelMode?: MaAiPanelMode;
1203
1222
  }
1204
1223
  declare const MES_AUTH_AI_CONFIG: InjectionToken<MesAuthAiConfig>;
1205
1224
  /** Default configuration when the consumer doesn't call provideMesAuthAi(). */
@@ -1286,4 +1305,4 @@ declare class MaAiMarkdownPipe implements PipeTransform {
1286
1305
  declare function renderMarkdown(src: string): string;
1287
1306
 
1288
1307
  export { ALL_ACTIONS, AVATAR_FRAMES, ApprovalActionType, ApprovalDocumentStatus, ApprovalStepMode, ApprovalStepStatus, DEFAULT_AI_CONFIG, MES_AUTH_AI_CONFIG, MES_AUTH_CONFIG, MaAiButtonComponent, MaAiChatPanelComponent, MaAiMarkdownPipe, MaAiService, MaAiToolsRegistry, MaApprovalPanelComponent, MaApprovalService, MaArvContainerComponent, MaAvatarComponent, MaIconComponent, MaThemeDirective, MaUiConfigService, MaUserComponent, MaUserMenuColor, MaUserMenuComponent, MaUserXComponent, MesAuthModule, MesAuthService, NotificationBadgeComponent, NotificationPanelComponent, NotificationType, PACKAGE_VERSION, ThemeService, ToastContainerComponent, ToastService, UserProfileComponent, extractXMaPerm, mesAuthInterceptor, provideMesAuth, provideMesAuthAi, renderMarkdown, runReturnViaPostMessageIfRequested, runSsoCheckHandshake, withXMaPerm, xMaResource };
1289
- export type { AiSseEvent, ApprovalDashboardDto, ApprovalDocumentDto, ApprovalDocumentSummaryDto, ApprovalHistoryDto, ApprovalReferenceDto, ApprovalStepDto, ApprovalStepRequest, ApprovalSubmitResult, ApprovalTemplateDto, ApprovalTemplateStepDto, ApprovalTemplateSummaryDto, ApproveRejectRequest, AvatarFrameDef, AvatarShape, AvatarSize, ChatBubble, ChatToolEvent, ClientTool, ClientToolSchema, CreateApprovalRequest, CreateApprovalResponseDto, CreateApprovalTemplateRequest, DelegateRequest, FrontEndRoute, IUser, MaUiManifest, MesAuthAiConfig, MesAuthConfig, NotificationDto, PagedList, PendingApproval, PermissionHeader, RealTimeNotificationDto, RequestConfig, RolePreviewUserDto, StepRoleDto, Theme, Toast, UpdateApprovalTemplateRequest, UserFrontEndRoutesGrouped };
1308
+ export type { AiSseEvent, ApprovalDashboardDto, ApprovalDocumentDto, ApprovalDocumentSummaryDto, ApprovalHistoryDto, ApprovalReferenceDto, ApprovalStepDto, ApprovalStepRequest, ApprovalSubmitResult, ApprovalTemplateDto, ApprovalTemplateStepDto, ApprovalTemplateSummaryDto, ApproveRejectRequest, AvatarFrameDef, AvatarShape, AvatarSize, ChatBubble, ChatToolEvent, ClientTool, ClientToolSchema, CreateApprovalRequest, CreateApprovalResponseDto, CreateApprovalTemplateRequest, DelegateRequest, FrontEndRoute, IUser, MaAiPanelMode, MaUiManifest, MesAuthAiConfig, MesAuthConfig, NotificationDto, PagedList, PendingApproval, PermissionHeader, RealTimeNotificationDto, RequestConfig, RolePreviewUserDto, StepRoleDto, Theme, Toast, UpdateApprovalTemplateRequest, UserFrontEndRoutesGrouped };