@techextensor/tab-sdk 0.0.2 → 0.0.4

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.
@@ -0,0 +1,300 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, inject } from '@angular/core';
3
+ import { AuthService, MetadataHelper } from '@techextensor/tab-core-utility';
4
+ import { firstValueFrom } from 'rxjs';
5
+
6
+ var ScreenDisplayMode;
7
+ (function (ScreenDisplayMode) {
8
+ ScreenDisplayMode["Sidebar"] = "sidebar";
9
+ ScreenDisplayMode["Popup"] = "popup";
10
+ ScreenDisplayMode["SameTab"] = "sameTab";
11
+ ScreenDisplayMode["NewTab"] = "newTab";
12
+ ScreenDisplayMode["NavigationInSameTab"] = "navigationInSameTab";
13
+ ScreenDisplayMode["NavigationInNewTab"] = "navigationInNewTab";
14
+ })(ScreenDisplayMode || (ScreenDisplayMode = {}));
15
+ var NotificationType;
16
+ (function (NotificationType) {
17
+ NotificationType["Success"] = "success";
18
+ NotificationType["Warning"] = "warning";
19
+ NotificationType["Error"] = "error";
20
+ })(NotificationType || (NotificationType = {}));
21
+
22
+ class UiService {
23
+ _eventActionService = TabSdk.context?.EventActionService;
24
+ _tabUtilsService = TabSdk.context?.TabUtilsService;
25
+ _confirmationDialogService = TabSdk.context?.ConfirmationDialogService;
26
+ /**
27
+ * Open a screen with the given options. The mode determines how the screen is
28
+ * displayed.
29
+ *
30
+ * @param options The options for opening the screen.
31
+ */
32
+ openScreen(options) {
33
+ const { mode, screenId, reqtokens, submission, title, width, height, customClass } = options;
34
+ switch (mode) {
35
+ case ScreenDisplayMode.Sidebar:
36
+ this.showSidebar({ screenId, reqtokens, submission, title, width, height, customClass });
37
+ break;
38
+ case ScreenDisplayMode.Popup:
39
+ this.showDialog({ screenId, reqtokens, submission, title, width, height, customClass });
40
+ break;
41
+ case ScreenDisplayMode.SameTab:
42
+ case ScreenDisplayMode.NavigationInSameTab:
43
+ this.navigateTo({ screenId, reqtokens });
44
+ break;
45
+ case ScreenDisplayMode.NewTab:
46
+ case ScreenDisplayMode.NavigationInNewTab:
47
+ this.openInNewTab({ screenId, reqtokens });
48
+ break;
49
+ }
50
+ }
51
+ /**
52
+ * Opens a screen in a sidebar.
53
+ *
54
+ * @param options The options for opening the sidebar.
55
+ */
56
+ showSidebar(options) {
57
+ const otherConfiguration = {
58
+ ...(options.title && { title: options.title }),
59
+ ...(options.width && { width: options.width }),
60
+ ...(options.height && { height: options.height }),
61
+ ...(options.customClass && { customClass: options.customClass })
62
+ };
63
+ this._eventActionService.openScreen(ScreenDisplayMode.Sidebar, options.screenId, options.reqtokens || undefined, options.submission || undefined, Object.keys(otherConfiguration).length > 0 ? otherConfiguration : undefined);
64
+ }
65
+ /**
66
+ * Opens a screen in a popup dialog.
67
+ *
68
+ * @param options The options for opening the dialog.
69
+ */
70
+ showDialog(options) {
71
+ const otherConfiguration = {
72
+ ...(options.title && { title: options.title }),
73
+ ...(options.width && { width: options.width }),
74
+ ...(options.height && { height: options.height }),
75
+ ...(options.customClass && { customClass: options.customClass })
76
+ };
77
+ this._eventActionService.openScreen(ScreenDisplayMode.Popup, options.screenId, options.reqtokens || undefined, options.submission || undefined, Object.keys(otherConfiguration).length > 0 ? otherConfiguration : undefined);
78
+ }
79
+ /**
80
+ * Navigates to a screen within the same tab.
81
+ *
82
+ * @param options - The options for navigation, including screenId and optional reqtokens.
83
+ */
84
+ navigateTo(options) {
85
+ this._eventActionService.openScreen(ScreenDisplayMode.NavigationInSameTab, options.screenId, options.reqtokens || undefined);
86
+ }
87
+ /**
88
+ * Navigates to a screen in a new tab.
89
+ *
90
+ * @param options The options for navigation, including screenId and optional reqtokens.
91
+ */
92
+ openInNewTab(options) {
93
+ this._eventActionService.openScreen(ScreenDisplayMode.NavigationInNewTab, options.screenId, options.reqtokens || undefined);
94
+ }
95
+ /**
96
+ * Navigates to the specified URL.
97
+ *
98
+ * @param url - The URL to navigate to.
99
+ */
100
+ navigateToUrl(url) {
101
+ this._tabUtilsService.navigateToUrl({ Url: url });
102
+ }
103
+ /**
104
+ * Navigates to a specified subdomain using the provided options.
105
+ *
106
+ * @param options - The options for navigation, including subDomain, appCode, and url.
107
+ */
108
+ navigateToSubdomain(options) {
109
+ this._tabUtilsService.navigateToUrlWithSubdomain(options);
110
+ }
111
+ /**
112
+ * Show a notification to the user.
113
+ *
114
+ * @param options The options for the notification.
115
+ */
116
+ notify(options) {
117
+ this._tabUtilsService.notify(options);
118
+ }
119
+ /**
120
+ * Displays a success notification to the user.
121
+ *
122
+ * @param options - The options for the notification, including message, title, and configuration.
123
+ */
124
+ showSuccess(options) {
125
+ this.notify({ ...options, type: NotificationType.Success });
126
+ }
127
+ /**
128
+ * Displays a warning notification to the user.
129
+ *
130
+ * @param options - The options for the notification, including message, title, and configuration.
131
+ */
132
+ showWarning(options) {
133
+ this.notify({ ...options, type: NotificationType.Warning });
134
+ }
135
+ /**
136
+ * Displays an error notification to the user.
137
+ *
138
+ * @param options - The options for the notification, including message, title, and configuration.
139
+ */
140
+ showError(options) {
141
+ this.notify({ ...options, type: NotificationType.Error });
142
+ }
143
+ /**
144
+ * Displays a confirmation dialog to the user and returns a promise that resolves
145
+ * to a boolean indicating whether the user confirmed the action.
146
+ *
147
+ * @param options - The options for the confirmation dialog, including title, message,
148
+ * confirmText, cancelText, and visibility of buttons.
149
+ * @returns A promise that resolves to true if the user confirms, false otherwise.
150
+ */
151
+ confirm(options) {
152
+ return new Promise((resolve) => {
153
+ this._confirmationDialogService.confirm(options)
154
+ ?.subscribe((isConfirmed) => {
155
+ resolve(isConfirmed);
156
+ });
157
+ });
158
+ }
159
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
160
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UiService, providedIn: 'root' });
161
+ }
162
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UiService, decorators: [{
163
+ type: Injectable,
164
+ args: [{
165
+ providedIn: 'root'
166
+ }]
167
+ }] });
168
+
169
+ class AuthUtilService {
170
+ _authService = inject(AuthService);
171
+ /**
172
+ * Authenticates a user based on the provided login credentials.
173
+ *
174
+ * @param credentials The login credentials.
175
+ * @returns The response from the server.
176
+ */
177
+ async login(credentials) {
178
+ // Use the firstValueFrom RxJs operator to wait for the observable to complete
179
+ const response = await firstValueFrom(this._authService.signIn(credentials));
180
+ return response;
181
+ }
182
+ /**
183
+ * Registers a new tenant based on the provided details.
184
+ *
185
+ * @param tenantDetails The tenant details.
186
+ * @returns The response from the server.
187
+ */
188
+ async registerTenant(tenantDetails) {
189
+ // Use the firstValueFrom RxJs operator to wait for the observable to complete
190
+ const response = await firstValueFrom(this._authService.registerTenant(tenantDetails));
191
+ return response;
192
+ }
193
+ /**
194
+ * Registers a new user based on the provided user details.
195
+ *
196
+ * @param userDetails The user details.
197
+ * @param headers Optional headers to pass to the server.
198
+ * @returns The response from the server.
199
+ */
200
+ async registerUser(userDetails, headers) {
201
+ // Use the firstValueFrom RxJs operator to wait for the observable to complete
202
+ const response = await firstValueFrom(this._authService.register(userDetails, headers));
203
+ return response;
204
+ }
205
+ /**
206
+ * Resets a user's password based on the provided reset password credentials.
207
+ *
208
+ * @param credentials The reset password credentials.
209
+ * @returns The response from the server.
210
+ */
211
+ async resetPassword(credentials) {
212
+ // Use the firstValueFrom RxJs operator to wait for the observable to complete
213
+ const response = await firstValueFrom(this._authService.resetPassword(credentials));
214
+ return response;
215
+ }
216
+ /**
217
+ * Changes a user's password based on the provided credentials.
218
+ *
219
+ * @param credentials The credentials containing the user's current and new password.
220
+ * @returns The response from the server.
221
+ */
222
+ async changePassword(credentials) {
223
+ // Use the firstValueFrom RxJs operator to wait for the observable to complete
224
+ const response = await firstValueFrom(this._authService.changePassword(credentials));
225
+ return response;
226
+ }
227
+ /**
228
+ * Refreshes a user's token based on the provided refresh token details.
229
+ *
230
+ * @param tokenDetails The refresh token details.
231
+ * @returns The response from the server.
232
+ */
233
+ async refreshToken(tokenDetails) {
234
+ // Use the firstValueFrom RxJs operator to wait for the observable to complete
235
+ const response = await firstValueFrom(this._authService.refreshToken(tokenDetails));
236
+ return response;
237
+ }
238
+ /**
239
+ * Gets the user details for the provided user details request.
240
+ *
241
+ * @param userDetailsRequest The user details request.
242
+ * @param headers Optional headers to pass to the server.
243
+ * @returns The response from the server.
244
+ */
245
+ async getUserDetails(userDetailsRequest, headers) {
246
+ // Use the firstValueFrom RxJs operator to wait for the observable to complete
247
+ const response = await firstValueFrom(this._authService.getUserDetails(userDetailsRequest, headers));
248
+ return response;
249
+ }
250
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuthUtilService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
251
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuthUtilService, providedIn: 'root' });
252
+ }
253
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuthUtilService, decorators: [{
254
+ type: Injectable,
255
+ args: [{
256
+ providedIn: 'root'
257
+ }]
258
+ }] });
259
+
260
+ class TabSdk {
261
+ static auth;
262
+ static ui;
263
+ static metadataUtils;
264
+ static context;
265
+ /**
266
+ * Initialize the SDK with necessary services
267
+ */
268
+ static init(injector, context) {
269
+ // Expose to window for global access if needed
270
+ window.TabSdk = TabSdk;
271
+ // external services
272
+ this.context = context;
273
+ // Initialize services
274
+ this.auth = injector.get(AuthUtilService);
275
+ this.ui = injector.get(UiService);
276
+ this.metadataUtils = injector.get(MetadataHelper);
277
+ // Freeze the global object to prevent modifications
278
+ Object.freeze(this);
279
+ Object.freeze(this.context);
280
+ }
281
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TabSdk, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
282
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TabSdk, providedIn: 'root' });
283
+ }
284
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TabSdk, decorators: [{
285
+ type: Injectable,
286
+ args: [{
287
+ providedIn: 'root'
288
+ }]
289
+ }] });
290
+
291
+ /*
292
+ * Public API Surface of tab-sdk
293
+ */
294
+
295
+ /**
296
+ * Generated bundle index. Do not edit.
297
+ */
298
+
299
+ export { TabSdk };
300
+ //# sourceMappingURL=techextensor-tab-sdk.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"techextensor-tab-sdk.mjs","sources":["../../../projects/tab-sdk/src/lib/enums/ui.enum.ts","../../../projects/tab-sdk/src/lib/ui/ui.service.ts","../../../projects/tab-sdk/src/lib/auth/auth.service.ts","../../../projects/tab-sdk/src/lib/tab-sdk.service.ts","../../../projects/tab-sdk/src/public-api.ts","../../../projects/tab-sdk/src/techextensor-tab-sdk.ts"],"sourcesContent":["export enum ScreenDisplayMode {\n Sidebar = 'sidebar',\n Popup = 'popup',\n SameTab = 'sameTab',\n NewTab = 'newTab',\n NavigationInSameTab = 'navigationInSameTab',\n NavigationInNewTab = 'navigationInNewTab'\n}\n\nexport enum NotificationType {\n Success = 'success',\n Warning = 'warning',\n Error = 'error'\n}\n","import { Injectable } from '@angular/core';\nimport {\n ScreenOpenOptions,\n NotificationOptions,\n ConfirmationDialogOptions,\n NavigationOptions,\n BaseNotificationOptions,\n BaseScreenOptions,\n NavigateToSubdomainOptions\n} from '../interfaces/ui.interface';\nimport { NotificationType, ScreenDisplayMode } from '../enums/ui.enum';\nimport { TabSdk } from '../tab-sdk.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class UiService {\n private readonly _eventActionService: any = TabSdk.context?.EventActionService;\n private readonly _tabUtilsService: any = TabSdk.context?.TabUtilsService;\n private readonly _confirmationDialogService: any = TabSdk.context?.ConfirmationDialogService;\n\n /**\n * Open a screen with the given options. The mode determines how the screen is\n * displayed.\n *\n * @param options The options for opening the screen.\n */\n openScreen(options: ScreenOpenOptions): void {\n const { mode, screenId, reqtokens, submission, title, width, height, customClass } = options;\n\n switch (mode) {\n case ScreenDisplayMode.Sidebar:\n this.showSidebar({ screenId, reqtokens, submission, title, width, height, customClass });\n break;\n\n case ScreenDisplayMode.Popup:\n this.showDialog({ screenId, reqtokens, submission, title, width, height, customClass });\n break;\n\n case ScreenDisplayMode.SameTab:\n case ScreenDisplayMode.NavigationInSameTab:\n this.navigateTo({ screenId, reqtokens });\n break;\n\n case ScreenDisplayMode.NewTab:\n case ScreenDisplayMode.NavigationInNewTab:\n this.openInNewTab({ screenId, reqtokens });\n break;\n }\n }\n\n /**\n * Opens a screen in a sidebar.\n *\n * @param options The options for opening the sidebar.\n */\n showSidebar(options: BaseScreenOptions): void {\n const otherConfiguration = {\n ...(options.title && { title: options.title }),\n ...(options.width && { width: options.width }),\n ...(options.height && { height: options.height }),\n ...(options.customClass && { customClass: options.customClass })\n };\n\n this._eventActionService.openScreen(\n ScreenDisplayMode.Sidebar,\n options.screenId,\n options.reqtokens || undefined,\n options.submission || undefined,\n Object.keys(otherConfiguration).length > 0 ? otherConfiguration : undefined\n );\n }\n\n /**\n * Opens a screen in a popup dialog.\n *\n * @param options The options for opening the dialog.\n */\n showDialog(options: BaseScreenOptions): void {\n const otherConfiguration = {\n ...(options.title && { title: options.title }),\n ...(options.width && { width: options.width }),\n ...(options.height && { height: options.height }),\n ...(options.customClass && { customClass: options.customClass })\n };\n\n this._eventActionService.openScreen(\n ScreenDisplayMode.Popup,\n options.screenId,\n options.reqtokens || undefined,\n options.submission || undefined,\n Object.keys(otherConfiguration).length > 0 ? otherConfiguration : undefined\n );\n }\n\n /**\n * Navigates to a screen within the same tab.\n *\n * @param options - The options for navigation, including screenId and optional reqtokens.\n */\n navigateTo(options: NavigationOptions): void {\n this._eventActionService.openScreen(\n ScreenDisplayMode.NavigationInSameTab,\n options.screenId,\n options.reqtokens || undefined\n );\n }\n\n /**\n * Navigates to a screen in a new tab.\n *\n * @param options The options for navigation, including screenId and optional reqtokens.\n */\n openInNewTab(options: NavigationOptions): void {\n this._eventActionService.openScreen(\n ScreenDisplayMode.NavigationInNewTab,\n options.screenId,\n options.reqtokens || undefined\n );\n }\n\n /**\n * Navigates to the specified URL.\n *\n * @param url - The URL to navigate to.\n */\n navigateToUrl(url: string): void {\n this._tabUtilsService.navigateToUrl({ Url: url });\n }\n\n /**\n * Navigates to a specified subdomain using the provided options.\n *\n * @param options - The options for navigation, including subDomain, appCode, and url.\n */\n navigateToSubdomain(options: NavigateToSubdomainOptions): void {\n this._tabUtilsService.navigateToUrlWithSubdomain(options);\n }\n\n /**\n * Show a notification to the user.\n *\n * @param options The options for the notification.\n */\n notify(options: NotificationOptions): void {\n this._tabUtilsService.notify(options);\n }\n\n /**\n * Displays a success notification to the user.\n *\n * @param options - The options for the notification, including message, title, and configuration.\n */\n showSuccess(options: BaseNotificationOptions): void {\n this.notify({ ...options, type: NotificationType.Success });\n }\n\n /**\n * Displays a warning notification to the user.\n *\n * @param options - The options for the notification, including message, title, and configuration.\n */\n showWarning(options: BaseNotificationOptions): void {\n this.notify({ ...options, type: NotificationType.Warning });\n }\n\n /**\n * Displays an error notification to the user.\n *\n * @param options - The options for the notification, including message, title, and configuration.\n */\n showError(options: BaseNotificationOptions): void {\n this.notify({ ...options, type: NotificationType.Error });\n }\n\n /**\n * Displays a confirmation dialog to the user and returns a promise that resolves\n * to a boolean indicating whether the user confirmed the action.\n *\n * @param options - The options for the confirmation dialog, including title, message,\n * confirmText, cancelText, and visibility of buttons.\n * @returns A promise that resolves to true if the user confirms, false otherwise.\n */\n confirm(options: ConfirmationDialogOptions): Promise<boolean> {\n return new Promise((resolve) => {\n this._confirmationDialogService.confirm(options)\n ?.subscribe((isConfirmed: boolean) => {\n resolve(isConfirmed);\n });\n });\n }\n}","import { inject, Injectable } from '@angular/core';\nimport {\n LoginUserRequest,\n AuthService,\n CommonApiResponse,\n RegisterTenant,\n ResetPasswordUserRequest,\n RefreshTokenRequest,\n UserDetailsRequest,\n ChangePasswordUserRequest\n} from '@techextensor/tab-core-utility';\nimport { firstValueFrom } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthUtilService {\n private readonly _authService: AuthService = inject(AuthService);\n\n /**\n * Authenticates a user based on the provided login credentials.\n * \n * @param credentials The login credentials.\n * @returns The response from the server.\n */\n async login(credentials: LoginUserRequest): Promise<CommonApiResponse> {\n // Use the firstValueFrom RxJs operator to wait for the observable to complete\n const response = await firstValueFrom(\n this._authService.signIn(credentials)\n );\n return response;\n }\n\n /**\n * Registers a new tenant based on the provided details.\n * \n * @param tenantDetails The tenant details.\n * @returns The response from the server.\n */\n async registerTenant(tenantDetails: RegisterTenant): Promise<CommonApiResponse> {\n // Use the firstValueFrom RxJs operator to wait for the observable to complete\n const response = await firstValueFrom(\n this._authService.registerTenant(tenantDetails)\n );\n return response;\n }\n\n /**\n * Registers a new user based on the provided user details.\n * \n * @param userDetails The user details.\n * @param headers Optional headers to pass to the server.\n * @returns The response from the server.\n */\n async registerUser(userDetails: any, headers?: Record<string, string>): Promise<CommonApiResponse> {\n // Use the firstValueFrom RxJs operator to wait for the observable to complete\n const response = await firstValueFrom(\n this._authService.register(userDetails, headers)\n );\n return response;\n }\n\n /**\n * Resets a user's password based on the provided reset password credentials.\n * \n * @param credentials The reset password credentials.\n * @returns The response from the server.\n */\n async resetPassword(credentials: ResetPasswordUserRequest): Promise<CommonApiResponse> {\n // Use the firstValueFrom RxJs operator to wait for the observable to complete\n const response = await firstValueFrom(\n this._authService.resetPassword(credentials)\n );\n return response;\n }\n\n /**\n * Changes a user's password based on the provided credentials.\n * \n * @param credentials The credentials containing the user's current and new password.\n * @returns The response from the server.\n */\n async changePassword(credentials: ChangePasswordUserRequest): Promise<CommonApiResponse> {\n // Use the firstValueFrom RxJs operator to wait for the observable to complete\n const response = await firstValueFrom(\n this._authService.changePassword(credentials)\n );\n return response;\n }\n\n /**\n * Refreshes a user's token based on the provided refresh token details.\n * \n * @param tokenDetails The refresh token details.\n * @returns The response from the server.\n */\n async refreshToken(tokenDetails: RefreshTokenRequest): Promise<CommonApiResponse> {\n // Use the firstValueFrom RxJs operator to wait for the observable to complete\n const response = await firstValueFrom(\n this._authService.refreshToken(tokenDetails)\n );\n return response;\n }\n\n /**\n * Gets the user details for the provided user details request.\n * \n * @param userDetailsRequest The user details request.\n * @param headers Optional headers to pass to the server.\n * @returns The response from the server.\n */\n async getUserDetails(userDetailsRequest: UserDetailsRequest, headers?: Record<string, string>): Promise<CommonApiResponse> {\n // Use the firstValueFrom RxJs operator to wait for the observable to complete\n const response = await firstValueFrom(\n this._authService.getUserDetails(userDetailsRequest, headers)\n );\n return response;\n }\n}","import { Injectable, Injector } from '@angular/core';\nimport { MetadataHelper } from '@techextensor/tab-core-utility';\nimport { UiService } from './ui/ui.service';\nimport { AuthUtilService } from './auth/auth.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class TabSdk {\n public static auth: AuthUtilService;\n public static ui: UiService;\n public static metadataUtils: MetadataHelper;\n public static context: any;\n\n /**\n * Initialize the SDK with necessary services\n */\n public static init(injector: Injector, context: any): void {\n // Expose to window for global access if needed\n (window as any).TabSdk = TabSdk;\n\n // external services\n this.context = context;\n\n // Initialize services\n this.auth = injector.get(AuthUtilService);\n this.ui = injector.get(UiService);\n this.metadataUtils = injector.get(MetadataHelper);\n\n // Freeze the global object to prevent modifications\n Object.freeze(this);\n Object.freeze(this.context);\n }\n}","/*\n * Public API Surface of tab-sdk\n */\n\nexport * from './lib/tab-sdk.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA,IAAY,iBAOX;AAPD,CAAA,UAAY,iBAAiB,EAAA;AACzB,I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AC,IAAI,CAAC,OAAO,CAAC;;wGAvBlB,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAN,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAM,cAFL,MAAM,EAAA,CAAA;;4FAEP,MAAM,EAAA,UAAA,EAAA,CAAA;kBAHlB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACPD;;AAEG;;ACFH;;AAEG;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@techextensor/tab-sdk" />
5
+ export * from './public-api';
@@ -0,0 +1,58 @@
1
+ import { LoginUserRequest, CommonApiResponse, RegisterTenant, ResetPasswordUserRequest, RefreshTokenRequest, UserDetailsRequest, ChangePasswordUserRequest } from '@techextensor/tab-core-utility';
2
+ import * as i0 from "@angular/core";
3
+ export declare class AuthUtilService {
4
+ private readonly _authService;
5
+ /**
6
+ * Authenticates a user based on the provided login credentials.
7
+ *
8
+ * @param credentials The login credentials.
9
+ * @returns The response from the server.
10
+ */
11
+ login(credentials: LoginUserRequest): Promise<CommonApiResponse>;
12
+ /**
13
+ * Registers a new tenant based on the provided details.
14
+ *
15
+ * @param tenantDetails The tenant details.
16
+ * @returns The response from the server.
17
+ */
18
+ registerTenant(tenantDetails: RegisterTenant): Promise<CommonApiResponse>;
19
+ /**
20
+ * Registers a new user based on the provided user details.
21
+ *
22
+ * @param userDetails The user details.
23
+ * @param headers Optional headers to pass to the server.
24
+ * @returns The response from the server.
25
+ */
26
+ registerUser(userDetails: any, headers?: Record<string, string>): Promise<CommonApiResponse>;
27
+ /**
28
+ * Resets a user's password based on the provided reset password credentials.
29
+ *
30
+ * @param credentials The reset password credentials.
31
+ * @returns The response from the server.
32
+ */
33
+ resetPassword(credentials: ResetPasswordUserRequest): Promise<CommonApiResponse>;
34
+ /**
35
+ * Changes a user's password based on the provided credentials.
36
+ *
37
+ * @param credentials The credentials containing the user's current and new password.
38
+ * @returns The response from the server.
39
+ */
40
+ changePassword(credentials: ChangePasswordUserRequest): Promise<CommonApiResponse>;
41
+ /**
42
+ * Refreshes a user's token based on the provided refresh token details.
43
+ *
44
+ * @param tokenDetails The refresh token details.
45
+ * @returns The response from the server.
46
+ */
47
+ refreshToken(tokenDetails: RefreshTokenRequest): Promise<CommonApiResponse>;
48
+ /**
49
+ * Gets the user details for the provided user details request.
50
+ *
51
+ * @param userDetailsRequest The user details request.
52
+ * @param headers Optional headers to pass to the server.
53
+ * @returns The response from the server.
54
+ */
55
+ getUserDetails(userDetailsRequest: UserDetailsRequest, headers?: Record<string, string>): Promise<CommonApiResponse>;
56
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthUtilService, never>;
57
+ static ɵprov: i0.ɵɵInjectableDeclaration<AuthUtilService>;
58
+ }
@@ -0,0 +1,13 @@
1
+ export declare enum ScreenDisplayMode {
2
+ Sidebar = "sidebar",
3
+ Popup = "popup",
4
+ SameTab = "sameTab",
5
+ NewTab = "newTab",
6
+ NavigationInSameTab = "navigationInSameTab",
7
+ NavigationInNewTab = "navigationInNewTab"
8
+ }
9
+ export declare enum NotificationType {
10
+ Success = "success",
11
+ Warning = "warning",
12
+ Error = "error"
13
+ }
@@ -0,0 +1,56 @@
1
+ import { NotificationType, ScreenDisplayMode } from "../enums/ui.enum";
2
+ export type NotificationPosition = 'topRight' | 'topLeft' | 'bottomRight' | 'bottomLeft' | 'topCenter' | 'bottomCenter';
3
+ export interface BaseScreenOptions {
4
+ screenId: string;
5
+ reqtokens?: any;
6
+ submission?: any;
7
+ title?: string;
8
+ width?: string | number;
9
+ height?: string | number;
10
+ customClass?: string;
11
+ refresher?: () => void;
12
+ closer?: () => void;
13
+ }
14
+ export interface ScreenOpenOptions extends BaseScreenOptions {
15
+ mode: ScreenDisplayMode;
16
+ }
17
+ export interface NavigationOptions {
18
+ screenId: string;
19
+ reqtokens?: Record<string, any>;
20
+ }
21
+ export interface NavigateToSubdomainOptions {
22
+ subDomain: string;
23
+ appCode: string;
24
+ url: string;
25
+ }
26
+ export interface BaseNotificationOptions {
27
+ message: string;
28
+ title?: string;
29
+ configuration?: Partial<{
30
+ timeOut: number;
31
+ closeButton: boolean;
32
+ progressBar: boolean;
33
+ positionClass: string;
34
+ enableHtml: boolean;
35
+ tapToDismiss: boolean;
36
+ }>;
37
+ }
38
+ export interface NotificationOptions extends BaseNotificationOptions {
39
+ type: NotificationType;
40
+ }
41
+ export interface ConfirmationDialogOptions {
42
+ title: string;
43
+ message: string;
44
+ primaryOption?: string;
45
+ secondaryOption?: string;
46
+ displayHeader?: boolean;
47
+ displayFooter?: boolean;
48
+ displayBody?: boolean;
49
+ displayPrimaryButton?: boolean;
50
+ displaySecondaryButton?: boolean;
51
+ displayCloseButton?: boolean;
52
+ }
53
+ export interface ConfirmOptions {
54
+ title: string;
55
+ message?: string;
56
+ }
@@ -0,0 +1,17 @@
1
+ import { Injector } from '@angular/core';
2
+ import { MetadataHelper } from '@techextensor/tab-core-utility';
3
+ import { UiService } from './ui/ui.service';
4
+ import { AuthUtilService } from './auth/auth.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare class TabSdk {
7
+ static auth: AuthUtilService;
8
+ static ui: UiService;
9
+ static metadataUtils: MetadataHelper;
10
+ static context: any;
11
+ /**
12
+ * Initialize the SDK with necessary services
13
+ */
14
+ static init(injector: Injector, context: any): void;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<TabSdk, never>;
16
+ static ɵprov: i0.ɵɵInjectableDeclaration<TabSdk>;
17
+ }
@@ -0,0 +1,85 @@
1
+ import { ScreenOpenOptions, NotificationOptions, ConfirmationDialogOptions, NavigationOptions, BaseNotificationOptions, BaseScreenOptions, NavigateToSubdomainOptions } from '../interfaces/ui.interface';
2
+ import * as i0 from "@angular/core";
3
+ export declare class UiService {
4
+ private readonly _eventActionService;
5
+ private readonly _tabUtilsService;
6
+ private readonly _confirmationDialogService;
7
+ /**
8
+ * Open a screen with the given options. The mode determines how the screen is
9
+ * displayed.
10
+ *
11
+ * @param options The options for opening the screen.
12
+ */
13
+ openScreen(options: ScreenOpenOptions): void;
14
+ /**
15
+ * Opens a screen in a sidebar.
16
+ *
17
+ * @param options The options for opening the sidebar.
18
+ */
19
+ showSidebar(options: BaseScreenOptions): void;
20
+ /**
21
+ * Opens a screen in a popup dialog.
22
+ *
23
+ * @param options The options for opening the dialog.
24
+ */
25
+ showDialog(options: BaseScreenOptions): void;
26
+ /**
27
+ * Navigates to a screen within the same tab.
28
+ *
29
+ * @param options - The options for navigation, including screenId and optional reqtokens.
30
+ */
31
+ navigateTo(options: NavigationOptions): void;
32
+ /**
33
+ * Navigates to a screen in a new tab.
34
+ *
35
+ * @param options The options for navigation, including screenId and optional reqtokens.
36
+ */
37
+ openInNewTab(options: NavigationOptions): void;
38
+ /**
39
+ * Navigates to the specified URL.
40
+ *
41
+ * @param url - The URL to navigate to.
42
+ */
43
+ navigateToUrl(url: string): void;
44
+ /**
45
+ * Navigates to a specified subdomain using the provided options.
46
+ *
47
+ * @param options - The options for navigation, including subDomain, appCode, and url.
48
+ */
49
+ navigateToSubdomain(options: NavigateToSubdomainOptions): void;
50
+ /**
51
+ * Show a notification to the user.
52
+ *
53
+ * @param options The options for the notification.
54
+ */
55
+ notify(options: NotificationOptions): void;
56
+ /**
57
+ * Displays a success notification to the user.
58
+ *
59
+ * @param options - The options for the notification, including message, title, and configuration.
60
+ */
61
+ showSuccess(options: BaseNotificationOptions): void;
62
+ /**
63
+ * Displays a warning notification to the user.
64
+ *
65
+ * @param options - The options for the notification, including message, title, and configuration.
66
+ */
67
+ showWarning(options: BaseNotificationOptions): void;
68
+ /**
69
+ * Displays an error notification to the user.
70
+ *
71
+ * @param options - The options for the notification, including message, title, and configuration.
72
+ */
73
+ showError(options: BaseNotificationOptions): void;
74
+ /**
75
+ * Displays a confirmation dialog to the user and returns a promise that resolves
76
+ * to a boolean indicating whether the user confirmed the action.
77
+ *
78
+ * @param options - The options for the confirmation dialog, including title, message,
79
+ * confirmText, cancelText, and visibility of buttons.
80
+ * @returns A promise that resolves to true if the user confirms, false otherwise.
81
+ */
82
+ confirm(options: ConfirmationDialogOptions): Promise<boolean>;
83
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiService, never>;
84
+ static ɵprov: i0.ɵɵInjectableDeclaration<UiService>;
85
+ }
package/package.json CHANGED
@@ -1,13 +1,10 @@
1
1
  {
2
2
  "name": "@techextensor/tab-sdk",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.0",
6
6
  "@angular/core": "^17.3.0",
7
- "@techextensor/tab-core-utility": "^2.2.129"
8
- },
9
- "scripts": {
10
- "updateVersion": "npm version patch"
7
+ "@techextensor/tab-core-utility": "^2.2.139"
11
8
  },
