@techextensor/tab-core-utility 2.2.11 → 2.2.14

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 (99) hide show
  1. package/esm2022/index.mjs +65 -65
  2. package/esm2022/lib/tab-core-utility/app/constants/api-constants.mjs +35 -0
  3. package/esm2022/lib/tab-core-utility/app/constants/common.mjs +33 -0
  4. package/esm2022/lib/tab-core-utility/app/constants/error-messages.mjs +13 -0
  5. package/esm2022/lib/tab-core-utility/app/constants/storage-constants.mjs +16 -0
  6. package/esm2022/lib/tab-core-utility/app/crud/tab-delete.service.mjs +145 -0
  7. package/esm2022/lib/tab-core-utility/app/crud/tab-formio.service.mjs +40 -0
  8. package/esm2022/lib/tab-core-utility/app/crud/tab-get.service.mjs +131 -0
  9. package/esm2022/lib/tab-core-utility/app/crud/tab-insert.service.mjs +77 -0
  10. package/esm2022/lib/tab-core-utility/app/crud/tab-update.service.mjs +105 -0
  11. package/esm2022/lib/tab-core-utility/app/crud/tab-workflow.service.mjs +43 -0
  12. package/esm2022/lib/tab-core-utility/app/enums/controllers.enum.mjs +26 -0
  13. package/esm2022/lib/tab-core-utility/app/enums/dsq.enum.mjs +48 -0
  14. package/esm2022/lib/tab-core-utility/app/enums/permission.enum.mjs +20 -0
  15. package/esm2022/lib/tab-core-utility/app/enums/query.enum.mjs +14 -0
  16. package/esm2022/lib/tab-core-utility/app/enums/workflow.enum.mjs +37 -0
  17. package/esm2022/lib/tab-core-utility/app/helpers/common/app.helpers.mjs +84 -0
  18. package/esm2022/lib/tab-core-utility/app/helpers/common/dsq.helpers.mjs +70 -0
  19. package/esm2022/lib/tab-core-utility/app/helpers/common/req-res.helpers.mjs +64 -0
  20. package/esm2022/lib/tab-core-utility/app/helpers/common/template.helpers.mjs +58 -0
  21. package/esm2022/lib/tab-core-utility/app/helpers/common/where-clause.helpers.mjs +208 -0
  22. package/esm2022/lib/tab-core-utility/app/helpers/screen/forms.helpers.mjs +38 -0
  23. package/esm2022/lib/tab-core-utility/app/helpers/screen/grid-column-data.helpers.mjs +78 -0
  24. package/esm2022/lib/tab-core-utility/app/helpers/screen/grid.helpers.mjs +112 -0
  25. package/esm2022/lib/tab-core-utility/app/helpers/screen/media-upload.helpers.mjs +77 -0
  26. package/esm2022/lib/tab-core-utility/app/helpers/screen/plugin.helpers.mjs +55 -0
  27. package/esm2022/lib/tab-core-utility/app/helpers/screen/screen.helpers.mjs +26 -0
  28. package/esm2022/lib/tab-core-utility/app/interfaces/grid.interface.mjs +3 -0
  29. package/esm2022/lib/tab-core-utility/app/interfaces/orgInfo.interface.mjs +2 -0
  30. package/esm2022/lib/tab-core-utility/app/interfaces/schema.interface.mjs +2 -0
  31. package/esm2022/lib/tab-core-utility/app/models/api-query.class.mjs +47 -0
  32. package/esm2022/lib/tab-core-utility/app/models/app-object.class.mjs +30 -0
  33. package/esm2022/lib/tab-core-utility/app/models/common.class.mjs +12 -0
  34. package/esm2022/lib/tab-core-utility/app/models/data-source-queries.class.mjs +31 -0
  35. package/esm2022/lib/tab-core-utility/app/utils/filter.util.mjs +75 -0
  36. package/esm2022/lib/tab-core-utility/app/utils/form-builder.util.mjs +39 -0
  37. package/esm2022/lib/tab-core-utility/app/utils/json.util.mjs +138 -0
  38. package/esm2022/lib/tab-core-utility/app/utils/operators.util.mjs +129 -0
  39. package/esm2022/lib/tab-core-utility/app/utils/req-res.util.mjs +168 -0
  40. package/esm2022/lib/tab-core-utility/app/utils/tab-app.util.mjs +99 -0
  41. package/esm2022/lib/tab-core-utility/auth/idb-storage.service.mjs +69 -0
  42. package/esm2022/lib/tab-core-utility/auth/session-storage.service.mjs +52 -0
  43. package/esm2022/lib/tab-core-utility/core/error-handler/error-handler-interceptor.service.mjs +26 -0
  44. package/esm2022/lib/tab-core-utility/core/error-handler/error-handler.store.mjs +21 -0
  45. package/esm2022/lib/tab-core-utility/core/error-handler/models/error-handler.state.mjs +5 -0
  46. package/esm2022/lib/tab-core-utility/core/util/auth.utils.mjs +21 -0
  47. package/esm2022/lib/tab-core-utility/store/auth.store.mjs +43 -0
  48. package/esm2022/lib/tab-core-utility/store/orginfo.store.mjs +42 -0
  49. package/esm2022/lib/tab-core-utility/store/schema.store.mjs +68 -0
  50. package/index.d.ts +54 -0
  51. package/lib/tab-core-utility/app/constants/api-constants.d.ts +32 -0
  52. package/lib/tab-core-utility/app/constants/common.d.ts +8 -0
  53. package/lib/tab-core-utility/app/constants/error-messages.d.ts +6 -0
  54. package/lib/tab-core-utility/app/constants/storage-constants.d.ts +15 -0
  55. package/lib/tab-core-utility/app/crud/tab-delete.service.d.ts +51 -0
  56. package/lib/tab-core-utility/app/crud/tab-formio.service.d.ts +17 -0
  57. package/lib/tab-core-utility/app/crud/tab-get.service.d.ts +58 -0
  58. package/lib/tab-core-utility/app/crud/tab-insert.service.d.ts +37 -0
  59. package/lib/tab-core-utility/app/crud/tab-update.service.d.ts +14 -0
  60. package/lib/tab-core-utility/app/crud/tab-workflow.service.d.ts +20 -0
  61. package/lib/tab-core-utility/app/enums/controllers.enum.d.ts +24 -0
  62. package/lib/tab-core-utility/app/enums/dsq.enum.d.ts +42 -0
  63. package/lib/tab-core-utility/app/enums/permission.enum.d.ts +16 -0
  64. package/lib/tab-core-utility/app/enums/query.enum.d.ts +11 -0
  65. package/lib/tab-core-utility/app/enums/workflow.enum.d.ts +30 -0
  66. package/lib/tab-core-utility/app/helpers/common/app.helpers.d.ts +33 -0
  67. package/lib/tab-core-utility/app/helpers/common/dsq.helpers.d.ts +32 -0
  68. package/lib/tab-core-utility/app/helpers/common/req-res.helpers.d.ts +62 -0
  69. package/lib/tab-core-utility/app/helpers/common/template.helpers.d.ts +25 -0
  70. package/lib/tab-core-utility/app/helpers/common/where-clause.helpers.d.ts +82 -0
  71. package/lib/tab-core-utility/app/helpers/screen/forms.helpers.d.ts +11 -0
  72. package/lib/tab-core-utility/app/helpers/screen/grid-column-data.helpers.d.ts +33 -0
  73. package/lib/tab-core-utility/app/helpers/screen/grid.helpers.d.ts +63 -0
  74. package/lib/tab-core-utility/app/helpers/screen/media-upload.helpers.d.ts +38 -0
  75. package/lib/tab-core-utility/app/helpers/screen/plugin.helpers.d.ts +25 -0
  76. package/lib/tab-core-utility/app/helpers/screen/screen.helpers.d.ts +11 -0
  77. package/lib/tab-core-utility/app/interfaces/grid.interface.d.ts +110 -0
  78. package/lib/tab-core-utility/app/interfaces/orgInfo.interface.d.ts +31 -0
  79. package/lib/tab-core-utility/app/interfaces/schema.interface.d.ts +11 -0
  80. package/lib/tab-core-utility/app/models/api-query.class.d.ts +69 -0
  81. package/lib/tab-core-utility/app/models/app-object.class.d.ts +74 -0
  82. package/lib/tab-core-utility/app/models/common.class.d.ts +24 -0
  83. package/lib/tab-core-utility/app/models/data-source-queries.class.d.ts +95 -0
  84. package/lib/tab-core-utility/app/utils/filter.util.d.ts +30 -0
  85. package/lib/tab-core-utility/app/utils/form-builder.util.d.ts +13 -0
  86. package/lib/tab-core-utility/app/utils/json.util.d.ts +25 -0
  87. package/lib/tab-core-utility/app/utils/operators.util.d.ts +21 -0
  88. package/lib/tab-core-utility/app/utils/req-res.util.d.ts +61 -0
  89. package/lib/tab-core-utility/app/utils/tab-app.util.d.ts +48 -0
  90. package/lib/tab-core-utility/auth/idb-storage.service.d.ts +14 -0
  91. package/lib/tab-core-utility/auth/session-storage.service.d.ts +22 -0
  92. package/lib/tab-core-utility/core/error-handler/error-handler-interceptor.service.d.ts +3 -0
  93. package/lib/tab-core-utility/core/error-handler/error-handler.store.d.ts +10 -0
  94. package/lib/tab-core-utility/core/error-handler/models/error-handler.state.d.ts +5 -0
  95. package/lib/tab-core-utility/core/util/auth.utils.d.ts +9 -0
  96. package/lib/tab-core-utility/store/auth.store.d.ts +19 -0
  97. package/lib/tab-core-utility/store/orginfo.store.d.ts +22 -0
  98. package/lib/tab-core-utility/store/schema.store.d.ts +32 -0
  99. package/package.json +1 -1
