@trudb/tru-common-lib 0.2.535 → 0.2.539

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.
@@ -42,6 +42,7 @@ export declare class TruDetailViewBase {
42
42
  active: boolean;
43
43
  subs: Array<Subscription>;
44
44
  constructor(dataContext: TruDataContext, componentLookup: TruComponentLookup, appEnvironment: TruAppEnvironment, textManager: TruTextManager, desktopManager: TruDesktopManager, windowEventHandler: TruWindowEventHandler, desktopViewEventNotifier: TruDesktopViewEventNotifier, util: TruUtil);
45
+ private onDocumentKeydown;
45
46
  private calculateNextIndex;
46
47
  protected renderCustomToolbarComponents: () => void;
47
48
  onAddEntity: (newEntity: any, dataNotification?: boolean) => void;
@@ -67,6 +67,7 @@ export declare class TruDataGrid implements OnInit, OnChanges, AfterViewInit {
67
67
  private detailResizeCleanup;
68
68
  private pendingResizeFrameId;
69
69
  constructor(dataContext: TruDataContext, componentLookup: TruComponentLookup, searchResultViewManager: TruSearchResultViewManager, appEnvironment: TruAppEnvironment, searchViewEventHandler: TruSearchViewEventHandler, uiNotification: TruUiNotification, connectionHub: TruConnectionHub, windowEventHandler: TruWindowEventHandler, dataGridClipboard: TruDataGridClipboard, util: TruUtil, app: ApplicationRef, cdr: ChangeDetectorRef, hostElement: ElementRef, desktopViewEventNotifier: TruDesktopViewEventNotifier, tabGroupEventNotifier: TruTabGroupEventNotifier);
70
+ private onDocumentKeydown;
70
71
  private enhanceRowDataForEntity;
71
72
  private setNoRowsTemplate;
72
73
  private applyRelationshipsAndUpdateGrid;
@@ -2,8 +2,9 @@ import { HttpClient } from "@angular/common/http";
2
2
  import { TruAppEnvironment } from "../../../services/tru-app-environment";
3
3
  import { TruAuthJwtStrategy } from "./tru-auth-jwt-strategy";
4
4
  import { TruAuthSessionStrategy } from "./tru-auth-session-strategy";
5
+ import { TruAuthWindowsStrategy } from "./tru-auth-windows-strategy";
5
6
  export declare const TruAuthStrategyProvider: {
6
7
  provide: import("@angular/core").InjectionToken<import("./tru-auth-config").TruAuthStrategy<any>>;
7
8
  deps: (typeof TruAppEnvironment | typeof HttpClient)[];
8
- useFactory: (http: HttpClient, appEnvironment: TruAppEnvironment) => TruAuthJwtStrategy | TruAuthSessionStrategy;
9
+ useFactory: (http: HttpClient, appEnvironment: TruAppEnvironment) => TruAuthSessionStrategy | TruAuthJwtStrategy | TruAuthWindowsStrategy;
9
10
  };
@@ -0,0 +1,9 @@
1
+ import { Observable } from "rxjs";
2
+ import { TruUser } from "../../../services/tru-user";
3
+ import { TruAuthStrategy } from "./tru-auth-config";
4
+ export declare class TruAuthWindowsStrategy implements TruAuthStrategy<TruUser> {
5
+ doLoginUser(user: TruUser): void;
6
+ doLogoutUser(): void;
7
+ createUser(user: TruUser): Observable<any>;
8
+ isLoggedIn(): boolean;
9
+ }
@@ -21,7 +21,7 @@ export declare class TruAuth {
21
21
  private loggedIn;
22
22
  private baseUrl;
23
23
  constructor(router: Router, http: HttpClient, cache: TruAuthCache, user: TruUser, appEnvironment: TruAppEnvironment, sessionKeepalive: TruSessionKeepalive, sessionExpiryMonitor: TruSessionExpiryMonitor, auth: TruAuthStrategy<any>);
24
- login(loginRequest: TruAuthLoginRequest): Observable<any>;
24
+ login(loginRequest: TruAuthLoginRequest | null): Observable<any>;
25
25
  setUser(): void;
26
26
  logout(): void;
27
27
  userClaims(): Observable<any>;
@@ -1,10 +1,11 @@
1
+ import { OnInit } from '@angular/core';
1
2
  import { FormGroup, FormControl } from '@angular/forms';
2
3
  import { TruAuth } from './services/tru-auth';
3
4
  import { TruAppEnvironment } from '../../services/tru-app-environment';
4
5
  import * as i0 from "@angular/core";
5
- export declare class TruLogin {
6
+ export declare class TruLogin implements OnInit {
6
7
  private auth;
7
- private appEnvironment;
8
+ appEnvironment: TruAppEnvironment;
8
9
  loginForm: FormGroup<{
9
10
  username: FormControl<string | null>;
10
11
  password: FormControl<string | null>;
@@ -14,12 +15,15 @@ export declare class TruLogin {
14
15
  passwordVisible: boolean;
15
16
  title: string;
16
17
  constructor(auth: TruAuth, appEnvironment: TruAppEnvironment);
18
+ ngOnInit(): void;
17
19
  get f(): {
18
20
  username: FormControl<string | null>;
19
21
  password: FormControl<string | null>;
20
22
  };
23
+ get isWindowsAuth(): boolean;
21
24
  isDisabled: () => boolean;
22
25
  onSubmit(): void;
26
+ private loginWithWindows;
23
27
  static ɵfac: i0.ɵɵFactoryDeclaration<TruLogin, never>;
24
28
  static ɵcmp: i0.ɵɵComponentDeclaration<TruLogin, "tru-login", never, {}, {}, never, never, false, never>;
25
29
  }
@@ -57,8 +57,8 @@ export declare class TruAppEnvironment {
57
57
  set loginFormTitle(description: string);
58
58
  get appUri(): string;
59
59
  set appUri(uri: string);
60
- get authType(): 'session' | 'jwt';
61
- set authType(type: 'session' | 'jwt');
60
+ get authType(): 'session' | 'jwt' | 'windows';
61
+ set authType(type: 'session' | 'jwt' | 'windows');
62
62
  get authenticationTimeoutMinutes(): number;
63
63
  set authenticationTimeoutMinutes(minutes: number);
64
64
  get isSaving(): boolean;
@@ -23,6 +23,8 @@ export declare class TruEntityAccessor {
23
23
  constructor(httpClient: HttpClient, appEnvironment: TruAppEnvironment, uiNotification: TruUiNotification, textManager: TruTextManager, user: TruUser);
24
24
  set context(dataContext: TruDataContext);
25
25
  private getQueryServiceName;
26
+ private getPrimaryKeyName;
27
+ private getEntityTypeName;
26
28
  private warnIfMaxRecords;
27
29
  private formatQueryChoices;
28
30
  private formatNameValues;
@@ -0,0 +1,22 @@
1
+ import { TruEntityBase } from '../base-classes/tru-entity-base';
2
+ export interface TruEntityMetadata {
3
+ entityTypeName: string;
4
+ queryResourceName: string;
5
+ primaryKeyName: string;
6
+ }
7
+ type TruEntityCtor = typeof TruEntityBase;
8
+ export declare class TruEntityMetadataRegistry {
9
+ private static readonly metadataByEntity;
10
+ static register(entity: TruEntityCtor, metadata: TruEntityMetadata): void;
11
+ static get(entity: TruEntityCtor): TruEntityMetadata | undefined;
12
+ static resolve(entity: TruEntityCtor): TruEntityMetadata;
13
+ private static resolveFromBreeze;
14
+ private static resolveFromConstructorName;
15
+ private static normalize;
16
+ private static getEntityTypeName;
17
+ private static getPrimaryKeyName;
18
+ private static shortNameFromQualifiedName;
19
+ private static requireText;
20
+ private static textOrUndefined;
21
+ }
22
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trudb/tru-common-lib",
3
- "version": "0.2.535",
3
+ "version": "0.2.539",
4
4
  "type": "module",
5
5
  "module": "fesm2022/trudb-tru-common-lib.mjs",
6
6
  "typings": "index.d.ts",
package/public-api.d.ts CHANGED
@@ -120,6 +120,7 @@ export * from './lib/services/tru-countries';
120
120
  export * from './lib/services/tru-data-context';
121
121
  export * from './lib/services/tru-global-data-context';
122
122
  export * from './lib/services/tru-entity-accessor';
123
+ export * from './lib/services/tru-entity-metadata-registry';
123
124
  export * from './lib/services/tru-formatter';
124
125
  export * from './lib/services/tru-model-navigation-properties-lookup';
125
126
  export * from './lib/services/tru-model-property-lookup';