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,22 +0,0 @@
1
- <div class="checkBoxContainer">
2
-
3
- <div class="checkBox">
4
- <p-checkbox
5
- [disabled]="attributeModel.readonly ?? false"
6
- [binary]="true"
7
- inputId="binary"
8
- [label]="attributeModel.displayText ?? ''"
9
- class="dynamic-checkbox"
10
- #checkBox="ngModel"
11
- [ngModel]="this.record[this.attributeModel.name]"
12
- [style]="{
13
- '--checkbox-size': attributeModel.customColumnWidth || '20px',
14
- '--checkbox-height': attributeModel.customHeight || '20px'
15
- }"
16
- [required]="attributeModel.isRequired ?? false"
17
- (ngModelChange)="handleModelChange($event, checkBox.valid)"
18
- >
19
- </p-checkbox>
20
- <span class="asterisk ml-1" *ngIf="attributeModel.isRequired">*</span>
21
- </div>
22
- </div>
@@ -1,32 +0,0 @@
1
- .asterisk{
2
- color: red;
3
- }
4
-
5
- .checkBoxContainer{
6
- max-height: 100%;
7
- display: flex;
8
- align-items: center;
9
- font-family:var(--font-family);
10
- position: relative;
11
- }
12
-
13
- .checkBox {
14
- position: relative;
15
- max-width: 100%;
16
- max-height: 100%;
17
- word-wrap: break-word;
18
- }
19
-
20
-
21
- ::ng-deep {
22
- .dynamic-checkbox {
23
- .p-checkbox{
24
- width: var(--checkbox-size) !important;
25
- height: var(--checkbox-height) !important;
26
- .p-checkbox-box{
27
- width: var(--checkbox-size) !important;
28
- height: var(--checkbox-height) !important;
29
- }
30
- }
31
- }
32
- }
@@ -1,26 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { CheckBoxComponent } from './check-box.component';
4
-
5
- describe('CheckBoxComponent', () => {
6
- let component: CheckBoxComponent;
7
-
8
- let fixture: ComponentFixture<CheckBoxComponent>;
9
-
10
- beforeEach(async () => {
11
- await TestBed.configureTestingModule({
12
- imports: [CheckBoxComponent]
13
- })
14
- .compileComponents();
15
-
16
- fixture = TestBed.createComponent(CheckBoxComponent);
17
- component = fixture.componentInstance;
18
- component.configSchema = { displayText: "", name: 'testCheckBox', value: true }
19
- component.record = {}
20
- fixture.detectChanges();
21
- });
22
-
23
- it('should create', () => {
24
- expect(component.configSchema.value).toBeTruthy();
25
- });
26
- });
@@ -1,16 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { Component } from '@angular/core';
3
- import { FormsModule } from '@angular/forms';
4
- import { CheckboxModule } from 'primeng/checkbox';
5
- import { BaseControlComponent } from '../../_base/base-control/base-control.component';
6
-
7
- @Component({
8
- selector: 'check-box',
9
- templateUrl: './check-box.component.html',
10
- styleUrl: './check-box.component.scss',
11
- standalone : true,
12
- imports : [CommonModule,FormsModule, CheckboxModule]
13
- })
14
- export class CheckBoxComponent extends BaseControlComponent {
15
-
16
- }
@@ -1,43 +0,0 @@
1
- @if (attributeModel && record) {
2
- <div class="">
3
- <div class="mb-2">
4
- <label>{{
5
- attributeModel?.displayText
6
- ? attributeModel?.displayText
7
- : attributeModel?.name
8
- }}</label>
9
- <span class="asterisk ml-1" *ngIf="attributeModel.isRequired">*</span>
10
- </div>
11
- @if (attributeModel.readonly) {
12
- <div class="mb-2" [ngStyle]="{ 'font-size': '14px', color: '#0F1729', 'font-weight':'600' }">
13
- <label>{{ getValue() }}</label>
14
- </div>
15
- } @else {
16
- <div>
17
- <p-calendar
18
- [showIcon]="attributeModel.showCalenderIcon ?? true"
19
- inputId="icon"
20
- [disabled]="attributeModel?.readonly ?? false"
21
- [required]="attributeModel?.isRequired ?? false"
22
- [name]="attributeModel?.name ? attributeModel?.name : 'testDatePicker'"
23
- [placeholder]="
24
- attributeModel.placeholder ? attributeModel.placeholder : ''
25
- "
26
- [yearRange]="attributeModel.yearRange ?? '1950 : 2050'"
27
- [title]="attributeModel.title ? attributeModel.title : ''"
28
- [(ngModel)]="record[attributeModel?.name]"
29
- #dateField="ngModel"
30
- [dateFormat]="'dd/mm/yy'"
31
- appendTo="body"
32
- (ngModelChange)="handleModelChange($event, dateField.valid)"
33
- [ngClass]="{
34
- 'ng-dirty ng-invalid': !dateField.valid && error == attributeModel?.name
35
- }"
36
- [hourFormat]="attributeModel?.hourFormat ? '24' : ''"
37
- >
38
- </p-calendar>
39
- </div>
40
- }
41
- </div>
42
-
43
- }
File without changes
@@ -1,21 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
- import { DateComponent } from './date.component';
3
-
4
- describe('DateComponent', () => {
5
- let component: DateComponent;
6
- let fixture: ComponentFixture<DateComponent>;
7
-
8
- beforeEach(async () => {
9
- await TestBed.configureTestingModule({
10
- imports: [DateComponent],
11
- }).compileComponents();
12
-
13
- fixture = TestBed.createComponent(DateComponent);
14
- component = fixture.componentInstance;
15
- fixture.detectChanges();
16
- });
17
-
18
- it('should create', () => {
19
- expect(component).toBeTruthy();
20
- });
21
- });
@@ -1,42 +0,0 @@
1
- import { Component, OnChanges } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { BaseControlComponent } from '../../_base/base-control/base-control.component';
4
- import { DateParserService } from '../../services/date-parser.service';
5
- import { CalendarModule } from 'primeng/calendar';
6
- import { FormsModule } from '@angular/forms';
7
- import { SHARED } from '../../constant/SHARED';
8
- import moment from 'moment';
9
-
10
- @Component({
11
- selector: 'date',
12
- standalone: true,
13
- imports: [CommonModule, CalendarModule, FormsModule],
14
- templateUrl: './date.component.html',
15
- styleUrl: './date.component.scss',
16
- })
17
- export class DateComponent extends BaseControlComponent implements OnChanges{
18
- constructor(public dateService : DateParserService){
19
- super()
20
- }
21
- override ngOnChanges(): void {
22
- if(this.attributeModel.readonly){
23
- this.getValue()
24
- }else{
25
-
26
- this.record[this.attributeModel.name] = this.dateService.parseDate(this.record[this.attributeModel?.name]) ??
27
- new Date();
28
- }
29
- }
30
- override getValue() {
31
- if (this.record[this.attributeModel.name]) {
32
- const formattedDate = moment(this.record[this.attributeModel.name]).format('DD/MM/YYYY');
33
- if(formattedDate == "Invalid date"){
34
- return SHARED.HIPHEN
35
- }else{
36
- return formattedDate
37
- }
38
- }
39
- return SHARED.EMPTY
40
- }
41
-
42
- }
@@ -1,28 +0,0 @@
1
- <ng-container>
2
- <div class="mb-2">
3
- <label>{{ attributeModel.displayText }}</label>
4
- <span class="asterisk ml-1" *ngIf="attributeModel.isRequired">*</span>
5
- </div>
6
- <div class="dropdownbox">
7
-
8
- <p-dropdown
9
-
10
- [options]="options"
11
- [disabled]="attributeModel.readonly ?? false"
12
- [showClear]="true"
13
- [name]="attributeModel.name ?? 'testSingleSelect'"
14
- [ngModel]="record[attributeModel.name]"
15
- [placeholder]="attributeModel.placeholder ?? ''"
16
- [required]="attributeModel.isRequired ?? false"
17
- filterBy="label"
18
- class="dropdownFeild"
19
- #dropdown="ngModel"
20
- (ngModelChange)="handleModelChange($event, dropdown.valid)"
21
- [ngClass]="!dropdown.valid && error == attributeModel.name ? 'ng-dirty ng-invalid':''"
22
- appendTo="body"
23
- optionLabel="label"
24
- optionValue="value">
25
- </p-dropdown>
26
- </div>
27
-
28
- </ng-container>
@@ -1,12 +0,0 @@
1
- .asterisk{
2
- color: red;
3
- }
4
- .p-dropdown{
5
- width: 100% !important;
6
- }
7
- .dropdownFeild{
8
- width: 100% !important;
9
- }
10
- .dropdownbox{
11
- position: relative;
12
- }
@@ -1,71 +0,0 @@
1
- import { Component, Input, OnInit, ViewEncapsulation } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { DropdownModule } from 'primeng/dropdown';
4
- import { BaseControlComponent } from '../../_base/base-control/base-control.component';
5
- import { FormsModule } from '@angular/forms';
6
- import { SelectItem } from 'primeng/api';
7
- import { ListService } from '../../services/list.service';
8
- import { List } from '../../models/list.model';
9
- import { BaseQuery } from '../../state/base.query';
10
-
11
- @Component({
12
- selector: 'dropdown',
13
- standalone: true,
14
- imports: [CommonModule, DropdownModule, FormsModule],
15
- templateUrl: './dropdown.component.html',
16
- styleUrls: ['./dropdown.component.scss'],
17
- encapsulation: ViewEncapsulation.None
18
- })
19
- export class DropdownComponent extends BaseControlComponent{
20
- options: SelectItem[] | undefined = [];
21
- list!: List | undefined;
22
- childListRecords: any[] = [];
23
- @Input() isStaticDropdown = false;
24
-
25
- constructor(public listService: ListService) {
26
- super();
27
- }
28
-
29
- override ngOnChanges() {
30
- if(this.store) {
31
- this.query = new BaseQuery(this.store);
32
- }
33
- if (this.attributeModel.options) {
34
- this.options = this.attributeModel.options;
35
- }
36
- if (!this.isStaticDropdown) {
37
- this.handleGetAndSetList();
38
- }
39
- }
40
-
41
- handleGetAndSetList() {
42
- try {
43
- this.query.getLists().subscribe((response: List[]) => {
44
- if (response) {
45
- this.mapResponseToOptions(response);
46
- }
47
- });
48
- } catch (error) {
49
- console.error('Error fetching data:', error);
50
- }
51
- }
52
-
53
- private mapResponseToOptions(lists: List[]): SelectItem[] {
54
- if (lists && lists.length > 0) {
55
- const clonedLists = JSON.parse(JSON.stringify(lists));
56
- this.list = clonedLists.find((x: any) => x.forProperty === this.attributeModel.name);
57
- if (this.list) {
58
- this.options = this.list?.items ?? [];
59
- }
60
- }
61
- if (!this.options || this.options.length === 0) {
62
- this.options = this.attributeModel.options ?? [];
63
- }
64
- return this.options;
65
- }
66
-
67
-
68
- override handleModelChange(event: any, valid: boolean | null, val?: any): void {
69
- super.handleModelChange(event, valid);
70
- }
71
- }
@@ -1,18 +0,0 @@
1
- <ng-container class="documentContainer">
2
- @if(!attributeModel.hideLabelOnForm){
3
- <div class="mb-2">
4
- <label class="form-header-label">{{ attributeModel?.displayText }}</label>
5
- <span class="asterisk ml-1" *ngIf="attributeModel.isRequired">*</span>
6
- </div>
7
- }
8
- <div class="card flex justify-content-center">
9
- <p-fileUpload
10
- mode="basic"
11
- [chooseLabel]="record[attributeModel.name] ? attributeModel.displayText : 'No Files'"
12
- chooseIcon="pi pi-plus"
13
- [name]="attributeModel?.name"
14
- accept="image/*,application/pdf"
15
- [maxFileSize]="209715200" class="fileUploader"
16
- (onSelect)="handleSingleUpload($event)" />
17
- </div>
18
- </ng-container>
@@ -1,21 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
- import { FileUploadComponent } from './file-upload.component';
3
-
4
- describe('FileUploadComponent', () => {
5
- let component: FileUploadComponent;
6
- let fixture: ComponentFixture<FileUploadComponent>;
7
-
8
- beforeEach(async () => {
9
- await TestBed.configureTestingModule({
10
- imports: [FileUploadComponent],
11
- }).compileComponents();
12
-
13
- fixture = TestBed.createComponent(FileUploadComponent);
14
- component = fixture.componentInstance;
15
- fixture.detectChanges();
16
- });
17
-
18
- it('should create', () => {
19
- expect(component).toBeTruthy();
20
- });
21
- });
@@ -1,19 +0,0 @@
1
- import { Component } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { BaseControlComponent } from '../../_base/base-control/base-control.component';
4
- import { FormsModule } from '@angular/forms';
5
- import { FileUploadModule } from 'primeng/fileupload';
6
-
7
- @Component({
8
- selector: 'file-upload',
9
- standalone: true,
10
- imports: [CommonModule, FormsModule, FileUploadModule],
11
- templateUrl: './file-upload.component.html',
12
- styleUrl: './file-upload.component.scss',
13
- })
14
- export class FileUploadComponent extends BaseControlComponent {
15
-
16
- handleSingleUpload(event:any){
17
- console.log(event)
18
- }
19
- }
@@ -1,39 +0,0 @@
1
- <ng-container>
2
- <div class="">
3
-
4
- <div *ngIf="attributeModel.displayText" class="mb-2">
5
- <label>{{ attributeModel.displayText }}</label>
6
- <span class="asterisk ml-1" *ngIf="attributeModel.isRequired">*</span>
7
- </div>
8
- @if (attributeModel.readonly) {
9
- <div class="mb-2" [ngStyle]="{'font-size':'14px', 'color':'#0F1729', 'font-weight':'600'}">
10
- @if(attributeModel.numberMode == "currency"){
11
-
12
- <label>&#163; {{ getValue() }}.00</label>
13
- }@else{
14
- <label>{{ getValue() }}</label>
15
-
16
- }
17
- </div>
18
- } @else {
19
- <div class="inputTextBox">
20
- <p-inputNumber [inputId]="attributeModel.inputId ?? 'currency-us'" [mode]="attributeModel.numberMode ?? 'decimal'"
21
- [locale]="attributeModel.locale ?? 'en-UK'" [currency]="attributeModel.currency ?? 'GBP'"
22
- [ngModel]="record[attributeModel.name]" #numberField="ngModel" class="numberFeild"
23
- [placeholder]="attributeModel.placeholder ?? ''"
24
- [minFractionDigits]="attributeModel.allowFraction == 'Y' ? 2 : 0" [disabled]="attributeModel?.readonly ?? false"
25
- [required]="attributeModel?.isRequired ?? false" [ngStyle]="{
26
- width: attributeModel.customColumnWidth
27
- ? attributeModel.customColumnWidth
28
- : '',
29
- padding: attributeModel.customPadding
30
- ? attributeModel.customPadding
31
- : ''
32
- }" (ngModelChange)="handleModelChange($event, numberField.valid)" [ngClass]="{
33
- 'ng-dirty ng-invalid': !numberField.valid && error
34
- }" />
35
- </div>
36
- }
37
- </div>
38
-
39
- </ng-container>
@@ -1,13 +0,0 @@
1
- .asterisk{
2
- color: red;
3
- }
4
- .inputTextBox{
5
- position: relative;
6
- }
7
- .p-inputnumber {
8
- width: 100%;
9
- }
10
-
11
- .numberFeild{
12
- width: 100%;
13
- }
@@ -1,21 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
- import { NumberFeildComponent } from './number-feild.component';
3
-
4
- describe('NumberFeildComponent', () => {
5
- let component: NumberFeildComponent;
6
- let fixture: ComponentFixture<NumberFeildComponent>;
7
-
8
- beforeEach(async () => {
9
- await TestBed.configureTestingModule({
10
- imports: [NumberFeildComponent],
11
- }).compileComponents();
12
-
13
- fixture = TestBed.createComponent(NumberFeildComponent);
14
- component = fixture.componentInstance;
15
- fixture.detectChanges();
16
- });
17
-
18
- it('should create', () => {
19
- expect(component).toBeTruthy();
20
- });
21
- });
@@ -1,35 +0,0 @@
1
- import { Component, ViewEncapsulation } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { BaseControlComponent } from '../../_base/base-control/base-control.component';
4
- import { InputNumberModule } from 'primeng/inputnumber';
5
- import { FormsModule } from '@angular/forms';
6
- import { BaseQuery } from 'shared/src/lib/state/base.query';
7
-
8
- @Component({
9
- selector: 'number-feild',
10
- standalone: true,
11
- imports: [CommonModule, InputNumberModule, FormsModule],
12
- templateUrl: './number-feild.component.html',
13
- styleUrl: './number-feild.component.scss',
14
- encapsulation: ViewEncapsulation.None
15
- })
16
- export class NumberFeildComponent extends BaseControlComponent {
17
-
18
-
19
- override ngOnChanges() {
20
- if(this.store) {
21
- this.query = new BaseQuery(this.store)
22
- }
23
- if (this.attributeModel.readonly) {
24
- this.getValue()
25
- }
26
- }
27
- override getValue() {
28
- if (this.attributeModel.readonly) {
29
- const value = this.record[this.attributeModel.name] ?? 0;
30
- return new Intl.NumberFormat('gb-Uk').format(value);
31
- }
32
- return null;
33
- }
34
-
35
- }
@@ -1,22 +0,0 @@
1
- <ng-container>
2
-
3
- <div class="password-control">
4
- <span class="p-input-icon-left">
5
- <i class="pi pi-key"></i>
6
- <input type="password" autocomplete="off" pInputText [placeholder]="attributeModel.placeholder ?? ''"
7
- [ngModel]="record[attributeModel.name]" [required]="attributeModel.isRequired ?? false" #passwordField="ngModel"
8
- (ngModelChange)="handleModelChange($event, passwordField.valid)" [ngClass]="{
9
- 'ng-dirty ng-invalid': !passwordField.valid && error == attributeModel.name
10
- }" class="block p-inputtext" />
11
-
12
- </span>
13
- </div>
14
- @if (!passwordField.valid && passwordField.dirty) {
15
- <div>
16
- <small id="password-help" class="p-error">{{
17
- invalidPasswordErrorMsg
18
- }}</small>
19
- </div>
20
- }
21
-
22
- </ng-container>
@@ -1,28 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
- import { PasswordComponent } from './password.component';
3
-
4
- describe('PasswordComponent', () => {
5
- let component: PasswordComponent;
6
- let fixture: ComponentFixture<PasswordComponent>;
7
-
8
- beforeEach(async () => {
9
- await TestBed.configureTestingModule({
10
- imports: [PasswordComponent],
11
- }).compileComponents();
12
-
13
- fixture = TestBed.createComponent(PasswordComponent);
14
- component = fixture.componentInstance;
15
- component.attributeModel = {
16
- placeholder: "Enter username",
17
- name: "username",
18
- isRequired: true,
19
- readonly: false
20
- };
21
- component.record = {};
22
- fixture.detectChanges();
23
- });
24
-
25
- it('should create', () => {
26
- expect(component).toBeTruthy();
27
- });
28
- });
@@ -1,24 +0,0 @@
1
- import { Component , OnInit} from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { BaseControlComponent } from '../../_base/base-control/base-control.component';
4
- import { FormsModule } from '@angular/forms';
5
-
6
- @Component({
7
- selector: 'password',
8
- standalone: true,
9
- imports: [CommonModule, FormsModule],
10
- templateUrl: './password.component.html',
11
- styleUrl: './password.component.scss',
12
- })
13
- export class PasswordComponent extends BaseControlComponent {
14
- invalidPasswordErrorMsg: string | undefined
15
-
16
- constructor(){
17
- super()
18
- }
19
-
20
- ngOninit():void{
21
- this.invalidPasswordErrorMsg = "Invalid Password";
22
- }
23
-
24
- }
@@ -1,36 +0,0 @@
1
- <ng-container class="textAreaContainer">
2
- <div *ngIf="attributeModel.displayText" class="mb-2">
3
- <label>{{ attributeModel.displayText }}</label>
4
- <span class="asterisk ml-1" *ngIf="attributeModel.isRequired">*</span>
5
- </div>
6
- @if (attributeModel.readonly) {
7
- <div class="mb-2" [ngStyle]="{'font-size':'14px', 'color':'#0F1729', 'font-weight':'600' }">
8
- <label class="text-value-wrapper" [ngStyle]="{color: attributeModel.textColorOnReadonly}">{{ getValue() }}</label>
9
- </div>
10
- } @else {
11
- <div class="textAreaControl">
12
- <textarea
13
- pInputTextarea
14
- [rows]="rowspan ?? 3"
15
- cols="30"
16
- [disabled]="attributeModel?.readonly ?? false"
17
- [ngModel]="record[attributeModel.name]"
18
- [name]="attributeModel.name ?? 'textArea'"
19
- [required]="attributeModel?.isRequired ?? false"
20
- [ngStyle]="{
21
- width: attributeModel.customColumnWidth
22
- ? attributeModel.customColumnWidth
23
- : ''
24
- }"
25
- #textArea="ngModel"
26
- (ngModelChange)="handleModelChange($event, textArea.valid)"
27
- [ngClass]="{
28
- 'ng-dirty ng-invalid':
29
- (!textArea.valid && error == attributeModel?.name)
30
-
31
- }"
32
- ></textarea>
33
-
34
- </div>
35
- }
36
- </ng-container>
@@ -1,22 +0,0 @@
1
- .asterisk {
2
- color: red;
3
- }
4
-
5
- .textAreaControl {
6
- textarea {
7
- width: 100%;
8
- resize: vertical;
9
- }
10
- position: relative;
11
- }
12
-
13
- .textCount {
14
- position: absolute;
15
- bottom: 10%;
16
- right: 2%;
17
- color: #bcbcbc;
18
- }
19
-
20
- .markRed {
21
- color: red;
22
- }
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from "@angular/core/testing";
2
- import { TextAreaComponent } from "./text-area.component";
3
-
4
- describe("TextAreaComponent", () => {
5
- let component: TextAreaComponent;
6
- let fixture: ComponentFixture<TextAreaComponent>;
7
-
8
- beforeEach(async () => {
9
- await TestBed.configureTestingModule({
10
- imports: [TextAreaComponent],
11
- }).compileComponents();
12
-
13
- fixture = TestBed.createComponent(TextAreaComponent);
14
- component = fixture.componentInstance;
15
- component.attributeModel = { displayText: "", name: 'testTextBox', }
16
- component.record = {}
17
- fixture.detectChanges();
18
- });
19
-
20
- it("should create", () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });