@posiwise/shared-components 0.0.217 → 0.0.218

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.217",
3
+ "version": "0.0.218",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^22.2.0",
6
6
  "@angular/core": "^22.2.0",
@@ -1264,6 +1264,19 @@ declare class PwBrainChatConfirmComponent {
1264
1264
  "cancelEvent": "cancelEvent";
1265
1265
  }, never, never, false, never>;
1266
1266
  }
1267
+ /** A suggested prompt a product adds to the Brain chat welcome, optionally behind a permission. */
1268
+ export interface BrainChatProductPrompt extends BrainChatPrompt {
1269
+ /** Permission expression (PermissionService.evaluatePermissions); omitted = shown to everyone. */
1270
+ permission?: string;
1271
+ }
1272
+ /**
1273
+ * Product-specific suggested prompts, shown before the shared ones (cloudolive-api#441).
1274
+ *
1275
+ * The shared list is the same for every product, so a prompt only one product can answer — "Check my
1276
+ * setup" needs that product's `onboarding_status` tool — would show elsewhere and get a dead-end reply.
1277
+ * The product app provides it here instead, like HOME_PRODUCT_SECTIONS on /home.
1278
+ */
1279
+ export declare const BRAIN_CHAT_PRODUCT_PROMPTS: InjectionToken<BrainChatProductPrompt[]>;
1267
1280
  declare namespace pw_brain_chat_welcome_component_d_exports {
1268
1281
  export { PwBrainChatWelcomeComponent };
1269
1282
  }
@@ -1274,11 +1287,18 @@ declare namespace pw_brain_chat_welcome_component_d_exports {
1274
1287
  * owns send().
1275
1288
  */
1276
1289
  declare class PwBrainChatWelcomeComponent {
1290
+ private readonly permission;
1291
+ private readonly productPrompts?;
1277
1292
  /** Signed-in user's first name; when set the greeting reads "Hi {name},". */
1278
1293
  userFirstName?: string;
1279
1294
  prompts: readonly BrainChatPrompt[];
1280
1295
  pick: EventEmitter<string>;
1281
- static ɵfac: i0.ɵɵFactoryDeclaration<PwBrainChatWelcomeComponent, never>;
1296
+ constructor(permission: PermissionService, productPrompts?: BrainChatProductPrompt[] | null);
1297
+ /** The product's own prompts the viewer may see, then the shared ones. */
1298
+ get visiblePrompts(): readonly BrainChatPrompt[];
1299
+ static ɵfac: i0.ɵɵFactoryDeclaration<PwBrainChatWelcomeComponent, [null, {
1300
+ optional: true;
1301
+ }]>;
1282
1302
  static ɵcmp: i0.ɵɵComponentDeclaration<PwBrainChatWelcomeComponent, "pw-brain-chat-welcome", never, {
1283
1303
  "userFirstName": {
1284
1304
  "alias": "userFirstName";
@@ -2258,7 +2278,7 @@ declare namespace onboarding_checklist_component_d_exports {
2258
2278
  * Renders nothing for `not_applicable` / `unavailable` — "no onboarding" and "can't tell right now"
2259
2279
  * both hide the card rather than show an empty or broken one.
2260
2280
  */
2261
- export declare class OnboardingChecklistComponent {
2281
+ export declare class OnboardingChecklistComponent implements OnChanges {
2262
2282
  status: OnboardingStatus | null;
2263
2283
  loading: boolean;
2264
2284
  loadFailed: boolean;
@@ -2268,7 +2288,19 @@ export declare class OnboardingChecklistComponent {
2268
2288
  readonly retry: EventEmitter<void>;
2269
2289
  readonly doneIcon: IconDefinition;
2270
2290
  readonly helpIcon: IconDefinition;
2291
+ readonly expandIcon: IconDefinition;
2292
+ readonly collapseIcon: IconDefinition;
2293
+ /** Whether the steps below the progress line are shown. Remembered per subscription in this browser. */
2294
+ expanded: boolean;
2295
+ ngOnChanges(changes: SimpleChanges): void;
2296
+ 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;
2271
2301
  get visible(): boolean;
2302
+ /** One segment per mandatory step, so the bar reads as "steps done", not an abstract percentage. */
2303
+ get progressSegments(): number[];
2272
2304
  get progressPercent(): number;
2273
2305
  /**
2274
2306
  * Every required step is done. Deliberately NOT `status.activated`: activation is the product's
@@ -2276,6 +2308,17 @@ export declare class OnboardingChecklistComponent {
2276
2308
  * open, which made "You're all set" sit above "5 of 8 steps done".
2277
2309
  */
2278
2310
  get allDone(): boolean;
2311
+ /**
2312
+ * Mandatory steps (they count towards progress) and recommended ones (`kind: 'optional'`), listed
2313
+ * under their own headings instead of a label repeated on every row.
2314
+ */
2315
+ get groups(): {
2316
+ key: string;
2317
+ labelKey: string;
2318
+ steps: OnboardingStep[];
2319
+ }[];
2320
+ /** The group heading already says "Recommended", so an open optional step reads "To do". */
2321
+ stateLabelKey(step: OnboardingStep): string;
2279
2322
  get currentStep(): OnboardingStep | null;
2280
2323
  icon(step: OnboardingStep): IconDefinition;
2281
2324
  routeFor(step: OnboardingStep): string | null;