ng-prime-tools 1.0.8 → 1.0.10

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 (295) hide show
  1. package/README.md +35 -9
  2. package/esm2022/lib/enums/badge-type.enum.mjs +21 -0
  3. package/esm2022/lib/enums/form-input-type.enum.mjs +2 -1
  4. package/esm2022/lib/enums/public-api.mjs +2 -1
  5. package/esm2022/lib/models/badge.model.mjs +2 -0
  6. package/esm2022/lib/models/bread-crumb-config.model.mjs +2 -0
  7. package/esm2022/lib/models/button.model.mjs +2 -0
  8. package/esm2022/lib/models/card-config.model.mjs +2 -0
  9. package/esm2022/lib/models/chart-config.model.mjs +2 -0
  10. package/esm2022/lib/models/dialog.model.mjs +2 -0
  11. package/esm2022/lib/models/footer-config.model.mjs +2 -0
  12. package/esm2022/lib/models/footer.model.mjs +2 -0
  13. package/esm2022/lib/models/form-text-field.model.mjs +1 -1
  14. package/esm2022/lib/models/icon-style.model.mjs +2 -0
  15. package/esm2022/lib/models/image-style.model.mjs +2 -0
  16. package/esm2022/lib/models/index.mjs +1 -5
  17. package/esm2022/lib/models/login-model.mjs +2 -0
  18. package/esm2022/lib/models/login-page-config.model.mjs +2 -0
  19. package/esm2022/lib/models/menu-config.model.mjs +2 -0
  20. package/esm2022/lib/models/menu-item.model.mjs +2 -0
  21. package/esm2022/lib/models/menu.model.mjs +2 -0
  22. package/esm2022/lib/models/metric-card-data.model.mjs +2 -0
  23. package/esm2022/lib/models/nav-bar-menu-config.model.mjs +2 -0
  24. package/esm2022/lib/models/page-skeleton-config.model.mjs +2 -0
  25. package/esm2022/lib/models/pattern.model.mjs +2 -0
  26. package/esm2022/lib/models/public-api.mjs +37 -1
  27. package/esm2022/lib/models/side-menu-bar-config.model.mjs +2 -0
  28. package/esm2022/lib/models/table-column.model.mjs +1 -1
  29. package/esm2022/lib/models/text-style.model.mjs +2 -0
  30. package/esm2022/lib/models/title-style.model.mjs +2 -0
  31. package/esm2022/lib/multi-search-criteria/index.mjs +2 -6
  32. package/esm2022/lib/multi-search-criteria/multi-search-criteria.component.mjs +3 -3
  33. package/esm2022/lib/multi-search-criteria/public-api.mjs +3 -0
  34. package/esm2022/lib/ng-advanced-prime-table/index.mjs +2 -6
  35. package/esm2022/lib/ng-advanced-prime-table/ng-advanced-prime-table.component.mjs +14 -3
  36. package/esm2022/lib/ng-advanced-prime-table/ng-advanced-prime-table.module.mjs +7 -3
  37. package/esm2022/lib/ng-advanced-prime-table/public-api.mjs +3 -0
  38. package/esm2022/lib/ng-prime-tools.module.mjs +175 -5
  39. package/esm2022/lib/pt-bread-crumb/index.mjs +2 -0
  40. package/esm2022/lib/pt-bread-crumb/pt-bread-crumb.component.mjs +50 -0
  41. package/esm2022/lib/pt-bread-crumb/pt-bread-crumb.module.mjs +19 -0
  42. package/esm2022/lib/pt-bread-crumb/pt-bread-crumb.service.mjs +92 -0
  43. package/esm2022/lib/pt-bread-crumb/public-api.mjs +3 -0
  44. package/esm2022/lib/pt-button/index.mjs +2 -0
  45. package/esm2022/lib/pt-button/pt-button.component.mjs +56 -0
  46. package/esm2022/lib/pt-button/pt-button.module.mjs +19 -0
  47. package/esm2022/lib/pt-button/public-api.mjs +3 -0
  48. package/esm2022/lib/pt-card/index.mjs +2 -0
  49. package/esm2022/lib/pt-card/pt-card.component.mjs +115 -0
  50. package/esm2022/lib/pt-card/pt-card.module.mjs +19 -0
  51. package/esm2022/lib/pt-card/public-api.mjs +3 -0
  52. package/esm2022/lib/pt-chart/index.mjs +2 -0
  53. package/esm2022/lib/pt-chart/pt-chart.component.mjs +61 -0
  54. package/esm2022/lib/pt-chart/pt-chart.module.mjs +18 -0
  55. package/esm2022/lib/pt-chart/public-api.mjs +3 -0
  56. package/esm2022/lib/pt-dialog/index.mjs +2 -0
  57. package/esm2022/lib/pt-dialog/pt-dialog.component.mjs +92 -0
  58. package/esm2022/lib/pt-dialog/pt-dialog.module.mjs +36 -0
  59. package/esm2022/lib/pt-dialog/public-api.mjs +3 -0
  60. package/esm2022/lib/pt-footer/index.mjs +2 -0
  61. package/esm2022/lib/pt-footer/pt-footer.component.mjs +41 -0
  62. package/esm2022/lib/pt-footer/pt-footer.module.mjs +19 -0
  63. package/esm2022/lib/pt-footer/public-api.mjs +3 -0
  64. package/esm2022/lib/pt-login-page/index.mjs +2 -0
  65. package/esm2022/lib/pt-login-page/pt-login-page.component.mjs +142 -0
  66. package/esm2022/lib/pt-login-page/pt-login-page.module.mjs +39 -0
  67. package/esm2022/lib/pt-login-page/public-api.mjs +3 -0
  68. package/esm2022/lib/pt-menu/index.mjs +2 -0
  69. package/esm2022/lib/pt-menu/pt-menu.component.mjs +90 -0
  70. package/esm2022/lib/pt-menu/pt-menu.module.mjs +18 -0
  71. package/esm2022/lib/pt-menu/public-api.mjs +3 -0
  72. package/esm2022/lib/pt-menu-fancy/index.mjs +2 -0
  73. package/esm2022/lib/pt-menu-fancy/pt-menu-fancy.component.mjs +92 -0
  74. package/esm2022/lib/pt-menu-fancy/pt-menu-fancy.module.mjs +19 -0
  75. package/esm2022/lib/pt-menu-fancy/public-api.mjs +3 -0
  76. package/esm2022/lib/pt-metric-card/index.mjs +2 -0
  77. package/esm2022/lib/pt-metric-card/pt-metric-card.component.mjs +150 -0
  78. package/esm2022/lib/pt-metric-card/pt-metric-card.module.mjs +18 -0
  79. package/esm2022/lib/pt-metric-card/public-api.mjs +3 -0
  80. package/esm2022/lib/pt-metric-card-group/index.mjs +2 -0
  81. package/esm2022/lib/pt-metric-card-group/pt-metric-card-group.component.mjs +18 -0
  82. package/esm2022/lib/pt-metric-card-group/pt-metric-card-group.module.mjs +19 -0
  83. package/esm2022/lib/pt-metric-card-group/public-api.mjs +3 -0
  84. package/esm2022/lib/pt-nav-bar-menu/index.mjs +2 -0
  85. package/esm2022/lib/pt-nav-bar-menu/pt-nav-bar-menu.component.mjs +97 -0
  86. package/esm2022/lib/pt-nav-bar-menu/pt-nav-bar-menu.module.mjs +20 -0
  87. package/esm2022/lib/pt-nav-bar-menu/public-api.mjs +3 -0
  88. package/esm2022/lib/pt-page-skeleton/index.mjs +2 -0
  89. package/esm2022/lib/pt-page-skeleton/pt-page-skeleton.component.mjs +53 -0
  90. package/esm2022/lib/pt-page-skeleton/pt-page-skeleton.module.mjs +44 -0
  91. package/esm2022/lib/pt-page-skeleton/public-api.mjs +3 -0
  92. package/esm2022/lib/pt-side-bar-menu/index.mjs +2 -0
  93. package/esm2022/lib/pt-side-bar-menu/pt-side-bar-menu.component.mjs +206 -0
  94. package/esm2022/lib/pt-side-bar-menu/pt-side-bar-menu.module.mjs +21 -0
  95. package/esm2022/lib/pt-side-bar-menu/public-api.mjs +3 -0
  96. package/esm2022/lib/pt-text-area-input/pt-text-area-input.component.mjs +2 -2
  97. package/esm2022/lib/pt-text-input/pt-text-input.component.mjs +20 -4
  98. package/esm2022/public-api.mjs +30 -2
  99. package/fesm2022/ng-prime-tools.mjs +1780 -49
  100. package/fesm2022/ng-prime-tools.mjs.map +1 -1
  101. package/lib/enums/badge-type.enum.d.ts +20 -0
  102. package/lib/enums/badge-type.enum.d.ts.map +1 -0
  103. package/lib/enums/form-input-type.enum.d.ts +2 -1
  104. package/lib/enums/form-input-type.enum.d.ts.map +1 -1
  105. package/lib/enums/public-api.d.ts +1 -0
  106. package/lib/enums/public-api.d.ts.map +1 -1
  107. package/lib/models/badge.model.d.ts +8 -0
  108. package/lib/models/badge.model.d.ts.map +1 -0
  109. package/lib/models/bread-crumb-config.model.d.ts +7 -0
  110. package/lib/models/bread-crumb-config.model.d.ts.map +1 -0
  111. package/lib/models/button.model.d.ts +15 -0
  112. package/lib/models/button.model.d.ts.map +1 -0
  113. package/lib/models/card-config.model.d.ts +22 -0
  114. package/lib/models/card-config.model.d.ts.map +1 -0
  115. package/lib/models/chart-config.model.d.ts +18 -0
  116. package/lib/models/chart-config.model.d.ts.map +1 -0
  117. package/lib/models/dialog.model.d.ts +13 -0
  118. package/lib/models/dialog.model.d.ts.map +1 -0
  119. package/lib/models/footer-config.model.d.ts +8 -0
  120. package/lib/models/footer-config.model.d.ts.map +1 -0
  121. package/lib/models/footer.model.d.ts +5 -0
  122. package/lib/models/footer.model.d.ts.map +1 -0
  123. package/lib/models/form-text-field.model.d.ts +2 -0
  124. package/lib/models/form-text-field.model.d.ts.map +1 -1
  125. package/lib/models/icon-style.model.d.ts +7 -0
  126. package/lib/models/icon-style.model.d.ts.map +1 -0
  127. package/lib/models/image-style.model.d.ts +9 -0
  128. package/lib/models/image-style.model.d.ts.map +1 -0
  129. package/lib/models/index.d.ts +0 -4
  130. package/lib/models/index.d.ts.map +1 -1
  131. package/lib/models/login-model.d.ts +7 -0
  132. package/lib/models/login-model.d.ts.map +1 -0
  133. package/lib/models/login-page-config.model.d.ts +21 -0
  134. package/lib/models/login-page-config.model.d.ts.map +1 -0
  135. package/lib/models/menu-config.model.d.ts +10 -0
  136. package/lib/models/menu-config.model.d.ts.map +1 -0
  137. package/lib/models/menu-item.model.d.ts +7 -0
  138. package/lib/models/menu-item.model.d.ts.map +1 -0
  139. package/lib/models/menu.model.d.ts +13 -0
  140. package/lib/models/menu.model.d.ts.map +1 -0
  141. package/lib/models/metric-card-data.model.d.ts +35 -0
  142. package/lib/models/metric-card-data.model.d.ts.map +1 -0
  143. package/lib/models/nav-bar-menu-config.model.d.ts +11 -0
  144. package/lib/models/nav-bar-menu-config.model.d.ts.map +1 -0
  145. package/lib/models/page-skeleton-config.model.d.ts +14 -0
  146. package/lib/models/page-skeleton-config.model.d.ts.map +1 -0
  147. package/lib/models/pattern.model.d.ts +5 -0
  148. package/lib/models/pattern.model.d.ts.map +1 -0
  149. package/lib/models/public-api.d.ts +22 -0
  150. package/lib/models/public-api.d.ts.map +1 -1
  151. package/lib/models/side-menu-bar-config.model.d.ts +21 -0
  152. package/lib/models/side-menu-bar-config.model.d.ts.map +1 -0
  153. package/lib/models/table-column.model.d.ts +1 -0
  154. package/lib/models/table-column.model.d.ts.map +1 -1
  155. package/lib/models/text-style.model.d.ts +6 -0
  156. package/lib/models/text-style.model.d.ts.map +1 -0
  157. package/lib/models/title-style.model.d.ts +9 -0
  158. package/lib/models/title-style.model.d.ts.map +1 -0
  159. package/lib/multi-search-criteria/index.d.ts +1 -5
  160. package/lib/multi-search-criteria/index.d.ts.map +1 -1
  161. package/lib/multi-search-criteria/{public_api.d.ts → public-api.d.ts} +1 -1
  162. package/lib/multi-search-criteria/public-api.d.ts.map +1 -0
  163. package/lib/ng-advanced-prime-table/index.d.ts +1 -5
  164. package/lib/ng-advanced-prime-table/index.d.ts.map +1 -1
  165. package/lib/ng-advanced-prime-table/ng-advanced-prime-table.component.d.ts +5 -1
  166. package/lib/ng-advanced-prime-table/ng-advanced-prime-table.component.d.ts.map +1 -1
  167. package/lib/ng-advanced-prime-table/ng-advanced-prime-table.module.d.ts +2 -1
  168. package/lib/ng-advanced-prime-table/ng-advanced-prime-table.module.d.ts.map +1 -1
  169. package/lib/ng-advanced-prime-table/{public_api.d.ts → public-api.d.ts} +1 -1
  170. package/lib/ng-advanced-prime-table/public-api.d.ts.map +1 -0
  171. package/lib/ng-prime-tools.module.d.ts +15 -1
  172. package/lib/ng-prime-tools.module.d.ts.map +1 -1
  173. package/lib/pt-bread-crumb/index.d.ts +2 -0
  174. package/lib/pt-bread-crumb/index.d.ts.map +1 -0
  175. package/lib/pt-bread-crumb/pt-bread-crumb.component.d.ts +23 -0
  176. package/lib/pt-bread-crumb/pt-bread-crumb.component.d.ts.map +1 -0
  177. package/lib/pt-bread-crumb/pt-bread-crumb.module.d.ts +10 -0
  178. package/lib/pt-bread-crumb/pt-bread-crumb.module.d.ts.map +1 -0
  179. package/lib/pt-bread-crumb/pt-bread-crumb.service.d.ts +17 -0
  180. package/lib/pt-bread-crumb/pt-bread-crumb.service.d.ts.map +1 -0
  181. package/lib/pt-bread-crumb/public-api.d.ts +3 -0
  182. package/lib/pt-bread-crumb/public-api.d.ts.map +1 -0
  183. package/lib/pt-button/index.d.ts +2 -0
  184. package/lib/pt-button/index.d.ts.map +1 -0
  185. package/lib/pt-button/pt-button.component.d.ts +17 -0
  186. package/lib/pt-button/pt-button.component.d.ts.map +1 -0
  187. package/lib/pt-button/pt-button.module.d.ts +10 -0
  188. package/lib/pt-button/pt-button.module.d.ts.map +1 -0
  189. package/lib/pt-button/public-api.d.ts +3 -0
  190. package/lib/pt-button/public-api.d.ts.map +1 -0
  191. package/lib/pt-card/index.d.ts +2 -0
  192. package/lib/pt-card/index.d.ts.map +1 -0
  193. package/lib/pt-card/pt-card.component.d.ts +53 -0
  194. package/lib/pt-card/pt-card.component.d.ts.map +1 -0
  195. package/lib/pt-card/pt-card.module.d.ts +10 -0
  196. package/lib/pt-card/pt-card.module.d.ts.map +1 -0
  197. package/lib/pt-card/public-api.d.ts +3 -0
  198. package/lib/pt-card/public-api.d.ts.map +1 -0
  199. package/lib/pt-chart/index.d.ts +2 -0
  200. package/lib/pt-chart/index.d.ts.map +1 -0
  201. package/lib/pt-chart/pt-chart.component.d.ts +15 -0
  202. package/lib/pt-chart/pt-chart.component.d.ts.map +1 -0
  203. package/lib/pt-chart/pt-chart.module.d.ts +9 -0
  204. package/lib/pt-chart/pt-chart.module.d.ts.map +1 -0
  205. package/lib/pt-chart/public-api.d.ts +3 -0
  206. package/lib/pt-chart/public-api.d.ts.map +1 -0
  207. package/lib/pt-dialog/index.d.ts +2 -0
  208. package/lib/pt-dialog/index.d.ts.map +1 -0
  209. package/lib/pt-dialog/pt-dialog.component.d.ts +20 -0
  210. package/lib/pt-dialog/pt-dialog.component.d.ts.map +1 -0
  211. package/lib/pt-dialog/pt-dialog.module.d.ts +13 -0
  212. package/lib/pt-dialog/pt-dialog.module.d.ts.map +1 -0
  213. package/lib/pt-dialog/public-api.d.ts +3 -0
  214. package/lib/pt-dialog/public-api.d.ts.map +1 -0
  215. package/lib/pt-footer/index.d.ts +2 -0
  216. package/lib/pt-footer/index.d.ts.map +1 -0
  217. package/lib/pt-footer/pt-footer.component.d.ts +11 -0
  218. package/lib/pt-footer/pt-footer.component.d.ts.map +1 -0
  219. package/lib/pt-footer/pt-footer.module.d.ts +10 -0
  220. package/lib/pt-footer/pt-footer.module.d.ts.map +1 -0
  221. package/lib/pt-footer/public-api.d.ts +3 -0
  222. package/lib/pt-footer/public-api.d.ts.map +1 -0
  223. package/lib/pt-login-page/index.d.ts +2 -0
  224. package/lib/pt-login-page/index.d.ts.map +1 -0
  225. package/lib/pt-login-page/pt-login-page.component.d.ts +20 -0
  226. package/lib/pt-login-page/pt-login-page.component.d.ts.map +1 -0
  227. package/lib/pt-login-page/pt-login-page.module.d.ts +13 -0
  228. package/lib/pt-login-page/pt-login-page.module.d.ts.map +1 -0
  229. package/lib/pt-login-page/public-api.d.ts +3 -0
  230. package/lib/pt-login-page/public-api.d.ts.map +1 -0
  231. package/lib/pt-menu/index.d.ts +2 -0
  232. package/lib/pt-menu/index.d.ts.map +1 -0
  233. package/lib/pt-menu/pt-menu.component.d.ts +32 -0
  234. package/lib/pt-menu/pt-menu.component.d.ts.map +1 -0
  235. package/lib/pt-menu/pt-menu.module.d.ts +9 -0
  236. package/lib/pt-menu/pt-menu.module.d.ts.map +1 -0
  237. package/lib/pt-menu/public-api.d.ts +3 -0
  238. package/lib/pt-menu/public-api.d.ts.map +1 -0
  239. package/lib/pt-menu-fancy/index.d.ts +2 -0
  240. package/lib/pt-menu-fancy/index.d.ts.map +1 -0
  241. package/lib/pt-menu-fancy/pt-menu-fancy.component.d.ts +33 -0
  242. package/lib/pt-menu-fancy/pt-menu-fancy.component.d.ts.map +1 -0
  243. package/lib/pt-menu-fancy/pt-menu-fancy.module.d.ts +10 -0
  244. package/lib/pt-menu-fancy/pt-menu-fancy.module.d.ts.map +1 -0
  245. package/lib/pt-menu-fancy/public-api.d.ts +3 -0
  246. package/lib/pt-menu-fancy/public-api.d.ts.map +1 -0
  247. package/lib/pt-metric-card/index.d.ts +2 -0
  248. package/lib/pt-metric-card/index.d.ts.map +1 -0
  249. package/lib/pt-metric-card/pt-metric-card.component.d.ts +60 -0
  250. package/lib/pt-metric-card/pt-metric-card.component.d.ts.map +1 -0
  251. package/lib/pt-metric-card/pt-metric-card.module.d.ts +9 -0
  252. package/lib/pt-metric-card/pt-metric-card.module.d.ts.map +1 -0
  253. package/lib/pt-metric-card/public-api.d.ts +3 -0
  254. package/lib/pt-metric-card/public-api.d.ts.map +1 -0
  255. package/lib/pt-metric-card-group/index.d.ts +2 -0
  256. package/lib/pt-metric-card-group/index.d.ts.map +1 -0
  257. package/lib/pt-metric-card-group/pt-metric-card-group.component.d.ts +8 -0
  258. package/lib/pt-metric-card-group/pt-metric-card-group.component.d.ts.map +1 -0
  259. package/lib/pt-metric-card-group/pt-metric-card-group.module.d.ts +10 -0
  260. package/lib/pt-metric-card-group/pt-metric-card-group.module.d.ts.map +1 -0
  261. package/lib/pt-metric-card-group/public-api.d.ts +3 -0
  262. package/lib/pt-metric-card-group/public-api.d.ts.map +1 -0
  263. package/lib/pt-nav-bar-menu/index.d.ts +2 -0
  264. package/lib/pt-nav-bar-menu/index.d.ts.map +1 -0
  265. package/lib/pt-nav-bar-menu/pt-nav-bar-menu.component.d.ts +44 -0
  266. package/lib/pt-nav-bar-menu/pt-nav-bar-menu.component.d.ts.map +1 -0
  267. package/lib/pt-nav-bar-menu/pt-nav-bar-menu.module.d.ts +11 -0
  268. package/lib/pt-nav-bar-menu/pt-nav-bar-menu.module.d.ts.map +1 -0
  269. package/lib/pt-nav-bar-menu/public-api.d.ts +3 -0
  270. package/lib/pt-nav-bar-menu/public-api.d.ts.map +1 -0
  271. package/lib/pt-page-skeleton/index.d.ts +2 -0
  272. package/lib/pt-page-skeleton/index.d.ts.map +1 -0
  273. package/lib/pt-page-skeleton/pt-page-skeleton.component.d.ts +15 -0
  274. package/lib/pt-page-skeleton/pt-page-skeleton.component.d.ts.map +1 -0
  275. package/lib/pt-page-skeleton/pt-page-skeleton.module.d.ts +15 -0
  276. package/lib/pt-page-skeleton/pt-page-skeleton.module.d.ts.map +1 -0
  277. package/lib/pt-page-skeleton/public-api.d.ts +3 -0
  278. package/lib/pt-page-skeleton/public-api.d.ts.map +1 -0
  279. package/lib/pt-side-bar-menu/index.d.ts +2 -0
  280. package/lib/pt-side-bar-menu/index.d.ts.map +1 -0
  281. package/lib/pt-side-bar-menu/pt-side-bar-menu.component.d.ts +41 -0
  282. package/lib/pt-side-bar-menu/pt-side-bar-menu.component.d.ts.map +1 -0
  283. package/lib/pt-side-bar-menu/pt-side-bar-menu.module.d.ts +12 -0
  284. package/lib/pt-side-bar-menu/pt-side-bar-menu.module.d.ts.map +1 -0
  285. package/lib/pt-side-bar-menu/public-api.d.ts +3 -0
  286. package/lib/pt-side-bar-menu/public-api.d.ts.map +1 -0
  287. package/lib/pt-text-input/pt-text-input.component.d.ts +1 -0
  288. package/lib/pt-text-input/pt-text-input.component.d.ts.map +1 -1
  289. package/package.json +4 -2
  290. package/public-api.d.ts +15 -1
  291. package/public-api.d.ts.map +1 -1
  292. package/esm2022/lib/multi-search-criteria/public_api.mjs +0 -4
  293. package/esm2022/lib/ng-advanced-prime-table/public_api.mjs +0 -4
  294. package/lib/multi-search-criteria/public_api.d.ts.map +0 -1
  295. package/lib/ng-advanced-prime-table/public_api.d.ts.map +0 -1
@@ -1,18 +1,19 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Pipe, EventEmitter, Component, Input, Output, ViewChild, NgModule, Injectable } from '@angular/core';
2
+ import { Pipe, EventEmitter, Component, Input, Output, ViewChild, NgModule, Injectable, HostListener } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
+ import * as i2$1 from '@angular/forms';
6
+ import { FormsModule, FormControl, Validators, ReactiveFormsModule, FormGroup } from '@angular/forms';
5
7
  import * as i2 from 'primeng/table';
6
8
  import { TableModule } from 'primeng/table';
7
- import * as i3 from 'primeng/api';
9
+ import * as i1$1 from 'primeng/api';
10
+ import { ConfirmEventType, ConfirmationService, MessageService } from 'primeng/api';
8
11
  import * as i4 from 'primeng/inputtext';
9
12
  import { InputTextModule } from 'primeng/inputtext';
10
- import * as i3$1 from 'primeng/button';
13
+ import * as i3 from 'primeng/button';
11
14
  import { ButtonModule } from 'primeng/button';
12
15
  import * as i6 from 'primeng/calendar';
13
16
  import { CalendarModule } from 'primeng/calendar';
14
- import * as i2$1 from '@angular/forms';
15
- import { FormsModule, FormControl, Validators, ReactiveFormsModule } from '@angular/forms';
16
17
  import * as i8 from 'primeng/multiselect';
17
18
  import { MultiSelectModule } from 'primeng/multiselect';
18
19
  import * as i9 from 'primeng/tag';
@@ -21,22 +22,36 @@ import * as i10 from 'primeng/iconfield';
21
22
  import { IconFieldModule } from 'primeng/iconfield';
22
23
  import * as i11 from 'primeng/inputicon';
23
24
  import { InputIconModule } from 'primeng/inputicon';
25
+ import { ProgressSpinnerModule } from 'primeng/progressspinner';
24
26
  import * as i8$1 from 'primeng/inputnumber';
25
27
  import { InputNumberModule } from 'primeng/inputnumber';
26
28
  import * as i9$1 from 'primeng/panel';
27
29
  import { PanelModule } from 'primeng/panel';
28
- import * as i3$2 from 'primeng/checkbox';
30
+ import * as i3$1 from 'primeng/checkbox';
29
31
  import { CheckboxModule } from 'primeng/checkbox';
30
- import * as i3$3 from 'primeng/inputgroup';
32
+ import * as i3$2 from 'primeng/inputgroup';
31
33
  import { InputGroupModule } from 'primeng/inputgroup';
32
34
  import * as i4$1 from 'primeng/inputgroupaddon';
33
35
  import { InputGroupAddonModule } from 'primeng/inputgroupaddon';
34
- import * as i3$4 from 'primeng/inputswitch';
36
+ import * as i3$3 from 'primeng/inputswitch';
35
37
  import { InputSwitchModule } from 'primeng/inputswitch';
36
- import * as i3$5 from 'primeng/inputtextarea';
38
+ import * as i3$4 from 'primeng/inputtextarea';
37
39
  import { InputTextareaModule } from 'primeng/inputtextarea';
38
- import * as i3$6 from 'primeng/dropdown';
40
+ import * as i3$5 from 'primeng/dropdown';
39
41
  import { DropdownModule } from 'primeng/dropdown';
42
+ import { Chart, registerables } from 'chart.js';
43
+ import ChartDataLabels from 'chartjs-plugin-datalabels';
44
+ import * as i2$2 from '@angular/router';
45
+ import { RouterModule, NavigationEnd } from '@angular/router';
46
+ import { filter } from 'rxjs/operators';
47
+ import { BehaviorSubject } from 'rxjs';
48
+ import * as i3$6 from 'primeng/breadcrumb';
49
+ import { BreadcrumbModule } from 'primeng/breadcrumb';
50
+ import * as i2$3 from 'primeng/toast';
51
+ import { ToastModule } from 'primeng/toast';
52
+ import * as i3$7 from 'primeng/confirmdialog';
53
+ import { ConfirmDialogModule } from 'primeng/confirmdialog';
54
+ import { DialogModule } from 'primeng/dialog';
40
55
 
