cat-qw-lib 0.0.2 → 0.0.3

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 (248) hide show
  1. package/fesm2022/cat-qw-lib.mjs +2033 -0
  2. package/fesm2022/cat-qw-lib.mjs.map +1 -0
  3. package/index.d.ts +5 -0
  4. package/lib/admin/action-admin/action-admin.module.d.ts +9 -0
  5. package/lib/admin/action-admin/components/admin-action-form/admin-action-form.component.d.ts +5 -0
  6. package/lib/admin/action-admin/components/admin-action-list/admin-action-list.component.d.ts +12 -0
  7. package/lib/admin/action-admin/models/action.model.d.ts +9 -0
  8. package/lib/admin/action-admin/state/action.service.d.ts +13 -0
  9. package/lib/admin/action-admin/state/action.store.d.ts +8 -0
  10. package/lib/admin/api-admin/api-admin.module.d.ts +18 -0
  11. package/lib/admin/api-admin/components/api-admin-form/api-admin-form.component.d.ts +30 -0
  12. package/lib/admin/api-admin/components/api-admin-list/api-admin-list.component.d.ts +10 -0
  13. package/lib/admin/api-admin/components/api-credential-form/api-credential-form.component.d.ts +14 -0
  14. package/lib/admin/api-admin/models/api-admin.model.d.ts +15 -0
  15. package/lib/admin/api-admin/models/credentials.model.d.ts +4 -0
  16. package/lib/admin/api-admin/state/api-admin.service.d.ts +16 -0
  17. package/lib/admin/api-admin/state/api-admin.store.d.ts +8 -0
  18. package/lib/shared/_base/base-control/base-control.component.d.ts +22 -0
  19. package/lib/shared/_base/base-form/base-form.component.d.ts +27 -0
  20. package/lib/shared/_base/base-list/base-list.component.d.ts +16 -0
  21. package/lib/shared/components/form-container/form-container.component.d.ts +26 -0
  22. package/lib/shared/components/sidebar/sidebar.component.d.ts +13 -0
  23. package/lib/shared/constant/CSS.d.ts +11 -0
  24. package/lib/shared/constant/DATASOURCES.d.ts +10 -0
  25. package/lib/shared/constant/ERROR.d.ts +3 -0
  26. package/lib/shared/constant/HEADERS.d.ts +4 -0
  27. package/lib/shared/constant/LIST-CONFIG.d.ts +8 -0
  28. package/lib/shared/constant/LOOKUPS.d.ts +3 -0
  29. package/lib/shared/constant/ROUTES.d.ts +12 -0
  30. package/lib/shared/constant/SHARED.d.ts +565 -0
  31. package/lib/shared/constant/URLS.d.ts +3 -0
  32. package/lib/shared/controls/button/button.component.d.ts +6 -0
  33. package/lib/shared/controls/check-box/check-box.component.d.ts +6 -0
  34. package/lib/shared/controls/date/date.component.d.ts +12 -0
  35. package/lib/shared/controls/dropdown/dropdown.component.d.ts +19 -0
  36. package/lib/shared/controls/file-upload/file-upload.component.d.ts +7 -0
  37. package/lib/shared/controls/password/password.component.d.ts +9 -0
  38. package/lib/shared/controls/text-area/text-area.component.d.ts +8 -0
  39. package/lib/shared/controls/text-box/text-box.component.d.ts +7 -0
  40. package/lib/shared/controls/username/username.component.d.ts +6 -0
  41. package/{src/lib/shared/index.ts → lib/shared/index.d.ts} +30 -35
  42. package/lib/shared/models/attribute.model.d.ts +41 -0
  43. package/lib/shared/models/base.model.d.ts +3 -0
  44. package/lib/shared/models/list.model.d.ts +11 -0
  45. package/lib/shared/pipe/capitalize-words.pipe.d.ts +7 -0
  46. package/lib/shared/services/app-config.service.d.ts +12 -0
  47. package/lib/shared/services/auth/auth.guard.d.ts +12 -0
  48. package/lib/shared/services/date-parser.service.d.ts +7 -0
  49. package/lib/shared/services/list.service.d.ts +13 -0
  50. package/lib/shared/services/session.service.d.ts +13 -0
  51. package/lib/shared/services/table.builder.d.ts +11 -0
  52. package/lib/shared/services/validator.service.d.ts +7 -0
  53. package/lib/shared/shared.module.d.ts +32 -0
  54. package/lib/shared/state/base.query.d.ts +19 -0
  55. package/lib/shared/state/base.service.d.ts +27 -0
  56. package/lib/shared/state/base.state.d.ts +4 -0
  57. package/lib/shared/state/base.store.d.ts +24 -0
  58. package/lib/shared/table-primary/components/table-primary.component.d.ts +26 -0
  59. package/lib/shared/table-primary/models/table-primary-header.model.d.ts +6 -0
  60. package/lib/shared/table-primary/models/table-primary.model.d.ts +5 -0
  61. package/package.json +25 -16
  62. package/{src/public-api.ts → public-api.d.ts} +6 -11
  63. package/ng-package.json +0 -10
  64. package/src/lib/admin/action-admin/action-admin.module.ts +0 -16
  65. package/src/lib/admin/action-admin/components/admin-action-form/admin-action-form.component.html +0 -1
  66. package/src/lib/admin/action-admin/components/admin-action-form/admin-action-form.component.scss +0 -0
  67. package/src/lib/admin/action-admin/components/admin-action-form/admin-action-form.component.spec.ts +0 -23
  68. package/src/lib/admin/action-admin/components/admin-action-form/admin-action-form.component.ts +0 -11
  69. package/src/lib/admin/action-admin/components/admin-action-list/admin-action-list.component.html +0 -5
  70. package/src/lib/admin/action-admin/components/admin-action-list/admin-action-list.component.scss +0 -0
  71. package/src/lib/admin/action-admin/components/admin-action-list/admin-action-list.component.spec.ts +0 -23
  72. package/src/lib/admin/action-admin/components/admin-action-list/admin-action-list.component.ts +0 -24
  73. package/src/lib/admin/action-admin/models/action.model.ts +0 -12
  74. package/src/lib/admin/action-admin/state/action.query.ts +0 -11
  75. package/src/lib/admin/action-admin/state/action.service.ts +0 -18
  76. package/src/lib/admin/action-admin/state/action.state.ts +0 -14
  77. package/src/lib/admin/action-admin/state/action.store.ts +0 -14
  78. package/src/lib/admin/admin.module.ts +0 -22
  79. package/src/lib/admin/api-admin/api-admin.module.ts +0 -39
  80. package/src/lib/admin/api-admin/components/api-admin-form/api-admin-form.component.html +0 -96
  81. package/src/lib/admin/api-admin/components/api-admin-form/api-admin-form.component.scss +0 -6
  82. package/src/lib/admin/api-admin/components/api-admin-form/api-admin-form.component.spec.ts +0 -23
  83. package/src/lib/admin/api-admin/components/api-admin-form/api-admin-form.component.ts +0 -94
  84. package/src/lib/admin/api-admin/components/api-admin-list/api-admin-list.component.html +0 -6
  85. package/src/lib/admin/api-admin/components/api-admin-list/api-admin-list.component.scss +0 -0
  86. package/src/lib/admin/api-admin/components/api-admin-list/api-admin-list.component.spec.ts +0 -23
  87. package/src/lib/admin/api-admin/components/api-admin-list/api-admin-list.component.ts +0 -17
  88. package/src/lib/admin/api-admin/components/api-credential-form/api-credential-form.component.html +0 -29
  89. package/src/lib/admin/api-admin/components/api-credential-form/api-credential-form.component.scss +0 -0
  90. package/src/lib/admin/api-admin/components/api-credential-form/api-credential-form.component.spec.ts +0 -21
  91. package/src/lib/admin/api-admin/components/api-credential-form/api-credential-form.component.ts +0 -25
  92. package/src/lib/admin/api-admin/models/api-admin.model.ts +0 -16
  93. package/src/lib/admin/api-admin/models/credentials.model.ts +0 -4
  94. package/src/lib/admin/api-admin/state/api-admin.query.ts +0 -14
  95. package/src/lib/admin/api-admin/state/api-admin.service.ts +0 -31
  96. package/src/lib/admin/api-admin/state/api-admin.state.ts +0 -14
  97. package/src/lib/admin/api-admin/state/api-admin.store.ts +0 -13
  98. package/src/lib/admin/dd-admin/components/dd-admin-form/dd-admin-form.component.css +0 -0
  99. package/src/lib/admin/dd-admin/components/dd-admin-form/dd-admin-form.component.html +0 -1
  100. package/src/lib/admin/dd-admin/components/dd-admin-form/dd-admin-form.component.spec.ts +0 -23
  101. package/src/lib/admin/dd-admin/components/dd-admin-form/dd-admin-form.component.ts +0 -11
  102. package/src/lib/admin/dd-admin/components/dd-admin-list/dd-admin-list.component.css +0 -0
  103. package/src/lib/admin/dd-admin/components/dd-admin-list/dd-admin-list.component.html +0 -1
  104. package/src/lib/admin/dd-admin/components/dd-admin-list/dd-admin-list.component.spec.ts +0 -23
  105. package/src/lib/admin/dd-admin/components/dd-admin-list/dd-admin-list.component.ts +0 -11
  106. package/src/lib/admin/dd-admin/dd-admin.module.ts +0 -12
  107. package/src/lib/admin/queue-admin/components/queue-admin-form/queue-admin-form.component.css +0 -0
  108. package/src/lib/admin/queue-admin/components/queue-admin-form/queue-admin-form.component.html +0 -1
  109. package/src/lib/admin/queue-admin/components/queue-admin-form/queue-admin-form.component.spec.ts +0 -23
  110. package/src/lib/admin/queue-admin/components/queue-admin-form/queue-admin-form.component.ts +0 -11
  111. package/src/lib/admin/queue-admin/components/queue-admin-list/queue-admin-list.component.css +0 -0
  112. package/src/lib/admin/queue-admin/components/queue-admin-list/queue-admin-list.component.html +0 -1
  113. package/src/lib/admin/queue-admin/components/queue-admin-list/queue-admin-list.component.spec.ts +0 -23
  114. package/src/lib/admin/queue-admin/components/queue-admin-list/queue-admin-list.component.ts +0 -11
  115. package/src/lib/admin/queue-admin/queue-admin.module.ts +0 -12
  116. package/src/lib/admin/widget-admin/components/widget-admin-form/widget-admin-form.component.css +0 -0
  117. package/src/lib/admin/widget-admin/components/widget-admin-form/widget-admin-form.component.html +0 -1
  118. package/src/lib/admin/widget-admin/components/widget-admin-form/widget-admin-form.component.spec.ts +0 -23
  119. package/src/lib/admin/widget-admin/components/widget-admin-form/widget-admin-form.component.ts +0 -11
  120. package/src/lib/admin/widget-admin/components/widget-admin-list/widget-admin-list.component.css +0 -0
  121. package/src/lib/admin/widget-admin/components/widget-admin-list/widget-admin-list.component.html +0 -1
  122. package/src/lib/admin/widget-admin/components/widget-admin-list/widget-admin-list.component.spec.ts +0 -23
  123. package/src/lib/admin/widget-admin/components/widget-admin-list/widget-admin-list.component.ts +0 -11
  124. package/src/lib/admin/widget-admin/widget-admin.module.ts +0 -12
  125. package/src/lib/shared/_base/base-control/base-control.component.html +0 -1
  126. package/src/lib/shared/_base/base-control/base-control.component.scss +0 -0
  127. package/src/lib/shared/_base/base-control/base-control.component.spec.ts +0 -21
  128. package/src/lib/shared/_base/base-control/base-control.component.ts +0 -55
  129. package/src/lib/shared/_base/base-form/base-form.component.html +0 -1
  130. package/src/lib/shared/_base/base-form/base-form.component.scss +0 -0
  131. package/src/lib/shared/_base/base-form/base-form.component.spec.ts +0 -21
  132. package/src/lib/shared/_base/base-form/base-form.component.ts +0 -81
  133. package/src/lib/shared/_base/base-list/base-list.component.html +0 -1
  134. package/src/lib/shared/_base/base-list/base-list.component.scss +0 -0
  135. package/src/lib/shared/_base/base-list/base-list.component.spec.ts +0 -21
  136. package/src/lib/shared/_base/base-list/base-list.component.ts +0 -31
  137. package/src/lib/shared/components/form-container/form-container.component.html +0 -55
  138. package/src/lib/shared/components/form-container/form-container.component.scss +0 -108
  139. package/src/lib/shared/components/form-container/form-container.component.spec.ts +0 -21
  140. package/src/lib/shared/components/form-container/form-container.component.ts +0 -55
  141. package/src/lib/shared/components/sidebar/sidebar.component.html +0 -13
  142. package/src/lib/shared/components/sidebar/sidebar.component.scss +0 -45
  143. package/src/lib/shared/components/sidebar/sidebar.component.spec.ts +0 -21
  144. package/src/lib/shared/components/sidebar/sidebar.component.ts +0 -26
  145. package/src/lib/shared/constant/CSS.ts +0 -9
  146. package/src/lib/shared/constant/DATASOURCES.ts +0 -10
  147. package/src/lib/shared/constant/ERROR.ts +0 -3
  148. package/src/lib/shared/constant/HEADERS.ts +0 -4
  149. package/src/lib/shared/constant/LIST-CONFIG.ts +0 -10
  150. package/src/lib/shared/constant/LOOKUPS.ts +0 -3
  151. package/src/lib/shared/constant/ROUTES.ts +0 -12
  152. package/src/lib/shared/constant/SHARED.ts +0 -603
  153. package/src/lib/shared/constant/URLS.ts +0 -3
  154. package/src/lib/shared/controls/button/button.component.html +0 -25
  155. package/src/lib/shared/controls/button/button.component.scss +0 -0
  156. package/src/lib/shared/controls/button/button.component.spec.ts +0 -21
  157. package/src/lib/shared/controls/button/button.component.ts +0 -15
  158. package/src/lib/shared/controls/check-box/check-box.component.html +0 -22
  159. package/src/lib/shared/controls/check-box/check-box.component.scss +0 -32
  160. package/src/lib/shared/controls/check-box/check-box.component.spec.ts +0 -26
  161. package/src/lib/shared/controls/check-box/check-box.component.ts +0 -16
  162. package/src/lib/shared/controls/date/date.component.html +0 -43
  163. package/src/lib/shared/controls/date/date.component.scss +0 -0
  164. package/src/lib/shared/controls/date/date.component.spec.ts +0 -21
  165. package/src/lib/shared/controls/date/date.component.ts +0 -42
  166. package/src/lib/shared/controls/dropdown/dropdown.component.html +0 -28
  167. package/src/lib/shared/controls/dropdown/dropdown.component.scss +0 -12
  168. package/src/lib/shared/controls/dropdown/dropdown.component.ts +0 -71
  169. package/src/lib/shared/controls/file-upload/file-upload.component.html +0 -18
  170. package/src/lib/shared/controls/file-upload/file-upload.component.scss +0 -0
  171. package/src/lib/shared/controls/file-upload/file-upload.component.spec.ts +0 -21
  172. package/src/lib/shared/controls/file-upload/file-upload.component.ts +0 -19
  173. package/src/lib/shared/controls/number-feild/number-feild.component.html +0 -39
  174. package/src/lib/shared/controls/number-feild/number-feild.component.scss +0 -13
  175. package/src/lib/shared/controls/number-feild/number-feild.component.spec.ts +0 -21
  176. package/src/lib/shared/controls/number-feild/number-feild.component.ts +0 -35
  177. package/src/lib/shared/controls/password/password.component.html +0 -22
  178. package/src/lib/shared/controls/password/password.component.scss +0 -0
  179. package/src/lib/shared/controls/password/password.component.spec.ts +0 -28
  180. package/src/lib/shared/controls/password/password.component.ts +0 -24
  181. package/src/lib/shared/controls/text-area/text-area.component.html +0 -36
  182. package/src/lib/shared/controls/text-area/text-area.component.scss +0 -22
  183. package/src/lib/shared/controls/text-area/text-area.component.spec.ts +0 -23
  184. package/src/lib/shared/controls/text-area/text-area.component.ts +0 -25
  185. package/src/lib/shared/controls/text-box/text-box.component.html +0 -44
  186. package/src/lib/shared/controls/text-box/text-box.component.scss +0 -25
  187. package/src/lib/shared/controls/text-box/text-box.component.spec.ts +0 -30
  188. package/src/lib/shared/controls/text-box/text-box.component.ts +0 -26
  189. package/src/lib/shared/controls/username/username.component.html +0 -16
  190. package/src/lib/shared/controls/username/username.component.scss +0 -0
  191. package/src/lib/shared/controls/username/username.component.spec.ts +0 -29
  192. package/src/lib/shared/controls/username/username.component.ts +0 -17
  193. package/src/lib/shared/models/attribute.model.ts +0 -42
  194. package/src/lib/shared/models/base.model.ts +0 -3
  195. package/src/lib/shared/models/list.model.ts +0 -27
  196. package/src/lib/shared/models/message.model.ts +0 -4
  197. package/src/lib/shared/pipe/capitalize-words.pipe.spec.ts +0 -8
  198. package/src/lib/shared/pipe/capitalize-words.pipe.ts +0 -17
  199. package/src/lib/shared/services/app-config.service.spec.ts +0 -16
  200. package/src/lib/shared/services/app-config.service.ts +0 -25
  201. package/src/lib/shared/services/auth/auth.guard.spec.ts +0 -17
  202. package/src/lib/shared/services/auth/auth.guard.ts +0 -25
  203. package/src/lib/shared/services/data-transformer.service.spec.ts +0 -16
  204. package/src/lib/shared/services/data-transformer.service.ts +0 -41
  205. package/src/lib/shared/services/date-parser.service.spec.ts +0 -16
  206. package/src/lib/shared/services/date-parser.service.ts +0 -54
  207. package/src/lib/shared/services/list.service.spec.ts +0 -16
  208. package/src/lib/shared/services/list.service.ts +0 -53
  209. package/src/lib/shared/services/session.service.spec.ts +0 -16
  210. package/src/lib/shared/services/session.service.ts +0 -37
  211. package/src/lib/shared/services/table.builder.ts +0 -38
  212. package/src/lib/shared/services/validator.service.spec.ts +0 -16
  213. package/src/lib/shared/services/validator.service.ts +0 -13
  214. package/src/lib/shared/shared.module.ts +0 -62
  215. package/src/lib/shared/state/base.query.ts +0 -48
  216. package/src/lib/shared/state/base.service.ts +0 -69
  217. package/src/lib/shared/state/base.state.ts +0 -6
  218. package/src/lib/shared/state/base.store.ts +0 -56
  219. package/src/lib/shared/table-primary/components/table-primary.component.html +0 -56
  220. package/src/lib/shared/table-primary/components/table-primary.component.scss +0 -187
  221. package/src/lib/shared/table-primary/components/table-primary.component.spec.ts +0 -21
  222. package/src/lib/shared/table-primary/components/table-primary.component.ts +0 -71
  223. package/src/lib/shared/table-primary/models/table-primary-header.model.ts +0 -7
  224. package/src/lib/shared/table-primary/models/table-primary.model.ts +0 -6
  225. package/src/lib/widget/components/widget-body/widget-body.component.html +0 -1
  226. package/src/lib/widget/components/widget-body/widget-body.component.scss +0 -0
  227. package/src/lib/widget/components/widget-body/widget-body.component.spec.ts +0 -23
  228. package/src/lib/widget/components/widget-body/widget-body.component.ts +0 -11
  229. package/src/lib/widget/components/widget-container/widget-container.component.css +0 -0
  230. package/src/lib/widget/components/widget-container/widget-container.component.html +0 -1
  231. package/src/lib/widget/components/widget-container/widget-container.component.spec.ts +0 -23
  232. package/src/lib/widget/components/widget-container/widget-container.component.ts +0 -11
  233. package/src/lib/widget/components/widget-footer/widget-footer.component.css +0 -0
  234. package/src/lib/widget/components/widget-footer/widget-footer.component.html +0 -1
  235. package/src/lib/widget/components/widget-footer/widget-footer.component.spec.ts +0 -23
  236. package/src/lib/widget/components/widget-footer/widget-footer.component.ts +0 -11
  237. package/src/lib/widget/components/widget-header/widget-header.component.css +0 -0
  238. package/src/lib/widget/components/widget-header/widget-header.component.html +0 -1
  239. package/src/lib/widget/components/widget-header/widget-header.component.spec.ts +0 -23
  240. package/src/lib/widget/components/widget-header/widget-header.component.ts +0 -11
  241. package/src/lib/widget/components/widget-item/widget-item.component.css +0 -0
  242. package/src/lib/widget/components/widget-item/widget-item.component.html +0 -1
  243. package/src/lib/widget/components/widget-item/widget-item.component.spec.ts +0 -23
  244. package/src/lib/widget/components/widget-item/widget-item.component.ts +0 -11
  245. package/src/lib/widget/widget.module.ts +0 -12
  246. package/tsconfig.lib.json +0 -15
  247. package/tsconfig.lib.prod.json +0 -11
  248. package/tsconfig.spec.json +0 -15
