@masterteam/components 0.0.265 → 0.0.267

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 (756) hide show
  1. package/assets/common.css +2 -309
  2. package/fesm2022/masterteam-components-avatar-text.mjs +46 -0
  3. package/fesm2022/masterteam-components-avatar-text.mjs.map +1 -0
  4. package/fesm2022/masterteam-components-avatar.mjs +50 -0
  5. package/fesm2022/masterteam-components-avatar.mjs.map +1 -0
  6. package/fesm2022/masterteam-components-breadcrumb.mjs +27 -0
  7. package/fesm2022/masterteam-components-breadcrumb.mjs.map +1 -0
  8. package/fesm2022/masterteam-components-business-fields.mjs +1907 -0
  9. package/fesm2022/masterteam-components-business-fields.mjs.map +1 -0
  10. package/fesm2022/masterteam-components-button-group.mjs +20 -0
  11. package/fesm2022/masterteam-components-button-group.mjs.map +1 -0
  12. package/fesm2022/masterteam-components-button.mjs +82 -0
  13. package/fesm2022/masterteam-components-button.mjs.map +1 -0
  14. package/fesm2022/masterteam-components-card.mjs +28 -0
  15. package/fesm2022/masterteam-components-card.mjs.map +1 -0
  16. package/fesm2022/masterteam-components-checkbox-field.mjs +92 -0
  17. package/fesm2022/masterteam-components-checkbox-field.mjs.map +1 -0
  18. package/fesm2022/masterteam-components-chip.mjs +39 -0
  19. package/fesm2022/masterteam-components-chip.mjs.map +1 -0
  20. package/fesm2022/masterteam-components-client-page-menu.mjs +153 -0
  21. package/fesm2022/masterteam-components-client-page-menu.mjs.map +1 -0
  22. package/fesm2022/masterteam-components-client-page.mjs +413 -0
  23. package/fesm2022/masterteam-components-client-page.mjs.map +1 -0
  24. package/fesm2022/masterteam-components-color-picker-field.mjs +106 -0
  25. package/fesm2022/masterteam-components-color-picker-field.mjs.map +1 -0
  26. package/fesm2022/masterteam-components-confirmation.mjs +98 -0
  27. package/fesm2022/masterteam-components-confirmation.mjs.map +1 -0
  28. package/fesm2022/masterteam-components-date-field.mjs +158 -0
  29. package/fesm2022/masterteam-components-date-field.mjs.map +1 -0
  30. package/fesm2022/masterteam-components-dialog.mjs +33 -0
  31. package/fesm2022/masterteam-components-dialog.mjs.map +1 -0
  32. package/fesm2022/masterteam-components-drawer.mjs +268 -0
  33. package/fesm2022/masterteam-components-drawer.mjs.map +1 -0
  34. package/fesm2022/masterteam-components-dynamic-drawer.mjs +608 -0
  35. package/fesm2022/masterteam-components-dynamic-drawer.mjs.map +1 -0
  36. package/fesm2022/masterteam-components-editor-field.mjs +103 -0
  37. package/fesm2022/masterteam-components-editor-field.mjs.map +1 -0
  38. package/fesm2022/masterteam-components-empty-state.mjs +53 -0
  39. package/fesm2022/masterteam-components-empty-state.mjs.map +1 -0
  40. package/fesm2022/masterteam-components-entities.mjs +2242 -0
  41. package/fesm2022/masterteam-components-entities.mjs.map +1 -0
  42. package/fesm2022/masterteam-components-field-validation.mjs +237 -0
  43. package/fesm2022/masterteam-components-field-validation.mjs.map +1 -0
  44. package/fesm2022/masterteam-components-formula.mjs +3848 -0
  45. package/fesm2022/masterteam-components-formula.mjs.map +1 -0
  46. package/fesm2022/masterteam-components-icon-field.mjs +158 -0
  47. package/fesm2022/masterteam-components-icon-field.mjs.map +1 -0
  48. package/fesm2022/masterteam-components-list.mjs +31 -0
  49. package/fesm2022/masterteam-components-list.mjs.map +1 -0
  50. package/fesm2022/masterteam-components-location-field.mjs +607 -0
  51. package/fesm2022/masterteam-components-location-field.mjs.map +1 -0
  52. package/fesm2022/masterteam-components-menu.mjs +135 -0
  53. package/fesm2022/masterteam-components-menu.mjs.map +1 -0
  54. package/fesm2022/masterteam-components-modal.mjs +108 -0
  55. package/fesm2022/masterteam-components-modal.mjs.map +1 -0
  56. package/fesm2022/masterteam-components-module-summary-card.mjs +34 -0
  57. package/fesm2022/masterteam-components-module-summary-card.mjs.map +1 -0
  58. package/fesm2022/masterteam-components-multi-select-field.mjs +321 -0
  59. package/fesm2022/masterteam-components-multi-select-field.mjs.map +1 -0
  60. package/fesm2022/masterteam-components-number-field.mjs +102 -0
  61. package/fesm2022/masterteam-components-number-field.mjs.map +1 -0
  62. package/fesm2022/masterteam-components-page-header.mjs +42 -0
  63. package/fesm2022/masterteam-components-page-header.mjs.map +1 -0
  64. package/fesm2022/masterteam-components-page.mjs +35 -0
  65. package/fesm2022/masterteam-components-page.mjs.map +1 -0
  66. package/fesm2022/masterteam-components-paginator.mjs +43 -0
  67. package/fesm2022/masterteam-components-paginator.mjs.map +1 -0
  68. package/fesm2022/masterteam-components-pick-list-field.mjs +210 -0
  69. package/fesm2022/masterteam-components-pick-list-field.mjs.map +1 -0
  70. package/fesm2022/masterteam-components-progress.mjs +63 -0
  71. package/fesm2022/masterteam-components-progress.mjs.map +1 -0
  72. package/fesm2022/masterteam-components-property-filter-builder.mjs +386 -0
  73. package/fesm2022/masterteam-components-property-filter-builder.mjs.map +1 -0
  74. package/fesm2022/masterteam-components-radio-button-field.mjs +85 -0
  75. package/fesm2022/masterteam-components-radio-button-field.mjs.map +1 -0
  76. package/fesm2022/masterteam-components-radio-cards-field.mjs +131 -0
  77. package/fesm2022/masterteam-components-radio-cards-field.mjs.map +1 -0
  78. package/fesm2022/masterteam-components-radio-cards.mjs +74 -0
  79. package/fesm2022/masterteam-components-radio-cards.mjs.map +1 -0
  80. package/fesm2022/masterteam-components-runtime-action.mjs +406 -0
  81. package/fesm2022/masterteam-components-runtime-action.mjs.map +1 -0
  82. package/fesm2022/masterteam-components-select-field.mjs +415 -0
  83. package/fesm2022/masterteam-components-select-field.mjs.map +1 -0
  84. package/fesm2022/masterteam-components-sidebar.mjs +155 -0
  85. package/fesm2022/masterteam-components-sidebar.mjs.map +1 -0
  86. package/fesm2022/masterteam-components-slider-field.mjs +128 -0
  87. package/fesm2022/masterteam-components-slider-field.mjs.map +1 -0
  88. package/fesm2022/masterteam-components-statistic-card.mjs +42 -0
  89. package/fesm2022/masterteam-components-statistic-card.mjs.map +1 -0
  90. package/fesm2022/masterteam-components-table.mjs +3372 -0
  91. package/fesm2022/masterteam-components-table.mjs.map +1 -0
  92. package/fesm2022/masterteam-components-tabs.mjs +289 -0
  93. package/fesm2022/masterteam-components-tabs.mjs.map +1 -0
  94. package/fesm2022/masterteam-components-text-field.mjs +202 -0
  95. package/fesm2022/masterteam-components-text-field.mjs.map +1 -0
  96. package/fesm2022/masterteam-components-textarea-field.mjs +126 -0
  97. package/fesm2022/masterteam-components-textarea-field.mjs.map +1 -0
  98. package/fesm2022/masterteam-components-toast.mjs +80 -0
  99. package/fesm2022/masterteam-components-toast.mjs.map +1 -0
  100. package/fesm2022/masterteam-components-toggle-field.mjs +116 -0
  101. package/fesm2022/masterteam-components-toggle-field.mjs.map +1 -0
  102. package/fesm2022/masterteam-components-tooltip.mjs +147 -0
  103. package/fesm2022/masterteam-components-tooltip.mjs.map +1 -0
  104. package/fesm2022/masterteam-components-topbar.mjs +32 -0
  105. package/fesm2022/masterteam-components-topbar.mjs.map +1 -0
  106. package/fesm2022/masterteam-components-tree.mjs +260 -0
  107. package/fesm2022/masterteam-components-tree.mjs.map +1 -0
  108. package/fesm2022/masterteam-components-treeselect-field.mjs +265 -0
  109. package/fesm2022/masterteam-components-treeselect-field.mjs.map +1 -0
  110. package/fesm2022/masterteam-components-upload-field.mjs +846 -0
  111. package/fesm2022/masterteam-components-upload-field.mjs.map +1 -0
  112. package/fesm2022/masterteam-components-uploader.mjs +425 -0
  113. package/fesm2022/masterteam-components-uploader.mjs.map +1 -0
  114. package/fesm2022/masterteam-components-user-search-field.mjs +374 -0
  115. package/fesm2022/masterteam-components-user-search-field.mjs.map +1 -0
  116. package/fesm2022/masterteam-components.mjs +2536 -0
  117. package/fesm2022/masterteam-components.mjs.map +1 -0
  118. package/package.json +278 -54
  119. package/types/masterteam-components-avatar-text.d.ts +23 -0
  120. package/types/masterteam-components-avatar.d.ts +23 -0
  121. package/types/masterteam-components-breadcrumb.d.ts +18 -0
  122. package/types/masterteam-components-business-fields.d.ts +675 -0
  123. package/types/masterteam-components-button-group.d.ts +8 -0
  124. package/types/masterteam-components-button.d.ts +62 -0
  125. package/types/masterteam-components-card.d.ts +14 -0
  126. package/types/masterteam-components-checkbox-field.d.ts +38 -0
  127. package/types/masterteam-components-chip.d.ts +21 -0
  128. package/types/masterteam-components-client-page-menu.d.ts +55 -0
  129. package/types/masterteam-components-client-page.d.ts +115 -0
  130. package/types/masterteam-components-color-picker-field.d.ts +39 -0
  131. package/types/masterteam-components-confirmation.d.ts +41 -0
  132. package/types/masterteam-components-date-field.d.ts +57 -0
  133. package/types/masterteam-components-dialog.d.ts +12 -0
  134. package/types/masterteam-components-drawer.d.ts +62 -0
  135. package/types/masterteam-components-dynamic-drawer.d.ts +159 -0
  136. package/types/masterteam-components-editor-field.d.ts +39 -0
  137. package/types/masterteam-components-empty-state.d.ts +47 -0
  138. package/types/masterteam-components-entities.d.ts +1116 -0
  139. package/types/masterteam-components-field-validation.d.ts +59 -0
  140. package/types/masterteam-components-formula.d.ts +759 -0
  141. package/types/masterteam-components-icon-field.d.ts +44 -0
  142. package/types/masterteam-components-list.d.ts +18 -0
  143. package/types/masterteam-components-location-field.d.ts +173 -0
  144. package/types/masterteam-components-menu.d.ts +55 -0
  145. package/types/masterteam-components-modal.d.ts +30 -0
  146. package/types/masterteam-components-module-summary-card.d.ts +18 -0
  147. package/types/masterteam-components-multi-select-field.d.ts +104 -0
  148. package/types/masterteam-components-number-field.d.ts +47 -0
  149. package/types/masterteam-components-page-header.d.ts +30 -0
  150. package/types/masterteam-components-page.d.ts +26 -0
  151. package/types/masterteam-components-paginator.d.ts +20 -0
  152. package/types/masterteam-components-pick-list-field.d.ts +65 -0
  153. package/types/masterteam-components-progress.d.ts +30 -0
  154. package/types/masterteam-components-property-filter-builder.d.ts +90 -0
  155. package/types/masterteam-components-radio-button-field.d.ts +41 -0
  156. package/types/masterteam-components-radio-cards-field.d.ts +39 -0
  157. package/types/masterteam-components-radio-cards.d.ts +33 -0
  158. package/types/masterteam-components-runtime-action.d.ts +105 -0
  159. package/types/masterteam-components-select-field.d.ts +136 -0
  160. package/types/masterteam-components-sidebar.d.ts +71 -0
  161. package/types/masterteam-components-slider-field.d.ts +41 -0
  162. package/types/masterteam-components-statistic-card.d.ts +28 -0
  163. package/types/masterteam-components-table.d.ts +937 -0
  164. package/types/masterteam-components-tabs.d.ts +80 -0
  165. package/types/masterteam-components-text-field.d.ts +60 -0
  166. package/types/masterteam-components-textarea-field.d.ts +45 -0
  167. package/types/masterteam-components-toast.d.ts +27 -0
  168. package/types/masterteam-components-toggle-field.d.ts +44 -0
  169. package/types/masterteam-components-tooltip.d.ts +26 -0
  170. package/types/masterteam-components-topbar.d.ts +20 -0
  171. package/types/masterteam-components-tree.d.ts +106 -0
  172. package/types/masterteam-components-treeselect-field.d.ts +79 -0
  173. package/types/masterteam-components-upload-field.d.ts +112 -0
  174. package/types/masterteam-components-uploader.d.ts +53 -0
  175. package/types/masterteam-components-user-search-field.d.ts +110 -0
  176. package/types/masterteam-components.d.ts +1261 -0
  177. package/.angular/cache/21.2.7/@masterteam/components/.tsbuildinfo +0 -1
  178. package/.angular/cache/21.2.7/@masterteam/components/angular-compiler.db +0 -0
  179. package/.angular/cache/21.2.7/@masterteam/components/angular-compiler.db-lock +0 -0
  180. package/.angular/cache/21.2.7/ng-packagr/045efd332b9db1d21b3a595a37ae03ebb11b457a5dc6e2d1cbc561b694e17f1a +0 -1
  181. package/.angular/cache/21.2.7/ng-packagr/0727b170af3d53236c0cafe16ea670d089e48d4c5c525b1dbcc1c684bb6e99c7 +0 -1
  182. package/.angular/cache/21.2.7/ng-packagr/0873bc9048494ebc33fe0a7b856324c7c4ca681b0dcaa87338e3290186906d49 +0 -1
  183. package/.angular/cache/21.2.7/ng-packagr/1010cd8fc996d0c2df519ed60085f4b1f38ccfc873900055bc75fc20a3c26bab +0 -1
  184. package/.angular/cache/21.2.7/ng-packagr/12379a8ab7254ad3df2635823a358cfce32e6d0f390be68596cc97e02307e6c4 +0 -1
  185. package/.angular/cache/21.2.7/ng-packagr/1239e7a937657b62f858d17d47738ed30facbdaa91032511e29ed148b748400b +0 -1
  186. package/.angular/cache/21.2.7/ng-packagr/133b9ecf47ba424244902da90d77cd3f135b85f95c01b16de7b2247f57518f01 +0 -1
  187. package/.angular/cache/21.2.7/ng-packagr/175d45dc6da51834e7fe937c09d23dbf28d2a823f838ef5271fd3e148776d6ec +0 -1
  188. package/.angular/cache/21.2.7/ng-packagr/19d99ad4d927324b03cdbef34331ba2c58bd580f1f0ca591cb5f8dbf436c913c +0 -1
  189. package/.angular/cache/21.2.7/ng-packagr/1a86918763f95c1c2b9fa781bda1ceedf15aead87f0e11ea1324318af43a897a +0 -1
  190. package/.angular/cache/21.2.7/ng-packagr/1f08100dbc280be7da64c809315376eb7d0cfd074916a6042f609f03f4276a8e +0 -1
  191. package/.angular/cache/21.2.7/ng-packagr/2224877a7e762b86541428e4c40d61f54f505867c305769ae42e67e4aa81bd93 +0 -1
  192. package/.angular/cache/21.2.7/ng-packagr/24957fb7ec060692ebcf1471e1bdce39f40aed938959e580048ade58015762d2 +0 -1
  193. package/.angular/cache/21.2.7/ng-packagr/295fcdc1c4462e7feae96a24255369508a559faaecc4676267749a7ce23e4b6d +0 -1
  194. package/.angular/cache/21.2.7/ng-packagr/2b37e2f2d6564d10bad1fd0ecc16453962fd855cd1e36ad7aa24baf3e4f2e8b3 +0 -1
  195. package/.angular/cache/21.2.7/ng-packagr/2c20f0929771e857b570ba2beffe91f598f299ce26d4825fe4315bfe5a3dd40a +0 -1
  196. package/.angular/cache/21.2.7/ng-packagr/37dea2e5798cad4a21d66292eeed5be26d04500d9a1534332ad42ce664a058c2 +0 -1
  197. package/.angular/cache/21.2.7/ng-packagr/3b6239b640fcb5ea7067a2655a2901d32f55372812b586aa008e77c59e8f2090 +0 -1
  198. package/.angular/cache/21.2.7/ng-packagr/3beb1b4dfe75d1e6749cf91f05d51ba4eece939f5c15f6f33ed587bfd198f0a3 +0 -1
  199. package/.angular/cache/21.2.7/ng-packagr/3f161e6c2ead4519d0663dd79199dafceb2cc22da7ce92a72b809b93bfce0bb0 +0 -1
  200. package/.angular/cache/21.2.7/ng-packagr/43551862d17cd02626e18b30243390081a6247784485660048b060a3d4ab7fa7 +0 -1
  201. package/.angular/cache/21.2.7/ng-packagr/47aedf032519b41d96866fcf8fbd4f1dfd29f9e9a534b39dee0e44d402227d2d +0 -1
  202. package/.angular/cache/21.2.7/ng-packagr/4a1768888c60921955bfdfba8b31c8d853bd7b2a7d3a7b83934de049e1e6e6a2 +0 -1
  203. package/.angular/cache/21.2.7/ng-packagr/4a783e339117597607bff17eeca0ad24d84b8cbc1e28927e7e453ccfa6223180 +0 -1
  204. package/.angular/cache/21.2.7/ng-packagr/4d9331b2050326f586cd8f6593a9e04e1c7944b2f9e98023649023c099597a5d +0 -1
  205. package/.angular/cache/21.2.7/ng-packagr/4e379f506919d47af7008658c75242aa05f0056c1caec4061d7fa5746f776049 +0 -1
  206. package/.angular/cache/21.2.7/ng-packagr/55009bb7d44552dd816ce32fa2b0f7985f3f08fefd6409c2b4f6b9ffe35dad83 +0 -1
  207. package/.angular/cache/21.2.7/ng-packagr/58ae3f1f9664f7b16844d2e4a279dd4ca9371de014cf5687320c2d5cb259a74f +0 -1
  208. package/.angular/cache/21.2.7/ng-packagr/5c08e906bd3fe1aa6c1d62f2bbb2b3f276e1c17fe45ef081e76bd1b865ac3dfa +0 -1
  209. package/.angular/cache/21.2.7/ng-packagr/5ce333a40ad635188347fa9bc601d5fd14be6baacbae7d096259d725ac9757af +0 -1
  210. package/.angular/cache/21.2.7/ng-packagr/5f32cceaee6a6ea19cc6cbff5ea089b752f13a0fdcd32597d4c99d5e1e031bb5 +0 -1
  211. package/.angular/cache/21.2.7/ng-packagr/691ad4ccdc0a8ede36e1f4e5e97638c20c2d3142916ffac3a1b172178c139205 +0 -1
  212. package/.angular/cache/21.2.7/ng-packagr/6b57160e0d2da3f31693831e84a3f4209c1f33a04abd636e34af03956e7329d8 +0 -1
  213. package/.angular/cache/21.2.7/ng-packagr/70bc711a1d7b631845885c26adc2d6b1bff47d11332b2625cedfa11e9d5ac79a +0 -1
  214. package/.angular/cache/21.2.7/ng-packagr/7427c266237012afaef486c2af94ee08a491e8d7b6fc7e5ee887980830bbd333 +0 -1
  215. package/.angular/cache/21.2.7/ng-packagr/7e8fa7c61cf9a932ba3a0e65eb73c7412e81666b7a8f923dac7b75acfbb94b1d +0 -1
  216. package/.angular/cache/21.2.7/ng-packagr/81aab7fdab43cbdfa869db759d6113ae01ec6f5e0e9061d7fc089c260886e4d1 +0 -1
  217. package/.angular/cache/21.2.7/ng-packagr/83a81758045ff710a34ea3cf6f54435a1f5dea9839d8c0adda0bbce7c3fb6e8b +0 -1
  218. package/.angular/cache/21.2.7/ng-packagr/883eae810a4c09f06617bdc2e4bc30a69f09726401b2a051840969f635d076f1 +0 -1
  219. package/.angular/cache/21.2.7/ng-packagr/8a6b9be66de40c57054dca5fde376c3cec1bec1ae191a16f1ae6a83306d9ebfe +0 -1
  220. package/.angular/cache/21.2.7/ng-packagr/8d42c8144f6929de46984094bf390a0c4168404ab13a5194839f6ba5e42bc3ce +0 -1
  221. package/.angular/cache/21.2.7/ng-packagr/91093656c61a5404f0d576f872247eeb480dd938e6999d481a97893c72b5f3d0 +0 -1
  222. package/.angular/cache/21.2.7/ng-packagr/91e881172037c63d819e30d30e390e0d7dc0dee9808b3902275ccc8b1887d864 +0 -1
  223. package/.angular/cache/21.2.7/ng-packagr/9ef28cf3a676e7bd0d37762c4868b4810efca2f241ed0dae75ebca41988e2c00 +0 -1
  224. package/.angular/cache/21.2.7/ng-packagr/a07cbea405c1831b3f686a8e57c4b500d89cbab2b95e110487890269945feeaa +0 -1
  225. package/.angular/cache/21.2.7/ng-packagr/a463deba940880d9461612c9cd00d90062bf97aa31b1c4556b8b47a967cb6882 +0 -1
  226. package/.angular/cache/21.2.7/ng-packagr/ab03ed1e4a371113b41b663d526d2b06565ceb062e6f033f726f1e455fc5d1d6 +0 -1
  227. package/.angular/cache/21.2.7/ng-packagr/ad0e84be4f2211aff6187b4bec9adbe15f0e8b36851e9c6c63b38303c2daad37 +0 -1
  228. package/.angular/cache/21.2.7/ng-packagr/aece79242dae70eb748605e37483e75e122e4ce414fa8be875499e8af26ee5d6 +0 -1
  229. package/.angular/cache/21.2.7/ng-packagr/aff32db91ce03de30d2bbc84f266fe3fb2c6629d5eeb39a364204d9499484368 +0 -1
  230. package/.angular/cache/21.2.7/ng-packagr/b0671e73a162927d28ef1742ec008e514264bc2ce29f2255bedaea553492fe5d +0 -1
  231. package/.angular/cache/21.2.7/ng-packagr/bb50d71f3cdeebbb85fd983be8103f9c216060464f8e7e534271197391e6dcf7 +0 -1
  232. package/.angular/cache/21.2.7/ng-packagr/c64241290ab30d8761b2f5493a039427f5cda1a48b5be88ce62ee5c714c0f690 +0 -1
  233. package/.angular/cache/21.2.7/ng-packagr/c794d2e79b26ab378c0dbf8afa7b8ac1337ba9afb288941d44a086cb1bd4bad2 +0 -1
  234. package/.angular/cache/21.2.7/ng-packagr/d942edf8fd8e8e884138ffcdb1a07ad14a0b5e211f8ccea1dc9ea0b48f50cfc9 +0 -1
  235. package/.angular/cache/21.2.7/ng-packagr/dbe0b9b9f18ba7b96d9c84f4fd16cde158c9701c202d00113e6f88ba93407bce +0 -1
  236. package/.angular/cache/21.2.7/ng-packagr/f564395a410a2723aac48e582f5fe416bfeaa48677cea47b10c5152d4f2b6672 +0 -1
  237. package/.angular/cache/21.2.7/ng-packagr/fc9b0d27f081ca7b2a4cbefa75136d7bd7a8c341dbaa0587855071a6003906b8 +0 -1
  238. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-avatar-text.tsbuildinfo +0 -1
  239. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-avatar.tsbuildinfo +0 -1
  240. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-breadcrumb.tsbuildinfo +0 -1
  241. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-business-fields.tsbuildinfo +0 -1
  242. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-button-group.tsbuildinfo +0 -1
  243. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-button.tsbuildinfo +0 -1
  244. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-card.tsbuildinfo +0 -1
  245. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-checkbox-field.tsbuildinfo +0 -1
  246. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-chip.tsbuildinfo +0 -1
  247. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-client-page-menu.tsbuildinfo +0 -1
  248. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-client-page.tsbuildinfo +0 -1
  249. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-color-picker-field.tsbuildinfo +0 -1
  250. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-confirmation.tsbuildinfo +0 -1
  251. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-date-field.tsbuildinfo +0 -1
  252. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-dialog.tsbuildinfo +0 -1
  253. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-drawer.tsbuildinfo +0 -1
  254. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-dynamic-drawer.tsbuildinfo +0 -1
  255. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-editor-field.tsbuildinfo +0 -1
  256. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-empty-state.tsbuildinfo +0 -1
  257. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-entities.tsbuildinfo +0 -1
  258. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-field-validation.tsbuildinfo +0 -1
  259. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-formula.tsbuildinfo +0 -1
  260. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-icon-field.tsbuildinfo +0 -1
  261. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-list.tsbuildinfo +0 -1
  262. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-location-field.tsbuildinfo +0 -1
  263. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-menu.tsbuildinfo +0 -1
  264. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-modal.tsbuildinfo +0 -1
  265. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-module-summary-card.tsbuildinfo +0 -1
  266. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-multi-select-field.tsbuildinfo +0 -1
  267. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-number-field.tsbuildinfo +0 -1
  268. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-page-header.tsbuildinfo +0 -1
  269. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-page.tsbuildinfo +0 -1
  270. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-paginator.tsbuildinfo +0 -1
  271. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-pick-list-field.tsbuildinfo +0 -1
  272. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-progress.tsbuildinfo +0 -1
  273. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-property-filter-builder.tsbuildinfo +0 -1
  274. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-radio-button-field.tsbuildinfo +0 -1
  275. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-radio-cards-field.tsbuildinfo +0 -1
  276. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-radio-cards.tsbuildinfo +0 -1
  277. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-runtime-action.tsbuildinfo +0 -1
  278. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-select-field.tsbuildinfo +0 -1
  279. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-sidebar.tsbuildinfo +0 -1
  280. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-slider-field.tsbuildinfo +0 -1
  281. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-statistic-card.tsbuildinfo +0 -1
  282. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-table.tsbuildinfo +0 -1
  283. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-tabs.tsbuildinfo +0 -1
  284. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-text-field.tsbuildinfo +0 -1
  285. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-textarea-field.tsbuildinfo +0 -1
  286. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-toast.tsbuildinfo +0 -1
  287. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-toggle-field.tsbuildinfo +0 -1
  288. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-tooltip.tsbuildinfo +0 -1
  289. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-topbar.tsbuildinfo +0 -1
  290. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-tree.tsbuildinfo +0 -1
  291. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-treeselect-field.tsbuildinfo +0 -1
  292. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-upload-field.tsbuildinfo +0 -1
  293. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-uploader.tsbuildinfo +0 -1
  294. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-user-search-field.tsbuildinfo +0 -1
  295. package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components.tsbuildinfo +0 -1
  296. package/angular.json +0 -32
  297. package/api/api.ts +0 -1
  298. package/api/public-api.ts +0 -5
  299. package/avatar/avatar.html +0 -32
  300. package/avatar/avatar.scss +0 -0
  301. package/avatar/avatar.ts +0 -54
  302. package/avatar/ng-package.json +0 -6
  303. package/avatar/public-api.ts +0 -1
  304. package/avatar-text/avatar-text.html +0 -26
  305. package/avatar-text/avatar-text.scss +0 -0
  306. package/avatar-text/avatar-text.ts +0 -52
  307. package/avatar-text/ng-package.json +0 -6
  308. package/avatar-text/public-api.ts +0 -1
  309. package/breadcrumb/breadcrumb.html +0 -53
  310. package/breadcrumb/breadcrumb.scss +0 -0
  311. package/breadcrumb/breadcrumb.ts +0 -26
  312. package/breadcrumb/ng-package.json +0 -6
  313. package/breadcrumb/public-api.ts +0 -1
  314. package/business-fields/entity-list-field/entity-list-add-token.ts +0 -25
  315. package/business-fields/entity-list-field/entity-list-field.html +0 -70
  316. package/business-fields/entity-list-field/entity-list-field.scss +0 -3
  317. package/business-fields/entity-list-field/entity-list-field.ts +0 -1067
  318. package/business-fields/lookup-matrix-field/lookup-matrix-field.html +0 -38
  319. package/business-fields/lookup-matrix-field/lookup-matrix-field.spec.ts +0 -183
  320. package/business-fields/lookup-matrix-field/lookup-matrix-field.ts +0 -239
  321. package/business-fields/lookup-module-check-list-field/lookup-module-check-list-field.html +0 -95
  322. package/business-fields/lookup-module-check-list-field/lookup-module-check-list-field.ts +0 -336
  323. package/business-fields/lookup-module-check-list-field/lookup-module-check-list-form-token.ts +0 -42
  324. package/business-fields/ng-package.json +0 -6
  325. package/business-fields/public-api.ts +0 -8
  326. package/business-fields/schedule-item-selector-field/schedule-item-selector-field.html +0 -32
  327. package/business-fields/schedule-item-selector-field/schedule-item-selector-field.ts +0 -272
  328. package/business-fields/schedule-predecessor-field/schedule-predecessor-field.html +0 -89
  329. package/business-fields/schedule-predecessor-field/schedule-predecessor-field.ts +0 -441
  330. package/business-fields/schema-connection-field/schema-connection-field.html +0 -58
  331. package/business-fields/schema-connection-field/schema-connection-field.scss +0 -0
  332. package/business-fields/schema-connection-field/schema-connection-field.ts +0 -456
  333. package/button/button.html +0 -44
  334. package/button/button.scss +0 -0
  335. package/button/button.ts +0 -120
  336. package/button/ng-package.json +0 -6
  337. package/button/public-api.ts +0 -1
  338. package/button-group/button-group.html +0 -3
  339. package/button-group/button-group.scss +0 -20
  340. package/button-group/button-group.ts +0 -12
  341. package/button-group/ng-package.json +0 -6
  342. package/button-group/public-api.ts +0 -1
  343. package/card/card.html +0 -26
  344. package/card/card.scss +0 -0
  345. package/card/card.ts +0 -29
  346. package/card/ng-package.json +0 -6
  347. package/card/public-api.ts +0 -1
  348. package/checkbox-field/checkbox-field.html +0 -31
  349. package/checkbox-field/checkbox-field.scss +0 -0
  350. package/checkbox-field/checkbox-field.spec.ts +0 -21
  351. package/checkbox-field/checkbox-field.ts +0 -123
  352. package/checkbox-field/ng-package.json +0 -6
  353. package/checkbox-field/public-api.ts +0 -1
  354. package/chip/chip.html +0 -16
  355. package/chip/chip.scss +0 -19
  356. package/chip/chip.ts +0 -45
  357. package/chip/ng-package.json +0 -6
  358. package/chip/public-api.ts +0 -1
  359. package/client-page/client-page.html +0 -232
  360. package/client-page/client-page.ts +0 -588
  361. package/client-page/index.ts +0 -2
  362. package/client-page/ng-package.json +0 -6
  363. package/client-page/public-api.ts +0 -1
  364. package/client-page-menu/client-page-menu.html +0 -142
  365. package/client-page-menu/client-page-menu.ts +0 -199
  366. package/client-page-menu/index.ts +0 -2
  367. package/client-page-menu/ng-package.json +0 -6
  368. package/client-page-menu/public-api.ts +0 -1
  369. package/color-picker-field/color-picker-field.html +0 -45
  370. package/color-picker-field/color-picker-field.scss +0 -52
  371. package/color-picker-field/color-picker-field.ts +0 -131
  372. package/color-picker-field/ng-package.json +0 -6
  373. package/color-picker-field/public-api.ts +0 -1
  374. package/confirmation/confirmation-dialog.html +0 -83
  375. package/confirmation/confirmation-dialog.scss +0 -0
  376. package/confirmation/confirmation-dialog.ts +0 -15
  377. package/confirmation/confirmation.spec.ts +0 -43
  378. package/confirmation/confirmation.ts +0 -103
  379. package/confirmation/ng-package.json +0 -6
  380. package/confirmation/public-api.ts +0 -2
  381. package/date-field/date-field.html +0 -65
  382. package/date-field/date-field.scss +0 -0
  383. package/date-field/date-field.spec.ts +0 -118
  384. package/date-field/date-field.ts +0 -196
  385. package/date-field/ng-package.json +0 -6
  386. package/date-field/public-api.ts +0 -1
  387. package/dialog/dialog.ts +0 -29
  388. package/dialog/ng-package.json +0 -6
  389. package/dialog/public-api.ts +0 -1
  390. package/drawer/drawer.html +0 -67
  391. package/drawer/drawer.scss +0 -1
  392. package/drawer/drawer.ts +0 -348
  393. package/drawer/ng-package.json +0 -5
  394. package/drawer/public-api.ts +0 -1
  395. package/dynamic-drawer/dynamic-drawer-host.ts +0 -476
  396. package/dynamic-drawer/dynamic-drawer.spec.ts +0 -204
  397. package/dynamic-drawer/dynamic-drawer.ts +0 -235
  398. package/dynamic-drawer/ng-package.json +0 -6
  399. package/dynamic-drawer/public-api.ts +0 -2
  400. package/editor-field/editor-field.html +0 -38
  401. package/editor-field/editor-field.scss +0 -219
  402. package/editor-field/editor-field.ts +0 -126
  403. package/editor-field/ng-package.json +0 -6
  404. package/editor-field/public-api.ts +0 -1
  405. package/empty-state/empty-state.html +0 -236
  406. package/empty-state/empty-state.ts +0 -85
  407. package/empty-state/ng-package.json +0 -6
  408. package/empty-state/public-api.ts +0 -1
  409. package/entities/comparison/comparison-entity-list/comparison-entity-list.html +0 -87
  410. package/entities/comparison/comparison-entity-list/comparison-entity-list.ts +0 -93
  411. package/entities/comparison/comparison-value/comparison-value.html +0 -31
  412. package/entities/comparison/comparison-value/comparison-value.ts +0 -53
  413. package/entities/currency-display.utils.spec.ts +0 -94
  414. package/entities/currency-display.utils.ts +0 -92
  415. package/entities/entities-manage/entities-manage.html +0 -74
  416. package/entities/entities-manage/entities-manage.scss +0 -72
  417. package/entities/entities-manage/entities-manage.ts +0 -121
  418. package/entities/entities-manage/entities-resize-base.ts +0 -153
  419. package/entities/entities-preview/entities-preview.css +0 -77
  420. package/entities/entities-preview/entities-preview.html +0 -56
  421. package/entities/entities-preview/entities-preview.ts +0 -281
  422. package/entities/entity-attachment/entity-attachment.html +0 -49
  423. package/entities/entity-attachment/entity-attachment.ts +0 -462
  424. package/entities/entity-checkbox/entity-checkbox.html +0 -28
  425. package/entities/entity-checkbox/entity-checkbox.ts +0 -65
  426. package/entities/entity-comparison.model.ts +0 -39
  427. package/entities/entity-connection/entity-connection.html +0 -12
  428. package/entities/entity-connection/entity-connection.ts +0 -75
  429. package/entities/entity-currency/entity-currency.html +0 -12
  430. package/entities/entity-currency/entity-currency.ts +0 -59
  431. package/entities/entity-date/entity-date.html +0 -16
  432. package/entities/entity-date/entity-date.ts +0 -50
  433. package/entities/entity-display.utils.ts +0 -94
  434. package/entities/entity-field/entity-field.ts +0 -94
  435. package/entities/entity-leaf-details/entity-leaf-details.html +0 -35
  436. package/entities/entity-leaf-details/entity-leaf-details.ts +0 -56
  437. package/entities/entity-location/entity-location.html +0 -34
  438. package/entities/entity-location/entity-location.ts +0 -98
  439. package/entities/entity-long-text/entity-long-text.html +0 -9
  440. package/entities/entity-long-text/entity-long-text.ts +0 -45
  441. package/entities/entity-lookup/entity-lookup.html +0 -25
  442. package/entities/entity-lookup/entity-lookup.ts +0 -68
  443. package/entities/entity-lookup-module-check-list/entity-lookup-module-check-list.html +0 -39
  444. package/entities/entity-lookup-module-check-list/entity-lookup-module-check-list.spec.ts +0 -148
  445. package/entities/entity-lookup-module-check-list/entity-lookup-module-check-list.ts +0 -152
  446. package/entities/entity-percentage/entity-percentage.html +0 -22
  447. package/entities/entity-percentage/entity-percentage.ts +0 -163
  448. package/entities/entity-phase-gate/entity-phase-gate.html +0 -20
  449. package/entities/entity-phase-gate/entity-phase-gate.ts +0 -129
  450. package/entities/entity-preview/entity-preview-body.html +0 -8
  451. package/entities/entity-preview/entity-preview-body.ts +0 -19
  452. package/entities/entity-preview/entity-preview.html +0 -14
  453. package/entities/entity-preview/entity-preview.ts +0 -33
  454. package/entities/entity-preview/entity-value-preview.html +0 -62
  455. package/entities/entity-preview/entity-value-preview.spec.ts +0 -191
  456. package/entities/entity-preview/entity-value-preview.ts +0 -69
  457. package/entities/entity-schedule-item/entity-schedule-item.html +0 -19
  458. package/entities/entity-schedule-item/entity-schedule-item.ts +0 -41
  459. package/entities/entity-sections.util.ts +0 -103
  460. package/entities/entity-status/entity-status.html +0 -20
  461. package/entities/entity-status/entity-status.ts +0 -60
  462. package/entities/entity-text/entity-text.html +0 -20
  463. package/entities/entity-text/entity-text.ts +0 -35
  464. package/entities/entity-user/entity-user.html +0 -181
  465. package/entities/entity-user/entity-user.ts +0 -179
  466. package/entities/entity.model.ts +0 -407
  467. package/entities/leaf-details-display.utils.ts +0 -269
  468. package/entities/ng-package.json +0 -6
  469. package/entities/percentage-color.utils.spec.ts +0 -94
  470. package/entities/percentage-color.utils.ts +0 -80
  471. package/entities/public-api.ts +0 -30
  472. package/field-validation/character-limit.validator.ts +0 -22
  473. package/field-validation/error-message.pipe.spec.ts +0 -184
  474. package/field-validation/error-message.pipe.ts +0 -80
  475. package/field-validation/field-validation.ts +0 -168
  476. package/field-validation/ng-package.json +0 -6
  477. package/field-validation/public-api.ts +0 -2
  478. package/formula/formula-editor/formula-editor.html +0 -89
  479. package/formula/formula-editor/formula-editor.scss +0 -25
  480. package/formula/formula-editor/formula-editor.ts +0 -467
  481. package/formula/formula-editor/index.ts +0 -1
  482. package/formula/formula-editor-code/formula-autocomplete-normalization.util.spec.ts +0 -58
  483. package/formula/formula-editor-code/formula-autocomplete-normalization.util.ts +0 -64
  484. package/formula/formula-editor-code/formula-completion-range.util.spec.ts +0 -62
  485. package/formula/formula-editor-code/formula-completion-range.util.ts +0 -71
  486. package/formula/formula-editor-code/formula-completion-suggestion.util.spec.ts +0 -23
  487. package/formula/formula-editor-code/formula-completion-suggestion.util.ts +0 -18
  488. package/formula/formula-editor-code/formula-editor-code.html +0 -15
  489. package/formula/formula-editor-code/formula-editor-code.scss +0 -90
  490. package/formula/formula-editor-code/formula-editor-code.ts +0 -1095
  491. package/formula/formula-editor-code/index.ts +0 -1
  492. package/formula/formula-status-bar/formula-status-bar.html +0 -119
  493. package/formula/formula-status-bar/formula-status-bar.ts +0 -66
  494. package/formula/formula-status-bar/index.ts +0 -1
  495. package/formula/formula-toolbar/formula-toolbar.html +0 -361
  496. package/formula/formula-toolbar/formula-toolbar.ts +0 -532
  497. package/formula/formula-toolbar/index.ts +0 -2
  498. package/formula/formula-toolbar/operators.ts +0 -122
  499. package/formula/models/formula-block.model.ts +0 -61
  500. package/formula/models/formula-token.model.spec.ts +0 -57
  501. package/formula/models/formula-token.model.ts +0 -852
  502. package/formula/models/index.ts +0 -5
  503. package/formula/models/smart-block.model.ts +0 -132
  504. package/formula/models/validation-result.model.ts +0 -80
  505. package/formula/ng-package.json +0 -6
  506. package/formula/public-api.ts +0 -8
  507. package/formula/runtime/formula-runtime-catalogs.ts +0 -554
  508. package/formula/runtime/formula-runtime-engine.spec.ts +0 -328
  509. package/formula/runtime/formula-runtime-engine.ts +0 -794
  510. package/formula/runtime/formula-runtime.model.ts +0 -53
  511. package/formula/runtime/index.ts +0 -3
  512. package/formula/toolbar-item/index.ts +0 -1
  513. package/formula/toolbar-item/toolbar-item.html +0 -143
  514. package/formula/toolbar-item/toolbar-item.scss +0 -14
  515. package/formula/toolbar-item/toolbar-item.ts +0 -223
  516. package/icon-field/icon-field.html +0 -58
  517. package/icon-field/icon-field.scss +0 -24
  518. package/icon-field/icon-field.spec.ts +0 -77
  519. package/icon-field/icon-field.ts +0 -205
  520. package/icon-field/ng-package.json +0 -6
  521. package/icon-field/public-api.ts +0 -1
  522. package/list/list.html +0 -22
  523. package/list/list.ts +0 -36
  524. package/list/ng-package.json +0 -6
  525. package/list/public-api.ts +0 -1
  526. package/location-field/location-field.html +0 -86
  527. package/location-field/location-field.spec.ts +0 -295
  528. package/location-field/location-field.ts +0 -662
  529. package/location-field/location-manual-dialog.html +0 -43
  530. package/location-field/location-manual-dialog.ts +0 -104
  531. package/location-field/location-value.ts +0 -67
  532. package/location-field/ng-package.json +0 -6
  533. package/location-field/public-api.ts +0 -3
  534. package/menu/menu.html +0 -71
  535. package/menu/menu.scss +0 -3
  536. package/menu/menu.ts +0 -186
  537. package/menu/ng-package.json +0 -6
  538. package/menu/public-api.ts +0 -1
  539. package/modal/modal.ts +0 -127
  540. package/modal/ng-package.json +0 -6
  541. package/modal/public-api.ts +0 -1
  542. package/module-summary-card/module-summary-card.html +0 -43
  543. package/module-summary-card/module-summary-card.scss +0 -0
  544. package/module-summary-card/module-summary-card.ts +0 -40
  545. package/module-summary-card/ng-package.json +0 -6
  546. package/module-summary-card/public-api.ts +0 -1
  547. package/multi-select-field/multi-select-field.html +0 -140
  548. package/multi-select-field/multi-select-field.scss +0 -0
  549. package/multi-select-field/multi-select-field.spec.ts +0 -21
  550. package/multi-select-field/multi-select-field.ts +0 -397
  551. package/multi-select-field/ng-package.json +0 -6
  552. package/multi-select-field/public-api.ts +0 -1
  553. package/ng-package.json +0 -9
  554. package/number-field/ng-package.json +0 -6
  555. package/number-field/number-field.html +0 -39
  556. package/number-field/number-field.scss +0 -8
  557. package/number-field/number-field.spec.ts +0 -21
  558. package/number-field/number-field.ts +0 -124
  559. package/number-field/public-api.ts +0 -1
  560. package/page/index.ts +0 -1
  561. package/page/ng-package.json +0 -6
  562. package/page/page.html +0 -37
  563. package/page/page.ts +0 -43
  564. package/page/public-api.ts +0 -1
  565. package/page-header/index.ts +0 -2
  566. package/page-header/ng-package.json +0 -6
  567. package/page-header/page-header.html +0 -60
  568. package/page-header/page-header.ts +0 -54
  569. package/page-header/public-api.ts +0 -1
  570. package/paginator/ng-package.json +0 -6
  571. package/paginator/paginator.html +0 -50
  572. package/paginator/paginator.scss +0 -0
  573. package/paginator/paginator.ts +0 -53
  574. package/paginator/public-api.ts +0 -1
  575. package/pick-list-field/ng-package.json +0 -6
  576. package/pick-list-field/pick-list-field.html +0 -39
  577. package/pick-list-field/pick-list-field.scss +0 -26
  578. package/pick-list-field/pick-list-field.ts +0 -259
  579. package/pick-list-field/public-api.ts +0 -1
  580. package/progress/ng-package.json +0 -6
  581. package/progress/progress.html +0 -36
  582. package/progress/progress.ts +0 -61
  583. package/progress/public-api.ts +0 -1
  584. package/property-filter-builder/ng-package.json +0 -6
  585. package/property-filter-builder/property-filter-builder.html +0 -192
  586. package/property-filter-builder/property-filter-builder.ts +0 -548
  587. package/property-filter-builder/public-api.ts +0 -1
  588. package/radio-button-field/ng-package.json +0 -6
  589. package/radio-button-field/public-api.ts +0 -1
  590. package/radio-button-field/radio-button-field.html +0 -44
  591. package/radio-button-field/radio-button-field.scss +0 -0
  592. package/radio-button-field/radio-button-field.ts +0 -114
  593. package/radio-cards/ng-package.json +0 -6
  594. package/radio-cards/public-api.ts +0 -1
  595. package/radio-cards/radio-cards.css +0 -3
  596. package/radio-cards/radio-cards.html +0 -54
  597. package/radio-cards/radio-cards.spec.ts +0 -22
  598. package/radio-cards/radio-cards.ts +0 -92
  599. package/radio-cards-field/ng-package.json +0 -6
  600. package/radio-cards-field/public-api.ts +0 -1
  601. package/radio-cards-field/radio-cards-field.css +0 -0
  602. package/radio-cards-field/radio-cards-field.html +0 -38
  603. package/radio-cards-field/radio-cards-field.spec.ts +0 -22
  604. package/radio-cards-field/radio-cards-field.ts +0 -182
  605. package/runtime-action/ng-package.json +0 -6
  606. package/runtime-action/payload-builder.ts +0 -246
  607. package/runtime-action/public-api.ts +0 -4
  608. package/runtime-action/runtime-action-context.store.ts +0 -26
  609. package/runtime-action/runtime-action.runner.ts +0 -302
  610. package/runtime-action/runtime-action.types.ts +0 -82
  611. package/select-field/current-user.util.ts +0 -54
  612. package/select-field/ng-package.json +0 -6
  613. package/select-field/public-api.ts +0 -1
  614. package/select-field/select-field.html +0 -142
  615. package/select-field/select-field.scss +0 -0
  616. package/select-field/select-field.spec.ts +0 -21
  617. package/select-field/select-field.ts +0 -471
  618. package/sidebar/ng-package.json +0 -6
  619. package/sidebar/public-api.ts +0 -1
  620. package/sidebar/sidebar.html +0 -368
  621. package/sidebar/sidebar.ts +0 -303
  622. package/slider-field/ng-package.json +0 -7
  623. package/slider-field/public-api.ts +0 -1
  624. package/slider-field/slider-field.html +0 -33
  625. package/slider-field/slider-field.scss +0 -11
  626. package/slider-field/slider-field.spec.ts +0 -44
  627. package/slider-field/slider-field.ts +0 -166
  628. package/src/lib/base/base.facade.ts +0 -159
  629. package/src/lib/base/crud-base.state.ts +0 -248
  630. package/src/lib/config/date-format.config.ts +0 -55
  631. package/src/lib/config/ds-identity.preset.ts +0 -538
  632. package/src/lib/config/ds-identity.tokens.ts +0 -209
  633. package/src/lib/config/dynamic-form.model.ts +0 -1162
  634. package/src/lib/config/povide-messages.ts +0 -5
  635. package/src/lib/config/provide-confirmation.ts +0 -5
  636. package/src/lib/config/providemt.ts +0 -506
  637. package/src/lib/config/public-api.ts +0 -0
  638. package/src/lib/pipes/mt-date-format.pipe.spec.ts +0 -60
  639. package/src/lib/pipes/mt-date-format.pipe.ts +0 -81
  640. package/src/lib/utils/api-request.helper.ts +0 -59
  641. package/src/lib/utils/clock-time.util.ts +0 -58
  642. package/src/lib/utils/color.utils.ts +0 -187
  643. package/src/lib/utils/entity-adapter.ts +0 -50
  644. package/src/lib/utils/field-id.ts +0 -42
  645. package/src/lib/utils/http-context.ts +0 -35
  646. package/src/lib/utils/inputs.ts +0 -6
  647. package/src/lib/utils/state-helpers.ts +0 -49
  648. package/src/lib/utils/theme.ts +0 -281
  649. package/src/public-api.ts +0 -30
  650. package/statistic-card/ng-package.json +0 -6
  651. package/statistic-card/public-api.ts +0 -1
  652. package/statistic-card/statistic-card.html +0 -31
  653. package/statistic-card/statistic-card.scss +0 -0
  654. package/statistic-card/statistic-card.ts +0 -59
  655. package/table/ng-package.json +0 -7
  656. package/table/public-api.ts +0 -10
  657. package/table/table-actions-menu/public-api.ts +0 -1
  658. package/table/table-actions-menu/table-actions-menu.html +0 -75
  659. package/table/table-actions-menu/table-actions-menu.ts +0 -171
  660. package/table/table-caption/public-api.ts +0 -1
  661. package/table/table-caption/table-caption.html +0 -118
  662. package/table/table-caption/table-caption.ts +0 -221
  663. package/table/table-column-filter/public-api.ts +0 -1
  664. package/table/table-column-filter/table-column-filter.html +0 -44
  665. package/table/table-column-filter/table-column-filter.ts +0 -106
  666. package/table/table-export/html-to-text.util.ts +0 -67
  667. package/table/table-export/public-api.ts +0 -1
  668. package/table/table-export/table-export.service.spec.ts +0 -186
  669. package/table/table-export/table-export.service.ts +0 -325
  670. package/table/table-filter/public-api.ts +0 -1
  671. package/table/table-filter/table-filter.css +0 -9
  672. package/table/table-filter/table-filter.html +0 -63
  673. package/table/table-filter/table-filter.ts +0 -126
  674. package/table/table-filter-field/public-api.ts +0 -1
  675. package/table/table-filter-field/table-filter-field.html +0 -182
  676. package/table/table-filter-field/table-filter-field.ts +0 -208
  677. package/table/table-grouping/public-api.ts +0 -1
  678. package/table/table-grouping/table-grouping.spec.ts +0 -218
  679. package/table/table-grouping/table-grouping.ts +0 -237
  680. package/table/table-types.ts +0 -242
  681. package/table/table-value.utils.spec.ts +0 -63
  682. package/table/table-value.utils.ts +0 -1014
  683. package/table/table.css +0 -145
  684. package/table/table.html +0 -572
  685. package/table/table.ts +0 -2042
  686. package/tabs/ng-package.json +0 -6
  687. package/tabs/public-api.ts +0 -1
  688. package/tabs/tabs.html +0 -417
  689. package/tabs/tabs.scss +0 -3
  690. package/tabs/tabs.spec.ts +0 -79
  691. package/tabs/tabs.ts +0 -397
  692. package/text-field/ng-package.json +0 -6
  693. package/text-field/public-api.ts +0 -1
  694. package/text-field/text-field.html +0 -75
  695. package/text-field/text-field.scss +0 -56
  696. package/text-field/text-field.ts +0 -251
  697. package/textarea-field/ng-package.json +0 -6
  698. package/textarea-field/public-api.ts +0 -1
  699. package/textarea-field/textarea-field.html +0 -37
  700. package/textarea-field/textarea-field.scss +0 -0
  701. package/textarea-field/textarea-field.spec.ts +0 -21
  702. package/textarea-field/textarea-field.ts +0 -169
  703. package/toast/ng-package.json +0 -6
  704. package/toast/public-api.ts +0 -2
  705. package/toast/toast.html +0 -18
  706. package/toast/toast.service.ts +0 -67
  707. package/toast/toast.ts +0 -21
  708. package/toggle-field/ng-package.json +0 -6
  709. package/toggle-field/public-api.ts +0 -1
  710. package/toggle-field/toggle-field.html +0 -78
  711. package/toggle-field/toggle-field.scss +0 -24
  712. package/toggle-field/toggle-field.ts +0 -150
  713. package/tooltip/ng-package.json +0 -6
  714. package/tooltip/public-api.ts +0 -2
  715. package/tooltip/tooltip.ts +0 -30
  716. package/tooltip/truncate-tooltip.ts +0 -124
  717. package/topbar/ng-package.json +0 -6
  718. package/topbar/public-api.ts +0 -1
  719. package/topbar/topbar.html +0 -52
  720. package/topbar/topbar.ts +0 -27
  721. package/tree/ng-package.json +0 -6
  722. package/tree/public-api.ts +0 -2
  723. package/tree/tree-types.ts +0 -55
  724. package/tree/tree.html +0 -126
  725. package/tree/tree.scss +0 -1
  726. package/tree/tree.ts +0 -303
  727. package/treeselect-field/ng-package.json +0 -6
  728. package/treeselect-field/public-api.ts +0 -1
  729. package/treeselect-field/treeselect-field.html +0 -71
  730. package/treeselect-field/treeselect-field.ts +0 -348
  731. package/tsconfig.check.json +0 -20
  732. package/tsconfig.json +0 -16
  733. package/tsconfig.spec.json +0 -24
  734. package/upload-field/ng-package.json +0 -6
  735. package/upload-field/public-api.ts +0 -2
  736. package/upload-field/secure-image.pipe.ts +0 -258
  737. package/upload-field/upload-field.html +0 -274
  738. package/upload-field/upload-field.scss +0 -0
  739. package/upload-field/upload-field.spec.ts +0 -169
  740. package/upload-field/upload-field.ts +0 -764
  741. package/upload-field/upload-file-preview/upload-file-preview.html +0 -41
  742. package/upload-field/upload-file-preview/upload-file-preview.scss +0 -0
  743. package/upload-field/upload-file-preview/upload-file-preview.ts +0 -57
  744. package/upload-field/upload-user-preview/upload-user-preview.css +0 -0
  745. package/upload-field/upload-user-preview/upload-user-preview.html +0 -73
  746. package/upload-field/upload-user-preview/upload-user-preview.ts +0 -54
  747. package/uploader/ng-package.json +0 -6
  748. package/uploader/public-api.ts +0 -1
  749. package/uploader/uploader.service.spec.ts +0 -271
  750. package/uploader/uploader.service.ts +0 -733
  751. package/user-search-field/ng-package.json +0 -6
  752. package/user-search-field/public-api.ts +0 -1
  753. package/user-search-field/user-search-field.html +0 -88
  754. package/user-search-field/user-search-field.scss +0 -4
  755. package/user-search-field/user-search-field.spec.ts +0 -176
  756. package/user-search-field/user-search-field.ts +0 -483
