@techextensor/tab-core-utility 2.2.143 → 2.2.145

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.
Files changed (59) hide show
  1. package/esm2022/index.mjs +18 -8
  2. package/esm2022/lib/tab-core-utility/app/constants/api-constants.mjs +2 -2
  3. package/esm2022/lib/tab-core-utility/app/constants/common.mjs +2 -1
  4. package/esm2022/lib/tab-core-utility/app/crud/tab-blueprint.service.mjs +1 -1
  5. package/esm2022/lib/tab-core-utility/app/crud/tab-crud.service.mjs +200 -0
  6. package/esm2022/lib/tab-core-utility/app/crud/tab-formio.service.mjs +1 -1
  7. package/esm2022/lib/tab-core-utility/app/crud/tab-get.service.mjs +2 -2
  8. package/esm2022/lib/tab-core-utility/app/crud/tab-release.service.mjs +1 -1
  9. package/esm2022/lib/tab-core-utility/app/enums/common.enum.mjs +8 -1
  10. package/esm2022/lib/tab-core-utility/app/helpers/common/app.helpers.mjs +1 -1
  11. package/esm2022/lib/tab-core-utility/app/helpers/common/dsq.helpers.mjs +2 -5
  12. package/esm2022/lib/tab-core-utility/app/helpers/common/template.helpers.mjs +1 -1
  13. package/esm2022/lib/tab-core-utility/app/helpers/screen/media-upload.helpers.mjs +1 -1
  14. package/esm2022/lib/tab-core-utility/app/interfaces/common.interface.mjs +2 -0
  15. package/esm2022/lib/tab-core-utility/app/interfaces/orgInfo.interface.mjs +1 -1
  16. package/esm2022/lib/tab-core-utility/app/utils/json.util.mjs +17 -13
  17. package/esm2022/lib/tab-core-utility/auth/auth.service.mjs +1 -1
  18. package/esm2022/lib/tab-core-utility/core/http-client/api.service.mjs +1 -1
  19. package/esm2022/lib/tab-core-utility/core/pipe/translate.pipe.mjs +31 -0
  20. package/esm2022/lib/tab-core-utility/core/provider/notification.provider.mjs +18 -0
  21. package/esm2022/lib/tab-core-utility/core/provider/translation.provider.mjs +20 -0
  22. package/esm2022/lib/tab-core-utility/core/service/confirmation.service.mjs +77 -0
  23. package/esm2022/lib/tab-core-utility/core/service/notification.service.mjs +57 -0
  24. package/esm2022/lib/tab-core-utility/core/service/translation.service.mjs +100 -0
  25. package/index.d.ts +8 -7
  26. package/lib/tab-core-utility/app/constants/common.d.ts +1 -0
  27. package/lib/tab-core-utility/app/crud/tab-blueprint.service.d.ts +1 -1
  28. package/lib/tab-core-utility/app/crud/tab-crud.service.d.ts +70 -0
  29. package/lib/tab-core-utility/app/crud/tab-formio.service.d.ts +1 -1
  30. package/lib/tab-core-utility/app/crud/tab-release.service.d.ts +1 -1
  31. package/lib/tab-core-utility/app/enums/common.enum.d.ts +6 -0
  32. package/lib/tab-core-utility/app/helpers/common/app.helpers.d.ts +1 -1
  33. package/lib/tab-core-utility/app/helpers/common/template.helpers.d.ts +1 -1
  34. package/lib/tab-core-utility/app/helpers/screen/media-upload.helpers.d.ts +1 -1
  35. package/lib/tab-core-utility/app/interfaces/{common-api.interface.d.ts → common.interface.d.ts} +43 -1
  36. package/lib/tab-core-utility/app/interfaces/orgInfo.interface.d.ts +1 -1
  37. package/lib/tab-core-utility/app/utils/json.util.d.ts +1 -4
  38. package/lib/tab-core-utility/auth/auth.service.d.ts +1 -1
  39. package/lib/tab-core-utility/core/http-client/api.service.d.ts +1 -1
  40. package/lib/tab-core-utility/core/pipe/translate.pipe.d.ts +11 -0
  41. package/lib/tab-core-utility/core/provider/notification.provider.d.ts +8 -0
  42. package/lib/tab-core-utility/core/provider/translation.provider.d.ts +6 -0
  43. package/lib/tab-core-utility/core/service/confirmation.service.d.ts +53 -0
  44. package/lib/tab-core-utility/core/service/notification.service.d.ts +37 -0
  45. package/lib/tab-core-utility/core/service/translation.service.d.ts +50 -0
  46. package/package.json +4 -3
  47. package/esm2022/lib/tab-core-utility/app/interfaces/common-api.interface.mjs +0 -2
  48. package/esm2022/lib/tab-core-utility/core/error-handler/error-handler-interceptor.service.mjs +0 -26
  49. package/esm2022/lib/tab-core-utility/core/error-handler/error-handler.store.mjs +0 -21
  50. package/esm2022/lib/tab-core-utility/core/error-handler/models/error-handler.state.mjs +0 -5
  51. package/esm2022/lib/tab-core-utility/core/util/auth.utils.mjs +0 -21
  52. package/esm2022/lib/tab-core-utility/store/auth.store.mjs +0 -43
  53. package/esm2022/lib/tab-core-utility/store/orginfo.store.mjs +0 -42
  54. package/lib/tab-core-utility/core/error-handler/error-handler-interceptor.service.d.ts +0 -3
  55. package/lib/tab-core-utility/core/error-handler/error-handler.store.d.ts +0 -10
  56. package/lib/tab-core-utility/core/error-handler/models/error-handler.state.d.ts +0 -5
  57. package/lib/tab-core-utility/core/util/auth.utils.d.ts +0 -9
  58. package/lib/tab-core-utility/store/auth.store.d.ts +0 -19
  59. package/lib/tab-core-utility/store/orginfo.store.d.ts +0 -22
