@techextensor/tab-core-utility 2.1.7 → 2.1.8

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 (177) hide show
  1. package/esm2022/index.mjs +64 -0
  2. package/esm2022/lib/tab-core-utility/app/constants/api-constants.mjs +33 -0
  3. package/esm2022/lib/tab-core-utility/app/constants/common.mjs +25 -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-get.service.mjs +131 -0
  8. package/esm2022/lib/tab-core-utility/app/crud/tab-insert.service.mjs +77 -0
  9. package/esm2022/lib/tab-core-utility/app/crud/tab-update.service.mjs +105 -0
  10. package/esm2022/lib/tab-core-utility/app/crud/tab-workflow.service.mjs +43 -0
  11. package/esm2022/lib/tab-core-utility/app/enums/controllers.enum.mjs +26 -0
  12. package/esm2022/lib/tab-core-utility/app/enums/dsq.enum.mjs +48 -0
  13. package/esm2022/lib/tab-core-utility/app/enums/permission.enum.mjs +20 -0
  14. package/esm2022/lib/tab-core-utility/app/enums/query.enum.mjs +14 -0
  15. package/esm2022/lib/tab-core-utility/app/enums/workflow.enum.mjs +37 -0
  16. package/esm2022/lib/tab-core-utility/app/helpers/common/app.helpers.mjs +68 -0
  17. package/esm2022/lib/tab-core-utility/app/helpers/common/dsq.helpers.mjs +70 -0
  18. package/esm2022/lib/tab-core-utility/app/helpers/common/req-res.helpers.mjs +64 -0
  19. package/esm2022/lib/tab-core-utility/app/helpers/common/where-clause.helpers.mjs +208 -0
  20. package/esm2022/lib/tab-core-utility/app/helpers/screen/forms.helpers.mjs +38 -0
  21. package/esm2022/lib/tab-core-utility/app/helpers/screen/grid-column-data.helpers.mjs +78 -0
  22. package/esm2022/lib/tab-core-utility/app/helpers/screen/grid.helpers.mjs +112 -0
  23. package/esm2022/lib/tab-core-utility/app/helpers/screen/media-upload.helpers.mjs +77 -0
  24. package/esm2022/lib/tab-core-utility/app/helpers/screen/plugin.helpers.mjs +55 -0
  25. package/esm2022/lib/tab-core-utility/app/helpers/screen/screen.helpers.mjs +26 -0
  26. package/esm2022/lib/tab-core-utility/app/interfaces/auth.interface.mjs +2 -0
  27. package/esm2022/lib/tab-core-utility/app/interfaces/common-api.interface.mjs +2 -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/interfaces/user.interface.mjs +2 -0
  32. package/esm2022/lib/tab-core-utility/app/models/api-query.class.mjs +47 -0
  33. package/esm2022/lib/tab-core-utility/app/models/app-object.class.mjs +30 -0
  34. package/esm2022/lib/tab-core-utility/app/models/common.class.mjs +12 -0
  35. package/esm2022/lib/tab-core-utility/app/models/data-source-queries.class.mjs +31 -0
  36. package/esm2022/lib/tab-core-utility/app/utils/filter.util.mjs +75 -0
  37. package/esm2022/lib/tab-core-utility/app/utils/form-builder.util.mjs +39 -0
  38. package/esm2022/lib/tab-core-utility/app/utils/json.util.mjs +138 -0
  39. package/esm2022/lib/tab-core-utility/app/utils/operators.util.mjs +129 -0
  40. package/esm2022/lib/tab-core-utility/app/utils/req-res.util.mjs +168 -0
  41. package/esm2022/lib/tab-core-utility/app/utils/tab-app.util.mjs +99 -0
  42. package/esm2022/lib/tab-core-utility/auth/auth.service.mjs +74 -0
  43. package/esm2022/lib/tab-core-utility/auth/idb-storage.service.mjs +69 -0
  44. package/esm2022/lib/tab-core-utility/auth/local-storage.service.mjs +52 -0
  45. package/esm2022/lib/tab-core-utility/auth/session-storage.service.mjs +52 -0
  46. package/esm2022/lib/tab-core-utility/core/error-handler/error-handler-interceptor.service.mjs +26 -0
  47. package/esm2022/lib/tab-core-utility/core/error-handler/error-handler.store.mjs +21 -0
  48. package/esm2022/lib/tab-core-utility/core/error-handler/models/error-handler.state.mjs +5 -0
  49. package/esm2022/lib/tab-core-utility/core/http-client/api-url.token.mjs +4 -0
  50. package/esm2022/lib/tab-core-utility/core/http-client/api.service.mjs +99 -0
  51. package/esm2022/lib/tab-core-utility/core/util/auth.utils.mjs +21 -0
  52. package/esm2022/lib/tab-core-utility/store/auth.store.mjs +43 -0
  53. package/esm2022/lib/tab-core-utility/store/orginfo.store.mjs +42 -0
  54. package/esm2022/lib/tab-core-utility/store/schema.store.mjs +68 -0
  55. package/esm2022/techextensor-tab-core-utility.mjs +5 -0
  56. package/{src/index.ts → index.d.ts} +53 -77
  57. package/lib/tab-core-utility/app/constants/api-constants.d.ts +30 -0
  58. package/lib/tab-core-utility/app/constants/common.d.ts +8 -0
  59. package/lib/tab-core-utility/app/constants/error-messages.d.ts +6 -0
  60. package/lib/tab-core-utility/app/constants/storage-constants.d.ts +15 -0
  61. package/lib/tab-core-utility/app/crud/tab-delete.service.d.ts +51 -0
  62. package/lib/tab-core-utility/app/crud/tab-get.service.d.ts +58 -0
  63. package/lib/tab-core-utility/app/crud/tab-insert.service.d.ts +37 -0
  64. package/lib/tab-core-utility/app/crud/tab-update.service.d.ts +14 -0
  65. package/lib/tab-core-utility/app/crud/tab-workflow.service.d.ts +20 -0
  66. package/lib/tab-core-utility/app/enums/controllers.enum.d.ts +24 -0
  67. package/lib/tab-core-utility/app/enums/dsq.enum.d.ts +42 -0
  68. package/lib/tab-core-utility/app/enums/permission.enum.d.ts +16 -0
  69. package/lib/tab-core-utility/app/enums/query.enum.d.ts +11 -0
  70. package/lib/tab-core-utility/app/enums/workflow.enum.d.ts +30 -0
  71. package/lib/tab-core-utility/app/helpers/common/app.helpers.d.ts +31 -0
  72. package/lib/tab-core-utility/app/helpers/common/dsq.helpers.d.ts +32 -0
  73. package/lib/tab-core-utility/app/helpers/common/req-res.helpers.d.ts +62 -0
  74. package/lib/tab-core-utility/app/helpers/common/where-clause.helpers.d.ts +82 -0
  75. package/lib/tab-core-utility/app/helpers/screen/forms.helpers.d.ts +11 -0
  76. package/lib/tab-core-utility/app/helpers/screen/grid-column-data.helpers.d.ts +33 -0
  77. package/lib/tab-core-utility/app/helpers/screen/grid.helpers.d.ts +63 -0
  78. package/lib/tab-core-utility/app/helpers/screen/media-upload.helpers.d.ts +38 -0
  79. package/lib/tab-core-utility/app/helpers/screen/plugin.helpers.d.ts +25 -0
  80. package/lib/tab-core-utility/app/helpers/screen/screen.helpers.d.ts +11 -0
  81. package/{src/lib/tab-core-utility/app/interfaces/auth.interface.ts → lib/tab-core-utility/app/interfaces/auth.interface.d.ts} +15 -18
  82. package/lib/tab-core-utility/app/interfaces/common-api.interface.d.ts +24 -0
  83. package/lib/tab-core-utility/app/interfaces/grid.interface.d.ts +110 -0
  84. package/lib/tab-core-utility/app/interfaces/orgInfo.interface.d.ts +31 -0
  85. package/lib/tab-core-utility/app/interfaces/schema.interface.d.ts +11 -0
  86. package/lib/tab-core-utility/app/interfaces/user.interface.d.ts +84 -0
  87. package/lib/tab-core-utility/app/models/api-query.class.d.ts +69 -0
  88. package/lib/tab-core-utility/app/models/app-object.class.d.ts +74 -0
  89. package/lib/tab-core-utility/app/models/common.class.d.ts +24 -0
  90. package/lib/tab-core-utility/app/models/data-source-queries.class.d.ts +95 -0
  91. package/lib/tab-core-utility/app/utils/filter.util.d.ts +30 -0
  92. package/lib/tab-core-utility/app/utils/form-builder.util.d.ts +13 -0
  93. package/lib/tab-core-utility/app/utils/json.util.d.ts +25 -0
  94. package/lib/tab-core-utility/app/utils/operators.util.d.ts +21 -0
  95. package/lib/tab-core-utility/app/utils/req-res.util.d.ts +61 -0
  96. package/lib/tab-core-utility/app/utils/tab-app.util.d.ts +48 -0
  97. package/lib/tab-core-utility/auth/auth.service.d.ts +53 -0
  98. package/lib/tab-core-utility/auth/idb-storage.service.d.ts +14 -0
  99. package/lib/tab-core-utility/auth/local-storage.service.d.ts +22 -0
  100. package/lib/tab-core-utility/auth/session-storage.service.d.ts +22 -0
  101. package/lib/tab-core-utility/core/error-handler/error-handler-interceptor.service.d.ts +3 -0
  102. package/lib/tab-core-utility/core/error-handler/error-handler.store.d.ts +10 -0
  103. package/lib/tab-core-utility/core/error-handler/models/error-handler.state.d.ts +5 -0
  104. package/lib/tab-core-utility/core/http-client/api-url.token.d.ts +3 -0
  105. package/lib/tab-core-utility/core/http-client/api.service.d.ts +65 -0
  106. package/lib/tab-core-utility/core/util/auth.utils.d.ts +9 -0
  107. package/lib/tab-core-utility/store/auth.store.d.ts +19 -0
  108. package/lib/tab-core-utility/store/orginfo.store.d.ts +22 -0
  109. package/lib/tab-core-utility/store/schema.store.d.ts +32 -0
  110. package/package.json +31 -18
  111. package/.eslintrc.json +0 -92
  112. package/README.md +0 -7
  113. package/jest.config.ts +0 -22
  114. package/ng-package.json +0 -7
  115. package/project.json +0 -42
  116. package/src/lib/tab-core-utility/app/constants/api-constants.ts +0 -33
  117. package/src/lib/tab-core-utility/app/constants/common.ts +0 -34
  118. package/src/lib/tab-core-utility/app/constants/error-messages.ts +0 -21
  119. package/src/lib/tab-core-utility/app/constants/storage-constants.ts +0 -17
  120. package/src/lib/tab-core-utility/app/crud/tab-delete.service.ts +0 -144
  121. package/src/lib/tab-core-utility/app/crud/tab-get.service.ts +0 -160
  122. package/src/lib/tab-core-utility/app/crud/tab-insert.service.ts +0 -75
  123. package/src/lib/tab-core-utility/app/crud/tab-update.service.ts +0 -105
  124. package/src/lib/tab-core-utility/app/crud/tab-workflow.service.ts +0 -39
  125. package/src/lib/tab-core-utility/app/enums/controllers.enum.ts +0 -24
  126. package/src/lib/tab-core-utility/app/enums/dsq.enum.ts +0 -46
  127. package/src/lib/tab-core-utility/app/enums/permission.enum.ts +0 -18
  128. package/src/lib/tab-core-utility/app/enums/query.enum.ts +0 -12
  129. package/src/lib/tab-core-utility/app/enums/workflow.enum.ts +0 -35
  130. package/src/lib/tab-core-utility/app/helpers/common/app.helpers.ts +0 -65
  131. package/src/lib/tab-core-utility/app/helpers/common/dsq.helpers.ts +0 -80
  132. package/src/lib/tab-core-utility/app/helpers/common/req-res.helpers.ts +0 -75
  133. package/src/lib/tab-core-utility/app/helpers/common/where-clause.helpers.ts +0 -262
  134. package/src/lib/tab-core-utility/app/helpers/screen/forms.helpers.ts +0 -33
  135. package/src/lib/tab-core-utility/app/helpers/screen/grid-column-data.helpers.ts +0 -88
  136. package/src/lib/tab-core-utility/app/helpers/screen/grid.helpers.ts +0 -113
  137. package/src/lib/tab-core-utility/app/helpers/screen/media-upload.helpers.ts +0 -74
  138. package/src/lib/tab-core-utility/app/helpers/screen/plugin.helpers.ts +0 -52
  139. package/src/lib/tab-core-utility/app/helpers/screen/screen.helpers.ts +0 -20
  140. package/src/lib/tab-core-utility/app/interfaces/common-api.interface.ts +0 -27
  141. package/src/lib/tab-core-utility/app/interfaces/grid.interface.ts +0 -118
  142. package/src/lib/tab-core-utility/app/interfaces/orgInfo.interface.ts +0 -34
  143. package/src/lib/tab-core-utility/app/interfaces/schema.interface.ts +0 -11
  144. package/src/lib/tab-core-utility/app/interfaces/user.interface.ts +0 -91
  145. package/src/lib/tab-core-utility/app/models/api-query.class.ts +0 -92
  146. package/src/lib/tab-core-utility/app/models/app-object.class.ts +0 -87
  147. package/src/lib/tab-core-utility/app/models/common.class.ts +0 -30
  148. package/src/lib/tab-core-utility/app/models/data-source-queries.class.ts +0 -114
  149. package/src/lib/tab-core-utility/app/utils/filter.util.ts +0 -78
  150. package/src/lib/tab-core-utility/app/utils/form-builder.util.ts +0 -31
  151. package/src/lib/tab-core-utility/app/utils/json.util.ts +0 -137
  152. package/src/lib/tab-core-utility/app/utils/operators.util.ts +0 -129
  153. package/src/lib/tab-core-utility/app/utils/req-res.util.ts +0 -189
  154. package/src/lib/tab-core-utility/app/utils/tab-app.util.ts +0 -131
  155. package/src/lib/tab-core-utility/auth/auth.service.spec.ts +0 -167
  156. package/src/lib/tab-core-utility/auth/auth.service.ts +0 -91
  157. package/src/lib/tab-core-utility/auth/idb-storage.service.ts +0 -77
  158. package/src/lib/tab-core-utility/auth/local-storage.service.spec.ts +0 -47
  159. package/src/lib/tab-core-utility/auth/local-storage.service.ts +0 -46
  160. package/src/lib/tab-core-utility/auth/session-storage.service.spec.ts +0 -47
  161. package/src/lib/tab-core-utility/auth/session-storage.service.ts +0 -46
  162. package/src/lib/tab-core-utility/core/error-handler/error-handler-interceptor.service.ts +0 -32
  163. package/src/lib/tab-core-utility/core/error-handler/error-handler.store.spec.ts +0 -16
  164. package/src/lib/tab-core-utility/core/error-handler/error-handler.store.ts +0 -26
  165. package/src/lib/tab-core-utility/core/error-handler/models/error-handler.state.ts +0 -9
  166. package/src/lib/tab-core-utility/core/http-client/api-url.token.ts +0 -4
  167. package/src/lib/tab-core-utility/core/http-client/api.service.spec.ts +0 -18
  168. package/src/lib/tab-core-utility/core/http-client/api.service.ts +0 -105
  169. package/src/lib/tab-core-utility/core/util/auth.utils.ts +0 -22
  170. package/src/lib/tab-core-utility/store/auth.store.ts +0 -54
  171. package/src/lib/tab-core-utility/store/orginfo.store.ts +0 -57
  172. package/src/lib/tab-core-utility/store/schema.store.ts +0 -85
  173. package/src/test-setup.ts +0 -8
  174. package/tsconfig.json +0 -29
  175. package/tsconfig.lib.json +0 -17
  176. package/tsconfig.lib.prod.json +0 -7
  177. package/tsconfig.spec.json +0 -16
