@posiwise/shared-components 0.0.215 → 0.0.217

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,12 +1,14 @@
1
1
  {
2
2
  "name": "@posiwise/shared-components",
3
- "version": "0.0.215",
3
+ "version": "0.0.217",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^22.2.0",
6
6
  "@angular/core": "^22.2.0",
7
7
  "@jsverse/transloco": "^8.4.0",
8
8
  "@jsverse/transloco-keys-manager": "^6.2.2",
9
- "ngx-image-cropper": ">=7.1.2 <10"
9
+ "ngx-image-cropper": ">=7.1.2 <10",
10
+ "@fortawesome/angular-fontawesome": "^5.1.0",
11
+ "@fortawesome/free-solid-svg-icons": "^6.5.2"
10
12
  },
11
13
  "dependencies": {
12
14
  "tslib": "^2.6.2"
@@ -4,9 +4,9 @@ import { AuthService, BaseHttpService, BrainSocketService, BrainVoiceService, Cu
4
4
  import * as i43 from "primeng/table";
5
5
  import { Table } from "primeng/table";
6
6
  import { TranslocoService } from "@jsverse/transloco";
7
- import * as i11 from "@ng-bootstrap/ng-bootstrap";
7
+ import * as i14 from "@ng-bootstrap/ng-bootstrap";
8
8
  import { NgbActiveModal, NgbModal } from "@ng-bootstrap/ng-bootstrap";
9
- import * as i40 from "@angular/router";
9
+ import * as i8 from "@angular/router";
10
10
  import { Router } from "@angular/router";
11
11
  import { AppConfigService } from "@posiwise/app-config-service";
12
12
  import { Observable, Subject } from "rxjs";
@@ -20,27 +20,29 @@ import { AdminService } from "@posiwise/admin-module-utils";
20
20
  import { Subscription, User } from "@posiwise/common-utilities";
21
21
  import { AppState } from "@posiwise/app-store";
22
22
  import { Store } from "@ngrx/store";
23
- import * as i6 from "@angular/forms";
23
+ import * as i7 from "@angular/forms";
24
24
  import { AbstractControl, ControlContainer, UntypedFormBuilder, UntypedFormGroup } from "@angular/forms";
25
25
  import * as i34 from "primeng/iconfield";
26
26
  import * as i35 from "primeng/inputicon";
27
27
  import * as i36 from "primeng/inputtext";
28
- import * as i7 from "@posiwise/app-loader";
29
- import * as i9 from "@posiwise/directives";
30
- import * as i8 from "@posiwise/core-transloco";
31
- import * as i12 from "primeng/tooltip";
28
+ import * as i10 from "@posiwise/app-loader";
29
+ import * as i12 from "@posiwise/directives";
30
+ import * as i11 from "@posiwise/core-transloco";
31
+ import * as i15 from "primeng/tooltip";
32
32
  import * as i44 from "primeng/tabs";
33
- import * as i10 from "primeng/button";
33
+ import * as i13 from "primeng/button";
34
34
  import * as i46 from "primeng/select";
35
35
  import * as i47 from "primeng/multiselect";
36
- import * as i13 from "primeng/progressspinner";
37
- import * as i14 from "primeng/autocomplete";
36
+ import * as i16 from "primeng/progressspinner";
37
+ import * as i17 from "primeng/autocomplete";
38
38
  import * as i50 from "ngx-image-cropper";
39
39
  import * as i51 from "ngx-ui-switch";
40
40
  import * as i53 from "@posiwise/pipes";
41
- import * as i5 from "@angular/common";
42
- import * as i16 from "@posiwise/utils";
43
- import * as i15 from "@angular/cdk/drag-drop";
41
+ import * as i6 from "@angular/common";
42
+ import * as i19 from "@posiwise/utils";
43
+ import { IconDefinition } from "@fortawesome/free-solid-svg-icons";
44
+ import * as i9 from "@fortawesome/angular-fontawesome";
45
+ import * as i18 from "@angular/cdk/drag-drop";
44
46
  export type ConfirmDialogTone = 'destructive' | 'neutral' | 'info';
45
47
  export interface ConfirmDialogConfig {
46
48
  titleKey?: string;
@@ -2205,12 +2207,118 @@ export declare class RecordsSummaryComponent {
2205
2207
  };
2206
2208
  }, {}, never, never, false, never>;
2207
2209
  }
2210
+ /**
2211
+ * The onboarding status every product API returns from its `onboarding_status` tool and
2212
+ * `GET onboarding/:subscription_id/status` endpoint (cloudolive-api#441). Product-agnostic:
2213
+ * step titles, descriptions and blocked reasons arrive as Transloco keys owned by the product.
2214
+ */
2215
+ export type OnboardingStepState = 'done' | 'next' | 'ready' | 'blocked' | 'waiting' | 'todo' | 'optional' | 'unknown';
2216
+ export interface OnboardingStep {
2217
+ key: string;
2218
+ position: number;
2219
+ kind: 'required' | 'optional' | 'system';
2220
+ title_key: string;
2221
+ description_key?: string | null;
2222
+ route?: string | null;
2223
+ /** Slug of the FAQ that explains the step; null when the product API found no FAQ the viewer can open. */
2224
+ faq_slug?: string | null;
2225
+ activation: boolean;
2226
+ admin_only: boolean;
2227
+ depends_on: string[];
2228
+ state: OnboardingStepState;
2229
+ /** True for the one step the customer should act on now. */
2230
+ current: boolean;
2231
+ reason_key?: string;
2232
+ /** The customer's own system's message (e.g. their PSA's error), already truncated. */
2233
+ detail?: string;
2234
+ meta?: Record<string, unknown>;
2235
+ /** False when the step needs an admin and the viewer is not one; null when unknown. */
2236
+ can_act: boolean | null;
2237
+ }
2238
+ export interface OnboardingStatus {
2239
+ subscription_id: number;
2240
+ feature_key: string | null;
2241
+ status: 'ok' | 'not_applicable' | 'unavailable';
2242
+ activated: boolean;
2243
+ next_step: string | null;
2244
+ progress: {
2245
+ done: number;
2246
+ total: number;
2247
+ };
2248
+ steps: OnboardingStep[];
2249
+ }
2250
+ declare namespace onboarding_checklist_component_d_exports {
2251
+ export { OnboardingChecklistComponent };
2252
+ }
2253
+ /**
2254
+ * Presentational onboarding checklist (cloudolive-api#441). Product-agnostic: the host fetches the
2255
+ * status from its own product API and passes it in, plus the route placeholders' values.
2256
+ *
2257
+ * Gating (AI54) is the host's: pass `loading` until the request resolves and `loadFailed` on error.
2258
+ * Renders nothing for `not_applicable` / `unavailable` — "no onboarding" and "can't tell right now"
2259
+ * both hide the card rather than show an empty or broken one.
2260
+ */
2261
+ export declare class OnboardingChecklistComponent {
2262
+ status: OnboardingStatus | null;
2263
+ loading: boolean;
2264
+ loadFailed: boolean;
2265
+ /** Values for the `{slug}` / `{subscription_id}` placeholders in step routes. */
2266
+ slug: string;
2267
+ subscriptionId: number | null;
2268
+ readonly retry: EventEmitter<void>;
2269
+ readonly doneIcon: IconDefinition;
2270
+ readonly helpIcon: IconDefinition;
2271
+ get visible(): boolean;
2272
+ get progressPercent(): number;
2273
+ /**
2274
+ * Every required step is done. Deliberately NOT `status.activated`: activation is the product's
2275
+ * milestone (e.g. a first finalised reconciliation) and can be reached with required steps still
2276
+ * open, which made "You're all set" sit above "5 of 8 steps done".
2277
+ */
2278
+ get allDone(): boolean;
2279
+ get currentStep(): OnboardingStep | null;
2280
+ icon(step: OnboardingStep): IconDefinition;
2281
+ routeFor(step: OnboardingStep): string | null;
2282
+ /**
2283
+ * /{subscription slug}/faq/{faq slug} — the app's FAQ route (`:slug/faq/:id`), the same link the
2284
+ * products' own help links use. Null when the step has no FAQ to open.
2285
+ */
2286
+ faqHref(step: OnboardingStep): string | null;
2287
+ /** The current step's call to action; null when there is nothing for this viewer to click. */
2288
+ actionKey(step: OnboardingStep): string | null;
2289
+ trackByKey(_index: number, step: OnboardingStep): string;
2290
+ static ɵfac: i0.ɵɵFactoryDeclaration<OnboardingChecklistComponent, never>;
2291
+ static ɵcmp: i0.ɵɵComponentDeclaration<OnboardingChecklistComponent, "pw-onboarding-checklist", never, {
2292
+ "status": {
2293
+ "alias": "status";
2294
+ "required": false;
2295
+ };
2296
+ "loading": {
2297
+ "alias": "loading";
2298
+ "required": false;
2299
+ };
2300
+ "loadFailed": {
2301
+ "alias": "loadFailed";
2302
+ "required": false;
2303
+ };
2304
+ "slug": {
2305
+ "alias": "slug";
2306
+ "required": false;
2307
+ };
2308
+ "subscriptionId": {
2309
+ "alias": "subscriptionId";
2310
+ "required": false;
2311
+ };
2312
+ }, {
2313
+ "retry": "retry";
2314
+ }, never, never, false, never>;
2315
+ }
2208
2316
  declare namespace resource_shared_components_module_d_exports {
2209
2317
  export { ResourceSharedComponentsModule };
2210
2318
  }
2211
2319
  export declare class ResourceSharedComponentsModule {
2212
2320
  static ɵfac: i0.ɵɵFactoryDeclaration<ResourceSharedComponentsModule, never>;
2213
- static ɵmod: i0.ɵɵNgModuleDeclaration<ResourceSharedComponentsModule, [typeof NoDataComponent, typeof InputContainerComponent, typeof CompletionBarComponent, typeof RecordsSummaryComponent], [typeof i5.CommonModule, typeof i6.FormsModule, typeof i6.ReactiveFormsModule, typeof i7.AppLoaderModule, typeof i8.CoreTranslocoModule, typeof i9.DirectivesModule, typeof i10.ButtonModule, typeof i11.NgbTooltipModule, typeof i12.TooltipModule, typeof i13.ProgressSpinnerModule, typeof i14.AutoCompleteModule, typeof i15.DragDropModule, typeof i16.FieldErrorDisplayModule, typeof i16.ProfileImageCropperModule, typeof i16.ResourceHeaderModule], [typeof i16.ProfileImageCropperModule, typeof i16.ResourceHeaderModule, typeof InputContainerComponent, typeof NoDataComponent, typeof CompletionBarComponent, typeof RecordsSummaryComponent, typeof i10.ButtonModule, typeof i15.DragDropModule, typeof i13.ProgressSpinnerModule, typeof i14.AutoCompleteModule, typeof i12.TooltipModule, typeof i16.FieldErrorDisplayModule]>;
2321
+ 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]>;
2214
2322
  static ɵinj: i0.ɵɵInjectorDeclaration<ResourceSharedComponentsModule>;
2215
2323
  }