@@ -0,0 +1,77 @@
1
+ import { EventEmitter, Injectable } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export class ConfirmationService {
5
+ constructor() {
6
+ this.conformationEmitter = new EventEmitter();
7
+ this.dialogEmitter = new EventEmitter();
8
+ this.removeEmitter = new EventEmitter();
9
+ }
10
+ /**
11
+ * Opens a confirmation dialog with the given title and message.
12
+ *
13
+ * This function will emit a value on the confirmation dialog emitter when the dialog is closed.
14
+ * The value emitted will be a boolean indicating whether the dialog was confirmed or canceled.
15
+ *
16
+ * @param {Object} config - The configuration for the dialog. Must have a 'title' and a 'message' property.
17
+ * @returns {Observable<boolean>} - An observable that emits a boolean indicating whether the dialog was confirmed or canceled.
18
+ */
19
+ confirm(config) {
20
+ return new Observable((observer) => {
21
+ this.dialogEmitter.emit(config);
22
+ this.conformationEmitter.subscribe((result) => {
23
+ observer.next(result);
24
+ observer.complete();
25
+ });
26
+ });
27
+ }
28
+ /**
29
+ * Closes the confirmation dialog.
30
+ *
31
+ * This function emits a value on the remove emitter to close the confirmation dialog.
32
+ *
33
+ * @returns {void}
34
+ */
35
+ closeDialog() {
36
+ this.removeEmitter.emit(true);
37
+ }
38
+ /**
39
+ * Returns the emitter for the confirmation dialog.
40
+ *
41
+ * This emitter will emit a boolean indicating whether the dialog was confirmed or canceled.
42
+ *
43
+ * @returns {EventEmitter<boolean>} - The emitter for the confirmation dialog.
44
+ */
45
+ getConformationEmitter() {
46
+ return this.conformationEmitter;
47
+ }
48
+ /**
49
+ * Returns the emitter for the confirmation dialog.
50
+ *
51
+ * This emitter will emit the config for the confirmation dialog.
52
+ *
53
+ * @returns {EventEmitter<any>} - The emitter for the confirmation dialog.
54
+ */
55
+ getDialogEmitter() {
56
+ return this.dialogEmitter;
57
+ }
58
+ /**
59
+ * Returns the emitter for closing the confirmation dialog.
60
+ *
61
+ * This emitter can be subscribed to in order to close the confirmation dialog.
62
+ *
63
+ * @returns {EventEmitter<any>} - The emitter for closing the confirmation dialog.
64
+ */
65
+ getRemoveEmitter() {
66
+ return this.removeEmitter;
67
+ }
68
+ static { this.ɵfac = function ConfirmationService_Factory(t) { return new (t || ConfirmationService)(); }; }
69
+ static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ConfirmationService, factory: ConfirmationService.ɵfac, providedIn: 'root' }); }
70
+ }
71
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConfirmationService, [{
72
+ type: Injectable,
73
+ args: [{
74
+ providedIn: 'root'
75
+ }]
76
+ }], null, null); })();
77
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlybWF0aW9uLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2RhdGEtYWNjZXNzL3NyYy9saWIvdGFiLWNvcmUtdXRpbGl0eS9jb3JlL3NlcnZpY2UvY29uZmlybWF0aW9uLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM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YXRpb24gZGlhbG9nLlxuICAgICAqL1xuICAgIGdldERpYWxvZ0VtaXR0ZXIoKTogRXZlbnRFbWl0dGVyPENvbmZpcm1hdGlvbk9wdGlvbnM+IHtcbiAgICAgICAgcmV0dXJuIHRoaXMuZGlhbG9nRW1pdHRlcjtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBSZXR1cm5zIHRoZSBlbWl0dGVyIGZvciBjbG9zaW5nIHRoZSBjb25maXJtYXRpb24gZGlhbG9nLlxuICAgICAqIFxuICAgICAqIFRoaXMgZW1pdHRlciBjYW4gYmUgc3Vic2NyaWJlZCB0byBpbiBvcmRlciB0byBjbG9zZSB0aGUgY29uZmlybWF0aW9uIGRpYWxvZy5cbiAgICAgKiBcbiAgICAgKiBAcmV0dXJucyB7RXZlbnRFbWl0dGVyPGFueT59IC0gVGhlIGVtaXR0ZXIgZm9yIGNsb3NpbmcgdGhlIGNvbmZpcm1hdGlvbiBkaWFsb2cuXG4gICAgICovXG4gICAgZ2V0UmVtb3ZlRW1pdHRlcigpOiBFdmVudEVtaXR0ZXI8Ym9vbGVhbj4ge1xuICAgICAgICByZXR1cm4gdGhpcy5yZW1vdmVFbWl0dGVyO1xuICAgIH1cbn0iXX0=
@@ -0,0 +1,57 @@
1
+ import { inject, Injectable } from '@angular/core';
2
+ import { ToastrService } from 'ngx-toastr';
3
+ import * as i0 from "@angular/core";
4
+ export class NotificationService {
5
+ constructor() {
6
+ this._tabToasterService = inject(ToastrService);
7
+ }
8
+ /**
9
+ * Show a notification to the user.
10
+ *
11
+ * @param options The options for the notification.
12
+ */
13
+ notify(options) {
14
+ this._tabToasterService[options.type](options.message, options.title, options.configuration);
15
+ }
16
+ /**
17
+ * Displays a success notification to the user.
18
+ *
19
+ * @param options - The options for the notification, including message, title, and configuration.
20
+ */
21
+ showSuccess(options) {
22
+ this._tabToasterService.success(options.message, options.title, options.configuration);
23
+ }
24
+ /**
25
+ * Displays a warning notification to the user.
26
+ *
27
+ * @param options - The options for the notification, including message, title, and configuration.
28
+ */
29
+ showWarning(options) {
30
+ this._tabToasterService.warning(options.message, options.title, options.configuration);
31
+ }
32
+ /**
33
+ * Displays an info notification to the user.
34
+ *
35
+ * @param options - The options for the notification, including message, title, and configuration.
36
+ */
37
+ showInfo(options) {
38
+ this._tabToasterService.info(options.message, options.title, options.configuration);
39
+ }
40
+ /**
41
+ * Displays an error notification to the user.
42
+ *
43
+ * @param options - The options for the notification, including message, title, and configuration.
44
+ */
45
+ showError(options) {
46
+ this._tabToasterService.error(options.message, options.title, options.configuration);
47
+ }
48
+ static { this.ɵfac = function NotificationService_Factory(t) { return new (t || NotificationService)(); }; }
49
+ static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: NotificationService, factory: NotificationService.ɵfac, providedIn: 'root' }); }
50
+ }
51
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NotificationService, [{
52
+ type: Injectable,
53
+ args: [{
54
+ providedIn: 'root'
55
+ }]
56
+ }], null, null); })();
57
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90aWZpY2F0aW9uLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2RhdGEtYWNjZXNzL3NyYy9saWIvdGFiLWNvcmUtdXRpbGl0eS9jb3JlL3NlcnZpY2Uvbm90aWZpY2F0aW9uLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDbkQsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLFlBQVksQ0FBQzs7QUFNM0MsTUFBTSxPQUFPLG1CQUFtQjtJQUhoQztRQUltQix1QkFBa0IsR0FBa0IsTUFBTSxDQUFDLGFBQWEsQ0FBQyxD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VOb3RpZmljYXRpb25PcHRpb25zKTogdm9pZCB7XG4gICAgdGhpcy5fdGFiVG9hc3RlclNlcnZpY2UuaW5mbyhvcHRpb25zLm1lc3NhZ2UsIG9wdGlvbnMudGl0bGUsIG9wdGlvbnMuY29uZmlndXJhdGlvbik7XG4gIH1cblxuICAvKipcbiAgICogRGlzcGxheXMgYW4gZXJyb3Igbm90aWZpY2F0aW9uIHRvIHRoZSB1c2VyLlxuICAgKlxuICAgKiBAcGFyYW0gb3B0aW9ucyAtIFRoZSBvcHRpb25zIGZvciB0aGUgbm90aWZpY2F0aW9uLCBpbmNsdWRpbmcgbWVzc2FnZSwgdGl0bGUsIGFuZCBjb25maWd1cmF0aW9uLlxuICAgKi9cbiAgc2hvd0Vycm9yKG9wdGlvbnM6IEJhc2VOb3RpZmljYXRpb25PcHRpb25zKTogdm9pZCB7XG4gICAgdGhpcy5fdGFiVG9hc3RlclNlcnZpY2UuZXJyb3Iob3B0aW9ucy5tZXNzYWdlLCBvcHRpb25zLnRpdGxlLCBvcHRpb25zLmNvbmZpZ3VyYXRpb24pO1xuICB9XG59Il19
@@ -0,0 +1,100 @@
1
+ import { Injectable, inject } from '@angular/core';
2
+ import { BehaviorSubject, of } from 'rxjs';
3
+ import { catchError, tap } from 'rxjs/operators';
4
+ import { TranslateService } from '@ngx-translate/core';
5
+ import { AppHelper } from '../../app/helpers/common/app.helpers';
6
+ import { JsonType } from '../../app/enums/common.enum';
7
+ import { Common } from '../../app/constants/common';
8
+ import * as i0 from "@angular/core";
9
+ export class TranslationService {
10
+ constructor() {
11
+ this.defaultLanguage = 'en';
12
+ this.currentLanguageSubject = new BehaviorSubject(this.defaultLanguage);
13
+ this.currentLanguage$ = this.currentLanguageSubject.asObservable();
14
+ this.appHelper = inject(AppHelper);
15
+ this.translateService = inject(TranslateService);
16
+ // Initialize with default language
17
+ this.translateService.setDefaultLang(this.defaultLanguage);
18
+ this.translateService.use(this.defaultLanguage);
19
+ }
20
+ /**
21
+ * Gets the current active language
22
+ */
23
+ getCurrentLanguage() {
24
+ return this.currentLanguageSubject.getValue();
25
+ }
26
+ /**
27
+ * Loads translations for a specific language from API
28
+ * @param languageCode The language code to load
29
+ * @param endpoint Optional API endpoint
30
+ */
31
+ loadTranslations(payload) {
32
+ // Return from cache if available
33
+ if (Common.i18n[payload.language]) {
34
+ return of(Common.i18n[payload.language]);
35
+ }
36
+ // Make API call to get translations
37
+ return this.appHelper.getDataJsonByType({
38
+ JsonType: JsonType.Language,
39
+ Reqtokens: { languageCode: payload.languageCode }
40
+ }).pipe(tap(response => {
41
+ this.setTranslations(payload.language, JSON.parse(response.Result));
42
+ }), catchError(error => {
43
+ console.error(`Failed to load translations for ${payload.language}`, error);
44
+ return of(null);
45
+ }));
46
+ }
47
+ /**
48
+ * Stores translations in cache and updates ngx-translate
49
+ */
50
+ setTranslations(lang, translations) {
51
+ Common.i18n[lang] = translations;
52
+ this.translateService.setTranslation(lang, translations, true);
53
+ }
54
+ /**
55
+ * Changes the current language
56
+ * @param languageCode The language code to switch to
57
+ * @param translationData Optional pre-loaded translation data
58
+ */
59
+ changeLanguage(payload) {
60
+ return this.loadTranslations(payload).pipe(tap(() => {
61
+ this.translateService.use(payload.language);
62
+ this.currentLanguageSubject.next(payload.language);
63
+ }));
64
+ }
65
+ /**
66
+ * Translates a key
67
+ * @param key Translation key
68
+ * @param params Optional parameters for interpolation
69
+ */
70
+ translate(key, params) {
71
+ return this.translateService.instant(key, params);
72
+ }
73
+ /**
74
+ * Gets translation as observable (useful for async translations)
75
+ * @param key Translation key
76
+ * @param params Optional parameters for interpolation
77
+ */
78
+ getTranslation(key, params) {
79
+ return this.translateService.get(key, params);
80
+ }
81
+ /**
82
+ * Registers external library integration (like Syncfusion)
83
+ * @param handler Function to handle the integration
84
+ */
85
+ registerIntegration(handler) {
86
+ this.currentLanguage$.subscribe(lang => {
87
+ const translations = Common.i18n[lang] || {};
88
+ handler(lang, translations);
89
+ });
90
+ }
91
+ static { this.ɵfac = function TranslationService_Factory(t) { return new (t || TranslationService)(); }; }
92
+ static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: TranslationService, factory: TranslationService.ɵfac, providedIn: 'root' }); }
93
+ }
94
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TranslationService, [{
95
+ type: Injectable,
96
+ args: [{
97
+ providedIn: 'root'
98
+ }]
99
+ }], () => [], null); })();
100
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsYXRpb24uc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvZGF0YS1hY2Nlc3Mvc3JjL2xpYi90YWItY29yZS11dGlsaXR5L2NvcmUvc2VydmljZS90cmFuc2xhdGlvbi5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ25ELE9BQU8sRUFBRSxlQUFlLEVBQWMsRUFBRSxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQ3ZELE9BQU8sRUFBRSxVQUFVLEVBQUUsR0FBRyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDakQsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDdkQsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLHNDQUFzQyxDQUFDO0FBQ2pFLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUV2RCxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sNEJBQTRCLENBQUM7O0FBS3BELE1BQU0sT0FBTyxrQkFBa0I7SUFRN0I7UUFQUSxvQkFBZSxHQUFHLElBQUksQ0FBQztRQUN2QiwyQkF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G4gIHJlZ2lzdGVySW50ZWdyYXRpb24oaGFuZGxlcjogKGxhbmc6IHN0cmluZywgdHJhbnNsYXRpb25zOiBhbnkpID0+IHZvaWQpOiB2b2lkIHtcbiAgICB0aGlzLmN1cnJlbnRMYW5ndWFnZSQuc3Vic2NyaWJlKGxhbmcgPT4ge1xuICAgICAgY29uc3QgdHJhbnNsYXRpb25zID0gQ29tbW9uLmkxOG5bbGFuZ10gfHwge307XG4gICAgICBoYW5kbGVyKGxhbmcsIHRyYW5zbGF0aW9ucyk7XG4gICAgfSk7XG4gIH1cbn0iXX0=
package/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export * from './lib/tab-core-utility/app/constants/api-constants';
2
2
  export * from './lib/tab-core-utility/app/constants/common';