12
9
  "dependencies": {
13
10
  "tslib": "^2.3.0"
@@ -15,5 +12,18 @@
15
12
  "sideEffects": false,
16
13
  "publishConfig": {
17
14
  "access": "public"
15
+ },
16
+ "module": "fesm2022/techextensor-tab-sdk.mjs",
17
+ "typings": "index.d.ts",
18
+ "exports": {
19
+ "./package.json": {
20
+ "default": "./package.json"
21
+ },
22
+ ".": {
23
+ "types": "./index.d.ts",
24
+ "esm2022": "./esm2022/techextensor-tab-sdk.mjs",
25
+ "esm": "./esm2022/techextensor-tab-sdk.mjs",
26
+ "default": "./fesm2022/techextensor-tab-sdk.mjs"
27
+ }
18
28
  }
19
- }
29
+ }
@@ -0,0 +1 @@
1
+ export * from './lib/tab-sdk.service';
package/ng-package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../../dist/tab-sdk",
4
- "lib": {
5
- "entryFile": "src/public-api.ts"
6
- }
7
- }
package/project.json DELETED
@@ -1,37 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/nx/schemas/project-schema.json",
3
- "name": "tab-sdk",
4
- "projectType": "library",
5
- "sourceRoot": "projects/tab-sdk/src",
6
- "prefix": "lib",
7
- "targets": {
8
- "build": {
9
- "executor": "@angular-devkit/build-angular:ng-packagr",
10
- "options": {
11
- "project": "projects/tab-sdk/ng-package.json"
12
- },
13
- "configurations": {
14
- "production": {
15
- "tsConfig": "projects/tab-sdk/tsconfig.lib.prod.json"
16
- },
17
- "development": {
18
- "tsConfig": "projects/tab-sdk/tsconfig.lib.json"
19
- }
20
- },
21
- "defaultConfiguration": "production",
22
- "outputs": [
23
- "{workspaceRoot}/dist/tab-sdk"
24
- ]
25
- },
26
- "test": {
27
- "executor": "@angular-devkit/build-angular:karma",
28
- "options": {
29
- "tsConfig": "projects/tab-sdk/tsconfig.spec.json",
30
- "polyfills": [
31
- "zone.js",
32
- "zone.js/testing"
33
- ]
34
- }
35
- }
36
- }
37
- }