@yomotech/view-toolkit 0.0.54 → 0.0.56

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,39 +1,39 @@
1
1
  {
2
2
  "name": "@yomotech/view-toolkit",
3
- "version": "0.0.54",
3
+ "version": "0.0.56",
4
4
  "peerDependencies": {
5
- "@angular/animations": "^21.1.2",
6
- "@angular/cdk": "^21.1.2",
7
- "@angular/common": "^21.1.2",
8
- "@angular/core": "^21.1.2",
9
- "@angular/forms": "^21.1.2",
10
- "@angular/material": "^21.1.2",
11
- "@angular/platform-browser": "^21.1.2",
12
- "@angular/router": "^21.1.2",
5
+ "@angular/animations": "^21.0.0",
6
+ "@angular/cdk": "^21.0.0",
7
+ "@angular/common": "^21.0.0",
8
+ "@angular/core": "^21.0.0",
9
+ "@angular/forms": "^21.0.0",
10
+ "@angular/material": "^21.0.0",
11
+ "@angular/platform-browser": "^21.0.0",
12
+ "@angular/router": "^21.0.0",
13
13
  "@ant-design/icons-angular": "^21.0.0",
14
14
  "@byteowls/capacitor-oauth2": "^5.0.0",
15
- "@capacitor/app": "^7.1.0",
16
- "@capacitor/browser": "^7.0.2",
17
- "@capacitor/core": "^7.2.0",
18
- "@capacitor/preferences": "^7.0.1",
15
+ "@capacitor/app": "^7.0.0",
16
+ "@capacitor/browser": "^7.0.0",
17
+ "@capacitor/core": "^7.0.0",
18
+ "@capacitor/device": "^7.0.0",
19
+ "@capacitor/preferences": "^7.0.0",
19
20
  "@ionic/angular": "^8.0.0",
21
+ "@okta/okta-angular": "^8.0.0",
22
+ "@okta/okta-auth-js": "^7.14.0",
20
23
  "@stripe/stripe-js": "^5.5.0",
21
- "@okta/okta-angular": "^6.5.1",
22
- "@okta/okta-auth-js": "^7.12.0-rc1",
24
+ "angular-oauth2-oidc": "^21.0.0",
25
+ "jszip": "^3.10.0",
23
26
  "jwt-decode": "^4.0.0",
24
- "@capacitor/device": "^7.0.3",
25
- "angular-oauth2-oidc": "^21.0.1",
26
- "jszip": "^3.10.1",
27
- "ng-zorro-antd": "^21.1.0",
28
- "ngx-toastr": "^19.1.0",
27
+ "ng-zorro-antd": "^21.0.0",
28
+ "ngx-toastr": "^19.0.0",
29
29
  "primeflex": "^4.0.0",
30
30
  "primeicons": "^7.0.0",
31
- "primeng": "^21.1.1",
32
- "rxjs": "~7.8.0",
31
+ "primeng": "^21.0.0",
32
+ "rxjs": "^7.8.0",
33
33
  "zone.js": "^0.16.0"
34
34
  },
35
35
  "dependencies": {
36
- "tslib": "^2.3.0"
36
+ "tslib": "^2.8.0"
37
37
  },
38
38
  "sideEffects": false,
39
39
  "module": "fesm2022/yomotech-view-toolkit.mjs",
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, ChangeDetectorRef, NgZone, SimpleChanges, OnInit, OnChanges, AfterViewInit, ElementRef } from '@angular/core';
2
+ import { EventEmitter, ChangeDetectorRef, NgZone, SimpleChanges, OnInit, OnChanges, AfterViewInit, OnDestroy, ElementRef, Injector } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { Platform } from '@angular/cdk/platform';
5
5
  import * as rxjs from 'rxjs';
@@ -10,7 +10,6 @@ import { OktaAuthStateService } from '@okta/okta-angular';
10
10
  import { ToastrService } from 'ngx-toastr';
11
11
  import { NgForm } from '@angular/forms';
12
12
  import { DynamicDialogRef, DialogService } from 'primeng/dynamicdialog';
13
- import OktaAuth from '@okta/okta-auth-js';
14
13
  import { NzI18nService } from 'ng-zorro-antd/i18n';
15
14
 
