@masterteam/components 0.0.263 → 0.0.265

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 (755) hide show
  1. package/.angular/cache/21.2.7/@masterteam/components/.tsbuildinfo +1 -0
  2. package/.angular/cache/21.2.7/@masterteam/components/angular-compiler.db +0 -0
  3. package/.angular/cache/21.2.7/@masterteam/components/angular-compiler.db-lock +0 -0
  4. package/.angular/cache/21.2.7/ng-packagr/045efd332b9db1d21b3a595a37ae03ebb11b457a5dc6e2d1cbc561b694e17f1a +1 -0
  5. package/.angular/cache/21.2.7/ng-packagr/0727b170af3d53236c0cafe16ea670d089e48d4c5c525b1dbcc1c684bb6e99c7 +1 -0
  6. package/.angular/cache/21.2.7/ng-packagr/0873bc9048494ebc33fe0a7b856324c7c4ca681b0dcaa87338e3290186906d49 +1 -0
  7. package/.angular/cache/21.2.7/ng-packagr/1010cd8fc996d0c2df519ed60085f4b1f38ccfc873900055bc75fc20a3c26bab +1 -0
  8. package/.angular/cache/21.2.7/ng-packagr/12379a8ab7254ad3df2635823a358cfce32e6d0f390be68596cc97e02307e6c4 +1 -0
  9. package/.angular/cache/21.2.7/ng-packagr/1239e7a937657b62f858d17d47738ed30facbdaa91032511e29ed148b748400b +1 -0
  10. package/.angular/cache/21.2.7/ng-packagr/133b9ecf47ba424244902da90d77cd3f135b85f95c01b16de7b2247f57518f01 +1 -0
  11. package/.angular/cache/21.2.7/ng-packagr/175d45dc6da51834e7fe937c09d23dbf28d2a823f838ef5271fd3e148776d6ec +1 -0
  12. package/.angular/cache/21.2.7/ng-packagr/19d99ad4d927324b03cdbef34331ba2c58bd580f1f0ca591cb5f8dbf436c913c +1 -0
  13. package/.angular/cache/21.2.7/ng-packagr/1a86918763f95c1c2b9fa781bda1ceedf15aead87f0e11ea1324318af43a897a +1 -0
  14. package/.angular/cache/21.2.7/ng-packagr/1f08100dbc280be7da64c809315376eb7d0cfd074916a6042f609f03f4276a8e +1 -0
  15. package/.angular/cache/21.2.7/ng-packagr/2224877a7e762b86541428e4c40d61f54f505867c305769ae42e67e4aa81bd93 +1 -0
  16. package/.angular/cache/21.2.7/ng-packagr/24957fb7ec060692ebcf1471e1bdce39f40aed938959e580048ade58015762d2 +1 -0
  17. package/.angular/cache/21.2.7/ng-packagr/295fcdc1c4462e7feae96a24255369508a559faaecc4676267749a7ce23e4b6d +1 -0
  18. package/.angular/cache/21.2.7/ng-packagr/2b37e2f2d6564d10bad1fd0ecc16453962fd855cd1e36ad7aa24baf3e4f2e8b3 +1 -0
  19. package/.angular/cache/21.2.7/ng-packagr/2c20f0929771e857b570ba2beffe91f598f299ce26d4825fe4315bfe5a3dd40a +1 -0
  20. package/.angular/cache/21.2.7/ng-packagr/37dea2e5798cad4a21d66292eeed5be26d04500d9a1534332ad42ce664a058c2 +1 -0
  21. package/.angular/cache/21.2.7/ng-packagr/3b6239b640fcb5ea7067a2655a2901d32f55372812b586aa008e77c59e8f2090 +1 -0
  22. package/.angular/cache/21.2.7/ng-packagr/3beb1b4dfe75d1e6749cf91f05d51ba4eece939f5c15f6f33ed587bfd198f0a3 +1 -0
  23. package/.angular/cache/21.2.7/ng-packagr/3f161e6c2ead4519d0663dd79199dafceb2cc22da7ce92a72b809b93bfce0bb0 +1 -0
  24. package/.angular/cache/21.2.7/ng-packagr/43551862d17cd02626e18b30243390081a6247784485660048b060a3d4ab7fa7 +1 -0
  25. package/.angular/cache/21.2.7/ng-packagr/47aedf032519b41d96866fcf8fbd4f1dfd29f9e9a534b39dee0e44d402227d2d +1 -0
  26. package/.angular/cache/21.2.7/ng-packagr/4a1768888c60921955bfdfba8b31c8d853bd7b2a7d3a7b83934de049e1e6e6a2 +1 -0
  27. package/.angular/cache/21.2.7/ng-packagr/4a783e339117597607bff17eeca0ad24d84b8cbc1e28927e7e453ccfa6223180 +1 -0
  28. package/.angular/cache/21.2.7/ng-packagr/4d9331b2050326f586cd8f6593a9e04e1c7944b2f9e98023649023c099597a5d +1 -0
  29. package/.angular/cache/21.2.7/ng-packagr/4e379f506919d47af7008658c75242aa05f0056c1caec4061d7fa5746f776049 +1 -0
  30. package/.angular/cache/21.2.7/ng-packagr/55009bb7d44552dd816ce32fa2b0f7985f3f08fefd6409c2b4f6b9ffe35dad83 +1 -0
  31. package/.angular/cache/21.2.7/ng-packagr/58ae3f1f9664f7b16844d2e4a279dd4ca9371de014cf5687320c2d5cb259a74f +1 -0
  32. package/.angular/cache/21.2.7/ng-packagr/5c08e906bd3fe1aa6c1d62f2bbb2b3f276e1c17fe45ef081e76bd1b865ac3dfa +1 -0
  33. package/.angular/cache/21.2.7/ng-packagr/5ce333a40ad635188347fa9bc601d5fd14be6baacbae7d096259d725ac9757af +1 -0
  34. package/.angular/cache/21.2.7/ng-packagr/5f32cceaee6a6ea19cc6cbff5ea089b752f13a0fdcd32597d4c99d5e1e031bb5 +1 -0
  35. package/.angular/cache/21.2.7/ng-packagr/691ad4ccdc0a8ede36e1f4e5e97638c20c2d3142916ffac3a1b172178c139205 +1 -0
  36. package/.angular/cache/21.2.7/ng-packagr/6b57160e0d2da3f31693831e84a3f4209c1f33a04abd636e34af03956e7329d8 +1 -0
  37. package/.angular/cache/21.2.7/ng-packagr/70bc711a1d7b631845885c26adc2d6b1bff47d11332b2625cedfa11e9d5ac79a +1 -0
  38. package/.angular/cache/21.2.7/ng-packagr/7427c266237012afaef486c2af94ee08a491e8d7b6fc7e5ee887980830bbd333 +1 -0
  39. package/.angular/cache/21.2.7/ng-packagr/7e8fa7c61cf9a932ba3a0e65eb73c7412e81666b7a8f923dac7b75acfbb94b1d +1 -0
  40. package/.angular/cache/21.2.7/ng-packagr/81aab7fdab43cbdfa869db759d6113ae01ec6f5e0e9061d7fc089c260886e4d1 +1 -0
  41. package/.angular/cache/21.2.7/ng-packagr/83a81758045ff710a34ea3cf6f54435a1f5dea9839d8c0adda0bbce7c3fb6e8b +1 -0
  42. package/.angular/cache/21.2.7/ng-packagr/883eae810a4c09f06617bdc2e4bc30a69f09726401b2a051840969f635d076f1 +1 -0
  43. package/.angular/cache/21.2.7/ng-packagr/8a6b9be66de40c57054dca5fde376c3cec1bec1ae191a16f1ae6a83306d9ebfe +1 -0
  44. package/.angular/cache/21.2.7/ng-packagr/8d42c8144f6929de46984094bf390a0c4168404ab13a5194839f6ba5e42bc3ce +1 -0
  45. package/.angular/cache/21.2.7/ng-packagr/91093656c61a5404f0d576f872247eeb480dd938e6999d481a97893c72b5f3d0 +1 -0
  46. package/.angular/cache/21.2.7/ng-packagr/91e881172037c63d819e30d30e390e0d7dc0dee9808b3902275ccc8b1887d864 +1 -0
  47. package/.angular/cache/21.2.7/ng-packagr/9ef28cf3a676e7bd0d37762c4868b4810efca2f241ed0dae75ebca41988e2c00 +1 -0
  48. package/.angular/cache/21.2.7/ng-packagr/a07cbea405c1831b3f686a8e57c4b500d89cbab2b95e110487890269945feeaa +1 -0
  49. package/.angular/cache/21.2.7/ng-packagr/a463deba940880d9461612c9cd00d90062bf97aa31b1c4556b8b47a967cb6882 +1 -0
  50. package/.angular/cache/21.2.7/ng-packagr/ab03ed1e4a371113b41b663d526d2b06565ceb062e6f033f726f1e455fc5d1d6 +1 -0
  51. package/.angular/cache/21.2.7/ng-packagr/ad0e84be4f2211aff6187b4bec9adbe15f0e8b36851e9c6c63b38303c2daad37 +1 -0
  52. package/.angular/cache/21.2.7/ng-packagr/aece79242dae70eb748605e37483e75e122e4ce414fa8be875499e8af26ee5d6 +1 -0
  53. package/.angular/cache/21.2.7/ng-packagr/aff32db91ce03de30d2bbc84f266fe3fb2c6629d5eeb39a364204d9499484368 +1 -0
  54. package/.angular/cache/21.2.7/ng-packagr/b0671e73a162927d28ef1742ec008e514264bc2ce29f2255bedaea553492fe5d +1 -0
  55. package/.angular/cache/21.2.7/ng-packagr/bb50d71f3cdeebbb85fd983be8103f9c216060464f8e7e534271197391e6dcf7 +1 -0
  56. package/.angular/cache/21.2.7/ng-packagr/c64241290ab30d8761b2f5493a039427f5cda1a48b5be88ce62ee5c714c0f690 +1 -0
  57. package/.angular/cache/21.2.7/ng-packagr/c794d2e79b26ab378c0dbf8afa7b8ac1337ba9afb288941d44a086cb1bd4bad2 +1 -0
  58. package/.angular/cache/21.2.7/ng-packagr/d942edf8fd8e8e884138ffcdb1a07ad14a0b5e211f8ccea1dc9ea0b48f50cfc9 +1 -0
  59. package/.angular/cache/21.2.7/ng-packagr/dbe0b9b9f18ba7b96d9c84f4fd16cde158c9701c202d00113e6f88ba93407bce +1 -0
  60. package/.angular/cache/21.2.7/ng-packagr/f564395a410a2723aac48e582f5fe416bfeaa48677cea47b10c5152d4f2b6672 +1 -0
  61. package/.angular/cache/21.2.7/ng-packagr/fc9b0d27f081ca7b2a4cbefa75136d7bd7a8c341dbaa0587855071a6003906b8 +1 -0
  62. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-avatar-text.tsbuildinfo +1 -0
  63. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-avatar.tsbuildinfo +1 -0
  64. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-breadcrumb.tsbuildinfo +1 -0
  65. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-business-fields.tsbuildinfo +1 -0
  66. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-button-group.tsbuildinfo +1 -0
  67. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-button.tsbuildinfo +1 -0
  68. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-card.tsbuildinfo +1 -0
  69. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-checkbox-field.tsbuildinfo +1 -0
  70. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-chip.tsbuildinfo +1 -0
  71. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-client-page-menu.tsbuildinfo +1 -0
  72. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-client-page.tsbuildinfo +1 -0
  73. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-color-picker-field.tsbuildinfo +1 -0
  74. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-confirmation.tsbuildinfo +1 -0
  75. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-date-field.tsbuildinfo +1 -0
  76. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-dialog.tsbuildinfo +1 -0
  77. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-drawer.tsbuildinfo +1 -0
  78. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-dynamic-drawer.tsbuildinfo +1 -0
  79. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-editor-field.tsbuildinfo +1 -0
  80. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-empty-state.tsbuildinfo +1 -0
  81. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-entities.tsbuildinfo +1 -0
  82. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-field-validation.tsbuildinfo +1 -0
  83. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-formula.tsbuildinfo +1 -0
  84. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-icon-field.tsbuildinfo +1 -0
  85. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-list.tsbuildinfo +1 -0
  86. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-location-field.tsbuildinfo +1 -0
  87. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-menu.tsbuildinfo +1 -0
  88. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-modal.tsbuildinfo +1 -0
  89. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-module-summary-card.tsbuildinfo +1 -0
  90. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-multi-select-field.tsbuildinfo +1 -0
  91. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-number-field.tsbuildinfo +1 -0
  92. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-page-header.tsbuildinfo +1 -0
  93. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-page.tsbuildinfo +1 -0
  94. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-paginator.tsbuildinfo +1 -0
  95. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-pick-list-field.tsbuildinfo +1 -0
  96. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-progress.tsbuildinfo +1 -0
  97. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-property-filter-builder.tsbuildinfo +1 -0
  98. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-radio-button-field.tsbuildinfo +1 -0
  99. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-radio-cards-field.tsbuildinfo +1 -0
  100. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-radio-cards.tsbuildinfo +1 -0
  101. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-runtime-action.tsbuildinfo +1 -0
  102. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-select-field.tsbuildinfo +1 -0
  103. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-sidebar.tsbuildinfo +1 -0
  104. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-slider-field.tsbuildinfo +1 -0
  105. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-statistic-card.tsbuildinfo +1 -0
  106. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-table.tsbuildinfo +1 -0
  107. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-tabs.tsbuildinfo +1 -0
  108. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-text-field.tsbuildinfo +1 -0
  109. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-textarea-field.tsbuildinfo +1 -0
  110. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-toast.tsbuildinfo +1 -0
  111. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-toggle-field.tsbuildinfo +1 -0
  112. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-tooltip.tsbuildinfo +1 -0
  113. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-topbar.tsbuildinfo +1 -0
  114. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-tree.tsbuildinfo +1 -0
  115. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-treeselect-field.tsbuildinfo +1 -0
  116. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-upload-field.tsbuildinfo +1 -0
  117. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-uploader.tsbuildinfo +1 -0
  118. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-user-search-field.tsbuildinfo +1 -0
  119. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components.tsbuildinfo +1 -0
  120. package/angular.json +32 -0
  121. package/api/api.ts +1 -0
  122. package/api/public-api.ts +5 -0
  123. package/assets/common.css +309 -2
  124. package/assets/i18n/ar.json +10 -2
  125. package/assets/i18n/en.json +10 -2
  126. package/avatar/avatar.html +32 -0
  127. package/avatar/avatar.scss +0 -0
  128. package/avatar/avatar.ts +54 -0
  129. package/avatar/ng-package.json +6 -0
  130. package/avatar/public-api.ts +1 -0
  131. package/avatar-text/avatar-text.html +26 -0
  132. package/avatar-text/avatar-text.scss +0 -0
  133. package/avatar-text/avatar-text.ts +52 -0
  134. package/avatar-text/ng-package.json +6 -0
  135. package/avatar-text/public-api.ts +1 -0
  136. package/breadcrumb/breadcrumb.html +53 -0
  137. package/breadcrumb/breadcrumb.scss +0 -0
  138. package/breadcrumb/breadcrumb.ts +26 -0
  139. package/breadcrumb/ng-package.json +6 -0
  140. package/breadcrumb/public-api.ts +1 -0
  141. package/business-fields/entity-list-field/entity-list-add-token.ts +25 -0
  142. package/business-fields/entity-list-field/entity-list-field.html +70 -0
  143. package/business-fields/entity-list-field/entity-list-field.scss +3 -0
  144. package/business-fields/entity-list-field/entity-list-field.ts +1067 -0
  145. package/business-fields/lookup-matrix-field/lookup-matrix-field.html +38 -0
  146. package/business-fields/lookup-matrix-field/lookup-matrix-field.spec.ts +183 -0
  147. package/business-fields/lookup-matrix-field/lookup-matrix-field.ts +239 -0
  148. package/business-fields/lookup-module-check-list-field/lookup-module-check-list-field.html +95 -0
  149. package/business-fields/lookup-module-check-list-field/lookup-module-check-list-field.ts +336 -0
  150. package/business-fields/lookup-module-check-list-field/lookup-module-check-list-form-token.ts +42 -0
  151. package/business-fields/ng-package.json +6 -0
  152. package/business-fields/public-api.ts +8 -0
  153. package/business-fields/schedule-item-selector-field/schedule-item-selector-field.html +32 -0
  154. package/business-fields/schedule-item-selector-field/schedule-item-selector-field.ts +272 -0
  155. package/business-fields/schedule-predecessor-field/schedule-predecessor-field.html +89 -0
  156. package/business-fields/schedule-predecessor-field/schedule-predecessor-field.ts +441 -0
  157. package/business-fields/schema-connection-field/schema-connection-field.html +58 -0
  158. package/business-fields/schema-connection-field/schema-connection-field.scss +0 -0
  159. package/business-fields/schema-connection-field/schema-connection-field.ts +456 -0
  160. package/button/button.html +44 -0
  161. package/button/button.scss +0 -0
  162. package/button/button.ts +120 -0
  163. package/button/ng-package.json +6 -0
  164. package/button/public-api.ts +1 -0
  165. package/button-group/button-group.html +3 -0
  166. package/button-group/button-group.scss +20 -0
  167. package/button-group/button-group.ts +12 -0
  168. package/button-group/ng-package.json +6 -0
  169. package/button-group/public-api.ts +1 -0
  170. package/card/card.html +26 -0
  171. package/card/card.scss +0 -0
  172. package/card/card.ts +29 -0
  173. package/card/ng-package.json +6 -0
  174. package/card/public-api.ts +1 -0
  175. package/checkbox-field/checkbox-field.html +31 -0
  176. package/checkbox-field/checkbox-field.scss +0 -0
  177. package/checkbox-field/checkbox-field.spec.ts +21 -0
  178. package/checkbox-field/checkbox-field.ts +123 -0
  179. package/checkbox-field/ng-package.json +6 -0
  180. package/checkbox-field/public-api.ts +1 -0
  181. package/chip/chip.html +16 -0
  182. package/chip/chip.scss +19 -0
  183. package/chip/chip.ts +45 -0
  184. package/chip/ng-package.json +6 -0
  185. package/chip/public-api.ts +1 -0
  186. package/client-page/client-page.html +232 -0
  187. package/client-page/client-page.ts +588 -0
  188. package/client-page/index.ts +2 -0
  189. package/client-page/ng-package.json +6 -0
  190. package/client-page/public-api.ts +1 -0
  191. package/client-page-menu/client-page-menu.html +142 -0
  192. package/client-page-menu/client-page-menu.ts +199 -0
  193. package/client-page-menu/index.ts +2 -0
  194. package/client-page-menu/ng-package.json +6 -0
  195. package/client-page-menu/public-api.ts +1 -0
  196. package/color-picker-field/color-picker-field.html +45 -0
  197. package/color-picker-field/color-picker-field.scss +52 -0
  198. package/color-picker-field/color-picker-field.ts +131 -0
  199. package/color-picker-field/ng-package.json +6 -0
  200. package/color-picker-field/public-api.ts +1 -0
  201. package/confirmation/confirmation-dialog.html +83 -0
  202. package/confirmation/confirmation-dialog.scss +0 -0
  203. package/confirmation/confirmation-dialog.ts +15 -0
  204. package/confirmation/confirmation.spec.ts +43 -0
  205. package/confirmation/confirmation.ts +103 -0
  206. package/confirmation/ng-package.json +6 -0
  207. package/confirmation/public-api.ts +2 -0
  208. package/date-field/date-field.html +65 -0
  209. package/date-field/date-field.scss +0 -0
  210. package/date-field/date-field.spec.ts +118 -0
  211. package/date-field/date-field.ts +196 -0
  212. package/date-field/ng-package.json +6 -0
  213. package/date-field/public-api.ts +1 -0
  214. package/dialog/dialog.ts +29 -0
  215. package/dialog/ng-package.json +6 -0
  216. package/dialog/public-api.ts +1 -0
  217. package/drawer/drawer.html +67 -0
  218. package/drawer/drawer.scss +1 -0
  219. package/drawer/drawer.ts +348 -0
  220. package/drawer/ng-package.json +5 -0
  221. package/drawer/public-api.ts +1 -0
  222. package/dynamic-drawer/dynamic-drawer-host.ts +476 -0
  223. package/dynamic-drawer/dynamic-drawer.spec.ts +204 -0
  224. package/dynamic-drawer/dynamic-drawer.ts +235 -0
  225. package/dynamic-drawer/ng-package.json +6 -0
  226. package/dynamic-drawer/public-api.ts +2 -0
  227. package/editor-field/editor-field.html +38 -0
  228. package/editor-field/editor-field.scss +219 -0
  229. package/editor-field/editor-field.ts +126 -0
  230. package/editor-field/ng-package.json +6 -0
  231. package/editor-field/public-api.ts +1 -0
  232. package/empty-state/empty-state.html +236 -0
  233. package/empty-state/empty-state.ts +85 -0
  234. package/empty-state/ng-package.json +6 -0
  235. package/empty-state/public-api.ts +1 -0
  236. package/entities/comparison/comparison-entity-list/comparison-entity-list.html +87 -0
  237. package/entities/comparison/comparison-entity-list/comparison-entity-list.ts +93 -0
  238. package/entities/comparison/comparison-value/comparison-value.html +31 -0
  239. package/entities/comparison/comparison-value/comparison-value.ts +53 -0
  240. package/entities/currency-display.utils.spec.ts +94 -0
  241. package/entities/currency-display.utils.ts +92 -0
  242. package/entities/entities-manage/entities-manage.html +74 -0
  243. package/entities/entities-manage/entities-manage.scss +72 -0
  244. package/entities/entities-manage/entities-manage.ts +121 -0
  245. package/entities/entities-manage/entities-resize-base.ts +153 -0
  246. package/entities/entities-preview/entities-preview.css +77 -0
  247. package/entities/entities-preview/entities-preview.html +56 -0
  248. package/entities/entities-preview/entities-preview.ts +281 -0
  249. package/entities/entity-attachment/entity-attachment.html +49 -0
  250. package/entities/entity-attachment/entity-attachment.ts +462 -0
  251. package/entities/entity-checkbox/entity-checkbox.html +28 -0
  252. package/entities/entity-checkbox/entity-checkbox.ts +65 -0
  253. package/entities/entity-comparison.model.ts +39 -0
  254. package/entities/entity-connection/entity-connection.html +12 -0
  255. package/entities/entity-connection/entity-connection.ts +75 -0
  256. package/entities/entity-currency/entity-currency.html +12 -0
  257. package/entities/entity-currency/entity-currency.ts +59 -0
  258. package/entities/entity-date/entity-date.html +16 -0
  259. package/entities/entity-date/entity-date.ts +50 -0
  260. package/entities/entity-display.utils.ts +94 -0
  261. package/entities/entity-field/entity-field.ts +94 -0
  262. package/entities/entity-leaf-details/entity-leaf-details.html +35 -0
  263. package/entities/entity-leaf-details/entity-leaf-details.ts +56 -0
  264. package/entities/entity-location/entity-location.html +34 -0
  265. package/entities/entity-location/entity-location.ts +98 -0
  266. package/entities/entity-long-text/entity-long-text.html +9 -0
  267. package/entities/entity-long-text/entity-long-text.ts +45 -0
  268. package/entities/entity-lookup/entity-lookup.html +25 -0
  269. package/entities/entity-lookup/entity-lookup.ts +68 -0
  270. package/entities/entity-lookup-module-check-list/entity-lookup-module-check-list.html +39 -0
  271. package/entities/entity-lookup-module-check-list/entity-lookup-module-check-list.spec.ts +148 -0
  272. package/entities/entity-lookup-module-check-list/entity-lookup-module-check-list.ts +152 -0
  273. package/entities/entity-percentage/entity-percentage.html +22 -0
  274. package/entities/entity-percentage/entity-percentage.ts +163 -0
  275. package/entities/entity-phase-gate/entity-phase-gate.html +20 -0
  276. package/entities/entity-phase-gate/entity-phase-gate.ts +129 -0
  277. package/entities/entity-preview/entity-preview-body.html +8 -0
  278. package/entities/entity-preview/entity-preview-body.ts +19 -0
  279. package/entities/entity-preview/entity-preview.html +14 -0
  280. package/entities/entity-preview/entity-preview.ts +33 -0
  281. package/entities/entity-preview/entity-value-preview.html +62 -0
  282. package/entities/entity-preview/entity-value-preview.spec.ts +191 -0
  283. package/entities/entity-preview/entity-value-preview.ts +69 -0
  284. package/entities/entity-schedule-item/entity-schedule-item.html +19 -0
  285. package/entities/entity-schedule-item/entity-schedule-item.ts +41 -0
  286. package/entities/entity-sections.util.ts +103 -0
  287. package/entities/entity-status/entity-status.html +20 -0
  288. package/entities/entity-status/entity-status.ts +60 -0
  289. package/entities/entity-text/entity-text.html +20 -0
  290. package/entities/entity-text/entity-text.ts +35 -0
  291. package/entities/entity-user/entity-user.html +181 -0
  292. package/entities/entity-user/entity-user.ts +179 -0
  293. package/entities/entity.model.ts +407 -0
  294. package/entities/leaf-details-display.utils.ts +269 -0
  295. package/entities/ng-package.json +6 -0
  296. package/entities/percentage-color.utils.spec.ts +94 -0
  297. package/entities/percentage-color.utils.ts +80 -0
  298. package/entities/public-api.ts +30 -0
  299. package/field-validation/character-limit.validator.ts +22 -0
  300. package/field-validation/error-message.pipe.spec.ts +184 -0
  301. package/field-validation/error-message.pipe.ts +80 -0
  302. package/field-validation/field-validation.ts +168 -0
  303. package/field-validation/ng-package.json +6 -0
  304. package/field-validation/public-api.ts +2 -0
  305. package/formula/formula-editor/formula-editor.html +89 -0
  306. package/formula/formula-editor/formula-editor.scss +25 -0
  307. package/formula/formula-editor/formula-editor.ts +467 -0
  308. package/formula/formula-editor/index.ts +1 -0
  309. package/formula/formula-editor-code/formula-autocomplete-normalization.util.spec.ts +58 -0
  310. package/formula/formula-editor-code/formula-autocomplete-normalization.util.ts +64 -0
  311. package/formula/formula-editor-code/formula-completion-range.util.spec.ts +62 -0
  312. package/formula/formula-editor-code/formula-completion-range.util.ts +71 -0
  313. package/formula/formula-editor-code/formula-completion-suggestion.util.spec.ts +23 -0
  314. package/formula/formula-editor-code/formula-completion-suggestion.util.ts +18 -0
  315. package/formula/formula-editor-code/formula-editor-code.html +15 -0
  316. package/formula/formula-editor-code/formula-editor-code.scss +90 -0
  317. package/formula/formula-editor-code/formula-editor-code.ts +1095 -0
  318. package/formula/formula-editor-code/index.ts +1 -0
  319. package/formula/formula-status-bar/formula-status-bar.html +119 -0
  320. package/formula/formula-status-bar/formula-status-bar.ts +66 -0
  321. package/formula/formula-status-bar/index.ts +1 -0
  322. package/formula/formula-toolbar/formula-toolbar.html +361 -0
  323. package/formula/formula-toolbar/formula-toolbar.ts +532 -0
  324. package/formula/formula-toolbar/index.ts +2 -0
  325. package/formula/formula-toolbar/operators.ts +122 -0
  326. package/formula/models/formula-block.model.ts +61 -0
  327. package/formula/models/formula-token.model.spec.ts +57 -0
  328. package/formula/models/formula-token.model.ts +852 -0
  329. package/formula/models/index.ts +5 -0
  330. package/formula/models/smart-block.model.ts +132 -0
  331. package/formula/models/validation-result.model.ts +80 -0
  332. package/formula/ng-package.json +6 -0
  333. package/formula/public-api.ts +8 -0
  334. package/formula/runtime/formula-runtime-catalogs.ts +554 -0
  335. package/formula/runtime/formula-runtime-engine.spec.ts +328 -0
  336. package/formula/runtime/formula-runtime-engine.ts +794 -0
  337. package/formula/runtime/formula-runtime.model.ts +53 -0
  338. package/formula/runtime/index.ts +3 -0
  339. package/formula/toolbar-item/index.ts +1 -0
  340. package/formula/toolbar-item/toolbar-item.html +143 -0
  341. package/formula/toolbar-item/toolbar-item.scss +14 -0
  342. package/formula/toolbar-item/toolbar-item.ts +223 -0
  343. package/icon-field/icon-field.html +58 -0
  344. package/icon-field/icon-field.scss +24 -0
  345. package/icon-field/icon-field.spec.ts +77 -0
  346. package/icon-field/icon-field.ts +205 -0
  347. package/icon-field/ng-package.json +6 -0
  348. package/icon-field/public-api.ts +1 -0
  349. package/list/list.html +22 -0
  350. package/list/list.ts +36 -0
  351. package/list/ng-package.json +6 -0
  352. package/list/public-api.ts +1 -0
  353. package/location-field/location-field.html +86 -0
  354. package/location-field/location-field.spec.ts +295 -0
  355. package/location-field/location-field.ts +662 -0
  356. package/location-field/location-manual-dialog.html +43 -0
  357. package/location-field/location-manual-dialog.ts +104 -0
  358. package/location-field/location-value.ts +67 -0
  359. package/location-field/ng-package.json +6 -0
  360. package/location-field/public-api.ts +3 -0
  361. package/menu/menu.html +71 -0
  362. package/menu/menu.scss +3 -0
  363. package/menu/menu.ts +186 -0
  364. package/menu/ng-package.json +6 -0
  365. package/menu/public-api.ts +1 -0
  366. package/modal/modal.ts +127 -0
  367. package/modal/ng-package.json +6 -0
  368. package/modal/public-api.ts +1 -0
  369. package/module-summary-card/module-summary-card.html +43 -0
  370. package/module-summary-card/module-summary-card.scss +0 -0
  371. package/module-summary-card/module-summary-card.ts +40 -0
  372. package/module-summary-card/ng-package.json +6 -0
  373. package/module-summary-card/public-api.ts +1 -0
  374. package/multi-select-field/multi-select-field.html +140 -0
  375. package/multi-select-field/multi-select-field.scss +0 -0
  376. package/multi-select-field/multi-select-field.spec.ts +21 -0
  377. package/multi-select-field/multi-select-field.ts +397 -0
  378. package/multi-select-field/ng-package.json +6 -0
  379. package/multi-select-field/public-api.ts +1 -0
  380. package/ng-package.json +9 -0
  381. package/number-field/ng-package.json +6 -0
  382. package/number-field/number-field.html +39 -0
  383. package/number-field/number-field.scss +8 -0
  384. package/number-field/number-field.spec.ts +21 -0
  385. package/number-field/number-field.ts +124 -0
  386. package/number-field/public-api.ts +1 -0
  387. package/package.json +54 -274
  388. package/page/index.ts +1 -0
  389. package/page/ng-package.json +6 -0
  390. package/page/page.html +37 -0
  391. package/page/page.ts +43 -0
  392. package/page/public-api.ts +1 -0
  393. package/page-header/index.ts +2 -0
  394. package/page-header/ng-package.json +6 -0
  395. package/page-header/page-header.html +60 -0
  396. package/page-header/page-header.ts +54 -0
  397. package/page-header/public-api.ts +1 -0
  398. package/paginator/ng-package.json +6 -0
  399. package/paginator/paginator.html +50 -0
  400. package/paginator/paginator.scss +0 -0
  401. package/paginator/paginator.ts +53 -0
  402. package/paginator/public-api.ts +1 -0
  403. package/pick-list-field/ng-package.json +6 -0
  404. package/pick-list-field/pick-list-field.html +39 -0
  405. package/pick-list-field/pick-list-field.scss +26 -0
  406. package/pick-list-field/pick-list-field.ts +259 -0
  407. package/pick-list-field/public-api.ts +1 -0
  408. package/progress/ng-package.json +6 -0
  409. package/progress/progress.html +36 -0
  410. package/progress/progress.ts +61 -0
  411. package/progress/public-api.ts +1 -0
  412. package/property-filter-builder/ng-package.json +6 -0
  413. package/property-filter-builder/property-filter-builder.html +192 -0
  414. package/property-filter-builder/property-filter-builder.ts +548 -0
  415. package/property-filter-builder/public-api.ts +1 -0
  416. package/radio-button-field/ng-package.json +6 -0
  417. package/radio-button-field/public-api.ts +1 -0
  418. package/radio-button-field/radio-button-field.html +44 -0
  419. package/radio-button-field/radio-button-field.scss +0 -0
  420. package/radio-button-field/radio-button-field.ts +114 -0
  421. package/radio-cards/ng-package.json +6 -0
  422. package/radio-cards/public-api.ts +1 -0
  423. package/radio-cards/radio-cards.css +3 -0
  424. package/radio-cards/radio-cards.html +54 -0
  425. package/radio-cards/radio-cards.spec.ts +22 -0
  426. package/radio-cards/radio-cards.ts +92 -0
  427. package/radio-cards-field/ng-package.json +6 -0
  428. package/radio-cards-field/public-api.ts +1 -0
  429. package/radio-cards-field/radio-cards-field.css +0 -0
  430. package/radio-cards-field/radio-cards-field.html +38 -0
  431. package/radio-cards-field/radio-cards-field.spec.ts +22 -0
  432. package/radio-cards-field/radio-cards-field.ts +182 -0
  433. package/runtime-action/ng-package.json +6 -0
  434. package/runtime-action/payload-builder.ts +246 -0
  435. package/runtime-action/public-api.ts +4 -0
  436. package/runtime-action/runtime-action-context.store.ts +26 -0
  437. package/runtime-action/runtime-action.runner.ts +302 -0
  438. package/runtime-action/runtime-action.types.ts +82 -0
  439. package/select-field/current-user.util.ts +54 -0
  440. package/select-field/ng-package.json +6 -0
  441. package/select-field/public-api.ts +1 -0
  442. package/select-field/select-field.html +142 -0
  443. package/select-field/select-field.scss +0 -0
  444. package/select-field/select-field.spec.ts +21 -0
  445. package/select-field/select-field.ts +471 -0
  446. package/sidebar/ng-package.json +6 -0
  447. package/sidebar/public-api.ts +1 -0
  448. package/sidebar/sidebar.html +368 -0
  449. package/sidebar/sidebar.ts +303 -0
  450. package/slider-field/ng-package.json +7 -0
  451. package/slider-field/public-api.ts +1 -0
  452. package/slider-field/slider-field.html +33 -0
  453. package/slider-field/slider-field.scss +11 -0
  454. package/slider-field/slider-field.spec.ts +44 -0
  455. package/slider-field/slider-field.ts +166 -0
  456. package/src/lib/base/base.facade.ts +159 -0
  457. package/src/lib/base/crud-base.state.ts +248 -0
  458. package/src/lib/config/date-format.config.ts +55 -0
  459. package/src/lib/config/ds-identity.preset.ts +538 -0
  460. package/src/lib/config/ds-identity.tokens.ts +209 -0
  461. package/src/lib/config/dynamic-form.model.ts +1162 -0
  462. package/src/lib/config/povide-messages.ts +5 -0
  463. package/src/lib/config/provide-confirmation.ts +5 -0
  464. package/src/lib/config/providemt.ts +506 -0
  465. package/src/lib/config/public-api.ts +0 -0
  466. package/src/lib/pipes/mt-date-format.pipe.spec.ts +60 -0
  467. package/src/lib/pipes/mt-date-format.pipe.ts +81 -0
  468. package/src/lib/utils/api-request.helper.ts +59 -0
  469. package/src/lib/utils/clock-time.util.ts +58 -0
  470. package/src/lib/utils/color.utils.ts +187 -0
  471. package/src/lib/utils/entity-adapter.ts +50 -0
  472. package/src/lib/utils/field-id.ts +42 -0
  473. package/src/lib/utils/http-context.ts +35 -0
  474. package/src/lib/utils/inputs.ts +6 -0
  475. package/src/lib/utils/state-helpers.ts +49 -0
  476. package/src/lib/utils/theme.ts +281 -0
  477. package/src/public-api.ts +30 -0
  478. package/statistic-card/ng-package.json +6 -0
  479. package/statistic-card/public-api.ts +1 -0
  480. package/statistic-card/statistic-card.html +31 -0
  481. package/statistic-card/statistic-card.scss +0 -0
  482. package/statistic-card/statistic-card.ts +59 -0
  483. package/table/ng-package.json +7 -0
  484. package/table/public-api.ts +10 -0
  485. package/table/table-actions-menu/public-api.ts +1 -0
  486. package/table/table-actions-menu/table-actions-menu.html +75 -0
  487. package/table/table-actions-menu/table-actions-menu.ts +171 -0
  488. package/table/table-caption/public-api.ts +1 -0
  489. package/table/table-caption/table-caption.html +118 -0
  490. package/table/table-caption/table-caption.ts +221 -0
  491. package/table/table-column-filter/public-api.ts +1 -0
  492. package/table/table-column-filter/table-column-filter.html +44 -0
  493. package/table/table-column-filter/table-column-filter.ts +106 -0
  494. package/table/table-export/html-to-text.util.ts +67 -0
  495. package/table/table-export/public-api.ts +1 -0
  496. package/table/table-export/table-export.service.spec.ts +186 -0
  497. package/table/table-export/table-export.service.ts +325 -0
  498. package/table/table-filter/public-api.ts +1 -0
  499. package/table/table-filter/table-filter.css +9 -0
  500. package/table/table-filter/table-filter.html +63 -0
  501. package/table/table-filter/table-filter.ts +126 -0
  502. package/table/table-filter-field/public-api.ts +1 -0
  503. package/table/table-filter-field/table-filter-field.html +182 -0
  504. package/table/table-filter-field/table-filter-field.ts +208 -0
  505. package/table/table-grouping/public-api.ts +1 -0
  506. package/table/table-grouping/table-grouping.spec.ts +218 -0
  507. package/table/table-grouping/table-grouping.ts +237 -0
  508. package/table/table-types.ts +242 -0
  509. package/table/table-value.utils.spec.ts +63 -0
  510. package/table/table-value.utils.ts +1014 -0
  511. package/table/table.css +145 -0
  512. package/table/table.html +572 -0
  513. package/table/table.ts +2042 -0
  514. package/tabs/ng-package.json +6 -0
  515. package/tabs/public-api.ts +1 -0
  516. package/tabs/tabs.html +417 -0
  517. package/tabs/tabs.scss +3 -0
  518. package/tabs/tabs.spec.ts +79 -0
  519. package/tabs/tabs.ts +397 -0
  520. package/text-field/ng-package.json +6 -0
  521. package/text-field/public-api.ts +1 -0
  522. package/text-field/text-field.html +75 -0
  523. package/text-field/text-field.scss +56 -0
  524. package/text-field/text-field.ts +251 -0
  525. package/textarea-field/ng-package.json +6 -0
  526. package/textarea-field/public-api.ts +1 -0
  527. package/textarea-field/textarea-field.html +37 -0
  528. package/textarea-field/textarea-field.scss +0 -0
  529. package/textarea-field/textarea-field.spec.ts +21 -0
  530. package/textarea-field/textarea-field.ts +169 -0
  531. package/toast/ng-package.json +6 -0
  532. package/toast/public-api.ts +2 -0
  533. package/toast/toast.html +18 -0
  534. package/toast/toast.service.ts +67 -0
  535. package/toast/toast.ts +21 -0
  536. package/toggle-field/ng-package.json +6 -0
  537. package/toggle-field/public-api.ts +1 -0
  538. package/toggle-field/toggle-field.html +78 -0
  539. package/toggle-field/toggle-field.scss +24 -0
  540. package/toggle-field/toggle-field.ts +150 -0
  541. package/tooltip/ng-package.json +6 -0
  542. package/tooltip/public-api.ts +2 -0
  543. package/tooltip/tooltip.ts +30 -0
  544. package/tooltip/truncate-tooltip.ts +124 -0
  545. package/topbar/ng-package.json +6 -0
  546. package/topbar/public-api.ts +1 -0
  547. package/topbar/topbar.html +52 -0
  548. package/topbar/topbar.ts +27 -0
  549. package/tree/ng-package.json +6 -0
  550. package/tree/public-api.ts +2 -0
  551. package/tree/tree-types.ts +55 -0
  552. package/tree/tree.html +126 -0
  553. package/tree/tree.scss +1 -0
  554. package/tree/tree.ts +303 -0
  555. package/treeselect-field/ng-package.json +6 -0
  556. package/treeselect-field/public-api.ts +1 -0
  557. package/treeselect-field/treeselect-field.html +71 -0
  558. package/treeselect-field/treeselect-field.ts +348 -0
  559. package/tsconfig.check.json +20 -0
  560. package/tsconfig.json +16 -0
  561. package/tsconfig.spec.json +24 -0
  562. package/upload-field/ng-package.json +6 -0
  563. package/upload-field/public-api.ts +2 -0
  564. package/upload-field/secure-image.pipe.ts +258 -0
  565. package/upload-field/upload-field.html +274 -0
  566. package/upload-field/upload-field.scss +0 -0
  567. package/upload-field/upload-field.spec.ts +169 -0
  568. package/upload-field/upload-field.ts +764 -0
  569. package/upload-field/upload-file-preview/upload-file-preview.html +41 -0
  570. package/upload-field/upload-file-preview/upload-file-preview.scss +0 -0
  571. package/upload-field/upload-file-preview/upload-file-preview.ts +57 -0
  572. package/upload-field/upload-user-preview/upload-user-preview.css +0 -0
  573. package/upload-field/upload-user-preview/upload-user-preview.html +73 -0
  574. package/upload-field/upload-user-preview/upload-user-preview.ts +54 -0
  575. package/uploader/ng-package.json +6 -0
  576. package/uploader/public-api.ts +1 -0
  577. package/uploader/uploader.service.spec.ts +271 -0
  578. package/uploader/uploader.service.ts +733 -0
  579. package/user-search-field/ng-package.json +6 -0
  580. package/user-search-field/public-api.ts +1 -0
  581. package/user-search-field/user-search-field.html +88 -0
  582. package/user-search-field/user-search-field.scss +4 -0
  583. package/user-search-field/user-search-field.spec.ts +176 -0
  584. package/user-search-field/user-search-field.ts +483 -0
  585. package/fesm2022/masterteam-components-avatar-text.mjs +0 -46
  586. package/fesm2022/masterteam-components-avatar-text.mjs.map +0 -1
  587. package/fesm2022/masterteam-components-avatar.mjs +0 -50
  588. package/fesm2022/masterteam-components-avatar.mjs.map +0 -1
  589. package/fesm2022/masterteam-components-breadcrumb.mjs +0 -27
  590. package/fesm2022/masterteam-components-breadcrumb.mjs.map +0 -1
  591. package/fesm2022/masterteam-components-business-fields.mjs +0 -1902
  592. package/fesm2022/masterteam-components-business-fields.mjs.map +0 -1
  593. package/fesm2022/masterteam-components-button-group.mjs +0 -20
  594. package/fesm2022/masterteam-components-button-group.mjs.map +0 -1
  595. package/fesm2022/masterteam-components-button.mjs +0 -52
  596. package/fesm2022/masterteam-components-button.mjs.map +0 -1
  597. package/fesm2022/masterteam-components-card.mjs +0 -28
  598. package/fesm2022/masterteam-components-card.mjs.map +0 -1
  599. package/fesm2022/masterteam-components-checkbox-field.mjs +0 -88
  600. package/fesm2022/masterteam-components-checkbox-field.mjs.map +0 -1
  601. package/fesm2022/masterteam-components-chip.mjs +0 -39
  602. package/fesm2022/masterteam-components-chip.mjs.map +0 -1
  603. package/fesm2022/masterteam-components-client-page-menu.mjs +0 -152
  604. package/fesm2022/masterteam-components-client-page-menu.mjs.map +0 -1
  605. package/fesm2022/masterteam-components-client-page.mjs +0 -371
  606. package/fesm2022/masterteam-components-client-page.mjs.map +0 -1
  607. package/fesm2022/masterteam-components-color-picker-field.mjs +0 -102
  608. package/fesm2022/masterteam-components-color-picker-field.mjs.map +0 -1
  609. package/fesm2022/masterteam-components-confirmation.mjs +0 -98
  610. package/fesm2022/masterteam-components-confirmation.mjs.map +0 -1
  611. package/fesm2022/masterteam-components-date-field.mjs +0 -154
  612. package/fesm2022/masterteam-components-date-field.mjs.map +0 -1
  613. package/fesm2022/masterteam-components-dialog.mjs +0 -33
  614. package/fesm2022/masterteam-components-dialog.mjs.map +0 -1
  615. package/fesm2022/masterteam-components-drawer.mjs +0 -268
  616. package/fesm2022/masterteam-components-drawer.mjs.map +0 -1
  617. package/fesm2022/masterteam-components-dynamic-drawer.mjs +0 -608
  618. package/fesm2022/masterteam-components-dynamic-drawer.mjs.map +0 -1
  619. package/fesm2022/masterteam-components-editor-field.mjs +0 -99
  620. package/fesm2022/masterteam-components-editor-field.mjs.map +0 -1
  621. package/fesm2022/masterteam-components-entities.mjs +0 -2033
  622. package/fesm2022/masterteam-components-entities.mjs.map +0 -1
  623. package/fesm2022/masterteam-components-field-validation.mjs +0 -158
  624. package/fesm2022/masterteam-components-field-validation.mjs.map +0 -1
  625. package/fesm2022/masterteam-components-formula.mjs +0 -3848
  626. package/fesm2022/masterteam-components-formula.mjs.map +0 -1
  627. package/fesm2022/masterteam-components-icon-field.mjs +0 -161
  628. package/fesm2022/masterteam-components-icon-field.mjs.map +0 -1
  629. package/fesm2022/masterteam-components-list.mjs +0 -31
  630. package/fesm2022/masterteam-components-list.mjs.map +0 -1
  631. package/fesm2022/masterteam-components-location-field.mjs +0 -603
  632. package/fesm2022/masterteam-components-location-field.mjs.map +0 -1
  633. package/fesm2022/masterteam-components-menu.mjs +0 -135
  634. package/fesm2022/masterteam-components-menu.mjs.map +0 -1
  635. package/fesm2022/masterteam-components-modal.mjs +0 -108
  636. package/fesm2022/masterteam-components-modal.mjs.map +0 -1
  637. package/fesm2022/masterteam-components-module-summary-card.mjs +0 -34
  638. package/fesm2022/masterteam-components-module-summary-card.mjs.map +0 -1
  639. package/fesm2022/masterteam-components-multi-select-field.mjs +0 -317
  640. package/fesm2022/masterteam-components-multi-select-field.mjs.map +0 -1
  641. package/fesm2022/masterteam-components-number-field.mjs +0 -98
  642. package/fesm2022/masterteam-components-number-field.mjs.map +0 -1
  643. package/fesm2022/masterteam-components-page-header.mjs +0 -42
  644. package/fesm2022/masterteam-components-page-header.mjs.map +0 -1
  645. package/fesm2022/masterteam-components-page.mjs +0 -35
  646. package/fesm2022/masterteam-components-page.mjs.map +0 -1
  647. package/fesm2022/masterteam-components-paginator.mjs +0 -43
  648. package/fesm2022/masterteam-components-paginator.mjs.map +0 -1
  649. package/fesm2022/masterteam-components-pick-list-field.mjs +0 -206
  650. package/fesm2022/masterteam-components-pick-list-field.mjs.map +0 -1
  651. package/fesm2022/masterteam-components-progress.mjs +0 -63
  652. package/fesm2022/masterteam-components-progress.mjs.map +0 -1
  653. package/fesm2022/masterteam-components-property-filter-builder.mjs +0 -386
  654. package/fesm2022/masterteam-components-property-filter-builder.mjs.map +0 -1
  655. package/fesm2022/masterteam-components-radio-button-field.mjs +0 -85
  656. package/fesm2022/masterteam-components-radio-button-field.mjs.map +0 -1
  657. package/fesm2022/masterteam-components-radio-cards-field.mjs +0 -126
  658. package/fesm2022/masterteam-components-radio-cards-field.mjs.map +0 -1
  659. package/fesm2022/masterteam-components-radio-cards.mjs +0 -74
  660. package/fesm2022/masterteam-components-radio-cards.mjs.map +0 -1
  661. package/fesm2022/masterteam-components-runtime-action.mjs +0 -406
  662. package/fesm2022/masterteam-components-runtime-action.mjs.map +0 -1
  663. package/fesm2022/masterteam-components-select-field.mjs +0 -411
  664. package/fesm2022/masterteam-components-select-field.mjs.map +0 -1
  665. package/fesm2022/masterteam-components-sidebar.mjs +0 -155
  666. package/fesm2022/masterteam-components-sidebar.mjs.map +0 -1
  667. package/fesm2022/masterteam-components-slider-field.mjs +0 -128
  668. package/fesm2022/masterteam-components-slider-field.mjs.map +0 -1
  669. package/fesm2022/masterteam-components-statistic-card.mjs +0 -42
  670. package/fesm2022/masterteam-components-statistic-card.mjs.map +0 -1
  671. package/fesm2022/masterteam-components-table.mjs +0 -3197
  672. package/fesm2022/masterteam-components-table.mjs.map +0 -1
  673. package/fesm2022/masterteam-components-tabs.mjs +0 -289
  674. package/fesm2022/masterteam-components-tabs.mjs.map +0 -1
  675. package/fesm2022/masterteam-components-text-field.mjs +0 -198
  676. package/fesm2022/masterteam-components-text-field.mjs.map +0 -1
  677. package/fesm2022/masterteam-components-textarea-field.mjs +0 -122
  678. package/fesm2022/masterteam-components-textarea-field.mjs.map +0 -1
  679. package/fesm2022/masterteam-components-toast.mjs +0 -80
  680. package/fesm2022/masterteam-components-toast.mjs.map +0 -1
  681. package/fesm2022/masterteam-components-toggle-field.mjs +0 -116
  682. package/fesm2022/masterteam-components-toggle-field.mjs.map +0 -1
  683. package/fesm2022/masterteam-components-tooltip.mjs +0 -147
  684. package/fesm2022/masterteam-components-tooltip.mjs.map +0 -1
  685. package/fesm2022/masterteam-components-topbar.mjs +0 -32
  686. package/fesm2022/masterteam-components-topbar.mjs.map +0 -1
  687. package/fesm2022/masterteam-components-tree.mjs +0 -260
  688. package/fesm2022/masterteam-components-tree.mjs.map +0 -1
  689. package/fesm2022/masterteam-components-treeselect-field.mjs +0 -265
  690. package/fesm2022/masterteam-components-treeselect-field.mjs.map +0 -1
  691. package/fesm2022/masterteam-components-upload-field.mjs +0 -841
  692. package/fesm2022/masterteam-components-upload-field.mjs.map +0 -1
  693. package/fesm2022/masterteam-components-uploader.mjs +0 -425
  694. package/fesm2022/masterteam-components-uploader.mjs.map +0 -1
  695. package/fesm2022/masterteam-components-user-search-field.mjs +0 -370
  696. package/fesm2022/masterteam-components-user-search-field.mjs.map +0 -1
  697. package/fesm2022/masterteam-components.mjs +0 -2334
  698. package/fesm2022/masterteam-components.mjs.map +0 -1
  699. package/types/masterteam-components-avatar-text.d.ts +0 -23
  700. package/types/masterteam-components-avatar.d.ts +0 -23
  701. package/types/masterteam-components-breadcrumb.d.ts +0 -18
  702. package/types/masterteam-components-business-fields.d.ts +0 -671
  703. package/types/masterteam-components-button-group.d.ts +0 -8
  704. package/types/masterteam-components-button.d.ts +0 -36
  705. package/types/masterteam-components-card.d.ts +0 -14
  706. package/types/masterteam-components-checkbox-field.d.ts +0 -34
  707. package/types/masterteam-components-chip.d.ts +0 -21
  708. package/types/masterteam-components-client-page-menu.d.ts +0 -55
  709. package/types/masterteam-components-client-page.d.ts +0 -109
  710. package/types/masterteam-components-color-picker-field.d.ts +0 -35
  711. package/types/masterteam-components-confirmation.d.ts +0 -41
  712. package/types/masterteam-components-date-field.d.ts +0 -53
  713. package/types/masterteam-components-dialog.d.ts +0 -12
  714. package/types/masterteam-components-drawer.d.ts +0 -62
  715. package/types/masterteam-components-dynamic-drawer.d.ts +0 -159
  716. package/types/masterteam-components-editor-field.d.ts +0 -35
  717. package/types/masterteam-components-entities.d.ts +0 -1030
  718. package/types/masterteam-components-field-validation.d.ts +0 -23
  719. package/types/masterteam-components-formula.d.ts +0 -759
  720. package/types/masterteam-components-icon-field.d.ts +0 -40
  721. package/types/masterteam-components-list.d.ts +0 -18
  722. package/types/masterteam-components-location-field.d.ts +0 -169
  723. package/types/masterteam-components-menu.d.ts +0 -55
  724. package/types/masterteam-components-modal.d.ts +0 -30
  725. package/types/masterteam-components-module-summary-card.d.ts +0 -18
  726. package/types/masterteam-components-multi-select-field.d.ts +0 -100
  727. package/types/masterteam-components-number-field.d.ts +0 -43
  728. package/types/masterteam-components-page-header.d.ts +0 -30
  729. package/types/masterteam-components-page.d.ts +0 -26
  730. package/types/masterteam-components-paginator.d.ts +0 -20
  731. package/types/masterteam-components-pick-list-field.d.ts +0 -61
  732. package/types/masterteam-components-progress.d.ts +0 -30
  733. package/types/masterteam-components-property-filter-builder.d.ts +0 -90
  734. package/types/masterteam-components-radio-button-field.d.ts +0 -41
  735. package/types/masterteam-components-radio-cards-field.d.ts +0 -35
  736. package/types/masterteam-components-radio-cards.d.ts +0 -33
  737. package/types/masterteam-components-runtime-action.d.ts +0 -105
  738. package/types/masterteam-components-select-field.d.ts +0 -132
  739. package/types/masterteam-components-sidebar.d.ts +0 -71
  740. package/types/masterteam-components-slider-field.d.ts +0 -41
  741. package/types/masterteam-components-statistic-card.d.ts +0 -28
  742. package/types/masterteam-components-table.d.ts +0 -827
  743. package/types/masterteam-components-tabs.d.ts +0 -80
  744. package/types/masterteam-components-text-field.d.ts +0 -56
  745. package/types/masterteam-components-textarea-field.d.ts +0 -41
  746. package/types/masterteam-components-toast.d.ts +0 -27
  747. package/types/masterteam-components-toggle-field.d.ts +0 -44
  748. package/types/masterteam-components-tooltip.d.ts +0 -26
  749. package/types/masterteam-components-topbar.d.ts +0 -20
  750. package/types/masterteam-components-tree.d.ts +0 -106
  751. package/types/masterteam-components-treeselect-field.d.ts +0 -79
  752. package/types/masterteam-components-upload-field.d.ts +0 -108
  753. package/types/masterteam-components-uploader.d.ts +0 -53
  754. package/types/masterteam-components-user-search-field.d.ts +0 -106
  755. package/types/masterteam-components.d.ts +0 -1181
@@ -0,0 +1 @@
1
+ {"hash":"35f26405576ac086a7b8be40bc7c0a3857a4b7a18d1d1689bfe5e0a136e1febb","types":[{"exports":["ConnectionPayload","ConnectionSource","ConnectionSourceLevel","ENTITY_LIST_ADD_DIALOG_COMPONENT","EntityListAddDialogInputs","EntityListField","LOOKUP_CHECK_LIST_FORM_COMPONENT","LookupCheckListFormInputs","LookupMatrixField","LookupModuleCheckListField","ScheduleItemSelectorField","SchedulePredecessorField","SchemaConnectionConfig","SchemaConnectionField","SourceLevelState"],"facadeModuleId":"C:\\Users\\ABDULLAH WISHAH\\Documents\\GitHub\\components\\dist\\masterteam\\components\\tmp-typings\\business-fields\\masterteam-components-business-fields.d.ts","isDynamicEntry":false,"isEntry":true,"isImplicitEntry":false,"moduleIds":["C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-typings/business-fields/lookup-matrix-field/lookup-matrix-field.d.ts","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-typings/business-fields/schema-connection-field/schema-connection-field.d.ts","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-typings/business-fields/schedule-predecessor-field/schedule-predecessor-field.d.ts","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-typings/business-fields/entity-list-field/entity-list-field.d.ts","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-typings/business-fields/entity-list-field/entity-list-add-token.d.ts","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-typings/business-fields/schedule-item-selector-field/schedule-item-selector-field.d.ts","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-typings/business-fields/lookup-module-check-list-field/lookup-module-check-list-form-token.d.ts","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-typings/business-fields/lookup-module-check-list-field/lookup-module-check-list-field.d.ts","C:\\Users\\ABDULLAH WISHAH\\Documents\\GitHub\\components\\dist\\masterteam\\components\\tmp-typings\\business-fields\\masterteam-components-business-fields.d.ts"],"name":"masterteam-components-business-fields.d","type":"chunk","dynamicImports":[],"fileName":"masterteam-components-business-fields.d.ts","implicitlyLoadedBefore":[],"importedBindings":{"@angular/core":["AfterViewInit","*","InjectionToken","Type","OnInit"],"@masterteam/components":["LookupMatrixFieldConfig","LookupOptionItemConfig","LookupMatrixCellConfig","SchedulePredecessorFieldRuntimeContext","EntityListFieldRuntimeContext","ScheduleItemSelectorFieldRuntimeContext","LookupCheckListPropertyConfig","LookupModuleCheckListFieldRuntimeContext"],"@angular/forms":["ControlValueAccessor","NgControl","Validators"],"@angular/common/http":["HttpContext"],"@masterteam/components/table":["ColumnDef","TableAction"],"@masterteam/components/entities":["EntityData"]},"imports":["@angular/core","@masterteam/components","@angular/forms","@angular/common/http","@masterteam/components/table","@masterteam/components/entities"],"modules":{"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-typings/business-fields/lookup-matrix-field/lookup-matrix-field.d.ts":{"code":"declare class LookupMatrixField implements AfterViewInit {\n readonly config: _angular_core.InputSignal<LookupMatrixFieldConfig>;\n private readonly controlContainer;\n private readonly destroyRef;\n private readonly transloco;\n private readonly valueVersion;\n private subscribedControl;\n readonly hasYAxis: _angular_core.Signal<boolean>;\n readonly xOptions: _angular_core.Signal<LookupOptionItemConfig[]>;\n readonly yOptions: _angular_core.Signal<LookupOptionItemConfig[]>;\n readonly hasMatrix: _angular_core.Signal<boolean>;\n readonly cellMap: _angular_core.Signal<Map<string, LookupMatrixCellConfig>>;\n readonly selectedXOption: _angular_core.Signal<LookupOptionItemConfig | null>;\n readonly selectedYOption: _angular_core.Signal<LookupOptionItemConfig | null>;\n readonly activeCell: _angular_core.Signal<LookupMatrixCellConfig | null>;\n readonly selectionSummary: _angular_core.Signal<string>;\n readonly pendingMessage: _angular_core.Signal<string>;\n readonly missingResultMessage: _angular_core.Signal<string>;\n ngAfterViewInit(): void;\n getCell(xLookupItemId: number | string, yLookupItemId?: number | string): LookupMatrixCellConfig | null;\n getSwatchColor(color?: string | null): string | null;\n private getControlValue;\n private ensureControlSubscription;\n private resolveSelectedOption;\n private optionMatchesValue;\n private cellKey;\n private resolveColor;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<LookupMatrixField, never>;\n static ɵcmp: _angular_core.ɵɵComponentDeclaration<LookupMatrixField, \"mt-lookup-matrix-field\", never, { \"config\": { \"alias\": \"config\"; \"required\": true; \"isSignal\": true; }; }, {}, never, never, true, never>;\n}","originalLength":2043,"removedExports":[],"renderedExports":["LookupMatrixField"],"renderedLength":1734},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-typings/business-fields/schema-connection-field/schema-connection-field.d.ts":{"code":"/**\n * One source level inside connection configuration.\n * Comes from `field.propertyMetadata.configuration.sourceLevels[]`\n *\n * A source can be either a **level** (has `levelId`/`levelKey`) or a\n * **module** (has `moduleId`/`moduleKey`). Exactly one pair will be present.\n */\ninterface ConnectionSourceLevel {\n /** Present for level-type sources */\n levelId?: number;\n /** Present for level-type sources */\n levelKey?: string;\n /** Present for module-type sources */\n moduleId?: number;\n /** Present for module-type sources */\n moduleKey?: string;\n name: {\n en?: string;\n ar?: string;\n [k: string]: string | undefined;\n };\n connectionId: number;\n isOptional: boolean;\n allowManyToMany: boolean;\n supportWeights: boolean;\n optionsQuery: {\n path: string;\n method?: string;\n query?: Record<string, unknown>;\n };\n}\n/**\n * Full connection configuration from `field.propertyMetadata.configuration`.\n * This is passed as a single input to the component.\n */\ninterface SchemaConnectionConfig {\n targetLevelId: number;\n sourceLevelId?: number;\n propertyKey?: string;\n valueMode?: string;\n sourceLevels: ConnectionSourceLevel[];\n payloadTemplate?: {\n levelId: number;\n sources: any[];\n };\n sourceItemShape?: Record<string, string>;\n}\n/** One selected source in the connection payload */\ninterface ConnectionSource {\n sourceLevelId?: number;\n sourceLevelDataId?: number;\n sourceModuleId?: number;\n sourceModuleDataId?: number;\n}\n/** The value shape for a connection field */\ninterface ConnectionPayload {\n levelId: number;\n sources: ConnectionSource[];\n}\n/**\n * Internal state tracked per source level dropdown.\n */\ninterface SourceLevelState {\n source: ConnectionSourceLevel;\n options: any[];\n loading: boolean;\n}\ndeclare class SchemaConnectionField implements ControlValueAccessor {\n readonly label: _angular_core.InputSignal<string>;\n readonly placeholder: _angular_core.InputSignal<string>;\n readonly readonly: _angular_core.InputSignal<boolean>;\n readonly required: _angular_core.InputSignal<boolean>;\n readonly filter: _angular_core.InputSignal<boolean>;\n /**\n * Full connection configuration object from the API.\n * Includes `targetLevelId`, `sourceLevels[]`, `payloadTemplate`, etc.\n */\n readonly configuration: _angular_core.InputSignal<SchemaConnectionConfig>;\n /**\n * Optional HttpContext for API requests (e.g. to set base URL behavior).\n */\n readonly context: _angular_core.InputSignal<HttpContext | undefined>;\n /** The full ConnectionPayload value */\n value: _angular_core.WritableSignal<ConnectionPayload | null>;\n disabled: _angular_core.WritableSignal<boolean>;\n /** Per-source-level state: options + loading */\n sourceLevelStates: _angular_core.WritableSignal<SourceLevelState[]>;\n /** Mutable selections per source level: sourceLevelId -> selected value */\n selections: Record<number, any>;\n onTouched: () => void;\n onModelChange: (value: ConnectionPayload | null) => void;\n /**\n * Required-validation for a connection: emptiness is decided by the selected\n * `sources`, not by the value being null. The runtime loads an unselected\n * connection as `{ levelId, sources: [] }` — a non-null object that Angular's\n * stock `Validators.required` accepts — so a plain required check would let an\n * empty connection pass and the form submit. Mirrors {@link syncValue}, which\n * collapses a source-less selection to `null`.\n */\n private readonly connectionRequiredValidator;\n ngControl: NgControl | null;\n private http;\n private destroyRef;\n private transloco;\n /** Active UI language, kept reactive so source labels re-resolve on switch. */\n private readonly activeLang;\n /**\n * Resolve a source level's display name in the active locale, falling back\n * to English, Arabic, then the level/module key.\n */\n protected resolveSourceName(source: ConnectionSourceLevel): string;\n /**\n * Source levels from configuration.\n */\n readonly sourceLevels: _angular_core.Signal<ConnectionSourceLevel[]>;\n /**\n * Tooltip for the marker rendered next to every source label — it is what\n * tells the user these dropdowns belong to a connection, now that the\n * connection's own label no longer occupies a row above them. Reads\n * {@link activeLang} so the text re-translates on language switch.\n */\n readonly connectionHint: _angular_core.Signal<string>;\n /**\n * Placeholder for a source dropdown: its own source name, matching the label\n * above it. Falls back to the field-level placeholder only when the source\n * has no resolvable name.\n */\n protected sourcePlaceholder(source: ConnectionSourceLevel): string;\n /**\n * Percentage width for each dropdown, evenly divided.\n */\n readonly dropdownWidth: _angular_core.Signal<string>;\n constructor();\n /**\n * Returns a stable numeric ID for a source regardless of whether it is a\n * level (`levelId`) or a module (`moduleId`). Used as the key in `selections`\n * and `sourceLevelStates`.\n */\n protected getSourceId(source: ConnectionSourceLevel): number;\n /**\n * Builds the `contextKey` for the `fetch/query` request based on source type.\n */\n private getContextKey;\n private loadOptions;\n private updateSourceState;\n /**\n * Single handler — no params. Reads all selections, builds the combined payload.\n */\n syncValue(): void;\n private distributeToSelections;\n writeValue(value: ConnectionPayload | string | null): void;\n registerOnChange(fn: (value: ConnectionPayload | null) => void): void;\n registerOnTouched(fn: any): void;\n setDisabledState(disabled: boolean): void;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<SchemaConnectionField, never>;\n static ɵcmp: _angular_core.ɵɵComponentDeclaration<SchemaConnectionField, \"mt-schema-connection-field\", never, { \"label\": { \"alias\": \"label\"; \"required\": false; \"isSignal\": true; }; \"placeholder\": { \"alias\": \"placeholder\"; \"required\": false; \"isSignal\": true; }; \"readonly\": { \"alias\": \"readonly\"; \"required\": false; \"isSignal\": true; }; \"required\": { \"alias\": \"required\"; \"required\": false; \"isSignal\": true; }; \"filter\": { \"alias\": \"filter\"; \"required\": false; \"isSignal\": true; }; \"configuration\": { \"alias\": \"configuration\"; \"required\": true; \"isSignal\": true; }; \"context\": { \"alias\": \"context\"; \"required\": false; \"isSignal\": true; }; }, {}, never, never, true, never>;\n}","originalLength":6931,"removedExports":[],"renderedExports":["ConnectionSourceLevel","SchemaConnectionConfig","ConnectionSource","ConnectionPayload","SourceLevelState","SchemaConnectionField"],"renderedLength":6625},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-typings/business-fields/schedule-predecessor-field/schedule-predecessor-field.d.ts":{"code":"type PredecessorType = 0 | 1 | 2 | 3;\ninterface SchedulePredecessorValue {\n predecessorId: number | string;\n type: PredecessorType;\n lagDays: number;\n}\ninterface SchedulePredecessorRow extends SchedulePredecessorValue {\n key: string;\n}\ninterface SelectOption {\n label: string;\n value: number | string;\n}\ndeclare class SchedulePredecessorField implements ControlValueAccessor {\n private readonly predecessorCellTpl;\n private readonly typeCellTpl;\n private readonly lagCellTpl;\n readonly label: _angular_core.InputSignal<string>;\n /** Fallback so a control-less, label-less field never renders id=\"undefined\". */\n private readonly defaultFieldId;\n /** Shared by the input and its <label for>. See src/lib/utils/field-id. */\n readonly fieldId: _angular_core.Signal<string>;\n readonly placeholder: _angular_core.InputSignal<string>;\n readonly readonly: _angular_core.InputSignal<boolean>;\n readonly required: _angular_core.InputSignal<boolean>;\n readonly configuration: _angular_core.InputSignal<unknown>;\n readonly runtimeContext: _angular_core.InputSignal<SchedulePredecessorFieldRuntimeContext | null>;\n readonly loading: _angular_core.WritableSignal<boolean>;\n readonly taskOptions: _angular_core.WritableSignal<SelectOption[]>;\n readonly rows: _angular_core.WritableSignal<SchedulePredecessorRow[]>;\n readonly disabled: _angular_core.WritableSignal<boolean>;\n readonly typeOptions: _angular_core.Signal<SelectOption[]>;\n readonly availableTaskOptions: _angular_core.Signal<SelectOption[]>;\n readonly canAddRow: _angular_core.Signal<boolean>;\n readonly addTooltip: _angular_core.Signal<string | undefined>;\n readonly pageSize: _angular_core.Signal<number>;\n readonly columns: _angular_core.WritableSignal<ColumnDef[]>;\n readonly rowActions: _angular_core.Signal<TableAction[]>;\n requiredValidator: typeof Validators.required;\n onTouched: () => void;\n onModelChange: (value: string | null) => void;\n ngControl: NgControl | null;\n private readonly http;\n private readonly transloco;\n private readonly destroyRef;\n private readonly activeLang;\n private rowKey;\n readonly texts: _angular_core.Signal<{\n noAvailable: string;\n predecessor: string;\n type: string;\n lagDays: string;\n delete: string;\n }>;\n constructor();\n addRow(): void;\n removeRow(key: string): void;\n updateRow(key: string, patch: Partial<SchedulePredecessorRow>): void;\n writeValue(value: unknown): void;\n registerOnChange(fn: (value: string | null) => void): void;\n registerOnTouched(fn: () => void): void;\n setDisabledState(disabled: boolean): void;\n private syncRows;\n private loadTaskOptions;\n private mapTaskOptions;\n private resolveRootRecords;\n private flattenRecords;\n private nextRowKey;\n private parseCompactValue;\n private formatCompactValue;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<SchedulePredecessorField, never>;\n static ɵcmp: _angular_core.ɵɵComponentDeclaration<SchedulePredecessorField, \"mt-schedule-predecessor-field\", never, { \"label\": { \"alias\": \"label\"; \"required\": false; \"isSignal\": true; }; \"placeholder\": { \"alias\": \"placeholder\"; \"required\": false; \"isSignal\": true; }; \"readonly\": { \"alias\": \"readonly\"; \"required\": false; \"isSignal\": true; }; \"required\": { \"alias\": \"required\"; \"required\": false; \"isSignal\": true; }; \"configuration\": { \"alias\": \"configuration\"; \"required\": false; \"isSignal\": true; }; \"runtimeContext\": { \"alias\": \"runtimeContext\"; \"required\": false; \"isSignal\": true; }; }, {}, never, never, true, never>;\n}","originalLength":4107,"removedExports":[],"renderedExports":["SchedulePredecessorField"],"renderedLength":3638},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-typings/business-fields/entity-list-field/entity-list-field.d.ts":{"code":"interface EntityListColumnDef extends ColumnDef {\n key: string;\n label: string;\n type: 'entity';\n viewType?: string;\n order?: number;\n visible?: boolean;\n configuration?: Record<string, unknown> | null;\n /** Underlying catalog property key (e.g. \"task_name\") used to look up\n * form values keyed by property key when a new row is added locally. */\n propertyKey?: string;\n}\ntype EntityListRow = Record<string, unknown | EntityData>;\n/**\n * Configured access mode. Mirrors the backend `EntityList` access matrix:\n * `Auto` and `ReadWrite` allow both, `Read` reads only, `Write` writes only,\n * `None` neither.\n */\ntype EntityListAccess = 'Auto' | 'Read' | 'Write' | 'ReadWrite' | 'None';\n/** One submitted row value (`values[]` entry of the stored EntityList JSON). */\ninterface EntityListSubmitValue {\n propertyKey: string;\n rawValue: string | null;\n}\n/**\n * A pending create/update row in the stored EntityList payload.\n * `entityId > 0` updates that target record; `0` creates a new one.\n */\ninterface EntityListSubmitRow {\n rowId: string;\n entityId: number;\n values: EntityListSubmitValue[];\n}\n/** Stored EntityList property value (round-tripped through the form). */\ninterface EntityListStoredValue {\n entityIds?: number[];\n createdIds?: number[];\n updatedIds?: number[];\n deletedIds?: number[];\n snapshot?: unknown;\n rows?: EntityListSubmitRow[];\n}\ndeclare class EntityListField implements ControlValueAccessor {\n readonly label: _angular_core.InputSignal<string>;\n readonly readonly: _angular_core.InputSignal<boolean>;\n readonly required: _angular_core.InputSignal<boolean>;\n /** EntityList property id (kept for back-compat; unused by fetch/query). */\n readonly propertyId: _angular_core.InputSignal<number | null>;\n /** Property configuration (sourceType, moduleId, access, readFields, etc). */\n readonly configuration: _angular_core.InputSignal<Record<string, unknown> | null>;\n /** Runtime ids needed to call the read endpoint. */\n readonly runtimeContext: _angular_core.InputSignal<EntityListFieldRuntimeContext | null>;\n /** Optional HttpContext (kept for back-compat). */\n readonly context: _angular_core.InputSignal<HttpContext | undefined>;\n private readonly storedValue;\n protected readonly columns: _angular_core.WritableSignal<EntityListColumnDef[]>;\n /** Rows loaded from the backend (existing target records). */\n protected readonly rows: _angular_core.WritableSignal<EntityListRow[]>;\n protected readonly loading: _angular_core.WritableSignal<boolean>;\n protected readonly errorMessage: _angular_core.WritableSignal<string | null>;\n protected readonly disabled: _angular_core.WritableSignal<boolean>;\n protected requiredValidator: typeof Validators.required;\n ngControl: NgControl | null;\n protected readonly levelId: _angular_core.Signal<string | number | null>;\n protected readonly levelDataId: _angular_core.Signal<string | number | null>;\n protected readonly moduleId: _angular_core.Signal<string | number | null>;\n protected readonly readFields: _angular_core.Signal<string[]>;\n /** Normalized `access` from the property configuration. */\n protected readonly accessMode: _angular_core.Signal<EntityListAccess>;\n protected readonly canRead: _angular_core.Signal<boolean>;\n /** Access allows module-backed create/update/delete. */\n private readonly writeAllowed;\n /** Write UI is rendered only when access allows it and the field is editable. */\n protected readonly canWrite: _angular_core.Signal<boolean>;\n protected readonly writeFields: _angular_core.Signal<string[]>;\n /**\n * Pending create/update rows, in the exact shape persisted by the backend\n * (`rows[]` of the stored EntityList JSON). Rows with `entityId > 0` are\n * partial updates of existing records; `entityId = 0` rows are creates.\n */\n private readonly pendingRows;\n /** Existing entity ids the user removed (submitted as `deletedIds`). */\n private readonly deletedIds;\n /** rowId → original form values / option labels (view state only). */\n private readonly rowDrafts;\n private localRowSeq;\n /** Serialized copy of the last value we emitted, to ignore CVA echoes. */\n private lastEmittedJson;\n /** Server rows indexed by entity id, for merging pending updates. */\n private readonly rowsByEntityId;\n /** Locally created rows (not yet persisted). */\n private readonly createdRows;\n /** Pending edits of existing rows, keyed by entity id. */\n private readonly editedRowsByEntityId;\n /**\n * Rows rendered in the table. In write mode existing rows are merged with\n * pending edits, removed rows are hidden, and locally created rows are\n * appended.\n */\n protected readonly displayRows: _angular_core.Signal<EntityListRow[]>;\n protected readonly hasRows: _angular_core.Signal<boolean>;\n protected readonly hasRequiredContext: _angular_core.Signal<boolean>;\n protected onTouched: () => void;\n protected onModelChange: (value: EntityListStoredValue | null) => void;\n private readonly http;\n private readonly destroyRef;\n private readonly modal;\n private readonly transloco;\n /**\n * Optional rich add-row dialog (provided by `@masterteam/forms` via\n * `provideEntityListAddForm()`). When available, used instead of the local\n * minimal dialog so the popup renders `mt-client-form` filtered by\n * `writeFields`.\n */\n private readonly addDialogComponent;\n constructor();\n writeValue(value: EntityListStoredValue | string | null): void;\n /**\n * True when the written value still carries exactly the rows and deletions\n * we last emitted — i.e. the form is echoing our own value back rather than\n * loading a new one.\n */\n private isEchoOfLastEmit;\n /**\n * The stored value is persisted as JSON, so a host may write either the\n * parsed object or its raw string form.\n */\n private coerceStoredValue;\n registerOnChange(fn: (value: EntityListStoredValue | null) => void): void;\n registerOnTouched(fn: () => void): void;\n setDisabledState(isDisabled: boolean): void;\n /** Row actions shown in write mode — edit and delete. */\n protected readonly writeRowActions: _angular_core.Signal<TableAction[]>;\n protected openAddDialog(): void;\n protected openEditDialog(row: EntityListRow): void;\n /**\n * Existing target records are updated partially: only values the user\n * actually changed are submitted, so fields the dialog could not pre-fill\n * (keys outside `readFields`) are left untouched by the backend.\n */\n private applyExistingRowEdit;\n /** A locally created row is replaced wholesale by the dialog result. */\n private applyCreatedRowEdit;\n /**\n * Remove a row. Locally created rows are dropped from the pending payload;\n * existing records are queued in `deletedIds` for the backend to delete.\n */\n protected deleteRow(row: EntityListRow): void;\n /**\n * Normalize the add/edit dialog close payload. The rich dialog returns\n * `{ values, display }`; a custom add-dialog may still return the raw values\n * object directly (no display map), which we treat as `display = {}`.\n */\n private parseDialogResult;\n private nextRowId;\n private setRowDraft;\n private clearRowDraft;\n private buildRow;\n /** Render one table cell from a raw form value and its resolved label. */\n private buildCell;\n /**\n * Shape a raw form value into the value an entity renderer expects for the\n * given view type. Locally-added rows carry raw form values, but renderers\n * like `mt-entity-user` need a display object (`{ displayName }`) — a\n * team-member `User` field is a select whose control value is a bare user id.\n * `label` is the resolved option display (present for select-based fields).\n */\n private toLocalEntityValue;\n private emitValue;\n /** `values[]` entries, restricted to `writeFields` when configured. */\n private toSubmitValues;\n /** Backend `rawValue` is a serialized scalar; objects/arrays go as JSON. */\n private toRawValue;\n private toValueMap;\n private dropEmptyValues;\n /**\n * Keys the user actually changed. A key that was empty before and is still\n * empty is skipped (the dialog simply could not pre-fill it); a key that had\n * a value and is now empty is kept so the backend clears it.\n */\n private diffValues;\n private isEmptyValue;\n private isSameValue;\n private fetchRows;\n private applyResponse;\n private toEntityData;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityListField, never>;\n static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityListField, \"mt-entity-list-field\", never, { \"label\": { \"alias\": \"label\"; \"required\": false; \"isSignal\": true; }; \"readonly\": { \"alias\": \"readonly\"; \"required\": false; \"isSignal\": true; }; \"required\": { \"alias\": \"required\"; \"required\": false; \"isSignal\": true; }; \"propertyId\": { \"alias\": \"propertyId\"; \"required\": false; \"isSignal\": true; }; \"configuration\": { \"alias\": \"configuration\"; \"required\": false; \"isSignal\": true; }; \"runtimeContext\": { \"alias\": \"runtimeContext\"; \"required\": false; \"isSignal\": true; }; \"context\": { \"alias\": \"context\"; \"required\": false; \"isSignal\": true; }; }, {}, never, never, true, never>;\n}","originalLength":10030,"removedExports":[],"renderedExports":["EntityListField"],"renderedLength":9401},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-typings/business-fields/entity-list-field/entity-list-add-token.d.ts":{"code":"/** Inputs the EntityList add-row dialog will receive via ModalService inputValues. */\ninterface EntityListAddDialogInputs {\n moduleId: number | string | null;\n levelId: number | string | null;\n levelDataId: number | string | null;\n /** Property keys that should be editable in the dialog. */\n writeFields: string[];\n /** Pre-populated form values (keyed by property key) for the Edit flow. */\n initialValues?: Record<string, unknown>;\n /** True when the dialog edits an existing row rather than adding one. */\n isEdit?: boolean;\n}\n/**\n * Token used by `mt-entity-list-field` (Write mode) to open the rich add-row\n * dialog backed by `@masterteam/forms`'s `mt-client-form`. Apps that want this\n * behavior should call `provideEntityListAddForm()` from\n * `@masterteam/forms/entity-list-add-form` in their app providers. When the\n * token is not registered, the field falls back to a minimal text-only popup.\n */\ndeclare const ENTITY_LIST_ADD_DIALOG_COMPONENT: InjectionToken<Type<unknown>>;","originalLength":1086,"removedExports":[],"renderedExports":["EntityListAddDialogInputs","ENTITY_LIST_ADD_DIALOG_COMPONENT"],"renderedLength":1017},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-typings/business-fields/schedule-item-selector-field/schedule-item-selector-field.d.ts":{"code":"/** One picker option — only the name is shown. */\ninterface ScheduleItemOption {\n label: string;\n value: number;\n}\n/**\n * Runtime picker for `ScheduleItemSelector` properties.\n *\n * Backend-filtered: the full option list comes from\n * `GET forms/options/{propertyKey}` (which applies the configured rule, e.g.\n * `DeliverableAcceptance.AvailableDeliverables`). All available items are\n * loaded up front and rendered with the standard `mt-select-field` /\n * `mt-multi-select-field`; the field shows only the item name.\n *\n * The control value is always a numeric id array (`valueMode = \"IdArray\"`).\n * In `Single` mode only one id may be selected.\n */\ndeclare class ScheduleItemSelectorField implements ControlValueAccessor {\n readonly label: _angular_core.InputSignal<string>;\n readonly placeholder: _angular_core.InputSignal<string>;\n readonly readonly: _angular_core.InputSignal<boolean>;\n readonly required: _angular_core.InputSignal<boolean>;\n readonly propertyKey: _angular_core.InputSignal<string>;\n readonly selectionMode: _angular_core.InputSignal<\"Single\" | \"Multi\">;\n readonly runtimeContext: _angular_core.InputSignal<ScheduleItemSelectorFieldRuntimeContext | null>;\n readonly context: _angular_core.InputSignal<HttpContext | undefined>;\n /** Full list of available deliverables (loaded once). */\n readonly options: _angular_core.WritableSignal<ScheduleItemOption[]>;\n readonly loading: _angular_core.WritableSignal<boolean>;\n readonly disabled: _angular_core.WritableSignal<boolean>;\n /** Selected ids — the control value (`number[]`). */\n readonly value: _angular_core.WritableSignal<number[]>;\n readonly isMultiple: _angular_core.Signal<boolean>;\n /** Single-mode ngModel value (a scalar id, not an array). */\n readonly singleValue: _angular_core.Signal<number>;\n ngControl: NgControl | null;\n onTouched: () => void;\n onModelChange: (value: number[] | null) => void;\n private readonly http;\n private readonly destroyRef;\n /** Query signature already loaded — prevents duplicate full loads. */\n private loadedKey;\n constructor();\n onMultiChange(ids: number[] | null): void;\n onSingleChange(id: number | null): void;\n writeValue(value: unknown): void;\n registerOnChange(fn: (value: number[] | null) => void): void;\n registerOnTouched(fn: () => void): void;\n setDisabledState(disabled: boolean): void;\n private loadAllOptions;\n private fetchPage;\n private buildParams;\n private mapOptions;\n private buildContextKey;\n private queryKey;\n private emit;\n private normalizeIds;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScheduleItemSelectorField, never>;\n static ɵcmp: _angular_core.ɵɵComponentDeclaration<ScheduleItemSelectorField, \"mt-schedule-item-selector-field\", never, { \"label\": { \"alias\": \"label\"; \"required\": false; \"isSignal\": true; }; \"placeholder\": { \"alias\": \"placeholder\"; \"required\": false; \"isSignal\": true; }; \"readonly\": { \"alias\": \"readonly\"; \"required\": false; \"isSignal\": true; }; \"required\": { \"alias\": \"required\"; \"required\": false; \"isSignal\": true; }; \"propertyKey\": { \"alias\": \"propertyKey\"; \"required\": false; \"isSignal\": true; }; \"selectionMode\": { \"alias\": \"selectionMode\"; \"required\": false; \"isSignal\": true; }; \"runtimeContext\": { \"alias\": \"runtimeContext\"; \"required\": false; \"isSignal\": true; }; \"context\": { \"alias\": \"context\"; \"required\": false; \"isSignal\": true; }; }, {}, never, never, true, never>;\n}","originalLength":3862,"removedExports":[],"renderedExports":["ScheduleItemSelectorField"],"renderedLength":3483},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-typings/business-fields/lookup-module-check-list-field/lookup-module-check-list-form-token.d.ts":{"code":"/**\n * Inputs for the injected checklist form (one instance per field). It loads the\n * scope module form once and renders a collapsible section per lookup item.\n * Passed via `ngComponentOutlet` inputs.\n */\ninterface LookupCheckListFormInputs {\n /** Lookup items rendered as collapsible sections. */\n lookupOptions: LookupOptionItemConfig[];\n /** Full lookup catalog used to resolve nested lookup fields. */\n lookups: unknown[];\n /** Property keys to render in each section form. */\n propertyKeys: string[];\n /** Scope module id whose form is loaded once via `process-form-load`. */\n moduleId: number | string | null;\n /** Current level id. */\n levelId: number | string | null;\n /** Current workspace instance id. */\n levelDataId: number | string | null;\n /** Current aggregated value (array of `{ lookupKey, props }`). */\n value: unknown;\n /** Whether the field is read-only. */\n readonly: boolean;\n /** Called whenever the aggregated checklist value changes. */\n valueChange: (value: unknown) => void;\n /** Called whenever the aggregated validity changes (true = incomplete). */\n validityChange: (invalid: boolean) => void;\n}\n/**\n * Token used by `mt-lookup-module-check-list-field` to render the checklist\n * sections + per-section forms via `@masterteam/forms`'s `mt-client-form`\n * machinery (`/api/process-form-load`, loaded once). Apps register it with\n * `provideLookupModuleCheckListForm()` from\n * `@masterteam/forms/lookup-module-check-list-form`. When the token is not\n * registered, the field falls back to plain text inputs per property.\n */\ndeclare const LOOKUP_CHECK_LIST_FORM_COMPONENT: InjectionToken<Type<unknown>>;","originalLength":1834,"removedExports":[],"renderedExports":["LookupCheckListFormInputs","LOOKUP_CHECK_LIST_FORM_COMPONENT"],"renderedLength":1695},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-typings/business-fields/lookup-module-check-list-field/lookup-module-check-list-field.d.ts":{"code":"/** Stored entry as persisted in the property value array. */\ninterface StoredCheckListProp {\n key: string;\n value: unknown;\n}\ninterface StoredCheckListEntry {\n lookupKey: string;\n props: StoredCheckListProp[];\n}\n/** A collapsible section bound to one lookup item. */\ninterface CheckListSection {\n lookupKey: string;\n label: string;\n}\ndeclare class LookupModuleCheckListField implements ControlValueAccessor, OnInit {\n readonly label: _angular_core.InputSignal<string>;\n readonly readonly: _angular_core.InputSignal<boolean>;\n readonly required: _angular_core.InputSignal<boolean>;\n /** Lookup items rendered as collapsible checklist sections. */\n readonly lookupOptions: _angular_core.InputSignal<LookupOptionItemConfig[]>;\n /** Full lookup catalog passed to the rich nested form renderer. */\n readonly lookups: _angular_core.InputSignal<unknown[]>;\n /** Module property keys/labels (used by the text fallback + labels). */\n readonly propertyFields: _angular_core.InputSignal<LookupCheckListPropertyConfig[]>;\n /** Scope module id whose form is loaded for each section. */\n readonly scopeId: _angular_core.InputSignal<string | number | null>;\n /** Property keys to render in each section form. */\n readonly propertyKeys: _angular_core.InputSignal<string[]>;\n /** Runtime ids needed to load each section form. */\n readonly runtimeContext: _angular_core.InputSignal<LookupModuleCheckListFieldRuntimeContext | null>;\n /** Per-lookupKey captured values, keyed by property key. */\n private readonly sectionValues;\n private readonly expandedKeys;\n protected readonly disabled: _angular_core.WritableSignal<boolean>;\n /** True when a section's required inner fields are unfilled. */\n private readonly incomplete;\n ngControl: NgControl | null;\n /**\n * Rich checklist form provided by `@masterteam/forms`\n * (`provideLookupModuleCheckListForm()`). When absent the field falls back to\n * plain text inputs per property.\n */\n protected readonly formComponent: _angular_core.Type<unknown> | null;\n protected readonly isReadonly: _angular_core.Signal<boolean>;\n protected readonly sections: _angular_core.Signal<CheckListSection[]>;\n /**\n * Use the rich form whenever it's registered and a scope module is set. The\n * scope form only needs `scopeId` to load its field definitions; `levelId` /\n * `levelDataId` are passed when available but are not required (e.g. they are\n * null while creating a brand-new Level instance).\n */\n protected readonly useRichForm: _angular_core.Signal<boolean>;\n /**\n * The last externally-written value (via `writeValue`). Passed to the rich\n * form as its initial value. It is intentionally NOT updated from the form's\n * own `valueChange` — feeding emitted values back as an input would create an\n * infinite change-detection loop.\n */\n private readonly incomingValue;\n private onTouched;\n private onModelChange;\n private control;\n private validatorAttached;\n /**\n * Validator attached imperatively to the host control. Attaching it here\n * (rather than via an `NG_VALIDATORS` provider) avoids a circular dependency\n * with the self-injected `NgControl` used as the value accessor.\n */\n private readonly checklistValidator;\n /** Stable callbacks so the outlet inputs object stays referentially calm. */\n private readonly emitValue;\n private readonly emitValidity;\n constructor();\n ngOnInit(): void;\n private ensureValidator;\n writeValue(value: unknown): void;\n registerOnChange(fn: (value: StoredCheckListEntry[] | null) => void): void;\n registerOnTouched(fn: () => void): void;\n setDisabledState(isDisabled: boolean): void;\n protected readonly formInputs: _angular_core.Signal<LookupCheckListFormInputs>;\n protected isExpanded(lookupKey: string): boolean;\n protected toggle(lookupKey: string): void;\n protected hasValues(lookupKey: string): boolean;\n protected fieldValue(lookupKey: string, propKey: string): string;\n protected setFieldValue(lookupKey: string, propKey: string, value: string): void;\n private pushModelValue;\n private buildPayload;\n private normalizeIncoming;\n private extractEntries;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<LookupModuleCheckListField, never>;\n static ɵcmp: _angular_core.ɵɵComponentDeclaration<LookupModuleCheckListField, \"mt-lookup-module-check-list-field\", never, { \"label\": { \"alias\": \"label\"; \"required\": false; \"isSignal\": true; }; \"readonly\": { \"alias\": \"readonly\"; \"required\": false; \"isSignal\": true; }; \"required\": { \"alias\": \"required\"; \"required\": false; \"isSignal\": true; }; \"lookupOptions\": { \"alias\": \"lookupOptions\"; \"required\": false; \"isSignal\": true; }; \"lookups\": { \"alias\": \"lookups\"; \"required\": false; \"isSignal\": true; }; \"propertyFields\": { \"alias\": \"propertyFields\"; \"required\": false; \"isSignal\": true; }; \"scopeId\": { \"alias\": \"scopeId\"; \"required\": false; \"isSignal\": true; }; \"propertyKeys\": { \"alias\": \"propertyKeys\"; \"required\": false; \"isSignal\": true; }; \"runtimeContext\": { \"alias\": \"runtimeContext\"; \"required\": false; \"isSignal\": true; }; }, {}, never, never, true, never>;\n}","originalLength":5761,"removedExports":[],"renderedExports":["LookupModuleCheckListField"],"renderedLength":5240},"C:\\Users\\ABDULLAH WISHAH\\Documents\\GitHub\\components\\dist\\masterteam\\components\\tmp-typings\\business-fields\\masterteam-components-business-fields.d.ts":{"code":null,"originalLength":143,"removedExports":[],"renderedExports":[],"renderedLength":0}},"referencedFiles":[],"code":"import * as _angular_core from '@angular/core';\nimport { AfterViewInit, InjectionToken, Type, OnInit } from '@angular/core';\nimport { LookupMatrixFieldConfig, LookupOptionItemConfig, LookupMatrixCellConfig, SchedulePredecessorFieldRuntimeContext, EntityListFieldRuntimeContext, ScheduleItemSelectorFieldRuntimeContext, LookupCheckListPropertyConfig, LookupModuleCheckListFieldRuntimeContext } from '@masterteam/components';\nimport { ControlValueAccessor, NgControl, Validators } from '@angular/forms';\nimport { HttpContext } from '@angular/common/http';\nimport { ColumnDef, TableAction } from '@masterteam/components/table';\nimport { EntityData } from '@masterteam/components/entities';\n\ndeclare class LookupMatrixField implements AfterViewInit {\n readonly config: _angular_core.InputSignal<LookupMatrixFieldConfig>;\n private readonly controlContainer;\n private readonly destroyRef;\n private readonly transloco;\n private readonly valueVersion;\n private subscribedControl;\n readonly hasYAxis: _angular_core.Signal<boolean>;\n readonly xOptions: _angular_core.Signal<LookupOptionItemConfig[]>;\n readonly yOptions: _angular_core.Signal<LookupOptionItemConfig[]>;\n readonly hasMatrix: _angular_core.Signal<boolean>;\n readonly cellMap: _angular_core.Signal<Map<string, LookupMatrixCellConfig>>;\n readonly selectedXOption: _angular_core.Signal<LookupOptionItemConfig | null>;\n readonly selectedYOption: _angular_core.Signal<LookupOptionItemConfig | null>;\n readonly activeCell: _angular_core.Signal<LookupMatrixCellConfig | null>;\n readonly selectionSummary: _angular_core.Signal<string>;\n readonly pendingMessage: _angular_core.Signal<string>;\n readonly missingResultMessage: _angular_core.Signal<string>;\n ngAfterViewInit(): void;\n getCell(xLookupItemId: number | string, yLookupItemId?: number | string): LookupMatrixCellConfig | null;\n getSwatchColor(color?: string | null): string | null;\n private getControlValue;\n private ensureControlSubscription;\n private resolveSelectedOption;\n private optionMatchesValue;\n private cellKey;\n private resolveColor;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<LookupMatrixField, never>;\n static ɵcmp: _angular_core.ɵɵComponentDeclaration<LookupMatrixField, \"mt-lookup-matrix-field\", never, { \"config\": { \"alias\": \"config\"; \"required\": true; \"isSignal\": true; }; }, {}, never, never, true, never>;\n}\n\n/**\n * One source level inside connection configuration.\n * Comes from `field.propertyMetadata.configuration.sourceLevels[]`\n *\n * A source can be either a **level** (has `levelId`/`levelKey`) or a\n * **module** (has `moduleId`/`moduleKey`). Exactly one pair will be present.\n */\ninterface ConnectionSourceLevel {\n /** Present for level-type sources */\n levelId?: number;\n /** Present for level-type sources */\n levelKey?: string;\n /** Present for module-type sources */\n moduleId?: number;\n /** Present for module-type sources */\n moduleKey?: string;\n name: {\n en?: string;\n ar?: string;\n [k: string]: string | undefined;\n };\n connectionId: number;\n isOptional: boolean;\n allowManyToMany: boolean;\n supportWeights: boolean;\n optionsQuery: {\n path: string;\n method?: string;\n query?: Record<string, unknown>;\n };\n}\n/**\n * Full connection configuration from `field.propertyMetadata.configuration`.\n * This is passed as a single input to the component.\n */\ninterface SchemaConnectionConfig {\n targetLevelId: number;\n sourceLevelId?: number;\n propertyKey?: string;\n valueMode?: string;\n sourceLevels: ConnectionSourceLevel[];\n payloadTemplate?: {\n levelId: number;\n sources: any[];\n };\n sourceItemShape?: Record<string, string>;\n}\n/** One selected source in the connection payload */\ninterface ConnectionSource {\n sourceLevelId?: number;\n sourceLevelDataId?: number;\n sourceModuleId?: number;\n sourceModuleDataId?: number;\n}\n/** The value shape for a connection field */\ninterface ConnectionPayload {\n levelId: number;\n sources: ConnectionSource[];\n}\n/**\n * Internal state tracked per source level dropdown.\n */\ninterface SourceLevelState {\n source: ConnectionSourceLevel;\n options: any[];\n loading: boolean;\n}\ndeclare class SchemaConnectionField implements ControlValueAccessor {\n readonly label: _angular_core.InputSignal<string>;\n readonly placeholder: _angular_core.InputSignal<string>;\n readonly readonly: _angular_core.InputSignal<boolean>;\n readonly required: _angular_core.InputSignal<boolean>;\n readonly filter: _angular_core.InputSignal<boolean>;\n /**\n * Full connection configuration object from the API.\n * Includes `targetLevelId`, `sourceLevels[]`, `payloadTemplate`, etc.\n */\n readonly configuration: _angular_core.InputSignal<SchemaConnectionConfig>;\n /**\n * Optional HttpContext for API requests (e.g. to set base URL behavior).\n */\n readonly context: _angular_core.InputSignal<HttpContext | undefined>;\n /** The full ConnectionPayload value */\n value: _angular_core.WritableSignal<ConnectionPayload | null>;\n disabled: _angular_core.WritableSignal<boolean>;\n /** Per-source-level state: options + loading */\n sourceLevelStates: _angular_core.WritableSignal<SourceLevelState[]>;\n /** Mutable selections per source level: sourceLevelId -> selected value */\n selections: Record<number, any>;\n onTouched: () => void;\n onModelChange: (value: ConnectionPayload | null) => void;\n /**\n * Required-validation for a connection: emptiness is decided by the selected\n * `sources`, not by the value being null. The runtime loads an unselected\n * connection as `{ levelId, sources: [] }` — a non-null object that Angular's\n * stock `Validators.required` accepts — so a plain required check would let an\n * empty connection pass and the form submit. Mirrors {@link syncValue}, which\n * collapses a source-less selection to `null`.\n */\n private readonly connectionRequiredValidator;\n ngControl: NgControl | null;\n private http;\n private destroyRef;\n private transloco;\n /** Active UI language, kept reactive so source labels re-resolve on switch. */\n private readonly activeLang;\n /**\n * Resolve a source level's display name in the active locale, falling back\n * to English, Arabic, then the level/module key.\n */\n protected resolveSourceName(source: ConnectionSourceLevel): string;\n /**\n * Source levels from configuration.\n */\n readonly sourceLevels: _angular_core.Signal<ConnectionSourceLevel[]>;\n /**\n * Tooltip for the marker rendered next to every source label — it is what\n * tells the user these dropdowns belong to a connection, now that the\n * connection's own label no longer occupies a row above them. Reads\n * {@link activeLang} so the text re-translates on language switch.\n */\n readonly connectionHint: _angular_core.Signal<string>;\n /**\n * Placeholder for a source dropdown: its own source name, matching the label\n * above it. Falls back to the field-level placeholder only when the source\n * has no resolvable name.\n */\n protected sourcePlaceholder(source: ConnectionSourceLevel): string;\n /**\n * Percentage width for each dropdown, evenly divided.\n */\n readonly dropdownWidth: _angular_core.Signal<string>;\n constructor();\n /**\n * Returns a stable numeric ID for a source regardless of whether it is a\n * level (`levelId`) or a module (`moduleId`). Used as the key in `selections`\n * and `sourceLevelStates`.\n */\n protected getSourceId(source: ConnectionSourceLevel): number;\n /**\n * Builds the `contextKey` for the `fetch/query` request based on source type.\n */\n private getContextKey;\n private loadOptions;\n private updateSourceState;\n /**\n * Single handler — no params. Reads all selections, builds the combined payload.\n */\n syncValue(): void;\n private distributeToSelections;\n writeValue(value: ConnectionPayload | string | null): void;\n registerOnChange(fn: (value: ConnectionPayload | null) => void): void;\n registerOnTouched(fn: any): void;\n setDisabledState(disabled: boolean): void;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<SchemaConnectionField, never>;\n static ɵcmp: _angular_core.ɵɵComponentDeclaration<SchemaConnectionField, \"mt-schema-connection-field\", never, { \"label\": { \"alias\": \"label\"; \"required\": false; \"isSignal\": true; }; \"placeholder\": { \"alias\": \"placeholder\"; \"required\": false; \"isSignal\": true; }; \"readonly\": { \"alias\": \"readonly\"; \"required\": false; \"isSignal\": true; }; \"required\": { \"alias\": \"required\"; \"required\": false; \"isSignal\": true; }; \"filter\": { \"alias\": \"filter\"; \"required\": false; \"isSignal\": true; }; \"configuration\": { \"alias\": \"configuration\"; \"required\": true; \"isSignal\": true; }; \"context\": { \"alias\": \"context\"; \"required\": false; \"isSignal\": true; }; }, {}, never, never, true, never>;\n}\n\ntype PredecessorType = 0 | 1 | 2 | 3;\ninterface SchedulePredecessorValue {\n predecessorId: number | string;\n type: PredecessorType;\n lagDays: number;\n}\ninterface SchedulePredecessorRow extends SchedulePredecessorValue {\n key: string;\n}\ninterface SelectOption {\n label: string;\n value: number | string;\n}\ndeclare class SchedulePredecessorField implements ControlValueAccessor {\n private readonly predecessorCellTpl;\n private readonly typeCellTpl;\n private readonly lagCellTpl;\n readonly label: _angular_core.InputSignal<string>;\n /** Fallback so a control-less, label-less field never renders id=\"undefined\". */\n private readonly defaultFieldId;\n /** Shared by the input and its <label for>. See src/lib/utils/field-id. */\n readonly fieldId: _angular_core.Signal<string>;\n readonly placeholder: _angular_core.InputSignal<string>;\n readonly readonly: _angular_core.InputSignal<boolean>;\n readonly required: _angular_core.InputSignal<boolean>;\n readonly configuration: _angular_core.InputSignal<unknown>;\n readonly runtimeContext: _angular_core.InputSignal<SchedulePredecessorFieldRuntimeContext | null>;\n readonly loading: _angular_core.WritableSignal<boolean>;\n readonly taskOptions: _angular_core.WritableSignal<SelectOption[]>;\n readonly rows: _angular_core.WritableSignal<SchedulePredecessorRow[]>;\n readonly disabled: _angular_core.WritableSignal<boolean>;\n readonly typeOptions: _angular_core.Signal<SelectOption[]>;\n readonly availableTaskOptions: _angular_core.Signal<SelectOption[]>;\n readonly canAddRow: _angular_core.Signal<boolean>;\n readonly addTooltip: _angular_core.Signal<string | undefined>;\n readonly pageSize: _angular_core.Signal<number>;\n readonly columns: _angular_core.WritableSignal<ColumnDef[]>;\n readonly rowActions: _angular_core.Signal<TableAction[]>;\n requiredValidator: typeof Validators.required;\n onTouched: () => void;\n onModelChange: (value: string | null) => void;\n ngControl: NgControl | null;\n private readonly http;\n private readonly transloco;\n private readonly destroyRef;\n private readonly activeLang;\n private rowKey;\n readonly texts: _angular_core.Signal<{\n noAvailable: string;\n predecessor: string;\n type: string;\n lagDays: string;\n delete: string;\n }>;\n constructor();\n addRow(): void;\n removeRow(key: string): void;\n updateRow(key: string, patch: Partial<SchedulePredecessorRow>): void;\n writeValue(value: unknown): void;\n registerOnChange(fn: (value: string | null) => void): void;\n registerOnTouched(fn: () => void): void;\n setDisabledState(disabled: boolean): void;\n private syncRows;\n private loadTaskOptions;\n private mapTaskOptions;\n private resolveRootRecords;\n private flattenRecords;\n private nextRowKey;\n private parseCompactValue;\n private formatCompactValue;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<SchedulePredecessorField, never>;\n static ɵcmp: _angular_core.ɵɵComponentDeclaration<SchedulePredecessorField, \"mt-schedule-predecessor-field\", never, { \"label\": { \"alias\": \"label\"; \"required\": false; \"isSignal\": true; }; \"placeholder\": { \"alias\": \"placeholder\"; \"required\": false; \"isSignal\": true; }; \"readonly\": { \"alias\": \"readonly\"; \"required\": false; \"isSignal\": true; }; \"required\": { \"alias\": \"required\"; \"required\": false; \"isSignal\": true; }; \"configuration\": { \"alias\": \"configuration\"; \"required\": false; \"isSignal\": true; }; \"runtimeContext\": { \"alias\": \"runtimeContext\"; \"required\": false; \"isSignal\": true; }; }, {}, never, never, true, never>;\n}\n\ninterface EntityListColumnDef extends ColumnDef {\n key: string;\n label: string;\n type: 'entity';\n viewType?: string;\n order?: number;\n visible?: boolean;\n configuration?: Record<string, unknown> | null;\n /** Underlying catalog property key (e.g. \"task_name\") used to look up\n * form values keyed by property key when a new row is added locally. */\n propertyKey?: string;\n}\ntype EntityListRow = Record<string, unknown | EntityData>;\n/**\n * Configured access mode. Mirrors the backend `EntityList` access matrix:\n * `Auto` and `ReadWrite` allow both, `Read` reads only, `Write` writes only,\n * `None` neither.\n */\ntype EntityListAccess = 'Auto' | 'Read' | 'Write' | 'ReadWrite' | 'None';\n/** One submitted row value (`values[]` entry of the stored EntityList JSON). */\ninterface EntityListSubmitValue {\n propertyKey: string;\n rawValue: string | null;\n}\n/**\n * A pending create/update row in the stored EntityList payload.\n * `entityId > 0` updates that target record; `0` creates a new one.\n */\ninterface EntityListSubmitRow {\n rowId: string;\n entityId: number;\n values: EntityListSubmitValue[];\n}\n/** Stored EntityList property value (round-tripped through the form). */\ninterface EntityListStoredValue {\n entityIds?: number[];\n createdIds?: number[];\n updatedIds?: number[];\n deletedIds?: number[];\n snapshot?: unknown;\n rows?: EntityListSubmitRow[];\n}\ndeclare class EntityListField implements ControlValueAccessor {\n readonly label: _angular_core.InputSignal<string>;\n readonly readonly: _angular_core.InputSignal<boolean>;\n readonly required: _angular_core.InputSignal<boolean>;\n /** EntityList property id (kept for back-compat; unused by fetch/query). */\n readonly propertyId: _angular_core.InputSignal<number | null>;\n /** Property configuration (sourceType, moduleId, access, readFields, etc). */\n readonly configuration: _angular_core.InputSignal<Record<string, unknown> | null>;\n /** Runtime ids needed to call the read endpoint. */\n readonly runtimeContext: _angular_core.InputSignal<EntityListFieldRuntimeContext | null>;\n /** Optional HttpContext (kept for back-compat). */\n readonly context: _angular_core.InputSignal<HttpContext | undefined>;\n private readonly storedValue;\n protected readonly columns: _angular_core.WritableSignal<EntityListColumnDef[]>;\n /** Rows loaded from the backend (existing target records). */\n protected readonly rows: _angular_core.WritableSignal<EntityListRow[]>;\n protected readonly loading: _angular_core.WritableSignal<boolean>;\n protected readonly errorMessage: _angular_core.WritableSignal<string | null>;\n protected readonly disabled: _angular_core.WritableSignal<boolean>;\n protected requiredValidator: typeof Validators.required;\n ngControl: NgControl | null;\n protected readonly levelId: _angular_core.Signal<string | number | null>;\n protected readonly levelDataId: _angular_core.Signal<string | number | null>;\n protected readonly moduleId: _angular_core.Signal<string | number | null>;\n protected readonly readFields: _angular_core.Signal<string[]>;\n /** Normalized `access` from the property configuration. */\n protected readonly accessMode: _angular_core.Signal<EntityListAccess>;\n protected readonly canRead: _angular_core.Signal<boolean>;\n /** Access allows module-backed create/update/delete. */\n private readonly writeAllowed;\n /** Write UI is rendered only when access allows it and the field is editable. */\n protected readonly canWrite: _angular_core.Signal<boolean>;\n protected readonly writeFields: _angular_core.Signal<string[]>;\n /**\n * Pending create/update rows, in the exact shape persisted by the backend\n * (`rows[]` of the stored EntityList JSON). Rows with `entityId > 0` are\n * partial updates of existing records; `entityId = 0` rows are creates.\n */\n private readonly pendingRows;\n /** Existing entity ids the user removed (submitted as `deletedIds`). */\n private readonly deletedIds;\n /** rowId → original form values / option labels (view state only). */\n private readonly rowDrafts;\n private localRowSeq;\n /** Serialized copy of the last value we emitted, to ignore CVA echoes. */\n private lastEmittedJson;\n /** Server rows indexed by entity id, for merging pending updates. */\n private readonly rowsByEntityId;\n /** Locally created rows (not yet persisted). */\n private readonly createdRows;\n /** Pending edits of existing rows, keyed by entity id. */\n private readonly editedRowsByEntityId;\n /**\n * Rows rendered in the table. In write mode existing rows are merged with\n * pending edits, removed rows are hidden, and locally created rows are\n * appended.\n */\n protected readonly displayRows: _angular_core.Signal<EntityListRow[]>;\n protected readonly hasRows: _angular_core.Signal<boolean>;\n protected readonly hasRequiredContext: _angular_core.Signal<boolean>;\n protected onTouched: () => void;\n protected onModelChange: (value: EntityListStoredValue | null) => void;\n private readonly http;\n private readonly destroyRef;\n private readonly modal;\n private readonly transloco;\n /**\n * Optional rich add-row dialog (provided by `@masterteam/forms` via\n * `provideEntityListAddForm()`). When available, used instead of the local\n * minimal dialog so the popup renders `mt-client-form` filtered by\n * `writeFields`.\n */\n private readonly addDialogComponent;\n constructor();\n writeValue(value: EntityListStoredValue | string | null): void;\n /**\n * True when the written value still carries exactly the rows and deletions\n * we last emitted — i.e. the form is echoing our own value back rather than\n * loading a new one.\n */\n private isEchoOfLastEmit;\n /**\n * The stored value is persisted as JSON, so a host may write either the\n * parsed object or its raw string form.\n */\n private coerceStoredValue;\n registerOnChange(fn: (value: EntityListStoredValue | null) => void): void;\n registerOnTouched(fn: () => void): void;\n setDisabledState(isDisabled: boolean): void;\n /** Row actions shown in write mode — edit and delete. */\n protected readonly writeRowActions: _angular_core.Signal<TableAction[]>;\n protected openAddDialog(): void;\n protected openEditDialog(row: EntityListRow): void;\n /**\n * Existing target records are updated partially: only values the user\n * actually changed are submitted, so fields the dialog could not pre-fill\n * (keys outside `readFields`) are left untouched by the backend.\n */\n private applyExistingRowEdit;\n /** A locally created row is replaced wholesale by the dialog result. */\n private applyCreatedRowEdit;\n /**\n * Remove a row. Locally created rows are dropped from the pending payload;\n * existing records are queued in `deletedIds` for the backend to delete.\n */\n protected deleteRow(row: EntityListRow): void;\n /**\n * Normalize the add/edit dialog close payload. The rich dialog returns\n * `{ values, display }`; a custom add-dialog may still return the raw values\n * object directly (no display map), which we treat as `display = {}`.\n */\n private parseDialogResult;\n private nextRowId;\n private setRowDraft;\n private clearRowDraft;\n private buildRow;\n /** Render one table cell from a raw form value and its resolved label. */\n private buildCell;\n /**\n * Shape a raw form value into the value an entity renderer expects for the\n * given view type. Locally-added rows carry raw form values, but renderers\n * like `mt-entity-user` need a display object (`{ displayName }`) — a\n * team-member `User` field is a select whose control value is a bare user id.\n * `label` is the resolved option display (present for select-based fields).\n */\n private toLocalEntityValue;\n private emitValue;\n /** `values[]` entries, restricted to `writeFields` when configured. */\n private toSubmitValues;\n /** Backend `rawValue` is a serialized scalar; objects/arrays go as JSON. */\n private toRawValue;\n private toValueMap;\n private dropEmptyValues;\n /**\n * Keys the user actually changed. A key that was empty before and is still\n * empty is skipped (the dialog simply could not pre-fill it); a key that had\n * a value and is now empty is kept so the backend clears it.\n */\n private diffValues;\n private isEmptyValue;\n private isSameValue;\n private fetchRows;\n private applyResponse;\n private toEntityData;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityListField, never>;\n static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityListField, \"mt-entity-list-field\", never, { \"label\": { \"alias\": \"label\"; \"required\": false; \"isSignal\": true; }; \"readonly\": { \"alias\": \"readonly\"; \"required\": false; \"isSignal\": true; }; \"required\": { \"alias\": \"required\"; \"required\": false; \"isSignal\": true; }; \"propertyId\": { \"alias\": \"propertyId\"; \"required\": false; \"isSignal\": true; }; \"configuration\": { \"alias\": \"configuration\"; \"required\": false; \"isSignal\": true; }; \"runtimeContext\": { \"alias\": \"runtimeContext\"; \"required\": false; \"isSignal\": true; }; \"context\": { \"alias\": \"context\"; \"required\": false; \"isSignal\": true; }; }, {}, never, never, true, never>;\n}\n\n/** Inputs the EntityList add-row dialog will receive via ModalService inputValues. */\ninterface EntityListAddDialogInputs {\n moduleId: number | string | null;\n levelId: number | string | null;\n levelDataId: number | string | null;\n /** Property keys that should be editable in the dialog. */\n writeFields: string[];\n /** Pre-populated form values (keyed by property key) for the Edit flow. */\n initialValues?: Record<string, unknown>;\n /** True when the dialog edits an existing row rather than adding one. */\n isEdit?: boolean;\n}\n/**\n * Token used by `mt-entity-list-field` (Write mode) to open the rich add-row\n * dialog backed by `@masterteam/forms`'s `mt-client-form`. Apps that want this\n * behavior should call `provideEntityListAddForm()` from\n * `@masterteam/forms/entity-list-add-form` in their app providers. When the\n * token is not registered, the field falls back to a minimal text-only popup.\n */\ndeclare const ENTITY_LIST_ADD_DIALOG_COMPONENT: InjectionToken<Type<unknown>>;\n\n/** One picker option — only the name is shown. */\ninterface ScheduleItemOption {\n label: string;\n value: number;\n}\n/**\n * Runtime picker for `ScheduleItemSelector` properties.\n *\n * Backend-filtered: the full option list comes from\n * `GET forms/options/{propertyKey}` (which applies the configured rule, e.g.\n * `DeliverableAcceptance.AvailableDeliverables`). All available items are\n * loaded up front and rendered with the standard `mt-select-field` /\n * `mt-multi-select-field`; the field shows only the item name.\n *\n * The control value is always a numeric id array (`valueMode = \"IdArray\"`).\n * In `Single` mode only one id may be selected.\n */\ndeclare class ScheduleItemSelectorField implements ControlValueAccessor {\n readonly label: _angular_core.InputSignal<string>;\n readonly placeholder: _angular_core.InputSignal<string>;\n readonly readonly: _angular_core.InputSignal<boolean>;\n readonly required: _angular_core.InputSignal<boolean>;\n readonly propertyKey: _angular_core.InputSignal<string>;\n readonly selectionMode: _angular_core.InputSignal<\"Single\" | \"Multi\">;\n readonly runtimeContext: _angular_core.InputSignal<ScheduleItemSelectorFieldRuntimeContext | null>;\n readonly context: _angular_core.InputSignal<HttpContext | undefined>;\n /** Full list of available deliverables (loaded once). */\n readonly options: _angular_core.WritableSignal<ScheduleItemOption[]>;\n readonly loading: _angular_core.WritableSignal<boolean>;\n readonly disabled: _angular_core.WritableSignal<boolean>;\n /** Selected ids — the control value (`number[]`). */\n readonly value: _angular_core.WritableSignal<number[]>;\n readonly isMultiple: _angular_core.Signal<boolean>;\n /** Single-mode ngModel value (a scalar id, not an array). */\n readonly singleValue: _angular_core.Signal<number>;\n ngControl: NgControl | null;\n onTouched: () => void;\n onModelChange: (value: number[] | null) => void;\n private readonly http;\n private readonly destroyRef;\n /** Query signature already loaded — prevents duplicate full loads. */\n private loadedKey;\n constructor();\n onMultiChange(ids: number[] | null): void;\n onSingleChange(id: number | null): void;\n writeValue(value: unknown): void;\n registerOnChange(fn: (value: number[] | null) => void): void;\n registerOnTouched(fn: () => void): void;\n setDisabledState(disabled: boolean): void;\n private loadAllOptions;\n private fetchPage;\n private buildParams;\n private mapOptions;\n private buildContextKey;\n private queryKey;\n private emit;\n private normalizeIds;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScheduleItemSelectorField, never>;\n static ɵcmp: _angular_core.ɵɵComponentDeclaration<ScheduleItemSelectorField, \"mt-schedule-item-selector-field\", never, { \"label\": { \"alias\": \"label\"; \"required\": false; \"isSignal\": true; }; \"placeholder\": { \"alias\": \"placeholder\"; \"required\": false; \"isSignal\": true; }; \"readonly\": { \"alias\": \"readonly\"; \"required\": false; \"isSignal\": true; }; \"required\": { \"alias\": \"required\"; \"required\": false; \"isSignal\": true; }; \"propertyKey\": { \"alias\": \"propertyKey\"; \"required\": false; \"isSignal\": true; }; \"selectionMode\": { \"alias\": \"selectionMode\"; \"required\": false; \"isSignal\": true; }; \"runtimeContext\": { \"alias\": \"runtimeContext\"; \"required\": false; \"isSignal\": true; }; \"context\": { \"alias\": \"context\"; \"required\": false; \"isSignal\": true; }; }, {}, never, never, true, never>;\n}\n\n/**\n * Inputs for the injected checklist form (one instance per field). It loads the\n * scope module form once and renders a collapsible section per lookup item.\n * Passed via `ngComponentOutlet` inputs.\n */\ninterface LookupCheckListFormInputs {\n /** Lookup items rendered as collapsible sections. */\n lookupOptions: LookupOptionItemConfig[];\n /** Full lookup catalog used to resolve nested lookup fields. */\n lookups: unknown[];\n /** Property keys to render in each section form. */\n propertyKeys: string[];\n /** Scope module id whose form is loaded once via `process-form-load`. */\n moduleId: number | string | null;\n /** Current level id. */\n levelId: number | string | null;\n /** Current workspace instance id. */\n levelDataId: number | string | null;\n /** Current aggregated value (array of `{ lookupKey, props }`). */\n value: unknown;\n /** Whether the field is read-only. */\n readonly: boolean;\n /** Called whenever the aggregated checklist value changes. */\n valueChange: (value: unknown) => void;\n /** Called whenever the aggregated validity changes (true = incomplete). */\n validityChange: (invalid: boolean) => void;\n}\n/**\n * Token used by `mt-lookup-module-check-list-field` to render the checklist\n * sections + per-section forms via `@masterteam/forms`'s `mt-client-form`\n * machinery (`/api/process-form-load`, loaded once). Apps register it with\n * `provideLookupModuleCheckListForm()` from\n * `@masterteam/forms/lookup-module-check-list-form`. When the token is not\n * registered, the field falls back to plain text inputs per property.\n */\ndeclare const LOOKUP_CHECK_LIST_FORM_COMPONENT: InjectionToken<Type<unknown>>;\n\n/** Stored entry as persisted in the property value array. */\ninterface StoredCheckListProp {\n key: string;\n value: unknown;\n}\ninterface StoredCheckListEntry {\n lookupKey: string;\n props: StoredCheckListProp[];\n}\n/** A collapsible section bound to one lookup item. */\ninterface CheckListSection {\n lookupKey: string;\n label: string;\n}\ndeclare class LookupModuleCheckListField implements ControlValueAccessor, OnInit {\n readonly label: _angular_core.InputSignal<string>;\n readonly readonly: _angular_core.InputSignal<boolean>;\n readonly required: _angular_core.InputSignal<boolean>;\n /** Lookup items rendered as collapsible checklist sections. */\n readonly lookupOptions: _angular_core.InputSignal<LookupOptionItemConfig[]>;\n /** Full lookup catalog passed to the rich nested form renderer. */\n readonly lookups: _angular_core.InputSignal<unknown[]>;\n /** Module property keys/labels (used by the text fallback + labels). */\n readonly propertyFields: _angular_core.InputSignal<LookupCheckListPropertyConfig[]>;\n /** Scope module id whose form is loaded for each section. */\n readonly scopeId: _angular_core.InputSignal<string | number | null>;\n /** Property keys to render in each section form. */\n readonly propertyKeys: _angular_core.InputSignal<string[]>;\n /** Runtime ids needed to load each section form. */\n readonly runtimeContext: _angular_core.InputSignal<LookupModuleCheckListFieldRuntimeContext | null>;\n /** Per-lookupKey captured values, keyed by property key. */\n private readonly sectionValues;\n private readonly expandedKeys;\n protected readonly disabled: _angular_core.WritableSignal<boolean>;\n /** True when a section's required inner fields are unfilled. */\n private readonly incomplete;\n ngControl: NgControl | null;\n /**\n * Rich checklist form provided by `@masterteam/forms`\n * (`provideLookupModuleCheckListForm()`). When absent the field falls back to\n * plain text inputs per property.\n */\n protected readonly formComponent: _angular_core.Type<unknown> | null;\n protected readonly isReadonly: _angular_core.Signal<boolean>;\n protected readonly sections: _angular_core.Signal<CheckListSection[]>;\n /**\n * Use the rich form whenever it's registered and a scope module is set. The\n * scope form only needs `scopeId` to load its field definitions; `levelId` /\n * `levelDataId` are passed when available but are not required (e.g. they are\n * null while creating a brand-new Level instance).\n */\n protected readonly useRichForm: _angular_core.Signal<boolean>;\n /**\n * The last externally-written value (via `writeValue`). Passed to the rich\n * form as its initial value. It is intentionally NOT updated from the form's\n * own `valueChange` — feeding emitted values back as an input would create an\n * infinite change-detection loop.\n */\n private readonly incomingValue;\n private onTouched;\n private onModelChange;\n private control;\n private validatorAttached;\n /**\n * Validator attached imperatively to the host control. Attaching it here\n * (rather than via an `NG_VALIDATORS` provider) avoids a circular dependency\n * with the self-injected `NgControl` used as the value accessor.\n */\n private readonly checklistValidator;\n /** Stable callbacks so the outlet inputs object stays referentially calm. */\n private readonly emitValue;\n private readonly emitValidity;\n constructor();\n ngOnInit(): void;\n private ensureValidator;\n writeValue(value: unknown): void;\n registerOnChange(fn: (value: StoredCheckListEntry[] | null) => void): void;\n registerOnTouched(fn: () => void): void;\n setDisabledState(isDisabled: boolean): void;\n protected readonly formInputs: _angular_core.Signal<LookupCheckListFormInputs>;\n protected isExpanded(lookupKey: string): boolean;\n protected toggle(lookupKey: string): void;\n protected hasValues(lookupKey: string): boolean;\n protected fieldValue(lookupKey: string, propKey: string): string;\n protected setFieldValue(lookupKey: string, propKey: string, value: string): void;\n private pushModelValue;\n private buildPayload;\n private normalizeIncoming;\n private extractEntries;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<LookupModuleCheckListField, never>;\n static ɵcmp: _angular_core.ɵɵComponentDeclaration<LookupModuleCheckListField, \"mt-lookup-module-check-list-field\", never, { \"label\": { \"alias\": \"label\"; \"required\": false; \"isSignal\": true; }; \"readonly\": { \"alias\": \"readonly\"; \"required\": false; \"isSignal\": true; }; \"required\": { \"alias\": \"required\"; \"required\": false; \"isSignal\": true; }; \"lookupOptions\": { \"alias\": \"lookupOptions\"; \"required\": false; \"isSignal\": true; }; \"lookups\": { \"alias\": \"lookups\"; \"required\": false; \"isSignal\": true; }; \"propertyFields\": { \"alias\": \"propertyFields\"; \"required\": false; \"isSignal\": true; }; \"scopeId\": { \"alias\": \"scopeId\"; \"required\": false; \"isSignal\": true; }; \"propertyKeys\": { \"alias\": \"propertyKeys\"; \"required\": false; \"isSignal\": true; }; \"runtimeContext\": { \"alias\": \"runtimeContext\"; \"required\": false; \"isSignal\": true; }; }, {}, never, never, true, never>;\n}\n\nexport { ENTITY_LIST_ADD_DIALOG_COMPONENT, EntityListField, LOOKUP_CHECK_LIST_FORM_COMPONENT, LookupMatrixField, LookupModuleCheckListField, ScheduleItemSelectorField, SchedulePredecessorField, SchemaConnectionField };\nexport type { ConnectionPayload, ConnectionSource, ConnectionSourceLevel, EntityListAddDialogInputs, LookupCheckListFormInputs, SchemaConnectionConfig, SourceLevelState };\n","map":null,"preliminaryFileName":"masterteam-components-business-fields.d.ts","sourcemapFileName":null}],"fesm2022":[{"exports":["ENTITY_LIST_ADD_DIALOG_COMPONENT","EntityListField","LOOKUP_CHECK_LIST_FORM_COMPONENT","LookupMatrixField","LookupModuleCheckListField","ScheduleItemSelectorField","SchedulePredecessorField","SchemaConnectionField"],"facadeModuleId":"C:\\Users\\ABDULLAH WISHAH\\Documents\\GitHub\\components\\dist\\masterteam\\components\\tmp-esm2022\\business-fields\\masterteam-components-business-fields.js","isDynamicEntry":false,"isEntry":true,"isImplicitEntry":false,"moduleIds":["C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-esm2022/business-fields/lookup-matrix-field/lookup-matrix-field.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-esm2022/business-fields/schema-connection-field/schema-connection-field.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-esm2022/business-fields/schedule-predecessor-field/schedule-predecessor-field.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-esm2022/business-fields/entity-list-field/entity-list-add-token.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-esm2022/business-fields/entity-list-field/entity-list-field.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-esm2022/business-fields/schedule-item-selector-field/schedule-item-selector-field.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-esm2022/business-fields/lookup-module-check-list-field/lookup-module-check-list-form-token.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-esm2022/business-fields/lookup-module-check-list-field/lookup-module-check-list-field.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-esm2022/business-fields/public-api.js","C:\\Users\\ABDULLAH WISHAH\\Documents\\GitHub\\components\\dist\\masterteam\\components\\tmp-esm2022\\business-fields\\masterteam-components-business-fields.js"],"name":"masterteam-components-business-fields","type":"chunk","dynamicImports":[],"fileName":"masterteam-components-business-fields.mjs","implicitlyLoadedBefore":[],"importedBindings":{"@angular/common":["CommonModule","NgComponentOutlet"],"@angular/core":["input","inject","DestroyRef","signal","computed","*","ChangeDetectionStrategy","Component","effect","untracked","viewChild","linkedSignal","InjectionToken"],"@angular/core/rxjs-interop":["takeUntilDestroyed","toSignal"],"@angular/forms":["ControlContainer","NgControl","FormsModule","*","Validators"],"@jsverse/transloco":["TranslocoService","TranslocoModule","*","TranslocoPipe"],"rxjs":["startWith","finalize","catchError","of","take","expand","EMPTY","reduce","map"],"@masterteam/components/tooltip":["Tooltip"],"@masterteam/icons":["Icon"],"@masterteam/components/select-field":["SelectField"],"@masterteam/components/multi-select-field":["MultiSelectField"],"@masterteam/components/field-validation":["FieldValidation"],"@angular/common/http":["HttpClient","HttpParams"],"@masterteam/components/button":["Button"],"@masterteam/components/number-field":["NumberField"],"@masterteam/components/table":["Table"],"@masterteam/components":["nextFieldId","resolveFieldId"],"primeng/skeleton":["Skeleton"],"primeng/message":["Message"],"@masterteam/components/modal":["ModalService"],"primeng/inputtext":["InputTextModule","*"]},"imports":["@angular/common","@angular/core","@angular/core/rxjs-interop","@angular/forms","@jsverse/transloco","rxjs","@masterteam/components/tooltip","@masterteam/icons","@masterteam/components/select-field","@masterteam/components/multi-select-field","@masterteam/components/field-validation","@angular/common/http","@masterteam/components/button","@masterteam/components/number-field","@masterteam/components/table","@masterteam/components","primeng/skeleton","primeng/message","@masterteam/components/modal","primeng/inputtext"],"modules":{"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-esm2022/business-fields/lookup-matrix-field/lookup-matrix-field.js":{"code":"class LookupMatrixField {\n config = input.required(...(ngDevMode ? [{ debugName: \"config\" }] : /* istanbul ignore next */ []));\n controlContainer = inject(ControlContainer, {\n optional: true,\n });\n destroyRef = inject(DestroyRef);\n transloco = inject(TranslocoService);\n valueVersion = signal(0, ...(ngDevMode ? [{ debugName: \"valueVersion\" }] : /* istanbul ignore next */ []));\n subscribedControl = null;\n hasYAxis = computed(() => !!this.config().yFieldKey, ...(ngDevMode ? [{ debugName: \"hasYAxis\" }] : /* istanbul ignore next */ []));\n xOptions = computed(() => this.config().xOptions ?? [], ...(ngDevMode ? [{ debugName: \"xOptions\" }] : /* istanbul ignore next */ []));\n yOptions = computed(() => this.config().yOptions ?? [], ...(ngDevMode ? [{ debugName: \"yOptions\" }] : /* istanbul ignore next */ []));\n hasMatrix = computed(() => this.config().cells.length > 0, ...(ngDevMode ? [{ debugName: \"hasMatrix\" }] : /* istanbul ignore next */ []));\n cellMap = computed(() => new Map(this.config().cells.map((cell) => [\n this.cellKey(cell.xLookupItemId, cell.yLookupItemId),\n cell,\n ])), ...(ngDevMode ? [{ debugName: \"cellMap\" }] : /* istanbul ignore next */ []));\n selectedXOption = computed(() => {\n this.valueVersion();\n return this.resolveSelectedOption(this.xOptions(), this.getControlValue(this.config().xFieldKey));\n }, ...(ngDevMode ? [{ debugName: \"selectedXOption\" }] : /* istanbul ignore next */ []));\n selectedYOption = computed(() => {\n this.valueVersion();\n const yFieldKey = this.config().yFieldKey;\n if (!yFieldKey) {\n return null;\n }\n return this.resolveSelectedOption(this.yOptions(), this.getControlValue(yFieldKey));\n }, ...(ngDevMode ? [{ debugName: \"selectedYOption\" }] : /* istanbul ignore next */ []));\n activeCell = computed(() => {\n const selectedX = this.selectedXOption();\n if (!selectedX) {\n return null;\n }\n if (!this.hasYAxis()) {\n return this.getCell(selectedX.id ?? selectedX.value);\n }\n const selectedY = this.selectedYOption();\n if (!selectedY) {\n return null;\n }\n return this.getCell(selectedX.id ?? selectedX.value, selectedY.id ?? selectedY.value);\n }, ...(ngDevMode ? [{ debugName: \"activeCell\" }] : /* istanbul ignore next */ []));\n selectionSummary = computed(() => {\n const parts = [];\n const xAxisLabel = this.config().xAxisLabel.trim() ||\n this.transloco.translate('components.lookupMatrixField.xAxisFallback');\n const selectedX = this.selectedXOption();\n if (selectedX) {\n parts.push(`${xAxisLabel}: ${selectedX.label}`);\n }\n const selectedY = this.selectedYOption();\n const yAxisLabel = this.config().yAxisLabel?.trim() ||\n this.transloco.translate('components.lookupMatrixField.yAxisFallback');\n if (selectedY && this.hasYAxis()) {\n parts.push(`${yAxisLabel}: ${selectedY.label}`);\n }\n return parts.join(' / ');\n }, ...(ngDevMode ? [{ debugName: \"selectionSummary\" }] : /* istanbul ignore next */ []));\n pendingMessage = computed(() => {\n const xAxisLabel = this.config().xAxisLabel.trim() ||\n this.transloco.translate('components.lookupMatrixField.firstValueFallback');\n if (!this.hasYAxis()) {\n return this.transloco.translate('components.lookupMatrixField.selectXAxisFirst', { xAxisLabel });\n }\n const yAxisLabel = this.config().yAxisLabel?.trim() ||\n this.transloco.translate('components.lookupMatrixField.secondValueFallback');\n return this.transloco.translate('components.lookupMatrixField.selectAxesFirst', { xAxisLabel, yAxisLabel });\n }, ...(ngDevMode ? [{ debugName: \"pendingMessage\" }] : /* istanbul ignore next */ []));\n missingResultMessage = computed(() => {\n if (!this.selectedXOption()) {\n return this.pendingMessage();\n }\n if (this.hasYAxis() && !this.selectedYOption()) {\n return this.pendingMessage();\n }\n return this.transloco.translate('components.lookupMatrixField.noMatchingValue');\n }, ...(ngDevMode ? [{ debugName: \"missingResultMessage\" }] : /* istanbul ignore next */ []));\n ngAfterViewInit() {\n this.ensureControlSubscription();\n }\n getCell(xLookupItemId, yLookupItemId) {\n return (this.cellMap().get(this.cellKey(xLookupItemId, yLookupItemId)) ?? null);\n }\n getSwatchColor(color) {\n return this.resolveColor(color);\n }\n getControlValue(path) {\n if (!path)\n return null;\n return this.controlContainer?.control?.get(path)?.value ?? null;\n }\n ensureControlSubscription() {\n const control = this.controlContainer?.control;\n if (!control || control === this.subscribedControl) {\n return;\n }\n this.subscribedControl = control;\n control.valueChanges\n .pipe(startWith(control.getRawValue()), takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.valueVersion.update((value) => value + 1);\n });\n }\n resolveSelectedOption(options, rawValue) {\n if (rawValue == null || rawValue === '')\n return null;\n return (options.find((option) => this.optionMatchesValue(option, rawValue)) ??\n null);\n }\n optionMatchesValue(option, rawValue) {\n return [option.value, option.key, option.id].some((candidate) => candidate != null && String(candidate) === String(rawValue));\n }\n cellKey(xLookupItemId, yLookupItemId) {\n return `${String(xLookupItemId)}::${String(yLookupItemId ?? '')}`;\n }\n resolveColor(color) {\n if (!color)\n return null;\n if (color.startsWith('#') ||\n color.startsWith('rgb') ||\n color.startsWith('hsl') ||\n color.startsWith('var(')) {\n return color;\n }\n return `var(--p-${color}-500)`;\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: LookupMatrixField, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.2.8\", type: LookupMatrixField, isStandalone: true, selector: \"mt-lookup-matrix-field\", inputs: { config: { classPropertyName: \"config\", publicName: \"config\", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: \"grid gap-2\" }, ngImport: i0, template: \"@if (config().label) {\\r\\n <label class=\\\"font-medium text-color\\\">\\r\\n {{ config().label }}\\r\\n </label>\\r\\n}\\r\\n\\r\\n<div\\r\\n class=\\\"rounded-lg border border-surface-200 bg-surface-50 px-3 flex items-center\\\"\\r\\n>\\r\\n @if (activeCell(); as cell) {\\r\\n <div class=\\\"flex flex-1 min-h-6 items-center gap-2 justify-between\\\">\\r\\n <span\\r\\n class=\\\"h-6 w-2 shrink-0 rounded-[2px] border border-surface-200\\\"\\r\\n [style.background-color]=\\\"getSwatchColor(cell.color)\\\"\\r\\n [style.border-color]=\\\"getSwatchColor(cell.color)\\\"\\r\\n ></span>\\r\\n\\r\\n <div class=\\\"min-w-0 flex-1 py-2 flex items-center justify-between\\\">\\r\\n <div class=\\\"truncate font-semibold text-gray-500\\\">\\r\\n {{ cell.label }}\\r\\n </div>\\r\\n\\r\\n @if (selectionSummary()) {\\r\\n <div class=\\\"font-bold text-gray-500\\\">\\r\\n <mt-icon\\r\\n [mtTooltip]=\\\"selectionSummary()\\\"\\r\\n icon=\\\"general.info-circle\\\"\\r\\n />\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n } @else {\\r\\n <div class=\\\"flex min-h-6 items-center text-muted-color py-2\\\">\\r\\n {{ hasMatrix() ? missingResultMessage() : config().emptyMessage }}\\r\\n </div>\\r\\n }\\r\\n</div>\\r\\n\", dependencies: [{ kind: \"ngmodule\", type: CommonModule }, { kind: \"directive\", type: Tooltip, selector: \"[mtTooltip]\" }, { kind: \"component\", type: Icon, selector: \"mt-icon\", inputs: [\"icon\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: LookupMatrixField, decorators: [{\n type: Component,\n args: [{ selector: 'mt-lookup-matrix-field', standalone: true, imports: [CommonModule, Tooltip, Icon], changeDetection: ChangeDetectionStrategy.OnPush, host: {\n class: 'grid gap-2',\n }, template: \"@if (config().label) {\\r\\n <label class=\\\"font-medium text-color\\\">\\r\\n {{ config().label }}\\r\\n </label>\\r\\n}\\r\\n\\r\\n<div\\r\\n class=\\\"rounded-lg border border-surface-200 bg-surface-50 px-3 flex items-center\\\"\\r\\n>\\r\\n @if (activeCell(); as cell) {\\r\\n <div class=\\\"flex flex-1 min-h-6 items-center gap-2 justify-between\\\">\\r\\n <span\\r\\n class=\\\"h-6 w-2 shrink-0 rounded-[2px] border border-surface-200\\\"\\r\\n [style.background-color]=\\\"getSwatchColor(cell.color)\\\"\\r\\n [style.border-color]=\\\"getSwatchColor(cell.color)\\\"\\r\\n ></span>\\r\\n\\r\\n <div class=\\\"min-w-0 flex-1 py-2 flex items-center justify-between\\\">\\r\\n <div class=\\\"truncate font-semibold text-gray-500\\\">\\r\\n {{ cell.label }}\\r\\n </div>\\r\\n\\r\\n @if (selectionSummary()) {\\r\\n <div class=\\\"font-bold text-gray-500\\\">\\r\\n <mt-icon\\r\\n [mtTooltip]=\\\"selectionSummary()\\\"\\r\\n icon=\\\"general.info-circle\\\"\\r\\n />\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n } @else {\\r\\n <div class=\\\"flex min-h-6 items-center text-muted-color py-2\\\">\\r\\n {{ hasMatrix() ? missingResultMessage() : config().emptyMessage }}\\r\\n </div>\\r\\n }\\r\\n</div>\\r\\n\" }]\n }], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: \"config\", required: true }] }] } });","originalLength":10496,"removedExports":[],"renderedExports":["LookupMatrixField"],"renderedLength":9937},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-esm2022/business-fields/schema-connection-field/schema-connection-field.js":{"code":"class SchemaConnectionField {\n // ============================================================================\n // Inputs\n // ============================================================================\n label = input('', ...(ngDevMode ? [{ debugName: \"label\" }] : /* istanbul ignore next */ []));\n placeholder = input('', ...(ngDevMode ? [{ debugName: \"placeholder\" }] : /* istanbul ignore next */ []));\n readonly = input(false, ...(ngDevMode ? [{ debugName: \"readonly\" }] : /* istanbul ignore next */ []));\n required = input(false, ...(ngDevMode ? [{ debugName: \"required\" }] : /* istanbul ignore next */ []));\n filter = input(true, ...(ngDevMode ? [{ debugName: \"filter\" }] : /* istanbul ignore next */ []));\n /**\n * Full connection configuration object from the API.\n * Includes `targetLevelId`, `sourceLevels[]`, `payloadTemplate`, etc.\n */\n configuration = input.required(...(ngDevMode ? [{ debugName: \"configuration\" }] : /* istanbul ignore next */ []));\n /**\n * Optional HttpContext for API requests (e.g. to set base URL behavior).\n */\n context = input(undefined, ...(ngDevMode ? [{ debugName: \"context\" }] : /* istanbul ignore next */ []));\n // ============================================================================\n // Internal State\n // ============================================================================\n /** The full ConnectionPayload value */\n value = signal(null, ...(ngDevMode ? [{ debugName: \"value\" }] : /* istanbul ignore next */ []));\n disabled = signal(false, ...(ngDevMode ? [{ debugName: \"disabled\" }] : /* istanbul ignore next */ []));\n /** Per-source-level state: options + loading */\n sourceLevelStates = signal([], ...(ngDevMode ? [{ debugName: \"sourceLevelStates\" }] : /* istanbul ignore next */ []));\n /** Mutable selections per source level: sourceLevelId -> selected value */\n selections = {};\n onTouched = () => { };\n onModelChange = () => { };\n /**\n * Required-validation for a connection: emptiness is decided by the selected\n * `sources`, not by the value being null. The runtime loads an unselected\n * connection as `{ levelId, sources: [] }` — a non-null object that Angular's\n * stock `Validators.required` accepts — so a plain required check would let an\n * empty connection pass and the form submit. Mirrors {@link syncValue}, which\n * collapses a source-less selection to `null`.\n */\n connectionRequiredValidator = (control) => {\n const value = control.value;\n const hasSources = !!value && Array.isArray(value.sources) && value.sources.length > 0;\n return hasSources ? null : { required: true };\n };\n ngControl = null;\n http = inject(HttpClient);\n destroyRef = inject(DestroyRef);\n transloco = inject(TranslocoService);\n /** Active UI language, kept reactive so source labels re-resolve on switch. */\n activeLang = toSignal(this.transloco.langChanges$, {\n initialValue: this.transloco.getActiveLang(),\n });\n /**\n * Resolve a source level's display name in the active locale, falling back\n * to English, Arabic, then the level/module key.\n */\n resolveSourceName(source) {\n const name = source.name;\n return (name?.[this.activeLang()] ||\n name?.en ||\n name?.ar ||\n source.levelKey ||\n source.moduleKey ||\n '');\n }\n /**\n * Source levels from configuration.\n */\n sourceLevels = computed(() => {\n return this.configuration()?.sourceLevels ?? [];\n }, ...(ngDevMode ? [{ debugName: \"sourceLevels\" }] : /* istanbul ignore next */ []));\n /**\n * Tooltip for the marker rendered next to every source label — it is what\n * tells the user these dropdowns belong to a connection, now that the\n * connection's own label no longer occupies a row above them. Reads\n * {@link activeLang} so the text re-translates on language switch.\n */\n connectionHint = computed(() => {\n this.activeLang();\n return this.transloco.translate('components.schemaConnection.hint');\n }, ...(ngDevMode ? [{ debugName: \"connectionHint\" }] : /* istanbul ignore next */ []));\n /**\n * Placeholder for a source dropdown: its own source name, matching the label\n * above it. Falls back to the field-level placeholder only when the source\n * has no resolvable name.\n */\n sourcePlaceholder(source) {\n return (this.resolveSourceName(source) ||\n this.placeholder() ||\n this.transloco.translate('components.selectPlaceholder'));\n }\n /**\n * Percentage width for each dropdown, evenly divided.\n */\n dropdownWidth = computed(() => {\n const count = this.sourceLevels().length;\n if (count <= 0)\n return '100%';\n return `${100 / count}%`;\n }, ...(ngDevMode ? [{ debugName: \"dropdownWidth\" }] : /* istanbul ignore next */ []));\n constructor() {\n this.ngControl = inject(NgControl, { self: true, optional: true });\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n effect(() => {\n const control = this.ngControl?.control;\n if (!control)\n return;\n const required = this.required();\n untracked(() => {\n if (required) {\n control.addValidators(this.connectionRequiredValidator);\n }\n else {\n control.removeValidators(this.connectionRequiredValidator);\n }\n control.updateValueAndValidity({ emitEvent: false });\n });\n });\n // Load options for each source level when configuration changes\n effect(() => {\n const levels = this.sourceLevels();\n if (!levels.length)\n return;\n // Everything below must NOT create signal dependencies,\n // only sourceLevels() (→ configuration) should trigger this effect.\n untracked(() => {\n // Initialize per-source states + selections\n this.sourceLevelStates.set(levels.map((source) => ({\n source,\n options: [],\n loading: false,\n })));\n for (const source of levels) {\n const sourceId = this.getSourceId(source);\n if (!(sourceId in this.selections)) {\n this.selections[sourceId] = source.allowManyToMany ? [] : null;\n }\n }\n // Distribute existing value to selections\n this.distributeToSelections(this.value());\n // Load options for each source level\n for (const source of levels) {\n this.loadOptions(source);\n }\n });\n });\n }\n // ============================================================================\n // Source Level Helpers\n // ============================================================================\n /**\n * Returns a stable numeric ID for a source regardless of whether it is a\n * level (`levelId`) or a module (`moduleId`). Used as the key in `selections`\n * and `sourceLevelStates`.\n */\n getSourceId(source) {\n return (source.levelId ?? source.moduleId);\n }\n /**\n * Builds the `contextKey` for the `fetch/query` request based on source type.\n */\n getContextKey(source) {\n return source.levelId != null\n ? `level:${source.levelId}`\n : `module:${source.moduleId}`;\n }\n // ============================================================================\n // Option Loading (per source level)\n // ============================================================================\n loadOptions(source) {\n this.updateSourceState(this.getSourceId(source), { loading: true });\n const ctx = this.context();\n const payload = {\n contextKey: this.getContextKey(source),\n projection: 'Flat',\n propertyKeys: ['name'],\n };\n this.http\n .post('fetch/query', payload, {\n ...(ctx ? { context: ctx } : {}),\n })\n .pipe(takeUntilDestroyed(this.destroyRef), finalize(() => this.updateSourceState(this.getSourceId(source), { loading: false })), catchError((err) => {\n console.error(`Connection options load failed for ${source.levelKey ?? source.moduleKey}:`, err);\n return of({ data: { records: [] } });\n }))\n .subscribe((response) => {\n const options = (response?.data?.records ?? [])\n .filter((record) => record?.id != null)\n .map((record) => ({\n ...record,\n id: record.id,\n name: record.name,\n }));\n this.updateSourceState(this.getSourceId(source), {\n options,\n loading: false,\n });\n });\n }\n updateSourceState(sourceId, patch) {\n this.sourceLevelStates.update((states) => states.map((s) => this.getSourceId(s.source) === sourceId ? { ...s, ...patch } : s));\n }\n // ============================================================================\n // Value Handling\n // ============================================================================\n /**\n * Single handler — no params. Reads all selections, builds the combined payload.\n */\n syncValue() {\n const cfg = this.configuration();\n const states = this.sourceLevelStates();\n const sources = [];\n for (const state of states) {\n const val = this.selections[this.getSourceId(state.source)];\n if (val == null)\n continue;\n const effectiveId = this.getSourceId(state.source);\n if (state.source.allowManyToMany && Array.isArray(val)) {\n for (const id of val) {\n sources.push({\n sourceLevelId: effectiveId,\n sourceLevelDataId: id,\n });\n }\n }\n else if (typeof val === 'number') {\n sources.push({\n sourceLevelId: effectiveId,\n sourceLevelDataId: val,\n });\n }\n }\n const payload = sources.length > 0 ? { levelId: cfg.targetLevelId, sources } : null;\n this.value.set(payload);\n this.onModelChange(payload);\n this.onTouched();\n }\n distributeToSelections(payload) {\n const states = this.sourceLevelStates();\n for (const state of states) {\n const sourceId = this.getSourceId(state.source);\n const ids = (payload?.sources ?? [])\n .filter((s) => (s.sourceLevelId ?? s.sourceModuleId) === sourceId)\n .map((s) => s.sourceLevelDataId ?? s.sourceModuleDataId)\n .filter((id) => id != null);\n this.selections[sourceId] = state.source.allowManyToMany\n ? ids\n : (ids[0] ?? null);\n }\n }\n // ============================================================================\n // ControlValueAccessor\n // ============================================================================\n writeValue(value) {\n if (typeof value === 'string') {\n try {\n value = JSON.parse(value);\n }\n catch {\n value = null;\n }\n }\n this.value.set(value ?? null);\n this.distributeToSelections(value ?? null);\n }\n registerOnChange(fn) {\n this.onModelChange = fn;\n }\n registerOnTouched(fn) {\n this.onTouched = fn;\n }\n setDisabledState(disabled) {\n this.disabled.set(disabled);\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: SchemaConnectionField, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.2.8\", type: SchemaConnectionField, isStandalone: true, selector: \"mt-schema-connection-field\", inputs: { label: { classPropertyName: \"label\", publicName: \"label\", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: \"placeholder\", publicName: \"placeholder\", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: \"readonly\", publicName: \"readonly\", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: \"required\", publicName: \"required\", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: \"filter\", publicName: \"filter\", isSignal: true, isRequired: false, transformFunction: null }, configuration: { classPropertyName: \"configuration\", publicName: \"configuration\", isSignal: true, isRequired: true, transformFunction: null }, context: { classPropertyName: \"context\", publicName: \"context\", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: \"grid gap-1\" }, ngImport: i0, template: \"<div class=\\\"flex gap-4 w-full\\\">\\r\\n @for (state of sourceLevelStates(); track getSourceId(state.source)) {\\r\\n <!--\\r\\n `grid gap-1 grid-cols-[minmax(0,1fr)]` matches the label\\u2192control spacing\\r\\n every other mt-* field gets from its host class; the explicit column\\r\\n keeps the implicit max-content track from letting long values overflow.\\r\\n -->\\r\\n <div\\r\\n [style.width]=\\\"dropdownWidth()\\\"\\r\\n class=\\\"grid gap-1 grid-cols-[minmax(0,1fr)] min-w-0\\\"\\r\\n >\\r\\n <div class=\\\"flex items-center gap-1\\\">\\r\\n <label class=\\\"truncate\\\" [class.required]=\\\"required()\\\">\\r\\n {{ resolveSourceName(state.source) }}\\r\\n </label>\\r\\n <span\\r\\n class=\\\"inline-flex shrink-0 text-surface-400\\\"\\r\\n [mtTooltip]=\\\"connectionHint()\\\"\\r\\n tooltipPosition=\\\"top\\\"\\r\\n >\\r\\n <mt-icon icon=\\\"general.link-01\\\" />\\r\\n </span>\\r\\n </div>\\r\\n\\r\\n @if (state.source.allowManyToMany) {\\r\\n <mt-multi-select-field\\r\\n [field]=\\\"false\\\"\\r\\n [(ngModel)]=\\\"selections[getSourceId(state.source)]\\\"\\r\\n (ngModelChange)=\\\"syncValue()\\\"\\r\\n [options]=\\\"state.options\\\"\\r\\n optionLabel=\\\"name\\\"\\r\\n optionValue=\\\"id\\\"\\r\\n [placeholder]=\\\"sourcePlaceholder(state.source)\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [filter]=\\\"filter()\\\"\\r\\n [showClear]=\\\"true\\\"\\r\\n display=\\\"chip\\\"\\r\\n />\\r\\n } @else {\\r\\n <mt-select-field\\r\\n [field]=\\\"false\\\"\\r\\n [(ngModel)]=\\\"selections[getSourceId(state.source)]\\\"\\r\\n (ngModelChange)=\\\"syncValue()\\\"\\r\\n [options]=\\\"state.options\\\"\\r\\n optionLabel=\\\"name\\\"\\r\\n optionValue=\\\"id\\\"\\r\\n [placeholder]=\\\"sourcePlaceholder(state.source)\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [filter]=\\\"filter()\\\"\\r\\n [loading]=\\\"state.loading\\\"\\r\\n [showClear]=\\\"true\\\"\\r\\n />\\r\\n }\\r\\n </div>\\r\\n }\\r\\n</div>\\r\\n\\r\\n<mt-field-validation [control]=\\\"ngControl?.control\\\"></mt-field-validation>\\r\\n\", styles: [\"\"], dependencies: [{ kind: \"ngmodule\", type: FormsModule }, { kind: \"directive\", type: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.NgModel, selector: \"[ngModel]:not([formControlName]):not([formControl])\", inputs: [\"name\", \"disabled\", \"ngModel\", \"ngModelOptions\"], outputs: [\"ngModelChange\"], exportAs: [\"ngModel\"] }, { kind: \"component\", type: SelectField, selector: \"mt-select-field\", inputs: [\"field\", \"hint\", \"label\", \"placeholder\", \"hasPlaceholderPrefix\", \"class\", \"readonly\", \"pInputs\", \"options\", \"optionValue\", \"optionLabel\", \"filter\", \"filterBy\", \"dataKey\", \"showClear\", \"clearAfterSelect\", \"required\", \"group\", \"size\", \"optionGroupLabel\", \"optionGroupChildren\", \"loading\", \"optionIcon\", \"optionIconColor\", \"optionIconShape\", \"optionAvatarShape\", \"optionGroupIcon\", \"optionGroupIconColor\", \"optionGroupIconShape\", \"optionGroupAvatarShape\", \"markCurrentUser\"], outputs: [\"onChange\"] }, { kind: \"component\", type: MultiSelectField, selector: \"mt-multi-select-field\", inputs: [\"field\", \"label\", \"placeholder\", \"class\", \"readonly\", \"pInputs\", \"options\", \"optionValue\", \"optionLabel\", \"filter\", \"filterBy\", \"dataKey\", \"showClear\", \"display\", \"required\", \"maxSelectedLabels\", \"group\", \"virtualScroll\", \"virtualScrollItemSize\", \"optionGroupLabel\", \"optionGroupChildren\", \"optionIcon\", \"optionIconColor\", \"optionIconShape\", \"optionAvatarShape\", \"optionGroupIcon\", \"optionGroupIconColor\", \"optionGroupIconShape\", \"optionGroupAvatarShape\"], outputs: [\"onChange\"] }, { kind: \"component\", type: FieldValidation, selector: \"mt-field-validation\", inputs: [\"control\", \"touched\", \"messageId\"] }, { kind: \"directive\", type: Tooltip, selector: \"[mtTooltip]\" }, { kind: \"component\", type: Icon, selector: \"mt-icon\", inputs: [\"icon\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: SchemaConnectionField, decorators: [{\n type: Component,\n args: [{ selector: 'mt-schema-connection-field', standalone: true, imports: [\n FormsModule,\n SelectField,\n MultiSelectField,\n FieldValidation,\n Tooltip,\n Icon,\n ], changeDetection: ChangeDetectionStrategy.OnPush, host: {\n class: 'grid gap-1',\n }, template: \"<div class=\\\"flex gap-4 w-full\\\">\\r\\n @for (state of sourceLevelStates(); track getSourceId(state.source)) {\\r\\n <!--\\r\\n `grid gap-1 grid-cols-[minmax(0,1fr)]` matches the label\\u2192control spacing\\r\\n every other mt-* field gets from its host class; the explicit column\\r\\n keeps the implicit max-content track from letting long values overflow.\\r\\n -->\\r\\n <div\\r\\n [style.width]=\\\"dropdownWidth()\\\"\\r\\n class=\\\"grid gap-1 grid-cols-[minmax(0,1fr)] min-w-0\\\"\\r\\n >\\r\\n <div class=\\\"flex items-center gap-1\\\">\\r\\n <label class=\\\"truncate\\\" [class.required]=\\\"required()\\\">\\r\\n {{ resolveSourceName(state.source) }}\\r\\n </label>\\r\\n <span\\r\\n class=\\\"inline-flex shrink-0 text-surface-400\\\"\\r\\n [mtTooltip]=\\\"connectionHint()\\\"\\r\\n tooltipPosition=\\\"top\\\"\\r\\n >\\r\\n <mt-icon icon=\\\"general.link-01\\\" />\\r\\n </span>\\r\\n </div>\\r\\n\\r\\n @if (state.source.allowManyToMany) {\\r\\n <mt-multi-select-field\\r\\n [field]=\\\"false\\\"\\r\\n [(ngModel)]=\\\"selections[getSourceId(state.source)]\\\"\\r\\n (ngModelChange)=\\\"syncValue()\\\"\\r\\n [options]=\\\"state.options\\\"\\r\\n optionLabel=\\\"name\\\"\\r\\n optionValue=\\\"id\\\"\\r\\n [placeholder]=\\\"sourcePlaceholder(state.source)\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [filter]=\\\"filter()\\\"\\r\\n [showClear]=\\\"true\\\"\\r\\n display=\\\"chip\\\"\\r\\n />\\r\\n } @else {\\r\\n <mt-select-field\\r\\n [field]=\\\"false\\\"\\r\\n [(ngModel)]=\\\"selections[getSourceId(state.source)]\\\"\\r\\n (ngModelChange)=\\\"syncValue()\\\"\\r\\n [options]=\\\"state.options\\\"\\r\\n optionLabel=\\\"name\\\"\\r\\n optionValue=\\\"id\\\"\\r\\n [placeholder]=\\\"sourcePlaceholder(state.source)\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [filter]=\\\"filter()\\\"\\r\\n [loading]=\\\"state.loading\\\"\\r\\n [showClear]=\\\"true\\\"\\r\\n />\\r\\n }\\r\\n </div>\\r\\n }\\r\\n</div>\\r\\n\\r\\n<mt-field-validation [control]=\\\"ngControl?.control\\\"></mt-field-validation>\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: \"label\", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: \"placeholder\", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: \"readonly\", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: \"required\", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: \"filter\", required: false }] }], configuration: [{ type: i0.Input, args: [{ isSignal: true, alias: \"configuration\", required: true }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: \"context\", required: false }] }] } });","originalLength":21749,"removedExports":[],"renderedExports":["SchemaConnectionField"],"renderedLength":20874},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-esm2022/business-fields/schedule-predecessor-field/schedule-predecessor-field.js":{"code":"const PREDECESSOR_TYPE_BY_TOKEN = {\n FS: 0,\n SS: 1,\n FF: 2,\n SF: 3,\n};\nconst PREDECESSOR_TOKEN_BY_TYPE = {\n 0: 'FS',\n 1: 'SS',\n 2: 'FF',\n 3: 'SF',\n};\nclass SchedulePredecessorField {\n predecessorCellTpl = viewChild.required('predecessorCellTpl');\n typeCellTpl = viewChild.required('typeCellTpl');\n lagCellTpl = viewChild.required('lagCellTpl');\n label = input('', ...(ngDevMode ? [{ debugName: \"label\" }] : /* istanbul ignore next */ []));\n /** Fallback so a control-less, label-less field never renders id=\"undefined\". */\n defaultFieldId = nextFieldId('mt-schedule-predecessor-field');\n /** Shared by the input and its <label for>. See src/lib/utils/field-id. */\n fieldId = computed(() => resolveFieldId(this.ngControl?.name, this.label(), this.defaultFieldId), ...(ngDevMode ? [{ debugName: \"fieldId\" }] : /* istanbul ignore next */ []));\n placeholder = input('', ...(ngDevMode ? [{ debugName: \"placeholder\" }] : /* istanbul ignore next */ []));\n readonly = input(false, ...(ngDevMode ? [{ debugName: \"readonly\" }] : /* istanbul ignore next */ []));\n required = input(false, ...(ngDevMode ? [{ debugName: \"required\" }] : /* istanbul ignore next */ []));\n configuration = input(null, ...(ngDevMode ? [{ debugName: \"configuration\" }] : /* istanbul ignore next */ []));\n runtimeContext = input(null, ...(ngDevMode ? [{ debugName: \"runtimeContext\" }] : /* istanbul ignore next */ []));\n loading = signal(false, ...(ngDevMode ? [{ debugName: \"loading\" }] : /* istanbul ignore next */ []));\n taskOptions = signal([], ...(ngDevMode ? [{ debugName: \"taskOptions\" }] : /* istanbul ignore next */ []));\n rows = signal([], ...(ngDevMode ? [{ debugName: \"rows\" }] : /* istanbul ignore next */ []));\n disabled = signal(false, ...(ngDevMode ? [{ debugName: \"disabled\" }] : /* istanbul ignore next */ []));\n typeOptions = computed(() => [\n { label: 'FS', value: 0 },\n { label: 'SS', value: 1 },\n { label: 'FF', value: 2 },\n { label: 'SF', value: 3 },\n ], ...(ngDevMode ? [{ debugName: \"typeOptions\" }] : /* istanbul ignore next */ []));\n availableTaskOptions = computed(() => {\n const currentTaskId = this.runtimeContext()?.moduleDataId;\n return this.taskOptions().filter((item) => String(item.value) !== String(currentTaskId ?? ''));\n }, ...(ngDevMode ? [{ debugName: \"availableTaskOptions\" }] : /* istanbul ignore next */ []));\n canAddRow = computed(() => !!this.runtimeContext()?.levelId &&\n !!this.runtimeContext()?.levelDataId &&\n this.availableTaskOptions().length > 0, ...(ngDevMode ? [{ debugName: \"canAddRow\" }] : /* istanbul ignore next */ []));\n addTooltip = computed(() => this.canAddRow() ? undefined : this.texts().noAvailable, ...(ngDevMode ? [{ debugName: \"addTooltip\" }] : /* istanbul ignore next */ []));\n pageSize = computed(() => this.rows().length > 0 ? this.rows().length : 1, ...(ngDevMode ? [{ debugName: \"pageSize\" }] : /* istanbul ignore next */ []));\n columns = linkedSignal(() => [\n {\n key: 'predecessorId',\n label: this.texts().predecessor,\n type: 'custom',\n customCellTpl: this.predecessorCellTpl(),\n },\n {\n key: 'type',\n label: this.texts().type,\n type: 'custom',\n customCellTpl: this.typeCellTpl(),\n },\n {\n key: 'lagDays',\n label: this.texts().lagDays,\n type: 'custom',\n customCellTpl: this.lagCellTpl(),\n },\n ], ...(ngDevMode ? [{ debugName: \"columns\" }] : /* istanbul ignore next */ []));\n rowActions = computed(() => [\n {\n icon: 'general.trash-01',\n color: 'danger',\n variant: 'text',\n tooltip: this.texts().delete,\n hidden: () => this.disabled() || this.readonly(),\n action: (row) => this.removeRow(row.key),\n },\n ], ...(ngDevMode ? [{ debugName: \"rowActions\" }] : /* istanbul ignore next */ []));\n requiredValidator = Validators.required;\n onTouched = () => { };\n onModelChange = () => { };\n ngControl = null;\n http = inject(HttpClient);\n transloco = inject(TranslocoService);\n destroyRef = inject(DestroyRef);\n activeLang = toSignal(this.transloco.langChanges$, {\n initialValue: this.transloco.getActiveLang(),\n });\n rowKey = 0;\n texts = computed(() => {\n this.activeLang();\n return {\n noAvailable: this.transloco.translate('components.schedulePredecessorField.noAvailable'),\n predecessor: this.transloco.translate('components.schedulePredecessorField.predecessor'),\n type: this.transloco.translate('components.schedulePredecessorField.type'),\n lagDays: this.transloco.translate('components.schedulePredecessorField.lagDays'),\n delete: this.transloco.translate('components.schedulePredecessorField.delete'),\n };\n }, ...(ngDevMode ? [{ debugName: \"texts\" }] : /* istanbul ignore next */ []));\n constructor() {\n this.ngControl = inject(NgControl, { self: true, optional: true });\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n effect(() => {\n if (this.ngControl?.control && this.required()) {\n this.ngControl.control.addValidators(Validators.required);\n this.ngControl.control.updateValueAndValidity();\n }\n });\n effect(() => {\n const context = this.runtimeContext();\n const levelId = context?.levelId;\n const levelDataId = context?.levelDataId;\n if (levelId == null || levelDataId == null) {\n this.taskOptions.set([]);\n return;\n }\n untracked(() => this.loadTaskOptions(levelId, levelDataId));\n });\n }\n addRow() {\n if (this.disabled() || this.readonly() || !this.canAddRow()) {\n return;\n }\n this.syncRows([\n ...this.rows(),\n {\n key: this.nextRowKey(),\n predecessorId: '',\n type: 0,\n lagDays: 0,\n },\n ]);\n }\n removeRow(key) {\n if (this.disabled() || this.readonly()) {\n return;\n }\n this.syncRows(this.rows().filter((row) => row.key !== key));\n }\n updateRow(key, patch) {\n if (this.disabled() || this.readonly()) {\n return;\n }\n this.syncRows(this.rows().map((row) => (row.key === key ? { ...row, ...patch } : row)));\n }\n writeValue(value) {\n const rows = typeof value === 'string'\n ? value\n .split(',')\n .map((item) => item.trim())\n .filter(Boolean)\n .map((item) => this.parseCompactValue(item))\n .filter((item) => item != null)\n .map((item) => ({\n key: this.nextRowKey(),\n ...item,\n }))\n : [];\n this.rows.set(rows);\n }\n registerOnChange(fn) {\n this.onModelChange = fn;\n }\n registerOnTouched(fn) {\n this.onTouched = fn;\n }\n setDisabledState(disabled) {\n this.disabled.set(disabled);\n }\n syncRows(rows) {\n this.rows.set(rows);\n const value = rows\n .filter((row) => row.predecessorId !== null &&\n row.predecessorId !== undefined &&\n String(row.predecessorId).trim() !== '')\n .map((row) => this.formatCompactValue(row))\n .join(',');\n this.onModelChange(value || null);\n this.onTouched();\n }\n loadTaskOptions(levelId, levelDataId) {\n this.loading.set(true);\n this.http\n .post(`levels/${levelId}/${levelDataId}/schedule/query`, {\n projection: 'Tree',\n propertyKeys: ['name'],\n })\n .pipe(takeUntilDestroyed(this.destroyRef), finalize(() => this.loading.set(false)), catchError(() => of({ data: { records: [] } })))\n .subscribe((response) => {\n this.taskOptions.set(this.mapTaskOptions(response.data));\n });\n }\n mapTaskOptions(data) {\n // Labels show the ROW NUMBER (1-based position in the same pre-order walk\n // the grid's ID column numbers), not the backend id — the two surfaces\n // must speak one coordinate. The option VALUE stays the real id: the\n // compact predecessor string this field produces is wire format.\n return this.flattenRecords(this.resolveRootRecords(data?.records ?? [], data?.projectionMeta?.rootIds ?? [])).map((record, index) => ({\n label: `${index + 1} - ${record.name ?? record.id}`,\n value: String(record.id),\n }));\n }\n resolveRootRecords(records, rootIds) {\n if (!rootIds?.length) {\n return records;\n }\n const recordsById = new Map(records.map((record) => [String(record.id), record]));\n return rootIds\n .map((id) => recordsById.get(String(id)))\n .filter((record) => record != null);\n }\n flattenRecords(records) {\n const output = [];\n const walk = (items) => {\n items.forEach((item) => {\n output.push(item);\n walk(item.children ?? []);\n });\n };\n walk(records);\n return output;\n }\n nextRowKey() {\n this.rowKey += 1;\n return `predecessor-${this.rowKey}`;\n }\n parseCompactValue(value) {\n const match = value.match(/^(.+?)(FS|SS|FF|SF)([+-]\\d+)?$/);\n if (!match) {\n return null;\n }\n return {\n predecessorId: match[1],\n type: PREDECESSOR_TYPE_BY_TOKEN[match[2]],\n lagDays: match[3] ? Number(match[3]) : 0,\n };\n }\n formatCompactValue(row) {\n const lag = row.lagDays > 0 ? `+${row.lagDays}` : row.lagDays < 0 ? row.lagDays : '';\n return `${row.predecessorId}${PREDECESSOR_TOKEN_BY_TYPE[row.type]}${lag}`;\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: SchedulePredecessorField, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.2.8\", type: SchedulePredecessorField, isStandalone: true, selector: \"mt-schedule-predecessor-field\", inputs: { label: { classPropertyName: \"label\", publicName: \"label\", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: \"placeholder\", publicName: \"placeholder\", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: \"readonly\", publicName: \"readonly\", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: \"required\", publicName: \"required\", isSignal: true, isRequired: false, transformFunction: null }, configuration: { classPropertyName: \"configuration\", publicName: \"configuration\", isSignal: true, isRequired: false, transformFunction: null }, runtimeContext: { classPropertyName: \"runtimeContext\", publicName: \"runtimeContext\", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: \"grid gap-1\" }, viewQueries: [{ propertyName: \"predecessorCellTpl\", first: true, predicate: [\"predecessorCellTpl\"], descendants: true, isSignal: true }, { propertyName: \"typeCellTpl\", first: true, predicate: [\"typeCellTpl\"], descendants: true, isSignal: true }, { propertyName: \"lagCellTpl\", first: true, predicate: [\"lagCellTpl\"], descendants: true, isSignal: true }], ngImport: i0, template: \"<div class=\\\"gap-3 overflow-auto\\\">\\r\\n <div class=\\\"flex items-center justify-between mb-2\\\">\\r\\n <div>\\r\\n @if (label()) {\\r\\n <label\\r\\n [class.required]=\\\"ngControl?.control?.hasValidator(requiredValidator)\\\"\\r\\n [for]=\\\"fieldId()\\\"\\r\\n >\\r\\n {{ label() }}\\r\\n </label>\\r\\n }\\r\\n </div>\\r\\n <mt-button\\r\\n icon=\\\"general.plus\\\"\\r\\n [label]=\\\"'components.schedulePredecessorField.add' | transloco\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n variant=\\\"outlined\\\"\\r\\n size=\\\"small\\\"\\r\\n [disabled]=\\\"disabled() || readonly() || !canAddRow()\\\"\\r\\n [tooltip]=\\\"addTooltip()\\\"\\r\\n (onClick)=\\\"addRow()\\\"\\r\\n />\\r\\n </div>\\r\\n\\r\\n <ng-template #predecessorCellTpl let-row>\\r\\n <mt-select-field\\r\\n [field]=\\\"false\\\"\\r\\n [options]=\\\"availableTaskOptions()\\\"\\r\\n optionLabel=\\\"label\\\"\\r\\n optionValue=\\\"value\\\"\\r\\n [placeholder]=\\\"\\r\\n placeholder() ||\\r\\n ('components.schedulePredecessorField.selectPredecessor' | transloco)\\r\\n \\\"\\r\\n [filter]=\\\"true\\\"\\r\\n [showClear]=\\\"true\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [ngModel]=\\\"row.predecessorId || undefined\\\"\\r\\n (onChange)=\\\"updateRow(row.key, { predecessorId: $event ?? '' })\\\"\\r\\n />\\r\\n </ng-template>\\r\\n\\r\\n <ng-template #typeCellTpl let-row>\\r\\n <mt-select-field\\r\\n [field]=\\\"false\\\"\\r\\n [options]=\\\"typeOptions()\\\"\\r\\n optionLabel=\\\"label\\\"\\r\\n optionValue=\\\"value\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [ngModel]=\\\"row.type\\\"\\r\\n (onChange)=\\\"updateRow(row.key, { type: $event ?? 0 })\\\"\\r\\n />\\r\\n </ng-template>\\r\\n\\r\\n <ng-template #lagCellTpl let-row>\\r\\n <mt-number-field\\r\\n [field]=\\\"false\\\"\\r\\n [useGrouping]=\\\"false\\\"\\r\\n [placeholder]=\\\"'components.schedulePredecessorField.lagDays' | transloco\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [ngModel]=\\\"row.lagDays\\\"\\r\\n (ngModelChange)=\\\"updateRow(row.key, { lagDays: $event ?? 0 })\\\"\\r\\n />\\r\\n </ng-template>\\r\\n\\r\\n <mt-table\\r\\n noCard\\r\\n [data]=\\\"rows()\\\"\\r\\n [columns]=\\\"columns()\\\"\\r\\n [rowActions]=\\\"rowActions()\\\"\\r\\n [pageSize]=\\\"pageSize()\\\"\\r\\n [generalSearch]=\\\"false\\\"\\r\\n [showFilters]=\\\"false\\\"\\r\\n [dataKey]=\\\"'key'\\\"\\r\\n storageKey=\\\"schedule-predecessor-field-table\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n >\\r\\n <ng-template #empty>\\r\\n <div\\r\\n class=\\\"rounded-xl border border-dashed border-surface px-4 py-5 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.schedulePredecessorField.empty\\\" | transloco }}\\r\\n </div>\\r\\n </ng-template>\\r\\n </mt-table>\\r\\n</div>\\r\\n\\r\\n<mt-field-validation [control]=\\\"ngControl?.control\\\"></mt-field-validation>\\r\\n\", dependencies: [{ kind: \"ngmodule\", type: CommonModule }, { kind: \"ngmodule\", type: FormsModule }, { kind: \"directive\", type: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.NgModel, selector: \"[ngModel]:not([formControlName]):not([formControl])\", inputs: [\"name\", \"disabled\", \"ngModel\", \"ngModelOptions\"], outputs: [\"ngModelChange\"], exportAs: [\"ngModel\"] }, { kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\", \"ariaLabel\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }, { kind: \"component\", type: FieldValidation, selector: \"mt-field-validation\", inputs: [\"control\", \"touched\", \"messageId\"] }, { kind: \"component\", type: NumberField, selector: \"mt-number-field\", inputs: [\"field\", \"hint\", \"label\", \"placeholder\", \"class\", \"readonly\", \"pInputs\", \"format\", \"useGrouping\", \"maxFractionDigits\", \"min\", \"max\", \"required\"] }, { kind: \"component\", type: SelectField, selector: \"mt-select-field\", inputs: [\"field\", \"hint\", \"label\", \"placeholder\", \"hasPlaceholderPrefix\", \"class\", \"readonly\", \"pInputs\", \"options\", \"optionValue\", \"optionLabel\", \"filter\", \"filterBy\", \"dataKey\", \"showClear\", \"clearAfterSelect\", \"required\", \"group\", \"size\", \"optionGroupLabel\", \"optionGroupChildren\", \"loading\", \"optionIcon\", \"optionIconColor\", \"optionIconShape\", \"optionAvatarShape\", \"optionGroupIcon\", \"optionGroupIconColor\", \"optionGroupIconShape\", \"optionGroupAvatarShape\", \"markCurrentUser\"], outputs: [\"onChange\"] }, { kind: \"component\", type: Table, selector: \"mt-table\", inputs: [\"filters\", \"data\", \"columns\", \"rowActions\", \"size\", \"showGridlines\", \"stripedRows\", \"selectableRows\", \"clickableRows\", \"generalSearch\", \"lazyLocalSearch\", \"showFilters\", \"filterMode\", \"loading\", \"updating\", \"lazy\", \"lazyLocalSort\", \"lazyTotalRecords\", \"reorderableColumns\", \"reorderableRows\", \"dataKey\", \"storageKey\", \"storageMode\", \"persistStateExclude\", \"exportable\", \"printable\", \"groupable\", \"groupCountMap\", \"cellClickFilter\", \"freezeActions\", \"virtualScroll\", \"virtualScrollItemSize\", \"scrollHeight\", \"printTitle\", \"exportFilename\", \"actionShape\", \"rowActionsLoadingFn\", \"tableLayout\", \"noCard\", \"tabs\", \"tabsOptionLabel\", \"tabsOptionValue\", \"activeTab\", \"actions\", \"emptyTitle\", \"emptyDescription\", \"emptyActionLabel\", \"emptyActionIcon\", \"paginatorPosition\", \"alwaysShowPaginator\", \"rowsPerPageOptions\", \"pageSize\", \"currentPage\", \"first\", \"filterTerm\", \"groupBy\", \"sortField\", \"sortDirection\"], outputs: [\"selectionChange\", \"cellChange\", \"lazyLoad\", \"columnReorder\", \"rowReorder\", \"rowClick\", \"emptyAction\", \"rowActionsRequested\", \"filtersChange\", \"activeTabChange\", \"onTabChange\", \"pageSizeChange\", \"currentPageChange\", \"firstChange\", \"filterTermChange\", \"groupByChange\", \"sortFieldChange\", \"sortDirectionChange\"] }, { kind: \"ngmodule\", type: TranslocoModule }, { kind: \"pipe\", type: i2.TranslocoPipe, name: \"transloco\" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: SchedulePredecessorField, decorators: [{\n type: Component,\n args: [{ selector: 'mt-schedule-predecessor-field', standalone: true, imports: [\n CommonModule,\n FormsModule,\n Button,\n FieldValidation,\n NumberField,\n SelectField,\n Table,\n TranslocoModule,\n ], changeDetection: ChangeDetectionStrategy.OnPush, host: {\n class: 'grid gap-1',\n }, template: \"<div class=\\\"gap-3 overflow-auto\\\">\\r\\n <div class=\\\"flex items-center justify-between mb-2\\\">\\r\\n <div>\\r\\n @if (label()) {\\r\\n <label\\r\\n [class.required]=\\\"ngControl?.control?.hasValidator(requiredValidator)\\\"\\r\\n [for]=\\\"fieldId()\\\"\\r\\n >\\r\\n {{ label() }}\\r\\n </label>\\r\\n }\\r\\n </div>\\r\\n <mt-button\\r\\n icon=\\\"general.plus\\\"\\r\\n [label]=\\\"'components.schedulePredecessorField.add' | transloco\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n variant=\\\"outlined\\\"\\r\\n size=\\\"small\\\"\\r\\n [disabled]=\\\"disabled() || readonly() || !canAddRow()\\\"\\r\\n [tooltip]=\\\"addTooltip()\\\"\\r\\n (onClick)=\\\"addRow()\\\"\\r\\n />\\r\\n </div>\\r\\n\\r\\n <ng-template #predecessorCellTpl let-row>\\r\\n <mt-select-field\\r\\n [field]=\\\"false\\\"\\r\\n [options]=\\\"availableTaskOptions()\\\"\\r\\n optionLabel=\\\"label\\\"\\r\\n optionValue=\\\"value\\\"\\r\\n [placeholder]=\\\"\\r\\n placeholder() ||\\r\\n ('components.schedulePredecessorField.selectPredecessor' | transloco)\\r\\n \\\"\\r\\n [filter]=\\\"true\\\"\\r\\n [showClear]=\\\"true\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [ngModel]=\\\"row.predecessorId || undefined\\\"\\r\\n (onChange)=\\\"updateRow(row.key, { predecessorId: $event ?? '' })\\\"\\r\\n />\\r\\n </ng-template>\\r\\n\\r\\n <ng-template #typeCellTpl let-row>\\r\\n <mt-select-field\\r\\n [field]=\\\"false\\\"\\r\\n [options]=\\\"typeOptions()\\\"\\r\\n optionLabel=\\\"label\\\"\\r\\n optionValue=\\\"value\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [ngModel]=\\\"row.type\\\"\\r\\n (onChange)=\\\"updateRow(row.key, { type: $event ?? 0 })\\\"\\r\\n />\\r\\n </ng-template>\\r\\n\\r\\n <ng-template #lagCellTpl let-row>\\r\\n <mt-number-field\\r\\n [field]=\\\"false\\\"\\r\\n [useGrouping]=\\\"false\\\"\\r\\n [placeholder]=\\\"'components.schedulePredecessorField.lagDays' | transloco\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [ngModel]=\\\"row.lagDays\\\"\\r\\n (ngModelChange)=\\\"updateRow(row.key, { lagDays: $event ?? 0 })\\\"\\r\\n />\\r\\n </ng-template>\\r\\n\\r\\n <mt-table\\r\\n noCard\\r\\n [data]=\\\"rows()\\\"\\r\\n [columns]=\\\"columns()\\\"\\r\\n [rowActions]=\\\"rowActions()\\\"\\r\\n [pageSize]=\\\"pageSize()\\\"\\r\\n [generalSearch]=\\\"false\\\"\\r\\n [showFilters]=\\\"false\\\"\\r\\n [dataKey]=\\\"'key'\\\"\\r\\n storageKey=\\\"schedule-predecessor-field-table\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n >\\r\\n <ng-template #empty>\\r\\n <div\\r\\n class=\\\"rounded-xl border border-dashed border-surface px-4 py-5 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.schedulePredecessorField.empty\\\" | transloco }}\\r\\n </div>\\r\\n </ng-template>\\r\\n </mt-table>\\r\\n</div>\\r\\n\\r\\n<mt-field-validation [control]=\\\"ngControl?.control\\\"></mt-field-validation>\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { predecessorCellTpl: [{ type: i0.ViewChild, args: ['predecessorCellTpl', { isSignal: true }] }], typeCellTpl: [{ type: i0.ViewChild, args: ['typeCellTpl', { isSignal: true }] }], lagCellTpl: [{ type: i0.ViewChild, args: ['lagCellTpl', { isSignal: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: \"label\", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: \"placeholder\", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: \"readonly\", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: \"required\", required: false }] }], configuration: [{ type: i0.Input, args: [{ isSignal: true, alias: \"configuration\", required: false }] }], runtimeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: \"runtimeContext\", required: false }] }] } });","originalLength":23319,"removedExports":[],"renderedExports":["SchedulePredecessorField"],"renderedLength":22227},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-esm2022/business-fields/entity-list-field/entity-list-add-token.js":{"code":"/**\n * Token used by `mt-entity-list-field` (Write mode) to open the rich add-row\n * dialog backed by `@masterteam/forms`'s `mt-client-form`. Apps that want this\n * behavior should call `provideEntityListAddForm()` from\n * `@masterteam/forms/entity-list-add-form` in their app providers. When the\n * token is not registered, the field falls back to a minimal text-only popup.\n */\nconst ENTITY_LIST_ADD_DIALOG_COMPONENT = new InjectionToken('ENTITY_LIST_ADD_DIALOG_COMPONENT');","originalLength":581,"removedExports":[],"renderedExports":["ENTITY_LIST_ADD_DIALOG_COMPONENT"],"renderedLength":476},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-esm2022/business-fields/entity-list-field/entity-list-field.js":{"code":"const UNSORTABLE_ENTITY_VIEW_TYPES = new Set([\n 'Attachment',\n 'Checkbox',\n]);\nconst ACCESS_ALIASES = {\n '0': 'Auto',\n '1': 'Read',\n '2': 'Write',\n '3': 'ReadWrite',\n '4': 'None',\n auto: 'Auto',\n read: 'Read',\n write: 'Write',\n readwrite: 'ReadWrite',\n none: 'None',\n};\n/** Internal row keys — not rendered, used to correlate rows with entities. */\nconst ROW_ID_KEY = '__rowId';\nconst ROW_ENTITY_ID_KEY = '__entityId';\nconst ROW_VALUES_KEY = '__values';\nclass EntityListField {\n // Inputs\n label = input('', ...(ngDevMode ? [{ debugName: \"label\" }] : /* istanbul ignore next */ []));\n readonly = input(false, ...(ngDevMode ? [{ debugName: \"readonly\" }] : /* istanbul ignore next */ []));\n required = input(false, ...(ngDevMode ? [{ debugName: \"required\" }] : /* istanbul ignore next */ []));\n /** EntityList property id (kept for back-compat; unused by fetch/query). */\n propertyId = input(null, ...(ngDevMode ? [{ debugName: \"propertyId\" }] : /* istanbul ignore next */ []));\n /** Property configuration (sourceType, moduleId, access, readFields, etc). */\n configuration = input(null, ...(ngDevMode ? [{ debugName: \"configuration\" }] : /* istanbul ignore next */ []));\n /** Runtime ids needed to call the read endpoint. */\n runtimeContext = input(null, ...(ngDevMode ? [{ debugName: \"runtimeContext\" }] : /* istanbul ignore next */ []));\n /** Optional HttpContext (kept for back-compat). */\n context = input(undefined, ...(ngDevMode ? [{ debugName: \"context\" }] : /* istanbul ignore next */ []));\n // CVA state — pass-through value (EntityList stored JSON shape).\n storedValue = signal(null, ...(ngDevMode ? [{ debugName: \"storedValue\" }] : /* istanbul ignore next */ []));\n // Loaded table state.\n columns = signal([], ...(ngDevMode ? [{ debugName: \"columns\" }] : /* istanbul ignore next */ []));\n /** Rows loaded from the backend (existing target records). */\n rows = signal([], ...(ngDevMode ? [{ debugName: \"rows\" }] : /* istanbul ignore next */ []));\n loading = signal(false, ...(ngDevMode ? [{ debugName: \"loading\" }] : /* istanbul ignore next */ []));\n errorMessage = signal(null, ...(ngDevMode ? [{ debugName: \"errorMessage\" }] : /* istanbul ignore next */ []));\n disabled = signal(false, ...(ngDevMode ? [{ debugName: \"disabled\" }] : /* istanbul ignore next */ []));\n requiredValidator = Validators.required;\n ngControl = null;\n levelId = computed(() => {\n const raw = this.runtimeContext()?.levelId ?? null;\n return raw == null || raw === '' ? null : raw;\n }, ...(ngDevMode ? [{ debugName: \"levelId\" }] : /* istanbul ignore next */ []));\n levelDataId = computed(() => {\n const raw = this.runtimeContext()?.levelDataId ?? null;\n return raw == null || raw === '' ? null : raw;\n }, ...(ngDevMode ? [{ debugName: \"levelDataId\" }] : /* istanbul ignore next */ []));\n moduleId = computed(() => {\n const raw = this.configuration()\n ?.moduleId;\n return raw == null || raw === '' ? null : raw;\n }, ...(ngDevMode ? [{ debugName: \"moduleId\" }] : /* istanbul ignore next */ []));\n readFields = computed(() => {\n const raw = this.configuration()\n ?.readFields;\n if (!Array.isArray(raw))\n return [];\n return raw.filter((f) => typeof f === 'string' && f.length > 0);\n }, ...(ngDevMode ? [{ debugName: \"readFields\" }] : /* istanbul ignore next */ []));\n /** Normalized `access` from the property configuration. */\n accessMode = computed(() => {\n const raw = this.configuration()?.access;\n if (raw == null || raw === '')\n return 'Auto';\n return ACCESS_ALIASES[String(raw).trim().toLowerCase()] ?? 'Auto';\n }, ...(ngDevMode ? [{ debugName: \"accessMode\" }] : /* istanbul ignore next */ []));\n canRead = computed(() => {\n const access = this.accessMode();\n return access === 'Auto' || access === 'Read' || access === 'ReadWrite';\n }, ...(ngDevMode ? [{ debugName: \"canRead\" }] : /* istanbul ignore next */ []));\n /** Access allows module-backed create/update/delete. */\n writeAllowed = computed(() => {\n const access = this.accessMode();\n return access === 'Auto' || access === 'Write' || access === 'ReadWrite';\n }, ...(ngDevMode ? [{ debugName: \"writeAllowed\" }] : /* istanbul ignore next */ []));\n /** Write UI is rendered only when access allows it and the field is editable. */\n canWrite = computed(() => this.writeAllowed() && !this.readonly(), ...(ngDevMode ? [{ debugName: \"canWrite\" }] : /* istanbul ignore next */ []));\n writeFields = computed(() => {\n const raw = this.configuration()\n ?.writeFields;\n if (!Array.isArray(raw))\n return [];\n return raw.filter((f) => typeof f === 'string' && f.length > 0);\n }, ...(ngDevMode ? [{ debugName: \"writeFields\" }] : /* istanbul ignore next */ []));\n /**\n * Pending create/update rows, in the exact shape persisted by the backend\n * (`rows[]` of the stored EntityList JSON). Rows with `entityId > 0` are\n * partial updates of existing records; `entityId = 0` rows are creates.\n */\n pendingRows = signal([], ...(ngDevMode ? [{ debugName: \"pendingRows\" }] : /* istanbul ignore next */ []));\n /** Existing entity ids the user removed (submitted as `deletedIds`). */\n deletedIds = signal([], ...(ngDevMode ? [{ debugName: \"deletedIds\" }] : /* istanbul ignore next */ []));\n /** rowId → original form values / option labels (view state only). */\n rowDrafts = signal({}, ...(ngDevMode ? [{ debugName: \"rowDrafts\" }] : /* istanbul ignore next */ []));\n localRowSeq = 0;\n /** Serialized copy of the last value we emitted, to ignore CVA echoes. */\n lastEmittedJson = null;\n /** Server rows indexed by entity id, for merging pending updates. */\n rowsByEntityId = computed(() => {\n const map = new Map();\n for (const row of this.rows()) {\n const entityId = Number(row[ROW_ENTITY_ID_KEY]);\n if (entityId > 0)\n map.set(entityId, row);\n }\n return map;\n }, ...(ngDevMode ? [{ debugName: \"rowsByEntityId\" }] : /* istanbul ignore next */ []));\n /** Locally created rows (not yet persisted). */\n createdRows = computed(() => {\n const drafts = this.rowDrafts();\n return this.pendingRows()\n .filter((row) => !(row.entityId > 0))\n .map((row) => {\n const draft = drafts[row.rowId];\n return this.buildRow(row.rowId, row.rowId, 0, draft?.values ?? this.toValueMap(row.values), draft?.display ?? {});\n });\n }, ...(ngDevMode ? [{ debugName: \"createdRows\" }] : /* istanbul ignore next */ []));\n /** Pending edits of existing rows, keyed by entity id. */\n editedRowsByEntityId = computed(() => {\n const drafts = this.rowDrafts();\n const serverRows = this.rowsByEntityId();\n const map = new Map();\n for (const row of this.pendingRows()) {\n if (!(row.entityId > 0))\n continue;\n const base = serverRows.get(row.entityId);\n const draft = drafts[row.rowId];\n // A pending update only carries the keys the user changed.\n const changed = draft?.values ?? this.toValueMap(row.values);\n const display = draft?.display ?? {};\n if (!base) {\n map.set(row.entityId, this.buildRow(row.entityId, row.rowId, row.entityId, changed, display));\n continue;\n }\n // Keep the backend-rendered cells for untouched columns so resolved\n // labels (users, lookups, statuses) are not replaced by raw ids.\n const baseValues = base[ROW_VALUES_KEY] ?? {};\n const next = {\n ...base,\n [ROW_ID_KEY]: row.rowId,\n [ROW_VALUES_KEY]: { ...baseValues, ...changed },\n };\n for (const column of this.columns()) {\n const key = column.propertyKey ?? column.key;\n if (!(key in changed))\n continue;\n next[column.key] = this.buildCell(column, changed[key], display[key]);\n }\n map.set(row.entityId, next);\n }\n return map;\n }, ...(ngDevMode ? [{ debugName: \"editedRowsByEntityId\" }] : /* istanbul ignore next */ []));\n /**\n * Rows rendered in the table. In write mode existing rows are merged with\n * pending edits, removed rows are hidden, and locally created rows are\n * appended.\n */\n displayRows = computed(() => {\n if (!this.canWrite())\n return this.rows();\n const deleted = new Set(this.deletedIds());\n const edited = this.editedRowsByEntityId();\n const existing = this.rows()\n .filter((row) => !deleted.has(Number(row[ROW_ENTITY_ID_KEY])))\n .map((row) => edited.get(Number(row[ROW_ENTITY_ID_KEY])) ?? row);\n return [...existing, ...this.createdRows()];\n }, ...(ngDevMode ? [{ debugName: \"displayRows\" }] : /* istanbul ignore next */ []));\n hasRows = computed(() => this.displayRows().length > 0, ...(ngDevMode ? [{ debugName: \"hasRows\" }] : /* istanbul ignore next */ []));\n hasRequiredContext = computed(() => this.levelId() != null &&\n this.levelDataId() != null &&\n this.moduleId() != null &&\n this.readFields().length > 0, ...(ngDevMode ? [{ debugName: \"hasRequiredContext\" }] : /* istanbul ignore next */ []));\n onTouched = () => { };\n onModelChange = () => { };\n http = inject(HttpClient);\n destroyRef = inject(DestroyRef);\n modal = inject(ModalService);\n transloco = inject(TranslocoService);\n /**\n * Optional rich add-row dialog (provided by `@masterteam/forms` via\n * `provideEntityListAddForm()`). When available, used instead of the local\n * minimal dialog so the popup renders `mt-client-form` filtered by\n * `writeFields`.\n */\n addDialogComponent = inject(ENTITY_LIST_ADD_DIALOG_COMPONENT, { optional: true });\n constructor() {\n this.ngControl = inject(NgControl, { self: true, optional: true });\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n // Trigger fetch when context inputs change. Columns always come from\n // /api/fetch/query; records are kept whenever access allows reading.\n effect(() => {\n const allowedRead = this.canRead();\n const allowedWrite = this.writeAllowed();\n const ready = this.hasRequiredContext();\n const levelId = this.levelId();\n const levelDataId = this.levelDataId();\n const moduleId = this.moduleId();\n const readFields = this.readFields();\n untracked(() => {\n if ((!allowedRead && !allowedWrite) ||\n !ready ||\n levelId == null ||\n levelDataId == null ||\n moduleId == null) {\n this.columns.set([]);\n this.rows.set([]);\n this.errorMessage.set(null);\n return;\n }\n this.fetchRows(levelId, levelDataId, moduleId, readFields);\n });\n });\n }\n // ============================================================================\n // CVA\n // ============================================================================\n writeValue(value) {\n const incoming = this.coerceStoredValue(value);\n // Ignore the echo of our own emission (DynamicForm re-writes the model on\n // every value change) so pending edits/deletions are not reset.\n if (this.isEchoOfLastEmit(incoming))\n return;\n this.lastEmittedJson = null;\n this.storedValue.set(incoming);\n // Restore rows the backend left unprocessed. `deletedIds` on a loaded\n // value are historical operation markers, not pending intent.\n const rows = Array.isArray(incoming?.rows) ? incoming.rows : [];\n this.pendingRows.set(rows.filter((row) => !!row && typeof row === 'object'));\n this.deletedIds.set([]);\n this.rowDrafts.set({});\n }\n /**\n * True when the written value still carries exactly the rows and deletions\n * we last emitted — i.e. the form is echoing our own value back rather than\n * loading a new one.\n */\n isEchoOfLastEmit(incoming) {\n if (this.lastEmittedJson === null)\n return false;\n return (JSON.stringify({\n rows: incoming?.rows ?? [],\n deletedIds: incoming?.deletedIds ?? [],\n }) === this.lastEmittedJson);\n }\n /**\n * The stored value is persisted as JSON, so a host may write either the\n * parsed object or its raw string form.\n */\n coerceStoredValue(value) {\n if (value == null || value === '')\n return null;\n if (typeof value === 'string') {\n try {\n return this.coerceStoredValue(JSON.parse(value));\n }\n catch {\n return null;\n }\n }\n return typeof value === 'object' && !Array.isArray(value)\n ? value\n : null;\n }\n registerOnChange(fn) {\n this.onModelChange = fn;\n }\n registerOnTouched(fn) {\n this.onTouched = fn;\n }\n setDisabledState(isDisabled) {\n this.disabled.set(isDisabled);\n }\n // ============================================================================\n // Write mode — add / edit / delete\n // ============================================================================\n /** Row actions shown in write mode — edit and delete. */\n writeRowActions = computed(() => {\n if (this.disabled())\n return [];\n return [\n {\n icon: 'custom.pencil',\n tooltip: this.transloco.translate('components.entityListField.edit'),\n action: (row) => this.openEditDialog(row),\n },\n {\n icon: 'general.trash-01',\n tooltip: this.transloco.translate('components.entityListField.delete'),\n color: 'danger',\n confirmation: {\n type: 'popup',\n confirmationType: 'delete',\n },\n action: (row) => this.deleteRow(row),\n },\n ];\n }, ...(ngDevMode ? [{ debugName: \"writeRowActions\" }] : /* istanbul ignore next */ []));\n openAddDialog() {\n if (this.disabled())\n return;\n const component = this.addDialogComponent;\n if (!component)\n return;\n const ref = this.modal.openModal(component, 'dialog', {\n header: this.transloco.translate('components.entityListField.add'),\n styleClass: '!w-[48rem] max-w-[96vw]',\n dismissableMask: true,\n inputValues: {\n moduleId: this.moduleId(),\n levelId: this.levelId(),\n levelDataId: this.levelDataId(),\n writeFields: this.writeFields(),\n },\n });\n ref.onClose.pipe(take(1)).subscribe((result) => {\n const parsed = this.parseDialogResult(result);\n if (!parsed)\n return;\n // A create row carries every value the user filled in; empty fields are\n // dropped so the target module keeps its own defaults.\n const values = this.dropEmptyValues(parsed.values);\n const rowId = this.nextRowId();\n this.setRowDraft(rowId, values, parsed.display);\n this.pendingRows.set([\n ...this.pendingRows(),\n { rowId, entityId: 0, values: this.toSubmitValues(values) },\n ]);\n this.emitValue();\n });\n }\n openEditDialog(row) {\n if (this.disabled())\n return;\n const component = this.addDialogComponent;\n if (!component)\n return;\n const entityId = Number(row[ROW_ENTITY_ID_KEY]) || 0;\n const rowId = String(row[ROW_ID_KEY] ?? '');\n const initialValues = row[ROW_VALUES_KEY] ?? {};\n const ref = this.modal.openModal(component, 'dialog', {\n header: this.transloco.translate('components.entityListField.edit'),\n styleClass: '!w-[48rem] max-w-[96vw]',\n dismissableMask: true,\n inputValues: {\n moduleId: this.moduleId(),\n levelId: this.levelId(),\n levelDataId: this.levelDataId(),\n writeFields: this.writeFields(),\n initialValues,\n isEdit: true,\n },\n });\n ref.onClose.pipe(take(1)).subscribe((result) => {\n const parsed = this.parseDialogResult(result);\n if (!parsed)\n return;\n if (entityId > 0) {\n this.applyExistingRowEdit(entityId, rowId, initialValues, parsed);\n }\n else {\n this.applyCreatedRowEdit(rowId, parsed);\n }\n this.emitValue();\n });\n }\n /**\n * Existing target records are updated partially: only values the user\n * actually changed are submitted, so fields the dialog could not pre-fill\n * (keys outside `readFields`) are left untouched by the backend.\n */\n applyExistingRowEdit(entityId, fallbackRowId, initialValues, parsed) {\n const changed = this.diffValues(initialValues, parsed.values);\n const current = this.pendingRows();\n const existing = current.find((row) => row.entityId === entityId);\n const rowId = existing?.rowId || (fallbackRowId ? fallbackRowId : `entity-${entityId}`);\n const merged = {\n ...(this.rowDrafts()[rowId]?.values ?? {}),\n ...changed,\n };\n if (Object.keys(merged).length === 0) {\n // Nothing left to submit for this record — drop the pending update.\n this.clearRowDraft(rowId);\n this.pendingRows.set(current.filter((row) => row.entityId !== entityId));\n return;\n }\n this.setRowDraft(rowId, merged, parsed.display);\n const next = {\n rowId,\n entityId,\n values: this.toSubmitValues(merged),\n };\n this.pendingRows.set(existing\n ? current.map((row) => (row.entityId === entityId ? next : row))\n : [...current, next]);\n }\n /** A locally created row is replaced wholesale by the dialog result. */\n applyCreatedRowEdit(rowId, parsed) {\n const values = this.dropEmptyValues(parsed.values);\n this.setRowDraft(rowId, values, parsed.display);\n this.pendingRows.set(this.pendingRows().map((row) => row.rowId === rowId\n ? { ...row, values: this.toSubmitValues(values) }\n : row));\n }\n /**\n * Remove a row. Locally created rows are dropped from the pending payload;\n * existing records are queued in `deletedIds` for the backend to delete.\n */\n deleteRow(row) {\n if (this.disabled())\n return;\n const entityId = Number(row[ROW_ENTITY_ID_KEY]) || 0;\n const rowId = String(row[ROW_ID_KEY] ?? '');\n if (entityId > 0) {\n if (!this.deletedIds().includes(entityId)) {\n this.deletedIds.set([...this.deletedIds(), entityId]);\n }\n // A queued update for a deleted record is pointless — drop it.\n this.pendingRows.set(this.pendingRows().filter((pending) => pending.entityId !== entityId));\n }\n else {\n this.pendingRows.set(this.pendingRows().filter((pending) => pending.rowId !== rowId));\n }\n this.clearRowDraft(rowId);\n this.emitValue();\n }\n /**\n * Normalize the add/edit dialog close payload. The rich dialog returns\n * `{ values, display }`; a custom add-dialog may still return the raw values\n * object directly (no display map), which we treat as `display = {}`.\n */\n parseDialogResult(result) {\n if (!result || typeof result !== 'object')\n return null;\n const payload = result;\n const values = payload['values'];\n if (values && typeof values === 'object') {\n return {\n values: values,\n display: payload['display'] ?? {},\n };\n }\n return { values: payload, display: {} };\n }\n nextRowId() {\n const used = new Set(this.pendingRows().map((row) => row.rowId));\n let candidate = '';\n do {\n this.localRowSeq += 1;\n candidate = `client-${this.localRowSeq}`;\n } while (used.has(candidate));\n return candidate;\n }\n setRowDraft(rowId, values, display) {\n this.rowDrafts.set({ ...this.rowDrafts(), [rowId]: { values, display } });\n }\n clearRowDraft(rowId) {\n if (!rowId || !(rowId in this.rowDrafts()))\n return;\n const next = { ...this.rowDrafts() };\n delete next[rowId];\n this.rowDrafts.set(next);\n }\n buildRow(id, rowId, entityId, values, display = {}) {\n const row = {\n Id: id,\n [ROW_ID_KEY]: rowId,\n [ROW_ENTITY_ID_KEY]: entityId,\n [ROW_VALUES_KEY]: values,\n };\n for (const column of this.columns()) {\n // Form values are keyed by catalog property key (e.g. \"task_name\"),\n // but column.key is the normalizedKey (e.g. \"Name\"). Use propertyKey\n // for the lookup so the value is found.\n const key = column.propertyKey ?? column.key;\n row[column.key] = this.buildCell(column, values[key], display[key]);\n }\n return row;\n }\n /** Render one table cell from a raw form value and its resolved label. */\n buildCell(column, raw, label) {\n return {\n name: column.label ?? column.key,\n key: column.key,\n viewType: column.viewType ?? 'Text',\n value: this.toLocalEntityValue(column.viewType, raw, label),\n rawValue: raw ?? null,\n };\n }\n /**\n * Shape a raw form value into the value an entity renderer expects for the\n * given view type. Locally-added rows carry raw form values, but renderers\n * like `mt-entity-user` need a display object (`{ displayName }`) — a\n * team-member `User` field is a select whose control value is a bare user id.\n * `label` is the resolved option display (present for select-based fields).\n */\n toLocalEntityValue(viewType, raw, label) {\n if (viewType === 'User') {\n if (Array.isArray(raw)) {\n const names = raw\n .map((entry) => entry && typeof entry === 'object'\n ? (entry['displayName'] ?? '')\n : entry)\n .filter((name) => name != null && name !== '');\n return names.length ? { displayName: names.join(', ') } : '';\n }\n if (raw && typeof raw === 'object') {\n const user = raw;\n return {\n ...user,\n displayName: user['displayName'] ?? label ?? '',\n photoUrl: user['photoUrl'] ?? user['photo'] ?? '',\n };\n }\n if (raw != null && raw !== '') {\n const name = label == null ? String(raw) : String(label);\n return { id: String(raw), displayName: name, userName: name };\n }\n return '';\n }\n if (viewType === 'Status' || viewType === 'Lookup') {\n if (raw && typeof raw === 'object')\n return raw;\n if (raw != null && raw !== '' && label != null) {\n return { key: String(raw), display: String(label), color: '' };\n }\n return raw ?? '';\n }\n // Plain / scalar view types: prefer a resolved option label when present,\n // else the raw value (unchanged for text / number / date / percentage).\n if (label != null && (raw == null || typeof raw !== 'object')) {\n return Array.isArray(label) ? label.join(', ') : label;\n }\n return raw ?? '';\n }\n // ============================================================================\n // Submit payload (see EntityList.md — \"Stored Value Shape\")\n // ============================================================================\n emitValue() {\n const current = this.storedValue();\n // `entityIds` / `createdIds` / `updatedIds` / `snapshot` are backend-owned\n // and passed through untouched; the frontend only contributes pending rows\n // and delete intents.\n const next = {\n ...(current ?? {}),\n rows: this.pendingRows(),\n deletedIds: this.deletedIds(),\n };\n this.storedValue.set(next);\n this.lastEmittedJson = JSON.stringify({\n rows: next.rows,\n deletedIds: next.deletedIds,\n });\n this.onModelChange(next);\n this.onTouched();\n }\n /** `values[]` entries, restricted to `writeFields` when configured. */\n toSubmitValues(values) {\n const allowed = new Set(this.writeFields());\n return Object.entries(values)\n .filter(([propertyKey]) => allowed.size === 0 || allowed.has(propertyKey))\n .map(([propertyKey, value]) => ({\n propertyKey,\n rawValue: this.toRawValue(value),\n }));\n }\n /** Backend `rawValue` is a serialized scalar; objects/arrays go as JSON. */\n toRawValue(value) {\n if (value == null || value === '')\n return null;\n if (value instanceof Date)\n return value.toISOString();\n if (typeof value === 'object')\n return JSON.stringify(value);\n return String(value);\n }\n toValueMap(values) {\n const map = {};\n for (const value of values ?? []) {\n if (!value?.propertyKey)\n continue;\n map[value.propertyKey] = value.rawValue;\n }\n return map;\n }\n dropEmptyValues(values) {\n const next = {};\n for (const [key, value] of Object.entries(values)) {\n if (this.isEmptyValue(value))\n continue;\n next[key] = value;\n }\n return next;\n }\n /**\n * Keys the user actually changed. A key that was empty before and is still\n * empty is skipped (the dialog simply could not pre-fill it); a key that had\n * a value and is now empty is kept so the backend clears it.\n */\n diffValues(initial, next) {\n const changed = {};\n for (const [key, value] of Object.entries(next)) {\n const before = initial[key];\n if (this.isEmptyValue(value) && this.isEmptyValue(before))\n continue;\n if (this.isSameValue(before, value))\n continue;\n changed[key] = value;\n }\n return changed;\n }\n isEmptyValue(value) {\n if (value == null || value === '')\n return true;\n if (Array.isArray(value))\n return value.length === 0;\n return false;\n }\n isSameValue(a, b) {\n if (a === b)\n return true;\n // Values arriving from the read endpoint are serialized; compare the\n // submit-shaped representation so \"5\" and 5 are not treated as a change.\n return this.toRawValue(a) === this.toRawValue(b);\n }\n // ============================================================================\n // Read endpoint — POST /api/fetch/query (Table projection)\n // ============================================================================\n fetchRows(levelId, levelDataId, moduleId, propertyKeys) {\n this.loading.set(true);\n this.errorMessage.set(null);\n const ctx = this.context();\n const body = {\n contextKey: `level:${levelId}/module:${moduleId}`,\n projection: 'Table',\n surfaceKey: 'table',\n propertyKeys,\n filters: [\n {\n key: 'levelDataId',\n operator: 'Equals',\n value: String(levelDataId),\n },\n ],\n page: 1,\n pageSize: 3000,\n };\n this.http\n .post('fetch/query', body, ctx ? { context: ctx } : {})\n .pipe(takeUntilDestroyed(this.destroyRef), finalize(() => this.loading.set(false)), catchError((err) => {\n console.error('EntityList fetch/query failed', err);\n this.errorMessage.set(this.transloco.translate('components.entityListField.loadFailed'));\n return of({});\n }))\n .subscribe((response) => {\n const payload = response && typeof response === 'object' && 'data' in response\n ? (response.data ?? response)\n : response;\n this.applyResponse(payload);\n });\n }\n applyResponse(response) {\n // Build property maps first so column defs can include the propertyKey\n // mapping (normalizedKey → catalog key) needed for row value lookup.\n const propertyByKey = new Map();\n const propertyByNormalizedKey = new Map();\n for (const property of response.catalog?.properties ?? []) {\n propertyByKey.set(property.key, property);\n propertyByNormalizedKey.set(property.normalizedKey, property);\n }\n const columns = (response.projectionMeta?.columns ?? [])\n .filter((column) => column.visible)\n .sort((a, b) => a.order - b.order)\n .map((column) => ({\n key: column.key,\n label: column.label,\n type: 'entity',\n sortable: !UNSORTABLE_ENTITY_VIEW_TYPES.has(column.viewType),\n viewType: column.viewType,\n order: column.order,\n visible: column.visible,\n configuration: column.configuration ?? null,\n // Store the catalog property key so buildRow can look up form values\n // keyed by property key (e.g. \"task_name\") rather than the\n // normalizedKey used as the column display key (e.g. \"Name\").\n propertyKey: propertyByNormalizedKey.get(column.key)?.key ?? column.key,\n }));\n this.columns.set(columns);\n // Reading blocked (access = Write / None): keep the columns, drop records.\n if (!this.canRead()) {\n this.rows.set([]);\n return;\n }\n const rows = (response.records ?? []).map((record) => {\n const values = {};\n const row = {\n Id: record.id,\n [ROW_ID_KEY]: `entity-${record.id}`,\n [ROW_ENTITY_ID_KEY]: record.id,\n };\n for (const column of columns) {\n const property = propertyByKey.get(column.key) ??\n propertyByNormalizedKey.get(column.key);\n const propertyKey = property?.key ?? column.key;\n const cell = record.values?.[propertyKey];\n row[column.key] = this.toEntityData(column, cell, property, record.id);\n // Keep the machine-readable value so the edit dialog can pre-fill and\n // partial updates can be diffed against it.\n values[propertyKey] = cell?.raw ?? cell?.value ?? null;\n }\n row[ROW_VALUES_KEY] = values;\n return row;\n });\n this.rows.set(rows);\n }\n toEntityData(column, cell, property, recordId) {\n return {\n id: recordId,\n propertyId: property?.id,\n key: property?.key ?? column.key,\n normalizedKey: property?.normalizedKey ?? column.key,\n name: column.label ?? property?.label ?? column.key,\n rawValue: cell?.raw === null || cell?.raw === undefined\n ? undefined\n : String(cell.raw),\n value: (cell?.value ?? ''),\n viewType: (column.viewType ?? 'Text'),\n type: property?.source,\n order: column.order ?? property?.order,\n configuration: column.configuration,\n propertyConfiguration: property?.configuration ?? undefined,\n comparison: cell?.comparison,\n };\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: EntityListField, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.2.8\", type: EntityListField, isStandalone: true, selector: \"mt-entity-list-field\", inputs: { label: { classPropertyName: \"label\", publicName: \"label\", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: \"readonly\", publicName: \"readonly\", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: \"required\", publicName: \"required\", isSignal: true, isRequired: false, transformFunction: null }, propertyId: { classPropertyName: \"propertyId\", publicName: \"propertyId\", isSignal: true, isRequired: false, transformFunction: null }, configuration: { classPropertyName: \"configuration\", publicName: \"configuration\", isSignal: true, isRequired: false, transformFunction: null }, runtimeContext: { classPropertyName: \"runtimeContext\", publicName: \"runtimeContext\", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: \"context\", publicName: \"context\", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: \"grid gap-1\" }, ngImport: i0, template: \"<div class=\\\"flex flex-col gap-2\\\">\\r\\n @if (label()) {\\r\\n <label class=\\\"font-medium text-color\\\">\\r\\n {{ label() }}\\r\\n @if (required()) {\\r\\n <span class=\\\"text-red-500\\\">*</span>\\r\\n }\\r\\n </label>\\r\\n }\\r\\n\\r\\n @if (errorMessage(); as err) {\\r\\n <p-message severity=\\\"error\\\" [text]=\\\"err\\\" styleClass=\\\"w-full\\\" />\\r\\n } @else if (canWrite()) {\\r\\n <div class=\\\"flex justify-end\\\">\\r\\n <mt-button\\r\\n [label]=\\\"'components.entityListField.add' | transloco\\\"\\r\\n icon=\\\"general.plus\\\"\\r\\n size=\\\"small\\\"\\r\\n [disabled]=\\\"disabled()\\\"\\r\\n (onClick)=\\\"openAddDialog()\\\"\\r\\n />\\r\\n </div>\\r\\n <mt-table\\r\\n [noCard]=\\\"true\\\"\\r\\n [data]=\\\"displayRows()\\\"\\r\\n [columns]=\\\"columns()\\\"\\r\\n [rowActions]=\\\"writeRowActions()\\\"\\r\\n dataKey=\\\"Id\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n />\\r\\n } @else if (!canRead()) {\\r\\n <div\\r\\n class=\\\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.entityListField.readingNotAllowed\\\" | transloco }}\\r\\n </div>\\r\\n } @else if (!hasRequiredContext()) {\\r\\n <div\\r\\n class=\\\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.entityListField.saveFormFirst\\\" | transloco }}\\r\\n </div>\\r\\n } @else if (loading() && !hasRows()) {\\r\\n <div class=\\\"flex flex-col gap-2\\\">\\r\\n <p-skeleton width=\\\"100%\\\" height=\\\"3rem\\\" />\\r\\n <p-skeleton width=\\\"100%\\\" height=\\\"3rem\\\" />\\r\\n </div>\\r\\n } @else if (!hasRows()) {\\r\\n <div\\r\\n class=\\\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.entityListField.noRelatedItems\\\" | transloco }}\\r\\n </div>\\r\\n } @else {\\r\\n <mt-table\\r\\n [noCard]=\\\"true\\\"\\r\\n [data]=\\\"displayRows()\\\"\\r\\n [columns]=\\\"columns()\\\"\\r\\n dataKey=\\\"Id\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n />\\r\\n }\\r\\n\\r\\n @if (ngControl?.control) {\\r\\n <mt-field-validation\\r\\n [control]=\\\"ngControl?.control!\\\"\\r\\n [touched]=\\\"ngControl?.touched ?? false\\\"\\r\\n />\\r\\n }\\r\\n</div>\\r\\n\", styles: [\":host{display:block}\\n\"], dependencies: [{ kind: \"ngmodule\", type: CommonModule }, { kind: \"component\", type: FieldValidation, selector: \"mt-field-validation\", inputs: [\"control\", \"touched\", \"messageId\"] }, { kind: \"component\", type: Skeleton, selector: \"p-skeleton\", inputs: [\"styleClass\", \"shape\", \"animation\", \"borderRadius\", \"size\", \"width\", \"height\"] }, { kind: \"component\", type: Message, selector: \"p-message\", inputs: [\"severity\", \"text\", \"escape\", \"style\", \"styleClass\", \"closable\", \"icon\", \"closeIcon\", \"life\", \"showTransitionOptions\", \"hideTransitionOptions\", \"size\", \"variant\", \"motionOptions\"], outputs: [\"onClose\"] }, { kind: \"component\", type: Table, selector: \"mt-table\", inputs: [\"filters\", \"data\", \"columns\", \"rowActions\", \"size\", \"showGridlines\", \"stripedRows\", \"selectableRows\", \"clickableRows\", \"generalSearch\", \"lazyLocalSearch\", \"showFilters\", \"filterMode\", \"loading\", \"updating\", \"lazy\", \"lazyLocalSort\", \"lazyTotalRecords\", \"reorderableColumns\", \"reorderableRows\", \"dataKey\", \"storageKey\", \"storageMode\", \"persistStateExclude\", \"exportable\", \"printable\", \"groupable\", \"groupCountMap\", \"cellClickFilter\", \"freezeActions\", \"virtualScroll\", \"virtualScrollItemSize\", \"scrollHeight\", \"printTitle\", \"exportFilename\", \"actionShape\", \"rowActionsLoadingFn\", \"tableLayout\", \"noCard\", \"tabs\", \"tabsOptionLabel\", \"tabsOptionValue\", \"activeTab\", \"actions\", \"emptyTitle\", \"emptyDescription\", \"emptyActionLabel\", \"emptyActionIcon\", \"paginatorPosition\", \"alwaysShowPaginator\", \"rowsPerPageOptions\", \"pageSize\", \"currentPage\", \"first\", \"filterTerm\", \"groupBy\", \"sortField\", \"sortDirection\"], outputs: [\"selectionChange\", \"cellChange\", \"lazyLoad\", \"columnReorder\", \"rowReorder\", \"rowClick\", \"emptyAction\", \"rowActionsRequested\", \"filtersChange\", \"activeTabChange\", \"onTabChange\", \"pageSizeChange\", \"currentPageChange\", \"firstChange\", \"filterTermChange\", \"groupByChange\", \"sortFieldChange\", \"sortDirectionChange\"] }, { kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\", \"ariaLabel\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }, { kind: \"pipe\", type: TranslocoPipe, name: \"transloco\" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: EntityListField, decorators: [{\n type: Component,\n args: [{ selector: 'mt-entity-list-field', standalone: true, imports: [\n CommonModule,\n FieldValidation,\n Skeleton,\n Message,\n Table,\n Button,\n TranslocoPipe,\n ], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'grid gap-1' }, template: \"<div class=\\\"flex flex-col gap-2\\\">\\r\\n @if (label()) {\\r\\n <label class=\\\"font-medium text-color\\\">\\r\\n {{ label() }}\\r\\n @if (required()) {\\r\\n <span class=\\\"text-red-500\\\">*</span>\\r\\n }\\r\\n </label>\\r\\n }\\r\\n\\r\\n @if (errorMessage(); as err) {\\r\\n <p-message severity=\\\"error\\\" [text]=\\\"err\\\" styleClass=\\\"w-full\\\" />\\r\\n } @else if (canWrite()) {\\r\\n <div class=\\\"flex justify-end\\\">\\r\\n <mt-button\\r\\n [label]=\\\"'components.entityListField.add' | transloco\\\"\\r\\n icon=\\\"general.plus\\\"\\r\\n size=\\\"small\\\"\\r\\n [disabled]=\\\"disabled()\\\"\\r\\n (onClick)=\\\"openAddDialog()\\\"\\r\\n />\\r\\n </div>\\r\\n <mt-table\\r\\n [noCard]=\\\"true\\\"\\r\\n [data]=\\\"displayRows()\\\"\\r\\n [columns]=\\\"columns()\\\"\\r\\n [rowActions]=\\\"writeRowActions()\\\"\\r\\n dataKey=\\\"Id\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n />\\r\\n } @else if (!canRead()) {\\r\\n <div\\r\\n class=\\\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.entityListField.readingNotAllowed\\\" | transloco }}\\r\\n </div>\\r\\n } @else if (!hasRequiredContext()) {\\r\\n <div\\r\\n class=\\\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.entityListField.saveFormFirst\\\" | transloco }}\\r\\n </div>\\r\\n } @else if (loading() && !hasRows()) {\\r\\n <div class=\\\"flex flex-col gap-2\\\">\\r\\n <p-skeleton width=\\\"100%\\\" height=\\\"3rem\\\" />\\r\\n <p-skeleton width=\\\"100%\\\" height=\\\"3rem\\\" />\\r\\n </div>\\r\\n } @else if (!hasRows()) {\\r\\n <div\\r\\n class=\\\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.entityListField.noRelatedItems\\\" | transloco }}\\r\\n </div>\\r\\n } @else {\\r\\n <mt-table\\r\\n [noCard]=\\\"true\\\"\\r\\n [data]=\\\"displayRows()\\\"\\r\\n [columns]=\\\"columns()\\\"\\r\\n dataKey=\\\"Id\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n />\\r\\n }\\r\\n\\r\\n @if (ngControl?.control) {\\r\\n <mt-field-validation\\r\\n [control]=\\\"ngControl?.control!\\\"\\r\\n [touched]=\\\"ngControl?.touched ?? false\\\"\\r\\n />\\r\\n }\\r\\n</div>\\r\\n\", styles: [\":host{display:block}\\n\"] }]\n }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: \"label\", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: \"readonly\", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: \"required\", required: false }] }], propertyId: [{ type: i0.Input, args: [{ isSignal: true, alias: \"propertyId\", required: false }] }], configuration: [{ type: i0.Input, args: [{ isSignal: true, alias: \"configuration\", required: false }] }], runtimeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: \"runtimeContext\", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: \"context\", required: false }] }] } });","originalLength":43146,"removedExports":[],"renderedExports":["EntityListField"],"renderedLength":42167},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-esm2022/business-fields/schedule-item-selector-field/schedule-item-selector-field.js":{"code":"/** Page size when loading the full deliverable list, and a hard safety cap. */\nconst PAGE_SIZE = 100;\nconst MAX_ITEMS = 5000;\n/**\n * Runtime picker for `ScheduleItemSelector` properties.\n *\n * Backend-filtered: the full option list comes from\n * `GET forms/options/{propertyKey}` (which applies the configured rule, e.g.\n * `DeliverableAcceptance.AvailableDeliverables`). All available items are\n * loaded up front and rendered with the standard `mt-select-field` /\n * `mt-multi-select-field`; the field shows only the item name.\n *\n * The control value is always a numeric id array (`valueMode = \"IdArray\"`).\n * In `Single` mode only one id may be selected.\n */\nclass ScheduleItemSelectorField {\n label = input('', ...(ngDevMode ? [{ debugName: \"label\" }] : /* istanbul ignore next */ []));\n placeholder = input('', ...(ngDevMode ? [{ debugName: \"placeholder\" }] : /* istanbul ignore next */ []));\n readonly = input(false, ...(ngDevMode ? [{ debugName: \"readonly\" }] : /* istanbul ignore next */ []));\n required = input(false, ...(ngDevMode ? [{ debugName: \"required\" }] : /* istanbul ignore next */ []));\n propertyKey = input('', ...(ngDevMode ? [{ debugName: \"propertyKey\" }] : /* istanbul ignore next */ []));\n selectionMode = input('Multi', ...(ngDevMode ? [{ debugName: \"selectionMode\" }] : /* istanbul ignore next */ []));\n runtimeContext = input(null, ...(ngDevMode ? [{ debugName: \"runtimeContext\" }] : /* istanbul ignore next */ []));\n context = input(undefined, ...(ngDevMode ? [{ debugName: \"context\" }] : /* istanbul ignore next */ []));\n /** Full list of available deliverables (loaded once). */\n options = signal([], ...(ngDevMode ? [{ debugName: \"options\" }] : /* istanbul ignore next */ []));\n loading = signal(false, ...(ngDevMode ? [{ debugName: \"loading\" }] : /* istanbul ignore next */ []));\n disabled = signal(false, ...(ngDevMode ? [{ debugName: \"disabled\" }] : /* istanbul ignore next */ []));\n /** Selected ids — the control value (`number[]`). */\n value = signal([], ...(ngDevMode ? [{ debugName: \"value\" }] : /* istanbul ignore next */ []));\n isMultiple = computed(() => this.selectionMode() !== 'Single', ...(ngDevMode ? [{ debugName: \"isMultiple\" }] : /* istanbul ignore next */ []));\n /** Single-mode ngModel value (a scalar id, not an array). */\n singleValue = computed(() => this.value()[0] ?? null, ...(ngDevMode ? [{ debugName: \"singleValue\" }] : /* istanbul ignore next */ []));\n ngControl = null;\n onTouched = () => { };\n onModelChange = () => { };\n http = inject(HttpClient);\n destroyRef = inject(DestroyRef);\n /** Query signature already loaded — prevents duplicate full loads. */\n loadedKey = null;\n constructor() {\n this.ngControl = inject(NgControl, { self: true, optional: true });\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n effect(() => {\n if (this.ngControl?.control && this.required()) {\n this.ngControl.control.addValidators(Validators.required);\n this.ngControl.control.updateValueAndValidity();\n }\n });\n // Load the full option list as soon as the query context is available.\n effect(() => {\n const key = this.queryKey();\n if (!key || this.loadedKey === key)\n return;\n untracked(() => this.loadAllOptions(key));\n });\n }\n // ── Selection ──────────────────────────────────────────────────────────\n onMultiChange(ids) {\n this.value.set(ids ?? []);\n this.emit();\n }\n onSingleChange(id) {\n this.value.set(id == null ? [] : [id]);\n this.emit();\n }\n // ── ControlValueAccessor ────────────────────────────────────────────────\n writeValue(value) {\n this.value.set(this.normalizeIds(value));\n }\n registerOnChange(fn) {\n this.onModelChange = fn;\n }\n registerOnTouched(fn) {\n this.onTouched = fn;\n }\n setDisabledState(disabled) {\n this.disabled.set(disabled);\n }\n // ── Option loading ──────────────────────────────────────────────────────\n loadAllOptions(key) {\n this.loadedKey = key;\n this.loading.set(true);\n this.fetchPage(0)\n .pipe(expand((page) => page.hasMore && page.nextSkip < MAX_ITEMS\n ? this.fetchPage(page.nextSkip)\n : EMPTY), reduce((acc, page) => acc.concat(page.options), []), takeUntilDestroyed(this.destroyRef), finalize(() => this.loading.set(false)), catchError(() => of([])))\n .subscribe((options) => this.options.set(options));\n }\n fetchPage(skip) {\n const params = this.buildParams(skip);\n if (!params) {\n return of({ options: [], hasMore: false, nextSkip: skip });\n }\n return this.http\n .get(`forms/options/${encodeURIComponent(this.propertyKey())}`, { params, context: this.context() })\n .pipe(map((response) => ({\n options: this.mapOptions(response),\n hasMore: !!response?.data?.hasMore,\n nextSkip: skip + PAGE_SIZE,\n })));\n }\n buildParams(skip) {\n const contextKey = this.buildContextKey();\n const levelDataId = this.runtimeContext()?.levelDataId;\n if (!contextKey || levelDataId == null)\n return null;\n let params = new HttpParams()\n .set('contextKey', contextKey)\n .set('levelDataId', String(levelDataId))\n .set('skip', String(skip))\n .set('take', String(PAGE_SIZE));\n const ownerRecordId = this.runtimeContext()?.ownerRecordId;\n if (ownerRecordId != null) {\n params = params.set('ownerRecordId', String(ownerRecordId));\n }\n return params;\n }\n mapOptions(response) {\n const items = response?.data?.items ?? [];\n return items\n .map((item) => {\n const id = Number(item.key);\n if (!Number.isFinite(id))\n return null;\n return { label: item.name || String(id), value: id };\n })\n .filter((option) => option != null);\n }\n // ── Context helpers ─────────────────────────────────────────────────────\n buildContextKey() {\n const levelId = this.runtimeContext()?.levelId;\n const moduleId = this.runtimeContext()?.moduleId;\n if (levelId == null || moduleId == null)\n return null;\n return `Level:${levelId}/Module:${moduleId}`;\n }\n queryKey() {\n const contextKey = this.buildContextKey();\n const levelDataId = this.runtimeContext()?.levelDataId;\n const propertyKey = this.propertyKey();\n if (!contextKey || levelDataId == null || !propertyKey)\n return null;\n const ownerRecordId = this.runtimeContext()?.ownerRecordId ?? '';\n return `${contextKey}|${levelDataId}|${ownerRecordId}|${propertyKey}`;\n }\n emit() {\n this.onModelChange(this.value());\n this.onTouched();\n }\n normalizeIds(value) {\n const raw = Array.isArray(value) ? value : value == null ? [] : [value];\n const ids = [];\n for (const entry of raw) {\n const id = entry && typeof entry === 'object'\n ? Number(entry.id)\n : Number(entry);\n if (Number.isFinite(id) && id > 0 && !ids.includes(id)) {\n ids.push(id);\n }\n }\n return ids;\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: ScheduleItemSelectorField, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.2.8\", type: ScheduleItemSelectorField, isStandalone: true, selector: \"mt-schedule-item-selector-field\", inputs: { label: { classPropertyName: \"label\", publicName: \"label\", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: \"placeholder\", publicName: \"placeholder\", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: \"readonly\", publicName: \"readonly\", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: \"required\", publicName: \"required\", isSignal: true, isRequired: false, transformFunction: null }, propertyKey: { classPropertyName: \"propertyKey\", publicName: \"propertyKey\", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: \"selectionMode\", publicName: \"selectionMode\", isSignal: true, isRequired: false, transformFunction: null }, runtimeContext: { classPropertyName: \"runtimeContext\", publicName: \"runtimeContext\", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: \"context\", publicName: \"context\", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: \"block\" }, ngImport: i0, template: \"@if (isMultiple()) {\\r\\n <mt-multi-select-field\\r\\n [label]=\\\"label()\\\"\\r\\n [placeholder]=\\\"placeholder()\\\"\\r\\n [options]=\\\"options()\\\"\\r\\n [optionLabel]=\\\"'label'\\\"\\r\\n [optionValue]=\\\"'value'\\\"\\r\\n [filter]=\\\"options().length > 10\\\"\\r\\n [showClear]=\\\"!required()\\\"\\r\\n [required]=\\\"required()\\\"\\r\\n [readonly]=\\\"readonly() || disabled()\\\"\\r\\n [ngModel]=\\\"value()\\\"\\r\\n [ngModelOptions]=\\\"{ standalone: true }\\\"\\r\\n (ngModelChange)=\\\"onMultiChange($event)\\\"\\r\\n />\\r\\n} @else {\\r\\n <mt-select-field\\r\\n [label]=\\\"label()\\\"\\r\\n [placeholder]=\\\"placeholder()\\\"\\r\\n [options]=\\\"options()\\\"\\r\\n [optionLabel]=\\\"'label'\\\"\\r\\n [optionValue]=\\\"'value'\\\"\\r\\n [filter]=\\\"options().length > 10\\\"\\r\\n [showClear]=\\\"!required()\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n [required]=\\\"required()\\\"\\r\\n [readonly]=\\\"readonly() || disabled()\\\"\\r\\n [ngModel]=\\\"singleValue()\\\"\\r\\n [ngModelOptions]=\\\"{ standalone: true }\\\"\\r\\n (ngModelChange)=\\\"onSingleChange($event)\\\"\\r\\n />\\r\\n}\\r\\n\", dependencies: [{ kind: \"ngmodule\", type: FormsModule }, { kind: \"directive\", type: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.RequiredValidator, selector: \":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]\", inputs: [\"required\"] }, { kind: \"directive\", type: i1.NgModel, selector: \"[ngModel]:not([formControlName]):not([formControl])\", inputs: [\"name\", \"disabled\", \"ngModel\", \"ngModelOptions\"], outputs: [\"ngModelChange\"], exportAs: [\"ngModel\"] }, { kind: \"component\", type: MultiSelectField, selector: \"mt-multi-select-field\", inputs: [\"field\", \"label\", \"placeholder\", \"class\", \"readonly\", \"pInputs\", \"options\", \"optionValue\", \"optionLabel\", \"filter\", \"filterBy\", \"dataKey\", \"showClear\", \"display\", \"required\", \"maxSelectedLabels\", \"group\", \"virtualScroll\", \"virtualScrollItemSize\", \"optionGroupLabel\", \"optionGroupChildren\", \"optionIcon\", \"optionIconColor\", \"optionIconShape\", \"optionAvatarShape\", \"optionGroupIcon\", \"optionGroupIconColor\", \"optionGroupIconShape\", \"optionGroupAvatarShape\"], outputs: [\"onChange\"] }, { kind: \"component\", type: SelectField, selector: \"mt-select-field\", inputs: [\"field\", \"hint\", \"label\", \"placeholder\", \"hasPlaceholderPrefix\", \"class\", \"readonly\", \"pInputs\", \"options\", \"optionValue\", \"optionLabel\", \"filter\", \"filterBy\", \"dataKey\", \"showClear\", \"clearAfterSelect\", \"required\", \"group\", \"size\", \"optionGroupLabel\", \"optionGroupChildren\", \"loading\", \"optionIcon\", \"optionIconColor\", \"optionIconShape\", \"optionAvatarShape\", \"optionGroupIcon\", \"optionGroupIconColor\", \"optionGroupIconShape\", \"optionGroupAvatarShape\", \"markCurrentUser\"], outputs: [\"onChange\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: ScheduleItemSelectorField, decorators: [{\n type: Component,\n args: [{ selector: 'mt-schedule-item-selector-field', standalone: true, imports: [FormsModule, MultiSelectField, SelectField], changeDetection: ChangeDetectionStrategy.OnPush, host: {\n class: 'block',\n }, template: \"@if (isMultiple()) {\\r\\n <mt-multi-select-field\\r\\n [label]=\\\"label()\\\"\\r\\n [placeholder]=\\\"placeholder()\\\"\\r\\n [options]=\\\"options()\\\"\\r\\n [optionLabel]=\\\"'label'\\\"\\r\\n [optionValue]=\\\"'value'\\\"\\r\\n [filter]=\\\"options().length > 10\\\"\\r\\n [showClear]=\\\"!required()\\\"\\r\\n [required]=\\\"required()\\\"\\r\\n [readonly]=\\\"readonly() || disabled()\\\"\\r\\n [ngModel]=\\\"value()\\\"\\r\\n [ngModelOptions]=\\\"{ standalone: true }\\\"\\r\\n (ngModelChange)=\\\"onMultiChange($event)\\\"\\r\\n />\\r\\n} @else {\\r\\n <mt-select-field\\r\\n [label]=\\\"label()\\\"\\r\\n [placeholder]=\\\"placeholder()\\\"\\r\\n [options]=\\\"options()\\\"\\r\\n [optionLabel]=\\\"'label'\\\"\\r\\n [optionValue]=\\\"'value'\\\"\\r\\n [filter]=\\\"options().length > 10\\\"\\r\\n [showClear]=\\\"!required()\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n [required]=\\\"required()\\\"\\r\\n [readonly]=\\\"readonly() || disabled()\\\"\\r\\n [ngModel]=\\\"singleValue()\\\"\\r\\n [ngModelOptions]=\\\"{ standalone: true }\\\"\\r\\n (ngModelChange)=\\\"onSingleChange($event)\\\"\\r\\n />\\r\\n}\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: \"label\", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: \"placeholder\", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: \"readonly\", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: \"required\", required: false }] }], propertyKey: [{ type: i0.Input, args: [{ isSignal: true, alias: \"propertyKey\", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: \"selectionMode\", required: false }] }], runtimeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: \"runtimeContext\", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: \"context\", required: false }] }] } });","originalLength":14838,"removedExports":[],"renderedExports":["ScheduleItemSelectorField"],"renderedLength":14145},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-esm2022/business-fields/lookup-module-check-list-field/lookup-module-check-list-form-token.js":{"code":"/**\n * Token used by `mt-lookup-module-check-list-field` to render the checklist\n * sections + per-section forms via `@masterteam/forms`'s `mt-client-form`\n * machinery (`/api/process-form-load`, loaded once). Apps register it with\n * `provideLookupModuleCheckListForm()` from\n * `@masterteam/forms/lookup-module-check-list-form`. When the token is not\n * registered, the field falls back to plain text inputs per property.\n */\nconst LOOKUP_CHECK_LIST_FORM_COMPONENT = new InjectionToken('LOOKUP_CHECK_LIST_FORM_COMPONENT');","originalLength":643,"removedExports":[],"renderedExports":["LOOKUP_CHECK_LIST_FORM_COMPONENT"],"renderedLength":524},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-esm2022/business-fields/lookup-module-check-list-field/lookup-module-check-list-field.js":{"code":"class LookupModuleCheckListField {\n label = input('', ...(ngDevMode ? [{ debugName: \"label\" }] : /* istanbul ignore next */ []));\n readonly = input(false, ...(ngDevMode ? [{ debugName: \"readonly\" }] : /* istanbul ignore next */ []));\n required = input(false, ...(ngDevMode ? [{ debugName: \"required\" }] : /* istanbul ignore next */ []));\n /** Lookup items rendered as collapsible checklist sections. */\n lookupOptions = input([], ...(ngDevMode ? [{ debugName: \"lookupOptions\" }] : /* istanbul ignore next */ []));\n /** Full lookup catalog passed to the rich nested form renderer. */\n lookups = input([], ...(ngDevMode ? [{ debugName: \"lookups\" }] : /* istanbul ignore next */ []));\n /** Module property keys/labels (used by the text fallback + labels). */\n propertyFields = input([], ...(ngDevMode ? [{ debugName: \"propertyFields\" }] : /* istanbul ignore next */ []));\n /** Scope module id whose form is loaded for each section. */\n scopeId = input(null, ...(ngDevMode ? [{ debugName: \"scopeId\" }] : /* istanbul ignore next */ []));\n /** Property keys to render in each section form. */\n propertyKeys = input([], ...(ngDevMode ? [{ debugName: \"propertyKeys\" }] : /* istanbul ignore next */ []));\n /** Runtime ids needed to load each section form. */\n runtimeContext = input(null, ...(ngDevMode ? [{ debugName: \"runtimeContext\" }] : /* istanbul ignore next */ []));\n /** Per-lookupKey captured values, keyed by property key. */\n sectionValues = signal({}, ...(ngDevMode ? [{ debugName: \"sectionValues\" }] : /* istanbul ignore next */ []));\n expandedKeys = signal(new Set(), ...(ngDevMode ? [{ debugName: \"expandedKeys\" }] : /* istanbul ignore next */ []));\n disabled = signal(false, ...(ngDevMode ? [{ debugName: \"disabled\" }] : /* istanbul ignore next */ []));\n /** True when a section's required inner fields are unfilled. */\n incomplete = signal(false, ...(ngDevMode ? [{ debugName: \"incomplete\" }] : /* istanbul ignore next */ []));\n ngControl = null;\n /**\n * Rich checklist form provided by `@masterteam/forms`\n * (`provideLookupModuleCheckListForm()`). When absent the field falls back to\n * plain text inputs per property.\n */\n formComponent = inject(LOOKUP_CHECK_LIST_FORM_COMPONENT, {\n optional: true,\n });\n isReadonly = computed(() => this.readonly() || this.disabled(), ...(ngDevMode ? [{ debugName: \"isReadonly\" }] : /* istanbul ignore next */ []));\n sections = computed(() => this.lookupOptions().map((option) => ({\n lookupKey: String(option.value ?? option.key ?? ''),\n label: option.label ?? String(option.value ?? option.key ?? ''),\n })), ...(ngDevMode ? [{ debugName: \"sections\" }] : /* istanbul ignore next */ []));\n /**\n * Use the rich form whenever it's registered and a scope module is set. The\n * scope form only needs `scopeId` to load its field definitions; `levelId` /\n * `levelDataId` are passed when available but are not required (e.g. they are\n * null while creating a brand-new Level instance).\n */\n useRichForm = computed(() => !!this.formComponent && this.scopeId() != null, ...(ngDevMode ? [{ debugName: \"useRichForm\" }] : /* istanbul ignore next */ []));\n /**\n * The last externally-written value (via `writeValue`). Passed to the rich\n * form as its initial value. It is intentionally NOT updated from the form's\n * own `valueChange` — feeding emitted values back as an input would create an\n * infinite change-detection loop.\n */\n incomingValue = signal(null, ...(ngDevMode ? [{ debugName: \"incomingValue\" }] : /* istanbul ignore next */ []));\n onTouched = () => { };\n onModelChange = () => { };\n control = null;\n validatorAttached = false;\n /**\n * Validator attached imperatively to the host control. Attaching it here\n * (rather than via an `NG_VALIDATORS` provider) avoids a circular dependency\n * with the self-injected `NgControl` used as the value accessor.\n */\n checklistValidator = () => this.incomplete() ? { checklistIncomplete: true } : null;\n /** Stable callbacks so the outlet inputs object stays referentially calm. */\n emitValue = (value) => {\n // The rich form is the source of truth; forward its value without writing\n // back into `incomingValue` (which would re-feed the form and loop).\n this.onModelChange(value ?? null);\n this.onTouched();\n };\n emitValidity = (invalid) => {\n if (this.incomplete() === invalid)\n return;\n this.incomplete.set(invalid);\n this.ensureValidator();\n this.control?.updateValueAndValidity({ emitEvent: false });\n };\n constructor() {\n this.ngControl = inject(NgControl, { self: true, optional: true });\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n ngOnInit() {\n this.ensureValidator();\n this.control?.updateValueAndValidity({ emitEvent: false });\n }\n ensureValidator() {\n if (this.validatorAttached)\n return;\n const control = this.ngControl?.control;\n if (!control)\n return;\n this.control = control;\n control.addValidators(this.checklistValidator);\n this.validatorAttached = true;\n }\n // ============================================================================\n // CVA\n // ============================================================================\n writeValue(value) {\n this.incomingValue.set(value);\n this.sectionValues.set(this.normalizeIncoming(value));\n }\n registerOnChange(fn) {\n this.onModelChange = fn;\n }\n registerOnTouched(fn) {\n this.onTouched = fn;\n }\n setDisabledState(isDisabled) {\n this.disabled.set(isDisabled);\n }\n // ============================================================================\n // Rich form host\n // ============================================================================\n formInputs = computed(() => ({\n lookupOptions: this.lookupOptions(),\n lookups: this.lookups(),\n propertyKeys: this.propertyKeys(),\n moduleId: this.scopeId(),\n levelId: this.runtimeContext()?.levelId ?? null,\n levelDataId: this.runtimeContext()?.levelDataId ?? null,\n value: this.incomingValue(),\n readonly: this.isReadonly(),\n valueChange: this.emitValue,\n validityChange: this.emitValidity,\n }), ...(ngDevMode ? [{ debugName: \"formInputs\" }] : /* istanbul ignore next */ []));\n // ============================================================================\n // Text fallback (no rich form registered)\n // ============================================================================\n isExpanded(lookupKey) {\n return this.expandedKeys().has(lookupKey);\n }\n toggle(lookupKey) {\n const next = new Set(this.expandedKeys());\n if (next.has(lookupKey)) {\n next.delete(lookupKey);\n }\n else {\n next.add(lookupKey);\n }\n this.expandedKeys.set(next);\n }\n hasValues(lookupKey) {\n const values = this.sectionValues()[lookupKey];\n if (!values)\n return false;\n return Object.values(values).some((v) => v != null && v !== '');\n }\n fieldValue(lookupKey, propKey) {\n const raw = this.sectionValues()[lookupKey]?.[propKey];\n return raw == null ? '' : String(raw);\n }\n setFieldValue(lookupKey, propKey, value) {\n this.sectionValues.update((current) => ({\n ...current,\n [lookupKey]: { ...(current[lookupKey] ?? {}), [propKey]: value },\n }));\n this.pushModelValue();\n }\n // ============================================================================\n // Value mapping\n // ============================================================================\n pushModelValue() {\n const payload = this.buildPayload();\n this.onModelChange(payload.length ? payload : null);\n this.onTouched();\n }\n buildPayload() {\n const keys = this.propertyKeys();\n const values = this.sectionValues();\n return this.sections()\n .filter((section) => this.hasValues(section.lookupKey))\n .map((section) => ({\n lookupKey: section.lookupKey,\n props: keys.map((key) => ({\n key,\n value: values[section.lookupKey]?.[key] ?? null,\n })),\n }));\n }\n normalizeIncoming(value) {\n const raw = this.extractEntries(value);\n const result = {};\n for (const entry of raw) {\n if (!entry || typeof entry !== 'object')\n continue;\n const record = entry;\n const lookupKeyRaw = record['lookupKey'] ?? record['Lookupkey'] ?? record['lookupkey'];\n const lookupKey = lookupKeyRaw == null ? '' : String(lookupKeyRaw);\n if (!lookupKey)\n continue;\n const propsRaw = record['props'] ?? record['Props'];\n const values = {};\n if (Array.isArray(propsRaw)) {\n for (const prop of propsRaw) {\n const propRecord = (prop ?? {});\n const key = String(propRecord['key'] ?? propRecord['Key'] ?? '');\n if (!key)\n continue;\n values[key] = propRecord['value'] ?? propRecord['Value'] ?? null;\n }\n }\n result[lookupKey] = values;\n }\n return result;\n }\n extractEntries(value) {\n if (Array.isArray(value)) {\n return value;\n }\n const wrapped = value?.items;\n if (Array.isArray(wrapped)) {\n return wrapped;\n }\n if (typeof value === 'string' && value.trim()) {\n try {\n return this.extractEntries(JSON.parse(value));\n }\n catch {\n return [];\n }\n }\n return [];\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: LookupModuleCheckListField, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.2.8\", type: LookupModuleCheckListField, isStandalone: true, selector: \"mt-lookup-module-check-list-field\", inputs: { label: { classPropertyName: \"label\", publicName: \"label\", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: \"readonly\", publicName: \"readonly\", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: \"required\", publicName: \"required\", isSignal: true, isRequired: false, transformFunction: null }, lookupOptions: { classPropertyName: \"lookupOptions\", publicName: \"lookupOptions\", isSignal: true, isRequired: false, transformFunction: null }, lookups: { classPropertyName: \"lookups\", publicName: \"lookups\", isSignal: true, isRequired: false, transformFunction: null }, propertyFields: { classPropertyName: \"propertyFields\", publicName: \"propertyFields\", isSignal: true, isRequired: false, transformFunction: null }, scopeId: { classPropertyName: \"scopeId\", publicName: \"scopeId\", isSignal: true, isRequired: false, transformFunction: null }, propertyKeys: { classPropertyName: \"propertyKeys\", publicName: \"propertyKeys\", isSignal: true, isRequired: false, transformFunction: null }, runtimeContext: { classPropertyName: \"runtimeContext\", publicName: \"runtimeContext\", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: \"grid gap-2\" }, ngImport: i0, template: \"<div class=\\\"flex flex-col gap-2\\\">\\r\\n @if (label()) {\\r\\n <label class=\\\"font-medium text-color\\\">\\r\\n {{ label() }}\\r\\n @if (required()) {\\r\\n <span class=\\\"text-red-500\\\">*</span>\\r\\n }\\r\\n </label>\\r\\n }\\r\\n\\r\\n @if (useRichForm()) {\\r\\n <ng-container\\r\\n [ngComponentOutlet]=\\\"formComponent!\\\"\\r\\n [ngComponentOutletInputs]=\\\"formInputs()\\\"\\r\\n />\\r\\n } @else if (sections().length) {\\r\\n <!-- Fallback: plain text inputs per property (no rich form registered) -->\\r\\n <div class=\\\"flex flex-col gap-2\\\">\\r\\n @for (section of sections(); track section.lookupKey) {\\r\\n <div class=\\\"overflow-hidden rounded-lg border border-surface-200\\\">\\r\\n <button\\r\\n type=\\\"button\\\"\\r\\n class=\\\"flex w-full cursor-pointer items-center justify-between gap-2 bg-surface-50 px-3 py-2 text-start hover:bg-surface-100\\\"\\r\\n [attr.aria-expanded]=\\\"isExpanded(section.lookupKey)\\\"\\r\\n (click)=\\\"toggle(section.lookupKey)\\\"\\r\\n >\\r\\n <span class=\\\"flex min-w-0 items-center gap-2\\\">\\r\\n <mt-icon\\r\\n [icon]=\\\"\\r\\n isExpanded(section.lookupKey)\\r\\n ? 'arrow.chevron-down'\\r\\n : 'arrow.chevron-right'\\r\\n \\\"\\r\\n size=\\\"sm\\\"\\r\\n class=\\\"shrink-0 text-muted-color rtl:-scale-x-100\\\"\\r\\n />\\r\\n <span class=\\\"truncate text-sm font-medium text-color\\\">\\r\\n {{ section.label }}\\r\\n </span>\\r\\n </span>\\r\\n @if (hasValues(section.lookupKey)) {\\r\\n <span\\r\\n class=\\\"shrink-0 rounded-full bg-primary-50 px-2 py-0.5 text-xs font-semibold text-primary-700\\\"\\r\\n >\\r\\n {{ \\\"components.lookupModuleCheckListField.filled\\\" | transloco }}\\r\\n </span>\\r\\n }\\r\\n </button>\\r\\n\\r\\n @if (isExpanded(section.lookupKey) && propertyFields().length) {\\r\\n <div class=\\\"border-t border-surface-200 p-3\\\">\\r\\n <div class=\\\"grid grid-cols-1 gap-3 sm:grid-cols-2\\\">\\r\\n @for (field of propertyFields(); track field.key) {\\r\\n <label class=\\\"flex min-w-0 flex-col gap-1\\\">\\r\\n <span class=\\\"truncate text-xs text-muted-color\\\">\\r\\n {{ field.label }}\\r\\n </span>\\r\\n @if (isReadonly()) {\\r\\n <span class=\\\"truncate text-sm text-color\\\">\\r\\n {{ fieldValue(section.lookupKey, field.key) || \\\"_\\\" }}\\r\\n </span>\\r\\n } @else {\\r\\n <input\\r\\n pInputText\\r\\n class=\\\"w-full\\\"\\r\\n [ngModel]=\\\"fieldValue(section.lookupKey, field.key)\\\"\\r\\n [ngModelOptions]=\\\"{ standalone: true }\\\"\\r\\n (ngModelChange)=\\\"\\r\\n setFieldValue(section.lookupKey, field.key, $event)\\r\\n \\\"\\r\\n />\\r\\n }\\r\\n </label>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n } @else {\\r\\n <div\\r\\n class=\\\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.lookupModuleCheckListField.empty\\\" | transloco }}\\r\\n </div>\\r\\n }\\r\\n\\r\\n @if (ngControl?.control) {\\r\\n <mt-field-validation\\r\\n [control]=\\\"ngControl?.control!\\\"\\r\\n [touched]=\\\"ngControl?.touched ?? false\\\"\\r\\n />\\r\\n }\\r\\n</div>\\r\\n\", dependencies: [{ kind: \"ngmodule\", type: FormsModule }, { kind: \"directive\", type: i1.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: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.NgModel, selector: \"[ngModel]:not([formControlName]):not([formControl])\", inputs: [\"name\", \"disabled\", \"ngModel\", \"ngModelOptions\"], outputs: [\"ngModelChange\"], exportAs: [\"ngModel\"] }, { kind: \"directive\", type: NgComponentOutlet, selector: \"[ngComponentOutlet]\", inputs: [\"ngComponentOutlet\", \"ngComponentOutletInputs\", \"ngComponentOutletInjector\", \"ngComponentOutletEnvironmentInjector\", \"ngComponentOutletContent\", \"ngComponentOutletNgModule\"], exportAs: [\"ngComponentOutlet\"] }, { kind: \"ngmodule\", type: InputTextModule }, { kind: \"directive\", type: i2$1.InputText, selector: \"[pInputText]\", inputs: [\"hostName\", \"ptInputText\", \"pInputTextPT\", \"pInputTextUnstyled\", \"pSize\", \"variant\", \"fluid\", \"invalid\"] }, { kind: \"component\", type: Icon, selector: \"mt-icon\", inputs: [\"icon\"] }, { kind: \"component\", type: FieldValidation, selector: \"mt-field-validation\", inputs: [\"control\", \"touched\", \"messageId\"] }, { kind: \"pipe\", type: TranslocoPipe, name: \"transloco\" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: LookupModuleCheckListField, decorators: [{\n type: Component,\n args: [{ selector: 'mt-lookup-module-check-list-field', standalone: true, imports: [\n FormsModule,\n NgComponentOutlet,\n InputTextModule,\n Icon,\n FieldValidation,\n TranslocoPipe,\n ], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'grid gap-2' }, template: \"<div class=\\\"flex flex-col gap-2\\\">\\r\\n @if (label()) {\\r\\n <label class=\\\"font-medium text-color\\\">\\r\\n {{ label() }}\\r\\n @if (required()) {\\r\\n <span class=\\\"text-red-500\\\">*</span>\\r\\n }\\r\\n </label>\\r\\n }\\r\\n\\r\\n @if (useRichForm()) {\\r\\n <ng-container\\r\\n [ngComponentOutlet]=\\\"formComponent!\\\"\\r\\n [ngComponentOutletInputs]=\\\"formInputs()\\\"\\r\\n />\\r\\n } @else if (sections().length) {\\r\\n <!-- Fallback: plain text inputs per property (no rich form registered) -->\\r\\n <div class=\\\"flex flex-col gap-2\\\">\\r\\n @for (section of sections(); track section.lookupKey) {\\r\\n <div class=\\\"overflow-hidden rounded-lg border border-surface-200\\\">\\r\\n <button\\r\\n type=\\\"button\\\"\\r\\n class=\\\"flex w-full cursor-pointer items-center justify-between gap-2 bg-surface-50 px-3 py-2 text-start hover:bg-surface-100\\\"\\r\\n [attr.aria-expanded]=\\\"isExpanded(section.lookupKey)\\\"\\r\\n (click)=\\\"toggle(section.lookupKey)\\\"\\r\\n >\\r\\n <span class=\\\"flex min-w-0 items-center gap-2\\\">\\r\\n <mt-icon\\r\\n [icon]=\\\"\\r\\n isExpanded(section.lookupKey)\\r\\n ? 'arrow.chevron-down'\\r\\n : 'arrow.chevron-right'\\r\\n \\\"\\r\\n size=\\\"sm\\\"\\r\\n class=\\\"shrink-0 text-muted-color rtl:-scale-x-100\\\"\\r\\n />\\r\\n <span class=\\\"truncate text-sm font-medium text-color\\\">\\r\\n {{ section.label }}\\r\\n </span>\\r\\n </span>\\r\\n @if (hasValues(section.lookupKey)) {\\r\\n <span\\r\\n class=\\\"shrink-0 rounded-full bg-primary-50 px-2 py-0.5 text-xs font-semibold text-primary-700\\\"\\r\\n >\\r\\n {{ \\\"components.lookupModuleCheckListField.filled\\\" | transloco }}\\r\\n </span>\\r\\n }\\r\\n </button>\\r\\n\\r\\n @if (isExpanded(section.lookupKey) && propertyFields().length) {\\r\\n <div class=\\\"border-t border-surface-200 p-3\\\">\\r\\n <div class=\\\"grid grid-cols-1 gap-3 sm:grid-cols-2\\\">\\r\\n @for (field of propertyFields(); track field.key) {\\r\\n <label class=\\\"flex min-w-0 flex-col gap-1\\\">\\r\\n <span class=\\\"truncate text-xs text-muted-color\\\">\\r\\n {{ field.label }}\\r\\n </span>\\r\\n @if (isReadonly()) {\\r\\n <span class=\\\"truncate text-sm text-color\\\">\\r\\n {{ fieldValue(section.lookupKey, field.key) || \\\"_\\\" }}\\r\\n </span>\\r\\n } @else {\\r\\n <input\\r\\n pInputText\\r\\n class=\\\"w-full\\\"\\r\\n [ngModel]=\\\"fieldValue(section.lookupKey, field.key)\\\"\\r\\n [ngModelOptions]=\\\"{ standalone: true }\\\"\\r\\n (ngModelChange)=\\\"\\r\\n setFieldValue(section.lookupKey, field.key, $event)\\r\\n \\\"\\r\\n />\\r\\n }\\r\\n </label>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n } @else {\\r\\n <div\\r\\n class=\\\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.lookupModuleCheckListField.empty\\\" | transloco }}\\r\\n </div>\\r\\n }\\r\\n\\r\\n @if (ngControl?.control) {\\r\\n <mt-field-validation\\r\\n [control]=\\\"ngControl?.control!\\\"\\r\\n [touched]=\\\"ngControl?.touched ?? false\\\"\\r\\n />\\r\\n }\\r\\n</div>\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: \"label\", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: \"readonly\", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: \"required\", required: false }] }], lookupOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: \"lookupOptions\", required: false }] }], lookups: [{ type: i0.Input, args: [{ isSignal: true, alias: \"lookups\", required: false }] }], propertyFields: [{ type: i0.Input, args: [{ isSignal: true, alias: \"propertyFields\", required: false }] }], scopeId: [{ type: i0.Input, args: [{ isSignal: true, alias: \"scopeId\", required: false }] }], propertyKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: \"propertyKeys\", required: false }] }], runtimeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: \"runtimeContext\", required: false }] }] } });","originalLength":23084,"removedExports":[],"renderedExports":["LookupModuleCheckListField"],"renderedLength":22378},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/components/tmp-esm2022/business-fields/public-api.js":{"code":"","originalLength":595,"removedExports":[],"renderedExports":[],"renderedLength":0},"C:\\Users\\ABDULLAH WISHAH\\Documents\\GitHub\\components\\dist\\masterteam\\components\\tmp-esm2022\\business-fields\\masterteam-components-business-fields.js":{"code":"/**\n * Generated bundle index. Do not edit.\n */","originalLength":143,"removedExports":[],"renderedExports":[],"renderedLength":47}},"referencedFiles":[],"code":"import { CommonModule, NgComponentOutlet } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { input, inject, DestroyRef, signal, computed, ChangeDetectionStrategy, Component, effect, untracked, viewChild, linkedSignal, InjectionToken } from '@angular/core';\nimport { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';\nimport * as i1 from '@angular/forms';\nimport { ControlContainer, NgControl, FormsModule, Validators } from '@angular/forms';\nimport * as i2 from '@jsverse/transloco';\nimport { TranslocoService, TranslocoModule, TranslocoPipe } from '@jsverse/transloco';\nimport { startWith, finalize, catchError, of, take, expand, EMPTY, reduce, map } from 'rxjs';\nimport { Tooltip } from '@masterteam/components/tooltip';\nimport { Icon } from '@masterteam/icons';\nimport { SelectField } from '@masterteam/components/select-field';\nimport { MultiSelectField } from '@masterteam/components/multi-select-field';\nimport { FieldValidation } from '@masterteam/components/field-validation';\nimport { HttpClient, HttpParams } from '@angular/common/http';\nimport { Button } from '@masterteam/components/button';\nimport { NumberField } from '@masterteam/components/number-field';\nimport { Table } from '@masterteam/components/table';\nimport { nextFieldId, resolveFieldId } from '@masterteam/components';\nimport { Skeleton } from 'primeng/skeleton';\nimport { Message } from 'primeng/message';\nimport { ModalService } from '@masterteam/components/modal';\nimport * as i2$1 from 'primeng/inputtext';\nimport { InputTextModule } from 'primeng/inputtext';\n\nclass LookupMatrixField {\n config = input.required(...(ngDevMode ? [{ debugName: \"config\" }] : /* istanbul ignore next */ []));\n controlContainer = inject(ControlContainer, {\n optional: true,\n });\n destroyRef = inject(DestroyRef);\n transloco = inject(TranslocoService);\n valueVersion = signal(0, ...(ngDevMode ? [{ debugName: \"valueVersion\" }] : /* istanbul ignore next */ []));\n subscribedControl = null;\n hasYAxis = computed(() => !!this.config().yFieldKey, ...(ngDevMode ? [{ debugName: \"hasYAxis\" }] : /* istanbul ignore next */ []));\n xOptions = computed(() => this.config().xOptions ?? [], ...(ngDevMode ? [{ debugName: \"xOptions\" }] : /* istanbul ignore next */ []));\n yOptions = computed(() => this.config().yOptions ?? [], ...(ngDevMode ? [{ debugName: \"yOptions\" }] : /* istanbul ignore next */ []));\n hasMatrix = computed(() => this.config().cells.length > 0, ...(ngDevMode ? [{ debugName: \"hasMatrix\" }] : /* istanbul ignore next */ []));\n cellMap = computed(() => new Map(this.config().cells.map((cell) => [\n this.cellKey(cell.xLookupItemId, cell.yLookupItemId),\n cell,\n ])), ...(ngDevMode ? [{ debugName: \"cellMap\" }] : /* istanbul ignore next */ []));\n selectedXOption = computed(() => {\n this.valueVersion();\n return this.resolveSelectedOption(this.xOptions(), this.getControlValue(this.config().xFieldKey));\n }, ...(ngDevMode ? [{ debugName: \"selectedXOption\" }] : /* istanbul ignore next */ []));\n selectedYOption = computed(() => {\n this.valueVersion();\n const yFieldKey = this.config().yFieldKey;\n if (!yFieldKey) {\n return null;\n }\n return this.resolveSelectedOption(this.yOptions(), this.getControlValue(yFieldKey));\n }, ...(ngDevMode ? [{ debugName: \"selectedYOption\" }] : /* istanbul ignore next */ []));\n activeCell = computed(() => {\n const selectedX = this.selectedXOption();\n if (!selectedX) {\n return null;\n }\n if (!this.hasYAxis()) {\n return this.getCell(selectedX.id ?? selectedX.value);\n }\n const selectedY = this.selectedYOption();\n if (!selectedY) {\n return null;\n }\n return this.getCell(selectedX.id ?? selectedX.value, selectedY.id ?? selectedY.value);\n }, ...(ngDevMode ? [{ debugName: \"activeCell\" }] : /* istanbul ignore next */ []));\n selectionSummary = computed(() => {\n const parts = [];\n const xAxisLabel = this.config().xAxisLabel.trim() ||\n this.transloco.translate('components.lookupMatrixField.xAxisFallback');\n const selectedX = this.selectedXOption();\n if (selectedX) {\n parts.push(`${xAxisLabel}: ${selectedX.label}`);\n }\n const selectedY = this.selectedYOption();\n const yAxisLabel = this.config().yAxisLabel?.trim() ||\n this.transloco.translate('components.lookupMatrixField.yAxisFallback');\n if (selectedY && this.hasYAxis()) {\n parts.push(`${yAxisLabel}: ${selectedY.label}`);\n }\n return parts.join(' / ');\n }, ...(ngDevMode ? [{ debugName: \"selectionSummary\" }] : /* istanbul ignore next */ []));\n pendingMessage = computed(() => {\n const xAxisLabel = this.config().xAxisLabel.trim() ||\n this.transloco.translate('components.lookupMatrixField.firstValueFallback');\n if (!this.hasYAxis()) {\n return this.transloco.translate('components.lookupMatrixField.selectXAxisFirst', { xAxisLabel });\n }\n const yAxisLabel = this.config().yAxisLabel?.trim() ||\n this.transloco.translate('components.lookupMatrixField.secondValueFallback');\n return this.transloco.translate('components.lookupMatrixField.selectAxesFirst', { xAxisLabel, yAxisLabel });\n }, ...(ngDevMode ? [{ debugName: \"pendingMessage\" }] : /* istanbul ignore next */ []));\n missingResultMessage = computed(() => {\n if (!this.selectedXOption()) {\n return this.pendingMessage();\n }\n if (this.hasYAxis() && !this.selectedYOption()) {\n return this.pendingMessage();\n }\n return this.transloco.translate('components.lookupMatrixField.noMatchingValue');\n }, ...(ngDevMode ? [{ debugName: \"missingResultMessage\" }] : /* istanbul ignore next */ []));\n ngAfterViewInit() {\n this.ensureControlSubscription();\n }\n getCell(xLookupItemId, yLookupItemId) {\n return (this.cellMap().get(this.cellKey(xLookupItemId, yLookupItemId)) ?? null);\n }\n getSwatchColor(color) {\n return this.resolveColor(color);\n }\n getControlValue(path) {\n if (!path)\n return null;\n return this.controlContainer?.control?.get(path)?.value ?? null;\n }\n ensureControlSubscription() {\n const control = this.controlContainer?.control;\n if (!control || control === this.subscribedControl) {\n return;\n }\n this.subscribedControl = control;\n control.valueChanges\n .pipe(startWith(control.getRawValue()), takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.valueVersion.update((value) => value + 1);\n });\n }\n resolveSelectedOption(options, rawValue) {\n if (rawValue == null || rawValue === '')\n return null;\n return (options.find((option) => this.optionMatchesValue(option, rawValue)) ??\n null);\n }\n optionMatchesValue(option, rawValue) {\n return [option.value, option.key, option.id].some((candidate) => candidate != null && String(candidate) === String(rawValue));\n }\n cellKey(xLookupItemId, yLookupItemId) {\n return `${String(xLookupItemId)}::${String(yLookupItemId ?? '')}`;\n }\n resolveColor(color) {\n if (!color)\n return null;\n if (color.startsWith('#') ||\n color.startsWith('rgb') ||\n color.startsWith('hsl') ||\n color.startsWith('var(')) {\n return color;\n }\n return `var(--p-${color}-500)`;\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: LookupMatrixField, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.2.8\", type: LookupMatrixField, isStandalone: true, selector: \"mt-lookup-matrix-field\", inputs: { config: { classPropertyName: \"config\", publicName: \"config\", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: \"grid gap-2\" }, ngImport: i0, template: \"@if (config().label) {\\r\\n <label class=\\\"font-medium text-color\\\">\\r\\n {{ config().label }}\\r\\n </label>\\r\\n}\\r\\n\\r\\n<div\\r\\n class=\\\"rounded-lg border border-surface-200 bg-surface-50 px-3 flex items-center\\\"\\r\\n>\\r\\n @if (activeCell(); as cell) {\\r\\n <div class=\\\"flex flex-1 min-h-6 items-center gap-2 justify-between\\\">\\r\\n <span\\r\\n class=\\\"h-6 w-2 shrink-0 rounded-[2px] border border-surface-200\\\"\\r\\n [style.background-color]=\\\"getSwatchColor(cell.color)\\\"\\r\\n [style.border-color]=\\\"getSwatchColor(cell.color)\\\"\\r\\n ></span>\\r\\n\\r\\n <div class=\\\"min-w-0 flex-1 py-2 flex items-center justify-between\\\">\\r\\n <div class=\\\"truncate font-semibold text-gray-500\\\">\\r\\n {{ cell.label }}\\r\\n </div>\\r\\n\\r\\n @if (selectionSummary()) {\\r\\n <div class=\\\"font-bold text-gray-500\\\">\\r\\n <mt-icon\\r\\n [mtTooltip]=\\\"selectionSummary()\\\"\\r\\n icon=\\\"general.info-circle\\\"\\r\\n />\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n } @else {\\r\\n <div class=\\\"flex min-h-6 items-center text-muted-color py-2\\\">\\r\\n {{ hasMatrix() ? missingResultMessage() : config().emptyMessage }}\\r\\n </div>\\r\\n }\\r\\n</div>\\r\\n\", dependencies: [{ kind: \"ngmodule\", type: CommonModule }, { kind: \"directive\", type: Tooltip, selector: \"[mtTooltip]\" }, { kind: \"component\", type: Icon, selector: \"mt-icon\", inputs: [\"icon\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: LookupMatrixField, decorators: [{\n type: Component,\n args: [{ selector: 'mt-lookup-matrix-field', standalone: true, imports: [CommonModule, Tooltip, Icon], changeDetection: ChangeDetectionStrategy.OnPush, host: {\n class: 'grid gap-2',\n }, template: \"@if (config().label) {\\r\\n <label class=\\\"font-medium text-color\\\">\\r\\n {{ config().label }}\\r\\n </label>\\r\\n}\\r\\n\\r\\n<div\\r\\n class=\\\"rounded-lg border border-surface-200 bg-surface-50 px-3 flex items-center\\\"\\r\\n>\\r\\n @if (activeCell(); as cell) {\\r\\n <div class=\\\"flex flex-1 min-h-6 items-center gap-2 justify-between\\\">\\r\\n <span\\r\\n class=\\\"h-6 w-2 shrink-0 rounded-[2px] border border-surface-200\\\"\\r\\n [style.background-color]=\\\"getSwatchColor(cell.color)\\\"\\r\\n [style.border-color]=\\\"getSwatchColor(cell.color)\\\"\\r\\n ></span>\\r\\n\\r\\n <div class=\\\"min-w-0 flex-1 py-2 flex items-center justify-between\\\">\\r\\n <div class=\\\"truncate font-semibold text-gray-500\\\">\\r\\n {{ cell.label }}\\r\\n </div>\\r\\n\\r\\n @if (selectionSummary()) {\\r\\n <div class=\\\"font-bold text-gray-500\\\">\\r\\n <mt-icon\\r\\n [mtTooltip]=\\\"selectionSummary()\\\"\\r\\n icon=\\\"general.info-circle\\\"\\r\\n />\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n } @else {\\r\\n <div class=\\\"flex min-h-6 items-center text-muted-color py-2\\\">\\r\\n {{ hasMatrix() ? missingResultMessage() : config().emptyMessage }}\\r\\n </div>\\r\\n }\\r\\n</div>\\r\\n\" }]\n }], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: \"config\", required: true }] }] } });\n\nclass SchemaConnectionField {\n // ============================================================================\n // Inputs\n // ============================================================================\n label = input('', ...(ngDevMode ? [{ debugName: \"label\" }] : /* istanbul ignore next */ []));\n placeholder = input('', ...(ngDevMode ? [{ debugName: \"placeholder\" }] : /* istanbul ignore next */ []));\n readonly = input(false, ...(ngDevMode ? [{ debugName: \"readonly\" }] : /* istanbul ignore next */ []));\n required = input(false, ...(ngDevMode ? [{ debugName: \"required\" }] : /* istanbul ignore next */ []));\n filter = input(true, ...(ngDevMode ? [{ debugName: \"filter\" }] : /* istanbul ignore next */ []));\n /**\n * Full connection configuration object from the API.\n * Includes `targetLevelId`, `sourceLevels[]`, `payloadTemplate`, etc.\n */\n configuration = input.required(...(ngDevMode ? [{ debugName: \"configuration\" }] : /* istanbul ignore next */ []));\n /**\n * Optional HttpContext for API requests (e.g. to set base URL behavior).\n */\n context = input(undefined, ...(ngDevMode ? [{ debugName: \"context\" }] : /* istanbul ignore next */ []));\n // ============================================================================\n // Internal State\n // ============================================================================\n /** The full ConnectionPayload value */\n value = signal(null, ...(ngDevMode ? [{ debugName: \"value\" }] : /* istanbul ignore next */ []));\n disabled = signal(false, ...(ngDevMode ? [{ debugName: \"disabled\" }] : /* istanbul ignore next */ []));\n /** Per-source-level state: options + loading */\n sourceLevelStates = signal([], ...(ngDevMode ? [{ debugName: \"sourceLevelStates\" }] : /* istanbul ignore next */ []));\n /** Mutable selections per source level: sourceLevelId -> selected value */\n selections = {};\n onTouched = () => { };\n onModelChange = () => { };\n /**\n * Required-validation for a connection: emptiness is decided by the selected\n * `sources`, not by the value being null. The runtime loads an unselected\n * connection as `{ levelId, sources: [] }` — a non-null object that Angular's\n * stock `Validators.required` accepts — so a plain required check would let an\n * empty connection pass and the form submit. Mirrors {@link syncValue}, which\n * collapses a source-less selection to `null`.\n */\n connectionRequiredValidator = (control) => {\n const value = control.value;\n const hasSources = !!value && Array.isArray(value.sources) && value.sources.length > 0;\n return hasSources ? null : { required: true };\n };\n ngControl = null;\n http = inject(HttpClient);\n destroyRef = inject(DestroyRef);\n transloco = inject(TranslocoService);\n /** Active UI language, kept reactive so source labels re-resolve on switch. */\n activeLang = toSignal(this.transloco.langChanges$, {\n initialValue: this.transloco.getActiveLang(),\n });\n /**\n * Resolve a source level's display name in the active locale, falling back\n * to English, Arabic, then the level/module key.\n */\n resolveSourceName(source) {\n const name = source.name;\n return (name?.[this.activeLang()] ||\n name?.en ||\n name?.ar ||\n source.levelKey ||\n source.moduleKey ||\n '');\n }\n /**\n * Source levels from configuration.\n */\n sourceLevels = computed(() => {\n return this.configuration()?.sourceLevels ?? [];\n }, ...(ngDevMode ? [{ debugName: \"sourceLevels\" }] : /* istanbul ignore next */ []));\n /**\n * Tooltip for the marker rendered next to every source label — it is what\n * tells the user these dropdowns belong to a connection, now that the\n * connection's own label no longer occupies a row above them. Reads\n * {@link activeLang} so the text re-translates on language switch.\n */\n connectionHint = computed(() => {\n this.activeLang();\n return this.transloco.translate('components.schemaConnection.hint');\n }, ...(ngDevMode ? [{ debugName: \"connectionHint\" }] : /* istanbul ignore next */ []));\n /**\n * Placeholder for a source dropdown: its own source name, matching the label\n * above it. Falls back to the field-level placeholder only when the source\n * has no resolvable name.\n */\n sourcePlaceholder(source) {\n return (this.resolveSourceName(source) ||\n this.placeholder() ||\n this.transloco.translate('components.selectPlaceholder'));\n }\n /**\n * Percentage width for each dropdown, evenly divided.\n */\n dropdownWidth = computed(() => {\n const count = this.sourceLevels().length;\n if (count <= 0)\n return '100%';\n return `${100 / count}%`;\n }, ...(ngDevMode ? [{ debugName: \"dropdownWidth\" }] : /* istanbul ignore next */ []));\n constructor() {\n this.ngControl = inject(NgControl, { self: true, optional: true });\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n effect(() => {\n const control = this.ngControl?.control;\n if (!control)\n return;\n const required = this.required();\n untracked(() => {\n if (required) {\n control.addValidators(this.connectionRequiredValidator);\n }\n else {\n control.removeValidators(this.connectionRequiredValidator);\n }\n control.updateValueAndValidity({ emitEvent: false });\n });\n });\n // Load options for each source level when configuration changes\n effect(() => {\n const levels = this.sourceLevels();\n if (!levels.length)\n return;\n // Everything below must NOT create signal dependencies,\n // only sourceLevels() (→ configuration) should trigger this effect.\n untracked(() => {\n // Initialize per-source states + selections\n this.sourceLevelStates.set(levels.map((source) => ({\n source,\n options: [],\n loading: false,\n })));\n for (const source of levels) {\n const sourceId = this.getSourceId(source);\n if (!(sourceId in this.selections)) {\n this.selections[sourceId] = source.allowManyToMany ? [] : null;\n }\n }\n // Distribute existing value to selections\n this.distributeToSelections(this.value());\n // Load options for each source level\n for (const source of levels) {\n this.loadOptions(source);\n }\n });\n });\n }\n // ============================================================================\n // Source Level Helpers\n // ============================================================================\n /**\n * Returns a stable numeric ID for a source regardless of whether it is a\n * level (`levelId`) or a module (`moduleId`). Used as the key in `selections`\n * and `sourceLevelStates`.\n */\n getSourceId(source) {\n return (source.levelId ?? source.moduleId);\n }\n /**\n * Builds the `contextKey` for the `fetch/query` request based on source type.\n */\n getContextKey(source) {\n return source.levelId != null\n ? `level:${source.levelId}`\n : `module:${source.moduleId}`;\n }\n // ============================================================================\n // Option Loading (per source level)\n // ============================================================================\n loadOptions(source) {\n this.updateSourceState(this.getSourceId(source), { loading: true });\n const ctx = this.context();\n const payload = {\n contextKey: this.getContextKey(source),\n projection: 'Flat',\n propertyKeys: ['name'],\n };\n this.http\n .post('fetch/query', payload, {\n ...(ctx ? { context: ctx } : {}),\n })\n .pipe(takeUntilDestroyed(this.destroyRef), finalize(() => this.updateSourceState(this.getSourceId(source), { loading: false })), catchError((err) => {\n console.error(`Connection options load failed for ${source.levelKey ?? source.moduleKey}:`, err);\n return of({ data: { records: [] } });\n }))\n .subscribe((response) => {\n const options = (response?.data?.records ?? [])\n .filter((record) => record?.id != null)\n .map((record) => ({\n ...record,\n id: record.id,\n name: record.name,\n }));\n this.updateSourceState(this.getSourceId(source), {\n options,\n loading: false,\n });\n });\n }\n updateSourceState(sourceId, patch) {\n this.sourceLevelStates.update((states) => states.map((s) => this.getSourceId(s.source) === sourceId ? { ...s, ...patch } : s));\n }\n // ============================================================================\n // Value Handling\n // ============================================================================\n /**\n * Single handler — no params. Reads all selections, builds the combined payload.\n */\n syncValue() {\n const cfg = this.configuration();\n const states = this.sourceLevelStates();\n const sources = [];\n for (const state of states) {\n const val = this.selections[this.getSourceId(state.source)];\n if (val == null)\n continue;\n const effectiveId = this.getSourceId(state.source);\n if (state.source.allowManyToMany && Array.isArray(val)) {\n for (const id of val) {\n sources.push({\n sourceLevelId: effectiveId,\n sourceLevelDataId: id,\n });\n }\n }\n else if (typeof val === 'number') {\n sources.push({\n sourceLevelId: effectiveId,\n sourceLevelDataId: val,\n });\n }\n }\n const payload = sources.length > 0 ? { levelId: cfg.targetLevelId, sources } : null;\n this.value.set(payload);\n this.onModelChange(payload);\n this.onTouched();\n }\n distributeToSelections(payload) {\n const states = this.sourceLevelStates();\n for (const state of states) {\n const sourceId = this.getSourceId(state.source);\n const ids = (payload?.sources ?? [])\n .filter((s) => (s.sourceLevelId ?? s.sourceModuleId) === sourceId)\n .map((s) => s.sourceLevelDataId ?? s.sourceModuleDataId)\n .filter((id) => id != null);\n this.selections[sourceId] = state.source.allowManyToMany\n ? ids\n : (ids[0] ?? null);\n }\n }\n // ============================================================================\n // ControlValueAccessor\n // ============================================================================\n writeValue(value) {\n if (typeof value === 'string') {\n try {\n value = JSON.parse(value);\n }\n catch {\n value = null;\n }\n }\n this.value.set(value ?? null);\n this.distributeToSelections(value ?? null);\n }\n registerOnChange(fn) {\n this.onModelChange = fn;\n }\n registerOnTouched(fn) {\n this.onTouched = fn;\n }\n setDisabledState(disabled) {\n this.disabled.set(disabled);\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: SchemaConnectionField, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.2.8\", type: SchemaConnectionField, isStandalone: true, selector: \"mt-schema-connection-field\", inputs: { label: { classPropertyName: \"label\", publicName: \"label\", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: \"placeholder\", publicName: \"placeholder\", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: \"readonly\", publicName: \"readonly\", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: \"required\", publicName: \"required\", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: \"filter\", publicName: \"filter\", isSignal: true, isRequired: false, transformFunction: null }, configuration: { classPropertyName: \"configuration\", publicName: \"configuration\", isSignal: true, isRequired: true, transformFunction: null }, context: { classPropertyName: \"context\", publicName: \"context\", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: \"grid gap-1\" }, ngImport: i0, template: \"<div class=\\\"flex gap-4 w-full\\\">\\r\\n @for (state of sourceLevelStates(); track getSourceId(state.source)) {\\r\\n <!--\\r\\n `grid gap-1 grid-cols-[minmax(0,1fr)]` matches the label\\u2192control spacing\\r\\n every other mt-* field gets from its host class; the explicit column\\r\\n keeps the implicit max-content track from letting long values overflow.\\r\\n -->\\r\\n <div\\r\\n [style.width]=\\\"dropdownWidth()\\\"\\r\\n class=\\\"grid gap-1 grid-cols-[minmax(0,1fr)] min-w-0\\\"\\r\\n >\\r\\n <div class=\\\"flex items-center gap-1\\\">\\r\\n <label class=\\\"truncate\\\" [class.required]=\\\"required()\\\">\\r\\n {{ resolveSourceName(state.source) }}\\r\\n </label>\\r\\n <span\\r\\n class=\\\"inline-flex shrink-0 text-surface-400\\\"\\r\\n [mtTooltip]=\\\"connectionHint()\\\"\\r\\n tooltipPosition=\\\"top\\\"\\r\\n >\\r\\n <mt-icon icon=\\\"general.link-01\\\" />\\r\\n </span>\\r\\n </div>\\r\\n\\r\\n @if (state.source.allowManyToMany) {\\r\\n <mt-multi-select-field\\r\\n [field]=\\\"false\\\"\\r\\n [(ngModel)]=\\\"selections[getSourceId(state.source)]\\\"\\r\\n (ngModelChange)=\\\"syncValue()\\\"\\r\\n [options]=\\\"state.options\\\"\\r\\n optionLabel=\\\"name\\\"\\r\\n optionValue=\\\"id\\\"\\r\\n [placeholder]=\\\"sourcePlaceholder(state.source)\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [filter]=\\\"filter()\\\"\\r\\n [showClear]=\\\"true\\\"\\r\\n display=\\\"chip\\\"\\r\\n />\\r\\n } @else {\\r\\n <mt-select-field\\r\\n [field]=\\\"false\\\"\\r\\n [(ngModel)]=\\\"selections[getSourceId(state.source)]\\\"\\r\\n (ngModelChange)=\\\"syncValue()\\\"\\r\\n [options]=\\\"state.options\\\"\\r\\n optionLabel=\\\"name\\\"\\r\\n optionValue=\\\"id\\\"\\r\\n [placeholder]=\\\"sourcePlaceholder(state.source)\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [filter]=\\\"filter()\\\"\\r\\n [loading]=\\\"state.loading\\\"\\r\\n [showClear]=\\\"true\\\"\\r\\n />\\r\\n }\\r\\n </div>\\r\\n }\\r\\n</div>\\r\\n\\r\\n<mt-field-validation [control]=\\\"ngControl?.control\\\"></mt-field-validation>\\r\\n\", styles: [\"\"], dependencies: [{ kind: \"ngmodule\", type: FormsModule }, { kind: \"directive\", type: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.NgModel, selector: \"[ngModel]:not([formControlName]):not([formControl])\", inputs: [\"name\", \"disabled\", \"ngModel\", \"ngModelOptions\"], outputs: [\"ngModelChange\"], exportAs: [\"ngModel\"] }, { kind: \"component\", type: SelectField, selector: \"mt-select-field\", inputs: [\"field\", \"hint\", \"label\", \"placeholder\", \"hasPlaceholderPrefix\", \"class\", \"readonly\", \"pInputs\", \"options\", \"optionValue\", \"optionLabel\", \"filter\", \"filterBy\", \"dataKey\", \"showClear\", \"clearAfterSelect\", \"required\", \"group\", \"size\", \"optionGroupLabel\", \"optionGroupChildren\", \"loading\", \"optionIcon\", \"optionIconColor\", \"optionIconShape\", \"optionAvatarShape\", \"optionGroupIcon\", \"optionGroupIconColor\", \"optionGroupIconShape\", \"optionGroupAvatarShape\", \"markCurrentUser\"], outputs: [\"onChange\"] }, { kind: \"component\", type: MultiSelectField, selector: \"mt-multi-select-field\", inputs: [\"field\", \"label\", \"placeholder\", \"class\", \"readonly\", \"pInputs\", \"options\", \"optionValue\", \"optionLabel\", \"filter\", \"filterBy\", \"dataKey\", \"showClear\", \"display\", \"required\", \"maxSelectedLabels\", \"group\", \"virtualScroll\", \"virtualScrollItemSize\", \"optionGroupLabel\", \"optionGroupChildren\", \"optionIcon\", \"optionIconColor\", \"optionIconShape\", \"optionAvatarShape\", \"optionGroupIcon\", \"optionGroupIconColor\", \"optionGroupIconShape\", \"optionGroupAvatarShape\"], outputs: [\"onChange\"] }, { kind: \"component\", type: FieldValidation, selector: \"mt-field-validation\", inputs: [\"control\", \"touched\", \"messageId\"] }, { kind: \"directive\", type: Tooltip, selector: \"[mtTooltip]\" }, { kind: \"component\", type: Icon, selector: \"mt-icon\", inputs: [\"icon\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: SchemaConnectionField, decorators: [{\n type: Component,\n args: [{ selector: 'mt-schema-connection-field', standalone: true, imports: [\n FormsModule,\n SelectField,\n MultiSelectField,\n FieldValidation,\n Tooltip,\n Icon,\n ], changeDetection: ChangeDetectionStrategy.OnPush, host: {\n class: 'grid gap-1',\n }, template: \"<div class=\\\"flex gap-4 w-full\\\">\\r\\n @for (state of sourceLevelStates(); track getSourceId(state.source)) {\\r\\n <!--\\r\\n `grid gap-1 grid-cols-[minmax(0,1fr)]` matches the label\\u2192control spacing\\r\\n every other mt-* field gets from its host class; the explicit column\\r\\n keeps the implicit max-content track from letting long values overflow.\\r\\n -->\\r\\n <div\\r\\n [style.width]=\\\"dropdownWidth()\\\"\\r\\n class=\\\"grid gap-1 grid-cols-[minmax(0,1fr)] min-w-0\\\"\\r\\n >\\r\\n <div class=\\\"flex items-center gap-1\\\">\\r\\n <label class=\\\"truncate\\\" [class.required]=\\\"required()\\\">\\r\\n {{ resolveSourceName(state.source) }}\\r\\n </label>\\r\\n <span\\r\\n class=\\\"inline-flex shrink-0 text-surface-400\\\"\\r\\n [mtTooltip]=\\\"connectionHint()\\\"\\r\\n tooltipPosition=\\\"top\\\"\\r\\n >\\r\\n <mt-icon icon=\\\"general.link-01\\\" />\\r\\n </span>\\r\\n </div>\\r\\n\\r\\n @if (state.source.allowManyToMany) {\\r\\n <mt-multi-select-field\\r\\n [field]=\\\"false\\\"\\r\\n [(ngModel)]=\\\"selections[getSourceId(state.source)]\\\"\\r\\n (ngModelChange)=\\\"syncValue()\\\"\\r\\n [options]=\\\"state.options\\\"\\r\\n optionLabel=\\\"name\\\"\\r\\n optionValue=\\\"id\\\"\\r\\n [placeholder]=\\\"sourcePlaceholder(state.source)\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [filter]=\\\"filter()\\\"\\r\\n [showClear]=\\\"true\\\"\\r\\n display=\\\"chip\\\"\\r\\n />\\r\\n } @else {\\r\\n <mt-select-field\\r\\n [field]=\\\"false\\\"\\r\\n [(ngModel)]=\\\"selections[getSourceId(state.source)]\\\"\\r\\n (ngModelChange)=\\\"syncValue()\\\"\\r\\n [options]=\\\"state.options\\\"\\r\\n optionLabel=\\\"name\\\"\\r\\n optionValue=\\\"id\\\"\\r\\n [placeholder]=\\\"sourcePlaceholder(state.source)\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [filter]=\\\"filter()\\\"\\r\\n [loading]=\\\"state.loading\\\"\\r\\n [showClear]=\\\"true\\\"\\r\\n />\\r\\n }\\r\\n </div>\\r\\n }\\r\\n</div>\\r\\n\\r\\n<mt-field-validation [control]=\\\"ngControl?.control\\\"></mt-field-validation>\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: \"label\", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: \"placeholder\", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: \"readonly\", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: \"required\", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: \"filter\", required: false }] }], configuration: [{ type: i0.Input, args: [{ isSignal: true, alias: \"configuration\", required: true }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: \"context\", required: false }] }] } });\n\nconst PREDECESSOR_TYPE_BY_TOKEN = {\n FS: 0,\n SS: 1,\n FF: 2,\n SF: 3,\n};\nconst PREDECESSOR_TOKEN_BY_TYPE = {\n 0: 'FS',\n 1: 'SS',\n 2: 'FF',\n 3: 'SF',\n};\nclass SchedulePredecessorField {\n predecessorCellTpl = viewChild.required('predecessorCellTpl');\n typeCellTpl = viewChild.required('typeCellTpl');\n lagCellTpl = viewChild.required('lagCellTpl');\n label = input('', ...(ngDevMode ? [{ debugName: \"label\" }] : /* istanbul ignore next */ []));\n /** Fallback so a control-less, label-less field never renders id=\"undefined\". */\n defaultFieldId = nextFieldId('mt-schedule-predecessor-field');\n /** Shared by the input and its <label for>. See src/lib/utils/field-id. */\n fieldId = computed(() => resolveFieldId(this.ngControl?.name, this.label(), this.defaultFieldId), ...(ngDevMode ? [{ debugName: \"fieldId\" }] : /* istanbul ignore next */ []));\n placeholder = input('', ...(ngDevMode ? [{ debugName: \"placeholder\" }] : /* istanbul ignore next */ []));\n readonly = input(false, ...(ngDevMode ? [{ debugName: \"readonly\" }] : /* istanbul ignore next */ []));\n required = input(false, ...(ngDevMode ? [{ debugName: \"required\" }] : /* istanbul ignore next */ []));\n configuration = input(null, ...(ngDevMode ? [{ debugName: \"configuration\" }] : /* istanbul ignore next */ []));\n runtimeContext = input(null, ...(ngDevMode ? [{ debugName: \"runtimeContext\" }] : /* istanbul ignore next */ []));\n loading = signal(false, ...(ngDevMode ? [{ debugName: \"loading\" }] : /* istanbul ignore next */ []));\n taskOptions = signal([], ...(ngDevMode ? [{ debugName: \"taskOptions\" }] : /* istanbul ignore next */ []));\n rows = signal([], ...(ngDevMode ? [{ debugName: \"rows\" }] : /* istanbul ignore next */ []));\n disabled = signal(false, ...(ngDevMode ? [{ debugName: \"disabled\" }] : /* istanbul ignore next */ []));\n typeOptions = computed(() => [\n { label: 'FS', value: 0 },\n { label: 'SS', value: 1 },\n { label: 'FF', value: 2 },\n { label: 'SF', value: 3 },\n ], ...(ngDevMode ? [{ debugName: \"typeOptions\" }] : /* istanbul ignore next */ []));\n availableTaskOptions = computed(() => {\n const currentTaskId = this.runtimeContext()?.moduleDataId;\n return this.taskOptions().filter((item) => String(item.value) !== String(currentTaskId ?? ''));\n }, ...(ngDevMode ? [{ debugName: \"availableTaskOptions\" }] : /* istanbul ignore next */ []));\n canAddRow = computed(() => !!this.runtimeContext()?.levelId &&\n !!this.runtimeContext()?.levelDataId &&\n this.availableTaskOptions().length > 0, ...(ngDevMode ? [{ debugName: \"canAddRow\" }] : /* istanbul ignore next */ []));\n addTooltip = computed(() => this.canAddRow() ? undefined : this.texts().noAvailable, ...(ngDevMode ? [{ debugName: \"addTooltip\" }] : /* istanbul ignore next */ []));\n pageSize = computed(() => this.rows().length > 0 ? this.rows().length : 1, ...(ngDevMode ? [{ debugName: \"pageSize\" }] : /* istanbul ignore next */ []));\n columns = linkedSignal(() => [\n {\n key: 'predecessorId',\n label: this.texts().predecessor,\n type: 'custom',\n customCellTpl: this.predecessorCellTpl(),\n },\n {\n key: 'type',\n label: this.texts().type,\n type: 'custom',\n customCellTpl: this.typeCellTpl(),\n },\n {\n key: 'lagDays',\n label: this.texts().lagDays,\n type: 'custom',\n customCellTpl: this.lagCellTpl(),\n },\n ], ...(ngDevMode ? [{ debugName: \"columns\" }] : /* istanbul ignore next */ []));\n rowActions = computed(() => [\n {\n icon: 'general.trash-01',\n color: 'danger',\n variant: 'text',\n tooltip: this.texts().delete,\n hidden: () => this.disabled() || this.readonly(),\n action: (row) => this.removeRow(row.key),\n },\n ], ...(ngDevMode ? [{ debugName: \"rowActions\" }] : /* istanbul ignore next */ []));\n requiredValidator = Validators.required;\n onTouched = () => { };\n onModelChange = () => { };\n ngControl = null;\n http = inject(HttpClient);\n transloco = inject(TranslocoService);\n destroyRef = inject(DestroyRef);\n activeLang = toSignal(this.transloco.langChanges$, {\n initialValue: this.transloco.getActiveLang(),\n });\n rowKey = 0;\n texts = computed(() => {\n this.activeLang();\n return {\n noAvailable: this.transloco.translate('components.schedulePredecessorField.noAvailable'),\n predecessor: this.transloco.translate('components.schedulePredecessorField.predecessor'),\n type: this.transloco.translate('components.schedulePredecessorField.type'),\n lagDays: this.transloco.translate('components.schedulePredecessorField.lagDays'),\n delete: this.transloco.translate('components.schedulePredecessorField.delete'),\n };\n }, ...(ngDevMode ? [{ debugName: \"texts\" }] : /* istanbul ignore next */ []));\n constructor() {\n this.ngControl = inject(NgControl, { self: true, optional: true });\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n effect(() => {\n if (this.ngControl?.control && this.required()) {\n this.ngControl.control.addValidators(Validators.required);\n this.ngControl.control.updateValueAndValidity();\n }\n });\n effect(() => {\n const context = this.runtimeContext();\n const levelId = context?.levelId;\n const levelDataId = context?.levelDataId;\n if (levelId == null || levelDataId == null) {\n this.taskOptions.set([]);\n return;\n }\n untracked(() => this.loadTaskOptions(levelId, levelDataId));\n });\n }\n addRow() {\n if (this.disabled() || this.readonly() || !this.canAddRow()) {\n return;\n }\n this.syncRows([\n ...this.rows(),\n {\n key: this.nextRowKey(),\n predecessorId: '',\n type: 0,\n lagDays: 0,\n },\n ]);\n }\n removeRow(key) {\n if (this.disabled() || this.readonly()) {\n return;\n }\n this.syncRows(this.rows().filter((row) => row.key !== key));\n }\n updateRow(key, patch) {\n if (this.disabled() || this.readonly()) {\n return;\n }\n this.syncRows(this.rows().map((row) => (row.key === key ? { ...row, ...patch } : row)));\n }\n writeValue(value) {\n const rows = typeof value === 'string'\n ? value\n .split(',')\n .map((item) => item.trim())\n .filter(Boolean)\n .map((item) => this.parseCompactValue(item))\n .filter((item) => item != null)\n .map((item) => ({\n key: this.nextRowKey(),\n ...item,\n }))\n : [];\n this.rows.set(rows);\n }\n registerOnChange(fn) {\n this.onModelChange = fn;\n }\n registerOnTouched(fn) {\n this.onTouched = fn;\n }\n setDisabledState(disabled) {\n this.disabled.set(disabled);\n }\n syncRows(rows) {\n this.rows.set(rows);\n const value = rows\n .filter((row) => row.predecessorId !== null &&\n row.predecessorId !== undefined &&\n String(row.predecessorId).trim() !== '')\n .map((row) => this.formatCompactValue(row))\n .join(',');\n this.onModelChange(value || null);\n this.onTouched();\n }\n loadTaskOptions(levelId, levelDataId) {\n this.loading.set(true);\n this.http\n .post(`levels/${levelId}/${levelDataId}/schedule/query`, {\n projection: 'Tree',\n propertyKeys: ['name'],\n })\n .pipe(takeUntilDestroyed(this.destroyRef), finalize(() => this.loading.set(false)), catchError(() => of({ data: { records: [] } })))\n .subscribe((response) => {\n this.taskOptions.set(this.mapTaskOptions(response.data));\n });\n }\n mapTaskOptions(data) {\n // Labels show the ROW NUMBER (1-based position in the same pre-order walk\n // the grid's ID column numbers), not the backend id — the two surfaces\n // must speak one coordinate. The option VALUE stays the real id: the\n // compact predecessor string this field produces is wire format.\n return this.flattenRecords(this.resolveRootRecords(data?.records ?? [], data?.projectionMeta?.rootIds ?? [])).map((record, index) => ({\n label: `${index + 1} - ${record.name ?? record.id}`,\n value: String(record.id),\n }));\n }\n resolveRootRecords(records, rootIds) {\n if (!rootIds?.length) {\n return records;\n }\n const recordsById = new Map(records.map((record) => [String(record.id), record]));\n return rootIds\n .map((id) => recordsById.get(String(id)))\n .filter((record) => record != null);\n }\n flattenRecords(records) {\n const output = [];\n const walk = (items) => {\n items.forEach((item) => {\n output.push(item);\n walk(item.children ?? []);\n });\n };\n walk(records);\n return output;\n }\n nextRowKey() {\n this.rowKey += 1;\n return `predecessor-${this.rowKey}`;\n }\n parseCompactValue(value) {\n const match = value.match(/^(.+?)(FS|SS|FF|SF)([+-]\\d+)?$/);\n if (!match) {\n return null;\n }\n return {\n predecessorId: match[1],\n type: PREDECESSOR_TYPE_BY_TOKEN[match[2]],\n lagDays: match[3] ? Number(match[3]) : 0,\n };\n }\n formatCompactValue(row) {\n const lag = row.lagDays > 0 ? `+${row.lagDays}` : row.lagDays < 0 ? row.lagDays : '';\n return `${row.predecessorId}${PREDECESSOR_TOKEN_BY_TYPE[row.type]}${lag}`;\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: SchedulePredecessorField, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.2.8\", type: SchedulePredecessorField, isStandalone: true, selector: \"mt-schedule-predecessor-field\", inputs: { label: { classPropertyName: \"label\", publicName: \"label\", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: \"placeholder\", publicName: \"placeholder\", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: \"readonly\", publicName: \"readonly\", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: \"required\", publicName: \"required\", isSignal: true, isRequired: false, transformFunction: null }, configuration: { classPropertyName: \"configuration\", publicName: \"configuration\", isSignal: true, isRequired: false, transformFunction: null }, runtimeContext: { classPropertyName: \"runtimeContext\", publicName: \"runtimeContext\", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: \"grid gap-1\" }, viewQueries: [{ propertyName: \"predecessorCellTpl\", first: true, predicate: [\"predecessorCellTpl\"], descendants: true, isSignal: true }, { propertyName: \"typeCellTpl\", first: true, predicate: [\"typeCellTpl\"], descendants: true, isSignal: true }, { propertyName: \"lagCellTpl\", first: true, predicate: [\"lagCellTpl\"], descendants: true, isSignal: true }], ngImport: i0, template: \"<div class=\\\"gap-3 overflow-auto\\\">\\r\\n <div class=\\\"flex items-center justify-between mb-2\\\">\\r\\n <div>\\r\\n @if (label()) {\\r\\n <label\\r\\n [class.required]=\\\"ngControl?.control?.hasValidator(requiredValidator)\\\"\\r\\n [for]=\\\"fieldId()\\\"\\r\\n >\\r\\n {{ label() }}\\r\\n </label>\\r\\n }\\r\\n </div>\\r\\n <mt-button\\r\\n icon=\\\"general.plus\\\"\\r\\n [label]=\\\"'components.schedulePredecessorField.add' | transloco\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n variant=\\\"outlined\\\"\\r\\n size=\\\"small\\\"\\r\\n [disabled]=\\\"disabled() || readonly() || !canAddRow()\\\"\\r\\n [tooltip]=\\\"addTooltip()\\\"\\r\\n (onClick)=\\\"addRow()\\\"\\r\\n />\\r\\n </div>\\r\\n\\r\\n <ng-template #predecessorCellTpl let-row>\\r\\n <mt-select-field\\r\\n [field]=\\\"false\\\"\\r\\n [options]=\\\"availableTaskOptions()\\\"\\r\\n optionLabel=\\\"label\\\"\\r\\n optionValue=\\\"value\\\"\\r\\n [placeholder]=\\\"\\r\\n placeholder() ||\\r\\n ('components.schedulePredecessorField.selectPredecessor' | transloco)\\r\\n \\\"\\r\\n [filter]=\\\"true\\\"\\r\\n [showClear]=\\\"true\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [ngModel]=\\\"row.predecessorId || undefined\\\"\\r\\n (onChange)=\\\"updateRow(row.key, { predecessorId: $event ?? '' })\\\"\\r\\n />\\r\\n </ng-template>\\r\\n\\r\\n <ng-template #typeCellTpl let-row>\\r\\n <mt-select-field\\r\\n [field]=\\\"false\\\"\\r\\n [options]=\\\"typeOptions()\\\"\\r\\n optionLabel=\\\"label\\\"\\r\\n optionValue=\\\"value\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [ngModel]=\\\"row.type\\\"\\r\\n (onChange)=\\\"updateRow(row.key, { type: $event ?? 0 })\\\"\\r\\n />\\r\\n </ng-template>\\r\\n\\r\\n <ng-template #lagCellTpl let-row>\\r\\n <mt-number-field\\r\\n [field]=\\\"false\\\"\\r\\n [useGrouping]=\\\"false\\\"\\r\\n [placeholder]=\\\"'components.schedulePredecessorField.lagDays' | transloco\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [ngModel]=\\\"row.lagDays\\\"\\r\\n (ngModelChange)=\\\"updateRow(row.key, { lagDays: $event ?? 0 })\\\"\\r\\n />\\r\\n </ng-template>\\r\\n\\r\\n <mt-table\\r\\n noCard\\r\\n [data]=\\\"rows()\\\"\\r\\n [columns]=\\\"columns()\\\"\\r\\n [rowActions]=\\\"rowActions()\\\"\\r\\n [pageSize]=\\\"pageSize()\\\"\\r\\n [generalSearch]=\\\"false\\\"\\r\\n [showFilters]=\\\"false\\\"\\r\\n [dataKey]=\\\"'key'\\\"\\r\\n storageKey=\\\"schedule-predecessor-field-table\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n >\\r\\n <ng-template #empty>\\r\\n <div\\r\\n class=\\\"rounded-xl border border-dashed border-surface px-4 py-5 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.schedulePredecessorField.empty\\\" | transloco }}\\r\\n </div>\\r\\n </ng-template>\\r\\n </mt-table>\\r\\n</div>\\r\\n\\r\\n<mt-field-validation [control]=\\\"ngControl?.control\\\"></mt-field-validation>\\r\\n\", dependencies: [{ kind: \"ngmodule\", type: CommonModule }, { kind: \"ngmodule\", type: FormsModule }, { kind: \"directive\", type: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.NgModel, selector: \"[ngModel]:not([formControlName]):not([formControl])\", inputs: [\"name\", \"disabled\", \"ngModel\", \"ngModelOptions\"], outputs: [\"ngModelChange\"], exportAs: [\"ngModel\"] }, { kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\", \"ariaLabel\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }, { kind: \"component\", type: FieldValidation, selector: \"mt-field-validation\", inputs: [\"control\", \"touched\", \"messageId\"] }, { kind: \"component\", type: NumberField, selector: \"mt-number-field\", inputs: [\"field\", \"hint\", \"label\", \"placeholder\", \"class\", \"readonly\", \"pInputs\", \"format\", \"useGrouping\", \"maxFractionDigits\", \"min\", \"max\", \"required\"] }, { kind: \"component\", type: SelectField, selector: \"mt-select-field\", inputs: [\"field\", \"hint\", \"label\", \"placeholder\", \"hasPlaceholderPrefix\", \"class\", \"readonly\", \"pInputs\", \"options\", \"optionValue\", \"optionLabel\", \"filter\", \"filterBy\", \"dataKey\", \"showClear\", \"clearAfterSelect\", \"required\", \"group\", \"size\", \"optionGroupLabel\", \"optionGroupChildren\", \"loading\", \"optionIcon\", \"optionIconColor\", \"optionIconShape\", \"optionAvatarShape\", \"optionGroupIcon\", \"optionGroupIconColor\", \"optionGroupIconShape\", \"optionGroupAvatarShape\", \"markCurrentUser\"], outputs: [\"onChange\"] }, { kind: \"component\", type: Table, selector: \"mt-table\", inputs: [\"filters\", \"data\", \"columns\", \"rowActions\", \"size\", \"showGridlines\", \"stripedRows\", \"selectableRows\", \"clickableRows\", \"generalSearch\", \"lazyLocalSearch\", \"showFilters\", \"filterMode\", \"loading\", \"updating\", \"lazy\", \"lazyLocalSort\", \"lazyTotalRecords\", \"reorderableColumns\", \"reorderableRows\", \"dataKey\", \"storageKey\", \"storageMode\", \"persistStateExclude\", \"exportable\", \"printable\", \"groupable\", \"groupCountMap\", \"cellClickFilter\", \"freezeActions\", \"virtualScroll\", \"virtualScrollItemSize\", \"scrollHeight\", \"printTitle\", \"exportFilename\", \"actionShape\", \"rowActionsLoadingFn\", \"tableLayout\", \"noCard\", \"tabs\", \"tabsOptionLabel\", \"tabsOptionValue\", \"activeTab\", \"actions\", \"emptyTitle\", \"emptyDescription\", \"emptyActionLabel\", \"emptyActionIcon\", \"paginatorPosition\", \"alwaysShowPaginator\", \"rowsPerPageOptions\", \"pageSize\", \"currentPage\", \"first\", \"filterTerm\", \"groupBy\", \"sortField\", \"sortDirection\"], outputs: [\"selectionChange\", \"cellChange\", \"lazyLoad\", \"columnReorder\", \"rowReorder\", \"rowClick\", \"emptyAction\", \"rowActionsRequested\", \"filtersChange\", \"activeTabChange\", \"onTabChange\", \"pageSizeChange\", \"currentPageChange\", \"firstChange\", \"filterTermChange\", \"groupByChange\", \"sortFieldChange\", \"sortDirectionChange\"] }, { kind: \"ngmodule\", type: TranslocoModule }, { kind: \"pipe\", type: i2.TranslocoPipe, name: \"transloco\" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: SchedulePredecessorField, decorators: [{\n type: Component,\n args: [{ selector: 'mt-schedule-predecessor-field', standalone: true, imports: [\n CommonModule,\n FormsModule,\n Button,\n FieldValidation,\n NumberField,\n SelectField,\n Table,\n TranslocoModule,\n ], changeDetection: ChangeDetectionStrategy.OnPush, host: {\n class: 'grid gap-1',\n }, template: \"<div class=\\\"gap-3 overflow-auto\\\">\\r\\n <div class=\\\"flex items-center justify-between mb-2\\\">\\r\\n <div>\\r\\n @if (label()) {\\r\\n <label\\r\\n [class.required]=\\\"ngControl?.control?.hasValidator(requiredValidator)\\\"\\r\\n [for]=\\\"fieldId()\\\"\\r\\n >\\r\\n {{ label() }}\\r\\n </label>\\r\\n }\\r\\n </div>\\r\\n <mt-button\\r\\n icon=\\\"general.plus\\\"\\r\\n [label]=\\\"'components.schedulePredecessorField.add' | transloco\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n variant=\\\"outlined\\\"\\r\\n size=\\\"small\\\"\\r\\n [disabled]=\\\"disabled() || readonly() || !canAddRow()\\\"\\r\\n [tooltip]=\\\"addTooltip()\\\"\\r\\n (onClick)=\\\"addRow()\\\"\\r\\n />\\r\\n </div>\\r\\n\\r\\n <ng-template #predecessorCellTpl let-row>\\r\\n <mt-select-field\\r\\n [field]=\\\"false\\\"\\r\\n [options]=\\\"availableTaskOptions()\\\"\\r\\n optionLabel=\\\"label\\\"\\r\\n optionValue=\\\"value\\\"\\r\\n [placeholder]=\\\"\\r\\n placeholder() ||\\r\\n ('components.schedulePredecessorField.selectPredecessor' | transloco)\\r\\n \\\"\\r\\n [filter]=\\\"true\\\"\\r\\n [showClear]=\\\"true\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [ngModel]=\\\"row.predecessorId || undefined\\\"\\r\\n (onChange)=\\\"updateRow(row.key, { predecessorId: $event ?? '' })\\\"\\r\\n />\\r\\n </ng-template>\\r\\n\\r\\n <ng-template #typeCellTpl let-row>\\r\\n <mt-select-field\\r\\n [field]=\\\"false\\\"\\r\\n [options]=\\\"typeOptions()\\\"\\r\\n optionLabel=\\\"label\\\"\\r\\n optionValue=\\\"value\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [ngModel]=\\\"row.type\\\"\\r\\n (onChange)=\\\"updateRow(row.key, { type: $event ?? 0 })\\\"\\r\\n />\\r\\n </ng-template>\\r\\n\\r\\n <ng-template #lagCellTpl let-row>\\r\\n <mt-number-field\\r\\n [field]=\\\"false\\\"\\r\\n [useGrouping]=\\\"false\\\"\\r\\n [placeholder]=\\\"'components.schedulePredecessorField.lagDays' | transloco\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [ngModel]=\\\"row.lagDays\\\"\\r\\n (ngModelChange)=\\\"updateRow(row.key, { lagDays: $event ?? 0 })\\\"\\r\\n />\\r\\n </ng-template>\\r\\n\\r\\n <mt-table\\r\\n noCard\\r\\n [data]=\\\"rows()\\\"\\r\\n [columns]=\\\"columns()\\\"\\r\\n [rowActions]=\\\"rowActions()\\\"\\r\\n [pageSize]=\\\"pageSize()\\\"\\r\\n [generalSearch]=\\\"false\\\"\\r\\n [showFilters]=\\\"false\\\"\\r\\n [dataKey]=\\\"'key'\\\"\\r\\n storageKey=\\\"schedule-predecessor-field-table\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n >\\r\\n <ng-template #empty>\\r\\n <div\\r\\n class=\\\"rounded-xl border border-dashed border-surface px-4 py-5 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.schedulePredecessorField.empty\\\" | transloco }}\\r\\n </div>\\r\\n </ng-template>\\r\\n </mt-table>\\r\\n</div>\\r\\n\\r\\n<mt-field-validation [control]=\\\"ngControl?.control\\\"></mt-field-validation>\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { predecessorCellTpl: [{ type: i0.ViewChild, args: ['predecessorCellTpl', { isSignal: true }] }], typeCellTpl: [{ type: i0.ViewChild, args: ['typeCellTpl', { isSignal: true }] }], lagCellTpl: [{ type: i0.ViewChild, args: ['lagCellTpl', { isSignal: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: \"label\", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: \"placeholder\", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: \"readonly\", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: \"required\", required: false }] }], configuration: [{ type: i0.Input, args: [{ isSignal: true, alias: \"configuration\", required: false }] }], runtimeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: \"runtimeContext\", required: false }] }] } });\n\n/**\n * Token used by `mt-entity-list-field` (Write mode) to open the rich add-row\n * dialog backed by `@masterteam/forms`'s `mt-client-form`. Apps that want this\n * behavior should call `provideEntityListAddForm()` from\n * `@masterteam/forms/entity-list-add-form` in their app providers. When the\n * token is not registered, the field falls back to a minimal text-only popup.\n */\nconst ENTITY_LIST_ADD_DIALOG_COMPONENT = new InjectionToken('ENTITY_LIST_ADD_DIALOG_COMPONENT');\n\nconst UNSORTABLE_ENTITY_VIEW_TYPES = new Set([\n 'Attachment',\n 'Checkbox',\n]);\nconst ACCESS_ALIASES = {\n '0': 'Auto',\n '1': 'Read',\n '2': 'Write',\n '3': 'ReadWrite',\n '4': 'None',\n auto: 'Auto',\n read: 'Read',\n write: 'Write',\n readwrite: 'ReadWrite',\n none: 'None',\n};\n/** Internal row keys — not rendered, used to correlate rows with entities. */\nconst ROW_ID_KEY = '__rowId';\nconst ROW_ENTITY_ID_KEY = '__entityId';\nconst ROW_VALUES_KEY = '__values';\nclass EntityListField {\n // Inputs\n label = input('', ...(ngDevMode ? [{ debugName: \"label\" }] : /* istanbul ignore next */ []));\n readonly = input(false, ...(ngDevMode ? [{ debugName: \"readonly\" }] : /* istanbul ignore next */ []));\n required = input(false, ...(ngDevMode ? [{ debugName: \"required\" }] : /* istanbul ignore next */ []));\n /** EntityList property id (kept for back-compat; unused by fetch/query). */\n propertyId = input(null, ...(ngDevMode ? [{ debugName: \"propertyId\" }] : /* istanbul ignore next */ []));\n /** Property configuration (sourceType, moduleId, access, readFields, etc). */\n configuration = input(null, ...(ngDevMode ? [{ debugName: \"configuration\" }] : /* istanbul ignore next */ []));\n /** Runtime ids needed to call the read endpoint. */\n runtimeContext = input(null, ...(ngDevMode ? [{ debugName: \"runtimeContext\" }] : /* istanbul ignore next */ []));\n /** Optional HttpContext (kept for back-compat). */\n context = input(undefined, ...(ngDevMode ? [{ debugName: \"context\" }] : /* istanbul ignore next */ []));\n // CVA state — pass-through value (EntityList stored JSON shape).\n storedValue = signal(null, ...(ngDevMode ? [{ debugName: \"storedValue\" }] : /* istanbul ignore next */ []));\n // Loaded table state.\n columns = signal([], ...(ngDevMode ? [{ debugName: \"columns\" }] : /* istanbul ignore next */ []));\n /** Rows loaded from the backend (existing target records). */\n rows = signal([], ...(ngDevMode ? [{ debugName: \"rows\" }] : /* istanbul ignore next */ []));\n loading = signal(false, ...(ngDevMode ? [{ debugName: \"loading\" }] : /* istanbul ignore next */ []));\n errorMessage = signal(null, ...(ngDevMode ? [{ debugName: \"errorMessage\" }] : /* istanbul ignore next */ []));\n disabled = signal(false, ...(ngDevMode ? [{ debugName: \"disabled\" }] : /* istanbul ignore next */ []));\n requiredValidator = Validators.required;\n ngControl = null;\n levelId = computed(() => {\n const raw = this.runtimeContext()?.levelId ?? null;\n return raw == null || raw === '' ? null : raw;\n }, ...(ngDevMode ? [{ debugName: \"levelId\" }] : /* istanbul ignore next */ []));\n levelDataId = computed(() => {\n const raw = this.runtimeContext()?.levelDataId ?? null;\n return raw == null || raw === '' ? null : raw;\n }, ...(ngDevMode ? [{ debugName: \"levelDataId\" }] : /* istanbul ignore next */ []));\n moduleId = computed(() => {\n const raw = this.configuration()\n ?.moduleId;\n return raw == null || raw === '' ? null : raw;\n }, ...(ngDevMode ? [{ debugName: \"moduleId\" }] : /* istanbul ignore next */ []));\n readFields = computed(() => {\n const raw = this.configuration()\n ?.readFields;\n if (!Array.isArray(raw))\n return [];\n return raw.filter((f) => typeof f === 'string' && f.length > 0);\n }, ...(ngDevMode ? [{ debugName: \"readFields\" }] : /* istanbul ignore next */ []));\n /** Normalized `access` from the property configuration. */\n accessMode = computed(() => {\n const raw = this.configuration()?.access;\n if (raw == null || raw === '')\n return 'Auto';\n return ACCESS_ALIASES[String(raw).trim().toLowerCase()] ?? 'Auto';\n }, ...(ngDevMode ? [{ debugName: \"accessMode\" }] : /* istanbul ignore next */ []));\n canRead = computed(() => {\n const access = this.accessMode();\n return access === 'Auto' || access === 'Read' || access === 'ReadWrite';\n }, ...(ngDevMode ? [{ debugName: \"canRead\" }] : /* istanbul ignore next */ []));\n /** Access allows module-backed create/update/delete. */\n writeAllowed = computed(() => {\n const access = this.accessMode();\n return access === 'Auto' || access === 'Write' || access === 'ReadWrite';\n }, ...(ngDevMode ? [{ debugName: \"writeAllowed\" }] : /* istanbul ignore next */ []));\n /** Write UI is rendered only when access allows it and the field is editable. */\n canWrite = computed(() => this.writeAllowed() && !this.readonly(), ...(ngDevMode ? [{ debugName: \"canWrite\" }] : /* istanbul ignore next */ []));\n writeFields = computed(() => {\n const raw = this.configuration()\n ?.writeFields;\n if (!Array.isArray(raw))\n return [];\n return raw.filter((f) => typeof f === 'string' && f.length > 0);\n }, ...(ngDevMode ? [{ debugName: \"writeFields\" }] : /* istanbul ignore next */ []));\n /**\n * Pending create/update rows, in the exact shape persisted by the backend\n * (`rows[]` of the stored EntityList JSON). Rows with `entityId > 0` are\n * partial updates of existing records; `entityId = 0` rows are creates.\n */\n pendingRows = signal([], ...(ngDevMode ? [{ debugName: \"pendingRows\" }] : /* istanbul ignore next */ []));\n /** Existing entity ids the user removed (submitted as `deletedIds`). */\n deletedIds = signal([], ...(ngDevMode ? [{ debugName: \"deletedIds\" }] : /* istanbul ignore next */ []));\n /** rowId → original form values / option labels (view state only). */\n rowDrafts = signal({}, ...(ngDevMode ? [{ debugName: \"rowDrafts\" }] : /* istanbul ignore next */ []));\n localRowSeq = 0;\n /** Serialized copy of the last value we emitted, to ignore CVA echoes. */\n lastEmittedJson = null;\n /** Server rows indexed by entity id, for merging pending updates. */\n rowsByEntityId = computed(() => {\n const map = new Map();\n for (const row of this.rows()) {\n const entityId = Number(row[ROW_ENTITY_ID_KEY]);\n if (entityId > 0)\n map.set(entityId, row);\n }\n return map;\n }, ...(ngDevMode ? [{ debugName: \"rowsByEntityId\" }] : /* istanbul ignore next */ []));\n /** Locally created rows (not yet persisted). */\n createdRows = computed(() => {\n const drafts = this.rowDrafts();\n return this.pendingRows()\n .filter((row) => !(row.entityId > 0))\n .map((row) => {\n const draft = drafts[row.rowId];\n return this.buildRow(row.rowId, row.rowId, 0, draft?.values ?? this.toValueMap(row.values), draft?.display ?? {});\n });\n }, ...(ngDevMode ? [{ debugName: \"createdRows\" }] : /* istanbul ignore next */ []));\n /** Pending edits of existing rows, keyed by entity id. */\n editedRowsByEntityId = computed(() => {\n const drafts = this.rowDrafts();\n const serverRows = this.rowsByEntityId();\n const map = new Map();\n for (const row of this.pendingRows()) {\n if (!(row.entityId > 0))\n continue;\n const base = serverRows.get(row.entityId);\n const draft = drafts[row.rowId];\n // A pending update only carries the keys the user changed.\n const changed = draft?.values ?? this.toValueMap(row.values);\n const display = draft?.display ?? {};\n if (!base) {\n map.set(row.entityId, this.buildRow(row.entityId, row.rowId, row.entityId, changed, display));\n continue;\n }\n // Keep the backend-rendered cells for untouched columns so resolved\n // labels (users, lookups, statuses) are not replaced by raw ids.\n const baseValues = base[ROW_VALUES_KEY] ?? {};\n const next = {\n ...base,\n [ROW_ID_KEY]: row.rowId,\n [ROW_VALUES_KEY]: { ...baseValues, ...changed },\n };\n for (const column of this.columns()) {\n const key = column.propertyKey ?? column.key;\n if (!(key in changed))\n continue;\n next[column.key] = this.buildCell(column, changed[key], display[key]);\n }\n map.set(row.entityId, next);\n }\n return map;\n }, ...(ngDevMode ? [{ debugName: \"editedRowsByEntityId\" }] : /* istanbul ignore next */ []));\n /**\n * Rows rendered in the table. In write mode existing rows are merged with\n * pending edits, removed rows are hidden, and locally created rows are\n * appended.\n */\n displayRows = computed(() => {\n if (!this.canWrite())\n return this.rows();\n const deleted = new Set(this.deletedIds());\n const edited = this.editedRowsByEntityId();\n const existing = this.rows()\n .filter((row) => !deleted.has(Number(row[ROW_ENTITY_ID_KEY])))\n .map((row) => edited.get(Number(row[ROW_ENTITY_ID_KEY])) ?? row);\n return [...existing, ...this.createdRows()];\n }, ...(ngDevMode ? [{ debugName: \"displayRows\" }] : /* istanbul ignore next */ []));\n hasRows = computed(() => this.displayRows().length > 0, ...(ngDevMode ? [{ debugName: \"hasRows\" }] : /* istanbul ignore next */ []));\n hasRequiredContext = computed(() => this.levelId() != null &&\n this.levelDataId() != null &&\n this.moduleId() != null &&\n this.readFields().length > 0, ...(ngDevMode ? [{ debugName: \"hasRequiredContext\" }] : /* istanbul ignore next */ []));\n onTouched = () => { };\n onModelChange = () => { };\n http = inject(HttpClient);\n destroyRef = inject(DestroyRef);\n modal = inject(ModalService);\n transloco = inject(TranslocoService);\n /**\n * Optional rich add-row dialog (provided by `@masterteam/forms` via\n * `provideEntityListAddForm()`). When available, used instead of the local\n * minimal dialog so the popup renders `mt-client-form` filtered by\n * `writeFields`.\n */\n addDialogComponent = inject(ENTITY_LIST_ADD_DIALOG_COMPONENT, { optional: true });\n constructor() {\n this.ngControl = inject(NgControl, { self: true, optional: true });\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n // Trigger fetch when context inputs change. Columns always come from\n // /api/fetch/query; records are kept whenever access allows reading.\n effect(() => {\n const allowedRead = this.canRead();\n const allowedWrite = this.writeAllowed();\n const ready = this.hasRequiredContext();\n const levelId = this.levelId();\n const levelDataId = this.levelDataId();\n const moduleId = this.moduleId();\n const readFields = this.readFields();\n untracked(() => {\n if ((!allowedRead && !allowedWrite) ||\n !ready ||\n levelId == null ||\n levelDataId == null ||\n moduleId == null) {\n this.columns.set([]);\n this.rows.set([]);\n this.errorMessage.set(null);\n return;\n }\n this.fetchRows(levelId, levelDataId, moduleId, readFields);\n });\n });\n }\n // ============================================================================\n // CVA\n // ============================================================================\n writeValue(value) {\n const incoming = this.coerceStoredValue(value);\n // Ignore the echo of our own emission (DynamicForm re-writes the model on\n // every value change) so pending edits/deletions are not reset.\n if (this.isEchoOfLastEmit(incoming))\n return;\n this.lastEmittedJson = null;\n this.storedValue.set(incoming);\n // Restore rows the backend left unprocessed. `deletedIds` on a loaded\n // value are historical operation markers, not pending intent.\n const rows = Array.isArray(incoming?.rows) ? incoming.rows : [];\n this.pendingRows.set(rows.filter((row) => !!row && typeof row === 'object'));\n this.deletedIds.set([]);\n this.rowDrafts.set({});\n }\n /**\n * True when the written value still carries exactly the rows and deletions\n * we last emitted — i.e. the form is echoing our own value back rather than\n * loading a new one.\n */\n isEchoOfLastEmit(incoming) {\n if (this.lastEmittedJson === null)\n return false;\n return (JSON.stringify({\n rows: incoming?.rows ?? [],\n deletedIds: incoming?.deletedIds ?? [],\n }) === this.lastEmittedJson);\n }\n /**\n * The stored value is persisted as JSON, so a host may write either the\n * parsed object or its raw string form.\n */\n coerceStoredValue(value) {\n if (value == null || value === '')\n return null;\n if (typeof value === 'string') {\n try {\n return this.coerceStoredValue(JSON.parse(value));\n }\n catch {\n return null;\n }\n }\n return typeof value === 'object' && !Array.isArray(value)\n ? value\n : null;\n }\n registerOnChange(fn) {\n this.onModelChange = fn;\n }\n registerOnTouched(fn) {\n this.onTouched = fn;\n }\n setDisabledState(isDisabled) {\n this.disabled.set(isDisabled);\n }\n // ============================================================================\n // Write mode — add / edit / delete\n // ============================================================================\n /** Row actions shown in write mode — edit and delete. */\n writeRowActions = computed(() => {\n if (this.disabled())\n return [];\n return [\n {\n icon: 'custom.pencil',\n tooltip: this.transloco.translate('components.entityListField.edit'),\n action: (row) => this.openEditDialog(row),\n },\n {\n icon: 'general.trash-01',\n tooltip: this.transloco.translate('components.entityListField.delete'),\n color: 'danger',\n confirmation: {\n type: 'popup',\n confirmationType: 'delete',\n },\n action: (row) => this.deleteRow(row),\n },\n ];\n }, ...(ngDevMode ? [{ debugName: \"writeRowActions\" }] : /* istanbul ignore next */ []));\n openAddDialog() {\n if (this.disabled())\n return;\n const component = this.addDialogComponent;\n if (!component)\n return;\n const ref = this.modal.openModal(component, 'dialog', {\n header: this.transloco.translate('components.entityListField.add'),\n styleClass: '!w-[48rem] max-w-[96vw]',\n dismissableMask: true,\n inputValues: {\n moduleId: this.moduleId(),\n levelId: this.levelId(),\n levelDataId: this.levelDataId(),\n writeFields: this.writeFields(),\n },\n });\n ref.onClose.pipe(take(1)).subscribe((result) => {\n const parsed = this.parseDialogResult(result);\n if (!parsed)\n return;\n // A create row carries every value the user filled in; empty fields are\n // dropped so the target module keeps its own defaults.\n const values = this.dropEmptyValues(parsed.values);\n const rowId = this.nextRowId();\n this.setRowDraft(rowId, values, parsed.display);\n this.pendingRows.set([\n ...this.pendingRows(),\n { rowId, entityId: 0, values: this.toSubmitValues(values) },\n ]);\n this.emitValue();\n });\n }\n openEditDialog(row) {\n if (this.disabled())\n return;\n const component = this.addDialogComponent;\n if (!component)\n return;\n const entityId = Number(row[ROW_ENTITY_ID_KEY]) || 0;\n const rowId = String(row[ROW_ID_KEY] ?? '');\n const initialValues = row[ROW_VALUES_KEY] ?? {};\n const ref = this.modal.openModal(component, 'dialog', {\n header: this.transloco.translate('components.entityListField.edit'),\n styleClass: '!w-[48rem] max-w-[96vw]',\n dismissableMask: true,\n inputValues: {\n moduleId: this.moduleId(),\n levelId: this.levelId(),\n levelDataId: this.levelDataId(),\n writeFields: this.writeFields(),\n initialValues,\n isEdit: true,\n },\n });\n ref.onClose.pipe(take(1)).subscribe((result) => {\n const parsed = this.parseDialogResult(result);\n if (!parsed)\n return;\n if (entityId > 0) {\n this.applyExistingRowEdit(entityId, rowId, initialValues, parsed);\n }\n else {\n this.applyCreatedRowEdit(rowId, parsed);\n }\n this.emitValue();\n });\n }\n /**\n * Existing target records are updated partially: only values the user\n * actually changed are submitted, so fields the dialog could not pre-fill\n * (keys outside `readFields`) are left untouched by the backend.\n */\n applyExistingRowEdit(entityId, fallbackRowId, initialValues, parsed) {\n const changed = this.diffValues(initialValues, parsed.values);\n const current = this.pendingRows();\n const existing = current.find((row) => row.entityId === entityId);\n const rowId = existing?.rowId || (fallbackRowId ? fallbackRowId : `entity-${entityId}`);\n const merged = {\n ...(this.rowDrafts()[rowId]?.values ?? {}),\n ...changed,\n };\n if (Object.keys(merged).length === 0) {\n // Nothing left to submit for this record — drop the pending update.\n this.clearRowDraft(rowId);\n this.pendingRows.set(current.filter((row) => row.entityId !== entityId));\n return;\n }\n this.setRowDraft(rowId, merged, parsed.display);\n const next = {\n rowId,\n entityId,\n values: this.toSubmitValues(merged),\n };\n this.pendingRows.set(existing\n ? current.map((row) => (row.entityId === entityId ? next : row))\n : [...current, next]);\n }\n /** A locally created row is replaced wholesale by the dialog result. */\n applyCreatedRowEdit(rowId, parsed) {\n const values = this.dropEmptyValues(parsed.values);\n this.setRowDraft(rowId, values, parsed.display);\n this.pendingRows.set(this.pendingRows().map((row) => row.rowId === rowId\n ? { ...row, values: this.toSubmitValues(values) }\n : row));\n }\n /**\n * Remove a row. Locally created rows are dropped from the pending payload;\n * existing records are queued in `deletedIds` for the backend to delete.\n */\n deleteRow(row) {\n if (this.disabled())\n return;\n const entityId = Number(row[ROW_ENTITY_ID_KEY]) || 0;\n const rowId = String(row[ROW_ID_KEY] ?? '');\n if (entityId > 0) {\n if (!this.deletedIds().includes(entityId)) {\n this.deletedIds.set([...this.deletedIds(), entityId]);\n }\n // A queued update for a deleted record is pointless — drop it.\n this.pendingRows.set(this.pendingRows().filter((pending) => pending.entityId !== entityId));\n }\n else {\n this.pendingRows.set(this.pendingRows().filter((pending) => pending.rowId !== rowId));\n }\n this.clearRowDraft(rowId);\n this.emitValue();\n }\n /**\n * Normalize the add/edit dialog close payload. The rich dialog returns\n * `{ values, display }`; a custom add-dialog may still return the raw values\n * object directly (no display map), which we treat as `display = {}`.\n */\n parseDialogResult(result) {\n if (!result || typeof result !== 'object')\n return null;\n const payload = result;\n const values = payload['values'];\n if (values && typeof values === 'object') {\n return {\n values: values,\n display: payload['display'] ?? {},\n };\n }\n return { values: payload, display: {} };\n }\n nextRowId() {\n const used = new Set(this.pendingRows().map((row) => row.rowId));\n let candidate = '';\n do {\n this.localRowSeq += 1;\n candidate = `client-${this.localRowSeq}`;\n } while (used.has(candidate));\n return candidate;\n }\n setRowDraft(rowId, values, display) {\n this.rowDrafts.set({ ...this.rowDrafts(), [rowId]: { values, display } });\n }\n clearRowDraft(rowId) {\n if (!rowId || !(rowId in this.rowDrafts()))\n return;\n const next = { ...this.rowDrafts() };\n delete next[rowId];\n this.rowDrafts.set(next);\n }\n buildRow(id, rowId, entityId, values, display = {}) {\n const row = {\n Id: id,\n [ROW_ID_KEY]: rowId,\n [ROW_ENTITY_ID_KEY]: entityId,\n [ROW_VALUES_KEY]: values,\n };\n for (const column of this.columns()) {\n // Form values are keyed by catalog property key (e.g. \"task_name\"),\n // but column.key is the normalizedKey (e.g. \"Name\"). Use propertyKey\n // for the lookup so the value is found.\n const key = column.propertyKey ?? column.key;\n row[column.key] = this.buildCell(column, values[key], display[key]);\n }\n return row;\n }\n /** Render one table cell from a raw form value and its resolved label. */\n buildCell(column, raw, label) {\n return {\n name: column.label ?? column.key,\n key: column.key,\n viewType: column.viewType ?? 'Text',\n value: this.toLocalEntityValue(column.viewType, raw, label),\n rawValue: raw ?? null,\n };\n }\n /**\n * Shape a raw form value into the value an entity renderer expects for the\n * given view type. Locally-added rows carry raw form values, but renderers\n * like `mt-entity-user` need a display object (`{ displayName }`) — a\n * team-member `User` field is a select whose control value is a bare user id.\n * `label` is the resolved option display (present for select-based fields).\n */\n toLocalEntityValue(viewType, raw, label) {\n if (viewType === 'User') {\n if (Array.isArray(raw)) {\n const names = raw\n .map((entry) => entry && typeof entry === 'object'\n ? (entry['displayName'] ?? '')\n : entry)\n .filter((name) => name != null && name !== '');\n return names.length ? { displayName: names.join(', ') } : '';\n }\n if (raw && typeof raw === 'object') {\n const user = raw;\n return {\n ...user,\n displayName: user['displayName'] ?? label ?? '',\n photoUrl: user['photoUrl'] ?? user['photo'] ?? '',\n };\n }\n if (raw != null && raw !== '') {\n const name = label == null ? String(raw) : String(label);\n return { id: String(raw), displayName: name, userName: name };\n }\n return '';\n }\n if (viewType === 'Status' || viewType === 'Lookup') {\n if (raw && typeof raw === 'object')\n return raw;\n if (raw != null && raw !== '' && label != null) {\n return { key: String(raw), display: String(label), color: '' };\n }\n return raw ?? '';\n }\n // Plain / scalar view types: prefer a resolved option label when present,\n // else the raw value (unchanged for text / number / date / percentage).\n if (label != null && (raw == null || typeof raw !== 'object')) {\n return Array.isArray(label) ? label.join(', ') : label;\n }\n return raw ?? '';\n }\n // ============================================================================\n // Submit payload (see EntityList.md — \"Stored Value Shape\")\n // ============================================================================\n emitValue() {\n const current = this.storedValue();\n // `entityIds` / `createdIds` / `updatedIds` / `snapshot` are backend-owned\n // and passed through untouched; the frontend only contributes pending rows\n // and delete intents.\n const next = {\n ...(current ?? {}),\n rows: this.pendingRows(),\n deletedIds: this.deletedIds(),\n };\n this.storedValue.set(next);\n this.lastEmittedJson = JSON.stringify({\n rows: next.rows,\n deletedIds: next.deletedIds,\n });\n this.onModelChange(next);\n this.onTouched();\n }\n /** `values[]` entries, restricted to `writeFields` when configured. */\n toSubmitValues(values) {\n const allowed = new Set(this.writeFields());\n return Object.entries(values)\n .filter(([propertyKey]) => allowed.size === 0 || allowed.has(propertyKey))\n .map(([propertyKey, value]) => ({\n propertyKey,\n rawValue: this.toRawValue(value),\n }));\n }\n /** Backend `rawValue` is a serialized scalar; objects/arrays go as JSON. */\n toRawValue(value) {\n if (value == null || value === '')\n return null;\n if (value instanceof Date)\n return value.toISOString();\n if (typeof value === 'object')\n return JSON.stringify(value);\n return String(value);\n }\n toValueMap(values) {\n const map = {};\n for (const value of values ?? []) {\n if (!value?.propertyKey)\n continue;\n map[value.propertyKey] = value.rawValue;\n }\n return map;\n }\n dropEmptyValues(values) {\n const next = {};\n for (const [key, value] of Object.entries(values)) {\n if (this.isEmptyValue(value))\n continue;\n next[key] = value;\n }\n return next;\n }\n /**\n * Keys the user actually changed. A key that was empty before and is still\n * empty is skipped (the dialog simply could not pre-fill it); a key that had\n * a value and is now empty is kept so the backend clears it.\n */\n diffValues(initial, next) {\n const changed = {};\n for (const [key, value] of Object.entries(next)) {\n const before = initial[key];\n if (this.isEmptyValue(value) && this.isEmptyValue(before))\n continue;\n if (this.isSameValue(before, value))\n continue;\n changed[key] = value;\n }\n return changed;\n }\n isEmptyValue(value) {\n if (value == null || value === '')\n return true;\n if (Array.isArray(value))\n return value.length === 0;\n return false;\n }\n isSameValue(a, b) {\n if (a === b)\n return true;\n // Values arriving from the read endpoint are serialized; compare the\n // submit-shaped representation so \"5\" and 5 are not treated as a change.\n return this.toRawValue(a) === this.toRawValue(b);\n }\n // ============================================================================\n // Read endpoint — POST /api/fetch/query (Table projection)\n // ============================================================================\n fetchRows(levelId, levelDataId, moduleId, propertyKeys) {\n this.loading.set(true);\n this.errorMessage.set(null);\n const ctx = this.context();\n const body = {\n contextKey: `level:${levelId}/module:${moduleId}`,\n projection: 'Table',\n surfaceKey: 'table',\n propertyKeys,\n filters: [\n {\n key: 'levelDataId',\n operator: 'Equals',\n value: String(levelDataId),\n },\n ],\n page: 1,\n pageSize: 3000,\n };\n this.http\n .post('fetch/query', body, ctx ? { context: ctx } : {})\n .pipe(takeUntilDestroyed(this.destroyRef), finalize(() => this.loading.set(false)), catchError((err) => {\n console.error('EntityList fetch/query failed', err);\n this.errorMessage.set(this.transloco.translate('components.entityListField.loadFailed'));\n return of({});\n }))\n .subscribe((response) => {\n const payload = response && typeof response === 'object' && 'data' in response\n ? (response.data ?? response)\n : response;\n this.applyResponse(payload);\n });\n }\n applyResponse(response) {\n // Build property maps first so column defs can include the propertyKey\n // mapping (normalizedKey → catalog key) needed for row value lookup.\n const propertyByKey = new Map();\n const propertyByNormalizedKey = new Map();\n for (const property of response.catalog?.properties ?? []) {\n propertyByKey.set(property.key, property);\n propertyByNormalizedKey.set(property.normalizedKey, property);\n }\n const columns = (response.projectionMeta?.columns ?? [])\n .filter((column) => column.visible)\n .sort((a, b) => a.order - b.order)\n .map((column) => ({\n key: column.key,\n label: column.label,\n type: 'entity',\n sortable: !UNSORTABLE_ENTITY_VIEW_TYPES.has(column.viewType),\n viewType: column.viewType,\n order: column.order,\n visible: column.visible,\n configuration: column.configuration ?? null,\n // Store the catalog property key so buildRow can look up form values\n // keyed by property key (e.g. \"task_name\") rather than the\n // normalizedKey used as the column display key (e.g. \"Name\").\n propertyKey: propertyByNormalizedKey.get(column.key)?.key ?? column.key,\n }));\n this.columns.set(columns);\n // Reading blocked (access = Write / None): keep the columns, drop records.\n if (!this.canRead()) {\n this.rows.set([]);\n return;\n }\n const rows = (response.records ?? []).map((record) => {\n const values = {};\n const row = {\n Id: record.id,\n [ROW_ID_KEY]: `entity-${record.id}`,\n [ROW_ENTITY_ID_KEY]: record.id,\n };\n for (const column of columns) {\n const property = propertyByKey.get(column.key) ??\n propertyByNormalizedKey.get(column.key);\n const propertyKey = property?.key ?? column.key;\n const cell = record.values?.[propertyKey];\n row[column.key] = this.toEntityData(column, cell, property, record.id);\n // Keep the machine-readable value so the edit dialog can pre-fill and\n // partial updates can be diffed against it.\n values[propertyKey] = cell?.raw ?? cell?.value ?? null;\n }\n row[ROW_VALUES_KEY] = values;\n return row;\n });\n this.rows.set(rows);\n }\n toEntityData(column, cell, property, recordId) {\n return {\n id: recordId,\n propertyId: property?.id,\n key: property?.key ?? column.key,\n normalizedKey: property?.normalizedKey ?? column.key,\n name: column.label ?? property?.label ?? column.key,\n rawValue: cell?.raw === null || cell?.raw === undefined\n ? undefined\n : String(cell.raw),\n value: (cell?.value ?? ''),\n viewType: (column.viewType ?? 'Text'),\n type: property?.source,\n order: column.order ?? property?.order,\n configuration: column.configuration,\n propertyConfiguration: property?.configuration ?? undefined,\n comparison: cell?.comparison,\n };\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: EntityListField, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.2.8\", type: EntityListField, isStandalone: true, selector: \"mt-entity-list-field\", inputs: { label: { classPropertyName: \"label\", publicName: \"label\", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: \"readonly\", publicName: \"readonly\", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: \"required\", publicName: \"required\", isSignal: true, isRequired: false, transformFunction: null }, propertyId: { classPropertyName: \"propertyId\", publicName: \"propertyId\", isSignal: true, isRequired: false, transformFunction: null }, configuration: { classPropertyName: \"configuration\", publicName: \"configuration\", isSignal: true, isRequired: false, transformFunction: null }, runtimeContext: { classPropertyName: \"runtimeContext\", publicName: \"runtimeContext\", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: \"context\", publicName: \"context\", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: \"grid gap-1\" }, ngImport: i0, template: \"<div class=\\\"flex flex-col gap-2\\\">\\r\\n @if (label()) {\\r\\n <label class=\\\"font-medium text-color\\\">\\r\\n {{ label() }}\\r\\n @if (required()) {\\r\\n <span class=\\\"text-red-500\\\">*</span>\\r\\n }\\r\\n </label>\\r\\n }\\r\\n\\r\\n @if (errorMessage(); as err) {\\r\\n <p-message severity=\\\"error\\\" [text]=\\\"err\\\" styleClass=\\\"w-full\\\" />\\r\\n } @else if (canWrite()) {\\r\\n <div class=\\\"flex justify-end\\\">\\r\\n <mt-button\\r\\n [label]=\\\"'components.entityListField.add' | transloco\\\"\\r\\n icon=\\\"general.plus\\\"\\r\\n size=\\\"small\\\"\\r\\n [disabled]=\\\"disabled()\\\"\\r\\n (onClick)=\\\"openAddDialog()\\\"\\r\\n />\\r\\n </div>\\r\\n <mt-table\\r\\n [noCard]=\\\"true\\\"\\r\\n [data]=\\\"displayRows()\\\"\\r\\n [columns]=\\\"columns()\\\"\\r\\n [rowActions]=\\\"writeRowActions()\\\"\\r\\n dataKey=\\\"Id\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n />\\r\\n } @else if (!canRead()) {\\r\\n <div\\r\\n class=\\\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.entityListField.readingNotAllowed\\\" | transloco }}\\r\\n </div>\\r\\n } @else if (!hasRequiredContext()) {\\r\\n <div\\r\\n class=\\\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.entityListField.saveFormFirst\\\" | transloco }}\\r\\n </div>\\r\\n } @else if (loading() && !hasRows()) {\\r\\n <div class=\\\"flex flex-col gap-2\\\">\\r\\n <p-skeleton width=\\\"100%\\\" height=\\\"3rem\\\" />\\r\\n <p-skeleton width=\\\"100%\\\" height=\\\"3rem\\\" />\\r\\n </div>\\r\\n } @else if (!hasRows()) {\\r\\n <div\\r\\n class=\\\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.entityListField.noRelatedItems\\\" | transloco }}\\r\\n </div>\\r\\n } @else {\\r\\n <mt-table\\r\\n [noCard]=\\\"true\\\"\\r\\n [data]=\\\"displayRows()\\\"\\r\\n [columns]=\\\"columns()\\\"\\r\\n dataKey=\\\"Id\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n />\\r\\n }\\r\\n\\r\\n @if (ngControl?.control) {\\r\\n <mt-field-validation\\r\\n [control]=\\\"ngControl?.control!\\\"\\r\\n [touched]=\\\"ngControl?.touched ?? false\\\"\\r\\n />\\r\\n }\\r\\n</div>\\r\\n\", styles: [\":host{display:block}\\n\"], dependencies: [{ kind: \"ngmodule\", type: CommonModule }, { kind: \"component\", type: FieldValidation, selector: \"mt-field-validation\", inputs: [\"control\", \"touched\", \"messageId\"] }, { kind: \"component\", type: Skeleton, selector: \"p-skeleton\", inputs: [\"styleClass\", \"shape\", \"animation\", \"borderRadius\", \"size\", \"width\", \"height\"] }, { kind: \"component\", type: Message, selector: \"p-message\", inputs: [\"severity\", \"text\", \"escape\", \"style\", \"styleClass\", \"closable\", \"icon\", \"closeIcon\", \"life\", \"showTransitionOptions\", \"hideTransitionOptions\", \"size\", \"variant\", \"motionOptions\"], outputs: [\"onClose\"] }, { kind: \"component\", type: Table, selector: \"mt-table\", inputs: [\"filters\", \"data\", \"columns\", \"rowActions\", \"size\", \"showGridlines\", \"stripedRows\", \"selectableRows\", \"clickableRows\", \"generalSearch\", \"lazyLocalSearch\", \"showFilters\", \"filterMode\", \"loading\", \"updating\", \"lazy\", \"lazyLocalSort\", \"lazyTotalRecords\", \"reorderableColumns\", \"reorderableRows\", \"dataKey\", \"storageKey\", \"storageMode\", \"persistStateExclude\", \"exportable\", \"printable\", \"groupable\", \"groupCountMap\", \"cellClickFilter\", \"freezeActions\", \"virtualScroll\", \"virtualScrollItemSize\", \"scrollHeight\", \"printTitle\", \"exportFilename\", \"actionShape\", \"rowActionsLoadingFn\", \"tableLayout\", \"noCard\", \"tabs\", \"tabsOptionLabel\", \"tabsOptionValue\", \"activeTab\", \"actions\", \"emptyTitle\", \"emptyDescription\", \"emptyActionLabel\", \"emptyActionIcon\", \"paginatorPosition\", \"alwaysShowPaginator\", \"rowsPerPageOptions\", \"pageSize\", \"currentPage\", \"first\", \"filterTerm\", \"groupBy\", \"sortField\", \"sortDirection\"], outputs: [\"selectionChange\", \"cellChange\", \"lazyLoad\", \"columnReorder\", \"rowReorder\", \"rowClick\", \"emptyAction\", \"rowActionsRequested\", \"filtersChange\", \"activeTabChange\", \"onTabChange\", \"pageSizeChange\", \"currentPageChange\", \"firstChange\", \"filterTermChange\", \"groupByChange\", \"sortFieldChange\", \"sortDirectionChange\"] }, { kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\", \"ariaLabel\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }, { kind: \"pipe\", type: TranslocoPipe, name: \"transloco\" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: EntityListField, decorators: [{\n type: Component,\n args: [{ selector: 'mt-entity-list-field', standalone: true, imports: [\n CommonModule,\n FieldValidation,\n Skeleton,\n Message,\n Table,\n Button,\n TranslocoPipe,\n ], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'grid gap-1' }, template: \"<div class=\\\"flex flex-col gap-2\\\">\\r\\n @if (label()) {\\r\\n <label class=\\\"font-medium text-color\\\">\\r\\n {{ label() }}\\r\\n @if (required()) {\\r\\n <span class=\\\"text-red-500\\\">*</span>\\r\\n }\\r\\n </label>\\r\\n }\\r\\n\\r\\n @if (errorMessage(); as err) {\\r\\n <p-message severity=\\\"error\\\" [text]=\\\"err\\\" styleClass=\\\"w-full\\\" />\\r\\n } @else if (canWrite()) {\\r\\n <div class=\\\"flex justify-end\\\">\\r\\n <mt-button\\r\\n [label]=\\\"'components.entityListField.add' | transloco\\\"\\r\\n icon=\\\"general.plus\\\"\\r\\n size=\\\"small\\\"\\r\\n [disabled]=\\\"disabled()\\\"\\r\\n (onClick)=\\\"openAddDialog()\\\"\\r\\n />\\r\\n </div>\\r\\n <mt-table\\r\\n [noCard]=\\\"true\\\"\\r\\n [data]=\\\"displayRows()\\\"\\r\\n [columns]=\\\"columns()\\\"\\r\\n [rowActions]=\\\"writeRowActions()\\\"\\r\\n dataKey=\\\"Id\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n />\\r\\n } @else if (!canRead()) {\\r\\n <div\\r\\n class=\\\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.entityListField.readingNotAllowed\\\" | transloco }}\\r\\n </div>\\r\\n } @else if (!hasRequiredContext()) {\\r\\n <div\\r\\n class=\\\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.entityListField.saveFormFirst\\\" | transloco }}\\r\\n </div>\\r\\n } @else if (loading() && !hasRows()) {\\r\\n <div class=\\\"flex flex-col gap-2\\\">\\r\\n <p-skeleton width=\\\"100%\\\" height=\\\"3rem\\\" />\\r\\n <p-skeleton width=\\\"100%\\\" height=\\\"3rem\\\" />\\r\\n </div>\\r\\n } @else if (!hasRows()) {\\r\\n <div\\r\\n class=\\\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.entityListField.noRelatedItems\\\" | transloco }}\\r\\n </div>\\r\\n } @else {\\r\\n <mt-table\\r\\n [noCard]=\\\"true\\\"\\r\\n [data]=\\\"displayRows()\\\"\\r\\n [columns]=\\\"columns()\\\"\\r\\n dataKey=\\\"Id\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n />\\r\\n }\\r\\n\\r\\n @if (ngControl?.control) {\\r\\n <mt-field-validation\\r\\n [control]=\\\"ngControl?.control!\\\"\\r\\n [touched]=\\\"ngControl?.touched ?? false\\\"\\r\\n />\\r\\n }\\r\\n</div>\\r\\n\", styles: [\":host{display:block}\\n\"] }]\n }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: \"label\", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: \"readonly\", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: \"required\", required: false }] }], propertyId: [{ type: i0.Input, args: [{ isSignal: true, alias: \"propertyId\", required: false }] }], configuration: [{ type: i0.Input, args: [{ isSignal: true, alias: \"configuration\", required: false }] }], runtimeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: \"runtimeContext\", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: \"context\", required: false }] }] } });\n\n/** Page size when loading the full deliverable list, and a hard safety cap. */\nconst PAGE_SIZE = 100;\nconst MAX_ITEMS = 5000;\n/**\n * Runtime picker for `ScheduleItemSelector` properties.\n *\n * Backend-filtered: the full option list comes from\n * `GET forms/options/{propertyKey}` (which applies the configured rule, e.g.\n * `DeliverableAcceptance.AvailableDeliverables`). All available items are\n * loaded up front and rendered with the standard `mt-select-field` /\n * `mt-multi-select-field`; the field shows only the item name.\n *\n * The control value is always a numeric id array (`valueMode = \"IdArray\"`).\n * In `Single` mode only one id may be selected.\n */\nclass ScheduleItemSelectorField {\n label = input('', ...(ngDevMode ? [{ debugName: \"label\" }] : /* istanbul ignore next */ []));\n placeholder = input('', ...(ngDevMode ? [{ debugName: \"placeholder\" }] : /* istanbul ignore next */ []));\n readonly = input(false, ...(ngDevMode ? [{ debugName: \"readonly\" }] : /* istanbul ignore next */ []));\n required = input(false, ...(ngDevMode ? [{ debugName: \"required\" }] : /* istanbul ignore next */ []));\n propertyKey = input('', ...(ngDevMode ? [{ debugName: \"propertyKey\" }] : /* istanbul ignore next */ []));\n selectionMode = input('Multi', ...(ngDevMode ? [{ debugName: \"selectionMode\" }] : /* istanbul ignore next */ []));\n runtimeContext = input(null, ...(ngDevMode ? [{ debugName: \"runtimeContext\" }] : /* istanbul ignore next */ []));\n context = input(undefined, ...(ngDevMode ? [{ debugName: \"context\" }] : /* istanbul ignore next */ []));\n /** Full list of available deliverables (loaded once). */\n options = signal([], ...(ngDevMode ? [{ debugName: \"options\" }] : /* istanbul ignore next */ []));\n loading = signal(false, ...(ngDevMode ? [{ debugName: \"loading\" }] : /* istanbul ignore next */ []));\n disabled = signal(false, ...(ngDevMode ? [{ debugName: \"disabled\" }] : /* istanbul ignore next */ []));\n /** Selected ids — the control value (`number[]`). */\n value = signal([], ...(ngDevMode ? [{ debugName: \"value\" }] : /* istanbul ignore next */ []));\n isMultiple = computed(() => this.selectionMode() !== 'Single', ...(ngDevMode ? [{ debugName: \"isMultiple\" }] : /* istanbul ignore next */ []));\n /** Single-mode ngModel value (a scalar id, not an array). */\n singleValue = computed(() => this.value()[0] ?? null, ...(ngDevMode ? [{ debugName: \"singleValue\" }] : /* istanbul ignore next */ []));\n ngControl = null;\n onTouched = () => { };\n onModelChange = () => { };\n http = inject(HttpClient);\n destroyRef = inject(DestroyRef);\n /** Query signature already loaded — prevents duplicate full loads. */\n loadedKey = null;\n constructor() {\n this.ngControl = inject(NgControl, { self: true, optional: true });\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n effect(() => {\n if (this.ngControl?.control && this.required()) {\n this.ngControl.control.addValidators(Validators.required);\n this.ngControl.control.updateValueAndValidity();\n }\n });\n // Load the full option list as soon as the query context is available.\n effect(() => {\n const key = this.queryKey();\n if (!key || this.loadedKey === key)\n return;\n untracked(() => this.loadAllOptions(key));\n });\n }\n // ── Selection ──────────────────────────────────────────────────────────\n onMultiChange(ids) {\n this.value.set(ids ?? []);\n this.emit();\n }\n onSingleChange(id) {\n this.value.set(id == null ? [] : [id]);\n this.emit();\n }\n // ── ControlValueAccessor ────────────────────────────────────────────────\n writeValue(value) {\n this.value.set(this.normalizeIds(value));\n }\n registerOnChange(fn) {\n this.onModelChange = fn;\n }\n registerOnTouched(fn) {\n this.onTouched = fn;\n }\n setDisabledState(disabled) {\n this.disabled.set(disabled);\n }\n // ── Option loading ──────────────────────────────────────────────────────\n loadAllOptions(key) {\n this.loadedKey = key;\n this.loading.set(true);\n this.fetchPage(0)\n .pipe(expand((page) => page.hasMore && page.nextSkip < MAX_ITEMS\n ? this.fetchPage(page.nextSkip)\n : EMPTY), reduce((acc, page) => acc.concat(page.options), []), takeUntilDestroyed(this.destroyRef), finalize(() => this.loading.set(false)), catchError(() => of([])))\n .subscribe((options) => this.options.set(options));\n }\n fetchPage(skip) {\n const params = this.buildParams(skip);\n if (!params) {\n return of({ options: [], hasMore: false, nextSkip: skip });\n }\n return this.http\n .get(`forms/options/${encodeURIComponent(this.propertyKey())}`, { params, context: this.context() })\n .pipe(map((response) => ({\n options: this.mapOptions(response),\n hasMore: !!response?.data?.hasMore,\n nextSkip: skip + PAGE_SIZE,\n })));\n }\n buildParams(skip) {\n const contextKey = this.buildContextKey();\n const levelDataId = this.runtimeContext()?.levelDataId;\n if (!contextKey || levelDataId == null)\n return null;\n let params = new HttpParams()\n .set('contextKey', contextKey)\n .set('levelDataId', String(levelDataId))\n .set('skip', String(skip))\n .set('take', String(PAGE_SIZE));\n const ownerRecordId = this.runtimeContext()?.ownerRecordId;\n if (ownerRecordId != null) {\n params = params.set('ownerRecordId', String(ownerRecordId));\n }\n return params;\n }\n mapOptions(response) {\n const items = response?.data?.items ?? [];\n return items\n .map((item) => {\n const id = Number(item.key);\n if (!Number.isFinite(id))\n return null;\n return { label: item.name || String(id), value: id };\n })\n .filter((option) => option != null);\n }\n // ── Context helpers ─────────────────────────────────────────────────────\n buildContextKey() {\n const levelId = this.runtimeContext()?.levelId;\n const moduleId = this.runtimeContext()?.moduleId;\n if (levelId == null || moduleId == null)\n return null;\n return `Level:${levelId}/Module:${moduleId}`;\n }\n queryKey() {\n const contextKey = this.buildContextKey();\n const levelDataId = this.runtimeContext()?.levelDataId;\n const propertyKey = this.propertyKey();\n if (!contextKey || levelDataId == null || !propertyKey)\n return null;\n const ownerRecordId = this.runtimeContext()?.ownerRecordId ?? '';\n return `${contextKey}|${levelDataId}|${ownerRecordId}|${propertyKey}`;\n }\n emit() {\n this.onModelChange(this.value());\n this.onTouched();\n }\n normalizeIds(value) {\n const raw = Array.isArray(value) ? value : value == null ? [] : [value];\n const ids = [];\n for (const entry of raw) {\n const id = entry && typeof entry === 'object'\n ? Number(entry.id)\n : Number(entry);\n if (Number.isFinite(id) && id > 0 && !ids.includes(id)) {\n ids.push(id);\n }\n }\n return ids;\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: ScheduleItemSelectorField, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.2.8\", type: ScheduleItemSelectorField, isStandalone: true, selector: \"mt-schedule-item-selector-field\", inputs: { label: { classPropertyName: \"label\", publicName: \"label\", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: \"placeholder\", publicName: \"placeholder\", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: \"readonly\", publicName: \"readonly\", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: \"required\", publicName: \"required\", isSignal: true, isRequired: false, transformFunction: null }, propertyKey: { classPropertyName: \"propertyKey\", publicName: \"propertyKey\", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: \"selectionMode\", publicName: \"selectionMode\", isSignal: true, isRequired: false, transformFunction: null }, runtimeContext: { classPropertyName: \"runtimeContext\", publicName: \"runtimeContext\", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: \"context\", publicName: \"context\", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: \"block\" }, ngImport: i0, template: \"@if (isMultiple()) {\\r\\n <mt-multi-select-field\\r\\n [label]=\\\"label()\\\"\\r\\n [placeholder]=\\\"placeholder()\\\"\\r\\n [options]=\\\"options()\\\"\\r\\n [optionLabel]=\\\"'label'\\\"\\r\\n [optionValue]=\\\"'value'\\\"\\r\\n [filter]=\\\"options().length > 10\\\"\\r\\n [showClear]=\\\"!required()\\\"\\r\\n [required]=\\\"required()\\\"\\r\\n [readonly]=\\\"readonly() || disabled()\\\"\\r\\n [ngModel]=\\\"value()\\\"\\r\\n [ngModelOptions]=\\\"{ standalone: true }\\\"\\r\\n (ngModelChange)=\\\"onMultiChange($event)\\\"\\r\\n />\\r\\n} @else {\\r\\n <mt-select-field\\r\\n [label]=\\\"label()\\\"\\r\\n [placeholder]=\\\"placeholder()\\\"\\r\\n [options]=\\\"options()\\\"\\r\\n [optionLabel]=\\\"'label'\\\"\\r\\n [optionValue]=\\\"'value'\\\"\\r\\n [filter]=\\\"options().length > 10\\\"\\r\\n [showClear]=\\\"!required()\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n [required]=\\\"required()\\\"\\r\\n [readonly]=\\\"readonly() || disabled()\\\"\\r\\n [ngModel]=\\\"singleValue()\\\"\\r\\n [ngModelOptions]=\\\"{ standalone: true }\\\"\\r\\n (ngModelChange)=\\\"onSingleChange($event)\\\"\\r\\n />\\r\\n}\\r\\n\", dependencies: [{ kind: \"ngmodule\", type: FormsModule }, { kind: \"directive\", type: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.RequiredValidator, selector: \":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]\", inputs: [\"required\"] }, { kind: \"directive\", type: i1.NgModel, selector: \"[ngModel]:not([formControlName]):not([formControl])\", inputs: [\"name\", \"disabled\", \"ngModel\", \"ngModelOptions\"], outputs: [\"ngModelChange\"], exportAs: [\"ngModel\"] }, { kind: \"component\", type: MultiSelectField, selector: \"mt-multi-select-field\", inputs: [\"field\", \"label\", \"placeholder\", \"class\", \"readonly\", \"pInputs\", \"options\", \"optionValue\", \"optionLabel\", \"filter\", \"filterBy\", \"dataKey\", \"showClear\", \"display\", \"required\", \"maxSelectedLabels\", \"group\", \"virtualScroll\", \"virtualScrollItemSize\", \"optionGroupLabel\", \"optionGroupChildren\", \"optionIcon\", \"optionIconColor\", \"optionIconShape\", \"optionAvatarShape\", \"optionGroupIcon\", \"optionGroupIconColor\", \"optionGroupIconShape\", \"optionGroupAvatarShape\"], outputs: [\"onChange\"] }, { kind: \"component\", type: SelectField, selector: \"mt-select-field\", inputs: [\"field\", \"hint\", \"label\", \"placeholder\", \"hasPlaceholderPrefix\", \"class\", \"readonly\", \"pInputs\", \"options\", \"optionValue\", \"optionLabel\", \"filter\", \"filterBy\", \"dataKey\", \"showClear\", \"clearAfterSelect\", \"required\", \"group\", \"size\", \"optionGroupLabel\", \"optionGroupChildren\", \"loading\", \"optionIcon\", \"optionIconColor\", \"optionIconShape\", \"optionAvatarShape\", \"optionGroupIcon\", \"optionGroupIconColor\", \"optionGroupIconShape\", \"optionGroupAvatarShape\", \"markCurrentUser\"], outputs: [\"onChange\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: ScheduleItemSelectorField, decorators: [{\n type: Component,\n args: [{ selector: 'mt-schedule-item-selector-field', standalone: true, imports: [FormsModule, MultiSelectField, SelectField], changeDetection: ChangeDetectionStrategy.OnPush, host: {\n class: 'block',\n }, template: \"@if (isMultiple()) {\\r\\n <mt-multi-select-field\\r\\n [label]=\\\"label()\\\"\\r\\n [placeholder]=\\\"placeholder()\\\"\\r\\n [options]=\\\"options()\\\"\\r\\n [optionLabel]=\\\"'label'\\\"\\r\\n [optionValue]=\\\"'value'\\\"\\r\\n [filter]=\\\"options().length > 10\\\"\\r\\n [showClear]=\\\"!required()\\\"\\r\\n [required]=\\\"required()\\\"\\r\\n [readonly]=\\\"readonly() || disabled()\\\"\\r\\n [ngModel]=\\\"value()\\\"\\r\\n [ngModelOptions]=\\\"{ standalone: true }\\\"\\r\\n (ngModelChange)=\\\"onMultiChange($event)\\\"\\r\\n />\\r\\n} @else {\\r\\n <mt-select-field\\r\\n [label]=\\\"label()\\\"\\r\\n [placeholder]=\\\"placeholder()\\\"\\r\\n [options]=\\\"options()\\\"\\r\\n [optionLabel]=\\\"'label'\\\"\\r\\n [optionValue]=\\\"'value'\\\"\\r\\n [filter]=\\\"options().length > 10\\\"\\r\\n [showClear]=\\\"!required()\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n [required]=\\\"required()\\\"\\r\\n [readonly]=\\\"readonly() || disabled()\\\"\\r\\n [ngModel]=\\\"singleValue()\\\"\\r\\n [ngModelOptions]=\\\"{ standalone: true }\\\"\\r\\n (ngModelChange)=\\\"onSingleChange($event)\\\"\\r\\n />\\r\\n}\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: \"label\", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: \"placeholder\", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: \"readonly\", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: \"required\", required: false }] }], propertyKey: [{ type: i0.Input, args: [{ isSignal: true, alias: \"propertyKey\", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: \"selectionMode\", required: false }] }], runtimeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: \"runtimeContext\", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: \"context\", required: false }] }] } });\n\n/**\n * Token used by `mt-lookup-module-check-list-field` to render the checklist\n * sections + per-section forms via `@masterteam/forms`'s `mt-client-form`\n * machinery (`/api/process-form-load`, loaded once). Apps register it with\n * `provideLookupModuleCheckListForm()` from\n * `@masterteam/forms/lookup-module-check-list-form`. When the token is not\n * registered, the field falls back to plain text inputs per property.\n */\nconst LOOKUP_CHECK_LIST_FORM_COMPONENT = new InjectionToken('LOOKUP_CHECK_LIST_FORM_COMPONENT');\n\nclass LookupModuleCheckListField {\n label = input('', ...(ngDevMode ? [{ debugName: \"label\" }] : /* istanbul ignore next */ []));\n readonly = input(false, ...(ngDevMode ? [{ debugName: \"readonly\" }] : /* istanbul ignore next */ []));\n required = input(false, ...(ngDevMode ? [{ debugName: \"required\" }] : /* istanbul ignore next */ []));\n /** Lookup items rendered as collapsible checklist sections. */\n lookupOptions = input([], ...(ngDevMode ? [{ debugName: \"lookupOptions\" }] : /* istanbul ignore next */ []));\n /** Full lookup catalog passed to the rich nested form renderer. */\n lookups = input([], ...(ngDevMode ? [{ debugName: \"lookups\" }] : /* istanbul ignore next */ []));\n /** Module property keys/labels (used by the text fallback + labels). */\n propertyFields = input([], ...(ngDevMode ? [{ debugName: \"propertyFields\" }] : /* istanbul ignore next */ []));\n /** Scope module id whose form is loaded for each section. */\n scopeId = input(null, ...(ngDevMode ? [{ debugName: \"scopeId\" }] : /* istanbul ignore next */ []));\n /** Property keys to render in each section form. */\n propertyKeys = input([], ...(ngDevMode ? [{ debugName: \"propertyKeys\" }] : /* istanbul ignore next */ []));\n /** Runtime ids needed to load each section form. */\n runtimeContext = input(null, ...(ngDevMode ? [{ debugName: \"runtimeContext\" }] : /* istanbul ignore next */ []));\n /** Per-lookupKey captured values, keyed by property key. */\n sectionValues = signal({}, ...(ngDevMode ? [{ debugName: \"sectionValues\" }] : /* istanbul ignore next */ []));\n expandedKeys = signal(new Set(), ...(ngDevMode ? [{ debugName: \"expandedKeys\" }] : /* istanbul ignore next */ []));\n disabled = signal(false, ...(ngDevMode ? [{ debugName: \"disabled\" }] : /* istanbul ignore next */ []));\n /** True when a section's required inner fields are unfilled. */\n incomplete = signal(false, ...(ngDevMode ? [{ debugName: \"incomplete\" }] : /* istanbul ignore next */ []));\n ngControl = null;\n /**\n * Rich checklist form provided by `@masterteam/forms`\n * (`provideLookupModuleCheckListForm()`). When absent the field falls back to\n * plain text inputs per property.\n */\n formComponent = inject(LOOKUP_CHECK_LIST_FORM_COMPONENT, {\n optional: true,\n });\n isReadonly = computed(() => this.readonly() || this.disabled(), ...(ngDevMode ? [{ debugName: \"isReadonly\" }] : /* istanbul ignore next */ []));\n sections = computed(() => this.lookupOptions().map((option) => ({\n lookupKey: String(option.value ?? option.key ?? ''),\n label: option.label ?? String(option.value ?? option.key ?? ''),\n })), ...(ngDevMode ? [{ debugName: \"sections\" }] : /* istanbul ignore next */ []));\n /**\n * Use the rich form whenever it's registered and a scope module is set. The\n * scope form only needs `scopeId` to load its field definitions; `levelId` /\n * `levelDataId` are passed when available but are not required (e.g. they are\n * null while creating a brand-new Level instance).\n */\n useRichForm = computed(() => !!this.formComponent && this.scopeId() != null, ...(ngDevMode ? [{ debugName: \"useRichForm\" }] : /* istanbul ignore next */ []));\n /**\n * The last externally-written value (via `writeValue`). Passed to the rich\n * form as its initial value. It is intentionally NOT updated from the form's\n * own `valueChange` — feeding emitted values back as an input would create an\n * infinite change-detection loop.\n */\n incomingValue = signal(null, ...(ngDevMode ? [{ debugName: \"incomingValue\" }] : /* istanbul ignore next */ []));\n onTouched = () => { };\n onModelChange = () => { };\n control = null;\n validatorAttached = false;\n /**\n * Validator attached imperatively to the host control. Attaching it here\n * (rather than via an `NG_VALIDATORS` provider) avoids a circular dependency\n * with the self-injected `NgControl` used as the value accessor.\n */\n checklistValidator = () => this.incomplete() ? { checklistIncomplete: true } : null;\n /** Stable callbacks so the outlet inputs object stays referentially calm. */\n emitValue = (value) => {\n // The rich form is the source of truth; forward its value without writing\n // back into `incomingValue` (which would re-feed the form and loop).\n this.onModelChange(value ?? null);\n this.onTouched();\n };\n emitValidity = (invalid) => {\n if (this.incomplete() === invalid)\n return;\n this.incomplete.set(invalid);\n this.ensureValidator();\n this.control?.updateValueAndValidity({ emitEvent: false });\n };\n constructor() {\n this.ngControl = inject(NgControl, { self: true, optional: true });\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n ngOnInit() {\n this.ensureValidator();\n this.control?.updateValueAndValidity({ emitEvent: false });\n }\n ensureValidator() {\n if (this.validatorAttached)\n return;\n const control = this.ngControl?.control;\n if (!control)\n return;\n this.control = control;\n control.addValidators(this.checklistValidator);\n this.validatorAttached = true;\n }\n // ============================================================================\n // CVA\n // ============================================================================\n writeValue(value) {\n this.incomingValue.set(value);\n this.sectionValues.set(this.normalizeIncoming(value));\n }\n registerOnChange(fn) {\n this.onModelChange = fn;\n }\n registerOnTouched(fn) {\n this.onTouched = fn;\n }\n setDisabledState(isDisabled) {\n this.disabled.set(isDisabled);\n }\n // ============================================================================\n // Rich form host\n // ============================================================================\n formInputs = computed(() => ({\n lookupOptions: this.lookupOptions(),\n lookups: this.lookups(),\n propertyKeys: this.propertyKeys(),\n moduleId: this.scopeId(),\n levelId: this.runtimeContext()?.levelId ?? null,\n levelDataId: this.runtimeContext()?.levelDataId ?? null,\n value: this.incomingValue(),\n readonly: this.isReadonly(),\n valueChange: this.emitValue,\n validityChange: this.emitValidity,\n }), ...(ngDevMode ? [{ debugName: \"formInputs\" }] : /* istanbul ignore next */ []));\n // ============================================================================\n // Text fallback (no rich form registered)\n // ============================================================================\n isExpanded(lookupKey) {\n return this.expandedKeys().has(lookupKey);\n }\n toggle(lookupKey) {\n const next = new Set(this.expandedKeys());\n if (next.has(lookupKey)) {\n next.delete(lookupKey);\n }\n else {\n next.add(lookupKey);\n }\n this.expandedKeys.set(next);\n }\n hasValues(lookupKey) {\n const values = this.sectionValues()[lookupKey];\n if (!values)\n return false;\n return Object.values(values).some((v) => v != null && v !== '');\n }\n fieldValue(lookupKey, propKey) {\n const raw = this.sectionValues()[lookupKey]?.[propKey];\n return raw == null ? '' : String(raw);\n }\n setFieldValue(lookupKey, propKey, value) {\n this.sectionValues.update((current) => ({\n ...current,\n [lookupKey]: { ...(current[lookupKey] ?? {}), [propKey]: value },\n }));\n this.pushModelValue();\n }\n // ============================================================================\n // Value mapping\n // ============================================================================\n pushModelValue() {\n const payload = this.buildPayload();\n this.onModelChange(payload.length ? payload : null);\n this.onTouched();\n }\n buildPayload() {\n const keys = this.propertyKeys();\n const values = this.sectionValues();\n return this.sections()\n .filter((section) => this.hasValues(section.lookupKey))\n .map((section) => ({\n lookupKey: section.lookupKey,\n props: keys.map((key) => ({\n key,\n value: values[section.lookupKey]?.[key] ?? null,\n })),\n }));\n }\n normalizeIncoming(value) {\n const raw = this.extractEntries(value);\n const result = {};\n for (const entry of raw) {\n if (!entry || typeof entry !== 'object')\n continue;\n const record = entry;\n const lookupKeyRaw = record['lookupKey'] ?? record['Lookupkey'] ?? record['lookupkey'];\n const lookupKey = lookupKeyRaw == null ? '' : String(lookupKeyRaw);\n if (!lookupKey)\n continue;\n const propsRaw = record['props'] ?? record['Props'];\n const values = {};\n if (Array.isArray(propsRaw)) {\n for (const prop of propsRaw) {\n const propRecord = (prop ?? {});\n const key = String(propRecord['key'] ?? propRecord['Key'] ?? '');\n if (!key)\n continue;\n values[key] = propRecord['value'] ?? propRecord['Value'] ?? null;\n }\n }\n result[lookupKey] = values;\n }\n return result;\n }\n extractEntries(value) {\n if (Array.isArray(value)) {\n return value;\n }\n const wrapped = value?.items;\n if (Array.isArray(wrapped)) {\n return wrapped;\n }\n if (typeof value === 'string' && value.trim()) {\n try {\n return this.extractEntries(JSON.parse(value));\n }\n catch {\n return [];\n }\n }\n return [];\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: LookupModuleCheckListField, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.2.8\", type: LookupModuleCheckListField, isStandalone: true, selector: \"mt-lookup-module-check-list-field\", inputs: { label: { classPropertyName: \"label\", publicName: \"label\", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: \"readonly\", publicName: \"readonly\", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: \"required\", publicName: \"required\", isSignal: true, isRequired: false, transformFunction: null }, lookupOptions: { classPropertyName: \"lookupOptions\", publicName: \"lookupOptions\", isSignal: true, isRequired: false, transformFunction: null }, lookups: { classPropertyName: \"lookups\", publicName: \"lookups\", isSignal: true, isRequired: false, transformFunction: null }, propertyFields: { classPropertyName: \"propertyFields\", publicName: \"propertyFields\", isSignal: true, isRequired: false, transformFunction: null }, scopeId: { classPropertyName: \"scopeId\", publicName: \"scopeId\", isSignal: true, isRequired: false, transformFunction: null }, propertyKeys: { classPropertyName: \"propertyKeys\", publicName: \"propertyKeys\", isSignal: true, isRequired: false, transformFunction: null }, runtimeContext: { classPropertyName: \"runtimeContext\", publicName: \"runtimeContext\", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: \"grid gap-2\" }, ngImport: i0, template: \"<div class=\\\"flex flex-col gap-2\\\">\\r\\n @if (label()) {\\r\\n <label class=\\\"font-medium text-color\\\">\\r\\n {{ label() }}\\r\\n @if (required()) {\\r\\n <span class=\\\"text-red-500\\\">*</span>\\r\\n }\\r\\n </label>\\r\\n }\\r\\n\\r\\n @if (useRichForm()) {\\r\\n <ng-container\\r\\n [ngComponentOutlet]=\\\"formComponent!\\\"\\r\\n [ngComponentOutletInputs]=\\\"formInputs()\\\"\\r\\n />\\r\\n } @else if (sections().length) {\\r\\n <!-- Fallback: plain text inputs per property (no rich form registered) -->\\r\\n <div class=\\\"flex flex-col gap-2\\\">\\r\\n @for (section of sections(); track section.lookupKey) {\\r\\n <div class=\\\"overflow-hidden rounded-lg border border-surface-200\\\">\\r\\n <button\\r\\n type=\\\"button\\\"\\r\\n class=\\\"flex w-full cursor-pointer items-center justify-between gap-2 bg-surface-50 px-3 py-2 text-start hover:bg-surface-100\\\"\\r\\n [attr.aria-expanded]=\\\"isExpanded(section.lookupKey)\\\"\\r\\n (click)=\\\"toggle(section.lookupKey)\\\"\\r\\n >\\r\\n <span class=\\\"flex min-w-0 items-center gap-2\\\">\\r\\n <mt-icon\\r\\n [icon]=\\\"\\r\\n isExpanded(section.lookupKey)\\r\\n ? 'arrow.chevron-down'\\r\\n : 'arrow.chevron-right'\\r\\n \\\"\\r\\n size=\\\"sm\\\"\\r\\n class=\\\"shrink-0 text-muted-color rtl:-scale-x-100\\\"\\r\\n />\\r\\n <span class=\\\"truncate text-sm font-medium text-color\\\">\\r\\n {{ section.label }}\\r\\n </span>\\r\\n </span>\\r\\n @if (hasValues(section.lookupKey)) {\\r\\n <span\\r\\n class=\\\"shrink-0 rounded-full bg-primary-50 px-2 py-0.5 text-xs font-semibold text-primary-700\\\"\\r\\n >\\r\\n {{ \\\"components.lookupModuleCheckListField.filled\\\" | transloco }}\\r\\n </span>\\r\\n }\\r\\n </button>\\r\\n\\r\\n @if (isExpanded(section.lookupKey) && propertyFields().length) {\\r\\n <div class=\\\"border-t border-surface-200 p-3\\\">\\r\\n <div class=\\\"grid grid-cols-1 gap-3 sm:grid-cols-2\\\">\\r\\n @for (field of propertyFields(); track field.key) {\\r\\n <label class=\\\"flex min-w-0 flex-col gap-1\\\">\\r\\n <span class=\\\"truncate text-xs text-muted-color\\\">\\r\\n {{ field.label }}\\r\\n </span>\\r\\n @if (isReadonly()) {\\r\\n <span class=\\\"truncate text-sm text-color\\\">\\r\\n {{ fieldValue(section.lookupKey, field.key) || \\\"_\\\" }}\\r\\n </span>\\r\\n } @else {\\r\\n <input\\r\\n pInputText\\r\\n class=\\\"w-full\\\"\\r\\n [ngModel]=\\\"fieldValue(section.lookupKey, field.key)\\\"\\r\\n [ngModelOptions]=\\\"{ standalone: true }\\\"\\r\\n (ngModelChange)=\\\"\\r\\n setFieldValue(section.lookupKey, field.key, $event)\\r\\n \\\"\\r\\n />\\r\\n }\\r\\n </label>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n } @else {\\r\\n <div\\r\\n class=\\\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.lookupModuleCheckListField.empty\\\" | transloco }}\\r\\n </div>\\r\\n }\\r\\n\\r\\n @if (ngControl?.control) {\\r\\n <mt-field-validation\\r\\n [control]=\\\"ngControl?.control!\\\"\\r\\n [touched]=\\\"ngControl?.touched ?? false\\\"\\r\\n />\\r\\n }\\r\\n</div>\\r\\n\", dependencies: [{ kind: \"ngmodule\", type: FormsModule }, { kind: \"directive\", type: i1.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: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.NgModel, selector: \"[ngModel]:not([formControlName]):not([formControl])\", inputs: [\"name\", \"disabled\", \"ngModel\", \"ngModelOptions\"], outputs: [\"ngModelChange\"], exportAs: [\"ngModel\"] }, { kind: \"directive\", type: NgComponentOutlet, selector: \"[ngComponentOutlet]\", inputs: [\"ngComponentOutlet\", \"ngComponentOutletInputs\", \"ngComponentOutletInjector\", \"ngComponentOutletEnvironmentInjector\", \"ngComponentOutletContent\", \"ngComponentOutletNgModule\"], exportAs: [\"ngComponentOutlet\"] }, { kind: \"ngmodule\", type: InputTextModule }, { kind: \"directive\", type: i2$1.InputText, selector: \"[pInputText]\", inputs: [\"hostName\", \"ptInputText\", \"pInputTextPT\", \"pInputTextUnstyled\", \"pSize\", \"variant\", \"fluid\", \"invalid\"] }, { kind: \"component\", type: Icon, selector: \"mt-icon\", inputs: [\"icon\"] }, { kind: \"component\", type: FieldValidation, selector: \"mt-field-validation\", inputs: [\"control\", \"touched\", \"messageId\"] }, { kind: \"pipe\", type: TranslocoPipe, name: \"transloco\" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.2.8\", ngImport: i0, type: LookupModuleCheckListField, decorators: [{\n type: Component,\n args: [{ selector: 'mt-lookup-module-check-list-field', standalone: true, imports: [\n FormsModule,\n NgComponentOutlet,\n InputTextModule,\n Icon,\n FieldValidation,\n TranslocoPipe,\n ], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'grid gap-2' }, template: \"<div class=\\\"flex flex-col gap-2\\\">\\r\\n @if (label()) {\\r\\n <label class=\\\"font-medium text-color\\\">\\r\\n {{ label() }}\\r\\n @if (required()) {\\r\\n <span class=\\\"text-red-500\\\">*</span>\\r\\n }\\r\\n </label>\\r\\n }\\r\\n\\r\\n @if (useRichForm()) {\\r\\n <ng-container\\r\\n [ngComponentOutlet]=\\\"formComponent!\\\"\\r\\n [ngComponentOutletInputs]=\\\"formInputs()\\\"\\r\\n />\\r\\n } @else if (sections().length) {\\r\\n <!-- Fallback: plain text inputs per property (no rich form registered) -->\\r\\n <div class=\\\"flex flex-col gap-2\\\">\\r\\n @for (section of sections(); track section.lookupKey) {\\r\\n <div class=\\\"overflow-hidden rounded-lg border border-surface-200\\\">\\r\\n <button\\r\\n type=\\\"button\\\"\\r\\n class=\\\"flex w-full cursor-pointer items-center justify-between gap-2 bg-surface-50 px-3 py-2 text-start hover:bg-surface-100\\\"\\r\\n [attr.aria-expanded]=\\\"isExpanded(section.lookupKey)\\\"\\r\\n (click)=\\\"toggle(section.lookupKey)\\\"\\r\\n >\\r\\n <span class=\\\"flex min-w-0 items-center gap-2\\\">\\r\\n <mt-icon\\r\\n [icon]=\\\"\\r\\n isExpanded(section.lookupKey)\\r\\n ? 'arrow.chevron-down'\\r\\n : 'arrow.chevron-right'\\r\\n \\\"\\r\\n size=\\\"sm\\\"\\r\\n class=\\\"shrink-0 text-muted-color rtl:-scale-x-100\\\"\\r\\n />\\r\\n <span class=\\\"truncate text-sm font-medium text-color\\\">\\r\\n {{ section.label }}\\r\\n </span>\\r\\n </span>\\r\\n @if (hasValues(section.lookupKey)) {\\r\\n <span\\r\\n class=\\\"shrink-0 rounded-full bg-primary-50 px-2 py-0.5 text-xs font-semibold text-primary-700\\\"\\r\\n >\\r\\n {{ \\\"components.lookupModuleCheckListField.filled\\\" | transloco }}\\r\\n </span>\\r\\n }\\r\\n </button>\\r\\n\\r\\n @if (isExpanded(section.lookupKey) && propertyFields().length) {\\r\\n <div class=\\\"border-t border-surface-200 p-3\\\">\\r\\n <div class=\\\"grid grid-cols-1 gap-3 sm:grid-cols-2\\\">\\r\\n @for (field of propertyFields(); track field.key) {\\r\\n <label class=\\\"flex min-w-0 flex-col gap-1\\\">\\r\\n <span class=\\\"truncate text-xs text-muted-color\\\">\\r\\n {{ field.label }}\\r\\n </span>\\r\\n @if (isReadonly()) {\\r\\n <span class=\\\"truncate text-sm text-color\\\">\\r\\n {{ fieldValue(section.lookupKey, field.key) || \\\"_\\\" }}\\r\\n </span>\\r\\n } @else {\\r\\n <input\\r\\n pInputText\\r\\n class=\\\"w-full\\\"\\r\\n [ngModel]=\\\"fieldValue(section.lookupKey, field.key)\\\"\\r\\n [ngModelOptions]=\\\"{ standalone: true }\\\"\\r\\n (ngModelChange)=\\\"\\r\\n setFieldValue(section.lookupKey, field.key, $event)\\r\\n \\\"\\r\\n />\\r\\n }\\r\\n </label>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n } @else {\\r\\n <div\\r\\n class=\\\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.lookupModuleCheckListField.empty\\\" | transloco }}\\r\\n </div>\\r\\n }\\r\\n\\r\\n @if (ngControl?.control) {\\r\\n <mt-field-validation\\r\\n [control]=\\\"ngControl?.control!\\\"\\r\\n [touched]=\\\"ngControl?.touched ?? false\\\"\\r\\n />\\r\\n }\\r\\n</div>\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: \"label\", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: \"readonly\", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: \"required\", required: false }] }], lookupOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: \"lookupOptions\", required: false }] }], lookups: [{ type: i0.Input, args: [{ isSignal: true, alias: \"lookups\", required: false }] }], propertyFields: [{ type: i0.Input, args: [{ isSignal: true, alias: \"propertyFields\", required: false }] }], scopeId: [{ type: i0.Input, args: [{ isSignal: true, alias: \"scopeId\", required: false }] }], propertyKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: \"propertyKeys\", required: false }] }], runtimeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: \"runtimeContext\", required: false }] }] } });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ENTITY_LIST_ADD_DIALOG_COMPONENT, EntityListField, LOOKUP_CHECK_LIST_FORM_COMPONENT, LookupMatrixField, LookupModuleCheckListField, ScheduleItemSelectorField, SchedulePredecessorField, SchemaConnectionField };\n//# sourceMappingURL=masterteam-components-business-fields.mjs.map\n","map":null,"preliminaryFileName":"masterteam-components-business-fields.mjs","sourcemapFileName":"masterteam-components-business-fields.mjs.map"},{"fileName":"masterteam-components-business-fields.mjs.map","names":[],"needsCodeReference":false,"originalFileName":null,"originalFileNames":[],"source":"{\"version\":3,\"file\":\"masterteam-components-business-fields.mjs\",\"sources\":[\"../../../../packages/masterteam/components/business-fields/lookup-matrix-field/lookup-matrix-field.ts\",\"../../../../packages/masterteam/components/business-fields/lookup-matrix-field/lookup-matrix-field.html\",\"../../../../packages/masterteam/components/business-fields/schema-connection-field/schema-connection-field.ts\",\"../../../../packages/masterteam/components/business-fields/schema-connection-field/schema-connection-field.html\",\"../../../../packages/masterteam/components/business-fields/schedule-predecessor-field/schedule-predecessor-field.ts\",\"../../../../packages/masterteam/components/business-fields/schedule-predecessor-field/schedule-predecessor-field.html\",\"../../../../packages/masterteam/components/business-fields/entity-list-field/entity-list-add-token.ts\",\"../../../../packages/masterteam/components/business-fields/entity-list-field/entity-list-field.ts\",\"../../../../packages/masterteam/components/business-fields/entity-list-field/entity-list-field.html\",\"../../../../packages/masterteam/components/business-fields/schedule-item-selector-field/schedule-item-selector-field.ts\",\"../../../../packages/masterteam/components/business-fields/schedule-item-selector-field/schedule-item-selector-field.html\",\"../../../../packages/masterteam/components/business-fields/lookup-module-check-list-field/lookup-module-check-list-form-token.ts\",\"../../../../packages/masterteam/components/business-fields/lookup-module-check-list-field/lookup-module-check-list-field.ts\",\"../../../../packages/masterteam/components/business-fields/lookup-module-check-list-field/lookup-module-check-list-field.html\",\"../../../../packages/masterteam/components/business-fields/masterteam-components-business-fields.ts\"],\"sourcesContent\":[\"import { CommonModule } from '@angular/common';\\r\\nimport {\\r\\n AfterViewInit,\\r\\n ChangeDetectionStrategy,\\r\\n Component,\\r\\n computed,\\r\\n DestroyRef,\\r\\n inject,\\r\\n input,\\r\\n signal,\\r\\n} from '@angular/core';\\r\\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\\r\\nimport { AbstractControl, ControlContainer } from '@angular/forms';\\r\\nimport { TranslocoService } from '@jsverse/transloco';\\r\\nimport { startWith } from 'rxjs';\\r\\nimport type {\\r\\n LookupMatrixCellConfig,\\r\\n LookupMatrixFieldConfig,\\r\\n LookupOptionItemConfig,\\r\\n} from '@masterteam/components';\\r\\nimport { Tooltip } from '@masterteam/components/tooltip';\\r\\nimport { Icon } from '@masterteam/icons';\\r\\n\\r\\n@Component({\\r\\n selector: 'mt-lookup-matrix-field',\\r\\n standalone: true,\\r\\n imports: [CommonModule, Tooltip, Icon],\\r\\n templateUrl: './lookup-matrix-field.html',\\r\\n changeDetection: ChangeDetectionStrategy.OnPush,\\r\\n host: {\\r\\n class: 'grid gap-2',\\r\\n },\\r\\n})\\r\\nexport class LookupMatrixField implements AfterViewInit {\\r\\n readonly config = input.required<LookupMatrixFieldConfig>();\\r\\n\\r\\n private readonly controlContainer = inject(ControlContainer, {\\r\\n optional: true,\\r\\n });\\r\\n private readonly destroyRef = inject(DestroyRef);\\r\\n private readonly transloco = inject(TranslocoService);\\r\\n private readonly valueVersion = signal(0);\\r\\n private subscribedControl: AbstractControl | null = null;\\r\\n\\r\\n readonly hasYAxis = computed(() => !!this.config().yFieldKey);\\r\\n readonly xOptions = computed(() => this.config().xOptions ?? []);\\r\\n readonly yOptions = computed(() => this.config().yOptions ?? []);\\r\\n readonly hasMatrix = computed(() => this.config().cells.length > 0);\\r\\n readonly cellMap = computed(\\r\\n () =>\\r\\n new Map(\\r\\n this.config().cells.map((cell) => [\\r\\n this.cellKey(cell.xLookupItemId, cell.yLookupItemId),\\r\\n cell,\\r\\n ]),\\r\\n ),\\r\\n );\\r\\n readonly selectedXOption = computed(() => {\\r\\n this.valueVersion();\\r\\n return this.resolveSelectedOption(\\r\\n this.xOptions(),\\r\\n this.getControlValue(this.config().xFieldKey),\\r\\n );\\r\\n });\\r\\n readonly selectedYOption = computed(() => {\\r\\n this.valueVersion();\\r\\n const yFieldKey = this.config().yFieldKey;\\r\\n if (!yFieldKey) {\\r\\n return null;\\r\\n }\\r\\n\\r\\n return this.resolveSelectedOption(\\r\\n this.yOptions(),\\r\\n this.getControlValue(yFieldKey),\\r\\n );\\r\\n });\\r\\n readonly activeCell = computed(() => {\\r\\n const selectedX = this.selectedXOption();\\r\\n if (!selectedX) {\\r\\n return null;\\r\\n }\\r\\n\\r\\n if (!this.hasYAxis()) {\\r\\n return this.getCell(selectedX.id ?? selectedX.value);\\r\\n }\\r\\n\\r\\n const selectedY = this.selectedYOption();\\r\\n if (!selectedY) {\\r\\n return null;\\r\\n }\\r\\n\\r\\n return this.getCell(\\r\\n selectedX.id ?? selectedX.value,\\r\\n selectedY.id ?? selectedY.value,\\r\\n );\\r\\n });\\r\\n readonly selectionSummary = computed(() => {\\r\\n const parts: string[] = [];\\r\\n const xAxisLabel =\\r\\n this.config().xAxisLabel.trim() ||\\r\\n this.transloco.translate('components.lookupMatrixField.xAxisFallback');\\r\\n const selectedX = this.selectedXOption();\\r\\n\\r\\n if (selectedX) {\\r\\n parts.push(`${xAxisLabel}: ${selectedX.label}`);\\r\\n }\\r\\n\\r\\n const selectedY = this.selectedYOption();\\r\\n const yAxisLabel =\\r\\n this.config().yAxisLabel?.trim() ||\\r\\n this.transloco.translate('components.lookupMatrixField.yAxisFallback');\\r\\n if (selectedY && this.hasYAxis()) {\\r\\n parts.push(`${yAxisLabel}: ${selectedY.label}`);\\r\\n }\\r\\n\\r\\n return parts.join(' / ');\\r\\n });\\r\\n readonly pendingMessage = computed(() => {\\r\\n const xAxisLabel =\\r\\n this.config().xAxisLabel.trim() ||\\r\\n this.transloco.translate(\\r\\n 'components.lookupMatrixField.firstValueFallback',\\r\\n );\\r\\n\\r\\n if (!this.hasYAxis()) {\\r\\n return this.transloco.translate(\\r\\n 'components.lookupMatrixField.selectXAxisFirst',\\r\\n { xAxisLabel },\\r\\n );\\r\\n }\\r\\n\\r\\n const yAxisLabel =\\r\\n this.config().yAxisLabel?.trim() ||\\r\\n this.transloco.translate(\\r\\n 'components.lookupMatrixField.secondValueFallback',\\r\\n );\\r\\n\\r\\n return this.transloco.translate(\\r\\n 'components.lookupMatrixField.selectAxesFirst',\\r\\n { xAxisLabel, yAxisLabel },\\r\\n );\\r\\n });\\r\\n readonly missingResultMessage = computed(() => {\\r\\n if (!this.selectedXOption()) {\\r\\n return this.pendingMessage();\\r\\n }\\r\\n\\r\\n if (this.hasYAxis() && !this.selectedYOption()) {\\r\\n return this.pendingMessage();\\r\\n }\\r\\n\\r\\n return this.transloco.translate(\\r\\n 'components.lookupMatrixField.noMatchingValue',\\r\\n );\\r\\n });\\r\\n\\r\\n ngAfterViewInit(): void {\\r\\n this.ensureControlSubscription();\\r\\n }\\r\\n\\r\\n getCell(\\r\\n xLookupItemId: number | string,\\r\\n yLookupItemId?: number | string,\\r\\n ): LookupMatrixCellConfig | null {\\r\\n return (\\r\\n this.cellMap().get(this.cellKey(xLookupItemId, yLookupItemId)) ?? null\\r\\n );\\r\\n }\\r\\n\\r\\n getSwatchColor(color?: string | null): string | null {\\r\\n return this.resolveColor(color);\\r\\n }\\r\\n\\r\\n private getControlValue(path: string): unknown {\\r\\n if (!path) return null;\\r\\n return this.controlContainer?.control?.get(path)?.value ?? null;\\r\\n }\\r\\n\\r\\n private ensureControlSubscription(): void {\\r\\n const control = this.controlContainer?.control;\\r\\n if (!control || control === this.subscribedControl) {\\r\\n return;\\r\\n }\\r\\n\\r\\n this.subscribedControl = control;\\r\\n control.valueChanges\\r\\n .pipe(\\r\\n startWith(control.getRawValue()),\\r\\n takeUntilDestroyed(this.destroyRef),\\r\\n )\\r\\n .subscribe(() => {\\r\\n this.valueVersion.update((value) => value + 1);\\r\\n });\\r\\n }\\r\\n\\r\\n private resolveSelectedOption(\\r\\n options: LookupOptionItemConfig[],\\r\\n rawValue: unknown,\\r\\n ): LookupOptionItemConfig | null {\\r\\n if (rawValue == null || rawValue === '') return null;\\r\\n\\r\\n return (\\r\\n options.find((option) => this.optionMatchesValue(option, rawValue)) ??\\r\\n null\\r\\n );\\r\\n }\\r\\n\\r\\n private optionMatchesValue(\\r\\n option: LookupOptionItemConfig,\\r\\n rawValue: unknown,\\r\\n ): boolean {\\r\\n return [option.value, option.key, option.id].some(\\r\\n (candidate) =>\\r\\n candidate != null && String(candidate) === String(rawValue),\\r\\n );\\r\\n }\\r\\n\\r\\n private cellKey(\\r\\n xLookupItemId: number | string,\\r\\n yLookupItemId?: number | string,\\r\\n ): string {\\r\\n return `${String(xLookupItemId)}::${String(yLookupItemId ?? '')}`;\\r\\n }\\r\\n\\r\\n private resolveColor(color?: string | null): string | null {\\r\\n if (!color) return null;\\r\\n\\r\\n if (\\r\\n color.startsWith('#') ||\\r\\n color.startsWith('rgb') ||\\r\\n color.startsWith('hsl') ||\\r\\n color.startsWith('var(')\\r\\n ) {\\r\\n return color;\\r\\n }\\r\\n\\r\\n return `var(--p-${color}-500)`;\\r\\n }\\r\\n}\\r\\n\",\"@if (config().label) {\\r\\n <label class=\\\"font-medium text-color\\\">\\r\\n {{ config().label }}\\r\\n </label>\\r\\n}\\r\\n\\r\\n<div\\r\\n class=\\\"rounded-lg border border-surface-200 bg-surface-50 px-3 flex items-center\\\"\\r\\n>\\r\\n @if (activeCell(); as cell) {\\r\\n <div class=\\\"flex flex-1 min-h-6 items-center gap-2 justify-between\\\">\\r\\n <span\\r\\n class=\\\"h-6 w-2 shrink-0 rounded-[2px] border border-surface-200\\\"\\r\\n [style.background-color]=\\\"getSwatchColor(cell.color)\\\"\\r\\n [style.border-color]=\\\"getSwatchColor(cell.color)\\\"\\r\\n ></span>\\r\\n\\r\\n <div class=\\\"min-w-0 flex-1 py-2 flex items-center justify-between\\\">\\r\\n <div class=\\\"truncate font-semibold text-gray-500\\\">\\r\\n {{ cell.label }}\\r\\n </div>\\r\\n\\r\\n @if (selectionSummary()) {\\r\\n <div class=\\\"font-bold text-gray-500\\\">\\r\\n <mt-icon\\r\\n [mtTooltip]=\\\"selectionSummary()\\\"\\r\\n icon=\\\"general.info-circle\\\"\\r\\n />\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n } @else {\\r\\n <div class=\\\"flex min-h-6 items-center text-muted-color py-2\\\">\\r\\n {{ hasMatrix() ? missingResultMessage() : config().emptyMessage }}\\r\\n </div>\\r\\n }\\r\\n</div>\\r\\n\",\"import {\\r\\n Component,\\r\\n signal,\\r\\n input,\\r\\n computed,\\r\\n inject,\\r\\n ChangeDetectionStrategy,\\r\\n effect,\\r\\n untracked,\\r\\n DestroyRef,\\r\\n} from '@angular/core';\\r\\nimport {\\r\\n AbstractControl,\\r\\n ControlValueAccessor,\\r\\n FormsModule,\\r\\n NgControl,\\r\\n ValidationErrors,\\r\\n ValidatorFn,\\r\\n} from '@angular/forms';\\r\\nimport { TranslocoService } from '@jsverse/transloco';\\r\\nimport { SelectField } from '@masterteam/components/select-field';\\r\\nimport { MultiSelectField } from '@masterteam/components/multi-select-field';\\r\\nimport { FieldValidation } from '@masterteam/components/field-validation';\\r\\nimport { Tooltip } from '@masterteam/components/tooltip';\\r\\nimport { Icon } from '@masterteam/icons';\\r\\nimport { HttpClient, HttpContext } from '@angular/common/http';\\r\\nimport { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';\\r\\nimport { finalize, catchError, of } from 'rxjs';\\r\\n\\r\\n// ============================================================================\\r\\n// Types\\r\\n// ============================================================================\\r\\n\\r\\n/**\\r\\n * One source level inside connection configuration.\\r\\n * Comes from `field.propertyMetadata.configuration.sourceLevels[]`\\r\\n *\\r\\n * A source can be either a **level** (has `levelId`/`levelKey`) or a\\r\\n * **module** (has `moduleId`/`moduleKey`). Exactly one pair will be present.\\r\\n */\\r\\nexport interface ConnectionSourceLevel {\\r\\n /** Present for level-type sources */\\r\\n levelId?: number;\\r\\n /** Present for level-type sources */\\r\\n levelKey?: string;\\r\\n /** Present for module-type sources */\\r\\n moduleId?: number;\\r\\n /** Present for module-type sources */\\r\\n moduleKey?: string;\\r\\n name: { en?: string; ar?: string; [k: string]: string | undefined };\\r\\n connectionId: number;\\r\\n isOptional: boolean;\\r\\n allowManyToMany: boolean;\\r\\n supportWeights: boolean;\\r\\n optionsQuery: {\\r\\n path: string;\\r\\n method?: string;\\r\\n query?: Record<string, unknown>;\\r\\n };\\r\\n}\\r\\n\\r\\n/**\\r\\n * Full connection configuration from `field.propertyMetadata.configuration`.\\r\\n * This is passed as a single input to the component.\\r\\n */\\r\\nexport interface SchemaConnectionConfig {\\r\\n targetLevelId: number;\\r\\n sourceLevelId?: number;\\r\\n propertyKey?: string;\\r\\n valueMode?: string;\\r\\n sourceLevels: ConnectionSourceLevel[];\\r\\n payloadTemplate?: { levelId: number; sources: any[] };\\r\\n sourceItemShape?: Record<string, string>;\\r\\n}\\r\\n\\r\\n/** One selected source in the connection payload */\\r\\nexport interface ConnectionSource {\\r\\n sourceLevelId?: number;\\r\\n sourceLevelDataId?: number;\\r\\n sourceModuleId?: number;\\r\\n sourceModuleDataId?: number;\\r\\n}\\r\\n\\r\\n/** The value shape for a connection field */\\r\\nexport interface ConnectionPayload {\\r\\n levelId: number;\\r\\n sources: ConnectionSource[];\\r\\n}\\r\\n\\r\\n/**\\r\\n * Internal state tracked per source level dropdown.\\r\\n */\\r\\nexport interface SourceLevelState {\\r\\n source: ConnectionSourceLevel;\\r\\n options: any[];\\r\\n loading: boolean;\\r\\n}\\r\\n\\r\\n@Component({\\r\\n selector: 'mt-schema-connection-field',\\r\\n standalone: true,\\r\\n imports: [\\r\\n FormsModule,\\r\\n SelectField,\\r\\n MultiSelectField,\\r\\n FieldValidation,\\r\\n Tooltip,\\r\\n Icon,\\r\\n ],\\r\\n templateUrl: './schema-connection-field.html',\\r\\n styleUrls: ['./schema-connection-field.scss'],\\r\\n changeDetection: ChangeDetectionStrategy.OnPush,\\r\\n host: {\\r\\n class: 'grid gap-1',\\r\\n },\\r\\n})\\r\\nexport class SchemaConnectionField implements ControlValueAccessor {\\r\\n // ============================================================================\\r\\n // Inputs\\r\\n // ============================================================================\\r\\n\\r\\n readonly label = input<string>('');\\r\\n readonly placeholder = input<string>('');\\r\\n readonly readonly = input<boolean>(false);\\r\\n readonly required = input<boolean>(false);\\r\\n readonly filter = input<boolean>(true);\\r\\n\\r\\n /**\\r\\n * Full connection configuration object from the API.\\r\\n * Includes `targetLevelId`, `sourceLevels[]`, `payloadTemplate`, etc.\\r\\n */\\r\\n readonly configuration = input.required<SchemaConnectionConfig>();\\r\\n\\r\\n /**\\r\\n * Optional HttpContext for API requests (e.g. to set base URL behavior).\\r\\n */\\r\\n readonly context = input<HttpContext | undefined>(undefined);\\r\\n\\r\\n // ============================================================================\\r\\n // Internal State\\r\\n // ============================================================================\\r\\n\\r\\n /** The full ConnectionPayload value */\\r\\n value = signal<ConnectionPayload | null>(null);\\r\\n disabled = signal<boolean>(false);\\r\\n\\r\\n /** Per-source-level state: options + loading */\\r\\n sourceLevelStates = signal<SourceLevelState[]>([]);\\r\\n\\r\\n /** Mutable selections per source level: sourceLevelId -> selected value */\\r\\n selections: Record<number, any> = {};\\r\\n\\r\\n onTouched: () => void = () => {};\\r\\n onModelChange: (value: ConnectionPayload | null) => void = () => {};\\r\\n\\r\\n /**\\r\\n * Required-validation for a connection: emptiness is decided by the selected\\r\\n * `sources`, not by the value being null. The runtime loads an unselected\\r\\n * connection as `{ levelId, sources: [] }` — a non-null object that Angular's\\r\\n * stock `Validators.required` accepts — so a plain required check would let an\\r\\n * empty connection pass and the form submit. Mirrors {@link syncValue}, which\\r\\n * collapses a source-less selection to `null`.\\r\\n */\\r\\n private readonly connectionRequiredValidator: ValidatorFn = (\\r\\n control: AbstractControl,\\r\\n ): ValidationErrors | null => {\\r\\n const value = control.value as ConnectionPayload | null;\\r\\n const hasSources =\\r\\n !!value && Array.isArray(value.sources) && value.sources.length > 0;\\r\\n return hasSources ? null : { required: true };\\r\\n };\\r\\n\\r\\n public ngControl: NgControl | null = null;\\r\\n private http = inject(HttpClient);\\r\\n private destroyRef = inject(DestroyRef);\\r\\n private transloco = inject(TranslocoService);\\r\\n\\r\\n /** Active UI language, kept reactive so source labels re-resolve on switch. */\\r\\n private readonly activeLang = toSignal(this.transloco.langChanges$, {\\r\\n initialValue: this.transloco.getActiveLang(),\\r\\n });\\r\\n\\r\\n /**\\r\\n * Resolve a source level's display name in the active locale, falling back\\r\\n * to English, Arabic, then the level/module key.\\r\\n */\\r\\n protected resolveSourceName(source: ConnectionSourceLevel): string {\\r\\n const name = source.name;\\r\\n return (\\r\\n name?.[this.activeLang()] ||\\r\\n name?.en ||\\r\\n name?.ar ||\\r\\n source.levelKey ||\\r\\n source.moduleKey ||\\r\\n ''\\r\\n );\\r\\n }\\r\\n\\r\\n /**\\r\\n * Source levels from configuration.\\r\\n */\\r\\n readonly sourceLevels = computed<ConnectionSourceLevel[]>(() => {\\r\\n return this.configuration()?.sourceLevels ?? [];\\r\\n });\\r\\n\\r\\n /**\\r\\n * Tooltip for the marker rendered next to every source label — it is what\\r\\n * tells the user these dropdowns belong to a connection, now that the\\r\\n * connection's own label no longer occupies a row above them. Reads\\r\\n * {@link activeLang} so the text re-translates on language switch.\\r\\n */\\r\\n readonly connectionHint = computed<string>(() => {\\r\\n this.activeLang();\\r\\n return this.transloco.translate('components.schemaConnection.hint');\\r\\n });\\r\\n\\r\\n /**\\r\\n * Placeholder for a source dropdown: its own source name, matching the label\\r\\n * above it. Falls back to the field-level placeholder only when the source\\r\\n * has no resolvable name.\\r\\n */\\r\\n protected sourcePlaceholder(source: ConnectionSourceLevel): string {\\r\\n return (\\r\\n this.resolveSourceName(source) ||\\r\\n this.placeholder() ||\\r\\n this.transloco.translate('components.selectPlaceholder')\\r\\n );\\r\\n }\\r\\n\\r\\n /**\\r\\n * Percentage width for each dropdown, evenly divided.\\r\\n */\\r\\n readonly dropdownWidth = computed<string>(() => {\\r\\n const count = this.sourceLevels().length;\\r\\n if (count <= 0) return '100%';\\r\\n return `${100 / count}%`;\\r\\n });\\r\\n\\r\\n constructor() {\\r\\n this.ngControl = inject(NgControl, { self: true, optional: true });\\r\\n if (this.ngControl) {\\r\\n this.ngControl.valueAccessor = this;\\r\\n }\\r\\n\\r\\n effect(() => {\\r\\n const control = this.ngControl?.control;\\r\\n if (!control) return;\\r\\n const required = this.required();\\r\\n untracked(() => {\\r\\n if (required) {\\r\\n control.addValidators(this.connectionRequiredValidator);\\r\\n } else {\\r\\n control.removeValidators(this.connectionRequiredValidator);\\r\\n }\\r\\n control.updateValueAndValidity({ emitEvent: false });\\r\\n });\\r\\n });\\r\\n\\r\\n // Load options for each source level when configuration changes\\r\\n effect(() => {\\r\\n const levels = this.sourceLevels();\\r\\n if (!levels.length) return;\\r\\n\\r\\n // Everything below must NOT create signal dependencies,\\r\\n // only sourceLevels() (→ configuration) should trigger this effect.\\r\\n untracked(() => {\\r\\n // Initialize per-source states + selections\\r\\n this.sourceLevelStates.set(\\r\\n levels.map((source) => ({\\r\\n source,\\r\\n options: [],\\r\\n loading: false,\\r\\n })),\\r\\n );\\r\\n\\r\\n for (const source of levels) {\\r\\n const sourceId = this.getSourceId(source);\\r\\n if (!(sourceId in this.selections)) {\\r\\n this.selections[sourceId] = source.allowManyToMany ? [] : null;\\r\\n }\\r\\n }\\r\\n\\r\\n // Distribute existing value to selections\\r\\n this.distributeToSelections(this.value());\\r\\n\\r\\n // Load options for each source level\\r\\n for (const source of levels) {\\r\\n this.loadOptions(source);\\r\\n }\\r\\n });\\r\\n });\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Source Level Helpers\\r\\n // ============================================================================\\r\\n\\r\\n /**\\r\\n * Returns a stable numeric ID for a source regardless of whether it is a\\r\\n * level (`levelId`) or a module (`moduleId`). Used as the key in `selections`\\r\\n * and `sourceLevelStates`.\\r\\n */\\r\\n protected getSourceId(source: ConnectionSourceLevel): number {\\r\\n return (source.levelId ?? source.moduleId)!;\\r\\n }\\r\\n\\r\\n /**\\r\\n * Builds the `contextKey` for the `fetch/query` request based on source type.\\r\\n */\\r\\n private getContextKey(source: ConnectionSourceLevel): string {\\r\\n return source.levelId != null\\r\\n ? `level:${source.levelId}`\\r\\n : `module:${source.moduleId}`;\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Option Loading (per source level)\\r\\n // ============================================================================\\r\\n\\r\\n private loadOptions(source: ConnectionSourceLevel): void {\\r\\n this.updateSourceState(this.getSourceId(source), { loading: true });\\r\\n\\r\\n const ctx = this.context();\\r\\n const payload = {\\r\\n contextKey: this.getContextKey(source),\\r\\n projection: 'Flat',\\r\\n propertyKeys: ['name'],\\r\\n };\\r\\n\\r\\n this.http\\r\\n .post<unknown>('fetch/query', payload, {\\r\\n ...(ctx ? { context: ctx } : {}),\\r\\n })\\r\\n .pipe(\\r\\n takeUntilDestroyed(this.destroyRef),\\r\\n finalize(() =>\\r\\n this.updateSourceState(this.getSourceId(source), { loading: false }),\\r\\n ),\\r\\n catchError((err) => {\\r\\n console.error(\\r\\n `Connection options load failed for ${source.levelKey ?? source.moduleKey}:`,\\r\\n err,\\r\\n );\\r\\n return of({ data: { records: [] } });\\r\\n }),\\r\\n )\\r\\n .subscribe((response: any) => {\\r\\n const options = (response?.data?.records ?? [])\\r\\n .filter((record: any) => record?.id != null)\\r\\n .map((record: any) => ({\\r\\n ...record,\\r\\n id: record.id,\\r\\n name: record.name,\\r\\n }));\\r\\n\\r\\n this.updateSourceState(this.getSourceId(source), {\\r\\n options,\\r\\n loading: false,\\r\\n });\\r\\n });\\r\\n }\\r\\n\\r\\n private updateSourceState(\\r\\n sourceId: number,\\r\\n patch: Partial<Pick<SourceLevelState, 'options' | 'loading'>>,\\r\\n ): void {\\r\\n this.sourceLevelStates.update((states) =>\\r\\n states.map((s) =>\\r\\n this.getSourceId(s.source) === sourceId ? { ...s, ...patch } : s,\\r\\n ),\\r\\n );\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Value Handling\\r\\n // ============================================================================\\r\\n\\r\\n /**\\r\\n * Single handler — no params. Reads all selections, builds the combined payload.\\r\\n */\\r\\n syncValue(): void {\\r\\n const cfg = this.configuration();\\r\\n const states = this.sourceLevelStates();\\r\\n const sources: ConnectionSource[] = [];\\r\\n\\r\\n for (const state of states) {\\r\\n const val = this.selections[this.getSourceId(state.source)];\\r\\n if (val == null) continue;\\r\\n\\r\\n const effectiveId = this.getSourceId(state.source);\\r\\n if (state.source.allowManyToMany && Array.isArray(val)) {\\r\\n for (const id of val) {\\r\\n sources.push({\\r\\n sourceLevelId: effectiveId,\\r\\n sourceLevelDataId: id,\\r\\n });\\r\\n }\\r\\n } else if (typeof val === 'number') {\\r\\n sources.push({\\r\\n sourceLevelId: effectiveId,\\r\\n sourceLevelDataId: val,\\r\\n });\\r\\n }\\r\\n }\\r\\n\\r\\n const payload: ConnectionPayload | null =\\r\\n sources.length > 0 ? { levelId: cfg.targetLevelId, sources } : null;\\r\\n\\r\\n this.value.set(payload);\\r\\n this.onModelChange(payload);\\r\\n this.onTouched();\\r\\n }\\r\\n\\r\\n private distributeToSelections(payload: ConnectionPayload | null): void {\\r\\n const states = this.sourceLevelStates();\\r\\n for (const state of states) {\\r\\n const sourceId = this.getSourceId(state.source);\\r\\n const ids = (payload?.sources ?? [])\\r\\n .filter((s) => (s.sourceLevelId ?? s.sourceModuleId) === sourceId)\\r\\n .map((s) => s.sourceLevelDataId ?? s.sourceModuleDataId)\\r\\n .filter((id): id is number => id != null);\\r\\n\\r\\n this.selections[sourceId] = state.source.allowManyToMany\\r\\n ? ids\\r\\n : (ids[0] ?? null);\\r\\n }\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // ControlValueAccessor\\r\\n // ============================================================================\\r\\n\\r\\n writeValue(value: ConnectionPayload | string | null): void {\\r\\n if (typeof value === 'string') {\\r\\n try {\\r\\n value = JSON.parse(value) as ConnectionPayload;\\r\\n } catch {\\r\\n value = null;\\r\\n }\\r\\n }\\r\\n this.value.set(value ?? null);\\r\\n this.distributeToSelections(value ?? null);\\r\\n }\\r\\n\\r\\n registerOnChange(fn: (value: ConnectionPayload | null) => void): void {\\r\\n this.onModelChange = fn;\\r\\n }\\r\\n\\r\\n registerOnTouched(fn: any): void {\\r\\n this.onTouched = fn;\\r\\n }\\r\\n\\r\\n setDisabledState(disabled: boolean): void {\\r\\n this.disabled.set(disabled);\\r\\n }\\r\\n}\\r\\n\",\"<div class=\\\"flex gap-4 w-full\\\">\\r\\n @for (state of sourceLevelStates(); track getSourceId(state.source)) {\\r\\n <!--\\r\\n `grid gap-1 grid-cols-[minmax(0,1fr)]` matches the label→control spacing\\r\\n every other mt-* field gets from its host class; the explicit column\\r\\n keeps the implicit max-content track from letting long values overflow.\\r\\n -->\\r\\n <div\\r\\n [style.width]=\\\"dropdownWidth()\\\"\\r\\n class=\\\"grid gap-1 grid-cols-[minmax(0,1fr)] min-w-0\\\"\\r\\n >\\r\\n <div class=\\\"flex items-center gap-1\\\">\\r\\n <label class=\\\"truncate\\\" [class.required]=\\\"required()\\\">\\r\\n {{ resolveSourceName(state.source) }}\\r\\n </label>\\r\\n <span\\r\\n class=\\\"inline-flex shrink-0 text-surface-400\\\"\\r\\n [mtTooltip]=\\\"connectionHint()\\\"\\r\\n tooltipPosition=\\\"top\\\"\\r\\n >\\r\\n <mt-icon icon=\\\"general.link-01\\\" />\\r\\n </span>\\r\\n </div>\\r\\n\\r\\n @if (state.source.allowManyToMany) {\\r\\n <mt-multi-select-field\\r\\n [field]=\\\"false\\\"\\r\\n [(ngModel)]=\\\"selections[getSourceId(state.source)]\\\"\\r\\n (ngModelChange)=\\\"syncValue()\\\"\\r\\n [options]=\\\"state.options\\\"\\r\\n optionLabel=\\\"name\\\"\\r\\n optionValue=\\\"id\\\"\\r\\n [placeholder]=\\\"sourcePlaceholder(state.source)\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [filter]=\\\"filter()\\\"\\r\\n [showClear]=\\\"true\\\"\\r\\n display=\\\"chip\\\"\\r\\n />\\r\\n } @else {\\r\\n <mt-select-field\\r\\n [field]=\\\"false\\\"\\r\\n [(ngModel)]=\\\"selections[getSourceId(state.source)]\\\"\\r\\n (ngModelChange)=\\\"syncValue()\\\"\\r\\n [options]=\\\"state.options\\\"\\r\\n optionLabel=\\\"name\\\"\\r\\n optionValue=\\\"id\\\"\\r\\n [placeholder]=\\\"sourcePlaceholder(state.source)\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [filter]=\\\"filter()\\\"\\r\\n [loading]=\\\"state.loading\\\"\\r\\n [showClear]=\\\"true\\\"\\r\\n />\\r\\n }\\r\\n </div>\\r\\n }\\r\\n</div>\\r\\n\\r\\n<mt-field-validation [control]=\\\"ngControl?.control\\\"></mt-field-validation>\\r\\n\",\"import { CommonModule } from '@angular/common';\\r\\nimport {\\r\\n ChangeDetectionStrategy,\\r\\n Component,\\r\\n computed,\\r\\n DestroyRef,\\r\\n effect,\\r\\n inject,\\r\\n input,\\r\\n linkedSignal,\\r\\n signal,\\r\\n TemplateRef,\\r\\n untracked,\\r\\n viewChild,\\r\\n} from '@angular/core';\\r\\nimport { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';\\r\\nimport {\\r\\n ControlValueAccessor,\\r\\n FormsModule,\\r\\n NgControl,\\r\\n Validators,\\r\\n} from '@angular/forms';\\r\\nimport { HttpClient } from '@angular/common/http';\\r\\nimport { catchError, finalize, of } from 'rxjs';\\r\\nimport { TranslocoModule, TranslocoService } from '@jsverse/transloco';\\r\\nimport { Button } from '@masterteam/components/button';\\r\\nimport { FieldValidation } from '@masterteam/components/field-validation';\\r\\nimport { NumberField } from '@masterteam/components/number-field';\\r\\nimport { SelectField } from '@masterteam/components/select-field';\\r\\nimport {\\r\\n Table,\\r\\n type ColumnDef,\\r\\n type TableAction,\\r\\n} from '@masterteam/components/table';\\r\\nimport type { SchedulePredecessorFieldRuntimeContext } from '@masterteam/components';\\r\\nimport { nextFieldId, resolveFieldId } from '@masterteam/components';\\r\\n\\r\\ntype PredecessorType = 0 | 1 | 2 | 3;\\r\\ntype PredecessorTypeToken = 'FS' | 'SS' | 'FF' | 'SF';\\r\\n\\r\\ninterface ScheduleQueryRecord {\\r\\n id: number | string;\\r\\n name?: string | null;\\r\\n children?: ScheduleQueryRecord[] | null;\\r\\n}\\r\\n\\r\\ninterface ScheduleQueryData {\\r\\n records?: ScheduleQueryRecord[] | null;\\r\\n projectionMeta?: {\\r\\n rootIds?: Array<number | string> | null;\\r\\n } | null;\\r\\n}\\r\\n\\r\\ninterface ScheduleQueryResponse {\\r\\n data?: ScheduleQueryData | null;\\r\\n}\\r\\n\\r\\ninterface SchedulePredecessorValue {\\r\\n predecessorId: number | string;\\r\\n type: PredecessorType;\\r\\n lagDays: number;\\r\\n}\\r\\n\\r\\ninterface SchedulePredecessorRow extends SchedulePredecessorValue {\\r\\n key: string;\\r\\n}\\r\\n\\r\\ninterface SelectOption {\\r\\n label: string;\\r\\n value: number | string;\\r\\n}\\r\\n\\r\\nconst PREDECESSOR_TYPE_BY_TOKEN: Record<PredecessorTypeToken, PredecessorType> =\\r\\n {\\r\\n FS: 0,\\r\\n SS: 1,\\r\\n FF: 2,\\r\\n SF: 3,\\r\\n };\\r\\n\\r\\nconst PREDECESSOR_TOKEN_BY_TYPE: Record<PredecessorType, PredecessorTypeToken> =\\r\\n {\\r\\n 0: 'FS',\\r\\n 1: 'SS',\\r\\n 2: 'FF',\\r\\n 3: 'SF',\\r\\n };\\r\\n\\r\\n@Component({\\r\\n selector: 'mt-schedule-predecessor-field',\\r\\n standalone: true,\\r\\n imports: [\\r\\n CommonModule,\\r\\n FormsModule,\\r\\n Button,\\r\\n FieldValidation,\\r\\n NumberField,\\r\\n SelectField,\\r\\n Table,\\r\\n TranslocoModule,\\r\\n ],\\r\\n templateUrl: './schedule-predecessor-field.html',\\r\\n changeDetection: ChangeDetectionStrategy.OnPush,\\r\\n host: {\\r\\n class: 'grid gap-1',\\r\\n },\\r\\n})\\r\\nexport class SchedulePredecessorField implements ControlValueAccessor {\\r\\n private readonly predecessorCellTpl =\\r\\n viewChild.required<TemplateRef<any>>('predecessorCellTpl');\\r\\n private readonly typeCellTpl =\\r\\n viewChild.required<TemplateRef<any>>('typeCellTpl');\\r\\n private readonly lagCellTpl =\\r\\n viewChild.required<TemplateRef<any>>('lagCellTpl');\\r\\n\\r\\n readonly label = input<string>('');\\r\\n\\r\\n /** Fallback so a control-less, label-less field never renders id=\\\"undefined\\\". */\\r\\n private readonly defaultFieldId = nextFieldId(\\r\\n 'mt-schedule-predecessor-field',\\r\\n );\\r\\n /** Shared by the input and its <label for>. See src/lib/utils/field-id. */\\r\\n readonly fieldId = computed(() =>\\r\\n resolveFieldId(this.ngControl?.name, this.label(), this.defaultFieldId),\\r\\n );\\r\\n readonly placeholder = input<string>('');\\r\\n readonly readonly = input<boolean>(false);\\r\\n readonly required = input<boolean>(false);\\r\\n readonly configuration = input<unknown>(null);\\r\\n readonly runtimeContext =\\r\\n input<SchedulePredecessorFieldRuntimeContext | null>(null);\\r\\n\\r\\n readonly loading = signal(false);\\r\\n readonly taskOptions = signal<SelectOption[]>([]);\\r\\n readonly rows = signal<SchedulePredecessorRow[]>([]);\\r\\n readonly disabled = signal(false);\\r\\n\\r\\n readonly typeOptions = computed<SelectOption[]>(() => [\\r\\n { label: 'FS', value: 0 },\\r\\n { label: 'SS', value: 1 },\\r\\n { label: 'FF', value: 2 },\\r\\n { label: 'SF', value: 3 },\\r\\n ]);\\r\\n\\r\\n readonly availableTaskOptions = computed(() => {\\r\\n const currentTaskId = this.runtimeContext()?.moduleDataId;\\r\\n return this.taskOptions().filter(\\r\\n (item) => String(item.value) !== String(currentTaskId ?? ''),\\r\\n );\\r\\n });\\r\\n\\r\\n readonly canAddRow = computed(\\r\\n () =>\\r\\n !!this.runtimeContext()?.levelId &&\\r\\n !!this.runtimeContext()?.levelDataId &&\\r\\n this.availableTaskOptions().length > 0,\\r\\n );\\r\\n\\r\\n readonly addTooltip = computed(() =>\\r\\n this.canAddRow() ? undefined : this.texts().noAvailable,\\r\\n );\\r\\n readonly pageSize = computed(() =>\\r\\n this.rows().length > 0 ? this.rows().length : 1,\\r\\n );\\r\\n\\r\\n readonly columns = linkedSignal<ColumnDef[]>(() => [\\r\\n {\\r\\n key: 'predecessorId',\\r\\n label: this.texts().predecessor,\\r\\n type: 'custom',\\r\\n customCellTpl: this.predecessorCellTpl(),\\r\\n },\\r\\n {\\r\\n key: 'type',\\r\\n label: this.texts().type,\\r\\n type: 'custom',\\r\\n customCellTpl: this.typeCellTpl(),\\r\\n },\\r\\n {\\r\\n key: 'lagDays',\\r\\n label: this.texts().lagDays,\\r\\n type: 'custom',\\r\\n customCellTpl: this.lagCellTpl(),\\r\\n },\\r\\n ]);\\r\\n\\r\\n readonly rowActions = computed<TableAction[]>(() => [\\r\\n {\\r\\n icon: 'general.trash-01',\\r\\n color: 'danger',\\r\\n variant: 'text',\\r\\n tooltip: this.texts().delete,\\r\\n hidden: () => this.disabled() || this.readonly(),\\r\\n action: (row) => this.removeRow(row.key),\\r\\n },\\r\\n ]);\\r\\n\\r\\n requiredValidator = Validators.required;\\r\\n onTouched: () => void = () => {};\\r\\n onModelChange: (value: string | null) => void = () => {};\\r\\n\\r\\n public ngControl: NgControl | null = null;\\r\\n\\r\\n private readonly http = inject(HttpClient);\\r\\n private readonly transloco = inject(TranslocoService);\\r\\n private readonly destroyRef = inject(DestroyRef);\\r\\n private readonly activeLang = toSignal(this.transloco.langChanges$, {\\r\\n initialValue: this.transloco.getActiveLang(),\\r\\n });\\r\\n private rowKey = 0;\\r\\n\\r\\n readonly texts = computed(() => {\\r\\n this.activeLang();\\r\\n\\r\\n return {\\r\\n noAvailable: this.transloco.translate(\\r\\n 'components.schedulePredecessorField.noAvailable',\\r\\n ),\\r\\n predecessor: this.transloco.translate(\\r\\n 'components.schedulePredecessorField.predecessor',\\r\\n ),\\r\\n type: this.transloco.translate(\\r\\n 'components.schedulePredecessorField.type',\\r\\n ),\\r\\n lagDays: this.transloco.translate(\\r\\n 'components.schedulePredecessorField.lagDays',\\r\\n ),\\r\\n delete: this.transloco.translate(\\r\\n 'components.schedulePredecessorField.delete',\\r\\n ),\\r\\n };\\r\\n });\\r\\n\\r\\n constructor() {\\r\\n this.ngControl = inject(NgControl, { self: true, optional: true });\\r\\n if (this.ngControl) {\\r\\n this.ngControl.valueAccessor = this;\\r\\n }\\r\\n\\r\\n effect(() => {\\r\\n if (this.ngControl?.control && this.required()) {\\r\\n this.ngControl.control.addValidators(Validators.required);\\r\\n this.ngControl.control.updateValueAndValidity();\\r\\n }\\r\\n });\\r\\n\\r\\n effect(() => {\\r\\n const context = this.runtimeContext();\\r\\n const levelId = context?.levelId;\\r\\n const levelDataId = context?.levelDataId;\\r\\n\\r\\n if (levelId == null || levelDataId == null) {\\r\\n this.taskOptions.set([]);\\r\\n return;\\r\\n }\\r\\n\\r\\n untracked(() => this.loadTaskOptions(levelId, levelDataId));\\r\\n });\\r\\n }\\r\\n\\r\\n addRow(): void {\\r\\n if (this.disabled() || this.readonly() || !this.canAddRow()) {\\r\\n return;\\r\\n }\\r\\n\\r\\n this.syncRows([\\r\\n ...this.rows(),\\r\\n {\\r\\n key: this.nextRowKey(),\\r\\n predecessorId: '',\\r\\n type: 0,\\r\\n lagDays: 0,\\r\\n },\\r\\n ]);\\r\\n }\\r\\n\\r\\n removeRow(key: string): void {\\r\\n if (this.disabled() || this.readonly()) {\\r\\n return;\\r\\n }\\r\\n\\r\\n this.syncRows(this.rows().filter((row) => row.key !== key));\\r\\n }\\r\\n\\r\\n updateRow(key: string, patch: Partial<SchedulePredecessorRow>): void {\\r\\n if (this.disabled() || this.readonly()) {\\r\\n return;\\r\\n }\\r\\n\\r\\n this.syncRows(\\r\\n this.rows().map((row) => (row.key === key ? { ...row, ...patch } : row)),\\r\\n );\\r\\n }\\r\\n\\r\\n writeValue(value: unknown): void {\\r\\n const rows =\\r\\n typeof value === 'string'\\r\\n ? value\\r\\n .split(',')\\r\\n .map((item) => item.trim())\\r\\n .filter(Boolean)\\r\\n .map((item) => this.parseCompactValue(item))\\r\\n .filter((item): item is SchedulePredecessorValue => item != null)\\r\\n .map((item) => ({\\r\\n key: this.nextRowKey(),\\r\\n ...item,\\r\\n }))\\r\\n : [];\\r\\n\\r\\n this.rows.set(rows);\\r\\n }\\r\\n\\r\\n registerOnChange(fn: (value: string | null) => void): void {\\r\\n this.onModelChange = fn;\\r\\n }\\r\\n\\r\\n registerOnTouched(fn: () => void): void {\\r\\n this.onTouched = fn;\\r\\n }\\r\\n\\r\\n setDisabledState(disabled: boolean): void {\\r\\n this.disabled.set(disabled);\\r\\n }\\r\\n\\r\\n private syncRows(rows: SchedulePredecessorRow[]): void {\\r\\n this.rows.set(rows);\\r\\n const value = rows\\r\\n .filter(\\r\\n (row) =>\\r\\n row.predecessorId !== null &&\\r\\n row.predecessorId !== undefined &&\\r\\n String(row.predecessorId).trim() !== '',\\r\\n )\\r\\n .map((row) => this.formatCompactValue(row))\\r\\n .join(',');\\r\\n\\r\\n this.onModelChange(value || null);\\r\\n this.onTouched();\\r\\n }\\r\\n\\r\\n private loadTaskOptions(\\r\\n levelId: number | string,\\r\\n levelDataId: number | string,\\r\\n ): void {\\r\\n this.loading.set(true);\\r\\n\\r\\n this.http\\r\\n .post<ScheduleQueryResponse>(\\r\\n `levels/${levelId}/${levelDataId}/schedule/query`,\\r\\n {\\r\\n projection: 'Tree',\\r\\n propertyKeys: ['name'],\\r\\n },\\r\\n )\\r\\n .pipe(\\r\\n takeUntilDestroyed(this.destroyRef),\\r\\n finalize(() => this.loading.set(false)),\\r\\n catchError(() => of({ data: { records: [] } })),\\r\\n )\\r\\n .subscribe((response) => {\\r\\n this.taskOptions.set(this.mapTaskOptions(response.data));\\r\\n });\\r\\n }\\r\\n\\r\\n private mapTaskOptions(\\r\\n data: ScheduleQueryData | null | undefined,\\r\\n ): SelectOption[] {\\r\\n // Labels show the ROW NUMBER (1-based position in the same pre-order walk\\r\\n // the grid's ID column numbers), not the backend id — the two surfaces\\r\\n // must speak one coordinate. The option VALUE stays the real id: the\\r\\n // compact predecessor string this field produces is wire format.\\r\\n return this.flattenRecords(\\r\\n this.resolveRootRecords(\\r\\n data?.records ?? [],\\r\\n data?.projectionMeta?.rootIds ?? [],\\r\\n ),\\r\\n ).map((record, index) => ({\\r\\n label: `${index + 1} - ${record.name ?? record.id}`,\\r\\n value: String(record.id),\\r\\n }));\\r\\n }\\r\\n\\r\\n private resolveRootRecords(\\r\\n records: ScheduleQueryRecord[],\\r\\n rootIds: Array<number | string> | null | undefined,\\r\\n ): ScheduleQueryRecord[] {\\r\\n if (!rootIds?.length) {\\r\\n return records;\\r\\n }\\r\\n\\r\\n const recordsById = new Map(\\r\\n records.map((record) => [String(record.id), record]),\\r\\n );\\r\\n\\r\\n return rootIds\\r\\n .map((id) => recordsById.get(String(id)))\\r\\n .filter((record): record is ScheduleQueryRecord => record != null);\\r\\n }\\r\\n\\r\\n private flattenRecords(\\r\\n records: ScheduleQueryRecord[],\\r\\n ): ScheduleQueryRecord[] {\\r\\n const output: ScheduleQueryRecord[] = [];\\r\\n\\r\\n const walk = (items: ScheduleQueryRecord[]): void => {\\r\\n items.forEach((item) => {\\r\\n output.push(item);\\r\\n walk(item.children ?? []);\\r\\n });\\r\\n };\\r\\n\\r\\n walk(records);\\r\\n return output;\\r\\n }\\r\\n\\r\\n private nextRowKey(): string {\\r\\n this.rowKey += 1;\\r\\n return `predecessor-${this.rowKey}`;\\r\\n }\\r\\n\\r\\n private parseCompactValue(value: string): SchedulePredecessorValue | null {\\r\\n const match = value.match(/^(.+?)(FS|SS|FF|SF)([+-]\\\\d+)?$/);\\r\\n\\r\\n if (!match) {\\r\\n return null;\\r\\n }\\r\\n\\r\\n return {\\r\\n predecessorId: match[1],\\r\\n type: PREDECESSOR_TYPE_BY_TOKEN[match[2] as PredecessorTypeToken],\\r\\n lagDays: match[3] ? Number(match[3]) : 0,\\r\\n };\\r\\n }\\r\\n\\r\\n private formatCompactValue(row: SchedulePredecessorValue): string {\\r\\n const lag =\\r\\n row.lagDays > 0 ? `+${row.lagDays}` : row.lagDays < 0 ? row.lagDays : '';\\r\\n\\r\\n return `${row.predecessorId}${PREDECESSOR_TOKEN_BY_TYPE[row.type]}${lag}`;\\r\\n }\\r\\n}\\r\\n\",\"<div class=\\\"gap-3 overflow-auto\\\">\\r\\n <div class=\\\"flex items-center justify-between mb-2\\\">\\r\\n <div>\\r\\n @if (label()) {\\r\\n <label\\r\\n [class.required]=\\\"ngControl?.control?.hasValidator(requiredValidator)\\\"\\r\\n [for]=\\\"fieldId()\\\"\\r\\n >\\r\\n {{ label() }}\\r\\n </label>\\r\\n }\\r\\n </div>\\r\\n <mt-button\\r\\n icon=\\\"general.plus\\\"\\r\\n [label]=\\\"'components.schedulePredecessorField.add' | transloco\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n variant=\\\"outlined\\\"\\r\\n size=\\\"small\\\"\\r\\n [disabled]=\\\"disabled() || readonly() || !canAddRow()\\\"\\r\\n [tooltip]=\\\"addTooltip()\\\"\\r\\n (onClick)=\\\"addRow()\\\"\\r\\n />\\r\\n </div>\\r\\n\\r\\n <ng-template #predecessorCellTpl let-row>\\r\\n <mt-select-field\\r\\n [field]=\\\"false\\\"\\r\\n [options]=\\\"availableTaskOptions()\\\"\\r\\n optionLabel=\\\"label\\\"\\r\\n optionValue=\\\"value\\\"\\r\\n [placeholder]=\\\"\\r\\n placeholder() ||\\r\\n ('components.schedulePredecessorField.selectPredecessor' | transloco)\\r\\n \\\"\\r\\n [filter]=\\\"true\\\"\\r\\n [showClear]=\\\"true\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [ngModel]=\\\"row.predecessorId || undefined\\\"\\r\\n (onChange)=\\\"updateRow(row.key, { predecessorId: $event ?? '' })\\\"\\r\\n />\\r\\n </ng-template>\\r\\n\\r\\n <ng-template #typeCellTpl let-row>\\r\\n <mt-select-field\\r\\n [field]=\\\"false\\\"\\r\\n [options]=\\\"typeOptions()\\\"\\r\\n optionLabel=\\\"label\\\"\\r\\n optionValue=\\\"value\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [ngModel]=\\\"row.type\\\"\\r\\n (onChange)=\\\"updateRow(row.key, { type: $event ?? 0 })\\\"\\r\\n />\\r\\n </ng-template>\\r\\n\\r\\n <ng-template #lagCellTpl let-row>\\r\\n <mt-number-field\\r\\n [field]=\\\"false\\\"\\r\\n [useGrouping]=\\\"false\\\"\\r\\n [placeholder]=\\\"'components.schedulePredecessorField.lagDays' | transloco\\\"\\r\\n [readonly]=\\\"disabled() || readonly()\\\"\\r\\n [ngModel]=\\\"row.lagDays\\\"\\r\\n (ngModelChange)=\\\"updateRow(row.key, { lagDays: $event ?? 0 })\\\"\\r\\n />\\r\\n </ng-template>\\r\\n\\r\\n <mt-table\\r\\n noCard\\r\\n [data]=\\\"rows()\\\"\\r\\n [columns]=\\\"columns()\\\"\\r\\n [rowActions]=\\\"rowActions()\\\"\\r\\n [pageSize]=\\\"pageSize()\\\"\\r\\n [generalSearch]=\\\"false\\\"\\r\\n [showFilters]=\\\"false\\\"\\r\\n [dataKey]=\\\"'key'\\\"\\r\\n storageKey=\\\"schedule-predecessor-field-table\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n >\\r\\n <ng-template #empty>\\r\\n <div\\r\\n class=\\\"rounded-xl border border-dashed border-surface px-4 py-5 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.schedulePredecessorField.empty\\\" | transloco }}\\r\\n </div>\\r\\n </ng-template>\\r\\n </mt-table>\\r\\n</div>\\r\\n\\r\\n<mt-field-validation [control]=\\\"ngControl?.control\\\"></mt-field-validation>\\r\\n\",\"import { InjectionToken, Type } from '@angular/core';\\r\\n\\r\\n/** Inputs the EntityList add-row dialog will receive via ModalService inputValues. */\\r\\nexport interface EntityListAddDialogInputs {\\r\\n moduleId: number | string | null;\\r\\n levelId: number | string | null;\\r\\n levelDataId: number | string | null;\\r\\n /** Property keys that should be editable in the dialog. */\\r\\n writeFields: string[];\\r\\n /** Pre-populated form values (keyed by property key) for the Edit flow. */\\r\\n initialValues?: Record<string, unknown>;\\r\\n /** True when the dialog edits an existing row rather than adding one. */\\r\\n isEdit?: boolean;\\r\\n}\\r\\n\\r\\n/**\\r\\n * Token used by `mt-entity-list-field` (Write mode) to open the rich add-row\\r\\n * dialog backed by `@masterteam/forms`'s `mt-client-form`. Apps that want this\\r\\n * behavior should call `provideEntityListAddForm()` from\\r\\n * `@masterteam/forms/entity-list-add-form` in their app providers. When the\\r\\n * token is not registered, the field falls back to a minimal text-only popup.\\r\\n */\\r\\nexport const ENTITY_LIST_ADD_DIALOG_COMPONENT = new InjectionToken<\\r\\n Type<unknown>\\r\\n>('ENTITY_LIST_ADD_DIALOG_COMPONENT');\\r\\n\",\"import {\\r\\n Component,\\r\\n ChangeDetectionStrategy,\\r\\n DestroyRef,\\r\\n computed,\\r\\n effect,\\r\\n inject,\\r\\n input,\\r\\n signal,\\r\\n untracked,\\r\\n} from '@angular/core';\\r\\nimport { ControlValueAccessor, NgControl, Validators } from '@angular/forms';\\r\\nimport { CommonModule } from '@angular/common';\\r\\nimport { HttpClient, HttpContext } from '@angular/common/http';\\r\\nimport { TranslocoPipe, TranslocoService } from '@jsverse/transloco';\\r\\nimport { Skeleton } from 'primeng/skeleton';\\r\\nimport { Message } from 'primeng/message';\\r\\nimport { catchError, finalize, of, take } from 'rxjs';\\r\\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\\r\\n\\r\\nimport { Button } from '@masterteam/components/button';\\r\\nimport { FieldValidation } from '@masterteam/components/field-validation';\\r\\nimport { ModalService } from '@masterteam/components/modal';\\r\\nimport {\\r\\n Table,\\r\\n type ColumnDef,\\r\\n type TableAction,\\r\\n} from '@masterteam/components/table';\\r\\nimport type {\\r\\n EntityData,\\r\\n EntityViewType,\\r\\n PropertyValueComparison,\\r\\n} from '@masterteam/components/entities';\\r\\nimport type { EntityListFieldRuntimeContext } from '@masterteam/components';\\r\\n\\r\\nimport { ENTITY_LIST_ADD_DIALOG_COMPONENT } from './entity-list-add-token';\\r\\n\\r\\n// ============================================================================\\r\\n// Types — minimal subset of fetch/query Table response (mirrors\\r\\n// ClientListFetchQueryResponse from @masterteam/client-components).\\r\\n// ============================================================================\\r\\n\\r\\ninterface FetchPropertyMeta {\\r\\n id: number;\\r\\n key: string;\\r\\n normalizedKey: string;\\r\\n label: string;\\r\\n viewType: string;\\r\\n configuration: EntityData['propertyConfiguration'];\\r\\n source?: string;\\r\\n order: number;\\r\\n}\\r\\n\\r\\ninterface FetchValueCell {\\r\\n raw?: unknown;\\r\\n value?: unknown;\\r\\n display?: string | null;\\r\\n comparison?: PropertyValueComparison;\\r\\n}\\r\\n\\r\\ninterface FetchRecord {\\r\\n id: number;\\r\\n values: Record<string, FetchValueCell>;\\r\\n}\\r\\n\\r\\ninterface FetchTableColumn {\\r\\n key: string;\\r\\n label: string;\\r\\n viewType: string;\\r\\n order: number;\\r\\n visible: boolean;\\r\\n configuration: Record<string, unknown> | null;\\r\\n}\\r\\n\\r\\ninterface FetchQueryResponse {\\r\\n catalog?: { properties?: FetchPropertyMeta[] };\\r\\n records?: FetchRecord[];\\r\\n projectionMeta?: { columns?: FetchTableColumn[] };\\r\\n}\\r\\n\\r\\ninterface EntityListColumnDef extends ColumnDef {\\r\\n key: string;\\r\\n label: string;\\r\\n type: 'entity';\\r\\n viewType?: string;\\r\\n order?: number;\\r\\n visible?: boolean;\\r\\n configuration?: Record<string, unknown> | null;\\r\\n /** Underlying catalog property key (e.g. \\\"task_name\\\") used to look up\\r\\n * form values keyed by property key when a new row is added locally. */\\r\\n propertyKey?: string;\\r\\n}\\r\\n\\r\\ntype EntityListRow = Record<string, unknown | EntityData>;\\r\\n\\r\\n/**\\r\\n * Configured access mode. Mirrors the backend `EntityList` access matrix:\\r\\n * `Auto` and `ReadWrite` allow both, `Read` reads only, `Write` writes only,\\r\\n * `None` neither.\\r\\n */\\r\\ntype EntityListAccess = 'Auto' | 'Read' | 'Write' | 'ReadWrite' | 'None';\\r\\n\\r\\n/** One submitted row value (`values[]` entry of the stored EntityList JSON). */\\r\\ninterface EntityListSubmitValue {\\r\\n propertyKey: string;\\r\\n rawValue: string | null;\\r\\n}\\r\\n\\r\\n/**\\r\\n * A pending create/update row in the stored EntityList payload.\\r\\n * `entityId > 0` updates that target record; `0` creates a new one.\\r\\n */\\r\\ninterface EntityListSubmitRow {\\r\\n rowId: string;\\r\\n entityId: number;\\r\\n values: EntityListSubmitValue[];\\r\\n}\\r\\n\\r\\n/** Stored EntityList property value (round-tripped through the form). */\\r\\ninterface EntityListStoredValue {\\r\\n entityIds?: number[];\\r\\n createdIds?: number[];\\r\\n updatedIds?: number[];\\r\\n deletedIds?: number[];\\r\\n snapshot?: unknown;\\r\\n rows?: EntityListSubmitRow[];\\r\\n}\\r\\n\\r\\n/** Non-persisted view state kept per pending row so dialogs and table cells\\r\\n * can use the original (non-stringified) form values and option labels. */\\r\\ninterface EntityListRowDraft {\\r\\n values: Record<string, unknown>;\\r\\n display: Record<string, unknown>;\\r\\n}\\r\\n\\r\\nconst UNSORTABLE_ENTITY_VIEW_TYPES = new Set<EntityViewType>([\\r\\n 'Attachment',\\r\\n 'Checkbox',\\r\\n]);\\r\\n\\r\\nconst ACCESS_ALIASES: Record<string, EntityListAccess> = {\\r\\n '0': 'Auto',\\r\\n '1': 'Read',\\r\\n '2': 'Write',\\r\\n '3': 'ReadWrite',\\r\\n '4': 'None',\\r\\n auto: 'Auto',\\r\\n read: 'Read',\\r\\n write: 'Write',\\r\\n readwrite: 'ReadWrite',\\r\\n none: 'None',\\r\\n};\\r\\n\\r\\n/** Internal row keys — not rendered, used to correlate rows with entities. */\\r\\nconst ROW_ID_KEY = '__rowId';\\r\\nconst ROW_ENTITY_ID_KEY = '__entityId';\\r\\nconst ROW_VALUES_KEY = '__values';\\r\\n\\r\\n@Component({\\r\\n selector: 'mt-entity-list-field',\\r\\n standalone: true,\\r\\n imports: [\\r\\n CommonModule,\\r\\n FieldValidation,\\r\\n Skeleton,\\r\\n Message,\\r\\n Table,\\r\\n Button,\\r\\n TranslocoPipe,\\r\\n ],\\r\\n templateUrl: './entity-list-field.html',\\r\\n styleUrls: ['./entity-list-field.scss'],\\r\\n changeDetection: ChangeDetectionStrategy.OnPush,\\r\\n host: { class: 'grid gap-1' },\\r\\n})\\r\\nexport class EntityListField implements ControlValueAccessor {\\r\\n // Inputs\\r\\n readonly label = input<string>('');\\r\\n readonly readonly = input<boolean>(false);\\r\\n readonly required = input<boolean>(false);\\r\\n /** EntityList property id (kept for back-compat; unused by fetch/query). */\\r\\n readonly propertyId = input<number | null>(null);\\r\\n /** Property configuration (sourceType, moduleId, access, readFields, etc). */\\r\\n readonly configuration = input<Record<string, unknown> | null>(null);\\r\\n /** Runtime ids needed to call the read endpoint. */\\r\\n readonly runtimeContext = input<EntityListFieldRuntimeContext | null>(null);\\r\\n /** Optional HttpContext (kept for back-compat). */\\r\\n readonly context = input<HttpContext | undefined>(undefined);\\r\\n\\r\\n // CVA state — pass-through value (EntityList stored JSON shape).\\r\\n private readonly storedValue = signal<EntityListStoredValue | null>(null);\\r\\n\\r\\n // Loaded table state.\\r\\n protected readonly columns = signal<EntityListColumnDef[]>([]);\\r\\n /** Rows loaded from the backend (existing target records). */\\r\\n protected readonly rows = signal<EntityListRow[]>([]);\\r\\n protected readonly loading = signal<boolean>(false);\\r\\n protected readonly errorMessage = signal<string | null>(null);\\r\\n\\r\\n protected readonly disabled = signal<boolean>(false);\\r\\n protected requiredValidator = Validators.required;\\r\\n public ngControl: NgControl | null = null;\\r\\n\\r\\n protected readonly levelId = computed<number | string | null>(() => {\\r\\n const raw = this.runtimeContext()?.levelId ?? null;\\r\\n return raw == null || raw === '' ? null : raw;\\r\\n });\\r\\n\\r\\n protected readonly levelDataId = computed<number | string | null>(() => {\\r\\n const raw = this.runtimeContext()?.levelDataId ?? null;\\r\\n return raw == null || raw === '' ? null : raw;\\r\\n });\\r\\n\\r\\n protected readonly moduleId = computed<number | string | null>(() => {\\r\\n const raw = (this.configuration() as { moduleId?: unknown } | null)\\r\\n ?.moduleId;\\r\\n return raw == null || raw === '' ? null : (raw as number | string);\\r\\n });\\r\\n\\r\\n protected readonly readFields = computed<string[]>(() => {\\r\\n const raw = (this.configuration() as { readFields?: unknown } | null)\\r\\n ?.readFields;\\r\\n if (!Array.isArray(raw)) return [];\\r\\n return raw.filter(\\r\\n (f): f is string => typeof f === 'string' && f.length > 0,\\r\\n );\\r\\n });\\r\\n\\r\\n /** Normalized `access` from the property configuration. */\\r\\n protected readonly accessMode = computed<EntityListAccess>(() => {\\r\\n const raw = (this.configuration() as { access?: unknown } | null)?.access;\\r\\n if (raw == null || raw === '') return 'Auto';\\r\\n return ACCESS_ALIASES[String(raw).trim().toLowerCase()] ?? 'Auto';\\r\\n });\\r\\n\\r\\n protected readonly canRead = computed<boolean>(() => {\\r\\n const access = this.accessMode();\\r\\n return access === 'Auto' || access === 'Read' || access === 'ReadWrite';\\r\\n });\\r\\n\\r\\n /** Access allows module-backed create/update/delete. */\\r\\n private readonly writeAllowed = computed<boolean>(() => {\\r\\n const access = this.accessMode();\\r\\n return access === 'Auto' || access === 'Write' || access === 'ReadWrite';\\r\\n });\\r\\n\\r\\n /** Write UI is rendered only when access allows it and the field is editable. */\\r\\n protected readonly canWrite = computed<boolean>(\\r\\n () => this.writeAllowed() && !this.readonly(),\\r\\n );\\r\\n\\r\\n protected readonly writeFields = computed<string[]>(() => {\\r\\n const raw = (this.configuration() as { writeFields?: unknown } | null)\\r\\n ?.writeFields;\\r\\n if (!Array.isArray(raw)) return [];\\r\\n return raw.filter(\\r\\n (f): f is string => typeof f === 'string' && f.length > 0,\\r\\n );\\r\\n });\\r\\n\\r\\n /**\\r\\n * Pending create/update rows, in the exact shape persisted by the backend\\r\\n * (`rows[]` of the stored EntityList JSON). Rows with `entityId > 0` are\\r\\n * partial updates of existing records; `entityId = 0` rows are creates.\\r\\n */\\r\\n private readonly pendingRows = signal<EntityListSubmitRow[]>([]);\\r\\n /** Existing entity ids the user removed (submitted as `deletedIds`). */\\r\\n private readonly deletedIds = signal<number[]>([]);\\r\\n /** rowId → original form values / option labels (view state only). */\\r\\n private readonly rowDrafts = signal<Record<string, EntityListRowDraft>>({});\\r\\n private localRowSeq = 0;\\r\\n /** Serialized copy of the last value we emitted, to ignore CVA echoes. */\\r\\n private lastEmittedJson: string | null = null;\\r\\n\\r\\n /** Server rows indexed by entity id, for merging pending updates. */\\r\\n private readonly rowsByEntityId = computed<Map<number, EntityListRow>>(() => {\\r\\n const map = new Map<number, EntityListRow>();\\r\\n for (const row of this.rows()) {\\r\\n const entityId = Number(row[ROW_ENTITY_ID_KEY]);\\r\\n if (entityId > 0) map.set(entityId, row);\\r\\n }\\r\\n return map;\\r\\n });\\r\\n\\r\\n /** Locally created rows (not yet persisted). */\\r\\n private readonly createdRows = computed<EntityListRow[]>(() => {\\r\\n const drafts = this.rowDrafts();\\r\\n return this.pendingRows()\\r\\n .filter((row) => !(row.entityId > 0))\\r\\n .map((row) => {\\r\\n const draft = drafts[row.rowId];\\r\\n return this.buildRow(\\r\\n row.rowId,\\r\\n row.rowId,\\r\\n 0,\\r\\n draft?.values ?? this.toValueMap(row.values),\\r\\n draft?.display ?? {},\\r\\n );\\r\\n });\\r\\n });\\r\\n\\r\\n /** Pending edits of existing rows, keyed by entity id. */\\r\\n private readonly editedRowsByEntityId = computed<Map<number, EntityListRow>>(\\r\\n () => {\\r\\n const drafts = this.rowDrafts();\\r\\n const serverRows = this.rowsByEntityId();\\r\\n const map = new Map<number, EntityListRow>();\\r\\n for (const row of this.pendingRows()) {\\r\\n if (!(row.entityId > 0)) continue;\\r\\n const base = serverRows.get(row.entityId);\\r\\n const draft = drafts[row.rowId];\\r\\n // A pending update only carries the keys the user changed.\\r\\n const changed = draft?.values ?? this.toValueMap(row.values);\\r\\n const display = draft?.display ?? {};\\r\\n\\r\\n if (!base) {\\r\\n map.set(\\r\\n row.entityId,\\r\\n this.buildRow(\\r\\n row.entityId,\\r\\n row.rowId,\\r\\n row.entityId,\\r\\n changed,\\r\\n display,\\r\\n ),\\r\\n );\\r\\n continue;\\r\\n }\\r\\n\\r\\n // Keep the backend-rendered cells for untouched columns so resolved\\r\\n // labels (users, lookups, statuses) are not replaced by raw ids.\\r\\n const baseValues =\\r\\n (base[ROW_VALUES_KEY] as Record<string, unknown> | undefined) ?? {};\\r\\n const next: EntityListRow = {\\r\\n ...base,\\r\\n [ROW_ID_KEY]: row.rowId,\\r\\n [ROW_VALUES_KEY]: { ...baseValues, ...changed },\\r\\n };\\r\\n for (const column of this.columns()) {\\r\\n const key = column.propertyKey ?? column.key;\\r\\n if (!(key in changed)) continue;\\r\\n next[column.key] = this.buildCell(column, changed[key], display[key]);\\r\\n }\\r\\n map.set(row.entityId, next);\\r\\n }\\r\\n return map;\\r\\n },\\r\\n );\\r\\n\\r\\n /**\\r\\n * Rows rendered in the table. In write mode existing rows are merged with\\r\\n * pending edits, removed rows are hidden, and locally created rows are\\r\\n * appended.\\r\\n */\\r\\n protected readonly displayRows = computed<EntityListRow[]>(() => {\\r\\n if (!this.canWrite()) return this.rows();\\r\\n const deleted = new Set(this.deletedIds());\\r\\n const edited = this.editedRowsByEntityId();\\r\\n const existing = this.rows()\\r\\n .filter((row) => !deleted.has(Number(row[ROW_ENTITY_ID_KEY])))\\r\\n .map((row) => edited.get(Number(row[ROW_ENTITY_ID_KEY])) ?? row);\\r\\n return [...existing, ...this.createdRows()];\\r\\n });\\r\\n\\r\\n protected readonly hasRows = computed<boolean>(\\r\\n () => this.displayRows().length > 0,\\r\\n );\\r\\n\\r\\n protected readonly hasRequiredContext = computed<boolean>(\\r\\n () =>\\r\\n this.levelId() != null &&\\r\\n this.levelDataId() != null &&\\r\\n this.moduleId() != null &&\\r\\n this.readFields().length > 0,\\r\\n );\\r\\n\\r\\n protected onTouched: () => void = () => {};\\r\\n protected onModelChange: (value: EntityListStoredValue | null) => void =\\r\\n () => {};\\r\\n\\r\\n private readonly http = inject(HttpClient);\\r\\n private readonly destroyRef = inject(DestroyRef);\\r\\n private readonly modal = inject(ModalService);\\r\\n private readonly transloco = inject(TranslocoService);\\r\\n /**\\r\\n * Optional rich add-row dialog (provided by `@masterteam/forms` via\\r\\n * `provideEntityListAddForm()`). When available, used instead of the local\\r\\n * minimal dialog so the popup renders `mt-client-form` filtered by\\r\\n * `writeFields`.\\r\\n */\\r\\n private readonly addDialogComponent = inject(\\r\\n ENTITY_LIST_ADD_DIALOG_COMPONENT,\\r\\n { optional: true },\\r\\n );\\r\\n\\r\\n constructor() {\\r\\n this.ngControl = inject(NgControl, { self: true, optional: true });\\r\\n if (this.ngControl) {\\r\\n this.ngControl.valueAccessor = this;\\r\\n }\\r\\n\\r\\n // Trigger fetch when context inputs change. Columns always come from\\r\\n // /api/fetch/query; records are kept whenever access allows reading.\\r\\n effect(() => {\\r\\n const allowedRead = this.canRead();\\r\\n const allowedWrite = this.writeAllowed();\\r\\n const ready = this.hasRequiredContext();\\r\\n const levelId = this.levelId();\\r\\n const levelDataId = this.levelDataId();\\r\\n const moduleId = this.moduleId();\\r\\n const readFields = this.readFields();\\r\\n\\r\\n untracked(() => {\\r\\n if (\\r\\n (!allowedRead && !allowedWrite) ||\\r\\n !ready ||\\r\\n levelId == null ||\\r\\n levelDataId == null ||\\r\\n moduleId == null\\r\\n ) {\\r\\n this.columns.set([]);\\r\\n this.rows.set([]);\\r\\n this.errorMessage.set(null);\\r\\n return;\\r\\n }\\r\\n this.fetchRows(levelId, levelDataId, moduleId, readFields);\\r\\n });\\r\\n });\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // CVA\\r\\n // ============================================================================\\r\\n\\r\\n writeValue(value: EntityListStoredValue | string | null): void {\\r\\n const incoming = this.coerceStoredValue(value);\\r\\n // Ignore the echo of our own emission (DynamicForm re-writes the model on\\r\\n // every value change) so pending edits/deletions are not reset.\\r\\n if (this.isEchoOfLastEmit(incoming)) return;\\r\\n this.lastEmittedJson = null;\\r\\n this.storedValue.set(incoming);\\r\\n // Restore rows the backend left unprocessed. `deletedIds` on a loaded\\r\\n // value are historical operation markers, not pending intent.\\r\\n const rows = Array.isArray(incoming?.rows) ? incoming.rows : [];\\r\\n this.pendingRows.set(\\r\\n rows.filter((row) => !!row && typeof row === 'object'),\\r\\n );\\r\\n this.deletedIds.set([]);\\r\\n this.rowDrafts.set({});\\r\\n }\\r\\n\\r\\n /**\\r\\n * True when the written value still carries exactly the rows and deletions\\r\\n * we last emitted — i.e. the form is echoing our own value back rather than\\r\\n * loading a new one.\\r\\n */\\r\\n private isEchoOfLastEmit(incoming: EntityListStoredValue | null): boolean {\\r\\n if (this.lastEmittedJson === null) return false;\\r\\n return (\\r\\n JSON.stringify({\\r\\n rows: incoming?.rows ?? [],\\r\\n deletedIds: incoming?.deletedIds ?? [],\\r\\n }) === this.lastEmittedJson\\r\\n );\\r\\n }\\r\\n\\r\\n /**\\r\\n * The stored value is persisted as JSON, so a host may write either the\\r\\n * parsed object or its raw string form.\\r\\n */\\r\\n private coerceStoredValue(value: unknown): EntityListStoredValue | null {\\r\\n if (value == null || value === '') return null;\\r\\n if (typeof value === 'string') {\\r\\n try {\\r\\n return this.coerceStoredValue(JSON.parse(value));\\r\\n } catch {\\r\\n return null;\\r\\n }\\r\\n }\\r\\n return typeof value === 'object' && !Array.isArray(value)\\r\\n ? (value as EntityListStoredValue)\\r\\n : null;\\r\\n }\\r\\n\\r\\n registerOnChange(fn: (value: EntityListStoredValue | null) => void): void {\\r\\n this.onModelChange = fn;\\r\\n }\\r\\n\\r\\n registerOnTouched(fn: () => void): void {\\r\\n this.onTouched = fn;\\r\\n }\\r\\n\\r\\n setDisabledState(isDisabled: boolean): void {\\r\\n this.disabled.set(isDisabled);\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Write mode — add / edit / delete\\r\\n // ============================================================================\\r\\n\\r\\n /** Row actions shown in write mode — edit and delete. */\\r\\n protected readonly writeRowActions = computed<TableAction[]>(() => {\\r\\n if (this.disabled()) return [];\\r\\n return [\\r\\n {\\r\\n icon: 'custom.pencil' as const,\\r\\n tooltip: this.transloco.translate('components.entityListField.edit'),\\r\\n action: (row: EntityListRow) => this.openEditDialog(row),\\r\\n },\\r\\n {\\r\\n icon: 'general.trash-01' as const,\\r\\n tooltip: this.transloco.translate('components.entityListField.delete'),\\r\\n color: 'danger' as const,\\r\\n confirmation: {\\r\\n type: 'popup' as const,\\r\\n confirmationType: 'delete' as const,\\r\\n },\\r\\n action: (row: EntityListRow) => this.deleteRow(row),\\r\\n },\\r\\n ];\\r\\n });\\r\\n\\r\\n protected openAddDialog(): void {\\r\\n if (this.disabled()) return;\\r\\n const component = this.addDialogComponent;\\r\\n if (!component) return;\\r\\n\\r\\n const ref = this.modal.openModal(component, 'dialog', {\\r\\n header: this.transloco.translate('components.entityListField.add'),\\r\\n styleClass: '!w-[48rem] max-w-[96vw]',\\r\\n dismissableMask: true,\\r\\n inputValues: {\\r\\n moduleId: this.moduleId(),\\r\\n levelId: this.levelId(),\\r\\n levelDataId: this.levelDataId(),\\r\\n writeFields: this.writeFields(),\\r\\n },\\r\\n });\\r\\n\\r\\n ref.onClose.pipe(take(1)).subscribe((result: unknown) => {\\r\\n const parsed = this.parseDialogResult(result);\\r\\n if (!parsed) return;\\r\\n // A create row carries every value the user filled in; empty fields are\\r\\n // dropped so the target module keeps its own defaults.\\r\\n const values = this.dropEmptyValues(parsed.values);\\r\\n const rowId = this.nextRowId();\\r\\n this.setRowDraft(rowId, values, parsed.display);\\r\\n this.pendingRows.set([\\r\\n ...this.pendingRows(),\\r\\n { rowId, entityId: 0, values: this.toSubmitValues(values) },\\r\\n ]);\\r\\n this.emitValue();\\r\\n });\\r\\n }\\r\\n\\r\\n protected openEditDialog(row: EntityListRow): void {\\r\\n if (this.disabled()) return;\\r\\n const component = this.addDialogComponent;\\r\\n if (!component) return;\\r\\n\\r\\n const entityId = Number(row[ROW_ENTITY_ID_KEY]) || 0;\\r\\n const rowId = String(row[ROW_ID_KEY] ?? '');\\r\\n const initialValues =\\r\\n (row[ROW_VALUES_KEY] as Record<string, unknown> | undefined) ?? {};\\r\\n\\r\\n const ref = this.modal.openModal(component, 'dialog', {\\r\\n header: this.transloco.translate('components.entityListField.edit'),\\r\\n styleClass: '!w-[48rem] max-w-[96vw]',\\r\\n dismissableMask: true,\\r\\n inputValues: {\\r\\n moduleId: this.moduleId(),\\r\\n levelId: this.levelId(),\\r\\n levelDataId: this.levelDataId(),\\r\\n writeFields: this.writeFields(),\\r\\n initialValues,\\r\\n isEdit: true,\\r\\n },\\r\\n });\\r\\n\\r\\n ref.onClose.pipe(take(1)).subscribe((result: unknown) => {\\r\\n const parsed = this.parseDialogResult(result);\\r\\n if (!parsed) return;\\r\\n if (entityId > 0) {\\r\\n this.applyExistingRowEdit(entityId, rowId, initialValues, parsed);\\r\\n } else {\\r\\n this.applyCreatedRowEdit(rowId, parsed);\\r\\n }\\r\\n this.emitValue();\\r\\n });\\r\\n }\\r\\n\\r\\n /**\\r\\n * Existing target records are updated partially: only values the user\\r\\n * actually changed are submitted, so fields the dialog could not pre-fill\\r\\n * (keys outside `readFields`) are left untouched by the backend.\\r\\n */\\r\\n private applyExistingRowEdit(\\r\\n entityId: number,\\r\\n fallbackRowId: string,\\r\\n initialValues: Record<string, unknown>,\\r\\n parsed: {\\r\\n values: Record<string, unknown>;\\r\\n display: Record<string, unknown>;\\r\\n },\\r\\n ): void {\\r\\n const changed = this.diffValues(initialValues, parsed.values);\\r\\n const current = this.pendingRows();\\r\\n const existing = current.find((row) => row.entityId === entityId);\\r\\n const rowId =\\r\\n existing?.rowId || (fallbackRowId ? fallbackRowId : `entity-${entityId}`);\\r\\n const merged = {\\r\\n ...(this.rowDrafts()[rowId]?.values ?? {}),\\r\\n ...changed,\\r\\n };\\r\\n\\r\\n if (Object.keys(merged).length === 0) {\\r\\n // Nothing left to submit for this record — drop the pending update.\\r\\n this.clearRowDraft(rowId);\\r\\n this.pendingRows.set(current.filter((row) => row.entityId !== entityId));\\r\\n return;\\r\\n }\\r\\n\\r\\n this.setRowDraft(rowId, merged, parsed.display);\\r\\n const next: EntityListSubmitRow = {\\r\\n rowId,\\r\\n entityId,\\r\\n values: this.toSubmitValues(merged),\\r\\n };\\r\\n this.pendingRows.set(\\r\\n existing\\r\\n ? current.map((row) => (row.entityId === entityId ? next : row))\\r\\n : [...current, next],\\r\\n );\\r\\n }\\r\\n\\r\\n /** A locally created row is replaced wholesale by the dialog result. */\\r\\n private applyCreatedRowEdit(\\r\\n rowId: string,\\r\\n parsed: {\\r\\n values: Record<string, unknown>;\\r\\n display: Record<string, unknown>;\\r\\n },\\r\\n ): void {\\r\\n const values = this.dropEmptyValues(parsed.values);\\r\\n this.setRowDraft(rowId, values, parsed.display);\\r\\n this.pendingRows.set(\\r\\n this.pendingRows().map((row) =>\\r\\n row.rowId === rowId\\r\\n ? { ...row, values: this.toSubmitValues(values) }\\r\\n : row,\\r\\n ),\\r\\n );\\r\\n }\\r\\n\\r\\n /**\\r\\n * Remove a row. Locally created rows are dropped from the pending payload;\\r\\n * existing records are queued in `deletedIds` for the backend to delete.\\r\\n */\\r\\n protected deleteRow(row: EntityListRow): void {\\r\\n if (this.disabled()) return;\\r\\n const entityId = Number(row[ROW_ENTITY_ID_KEY]) || 0;\\r\\n const rowId = String(row[ROW_ID_KEY] ?? '');\\r\\n\\r\\n if (entityId > 0) {\\r\\n if (!this.deletedIds().includes(entityId)) {\\r\\n this.deletedIds.set([...this.deletedIds(), entityId]);\\r\\n }\\r\\n // A queued update for a deleted record is pointless — drop it.\\r\\n this.pendingRows.set(\\r\\n this.pendingRows().filter((pending) => pending.entityId !== entityId),\\r\\n );\\r\\n } else {\\r\\n this.pendingRows.set(\\r\\n this.pendingRows().filter((pending) => pending.rowId !== rowId),\\r\\n );\\r\\n }\\r\\n\\r\\n this.clearRowDraft(rowId);\\r\\n this.emitValue();\\r\\n }\\r\\n\\r\\n /**\\r\\n * Normalize the add/edit dialog close payload. The rich dialog returns\\r\\n * `{ values, display }`; a custom add-dialog may still return the raw values\\r\\n * object directly (no display map), which we treat as `display = {}`.\\r\\n */\\r\\n private parseDialogResult(result: unknown): {\\r\\n values: Record<string, unknown>;\\r\\n display: Record<string, unknown>;\\r\\n } | null {\\r\\n if (!result || typeof result !== 'object') return null;\\r\\n const payload = result as Record<string, unknown>;\\r\\n const values = payload['values'];\\r\\n if (values && typeof values === 'object') {\\r\\n return {\\r\\n values: values as Record<string, unknown>,\\r\\n display:\\r\\n (payload['display'] as Record<string, unknown> | undefined) ?? {},\\r\\n };\\r\\n }\\r\\n return { values: payload, display: {} };\\r\\n }\\r\\n\\r\\n private nextRowId(): string {\\r\\n const used = new Set(this.pendingRows().map((row) => row.rowId));\\r\\n let candidate = '';\\r\\n do {\\r\\n this.localRowSeq += 1;\\r\\n candidate = `client-${this.localRowSeq}`;\\r\\n } while (used.has(candidate));\\r\\n return candidate;\\r\\n }\\r\\n\\r\\n private setRowDraft(\\r\\n rowId: string,\\r\\n values: Record<string, unknown>,\\r\\n display: Record<string, unknown>,\\r\\n ): void {\\r\\n this.rowDrafts.set({ ...this.rowDrafts(), [rowId]: { values, display } });\\r\\n }\\r\\n\\r\\n private clearRowDraft(rowId: string): void {\\r\\n if (!rowId || !(rowId in this.rowDrafts())) return;\\r\\n const next = { ...this.rowDrafts() };\\r\\n delete next[rowId];\\r\\n this.rowDrafts.set(next);\\r\\n }\\r\\n\\r\\n private buildRow(\\r\\n id: string | number,\\r\\n rowId: string,\\r\\n entityId: number,\\r\\n values: Record<string, unknown>,\\r\\n display: Record<string, unknown> = {},\\r\\n ): EntityListRow {\\r\\n const row: EntityListRow = {\\r\\n Id: id,\\r\\n [ROW_ID_KEY]: rowId,\\r\\n [ROW_ENTITY_ID_KEY]: entityId,\\r\\n [ROW_VALUES_KEY]: values,\\r\\n };\\r\\n for (const column of this.columns()) {\\r\\n // Form values are keyed by catalog property key (e.g. \\\"task_name\\\"),\\r\\n // but column.key is the normalizedKey (e.g. \\\"Name\\\"). Use propertyKey\\r\\n // for the lookup so the value is found.\\r\\n const key = column.propertyKey ?? column.key;\\r\\n row[column.key] = this.buildCell(column, values[key], display[key]);\\r\\n }\\r\\n return row;\\r\\n }\\r\\n\\r\\n /** Render one table cell from a raw form value and its resolved label. */\\r\\n private buildCell(\\r\\n column: EntityListColumnDef,\\r\\n raw: unknown,\\r\\n label: unknown,\\r\\n ): EntityData {\\r\\n return {\\r\\n name: column.label ?? column.key,\\r\\n key: column.key,\\r\\n viewType: column.viewType ?? 'Text',\\r\\n value: this.toLocalEntityValue(column.viewType, raw, label),\\r\\n rawValue: raw ?? null,\\r\\n } as unknown as EntityData;\\r\\n }\\r\\n\\r\\n /**\\r\\n * Shape a raw form value into the value an entity renderer expects for the\\r\\n * given view type. Locally-added rows carry raw form values, but renderers\\r\\n * like `mt-entity-user` need a display object (`{ displayName }`) — a\\r\\n * team-member `User` field is a select whose control value is a bare user id.\\r\\n * `label` is the resolved option display (present for select-based fields).\\r\\n */\\r\\n private toLocalEntityValue(\\r\\n viewType: string | undefined,\\r\\n raw: unknown,\\r\\n label: unknown,\\r\\n ): unknown {\\r\\n if (viewType === 'User') {\\r\\n if (Array.isArray(raw)) {\\r\\n const names = raw\\r\\n .map((entry) =>\\r\\n entry && typeof entry === 'object'\\r\\n ? ((entry as Record<string, unknown>)['displayName'] ?? '')\\r\\n : entry,\\r\\n )\\r\\n .filter((name) => name != null && name !== '');\\r\\n return names.length ? { displayName: names.join(', ') } : '';\\r\\n }\\r\\n if (raw && typeof raw === 'object') {\\r\\n const user = raw as Record<string, unknown>;\\r\\n return {\\r\\n ...user,\\r\\n displayName: user['displayName'] ?? label ?? '',\\r\\n photoUrl: user['photoUrl'] ?? user['photo'] ?? '',\\r\\n };\\r\\n }\\r\\n if (raw != null && raw !== '') {\\r\\n const name = label == null ? String(raw) : String(label);\\r\\n return { id: String(raw), displayName: name, userName: name };\\r\\n }\\r\\n return '';\\r\\n }\\r\\n\\r\\n if (viewType === 'Status' || viewType === 'Lookup') {\\r\\n if (raw && typeof raw === 'object') return raw;\\r\\n if (raw != null && raw !== '' && label != null) {\\r\\n return { key: String(raw), display: String(label), color: '' };\\r\\n }\\r\\n return raw ?? '';\\r\\n }\\r\\n\\r\\n // Plain / scalar view types: prefer a resolved option label when present,\\r\\n // else the raw value (unchanged for text / number / date / percentage).\\r\\n if (label != null && (raw == null || typeof raw !== 'object')) {\\r\\n return Array.isArray(label) ? label.join(', ') : label;\\r\\n }\\r\\n return raw ?? '';\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Submit payload (see EntityList.md — \\\"Stored Value Shape\\\")\\r\\n // ============================================================================\\r\\n\\r\\n private emitValue(): void {\\r\\n const current = this.storedValue();\\r\\n // `entityIds` / `createdIds` / `updatedIds` / `snapshot` are backend-owned\\r\\n // and passed through untouched; the frontend only contributes pending rows\\r\\n // and delete intents.\\r\\n const next: EntityListStoredValue = {\\r\\n ...(current ?? {}),\\r\\n rows: this.pendingRows(),\\r\\n deletedIds: this.deletedIds(),\\r\\n };\\r\\n this.storedValue.set(next);\\r\\n this.lastEmittedJson = JSON.stringify({\\r\\n rows: next.rows,\\r\\n deletedIds: next.deletedIds,\\r\\n });\\r\\n this.onModelChange(next);\\r\\n this.onTouched();\\r\\n }\\r\\n\\r\\n /** `values[]` entries, restricted to `writeFields` when configured. */\\r\\n private toSubmitValues(\\r\\n values: Record<string, unknown>,\\r\\n ): EntityListSubmitValue[] {\\r\\n const allowed = new Set(this.writeFields());\\r\\n return Object.entries(values)\\r\\n .filter(([propertyKey]) => allowed.size === 0 || allowed.has(propertyKey))\\r\\n .map(([propertyKey, value]) => ({\\r\\n propertyKey,\\r\\n rawValue: this.toRawValue(value),\\r\\n }));\\r\\n }\\r\\n\\r\\n /** Backend `rawValue` is a serialized scalar; objects/arrays go as JSON. */\\r\\n private toRawValue(value: unknown): string | null {\\r\\n if (value == null || value === '') return null;\\r\\n if (value instanceof Date) return value.toISOString();\\r\\n if (typeof value === 'object') return JSON.stringify(value);\\r\\n return String(value);\\r\\n }\\r\\n\\r\\n private toValueMap(\\r\\n values: EntityListSubmitValue[] | undefined,\\r\\n ): Record<string, unknown> {\\r\\n const map: Record<string, unknown> = {};\\r\\n for (const value of values ?? []) {\\r\\n if (!value?.propertyKey) continue;\\r\\n map[value.propertyKey] = value.rawValue;\\r\\n }\\r\\n return map;\\r\\n }\\r\\n\\r\\n private dropEmptyValues(\\r\\n values: Record<string, unknown>,\\r\\n ): Record<string, unknown> {\\r\\n const next: Record<string, unknown> = {};\\r\\n for (const [key, value] of Object.entries(values)) {\\r\\n if (this.isEmptyValue(value)) continue;\\r\\n next[key] = value;\\r\\n }\\r\\n return next;\\r\\n }\\r\\n\\r\\n /**\\r\\n * Keys the user actually changed. A key that was empty before and is still\\r\\n * empty is skipped (the dialog simply could not pre-fill it); a key that had\\r\\n * a value and is now empty is kept so the backend clears it.\\r\\n */\\r\\n private diffValues(\\r\\n initial: Record<string, unknown>,\\r\\n next: Record<string, unknown>,\\r\\n ): Record<string, unknown> {\\r\\n const changed: Record<string, unknown> = {};\\r\\n for (const [key, value] of Object.entries(next)) {\\r\\n const before = initial[key];\\r\\n if (this.isEmptyValue(value) && this.isEmptyValue(before)) continue;\\r\\n if (this.isSameValue(before, value)) continue;\\r\\n changed[key] = value;\\r\\n }\\r\\n return changed;\\r\\n }\\r\\n\\r\\n private isEmptyValue(value: unknown): boolean {\\r\\n if (value == null || value === '') return true;\\r\\n if (Array.isArray(value)) return value.length === 0;\\r\\n return false;\\r\\n }\\r\\n\\r\\n private isSameValue(a: unknown, b: unknown): boolean {\\r\\n if (a === b) return true;\\r\\n // Values arriving from the read endpoint are serialized; compare the\\r\\n // submit-shaped representation so \\\"5\\\" and 5 are not treated as a change.\\r\\n return this.toRawValue(a) === this.toRawValue(b);\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Read endpoint — POST /api/fetch/query (Table projection)\\r\\n // ============================================================================\\r\\n\\r\\n private fetchRows(\\r\\n levelId: number | string,\\r\\n levelDataId: number | string,\\r\\n moduleId: number | string,\\r\\n propertyKeys: string[],\\r\\n ): void {\\r\\n this.loading.set(true);\\r\\n this.errorMessage.set(null);\\r\\n\\r\\n const ctx = this.context();\\r\\n const body = {\\r\\n contextKey: `level:${levelId}/module:${moduleId}`,\\r\\n projection: 'Table' as const,\\r\\n surfaceKey: 'table',\\r\\n propertyKeys,\\r\\n filters: [\\r\\n {\\r\\n key: 'levelDataId',\\r\\n operator: 'Equals',\\r\\n value: String(levelDataId),\\r\\n },\\r\\n ],\\r\\n page: 1,\\r\\n pageSize: 3000,\\r\\n };\\r\\n\\r\\n this.http\\r\\n .post<FetchQueryResponse | { data?: FetchQueryResponse }>(\\r\\n 'fetch/query',\\r\\n body,\\r\\n ctx ? { context: ctx } : {},\\r\\n )\\r\\n .pipe(\\r\\n takeUntilDestroyed(this.destroyRef),\\r\\n finalize(() => this.loading.set(false)),\\r\\n catchError((err) => {\\r\\n console.error('EntityList fetch/query failed', err);\\r\\n this.errorMessage.set(\\r\\n this.transloco.translate('components.entityListField.loadFailed'),\\r\\n );\\r\\n return of<FetchQueryResponse>({});\\r\\n }),\\r\\n )\\r\\n .subscribe((response) => {\\r\\n const payload =\\r\\n response && typeof response === 'object' && 'data' in response\\r\\n ? ((response.data as FetchQueryResponse | undefined) ?? response)\\r\\n : response;\\r\\n this.applyResponse(payload as FetchQueryResponse);\\r\\n });\\r\\n }\\r\\n\\r\\n private applyResponse(response: FetchQueryResponse): void {\\r\\n // Build property maps first so column defs can include the propertyKey\\r\\n // mapping (normalizedKey → catalog key) needed for row value lookup.\\r\\n const propertyByKey = new Map<string, FetchPropertyMeta>();\\r\\n const propertyByNormalizedKey = new Map<string, FetchPropertyMeta>();\\r\\n for (const property of response.catalog?.properties ?? []) {\\r\\n propertyByKey.set(property.key, property);\\r\\n propertyByNormalizedKey.set(property.normalizedKey, property);\\r\\n }\\r\\n\\r\\n const columns: EntityListColumnDef[] = (\\r\\n response.projectionMeta?.columns ?? []\\r\\n )\\r\\n .filter((column) => column.visible)\\r\\n .sort((a, b) => a.order - b.order)\\r\\n .map((column) => ({\\r\\n key: column.key,\\r\\n label: column.label,\\r\\n type: 'entity' as const,\\r\\n sortable: !UNSORTABLE_ENTITY_VIEW_TYPES.has(\\r\\n column.viewType as EntityViewType,\\r\\n ),\\r\\n viewType: column.viewType,\\r\\n order: column.order,\\r\\n visible: column.visible,\\r\\n configuration: column.configuration ?? null,\\r\\n // Store the catalog property key so buildRow can look up form values\\r\\n // keyed by property key (e.g. \\\"task_name\\\") rather than the\\r\\n // normalizedKey used as the column display key (e.g. \\\"Name\\\").\\r\\n propertyKey: propertyByNormalizedKey.get(column.key)?.key ?? column.key,\\r\\n }));\\r\\n\\r\\n this.columns.set(columns);\\r\\n\\r\\n // Reading blocked (access = Write / None): keep the columns, drop records.\\r\\n if (!this.canRead()) {\\r\\n this.rows.set([]);\\r\\n return;\\r\\n }\\r\\n\\r\\n const rows: EntityListRow[] = (response.records ?? []).map((record) => {\\r\\n const values: Record<string, unknown> = {};\\r\\n const row: EntityListRow = {\\r\\n Id: record.id,\\r\\n [ROW_ID_KEY]: `entity-${record.id}`,\\r\\n [ROW_ENTITY_ID_KEY]: record.id,\\r\\n };\\r\\n for (const column of columns) {\\r\\n const property =\\r\\n propertyByKey.get(column.key) ??\\r\\n propertyByNormalizedKey.get(column.key);\\r\\n const propertyKey = property?.key ?? column.key;\\r\\n const cell = record.values?.[propertyKey];\\r\\n row[column.key] = this.toEntityData(column, cell, property, record.id);\\r\\n // Keep the machine-readable value so the edit dialog can pre-fill and\\r\\n // partial updates can be diffed against it.\\r\\n values[propertyKey] = cell?.raw ?? cell?.value ?? null;\\r\\n }\\r\\n row[ROW_VALUES_KEY] = values;\\r\\n return row;\\r\\n });\\r\\n\\r\\n this.rows.set(rows);\\r\\n }\\r\\n\\r\\n private toEntityData(\\r\\n column: EntityListColumnDef,\\r\\n cell: FetchValueCell | undefined,\\r\\n property: FetchPropertyMeta | undefined,\\r\\n recordId: number,\\r\\n ): EntityData {\\r\\n return {\\r\\n id: recordId,\\r\\n propertyId: property?.id,\\r\\n key: property?.key ?? column.key,\\r\\n normalizedKey: property?.normalizedKey ?? column.key,\\r\\n name: column.label ?? property?.label ?? column.key,\\r\\n rawValue:\\r\\n cell?.raw === null || cell?.raw === undefined\\r\\n ? undefined\\r\\n : String(cell.raw),\\r\\n value: (cell?.value ?? '') as EntityData['value'],\\r\\n viewType: (column.viewType ?? 'Text') as EntityData['viewType'],\\r\\n type: property?.source,\\r\\n order: column.order ?? property?.order,\\r\\n configuration: column.configuration as\\r\\n | EntityData['configuration']\\r\\n | undefined,\\r\\n propertyConfiguration: property?.configuration ?? undefined,\\r\\n comparison: cell?.comparison,\\r\\n };\\r\\n }\\r\\n}\\r\\n\",\"<div class=\\\"flex flex-col gap-2\\\">\\r\\n @if (label()) {\\r\\n <label class=\\\"font-medium text-color\\\">\\r\\n {{ label() }}\\r\\n @if (required()) {\\r\\n <span class=\\\"text-red-500\\\">*</span>\\r\\n }\\r\\n </label>\\r\\n }\\r\\n\\r\\n @if (errorMessage(); as err) {\\r\\n <p-message severity=\\\"error\\\" [text]=\\\"err\\\" styleClass=\\\"w-full\\\" />\\r\\n } @else if (canWrite()) {\\r\\n <div class=\\\"flex justify-end\\\">\\r\\n <mt-button\\r\\n [label]=\\\"'components.entityListField.add' | transloco\\\"\\r\\n icon=\\\"general.plus\\\"\\r\\n size=\\\"small\\\"\\r\\n [disabled]=\\\"disabled()\\\"\\r\\n (onClick)=\\\"openAddDialog()\\\"\\r\\n />\\r\\n </div>\\r\\n <mt-table\\r\\n [noCard]=\\\"true\\\"\\r\\n [data]=\\\"displayRows()\\\"\\r\\n [columns]=\\\"columns()\\\"\\r\\n [rowActions]=\\\"writeRowActions()\\\"\\r\\n dataKey=\\\"Id\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n />\\r\\n } @else if (!canRead()) {\\r\\n <div\\r\\n class=\\\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.entityListField.readingNotAllowed\\\" | transloco }}\\r\\n </div>\\r\\n } @else if (!hasRequiredContext()) {\\r\\n <div\\r\\n class=\\\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.entityListField.saveFormFirst\\\" | transloco }}\\r\\n </div>\\r\\n } @else if (loading() && !hasRows()) {\\r\\n <div class=\\\"flex flex-col gap-2\\\">\\r\\n <p-skeleton width=\\\"100%\\\" height=\\\"3rem\\\" />\\r\\n <p-skeleton width=\\\"100%\\\" height=\\\"3rem\\\" />\\r\\n </div>\\r\\n } @else if (!hasRows()) {\\r\\n <div\\r\\n class=\\\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.entityListField.noRelatedItems\\\" | transloco }}\\r\\n </div>\\r\\n } @else {\\r\\n <mt-table\\r\\n [noCard]=\\\"true\\\"\\r\\n [data]=\\\"displayRows()\\\"\\r\\n [columns]=\\\"columns()\\\"\\r\\n dataKey=\\\"Id\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n />\\r\\n }\\r\\n\\r\\n @if (ngControl?.control) {\\r\\n <mt-field-validation\\r\\n [control]=\\\"ngControl?.control!\\\"\\r\\n [touched]=\\\"ngControl?.touched ?? false\\\"\\r\\n />\\r\\n }\\r\\n</div>\\r\\n\",\"import {\\r\\n ChangeDetectionStrategy,\\r\\n Component,\\r\\n computed,\\r\\n DestroyRef,\\r\\n effect,\\r\\n inject,\\r\\n input,\\r\\n signal,\\r\\n untracked,\\r\\n} from '@angular/core';\\r\\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\\r\\nimport {\\r\\n ControlValueAccessor,\\r\\n FormsModule,\\r\\n NgControl,\\r\\n Validators,\\r\\n} from '@angular/forms';\\r\\nimport { HttpClient, HttpContext, HttpParams } from '@angular/common/http';\\r\\nimport {\\r\\n EMPTY,\\r\\n Observable,\\r\\n catchError,\\r\\n expand,\\r\\n finalize,\\r\\n map,\\r\\n of,\\r\\n reduce,\\r\\n} from 'rxjs';\\r\\nimport { MultiSelectField } from '@masterteam/components/multi-select-field';\\r\\nimport { SelectField } from '@masterteam/components/select-field';\\r\\nimport type { ScheduleItemSelectorFieldRuntimeContext } from '@masterteam/components';\\r\\n\\r\\n/** One picker option — only the name is shown. */\\r\\ninterface ScheduleItemOption {\\r\\n label: string;\\r\\n value: number;\\r\\n}\\r\\n\\r\\ninterface ScheduleItemSelectorOptionsResponse {\\r\\n data?: {\\r\\n items?: Array<{ key: string; name: string }> | null;\\r\\n hasMore?: boolean;\\r\\n } | null;\\r\\n}\\r\\n\\r\\n/** Page size when loading the full deliverable list, and a hard safety cap. */\\r\\nconst PAGE_SIZE = 100;\\r\\nconst MAX_ITEMS = 5000;\\r\\n\\r\\n/**\\r\\n * Runtime picker for `ScheduleItemSelector` properties.\\r\\n *\\r\\n * Backend-filtered: the full option list comes from\\r\\n * `GET forms/options/{propertyKey}` (which applies the configured rule, e.g.\\r\\n * `DeliverableAcceptance.AvailableDeliverables`). All available items are\\r\\n * loaded up front and rendered with the standard `mt-select-field` /\\r\\n * `mt-multi-select-field`; the field shows only the item name.\\r\\n *\\r\\n * The control value is always a numeric id array (`valueMode = \\\"IdArray\\\"`).\\r\\n * In `Single` mode only one id may be selected.\\r\\n */\\r\\n@Component({\\r\\n selector: 'mt-schedule-item-selector-field',\\r\\n standalone: true,\\r\\n imports: [FormsModule, MultiSelectField, SelectField],\\r\\n templateUrl: './schedule-item-selector-field.html',\\r\\n changeDetection: ChangeDetectionStrategy.OnPush,\\r\\n host: {\\r\\n class: 'block',\\r\\n },\\r\\n})\\r\\nexport class ScheduleItemSelectorField implements ControlValueAccessor {\\r\\n readonly label = input<string>('');\\r\\n readonly placeholder = input<string>('');\\r\\n readonly readonly = input<boolean>(false);\\r\\n readonly required = input<boolean>(false);\\r\\n readonly propertyKey = input<string>('');\\r\\n readonly selectionMode = input<'Single' | 'Multi'>('Multi');\\r\\n readonly runtimeContext =\\r\\n input<ScheduleItemSelectorFieldRuntimeContext | null>(null);\\r\\n readonly context = input<HttpContext | undefined>(undefined);\\r\\n\\r\\n /** Full list of available deliverables (loaded once). */\\r\\n readonly options = signal<ScheduleItemOption[]>([]);\\r\\n readonly loading = signal(false);\\r\\n readonly disabled = signal(false);\\r\\n /** Selected ids — the control value (`number[]`). */\\r\\n readonly value = signal<number[]>([]);\\r\\n\\r\\n readonly isMultiple = computed(() => this.selectionMode() !== 'Single');\\r\\n /** Single-mode ngModel value (a scalar id, not an array). */\\r\\n readonly singleValue = computed(() => this.value()[0] ?? null);\\r\\n\\r\\n public ngControl: NgControl | null = null;\\r\\n\\r\\n onTouched: () => void = () => {};\\r\\n onModelChange: (value: number[] | null) => void = () => {};\\r\\n\\r\\n private readonly http = inject(HttpClient);\\r\\n private readonly destroyRef = inject(DestroyRef);\\r\\n /** Query signature already loaded — prevents duplicate full loads. */\\r\\n private loadedKey: string | null = null;\\r\\n\\r\\n constructor() {\\r\\n this.ngControl = inject(NgControl, { self: true, optional: true });\\r\\n if (this.ngControl) {\\r\\n this.ngControl.valueAccessor = this;\\r\\n }\\r\\n\\r\\n effect(() => {\\r\\n if (this.ngControl?.control && this.required()) {\\r\\n this.ngControl.control.addValidators(Validators.required);\\r\\n this.ngControl.control.updateValueAndValidity();\\r\\n }\\r\\n });\\r\\n\\r\\n // Load the full option list as soon as the query context is available.\\r\\n effect(() => {\\r\\n const key = this.queryKey();\\r\\n if (!key || this.loadedKey === key) return;\\r\\n untracked(() => this.loadAllOptions(key));\\r\\n });\\r\\n }\\r\\n\\r\\n // ── Selection ──────────────────────────────────────────────────────────\\r\\n\\r\\n onMultiChange(ids: number[] | null): void {\\r\\n this.value.set(ids ?? []);\\r\\n this.emit();\\r\\n }\\r\\n\\r\\n onSingleChange(id: number | null): void {\\r\\n this.value.set(id == null ? [] : [id]);\\r\\n this.emit();\\r\\n }\\r\\n\\r\\n // ── ControlValueAccessor ────────────────────────────────────────────────\\r\\n\\r\\n writeValue(value: unknown): void {\\r\\n this.value.set(this.normalizeIds(value));\\r\\n }\\r\\n\\r\\n registerOnChange(fn: (value: number[] | null) => void): void {\\r\\n this.onModelChange = fn;\\r\\n }\\r\\n\\r\\n registerOnTouched(fn: () => void): void {\\r\\n this.onTouched = fn;\\r\\n }\\r\\n\\r\\n setDisabledState(disabled: boolean): void {\\r\\n this.disabled.set(disabled);\\r\\n }\\r\\n\\r\\n // ── Option loading ──────────────────────────────────────────────────────\\r\\n\\r\\n private loadAllOptions(key: string): void {\\r\\n this.loadedKey = key;\\r\\n this.loading.set(true);\\r\\n\\r\\n this.fetchPage(0)\\r\\n .pipe(\\r\\n expand((page) =>\\r\\n page.hasMore && page.nextSkip < MAX_ITEMS\\r\\n ? this.fetchPage(page.nextSkip)\\r\\n : EMPTY,\\r\\n ),\\r\\n reduce(\\r\\n (acc, page) => acc.concat(page.options),\\r\\n [] as ScheduleItemOption[],\\r\\n ),\\r\\n takeUntilDestroyed(this.destroyRef),\\r\\n finalize(() => this.loading.set(false)),\\r\\n catchError(() => of([] as ScheduleItemOption[])),\\r\\n )\\r\\n .subscribe((options) => this.options.set(options));\\r\\n }\\r\\n\\r\\n private fetchPage(skip: number): Observable<{\\r\\n options: ScheduleItemOption[];\\r\\n hasMore: boolean;\\r\\n nextSkip: number;\\r\\n }> {\\r\\n const params = this.buildParams(skip);\\r\\n if (!params) {\\r\\n return of({ options: [], hasMore: false, nextSkip: skip });\\r\\n }\\r\\n\\r\\n return this.http\\r\\n .get<ScheduleItemSelectorOptionsResponse>(\\r\\n `forms/options/${encodeURIComponent(this.propertyKey())}`,\\r\\n { params, context: this.context() },\\r\\n )\\r\\n .pipe(\\r\\n map((response) => ({\\r\\n options: this.mapOptions(response),\\r\\n hasMore: !!response?.data?.hasMore,\\r\\n nextSkip: skip + PAGE_SIZE,\\r\\n })),\\r\\n );\\r\\n }\\r\\n\\r\\n private buildParams(skip: number): HttpParams | null {\\r\\n const contextKey = this.buildContextKey();\\r\\n const levelDataId = this.runtimeContext()?.levelDataId;\\r\\n if (!contextKey || levelDataId == null) return null;\\r\\n\\r\\n let params = new HttpParams()\\r\\n .set('contextKey', contextKey)\\r\\n .set('levelDataId', String(levelDataId))\\r\\n .set('skip', String(skip))\\r\\n .set('take', String(PAGE_SIZE));\\r\\n\\r\\n const ownerRecordId = this.runtimeContext()?.ownerRecordId;\\r\\n if (ownerRecordId != null) {\\r\\n params = params.set('ownerRecordId', String(ownerRecordId));\\r\\n }\\r\\n return params;\\r\\n }\\r\\n\\r\\n private mapOptions(\\r\\n response: ScheduleItemSelectorOptionsResponse,\\r\\n ): ScheduleItemOption[] {\\r\\n const items = response?.data?.items ?? [];\\r\\n return items\\r\\n .map((item) => {\\r\\n const id = Number(item.key);\\r\\n if (!Number.isFinite(id)) return null;\\r\\n return { label: item.name || String(id), value: id };\\r\\n })\\r\\n .filter((option): option is ScheduleItemOption => option != null);\\r\\n }\\r\\n\\r\\n // ── Context helpers ─────────────────────────────────────────────────────\\r\\n\\r\\n private buildContextKey(): string | null {\\r\\n const levelId = this.runtimeContext()?.levelId;\\r\\n const moduleId = this.runtimeContext()?.moduleId;\\r\\n if (levelId == null || moduleId == null) return null;\\r\\n return `Level:${levelId}/Module:${moduleId}`;\\r\\n }\\r\\n\\r\\n private queryKey(): string | null {\\r\\n const contextKey = this.buildContextKey();\\r\\n const levelDataId = this.runtimeContext()?.levelDataId;\\r\\n const propertyKey = this.propertyKey();\\r\\n if (!contextKey || levelDataId == null || !propertyKey) return null;\\r\\n const ownerRecordId = this.runtimeContext()?.ownerRecordId ?? '';\\r\\n return `${contextKey}|${levelDataId}|${ownerRecordId}|${propertyKey}`;\\r\\n }\\r\\n\\r\\n private emit(): void {\\r\\n this.onModelChange(this.value());\\r\\n this.onTouched();\\r\\n }\\r\\n\\r\\n private normalizeIds(value: unknown): number[] {\\r\\n const raw = Array.isArray(value) ? value : value == null ? [] : [value];\\r\\n const ids: number[] = [];\\r\\n for (const entry of raw) {\\r\\n const id =\\r\\n entry && typeof entry === 'object'\\r\\n ? Number((entry as { id?: unknown }).id)\\r\\n : Number(entry);\\r\\n if (Number.isFinite(id) && id > 0 && !ids.includes(id)) {\\r\\n ids.push(id);\\r\\n }\\r\\n }\\r\\n return ids;\\r\\n }\\r\\n}\\r\\n\",\"@if (isMultiple()) {\\r\\n <mt-multi-select-field\\r\\n [label]=\\\"label()\\\"\\r\\n [placeholder]=\\\"placeholder()\\\"\\r\\n [options]=\\\"options()\\\"\\r\\n [optionLabel]=\\\"'label'\\\"\\r\\n [optionValue]=\\\"'value'\\\"\\r\\n [filter]=\\\"options().length > 10\\\"\\r\\n [showClear]=\\\"!required()\\\"\\r\\n [required]=\\\"required()\\\"\\r\\n [readonly]=\\\"readonly() || disabled()\\\"\\r\\n [ngModel]=\\\"value()\\\"\\r\\n [ngModelOptions]=\\\"{ standalone: true }\\\"\\r\\n (ngModelChange)=\\\"onMultiChange($event)\\\"\\r\\n />\\r\\n} @else {\\r\\n <mt-select-field\\r\\n [label]=\\\"label()\\\"\\r\\n [placeholder]=\\\"placeholder()\\\"\\r\\n [options]=\\\"options()\\\"\\r\\n [optionLabel]=\\\"'label'\\\"\\r\\n [optionValue]=\\\"'value'\\\"\\r\\n [filter]=\\\"options().length > 10\\\"\\r\\n [showClear]=\\\"!required()\\\"\\r\\n [loading]=\\\"loading()\\\"\\r\\n [required]=\\\"required()\\\"\\r\\n [readonly]=\\\"readonly() || disabled()\\\"\\r\\n [ngModel]=\\\"singleValue()\\\"\\r\\n [ngModelOptions]=\\\"{ standalone: true }\\\"\\r\\n (ngModelChange)=\\\"onSingleChange($event)\\\"\\r\\n />\\r\\n}\\r\\n\",\"import { InjectionToken, Type } from '@angular/core';\\r\\nimport type { LookupOptionItemConfig } from '@masterteam/components';\\r\\n\\r\\n/**\\r\\n * Inputs for the injected checklist form (one instance per field). It loads the\\r\\n * scope module form once and renders a collapsible section per lookup item.\\r\\n * Passed via `ngComponentOutlet` inputs.\\r\\n */\\r\\nexport interface LookupCheckListFormInputs {\\r\\n /** Lookup items rendered as collapsible sections. */\\r\\n lookupOptions: LookupOptionItemConfig[];\\r\\n /** Full lookup catalog used to resolve nested lookup fields. */\\r\\n lookups: unknown[];\\r\\n /** Property keys to render in each section form. */\\r\\n propertyKeys: string[];\\r\\n /** Scope module id whose form is loaded once via `process-form-load`. */\\r\\n moduleId: number | string | null;\\r\\n /** Current level id. */\\r\\n levelId: number | string | null;\\r\\n /** Current workspace instance id. */\\r\\n levelDataId: number | string | null;\\r\\n /** Current aggregated value (array of `{ lookupKey, props }`). */\\r\\n value: unknown;\\r\\n /** Whether the field is read-only. */\\r\\n readonly: boolean;\\r\\n /** Called whenever the aggregated checklist value changes. */\\r\\n valueChange: (value: unknown) => void;\\r\\n /** Called whenever the aggregated validity changes (true = incomplete). */\\r\\n validityChange: (invalid: boolean) => void;\\r\\n}\\r\\n\\r\\n/**\\r\\n * Token used by `mt-lookup-module-check-list-field` to render the checklist\\r\\n * sections + per-section forms via `@masterteam/forms`'s `mt-client-form`\\r\\n * machinery (`/api/process-form-load`, loaded once). Apps register it with\\r\\n * `provideLookupModuleCheckListForm()` from\\r\\n * `@masterteam/forms/lookup-module-check-list-form`. When the token is not\\r\\n * registered, the field falls back to plain text inputs per property.\\r\\n */\\r\\nexport const LOOKUP_CHECK_LIST_FORM_COMPONENT = new InjectionToken<\\r\\n Type<unknown>\\r\\n>('LOOKUP_CHECK_LIST_FORM_COMPONENT');\\r\\n\",\"import {\\r\\n ChangeDetectionStrategy,\\r\\n Component,\\r\\n computed,\\r\\n inject,\\r\\n input,\\r\\n OnInit,\\r\\n signal,\\r\\n} from '@angular/core';\\r\\nimport { NgComponentOutlet } from '@angular/common';\\r\\nimport {\\r\\n AbstractControl,\\r\\n ControlValueAccessor,\\r\\n FormsModule,\\r\\n NgControl,\\r\\n ValidatorFn,\\r\\n} from '@angular/forms';\\r\\nimport { TranslocoPipe } from '@jsverse/transloco';\\r\\nimport { InputTextModule } from 'primeng/inputtext';\\r\\n\\r\\nimport { Icon } from '@masterteam/icons';\\r\\nimport { FieldValidation } from '@masterteam/components/field-validation';\\r\\nimport type {\\r\\n LookupCheckListPropertyConfig,\\r\\n LookupModuleCheckListFieldRuntimeContext,\\r\\n LookupOptionItemConfig,\\r\\n} from '@masterteam/components';\\r\\n\\r\\nimport {\\r\\n LOOKUP_CHECK_LIST_FORM_COMPONENT,\\r\\n type LookupCheckListFormInputs,\\r\\n} from './lookup-module-check-list-form-token';\\r\\n\\r\\n/** Stored entry as persisted in the property value array. */\\r\\ninterface StoredCheckListProp {\\r\\n key: string;\\r\\n value: unknown;\\r\\n}\\r\\ninterface StoredCheckListEntry {\\r\\n lookupKey: string;\\r\\n props: StoredCheckListProp[];\\r\\n}\\r\\n\\r\\n/** A collapsible section bound to one lookup item. */\\r\\ninterface CheckListSection {\\r\\n lookupKey: string;\\r\\n label: string;\\r\\n}\\r\\n\\r\\n@Component({\\r\\n selector: 'mt-lookup-module-check-list-field',\\r\\n standalone: true,\\r\\n imports: [\\r\\n FormsModule,\\r\\n NgComponentOutlet,\\r\\n InputTextModule,\\r\\n Icon,\\r\\n FieldValidation,\\r\\n TranslocoPipe,\\r\\n ],\\r\\n templateUrl: './lookup-module-check-list-field.html',\\r\\n changeDetection: ChangeDetectionStrategy.OnPush,\\r\\n host: { class: 'grid gap-2' },\\r\\n})\\r\\nexport class LookupModuleCheckListField\\r\\n implements ControlValueAccessor, OnInit\\r\\n{\\r\\n readonly label = input<string>('');\\r\\n readonly readonly = input<boolean>(false);\\r\\n readonly required = input<boolean>(false);\\r\\n /** Lookup items rendered as collapsible checklist sections. */\\r\\n readonly lookupOptions = input<LookupOptionItemConfig[]>([]);\\r\\n /** Full lookup catalog passed to the rich nested form renderer. */\\r\\n readonly lookups = input<unknown[]>([]);\\r\\n /** Module property keys/labels (used by the text fallback + labels). */\\r\\n readonly propertyFields = input<LookupCheckListPropertyConfig[]>([]);\\r\\n /** Scope module id whose form is loaded for each section. */\\r\\n readonly scopeId = input<number | string | null>(null);\\r\\n /** Property keys to render in each section form. */\\r\\n readonly propertyKeys = input<string[]>([]);\\r\\n /** Runtime ids needed to load each section form. */\\r\\n readonly runtimeContext =\\r\\n input<LookupModuleCheckListFieldRuntimeContext | null>(null);\\r\\n\\r\\n /** Per-lookupKey captured values, keyed by property key. */\\r\\n private readonly sectionValues = signal<\\r\\n Record<string, Record<string, unknown>>\\r\\n >({});\\r\\n private readonly expandedKeys = signal<Set<string>>(new Set());\\r\\n protected readonly disabled = signal<boolean>(false);\\r\\n /** True when a section's required inner fields are unfilled. */\\r\\n private readonly incomplete = signal<boolean>(false);\\r\\n public ngControl: NgControl | null = null;\\r\\n\\r\\n /**\\r\\n * Rich checklist form provided by `@masterteam/forms`\\r\\n * (`provideLookupModuleCheckListForm()`). When absent the field falls back to\\r\\n * plain text inputs per property.\\r\\n */\\r\\n protected readonly formComponent = inject(LOOKUP_CHECK_LIST_FORM_COMPONENT, {\\r\\n optional: true,\\r\\n });\\r\\n\\r\\n protected readonly isReadonly = computed(\\r\\n () => this.readonly() || this.disabled(),\\r\\n );\\r\\n\\r\\n protected readonly sections = computed<CheckListSection[]>(() =>\\r\\n this.lookupOptions().map((option) => ({\\r\\n lookupKey: String(option.value ?? option.key ?? ''),\\r\\n label: option.label ?? String(option.value ?? option.key ?? ''),\\r\\n })),\\r\\n );\\r\\n\\r\\n /**\\r\\n * Use the rich form whenever it's registered and a scope module is set. The\\r\\n * scope form only needs `scopeId` to load its field definitions; `levelId` /\\r\\n * `levelDataId` are passed when available but are not required (e.g. they are\\r\\n * null while creating a brand-new Level instance).\\r\\n */\\r\\n protected readonly useRichForm = computed(\\r\\n () => !!this.formComponent && this.scopeId() != null,\\r\\n );\\r\\n\\r\\n /**\\r\\n * The last externally-written value (via `writeValue`). Passed to the rich\\r\\n * form as its initial value. It is intentionally NOT updated from the form's\\r\\n * own `valueChange` — feeding emitted values back as an input would create an\\r\\n * infinite change-detection loop.\\r\\n */\\r\\n private readonly incomingValue = signal<unknown>(null);\\r\\n\\r\\n private onTouched: () => void = () => {};\\r\\n private onModelChange: (value: StoredCheckListEntry[] | null) => void =\\r\\n () => {};\\r\\n\\r\\n private control: AbstractControl | null = null;\\r\\n private validatorAttached = false;\\r\\n /**\\r\\n * Validator attached imperatively to the host control. Attaching it here\\r\\n * (rather than via an `NG_VALIDATORS` provider) avoids a circular dependency\\r\\n * with the self-injected `NgControl` used as the value accessor.\\r\\n */\\r\\n private readonly checklistValidator: ValidatorFn = () =>\\r\\n this.incomplete() ? { checklistIncomplete: true } : null;\\r\\n\\r\\n /** Stable callbacks so the outlet inputs object stays referentially calm. */\\r\\n private readonly emitValue = (value: unknown): void => {\\r\\n // The rich form is the source of truth; forward its value without writing\\r\\n // back into `incomingValue` (which would re-feed the form and loop).\\r\\n this.onModelChange((value as StoredCheckListEntry[] | null) ?? null);\\r\\n this.onTouched();\\r\\n };\\r\\n private readonly emitValidity = (invalid: boolean): void => {\\r\\n if (this.incomplete() === invalid) return;\\r\\n this.incomplete.set(invalid);\\r\\n this.ensureValidator();\\r\\n this.control?.updateValueAndValidity({ emitEvent: false });\\r\\n };\\r\\n\\r\\n constructor() {\\r\\n this.ngControl = inject(NgControl, { self: true, optional: true });\\r\\n if (this.ngControl) {\\r\\n this.ngControl.valueAccessor = this;\\r\\n }\\r\\n }\\r\\n\\r\\n ngOnInit(): void {\\r\\n this.ensureValidator();\\r\\n this.control?.updateValueAndValidity({ emitEvent: false });\\r\\n }\\r\\n\\r\\n private ensureValidator(): void {\\r\\n if (this.validatorAttached) return;\\r\\n const control = this.ngControl?.control;\\r\\n if (!control) return;\\r\\n this.control = control;\\r\\n control.addValidators(this.checklistValidator);\\r\\n this.validatorAttached = true;\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // CVA\\r\\n // ============================================================================\\r\\n\\r\\n writeValue(value: unknown): void {\\r\\n this.incomingValue.set(value);\\r\\n this.sectionValues.set(this.normalizeIncoming(value));\\r\\n }\\r\\n\\r\\n registerOnChange(fn: (value: StoredCheckListEntry[] | null) => void): void {\\r\\n this.onModelChange = fn;\\r\\n }\\r\\n\\r\\n registerOnTouched(fn: () => void): void {\\r\\n this.onTouched = fn;\\r\\n }\\r\\n\\r\\n setDisabledState(isDisabled: boolean): void {\\r\\n this.disabled.set(isDisabled);\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Rich form host\\r\\n // ============================================================================\\r\\n\\r\\n protected readonly formInputs = computed<LookupCheckListFormInputs>(() => ({\\r\\n lookupOptions: this.lookupOptions(),\\r\\n lookups: this.lookups(),\\r\\n propertyKeys: this.propertyKeys(),\\r\\n moduleId: this.scopeId(),\\r\\n levelId: this.runtimeContext()?.levelId ?? null,\\r\\n levelDataId: this.runtimeContext()?.levelDataId ?? null,\\r\\n value: this.incomingValue(),\\r\\n readonly: this.isReadonly(),\\r\\n valueChange: this.emitValue,\\r\\n validityChange: this.emitValidity,\\r\\n }));\\r\\n\\r\\n // ============================================================================\\r\\n // Text fallback (no rich form registered)\\r\\n // ============================================================================\\r\\n\\r\\n protected isExpanded(lookupKey: string): boolean {\\r\\n return this.expandedKeys().has(lookupKey);\\r\\n }\\r\\n\\r\\n protected toggle(lookupKey: string): void {\\r\\n const next = new Set(this.expandedKeys());\\r\\n if (next.has(lookupKey)) {\\r\\n next.delete(lookupKey);\\r\\n } else {\\r\\n next.add(lookupKey);\\r\\n }\\r\\n this.expandedKeys.set(next);\\r\\n }\\r\\n\\r\\n protected hasValues(lookupKey: string): boolean {\\r\\n const values = this.sectionValues()[lookupKey];\\r\\n if (!values) return false;\\r\\n return Object.values(values).some((v) => v != null && v !== '');\\r\\n }\\r\\n\\r\\n protected fieldValue(lookupKey: string, propKey: string): string {\\r\\n const raw = this.sectionValues()[lookupKey]?.[propKey];\\r\\n return raw == null ? '' : String(raw);\\r\\n }\\r\\n\\r\\n protected setFieldValue(\\r\\n lookupKey: string,\\r\\n propKey: string,\\r\\n value: string,\\r\\n ): void {\\r\\n this.sectionValues.update((current) => ({\\r\\n ...current,\\r\\n [lookupKey]: { ...(current[lookupKey] ?? {}), [propKey]: value },\\r\\n }));\\r\\n this.pushModelValue();\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Value mapping\\r\\n // ============================================================================\\r\\n\\r\\n private pushModelValue(): void {\\r\\n const payload = this.buildPayload();\\r\\n this.onModelChange(payload.length ? payload : null);\\r\\n this.onTouched();\\r\\n }\\r\\n\\r\\n private buildPayload(): StoredCheckListEntry[] {\\r\\n const keys = this.propertyKeys();\\r\\n const values = this.sectionValues();\\r\\n\\r\\n return this.sections()\\r\\n .filter((section) => this.hasValues(section.lookupKey))\\r\\n .map((section) => ({\\r\\n lookupKey: section.lookupKey,\\r\\n props: keys.map((key) => ({\\r\\n key,\\r\\n value: values[section.lookupKey]?.[key] ?? null,\\r\\n })),\\r\\n }));\\r\\n }\\r\\n\\r\\n private normalizeIncoming(\\r\\n value: unknown,\\r\\n ): Record<string, Record<string, unknown>> {\\r\\n const raw = this.extractEntries(value);\\r\\n const result: Record<string, Record<string, unknown>> = {};\\r\\n\\r\\n for (const entry of raw) {\\r\\n if (!entry || typeof entry !== 'object') continue;\\r\\n const record = entry as Record<string, unknown>;\\r\\n const lookupKeyRaw =\\r\\n record['lookupKey'] ?? record['Lookupkey'] ?? record['lookupkey'];\\r\\n const lookupKey = lookupKeyRaw == null ? '' : String(lookupKeyRaw);\\r\\n if (!lookupKey) continue;\\r\\n\\r\\n const propsRaw = record['props'] ?? record['Props'];\\r\\n const values: Record<string, unknown> = {};\\r\\n if (Array.isArray(propsRaw)) {\\r\\n for (const prop of propsRaw) {\\r\\n const propRecord = (prop ?? {}) as Record<string, unknown>;\\r\\n const key = String(propRecord['key'] ?? propRecord['Key'] ?? '');\\r\\n if (!key) continue;\\r\\n values[key] = propRecord['value'] ?? propRecord['Value'] ?? null;\\r\\n }\\r\\n }\\r\\n result[lookupKey] = values;\\r\\n }\\r\\n\\r\\n return result;\\r\\n }\\r\\n\\r\\n private extractEntries(value: unknown): unknown[] {\\r\\n if (Array.isArray(value)) {\\r\\n return value;\\r\\n }\\r\\n\\r\\n const wrapped = (value as { items?: unknown } | null)?.items;\\r\\n if (Array.isArray(wrapped)) {\\r\\n return wrapped;\\r\\n }\\r\\n\\r\\n if (typeof value === 'string' && value.trim()) {\\r\\n try {\\r\\n return this.extractEntries(JSON.parse(value));\\r\\n } catch {\\r\\n return [];\\r\\n }\\r\\n }\\r\\n\\r\\n return [];\\r\\n }\\r\\n}\\r\\n\",\"<div class=\\\"flex flex-col gap-2\\\">\\r\\n @if (label()) {\\r\\n <label class=\\\"font-medium text-color\\\">\\r\\n {{ label() }}\\r\\n @if (required()) {\\r\\n <span class=\\\"text-red-500\\\">*</span>\\r\\n }\\r\\n </label>\\r\\n }\\r\\n\\r\\n @if (useRichForm()) {\\r\\n <ng-container\\r\\n [ngComponentOutlet]=\\\"formComponent!\\\"\\r\\n [ngComponentOutletInputs]=\\\"formInputs()\\\"\\r\\n />\\r\\n } @else if (sections().length) {\\r\\n <!-- Fallback: plain text inputs per property (no rich form registered) -->\\r\\n <div class=\\\"flex flex-col gap-2\\\">\\r\\n @for (section of sections(); track section.lookupKey) {\\r\\n <div class=\\\"overflow-hidden rounded-lg border border-surface-200\\\">\\r\\n <button\\r\\n type=\\\"button\\\"\\r\\n class=\\\"flex w-full cursor-pointer items-center justify-between gap-2 bg-surface-50 px-3 py-2 text-start hover:bg-surface-100\\\"\\r\\n [attr.aria-expanded]=\\\"isExpanded(section.lookupKey)\\\"\\r\\n (click)=\\\"toggle(section.lookupKey)\\\"\\r\\n >\\r\\n <span class=\\\"flex min-w-0 items-center gap-2\\\">\\r\\n <mt-icon\\r\\n [icon]=\\\"\\r\\n isExpanded(section.lookupKey)\\r\\n ? 'arrow.chevron-down'\\r\\n : 'arrow.chevron-right'\\r\\n \\\"\\r\\n size=\\\"sm\\\"\\r\\n class=\\\"shrink-0 text-muted-color rtl:-scale-x-100\\\"\\r\\n />\\r\\n <span class=\\\"truncate text-sm font-medium text-color\\\">\\r\\n {{ section.label }}\\r\\n </span>\\r\\n </span>\\r\\n @if (hasValues(section.lookupKey)) {\\r\\n <span\\r\\n class=\\\"shrink-0 rounded-full bg-primary-50 px-2 py-0.5 text-xs font-semibold text-primary-700\\\"\\r\\n >\\r\\n {{ \\\"components.lookupModuleCheckListField.filled\\\" | transloco }}\\r\\n </span>\\r\\n }\\r\\n </button>\\r\\n\\r\\n @if (isExpanded(section.lookupKey) && propertyFields().length) {\\r\\n <div class=\\\"border-t border-surface-200 p-3\\\">\\r\\n <div class=\\\"grid grid-cols-1 gap-3 sm:grid-cols-2\\\">\\r\\n @for (field of propertyFields(); track field.key) {\\r\\n <label class=\\\"flex min-w-0 flex-col gap-1\\\">\\r\\n <span class=\\\"truncate text-xs text-muted-color\\\">\\r\\n {{ field.label }}\\r\\n </span>\\r\\n @if (isReadonly()) {\\r\\n <span class=\\\"truncate text-sm text-color\\\">\\r\\n {{ fieldValue(section.lookupKey, field.key) || \\\"_\\\" }}\\r\\n </span>\\r\\n } @else {\\r\\n <input\\r\\n pInputText\\r\\n class=\\\"w-full\\\"\\r\\n [ngModel]=\\\"fieldValue(section.lookupKey, field.key)\\\"\\r\\n [ngModelOptions]=\\\"{ standalone: true }\\\"\\r\\n (ngModelChange)=\\\"\\r\\n setFieldValue(section.lookupKey, field.key, $event)\\r\\n \\\"\\r\\n />\\r\\n }\\r\\n </label>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n } @else {\\r\\n <div\\r\\n class=\\\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\\\"\\r\\n >\\r\\n {{ \\\"components.lookupModuleCheckListField.empty\\\" | transloco }}\\r\\n </div>\\r\\n }\\r\\n\\r\\n @if (ngControl?.control) {\\r\\n <mt-field-validation\\r\\n [control]=\\\"ngControl?.control!\\\"\\r\\n [touched]=\\\"ngControl?.touched ?? false\\\"\\r\\n />\\r\\n }\\r\\n</div>\\r\\n\",\"/**\\n * Generated bundle index. Do not edit.\\n */\\n\\nexport * from './public-api';\\n\"],\"names\":[\"i2\"],\"mappings\":\";;;;;;;;;;;;;;;;;;;;;;;;;MAiCa,iBAAiB,CAAA;AACnB,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,4EAA2B;AAE1C,IAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,EAAE;AAC3D,QAAA,QAAQ,EAAE,IAAI;AACf,KAAA,CAAC;AACe,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,IAAA,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACpC,IAAA,YAAY,GAAG,MAAM,CAAC,CAAC,mFAAC;IACjC,iBAAiB,GAA2B,IAAI;AAE/C,IAAA,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,SAAS,+EAAC;AACpD,IAAA,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC,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