commons-shared-web-ui 0.0.62 → 0.0.64

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 (222) hide show
  1. package/fesm2022/commons-shared-web-ui.mjs +16368 -0
  2. package/fesm2022/commons-shared-web-ui.mjs.map +1 -0
  3. package/index.d.ts +5077 -0
  4. package/package.json +34 -53
  5. package/.claude/settings.local.json +0 -10
  6. package/documentation/alert.md +0 -123
  7. package/documentation/button-dropdown.md +0 -126
  8. package/documentation/button.md +0 -184
  9. package/documentation/cards-usage-guidelines.md +0 -131
  10. package/documentation/configurable-form.md +0 -605
  11. package/documentation/confirmation-modal.md +0 -250
  12. package/documentation/filter-sidebar.md +0 -178
  13. package/documentation/filter-table-selector.md +0 -228
  14. package/documentation/form-builder.md +0 -599
  15. package/documentation/form-components.md +0 -384
  16. package/documentation/form-field-configuration.md +0 -250
  17. package/documentation/nav.md +0 -427
  18. package/documentation/pagination.md +0 -181
  19. package/documentation/side-nav-documentation.md +0 -169
  20. package/documentation/smart-form.md +0 -2819
  21. package/documentation/smart-table.md +0 -1297
  22. package/documentation/snackbar.md +0 -118
  23. package/documentation/style-externalization.md +0 -88
  24. package/documentation/summary-card.md +0 -279
  25. package/documentation/table-column-configuration.md +0 -221
  26. package/documentation/time-picker.md +0 -274
  27. package/ng-package.json +0 -30
  28. package/src/lib/modules/alert/alert.models.ts +0 -6
  29. package/src/lib/modules/alert/alert.module.ts +0 -16
  30. package/src/lib/modules/alert/components/alert/alert.component.html +0 -27
  31. package/src/lib/modules/alert/components/alert/alert.component.scss +0 -92
  32. package/src/lib/modules/alert/components/alert/alert.component.ts +0 -81
  33. package/src/lib/modules/button/button.models.ts +0 -13
  34. package/src/lib/modules/button/button.module.ts +0 -16
  35. package/src/lib/modules/button/components/button/button.component.html +0 -22
  36. package/src/lib/modules/button/components/button/button.component.scss +0 -92
  37. package/src/lib/modules/button/components/button/button.component.ts +0 -67
  38. package/src/lib/modules/button-dropdown/button-dropdown.models.ts +0 -26
  39. package/src/lib/modules/button-dropdown/button-dropdown.module.ts +0 -22
  40. package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.html +0 -41
  41. package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.scss +0 -135
  42. package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.ts +0 -160
  43. package/src/lib/modules/configurable-form/component/configurable-form.component.html +0 -294
  44. package/src/lib/modules/configurable-form/component/configurable-form.component.scss +0 -503
  45. package/src/lib/modules/configurable-form/component/configurable-form.component.ts +0 -628
  46. package/src/lib/modules/configurable-form/configurable-form.examples.ts +0 -154
  47. package/src/lib/modules/configurable-form/configurable-form.model.ts +0 -131
  48. package/src/lib/modules/configurable-form/configurable-form.module.ts +0 -19
  49. package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.html +0 -77
  50. package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.scss +0 -395
  51. package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.ts +0 -266
  52. package/src/lib/modules/confirmation-modal/confirmation-modal.models.ts +0 -71
  53. package/src/lib/modules/confirmation-modal/confirmation-modal.module.ts +0 -20
  54. package/src/lib/modules/filter/components/filter/filter.component.html +0 -131
  55. package/src/lib/modules/filter/components/filter/filter.component.scss +0 -245
  56. package/src/lib/modules/filter/components/filter/filter.component.ts +0 -216
  57. package/src/lib/modules/filter/filter.models.ts +0 -88
  58. package/src/lib/modules/filter/filter.module.ts +0 -24
  59. package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.html +0 -112
  60. package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.scss +0 -186
  61. package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.ts +0 -163
  62. package/src/lib/modules/filter-sidebar/filter-sidebar.models.ts +0 -95
  63. package/src/lib/modules/filter-sidebar/filter-sidebar.module.ts +0 -24
  64. package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.html +0 -73
  65. package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.scss +0 -321
  66. package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.ts +0 -361
  67. package/src/lib/modules/filter-table-selector/filter-table-selector.models.ts +0 -91
  68. package/src/lib/modules/filter-table-selector/filter-table-selector.module.ts +0 -22
  69. package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.html +0 -63
  70. package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.scss +0 -496
  71. package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.ts +0 -445
  72. package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.html +0 -75
  73. package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.scss +0 -210
  74. package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.ts +0 -55
  75. package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.html +0 -25
  76. package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.scss +0 -82
  77. package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.ts +0 -95
  78. package/src/lib/modules/form-builder/components/field-selection/field-selection.component.html +0 -20
  79. package/src/lib/modules/form-builder/components/field-selection/field-selection.component.scss +0 -37
  80. package/src/lib/modules/form-builder/components/field-selection/field-selection.component.ts +0 -94
  81. package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.html +0 -46
  82. package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.scss +0 -102
  83. package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.ts +0 -50
  84. package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.html +0 -35
  85. package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.scss +0 -67
  86. package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.ts +0 -34
  87. package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.html +0 -68
  88. package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.scss +0 -113
  89. package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.ts +0 -74
  90. package/src/lib/modules/form-builder/configs/field-type-schema.map.ts +0 -533
  91. package/src/lib/modules/form-builder/form-builder.module.ts +0 -36
  92. package/src/lib/modules/form-builder/index.ts +0 -9
  93. package/src/lib/modules/form-builder/models/builder.models.ts +0 -7
  94. package/src/lib/modules/form-builder/models/field-configurator.models.ts +0 -38
  95. package/src/lib/modules/form-builder/models/field-selection.models.ts +0 -51
  96. package/src/lib/modules/form-builder/services/field-configurator.service.ts +0 -258
  97. package/src/lib/modules/form-builder/services/field-selection.service.ts +0 -299
  98. package/src/lib/modules/form-builder/services/form-schema-tree.service.ts +0 -670
  99. package/src/lib/modules/form-builder/tokens/builder.tokens.ts +0 -10
  100. package/src/lib/modules/form-builder/utils/constants.ts +0 -43
  101. package/src/lib/modules/form-components/components/checkbox/checkbox.component.html +0 -29
  102. package/src/lib/modules/form-components/components/checkbox/checkbox.component.scss +0 -111
  103. package/src/lib/modules/form-components/components/checkbox/checkbox.component.ts +0 -207
  104. package/src/lib/modules/form-components/components/checkbox/checkbox.models.ts +0 -35
  105. package/src/lib/modules/form-components/components/datepicker/datepicker.component.html +0 -42
  106. package/src/lib/modules/form-components/components/datepicker/datepicker.component.scss +0 -115
  107. package/src/lib/modules/form-components/components/datepicker/datepicker.component.ts +0 -267
  108. package/src/lib/modules/form-components/components/datepicker/datepicker.models.ts +0 -45
  109. package/src/lib/modules/form-components/components/dropdown/dropdown.component.html +0 -74
  110. package/src/lib/modules/form-components/components/dropdown/dropdown.component.scss +0 -252
  111. package/src/lib/modules/form-components/components/dropdown/dropdown.component.ts +0 -377
  112. package/src/lib/modules/form-components/components/dropdown/dropdown.models.ts +0 -53
  113. package/src/lib/modules/form-components/components/input/input.component.html +0 -51
  114. package/src/lib/modules/form-components/components/input/input.component.scss +0 -128
  115. package/src/lib/modules/form-components/components/input/input.component.ts +0 -250
  116. package/src/lib/modules/form-components/components/input/input.models.ts +0 -55
  117. package/src/lib/modules/form-components/components/radio/radio.component.html +0 -22
  118. package/src/lib/modules/form-components/components/radio/radio.component.scss +0 -107
  119. package/src/lib/modules/form-components/components/radio/radio.component.ts +0 -181
  120. package/src/lib/modules/form-components/components/radio/radio.models.ts +0 -39
  121. package/src/lib/modules/form-components/components/search/search.component.html +0 -15
  122. package/src/lib/modules/form-components/components/search/search.component.scss +0 -87
  123. package/src/lib/modules/form-components/components/search/search.component.ts +0 -213
  124. package/src/lib/modules/form-components/components/search/search.models.ts +0 -40
  125. package/src/lib/modules/form-components/components/toggle/toggle.component.html +0 -15
  126. package/src/lib/modules/form-components/components/toggle/toggle.component.scss +0 -81
  127. package/src/lib/modules/form-components/components/toggle/toggle.component.ts +0 -166
  128. package/src/lib/modules/form-components/components/toggle/toggle.models.ts +0 -27
  129. package/src/lib/modules/form-components/directives/click-outside.directive.ts +0 -22
  130. package/src/lib/modules/form-components/form-components.module.ts +0 -42
  131. package/src/lib/modules/form-field-configuration/components/_ffc-controls.scss +0 -89
  132. package/src/lib/modules/form-field-configuration/components/config-field-node/config-field-node.component.html +0 -68
  133. package/src/lib/modules/form-field-configuration/components/config-field-node/config-field-node.component.scss +0 -73
  134. package/src/lib/modules/form-field-configuration/components/config-field-node/config-field-node.component.ts +0 -34
  135. package/src/lib/modules/form-field-configuration/components/config-section-node/config-section-node.component.html +0 -78
  136. package/src/lib/modules/form-field-configuration/components/config-section-node/config-section-node.component.scss +0 -83
  137. package/src/lib/modules/form-field-configuration/components/config-section-node/config-section-node.component.ts +0 -94
  138. package/src/lib/modules/form-field-configuration/components/form-field-configuration/form-field-configuration.component.html +0 -38
  139. package/src/lib/modules/form-field-configuration/components/form-field-configuration/form-field-configuration.component.scss +0 -42
  140. package/src/lib/modules/form-field-configuration/components/form-field-configuration/form-field-configuration.component.ts +0 -92
  141. package/src/lib/modules/form-field-configuration/form-field-configuration.module.ts +0 -23
  142. package/src/lib/modules/form-field-configuration/index.ts +0 -7
  143. package/src/lib/modules/form-field-configuration/models/field-configuration.models.ts +0 -62
  144. package/src/lib/modules/form-field-configuration/services/config-schema-tree.service.ts +0 -159
  145. package/src/lib/modules/form-field-configuration/services/field-configuration.service.ts +0 -228
  146. package/src/lib/modules/material/material.module.ts +0 -94
  147. package/src/lib/modules/nav/components/nav/nav.component.html +0 -34
  148. package/src/lib/modules/nav/components/nav/nav.component.scss +0 -171
  149. package/src/lib/modules/nav/components/nav/nav.component.ts +0 -82
  150. package/src/lib/modules/nav/nav.models.ts +0 -31
  151. package/src/lib/modules/nav/nav.module.ts +0 -17
  152. package/src/lib/modules/pagination/components/pagination/pagination.component.html +0 -52
  153. package/src/lib/modules/pagination/components/pagination/pagination.component.scss +0 -155
  154. package/src/lib/modules/pagination/components/pagination/pagination.component.ts +0 -109
  155. package/src/lib/modules/pagination/pagination.module.ts +0 -17
  156. package/src/lib/modules/side-nav/components/side-nav/side-nav.component.html +0 -56
  157. package/src/lib/modules/side-nav/components/side-nav/side-nav.component.scss +0 -342
  158. package/src/lib/modules/side-nav/components/side-nav/side-nav.component.ts +0 -135
  159. package/src/lib/modules/side-nav/side-nav.models.ts +0 -38
  160. package/src/lib/modules/side-nav/side-nav.module.ts +0 -16
  161. package/src/lib/modules/smart-form/components/form-field/form-field.component.html +0 -1379
  162. package/src/lib/modules/smart-form/components/form-field/form-field.component.scss +0 -2255
  163. package/src/lib/modules/smart-form/components/form-field/form-field.component.ts +0 -3174
  164. package/src/lib/modules/smart-form/components/form-section/form-section.component.html +0 -67
  165. package/src/lib/modules/smart-form/components/form-section/form-section.component.scss +0 -209
  166. package/src/lib/modules/smart-form/components/form-section/form-section.component.ts +0 -142
  167. package/src/lib/modules/smart-form/components/smart-form/smart-form.component.html +0 -253
  168. package/src/lib/modules/smart-form/components/smart-form/smart-form.component.scss +0 -689
  169. package/src/lib/modules/smart-form/components/smart-form/smart-form.component.ts +0 -1134
  170. package/src/lib/modules/smart-form/index.ts +0 -10
  171. package/src/lib/modules/smart-form/models/form-schema.model.ts +0 -803
  172. package/src/lib/modules/smart-form/models/hierarchy-config.model.ts +0 -22
  173. package/src/lib/modules/smart-form/services/expression.service.ts +0 -75
  174. package/src/lib/modules/smart-form/services/smart-form-controller.service.ts +0 -67
  175. package/src/lib/modules/smart-form/smart-form.examples.ts +0 -1324
  176. package/src/lib/modules/smart-form/smart-form.module.ts +0 -40
  177. package/src/lib/modules/smart-form/utils/translation.utils.ts +0 -82
  178. package/src/lib/modules/smart-form/utils/trusted-url.pipe.ts +0 -25
  179. package/src/lib/modules/smart-form/utils/validation.utils.ts +0 -98
  180. package/src/lib/modules/smart-table/components/smart-table/smart-table.component.html +0 -283
  181. package/src/lib/modules/smart-table/components/smart-table/smart-table.component.scss +0 -685
  182. package/src/lib/modules/smart-table/components/smart-table/smart-table.component.ts +0 -1219
  183. package/src/lib/modules/smart-table/models/table-config.model.ts +0 -247
  184. package/src/lib/modules/smart-table/smart-table.module.ts +0 -30
  185. package/src/lib/modules/smart-table/utils/safe-html.pipe.ts +0 -28
  186. package/src/lib/modules/smart-table/utils/smart-table.utils.ts +0 -18
  187. package/src/lib/modules/snackbar/components/snackbar.component.html +0 -41
  188. package/src/lib/modules/snackbar/components/snackbar.component.scss +0 -99
  189. package/src/lib/modules/snackbar/components/snackbar.component.ts +0 -18
  190. package/src/lib/modules/snackbar/models/snackbar.models.ts +0 -10
  191. package/src/lib/modules/snackbar/services/snackbar.service.ts +0 -40
  192. package/src/lib/modules/snackbar/snackbar.module.ts +0 -11
  193. package/src/lib/modules/summary-card/components/summary-card/summary-card.component.html +0 -47
  194. package/src/lib/modules/summary-card/components/summary-card/summary-card.component.scss +0 -199
  195. package/src/lib/modules/summary-card/components/summary-card/summary-card.component.ts +0 -126
  196. package/src/lib/modules/summary-card/summary-card.module.ts +0 -18
  197. package/src/lib/modules/table-column-configuration/components/_tcc-controls.scss +0 -53
  198. package/src/lib/modules/table-column-configuration/components/config-column-node/config-column-node.component.html +0 -47
  199. package/src/lib/modules/table-column-configuration/components/config-column-node/config-column-node.component.scss +0 -50
  200. package/src/lib/modules/table-column-configuration/components/config-column-node/config-column-node.component.ts +0 -33
  201. package/src/lib/modules/table-column-configuration/components/table-column-configuration/table-column-configuration.component.html +0 -30
  202. package/src/lib/modules/table-column-configuration/components/table-column-configuration/table-column-configuration.component.scss +0 -36
  203. package/src/lib/modules/table-column-configuration/components/table-column-configuration/table-column-configuration.component.ts +0 -78
  204. package/src/lib/modules/table-column-configuration/index.ts +0 -5
  205. package/src/lib/modules/table-column-configuration/models/table-column-configuration.models.ts +0 -20
  206. package/src/lib/modules/table-column-configuration/services/table-column-configuration.service.ts +0 -77
  207. package/src/lib/modules/table-column-configuration/table-column-configuration.module.ts +0 -21
  208. package/src/lib/modules/time-picker/components/time-picker/time-picker.component.html +0 -37
  209. package/src/lib/modules/time-picker/components/time-picker/time-picker.component.scss +0 -102
  210. package/src/lib/modules/time-picker/components/time-picker/time-picker.component.ts +0 -178
  211. package/src/lib/modules/time-picker/components/time-wheel-panel/time-wheel-panel.component.html +0 -78
  212. package/src/lib/modules/time-picker/components/time-wheel-panel/time-wheel-panel.component.scss +0 -226
  213. package/src/lib/modules/time-picker/components/time-wheel-panel/time-wheel-panel.component.ts +0 -595
  214. package/src/lib/modules/time-picker/models/time-picker.models.ts +0 -49
  215. package/src/lib/modules/time-picker/time-picker.module.ts +0 -23
  216. package/src/lib/shared-ui.module.ts +0 -55
  217. package/src/lib/utils/constants.ts +0 -11
  218. package/src/lib/utils/storage.utils.ts +0 -37
  219. package/src/lib/utils/string.utils.ts +0 -23
  220. package/src/lib/utils/translation.utils.ts +0 -87
  221. package/src/public-api.ts +0 -127
  222. package/tsconfig.lib.json +0 -15