2216
2324
  declare namespace collapsible_sidebar_trigger_directive_d_exports {
@@ -2391,7 +2499,7 @@ declare class PwBrainChatThreadDirective {
2391
2499
  }
2392
2500
  export declare class SharedComponentsModule {
2393
2501
  static ɵfac: i0.ɵɵFactoryDeclaration<SharedComponentsModule, never>;
2394
- 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 i6.FormsModule, typeof i34.IconFieldModule, typeof i35.InputIconModule, typeof i36.InputTextModule, typeof i7.AppLoaderModule, typeof i6.ReactiveFormsModule, typeof i9.DirectivesModule, typeof i8.CoreTranslocoModule, typeof i40.RouterModule, typeof i11.NgbTooltipModule, typeof i12.TooltipModule, typeof i11.NgbNavModule, typeof i11.NgbModalModule, typeof i43.TableModule, typeof i44.TabsModule, typeof i10.ButtonModule, typeof i46.SelectModule, typeof i47.MultiSelectModule, typeof i13.ProgressSpinnerModule, typeof i14.AutoCompleteModule, typeof i50.ImageCropperComponent, typeof i51.UiSwitchModule, typeof i52.NgxDaterangepickerMd, typeof i53.PipesModule, typeof i5.CommonModule, typeof i5.NgIf, typeof i16.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 i11.NgbTooltipModule, typeof i12.TooltipModule, typeof i11.NgbNavModule, typeof i11.NgbModalModule, typeof i43.TableModule, typeof i44.TabsModule, typeof i10.ButtonModule, typeof i46.SelectModule, typeof i47.MultiSelectModule, typeof i13.ProgressSpinnerModule, typeof i14.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 i16.FieldErrorDisplayModule, typeof ResourceSharedComponentsModule]>;
2502
+ 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]>;
2395
2503
  static ɵinj: i0.ɵɵInjectorDeclaration<SharedComponentsModule>;
2396
2504
  }
2397
2505
  /**