@smartbit4all/ng-client 4.5.0 → 4.5.2
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/esm2022/lib/session/projects.mjs +3 -1
- package/esm2022/lib/session/smart-backend-bootstrap.config.mjs +2 -0
- package/esm2022/lib/session/smart-backend-bootstrap.service.mjs +91 -0
- package/esm2022/lib/session/smart-session.service.mjs +1 -3
- package/esm2022/lib/smart-client/projects.mjs +1 -2
- package/esm2022/lib/smart-client/smart-component-api-client.mjs +10 -10
- package/esm2022/lib/smart-client/smart.component.mjs +4 -7
- package/esm2022/lib/smart-client/smart.service.mjs +4 -8
- package/esm2022/lib/smart-grid/components/table-layout-definer/table-layout-definer.component.mjs +2 -1
- package/esm2022/lib/smart-grid/smart-grid.component.mjs +2 -2
- package/esm2022/lib/view-context/smart-ui-action/ui-action.descriptor.service.mjs +5 -3
- package/fesm2022/smartbit4all-ng-client.mjs +108 -44
- package/fesm2022/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/session/projects.d.ts +2 -0
- package/lib/session/smart-backend-bootstrap.config.d.ts +16 -0
- package/lib/session/smart-backend-bootstrap.service.d.ts +22 -0
- package/lib/session/smart-session.service.d.ts +0 -1
- package/lib/smart-client/projects.d.ts +0 -1
- package/lib/smart-client/smart-component-api-client.d.ts +4 -4
- package/lib/smart-client/smart.component.d.ts +1 -2
- package/lib/smart-client/smart.service.d.ts +1 -2
- package/package.json +1 -1
- package/smartbit4all-ng-client-4.5.2.tgz +0 -0
- package/esm2022/lib/smart-client/smart-authentication.service.mjs +0 -21
- package/lib/smart-client/smart-authentication.service.d.ts +0 -15
- package/smartbit4all-ng-client-4.5.0.tgz +0 -0
|
@@ -4,3 +4,5 @@ export * from './smart-session.module';
|
|
|
4
4
|
export * from './smart-session-handler.service';
|
|
5
5
|
export * from './smart-timer/smart-session-timer.component';
|
|
6
6
|
export * from './smart-timer/smart-session-timer.service';
|
|
7
|
+
export * from './smart-backend-bootstrap.service';
|
|
8
|
+
export * from './smart-backend-bootstrap.config';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { UiActionDescriptor } from '../view-context/api';
|
|
2
|
+
import { SmartViewHandlerModel } from '../view-context/smart-view-context.model';
|
|
3
|
+
import { SessionError } from './smart-session-handler.service';
|
|
4
|
+
export interface SmartBackendBootstrapConfig {
|
|
5
|
+
url: string;
|
|
6
|
+
cookieName: string;
|
|
7
|
+
messageDialogName: string;
|
|
8
|
+
viewHandlers: SmartViewHandlerModel[];
|
|
9
|
+
actionDescriptors: Map<string, UiActionDescriptor>;
|
|
10
|
+
/** Optional override for the default `handleSessionError` flow. */
|
|
11
|
+
onSessionError?: (err: SessionError) => Promise<void> | void;
|
|
12
|
+
/** Optional override for the default `openSmartLink` handler. */
|
|
13
|
+
onSmartLink?: (channel: string) => Promise<void> | void;
|
|
14
|
+
/** Hook for host UX when `start()` rejects (snackbar + retry). */
|
|
15
|
+
onStartError?: (err: unknown) => Promise<void> | void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SmartSessionService } from './smart-session.service';
|
|
2
|
+
import { SmartViewContextService } from '../view-context/smart-view-context.service';
|
|
3
|
+
import { SessionError, SmartSessionHandlerService } from './smart-session-handler.service';
|
|
4
|
+
import { SmartBackendBootstrapConfig } from './smart-backend-bootstrap.config';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class SmartBackendBootstrapService implements SmartSessionHandlerService {
|
|
7
|
+
private session;
|
|
8
|
+
private viewContext;
|
|
9
|
+
private config?;
|
|
10
|
+
private runningInit?;
|
|
11
|
+
private lastInitFailed;
|
|
12
|
+
constructor(session: SmartSessionService, viewContext: SmartViewContextService);
|
|
13
|
+
configure(config: SmartBackendBootstrapConfig): void;
|
|
14
|
+
private handleSmartLink;
|
|
15
|
+
start(): Promise<void>;
|
|
16
|
+
whenReady(): Promise<void>;
|
|
17
|
+
reset(): Promise<void>;
|
|
18
|
+
private runInit;
|
|
19
|
+
handleSessionError(err: SessionError): Promise<void>;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SmartBackendBootstrapService, never>;
|
|
21
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SmartBackendBootstrapService>;
|
|
22
|
+
}
|
|
@@ -22,7 +22,6 @@ export declare class SmartSessionService implements OnDestroy {
|
|
|
22
22
|
isAuthenticated: boolean;
|
|
23
23
|
authenticationStateChanged: Subject<boolean>;
|
|
24
24
|
headerParams: Array<HeaderParam>;
|
|
25
|
-
headersUpdated: Subject<void>;
|
|
26
25
|
private localStorageLocaleName;
|
|
27
26
|
localeChanged: Subject<void>;
|
|
28
27
|
private initializeRunning;
|
|
@@ -8,10 +8,9 @@ import { GridOptions, SmartGrid, SmartGridComponent } from '../smart-grid/projec
|
|
|
8
8
|
import { SmartMapComponent } from '../smart-map/smart-map.component';
|
|
9
9
|
import { SmartTreeComponent, SmarttreeGenericService, SmarttreeService } from '../smart-tree/projects';
|
|
10
10
|
import { ComponentModel, ComponentModelChange, ExecuteUiActionOptions, SmartTranslateService, SmartViewContextService, UiAction, UiActionAdditionalParams, UiActionDescriptorService, UiActionModel, UiActionRequest, UiActionService, UiActionSpecificDemandResponse, UiActionToolbarComponent, UseUiAction2 } from '../view-context/projects';
|
|
11
|
-
import {
|
|
11
|
+
import { SmartBackendBootstrapService } from '../session/smart-backend-bootstrap.service';
|
|
12
12
|
export declare abstract class SmartComponentApiClient<T> implements UseUiAction2 {
|
|
13
13
|
protected inject: Injector;
|
|
14
|
-
protected auth: SmartAuthenticationServiceInterface;
|
|
15
14
|
protected pageName?: string | undefined;
|
|
16
15
|
protected _componentName?: string | undefined;
|
|
17
16
|
protected element?: ElementRef<any> | undefined;
|
|
@@ -33,6 +32,7 @@ export declare abstract class SmartComponentApiClient<T> implements UseUiAction2
|
|
|
33
32
|
dataChanged: Subject<void>;
|
|
34
33
|
smartGrid?: SmartGrid;
|
|
35
34
|
protected viewContext: SmartViewContextService;
|
|
35
|
+
protected bootstrap: SmartBackendBootstrapService;
|
|
36
36
|
protected uiActionService: UiActionService;
|
|
37
37
|
protected uiActionDescriptorService: UiActionDescriptorService;
|
|
38
38
|
protected translate?: SmartTranslateService;
|
|
@@ -50,7 +50,7 @@ export declare abstract class SmartComponentApiClient<T> implements UseUiAction2
|
|
|
50
50
|
protected dataChangeActionHandlers: Map<SmartformComponent, Subscription[]>;
|
|
51
51
|
protected filterModelChangeSubjects: Map<string, Subject<void>>;
|
|
52
52
|
protected changeDetector?: ChangeDetectorRef;
|
|
53
|
-
constructor(inject: Injector,
|
|
53
|
+
constructor(inject: Injector, pageName?: string | undefined, _componentName?: string | undefined, element?: ElementRef<any> | undefined, renderer?: Renderer2 | undefined);
|
|
54
54
|
_ngOnInit(): void;
|
|
55
55
|
_ngOnDestroy(): void;
|
|
56
56
|
_ngAfterViewInit(): void;
|
|
@@ -79,7 +79,7 @@ export declare abstract class SmartComponentApiClient<T> implements UseUiAction2
|
|
|
79
79
|
initData(): void;
|
|
80
80
|
initActions(): void;
|
|
81
81
|
setupAllToolbars(toolbars: UiActionToolbarComponent[], toolbarsWithoutId: UiActionToolbarComponent[], toolbarModels: Map<string, UiActionModel[]>): Promise<void>;
|
|
82
|
-
run(): void
|
|
82
|
+
run(): Promise<void>;
|
|
83
83
|
load(): Promise<void>;
|
|
84
84
|
executeUiAction(uiAction: UiAction, options?: ExecuteUiActionOptions): Promise<void>;
|
|
85
85
|
addDataChangeActionHandler(key: string, valueChangeMode: ValueChangeMode): void;
|
|
@@ -6,7 +6,6 @@ import { SmartGridComponent } from '../smart-grid/projects';
|
|
|
6
6
|
import { SmartMapComponent } from '../smart-map/smart-map.component';
|
|
7
7
|
import { SmartTreeComponent } from '../smart-tree/projects';
|
|
8
8
|
import { UiActionToolbarComponent } from '../view-context/projects';
|
|
9
|
-
import { SmartAuthenticationServiceInterface } from './smart-authentication.service';
|
|
10
9
|
import { SmartComponentApiClient } from './smart-component-api-client';
|
|
11
10
|
import { SmartDiagramComponent } from '../smart-diagram/projects';
|
|
12
11
|
import * as i0 from "@angular/core";
|
|
@@ -19,7 +18,7 @@ export declare abstract class SmartComponent<T> extends SmartComponentApiClient<
|
|
|
19
18
|
smartUiActionToolbarsQL: QueryList<UiActionToolbarComponent>;
|
|
20
19
|
smartMapQL: QueryList<SmartMapComponent>;
|
|
21
20
|
smartDiagramQL: QueryList<SmartDiagramComponent>;
|
|
22
|
-
constructor(inject: Injector,
|
|
21
|
+
constructor(inject: Injector, pageName?: string, _componentName?: string, element?: ElementRef, renderer?: Renderer2);
|
|
23
22
|
ngOnInit(): void;
|
|
24
23
|
ngOnDestroy(): void;
|
|
25
24
|
ngAfterViewInit(): void;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AfterViewInit, Injector, OnDestroy, OnInit, QueryList } from '@angular/core';
|
|
2
|
-
import { SmartAuthenticationServiceInterface } from './smart-authentication.service';
|
|
3
2
|
import { SmartComponentApiClient } from './smart-component-api-client';
|
|
4
3
|
import { SmartformComponent } from '../smart-form/projects';
|
|
5
4
|
import { SmartGridComponent } from '../smart-grid/projects';
|
|
@@ -15,7 +14,7 @@ export declare abstract class SmartService<T> extends SmartComponentApiClient<T>
|
|
|
15
14
|
smartComponentLayoutsQL: QueryList<SmartComponentLayoutComponent>;
|
|
16
15
|
smartFilterEditorContentComponentsQL: QueryList<SmartFilterEditorContentComponent>;
|
|
17
16
|
smartUiActionToolbarsQL: QueryList<UiActionToolbarComponent>;
|
|
18
|
-
constructor(inject: Injector,
|
|
17
|
+
constructor(inject: Injector, pageName: string);
|
|
19
18
|
ngOnInit(): void;
|
|
20
19
|
ngOnDestroy(): void;
|
|
21
20
|
ngAfterViewInit(): void;
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { Subject } from 'rxjs';
|
|
3
|
-
import { SmartSubject } from '../smart-subject/projects';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export class SmartAuthService {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.bffApisHaveBeenSetUp = false;
|
|
8
|
-
this._destroy$ = new Subject();
|
|
9
|
-
this.headersUpdated = new SmartSubject(this._destroy$);
|
|
10
|
-
}
|
|
11
|
-
ngOnDestroy() {
|
|
12
|
-
this._destroy$.next();
|
|
13
|
-
this._destroy$.complete();
|
|
14
|
-
}
|
|
15
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartAuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
16
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartAuthService }); }
|
|
17
|
-
}
|
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartAuthService, decorators: [{
|
|
19
|
-
type: Injectable
|
|
20
|
-
}] });
|
|
21
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnQtYXV0aGVudGljYXRpb24uc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3NtYXJ0LW5nLWNsaWVudC9zcmMvbGliL3NtYXJ0LWNsaWVudC9zbWFydC1hdXRoZW50aWNhdGlvbi5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQWEsTUFBTSxlQUFlLENBQUM7QUFDdEQsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUMvQixPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sMkJBQTJCLENBQUM7O0FBUXpELE1BQU0sT0FBTyxnQkFBZ0I7SUFEN0I7UUFFR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6IFN1YmplY3Q8dm9pZD4gPSBuZXcgU21hcnRTdWJqZWN0KHRoaXMuX2Rlc3Ryb3kkKTtcbiAgbmdPbkRlc3Ryb3koKTogdm9pZCB7XG4gICAgdGhpcy5fZGVzdHJveSQubmV4dCgpO1xuICAgIHRoaXMuX2Rlc3Ryb3kkLmNvbXBsZXRlKCk7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { OnDestroy } from '@angular/core';
|
|
2
|
-
import { Subject } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export interface SmartAuthenticationServiceInterface {
|
|
5
|
-
bffApisHaveBeenSetUp: boolean;
|
|
6
|
-
headersUpdated: Subject<void>;
|
|
7
|
-
}
|
|
8
|
-
export declare class SmartAuthService implements SmartAuthenticationServiceInterface, OnDestroy {
|
|
9
|
-
bffApisHaveBeenSetUp: boolean;
|
|
10
|
-
private _destroy$;
|
|
11
|
-
headersUpdated: Subject<void>;
|
|
12
|
-
ngOnDestroy(): void;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SmartAuthService, never>;
|
|
14
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<SmartAuthService>;
|
|
15
|
-
}
|
|
Binary file
|