3
3
  export * from './lib/tab-core-utility/app/constants/error-messages';
4
4
  export * from './lib/tab-core-utility/app/constants/storage-constants';
5
+ export * from './lib/tab-core-utility/app/crud/tab-crud.service';
5
6
  export * from './lib/tab-core-utility/app/crud/tab-get.service';
6
7
  export * from './lib/tab-core-utility/app/crud/tab-formio.service';
7
8
  export * from './lib/tab-core-utility/app/crud/tab-insert.service';
@@ -30,7 +31,7 @@ export * from './lib/tab-core-utility/app/helpers/screen/media-upload.helpers';
30
31
  export * from './lib/tab-core-utility/app/helpers/screen/plugin.helpers';
31
32
  export * from './lib/tab-core-utility/app/helpers/screen/screen.helpers';
32
33
  export * from './lib/tab-core-utility/app/interfaces/auth.interface';
33
- export * from './lib/tab-core-utility/app/interfaces/common-api.interface';
34
+ export * from './lib/tab-core-utility/app/interfaces/common.interface';
34
35
  export * from './lib/tab-core-utility/app/interfaces/user.interface';
35
36
  export * from './lib/tab-core-utility/app/interfaces/orgInfo.interface';
36
37
  export * from './lib/tab-core-utility/app/interfaces/schema.interface';