@@ -1,11 +0,0 @@
1
- import { Component } from '@angular/core';
2
-
3
- @Component({
4
- selector: 'lib-queue-admin-form',
5
- imports: [],
6
- templateUrl: './queue-admin-form.component.html',
7
- styleUrl: './queue-admin-form.component.css'
8
- })
9
- export class QueueAdminFormComponent {
10
-
11
- }
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { QueueAdminListComponent } from './queue-admin-list.component';
4
-
5
- describe('QueueAdminListComponent', () => {
6
- let component: QueueAdminListComponent;
7
- let fixture: ComponentFixture<QueueAdminListComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [QueueAdminListComponent]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(QueueAdminListComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,11 +0,0 @@
1
- import { Component } from '@angular/core';
2
-
3
- @Component({
4
- selector: 'lib-queue-admin-list',
5
- imports: [],
6
- templateUrl: './queue-admin-list.component.html',
7
- styleUrl: './queue-admin-list.component.css'
8
- })
9
- export class QueueAdminListComponent {
10
-
11
- }
@@ -1,12 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
-
4
-
5
-
6
- @NgModule({
7
- declarations: [],
8
- imports: [
9
- CommonModule
10
- ]
11
- })
12
- export class QueueAdminModule { }
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { WidgetAdminFormComponent } from './widget-admin-form.component';
4
-
5
- describe('WidgetAdminFormComponent', () => {
6
- let component: WidgetAdminFormComponent;
7
- let fixture: ComponentFixture<WidgetAdminFormComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [WidgetAdminFormComponent]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(WidgetAdminFormComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,11 +0,0 @@
1
- import { Component } from '@angular/core';
2
-
3
- @Component({
4
- selector: 'lib-widget-admin-form',
5
- imports: [],
6
- templateUrl: './widget-admin-form.component.html',
7
- styleUrl: './widget-admin-form.component.css'
8
- })
9
- export class WidgetAdminFormComponent {
10
-
11
- }
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { WidgetAdminListComponent } from './widget-admin-list.component';
4
-
5
- describe('WidgetAdminListComponent', () => {
6
- let component: WidgetAdminListComponent;
7
- let fixture: ComponentFixture<WidgetAdminListComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [WidgetAdminListComponent]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(WidgetAdminListComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,11 +0,0 @@
1
- import { Component } from '@angular/core';
2
-
3
- @Component({
4
- selector: 'lib-widget-admin-list',
5
- imports: [],
6
- templateUrl: './widget-admin-list.component.html',
7
- styleUrl: './widget-admin-list.component.css'
8
- })
9
- export class WidgetAdminListComponent {
10
-
11
- }
@@ -1,12 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
-
4
-
5
-
6
- @NgModule({
7
- declarations: [],
8
- imports: [
9
- CommonModule
10
- ]
11
- })
12
- export class WidgetAdminModule { }
@@ -1 +0,0 @@
1
- <p>base-control works!</p>
@@ -1,21 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
- import { BaseControlComponent } from './base-control.component';
3
-
4
- describe('BaseControlComponent', () => {
5
- let component: BaseControlComponent;
6
- let fixture: ComponentFixture<BaseControlComponent>;
7
-
8
- beforeEach(async () => {
9
- await TestBed.configureTestingModule({
10
- imports: [BaseControlComponent],
11
- }).compileComponents();
12
-
13
- fixture = TestBed.createComponent(BaseControlComponent);
14
- component = fixture.componentInstance;
15
- fixture.detectChanges();
16
- });
17
-
18
- it('should create', () => {
19
- expect(component).toBeTruthy();
20
- });
21
- });
@@ -1,55 +0,0 @@
1
- import { Component, EventEmitter, Input, OnChanges, Output } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { AttributeModel } from '../../models/attribute.model';
4
- import { SHARED } from '../../constant/SHARED';
5
- import { BaseQuery } from '../../state/base.query';
6
- import { BaseStore } from '../../state/base.store';
7
-
8
- @Component({
9
- selector: 'app-base-control',
10
- standalone: true,
11
- imports: [CommonModule],
12
- templateUrl: './base-control.component.html',
13
- styleUrl: './base-control.component.scss',
14
- providers : [BaseStore]
15
- })
16
- export class BaseControlComponent implements OnChanges {
17
- constructor() {}
18
- @Input() store !: BaseStore<any> | null;
19
- @Input() record: any;
20
- @Input() attributeModel! : AttributeModel;
21
- @Input() error : string = ""
22
- @Output() onInput = new EventEmitter();
23
- @Output() onEnterKeydown = new EventEmitter();
24
- @Output() onBtnClick = new EventEmitter();
25
-
26
- query !: BaseQuery<any>
27
- ngOnChanges(){
28
- if(this.store) {
29
- this.query = new BaseQuery(this.store)
30
- }
31
- }
32
- handleModelChange(event:any, valid: boolean|null, val?:any) {
33
- if (this.attributeModel?.name) {
34
- this.record[this.attributeModel?.name] = event;
35
- this.onInput.emit(event);
36
- }
37
- }
38
-
39
- // handleEnterKey(event:any, valid: boolean|null) {
40
- // if (this.attributeModel?.name) {
41
- // this.record[this.attributeModel?.name] = event;
42
- // this.onEnterKeydown.emit(event);
43
- // this.record[this.attributeModel?.name] = SHARED.EMPTY;
44
- // }
45
- // }
46
-
47
- handleButtonClick(event:MouseEvent){
48
- this.onBtnClick.emit(event);
49
- }
50
-
51
- getValue() : string | null | undefined {
52
- return this.record[this.attributeModel.name]
53
- }
54
-
55
- }
@@ -1 +0,0 @@
1
- <p>base-form works!</p>
@@ -1,21 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
- import { BaseFormComponent } from './base-form.component';
3
-
4
- describe('BaseFormComponent', () => {
5
- let component: BaseFormComponent;
6
- let fixture: ComponentFixture<BaseFormComponent>;
7
-
8
- beforeEach(async () => {
9
- await TestBed.configureTestingModule({
10
- imports: [BaseFormComponent],
11
- }).compileComponents();
12
-
13
- fixture = TestBed.createComponent(BaseFormComponent);
14
- component = fixture.componentInstance;
15
- fixture.detectChanges();
16
- });
17
-
18
- it('should create', () => {
19
- expect(component).toBeTruthy();
20
- });
21
- });
@@ -1,81 +0,0 @@
1
- import { Component, OnInit } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { BehaviorSubject, Subscription } from 'rxjs';
4
- import { ValidatorService } from '../../services/validator.service';
5
- import { ActivatedRoute, Router } from '@angular/router';
6
- import { SHARED, expectedRoutes } from '../../constant/SHARED';
7
- import { AttributeModel } from '../../models/attribute.model';
8
- import { BaseModel } from '../../models/base.model';
9
- import { BaseStore } from '../../state/base.store';
10
- import { BaseService } from '../../state/base.service';
11
- @Component({
12
- selector: 'base-form',
13
- standalone: true,
14
- imports: [CommonModule],
15
- templateUrl: './base-form.component.html',
16
- styleUrls: ['./base-form.component.scss'],
17
- providers : [ValidatorService]
18
- })
19
- export class BaseFormComponent<T extends BaseModel> implements OnInit {
20
- protected subscriptions: Subscription[];
21
- record!: T;
22
- public recordChange = new BehaviorSubject<any>({});
23
-
24
- constructor(protected service: BaseService<T>, protected validatorService?:ValidatorService, protected router?: Router, protected activatedRoute?: ActivatedRoute, protected baseStore?: BaseStore<T>
25
- ) {
26
- this.subscriptions = [];
27
- this.record = {} as T;
28
- }
29
-
30
- message:any[] = []
31
- attributeMode!:AttributeModel;
32
-
33
- ngOnInit(): void {
34
- this.baseStore?.setRecordChange(SHARED.EMPTY);
35
- const baseRoute:any = this.router?.url.split(SHARED.SLASH)[1];
36
- let id = this.activatedRoute ? this.activatedRoute.snapshot.params[SHARED.ID] : '';
37
- if((id !== SHARED.ZERO.toString()) && id && expectedRoutes.includes(baseRoute)) {
38
- this.service.getById(id).subscribe((res:any) => {
39
- this.record = res;
40
- this.baseStore?.setRecordChange(res);
41
- this.recordChange.next(res);
42
- })
43
- }
44
- }
45
-
46
- handleSubmit() {
47
- let validateRecords = this.validatorService ? this.validatorService.handleValidateRecords(this.record) : true
48
- if (validateRecords) {
49
- if(this.record._id){
50
- this.service.update(this.record._id ,this.record).subscribe({
51
- next: (response: T) => {
52
- this.navigateToList();
53
- console.log('Record created:', response);
54
- },
55
- error: (error) => {
56
- console.error('Error creating record:', error);
57
- }
58
- })
59
- } else {
60
- this.service.create(this.record).subscribe({
61
- next: (response: T) => {
62
- this.navigateToList();
63
- console.log('Record created:', response);
64
- },
65
- error: (error) => {
66
- console.error('Error creating record:', error);
67
- }
68
- })
69
- }
70
- }
71
- }
72
-
73
- navigateToList() {
74
- if(this.router) {
75
- const currentUrl = this.router.url;
76
- const listUrl = currentUrl.split(SHARED.SLASH).slice(0, -1).join(SHARED.SLASH);
77
- this.router.navigate([`${listUrl}`]);
78
- }
79
- }
80
-
81
- }
@@ -1 +0,0 @@
1
- <p>base-list works!</p>
@@ -1,21 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
- import { BaseListComponent } from './base-list.component';
3
-
4
- describe('BaseListComponent', () => {
5
- let component: BaseListComponent;
6
- let fixture: ComponentFixture<BaseListComponent>;
7
-
8
- beforeEach(async () => {
9
- await TestBed.configureTestingModule({
10
- imports: [BaseListComponent],
11
- }).compileComponents();
12
-
13
- fixture = TestBed.createComponent(BaseListComponent);
14
- component = fixture.componentInstance;
15
- fixture.detectChanges();
16
- });
17
-
18
- it('should create', () => {
19
- expect(component).toBeTruthy();
20
- });
21
- });
@@ -1,31 +0,0 @@
1
- import { Component, OnInit } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { BaseModel } from '../../models/base.model';
4
- import { TableBuilder } from '../../services/table.builder';
5
- import { BaseService } from '../../state/base.service';
6
- import { TablePrimaryModel } from '../../table-primary/models/table-primary.model';
7
-
8
- @Component({
9
- selector: 'lib-base-list',
10
- standalone: true,
11
- imports: [CommonModule],
12
- templateUrl: './base-list.component.html',
13
- styleUrl: './base-list.component.scss',
14
- })
15
- export class BaseListComponent<T extends BaseModel> implements OnInit {
16
-
17
- table!: TablePrimaryModel;
18
-
19
- constructor(protected service: BaseService<T>, protected builder: TableBuilder){}
20
-
21
- ngOnInit(){
22
- this.service.getAll().subscribe((res:any)=>{
23
- this.table = this.builder.buildTable(res);
24
- this.afterTableBuild()
25
- });
26
- }
27
-
28
- afterTableBuild(){
29
-
30
- }
31
- }
@@ -1,55 +0,0 @@
1
- <div class="form-container">
2
- <div class="text-900 font-bold text-xl form-header mb-2">
3
- <div class="form-header-container w-full mr-0">
4
- <div class="form-header-title"[innerHTML]="this.headerText">
5
- </div>
6
- <div class="form-header-messege w-full">
7
- <p-messages class="message-wrapper" [(value)]="messages" [enableService]="false" />
8
- </div>
9
- </div>
10
-
11
- <div class="btn-wrapper">
12
- <ng-content select="[headerButtons]"></ng-content>
13
- @if(showSave){
14
- <button
15
- pButton
16
- pRipple
17
- label="Cancel"
18
- (click)="handleCancelClick()"
19
- class="p-button-outlined mr-2"
20
- ></button>
21
-
22
- <button
23
- pButton
24
- class="p-button-success"
25
- label="Save"
26
- [disabled]="disableSaveButton"
27
- type="button"
28
- tooltipPosition="bottom"
29
- (click)="handleSaveClick()"
30
- ></button>
31
- }
32
- <ng-content select="[headerButtons]"></ng-content>
33
- </div>
34
- </div>
35
-
36
-
37
- <p-toast></p-toast>
38
-
39
- <div>
40
- <p-confirmDialog>
41
- <ng-template pTemplate="message" let-message>
42
- <div class="flex flex-column align-items-center w-full gap-3 border-bottom-1 surface-border">
43
- <i class="pi pi-exclamation-circle text-6xl text-primary-500"></i>
44
- <p>{{ message.message }}</p>
45
- </div>
46
- </ng-template>
47
- </p-confirmDialog>
48
- </div>
49
- <div class="grid">
50
- <div class="col-12">
51
- <ng-content></ng-content>
52
- </div>
53
- </div>
54
- </div>
55
-
@@ -1,108 +0,0 @@
1
- .form-container {
2
- display: flex;
3
- flex-direction: column;
4
- overflow-y: auto;
5
- overflow-x: hidden;
6
-
7
- &.card {
8
- padding: 0px;
9
- }
10
-
11
- .p-button {
12
- padding: 0.50rem 1.25rem;
13
- }
14
-
15
- .form-footer {
16
- background-color: var(--surface-100);
17
- padding: 6px 16px;
18
- height: 46px;
19
- width: 100%;
20
- margin-top: auto;
21
- position: sticky;
22
- bottom: 0;
23
- z-index: 4;
24
-
25
- &.card {
26
- margin-bottom: 0px !important;
27
- }
28
- }
29
-
30
- .form-header {
31
- padding: 6px 16px;
32
- height: 46px;
33
- display: flex;
34
- justify-content: space-between;
35
- align-items: center;
36
- position: sticky;
37
- top: 0;
38
- z-index: 4;
39
- width: 100%;
40
- }
41
-
42
- .form-top button {
43
- height: fit-content;
44
- }
45
-
46
- .form-header-bg-light {
47
- background-color: #e1e2e8 !important;
48
- }
49
-
50
- .form-header-bg-dark {
51
- background-color: #3b3848 !important;
52
- }
53
-
54
- .left-wrapper {
55
- display: flex;
56
- }
57
-
58
- .p-16 {
59
- padding: 4px 32px 16px;
60
- }
61
-
62
- .m-16 {
63
- margin: 0px 16px;
64
- }
65
-
66
- // .grid {
67
- // margin-top: 6px !important;
68
- // }
69
-
70
- .errors {
71
- position: sticky;
72
- top: 3.4rem;
73
- z-index: 1;
74
- background-color: var(--surface-900);
75
- padding: 0px 16px;
76
- }
77
- }
78
-
79
- .btn-wrapper{
80
- display: flex;
81
- justify-content: flex-end;
82
- align-items: center;
83
- }
84
-
85
- .form-header-container {
86
- display: flex;
87
- flex-wrap: nowrap;
88
- align-items: center;
89
- margin-right: 2rem;
90
-
91
- .form-header-title {
92
- text-wrap: nowrap;
93
- }
94
-
95
- .form-header-messege{
96
- margin-left: 1rem;
97
- }
98
- }
99
-
100
- ::ng-deep {
101
- .message-wrapper{
102
- .p-message-wrapper{
103
- padding: 0.143rem 1.357rem;
104
- display: flex;
105
- align-items: center;
106
- }
107
- }
108
- }
@@ -1,21 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
- import { FormContainerComponent } from './form-container.component';
3
-
4
- describe('FormContainerComponent', () => {
5
- let component: FormContainerComponent;
6
- let fixture: ComponentFixture<FormContainerComponent>;
7
-
8
- beforeEach(async () => {
9
- await TestBed.configureTestingModule({
10
- imports: [FormContainerComponent],
11
- }).compileComponents();
12
-
13
- fixture = TestBed.createComponent(FormContainerComponent);
14
- component = fixture.componentInstance;
15
- fixture.detectChanges();
16
- });
17
-
18
- it('should create', () => {
19
- expect(component).toBeTruthy();
20
- });
21
- });
@@ -1,55 +0,0 @@
1
- import { Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { ButtonModule } from 'primeng/button';
4
- import { ConfirmDialogModule } from 'primeng/confirmdialog';
5
- import { ToastModule } from 'primeng/toast';
6
- import { ConfirmationService, Message, MessageService } from 'primeng/api';
7
- import { MessageModule } from 'primeng/message';
8
- import { MessagesModule } from 'primeng/messages';
9
- import { ButtonComponent } from '../../controls/button/button.component';
10
- import { TextBoxComponent } from '../../controls/text-box/text-box.component';
11
- import { ActivatedRoute, Router } from '@angular/router';
12
- @Component({
13
- selector: 'form-container',
14
- standalone: true,
15
- imports: [CommonModule, ButtonModule,ConfirmDialogModule,ToastModule, MessagesModule, ButtonComponent, TextBoxComponent],
16
- templateUrl: './form-container.component.html',
17
- styleUrl: './form-container.component.scss',
18
- providers : [MessageService, ConfirmationService],
19
- encapsulation: ViewEncapsulation.None
20
- })
21
- export class FormContainerComponent {
22
- @Input() messages: Message[] = [];
23
- @Input() record: any
24
- @Input() headerText: string | undefined;
25
- @Input() showSave:boolean = false
26
- @Input() disableButton:boolean = false
27
- @Input() disableSubmitButton:boolean = false
28
- @Input() disableSaveButton:boolean = false
29
- @Output() onSave = new EventEmitter();
30
- @Output() onSubmit = new EventEmitter();
31
- @Output() onCancel = new EventEmitter();
32
- @Input() overrideNavigate: boolean = false;
33
-
34
-
35
- constructor( private router: Router,
36
- private route: ActivatedRoute,){}
37
- handleSubmitClick(){
38
- this.onSubmit.emit()
39
- }
40
-
41
- handleSaveClick(){
42
- this.onSave.emit()
43
- }
44
- handleCancelClick(){
45
- if(this.overrideNavigate){
46
- this.onCancel.emit()
47
- }else{
48
- this.router.navigate(["../"], { relativeTo: this.route });
49
- }
50
- }
51
-
52
- handleCreateBtnClick() {
53
-
54
- }
55
- }