@posiwise/user-module 0.0.172 → 0.0.174

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.
@@ -54,7 +54,7 @@ import { StatusCodes } from "http-status-codes";
54
54
  import { firstValueFrom, forkJoin, from, interval, map } from "rxjs";
55
55
  import { getDomain } from "tldts";
56
56
  import * as i3 from "@posiwise/common-services";
57
- import { FormHelperService, PermissionService, ValidationService } from "@posiwise/common-services";
57
+ import { FormHelperService, PermissionService, ValidationService, hasKnowledgeAlpha } from "@posiwise/common-services";
58
58
  import * as i13 from "@jsverse/transloco";
59
59
  import cloneDeep from "lodash/cloneDeep";
60
60
  import sortBy from "lodash/sortBy";
@@ -4260,6 +4260,97 @@ i0.ɵɵngDeclareClassMetadata({
4260
4260
  }],
4261
4261
  ctorParameters: () => [{ type: i0.Injector }, { type: i0.ChangeDetectorRef }]
4262
4262
  });
4263
+ var AiKnowledgeTabComponent = class AiKnowledgeTabComponent {
4264
+ constructor(permissionService) {
4265
+ this.permissionService = permissionService;
4266
+ }
4267
+ get ready() {
4268
+ return !!this.permissionService.user;
4269
+ }
4270
+ get isAlpha() {
4271
+ return hasKnowledgeAlpha(this.permissionService);
4272
+ }
4273
+ get subscription() {
4274
+ return PermissionService.selectedSubscription ?? null;
4275
+ }
4276
+ get useOwnData() {
4277
+ return this.subscription?.rag_use_own_data === true;
4278
+ }
4279
+ static {
4280
+ this.ɵfac = i0.ɵɵngDeclareFactory({
4281
+ minVersion: "12.0.0",
4282
+ version: "22.2.0",
4283
+ ngImport: i0,
4284
+ type: AiKnowledgeTabComponent,
4285
+ deps: [{ token: i3.PermissionService }],
4286
+ target: i0.ɵɵFactoryTarget.Component
4287
+ });
4288
+ }
4289
+ static {
4290
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
4291
+ minVersion: "17.0.0",
4292
+ version: "22.2.0",
4293
+ type: AiKnowledgeTabComponent,
4294
+ isStandalone: false,
4295
+ selector: "pw-ai-knowledge-tab",
4296
+ ngImport: i0,
4297
+ template: "@if (!ready) {\n <pw-loader [isVisible]=\"true\"></pw-loader>\n} @else if (!isAlpha) {\n <pw-no-data [withImage]=\"true\" [message]=\"'AiKnowledge.NotAvailable' | transloco\"></pw-no-data>\n} @else if (subscription) {\n <pw-ai-knowledge scope=\"personal\"\n [subscriptionId]=\"subscription.id\"\n [subscriptionName]=\"subscription.organisation\"\n [useOwnData]=\"useOwnData\"></pw-ai-knowledge>\n} @else {\n <pw-no-data [withImage]=\"true\" [message]=\"'AiKnowledge.NoSubscription' | transloco\"></pw-no-data>\n}\n",
4298
+ dependencies: [
4299
+ {
4300
+ kind: "component",
4301
+ type: i5$2.AppLoaderComponent,
4302
+ selector: "pw-loader",
4303
+ inputs: [
4304
+ "isVisible",
4305
+ "closeOnOutsideClick",
4306
+ "autoCloseTimeOut"
4307
+ ]
4308
+ },
4309
+ {
4310
+ kind: "component",
4311
+ type: i2$3.AiKnowledgeComponent,
4312
+ selector: "pw-ai-knowledge",
4313
+ inputs: [
4314
+ "scope",
4315
+ "subscriptionId",
4316
+ "subscriptionName",
4317
+ "useOwnData"
4318
+ ]
4319
+ },
4320
+ {
4321
+ kind: "component",
4322
+ type: i2$3.NoDataComponent,
4323
+ selector: "pw-no-data",
4324
+ inputs: [
4325
+ "message",
4326
+ "description",
4327
+ "withImage"
4328
+ ]
4329
+ },
4330
+ {
4331
+ kind: "pipe",
4332
+ type: i13.TranslocoPipe,
4333
+ name: "transloco"
4334
+ }
4335
+ ]
4336
+ });
4337
+ }
4338
+ };
4339
+ i0.ɵɵngDeclareClassMetadata({
4340
+ minVersion: "12.0.0",
4341
+ version: "22.2.0",
4342
+ ngImport: i0,
4343
+ type: AiKnowledgeTabComponent,
4344
+ decorators: [{
4345
+ type: Component,
4346
+ args: [{
4347
+ selector: "pw-ai-knowledge-tab",
4348
+ standalone: false,
4349
+ template: "@if (!ready) {\n <pw-loader [isVisible]=\"true\"></pw-loader>\n} @else if (!isAlpha) {\n <pw-no-data [withImage]=\"true\" [message]=\"'AiKnowledge.NotAvailable' | transloco\"></pw-no-data>\n} @else if (subscription) {\n <pw-ai-knowledge scope=\"personal\"\n [subscriptionId]=\"subscription.id\"\n [subscriptionName]=\"subscription.organisation\"\n [useOwnData]=\"useOwnData\"></pw-ai-knowledge>\n} @else {\n <pw-no-data [withImage]=\"true\" [message]=\"'AiKnowledge.NoSubscription' | transloco\"></pw-no-data>\n}\n"
4350
+ }]
4351
+ }],
4352
+ ctorParameters: () => [{ type: i3.PermissionService }]
4353
+ });
4263
4354
  var CommunicationTabComponent = class CommunicationTabComponent extends AppBaseComponent {
4264
4355
  constructor(commonService, profileService, store, injector, cdr) {
4265
4356
  super(injector);
@@ -4826,6 +4917,13 @@ var SettingsComponent = class SettingsComponent {
4826
4917
  icon: "fa fa-fw fa-lock",
4827
4918
  routerLink: ["/settings/security"]
4828
4919
  },
4920
+ {
4921
+ id: "ai-knowledge",
4922
+ label: "AI Knowledge",
4923
+ icon: "fa fa-fw fa-brain",
4924
+ routerLink: ["/settings/ai-knowledge"],
4925
+ visible: hasKnowledgeAlpha(this.permissionService)
4926
+ },
4829
4927
  {
4830
4928
  id: "other",
4831
4929
  label: "Other",
@@ -8388,6 +8486,7 @@ var UserModuleModule = class UserModuleModule {
8388
8486
  UserSubscriptionDetailsComponent,
8389
8487
  UserSubscriptionListComponent,
8390
8488
  UserInvoiceComponent,
8489
+ AiKnowledgeTabComponent,
8391
8490
  CommunicationTabComponent,
8392
8491
  OthersTabComponent,
8393
8492
  SecurityTabComponent,
@@ -8447,6 +8546,7 @@ var UserModuleModule = class UserModuleModule {
8447
8546
  UserSubscriptionDetailsComponent,
8448
8547
  UserSubscriptionListComponent,
8449
8548
  UserInvoiceComponent,
8549
+ AiKnowledgeTabComponent,
8450
8550
  CommunicationTabComponent,
8451
8551
  OthersTabComponent,
8452
8552
  SecurityTabComponent,
@@ -8527,6 +8627,7 @@ i0.ɵɵngDeclareClassMetadata({
8527
8627
  UserSubscriptionDetailsComponent,
8528
8628
  UserSubscriptionListComponent,
8529
8629
  UserInvoiceComponent,
8630
+ AiKnowledgeTabComponent,
8530
8631
  CommunicationTabComponent,
8531
8632
  OthersTabComponent,
8532
8633
  SecurityTabComponent,
@@ -8577,6 +8678,7 @@ i0.ɵɵngDeclareClassMetadata({
8577
8678
  UserSubscriptionDetailsComponent,
8578
8679
  UserSubscriptionListComponent,
8579
8680
  UserInvoiceComponent,
8681
+ AiKnowledgeTabComponent,
8580
8682
  CommunicationTabComponent,
8581
8683
  OthersTabComponent,
8582
8684
  SecurityTabComponent,
@@ -8608,6 +8710,6 @@ i0.ɵɵngDeclareClassMetadata({
8608
8710
  }]
8609
8711
  }]
8610
8712
  });
8611
- export { AccountComponent, AccountDetailsComponent, AddSubscriptionComponent, ClearMaskedOnFocusDirective, CommunicationTabComponent, CredentialAvatarHuePipe, EditPortfoliosComponent, EditProjectModalComponent, EditQualificationsModalComponent, EditRecommendationModalComponent, EditSkillsModalComponent, EditSocialLinksComponent, EditUserProfileModalComponent, HumanizeCredentialNamePipe, OthersTabComponent, PortfoliosComponent, SavedCardDetailsComponent, SecurityTabComponent, SettingsComponent, SubscriptionCredentialComponent, SubscriptionNameByIdPipe, SupportComponent, SupportDetailsComponent, UpdatePaymentDetailsComponent, UpgradeSubscriptionComponent, UserAboutComponent, UserInvoiceComponent, UserModuleModule, UserProfilePageComponent, UserProjectsComponent, UserSubscriptionDetailsComponent, UserSubscriptionListComponent };
8713
+ export { AccountComponent, AccountDetailsComponent, AddSubscriptionComponent, AiKnowledgeTabComponent, ClearMaskedOnFocusDirective, CommunicationTabComponent, CredentialAvatarHuePipe, EditPortfoliosComponent, EditProjectModalComponent, EditQualificationsModalComponent, EditRecommendationModalComponent, EditSkillsModalComponent, EditSocialLinksComponent, EditUserProfileModalComponent, HumanizeCredentialNamePipe, OthersTabComponent, PortfoliosComponent, SavedCardDetailsComponent, SecurityTabComponent, SettingsComponent, SubscriptionCredentialComponent, SubscriptionNameByIdPipe, SupportComponent, SupportDetailsComponent, UpdatePaymentDetailsComponent, UpgradeSubscriptionComponent, UserAboutComponent, UserInvoiceComponent, UserModuleModule, UserProfilePageComponent, UserProjectsComponent, UserSubscriptionDetailsComponent, UserSubscriptionListComponent };
8612
8714
 
8613
8715
  //# sourceMappingURL=posiwise-user-module.mjs.map