41
56
  class CustomCurrencyPipe {
42
57
  transform(value, currency, decimalPlaces, thousandSeparator = 'comma', decimalSeparator = 'dot') {
@@ -136,6 +151,8 @@ class NgAdvancedPrimeTableComponent {
136
151
  this.isPaginated = false;
137
152
  this.actions = [];
138
153
  this.isSortable = false;
154
+ this.loading = false;
155
+ this.maxHeight = null;
139
156
  // Outputs: Events emitted to the parent component
140
157
  this.filter = new EventEmitter();
141
158
  this.search = new EventEmitter();
@@ -143,6 +160,7 @@ class NgAdvancedPrimeTableComponent {
143
160
  this.exportPdfEvent = new EventEmitter();
144
161
  this.searchValue = '';
145
162
  this.validCurrencyCodes = ['USD', 'EUR', 'MAD'];
163
+ this.iconWidth = 77;
146
164
  // Component state properties
147
165
  this.isDelete = false;
148
166
  this.isEdit = false;
@@ -185,6 +203,10 @@ class NgAdvancedPrimeTableComponent {
185
203
  }
186
204
  });
187
205
  }
206
+ getTotalWidth(col) {
207
+ const columnWidth = parseInt(col.width || '120', 10);
208
+ return `${columnWidth + this.iconWidth}px`;
209
+ }
188
210
  // Initialization Methods
189
211
  formatingDateFields() {
190
212
  return this.data.map((item) => {
@@ -391,11 +413,11 @@ class NgAdvancedPrimeTableComponent {
391
413
  this.exportPdfEvent.emit();
392
414
  }
393
415
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: NgAdvancedPrimeTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
394
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: NgAdvancedPrimeTableComponent, selector: "ng-advanced-prime-table", inputs: { data: "data", columns: "columns", totalRecords: "totalRecords", rowsPerPage: "rowsPerPage", hasSearchFilter: "hasSearchFilter", hasExportExcel: "hasExportExcel", hasExportPDF: "hasExportPDF", hasColumnFilter: "hasColumnFilter", isPaginated: "isPaginated", actions: "actions", isSortable: "isSortable" }, outputs: { filter: "filter", search: "search", exportExcelEvent: "exportExcelEvent", exportPdfEvent: "exportPdfEvent" }, viewQueries: [{ propertyName: "dt", first: true, predicate: ["dt"], descendants: true }], ngImport: i0, template: "<div class=\"table-container\">\n <div>\n <p-table\n #dt\n [value]=\"data\"\n [rows]=\"rows\"\n [paginator]=\"isPaginated\"\n [globalFilterFields]=\"globalFilterFields\"\n [rowsPerPageOptions]=\"rowsPerPage\"\n dataKey=\"id\"\n styleClass=\"p-datatable-gridlines\"\n styleClass=\"p-datatable-striped\"\n editMode=\"row\"\n >\n <ng-template pTemplate=\"caption\">\n <div class=\"flex\">\n <div>\n <h3>Total: {{ totalRecords }}</h3>\n </div>\n\n <div>\n <!-- Clear filters -->\n <button\n *ngIf=\"hasSearchFilter\"\n pButton\n icon=\"pi pi-filter-slash\"\n class=\"p-button-rounded p-button-text\"\n (click)=\"clear(dt)\"\n title=\"Clear filters\"\n ></button>\n\n <!-- Export to Excel Button -->\n <button\n *ngIf=\"hasExportExcel\"\n pButton\n icon=\"pi pi-file-excel\"\n class=\"p-button-rounded p-button-text\"\n (click)=\"exportExcel()\"\n title=\"Export to Excel\"\n ></button>\n\n <!-- Export to PDF Button -->\n <button\n *ngIf=\"hasExportPDF\"\n pButton\n icon=\"pi pi-file-pdf\"\n class=\"p-button-rounded p-button-text\"\n (click)=\"exportPdf()\"\n title=\"Export to PDF\"\n ></button>\n </div>\n <div class=\"ml-auto\" *ngIf=\"hasSearchFilter\">\n <!-- Add this wrapper div with ml-auto class -->\n <p-iconField iconPosition=\"left\" class=\"ml-auto\">\n <p-inputIcon>\n <i class=\"pi pi-search\"></i>\n </p-inputIcon>\n <input\n pInputText\n type=\"text\"\n [(ngModel)]=\"searchValue\"\n (input)=\"filterGlobal($event)\"\n placeholder=\"Search keyword\"\n />\n </p-iconField>\n </div>\n </div>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr>\n <th *ngFor=\"let col of columns\">\n <ng-container\n *ngIf=\"isSortable && col.isSortable !== false; else noSortHeader\"\n >\n <th pSortableColumn=\"{{ col.code }}\" style=\"width: 20%\">\n <div class=\"header-container\">\n <span>{{ col.title }}</span>\n <p-sortIcon field=\"{{ col.code }}\" />\n <ng-container *ngIf=\"col.isFilter !== false\">\n <p-columnFilter\n *ngIf=\"col.type === 'AMOUNT'\"\n display=\"menu\"\n [field]=\"col.code\"\n [type]=\"getColumnFilterType(col)\"\n [currency]=\"getCurrencySymbol(col)\"\n ></p-columnFilter>\n\n <p-columnFilter\n *ngIf=\"col.type !== 'AMOUNT'\"\n display=\"menu\"\n [field]=\"col.code\"\n display=\"menu\"\n [type]=\"getColumnFilterType(col)\"\n [type]=\"getColumnFilterType(col)\"\n >\n <ng-template\n pTemplate=\"filter\"\n let-value\n let-filterCallback=\"filterCallback\"\n *ngIf=\"getColumnFilterType(col) === 'date'\"\n >\n <p-calendar\n [ngModel]=\"value\"\n (ngModelChange)=\"filterCallback($event)\"\n [dateFormat]=\"'dd/mm/yy'\"\n ></p-calendar>\n </ng-template>\n\n <ng-template\n pTemplate=\"filter\"\n let-value\n let-filterCallback=\"filterCallback\"\n *ngIf=\"getColumnFilterType(col) === 'multiSelect'\"\n >\n <p-multiSelect\n [options]=\"col.filterOptions\"\n [ngModel]=\"value\"\n (ngModelChange)=\"filterCallback($event)\"\n [display]=\"'chip'\"\n placeholder=\"Select\"\n class=\"custom-multiselect\"\n ></p-multiSelect>\n </ng-template>\n </p-columnFilter>\n </ng-container>\n </div>\n </th>\n </ng-container>\n <ng-template #noSortHeader>\n <th>\n <div class=\"header-container\">\n <span>{{ col.title }}</span>\n <ng-container *ngIf=\"col.isFilter !== false\">\n <p-columnFilter\n *ngIf=\"col.type === 'AMOUNT'\"\n display=\"menu\"\n [field]=\"col.code\"\n [type]=\"getColumnFilterType(col)\"\n [currency]=\"getCurrencySymbol(col)\"\n ></p-columnFilter>\n\n <p-columnFilter\n *ngIf=\"col.type !== 'AMOUNT'\"\n display=\"menu\"\n [field]=\"col.code\"\n [type]=\"getColumnFilterType(col)\"\n >\n <ng-template\n pTemplate=\"filter\"\n let-value\n let-filterCallback=\"filterCallback\"\n *ngIf=\"getColumnFilterType(col) === 'date'\"\n >\n <p-calendar\n [ngModel]=\"value\"\n (ngModelChange)=\"filterCallback($event)\"\n [dateFormat]=\"'dd/mm/yy'\"\n ></p-calendar>\n </ng-template>\n\n <ng-template\n pTemplate=\"filter\"\n let-value\n let-filterCallback=\"filterCallback\"\n *ngIf=\"getColumnFilterType(col) === 'multiSelect'\"\n >\n <p-multiSelect\n [options]=\"col.filterOptions\"\n [ngModel]=\"value\"\n (ngModelChange)=\"filterCallback($event)\"\n [display]=\"'chip'\"\n placeholder=\"Select\"\n class=\"custom-multiselect\"\n ></p-multiSelect>\n </ng-template>\n </p-columnFilter>\n </ng-container>\n </div>\n </th>\n </ng-template>\n </th>\n </tr>\n </ng-template>\n\n <ng-template\n pTemplate=\"body\"\n let-data\n let-editing=\"editing\"\n let-ri=\"rowIndex\"\n >\n <!-- Render a table row and make it editable if `isEdit` is true -->\n <tr [pEditableRow]=\"isEdit ? data : null\">\n <!-- Loop through each column and render corresponding table cells -->\n <ng-container *ngFor=\"let col of columns\">\n <ng-container *ngIf=\"col.code !== undefined\">\n <!-- Check if the data for the column exists -->\n <ng-container *ngIf=\"data[col.code] !== undefined\">\n <!-- Render an editable cell if the column is editable -->\n <td *ngIf=\"isEditable(col.code); else normalTD\">\n <!-- Multi-select input for columns that are multi-selectable -->\n <ng-container\n *ngIf=\"isMultiSelect(col.code); else datePicker\"\n >\n <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <p-multiSelect\n appendTo=\"body\"\n [ngModel]=\"data[col.code]\"\n [style]=\"{ width: '100%' }\"\n (ngModelChange)=\"\n changeHandler(data.id, col.code, $event)\n \"\n [options]=\"optionValues\"\n ></p-multiSelect>\n </ng-template>\n <ng-template pTemplate=\"output\">\n <div class=\"multi-select-container\">\n <ng-container *ngFor=\"let rec of data[col.code]\">\n <p-tag [value]=\"rec\"></p-tag>\n </ng-container>\n </div>\n </ng-template>\n </p-cellEditor>\n </ng-container>\n\n <!-- Date picker input for columns that require date selection -->\n <ng-template #datePicker>\n <ng-container\n *ngIf=\"isDatePicker(col.code); else normalInput\"\n >\n <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <p-calendar\n [inputId]=\"data[col.code]\"\n [ngModel]=\"data[col.code]\"\n (ngModelChange)=\"\n changeHandler(data.id, col.code, $event)\n \"\n [dateFormat]=\"'dd/mm/yy'\"\n ></p-calendar>\n </ng-template>\n <ng-template pTemplate=\"output\">\n {{ data[col.code] | customDate }}\n </ng-template>\n </p-cellEditor>\n </ng-container>\n </ng-template>\n\n <!-- Normal text input for other columns -->\n <ng-template #normalInput>\n <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <input\n pInputText\n type=\"text\"\n [ngModel]=\"data[col.code]\"\n (change)=\"onChange($event, data.id, col.code)\"\n />\n </ng-template>\n <ng-template pTemplate=\"output\">\n <!-- Use currency pipe to format the output for AMOUNT type -->\n <ng-container\n *ngIf=\"col.type === 'AMOUNT'; else normalOutput\"\n >\n {{\n data[col.code]\n | customCurrency\n : getCurrencySymbol(col)\n : col.decimalPlaces\n : col.thousandSeparator\n : col.decimalSeparator\n }}\n </ng-container>\n <ng-template #normalOutput>\n {{ data[col.code] }}\n </ng-template>\n </ng-template>\n </p-cellEditor>\n </ng-template>\n </td>\n\n <!-- Render a normal table cell if the column is not editable -->\n <ng-template #normalTD>\n <td>\n <!-- Use customCurrency pipe to format the output for AMOUNT type with optional decimal places -->\n <ng-container\n *ngIf=\"col.type === 'AMOUNT'; else normalText\"\n >\n >\n {{\n data[col.code]\n | customCurrency\n : getCurrencySymbol(col)\n : col.decimalPlaces\n : col.thousandSeparator\n : col.decimalSeparator\n }}\n </ng-container>\n <ng-template #normalText>\n {{ data[col.code] }}\n </ng-template>\n </td>\n </ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n\n <!-- Render action buttons if there are any actions defined -->\n <td *ngIf=\"actions?.length\">\n <div class=\"action-buttons-container\">\n <!-- Delete button if deletion is allowed -->\n <div *ngIf=\"isDelete\">\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n (click)=\"Delete(data.id)\"\n class=\"p-button-rounded p-button-text\"\n ></button>\n </div>\n <!-- Edit, save, and cancel buttons for row editing -->\n <div>\n <button\n pInitEditableRow\n *ngIf=\"!editing\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-pencil\"\n (click)=\"initEditableRow(data)\"\n class=\"p-button-rounded p-button-text\"\n ></button>\n <button\n *ngIf=\"editing\"\n pSaveEditableRow\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-check\"\n (click)=\"saveEditableRow(data)\"\n class=\"p-button-rounded p-button-text\"\n ></button>\n <button\n *ngIf=\"editing\"\n pCancelEditableRow\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-times\"\n (click)=\"cancelEditableRow(data)\"\n class=\"p-button-rounded p-button-text\"\n ></button>\n </div>\n </div>\n </td>\n </tr>\n </ng-template>\n </p-table>\n </div>\n</div>\n", styles: [".date{width:100%;height:5rem;display:grid;justify-items:start;align-items:center}.filter-container{width:100%;display:flex;justify-content:space-between;align-items:center}.settings{display:flex;gap:1rem}.multi-select-container{display:flex;justify-content:center;align-items:center;gap:.3rem}::ng-deep p-table{min-width:50rem}.table-container{display:flex;flex-direction:column;gap:.5rem}::ng-deep .custom-multiselect .p-hidden-accessible input{display:none}::ng-deep .p-datatable .p-sortable-column.p-highlight:hover{background:none}::ng-deep .p-datatable .p-sortable-column:focus{box-shadow:none;outline:0 none}::ng-deep .header-container{display:flex;align-items:center}::ng-deep .header-container span{margin-right:.5em}::ng-deep p-columnfilter.p-element.ng-star-inserted{margin-top:4px}.flex{display:flex;justify-content:space-between;align-items:center}.ml-auto{margin-left:auto}::ng-deep p-inputicon{margin-right:-1.5rem;z-index:2;position:relative}::ng-deep .p-inputtext{padding-left:1.7rem}::ng-deep .bt-filter-btn button{cursor:pointer;margin-left:1rem}::ng-deep .p-icon-field-left .p-input-icon:first-of-type{left:-1rem}.table-row{text-align:center;display:flex;gap:1rem;justify-content:center}::ng-deep span.p-button-icon.pi.pi-file-excel{font-size:1.25em;color:green}::ng-deep span.p-button-icon.pi.pi-file-pdf{font-size:1.25em;color:red}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i2.CellEditor, selector: "p-cellEditor" }, { kind: "component", type: i2.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "directive", type: i2.EditableRow, selector: "[pEditableRow]", inputs: ["pEditableRow", "pEditableRowDisabled"] }, { kind: "directive", type: i2.InitEditableRow, selector: "[pInitEditableRow]" }, { kind: "directive", type: i2.SaveEditableRow, selector: "[pSaveEditableRow]" }, { kind: "directive", type: i2.CancelEditableRow, selector: "[pCancelEditableRow]" }, { kind: "component", type: i2.ColumnFilter, selector: "p-columnFilter", inputs: ["field", "type", "display", "showMenu", "matchMode", "operator", "showOperator", "showClearButton", "showApplyButton", "showMatchModes", "showAddButton", "hideOnClear", "placeholder", "matchModeOptions", "maxConstraints", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "locale", "localeMatcher", "currency", "currencyDisplay", "useGrouping", "showButtons", "ariaLabel"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i4.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "directive", type: i3$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i6.Calendar, selector: "p-calendar", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepYearPicker", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "variant", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.MultiSelect, selector: "p-multiSelect", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "component", type: i9.Tag, selector: "p-tag", inputs: ["style", "styleClass", "severity", "value", "icon", "rounded"] }, { kind: "component", type: i10.IconField, selector: "p-iconField", inputs: ["iconPosition"] }, { kind: "component", type: i11.InputIcon, selector: "p-inputIcon", inputs: ["styleClass"] }, { kind: "pipe", type: CustomCurrencyPipe, name: "customCurrency" }, { kind: "pipe", type: CustomDatePipe, name: "customDate" }] }); }
416
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: NgAdvancedPrimeTableComponent, selector: "ng-advanced-prime-table", inputs: { data: "data", columns: "columns", totalRecords: "totalRecords", rowsPerPage: "rowsPerPage", hasSearchFilter: "hasSearchFilter", hasExportExcel: "hasExportExcel", hasExportPDF: "hasExportPDF", hasColumnFilter: "hasColumnFilter", isPaginated: "isPaginated", actions: "actions", isSortable: "isSortable", loading: "loading", maxHeight: "maxHeight" }, outputs: { filter: "filter", search: "search", exportExcelEvent: "exportExcelEvent", exportPdfEvent: "exportPdfEvent" }, viewQueries: [{ propertyName: "dt", first: true, predicate: ["dt"], descendants: true }], ngImport: i0, template: "<div class=\"ng-advanced-prime-table table-container\">\n <p-table\n #dt\n [value]=\"data\"\n [loading]=\"loading\"\n [rows]=\"rows\"\n [paginator]=\"isPaginated\"\n [globalFilterFields]=\"globalFilterFields\"\n [rowsPerPageOptions]=\"rowsPerPage\"\n dataKey=\"id\"\n styleClass=\"p-datatable-gridlines\"\n styleClass=\"p-datatable-striped\"\n editMode=\"row\"\n [scrollable]=\"true\"\n [scrollHeight]=\"maxHeight !== null ? maxHeight : undefined\"\n >\n <ng-template pTemplate=\"caption\">\n <div class=\"flex\">\n <div>\n <h3>Total: {{ totalRecords }}</h3>\n </div>\n\n <div>\n <!-- Clear filters -->\n <button\n *ngIf=\"hasSearchFilter\"\n pButton\n icon=\"pi pi-filter-slash\"\n class=\"p-button-rounded p-button-text\"\n (click)=\"clear(dt)\"\n title=\"Clear filters\"\n ></button>\n\n <!-- Export to Excel Button -->\n <button\n *ngIf=\"hasExportExcel\"\n pButton\n icon=\"pi pi-file-excel\"\n class=\"p-button-rounded p-button-text\"\n (click)=\"exportExcel()\"\n title=\"Export to Excel\"\n ></button>\n\n <!-- Export to PDF Button -->\n <button\n *ngIf=\"hasExportPDF\"\n pButton\n icon=\"pi pi-file-pdf\"\n class=\"p-button-rounded p-button-text\"\n (click)=\"exportPdf()\"\n title=\"Export to PDF\"\n ></button>\n </div>\n <div class=\"ml-auto\" *ngIf=\"hasSearchFilter\">\n <!-- Add this wrapper div with ml-auto class -->\n <p-iconField iconPosition=\"left\" class=\"ml-auto\">\n <p-inputIcon>\n <i class=\"pi pi-search\"></i>\n </p-inputIcon>\n <input\n pInputText\n type=\"text\"\n [(ngModel)]=\"searchValue\"\n (input)=\"filterGlobal($event)\"\n placeholder=\"Search keyword\"\n />\n </p-iconField>\n </div>\n </div>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr class=\"sticky-header\">\n <th *ngFor=\"let col of columns\" [style.width]=\"getTotalWidth(col)\">\n <ng-container\n *ngIf=\"isSortable && col.isSortable !== false; else noSortHeader\"\n >\n <th pSortableColumn=\"{{ col.code }}\">\n <div\n class=\"header-container d-flex align-items-center justify-content-between\"\n [style.width]=\"getTotalWidth(col)\"\n >\n <span>{{ col.title }}</span>\n <div\n class=\"icons d-flex align-items-center\"\n [style.width]=\"iconWidth\"\n >\n <p-sortIcon field=\"{{ col.code }}\" />\n <ng-container *ngIf=\"col.isFilter !== false\">\n <p-columnFilter\n *ngIf=\"col.type === 'AMOUNT'\"\n display=\"menu\"\n [field]=\"col.code\"\n [type]=\"getColumnFilterType(col)\"\n [currency]=\"getCurrencySymbol(col)\"\n ></p-columnFilter>\n\n <p-columnFilter\n *ngIf=\"col.type !== 'AMOUNT'\"\n display=\"menu\"\n [field]=\"col.code\"\n display=\"menu\"\n [type]=\"getColumnFilterType(col)\"\n [type]=\"getColumnFilterType(col)\"\n >\n <ng-template\n pTemplate=\"filter\"\n let-value\n let-filterCallback=\"filterCallback\"\n *ngIf=\"getColumnFilterType(col) === 'date'\"\n >\n <p-calendar\n [ngModel]=\"value\"\n (ngModelChange)=\"filterCallback($event)\"\n [dateFormat]=\"'dd/mm/yy'\"\n ></p-calendar>\n </ng-template>\n\n <ng-template\n pTemplate=\"filter\"\n let-value\n let-filterCallback=\"filterCallback\"\n *ngIf=\"getColumnFilterType(col) === 'multiSelect'\"\n >\n <p-multiSelect\n [options]=\"col.filterOptions\"\n [ngModel]=\"value\"\n (ngModelChange)=\"filterCallback($event)\"\n [display]=\"'chip'\"\n placeholder=\"Select\"\n class=\"custom-multiselect\"\n ></p-multiSelect>\n </ng-template>\n </p-columnFilter>\n </ng-container>\n </div>\n </div>\n </th>\n </ng-container>\n <ng-template #noSortHeader>\n <th>\n <div class=\"header-container\">\n <span>{{ col.title }}</span>\n <ng-container *ngIf=\"col.isFilter !== false\">\n <p-columnFilter\n *ngIf=\"col.type === 'AMOUNT'\"\n display=\"menu\"\n [field]=\"col.code\"\n [type]=\"getColumnFilterType(col)\"\n [currency]=\"getCurrencySymbol(col)\"\n ></p-columnFilter>\n\n <p-columnFilter\n *ngIf=\"col.type !== 'AMOUNT'\"\n display=\"menu\"\n [field]=\"col.code\"\n [type]=\"getColumnFilterType(col)\"\n >\n <ng-template\n pTemplate=\"filter\"\n let-value\n let-filterCallback=\"filterCallback\"\n *ngIf=\"getColumnFilterType(col) === 'date'\"\n >\n <p-calendar\n [ngModel]=\"value\"\n (ngModelChange)=\"filterCallback($event)\"\n [dateFormat]=\"'dd/mm/yy'\"\n ></p-calendar>\n </ng-template>\n\n <ng-template\n pTemplate=\"filter\"\n let-value\n let-filterCallback=\"filterCallback\"\n *ngIf=\"getColumnFilterType(col) === 'multiSelect'\"\n >\n <p-multiSelect\n [options]=\"col.filterOptions\"\n [ngModel]=\"value\"\n (ngModelChange)=\"filterCallback($event)\"\n [display]=\"'chip'\"\n placeholder=\"Select\"\n class=\"custom-multiselect\"\n ></p-multiSelect>\n </ng-template>\n </p-columnFilter>\n </ng-container>\n </div>\n </th>\n </ng-template>\n </th>\n </tr>\n </ng-template>\n\n <!-- Empty message template -->\n <ng-template pTemplate=\"emptymessage\">\n <div class=\"empty-message\">\n <i class=\"pi pi-info-circle\"></i>\n <p>No records available to display.</p>\n </div>\n </ng-template>\n\n <ng-template\n pTemplate=\"body\"\n let-data\n let-editing=\"editing\"\n let-ri=\"rowIndex\"\n >\n <!-- Render a table row and make it editable if `isEdit` is true -->\n <tr *ngIf=\"!loading\" [pEditableRow]=\"isEdit ? data : null\">\n <!-- Loop through each column and render corresponding table cells -->\n <ng-container *ngFor=\"let col of columns\">\n <ng-container *ngIf=\"col.code !== undefined\">\n <!-- Check if the data for the column exists -->\n <ng-container *ngIf=\"data[col.code] !== undefined\">\n <!-- Render an editable cell if the column is editable -->\n <td\n *ngIf=\"isEditable(col.code); else normalTD\"\n [style.width]=\"getTotalWidth(col)\"\n >\n <!-- Multi-select input for columns that are multi-selectable -->\n <ng-container *ngIf=\"isMultiSelect(col.code); else datePicker\">\n <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <p-multiSelect\n appendTo=\"body\"\n [ngModel]=\"data[col.code]\"\n [style]=\"{ width: '100%' }\"\n (ngModelChange)=\"\n changeHandler(data.id, col.code, $event)\n \"\n [options]=\"optionValues\"\n ></p-multiSelect>\n </ng-template>\n <ng-template pTemplate=\"output\">\n <div class=\"multi-select-container\">\n <ng-container *ngFor=\"let rec of data[col.code]\">\n <p-tag [value]=\"rec\"></p-tag>\n </ng-container>\n </div>\n </ng-template>\n </p-cellEditor>\n </ng-container>\n\n <!-- Date picker input for columns that require date selection -->\n <ng-template #datePicker>\n <ng-container\n *ngIf=\"isDatePicker(col.code); else normalInput\"\n >\n <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <p-calendar\n [inputId]=\"data[col.code]\"\n [ngModel]=\"data[col.code]\"\n (ngModelChange)=\"\n changeHandler(data.id, col.code, $event)\n \"\n [dateFormat]=\"'dd/mm/yy'\"\n ></p-calendar>\n </ng-template>\n <ng-template pTemplate=\"output\">\n {{ data[col.code] | customDate }}\n </ng-template>\n </p-cellEditor>\n </ng-container>\n </ng-template>\n\n <!-- Normal text input for other columns -->\n <ng-template #normalInput>\n <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <input\n pInputText\n type=\"text\"\n [ngModel]=\"data[col.code]\"\n (change)=\"onChange($event, data.id, col.code)\"\n />\n </ng-template>\n <ng-template pTemplate=\"output\">\n <!-- Use currency pipe to format the output for AMOUNT type -->\n <ng-container\n *ngIf=\"col.type === 'AMOUNT'; else normalOutput\"\n >\n {{\n data[col.code]\n | customCurrency\n : getCurrencySymbol(col)\n : col.decimalPlaces\n : col.thousandSeparator\n : col.decimalSeparator\n }}\n </ng-container>\n <ng-template #normalOutput>\n {{ data[col.code] }}\n </ng-template>\n </ng-template>\n </p-cellEditor>\n </ng-template>\n </td>\n\n <!-- Render a normal table cell if the column is not editable -->\n <ng-template #normalTD>\n <td [style.width]=\"getTotalWidth(col)\">\n <!-- Use customCurrency pipe to format the output for AMOUNT type with optional decimal places -->\n <ng-container *ngIf=\"col.type === 'AMOUNT'; else normalText\">\n >\n {{\n data[col.code]\n | customCurrency\n : getCurrencySymbol(col)\n : col.decimalPlaces\n : col.thousandSeparator\n : col.decimalSeparator\n }}\n </ng-container>\n <ng-template #normalText>\n {{ data[col.code] }}\n </ng-template>\n </td>\n </ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n\n <!-- Render action buttons if there are any actions defined -->\n <td *ngIf=\"actions?.length\">\n <div class=\"action-buttons-container\">\n <!-- Delete button if deletion is allowed -->\n <div *ngIf=\"isDelete\">\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n (click)=\"Delete(data.id)\"\n class=\"p-button-rounded p-button-text\"\n ></button>\n </div>\n <!-- Edit, save, and cancel buttons for row editing -->\n <div>\n <button\n pInitEditableRow\n *ngIf=\"!editing\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-pencil\"\n (click)=\"initEditableRow(data)\"\n class=\"p-button-rounded p-button-text\"\n ></button>\n <button\n *ngIf=\"editing\"\n pSaveEditableRow\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-check\"\n (click)=\"saveEditableRow(data)\"\n class=\"p-button-rounded p-button-text\"\n ></button>\n <button\n *ngIf=\"editing\"\n pCancelEditableRow\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-times\"\n (click)=\"cancelEditableRow(data)\"\n class=\"p-button-rounded p-button-text\"\n ></button>\n </div>\n </div>\n </td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n", styles: [".ng-advanced-prime-table .bread-crumb{margin-bottom:15px}.ng-advanced-prime-table .date{width:100%;height:5rem;display:grid;justify-items:start;align-items:center}.ng-advanced-prime-table .filter-container{width:100%;display:flex;justify-content:space-between;align-items:center}.ng-advanced-prime-table .settings{display:flex;gap:1rem}.ng-advanced-prime-table .multi-select-container{display:flex;justify-content:center;align-items:center;gap:.3rem}.ng-advanced-prime-table ::ng-deep p-table{min-width:50rem}.ng-advanced-prime-table ::ng-deep .custom-multiselect .p-hidden-accessible input{display:none}.ng-advanced-prime-table ::ng-deep .p-datatable .p-sortable-column.p-highlight:hover{background:none}.ng-advanced-prime-table ::ng-deep .p-datatable .p-sortable-column:focus{box-shadow:none;outline:0 none}.ng-advanced-prime-table ::ng-deep .header-container{display:flex;justify-content:space-between;align-items:center;width:100%}.ng-advanced-prime-table ::ng-deep p-columnfilter.p-element.ng-star-inserted{margin-top:4px}.ng-advanced-prime-table .flex{display:flex;justify-content:space-between;align-items:center}.ng-advanced-prime-table .ml-auto{margin-left:auto}.ng-advanced-prime-table ::ng-deep p-inputicon{margin-right:-1.5rem;z-index:2;position:relative}.ng-advanced-prime-table ::ng-deep .p-inputtext{padding-left:1.7rem}.ng-advanced-prime-table ::ng-deep .bt-filter-btn button{cursor:pointer;margin-left:1rem}.ng-advanced-prime-table ::ng-deep .p-icon-field-left .p-input-icon:first-of-type{left:-1rem}.ng-advanced-prime-table .table-row{text-align:center;display:flex;gap:1rem;justify-content:center}.ng-advanced-prime-table ::ng-deep span.p-button-icon.pi.pi-file-excel{font-size:1.25em;color:green}.ng-advanced-prime-table ::ng-deep span.p-button-icon.pi.pi-file-pdf{font-size:1.25em;color:red}.ng-advanced-prime-table .table-container{display:flex;flex-direction:column;height:100%;overflow:hidden}.ng-advanced-prime-table ::ng-deep .p-datatable{display:flex;flex-direction:column;width:100%;border-collapse:collapse;table-layout:fixed}.ng-advanced-prime-table ::ng-deep .p-datatable thead{display:table;width:100%;table-layout:fixed;background:#fff;z-index:2}.ng-advanced-prime-table ::ng-deep .p-datatable tfoot{display:table;width:100%;table-layout:fixed;background:#fff;z-index:2}.ng-advanced-prime-table ::ng-deep .p-datatable tbody{display:block;overflow-y:auto;overflow-x:hidden}.ng-advanced-prime-table ::ng-deep .p-datatable tbody tr{display:table;width:100%;table-layout:fixed}.ng-advanced-prime-table .empty-message{text-align:center;padding:2rem;color:#888;font-size:1.2rem}.ng-advanced-prime-table .empty-message i{display:block;font-size:2rem;margin-bottom:.5rem}.ng-advanced-prime-table th{white-space:normal;word-wrap:break-word}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i1$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i2.CellEditor, selector: "p-cellEditor" }, { kind: "component", type: i2.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "directive", type: i2.EditableRow, selector: "[pEditableRow]", inputs: ["pEditableRow", "pEditableRowDisabled"] }, { kind: "directive", type: i2.InitEditableRow, selector: "[pInitEditableRow]" }, { kind: "directive", type: i2.SaveEditableRow, selector: "[pSaveEditableRow]" }, { kind: "directive", type: i2.CancelEditableRow, selector: "[pCancelEditableRow]" }, { kind: "component", type: i2.ColumnFilter, selector: "p-columnFilter", inputs: ["field", "type", "display", "showMenu", "matchMode", "operator", "showOperator", "showClearButton", "showApplyButton", "showMatchModes", "showAddButton", "hideOnClear", "placeholder", "matchModeOptions", "maxConstraints", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "locale", "localeMatcher", "currency", "currencyDisplay", "useGrouping", "showButtons", "ariaLabel"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i4.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "directive", type: i3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i6.Calendar, selector: "p-calendar", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepYearPicker", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "variant", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.MultiSelect, selector: "p-multiSelect", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "component", type: i9.Tag, selector: "p-tag", inputs: ["style", "styleClass", "severity", "value", "icon", "rounded"] }, { kind: "component", type: i10.IconField, selector: "p-iconField", inputs: ["iconPosition"] }, { kind: "component", type: i11.InputIcon, selector: "p-inputIcon", inputs: ["styleClass"] }, { kind: "pipe", type: CustomCurrencyPipe, name: "customCurrency" }, { kind: "pipe", type: CustomDatePipe, name: "customDate" }] }); }
395
417
  }
