@techextensor/tab-sdk 0.0.3 → 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.
@@ -1,388 +1,256 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, Injectable } from '@angular/core';
3
- import { TabInsertService, TabUpdateService, TabDeleteService, SessionStorageService, LocalStorageService, StorageConstants, MetadataHelper } from '@techextensor/tab-core-utility';
2
+ import { Injectable, inject } from '@angular/core';
3
+ import { AuthService, MetadataHelper } from '@techextensor/tab-core-utility';
4
+ import { firstValueFrom } from 'rxjs';
4
5
 
5
- class DataService {
6
- _tabInsertService = inject(TabInsertService);
7
- _tabUpdateService = inject(TabUpdateService);
8
- _tabDeleteService = inject(TabDeleteService);
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;
9
26
  /**
10
- * Insert a new record
27
+ * Open a screen with the given options. The mode determines how the screen is
28
+ * displayed.
11
29
  *
12
- * @example
13
- * const newRecord = await sdk.data.insert('123456', {
14
- * name: 'ACME Corp',
15
- * email: 'contact@acme.com'
16
- * });
30
+ * @param options The options for opening the screen.
17
31
  */
18
- insert(objectId, data) {
19
- return new Promise((resolve, reject) => {
20
- this._tabInsertService.insertByObjectId(objectId, { data })
21
- ?.subscribe((response) => {
22
- if (response?.StatusCode == 200 && response?.Result) {
23
- resolve(response.Result);
24
- }
25
- else {
26
- reject(new Error('Failed to insert record'));
27
- }
28
- });
29
- });
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
+ }
30
50
  }
31
51
  /**
32
- * Update an existing record
52
+ * Opens a screen in a sidebar.
33
53
  *
34
- * @example
35
- * await sdk.data.update('12345', {
36
- * Id: '12345',
37
- * name: 'ACME Corporation',
38
- * status: 'active'
39
- * });
54
+ * @param options The options for opening the sidebar.
40
55
  */
41
- update(objectId, data) {
42
- return new Promise((resolve, reject) => {
43
- this._tabUpdateService.updateByObjectId(objectId, { data })
44
- ?.subscribe((response) => {
45
- if (response?.StatusCode == 200 && response?.Result) {
46
- resolve(response.Result);
47
- }
48
- else {
49
- reject(new Error('Failed to update record'));
50
- }
51
- });
52
- });
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);
53
64
  }
54
65
  /**
55
- * Delete a record
66
+ * Opens a screen in a popup dialog.
56
67
  *
57
- * @example
58
- * await sdk.data.delete('12345', {Id: '12345'});
68
+ * @param options The options for opening the dialog.
59
69
  */
60
- delete(objectId, data) {
61
- return new Promise((resolve, reject) => {
62
- this._tabDeleteService.deleteRecord('', { data }, objectId)
63
- ?.subscribe((response) => {
64
- if (response?.StatusCode == 200) {
65
- resolve();
66
- }
67
- else {
68
- reject(new Error('Failed to delete record'));
69
- }
70
- });
71
- });
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);
72
78
  }
73
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DataService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
74
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DataService, providedIn: 'root' });
75
- }
76
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DataService, decorators: [{
77
- type: Injectable,
78
- args: [{
79
- providedIn: 'root'
80
- }]
81
- }] });
82
-
83
- class UiService {
84
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
85
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UiService, providedIn: 'root' });
86
- }
87
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UiService, decorators: [{
88
- type: Injectable,
89
- args: [{
90
- providedIn: 'root'
91
- }]
92
- }] });
93
-
94
- class FormService {
95
- _helperFunctionService = TabSdk.context?.HelperFunctionService;
96
79
  /**
97
- * Processes form components with individual actions in a single pass
98
- *
99
- * @example
100
- * // Process multiple components with different actions in one pass
101
- * sdk.form.processComponents(
102
- * screenParameters.rendererInstance.form.components,
103
- * [
104
- * {
105
- * keys: 'documentDetails', // Single key
106
- * action: (component) => component.hidden = true,
107
- * type: 'columns' // Optional type filter
108
- * },
109
- * {
110
- * keys: 'documentPreview,documentComments', // Multiple keys as comma-separated string
111
- * action: (component) => component.hidden = false
112
- * }
113
- * ]
114
- * );
115
- */
116
- processComponents(components, processors) {
117
- if (!components || !Array.isArray(components) || !processors?.length) {
118
- return;
119
- }
120
- this._helperFunctionService?.eachComponent(components, (component) => {
121
- processors.forEach(processor => {
122
- // Split the keys string into an array
123
- const keyList = processor.keys.split(',').map(k => k.trim());
124
- // Check if component key is in the list of keys to process
125
- if (!keyList.includes(component.key))
126
- return;
127
- // Check type match if specified
128
- if (processor.type && component.type !== processor.type)
129
- return;
130
- // All criteria matched, execute the action
131
- processor.action(component);
132
- });
133
- });
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);
134
86
  }