@@ -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,18 +1,31 @@
1
- {
2
- "name": "@techextensor/tab-core-utility",
3
- "version": "2.1.7",
4
- "peerDependencies": {
5
- "@angular/common": "^17.3.0",
6
- "@angular/core": "^17.3.0",
7
- "rxjs": "^7.8.1",
8
- "@ngrx/signals": "^17.1.1",
9
- "@angular/router": "^17.3.0"
10
- },
11
- "dependencies": {
12
- "tslib": "^2.3.0"
13
- },
14
- "sideEffects": false,
15
- "publishConfig": {
16
- "access": "public"
17
- }
18
- }
1
+ {
2
+ "name": "@techextensor/tab-core-utility",
3
+ "version": "2.1.8",
4
+ "peerDependencies": {
5
+ "@angular/common": "^17.3.0",
6
+ "@angular/core": "^17.3.0",
7
+ "rxjs": "^7.8.1",
8
+ "@ngrx/signals": "^17.1.1",
9
+ "@angular/router": "^17.3.0"
10
+ },
11
+ "dependencies": {
12
+ "tslib": "^2.3.0"
13
+ },
14
+ "sideEffects": false,
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "module": "esm2022/techextensor-tab-core-utility.mjs",
19
+ "typings": "index.d.ts",
20
+ "exports": {
21
+ "./package.json": {
22
+ "default": "./package.json"
23
+ },
24
+ ".": {
25
+ "types": "./index.d.ts",
26
+ "esm2022": "./esm2022/techextensor-tab-core-utility.mjs",
27
+ "esm": "./esm2022/techextensor-tab-core-utility.mjs",
28
+ "default": "./esm2022/techextensor-tab-core-utility.mjs"
29
+ }
30
+ }
31
+ }
package/.eslintrc.json DELETED
@@ -1,92 +0,0 @@
1
- {
2
- "extends": ["../../.eslintrc.json"],
3
- "ignorePatterns": ["!**/*"],
4
- "overrides": [
5
- {
6
- "files": ["*.ts"],
7
- "extends": [
8
- "plugin:@nx/angular",
9
- "plugin:@angular-eslint/template/process-inline-templates"
10
- ],
11
- "rules": {
12
- "@angular-eslint/directive-selector": [
13
- "error",
14
- {
15
- "type": "attribute",
16
- "prefix": "ngl",
17
- "style": "camelCase"
18
- }
19
- ],
20
- "@angular-eslint/component-selector": [
21
- "error",
22
- {
23
- "type": "element",
24
- "prefix": "ngl",
25
- "style": "kebab-case"
26
- }
27
- ],
28
- "@nx/enforce-module-boundaries": [
29
- "error",
30
- {
31
- "enforceBuildableLibDependency": true,
32
- "allow": [],
33
- "depConstraints": [
34
- {
35
- "sourceTag": "type:e2e",
36
- "onlyDependOnLibsWithTags": ["type:app"]
37
- },
38
- {
39
- "sourceTag": "type:app",
40
- "onlyDependOnLibsWithTags": ["type:feature", "type:util"]
41
- },
42
- {
43
- "sourceTag": "type:feature",
44
- "onlyDependOnLibsWithTags": [
45
- "type:data-access",
46
- "type:ui",
47
- "type:util"
48
- ]
49
- },
50
- {
51
- "sourceTag": "type:ui",
52
- "onlyDependOnLibsWithTags": ["type:ui", "type:util"]
53
- },
54
- {
55
- "sourceTag": "type:data-access",
56
- "onlyDependOnLibsWithTags": ["type:api", "type:util"]
57
- },
58
- {
59
- "sourceTag": "scope:shared",
60
- "onlyDependOnLibsWithTags": ["scope:shared"]
61
- },
62
- {
63
- "sourceTag": "scope:tab-core-utility",
64
- "onlyDependOnLibsWithTags": [
65
- "scope:shared",
66
- "scope:tab-core-utility"
67
- ]
68
- }
69
- ]
70
- }
71
- ]
72
- }
73
- },
74
- {
75
- "files": ["*.html"],
76
- "extends": ["plugin:@nx/angular-template"],
77
- "rules": {}
78
- },
79
- {
80
- "files": ["*.json"],
81
- "parser": "jsonc-eslint-parser",
82
- "rules": {
83
- "@nx/dependency-checks": [
84
- "error",
85
- {
86
- "ignoredDependencies": ["tslib"]
87
- }
88
- ]
89
- }
90
- }
91
- ]
92
- }
package/README.md DELETED
@@ -1,7 +0,0 @@
1
- # tab-core-utility
2
-
3
- This library was generated with [Nx](https://nx.dev).
4
-
5
- ## Running unit tests
6
-
7
- Run `nx test tab-core-utility` to execute the unit tests.
package/jest.config.ts DELETED
@@ -1,22 +0,0 @@
1
- /* eslint-disable */
2
- export default {
3
- displayName: 'tab-core-utility',
4
- preset: '../../jest.preset.js',
5
- setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
6
- coverageDirectory: '../../coverage/libs/data-access',
7
- transform: {
8
- '^.+\\.(ts|mjs|js|html)$': [
9
- 'jest-preset-angular',
10
- {
11
- tsconfig: '<rootDir>/tsconfig.spec.json',
12
- stringifyContentPathRegex: '\\.(html|svg)$',
13
- },
14
- ],
15
- },
16
- transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
17
- snapshotSerializers: [
18
- 'jest-preset-angular/build/serializers/no-ng-attributes',
19
- 'jest-preset-angular/build/serializers/ng-snapshot',
20
- 'jest-preset-angular/build/serializers/html-comment',
21
- ],
22
- };
package/ng-package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../../dist/libs/data-access",
4
- "lib": {
5
- "entryFile": "src/index.ts"
6
- }
7
- }
package/project.json DELETED
@@ -1,42 +0,0 @@
1
- {
2
- "name": "tab-core-utility",
3
- "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
- "sourceRoot": "libs/data-access/src",
5
- "prefix": "ngl",
6
- "projectType": "library",
7
- "tags": [],
8
- "targets": {
9
- "build": {
10
- "executor": "@nx/angular:ng-packagr-lite",
11
- "outputs": ["{workspaceRoot}/dist/{projectRoot}"],
12
- "options": {
13
- "project": "libs/data-access/ng-package.json"
14
- },
15
- "configurations": {
16
- "production": {
17
- "tsConfig": "libs/data-access/tsconfig.lib.prod.json"
18
- },
19
- "development": {
20
- "tsConfig": "libs/data-access/tsconfig.lib.json"
21
- }
22
- },
23
- "defaultConfiguration": "production"
24
- },
25
- "test": {
26
- "executor": "@nx/jest:jest",
27
- "outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
28
- "options": {
29
- "jestConfig": "libs/data-access/jest.config.ts"
30
- }
31
- },
32
- "lint": {
33
- "executor": "@nx/eslint:lint"
34
- },
35
- "release": {
36
- "executor": "nx-release:build-update-publish",
37
- "options": {
38
- "libName": "tab-core-utility"
39
- }
40
- }
41
- }
42
- }
@@ -1,33 +0,0 @@
1
- export const API = {
2
- applicationIdentifier: '02dPlGXCKCPy', //phoenix
3
- applicationIdentifierForPMS: 'qqmXweGB1DbG', // pms
4
- // endpoint: 'http://192.168.10.181:8441/api/v1/',
5
- // workflowEndPoint: 'http://192.168.10.181/',
6
- novuBackendUrl: 'https://novuapi.techextensor.com',
7
- novuSocketUrl: 'https://novuws.techextensor.com',
8
-
9
- insert: 'CRUD/Insert',
10
- update: 'CRUD/Update',
11
- delete: 'CRUD/Delete',
12
- select: 'CRUD/Select',
13
- getDSQ: 'CRUD/DSQ',
14
- getScreen: 'Layout/GetScreen',
15
- getListFromDsq: 'List/Get?dataSourceQueryId=',
16
- buildApp: 'Application/BuildApp',
17
- getSchema: 'Application/GetSchemaFile',
18
- login: 'identity/login',
19
- pluginUpload: 'Plugins/Upload',
20
- getFile: 'Plugins/GetFileById',
21
- getAllPluginByType: 'Plugins/GetAll',
22
- templateParse: 'Template/Parse',
23
- publishApp: 'Application/PublishApp',
24
- getrecord: 'GetRecord',
25
- rawSQL: 'CRUD/RawSQL?query=',
26
- fileUpload: 'File/Upload',
27
- getMediaFile: 'File/GetFile',
28
- getHistory: 'GetHistory',
29
- changePassword: 'identity/ChangePassword',
30
- restpassword: 'identity/ResetPassword',
31
- getImage: 'File/GetImage',
32
- pmjayImport: 'ImportData',
33
- };
@@ -1,34 +0,0 @@
1
- // import { inject } from '@angular/core';
2
- import { IdbService } from '../../auth/idb-storage.service';
3
- import { SessionStorageService } from '../../auth/session-storage.service';
4
- import { Application } from '../models/app-object.class';
5
- import { StorageConstants } from './storage-constants';
6
-
7
- // const sessionStorageService = inject(SessionStorageService);
8
- const sessionStorageService = new SessionStorageService();
9
- const idbService = new IdbService();
10
-
11
-
12
- export const Common = {
13
- applicationCode: sessionStorageService.getSessionStorage(StorageConstants.applicationCode)
14
- ? String(
15
- sessionStorageService.getSessionStorage(StorageConstants.applicationCode)
16
- )
17
- : StorageConstants.TAB,
18
- staticApplicationCode:'Tab_Backup',
19
- tabJson: null,
20
-
21
- appInfo: null,
22
- orgId: '1B602229-57F9-4DF8-860C-586A96E5BC68',
23
- staticToken:
24
- 'bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJoYXJkaWsudGhha2thckB0ZWNoZXh0ZW5zb3IuY29tIiwianRpIjoiMDBlMzA2ZTctMjE3ZS00MzI2LTg0ZDEtNmZjY2E1NmYwMWY0IiwiZW1haWwiOiJoYXJkaWsudGhha2thckB0ZWNoZXh0ZW5zb3IuY29tIiwiaWQiOiIwYjYwMDY5ZS02ZTM4LTQ0YTUtODMyYS1lMTBmYWQ3MTUyYjYiLCJsb2NhbGVTZXR0aW5nIjoie1wiVGltZVpvbmVJZFwiOlwiSW5kaWEgU3RhbmRhcmQgVGltZVwiLFwiTG9jYWxlXCI6MCxcIkxhbmd1YWdlXCI6MCxcIkRhdGVGb3JtYXRcIjpcImRkLU1NLXl5eXlcIixcIlRpbWVGb3JtYXRcIjpcImhoOm1tOnNzIHR0XCIsXCJOdW1iZXJGb3JtYXRcIjpudWxsLFwiQ3VycmVuY3lcIjpudWxsfSIsInJvbGUiOiJBZG1pbmlzdHJhdG9yIiwiUm9sZUlkcyI6IjJjYjQzMWE2LTUxZWUtNDYzZS04NDBjLTNhMThjNWZlOTE1MCIsIm5iZiI6MTcxNDAyNTkwNSwiZXhwIjoxNzQ1NTYxOTA1LCJpYXQiOjE3MTQwMjU5MDV9.FrguHY0px3wnitfgsodTJpexFr5Fzvbx5USDBF66mQA',
25
- };
26
-
27
-
28
- async function getLocalStorageTabData() {
29
- let data:any = await idbService.getItem(StorageConstants.tabData)
30
- if(data){
31
- Common.tabJson= JSON.parse(data);
32
- }
33
- }
34
- getLocalStorageTabData();
@@ -1,21 +0,0 @@
1
- export const ServerErrorMessages: {
2
- [key: string]: string;
3
- } = {
4
- DELETE_CONFLICT:
5
- 'The DELETE statement conflicted with the REFERENCE constraint',
6
- UNIQUE_KEY_CONSTRAINT_USER: "Violation of UNIQUE KEY constraint 'U_Name'.",
7
- INSUFFICIENT_ACCESS: 'Insufficient Acces',
8
- CONVERSATION_FAILED_STRING_TO_UNIQUEIDENTIFIER:
9
- 'Conversation failed when converting from a character string to uniqueidentifier',
10
- };
11
-
12
- export const UserFriendlyMessages = {
13
- [ServerErrorMessages['DELETE_CONFLICT']]:
14
- 'Unable to Delete Record. Please check associated records and try again.',
15
- [ServerErrorMessages['UNIQUE_KEY_CONSTRAINT_USER']]:
16
- 'Username already exist.',
17
- [ServerErrorMessages['INSUFFICIENT_ACCESS']]:
18
- "You don't have enough permission to perform this action.",
19
- [ServerErrorMessages['CONVERSATION_FAILED_STRING_TO_UNIQUEIDENTIFIER']]:
20
- 'Something went wrong!',
21
- };
@@ -1,17 +0,0 @@
1
- export const StorageConstants = {
2
- tabData: 'tabData',
3
- formJson: 'FormJson',
4
- schemaJSON: 'schemaJSON',
5
- orgInfo: 'orgInfo',
6
- applicationCode: 'applicationCode',
7
- TAB: 'TAB',
8
- userInfo: 'userInfo',
9
- token: 'token',
10
- staticToken: 'staticToken',
11
- screenId: 'screenId',
12
- editScreenQueryParam: 'editScreenQueryParam',
13
- layoutScreenId: 'layoutScreenId',
14
- tabScreen: 'tabScreen',
15
-
16
-
17
- };
@@ -1,144 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
-
3
- import { Injectable, inject } from "@angular/core";
4
- import { DSQHelper } from "../helpers/common/dsq.helpers";
5
- import { ScreenHelper } from "../helpers/screen/screen.helpers";
6
- import { WhereClauseHelper } from "../helpers/common/where-clause.helpers";
7
- import { RequestResponseHelper } from "../helpers/common/req-res.helpers";
8
- import { AppObject, AppScreen } from "../models/app-object.class";
9
- import { getAppObject, getAppObjectFromSystemDBTableName, getDataFromDataSourceQueryID } from "../utils/tab-app.util";
10
- import { getEditRecordId, getPrimaryKeyFields } from "../utils/req-res.util";
11
- import { APIDeleteQuery, APIFilterCriteria } from "../models/api-query.class";
12
- import { QueryType } from "../enums/query.enum";
13
-
14
-
15
-
16
-
17
- @Injectable({ providedIn: 'root' })
18
- export class TabDeleteService {
19
- private readonly dsqHelper = inject(DSQHelper);
20
- private readonly screenHelper = inject(ScreenHelper);
21
- private readonly whereClauseHelper = inject(WhereClauseHelper);
22
- private readonly requestResponseHelper = inject(RequestResponseHelper);
23
-
24
- /**
25
- * Deletes a record based on the given screen ID, data, and object ID.
26
- * @param screenId The ID of the screen.
27
- * @param data The data of the record to delete.
28
- * @param objectIDToSave The object ID of the record to save.
29
- * @returns An Observable emitting the response of the delete operation.
30
- */
31
- deleteRecord(screenId: string, data: any, objectIDToSave: any) {
32
- let fields;
33
- let appObject: AppObject = new AppObject();
34
- let crudTableName;
35
- if (screenId) {
36
- // Retrieve screen information and fields
37
- const screen: AppScreen = this.screenHelper.getScreen(screenId);
38
- const screenDataSource = getDataFromDataSourceQueryID(screen.DataSourceQuery);
39
- fields = screenDataSource.Fields;
40
- appObject = getAppObject(screenDataSource.ObjectID_Tosave);
41
- crudTableName = appObject.SystemDBTableName;
42
- }
43
- if (objectIDToSave) {
44
- // Retrieve fields based on object ID
45
- fields = [];
46
- appObject = getAppObject(objectIDToSave);
47
- appObject.Fields.forEach(element => {
48
- fields.push({ Field: element })
49
- });
50
- crudTableName = appObject.SystemDBTableName;
51
- }
52
- const primaryKeyFields: any = getPrimaryKeyFields(appObject);
53
- if (appObject) {
54
- let whereClause: any = APIFilterCriteria;
55
- if (primaryKeyFields && primaryKeyFields.length > 1) {
56
- // Bind where clause for delete operation with multiple primary keys
57
- whereClause = this.whereClauseHelper.bindWhereClauseForDeleteWithMultiplePrimaryKeys(data.data, primaryKeyFields, crudTableName);
58
- } else if (primaryKeyFields && primaryKeyFields.length === 1) {
59
- // Bind where clause for delete operation with single primary key
60
- const recordId = getEditRecordId(data.data, primaryKeyFields[0]?.FieldName);
61
- whereClause = this.whereClauseHelper.bindWhereClauseForDelete(fields, recordId, primaryKeyFields[0]?.FieldName, crudTableName);
62
- }
63
- const dataObj = this.requestResponseHelper.deletePayload(crudTableName, whereClause);
64
- return this.delete(dataObj);
65
- }
66
- return null;
67
- }
68
-
69
- /**
70
- * Deletes a record by the specified table name and primary key value.
71
- * @param tableName The name of the table.
72
- * @param primaryKey The primary key field.
73
- * @param primaryKeyValue The value of the primary key.
74
- * @returns An Observable emitting the response of the delete operation.
75
- */
76
- deleteRecordByTable(tableName: string, primaryKey: string, primaryKeyValue: string) {
77
- // Bind where clause for delete operation by table
78
- const whereClause: APIFilterCriteria = this.whereClauseHelper.bindWhereClauseForDeleteByTable(tableName, primaryKey, primaryKeyValue);
79
- const dataObj = this.requestResponseHelper.deletePayload(tableName, whereClause);
80
- return this.delete(dataObj);
81
- }
82
-
83
- /**
84
- * Executes the delete operation.
85
- * @param data The delete query payload.
86
- * @returns An Observable emitting the response of the delete operation.
87
- */
88
- delete(data: APIDeleteQuery) {
89
- // Display delete confirmation popup
90
- const deleteConfirmation = this.deleteRecordPopup();
91
- if (deleteConfirmation) {
92
- return this.dsqHelper.executeQuery(data, QueryType.Delete);
93
- } else {
94
- return null;
95
- }
96
- }
97
-
98
- /**
99
- * Displays a delete confirmation popup.
100
- * @returns True if the user confirms the delete operation, otherwise false.
101
- */
102
- deleteRecordPopup() {
103
- const text = "You are going to delete selected record. Are you sure want to delete the same?";
104
- if (confirm(text) == true) {
105
- return true;
106
- } else {
107
- return false;
108
- }
109
- }
110
-
111
- /**
112
- * Deletes multiple records by table name and values.
113
- * @param tableName The name of the table.
114
- * @param values The values of the records to delete.
115
- * @returns An Observable emitting the response of the delete operation.
116
- */
117
- deleteMultipleRecordByTable(tableName: string, values: any) {
118
- // Retrieve app object and primary key fields
119
- const appObject = getAppObjectFromSystemDBTableName(tableName);
120
- const primaryKeyFields: any = getPrimaryKeyFields(appObject);
121
- // Generate values array from data
122
- const valueArray = this.generateValuesArrayFromData(values, primaryKeyFields[0]?.FieldName)
123
- // Bind where clause for delete operation using IN operator by table
124
- const whereClause: APIFilterCriteria = this.whereClauseHelper.bindWhereClauseForDeleteUsingInOperatorByTable(tableName, primaryKeyFields[0]?.FieldName, valueArray);
125
- const dataObj = this.requestResponseHelper.deletePayload(tableName, whereClause);
126
- return this.delete(dataObj);
127
- }
128
-
129
- /**
130
- * Generates a values array from the data.
131
- * @param dataArray The array of data.
132
- * @param key The key to extract from each element.
133
- * @returns The array of values.
134
- */
135
- generateValuesArrayFromData(dataArray: any, key: any) {
136
- const valueArray: any = []
137
- if (dataArray && dataArray.length) {
138
- dataArray.forEach((element: any) => {
139
- valueArray.push(element[key])
140
- });
141
- }
142
- return valueArray
143
- }
144
- }
@@ -1,160 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
-
3
- import { HttpHeaders } from "@angular/common/http";
4
- import { Injectable, inject } from "@angular/core";
5
- import { ApiService } from "../../core/http-client/api.service";
6
- import { DSQHelper } from "../helpers/common/dsq.helpers";
7
- import { getHeaders } from "../utils/req-res.util";
8
- import { API } from "../constants/api-constants";
9
- import { getAppObject } from "../utils/tab-app.util";
10
- import { Common } from "../constants/common";
11
- import { APISelectQuery } from "../models/api-query.class";
12
- import { FilterValueType } from "../enums/dsq.enum";
13
- import { QueryType } from "../enums/query.enum";
14
-
15
-
16
- @Injectable({ providedIn: 'root' })
17
- export class TabGetService {
18
- private readonly apiService = inject(ApiService);
19
- private readonly dsqHelper = inject(DSQHelper);
20
-
21
- /**
22
- * Execute RAW DSQ with Name
23
- * @param data - Object containing AppObjectName and DSQName
24
- * @returns Response from the API
25
- */
26
- executeRAWDSQWithName(data: any): any {
27
- const headers = getHeaders();
28
- if (headers) {
29
- return this.apiService.post(
30
- `${API.getDSQ}/${data.AppObjectName}/${data.DSQName}`,
31
- data,
32
- headers
33
- );
34
- }
35
- return null;
36
- }
37
-
38
- /**
39
- * Get Record
40
- * @param params - Parameters for the request
41
- * @returns Response from the API
42
- */
43
- getRecord(params: any): any {
44
- const headers = getHeaders();
45
- if (headers) {
46
- return this.apiService.get(`${API.getrecord}`, params, headers);
47
- }
48
- return null;
49
- }
50
-
51
- /**
52
- * Execute Raw SQL
53
- * @param data - Data for the request
54
- * @returns Response from the API
55
- */
56
- executeRawSql(data: any): any {
57
- const headers = getHeaders();
58
- if (headers) {
59
- return this.apiService.post(
60
- `${API.rawSQL}${data}`,
61
- '',
62
- headers
63
- );
64
- }
65
- return null;
66
- }
67
-
68
- /**
69
- * Get History
70
- * @param appObjectId - ID of the application object
71
- * @param recordIds - Array of record IDs
72
- * @returns Response from the API
73
- */
74
- getHistory(appObjectId: string, recordIds: string[]): any {
75
- const data: any = {};
76
- if (appObjectId && recordIds) {
77
- const appObjectName = getAppObject(appObjectId)?.ObjectName;
78
- const headers = getHeaders();
79
- if (appObjectName && headers) {
80
- data.ObjectName = appObjectName;
81
- data.RecordIds = recordIds;
82
- return this.apiService.post(
83
- `${API.getHistory}`,
84
- data,
85
- headers
86
- );
87
- }
88
- }
89
- return null;
90
- }
91
-
92
- /**
93
- * Change Password
94
- * @param data - Data for changing password
95
- * @returns Response from the API
96
- */
97
- changePassword(data: any): any {
98
- const headers = getHeaders();
99
- if (headers) {
100
- return this.apiService.post(
101
- `${API.changePassword}`,
102
- data,
103
- headers
104
- );
105
- }
106
- }
107
-
108
- /**
109
- * Reset Password
110
- * @param data - Data for resetting password
111
- * @returns Response from the API
112
- */
113
- resetPassword(data: any): any {
114
- const headers = new HttpHeaders({
115
- 'Content-Type': 'application/json',
116
- applicationCode: Common.applicationCode,
117
- });
118
- return this.apiService.post(
119
- `${API.restpassword}`,
120
- data,
121
- headers
122
- );
123
- }
124
-
125
- /**
126
- * PMJAY Import
127
- * @param data - Data for PMJAY import
128
- * @returns Response from the API
129
- */
130
- pmjayImport(data: any): any {
131
- const headers = getHeaders();
132
- if (headers) {
133
- return this.apiService.post(
134
- `${API.pmjayImport}`,
135
- data,
136
- headers
137
- );
138
- }
139
- }
140
-
141
- /**
142
- * Executes a select query with optional parameters
143
- * @param data - The select query data
144
- * @param parameters - Optional parameters to be applied to the query
145
- * @returns Result of the select query execution
146
- */
147
- selectExecutor(data: APISelectQuery, parameters?: any): any {
148
- if (parameters && Object.keys(parameters).length) {
149
- data?.WhereClause?.Filters.forEach((element: any) => {
150
- if (
151
- element.ValueType === FilterValueType.Parameter &&
152
- parameters[element.FieldID]
153
- ) {
154
- element.Value = parameters[element.FieldID];
155
- }
156
- });
157
- }
158
- return this.dsqHelper.executeQuery(data, QueryType.Select);
159
- }
160
- }