@@ -49,11 +50,11 @@ export * from './lib/tab-core-utility/auth/auth.service';
49
50
  export * from './lib/tab-core-utility/auth/local-storage.service';
50
51
  export * from './lib/tab-core-utility/auth/session-storage.service';
51
52
  export * from './lib/tab-core-utility/auth/idb-storage.service';
52
- export * from './lib/tab-core-utility/core/error-handler/error-handler-interceptor.service';
53
- export * from './lib/tab-core-utility/core/error-handler/error-handler.store';
54
- export * from './lib/tab-core-utility/core/error-handler/models/error-handler.state';
55
53
  export * from './lib/tab-core-utility/core/http-client/api-url.token';
56
54
  export * from './lib/tab-core-utility/core/http-client/api.service';
57
- export * from './lib/tab-core-utility/core/util/auth.utils';
58
- export * from './lib/tab-core-utility/store/orginfo.store';
59
- export * from './lib/tab-core-utility/store/auth.store';
55
+ export * from './lib/tab-core-utility/core/service/translation.service';
56
+ export * from './lib/tab-core-utility/core/service/notification.service';
57
+ export * from './lib/tab-core-utility/core/service/confirmation.service';
58
+ export * from './lib/tab-core-utility/core/pipe/translate.pipe';
59
+ export * from './lib/tab-core-utility/core/provider/translation.provider';
60
+ export * from './lib/tab-core-utility/core/provider/notification.provider';
@@ -5,5 +5,6 @@ export declare class Common {
5
5
  static tabUserPermissions: any;
6
6
  static tabAppObjectAccess: any;
7
7
  static staticToken: any;
8
+ static i18n: any;
8
9
  static init(config: any): void;
9
10
  }