135
87
  /**
136
- * Updates visibility of multiple form components at once
88
+ * Navigates to a screen in a new tab.
137
89
  *
138
- * @example
139
- * sdk.form.setComponentsVisibility(
140
- * screenParameters.rendererInstance.form.components,
141
- * {
142
- * 'documentDetails': false,
143
- * 'documentComments': true
144
- * }
145
- * );
90
+ * @param options The options for navigation, including screenId and optional reqtokens.
146
91
  */
147
- setComponentsVisibility(components, visibilityMap) {
148
- const keys = Object.keys(visibilityMap);
149
- this.processComponents(components, keys.map(key => ({
150
- keys: key,
151
- action: (component) => {
152
- component.hidden = visibilityMap[key];
153
- }
154
- })));
92
+ openInNewTab(options) {
93
+ this._eventActionService.openScreen(ScreenDisplayMode.NavigationInNewTab, options.screenId, options.reqtokens || undefined);
155
94
  }
156
95
  /**
157
- * Finds components by key and returns them in a structured object
96
+ * Navigates to the specified URL.
158
97
  *
159
- * @example
160
- * const components = sdk.form.findComponentsByKeys(
161
- * form.components,
162
- * ['documentDetails', 'documentPreview', 'documentComments']
163
- * );
98
+ * @param url - The URL to navigate to.
164
99
  */
165
- findComponentsByKeys(components, keys, options) {
166
- const result = {};
167
- if (!components || !Array.isArray(components) || !keys?.length) {
168
- return result;
169
- }
170
- // Use the existing eachComponent helper
171
- this._helperFunctionService.eachComponent(components, (component) => {
172
- if (!options?.type || component.type === options.type) {
173
- result[component.key] = component;
174
- }
175
- }, keys);
176
- return result;
100
+ navigateToUrl(url) {
101
+ this._tabUtilsService.navigateToUrl({ Url: url });
177
102
  }
178
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FormService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
179
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FormService, providedIn: 'root' });
180
- }
181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FormService, decorators: [{
182
- type: Injectable,
183
- args: [{
184
- providedIn: 'root'
185
- }]
186
- }] });
187
-
188
- class AuthService {
189
- _sessionStorageService = inject(SessionStorageService);
190
- _localStorageService = inject(LocalStorageService);
191
103
  /**
192
- * Get the current application code/identifier
104
+ * Navigates to a specified subdomain using the provided options.
193
105
  *
194
- * @example
195
- * const appCode = sdk.config.getAppCode();
106
+ * @param options - The options for navigation, including subDomain, appCode, and url.
196
107
  */
197
- getAppCode() {
198
- return this._sessionStorageService.getSessionStorage(StorageConstants.applicationCode) ?? '';
108
+ navigateToSubdomain(options) {
109
+ this._tabUtilsService.navigateToUrlWithSubdomain(options);
199
110
  }
200
111
  /**
201
- * Get the current user ID
112
+ * Show a notification to the user.
202
113
  *
203
- * @example
204
- * const userId = sdk.auth.getCurrentUserId();
114
+ * @param options The options for the notification.
205
115
  */
206
- getCurrentUserId() {
207
- const userInfo = this.getCurrentUser();
208
- return userInfo?.user?.Id ?? '';
116
+ notify(options) {
117
+ this._tabUtilsService.notify(options);
209
118
  }
210
119
  /**
211
- * Get the current user information
120
+ * Displays a success notification to the user.
212
121
  *
213
- * @example
214
- * const user = sdk.auth.getCurrentUser();
122
+ * @param options - The options for the notification, including message, title, and configuration.
215
123
  */
216
- getCurrentUser() {
217
- const userInfoStr = this._localStorageService.getLocalStorage(StorageConstants.userInfo);
218
- if (userInfoStr) {
219
- return JSON.parse(userInfoStr);
220
- }
221
- return null;
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 });
222
142
  }
223
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
224
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuthService, providedIn: 'root' });
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' });
225
161
  }