396
418
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: NgAdvancedPrimeTableComponent, decorators: [{
397
419
  type: Component,
398
- args: [{ selector: 'ng-advanced-prime-table', template: "<div class=\"table-container\">\n <div>\n <p-table\n #dt\n [value]=\"data\"\n [rows]=\"rows\"\n [paginator]=\"isPaginated\"\n [globalFilterFields]=\"globalFilterFields\"\n [rowsPerPageOptions]=\"rowsPerPage\"\n dataKey=\"id\"\n styleClass=\"p-datatable-gridlines\"\n styleClass=\"p-datatable-striped\"\n editMode=\"row\"\n >\n <ng-template pTemplate=\"caption\">\n <div class=\"flex\">\n <div>\n <h3>Total: {{ totalRecords }}</h3>\n </div>\n\n <div>\n <!-- Clear filters -->\n <button\n *ngIf=\"hasSearchFilter\"\n pButton\n icon=\"pi pi-filter-slash\"\n class=\"p-button-rounded p-button-text\"\n (click)=\"clear(dt)\"\n title=\"Clear filters\"\n ></button>\n\n <!-- Export to Excel Button -->\n <button\n *ngIf=\"hasExportExcel\"\n pButton\n icon=\"pi pi-file-excel\"\n class=\"p-button-rounded p-button-text\"\n (click)=\"exportExcel()\"\n title=\"Export to Excel\"\n ></button>\n\n <!-- Export to PDF Button -->\n <button\n *ngIf=\"hasExportPDF\"\n pButton\n icon=\"pi pi-file-pdf\"\n class=\"p-button-rounded p-button-text\"\n (click)=\"exportPdf()\"\n title=\"Export to PDF\"\n ></button>\n </div>\n <div class=\"ml-auto\" *ngIf=\"hasSearchFilter\">\n <!-- Add this wrapper div with ml-auto class -->\n <p-iconField iconPosition=\"left\" class=\"ml-auto\">\n <p-inputIcon>\n <i class=\"pi pi-search\"></i>\n </p-inputIcon>\n <input\n pInputText\n type=\"text\"\n [(ngModel)]=\"searchValue\"\n (input)=\"filterGlobal($event)\"\n placeholder=\"Search keyword\"\n />\n </p-iconField>\n </div>\n </div>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr>\n <th *ngFor=\"let col of columns\">\n <ng-container\n *ngIf=\"isSortable && col.isSortable !== false; else noSortHeader\"\n >\n <th pSortableColumn=\"{{ col.code }}\" style=\"width: 20%\">\n <div class=\"header-container\">\n <span>{{ col.title }}</span>\n <p-sortIcon field=\"{{ col.code }}\" />\n <ng-container *ngIf=\"col.isFilter !== false\">\n <p-columnFilter\n *ngIf=\"col.type === 'AMOUNT'\"\n display=\"menu\"\n [field]=\"col.code\"\n [type]=\"getColumnFilterType(col)\"\n [currency]=\"getCurrencySymbol(col)\"\n ></p-columnFilter>\n\n <p-columnFilter\n *ngIf=\"col.type !== 'AMOUNT'\"\n display=\"menu\"\n [field]=\"col.code\"\n display=\"menu\"\n [type]=\"getColumnFilterType(col)\"\n [type]=\"getColumnFilterType(col)\"\n >\n <ng-template\n pTemplate=\"filter\"\n let-value\n let-filterCallback=\"filterCallback\"\n *ngIf=\"getColumnFilterType(col) === 'date'\"\n >\n <p-calendar\n [ngModel]=\"value\"\n (ngModelChange)=\"filterCallback($event)\"\n [dateFormat]=\"'dd/mm/yy'\"\n ></p-calendar>\n </ng-template>\n\n <ng-template\n pTemplate=\"filter\"\n let-value\n let-filterCallback=\"filterCallback\"\n *ngIf=\"getColumnFilterType(col) === 'multiSelect'\"\n >\n <p-multiSelect\n [options]=\"col.filterOptions\"\n [ngModel]=\"value\"\n (ngModelChange)=\"filterCallback($event)\"\n [display]=\"'chip'\"\n placeholder=\"Select\"\n class=\"custom-multiselect\"\n ></p-multiSelect>\n </ng-template>\n </p-columnFilter>\n </ng-container>\n </div>\n </th>\n </ng-container>\n <ng-template #noSortHeader>\n <th>\n <div class=\"header-container\">\n <span>{{ col.title }}</span>\n <ng-container *ngIf=\"col.isFilter !== false\">\n <p-columnFilter\n *ngIf=\"col.type === 'AMOUNT'\"\n display=\"menu\"\n [field]=\"col.code\"\n [type]=\"getColumnFilterType(col)\"\n [currency]=\"getCurrencySymbol(col)\"\n ></p-columnFilter>\n\n <p-columnFilter\n *ngIf=\"col.type !== 'AMOUNT'\"\n display=\"menu\"\n [field]=\"col.code\"\n [type]=\"getColumnFilterType(col)\"\n >\n <ng-template\n pTemplate=\"filter\"\n let-value\n let-filterCallback=\"filterCallback\"\n *ngIf=\"getColumnFilterType(col) === 'date'\"\n >\n <p-calendar\n [ngModel]=\"value\"\n (ngModelChange)=\"filterCallback($event)\"\n [dateFormat]=\"'dd/mm/yy'\"\n ></p-calendar>\n </ng-template>\n\n <ng-template\n pTemplate=\"filter\"\n let-value\n let-filterCallback=\"filterCallback\"\n *ngIf=\"getColumnFilterType(col) === 'multiSelect'\"\n >\n <p-multiSelect\n [options]=\"col.filterOptions\"\n [ngModel]=\"value\"\n (ngModelChange)=\"filterCallback($event)\"\n [display]=\"'chip'\"\n placeholder=\"Select\"\n class=\"custom-multiselect\"\n ></p-multiSelect>\n </ng-template>\n </p-columnFilter>\n </ng-container>\n </div>\n </th>\n </ng-template>\n </th>\n </tr>\n </ng-template>\n\n <ng-template\n pTemplate=\"body\"\n let-data\n let-editing=\"editing\"\n let-ri=\"rowIndex\"\n >\n <!-- Render a table row and make it editable if `isEdit` is true -->\n <tr [pEditableRow]=\"isEdit ? data : null\">\n <!-- Loop through each column and render corresponding table cells -->\n <ng-container *ngFor=\"let col of columns\">\n <ng-container *ngIf=\"col.code !== undefined\">\n <!-- Check if the data for the column exists -->\n <ng-container *ngIf=\"data[col.code] !== undefined\">\n <!-- Render an editable cell if the column is editable -->\n <td *ngIf=\"isEditable(col.code); else normalTD\">\n <!-- Multi-select input for columns that are multi-selectable -->\n <ng-container\n *ngIf=\"isMultiSelect(col.code); else datePicker\"\n >\n <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <p-multiSelect\n appendTo=\"body\"\n [ngModel]=\"data[col.code]\"\n [style]=\"{ width: '100%' }\"\n (ngModelChange)=\"\n changeHandler(data.id, col.code, $event)\n \"\n [options]=\"optionValues\"\n ></p-multiSelect>\n </ng-template>\n <ng-template pTemplate=\"output\">\n <div class=\"multi-select-container\">\n <ng-container *ngFor=\"let rec of data[col.code]\">\n <p-tag [value]=\"rec\"></p-tag>\n </ng-container>\n </div>\n </ng-template>\n </p-cellEditor>\n </ng-container>\n\n <!-- Date picker input for columns that require date selection -->\n <ng-template #datePicker>\n <ng-container\n *ngIf=\"isDatePicker(col.code); else normalInput\"\n >\n <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <p-calendar\n [inputId]=\"data[col.code]\"\n [ngModel]=\"data[col.code]\"\n (ngModelChange)=\"\n changeHandler(data.id, col.code, $event)\n \"\n [dateFormat]=\"'dd/mm/yy'\"\n ></p-calendar>\n </ng-template>\n <ng-template pTemplate=\"output\">\n {{ data[col.code] | customDate }}\n </ng-template>\n </p-cellEditor>\n </ng-container>\n </ng-template>\n\n <!-- Normal text input for other columns -->\n <ng-template #normalInput>\n <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <input\n pInputText\n type=\"text\"\n [ngModel]=\"data[col.code]\"\n (change)=\"onChange($event, data.id, col.code)\"\n />\n </ng-template>\n <ng-template pTemplate=\"output\">\n <!-- Use currency pipe to format the output for AMOUNT type -->\n <ng-container\n *ngIf=\"col.type === 'AMOUNT'; else normalOutput\"\n >\n {{\n data[col.code]\n | customCurrency\n : getCurrencySymbol(col)\n : col.decimalPlaces\n : col.thousandSeparator\n : col.decimalSeparator\n }}\n </ng-container>\n <ng-template #normalOutput>\n {{ data[col.code] }}\n </ng-template>\n </ng-template>\n </p-cellEditor>\n </ng-template>\n </td>\n\n <!-- Render a normal table cell if the column is not editable -->\n <ng-template #normalTD>\n <td>\n <!-- Use customCurrency pipe to format the output for AMOUNT type with optional decimal places -->\n <ng-container\n *ngIf=\"col.type === 'AMOUNT'; else normalText\"\n >\n >\n {{\n data[col.code]\n | customCurrency\n : getCurrencySymbol(col)\n : col.decimalPlaces\n : col.thousandSeparator\n : col.decimalSeparator\n }}\n </ng-container>\n <ng-template #normalText>\n {{ data[col.code] }}\n </ng-template>\n </td>\n </ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n\n <!-- Render action buttons if there are any actions defined -->\n <td *ngIf=\"actions?.length\">\n <div class=\"action-buttons-container\">\n <!-- Delete button if deletion is allowed -->\n <div *ngIf=\"isDelete\">\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n (click)=\"Delete(data.id)\"\n class=\"p-button-rounded p-button-text\"\n ></button>\n </div>\n <!-- Edit, save, and cancel buttons for row editing -->\n <div>\n <button\n pInitEditableRow\n *ngIf=\"!editing\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-pencil\"\n (click)=\"initEditableRow(data)\"\n class=\"p-button-rounded p-button-text\"\n ></button>\n <button\n *ngIf=\"editing\"\n pSaveEditableRow\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-check\"\n (click)=\"saveEditableRow(data)\"\n class=\"p-button-rounded p-button-text\"\n ></button>\n <button\n *ngIf=\"editing\"\n pCancelEditableRow\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-times\"\n (click)=\"cancelEditableRow(data)\"\n class=\"p-button-rounded p-button-text\"\n ></button>\n </div>\n </div>\n </td>\n </tr>\n </ng-template>\n </p-table>\n </div>\n</div>\n", styles: [".date{width:100%;height:5rem;display:grid;justify-items:start;align-items:center}.filter-container{width:100%;display:flex;justify-content:space-between;align-items:center}.settings{display:flex;gap:1rem}.multi-select-container{display:flex;justify-content:center;align-items:center;gap:.3rem}::ng-deep p-table{min-width:50rem}.table-container{display:flex;flex-direction:column;gap:.5rem}::ng-deep .custom-multiselect .p-hidden-accessible input{display:none}::ng-deep .p-datatable .p-sortable-column.p-highlight:hover{background:none}::ng-deep .p-datatable .p-sortable-column:focus{box-shadow:none;outline:0 none}::ng-deep .header-container{display:flex;align-items:center}::ng-deep .header-container span{margin-right:.5em}::ng-deep p-columnfilter.p-element.ng-star-inserted{margin-top:4px}.flex{display:flex;justify-content:space-between;align-items:center}.ml-auto{margin-left:auto}::ng-deep p-inputicon{margin-right:-1.5rem;z-index:2;position:relative}::ng-deep .p-inputtext{padding-left:1.7rem}::ng-deep .bt-filter-btn button{cursor:pointer;margin-left:1rem}::ng-deep .p-icon-field-left .p-input-icon:first-of-type{left:-1rem}.table-row{text-align:center;display:flex;gap:1rem;justify-content:center}::ng-deep span.p-button-icon.pi.pi-file-excel{font-size:1.25em;color:green}::ng-deep span.p-button-icon.pi.pi-file-pdf{font-size:1.25em;color:red}\n"] }]
420
+ args: [{ selector: 'ng-advanced-prime-table', template: "<div class=\"ng-advanced-prime-table table-container\">\n <p-table\n #dt\n [value]=\"data\"\n [loading]=\"loading\"\n [rows]=\"rows\"\n [paginator]=\"isPaginated\"\n [globalFilterFields]=\"globalFilterFields\"\n [rowsPerPageOptions]=\"rowsPerPage\"\n dataKey=\"id\"\n styleClass=\"p-datatable-gridlines\"\n styleClass=\"p-datatable-striped\"\n editMode=\"row\"\n [scrollable]=\"true\"\n [scrollHeight]=\"maxHeight !== null ? maxHeight : undefined\"\n >\n <ng-template pTemplate=\"caption\">\n <div class=\"flex\">\n <div>\n <h3>Total: {{ totalRecords }}</h3>\n </div>\n\n <div>\n <!-- Clear filters -->\n <button\n *ngIf=\"hasSearchFilter\"\n pButton\n icon=\"pi pi-filter-slash\"\n class=\"p-button-rounded p-button-text\"\n (click)=\"clear(dt)\"\n title=\"Clear filters\"\n ></button>\n\n <!-- Export to Excel Button -->\n <button\n *ngIf=\"hasExportExcel\"\n pButton\n icon=\"pi pi-file-excel\"\n class=\"p-button-rounded p-button-text\"\n (click)=\"exportExcel()\"\n title=\"Export to Excel\"\n ></button>\n\n <!-- Export to PDF Button -->\n <button\n *ngIf=\"hasExportPDF\"\n pButton\n icon=\"pi pi-file-pdf\"\n class=\"p-button-rounded p-button-text\"\n (click)=\"exportPdf()\"\n title=\"Export to PDF\"\n ></button>\n </div>\n <div class=\"ml-auto\" *ngIf=\"hasSearchFilter\">\n <!-- Add this wrapper div with ml-auto class -->\n <p-iconField iconPosition=\"left\" class=\"ml-auto\">\n <p-inputIcon>\n <i class=\"pi pi-search\"></i>\n </p-inputIcon>\n <input\n pInputText\n type=\"text\"\n [(ngModel)]=\"searchValue\"\n (input)=\"filterGlobal($event)\"\n placeholder=\"Search keyword\"\n />\n </p-iconField>\n </div>\n </div>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr class=\"sticky-header\">\n <th *ngFor=\"let col of columns\" [style.width]=\"getTotalWidth(col)\">\n <ng-container\n *ngIf=\"isSortable && col.isSortable !== false; else noSortHeader\"\n >\n <th pSortableColumn=\"{{ col.code }}\">\n <div\n class=\"header-container d-flex align-items-center justify-content-between\"\n [style.width]=\"getTotalWidth(col)\"\n >\n <span>{{ col.title }}</span>\n <div\n class=\"icons d-flex align-items-center\"\n [style.width]=\"iconWidth\"\n >\n <p-sortIcon field=\"{{ col.code }}\" />\n <ng-container *ngIf=\"col.isFilter !== false\">\n <p-columnFilter\n *ngIf=\"col.type === 'AMOUNT'\"\n display=\"menu\"\n [field]=\"col.code\"\n [type]=\"getColumnFilterType(col)\"\n [currency]=\"getCurrencySymbol(col)\"\n ></p-columnFilter>\n\n <p-columnFilter\n *ngIf=\"col.type !== 'AMOUNT'\"\n display=\"menu\"\n [field]=\"col.code\"\n display=\"menu\"\n [type]=\"getColumnFilterType(col)\"\n [type]=\"getColumnFilterType(col)\"\n >\n <ng-template\n pTemplate=\"filter\"\n let-value\n let-filterCallback=\"filterCallback\"\n *ngIf=\"getColumnFilterType(col) === 'date'\"\n >\n <p-calendar\n [ngModel]=\"value\"\n (ngModelChange)=\"filterCallback($event)\"\n [dateFormat]=\"'dd/mm/yy'\"\n ></p-calendar>\n </ng-template>\n\n <ng-template\n pTemplate=\"filter\"\n let-value\n let-filterCallback=\"filterCallback\"\n *ngIf=\"getColumnFilterType(col) === 'multiSelect'\"\n >\n <p-multiSelect\n [options]=\"col.filterOptions\"\n [ngModel]=\"value\"\n (ngModelChange)=\"filterCallback($event)\"\n [display]=\"'chip'\"\n placeholder=\"Select\"\n class=\"custom-multiselect\"\n ></p-multiSelect>\n </ng-template>\n </p-columnFilter>\n </ng-container>\n </div>\n </div>\n </th>\n </ng-container>\n <ng-template #noSortHeader>\n <th>\n <div class=\"header-container\">\n <span>{{ col.title }}</span>\n <ng-container *ngIf=\"col.isFilter !== false\">\n <p-columnFilter\n *ngIf=\"col.type === 'AMOUNT'\"\n display=\"menu\"\n [field]=\"col.code\"\n [type]=\"getColumnFilterType(col)\"\n [currency]=\"getCurrencySymbol(col)\"\n ></p-columnFilter>\n\n <p-columnFilter\n *ngIf=\"col.type !== 'AMOUNT'\"\n display=\"menu\"\n [field]=\"col.code\"\n [type]=\"getColumnFilterType(col)\"\n >\n <ng-template\n pTemplate=\"filter\"\n let-value\n let-filterCallback=\"filterCallback\"\n *ngIf=\"getColumnFilterType(col) === 'date'\"\n >\n <p-calendar\n [ngModel]=\"value\"\n (ngModelChange)=\"filterCallback($event)\"\n [dateFormat]=\"'dd/mm/yy'\"\n ></p-calendar>\n </ng-template>\n\n <ng-template\n pTemplate=\"filter\"\n let-value\n let-filterCallback=\"filterCallback\"\n *ngIf=\"getColumnFilterType(col) === 'multiSelect'\"\n >\n <p-multiSelect\n [options]=\"col.filterOptions\"\n [ngModel]=\"value\"\n (ngModelChange)=\"filterCallback($event)\"\n [display]=\"'chip'\"\n placeholder=\"Select\"\n class=\"custom-multiselect\"\n ></p-multiSelect>\n </ng-template>\n </p-columnFilter>\n </ng-container>\n </div>\n </th>\n </ng-template>\n </th>\n </tr>\n </ng-template>\n\n <!-- Empty message template -->\n <ng-template pTemplate=\"emptymessage\">\n <div class=\"empty-message\">\n <i class=\"pi pi-info-circle\"></i>\n <p>No records available to display.</p>\n </div>\n </ng-template>\n\n <ng-template\n pTemplate=\"body\"\n let-data\n let-editing=\"editing\"\n let-ri=\"rowIndex\"\n >\n <!-- Render a table row and make it editable if `isEdit` is true -->\n <tr *ngIf=\"!loading\" [pEditableRow]=\"isEdit ? data : null\">\n <!-- Loop through each column and render corresponding table cells -->\n <ng-container *ngFor=\"let col of columns\">\n <ng-container *ngIf=\"col.code !== undefined\">\n <!-- Check if the data for the column exists -->\n <ng-container *ngIf=\"data[col.code] !== undefined\">\n <!-- Render an editable cell if the column is editable -->\n <td\n *ngIf=\"isEditable(col.code); else normalTD\"\n [style.width]=\"getTotalWidth(col)\"\n >\n <!-- Multi-select input for columns that are multi-selectable -->\n <ng-container *ngIf=\"isMultiSelect(col.code); else datePicker\">\n <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <p-multiSelect\n appendTo=\"body\"\n [ngModel]=\"data[col.code]\"\n [style]=\"{ width: '100%' }\"\n (ngModelChange)=\"\n changeHandler(data.id, col.code, $event)\n \"\n [options]=\"optionValues\"\n ></p-multiSelect>\n </ng-template>\n <ng-template pTemplate=\"output\">\n <div class=\"multi-select-container\">\n <ng-container *ngFor=\"let rec of data[col.code]\">\n <p-tag [value]=\"rec\"></p-tag>\n </ng-container>\n </div>\n </ng-template>\n </p-cellEditor>\n </ng-container>\n\n <!-- Date picker input for columns that require date selection -->\n <ng-template #datePicker>\n <ng-container\n *ngIf=\"isDatePicker(col.code); else normalInput\"\n >\n <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <p-calendar\n [inputId]=\"data[col.code]\"\n [ngModel]=\"data[col.code]\"\n (ngModelChange)=\"\n changeHandler(data.id, col.code, $event)\n \"\n [dateFormat]=\"'dd/mm/yy'\"\n ></p-calendar>\n </ng-template>\n <ng-template pTemplate=\"output\">\n {{ data[col.code] | customDate }}\n </ng-template>\n </p-cellEditor>\n </ng-container>\n </ng-template>\n\n <!-- Normal text input for other columns -->\n <ng-template #normalInput>\n <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <input\n pInputText\n type=\"text\"\n [ngModel]=\"data[col.code]\"\n (change)=\"onChange($event, data.id, col.code)\"\n />\n </ng-template>\n <ng-template pTemplate=\"output\">\n <!-- Use currency pipe to format the output for AMOUNT type -->\n <ng-container\n *ngIf=\"col.type === 'AMOUNT'; else normalOutput\"\n >\n {{\n data[col.code]\n | customCurrency\n : getCurrencySymbol(col)\n : col.decimalPlaces\n : col.thousandSeparator\n : col.decimalSeparator\n }}\n </ng-container>\n <ng-template #normalOutput>\n {{ data[col.code] }}\n </ng-template>\n </ng-template>\n </p-cellEditor>\n </ng-template>\n </td>\n\n <!-- Render a normal table cell if the column is not editable -->\n <ng-template #normalTD>\n <td [style.width]=\"getTotalWidth(col)\">\n <!-- Use customCurrency pipe to format the output for AMOUNT type with optional decimal places -->\n <ng-container *ngIf=\"col.type === 'AMOUNT'; else normalText\">\n >\n {{\n data[col.code]\n | customCurrency\n : getCurrencySymbol(col)\n : col.decimalPlaces\n : col.thousandSeparator\n : col.decimalSeparator\n }}\n </ng-container>\n <ng-template #normalText>\n {{ data[col.code] }}\n </ng-template>\n </td>\n </ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n\n <!-- Render action buttons if there are any actions defined -->\n <td *ngIf=\"actions?.length\">\n <div class=\"action-buttons-container\">\n <!-- Delete button if deletion is allowed -->\n <div *ngIf=\"isDelete\">\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n (click)=\"Delete(data.id)\"\n class=\"p-button-rounded p-button-text\"\n ></button>\n </div>\n <!-- Edit, save, and cancel buttons for row editing -->\n <div>\n <button\n pInitEditableRow\n *ngIf=\"!editing\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-pencil\"\n (click)=\"initEditableRow(data)\"\n class=\"p-button-rounded p-button-text\"\n ></button>\n <button\n *ngIf=\"editing\"\n pSaveEditableRow\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-check\"\n (click)=\"saveEditableRow(data)\"\n class=\"p-button-rounded p-button-text\"\n ></button>\n <button\n *ngIf=\"editing\"\n pCancelEditableRow\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-times\"\n (click)=\"cancelEditableRow(data)\"\n class=\"p-button-rounded p-button-text\"\n ></button>\n </div>\n </div>\n </td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n", styles: [".ng-advanced-prime-table .bread-crumb{margin-bottom:15px}.ng-advanced-prime-table .date{width:100%;height:5rem;display:grid;justify-items:start;align-items:center}.ng-advanced-prime-table .filter-container{width:100%;display:flex;justify-content:space-between;align-items:center}.ng-advanced-prime-table .settings{display:flex;gap:1rem}.ng-advanced-prime-table .multi-select-container{display:flex;justify-content:center;align-items:center;gap:.3rem}.ng-advanced-prime-table ::ng-deep p-table{min-width:50rem}.ng-advanced-prime-table ::ng-deep .custom-multiselect .p-hidden-accessible input{display:none}.ng-advanced-prime-table ::ng-deep .p-datatable .p-sortable-column.p-highlight:hover{background:none}.ng-advanced-prime-table ::ng-deep .p-datatable .p-sortable-column:focus{box-shadow:none;outline:0 none}.ng-advanced-prime-table ::ng-deep .header-container{display:flex;justify-content:space-between;align-items:center;width:100%}.ng-advanced-prime-table ::ng-deep p-columnfilter.p-element.ng-star-inserted{margin-top:4px}.ng-advanced-prime-table .flex{display:flex;justify-content:space-between;align-items:center}.ng-advanced-prime-table .ml-auto{margin-left:auto}.ng-advanced-prime-table ::ng-deep p-inputicon{margin-right:-1.5rem;z-index:2;position:relative}.ng-advanced-prime-table ::ng-deep .p-inputtext{padding-left:1.7rem}.ng-advanced-prime-table ::ng-deep .bt-filter-btn button{cursor:pointer;margin-left:1rem}.ng-advanced-prime-table ::ng-deep .p-icon-field-left .p-input-icon:first-of-type{left:-1rem}.ng-advanced-prime-table .table-row{text-align:center;display:flex;gap:1rem;justify-content:center}.ng-advanced-prime-table ::ng-deep span.p-button-icon.pi.pi-file-excel{font-size:1.25em;color:green}.ng-advanced-prime-table ::ng-deep span.p-button-icon.pi.pi-file-pdf{font-size:1.25em;color:red}.ng-advanced-prime-table .table-container{display:flex;flex-direction:column;height:100%;overflow:hidden}.ng-advanced-prime-table ::ng-deep .p-datatable{display:flex;flex-direction:column;width:100%;border-collapse:collapse;table-layout:fixed}.ng-advanced-prime-table ::ng-deep .p-datatable thead{display:table;width:100%;table-layout:fixed;background:#fff;z-index:2}.ng-advanced-prime-table ::ng-deep .p-datatable tfoot{display:table;width:100%;table-layout:fixed;background:#fff;z-index:2}.ng-advanced-prime-table ::ng-deep .p-datatable tbody{display:block;overflow-y:auto;overflow-x:hidden}.ng-advanced-prime-table ::ng-deep .p-datatable tbody tr{display:table;width:100%;table-layout:fixed}.ng-advanced-prime-table .empty-message{text-align:center;padding:2rem;color:#888;font-size:1.2rem}.ng-advanced-prime-table .empty-message i{display:block;font-size:2rem;margin-bottom:.5rem}.ng-advanced-prime-table th{white-space:normal;word-wrap:break-word}\n"] }]
399
421
  }], ctorParameters: () => [], propDecorators: { data: [{
400
422
  type: Input
401
423
  }], columns: [{
@@ -418,6 +440,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
418
440
  type: Input
419
441
  }], isSortable: [{
420
442
  type: Input
443
+ }], loading: [{
444
+ type: Input
445
+ }], maxHeight: [{
446
+ type: Input
421
447
  }], filter: [{
422
448
  type: Output
423
449
  }], search: [{
@@ -443,7 +469,8 @@ class NgAdvancedPrimeTableModule {
443
469
  TagModule,
444
470
  CustomCurrencyPipe,
445
471
  IconFieldModule,
446
- InputIconModule], exports: [NgAdvancedPrimeTableComponent] }); }
472
+ InputIconModule,
473
+ ProgressSpinnerModule], exports: [NgAdvancedPrimeTableComponent] }); }
447
474
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: NgAdvancedPrimeTableModule, imports: [CommonModule,
448
475
  TableModule,
449
476
  InputTextModule,
@@ -453,7 +480,8 @@ class NgAdvancedPrimeTableModule {
453
480
  MultiSelectModule,
454
481
  TagModule,
455
482
  IconFieldModule,
456
- InputIconModule] }); }
483
+ InputIconModule,
484
+ ProgressSpinnerModule] }); }
457
485
  }
458
486
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: NgAdvancedPrimeTableModule, decorators: [{
459
487
  type: NgModule,
@@ -471,18 +499,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
471
499
  CustomCurrencyPipe,
472
500
  IconFieldModule,
473
501
  InputIconModule,
502
+ ProgressSpinnerModule,
474
503
  ],
475
504
  exports: [NgAdvancedPrimeTableComponent],
476
505
  }]
477
506
  }] });
478
507
 
479
- // projects/ng-prime-tools/src/lib/ng-advanced-prime-table/index.ts
480
-
481
- /**
482
- * Generated bundle index. Do not edit.
483
- */
484
- /// <amd-module name="ng-prime-tools/multi-search-criteria" />
485
-
486
508
  var TableTypeEnum;
487
509
  (function (TableTypeEnum) {
488
510
  TableTypeEnum["DATE"] = "DATE";
@@ -517,6 +539,7 @@ var FormInputTypeEnum;
517
539
  FormInputTypeEnum["CURRENCY"] = "CURRENCY";
518
540
  FormInputTypeEnum["CHECKBOX"] = "CHECKBOX";
519
541
  FormInputTypeEnum["SWITCH"] = "SWITCH";
542
+ FormInputTypeEnum["PASSWORD"] = "PASSWORD";
520
543
  })(FormInputTypeEnum || (FormInputTypeEnum = {}));
521
544
 
522
545
  var ButtonColorEnum;
@@ -537,6 +560,27 @@ var InputValidationEnum;
537
560
  InputValidationEnum["PHONE_NUMBER"] = "^[0-9 ]+$";
538
561
  })(InputValidationEnum || (InputValidationEnum = {}));
539
562
 
563
+ var BadgeType;
564
+ (function (BadgeType) {
565
+ BadgeType["Info"] = "info";
566
+ BadgeType["Danger"] = "danger";
567
+ BadgeType["Warning"] = "warning";
568
+ })(BadgeType || (BadgeType = {}));
569
+ const BadgeTypeStyles = {
570
+ [BadgeType.Info]: {
571
+ color: 'white',
572
+ backgroundColor: '#17a2b8', // Info blue
573
+ },
574
+ [BadgeType.Danger]: {
575
+ color: 'white',
576
+ backgroundColor: '#dc3545', // Danger red
577
+ },
578
+ [BadgeType.Warning]: {
579
+ color: 'white',
580
+ backgroundColor: '#ffc107', // Warning yellow
581
+ },
582
+ };
583
+
540
584
  // projects/ng-prime-tools/src/lib/enums/public_api.ts
541
585
 
542
586
  class MultiSearchCriteriaComponent {
@@ -644,11 +688,11 @@ class MultiSearchCriteriaComponent {
644
688
  return null;
645
689
  }
646
690
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: MultiSearchCriteriaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
647
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: MultiSearchCriteriaComponent, selector: "multi-search-criteria", inputs: { title: "title", criteria: "criteria", inputsPerRow: "inputsPerRow", data: "data", mode: "mode" }, outputs: { filteredData: "filteredData", searchCriteria: "searchCriteria" }, ngImport: i0, template: "<p-panel header=\"{{ title }}\" [toggleable]=\"true\" [collapsed]=\"true\">\n <div\n class=\"criteria-container\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputsPerRow + ', 1fr)' }\"\n >\n <div *ngFor=\"let input of criteria\" class=\"criteria-item\">\n <label class=\"bsc-label\">{{ input.title }}</label>\n\n <ng-container [ngSwitch]=\"input.type\">\n <p-calendar\n *ngSwitchCase=\"SearchCriteriaTypeEnum.DATERANGE\"\n [(ngModel)]=\"input.value\"\n selectionMode=\"range\"\n [dateFormat]=\"'dd/mm/yy'\"\n class=\"full-width-input\"\n [showIcon]=\"true\"\n (ngModelChange)=\"input.value = $event\"\n ></p-calendar>\n <p-calendar\n *ngSwitchCase=\"SearchCriteriaTypeEnum.DATE\"\n [ngModel]=\"input.value\"\n (ngModelChange)=\"input.value = $event\"\n [dateFormat]=\"'dd/mm/yy'\"\n [showIcon]=\"true\"\n class=\"full-width-input\"\n ></p-calendar>\n <input\n *ngSwitchCase=\"SearchCriteriaTypeEnum.STRING\"\n type=\"text\"\n pInputText\n [(ngModel)]=\"input.value\"\n class=\"full-width-input\"\n />\n\n <p-inputNumber\n *ngSwitchCase=\"SearchCriteriaTypeEnum.AMOUNT\"\n type=\"number\"\n [(ngModel)]=\"input.value\"\n mode=\"decimal\"\n inputId=\"minmaxfraction\"\n [minFractionDigits]=\"2\"\n [maxFractionDigits]=\"5\"\n [placeholder]=\"getCurrencySymbol(input)\"\n class=\"full-width-input\"\n ></p-inputNumber>\n\n <p-inputNumber\n *ngSwitchCase=\"SearchCriteriaTypeEnum.NUMBER\"\n type=\"number\"\n [(ngModel)]=\"input.value\"\n class=\"full-width-input\"\n ></p-inputNumber>\n\n <p-multiSelect\n *ngSwitchCase=\"SearchCriteriaTypeEnum.MULTISELECT\"\n [options]=\"input.filterOptions\"\n [display]=\"'chip'\"\n placeholder=\"Select\"\n [selectAll]=\"selectAll\"\n [(ngModel)]=\"input.value\"\n optionLabel=\"label\"\n (onSelectAllChange)=\"onSelectAllChange($event, input)\"\n class=\"custom-multiselect full-width-input\"\n ></p-multiSelect>\n </ng-container>\n </div>\n </div>\n\n <ng-template pTemplate=\"footer\">\n <div class=\"footer-buttons\">\n <p-button\n label=\"Effacer\"\n icon=\"pi pi-times\"\n (click)=\"clear()\"\n class=\"footer-button\"\n ></p-button>\n <p-button\n label=\"Rechercher\"\n icon=\"pi pi-search\"\n (click)=\"search()\"\n class=\"footer-button\"\n ></p-button>\n </div>\n </ng-template>\n</p-panel>\n", styles: ["::ng-deep .p-element .p-hidden-accessible input{display:none}::ng-deep .bsc-label{display:block;margin-bottom:5px;font-weight:700}::ng-deep .custom-multiselect{width:100%}::ng-deep .p-multiselect .p-multiselect-label{font-size:14px;color:#333}::ng-deep .p-inputtext{width:100%}::ng-deep .p-calendar .p-inputtext{width:100%}::ng-deep .p-inputnumber{width:100%}.criteria-container{display:grid;gap:10px}.criteria-item{margin-bottom:10px;box-sizing:border-box}.full-width-input,::ng-deep .p-calendar,::ng-deep .p-multiselect{width:100%}::ng-deep .p-calendar .p-inputtext,::ng-deep .p-multiselect .p-multiselect-label{width:100%}.footer-buttons{display:flex;justify-content:flex-end;gap:10px}::ng-deep .footer-button button{width:140px;cursor:pointer}::ng-deep .p-panel .p-panel-footer{background:#f8f9fa}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i6.Calendar, selector: "p-calendar", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepYearPicker", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "variant", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "component", type: i3$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i4.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: i8.MultiSelect, selector: "p-multiSelect", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8$1.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: i9$1.Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }] }); }
691
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: MultiSearchCriteriaComponent, selector: "multi-search-criteria", inputs: { title: "title", criteria: "criteria", inputsPerRow: "inputsPerRow", data: "data", mode: "mode" }, outputs: { filteredData: "filteredData", searchCriteria: "searchCriteria" }, ngImport: i0, template: "<p-panel\n header=\"{{ title }}\"\n [toggleable]=\"true\"\n [collapsed]=\"true\"\n class=\"multi-search-criteria\"\n>\n <div\n class=\"criteria-container\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputsPerRow + ', 1fr)' }\"\n >\n <div *ngFor=\"let input of criteria\" class=\"criteria-item\">\n <label class=\"bsc-label\">{{ input.title }}</label>\n\n <ng-container [ngSwitch]=\"input.type\">\n <p-calendar\n *ngSwitchCase=\"SearchCriteriaTypeEnum.DATERANGE\"\n [(ngModel)]=\"input.value\"\n selectionMode=\"range\"\n [dateFormat]=\"'dd/mm/yy'\"\n class=\"full-width-input\"\n [showIcon]=\"true\"\n (ngModelChange)=\"input.value = $event\"\n ></p-calendar>\n <p-calendar\n *ngSwitchCase=\"SearchCriteriaTypeEnum.DATE\"\n [ngModel]=\"input.value\"\n (ngModelChange)=\"input.value = $event\"\n [dateFormat]=\"'dd/mm/yy'\"\n [showIcon]=\"true\"\n class=\"full-width-input\"\n ></p-calendar>\n <input\n *ngSwitchCase=\"SearchCriteriaTypeEnum.STRING\"\n type=\"text\"\n pInputText\n [(ngModel)]=\"input.value\"\n class=\"full-width-input\"\n />\n\n <p-inputNumber\n *ngSwitchCase=\"SearchCriteriaTypeEnum.AMOUNT\"\n type=\"number\"\n [(ngModel)]=\"input.value\"\n mode=\"decimal\"\n inputId=\"minmaxfraction\"\n [minFractionDigits]=\"2\"\n [maxFractionDigits]=\"5\"\n [placeholder]=\"getCurrencySymbol(input)\"\n class=\"full-width-input\"\n ></p-inputNumber>\n\n <p-inputNumber\n *ngSwitchCase=\"SearchCriteriaTypeEnum.NUMBER\"\n type=\"number\"\n [(ngModel)]=\"input.value\"\n class=\"full-width-input\"\n ></p-inputNumber>\n\n <p-multiSelect\n *ngSwitchCase=\"SearchCriteriaTypeEnum.MULTISELECT\"\n [options]=\"input.filterOptions\"\n [display]=\"'chip'\"\n placeholder=\"Select\"\n [selectAll]=\"selectAll\"\n [(ngModel)]=\"input.value\"\n optionLabel=\"label\"\n (onSelectAllChange)=\"onSelectAllChange($event, input)\"\n class=\"custom-multiselect full-width-input\"\n ></p-multiSelect>\n </ng-container>\n </div>\n </div>\n\n <ng-template pTemplate=\"footer\">\n <div class=\"footer-buttons\">\n <p-button\n label=\"Effacer\"\n icon=\"pi pi-times\"\n (click)=\"clear()\"\n class=\"footer-button\"\n ></p-button>\n <p-button\n label=\"Rechercher\"\n icon=\"pi pi-search\"\n (click)=\"search()\"\n class=\"footer-button\"\n ></p-button>\n </div>\n </ng-template>\n</p-panel>\n", styles: [".multi-search-criteria ::ng-deep .p-element .p-hidden-accessible input{display:none}.multi-search-criteria ::ng-deep .bsc-label{display:block;margin-bottom:5px;font-weight:700}.multi-search-criteria ::ng-deep .custom-multiselect{width:100%}.multi-search-criteria ::ng-deep .p-multiselect .p-multiselect-label{font-size:14px;color:#333}.multi-search-criteria ::ng-deep .p-inputtext{width:100%}.multi-search-criteria ::ng-deep .p-calendar .p-inputtext{width:100%}.multi-search-criteria ::ng-deep .p-inputnumber{width:100%}.multi-search-criteria .criteria-container{display:grid;gap:10px}.multi-search-criteria .criteria-item{margin-bottom:10px;box-sizing:border-box}.multi-search-criteria .full-width-input,::ng-deep .p-calendar,::ng-deep .p-multiselect{width:100%}.multi-search-criteria ::ng-deep .p-calendar .p-inputtext,::ng-deep .p-multiselect .p-multiselect-label{width:100%}.multi-search-criteria .footer-buttons{display:flex;justify-content:flex-end;gap:10px}.multi-search-criteria ::ng-deep .footer-button button{width:140px;cursor:pointer}.multi-search-criteria ::ng-deep .p-panel .p-panel-footer{background:#f8f9fa}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i6.Calendar, selector: "p-calendar", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepYearPicker", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "variant", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i1$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i4.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: i8.MultiSelect, selector: "p-multiSelect", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8$1.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: i9$1.Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }] }); }
648
692
  }
649
693
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: MultiSearchCriteriaComponent, decorators: [{
650
694
  type: Component,
651
- args: [{ selector: 'multi-search-criteria', template: "<p-panel header=\"{{ title }}\" [toggleable]=\"true\" [collapsed]=\"true\">\n <div\n class=\"criteria-container\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputsPerRow + ', 1fr)' }\"\n >\n <div *ngFor=\"let input of criteria\" class=\"criteria-item\">\n <label class=\"bsc-label\">{{ input.title }}</label>\n\n <ng-container [ngSwitch]=\"input.type\">\n <p-calendar\n *ngSwitchCase=\"SearchCriteriaTypeEnum.DATERANGE\"\n [(ngModel)]=\"input.value\"\n selectionMode=\"range\"\n [dateFormat]=\"'dd/mm/yy'\"\n class=\"full-width-input\"\n [showIcon]=\"true\"\n (ngModelChange)=\"input.value = $event\"\n ></p-calendar>\n <p-calendar\n *ngSwitchCase=\"SearchCriteriaTypeEnum.DATE\"\n [ngModel]=\"input.value\"\n (ngModelChange)=\"input.value = $event\"\n [dateFormat]=\"'dd/mm/yy'\"\n [showIcon]=\"true\"\n class=\"full-width-input\"\n ></p-calendar>\n <input\n *ngSwitchCase=\"SearchCriteriaTypeEnum.STRING\"\n type=\"text\"\n pInputText\n [(ngModel)]=\"input.value\"\n class=\"full-width-input\"\n />\n\n <p-inputNumber\n *ngSwitchCase=\"SearchCriteriaTypeEnum.AMOUNT\"\n type=\"number\"\n [(ngModel)]=\"input.value\"\n mode=\"decimal\"\n inputId=\"minmaxfraction\"\n [minFractionDigits]=\"2\"\n [maxFractionDigits]=\"5\"\n [placeholder]=\"getCurrencySymbol(input)\"\n class=\"full-width-input\"\n ></p-inputNumber>\n\n <p-inputNumber\n *ngSwitchCase=\"SearchCriteriaTypeEnum.NUMBER\"\n type=\"number\"\n [(ngModel)]=\"input.value\"\n class=\"full-width-input\"\n ></p-inputNumber>\n\n <p-multiSelect\n *ngSwitchCase=\"SearchCriteriaTypeEnum.MULTISELECT\"\n [options]=\"input.filterOptions\"\n [display]=\"'chip'\"\n placeholder=\"Select\"\n [selectAll]=\"selectAll\"\n [(ngModel)]=\"input.value\"\n optionLabel=\"label\"\n (onSelectAllChange)=\"onSelectAllChange($event, input)\"\n class=\"custom-multiselect full-width-input\"\n ></p-multiSelect>\n </ng-container>\n </div>\n </div>\n\n <ng-template pTemplate=\"footer\">\n <div class=\"footer-buttons\">\n <p-button\n label=\"Effacer\"\n icon=\"pi pi-times\"\n (click)=\"clear()\"\n class=\"footer-button\"\n ></p-button>\n <p-button\n label=\"Rechercher\"\n icon=\"pi pi-search\"\n (click)=\"search()\"\n class=\"footer-button\"\n ></p-button>\n </div>\n </ng-template>\n</p-panel>\n", styles: ["::ng-deep .p-element .p-hidden-accessible input{display:none}::ng-deep .bsc-label{display:block;margin-bottom:5px;font-weight:700}::ng-deep .custom-multiselect{width:100%}::ng-deep .p-multiselect .p-multiselect-label{font-size:14px;color:#333}::ng-deep .p-inputtext{width:100%}::ng-deep .p-calendar .p-inputtext{width:100%}::ng-deep .p-inputnumber{width:100%}.criteria-container{display:grid;gap:10px}.criteria-item{margin-bottom:10px;box-sizing:border-box}.full-width-input,::ng-deep .p-calendar,::ng-deep .p-multiselect{width:100%}::ng-deep .p-calendar .p-inputtext,::ng-deep .p-multiselect .p-multiselect-label{width:100%}.footer-buttons{display:flex;justify-content:flex-end;gap:10px}::ng-deep .footer-button button{width:140px;cursor:pointer}::ng-deep .p-panel .p-panel-footer{background:#f8f9fa}\n"] }]
695
+ args: [{ selector: 'multi-search-criteria', template: "<p-panel\n header=\"{{ title }}\"\n [toggleable]=\"true\"\n [collapsed]=\"true\"\n class=\"multi-search-criteria\"\n>\n <div\n class=\"criteria-container\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputsPerRow + ', 1fr)' }\"\n >\n <div *ngFor=\"let input of criteria\" class=\"criteria-item\">\n <label class=\"bsc-label\">{{ input.title }}</label>\n\n <ng-container [ngSwitch]=\"input.type\">\n <p-calendar\n *ngSwitchCase=\"SearchCriteriaTypeEnum.DATERANGE\"\n [(ngModel)]=\"input.value\"\n selectionMode=\"range\"\n [dateFormat]=\"'dd/mm/yy'\"\n class=\"full-width-input\"\n [showIcon]=\"true\"\n (ngModelChange)=\"input.value = $event\"\n ></p-calendar>\n <p-calendar\n *ngSwitchCase=\"SearchCriteriaTypeEnum.DATE\"\n [ngModel]=\"input.value\"\n (ngModelChange)=\"input.value = $event\"\n [dateFormat]=\"'dd/mm/yy'\"\n [showIcon]=\"true\"\n class=\"full-width-input\"\n ></p-calendar>\n <input\n *ngSwitchCase=\"SearchCriteriaTypeEnum.STRING\"\n type=\"text\"\n pInputText\n [(ngModel)]=\"input.value\"\n class=\"full-width-input\"\n />\n\n <p-inputNumber\n *ngSwitchCase=\"SearchCriteriaTypeEnum.AMOUNT\"\n type=\"number\"\n [(ngModel)]=\"input.value\"\n mode=\"decimal\"\n inputId=\"minmaxfraction\"\n [minFractionDigits]=\"2\"\n [maxFractionDigits]=\"5\"\n [placeholder]=\"getCurrencySymbol(input)\"\n class=\"full-width-input\"\n ></p-inputNumber>\n\n <p-inputNumber\n *ngSwitchCase=\"SearchCriteriaTypeEnum.NUMBER\"\n type=\"number\"\n [(ngModel)]=\"input.value\"\n class=\"full-width-input\"\n ></p-inputNumber>\n\n <p-multiSelect\n *ngSwitchCase=\"SearchCriteriaTypeEnum.MULTISELECT\"\n [options]=\"input.filterOptions\"\n [display]=\"'chip'\"\n placeholder=\"Select\"\n [selectAll]=\"selectAll\"\n [(ngModel)]=\"input.value\"\n optionLabel=\"label\"\n (onSelectAllChange)=\"onSelectAllChange($event, input)\"\n class=\"custom-multiselect full-width-input\"\n ></p-multiSelect>\n </ng-container>\n </div>\n </div>\n\n <ng-template pTemplate=\"footer\">\n <div class=\"footer-buttons\">\n <p-button\n label=\"Effacer\"\n icon=\"pi pi-times\"\n (click)=\"clear()\"\n class=\"footer-button\"\n ></p-button>\n <p-button\n label=\"Rechercher\"\n icon=\"pi pi-search\"\n (click)=\"search()\"\n class=\"footer-button\"\n ></p-button>\n </div>\n </ng-template>\n</p-panel>\n", styles: [".multi-search-criteria ::ng-deep .p-element .p-hidden-accessible input{display:none}.multi-search-criteria ::ng-deep .bsc-label{display:block;margin-bottom:5px;font-weight:700}.multi-search-criteria ::ng-deep .custom-multiselect{width:100%}.multi-search-criteria ::ng-deep .p-multiselect .p-multiselect-label{font-size:14px;color:#333}.multi-search-criteria ::ng-deep .p-inputtext{width:100%}.multi-search-criteria ::ng-deep .p-calendar .p-inputtext{width:100%}.multi-search-criteria ::ng-deep .p-inputnumber{width:100%}.multi-search-criteria .criteria-container{display:grid;gap:10px}.multi-search-criteria .criteria-item{margin-bottom:10px;box-sizing:border-box}.multi-search-criteria .full-width-input,::ng-deep .p-calendar,::ng-deep .p-multiselect{width:100%}.multi-search-criteria ::ng-deep .p-calendar .p-inputtext,::ng-deep .p-multiselect .p-multiselect-label{width:100%}.multi-search-criteria .footer-buttons{display:flex;justify-content:flex-end;gap:10px}.multi-search-criteria ::ng-deep .footer-button button{width:140px;cursor:pointer}.multi-search-criteria ::ng-deep .p-panel .p-panel-footer{background:#f8f9fa}\n"] }]
652
696
  }], propDecorators: { title: [{
653
697
  type: Input
654
698
  }], criteria: [{
@@ -702,13 +746,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
702
746
  }]
703
747
  }] });
