@posiwise/shared-components 0.0.235 → 0.0.237

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.
@@ -1,2596 +1,2504 @@
1
1
  import * as i0 from "@angular/core";
2
- import { AfterContentInit, AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, InjectionToken, Injector, OnChanges, OnDestroy, OnInit, PipeTransform, SimpleChanges, TemplateRef, Type, ViewContainerRef } from "@angular/core";
3
- import { AuthService, BaseHttpService, BrainSocketService, BrainVoiceService, CustomToastService, DashboardService, DataService, DirectUploadService, FeatureFlagService, GroupService, KnowledgeFile, KnowledgeFilesService, KnowledgeScope, LegalPagesService, LegalTab, LocalStorage, MCPFieldDiff, MCPOrchestratorService, MCPUploadCapability, MainApiHttpService, NavEntry, NavigationIndexService, NumberPickerService, PermissionService, RecentPagesService, SubscriptionService, UserService, VoiceChatService } from "@posiwise/common-services";
4
- import * as i43 from "primeng/table";
2
+ import { AfterContentInit, AfterViewInit, ElementRef, EventEmitter, InjectionToken, OnChanges, OnDestroy, OnInit, PipeTransform, SimpleChanges, TemplateRef, Type, ViewContainerRef } from "@angular/core";
3
+ import * as i2 from "@angular/forms";
4
+ import { AbstractControl, FormGroup } from "@angular/forms";
5
+ import * as i3 from "primeng/iconfield";
6
+ import * as i4 from "primeng/inputicon";
7
+ import * as i5 from "primeng/inputtext";
8
+ import * as i5$1 from "@posiwise/app-loader";
9
+ import * as i7 from "@posiwise/directives";
10
+ import * as i6 from "@posiwise/core-transloco";
11
+ import * as i3$1 from "@angular/router";
12
+ import { Route, Routes } from "@angular/router";
13
+ import * as i9 from "@ng-bootstrap/ng-bootstrap";
14
+ import { NgbActiveModal } from "@ng-bootstrap/ng-bootstrap";
15
+ import * as i10 from "primeng/tooltip";
16
+ import * as i12 from "primeng/table";
5
17
  import { Table } from "primeng/table";
6
- import { TranslocoService } from "@jsverse/transloco";
7
- import * as i14 from "@ng-bootstrap/ng-bootstrap";
8
- import { NgbActiveModal, NgbModal } from "@ng-bootstrap/ng-bootstrap";
9
- import * as i8 from "@angular/router";
10
- import { Route, Router, Routes } from "@angular/router";
11
- import { AppConfigService } from "@posiwise/app-config-service";
18
+ import * as i13 from "primeng/tabs";
19
+ import * as i8 from "primeng/button";
20
+ import * as i15 from "primeng/select";
21
+ import * as i16 from "primeng/multiselect";
22
+ import * as i11 from "primeng/progressspinner";
23
+ import * as i12$1 from "primeng/autocomplete";
24
+ import * as i19 from "ngx-image-cropper";
25
+ import * as i20 from "ngx-ui-switch";
26
+ import * as i21 from "ngx-daterangepicker-material";
27
+ import { DaterangepickerDirective } from "ngx-daterangepicker-material";
28
+ import * as i22 from "@posiwise/pipes";
29
+ import * as i1 from "@angular/common";
30
+ import * as i14 from "@posiwise/utils";
31
+ import * as i4$1 from "@fortawesome/angular-fontawesome";
32
+ import * as i13$1 from "@angular/cdk/drag-drop";
33
+ import { IconDefinition } from "@fortawesome/free-solid-svg-icons";
34
+ import { BaseHttpService, BrainVoiceService, DirectUploadService, KnowledgeFile, KnowledgeScope, LegalTab, MCPFieldDiff, MCPUploadCapability, NavEntry, VoiceChatService } from "@posiwise/common-services";
12
35
  import { Observable, Subject } from "rxjs";
13
36
  import { AppBaseComponent } from "@posiwise/app-base-component";
14
37
  import { MenuItem } from "primeng/api";
15
38
  import moment from "moment";
16
- import * as i52 from "ngx-daterangepicker-material";
17
- import { DaterangepickerDirective } from "ngx-daterangepicker-material";
18
- import { AppState } from "@posiwise/app-store";
19
- import { Store } from "@ngrx/store";
20
39
  import { Subscription, User } from "@posiwise/common-utilities";