226
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuthService, decorators: [{
162
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UiService, decorators: [{
227
163
  type: Injectable,
228
164
  args: [{
229
165
  providedIn: 'root'
230
166
  }]
231
167
  }] });
232
168
 
233
- class UtilsService {
169
+ class AuthUtilService {
234
170
  _authService = inject(AuthService);
235
- _helperFunctionService = TabSdk.context?.HelperFunctionService;
236
171
  /**
237
- * Extracts the event name from various event parameter structures
172
+ * Authenticates a user based on the provided login credentials.
238
173
  *
239
- * @example
240
- * const eventName = sdk.utils.extractEventName(screenParameters.event);
241
- * if (eventName === 'deleteDocument') {
242
- * // Handle delete document event
243
- * }
174
+ * @param credentials The login credentials.
175
+ * @returns The response from the server.
244
176
  */
245
- extractEventName(event) {
246
- if (!event)
247
- return '';
248
- // Check common patterns for event names
249
- return event.event?.component?.configuration?.configScreen?.componentValue?.eventName ??
250
- event.detail?.type ??
251
- event.type ??
252
- event.name ??
253
- '';
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;
254
181
  }
255
182
  /**
256
- * Builds an application URL with the specified path and parameters
183
+ * Registers a new tenant based on the provided details.
257
184
  *
258
- * @example
259
- * // Get full URL with protocol
260
- * const fullUrl = sdk.utils.buildAppUrl('screen/12345', { id: '12345' });
185
+ * @param tenantDetails The tenant details.
186
+ * @returns The response from the server.
261
187
  */
262
- buildAppUrl(path, parameters, includeProtocol = true) {
263
- const appCode = this._authService.getAppCode();
264
- const params = new URLSearchParams();
265
- // Add parameters to the URL
266
- if (parameters) {
267
- Object.entries(parameters).forEach(([key, value]) => {
268
- if (value !== undefined && value !== null) {
269
- params.append(key, String(value));
270
- }
271
- });
272
- }
273
- // Build query string
274
- const queryString = params.toString() ? `?${params.toString()}` : '';
275
- // Build URL
276
- if (includeProtocol) {
277
- const host = window.location.host;
278
- return `http://${host}/${appCode}/${path}${queryString}`;
279
- }
280
- else {
281
- return `/${appCode}/${path}${queryString}`;
282
- }
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;
283
192
  }
284
193
  /**
285
- * Generates and copies a screen URL to the clipboard
194
+ * Registers a new user based on the provided user details.
286
195
  *
287
- * @example
288
- * // Copy URL to clipboard
289
- * sdk.utils.copyScreenLink('12345', { id: '12345' });
196
+ * @param userDetails The user details.
197
+ * @param headers Optional headers to pass to the server.
198
+ * @returns The response from the server.
290
199
  */
291
- copyScreenLinkToClipboard(screenId, parameters) {
292
- const url = this.buildAppUrl(`screen/${screenId}`, parameters);
293
- return this._helperFunctionService.copyToClipboard(url);
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;
294
204
  }
295
205
  /**
296
- * Downloads a blob as a file
206
+ * Resets a user's password based on the provided reset password credentials.
297
207
  *
298
- * @example
299
- * // Download a blob as 'report.pdf'
300
- * const pdfBlob = new Blob([pdfContent], { type: 'application/pdf' });
301
- * sdk.utils.downloadBlob(pdfBlob, 'report.pdf');
208
+ * @param credentials The reset password credentials.
209
+ * @returns The response from the server.
302
210
  */
303
- downloadBlob(blob, filename) {
304
- // Create object URL
305
- const url = URL.createObjectURL(blob);
306
- // Create download link
307
- const downloadLink = document.createElement('a');
308
- downloadLink.href = url;
309
- downloadLink.download = filename;
310
- // Append to body, click, and remove
311
- document.body.appendChild(downloadLink);
312
- downloadLink.click();
313
- document.body.removeChild(downloadLink);
314
- // Release object URL after a short delay to ensure download starts
315
- setTimeout(() => URL.revokeObjectURL(url), 100);
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;
316
215
  }
317
216
  /**
318
- * Exports HTML content as a Word document (.doc)
217
+ * Changes a user's password based on the provided credentials.
319
218
  *
320
- * @example
321
- * // Export editor content as Word document
322
- * sdk.utils.exportAsWord(editorContent, 'report');
219
+ * @param credentials The credentials containing the user's current and new password.
220
+ * @returns The response from the server.
323
221
  */
324
- exportAsWord(content, filename = 'document') {
325
- // Format content with Word-compatible namespaces
326
- const docContent = `
327
- <html xmlns:o="urn:schemas-microsoft-com:office:office"
328
- xmlns:w="urn:schemas-microsoft-com:office:word"
329
- xmlns="http://www.w3.org/TR/REC-html40">
330
- <head>
331
- <meta charset="utf-8">
332
- <title>${filename}</title>
333
- </head>
334
- <body>${content}</body>
335
- </html>`;
336
- // Create blob with BOM for Word compatibility
337
- const blob = new Blob(['\ufeff', docContent], {
338
- type: 'application/msword'
339
- });
340
- // Use the downloadBlob utility
341
- this.downloadBlob(blob, `${filename}.doc`);
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;
342
226
  }
343
227
  /**
344
- * Exports HTML content as PDF using browser print functionality
228
+ * Refreshes a user's token based on the provided refresh token details.
345
229
  *
346
- * @example
347
- * // Export content as PDF
348
- * sdk.utils.exportAsPdf(documentContent, 'Invoice');
230
+ * @param tokenDetails The refresh token details.
231
+ * @returns The response from the server.
349
232
  */
350
- exportAsPdf(content, title = 'Document') {
351
- // Open new window
352
- const printWindow = window.open('', '', 'width=800,height=600');
353
- // Add content with basic styling
354
- printWindow.document?.write(`
355
- <html>
356
- <head>
357
- <title>${title}</title>
358
- <style>
359
- body { font-family: Arial, sans-serif; margin: 20px; }
360
- @media print {
361
- body { margin: 0mm; }
362
- }
363
- </style>
364
- </head>
365
- <body>
366
- ${content}
367
- </body>
368
- </html>
369
- `);
370
- // Prepare for printing
371
- printWindow.document.close();
372
- printWindow.focus();
373
- // Use timeout to ensure content is rendered before printing
374
- setTimeout(() => {
375
- printWindow.print();
376
- // Close window after print dialog is closed or printing is complete
377
- printWindow.addEventListener('afterprint', () => {
378
- printWindow.close();
379
- });
380
- }, 300);
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;
381
249
  }
382
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
383
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UtilsService, providedIn: 'root' });
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' });
384
252
  }
