@posiwise/shared-components 0.0.218 → 0.0.220

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posiwise/shared-components",
3
- "version": "0.0.218",
3
+ "version": "0.0.220",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^22.2.0",
6
6
  "@angular/core": "^22.2.0",
@@ -1,7 +1,7 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import { AfterContentInit, AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, InjectionToken, Injector, OnChanges, OnDestroy, OnInit, PipeTransform, SimpleChanges, TemplateRef, Type, ViewContainerRef } from "@angular/core";
3
3
  import { AuthService, BaseHttpService, BrainSocketService, BrainVoiceService, CustomToastService, DashboardService, DataService, DirectUploadService, FeatureFlagService, GroupService, KnowledgeFile, KnowledgeFilesService, KnowledgeScope, LocalStorage, MCPFieldDiff, MCPOrchestratorService, MCPUploadCapability, MainApiHttpService, NavEntry, NavigationIndexService, NumberPickerService, PermissionService, RecentPagesService, SubscriptionService, UserService, VoiceChatService } from "@posiwise/common-services";
4
- import * as i43 from "primeng/table";
4
+ import * as i44 from "primeng/table";
5
5
  import { Table } from "primeng/table";
6
6
  import { TranslocoService } from "@jsverse/transloco";
7
7
  import * as i14 from "@ng-bootstrap/ng-bootstrap";
@@ -13,7 +13,7 @@ import { Observable, Subject } from "rxjs";
13
13
  import { AppBaseComponent } from "@posiwise/app-base-component";
14
14
  import { MenuItem } from "primeng/api";
15
15
  import moment from "moment";
16
- import * as i52 from "ngx-daterangepicker-material";
16
+ import * as i53 from "ngx-daterangepicker-material";
17
17
  import { DaterangepickerDirective } from "ngx-daterangepicker-material";
18
18
  import { DomSanitizer, SafeHtml } from "@angular/platform-browser";
19
19
  import { AdminService } from "@posiwise/admin-module-utils";
@@ -22,22 +22,22 @@ import { AppState } from "@posiwise/app-store";
22
22
  import { Store } from "@ngrx/store";
23
23
  import * as i7 from "@angular/forms";
24
24
  import { AbstractControl, ControlContainer, UntypedFormBuilder, UntypedFormGroup } from "@angular/forms";
25
- import * as i34 from "primeng/iconfield";
26
- import * as i35 from "primeng/inputicon";
27
- import * as i36 from "primeng/inputtext";
25
+ import * as i35 from "primeng/iconfield";
26
+ import * as i36 from "primeng/inputicon";
27
+ import * as i37 from "primeng/inputtext";
28
28
  import * as i10 from "@posiwise/app-loader";
29
29
  import * as i12 from "@posiwise/directives";
30
30
  import * as i11 from "@posiwise/core-transloco";
31
31
  import * as i15 from "primeng/tooltip";
32
- import * as i44 from "primeng/tabs";
32
+ import * as i45 from "primeng/tabs";
33
33
  import * as i13 from "primeng/button";
34
- import * as i46 from "primeng/select";
35
- import * as i47 from "primeng/multiselect";
34
+ import * as i47 from "primeng/select";
35
+ import * as i48 from "primeng/multiselect";
36
36
  import * as i16 from "primeng/progressspinner";
37
37
  import * as i17 from "primeng/autocomplete";
38
- import * as i50 from "ngx-image-cropper";
39
- import * as i51 from "ngx-ui-switch";
40
- import * as i53 from "@posiwise/pipes";
38
+ import * as i51 from "ngx-image-cropper";
39
+ import * as i52 from "ngx-ui-switch";
40
+ import * as i54 from "@posiwise/pipes";
41
41
  import * as i6 from "@angular/common";
42
42
  import * as i19 from "@posiwise/utils";
43
43
  import { IconDefinition } from "@fortawesome/free-solid-svg-icons";