16
15
  declare class RequestService {
@@ -98,9 +97,10 @@ declare class UtilityService {
98
97
 
99
98
  declare class Couchdb {
100
99
  private utilityService;
100
+ private platform;
101
101
  private readonly remoteCouchDbBaseUrl;
102
102
  private readonly webProxyBaseUrl;
103
- constructor(utilityService: UtilityService);
103
+ constructor(utilityService: UtilityService, platform: Platform);
104
104
  getTenantDatabases(tenantKey: string): Promise<any[]>;
105
105
  getFileContentFromCouchDb(couchDbName: string, filePath: string): Promise<any | null>;
106
106
  getImageSrcFromCouchDb(couchDbName: string, filePath: string): Promise<string>;
@@ -490,7 +490,7 @@ declare class MobileKeycloakService {
490
490
  static ɵprov: i0.ɵɵInjectableDeclaration<MobileKeycloakService>;
491
491
  }
492
492
 
493
- declare class SideMenuComponent implements AfterViewInit {
493
+ declare class SideMenuComponent implements AfterViewInit, OnChanges, OnDestroy {
494
494
  private i18n;
495
495
  private mobileKeycloakService;
496
496
  private couchdbService;
@@ -499,19 +499,22 @@ declare class SideMenuComponent implements AfterViewInit {
499
499
  private requestService;
500
500
  private utilityService;
501
501
  private dialogService;
502
- private oktaAuthService;
503
502
  private notificationService;
504
- private oktaAuth;
503
+ private injector;
505
504
  isCollapsed: boolean;
506
505
  isMobile: boolean;
507
506
  projectsLayoutSchema: any;
508
507
  loginUser: any;
509
508
  isLogined: boolean;
510
509
  loginedUserInfo: any;
511
- menuItemsCopy: any;
510
+ menuItemsCopy: any[];
512
511
  settingMenu: any;
513
512
  setLanguage: boolean;
514
- tenantKey: any;
513
+ tenantKey: string;
514
+ private oktaAuthStateSubscription?;
515
+ private mobileLoginSubscription?;
516
+ private mobileLoginRequestInProgress;
517
+ private currentMobileLoginToken?;
515
518
  menuItems: any[];
516
519
  userInfo: any;
517
520
  settings: any;
@@ -525,7 +528,8 @@ declare class SideMenuComponent implements AfterViewInit {
525
528
  invokeProject: EventEmitter<any>;
526
529
  errorMessage: EventEmitter<any>;
527
530
  deleteProject: EventEmitter<any>;
528
- PRIME_DE: {
531
+ sideMenu: ElementRef<HTMLElement>;
532
+ readonly PRIME_DE: {
529
533
  firstDayOfWeek: number;
530
534
  dayNames: string[];
531
535
  dayNamesShort: string[];
@@ -537,7 +541,7 @@ declare class SideMenuComponent implements AfterViewInit {
537
541
  dateFormat: string;
538
542
  weekHeader: string;
539
543
  };
540
- PRIME_EN: {
544
+ readonly PRIME_EN: {
541
545
  firstDayOfWeek: number;
542
546
  dayNames: string[];
543
547
  dayNamesShort: string[];
@@ -549,34 +553,37 @@ declare class SideMenuComponent implements AfterViewInit {
549
553
  dateFormat: string;
550
554
  weekHeader: string;
551
555
  };
552
- sideMenu: ElementRef;
553
- constructor(i18n: NzI18nService, mobileKeycloakService: MobileKeycloakService, couchdbService: Couchdb, oauthService: OAuthService, platform: Platform, requestService: RequestService, utilityService: UtilityService, dialogService: DialogService, oktaAuthService: OktaAuthStateService, notificationService: NotificationService, oktaAuth: OktaAuth);
554
- onDocumentClick(event: MouseEvent): void;
555
- toggleCollapsed(): void;
556
+ constructor(i18n: NzI18nService, mobileKeycloakService: MobileKeycloakService, couchdbService: Couchdb, oauthService: OAuthService, platform: Platform, requestService: RequestService, utilityService: UtilityService, dialogService: DialogService, notificationService: NotificationService, injector: Injector);
556
557
  ngOnInit(): Promise<void>;
557
558
  ngOnChanges(changes: SimpleChanges): void;
558
- setProjectSetting(): Promise<void>;
559
559
  ngAfterViewInit(): Promise<void>;
560
+ ngOnDestroy(): void;
561
+ onDocumentClick(event: MouseEvent): void;
562
+ toggleCollapsed(): void;
563
+ private isNativeMobile;
560
564
  getDeviceLanguage(): Promise<string>;
561
565
  setLoginUser(): Promise<void>;
562
- getUserInfoFromToken(token: string): {
563
- sub: any;
564
- name: any;
565
- role: any;
566
- email: any;
567
- iat: any;
568
- exp: any;
569
- } | null;
566
+ private initializeMobileOktaUser;
567
+ private initializeWebOktaUser;
568
+ private destroyOktaSubscription;
569
+ private destroyMobileLoginSubscription;
570
+ private clearLoginUser;
571
+ getUserInfoFromToken(token: string): any | null;
572
+ setLoginedUser(user: any): void;
573
+ initializeProjects(): void;
574
+ setProjectSetting(): Promise<void>;
575
+ private setLanguageMenuImage;
570
576
  setSettingImages(): Promise<void>;
577
+ private setProjectMenuImage;
571
578
  getMediaSrc(file: any): string;
572
579
  isUrl(value: string): boolean;
573
- setLoginedUser(user: any): Promise<void>;
574
- initializeProjects(): void;
575
580
  invokeNavigate(menu: any, parentMenu?: any): Promise<void>;
576
581
  openLogsTable(): void;
577
- deleteMenuItem(subChild: any, index: any, event: any): void;
582
+ deleteMenuItem(subChild: any, index: number, event: Event): void;
578
583
  navigateToProject(project: any): void;
579
- changeLanguage(lang: any): Promise<void>;
584
+ changeLanguage(lang: string): Promise<void>;
585
+ private applyMenuTranslations;
586
+ private applySettingTranslations;
580
587
  static ɵfac: i0.ɵɵFactoryDeclaration<SideMenuComponent, never>;
581
588
  static ɵcmp: i0.ɵɵComponentDeclaration<SideMenuComponent, "vl-side-menu", never, { "menuItems": { "alias": "menuItems"; "required": false; }; "userInfo": { "alias": "userInfo"; "required": false; }; "settings": { "alias": "settings"; "required": false; }; "projects": { "alias": "projects"; "required": false; }; "tenantName": { "alias": "tenantName"; "required": false; }; "environment": { "alias": "environment"; "required": false; }; "projectSeleted": { "alias": "projectSeleted"; "required": false; }; }, { "languageChange": "languageChange"; "invokeMenu": "invokeMenu"; "menuToggle": "menuToggle"; "invokeProject": "invokeProject"; "errorMessage": "errorMessage"; "deleteProject": "deleteProject"; }, never, never, true, never>;
582
589
  }