385
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UtilsService, decorators: [{
253
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuthUtilService, decorators: [{
386
254
  type: Injectable,
387
255
  args: [{
388
256
  providedIn: 'root'
@@ -390,11 +258,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
390
258
  }] });
391
259
 
392
260
  class TabSdk {
393
- static data;
394
- static ui;
395
- static form;
396
261
  static auth;
397
- static utils;
262
+ static ui;
398
263
  static metadataUtils;
399
264
  static context;
400
265
  /**
@@ -406,20 +271,12 @@ class TabSdk {
406
271
  // external services
407
272
  this.context = context;
408
273
  // Initialize services
409
- this.data = injector.get(DataService);
274
+ this.auth = injector.get(AuthUtilService);
410
275
  this.ui = injector.get(UiService);
411
- this.form = injector.get(FormService);
412
- this.auth = injector.get(AuthService);
413
- this.utils = injector.get(UtilsService);
414
276
  this.metadataUtils = injector.get(MetadataHelper);
415
277
  // Freeze the global object to prevent modifications
416
278
  Object.freeze(this);
417
279
  Object.freeze(this.context);
418
- Object.freeze(this.data);
419
- Object.freeze(this.ui);
420
- Object.freeze(this.form);
421
- Object.freeze(this.auth);
422
- Object.freeze(this.utils);
423
280
  }
424
281
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TabSdk, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
425
282
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TabSdk, providedIn: 'root' });