704
748
 
705
- // projects/ng-prime-tools/src/lib/ng-advanced-prime-table/index.ts
706
-
707
- /**
708
- * Generated bundle index. Do not edit.
709
- */
710
- /// <amd-module name="ng-prime-tools/multi-search-criteria" />
711
-
712
749
  class PTCheckBoxInputComponent {
713
750
  ngOnInit() {
714
751
  this.setupControl();
@@ -753,7 +790,7 @@ class PTCheckBoxInputComponent {
753
790
  return '';
754
791
  }
755
792
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTCheckBoxInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
756
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTCheckBoxInputComponent, selector: "pt-check-box-input", inputs: { formGroup: "formGroup", formField: "formField" }, ngImport: i0, template: "<div\n [formGroup]=\"formGroup\"\n class=\"form-field\"\n [ngStyle]=\"{ width: formField.width || '100%' }\"\n *ngIf=\"!formField.hidden\"\n>\n <div class=\"checkbox-container\">\n <p-checkbox\n [formControlName]=\"formField.name\"\n [binary]=\"true\"\n [label]=\"formField.label || ''\"\n ></p-checkbox>\n </div>\n <div\n *ngIf=\"\n formGroup.get(formField.name)?.errors &&\n (formGroup.get(formField.name)?.touched ||\n formGroup.get(formField.name)?.dirty)\n \"\n class=\"error-container\"\n >\n <small class=\"p-error\">{{ getErrorMessage() }}</small>\n </div>\n</div>\n", styles: [".form-field{margin-bottom:1rem}.form-field label{display:block;margin-bottom:.5rem;font-weight:700;font-size:1rem}.checkbox-container{display:flex;align-items:center}.p-error{font-size:.8rem;color:#f44336}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3$2.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue", "variant"], outputs: ["onChange", "onFocus", "onBlur"] }] }); }
793
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTCheckBoxInputComponent, selector: "pt-check-box-input", inputs: { formGroup: "formGroup", formField: "formField" }, ngImport: i0, template: "<div\n [formGroup]=\"formGroup\"\n class=\"form-field\"\n [ngStyle]=\"{ width: formField.width || '100%' }\"\n *ngIf=\"!formField.hidden\"\n>\n <div class=\"checkbox-container\">\n <p-checkbox\n [formControlName]=\"formField.name\"\n [binary]=\"true\"\n [label]=\"formField.label || ''\"\n ></p-checkbox>\n </div>\n <div\n *ngIf=\"\n formGroup.get(formField.name)?.errors &&\n (formGroup.get(formField.name)?.touched ||\n formGroup.get(formField.name)?.dirty)\n \"\n class=\"error-container\"\n >\n <small class=\"p-error\">{{ getErrorMessage() }}</small>\n </div>\n</div>\n", styles: [".form-field{margin-bottom:1rem}.form-field label{display:block;margin-bottom:.5rem;font-weight:700;font-size:1rem}.checkbox-container{display:flex;align-items:center}.p-error{font-size:.8rem;color:#f44336}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3$1.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue", "variant"], outputs: ["onChange", "onFocus", "onBlur"] }] }); }
757
794
  }
758
795
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTCheckBoxInputComponent, decorators: [{
759
796
  type: Component,
@@ -1038,7 +1075,7 @@ class PTNumberInputComponent {
1038
1075
  return '';
1039
1076
  }
1040
1077
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTNumberInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1041
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTNumberInputComponent, selector: "pt-number-input", inputs: { formGroup: "formGroup", formField: "formField" }, ngImport: i0, template: "<div\n [formGroup]=\"formGroup\"\n class=\"form-field\"\n [ngStyle]=\"{ width: formField.width || '100%' }\"\n *ngIf=\"!formField.hidden\"\n>\n <label *ngIf=\"formField.label\">{{ formField.label }}</label>\n <p-inputGroup>\n <ng-container\n *ngIf=\"!formField.iconPosition || formField.iconPosition === 'left'\"\n >\n <p-inputGroupAddon *ngIf=\"formField.iconClass || formField.currency\">\n <i *ngIf=\"formField.iconClass\" [ngClass]=\"formField.iconClass\"></i>\n <span *ngIf=\"!formField.iconClass && formField.currency\">\n {{ formField.currency }}\n </span>\n </p-inputGroupAddon>\n <p-inputNumber\n [formControlName]=\"formField.name\"\n mode=\"decimal\"\n [locale]=\"formField.numberFormat || undefined\"\n [useGrouping]=\"formField.numberFormat ? true : false\"\n [minFractionDigits]=\"formField.decimalDigits || 0\"\n [maxFractionDigits]=\"formField.decimalDigits || 0\"\n [placeholder]=\"formField.placeholder || ''\"\n ></p-inputNumber>\n </ng-container>\n <ng-container *ngIf=\"formField.iconPosition === 'right'\">\n <p-inputNumber\n [formControlName]=\"formField.name\"\n mode=\"decimal\"\n [locale]=\"formField.numberFormat || undefined\"\n [useGrouping]=\"formField.numberFormat ? true : false\"\n [minFractionDigits]=\"formField.decimalDigits || 0\"\n [maxFractionDigits]=\"formField.decimalDigits || 0\"\n [placeholder]=\"formField.placeholder || ''\"\n ></p-inputNumber>\n <p-inputGroupAddon *ngIf=\"formField.iconClass || formField.currency\">\n <i *ngIf=\"formField.iconClass\" [ngClass]=\"formField.iconClass\"></i>\n <span *ngIf=\"!formField.iconClass && formField.currency\">\n {{ formField.currency }}\n </span>\n </p-inputGroupAddon>\n </ng-container>\n </p-inputGroup>\n <div\n *ngIf=\"\n formGroup.get(formField.name)?.invalid &&\n formGroup.get(formField.name)?.touched\n \"\n >\n <small class=\"p-error\">{{ getErrorMessage() }}</small>\n </div>\n</div>\n", styles: [".form-field{margin-bottom:1rem}.form-field label{display:block;margin-bottom:.5rem;font-weight:700}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3$3.InputGroup, selector: "p-inputGroup", inputs: ["style", "styleClass"] }, { kind: "component", type: i4$1.InputGroupAddon, selector: "p-inputGroupAddon", inputs: ["style", "styleClass"] }, { kind: "component", type: i8$1.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }] }); }
1078
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTNumberInputComponent, selector: "pt-number-input", inputs: { formGroup: "formGroup", formField: "formField" }, ngImport: i0, template: "<div\n [formGroup]=\"formGroup\"\n class=\"form-field\"\n [ngStyle]=\"{ width: formField.width || '100%' }\"\n *ngIf=\"!formField.hidden\"\n>\n <label *ngIf=\"formField.label\">{{ formField.label }}</label>\n <p-inputGroup>\n <ng-container\n *ngIf=\"!formField.iconPosition || formField.iconPosition === 'left'\"\n >\n <p-inputGroupAddon *ngIf=\"formField.iconClass || formField.currency\">\n <i *ngIf=\"formField.iconClass\" [ngClass]=\"formField.iconClass\"></i>\n <span *ngIf=\"!formField.iconClass && formField.currency\">\n {{ formField.currency }}\n </span>\n </p-inputGroupAddon>\n <p-inputNumber\n [formControlName]=\"formField.name\"\n mode=\"decimal\"\n [locale]=\"formField.numberFormat || undefined\"\n [useGrouping]=\"formField.numberFormat ? true : false\"\n [minFractionDigits]=\"formField.decimalDigits || 0\"\n [maxFractionDigits]=\"formField.decimalDigits || 0\"\n [placeholder]=\"formField.placeholder || ''\"\n ></p-inputNumber>\n </ng-container>\n <ng-container *ngIf=\"formField.iconPosition === 'right'\">\n <p-inputNumber\n [formControlName]=\"formField.name\"\n mode=\"decimal\"\n [locale]=\"formField.numberFormat || undefined\"\n [useGrouping]=\"formField.numberFormat ? true : false\"\n [minFractionDigits]=\"formField.decimalDigits || 0\"\n [maxFractionDigits]=\"formField.decimalDigits || 0\"\n [placeholder]=\"formField.placeholder || ''\"\n ></p-inputNumber>\n <p-inputGroupAddon *ngIf=\"formField.iconClass || formField.currency\">\n <i *ngIf=\"formField.iconClass\" [ngClass]=\"formField.iconClass\"></i>\n <span *ngIf=\"!formField.iconClass && formField.currency\">\n {{ formField.currency }}\n </span>\n </p-inputGroupAddon>\n </ng-container>\n </p-inputGroup>\n <div\n *ngIf=\"\n formGroup.get(formField.name)?.invalid &&\n formGroup.get(formField.name)?.touched\n \"\n >\n <small class=\"p-error\">{{ getErrorMessage() }}</small>\n </div>\n</div>\n", styles: [".form-field{margin-bottom:1rem}.form-field label{display:block;margin-bottom:.5rem;font-weight:700}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3$2.InputGroup, selector: "p-inputGroup", inputs: ["style", "styleClass"] }, { kind: "component", type: i4$1.InputGroupAddon, selector: "p-inputGroupAddon", inputs: ["style", "styleClass"] }, { kind: "component", type: i8$1.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }] }); }
1042
1079
  }
1043
1080
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTNumberInputComponent, decorators: [{
1044
1081
  type: Component,
@@ -1094,7 +1131,7 @@ class PTSwitchInputComponent {
1094
1131
  return '';
1095
1132
  }
1096
1133
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTSwitchInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1097
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTSwitchInputComponent, selector: "pt-switch-input", inputs: { formGroup: "formGroup", formField: "formField" }, ngImport: i0, template: "<div\n [formGroup]=\"formGroup\"\n class=\"form-field\"\n [ngStyle]=\"{ width: formField.width || '100%' }\"\n *ngIf=\"!formField.hidden\"\n>\n <div class=\"switch-container\" style=\"display: flex; align-items: center\">\n <p-inputSwitch [formControlName]=\"formField.name\"></p-inputSwitch>\n <label *ngIf=\"formField.label\" style=\"margin-left: 8px\">{{\n formField.label\n }}</label>\n </div>\n <div\n *ngIf=\"\n formGroup.get(formField.name)?.errors &&\n (formGroup.get(formField.name)?.touched ||\n formGroup.get(formField.name)?.dirty)\n \"\n class=\"error-container\"\n >\n <small class=\"p-error\">{{ getErrorMessage() }}</small>\n </div>\n</div>\n", styles: [".switch-container{display:flex;align-items:center}.error-container{margin-top:5px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3$4.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabel", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }] }); }
1134
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTSwitchInputComponent, selector: "pt-switch-input", inputs: { formGroup: "formGroup", formField: "formField" }, ngImport: i0, template: "<div\n [formGroup]=\"formGroup\"\n class=\"form-field\"\n [ngStyle]=\"{ width: formField.width || '100%' }\"\n *ngIf=\"!formField.hidden\"\n>\n <div class=\"switch-container\" style=\"display: flex; align-items: center\">\n <p-inputSwitch [formControlName]=\"formField.name\"></p-inputSwitch>\n <label *ngIf=\"formField.label\" style=\"margin-left: 8px\">{{\n formField.label\n }}</label>\n </div>\n <div\n *ngIf=\"\n formGroup.get(formField.name)?.errors &&\n (formGroup.get(formField.name)?.touched ||\n formGroup.get(formField.name)?.dirty)\n \"\n class=\"error-container\"\n >\n <small class=\"p-error\">{{ getErrorMessage() }}</small>\n </div>\n</div>\n", styles: [".switch-container{display:flex;align-items:center}.error-container{margin-top:5px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3$3.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabel", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }] }); }
1098
1135
  }
1099
1136
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTSwitchInputComponent, decorators: [{
1100
1137
  type: Component,
@@ -1169,11 +1206,11 @@ class PTTextAreaInputComponent {
1169
1206
  return '';
1170
1207
  }
1171
1208
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTTextAreaInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1172
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTTextAreaInputComponent, selector: "pt-text-area-input", inputs: { formGroup: "formGroup", formField: "formField" }, ngImport: i0, template: "<div\n [formGroup]=\"formGroup\"\n *ngIf=\"!formField.hidden\"\n class=\"form-field\"\n [ngStyle]=\"{ width: formField.width || '100%' }\"\n>\n <label *ngIf=\"formField.label\">{{ formField.label }}</label>\n <p-inputGroup>\n <ng-container\n *ngIf=\"!formField.iconPosition || formField.iconPosition === 'left'\"\n >\n <p-inputGroupAddon *ngIf=\"formField.iconClass\">\n <i *ngIf=\"formField.iconClass\" [ngClass]=\"formField.iconClass\"></i>\n </p-inputGroupAddon>\n <textarea\n pInputTextarea\n [formControlName]=\"formField.name\"\n [rows]=\"formField.rows || 5\"\n [cols]=\"formField.cols || 30\"\n [autoResize]=\"formField.autoResize || false\"\n [attr.minlength]=\"formField.minLength\"\n [attr.maxlength]=\"formField.maxLength\"\n [placeholder]=\"formField.placeholder || ''\"\n ></textarea>\n </ng-container>\n <ng-container *ngIf=\"formField.iconPosition === 'right'\">\n <textarea\n pInputTextarea\n [formControlName]=\"formField.name\"\n [rows]=\"formField.rows || 5\"\n [cols]=\"formField.cols || 30\"\n [autoResize]=\"formField.autoResize || false\"\n [attr.minlength]=\"formField.minLength\"\n [attr.maxlength]=\"formField.maxLength\"\n [placeholder]=\"formField.placeholder || ''\"\n ></textarea>\n <p-inputGroupAddon *ngIf=\"formField.iconClass\">\n <i *ngIf=\"formField.iconClass\" [ngClass]=\"formField.iconClass\"></i>\n </p-inputGroupAddon>\n </ng-container>\n </p-inputGroup>\n <div class=\"form-info-row\">\n <small\n *ngIf=\"\n formGroup.get(formField.name)?.invalid &&\n formGroup.get(formField.name)?.touched\n \"\n class=\"p-error\"\n >\n {{ getErrorMessage() }}\n </small>\n <div class=\"spacer\"></div>\n <!-- Spacer to ensure alignment -->\n <div\n *ngIf=\"!formField.disabled && formField.maxLength !== undefined\"\n class=\"character-counter\"\n >\n {{ characterCount }}/{{ formField.maxLength }} characters\n </div>\n </div>\n</div>\n", styles: [".form-field{position:relative;margin-bottom:2rem}.form-field label{display:block;margin-bottom:.5rem;font-weight:700;font-size:1rem}.form-info-row{display:flex;justify-content:space-between;align-items:center;margin-top:.5rem}.spacer{flex-grow:1}.character-counter{font-size:.8rem;color:#888;text-align:right;margin-left:auto}.p-error{font-size:.8rem;color:#f44336}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$5.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize", "variant"], outputs: ["onResize"] }, { kind: "component", type: i3$3.InputGroup, selector: "p-inputGroup", inputs: ["style", "styleClass"] }, { kind: "component", type: i4$1.InputGroupAddon, selector: "p-inputGroupAddon", inputs: ["style", "styleClass"] }] }); }
1209
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTTextAreaInputComponent, selector: "pt-text-area-input", inputs: { formGroup: "formGroup", formField: "formField" }, ngImport: i0, template: "<div\n [formGroup]=\"formGroup\"\n *ngIf=\"!formField.hidden\"\n class=\"form-field\"\n [ngStyle]=\"{ width: formField.width || '100%' }\"\n>\n <label *ngIf=\"formField.label\">{{ formField.label }}</label>\n <p-inputGroup>\n <ng-container\n *ngIf=\"!formField.iconPosition || formField.iconPosition === 'left'\"\n >\n <p-inputGroupAddon *ngIf=\"formField.iconClass\">\n <i *ngIf=\"formField.iconClass\" [ngClass]=\"formField.iconClass\"></i>\n </p-inputGroupAddon>\n <textarea\n pInputTextarea\n [formControlName]=\"formField.name\"\n [rows]=\"formField.rows || 5\"\n [cols]=\"formField.cols || 30\"\n [autoResize]=\"formField.autoResize || false\"\n [attr.minlength]=\"formField.minLength\"\n [attr.maxlength]=\"formField.maxLength\"\n [placeholder]=\"formField.placeholder || ''\"\n ></textarea>\n </ng-container>\n <ng-container *ngIf=\"formField.iconPosition === 'right'\">\n <textarea\n pInputTextarea\n [formControlName]=\"formField.name\"\n [rows]=\"formField.rows || 5\"\n [cols]=\"formField.cols || 30\"\n [autoResize]=\"formField.autoResize || false\"\n [attr.minlength]=\"formField.minLength\"\n [attr.maxlength]=\"formField.maxLength\"\n [placeholder]=\"formField.placeholder || ''\"\n ></textarea>\n <p-inputGroupAddon *ngIf=\"formField.iconClass\">\n <i *ngIf=\"formField.iconClass\" [ngClass]=\"formField.iconClass\"></i>\n </p-inputGroupAddon>\n </ng-container>\n </p-inputGroup>\n <div class=\"form-info-row\">\n <small\n *ngIf=\"\n formGroup.get(formField.name)?.invalid &&\n formGroup.get(formField.name)?.touched\n \"\n class=\"p-error\"\n >\n {{ getErrorMessage() }}\n </small>\n <div class=\"spacer\"></div>\n <!-- Spacer to ensure alignment -->\n <div\n *ngIf=\"!formField.disabled && formField.maxLength !== undefined\"\n class=\"character-counter\"\n >\n {{ characterCount }}/{{ formField.maxLength }} characters\n </div>\n </div>\n</div>\n", styles: [".form-field{position:relative;margin-bottom:1rem}.form-field label{display:block;margin-bottom:.5rem;font-weight:700;font-size:1rem}.form-info-row{display:flex;justify-content:space-between;align-items:center;margin-top:.5rem}.spacer{flex-grow:1}.character-counter{font-size:.8rem;color:#888;text-align:right;margin-left:auto}.p-error{font-size:.8rem;color:#f44336}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$4.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize", "variant"], outputs: ["onResize"] }, { kind: "component", type: i3$2.InputGroup, selector: "p-inputGroup", inputs: ["style", "styleClass"] }, { kind: "component", type: i4$1.InputGroupAddon, selector: "p-inputGroupAddon", inputs: ["style", "styleClass"] }] }); }
1173
1210
  }
