@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
@@ -1,1902 +0,0 @@
1
- import { CommonModule, NgComponentOutlet } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { input, inject, DestroyRef, signal, computed, ChangeDetectionStrategy, Component, effect, untracked, viewChild, linkedSignal, InjectionToken } from '@angular/core';
4
- import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
5
- import * as i1 from '@angular/forms';
6
- import { ControlContainer, NgControl, FormsModule, Validators } from '@angular/forms';
7
- import * as i2 from '@jsverse/transloco';
8
- import { TranslocoService, TranslocoModule, TranslocoPipe } from '@jsverse/transloco';
9
- import { startWith, finalize, catchError, of, take, expand, EMPTY, reduce, map } from 'rxjs';
10
- import { Tooltip } from '@masterteam/components/tooltip';
11
- import { Icon } from '@masterteam/icons';
12
- import { SelectField } from '@masterteam/components/select-field';
13
- import { MultiSelectField } from '@masterteam/components/multi-select-field';
14
- import { FieldValidation } from '@masterteam/components/field-validation';
15
- import { HttpClient, HttpParams } from '@angular/common/http';
16
- import { Button } from '@masterteam/components/button';
17
- import { NumberField } from '@masterteam/components/number-field';
18
- import { Table } from '@masterteam/components/table';
19
- import { Skeleton } from 'primeng/skeleton';
20
- import { Message } from 'primeng/message';
21
- import { ModalService } from '@masterteam/components/modal';
22
- import * as i2$1 from 'primeng/inputtext';
23
- import { InputTextModule } from 'primeng/inputtext';
24
-
25
- class LookupMatrixField {
26
- config = input.required(...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
27
- controlContainer = inject(ControlContainer, {
28
- optional: true,
29
- });
30
- destroyRef = inject(DestroyRef);
31
- transloco = inject(TranslocoService);
32
- valueVersion = signal(0, ...(ngDevMode ? [{ debugName: "valueVersion" }] : /* istanbul ignore next */ []));
33
- subscribedControl = null;
34
- hasYAxis = computed(() => !!this.config().yFieldKey, ...(ngDevMode ? [{ debugName: "hasYAxis" }] : /* istanbul ignore next */ []));
35
- xOptions = computed(() => this.config().xOptions ?? [], ...(ngDevMode ? [{ debugName: "xOptions" }] : /* istanbul ignore next */ []));
36
- yOptions = computed(() => this.config().yOptions ?? [], ...(ngDevMode ? [{ debugName: "yOptions" }] : /* istanbul ignore next */ []));
37
- hasMatrix = computed(() => this.config().cells.length > 0, ...(ngDevMode ? [{ debugName: "hasMatrix" }] : /* istanbul ignore next */ []));
38
- cellMap = computed(() => new Map(this.config().cells.map((cell) => [
39
- this.cellKey(cell.xLookupItemId, cell.yLookupItemId),
40
- cell,
41
- ])), ...(ngDevMode ? [{ debugName: "cellMap" }] : /* istanbul ignore next */ []));
42
- selectedXOption = computed(() => {
43
- this.valueVersion();
44
- return this.resolveSelectedOption(this.xOptions(), this.getControlValue(this.config().xFieldKey));
45
- }, ...(ngDevMode ? [{ debugName: "selectedXOption" }] : /* istanbul ignore next */ []));
46
- selectedYOption = computed(() => {
47
- this.valueVersion();
48
- const yFieldKey = this.config().yFieldKey;
49
- if (!yFieldKey) {
50
- return null;
51
- }
52
- return this.resolveSelectedOption(this.yOptions(), this.getControlValue(yFieldKey));
53
- }, ...(ngDevMode ? [{ debugName: "selectedYOption" }] : /* istanbul ignore next */ []));
54
- activeCell = computed(() => {
55
- const selectedX = this.selectedXOption();
56
- if (!selectedX) {
57
- return null;
58
- }
59
- if (!this.hasYAxis()) {
60
- return this.getCell(selectedX.id ?? selectedX.value);
61
- }
62
- const selectedY = this.selectedYOption();
63
- if (!selectedY) {
64
- return null;
65
- }
66
- return this.getCell(selectedX.id ?? selectedX.value, selectedY.id ?? selectedY.value);
67
- }, ...(ngDevMode ? [{ debugName: "activeCell" }] : /* istanbul ignore next */ []));
68
- selectionSummary = computed(() => {
69
- const parts = [];
70
- const xAxisLabel = this.config().xAxisLabel.trim() ||
71
- this.transloco.translate('components.lookupMatrixField.xAxisFallback');
72
- const selectedX = this.selectedXOption();
73
- if (selectedX) {
74
- parts.push(`${xAxisLabel}: ${selectedX.label}`);
75
- }
76
- const selectedY = this.selectedYOption();
77
- const yAxisLabel = this.config().yAxisLabel?.trim() ||
78
- this.transloco.translate('components.lookupMatrixField.yAxisFallback');
79
- if (selectedY && this.hasYAxis()) {
80
- parts.push(`${yAxisLabel}: ${selectedY.label}`);
81
- }
82
- return parts.join(' / ');
83
- }, ...(ngDevMode ? [{ debugName: "selectionSummary" }] : /* istanbul ignore next */ []));
84
- pendingMessage = computed(() => {
85
- const xAxisLabel = this.config().xAxisLabel.trim() ||
86
- this.transloco.translate('components.lookupMatrixField.firstValueFallback');
87
- if (!this.hasYAxis()) {
88
- return this.transloco.translate('components.lookupMatrixField.selectXAxisFirst', { xAxisLabel });
89
- }
90
- const yAxisLabel = this.config().yAxisLabel?.trim() ||
91
- this.transloco.translate('components.lookupMatrixField.secondValueFallback');
92
- return this.transloco.translate('components.lookupMatrixField.selectAxesFirst', { xAxisLabel, yAxisLabel });
93
- }, ...(ngDevMode ? [{ debugName: "pendingMessage" }] : /* istanbul ignore next */ []));
94
- missingResultMessage = computed(() => {
95
- if (!this.selectedXOption()) {
96
- return this.pendingMessage();
97
- }
98
- if (this.hasYAxis() && !this.selectedYOption()) {
99
- return this.pendingMessage();
100
- }
101
- return this.transloco.translate('components.lookupMatrixField.noMatchingValue');
102
- }, ...(ngDevMode ? [{ debugName: "missingResultMessage" }] : /* istanbul ignore next */ []));
103
- ngAfterViewInit() {
104
- this.ensureControlSubscription();
105
- }
106
- getCell(xLookupItemId, yLookupItemId) {
107
- return (this.cellMap().get(this.cellKey(xLookupItemId, yLookupItemId)) ?? null);
108
- }
109
- getSwatchColor(color) {
110
- return this.resolveColor(color);
111
- }
112
- getControlValue(path) {
113
- if (!path)
114
- return null;
115
- return this.controlContainer?.control?.get(path)?.value ?? null;
116
- }
117
- ensureControlSubscription() {
118
- const control = this.controlContainer?.control;
119
- if (!control || control === this.subscribedControl) {
120
- return;
121
- }
122
- this.subscribedControl = control;
123
- control.valueChanges
124
- .pipe(startWith(control.getRawValue()), takeUntilDestroyed(this.destroyRef))
125
- .subscribe(() => {
126
- this.valueVersion.update((value) => value + 1);
127
- });
128
- }
129
- resolveSelectedOption(options, rawValue) {
130
- if (rawValue == null || rawValue === '')
131
- return null;
132
- return (options.find((option) => this.optionMatchesValue(option, rawValue)) ??
133
- null);
134
- }
135
- optionMatchesValue(option, rawValue) {
136
- return [option.value, option.key, option.id].some((candidate) => candidate != null && String(candidate) === String(rawValue));
137
- }
138
- cellKey(xLookupItemId, yLookupItemId) {
139
- return `${String(xLookupItemId)}::${String(yLookupItemId ?? '')}`;
140
- }
141
- resolveColor(color) {
142
- if (!color)
143
- return null;
144
- if (color.startsWith('#') ||
145
- color.startsWith('rgb') ||
146
- color.startsWith('hsl') ||
147
- color.startsWith('var(')) {
148
- return color;
149
- }
150
- return `var(--p-${color}-500)`;
151
- }
152
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LookupMatrixField, deps: [], target: i0.ɵɵFactoryTarget.Component });
153
- 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 });
154
- }
155
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LookupMatrixField, decorators: [{
156
- type: Component,
157
- args: [{ selector: 'mt-lookup-matrix-field', standalone: true, imports: [CommonModule, Tooltip, Icon], changeDetection: ChangeDetectionStrategy.OnPush, host: {
158
- class: 'grid gap-2',
159
- }, 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" }]
160
- }], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }] } });
161
-
162
- class SchemaConnectionField {
163
- // ============================================================================
164
- // Inputs
165
- // ============================================================================
166
- label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
167
- placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
168
- readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
169
- required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
170
- filter = input(true, ...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
171
- /**
172
- * Full connection configuration object from the API.
173
- * Includes `targetLevelId`, `sourceLevels[]`, `payloadTemplate`, etc.
174
- */
175
- configuration = input.required(...(ngDevMode ? [{ debugName: "configuration" }] : /* istanbul ignore next */ []));
176
- /**
177
- * Optional HttpContext for API requests (e.g. to set base URL behavior).
178
- */
179
- context = input(undefined, ...(ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []));
180
- // ============================================================================
181
- // Internal State
182
- // ============================================================================
183
- /** The full ConnectionPayload value */
184
- value = signal(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
185
- disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
186
- /** Per-source-level state: options + loading */
187
- sourceLevelStates = signal([], ...(ngDevMode ? [{ debugName: "sourceLevelStates" }] : /* istanbul ignore next */ []));
188
- /** Mutable selections per source level: sourceLevelId -> selected value */
189
- selections = {};
190
- onTouched = () => { };
191
- onModelChange = () => { };
192
- /**
193
- * Required-validation for a connection: emptiness is decided by the selected
194
- * `sources`, not by the value being null. The runtime loads an unselected
195
- * connection as `{ levelId, sources: [] }` — a non-null object that Angular's
196
- * stock `Validators.required` accepts — so a plain required check would let an
197
- * empty connection pass and the form submit. Mirrors {@link syncValue}, which
198
- * collapses a source-less selection to `null`.
199
- */
200
- connectionRequiredValidator = (control) => {
201
- const value = control.value;
202
- const hasSources = !!value && Array.isArray(value.sources) && value.sources.length > 0;
203
- return hasSources ? null : { required: true };
204
- };
205
- ngControl = null;
206
- http = inject(HttpClient);
207
- destroyRef = inject(DestroyRef);
208
- transloco = inject(TranslocoService);
209
- /** Active UI language, kept reactive so source labels re-resolve on switch. */
210
- activeLang = toSignal(this.transloco.langChanges$, {
211
- initialValue: this.transloco.getActiveLang(),
212
- });
213
- /**
214
- * Resolve a source level's display name in the active locale, falling back
215
- * to English, Arabic, then the level/module key.
216
- */
217
- resolveSourceName(source) {
218
- const name = source.name;
219
- return (name?.[this.activeLang()] ||
220
- name?.en ||
221
- name?.ar ||
222
- source.levelKey ||
223
- source.moduleKey ||
224
- '');
225
- }
226
- /**
227
- * Source levels from configuration.
228
- */
229
- sourceLevels = computed(() => {
230
- return this.configuration()?.sourceLevels ?? [];
231
- }, ...(ngDevMode ? [{ debugName: "sourceLevels" }] : /* istanbul ignore next */ []));
232
- /**
233
- * Tooltip for the marker rendered next to every source label — it is what
234
- * tells the user these dropdowns belong to a connection, now that the
235
- * connection's own label no longer occupies a row above them. Reads
236
- * {@link activeLang} so the text re-translates on language switch.
237
- */
238
- connectionHint = computed(() => {
239
- this.activeLang();
240
- return this.transloco.translate('components.schemaConnection.hint');
241
- }, ...(ngDevMode ? [{ debugName: "connectionHint" }] : /* istanbul ignore next */ []));
242
- /**
243
- * Placeholder for a source dropdown: its own source name, matching the label
244
- * above it. Falls back to the field-level placeholder only when the source
245
- * has no resolvable name.
246
- */
247
- sourcePlaceholder(source) {
248
- return (this.resolveSourceName(source) ||
249
- this.placeholder() ||
250
- this.transloco.translate('components.selectPlaceholder'));
251
- }
252
- /**
253
- * Percentage width for each dropdown, evenly divided.
254
- */
255
- dropdownWidth = computed(() => {
256
- const count = this.sourceLevels().length;
257
- if (count <= 0)
258
- return '100%';
259
- return `${100 / count}%`;
260
- }, ...(ngDevMode ? [{ debugName: "dropdownWidth" }] : /* istanbul ignore next */ []));
261
- constructor() {
262
- this.ngControl = inject(NgControl, { self: true, optional: true });
263
- if (this.ngControl) {
264
- this.ngControl.valueAccessor = this;
265
- }
266
- effect(() => {
267
- const control = this.ngControl?.control;
268
- if (!control)
269
- return;
270
- const required = this.required();
271
- untracked(() => {
272
- if (required) {
273
- control.addValidators(this.connectionRequiredValidator);
274
- }
275
- else {
276
- control.removeValidators(this.connectionRequiredValidator);
277
- }
278
- control.updateValueAndValidity({ emitEvent: false });
279
- });
280
- });
281
- // Load options for each source level when configuration changes
282
- effect(() => {
283
- const levels = this.sourceLevels();
284
- if (!levels.length)
285
- return;
286
- // Everything below must NOT create signal dependencies,
287
- // only sourceLevels() (→ configuration) should trigger this effect.
288
- untracked(() => {
289
- // Initialize per-source states + selections
290
- this.sourceLevelStates.set(levels.map((source) => ({
291
- source,
292
- options: [],
293
- loading: false,
294
- })));
295
- for (const source of levels) {
296
- const sourceId = this.getSourceId(source);
297
- if (!(sourceId in this.selections)) {
298
- this.selections[sourceId] = source.allowManyToMany ? [] : null;
299
- }
300
- }
301
- // Distribute existing value to selections
302
- this.distributeToSelections(this.value());
303
- // Load options for each source level
304
- for (const source of levels) {
305
- this.loadOptions(source);
306
- }
307
- });
308
- });
309
- }
310
- // ============================================================================
311
- // Source Level Helpers
312
- // ============================================================================
313
- /**
314
- * Returns a stable numeric ID for a source regardless of whether it is a
315
- * level (`levelId`) or a module (`moduleId`). Used as the key in `selections`
316
- * and `sourceLevelStates`.
317
- */
318
- getSourceId(source) {
319
- return (source.levelId ?? source.moduleId);
320
- }
321
- /**
322
- * Builds the `contextKey` for the `fetch/query` request based on source type.
323
- */
324
- getContextKey(source) {
325
- return source.levelId != null
326
- ? `level:${source.levelId}`
327
- : `module:${source.moduleId}`;
328
- }
329
- // ============================================================================
330
- // Option Loading (per source level)
331
- // ============================================================================
332
- loadOptions(source) {
333
- this.updateSourceState(this.getSourceId(source), { loading: true });
334
- const ctx = this.context();
335
- const payload = {
336
- contextKey: this.getContextKey(source),
337
- projection: 'Flat',
338
- propertyKeys: ['name'],
339
- };
340
- this.http
341
- .post('fetch/query', payload, {
342
- ...(ctx ? { context: ctx } : {}),
343
- })
344
- .pipe(takeUntilDestroyed(this.destroyRef), finalize(() => this.updateSourceState(this.getSourceId(source), { loading: false })), catchError((err) => {
345
- console.error(`Connection options load failed for ${source.levelKey ?? source.moduleKey}:`, err);
346
- return of({ data: { records: [] } });
347
- }))
348
- .subscribe((response) => {
349
- const options = (response?.data?.records ?? [])
350
- .filter((record) => record?.id != null)
351
- .map((record) => ({
352
- ...record,
353
- id: record.id,
354
- name: record.name,
355
- }));
356
- this.updateSourceState(this.getSourceId(source), {
357
- options,
358
- loading: false,
359
- });
360
- });
361
- }
362
- updateSourceState(sourceId, patch) {
363
- this.sourceLevelStates.update((states) => states.map((s) => this.getSourceId(s.source) === sourceId ? { ...s, ...patch } : s));
364
- }
365
- // ============================================================================
366
- // Value Handling
367
- // ============================================================================
368
- /**
369
- * Single handler — no params. Reads all selections, builds the combined payload.
370
- */
371
- syncValue() {
372
- const cfg = this.configuration();
373
- const states = this.sourceLevelStates();
374
- const sources = [];
375
- for (const state of states) {
376
- const val = this.selections[this.getSourceId(state.source)];
377
- if (val == null)
378
- continue;
379
- const effectiveId = this.getSourceId(state.source);
380
- if (state.source.allowManyToMany && Array.isArray(val)) {
381
- for (const id of val) {
382
- sources.push({
383
- sourceLevelId: effectiveId,
384
- sourceLevelDataId: id,
385
- });
386
- }
387
- }
388
- else if (typeof val === 'number') {
389
- sources.push({
390
- sourceLevelId: effectiveId,
391
- sourceLevelDataId: val,
392
- });
393
- }
394
- }
395
- const payload = sources.length > 0 ? { levelId: cfg.targetLevelId, sources } : null;
396
- this.value.set(payload);
397
- this.onModelChange(payload);
398
- this.onTouched();
399
- }
400
- distributeToSelections(payload) {
401
- const states = this.sourceLevelStates();
402
- for (const state of states) {
403
- const sourceId = this.getSourceId(state.source);
404
- const ids = (payload?.sources ?? [])
405
- .filter((s) => (s.sourceLevelId ?? s.sourceModuleId) === sourceId)
406
- .map((s) => s.sourceLevelDataId ?? s.sourceModuleDataId)
407
- .filter((id) => id != null);
408
- this.selections[sourceId] = state.source.allowManyToMany
409
- ? ids
410
- : (ids[0] ?? null);
411
- }
412
- }
413
- // ============================================================================
414
- // ControlValueAccessor
415
- // ============================================================================
416
- writeValue(value) {
417
- if (typeof value === 'string') {
418
- try {
419
- value = JSON.parse(value);
420
- }
421
- catch {
422
- value = null;
423
- }
424
- }
425
- this.value.set(value ?? null);
426
- this.distributeToSelections(value ?? null);
427
- }
428
- registerOnChange(fn) {
429
- this.onModelChange = fn;
430
- }
431
- registerOnTouched(fn) {
432
- this.onTouched = fn;
433
- }
434
- setDisabledState(disabled) {
435
- this.disabled.set(disabled);
436
- }
437
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SchemaConnectionField, deps: [], target: i0.ɵɵFactoryTarget.Component });
438
- 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"] }, { kind: "directive", type: Tooltip, selector: "[mtTooltip]" }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
439
- }
440
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SchemaConnectionField, decorators: [{
441
- type: Component,
442
- args: [{ selector: 'mt-schema-connection-field', standalone: true, imports: [
443
- FormsModule,
444
- SelectField,
445
- MultiSelectField,
446
- FieldValidation,
447
- Tooltip,
448
- Icon,
449
- ], changeDetection: ChangeDetectionStrategy.OnPush, host: {
450
- class: 'grid gap-1',
451
- }, 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" }]
452
- }], 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 }] }] } });
453
-
454
- const PREDECESSOR_TYPE_BY_TOKEN = {
455
- FS: 0,
456
- SS: 1,
457
- FF: 2,
458
- SF: 3,
459
- };
460
- const PREDECESSOR_TOKEN_BY_TYPE = {
461
- 0: 'FS',
462
- 1: 'SS',
463
- 2: 'FF',
464
- 3: 'SF',
465
- };
466
- class SchedulePredecessorField {
467
- predecessorCellTpl = viewChild.required('predecessorCellTpl');
468
- typeCellTpl = viewChild.required('typeCellTpl');
469
- lagCellTpl = viewChild.required('lagCellTpl');
470
- label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
471
- placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
472
- readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
473
- required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
474
- configuration = input(null, ...(ngDevMode ? [{ debugName: "configuration" }] : /* istanbul ignore next */ []));
475
- runtimeContext = input(null, ...(ngDevMode ? [{ debugName: "runtimeContext" }] : /* istanbul ignore next */ []));
476
- loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
477
- taskOptions = signal([], ...(ngDevMode ? [{ debugName: "taskOptions" }] : /* istanbul ignore next */ []));
478
- rows = signal([], ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
479
- disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
480
- typeOptions = computed(() => [
481
- { label: 'FS', value: 0 },
482
- { label: 'SS', value: 1 },
483
- { label: 'FF', value: 2 },
484
- { label: 'SF', value: 3 },
485
- ], ...(ngDevMode ? [{ debugName: "typeOptions" }] : /* istanbul ignore next */ []));
486
- availableTaskOptions = computed(() => {
487
- const currentTaskId = this.runtimeContext()?.moduleDataId;
488
- return this.taskOptions().filter((item) => String(item.value) !== String(currentTaskId ?? ''));
489
- }, ...(ngDevMode ? [{ debugName: "availableTaskOptions" }] : /* istanbul ignore next */ []));
490
- canAddRow = computed(() => !!this.runtimeContext()?.levelId &&
491
- !!this.runtimeContext()?.levelDataId &&
492
- this.availableTaskOptions().length > 0, ...(ngDevMode ? [{ debugName: "canAddRow" }] : /* istanbul ignore next */ []));
493
- addTooltip = computed(() => this.canAddRow() ? undefined : this.texts().noAvailable, ...(ngDevMode ? [{ debugName: "addTooltip" }] : /* istanbul ignore next */ []));
494
- pageSize = computed(() => this.rows().length > 0 ? this.rows().length : 1, ...(ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []));
495
- columns = linkedSignal(() => [
496
- {
497
- key: 'predecessorId',
498
- label: this.texts().predecessor,
499
- type: 'custom',
500
- customCellTpl: this.predecessorCellTpl(),
501
- },
502
- {
503
- key: 'type',
504
- label: this.texts().type,
505
- type: 'custom',
506
- customCellTpl: this.typeCellTpl(),
507
- },
508
- {
509
- key: 'lagDays',
510
- label: this.texts().lagDays,
511
- type: 'custom',
512
- customCellTpl: this.lagCellTpl(),
513
- },
514
- ], ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
515
- rowActions = computed(() => [
516
- {
517
- icon: 'general.trash-01',
518
- color: 'danger',
519
- variant: 'text',
520
- tooltip: this.texts().delete,
521
- hidden: () => this.disabled() || this.readonly(),
522
- action: (row) => this.removeRow(row.key),
523
- },
524
- ], ...(ngDevMode ? [{ debugName: "rowActions" }] : /* istanbul ignore next */ []));
525
- requiredValidator = Validators.required;
526
- onTouched = () => { };
527
- onModelChange = () => { };
528
- ngControl = null;
529
- http = inject(HttpClient);
530
- transloco = inject(TranslocoService);
531
- destroyRef = inject(DestroyRef);
532
- activeLang = toSignal(this.transloco.langChanges$, {
533
- initialValue: this.transloco.getActiveLang(),
534
- });
535
- rowKey = 0;
536
- texts = computed(() => {
537
- this.activeLang();
538
- return {
539
- noAvailable: this.transloco.translate('components.schedulePredecessorField.noAvailable'),
540
- predecessor: this.transloco.translate('components.schedulePredecessorField.predecessor'),
541
- type: this.transloco.translate('components.schedulePredecessorField.type'),
542
- lagDays: this.transloco.translate('components.schedulePredecessorField.lagDays'),
543
- delete: this.transloco.translate('components.schedulePredecessorField.delete'),
544
- };
545
- }, ...(ngDevMode ? [{ debugName: "texts" }] : /* istanbul ignore next */ []));
546
- constructor() {
547
- this.ngControl = inject(NgControl, { self: true, optional: true });
548
- if (this.ngControl) {
549
- this.ngControl.valueAccessor = this;
550
- }
551
- effect(() => {
552
- if (this.ngControl?.control && this.required()) {
553
- this.ngControl.control.addValidators(Validators.required);
554
- this.ngControl.control.updateValueAndValidity();
555
- }
556
- });
557
- effect(() => {
558
- const context = this.runtimeContext();
559
- const levelId = context?.levelId;
560
- const levelDataId = context?.levelDataId;
561
- if (levelId == null || levelDataId == null) {
562
- this.taskOptions.set([]);
563
- return;
564
- }
565
- untracked(() => this.loadTaskOptions(levelId, levelDataId));
566
- });
567
- }
568
- addRow() {
569
- if (this.disabled() || this.readonly() || !this.canAddRow()) {
570
- return;
571
- }
572
- this.syncRows([
573
- ...this.rows(),
574
- {
575
- key: this.nextRowKey(),
576
- predecessorId: '',
577
- type: 0,
578
- lagDays: 0,
579
- },
580
- ]);
581
- }
582
- removeRow(key) {
583
- if (this.disabled() || this.readonly()) {
584
- return;
585
- }
586
- this.syncRows(this.rows().filter((row) => row.key !== key));
587
- }
588
- updateRow(key, patch) {
589
- if (this.disabled() || this.readonly()) {
590
- return;
591
- }
592
- this.syncRows(this.rows().map((row) => (row.key === key ? { ...row, ...patch } : row)));
593
- }
594
- writeValue(value) {
595
- const rows = typeof value === 'string'
596
- ? value
597
- .split(',')
598
- .map((item) => item.trim())
599
- .filter(Boolean)
600
- .map((item) => this.parseCompactValue(item))
601
- .filter((item) => item != null)
602
- .map((item) => ({
603
- key: this.nextRowKey(),
604
- ...item,
605
- }))
606
- : [];
607
- this.rows.set(rows);
608
- }
609
- registerOnChange(fn) {
610
- this.onModelChange = fn;
611
- }
612
- registerOnTouched(fn) {
613
- this.onTouched = fn;
614
- }
615
- setDisabledState(disabled) {
616
- this.disabled.set(disabled);
617
- }
618
- syncRows(rows) {
619
- this.rows.set(rows);
620
- const value = rows
621
- .filter((row) => row.predecessorId !== null &&
622
- row.predecessorId !== undefined &&
623
- String(row.predecessorId).trim() !== '')
624
- .map((row) => this.formatCompactValue(row))
625
- .join(',');
626
- this.onModelChange(value || null);
627
- this.onTouched();
628
- }
629
- loadTaskOptions(levelId, levelDataId) {
630
- this.loading.set(true);
631
- this.http
632
- .post(`levels/${levelId}/${levelDataId}/schedule/query`, {
633
- projection: 'Tree',
634
- propertyKeys: ['name'],
635
- })
636
- .pipe(takeUntilDestroyed(this.destroyRef), finalize(() => this.loading.set(false)), catchError(() => of({ data: { records: [] } })))
637
- .subscribe((response) => {
638
- this.taskOptions.set(this.mapTaskOptions(response.data));
639
- });
640
- }
641
- mapTaskOptions(data) {
642
- // Labels show the ROW NUMBER (1-based position in the same pre-order walk
643
- // the grid's ID column numbers), not the backend id — the two surfaces
644
- // must speak one coordinate. The option VALUE stays the real id: the
645
- // compact predecessor string this field produces is wire format.
646
- return this.flattenRecords(this.resolveRootRecords(data?.records ?? [], data?.projectionMeta?.rootIds ?? [])).map((record, index) => ({
647
- label: `${index + 1} - ${record.name ?? record.id}`,
648
- value: String(record.id),
649
- }));
650
- }
651
- resolveRootRecords(records, rootIds) {
652
- if (!rootIds?.length) {
653
- return records;
654
- }
655
- const recordsById = new Map(records.map((record) => [String(record.id), record]));
656
- return rootIds
657
- .map((id) => recordsById.get(String(id)))
658
- .filter((record) => record != null);
659
- }
660
- flattenRecords(records) {
661
- const output = [];
662
- const walk = (items) => {
663
- items.forEach((item) => {
664
- output.push(item);
665
- walk(item.children ?? []);
666
- });
667
- };
668
- walk(records);
669
- return output;
670
- }
671
- nextRowKey() {
672
- this.rowKey += 1;
673
- return `predecessor-${this.rowKey}`;
674
- }
675
- parseCompactValue(value) {
676
- const match = value.match(/^(.+?)(FS|SS|FF|SF)([+-]\d+)?$/);
677
- if (!match) {
678
- return null;
679
- }
680
- return {
681
- predecessorId: match[1],
682
- type: PREDECESSOR_TYPE_BY_TOKEN[match[2]],
683
- lagDays: match[3] ? Number(match[3]) : 0,
684
- };
685
- }
686
- formatCompactValue(row) {
687
- const lag = row.lagDays > 0 ? `+${row.lagDays}` : row.lagDays < 0 ? row.lagDays : '';
688
- return `${row.predecessorId}${PREDECESSOR_TOKEN_BY_TYPE[row.type]}${lag}`;
689
- }
690
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SchedulePredecessorField, deps: [], target: i0.ɵɵFactoryTarget.Component });
691
- 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]=\"ngControl?.name || label()\"\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"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: FieldValidation, selector: "mt-field-validation", inputs: ["control", "touched"] }, { 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", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy", "sortField", "sortDirection"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "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 });
692
- }
693
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SchedulePredecessorField, decorators: [{
694
- type: Component,
695
- args: [{ selector: 'mt-schedule-predecessor-field', standalone: true, imports: [
696
- CommonModule,
697
- FormsModule,
698
- Button,
699
- FieldValidation,
700
- NumberField,
701
- SelectField,
702
- Table,
703
- TranslocoModule,
704
- ], changeDetection: ChangeDetectionStrategy.OnPush, host: {
705
- class: 'grid gap-1',
706
- }, 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]=\"ngControl?.name || label()\"\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" }]
707
- }], 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 }] }] } });
708
-
709
- /**
710
- * Token used by `mt-entity-list-field` (Write mode) to open the rich add-row
711
- * dialog backed by `@masterteam/forms`'s `mt-client-form`. Apps that want this
712
- * behavior should call `provideEntityListAddForm()` from
713
- * `@masterteam/forms/entity-list-add-form` in their app providers. When the
714
- * token is not registered, the field falls back to a minimal text-only popup.
715
- */
716
- const ENTITY_LIST_ADD_DIALOG_COMPONENT = new InjectionToken('ENTITY_LIST_ADD_DIALOG_COMPONENT');
717
-
718
- const UNSORTABLE_ENTITY_VIEW_TYPES = new Set([
719
- 'Attachment',
720
- 'Checkbox',
721
- ]);
722
- const ACCESS_ALIASES = {
723
- '0': 'Auto',
724
- '1': 'Read',
725
- '2': 'Write',
726
- '3': 'ReadWrite',
727
- '4': 'None',
728
- auto: 'Auto',
729
- read: 'Read',
730
- write: 'Write',
731
- readwrite: 'ReadWrite',
732
- none: 'None',
733
- };
734
- /** Internal row keys — not rendered, used to correlate rows with entities. */
735
- const ROW_ID_KEY = '__rowId';
736
- const ROW_ENTITY_ID_KEY = '__entityId';
737
- const ROW_VALUES_KEY = '__values';
738
- class EntityListField {
739
- // Inputs
740
- label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
741
- readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
742
- required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
743
- /** EntityList property id (kept for back-compat; unused by fetch/query). */
744
- propertyId = input(null, ...(ngDevMode ? [{ debugName: "propertyId" }] : /* istanbul ignore next */ []));
745
- /** Property configuration (sourceType, moduleId, access, readFields, etc). */
746
- configuration = input(null, ...(ngDevMode ? [{ debugName: "configuration" }] : /* istanbul ignore next */ []));
747
- /** Runtime ids needed to call the read endpoint. */
748
- runtimeContext = input(null, ...(ngDevMode ? [{ debugName: "runtimeContext" }] : /* istanbul ignore next */ []));
749
- /** Optional HttpContext (kept for back-compat). */
750
- context = input(undefined, ...(ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []));
751
- // CVA state — pass-through value (EntityList stored JSON shape).
752
- storedValue = signal(null, ...(ngDevMode ? [{ debugName: "storedValue" }] : /* istanbul ignore next */ []));
753
- // Loaded table state.
754
- columns = signal([], ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
755
- /** Rows loaded from the backend (existing target records). */
756
- rows = signal([], ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
757
- loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
758
- errorMessage = signal(null, ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
759
- disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
760
- requiredValidator = Validators.required;
761
- ngControl = null;
762
- levelId = computed(() => {
763
- const raw = this.runtimeContext()?.levelId ?? null;
764
- return raw == null || raw === '' ? null : raw;
765
- }, ...(ngDevMode ? [{ debugName: "levelId" }] : /* istanbul ignore next */ []));
766
- levelDataId = computed(() => {
767
- const raw = this.runtimeContext()?.levelDataId ?? null;
768
- return raw == null || raw === '' ? null : raw;
769
- }, ...(ngDevMode ? [{ debugName: "levelDataId" }] : /* istanbul ignore next */ []));
770
- moduleId = computed(() => {
771
- const raw = this.configuration()
772
- ?.moduleId;
773
- return raw == null || raw === '' ? null : raw;
774
- }, ...(ngDevMode ? [{ debugName: "moduleId" }] : /* istanbul ignore next */ []));
775
- readFields = computed(() => {
776
- const raw = this.configuration()
777
- ?.readFields;
778
- if (!Array.isArray(raw))
779
- return [];
780
- return raw.filter((f) => typeof f === 'string' && f.length > 0);
781
- }, ...(ngDevMode ? [{ debugName: "readFields" }] : /* istanbul ignore next */ []));
782
- /** Normalized `access` from the property configuration. */
783
- accessMode = computed(() => {
784
- const raw = this.configuration()?.access;
785
- if (raw == null || raw === '')
786
- return 'Auto';
787
- return ACCESS_ALIASES[String(raw).trim().toLowerCase()] ?? 'Auto';
788
- }, ...(ngDevMode ? [{ debugName: "accessMode" }] : /* istanbul ignore next */ []));
789
- canRead = computed(() => {
790
- const access = this.accessMode();
791
- return access === 'Auto' || access === 'Read' || access === 'ReadWrite';
792
- }, ...(ngDevMode ? [{ debugName: "canRead" }] : /* istanbul ignore next */ []));
793
- /** Access allows module-backed create/update/delete. */
794
- writeAllowed = computed(() => {
795
- const access = this.accessMode();
796
- return access === 'Auto' || access === 'Write' || access === 'ReadWrite';
797
- }, ...(ngDevMode ? [{ debugName: "writeAllowed" }] : /* istanbul ignore next */ []));
798
- /** Write UI is rendered only when access allows it and the field is editable. */
799
- canWrite = computed(() => this.writeAllowed() && !this.readonly(), ...(ngDevMode ? [{ debugName: "canWrite" }] : /* istanbul ignore next */ []));
800
- writeFields = computed(() => {
801
- const raw = this.configuration()
802
- ?.writeFields;
803
- if (!Array.isArray(raw))
804
- return [];
805
- return raw.filter((f) => typeof f === 'string' && f.length > 0);
806
- }, ...(ngDevMode ? [{ debugName: "writeFields" }] : /* istanbul ignore next */ []));
807
- /**
808
- * Pending create/update rows, in the exact shape persisted by the backend
809
- * (`rows[]` of the stored EntityList JSON). Rows with `entityId > 0` are
810
- * partial updates of existing records; `entityId = 0` rows are creates.
811
- */
812
- pendingRows = signal([], ...(ngDevMode ? [{ debugName: "pendingRows" }] : /* istanbul ignore next */ []));
813
- /** Existing entity ids the user removed (submitted as `deletedIds`). */
814
- deletedIds = signal([], ...(ngDevMode ? [{ debugName: "deletedIds" }] : /* istanbul ignore next */ []));
815
- /** rowId → original form values / option labels (view state only). */
816
- rowDrafts = signal({}, ...(ngDevMode ? [{ debugName: "rowDrafts" }] : /* istanbul ignore next */ []));
817
- localRowSeq = 0;
818
- /** Serialized copy of the last value we emitted, to ignore CVA echoes. */
819
- lastEmittedJson = null;
820
- /** Server rows indexed by entity id, for merging pending updates. */
821
- rowsByEntityId = computed(() => {
822
- const map = new Map();
823
- for (const row of this.rows()) {
824
- const entityId = Number(row[ROW_ENTITY_ID_KEY]);
825
- if (entityId > 0)
826
- map.set(entityId, row);
827
- }
828
- return map;
829
- }, ...(ngDevMode ? [{ debugName: "rowsByEntityId" }] : /* istanbul ignore next */ []));
830
- /** Locally created rows (not yet persisted). */
831
- createdRows = computed(() => {
832
- const drafts = this.rowDrafts();
833
- return this.pendingRows()
834
- .filter((row) => !(row.entityId > 0))
835
- .map((row) => {
836
- const draft = drafts[row.rowId];
837
- return this.buildRow(row.rowId, row.rowId, 0, draft?.values ?? this.toValueMap(row.values), draft?.display ?? {});
838
- });
839
- }, ...(ngDevMode ? [{ debugName: "createdRows" }] : /* istanbul ignore next */ []));
840
- /** Pending edits of existing rows, keyed by entity id. */
841
- editedRowsByEntityId = computed(() => {
842
- const drafts = this.rowDrafts();
843
- const serverRows = this.rowsByEntityId();
844
- const map = new Map();
845
- for (const row of this.pendingRows()) {
846
- if (!(row.entityId > 0))
847
- continue;
848
- const base = serverRows.get(row.entityId);
849
- const draft = drafts[row.rowId];
850
- // A pending update only carries the keys the user changed.
851
- const changed = draft?.values ?? this.toValueMap(row.values);
852
- const display = draft?.display ?? {};
853
- if (!base) {
854
- map.set(row.entityId, this.buildRow(row.entityId, row.rowId, row.entityId, changed, display));
855
- continue;
856
- }
857
- // Keep the backend-rendered cells for untouched columns so resolved
858
- // labels (users, lookups, statuses) are not replaced by raw ids.
859
- const baseValues = base[ROW_VALUES_KEY] ?? {};
860
- const next = {
861
- ...base,
862
- [ROW_ID_KEY]: row.rowId,
863
- [ROW_VALUES_KEY]: { ...baseValues, ...changed },
864
- };
865
- for (const column of this.columns()) {
866
- const key = column.propertyKey ?? column.key;
867
- if (!(key in changed))
868
- continue;
869
- next[column.key] = this.buildCell(column, changed[key], display[key]);
870
- }
871
- map.set(row.entityId, next);
872
- }
873
- return map;
874
- }, ...(ngDevMode ? [{ debugName: "editedRowsByEntityId" }] : /* istanbul ignore next */ []));
875
- /**
876
- * Rows rendered in the table. In write mode existing rows are merged with
877
- * pending edits, removed rows are hidden, and locally created rows are
878
- * appended.
879
- */
880
- displayRows = computed(() => {
881
- if (!this.canWrite())
882
- return this.rows();
883
- const deleted = new Set(this.deletedIds());
884
- const edited = this.editedRowsByEntityId();
885
- const existing = this.rows()
886
- .filter((row) => !deleted.has(Number(row[ROW_ENTITY_ID_KEY])))
887
- .map((row) => edited.get(Number(row[ROW_ENTITY_ID_KEY])) ?? row);
888
- return [...existing, ...this.createdRows()];
889
- }, ...(ngDevMode ? [{ debugName: "displayRows" }] : /* istanbul ignore next */ []));
890
- hasRows = computed(() => this.displayRows().length > 0, ...(ngDevMode ? [{ debugName: "hasRows" }] : /* istanbul ignore next */ []));
891
- hasRequiredContext = computed(() => this.levelId() != null &&
892
- this.levelDataId() != null &&
893
- this.moduleId() != null &&
894
- this.readFields().length > 0, ...(ngDevMode ? [{ debugName: "hasRequiredContext" }] : /* istanbul ignore next */ []));
895
- onTouched = () => { };
896
- onModelChange = () => { };
897
- http = inject(HttpClient);
898
- destroyRef = inject(DestroyRef);
899
- modal = inject(ModalService);
900
- transloco = inject(TranslocoService);
901
- /**
902
- * Optional rich add-row dialog (provided by `@masterteam/forms` via
903
- * `provideEntityListAddForm()`). When available, used instead of the local
904
- * minimal dialog so the popup renders `mt-client-form` filtered by
905
- * `writeFields`.
906
- */
907
- addDialogComponent = inject(ENTITY_LIST_ADD_DIALOG_COMPONENT, { optional: true });
908
- constructor() {
909
- this.ngControl = inject(NgControl, { self: true, optional: true });
910
- if (this.ngControl) {
911
- this.ngControl.valueAccessor = this;
912
- }
913
- // Trigger fetch when context inputs change. Columns always come from
914
- // /api/fetch/query; records are kept whenever access allows reading.
915
- effect(() => {
916
- const allowedRead = this.canRead();
917
- const allowedWrite = this.writeAllowed();
918
- const ready = this.hasRequiredContext();
919
- const levelId = this.levelId();
920
- const levelDataId = this.levelDataId();
921
- const moduleId = this.moduleId();
922
- const readFields = this.readFields();
923
- untracked(() => {
924
- if ((!allowedRead && !allowedWrite) ||
925
- !ready ||
926
- levelId == null ||
927
- levelDataId == null ||
928
- moduleId == null) {
929
- this.columns.set([]);
930
- this.rows.set([]);
931
- this.errorMessage.set(null);
932
- return;
933
- }
934
- this.fetchRows(levelId, levelDataId, moduleId, readFields);
935
- });
936
- });
937
- }
938
- // ============================================================================
939
- // CVA
940
- // ============================================================================
941
- writeValue(value) {
942
- const incoming = this.coerceStoredValue(value);
943
- // Ignore the echo of our own emission (DynamicForm re-writes the model on
944
- // every value change) so pending edits/deletions are not reset.
945
- if (this.isEchoOfLastEmit(incoming))
946
- return;
947
- this.lastEmittedJson = null;
948
- this.storedValue.set(incoming);
949
- // Restore rows the backend left unprocessed. `deletedIds` on a loaded
950
- // value are historical operation markers, not pending intent.
951
- const rows = Array.isArray(incoming?.rows) ? incoming.rows : [];
952
- this.pendingRows.set(rows.filter((row) => !!row && typeof row === 'object'));
953
- this.deletedIds.set([]);
954
- this.rowDrafts.set({});
955
- }
956
- /**
957
- * True when the written value still carries exactly the rows and deletions
958
- * we last emitted — i.e. the form is echoing our own value back rather than
959
- * loading a new one.
960
- */
961
- isEchoOfLastEmit(incoming) {
962
- if (this.lastEmittedJson === null)
963
- return false;
964
- return (JSON.stringify({
965
- rows: incoming?.rows ?? [],
966
- deletedIds: incoming?.deletedIds ?? [],
967
- }) === this.lastEmittedJson);
968
- }
969
- /**
970
- * The stored value is persisted as JSON, so a host may write either the
971
- * parsed object or its raw string form.
972
- */
973
- coerceStoredValue(value) {
974
- if (value == null || value === '')
975
- return null;
976
- if (typeof value === 'string') {
977
- try {
978
- return this.coerceStoredValue(JSON.parse(value));
979
- }
980
- catch {
981
- return null;
982
- }
983
- }
984
- return typeof value === 'object' && !Array.isArray(value)
985
- ? value
986
- : null;
987
- }
988
- registerOnChange(fn) {
989
- this.onModelChange = fn;
990
- }
991
- registerOnTouched(fn) {
992
- this.onTouched = fn;
993
- }
994
- setDisabledState(isDisabled) {
995
- this.disabled.set(isDisabled);
996
- }
997
- // ============================================================================
998
- // Write mode — add / edit / delete
999
- // ============================================================================
1000
- /** Row actions shown in write mode — edit and delete. */
1001
- writeRowActions = computed(() => {
1002
- if (this.disabled())
1003
- return [];
1004
- return [
1005
- {
1006
- icon: 'custom.pencil',
1007
- tooltip: this.transloco.translate('components.entityListField.edit'),
1008
- action: (row) => this.openEditDialog(row),
1009
- },
1010
- {
1011
- icon: 'general.trash-01',
1012
- tooltip: this.transloco.translate('components.entityListField.delete'),
1013
- color: 'danger',
1014
- confirmation: {
1015
- type: 'popup',
1016
- confirmationType: 'delete',
1017
- },
1018
- action: (row) => this.deleteRow(row),
1019
- },
1020
- ];
1021
- }, ...(ngDevMode ? [{ debugName: "writeRowActions" }] : /* istanbul ignore next */ []));
1022
- openAddDialog() {
1023
- if (this.disabled())
1024
- return;
1025
- const component = this.addDialogComponent;
1026
- if (!component)
1027
- return;
1028
- const ref = this.modal.openModal(component, 'dialog', {
1029
- header: this.transloco.translate('components.entityListField.add'),
1030
- styleClass: '!w-[48rem] max-w-[96vw]',
1031
- dismissableMask: true,
1032
- inputValues: {
1033
- moduleId: this.moduleId(),
1034
- levelId: this.levelId(),
1035
- levelDataId: this.levelDataId(),
1036
- writeFields: this.writeFields(),
1037
- },
1038
- });
1039
- ref.onClose.pipe(take(1)).subscribe((result) => {
1040
- const parsed = this.parseDialogResult(result);
1041
- if (!parsed)
1042
- return;
1043
- // A create row carries every value the user filled in; empty fields are
1044
- // dropped so the target module keeps its own defaults.
1045
- const values = this.dropEmptyValues(parsed.values);
1046
- const rowId = this.nextRowId();
1047
- this.setRowDraft(rowId, values, parsed.display);
1048
- this.pendingRows.set([
1049
- ...this.pendingRows(),
1050
- { rowId, entityId: 0, values: this.toSubmitValues(values) },
1051
- ]);
1052
- this.emitValue();
1053
- });
1054
- }
1055
- openEditDialog(row) {
1056
- if (this.disabled())
1057
- return;
1058
- const component = this.addDialogComponent;
1059
- if (!component)
1060
- return;
1061
- const entityId = Number(row[ROW_ENTITY_ID_KEY]) || 0;
1062
- const rowId = String(row[ROW_ID_KEY] ?? '');
1063
- const initialValues = row[ROW_VALUES_KEY] ?? {};
1064
- const ref = this.modal.openModal(component, 'dialog', {
1065
- header: this.transloco.translate('components.entityListField.edit'),
1066
- styleClass: '!w-[48rem] max-w-[96vw]',
1067
- dismissableMask: true,
1068
- inputValues: {
1069
- moduleId: this.moduleId(),
1070
- levelId: this.levelId(),
1071
- levelDataId: this.levelDataId(),
1072
- writeFields: this.writeFields(),
1073
- initialValues,
1074
- isEdit: true,
1075
- },
1076
- });
1077
- ref.onClose.pipe(take(1)).subscribe((result) => {
1078
- const parsed = this.parseDialogResult(result);
1079
- if (!parsed)
1080
- return;
1081
- if (entityId > 0) {
1082
- this.applyExistingRowEdit(entityId, rowId, initialValues, parsed);
1083
- }
1084
- else {
1085
- this.applyCreatedRowEdit(rowId, parsed);
1086
- }
1087
- this.emitValue();
1088
- });
1089
- }
1090
- /**
1091
- * Existing target records are updated partially: only values the user
1092
- * actually changed are submitted, so fields the dialog could not pre-fill
1093
- * (keys outside `readFields`) are left untouched by the backend.
1094
- */
1095
- applyExistingRowEdit(entityId, fallbackRowId, initialValues, parsed) {
1096
- const changed = this.diffValues(initialValues, parsed.values);
1097
- const current = this.pendingRows();
1098
- const existing = current.find((row) => row.entityId === entityId);
1099
- const rowId = existing?.rowId || (fallbackRowId ? fallbackRowId : `entity-${entityId}`);
1100
- const merged = {
1101
- ...(this.rowDrafts()[rowId]?.values ?? {}),
1102
- ...changed,
1103
- };
1104
- if (Object.keys(merged).length === 0) {
1105
- // Nothing left to submit for this record — drop the pending update.
1106
- this.clearRowDraft(rowId);
1107
- this.pendingRows.set(current.filter((row) => row.entityId !== entityId));
1108
- return;
1109
- }
1110
- this.setRowDraft(rowId, merged, parsed.display);
1111
- const next = {
1112
- rowId,
1113
- entityId,
1114
- values: this.toSubmitValues(merged),
1115
- };
1116
- this.pendingRows.set(existing
1117
- ? current.map((row) => (row.entityId === entityId ? next : row))
1118
- : [...current, next]);
1119
- }
1120
- /** A locally created row is replaced wholesale by the dialog result. */
1121
- applyCreatedRowEdit(rowId, parsed) {
1122
- const values = this.dropEmptyValues(parsed.values);
1123
- this.setRowDraft(rowId, values, parsed.display);
1124
- this.pendingRows.set(this.pendingRows().map((row) => row.rowId === rowId
1125
- ? { ...row, values: this.toSubmitValues(values) }
1126
- : row));
1127
- }
1128
- /**
1129
- * Remove a row. Locally created rows are dropped from the pending payload;
1130
- * existing records are queued in `deletedIds` for the backend to delete.
1131
- */
1132
- deleteRow(row) {
1133
- if (this.disabled())
1134
- return;
1135
- const entityId = Number(row[ROW_ENTITY_ID_KEY]) || 0;
1136
- const rowId = String(row[ROW_ID_KEY] ?? '');
1137
- if (entityId > 0) {
1138
- if (!this.deletedIds().includes(entityId)) {
1139
- this.deletedIds.set([...this.deletedIds(), entityId]);
1140
- }
1141
- // A queued update for a deleted record is pointless — drop it.
1142
- this.pendingRows.set(this.pendingRows().filter((pending) => pending.entityId !== entityId));
1143
- }
1144
- else {
1145
- this.pendingRows.set(this.pendingRows().filter((pending) => pending.rowId !== rowId));
1146
- }
1147
- this.clearRowDraft(rowId);
1148
- this.emitValue();
1149
- }
1150
- /**
1151
- * Normalize the add/edit dialog close payload. The rich dialog returns
1152
- * `{ values, display }`; a custom add-dialog may still return the raw values
1153
- * object directly (no display map), which we treat as `display = {}`.
1154
- */
1155
- parseDialogResult(result) {
1156
- if (!result || typeof result !== 'object')
1157
- return null;
1158
- const payload = result;
1159
- const values = payload['values'];
1160
- if (values && typeof values === 'object') {
1161
- return {
1162
- values: values,
1163
- display: payload['display'] ?? {},
1164
- };
1165
- }
1166
- return { values: payload, display: {} };
1167
- }
1168
- nextRowId() {
1169
- const used = new Set(this.pendingRows().map((row) => row.rowId));
1170
- let candidate = '';
1171
- do {
1172
- this.localRowSeq += 1;
1173
- candidate = `client-${this.localRowSeq}`;
1174
- } while (used.has(candidate));
1175
- return candidate;
1176
- }
1177
- setRowDraft(rowId, values, display) {
1178
- this.rowDrafts.set({ ...this.rowDrafts(), [rowId]: { values, display } });
1179
- }
1180
- clearRowDraft(rowId) {
1181
- if (!rowId || !(rowId in this.rowDrafts()))
1182
- return;
1183
- const next = { ...this.rowDrafts() };
1184
- delete next[rowId];
1185
- this.rowDrafts.set(next);
1186
- }
1187
- buildRow(id, rowId, entityId, values, display = {}) {
1188
- const row = {
1189
- Id: id,
1190
- [ROW_ID_KEY]: rowId,
1191
- [ROW_ENTITY_ID_KEY]: entityId,
1192
- [ROW_VALUES_KEY]: values,
1193
- };
1194
- for (const column of this.columns()) {
1195
- // Form values are keyed by catalog property key (e.g. "task_name"),
1196
- // but column.key is the normalizedKey (e.g. "Name"). Use propertyKey
1197
- // for the lookup so the value is found.
1198
- const key = column.propertyKey ?? column.key;
1199
- row[column.key] = this.buildCell(column, values[key], display[key]);
1200
- }
1201
- return row;
1202
- }
1203
- /** Render one table cell from a raw form value and its resolved label. */
1204
- buildCell(column, raw, label) {
1205
- return {
1206
- name: column.label ?? column.key,
1207
- key: column.key,
1208
- viewType: column.viewType ?? 'Text',
1209
- value: this.toLocalEntityValue(column.viewType, raw, label),
1210
- rawValue: raw ?? null,
1211
- };
1212
- }
1213
- /**
1214
- * Shape a raw form value into the value an entity renderer expects for the
1215
- * given view type. Locally-added rows carry raw form values, but renderers
1216
- * like `mt-entity-user` need a display object (`{ displayName }`) — a
1217
- * team-member `User` field is a select whose control value is a bare user id.
1218
- * `label` is the resolved option display (present for select-based fields).
1219
- */
1220
- toLocalEntityValue(viewType, raw, label) {
1221
- if (viewType === 'User') {
1222
- if (Array.isArray(raw)) {
1223
- const names = raw
1224
- .map((entry) => entry && typeof entry === 'object'
1225
- ? (entry['displayName'] ?? '')
1226
- : entry)
1227
- .filter((name) => name != null && name !== '');
1228
- return names.length ? { displayName: names.join(', ') } : '';
1229
- }
1230
- if (raw && typeof raw === 'object') {
1231
- const user = raw;
1232
- return {
1233
- ...user,
1234
- displayName: user['displayName'] ?? label ?? '',
1235
- photoUrl: user['photoUrl'] ?? user['photo'] ?? '',
1236
- };
1237
- }
1238
- if (raw != null && raw !== '') {
1239
- const name = label == null ? String(raw) : String(label);
1240
- return { id: String(raw), displayName: name, userName: name };
1241
- }
1242
- return '';
1243
- }
1244
- if (viewType === 'Status' || viewType === 'Lookup') {
1245
- if (raw && typeof raw === 'object')
1246
- return raw;
1247
- if (raw != null && raw !== '' && label != null) {
1248
- return { key: String(raw), display: String(label), color: '' };
1249
- }
1250
- return raw ?? '';
1251
- }
1252
- // Plain / scalar view types: prefer a resolved option label when present,
1253
- // else the raw value (unchanged for text / number / date / percentage).
1254
- if (label != null && (raw == null || typeof raw !== 'object')) {
1255
- return Array.isArray(label) ? label.join(', ') : label;
1256
- }
1257
- return raw ?? '';
1258
- }
1259
- // ============================================================================
1260
- // Submit payload (see EntityList.md — "Stored Value Shape")
1261
- // ============================================================================
1262
- emitValue() {
1263
- const current = this.storedValue();
1264
- // `entityIds` / `createdIds` / `updatedIds` / `snapshot` are backend-owned
1265
- // and passed through untouched; the frontend only contributes pending rows
1266
- // and delete intents.
1267
- const next = {
1268
- ...(current ?? {}),
1269
- rows: this.pendingRows(),
1270
- deletedIds: this.deletedIds(),
1271
- };
1272
- this.storedValue.set(next);
1273
- this.lastEmittedJson = JSON.stringify({
1274
- rows: next.rows,
1275
- deletedIds: next.deletedIds,
1276
- });
1277
- this.onModelChange(next);
1278
- this.onTouched();
1279
- }
1280
- /** `values[]` entries, restricted to `writeFields` when configured. */
1281
- toSubmitValues(values) {
1282
- const allowed = new Set(this.writeFields());
1283
- return Object.entries(values)
1284
- .filter(([propertyKey]) => allowed.size === 0 || allowed.has(propertyKey))
1285
- .map(([propertyKey, value]) => ({
1286
- propertyKey,
1287
- rawValue: this.toRawValue(value),
1288
- }));
1289
- }
1290
- /** Backend `rawValue` is a serialized scalar; objects/arrays go as JSON. */
1291
- toRawValue(value) {
1292
- if (value == null || value === '')
1293
- return null;
1294
- if (value instanceof Date)
1295
- return value.toISOString();
1296
- if (typeof value === 'object')
1297
- return JSON.stringify(value);
1298
- return String(value);
1299
- }
1300
- toValueMap(values) {
1301
- const map = {};
1302
- for (const value of values ?? []) {
1303
- if (!value?.propertyKey)
1304
- continue;
1305
- map[value.propertyKey] = value.rawValue;
1306
- }
1307
- return map;
1308
- }
1309
- dropEmptyValues(values) {
1310
- const next = {};
1311
- for (const [key, value] of Object.entries(values)) {
1312
- if (this.isEmptyValue(value))
1313
- continue;
1314
- next[key] = value;
1315
- }
1316
- return next;
1317
- }
1318
- /**
1319
- * Keys the user actually changed. A key that was empty before and is still
1320
- * empty is skipped (the dialog simply could not pre-fill it); a key that had
1321
- * a value and is now empty is kept so the backend clears it.
1322
- */
1323
- diffValues(initial, next) {
1324
- const changed = {};
1325
- for (const [key, value] of Object.entries(next)) {
1326
- const before = initial[key];
1327
- if (this.isEmptyValue(value) && this.isEmptyValue(before))
1328
- continue;
1329
- if (this.isSameValue(before, value))
1330
- continue;
1331
- changed[key] = value;
1332
- }
1333
- return changed;
1334
- }
1335
- isEmptyValue(value) {
1336
- if (value == null || value === '')
1337
- return true;
1338
- if (Array.isArray(value))
1339
- return value.length === 0;
1340
- return false;
1341
- }
1342
- isSameValue(a, b) {
1343
- if (a === b)
1344
- return true;
1345
- // Values arriving from the read endpoint are serialized; compare the
1346
- // submit-shaped representation so "5" and 5 are not treated as a change.
1347
- return this.toRawValue(a) === this.toRawValue(b);
1348
- }
1349
- // ============================================================================
1350
- // Read endpoint — POST /api/fetch/query (Table projection)
1351
- // ============================================================================
1352
- fetchRows(levelId, levelDataId, moduleId, propertyKeys) {
1353
- this.loading.set(true);
1354
- this.errorMessage.set(null);
1355
- const ctx = this.context();
1356
- const body = {
1357
- contextKey: `level:${levelId}/module:${moduleId}`,
1358
- projection: 'Table',
1359
- surfaceKey: 'table',
1360
- propertyKeys,
1361
- filters: [
1362
- {
1363
- key: 'levelDataId',
1364
- operator: 'Equals',
1365
- value: String(levelDataId),
1366
- },
1367
- ],
1368
- page: 1,
1369
- pageSize: 3000,
1370
- };
1371
- this.http
1372
- .post('fetch/query', body, ctx ? { context: ctx } : {})
1373
- .pipe(takeUntilDestroyed(this.destroyRef), finalize(() => this.loading.set(false)), catchError((err) => {
1374
- console.error('EntityList fetch/query failed', err);
1375
- this.errorMessage.set(this.transloco.translate('components.entityListField.loadFailed'));
1376
- return of({});
1377
- }))
1378
- .subscribe((response) => {
1379
- const payload = response && typeof response === 'object' && 'data' in response
1380
- ? (response.data ?? response)
1381
- : response;
1382
- this.applyResponse(payload);
1383
- });
1384
- }
1385
- applyResponse(response) {
1386
- // Build property maps first so column defs can include the propertyKey
1387
- // mapping (normalizedKey → catalog key) needed for row value lookup.
1388
- const propertyByKey = new Map();
1389
- const propertyByNormalizedKey = new Map();
1390
- for (const property of response.catalog?.properties ?? []) {
1391
- propertyByKey.set(property.key, property);
1392
- propertyByNormalizedKey.set(property.normalizedKey, property);
1393
- }
1394
- const columns = (response.projectionMeta?.columns ?? [])
1395
- .filter((column) => column.visible)
1396
- .sort((a, b) => a.order - b.order)
1397
- .map((column) => ({
1398
- key: column.key,
1399
- label: column.label,
1400
- type: 'entity',
1401
- sortable: !UNSORTABLE_ENTITY_VIEW_TYPES.has(column.viewType),
1402
- viewType: column.viewType,
1403
- order: column.order,
1404
- visible: column.visible,
1405
- configuration: column.configuration ?? null,
1406
- // Store the catalog property key so buildRow can look up form values
1407
- // keyed by property key (e.g. "task_name") rather than the
1408
- // normalizedKey used as the column display key (e.g. "Name").
1409
- propertyKey: propertyByNormalizedKey.get(column.key)?.key ?? column.key,
1410
- }));
1411
- this.columns.set(columns);
1412
- // Reading blocked (access = Write / None): keep the columns, drop records.
1413
- if (!this.canRead()) {
1414
- this.rows.set([]);
1415
- return;
1416
- }
1417
- const rows = (response.records ?? []).map((record) => {
1418
- const values = {};
1419
- const row = {
1420
- Id: record.id,
1421
- [ROW_ID_KEY]: `entity-${record.id}`,
1422
- [ROW_ENTITY_ID_KEY]: record.id,
1423
- };
1424
- for (const column of columns) {
1425
- const property = propertyByKey.get(column.key) ??
1426
- propertyByNormalizedKey.get(column.key);
1427
- const propertyKey = property?.key ?? column.key;
1428
- const cell = record.values?.[propertyKey];
1429
- row[column.key] = this.toEntityData(column, cell, property, record.id);
1430
- // Keep the machine-readable value so the edit dialog can pre-fill and
1431
- // partial updates can be diffed against it.
1432
- values[propertyKey] = cell?.raw ?? cell?.value ?? null;
1433
- }
1434
- row[ROW_VALUES_KEY] = values;
1435
- return row;
1436
- });
1437
- this.rows.set(rows);
1438
- }
1439
- toEntityData(column, cell, property, recordId) {
1440
- return {
1441
- id: recordId,
1442
- propertyId: property?.id,
1443
- key: property?.key ?? column.key,
1444
- normalizedKey: property?.normalizedKey ?? column.key,
1445
- name: column.label ?? property?.label ?? column.key,
1446
- rawValue: cell?.raw === null || cell?.raw === undefined
1447
- ? undefined
1448
- : String(cell.raw),
1449
- value: (cell?.value ?? ''),
1450
- viewType: (column.viewType ?? 'Text'),
1451
- type: property?.source,
1452
- order: column.order ?? property?.order,
1453
- configuration: column.configuration,
1454
- propertyConfiguration: property?.configuration ?? undefined,
1455
- comparison: cell?.comparison,
1456
- };
1457
- }
1458
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityListField, deps: [], target: i0.ɵɵFactoryTarget.Component });
1459
- 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"] }, { 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", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy", "sortField", "sortDirection"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "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"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1460
- }
1461
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityListField, decorators: [{
1462
- type: Component,
1463
- args: [{ selector: 'mt-entity-list-field', standalone: true, imports: [
1464
- CommonModule,
1465
- FieldValidation,
1466
- Skeleton,
1467
- Message,
1468
- Table,
1469
- Button,
1470
- TranslocoPipe,
1471
- ], 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"] }]
1472
- }], 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 }] }] } });
1473
-
1474
- /** Page size when loading the full deliverable list, and a hard safety cap. */
1475
- const PAGE_SIZE = 100;
1476
- const MAX_ITEMS = 5000;
1477
- /**
1478
- * Runtime picker for `ScheduleItemSelector` properties.
1479
- *
1480
- * Backend-filtered: the full option list comes from
1481
- * `GET forms/options/{propertyKey}` (which applies the configured rule, e.g.
1482
- * `DeliverableAcceptance.AvailableDeliverables`). All available items are
1483
- * loaded up front and rendered with the standard `mt-select-field` /
1484
- * `mt-multi-select-field`; the field shows only the item name.
1485
- *
1486
- * The control value is always a numeric id array (`valueMode = "IdArray"`).
1487
- * In `Single` mode only one id may be selected.
1488
- */
1489
- class ScheduleItemSelectorField {
1490
- label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
1491
- placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
1492
- readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
1493
- required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
1494
- propertyKey = input('', ...(ngDevMode ? [{ debugName: "propertyKey" }] : /* istanbul ignore next */ []));
1495
- selectionMode = input('Multi', ...(ngDevMode ? [{ debugName: "selectionMode" }] : /* istanbul ignore next */ []));
1496
- runtimeContext = input(null, ...(ngDevMode ? [{ debugName: "runtimeContext" }] : /* istanbul ignore next */ []));
1497
- context = input(undefined, ...(ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []));
1498
- /** Full list of available deliverables (loaded once). */
1499
- options = signal([], ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
1500
- loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
1501
- disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
1502
- /** Selected ids — the control value (`number[]`). */
1503
- value = signal([], ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
1504
- isMultiple = computed(() => this.selectionMode() !== 'Single', ...(ngDevMode ? [{ debugName: "isMultiple" }] : /* istanbul ignore next */ []));
1505
- /** Single-mode ngModel value (a scalar id, not an array). */
1506
- singleValue = computed(() => this.value()[0] ?? null, ...(ngDevMode ? [{ debugName: "singleValue" }] : /* istanbul ignore next */ []));
1507
- ngControl = null;
1508
- onTouched = () => { };
1509
- onModelChange = () => { };
1510
- http = inject(HttpClient);
1511
- destroyRef = inject(DestroyRef);
1512
- /** Query signature already loaded — prevents duplicate full loads. */
1513
- loadedKey = null;
1514
- constructor() {
1515
- this.ngControl = inject(NgControl, { self: true, optional: true });
1516
- if (this.ngControl) {
1517
- this.ngControl.valueAccessor = this;
1518
- }
1519
- effect(() => {
1520
- if (this.ngControl?.control && this.required()) {
1521
- this.ngControl.control.addValidators(Validators.required);
1522
- this.ngControl.control.updateValueAndValidity();
1523
- }
1524
- });
1525
- // Load the full option list as soon as the query context is available.
1526
- effect(() => {
1527
- const key = this.queryKey();
1528
- if (!key || this.loadedKey === key)
1529
- return;
1530
- untracked(() => this.loadAllOptions(key));
1531
- });
1532
- }
1533
- // ── Selection ──────────────────────────────────────────────────────────
1534
- onMultiChange(ids) {
1535
- this.value.set(ids ?? []);
1536
- this.emit();
1537
- }
1538
- onSingleChange(id) {
1539
- this.value.set(id == null ? [] : [id]);
1540
- this.emit();
1541
- }
1542
- // ── ControlValueAccessor ────────────────────────────────────────────────
1543
- writeValue(value) {
1544
- this.value.set(this.normalizeIds(value));
1545
- }
1546
- registerOnChange(fn) {
1547
- this.onModelChange = fn;
1548
- }
1549
- registerOnTouched(fn) {
1550
- this.onTouched = fn;
1551
- }
1552
- setDisabledState(disabled) {
1553
- this.disabled.set(disabled);
1554
- }
1555
- // ── Option loading ──────────────────────────────────────────────────────
1556
- loadAllOptions(key) {
1557
- this.loadedKey = key;
1558
- this.loading.set(true);
1559
- this.fetchPage(0)
1560
- .pipe(expand((page) => page.hasMore && page.nextSkip < MAX_ITEMS
1561
- ? this.fetchPage(page.nextSkip)
1562
- : EMPTY), reduce((acc, page) => acc.concat(page.options), []), takeUntilDestroyed(this.destroyRef), finalize(() => this.loading.set(false)), catchError(() => of([])))
1563
- .subscribe((options) => this.options.set(options));
1564
- }
1565
- fetchPage(skip) {
1566
- const params = this.buildParams(skip);
1567
- if (!params) {
1568
- return of({ options: [], hasMore: false, nextSkip: skip });
1569
- }
1570
- return this.http
1571
- .get(`forms/options/${encodeURIComponent(this.propertyKey())}`, { params, context: this.context() })
1572
- .pipe(map((response) => ({
1573
- options: this.mapOptions(response),
1574
- hasMore: !!response?.data?.hasMore,
1575
- nextSkip: skip + PAGE_SIZE,
1576
- })));
1577
- }
1578
- buildParams(skip) {
1579
- const contextKey = this.buildContextKey();
1580
- const levelDataId = this.runtimeContext()?.levelDataId;
1581
- if (!contextKey || levelDataId == null)
1582
- return null;
1583
- let params = new HttpParams()
1584
- .set('contextKey', contextKey)
1585
- .set('levelDataId', String(levelDataId))
1586
- .set('skip', String(skip))
1587
- .set('take', String(PAGE_SIZE));
1588
- const ownerRecordId = this.runtimeContext()?.ownerRecordId;
1589
- if (ownerRecordId != null) {
1590
- params = params.set('ownerRecordId', String(ownerRecordId));
1591
- }
1592
- return params;
1593
- }
1594
- mapOptions(response) {
1595
- const items = response?.data?.items ?? [];
1596
- return items
1597
- .map((item) => {
1598
- const id = Number(item.key);
1599
- if (!Number.isFinite(id))
1600
- return null;
1601
- return { label: item.name || String(id), value: id };
1602
- })
1603
- .filter((option) => option != null);
1604
- }
1605
- // ── Context helpers ─────────────────────────────────────────────────────
1606
- buildContextKey() {
1607
- const levelId = this.runtimeContext()?.levelId;
1608
- const moduleId = this.runtimeContext()?.moduleId;
1609
- if (levelId == null || moduleId == null)
1610
- return null;
1611
- return `Level:${levelId}/Module:${moduleId}`;
1612
- }
1613
- queryKey() {
1614
- const contextKey = this.buildContextKey();
1615
- const levelDataId = this.runtimeContext()?.levelDataId;
1616
- const propertyKey = this.propertyKey();
1617
- if (!contextKey || levelDataId == null || !propertyKey)
1618
- return null;
1619
- const ownerRecordId = this.runtimeContext()?.ownerRecordId ?? '';
1620
- return `${contextKey}|${levelDataId}|${ownerRecordId}|${propertyKey}`;
1621
- }
1622
- emit() {
1623
- this.onModelChange(this.value());
1624
- this.onTouched();
1625
- }
1626
- normalizeIds(value) {
1627
- const raw = Array.isArray(value) ? value : value == null ? [] : [value];
1628
- const ids = [];
1629
- for (const entry of raw) {
1630
- const id = entry && typeof entry === 'object'
1631
- ? Number(entry.id)
1632
- : Number(entry);
1633
- if (Number.isFinite(id) && id > 0 && !ids.includes(id)) {
1634
- ids.push(id);
1635
- }
1636
- }
1637
- return ids;
1638
- }
1639
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ScheduleItemSelectorField, deps: [], target: i0.ɵɵFactoryTarget.Component });
1640
- 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()) {\n <mt-multi-select-field\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [options]=\"options()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [filter]=\"options().length > 10\"\n [showClear]=\"!required()\"\n [required]=\"required()\"\n [readonly]=\"readonly() || disabled()\"\n [ngModel]=\"value()\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"onMultiChange($event)\"\n />\n} @else {\n <mt-select-field\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [options]=\"options()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [filter]=\"options().length > 10\"\n [showClear]=\"!required()\"\n [loading]=\"loading()\"\n [required]=\"required()\"\n [readonly]=\"readonly() || disabled()\"\n [ngModel]=\"singleValue()\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"onSingleChange($event)\"\n />\n}\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 });
1641
- }
1642
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ScheduleItemSelectorField, decorators: [{
1643
- type: Component,
1644
- args: [{ selector: 'mt-schedule-item-selector-field', standalone: true, imports: [FormsModule, MultiSelectField, SelectField], changeDetection: ChangeDetectionStrategy.OnPush, host: {
1645
- class: 'block',
1646
- }, template: "@if (isMultiple()) {\n <mt-multi-select-field\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [options]=\"options()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [filter]=\"options().length > 10\"\n [showClear]=\"!required()\"\n [required]=\"required()\"\n [readonly]=\"readonly() || disabled()\"\n [ngModel]=\"value()\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"onMultiChange($event)\"\n />\n} @else {\n <mt-select-field\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [options]=\"options()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [filter]=\"options().length > 10\"\n [showClear]=\"!required()\"\n [loading]=\"loading()\"\n [required]=\"required()\"\n [readonly]=\"readonly() || disabled()\"\n [ngModel]=\"singleValue()\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"onSingleChange($event)\"\n />\n}\n" }]
1647
- }], 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 }] }] } });
1648
-
1649
- /**
1650
- * Token used by `mt-lookup-module-check-list-field` to render the checklist
1651
- * sections + per-section forms via `@masterteam/forms`'s `mt-client-form`
1652
- * machinery (`/api/process-form-load`, loaded once). Apps register it with
1653
- * `provideLookupModuleCheckListForm()` from
1654
- * `@masterteam/forms/lookup-module-check-list-form`. When the token is not
1655
- * registered, the field falls back to plain text inputs per property.
1656
- */
1657
- const LOOKUP_CHECK_LIST_FORM_COMPONENT = new InjectionToken('LOOKUP_CHECK_LIST_FORM_COMPONENT');
1658
-
1659
- class LookupModuleCheckListField {
1660
- label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
1661
- readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
1662
- required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
1663
- /** Lookup items rendered as collapsible checklist sections. */
1664
- lookupOptions = input([], ...(ngDevMode ? [{ debugName: "lookupOptions" }] : /* istanbul ignore next */ []));
1665
- /** Full lookup catalog passed to the rich nested form renderer. */
1666
- lookups = input([], ...(ngDevMode ? [{ debugName: "lookups" }] : /* istanbul ignore next */ []));
1667
- /** Module property keys/labels (used by the text fallback + labels). */
1668
- propertyFields = input([], ...(ngDevMode ? [{ debugName: "propertyFields" }] : /* istanbul ignore next */ []));
1669
- /** Scope module id whose form is loaded for each section. */
1670
- scopeId = input(null, ...(ngDevMode ? [{ debugName: "scopeId" }] : /* istanbul ignore next */ []));
1671
- /** Property keys to render in each section form. */
1672
- propertyKeys = input([], ...(ngDevMode ? [{ debugName: "propertyKeys" }] : /* istanbul ignore next */ []));
1673
- /** Runtime ids needed to load each section form. */
1674
- runtimeContext = input(null, ...(ngDevMode ? [{ debugName: "runtimeContext" }] : /* istanbul ignore next */ []));
1675
- /** Per-lookupKey captured values, keyed by property key. */
1676
- sectionValues = signal({}, ...(ngDevMode ? [{ debugName: "sectionValues" }] : /* istanbul ignore next */ []));
1677
- expandedKeys = signal(new Set(), ...(ngDevMode ? [{ debugName: "expandedKeys" }] : /* istanbul ignore next */ []));
1678
- disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
1679
- /** True when a section's required inner fields are unfilled. */
1680
- incomplete = signal(false, ...(ngDevMode ? [{ debugName: "incomplete" }] : /* istanbul ignore next */ []));
1681
- ngControl = null;
1682
- /**
1683
- * Rich checklist form provided by `@masterteam/forms`
1684
- * (`provideLookupModuleCheckListForm()`). When absent the field falls back to
1685
- * plain text inputs per property.
1686
- */
1687
- formComponent = inject(LOOKUP_CHECK_LIST_FORM_COMPONENT, {
1688
- optional: true,
1689
- });
1690
- isReadonly = computed(() => this.readonly() || this.disabled(), ...(ngDevMode ? [{ debugName: "isReadonly" }] : /* istanbul ignore next */ []));
1691
- sections = computed(() => this.lookupOptions().map((option) => ({
1692
- lookupKey: String(option.value ?? option.key ?? ''),
1693
- label: option.label ?? String(option.value ?? option.key ?? ''),
1694
- })), ...(ngDevMode ? [{ debugName: "sections" }] : /* istanbul ignore next */ []));
1695
- /**
1696
- * Use the rich form whenever it's registered and a scope module is set. The
1697
- * scope form only needs `scopeId` to load its field definitions; `levelId` /
1698
- * `levelDataId` are passed when available but are not required (e.g. they are
1699
- * null while creating a brand-new Level instance).
1700
- */
1701
- useRichForm = computed(() => !!this.formComponent && this.scopeId() != null, ...(ngDevMode ? [{ debugName: "useRichForm" }] : /* istanbul ignore next */ []));
1702
- /**
1703
- * The last externally-written value (via `writeValue`). Passed to the rich
1704
- * form as its initial value. It is intentionally NOT updated from the form's
1705
- * own `valueChange` — feeding emitted values back as an input would create an
1706
- * infinite change-detection loop.
1707
- */
1708
- incomingValue = signal(null, ...(ngDevMode ? [{ debugName: "incomingValue" }] : /* istanbul ignore next */ []));
1709
- onTouched = () => { };
1710
- onModelChange = () => { };
1711
- control = null;
1712
- validatorAttached = false;
1713
- /**
1714
- * Validator attached imperatively to the host control. Attaching it here
1715
- * (rather than via an `NG_VALIDATORS` provider) avoids a circular dependency
1716
- * with the self-injected `NgControl` used as the value accessor.
1717
- */
1718
- checklistValidator = () => this.incomplete() ? { checklistIncomplete: true } : null;
1719
- /** Stable callbacks so the outlet inputs object stays referentially calm. */
1720
- emitValue = (value) => {
1721
- // The rich form is the source of truth; forward its value without writing
1722
- // back into `incomingValue` (which would re-feed the form and loop).
1723
- this.onModelChange(value ?? null);
1724
- this.onTouched();
1725
- };
1726
- emitValidity = (invalid) => {
1727
- if (this.incomplete() === invalid)
1728
- return;
1729
- this.incomplete.set(invalid);
1730
- this.ensureValidator();
1731
- this.control?.updateValueAndValidity({ emitEvent: false });
1732
- };
1733
- constructor() {
1734
- this.ngControl = inject(NgControl, { self: true, optional: true });
1735
- if (this.ngControl) {
1736
- this.ngControl.valueAccessor = this;
1737
- }
1738
- }
1739
- ngOnInit() {
1740
- this.ensureValidator();
1741
- this.control?.updateValueAndValidity({ emitEvent: false });
1742
- }
1743
- ensureValidator() {
1744
- if (this.validatorAttached)
1745
- return;
1746
- const control = this.ngControl?.control;
1747
- if (!control)
1748
- return;
1749
- this.control = control;
1750
- control.addValidators(this.checklistValidator);
1751
- this.validatorAttached = true;
1752
- }
1753
- // ============================================================================
1754
- // CVA
1755
- // ============================================================================
1756
- writeValue(value) {
1757
- this.incomingValue.set(value);
1758
- this.sectionValues.set(this.normalizeIncoming(value));
1759
- }
1760
- registerOnChange(fn) {
1761
- this.onModelChange = fn;
1762
- }
1763
- registerOnTouched(fn) {
1764
- this.onTouched = fn;
1765
- }
1766
- setDisabledState(isDisabled) {
1767
- this.disabled.set(isDisabled);
1768
- }
1769
- // ============================================================================
1770
- // Rich form host
1771
- // ============================================================================
1772
- formInputs = computed(() => ({
1773
- lookupOptions: this.lookupOptions(),
1774
- lookups: this.lookups(),
1775
- propertyKeys: this.propertyKeys(),
1776
- moduleId: this.scopeId(),
1777
- levelId: this.runtimeContext()?.levelId ?? null,
1778
- levelDataId: this.runtimeContext()?.levelDataId ?? null,
1779
- value: this.incomingValue(),
1780
- readonly: this.isReadonly(),
1781
- valueChange: this.emitValue,
1782
- validityChange: this.emitValidity,
1783
- }), ...(ngDevMode ? [{ debugName: "formInputs" }] : /* istanbul ignore next */ []));
1784
- // ============================================================================
1785
- // Text fallback (no rich form registered)
1786
- // ============================================================================
1787
- isExpanded(lookupKey) {
1788
- return this.expandedKeys().has(lookupKey);
1789
- }
1790
- toggle(lookupKey) {
1791
- const next = new Set(this.expandedKeys());
1792
- if (next.has(lookupKey)) {
1793
- next.delete(lookupKey);
1794
- }
1795
- else {
1796
- next.add(lookupKey);
1797
- }
1798
- this.expandedKeys.set(next);
1799
- }
1800
- hasValues(lookupKey) {
1801
- const values = this.sectionValues()[lookupKey];
1802
- if (!values)
1803
- return false;
1804
- return Object.values(values).some((v) => v != null && v !== '');
1805
- }
1806
- fieldValue(lookupKey, propKey) {
1807
- const raw = this.sectionValues()[lookupKey]?.[propKey];
1808
- return raw == null ? '' : String(raw);
1809
- }
1810
- setFieldValue(lookupKey, propKey, value) {
1811
- this.sectionValues.update((current) => ({
1812
- ...current,
1813
- [lookupKey]: { ...(current[lookupKey] ?? {}), [propKey]: value },
1814
- }));
1815
- this.pushModelValue();
1816
- }
1817
- // ============================================================================
1818
- // Value mapping
1819
- // ============================================================================
1820
- pushModelValue() {
1821
- const payload = this.buildPayload();
1822
- this.onModelChange(payload.length ? payload : null);
1823
- this.onTouched();
1824
- }
1825
- buildPayload() {
1826
- const keys = this.propertyKeys();
1827
- const values = this.sectionValues();
1828
- return this.sections()
1829
- .filter((section) => this.hasValues(section.lookupKey))
1830
- .map((section) => ({
1831
- lookupKey: section.lookupKey,
1832
- props: keys.map((key) => ({
1833
- key,
1834
- value: values[section.lookupKey]?.[key] ?? null,
1835
- })),
1836
- }));
1837
- }
1838
- normalizeIncoming(value) {
1839
- const raw = this.extractEntries(value);
1840
- const result = {};
1841
- for (const entry of raw) {
1842
- if (!entry || typeof entry !== 'object')
1843
- continue;
1844
- const record = entry;
1845
- const lookupKeyRaw = record['lookupKey'] ?? record['Lookupkey'] ?? record['lookupkey'];
1846
- const lookupKey = lookupKeyRaw == null ? '' : String(lookupKeyRaw);
1847
- if (!lookupKey)
1848
- continue;
1849
- const propsRaw = record['props'] ?? record['Props'];
1850
- const values = {};
1851
- if (Array.isArray(propsRaw)) {
1852
- for (const prop of propsRaw) {
1853
- const propRecord = (prop ?? {});
1854
- const key = String(propRecord['key'] ?? propRecord['Key'] ?? '');
1855
- if (!key)
1856
- continue;
1857
- values[key] = propRecord['value'] ?? propRecord['Value'] ?? null;
1858
- }
1859
- }
1860
- result[lookupKey] = values;
1861
- }
1862
- return result;
1863
- }
1864
- extractEntries(value) {
1865
- if (Array.isArray(value)) {
1866
- return value;
1867
- }
1868
- const wrapped = value?.items;
1869
- if (Array.isArray(wrapped)) {
1870
- return wrapped;
1871
- }
1872
- if (typeof value === 'string' && value.trim()) {
1873
- try {
1874
- return this.extractEntries(JSON.parse(value));
1875
- }
1876
- catch {
1877
- return [];
1878
- }
1879
- }
1880
- return [];
1881
- }
1882
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LookupModuleCheckListField, deps: [], target: i0.ɵɵFactoryTarget.Component });
1883
- 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\">\n @if (label()) {\n <label class=\"font-medium text-color\">\n {{ label() }}\n @if (required()) {\n <span class=\"text-red-500\">*</span>\n }\n </label>\n }\n\n @if (useRichForm()) {\n <ng-container\n [ngComponentOutlet]=\"formComponent!\"\n [ngComponentOutletInputs]=\"formInputs()\"\n />\n } @else if (sections().length) {\n <!-- Fallback: plain text inputs per property (no rich form registered) -->\n <div class=\"flex flex-col gap-2\">\n @for (section of sections(); track section.lookupKey) {\n <div class=\"overflow-hidden rounded-lg border border-surface-200\">\n <button\n type=\"button\"\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\"\n [attr.aria-expanded]=\"isExpanded(section.lookupKey)\"\n (click)=\"toggle(section.lookupKey)\"\n >\n <span class=\"flex min-w-0 items-center gap-2\">\n <mt-icon\n [icon]=\"\n isExpanded(section.lookupKey)\n ? 'arrow.chevron-down'\n : 'arrow.chevron-right'\n \"\n size=\"sm\"\n class=\"shrink-0 text-muted-color rtl:-scale-x-100\"\n />\n <span class=\"truncate text-sm font-medium text-color\">\n {{ section.label }}\n </span>\n </span>\n @if (hasValues(section.lookupKey)) {\n <span\n class=\"shrink-0 rounded-full bg-primary-50 px-2 py-0.5 text-xs font-semibold text-primary-700\"\n >\n {{ \"components.lookupModuleCheckListField.filled\" | transloco }}\n </span>\n }\n </button>\n\n @if (isExpanded(section.lookupKey) && propertyFields().length) {\n <div class=\"border-t border-surface-200 p-3\">\n <div class=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n @for (field of propertyFields(); track field.key) {\n <label class=\"flex min-w-0 flex-col gap-1\">\n <span class=\"truncate text-xs text-muted-color\">\n {{ field.label }}\n </span>\n @if (isReadonly()) {\n <span class=\"truncate text-sm text-color\">\n {{ fieldValue(section.lookupKey, field.key) || \"_\" }}\n </span>\n } @else {\n <input\n pInputText\n class=\"w-full\"\n [ngModel]=\"fieldValue(section.lookupKey, field.key)\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"\n setFieldValue(section.lookupKey, field.key, $event)\n \"\n />\n }\n </label>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n } @else {\n <div\n class=\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\"\n >\n {{ \"components.lookupModuleCheckListField.empty\" | transloco }}\n </div>\n }\n\n @if (ngControl?.control) {\n <mt-field-validation\n [control]=\"ngControl?.control!\"\n [touched]=\"ngControl?.touched ?? false\"\n />\n }\n</div>\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"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1884
- }
1885
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LookupModuleCheckListField, decorators: [{
1886
- type: Component,
1887
- args: [{ selector: 'mt-lookup-module-check-list-field', standalone: true, imports: [
1888
- FormsModule,
1889
- NgComponentOutlet,
1890
- InputTextModule,
1891
- Icon,
1892
- FieldValidation,
1893
- TranslocoPipe,
1894
- ], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'grid gap-2' }, template: "<div class=\"flex flex-col gap-2\">\n @if (label()) {\n <label class=\"font-medium text-color\">\n {{ label() }}\n @if (required()) {\n <span class=\"text-red-500\">*</span>\n }\n </label>\n }\n\n @if (useRichForm()) {\n <ng-container\n [ngComponentOutlet]=\"formComponent!\"\n [ngComponentOutletInputs]=\"formInputs()\"\n />\n } @else if (sections().length) {\n <!-- Fallback: plain text inputs per property (no rich form registered) -->\n <div class=\"flex flex-col gap-2\">\n @for (section of sections(); track section.lookupKey) {\n <div class=\"overflow-hidden rounded-lg border border-surface-200\">\n <button\n type=\"button\"\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\"\n [attr.aria-expanded]=\"isExpanded(section.lookupKey)\"\n (click)=\"toggle(section.lookupKey)\"\n >\n <span class=\"flex min-w-0 items-center gap-2\">\n <mt-icon\n [icon]=\"\n isExpanded(section.lookupKey)\n ? 'arrow.chevron-down'\n : 'arrow.chevron-right'\n \"\n size=\"sm\"\n class=\"shrink-0 text-muted-color rtl:-scale-x-100\"\n />\n <span class=\"truncate text-sm font-medium text-color\">\n {{ section.label }}\n </span>\n </span>\n @if (hasValues(section.lookupKey)) {\n <span\n class=\"shrink-0 rounded-full bg-primary-50 px-2 py-0.5 text-xs font-semibold text-primary-700\"\n >\n {{ \"components.lookupModuleCheckListField.filled\" | transloco }}\n </span>\n }\n </button>\n\n @if (isExpanded(section.lookupKey) && propertyFields().length) {\n <div class=\"border-t border-surface-200 p-3\">\n <div class=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n @for (field of propertyFields(); track field.key) {\n <label class=\"flex min-w-0 flex-col gap-1\">\n <span class=\"truncate text-xs text-muted-color\">\n {{ field.label }}\n </span>\n @if (isReadonly()) {\n <span class=\"truncate text-sm text-color\">\n {{ fieldValue(section.lookupKey, field.key) || \"_\" }}\n </span>\n } @else {\n <input\n pInputText\n class=\"w-full\"\n [ngModel]=\"fieldValue(section.lookupKey, field.key)\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"\n setFieldValue(section.lookupKey, field.key, $event)\n \"\n />\n }\n </label>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n } @else {\n <div\n class=\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\"\n >\n {{ \"components.lookupModuleCheckListField.empty\" | transloco }}\n </div>\n }\n\n @if (ngControl?.control) {\n <mt-field-validation\n [control]=\"ngControl?.control!\"\n [touched]=\"ngControl?.touched ?? false\"\n />\n }\n</div>\n" }]
1895
- }], 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 }] }] } });
1896
-
1897
- /**
1898
- * Generated bundle index. Do not edit.
1899
- */
1900
-
1901
- export { ENTITY_LIST_ADD_DIALOG_COMPONENT, EntityListField, LOOKUP_CHECK_LIST_FORM_COMPONENT, LookupMatrixField, LookupModuleCheckListField, ScheduleItemSelectorField, SchedulePredecessorField, SchemaConnectionField };
1902
- //# sourceMappingURL=masterteam-components-business-fields.mjs.map