@@ -1175,7 +1175,6 @@ export declare class PwBrainChatComponent implements OnInit, OnDestroy {
1175
1175
  brandName: string;
1176
1176
  userFirstName?: string;
1177
1177
  readonly suggestedPrompts: readonly BrainChatPrompt[];
1178
- readonly quickActions: readonly BrainChatQuickAction[];
1179
1178
  private conversationId;
1180
1179
  private storage;
1181
1180
  private streamSub?;
@@ -1268,6 +1267,8 @@ declare class PwBrainChatConfirmComponent {
1268
1267
  export interface BrainChatProductPrompt extends BrainChatPrompt {
1269
1268
  /** Permission expression (PermissionService.evaluatePermissions); omitted = shown to everyone. */
1270
1269
  permission?: string;
1270
+ /** Short chip label above the composer (like "Usage"); omitted = shown on the welcome only. */
1271
+ label?: string;
1271
1272
  }
1272
1273
  /**
1273
1274
  * Product-specific suggested prompts, shown before the shared ones (cloudolive-api#441).
@@ -1277,6 +1278,26 @@ export interface BrainChatProductPrompt extends BrainChatPrompt {
1277
1278
  * The product app provides it here instead, like HOME_PRODUCT_SECTIONS on /home.
1278
1279
  */
1279
1280
  export declare const BRAIN_CHAT_PRODUCT_PROMPTS: InjectionToken<BrainChatProductPrompt[]>;
1281
+ /** The product prompts the viewer may see; `canSee` evaluates a permission expression. */
1282
+ export declare function visibleProductPrompts(prompts: readonly BrainChatProductPrompt[] | null | undefined, canSee: (permission: string) => boolean): BrainChatProductPrompt[];
1283
+ declare namespace pw_brain_chat_quick_component_d_exports {
1284
+ export { PwBrainChatQuickComponent };
1285
+ }
1286
+ /**
1287
+ * Quick-action chips above the composer: the product's own chips (e.g. "Setup", cloudolive-api#441)
1288
+ * the viewer may see, then the shared Usage / Tools / Status. Emits the prompt text; the parent sends it.
1289
+ */
1290
+ declare class PwBrainChatQuickComponent {
1291
+ pick: EventEmitter<string>;
1292
+ readonly actions: readonly BrainChatQuickAction[];
1293
+ constructor(permission: PermissionService, productPrompts?: BrainChatProductPrompt[] | null);
1294
+ static ɵfac: i0.ɵɵFactoryDeclaration<PwBrainChatQuickComponent, [null, {
1295
+ optional: true;
1296
+ }]>;
1297
+ static ɵcmp: i0.ɵɵComponentDeclaration<PwBrainChatQuickComponent, "pw-brain-chat-quick", never, {}, {
1298
+ "pick": "pick";
1299
+ }, never, never, false, never>;
1300
+ }
1280
1301
  declare namespace pw_brain_chat_welcome_component_d_exports {
1281
1302
  export { PwBrainChatWelcomeComponent };
1282
1303
  }
@@ -2229,15 +2250,23 @@ export declare class RecordsSummaryComponent {
2229
2250
  }
2230
2251
  /**
2231
2252
  * The onboarding status every product API returns from its `onboarding_status` tool and
2232
- * `GET onboarding/:subscription_id/status` endpoint (cloudolive-api#441). Product-agnostic:
2233
- * step titles, descriptions and blocked reasons arrive as Transloco keys owned by the product.
2253
+ * `GET onboarding/:subscription_id/status` endpoint (cloudolive-api#441). Product-agnostic: step titles and
2254
+ * descriptions are the text the product's master subscription admin wrote; blocked reasons and states arrive
2255
+ * as Transloco keys owned by the product.
2234
2256
  */
2235
2257
  export type OnboardingStepState = 'done' | 'next' | 'ready' | 'blocked' | 'waiting' | 'todo' | 'optional' | 'unknown';
2236
2258
  export interface OnboardingStep {
2237
2259
  key: string;
2238
2260
  position: number;
2239
2261
  kind: 'required' | 'optional' | 'system';
2240
- title_key: string;
2262
+ /** The step's title as the admin wrote it. */
2263
+ title?: string;
2264
+ description?: string | null;
2265
+ /** The product's check that decides the step; null = manual, the customer ticks it. */
2266
+ check_key?: string | null;
2267
+ /** @deprecated Transloco key from before steps became editable; use `title`. */
2268
+ title_key?: string;
2269
+ /** @deprecated Use `description`. */
2241
2270
  description_key?: string | null;
2242
2271
  route?: string | null;
2243
2272
  /** Slug of the FAQ that explains the step; null when the product API found no FAQ the viewer can open. */
@@ -2285,23 +2314,34 @@ export declare class OnboardingChecklistComponent implements OnChanges {
2285
2314
  /** Values for the `{slug}` / `{subscription_id}` placeholders in step routes. */
2286
2315
  slug: string;
2287
2316
  subscriptionId: number | null;
2317
+ /** The host is saving a manual tick: the tick controls are disabled meanwhile. */
2318
+ busy: boolean;
2288
2319
  readonly retry: EventEmitter<void>;
2320
+ /** A manual step was ticked (completed: true) or unticked; the host saves it and passes the new status. */
2321
+ readonly markDone: EventEmitter<{
2322
+ key: string;
2323
+ completed: boolean;
2324
+ }>;
2289
2325
  readonly doneIcon: IconDefinition;
2290
2326
  readonly helpIcon: IconDefinition;
2291
2327
  readonly expandIcon: IconDefinition;
2292
2328
  readonly collapseIcon: IconDefinition;
2293
- /** Whether the steps below the progress line are shown. Remembered per subscription in this browser. */
2329
+ /**
2330
+ * Whether the steps below the progress line are shown. Collapsed by default, so the card stays a
2331
+ * one-line progress summary on /home until someone opens it; their choice is remembered per
2332
+ * subscription in this browser.
2333
+ */
2294
2334
  expanded: boolean;
2295
2335
  ngOnChanges(changes: SimpleChanges): void;
2296
2336
  toggle(): void;
2297
- private static storageKey;
2298
- /** Storage can be unavailable (private mode, quota): the checklist then just starts expanded. */
2299
- private static readCollapsed;
2300
- private static writeCollapsed;
2301
2337
  get visible(): boolean;
2338
+ /** Recommended steps, done and total, shown next to the mandatory progress ("+ 1 of 3 recommended"). */
2339
+ get recommended(): {
2340
+ done: number;
2341
+ total: number;
2342
+ };
2302
2343
  /** One segment per mandatory step, so the bar reads as "steps done", not an abstract percentage. */
2303
2344
  get progressSegments(): number[];
2304
- get progressPercent(): number;
2305
2345
  /**
2306
2346
  * Every required step is done. Deliberately NOT `status.activated`: activation is the product's
2307
2347
  * milestone (e.g. a first finalised reconciliation) and can be reached with required steps still
@@ -2322,14 +2362,16 @@ export declare class OnboardingChecklistComponent implements OnChanges {
2322
2362
  get currentStep(): OnboardingStep | null;
2323
2363
  icon(step: OnboardingStep): IconDefinition;
2324
2364
  routeFor(step: OnboardingStep): string | null;
2325
- /**
2326
- * /{subscription slug}/faq/{faq slug} — the app's FAQ route (`:slug/faq/:id`), the same link the
2327
- * products' own help links use. Null when the step has no FAQ to open.
2328
- */
2365
+ /** /{subscription slug}/faq/{faq slug} (the app's `:slug/faq/:id` route); null when there is no FAQ. */
2329
2366
  faqHref(step: OnboardingStep): string | null;
2330
- /** The current step's call to action; null when there is nothing for this viewer to click. */
2367
+ /** A step's call to action; null when there is nothing for this viewer to click. */
2331
2368
  actionKey(step: OnboardingStep): string | null;
2332
- trackByKey(_index: number, step: OnboardingStep): string;
2369
+ /**
2370
+ * A manual step the viewer can tick: no check decides it (check_key null), its state is known, and the
2371
+ * viewer may act on it (an admin-only step needs an admin).
2372
+ */
2373
+ canTick(step: OnboardingStep): boolean;
2374
+ tick(step: OnboardingStep): void;
2333
2375
  static ɵfac: i0.ɵɵFactoryDeclaration<OnboardingChecklistComponent, never>;
2334
2376
  static ɵcmp: i0.ɵɵComponentDeclaration<OnboardingChecklistComponent, "pw-onboarding-checklist", never, {
2335
2377
  "status": {
@@ -2352,8 +2394,13 @@ export declare class OnboardingChecklistComponent implements OnChanges {
2352
2394
  "alias": "subscriptionId";
2353
2395
  "required": false;
2354
2396
  };
2397
+ "busy": {
2398
+ "alias": "busy";
2399
+ "required": false;
2400
+ };
2355
2401
  }, {
2356
2402
  "retry": "retry";
2403
+ "markDone": "markDone";
2357
2404
  }, never, never, false, never>;
2358
2405
  }
2359
2406
  declare namespace resource_shared_components_module_d_exports {
@@ -2542,7 +2589,7 @@ declare class PwBrainChatThreadDirective {
2542
2589
  }
2543
2590
  export declare class SharedComponentsModule {
2544
2591
  static ɵfac: i0.ɵɵFactoryDeclaration<SharedComponentsModule, never>;
2545
- static ɵmod: i0.ɵɵNgModuleDeclaration<SharedComponentsModule, [typeof AiKnowledgeComponent, typeof CommandPaletteComponent, typeof ConfirmDialogComponent, typeof PasswordValidationComponent, typeof PwTabsComponent, typeof DateRangePickerComponent, typeof PermissionTreeComponent, typeof PrivacyAndTosComponent, typeof PrivacyPolicyComponent, typeof TermsConditionsComponent, typeof SplashComponent, typeof AuthenticatorComponent, typeof ClearBitIconComponent, typeof ComingSoonComponent, typeof CollapsibleSidebarComponent, typeof PwBrainChatComponent, typeof PwBrainChatConfirmComponent, 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 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 PrivacyPolicyComponent, typeof TermsConditionsComponent, 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]>;
2592
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SharedComponentsModule, [typeof AiKnowledgeComponent, typeof CommandPaletteComponent, typeof ConfirmDialogComponent, typeof PasswordValidationComponent, typeof PwTabsComponent, typeof DateRangePickerComponent, typeof PermissionTreeComponent, typeof PrivacyAndTosComponent, typeof PrivacyPolicyComponent, typeof TermsConditionsComponent, 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 i7.FormsModule, typeof i35.IconFieldModule, typeof i36.InputIconModule, typeof i37.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 i44.TableModule, typeof i45.TabsModule, typeof i13.ButtonModule, typeof i47.SelectModule, typeof i48.MultiSelectModule, typeof i16.ProgressSpinnerModule, typeof i17.AutoCompleteModule, typeof i51.ImageCropperComponent, typeof i52.UiSwitchModule, typeof i53.NgxDaterangepickerMd, typeof i54.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 i44.TableModule, typeof i45.TabsModule, typeof i13.ButtonModule, typeof i47.SelectModule, typeof i48.MultiSelectModule, typeof i16.ProgressSpinnerModule, typeof i17.AutoCompleteModule, typeof i51.ImageCropperComponent, typeof i52.UiSwitchModule, typeof i53.NgxDaterangepickerMd, typeof PermissionTreeComponent, typeof PrivacyAndTosComponent, typeof PrivacyPolicyComponent, typeof TermsConditionsComponent, 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]>;
2546
2593
  static ɵinj: i0.ɵɵInjectorDeclaration<SharedComponentsModule>;
2547
2594
  }
2548
2595
  /**