1174
1211
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTTextAreaInputComponent, decorators: [{
1175
1212
  type: Component,
1176
- args: [{ selector: 'pt-text-area-input', template: "<div\n [formGroup]=\"formGroup\"\n *ngIf=\"!formField.hidden\"\n class=\"form-field\"\n [ngStyle]=\"{ width: formField.width || '100%' }\"\n>\n <label *ngIf=\"formField.label\">{{ formField.label }}</label>\n <p-inputGroup>\n <ng-container\n *ngIf=\"!formField.iconPosition || formField.iconPosition === 'left'\"\n >\n <p-inputGroupAddon *ngIf=\"formField.iconClass\">\n <i *ngIf=\"formField.iconClass\" [ngClass]=\"formField.iconClass\"></i>\n </p-inputGroupAddon>\n <textarea\n pInputTextarea\n [formControlName]=\"formField.name\"\n [rows]=\"formField.rows || 5\"\n [cols]=\"formField.cols || 30\"\n [autoResize]=\"formField.autoResize || false\"\n [attr.minlength]=\"formField.minLength\"\n [attr.maxlength]=\"formField.maxLength\"\n [placeholder]=\"formField.placeholder || ''\"\n ></textarea>\n </ng-container>\n <ng-container *ngIf=\"formField.iconPosition === 'right'\">\n <textarea\n pInputTextarea\n [formControlName]=\"formField.name\"\n [rows]=\"formField.rows || 5\"\n [cols]=\"formField.cols || 30\"\n [autoResize]=\"formField.autoResize || false\"\n [attr.minlength]=\"formField.minLength\"\n [attr.maxlength]=\"formField.maxLength\"\n [placeholder]=\"formField.placeholder || ''\"\n ></textarea>\n <p-inputGroupAddon *ngIf=\"formField.iconClass\">\n <i *ngIf=\"formField.iconClass\" [ngClass]=\"formField.iconClass\"></i>\n </p-inputGroupAddon>\n </ng-container>\n </p-inputGroup>\n <div class=\"form-info-row\">\n <small\n *ngIf=\"\n formGroup.get(formField.name)?.invalid &&\n formGroup.get(formField.name)?.touched\n \"\n class=\"p-error\"\n >\n {{ getErrorMessage() }}\n </small>\n <div class=\"spacer\"></div>\n <!-- Spacer to ensure alignment -->\n <div\n *ngIf=\"!formField.disabled && formField.maxLength !== undefined\"\n class=\"character-counter\"\n >\n {{ characterCount }}/{{ formField.maxLength }} characters\n </div>\n </div>\n</div>\n", styles: [".form-field{position:relative;margin-bottom:2rem}.form-field label{display:block;margin-bottom:.5rem;font-weight:700;font-size:1rem}.form-info-row{display:flex;justify-content:space-between;align-items:center;margin-top:.5rem}.spacer{flex-grow:1}.character-counter{font-size:.8rem;color:#888;text-align:right;margin-left:auto}.p-error{font-size:.8rem;color:#f44336}\n"] }]
1213
+ args: [{ selector: 'pt-text-area-input', template: "<div\n [formGroup]=\"formGroup\"\n *ngIf=\"!formField.hidden\"\n class=\"form-field\"\n [ngStyle]=\"{ width: formField.width || '100%' }\"\n>\n <label *ngIf=\"formField.label\">{{ formField.label }}</label>\n <p-inputGroup>\n <ng-container\n *ngIf=\"!formField.iconPosition || formField.iconPosition === 'left'\"\n >\n <p-inputGroupAddon *ngIf=\"formField.iconClass\">\n <i *ngIf=\"formField.iconClass\" [ngClass]=\"formField.iconClass\"></i>\n </p-inputGroupAddon>\n <textarea\n pInputTextarea\n [formControlName]=\"formField.name\"\n [rows]=\"formField.rows || 5\"\n [cols]=\"formField.cols || 30\"\n [autoResize]=\"formField.autoResize || false\"\n [attr.minlength]=\"formField.minLength\"\n [attr.maxlength]=\"formField.maxLength\"\n [placeholder]=\"formField.placeholder || ''\"\n ></textarea>\n </ng-container>\n <ng-container *ngIf=\"formField.iconPosition === 'right'\">\n <textarea\n pInputTextarea\n [formControlName]=\"formField.name\"\n [rows]=\"formField.rows || 5\"\n [cols]=\"formField.cols || 30\"\n [autoResize]=\"formField.autoResize || false\"\n [attr.minlength]=\"formField.minLength\"\n [attr.maxlength]=\"formField.maxLength\"\n [placeholder]=\"formField.placeholder || ''\"\n ></textarea>\n <p-inputGroupAddon *ngIf=\"formField.iconClass\">\n <i *ngIf=\"formField.iconClass\" [ngClass]=\"formField.iconClass\"></i>\n </p-inputGroupAddon>\n </ng-container>\n </p-inputGroup>\n <div class=\"form-info-row\">\n <small\n *ngIf=\"\n formGroup.get(formField.name)?.invalid &&\n formGroup.get(formField.name)?.touched\n \"\n class=\"p-error\"\n >\n {{ getErrorMessage() }}\n </small>\n <div class=\"spacer\"></div>\n <!-- Spacer to ensure alignment -->\n <div\n *ngIf=\"!formField.disabled && formField.maxLength !== undefined\"\n class=\"character-counter\"\n >\n {{ characterCount }}/{{ formField.maxLength }} characters\n </div>\n </div>\n</div>\n", styles: [".form-field{position:relative;margin-bottom:1rem}.form-field label{display:block;margin-bottom:.5rem;font-weight:700;font-size:1rem}.form-info-row{display:flex;justify-content:space-between;align-items:center;margin-top:.5rem}.spacer{flex-grow:1}.character-counter{font-size:.8rem;color:#888;text-align:right;margin-left:auto}.p-error{font-size:.8rem;color:#f44336}\n"] }]
1177
1214
  }], propDecorators: { formGroup: [{
1178
1215
  type: Input
1179
1216
  }], formField: [{
@@ -1209,7 +1246,22 @@ class PTTextInputComponent {
1209
1246
  }
1210
1247
  updateCharacterCount() {
1211
1248
  const control = this.formGroup.get(this.formField.name);
1212
- this.characterCount = control.value ? control.value.length : 0;
1249
+ if (control && control.value !== null) {
1250
+ this.characterCount = control.value ? control.value.length : 0;
1251
+ }
1252
+ else {
1253
+ this.characterCount = 0;
1254
+ }
1255
+ }
1256
+ getInputType() {
1257
+ switch (this.formField.type) {
1258
+ case FormInputTypeEnum.PASSWORD:
1259
+ return 'password';
1260
+ case FormInputTypeEnum.NUMBER:
1261
+ return 'number';
1262
+ default:
1263
+ return 'text';
1264
+ }
1213
1265
  }
1214
1266
  getValidators() {
1215
1267
  const validators = [];
@@ -1247,11 +1299,11 @@ class PTTextInputComponent {
1247
1299
  return '';
1248
1300
  }
1249
1301
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTTextInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1250
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTTextInputComponent, selector: "pt-text-input", inputs: { formGroup: "formGroup", formField: "formField" }, ngImport: i0, template: "<div\n [formGroup]=\"formGroup\"\n class=\"form-field\"\n [ngStyle]=\"{ width: formField.width || '100%' }\"\n *ngIf=\"!formField.hidden\"\n>\n <label *ngIf=\"formField.label\">{{ formField.label }}</label>\n <ng-container *ngIf=\"formField.iconClass; else noIcon\">\n <p-iconField [iconPosition]=\"formField.iconPosition || 'left'\">\n <p-inputIcon\n *ngIf=\"formField.iconClass\"\n [styleClass]=\"formField.iconClass\"\n ></p-inputIcon>\n <input\n type=\"text\"\n pInputText\n [formControlName]=\"formField.name\"\n [placeholder]=\"formField.placeholder ?? ''\"\n [attr.minlength]=\"formField.minLength\"\n [attr.maxlength]=\"formField.maxLength\"\n />\n </p-iconField>\n </ng-container>\n <ng-template #noIcon>\n <input\n type=\"text\"\n pInputText\n [formControlName]=\"formField.name\"\n [placeholder]=\"formField.placeholder ?? ''\"\n [attr.minlength]=\"formField.minLength\"\n [attr.maxlength]=\"formField.maxLength\"\n [ngStyle]=\"{ width: '100%' }\"\n />\n </ng-template>\n <div class=\"form-info-row\">\n <small\n *ngIf=\"\n formGroup.get(formField.name)?.invalid &&\n formGroup.get(formField.name)?.touched\n \"\n class=\"p-error\"\n >\n {{ getErrorMessage() }}\n </small>\n <div class=\"spacer\"></div>\n <!-- Spacer to maintain right alignment -->\n <div\n *ngIf=\"!formField.disabled && formField.maxLength !== undefined\"\n class=\"character-counter\"\n >\n {{ characterCount }}/{{ formField.maxLength }} characters\n </div>\n </div>\n</div>\n", styles: [".form-field{position:relative;margin-bottom:2rem}.form-field label{display:block;margin-bottom:.5rem;font-weight:700;font-size:1rem}.form-info-row{display:flex;justify-content:space-between;align-items:center;margin-top:.5rem}.spacer{flex-grow:1}.character-counter{font-size:.8rem;color:#888;text-align:right;margin-left:auto}.p-error{font-size:.8rem;color:#f44336}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i4.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: i10.IconField, selector: "p-iconField", inputs: ["iconPosition"] }, { kind: "component", type: i11.InputIcon, selector: "p-inputIcon", inputs: ["styleClass"] }] }); }
1302
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTTextInputComponent, selector: "pt-text-input", inputs: { formGroup: "formGroup", formField: "formField" }, ngImport: i0, template: "<div\n [formGroup]=\"formGroup\"\n class=\"form-field\"\n [ngStyle]=\"{\n width: formField.width || '100%',\n height: formField.height || 'auto'\n }\"\n *ngIf=\"!formField.hidden\"\n>\n <label *ngIf=\"formField.label\">{{ formField.label }}</label>\n\n <ng-container *ngIf=\"formField.iconClass; else noIcon\">\n <p-iconField [iconPosition]=\"formField.iconPosition || 'left'\">\n <p-inputIcon\n *ngIf=\"formField.iconClass\"\n [styleClass]=\"formField.iconClass\"\n ></p-inputIcon>\n <input\n [type]=\"getInputType()\"\n pInputText\n [formControlName]=\"formField.name\"\n [placeholder]=\"formField.placeholder ?? ''\"\n [attr.minlength]=\"formField.minLength\"\n [attr.maxlength]=\"formField.maxLength\"\n [ngStyle]=\"{\n width: formField.width || '100%',\n height: formField.height || 'auto'\n }\"\n />\n </p-iconField>\n </ng-container>\n\n <ng-template #noIcon>\n <input\n [type]=\"getInputType()\"\n pInputText\n [formControlName]=\"formField.name\"\n [placeholder]=\"formField.placeholder ?? ''\"\n [attr.minlength]=\"formField.minLength\"\n [attr.maxlength]=\"formField.maxLength\"\n [ngStyle]=\"{\n width: formField.width || '100%',\n height: formField.height || 'auto'\n }\"\n />\n </ng-template>\n\n <div class=\"form-info-row\">\n <small\n *ngIf=\"\n formGroup.get(formField.name)?.invalid &&\n formGroup.get(formField.name)?.touched\n \"\n class=\"p-error\"\n >\n {{ getErrorMessage() }}\n </small>\n <div class=\"spacer\"></div>\n <div\n *ngIf=\"!formField.disabled && formField.maxLength !== undefined\"\n class=\"character-counter\"\n >\n {{ characterCount }}/{{ formField.maxLength }} characters\n </div>\n </div>\n</div>\n", styles: [".form-field{position:relative;margin-bottom:1rem}.form-field label{display:block;margin-bottom:.5rem;font-weight:700;font-size:1rem}.form-info-row{display:flex;justify-content:space-between;align-items:center;margin-top:.5rem}.spacer{flex-grow:1}.character-counter{font-size:.8rem;color:#888;text-align:right;margin-left:auto}.p-error{font-size:.8rem;color:#f44336}input:focus{outline:none;box-shadow:none;border-color:inherit}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i4.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: i10.IconField, selector: "p-iconField", inputs: ["iconPosition"] }, { kind: "component", type: i11.InputIcon, selector: "p-inputIcon", inputs: ["styleClass"] }] }); }
1251
1303
  }
1252
1304
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTTextInputComponent, decorators: [{
1253
1305
  type: Component,
1254
- args: [{ selector: 'pt-text-input', template: "<div\n [formGroup]=\"formGroup\"\n class=\"form-field\"\n [ngStyle]=\"{ width: formField.width || '100%' }\"\n *ngIf=\"!formField.hidden\"\n>\n <label *ngIf=\"formField.label\">{{ formField.label }}</label>\n <ng-container *ngIf=\"formField.iconClass; else noIcon\">\n <p-iconField [iconPosition]=\"formField.iconPosition || 'left'\">\n <p-inputIcon\n *ngIf=\"formField.iconClass\"\n [styleClass]=\"formField.iconClass\"\n ></p-inputIcon>\n <input\n type=\"text\"\n pInputText\n [formControlName]=\"formField.name\"\n [placeholder]=\"formField.placeholder ?? ''\"\n [attr.minlength]=\"formField.minLength\"\n [attr.maxlength]=\"formField.maxLength\"\n />\n </p-iconField>\n </ng-container>\n <ng-template #noIcon>\n <input\n type=\"text\"\n pInputText\n [formControlName]=\"formField.name\"\n [placeholder]=\"formField.placeholder ?? ''\"\n [attr.minlength]=\"formField.minLength\"\n [attr.maxlength]=\"formField.maxLength\"\n [ngStyle]=\"{ width: '100%' }\"\n />\n </ng-template>\n <div class=\"form-info-row\">\n <small\n *ngIf=\"\n formGroup.get(formField.name)?.invalid &&\n formGroup.get(formField.name)?.touched\n \"\n class=\"p-error\"\n >\n {{ getErrorMessage() }}\n </small>\n <div class=\"spacer\"></div>\n <!-- Spacer to maintain right alignment -->\n <div\n *ngIf=\"!formField.disabled && formField.maxLength !== undefined\"\n class=\"character-counter\"\n >\n {{ characterCount }}/{{ formField.maxLength }} characters\n </div>\n </div>\n</div>\n", styles: [".form-field{position:relative;margin-bottom:2rem}.form-field label{display:block;margin-bottom:.5rem;font-weight:700;font-size:1rem}.form-info-row{display:flex;justify-content:space-between;align-items:center;margin-top:.5rem}.spacer{flex-grow:1}.character-counter{font-size:.8rem;color:#888;text-align:right;margin-left:auto}.p-error{font-size:.8rem;color:#f44336}\n"] }]
1306
+ args: [{ selector: 'pt-text-input', template: "<div\n [formGroup]=\"formGroup\"\n class=\"form-field\"\n [ngStyle]=\"{\n width: formField.width || '100%',\n height: formField.height || 'auto'\n }\"\n *ngIf=\"!formField.hidden\"\n>\n <label *ngIf=\"formField.label\">{{ formField.label }}</label>\n\n <ng-container *ngIf=\"formField.iconClass; else noIcon\">\n <p-iconField [iconPosition]=\"formField.iconPosition || 'left'\">\n <p-inputIcon\n *ngIf=\"formField.iconClass\"\n [styleClass]=\"formField.iconClass\"\n ></p-inputIcon>\n <input\n [type]=\"getInputType()\"\n pInputText\n [formControlName]=\"formField.name\"\n [placeholder]=\"formField.placeholder ?? ''\"\n [attr.minlength]=\"formField.minLength\"\n [attr.maxlength]=\"formField.maxLength\"\n [ngStyle]=\"{\n width: formField.width || '100%',\n height: formField.height || 'auto'\n }\"\n />\n </p-iconField>\n </ng-container>\n\n <ng-template #noIcon>\n <input\n [type]=\"getInputType()\"\n pInputText\n [formControlName]=\"formField.name\"\n [placeholder]=\"formField.placeholder ?? ''\"\n [attr.minlength]=\"formField.minLength\"\n [attr.maxlength]=\"formField.maxLength\"\n [ngStyle]=\"{\n width: formField.width || '100%',\n height: formField.height || 'auto'\n }\"\n />\n </ng-template>\n\n <div class=\"form-info-row\">\n <small\n *ngIf=\"\n formGroup.get(formField.name)?.invalid &&\n formGroup.get(formField.name)?.touched\n \"\n class=\"p-error\"\n >\n {{ getErrorMessage() }}\n </small>\n <div class=\"spacer\"></div>\n <div\n *ngIf=\"!formField.disabled && formField.maxLength !== undefined\"\n class=\"character-counter\"\n >\n {{ characterCount }}/{{ formField.maxLength }} characters\n </div>\n </div>\n</div>\n", styles: [".form-field{position:relative;margin-bottom:1rem}.form-field label{display:block;margin-bottom:.5rem;font-weight:700;font-size:1rem}.form-info-row{display:flex;justify-content:space-between;align-items:center;margin-top:.5rem}.spacer{flex-grow:1}.character-counter{font-size:.8rem;color:#888;text-align:right;margin-left:auto}.p-error{font-size:.8rem;color:#f44336}input:focus{outline:none;box-shadow:none;border-color:inherit}\n"] }]
1255
1307
  }], propDecorators: { formGroup: [{
1256
1308
  type: Input
1257
1309
  }], formField: [{
@@ -1298,7 +1350,7 @@ class PTDropdownComponent {
1298
1350
  return '';
1299
1351
  }
1300
1352
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1301
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTDropdownComponent, selector: "pt-dropdown", inputs: { formGroup: "formGroup", formField: "formField" }, ngImport: i0, template: "<div\n [formGroup]=\"formGroup\"\n class=\"form-field\"\n [ngStyle]=\"{ width: formField.width || '100%' }\"\n *ngIf=\"!formField.hidden\"\n>\n <label *ngIf=\"formField.label\">{{ formField.label }}</label>\n <p-dropdown\n [formControlName]=\"formField.name\"\n [options]=\"formField.options\"\n [placeholder]=\"formField.placeholder || 'Select an option'\"\n optionLabel=\"label\"\n ></p-dropdown>\n <div\n *ngIf=\"\n formGroup.get(formField.name)?.invalid &&\n formGroup.get(formField.name)?.touched\n \"\n >\n <small class=\"p-error\">{{ getErrorMessage() }}</small>\n </div>\n</div>\n", styles: [".form-field{margin-bottom:1rem}.form-field label{display:block;margin-bottom:.5rem;font-weight:700}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3$6.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }] }); }
1353
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTDropdownComponent, selector: "pt-dropdown", inputs: { formGroup: "formGroup", formField: "formField" }, ngImport: i0, template: "<div\n [formGroup]=\"formGroup\"\n class=\"form-field\"\n [ngStyle]=\"{ width: formField.width || '100%' }\"\n *ngIf=\"!formField.hidden\"\n>\n <label *ngIf=\"formField.label\">{{ formField.label }}</label>\n <p-dropdown\n [formControlName]=\"formField.name\"\n [options]=\"formField.options\"\n [placeholder]=\"formField.placeholder || 'Select an option'\"\n optionLabel=\"label\"\n ></p-dropdown>\n <div\n *ngIf=\"\n formGroup.get(formField.name)?.invalid &&\n formGroup.get(formField.name)?.touched\n \"\n >\n <small class=\"p-error\">{{ getErrorMessage() }}</small>\n </div>\n</div>\n", styles: [".form-field{margin-bottom:1rem}.form-field label{display:block;margin-bottom:.5rem;font-weight:700}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3$5.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }] }); }
1302
1354
  }
1303
1355
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTDropdownComponent, decorators: [{
1304
1356
  type: Component,
@@ -1450,7 +1502,7 @@ class PTFormBuilderComponent {
1450
1502
  this.form.reset();
1451
1503
  }
1452
1504
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTFormBuilderComponent, deps: [{ token: i2$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
1453
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTFormBuilderComponent, selector: "pt-form-builder", inputs: { mainGroup: "mainGroup", buttons: "buttons", title: "title", titleStyle: "titleStyle", inputWidth: "inputWidth", language: "language" }, outputs: { formSubmit: "formSubmit" }, ngImport: i0, template: "<div *ngIf=\"title\" [ngStyle]=\"titleStyle\" class=\"form-title\">{{ title }}</div>\n<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <ng-container *ngFor=\"let field of mainGroup.fields\">\n <pt-dynamic-form-field\n [field]=\"field\"\n [form]=\"form\"\n [inputWidth]=\"inputWidth\"\n ></pt-dynamic-form-field>\n </ng-container>\n\n <ng-container *ngFor=\"let group of mainGroup.groups\">\n <div class=\"form-field-group\" [ngStyle]=\"{ width: group.width || '100%' }\">\n <ng-container *ngFor=\"let field of group.fields\">\n <pt-dynamic-form-field\n [field]=\"field\"\n [form]=\"form\"\n class=\"flex-item\"\n ></pt-dynamic-form-field>\n </ng-container>\n </div>\n </ng-container>\n\n <div class=\"button-group\">\n <button\n *ngFor=\"let button of buttons\"\n type=\"button\"\n pButton\n [label]=\"button.text\"\n [icon]=\"button.icon || ''\"\n [class]=\"button.color\"\n (click)=\"\n button.isSubmit\n ? onSubmit()\n : button.isClear\n ? onClear()\n : button.action\n ? button.action()\n : null\n \"\n ></button>\n </div>\n</form>\n", styles: [".form-title{text-align:center;margin-bottom:1rem;font-size:1.5rem;font-weight:700}.form-field{margin-bottom:1rem}.form-field label{display:block;margin-bottom:.5rem;font-weight:700}::ng-deep .p-inputtext,::ng-deep .p-inputtextarea,::ng-deep .p-calendar,::ng-deep .p-inputnumber,::ng-deep .p-multiselect,::ng-deep .p-dropdown{width:100%!important}::ng-deep .p-inputnumber,::ng-deep p-inputnumber{display:flex!important}.button-group{display:flex;gap:1rem;margin-top:1rem;justify-content:space-between}.button-group button{flex:1;display:flex;align-items:center;justify-content:center}.button-group button i{margin-right:.5rem}.button-group button.p-button-primary{background-color:#007bff;color:#fff}.button-group button.p-button-secondary{background-color:#6c757d;color:#fff}.button-group button.p-button-success{background-color:#28a745;color:#fff}.button-group button:hover{opacity:.9}.form-field-group{display:flex;gap:1rem}.form-field-group .flex-item{flex:1}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: PTDynamicFormFieldComponent, selector: "pt-dynamic-form-field", inputs: ["field", "form", "inputWidth"] }] }); }
1505
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTFormBuilderComponent, selector: "pt-form-builder", inputs: { mainGroup: "mainGroup", buttons: "buttons", title: "title", titleStyle: "titleStyle", inputWidth: "inputWidth", language: "language" }, outputs: { formSubmit: "formSubmit" }, ngImport: i0, template: "<div *ngIf=\"title\" [ngStyle]=\"titleStyle\" class=\"form-title\">{{ title }}</div>\n<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <ng-container *ngFor=\"let field of mainGroup.fields\">\n <pt-dynamic-form-field\n [field]=\"field\"\n [form]=\"form\"\n [inputWidth]=\"inputWidth\"\n ></pt-dynamic-form-field>\n </ng-container>\n\n <ng-container *ngFor=\"let group of mainGroup.groups\">\n <div class=\"form-field-group\" [ngStyle]=\"{ width: group.width || '100%' }\">\n <ng-container *ngFor=\"let field of group.fields\">\n <pt-dynamic-form-field\n [field]=\"field\"\n [form]=\"form\"\n class=\"flex-item\"\n ></pt-dynamic-form-field>\n </ng-container>\n </div>\n </ng-container>\n\n <div class=\"button-group\">\n <button\n *ngFor=\"let button of buttons\"\n type=\"button\"\n pButton\n [label]=\"button.text\"\n [icon]=\"button.icon || ''\"\n [class]=\"button.color\"\n (click)=\"\n button.isSubmit\n ? onSubmit()\n : button.isClear\n ? onClear()\n : button.action\n ? button.action()\n : null\n \"\n ></button>\n </div>\n</form>\n", styles: [".form-title{text-align:center;margin-bottom:1rem;font-size:1.5rem;font-weight:700}.form-field{margin-bottom:1rem}.form-field label{display:block;margin-bottom:.5rem;font-weight:700}::ng-deep .p-inputtext,::ng-deep .p-inputtextarea,::ng-deep .p-calendar,::ng-deep .p-inputnumber,::ng-deep .p-multiselect,::ng-deep .p-dropdown{width:100%!important}::ng-deep .p-inputnumber,::ng-deep p-inputnumber{display:flex!important}.button-group{display:flex;gap:1rem;margin-top:1rem;justify-content:space-between}.button-group button{flex:1;display:flex;align-items:center;justify-content:center}.button-group button i{margin-right:.5rem}.button-group button.p-button-primary{background-color:#007bff;color:#fff}.button-group button.p-button-secondary{background-color:#6c757d;color:#fff}.button-group button.p-button-success{background-color:#28a745;color:#fff}.button-group button:hover{opacity:.9}.form-field-group{display:flex;gap:1rem}.form-field-group .flex-item{flex:1}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: PTDynamicFormFieldComponent, selector: "pt-dynamic-form-field", inputs: ["field", "form", "inputWidth"] }] }); }
1454
1506
  }
1455
1507
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTFormBuilderComponent, decorators: [{
1456
1508
  type: Component,
@@ -1702,6 +1754,1532 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
1702
1754
  }]
1703
1755
  }] });
1704
1756
 
1757
+ class PTMetricCardComponent {
1758
+ static { this.DEFAULT_ICON_COLOR = '#5a67d8'; }
1759
+ static { this.DEFAULT_ICON_SIZE = '24px'; }
1760
+ static { this.DEFAULT_TITLE_COLOR = '#5a67d8'; }
1761
+ static { this.DEFAULT_TITLE_SIZE = '16px'; }
1762
+ static { this.DEFAULT_VALUE_COLOR = '#2d3748'; }
1763
+ static { this.DEFAULT_VALUE_SIZE = '32px'; }
1764
+ static { this.DEFAULT_LABEL_COLOR = '#718096'; }
1765
+ static { this.DEFAULT_LABEL_SIZE = '14px'; }
1766
+ static { this.DEFAULT_ADDITIONAL_INFO_COLOR = 'gray'; }
1767
+ static { this.DEFAULT_ADDITIONAL_INFO_SIZE = '14px'; }
1768
+ static { this.DEFAULT_BACKGROUND_COLOR = '#fff'; }
1769
+ isIconObject() {
1770
+ return typeof this.cardData.icon === 'object';
1771
+ }
1772
+ isTitleObject() {
1773
+ return typeof this.cardData.title === 'object';
1774
+ }
1775
+ isValueObject() {
1776
+ return typeof this.cardData.value === 'object';
1777
+ }
1778
+ isLabelObject(label) {
1779
+ return typeof label === 'object';
1780
+ }
1781
+ isAdditionalInfoObject() {
1782
+ return typeof this.cardData.additionalInfo === 'object';
1783
+ }
1784
+ getIconText() {
1785
+ return this.isIconObject()
1786
+ ? this.cardData.icon.code
1787
+ : this.cardData.icon;
1788
+ }
1789
+ getTitleText() {
1790
+ return this.isTitleObject()
1791
+ ? this.cardData.title.text
1792
+ : this.cardData.title;
1793
+ }
1794
+ getValueText() {
1795
+ return this.isValueObject()
1796
+ ? this.cardData.value.text
1797
+ : this.cardData.value;
1798
+ }
1799
+ getLabelText() {
1800
+ const label = this.cardData.value?.label;
1801
+ return this.isLabelObject(label)
1802
+ ? label.text
1803
+ : label;
1804
+ }
1805
+ getAdditionalInfoText() {
1806
+ return this.isAdditionalInfoObject()
1807
+ ? this.cardData.additionalInfo.text
1808
+ : this.cardData.additionalInfo;
1809
+ }
1810
+ getIconStyles() {
1811
+ if (this.isIconObject()) {
1812
+ const icon = this.cardData.icon;
1813
+ return {
1814
+ color: icon.color || PTMetricCardComponent.DEFAULT_ICON_COLOR,
1815
+ fontSize: icon.fontSize || PTMetricCardComponent.DEFAULT_ICON_SIZE,
1816
+ };
1817
+ }
1818
+ return {};
1819
+ }
1820
+ getTitleStyles() {
1821
+ if (this.isTitleObject()) {
1822
+ const title = this.cardData.title;
1823
+ return {
1824
+ color: title.color || PTMetricCardComponent.DEFAULT_TITLE_COLOR,
1825
+ fontSize: title.fontSize || PTMetricCardComponent.DEFAULT_TITLE_SIZE,
1826
+ };
1827
+ }
1828
+ return {};
1829
+ }
1830
+ getValueStyles() {
1831
+ if (this.isValueObject()) {
1832
+ const value = this.cardData.value;
1833
+ return {
1834
+ color: value.color || PTMetricCardComponent.DEFAULT_VALUE_COLOR,
1835
+ fontSize: value.fontSize || PTMetricCardComponent.DEFAULT_VALUE_SIZE,
1836
+ };
1837
+ }
1838
+ else {
1839
+ return {
1840
+ color: PTMetricCardComponent.DEFAULT_VALUE_COLOR,
1841
+ fontSize: PTMetricCardComponent.DEFAULT_VALUE_SIZE,
1842
+ };
1843
+ }
1844
+ }
1845
+ getLabelStyles(position) {
1846
+ const label = this.cardData.value?.label;
1847
+ if (this.isLabelObject(label) &&
1848
+ label.position === position) {
1849
+ return {
1850
+ color: label.color ||
1851
+ PTMetricCardComponent.DEFAULT_LABEL_COLOR,
1852
+ fontSize: label.fontSize ||
1853
+ PTMetricCardComponent.DEFAULT_LABEL_SIZE,
1854
+ };
1855
+ }
1856
+ else {
1857
+ return {
1858
+ color: PTMetricCardComponent.DEFAULT_LABEL_COLOR,
1859
+ fontSize: PTMetricCardComponent.DEFAULT_LABEL_SIZE,
1860
+ };
1861
+ }
1862
+ }
1863
+ getAdditionalInfoStyles() {
1864
+ if (this.isAdditionalInfoObject()) {
1865
+ const additionalInfo = this.cardData.additionalInfo;
1866
+ return {
1867
+ color: additionalInfo.color ||
1868
+ PTMetricCardComponent.DEFAULT_ADDITIONAL_INFO_COLOR,
1869
+ fontSize: additionalInfo.fontSize ||
1870
+ PTMetricCardComponent.DEFAULT_ADDITIONAL_INFO_SIZE,
1871
+ };
1872
+ }
1873
+ else {
1874
+ return {
1875
+ color: PTMetricCardComponent.DEFAULT_ADDITIONAL_INFO_COLOR,
1876
+ fontSize: PTMetricCardComponent.DEFAULT_ADDITIONAL_INFO_SIZE,
1877
+ };
1878
+ }
1879
+ }
1880
+ isLabelOnLeft() {
1881
+ const label = this.cardData.value?.label;
1882
+ return (this.isLabelObject(label) && label.position === 'left');
1883
+ }
1884
+ isLabelOnRight() {
1885
+ const label = this.cardData.value?.label;
1886
+ return (this.isLabelObject(label) && label.position === 'right');
1887
+ }
1888
+ getBackgroundStyle() {
1889
+ return {
1890
+ 'background-color': this.cardData.appearance?.backgroundColor ||
1891
+ PTMetricCardComponent.DEFAULT_BACKGROUND_COLOR,
1892
+ };
1893
+ }
1894
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMetricCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1895
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTMetricCardComponent, selector: "pt-metric-card", inputs: { cardData: "cardData" }, ngImport: i0, template: "<div\n class=\"metric-card-container\"\n [ngStyle]=\"{\n 'min-width': cardData.size?.minWidth || '100%',\n 'max-width': cardData.size?.maxWidth || 'calc(25% - 16px)',\n width: cardData.size?.fixedWidth || 'auto'\n }\"\n>\n <div\n *ngIf=\"cardData.verticalLine?.show\"\n class=\"vertical-line\"\n [ngStyle]=\"{\n 'background-color': cardData.verticalLine?.color || '#5a67d8'\n }\"\n ></div>\n\n <div class=\"metric-card\" [ngStyle]=\"getBackgroundStyle()\">\n <div class=\"metric-card-header\">\n <i\n *ngIf=\"isIconObject()\"\n [ngClass]=\"getIconText()\"\n [ngStyle]=\"getIconStyles()\"\n ></i>\n <i *ngIf=\"!isIconObject()\" [ngClass]=\"cardData.icon\"></i>\n\n <span\n *ngIf=\"isTitleObject()\"\n class=\"metric-card-header-text\"\n [ngStyle]=\"getTitleStyles()\"\n >\n {{ getTitleText() }}\n </span>\n <span *ngIf=\"!isTitleObject()\" class=\"metric-card-header-text\">\n {{ cardData.title }}\n </span>\n </div>\n\n <div class=\"metric-card-content\">\n <div class=\"metric-value\" [ngStyle]=\"getValueStyles()\">\n <span\n *ngIf=\"isLabelOnLeft()\"\n class=\"value-label\"\n [ngStyle]=\"getLabelStyles('left')\"\n >\n {{ getLabelText() }}\n </span>\n\n <span [ngStyle]=\"getValueStyles()\">{{ getValueText() }}</span>\n\n <span\n *ngIf=\"isLabelOnRight()\"\n class=\"value-label\"\n [ngStyle]=\"getLabelStyles('right')\"\n >\n {{ getLabelText() }}\n </span>\n </div>\n\n <div\n *ngIf=\"cardData.divider?.show\"\n class=\"metric-divider\"\n [ngStyle]=\"{ backgroundColor: cardData.divider?.color || '#e2e8f0' }\"\n ></div>\n\n <div\n *ngIf=\"isAdditionalInfoObject()\"\n class=\"metric-additional-info\"\n [ngStyle]=\"getAdditionalInfoStyles()\"\n >\n {{ getAdditionalInfoText() }}\n </div>\n <div\n *ngIf=\"!isAdditionalInfoObject()\"\n class=\"metric-additional-info\"\n [ngStyle]=\"getAdditionalInfoStyles()\"\n >\n {{ cardData.additionalInfo }}\n </div>\n </div>\n </div>\n</div>\n", styles: [".metric-card-container{display:flex;align-items:stretch;box-sizing:border-box}.vertical-line{width:4px;border-radius:8px 0 0 8px;margin-right:-4px;z-index:2}.metric-card{background-color:#fff;border-radius:5px;box-shadow:0 1px 3px #0000001a;padding:16px;display:flex;flex-direction:column;box-sizing:border-box;margin-left:0}.metric-card-header{display:flex;align-items:center;margin-bottom:16px}.metric-card-header i.icon-text{margin-right:8px}.metric-card-content{display:flex;flex-direction:column;justify-content:space-between}.metric-number{font-weight:700}.metric-label{margin-left:8px}.metric-divider{width:100%;height:1px;margin:16px 0}.metric-additional-info{margin-top:8px}.metric-card-header-text{margin-left:6px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
1896
+ }
1897
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMetricCardComponent, decorators: [{
1898
+ type: Component,
1899
+ args: [{ selector: 'pt-metric-card', template: "<div\n class=\"metric-card-container\"\n [ngStyle]=\"{\n 'min-width': cardData.size?.minWidth || '100%',\n 'max-width': cardData.size?.maxWidth || 'calc(25% - 16px)',\n width: cardData.size?.fixedWidth || 'auto'\n }\"\n>\n <div\n *ngIf=\"cardData.verticalLine?.show\"\n class=\"vertical-line\"\n [ngStyle]=\"{\n 'background-color': cardData.verticalLine?.color || '#5a67d8'\n }\"\n ></div>\n\n <div class=\"metric-card\" [ngStyle]=\"getBackgroundStyle()\">\n <div class=\"metric-card-header\">\n <i\n *ngIf=\"isIconObject()\"\n [ngClass]=\"getIconText()\"\n [ngStyle]=\"getIconStyles()\"\n ></i>\n <i *ngIf=\"!isIconObject()\" [ngClass]=\"cardData.icon\"></i>\n\n <span\n *ngIf=\"isTitleObject()\"\n class=\"metric-card-header-text\"\n [ngStyle]=\"getTitleStyles()\"\n >\n {{ getTitleText() }}\n </span>\n <span *ngIf=\"!isTitleObject()\" class=\"metric-card-header-text\">\n {{ cardData.title }}\n </span>\n </div>\n\n <div class=\"metric-card-content\">\n <div class=\"metric-value\" [ngStyle]=\"getValueStyles()\">\n <span\n *ngIf=\"isLabelOnLeft()\"\n class=\"value-label\"\n [ngStyle]=\"getLabelStyles('left')\"\n >\n {{ getLabelText() }}\n </span>\n\n <span [ngStyle]=\"getValueStyles()\">{{ getValueText() }}</span>\n\n <span\n *ngIf=\"isLabelOnRight()\"\n class=\"value-label\"\n [ngStyle]=\"getLabelStyles('right')\"\n >\n {{ getLabelText() }}\n </span>\n </div>\n\n <div\n *ngIf=\"cardData.divider?.show\"\n class=\"metric-divider\"\n [ngStyle]=\"{ backgroundColor: cardData.divider?.color || '#e2e8f0' }\"\n ></div>\n\n <div\n *ngIf=\"isAdditionalInfoObject()\"\n class=\"metric-additional-info\"\n [ngStyle]=\"getAdditionalInfoStyles()\"\n >\n {{ getAdditionalInfoText() }}\n </div>\n <div\n *ngIf=\"!isAdditionalInfoObject()\"\n class=\"metric-additional-info\"\n [ngStyle]=\"getAdditionalInfoStyles()\"\n >\n {{ cardData.additionalInfo }}\n </div>\n </div>\n </div>\n</div>\n", styles: [".metric-card-container{display:flex;align-items:stretch;box-sizing:border-box}.vertical-line{width:4px;border-radius:8px 0 0 8px;margin-right:-4px;z-index:2}.metric-card{background-color:#fff;border-radius:5px;box-shadow:0 1px 3px #0000001a;padding:16px;display:flex;flex-direction:column;box-sizing:border-box;margin-left:0}.metric-card-header{display:flex;align-items:center;margin-bottom:16px}.metric-card-header i.icon-text{margin-right:8px}.metric-card-content{display:flex;flex-direction:column;justify-content:space-between}.metric-number{font-weight:700}.metric-label{margin-left:8px}.metric-divider{width:100%;height:1px;margin:16px 0}.metric-additional-info{margin-top:8px}.metric-card-header-text{margin-left:6px}\n"] }]
1900
+ }], propDecorators: { cardData: [{
1901
+ type: Input
1902
+ }] } });
1903
+
1904
+ class PTMetricCardModule {
1905
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMetricCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1906
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.11", ngImport: i0, type: PTMetricCardModule, declarations: [PTMetricCardComponent], imports: [CommonModule], exports: [PTMetricCardComponent] }); }
1907
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMetricCardModule, imports: [CommonModule] }); }
1908
+ }
1909
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMetricCardModule, decorators: [{
1910
+ type: NgModule,
1911
+ args: [{
1912
+ declarations: [PTMetricCardComponent],
1913
+ imports: [CommonModule],
1914
+ exports: [PTMetricCardComponent],
1915
+ }]
1916
+ }] });
1917
+
1918
+ class PTMetricCardGroupComponent {
1919
+ constructor() {
1920
+ this.cardsData = [];
1921
+ }
1922
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMetricCardGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1923
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTMetricCardGroupComponent, selector: "pt-metric-card-group", inputs: { cardsData: "cardsData" }, ngImport: i0, template: "<div class=\"metric-card-group\">\n <pt-metric-card\n *ngFor=\"let card of cardsData\"\n [cardData]=\"card\"\n ></pt-metric-card>\n</div>\n", styles: [".metric-card-group{display:flex;gap:16px;flex-wrap:wrap;width:100%}.metric-card{flex:0 1 auto;max-width:250px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: PTMetricCardComponent, selector: "pt-metric-card", inputs: ["cardData"] }] }); }
1924
+ }
1925
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMetricCardGroupComponent, decorators: [{
1926
+ type: Component,
1927
+ args: [{ selector: 'pt-metric-card-group', template: "<div class=\"metric-card-group\">\n <pt-metric-card\n *ngFor=\"let card of cardsData\"\n [cardData]=\"card\"\n ></pt-metric-card>\n</div>\n", styles: [".metric-card-group{display:flex;gap:16px;flex-wrap:wrap;width:100%}.metric-card{flex:0 1 auto;max-width:250px}\n"] }]
1928
+ }], propDecorators: { cardsData: [{
1929
+ type: Input
1930
+ }] } });
1931
+
1932
+ class PTMetricCardGroupModule {
1933
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMetricCardGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1934
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.11", ngImport: i0, type: PTMetricCardGroupModule, declarations: [PTMetricCardGroupComponent], imports: [CommonModule, PTMetricCardModule], exports: [PTMetricCardGroupComponent] }); }
1935
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMetricCardGroupModule, imports: [CommonModule, PTMetricCardModule] }); }
1936
+ }
1937
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMetricCardGroupModule, decorators: [{
1938
+ type: NgModule,
1939
+ args: [{
1940
+ declarations: [PTMetricCardGroupComponent],
1941
+ imports: [CommonModule, PTMetricCardModule],
1942
+ exports: [PTMetricCardGroupComponent],
1943
+ }]
1944
+ }] });
1945
+
1946
+ class PTChartComponent {
1947
+ constructor() {
1948
+ Chart.register(...registerables, ChartDataLabels);
1949
+ }
1950
+ ngOnInit() {
1951
+ this.initializeChart();
1952
+ }
1953
+ ngOnDestroy() {
1954
+ if (this.chart) {
1955
+ this.chart.destroy();
1956
+ }
1957
+ }
1958
+ initializeChart() {
1959
+ const canvas = document.querySelector('canvas');
1960
+ const config = {
1961
+ type: this.chartConfig.type,
1962
+ data: this.chartConfig.data,
1963
+ options: {
1964
+ ...this.chartConfig.options,
1965
+ plugins: {
1966
+ datalabels: {
1967
+ formatter: (value, context) => {
1968
+ const data = context.chart.data.datasets[0].data;
1969
+ const total = data.reduce((sum, val) => sum + val, 0);
1970
+ const percentage = ((value / total) * 100).toFixed(1) + '%';
1971
+ return percentage;
1972
+ },
1973
+ color: '#000', // Color of the percentage text
1974
+ font: {
1975
+ weight: 'bold',
1976
+ },
1977
+ },
1978
+ ...this.chartConfig.options?.plugins,
1979
+ },
1980
+ },
1981
+ };
1982
+ this.chart = new Chart(canvas, config);
1983
+ }
1984
+ updateChart() {
1985
+ if (this.chart) {
1986
+ this.chart.data = this.chartConfig.data;
1987
+ if (this.chartConfig.options) {
1988
+ this.chart.options = this.chartConfig.options;
1989
+ }
1990
+ this.chart.update();
1991
+ }
1992
+ }
1993
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1994
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTChartComponent, selector: "pt-chart", inputs: { chartConfig: "chartConfig" }, ngImport: i0, template: "<div style=\"position: relative; height: 100%; width: 100%\">\n <canvas></canvas>\n</div>\n", styles: [""] }); }
1995
+ }
1996
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTChartComponent, decorators: [{
1997
+ type: Component,
1998
+ args: [{ selector: 'pt-chart', template: "<div style=\"position: relative; height: 100%; width: 100%\">\n <canvas></canvas>\n</div>\n" }]
1999
+ }], ctorParameters: () => [], propDecorators: { chartConfig: [{
2000
+ type: Input
2001
+ }] } });
2002
+
2003
+ class PTChartModule {
2004
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTChartModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2005
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.11", ngImport: i0, type: PTChartModule, declarations: [PTChartComponent], imports: [CommonModule], exports: [PTChartComponent] }); }
2006
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTChartModule, imports: [CommonModule] }); }
2007
+ }
2008
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTChartModule, decorators: [{
2009
+ type: NgModule,
2010
+ args: [{
2011
+ declarations: [PTChartComponent],
2012
+ imports: [CommonModule],
2013
+ exports: [PTChartComponent],
2014
+ }]
2015
+ }] });
2016
+
2017
+ class PTMenuComponent {
2018
+ constructor() {
2019
+ this.config = {
2020
+ icon: { code: 'pi pi-ellipsis-v', color: '#000', fontSize: '15px' },
2021
+ menuDirection: 'right',
2022
+ };
2023
+ this.isOpen = false;
2024
+ }
2025
+ static { this.DEFAULT_TEXT_COLOR = '#000'; }
2026
+ static { this.DEFAULT_TEXT_FONT_SIZE = '15px'; }
2027
+ static { this.DEFAULT_ICON_COLOR = '#000'; }
2028
+ static { this.DEFAULT_ICON_FONT_SIZE = '15px'; }
2029
+ static { this.DEFAULT_ICON_CODE = 'pi pi-ellipsis-v'; }
2030
+ static { this.openMenuInstance = null; }
2031
+ toggleMenu() {
2032
+ if (PTMenuComponent.openMenuInstance &&
2033
+ PTMenuComponent.openMenuInstance !== this) {
2034
+ PTMenuComponent.openMenuInstance.closeMenu();
2035
+ }
2036
+ this.isOpen = !this.isOpen;
2037
+ if (this.isOpen) {
2038
+ PTMenuComponent.openMenuInstance = this;
2039
+ }
2040
+ else {
2041
+ PTMenuComponent.openMenuInstance = null;
2042
+ }
2043
+ }
2044
+ closeMenu() {
2045
+ this.isOpen = false;
2046
+ if (PTMenuComponent.openMenuInstance === this) {
2047
+ PTMenuComponent.openMenuInstance = null;
2048
+ }
2049
+ }
2050
+ getMenuItemIconClass(item) {
2051
+ // Assuming that icons starting with "fa" are FontAwesome icons
2052
+ return typeof item.icon === 'string' ? item.icon : item.icon?.code || '';
2053
+ }
2054
+ getMenuItemIconStyles(item) {
2055
+ if (typeof item.icon !== 'string') {
2056
+ return {
2057
+ color: item.icon?.color || PTMenuComponent.DEFAULT_ICON_COLOR,
2058
+ fontSize: item.icon?.fontSize || PTMenuComponent.DEFAULT_ICON_FONT_SIZE,
2059
+ };
2060
+ }
2061
+ return {
2062
+ color: PTMenuComponent.DEFAULT_ICON_COLOR,
2063
+ fontSize: PTMenuComponent.DEFAULT_ICON_FONT_SIZE,
2064
+ };
2065
+ }
2066
+ getIconClass() {
2067
+ return this.config.icon?.code || PTMenuComponent.DEFAULT_ICON_CODE;
2068
+ }
2069
+ getIconStyles() {
2070
+ return {
2071
+ color: this.config.color ||
2072
+ this.config.icon?.color ||
2073
+ PTMenuComponent.DEFAULT_ICON_COLOR,
2074
+ fontSize: this.config.fontSize ||
2075
+ this.config.icon?.fontSize ||
2076
+ PTMenuComponent.DEFAULT_ICON_FONT_SIZE,
2077
+ };
2078
+ }
2079
+ getTextStyles(item) {
2080
+ return {
2081
+ color: item.color || PTMenuComponent.DEFAULT_TEXT_COLOR,
2082
+ fontSize: item.fontSize || PTMenuComponent.DEFAULT_TEXT_FONT_SIZE,
2083
+ };
2084
+ }
2085
+ onDocumentClick(event) {
2086
+ const clickedInside = event.target.closest('.pt-menu');
2087
+ if (!clickedInside) {
2088
+ this.closeMenu();
2089
+ }
2090
+ }
2091
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2092
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTMenuComponent, selector: "pt-menu", inputs: { config: "config" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, ngImport: i0, template: "<div\n [ngClass]=\"{\n open: isOpen,\n 'menu-left': config.menuDirection === 'left',\n 'menu-right': config.menuDirection === 'right'\n }\"\n class=\"pt-menu\"\n>\n <i\n class=\"menu-icon\"\n (click)=\"toggleMenu()\"\n [ngClass]=\"getIconClass()\"\n [ngStyle]=\"getIconStyles()\"\n ></i>\n <div class=\"menu-dropdown\" *ngIf=\"isOpen\">\n <div\n class=\"menu-item\"\n *ngFor=\"let item of config.menuItems\"\n (click)=\"item.action()\"\n >\n <i\n [ngClass]=\"getMenuItemIconClass(item)\"\n [ngStyle]=\"getMenuItemIconStyles(item)\"\n ></i>\n <span [ngStyle]=\"getTextStyles(item)\">{{ item.text }}</span>\n </div>\n </div>\n</div>\n", styles: [".pt-menu{position:relative;display:inline-block}.pt-menu .menu-icon{font-style:normal;font-weight:400;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;padding:8px;transition:background-color .2s,box-shadow .2s}.pt-menu .menu-icon:hover{background-color:#5959591a;box-shadow:0 0 0 1px #5959591a}.pt-menu .menu-dropdown{display:none;position:absolute;background-color:#fff;box-shadow:0 8px 16px #0003;min-width:160px;z-index:1;border-radius:5px;overflow:hidden}.pt-menu .menu-item{padding:8px 16px;cursor:pointer;display:flex;align-items:center}.pt-menu .menu-item i{margin-right:10px}.pt-menu .menu-item:hover{background-color:#f1f1f1}.pt-menu.open .menu-dropdown{display:block}.pt-menu.menu-left .menu-dropdown{right:0;left:auto}.pt-menu.menu-right .menu-dropdown{left:0;right:auto}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
2093
+ }
2094
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMenuComponent, decorators: [{
2095
+ type: Component,
2096
+ args: [{ selector: 'pt-menu', template: "<div\n [ngClass]=\"{\n open: isOpen,\n 'menu-left': config.menuDirection === 'left',\n 'menu-right': config.menuDirection === 'right'\n }\"\n class=\"pt-menu\"\n>\n <i\n class=\"menu-icon\"\n (click)=\"toggleMenu()\"\n [ngClass]=\"getIconClass()\"\n [ngStyle]=\"getIconStyles()\"\n ></i>\n <div class=\"menu-dropdown\" *ngIf=\"isOpen\">\n <div\n class=\"menu-item\"\n *ngFor=\"let item of config.menuItems\"\n (click)=\"item.action()\"\n >\n <i\n [ngClass]=\"getMenuItemIconClass(item)\"\n [ngStyle]=\"getMenuItemIconStyles(item)\"\n ></i>\n <span [ngStyle]=\"getTextStyles(item)\">{{ item.text }}</span>\n </div>\n </div>\n</div>\n", styles: [".pt-menu{position:relative;display:inline-block}.pt-menu .menu-icon{font-style:normal;font-weight:400;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;padding:8px;transition:background-color .2s,box-shadow .2s}.pt-menu .menu-icon:hover{background-color:#5959591a;box-shadow:0 0 0 1px #5959591a}.pt-menu .menu-dropdown{display:none;position:absolute;background-color:#fff;box-shadow:0 8px 16px #0003;min-width:160px;z-index:1;border-radius:5px;overflow:hidden}.pt-menu .menu-item{padding:8px 16px;cursor:pointer;display:flex;align-items:center}.pt-menu .menu-item i{margin-right:10px}.pt-menu .menu-item:hover{background-color:#f1f1f1}.pt-menu.open .menu-dropdown{display:block}.pt-menu.menu-left .menu-dropdown{right:0;left:auto}.pt-menu.menu-right .menu-dropdown{left:0;right:auto}\n"] }]
2097
+ }], propDecorators: { config: [{
2098
+ type: Input
2099
+ }], onDocumentClick: [{
2100
+ type: HostListener,
2101
+ args: ['document:click', ['$event']]
2102
+ }] } });
2103
+
2104
+ class PTCardComponent {
2105
+ constructor() {
2106
+ this.config = {};
2107
+ }
2108
+ // Default values as readonly variables
2109
+ static { this.DEFAULT_TITLE_COLOR = '#333'; }
2110
+ static { this.DEFAULT_TITLE_FONT_SIZE = '1.5em'; }
2111
+ static { this.DEFAULT_ICON_COLOR = '#333'; }
2112
+ static { this.DEFAULT_ICON_FONT_SIZE = '1em'; }
2113
+ static { this.DEFAULT_ICON_POSITION = 'left'; }
2114
+ static { this.DEFAULT_BACKGROUND_COLOR = '#fff'; }
2115
+ static { this.DEFAULT_WIDTH = '100%'; }
2116
+ static { this.DEFAULT_HEIGHT = 'auto'; }
2117
+ static { this.DEFAULT_TITLE_POSITION = 'left'; }
2118
+ static { this.DEFAULT_MENU_POSITION = 'right'; }
2119
+ static { this.DEFAULT_BORDER_COLOR = '#ddd'; }
2120
+ static { this.DEFAULT_BORDER_WIDTH = '1px'; }
2121
+ static { this.DEFAULT_TRANSPARENCY = '100'; }
2122
+ static { this.DEFAULT_PADDING = '16px'; }
2123
+ static { this.DEFAULT_MARGIN = '16px 0'; }
2124
+ isTitleObject() {
2125
+ return typeof this.config.title === 'object';
2126
+ }
2127
+ hasTitle() {
2128
+ return this.config.title !== undefined && this.config.title !== null;
2129
+ }
2130
+ getTitleText() {
2131
+ return this.isTitleObject()
2132
+ ? this.config.title.text
2133
+ : this.config.title;
2134
+ }
2135
+ getTitleStyles() {
2136
+ const title = this.config.title;
2137
+ const alignMap = {
2138
+ left: 'flex-start',
2139
+ center: 'center',
2140
+ right: 'flex-end',
2141
+ };
2142
+ return {
2143
+ color: title?.color || PTCardComponent.DEFAULT_TITLE_COLOR,
2144
+ fontSize: title?.fontSize || PTCardComponent.DEFAULT_TITLE_FONT_SIZE,
2145
+ '--text-align': alignMap[title?.position || PTCardComponent.DEFAULT_TITLE_POSITION],
2146
+ };
2147
+ }
2148
+ getIconClass() {
2149
+ const icon = this.config.title?.icon;
2150
+ return typeof icon === 'string' ? icon : icon?.code || null;
2151
+ }
2152
+ getIconStyles() {
2153
+ const icon = this.config.title?.icon;
2154
+ if (typeof icon !== 'string') {
2155
+ return {
2156
+ color: icon?.color || PTCardComponent.DEFAULT_ICON_COLOR,
2157
+ fontSize: icon?.fontSize || PTCardComponent.DEFAULT_ICON_FONT_SIZE,
2158
+ };
2159
+ }
2160
+ return {
2161
+ color: PTCardComponent.DEFAULT_ICON_COLOR,
2162
+ fontSize: PTCardComponent.DEFAULT_ICON_FONT_SIZE,
2163
+ };
2164
+ }
2165
+ getIconPosition() {
2166
+ const icon = this.config.title?.icon;
2167
+ if (typeof icon !== 'string' && icon?.position) {
2168
+ return icon.position;
2169
+ }
2170
+ return PTCardComponent.DEFAULT_ICON_POSITION;
2171
+ }
2172
+ getMenuPosition() {
2173
+ return this.config.menuPosition || PTCardComponent.DEFAULT_MENU_POSITION;
2174
+ }
2175
+ getCardStyles() {
2176
+ const transparency = this.config.pattern?.transparencyPercentage ||
2177
+ PTCardComponent.DEFAULT_TRANSPARENCY;
2178
+ const backgroundImage = this.config.pattern
2179
+ ? `linear-gradient(rgba(255, 255, 255, ${1 - parseFloat(transparency) / 100}), rgba(255, 255, 255, ${1 - parseFloat(transparency) / 100})), url(${this.config.pattern.imageUrl})`
2180
+ : '';
2181
+ // Apply border conditionally based on noBorder property
2182
+ const borderStyle = this.config.noBorder
2183
+ ? 'none'
2184
+ : `solid ${this.config.borderWidth || PTCardComponent.DEFAULT_BORDER_WIDTH} ${this.config.borderColor || PTCardComponent.DEFAULT_BORDER_COLOR}`;
2185
+ return {
2186
+ backgroundColor: this.config.backgroundColor || PTCardComponent.DEFAULT_BACKGROUND_COLOR,
2187
+ backgroundImage: backgroundImage,
2188
+ backgroundSize: 'cover',
2189
+ backgroundPosition: 'center',
2190
+ width: this.config.width || PTCardComponent.DEFAULT_WIDTH,
2191
+ height: this.config.height || PTCardComponent.DEFAULT_HEIGHT,
2192
+ border: borderStyle,
2193
+ padding: this.config.padding || PTCardComponent.DEFAULT_PADDING,
2194
+ margin: this.config.margin || PTCardComponent.DEFAULT_MARGIN,
2195
+ borderRadius: this.config.borderRadius || '8px',
2196
+ boxShadow: this.config.boxShadow || '0 2px 4px rgba(0, 0, 0, 0.1)',
2197
+ };
2198
+ }
2199
+ isScrollableHorizontal() {
2200
+ return !!this.config.scrollableHorizontal;
2201
+ }
2202
+ isScrollableVertical() {
2203
+ return !!this.config.scrollableVertical;
2204
+ }
2205
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2206
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTCardComponent, selector: "pt-card", inputs: { config: "config" }, ngImport: i0, template: "<div class=\"pt-card card\" [ngStyle]=\"getCardStyles()\">\n <div *ngIf=\"hasTitle()\" class=\"card-header\" [ngStyle]=\"getTitleStyles()\">\n <i\n *ngIf=\"getIconClass() && getIconPosition() === 'left'\"\n [ngClass]=\"getIconClass()\"\n [ngStyle]=\"getIconStyles()\"\n class=\"card-header-icon-left\"\n ></i>\n <span>{{ getTitleText() }}</span>\n <i\n *ngIf=\"getIconClass() && getIconPosition() === 'right'\"\n [ngClass]=\"getIconClass()\"\n [ngStyle]=\"getIconStyles()\"\n class=\"card-header-icon-right\"\n ></i>\n <pt-menu\n *ngIf=\"config.menu\"\n [config]=\"config.menu\"\n [ngClass]=\"{\n 'menu-left': getMenuPosition() === 'left',\n 'menu-right': getMenuPosition() === 'right'\n }\"\n ></pt-menu>\n </div>\n <div\n class=\"card-body\"\n [ngClass]=\"{\n 'card-body-scrollable-vertical': isScrollableVertical(),\n 'card-body-scrollable-horizontal': isScrollableHorizontal()\n }\"\n >\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".pt-card .card{padding:16px;margin:16px 0;display:flex;flex-direction:column;max-height:100vh;overflow:hidden;background-size:cover;background-position:center}.pt-card .card-body{flex-grow:1;max-width:100%}.pt-card .card-body-scrollable-horizontal{overflow-x:auto;padding-bottom:8px}.pt-card .card-body-scrollable-vertical{flex-grow:1;overflow-y:auto;padding-right:8px}.pt-card .card-header{margin-bottom:16px;display:flex;align-items:center;justify-content:var(--text-align, left);position:relative}.pt-card .card-header-icon-left{margin-right:6px}.pt-card .card-header-icon-right{margin-left:6px}.pt-card .menu-left{position:absolute;left:0;top:0}.pt-card .menu-right{position:absolute;right:0;top:-2px}.pt-card .card-menu{margin-left:auto;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: PTMenuComponent, selector: "pt-menu", inputs: ["config"] }] }); }
2207
+ }
2208
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTCardComponent, decorators: [{
2209
+ type: Component,
2210
+ args: [{ selector: 'pt-card', template: "<div class=\"pt-card card\" [ngStyle]=\"getCardStyles()\">\n <div *ngIf=\"hasTitle()\" class=\"card-header\" [ngStyle]=\"getTitleStyles()\">\n <i\n *ngIf=\"getIconClass() && getIconPosition() === 'left'\"\n [ngClass]=\"getIconClass()\"\n [ngStyle]=\"getIconStyles()\"\n class=\"card-header-icon-left\"\n ></i>\n <span>{{ getTitleText() }}</span>\n <i\n *ngIf=\"getIconClass() && getIconPosition() === 'right'\"\n [ngClass]=\"getIconClass()\"\n [ngStyle]=\"getIconStyles()\"\n class=\"card-header-icon-right\"\n ></i>\n <pt-menu\n *ngIf=\"config.menu\"\n [config]=\"config.menu\"\n [ngClass]=\"{\n 'menu-left': getMenuPosition() === 'left',\n 'menu-right': getMenuPosition() === 'right'\n }\"\n ></pt-menu>\n </div>\n <div\n class=\"card-body\"\n [ngClass]=\"{\n 'card-body-scrollable-vertical': isScrollableVertical(),\n 'card-body-scrollable-horizontal': isScrollableHorizontal()\n }\"\n >\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".pt-card .card{padding:16px;margin:16px 0;display:flex;flex-direction:column;max-height:100vh;overflow:hidden;background-size:cover;background-position:center}.pt-card .card-body{flex-grow:1;max-width:100%}.pt-card .card-body-scrollable-horizontal{overflow-x:auto;padding-bottom:8px}.pt-card .card-body-scrollable-vertical{flex-grow:1;overflow-y:auto;padding-right:8px}.pt-card .card-header{margin-bottom:16px;display:flex;align-items:center;justify-content:var(--text-align, left);position:relative}.pt-card .card-header-icon-left{margin-right:6px}.pt-card .card-header-icon-right{margin-left:6px}.pt-card .menu-left{position:absolute;left:0;top:0}.pt-card .menu-right{position:absolute;right:0;top:-2px}.pt-card .card-menu{margin-left:auto;cursor:pointer}\n"] }]
2211
+ }], propDecorators: { config: [{
2212
+ type: Input
2213
+ }] } });
2214
+
2215
+ class PTMenuModule {
2216
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2217
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.11", ngImport: i0, type: PTMenuModule, declarations: [PTMenuComponent], imports: [CommonModule], exports: [PTMenuComponent] }); }
2218
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMenuModule, imports: [CommonModule] }); }
2219
+ }
2220
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMenuModule, decorators: [{
2221
+ type: NgModule,
2222
+ args: [{
2223
+ declarations: [PTMenuComponent],
2224
+ imports: [CommonModule],
2225
+ exports: [PTMenuComponent],
2226
+ }]
2227
+ }] });
2228
+
2229
+ class PTCardModule {
2230
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2231
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.11", ngImport: i0, type: PTCardModule, declarations: [PTCardComponent], imports: [CommonModule, PTMenuModule], exports: [PTCardComponent] }); }
2232
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTCardModule, imports: [CommonModule, PTMenuModule] }); }
2233
+ }
2234
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTCardModule, decorators: [{
2235
+ type: NgModule,
2236
+ args: [{
2237
+ declarations: [PTCardComponent],
2238
+ imports: [CommonModule, PTMenuModule],
2239
+ exports: [PTCardComponent],
2240
+ }]
2241
+ }] });
2242
+
2243
+ class PTMenuFancyComponent {
2244
+ constructor() {
2245
+ this.config = {
2246
+ icon: { code: 'pi pi-ellipsis-v', color: '#000', fontSize: '15px' },
2247
+ menuDirection: 'right',
2248
+ };
2249
+ this.cardMenuConfig = { noBorder: true };
2250
+ this.isOpen = false;
2251
+ }
2252
+ static { this.DEFAULT_TEXT_COLOR = '#000'; }
2253
+ static { this.DEFAULT_TEXT_FONT_SIZE = '15px'; }
2254
+ static { this.DEFAULT_ICON_COLOR = '#000'; }
2255
+ static { this.DEFAULT_ICON_FONT_SIZE = '15px'; }
2256
+ static { this.DEFAULT_ICON_CODE = 'pi pi-ellipsis-v'; }
2257
+ static { this.openMenuInstance = null; }
2258
+ toggleMenu() {
2259
+ if (PTMenuFancyComponent.openMenuInstance &&
2260
+ PTMenuFancyComponent.openMenuInstance !== this) {
2261
+ PTMenuFancyComponent.openMenuInstance.closeMenu();
2262
+ }
2263
+ this.isOpen = !this.isOpen;
2264
+ if (this.isOpen) {
2265
+ PTMenuFancyComponent.openMenuInstance = this;
2266
+ }
2267
+ else {
2268
+ PTMenuFancyComponent.openMenuInstance = null;
2269
+ }
2270
+ }
2271
+ closeMenu() {
2272
+ this.isOpen = false;
2273
+ if (PTMenuFancyComponent.openMenuInstance === this) {
2274
+ PTMenuFancyComponent.openMenuInstance = null;
2275
+ }
2276
+ }
2277
+ getMenuItemIconClass(item) {
2278
+ // Assuming that icons starting with "fa" are FontAwesome icons
2279
+ return typeof item.icon === 'string' ? item.icon : item.icon?.code || '';
2280
+ }
2281
+ getMenuItemIconStyles(item) {
2282
+ if (typeof item.icon !== 'string') {
2283
+ return {
2284
+ color: item.icon?.color || PTMenuFancyComponent.DEFAULT_ICON_COLOR,
2285
+ fontSize: item.icon?.fontSize || PTMenuFancyComponent.DEFAULT_ICON_FONT_SIZE,
2286
+ };
2287
+ }
2288
+ return {
2289
+ color: PTMenuFancyComponent.DEFAULT_ICON_COLOR,
2290
+ fontSize: PTMenuFancyComponent.DEFAULT_ICON_FONT_SIZE,
2291
+ };
2292
+ }
2293
+ getIconClass() {
2294
+ return this.config.icon?.code || PTMenuFancyComponent.DEFAULT_ICON_CODE;
2295
+ }
2296
+ getIconStyles() {
2297
+ return {
2298
+ color: this.config.color ||
2299
+ this.config.icon?.color ||
2300
+ PTMenuFancyComponent.DEFAULT_ICON_COLOR,
2301
+ fontSize: this.config.fontSize ||
2302
+ this.config.icon?.fontSize ||
2303
+ PTMenuFancyComponent.DEFAULT_ICON_FONT_SIZE,
2304
+ };
2305
+ }
2306
+ getTextStyles(item) {
2307
+ return {
2308
+ color: item.color || PTMenuFancyComponent.DEFAULT_TEXT_COLOR,
2309
+ fontSize: item.fontSize || PTMenuFancyComponent.DEFAULT_TEXT_FONT_SIZE,
2310
+ };
2311
+ }
2312
+ onDocumentClick(event) {
2313
+ const clickedInside = event.target.closest('.pt-menu-fancy');
2314
+ if (!clickedInside) {
2315
+ this.closeMenu();
2316
+ }
2317
+ }
2318
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMenuFancyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2319
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTMenuFancyComponent, selector: "pt-menu-fancy", inputs: { config: "config" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, ngImport: i0, template: "<div\n [ngClass]=\"{\n open: isOpen,\n 'menu-left': config.menuDirection === 'left',\n 'menu-right': config.menuDirection === 'right'\n }\"\n class=\"pt-menu-fancy\"\n>\n <i\n class=\"menu-icon\"\n (click)=\"toggleMenu()\"\n [ngClass]=\"getIconClass()\"\n [ngStyle]=\"getIconStyles()\"\n ></i>\n <div class=\"menu-dropdown\" *ngIf=\"isOpen\">\n <pt-card [config]=\"cardMenuConfig\">\n <div\n class=\"menu-item\"\n *ngFor=\"let item of config.menuItems\"\n (click)=\"item.action()\"\n >\n <i\n [ngClass]=\"getMenuItemIconClass(item)\"\n [ngStyle]=\"getMenuItemIconStyles(item)\"\n ></i>\n <span [ngStyle]=\"getTextStyles(item)\">{{ item.text }}</span>\n </div>\n </pt-card>\n </div>\n</div>\n", styles: [".pt-menu-fancy{position:relative;display:inline-block}.pt-menu-fancy .menu-icon{font-style:normal;font-weight:400;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;padding:8px;transition:background-color .2s,box-shadow .2s}.pt-menu-fancy .menu-icon:hover{background-color:#5959591a;box-shadow:0 0 0 1px #5959591a}.pt-menu-fancy .menu-dropdown{position:absolute;top:100%;background-color:#fff;box-shadow:0 8px 16px #0003;min-width:160px;z-index:1;border-radius:5px;overflow:hidden;opacity:0;transform:translateY(-20px);transition:transform .3s ease-out,opacity .3s ease-out}.pt-menu-fancy.open .menu-dropdown{display:block;opacity:1;transform:translateY(0)}.pt-menu-fancy.menu-left .menu-dropdown{right:0;left:auto}.pt-menu-fancy.menu-right .menu-dropdown{left:0;right:auto}.pt-menu-fancy .menu-item{padding:8px 16px;cursor:pointer;display:flex;align-items:center}.pt-menu-fancy .menu-item i{margin-right:10px}.pt-menu-fancy .menu-item:hover{background-color:#f1f1f1}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: PTCardComponent, selector: "pt-card", inputs: ["config"] }] }); }
2320
+ }
2321
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMenuFancyComponent, decorators: [{
2322
+ type: Component,
2323
+ args: [{ selector: 'pt-menu-fancy', template: "<div\n [ngClass]=\"{\n open: isOpen,\n 'menu-left': config.menuDirection === 'left',\n 'menu-right': config.menuDirection === 'right'\n }\"\n class=\"pt-menu-fancy\"\n>\n <i\n class=\"menu-icon\"\n (click)=\"toggleMenu()\"\n [ngClass]=\"getIconClass()\"\n [ngStyle]=\"getIconStyles()\"\n ></i>\n <div class=\"menu-dropdown\" *ngIf=\"isOpen\">\n <pt-card [config]=\"cardMenuConfig\">\n <div\n class=\"menu-item\"\n *ngFor=\"let item of config.menuItems\"\n (click)=\"item.action()\"\n >\n <i\n [ngClass]=\"getMenuItemIconClass(item)\"\n [ngStyle]=\"getMenuItemIconStyles(item)\"\n ></i>\n <span [ngStyle]=\"getTextStyles(item)\">{{ item.text }}</span>\n </div>\n </pt-card>\n </div>\n</div>\n", styles: [".pt-menu-fancy{position:relative;display:inline-block}.pt-menu-fancy .menu-icon{font-style:normal;font-weight:400;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;padding:8px;transition:background-color .2s,box-shadow .2s}.pt-menu-fancy .menu-icon:hover{background-color:#5959591a;box-shadow:0 0 0 1px #5959591a}.pt-menu-fancy .menu-dropdown{position:absolute;top:100%;background-color:#fff;box-shadow:0 8px 16px #0003;min-width:160px;z-index:1;border-radius:5px;overflow:hidden;opacity:0;transform:translateY(-20px);transition:transform .3s ease-out,opacity .3s ease-out}.pt-menu-fancy.open .menu-dropdown{display:block;opacity:1;transform:translateY(0)}.pt-menu-fancy.menu-left .menu-dropdown{right:0;left:auto}.pt-menu-fancy.menu-right .menu-dropdown{left:0;right:auto}.pt-menu-fancy .menu-item{padding:8px 16px;cursor:pointer;display:flex;align-items:center}.pt-menu-fancy .menu-item i{margin-right:10px}.pt-menu-fancy .menu-item:hover{background-color:#f1f1f1}\n"] }]
2324
+ }], propDecorators: { config: [{
2325
+ type: Input
2326
+ }], onDocumentClick: [{
2327
+ type: HostListener,
2328
+ args: ['document:click', ['$event']]
2329
+ }] } });
2330
+
2331
+ class PTNavbarMenuComponent {
2332
+ constructor() {
2333
+ this.navBarMenuConfig = {};
2334
+ this.toggleSidebar = new EventEmitter();
2335
+ }
2336
+ // Default values as readonly variables
2337
+ static { this.DEFAULT_LOGO_URL = ''; }
2338
+ static { this.DEFAULT_LOGO_ALT_TEXT = 'Logo'; }
2339
+ static { this.DEFAULT_LOGO_WIDTH = '40px'; }
2340
+ static { this.DEFAULT_LOGO_HEIGHT = 'auto'; }
2341
+ static { this.DEFAULT_APP_NAME = 'Application'; }
2342
+ static { this.DEFAULT_APP_NAME_COLOR = '#000'; }
2343
+ static { this.DEFAULT_APP_NAME_FONT_SIZE = '24px'; }
2344
+ static { this.DEFAULT_TRANSPARENCY = '100'; }
2345
+ static { this.DEFAULT_ICON_COLOR = '#333'; }
2346
+ isImageStyle(object) {
2347
+ return typeof object === 'object' && 'imageUrl' in object;
2348
+ }
2349
+ isTextStyle(object) {
2350
+ return typeof object === 'object' && 'text' in object;
2351
+ }
2352
+ getLogoUrl() {
2353
+ return this.isImageStyle(this.navBarMenuConfig.logo)
2354
+ ? this.navBarMenuConfig.logo.imageUrl
2355
+ : PTNavbarMenuComponent.DEFAULT_LOGO_URL;
2356
+ }
2357
+ getLogoAltText() {
2358
+ return this.isImageStyle(this.navBarMenuConfig.logo)
2359
+ ? this.navBarMenuConfig.logo.altText ||
2360
+ PTNavbarMenuComponent.DEFAULT_LOGO_ALT_TEXT
2361
+ : PTNavbarMenuComponent.DEFAULT_LOGO_ALT_TEXT;
2362
+ }
2363
+ getLogoStyles() {
2364
+ if (this.isImageStyle(this.navBarMenuConfig.logo)) {
2365
+ return {
2366
+ color: this.navBarMenuConfig.logo.color ||
2367
+ PTNavbarMenuComponent.DEFAULT_ICON_COLOR,
2368
+ width: this.navBarMenuConfig.logo.width ||
2369
+ PTNavbarMenuComponent.DEFAULT_LOGO_WIDTH,
2370
+ height: this.navBarMenuConfig.logo.height ||
2371
+ PTNavbarMenuComponent.DEFAULT_LOGO_HEIGHT,
2372
+ };
2373
+ }
2374
+ return {};
2375
+ }
2376
+ getAppName() {
2377
+ return this.isTextStyle(this.navBarMenuConfig.appName)
2378
+ ? this.navBarMenuConfig.appName.text
2379
+ : PTNavbarMenuComponent.DEFAULT_APP_NAME;
2380
+ }
2381
+ getAppNameStyles() {
2382
+ if (this.isTextStyle(this.navBarMenuConfig.appName)) {
2383
+ return {
2384
+ color: this.navBarMenuConfig.appName.color ||
2385
+ PTNavbarMenuComponent.DEFAULT_APP_NAME_COLOR,
2386
+ fontSize: this.navBarMenuConfig.appName.fontSize ||
2387
+ PTNavbarMenuComponent.DEFAULT_APP_NAME_FONT_SIZE,
2388
+ };
2389
+ }
2390
+ return {
2391
+ color: PTNavbarMenuComponent.DEFAULT_APP_NAME_COLOR,
2392
+ fontSize: PTNavbarMenuComponent.DEFAULT_APP_NAME_FONT_SIZE,
2393
+ };
2394
+ }
2395
+ getNavbarStyles() {
2396
+ const transparency = this.navBarMenuConfig.pattern?.transparencyPercentage ||
2397
+ PTNavbarMenuComponent.DEFAULT_TRANSPARENCY;
2398
+ const backgroundImage = this.navBarMenuConfig.pattern
2399
+ ? `linear-gradient(rgba(255, 255, 255, ${1 - parseFloat(transparency) / 100}), rgba(255, 255, 255, ${1 - parseFloat(transparency) / 100})), url(${this.navBarMenuConfig.pattern.imageUrl})`
2400
+ : '';
2401
+ return {
2402
+ backgroundColor: this.navBarMenuConfig.pattern ? 'transparent' : '#fff',
2403
+ backgroundImage: backgroundImage,
2404
+ backgroundSize: 'cover',
2405
+ backgroundPosition: 'center',
2406
+ };
2407
+ }
2408
+ toggleMenu() {
2409
+ this.toggleSidebar.emit();
2410
+ }
2411
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTNavbarMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2412
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTNavbarMenuComponent, selector: "pt-nav-bar-menu", inputs: { navBarMenuConfig: "navBarMenuConfig" }, outputs: { toggleSidebar: "toggleSidebar" }, ngImport: i0, template: "<div class=\"pt-nav-bar-menu\" [ngStyle]=\"getNavbarStyles()\">\n <div class=\"navbar-left\">\n <a\n [routerLink]=\"\n isImageStyle(navBarMenuConfig.logo)\n ? navBarMenuConfig.logo.routerLink\n : '/'\n \"\n class=\"logo-link\"\n >\n <img\n [src]=\"getLogoUrl()\"\n [alt]=\"getLogoAltText()\"\n [ngStyle]=\"getLogoStyles()\"\n class=\"navbar-logo\"\n />\n <span class=\"navbar-title\" [ngStyle]=\"getAppNameStyles()\">\n {{ getAppName() }}\n </span>\n </a>\n <a (click)=\"toggleMenu()\" class=\"toggle-btn\">\n <i class=\"pi pi-bars\"></i>\n </a>\n </div>\n <div class=\"navbar-right\">\n <pt-menu-fancy\n *ngFor=\"let menuConfig of navBarMenuConfig.menus\"\n [config]=\"menuConfig\"\n ></pt-menu-fancy>\n </div>\n</div>\n", styles: [".pt-nav-bar-menu{display:flex;justify-content:space-between;align-items:center;padding:10px;border-bottom:1px solid #ddd;background-color:#fff;background-size:cover;background-position:center}.pt-nav-bar-menu .navbar-left{display:flex;align-items:center}.pt-nav-bar-menu .logo-link{display:flex;align-items:center;text-decoration:none;color:inherit}.pt-nav-bar-menu .navbar-logo{margin-left:10px;margin-right:20px}.pt-nav-bar-menu .navbar-right{display:flex;align-items:center}.pt-nav-bar-menu .navbar-right a{margin-left:20px;color:#333;text-decoration:none;font-size:20px;cursor:pointer}.pt-nav-bar-menu .navbar-right a:hover{color:#000;cursor:pointer}.pt-nav-bar-menu .toggle-btn>.pi.pi-bars{font-size:1.5rem;color:#333}.pt-nav-bar-menu .toggle-btn:hover{background-color:#f1f1f1}.pt-nav-bar-menu .toggle-btn{margin-left:2rem;cursor:pointer;padding:7px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: PTMenuFancyComponent, selector: "pt-menu-fancy", inputs: ["config"] }] }); }
2413
+ }
2414
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTNavbarMenuComponent, decorators: [{
2415
+ type: Component,
2416
+ args: [{ selector: 'pt-nav-bar-menu', template: "<div class=\"pt-nav-bar-menu\" [ngStyle]=\"getNavbarStyles()\">\n <div class=\"navbar-left\">\n <a\n [routerLink]=\"\n isImageStyle(navBarMenuConfig.logo)\n ? navBarMenuConfig.logo.routerLink\n : '/'\n \"\n class=\"logo-link\"\n >\n <img\n [src]=\"getLogoUrl()\"\n [alt]=\"getLogoAltText()\"\n [ngStyle]=\"getLogoStyles()\"\n class=\"navbar-logo\"\n />\n <span class=\"navbar-title\" [ngStyle]=\"getAppNameStyles()\">\n {{ getAppName() }}\n </span>\n </a>\n <a (click)=\"toggleMenu()\" class=\"toggle-btn\">\n <i class=\"pi pi-bars\"></i>\n </a>\n </div>\n <div class=\"navbar-right\">\n <pt-menu-fancy\n *ngFor=\"let menuConfig of navBarMenuConfig.menus\"\n [config]=\"menuConfig\"\n ></pt-menu-fancy>\n </div>\n</div>\n", styles: [".pt-nav-bar-menu{display:flex;justify-content:space-between;align-items:center;padding:10px;border-bottom:1px solid #ddd;background-color:#fff;background-size:cover;background-position:center}.pt-nav-bar-menu .navbar-left{display:flex;align-items:center}.pt-nav-bar-menu .logo-link{display:flex;align-items:center;text-decoration:none;color:inherit}.pt-nav-bar-menu .navbar-logo{margin-left:10px;margin-right:20px}.pt-nav-bar-menu .navbar-right{display:flex;align-items:center}.pt-nav-bar-menu .navbar-right a{margin-left:20px;color:#333;text-decoration:none;font-size:20px;cursor:pointer}.pt-nav-bar-menu .navbar-right a:hover{color:#000;cursor:pointer}.pt-nav-bar-menu .toggle-btn>.pi.pi-bars{font-size:1.5rem;color:#333}.pt-nav-bar-menu .toggle-btn:hover{background-color:#f1f1f1}.pt-nav-bar-menu .toggle-btn{margin-left:2rem;cursor:pointer;padding:7px}\n"] }]
2417
+ }], propDecorators: { navBarMenuConfig: [{
2418
+ type: Input
2419
+ }], toggleSidebar: [{
2420
+ type: Output
2421
+ }] } });
2422
+
2423
+ class PTMenuFancyModule {
2424
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMenuFancyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2425
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.11", ngImport: i0, type: PTMenuFancyModule, declarations: [PTMenuFancyComponent], imports: [CommonModule, PTCardModule], exports: [PTMenuFancyComponent] }); }
2426
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMenuFancyModule, imports: [CommonModule, PTCardModule] }); }
2427
+ }
2428
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTMenuFancyModule, decorators: [{
2429
+ type: NgModule,
2430
+ args: [{
2431
+ declarations: [PTMenuFancyComponent],
2432
+ imports: [CommonModule, PTCardModule],
2433
+ exports: [PTMenuFancyComponent],
2434
+ }]
2435
+ }] });
2436
+
2437
+ class PTNavbarMenuModule {
2438
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTNavbarMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2439
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.11", ngImport: i0, type: PTNavbarMenuModule, declarations: [PTNavbarMenuComponent], imports: [CommonModule, RouterModule, PTMenuFancyModule], exports: [PTNavbarMenuComponent] }); }
2440
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTNavbarMenuModule, imports: [CommonModule, RouterModule, PTMenuFancyModule] }); }
2441
+ }
2442
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTNavbarMenuModule, decorators: [{
2443
+ type: NgModule,
2444
+ args: [{
2445
+ declarations: [PTNavbarMenuComponent],
2446
+ imports: [CommonModule, RouterModule, PTMenuFancyModule],
2447
+ exports: [PTNavbarMenuComponent],
2448
+ }]
2449
+ }] });
2450
+
2451
+ class PTSideBarMenuComponent {
2452
+ constructor(renderer, el) {
2453
+ this.renderer = renderer;
2454
+ this.el = el;
2455
+ this.menuConfig = {
2456
+ menus: [],
2457
+ isVisible: true,
2458
+ searchable: true,
2459
+ width: '250px',
2460
+ height: '100vh',
2461
+ scrollable: true,
2462
+ backgroundColor: 'white',
2463
+ fontColor: '#333', // Default main font color
2464
+ fontColorSubMenu: '#666', // Default submenu font color
2465
+ hoverColor: '#f1f1f1', // Default hover color for main menu
2466
+ hoverColorSubMenu: '#e0e0e0', // Default hover color for submenu
2467
+ };
2468
+ this.searchCardConfig = {
2469
+ backgroundColor: 'white',
2470
+ height: '72px',
2471
+ };
2472
+ this.cardConfig = {
2473
+ backgroundColor: '',
2474
+ width: '',
2475
+ height: '',
2476
+ scrollableVertical: false,
2477
+ };
2478
+ this.formGroup = new FormGroup({
2479
+ search: new FormControl(''),
2480
+ });
2481
+ this.searchField = {
2482
+ name: 'search',
2483
+ placeholder: 'Search...',
2484
+ iconClass: 'pi pi-search',
2485
+ };
2486
+ this.filteredMenus = [];
2487
+ }
2488
+ ngOnInit() {
2489
+ this.cardConfig = {
2490
+ backgroundColor: this.menuConfig.backgroundColor,
2491
+ width: this.menuConfig.width,
2492
+ height: this.menuConfig.height,
2493
+ scrollableVertical: this.menuConfig.scrollable,
2494
+ pattern: this.menuConfig.pattern,
2495
+ };
2496
+ this.filteredMenus = this.menuConfig.menus;
2497
+ const cardWidth = this.menuConfig.width
2498
+ ? parseInt(this.menuConfig.width)
2499
+ : 250;
2500
+ this.searchField.width = `${cardWidth - 60}px`;
2501
+ this.searchCardConfig.width = this.menuConfig.width;
2502
+ this.searchCardConfig.pattern = this.menuConfig.pattern;
2503
+ if (this.menuConfig.searchable) {
2504
+ this.formGroup
2505
+ .get('search')
2506
+ ?.valueChanges.subscribe((searchTerm) => {
2507
+ this.onSearch(searchTerm);
2508
+ });
2509
+ }
2510
+ }
2511
+ toggleMenu(item, event) {
2512
+ item.isExpanded = !item.isExpanded;
2513
+ event.preventDefault();
2514
+ }
2515
+ getChevronClass(item) {
2516
+ return item.isExpanded ? 'fa fa-chevron-down' : 'fa fa-chevron-right';
2517
+ }
2518
+ getBadgeStyles(badge) {
2519
+ const defaultColors = this.getDefaultBadgeColors(badge.type || BadgeType.Info);
2520
+ return {
2521
+ color: badge.color || defaultColors.color,
2522
+ backgroundColor: badge.backgroundColor || defaultColors.backgroundColor,
2523
+ padding: '2px 8px',
2524
+ borderRadius: '5px',
2525
+ fontSize: '12px',
2526
+ };
2527
+ }
2528
+ getDefaultBadgeColors(type) {
2529
+ switch (type) {
2530
+ case BadgeType.Info:
2531
+ return { color: 'white', backgroundColor: '#17a2b8' };
2532
+ case BadgeType.Danger:
2533
+ return { color: 'white', backgroundColor: '#dc3545' };
2534
+ case BadgeType.Warning:
2535
+ return { color: 'white', backgroundColor: '#ffc107' };
2536
+ default:
2537
+ return { color: 'white', backgroundColor: '#6c757d' };
2538
+ }
2539
+ }
2540
+ onSearch(searchTerm) {
2541
+ if (searchTerm.trim() === '') {
2542
+ this.filteredMenus = this.menuConfig.menus;
2543
+ this.collapseAllMenus();
2544
+ }
2545
+ else {
2546
+ const lowerCaseSearch = searchTerm.toLowerCase();
2547
+ this.filteredMenus = this.menuConfig.menus
2548
+ .map((menu) => this.searchInMenu({ ...menu }, lowerCaseSearch))
2549
+ .filter(Boolean);
2550
+ }
2551
+ }
2552
+ searchInMenu(menu, searchTerm) {
2553
+ const isMatch = menu.label.toLowerCase().includes(searchTerm);
2554
+ if (menu.children) {
2555
+ const matchingChildren = menu.children
2556
+ .map((child) => this.searchInMenu(child, searchTerm))
2557
+ .filter(Boolean);
2558
+ if (matchingChildren.length > 0) {
2559
+ menu.children = matchingChildren;
2560
+ menu.isExpanded = true;
2561
+ return menu;
2562
+ }
2563
+ }
2564
+ return isMatch ? menu : null;
2565
+ }
2566
+ collapseAllMenus() {
2567
+ this.menuConfig.menus.forEach((menu) => {
2568
+ menu.isExpanded = false;
2569
+ });
2570
+ }
2571
+ getMenuItemStyles() {
2572
+ return {
2573
+ color: this.menuConfig.fontColor || '#333', // Set default font color if not specified in config
2574
+ };
2575
+ }
2576
+ getMenuLinkStyles() {
2577
+ return {
2578
+ color: this.menuConfig.fontColor || '#333',
2579
+ 'text-decoration': 'none',
2580
+ 'border-radius': '8px',
2581
+ padding: '10px 15px',
2582
+ 'font-size': '16px',
2583
+ transition: 'background-color 0.2s, color 0.2s',
2584
+ display: 'flex',
2585
+ 'align-items': 'center',
2586
+ ':hover': {
2587
+ backgroundColor: this.menuConfig.hoverColor || '#f1f1f1',
2588
+ color: '#111',
2589
+ },
2590
+ };
2591
+ }
2592
+ getSubMenuLinkStyles() {
2593
+ return {
2594
+ color: this.menuConfig.fontColorSubMenu || this.menuConfig.fontColor || '#666',
2595
+ 'text-decoration': 'none',
2596
+ 'border-radius': '5px',
2597
+ padding: '5px 10px',
2598
+ transition: 'background-color 0.2s, color 0.2s',
2599
+ ':hover': {
2600
+ backgroundColor: this.menuConfig.hoverColorSubMenu || '#e0e0e0',
2601
+ },
2602
+ };
2603
+ }
2604
+ ngAfterViewInit() {
2605
+ this.applyHoverEffects();
2606
+ }
2607
+ applyHoverEffects() {
2608
+ const menuLinks = this.el.nativeElement.querySelectorAll('a.menu-link');
2609
+ const subMenuLinks = this.el.nativeElement.querySelectorAll('a.submenu-link');
2610
+ // Apply hover effects for main menu links
2611
+ menuLinks.forEach((link) => {
2612
+ this.renderer.listen(link, 'mouseenter', () => {
2613
+ this.renderer.setStyle(link, 'background-color', this.menuConfig.hoverColor || '#f1f1f1');
2614
+ this.renderer.setStyle(link, 'color', this.menuConfig.hoverFontColor || 'white');
2615
+ });
2616
+ this.renderer.listen(link, 'mouseleave', () => {
2617
+ this.renderer.removeStyle(link, 'background-color');
2618
+ this.renderer.setStyle(link, 'color', this.menuConfig.fontColor || '#333');
2619
+ });
2620
+ });
2621
+ // Apply hover effects for submenu links
2622
+ subMenuLinks.forEach((link) => {
2623
+ this.renderer.listen(link, 'mouseenter', () => {
2624
+ this.renderer.setStyle(link, 'background-color', this.menuConfig.hoverColorSubMenu ||
2625
+ this.menuConfig.hoverColor ||
2626
+ '#f1f1f1');
2627
+ this.renderer.setStyle(link, 'color', this.menuConfig.hoverFontColorSubMenu ||
2628
+ this.menuConfig.hoverFontColor ||
2629
+ '#fff');
2630
+ });
2631
+ this.renderer.listen(link, 'mouseleave', () => {
2632
+ this.renderer.removeStyle(link, 'background-color');
2633
+ this.renderer.setStyle(link, 'color', this.menuConfig.fontColorSubMenu ||
2634
+ this.menuConfig.fontColor ||
2635
+ '#666');
2636
+ });
2637
+ });
2638
+ }
2639
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTSideBarMenuComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
2640
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTSideBarMenuComponent, selector: "pt-side-bar-menu", inputs: { menuConfig: "menuConfig" }, ngImport: i0, template: "<div class=\"pt-side-bar-menu\">\n <pt-card\n *ngIf=\"menuConfig.searchable\"\n [config]=\"searchCardConfig\"\n [ngClass]=\"{ 'sidebar-hidden': !menuConfig.isVisible }\"\n >\n <div class=\"search-input\">\n <pt-text-input [formGroup]=\"formGroup\" [formField]=\"searchField\">\n </pt-text-input>\n </div>\n </pt-card>\n\n <pt-card\n [config]=\"cardConfig\"\n [ngClass]=\"{ 'sidebar-hidden': !menuConfig.isVisible }\"\n >\n <ul class=\"menu-list\">\n <li\n *ngFor=\"let item of filteredMenus\"\n class=\"menu-item\"\n [ngClass]=\"{ 'menu-item-expanded': item.isExpanded }\"\n [ngStyle]=\"getMenuItemStyles()\"\n >\n <!-- Main menu items without children -->\n <a\n *ngIf=\"!item.children?.length\"\n [routerLink]=\"item.url\"\n class=\"menu-link\"\n [ngStyle]=\"getMenuLinkStyles()\"\n >\n <i [ngClass]=\"item.icon\"></i>\n <span>{{ item.label }}</span>\n <span\n *ngIf=\"item.badge\"\n [ngStyle]=\"getBadgeStyles(item.badge)\"\n class=\"badge\"\n >\n {{ item.badge.count }}\n </span>\n </a>\n\n <!-- Menu items with children -->\n <a\n *ngIf=\"item.children?.length\"\n class=\"menu-link\"\n (click)=\"toggleMenu(item, $event)\"\n [ngStyle]=\"getMenuLinkStyles()\"\n >\n <i [ngClass]=\"item.icon\"></i>\n <span>{{ item.label }}</span>\n <span\n *ngIf=\"item.badge\"\n [ngStyle]=\"getBadgeStyles(item.badge)\"\n class=\"badge\"\n >\n {{ item.badge.count }}\n </span>\n <i [ngClass]=\"getChevronClass(item)\" class=\"chevron\"></i>\n </a>\n\n <!-- Submenu -->\n <ul class=\"submenu-list\">\n <li *ngFor=\"let child of item.children\" class=\"submenu-item\">\n <a\n [routerLink]=\"child.url\"\n class=\"submenu-link\"\n [ngStyle]=\"getSubMenuLinkStyles()\"\n >\n <i [ngClass]=\"child.icon\"></i>\n <span class=\"submenu-title\">{{ child.label }}</span>\n <span\n *ngIf=\"child.badge\"\n [ngStyle]=\"getBadgeStyles(child.badge)\"\n class=\"badge\"\n >\n {{ child.badge.count }}\n </span>\n </a>\n </li>\n </ul>\n </li>\n </ul>\n </pt-card>\n</div>\n", styles: [".pt-side-bar-menu .badge{background-color:#38bdf8;border-radius:5px;color:#fff;font-size:12px;margin-left:auto;padding:2px 8px}.pt-side-bar-menu .chevron{color:#8c8c8c;cursor:pointer;margin-left:auto}.pt-side-bar-menu .menu-item{position:relative}.pt-side-bar-menu .menu-item-expanded .submenu-list{max-height:500px;padding-bottom:5px;padding-top:5px}.pt-side-bar-menu .menu-link{align-items:center;border-radius:8px;color:#333;cursor:pointer;display:flex;font-size:16px;margin-bottom:15px;padding:10px 15px;text-decoration:none;transition:background-color .2s,color .2s}.pt-side-bar-menu .menu-link:hover{background-color:#f1f1f1;color:#111}.pt-side-bar-menu .menu-link i{margin-right:10px}.pt-side-bar-menu .menu-list{list-style-type:none;padding:0}.pt-side-bar-menu pt-card{transition:transform .3s ease-in-out,opacity .3s ease-in-out;display:block}.pt-side-bar-menu .search-input{margin-left:10px}.pt-side-bar-menu .sidebar-hidden{transform:translate(-100%);opacity:0}.pt-side-bar-menu .sidebar-menu{margin:0;padding:0;transition:transform .3s ease-in-out;width:250px}.pt-side-bar-menu .submenu-item{padding:5px 0;position:relative}.pt-side-bar-menu .submenu-item:before{background-color:#e5e7eb;content:\"\";height:1px;left:-25px;position:absolute;top:50%;transform:translateY(-50%);width:25px}.pt-side-bar-menu .submenu-item:last-child:after{content:none}.pt-side-bar-menu .submenu-link{align-items:center;border-radius:5px;color:#666;display:flex;font-size:14px;padding:5px 10px;text-decoration:none;transition:background-color .2s,color .2s}.pt-side-bar-menu .submenu-link:hover{background-color:#f1f1f1;color:#000}.pt-side-bar-menu .submenu-list{border-left:1px solid #e5e7eb;list-style-type:none;margin-left:23px;margin-top:5px;max-height:0;overflow:hidden;padding-left:25px;position:relative;transition:max-height .3s ease-out,padding .3s ease-out}.pt-side-bar-menu .submenu-list:after{background-color:#e5e7eb;bottom:0;content:\"\";left:-1px;position:absolute;top:0;width:1px}.pt-side-bar-menu .submenu-title{margin-left:5px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: PTCardComponent, selector: "pt-card", inputs: ["config"] }, { kind: "component", type: PTTextInputComponent, selector: "pt-text-input", inputs: ["formGroup", "formField"] }] }); }
2641
+ }
2642
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTSideBarMenuComponent, decorators: [{
2643
+ type: Component,
2644
+ args: [{ selector: 'pt-side-bar-menu', template: "<div class=\"pt-side-bar-menu\">\n <pt-card\n *ngIf=\"menuConfig.searchable\"\n [config]=\"searchCardConfig\"\n [ngClass]=\"{ 'sidebar-hidden': !menuConfig.isVisible }\"\n >\n <div class=\"search-input\">\n <pt-text-input [formGroup]=\"formGroup\" [formField]=\"searchField\">\n </pt-text-input>\n </div>\n </pt-card>\n\n <pt-card\n [config]=\"cardConfig\"\n [ngClass]=\"{ 'sidebar-hidden': !menuConfig.isVisible }\"\n >\n <ul class=\"menu-list\">\n <li\n *ngFor=\"let item of filteredMenus\"\n class=\"menu-item\"\n [ngClass]=\"{ 'menu-item-expanded': item.isExpanded }\"\n [ngStyle]=\"getMenuItemStyles()\"\n >\n <!-- Main menu items without children -->\n <a\n *ngIf=\"!item.children?.length\"\n [routerLink]=\"item.url\"\n class=\"menu-link\"\n [ngStyle]=\"getMenuLinkStyles()\"\n >\n <i [ngClass]=\"item.icon\"></i>\n <span>{{ item.label }}</span>\n <span\n *ngIf=\"item.badge\"\n [ngStyle]=\"getBadgeStyles(item.badge)\"\n class=\"badge\"\n >\n {{ item.badge.count }}\n </span>\n </a>\n\n <!-- Menu items with children -->\n <a\n *ngIf=\"item.children?.length\"\n class=\"menu-link\"\n (click)=\"toggleMenu(item, $event)\"\n [ngStyle]=\"getMenuLinkStyles()\"\n >\n <i [ngClass]=\"item.icon\"></i>\n <span>{{ item.label }}</span>\n <span\n *ngIf=\"item.badge\"\n [ngStyle]=\"getBadgeStyles(item.badge)\"\n class=\"badge\"\n >\n {{ item.badge.count }}\n </span>\n <i [ngClass]=\"getChevronClass(item)\" class=\"chevron\"></i>\n </a>\n\n <!-- Submenu -->\n <ul class=\"submenu-list\">\n <li *ngFor=\"let child of item.children\" class=\"submenu-item\">\n <a\n [routerLink]=\"child.url\"\n class=\"submenu-link\"\n [ngStyle]=\"getSubMenuLinkStyles()\"\n >\n <i [ngClass]=\"child.icon\"></i>\n <span class=\"submenu-title\">{{ child.label }}</span>\n <span\n *ngIf=\"child.badge\"\n [ngStyle]=\"getBadgeStyles(child.badge)\"\n class=\"badge\"\n >\n {{ child.badge.count }}\n </span>\n </a>\n </li>\n </ul>\n </li>\n </ul>\n </pt-card>\n</div>\n", styles: [".pt-side-bar-menu .badge{background-color:#38bdf8;border-radius:5px;color:#fff;font-size:12px;margin-left:auto;padding:2px 8px}.pt-side-bar-menu .chevron{color:#8c8c8c;cursor:pointer;margin-left:auto}.pt-side-bar-menu .menu-item{position:relative}.pt-side-bar-menu .menu-item-expanded .submenu-list{max-height:500px;padding-bottom:5px;padding-top:5px}.pt-side-bar-menu .menu-link{align-items:center;border-radius:8px;color:#333;cursor:pointer;display:flex;font-size:16px;margin-bottom:15px;padding:10px 15px;text-decoration:none;transition:background-color .2s,color .2s}.pt-side-bar-menu .menu-link:hover{background-color:#f1f1f1;color:#111}.pt-side-bar-menu .menu-link i{margin-right:10px}.pt-side-bar-menu .menu-list{list-style-type:none;padding:0}.pt-side-bar-menu pt-card{transition:transform .3s ease-in-out,opacity .3s ease-in-out;display:block}.pt-side-bar-menu .search-input{margin-left:10px}.pt-side-bar-menu .sidebar-hidden{transform:translate(-100%);opacity:0}.pt-side-bar-menu .sidebar-menu{margin:0;padding:0;transition:transform .3s ease-in-out;width:250px}.pt-side-bar-menu .submenu-item{padding:5px 0;position:relative}.pt-side-bar-menu .submenu-item:before{background-color:#e5e7eb;content:\"\";height:1px;left:-25px;position:absolute;top:50%;transform:translateY(-50%);width:25px}.pt-side-bar-menu .submenu-item:last-child:after{content:none}.pt-side-bar-menu .submenu-link{align-items:center;border-radius:5px;color:#666;display:flex;font-size:14px;padding:5px 10px;text-decoration:none;transition:background-color .2s,color .2s}.pt-side-bar-menu .submenu-link:hover{background-color:#f1f1f1;color:#000}.pt-side-bar-menu .submenu-list{border-left:1px solid #e5e7eb;list-style-type:none;margin-left:23px;margin-top:5px;max-height:0;overflow:hidden;padding-left:25px;position:relative;transition:max-height .3s ease-out,padding .3s ease-out}.pt-side-bar-menu .submenu-list:after{background-color:#e5e7eb;bottom:0;content:\"\";left:-1px;position:absolute;top:0;width:1px}.pt-side-bar-menu .submenu-title{margin-left:5px}\n"] }]
2645
+ }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }], propDecorators: { menuConfig: [{
2646
+ type: Input
2647
+ }] } });
2648
+
2649
+ class PTSideBarMenuModule {
2650
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTSideBarMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2651
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.11", ngImport: i0, type: PTSideBarMenuModule, declarations: [PTSideBarMenuComponent], imports: [CommonModule, RouterModule, PTCardModule, PTTextInputModule], exports: [PTSideBarMenuComponent] }); }
2652
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTSideBarMenuModule, imports: [CommonModule, RouterModule, PTCardModule, PTTextInputModule] }); }
2653
+ }
2654
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTSideBarMenuModule, decorators: [{
2655
+ type: NgModule,
2656
+ args: [{
2657
+ declarations: [PTSideBarMenuComponent],
2658
+ imports: [CommonModule, RouterModule, PTCardModule, PTTextInputModule],
2659
+ exports: [PTSideBarMenuComponent],
2660
+ }]
2661
+ }] });
2662
+
2663
+ class PTFooterComponent {
2664
+ constructor() {
2665
+ this.footerConfig = {
2666
+ appName: 'Default App',
2667
+ version: '1.0.0',
2668
+ productionYear: new Date().getFullYear(),
2669
+ };
2670
+ }
2671
+ getCurrentYear() {
2672
+ return new Date().getFullYear();
2673
+ }
2674
+ getCardConfig() {
2675
+ return (this.footerConfig.cardConfig ?? {
2676
+ backgroundColor: '#f8f8f8',
2677
+ width: '100%',
2678
+ height: 'auto',
2679
+ scrollableVertical: false,
2680
+ padding: '0',
2681
+ margin: '0',
2682
+ });
2683
+ }
2684
+ displayYears() {
2685
+ const currentYear = this.getCurrentYear();
2686
+ const productionYear = this.footerConfig.productionYear;
2687
+ return productionYear === currentYear
2688
+ ? `${currentYear}`
2689
+ : `${productionYear} - ${currentYear}`;
2690
+ }
2691
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2692
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTFooterComponent, selector: "pt-footer", inputs: { footerConfig: "footerConfig" }, ngImport: i0, template: "<pt-card [config]=\"getCardConfig()\" class=\"footer-card\">\n <footer class=\"footer\">\n <p>\n {{ footerConfig.appName }} V {{ footerConfig.version }}\n <br />\n &copy; {{ displayYears() }} All rights reserved.\n </p>\n </footer>\n</pt-card>\n", styles: [".footer{text-align:center;padding:5px;font-size:14px;line-height:1.8;margin-top:0}.footer-card{width:100%;background-color:transparent;margin-top:0}\n"], dependencies: [{ kind: "component", type: PTCardComponent, selector: "pt-card", inputs: ["config"] }] }); }
2693
+ }
2694
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTFooterComponent, decorators: [{
2695
+ type: Component,
2696
+ args: [{ selector: 'pt-footer', template: "<pt-card [config]=\"getCardConfig()\" class=\"footer-card\">\n <footer class=\"footer\">\n <p>\n {{ footerConfig.appName }} V {{ footerConfig.version }}\n <br />\n &copy; {{ displayYears() }} All rights reserved.\n </p>\n </footer>\n</pt-card>\n", styles: [".footer{text-align:center;padding:5px;font-size:14px;line-height:1.8;margin-top:0}.footer-card{width:100%;background-color:transparent;margin-top:0}\n"] }]
2697
+ }], propDecorators: { footerConfig: [{
2698
+ type: Input
2699
+ }] } });
2700
+
2701
+ class PTBreadCrumbService {
2702
+ constructor(router) {
2703
+ this.router = router;
2704
+ this._breadcrumb = new BehaviorSubject([]);
2705
+ this.breadcrumb$ = this._breadcrumb.asObservable();
2706
+ this.menuData = [];
2707
+ this.router.events
2708
+ .pipe(filter((event) => event instanceof NavigationEnd))
2709
+ .subscribe((event) => {
2710
+ let urlParts = event.urlAfterRedirects.split('/');
2711
+ urlParts.splice(0, 1);
2712
+ let urlWithoutContext = urlParts.join('/');
2713
+ let newBreadcrumb = this.createBreadcrumb(urlWithoutContext);
2714
+ this._breadcrumb.next(newBreadcrumb);
2715
+ });
2716
+ }
2717
+ // Method to set menuData
2718
+ setMenuData(menuData) {
2719
+ this.menuData = menuData;
2720
+ }
2721
+ createBreadcrumb(url = '', breadcrumbs = []) {
2722
+ if (!url) {
2723
+ return breadcrumbs;
2724
+ }
2725
+ const pathSegments = url.split('/').filter((segment) => segment);
2726
+ return this.buildParentBreadcrumbs(this.menuData, pathSegments, breadcrumbs);
2727
+ }
2728
+ buildParentBreadcrumbs(menuData, pathSegments, breadcrumbs) {
2729
+ if (pathSegments.length === 0) {
2730
+ return breadcrumbs;
2731
+ }
2732
+ const currentSegment = pathSegments.shift();
2733
+ const currentMenu = menuData.find((menu) => menu.url === currentSegment || menu.url.endsWith(currentSegment));
2734
+ if (currentMenu) {
2735
+ breadcrumbs.push({ label: currentMenu.label, url: currentMenu.url });
2736
+ if (currentMenu.children &&
2737
+ currentMenu.children.length > 0 &&
2738
+ pathSegments.length > 0) {
2739
+ return this.buildChildBreadcrumbs(currentMenu.children, pathSegments, breadcrumbs, currentSegment || '');
2740
+ }
2741
+ }
2742
+ return breadcrumbs;
2743
+ }
2744
+ buildChildBreadcrumbs(menuData, pathSegments, breadcrumbs, currentUrl) {
2745
+ if (pathSegments.length === 0) {
2746
+ return breadcrumbs;
2747
+ }
2748
+ const currentSegment = pathSegments.shift();
2749
+ currentUrl = `/${currentUrl}/${currentSegment}`;
2750
+ const currentMenu = menuData.find((menu) => menu.url === currentUrl);
2751
+ if (currentMenu) {
2752
+ breadcrumbs.push({ label: currentMenu.label, url: currentMenu.url });
2753
+ if (currentMenu.children &&
2754
+ currentMenu.children.length > 0 &&
2755
+ pathSegments.length > 0) {
2756
+ return this.buildChildBreadcrumbs(currentMenu.children, pathSegments, breadcrumbs, currentUrl);
2757
+ }
2758
+ }
2759
+ else {
2760
+ const parentMenu = menuData.find((menu) => menu.children &&
2761
+ menu.children.some((child) => child.url === currentUrl));
2762
+ if (parentMenu && parentMenu.children) {
2763
+ const childMenu = parentMenu.children.find((child) => child.url === currentUrl);
2764
+ if (childMenu) {
2765
+ breadcrumbs.push({ label: parentMenu.label, url: parentMenu.url });
2766
+ breadcrumbs.push({ label: childMenu.label, url: childMenu.url });
2767
+ if (childMenu.children &&
2768
+ childMenu.children.length > 0 &&
2769
+ pathSegments.length > 0) {
2770
+ return this.buildChildBreadcrumbs(childMenu.children, pathSegments, breadcrumbs, currentUrl);
2771
+ }
2772
+ }
2773
+ }
2774
+ }
2775
+ return breadcrumbs;
2776
+ }
2777
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTBreadCrumbService, deps: [{ token: i2$2.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
2778
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTBreadCrumbService, providedIn: 'root' }); }
2779
+ }
2780
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTBreadCrumbService, decorators: [{
2781
+ type: Injectable,
2782
+ args: [{
2783
+ providedIn: 'root',
2784
+ }]
2785
+ }], ctorParameters: () => [{ type: i2$2.Router }] });
2786
+
2787
+ class PTBreadCrumbComponent {
2788
+ constructor(breadcrumbService, renderer, el) {
2789
+ this.breadcrumbService = breadcrumbService;
2790
+ this.renderer = renderer;
2791
+ this.el = el;
2792
+ }
2793
+ ngOnInit() {
2794
+ this.home = { icon: 'pi pi-home', routerLink: 'dashboard' };
2795
+ // Pass the input menuData to the service
2796
+ this.breadcrumbService.setMenuData(this.breadCrumbConfig.menuData);
2797
+ this.breadCrumbSubscription = this.breadcrumbService.breadcrumb$.subscribe((breadcrumb) => {
2798
+ this.items = breadcrumb;
2799
+ });
2800
+ }
2801
+ ngAfterViewInit() {
2802
+ this.applyBackgroundStyles();
2803
+ }
2804
+ ngOnDestroy() {
2805
+ if (this.breadCrumbSubscription) {
2806
+ this.breadCrumbSubscription.unsubscribe();
2807
+ }
2808
+ }
2809
+ applyBackgroundStyles() {
2810
+ const transparency = this.breadCrumbConfig.pattern?.transparencyPercentage || '100';
2811
+ const backgroundImage = this.breadCrumbConfig.pattern?.imageUrl
2812
+ ? `linear-gradient(rgba(255, 255, 255, ${1 - parseFloat(transparency) / 100}), rgba(255, 255, 255, ${1 - parseFloat(transparency) / 100})), url('${this.breadCrumbConfig.pattern.imageUrl}')`
2813
+ : '';
2814
+ // Delay to ensure that the element is fully rendered before applying styles
2815
+ setTimeout(() => {
2816
+ const breadcrumbNav = this.el.nativeElement.querySelector('nav.p-breadcrumb.p-component');
2817
+ if (breadcrumbNav) {
2818
+ this.renderer.setStyle(breadcrumbNav, 'background-image', backgroundImage);
2819
+ }
2820
+ });
2821
+ }
2822
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTBreadCrumbComponent, deps: [{ token: PTBreadCrumbService }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
2823
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTBreadCrumbComponent, selector: "pt-bread-crumb", inputs: { breadCrumbConfig: "breadCrumbConfig" }, ngImport: i0, template: "<div\n *ngIf=\"items && items.length > 0\"\n class=\"pt-bread-crumb breadcrumb-container\"\n>\n <p-breadcrumb class=\"max-w-full\" [model]=\"items\" [home]=\"home\"></p-breadcrumb>\n</div>\n", styles: [".pt-bread-crumb ::ng-deep chevronrighticon.p-element.p-icon-wrapper.ng-star-inserted{margin-top:4px}.pt-bread-crumb ::ng-deep .p-breadcrumb{margin-bottom:20px}.pt-bread-crumb .breadcrumb-container{padding:10px;border-radius:5px;margin-bottom:20px}.pt-bread-crumb ::ng-deep .breadcrumb-background{background-size:cover;background-position:center;background-repeat:no-repeat}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$6.Breadcrumb, selector: "p-breadcrumb", inputs: ["model", "style", "styleClass", "home", "homeAriaLabel"], outputs: ["onItemClick"] }] }); }
2824
+ }
2825
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTBreadCrumbComponent, decorators: [{
2826
+ type: Component,
2827
+ args: [{ selector: 'pt-bread-crumb', template: "<div\n *ngIf=\"items && items.length > 0\"\n class=\"pt-bread-crumb breadcrumb-container\"\n>\n <p-breadcrumb class=\"max-w-full\" [model]=\"items\" [home]=\"home\"></p-breadcrumb>\n</div>\n", styles: [".pt-bread-crumb ::ng-deep chevronrighticon.p-element.p-icon-wrapper.ng-star-inserted{margin-top:4px}.pt-bread-crumb ::ng-deep .p-breadcrumb{margin-bottom:20px}.pt-bread-crumb .breadcrumb-container{padding:10px;border-radius:5px;margin-bottom:20px}.pt-bread-crumb ::ng-deep .breadcrumb-background{background-size:cover;background-position:center;background-repeat:no-repeat}\n"] }]
2828
+ }], ctorParameters: () => [{ type: PTBreadCrumbService }, { type: i0.Renderer2 }, { type: i0.ElementRef }], propDecorators: { breadCrumbConfig: [{
2829
+ type: Input
2830
+ }] } });
2831
+
2832
+ class PTPageSkeletonComponent {
2833
+ constructor() {
2834
+ this.toggleSidebar = new EventEmitter();
2835
+ this.isSidebarVisible = true;
2836
+ }
2837
+ ngOnInit() {
2838
+ this.initializeBackgroundCardConfig();
2839
+ this.initializeContentCardConfig();
2840
+ }
2841
+ onToggleSidebar() {
2842
+ this.isSidebarVisible = !this.isSidebarVisible;
2843
+ this.toggleSidebar.emit();
2844
+ }
2845
+ // Initialize backgroundCardConfig with default values
2846
+ initializeBackgroundCardConfig() {
2847
+ this.pageSkeletonConfig.backgroundCardConfig = {
2848
+ noBorder: this.pageSkeletonConfig.backgroundCardConfig?.noBorder ?? true,
2849
+ backgroundColor: this.pageSkeletonConfig.backgroundCardConfig?.backgroundColor || '#fff',
2850
+ padding: this.pageSkeletonConfig.backgroundCardConfig?.padding || '20px',
2851
+ margin: this.pageSkeletonConfig.backgroundCardConfig?.margin || '10px',
2852
+ ...this.pageSkeletonConfig.backgroundCardConfig,
2853
+ };
2854
+ }
2855
+ // Initialize contentCardConfig with default values (if necessary)
2856
+ initializeContentCardConfig() {
2857
+ this.pageSkeletonConfig.contentCardConfig = {
2858
+ noBorder: this.pageSkeletonConfig.contentCardConfig?.noBorder ?? false,
2859
+ backgroundColor: this.pageSkeletonConfig.contentCardConfig?.backgroundColor || '#f0f0f0',
2860
+ padding: this.pageSkeletonConfig.contentCardConfig?.padding || '15px',
2861
+ ...this.pageSkeletonConfig.contentCardConfig,
2862
+ };
2863
+ }
2864
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTPageSkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2865
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTPageSkeletonComponent, selector: "pt-page-skeleton", inputs: { pageSkeletonConfig: "pageSkeletonConfig" }, outputs: { toggleSidebar: "toggleSidebar" }, ngImport: i0, template: "<pt-card [config]=\"pageSkeletonConfig.backgroundCardConfig!\">\n <!-- Navbar -->\n <pt-nav-bar-menu\n [navBarMenuConfig]=\"pageSkeletonConfig.navBarMenuConfig\"\n (toggleSidebar)=\"onToggleSidebar()\"\n ></pt-nav-bar-menu>\n\n <div class=\"main-content\">\n <!-- Sidebar (use *ngIf to toggle visibility) -->\n <pt-side-bar-menu\n *ngIf=\"isSidebarVisible\"\n [menuConfig]=\"pageSkeletonConfig.sideMenuBarConfig\"\n class=\"sidebar\"\n ></pt-side-bar-menu>\n\n <!-- Main View Area -->\n <div class=\"content-area\" [ngClass]=\"{ 'full-width': !isSidebarVisible }\">\n <!-- Content Card Wrapper -->\n <pt-card [config]=\"pageSkeletonConfig.contentCardConfig\">\n <!-- Breadcrumb -->\n <pt-bread-crumb\n *ngIf=\"pageSkeletonConfig.breadCrumbConfig\"\n [breadCrumbConfig]=\"pageSkeletonConfig.breadCrumbConfig\"\n class=\"bread-crumb\"\n ></pt-bread-crumb>\n\n <!-- Background Card -->\n\n <router-outlet></router-outlet>\n </pt-card>\n </div>\n </div>\n\n <!-- Footer -->\n <pt-footer\n *ngIf=\"pageSkeletonConfig.footerConfig\"\n [footerConfig]=\"pageSkeletonConfig.footerConfig\"\n class=\"pt-footer\"\n ></pt-footer>\n</pt-card>\n", styles: [".bread-crumb{margin-bottom:15px}.app-container{display:flex;flex-direction:column;height:100vh}.main-content{display:flex;flex-grow:1;transition:all .3s ease-in-out}.content-area{flex-grow:1;display:flex;justify-content:center;align-items:flex-start;transition:all .3s ease-in-out;margin-left:14px;width:100%;overflow-x:hidden}.sidebar{width:300px;transition:all .3s ease-in-out}.content-area.full-width{margin-left:0;width:100%}pt-card{width:100%;height:100%;max-width:100%;overflow:hidden}pt-card .card-body-scrollable{overflow-x:auto}.pt-footer{margin-top:0}.footer-card{width:100%;background-color:transparent}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PTNavbarMenuComponent, selector: "pt-nav-bar-menu", inputs: ["navBarMenuConfig"], outputs: ["toggleSidebar"] }, { kind: "component", type: PTCardComponent, selector: "pt-card", inputs: ["config"] }, { kind: "component", type: PTSideBarMenuComponent, selector: "pt-side-bar-menu", inputs: ["menuConfig"] }, { kind: "directive", type: i2$2.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: PTFooterComponent, selector: "pt-footer", inputs: ["footerConfig"] }, { kind: "component", type: PTBreadCrumbComponent, selector: "pt-bread-crumb", inputs: ["breadCrumbConfig"] }] }); }
2866
+ }
2867
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTPageSkeletonComponent, decorators: [{
2868
+ type: Component,
2869
+ args: [{ selector: 'pt-page-skeleton', template: "<pt-card [config]=\"pageSkeletonConfig.backgroundCardConfig!\">\n <!-- Navbar -->\n <pt-nav-bar-menu\n [navBarMenuConfig]=\"pageSkeletonConfig.navBarMenuConfig\"\n (toggleSidebar)=\"onToggleSidebar()\"\n ></pt-nav-bar-menu>\n\n <div class=\"main-content\">\n <!-- Sidebar (use *ngIf to toggle visibility) -->\n <pt-side-bar-menu\n *ngIf=\"isSidebarVisible\"\n [menuConfig]=\"pageSkeletonConfig.sideMenuBarConfig\"\n class=\"sidebar\"\n ></pt-side-bar-menu>\n\n <!-- Main View Area -->\n <div class=\"content-area\" [ngClass]=\"{ 'full-width': !isSidebarVisible }\">\n <!-- Content Card Wrapper -->\n <pt-card [config]=\"pageSkeletonConfig.contentCardConfig\">\n <!-- Breadcrumb -->\n <pt-bread-crumb\n *ngIf=\"pageSkeletonConfig.breadCrumbConfig\"\n [breadCrumbConfig]=\"pageSkeletonConfig.breadCrumbConfig\"\n class=\"bread-crumb\"\n ></pt-bread-crumb>\n\n <!-- Background Card -->\n\n <router-outlet></router-outlet>\n </pt-card>\n </div>\n </div>\n\n <!-- Footer -->\n <pt-footer\n *ngIf=\"pageSkeletonConfig.footerConfig\"\n [footerConfig]=\"pageSkeletonConfig.footerConfig\"\n class=\"pt-footer\"\n ></pt-footer>\n</pt-card>\n", styles: [".bread-crumb{margin-bottom:15px}.app-container{display:flex;flex-direction:column;height:100vh}.main-content{display:flex;flex-grow:1;transition:all .3s ease-in-out}.content-area{flex-grow:1;display:flex;justify-content:center;align-items:flex-start;transition:all .3s ease-in-out;margin-left:14px;width:100%;overflow-x:hidden}.sidebar{width:300px;transition:all .3s ease-in-out}.content-area.full-width{margin-left:0;width:100%}pt-card{width:100%;height:100%;max-width:100%;overflow:hidden}pt-card .card-body-scrollable{overflow-x:auto}.pt-footer{margin-top:0}.footer-card{width:100%;background-color:transparent}\n"] }]
2870
+ }], propDecorators: { pageSkeletonConfig: [{
2871
+ type: Input
2872
+ }], toggleSidebar: [{
2873
+ type: Output
2874
+ }] } });
2875
+
2876
+ class PTFooterModule {
2877
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTFooterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2878
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.11", ngImport: i0, type: PTFooterModule, declarations: [PTFooterComponent], imports: [CommonModule, PTCardModule], exports: [PTFooterComponent] }); }
2879
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTFooterModule, imports: [CommonModule, PTCardModule] }); }
2880
+ }
2881
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTFooterModule, decorators: [{
2882
+ type: NgModule,
2883
+ args: [{
2884
+ declarations: [PTFooterComponent],
2885
+ imports: [CommonModule, PTCardModule],
2886
+ exports: [PTFooterComponent],
2887
+ }]
2888
+ }] });
2889
+
2890
+ class PTBreadCrumbModule {
2891
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTBreadCrumbModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2892
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.11", ngImport: i0, type: PTBreadCrumbModule, declarations: [PTBreadCrumbComponent], imports: [CommonModule, BreadcrumbModule], exports: [PTBreadCrumbComponent] }); }
2893
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTBreadCrumbModule, imports: [CommonModule, BreadcrumbModule] }); }
2894
+ }
2895
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTBreadCrumbModule, decorators: [{
2896
+ type: NgModule,
2897
+ args: [{
2898
+ declarations: [PTBreadCrumbComponent],
2899
+ imports: [CommonModule, BreadcrumbModule],
2900
+ exports: [PTBreadCrumbComponent],
2901
+ }]
2902
+ }] });
2903
+
2904
+ class PTPageSkeletonModule {
2905
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTPageSkeletonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2906
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.11", ngImport: i0, type: PTPageSkeletonModule, declarations: [PTPageSkeletonComponent], imports: [CommonModule,
2907
+ PTNavbarMenuModule,
2908
+ PTCardModule,
2909
+ PTSideBarMenuModule,
2910
+ RouterModule,
2911
+ PTFooterModule,
2912
+ PTBreadCrumbModule], exports: [PTPageSkeletonComponent] }); }
2913
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTPageSkeletonModule, imports: [CommonModule,
2914
+ PTNavbarMenuModule,
2915
+ PTCardModule,
2916
+ PTSideBarMenuModule,
2917
+ RouterModule,
2918
+ PTFooterModule,
2919
+ PTBreadCrumbModule] }); }
2920
+ }
2921
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTPageSkeletonModule, decorators: [{
2922
+ type: NgModule,
2923
+ args: [{
2924
+ declarations: [PTPageSkeletonComponent],
2925
+ imports: [
2926
+ CommonModule,
2927
+ PTNavbarMenuModule,
2928
+ PTCardModule,
2929
+ PTSideBarMenuModule,
2930
+ RouterModule,
2931
+ PTFooterModule,
2932
+ PTBreadCrumbModule,
2933
+ ],
2934
+ exports: [PTPageSkeletonComponent],
2935
+ }]
2936
+ }] });
2937
+
2938
+ class PTButtonComponent {
2939
+ constructor(renderer, el) {
2940
+ this.renderer = renderer;
2941
+ this.el = el;
2942
+ this.buttonConfig = {
2943
+ label: 'Click Me',
2944
+ icon: '',
2945
+ iconPos: 'left',
2946
+ disabled: false,
2947
+ styleClass: '',
2948
+ loading: false,
2949
+ type: 'button',
2950
+ width: '100%',
2951
+ height: 'auto',
2952
+ fontColor: '#000',
2953
+ backgroundColor: '#fff',
2954
+ borderColor: '#000',
2955
+ };
2956
+ }
2957
+ ngOnInit() {
2958
+ // Initialization logic if needed
2959
+ }
2960
+ ngAfterViewInit() {
2961
+ this.applyButtonStyles();
2962
+ }
2963
+ getIconPos() {
2964
+ return this.buttonConfig.iconPos === 'right' ? 'right' : 'left';
2965
+ }
2966
+ getType() {
2967
+ return this.buttonConfig.type || 'button';
2968
+ }
2969
+ applyButtonStyles() {
2970
+ // Select the native button element inside the p-button
2971
+ const buttonElement = this.el.nativeElement.querySelector('button.p-element');
2972
+ if (buttonElement) {
2973
+ // Apply dynamic styles using Renderer2
2974
+ this.renderer.setStyle(buttonElement, 'color', this.buttonConfig.fontColor);
2975
+ this.renderer.setStyle(buttonElement, 'background-color', this.buttonConfig.backgroundColor);
2976
+ this.renderer.setStyle(buttonElement, 'border-color', this.buttonConfig.borderColor);
2977
+ this.renderer.setStyle(buttonElement, 'width', this.buttonConfig.width || 'auto');
2978
+ this.renderer.setStyle(buttonElement, 'height', this.buttonConfig.height || 'auto');
2979
+ }
2980
+ }
2981
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTButtonComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
2982
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTButtonComponent, selector: "pt-button", inputs: { buttonConfig: "buttonConfig" }, ngImport: i0, template: "<p-button\n [label]=\"buttonConfig.label\"\n [icon]=\"buttonConfig.icon || ''\"\n [iconPos]=\"getIconPos()\"\n [disabled]=\"buttonConfig.disabled\"\n [loading]=\"buttonConfig.loading\"\n [class]=\"buttonConfig.styleClass\"\n [type]=\"getType()\"\n></p-button>\n", styles: ["::ng-deep p-button{display:block}\n"], dependencies: [{ kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }] }); }
2983
+ }
2984
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTButtonComponent, decorators: [{
2985
+ type: Component,
2986
+ args: [{ selector: 'pt-button', template: "<p-button\n [label]=\"buttonConfig.label\"\n [icon]=\"buttonConfig.icon || ''\"\n [iconPos]=\"getIconPos()\"\n [disabled]=\"buttonConfig.disabled\"\n [loading]=\"buttonConfig.loading\"\n [class]=\"buttonConfig.styleClass\"\n [type]=\"getType()\"\n></p-button>\n", styles: ["::ng-deep p-button{display:block}\n"] }]
2987
+ }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }], propDecorators: { buttonConfig: [{
2988
+ type: Input
2989
+ }] } });
2990
+
2991
+ class PTLoginPageComponent {
2992
+ constructor(fb) {
2993
+ this.fb = fb;
2994
+ this.loginSubmit = new EventEmitter();
2995
+ this.backgroundImageStyle = '';
2996
+ this.formGroup = this.fb.group({});
2997
+ }
2998
+ ngOnInit() {
2999
+ this.initializeDefaults();
3000
+ this.setupFormFields();
3001
+ this.formGroup.patchValue({
3002
+ username: this.loginPageConfig.login?.username || '',
3003
+ password: this.loginPageConfig.login?.password || '',
3004
+ });
3005
+ this.setBackgroundImageStyle();
3006
+ // Enable/Disable the button based on form validity
3007
+ this.formGroup.statusChanges.subscribe((status) => {
3008
+ this.loginPageConfig.buttonConfig.disabled = status !== 'VALID';
3009
+ });
3010
+ }
3011
+ // Initialize default values for all fields in loginPageConfig if not set
3012
+ initializeDefaults() {
3013
+ // Initialize backgroundImage
3014
+ this.loginPageConfig.backgroundImage = {
3015
+ imageUrl: this.loginPageConfig.backgroundImage?.imageUrl || '',
3016
+ transparencyPercentage: this.loginPageConfig.backgroundImage?.transparencyPercentage || '100',
3017
+ ...this.loginPageConfig.backgroundImage,
3018
+ };
3019
+ // Initialize title
3020
+ this.loginPageConfig.title = {
3021
+ text: this.loginPageConfig.title?.text || 'Login',
3022
+ position: this.loginPageConfig.title?.position || 'center',
3023
+ color: this.loginPageConfig.title?.color || '#333',
3024
+ fontSize: this.loginPageConfig.title?.fontSize || '24px',
3025
+ ...this.loginPageConfig.title,
3026
+ };
3027
+ // Initialize logoUrl
3028
+ this.loginPageConfig.logoUrl = {
3029
+ altText: this.loginPageConfig.logoUrl?.altText || 'Logo',
3030
+ imageUrl: this.loginPageConfig.logoUrl?.imageUrl || '',
3031
+ width: this.loginPageConfig.logoUrl?.width || '100px',
3032
+ height: this.loginPageConfig.logoUrl?.height || 'auto',
3033
+ ...this.loginPageConfig.logoUrl,
3034
+ };
3035
+ // Initialize footer
3036
+ this.loginPageConfig.footer = {
3037
+ version: this.loginPageConfig.footer?.version || 'V1.0',
3038
+ copyright: this.loginPageConfig.footer?.copyright || 'Your Company © 2024',
3039
+ ...this.loginPageConfig.footer,
3040
+ };
3041
+ // Initialize login
3042
+ this.loginPageConfig.login = {
3043
+ username: this.loginPageConfig.login?.username || '',
3044
+ password: this.loginPageConfig.login?.password || '',
3045
+ errorMessage: this.loginPageConfig.login?.errorMessage || '',
3046
+ emptyFieldsErrorMessage: this.loginPageConfig.login?.emptyFieldsErrorMessage ||
3047
+ "Veuillez saisir votre nom d'utilisateur et votre mot de passe !",
3048
+ ...this.loginPageConfig.login,
3049
+ };
3050
+ // Initialize cardConfig
3051
+ this.loginPageConfig.cardConfig = {
3052
+ noBorder: this.loginPageConfig.cardConfig?.noBorder ?? true,
3053
+ width: this.loginPageConfig.cardConfig?.width ?? '400px',
3054
+ padding: this.loginPageConfig.cardConfig?.padding ?? '40px',
3055
+ ...this.loginPageConfig.cardConfig,
3056
+ };
3057
+ // Initialize usernameField
3058
+ this.loginPageConfig.usernameField = {
3059
+ name: this.loginPageConfig.usernameField?.name || 'username',
3060
+ label: this.loginPageConfig.usernameField?.label || "Nom d'utilisateur",
3061
+ required: this.loginPageConfig.usernameField?.required ?? true,
3062
+ placeholder: this.loginPageConfig.usernameField?.placeholder ||
3063
+ "Entrer votre nom d'utilisateur",
3064
+ ...this.loginPageConfig.usernameField,
3065
+ };
3066
+ // Initialize passwordField
3067
+ this.loginPageConfig.passwordField = {
3068
+ name: this.loginPageConfig.passwordField?.name || 'password',
3069
+ label: this.loginPageConfig.passwordField?.label || 'Mot de passe',
3070
+ required: this.loginPageConfig.passwordField?.required ?? true,
3071
+ placeholder: this.loginPageConfig.passwordField?.placeholder ||
3072
+ 'Entrer votre mot de passe',
3073
+ type: this.loginPageConfig.passwordField?.type || FormInputTypeEnum.PASSWORD,
3074
+ ...this.loginPageConfig.passwordField,
3075
+ };
3076
+ // Initialize buttonConfig
3077
+ this.loginPageConfig.buttonConfig = {
3078
+ label: this.loginPageConfig.buttonConfig?.label || 'Login',
3079
+ type: this.loginPageConfig.buttonConfig?.type || 'submit',
3080
+ icon: this.loginPageConfig.buttonConfig?.icon || 'pi pi-sign-in',
3081
+ iconPos: this.loginPageConfig.buttonConfig?.iconPos || 'left',
3082
+ styleClass: this.loginPageConfig.buttonConfig?.styleClass || 'p-button-success',
3083
+ disabled: this.loginPageConfig.buttonConfig?.disabled ?? true,
3084
+ width: this.loginPageConfig.buttonConfig?.width ?? '100%',
3085
+ ...this.loginPageConfig.buttonConfig,
3086
+ };
3087
+ }
3088
+ setBackgroundImageStyle() {
3089
+ const transparency = parseFloat(this.loginPageConfig?.backgroundImage?.transparencyPercentage) / 100;
3090
+ this.backgroundImageStyle = `linear-gradient(rgba(255,255,255,${1 - transparency}), rgba(255,255,255,${1 - transparency})), url(${this.loginPageConfig?.backgroundImage?.imageUrl})`;
3091
+ }
3092
+ login() {
3093
+ if (this.formGroup.valid) {
3094
+ this.loginSubmit.emit(this.formGroup.value);
3095
+ }
3096
+ else {
3097
+ this.loginPageConfig.login.errorMessage =
3098
+ this.loginPageConfig.login?.emptyFieldsErrorMessage;
3099
+ }
3100
+ }
3101
+ // Setup form fields using the usernameField and passwordField from LoginPageConfig
3102
+ setupFormFields() {
3103
+ const usernameValidators = this.loginPageConfig.usernameField?.required
3104
+ ? [Validators.required]
3105
+ : [];
3106
+ const passwordValidators = this.loginPageConfig.passwordField?.required
3107
+ ? [Validators.required]
3108
+ : [];
3109
+ this.formGroup.addControl(this.loginPageConfig.usernameField.name, this.fb.control(this.loginPageConfig.login?.username, usernameValidators));
3110
+ this.formGroup.addControl(this.loginPageConfig.passwordField.name, this.fb.control(this.loginPageConfig.login?.password, passwordValidators));
3111
+ }
3112
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTLoginPageComponent, deps: [{ token: i2$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
3113
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTLoginPageComponent, selector: "pt-login-page", inputs: { loginPageConfig: "loginPageConfig" }, outputs: { loginSubmit: "loginSubmit" }, ngImport: i0, template: "<div\n class=\"login-container\"\n [ngStyle]=\"{\n 'background-image': backgroundImageStyle\n }\"\n>\n <pt-card [config]=\"loginPageConfig.cardConfig!\">\n <div class=\"logo-container\" *ngIf=\"loginPageConfig.logoUrl?.imageUrl\">\n <img\n [src]=\"loginPageConfig.logoUrl?.imageUrl\"\n [alt]=\"loginPageConfig.logoUrl?.altText\"\n [style.width]=\"loginPageConfig.logoUrl?.width\"\n [style.height]=\"loginPageConfig.logoUrl?.height\"\n />\n </div>\n\n <div\n class=\"title-container\"\n [ngStyle]=\"{ 'text-align': loginPageConfig.title?.position }\"\n >\n <h1\n [ngStyle]=\"{\n color: loginPageConfig.title?.color,\n 'font-size': loginPageConfig.title?.fontSize\n }\"\n >\n {{ loginPageConfig.title?.text }}\n </h1>\n </div>\n\n <form class=\"form-container\" [formGroup]=\"formGroup\" (ngSubmit)=\"login()\">\n <div *ngIf=\"loginPageConfig.login?.errorMessage\" class=\"error-message\">\n {{ loginPageConfig.login?.errorMessage }}\n </div>\n <div class=\"field\">\n <pt-text-input\n [formGroup]=\"formGroup\"\n [formField]=\"loginPageConfig.usernameField!\"\n ></pt-text-input>\n </div>\n <div class=\"field\">\n <pt-text-input\n [formGroup]=\"formGroup\"\n [formField]=\"loginPageConfig.passwordField!\"\n ></pt-text-input>\n </div>\n <div class=\"submit-btn\">\n <pt-button [buttonConfig]=\"loginPageConfig.buttonConfig!\"></pt-button>\n </div>\n </form>\n\n <div class=\"login-footer\">\n {{ loginPageConfig.footer?.version }}\n <span>{{ loginPageConfig.footer?.copyright }}</span>\n </div>\n </pt-card>\n</div>\n", styles: [".login-container{background-size:cover;background-position:center;background-repeat:no-repeat;height:100vh;width:100vw;display:flex;justify-content:center;align-items:center}.error-message{color:red;background-color:#ffe6e6;border:1px solid red;padding:10px;margin-bottom:10px;border-radius:5px;width:100%}.logo-container{display:flex;justify-content:center;align-items:center;margin-bottom:20px}.title-container{text-align:center;margin-bottom:20px}.field{display:flex;flex-direction:column;margin-bottom:20px;width:100%}.submit-btn{display:flex;justify-content:center;width:100%}::ng-deep pt-button{width:100%}::ng-deep .submit-btn p-button button{width:100%}@media (max-width: 768px){.submit-btn{min-width:100%}}.login-footer{margin-top:20px;text-align:center;font-size:.9em;color:#555}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: PTTextInputComponent, selector: "pt-text-input", inputs: ["formGroup", "formField"] }, { kind: "component", type: PTCardComponent, selector: "pt-card", inputs: ["config"] }, { kind: "component", type: PTButtonComponent, selector: "pt-button", inputs: ["buttonConfig"] }] }); }
3114
+ }
3115
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTLoginPageComponent, decorators: [{
3116
+ type: Component,
3117
+ args: [{ selector: 'pt-login-page', template: "<div\n class=\"login-container\"\n [ngStyle]=\"{\n 'background-image': backgroundImageStyle\n }\"\n>\n <pt-card [config]=\"loginPageConfig.cardConfig!\">\n <div class=\"logo-container\" *ngIf=\"loginPageConfig.logoUrl?.imageUrl\">\n <img\n [src]=\"loginPageConfig.logoUrl?.imageUrl\"\n [alt]=\"loginPageConfig.logoUrl?.altText\"\n [style.width]=\"loginPageConfig.logoUrl?.width\"\n [style.height]=\"loginPageConfig.logoUrl?.height\"\n />\n </div>\n\n <div\n class=\"title-container\"\n [ngStyle]=\"{ 'text-align': loginPageConfig.title?.position }\"\n >\n <h1\n [ngStyle]=\"{\n color: loginPageConfig.title?.color,\n 'font-size': loginPageConfig.title?.fontSize\n }\"\n >\n {{ loginPageConfig.title?.text }}\n </h1>\n </div>\n\n <form class=\"form-container\" [formGroup]=\"formGroup\" (ngSubmit)=\"login()\">\n <div *ngIf=\"loginPageConfig.login?.errorMessage\" class=\"error-message\">\n {{ loginPageConfig.login?.errorMessage }}\n </div>\n <div class=\"field\">\n <pt-text-input\n [formGroup]=\"formGroup\"\n [formField]=\"loginPageConfig.usernameField!\"\n ></pt-text-input>\n </div>\n <div class=\"field\">\n <pt-text-input\n [formGroup]=\"formGroup\"\n [formField]=\"loginPageConfig.passwordField!\"\n ></pt-text-input>\n </div>\n <div class=\"submit-btn\">\n <pt-button [buttonConfig]=\"loginPageConfig.buttonConfig!\"></pt-button>\n </div>\n </form>\n\n <div class=\"login-footer\">\n {{ loginPageConfig.footer?.version }}\n <span>{{ loginPageConfig.footer?.copyright }}</span>\n </div>\n </pt-card>\n</div>\n", styles: [".login-container{background-size:cover;background-position:center;background-repeat:no-repeat;height:100vh;width:100vw;display:flex;justify-content:center;align-items:center}.error-message{color:red;background-color:#ffe6e6;border:1px solid red;padding:10px;margin-bottom:10px;border-radius:5px;width:100%}.logo-container{display:flex;justify-content:center;align-items:center;margin-bottom:20px}.title-container{text-align:center;margin-bottom:20px}.field{display:flex;flex-direction:column;margin-bottom:20px;width:100%}.submit-btn{display:flex;justify-content:center;width:100%}::ng-deep pt-button{width:100%}::ng-deep .submit-btn p-button button{width:100%}@media (max-width: 768px){.submit-btn{min-width:100%}}.login-footer{margin-top:20px;text-align:center;font-size:.9em;color:#555}\n"] }]
3118
+ }], ctorParameters: () => [{ type: i2$1.FormBuilder }], propDecorators: { loginPageConfig: [{
3119
+ type: Input
3120
+ }], loginSubmit: [{
3121
+ type: Output
3122
+ }] } });
3123
+
3124
+ class PTButtonModule {
3125
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3126
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.11", ngImport: i0, type: PTButtonModule, declarations: [PTButtonComponent], imports: [CommonModule, ButtonModule], exports: [PTButtonComponent] }); }
3127
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTButtonModule, imports: [CommonModule, ButtonModule] }); }
3128
+ }
3129
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTButtonModule, decorators: [{
3130
+ type: NgModule,
3131
+ args: [{
3132
+ declarations: [PTButtonComponent],
3133
+ imports: [CommonModule, ButtonModule],
3134
+ exports: [PTButtonComponent],
3135
+ }]
3136
+ }] });
3137
+
3138
+ class PTLoginPageModule {
3139
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTLoginPageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3140
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.11", ngImport: i0, type: PTLoginPageModule, declarations: [PTLoginPageComponent], imports: [CommonModule,
3141
+ FormsModule,
3142
+ ReactiveFormsModule,
3143
+ PTTextInputModule,
3144
+ PTCardModule,
3145
+ PTButtonModule], exports: [PTLoginPageComponent] }); }
3146
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTLoginPageModule, imports: [CommonModule,
3147
+ FormsModule,
3148
+ ReactiveFormsModule,
3149
+ PTTextInputModule,
3150
+ PTCardModule,
3151
+ PTButtonModule] }); }
3152
+ }
3153
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTLoginPageModule, decorators: [{
3154
+ type: NgModule,
3155
+ args: [{
3156
+ declarations: [PTLoginPageComponent],
3157
+ imports: [
3158
+ CommonModule,
3159
+ FormsModule,
3160
+ ReactiveFormsModule,
3161
+ PTTextInputModule,
3162
+ PTCardModule,
3163
+ PTButtonModule,
3164
+ ],
3165
+ exports: [PTLoginPageComponent],
3166
+ }]
3167
+ }] });
3168
+
3169
+ class PTDialogComponent {
3170
+ constructor(confirmationService, messageService, renderer, el) {
3171
+ this.confirmationService = confirmationService;
3172
+ this.messageService = messageService;
3173
+ this.renderer = renderer;
3174
+ this.el = el;
3175
+ this.dialogModel = {
3176
+ header: { text: 'Confirmation' },
3177
+ visible: false,
3178
+ width: '400px',
3179
+ height: 'auto',
3180
+ content: 'Do you want to proceed?',
3181
+ confirmButtonConfig: {
3182
+ label: 'Confirm',
3183
+ fontColor: '#fff',
3184
+ backgroundColor: '#007bff',
3185
+ },
3186
+ cancelButtonConfig: {
3187
+ label: 'Cancel',
3188
+ fontColor: '#fff',
3189
+ backgroundColor: '#6c757d',
3190
+ },
3191
+ };
3192
+ this.confirm = new EventEmitter();
3193
+ this.cancel = new EventEmitter();
3194
+ }
3195
+ ngOnChanges(changes) {
3196
+ if (changes['dialogModel'] && this.dialogModel.visible) {
3197
+ this.showDialog();
3198
+ }
3199
+ }
3200
+ showDialog() {
3201
+ this.confirmationService.confirm({
3202
+ header: this.dialogModel.header?.text || 'Confirmation',
3203
+ message: this.dialogModel.content || 'Are you sure?',
3204
+ acceptButtonStyleClass: this.getButtonStyle(this.dialogModel.confirmButtonConfig),
3205
+ rejectButtonStyleClass: this.getButtonStyle(this.dialogModel.cancelButtonConfig),
3206
+ acceptIcon: this.dialogModel.confirmButtonConfig?.icon || 'pi pi-check',
3207
+ rejectIcon: this.dialogModel.cancelButtonConfig?.icon || 'pi pi-times',
3208
+ accept: () => {
3209
+ this.confirm.emit();
3210
+ this.messageService.add({
3211
+ severity: 'info',
3212
+ summary: 'Confirmed',
3213
+ detail: 'Action confirmed',
3214
+ life: 3000,
3215
+ });
3216
+ },
3217
+ reject: (type) => {
3218
+ this.cancel.emit();
3219
+ if (type === ConfirmEventType.REJECT) {
3220
+ this.messageService.add({
3221
+ severity: 'error',
3222
+ summary: 'Rejected',
3223
+ detail: 'Action cancelled',
3224
+ life: 3000,
3225
+ });
3226
+ }
3227
+ },
3228
+ });
3229
+ // Use renderer to apply dynamic styles
3230
+ setTimeout(() => {
3231
+ const dialogElement = this.el.nativeElement.querySelector('.p-dialog');
3232
+ if (dialogElement) {
3233
+ this.renderer.setStyle(dialogElement, 'width', this.dialogModel.width || '400px');
3234
+ this.renderer.setStyle(dialogElement, 'height', this.dialogModel.height || 'auto');
3235
+ }
3236
+ }, 0);
3237
+ }
3238
+ getButtonStyle(buttonConfig) {
3239
+ return buttonConfig?.styleClass || 'p-button-sm'; // Default to small button style
3240
+ }
3241
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTDialogComponent, deps: [{ token: i1$1.ConfirmationService }, { token: i1$1.MessageService }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
3242
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTDialogComponent, selector: "pt-dialog", inputs: { dialogModel: "dialogModel" }, outputs: { confirm: "confirm", cancel: "cancel" }, providers: [ConfirmationService, MessageService], usesOnChanges: true, ngImport: i0, template: "<div>\n <p-toast></p-toast>\n <p-confirmDialog>\n <ng-template pTemplate=\"message\" let-message>\n <div\n class=\"flex flex-column align-items-center w-full gap-3 border-bottom-1 surface-border\"\n >\n <i [class]=\"dialogModel.header?.icon || 'pi pi-exclamation-circle'\"></i>\n <p>{{ message.message }}</p>\n </div>\n </ng-template>\n </p-confirmDialog>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i2$3.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "component", type: i3$7.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }] }); }
3243
+ }
3244
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTDialogComponent, decorators: [{
3245
+ type: Component,
3246
+ args: [{ selector: 'pt-dialog', providers: [ConfirmationService, MessageService], template: "<div>\n <p-toast></p-toast>\n <p-confirmDialog>\n <ng-template pTemplate=\"message\" let-message>\n <div\n class=\"flex flex-column align-items-center w-full gap-3 border-bottom-1 surface-border\"\n >\n <i [class]=\"dialogModel.header?.icon || 'pi pi-exclamation-circle'\"></i>\n <p>{{ message.message }}</p>\n </div>\n </ng-template>\n </p-confirmDialog>\n</div>\n" }]
3247
+ }], ctorParameters: () => [{ type: i1$1.ConfirmationService }, { type: i1$1.MessageService }, { type: i0.Renderer2 }, { type: i0.ElementRef }], propDecorators: { dialogModel: [{
3248
+ type: Input
3249
+ }], confirm: [{
3250
+ type: Output
3251
+ }], cancel: [{
3252
+ type: Output
3253
+ }] } });
3254
+
3255
+ class PTDialogModule {
3256
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3257
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.11", ngImport: i0, type: PTDialogModule, declarations: [PTDialogComponent], imports: [CommonModule,
3258
+ DialogModule,
3259
+ PTButtonModule,
3260
+ ToastModule,
3261
+ ConfirmDialogModule], exports: [PTDialogComponent] }); }
3262
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTDialogModule, imports: [CommonModule,
3263
+ DialogModule,
3264
+ PTButtonModule,
3265
+ ToastModule,
3266
+ ConfirmDialogModule] }); }
3267
+ }
3268
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTDialogModule, decorators: [{
3269
+ type: NgModule,
3270
+ args: [{
3271
+ declarations: [PTDialogComponent],
3272
+ imports: [
3273
+ CommonModule,
3274
+ DialogModule,
3275
+ PTButtonModule,
3276
+ ToastModule,
3277
+ ConfirmDialogModule,
3278
+ ],
3279
+ exports: [PTDialogComponent],
3280
+ }]
3281
+ }] });
3282
+
1705
3283
  class NgPrimeToolsModule {
1706
3284
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: NgPrimeToolsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1707
3285
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.11", ngImport: i0, type: NgPrimeToolsModule, imports: [CommonModule,
@@ -1715,7 +3293,33 @@ class NgPrimeToolsModule {
1715
3293
  PTNumberInputModule,
1716
3294
  PTSwitchInputModule,
1717
3295
  PTTextAreaInputModule,
1718
- PTTextInputModule], exports: [NgAdvancedPrimeTableModule,
3296
+ PTTextInputModule,
3297
+ // Dashboard
3298
+ PTMetricCardModule,
3299
+ PTMetricCardGroupModule,
3300
+ // Chart
3301
+ PTChartModule,
3302
+ // Cards
3303
+ PTCardModule,
3304
+ // Menu
3305
+ PTMenuModule,
3306
+ PTMenuFancyModule,
3307
+ // Navbar
3308
+ PTNavbarMenuModule,
3309
+ // SideBar
3310
+ PTSideBarMenuModule,
3311
+ // Page skeleton
3312
+ PTPageSkeletonModule,
3313
+ // Footer
3314
+ PTFooterModule,
3315
+ // BreadCrumb
3316
+ PTBreadCrumbModule,
3317
+ // Login
3318
+ PTLoginPageModule,
3319
+ // Button
3320
+ PTButtonModule,
3321
+ // Dialog
3322
+ PTDialogModule], exports: [NgAdvancedPrimeTableModule,
1719
3323
  MultiSearchCriteriaModule,
1720
3324
  // Inputs
1721
3325
  PTCheckBoxInputModule,
@@ -1724,7 +3328,33 @@ class NgPrimeToolsModule {
1724
3328
  PTNumberInputModule,
1725
3329
  PTSwitchInputModule,
1726
3330
  PTTextAreaInputModule,
1727
- PTTextInputModule] }); }
3331
+ PTTextInputModule,
3332
+ // Dashboard
3333
+ PTMetricCardModule,
3334
+ PTMetricCardGroupModule,
3335
+ // Chart
3336
+ PTChartModule,
3337
+ // Cards
3338
+ PTCardModule,
3339
+ // Menu
3340
+ PTMenuModule,
3341
+ PTMenuFancyModule,
3342
+ // Navbar
3343
+ PTNavbarMenuModule,
3344
+ // SideBar
3345
+ PTSideBarMenuModule,
3346
+ // Page skeleton
3347
+ PTPageSkeletonModule,
3348
+ // Footer
3349
+ PTFooterModule,
3350
+ // BreadCrumb
3351
+ PTBreadCrumbModule,
3352
+ // Login
3353
+ PTLoginPageModule,
3354
+ // Button
3355
+ PTButtonModule,
3356
+ // Dialog
3357
+ PTDialogModule] }); }
1728
3358
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: NgPrimeToolsModule, imports: [CommonModule,
1729
3359
  FormsModule,
1730
3360
  NgAdvancedPrimeTableModule,
@@ -1736,7 +3366,33 @@ class NgPrimeToolsModule {
1736
3366
  PTNumberInputModule,
1737
3367
  PTSwitchInputModule,
1738
3368
  PTTextAreaInputModule,
1739
- PTTextInputModule, NgAdvancedPrimeTableModule,
3369
+ PTTextInputModule,
3370
+ // Dashboard
3371
+ PTMetricCardModule,
3372
+ PTMetricCardGroupModule,
3373
+ // Chart
3374
+ PTChartModule,
3375
+ // Cards
3376
+ PTCardModule,
3377
+ // Menu
3378
+ PTMenuModule,
3379
+ PTMenuFancyModule,
3380
+ // Navbar
3381
+ PTNavbarMenuModule,
3382
+ // SideBar
3383
+ PTSideBarMenuModule,
3384
+ // Page skeleton
3385
+ PTPageSkeletonModule,
3386
+ // Footer
3387
+ PTFooterModule,
3388
+ // BreadCrumb
3389
+ PTBreadCrumbModule,
3390
+ // Login
3391
+ PTLoginPageModule,
3392
+ // Button
3393
+ PTButtonModule,
3394
+ // Dialog
3395
+ PTDialogModule, NgAdvancedPrimeTableModule,
1740
3396
  MultiSearchCriteriaModule,
1741
3397
  // Inputs
1742
3398
  PTCheckBoxInputModule,
@@ -1745,7 +3401,33 @@ class NgPrimeToolsModule {
1745
3401
  PTNumberInputModule,
1746
3402
  PTSwitchInputModule,
1747
3403
  PTTextAreaInputModule,
1748
- PTTextInputModule] }); }
3404
+ PTTextInputModule,
3405
+ // Dashboard
3406
+ PTMetricCardModule,
3407
+ PTMetricCardGroupModule,
3408
+ // Chart
3409
+ PTChartModule,
3410
+ // Cards
3411
+ PTCardModule,
3412
+ // Menu
3413
+ PTMenuModule,
3414
+ PTMenuFancyModule,
3415
+ // Navbar
3416
+ PTNavbarMenuModule,
3417
+ // SideBar
3418
+ PTSideBarMenuModule,
3419
+ // Page skeleton
3420
+ PTPageSkeletonModule,
3421
+ // Footer
3422
+ PTFooterModule,
3423
+ // BreadCrumb
3424
+ PTBreadCrumbModule,
3425
+ // Login
3426
+ PTLoginPageModule,
3427
+ // Button
3428
+ PTButtonModule,
3429
+ // Dialog
3430
+ PTDialogModule] }); }
1749
3431
  }
