@posiwise/user-module 0.0.171 → 0.0.173

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,7 +1,8 @@
1
1
  {
2
2
  "name": "@posiwise/user-module",
3
- "version": "0.0.171",
3
+ "version": "0.0.173",
4
4
  "peerDependencies": {
5
+ "@airwallex/components-sdk": "^1.35.2",
5
6
  "@angular/cdk": "^22.2.0",
6
7
  "@angular/common": "^22.2.0",
7
8
  "@angular/core": "^22.2.0"
@@ -1,42 +1,43 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, Injector, OnDestroy, OnInit, PipeTransform, Renderer2, TemplateRef } from "@angular/core";
3
- import * as i34 from "@angular/router";
3
+ import * as i36 from "@angular/router";
4
4
  import { Router } from "@angular/router";
5
5
  import { LazyLoadEvent, MenuItem } from "primeng/api";
6
- import * as i35 from "@angular/forms";
6
+ import * as i37 from "@angular/forms";
7
7
  import { NgControl, UntypedFormArray, UntypedFormBuilder, UntypedFormGroup } from "@angular/forms";
8
- import * as i37 from "@angular-magic/ngx-gp-autocomplete";
8
+ import * as i39 from "@angular-magic/ngx-gp-autocomplete";
9
9
  import { NgxGpAutocompleteDirective } from "@angular-magic/ngx-gp-autocomplete";
10
10
  import { AppBaseComponent } from "@posiwise/app-base-component";
11
- import { AuthService, CommonService, GeoService, PermissionService, ProductService, ProfileService, QualificationService, ScriptLoaderService, SubscriptionService, TagService } from "@posiwise/common-services";
11
+ import { AuthService, CommonService, CustomToastService, GeoService, PermissionService, ProductService, ProfileService, QualificationService, ScriptLoaderService, SubscriptionService, TagService, UserService } from "@posiwise/common-services";
12
12
  import { Country, PRODUCT_CATEGORY, Product, Project, Subscription, TAG_ENTITY, TAG_TYPE, User } from "@posiwise/common-utilities";
13
- import * as i38 from "@posiwise/shared-components";
13
+ import * as i40 from "@posiwise/shared-components";
14
14
  import { ConfirmDialogService, PasswordValidationComponent } from "@posiwise/shared-components";
15
15
  import { Observable, Subscription as Subscription$1 } from "rxjs";
16
- import * as i51 from "@ng-bootstrap/ng-bootstrap";
16
+ import * as i53 from "@ng-bootstrap/ng-bootstrap";
17
17
  import { NgbModal } from "@ng-bootstrap/ng-bootstrap";
18
+ import { TranslocoService } from "@jsverse/transloco";
18
19
  import { AppState } from "@posiwise/app-store";
19
20
  import { Store } from "@ngrx/store";
20
21
  import { Clipboard } from "@angular/cdk/clipboard";
21
22
  import { AdminService } from "@posiwise/admin-module-utils";
22
- import * as i46 from "primeng/fileupload";
23
+ import * as i48 from "primeng/fileupload";
23
24
  import { FileUpload } from "primeng/fileupload";
24
- import * as i30 from "primeng/inputtext";
25
- import * as i31 from "@posiwise/app-loader";
26
- import * as i32 from "@posiwise/directives";
27
- import * as i33 from "@angular/common";
28
- import * as i36 from "@posiwise/core-transloco";
29
- import * as i39 from "@posiwise/pipes";
30
- import * as i40 from "ngx-ui-switch";
31
- import * as i41 from "ngx-captcha";
32
- import * as i42 from "primeng/datepicker";
33
- import * as i43 from "primeng/multiselect";
34
- import * as i44 from "primeng/progressspinner";
35
- import * as i45 from "primeng/accordion";
36
- import * as i47 from "primeng/select";
37
- import * as i48 from "primeng/rating";
38
- import * as i49 from "primeng/selectbutton";
39
- import * as i50 from "primeng/tooltip";
25
+ import * as i32 from "primeng/inputtext";
26
+ import * as i33 from "@posiwise/app-loader";
27
+ import * as i34 from "@posiwise/directives";
28
+ import * as i35 from "@angular/common";
29
+ import * as i38 from "@posiwise/core-transloco";
30
+ import * as i41 from "@posiwise/pipes";
31
+ import * as i42 from "ngx-ui-switch";
32
+ import * as i43 from "ngx-captcha";
33
+ import * as i44 from "primeng/datepicker";
34
+ import * as i45 from "primeng/multiselect";
35
+ import * as i46 from "primeng/progressspinner";
36
+ import * as i47 from "primeng/accordion";
37
+ import * as i49 from "primeng/select";
38
+ import * as i50 from "primeng/rating";
39
+ import * as i51 from "primeng/selectbutton";
40
+ import * as i52 from "primeng/tooltip";
40
41
  declare namespace account_component_d_exports {
41
42
  export { AccountComponent };
42
43
  }
@@ -477,6 +478,15 @@ interface BraintreeCardSummary {
477
478
  exp_month: number;
478
479
  exp_year: number;
479
480
  }
481
+ interface AirwallexCardSummary {
482
+ provider: 'airwallex';
483
+ brand: string;
484
+ card_number: string;
485
+ exp_month: number;
486
+ exp_year: number;
487
+ }
488
+ type SecondaryCardSummary = BraintreeCardSummary | AirwallexCardSummary;
489
+ type SecondaryProvider = 'braintree' | 'airwallex';
480
490
  interface StripeJsApi {
481
491
  setPublishableKey(key: string): void;
482
492
  card: {
@@ -486,7 +496,7 @@ interface StripeJsApi {
486
496
  declare namespace update_payment_details_component_d_exports {
487
497
  export { UpdatePaymentDetailsComponent };
488
498
  }
489
- export declare class UpdatePaymentDetailsComponent extends AppBaseComponent implements OnInit, OnDestroy {
499
+ export declare class UpdatePaymentDetailsComponent extends AppBaseComponent implements OnInit {
490
500
  private readonly fb;
491
501
  private readonly scriptLoader;
492
502
  private readonly productService;
@@ -498,32 +508,79 @@ export declare class UpdatePaymentDetailsComponent extends AppBaseComponent impl
498
508
  busy: boolean;
499
509
  isChangePayment: boolean;
500
510
  cardDetails: CardDetails | null;
501
- secondaryCard: BraintreeCardSummary | null;
502
- showBraintreeForm: boolean;
503
- braintreeBusy: boolean;
511
+ secondaryCard: SecondaryCardSummary | null;
512
+ secondaryProvider: SecondaryProvider;
504
513
  loading: boolean;
505
514
  errorMessage: string;
506
515
  stripePublishKey: string;
507
516
  errorMsg: string;
508
517
  subscriptionId: number;
509
518
  productId: number;
510
- braintreeContainer?: ElementRef<HTMLDivElement>;
511
- private readonly braintreeHelper;
512
519
  constructor(fb: UntypedFormBuilder, scriptLoader: ScriptLoaderService, productService: ProductService, subscriptionService: SubscriptionService, injector: Injector, cdr: ChangeDetectorRef);
513
520
  ngOnInit(): void;
514
- ngOnDestroy(): void;
515
- private refreshPaymentMethods;
521
+ refreshPaymentMethods(): void;
516
522
  onUpdatePaymentDetailsCancel(): void;
517
523
  onSave(): void;
518
524
  private onStripeToken;
519
525
  cancel(): void;
520
526
  onChange(value: any): void;
521
- startBraintreeFlow(): Promise<void>;
522
- submitBraintree(): Promise<void>;
523
- cancelBraintreeFlow(): void;
524
527
  static ɵfac: i0.ɵɵFactoryDeclaration<UpdatePaymentDetailsComponent, never>;
525
528
  static ɵcmp: i0.ɵɵComponentDeclaration<UpdatePaymentDetailsComponent, "pw-update-payment-details", never, {}, {}, never, never, false, never>;
526
529
  }
530
+ declare namespace secondary_payment_method_component_d_exports {
531
+ export { SecondaryPaymentMethodComponent };
532
+ }
533
+ declare class SecondaryPaymentMethodComponent implements OnDestroy {
534
+ private readonly subscriptionService;
535
+ private readonly userService;
536
+ private readonly toast;
537
+ private readonly transloco;
538
+ private readonly cdr;
539
+ subscriptionId: number;
540
+ card: SecondaryCardSummary | null;
541
+ provider: SecondaryProvider;
542
+ loading: boolean;
543
+ saved: EventEmitter<void>;
544
+ formHost?: ElementRef<HTMLDivElement>;
545
+ showForm: boolean;
546
+ mounting: boolean;
547
+ busy: boolean;
548
+ private readonly braintree;
549
+ private readonly airwallex;
550
+ constructor(subscriptionService: SubscriptionService, userService: UserService, toast: CustomToastService, transloco: TranslocoService, cdr: ChangeDetectorRef);
551
+ ngOnDestroy(): void;
552
+ startFlow(): Promise<void>;
553
+ submit(): Promise<void>;
554
+ cancel(): void;
555
+ private onSaved;
556
+ private mountForm;
557
+ /** Braintree yields a nonce; Airwallex yields the confirmed intent id (after 3DS). */
558
+ private collectCard;
559
+ private register;
560
+ private teardown;
561
+ private fail;
562
+ static ɵfac: i0.ɵɵFactoryDeclaration<SecondaryPaymentMethodComponent, never>;
563
+ static ɵcmp: i0.ɵɵComponentDeclaration<SecondaryPaymentMethodComponent, "pw-secondary-payment-method", never, {
564
+ "subscriptionId": {
565
+ "alias": "subscriptionId";
566
+ "required": false;
567
+ };
568
+ "card": {
569
+ "alias": "card";
570
+ "required": false;
571
+ };
572
+ "provider": {
573
+ "alias": "provider";
574
+ "required": false;
575
+ };
576
+ "loading": {
577
+ "alias": "loading";
578
+ "required": false;
579
+ };
580
+ }, {
581
+ "saved": "saved";
582
+ }, never, never, false, never>;
583
+ }
527
584
  declare namespace upgrade_subscription_component_d_exports {
528
585
  export { UpgradeSubscriptionComponent };
529
586
  }
@@ -736,6 +793,30 @@ export declare class UserInvoiceComponent extends AppBaseComponent implements On
736
793
  static ɵfac: i0.ɵɵFactoryDeclaration<UserInvoiceComponent, never>;
737
794
  static ɵcmp: i0.ɵɵComponentDeclaration<UserInvoiceComponent, "pw-user-invoice", never, {}, {}, never, never, false, never>;
738
795
  }
796
+ declare namespace ai_knowledge_tab_component_d_exports {
797
+ export { AiKnowledgeTabComponent };
798
+ }
799
+ /**
800
+ * Settings › AI Knowledge: the member's personal Brain documents, filed under the
801
+ * subscription currently selected in the sidebar. Read live from
802
+ * `PermissionService.selectedSubscription` because the sidebar sets it after this
803
+ * page can render, and switching subscription changes where the files belong.
804
+ */
805
+ export declare class AiKnowledgeTabComponent {
806
+ private readonly permissionService;
807
+ constructor(permissionService: PermissionService);
808
+ /** Permissions arrive after a hard refresh; decide nothing until they have. */
809
+ get ready(): boolean;
810
+ /** Alpha-only for now. Checked here, not by a route guard — see the route. */
811
+ get isAlpha(): boolean;
812
+ get subscription(): (Subscription & {
813
+ rag_use_own_data?: boolean;
814
+ }) | null;
815
+ /** An absent flag is not consent — same rule as brain-api. */
816
+ get useOwnData(): boolean;
817
+ static ɵfac: i0.ɵɵFactoryDeclaration<AiKnowledgeTabComponent, never>;
818
+ static ɵcmp: i0.ɵɵComponentDeclaration<AiKnowledgeTabComponent, "pw-ai-knowledge-tab", never, {}, {}, never, never, false, never>;
819
+ }
739
820
  declare namespace communication_tab_component_d_exports {
740
821
  export { CommunicationTabComponent };
741
822
  }
@@ -1323,6 +1404,6 @@ export declare class SupportDetailsComponent extends AppBaseComponent implements
1323
1404
  }
1324
1405
  export declare class UserModuleModule {
1325
1406
  static ɵfac: i0.ɵɵFactoryDeclaration<UserModuleModule, never>;
1326
- static ɵmod: i0.ɵɵNgModuleDeclaration<UserModuleModule, [typeof AccountComponent, typeof AccountDetailsComponent, typeof AddSubscriptionComponent, typeof SavedCardDetailsComponent, typeof SubscriptionCredentialComponent, typeof HumanizeCredentialNamePipe, typeof CredentialAvatarHuePipe, typeof SubscriptionNameByIdPipe, typeof ClearMaskedOnFocusDirective, typeof UpdatePaymentDetailsComponent, typeof UpgradeSubscriptionComponent, typeof UserSubscriptionDetailsComponent, typeof UserSubscriptionListComponent, typeof UserInvoiceComponent, typeof CommunicationTabComponent, typeof OthersTabComponent, typeof SecurityTabComponent, typeof SettingsComponent, typeof SupportComponent, typeof EditPortfoliosComponent, typeof EditProjectModalComponent, typeof EditQualificationsModalComponent, typeof EditRecommendationModalComponent, typeof EditSkillsModalComponent, typeof EditSocialLinksComponent, typeof EditUserProfileModalComponent, typeof UserAboutComponent, typeof PortfoliosComponent, typeof UserProfilePageComponent, typeof UserProjectsComponent, typeof SupportDetailsComponent], [typeof i30.InputTextModule, typeof i31.AppLoaderModule, typeof i32.DirectivesModule, typeof i33.CommonModule, typeof i34.RouterModule, typeof i35.ReactiveFormsModule, typeof i36.CoreTranslocoModule, typeof i37.NgxGpAutocompleteModule, typeof i38.SharedComponentsModule, typeof i39.PipesModule, typeof i40.UiSwitchModule, typeof i41.NgxCaptchaModule, typeof i35.FormsModule, typeof i42.DatePickerModule, typeof i43.MultiSelectModule, typeof i44.ProgressSpinnerModule, typeof i45.AccordionModule, typeof i46.FileUploadModule, typeof i47.SelectModule, typeof i48.RatingModule, typeof i49.SelectButtonModule, typeof i50.TooltipModule, typeof i51.NgbModalModule, typeof i51.NgbDatepickerModule], [typeof AccountComponent, typeof AccountDetailsComponent, typeof AddSubscriptionComponent, typeof SavedCardDetailsComponent, typeof SubscriptionCredentialComponent, typeof HumanizeCredentialNamePipe, typeof CredentialAvatarHuePipe, typeof SubscriptionNameByIdPipe, typeof ClearMaskedOnFocusDirective, typeof UpdatePaymentDetailsComponent, typeof UpgradeSubscriptionComponent, typeof UserSubscriptionDetailsComponent, typeof UserSubscriptionListComponent, typeof UserInvoiceComponent, typeof CommunicationTabComponent, typeof OthersTabComponent, typeof SecurityTabComponent, typeof SettingsComponent, typeof SupportComponent, typeof EditPortfoliosComponent, typeof EditProjectModalComponent, typeof EditQualificationsModalComponent, typeof EditRecommendationModalComponent, typeof EditSkillsModalComponent, typeof EditSocialLinksComponent, typeof EditUserProfileModalComponent, typeof UserAboutComponent, typeof PortfoliosComponent, typeof UserProfilePageComponent, typeof UserProjectsComponent, typeof SupportDetailsComponent]>;
1407
+ static ɵmod: i0.ɵɵNgModuleDeclaration<UserModuleModule, [typeof AccountComponent, typeof AccountDetailsComponent, typeof AddSubscriptionComponent, typeof SavedCardDetailsComponent, typeof SubscriptionCredentialComponent, typeof HumanizeCredentialNamePipe, typeof CredentialAvatarHuePipe, typeof SubscriptionNameByIdPipe, typeof ClearMaskedOnFocusDirective, typeof UpdatePaymentDetailsComponent, typeof SecondaryPaymentMethodComponent, typeof UpgradeSubscriptionComponent, typeof UserSubscriptionDetailsComponent, typeof UserSubscriptionListComponent, typeof UserInvoiceComponent, typeof AiKnowledgeTabComponent, typeof CommunicationTabComponent, typeof OthersTabComponent, typeof SecurityTabComponent, typeof SettingsComponent, typeof SupportComponent, typeof EditPortfoliosComponent, typeof EditProjectModalComponent, typeof EditQualificationsModalComponent, typeof EditRecommendationModalComponent, typeof EditSkillsModalComponent, typeof EditSocialLinksComponent, typeof EditUserProfileModalComponent, typeof UserAboutComponent, typeof PortfoliosComponent, typeof UserProfilePageComponent, typeof UserProjectsComponent, typeof SupportDetailsComponent], [typeof i32.InputTextModule, typeof i33.AppLoaderModule, typeof i34.DirectivesModule, typeof i35.CommonModule, typeof i36.RouterModule, typeof i37.ReactiveFormsModule, typeof i38.CoreTranslocoModule, typeof i39.NgxGpAutocompleteModule, typeof i40.SharedComponentsModule, typeof i41.PipesModule, typeof i42.UiSwitchModule, typeof i43.NgxCaptchaModule, typeof i37.FormsModule, typeof i44.DatePickerModule, typeof i45.MultiSelectModule, typeof i46.ProgressSpinnerModule, typeof i47.AccordionModule, typeof i48.FileUploadModule, typeof i49.SelectModule, typeof i50.RatingModule, typeof i51.SelectButtonModule, typeof i52.TooltipModule, typeof i53.NgbModalModule, typeof i53.NgbDatepickerModule], [typeof AccountComponent, typeof AccountDetailsComponent, typeof AddSubscriptionComponent, typeof SavedCardDetailsComponent, typeof SubscriptionCredentialComponent, typeof HumanizeCredentialNamePipe, typeof CredentialAvatarHuePipe, typeof SubscriptionNameByIdPipe, typeof ClearMaskedOnFocusDirective, typeof UpdatePaymentDetailsComponent, typeof UpgradeSubscriptionComponent, typeof UserSubscriptionDetailsComponent, typeof UserSubscriptionListComponent, typeof UserInvoiceComponent, typeof AiKnowledgeTabComponent, typeof CommunicationTabComponent, typeof OthersTabComponent, typeof SecurityTabComponent, typeof SettingsComponent, typeof SupportComponent, typeof EditPortfoliosComponent, typeof EditProjectModalComponent, typeof EditQualificationsModalComponent, typeof EditRecommendationModalComponent, typeof EditSkillsModalComponent, typeof EditSocialLinksComponent, typeof EditUserProfileModalComponent, typeof UserAboutComponent, typeof PortfoliosComponent, typeof UserProfilePageComponent, typeof UserProjectsComponent, typeof SupportDetailsComponent]>;
1327
1408
  static ɵinj: i0.ɵɵInjectorDeclaration<UserModuleModule>;
1328
1409
  }