21
- import * as i7 from "@angular/forms";
22
- import { AbstractControl, ControlContainer, UntypedFormBuilder, UntypedFormGroup } from "@angular/forms";
23
- import * as i34 from "primeng/iconfield";
24
- import * as i35 from "primeng/inputicon";
25
- import * as i36 from "primeng/inputtext";
26
- import * as i10 from "@posiwise/app-loader";
27
- import * as i12 from "@posiwise/directives";
28
- import * as i11 from "@posiwise/core-transloco";
29
- import * as i15 from "primeng/tooltip";
30
- import * as i44 from "primeng/tabs";
31
- import * as i13 from "primeng/button";
32
- import * as i46 from "primeng/select";
33
- import * as i47 from "primeng/multiselect";
34
- import * as i16 from "primeng/progressspinner";
35
- import * as i17 from "primeng/autocomplete";
36
- import * as i50 from "ngx-image-cropper";
37
- import * as i51 from "ngx-ui-switch";
38
- import * as i53 from "@posiwise/pipes";
39
- import * as i6 from "@angular/common";
40
- import * as i19 from "@posiwise/utils";
41
- import { IconDefinition } from "@fortawesome/free-solid-svg-icons";
42
- import * as i9 from "@fortawesome/angular-fontawesome";
43
- import * as i18 from "@angular/cdk/drag-drop";
44
- export type ConfirmDialogTone = 'destructive' | 'neutral' | 'info';
45
- export interface ConfirmDialogConfig {
46
- titleKey?: string;
47
- title?: string;
48
- titleParams?: Record<string, unknown>;
49
- textKey?: string;
50
- text?: string;
51
- textParams?: Record<string, unknown>;
52
- destructive?: boolean;
53
- confirmOnly?: boolean;
54
- confirmLabelKey?: string;
55
- confirmLabel?: string;
56
- cancelLabelKey?: string;
57
- cancelLabel?: string;
58
- icon?: string;
59
- tone?: ConfirmDialogTone;
40
+ declare namespace pw_sticky_actions_component_d_exports {
41
+ export { PwStickyActionsComponent };
60
42
  }
61
43
  /**
62
- * Convenience overrides for `confirmDelete`. Any field of `ConfirmDialogConfig`
63
- * may be passed; the defaults are `{ title: 'Delete', text: 'Are you sure you
64
- * want to delete?', destructive: true }`.
44
+ * A form's Cancel / Submit row that stays on screen while a long form scrolls. Put the buttons inside
45
+ * it. Pages that hold it rely on the `@posiwise/core-styles` rule that stops the shell's
46
+ * `.overflow-hidden` containers from trapping a sticky element.
65
47
  */
66
- export type ConfirmDeleteOptions = Partial<ConfirmDialogConfig>;
67
- export declare class ConfirmDialogService {
68
- private readonly modal;
69
- constructor(modal: NgbModal);
70
- open(config?: ConfirmDialogConfig): Promise<boolean>;
48
+ export declare class PwStickyActionsComponent implements AfterViewInit {
49
+ private readonly el;
50
+ private readonly destroyRef;
51
+ /** True while the bar is pinned over the form rather than resting below it. */
52
+ readonly floating: import("@angular/core").WritableSignal<boolean>;
71
53
  /**
72
- * Opens a generic destructive "Delete — Are you sure you want to delete?"
73
- * confirmation dialog. Pass overrides for any field (e.g. `text` with a
74
- * bold entity name, or `textKey` for an i18n key).
54
+ * The bar sits at `bottom: -1px`, so while it is pinned one pixel is off the bottom of the screen.
55
+ * A bar cut off at the top is scrolling away under the header, not pinned.
75
56
  */
76
- confirmDelete(overrides?: ConfirmDeleteOptions): Promise<boolean>;
77
- static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmDialogService, never>;
78
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
57
+ ngAfterViewInit(): void;
58
+ static ɵfac: i0.ɵɵFactoryDeclaration<PwStickyActionsComponent, never>;
59
+ static ɵcmp: i0.ɵɵComponentDeclaration<PwStickyActionsComponent, "pw-sticky-actions", never, {}, {}, never, ["*"], true, never>;
79
60
  }
80
- /** `docmost/Onboarding/a.md` → `docmost/Onboarding`; a top-level file → ''. */
81
- declare function folderOf(file: KnowledgeFile): string;
82
- /** Colour key for the folder badge: `docmost/Onboarding` shares `docmost`'s tint. */
83
- declare function topFolderOf(file: KnowledgeFile): string;
84
- declare function formatSize(bytes: number): string;
85
- /**
86
- * One distinct soft tint per top-level folder, from core-styles' 24-hue ramp
87
- * (`.badge.bg-cyan-1` … `-24`). Folders are sorted so the same set always gets
88
- * the same colours, and successive folders step 7 places round the ramp (105°;
89
- * 7 is coprime with 24, so all 24 hues are used before any repeats).
90
- * `appDynamicBadge`'s 9-bucket hash collided here and kept to a narrow green
91
- * band, so two folders could not be told apart.
92
- */
93
- declare function folderBadgeClasses(files: KnowledgeFile[]): Map<string, string>;
94
- /** i18n key for why `file` can't be uploaded, or null. brain-api re-checks all of it. */
95
- declare function uploadProblem(file: File): string | null;
96
- /**
97
- * Footer counts. This table pages and searches in the browser, so unlike a lazy
98
- * table `dt.value` is every file: count the current page of the current search,
99
- * or the footer reads "Showing 60 of 60" on a 50-row page.
100
- */
101
- declare function matchingCount(filtered: unknown[] | null | undefined, files: KnowledgeFile[]): number;
102
- declare function shownOnPage(first: number, pageSize: number, matching: number): number;
103
- /** Hands a downloaded file to the browser under its own name. */
104
- declare function saveBlob(blob: Blob, name: string): void;
105
- declare namespace ai_knowledge_component_d_exports {
106
- export { AiKnowledgeComponent };
61
+ declare namespace no_data_component_d_exports {
62
+ export { NoDataComponent };
107
63
  }
108
- /**
109
- * Documents the Brain reads for one subscription — the tenant's folder
110
- * (`scope="subscription"`, admins) or the caller's own (`scope="personal"`).
111
- * brain-api validates every upload; the checks here only spare a round trip.
112
- */
113
- export declare class AiKnowledgeComponent implements OnChanges {
114
- private readonly knowledge;
115
- private readonly confirmDialog;
116
- private readonly toast;
117
- private readonly translation;
118
- private readonly cdr;
119
- scope: KnowledgeScope;
120
- subscriptionId: number | null;
121
- subscriptionName: string;
122
- /** "Use my data" off: no uploads and the Brain ignores these files; they can still be removed. */
123
- useOwnData: boolean;
124
- fileInput: ElementRef<HTMLInputElement>;
125
- readonly accept: string;
126
- readonly pageSize = 50;
127
- files: KnowledgeFile[];
128
- searchText: string;
129
- /** More files exist than one load fetches (see `KnowledgeFilesService.listAllFiles`). */
130
- truncated: boolean;
131
- loading: boolean;
132
- loadFailed: boolean;
133
- /** brain-api's own reason when storage isn't set up (`storage_unavailable`) — "try again" won't help. */
134
- unavailableReason: string | null;
135
- uploading: boolean;
136
- private folderClasses;
137
- constructor(knowledge: KnowledgeFilesService, confirmDialog: ConfirmDialogService, toast: CustomToastService, translation: TranslocoService, cdr: ChangeDetectorRef);
138
- ngOnChanges(changes: SimpleChanges): void;
139
- load(): void;
140
- chooseFile(): void;
141
- onFileSelected(event: Event): void;
142
- download(file: KnowledgeFile): void;
143
- remove(file: KnowledgeFile): void;
144
- /** Personal files always sit at the top of the member's own folder. */
145
- get showFolder(): boolean;
146
- folderOf: typeof folderOf;
147
- sizeOf: typeof formatSize;
148
- /** First row of the current page; PrimeNG returns to page 1 on a search. */
149
- pageFirst: number;
150
- matchingCount: (dt: Table) => number;
151
- shownOnPage: (dt: Table) => number;
152
- folderBadgeClass(file: KnowledgeFile): string;
153
- private recolourFolders;
154
- private done;
155
- static ɵfac: i0.ɵɵFactoryDeclaration<AiKnowledgeComponent, never>;
156
- static ɵcmp: i0.ɵɵComponentDeclaration<AiKnowledgeComponent, "pw-ai-knowledge", never, {
157
- "scope": {
158
- "alias": "scope";
159
- "required": true;
64
+ export declare class NoDataComponent implements AfterContentInit {
65
+ content: {
66
+ nativeElement: {
67
+ innerHTML: string;
160
68
  };
161
- "subscriptionId": {
162
- "alias": "subscriptionId";
69
+ };
70
+ message: string | null;
71
+ description: string | null;
72
+ withImage: boolean;
73
+ isContentEmpty: boolean;
74
+ ngAfterContentInit(): void;
75
+ static ɵfac: i0.ɵɵFactoryDeclaration<NoDataComponent, never>;
76
+ static ɵcmp: i0.ɵɵComponentDeclaration<NoDataComponent, "pw-no-data", never, {
77
+ "message": {
78
+ "alias": "message";
163
79
  "required": false;
164
80
  };
165
- "subscriptionName": {
166
- "alias": "subscriptionName";
81
+ "description": {
82
+ "alias": "description";
167
83
  "required": false;
168
84
  };
169
- "useOwnData": {
170
- "alias": "useOwnData";
85
+ "withImage": {
86
+ "alias": "withImage";
171
87
  "required": false;
172
88
  };
173
- }, {}, never, never, false, never>;
89
+ }, {}, ["content"], ["*"], true, never>;
174
90
  }
175
- /**
176
- * A compact icon action rendered in the sidebar header row (before the close
177
- * button). `id` MUST match a public method name on the mounted panel component
178
- * — the shell invokes `componentRef.instance[id]()` when the action is clicked.
179
- */
180
- export interface SidebarHeaderAction {
181
- /** Method name to invoke on the mounted panel instance (e.g. 'newChat'). */
182
- id: string;
183
- /** Fontawesome class string, e.g. 'fas fa-plus'. */
184
- icon: string;
185
- /** Accessible label + native tooltip. */
186
- ariaLabel: string;
91
+ declare namespace input_container_component_d_exports {
92
+ export { InputContainerComponent };
187
93
  }
188
- /**
189
- * Interface for sidebar content that modules can provide
190
- */
191
- export interface SidebarContent {
192
- /**
193
- * Unique identifier for this sidebar content
194
- */
195
- id: string;
196
- /**
197
- * Title/label for the sidebar section
198
- */
199
- title: string;
200
- /** i18n key for the title; when set it is shown instead of `title`. */
201
- titleKey?: string;
202
- titleParams?: Record<string, string>;
203
- /**
204
- * Component type to render in the sidebar
205
- */
206
- component: Type<any>;
207
- /**
208
- * Input data to pass to the component
209
- */
210
- data?: any;
211
- /**
212
- * Optional icon class (e.g., 'pi pi-cog' for PrimeNG icons)
213
- */
214
- icon?: string;
215
- /**
216
- * Tooltip text shown on hover
217
- */
218
- tooltip?: string;
219
- /**
220
- * Optional compact status shown inline after the title in the header row
221
- * (leading green dot). Costs no extra vertical space. e.g. the Brain panel's
222
- * 'Connected · long-term memory on'. Panels that omit it render title-only.
223
- */
224
- status?: string;
225
- /**
226
- * Optional compact icon actions rendered in the header row before the close
227
- * button (e.g. the Brain panel's 'New chat'). Each action's `id` is invoked
228
- * as a method on the mounted panel instance.
229
- */
230
- headerActions?: SidebarHeaderAction[];
231
- /**
232
- * When true, the shell renders a soft "Beta" pill next to the title —
233
- * signalling the panel is an experimental feature (e.g. the Brain chat).
234
- * Generic flag; any panel may opt in. The label is i18n'd in the shell
235
- * template ('BrainChat.Badge.Beta').
236
- */
237
- beta?: boolean;
94
+ export declare class InputContainerComponent implements OnInit {
95
+ private readonly controlContainer;
96
+ control: AbstractControl;
97
+ name: string;
98
+ /** Id of the form control; used as the label's `for` attribute for accessibility. When not set, falls back to `name`. */
99
+ controlId: string;
100
+ /** When true, label gets id="{{ controlId }}-label" but no `for`; use with aria-labelledby on the control (e.g. quill-editor). */
101
+ useAriaLabelledbyOnly: boolean;
102
+ label: string;
103
+ labelClass: string;
104
+ tooltipPosition: string;
105
+ required: boolean;
106
+ errorMsg: string;
107
+ isReadOnly: boolean;
108
+ showTooltip: boolean;
109
+ tooltipText: string;
110
+ showTriangle: boolean;
111
+ afterLabel: string;
112
+ showAfterLabel: boolean;
113
+ showTriangleText: string;
114
+ isLeftTooltip: boolean;
115
+ private readonly cdr;
116
+ private readonly destroyRef;
117
+ ngOnInit(): void;
238
118
  /**
239
- * Optional caller-defined drawer width (any valid CSS width value, e.g.
240
- * '640px' or 'min(720px, max(360px, 60vw))'). When set, overrides the
241
- * default via the `--pw-drawer-width` CSS custom property while this
242
- * content is active. When omitted, the SCSS default applies
243
- * (`min(480px, max(300px, 40vw))` overlay / `max(300px, min(480px, 32vw))`
244
- * embedded). The mobile breakpoint (<=768px) still forces 100% regardless.
119
+ * Angular 22 makes components OnPush unless they opt out, and this one's inputs
120
+ * never change when the control does. Without this, `markAllAsTouched()` on a
121
+ * failed submit leaves every error message hidden and the button looks dead.
245
122
  */
246
- width?: string;
247
- }
248
- /**
249
- * CollapsibleSidebarService manages dynamic sidebar content
250
- *
251
- * This service allows any module to register, update, or remove sidebar content.
252
- * It uses observables to notify components of state changes.
253
- */
254
- export declare class CollapsibleSidebarService {
255
- private readonly sidebarContentMap;
256
- private readonly sidebarExpandedSubject;
257
- private readonly sidebarContentSubject;
258
- private readonly activeContentIdSubject;
259
- /**
260
- * Observable for sidebar expanded/collapsed state
261
- */
262
- sidebarExpanded$: Observable<boolean>;
263
- /**
264
- * Observable for current sidebar content
265
- */
266
- sidebarContent$: Observable<SidebarContent | null>;
267
- /**
268
- * Observable for currently active content ID
269
- */
270
- activeContentId$: Observable<string | null>;
271
- /**
272
- * Register sidebar content that can be triggered by a module
273
- * @param content - The sidebar content configuration
274
- */
275
- registerContent(content: SidebarContent): void;
276
- /**
277
- * Unregister sidebar content
278
- * @param contentId - The ID of the content to remove
279
- */
280
- unregisterContent(contentId: string): void;
281
- /**
282
- * Load and display sidebar content by ID
283
- * @param contentId - The ID of the content to load
284
- */
285
- loadContent(contentId: string): void;
286
- /**
287
- * Load a panel and seed it with one-shot inputs.
288
- *
289
- * The host re-mounts the panel component on every load and `Object.assign`s
290
- * `content.data` onto the fresh instance, so this is how a caller opens a
291
- * panel in a particular starting state — e.g. the command palette opening
292
- * the Brain panel with the user's typed query already in the composer.
293
- *
294
- * @param contentId - The ID of the content to load
295
- * @param data - Fields copied onto the newly mounted panel instance
296
- */
297
- loadContentWithData(contentId: string, data: Record<string, unknown>): void;
298
- /**
299
- * Toggle sidebar expanded/collapsed state
300
- */
301
- toggleSidebar(): void;
302
- /**
303
- * Expand the sidebar
304
- */
305
- expandSidebar(): void;
306
- /**
307
- * Collapse the sidebar
308
- */
309
- collapseSidebar(): void;
310
- /**
311
- * Get current expanded state synchronously
312
- */
313
- isExpanded(): boolean;
314
- /**
315
- * Get currently active content ID synchronously
316
- */
317
- getActiveContentId(): string | null;
318
- /**
319
- * Get all registered content IDs
320
- */
321
- getRegisteredContentIds(): string[];
322
- /**
323
- * Clear all sidebar content and collapse
324
- */
325
- clearAll(): void;
326
- static ɵfac: i0.ɵɵFactoryDeclaration<CollapsibleSidebarService, never>;
327
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
123
+ private refreshOnControlEvents;
124
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputContainerComponent, never>;
125
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputContainerComponent, "pw-input-container", never, {
126
+ "name": {
127
+ "alias": "name";
128
+ "required": false;
129
+ };
130
+ "controlId": {
131
+ "alias": "controlId";
132
+ "required": false;
133
+ };
134
+ "useAriaLabelledbyOnly": {
135
+ "alias": "useAriaLabelledbyOnly";
136
+ "required": false;
137
+ };
138
+ "label": {
139
+ "alias": "label";
140
+ "required": false;
141
+ };
142
+ "labelClass": {
143
+ "alias": "labelClass";
144
+ "required": false;
145
+ };
146
+ "tooltipPosition": {
147
+ "alias": "tooltipPosition";
148
+ "required": false;
149
+ };
150
+ "required": {
151
+ "alias": "required";
152
+ "required": false;
153
+ };
154
+ "errorMsg": {
155
+ "alias": "errorMsg";
156
+ "required": false;
157
+ };
158
+ "isReadOnly": {
159
+ "alias": "isReadOnly";
160
+ "required": false;
161
+ };
162
+ "showTooltip": {
163
+ "alias": "showTooltip";
164
+ "required": false;
165
+ };
166
+ "tooltipText": {
167
+ "alias": "tooltipText";
168
+ "required": false;
169
+ };
170
+ "showTriangle": {
171
+ "alias": "showTriangle";
172
+ "required": false;
173
+ };
174
+ "afterLabel": {
175
+ "alias": "afterLabel";
176
+ "required": false;
177
+ };
178
+ "showAfterLabel": {
179
+ "alias": "showAfterLabel";
180
+ "required": false;
181
+ };
182
+ "showTriangleText": {
183
+ "alias": "showTriangleText";
184
+ "required": false;
185
+ };
186
+ "isLeftTooltip": {
187
+ "alias": "isLeftTooltip";
188
+ "required": false;
189
+ };
190
+ }, {}, never, ["*"], true, never>;
328
191
  }
192
+ declare namespace completion_bar_component_d_exports {
193
+ export { CompletionBarComponent, CompletionTier };
194
+ }
195
+ export type CompletionTier = 'low' | 'mid' | 'high';
329
196
  /**
330
- * What activating a palette row does:
331
- * - `page` → router navigation to `path`
332
- * - `person` → router navigation to a user's profile
333
- * - `action` → run a named command (see `PaletteActionId`)
334
- * - `ask-ai` → hand the typed query to the PosiWise Brain panel
335
- */
336
- export type PaletteItemKind = 'page' | 'person' | 'action' | 'ask-ai';
337
- /**
338
- * Commands the palette can run itself, for the things a user repeats that are not
339
- * a destination. Kept to a closed union so a row can never carry an arbitrary
340
- * callback across the source boundary.
197
+ * Generic, presentational segmented completion/progress bar.
198
+ *
199
+ * Renders a row of discrete segments; the first `round(value/100 * segments)`
200
+ * are filled. The fill colour shifts by tier (low/mid/high) using the shared
201
+ * semantic token maps — never the tenant accent (design-system: accent-agnostic).
202
+ * Reusable anywhere via `@posiwise/shared-components`.
341
203
  */
342
- export type PaletteActionId = 'copy-link' | 'log-out';
343
- export interface PaletteItem {
344
- /** Stable within a render pass; used for trackBy and active-row identity. */
345
- id: string;
346
- kind: PaletteItemKind;
347
- /** Raw display text, used for ranking; rendered unless `labelKey` is set. */
348
- label: string;
349
- /** Secondary context line — breadcrumb section, or a person's email. */
350
- detail: string;
351
- /** i18n key for `detail` when the section is chrome (account entries). */
352
- detailKey?: string;
353
- icon: string;
354
- /** Present for `page` and `person`; absent for `ask-ai`. */
355
- path?: string;
356
- /**
357
- * The source nav entry for a `page`. Carried through so activation can ask
358
- * the index whether opening it needs a subscription-context switch first.
359
- */
360
- entry?: NavEntry;
204
+ export declare class CompletionBarComponent {
205
+ segments: number;
206
+ showLabel: boolean;
207
+ /** Optional label override; defaults to the rounded percentage. */
208
+ label: string | null;
209
+ /** Optional aria-label override; defaults to the visible label. */
210
+ ariaLabel: string | null;
361
211
  /**
362
- * i18n key for rows whose label is chrome rather than data (actions, and
363
- * page rows whose menu item or account entry carries a key).
364
- *
365
- * `label` still holds the resolved text so ranking can match what the user
366
- * reads; the key is kept so the template renders the translation rather than
367
- * a string frozen at build time.
212
+ * Optional explanatory tooltip (e.g. "what's missing to reach 100%").
213
+ * Rendered as a body-level portal (C18); no tooltip when null/empty.
368
214
  */
369
- labelKey?: string;
370
- /** Present for `action` rows only. */
371
- action?: PaletteActionId;
215
+ tooltip: string | null;
216
+ /** `value` below this is the low tier. */
217
+ lowThreshold: number;
218
+ /** `value` at/above this is the high tier. */
219
+ highThreshold: number;
220
+ private internalValue;
221
+ /** Completion as a 0–100 percentage. Out-of-range inputs are clamped. */
222
+ set value(v: number);
223
+ get value(): number;
224
+ get clampedValue(): number;
225
+ get filledCount(): number;
226
+ get segmentIndexes(): number[];
227
+ get tier(): CompletionTier;
228
+ get displayLabel(): string;
229
+ static ɵfac: i0.ɵɵFactoryDeclaration<CompletionBarComponent, never>;
230
+ static ɵcmp: i0.ɵɵComponentDeclaration<CompletionBarComponent, "pw-completion-bar", never, {
231
+ "segments": {
232
+ "alias": "segments";
233
+ "required": false;
234
+ };
235
+ "showLabel": {
236
+ "alias": "showLabel";
237
+ "required": false;
238
+ };
239
+ "label": {
240
+ "alias": "label";
241
+ "required": false;
242
+ };
243
+ "ariaLabel": {
244
+ "alias": "ariaLabel";
245
+ "required": false;
246
+ };
247
+ "tooltip": {
248
+ "alias": "tooltip";
249
+ "required": false;
250
+ };
251
+ "lowThreshold": {
252
+ "alias": "lowThreshold";
253
+ "required": false;
254
+ };
255
+ "highThreshold": {
256
+ "alias": "highThreshold";
257
+ "required": false;
258
+ };
259
+ "value": {
260
+ "alias": "value";
261
+ "required": false;
262
+ };
263
+ }, {}, never, never, true, never>;
372
264
  }
373
- export interface PaletteGroup {
374
- /** i18n key for the group heading — the chrome IS translated (C17). */
375
- labelKey: string;
376
- items: PaletteItem[];
377
- }
378
- /** A user as returned by `DashboardService.search` — only the fields we render. */
379
- export interface PalettePerson {
380
- id?: number;
381
- first_name?: string;
382
- last_name?: string;
383
- email?: string;
384
- slug?: string;
265
+ declare namespace records_summary_component_d_exports {
266
+ export { RecordsSummaryComponent };
385
267
  }
386
268
  /**
387
- * Open/close state for the global command palette.
269
+ * Shared table-footer "Showing X of Y items" summary.
388
270
  *
389
- * Kept in a root service (rather than inside the component) so any surface can
390
- * summon the palette — the navbar button, the ⌘K shortcut, an empty-state
391
- * "find a page" link — without reaching for a component reference.
271
+ * Replaces the hand-rolled `<span class="total-records-count">{{ 'Label.RecordsSummary' | transloco: {…} }}</span>`
272
+ * that was previously copy-pasted into every list across main-frontend and the
273
+ * spinout frontends. The `total-records-count` class is owned globally by
274
+ * `@posiwise/core-styles`, so it is applied to the host here and renders
275
+ * identically wherever core-styles is loaded.
276
+ *
277
+ * Usage:
278
+ * <pw-records-summary [showing]="dt?.value?.length ?? 0" [total]="totalRecords" />
392
279
  */
393
- export declare class CommandPaletteService {
394
- private readonly openSubject;
395
- isOpen$: Observable<boolean>;
396
- open(): void;
397
- close(): void;
398
- toggle(): void;
399
- isOpen(): boolean;
400
- static ɵfac: i0.ɵɵFactoryDeclaration<CommandPaletteService, never>;
401
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
402
- }
403
- declare namespace command_palette_component_d_exports {
404
- export { CommandPaletteComponent };
405
- }
406
- export declare class CommandPaletteComponent implements OnInit, AfterViewInit, OnDestroy {
407
- readonly palette: CommandPaletteService;
408
- private readonly navIndex;
409
- private readonly dashboard;
410
- private readonly recents;
411
- private readonly sidebar;
412
- private readonly router;
413
- private readonly transloco;
414
- private readonly cdr;
415
- private readonly appConfigService?;
416
- private readonly toast?;
417
- queryInput?: {
418
- nativeElement: HTMLInputElement;
419
- };
420
- /** The native <dialog>; always in the DOM, so this handle stays valid. */
421
- paletteDialog?: {
422
- nativeElement: HTMLDialogElement;
423
- };
424
- isOpen: boolean;
425
- query: string;
426
- groups: PaletteGroup[];
427
- brandName: string;
428
- readonly shortcutHint: string;
429
- private readonly cursor;
430
- private flat;
431
- private readonly queryChanges;
432
- private readonly destroy$;
433
- private people;
434
- private releaseBackdrop;
435
- constructor(palette: CommandPaletteService, navIndex: NavigationIndexService, dashboard: DashboardService, recents: RecentPagesService, sidebar: CollapsibleSidebarService, router: Router, transloco: TranslocoService, cdr: ChangeDetectorRef, appConfigService?: AppConfigService, toast?: CustomToastService);
436
- ngOnInit(): void;
437
- ngAfterViewInit(): void;
438
- ngOnDestroy(): void;
439
- /** A native close (Escape, or our own close()) mirrored back onto the service. */
440
- onDialogClose(): void;
441
- /** ⌘K / Ctrl-K opens from anywhere; Escape closes. */
442
- onDocumentKeydown(event: KeyboardEvent): void;
443
- onQueryInput(value: string): void;
444
- onKeydown(event: KeyboardEvent): void;
445
- activate(item?: PaletteItem): void;
446
- isActive(item: PaletteItem): boolean;
447
- private activateDeps;
448
- private rebuild;
449
- private reset;
450
- static ɵfac: i0.ɵɵFactoryDeclaration<CommandPaletteComponent, [null, null, null, null, null, null, null, null, {
451
- optional: true;
452
- }, {
453
- optional: true;
454
- }]>;
455
- static ɵcmp: i0.ɵɵComponentDeclaration<CommandPaletteComponent, "pw-command-palette", never, {}, {}, never, never, false, never>;
456
- }
457
- declare namespace confirm_dialog_component_d_exports {
458
- export { ConfirmDialogComponent };
459
- }
460
- export declare class ConfirmDialogComponent {
461
- readonly modal: NgbActiveModal;
462
- config: ConfirmDialogConfig;
463
- constructor(modal: NgbActiveModal);
464
- get tone(): ConfirmDialogTone;
465
- get iconClass(): string;
466
- get titleKey(): string | null;
467
- get titleRaw(): string;
468
- get titleParams(): Record<string, unknown>;
469
- get textKey(): string | null;
470
- get textRaw(): string;
471
- get textParams(): Record<string, unknown>;
472
- get confirmLabelKey(): string;
473
- get confirmLabel(): string;
474
- get cancelLabelKey(): string;
475
- get cancelLabel(): string;
476
- get confirmButtonClass(): string;
477
- confirm(): void;
478
- cancel(): void;
479
- static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmDialogComponent, never>;
480
- static ɵcmp: i0.ɵɵComponentDeclaration<ConfirmDialogComponent, "pw-confirm-dialog", never, {
481
- "config": {
482
- "alias": "config";
483
- "required": false;
484
- };
485
- }, {}, never, never, false, never>;
486
- }
487
- interface SharedModalContext {
488
- modal: {
489
- dismiss: () => void;
490
- close: () => void;
491
- };
492
- }
493
- interface EnrolledUser {
494
- is_owner: boolean;
495
- id: number;
496
- }
497
- interface GroupDefinition {
498
- description: string;
499
- name: string;
500
- }
501
- interface Group {
502
- id?: number;
503
- name?: string;
504
- description?: string;
505
- group_definition_id?: number;
506
- group_definition_name: string;
507
- }
508
- interface Permission {
509
- name: string;
510
- parentName?: string;
511
- displayName: string;
512
- }
513
- interface PermissionTreeData {
514
- permissions: Permission[];
515
- grantedPermissionNames: string[];
516
- }
517
- interface JQuery {
518
- jstree(method: string, ...args: object[]): object;
519
- jstree(options: object): object;
520
- }
521
- declare namespace password_validation_component_d_exports {
522
- export { PasswordValidationComponent };
523
- }
524
- export declare class PasswordValidationComponent extends AppBaseComponent {
525
- private readonly modal;
526
- private readonly cdr;
527
- content: TemplateRef<SharedModalContext>;
528
- passwordRef: ElementRef<HTMLInputElement>;
529
- confirmMessage: string;
530
- destructive: boolean;
531
- successEvent: EventEmitter<boolean>;
532
- password: string;
533
- passwordVisible: boolean;
534
- buttonBusy: boolean;
535
- private modalRef;
536
- constructor(injector: Injector, modal: NgbModal, cdr: ChangeDetectorRef);
537
- get bodyMessage(): string;
538
- open(): void;
539
- validatePassword(): void;
540
- static ɵfac: i0.ɵɵFactoryDeclaration<PasswordValidationComponent, never>;
541
- static ɵcmp: i0.ɵɵComponentDeclaration<PasswordValidationComponent, "pw-password-validation", never, {
542
- "confirmMessage": {
543
- "alias": "confirmMessage";
280
+ export declare class RecordsSummaryComponent {
281
+ /** Number of rows currently rendered (e.g. `dt?.value?.length`). */
282
+ showing: number | null;
283
+ /** Total number of records across all pages. */
284
+ total: number | null;
285
+ static ɵfac: i0.ɵɵFactoryDeclaration<RecordsSummaryComponent, never>;
286
+ static ɵcmp: i0.ɵɵComponentDeclaration<RecordsSummaryComponent, "pw-records-summary", never, {
287
+ "showing": {
288
+ "alias": "showing";
544
289
  "required": false;
545
290
  };
546
- "destructive": {
547
- "alias": "destructive";
291
+ "total": {
292
+ "alias": "total";
548
293
  "required": false;
549
294
  };
550
- }, {
551
- "successEvent": "successEvent";
552
- }, never, ["*"], false, never>;
295
+ }, {}, never, never, true, never>;
553
296
  }
554
- declare namespace pw_tabs_component_d_exports {
555
- export { PwTabsComponent };
297
+ /**
298
+ * The onboarding status every product API returns from its `onboarding_status` tool and
299
+ * `GET onboarding/:subscription_id/status` endpoint (cloudolive-api#441). Product-agnostic: step titles and
300
+ * descriptions are the text the product's master subscription admin wrote; blocked reasons and states arrive
301
+ * as Transloco keys owned by the product.
302
+ */
303
+ export type OnboardingStepState = 'done' | 'next' | 'ready' | 'blocked' | 'waiting' | 'todo' | 'optional' | 'unknown';
304
+ export interface OnboardingStep {
305
+ key: string;
306
+ position: number;
307
+ kind: 'required' | 'optional' | 'system';
308
+ /** The step's title as the admin wrote it. */
309
+ title?: string;
310
+ description?: string | null;
311
+ /** The product's check that decides the step; null = manual, the customer ticks it. */
312
+ check_key?: string | null;
313
+ /** @deprecated Transloco key from before steps became editable; use `title`. */
314
+ title_key?: string;
315
+ /** @deprecated Use `description`. */
316
+ description_key?: string | null;
317
+ route?: string | null;
318
+ /** Slug of the FAQ that explains the step; null when the product API found no FAQ the viewer can open. */
319
+ faq_slug?: string | null;
320
+ activation: boolean;
321
+ admin_only: boolean;
322
+ depends_on: string[];
323
+ state: OnboardingStepState;
324
+ /** True for the one step the customer should act on now. */
325
+ current: boolean;
326
+ reason_key?: string;
327
+ /** The customer's own system's message (e.g. their PSA's error), already truncated. */
328
+ detail?: string;
329
+ meta?: Record<string, unknown>;
330
+ /** False when the step needs an admin and the viewer is not one; null when unknown. */
331
+ can_act: boolean | null;
556
332
  }
557
- export declare class PwTabsComponent extends AppBaseComponent implements OnInit, OnDestroy {
558
- private readonly cdr;
559
- items: MenuItem[];
560
- withSubscription: boolean;
561
- /** Current tab value (route path) for p-tabs */
562
- activeTabValue: string | number;
563
- private routeEventSubscription;
564
- constructor(injector: Injector, cdr: ChangeDetectorRef);
565
- ngOnInit(): void;
566
- /** Arrow function so trackBy is called with correct `this` from template */
567
- trackByItem: (_index: number, item: MenuItem) => string;
568
- getItemValue(item: MenuItem): string;
569
- onTabChange(value: string | number): void;
570
- private updateActiveTab;
571
- ngOnDestroy(): void;
572
- static ɵfac: i0.ɵɵFactoryDeclaration<PwTabsComponent, never>;
573
- static ɵcmp: i0.ɵɵComponentDeclaration<PwTabsComponent, "pw-tabs", never, {
574
- "items": {
575
- "alias": "items";
576
- "required": false;
577
- };
578
- "withSubscription": {
579
- "alias": "withSubscription";
580
- "required": false;
581
- };
582
- }, {}, never, never, false, never>;
333
+ export interface OnboardingStatus {
334
+ subscription_id: number;
335
+ feature_key: string | null;
336
+ status: 'ok' | 'not_applicable' | 'unavailable';
337
+ activated: boolean;
338
+ next_step: string | null;
339
+ progress: {
340
+ done: number;
341
+ total: number;
342
+ };
343
+ steps: OnboardingStep[];
583
344
  }
584
- declare namespace date_range_picker_component_d_exports {
585
- export { DateRangePickerComponent };
345
+ /**
346
+ * The subscription has a checklist with mandatory steps still to do. Products use it to hold a user on /home
347
+ * at login (common-services ONBOARDING_STATUS_SOURCES).
348
+ */
349
+ export declare function hasOpenMandatorySteps(status: OnboardingStatus | null | undefined): boolean;
350
+ declare namespace onboarding_checklist_component_d_exports {
351
+ export { OnboardingChecklistComponent };
586
352
  }
587
- export declare class DateRangePickerComponent implements AfterViewInit {
588
- pickerDirective: DaterangepickerDirective;
589
- private initialized;
590
- selectedDateRange: {
591
- startDate: moment.Moment;
592
- endDate: moment.Moment;
593
- };
594
- dateRanges: any;
595
- /** Optional unique id for the input (for accessibility). Defaults to 'date-range-picker-input'. */
596
- inputId: string;
597
- dateRangeChange: EventEmitter<{
598
- startDate: moment.Moment;
599
- endDate: moment.Moment;
353
+ /**
354
+ * Presentational onboarding checklist (cloudolive-api#441). Product-agnostic: the host fetches the
355
+ * status from its own product API and passes it in, plus the route placeholders' values.
356
+ *
357
+ * Gating (AI54) is the host's: pass `loading` until the request resolves and `loadFailed` on error.
358
+ * Renders nothing for `not_applicable` / `unavailable` — "no onboarding" and "can't tell right now"
359
+ * both hide the card rather than show an empty or broken one.
360
+ */
361
+ export declare class OnboardingChecklistComponent implements OnChanges {
362
+ status: OnboardingStatus | null;
363
+ loading: boolean;
364
+ loadFailed: boolean;
365
+ /** Values for the `{slug}` / `{subscription_id}` placeholders in step routes. */
366
+ slug: string;
367
+ subscriptionId: number | null;
368
+ /** The host is saving a manual tick: the tick controls are disabled meanwhile. */
369
+ busy: boolean;
370
+ readonly retry: EventEmitter<void>;
371
+ /** A manual step was ticked (completed: true) or unticked; the host saves it and passes the new status. */
372
+ readonly markDone: EventEmitter<{
373
+ key: string;
374
+ completed: boolean;
600
375
  }>;
601
- onDateRangeSelect(event: {
602
- startDate: moment.Moment;
603
- endDate: moment.Moment;
604
- }): void;
605
- ngAfterViewInit(): void;
606
- onClearDate(): void;
607
- openDatepicker(): void;
608
- refreshPicker(): void;
609
- static ɵfac: i0.ɵɵFactoryDeclaration<DateRangePickerComponent, never>;
610
- static ɵcmp: i0.ɵɵComponentDeclaration<DateRangePickerComponent, "app-date-picker", never, {
611
- "selectedDateRange": {
612
- "alias": "selectedDateRange";
376
+ readonly doneIcon: IconDefinition;
377
+ readonly helpIcon: IconDefinition;
378
+ readonly expandIcon: IconDefinition;
379
+ readonly collapseIcon: IconDefinition;
380
+ /**
381
+ * Whether the steps below the progress line are shown. Collapsed by default, so the card stays a
382
+ * one-line progress summary on /home until someone opens it; their choice is remembered per
383
+ * subscription in this browser.
384
+ */
385
+ expanded: boolean;
386
+ ngOnChanges(changes: SimpleChanges): void;
387
+ toggle(): void;
388
+ get visible(): boolean;
389
+ /** Recommended steps, done and total, shown next to the mandatory progress ("+ 1 of 3 recommended"). */
390
+ get recommended(): {
391
+ done: number;
392
+ total: number;
393
+ };
394
+ /** One segment per mandatory step, so the bar reads as "steps done", not an abstract percentage. */
395
+ get progressSegments(): number[];
396
+ /**
397
+ * Every required step is done. Deliberately NOT `status.activated`: activation is the product's
398
+ * milestone (e.g. a first finalised reconciliation) and can be reached with required steps still
399
+ * open, which made "You're all set" sit above "5 of 8 steps done".
400
+ */
401
+ get allDone(): boolean;
402
+ /**
403
+ * Mandatory steps (they count towards progress) and recommended ones (`kind: 'optional'`), listed
404
+ * under their own headings instead of a label repeated on every row.
405
+ */
406
+ get groups(): {
407
+ key: string;
408
+ labelKey: string;
409
+ steps: OnboardingStep[];
410
+ }[];
411
+ /** The group heading already says "Recommended", so an open optional step reads "To do". */
412
+ stateLabelKey(step: OnboardingStep): string;
413
+ get currentStep(): OnboardingStep | null;
414
+ icon(step: OnboardingStep): IconDefinition;
415
+ routeFor(step: OnboardingStep): string | null;
416
+ /** /{subscription slug}/faq/{faq slug} (the app's `:slug/faq/:id` route); null when there is no FAQ. */
417
+ faqHref(step: OnboardingStep): string | null;
418
+ /** A step's call to action; null when there is nothing for this viewer to click. */
419
+ actionKey(step: OnboardingStep): string | null;
420
+ /**
421
+ * A manual step the viewer can tick: no check decides it (check_key null), its state is known, and the
422
+ * viewer may act on it (an admin-only step needs an admin).
423
+ */
424
+ canTick(step: OnboardingStep): boolean;
425
+ tick(step: OnboardingStep): void;
426
+ static ɵfac: i0.ɵɵFactoryDeclaration<OnboardingChecklistComponent, never>;
427
+ static ɵcmp: i0.ɵɵComponentDeclaration<OnboardingChecklistComponent, "pw-onboarding-checklist", never, {
428
+ "status": {
429
+ "alias": "status";
613
430
  "required": false;
614
431
  };
615
- "dateRanges": {
616
- "alias": "dateRanges";
432
+ "loading": {
433
+ "alias": "loading";
617
434
  "required": false;
618
435
  };
619
- "inputId": {
620
- "alias": "inputId";
436
+ "loadFailed": {
437
+ "alias": "loadFailed";
438
+ "required": false;
439
+ };
440
+ "slug": {
441
+ "alias": "slug";
442
+ "required": false;
443
+ };
444
+ "subscriptionId": {
445
+ "alias": "subscriptionId";
446
+ "required": false;
447
+ };
448
+ "busy": {
449
+ "alias": "busy";
621
450
  "required": false;
622
451
  };
623
452
  }, {
624
- "dateRangeChange": "dateRangeChange";
625
- }, never, never, false, never>;
453
+ "retry": "retry";
454
+ "markDone": "markDone";
455
+ }, never, never, true, never>;
626
456
  }
627
- declare namespace permission_tree_component_d_exports {
628
- export { PermissionTreeComponent };
457
+ declare namespace resource_shared_components_module_d_exports {
458
+ export { ResourceSharedComponentsModule };
629
459
  }
630
- export declare class PermissionTreeComponent implements AfterViewInit, OnChanges {
631
- private readonly _element;
632
- data: PermissionTreeData;
633
- private _$tree;
634
- private _createdTreeBefore;
635
- constructor(_element: ElementRef);
636
- ngOnChanges(simple: SimpleChanges): void;
637
- ngAfterViewInit(): void;
638
- getGrantedPermissionNames(): string[];
639
- private refreshTree;
640
- static ɵfac: i0.ɵɵFactoryDeclaration<PermissionTreeComponent, never>;
641
- static ɵcmp: i0.ɵɵComponentDeclaration<PermissionTreeComponent, "permission-tree", never, {
642
- "data": {
643
- "alias": "data";
644
- "required": false;
645
- };
646
- }, {}, never, never, false, never>;
460
+ export declare class ResourceSharedComponentsModule {
461
+ static ɵfac: i0.ɵɵFactoryDeclaration<ResourceSharedComponentsModule, never>;
462
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ResourceSharedComponentsModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i2.ReactiveFormsModule, typeof i3$1.RouterModule, typeof i4$1.FontAwesomeModule, typeof i5$1.AppLoaderModule, typeof i6.CoreTranslocoModule, typeof i7.DirectivesModule, typeof i8.ButtonModule, typeof i9.NgbTooltipModule, typeof i10.TooltipModule, typeof i11.ProgressSpinnerModule, typeof i12$1.AutoCompleteModule, typeof i13$1.DragDropModule, typeof i14.FieldErrorDisplayModule, typeof i14.ProfileImageCropperModule, typeof i14.ResourceHeaderModule, typeof NoDataComponent, typeof InputContainerComponent, typeof CompletionBarComponent, typeof RecordsSummaryComponent, typeof OnboardingChecklistComponent], [typeof i14.ProfileImageCropperModule, typeof i14.ResourceHeaderModule, typeof InputContainerComponent, typeof NoDataComponent, typeof CompletionBarComponent, typeof RecordsSummaryComponent, typeof OnboardingChecklistComponent, typeof i8.ButtonModule, typeof i13$1.DragDropModule, typeof i11.ProgressSpinnerModule, typeof i12$1.AutoCompleteModule, typeof i10.TooltipModule, typeof i14.FieldErrorDisplayModule]>;
463
+ static ɵinj: i0.ɵɵInjectorDeclaration<ResourceSharedComponentsModule>;
647
464
  }
648
- declare namespace privacy_and_tos_component_d_exports {
649
- export { PrivacyAndTosComponent };
465
+ declare namespace collapsible_sidebar_trigger_directive_d_exports {
466
+ export { CollapsibleSidebarTriggerDirective };
650
467
  }
651
468
  /**
652
- * Public routes (`data.public`) show the policy at `/privacy-policy[/:slug]`; without a slug, the
653
- * visitor's domain default. Signed-in pages and the embedded `[productId]` use show the policy of
654
- * that product, resolved to a slug so the id never reaches a URL; with no signed-in user they fall
655
- * back to the domain default rather than waiting forever.
469
+ * pwCollapsibleSidebarTrigger
470
+ *
471
+ * Directive that makes an element a trigger for the collapsible sidebar.
472
+ * Useful for cog icons or buttons that should expand the sidebar when clicked.
473
+ *
474
+ * Usage:
475
+ * ```html
476
+ * <button pwCollapsibleSidebarTrigger [contentId]="'posiwise-brain'">
477
+ * <i class="pi pi-cog"></i>
478
+ * </button>
479
+ * ```
656
480
  */
657
- export declare class PrivacyAndTosComponent extends AppBaseComponent implements OnInit {
658
- private readonly legalPages;
659
- private readonly cdr;
660
- productId: number;
661
- data: {
662
- privacy?: string;
663
- tos?: string;
664
- tos_updated_at?: string;
665
- };
666
- privacyServiceId: number;
667
- readonly routers: {
668
- globalConfigDetails: string;
669
- adminCredentialsDetails: string;
670
- subscriptionCredentialDetails: string;
671
- newsletter: string;
672
- mailerDetails: string;
673
- newsletterItemDetails: string;
674
- newsletterItemView: string;
675
- newslettersUserList: string;
676
- newsletterDetails: string;
677
- permissionsList: string;
678
- permissionsDetails: string;
679
- rolesDetails: string;
680
- productDetails: string;
681
- productsUserList: string;
682
- feedbackQuestions: string;
683
- feedbackQuestionsDetails: string;
684
- subscriptionDetails: string;
685
- subscriptionProductDetails: string;
686
- tipsDetails: string;
687
- tosAndPrivacyDetails: string;
688
- tosAndPrivacyView: string;
689
- usersDetails: string;
690
- domainConfig: string;
691
- domainConfigDetails: string;
692
- loginNotifications: string;
693
- incidentConfig: string;
694
- incidentDetails: string;
695
- faqConfig: string;
696
- faqDetails: string;
697
- inviteUsers: string;
698
- subscriptionList: string;
699
- createResource: string;
700
- createTag: string;
701
- tags: string;
702
- posts: string;
703
- resourcesList: string;
704
- };
705
- tabId: LegalTab;
706
- isPublic: boolean;
707
- isLoaded: boolean;
708
- tocPrivacy: {
709
- id: string;
710
- text: string;
711
- }[];
712
- tocTos: {
713
- id: string;
714
- text: string;
715
- }[];
716
- private readonly destroyRef;
717
- get companyName(): string;
718
- get companyEmail(): string;
719
- constructor(legalPages: LegalPagesService, injector: Injector, cdr: ChangeDetectorRef);
720
- /** Edit affordance is restricted to (Master) Subscription Admins who can reach /admin/tos. */
721
- get canEditPolicy(): boolean;
722
- ngOnInit(): void;
723
- private productSlug;
724
- private policyIdOf;
725
- private show;
726
- private parse;
727
- private buildToc;
728
- static ɵfac: i0.ɵɵFactoryDeclaration<PrivacyAndTosComponent, never>;
729
- static ɵcmp: i0.ɵɵComponentDeclaration<PrivacyAndTosComponent, "pw-privacy-and-tos", never, {
730
- "productId": {
731
- "alias": "productId";
481
+ export declare class CollapsibleSidebarTriggerDirective {
482
+ private readonly sidebarService;
483
+ /**
484
+ * The ID of the sidebar content to load when this trigger is clicked
485
+ */
486
+ contentId: string;
487
+ /**
488
+ * Optional tooltip text shown on hover
489
+ */
490
+ tooltipText: string;
491
+ /**
492
+ * Handle click event to load sidebar content
493
+ */
494
+ onClick(event: MouseEvent): void;
495
+ static ɵfac: i0.ɵɵFactoryDeclaration<CollapsibleSidebarTriggerDirective, never>;
496
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CollapsibleSidebarTriggerDirective, "[pwCollapsibleSidebarTrigger]", never, {
497
+ "contentId": {
498
+ "alias": "contentId";
732
499
  "required": false;
733
500
  };
734
- }, {}, never, never, false, never>;
735
- }
736
- declare namespace splash_component_d_exports {
737
- export { SplashComponent };
738
- }
739
- export declare class SplashComponent {
740
- static ɵfac: i0.ɵɵFactoryDeclaration<SplashComponent, never>;
741
- static ɵcmp: i0.ɵɵComponentDeclaration<SplashComponent, "ng-component", never, {}, {}, never, never, false, never>;
501
+ "tooltipText": {
502
+ "alias": "tooltipText";
503
+ "required": false;
504
+ };
505
+ }, {}, never, never, true, never>;
742
506
  }
743
- declare namespace authenticator_component_d_exports {
744
- export { AuthenticatorComponent };
507
+ declare namespace pw_cookie_banner_component_d_exports {
508
+ export { PwCookieBannerComponent };
745
509
  }
746
- export declare class AuthenticatorComponent extends AppBaseComponent implements OnInit {
747
- private readonly authService;
748
- private readonly cdr;
749
- token: string;
750
- constructor(authService: AuthService, injector: Injector, cdr: ChangeDetectorRef);
510
+ export declare class PwCookieBannerComponent implements OnInit {
511
+ private readonly document;
512
+ private readonly translation;
513
+ title: string | null;
514
+ message: string | null;
515
+ acceptLabel: string | null;
516
+ privacyLinkLabel: string | null;
517
+ privacyLinkUrl: string | null;
518
+ privacyFallbackUrl: string;
519
+ cookieKey: string;
520
+ cookieTtlDays: number;
521
+ readonly visible: import("@angular/core").WritableSignal<boolean>;
522
+ readonly leaving: import("@angular/core").WritableSignal<boolean>;
523
+ readonly role = "region";
524
+ get ariaLabel(): string;
751
525
  ngOnInit(): void;
752
- static ɵfac: i0.ɵɵFactoryDeclaration<AuthenticatorComponent, never>;
753
- static ɵcmp: i0.ɵɵComponentDeclaration<AuthenticatorComponent, "pw-authenticator", never, {}, {}, never, never, false, never>;
754
- }
755
- declare namespace clearbit_icon_component_d_exports {
756
- export { ClearBitIconComponent };
757
- }
758
- interface MonogramTint {
759
- bg: string;
760
- fg: string;
761
- }
762
- export declare class ClearBitIconComponent implements OnChanges {
763
- src: string | null;
764
- altText: string;
765
- /** Company name — drives the initials shown when no real logo resolves. */
766
- name: string;
767
- /** Square edge length in px — applied to both the logo image and the monogram tile. */
768
- size: number;
769
- /** Layout/margin classes for the rendered icon — override for centred contexts. */
770
- iconClass: string;
771
- logoSrc: string | null;
772
- showFallback: boolean;
773
- initials: string;
774
- tint: MonogramTint;
775
- get tileRadius(): number;
776
- get tileFontSize(): number;
777
- ngOnChanges(): void;
778
- /** Called when a resolved logo URL fails to load — degrade to the monogram. */
779
- onLogoError(): void;
780
- private buildMonogram;
781
- private static deriveInitials;
782
- private static hash;
783
- static ɵfac: i0.ɵɵFactoryDeclaration<ClearBitIconComponent, never>;
784
- static ɵcmp: i0.ɵɵComponentDeclaration<ClearBitIconComponent, "pw-clearbit-icon", never, {
785
- "src": {
786
- "alias": "src";
526
+ get resolvedPrivacyUrl(): string;
527
+ accept(): void;
528
+ private animateOut;
529
+ private hasConsentCookie;
530
+ private setConsentCookie;
531
+ static ɵfac: i0.ɵɵFactoryDeclaration<PwCookieBannerComponent, never>;
532
+ static ɵcmp: i0.ɵɵComponentDeclaration<PwCookieBannerComponent, "pw-cookie-banner", never, {
533
+ "title": {
534
+ "alias": "title";
787
535
  "required": false;
788
536
  };
789
- "altText": {
790
- "alias": "altText";
537
+ "message": {
538
+ "alias": "message";
791
539
  "required": false;
792
540
  };
793
- "name": {
794
- "alias": "name";
541
+ "acceptLabel": {
542
+ "alias": "acceptLabel";
795
543
  "required": false;
796
544
  };
797
- "size": {
798
- "alias": "size";
545
+ "privacyLinkLabel": {
546
+ "alias": "privacyLinkLabel";
799
547
  "required": false;
800
548
  };
801
- "iconClass": {
802
- "alias": "iconClass";
549
+ "privacyLinkUrl": {
550
+ "alias": "privacyLinkUrl";
803
551
  "required": false;
804
552
  };
805
- }, {}, never, never, false, never>;
806
- }
807
- declare namespace coming_soon_component_d_exports {
808
- export { ComingSoonComponent };
809
- }
810
- export declare class ComingSoonComponent {
811
- message: string;
812
- static ɵfac: i0.ɵɵFactoryDeclaration<ComingSoonComponent, never>;
813
- static ɵcmp: i0.ɵɵComponentDeclaration<ComingSoonComponent, "pw-coming-soon", never, {
814
- "message": {
815
- "alias": "message";
553
+ "privacyFallbackUrl": {
554
+ "alias": "privacyFallbackUrl";
555
+ "required": false;
556
+ };
557
+ "cookieKey": {
558
+ "alias": "cookieKey";
559
+ "required": false;
560
+ };
561
+ "cookieTtlDays": {
562
+ "alias": "cookieTtlDays";
816
563
  "required": false;
817
564
  };
818
- }, {}, never, never, false, never>;
565
+ }, {}, never, never, true, never>;
819
566
  }
820
- declare namespace collapsible_sidebar_keyboard_shortcut_directive_d_exports {
821
- export { CollapsibleSidebarKeyboardShortcutDirective };
567
+ declare namespace pw_brain_chat_safe_markdown_pipe_d_exports {
568
+ export { SafeMarkdownPipe };
822
569
  }
823
570
  /**
824
- * Listens for Ctrl+Shift+A globally and toggles the PosiWise Assistant chat panel.
825
- * Applied via hostDirectives on CollapsibleSidebarComponent.
571
+ * Converts a Brain assistant message string (containing a safe subset of
572
+ * Markdown) into an HTML string suitable for `[innerHTML]` binding.
573
+ *
574
+ * Deliberately returns a plain `string`, NOT a `SafeHtml`: Angular sanitizes any
575
+ * string bound to `[innerHTML]`, so the output passes through DomSanitizer on
576
+ * the way to the DOM. `renderMarkdown` already HTML-escapes every user-sourced
577
+ * fragment and allow-lists hrefs, which makes this defence in depth rather than
578
+ * a substitute — two independent passes, neither trusting the other.
579
+ *
580
+ * Nothing is lost by it. The renderer only emits `<a href target rel>`,
581
+ * `<strong>`, `<em>` and `<br>`; Angular's own allow-lists carry `href`
582
+ * (URI_ATTRS) and `rel`/`target` (HTML_ATTRS), so sanitized output is
583
+ * byte-identical to the rendered input. An earlier revision reached for
584
+ * `bypassSecurityTrustHtml` here, which bought nothing and disabled the
585
+ * platform's last line of defence if the renderer ever regressed.
586
+ *
587
+ * Applied only to assistant bubbles; user bubbles keep plain-text rendering.
588
+ *
589
+ * The app-relative paths Brain answers carry (`/settings/communication`) are
590
+ * resolved against `links.frontend_link` from the domain metadata — the same
591
+ * host `auth.service` and `linkedin-confirmation` build their URLs from.
592
+ * `links` lives on the CONFIG object, not on the service, and the service's
593
+ * only public accessor is `appConfig$`, so the latest value is cached here;
594
+ * config resolves at app boot, long before a chat bubble renders.
826
595
  */
827
- export declare class CollapsibleSidebarKeyboardShortcutDirective {
828
- private readonly sidebarService;
829
- constructor(sidebarService: CollapsibleSidebarService);
830
- onKeydown(event: KeyboardEvent): void;
831
- static ɵfac: i0.ɵɵFactoryDeclaration<CollapsibleSidebarKeyboardShortcutDirective, never>;
832
- static ɵdir: i0.ɵɵDirectiveDeclaration<CollapsibleSidebarKeyboardShortcutDirective, "[pwCollapsibleSidebarKeyboardShortcut]", never, {}, {}, never, never, true, never>;
833
- }
834
- declare namespace collapsible_sidebar_component_d_exports {
835
- export { CollapsibleSidebarComponent };
836
- }
837
- export declare class CollapsibleSidebarComponent implements OnInit, AfterViewInit, OnDestroy {
838
- private readonly sidebarService;
839
- private readonly injector;
840
- private readonly cdr;
841
- private readonly document;
842
- private readonly appConfigService?;
843
- contentContainer: ViewContainerRef;
844
- /**
845
- * When true, the drawer is a flex sibling of the page: main content shrinks (GitLab issue-board style).
846
- * When false, the drawer is fixed over the viewport with a backdrop.
847
- */
848
- embedInLayout: boolean;
596
+ declare class SafeMarkdownPipe implements PipeTransform, OnDestroy {
597
+ private readonly navigationIndex;
598
+ private baseUrl;
599
+ private readonly configSub;
600
+ constructor();
601
+ ngOnDestroy(): void;
602
+ transform(text: string): string;
849
603
  /**
850
- * When false, width/transform transitions are off so the first paint after
851
- * a full page load does not briefly animate or show border/shadow flash.
604
+ * Every page the palette can reach, used to correct a path the model got
605
+ * nearly right. An unknown path is left alone, never suppressed.
852
606
  */
853
- transitionReady: boolean;
854
- isExpanded: boolean;
855
- currentContent: SidebarContent | null;
856
- private componentRef;
857
- private navbarOffsetTracker;
858
- private readonly destroy$;
859
- constructor(sidebarService: CollapsibleSidebarService, injector: Injector, cdr: ChangeDetectorRef, document: Document, appConfigService?: AppConfigService);
860
- ngOnInit(): void;
861
- ngAfterViewInit(): void;
862
- ngOnDestroy(): void;
863
- /** Register (idempotently) the Assistant panel under the given brand. */
864
- private registerBrainPanel;
865
- /** Delegate a header action to the same-named method on the mounted panel. */
866
- invokeHeaderAction(action: SidebarHeaderAction): void;
607
+ private knownPaths;
867
608
  /**
868
- * Load and render dynamic component based on sidebar content
609
+ * Slug the router scopes dashboard pages under (`:slug/faq/:id`). Read per
610
+ * call rather than cached: the user can switch subscription mid-session.
869
611
  */
870
- private loadComponent;
871
- private clearComponent;
872
- closeSidebar(): void;
873
- toggleSidebar(): void;
874
- static ɵfac: i0.ɵɵFactoryDeclaration<CollapsibleSidebarComponent, [null, null, null, null, {
875
- optional: true;
876
- }]>;
877
- static ɵcmp: i0.ɵɵComponentDeclaration<CollapsibleSidebarComponent, "pw-collapsible-sidebar", never, {
878
- "embedInLayout": {
879
- "alias": "embedInLayout";
880
- "required": false;
881
- };
882
- }, {}, never, never, false, [{
883
- directive: typeof CollapsibleSidebarKeyboardShortcutDirective;
884
- inputs: {};
885
- outputs: {};
886
- }]>;
887
- static ngAcceptInputType_embedInLayout: unknown;
888
- }
889
- interface BrainChatPrompt {
890
- text: string;
891
- icon: string;
612
+ private subscriptionSlug;
613
+ static ɵfac: i0.ɵɵFactoryDeclaration<SafeMarkdownPipe, never>;
614
+ static ɵpipe: i0.ɵɵPipeDeclaration<SafeMarkdownPipe, "safeMarkdown", true>;
892
615
  }
893
- interface BrainChatQuickAction extends BrainChatPrompt {
894
- label: string;
616
+ declare namespace pw_brain_chat_thread_directive_d_exports {
617
+ export { PwBrainChatThreadDirective };
895
618
  }
896
- declare const SUGGESTED_PROMPTS: readonly BrainChatPrompt[];
897
- declare const QUICK_ACTIONS: readonly BrainChatQuickAction[];
898
- /** Seed assistant greeting for a fresh conversation (also used by New chat). */
899
- declare const GREETING = "Hi — I can answer questions about your account and run approved actions. Try “show my API stats”.";
900
619
  /**
901
- * Identity of the Conversational UI Builder dynamic page the user is
902
- * currently viewing (#933 — page-aware Brain). The dynamic-page host sets
903
- * this on load and clears it on destroy; the PosiWise Brain chat widget
904
- * reads it so Bedrock knows which page "this page" / "the current page"
905
- * refers to and can target `ui_update_layout` with the exact page_key +
906
- * subscription_id instead of guessing the landing-page tools.
620
+ * Intercepts clicks on `<a>` elements rendered inside assistant markdown
621
+ * bubbles. Internal paths (e.g. /account/details) are routed via Angular's
622
+ * Router so the SPA does not do a full-page reload. External URLs fall
623
+ * through to the browser's default behaviour (target=_blank already set by
624
+ * SafeMarkdownPipe / renderMarkdown for external links).
907
625
  *
908
- * `null` whenever no dynamic page is mounted.
626
+ * Applied via the `pwBrainChatThread` attribute on the chat thread div.
909
627
  */
910
- export interface DynamicPageContext {
911
- pageKey: string;
912
- subscriptionId: number;
913
- }
914
- export declare class DynamicPageContextService {
915
- private _current;
916
- set(ctx: DynamicPageContext): void;
917
- clear(): void;
918
- get current(): DynamicPageContext | null;
919
- static ɵfac: i0.ɵɵFactoryDeclaration<DynamicPageContextService, never>;
920
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
628
+ declare class PwBrainChatThreadDirective {
629
+ private readonly router;
630
+ onClick(event: MouseEvent): void;
631
+ static ɵfac: i0.ɵɵFactoryDeclaration<PwBrainChatThreadDirective, never>;
632
+ static ɵdir: i0.ɵɵDirectiveDeclaration<PwBrainChatThreadDirective, "[pwBrainChatThread]", never, {}, {}, never, never, true, never>;
921
633
  }
634
+ /** `docmost/Onboarding/a.md` → `docmost/Onboarding`; a top-level file → ''. */
635
+ declare function folderOf(file: KnowledgeFile): string;
636
+ /** Colour key for the folder badge: `docmost/Onboarding` shares `docmost`'s tint. */
637
+ declare function topFolderOf(file: KnowledgeFile): string;
638
+ declare function formatSize(bytes: number): string;
922
639
  /**
923
- * Shared shapes for the PosiWise Brain chat panel. Extracted from
924
- * `pw-brain-chat.component.ts` so the component stays under the C1
925
- * line cap while the scroll/confirmation helpers can reuse the types.
926
- * Re-exported from the component to preserve the public API surface.
640
+ * One distinct soft tint per top-level folder, from core-styles' 24-hue ramp
641
+ * (`.badge.bg-cyan-1` … `-24`). Folders are sorted so the same set always gets
642
+ * the same colours, and successive folders step 7 places round the ramp (105°;
643
+ * 7 is coprime with 24, so all 24 hues are used before any repeats).
644
+ * `appDynamicBadge`'s 9-bucket hash collided here and kept to a narrow green
645
+ * band, so two folders could not be told apart.
927
646
  */
928
- type ChatMessageRole = 'user' | 'assistant';
929
- interface PendingConfirmation {
930
- confirmation_token: string;
931
- risk_level?: string | null;
932
- summary?: string | null;
933
- target_service?: string | null;
934
- target_tool?: string | null;
935
- diff?: MCPFieldDiff | null;
936
- }
937
- interface ChatMessage {
938
- role: ChatMessageRole;
939
- text: string;
940
- pending?: PendingConfirmation;
941
- /** Set to true only on messages produced by the prose summariser (mcp_prose_summariser.py).
942
- * Controls whether the bubble renders via safeMarkdown pipe ([innerHTML]) or as plain text (<pre>).
943
- * Error messages, confirmation summaries, and navigation notices stay plain. */
944
- markdownEnabled?: boolean;
945
- /** Epoch ms when the message was created. Optional — messages hydrated
946
- * from pre-timestamp storage lack it and render without a time. */
947
- at?: number;
948
- /** Page-aware grounding (#933): human label of the page this answer's
949
- * documentation is about (from `grounded_source_page`). When set, the bubble
950
- * renders a "Documented on: {sourcePage}" provenance chip. Absent → no chip. */
951
- sourcePage?: string | null;
952
- }
953
- /** Lifecycle of a file the user dropped on the composer. */
954
- /** `choosing`: several upload tools accept this file — held until the user picks one. */
955
- type ChatAttachmentStatus = 'choosing' | 'uploading' | 'ready' | 'error';
647
+ declare function folderBadgeClasses(files: KnowledgeFile[]): Map<string, string>;
648
+ /** i18n key for why `file` can't be uploaded, or null. brain-api re-checks all of it. */
649
+ declare function uploadProblem(file: File): string | null;
956
650
  /**
957
- * A file staged for the next message. The bytes are POSTed straight to S3 by
958
- * `DirectUploadService`; what survives here is the opaque `key` the server
959
- * hands back, which is all that ever reaches the chat request.
651
+ * Footer counts. This table pages and searches in the browser, so unlike a lazy
652
+ * table `dt.value` is every file: count the current page of the current search,
653
+ * or the footer reads "Showing 60 of 60" on a 50-row page.
960
654
  */
961
- interface ChatAttachment {
962
- name: string;
963
- size: number;
964
- status: ChatAttachmentStatus;
965
- /** 0-100 while uploading; 100 once staged. */
966
- percent: number;
967
- /** Opaque staging key. Absent until the upload lands. */
968
- key?: string;
969
- /** Namespaced tool that consumes this file, from its advertised capability. */
970
- tool?: string;
971
- /** That tool's advertised title, e.g. "Set Your Profile Picture". */
972
- title?: string;
973
- /** Human-readable failure, shown on the chip. */
974
- error?: string;
655
+ declare function matchingCount(filtered: unknown[] | null | undefined, files: KnowledgeFile[]): number;
656
+ declare function shownOnPage(first: number, pageSize: number, matching: number): number;
657
+ /** Hands a downloaded file to the browser under its own name. */
658
+ declare function saveBlob(blob: Blob, name: string): void;
659
+ declare namespace ai_knowledge_component_d_exports {
660
+ export { AiKnowledgeComponent };
975
661
  }
976
662
  /**
977
- * Owns the composer's file attachment: drag state, the upload, and the single
978
- * staged file. Split out of the component the same way BrainChatDictation and
979
- * BrainChatVoiceChat are, so the panel stays composable and this is testable
980
- * without a TestBed.
981
- *
982
- * What it may accept is DISCOVERED, not configured: brain-api reports the
983
- * upload-capable tools this caller can reach, each carrying its own purpose,
984
- * extensions and size cap. So a product gains a drop affordance by shipping a
985
- * tool that advertises one — with no change here and none in the host app
986
- * beyond naming its API.
663
+ * Documents the Brain reads for one subscription — the tenant's folder
664
+ * (`scope="subscription"`, admins) or the caller's own (`scope="personal"`).
665
+ * brain-api validates every upload; the checks here only spare a round trip.
987
666
  */
988
- declare class BrainChatAttachment {
989
- private readonly uploads;
990
- private readonly apis;
991
- private readonly subscriptionId;
992
- private readonly onChange;
993
- current: ChatAttachment | null;
994
- private readonly drag;
995
- private capabilities;
996
- private readonly choice;
997
- constructor(uploads: DirectUploadService | null, apis: Record<string, BaseHttpService> | null, subscriptionId: () => number | null, onChange: () => void);
998
- discover(source: Observable<{
999
- uploads: MCPUploadCapability[];
1000
- }>, destroy$: Subject<void>): void;
1001
- get enabled(): boolean;
1002
- get busy(): boolean;
1003
- /** Several tools accept the file; nothing is uploaded until one is picked. */
1004
- get choosing(): boolean;
1005
- get choices(): MCPUploadCapability[];
1006
- choiceLabel(capability: MCPUploadCapability): string;
1007
- get ready(): boolean;
1008
- get context(): Record<string, unknown> | null;
1009
- get label(): string;
1010
- get hint(): string;
1011
- get acceptAttr(): string;
1012
- get dragActive(): boolean;
1013
- dragEnter(event: DragEvent): void;
1014
- dragOver(event: DragEvent): void;
1015
- dragLeave(event: DragEvent): void;
1016
- drop(event: DragEvent): void;
1017
- /** Shared by the drop target and the paperclip file input. */
1018
- accept(file: File): void;
1019
- /** The user picked which tool this file is for — only now is it uploaded. */
1020
- choose(capability: MCPUploadCapability): void;
1021
- remove(): void;
1022
- /** Cleared once a planned call used `sent`; a reply asking for details keeps it. */
1023
- clearIfConsumed(sent: ChatAttachment | null): void;
1024
- meta(): string;
1025
- icon(): string;
1026
- private upload;
667
+ export declare class AiKnowledgeComponent implements OnChanges {
668
+ private readonly knowledge;
669
+ private readonly confirmDialog;
670
+ private readonly toast;
671
+ private readonly translation;
672
+ private readonly cdr;
673
+ scope: KnowledgeScope;
674
+ subscriptionId: number | null;
675
+ subscriptionName: string;
676
+ /** "Use my data" off: no uploads and the Brain ignores these files; they can still be removed. */
677
+ useOwnData: boolean;
678
+ fileInput: ElementRef<HTMLInputElement>;
679
+ readonly accept: string;
680
+ readonly pageSize = 50;
681
+ files: KnowledgeFile[];
682
+ searchText: string;
683
+ /** More files exist than one load fetches (see `KnowledgeFilesService.listAllFiles`). */
684
+ truncated: boolean;
685
+ loading: boolean;
686
+ loadFailed: boolean;
687
+ /** brain-api's own reason when storage isn't set up (`storage_unavailable`) — "try again" won't help. */
688
+ unavailableReason: string | null;
689
+ uploading: boolean;
690
+ private folderClasses;
691
+ ngOnChanges(changes: SimpleChanges): void;
692
+ load(): void;
693
+ chooseFile(): void;
694
+ onFileSelected(event: Event): void;
695
+ download(file: KnowledgeFile): void;
696
+ remove(file: KnowledgeFile): void;
697
+ /** Personal files always sit at the top of the member's own folder. */
698
+ get showFolder(): boolean;
699
+ folderOf: typeof folderOf;
700
+ sizeOf: typeof formatSize;
701
+ /** First row of the current page; PrimeNG returns to page 1 on a search. */
702
+ pageFirst: number;
703
+ matchingCount: (dt: Table) => number;
704
+ shownOnPage: (dt: Table) => number;
705
+ folderBadgeClass(file: KnowledgeFile): string;
706
+ private recolourFolders;
707
+ private done;
708
+ static ɵfac: i0.ɵɵFactoryDeclaration<AiKnowledgeComponent, never>;
709
+ static ɵcmp: i0.ɵɵComponentDeclaration<AiKnowledgeComponent, "pw-ai-knowledge", never, {
710
+ "scope": {
711
+ "alias": "scope";
712
+ "required": true;
713
+ };
714
+ "subscriptionId": {
715
+ "alias": "subscriptionId";
716
+ "required": false;
717
+ };
718
+ "subscriptionName": {
719
+ "alias": "subscriptionName";
720
+ "required": false;
721
+ };
722
+ "useOwnData": {
723
+ "alias": "useOwnData";
724
+ "required": false;
725
+ };
726
+ }, {}, never, never, true, never>;
1027
727
  }
1028
728
  /**
1029
- * Drives mic dictation for the Brain chat composer (#22).
1030
- *
1031
- * Toggles recording, folds the partial/final transcripts brain-api relays from
1032
- * Amazon Transcribe into the chat draft — preserving any text the user already
1033
- * typed — and surfaces a friendly status (listening / processing / error) so
1034
- * the user always knows what's happening. Lives outside the component to
1035
- * respect the helper-delegation pattern the chat component already uses
1036
- * (persistence, navigation, diff, etc.) and to keep that component small.
729
+ * What activating a palette row does:
730
+ * - `page` → router navigation to `path`
731
+ * - `person` → router navigation to a user's profile
732
+ * - `action` → run a named command (see `PaletteActionId`)
733
+ * - `ask-ai` → hand the typed query to the PosiWise Brain panel
1037
734
  */
1038
- type DictationPhase = 'idle' | 'listening' | 'processing';
1039
- declare class BrainChatDictation {
1040
- private readonly voice;
1041
- private readonly getDraft;
1042
- private readonly setDraft;
1043
- private readonly changed;
1044
- phase: DictationPhase;
1045
- error: string | null;
1046
- private sub?;
1047
- /** Draft text captured at record-start + each finalized phrase, so live
1048
- * partials update without clobbering what the user already typed. */
1049
- private base;
1050
- constructor(voice: BrainVoiceService | undefined, getDraft: () => string, setDraft: (text: string) => void, changed: () => void);
1051
- /** Convenience for the template — kept for the pulsing-button class. */
1052
- get isRecording(): boolean;
1053
- /** Status text shown next to the mic; `null` when nothing to say. */
1054
- get statusMessage(): string | null;
1055
- /** Mic button handler: start if idle, stop if recording. While
1056
- * "processing" we ignore clicks until the server's final transcript
1057
- * lands. */
1058
- toggle(loading: boolean): void;
1059
- stop(): void;
1060
- /** Unconditionally cancel recording and clear any error, from ANY phase —
1061
- * the overlay's End/Close (stop() only finalizes from 'listening', so it
1062
- * can't dismiss the 'processing' or 'error' states). */
1063
- dismiss(): void;
1064
- /** Tear down with the host component (called from ngOnDestroy). */
1065
- dispose(): void;
1066
- private start;
1067
- private apply;
1068
- private fail;
1069
- }
1070
- interface DiffRow {
1071
- field: string;
1072
- before: string;
1073
- after: string;
1074
- }
1075
- declare function diffRowsFrom(diff?: MCPFieldDiff | null): DiffRow[];
1076
- type VoiceChatState = 'idle' | 'listening' | 'processingSpeech' | 'thinking' | 'fetchingData' | 'speaking' | 'completed' | 'error';
1077
- /** Visual treatment hint for the template — keeps animation choice out of HTML. */
1078
- type VoiceChatVisual = 'idle' | 'pulse' | 'loader' | 'wave' | 'error';
1079
- declare const VOICE_ERROR_MESSAGES: Record<string, string>;
1080
- /** Status copy per state — reassuring, conversational, and never silent. */
1081
- declare const STATE_COPY: Record<VoiceChatState, string>;
1082
- declare const STATE_VISUAL: Record<VoiceChatState, VoiceChatVisual>;
735
+ export type PaletteItemKind = 'page' | 'person' | 'action' | 'ask-ai';
1083
736
  /**
1084
- * Voice Chat controller for the Brain chat composer (#58) — explicit state
1085
- * machine over the WS relay: listening (start) → thinking (`text` role=user)
1086
- * → fetchingData (`tool_use`) → speaking (`speaking_changed`) → listening.
1087
- * Copy/visual vocab lives in pw-brain-chat-voice-copy.ts (C1 line budget).
737
+ * Commands the palette can run itself, for the things a user repeats that are not
738
+ * a destination. Kept to a closed union so a row can never carry an arbitrary
739
+ * callback across the source boundary.
1088
740
  */
1089
- declare class BrainChatVoiceChat {
1090
- private readonly voice;
1091
- private readonly changed;
1092
- /** Called once per completed spoken exchange so the host can record it. */
1093
- private readonly onTurn?;
1094
- state: VoiceChatState;
1095
- error: string | null;
1096
- available: boolean;
1097
- /** Latest user transcript (Sonic ASR) — enriches the `fetchingData` copy. */
1098
- transcript: string;
1099
- /** Assistant reply text for the current turn — streams in alongside the audio. */
1100
- reply: string;
1101
- private sub?;
1102
- constructor(voice: VoiceChatService | undefined, changed: () => void,
1103
- /** Called once per completed spoken exchange so the host can record it. */
1104
- onTurn?: (userText: string, replyText: string) => void);
1105
- get isActive(): boolean;
1106
- /** Back-compat for callers that only care whether audio is playing. */
1107
- get speaking(): boolean;
1108
- /** Animation family the template renders for the current state. */
1109
- get visual(): VoiceChatVisual;
1110
- /** Status text next to the button; `null` when there's nothing to say. */
1111
- get statusMessage(): string | null;
1112
- /** Resolve once on init so the button shows only when voice-api is reachable. */
1113
- resolveAvailability(): Promise<void>;
1114
- /** Voice Chat button handler: start if idle, stop if active. */
1115
- toggle(loading: boolean): void;
1116
- stop(): void;
1117
- /** Tear down with the host component (called from ngOnDestroy). */
1118
- dispose(): void;
1119
- private start;
1120
- private apply;
1121
- private onText;
1122
- private onSpeakingStarted;
1123
- private onSpeakingStopped;
1124
- /** Hand the completed spoken exchange to the host (thread recording), then
1125
- * reset the per-turn buffers. Safe to call with nothing buffered. */
1126
- private flushTurn;
1127
- /** Move forward only while a session is live (ignore stray events post-stop). */
1128
- private advanceTo;
1129
- private fail;
1130
- private setState;
1131
- }
1132
- declare namespace pw_brain_chat_component_d_exports {
1133
- export { ChatMessage, ChatMessageRole, PendingConfirmation, PwBrainChatComponent };
1134
- }
1135
- export declare class PwBrainChatComponent implements OnInit, OnDestroy {
1136
- private readonly orchestrator;
1137
- private readonly localStorage;
1138
- private readonly router;
1139
- private readonly cdr;
1140
- private readonly store;
1141
- private readonly dynamicPageCtx;
1142
- private readonly appConfigService?;
1143
- private readonly brainSocket?;
1144
- private readonly brainVoice?;
1145
- private readonly voiceChatService?;
1146
- private readonly directUpload?;
1147
- private readonly uploadApis?;
1148
- messages: ChatMessage[];
1149
- draft: string;
1150
- loading: boolean;
1151
- streamingStage: string | null;
1152
- streamingProse: string | null;
1153
- brandName: string;
1154
- userFirstName?: string;
1155
- readonly suggestedPrompts: readonly BrainChatPrompt[];
1156
- private conversationId;
1157
- private storage;
1158
- private streamSub?;
1159
- private readonly destroy$;
1160
- readonly diffRows: typeof diffRowsFrom;
1161
- readonly dictation: BrainChatDictation;
1162
- readonly voiceChat: BrainChatVoiceChat;
1163
- readonly attachment: BrainChatAttachment;
1164
- private sentAttachment;
1165
- private readonly threadRef?;
1166
- constructor(orchestrator: MCPOrchestratorService, localStorage: LocalStorage, router: Router, cdr: ChangeDetectorRef, store: Store<AppState>, dynamicPageCtx: DynamicPageContextService, appConfigService?: AppConfigService, brainSocket?: BrainSocketService, brainVoice?: BrainVoiceService, voiceChatService?: VoiceChatService, directUpload?: DirectUploadService, uploadApis?: Record<string, BaseHttpService>);
1167
- ngOnInit(): void;
1168
- private subscribeToServerPush;
1169
- ngOnDestroy(): void;
741
+ export type PaletteActionId = 'copy-link' | 'log-out';
742
+ export interface PaletteItem {
743
+ /** Stable within a render pass; used for trackBy and active-row identity. */
744
+ id: string;
745
+ kind: PaletteItemKind;
746
+ /** Raw display text, used for ranking; rendered unless `labelKey` is set. */
747
+ label: string;
748
+ /** Secondary context line — breadcrumb section, or a person's email. */
749
+ detail: string;
750
+ /** i18n key for `detail` when the section is chrome (account entries). */
751
+ detailKey?: string;
752
+ icon: string;
753
+ /** Present for `page` and `person`; absent for `ask-ai`. */
754
+ path?: string;
1170
755
  /**
1171
- * Paperclip path. The input is reset after every pick so choosing the same
1172
- * file twice in a row still fires `change` (the browser suppresses it
1173
- * otherwise, and "nothing happened" is a maddening bug to hit).
756
+ * The source nav entry for a `page`. Carried through so activation can ask
757
+ * the index whether opening it needs a subscription-context switch first.
1174
758
  */
1175
- pickFile(input: HTMLInputElement): void;
759
+ entry?: NavEntry;
1176
760
  /**
1177
- * The composer teaches the affordance: with a file staged, the next thing
1178
- * to do is send it, with or without a message. Leaving the generic prompt
1179
- * there left people looking for an upload button that does not exist.
761
+ * i18n key for rows whose label is chrome rather than data (actions, and
762
+ * page rows whose menu item or account entry carries a key).
763
+ *
764
+ * `label` still holds the resolved text so ranking can match what the user
765
+ * reads; the key is kept so the template renders the translation rather than
766
+ * a string frozen at build time.
1180
767
  */
1181
- get composerPlaceholder(): string;
1182
- send(): void;
1183
- approve(message: ChatMessage): void;
1184
- cancel(message: ChatMessage): void;
1185
- cancelRequest(): void;
1186
- trackByIndex(index: number, _item: ChatMessage): number;
1187
- usePrompt(text: string): void;
1188
- newChat(): void;
1189
- private handleExecuteResponse;
1190
- private applySuccessResult;
1191
- private handleError;
1192
- private persistConversationId;
1193
- private pushAssistant;
1194
- /** Voice session turn completed — record the spoken exchange in the thread
1195
- * so the conversation survives the overlay (plain text: it was speech). */
1196
- private recordVoiceTurn;
1197
- private stick;
1198
- static ɵfac: i0.ɵɵFactoryDeclaration<PwBrainChatComponent, [null, null, null, null, null, null, {
1199
- optional: true;
1200
- }, {
1201
- optional: true;
1202
- }, {
1203
- optional: true;
1204
- }, {
1205
- optional: true;
1206
- }, {
1207
- optional: true;
1208
- }, {
1209
- optional: true;
1210
- }]>;
1211
- static ɵcmp: i0.ɵɵComponentDeclaration<PwBrainChatComponent, "pw-brain-chat", never, {}, {}, never, never, false, never>;
1212
- }
1213
- declare namespace pw_brain_chat_confirm_component_d_exports {
1214
- export { PwBrainChatConfirmComponent };
768
+ labelKey?: string;
769
+ /** Present for `action` rows only. */
770
+ action?: PaletteActionId;
1215
771
  }
1216
- /**
1217
- * Pending-action confirmation panel for the Brain chat bubble — risk badge,
1218
- * target tool, field-level diff, and Approve/Cancel controls. Extracted from
1219
- * the parent component template so `pw-brain-chat.component.html` stays under
1220
- * the C1 200-line cap. Emits back to the parent, which owns the /confirm call
1221
- * and message mutation (approve/cancel).
1222
- */
1223
- declare class PwBrainChatConfirmComponent {
1224
- pending: PendingConfirmation;
1225
- loading: boolean;
1226
- approveEvent: EventEmitter<void>;
1227
- cancelEvent: EventEmitter<void>;
1228
- readonly diffRows: typeof diffRowsFrom;
1229
- static ɵfac: i0.ɵɵFactoryDeclaration<PwBrainChatConfirmComponent, never>;
1230
- static ɵcmp: i0.ɵɵComponentDeclaration<PwBrainChatConfirmComponent, "pw-brain-chat-confirm", never, {
1231
- "pending": {
1232
- "alias": "pending";
1233
- "required": true;
1234
- };
1235
- "loading": {
1236
- "alias": "loading";
1237
- "required": false;
1238
- };
1239
- }, {
1240
- "approveEvent": "approveEvent";
1241
- "cancelEvent": "cancelEvent";
1242
- }, never, never, false, never>;
772
+ export interface PaletteGroup {
773
+ /** i18n key for the group heading — the chrome IS translated (C17). */
774
+ labelKey: string;
775
+ items: PaletteItem[];
1243
776
  }
1244
- /** A suggested prompt a product adds to the Brain chat welcome, optionally behind a permission. */
1245
- export interface BrainChatProductPrompt extends BrainChatPrompt {
1246
- /** Permission expression (PermissionService.evaluatePermissions); omitted = shown to everyone. */
1247
- permission?: string;
1248
- /** Short chip label above the composer (like "Usage"); omitted = shown on the welcome only. */
1249
- label?: string;
777
+ /** A user as returned by `DashboardService.search` — only the fields we render. */
778
+ export interface PalettePerson {
779
+ id?: number;
780
+ first_name?: string;
781
+ last_name?: string;
782
+ email?: string;
783
+ slug?: string;
1250
784
  }
1251
785
  /**
1252
- * Product-specific suggested prompts, shown before the shared ones (cloudolive-api#441).
786
+ * Open/close state for the global command palette.
1253
787
  *
1254
- * The shared list is the same for every product, so a prompt only one product can answer — "Check my
1255
- * setup" needs that product's `onboarding_status` tool — would show elsewhere and get a dead-end reply.
1256
- * The product app provides it here instead, like HOME_PRODUCT_SECTIONS on /home.
788
+ * Kept in a root service (rather than inside the component) so any surface can
789
+ * summon the palette — the navbar button, the ⌘K shortcut, an empty-state
790
+ * "find a page" link — without reaching for a component reference.
1257
791
  */
1258
- export declare const BRAIN_CHAT_PRODUCT_PROMPTS: InjectionToken<BrainChatProductPrompt[]>;
1259
- /** The product prompts the viewer may see; `canSee` evaluates a permission expression. */
1260
- export declare function visibleProductPrompts(prompts: readonly BrainChatProductPrompt[] | null | undefined, canSee: (permission: string) => boolean): BrainChatProductPrompt[];
1261
- declare namespace pw_brain_chat_quick_component_d_exports {
1262
- export { PwBrainChatQuickComponent };
792
+ export declare class CommandPaletteService {
793
+ private readonly openSubject;
794
+ isOpen$: Observable<boolean>;
795
+ open(): void;
796
+ close(): void;
797
+ toggle(): void;
798
+ isOpen(): boolean;
799
+ static ɵfac: i0.ɵɵFactoryDeclaration<CommandPaletteService, never>;
800
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1263
801
  }
1264
- /**
1265
- * Quick-action chips above the composer: the product's own chips (e.g. "Setup", cloudolive-api#441)
1266
- * the viewer may see, then the shared Usage / Tools / Status. Emits the prompt text; the parent sends it.
1267
- */
1268
- declare class PwBrainChatQuickComponent {
1269
- pick: EventEmitter<string>;
1270
- readonly actions: readonly BrainChatQuickAction[];
1271
- constructor(permission: PermissionService, productPrompts?: BrainChatProductPrompt[] | null);
1272
- static ɵfac: i0.ɵɵFactoryDeclaration<PwBrainChatQuickComponent, [null, {
1273
- optional: true;
1274
- }]>;
1275
- static ɵcmp: i0.ɵɵComponentDeclaration<PwBrainChatQuickComponent, "pw-brain-chat-quick", never, {}, {
1276
- "pick": "pick";
1277
- }, never, never, false, never>;
802
+ declare namespace command_palette_component_d_exports {
803
+ export { CommandPaletteComponent };
1278
804
  }
1279
- declare namespace pw_brain_chat_welcome_component_d_exports {
1280
- export { PwBrainChatWelcomeComponent };
805
+ export declare class CommandPaletteComponent implements OnInit, AfterViewInit, OnDestroy {
806
+ readonly palette: CommandPaletteService;
807
+ private readonly navIndex;
808
+ private readonly dashboard;
809
+ private readonly recents;
810
+ private readonly sidebar;
811
+ private readonly router;
812
+ private readonly transloco;
813
+ private readonly cdr;
814
+ private readonly appConfigService;
815
+ private readonly toast;
816
+ queryInput?: {
817
+ nativeElement: HTMLInputElement;
818
+ };
819
+ /** The native <dialog>; always in the DOM, so this handle stays valid. */
820
+ paletteDialog?: {
821
+ nativeElement: HTMLDialogElement;
822
+ };
823
+ isOpen: boolean;
824
+ query: string;
825
+ groups: PaletteGroup[];
826
+ brandName: string;
827
+ readonly shortcutHint: string;
828
+ private readonly cursor;
829
+ private flat;
830
+ private readonly queryChanges;
831
+ private readonly destroy$;
832
+ private people;
833
+ private releaseBackdrop;
834
+ ngOnInit(): void;
835
+ ngAfterViewInit(): void;
836
+ ngOnDestroy(): void;
837
+ /** A native close (Escape, or our own close()) mirrored back onto the service. */
838
+ onDialogClose(): void;
839
+ /** ⌘K / Ctrl-K opens from anywhere; Escape closes. */
840
+ onDocumentKeydown(event: KeyboardEvent): void;
841
+ onQueryInput(value: string): void;
842
+ onKeydown(event: KeyboardEvent): void;
843
+ activate(item?: PaletteItem): void;
844
+ isActive(item: PaletteItem): boolean;
845
+ private activateDeps;
846
+ private rebuild;
847
+ private reset;
848
+ static ɵfac: i0.ɵɵFactoryDeclaration<CommandPaletteComponent, never>;
849
+ static ɵcmp: i0.ɵɵComponentDeclaration<CommandPaletteComponent, "pw-command-palette", never, {}, {}, never, never, true, never>;
1281
850
  }
1282
- /**
1283
- * First-open welcome state for the Brain chat — greeting + suggested-prompt
1284
- * rows. Extracted from the parent template so `pw-brain-chat.component.html`
1285
- * stays under the C1 200-line cap. Emits the picked prompt text; the parent
1286
- * owns send().
1287
- */
1288
- declare class PwBrainChatWelcomeComponent {
1289
- private readonly permission;
1290
- private readonly productPrompts?;
1291
- /** Signed-in user's first name; when set the greeting reads "Hi {name},". */
1292
- userFirstName?: string;
1293
- prompts: readonly BrainChatPrompt[];
1294
- pick: EventEmitter<string>;
1295
- constructor(permission: PermissionService, productPrompts?: BrainChatProductPrompt[] | null);
1296
- /** The product's own prompts the viewer may see, then the shared ones. */
1297
- get visiblePrompts(): readonly BrainChatPrompt[];
1298
- static ɵfac: i0.ɵɵFactoryDeclaration<PwBrainChatWelcomeComponent, [null, {
1299
- optional: true;
1300
- }]>;
1301
- static ɵcmp: i0.ɵɵComponentDeclaration<PwBrainChatWelcomeComponent, "pw-brain-chat-welcome", never, {
1302
- "userFirstName": {
1303
- "alias": "userFirstName";
1304
- "required": false;
1305
- };
1306
- "prompts": {
1307
- "alias": "prompts";
851
+ export type ConfirmDialogTone = 'destructive' | 'neutral' | 'info';
852
+ export interface ConfirmDialogConfig {
853
+ titleKey?: string;
854
+ title?: string;
855
+ titleParams?: Record<string, unknown>;
856
+ textKey?: string;
857
+ text?: string;
858
+ textParams?: Record<string, unknown>;
859
+ destructive?: boolean;
860
+ confirmOnly?: boolean;
861
+ confirmLabelKey?: string;
862
+ confirmLabel?: string;
863
+ cancelLabelKey?: string;
864
+ cancelLabel?: string;
865
+ icon?: string;
866
+ tone?: ConfirmDialogTone;
867
+ }
868
+ declare namespace confirm_dialog_component_d_exports {
869
+ export { ConfirmDialogComponent };
870
+ }
871
+ export declare class ConfirmDialogComponent {
872
+ readonly modal: NgbActiveModal;
873
+ config: ConfirmDialogConfig;
874
+ get tone(): ConfirmDialogTone;
875
+ get iconClass(): string;
876
+ get titleKey(): string | null;
877
+ get titleRaw(): string;
878
+ get titleParams(): Record<string, unknown>;
879
+ get textKey(): string | null;
880
+ get textRaw(): string;
881
+ get textParams(): Record<string, unknown>;
882
+ get confirmLabelKey(): string;
883
+ get confirmLabel(): string;
884
+ get cancelLabelKey(): string;
885
+ get cancelLabel(): string;
886
+ get confirmButtonClass(): string;
887
+ confirm(): void;
888
+ cancel(): void;
889
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmDialogComponent, never>;
890
+ static ɵcmp: i0.ɵɵComponentDeclaration<ConfirmDialogComponent, "pw-confirm-dialog", never, {
891
+ "config": {
892
+ "alias": "config";
1308
893
  "required": false;
1309
894
  };
1310
- }, {
1311
- "pick": "pick";
1312
- }, never, never, false, never>;
895
+ }, {}, never, never, true, never>;
1313
896
  }
1314
- type SonarState = 'listening' | 'processingSpeech' | 'thinking' | 'fetchingData' | 'speaking' | 'error';
1315
- interface SonarColors {
1316
- first: string;
1317
- ink3: string;
1318
- tick: string;
1319
- tickMaj: string;
1320
- idle: string;
1321
- line: string;
1322
- err: string;
1323
- n500: string;
897
+ interface SharedModalContext {
898
+ modal: {
899
+ dismiss: () => void;
900
+ close: () => void;
901
+ };
1324
902
  }
1325
- declare const SIZE = 280;
1326
- declare const CX: number;
1327
- declare const CY: number;
1328
- declare const R_TICK = 118;
1329
- declare const R_OUTER = 128;
1330
- declare const R_CORE = 32;
1331
- declare const R_MAX = 112;
1332
- interface Ring {
1333
- r: number;
1334
- life: number;
1335
- amp: number;
903
+ interface EnrolledUser {
904
+ is_owner: boolean;
905
+ id: number;
1336
906
  }
1337
- interface SonarNode {
1338
- a: number;
1339
- r: number;
1340
- lit: number;
907
+ interface GroupDefinition {
908
+ description: string;
909
+ name: string;
1341
910
  }
1342
- interface SonarAnim {
1343
- micLevel: number;
1344
- ringPhase: number;
1345
- rings: Ring[];
1346
- radar: number;
1347
- nodes: SonarNode[];
911
+ interface Group {
912
+ id?: number;
913
+ name?: string;
914
+ description?: string;
915
+ group_definition_id?: number;
916
+ group_definition_name: string;
1348
917
  }
1349
- declare const SONAR_LABELS: Record<SonarState, string>;
1350
- declare function makeAnim(): SonarAnim;
1351
- declare function alpha(color: string, a: number): string;
1352
- declare function ring(ctx: CanvasRenderingContext2D, r: number, stroke: string, w: number): void;
1353
- /** The persistent instrument bezel: outer boundary, 72 ticks, guide rings. */
1354
- declare function chrome(ctx: CanvasRenderingContext2D, c: SonarColors): void;
1355
- /** Centred JetBrains-Mono telemetry line (letter-spaced) below the dial core. */
1356
- declare function readout(ctx: CanvasRenderingContext2D, text: string, col: string): void;
1357
- declare namespace pw_brain_chat_voice_overlay_component_d_exports {
1358
- export { PwBrainChatVoiceOverlayComponent };
918
+ interface Permission {
919
+ name: string;
920
+ parentName?: string;
921
+ displayName: string;
1359
922
  }
1360
- /**
1361
- * Sonar voice-session overlay (#51) — a focused takeover over the chat panel
1362
- * that animates the real voice/dictation state machine on an instrument dial.
1363
- * Default change detection: the voice/dictation controllers mutate in place, so
1364
- * the template must re-read them on every parent CD tick. The canvas is driven
1365
- * by its own rAF loop and never needs CD.
1366
- */
1367
- declare class PwBrainChatVoiceOverlayComponent implements AfterViewInit, OnDestroy {
1368
- private readonly host;
1369
- voice: BrainChatVoiceChat | null;
1370
- dictation: BrainChatDictation | null;
1371
- readonly end: EventEmitter<void>;
1372
- private readonly dialRef?;
1373
- private readonly endBtnRef?;
1374
- private ctx;
1375
- private raf;
1376
- private last;
1377
- private prevState;
1378
- private colors;
1379
- private readonly renderer;
1380
- private readonly reduce;
1381
- constructor(host: ElementRef<HTMLElement>);
1382
- /** The voice controller iff a voice session is live (active or errored). */
1383
- private get activeVoice();
1384
- get isVoice(): boolean;
1385
- get state(): SonarState;
1386
- get isError(): boolean;
1387
- get label(): string;
1388
- get modeTag(): string;
1389
- get transcript(): string;
1390
- get showTranscript(): boolean;
1391
- /** Assistant reply text, streamed live while the audio answer plays. */
1392
- get reply(): string;
1393
- get showReply(): boolean;
1394
- get showSteps(): boolean;
1395
- get stepIndex(): number;
1396
- get stepCaption(): string;
1397
- get coreIcon(): string;
1398
- get hint(): string;
1399
- ngAfterViewInit(): void;
1400
- ngOnDestroy(): void;
1401
- onEnd(): void;
1402
- private readonly frame;
1403
- /** Read theme-aware colours (the --bc-* tokens inherit from .pw-brain-chat). */
1404
- private readColors;
1405
- static ɵfac: i0.ɵɵFactoryDeclaration<PwBrainChatVoiceOverlayComponent, never>;
1406
- static ɵcmp: i0.ɵɵComponentDeclaration<PwBrainChatVoiceOverlayComponent, "pw-brain-chat-voice-overlay", never, {
1407
- "voice": {
1408
- "alias": "voice";
923
+ interface PermissionTreeData {
924
+ permissions: Permission[];
925
+ grantedPermissionNames: string[];
926
+ }
927
+ interface JQuery {
928
+ jstree(method: string, ...args: object[]): object;
929
+ jstree(options: object): object;
930
+ }
931
+ declare namespace password_validation_component_d_exports {
932
+ export { PasswordValidationComponent };
933
+ }
934
+ export declare class PasswordValidationComponent extends AppBaseComponent {
935
+ private readonly modal;
936
+ private readonly cdr;
937
+ content: TemplateRef<SharedModalContext>;
938
+ passwordRef: ElementRef<HTMLInputElement>;
939
+ confirmMessage: string;
940
+ destructive: boolean;
941
+ successEvent: EventEmitter<boolean>;
942
+ password: string;
943
+ passwordVisible: boolean;
944
+ buttonBusy: boolean;
945
+ private modalRef;
946
+ get bodyMessage(): string;
947
+ open(): void;
948
+ validatePassword(): void;
949
+ static ɵfac: i0.ɵɵFactoryDeclaration<PasswordValidationComponent, never>;
950
+ static ɵcmp: i0.ɵɵComponentDeclaration<PasswordValidationComponent, "pw-password-validation", never, {
951
+ "confirmMessage": {
952
+ "alias": "confirmMessage";
1409
953
  "required": false;
1410
954
  };
1411
- "dictation": {
1412
- "alias": "dictation";
955
+ "destructive": {
956
+ "alias": "destructive";
1413
957
  "required": false;
1414
958
  };
1415
959
  }, {
1416
- "end": "end";
1417
- }, never, never, false, never>;
960
+ "successEvent": "successEvent";
961
+ }, never, ["*"], true, never>;
1418
962
  }
1419
- declare namespace entity_group_component_d_exports {
1420
- export { EntityGroupComponent };
963
+ declare namespace pw_tabs_component_d_exports {
964
+ export { PwTabItem, PwTabsComponent };
1421
965
  }
1422
- export declare class EntityGroupComponent extends AppBaseComponent implements OnInit, OnDestroy {
1423
- private readonly groupService;
1424
- private readonly subscriptionService;
1425
- private readonly modalService;
966
+ /** A tab; `labelKey` (when set) is translated, otherwise `label` renders as given. */
967
+ export type PwTabItem = MenuItem & {
968
+ labelKey?: string;
969
+ };
970
+ export declare class PwTabsComponent extends AppBaseComponent implements OnInit, OnDestroy {
1426
971
  private readonly cdr;
1427
- content: TemplateRef<SharedModalContext>;
1428
- subscription: Subscription;
1429
- subscriptionId: number;
1430
- user: User;
1431
- userId: number;
1432
- entityId: number;
1433
- selectedGroup: {
1434
- name: string;
1435
- };
1436
- subscriptionMembers: any[];
1437
- subscribedMembers: any[];
1438
- filteredMembers: any[];
1439
- selectedMembers: any[];
1440
- enrolledUsers: EnrolledUser[];
1441
- admins: any[];
1442
- subscriptionInfo: any[];
1443
- subscriptionOwner: number;
1444
- /** Chat permission for the selected product, read at render time (#4228). */
1445
- get chatPermission(): string | null;
1446
- isLoaded: boolean;
1447
- hasAccess: boolean;
1448
- constructor(groupService: GroupService, subscriptionService: SubscriptionService, modalService: NgbModal, injector: Injector, cdr: ChangeDetectorRef);
972
+ items: PwTabItem[];
973
+ withSubscription: boolean;
974
+ /** Current tab value (route path) for p-tabs */
975
+ activeTabValue: string | number;
976
+ private routeEventSubscription;
1449
977
  ngOnInit(): void;
1450
- search(event: any): void;
1451
- open(): void;
1452
- closeModal(modal: any): void;
1453
- getEntity(): void;
1454
- onSave(): void;
1455
- private getSubscribedUsers;
1456
- onDelete(memberId: any): void;
1457
- navigateToCommunications(): void;
978
+ /** Arrow function so trackBy is called with correct `this` from template */
979
+ trackByItem: (_index: number, item: MenuItem) => string;
980
+ getItemValue(item: MenuItem): string;
981
+ onTabChange(value: string | number): void;
982
+ private updateActiveTab;
1458
983
  ngOnDestroy(): void;
1459
- static ɵfac: i0.ɵɵFactoryDeclaration<EntityGroupComponent, never>;
1460
- static ɵcmp: i0.ɵɵComponentDeclaration<EntityGroupComponent, "pw-entity-group", never, {}, {}, never, never, false, never>;
984
+ static ɵfac: i0.ɵɵFactoryDeclaration<PwTabsComponent, never>;
985
+ static ɵcmp: i0.ɵɵComponentDeclaration<PwTabsComponent, "pw-tabs", never, {
986
+ "items": {
987
+ "alias": "items";
988
+ "required": false;
989
+ };
990
+ "withSubscription": {
991
+ "alias": "withSubscription";
992
+ "required": false;
993
+ };
994
+ }, {}, never, never, true, never>;
1461
995
  }
1462
- declare namespace groups_component_d_exports {
1463
- export { GroupsComponent };
996
+ declare namespace date_range_picker_component_d_exports {
997
+ export { DateRangePickerComponent };
1464
998
  }
1465
- export declare class GroupsComponent extends AppBaseComponent implements OnInit, OnDestroy {
1466
- private readonly fb;
1467
- private readonly groupService;
1468
- private readonly subscriptionService;
1469
- private readonly dataService;
999
+ export declare class DateRangePickerComponent implements AfterViewInit {
1000
+ pickerDirective: DaterangepickerDirective;
1001
+ private initialized;
1002
+ selectedDateRange: {
1003
+ startDate: moment.Moment;
1004
+ endDate: moment.Moment;
1005
+ };
1006
+ dateRanges: any;
1007
+ /** Optional unique id for the input (for accessibility). Defaults to 'date-range-picker-input'. */
1008
+ inputId: string;
1009
+ dateRangeChange: EventEmitter<{
1010
+ startDate: moment.Moment;
1011
+ endDate: moment.Moment;
1012
+ }>;
1013
+ onDateRangeSelect(event: {
1014
+ startDate: moment.Moment;
1015
+ endDate: moment.Moment;
1016
+ }): void;
1017
+ ngAfterViewInit(): void;
1018
+ onClearDate(): void;
1019
+ openDatepicker(): void;
1020
+ refreshPicker(): void;
1021
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateRangePickerComponent, never>;
1022
+ static ɵcmp: i0.ɵɵComponentDeclaration<DateRangePickerComponent, "app-date-picker", never, {
1023
+ "selectedDateRange": {
1024
+ "alias": "selectedDateRange";
1025
+ "required": false;
1026
+ };
1027
+ "dateRanges": {
1028
+ "alias": "dateRanges";
1029
+ "required": false;
1030
+ };
1031
+ "inputId": {
1032
+ "alias": "inputId";
1033
+ "required": false;
1034
+ };
1035
+ }, {
1036
+ "dateRangeChange": "dateRangeChange";
1037
+ }, never, never, true, never>;
1038
+ }
1039
+ declare namespace permission_tree_component_d_exports {
1040
+ export { PermissionTreeComponent };
1041
+ }
1042
+ export declare class PermissionTreeComponent implements AfterViewInit, OnChanges {
1043
+ private readonly _element;
1044
+ data: PermissionTreeData;
1045
+ private _$tree;
1046
+ private _createdTreeBefore;
1047
+ ngOnChanges(simple: SimpleChanges): void;
1048
+ ngAfterViewInit(): void;
1049
+ getGrantedPermissionNames(): string[];
1050
+ private refreshTree;
1051
+ static ɵfac: i0.ɵɵFactoryDeclaration<PermissionTreeComponent, never>;
1052
+ static ɵcmp: i0.ɵɵComponentDeclaration<PermissionTreeComponent, "permission-tree", never, {
1053
+ "data": {
1054
+ "alias": "data";
1055
+ "required": false;
1056
+ };
1057
+ }, {}, never, never, true, never>;
1058
+ }
1059
+ declare namespace privacy_and_tos_component_d_exports {
1060
+ export { PrivacyAndTosComponent };
1061
+ }
1062
+ /**
1063
+ * Public routes (`data.public`) show the policy at `/privacy-policy[/:slug]`; without a slug, the
1064
+ * visitor's domain default. Signed-in pages and the embedded `[productId]` use show the policy of
1065
+ * that product, resolved to a slug so the id never reaches a URL; with no signed-in user they fall
1066
+ * back to the domain default rather than waiting forever.
1067
+ */
1068
+ export declare class PrivacyAndTosComponent extends AppBaseComponent implements OnInit {
1069
+ private readonly legalPages;
1470
1070
  private readonly cdr;
1471
- private readonly confirmDialog;
1472
- private groupsData;
1473
- subscription: Subscription;
1474
- message: number;
1475
- id: number;
1476
- group_id: number;
1477
- form: UntypedFormGroup;
1478
- description: string;
1479
- name: string;
1480
- allGroups: Group[];
1481
- groupDefinition: {
1482
- name: string;
1483
- groups: IterableIterator<object>;
1071
+ productId: number;
1072
+ data: {
1073
+ privacy?: string;
1074
+ tos?: string;
1075
+ tos_updated_at?: string;
1076
+ };
1077
+ privacyServiceId: number;
1078
+ readonly routers: {
1079
+ globalConfigDetails: string;
1080
+ adminCredentialsDetails: string;
1081
+ subscriptionCredentialDetails: string;
1082
+ newsletter: string;
1083
+ mailerDetails: string;
1084
+ newsletterItemDetails: string;
1085
+ newsletterItemView: string;
1086
+ newslettersUserList: string;
1087
+ newsletterDetails: string;
1088
+ permissionsList: string;
1089
+ permissionsDetails: string;
1090
+ rolesDetails: string;
1091
+ productDetails: string;
1092
+ productsUserList: string;
1093
+ feedbackQuestions: string;
1094
+ feedbackQuestionsDetails: string;
1095
+ subscriptionDetails: string;
1096
+ subscriptionProductDetails: string;
1097
+ tipsDetails: string;
1098
+ tosAndPrivacyDetails: string;
1099
+ tosAndPrivacyView: string;
1100
+ usersDetails: string;
1101
+ domainConfig: string;
1102
+ domainConfigDetails: string;
1103
+ loginNotifications: string;
1104
+ incidentConfig: string;
1105
+ incidentDetails: string;
1106
+ faqConfig: string;
1107
+ faqDetails: string;
1108
+ inviteUsers: string;
1109
+ subscriptionList: string;
1110
+ createResource: string;
1111
+ createTag: string;
1112
+ tags: string;
1113
+ posts: string;
1114
+ resourcesList: string;
1115
+ };
1116
+ tabId: LegalTab;
1117
+ isPublic: boolean;
1118
+ isLoaded: boolean;
1119
+ tocPrivacy: {
1120
+ id: string;
1121
+ text: string;
1484
1122
  }[];
1485
- domainGroupDefinition: any[];
1486
- admins: any[];
1487
- subscriptionInfo: any[];
1488
- subscriptionOwner: number;
1489
- enrolledUsers: {
1490
- is_owner: boolean;
1491
- id: number;
1123
+ tocTos: {
1124
+ id: string;
1125
+ text: string;
1492
1126
  }[];
1493
- user: User;
1494
- submitted: boolean;
1495
- viewEdit: boolean;
1496
- buttonBusy: boolean;
1497
- isGroupOperations: boolean;
1498
- isGroupEdit: boolean;
1499
- hasAccess: boolean;
1500
- isLoaded: boolean;
1501
- constructor(fb: UntypedFormBuilder, groupService: GroupService, subscriptionService: SubscriptionService, dataService: DataService, injector: Injector, cdr: ChangeDetectorRef, confirmDialog: ConfirmDialogService);
1127
+ private readonly destroyRef;
1128
+ get companyName(): string;
1129
+ get companyEmail(): string;
1130
+ /** Edit affordance is restricted to (Master) Subscription Admins who can reach /admin/tos. */
1131
+ get canEditPolicy(): boolean;
1502
1132
  ngOnInit(): void;
1503
- /** Function to save group */
1504
- saveGroup(): void;
1505
- private getAllGroupDefinition;
1506
- private getSubscribedUsers;
1507
- groupOperation(): void;
1508
- cancelUpdate(): void;
1509
- editGroup(group_id: number): void;
1510
- private getGroupDetails;
1511
- updateDetails(): void;
1512
- onDelete(id: number): void;
1513
- filterDomainsList(event: any): void;
1514
- previous(): void;
1515
- navigateToCommunications(id: number): void;
1516
- navigateToDocumentations(id: number): void;
1517
- trackByGroup(_index: number, item: {
1518
- id: number;
1519
- }): number;
1520
- ngOnDestroy(): void;
1521
- static ɵfac: i0.ɵɵFactoryDeclaration<GroupsComponent, never>;
1522
- static ɵcmp: i0.ɵɵComponentDeclaration<GroupsComponent, "pw-groups", never, {}, {}, never, never, false, never>;
1133
+ private productSlug;
1134
+ private policyIdOf;
1135
+ private show;
1136
+ private parse;
1137
+ private buildToc;
1138
+ static ɵfac: i0.ɵɵFactoryDeclaration<PrivacyAndTosComponent, never>;
1139
+ static ɵcmp: i0.ɵɵComponentDeclaration<PrivacyAndTosComponent, "pw-privacy-and-tos", never, {
1140
+ "productId": {
1141
+ "alias": "productId";
1142
+ "required": false;
1143
+ };
1144
+ }, {}, never, never, true, never>;
1523
1145
  }
1524
- declare namespace group_definition_component_d_exports {
1525
- export { GroupDefinitionComponent };
1146
+ declare namespace splash_component_d_exports {
1147
+ export { SplashComponent };
1526
1148
  }
1527
- export declare class GroupDefinitionComponent extends AppBaseComponent implements OnInit, OnDestroy {
1528
- private readonly groupService;
1529
- private readonly fb;
1530
- private readonly subscriptionService;
1531
- private readonly data;
1149
+ export declare class SplashComponent {
1150
+ static ɵfac: i0.ɵɵFactoryDeclaration<SplashComponent, never>;
1151
+ static ɵcmp: i0.ɵɵComponentDeclaration<SplashComponent, "ng-component", never, {}, {}, never, never, true, never>;
1152
+ }
1153
+ declare namespace authenticator_component_d_exports {
1154
+ export { AuthenticatorComponent };
1155
+ }
1156
+ export declare class AuthenticatorComponent extends AppBaseComponent implements OnInit {
1157
+ private readonly authService;
1532
1158
  private readonly cdr;
1533
- private readonly confirmDialog;
1534
- subscriptions: any[];
1535
- message: number;
1536
- groupDefinition: object[];
1537
- form: UntypedFormGroup;
1538
- id: number;
1539
- viewDefinition: boolean;
1540
- viewEdit: boolean;
1541
- private groupDefId;
1542
- private groupDefinitionDetails;
1543
- hasAccess: boolean;
1544
- admins: any[];
1545
- subscriptionInfo: any[];
1546
- subscriptionOwner: number;
1547
- enrolledUsers: EnrolledUser[];
1548
- user: User;
1549
- isLoaded: boolean;
1550
- categoryBusyButton: boolean;
1551
- constructor(groupService: GroupService, fb: UntypedFormBuilder, subscriptionService: SubscriptionService, data: DataService, injector: Injector, cdr: ChangeDetectorRef, confirmDialog: ConfirmDialogService);
1159
+ token: string;
1552
1160
  ngOnInit(): void;
1553
- private getAllGroupDefinition;
1554
- private getSubscribedUsers;
1555
- updateDetails(): void;
1556
- onGroupDefinitionEdit(id: number): void;
1557
- getSubscriptionDetails(): void;
1558
- saveGroupDefinition(): void;
1559
- onDelete(id: number): void;
1560
- viewDefinitions(): void;
1561
- previous(): void;
1562
- onCancel(): void;
1563
- ngOnDestroy(): void;
1564
- static ɵfac: i0.ɵɵFactoryDeclaration<GroupDefinitionComponent, never>;
1565
- static ɵcmp: i0.ɵɵComponentDeclaration<GroupDefinitionComponent, "pw-group-definition", never, {}, {}, never, never, false, never>;
1161
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthenticatorComponent, never>;
1162
+ static ɵcmp: i0.ɵɵComponentDeclaration<AuthenticatorComponent, "pw-authenticator", never, {}, {}, never, never, true, never>;
1566
1163
  }
1567
- type buttonsOrientationType = 'horizontal' | 'vertical' | 'h' | 'v';
1568
- type sizeType = 'medium' | 'large' | 'small' | 'xlarge' | 'md' | 'lg' | 'sm' | 'xlg';
1569
- interface CustomClasses {
1570
- container?: string;
1571
- up?: string;
1572
- down?: string;
1573
- postfix?: string;
1574
- prefix?: string;
1575
- success?: string;
1576
- error?: string;
1164
+ declare namespace clearbit_icon_component_d_exports {
1165
+ export { ClearBitIconComponent };
1577
1166
  }
1578
- declare namespace number_picker_component_d_exports {
1579
- export { NumberPickerComponent };
1167
+ interface MonogramTint {
1168
+ bg: string;
1169
+ fg: string;
1580
1170
  }
1581
- export declare class NumberPickerComponent implements OnInit {
1582
- private readonly numberPickerService;
1583
- private precision;
1584
- private eventHolder;
1585
- private countInterval;
1586
- private isInputFocused;
1587
- min: number;
1588
- showTooltip: boolean;
1589
- tooltipText: string;
1590
- max: number;
1591
- step: number;
1592
- value: number;
1593
- pickStartAfter: number;
1594
- pickTimer: number;
1595
- prefix: string;
1596
- postfix: string;
1597
- placeholder: string;
1598
- buttonsOrientation: buttonsOrientationType;
1599
- size: sizeType;
1600
- customClass: CustomClasses;
1601
- mouseWheel: boolean;
1602
- arrowKeys: boolean;
1603
- inputReadOnly: boolean;
1604
- showUpButton: boolean;
1605
- showDownButton: boolean;
1606
- /** Optional id for the number input (for accessibility/label association). */
1607
- inputId: string;
1608
- valueChange: EventEmitter<number>;
1609
- minReached: EventEmitter<boolean>;
1610
- maxReached: EventEmitter<boolean>;
1611
- pickStarted: EventEmitter<boolean>;
1612
- pickStopped: EventEmitter<boolean>;
1613
- pickUpStarted: EventEmitter<boolean>;
1614
- pickUpStopped: EventEmitter<boolean>;
1615
- pickDownStarted: EventEmitter<boolean>;
1616
- pickDownStopped: EventEmitter<boolean>;
1617
- constructor(numberPickerService: NumberPickerService);
1618
- ngOnInit(): void;
1619
- isHorizontal(): boolean;
1620
- onFocus(event: FocusEvent): void;
1621
- onBlur(event: Event): void;
1622
- onMouseWheel(event: WheelEvent): void;
1623
- private afterMouseWheels;
1624
- onValueChange(_event: Event): void;
1625
- onDecrease(event: MouseEvent | WheelEvent | KeyboardEvent): void;
1626
- onIncrease(event: MouseEvent | WheelEvent | KeyboardEvent): void;
1627
- onMouseDown(event: MouseEvent, increase?: boolean): void;
1628
- private isArrowUpDown;
1629
- private isArrowUp;
1630
- private loopPick;
1631
- onMouseUp(event: MouseEvent, increase?: boolean): void;
1632
- onKeyDown(event: KeyboardEvent): void;
1633
- onKeyUp(event: KeyboardEvent): void;
1634
- private afterMouseDown;
1635
- private afterMouseUp;
1636
- private afterPick;
1637
- private clearTimers;
1638
- private parseVal;
1639
- private getPrecision;
1640
- private round;
1641
- private canIncrease;
1642
- private canDecrease;
1643
- private onPickStarted;
1644
- private onPickStopped;
1645
- private isLeftClick;
1646
- private initPicker;
1647
- static ɵfac: i0.ɵɵFactoryDeclaration<NumberPickerComponent, never>;
1648
- static ɵcmp: i0.ɵɵComponentDeclaration<NumberPickerComponent, "pw-number-picker", never, {
1649
- "min": {
1650
- "alias": "min";
1651
- "required": false;
1652
- };
1653
- "showTooltip": {
1654
- "alias": "showTooltip";
1655
- "required": false;
1656
- };
1657
- "tooltipText": {
1658
- "alias": "tooltipText";
1659
- "required": false;
1660
- };
1661
- "max": {
1662
- "alias": "max";
1663
- "required": false;
1664
- };
1665
- "step": {
1666
- "alias": "step";
1667
- "required": false;
1668
- };
1669
- "value": {
1670
- "alias": "value";
1671
- "required": false;
1672
- };
1673
- "pickStartAfter": {
1674
- "alias": "pickStartAfter";
1675
- "required": false;
1676
- };
1677
- "pickTimer": {
1678
- "alias": "pickTimer";
1679
- "required": false;
1680
- };
1681
- "prefix": {
1682
- "alias": "prefix";
1683
- "required": false;
1684
- };
1685
- "postfix": {
1686
- "alias": "postfix";
1171
+ export declare class ClearBitIconComponent implements OnChanges {
1172
+ src: string | null;
1173
+ altText: string;
1174
+ /** Company name — drives the initials shown when no real logo resolves. */
1175
+ name: string;
1176
+ /** Square edge length in px — applied to both the logo image and the monogram tile. */
1177
+ size: number;
1178
+ /** Layout/margin classes for the rendered icon — override for centred contexts. */
1179
+ iconClass: string;
1180
+ logoSrc: string | null;
1181
+ showFallback: boolean;
1182
+ initials: string;
1183
+ tint: MonogramTint;
1184
+ get tileRadius(): number;
1185
+ get tileFontSize(): number;
1186
+ ngOnChanges(): void;
1187
+ /** Called when a resolved logo URL fails to load — degrade to the monogram. */
1188
+ onLogoError(): void;
1189
+ private buildMonogram;
1190
+ private static deriveInitials;
1191
+ private static hash;
1192
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClearBitIconComponent, never>;
1193
+ static ɵcmp: i0.ɵɵComponentDeclaration<ClearBitIconComponent, "pw-clearbit-icon", never, {
1194
+ "src": {
1195
+ "alias": "src";
1687
1196
  "required": false;
1688
1197
  };
1689
- "placeholder": {
1690
- "alias": "placeholder";
1198
+ "altText": {
1199
+ "alias": "altText";
1691
1200
  "required": false;
1692
1201
  };
1693
- "buttonsOrientation": {
1694
- "alias": "buttonsOrientation";
1202
+ "name": {
1203
+ "alias": "name";
1695
1204
  "required": false;
1696
1205
  };
1697
1206
  "size": {
1698
1207
  "alias": "size";
1699
1208
  "required": false;
1700
1209
  };
1701
- "customClass": {
1702
- "alias": "customClass";
1703
- "required": false;
1704
- };
1705
- "mouseWheel": {
1706
- "alias": "mouseWheel";
1707
- "required": false;
1708
- };
1709
- "arrowKeys": {
1710
- "alias": "arrowKeys";
1711
- "required": false;
1712
- };
1713
- "inputReadOnly": {
1714
- "alias": "inputReadOnly";
1715
- "required": false;
1716
- };
1717
- "showUpButton": {
1718
- "alias": "showUpButton";
1719
- "required": false;
1720
- };
1721
- "showDownButton": {
1722
- "alias": "showDownButton";
1723
- "required": false;
1724
- };
1725
- "inputId": {
1726
- "alias": "inputId";
1727
- "required": false;
1728
- };
1729
- }, {
1730
- "valueChange": "valueChange";
1731
- "minReached": "minReached";
1732
- "maxReached": "maxReached";
1733
- "pickStarted": "pickStarted";
1734
- "pickStopped": "pickStopped";
1735
- "pickUpStarted": "pickUpStarted";
1736
- "pickUpStopped": "pickUpStopped";
1737
- "pickDownStarted": "pickDownStarted";
1738
- "pickDownStopped": "pickDownStopped";
1739
- }, never, never, false, never>;
1740
- }
1741
- declare namespace online_indicator_component_d_exports {
1742
- export { OnlineIndicatorComponent };
1743
- }
1744
- /**
1745
- * Green presence indicator shown beside a member's name.
1746
- *
1747
- * Feed it `current_sign_in_at` and nothing else. Do NOT pass `last_sign_in_at`, nor the
1748
- * `current_sign_in_at || last_sign_in_at` fallback the surrounding cells use for the date:
1749
- * an explicit logout nulls `current_sign_in_at` and rolls its value into `last_sign_in_at`,
1750
- * so the fallback would light the dot for someone who has just signed out.
1751
- *
1752
- * The online window itself lives in the `isOnline` pipe, which is paired with main-api's
1753
- * activity-refresh interval -- see ONLINE_THRESHOLD_MINUTES.
1754
- */
1755
- export declare class OnlineIndicatorComponent {
1756
- /** The member's `current_sign_in_at` stamp. Never `last_sign_in_at`. */
1757
- lastSeen: string | Date | null;
1758
- static ɵfac: i0.ɵɵFactoryDeclaration<OnlineIndicatorComponent, never>;
1759
- static ɵcmp: i0.ɵɵComponentDeclaration<OnlineIndicatorComponent, "pw-online-indicator", never, {
1760
- "lastSeen": {
1761
- "alias": "lastSeen";
1210
+ "iconClass": {
1211
+ "alias": "iconClass";
1762
1212
  "required": false;
1763
1213
  };
1764
- }, {}, never, never, false, never>;
1214
+ }, {}, never, never, true, never>;
1765
1215
  }
1766
- declare namespace header_component_d_exports {
1767
- export { HeaderComponent };
1216
+ declare namespace coming_soon_component_d_exports {
1217
+ export { ComingSoonComponent };
1768
1218
  }
1769
- export declare class HeaderComponent extends AppBaseComponent {
1770
- private readonly authService;
1771
- private readonly cdr;
1772
- loggedIn: boolean;
1773
- isMenuCollapsed: boolean;
1774
- constructor(injector: Injector, authService: AuthService, cdr: ChangeDetectorRef);
1775
- landing: boolean;
1776
- navigateToLogin(): void;
1777
- toggleMenu(): void;
1778
- private logoFailed;
1779
- get logo(): string | null;
1780
- onLogoError(): void;
1781
- static ɵfac: i0.ɵɵFactoryDeclaration<HeaderComponent, never>;
1782
- static ɵcmp: i0.ɵɵComponentDeclaration<HeaderComponent, "pw-header", never, {
1783
- "landing": {
1784
- "alias": "landing";
1219
+ export declare class ComingSoonComponent {
1220
+ message: string;
1221
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComingSoonComponent, never>;
1222
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComingSoonComponent, "pw-coming-soon", never, {
1223
+ "message": {
1224
+ "alias": "message";
1785
1225
  "required": false;
1786
1226
  };
1787
- }, {}, never, never, false, never>;
1227
+ }, {}, never, never, true, never>;
1788
1228
  }
1789
- declare namespace landing_page_footer_b_component_d_exports {
1790
- export { LandingPageFooterBComponent };
1229
+ /**
1230
+ * A compact icon action rendered in the sidebar header row (before the close
1231
+ * button). `id` MUST match a public method name on the mounted panel component
1232
+ * — the shell invokes `componentRef.instance[id]()` when the action is clicked.
1233
+ */
1234
+ export interface SidebarHeaderAction {
1235
+ /** Method name to invoke on the mounted panel instance (e.g. 'newChat'). */
1236
+ id: string;
1237
+ /** Fontawesome class string, e.g. 'fas fa-plus'. */
1238
+ icon: string;
1239
+ /** Accessible label + native tooltip. */
1240
+ ariaLabel: string;
1791
1241
  }
1792
- export declare class LandingPageFooterBComponent extends AppBaseComponent implements OnInit {
1793
- private readonly authService;
1794
- private readonly cdr;
1795
- isBrowserAccess: boolean;
1796
- currentDate: Date;
1797
- get companyName(): string;
1798
- get companyEmail(): string;
1799
- get companyTagline(): string | null;
1800
- get logoUrl(): string;
1801
- get socialLinkedin(): string | null;
1802
- get socialFacebook(): string | null;
1803
- get socialTwitter(): string | null;
1804
- constructor(authService: AuthService, cdr: ChangeDetectorRef, injector: Injector);
1805
- ngOnInit(): void;
1806
- scrollToTop(event: Event): void;
1807
- static ɵfac: i0.ɵɵFactoryDeclaration<LandingPageFooterBComponent, never>;
1808
- static ɵcmp: i0.ɵɵComponentDeclaration<LandingPageFooterBComponent, "pw-landing-page-footer-b", never, {}, {}, never, never, false, never>;
1809
- }
1810
- export interface UiGrid {
1811
- x: number;
1812
- y: number;
1813
- w: number;
1814
- h: number;
1815
- }
1816
- export interface UiBinding {
1817
- source: string;
1818
- params?: Record<string, string | number | boolean>;
1819
- filter?: Record<string, string | number | boolean>;
1820
- }
1821
- /** A resolved binding as returned by GET /main-api/v1/ui_layouts. */
1822
- export interface ResolvedBinding {
1823
- state: 'ok' | 'forbidden' | 'deferred' | 'unavailable' | 'unknown_source' | 'error';
1824
- value?: Record<string, unknown>;
1825
- reason?: string;
1826
- }
1827
- export interface UiBlock {
1242
+ /**
1243
+ * Interface for sidebar content that modules can provide
1244
+ */
1245
+ export interface SidebarContent {
1246
+ /**
1247
+ * Unique identifier for this sidebar content
1248
+ */
1828
1249
  id: string;
1829
- type: string;
1830
- grid: UiGrid;
1831
- props?: Record<string, unknown>;
1832
- /** Server replaces the request `binding` with a ResolvedBinding (or null). */
1833
- binding?: ResolvedBinding | null;
1250
+ /**
1251
+ * Title/label for the sidebar section
1252
+ */
1253
+ title: string;
1254
+ /** i18n key for the title; when set it is shown instead of `title`. */
1255
+ titleKey?: string;
1256
+ titleParams?: Record<string, string>;
1257
+ /**
1258
+ * Component type to render in the sidebar
1259
+ */
1260
+ component: Type<any>;
1261
+ /**
1262
+ * Input data to pass to the component
1263
+ */
1264
+ data?: any;
1265
+ /**
1266
+ * Optional icon class (e.g., 'pi pi-cog' for PrimeNG icons)
1267
+ */
1268
+ icon?: string;
1269
+ /**
1270
+ * Tooltip text shown on hover
1271
+ */
1272
+ tooltip?: string;
1273
+ /**
1274
+ * Optional compact status shown inline after the title in the header row
1275
+ * (leading green dot). Costs no extra vertical space. e.g. the Brain panel's
1276
+ * 'Connected · long-term memory on'. Panels that omit it render title-only.
1277
+ */
1278
+ status?: string;
1279
+ /**
1280
+ * Optional compact icon actions rendered in the header row before the close
1281
+ * button (e.g. the Brain panel's 'New chat'). Each action's `id` is invoked
1282
+ * as a method on the mounted panel instance.
1283
+ */
1284
+ headerActions?: SidebarHeaderAction[];
1285
+ /**
1286
+ * When true, the shell renders a soft "Beta" pill next to the title —
1287
+ * signalling the panel is an experimental feature (e.g. the Brain chat).
1288
+ * Generic flag; any panel may opt in. The label is i18n'd in the shell
1289
+ * template ('BrainChat.Badge.Beta').
1290
+ */
1291
+ beta?: boolean;
1292
+ /**
1293
+ * Optional caller-defined drawer width (any valid CSS width value, e.g.
1294
+ * '640px' or 'min(720px, max(360px, 60vw))'). When set, overrides the
1295
+ * default via the `--pw-drawer-width` CSS custom property while this
1296
+ * content is active. When omitted, the SCSS default applies
1297
+ * (`min(480px, max(300px, 40vw))` overlay / `max(300px, min(480px, 32vw))`
1298
+ * embedded). The mobile breakpoint (<=768px) still forces 100% regardless.
1299
+ */
1300
+ width?: string;
1834
1301
  }
1835
- export interface UiLayoutConfig {
1836
- schema_version: number;
1837
- version: number;
1838
- page_key: string;
1839
- blocks: UiBlock[];
1302
+ /**
1303
+ * CollapsibleSidebarService manages dynamic sidebar content
1304
+ *
1305
+ * This service allows any module to register, update, or remove sidebar content.
1306
+ * It uses observables to notify components of state changes.
1307
+ */
1308
+ export declare class CollapsibleSidebarService {
1309
+ private readonly sidebarContentMap;
1310
+ private readonly sidebarExpandedSubject;
1311
+ private readonly sidebarContentSubject;
1312
+ private readonly activeContentIdSubject;
1313
+ /**
1314
+ * Observable for sidebar expanded/collapsed state
1315
+ */
1316
+ sidebarExpanded$: Observable<boolean>;
1317
+ /**
1318
+ * Observable for current sidebar content
1319
+ */
1320
+ sidebarContent$: Observable<SidebarContent | null>;
1321
+ /**
1322
+ * Observable for currently active content ID
1323
+ */
1324
+ activeContentId$: Observable<string | null>;
1325
+ /**
1326
+ * Register sidebar content that can be triggered by a module
1327
+ * @param content - The sidebar content configuration
1328
+ */
1329
+ registerContent(content: SidebarContent): void;
1330
+ /**
1331
+ * Unregister sidebar content
1332
+ * @param contentId - The ID of the content to remove
1333
+ */
1334
+ unregisterContent(contentId: string): void;
1335
+ /**
1336
+ * Load and display sidebar content by ID
1337
+ * @param contentId - The ID of the content to load
1338
+ */
1339
+ loadContent(contentId: string): void;
1340
+ /**
1341
+ * Load a panel and seed it with one-shot inputs.
1342
+ *
1343
+ * The host re-mounts the panel component on every load and `Object.assign`s
1344
+ * `content.data` onto the fresh instance, so this is how a caller opens a
1345
+ * panel in a particular starting state — e.g. the command palette opening
1346
+ * the Brain panel with the user's typed query already in the composer.
1347
+ *
1348
+ * @param contentId - The ID of the content to load
1349
+ * @param data - Fields copied onto the newly mounted panel instance
1350
+ */
1351
+ loadContentWithData(contentId: string, data: Record<string, unknown>): void;
1352
+ /**
1353
+ * Toggle sidebar expanded/collapsed state
1354
+ */
1355
+ toggleSidebar(): void;
1356
+ /**
1357
+ * Expand the sidebar
1358
+ */
1359
+ expandSidebar(): void;
1360
+ /**
1361
+ * Collapse the sidebar
1362
+ */
1363
+ collapseSidebar(): void;
1364
+ /**
1365
+ * Get current expanded state synchronously
1366
+ */
1367
+ isExpanded(): boolean;
1368
+ /**
1369
+ * Get currently active content ID synchronously
1370
+ */
1371
+ getActiveContentId(): string | null;
1372
+ /**
1373
+ * Get all registered content IDs
1374
+ */
1375
+ getRegisteredContentIds(): string[];
1376
+ /**
1377
+ * Clear all sidebar content and collapse
1378
+ */
1379
+ clearAll(): void;
1380
+ static ɵfac: i0.ɵɵFactoryDeclaration<CollapsibleSidebarService, never>;
1381
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1840
1382
  }
1841
- /** Envelope of GET /main-api/v1/ui_layouts. */
1842
- export interface UiLayoutResponse {
1843
- data: {
1844
- layout: {
1845
- page_key: string;
1846
- version: number;
1847
- schema_version: number;
1848
- blocks: UiBlock[];
1849
- };
1850
- };
1383
+ declare namespace collapsible_sidebar_keyboard_shortcut_directive_d_exports {
1384
+ export { CollapsibleSidebarKeyboardShortcutDirective };
1851
1385
  }
1852
- declare namespace pw_dynamic_page_component_d_exports {
1853
- export { PwDynamicPageComponent, UI_BUILDER_FLAG };
1386
+ /**
1387
+ * Listens for Ctrl+Shift+A globally and toggles the PosiWise Assistant chat panel.
1388
+ * Applied via hostDirectives on CollapsibleSidebarComponent.
1389
+ */
1390
+ export declare class CollapsibleSidebarKeyboardShortcutDirective {
1391
+ private readonly sidebarService;
1392
+ onKeydown(event: KeyboardEvent): void;
1393
+ static ɵfac: i0.ɵɵFactoryDeclaration<CollapsibleSidebarKeyboardShortcutDirective, never>;
1394
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CollapsibleSidebarKeyboardShortcutDirective, "[pwCollapsibleSidebarKeyboardShortcut]", never, {}, {}, never, never, true, never>;
1854
1395
  }
1855
- export declare const UI_BUILDER_FLAG = "conversational_ui_builder";
1856
- export declare class PwDynamicPageComponent implements AfterViewInit, OnDestroy {
1396
+ declare namespace collapsible_sidebar_component_d_exports {
1397
+ export { CollapsibleSidebarComponent };
1398
+ }
1399
+ export declare class CollapsibleSidebarComponent implements OnInit, AfterViewInit, OnDestroy {
1400
+ private readonly sidebarService;
1857
1401
  private readonly injector;
1858
1402
  private readonly cdr;
1859
- private readonly featureFlags;
1860
- private readonly userService?;
1861
- private readonly sidebarService?;
1862
- private readonly appConfigService?;
1863
- host: ViewContainerRef;
1864
- private _config;
1865
- private viewReady;
1866
- private configResolved;
1867
- set config(value: UiLayoutConfig | null);
1868
- get config(): UiLayoutConfig | null;
1869
- private refs;
1870
- private userResolved;
1871
- private resolving;
1872
- constructor(injector: Injector, cdr: ChangeDetectorRef, featureFlags: FeatureFlagService, userService?: UserService, sidebarService?: CollapsibleSidebarService, appConfigService?: AppConfigService);
1873
- brandName: string;
1874
- get enabled(): boolean;
1875
- get showEmpty(): boolean;
1876
- openBuilder(): void;
1403
+ private readonly document;
1404
+ private readonly appConfigService;
1405
+ contentContainer: ViewContainerRef;
1406
+ /**
1407
+ * When true, the drawer is a flex sibling of the page: main content shrinks (GitLab issue-board style).
1408
+ * When false, the drawer is fixed over the viewport with a backdrop.
1409
+ */
1410
+ embedInLayout: boolean;
1411
+ /**
1412
+ * When false, width/transform transitions are off so the first paint after
1413
+ * a full page load does not briefly animate or show border/shadow flash.
1414
+ */
1415
+ transitionReady: boolean;
1416
+ isExpanded: boolean;
1417
+ currentContent: SidebarContent | null;
1418
+ private componentRef;
1419
+ private navbarOffsetTracker;
1420
+ private readonly destroy$;
1421
+ ngOnInit(): void;
1877
1422
  ngAfterViewInit(): void;
1878
1423
  ngOnDestroy(): void;
1879
- private render;
1880
- private ensureUser;
1881
- private doRender;
1882
- private mount;
1883
- private clear;
1884
- static ɵfac: i0.ɵɵFactoryDeclaration<PwDynamicPageComponent, [null, null, null, {
1885
- optional: true;
1886
- }, {
1887
- optional: true;
1888
- }, {
1889
- optional: true;
1890
- }]>;
1891
- static ɵcmp: i0.ɵɵComponentDeclaration<PwDynamicPageComponent, "pw-dynamic-page", never, {
1892
- "config": {
1893
- "alias": "config";
1894
- "required": false;
1895
- };
1896
- }, {}, never, never, false, never>;
1897
- }
1898
- declare namespace section_heading_block_component_d_exports {
1899
- export { SectionHeadingBlockComponent };
1900
- }
1901
- declare class SectionHeadingBlockComponent {
1902
- props: Record<string, unknown>;
1903
- get text(): string;
1904
- get level(): number;
1905
- static ɵfac: i0.ɵɵFactoryDeclaration<SectionHeadingBlockComponent, never>;
1906
- static ɵcmp: i0.ɵɵComponentDeclaration<SectionHeadingBlockComponent, "pw-section-heading-block", never, {
1907
- "props": {
1908
- "alias": "props";
1424
+ /** Register (idempotently) the Assistant panel under the given brand. */
1425
+ private registerBrainPanel;
1426
+ /** Delegate a header action to the same-named method on the mounted panel. */
1427
+ invokeHeaderAction(action: SidebarHeaderAction): void;
1428
+ /**
1429
+ * Load and render dynamic component based on sidebar content
1430
+ */
1431
+ private loadComponent;
1432
+ private clearComponent;
1433
+ closeSidebar(): void;
1434
+ toggleSidebar(): void;
1435
+ static ɵfac: i0.ɵɵFactoryDeclaration<CollapsibleSidebarComponent, never>;
1436
+ static ɵcmp: i0.ɵɵComponentDeclaration<CollapsibleSidebarComponent, "pw-collapsible-sidebar", never, {
1437
+ "embedInLayout": {
1438
+ "alias": "embedInLayout";
1909
1439
  "required": false;
1910
1440
  };
1911
- }, {}, never, never, false, never>;
1912
- }
1913
- declare namespace divider_block_component_d_exports {
1914
- export { DividerBlockComponent };
1441
+ }, {}, never, never, true, [{
1442
+ directive: typeof CollapsibleSidebarKeyboardShortcutDirective;
1443
+ inputs: {};
1444
+ outputs: {};
1445
+ }]>;
1446
+ static ngAcceptInputType_embedInLayout: unknown;
1915
1447
  }
1916
- declare class DividerBlockComponent {
1917
- props: Record<string, unknown>;
1918
- get spacing(): number;
1919
- static ɵfac: i0.ɵɵFactoryDeclaration<DividerBlockComponent, never>;
1920
- static ɵcmp: i0.ɵɵComponentDeclaration<DividerBlockComponent, "pw-divider-block", never, {
1921
- "props": {
1922
- "alias": "props";
1923
- "required": false;
1924
- };
1925
- }, {}, never, never, false, never>;
1448
+ interface BrainChatPrompt {
1449
+ text: string;
1450
+ icon: string;
1926
1451
  }
1927
- declare namespace stat_card_block_component_d_exports {
1928
- export { StatCardBlockComponent };
1452
+ interface BrainChatQuickAction extends BrainChatPrompt {
1453
+ label: string;
1929
1454
  }
1930
- declare class StatCardBlockComponent {
1931
- props: Record<string, unknown>;
1932
- binding: ResolvedBinding | null;
1933
- get title(): string;
1934
- get metricValue(): string;
1935
- static ɵfac: i0.ɵɵFactoryDeclaration<StatCardBlockComponent, never>;
1936
- static ɵcmp: i0.ɵɵComponentDeclaration<StatCardBlockComponent, "pw-stat-card-block", never, {
1937
- "props": {
1938
- "alias": "props";
1939
- "required": false;
1940
- };
1941
- "binding": {
1942
- "alias": "binding";
1943
- "required": false;
1944
- };
1945
- }, {}, never, never, false, never>;
1455
+ declare const SUGGESTED_PROMPTS: readonly BrainChatPrompt[];
1456
+ declare const QUICK_ACTIONS: readonly BrainChatQuickAction[];
1457
+ /** Key of the seed assistant greeting for a fresh conversation (also used by New chat). */
1458
+ declare const GREETING = "BrainChat.Greeting";
1459
+ /**
1460
+ * Shared shapes for the PosiWise Brain chat panel. Extracted from
1461
+ * `pw-brain-chat.component.ts` so the component stays under the C1
1462
+ * line cap while the scroll/confirmation helpers can reuse the types.
1463
+ * Re-exported from the component to preserve the public API surface.
1464
+ */
1465
+ type ChatMessageRole = 'user' | 'assistant';
1466
+ interface PendingConfirmation {
1467
+ confirmation_token: string;
1468
+ risk_level?: string | null;
1469
+ summary?: string | null;
1470
+ target_service?: string | null;
1471
+ target_tool?: string | null;
1472
+ diff?: MCPFieldDiff | null;
1946
1473
  }
1947
- declare namespace data_table_block_component_d_exports {
1948
- export { DataTableBlockComponent };
1474
+ interface ChatMessage {
1475
+ role: ChatMessageRole;
1476
+ text: string;
1477
+ pending?: PendingConfirmation;
1478
+ /** Set to true only on messages produced by the prose summariser (mcp_prose_summariser.py).
1479
+ * Controls whether the bubble renders via safeMarkdown pipe ([innerHTML]) or as plain text (<pre>).
1480
+ * Error messages, confirmation summaries, and navigation notices stay plain. */
1481
+ markdownEnabled?: boolean;
1482
+ /** Epoch ms when the message was created. Optional — messages hydrated
1483
+ * from pre-timestamp storage lack it and render without a time. */
1484
+ at?: number;
1485
+ /** Page-aware grounding (#933): human label of the page this answer's
1486
+ * documentation is about (from `grounded_source_page`). When set, the bubble
1487
+ * renders a "Documented on: {sourcePage}" provenance chip. Absent → no chip. */
1488
+ sourcePage?: string | null;
1949
1489
  }
1950
- declare class DataTableBlockComponent {
1951
- props: Record<string, unknown>;
1952
- binding: ResolvedBinding | null;
1953
- get columns(): string[];
1954
- get rows(): Array<Record<string, unknown>>;
1955
- get stateKey(): string;
1956
- cell(row: Record<string, unknown>, col: string): string;
1957
- static ɵfac: i0.ɵɵFactoryDeclaration<DataTableBlockComponent, never>;
1958
- static ɵcmp: i0.ɵɵComponentDeclaration<DataTableBlockComponent, "pw-data-table-block", never, {
1959
- "props": {
1960
- "alias": "props";
1961
- "required": false;
1962
- };
1963
- "binding": {
1964
- "alias": "binding";
1965
- "required": false;
1966
- };
1967
- }, {}, never, never, false, never>;
1490
+ /** Lifecycle of a file the user dropped on the composer. */
1491
+ /** `choosing`: several upload tools accept this file — held until the user picks one. */
1492
+ type ChatAttachmentStatus = 'choosing' | 'uploading' | 'ready' | 'error';
1493
+ /**
1494
+ * A file staged for the next message. The bytes are POSTed straight to S3 by
1495
+ * `DirectUploadService`; what survives here is the opaque `key` the server
1496
+ * hands back, which is all that ever reaches the chat request.
1497
+ */
1498
+ interface ChatAttachment {
1499
+ name: string;
1500
+ size: number;
1501
+ status: ChatAttachmentStatus;
1502
+ /** 0-100 while uploading; 100 once staged. */
1503
+ percent: number;
1504
+ /** Opaque staging key. Absent until the upload lands. */
1505
+ key?: string;
1506
+ /** Namespaced tool that consumes this file, from its advertised capability. */
1507
+ tool?: string;
1508
+ /** That tool's advertised title, e.g. "Set Your Profile Picture". */
1509
+ title?: string;
1510
+ /** Human-readable failure, shown on the chip. */
1511
+ error?: string;
1968
1512
  }
1969
- declare namespace chart_block_component_d_exports {
1970
- export { ChartBlockComponent };
1513
+ /**
1514
+ * Owns the composer's file attachment: drag state, the upload, and the single
1515
+ * staged file. Split out of the component the same way BrainChatDictation and
1516
+ * BrainChatVoiceChat are, so the panel stays composable and this is testable
1517
+ * without a TestBed.
1518
+ *
1519
+ * What it may accept is DISCOVERED, not configured: brain-api reports the
1520
+ * upload-capable tools this caller can reach, each carrying its own purpose,
1521
+ * extensions and size cap. So a product gains a drop affordance by shipping a
1522
+ * tool that advertises one — with no change here and none in the host app
1523
+ * beyond naming its API.
1524
+ */
1525
+ declare class BrainChatAttachment {
1526
+ private readonly uploads;
1527
+ private readonly apis;
1528
+ private readonly subscriptionId;
1529
+ private readonly onChange;
1530
+ current: ChatAttachment | null;
1531
+ private readonly drag;
1532
+ private capabilities;
1533
+ private readonly choice;
1534
+ constructor(uploads: DirectUploadService | null, apis: Record<string, BaseHttpService> | null, subscriptionId: () => number | null, onChange: () => void);
1535
+ discover(source: Observable<{
1536
+ uploads: MCPUploadCapability[];
1537
+ }>, destroy$: Subject<void>): void;
1538
+ get enabled(): boolean;
1539
+ get busy(): boolean;
1540
+ /** Several tools accept the file; nothing is uploaded until one is picked. */
1541
+ get choosing(): boolean;
1542
+ get choices(): MCPUploadCapability[];
1543
+ choiceLabel(capability: MCPUploadCapability): string;
1544
+ get ready(): boolean;
1545
+ get context(): Record<string, unknown> | null;
1546
+ get label(): string;
1547
+ get hint(): string;
1548
+ get acceptAttr(): string;
1549
+ get dragActive(): boolean;
1550
+ dragEnter(event: DragEvent): void;
1551
+ dragOver(event: DragEvent): void;
1552
+ dragLeave(event: DragEvent): void;
1553
+ drop(event: DragEvent): void;
1554
+ /** Shared by the drop target and the paperclip file input. */
1555
+ accept(file: File): void;
1556
+ /** The user picked which tool this file is for — only now is it uploaded. */
1557
+ choose(capability: MCPUploadCapability): void;
1558
+ remove(): void;
1559
+ /** Cleared once a planned call used `sent`; a reply asking for details keeps it. */
1560
+ clearIfConsumed(sent: ChatAttachment | null): void;
1561
+ meta(): string;
1562
+ icon(): string;
1563
+ private upload;
1971
1564
  }
1972
- declare class ChartBlockComponent {
1973
- props: Record<string, unknown>;
1974
- binding: ResolvedBinding | null;
1975
- get title(): string;
1976
- static ɵfac: i0.ɵɵFactoryDeclaration<ChartBlockComponent, never>;
1977
- static ɵcmp: i0.ɵɵComponentDeclaration<ChartBlockComponent, "pw-chart-block", never, {
1978
- "props": {
1979
- "alias": "props";
1980
- "required": false;
1981
- };
1982
- "binding": {
1983
- "alias": "binding";
1984
- "required": false;
1985
- };
1986
- }, {}, never, never, false, never>;
1565
+ /**
1566
+ * Drives mic dictation for the Brain chat composer (#22).
1567
+ *
1568
+ * Toggles recording, folds the partial/final transcripts brain-api relays from
1569
+ * Amazon Transcribe into the chat draft — preserving any text the user already
1570
+ * typed — and surfaces a friendly status (listening / processing / error) so
1571
+ * the user always knows what's happening. Lives outside the component to
1572
+ * respect the helper-delegation pattern the chat component already uses
1573
+ * (persistence, navigation, diff, etc.) and to keep that component small.
1574
+ */
1575
+ type DictationPhase = 'idle' | 'listening' | 'processing';
1576
+ declare class BrainChatDictation {
1577
+ private readonly voice;
1578
+ private readonly getDraft;
1579
+ private readonly setDraft;
1580
+ private readonly changed;
1581
+ phase: DictationPhase;
1582
+ error: string | null;
1583
+ private sub?;
1584
+ /** Draft text captured at record-start + each finalized phrase, so live
1585
+ * partials update without clobbering what the user already typed. */
1586
+ private base;
1587
+ constructor(voice: BrainVoiceService | undefined, getDraft: () => string, setDraft: (text: string) => void, changed: () => void);
1588
+ /** Convenience for the template — kept for the pulsing-button class. */
1589
+ get isRecording(): boolean;
1590
+ /** Status text shown next to the mic; `null` when nothing to say. */
1591
+ get statusMessage(): string | null;
1592
+ /** Mic button handler: start if idle, stop if recording. While
1593
+ * "processing" we ignore clicks until the server's final transcript
1594
+ * lands. */
1595
+ toggle(loading: boolean): void;
1596
+ stop(): void;
1597
+ /** Unconditionally cancel recording and clear any error, from ANY phase —
1598
+ * the overlay's End/Close (stop() only finalizes from 'listening', so it
1599
+ * can't dismiss the 'processing' or 'error' states). */
1600
+ dismiss(): void;
1601
+ /** Tear down with the host component (called from ngOnDestroy). */
1602
+ dispose(): void;
1603
+ private start;
1604
+ private apply;
1605
+ private fail;
1987
1606
  }
1988
- declare namespace pw_sticky_actions_component_d_exports {
1989
- export { PwStickyActionsComponent };
1607
+ interface DiffRow {
1608
+ field: string;
1609
+ before: string;
1610
+ after: string;
1990
1611
  }
1612
+ declare function diffRowsFrom(diff?: MCPFieldDiff | null): DiffRow[];
1613
+ type VoiceChatState = 'idle' | 'listening' | 'processingSpeech' | 'thinking' | 'fetchingData' | 'speaking' | 'completed' | 'error';
1614
+ /** Visual treatment hint for the template — keeps animation choice out of HTML. */
1615
+ type VoiceChatVisual = 'idle' | 'pulse' | 'loader' | 'wave' | 'error';
1616
+ declare const VOICE_ERROR_MESSAGES: Record<string, string>;
1617
+ /** Status copy per state — reassuring, conversational, and never silent. */
1618
+ declare const STATE_COPY: Record<VoiceChatState, string>;
1619
+ declare const STATE_VISUAL: Record<VoiceChatState, VoiceChatVisual>;
1991
1620
  /**
1992
- * A form's Cancel / Submit row that stays on screen while a long form scrolls. Put the buttons inside
1993
- * it. Pages that hold it rely on the `@posiwise/core-styles` rule that stops the shell's
1994
- * `.overflow-hidden` containers from trapping a sticky element.
1621
+ * Voice Chat controller for the Brain chat composer (#58) — explicit state
1622
+ * machine over the WS relay: listening (start) → thinking (`text` role=user)
1623
+ * → fetchingData (`tool_use`) → speaking (`speaking_changed`) → listening.
1624
+ * Copy/visual vocab lives in pw-brain-chat-voice-copy.ts (C1 line budget).
1995
1625
  */
1996
- export declare class PwStickyActionsComponent implements AfterViewInit {
1997
- private readonly el;
1998
- private readonly destroyRef;
1999
- /** True while the bar is pinned over the form rather than resting below it. */
2000
- readonly floating: import("@angular/core").WritableSignal<boolean>;
2001
- /**
2002
- * The bar sits at `bottom: -1px`, so while it is pinned one pixel is off the bottom of the screen.
2003
- * A bar cut off at the top is scrolling away under the header, not pinned.
2004
- */
2005
- ngAfterViewInit(): void;
2006
- static ɵfac: i0.ɵɵFactoryDeclaration<PwStickyActionsComponent, never>;
2007
- static ɵcmp: i0.ɵɵComponentDeclaration<PwStickyActionsComponent, "pw-sticky-actions", never, {}, {}, never, ["*"], true, never>;
2008
- }
2009
- declare namespace no_data_component_d_exports {
2010
- export { NoDataComponent };
2011
- }
2012
- export declare class NoDataComponent implements AfterContentInit {
2013
- content: {
2014
- nativeElement: {
2015
- innerHTML: string;
2016
- };
2017
- };
2018
- message: string | null;
2019
- description: string | null;
2020
- withImage: boolean;
2021
- isContentEmpty: boolean;
2022
- ngAfterContentInit(): void;
2023
- static ɵfac: i0.ɵɵFactoryDeclaration<NoDataComponent, never>;
2024
- static ɵcmp: i0.ɵɵComponentDeclaration<NoDataComponent, "pw-no-data", never, {
2025
- "message": {
2026
- "alias": "message";
2027
- "required": false;
2028
- };
2029
- "description": {
2030
- "alias": "description";
2031
- "required": false;
2032
- };
2033
- "withImage": {
2034
- "alias": "withImage";
2035
- "required": false;
2036
- };
2037
- }, {}, ["content"], ["*"], false, never>;
1626
+ declare class BrainChatVoiceChat {
1627
+ private readonly voice;
1628
+ private readonly changed;
1629
+ /** Called once per completed spoken exchange so the host can record it. */
1630
+ private readonly onTurn?;
1631
+ state: VoiceChatState;
1632
+ error: string | null;
1633
+ available: boolean;
1634
+ /** Latest user transcript (Sonic ASR) — enriches the `fetchingData` copy. */
1635
+ transcript: string;
1636
+ /** Assistant reply text for the current turn — streams in alongside the audio. */
1637
+ reply: string;
1638
+ private sub?;
1639
+ constructor(voice: VoiceChatService | undefined, changed: () => void,
1640
+ /** Called once per completed spoken exchange so the host can record it. */
1641
+ onTurn?: (userText: string, replyText: string) => void);
1642
+ get isActive(): boolean;
1643
+ /** Back-compat for callers that only care whether audio is playing. */
1644
+ get speaking(): boolean;
1645
+ /** Animation family the template renders for the current state. */
1646
+ get visual(): VoiceChatVisual;
1647
+ /** Status text next to the button; `null` when there's nothing to say. */
1648
+ get statusMessage(): string | null;
1649
+ /** Resolve once on init so the button shows only when voice-api is reachable. */
1650
+ resolveAvailability(): Promise<void>;
1651
+ /** Voice Chat button handler: start if idle, stop if active. */
1652
+ toggle(loading: boolean): void;
1653
+ stop(): void;
1654
+ /** Tear down with the host component (called from ngOnDestroy). */
1655
+ dispose(): void;
1656
+ private start;
1657
+ private apply;
1658
+ private onText;
1659
+ private onSpeakingStarted;
1660
+ private onSpeakingStopped;
1661
+ /** Hand the completed spoken exchange to the host (thread recording), then
1662
+ * reset the per-turn buffers. Safe to call with nothing buffered. */
1663
+ private flushTurn;
1664
+ /** Move forward only while a session is live (ignore stray events post-stop). */
1665
+ private advanceTo;
1666
+ private fail;
1667
+ private setState;
2038
1668
  }
2039
- declare namespace input_container_component_d_exports {
2040
- export { InputContainerComponent };
1669
+ declare namespace pw_brain_chat_component_d_exports {
1670
+ export { ChatMessage, ChatMessageRole, PendingConfirmation, PwBrainChatComponent };
2041
1671
  }
2042
- export declare class InputContainerComponent implements OnInit {
2043
- private readonly controlContainer;
2044
- control: AbstractControl;
2045
- name: string;
2046
- /** Id of the form control; used as the label's `for` attribute for accessibility. When not set, falls back to `name`. */
2047
- controlId: string;
2048
- /** When true, label gets id="{{ controlId }}-label" but no `for`; use with aria-labelledby on the control (e.g. quill-editor). */
2049
- useAriaLabelledbyOnly: boolean;
2050
- label: string;
2051
- labelClass: string;
2052
- tooltipPosition: string;
2053
- required: boolean;
2054
- errorMsg: string;
2055
- isReadOnly: boolean;
2056
- showTooltip: boolean;
2057
- tooltipText: string;
2058
- showTriangle: boolean;
2059
- afterLabel: string;
2060
- showAfterLabel: boolean;
2061
- showTriangleText: string;
2062
- isLeftTooltip: boolean;
1672
+ export declare class PwBrainChatComponent implements OnInit, OnDestroy {
1673
+ private readonly orchestrator;
1674
+ private readonly localStorage;
1675
+ private readonly router;
2063
1676
  private readonly cdr;
2064
- private readonly destroyRef;
2065
- constructor(controlContainer: ControlContainer);
1677
+ private readonly store;
1678
+ private readonly dynamicPageCtx;
1679
+ private readonly appConfigService;
1680
+ private readonly brainSocket;
1681
+ private readonly brainVoice;
1682
+ private readonly voiceChatService;
1683
+ private readonly directUpload;
1684
+ private readonly uploadApis;
1685
+ messages: ChatMessage[];
1686
+ draft: string;
1687
+ loading: boolean;
1688
+ streamingStage: string | null;
1689
+ streamingProse: string | null;
1690
+ brandName: string;
1691
+ userFirstName?: string;
1692
+ readonly suggestedPrompts: readonly BrainChatPrompt[];
1693
+ private conversationId;
1694
+ private storage;
1695
+ private streamSub?;
1696
+ private readonly destroy$;
1697
+ readonly diffRows: typeof diffRowsFrom;
1698
+ readonly dictation: BrainChatDictation;
1699
+ readonly voiceChat: BrainChatVoiceChat;
1700
+ readonly attachment: BrainChatAttachment;
1701
+ private sentAttachment;
1702
+ private readonly threadRef?;
1703
+ constructor();
2066
1704
  ngOnInit(): void;
1705
+ private subscribeToServerPush;
1706
+ ngOnDestroy(): void;
2067
1707
  /**
2068
- * Angular 22 makes components OnPush unless they opt out, and this one's inputs
2069
- * never change when the control does. Without this, `markAllAsTouched()` on a
2070
- * failed submit leaves every error message hidden and the button looks dead.
1708
+ * Paperclip path. The input is reset after every pick so choosing the same
1709
+ * file twice in a row still fires `change` (the browser suppresses it
1710
+ * otherwise, and "nothing happened" is a maddening bug to hit).
2071
1711
  */
2072
- private refreshOnControlEvents;
2073
- static ɵfac: i0.ɵɵFactoryDeclaration<InputContainerComponent, [{
2074
- optional: true;
2075
- host: true;
2076
- skipSelf: true;
2077
- }]>;
2078
- static ɵcmp: i0.ɵɵComponentDeclaration<InputContainerComponent, "pw-input-container", never, {
2079
- "name": {
2080
- "alias": "name";
2081
- "required": false;
2082
- };
2083
- "controlId": {
2084
- "alias": "controlId";
2085
- "required": false;
2086
- };
2087
- "useAriaLabelledbyOnly": {
2088
- "alias": "useAriaLabelledbyOnly";
2089
- "required": false;
2090
- };
2091
- "label": {
2092
- "alias": "label";
2093
- "required": false;
2094
- };
2095
- "labelClass": {
2096
- "alias": "labelClass";
2097
- "required": false;
1712
+ pickFile(input: HTMLInputElement): void;
1713
+ /**
1714
+ * The composer teaches the affordance: with a file staged, the next thing
1715
+ * to do is send it, with or without a message. Leaving the generic prompt
1716
+ * there left people looking for an upload button that does not exist.
1717
+ */
1718
+ get composerPlaceholder(): string;
1719
+ send(): void;
1720
+ approve(message: ChatMessage): void;
1721
+ cancel(message: ChatMessage): void;
1722
+ cancelRequest(): void;
1723
+ trackByIndex(index: number, _item: ChatMessage): number;
1724
+ usePrompt(text: string): void;
1725
+ newChat(): void;
1726
+ private handleExecuteResponse;
1727
+ private applySuccessResult;
1728
+ private handleError;
1729
+ private persistConversationId;
1730
+ private pushAssistant;
1731
+ /** Voice session turn completed — record the spoken exchange in the thread
1732
+ * so the conversation survives the overlay (plain text: it was speech). */
1733
+ private recordVoiceTurn;
1734
+ private stick;
1735
+ static ɵfac: i0.ɵɵFactoryDeclaration<PwBrainChatComponent, never>;
1736
+ static ɵcmp: i0.ɵɵComponentDeclaration<PwBrainChatComponent, "pw-brain-chat", never, {}, {}, never, never, true, never>;
1737
+ }
1738
+ declare namespace pw_brain_chat_confirm_component_d_exports {
1739
+ export { PwBrainChatConfirmComponent };
1740
+ }
1741
+ /**
1742
+ * Pending-action confirmation panel for the Brain chat bubble — risk badge,
1743
+ * target tool, field-level diff, and Approve/Cancel controls. Extracted from
1744
+ * the parent component template so `pw-brain-chat.component.html` stays under
1745
+ * the C1 200-line cap. Emits back to the parent, which owns the /confirm call
1746
+ * and message mutation (approve/cancel).
1747
+ */
1748
+ declare class PwBrainChatConfirmComponent {
1749
+ pending: PendingConfirmation;
1750
+ loading: boolean;
1751
+ approveEvent: EventEmitter<void>;
1752
+ cancelEvent: EventEmitter<void>;
1753
+ readonly diffRows: typeof diffRowsFrom;
1754
+ static ɵfac: i0.ɵɵFactoryDeclaration<PwBrainChatConfirmComponent, never>;
1755
+ static ɵcmp: i0.ɵɵComponentDeclaration<PwBrainChatConfirmComponent, "pw-brain-chat-confirm", never, {
1756
+ "pending": {
1757
+ "alias": "pending";
1758
+ "required": true;
2098
1759
  };
2099
- "tooltipPosition": {
2100
- "alias": "tooltipPosition";
1760
+ "loading": {
1761
+ "alias": "loading";
2101
1762
  "required": false;
2102
1763
  };
2103
- "required": {
2104
- "alias": "required";
1764
+ }, {
1765
+ "approveEvent": "approveEvent";
1766
+ "cancelEvent": "cancelEvent";
1767
+ }, never, never, true, never>;
1768
+ }
1769
+ declare namespace pw_brain_chat_quick_component_d_exports {
1770
+ export { PwBrainChatQuickComponent };
1771
+ }
1772
+ /**
1773
+ * Quick-action chips above the composer: the product's own chips (e.g. "Setup", cloudolive-api#441)
1774
+ * the viewer may see, then the shared Usage / Tools / Status. Emits the prompt text; the parent sends it.
1775
+ */
1776
+ declare class PwBrainChatQuickComponent {
1777
+ pick: EventEmitter<string>;
1778
+ readonly actions: readonly BrainChatQuickAction[];
1779
+ constructor();
1780
+ static ɵfac: i0.ɵɵFactoryDeclaration<PwBrainChatQuickComponent, never>;
1781
+ static ɵcmp: i0.ɵɵComponentDeclaration<PwBrainChatQuickComponent, "pw-brain-chat-quick", never, {}, {
1782
+ "pick": "pick";
1783
+ }, never, never, true, never>;
1784
+ }
1785
+ declare namespace pw_brain_chat_welcome_component_d_exports {
1786
+ export { PwBrainChatWelcomeComponent };
1787
+ }
1788
+ /**
1789
+ * First-open welcome state for the Brain chat — greeting + suggested-prompt
1790
+ * rows. Extracted from the parent template so `pw-brain-chat.component.html`
1791
+ * stays under the C1 200-line cap. Emits the picked prompt text; the parent
1792
+ * owns send().
1793
+ */
1794
+ declare class PwBrainChatWelcomeComponent {
1795
+ private readonly permission;
1796
+ private readonly productPrompts;
1797
+ /** Signed-in user's first name; when set the greeting reads "Hi {name},". */
1798
+ userFirstName?: string;
1799
+ prompts: readonly BrainChatPrompt[];
1800
+ pick: EventEmitter<string>;
1801
+ /** The product's own prompts the viewer may see, then the shared ones. */
1802
+ get visiblePrompts(): readonly BrainChatPrompt[];
1803
+ static ɵfac: i0.ɵɵFactoryDeclaration<PwBrainChatWelcomeComponent, never>;
1804
+ static ɵcmp: i0.ɵɵComponentDeclaration<PwBrainChatWelcomeComponent, "pw-brain-chat-welcome", never, {
1805
+ "userFirstName": {
1806
+ "alias": "userFirstName";
2105
1807
  "required": false;
2106
1808
  };
2107
- "errorMsg": {
2108
- "alias": "errorMsg";
1809
+ "prompts": {
1810
+ "alias": "prompts";
2109
1811
  "required": false;
2110
1812
  };
2111
- "isReadOnly": {
2112
- "alias": "isReadOnly";
2113
- "required": false;
2114
- };
2115
- "showTooltip": {
2116
- "alias": "showTooltip";
2117
- "required": false;
2118
- };
2119
- "tooltipText": {
2120
- "alias": "tooltipText";
2121
- "required": false;
2122
- };
2123
- "showTriangle": {
2124
- "alias": "showTriangle";
2125
- "required": false;
2126
- };
2127
- "afterLabel": {
2128
- "alias": "afterLabel";
2129
- "required": false;
2130
- };
2131
- "showAfterLabel": {
2132
- "alias": "showAfterLabel";
2133
- "required": false;
2134
- };
2135
- "showTriangleText": {
2136
- "alias": "showTriangleText";
2137
- "required": false;
2138
- };
2139
- "isLeftTooltip": {
2140
- "alias": "isLeftTooltip";
2141
- "required": false;
2142
- };
2143
- }, {}, never, ["*"], false, never>;
1813
+ }, {
1814
+ "pick": "pick";
1815
+ }, never, never, true, never>;
2144
1816
  }
2145
- declare namespace completion_bar_component_d_exports {
2146
- export { CompletionBarComponent, CompletionTier };
1817
+ type SonarState = 'listening' | 'processingSpeech' | 'thinking' | 'fetchingData' | 'speaking' | 'error';
1818
+ interface SonarColors {
1819
+ first: string;
1820
+ ink3: string;
1821
+ tick: string;
1822
+ tickMaj: string;
1823
+ idle: string;
1824
+ line: string;
1825
+ err: string;
1826
+ n500: string;
2147
1827
  }
2148
- export type CompletionTier = 'low' | 'mid' | 'high';
2149
- /**
2150
- * Generic, presentational segmented completion/progress bar.
2151
- *
2152
- * Renders a row of discrete segments; the first `round(value/100 * segments)`
2153
- * are filled. The fill colour shifts by tier (low/mid/high) using the shared
2154
- * semantic token maps — never the tenant accent (design-system: accent-agnostic).
2155
- * Reusable anywhere via `@posiwise/shared-components`.
2156
- */
2157
- export declare class CompletionBarComponent {
2158
- segments: number;
2159
- showLabel: boolean;
2160
- /** Optional label override; defaults to the rounded percentage. */
2161
- label: string | null;
2162
- /** Optional aria-label override; defaults to the visible label. */
2163
- ariaLabel: string | null;
2164
- /**
2165
- * Optional explanatory tooltip (e.g. "what's missing to reach 100%").
2166
- * Rendered as a body-level portal (C18); no tooltip when null/empty.
2167
- */
2168
- tooltip: string | null;
2169
- /** `value` below this is the low tier. */
2170
- lowThreshold: number;
2171
- /** `value` at/above this is the high tier. */
2172
- highThreshold: number;
2173
- private internalValue;
2174
- /** Completion as a 0–100 percentage. Out-of-range inputs are clamped. */
2175
- set value(v: number);
2176
- get value(): number;
2177
- get clampedValue(): number;
2178
- get filledCount(): number;
2179
- get segmentIndexes(): number[];
2180
- get tier(): CompletionTier;
2181
- get displayLabel(): string;
2182
- static ɵfac: i0.ɵɵFactoryDeclaration<CompletionBarComponent, never>;
2183
- static ɵcmp: i0.ɵɵComponentDeclaration<CompletionBarComponent, "pw-completion-bar", never, {
2184
- "segments": {
2185
- "alias": "segments";
2186
- "required": false;
2187
- };
2188
- "showLabel": {
2189
- "alias": "showLabel";
2190
- "required": false;
2191
- };
2192
- "label": {
2193
- "alias": "label";
2194
- "required": false;
2195
- };
2196
- "ariaLabel": {
2197
- "alias": "ariaLabel";
2198
- "required": false;
2199
- };
2200
- "tooltip": {
2201
- "alias": "tooltip";
2202
- "required": false;
2203
- };
2204
- "lowThreshold": {
2205
- "alias": "lowThreshold";
2206
- "required": false;
2207
- };
2208
- "highThreshold": {
2209
- "alias": "highThreshold";
2210
- "required": false;
2211
- };
2212
- "value": {
2213
- "alias": "value";
2214
- "required": false;
2215
- };
2216
- }, {}, never, never, false, never>;
1828
+ declare const SIZE = 280;
1829
+ declare const CX: number;
1830
+ declare const CY: number;
1831
+ declare const R_TICK = 118;
1832
+ declare const R_OUTER = 128;
1833
+ declare const R_CORE = 32;
1834
+ declare const R_MAX = 112;
1835
+ interface Ring {
1836
+ r: number;
1837
+ life: number;
1838
+ amp: number;
2217
1839
  }
2218
- declare namespace records_summary_component_d_exports {
2219
- export { RecordsSummaryComponent };
1840
+ interface SonarNode {
1841
+ a: number;
1842
+ r: number;
1843
+ lit: number;
1844
+ }
1845
+ interface SonarAnim {
1846
+ micLevel: number;
1847
+ ringPhase: number;
1848
+ rings: Ring[];
1849
+ radar: number;
1850
+ nodes: SonarNode[];
1851
+ }
1852
+ declare const SONAR_LABELS: Record<SonarState, string>;
1853
+ declare function makeAnim(): SonarAnim;
1854
+ declare function alpha(color: string, a: number): string;
1855
+ declare function ring(ctx: CanvasRenderingContext2D, r: number, stroke: string, w: number): void;
1856
+ /** The persistent instrument bezel: outer boundary, 72 ticks, guide rings. */
1857
+ declare function chrome(ctx: CanvasRenderingContext2D, c: SonarColors): void;
1858
+ /** Centred JetBrains-Mono telemetry line (letter-spaced) below the dial core. */
1859
+ declare function readout(ctx: CanvasRenderingContext2D, text: string, col: string): void;
1860
+ declare namespace pw_brain_chat_voice_overlay_component_d_exports {
1861
+ export { PwBrainChatVoiceOverlayComponent };
2220
1862
  }
2221
1863
  /**
2222
- * Shared table-footer "Showing X of Y items" summary.
2223
- *
2224
- * Replaces the hand-rolled `<span class="total-records-count">{{ 'Label.RecordsSummary' | transloco: {…} }}</span>`
2225
- * that was previously copy-pasted into every list across main-frontend and the
2226
- * spinout frontends. The `total-records-count` class is owned globally by
2227
- * `@posiwise/core-styles`, so it is applied to the host here and renders
2228
- * identically wherever core-styles is loaded.
2229
- *
2230
- * Usage:
2231
- * <pw-records-summary [showing]="dt?.value?.length ?? 0" [total]="totalRecords" />
1864
+ * Sonar voice-session overlay (#51) — a focused takeover over the chat panel
1865
+ * that animates the real voice/dictation state machine on an instrument dial.
1866
+ * Default change detection: the voice/dictation controllers mutate in place, so
1867
+ * the template must re-read them on every parent CD tick. The canvas is driven
1868
+ * by its own rAF loop and never needs CD.
2232
1869
  */
2233
- export declare class RecordsSummaryComponent {
2234
- /** Number of rows currently rendered (e.g. `dt?.value?.length`). */
2235
- showing: number | null;
2236
- /** Total number of records across all pages. */
2237
- total: number | null;
2238
- static ɵfac: i0.ɵɵFactoryDeclaration<RecordsSummaryComponent, never>;
2239
- static ɵcmp: i0.ɵɵComponentDeclaration<RecordsSummaryComponent, "pw-records-summary", never, {
2240
- "showing": {
2241
- "alias": "showing";
1870
+ declare class PwBrainChatVoiceOverlayComponent implements AfterViewInit, OnDestroy {
1871
+ private readonly host;
1872
+ voice: BrainChatVoiceChat | null;
1873
+ dictation: BrainChatDictation | null;
1874
+ readonly end: EventEmitter<void>;
1875
+ private readonly dialRef?;
1876
+ private readonly endBtnRef?;
1877
+ private ctx;
1878
+ private raf;
1879
+ private last;
1880
+ private prevState;
1881
+ private colors;
1882
+ private readonly renderer;
1883
+ private readonly reduce;
1884
+ /** The voice controller iff a voice session is live (active or errored). */
1885
+ private get activeVoice();
1886
+ get isVoice(): boolean;
1887
+ get state(): SonarState;
1888
+ get isError(): boolean;
1889
+ get label(): string;
1890
+ get modeTag(): string;
1891
+ get transcript(): string;
1892
+ get showTranscript(): boolean;
1893
+ /** Assistant reply text, streamed live while the audio answer plays. */
1894
+ get reply(): string;
1895
+ get showReply(): boolean;
1896
+ get showSteps(): boolean;
1897
+ get stepIndex(): number;
1898
+ get stepCaption(): string;
1899
+ get coreIcon(): string;
1900
+ get hint(): string;
1901
+ ngAfterViewInit(): void;
1902
+ ngOnDestroy(): void;
1903
+ onEnd(): void;
1904
+ private readonly frame;
1905
+ /** Read theme-aware colours (the --bc-* tokens inherit from .pw-brain-chat). */
1906
+ private readColors;
1907
+ static ɵfac: i0.ɵɵFactoryDeclaration<PwBrainChatVoiceOverlayComponent, never>;
1908
+ static ɵcmp: i0.ɵɵComponentDeclaration<PwBrainChatVoiceOverlayComponent, "pw-brain-chat-voice-overlay", never, {
1909
+ "voice": {
1910
+ "alias": "voice";
2242
1911
  "required": false;
2243
1912
  };
2244
- "total": {
2245
- "alias": "total";
1913
+ "dictation": {
1914
+ "alias": "dictation";
2246
1915
  "required": false;
2247
1916
  };
2248
- }, {}, never, never, false, never>;
1917
+ }, {
1918
+ "end": "end";
1919
+ }, never, never, true, never>;
2249
1920
  }
2250
- /**
2251
- * The onboarding status every product API returns from its `onboarding_status` tool and
2252
- * `GET onboarding/:subscription_id/status` endpoint (cloudolive-api#441). Product-agnostic: step titles and
2253
- * descriptions are the text the product's master subscription admin wrote; blocked reasons and states arrive
2254
- * as Transloco keys owned by the product.
2255
- */
2256
- export type OnboardingStepState = 'done' | 'next' | 'ready' | 'blocked' | 'waiting' | 'todo' | 'optional' | 'unknown';
2257
- export interface OnboardingStep {
2258
- key: string;
2259
- position: number;
2260
- kind: 'required' | 'optional' | 'system';
2261
- /** The step's title as the admin wrote it. */
2262
- title?: string;
2263
- description?: string | null;
2264
- /** The product's check that decides the step; null = manual, the customer ticks it. */
2265
- check_key?: string | null;
2266
- /** @deprecated Transloco key from before steps became editable; use `title`. */
2267
- title_key?: string;
2268
- /** @deprecated Use `description`. */
2269
- description_key?: string | null;
2270
- route?: string | null;
2271
- /** Slug of the FAQ that explains the step; null when the product API found no FAQ the viewer can open. */
2272
- faq_slug?: string | null;
2273
- activation: boolean;
2274
- admin_only: boolean;
2275
- depends_on: string[];
2276
- state: OnboardingStepState;
2277
- /** True for the one step the customer should act on now. */
2278
- current: boolean;
2279
- reason_key?: string;
2280
- /** The customer's own system's message (e.g. their PSA's error), already truncated. */
2281
- detail?: string;
2282
- meta?: Record<string, unknown>;
2283
- /** False when the step needs an admin and the viewer is not one; null when unknown. */
2284
- can_act: boolean | null;
1921
+ declare namespace entity_group_component_d_exports {
1922
+ export { EntityGroupComponent };
2285
1923
  }
2286
- export interface OnboardingStatus {
2287
- subscription_id: number;
2288
- feature_key: string | null;
2289
- status: 'ok' | 'not_applicable' | 'unavailable';
2290
- activated: boolean;
2291
- next_step: string | null;
2292
- progress: {
2293
- done: number;
2294
- total: number;
1924
+ export declare class EntityGroupComponent extends AppBaseComponent implements OnInit, OnDestroy {
1925
+ private readonly groupService;
1926
+ private readonly subscriptionService;
1927
+ private readonly modalService;
1928
+ private readonly cdr;
1929
+ content: TemplateRef<SharedModalContext>;
1930
+ subscription: Subscription;
1931
+ subscriptionId: number;
1932
+ user: User;
1933
+ userId: number;
1934
+ entityId: number;
1935
+ selectedGroup: {
1936
+ name: string;
2295
1937
  };
2296
- steps: OnboardingStep[];
1938
+ subscriptionMembers: any[];
1939
+ subscribedMembers: any[];
1940
+ filteredMembers: any[];
1941
+ selectedMembers: any[];
1942
+ enrolledUsers: EnrolledUser[];
1943
+ admins: any[];
1944
+ subscriptionInfo: any[];
1945
+ subscriptionOwner: number;
1946
+ /** Chat permission for the selected product, read at render time (#4228). */
1947
+ get chatPermission(): string | null;
1948
+ isLoaded: boolean;
1949
+ hasAccess: boolean;
1950
+ ngOnInit(): void;
1951
+ search(event: any): void;
1952
+ open(): void;
1953
+ closeModal(modal: any): void;
1954
+ getEntity(): void;
1955
+ onSave(): void;
1956
+ private getSubscribedUsers;
1957
+ onDelete(memberId: any): void;
1958
+ navigateToCommunications(): void;
1959
+ ngOnDestroy(): void;
1960
+ static ɵfac: i0.ɵɵFactoryDeclaration<EntityGroupComponent, never>;
1961
+ static ɵcmp: i0.ɵɵComponentDeclaration<EntityGroupComponent, "pw-entity-group", never, {}, {}, never, never, true, never>;
2297
1962
  }
2298
- /**
2299
- * The subscription has a checklist with mandatory steps still to do. Products use it to hold a user on /home
2300
- * at login (common-services ONBOARDING_STATUS_SOURCES).
2301
- */
2302
- export declare function hasOpenMandatorySteps(status: OnboardingStatus | null | undefined): boolean;
2303
- declare namespace onboarding_checklist_component_d_exports {
2304
- export { OnboardingChecklistComponent };
1963
+ declare namespace groups_component_d_exports {
1964
+ export { GroupsComponent };
2305
1965
  }
2306
- /**
2307
- * Presentational onboarding checklist (cloudolive-api#441). Product-agnostic: the host fetches the
2308
- * status from its own product API and passes it in, plus the route placeholders' values.
2309
- *
2310
- * Gating (AI54) is the host's: pass `loading` until the request resolves and `loadFailed` on error.
2311
- * Renders nothing for `not_applicable` / `unavailable` — "no onboarding" and "can't tell right now"
2312
- * both hide the card rather than show an empty or broken one.
2313
- */
2314
- export declare class OnboardingChecklistComponent implements OnChanges {
2315
- status: OnboardingStatus | null;
2316
- loading: boolean;
2317
- loadFailed: boolean;
2318
- /** Values for the `{slug}` / `{subscription_id}` placeholders in step routes. */
2319
- slug: string;
2320
- subscriptionId: number | null;
2321
- /** The host is saving a manual tick: the tick controls are disabled meanwhile. */
2322
- busy: boolean;
2323
- readonly retry: EventEmitter<void>;
2324
- /** A manual step was ticked (completed: true) or unticked; the host saves it and passes the new status. */
2325
- readonly markDone: EventEmitter<{
2326
- key: string;
2327
- completed: boolean;
2328
- }>;
2329
- readonly doneIcon: IconDefinition;
2330
- readonly helpIcon: IconDefinition;
2331
- readonly expandIcon: IconDefinition;
2332
- readonly collapseIcon: IconDefinition;
2333
- /**
2334
- * Whether the steps below the progress line are shown. Collapsed by default, so the card stays a
2335
- * one-line progress summary on /home until someone opens it; their choice is remembered per
2336
- * subscription in this browser.
2337
- */
2338
- expanded: boolean;
2339
- ngOnChanges(changes: SimpleChanges): void;
2340
- toggle(): void;
2341
- get visible(): boolean;
2342
- /** Recommended steps, done and total, shown next to the mandatory progress ("+ 1 of 3 recommended"). */
2343
- get recommended(): {
2344
- done: number;
2345
- total: number;
2346
- };
2347
- /** One segment per mandatory step, so the bar reads as "steps done", not an abstract percentage. */
2348
- get progressSegments(): number[];
2349
- /**
2350
- * Every required step is done. Deliberately NOT `status.activated`: activation is the product's
2351
- * milestone (e.g. a first finalised reconciliation) and can be reached with required steps still
2352
- * open, which made "You're all set" sit above "5 of 8 steps done".
2353
- */
2354
- get allDone(): boolean;
2355
- /**
2356
- * Mandatory steps (they count towards progress) and recommended ones (`kind: 'optional'`), listed
2357
- * under their own headings instead of a label repeated on every row.
2358
- */
2359
- get groups(): {
2360
- key: string;
2361
- labelKey: string;
2362
- steps: OnboardingStep[];
1966
+ export declare class GroupsComponent extends AppBaseComponent implements OnInit, OnDestroy {
1967
+ private readonly fb;
1968
+ private readonly groupService;
1969
+ private readonly subscriptionService;
1970
+ private readonly dataService;
1971
+ private readonly cdr;
1972
+ private readonly confirmDialog;
1973
+ private groupsData;
1974
+ subscription: Subscription;
1975
+ message: number;
1976
+ id: number;
1977
+ group_id: number;
1978
+ form: FormGroup;
1979
+ description: string;
1980
+ name: string;
1981
+ allGroups: Group[];
1982
+ groupDefinition: {
1983
+ name: string;
1984
+ groups: IterableIterator<object>;
2363
1985
  }[];
2364
- /** The group heading already says "Recommended", so an open optional step reads "To do". */
2365
- stateLabelKey(step: OnboardingStep): string;
2366
- get currentStep(): OnboardingStep | null;
2367
- icon(step: OnboardingStep): IconDefinition;
2368
- routeFor(step: OnboardingStep): string | null;
2369
- /** /{subscription slug}/faq/{faq slug} (the app's `:slug/faq/:id` route); null when there is no FAQ. */
2370
- faqHref(step: OnboardingStep): string | null;
2371
- /** A step's call to action; null when there is nothing for this viewer to click. */
2372
- actionKey(step: OnboardingStep): string | null;
2373
- /**
2374
- * A manual step the viewer can tick: no check decides it (check_key null), its state is known, and the
2375
- * viewer may act on it (an admin-only step needs an admin).
2376
- */
2377
- canTick(step: OnboardingStep): boolean;
2378
- tick(step: OnboardingStep): void;
2379
- static ɵfac: i0.ɵɵFactoryDeclaration<OnboardingChecklistComponent, never>;
2380
- static ɵcmp: i0.ɵɵComponentDeclaration<OnboardingChecklistComponent, "pw-onboarding-checklist", never, {
2381
- "status": {
2382
- "alias": "status";
1986
+ domainGroupDefinition: any[];
1987
+ admins: any[];
1988
+ subscriptionInfo: any[];
1989
+ subscriptionOwner: number;
1990
+ enrolledUsers: {
1991
+ is_owner: boolean;
1992
+ id: number;
1993
+ }[];
1994
+ user: User;
1995
+ submitted: boolean;
1996
+ viewEdit: boolean;
1997
+ buttonBusy: boolean;
1998
+ isGroupOperations: boolean;
1999
+ isGroupEdit: boolean;
2000
+ hasAccess: boolean;
2001
+ isLoaded: boolean;
2002
+ constructor();
2003
+ ngOnInit(): void;
2004
+ /** Function to save group */
2005
+ saveGroup(): void;
2006
+ private getAllGroupDefinition;
2007
+ private getSubscribedUsers;
2008
+ groupOperation(): void;
2009
+ cancelUpdate(): void;
2010
+ editGroup(group_id: number): void;
2011
+ private getGroupDetails;
2012
+ updateDetails(): void;
2013
+ onDelete(id: number): void;
2014
+ filterDomainsList(event: any): void;
2015
+ previous(): void;
2016
+ navigateToCommunications(id: number): void;
2017
+ navigateToDocumentations(id: number): void;
2018
+ trackByGroup(_index: number, item: {
2019
+ id: number;
2020
+ }): number;
2021
+ ngOnDestroy(): void;
2022
+ static ɵfac: i0.ɵɵFactoryDeclaration<GroupsComponent, never>;
2023
+ static ɵcmp: i0.ɵɵComponentDeclaration<GroupsComponent, "pw-groups", never, {}, {}, never, never, true, never>;
2024
+ }
2025
+ declare namespace group_definition_component_d_exports {
2026
+ export { GroupDefinitionComponent };
2027
+ }
2028
+ export declare class GroupDefinitionComponent extends AppBaseComponent implements OnInit, OnDestroy {
2029
+ private readonly groupService;
2030
+ private readonly fb;
2031
+ private readonly subscriptionService;
2032
+ private readonly data;
2033
+ private readonly cdr;
2034
+ private readonly confirmDialog;
2035
+ subscriptions: any[];
2036
+ message: number;
2037
+ groupDefinition: object[];
2038
+ form: FormGroup;
2039
+ id: number;
2040
+ viewDefinition: boolean;
2041
+ viewEdit: boolean;
2042
+ private groupDefId;
2043
+ private groupDefinitionDetails;
2044
+ hasAccess: boolean;
2045
+ admins: any[];
2046
+ subscriptionInfo: any[];
2047
+ subscriptionOwner: number;
2048
+ enrolledUsers: EnrolledUser[];
2049
+ user: User;
2050
+ isLoaded: boolean;
2051
+ categoryBusyButton: boolean;
2052
+ constructor();
2053
+ ngOnInit(): void;
2054
+ private getAllGroupDefinition;
2055
+ private getSubscribedUsers;
2056
+ updateDetails(): void;
2057
+ onGroupDefinitionEdit(id: number): void;
2058
+ getSubscriptionDetails(): void;
2059
+ saveGroupDefinition(): void;
2060
+ onDelete(id: number): void;
2061
+ viewDefinitions(): void;
2062
+ previous(): void;
2063
+ onCancel(): void;
2064
+ ngOnDestroy(): void;
2065
+ static ɵfac: i0.ɵɵFactoryDeclaration<GroupDefinitionComponent, never>;
2066
+ static ɵcmp: i0.ɵɵComponentDeclaration<GroupDefinitionComponent, "pw-group-definition", never, {}, {}, never, never, true, never>;
2067
+ }
2068
+ type buttonsOrientationType = 'horizontal' | 'vertical' | 'h' | 'v';
2069
+ type sizeType = 'medium' | 'large' | 'small' | 'xlarge' | 'md' | 'lg' | 'sm' | 'xlg';
2070
+ interface CustomClasses {
2071
+ container?: string;
2072
+ up?: string;
2073
+ down?: string;
2074
+ postfix?: string;
2075
+ prefix?: string;
2076
+ success?: string;
2077
+ error?: string;
2078
+ }
2079
+ declare namespace number_picker_component_d_exports {
2080
+ export { NumberPickerComponent };
2081
+ }
2082
+ export declare class NumberPickerComponent implements OnInit {
2083
+ private readonly numberPickerService;
2084
+ private precision;
2085
+ private eventHolder;
2086
+ private countInterval;
2087
+ private isInputFocused;
2088
+ min: number;
2089
+ showTooltip: boolean;
2090
+ tooltipText: string;
2091
+ max: number;
2092
+ step: number;
2093
+ value: number;
2094
+ pickStartAfter: number;
2095
+ pickTimer: number;
2096
+ prefix: string;
2097
+ postfix: string;
2098
+ placeholder: string;
2099
+ buttonsOrientation: buttonsOrientationType;
2100
+ size: sizeType;
2101
+ customClass: CustomClasses;
2102
+ mouseWheel: boolean;
2103
+ arrowKeys: boolean;
2104
+ inputReadOnly: boolean;
2105
+ showUpButton: boolean;
2106
+ showDownButton: boolean;
2107
+ /** Optional id for the number input (for accessibility/label association). */
2108
+ inputId: string;
2109
+ valueChange: EventEmitter<number>;
2110
+ minReached: EventEmitter<boolean>;
2111
+ maxReached: EventEmitter<boolean>;
2112
+ pickStarted: EventEmitter<boolean>;
2113
+ pickStopped: EventEmitter<boolean>;
2114
+ pickUpStarted: EventEmitter<boolean>;
2115
+ pickUpStopped: EventEmitter<boolean>;
2116
+ pickDownStarted: EventEmitter<boolean>;
2117
+ pickDownStopped: EventEmitter<boolean>;
2118
+ ngOnInit(): void;
2119
+ isHorizontal(): boolean;
2120
+ onFocus(event: FocusEvent): void;
2121
+ onBlur(event: Event): void;
2122
+ onMouseWheel(event: WheelEvent): void;
2123
+ private afterMouseWheels;
2124
+ onValueChange(_event: Event): void;
2125
+ onDecrease(event: MouseEvent | WheelEvent | KeyboardEvent): void;
2126
+ onIncrease(event: MouseEvent | WheelEvent | KeyboardEvent): void;
2127
+ onMouseDown(event: MouseEvent, increase?: boolean): void;
2128
+ private isArrowUpDown;
2129
+ private isArrowUp;
2130
+ private loopPick;
2131
+ onMouseUp(event: MouseEvent, increase?: boolean): void;
2132
+ onKeyDown(event: KeyboardEvent): void;
2133
+ onKeyUp(event: KeyboardEvent): void;
2134
+ private afterMouseDown;
2135
+ private afterMouseUp;
2136
+ private afterPick;
2137
+ private clearTimers;
2138
+ private parseVal;
2139
+ private getPrecision;
2140
+ private round;
2141
+ private canIncrease;
2142
+ private canDecrease;
2143
+ private onPickStarted;
2144
+ private onPickStopped;
2145
+ private isLeftClick;
2146
+ private initPicker;
2147
+ static ɵfac: i0.ɵɵFactoryDeclaration<NumberPickerComponent, never>;
2148
+ static ɵcmp: i0.ɵɵComponentDeclaration<NumberPickerComponent, "pw-number-picker", never, {
2149
+ "min": {
2150
+ "alias": "min";
2383
2151
  "required": false;
2384
2152
  };
2385
- "loading": {
2386
- "alias": "loading";
2153
+ "showTooltip": {
2154
+ "alias": "showTooltip";
2387
2155
  "required": false;
2388
2156
  };
2389
- "loadFailed": {
2390
- "alias": "loadFailed";
2157
+ "tooltipText": {
2158
+ "alias": "tooltipText";
2391
2159
  "required": false;
2392
2160
  };
2393
- "slug": {
2394
- "alias": "slug";
2161
+ "max": {
2162
+ "alias": "max";
2395
2163
  "required": false;
2396
2164
  };
2397
- "subscriptionId": {
2398
- "alias": "subscriptionId";
2165
+ "step": {
2166
+ "alias": "step";
2399
2167
  "required": false;
2400
2168
  };
2401
- "busy": {
2402
- "alias": "busy";
2169
+ "value": {
2170
+ "alias": "value";
2171
+ "required": false;
2172
+ };
2173
+ "pickStartAfter": {
2174
+ "alias": "pickStartAfter";
2175
+ "required": false;
2176
+ };
2177
+ "pickTimer": {
2178
+ "alias": "pickTimer";
2179
+ "required": false;
2180
+ };
2181
+ "prefix": {
2182
+ "alias": "prefix";
2183
+ "required": false;
2184
+ };
2185
+ "postfix": {
2186
+ "alias": "postfix";
2187
+ "required": false;
2188
+ };
2189
+ "placeholder": {
2190
+ "alias": "placeholder";
2191
+ "required": false;
2192
+ };
2193
+ "buttonsOrientation": {
2194
+ "alias": "buttonsOrientation";
2195
+ "required": false;
2196
+ };
2197
+ "size": {
2198
+ "alias": "size";
2199
+ "required": false;
2200
+ };
2201
+ "customClass": {
2202
+ "alias": "customClass";
2203
+ "required": false;
2204
+ };
2205
+ "mouseWheel": {
2206
+ "alias": "mouseWheel";
2207
+ "required": false;
2208
+ };
2209
+ "arrowKeys": {
2210
+ "alias": "arrowKeys";
2211
+ "required": false;
2212
+ };
2213
+ "inputReadOnly": {
2214
+ "alias": "inputReadOnly";
2215
+ "required": false;
2216
+ };
2217
+ "showUpButton": {
2218
+ "alias": "showUpButton";
2219
+ "required": false;
2220
+ };
2221
+ "showDownButton": {
2222
+ "alias": "showDownButton";
2223
+ "required": false;
2224
+ };
2225
+ "inputId": {
2226
+ "alias": "inputId";
2403
2227
  "required": false;
2404
2228
  };
2405
2229
  }, {
2406
- "retry": "retry";
2407
- "markDone": "markDone";
2408
- }, never, never, false, never>;
2409
- }
2410
- declare namespace resource_shared_components_module_d_exports {
2411
- export { ResourceSharedComponentsModule };
2412
- }
2413
- export declare class ResourceSharedComponentsModule {
2414
- static ɵfac: i0.ɵɵFactoryDeclaration<ResourceSharedComponentsModule, never>;
2415
- static ɵmod: i0.ɵɵNgModuleDeclaration<ResourceSharedComponentsModule, [typeof NoDataComponent, typeof InputContainerComponent, typeof CompletionBarComponent, typeof RecordsSummaryComponent, typeof OnboardingChecklistComponent], [typeof i6.CommonModule, typeof i7.FormsModule, typeof i7.ReactiveFormsModule, typeof i8.RouterModule, typeof i9.FontAwesomeModule, typeof i10.AppLoaderModule, typeof i11.CoreTranslocoModule, typeof i12.DirectivesModule, typeof i13.ButtonModule, typeof i14.NgbTooltipModule, typeof i15.TooltipModule, typeof i16.ProgressSpinnerModule, typeof i17.AutoCompleteModule, typeof i18.DragDropModule, typeof i19.FieldErrorDisplayModule, typeof i19.ProfileImageCropperModule, typeof i19.ResourceHeaderModule], [typeof i19.ProfileImageCropperModule, typeof i19.ResourceHeaderModule, typeof InputContainerComponent, typeof NoDataComponent, typeof CompletionBarComponent, typeof RecordsSummaryComponent, typeof OnboardingChecklistComponent, typeof i13.ButtonModule, typeof i18.DragDropModule, typeof i16.ProgressSpinnerModule, typeof i17.AutoCompleteModule, typeof i15.TooltipModule, typeof i19.FieldErrorDisplayModule]>;
2416
- static ɵinj: i0.ɵɵInjectorDeclaration<ResourceSharedComponentsModule>;
2230
+ "valueChange": "valueChange";
2231
+ "minReached": "minReached";
2232
+ "maxReached": "maxReached";
2233
+ "pickStarted": "pickStarted";
2234
+ "pickStopped": "pickStopped";
2235
+ "pickUpStarted": "pickUpStarted";
2236
+ "pickUpStopped": "pickUpStopped";
2237
+ "pickDownStarted": "pickDownStarted";
2238
+ "pickDownStopped": "pickDownStopped";
2239
+ }, never, never, true, never>;
2417
2240
  }
2418
- declare namespace collapsible_sidebar_trigger_directive_d_exports {
2419
- export { CollapsibleSidebarTriggerDirective };
2241
+ declare namespace online_indicator_component_d_exports {
2242
+ export { OnlineIndicatorComponent };
2420
2243
  }
2421
2244
  /**
2422
- * pwCollapsibleSidebarTrigger
2245
+ * Green presence indicator shown beside a member's name.
2423
2246
  *
2424
- * Directive that makes an element a trigger for the collapsible sidebar.
2425
- * Useful for cog icons or buttons that should expand the sidebar when clicked.
2247
+ * Feed it `current_sign_in_at` and nothing else. Do NOT pass `last_sign_in_at`, nor the
2248
+ * `current_sign_in_at || last_sign_in_at` fallback the surrounding cells use for the date:
2249
+ * an explicit logout nulls `current_sign_in_at` and rolls its value into `last_sign_in_at`,
2250
+ * so the fallback would light the dot for someone who has just signed out.
2426
2251
  *
2427
- * Usage:
2428
- * ```html
2429
- * <button pwCollapsibleSidebarTrigger [contentId]="'posiwise-brain'">
2430
- * <i class="pi pi-cog"></i>
2431
- * </button>
2432
- * ```
2252
+ * The online window itself lives in the `isOnline` pipe, which is paired with main-api's
2253
+ * activity-refresh interval -- see ONLINE_THRESHOLD_MINUTES.
2433
2254
  */
2434
- export declare class CollapsibleSidebarTriggerDirective {
2435
- private readonly sidebarService;
2436
- /**
2437
- * The ID of the sidebar content to load when this trigger is clicked
2438
- */
2439
- contentId: string;
2440
- /**
2441
- * Optional tooltip text shown on hover
2442
- */
2443
- tooltipText: string;
2444
- constructor(sidebarService: CollapsibleSidebarService);
2445
- /**
2446
- * Handle click event to load sidebar content
2447
- */
2448
- onClick(event: MouseEvent): void;
2449
- static ɵfac: i0.ɵɵFactoryDeclaration<CollapsibleSidebarTriggerDirective, never>;
2450
- static ɵdir: i0.ɵɵDirectiveDeclaration<CollapsibleSidebarTriggerDirective, "[pwCollapsibleSidebarTrigger]", never, {
2451
- "contentId": {
2452
- "alias": "contentId";
2255
+ export declare class OnlineIndicatorComponent {
2256
+ /** The member's `current_sign_in_at` stamp. Never `last_sign_in_at`. */
2257
+ lastSeen: string | Date | null;
2258
+ static ɵfac: i0.ɵɵFactoryDeclaration<OnlineIndicatorComponent, never>;
2259
+ static ɵcmp: i0.ɵɵComponentDeclaration<OnlineIndicatorComponent, "pw-online-indicator", never, {
2260
+ "lastSeen": {
2261
+ "alias": "lastSeen";
2453
2262
  "required": false;
2454
2263
  };
2455
- "tooltipText": {
2456
- "alias": "tooltipText";
2264
+ }, {}, never, never, true, never>;
2265
+ }
2266
+ declare namespace header_component_d_exports {
2267
+ export { HeaderComponent };
2268
+ }
2269
+ export declare class HeaderComponent extends AppBaseComponent {
2270
+ private readonly authService;
2271
+ private readonly cdr;
2272
+ loggedIn: boolean;
2273
+ isMenuCollapsed: boolean;
2274
+ constructor();
2275
+ landing: boolean;
2276
+ navigateToLogin(): void;
2277
+ toggleMenu(): void;
2278
+ private logoFailed;
2279
+ get logo(): string | null;
2280
+ onLogoError(): void;
2281
+ static ɵfac: i0.ɵɵFactoryDeclaration<HeaderComponent, never>;
2282
+ static ɵcmp: i0.ɵɵComponentDeclaration<HeaderComponent, "pw-header", never, {
2283
+ "landing": {
2284
+ "alias": "landing";
2285
+ "required": false;
2286
+ };
2287
+ }, {}, never, never, true, never>;
2288
+ }
2289
+ declare namespace landing_page_footer_b_component_d_exports {
2290
+ export { LandingPageFooterBComponent };
2291
+ }
2292
+ export declare class LandingPageFooterBComponent extends AppBaseComponent implements OnInit {
2293
+ private readonly authService;
2294
+ private readonly cdr;
2295
+ isBrowserAccess: boolean;
2296
+ currentDate: Date;
2297
+ get companyName(): string;
2298
+ get companyEmail(): string;
2299
+ get companyTagline(): string | null;
2300
+ get logoUrl(): string;
2301
+ get socialLinkedin(): string | null;
2302
+ get socialFacebook(): string | null;
2303
+ get socialTwitter(): string | null;
2304
+ ngOnInit(): void;
2305
+ scrollToTop(event: Event): void;
2306
+ static ɵfac: i0.ɵɵFactoryDeclaration<LandingPageFooterBComponent, never>;
2307
+ static ɵcmp: i0.ɵɵComponentDeclaration<LandingPageFooterBComponent, "pw-landing-page-footer-b", never, {}, {}, never, never, true, never>;
2308
+ }
2309
+ export interface UiGrid {
2310
+ x: number;
2311
+ y: number;
2312
+ w: number;
2313
+ h: number;
2314
+ }
2315
+ export interface UiBinding {
2316
+ source: string;
2317
+ params?: Record<string, string | number | boolean>;
2318
+ filter?: Record<string, string | number | boolean>;
2319
+ }
2320
+ /** A resolved binding as returned by GET /main-api/v1/ui_layouts. */
2321
+ export interface ResolvedBinding {
2322
+ state: 'ok' | 'forbidden' | 'deferred' | 'unavailable' | 'unknown_source' | 'error';
2323
+ value?: Record<string, unknown>;
2324
+ reason?: string;
2325
+ }
2326
+ export interface UiBlock {
2327
+ id: string;
2328
+ type: string;
2329
+ grid: UiGrid;
2330
+ props?: Record<string, unknown>;
2331
+ /** Server replaces the request `binding` with a ResolvedBinding (or null). */
2332
+ binding?: ResolvedBinding | null;
2333
+ }
2334
+ export interface UiLayoutConfig {
2335
+ schema_version: number;
2336
+ version: number;
2337
+ page_key: string;
2338
+ blocks: UiBlock[];
2339
+ }
2340
+ /** Envelope of GET /main-api/v1/ui_layouts. */
2341
+ export interface UiLayoutResponse {
2342
+ data: {
2343
+ layout: {
2344
+ page_key: string;
2345
+ version: number;
2346
+ schema_version: number;
2347
+ blocks: UiBlock[];
2348
+ };
2349
+ };
2350
+ }
2351
+ declare namespace pw_dynamic_page_component_d_exports {
2352
+ export { PwDynamicPageComponent, UI_BUILDER_FLAG };
2353
+ }
2354
+ export declare const UI_BUILDER_FLAG = "conversational_ui_builder";
2355
+ export declare class PwDynamicPageComponent implements AfterViewInit, OnDestroy {
2356
+ private readonly injector;
2357
+ private readonly cdr;
2358
+ private readonly featureFlags;
2359
+ private readonly userService;
2360
+ private readonly sidebarService;
2361
+ private readonly appConfigService;
2362
+ host: ViewContainerRef;
2363
+ private _config;
2364
+ private viewReady;
2365
+ private configResolved;
2366
+ set config(value: UiLayoutConfig | null);
2367
+ get config(): UiLayoutConfig | null;
2368
+ private refs;
2369
+ private userResolved;
2370
+ private resolving;
2371
+ brandName: string;
2372
+ get enabled(): boolean;
2373
+ get showEmpty(): boolean;
2374
+ openBuilder(): void;
2375
+ ngAfterViewInit(): void;
2376
+ ngOnDestroy(): void;
2377
+ private render;
2378
+ private ensureUser;
2379
+ private doRender;
2380
+ private mount;
2381
+ private clear;
2382
+ static ɵfac: i0.ɵɵFactoryDeclaration<PwDynamicPageComponent, never>;
2383
+ static ɵcmp: i0.ɵɵComponentDeclaration<PwDynamicPageComponent, "pw-dynamic-page", never, {
2384
+ "config": {
2385
+ "alias": "config";
2457
2386
  "required": false;
2458
2387
  };
2459
2388
  }, {}, never, never, true, never>;
2460
2389
  }
2461
- declare namespace pw_cookie_banner_component_d_exports {
2462
- export { PwCookieBannerComponent };
2390
+ declare namespace section_heading_block_component_d_exports {
2391
+ export { SectionHeadingBlockComponent };
2463
2392
  }
2464
- export declare class PwCookieBannerComponent implements OnInit {
2465
- private readonly document;
2466
- private readonly translation;
2467
- title: string | null;
2468
- message: string | null;
2469
- acceptLabel: string | null;
2470
- privacyLinkLabel: string | null;
2471
- privacyLinkUrl: string | null;
2472
- privacyFallbackUrl: string;
2473
- cookieKey: string;
2474
- cookieTtlDays: number;
2475
- readonly visible: import("@angular/core").WritableSignal<boolean>;
2476
- readonly leaving: import("@angular/core").WritableSignal<boolean>;
2477
- readonly role = "region";
2478
- get ariaLabel(): string;
2479
- constructor(document: Document, translation: TranslocoService);
2480
- ngOnInit(): void;
2481
- get resolvedPrivacyUrl(): string;
2482
- accept(): void;
2483
- private animateOut;
2484
- private hasConsentCookie;
2485
- private setConsentCookie;
2486
- static ɵfac: i0.ɵɵFactoryDeclaration<PwCookieBannerComponent, never>;
2487
- static ɵcmp: i0.ɵɵComponentDeclaration<PwCookieBannerComponent, "pw-cookie-banner", never, {
2488
- "title": {
2489
- "alias": "title";
2393
+ declare class SectionHeadingBlockComponent {
2394
+ props: Record<string, unknown>;
2395
+ get text(): string;
2396
+ get level(): number;
2397
+ static ɵfac: i0.ɵɵFactoryDeclaration<SectionHeadingBlockComponent, never>;
2398
+ static ɵcmp: i0.ɵɵComponentDeclaration<SectionHeadingBlockComponent, "pw-section-heading-block", never, {
2399
+ "props": {
2400
+ "alias": "props";
2490
2401
  "required": false;
2491
2402
  };
2492
- "message": {
2493
- "alias": "message";
2403
+ }, {}, never, never, true, never>;
2404
+ }
2405
+ declare namespace divider_block_component_d_exports {
2406
+ export { DividerBlockComponent };
2407
+ }
2408
+ declare class DividerBlockComponent {
2409
+ props: Record<string, unknown>;
2410
+ get spacing(): number;
2411
+ static ɵfac: i0.ɵɵFactoryDeclaration<DividerBlockComponent, never>;
2412
+ static ɵcmp: i0.ɵɵComponentDeclaration<DividerBlockComponent, "pw-divider-block", never, {
2413
+ "props": {
2414
+ "alias": "props";
2494
2415
  "required": false;
2495
2416
  };
2496
- "acceptLabel": {
2497
- "alias": "acceptLabel";
2417
+ }, {}, never, never, true, never>;
2418
+ }
2419
+ declare namespace stat_card_block_component_d_exports {
2420
+ export { StatCardBlockComponent };
2421
+ }
2422
+ declare class StatCardBlockComponent {
2423
+ props: Record<string, unknown>;
2424
+ binding: ResolvedBinding | null;
2425
+ get title(): string;
2426
+ get metricValue(): string;
2427
+ static ɵfac: i0.ɵɵFactoryDeclaration<StatCardBlockComponent, never>;
2428
+ static ɵcmp: i0.ɵɵComponentDeclaration<StatCardBlockComponent, "pw-stat-card-block", never, {
2429
+ "props": {
2430
+ "alias": "props";
2498
2431
  "required": false;
2499
2432
  };
2500
- "privacyLinkLabel": {
2501
- "alias": "privacyLinkLabel";
2433
+ "binding": {
2434
+ "alias": "binding";
2502
2435
  "required": false;
2503
2436
  };
2504
- "privacyLinkUrl": {
2505
- "alias": "privacyLinkUrl";
2437
+ }, {}, never, never, true, never>;
2438
+ }
2439
+ declare namespace data_table_block_component_d_exports {
2440
+ export { DataTableBlockComponent };
2441
+ }
2442
+ declare class DataTableBlockComponent {
2443
+ props: Record<string, unknown>;
2444
+ binding: ResolvedBinding | null;
2445
+ get columns(): string[];
2446
+ get rows(): Array<Record<string, unknown>>;
2447
+ get stateKey(): string;
2448
+ cell(row: Record<string, unknown>, col: string): string;
2449
+ static ɵfac: i0.ɵɵFactoryDeclaration<DataTableBlockComponent, never>;
2450
+ static ɵcmp: i0.ɵɵComponentDeclaration<DataTableBlockComponent, "pw-data-table-block", never, {
2451
+ "props": {
2452
+ "alias": "props";
2506
2453
  "required": false;
2507
2454
  };
2508
- "privacyFallbackUrl": {
2509
- "alias": "privacyFallbackUrl";
2455
+ "binding": {
2456
+ "alias": "binding";
2510
2457
  "required": false;
2511
2458
  };
2512
- "cookieKey": {
2513
- "alias": "cookieKey";
2459
+ }, {}, never, never, true, never>;
2460
+ }
2461
+ declare namespace chart_block_component_d_exports {
2462
+ export { ChartBlockComponent };
2463
+ }
2464
+ declare class ChartBlockComponent {
2465
+ props: Record<string, unknown>;
2466
+ binding: ResolvedBinding | null;
2467
+ get title(): string;
2468
+ static ɵfac: i0.ɵɵFactoryDeclaration<ChartBlockComponent, never>;
2469
+ static ɵcmp: i0.ɵɵComponentDeclaration<ChartBlockComponent, "pw-chart-block", never, {
2470
+ "props": {
2471
+ "alias": "props";
2514
2472
  "required": false;
2515
2473
  };
2516
- "cookieTtlDays": {
2517
- "alias": "cookieTtlDays";
2474
+ "binding": {
2475
+ "alias": "binding";
2518
2476
  "required": false;
2519
2477
  };
2520
2478
  }, {}, never, never, true, never>;
2521
2479
  }
2522
- declare namespace pw_brain_chat_safe_markdown_pipe_d_exports {
2523
- export { SafeMarkdownPipe };
2480
+ export declare class SharedComponentsModule {
2481
+ static ɵfac: i0.ɵɵFactoryDeclaration<SharedComponentsModule, never>;
2482
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SharedComponentsModule, never, [typeof PwStickyActionsComponent, typeof i2.FormsModule, typeof i3.IconFieldModule, typeof i4.InputIconModule, typeof i5.InputTextModule, typeof i5$1.AppLoaderModule, typeof i2.ReactiveFormsModule, typeof i7.DirectivesModule, typeof i6.CoreTranslocoModule, typeof i3$1.RouterModule, typeof i9.NgbTooltipModule, typeof i10.TooltipModule, typeof i9.NgbNavModule, typeof i9.NgbModalModule, typeof i12.TableModule, typeof i13.TabsModule, typeof i8.ButtonModule, typeof i15.SelectModule, typeof i16.MultiSelectModule, typeof i11.ProgressSpinnerModule, typeof i12$1.AutoCompleteModule, typeof i19.ImageCropperComponent, typeof i20.UiSwitchModule, typeof i21.NgxDaterangepickerMd, typeof i22.PipesModule, typeof i1.CommonModule, typeof i1.NgIf, typeof i14.FieldErrorDisplayModule, typeof ResourceSharedComponentsModule, typeof CollapsibleSidebarTriggerDirective, typeof PwCookieBannerComponent, typeof SafeMarkdownPipe, typeof PwBrainChatThreadDirective, typeof AiKnowledgeComponent, typeof CommandPaletteComponent, typeof ConfirmDialogComponent, typeof PasswordValidationComponent, typeof PwTabsComponent, typeof DateRangePickerComponent, typeof PermissionTreeComponent, typeof PrivacyAndTosComponent, typeof SplashComponent, typeof AuthenticatorComponent, typeof ClearBitIconComponent, typeof ComingSoonComponent, typeof CollapsibleSidebarComponent, typeof PwBrainChatComponent, typeof PwBrainChatConfirmComponent, typeof PwBrainChatQuickComponent, typeof PwBrainChatWelcomeComponent, typeof PwBrainChatVoiceOverlayComponent, typeof EntityGroupComponent, typeof GroupsComponent, typeof GroupDefinitionComponent, typeof NumberPickerComponent, typeof OnlineIndicatorComponent, typeof HeaderComponent, typeof LandingPageFooterBComponent, typeof PwDynamicPageComponent, typeof SectionHeadingBlockComponent, typeof DividerBlockComponent, typeof StatCardBlockComponent, typeof DataTableBlockComponent, typeof ChartBlockComponent], [typeof AiKnowledgeComponent, typeof CommandPaletteComponent, typeof ConfirmDialogComponent, typeof PwCookieBannerComponent, typeof PasswordValidationComponent, typeof PwTabsComponent, typeof DateRangePickerComponent, typeof i9.NgbTooltipModule, typeof i10.TooltipModule, typeof i9.NgbNavModule, typeof i9.NgbModalModule, typeof i12.TableModule, typeof i13.TabsModule, typeof i8.ButtonModule, typeof i15.SelectModule, typeof i16.MultiSelectModule, typeof i11.ProgressSpinnerModule, typeof i12$1.AutoCompleteModule, typeof i19.ImageCropperComponent, typeof i20.UiSwitchModule, typeof i21.NgxDaterangepickerMd, typeof PermissionTreeComponent, typeof PrivacyAndTosComponent, typeof SplashComponent, typeof AuthenticatorComponent, typeof ClearBitIconComponent, typeof ComingSoonComponent, typeof CollapsibleSidebarComponent, typeof CollapsibleSidebarTriggerDirective, typeof PwBrainChatComponent, typeof EntityGroupComponent, typeof GroupsComponent, typeof GroupDefinitionComponent, typeof NumberPickerComponent, typeof OnlineIndicatorComponent, typeof HeaderComponent, typeof LandingPageFooterBComponent, typeof PwDynamicPageComponent, typeof i14.FieldErrorDisplayModule, typeof ResourceSharedComponentsModule]>;
2483
+ static ɵinj: i0.ɵɵInjectorDeclaration<SharedComponentsModule>;
2524
2484
  }
2525
2485
  /**
2526
- * Converts a Brain assistant message string (containing a safe subset of
2527
- * Markdown) into an HTML string suitable for `[innerHTML]` binding.
2528
- *
2529
- * Deliberately returns a plain `string`, NOT a `SafeHtml`: Angular sanitizes any
2530
- * string bound to `[innerHTML]`, so the output passes through DomSanitizer on
2531
- * the way to the DOM. `renderMarkdown` already HTML-escapes every user-sourced
2532
- * fragment and allow-lists hrefs, which makes this defence in depth rather than
2533
- * a substitute — two independent passes, neither trusting the other.
2534
- *
2535
- * Nothing is lost by it. The renderer only emits `<a href target rel>`,
2536
- * `<strong>`, `<em>` and `<br>`; Angular's own allow-lists carry `href`
2537
- * (URI_ATTRS) and `rel`/`target` (HTML_ATTRS), so sanitized output is
2538
- * byte-identical to the rendered input. An earlier revision reached for
2539
- * `bypassSecurityTrustHtml` here, which bought nothing and disabled the
2540
- * platform's last line of defence if the renderer ever regressed.
2541
- *
2542
- * Applied only to assistant bubbles; user bubbles keep plain-text rendering.
2543
- *
2544
- * The app-relative paths Brain answers carry (`/settings/communication`) are
2545
- * resolved against `links.frontend_link` from the domain metadata — the same
2546
- * host `auth.service` and `linkedin-confirmation` build their URLs from.
2547
- * `links` lives on the CONFIG object, not on the service, and the service's
2548
- * only public accessor is `appConfig$`, so the latest value is cached here;
2549
- * config resolves at app boot, long before a chat bubble renders.
2486
+ * Convenience overrides for `confirmDelete`. Any field of `ConfirmDialogConfig`
2487
+ * may be passed; the defaults are `{ titleKey: 'Button.Delete', textKey:
2488
+ * 'Common.Confirm.Delete.TextGeneric', destructive: true }`.
2550
2489
  */
2551
- declare class SafeMarkdownPipe implements PipeTransform, OnDestroy {
2552
- private readonly navigationIndex;
2553
- private baseUrl;
2554
- private readonly configSub;
2555
- constructor(navigationIndex: NavigationIndexService, appConfigService: AppConfigService);
2556
- ngOnDestroy(): void;
2557
- transform(text: string): string;
2558
- /**
2559
- * Every page the palette can reach, used to correct a path the model got
2560
- * nearly right. An unknown path is left alone, never suppressed.
2561
- */
2562
- private knownPaths;
2490
+ export type ConfirmDeleteOptions = Partial<ConfirmDialogConfig>;
2491
+ export declare class ConfirmDialogService {
2492
+ private readonly modal;
2493
+ open(config?: ConfirmDialogConfig): Promise<boolean>;
2563
2494
  /**
2564
- * Slug the router scopes dashboard pages under (`:slug/faq/:id`). Read per
2565
- * call rather than cached: the user can switch subscription mid-session.
2495
+ * Opens a generic destructive "Delete — Are you sure you want to delete?"
2496
+ * confirmation dialog. Pass overrides for any field (e.g. `text` with a
2497
+ * bold entity name, or `textKey` for an i18n key).
2566
2498
  */
2567
- private subscriptionSlug;
2568
- static ɵfac: i0.ɵɵFactoryDeclaration<SafeMarkdownPipe, never>;
2569
- static ɵpipe: i0.ɵɵPipeDeclaration<SafeMarkdownPipe, "safeMarkdown", true>;
2570
- }
2571
- declare namespace pw_brain_chat_thread_directive_d_exports {
2572
- export { PwBrainChatThreadDirective };
2573
- }
2574
- /**
2575
- * Intercepts clicks on `<a>` elements rendered inside assistant markdown
2576
- * bubbles. Internal paths (e.g. /account/details) are routed via Angular's
2577
- * Router so the SPA does not do a full-page reload. External URLs fall
2578
- * through to the browser's default behaviour (target=_blank already set by
2579
- * SafeMarkdownPipe / renderMarkdown for external links).
2580
- *
2581
- * Applied via the `pwBrainChatThread` attribute on the chat thread div.
2582
- */
2583
- declare class PwBrainChatThreadDirective {
2584
- private readonly router;
2585
- constructor(router: Router);
2586
- onClick(event: MouseEvent): void;
2587
- static ɵfac: i0.ɵɵFactoryDeclaration<PwBrainChatThreadDirective, never>;
2588
- static ɵdir: i0.ɵɵDirectiveDeclaration<PwBrainChatThreadDirective, "[pwBrainChatThread]", never, {}, {}, never, never, true, never>;
2589
- }
2590
- export declare class SharedComponentsModule {
2591
- static ɵfac: i0.ɵɵFactoryDeclaration<SharedComponentsModule, never>;
2592
- static ɵmod: i0.ɵɵNgModuleDeclaration<SharedComponentsModule, [typeof AiKnowledgeComponent, typeof CommandPaletteComponent, typeof ConfirmDialogComponent, typeof PasswordValidationComponent, typeof PwTabsComponent, typeof DateRangePickerComponent, typeof PermissionTreeComponent, typeof PrivacyAndTosComponent, typeof SplashComponent, typeof AuthenticatorComponent, typeof ClearBitIconComponent, typeof ComingSoonComponent, typeof CollapsibleSidebarComponent, typeof PwBrainChatComponent, typeof PwBrainChatConfirmComponent, typeof PwBrainChatQuickComponent, typeof PwBrainChatWelcomeComponent, typeof PwBrainChatVoiceOverlayComponent, typeof EntityGroupComponent, typeof GroupsComponent, typeof GroupDefinitionComponent, typeof NumberPickerComponent, typeof OnlineIndicatorComponent, typeof HeaderComponent, typeof LandingPageFooterBComponent, typeof PwDynamicPageComponent, typeof SectionHeadingBlockComponent, typeof DividerBlockComponent, typeof StatCardBlockComponent, typeof DataTableBlockComponent, typeof ChartBlockComponent], [typeof PwStickyActionsComponent, typeof i7.FormsModule, typeof i34.IconFieldModule, typeof i35.InputIconModule, typeof i36.InputTextModule, typeof i10.AppLoaderModule, typeof i7.ReactiveFormsModule, typeof i12.DirectivesModule, typeof i11.CoreTranslocoModule, typeof i8.RouterModule, typeof i14.NgbTooltipModule, typeof i15.TooltipModule, typeof i14.NgbNavModule, typeof i14.NgbModalModule, typeof i43.TableModule, typeof i44.TabsModule, typeof i13.ButtonModule, typeof i46.SelectModule, typeof i47.MultiSelectModule, typeof i16.ProgressSpinnerModule, typeof i17.AutoCompleteModule, typeof i50.ImageCropperComponent, typeof i51.UiSwitchModule, typeof i52.NgxDaterangepickerMd, typeof i53.PipesModule, typeof i6.CommonModule, typeof i6.NgIf, typeof i19.FieldErrorDisplayModule, typeof ResourceSharedComponentsModule, typeof CollapsibleSidebarTriggerDirective, typeof PwCookieBannerComponent, typeof SafeMarkdownPipe, typeof PwBrainChatThreadDirective], [typeof AiKnowledgeComponent, typeof CommandPaletteComponent, typeof ConfirmDialogComponent, typeof PwCookieBannerComponent, typeof PasswordValidationComponent, typeof PwTabsComponent, typeof DateRangePickerComponent, typeof i14.NgbTooltipModule, typeof i15.TooltipModule, typeof i14.NgbNavModule, typeof i14.NgbModalModule, typeof i43.TableModule, typeof i44.TabsModule, typeof i13.ButtonModule, typeof i46.SelectModule, typeof i47.MultiSelectModule, typeof i16.ProgressSpinnerModule, typeof i17.AutoCompleteModule, typeof i50.ImageCropperComponent, typeof i51.UiSwitchModule, typeof i52.NgxDaterangepickerMd, typeof PermissionTreeComponent, typeof PrivacyAndTosComponent, typeof SplashComponent, typeof AuthenticatorComponent, typeof ClearBitIconComponent, typeof ComingSoonComponent, typeof CollapsibleSidebarComponent, typeof CollapsibleSidebarTriggerDirective, typeof PwBrainChatComponent, typeof EntityGroupComponent, typeof GroupsComponent, typeof GroupDefinitionComponent, typeof NumberPickerComponent, typeof OnlineIndicatorComponent, typeof HeaderComponent, typeof LandingPageFooterBComponent, typeof PwDynamicPageComponent, typeof i19.FieldErrorDisplayModule, typeof ResourceSharedComponentsModule]>;
2593
- static ɵinj: i0.ɵɵInjectorDeclaration<SharedComponentsModule>;
2499
+ confirmDelete(overrides?: ConfirmDeleteOptions): Promise<boolean>;
2500
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmDialogService, never>;
2501
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
2594
2502
  }
2595
2503
  export interface LegalPageRouteOptions {
2596
2504
  /** Overrides the per-tab page title, e.g. for a product's SEO title. */
@@ -2631,7 +2539,6 @@ export declare class CollapsibleSidebarSuperAdminGuard {
2631
2539
  * UX-only; backend must still enforce permissions.
2632
2540
  */
2633
2541
  readonly canAccessSidebar$: import("rxjs").Observable<boolean>;
2634
- constructor(userService: UserService, permissionService: PermissionService);
2635
2542
  /**
2636
2543
  * Same rule as {@link PermissionService#isSuperAdmin}, safe when user is not loaded.
2637
2544
  */
@@ -2640,9 +2547,30 @@ export declare class CollapsibleSidebarSuperAdminGuard {
2640
2547
  static ɵfac: i0.ɵɵFactoryDeclaration<CollapsibleSidebarSuperAdminGuard, never>;
2641
2548
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
2642
2549
  }
2550
+ /**
2551
+ * Identity of the Conversational UI Builder dynamic page the user is
2552
+ * currently viewing (#933 — page-aware Brain). The dynamic-page host sets
2553
+ * this on load and clears it on destroy; the PosiWise Brain chat widget
2554
+ * reads it so Bedrock knows which page "this page" / "the current page"
2555
+ * refers to and can target `ui_update_layout` with the exact page_key +
2556
+ * subscription_id instead of guessing the landing-page tools.
2557
+ *
2558
+ * `null` whenever no dynamic page is mounted.
2559
+ */
2560
+ export interface DynamicPageContext {
2561
+ pageKey: string;
2562
+ subscriptionId: number;
2563
+ }
2564
+ export declare class DynamicPageContextService {
2565
+ private _current;
2566
+ set(ctx: DynamicPageContext): void;
2567
+ clear(): void;
2568
+ get current(): DynamicPageContext | null;
2569
+ static ɵfac: i0.ɵɵFactoryDeclaration<DynamicPageContextService, never>;
2570
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
2571
+ }
2643
2572
  export declare class UiLayoutService {
2644
2573
  private readonly api;
2645
- constructor(api: MainApiHttpService);
2646
2574
  getLayout(subscriptionId: number, pageKey: string): Observable<UiLayoutResponse>;
2647
2575
  static ɵfac: i0.ɵɵFactoryDeclaration<UiLayoutService, never>;
2648
2576
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
@@ -2666,6 +2594,23 @@ export declare function registeredTypeNames(): string[];
2666
2594
  * hidden rather than advertised-then-broken.
2667
2595
  */
2668
2596
  export declare const BRAIN_CHAT_UPLOAD_APIS: InjectionToken<Record<string, BaseHttpService>>;
2597
+ /** A suggested prompt a product adds to the Brain chat welcome, optionally behind a permission. */
2598
+ export interface BrainChatProductPrompt extends BrainChatPrompt {
2599
+ /** Permission expression (PermissionService.evaluatePermissions); omitted = shown to everyone. */
2600
+ permission?: string;
2601
+ /** Short chip label above the composer (like "Usage"); omitted = shown on the welcome only. */
2602
+ label?: string;
2603
+ }
2604
+ /**
2605
+ * Product-specific suggested prompts, shown before the shared ones (cloudolive-api#441).
2606
+ *
2607
+ * The shared list is the same for every product, so a prompt only one product can answer — "Check my
2608
+ * setup" needs that product's `onboarding_status` tool — would show elsewhere and get a dead-end reply.
2609
+ * The product app provides it here instead, like HOME_PRODUCT_SECTIONS on /home.
2610
+ */
2611
+ export declare const BRAIN_CHAT_PRODUCT_PROMPTS: InjectionToken<BrainChatProductPrompt[]>;
2612
+ /** The product prompts the viewer may see; `canSee` evaluates a permission expression. */
2613
+ export declare function visibleProductPrompts(prompts: readonly BrainChatProductPrompt[] | null | undefined, canSee: (permission: string) => boolean): BrainChatProductPrompt[];
2669
2614
  export type PwNoticeTone = 'warning' | 'error' | 'info';
2670
2615
  /**
2671
2616
  * The notice banner a page shows above its content: a failed sync, a pinned note, a failed run.
@@ -2712,4 +2657,36 @@ export declare class PwEditCardComponent {
2712
2657
  };
2713
2658
  }, {}, never, ["*"], true, never>;
2714
2659
  }
2660
+ export interface NotificationNote {
2661
+ id: number;
2662
+ content: string;
2663
+ created_at?: string;
2664
+ link?: string | null;
2665
+ originator_name?: string | null;
2666
+ unread?: boolean | null;
2667
+ }
2668
+ export declare function isInAppLink(link: string | null | undefined): link is string;
2669
+ export declare class NotificationDetailComponent {
2670
+ readonly modal: NgbActiveModal;
2671
+ private readonly router;
2672
+ note: NotificationNote;
2673
+ get hasLink(): boolean;
2674
+ openLink(): void;
2675
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotificationDetailComponent, never>;
2676
+ static ɵcmp: i0.ɵɵComponentDeclaration<NotificationDetailComponent, "pw-notification-detail", never, {
2677
+ "note": {
2678
+ "alias": "note";
2679
+ "required": false;
2680
+ };
2681
+ }, {}, never, never, true, never>;
2682
+ }
2683
+ /** Opens a note in a window (with a button to its link, when it has one) and marks it read. */
2684
+ export declare class NotificationOpenerService {
2685
+ private readonly modal;
2686
+ private readonly notificationService;
2687
+ open(note: NotificationNote): void;
2688
+ private markRead;
2689
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotificationOpenerService, never>;
2690
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
2691
+ }
2715
2692
  export type { ChatMessage, ChatMessageRole, NavEntry, PendingConfirmation };