1750
3432
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: NgPrimeToolsModule, decorators: [{
1751
3433
  type: NgModule,
@@ -1763,6 +3445,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
1763
3445
  PTSwitchInputModule,
1764
3446
  PTTextAreaInputModule,
1765
3447
  PTTextInputModule,
3448
+ // Dashboard
3449
+ PTMetricCardModule,
3450
+ PTMetricCardGroupModule,
3451
+ // Chart
3452
+ PTChartModule,
3453
+ // Cards
3454
+ PTCardModule,
3455
+ // Menu
3456
+ PTMenuModule,
3457
+ PTMenuFancyModule,
3458
+ // Navbar
3459
+ PTNavbarMenuModule,
3460
+ // SideBar
3461
+ PTSideBarMenuModule,
3462
+ // Page skeleton
3463
+ PTPageSkeletonModule,
3464
+ // Footer
3465
+ PTFooterModule,
3466
+ // BreadCrumb
3467
+ PTBreadCrumbModule,
3468
+ // Login
3469
+ PTLoginPageModule,
3470
+ // Button
3471
+ PTButtonModule,
3472
+ // Dialog
3473
+ PTDialogModule,
1766
3474
  ],
1767
3475
  exports: [
1768
3476
  NgAdvancedPrimeTableModule,
@@ -1775,18 +3483,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
1775
3483
  PTSwitchInputModule,
1776
3484
  PTTextAreaInputModule,
1777
3485
  PTTextInputModule,
3486
+ // Dashboard
3487
+ PTMetricCardModule,
3488
+ PTMetricCardGroupModule,
3489
+ // Chart
3490
+ PTChartModule,
3491
+ // Cards
3492
+ PTCardModule,
3493
+ // Menu
3494
+ PTMenuModule,
3495
+ PTMenuFancyModule,
3496
+ // Navbar
3497
+ PTNavbarMenuModule,
3498
+ // SideBar
3499
+ PTSideBarMenuModule,
3500
+ // Page skeleton
3501
+ PTPageSkeletonModule,
3502
+ // Footer
3503
+ PTFooterModule,
3504
+ // BreadCrumb
3505
+ PTBreadCrumbModule,
3506
+ // Login
3507
+ PTLoginPageModule,
3508
+ // Button
3509
+ PTButtonModule,
3510
+ // Dialog
3511
+ PTDialogModule,
1778
3512
  ],
1779
3513
  }]
