@yomotech/view-toolkit 0.0.53 → 0.0.55

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.53",
3
+ "version": "0.0.55",
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 {
@@ -101,19 +100,16 @@ declare class Couchdb {
101
100
  private readonly remoteCouchDbBaseUrl;
102
101
  private readonly webProxyBaseUrl;
103
102
  constructor(utilityService: UtilityService);
104
- /**
105
- * Angular web development:
106
- * /couchdb-api -> Angular proxy -> https://couchdb.yomotech.de
107
- *
108
- * Capacitor Android/iOS:
109
- * Direct native request to https://couchdb.yomotech.de
110
- */
111
- private get couchDbBaseUrl();
112
103
  getTenantDatabases(tenantKey: string): Promise<any[]>;
113
104
  getFileContentFromCouchDb(couchDbName: string, filePath: string): Promise<any | null>;
114
105
  getImageSrcFromCouchDb(couchDbName: string, filePath: string): Promise<string>;
115
- private getDocumentUrl;
116
- private getDbUrl;
106
+ private sendGetRequest;
107
+ private sendNativeGetRequest;
108
+ private sendWebGetRequest;
109
+ private normalizeNativeResponseData;
110
+ private extractNativeErrorStatus;
111
+ private extractNativeErrorData;
112
+ private getDocumentPath;
117
113
  private getReadHeaders;
118
114
  private buildTenantHeaders;
119
115
  private parseJsonOrText;
@@ -493,7 +489,7 @@ declare class MobileKeycloakService {
493
489
  static ɵprov: i0.ɵɵInjectableDeclaration<MobileKeycloakService>;
494
490
  }
495
491
 
496
- declare class SideMenuComponent implements AfterViewInit {
492
+ declare class SideMenuComponent implements AfterViewInit, OnChanges, OnDestroy {
497
493
  private i18n;
498
494
  private mobileKeycloakService;
499
495
  private couchdbService;
@@ -502,19 +498,22 @@ declare class SideMenuComponent implements AfterViewInit {
502
498
  private requestService;
503
499
  private utilityService;
504
500
  private dialogService;
505
- private oktaAuthService;
506
501
  private notificationService;
507
- private oktaAuth;
502
+ private injector;
508
503
  isCollapsed: boolean;
509
504
  isMobile: boolean;
510
505
  projectsLayoutSchema: any;
511
506
  loginUser: any;
512
507
  isLogined: boolean;
513
508
  loginedUserInfo: any;
514
- menuItemsCopy: any;
509
+ menuItemsCopy: any[];
515
510
  settingMenu: any;
516
511
  setLanguage: boolean;
517
- tenantKey: any;
512
+ tenantKey: string;
513
+ private oktaAuthStateSubscription?;
514
+ private mobileLoginSubscription?;
515
+ private mobileLoginRequestInProgress;
516
+ private currentMobileLoginToken?;
518
517
  menuItems: any[];
519
518
  userInfo: any;
520
519
  settings: any;
@@ -528,7 +527,8 @@ declare class SideMenuComponent implements AfterViewInit {
528
527
  invokeProject: EventEmitter<any>;
529
528
  errorMessage: EventEmitter<any>;
530
529
  deleteProject: EventEmitter<any>;
531
- PRIME_DE: {
530
+ sideMenu: ElementRef<HTMLElement>;
531
+ readonly PRIME_DE: {
532
532
  firstDayOfWeek: number;
533
533
  dayNames: string[];
534
534
  dayNamesShort: string[];
@@ -540,7 +540,7 @@ declare class SideMenuComponent implements AfterViewInit {
540
540
  dateFormat: string;
541
541
  weekHeader: string;
542
542
  };
543
- PRIME_EN: {
543
+ readonly PRIME_EN: {
544
544
  firstDayOfWeek: number;
545
545
  dayNames: string[];
546
546
  dayNamesShort: string[];
@@ -552,34 +552,37 @@ declare class SideMenuComponent implements AfterViewInit {
552
552
  dateFormat: string;
553
553
  weekHeader: string;
554
554
  };
555
- sideMenu: ElementRef;
556
- constructor(i18n: NzI18nService, mobileKeycloakService: MobileKeycloakService, couchdbService: Couchdb, oauthService: OAuthService, platform: Platform, requestService: RequestService, utilityService: UtilityService, dialogService: DialogService, oktaAuthService: OktaAuthStateService, notificationService: NotificationService, oktaAuth: OktaAuth);
557
- onDocumentClick(event: MouseEvent): void;
558
- toggleCollapsed(): void;
555
+ constructor(i18n: NzI18nService, mobileKeycloakService: MobileKeycloakService, couchdbService: Couchdb, oauthService: OAuthService, platform: Platform, requestService: RequestService, utilityService: UtilityService, dialogService: DialogService, notificationService: NotificationService, injector: Injector);
559
556
  ngOnInit(): Promise<void>;
560
557
  ngOnChanges(changes: SimpleChanges): void;
561
- setProjectSetting(): Promise<void>;
562
558
  ngAfterViewInit(): Promise<void>;
559
+ ngOnDestroy(): void;
560
+ onDocumentClick(event: MouseEvent): void;
561
+ toggleCollapsed(): void;
562
+ private isNativeMobile;
563
563
  getDeviceLanguage(): Promise<string>;
564
564
  setLoginUser(): Promise<void>;
565
- getUserInfoFromToken(token: string): {
566
- sub: any;
567
- name: any;
568
- role: any;
569
- email: any;
570
- iat: any;
571
- exp: any;
572
- } | null;
565
+ private initializeMobileOktaUser;
566
+ private initializeWebOktaUser;
567
+ private destroyOktaSubscription;
568
+ private destroyMobileLoginSubscription;
569
+ private clearLoginUser;
570
+ getUserInfoFromToken(token: string): any | null;
571
+ setLoginedUser(user: any): void;
572
+ initializeProjects(): void;
573
+ setProjectSetting(): Promise<void>;
574
+ private setLanguageMenuImage;
573
575
  setSettingImages(): Promise<void>;
576
+ private setProjectMenuImage;
574
577
  getMediaSrc(file: any): string;
575
578
  isUrl(value: string): boolean;
576
- setLoginedUser(user: any): Promise<void>;
577
- initializeProjects(): void;
578
579
  invokeNavigate(menu: any, parentMenu?: any): Promise<void>;
579
580
  openLogsTable(): void;
580
- deleteMenuItem(subChild: any, index: any, event: any): void;
581
+ deleteMenuItem(subChild: any, index: number, event: Event): void;
581
582
  navigateToProject(project: any): void;
582
- changeLanguage(lang: any): Promise<void>;
583
+ changeLanguage(lang: string): Promise<void>;
584
+ private applyMenuTranslations;
585
+ private applySettingTranslations;
583
586
  static ɵfac: i0.ɵɵFactoryDeclaration<SideMenuComponent, never>;
584
587
  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>;
585
588
  }