@techextensor/tab-sdk 0.0.41 → 0.0.43
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/README.md +24 -24
- package/fesm2022/techextensor-tab-sdk.mjs +770 -48
- package/fesm2022/techextensor-tab-sdk.mjs.map +1 -1
- package/lib/interface/state.interface.d.ts +151 -0
- package/lib/model/component-state.model.d.ts +63 -0
- package/lib/model/query-state.model.d.ts +37 -0
- package/lib/model/screen-state.model.d.ts +56 -0
- package/lib/model/script-state.model.d.ts +21 -0
- package/lib/state/state.service.d.ts +101 -0
- package/lib/tab-sdk.service.d.ts +4 -0
- package/lib/ui/ui.service.d.ts +5 -5
- package/lib/workflow/workflow.service.d.ts +8 -0
- package/package.json +2 -4
- package/public-api.d.ts +1 -0
- package/esm2022/lib/app/analytics.service.mjs +0 -51
- package/esm2022/lib/app/app.service.mjs +0 -175
- package/esm2022/lib/app/file.service.mjs +0 -84
- package/esm2022/lib/app/release.service.mjs +0 -38
- package/esm2022/lib/app/report.service.mjs +0 -48
- package/esm2022/lib/app/translator.service.mjs +0 -77
- package/esm2022/lib/auth/auth.service.mjs +0 -95
- package/esm2022/lib/crud/crud.service.mjs +0 -191
- package/esm2022/lib/enum/store.enum.mjs +0 -6
- package/esm2022/lib/enum/ui.enum.mjs +0 -13
- package/esm2022/lib/http/http.service.mjs +0 -58
- package/esm2022/lib/interface/http.interface.mjs +0 -2
- package/esm2022/lib/interface/ui.interface.mjs +0 -2
- package/esm2022/lib/store/store.service.mjs +0 -829
- package/esm2022/lib/tab-sdk.service.mjs +0 -84
- package/esm2022/lib/ui/form.service.mjs +0 -79
- package/esm2022/lib/ui/ui.service.mjs +0 -344
- package/esm2022/lib/util/util.service.mjs +0 -54
- package/esm2022/lib/workflow/transition.service.mjs +0 -40
- package/esm2022/public-api.mjs +0 -9
- package/esm2022/techextensor-tab-sdk.mjs +0 -5
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* State SDK Interfaces
|
|
3
|
+
* Provides type definitions for accessing application state through TabSdk.state
|
|
4
|
+
*/
|
|
5
|
+
export interface GlobalState {
|
|
6
|
+
readonly User: UserState;
|
|
7
|
+
readonly App: AppState;
|
|
8
|
+
readonly Tenant: TenantState;
|
|
9
|
+
readonly Environment: EnvironmentState;
|
|
10
|
+
}
|
|
11
|
+
export interface UserState {
|
|
12
|
+
readonly Id: string;
|
|
13
|
+
readonly UserName: string;
|
|
14
|
+
readonly PersonData: any;
|
|
15
|
+
readonly Roles: Record<string, any>;
|
|
16
|
+
readonly Teams: any[] | null;
|
|
17
|
+
readonly Attributes: Record<string, any>;
|
|
18
|
+
readonly MailingAddress: any | null;
|
|
19
|
+
readonly Locale: any | null;
|
|
20
|
+
readonly DefaultTenantId: string;
|
|
21
|
+
readonly DefaultAppId: string;
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}
|
|
24
|
+
export interface AppState {
|
|
25
|
+
readonly Id: string;
|
|
26
|
+
readonly AppName: string;
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
}
|
|
29
|
+
export interface TenantState {
|
|
30
|
+
readonly Id: string;
|
|
31
|
+
readonly OrganizationName: string;
|
|
32
|
+
readonly TenantCode: string;
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
}
|
|
35
|
+
export interface EnvironmentState {
|
|
36
|
+
readonly Id: string;
|
|
37
|
+
readonly Name: string;
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
}
|
|
40
|
+
export interface RendererData {
|
|
41
|
+
readonly data: any;
|
|
42
|
+
readonly screenRenderingMode: string;
|
|
43
|
+
readonly rendererName: string;
|
|
44
|
+
readonly reqtokens: any;
|
|
45
|
+
readonly instance: any;
|
|
46
|
+
}
|
|
47
|
+
export interface StateSearchResult {
|
|
48
|
+
screens: IScreenStateModel[];
|
|
49
|
+
components: IComponentStateModel[];
|
|
50
|
+
queries: IQueryStateModel[];
|
|
51
|
+
scripts: IScriptStateModel[];
|
|
52
|
+
}
|
|
53
|
+
export interface IScreenStateModel {
|
|
54
|
+
readonly screenId: string;
|
|
55
|
+
readonly parentScreenId: string | undefined;
|
|
56
|
+
readonly screenMetadata: any;
|
|
57
|
+
readonly form: any;
|
|
58
|
+
readonly renderer: RendererData;
|
|
59
|
+
components(filterFn?: (comp: IComponentStateModel) => boolean): IComponentStateModel[];
|
|
60
|
+
component(key: string): IComponentStateModel | null;
|
|
61
|
+
queries(filterFn?: (query: IQueryStateModel) => boolean): IQueryStateModel[];
|
|
62
|
+
query(nameOrId: string): IQueryStateModel | null;
|
|
63
|
+
scripts(filterFn?: (script: IScriptStateModel) => boolean): IScriptStateModel[];
|
|
64
|
+
script(name: string): IScriptStateModel | null;
|
|
65
|
+
}
|
|
66
|
+
export interface IComponentStateModel {
|
|
67
|
+
readonly key: string;
|
|
68
|
+
readonly type: string;
|
|
69
|
+
readonly properties: any;
|
|
70
|
+
readonly value: any;
|
|
71
|
+
readonly instance: any;
|
|
72
|
+
readonly screen: string;
|
|
73
|
+
readonly instanceCount: number;
|
|
74
|
+
readonly isSingleInstance: boolean;
|
|
75
|
+
getInstance(index: number): {
|
|
76
|
+
value: any;
|
|
77
|
+
instance: any;
|
|
78
|
+
} | null;
|
|
79
|
+
getValues(): any[];
|
|
80
|
+
getInstances(): any[];
|
|
81
|
+
setValue(value: any, instanceIndex?: number): void;
|
|
82
|
+
getProperty(path: string): any;
|
|
83
|
+
getScreen(): IScreenStateModel | IDesigningScreenStateModel | null;
|
|
84
|
+
}
|
|
85
|
+
export interface IQueryStateModel {
|
|
86
|
+
readonly ID: string;
|
|
87
|
+
readonly ObjectID: string | null;
|
|
88
|
+
readonly ObjectID_Tosave: string;
|
|
89
|
+
readonly QueryName: string;
|
|
90
|
+
readonly DisplayName: string;
|
|
91
|
+
readonly FilterLogic: string | null;
|
|
92
|
+
readonly Fields: any[];
|
|
93
|
+
readonly Filters: any;
|
|
94
|
+
readonly Sort: any[];
|
|
95
|
+
readonly Parameters: any[];
|
|
96
|
+
readonly RequestId: string;
|
|
97
|
+
readonly screen: string;
|
|
98
|
+
execute(reqtokens?: any, params?: any, useDefaultHeaders?: boolean, customHeaders?: any): Promise<any>;
|
|
99
|
+
getScreen(): IScreenStateModel | null;
|
|
100
|
+
}
|
|
101
|
+
export interface IScriptStateModel {
|
|
102
|
+
readonly ID: string;
|
|
103
|
+
readonly Name: string;
|
|
104
|
+
readonly Type: number;
|
|
105
|
+
readonly Content: string;
|
|
106
|
+
readonly screen: string;
|
|
107
|
+
getScreen(): IScreenStateModel | null;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Designing Screen Model Interface
|
|
111
|
+
* Represents a screen being edited in Screen Designer (not rendered)
|
|
112
|
+
* Similar to IScreenStateModel but without renderer and scripts
|
|
113
|
+
*/
|
|
114
|
+
export interface IDesigningScreenStateModel {
|
|
115
|
+
readonly screenId: string;
|
|
116
|
+
readonly screenMetadata: any;
|
|
117
|
+
readonly form: any;
|
|
118
|
+
components(filterFn?: (comp: IDesigningComponentStateModel) => boolean): IDesigningComponentStateModel[];
|
|
119
|
+
component(key: string): IDesigningComponentStateModel | null;
|
|
120
|
+
queries(filterFn?: (query: IQueryStateModel) => boolean): IQueryStateModel[];
|
|
121
|
+
query(nameOrId: string): IQueryStateModel | null;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Designing Component Model Interface
|
|
125
|
+
* Represents a component in a designing screen (no value or instance)
|
|
126
|
+
*/
|
|
127
|
+
export interface IDesigningComponentStateModel {
|
|
128
|
+
readonly key: string;
|
|
129
|
+
readonly type: string;
|
|
130
|
+
readonly properties: any;
|
|
131
|
+
readonly screen: string;
|
|
132
|
+
getProperty(path: string): any;
|
|
133
|
+
getScreen(): IDesigningScreenStateModel | null;
|
|
134
|
+
}
|
|
135
|
+
export interface IStateSdkService {
|
|
136
|
+
readonly global: GlobalState;
|
|
137
|
+
getScreen(nameOrId: string): IScreenStateModel | null;
|
|
138
|
+
getScreens(filterFn?: (screen: IScreenStateModel) => boolean): IScreenStateModel[];
|
|
139
|
+
hasScreen(nameOrId: string): boolean;
|
|
140
|
+
getDesigningScreen(nameOrId: string): IDesigningScreenStateModel | null;
|
|
141
|
+
getDesigningScreens(filterFn?: (screen: IDesigningScreenStateModel) => boolean): IDesigningScreenStateModel[];
|
|
142
|
+
hasDesigningScreen(nameOrId: string): boolean;
|
|
143
|
+
getComponent(key: string, screenNameOrId?: string): IComponentStateModel | null;
|
|
144
|
+
getComponents(filterFn?: (comp: IComponentStateModel) => boolean): IComponentStateModel[];
|
|
145
|
+
hasComponent(key: string, screenNameOrId?: string): boolean;
|
|
146
|
+
getQuery(nameOrId: string, screenNameOrId?: string): IQueryStateModel | null;
|
|
147
|
+
getQueries(filterFn?: (query: IQueryStateModel) => boolean): IQueryStateModel[];
|
|
148
|
+
getScript(name: string, screenNameOrId?: string): IScriptStateModel | null;
|
|
149
|
+
getScripts(filterFn?: (script: IScriptStateModel) => boolean): IScriptStateModel[];
|
|
150
|
+
search(term: string): StateSearchResult;
|
|
151
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { IComponentStateModel, IDesigningComponentStateModel, IScreenStateModel, IDesigningScreenStateModel } from '../interface/state.interface';
|
|
2
|
+
/**
|
|
3
|
+
* ComponentStateModel
|
|
4
|
+
* Provides access to component state data including value, properties, and instance
|
|
5
|
+
* Handles both single and multi-instance components
|
|
6
|
+
* Supports both runtime and designing modes via _isDesigning flag
|
|
7
|
+
*/
|
|
8
|
+
export declare class ComponentStateModel implements IComponentStateModel, IDesigningComponentStateModel {
|
|
9
|
+
private _screenId;
|
|
10
|
+
private _key;
|
|
11
|
+
private _data;
|
|
12
|
+
private _stateSdk;
|
|
13
|
+
private _isDesigning;
|
|
14
|
+
constructor(_screenId: string, _key: string, _data: any, _stateSdk: any, _isDesigning?: boolean);
|
|
15
|
+
get key(): string;
|
|
16
|
+
get type(): string;
|
|
17
|
+
get properties(): any;
|
|
18
|
+
get value(): any;
|
|
19
|
+
get instance(): any;
|
|
20
|
+
get screen(): string;
|
|
21
|
+
/**
|
|
22
|
+
* Check if this is a designing component
|
|
23
|
+
*/
|
|
24
|
+
get isDesigning(): boolean;
|
|
25
|
+
get instanceCount(): number;
|
|
26
|
+
get isSingleInstance(): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Get a specific instance by index
|
|
29
|
+
* @param index - Instance index (0-based)
|
|
30
|
+
* @returns Object with value and instance, or null if index out of bounds or designing mode
|
|
31
|
+
*/
|
|
32
|
+
getInstance(index: number): {
|
|
33
|
+
value: any;
|
|
34
|
+
instance: any;
|
|
35
|
+
} | null;
|
|
36
|
+
/**
|
|
37
|
+
* Get all values as array (always returns array, even for single instance)
|
|
38
|
+
* Returns empty array for designing components
|
|
39
|
+
*/
|
|
40
|
+
getValues(): any[];
|
|
41
|
+
/**
|
|
42
|
+
* Get all instances as array (always returns array, even for single instance)
|
|
43
|
+
* Returns empty array for designing components
|
|
44
|
+
*/
|
|
45
|
+
getInstances(): any[];
|
|
46
|
+
/**
|
|
47
|
+
* Set component value
|
|
48
|
+
* @param value - New value to set
|
|
49
|
+
* @param instanceIndex - Optional instance index (for multi-instance)
|
|
50
|
+
* Note: Does nothing for designing components
|
|
51
|
+
*/
|
|
52
|
+
setValue(value: any, instanceIndex?: number): void;
|
|
53
|
+
/**
|
|
54
|
+
* Safely get a nested property from component properties
|
|
55
|
+
* @param path - Dot-notation path (e.g., 'validate.required')
|
|
56
|
+
* @returns Property value or undefined
|
|
57
|
+
*/
|
|
58
|
+
getProperty(path: string): any;
|
|
59
|
+
/**
|
|
60
|
+
* Get the parent screen model
|
|
61
|
+
*/
|
|
62
|
+
getScreen(): IScreenStateModel | IDesigningScreenStateModel | null;
|
|
63
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { IQueryStateModel, IScreenStateModel } from '../interface/state.interface';
|
|
2
|
+
/**
|
|
3
|
+
* QueryStateModel
|
|
4
|
+
* Provides access to query state data with all properties from state
|
|
5
|
+
*/
|
|
6
|
+
export declare class QueryStateModel implements IQueryStateModel {
|
|
7
|
+
private _screenId;
|
|
8
|
+
private _name;
|
|
9
|
+
private _data;
|
|
10
|
+
private _stateSdk;
|
|
11
|
+
constructor(_screenId: string, _name: string, _data: any, _stateSdk: any);
|
|
12
|
+
get ID(): string;
|
|
13
|
+
get ObjectID(): string | null;
|
|
14
|
+
get ObjectID_Tosave(): string;
|
|
15
|
+
get QueryName(): string;
|
|
16
|
+
get DisplayName(): string;
|
|
17
|
+
get FilterLogic(): string | null;
|
|
18
|
+
get Fields(): any[];
|
|
19
|
+
get Filters(): any;
|
|
20
|
+
get Sort(): any[];
|
|
21
|
+
get Parameters(): any[];
|
|
22
|
+
get RequestId(): string;
|
|
23
|
+
get screen(): string;
|
|
24
|
+
/**
|
|
25
|
+
* Execute the query and get data
|
|
26
|
+
* @param reqtokens - Request tokens to include in the payload
|
|
27
|
+
* @param params - Additional parameters to include in the payload
|
|
28
|
+
* @param useDefaultHeaders - Whether to use default headers
|
|
29
|
+
* @param customHeaders - Custom headers to merge with default/final headers
|
|
30
|
+
* @returns Promise that resolves to the query result
|
|
31
|
+
*/
|
|
32
|
+
execute(reqtokens?: any, params?: any, useDefaultHeaders?: boolean, customHeaders?: any): Promise<any>;
|
|
33
|
+
/**
|
|
34
|
+
* Get the parent screen model
|
|
35
|
+
*/
|
|
36
|
+
getScreen(): IScreenStateModel | null;
|
|
37
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { IScreenStateModel, IDesigningScreenStateModel, IComponentStateModel, IQueryStateModel, IScriptStateModel, RendererData } from '../interface/state.interface';
|
|
2
|
+
/**
|
|
3
|
+
* ScreenStateModel
|
|
4
|
+
* Provides access to screen state data including components, queries, and scripts
|
|
5
|
+
* Supports both runtime screens and designing screens via _isDesigning flag
|
|
6
|
+
*/
|
|
7
|
+
export declare class ScreenStateModel implements IScreenStateModel, IDesigningScreenStateModel {
|
|
8
|
+
private _screenData;
|
|
9
|
+
private _stateService;
|
|
10
|
+
private _stateSdk;
|
|
11
|
+
private _isDesigning;
|
|
12
|
+
constructor(_screenData: any, _stateService: any, _stateSdk: any, _isDesigning?: boolean);
|
|
13
|
+
get screenId(): string;
|
|
14
|
+
get parentScreenId(): string | undefined;
|
|
15
|
+
get screenMetadata(): any;
|
|
16
|
+
get form(): any;
|
|
17
|
+
get renderer(): RendererData;
|
|
18
|
+
/**
|
|
19
|
+
* Check if this is a designing screen
|
|
20
|
+
*/
|
|
21
|
+
get isDesigning(): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Get screen state data based on mode (runtime vs designing)
|
|
24
|
+
*/
|
|
25
|
+
private getScreenState;
|
|
26
|
+
/**
|
|
27
|
+
* Get all components in this screen
|
|
28
|
+
* @param filterFn - Optional filter function
|
|
29
|
+
*/
|
|
30
|
+
components(filterFn?: (comp: IComponentStateModel) => boolean): IComponentStateModel[];
|
|
31
|
+
/**
|
|
32
|
+
* Get a specific component by key
|
|
33
|
+
* @param key - Component key
|
|
34
|
+
*/
|
|
35
|
+
component(key: string): IComponentStateModel | null;
|
|
36
|
+
/**
|
|
37
|
+
* Get all queries in this screen
|
|
38
|
+
* @param filterFn - Optional filter function
|
|
39
|
+
*/
|
|
40
|
+
queries(filterFn?: (query: IQueryStateModel) => boolean): IQueryStateModel[];
|
|
41
|
+
/**
|
|
42
|
+
* Get a specific query by name or ID
|
|
43
|
+
* @param nameOrId - Query name or ID
|
|
44
|
+
*/
|
|
45
|
+
query(nameOrId: string): IQueryStateModel | null;
|
|
46
|
+
/**
|
|
47
|
+
* Get all scripts in this screen
|
|
48
|
+
* @param filterFn - Optional filter function
|
|
49
|
+
*/
|
|
50
|
+
scripts(filterFn?: (script: IScriptStateModel) => boolean): IScriptStateModel[];
|
|
51
|
+
/**
|
|
52
|
+
* Get a specific script by name
|
|
53
|
+
* @param name - Script name
|
|
54
|
+
*/
|
|
55
|
+
script(name: string): IScriptStateModel | null;
|
|
56
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IScriptStateModel, IScreenStateModel } from '../interface/state.interface';
|
|
2
|
+
/**
|
|
3
|
+
* ScriptStateModel
|
|
4
|
+
* Provides access to script state data with all properties from state
|
|
5
|
+
*/
|
|
6
|
+
export declare class ScriptStateModel implements IScriptStateModel {
|
|
7
|
+
private _screenId;
|
|
8
|
+
private _name;
|
|
9
|
+
private _data;
|
|
10
|
+
private _stateSdk;
|
|
11
|
+
constructor(_screenId: string, _name: string, _data: any, _stateSdk: any);
|
|
12
|
+
get ID(): string;
|
|
13
|
+
get Name(): string;
|
|
14
|
+
get Type(): number;
|
|
15
|
+
get Content(): string;
|
|
16
|
+
get screen(): string;
|
|
17
|
+
/**
|
|
18
|
+
* Get the parent screen model
|
|
19
|
+
*/
|
|
20
|
+
getScreen(): IScreenStateModel | null;
|
|
21
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { GlobalState, IStateSdkService, IScreenStateModel, IComponentStateModel, IQueryStateModel, IScriptStateModel, IDesigningScreenStateModel, StateSearchResult } from '../interface/state.interface';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* StateSdkService
|
|
5
|
+
* Provides access to application state through TabSdk.state
|
|
6
|
+
* Follows the same patterns as MetadataHelper
|
|
7
|
+
*/
|
|
8
|
+
export declare class StateSdkService implements IStateSdkService {
|
|
9
|
+
private _stateService;
|
|
10
|
+
/**
|
|
11
|
+
* Initialize with StateService from main app
|
|
12
|
+
* @param stateService - StateService instance from main application
|
|
13
|
+
*/
|
|
14
|
+
init(stateService: any): void;
|
|
15
|
+
/**
|
|
16
|
+
* Get global state (User, App, Tenant, Environment)
|
|
17
|
+
*/
|
|
18
|
+
get global(): GlobalState;
|
|
19
|
+
/**
|
|
20
|
+
* Get a screen by its ID or name
|
|
21
|
+
* @param nameOrId - Screen ID (GUID) or screen name
|
|
22
|
+
* @returns ScreenStateModel or null if not found
|
|
23
|
+
*/
|
|
24
|
+
getScreen(nameOrId: string): IScreenStateModel | null;
|
|
25
|
+
/**
|
|
26
|
+
* Get all screens, optionally filtered
|
|
27
|
+
* @param filterFn - Optional filter function
|
|
28
|
+
* @returns Array of ScreenStateModel
|
|
29
|
+
*/
|
|
30
|
+
getScreens(filterFn?: (screen: IScreenStateModel) => boolean): IScreenStateModel[];
|
|
31
|
+
/**
|
|
32
|
+
* Check if a screen exists in state
|
|
33
|
+
* @param nameOrId - Screen ID or name
|
|
34
|
+
*/
|
|
35
|
+
hasScreen(nameOrId: string): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Get a designing screen by its ID or name
|
|
38
|
+
* @param nameOrId - Screen ID (GUID) or screen name
|
|
39
|
+
* @returns ScreenStateModel (in designing mode) or null if not found
|
|
40
|
+
*/
|
|
41
|
+
getDesigningScreen(nameOrId: string): IDesigningScreenStateModel | null;
|
|
42
|
+
/**
|
|
43
|
+
* Get all designing screens, optionally filtered
|
|
44
|
+
* @param filterFn - Optional filter function
|
|
45
|
+
* @returns Array of ScreenStateModel (in designing mode)
|
|
46
|
+
*/
|
|
47
|
+
getDesigningScreens(filterFn?: (screen: IDesigningScreenStateModel) => boolean): IDesigningScreenStateModel[];
|
|
48
|
+
/**
|
|
49
|
+
* Check if a designing screen exists in state
|
|
50
|
+
* @param nameOrId - Screen ID or name
|
|
51
|
+
*/
|
|
52
|
+
hasDesigningScreen(nameOrId: string): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Get a component by key, optionally from a specific screen
|
|
55
|
+
* @param key - Component key
|
|
56
|
+
* @param screenNameOrId - Optional screen to search in (for collisions)
|
|
57
|
+
* @returns ComponentStateModel or null if not found
|
|
58
|
+
*/
|
|
59
|
+
getComponent(key: string, screenNameOrId?: string): IComponentStateModel | null;
|
|
60
|
+
/**
|
|
61
|
+
* Get all components across all screens, optionally filtered
|
|
62
|
+
* @param filterFn - Optional filter function
|
|
63
|
+
* @returns Array of ComponentStateModel
|
|
64
|
+
*/
|
|
65
|
+
getComponents(filterFn?: (comp: IComponentStateModel) => boolean): IComponentStateModel[];
|
|
66
|
+
/**
|
|
67
|
+
* Check if a component exists
|
|
68
|
+
* @param key - Component key
|
|
69
|
+
* @param screenNameOrId - Optional screen to check in
|
|
70
|
+
*/
|
|
71
|
+
hasComponent(key: string, screenNameOrId?: string): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Get a query by ID or name, optionally from a specific screen
|
|
74
|
+
* @param nameOrId - Query ID, QueryName, or DisplayName
|
|
75
|
+
* @param screenNameOrId - Optional screen to search in
|
|
76
|
+
*/
|
|
77
|
+
getQuery(nameOrId: string, screenNameOrId?: string): IQueryStateModel | null;
|
|
78
|
+
/**
|
|
79
|
+
* Get all queries across all screens, optionally filtered
|
|
80
|
+
* @param filterFn - Optional filter function
|
|
81
|
+
*/
|
|
82
|
+
getQueries(filterFn?: (query: IQueryStateModel) => boolean): IQueryStateModel[];
|
|
83
|
+
/**
|
|
84
|
+
* Get a script by name, optionally from a specific screen
|
|
85
|
+
* @param name - Script name
|
|
86
|
+
* @param screenNameOrId - Optional screen to search in
|
|
87
|
+
*/
|
|
88
|
+
getScript(name: string, screenNameOrId?: string): IScriptStateModel | null;
|
|
89
|
+
/**
|
|
90
|
+
* Get all scripts across all screens, optionally filtered
|
|
91
|
+
* @param filterFn - Optional filter function
|
|
92
|
+
*/
|
|
93
|
+
getScripts(filterFn?: (script: IScriptStateModel) => boolean): IScriptStateModel[];
|
|
94
|
+
/**
|
|
95
|
+
* Search across all state entities
|
|
96
|
+
* @param term - Search term
|
|
97
|
+
*/
|
|
98
|
+
search(term: string): StateSearchResult;
|
|
99
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StateSdkService, never>;
|
|
100
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<StateSdkService>;
|
|
101
|
+
}
|
package/lib/tab-sdk.service.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ import { TranslatorService } from './app/translator.service';
|
|
|
13
13
|
import { CrudService } from './crud/crud.service';
|
|
14
14
|
import { HttpService } from './http/http.service';
|
|
15
15
|
import { StoreService } from './store/store.service';
|
|
16
|
+
import { StateSdkService } from './state/state.service';
|
|
17
|
+
import { WorkflowService } from './workflow/workflow.service';
|
|
16
18
|
import * as i0 from "@angular/core";
|
|
17
19
|
export declare class TabSdk {
|
|
18
20
|
static app: AppService;
|
|
@@ -29,7 +31,9 @@ export declare class TabSdk {
|
|
|
29
31
|
static crud: CrudService;
|
|
30
32
|
static http: HttpService;
|
|
31
33
|
static store: StoreService;
|
|
34
|
+
static workflow: WorkflowService;
|
|
32
35
|
static util: any;
|
|
36
|
+
static state: StateSdkService;
|
|
33
37
|
/**
|
|
34
38
|
* Initialize the SDK with necessary services
|
|
35
39
|
*/
|
package/lib/ui/ui.service.d.ts
CHANGED
|
@@ -68,31 +68,31 @@ export declare class UiService {
|
|
|
68
68
|
*
|
|
69
69
|
* @param options The options for the notification.
|
|
70
70
|
*/
|
|
71
|
-
notify(options: NotificationOptions):
|
|
71
|
+
notify(options: NotificationOptions): any;
|
|
72
72
|
/**
|
|
73
73
|
* Displays a success notification to the user.
|
|
74
74
|
*
|
|
75
75
|
* @param options - The options for the notification, including message, title, and configuration.
|
|
76
76
|
*/
|
|
77
|
-
showSuccess(options: BaseNotificationOptions):
|
|
77
|
+
showSuccess(options: BaseNotificationOptions): any;
|
|
78
78
|
/**
|
|
79
79
|
* Displays a warning notification to the user.
|
|
80
80
|
*
|
|
81
81
|
* @param options - The options for the notification, including message, title, and configuration.
|
|
82
82
|
*/
|
|
83
|
-
showWarning(options: BaseNotificationOptions):
|
|
83
|
+
showWarning(options: BaseNotificationOptions): any;
|
|
84
84
|
/**
|
|
85
85
|
* Displays an info notification to the user.
|
|
86
86
|
*
|
|
87
87
|
* @param options - The options for the notification, including message, title, and configuration.
|
|
88
88
|
*/
|
|
89
|
-
showInfo(options: BaseNotificationOptions):
|
|
89
|
+
showInfo(options: BaseNotificationOptions): any;
|
|
90
90
|
/**
|
|
91
91
|
* Displays an error notification to the user.
|
|
92
92
|
*
|
|
93
93
|
* @param options - The options for the notification, including message, title, and configuration.
|
|
94
94
|
*/
|
|
95
|
-
showError(options: BaseNotificationOptions):
|
|
95
|
+
showError(options: BaseNotificationOptions): any;
|
|
96
96
|
/**
|
|
97
97
|
* Clears a notification by ID.
|
|
98
98
|
*
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { executeTABWorkflowPayload } from '@techextensor/tab-core-utility';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class WorkflowService {
|
|
4
|
+
private readonly tabWorkflowService;
|
|
5
|
+
executeTABWorkflow(payload: executeTABWorkflowPayload): Promise<any>;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WorkflowService, never>;
|
|
7
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WorkflowService>;
|
|
8
|
+
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@techextensor/tab-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.43",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^19.2.15",
|
|
6
6
|
"@angular/core": "^19.2.15",
|
|
7
|
-
"@techextensor/tab-core-utility": "^2.2.
|
|
7
|
+
"@techextensor/tab-core-utility": "^2.2.180"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"tslib": "^2.8.1"
|
|
@@ -21,8 +21,6 @@
|
|
|
21
21
|
},
|
|
22
22
|
".": {
|
|
23
23
|
"types": "./index.d.ts",
|
|
24
|
-
"esm2022": "./esm2022/techextensor-tab-sdk.mjs",
|
|
25
|
-
"esm": "./esm2022/techextensor-tab-sdk.mjs",
|
|
26
24
|
"default": "./fesm2022/techextensor-tab-sdk.mjs"
|
|
27
25
|
}
|
|
28
26
|
}
|
package/public-api.d.ts
CHANGED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { inject, Injectable } from '@angular/core';
|
|
2
|
-
import { AppHelper } from '@techextensor/tab-core-utility';
|
|
3
|
-
import { firstValueFrom } from 'rxjs';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export class AnalyticsService {
|
|
6
|
-
_appHelper = inject(AppHelper);
|
|
7
|
-
/**
|
|
8
|
-
* Retrieves the summary of performance analytics based on the provided payload.
|
|
9
|
-
*
|
|
10
|
-
* @param payload The performance analytics payload.
|
|
11
|
-
* @returns A promise that resolves to a common API response containing the performance analytics summary.
|
|
12
|
-
*/
|
|
13
|
-
async getSummaryOfPerformance(payload) {
|
|
14
|
-
const response = await firstValueFrom(this._appHelper.getSummaryOfPerformanceAnalytics(payload));
|
|
15
|
-
// Return the response from the server
|
|
16
|
-
return response;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Retrieves the detail of performance analytics based on the provided payload.
|
|
20
|
-
*
|
|
21
|
-
* @param payload The performance analytics payload.
|
|
22
|
-
* @returns A promise that resolves to a common API response containing the performance analytics detail.
|
|
23
|
-
*/
|
|
24
|
-
async getDetailOfPerformance(payload) {
|
|
25
|
-
// Use the firstValueFrom RxJs operator to wait for the observable to complete
|
|
26
|
-
const response = await firstValueFrom(this._appHelper.getDetailOfPerformanceAnalytics(payload));
|
|
27
|
-
// Return the response from the server
|
|
28
|
-
return response;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Inserts the screen performance statistics based on the provided payload.
|
|
32
|
-
*
|
|
33
|
-
* @param payload The screen performance payload containing the statistics to be inserted.
|
|
34
|
-
* @returns A promise that resolves to a common API response containing the result of the insertion.
|
|
35
|
-
*/
|
|
36
|
-
async insertScreenPerformance(payload) {
|
|
37
|
-
// Use the firstValueFrom RxJs operator to wait for the observable to complete
|
|
38
|
-
const response = await firstValueFrom(this._appHelper.insertScreenPerformanceStatistics(payload));
|
|
39
|
-
// Return the response from the server
|
|
40
|
-
return response;
|
|
41
|
-
}
|
|
42
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AnalyticsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
43
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AnalyticsService, providedIn: 'root' });
|
|
44
|
-
}
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AnalyticsService, decorators: [{
|
|
46
|
-
type: Injectable,
|
|
47
|
-
args: [{
|
|
48
|
-
providedIn: 'root'
|
|
49
|
-
}]
|
|
50
|
-
}] });
|
|
51
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5hbHl0aWNzLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90YWItc2RrL3NyYy9saWIvYXBwL2FuYWx5dGljcy5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ25ELE9BQU8sRUFBRSxTQUFTLEVBQTRFLE1BQU0sZ0NBQWdDLENBQUM7QUFDckksT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLE1BQU0sQ0FBQzs7QUFLdEMsTUFBTSxPQUFPLGdCQUFnQjtJQUNqQixVQUFVLEdBQWMsTUFBTSxDQUFDLFNBQVMsQ0FBQyxDQUFDO0lBRWxEOzs7OztPQUtHO0lBQ0gsS0FBSyxDQUFDLHVCQUF1QixDQUFDLE9BQW9DO1FBQzlELE1BQU0sUUFBUSxHQUFHLE1BQU0sY0FBYyxDQUNqQyxJQUFJLENBQUMsVUFBVSxDQUFDLGdDQUFnQyxDQUFDLE9BQU8sQ0FBQyxDQUM1RCxDQUFDO1FBQ0Ysc0NBQX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