1780
3514
  }] });
1781
3515
 
1782
- /**
1783
- * Generated bundle index. Do not edit.
1784
- */
1785
- /// <amd-module name="ng-prime-tools/models" />
3516
+ // Advanced table
1786
3517
 
1787
3518
  /**
1788
3519
  * Generated bundle index. Do not edit.
1789
3520
  */
1790
3521
 
1791
- export { ButtonColorEnum, FormInputTypeEnum, InputValidationEnum, MultiSearchCriteriaComponent, MultiSearchCriteriaModule, NgAdvancedPrimeTableComponent, NgAdvancedPrimeTableModule, NgPrimeToolsModule, PTCheckBoxInputComponent, PTCheckBoxInputModule, PTDateInputComponent, PTDateInputModule, PTDropdownComponent, PTDropdownModule, PTFormBuilderComponent, PTFormBuilderModule, PTNumberInputComponent, PTNumberInputModule, PTSwitchInputComponent, PTSwitchInputModule, PTTextAreaInputComponent, PTTextAreaInputModule, PTTextInputComponent, PTTextInputModule, SearchCriteriaTypeEnum, TableTypeEnum };
3522
+ export { BadgeType, BadgeTypeStyles, ButtonColorEnum, FormInputTypeEnum, InputValidationEnum, MultiSearchCriteriaComponent, MultiSearchCriteriaModule, NgAdvancedPrimeTableComponent, NgAdvancedPrimeTableModule, NgPrimeToolsModule, PTBreadCrumbComponent, PTBreadCrumbModule, PTButtonComponent, PTButtonModule, PTCardComponent, PTCardModule, PTChartComponent, PTChartModule, PTCheckBoxInputComponent, PTCheckBoxInputModule, PTDateInputComponent, PTDateInputModule, PTDialogComponent, PTDialogModule, PTDropdownComponent, PTDropdownModule, PTFooterComponent, PTFooterModule, PTFormBuilderComponent, PTFormBuilderModule, PTLoginPageComponent, PTLoginPageModule, PTMenuComponent, PTMenuFancyComponent, PTMenuFancyModule, PTMenuModule, PTMetricCardComponent, PTMetricCardGroupComponent, PTMetricCardGroupModule, PTMetricCardModule, PTNavbarMenuComponent, PTNavbarMenuModule, PTNumberInputComponent, PTNumberInputModule, PTPageSkeletonComponent, PTPageSkeletonModule, PTSideBarMenuComponent, PTSideBarMenuModule, PTSwitchInputComponent, PTSwitchInputModule, PTTextAreaInputComponent, PTTextAreaInputModule, PTTextInputComponent, PTTextInputModule, SearchCriteriaTypeEnum, TableTypeEnum };
1792
3523
  //# sourceMappingURL=ng-prime-tools.mjs.map