@posiwise/shared-components 0.0.216 → 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.216",
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";
@@ -2220,7 +2240,8 @@ export interface OnboardingStep {
2220
2240
  title_key: string;
2221
2241
  description_key?: string | null;
2222
2242
  route?: string | null;
2223
- help_url?: string | null;
2243
+ /** Slug of the FAQ that explains the step; null when the product API found no FAQ the viewer can open. */
2244
+ faq_slug?: string | null;
2224
2245
  activation: boolean;
2225
2246
  admin_only: boolean;
2226
2247
  depends_on: string[];
@@ -2257,7 +2278,7 @@ declare namespace onboarding_checklist_component_d_exports {
2257
2278
  * Renders nothing for `not_applicable` / `unavailable` — "no onboarding" and "can't tell right now"
2258
2279
  * both hide the card rather than show an empty or broken one.
2259
2280
  */
2260
- export declare class OnboardingChecklistComponent {
2281
+ export declare class OnboardingChecklistComponent implements OnChanges {
2261
2282
  status: OnboardingStatus | null;
2262
2283
  loading: boolean;
2263
2284
  loadFailed: boolean;
@@ -2266,11 +2287,46 @@ export declare class OnboardingChecklistComponent {
2266
2287
  subscriptionId: number | null;
2267
2288
  readonly retry: EventEmitter<void>;
2268
2289
  readonly doneIcon: IconDefinition;
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;
2269
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[];
2270
2304
  get progressPercent(): number;
2305
+ /**
2306
+ * Every required step is done. Deliberately NOT `status.activated`: activation is the product's
2307
+ * milestone (e.g. a first finalised reconciliation) and can be reached with required steps still
2308
+ * open, which made "You're all set" sit above "5 of 8 steps done".
2309
+ */
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;
2271
2322
  get currentStep(): OnboardingStep | null;
2272
2323
  icon(step: OnboardingStep): IconDefinition;
2273
2324
  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
+ */
2329
+ faqHref(step: OnboardingStep): string | null;
2274
2330
  /** The current step's call to action; null when there is nothing for this viewer to click. */
2275
2331
  actionKey(step: OnboardingStep): string | null;
2276
2332
  trackByKey(_index: number, step: OnboardingStep): string;