@@ -1,4 +1,4 @@
1
- import { CommonApiResponse, NextStatusPayload, UpdateStatusPayload } from "../interfaces/common-api.interface";
1
+ import { CommonApiResponse, NextStatusPayload, UpdateStatusPayload } from "../interfaces/common.interface";
2
2
  import { Observable } from "rxjs";
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class TabBlueprintService {
@@ -0,0 +1,70 @@
1
+ import { CommonApiResponse, CrudDeletePayload, CrudGetPayload, CrudInsertPayload, CrudUpdatePayload } from "../interfaces/common.interface";
2
+ import { Observable } from "rxjs";
3
+ import * as i0 from "@angular/core";
4
+ export declare class TabCrudService {
5
+ private readonly _metadataHelper;
6
+ private readonly _requestResponseHelper;
7
+ private readonly _dsqHelper;
8
+ private readonly _apiService;
9
+ /**
10
+ * Returns the AppObjectModel from the given payload.
11
+ * @param payload The payload with either dataSourceQueryIdOrName or appObjectIdOrName.
12
+ * @returns The AppObjectModel.
13
+ */
14
+ private getAppObjectFromPayload;
15
+ /**
16
+ * Filters out invalid fields from the provided data based on the AppObjectModel.
17
+ * Optionally retains primary key fields.
18
+ *
19
+ * @param data The data object to filter.
20
+ * @param appObject The AppObjectModel used to validate the fields.
21
+ * @param keepPrimaryKey Optional flag to retain primary key fields. Defaults to false.
22
+ * @returns A new object with only valid fields.
23
+ */
24
+ private filterValidAppObjectFields;
25
+ /**
26
+ * Generates a where clause based on the criteria provided.
27
+ *
28
+ * @param criteria The criteria object to generate the where clause from.
29
+ * @param crudTableName The CRUD table name to use in the where clause.
30
+ * @returns A new APIFilterCriteria object with the generated where clause.
31
+ */
32
+ private generateWhereClause;
33
+ /**
34
+ * Executes a GET request to retrieve data from the specified data source query.
35
+ * @param payload The payload containing the criteria for the query and the AppObjectModel ID.
36
+ * @param headers Optional headers for the request.
37
+ * @returns An observable of the response from the API.
38
+ */
39
+ get(payload: CrudGetPayload, headers?: any): Observable<CommonApiResponse>;
40
+ /**
41
+ * Inserts data into the specified table.
42
+ * @param payload The payload containing the data to insert and the AppObjectModel ID.
43
+ * @param headers Optional headers for the request.
44
+ * @returns An observable of the response from the API.
45
+ */
46
+ insert(payload: CrudInsertPayload, headers?: any): Observable<CommonApiResponse>;
47
+ /**
48
+ * Updates data in the specified table.
49
+ * @param payload The payload containing the data to update, the criteria for the update, and the AppObjectModel ID.
50
+ * @param headers Optional headers for the request.
51
+ * @returns An observable of the response from the API.
52
+ */
53
+ update(payload: CrudUpdatePayload, headers?: any): Observable<CommonApiResponse>;
54
+ /**
55
+ * Deletes data from the specified table.
56
+ * @param payload The payload containing the criteria for the delete and the AppObjectModel ID.
57
+ * @param headers Optional headers for the request.
58
+ * @returns An observable of the response from the API.
59
+ */
60
+ delete(payload: CrudDeletePayload, headers?: any): Observable<CommonApiResponse>;
61
+ /**
62
+ * Executes a stored procedure using raw SQL.
63
+ * @param sp The stored procedure query string.
64
+ * @param headers Optional headers for the request.
65
+ * @returns The result of the API POST request.
66
+ */
67
+ executeSp(sp: string, headers?: any): Observable<CommonApiResponse>;
68
+ static ɵfac: i0.ɵɵFactoryDeclaration<TabCrudService, never>;
69
+ static ɵprov: i0.ɵɵInjectableDeclaration<TabCrudService>;
70
+ }
@@ -1,4 +1,4 @@
1
- import { CommonApiResponse, GetScreenConfig, ProcessRequestPayload } from "../interfaces/common-api.interface";
1
+ import { CommonApiResponse, GetScreenConfig, ProcessRequestPayload } from "../interfaces/common.interface";
2
2
  import { Observable } from "rxjs";
3
3
  import { BuildFormComponentType } from "../enums/common.enum";
4
4
  import * as i0 from "@angular/core";
@@ -1,5 +1,5 @@
1
1
  import { Observable } from "rxjs";
2
- import { CommonApiResponse } from "../interfaces/common-api.interface";
2
+ import { CommonApiResponse } from "../interfaces/common.interface";
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class TabReleaseService {
5
5
  private readonly apiService;
@@ -24,3 +24,9 @@ export declare enum JsonType {
24
24
  AppObjectAccess = 1,
25
25
  Language = 2
26
26
  }
27
+ export declare enum NotificationType {
28
+ Success = "success",
29
+ Warning = "warning",
30
+ Error = "error",
31
+ Info = "info"
32
+ }
@@ -1,5 +1,5 @@
1
1
  import { Observable } from 'rxjs';
2
- import { CloneDsqPayload, CommonApiResponse, GetDataJsonByTypePayload, PerformanceAnalyticsPayload, RefreshGlobalSearchDataPayload, RegisterAppObjectsPayload, ReportPayload, ScreenPerformancePayload, SyncAppFieldsPayload } from '../../interfaces/common-api.interface';
2
+ import { CloneDsqPayload, CommonApiResponse, GetDataJsonByTypePayload, PerformanceAnalyticsPayload, RefreshGlobalSearchDataPayload, RegisterAppObjectsPayload, ReportPayload, ScreenPerformancePayload, SyncAppFieldsPayload } from '../../interfaces/common.interface';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class AppHelper {
5
5
  private readonly apiService;
@@ -1,5 +1,5 @@
1
1
  import { Observable } from 'rxjs';
2
- import { TemplateParsePayload } from '../../interfaces/common-api.interface';
2
+ import { TemplateParsePayload } from '../../interfaces/common.interface';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class TemplateHelper {
5
5
  private readonly apiService;
@@ -1,5 +1,5 @@
1
1
  import { Observable } from 'rxjs';
2
- import { CommonApiResponse, UploadMediaFilesPayload } from '../../interfaces/common-api.interface';
2
+ import { CommonApiResponse, UploadMediaFilesPayload } from '../../interfaces/common.interface';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class MediaUploadHelper {
5
5
  private readonly apiService;
@@ -1,4 +1,5 @@
1
- import { JsonType } from "../enums/common.enum";
1
+ import { IndividualConfig } from "ngx-toastr";
2
+ import { JsonType, NotificationType } from "../enums/common.enum";
2
3
  export interface ApiResponse {
3
4
  requestId: string;
4
5
  isSuccess: boolean;
@@ -89,3 +90,44 @@ export interface ScreenPerformancePayload {
89
90
  appObjectIds: string[];
90
91
  };
91
92
  }
93
+ export interface translatePayload {
94
+ language: string;
95
+ languageCode: number;
96
+ }
97
+ export interface BaseNotificationOptions {
98
+ message: string;
99
+ title?: string;
100
+ configuration?: Partial<IndividualConfig<any>> | undefined;
101
+ }
102
+ export interface NotificationOptions extends BaseNotificationOptions {
103
+ type: NotificationType;
104
+ }
105
+ export interface ConfirmationOptions {
106
+ title: string;
107
+ message: string;
108
+ primaryOption?: string;
109
+ secondaryOption?: string;
110
+ displayHeader?: boolean;
111
+ displayFooter?: boolean;
112
+ displayBody?: boolean;
113
+ displayPrimaryButton?: boolean;
114
+ displaySecondaryButton?: boolean;
115
+ displayCloseButton?: boolean;
116
+ }
117
+ export interface CrudBasePayload {
118
+ appObjectIdOrName?: string;
119
+ dataSourceQueryIdOrName?: string;
120
+ }
121
+ export interface CrudInsertPayload extends CrudBasePayload {
122
+ data: any;
123
+ }
124
+ export interface CrudUpdatePayload extends CrudInsertPayload {
125
+ criteria: any;
126
+ }
127
+ export interface CrudDeletePayload extends CrudBasePayload {
128
+ criteria: any;
129
+ }
130
+ export interface CrudGetPayload {
131
+ dataSourceQueryIdOrName: string;
132
+ criteria: any;
133
+ }
@@ -1,4 +1,4 @@
1
- import { RecordInfo } from "./common-api.interface";
1
+ import { RecordInfo } from "./common.interface";
2
2
  export interface OrgInfoResponse {
3
3
  RequestId: string;
4
4
  IsSuccess: boolean;
@@ -9,10 +9,7 @@ export declare function validateJSON(str: string): boolean;
9
9
  * @param obj The input object to create dynamic data from
10
10
  * @returns The formatted array
11
11
  */
12
- export declare function createDynamicData(obj: any): {
13
- AppFieldID: string;
14
- Value: any;
15
- }[] | null;
12
+ export declare function createDynamicData(obj: any): any;
16
13
  /**
17
14
  * Removes blank values from the input object
18
15
  * @param dataObj The input object to remove blank values from
@@ -1,6 +1,6 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { ChangePasswordUserRequest, LoginUserRequest, NewUserRequest, RefreshTokenRequest, RegisterTenant, ResetPasswordUserRequest, UserDetailsRequest } from '../app/interfaces/auth.interface';
3
- import { CommonApiResponse } from '../app/interfaces/common-api.interface';
3
+ import { CommonApiResponse } from '../app/interfaces/common.interface';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class AuthService {
6
6
  /**
@@ -20,7 +20,7 @@ export declare class ApiService {
20
20
  * @param reqHeader The custom headers for the request (optional).
21
21
  * @returns An Observable emitting the response data of type T.
22
22
  */
23
- post<T, D>(endPointName: string, data?: D, reqHeader?: HttpHeaders): Observable<any>;
23
+ post<T, D>(endPointName: string, data?: D, reqHeader?: HttpHeaders): Observable<D | any>;
24
24
  /**
25
25
  * Makes an HTTP PUT request to update data at the specified URL.
26
26
  * @param endPointName The URL for the HTTP PUT request.
@@ -0,0 +1,11 @@
1
+ import { PipeTransform, OnDestroy } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class TranslatePipe implements PipeTransform, OnDestroy {
4
+ private translationService;
5
+ private langChangeSub;
6
+ constructor();
7
+ transform(key: string, params?: any): string;
8
+ ngOnDestroy(): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslatePipe, never>;
10
+ static ɵpipe: i0.ɵɵPipeDeclaration<TranslatePipe, "translate", true>;
11
+ }
@@ -0,0 +1,8 @@
1
+ import { GlobalConfig } from 'ngx-toastr';
2
+ /**
3
+ * Provides the Toastr service with the specified configuration.
4
+ *
5
+ * @param {Partial<GlobalConfig>} [config] - Optional configuration object.
6
+ * @returns {any[]} - An array of providers.
7
+ */
8
+ export declare function provideNotification(config?: Partial<GlobalConfig>): import("@angular/core").EnvironmentProviders[];
@@ -0,0 +1,6 @@
1
+ import { TranslateLoader } from '@ngx-translate/core';
2
+ import { Observable } from 'rxjs';
3
+ export declare class CustomTranslateLoader implements TranslateLoader {
4
+ getTranslation(lang: string): Observable<any>;
5
+ }
6
+ export declare function provideTranslation(): import("@angular/core").EnvironmentProviders[];
@@ -0,0 +1,53 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import { ConfirmationOptions } from '../../app/interfaces/common.interface';
4
+ import * as i0 from "@angular/core";
5
+ export declare class ConfirmationService {
6
+ private conformationEmitter;
7
+ private dialogEmitter;
8
+ private removeEmitter;
9
+ /**
10
+ * Opens a confirmation dialog with the given title and message.
11
+ *
12
+ * This function will emit a value on the confirmation dialog emitter when the dialog is closed.
13
+ * The value emitted will be a boolean indicating whether the dialog was confirmed or canceled.
14
+ *
15
+ * @param {Object} config - The configuration for the dialog. Must have a 'title' and a 'message' property.
16
+ * @returns {Observable<boolean>} - An observable that emits a boolean indicating whether the dialog was confirmed or canceled.
17
+ */
18
+ confirm(config?: ConfirmationOptions): Observable<boolean>;
19
+ /**
20
+ * Closes the confirmation dialog.
21
+ *
22
+ * This function emits a value on the remove emitter to close the confirmation dialog.
23
+ *
24
+ * @returns {void}
25
+ */
26
+ closeDialog(): void;
27
+ /**
28
+ * Returns the emitter for the confirmation dialog.
29
+ *
30
+ * This emitter will emit a boolean indicating whether the dialog was confirmed or canceled.
31
+ *
32
+ * @returns {EventEmitter<boolean>} - The emitter for the confirmation dialog.
33
+ */
34
+ getConformationEmitter(): EventEmitter<boolean>;
35
+ /**
36
+ * Returns the emitter for the confirmation dialog.
37
+ *
38
+ * This emitter will emit the config for the confirmation dialog.
39
+ *
40
+ * @returns {EventEmitter<any>} - The emitter for the confirmation dialog.
41
+ */
42
+ getDialogEmitter(): EventEmitter<ConfirmationOptions>;
43
+ /**
44
+ * Returns the emitter for closing the confirmation dialog.
45
+ *
46
+ * This emitter can be subscribed to in order to close the confirmation dialog.
47
+ *
48
+ * @returns {EventEmitter<any>} - The emitter for closing the confirmation dialog.
49
+ */
50
+ getRemoveEmitter(): EventEmitter<boolean>;
51
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmationService, never>;
52
+ static ɵprov: i0.ɵɵInjectableDeclaration<ConfirmationService>;
53
+ }