@@ -0,0 +1,61 @@
1
+ import { HttpHeaders } from '@angular/common/http';
2
+ import { AppObject } from '../models/app-object.class';
3
+ import { AppFields } from '../models/data-source-queries.class';
4
+ /**
5
+ * Delete a key from the response object
6
+ *
7
+ * @param response - The response object
8
+ * @param key - The key to be deleted
9
+ * @returns any - The updated response object
10
+ */
11
+ export declare function deleteKeyFromResponse(response: any, key: string): any;
12
+ /**
13
+ * Remove the primary key from the response object
14
+ *
15
+ * @param response - The response object
16
+ * @param field - The field to be removed as primary key
17
+ * @returns any - The updated response object
18
+ */
19
+ export declare function removePrimaryKey(response: any, field: string): any;
20
+ /**
21
+ * Remove multiple primary keys from the response object
22
+ *
23
+ * @param response - The response object
24
+ * @param fields - The array of fields to be removed as primary keys
25
+ * @returns any - The updated response object
26
+ */
27
+ export declare function removeMultiplePrimaryKey(response: any, fields: any): any;
28
+ /**
29
+ * Get the HttpHeaders for API requests
30
+ *
31
+ * @returns HttpHeaders | null - The HttpHeaders object or null
32
+ */
33
+ export declare function getHeaders(): HttpHeaders | null;
34
+ /**
35
+ * Get the primary key fields from the AppObject
36
+ *
37
+ * @param appObject - The AppObject
38
+ * @returns AppFields[] | null - The array of primary key fields or null
39
+ */
40
+ export declare function getPrimaryKeyFields(appObject: AppObject): AppFields[] | null;
41
+ /**
42
+ * Get the edit record ID from the response object
43
+ *
44
+ * @param response - The response object
45
+ * @param fieldName - The field name for the edit record ID
46
+ * @returns any - The edit record ID
47
+ */
48
+ export declare function getEditRecordId(response: any, fieldName: any): any;
49
+ /**
50
+ * Generate the fields schema based on the AppFields
51
+ *
52
+ * @param fields - The AppFields object
53
+ * @returns any - The generated fields schema
54
+ */
55
+ export declare function generateFieldsSchema(fields: AppFields): {};
56
+ /**
57
+ * Get the HttpHeaders for form data requests
58
+ *
59
+ * @returns HttpHeaders | null - The HttpHeaders object or null
60
+ */
61
+ export declare function getFormDataHeaders(): HttpHeaders | null;
@@ -0,0 +1,48 @@
1
+ import { AppObject } from '../models/app-object.class';
2
+ /** Get the DataSourceQuery ID from the selected AppObject's DataSourceQuery array
3
+ * @param dsqList - The list of DataSourceQueries
4
+ * @param table - The table name
5
+ * @param like - The like string
6
+ * @returns string - The ID of the DataSourceQuery
7
+ */
8
+ export declare function getDsqIdfromSelectedAppObjectDSQArray(dsqList: any, table: string, like: string): any;
9
+ /** Get the AppObject based on the provided ID
10
+ * @param id - The ID of the AppObject
11
+ * @returns AppObject | null - The found AppObject or null
12
+ */
13
+ export declare function getAppObject(id: string): any;
14
+ /**
15
+ * Get the AppObject from the DataSourceQuery ID
16
+ * @param dsqId - The DataSourceQuery ID
17
+ * @returns AppObject | null - The found AppObject or null
18
+ */
19
+ export declare function getAppObjectFromDataSourceQueryID(dsqId: string): any;
20
+ /**
21
+ * Get the DataSourceQuery ID from the QueryName and table
22
+ * @param table - The table name
23
+ * @param dsq - The DataSourceQuery name
24
+ * @returns any - The found DataSourceQuery
25
+ */
26
+ export declare function getDsqIDFromQueryName(table: string, dsq: string): any;
27
+ /**
28
+ * Get the Data from the DataSourceQuery ID
29
+ *
30
+ * @param dsqId - The DataSourceQuery ID
31
+ * @returns any - The found Data
32
+ */
33
+ export declare function getDataFromDataSourceQueryID(dsqId: string): any;
34
+ /**
35
+ * Synchronize AppObject fields with the response
36
+ *
37
+ * @param response - The response object
38
+ * @param appObject - The AppObject
39
+ * @returns any - The synchronized response object
40
+ */
41
+ export declare function syncAppObjectFields(response: any, appObject: AppObject): any;
42
+ /**
43
+ * Get the AppObject based on the SystemDBTableName
44
+ *
45
+ * @param tableName - The SystemDBTableName
46
+ * @returns AppObject | null - The found AppObject or null
47
+ */
48
+ export declare function getAppObjectFromSystemDBTableName(tableName: string): any;
@@ -0,0 +1,14 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class IdbService {
3
+ private readonly dbName;
4
+ private readonly dbVersion;
5
+ private dbPromise;
6
+ constructor();
7
+ setItem(key: string, data: any): Promise<void>;
8
+ private setItemIndexedDb;
9
+ getItem(key: string): Promise<any>;
10
+ private getItemIndexedDb;
11
+ clearIndexedDB(): Promise<void>;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<IdbService, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<IdbService>;
14
+ }
@@ -0,0 +1,22 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class SessionStorageService {
3
+ /**
4
+ * Set data in session storage
5
+ * @param key - Key to store the data
6
+ * @param data - Data to be stored
7
+ */
8
+ setSessionStorage: (key: string, data: any) => void;
9
+ /**
10
+ * Get data from session storage
11
+ * @param key - Key to retrieve the data
12
+ * @returns The data stored in session storage
13
+ */
14
+ getSessionStorage: (key: string) => any;
15
+ /**
16
+ * Remove data from session storage
17
+ * @param key - Key of the data to be removed
18
+ */
19
+ removeSessionStorage: (key: string) => void;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<SessionStorageService, never>;
21
+ static ɵprov: i0.ɵɵInjectableDeclaration<SessionStorageService>;
22
+ }
@@ -0,0 +1,3 @@
1
+ import { HttpEvent, HttpHandlerFn, HttpRequest } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ export declare const errorHandlingInterceptor: (request: HttpRequest<any>, next: HttpHandlerFn) => Observable<HttpEvent<any>>;
@@ -0,0 +1,10 @@
1
+ import { HttpErrorResponse } from '@angular/common/http';
2
+ export declare const ErrorHandlerStore: import("@angular/core").Type<{
3
+ code: import("@angular/core").Signal<number>;
4
+ message: import("@angular/core").Signal<string | undefined>;
5
+ handleError401: (error: HttpErrorResponse) => void;
6
+ handleError404: (error: HttpErrorResponse) => void;
7
+ } & import("@ngrx/signals").StateSignal<{
8
+ code: number;
9
+ message: string | undefined;
10
+ }>>;
@@ -0,0 +1,5 @@
1
+ export interface ErrorHandlerState {
2
+ code: number;
3
+ message: string | undefined;
4
+ }
5
+ export declare const errorHandlerInitialState: ErrorHandlerState;
@@ -0,0 +1,9 @@
1
+ export declare class AuthUtils {
2
+ /**
3
+ * Is token expired?
4
+ *
5
+ * @param token
6
+ * @param offsetSeconds
7
+ */
8
+ static isTokenExpired(): boolean;
9
+ }
@@ -0,0 +1,19 @@
1
+ import { Observable } from "rxjs";
2
+ import { LoginUserRequest } from "../app/interfaces/auth.interface";
3
+ export declare const authStore: import("@angular/core").Type<{
4
+ token: import("@angular/core").Signal<string>;
5
+ name: import("@angular/core").Signal<string>;
6
+ id: import("@angular/core").Signal<any>;
7
+ email: import("@angular/core").Signal<string>;
8
+ avatar: import("@angular/core").Signal<string>;
9
+ status: import("@angular/core").Signal<string>;
10
+ checkUserlogin: () => boolean;
11
+ login: (API_URL: string, credentials: LoginUserRequest) => Observable<any>;
12
+ } & import("@ngrx/signals").StateSignal<{
13
+ token: string;
14
+ name: string;
15
+ id: any;
16
+ email: string;
17
+ avatar: string;
18
+ status: string;
19
+ }>>;
@@ -0,0 +1,22 @@
1
+ export declare const OrgInfoStore: import("@angular/core").Type<{
2
+ FavIcon: import("@angular/core").Signal<string>;
3
+ Org_Brand_Color: import("@angular/core").Signal<string>;
4
+ Org_Logo: import("@angular/core").Signal<string>;
5
+ Org_Menu_Logo: import("@angular/core").Signal<string>;
6
+ ShowSignUp: import("@angular/core").Signal<string>;
7
+ TagLine: import("@angular/core").Signal<string>;
8
+ profileScreenID: import("@angular/core").Signal<string>;
9
+ workFlowName: import("@angular/core").Signal<string>;
10
+ OrganizationName: import("@angular/core").Signal<string>;
11
+ getOrganizationInformation: (orgInfoData: any) => void;
12
+ } & import("@ngrx/signals").StateSignal<{
13
+ FavIcon: string;
14
+ Org_Brand_Color: string;
15
+ Org_Logo: string;
16
+ Org_Menu_Logo: string;
17
+ ShowSignUp: string;
18
+ TagLine: string;
19
+ profileScreenID: string;
20
+ workFlowName: string;
21
+ OrganizationName: string;
22
+ }>>;
@@ -0,0 +1,32 @@
1
+ export declare const SchemaStore: import("@angular/core").Type<{
2
+ ID: import("@angular/core").Signal<any>;
3
+ AppName: import("@angular/core").Signal<any>;
4
+ DisplayName: import("@angular/core").Signal<any>;
5
+ PlatformVersion: import("@angular/core").Signal<any>;
6
+ AppVersion: import("@angular/core").Signal<any>;
7
+ Description: import("@angular/core").Signal<any>;
8
+ AppObjects: import("@angular/core").Signal<import("../app/models/app-object.class").AppObject[]>;
9
+ AppScreens: import("@angular/core").Signal<import("../app/models/app-object.class").AppScreen[]>;
10
+ AppMenus: import("@angular/core").Signal<import("../app/models/app-object.class").AppMenu[]>;
11
+ AppConfigurations: import("@angular/core").Signal<import("@techextensor/tab-core-utility").Configurations[]>;
12
+ Roles?: import("@angular/core").Signal<import("@techextensor/tab-core-utility").Role[] | undefined> | undefined;
13
+ Profiles?: import("@angular/core").Signal<import("@techextensor/tab-core-utility").Profile[] | undefined> | undefined;
14
+ WorkFlows: import("@angular/core").Signal<any[]>;
15
+ Plugins: import("@angular/core").Signal<any[]>;
16
+ getSchemaInformation: () => Promise<void>;
17
+ } & import("@ngrx/signals").StateSignal<{
18
+ ID: any;
19
+ AppName: any;
20
+ DisplayName: any;
21
+ PlatformVersion: any;
22
+ AppVersion: any;
23
+ Description: any;
24
+ AppObjects: import("../app/models/app-object.class").AppObject[];
25
+ AppScreens: import("../app/models/app-object.class").AppScreen[];
26
+ AppMenus: import("../app/models/app-object.class").AppMenu[];
27
+ AppConfigurations: import("@techextensor/tab-core-utility").Configurations[];
28
+ Roles?: import("@techextensor/tab-core-utility").Role[] | undefined;
29
+ Profiles?: import("@techextensor/tab-core-utility").Profile[] | undefined;
30
+ WorkFlows: any[];
31
+ Plugins: any[];
32
+ }>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@techextensor/tab-core-utility",
3
- "version": "2.2.11",
3
+ "version": "2.2.14",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.0",
6
6
  "@angular/core": "^17.3.0",