@@ -0,0 +1,2536 @@
1
+ import { providePrimeNG } from 'primeng/config';
2
+ import Aura from '@primeuix/themes/aura';
3
+ import { updatePreset, definePreset, usePreset } from '@primeuix/themes';
4
+ import { MessageService, ConfirmationService } from 'primeng/api';
5
+ import * as i0 from '@angular/core';
6
+ import { InjectionToken, makeEnvironmentProviders, computed, inject, LOCALE_ID, Pipe } from '@angular/core';
7
+ import { tap, catchError, finalize } from 'rxjs/operators';
8
+ import { HttpContextToken } from '@angular/common/http';
9
+ import { formatDate } from '@angular/common';
10
+
11
+ /**
12
+ * Converts a hex color string to an HSL tuple.
13
+ * @param hex - The hex color string (e.g., "#RRGGBB" or "#RGB").
14
+ * @returns An HSL tuple [hue, saturation, lightness] where hue is in degrees (0-360),
15
+ * and saturation/lightness are percentages (0-100).
16
+ */
17
+ function hexToHsl(hex) {
18
+ let r = 0, g = 0, b = 0;
19
+ // Handle shorthand hex codes
20
+ if (hex.length === 4) {
21
+ r = parseInt(hex[1] + hex[1], 16);
22
+ g = parseInt(hex[2] + hex[2], 16);
23
+ b = parseInt(hex[3] + hex[3], 16);
24
+ }
25
+ else if (hex.length === 7) {
26
+ r = parseInt(hex.substring(1, 3), 16);
27
+ g = parseInt(hex.substring(3, 5), 16);
28
+ b = parseInt(hex.substring(5, 7), 16);
29
+ }
30
+ else {
31
+ throw new Error('Invalid hex color format. Expected #RGB or #RRGGBB.');
32
+ }
33
+ r /= 255;
34
+ g /= 255;
35
+ b /= 255;
36
+ const max = Math.max(r, g, b);
37
+ const min = Math.min(r, g, b);
38
+ let h = 0, s;
39
+ const l = (max + min) / 2;
40
+ if (max === min) {
41
+ h = s = 0; // achromatic
42
+ }
43
+ else {
44
+ const d = max - min;
45
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
46
+ switch (max) {
47
+ case r:
48
+ h = (g - b) / d + (g < b ? 6 : 0);
49
+ break;
50
+ case g:
51
+ h = (b - r) / d + 2;
52
+ break;
53
+ case b:
54
+ h = (r - g) / d + 4;
55
+ break;
56
+ }
57
+ h /= 6;
58
+ }
59
+ return [h * 360, s * 100, l * 100]; // HSL in degrees, percentage, percentage
60
+ }
61
+ /**
62
+ * Converts HSL values to a hex color string.
63
+ * @param h - Hue (0-360).
64
+ * @param s - Saturation (0-100).
65
+ * @param l - Lightness (0-100).
66
+ * @returns The hex color string (e.g., "#RRGGBB").
67
+ */
68
+ function hslToHex(h, s, l) {
69
+ l /= 100;
70
+ const a = (s * Math.min(l, 1 - l)) / 100;
71
+ const f = (n) => {
72
+ const k = (n + h / 30) % 12;
73
+ const color = l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
74
+ return Math.round(255 * color)
75
+ .toString(16)
76
+ .padStart(2, '0');
77
+ };
78
+ return `#${f(0)}${f(8)}${f(4)}`;
79
+ }
80
+ /**
81
+ * Defines the "ideal" lightness and saturation adjustment for each shade.
82
+ * Lightness for 500 is set to 50 as a balanced default.
83
+ */
84
+ const PALETTE_PROFILE = {
85
+ '0': { l: 98, s_adjust: -50 },
86
+ '50': { l: 95, s_adjust: -40 },
87
+ '100': { l: 90, s_adjust: -30 },
88
+ '200': { l: 80, s_adjust: -20 },
89
+ '300': { l: 70, s_adjust: -10 },
90
+ '400': { l: 60, s_adjust: -5 },
91
+ '500': { l: 50, s_adjust: 0 },
92
+ '600': { l: 45, s_adjust: 5 },
93
+ '700': { l: 35, s_adjust: 10 },
94
+ '800': { l: 25, s_adjust: 15 },
95
+ '900': { l: 15, s_adjust: 20 },
96
+ '950': { l: 8, s_adjust: 25 },
97
+ };
98
+ // Helper to ensure palette is always in the correct 50-950 order
99
+ const ALL_SHADES = [
100
+ '0',
101
+ '50',
102
+ '100',
103
+ '200',
104
+ '300',
105
+ '400',
106
+ '500',
107
+ '600',
108
+ '700',
109
+ '800',
110
+ '900',
111
+ '950',
112
+ ];
113
+ /**
114
+ * Clamps a number between a min and max value.
115
+ */
116
+ function clamp(value, min, max) {
117
+ return Math.max(min, Math.min(max, value));
118
+ }
119
+ /**
120
+ * Generates a Tailwind-like color palette (50-950) from any given base color.
121
+ *
122
+ * @param baseColorHex - The hex string of the base color (e.g., "#0284c7").
123
+ * @param baseColorShade - The shade of the base color (e.g., "500", "700").
124
+ * @returns An object representing the full color palette.
125
+ */
126
+ function generateTailwindPalette(baseColorHex, baseColorShade = '500') {
127
+ // 1. Get HSL of the input color
128
+ const [h_base, s_base, l_base] = hexToHsl(baseColorHex);
129
+ // 2. Find the anchors
130
+ const baseProfile = PALETTE_PROFILE[baseColorShade];
131
+ /** The Hue is constant across the entire palette. */
132
+ const h = h_base;
133
+ /**
134
+ * Calculate the 500-shade's saturation by "reversing" the adjustment
135
+ * from the base color.
136
+ * e.g., if base is 700 (s_adjust: +10) and s_base is 80,
137
+ * s_500 will be 70.
138
+ */
139
+ const s_500 = clamp(s_base - baseProfile.s_adjust, 0, 100);
140
+ /**
141
+ * Calculate the lightness "offset". This is the difference between
142
+ * the base color's actual lightness and its "ideal" lightness
143
+ * from the profile.
144
+ * e.g., if base is 700 (ideal L: 35) and l_base is 38,
145
+ * the offset is +3. This offset will be applied to all shades.
146
+ */
147
+ const l_offset = l_base - baseProfile.l;
148
+ // 3. Generate the full palette
149
+ const palette = {};
150
+ for (const shade of ALL_SHADES) {
151
+ const profile = PALETTE_PROFILE[shade];
152
+ // Calculate the new saturation and lightness for this shade
153
+ const newS = clamp(s_500 + profile.s_adjust, 0, 100);
154
+ const newL = clamp(profile.l + l_offset, 0, 100);
155
+ palette[shade] = hslToHex(h, newS, newL);
156
+ }
157
+ // 4. Ensure the originally provided color is used exactly
158
+ // (to avoid rounding errors from HSL conversion)
159
+ palette[baseColorShade] = baseColorHex;
160
+ return palette;
161
+ }
162
+
163
+ /**
164
+ * Color utility functions for brand display.
165
+ */
166
+ /**
167
+ * Converts a hex color to a light shade (equivalent to primary-100 in Tailwind).
168
+ * This creates a color with ~10% opacity or a very light tint by mixing with white.
169
+ */
170
+ function getLightColor(hexColor) {
171
+ const hex = hexColor.replace('#', '');
172
+ const r = parseInt(hex.substring(0, 2), 16);
173
+ const g = parseInt(hex.substring(2, 4), 16);
174
+ const b = parseInt(hex.substring(4, 6), 16);
175
+ const lightR = Math.round(r * 0.1 + 255 * 0.9);
176
+ const lightG = Math.round(g * 0.1 + 255 * 0.9);
177
+ const lightB = Math.round(b * 0.1 + 255 * 0.9);
178
+ return `#${lightR.toString(16).padStart(2, '0')}${lightG
179
+ .toString(16)
180
+ .padStart(2, '0')}${lightB.toString(16).padStart(2, '0')}`;
181
+ }
182
+ function getContrastColor(bgColor) {
183
+ let r = 0, g = 0, b = 0;
184
+ if (bgColor.startsWith('#')) {
185
+ const hex = bgColor.slice(1);
186
+ if (hex.length === 3) {
187
+ r = parseInt(hex[0] + hex[0], 16);
188
+ g = parseInt(hex[1] + hex[1], 16);
189
+ b = parseInt(hex[2] + hex[2], 16);
190
+ }
191
+ else if (hex.length === 6) {
192
+ r = parseInt(hex.slice(0, 2), 16);
193
+ g = parseInt(hex.slice(2, 4), 16);
194
+ b = parseInt(hex.slice(4, 6), 16);
195
+ }
196
+ }
197
+ const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
198
+ return luminance > 0.5 ? '' : '#ffffff';
199
+ }
200
+ /** Parses `#rgb` / `#rrggbb` into 0-255 channels. Null when unparseable. */
201
+ function toRgb(hex) {
202
+ const value = hex.trim().replace('#', '');
203
+ const full = value.length === 3
204
+ ? value
205
+ .split('')
206
+ .map((c) => c + c)
207
+ .join('')
208
+ : value;
209
+ if (full.length !== 6 || !/^[0-9a-f]{6}$/i.test(full)) {
210
+ return null;
211
+ }
212
+ return [
213
+ parseInt(full.slice(0, 2), 16),
214
+ parseInt(full.slice(2, 4), 16),
215
+ parseInt(full.slice(4, 6), 16),
216
+ ];
217
+ }
218
+ /**
219
+ * WCAG 2.x relative luminance.
220
+ *
221
+ * Note this is NOT the 0.299/0.587/0.114 perceived-brightness formula used by
222
+ * `getContrastColor` above — that one is fine for "is this light or dark?" but
223
+ * it is not the definition a conformance ratio is measured against, so it
224
+ * cannot be used to decide whether text passes AA.
225
+ */
226
+ function relativeLuminance(hex) {
227
+ const rgb = toRgb(hex);
228
+ if (!rgb) {
229
+ return null;
230
+ }
231
+ const [r, g, b] = rgb.map((channel) => {
232
+ const c = channel / 255;
233
+ return c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
234
+ });
235
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b;
236
+ }
237
+ /** WCAG contrast ratio between two hex colours, 1–21. Null if either is bad. */
238
+ function contrastRatio(foreground, background) {
239
+ const l1 = relativeLuminance(foreground);
240
+ const l2 = relativeLuminance(background);
241
+ if (l1 === null || l2 === null) {
242
+ return null;
243
+ }
244
+ return (Math.max(l1, l2) + 0.05) / (Math.min(l1, l2) + 0.05);
245
+ }
246
+ /** WCAG 1.4.3 Contrast Minimum, normal-size text. */
247
+ const WCAG_AA_NORMAL_TEXT = 4.5;
248
+ /**
249
+ * The first shade at or below `preferred` on a generated ramp whose contrast
250
+ * against `foreground` clears `minRatio`.
251
+ *
252
+ * This is how the brand colour stays fully tenant-configurable while the
253
+ * primary button still passes AA (finding H-03). The shipped default
254
+ * `#2AAEC0` gives white text 2.65:1 — the single most important control in the
255
+ * product was the least legible one, and any tenant picking a light brand hit
256
+ * the same wall. Rather than hardcode a darker teal, which fixes exactly one
257
+ * tenant, we keep their hue and step down the ramp their own colour generated
258
+ * until the text is readable.
259
+ *
260
+ * Returns `preferred` unchanged when it already passes, so a tenant whose brand
261
+ * is dark enough sees no change at all. Returns the darkest available shade if
262
+ * none passes — better to be as close as the palette allows than to give up.
263
+ */
264
+ function pickAccessibleShade(palette, preferred, foreground = '#ffffff', minRatio = WCAG_AA_NORMAL_TEXT) {
265
+ const ladder = ['500', '600', '700', '800', '900'];
266
+ const startIndex = ladder.indexOf(preferred);
267
+ const candidates = startIndex >= 0 ? ladder.slice(startIndex) : ladder;
268
+ let darkestAvailable = null;
269
+ for (const step of candidates) {
270
+ const shade = palette[step];
271
+ if (!shade) {
272
+ continue;
273
+ }
274
+ darkestAvailable = step;
275
+ const ratio = contrastRatio(foreground, shade);
276
+ if (ratio !== null && ratio >= minRatio) {
277
+ return step;
278
+ }
279
+ }
280
+ // Nothing on the ramp clears the threshold — return the darkest step the
281
+ // palette actually has rather than one we already know fails. Falls back to
282
+ // `preferred` only when the palette carried none of the ladder steps at all.
283
+ return darkestAvailable ?? preferred;
284
+ }
285
+ /** Dark ink used when white text would not be legible on a status colour. */
286
+ const READABLE_DARK_INK = '#1f2937';
287
+ /**
288
+ * Picks the more legible of white and a dark ink for text sitting on `bgColor`.
289
+ *
290
+ * Status and lookup colours come from a tenant's own catalog, so they can be
291
+ * any hex at all — and the count badges on the Explore cards were painting
292
+ * white on every one of them, which measured 2.59:1 at the low end (finding
293
+ * H-03 / M-04). Rather than restrict what colours a tenant may choose, pick the
294
+ * foreground that actually reads on the colour they chose.
295
+ *
296
+ * Measured with the WCAG relative-luminance ratio, not the perceived-brightness
297
+ * shortcut in `getContrastColor`, because that shortcut is not the definition
298
+ * conformance is judged against. Unparseable input falls back to white, which
299
+ * is the behaviour every caller had before.
300
+ */
301
+ function readableTextOn(bgColor, dark = READABLE_DARK_INK, light = '#ffffff') {
302
+ if (!bgColor) {
303
+ return light;
304
+ }
305
+ const onLight = contrastRatio(light, bgColor);
306
+ const onDark = contrastRatio(dark, bgColor);
307
+ if (onLight === null || onDark === null) {
308
+ return light;
309
+ }
310
+ return onDark > onLight ? dark : light;
311
+ }
312
+
313
+ /**
314
+ * Masterteam Design System — raw palettes and scales.
315
+ *
316
+ * Transcribed from the DS Storybook foundations (Figma
317
+ * `WTmRAkJVvw0IvZMA7wBdTC`). These are primitives: they name colours, not
318
+ * roles. The mapping from primitive to role lives in `ds-identity.preset.ts`.
319
+ *
320
+ * Adding a value here without a corresponding Figma variable is how a design
321
+ * system drifts — extend the Figma file first, then mirror it.
322
+ */
323
+ /** Primary blue. 800 is the primary button background. */
324
+ const DS_BLUE = {
325
+ 25: '#F5FAFF',
326
+ 50: '#EFF8FF',
327
+ 100: '#D1E9FF',
328
+ 200: '#B2DDFF',
329
+ 300: '#84CAFF',
330
+ 400: '#53B1FD',
331
+ 500: '#2E90FA',
332
+ 600: '#1570EF',
333
+ 700: '#175CD3',
334
+ 800: '#1849A9',
335
+ 900: '#194185',
336
+ 950: '#102A56',
337
+ };
338
+ /** Secondary indigo — accents, tags, selected states. */
339
+ const DS_INDIGO = {
340
+ 25: '#F5F8FF',
341
+ 50: '#EEF4FF',
342
+ 100: '#E0EAFF',
343
+ 200: '#C7D7FE',
344
+ 300: '#A4BCFD',
345
+ 400: '#8098F9',
346
+ 500: '#6172F3',
347
+ 600: '#444CE7',
348
+ 700: '#3538CD',
349
+ 800: '#2D31A6',
350
+ 900: '#2D3282',
351
+ 950: '#1F235B',
352
+ };
353
+ const DS_SUCCESS = {
354
+ 25: '#F6FEF9',
355
+ 50: '#ECFDF3',
356
+ 100: '#DCFAE6',
357
+ 200: '#A9EFC5',
358
+ 300: '#75E0A7',
359
+ 400: '#47CD89',
360
+ 500: '#17B26A',
361
+ 600: '#079455',
362
+ 700: '#067647',
363
+ 800: '#085D3A',
364
+ 900: '#074D31',
365
+ 950: '#053321',
366
+ };
367
+ const DS_WARNING = {
368
+ 25: '#FFFCF5',
369
+ 50: '#FFFAEB',
370
+ 100: '#FEF0C7',
371
+ 200: '#FEDF89',
372
+ 300: '#FEC84B',
373
+ 400: '#FDB022',
374
+ 500: '#F79009',
375
+ 600: '#DC6803',
376
+ 700: '#B54708',
377
+ 800: '#93370D',
378
+ 900: '#7A2E0E',
379
+ 950: '#4E1D09',
380
+ };
381
+ const DS_ERROR = {
382
+ 25: '#FFFBFA',
383
+ 50: '#FEF3F2',
384
+ 100: '#FEE4E2',
385
+ 200: '#FECDCA',
386
+ 300: '#FDA29B',
387
+ 400: '#F97066',
388
+ 500: '#F04438',
389
+ 600: '#D92D20',
390
+ 700: '#B42318',
391
+ 800: '#912018',
392
+ 900: '#7A271A',
393
+ 950: '#55160C',
394
+ };
395
+ /** Neutral scale. Note it stops at 900 in Figma; 0/25/950 are extrapolated
396
+ * because PrimeUIX requires a full 0–950 surface ramp. */
397
+ const DS_GRAY = {
398
+ 0: '#FFFFFF',
399
+ 25: '#FCFCFD',
400
+ 50: '#F9FAFB',
401
+ 100: '#F3F4F6',
402
+ 200: '#E5E7EB',
403
+ 300: '#D1D5DB',
404
+ 400: '#9CA3AF',
405
+ 500: '#6B7280',
406
+ 600: '#4B5563',
407
+ 700: '#374151',
408
+ 800: '#1F2937',
409
+ 900: '#111827',
410
+ 950: '#0A0F1C',
411
+ };
412
+ /**
413
+ * Semantic values that are not part of a ramp. Each one is a named Figma
414
+ * variable in its own right.
415
+ */
416
+ const DS_SEMANTIC = {
417
+ /** Default body / label text. Deliberately navy-black, not gray-900. */
418
+ textStrong: '#000B36',
419
+ textSecondary: '#3C5073',
420
+ textPlaceholder: '#B6BDCA',
421
+ textHelper: '#384250',
422
+ surface: '#FFFFFF',
423
+ border: '#E5E7EB',
424
+ /** Disabled is a colour swap, never an opacity fade. */
425
+ disabledBg: '#D2D6DB',
426
+ disabledText: '#6C7C96',
427
+ inputBorder: '#D2D6DB',
428
+ inputBorderHover: '#1F2A37',
429
+ inputBorderReadonly: '#CED3DC',
430
+ inputBgPressed: '#F3F4F6',
431
+ /** Destructive red. Distinct from the error ramp — this is the button colour. */
432
+ danger: '#A30000',
433
+ dangerSecondaryBg: '#FCDAD7',
434
+ dangerSecondaryBgHover: '#F8BAB5',
435
+ dangerSecondaryBgPressed: '#F3908A',
436
+ /** Tinted secondary button, expressed as primary-at-opacity. */
437
+ secondaryBg: 'rgba(24, 73, 169, 0.2)',
438
+ secondaryBgHover: 'rgba(24, 73, 169, 0.1)',
439
+ focusRing: '#1849A9',
440
+ focusOutline: '#FFFFFF',
441
+ tooltipBg: '#1A2236',
442
+ };
443
+ /** Figma effect styles. Never invent a shadow outside this set. */
444
+ const DS_SHADOW = {
445
+ xs: '0 1px 2px 0 rgba(16, 24, 40, 0.05)',
446
+ sm: '0 1px 3px 0 rgba(16, 24, 40, 0.10), 0 1px 2px 0 rgba(16, 24, 40, 0.06)',
447
+ md: '0 4px 8px -2px rgba(16, 24, 40, 0.10), 0 2px 4px -2px rgba(16, 24, 40, 0.06)',
448
+ lg: '0 12px 16px -6px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03)',
449
+ xl: '0 20px 24px -4px rgba(16, 24, 40, 0.08), 0 8px 8px -4px rgba(16, 24, 40, 0.03)',
450
+ '2xl': '0 24px 48px -12px rgba(16, 24, 40, 0.18)',
451
+ };
452
+ /**
453
+ * Radius scale. The DS names differ from the PrimeUIX names by one step —
454
+ * DS `radius-sm` (4px, the default for buttons and inputs) lands on PrimeUIX
455
+ * `md`, because that is the key PrimeNG components reference. Mapping them
456
+ * here keeps the shift in one place instead of spreading it across overrides.
457
+ */
458
+ const DS_RADIUS = {
459
+ none: '0',
460
+ /** DS radius-xs — code badges, small tags */
461
+ xs: '2px',
462
+ /** DS radius-xs..sm boundary */
463
+ sm: '4px',
464
+ /** DS radius-sm — buttons, inputs, dropdowns (PrimeNG's default reference) */
465
+ md: '4px',
466
+ /** DS radius-md — cards, tooltips, popovers */
467
+ lg: '8px',
468
+ /** DS radius-lg — modals, drawers */
469
+ xl: '16px',
470
+ };
471
+ /** Control heights, in px, from the Figma button spacing frame. */
472
+ const DS_CONTROL_HEIGHT = {
473
+ sm: 24,
474
+ md: 32,
475
+ lg: 40,
476
+ };
477
+ const DS_FONT_FAMILY = "'IBM Plex Sans Arabic', system-ui, 'Segoe UI', sans-serif";
478
+ /** Ordered chart series. Six is the hard maximum. */
479
+ const DS_CHART_SERIES = [
480
+ '#1849A9',
481
+ '#175CD3',
482
+ '#2E90FA',
483
+ '#53B1FD',
484
+ '#B2DDFF',
485
+ '#D1E9FF',
486
+ ];
487
+
488
+ /** Root class that gates the CSS half of the identity. */
489
+ const MT_DESIGN_IDENTITY_CLASS = 'mt-ds';
490
+ /** DS primary button background. Used when the host does not brand the app. */
491
+ const DS_DEFAULT_PRIMARY_COLOR = DS_BLUE[800];
492
+ /**
493
+ * PrimeUIX wants a 50–950 ramp; the DS publishes 25–950. Drop the 25 step and
494
+ * keep the rest — the ramp is dense enough that nothing downstream misses it.
495
+ */
496
+ function toPrimeRamp(scale) {
497
+ return {
498
+ 50: scale[50],
499
+ 100: scale[100],
500
+ 200: scale[200],
501
+ 300: scale[300],
502
+ 400: scale[400],
503
+ 500: scale[500],
504
+ 600: scale[600],
505
+ 700: scale[700],
506
+ 800: scale[800],
507
+ 900: scale[900],
508
+ 950: scale[950],
509
+ };
510
+ }
511
+ /**
512
+ * Control geometry, derived rather than hardcoded so the relationship between
513
+ * height, line-height and border stays visible:
514
+ *
515
+ * height = lineHeight + 2 * paddingY + 2 * border(1px)
516
+ *
517
+ * sm 24px = 18 + 2*2 + 2
518
+ * md 32px = 20 + 2*5 + 2 ← default
519
+ * lg 40px = 24 + 2*7 + 2
520
+ */
521
+ const FIELD = {
522
+ sm: { fontSize: '0.75rem', paddingX: '0.5rem', paddingY: '0.125rem' },
523
+ md: { fontSize: '0.875rem', paddingX: '0.5rem', paddingY: '0.3125rem' },
524
+ lg: { fontSize: '1rem', paddingX: '0.75rem', paddingY: '0.4375rem' },
525
+ };
526
+ /**
527
+ * The DS identity as a partial preset.
528
+ *
529
+ * @param primaryColor Optional brand override. Tenants that white-label the
530
+ * product still need their own colour; when omitted the DS blue is used.
531
+ * Note the DS itself treats the blue as fixed — an override is a deliberate
532
+ * deviation, not a supported DS variant.
533
+ */
534
+ function dsIdentityConfigs(primaryColor) {
535
+ const primary = primaryColor
536
+ ? // A branded run keeps the DS ramp shape but re-anchors the key steps, so
537
+ // hover/pressed stay one and two steps darker as the DS specifies.
538
+ { ...toPrimeRamp(DS_BLUE), 800: primaryColor }
539
+ : toPrimeRamp(DS_BLUE);
540
+ return {
541
+ primitive: {
542
+ borderRadius: { ...DS_RADIUS },
543
+ blue: toPrimeRamp(DS_BLUE),
544
+ indigo: toPrimeRamp(DS_INDIGO),
545
+ green: toPrimeRamp(DS_SUCCESS),
546
+ emerald: toPrimeRamp(DS_SUCCESS),
547
+ amber: toPrimeRamp(DS_WARNING),
548
+ orange: toPrimeRamp(DS_WARNING),
549
+ yellow: toPrimeRamp(DS_WARNING),
550
+ red: toPrimeRamp(DS_ERROR),
551
+ rose: toPrimeRamp(DS_ERROR),
552
+ gray: toPrimeRamp(DS_GRAY),
553
+ slate: toPrimeRamp(DS_GRAY),
554
+ zinc: toPrimeRamp(DS_GRAY),
555
+ },
556
+ semantic: {
557
+ primary,
558
+ transitionDuration: '0.2s',
559
+ /**
560
+ * Disabled is a colour swap, never a fade — a hard DS rule, because a
561
+ * faded control on a tinted surface stops meeting contrast at all.
562
+ */
563
+ disabledOpacity: '1',
564
+ iconSize: '1rem',
565
+ /**
566
+ * Inner 2px primary ring. The outer 3px white halo cannot be expressed as
567
+ * a token (PrimeUIX renders `focusRing` as a single outline) and is added
568
+ * in `ds-identity.css`.
569
+ */
570
+ focusRing: {
571
+ width: '2px',
572
+ style: 'solid',
573
+ color: '{primary.color}',
574
+ offset: '0',
575
+ shadow: 'none',
576
+ },
577
+ formField: {
578
+ paddingX: FIELD.md.paddingX,
579
+ paddingY: FIELD.md.paddingY,
580
+ sm: FIELD.sm,
581
+ lg: FIELD.lg,
582
+ borderRadius: '{border.radius.md}',
583
+ focusRing: {
584
+ width: '0',
585
+ style: 'none',
586
+ color: 'transparent',
587
+ offset: '0',
588
+ shadow: 'none',
589
+ },
590
+ transitionDuration: '{transition.duration}',
591
+ },
592
+ content: { borderRadius: '{border.radius.lg}' },
593
+ overlay: {
594
+ select: {
595
+ borderRadius: '{border.radius.lg}',
596
+ shadow: DS_SHADOW.md,
597
+ },
598
+ popover: {
599
+ borderRadius: '{border.radius.lg}',
600
+ padding: '0.75rem',
601
+ shadow: DS_SHADOW.md,
602
+ },
603
+ modal: {
604
+ // 8px, not the 16px the foundations table implies for "modals" —
605
+ // the DS Modal component itself ships radius-md and shadow-3xl.
606
+ borderRadius: '{border.radius.lg}',
607
+ padding: '1.5rem',
608
+ shadow: '0 32px 64px -12px rgba(16, 24, 40, 0.14)',
609
+ },
610
+ navigation: { shadow: DS_SHADOW.md },
611
+ },
612
+ list: {
613
+ padding: '0.25rem',
614
+ gap: '2px',
615
+ option: {
616
+ padding: '0.375rem 0.5rem',
617
+ borderRadius: '{border.radius.md}',
618
+ },
619
+ optionGroup: { padding: '0.375rem 0.5rem', fontWeight: '600' },
620
+ },
621
+ navigation: {
622
+ item: {
623
+ padding: '0.375rem 0.5rem',
624
+ borderRadius: '{border.radius.md}',
625
+ gap: '0.5rem',
626
+ },
627
+ },
628
+ colorScheme: {
629
+ light: {
630
+ surface: {
631
+ 0: DS_GRAY[0],
632
+ ...toPrimeRamp(DS_GRAY),
633
+ },
634
+ /**
635
+ * The DS anchors the primary button on blue-800, with hover and
636
+ * pressed one and two steps darker. Aura anchors on 500, so the whole
637
+ * triple is remapped rather than inherited.
638
+ */
639
+ primary: {
640
+ color: '{primary.800}',
641
+ contrastColor: DS_GRAY[50],
642
+ hoverColor: '{primary.900}',
643
+ activeColor: '{primary.950}',
644
+ },
645
+ highlight: {
646
+ background: '{primary.50}',
647
+ focusBackground: '{primary.100}',
648
+ color: '{primary.800}',
649
+ focusColor: '{primary.900}',
650
+ },
651
+ mask: { background: 'rgba(16, 24, 40, 0.6)', color: '{surface.200}' },
652
+ formField: {
653
+ background: DS_SEMANTIC.surface,
654
+ disabledBackground: DS_SEMANTIC.disabledBg,
655
+ filledBackground: '{surface.50}',
656
+ filledHoverBackground: '{surface.50}',
657
+ filledFocusBackground: '{surface.50}',
658
+ borderColor: DS_SEMANTIC.inputBorder,
659
+ hoverBorderColor: DS_SEMANTIC.inputBorderHover,
660
+ // The DS keeps the border neutral on focus and signals focus with
661
+ // the underline bar instead (see ds-identity.css).
662
+ focusBorderColor: DS_SEMANTIC.inputBorder,
663
+ invalidBorderColor: DS_SEMANTIC.danger,
664
+ color: DS_SEMANTIC.textStrong,
665
+ disabledColor: DS_SEMANTIC.disabledText,
666
+ placeholderColor: DS_SEMANTIC.textPlaceholder,
667
+ invalidPlaceholderColor: DS_SEMANTIC.danger,
668
+ floatLabelColor: '{surface.500}',
669
+ floatLabelFocusColor: '{primary.800}',
670
+ floatLabelActiveColor: '{surface.500}',
671
+ floatLabelInvalidColor: DS_SEMANTIC.danger,
672
+ iconColor: '{surface.500}',
673
+ shadow: 'none',
674
+ },
675
+ text: {
676
+ color: DS_SEMANTIC.textStrong,
677
+ hoverColor: DS_SEMANTIC.textStrong,
678
+ mutedColor: '{surface.500}',
679
+ hoverMutedColor: '{surface.600}',
680
+ },
681
+ content: {
682
+ background: DS_SEMANTIC.surface,
683
+ hoverBackground: '{surface.50}',
684
+ borderColor: DS_SEMANTIC.border,
685
+ color: '{text.color}',
686
+ hoverColor: '{text.hover.color}',
687
+ },
688
+ list: {
689
+ option: {
690
+ focusBackground: '{surface.100}',
691
+ selectedBackground: '{primary.50}',
692
+ selectedFocusBackground: '{primary.100}',
693
+ color: '{text.color}',
694
+ focusColor: '{text.color}',
695
+ selectedColor: '{primary.800}',
696
+ selectedFocusColor: '{primary.900}',
697
+ },
698
+ },
699
+ },
700
+ /**
701
+ * The DS does not publish a dark theme. Dark mode is still a shipped
702
+ * capability here, so this is an extrapolation: the ramps are the DS
703
+ * ramps, re-anchored to lighter primary steps for contrast on dark
704
+ * surfaces. Treat these values as ours, not as design-approved.
705
+ */
706
+ dark: {
707
+ surface: {
708
+ 0: DS_GRAY[0],
709
+ ...toPrimeRamp(DS_GRAY),
710
+ },
711
+ primary: {
712
+ color: '{primary.400}',
713
+ contrastColor: '{surface.950}',
714
+ hoverColor: '{primary.300}',
715
+ activeColor: '{primary.200}',
716
+ },
717
+ formField: {
718
+ borderColor: '{surface.600}',
719
+ hoverBorderColor: '{surface.500}',
720
+ focusBorderColor: '{surface.600}',
721
+ invalidBorderColor: '{red.400}',
722
+ disabledBackground: '{surface.700}',
723
+ disabledColor: '{surface.400}',
724
+ placeholderColor: '{surface.400}',
725
+ shadow: 'none',
726
+ },
727
+ mask: { background: 'rgba(0, 0, 0, 0.6)', color: '{surface.200}' },
728
+ },
729
+ },
730
+ },
731
+ components: {
732
+ button: {
733
+ root: {
734
+ borderRadius: '{border.radius.md}',
735
+ gap: '0.25rem',
736
+ paddingX: FIELD.md.paddingX,
737
+ paddingY: FIELD.md.paddingY,
738
+ iconOnlyWidth: '2rem',
739
+ sm: { ...FIELD.sm, iconOnlyWidth: '1.5rem' },
740
+ lg: { ...FIELD.lg, iconOnlyWidth: '2.5rem' },
741
+ label: { fontWeight: '500' },
742
+ badgeSize: '1rem',
743
+ },
744
+ colorScheme: {
745
+ light: {
746
+ root: {
747
+ /** DS "neutral" button — the standard Cancel / secondary action. */
748
+ secondary: {
749
+ background: '{surface.100}',
750
+ hoverBackground: '{surface.200}',
751
+ activeBackground: DS_SEMANTIC.disabledBg,
752
+ borderColor: '{surface.100}',
753
+ hoverBorderColor: '{surface.200}',
754
+ activeBorderColor: DS_SEMANTIC.disabledBg,
755
+ color: DS_SEMANTIC.textStrong,
756
+ hoverColor: DS_SEMANTIC.textStrong,
757
+ activeColor: DS_SEMANTIC.textStrong,
758
+ },
759
+ /** DS "danger-primary" — irreversible actions only. */
760
+ danger: {
761
+ background: DS_SEMANTIC.danger,
762
+ hoverBackground: '#8A0000',
763
+ activeBackground: '#6E0000',
764
+ borderColor: DS_SEMANTIC.danger,
765
+ hoverBorderColor: '#8A0000',
766
+ activeBorderColor: '#6E0000',
767
+ color: DS_GRAY[50],
768
+ hoverColor: DS_GRAY[50],
769
+ activeColor: DS_GRAY[50],
770
+ },
771
+ },
772
+ /** DS "transparent" / ghost — link-style text buttons. */
773
+ text: {
774
+ primary: {
775
+ color: DS_BLUE[700],
776
+ hoverBackground: '{primary.50}',
777
+ activeBackground: '{primary.100}',
778
+ },
779
+ danger: {
780
+ color: DS_SEMANTIC.danger,
781
+ hoverBackground: DS_SEMANTIC.dangerSecondaryBg,
782
+ activeBackground: DS_SEMANTIC.dangerSecondaryBgHover,
783
+ },
784
+ },
785
+ /** DS "secondary-solid" is a tint, closest to the outlined slot. */
786
+ outlined: {
787
+ primary: {
788
+ borderColor: '{primary.200}',
789
+ color: '{primary.800}',
790
+ hoverBackground: DS_SEMANTIC.secondaryBgHover,
791
+ activeBackground: DS_SEMANTIC.secondaryBg,
792
+ },
793
+ danger: {
794
+ borderColor: DS_SEMANTIC.dangerSecondaryBgPressed,
795
+ color: DS_SEMANTIC.danger,
796
+ hoverBackground: DS_SEMANTIC.dangerSecondaryBg,
797
+ activeBackground: DS_SEMANTIC.dangerSecondaryBgHover,
798
+ },
799
+ },
800
+ link: {
801
+ color: DS_BLUE[700],
802
+ hoverColor: DS_BLUE[600],
803
+ activeColor: DS_BLUE[800],
804
+ },
805
+ },
806
+ },
807
+ css: () => `
808
+ .p-button.p-button-icon-only { padding-inline: 0; }
809
+ /* Disabled is a colour swap, not a fade. */
810
+ .p-button:disabled {
811
+ background: ${DS_SEMANTIC.disabledBg};
812
+ border-color: ${DS_SEMANTIC.disabledBg};
813
+ color: ${DS_SEMANTIC.disabledText};
814
+ cursor: not-allowed;
815
+ }
816
+ .p-button.p-button-text:disabled,
817
+ .p-button.p-button-outlined:disabled {
818
+ background: transparent;
819
+ color: ${DS_SEMANTIC.disabledText};
820
+ }
821
+ `,
822
+ },
823
+ card: {
824
+ root: {
825
+ borderRadius: '{border.radius.lg}',
826
+ shadow: DS_SHADOW.sm,
827
+ },
828
+ body: { padding: '1rem', gap: '0.5rem' },
829
+ title: { fontSize: '1rem', fontWeight: '600' },
830
+ subtitle: { color: DS_SEMANTIC.textSecondary },
831
+ },
832
+ tabs: {
833
+ tab: {
834
+ padding: '0.5rem 0.75rem',
835
+ fontWeight: '500',
836
+ borderWidth: '0 0 2px 0',
837
+ },
838
+ activeBar: { height: '2px', bottom: '-2px' },
839
+ colorScheme: {
840
+ light: {
841
+ tab: {
842
+ color: '{surface.500}',
843
+ hoverColor: DS_SEMANTIC.textStrong,
844
+ activeColor: '{primary.800}',
845
+ borderColor: DS_SEMANTIC.border,
846
+ hoverBorderColor: '{surface.300}',
847
+ activeBorderColor: '{primary.800}',
848
+ },
849
+ activeBar: { background: '{primary.800}' },
850
+ },
851
+ },
852
+ },
853
+ datatable: {
854
+ headerCell: { padding: '0.5rem 0.75rem' },
855
+ bodyCell: { padding: '0.5rem 0.75rem' },
856
+ footerCell: { padding: '0.5rem 0.75rem' },
857
+ colorScheme: {
858
+ light: {
859
+ headerCell: {
860
+ background: '{surface.50}',
861
+ color: '{surface.600}',
862
+ borderColor: DS_SEMANTIC.border,
863
+ hoverBackground: '{surface.100}',
864
+ },
865
+ bodyCell: { borderColor: DS_SEMANTIC.border },
866
+ row: {
867
+ background: DS_SEMANTIC.surface,
868
+ hoverBackground: '{surface.50}',
869
+ color: DS_SEMANTIC.textStrong,
870
+ selectedBackground: '{primary.50}',
871
+ selectedColor: DS_SEMANTIC.textStrong,
872
+ },
873
+ },
874
+ },
875
+ },
876
+ tag: {
877
+ root: {
878
+ fontSize: '0.75rem',
879
+ fontWeight: '500',
880
+ padding: '0.125rem 0.5rem',
881
+ borderRadius: '{border.radius.md}',
882
+ },
883
+ colorScheme: {
884
+ light: {
885
+ primary: { background: DS_BLUE[100], color: DS_BLUE[700] },
886
+ secondary: { background: '{surface.100}', color: '{surface.700}' },
887
+ success: { background: DS_SUCCESS[100], color: DS_SUCCESS[700] },
888
+ info: { background: DS_BLUE[100], color: DS_BLUE[700] },
889
+ warn: { background: DS_WARNING[100], color: DS_WARNING[700] },
890
+ danger: { background: DS_ERROR[100], color: DS_ERROR[700] },
891
+ },
892
+ },
893
+ },
894
+ toast: {
895
+ root: { borderRadius: '{border.radius.lg}' },
896
+ },
897
+ tooltip: {
898
+ root: {
899
+ borderRadius: '6px',
900
+ padding: '0.5rem 0.75rem',
901
+ maxWidth: '20rem',
902
+ },
903
+ colorScheme: {
904
+ light: {
905
+ root: { background: DS_SEMANTIC.tooltipBg, color: '#ffffff' },
906
+ },
907
+ dark: {
908
+ root: { background: DS_SEMANTIC.tooltipBg, color: '#ffffff' },
909
+ },
910
+ },
911
+ },
912
+ progressbar: {
913
+ root: { borderRadius: '{border.radius.full}', height: '0.5rem' },
914
+ },
915
+ skeleton: {
916
+ colorScheme: {
917
+ light: { root: { background: '#e7e9ed' } },
918
+ },
919
+ },
920
+ avatar: {
921
+ root: { borderRadius: '{border.radius.full}' },
922
+ },
923
+ chip: {
924
+ root: { borderRadius: '{border.radius.full}' },
925
+ },
926
+ },
927
+ };
928
+ }
929
+ /** The DS chart ramp, for hosts that render charts outside PrimeNG. */
930
+ const dsChartSeries = DS_CHART_SERIES;
931
+ /**
932
+ * Adds or removes the root class that activates the CSS half of the identity.
933
+ * No-ops outside the browser so SSR builds stay safe.
934
+ */
935
+ function applyDesignIdentityClass(identity) {
936
+ if (typeof document === 'undefined')
937
+ return;
938
+ document.documentElement.classList.toggle(MT_DESIGN_IDENTITY_CLASS, identity === 'experimental');
939
+ }
940
+
941
+ const inputBorderRadius = '{border.radius.md}';
942
+ const toastStyle = {
943
+ // borderColor: '{surface.300}',
944
+ background: '{content.background}',
945
+ // color: '{surface.600}',
946
+ // closeButton: {
947
+ // hoverBackground: '{surface.100}',
948
+ // focusRing: {
949
+ // color: '{surface.600}',
950
+ // },
951
+ // },
952
+ };
953
+ /**
954
+ * Which identity the app is currently wearing. Tracked because the runtime
955
+ * colour helpers below have to anchor a generated ramp on a different step per
956
+ * identity — classic reads the brand colour as the 500 shade, the DS reads it
957
+ * as 800.
958
+ */
959
+ let activeDesignIdentity = 'classic';
960
+ function getMTDesignIdentity() {
961
+ return activeDesignIdentity;
962
+ }
963
+ function changePrimaryColor(color) {
964
+ const isDS = activeDesignIdentity === 'experimental';
965
+ const base = color || (isDS ? DS_DEFAULT_PRIMARY_COLOR : '#2AAEC0');
966
+ const anchor = isDS ? '800' : '500';
967
+ const palette = isDS
968
+ ? generateTailwindPalette(base, '800')
969
+ : generateTailwindPalette(base);
970
+ const shade = accessiblePrimaryShade(palette, anchor);
971
+ updatePreset({
972
+ semantic: {
973
+ primary: palette,
974
+ colorScheme: {
975
+ light: {
976
+ // Re-resolve which step filled controls use, for THIS colour.
977
+ //
978
+ // The bootstrap preset picks the step from whatever colour the app
979
+ // starts with, and a tenant's real brand arrives later — Brand
980
+ // Settings pushes it through here. Without recomputing, the step
981
+ // stayed the one chosen for the startup colour: the tenant's hue was
982
+ // still honoured (the token is a `{primary.N}` reference, so it
983
+ // follows the new ramp) but N was decided for a different colour, so
984
+ // a light brand could still fail AA and a dark one could render
985
+ // needlessly deep. Finding H-03 is only actually closed if this runs
986
+ // on the colour the tenant configured.
987
+ primary: {
988
+ color: `{primary.${shade}}`,
989
+ contrastColor: '#ffffff',
990
+ hoverColor: `{primary.${shade}}`,
991
+ activeColor: `{primary.${shade}}`,
992
+ },
993
+ },
994
+ },
995
+ },
996
+ });
997
+ }
998
+ function changeBackgroundColor(color) {
999
+ if (color) {
1000
+ const palette = generateTailwindPalette(color, '100');
1001
+ document.documentElement.style.setProperty('--app-background-light', palette['100']);
1002
+ document.documentElement.style.setProperty('--app-background-dark', palette['950']);
1003
+ }
1004
+ }
1005
+ function changeTextColor(color) {
1006
+ const palette = generateTailwindPalette(color ?? '#334155', '700');
1007
+ updatePreset({
1008
+ semantic: {
1009
+ colorScheme: {
1010
+ light: {
1011
+ text: {
1012
+ color: palette['700'],
1013
+ hoverColor: palette['800'],
1014
+ hoverMutedColor: palette['600'],
1015
+ mutedColor: palette['500'],
1016
+ },
1017
+ },
1018
+ dark: {
1019
+ text: {
1020
+ color: palette['0'],
1021
+ hoverColor: palette['0'],
1022
+ hoverMutedColor: palette['300'],
1023
+ mutedColor: palette['400'],
1024
+ },
1025
+ },
1026
+ },
1027
+ },
1028
+ });
1029
+ }
1030
+ /**
1031
+ * The palette step a filled primary control should use so white text on it
1032
+ * clears WCAG AA (4.5:1).
1033
+ *
1034
+ * Kept as a named helper because it is the whole of finding H-03: the shipped
1035
+ * default `#2AAEC0` gives white text 2.65:1, so Add / New / Filter / Apply /
1036
+ * Submit — the controls that most need to be legible — were the least legible
1037
+ * in the product, and every tenant who configured a light brand colour hit the
1038
+ * same wall. Darkening the shipped hex would have fixed exactly one tenant and
1039
+ * changed the product's colour; this keeps the hue and moves one step down the
1040
+ * ramp their own colour already generated. A brand that passes at 500 stays at
1041
+ * 500 and looks identical.
1042
+ */
1043
+ function accessiblePrimaryShade(palette, anchor = '500') {
1044
+ return pickAccessibleShade(palette, anchor, '#ffffff', WCAG_AA_NORMAL_TEXT);
1045
+ }
1046
+ const MTPreset = (themeOptions) => {
1047
+ const textPalette = generateTailwindPalette(themeOptions?.textColor ?? '#334155', '700');
1048
+ const primaryPalette = generateTailwindPalette(themeOptions?.primaryColor || '#2AAEC0');
1049
+ // Which shade filled controls use. See `accessiblePrimaryShade` — the tenant's
1050
+ // hue is untouched; only the step on their own ramp moves, and only when white
1051
+ // text would otherwise fail WCAG AA (finding H-03).
1052
+ const primaryActionShade = accessiblePrimaryShade(primaryPalette);
1053
+ const configs = {
1054
+ options: {
1055
+ prefix: 'mt',
1056
+ cssLayer: {
1057
+ name: 'primeng',
1058
+ order: 'theme, base, primeng',
1059
+ },
1060
+ },
1061
+ semantic: {
1062
+ colorScheme: {
1063
+ light: {
1064
+ // Filled primary surfaces resolve to the first shade whose contrast
1065
+ // with white text passes AA — usually 500, deeper only when the
1066
+ // tenant's brand is too light. Borders/icons keep reading `primary.500`
1067
+ // directly, so the brand accent itself is unchanged.
1068
+ primary: {
1069
+ color: `{primary.${primaryActionShade}}`,
1070
+ contrastColor: '#ffffff',
1071
+ hoverColor: `{primary.${primaryActionShade}}`,
1072
+ activeColor: `{primary.${primaryActionShade}}`,
1073
+ },
1074
+ text: {
1075
+ color: textPalette['700'],
1076
+ hoverColor: textPalette['800'],
1077
+ hoverMutedColor: textPalette['600'],
1078
+ mutedColor: textPalette['500'],
1079
+ },
1080
+ },
1081
+ dark: {
1082
+ text: {
1083
+ color: textPalette['0'],
1084
+ hoverColor: textPalette['0'],
1085
+ hoverMutedColor: textPalette['300'],
1086
+ mutedColor: textPalette['400'],
1087
+ },
1088
+ },
1089
+ },
1090
+ primary: primaryPalette,
1091
+ content: {
1092
+ borderRadius: '{border.radius.lg}',
1093
+ },
1094
+ formField: {
1095
+ borderRadius: inputBorderRadius,
1096
+ },
1097
+ },
1098
+ components: {
1099
+ autocomplete: {
1100
+ root: {
1101
+ borderRadius: inputBorderRadius,
1102
+ },
1103
+ },
1104
+ cascadeselect: {
1105
+ root: {
1106
+ borderRadius: inputBorderRadius,
1107
+ },
1108
+ },
1109
+ dialog: {
1110
+ header: {
1111
+ padding: '0',
1112
+ },
1113
+ content: {
1114
+ padding: '0',
1115
+ },
1116
+ footer: {
1117
+ padding: '0',
1118
+ },
1119
+ },
1120
+ toast: {
1121
+ root: {
1122
+ borderRadius: '{border.radius.xl}',
1123
+ },
1124
+ colorScheme: {
1125
+ light: {
1126
+ success: toastStyle,
1127
+ info: toastStyle,
1128
+ warn: toastStyle,
1129
+ error: toastStyle,
1130
+ secondary: toastStyle,
1131
+ },
1132
+ dark: {
1133
+ success: toastStyle,
1134
+ info: toastStyle,
1135
+ warn: toastStyle,
1136
+ error: toastStyle,
1137
+ secondary: toastStyle,
1138
+ },
1139
+ },
1140
+ },
1141
+ togglebutton: {
1142
+ root: {
1143
+ padding: '1px',
1144
+ borderRadius: '{border.radius.sm}',
1145
+ },
1146
+ colorScheme: {
1147
+ light: {
1148
+ root: {
1149
+ checkedColor: '{primary.500}',
1150
+ },
1151
+ },
1152
+ dark: {
1153
+ root: {
1154
+ checkedColor: '{primary.400}',
1155
+ },
1156
+ },
1157
+ },
1158
+ },
1159
+ button: {
1160
+ root: {
1161
+ borderRadius: '{border.radius.md}',
1162
+ gap: '0.25rem',
1163
+ },
1164
+ css: () => `
1165
+ .p-button.p-button-icon-only {
1166
+ padding-inline: 0;
1167
+ }
1168
+ `,
1169
+ },
1170
+ inputtext: {
1171
+ root: {
1172
+ borderRadius: inputBorderRadius,
1173
+ },
1174
+ },
1175
+ inputchips: {
1176
+ root: {
1177
+ borderRadius: inputBorderRadius,
1178
+ },
1179
+ },
1180
+ listbox: {
1181
+ root: {
1182
+ borderRadius: inputBorderRadius,
1183
+ },
1184
+ },
1185
+ avatar: {
1186
+ root: {
1187
+ borderRadius: '{border.radius.md}',
1188
+ },
1189
+ },
1190
+ tooltip: {
1191
+ css: () => `
1192
+ .p-tooltip .p-tooltip-text {
1193
+ font-size: 0.75rem;
1194
+ line-height: 1.2;
1195
+ }
1196
+ `,
1197
+ },
1198
+ selectbutton: {
1199
+ root: {
1200
+ borderRadius: '{border.radius.md}',
1201
+ },
1202
+ },
1203
+ multiselect: {
1204
+ root: {
1205
+ borderRadius: inputBorderRadius,
1206
+ },
1207
+ },
1208
+ textarea: {
1209
+ root: {
1210
+ borderRadius: inputBorderRadius,
1211
+ },
1212
+ },
1213
+ treeselect: {
1214
+ root: {
1215
+ borderRadius: inputBorderRadius,
1216
+ },
1217
+ },
1218
+ paginator: {
1219
+ root: {
1220
+ borderRadius: '{border.radius.md}',
1221
+ padding: '0',
1222
+ },
1223
+ navButton: {
1224
+ borderRadius: '{border.radius.sm}',
1225
+ },
1226
+ colorScheme: {
1227
+ light: {
1228
+ navButton: {
1229
+ color: '{surface.500}',
1230
+ hoverBackground: '{surface.50}',
1231
+ selectedBackground: '{primary.500}',
1232
+ selectedColor: '#ffffff',
1233
+ focusRing: {
1234
+ color: '{primary.100}',
1235
+ },
1236
+ },
1237
+ },
1238
+ dark: {
1239
+ navButton: {
1240
+ color: '{surface.200}',
1241
+ hoverBackground: 'transparent',
1242
+ selectedBackground: '{primary.500}',
1243
+ selectedColor: '#fff',
1244
+ focusRing: {
1245
+ color: '{primary.500}',
1246
+ },
1247
+ },
1248
+ },
1249
+ },
1250
+ css: () => `
1251
+ .p-paginator {
1252
+ --p-paginator-gap: 0.375rem;
1253
+ --p-paginator-nav-button-width: 1.75rem;
1254
+ --p-paginator-nav-button-height: 1.75rem;
1255
+ width: fit-content;
1256
+ padding: 0;
1257
+ border: 0;
1258
+ background: transparent;
1259
+ font-size: 0.875rem;
1260
+ }
1261
+
1262
+ .p-paginator-pages {
1263
+ display: flex;
1264
+ gap: var(--p-paginator-gap);
1265
+ }
1266
+
1267
+ .p-paginator-pages button,
1268
+ .p-paginator-prev,
1269
+ .p-paginator-next,
1270
+ .p-paginator-first,
1271
+ .p-paginator-last {
1272
+ min-width: var(--p-paginator-nav-button-width);
1273
+ height: var(--p-paginator-nav-button-height);
1274
+ border: 1px solid var(--p-surface-200);
1275
+ border-radius: 0.375rem;
1276
+ background: #fff;
1277
+ color: #667085;
1278
+ box-shadow: none;
1279
+ }
1280
+
1281
+ .p-paginator .p-paginator-page.p-paginator-page-selected {
1282
+ border-color: var(--p-primary-color);
1283
+ background: var(--p-primary-color);
1284
+ color: #fff;
1285
+ font-weight: 500;
1286
+ }
1287
+
1288
+ .p-paginator-pages button:not(.p-paginator-page-selected):hover,
1289
+ .p-paginator-prev:hover,
1290
+ .p-paginator-next:hover,
1291
+ .p-paginator-first:hover,
1292
+ .p-paginator-last:hover {
1293
+ background: var(--p-surface-50);
1294
+ }
1295
+
1296
+ .p-paginator .p-select {
1297
+ min-height: var(--p-paginator-nav-button-height);
1298
+ margin-inline-start: 0.5rem;
1299
+ border: 1px solid var(--p-surface-200);
1300
+ border-radius: 0.5rem;
1301
+ background: #fff;
1302
+ }
1303
+
1304
+ .p-paginator .p-select .p-select-label {
1305
+ padding: 0.375rem 0.625rem;
1306
+ font-size: 0.875rem;
1307
+ }
1308
+
1309
+ /* Dark Mode Styles */
1310
+ .dark .p-paginator-pages button,
1311
+ .dark .p-paginator-prev,
1312
+ .dark .p-paginator-next,
1313
+ .dark .p-paginator-first,
1314
+ .dark .p-paginator-last,
1315
+ .dark .p-paginator .p-select {
1316
+ border-color: var(--p-surface-500);
1317
+ background: var(--p-surface-900);
1318
+ }
1319
+
1320
+ .dark .p-paginator .p-paginator-page.p-paginator-page-selected {
1321
+ border-color: var(--p-primary-color);
1322
+ background: var(--p-primary-color);
1323
+ color: #fff;
1324
+ }
1325
+ `,
1326
+ },
1327
+ toggleswitch: {
1328
+ root: {
1329
+ width: '2.5rem',
1330
+ height: '1.4rem',
1331
+ },
1332
+ },
1333
+ select: {
1334
+ root: {
1335
+ borderRadius: inputBorderRadius,
1336
+ },
1337
+ optionGroup: {
1338
+ fontWeight: 'bold',
1339
+ padding: '6px 8px',
1340
+ background: '{surface.50}',
1341
+ color: '{primary.700}',
1342
+ },
1343
+ },
1344
+ // steps: {
1345
+ // item: {
1346
+ // link: {
1347
+ // gap: 'calc(50% + 0.25rem)',
1348
+ // },
1349
+ // number: {
1350
+ // font: {
1351
+ // size: '0.9rem',
1352
+ // },
1353
+ // active: {
1354
+ // color: 'white',
1355
+ // background: '{primary.500}',
1356
+ // border: {
1357
+ // color: '{primary.500}',
1358
+ // },
1359
+ // },
1360
+ // },
1361
+ // },
1362
+ // },
1363
+ },
1364
+ };
1365
+ // The DS layer is merged last so it wins on the tokens it names, while
1366
+ // everything it stays silent about keeps the classic behaviour.
1367
+ if ((themeOptions?.designIdentity ?? 'classic') === 'experimental') {
1368
+ return definePreset(Aura, configs, dsIdentityConfigs(themeOptions?.primaryColor));
1369
+ }
1370
+ return definePreset(Aura, configs);
1371
+ };
1372
+ /**
1373
+ * Switches identity at runtime — for the showcase toggle and for side-by-side
1374
+ * review. Replaces the active preset outright (rather than merging into it, as
1375
+ * `updatePreset` would) so switching back to classic is lossless.
1376
+ */
1377
+ function setMTDesignIdentity(identity, themeOptions) {
1378
+ activeDesignIdentity = identity;
1379
+ applyDesignIdentityClass(identity);
1380
+ usePreset(MTPreset({ ...themeOptions, designIdentity: identity }));
1381
+ }
1382
+ function provideMTComponents(themeOptions) {
1383
+ activeDesignIdentity = themeOptions?.designIdentity ?? 'classic';
1384
+ applyDesignIdentityClass(activeDesignIdentity);
1385
+ changeBackgroundColor(themeOptions?.backgroundColor);
1386
+ return providePrimeNG({
1387
+ zIndex: {
1388
+ modal: 1900,
1389
+ overlay: 1500,
1390
+ menu: 1500,
1391
+ tooltip: 1600,
1392
+ },
1393
+ theme: {
1394
+ preset: MTPreset(themeOptions),
1395
+ options: {
1396
+ darkModeSelector: '.dark',
1397
+ },
1398
+ },
1399
+ });
1400
+ }
1401
+
1402
+ function provideMTMessages() {
1403
+ return MessageService;
1404
+ }
1405
+
1406
+ function provideMTConfirmation() {
1407
+ return ConfirmationService;
1408
+ }
1409
+
1410
+ const DEFAULT_MT_DATE_FORMATS = {
1411
+ date: 'dd/MM/yyyy',
1412
+ dateTime: 'dd/MM/yyyy HH:mm',
1413
+ time: 'HH:mm',
1414
+ };
1415
+ const MT_DATE_FORMATS = new InjectionToken('MT_DATE_FORMATS', {
1416
+ factory: () => ({ ...DEFAULT_MT_DATE_FORMATS }),
1417
+ });
1418
+ /**
1419
+ * Converts .NET custom date/time format tokens to Angular `formatDate` (CLDR)
1420
+ * tokens. System-setting formats are authored in .NET convention (e.g. `hh:mm tt`),
1421
+ * but `formatDate` uses CLDR tokens where the AM/PM designator is `a`, not `tt`.
1422
+ * Every other token in the supported set (d, M, y, H, h, m, s) is identical between
1423
+ * the two, so only `tt`/`t` → `a` needs translating. Single-quoted literal sections
1424
+ * (e.g. `'at'`) are left untouched.
1425
+ */
1426
+ function toAngularDateFormat(format) {
1427
+ return format
1428
+ .split(/('[^']*')/g)
1429
+ .map((part) => (part.startsWith("'") ? part : part.replace(/t+/g, 'a')))
1430
+ .join('');
1431
+ }
1432
+ function provideMTDateFormats(formats) {
1433
+ return makeEnvironmentProviders([
1434
+ {
1435
+ provide: MT_DATE_FORMATS,
1436
+ useFactory: () => ({
1437
+ ...DEFAULT_MT_DATE_FORMATS,
1438
+ ...formats,
1439
+ }),
1440
+ },
1441
+ ]);
1442
+ }
1443
+
1444
+ class ValidatorConfig {
1445
+ type;
1446
+ value;
1447
+ message;
1448
+ customValidator;
1449
+ constructor(config) {
1450
+ this.type = config.type;
1451
+ this.value = config.value;
1452
+ this.message = config.message;
1453
+ this.customValidator = config.customValidator;
1454
+ }
1455
+ // Factory methods for common validators.
1456
+ //
1457
+ // IMPORTANT: none of these default `message` to a hardcoded English string.
1458
+ // buildValidators() wraps the underlying Angular validator (and keys the
1459
+ // resulting error) whenever `config.message` is truthy — a default here
1460
+ // would mean every consumer that omits a message still gets one baked in,
1461
+ // permanently shadowing ErrorMessagePipe's translated generic message for
1462
+ // that error type in every locale but English. Only pass a message when
1463
+ // you have a real, field-specific (and ideally already-translated) one to
1464
+ // show; otherwise leave it unset and let the pipe render the translated
1465
+ // generic copy.
1466
+ static required(message) {
1467
+ return new ValidatorConfig({ type: 'required', message });
1468
+ }
1469
+ static email(message) {
1470
+ return new ValidatorConfig({ type: 'email', message });
1471
+ }
1472
+ static minLength(length, message) {
1473
+ return new ValidatorConfig({ type: 'minLength', value: length, message });
1474
+ }
1475
+ static maxLength(length, message) {
1476
+ return new ValidatorConfig({ type: 'maxLength', value: length, message });
1477
+ }
1478
+ static min(value, message) {
1479
+ return new ValidatorConfig({ type: 'min', value, message });
1480
+ }
1481
+ static max(value, message) {
1482
+ return new ValidatorConfig({ type: 'max', value, message });
1483
+ }
1484
+ static pattern(pattern, message) {
1485
+ return new ValidatorConfig({ type: 'pattern', value: pattern, message });
1486
+ }
1487
+ static custom(validator, message = 'Invalid value') {
1488
+ return new ValidatorConfig({
1489
+ type: 'custom',
1490
+ customValidator: validator,
1491
+ message,
1492
+ });
1493
+ }
1494
+ }
1495
+ class BaseFieldConfig {
1496
+ key;
1497
+ label;
1498
+ type;
1499
+ required;
1500
+ disabled;
1501
+ readonly;
1502
+ hidden;
1503
+ placeholder;
1504
+ hint;
1505
+ cssClass;
1506
+ validators;
1507
+ order;
1508
+ colSpan;
1509
+ defaultValue;
1510
+ customTemplate;
1511
+ relations;
1512
+ formulaCondition;
1513
+ constructor(config) {
1514
+ this.key = config.key || 'Key';
1515
+ this.label = config.label || '';
1516
+ this.type = config.type;
1517
+ this.required = config.required || false;
1518
+ this.disabled = config.disabled || false;
1519
+ this.readonly = config.readonly || false;
1520
+ this.hidden = config.hidden || false;
1521
+ this.placeholder = config.placeholder || '';
1522
+ this.hint = config.hint || '';
1523
+ this.cssClass = config.cssClass || '';
1524
+ this.validators = config.validators || [];
1525
+ this.order = config.order || 0;
1526
+ this.relations = config.relations || [];
1527
+ this.formulaCondition = config.formulaCondition;
1528
+ this.colSpan = config.colSpan || 12;
1529
+ }
1530
+ }
1531
+ // Specific configurations for different field types
1532
+ class TextFieldConfig extends BaseFieldConfig {
1533
+ inputType;
1534
+ constructor(config) {
1535
+ super({ ...config, type: 'text' });
1536
+ this.inputType = config.inputType || 'text';
1537
+ }
1538
+ }
1539
+ class TextareaFieldConfig extends BaseFieldConfig {
1540
+ rows;
1541
+ autoResize;
1542
+ constructor(config) {
1543
+ super({ ...config, type: 'textarea' });
1544
+ this.rows = config.rows || 3;
1545
+ this.autoResize = config.autoResize || false;
1546
+ }
1547
+ }
1548
+ class SelectFieldConfig extends BaseFieldConfig {
1549
+ options;
1550
+ optionLabel;
1551
+ optionValue;
1552
+ group;
1553
+ optionGroupLabel;
1554
+ optionGroupChildren;
1555
+ multiple;
1556
+ filter;
1557
+ filterBy;
1558
+ filterPlaceholder;
1559
+ showClear;
1560
+ emptyMessage;
1561
+ size;
1562
+ hasPlaceholderPrefix;
1563
+ constructor(config) {
1564
+ super({ ...config, type: 'select' });
1565
+ this.options = config.options;
1566
+ this.optionLabel = config.optionLabel || 'label';
1567
+ this.optionValue = config.optionValue || 'value';
1568
+ this.group = config.group || false;
1569
+ this.optionGroupLabel = config.optionGroupLabel || 'label';
1570
+ this.optionGroupChildren = config.optionGroupChildren || 'items';
1571
+ this.multiple = config.multiple || false;
1572
+ this.filter = config.filter || false;
1573
+ this.filterBy = config.filterBy || '';
1574
+ this.filterPlaceholder = config.filterPlaceholder || 'Search...';
1575
+ this.showClear = config.showClear || false;
1576
+ this.emptyMessage = config.emptyMessage || 'No options available';
1577
+ this.size = config.size || '';
1578
+ this.hasPlaceholderPrefix =
1579
+ config.hasPlaceholderPrefix === undefined
1580
+ ? true
1581
+ : config.hasPlaceholderPrefix;
1582
+ }
1583
+ }
1584
+ class RadioButtonFieldConfig extends BaseFieldConfig {
1585
+ options;
1586
+ optionLabel;
1587
+ optionValue;
1588
+ orientation;
1589
+ constructor(config) {
1590
+ super({ ...config, type: 'radio-button' });
1591
+ this.options = config.options;
1592
+ this.optionLabel = config.optionLabel || 'label';
1593
+ this.optionValue = config.optionValue || 'value';
1594
+ this.orientation = config.orientation || 'vertical';
1595
+ }
1596
+ }
1597
+ class RadioCardsFieldConfig extends BaseFieldConfig {
1598
+ options;
1599
+ optionLabel;
1600
+ optionValue;
1601
+ size;
1602
+ constructor(config) {
1603
+ super({ ...config, type: 'radio-cards' });
1604
+ this.options = config.options;
1605
+ this.optionLabel = config.optionLabel || 'label';
1606
+ this.optionValue = config.optionValue || 'value';
1607
+ this.size = config.size || 'small';
1608
+ }
1609
+ }
1610
+ class UserSearchFieldConfig extends BaseFieldConfig {
1611
+ optionLabel;
1612
+ optionValue;
1613
+ size;
1614
+ apiUrl;
1615
+ context;
1616
+ isMultiple;
1617
+ hideUnlinkedHint;
1618
+ dataKey;
1619
+ paramName;
1620
+ minLength;
1621
+ constructor(config) {
1622
+ super({ ...config, type: 'user-search' });
1623
+ this.optionLabel = config.optionLabel || 'label';
1624
+ this.optionValue = config.optionValue || 'value';
1625
+ this.size = config.size || '';
1626
+ this.hint = config.hint || '';
1627
+ this.context = config.context || undefined;
1628
+ this.apiUrl = config.apiUrl || '';
1629
+ this.placeholder = config.placeholder || 'Search';
1630
+ this.isMultiple = config.isMultiple || false;
1631
+ this.hideUnlinkedHint = config.hideUnlinkedHint || false;
1632
+ this.dataKey = config.dataKey || 'data';
1633
+ this.paramName = config.paramName || 'query';
1634
+ this.minLength = config.minLength ?? 1;
1635
+ }
1636
+ }
1637
+ class LocationFieldConfig extends BaseFieldConfig {
1638
+ configuration;
1639
+ searchUrl;
1640
+ minLength;
1641
+ constructor(config) {
1642
+ super({ ...config, type: 'location' });
1643
+ this.configuration = config.configuration ?? null;
1644
+ this.searchUrl = config.searchUrl;
1645
+ this.minLength = config.minLength ?? 2;
1646
+ }
1647
+ }
1648
+ class UploadFileFieldConfig extends BaseFieldConfig {
1649
+ size;
1650
+ endPoint;
1651
+ userImgClass;
1652
+ shape;
1653
+ multiple;
1654
+ accept;
1655
+ fileSizeLimit;
1656
+ context;
1657
+ title;
1658
+ description;
1659
+ constructor(config) {
1660
+ super({ ...config, type: 'upload-file' });
1661
+ this.size = config.size || 'normal';
1662
+ this.endPoint = config.endPoint || 'uploader';
1663
+ this.userImgClass =
1664
+ config.userImgClass || 'w-25! h-25! text-4xl! text-gray-400!';
1665
+ this.shape = config.shape || 'field';
1666
+ this.multiple = config.multiple ?? false;
1667
+ this.accept = config.accept || '.pdf,.doc,.docx,.xlsx,image/*';
1668
+ this.fileSizeLimit = config.fileSizeLimit || undefined;
1669
+ this.context = config.context || undefined;
1670
+ this.title = config.title || 'Upload File';
1671
+ this.description = config.description || 'Click or drop a file to upload';
1672
+ }
1673
+ }
1674
+ class DateFieldConfig extends BaseFieldConfig {
1675
+ dateFormat;
1676
+ showTime;
1677
+ /** Edits the clock time only — no calendar. The value stays a full `Date`. */
1678
+ timeOnly;
1679
+ showSeconds;
1680
+ hourFormat;
1681
+ minDate;
1682
+ maxDate;
1683
+ disabledDates;
1684
+ disabledDays;
1685
+ yearRange;
1686
+ showIcon;
1687
+ icon;
1688
+ showButtonBar;
1689
+ showClear;
1690
+ inline;
1691
+ constructor(config) {
1692
+ super({ ...config, type: 'date' });
1693
+ this.dateFormat = config.dateFormat || 'yyyy-mm-dd';
1694
+ this.showTime = config.showTime || false;
1695
+ this.timeOnly = config.timeOnly || false;
1696
+ this.showSeconds = config.showSeconds || false;
1697
+ this.hourFormat = config.hourFormat || '24';
1698
+ this.minDate = config.minDate;
1699
+ this.maxDate = config.maxDate;
1700
+ this.disabledDates = config.disabledDates || [];
1701
+ this.disabledDays = config.disabledDays || [];
1702
+ this.yearRange = config.yearRange || '1900:2030';
1703
+ this.showIcon = config.showIcon || true;
1704
+ this.icon = config.icon || 'pi pi-calendar';
1705
+ this.showButtonBar = config.showButtonBar || false;
1706
+ this.showClear = config.showClear || true;
1707
+ this.inline = config.inline || false;
1708
+ }
1709
+ }
1710
+ class NumberFieldConfig extends BaseFieldConfig {
1711
+ min;
1712
+ max;
1713
+ step;
1714
+ prefix;
1715
+ suffix;
1716
+ currency;
1717
+ locale;
1718
+ minFractionDigits;
1719
+ maxFractionDigits;
1720
+ useGrouping;
1721
+ showButtons;
1722
+ buttonLayout;
1723
+ incrementButtonClass;
1724
+ decrementButtonClass;
1725
+ incrementButtonIcon;
1726
+ decrementButtonIcon;
1727
+ constructor(config) {
1728
+ super({ ...config, type: 'number' });
1729
+ this.min = config.min;
1730
+ this.max = config.max;
1731
+ this.step = config.step || 1;
1732
+ this.prefix = config.prefix;
1733
+ this.suffix = config.suffix;
1734
+ this.currency = config.currency;
1735
+ this.locale = config.locale;
1736
+ this.minFractionDigits = config.minFractionDigits;
1737
+ this.maxFractionDigits = config.maxFractionDigits;
1738
+ this.useGrouping = config.useGrouping || false;
1739
+ this.showButtons = config.showButtons || false;
1740
+ this.buttonLayout = config.buttonLayout || 'stacked';
1741
+ this.incrementButtonClass = config.incrementButtonClass;
1742
+ this.decrementButtonClass = config.decrementButtonClass;
1743
+ this.incrementButtonIcon = config.incrementButtonIcon;
1744
+ this.decrementButtonIcon = config.decrementButtonIcon;
1745
+ }
1746
+ }
1747
+ class SliderFieldConfig extends BaseFieldConfig {
1748
+ min;
1749
+ max;
1750
+ step;
1751
+ orientation;
1752
+ range;
1753
+ animate;
1754
+ unit;
1755
+ constructor(config) {
1756
+ super({ ...config, type: 'slider' });
1757
+ this.min = config.min || 0;
1758
+ this.max = config.max || 100;
1759
+ this.step = config.step || 1;
1760
+ this.orientation = config.orientation || 'horizontal';
1761
+ this.range = config.range || false;
1762
+ this.animate = config.animate || false;
1763
+ this.unit = config.unit || '';
1764
+ }
1765
+ }
1766
+ class MultiSelectFieldConfig extends BaseFieldConfig {
1767
+ options;
1768
+ optionLabel;
1769
+ optionValue;
1770
+ filter;
1771
+ filterBy;
1772
+ filterPlaceholder;
1773
+ showClear;
1774
+ emptyMessage;
1775
+ display;
1776
+ maxSelectedLabels;
1777
+ selectedItemsLabel;
1778
+ showToggleAll;
1779
+ resetFilterOnHide;
1780
+ constructor(config) {
1781
+ super({ ...config, type: 'multi-select' });
1782
+ this.options = config.options;
1783
+ this.optionLabel = config.optionLabel || 'label';
1784
+ this.optionValue = config.optionValue || 'value';
1785
+ this.filter = config.filter || false;
1786
+ this.filterBy = config.filterBy || '';
1787
+ this.filterPlaceholder = config.filterPlaceholder || 'Search...';
1788
+ this.showClear = config.showClear || false;
1789
+ this.emptyMessage = config.emptyMessage || 'No options available';
1790
+ this.display = config.display || 'comma';
1791
+ this.maxSelectedLabels = config.maxSelectedLabels || 3;
1792
+ this.selectedItemsLabel = config.selectedItemsLabel || '{0} items selected';
1793
+ this.showToggleAll = config.showToggleAll || true;
1794
+ this.resetFilterOnHide = config.resetFilterOnHide || false;
1795
+ }
1796
+ }
1797
+ class PickListFieldConfig extends BaseFieldConfig {
1798
+ options;
1799
+ optionLabel;
1800
+ optionValue;
1801
+ sourceHeader;
1802
+ targetHeader;
1803
+ showSourceControls;
1804
+ showTargetControls;
1805
+ showSourceFilter;
1806
+ showTargetFilter;
1807
+ filterBy;
1808
+ dataKey;
1809
+ dragdrop;
1810
+ responsive;
1811
+ breakpoint;
1812
+ constructor(config) {
1813
+ super({ ...config, type: 'pick-list' });
1814
+ this.options = config.options;
1815
+ this.optionLabel = config.optionLabel || 'label';
1816
+ this.optionValue = config.optionValue || 'value';
1817
+ this.sourceHeader = config.sourceHeader || 'Available';
1818
+ this.targetHeader = config.targetHeader || 'Selected';
1819
+ this.showSourceControls =
1820
+ config.showSourceControls !== undefined
1821
+ ? config.showSourceControls
1822
+ : true;
1823
+ this.showTargetControls =
1824
+ config.showTargetControls !== undefined
1825
+ ? config.showTargetControls
1826
+ : true;
1827
+ this.showSourceFilter =
1828
+ config.showSourceFilter !== undefined ? config.showSourceFilter : false;
1829
+ this.showTargetFilter =
1830
+ config.showTargetFilter !== undefined ? config.showTargetFilter : false;
1831
+ this.filterBy = config.filterBy || this.optionLabel;
1832
+ this.dataKey = config.dataKey || this.optionValue;
1833
+ this.dragdrop = config.dragdrop ?? false;
1834
+ this.responsive = config.responsive ?? true;
1835
+ }
1836
+ }
1837
+ class CheckboxFieldConfig extends BaseFieldConfig {
1838
+ binary;
1839
+ trueValue;
1840
+ falseValue;
1841
+ checkboxIcon;
1842
+ constructor(config) {
1843
+ super({ ...config, type: 'checkbox' });
1844
+ this.binary = config.binary !== false; // Default to true
1845
+ this.trueValue = config.trueValue !== undefined ? config.trueValue : true;
1846
+ this.falseValue =
1847
+ config.falseValue !== undefined ? config.falseValue : false;
1848
+ this.checkboxIcon = config.checkboxIcon;
1849
+ }
1850
+ }
1851
+ class ToggleFieldConfig extends BaseFieldConfig {
1852
+ toggleShape;
1853
+ icon;
1854
+ descriptionCard;
1855
+ constructor(config) {
1856
+ super({ ...config, type: 'toggle' });
1857
+ this.toggleShape = config.toggleShape ?? 'toggle';
1858
+ this.icon = config.icon;
1859
+ this.descriptionCard = config.descriptionCard;
1860
+ }
1861
+ }
1862
+ class EditorFieldConfig extends BaseFieldConfig {
1863
+ constructor(config) {
1864
+ super({ ...config, type: 'editor-field' });
1865
+ }
1866
+ }
1867
+ class ColorPickerFieldConfig extends BaseFieldConfig {
1868
+ format;
1869
+ inline;
1870
+ appendTo;
1871
+ variant;
1872
+ constructor(config) {
1873
+ super({ ...config, type: 'color-picker' });
1874
+ this.format = config.format || 'hex';
1875
+ this.inline = config.inline || false;
1876
+ this.appendTo = config.appendTo || 'body';
1877
+ this.variant = config.variant || 'outlined';
1878
+ }
1879
+ }
1880
+ class IconFieldConfig extends BaseFieldConfig {
1881
+ constructor(config) {
1882
+ super({ ...config, type: 'icon-field' });
1883
+ }
1884
+ }
1885
+ class SpacerFieldConfig extends BaseFieldConfig {
1886
+ constructor(config) {
1887
+ super({
1888
+ ...config,
1889
+ type: 'spacer',
1890
+ key: config.key || `spacer_${Date.now()}`,
1891
+ label: config.label || '',
1892
+ });
1893
+ }
1894
+ }
1895
+ class LookupMatrixFieldConfig extends BaseFieldConfig {
1896
+ xFieldKey;
1897
+ yFieldKey;
1898
+ xAxisLabel;
1899
+ yAxisLabel;
1900
+ xOptions;
1901
+ yOptions;
1902
+ cells;
1903
+ emptyMessage;
1904
+ constructor(config) {
1905
+ super({ ...config, type: 'lookup-matrix' });
1906
+ this.xFieldKey = config.xFieldKey;
1907
+ this.yFieldKey = config.yFieldKey;
1908
+ this.xAxisLabel = config.xAxisLabel || '';
1909
+ this.yAxisLabel = config.yAxisLabel;
1910
+ this.xOptions = config.xOptions || [];
1911
+ this.yOptions = config.yOptions;
1912
+ this.cells = config.cells || [];
1913
+ this.emptyMessage = config.emptyMessage || 'No matrix data available';
1914
+ }
1915
+ }
1916
+ class SchemaConnectionFieldConfig extends BaseFieldConfig {
1917
+ configuration;
1918
+ context;
1919
+ filter;
1920
+ constructor(config) {
1921
+ super({ ...config, type: 'schema-connection' });
1922
+ this.configuration = config.configuration;
1923
+ this.context = config.context || undefined;
1924
+ this.filter = config.filter ?? true;
1925
+ }
1926
+ }
1927
+ class SchedulePredecessorFieldConfig extends BaseFieldConfig {
1928
+ configuration;
1929
+ runtimeContext;
1930
+ constructor(config) {
1931
+ super({ ...config, type: 'predecessor' });
1932
+ this.configuration = config.configuration ?? null;
1933
+ this.runtimeContext = config.runtimeContext ?? null;
1934
+ }
1935
+ }
1936
+ class EntityListFieldConfig extends BaseFieldConfig {
1937
+ /** EntityList property id (used in the read endpoint route). */
1938
+ propertyId;
1939
+ /** Property configuration (sourceType, moduleId, access, snapshotMode, fields). */
1940
+ configuration;
1941
+ /** Runtime ids needed to call the read endpoint. */
1942
+ runtimeContext;
1943
+ context;
1944
+ constructor(config) {
1945
+ super({ ...config, type: 'entity-list' });
1946
+ this.propertyId = config.propertyId ?? null;
1947
+ this.configuration = config.configuration ?? null;
1948
+ this.runtimeContext = config.runtimeContext ?? null;
1949
+ this.context = config.context;
1950
+ }
1951
+ }
1952
+ class ScheduleItemSelectorFieldConfig extends BaseFieldConfig {
1953
+ /** Property key — used in the options endpoint route `forms/options/{propertyKey}`. */
1954
+ propertyKey;
1955
+ /** `Single` renders a single-select picker, `Multi` a multi-select picker. */
1956
+ selectionMode;
1957
+ /** Raw property configuration (selectionMode, scheduleModuleKey, etc.). */
1958
+ configuration;
1959
+ /** Runtime ids needed to call the options endpoint. */
1960
+ runtimeContext;
1961
+ context;
1962
+ constructor(config) {
1963
+ super({ ...config, type: 'schedule-item-selector' });
1964
+ this.propertyKey = config.propertyKey || config.key || '';
1965
+ this.selectionMode = config.selectionMode || 'Multi';
1966
+ this.configuration = config.configuration ?? null;
1967
+ this.runtimeContext = config.runtimeContext ?? null;
1968
+ this.context = config.context;
1969
+ }
1970
+ }
1971
+ class LookupModuleCheckListFieldConfig extends BaseFieldConfig {
1972
+ /** Lookup items rendered as collapsible checklist sections. */
1973
+ lookupOptions;
1974
+ /** Full lookup catalog passed through to the rich nested form renderer. */
1975
+ lookups;
1976
+ /** Module property keys/labels captured per checklist entry. */
1977
+ propertyFields;
1978
+ /** Scope module id whose form is loaded for each section. */
1979
+ scopeId;
1980
+ /** Property keys to render in each section form (`allowedFieldKeys`). */
1981
+ propertyKeys;
1982
+ /** Runtime ids needed to load each section form. */
1983
+ runtimeContext;
1984
+ /** Raw property configuration (lookup id, scope/module id, properties). */
1985
+ configuration;
1986
+ constructor(config) {
1987
+ super({ ...config, type: 'lookup-module-check-list' });
1988
+ this.lookupOptions = config.lookupOptions || [];
1989
+ this.lookups = config.lookups || [];
1990
+ this.propertyFields = config.propertyFields || [];
1991
+ this.scopeId = config.scopeId ?? null;
1992
+ this.propertyKeys = config.propertyKeys || [];
1993
+ this.runtimeContext = config.runtimeContext ?? null;
1994
+ this.configuration = config.configuration ?? null;
1995
+ }
1996
+ }
1997
+ function createCustomValidator(customValidator, message) {
1998
+ return (control) => {
1999
+ const result = customValidator(control.value, control);
2000
+ if (result instanceof Promise) {
2001
+ // Handle async validation
2002
+ result.then((isValid) => {
2003
+ if (!isValid) {
2004
+ control.setErrors({
2005
+ custom: { message: message || 'Invalid value' },
2006
+ });
2007
+ }
2008
+ });
2009
+ return null; // For async, return null initially
2010
+ }
2011
+ else {
2012
+ // Handle sync validation
2013
+ return result
2014
+ ? null
2015
+ : { custom: { message: message || 'Invalid value' } };
2016
+ }
2017
+ };
2018
+ }
2019
+ function wrapValidatorWithMessage(validator, errorKey, message) {
2020
+ return (control) => {
2021
+ const result = validator(control);
2022
+ if (result) {
2023
+ // Replace the default error with custom message
2024
+ return { [errorKey]: { ...result[Object.keys(result)[0]], message } };
2025
+ }
2026
+ return null;
2027
+ };
2028
+ }
2029
+ // DynamicFieldConfig = input.required<any>({
2030
+ // transform: (value: any) => this.transformToDateFieldConfig(value)
2031
+ // });
2032
+ // transformToDateFieldConfig(value: any){
2033
+ // return new TextFieldConfig()
2034
+ // }
2035
+
2036
+ /**
2037
+ * @deprecated Use direct `select()` + `computed()` pattern instead for better performance.
2038
+ *
2039
+ * **Problem with BaseFacade:**
2040
+ * - All computed signals depend on the full state, causing unnecessary recomputations
2041
+ * - Bypasses NGXS selector memoization
2042
+ * - Uses `as any` casting, losing type safety
2043
+ *
2044
+ * **New Pattern - Use slice-based selectors:**
2045
+ *
2046
+ * ```typescript
2047
+ * // In your State class - add slice selectors:
2048
+ * @Selector()
2049
+ * static getLoadingActive(state: MyStateModel): string[] {
2050
+ * return state.loadingActive;
2051
+ * }
2052
+ *
2053
+ * @Selector()
2054
+ * static getErrors(state: MyStateModel): Record<string, string | null> {
2055
+ * return state.errors;
2056
+ * }
2057
+ *
2058
+ * // In your Facade - don't extend BaseFacade:
2059
+ * @Injectable({ providedIn: 'root' })
2060
+ * export class MyFacade {
2061
+ * private readonly store = inject(Store);
2062
+ *
2063
+ * // Data selectors - memoized by NGXS
2064
+ * readonly items = select(MyState.getItems);
2065
+ *
2066
+ * // Loading/Error slices - memoized by NGXS
2067
+ * private readonly loadingActive = select(MyState.getLoadingActive);
2068
+ * private readonly errors = select(MyState.getErrors);
2069
+ *
2070
+ * // Loading signals - computed from slice (minimal reactivity)
2071
+ * readonly isLoadingItems = computed(() =>
2072
+ * this.loadingActive().includes(MyActionKey.GetItems)
2073
+ * );
2074
+ *
2075
+ * // Error signals - computed from slice (minimal reactivity)
2076
+ * readonly itemsError = computed(() =>
2077
+ * this.errors()[MyActionKey.GetItems] ?? null
2078
+ * );
2079
+ *
2080
+ * // Dispatchers
2081
+ * loadItems() {
2082
+ * return this.store.dispatch(new GetItems());
2083
+ * }
2084
+ * }
2085
+ * ```
2086
+ *
2087
+ * **Template Usage:**
2088
+ * ```html
2089
+ * @if (facade.isLoadingItems()) {
2090
+ * <loading-spinner />
2091
+ * } @else if (facade.itemsError(); as error) {
2092
+ * <error-alert>{{ error }}</error-alert>
2093
+ * } @else {
2094
+ * @for (item of facade.items(); track item.id) {
2095
+ * <item-card [item]="item" />
2096
+ * }
2097
+ * }
2098
+ * ```
2099
+ */
2100
+ class BaseFacade {
2101
+ /**
2102
+ * Creates a query object with separate signals for data, loading, and error states
2103
+ * Each property is its own signal for granular reactivity
2104
+ *
2105
+ * @example
2106
+ * readonly modulesQuery = this.query(
2107
+ * 'getModulesLoading',
2108
+ * (state) => state.allModules
2109
+ * );
2110
+ *
2111
+ * // In template - each is a separate signal:
2112
+ * @if (modulesQuery.isPending()) { Loading... }
2113
+ * @if (modulesQuery.error(); as error) { Error: {{ error }} }
2114
+ * @if (modulesQuery.data(); as modules) {
2115
+ * <div *ngFor="let m of modules">{{ m.title }}</div>
2116
+ * }
2117
+ */
2118
+ query(loadingKey, dataSelector) {
2119
+ const stateSignal = this.state();
2120
+ const isPending = computed(() => {
2121
+ const currentState = stateSignal();
2122
+ return currentState.loadingActive?.includes(loadingKey) ?? false;
2123
+ }, ...(ngDevMode ? [{ debugName: "isPending" }] : /* istanbul ignore next */ []));
2124
+ const error = computed(() => {
2125
+ const currentState = stateSignal();
2126
+ return currentState.errors?.[loadingKey] ?? null;
2127
+ }, ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
2128
+ const data = computed(() => {
2129
+ const currentState = stateSignal();
2130
+ const hasError = currentState.errors?.[loadingKey];
2131
+ return hasError ? null : dataSelector(currentState);
2132
+ }, ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
2133
+ const isSuccess = computed(() => !isPending() && !error() && data() !== null, ...(ngDevMode ? [{ debugName: "isSuccess" }] : /* istanbul ignore next */ []));
2134
+ const isError = computed(() => !!error(), ...(ngDevMode ? [{ debugName: "isError" }] : /* istanbul ignore next */ []));
2135
+ return {
2136
+ data,
2137
+ isPending,
2138
+ isSuccess,
2139
+ isError,
2140
+ error,
2141
+ };
2142
+ }
2143
+ /**
2144
+ * Creates a loading signal for a specific operation
2145
+ */
2146
+ loading(loadingKey) {
2147
+ const stateSignal = this.state();
2148
+ return computed(() => {
2149
+ const currentState = stateSignal();
2150
+ return currentState.loadingActive?.includes(loadingKey) ?? false;
2151
+ });
2152
+ }
2153
+ /**
2154
+ * Creates an error signal for a specific operation
2155
+ */
2156
+ errorSignal(loadingKey) {
2157
+ const stateSignal = this.state();
2158
+ return computed(() => {
2159
+ const currentState = stateSignal();
2160
+ return currentState.errors?.[loadingKey] ?? null;
2161
+ });
2162
+ }
2163
+ }
2164
+
2165
+ function createEntityAdapter() {
2166
+ return {
2167
+ addOne: (state, entity) => [...state, entity],
2168
+ upsertOne: (state, entity, uniqueKey = 'id') => {
2169
+ const key = entity[uniqueKey];
2170
+ if (key == null)
2171
+ return state;
2172
+ const index = state.findIndex((e) => e[uniqueKey] === key);
2173
+ if (index === -1) {
2174
+ return [...state, entity];
2175
+ }
2176
+ const clone = [...state];
2177
+ clone[index] = entity;
2178
+ return clone;
2179
+ },
2180
+ updateOne: (state, id, changes, uniqueKey = 'id') => state.map((e) => (e[uniqueKey] === id ? { ...e, ...changes } : e)),
2181
+ removeOne: (state, id, uniqueKey = 'id') => state.filter((e) => e[uniqueKey] !== id),
2182
+ setAll: (_state, entities) => [...entities],
2183
+ };
2184
+ }
2185
+
2186
+ function startLoading(ctx, loadingName) {
2187
+ const { loadingActive, errors } = ctx.getState();
2188
+ if (!loadingActive.includes(loadingName)) {
2189
+ ctx.patchState({
2190
+ loadingActive: [...loadingActive, loadingName],
2191
+ });
2192
+ }
2193
+ if (errors && errors[loadingName]) {
2194
+ const { [loadingName]: _removed, ...rest } = errors;
2195
+ ctx.patchState({ errors: rest });
2196
+ }
2197
+ }
2198
+ function endLoading(ctx, loadingName) {
2199
+ const { loadingActive } = ctx.getState();
2200
+ ctx.patchState({
2201
+ loadingActive: loadingActive.filter((name) => name !== loadingName),
2202
+ });
2203
+ }
2204
+ function setLoadingError(ctx, loadingName, message) {
2205
+ const { errors } = ctx.getState();
2206
+ ctx.patchState({
2207
+ errors: { ...errors, [loadingName]: message },
2208
+ });
2209
+ }
2210
+
2211
+ function handleApiRequest(config) {
2212
+ const { ctx, key, request$, onSuccess, onError, errorMessage } = config;
2213
+ startLoading(ctx, key);
2214
+ return request$.pipe(tap((response) => {
2215
+ const state = ctx.getState();
2216
+ const patch = onSuccess(response, state);
2217
+ if (patch) {
2218
+ ctx.patchState(patch);
2219
+ }
2220
+ }), catchError((error) => {
2221
+ const state = ctx.getState();
2222
+ const message = error?.error?.message ?? error?.message ?? errorMessage;
2223
+ setLoadingError(ctx, key, message);
2224
+ // Call onError callback if provided
2225
+ if (onError) {
2226
+ const patch = onError(error, state);
2227
+ if (patch) {
2228
+ ctx.patchState(patch);
2229
+ }
2230
+ }
2231
+ throw error;
2232
+ }), finalize(() => endLoading(ctx, key)));
2233
+ }
2234
+
2235
+ /**
2236
+ * T = entity type (Module, User, ...)
2237
+ * TState = full state model (must include LoadingStateShape)
2238
+ * TLoad = union type of loading keys for this feature
2239
+ */
2240
+ class CrudStateBase {
2241
+ adapter = createEntityAdapter();
2242
+ /**
2243
+ * Helper to create default updateState function
2244
+ */
2245
+ getDefaultUpdateState(stateProperty) {
2246
+ // Try to extract the property name from the stateProperty function
2247
+ const funcStr = stateProperty.toString();
2248
+ const match = funcStr.match(/\.([a-zA-Z_$][a-zA-Z0-9_$]*)/); // Match .propertyName
2249
+ const key = match ? match[1] : 'items';
2250
+ return (state, items) => ({ [key]: items });
2251
+ }
2252
+ /**
2253
+ * @deprecated Use `handleApiRequest` directly with `onSuccess` callback.
2254
+ * The `load()` method provides no significant benefit over `handleApiRequest`.
2255
+ *
2256
+ * @example
2257
+ * // Instead of this.load(), use:
2258
+ * return handleApiRequest({
2259
+ * ctx,
2260
+ * key: ActionKey.GetItems,
2261
+ * request$: req$,
2262
+ * onSuccess: (response) => ({
2263
+ * items: response.data ?? [],
2264
+ * }),
2265
+ * });
2266
+ */
2267
+ load(ctx, config) {
2268
+ return handleApiRequest({
2269
+ ctx,
2270
+ key: config.key,
2271
+ request$: config.request$,
2272
+ onSuccess: (response, state) => {
2273
+ const data = config.transform
2274
+ ? config.transform(response.data)
2275
+ : response.data;
2276
+ // If stateProperty provided, use adapter for array operations
2277
+ if (config.stateProperty) {
2278
+ const items = this.adapter.setAll(config.stateProperty(state), data);
2279
+ const updateState = config.updateState ??
2280
+ this.getDefaultUpdateState(config.stateProperty);
2281
+ return updateState(state, items);
2282
+ }
2283
+ // Otherwise, use custom updateState directly
2284
+ if (config.updateState) {
2285
+ return config.updateState(state, data);
2286
+ }
2287
+ throw new Error('Either stateProperty or updateState must be provided');
2288
+ },
2289
+ onError: config.onError,
2290
+ errorMessage: config.errorMessage ?? 'Failed to load data',
2291
+ });
2292
+ }
2293
+ /**
2294
+ * Create one entity with config object
2295
+ */
2296
+ create(ctx, config) {
2297
+ const updateState = config.updateState ?? this.getDefaultUpdateState(config.stateProperty);
2298
+ return handleApiRequest({
2299
+ ctx,
2300
+ key: config.key,
2301
+ request$: config.request$,
2302
+ onSuccess: (response, state) => {
2303
+ const entity = config.transform
2304
+ ? config.transform(response.data)
2305
+ : response.data;
2306
+ const items = this.adapter.addOne(config.stateProperty(state), entity);
2307
+ return updateState(state, items);
2308
+ },
2309
+ onError: config.onError,
2310
+ errorMessage: config.errorMessage ?? 'Failed to create item',
2311
+ });
2312
+ }
2313
+ /**
2314
+ * Update one entity with config object
2315
+ */
2316
+ update(ctx, config) {
2317
+ const updateState = config.updateState ?? this.getDefaultUpdateState(config.stateProperty);
2318
+ return handleApiRequest({
2319
+ ctx,
2320
+ key: config.key,
2321
+ request$: config.request$,
2322
+ onSuccess: (response, state) => {
2323
+ const entity = config.transform
2324
+ ? config.transform(response.data)
2325
+ : response.data;
2326
+ const items = this.adapter.upsertOne(config.stateProperty(state), entity, config.uniqueKey);
2327
+ return updateState(state, items);
2328
+ },
2329
+ onError: config.onError,
2330
+ errorMessage: config.errorMessage ?? 'Failed to update item',
2331
+ });
2332
+ }
2333
+ /**
2334
+ * Delete one entity with config object
2335
+ */
2336
+ delete(ctx, config) {
2337
+ const updateState = config.updateState ?? this.getDefaultUpdateState(config.stateProperty);
2338
+ return handleApiRequest({
2339
+ ctx,
2340
+ key: config.key,
2341
+ request$: config.request$,
2342
+ onSuccess: (_response, state) => {
2343
+ const items = this.adapter.removeOne(config.stateProperty(state), config.id, config.uniqueKey);
2344
+ return updateState(state, items);
2345
+ },
2346
+ onError: config.onError,
2347
+ errorMessage: config.errorMessage ?? 'Failed to delete item',
2348
+ });
2349
+ }
2350
+ }
2351
+
2352
+ function isInvalid(control) {
2353
+ if (!control)
2354
+ return false;
2355
+ return control && control?.invalid && control?.touched;
2356
+ }
2357
+
2358
+ /**
2359
+ * Shared HTTP context token for request configuration.
2360
+ * Used by interceptors to determine base URL routing.
2361
+ *
2362
+ * @example
2363
+ * ```typescript
2364
+ * import { REQUEST_CONTEXT } from '@masterteam/components';
2365
+ *
2366
+ * // In a service
2367
+ * private context = new HttpContext().set(REQUEST_CONTEXT, { useBaseUrl: true });
2368
+ *
2369
+ * getMetadata(): Observable<any> {
2370
+ * return this.http.get('metadata', { context: this.context });
2371
+ * }
2372
+ *
2373
+ * // In interceptor
2374
+ * const config = req.context.get(REQUEST_CONTEXT);
2375
+ * if (config?.useBaseUrl) {
2376
+ * // Use base URL
2377
+ * }
2378
+ * ```
2379
+ */
2380
+ const REQUEST_CONTEXT = new HttpContextToken(() => ({ useBaseUrl: false }));
2381
+
2382
+ /**
2383
+ * Stable DOM ids for form fields.
2384
+ *
2385
+ * Every field component used to bind `[id]="ngControl?.name || label()"`. Used
2386
+ * inside a reactive form that resolves, but a stand-alone field with no control
2387
+ * and no label produced `id="undefined"` — literally, because Angular
2388
+ * stringifies. The global search input was exactly that case, which is why it
2389
+ * also had no associated `<label>` and reported as unlabelled in the
2390
+ * accessibility tree (findings L-03 and H-04).
2391
+ *
2392
+ * `slider-field` already solved this locally; this is that solution extracted so
2393
+ * the six components that got it wrong share one implementation instead of six
2394
+ * near-copies.
2395
+ */
2396
+ let nextUniqueId = 0;
2397
+ /** A process-unique fallback id, e.g. `mt-text-field-3`. */
2398
+ function nextFieldId(prefix) {
2399
+ return `${prefix}-${nextUniqueId++}`;
2400
+ }
2401
+ /**
2402
+ * The id a field should render, in preference order: the reactive form control
2403
+ * name, then a slug of the visible label, then the generated fallback.
2404
+ *
2405
+ * Never returns an empty string or `"undefined"` — a label/input pair is only
2406
+ * associated if the id is real, so the fallback matters more than it looks.
2407
+ */
2408
+ function resolveFieldId(controlName, label, fallbackId) {
2409
+ const name = controlName?.toString().trim();
2410
+ if (name) {
2411
+ return name;
2412
+ }
2413
+ const slug = label?.trim().toLowerCase().replace(/\s+/g, '-');
2414
+ return slug || fallbackId;
2415
+ }
2416
+
2417
+ /**
2418
+ * Helpers for wall-clock values — the `HH:mm:ss` shape a `Time` property
2419
+ * stores. A time of day carries no calendar date and no timezone, so it is
2420
+ * never serialized as an instant: `new Date('09:30:00')` is `Invalid Date`,
2421
+ * and pushing the clock through UTC would shift it by the viewer's offset.
2422
+ */
2423
+ const CLOCK_TIME_PATTERN = /^(\d{1,2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?$/;
2424
+ /**
2425
+ * Parse a bare `H:mm`, `HH:mm`, or `HH:mm:ss` string — a trailing fractional
2426
+ * second, as .NET `TimeOnly`/`TimeSpan` may emit, is ignored. Returns `null`
2427
+ * for anything else, including full timestamps, which callers parse as dates.
2428
+ */
2429
+ function parseClockTime(value) {
2430
+ if (typeof value !== 'string')
2431
+ return null;
2432
+ const match = CLOCK_TIME_PATTERN.exec(value.trim());
2433
+ if (!match)
2434
+ return null;
2435
+ const hours = Number(match[1]);
2436
+ const minutes = Number(match[2]);
2437
+ const seconds = match[3] ? Number(match[3]) : 0;
2438
+ if (hours > 23 || minutes > 59 || seconds > 59)
2439
+ return null;
2440
+ return { hours, minutes, seconds };
2441
+ }
2442
+ /** Read the local wall-clock time off a `Date`, or `null` for an invalid one. */
2443
+ function toClockTimeParts(date) {
2444
+ if (Number.isNaN(date.getTime()))
2445
+ return null;
2446
+ return {
2447
+ hours: date.getHours(),
2448
+ minutes: date.getMinutes(),
2449
+ seconds: date.getSeconds(),
2450
+ };
2451
+ }
2452
+ /** Format a wall-clock time as the `HH:mm:ss` text the backend stores. */
2453
+ function formatClockTime(parts) {
2454
+ return [parts.hours, parts.minutes, parts.seconds]
2455
+ .map((part) => part.toString().padStart(2, '0'))
2456
+ .join(':');
2457
+ }
2458
+ /** Seconds since midnight — the comparable form of a wall-clock time. */
2459
+ function clockTimeToSeconds(parts) {
2460
+ return parts.hours * 3600 + parts.minutes * 60 + parts.seconds;
2461
+ }
2462
+
2463
+ class MTDateFormatPipe {
2464
+ locale = inject(LOCALE_ID);
2465
+ formats = inject(MT_DATE_FORMATS);
2466
+ transform(value, type = 'date') {
2467
+ if (value === null || value === undefined || value === '') {
2468
+ return '';
2469
+ }
2470
+ try {
2471
+ // A calendar date and a wall clock both carry no timezone of their own,
2472
+ // so they are pinned to `+0000` and rendered exactly as stored.
2473
+ const zonelessValue = type === 'date' && typeof value === 'string'
2474
+ ? parseDateOnlyValue(value)
2475
+ : type === 'time'
2476
+ ? parseClockOnlyValue(value)
2477
+ : null;
2478
+ return formatDate(zonelessValue ?? value, toAngularDateFormat(this.formats[type] ?? this.formats.date), this.locale, zonelessValue ? '+0000' : this.formats.timezone);
2479
+ }
2480
+ catch {
2481
+ return String(value);
2482
+ }
2483
+ }
2484
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MTDateFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2485
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.8", ngImport: i0, type: MTDateFormatPipe, isStandalone: true, name: "mtDateFormat" });
2486
+ }
2487
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MTDateFormatPipe, decorators: [{
2488
+ type: Pipe,
2489
+ args: [{
2490
+ name: 'mtDateFormat',
2491
+ standalone: true,
2492
+ }]
2493
+ }] });
2494
+ /**
2495
+ * Keep a wall-clock time (`HH:mm:ss`, the shape a `Time` property stores)
2496
+ * independent from both browser and configured zones. Values still stored as a
2497
+ * full instant fall through to the normal timezone-aware path.
2498
+ */
2499
+ function parseClockOnlyValue(value) {
2500
+ const clockTime = parseClockTime(value);
2501
+ if (!clockTime)
2502
+ return null;
2503
+ const parsed = new Date(0);
2504
+ parsed.setUTCHours(clockTime.hours, clockTime.minutes, clockTime.seconds, 0);
2505
+ return parsed;
2506
+ }
2507
+ /** Keep a calendar date independent from both browser and configured zones. */
2508
+ function parseDateOnlyValue(value) {
2509
+ const match = /^(\d{4})-(\d{2})-(\d{2})(?=$|T)/.exec(value);
2510
+ if (!match)
2511
+ return null;
2512
+ const year = Number(match[1]);
2513
+ const monthIndex = Number(match[2]) - 1;
2514
+ const day = Number(match[3]);
2515
+ const parsed = new Date(0);
2516
+ parsed.setUTCFullYear(year, monthIndex, day);
2517
+ parsed.setUTCHours(0, 0, 0, 0);
2518
+ if (parsed.getUTCFullYear() !== year ||
2519
+ parsed.getUTCMonth() !== monthIndex ||
2520
+ parsed.getUTCDate() !== day) {
2521
+ throw new RangeError(`Invalid date-only value: ${value}`);
2522
+ }
2523
+ return parsed;
2524
+ }
2525
+
2526
+ /*
2527
+ * Public API Surface of components
2528
+ */
2529
+ // Config
2530
+
2531
+ /**
2532
+ * Generated bundle index. Do not edit.
2533
+ */
2534
+
2535
+ export { BaseFacade, BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, CrudStateBase, DEFAULT_MT_DATE_FORMATS, DS_BLUE, DS_CHART_SERIES, DS_CONTROL_HEIGHT, DS_DEFAULT_PRIMARY_COLOR, DS_ERROR, DS_FONT_FAMILY, DS_GRAY, DS_INDIGO, DS_RADIUS, DS_SEMANTIC, DS_SHADOW, DS_SUCCESS, DS_WARNING, DateFieldConfig, EditorFieldConfig, EntityListFieldConfig, IconFieldConfig, LocationFieldConfig, LookupMatrixFieldConfig, LookupModuleCheckListFieldConfig, MTDateFormatPipe, MT_DATE_FORMATS, MT_DESIGN_IDENTITY_CLASS, MultiSelectFieldConfig, NumberFieldConfig, PickListFieldConfig, READABLE_DARK_INK, REQUEST_CONTEXT, RadioButtonFieldConfig, RadioCardsFieldConfig, ScheduleItemSelectorFieldConfig, SchedulePredecessorFieldConfig, SchemaConnectionFieldConfig, SelectFieldConfig, SliderFieldConfig, SpacerFieldConfig, TextFieldConfig, TextareaFieldConfig, ToggleFieldConfig, UploadFileFieldConfig, UserSearchFieldConfig, ValidatorConfig, WCAG_AA_NORMAL_TEXT, applyDesignIdentityClass, changeBackgroundColor, changePrimaryColor, changeTextColor, clockTimeToSeconds, contrastRatio, createCustomValidator, createEntityAdapter, dsChartSeries, dsIdentityConfigs, endLoading, formatClockTime, generateTailwindPalette, getContrastColor, getLightColor, getMTDesignIdentity, handleApiRequest, isInvalid, nextFieldId, parseClockTime, pickAccessibleShade, provideMTComponents, provideMTConfirmation, provideMTDateFormats, provideMTMessages, readableTextOn, relativeLuminance, resolveFieldId, setLoadingError, setMTDesignIdentity, startLoading, toAngularDateFormat, toClockTimeParts, wrapValidatorWithMessage };
2536
+ //# sourceMappingURL=masterteam-components.mjs.map