@@ -1,294 +0,0 @@
1
- <form [formGroup]="form" class="configurable-form-container" *ngIf="form">
2
-
3
- <ng-container *ngFor="let section of sections">
4
-
5
- <!-- Repeater Section -->
6
- <div *ngIf="section.isRepeater; else normalSection"
7
- [ngClass]="section.noCardLayout ? 'section-no-card' : 'section-card'">
8
- <div class="section-header" *ngIf="section.sectionTitle">
9
- <h3 class="section-title">{{ section.sectionTitle }}</h3>
10
- <button *ngIf="section.collapsible" mat-icon-button type="button" (click)="toggleSection(section)">
11
- <mat-icon>{{ section.collapsed ? 'expand_more' : 'expand_less' }}</mat-icon>
12
- </button>
13
- </div>
14
-
15
- <div [formArrayName]="section.formArrayName || 'items'" *ngIf="!section.collapsed">
16
- <div *ngFor="let item of getFormArray(section.formArrayName!).controls; let i = index"
17
- [formGroupName]="i" class="repeater-item">
18
- <div class="repeater-item-header" *ngIf="getFormArray(section.formArrayName!).length > 1">
19
- <span class="text-small">{{ section.repeaterItemLabel || labels.repeaterItemDefaultLabel }} {{i
20
- + 1}}</span>
21
- <button mat-icon-button color="warn" type="button"
22
- (click)="removeRepeaterItem(section.formArrayName!, i)"
23
- [disabled]="section.minItems && getFormArray(section.formArrayName!).length <= section.minItems">
24
- <mat-icon>delete</mat-icon>
25
- </button>
26
- </div>
27
-
28
- <!-- Fields Grid -->
29
- <div class="form-grid">
30
- <div *ngFor="let field of section.fields" [ngClass]="['form-col', field.class || 'col-12']"
31
- [hidden]="!isFieldVisible(field)">
32
- <ng-container
33
- *ngTemplateOutlet="fieldTemplate; context: {field: field, group: item}"></ng-container>
34
- </div>
35
- </div>
36
-
37
- <div class="repeater-separator" *ngIf="i < getFormArray(section.formArrayName!).length - 1"></div>
38
- </div>
39
- </div>
40
-
41
- <button mat-button color="primary" type="button" (click)="addRepeaterItem(section)" class="add-btn"
42
- *ngIf="!section.collapsed"
43
- [disabled]="section.maxItems && getFormArray(section.formArrayName!).length >= section.maxItems">
44
- <mat-icon>add_circle_outline</mat-icon> {{ section.addLabel || labels.addMoreDefaultLabel }}
45
- </button>
46
- </div>
47
-
48
- <!-- Normal Section -->
49
- <ng-template #normalSection>
50
- <div [ngClass]="section.noCardLayout ? 'section-no-card' : 'section-card'">
51
- <div class="section-header" *ngIf="section.sectionTitle">
52
- <h3 class="section-title">{{ section.sectionTitle }}</h3>
53
- <button *ngIf="section.collapsible" mat-icon-button type="button" (click)="toggleSection(section)">
54
- <mat-icon>{{ section.collapsed ? 'expand_more' : 'expand_less' }}</mat-icon>
55
- </button>
56
- </div>
57
- <div class="form-grid" *ngIf="!section.collapsed">
58
- <div *ngFor="let field of section.fields" [ngClass]="['form-col', field.class || 'col-12']"
59
- [hidden]="!isFieldVisible(field)">
60
- <!-- Pass the root form group to the template -->
61
- <ng-container
62
- *ngTemplateOutlet="fieldTemplate; context: {field: field, group: form}"></ng-container>
63
- </div>
64
- </div>
65
- </div>
66
- </ng-template>
67
-
68
- </ng-container>
69
-
70
- </form>
71
-
72
- <!-- Reusable Field Template -->
73
- <ng-template #fieldTemplate let-field="field" let-group="group">
74
- <div [formGroup]="group">
75
-
76
- <!-- Text / Email / Number / Tel / URL (Password removed) -->
77
- <div *ngIf="['text', 'email', 'number', 'tel', 'url'].includes(field.type || '')" class="field-container">
78
- <div class="field-label" *ngIf="field.label">
79
- {{ field.label }}
80
- <span class="text-danger" *ngIf="field.required || field.mandatory">*</span>
81
- </div>
82
- <div class="input-wrapper">
83
- <input [type]="field.type" [formControlName]="field.name" [placeholder]="field.placeholder || ''"
84
- [readonly]="field.readonly" class="form-input" [name]="field.name"
85
- [class.is-invalid]="group.get(field.name)?.touched && group.get(field.name)?.invalid"
86
- [maxlength]="field.validationRules?.maxLength || field.uiConfig?.maxCharacters">
87
- <div class="input-suffix">
88
- <span class="suffix-text" *ngIf="field.suffixText">{{ field.suffixText }}</span>
89
- <mat-icon *ngIf="field.suffixIcon">{{ field.suffixIcon }}</mat-icon>
90
- <mat-icon *ngIf="field.icon">{{ field.icon }}</mat-icon>
91
- <mat-icon *ngIf="field.readonly" class="lock-icon">lock_outline</mat-icon>
92
- </div>
93
- </div>
94
- <!-- Character count -->
95
- <div class="char-count-row" *ngIf="field.uiConfig?.maxCharacters || field.validationRules?.maxLength">
96
- <div class="hint-text" *ngIf="field.hint || field.helpText">{{ field.hint || field.helpText }}</div>
97
- <div class="char-count">
98
- {{ getCharacterCount(field.name) }} / {{ field.uiConfig?.maxCharacters ||
99
- field.validationRules?.maxLength }} {{ labels.charactersLabel }}
100
- </div>
101
- </div>
102
- <div class="hint-text mt-2"
103
- *ngIf="(field.hint || field.helpText) && !field.uiConfig?.maxCharacters && !field.validationRules?.maxLength">
104
- {{ field.hint || field.helpText }}
105
- </div>
106
- </div>
107
-
108
- <!-- Password Field (Separated) -->
109
- <div *ngIf="field.type === 'password'" class="field-container">
110
- <div class="field-label" *ngIf="field.label">
111
- {{ field.label }}
112
- <span class="text-danger" *ngIf="field.required || field.mandatory">*</span>
113
- </div>
114
- <div class="input-wrapper">
115
- <input [type]="isPasswordVisible(field.name) ? 'text' : 'password'" [formControlName]="field.name"
116
- [placeholder]="field.placeholder || ''" [readonly]="field.readonly" class="form-input"
117
- [class.is-invalid]="group.get(field.name)?.touched && group.get(field.name)?.invalid"
118
- [maxlength]="field.validationRules?.maxLength || field.uiConfig?.maxCharacters">
119
- <div class="input-suffix">
120
- <span class="suffix-text" *ngIf="field.suffixText">{{ field.suffixText }}</span>
121
- <mat-icon *ngIf="field.suffixIcon">{{ field.suffixIcon }}</mat-icon>
122
- <mat-icon *ngIf="field.icon">{{ field.icon }}</mat-icon>
123
- <mat-icon *ngIf="field.readonly" class="lock-icon">lock_outline</mat-icon>
124
- <mat-icon class="password-toggle-icon" (click)="togglePassword(field.name)">
125
- {{ isPasswordVisible(field.name) ? 'visibility' : 'visibility_off' }}
126
- </mat-icon>
127
- </div>
128
- </div>
129
- <!-- Character count -->
130
- <div class="char-count-row" *ngIf="field.uiConfig?.maxCharacters || field.validationRules?.maxLength">
131
- <div class="hint-text" *ngIf="field.hint || field.helpText">{{ field.hint || field.helpText }}</div>
132
- <div class="char-count">
133
- {{ getCharacterCount(field.name) }} / {{ field.uiConfig?.maxCharacters ||
134
- field.validationRules?.maxLength }} {{ labels.charactersLabel }}
135
- </div>
136
- </div>
137
- <div class="hint-text mt-2"
138
- *ngIf="(field.hint || field.helpText) && !field.uiConfig?.maxCharacters && !field.validationRules?.maxLength">
139
- {{ field.hint || field.helpText }}
140
- </div>
141
- </div>
142
-
143
- <!-- Textarea -->
144
- <div *ngIf="field.type === 'textarea'" class="field-container">
145
- <div class="field-label" *ngIf="field.label">
146
- {{ field.label }}
147
- <span class="text-danger" *ngIf="field.required || field.mandatory">*</span>
148
- </div>
149
- <textarea [formControlName]="field.name" [placeholder]="field.placeholder || ''" [readonly]="field.readonly"
150
- class="form-input form-textarea" rows="4"
151
- [class.is-invalid]="group.get(field.name)?.touched && group.get(field.name)?.invalid"
152
- [maxlength]="field.validationRules?.maxLength || field.uiConfig?.maxCharacters"></textarea>
153
- <!-- Character count -->
154
- <div class="char-count-row" *ngIf="field.uiConfig?.maxCharacters || field.validationRules?.maxLength">
155
- <div class="hint-text" *ngIf="field.hint || field.helpText">{{ field.hint || field.helpText }}</div>
156
- <div class="char-count">
157
- {{ getCharacterCount(field.name) }} / {{ field.uiConfig?.maxCharacters ||
158
- field.validationRules?.maxLength }} {{ labels.charactersLabel }}
159
- </div>
160
- </div>
161
- <div class="hint-text mt-2"
162
- *ngIf="(field.hint || field.helpText) && !field.uiConfig?.maxCharacters && !field.validationRules?.maxLength">
163
- {{ field.hint || field.helpText }}
164
- </div>
165
- </div>
166
-
167
- <!-- Select / Dropdown -->
168
- <div *ngIf="field.type === 'select' || field.type === 'dropdown'" class="field-container">
169
- <div class="field-label" *ngIf="field.label">
170
- {{ field.label }}
171
- <span class="text-danger" *ngIf="field.required || field.mandatory">*</span>
172
- </div>
173
- <select [formControlName]="field.name" class="form-input"
174
- [class.is-invalid]="group.get(field.name)?.touched && group.get(field.name)?.invalid">
175
- <option value="" disabled selected *ngIf="field.placeholder">{{ field.placeholder }}</option>
176
- <option value="" disabled selected *ngIf="!field.placeholder">{{ labels.selectDefaultPlaceholder }}
177
- </option>
178
- <option *ngFor="let opt of getFieldOptions(field)" [value]="opt.value">{{ opt.label }}</option>
179
- </select>
180
- <div class="hint-text mt-2" *ngIf="field.hint || field.helpText">{{ field.hint || field.helpText }}</div>
181
- </div>
182
-
183
- <!-- Date -->
184
- <div *ngIf="field.type === 'date'" class="field-container">
185
- <div class="field-label" *ngIf="field.label">
186
- {{ field.label }}
187
- <span class="text-danger" *ngIf="field.required || field.mandatory">*</span>
188
- </div>
189
- <div class="relative">
190
- <input matInput [matDatepicker]="picker" [formControlName]="field.name"
191
- [placeholder]="field.placeholder || ''" class="form-input"
192
- [class.is-invalid]="group.get(field.name)?.touched && group.get(field.name)?.invalid">
193
- <mat-datepicker-toggle matSuffix [for]="picker" class="date-toggle"></mat-datepicker-toggle>
194
- <mat-datepicker #picker></mat-datepicker>
195
- </div>
196
- <div class="hint-text mt-2" *ngIf="field.hint || field.helpText">{{ field.hint || field.helpText }}</div>
197
- </div>
198
-
199
- <!-- Radio -->
200
- <div *ngIf="field.type === 'radio'" class="radio-group-container"
201
- [class.is-invalid]="group.get(field.name)?.touched && group.get(field.name)?.invalid">
202
- <label class="field-label">
203
- {{ field.label }}
204
- <span class="text-danger" *ngIf="field.required || field.mandatory">*</span>
205
- </label>
206
- <mat-radio-group [formControlName]="field.name" class="radio-group">
207
- <mat-radio-button *ngFor="let opt of getFieldOptions(field)" [value]="opt.value" class="radio-button">
208
- {{ opt.label }}
209
- </mat-radio-button>
210
- </mat-radio-group>
211
- <div class="hint-text mt-2" *ngIf="field.hint || field.helpText">{{ field.hint || field.helpText }}</div>
212
- </div>
213
-
214
- <!-- Composite Field (Sub-groups) -->
215
- <div *ngIf="field.type === 'composite'" class="field-container">
216
- <div class="field-label" *ngIf="field.label">
217
- {{ field.label }}
218
- <span class="text-danger" *ngIf="field.required || field.mandatory">*</span>
219
- </div>
220
- <div class="composite-container">
221
- <ng-container *ngFor="let sub of field.subFields; let last = last">
222
- <div class="composite-sub-field" style="flex: 1;">
223
- <div class="field-label" *ngIf="sub.label"
224
- style="font-size: 0.75rem; font-weight: normal; margin-bottom: 0.25rem;">
225
- {{ sub.label }}
226
- </div>
227
- <div class="input-wrapper">
228
- <input [type]="sub.type" [formControlName]="sub.name" [placeholder]="sub.placeholder || ''"
229
- [readonly]="sub.readonly" class="form-input"
230
- [class.is-invalid]="group.get(sub.name)?.touched && group.get(sub.name)?.invalid">
231
- <div class="input-suffix" [class.color-suffix]="sub.suffixText === '%'">
232
- <span class="suffix-text" *ngIf="sub.suffixText">{{ sub.suffixText }}</span>
233
- <mat-icon *ngIf="sub.readonly" class="lock-icon">lock_outline</mat-icon>
234
- </div>
235
- </div>
236
- </div>
237
- <!-- Adjust separator alignment if labels are present -->
238
- <span class="separator" *ngIf="!last && field.separator"
239
- [style.padding-top]="sub.label ? '1.25rem' : '0'">{{ field.separator }}</span>
240
- </ng-container>
241
- </div>
242
- <div class="hint-text mt-2" *ngIf="field.hint || field.helpText">{{ field.hint || field.helpText }}</div>
243
- <div class="error-text text-danger text-small mt-1" *ngIf="group.errors?.['invalid_minMax_' + field.name]">
244
- {{ labels.errorMinValue }}
245
- </div>
246
- <div class="error-text text-danger text-small mt-1"
247
- *ngIf="group.errors?.['invalid_percentageTotal_' + field.name]">
248
- {{ labels.errorPercentageTotal }}
249
- </div>
250
- </div>
251
- </div>
252
-
253
- <!-- File Upload -->
254
- <div *ngIf="field.type === 'file'" class="field-container">
255
- <div class="field-label" *ngIf="field.label">
256
- {{ field.label }}
257
- <span class="text-danger" *ngIf="field.required || field.mandatory">*</span>
258
- </div>
259
-
260
- <!-- Upload Box -->
261
- <div class="upload-box" (click)="fileInput.click()"
262
- [class.is-invalid]="group.get(field.name)?.touched && group.get(field.name)?.invalid"
263
- *ngIf="!field.uploadedFiles || field.uploadedFiles.length === 0 || field.multiple">
264
- <mat-icon class="upload-icon">cloud_upload</mat-icon>
265
- <div class="upload-text">{{ labels.uploadDragDropText }}</div>
266
- <div class="upload-hint">{{ labels.uploadHint }}</div>
267
- <input #fileInput type="file" [attr.multiple]="field.multiple ? true : null" [attr.accept]="field.accept"
268
- (change)="onFileChange($event, field)" style="display: none;">
269
- </div>
270
-
271
- <!-- Uploaded Files List -->
272
- <div class="uploaded-files-list" *ngIf="field.uploadedFiles && field.uploadedFiles.length > 0">
273
- <div class="uploaded-file-item" *ngFor="let file of field.uploadedFiles; let i = index">
274
- <div class="file-icon">
275
- <mat-icon class="pdf-icon" *ngIf="file.type === 'application/pdf'">picture_as_pdf</mat-icon>
276
- <mat-icon class="doc-icon"
277
- *ngIf="file.type.includes('word') || file.type.includes('document')">description</mat-icon>
278
- <mat-icon class="img-icon" *ngIf="file.type.includes('image')">image</mat-icon>
279
- <mat-icon class="file-icon-default"
280
- *ngIf="!file.type.includes('pdf') && !file.type.includes('word') && !file.type.includes('document') && !file.type.includes('image')">insert_drive_file</mat-icon>
281
- </div>
282
- <div class="file-info">
283
- <div class="file-name">{{ file.name }}</div>
284
- <div class="file-size">{{ (file.size / 1024).toFixed(2) }} KB</div>
285
- </div>
286
- <button mat-icon-button color="warn" type="button" (click)="removeFile(field, i)"
287
- class="remove-file-btn">
288
- <mat-icon>close</mat-icon>
289
- </button>
290
- </div>
291
- </div>
292
-
293
- </div>
294
- </ng-template>