@masterteam/components 0.0.265 → 0.0.266
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.
- package/assets/common.css +2 -309
- package/fesm2022/masterteam-components-avatar-text.mjs +46 -0
- package/fesm2022/masterteam-components-avatar-text.mjs.map +1 -0
- package/fesm2022/masterteam-components-avatar.mjs +50 -0
- package/fesm2022/masterteam-components-avatar.mjs.map +1 -0
- package/fesm2022/masterteam-components-breadcrumb.mjs +27 -0
- package/fesm2022/masterteam-components-breadcrumb.mjs.map +1 -0
- package/fesm2022/masterteam-components-business-fields.mjs +1907 -0
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -0
- package/fesm2022/masterteam-components-button-group.mjs +20 -0
- package/fesm2022/masterteam-components-button-group.mjs.map +1 -0
- package/fesm2022/masterteam-components-button.mjs +82 -0
- package/fesm2022/masterteam-components-button.mjs.map +1 -0
- package/fesm2022/masterteam-components-card.mjs +28 -0
- package/fesm2022/masterteam-components-card.mjs.map +1 -0
- package/fesm2022/masterteam-components-checkbox-field.mjs +92 -0
- package/fesm2022/masterteam-components-checkbox-field.mjs.map +1 -0
- package/fesm2022/masterteam-components-chip.mjs +39 -0
- package/fesm2022/masterteam-components-chip.mjs.map +1 -0
- package/fesm2022/masterteam-components-client-page-menu.mjs +153 -0
- package/fesm2022/masterteam-components-client-page-menu.mjs.map +1 -0
- package/fesm2022/masterteam-components-client-page.mjs +413 -0
- package/fesm2022/masterteam-components-client-page.mjs.map +1 -0
- package/fesm2022/masterteam-components-color-picker-field.mjs +106 -0
- package/fesm2022/masterteam-components-color-picker-field.mjs.map +1 -0
- package/fesm2022/masterteam-components-confirmation.mjs +98 -0
- package/fesm2022/masterteam-components-confirmation.mjs.map +1 -0
- package/fesm2022/masterteam-components-date-field.mjs +158 -0
- package/fesm2022/masterteam-components-date-field.mjs.map +1 -0
- package/fesm2022/masterteam-components-dialog.mjs +33 -0
- package/fesm2022/masterteam-components-dialog.mjs.map +1 -0
- package/fesm2022/masterteam-components-drawer.mjs +268 -0
- package/fesm2022/masterteam-components-drawer.mjs.map +1 -0
- package/fesm2022/masterteam-components-dynamic-drawer.mjs +608 -0
- package/fesm2022/masterteam-components-dynamic-drawer.mjs.map +1 -0
- package/fesm2022/masterteam-components-editor-field.mjs +103 -0
- package/fesm2022/masterteam-components-editor-field.mjs.map +1 -0
- package/fesm2022/masterteam-components-empty-state.mjs +53 -0
- package/fesm2022/masterteam-components-empty-state.mjs.map +1 -0
- package/fesm2022/masterteam-components-entities.mjs +2242 -0
- package/fesm2022/masterteam-components-entities.mjs.map +1 -0
- package/fesm2022/masterteam-components-field-validation.mjs +237 -0
- package/fesm2022/masterteam-components-field-validation.mjs.map +1 -0
- package/fesm2022/masterteam-components-formula.mjs +3848 -0
- package/fesm2022/masterteam-components-formula.mjs.map +1 -0
- package/fesm2022/masterteam-components-icon-field.mjs +158 -0
- package/fesm2022/masterteam-components-icon-field.mjs.map +1 -0
- package/fesm2022/masterteam-components-list.mjs +31 -0
- package/fesm2022/masterteam-components-list.mjs.map +1 -0
- package/fesm2022/masterteam-components-location-field.mjs +607 -0
- package/fesm2022/masterteam-components-location-field.mjs.map +1 -0
- package/fesm2022/masterteam-components-menu.mjs +135 -0
- package/fesm2022/masterteam-components-menu.mjs.map +1 -0
- package/fesm2022/masterteam-components-modal.mjs +108 -0
- package/fesm2022/masterteam-components-modal.mjs.map +1 -0
- package/fesm2022/masterteam-components-module-summary-card.mjs +34 -0
- package/fesm2022/masterteam-components-module-summary-card.mjs.map +1 -0
- package/fesm2022/masterteam-components-multi-select-field.mjs +321 -0
- package/fesm2022/masterteam-components-multi-select-field.mjs.map +1 -0
- package/fesm2022/masterteam-components-number-field.mjs +102 -0
- package/fesm2022/masterteam-components-number-field.mjs.map +1 -0
- package/fesm2022/masterteam-components-page-header.mjs +42 -0
- package/fesm2022/masterteam-components-page-header.mjs.map +1 -0
- package/fesm2022/masterteam-components-page.mjs +35 -0
- package/fesm2022/masterteam-components-page.mjs.map +1 -0
- package/fesm2022/masterteam-components-paginator.mjs +43 -0
- package/fesm2022/masterteam-components-paginator.mjs.map +1 -0
- package/fesm2022/masterteam-components-pick-list-field.mjs +210 -0
- package/fesm2022/masterteam-components-pick-list-field.mjs.map +1 -0
- package/fesm2022/masterteam-components-progress.mjs +63 -0
- package/fesm2022/masterteam-components-progress.mjs.map +1 -0
- package/fesm2022/masterteam-components-property-filter-builder.mjs +386 -0
- package/fesm2022/masterteam-components-property-filter-builder.mjs.map +1 -0
- package/fesm2022/masterteam-components-radio-button-field.mjs +85 -0
- package/fesm2022/masterteam-components-radio-button-field.mjs.map +1 -0
- package/fesm2022/masterteam-components-radio-cards-field.mjs +131 -0
- package/fesm2022/masterteam-components-radio-cards-field.mjs.map +1 -0
- package/fesm2022/masterteam-components-radio-cards.mjs +74 -0
- package/fesm2022/masterteam-components-radio-cards.mjs.map +1 -0
- package/fesm2022/masterteam-components-runtime-action.mjs +406 -0
- package/fesm2022/masterteam-components-runtime-action.mjs.map +1 -0
- package/fesm2022/masterteam-components-select-field.mjs +415 -0
- package/fesm2022/masterteam-components-select-field.mjs.map +1 -0
- package/fesm2022/masterteam-components-sidebar.mjs +155 -0
- package/fesm2022/masterteam-components-sidebar.mjs.map +1 -0
- package/fesm2022/masterteam-components-slider-field.mjs +128 -0
- package/fesm2022/masterteam-components-slider-field.mjs.map +1 -0
- package/fesm2022/masterteam-components-statistic-card.mjs +42 -0
- package/fesm2022/masterteam-components-statistic-card.mjs.map +1 -0
- package/fesm2022/masterteam-components-table.mjs +3372 -0
- package/fesm2022/masterteam-components-table.mjs.map +1 -0
- package/fesm2022/masterteam-components-tabs.mjs +289 -0
- package/fesm2022/masterteam-components-tabs.mjs.map +1 -0
- package/fesm2022/masterteam-components-text-field.mjs +202 -0
- package/fesm2022/masterteam-components-text-field.mjs.map +1 -0
- package/fesm2022/masterteam-components-textarea-field.mjs +126 -0
- package/fesm2022/masterteam-components-textarea-field.mjs.map +1 -0
- package/fesm2022/masterteam-components-toast.mjs +80 -0
- package/fesm2022/masterteam-components-toast.mjs.map +1 -0
- package/fesm2022/masterteam-components-toggle-field.mjs +116 -0
- package/fesm2022/masterteam-components-toggle-field.mjs.map +1 -0
- package/fesm2022/masterteam-components-tooltip.mjs +147 -0
- package/fesm2022/masterteam-components-tooltip.mjs.map +1 -0
- package/fesm2022/masterteam-components-topbar.mjs +32 -0
- package/fesm2022/masterteam-components-topbar.mjs.map +1 -0
- package/fesm2022/masterteam-components-tree.mjs +260 -0
- package/fesm2022/masterteam-components-tree.mjs.map +1 -0
- package/fesm2022/masterteam-components-treeselect-field.mjs +265 -0
- package/fesm2022/masterteam-components-treeselect-field.mjs.map +1 -0
- package/fesm2022/masterteam-components-upload-field.mjs +846 -0
- package/fesm2022/masterteam-components-upload-field.mjs.map +1 -0
- package/fesm2022/masterteam-components-uploader.mjs +425 -0
- package/fesm2022/masterteam-components-uploader.mjs.map +1 -0
- package/fesm2022/masterteam-components-user-search-field.mjs +374 -0
- package/fesm2022/masterteam-components-user-search-field.mjs.map +1 -0
- package/fesm2022/masterteam-components.mjs +2512 -0
- package/fesm2022/masterteam-components.mjs.map +1 -0
- package/package.json +278 -54
- package/types/masterteam-components-avatar-text.d.ts +23 -0
- package/types/masterteam-components-avatar.d.ts +23 -0
- package/types/masterteam-components-breadcrumb.d.ts +18 -0
- package/types/masterteam-components-business-fields.d.ts +675 -0
- package/types/masterteam-components-button-group.d.ts +8 -0
- package/types/masterteam-components-button.d.ts +62 -0
- package/types/masterteam-components-card.d.ts +14 -0
- package/types/masterteam-components-checkbox-field.d.ts +38 -0
- package/types/masterteam-components-chip.d.ts +21 -0
- package/types/masterteam-components-client-page-menu.d.ts +55 -0
- package/types/masterteam-components-client-page.d.ts +115 -0
- package/types/masterteam-components-color-picker-field.d.ts +39 -0
- package/types/masterteam-components-confirmation.d.ts +41 -0
- package/types/masterteam-components-date-field.d.ts +57 -0
- package/types/masterteam-components-dialog.d.ts +12 -0
- package/types/masterteam-components-drawer.d.ts +62 -0
- package/types/masterteam-components-dynamic-drawer.d.ts +159 -0
- package/types/masterteam-components-editor-field.d.ts +39 -0
- package/types/masterteam-components-empty-state.d.ts +47 -0
- package/types/masterteam-components-entities.d.ts +1116 -0
- package/types/masterteam-components-field-validation.d.ts +59 -0
- package/types/masterteam-components-formula.d.ts +759 -0
- package/types/masterteam-components-icon-field.d.ts +44 -0
- package/types/masterteam-components-list.d.ts +18 -0
- package/types/masterteam-components-location-field.d.ts +173 -0
- package/types/masterteam-components-menu.d.ts +55 -0
- package/types/masterteam-components-modal.d.ts +30 -0
- package/types/masterteam-components-module-summary-card.d.ts +18 -0
- package/types/masterteam-components-multi-select-field.d.ts +104 -0
- package/types/masterteam-components-number-field.d.ts +47 -0
- package/types/masterteam-components-page-header.d.ts +30 -0
- package/types/masterteam-components-page.d.ts +26 -0
- package/types/masterteam-components-paginator.d.ts +20 -0
- package/types/masterteam-components-pick-list-field.d.ts +65 -0
- package/types/masterteam-components-progress.d.ts +30 -0
- package/types/masterteam-components-property-filter-builder.d.ts +90 -0
- package/types/masterteam-components-radio-button-field.d.ts +41 -0
- package/types/masterteam-components-radio-cards-field.d.ts +39 -0
- package/types/masterteam-components-radio-cards.d.ts +33 -0
- package/types/masterteam-components-runtime-action.d.ts +105 -0
- package/types/masterteam-components-select-field.d.ts +136 -0
- package/types/masterteam-components-sidebar.d.ts +71 -0
- package/types/masterteam-components-slider-field.d.ts +41 -0
- package/types/masterteam-components-statistic-card.d.ts +28 -0
- package/types/masterteam-components-table.d.ts +937 -0
- package/types/masterteam-components-tabs.d.ts +80 -0
- package/types/masterteam-components-text-field.d.ts +60 -0
- package/types/masterteam-components-textarea-field.d.ts +45 -0
- package/types/masterteam-components-toast.d.ts +27 -0
- package/types/masterteam-components-toggle-field.d.ts +44 -0
- package/types/masterteam-components-tooltip.d.ts +26 -0
- package/types/masterteam-components-topbar.d.ts +20 -0
- package/types/masterteam-components-tree.d.ts +106 -0
- package/types/masterteam-components-treeselect-field.d.ts +79 -0
- package/types/masterteam-components-upload-field.d.ts +112 -0
- package/types/masterteam-components-uploader.d.ts +53 -0
- package/types/masterteam-components-user-search-field.d.ts +110 -0
- package/types/masterteam-components.d.ts +1261 -0
- package/.angular/cache/21.2.7/@masterteam/components/.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/@masterteam/components/angular-compiler.db +0 -0
- package/.angular/cache/21.2.7/@masterteam/components/angular-compiler.db-lock +0 -0
- package/.angular/cache/21.2.7/ng-packagr/045efd332b9db1d21b3a595a37ae03ebb11b457a5dc6e2d1cbc561b694e17f1a +0 -1
- package/.angular/cache/21.2.7/ng-packagr/0727b170af3d53236c0cafe16ea670d089e48d4c5c525b1dbcc1c684bb6e99c7 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/0873bc9048494ebc33fe0a7b856324c7c4ca681b0dcaa87338e3290186906d49 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/1010cd8fc996d0c2df519ed60085f4b1f38ccfc873900055bc75fc20a3c26bab +0 -1
- package/.angular/cache/21.2.7/ng-packagr/12379a8ab7254ad3df2635823a358cfce32e6d0f390be68596cc97e02307e6c4 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/1239e7a937657b62f858d17d47738ed30facbdaa91032511e29ed148b748400b +0 -1
- package/.angular/cache/21.2.7/ng-packagr/133b9ecf47ba424244902da90d77cd3f135b85f95c01b16de7b2247f57518f01 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/175d45dc6da51834e7fe937c09d23dbf28d2a823f838ef5271fd3e148776d6ec +0 -1
- package/.angular/cache/21.2.7/ng-packagr/19d99ad4d927324b03cdbef34331ba2c58bd580f1f0ca591cb5f8dbf436c913c +0 -1
- package/.angular/cache/21.2.7/ng-packagr/1a86918763f95c1c2b9fa781bda1ceedf15aead87f0e11ea1324318af43a897a +0 -1
- package/.angular/cache/21.2.7/ng-packagr/1f08100dbc280be7da64c809315376eb7d0cfd074916a6042f609f03f4276a8e +0 -1
- package/.angular/cache/21.2.7/ng-packagr/2224877a7e762b86541428e4c40d61f54f505867c305769ae42e67e4aa81bd93 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/24957fb7ec060692ebcf1471e1bdce39f40aed938959e580048ade58015762d2 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/295fcdc1c4462e7feae96a24255369508a559faaecc4676267749a7ce23e4b6d +0 -1
- package/.angular/cache/21.2.7/ng-packagr/2b37e2f2d6564d10bad1fd0ecc16453962fd855cd1e36ad7aa24baf3e4f2e8b3 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/2c20f0929771e857b570ba2beffe91f598f299ce26d4825fe4315bfe5a3dd40a +0 -1
- package/.angular/cache/21.2.7/ng-packagr/37dea2e5798cad4a21d66292eeed5be26d04500d9a1534332ad42ce664a058c2 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/3b6239b640fcb5ea7067a2655a2901d32f55372812b586aa008e77c59e8f2090 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/3beb1b4dfe75d1e6749cf91f05d51ba4eece939f5c15f6f33ed587bfd198f0a3 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/3f161e6c2ead4519d0663dd79199dafceb2cc22da7ce92a72b809b93bfce0bb0 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/43551862d17cd02626e18b30243390081a6247784485660048b060a3d4ab7fa7 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/47aedf032519b41d96866fcf8fbd4f1dfd29f9e9a534b39dee0e44d402227d2d +0 -1
- package/.angular/cache/21.2.7/ng-packagr/4a1768888c60921955bfdfba8b31c8d853bd7b2a7d3a7b83934de049e1e6e6a2 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/4a783e339117597607bff17eeca0ad24d84b8cbc1e28927e7e453ccfa6223180 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/4d9331b2050326f586cd8f6593a9e04e1c7944b2f9e98023649023c099597a5d +0 -1
- package/.angular/cache/21.2.7/ng-packagr/4e379f506919d47af7008658c75242aa05f0056c1caec4061d7fa5746f776049 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/55009bb7d44552dd816ce32fa2b0f7985f3f08fefd6409c2b4f6b9ffe35dad83 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/58ae3f1f9664f7b16844d2e4a279dd4ca9371de014cf5687320c2d5cb259a74f +0 -1
- package/.angular/cache/21.2.7/ng-packagr/5c08e906bd3fe1aa6c1d62f2bbb2b3f276e1c17fe45ef081e76bd1b865ac3dfa +0 -1
- package/.angular/cache/21.2.7/ng-packagr/5ce333a40ad635188347fa9bc601d5fd14be6baacbae7d096259d725ac9757af +0 -1
- package/.angular/cache/21.2.7/ng-packagr/5f32cceaee6a6ea19cc6cbff5ea089b752f13a0fdcd32597d4c99d5e1e031bb5 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/691ad4ccdc0a8ede36e1f4e5e97638c20c2d3142916ffac3a1b172178c139205 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/6b57160e0d2da3f31693831e84a3f4209c1f33a04abd636e34af03956e7329d8 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/70bc711a1d7b631845885c26adc2d6b1bff47d11332b2625cedfa11e9d5ac79a +0 -1
- package/.angular/cache/21.2.7/ng-packagr/7427c266237012afaef486c2af94ee08a491e8d7b6fc7e5ee887980830bbd333 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/7e8fa7c61cf9a932ba3a0e65eb73c7412e81666b7a8f923dac7b75acfbb94b1d +0 -1
- package/.angular/cache/21.2.7/ng-packagr/81aab7fdab43cbdfa869db759d6113ae01ec6f5e0e9061d7fc089c260886e4d1 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/83a81758045ff710a34ea3cf6f54435a1f5dea9839d8c0adda0bbce7c3fb6e8b +0 -1
- package/.angular/cache/21.2.7/ng-packagr/883eae810a4c09f06617bdc2e4bc30a69f09726401b2a051840969f635d076f1 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/8a6b9be66de40c57054dca5fde376c3cec1bec1ae191a16f1ae6a83306d9ebfe +0 -1
- package/.angular/cache/21.2.7/ng-packagr/8d42c8144f6929de46984094bf390a0c4168404ab13a5194839f6ba5e42bc3ce +0 -1
- package/.angular/cache/21.2.7/ng-packagr/91093656c61a5404f0d576f872247eeb480dd938e6999d481a97893c72b5f3d0 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/91e881172037c63d819e30d30e390e0d7dc0dee9808b3902275ccc8b1887d864 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/9ef28cf3a676e7bd0d37762c4868b4810efca2f241ed0dae75ebca41988e2c00 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/a07cbea405c1831b3f686a8e57c4b500d89cbab2b95e110487890269945feeaa +0 -1
- package/.angular/cache/21.2.7/ng-packagr/a463deba940880d9461612c9cd00d90062bf97aa31b1c4556b8b47a967cb6882 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/ab03ed1e4a371113b41b663d526d2b06565ceb062e6f033f726f1e455fc5d1d6 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/ad0e84be4f2211aff6187b4bec9adbe15f0e8b36851e9c6c63b38303c2daad37 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/aece79242dae70eb748605e37483e75e122e4ce414fa8be875499e8af26ee5d6 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/aff32db91ce03de30d2bbc84f266fe3fb2c6629d5eeb39a364204d9499484368 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/b0671e73a162927d28ef1742ec008e514264bc2ce29f2255bedaea553492fe5d +0 -1
- package/.angular/cache/21.2.7/ng-packagr/bb50d71f3cdeebbb85fd983be8103f9c216060464f8e7e534271197391e6dcf7 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/c64241290ab30d8761b2f5493a039427f5cda1a48b5be88ce62ee5c714c0f690 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/c794d2e79b26ab378c0dbf8afa7b8ac1337ba9afb288941d44a086cb1bd4bad2 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/d942edf8fd8e8e884138ffcdb1a07ad14a0b5e211f8ccea1dc9ea0b48f50cfc9 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/dbe0b9b9f18ba7b96d9c84f4fd16cde158c9701c202d00113e6f88ba93407bce +0 -1
- package/.angular/cache/21.2.7/ng-packagr/f564395a410a2723aac48e582f5fe416bfeaa48677cea47b10c5152d4f2b6672 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/fc9b0d27f081ca7b2a4cbefa75136d7bd7a8c341dbaa0587855071a6003906b8 +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-avatar-text.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-avatar.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-breadcrumb.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-business-fields.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-button-group.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-button.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-card.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-checkbox-field.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-chip.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-client-page-menu.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-client-page.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-color-picker-field.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-confirmation.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-date-field.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-dialog.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-drawer.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-dynamic-drawer.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-editor-field.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-empty-state.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-entities.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-field-validation.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-formula.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-icon-field.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-list.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-location-field.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-menu.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-modal.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-module-summary-card.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-multi-select-field.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-number-field.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-page-header.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-page.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-paginator.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-pick-list-field.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-progress.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-property-filter-builder.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-radio-button-field.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-radio-cards-field.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-radio-cards.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-runtime-action.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-select-field.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-sidebar.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-slider-field.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-statistic-card.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-table.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-tabs.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-text-field.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-textarea-field.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-toast.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-toggle-field.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-tooltip.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-topbar.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-tree.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-treeselect-field.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-upload-field.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-uploader.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-user-search-field.tsbuildinfo +0 -1
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components.tsbuildinfo +0 -1
- package/angular.json +0 -32
- package/api/api.ts +0 -1
- package/api/public-api.ts +0 -5
- package/avatar/avatar.html +0 -32
- package/avatar/avatar.scss +0 -0
- package/avatar/avatar.ts +0 -54
- package/avatar/ng-package.json +0 -6
- package/avatar/public-api.ts +0 -1
- package/avatar-text/avatar-text.html +0 -26
- package/avatar-text/avatar-text.scss +0 -0
- package/avatar-text/avatar-text.ts +0 -52
- package/avatar-text/ng-package.json +0 -6
- package/avatar-text/public-api.ts +0 -1
- package/breadcrumb/breadcrumb.html +0 -53
- package/breadcrumb/breadcrumb.scss +0 -0
- package/breadcrumb/breadcrumb.ts +0 -26
- package/breadcrumb/ng-package.json +0 -6
- package/breadcrumb/public-api.ts +0 -1
- package/business-fields/entity-list-field/entity-list-add-token.ts +0 -25
- package/business-fields/entity-list-field/entity-list-field.html +0 -70
- package/business-fields/entity-list-field/entity-list-field.scss +0 -3
- package/business-fields/entity-list-field/entity-list-field.ts +0 -1067
- package/business-fields/lookup-matrix-field/lookup-matrix-field.html +0 -38
- package/business-fields/lookup-matrix-field/lookup-matrix-field.spec.ts +0 -183
- package/business-fields/lookup-matrix-field/lookup-matrix-field.ts +0 -239
- package/business-fields/lookup-module-check-list-field/lookup-module-check-list-field.html +0 -95
- package/business-fields/lookup-module-check-list-field/lookup-module-check-list-field.ts +0 -336
- package/business-fields/lookup-module-check-list-field/lookup-module-check-list-form-token.ts +0 -42
- package/business-fields/ng-package.json +0 -6
- package/business-fields/public-api.ts +0 -8
- package/business-fields/schedule-item-selector-field/schedule-item-selector-field.html +0 -32
- package/business-fields/schedule-item-selector-field/schedule-item-selector-field.ts +0 -272
- package/business-fields/schedule-predecessor-field/schedule-predecessor-field.html +0 -89
- package/business-fields/schedule-predecessor-field/schedule-predecessor-field.ts +0 -441
- package/business-fields/schema-connection-field/schema-connection-field.html +0 -58
- package/business-fields/schema-connection-field/schema-connection-field.scss +0 -0
- package/business-fields/schema-connection-field/schema-connection-field.ts +0 -456
- package/button/button.html +0 -44
- package/button/button.scss +0 -0
- package/button/button.ts +0 -120
- package/button/ng-package.json +0 -6
- package/button/public-api.ts +0 -1
- package/button-group/button-group.html +0 -3
- package/button-group/button-group.scss +0 -20
- package/button-group/button-group.ts +0 -12
- package/button-group/ng-package.json +0 -6
- package/button-group/public-api.ts +0 -1
- package/card/card.html +0 -26
- package/card/card.scss +0 -0
- package/card/card.ts +0 -29
- package/card/ng-package.json +0 -6
- package/card/public-api.ts +0 -1
- package/checkbox-field/checkbox-field.html +0 -31
- package/checkbox-field/checkbox-field.scss +0 -0
- package/checkbox-field/checkbox-field.spec.ts +0 -21
- package/checkbox-field/checkbox-field.ts +0 -123
- package/checkbox-field/ng-package.json +0 -6
- package/checkbox-field/public-api.ts +0 -1
- package/chip/chip.html +0 -16
- package/chip/chip.scss +0 -19
- package/chip/chip.ts +0 -45
- package/chip/ng-package.json +0 -6
- package/chip/public-api.ts +0 -1
- package/client-page/client-page.html +0 -232
- package/client-page/client-page.ts +0 -588
- package/client-page/index.ts +0 -2
- package/client-page/ng-package.json +0 -6
- package/client-page/public-api.ts +0 -1
- package/client-page-menu/client-page-menu.html +0 -142
- package/client-page-menu/client-page-menu.ts +0 -199
- package/client-page-menu/index.ts +0 -2
- package/client-page-menu/ng-package.json +0 -6
- package/client-page-menu/public-api.ts +0 -1
- package/color-picker-field/color-picker-field.html +0 -45
- package/color-picker-field/color-picker-field.scss +0 -52
- package/color-picker-field/color-picker-field.ts +0 -131
- package/color-picker-field/ng-package.json +0 -6
- package/color-picker-field/public-api.ts +0 -1
- package/confirmation/confirmation-dialog.html +0 -83
- package/confirmation/confirmation-dialog.scss +0 -0
- package/confirmation/confirmation-dialog.ts +0 -15
- package/confirmation/confirmation.spec.ts +0 -43
- package/confirmation/confirmation.ts +0 -103
- package/confirmation/ng-package.json +0 -6
- package/confirmation/public-api.ts +0 -2
- package/date-field/date-field.html +0 -65
- package/date-field/date-field.scss +0 -0
- package/date-field/date-field.spec.ts +0 -118
- package/date-field/date-field.ts +0 -196
- package/date-field/ng-package.json +0 -6
- package/date-field/public-api.ts +0 -1
- package/dialog/dialog.ts +0 -29
- package/dialog/ng-package.json +0 -6
- package/dialog/public-api.ts +0 -1
- package/drawer/drawer.html +0 -67
- package/drawer/drawer.scss +0 -1
- package/drawer/drawer.ts +0 -348
- package/drawer/ng-package.json +0 -5
- package/drawer/public-api.ts +0 -1
- package/dynamic-drawer/dynamic-drawer-host.ts +0 -476
- package/dynamic-drawer/dynamic-drawer.spec.ts +0 -204
- package/dynamic-drawer/dynamic-drawer.ts +0 -235
- package/dynamic-drawer/ng-package.json +0 -6
- package/dynamic-drawer/public-api.ts +0 -2
- package/editor-field/editor-field.html +0 -38
- package/editor-field/editor-field.scss +0 -219
- package/editor-field/editor-field.ts +0 -126
- package/editor-field/ng-package.json +0 -6
- package/editor-field/public-api.ts +0 -1
- package/empty-state/empty-state.html +0 -236
- package/empty-state/empty-state.ts +0 -85
- package/empty-state/ng-package.json +0 -6
- package/empty-state/public-api.ts +0 -1
- package/entities/comparison/comparison-entity-list/comparison-entity-list.html +0 -87
- package/entities/comparison/comparison-entity-list/comparison-entity-list.ts +0 -93
- package/entities/comparison/comparison-value/comparison-value.html +0 -31
- package/entities/comparison/comparison-value/comparison-value.ts +0 -53
- package/entities/currency-display.utils.spec.ts +0 -94
- package/entities/currency-display.utils.ts +0 -92
- package/entities/entities-manage/entities-manage.html +0 -74
- package/entities/entities-manage/entities-manage.scss +0 -72
- package/entities/entities-manage/entities-manage.ts +0 -121
- package/entities/entities-manage/entities-resize-base.ts +0 -153
- package/entities/entities-preview/entities-preview.css +0 -77
- package/entities/entities-preview/entities-preview.html +0 -56
- package/entities/entities-preview/entities-preview.ts +0 -281
- package/entities/entity-attachment/entity-attachment.html +0 -49
- package/entities/entity-attachment/entity-attachment.ts +0 -462
- package/entities/entity-checkbox/entity-checkbox.html +0 -28
- package/entities/entity-checkbox/entity-checkbox.ts +0 -65
- package/entities/entity-comparison.model.ts +0 -39
- package/entities/entity-connection/entity-connection.html +0 -12
- package/entities/entity-connection/entity-connection.ts +0 -75
- package/entities/entity-currency/entity-currency.html +0 -12
- package/entities/entity-currency/entity-currency.ts +0 -59
- package/entities/entity-date/entity-date.html +0 -16
- package/entities/entity-date/entity-date.ts +0 -50
- package/entities/entity-display.utils.ts +0 -94
- package/entities/entity-field/entity-field.ts +0 -94
- package/entities/entity-leaf-details/entity-leaf-details.html +0 -35
- package/entities/entity-leaf-details/entity-leaf-details.ts +0 -56
- package/entities/entity-location/entity-location.html +0 -34
- package/entities/entity-location/entity-location.ts +0 -98
- package/entities/entity-long-text/entity-long-text.html +0 -9
- package/entities/entity-long-text/entity-long-text.ts +0 -45
- package/entities/entity-lookup/entity-lookup.html +0 -25
- package/entities/entity-lookup/entity-lookup.ts +0 -68
- package/entities/entity-lookup-module-check-list/entity-lookup-module-check-list.html +0 -39
- package/entities/entity-lookup-module-check-list/entity-lookup-module-check-list.spec.ts +0 -148
- package/entities/entity-lookup-module-check-list/entity-lookup-module-check-list.ts +0 -152
- package/entities/entity-percentage/entity-percentage.html +0 -22
- package/entities/entity-percentage/entity-percentage.ts +0 -163
- package/entities/entity-phase-gate/entity-phase-gate.html +0 -20
- package/entities/entity-phase-gate/entity-phase-gate.ts +0 -129
- package/entities/entity-preview/entity-preview-body.html +0 -8
- package/entities/entity-preview/entity-preview-body.ts +0 -19
- package/entities/entity-preview/entity-preview.html +0 -14
- package/entities/entity-preview/entity-preview.ts +0 -33
- package/entities/entity-preview/entity-value-preview.html +0 -62
- package/entities/entity-preview/entity-value-preview.spec.ts +0 -191
- package/entities/entity-preview/entity-value-preview.ts +0 -69
- package/entities/entity-schedule-item/entity-schedule-item.html +0 -19
- package/entities/entity-schedule-item/entity-schedule-item.ts +0 -41
- package/entities/entity-sections.util.ts +0 -103
- package/entities/entity-status/entity-status.html +0 -20
- package/entities/entity-status/entity-status.ts +0 -60
- package/entities/entity-text/entity-text.html +0 -20
- package/entities/entity-text/entity-text.ts +0 -35
- package/entities/entity-user/entity-user.html +0 -181
- package/entities/entity-user/entity-user.ts +0 -179
- package/entities/entity.model.ts +0 -407
- package/entities/leaf-details-display.utils.ts +0 -269
- package/entities/ng-package.json +0 -6
- package/entities/percentage-color.utils.spec.ts +0 -94
- package/entities/percentage-color.utils.ts +0 -80
- package/entities/public-api.ts +0 -30
- package/field-validation/character-limit.validator.ts +0 -22
- package/field-validation/error-message.pipe.spec.ts +0 -184
- package/field-validation/error-message.pipe.ts +0 -80
- package/field-validation/field-validation.ts +0 -168
- package/field-validation/ng-package.json +0 -6
- package/field-validation/public-api.ts +0 -2
- package/formula/formula-editor/formula-editor.html +0 -89
- package/formula/formula-editor/formula-editor.scss +0 -25
- package/formula/formula-editor/formula-editor.ts +0 -467
- package/formula/formula-editor/index.ts +0 -1
- package/formula/formula-editor-code/formula-autocomplete-normalization.util.spec.ts +0 -58
- package/formula/formula-editor-code/formula-autocomplete-normalization.util.ts +0 -64
- package/formula/formula-editor-code/formula-completion-range.util.spec.ts +0 -62
- package/formula/formula-editor-code/formula-completion-range.util.ts +0 -71
- package/formula/formula-editor-code/formula-completion-suggestion.util.spec.ts +0 -23
- package/formula/formula-editor-code/formula-completion-suggestion.util.ts +0 -18
- package/formula/formula-editor-code/formula-editor-code.html +0 -15
- package/formula/formula-editor-code/formula-editor-code.scss +0 -90
- package/formula/formula-editor-code/formula-editor-code.ts +0 -1095
- package/formula/formula-editor-code/index.ts +0 -1
- package/formula/formula-status-bar/formula-status-bar.html +0 -119
- package/formula/formula-status-bar/formula-status-bar.ts +0 -66
- package/formula/formula-status-bar/index.ts +0 -1
- package/formula/formula-toolbar/formula-toolbar.html +0 -361
- package/formula/formula-toolbar/formula-toolbar.ts +0 -532
- package/formula/formula-toolbar/index.ts +0 -2
- package/formula/formula-toolbar/operators.ts +0 -122
- package/formula/models/formula-block.model.ts +0 -61
- package/formula/models/formula-token.model.spec.ts +0 -57
- package/formula/models/formula-token.model.ts +0 -852
- package/formula/models/index.ts +0 -5
- package/formula/models/smart-block.model.ts +0 -132
- package/formula/models/validation-result.model.ts +0 -80
- package/formula/ng-package.json +0 -6
- package/formula/public-api.ts +0 -8
- package/formula/runtime/formula-runtime-catalogs.ts +0 -554
- package/formula/runtime/formula-runtime-engine.spec.ts +0 -328
- package/formula/runtime/formula-runtime-engine.ts +0 -794
- package/formula/runtime/formula-runtime.model.ts +0 -53
- package/formula/runtime/index.ts +0 -3
- package/formula/toolbar-item/index.ts +0 -1
- package/formula/toolbar-item/toolbar-item.html +0 -143
- package/formula/toolbar-item/toolbar-item.scss +0 -14
- package/formula/toolbar-item/toolbar-item.ts +0 -223
- package/icon-field/icon-field.html +0 -58
- package/icon-field/icon-field.scss +0 -24
- package/icon-field/icon-field.spec.ts +0 -77
- package/icon-field/icon-field.ts +0 -205
- package/icon-field/ng-package.json +0 -6
- package/icon-field/public-api.ts +0 -1
- package/list/list.html +0 -22
- package/list/list.ts +0 -36
- package/list/ng-package.json +0 -6
- package/list/public-api.ts +0 -1
- package/location-field/location-field.html +0 -86
- package/location-field/location-field.spec.ts +0 -295
- package/location-field/location-field.ts +0 -662
- package/location-field/location-manual-dialog.html +0 -43
- package/location-field/location-manual-dialog.ts +0 -104
- package/location-field/location-value.ts +0 -67
- package/location-field/ng-package.json +0 -6
- package/location-field/public-api.ts +0 -3
- package/menu/menu.html +0 -71
- package/menu/menu.scss +0 -3
- package/menu/menu.ts +0 -186
- package/menu/ng-package.json +0 -6
- package/menu/public-api.ts +0 -1
- package/modal/modal.ts +0 -127
- package/modal/ng-package.json +0 -6
- package/modal/public-api.ts +0 -1
- package/module-summary-card/module-summary-card.html +0 -43
- package/module-summary-card/module-summary-card.scss +0 -0
- package/module-summary-card/module-summary-card.ts +0 -40
- package/module-summary-card/ng-package.json +0 -6
- package/module-summary-card/public-api.ts +0 -1
- package/multi-select-field/multi-select-field.html +0 -140
- package/multi-select-field/multi-select-field.scss +0 -0
- package/multi-select-field/multi-select-field.spec.ts +0 -21
- package/multi-select-field/multi-select-field.ts +0 -397
- package/multi-select-field/ng-package.json +0 -6
- package/multi-select-field/public-api.ts +0 -1
- package/ng-package.json +0 -9
- package/number-field/ng-package.json +0 -6
- package/number-field/number-field.html +0 -39
- package/number-field/number-field.scss +0 -8
- package/number-field/number-field.spec.ts +0 -21
- package/number-field/number-field.ts +0 -124
- package/number-field/public-api.ts +0 -1
- package/page/index.ts +0 -1
- package/page/ng-package.json +0 -6
- package/page/page.html +0 -37
- package/page/page.ts +0 -43
- package/page/public-api.ts +0 -1
- package/page-header/index.ts +0 -2
- package/page-header/ng-package.json +0 -6
- package/page-header/page-header.html +0 -60
- package/page-header/page-header.ts +0 -54
- package/page-header/public-api.ts +0 -1
- package/paginator/ng-package.json +0 -6
- package/paginator/paginator.html +0 -50
- package/paginator/paginator.scss +0 -0
- package/paginator/paginator.ts +0 -53
- package/paginator/public-api.ts +0 -1
- package/pick-list-field/ng-package.json +0 -6
- package/pick-list-field/pick-list-field.html +0 -39
- package/pick-list-field/pick-list-field.scss +0 -26
- package/pick-list-field/pick-list-field.ts +0 -259
- package/pick-list-field/public-api.ts +0 -1
- package/progress/ng-package.json +0 -6
- package/progress/progress.html +0 -36
- package/progress/progress.ts +0 -61
- package/progress/public-api.ts +0 -1
- package/property-filter-builder/ng-package.json +0 -6
- package/property-filter-builder/property-filter-builder.html +0 -192
- package/property-filter-builder/property-filter-builder.ts +0 -548
- package/property-filter-builder/public-api.ts +0 -1
- package/radio-button-field/ng-package.json +0 -6
- package/radio-button-field/public-api.ts +0 -1
- package/radio-button-field/radio-button-field.html +0 -44
- package/radio-button-field/radio-button-field.scss +0 -0
- package/radio-button-field/radio-button-field.ts +0 -114
- package/radio-cards/ng-package.json +0 -6
- package/radio-cards/public-api.ts +0 -1
- package/radio-cards/radio-cards.css +0 -3
- package/radio-cards/radio-cards.html +0 -54
- package/radio-cards/radio-cards.spec.ts +0 -22
- package/radio-cards/radio-cards.ts +0 -92
- package/radio-cards-field/ng-package.json +0 -6
- package/radio-cards-field/public-api.ts +0 -1
- package/radio-cards-field/radio-cards-field.css +0 -0
- package/radio-cards-field/radio-cards-field.html +0 -38
- package/radio-cards-field/radio-cards-field.spec.ts +0 -22
- package/radio-cards-field/radio-cards-field.ts +0 -182
- package/runtime-action/ng-package.json +0 -6
- package/runtime-action/payload-builder.ts +0 -246
- package/runtime-action/public-api.ts +0 -4
- package/runtime-action/runtime-action-context.store.ts +0 -26
- package/runtime-action/runtime-action.runner.ts +0 -302
- package/runtime-action/runtime-action.types.ts +0 -82
- package/select-field/current-user.util.ts +0 -54
- package/select-field/ng-package.json +0 -6
- package/select-field/public-api.ts +0 -1
- package/select-field/select-field.html +0 -142
- package/select-field/select-field.scss +0 -0
- package/select-field/select-field.spec.ts +0 -21
- package/select-field/select-field.ts +0 -471
- package/sidebar/ng-package.json +0 -6
- package/sidebar/public-api.ts +0 -1
- package/sidebar/sidebar.html +0 -368
- package/sidebar/sidebar.ts +0 -303
- package/slider-field/ng-package.json +0 -7
- package/slider-field/public-api.ts +0 -1
- package/slider-field/slider-field.html +0 -33
- package/slider-field/slider-field.scss +0 -11
- package/slider-field/slider-field.spec.ts +0 -44
- package/slider-field/slider-field.ts +0 -166
- package/src/lib/base/base.facade.ts +0 -159
- package/src/lib/base/crud-base.state.ts +0 -248
- package/src/lib/config/date-format.config.ts +0 -55
- package/src/lib/config/ds-identity.preset.ts +0 -538
- package/src/lib/config/ds-identity.tokens.ts +0 -209
- package/src/lib/config/dynamic-form.model.ts +0 -1162
- package/src/lib/config/povide-messages.ts +0 -5
- package/src/lib/config/provide-confirmation.ts +0 -5
- package/src/lib/config/providemt.ts +0 -506
- package/src/lib/config/public-api.ts +0 -0
- package/src/lib/pipes/mt-date-format.pipe.spec.ts +0 -60
- package/src/lib/pipes/mt-date-format.pipe.ts +0 -81
- package/src/lib/utils/api-request.helper.ts +0 -59
- package/src/lib/utils/clock-time.util.ts +0 -58
- package/src/lib/utils/color.utils.ts +0 -187
- package/src/lib/utils/entity-adapter.ts +0 -50
- package/src/lib/utils/field-id.ts +0 -42
- package/src/lib/utils/http-context.ts +0 -35
- package/src/lib/utils/inputs.ts +0 -6
- package/src/lib/utils/state-helpers.ts +0 -49
- package/src/lib/utils/theme.ts +0 -281
- package/src/public-api.ts +0 -30
- package/statistic-card/ng-package.json +0 -6
- package/statistic-card/public-api.ts +0 -1
- package/statistic-card/statistic-card.html +0 -31
- package/statistic-card/statistic-card.scss +0 -0
- package/statistic-card/statistic-card.ts +0 -59
- package/table/ng-package.json +0 -7
- package/table/public-api.ts +0 -10
- package/table/table-actions-menu/public-api.ts +0 -1
- package/table/table-actions-menu/table-actions-menu.html +0 -75
- package/table/table-actions-menu/table-actions-menu.ts +0 -171
- package/table/table-caption/public-api.ts +0 -1
- package/table/table-caption/table-caption.html +0 -118
- package/table/table-caption/table-caption.ts +0 -221
- package/table/table-column-filter/public-api.ts +0 -1
- package/table/table-column-filter/table-column-filter.html +0 -44
- package/table/table-column-filter/table-column-filter.ts +0 -106
- package/table/table-export/html-to-text.util.ts +0 -67
- package/table/table-export/public-api.ts +0 -1
- package/table/table-export/table-export.service.spec.ts +0 -186
- package/table/table-export/table-export.service.ts +0 -325
- package/table/table-filter/public-api.ts +0 -1
- package/table/table-filter/table-filter.css +0 -9
- package/table/table-filter/table-filter.html +0 -63
- package/table/table-filter/table-filter.ts +0 -126
- package/table/table-filter-field/public-api.ts +0 -1
- package/table/table-filter-field/table-filter-field.html +0 -182
- package/table/table-filter-field/table-filter-field.ts +0 -208
- package/table/table-grouping/public-api.ts +0 -1
- package/table/table-grouping/table-grouping.spec.ts +0 -218
- package/table/table-grouping/table-grouping.ts +0 -237
- package/table/table-types.ts +0 -242
- package/table/table-value.utils.spec.ts +0 -63
- package/table/table-value.utils.ts +0 -1014
- package/table/table.css +0 -145
- package/table/table.html +0 -572
- package/table/table.ts +0 -2042
- package/tabs/ng-package.json +0 -6
- package/tabs/public-api.ts +0 -1
- package/tabs/tabs.html +0 -417
- package/tabs/tabs.scss +0 -3
- package/tabs/tabs.spec.ts +0 -79
- package/tabs/tabs.ts +0 -397
- package/text-field/ng-package.json +0 -6
- package/text-field/public-api.ts +0 -1
- package/text-field/text-field.html +0 -75
- package/text-field/text-field.scss +0 -56
- package/text-field/text-field.ts +0 -251
- package/textarea-field/ng-package.json +0 -6
- package/textarea-field/public-api.ts +0 -1
- package/textarea-field/textarea-field.html +0 -37
- package/textarea-field/textarea-field.scss +0 -0
- package/textarea-field/textarea-field.spec.ts +0 -21
- package/textarea-field/textarea-field.ts +0 -169
- package/toast/ng-package.json +0 -6
- package/toast/public-api.ts +0 -2
- package/toast/toast.html +0 -18
- package/toast/toast.service.ts +0 -67
- package/toast/toast.ts +0 -21
- package/toggle-field/ng-package.json +0 -6
- package/toggle-field/public-api.ts +0 -1
- package/toggle-field/toggle-field.html +0 -78
- package/toggle-field/toggle-field.scss +0 -24
- package/toggle-field/toggle-field.ts +0 -150
- package/tooltip/ng-package.json +0 -6
- package/tooltip/public-api.ts +0 -2
- package/tooltip/tooltip.ts +0 -30
- package/tooltip/truncate-tooltip.ts +0 -124
- package/topbar/ng-package.json +0 -6
- package/topbar/public-api.ts +0 -1
- package/topbar/topbar.html +0 -52
- package/topbar/topbar.ts +0 -27
- package/tree/ng-package.json +0 -6
- package/tree/public-api.ts +0 -2
- package/tree/tree-types.ts +0 -55
- package/tree/tree.html +0 -126
- package/tree/tree.scss +0 -1
- package/tree/tree.ts +0 -303
- package/treeselect-field/ng-package.json +0 -6
- package/treeselect-field/public-api.ts +0 -1
- package/treeselect-field/treeselect-field.html +0 -71
- package/treeselect-field/treeselect-field.ts +0 -348
- package/tsconfig.check.json +0 -20
- package/tsconfig.json +0 -16
- package/tsconfig.spec.json +0 -24
- package/upload-field/ng-package.json +0 -6
- package/upload-field/public-api.ts +0 -2
- package/upload-field/secure-image.pipe.ts +0 -258
- package/upload-field/upload-field.html +0 -274
- package/upload-field/upload-field.scss +0 -0
- package/upload-field/upload-field.spec.ts +0 -169
- package/upload-field/upload-field.ts +0 -764
- package/upload-field/upload-file-preview/upload-file-preview.html +0 -41
- package/upload-field/upload-file-preview/upload-file-preview.scss +0 -0
- package/upload-field/upload-file-preview/upload-file-preview.ts +0 -57
- package/upload-field/upload-user-preview/upload-user-preview.css +0 -0
- package/upload-field/upload-user-preview/upload-user-preview.html +0 -73
- package/upload-field/upload-user-preview/upload-user-preview.ts +0 -54
- package/uploader/ng-package.json +0 -6
- package/uploader/public-api.ts +0 -1
- package/uploader/uploader.service.spec.ts +0 -271
- package/uploader/uploader.service.ts +0 -733
- package/user-search-field/ng-package.json +0 -6
- package/user-search-field/public-api.ts +0 -1
- package/user-search-field/user-search-field.html +0 -88
- package/user-search-field/user-search-field.scss +0 -4
- package/user-search-field/user-search-field.spec.ts +0 -176
- package/user-search-field/user-search-field.ts +0 -483
|
@@ -0,0 +1,2512 @@
|
|
|
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
|
+
updatePreset({
|
|
967
|
+
semantic: {
|
|
968
|
+
primary: isDS
|
|
969
|
+
? generateTailwindPalette(base, '800')
|
|
970
|
+
: generateTailwindPalette(base),
|
|
971
|
+
},
|
|
972
|
+
});
|
|
973
|
+
}
|
|
974
|
+
function changeBackgroundColor(color) {
|
|
975
|
+
if (color) {
|
|
976
|
+
const palette = generateTailwindPalette(color, '100');
|
|
977
|
+
document.documentElement.style.setProperty('--app-background-light', palette['100']);
|
|
978
|
+
document.documentElement.style.setProperty('--app-background-dark', palette['950']);
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
function changeTextColor(color) {
|
|
982
|
+
const palette = generateTailwindPalette(color ?? '#334155', '700');
|
|
983
|
+
updatePreset({
|
|
984
|
+
semantic: {
|
|
985
|
+
colorScheme: {
|
|
986
|
+
light: {
|
|
987
|
+
text: {
|
|
988
|
+
color: palette['700'],
|
|
989
|
+
hoverColor: palette['800'],
|
|
990
|
+
hoverMutedColor: palette['600'],
|
|
991
|
+
mutedColor: palette['500'],
|
|
992
|
+
},
|
|
993
|
+
},
|
|
994
|
+
dark: {
|
|
995
|
+
text: {
|
|
996
|
+
color: palette['0'],
|
|
997
|
+
hoverColor: palette['0'],
|
|
998
|
+
hoverMutedColor: palette['300'],
|
|
999
|
+
mutedColor: palette['400'],
|
|
1000
|
+
},
|
|
1001
|
+
},
|
|
1002
|
+
},
|
|
1003
|
+
},
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
/**
|
|
1007
|
+
* The palette step a filled primary control should use so white text on it
|
|
1008
|
+
* clears WCAG AA (4.5:1).
|
|
1009
|
+
*
|
|
1010
|
+
* Kept as a named helper because it is the whole of finding H-03: the shipped
|
|
1011
|
+
* default `#2AAEC0` gives white text 2.65:1, so Add / New / Filter / Apply /
|
|
1012
|
+
* Submit — the controls that most need to be legible — were the least legible
|
|
1013
|
+
* in the product, and every tenant who configured a light brand colour hit the
|
|
1014
|
+
* same wall. Darkening the shipped hex would have fixed exactly one tenant and
|
|
1015
|
+
* changed the product's colour; this keeps the hue and moves one step down the
|
|
1016
|
+
* ramp their own colour already generated. A brand that passes at 500 stays at
|
|
1017
|
+
* 500 and looks identical.
|
|
1018
|
+
*/
|
|
1019
|
+
function accessiblePrimaryShade(palette) {
|
|
1020
|
+
return pickAccessibleShade(palette, '500', '#ffffff', WCAG_AA_NORMAL_TEXT);
|
|
1021
|
+
}
|
|
1022
|
+
const MTPreset = (themeOptions) => {
|
|
1023
|
+
const textPalette = generateTailwindPalette(themeOptions?.textColor ?? '#334155', '700');
|
|
1024
|
+
const primaryPalette = generateTailwindPalette(themeOptions?.primaryColor || '#2AAEC0');
|
|
1025
|
+
// Which shade filled controls use. See `accessiblePrimaryShade` — the tenant's
|
|
1026
|
+
// hue is untouched; only the step on their own ramp moves, and only when white
|
|
1027
|
+
// text would otherwise fail WCAG AA (finding H-03).
|
|
1028
|
+
const primaryActionShade = accessiblePrimaryShade(primaryPalette);
|
|
1029
|
+
const configs = {
|
|
1030
|
+
options: {
|
|
1031
|
+
prefix: 'mt',
|
|
1032
|
+
cssLayer: {
|
|
1033
|
+
name: 'primeng',
|
|
1034
|
+
order: 'theme, base, primeng',
|
|
1035
|
+
},
|
|
1036
|
+
},
|
|
1037
|
+
semantic: {
|
|
1038
|
+
colorScheme: {
|
|
1039
|
+
light: {
|
|
1040
|
+
// Filled primary surfaces resolve to the first shade whose contrast
|
|
1041
|
+
// with white text passes AA — usually 500, deeper only when the
|
|
1042
|
+
// tenant's brand is too light. Borders/icons keep reading `primary.500`
|
|
1043
|
+
// directly, so the brand accent itself is unchanged.
|
|
1044
|
+
primary: {
|
|
1045
|
+
color: `{primary.${primaryActionShade}}`,
|
|
1046
|
+
contrastColor: '#ffffff',
|
|
1047
|
+
hoverColor: `{primary.${primaryActionShade}}`,
|
|
1048
|
+
activeColor: `{primary.${primaryActionShade}}`,
|
|
1049
|
+
},
|
|
1050
|
+
text: {
|
|
1051
|
+
color: textPalette['700'],
|
|
1052
|
+
hoverColor: textPalette['800'],
|
|
1053
|
+
hoverMutedColor: textPalette['600'],
|
|
1054
|
+
mutedColor: textPalette['500'],
|
|
1055
|
+
},
|
|
1056
|
+
},
|
|
1057
|
+
dark: {
|
|
1058
|
+
text: {
|
|
1059
|
+
color: textPalette['0'],
|
|
1060
|
+
hoverColor: textPalette['0'],
|
|
1061
|
+
hoverMutedColor: textPalette['300'],
|
|
1062
|
+
mutedColor: textPalette['400'],
|
|
1063
|
+
},
|
|
1064
|
+
},
|
|
1065
|
+
},
|
|
1066
|
+
primary: primaryPalette,
|
|
1067
|
+
content: {
|
|
1068
|
+
borderRadius: '{border.radius.lg}',
|
|
1069
|
+
},
|
|
1070
|
+
formField: {
|
|
1071
|
+
borderRadius: inputBorderRadius,
|
|
1072
|
+
},
|
|
1073
|
+
},
|
|
1074
|
+
components: {
|
|
1075
|
+
autocomplete: {
|
|
1076
|
+
root: {
|
|
1077
|
+
borderRadius: inputBorderRadius,
|
|
1078
|
+
},
|
|
1079
|
+
},
|
|
1080
|
+
cascadeselect: {
|
|
1081
|
+
root: {
|
|
1082
|
+
borderRadius: inputBorderRadius,
|
|
1083
|
+
},
|
|
1084
|
+
},
|
|
1085
|
+
dialog: {
|
|
1086
|
+
header: {
|
|
1087
|
+
padding: '0',
|
|
1088
|
+
},
|
|
1089
|
+
content: {
|
|
1090
|
+
padding: '0',
|
|
1091
|
+
},
|
|
1092
|
+
footer: {
|
|
1093
|
+
padding: '0',
|
|
1094
|
+
},
|
|
1095
|
+
},
|
|
1096
|
+
toast: {
|
|
1097
|
+
root: {
|
|
1098
|
+
borderRadius: '{border.radius.xl}',
|
|
1099
|
+
},
|
|
1100
|
+
colorScheme: {
|
|
1101
|
+
light: {
|
|
1102
|
+
success: toastStyle,
|
|
1103
|
+
info: toastStyle,
|
|
1104
|
+
warn: toastStyle,
|
|
1105
|
+
error: toastStyle,
|
|
1106
|
+
secondary: toastStyle,
|
|
1107
|
+
},
|
|
1108
|
+
dark: {
|
|
1109
|
+
success: toastStyle,
|
|
1110
|
+
info: toastStyle,
|
|
1111
|
+
warn: toastStyle,
|
|
1112
|
+
error: toastStyle,
|
|
1113
|
+
secondary: toastStyle,
|
|
1114
|
+
},
|
|
1115
|
+
},
|
|
1116
|
+
},
|
|
1117
|
+
togglebutton: {
|
|
1118
|
+
root: {
|
|
1119
|
+
padding: '1px',
|
|
1120
|
+
borderRadius: '{border.radius.sm}',
|
|
1121
|
+
},
|
|
1122
|
+
colorScheme: {
|
|
1123
|
+
light: {
|
|
1124
|
+
root: {
|
|
1125
|
+
checkedColor: '{primary.500}',
|
|
1126
|
+
},
|
|
1127
|
+
},
|
|
1128
|
+
dark: {
|
|
1129
|
+
root: {
|
|
1130
|
+
checkedColor: '{primary.400}',
|
|
1131
|
+
},
|
|
1132
|
+
},
|
|
1133
|
+
},
|
|
1134
|
+
},
|
|
1135
|
+
button: {
|
|
1136
|
+
root: {
|
|
1137
|
+
borderRadius: '{border.radius.md}',
|
|
1138
|
+
gap: '0.25rem',
|
|
1139
|
+
},
|
|
1140
|
+
css: () => `
|
|
1141
|
+
.p-button.p-button-icon-only {
|
|
1142
|
+
padding-inline: 0;
|
|
1143
|
+
}
|
|
1144
|
+
`,
|
|
1145
|
+
},
|
|
1146
|
+
inputtext: {
|
|
1147
|
+
root: {
|
|
1148
|
+
borderRadius: inputBorderRadius,
|
|
1149
|
+
},
|
|
1150
|
+
},
|
|
1151
|
+
inputchips: {
|
|
1152
|
+
root: {
|
|
1153
|
+
borderRadius: inputBorderRadius,
|
|
1154
|
+
},
|
|
1155
|
+
},
|
|
1156
|
+
listbox: {
|
|
1157
|
+
root: {
|
|
1158
|
+
borderRadius: inputBorderRadius,
|
|
1159
|
+
},
|
|
1160
|
+
},
|
|
1161
|
+
avatar: {
|
|
1162
|
+
root: {
|
|
1163
|
+
borderRadius: '{border.radius.md}',
|
|
1164
|
+
},
|
|
1165
|
+
},
|
|
1166
|
+
tooltip: {
|
|
1167
|
+
css: () => `
|
|
1168
|
+
.p-tooltip .p-tooltip-text {
|
|
1169
|
+
font-size: 0.75rem;
|
|
1170
|
+
line-height: 1.2;
|
|
1171
|
+
}
|
|
1172
|
+
`,
|
|
1173
|
+
},
|
|
1174
|
+
selectbutton: {
|
|
1175
|
+
root: {
|
|
1176
|
+
borderRadius: '{border.radius.md}',
|
|
1177
|
+
},
|
|
1178
|
+
},
|
|
1179
|
+
multiselect: {
|
|
1180
|
+
root: {
|
|
1181
|
+
borderRadius: inputBorderRadius,
|
|
1182
|
+
},
|
|
1183
|
+
},
|
|
1184
|
+
textarea: {
|
|
1185
|
+
root: {
|
|
1186
|
+
borderRadius: inputBorderRadius,
|
|
1187
|
+
},
|
|
1188
|
+
},
|
|
1189
|
+
treeselect: {
|
|
1190
|
+
root: {
|
|
1191
|
+
borderRadius: inputBorderRadius,
|
|
1192
|
+
},
|
|
1193
|
+
},
|
|
1194
|
+
paginator: {
|
|
1195
|
+
root: {
|
|
1196
|
+
borderRadius: '{border.radius.md}',
|
|
1197
|
+
padding: '0',
|
|
1198
|
+
},
|
|
1199
|
+
navButton: {
|
|
1200
|
+
borderRadius: '{border.radius.sm}',
|
|
1201
|
+
},
|
|
1202
|
+
colorScheme: {
|
|
1203
|
+
light: {
|
|
1204
|
+
navButton: {
|
|
1205
|
+
color: '{surface.500}',
|
|
1206
|
+
hoverBackground: '{surface.50}',
|
|
1207
|
+
selectedBackground: '{primary.500}',
|
|
1208
|
+
selectedColor: '#ffffff',
|
|
1209
|
+
focusRing: {
|
|
1210
|
+
color: '{primary.100}',
|
|
1211
|
+
},
|
|
1212
|
+
},
|
|
1213
|
+
},
|
|
1214
|
+
dark: {
|
|
1215
|
+
navButton: {
|
|
1216
|
+
color: '{surface.200}',
|
|
1217
|
+
hoverBackground: 'transparent',
|
|
1218
|
+
selectedBackground: '{primary.500}',
|
|
1219
|
+
selectedColor: '#fff',
|
|
1220
|
+
focusRing: {
|
|
1221
|
+
color: '{primary.500}',
|
|
1222
|
+
},
|
|
1223
|
+
},
|
|
1224
|
+
},
|
|
1225
|
+
},
|
|
1226
|
+
css: () => `
|
|
1227
|
+
.p-paginator {
|
|
1228
|
+
--p-paginator-gap: 0.375rem;
|
|
1229
|
+
--p-paginator-nav-button-width: 1.75rem;
|
|
1230
|
+
--p-paginator-nav-button-height: 1.75rem;
|
|
1231
|
+
width: fit-content;
|
|
1232
|
+
padding: 0;
|
|
1233
|
+
border: 0;
|
|
1234
|
+
background: transparent;
|
|
1235
|
+
font-size: 0.875rem;
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
.p-paginator-pages {
|
|
1239
|
+
display: flex;
|
|
1240
|
+
gap: var(--p-paginator-gap);
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
.p-paginator-pages button,
|
|
1244
|
+
.p-paginator-prev,
|
|
1245
|
+
.p-paginator-next,
|
|
1246
|
+
.p-paginator-first,
|
|
1247
|
+
.p-paginator-last {
|
|
1248
|
+
min-width: var(--p-paginator-nav-button-width);
|
|
1249
|
+
height: var(--p-paginator-nav-button-height);
|
|
1250
|
+
border: 1px solid var(--p-surface-200);
|
|
1251
|
+
border-radius: 0.375rem;
|
|
1252
|
+
background: #fff;
|
|
1253
|
+
color: #667085;
|
|
1254
|
+
box-shadow: none;
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
.p-paginator .p-paginator-page.p-paginator-page-selected {
|
|
1258
|
+
border-color: var(--p-primary-color);
|
|
1259
|
+
background: var(--p-primary-color);
|
|
1260
|
+
color: #fff;
|
|
1261
|
+
font-weight: 500;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
.p-paginator-pages button:not(.p-paginator-page-selected):hover,
|
|
1265
|
+
.p-paginator-prev:hover,
|
|
1266
|
+
.p-paginator-next:hover,
|
|
1267
|
+
.p-paginator-first:hover,
|
|
1268
|
+
.p-paginator-last:hover {
|
|
1269
|
+
background: var(--p-surface-50);
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
.p-paginator .p-select {
|
|
1273
|
+
min-height: var(--p-paginator-nav-button-height);
|
|
1274
|
+
margin-inline-start: 0.5rem;
|
|
1275
|
+
border: 1px solid var(--p-surface-200);
|
|
1276
|
+
border-radius: 0.5rem;
|
|
1277
|
+
background: #fff;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
.p-paginator .p-select .p-select-label {
|
|
1281
|
+
padding: 0.375rem 0.625rem;
|
|
1282
|
+
font-size: 0.875rem;
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
/* Dark Mode Styles */
|
|
1286
|
+
.dark .p-paginator-pages button,
|
|
1287
|
+
.dark .p-paginator-prev,
|
|
1288
|
+
.dark .p-paginator-next,
|
|
1289
|
+
.dark .p-paginator-first,
|
|
1290
|
+
.dark .p-paginator-last,
|
|
1291
|
+
.dark .p-paginator .p-select {
|
|
1292
|
+
border-color: var(--p-surface-500);
|
|
1293
|
+
background: var(--p-surface-900);
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
.dark .p-paginator .p-paginator-page.p-paginator-page-selected {
|
|
1297
|
+
border-color: var(--p-primary-color);
|
|
1298
|
+
background: var(--p-primary-color);
|
|
1299
|
+
color: #fff;
|
|
1300
|
+
}
|
|
1301
|
+
`,
|
|
1302
|
+
},
|
|
1303
|
+
toggleswitch: {
|
|
1304
|
+
root: {
|
|
1305
|
+
width: '2.5rem',
|
|
1306
|
+
height: '1.4rem',
|
|
1307
|
+
},
|
|
1308
|
+
},
|
|
1309
|
+
select: {
|
|
1310
|
+
root: {
|
|
1311
|
+
borderRadius: inputBorderRadius,
|
|
1312
|
+
},
|
|
1313
|
+
optionGroup: {
|
|
1314
|
+
fontWeight: 'bold',
|
|
1315
|
+
padding: '6px 8px',
|
|
1316
|
+
background: '{surface.50}',
|
|
1317
|
+
color: '{primary.700}',
|
|
1318
|
+
},
|
|
1319
|
+
},
|
|
1320
|
+
// steps: {
|
|
1321
|
+
// item: {
|
|
1322
|
+
// link: {
|
|
1323
|
+
// gap: 'calc(50% + 0.25rem)',
|
|
1324
|
+
// },
|
|
1325
|
+
// number: {
|
|
1326
|
+
// font: {
|
|
1327
|
+
// size: '0.9rem',
|
|
1328
|
+
// },
|
|
1329
|
+
// active: {
|
|
1330
|
+
// color: 'white',
|
|
1331
|
+
// background: '{primary.500}',
|
|
1332
|
+
// border: {
|
|
1333
|
+
// color: '{primary.500}',
|
|
1334
|
+
// },
|
|
1335
|
+
// },
|
|
1336
|
+
// },
|
|
1337
|
+
// },
|
|
1338
|
+
// },
|
|
1339
|
+
},
|
|
1340
|
+
};
|
|
1341
|
+
// The DS layer is merged last so it wins on the tokens it names, while
|
|
1342
|
+
// everything it stays silent about keeps the classic behaviour.
|
|
1343
|
+
if ((themeOptions?.designIdentity ?? 'classic') === 'experimental') {
|
|
1344
|
+
return definePreset(Aura, configs, dsIdentityConfigs(themeOptions?.primaryColor));
|
|
1345
|
+
}
|
|
1346
|
+
return definePreset(Aura, configs);
|
|
1347
|
+
};
|
|
1348
|
+
/**
|
|
1349
|
+
* Switches identity at runtime — for the showcase toggle and for side-by-side
|
|
1350
|
+
* review. Replaces the active preset outright (rather than merging into it, as
|
|
1351
|
+
* `updatePreset` would) so switching back to classic is lossless.
|
|
1352
|
+
*/
|
|
1353
|
+
function setMTDesignIdentity(identity, themeOptions) {
|
|
1354
|
+
activeDesignIdentity = identity;
|
|
1355
|
+
applyDesignIdentityClass(identity);
|
|
1356
|
+
usePreset(MTPreset({ ...themeOptions, designIdentity: identity }));
|
|
1357
|
+
}
|
|
1358
|
+
function provideMTComponents(themeOptions) {
|
|
1359
|
+
activeDesignIdentity = themeOptions?.designIdentity ?? 'classic';
|
|
1360
|
+
applyDesignIdentityClass(activeDesignIdentity);
|
|
1361
|
+
changeBackgroundColor(themeOptions?.backgroundColor);
|
|
1362
|
+
return providePrimeNG({
|
|
1363
|
+
zIndex: {
|
|
1364
|
+
modal: 1900,
|
|
1365
|
+
overlay: 1500,
|
|
1366
|
+
menu: 1500,
|
|
1367
|
+
tooltip: 1600,
|
|
1368
|
+
},
|
|
1369
|
+
theme: {
|
|
1370
|
+
preset: MTPreset(themeOptions),
|
|
1371
|
+
options: {
|
|
1372
|
+
darkModeSelector: '.dark',
|
|
1373
|
+
},
|
|
1374
|
+
},
|
|
1375
|
+
});
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
function provideMTMessages() {
|
|
1379
|
+
return MessageService;
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
function provideMTConfirmation() {
|
|
1383
|
+
return ConfirmationService;
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
const DEFAULT_MT_DATE_FORMATS = {
|
|
1387
|
+
date: 'dd/MM/yyyy',
|
|
1388
|
+
dateTime: 'dd/MM/yyyy HH:mm',
|
|
1389
|
+
time: 'HH:mm',
|
|
1390
|
+
};
|
|
1391
|
+
const MT_DATE_FORMATS = new InjectionToken('MT_DATE_FORMATS', {
|
|
1392
|
+
factory: () => ({ ...DEFAULT_MT_DATE_FORMATS }),
|
|
1393
|
+
});
|
|
1394
|
+
/**
|
|
1395
|
+
* Converts .NET custom date/time format tokens to Angular `formatDate` (CLDR)
|
|
1396
|
+
* tokens. System-setting formats are authored in .NET convention (e.g. `hh:mm tt`),
|
|
1397
|
+
* but `formatDate` uses CLDR tokens where the AM/PM designator is `a`, not `tt`.
|
|
1398
|
+
* Every other token in the supported set (d, M, y, H, h, m, s) is identical between
|
|
1399
|
+
* the two, so only `tt`/`t` → `a` needs translating. Single-quoted literal sections
|
|
1400
|
+
* (e.g. `'at'`) are left untouched.
|
|
1401
|
+
*/
|
|
1402
|
+
function toAngularDateFormat(format) {
|
|
1403
|
+
return format
|
|
1404
|
+
.split(/('[^']*')/g)
|
|
1405
|
+
.map((part) => (part.startsWith("'") ? part : part.replace(/t+/g, 'a')))
|
|
1406
|
+
.join('');
|
|
1407
|
+
}
|
|
1408
|
+
function provideMTDateFormats(formats) {
|
|
1409
|
+
return makeEnvironmentProviders([
|
|
1410
|
+
{
|
|
1411
|
+
provide: MT_DATE_FORMATS,
|
|
1412
|
+
useFactory: () => ({
|
|
1413
|
+
...DEFAULT_MT_DATE_FORMATS,
|
|
1414
|
+
...formats,
|
|
1415
|
+
}),
|
|
1416
|
+
},
|
|
1417
|
+
]);
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
class ValidatorConfig {
|
|
1421
|
+
type;
|
|
1422
|
+
value;
|
|
1423
|
+
message;
|
|
1424
|
+
customValidator;
|
|
1425
|
+
constructor(config) {
|
|
1426
|
+
this.type = config.type;
|
|
1427
|
+
this.value = config.value;
|
|
1428
|
+
this.message = config.message;
|
|
1429
|
+
this.customValidator = config.customValidator;
|
|
1430
|
+
}
|
|
1431
|
+
// Factory methods for common validators.
|
|
1432
|
+
//
|
|
1433
|
+
// IMPORTANT: none of these default `message` to a hardcoded English string.
|
|
1434
|
+
// buildValidators() wraps the underlying Angular validator (and keys the
|
|
1435
|
+
// resulting error) whenever `config.message` is truthy — a default here
|
|
1436
|
+
// would mean every consumer that omits a message still gets one baked in,
|
|
1437
|
+
// permanently shadowing ErrorMessagePipe's translated generic message for
|
|
1438
|
+
// that error type in every locale but English. Only pass a message when
|
|
1439
|
+
// you have a real, field-specific (and ideally already-translated) one to
|
|
1440
|
+
// show; otherwise leave it unset and let the pipe render the translated
|
|
1441
|
+
// generic copy.
|
|
1442
|
+
static required(message) {
|
|
1443
|
+
return new ValidatorConfig({ type: 'required', message });
|
|
1444
|
+
}
|
|
1445
|
+
static email(message) {
|
|
1446
|
+
return new ValidatorConfig({ type: 'email', message });
|
|
1447
|
+
}
|
|
1448
|
+
static minLength(length, message) {
|
|
1449
|
+
return new ValidatorConfig({ type: 'minLength', value: length, message });
|
|
1450
|
+
}
|
|
1451
|
+
static maxLength(length, message) {
|
|
1452
|
+
return new ValidatorConfig({ type: 'maxLength', value: length, message });
|
|
1453
|
+
}
|
|
1454
|
+
static min(value, message) {
|
|
1455
|
+
return new ValidatorConfig({ type: 'min', value, message });
|
|
1456
|
+
}
|
|
1457
|
+
static max(value, message) {
|
|
1458
|
+
return new ValidatorConfig({ type: 'max', value, message });
|
|
1459
|
+
}
|
|
1460
|
+
static pattern(pattern, message) {
|
|
1461
|
+
return new ValidatorConfig({ type: 'pattern', value: pattern, message });
|
|
1462
|
+
}
|
|
1463
|
+
static custom(validator, message = 'Invalid value') {
|
|
1464
|
+
return new ValidatorConfig({
|
|
1465
|
+
type: 'custom',
|
|
1466
|
+
customValidator: validator,
|
|
1467
|
+
message,
|
|
1468
|
+
});
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
class BaseFieldConfig {
|
|
1472
|
+
key;
|
|
1473
|
+
label;
|
|
1474
|
+
type;
|
|
1475
|
+
required;
|
|
1476
|
+
disabled;
|
|
1477
|
+
readonly;
|
|
1478
|
+
hidden;
|
|
1479
|
+
placeholder;
|
|
1480
|
+
hint;
|
|
1481
|
+
cssClass;
|
|
1482
|
+
validators;
|
|
1483
|
+
order;
|
|
1484
|
+
colSpan;
|
|
1485
|
+
defaultValue;
|
|
1486
|
+
customTemplate;
|
|
1487
|
+
relations;
|
|
1488
|
+
formulaCondition;
|
|
1489
|
+
constructor(config) {
|
|
1490
|
+
this.key = config.key || 'Key';
|
|
1491
|
+
this.label = config.label || '';
|
|
1492
|
+
this.type = config.type;
|
|
1493
|
+
this.required = config.required || false;
|
|
1494
|
+
this.disabled = config.disabled || false;
|
|
1495
|
+
this.readonly = config.readonly || false;
|
|
1496
|
+
this.hidden = config.hidden || false;
|
|
1497
|
+
this.placeholder = config.placeholder || '';
|
|
1498
|
+
this.hint = config.hint || '';
|
|
1499
|
+
this.cssClass = config.cssClass || '';
|
|
1500
|
+
this.validators = config.validators || [];
|
|
1501
|
+
this.order = config.order || 0;
|
|
1502
|
+
this.relations = config.relations || [];
|
|
1503
|
+
this.formulaCondition = config.formulaCondition;
|
|
1504
|
+
this.colSpan = config.colSpan || 12;
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
// Specific configurations for different field types
|
|
1508
|
+
class TextFieldConfig extends BaseFieldConfig {
|
|
1509
|
+
inputType;
|
|
1510
|
+
constructor(config) {
|
|
1511
|
+
super({ ...config, type: 'text' });
|
|
1512
|
+
this.inputType = config.inputType || 'text';
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
class TextareaFieldConfig extends BaseFieldConfig {
|
|
1516
|
+
rows;
|
|
1517
|
+
autoResize;
|
|
1518
|
+
constructor(config) {
|
|
1519
|
+
super({ ...config, type: 'textarea' });
|
|
1520
|
+
this.rows = config.rows || 3;
|
|
1521
|
+
this.autoResize = config.autoResize || false;
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
class SelectFieldConfig extends BaseFieldConfig {
|
|
1525
|
+
options;
|
|
1526
|
+
optionLabel;
|
|
1527
|
+
optionValue;
|
|
1528
|
+
group;
|
|
1529
|
+
optionGroupLabel;
|
|
1530
|
+
optionGroupChildren;
|
|
1531
|
+
multiple;
|
|
1532
|
+
filter;
|
|
1533
|
+
filterBy;
|
|
1534
|
+
filterPlaceholder;
|
|
1535
|
+
showClear;
|
|
1536
|
+
emptyMessage;
|
|
1537
|
+
size;
|
|
1538
|
+
hasPlaceholderPrefix;
|
|
1539
|
+
constructor(config) {
|
|
1540
|
+
super({ ...config, type: 'select' });
|
|
1541
|
+
this.options = config.options;
|
|
1542
|
+
this.optionLabel = config.optionLabel || 'label';
|
|
1543
|
+
this.optionValue = config.optionValue || 'value';
|
|
1544
|
+
this.group = config.group || false;
|
|
1545
|
+
this.optionGroupLabel = config.optionGroupLabel || 'label';
|
|
1546
|
+
this.optionGroupChildren = config.optionGroupChildren || 'items';
|
|
1547
|
+
this.multiple = config.multiple || false;
|
|
1548
|
+
this.filter = config.filter || false;
|
|
1549
|
+
this.filterBy = config.filterBy || '';
|
|
1550
|
+
this.filterPlaceholder = config.filterPlaceholder || 'Search...';
|
|
1551
|
+
this.showClear = config.showClear || false;
|
|
1552
|
+
this.emptyMessage = config.emptyMessage || 'No options available';
|
|
1553
|
+
this.size = config.size || '';
|
|
1554
|
+
this.hasPlaceholderPrefix =
|
|
1555
|
+
config.hasPlaceholderPrefix === undefined
|
|
1556
|
+
? true
|
|
1557
|
+
: config.hasPlaceholderPrefix;
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
class RadioButtonFieldConfig extends BaseFieldConfig {
|
|
1561
|
+
options;
|
|
1562
|
+
optionLabel;
|
|
1563
|
+
optionValue;
|
|
1564
|
+
orientation;
|
|
1565
|
+
constructor(config) {
|
|
1566
|
+
super({ ...config, type: 'radio-button' });
|
|
1567
|
+
this.options = config.options;
|
|
1568
|
+
this.optionLabel = config.optionLabel || 'label';
|
|
1569
|
+
this.optionValue = config.optionValue || 'value';
|
|
1570
|
+
this.orientation = config.orientation || 'vertical';
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
class RadioCardsFieldConfig extends BaseFieldConfig {
|
|
1574
|
+
options;
|
|
1575
|
+
optionLabel;
|
|
1576
|
+
optionValue;
|
|
1577
|
+
size;
|
|
1578
|
+
constructor(config) {
|
|
1579
|
+
super({ ...config, type: 'radio-cards' });
|
|
1580
|
+
this.options = config.options;
|
|
1581
|
+
this.optionLabel = config.optionLabel || 'label';
|
|
1582
|
+
this.optionValue = config.optionValue || 'value';
|
|
1583
|
+
this.size = config.size || 'small';
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
class UserSearchFieldConfig extends BaseFieldConfig {
|
|
1587
|
+
optionLabel;
|
|
1588
|
+
optionValue;
|
|
1589
|
+
size;
|
|
1590
|
+
apiUrl;
|
|
1591
|
+
context;
|
|
1592
|
+
isMultiple;
|
|
1593
|
+
hideUnlinkedHint;
|
|
1594
|
+
dataKey;
|
|
1595
|
+
paramName;
|
|
1596
|
+
minLength;
|
|
1597
|
+
constructor(config) {
|
|
1598
|
+
super({ ...config, type: 'user-search' });
|
|
1599
|
+
this.optionLabel = config.optionLabel || 'label';
|
|
1600
|
+
this.optionValue = config.optionValue || 'value';
|
|
1601
|
+
this.size = config.size || '';
|
|
1602
|
+
this.hint = config.hint || '';
|
|
1603
|
+
this.context = config.context || undefined;
|
|
1604
|
+
this.apiUrl = config.apiUrl || '';
|
|
1605
|
+
this.placeholder = config.placeholder || 'Search';
|
|
1606
|
+
this.isMultiple = config.isMultiple || false;
|
|
1607
|
+
this.hideUnlinkedHint = config.hideUnlinkedHint || false;
|
|
1608
|
+
this.dataKey = config.dataKey || 'data';
|
|
1609
|
+
this.paramName = config.paramName || 'query';
|
|
1610
|
+
this.minLength = config.minLength ?? 1;
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
class LocationFieldConfig extends BaseFieldConfig {
|
|
1614
|
+
configuration;
|
|
1615
|
+
searchUrl;
|
|
1616
|
+
minLength;
|
|
1617
|
+
constructor(config) {
|
|
1618
|
+
super({ ...config, type: 'location' });
|
|
1619
|
+
this.configuration = config.configuration ?? null;
|
|
1620
|
+
this.searchUrl = config.searchUrl;
|
|
1621
|
+
this.minLength = config.minLength ?? 2;
|
|
1622
|
+
}
|
|
1623
|
+
}
|
|
1624
|
+
class UploadFileFieldConfig extends BaseFieldConfig {
|
|
1625
|
+
size;
|
|
1626
|
+
endPoint;
|
|
1627
|
+
userImgClass;
|
|
1628
|
+
shape;
|
|
1629
|
+
multiple;
|
|
1630
|
+
accept;
|
|
1631
|
+
fileSizeLimit;
|
|
1632
|
+
context;
|
|
1633
|
+
title;
|
|
1634
|
+
description;
|
|
1635
|
+
constructor(config) {
|
|
1636
|
+
super({ ...config, type: 'upload-file' });
|
|
1637
|
+
this.size = config.size || 'normal';
|
|
1638
|
+
this.endPoint = config.endPoint || 'uploader';
|
|
1639
|
+
this.userImgClass =
|
|
1640
|
+
config.userImgClass || 'w-25! h-25! text-4xl! text-gray-400!';
|
|
1641
|
+
this.shape = config.shape || 'field';
|
|
1642
|
+
this.multiple = config.multiple ?? false;
|
|
1643
|
+
this.accept = config.accept || '.pdf,.doc,.docx,.xlsx,image/*';
|
|
1644
|
+
this.fileSizeLimit = config.fileSizeLimit || undefined;
|
|
1645
|
+
this.context = config.context || undefined;
|
|
1646
|
+
this.title = config.title || 'Upload File';
|
|
1647
|
+
this.description = config.description || 'Click or drop a file to upload';
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
1650
|
+
class DateFieldConfig extends BaseFieldConfig {
|
|
1651
|
+
dateFormat;
|
|
1652
|
+
showTime;
|
|
1653
|
+
/** Edits the clock time only — no calendar. The value stays a full `Date`. */
|
|
1654
|
+
timeOnly;
|
|
1655
|
+
showSeconds;
|
|
1656
|
+
hourFormat;
|
|
1657
|
+
minDate;
|
|
1658
|
+
maxDate;
|
|
1659
|
+
disabledDates;
|
|
1660
|
+
disabledDays;
|
|
1661
|
+
yearRange;
|
|
1662
|
+
showIcon;
|
|
1663
|
+
icon;
|
|
1664
|
+
showButtonBar;
|
|
1665
|
+
showClear;
|
|
1666
|
+
inline;
|
|
1667
|
+
constructor(config) {
|
|
1668
|
+
super({ ...config, type: 'date' });
|
|
1669
|
+
this.dateFormat = config.dateFormat || 'yyyy-mm-dd';
|
|
1670
|
+
this.showTime = config.showTime || false;
|
|
1671
|
+
this.timeOnly = config.timeOnly || false;
|
|
1672
|
+
this.showSeconds = config.showSeconds || false;
|
|
1673
|
+
this.hourFormat = config.hourFormat || '24';
|
|
1674
|
+
this.minDate = config.minDate;
|
|
1675
|
+
this.maxDate = config.maxDate;
|
|
1676
|
+
this.disabledDates = config.disabledDates || [];
|
|
1677
|
+
this.disabledDays = config.disabledDays || [];
|
|
1678
|
+
this.yearRange = config.yearRange || '1900:2030';
|
|
1679
|
+
this.showIcon = config.showIcon || true;
|
|
1680
|
+
this.icon = config.icon || 'pi pi-calendar';
|
|
1681
|
+
this.showButtonBar = config.showButtonBar || false;
|
|
1682
|
+
this.showClear = config.showClear || true;
|
|
1683
|
+
this.inline = config.inline || false;
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
class NumberFieldConfig extends BaseFieldConfig {
|
|
1687
|
+
min;
|
|
1688
|
+
max;
|
|
1689
|
+
step;
|
|
1690
|
+
prefix;
|
|
1691
|
+
suffix;
|
|
1692
|
+
currency;
|
|
1693
|
+
locale;
|
|
1694
|
+
minFractionDigits;
|
|
1695
|
+
maxFractionDigits;
|
|
1696
|
+
useGrouping;
|
|
1697
|
+
showButtons;
|
|
1698
|
+
buttonLayout;
|
|
1699
|
+
incrementButtonClass;
|
|
1700
|
+
decrementButtonClass;
|
|
1701
|
+
incrementButtonIcon;
|
|
1702
|
+
decrementButtonIcon;
|
|
1703
|
+
constructor(config) {
|
|
1704
|
+
super({ ...config, type: 'number' });
|
|
1705
|
+
this.min = config.min;
|
|
1706
|
+
this.max = config.max;
|
|
1707
|
+
this.step = config.step || 1;
|
|
1708
|
+
this.prefix = config.prefix;
|
|
1709
|
+
this.suffix = config.suffix;
|
|
1710
|
+
this.currency = config.currency;
|
|
1711
|
+
this.locale = config.locale;
|
|
1712
|
+
this.minFractionDigits = config.minFractionDigits;
|
|
1713
|
+
this.maxFractionDigits = config.maxFractionDigits;
|
|
1714
|
+
this.useGrouping = config.useGrouping || false;
|
|
1715
|
+
this.showButtons = config.showButtons || false;
|
|
1716
|
+
this.buttonLayout = config.buttonLayout || 'stacked';
|
|
1717
|
+
this.incrementButtonClass = config.incrementButtonClass;
|
|
1718
|
+
this.decrementButtonClass = config.decrementButtonClass;
|
|
1719
|
+
this.incrementButtonIcon = config.incrementButtonIcon;
|
|
1720
|
+
this.decrementButtonIcon = config.decrementButtonIcon;
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1723
|
+
class SliderFieldConfig extends BaseFieldConfig {
|
|
1724
|
+
min;
|
|
1725
|
+
max;
|
|
1726
|
+
step;
|
|
1727
|
+
orientation;
|
|
1728
|
+
range;
|
|
1729
|
+
animate;
|
|
1730
|
+
unit;
|
|
1731
|
+
constructor(config) {
|
|
1732
|
+
super({ ...config, type: 'slider' });
|
|
1733
|
+
this.min = config.min || 0;
|
|
1734
|
+
this.max = config.max || 100;
|
|
1735
|
+
this.step = config.step || 1;
|
|
1736
|
+
this.orientation = config.orientation || 'horizontal';
|
|
1737
|
+
this.range = config.range || false;
|
|
1738
|
+
this.animate = config.animate || false;
|
|
1739
|
+
this.unit = config.unit || '';
|
|
1740
|
+
}
|
|
1741
|
+
}
|
|
1742
|
+
class MultiSelectFieldConfig extends BaseFieldConfig {
|
|
1743
|
+
options;
|
|
1744
|
+
optionLabel;
|
|
1745
|
+
optionValue;
|
|
1746
|
+
filter;
|
|
1747
|
+
filterBy;
|
|
1748
|
+
filterPlaceholder;
|
|
1749
|
+
showClear;
|
|
1750
|
+
emptyMessage;
|
|
1751
|
+
display;
|
|
1752
|
+
maxSelectedLabels;
|
|
1753
|
+
selectedItemsLabel;
|
|
1754
|
+
showToggleAll;
|
|
1755
|
+
resetFilterOnHide;
|
|
1756
|
+
constructor(config) {
|
|
1757
|
+
super({ ...config, type: 'multi-select' });
|
|
1758
|
+
this.options = config.options;
|
|
1759
|
+
this.optionLabel = config.optionLabel || 'label';
|
|
1760
|
+
this.optionValue = config.optionValue || 'value';
|
|
1761
|
+
this.filter = config.filter || false;
|
|
1762
|
+
this.filterBy = config.filterBy || '';
|
|
1763
|
+
this.filterPlaceholder = config.filterPlaceholder || 'Search...';
|
|
1764
|
+
this.showClear = config.showClear || false;
|
|
1765
|
+
this.emptyMessage = config.emptyMessage || 'No options available';
|
|
1766
|
+
this.display = config.display || 'comma';
|
|
1767
|
+
this.maxSelectedLabels = config.maxSelectedLabels || 3;
|
|
1768
|
+
this.selectedItemsLabel = config.selectedItemsLabel || '{0} items selected';
|
|
1769
|
+
this.showToggleAll = config.showToggleAll || true;
|
|
1770
|
+
this.resetFilterOnHide = config.resetFilterOnHide || false;
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
class PickListFieldConfig extends BaseFieldConfig {
|
|
1774
|
+
options;
|
|
1775
|
+
optionLabel;
|
|
1776
|
+
optionValue;
|
|
1777
|
+
sourceHeader;
|
|
1778
|
+
targetHeader;
|
|
1779
|
+
showSourceControls;
|
|
1780
|
+
showTargetControls;
|
|
1781
|
+
showSourceFilter;
|
|
1782
|
+
showTargetFilter;
|
|
1783
|
+
filterBy;
|
|
1784
|
+
dataKey;
|
|
1785
|
+
dragdrop;
|
|
1786
|
+
responsive;
|
|
1787
|
+
breakpoint;
|
|
1788
|
+
constructor(config) {
|
|
1789
|
+
super({ ...config, type: 'pick-list' });
|
|
1790
|
+
this.options = config.options;
|
|
1791
|
+
this.optionLabel = config.optionLabel || 'label';
|
|
1792
|
+
this.optionValue = config.optionValue || 'value';
|
|
1793
|
+
this.sourceHeader = config.sourceHeader || 'Available';
|
|
1794
|
+
this.targetHeader = config.targetHeader || 'Selected';
|
|
1795
|
+
this.showSourceControls =
|
|
1796
|
+
config.showSourceControls !== undefined
|
|
1797
|
+
? config.showSourceControls
|
|
1798
|
+
: true;
|
|
1799
|
+
this.showTargetControls =
|
|
1800
|
+
config.showTargetControls !== undefined
|
|
1801
|
+
? config.showTargetControls
|
|
1802
|
+
: true;
|
|
1803
|
+
this.showSourceFilter =
|
|
1804
|
+
config.showSourceFilter !== undefined ? config.showSourceFilter : false;
|
|
1805
|
+
this.showTargetFilter =
|
|
1806
|
+
config.showTargetFilter !== undefined ? config.showTargetFilter : false;
|
|
1807
|
+
this.filterBy = config.filterBy || this.optionLabel;
|
|
1808
|
+
this.dataKey = config.dataKey || this.optionValue;
|
|
1809
|
+
this.dragdrop = config.dragdrop ?? false;
|
|
1810
|
+
this.responsive = config.responsive ?? true;
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
class CheckboxFieldConfig extends BaseFieldConfig {
|
|
1814
|
+
binary;
|
|
1815
|
+
trueValue;
|
|
1816
|
+
falseValue;
|
|
1817
|
+
checkboxIcon;
|
|
1818
|
+
constructor(config) {
|
|
1819
|
+
super({ ...config, type: 'checkbox' });
|
|
1820
|
+
this.binary = config.binary !== false; // Default to true
|
|
1821
|
+
this.trueValue = config.trueValue !== undefined ? config.trueValue : true;
|
|
1822
|
+
this.falseValue =
|
|
1823
|
+
config.falseValue !== undefined ? config.falseValue : false;
|
|
1824
|
+
this.checkboxIcon = config.checkboxIcon;
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
class ToggleFieldConfig extends BaseFieldConfig {
|
|
1828
|
+
toggleShape;
|
|
1829
|
+
icon;
|
|
1830
|
+
descriptionCard;
|
|
1831
|
+
constructor(config) {
|
|
1832
|
+
super({ ...config, type: 'toggle' });
|
|
1833
|
+
this.toggleShape = config.toggleShape ?? 'toggle';
|
|
1834
|
+
this.icon = config.icon;
|
|
1835
|
+
this.descriptionCard = config.descriptionCard;
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
class EditorFieldConfig extends BaseFieldConfig {
|
|
1839
|
+
constructor(config) {
|
|
1840
|
+
super({ ...config, type: 'editor-field' });
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
class ColorPickerFieldConfig extends BaseFieldConfig {
|
|
1844
|
+
format;
|
|
1845
|
+
inline;
|
|
1846
|
+
appendTo;
|
|
1847
|
+
variant;
|
|
1848
|
+
constructor(config) {
|
|
1849
|
+
super({ ...config, type: 'color-picker' });
|
|
1850
|
+
this.format = config.format || 'hex';
|
|
1851
|
+
this.inline = config.inline || false;
|
|
1852
|
+
this.appendTo = config.appendTo || 'body';
|
|
1853
|
+
this.variant = config.variant || 'outlined';
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1856
|
+
class IconFieldConfig extends BaseFieldConfig {
|
|
1857
|
+
constructor(config) {
|
|
1858
|
+
super({ ...config, type: 'icon-field' });
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1861
|
+
class SpacerFieldConfig extends BaseFieldConfig {
|
|
1862
|
+
constructor(config) {
|
|
1863
|
+
super({
|
|
1864
|
+
...config,
|
|
1865
|
+
type: 'spacer',
|
|
1866
|
+
key: config.key || `spacer_${Date.now()}`,
|
|
1867
|
+
label: config.label || '',
|
|
1868
|
+
});
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
class LookupMatrixFieldConfig extends BaseFieldConfig {
|
|
1872
|
+
xFieldKey;
|
|
1873
|
+
yFieldKey;
|
|
1874
|
+
xAxisLabel;
|
|
1875
|
+
yAxisLabel;
|
|
1876
|
+
xOptions;
|
|
1877
|
+
yOptions;
|
|
1878
|
+
cells;
|
|
1879
|
+
emptyMessage;
|
|
1880
|
+
constructor(config) {
|
|
1881
|
+
super({ ...config, type: 'lookup-matrix' });
|
|
1882
|
+
this.xFieldKey = config.xFieldKey;
|
|
1883
|
+
this.yFieldKey = config.yFieldKey;
|
|
1884
|
+
this.xAxisLabel = config.xAxisLabel || '';
|
|
1885
|
+
this.yAxisLabel = config.yAxisLabel;
|
|
1886
|
+
this.xOptions = config.xOptions || [];
|
|
1887
|
+
this.yOptions = config.yOptions;
|
|
1888
|
+
this.cells = config.cells || [];
|
|
1889
|
+
this.emptyMessage = config.emptyMessage || 'No matrix data available';
|
|
1890
|
+
}
|
|
1891
|
+
}
|
|
1892
|
+
class SchemaConnectionFieldConfig extends BaseFieldConfig {
|
|
1893
|
+
configuration;
|
|
1894
|
+
context;
|
|
1895
|
+
filter;
|
|
1896
|
+
constructor(config) {
|
|
1897
|
+
super({ ...config, type: 'schema-connection' });
|
|
1898
|
+
this.configuration = config.configuration;
|
|
1899
|
+
this.context = config.context || undefined;
|
|
1900
|
+
this.filter = config.filter ?? true;
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1903
|
+
class SchedulePredecessorFieldConfig extends BaseFieldConfig {
|
|
1904
|
+
configuration;
|
|
1905
|
+
runtimeContext;
|
|
1906
|
+
constructor(config) {
|
|
1907
|
+
super({ ...config, type: 'predecessor' });
|
|
1908
|
+
this.configuration = config.configuration ?? null;
|
|
1909
|
+
this.runtimeContext = config.runtimeContext ?? null;
|
|
1910
|
+
}
|
|
1911
|
+
}
|
|
1912
|
+
class EntityListFieldConfig extends BaseFieldConfig {
|
|
1913
|
+
/** EntityList property id (used in the read endpoint route). */
|
|
1914
|
+
propertyId;
|
|
1915
|
+
/** Property configuration (sourceType, moduleId, access, snapshotMode, fields). */
|
|
1916
|
+
configuration;
|
|
1917
|
+
/** Runtime ids needed to call the read endpoint. */
|
|
1918
|
+
runtimeContext;
|
|
1919
|
+
context;
|
|
1920
|
+
constructor(config) {
|
|
1921
|
+
super({ ...config, type: 'entity-list' });
|
|
1922
|
+
this.propertyId = config.propertyId ?? null;
|
|
1923
|
+
this.configuration = config.configuration ?? null;
|
|
1924
|
+
this.runtimeContext = config.runtimeContext ?? null;
|
|
1925
|
+
this.context = config.context;
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
class ScheduleItemSelectorFieldConfig extends BaseFieldConfig {
|
|
1929
|
+
/** Property key — used in the options endpoint route `forms/options/{propertyKey}`. */
|
|
1930
|
+
propertyKey;
|
|
1931
|
+
/** `Single` renders a single-select picker, `Multi` a multi-select picker. */
|
|
1932
|
+
selectionMode;
|
|
1933
|
+
/** Raw property configuration (selectionMode, scheduleModuleKey, etc.). */
|
|
1934
|
+
configuration;
|
|
1935
|
+
/** Runtime ids needed to call the options endpoint. */
|
|
1936
|
+
runtimeContext;
|
|
1937
|
+
context;
|
|
1938
|
+
constructor(config) {
|
|
1939
|
+
super({ ...config, type: 'schedule-item-selector' });
|
|
1940
|
+
this.propertyKey = config.propertyKey || config.key || '';
|
|
1941
|
+
this.selectionMode = config.selectionMode || 'Multi';
|
|
1942
|
+
this.configuration = config.configuration ?? null;
|
|
1943
|
+
this.runtimeContext = config.runtimeContext ?? null;
|
|
1944
|
+
this.context = config.context;
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
class LookupModuleCheckListFieldConfig extends BaseFieldConfig {
|
|
1948
|
+
/** Lookup items rendered as collapsible checklist sections. */
|
|
1949
|
+
lookupOptions;
|
|
1950
|
+
/** Full lookup catalog passed through to the rich nested form renderer. */
|
|
1951
|
+
lookups;
|
|
1952
|
+
/** Module property keys/labels captured per checklist entry. */
|
|
1953
|
+
propertyFields;
|
|
1954
|
+
/** Scope module id whose form is loaded for each section. */
|
|
1955
|
+
scopeId;
|
|
1956
|
+
/** Property keys to render in each section form (`allowedFieldKeys`). */
|
|
1957
|
+
propertyKeys;
|
|
1958
|
+
/** Runtime ids needed to load each section form. */
|
|
1959
|
+
runtimeContext;
|
|
1960
|
+
/** Raw property configuration (lookup id, scope/module id, properties). */
|
|
1961
|
+
configuration;
|
|
1962
|
+
constructor(config) {
|
|
1963
|
+
super({ ...config, type: 'lookup-module-check-list' });
|
|
1964
|
+
this.lookupOptions = config.lookupOptions || [];
|
|
1965
|
+
this.lookups = config.lookups || [];
|
|
1966
|
+
this.propertyFields = config.propertyFields || [];
|
|
1967
|
+
this.scopeId = config.scopeId ?? null;
|
|
1968
|
+
this.propertyKeys = config.propertyKeys || [];
|
|
1969
|
+
this.runtimeContext = config.runtimeContext ?? null;
|
|
1970
|
+
this.configuration = config.configuration ?? null;
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
function createCustomValidator(customValidator, message) {
|
|
1974
|
+
return (control) => {
|
|
1975
|
+
const result = customValidator(control.value, control);
|
|
1976
|
+
if (result instanceof Promise) {
|
|
1977
|
+
// Handle async validation
|
|
1978
|
+
result.then((isValid) => {
|
|
1979
|
+
if (!isValid) {
|
|
1980
|
+
control.setErrors({
|
|
1981
|
+
custom: { message: message || 'Invalid value' },
|
|
1982
|
+
});
|
|
1983
|
+
}
|
|
1984
|
+
});
|
|
1985
|
+
return null; // For async, return null initially
|
|
1986
|
+
}
|
|
1987
|
+
else {
|
|
1988
|
+
// Handle sync validation
|
|
1989
|
+
return result
|
|
1990
|
+
? null
|
|
1991
|
+
: { custom: { message: message || 'Invalid value' } };
|
|
1992
|
+
}
|
|
1993
|
+
};
|
|
1994
|
+
}
|
|
1995
|
+
function wrapValidatorWithMessage(validator, errorKey, message) {
|
|
1996
|
+
return (control) => {
|
|
1997
|
+
const result = validator(control);
|
|
1998
|
+
if (result) {
|
|
1999
|
+
// Replace the default error with custom message
|
|
2000
|
+
return { [errorKey]: { ...result[Object.keys(result)[0]], message } };
|
|
2001
|
+
}
|
|
2002
|
+
return null;
|
|
2003
|
+
};
|
|
2004
|
+
}
|
|
2005
|
+
// DynamicFieldConfig = input.required<any>({
|
|
2006
|
+
// transform: (value: any) => this.transformToDateFieldConfig(value)
|
|
2007
|
+
// });
|
|
2008
|
+
// transformToDateFieldConfig(value: any){
|
|
2009
|
+
// return new TextFieldConfig()
|
|
2010
|
+
// }
|
|
2011
|
+
|
|
2012
|
+
/**
|
|
2013
|
+
* @deprecated Use direct `select()` + `computed()` pattern instead for better performance.
|
|
2014
|
+
*
|
|
2015
|
+
* **Problem with BaseFacade:**
|
|
2016
|
+
* - All computed signals depend on the full state, causing unnecessary recomputations
|
|
2017
|
+
* - Bypasses NGXS selector memoization
|
|
2018
|
+
* - Uses `as any` casting, losing type safety
|
|
2019
|
+
*
|
|
2020
|
+
* **New Pattern - Use slice-based selectors:**
|
|
2021
|
+
*
|
|
2022
|
+
* ```typescript
|
|
2023
|
+
* // In your State class - add slice selectors:
|
|
2024
|
+
* @Selector()
|
|
2025
|
+
* static getLoadingActive(state: MyStateModel): string[] {
|
|
2026
|
+
* return state.loadingActive;
|
|
2027
|
+
* }
|
|
2028
|
+
*
|
|
2029
|
+
* @Selector()
|
|
2030
|
+
* static getErrors(state: MyStateModel): Record<string, string | null> {
|
|
2031
|
+
* return state.errors;
|
|
2032
|
+
* }
|
|
2033
|
+
*
|
|
2034
|
+
* // In your Facade - don't extend BaseFacade:
|
|
2035
|
+
* @Injectable({ providedIn: 'root' })
|
|
2036
|
+
* export class MyFacade {
|
|
2037
|
+
* private readonly store = inject(Store);
|
|
2038
|
+
*
|
|
2039
|
+
* // Data selectors - memoized by NGXS
|
|
2040
|
+
* readonly items = select(MyState.getItems);
|
|
2041
|
+
*
|
|
2042
|
+
* // Loading/Error slices - memoized by NGXS
|
|
2043
|
+
* private readonly loadingActive = select(MyState.getLoadingActive);
|
|
2044
|
+
* private readonly errors = select(MyState.getErrors);
|
|
2045
|
+
*
|
|
2046
|
+
* // Loading signals - computed from slice (minimal reactivity)
|
|
2047
|
+
* readonly isLoadingItems = computed(() =>
|
|
2048
|
+
* this.loadingActive().includes(MyActionKey.GetItems)
|
|
2049
|
+
* );
|
|
2050
|
+
*
|
|
2051
|
+
* // Error signals - computed from slice (minimal reactivity)
|
|
2052
|
+
* readonly itemsError = computed(() =>
|
|
2053
|
+
* this.errors()[MyActionKey.GetItems] ?? null
|
|
2054
|
+
* );
|
|
2055
|
+
*
|
|
2056
|
+
* // Dispatchers
|
|
2057
|
+
* loadItems() {
|
|
2058
|
+
* return this.store.dispatch(new GetItems());
|
|
2059
|
+
* }
|
|
2060
|
+
* }
|
|
2061
|
+
* ```
|
|
2062
|
+
*
|
|
2063
|
+
* **Template Usage:**
|
|
2064
|
+
* ```html
|
|
2065
|
+
* @if (facade.isLoadingItems()) {
|
|
2066
|
+
* <loading-spinner />
|
|
2067
|
+
* } @else if (facade.itemsError(); as error) {
|
|
2068
|
+
* <error-alert>{{ error }}</error-alert>
|
|
2069
|
+
* } @else {
|
|
2070
|
+
* @for (item of facade.items(); track item.id) {
|
|
2071
|
+
* <item-card [item]="item" />
|
|
2072
|
+
* }
|
|
2073
|
+
* }
|
|
2074
|
+
* ```
|
|
2075
|
+
*/
|
|
2076
|
+
class BaseFacade {
|
|
2077
|
+
/**
|
|
2078
|
+
* Creates a query object with separate signals for data, loading, and error states
|
|
2079
|
+
* Each property is its own signal for granular reactivity
|
|
2080
|
+
*
|
|
2081
|
+
* @example
|
|
2082
|
+
* readonly modulesQuery = this.query(
|
|
2083
|
+
* 'getModulesLoading',
|
|
2084
|
+
* (state) => state.allModules
|
|
2085
|
+
* );
|
|
2086
|
+
*
|
|
2087
|
+
* // In template - each is a separate signal:
|
|
2088
|
+
* @if (modulesQuery.isPending()) { Loading... }
|
|
2089
|
+
* @if (modulesQuery.error(); as error) { Error: {{ error }} }
|
|
2090
|
+
* @if (modulesQuery.data(); as modules) {
|
|
2091
|
+
* <div *ngFor="let m of modules">{{ m.title }}</div>
|
|
2092
|
+
* }
|
|
2093
|
+
*/
|
|
2094
|
+
query(loadingKey, dataSelector) {
|
|
2095
|
+
const stateSignal = this.state();
|
|
2096
|
+
const isPending = computed(() => {
|
|
2097
|
+
const currentState = stateSignal();
|
|
2098
|
+
return currentState.loadingActive?.includes(loadingKey) ?? false;
|
|
2099
|
+
}, ...(ngDevMode ? [{ debugName: "isPending" }] : /* istanbul ignore next */ []));
|
|
2100
|
+
const error = computed(() => {
|
|
2101
|
+
const currentState = stateSignal();
|
|
2102
|
+
return currentState.errors?.[loadingKey] ?? null;
|
|
2103
|
+
}, ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
|
|
2104
|
+
const data = computed(() => {
|
|
2105
|
+
const currentState = stateSignal();
|
|
2106
|
+
const hasError = currentState.errors?.[loadingKey];
|
|
2107
|
+
return hasError ? null : dataSelector(currentState);
|
|
2108
|
+
}, ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
2109
|
+
const isSuccess = computed(() => !isPending() && !error() && data() !== null, ...(ngDevMode ? [{ debugName: "isSuccess" }] : /* istanbul ignore next */ []));
|
|
2110
|
+
const isError = computed(() => !!error(), ...(ngDevMode ? [{ debugName: "isError" }] : /* istanbul ignore next */ []));
|
|
2111
|
+
return {
|
|
2112
|
+
data,
|
|
2113
|
+
isPending,
|
|
2114
|
+
isSuccess,
|
|
2115
|
+
isError,
|
|
2116
|
+
error,
|
|
2117
|
+
};
|
|
2118
|
+
}
|
|
2119
|
+
/**
|
|
2120
|
+
* Creates a loading signal for a specific operation
|
|
2121
|
+
*/
|
|
2122
|
+
loading(loadingKey) {
|
|
2123
|
+
const stateSignal = this.state();
|
|
2124
|
+
return computed(() => {
|
|
2125
|
+
const currentState = stateSignal();
|
|
2126
|
+
return currentState.loadingActive?.includes(loadingKey) ?? false;
|
|
2127
|
+
});
|
|
2128
|
+
}
|
|
2129
|
+
/**
|
|
2130
|
+
* Creates an error signal for a specific operation
|
|
2131
|
+
*/
|
|
2132
|
+
errorSignal(loadingKey) {
|
|
2133
|
+
const stateSignal = this.state();
|
|
2134
|
+
return computed(() => {
|
|
2135
|
+
const currentState = stateSignal();
|
|
2136
|
+
return currentState.errors?.[loadingKey] ?? null;
|
|
2137
|
+
});
|
|
2138
|
+
}
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2141
|
+
function createEntityAdapter() {
|
|
2142
|
+
return {
|
|
2143
|
+
addOne: (state, entity) => [...state, entity],
|
|
2144
|
+
upsertOne: (state, entity, uniqueKey = 'id') => {
|
|
2145
|
+
const key = entity[uniqueKey];
|
|
2146
|
+
if (key == null)
|
|
2147
|
+
return state;
|
|
2148
|
+
const index = state.findIndex((e) => e[uniqueKey] === key);
|
|
2149
|
+
if (index === -1) {
|
|
2150
|
+
return [...state, entity];
|
|
2151
|
+
}
|
|
2152
|
+
const clone = [...state];
|
|
2153
|
+
clone[index] = entity;
|
|
2154
|
+
return clone;
|
|
2155
|
+
},
|
|
2156
|
+
updateOne: (state, id, changes, uniqueKey = 'id') => state.map((e) => (e[uniqueKey] === id ? { ...e, ...changes } : e)),
|
|
2157
|
+
removeOne: (state, id, uniqueKey = 'id') => state.filter((e) => e[uniqueKey] !== id),
|
|
2158
|
+
setAll: (_state, entities) => [...entities],
|
|
2159
|
+
};
|
|
2160
|
+
}
|
|
2161
|
+
|
|
2162
|
+
function startLoading(ctx, loadingName) {
|
|
2163
|
+
const { loadingActive, errors } = ctx.getState();
|
|
2164
|
+
if (!loadingActive.includes(loadingName)) {
|
|
2165
|
+
ctx.patchState({
|
|
2166
|
+
loadingActive: [...loadingActive, loadingName],
|
|
2167
|
+
});
|
|
2168
|
+
}
|
|
2169
|
+
if (errors && errors[loadingName]) {
|
|
2170
|
+
const { [loadingName]: _removed, ...rest } = errors;
|
|
2171
|
+
ctx.patchState({ errors: rest });
|
|
2172
|
+
}
|
|
2173
|
+
}
|
|
2174
|
+
function endLoading(ctx, loadingName) {
|
|
2175
|
+
const { loadingActive } = ctx.getState();
|
|
2176
|
+
ctx.patchState({
|
|
2177
|
+
loadingActive: loadingActive.filter((name) => name !== loadingName),
|
|
2178
|
+
});
|
|
2179
|
+
}
|
|
2180
|
+
function setLoadingError(ctx, loadingName, message) {
|
|
2181
|
+
const { errors } = ctx.getState();
|
|
2182
|
+
ctx.patchState({
|
|
2183
|
+
errors: { ...errors, [loadingName]: message },
|
|
2184
|
+
});
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2187
|
+
function handleApiRequest(config) {
|
|
2188
|
+
const { ctx, key, request$, onSuccess, onError, errorMessage } = config;
|
|
2189
|
+
startLoading(ctx, key);
|
|
2190
|
+
return request$.pipe(tap((response) => {
|
|
2191
|
+
const state = ctx.getState();
|
|
2192
|
+
const patch = onSuccess(response, state);
|
|
2193
|
+
if (patch) {
|
|
2194
|
+
ctx.patchState(patch);
|
|
2195
|
+
}
|
|
2196
|
+
}), catchError((error) => {
|
|
2197
|
+
const state = ctx.getState();
|
|
2198
|
+
const message = error?.error?.message ?? error?.message ?? errorMessage;
|
|
2199
|
+
setLoadingError(ctx, key, message);
|
|
2200
|
+
// Call onError callback if provided
|
|
2201
|
+
if (onError) {
|
|
2202
|
+
const patch = onError(error, state);
|
|
2203
|
+
if (patch) {
|
|
2204
|
+
ctx.patchState(patch);
|
|
2205
|
+
}
|
|
2206
|
+
}
|
|
2207
|
+
throw error;
|
|
2208
|
+
}), finalize(() => endLoading(ctx, key)));
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
/**
|
|
2212
|
+
* T = entity type (Module, User, ...)
|
|
2213
|
+
* TState = full state model (must include LoadingStateShape)
|
|
2214
|
+
* TLoad = union type of loading keys for this feature
|
|
2215
|
+
*/
|
|
2216
|
+
class CrudStateBase {
|
|
2217
|
+
adapter = createEntityAdapter();
|
|
2218
|
+
/**
|
|
2219
|
+
* Helper to create default updateState function
|
|
2220
|
+
*/
|
|
2221
|
+
getDefaultUpdateState(stateProperty) {
|
|
2222
|
+
// Try to extract the property name from the stateProperty function
|
|
2223
|
+
const funcStr = stateProperty.toString();
|
|
2224
|
+
const match = funcStr.match(/\.([a-zA-Z_$][a-zA-Z0-9_$]*)/); // Match .propertyName
|
|
2225
|
+
const key = match ? match[1] : 'items';
|
|
2226
|
+
return (state, items) => ({ [key]: items });
|
|
2227
|
+
}
|
|
2228
|
+
/**
|
|
2229
|
+
* @deprecated Use `handleApiRequest` directly with `onSuccess` callback.
|
|
2230
|
+
* The `load()` method provides no significant benefit over `handleApiRequest`.
|
|
2231
|
+
*
|
|
2232
|
+
* @example
|
|
2233
|
+
* // Instead of this.load(), use:
|
|
2234
|
+
* return handleApiRequest({
|
|
2235
|
+
* ctx,
|
|
2236
|
+
* key: ActionKey.GetItems,
|
|
2237
|
+
* request$: req$,
|
|
2238
|
+
* onSuccess: (response) => ({
|
|
2239
|
+
* items: response.data ?? [],
|
|
2240
|
+
* }),
|
|
2241
|
+
* });
|
|
2242
|
+
*/
|
|
2243
|
+
load(ctx, config) {
|
|
2244
|
+
return handleApiRequest({
|
|
2245
|
+
ctx,
|
|
2246
|
+
key: config.key,
|
|
2247
|
+
request$: config.request$,
|
|
2248
|
+
onSuccess: (response, state) => {
|
|
2249
|
+
const data = config.transform
|
|
2250
|
+
? config.transform(response.data)
|
|
2251
|
+
: response.data;
|
|
2252
|
+
// If stateProperty provided, use adapter for array operations
|
|
2253
|
+
if (config.stateProperty) {
|
|
2254
|
+
const items = this.adapter.setAll(config.stateProperty(state), data);
|
|
2255
|
+
const updateState = config.updateState ??
|
|
2256
|
+
this.getDefaultUpdateState(config.stateProperty);
|
|
2257
|
+
return updateState(state, items);
|
|
2258
|
+
}
|
|
2259
|
+
// Otherwise, use custom updateState directly
|
|
2260
|
+
if (config.updateState) {
|
|
2261
|
+
return config.updateState(state, data);
|
|
2262
|
+
}
|
|
2263
|
+
throw new Error('Either stateProperty or updateState must be provided');
|
|
2264
|
+
},
|
|
2265
|
+
onError: config.onError,
|
|
2266
|
+
errorMessage: config.errorMessage ?? 'Failed to load data',
|
|
2267
|
+
});
|
|
2268
|
+
}
|
|
2269
|
+
/**
|
|
2270
|
+
* Create one entity with config object
|
|
2271
|
+
*/
|
|
2272
|
+
create(ctx, config) {
|
|
2273
|
+
const updateState = config.updateState ?? this.getDefaultUpdateState(config.stateProperty);
|
|
2274
|
+
return handleApiRequest({
|
|
2275
|
+
ctx,
|
|
2276
|
+
key: config.key,
|
|
2277
|
+
request$: config.request$,
|
|
2278
|
+
onSuccess: (response, state) => {
|
|
2279
|
+
const entity = config.transform
|
|
2280
|
+
? config.transform(response.data)
|
|
2281
|
+
: response.data;
|
|
2282
|
+
const items = this.adapter.addOne(config.stateProperty(state), entity);
|
|
2283
|
+
return updateState(state, items);
|
|
2284
|
+
},
|
|
2285
|
+
onError: config.onError,
|
|
2286
|
+
errorMessage: config.errorMessage ?? 'Failed to create item',
|
|
2287
|
+
});
|
|
2288
|
+
}
|
|
2289
|
+
/**
|
|
2290
|
+
* Update one entity with config object
|
|
2291
|
+
*/
|
|
2292
|
+
update(ctx, config) {
|
|
2293
|
+
const updateState = config.updateState ?? this.getDefaultUpdateState(config.stateProperty);
|
|
2294
|
+
return handleApiRequest({
|
|
2295
|
+
ctx,
|
|
2296
|
+
key: config.key,
|
|
2297
|
+
request$: config.request$,
|
|
2298
|
+
onSuccess: (response, state) => {
|
|
2299
|
+
const entity = config.transform
|
|
2300
|
+
? config.transform(response.data)
|
|
2301
|
+
: response.data;
|
|
2302
|
+
const items = this.adapter.upsertOne(config.stateProperty(state), entity, config.uniqueKey);
|
|
2303
|
+
return updateState(state, items);
|
|
2304
|
+
},
|
|
2305
|
+
onError: config.onError,
|
|
2306
|
+
errorMessage: config.errorMessage ?? 'Failed to update item',
|
|
2307
|
+
});
|
|
2308
|
+
}
|
|
2309
|
+
/**
|
|
2310
|
+
* Delete one entity with config object
|
|
2311
|
+
*/
|
|
2312
|
+
delete(ctx, config) {
|
|
2313
|
+
const updateState = config.updateState ?? this.getDefaultUpdateState(config.stateProperty);
|
|
2314
|
+
return handleApiRequest({
|
|
2315
|
+
ctx,
|
|
2316
|
+
key: config.key,
|
|
2317
|
+
request$: config.request$,
|
|
2318
|
+
onSuccess: (_response, state) => {
|
|
2319
|
+
const items = this.adapter.removeOne(config.stateProperty(state), config.id, config.uniqueKey);
|
|
2320
|
+
return updateState(state, items);
|
|
2321
|
+
},
|
|
2322
|
+
onError: config.onError,
|
|
2323
|
+
errorMessage: config.errorMessage ?? 'Failed to delete item',
|
|
2324
|
+
});
|
|
2325
|
+
}
|
|
2326
|
+
}
|
|
2327
|
+
|
|
2328
|
+
function isInvalid(control) {
|
|
2329
|
+
if (!control)
|
|
2330
|
+
return false;
|
|
2331
|
+
return control && control?.invalid && control?.touched;
|
|
2332
|
+
}
|
|
2333
|
+
|
|
2334
|
+
/**
|
|
2335
|
+
* Shared HTTP context token for request configuration.
|
|
2336
|
+
* Used by interceptors to determine base URL routing.
|
|
2337
|
+
*
|
|
2338
|
+
* @example
|
|
2339
|
+
* ```typescript
|
|
2340
|
+
* import { REQUEST_CONTEXT } from '@masterteam/components';
|
|
2341
|
+
*
|
|
2342
|
+
* // In a service
|
|
2343
|
+
* private context = new HttpContext().set(REQUEST_CONTEXT, { useBaseUrl: true });
|
|
2344
|
+
*
|
|
2345
|
+
* getMetadata(): Observable<any> {
|
|
2346
|
+
* return this.http.get('metadata', { context: this.context });
|
|
2347
|
+
* }
|
|
2348
|
+
*
|
|
2349
|
+
* // In interceptor
|
|
2350
|
+
* const config = req.context.get(REQUEST_CONTEXT);
|
|
2351
|
+
* if (config?.useBaseUrl) {
|
|
2352
|
+
* // Use base URL
|
|
2353
|
+
* }
|
|
2354
|
+
* ```
|
|
2355
|
+
*/
|
|
2356
|
+
const REQUEST_CONTEXT = new HttpContextToken(() => ({ useBaseUrl: false }));
|
|
2357
|
+
|
|
2358
|
+
/**
|
|
2359
|
+
* Stable DOM ids for form fields.
|
|
2360
|
+
*
|
|
2361
|
+
* Every field component used to bind `[id]="ngControl?.name || label()"`. Used
|
|
2362
|
+
* inside a reactive form that resolves, but a stand-alone field with no control
|
|
2363
|
+
* and no label produced `id="undefined"` — literally, because Angular
|
|
2364
|
+
* stringifies. The global search input was exactly that case, which is why it
|
|
2365
|
+
* also had no associated `<label>` and reported as unlabelled in the
|
|
2366
|
+
* accessibility tree (findings L-03 and H-04).
|
|
2367
|
+
*
|
|
2368
|
+
* `slider-field` already solved this locally; this is that solution extracted so
|
|
2369
|
+
* the six components that got it wrong share one implementation instead of six
|
|
2370
|
+
* near-copies.
|
|
2371
|
+
*/
|
|
2372
|
+
let nextUniqueId = 0;
|
|
2373
|
+
/** A process-unique fallback id, e.g. `mt-text-field-3`. */
|
|
2374
|
+
function nextFieldId(prefix) {
|
|
2375
|
+
return `${prefix}-${nextUniqueId++}`;
|
|
2376
|
+
}
|
|
2377
|
+
/**
|
|
2378
|
+
* The id a field should render, in preference order: the reactive form control
|
|
2379
|
+
* name, then a slug of the visible label, then the generated fallback.
|
|
2380
|
+
*
|
|
2381
|
+
* Never returns an empty string or `"undefined"` — a label/input pair is only
|
|
2382
|
+
* associated if the id is real, so the fallback matters more than it looks.
|
|
2383
|
+
*/
|
|
2384
|
+
function resolveFieldId(controlName, label, fallbackId) {
|
|
2385
|
+
const name = controlName?.toString().trim();
|
|
2386
|
+
if (name) {
|
|
2387
|
+
return name;
|
|
2388
|
+
}
|
|
2389
|
+
const slug = label?.trim().toLowerCase().replace(/\s+/g, '-');
|
|
2390
|
+
return slug || fallbackId;
|
|
2391
|
+
}
|
|
2392
|
+
|
|
2393
|
+
/**
|
|
2394
|
+
* Helpers for wall-clock values — the `HH:mm:ss` shape a `Time` property
|
|
2395
|
+
* stores. A time of day carries no calendar date and no timezone, so it is
|
|
2396
|
+
* never serialized as an instant: `new Date('09:30:00')` is `Invalid Date`,
|
|
2397
|
+
* and pushing the clock through UTC would shift it by the viewer's offset.
|
|
2398
|
+
*/
|
|
2399
|
+
const CLOCK_TIME_PATTERN = /^(\d{1,2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?$/;
|
|
2400
|
+
/**
|
|
2401
|
+
* Parse a bare `H:mm`, `HH:mm`, or `HH:mm:ss` string — a trailing fractional
|
|
2402
|
+
* second, as .NET `TimeOnly`/`TimeSpan` may emit, is ignored. Returns `null`
|
|
2403
|
+
* for anything else, including full timestamps, which callers parse as dates.
|
|
2404
|
+
*/
|
|
2405
|
+
function parseClockTime(value) {
|
|
2406
|
+
if (typeof value !== 'string')
|
|
2407
|
+
return null;
|
|
2408
|
+
const match = CLOCK_TIME_PATTERN.exec(value.trim());
|
|
2409
|
+
if (!match)
|
|
2410
|
+
return null;
|
|
2411
|
+
const hours = Number(match[1]);
|
|
2412
|
+
const minutes = Number(match[2]);
|
|
2413
|
+
const seconds = match[3] ? Number(match[3]) : 0;
|
|
2414
|
+
if (hours > 23 || minutes > 59 || seconds > 59)
|
|
2415
|
+
return null;
|
|
2416
|
+
return { hours, minutes, seconds };
|
|
2417
|
+
}
|
|
2418
|
+
/** Read the local wall-clock time off a `Date`, or `null` for an invalid one. */
|
|
2419
|
+
function toClockTimeParts(date) {
|
|
2420
|
+
if (Number.isNaN(date.getTime()))
|
|
2421
|
+
return null;
|
|
2422
|
+
return {
|
|
2423
|
+
hours: date.getHours(),
|
|
2424
|
+
minutes: date.getMinutes(),
|
|
2425
|
+
seconds: date.getSeconds(),
|
|
2426
|
+
};
|
|
2427
|
+
}
|
|
2428
|
+
/** Format a wall-clock time as the `HH:mm:ss` text the backend stores. */
|
|
2429
|
+
function formatClockTime(parts) {
|
|
2430
|
+
return [parts.hours, parts.minutes, parts.seconds]
|
|
2431
|
+
.map((part) => part.toString().padStart(2, '0'))
|
|
2432
|
+
.join(':');
|
|
2433
|
+
}
|
|
2434
|
+
/** Seconds since midnight — the comparable form of a wall-clock time. */
|
|
2435
|
+
function clockTimeToSeconds(parts) {
|
|
2436
|
+
return parts.hours * 3600 + parts.minutes * 60 + parts.seconds;
|
|
2437
|
+
}
|
|
2438
|
+
|
|
2439
|
+
class MTDateFormatPipe {
|
|
2440
|
+
locale = inject(LOCALE_ID);
|
|
2441
|
+
formats = inject(MT_DATE_FORMATS);
|
|
2442
|
+
transform(value, type = 'date') {
|
|
2443
|
+
if (value === null || value === undefined || value === '') {
|
|
2444
|
+
return '';
|
|
2445
|
+
}
|
|
2446
|
+
try {
|
|
2447
|
+
// A calendar date and a wall clock both carry no timezone of their own,
|
|
2448
|
+
// so they are pinned to `+0000` and rendered exactly as stored.
|
|
2449
|
+
const zonelessValue = type === 'date' && typeof value === 'string'
|
|
2450
|
+
? parseDateOnlyValue(value)
|
|
2451
|
+
: type === 'time'
|
|
2452
|
+
? parseClockOnlyValue(value)
|
|
2453
|
+
: null;
|
|
2454
|
+
return formatDate(zonelessValue ?? value, toAngularDateFormat(this.formats[type] ?? this.formats.date), this.locale, zonelessValue ? '+0000' : this.formats.timezone);
|
|
2455
|
+
}
|
|
2456
|
+
catch {
|
|
2457
|
+
return String(value);
|
|
2458
|
+
}
|
|
2459
|
+
}
|
|
2460
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MTDateFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2461
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.8", ngImport: i0, type: MTDateFormatPipe, isStandalone: true, name: "mtDateFormat" });
|
|
2462
|
+
}
|
|
2463
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MTDateFormatPipe, decorators: [{
|
|
2464
|
+
type: Pipe,
|
|
2465
|
+
args: [{
|
|
2466
|
+
name: 'mtDateFormat',
|
|
2467
|
+
standalone: true,
|
|
2468
|
+
}]
|
|
2469
|
+
}] });
|
|
2470
|
+
/**
|
|
2471
|
+
* Keep a wall-clock time (`HH:mm:ss`, the shape a `Time` property stores)
|
|
2472
|
+
* independent from both browser and configured zones. Values still stored as a
|
|
2473
|
+
* full instant fall through to the normal timezone-aware path.
|
|
2474
|
+
*/
|
|
2475
|
+
function parseClockOnlyValue(value) {
|
|
2476
|
+
const clockTime = parseClockTime(value);
|
|
2477
|
+
if (!clockTime)
|
|
2478
|
+
return null;
|
|
2479
|
+
const parsed = new Date(0);
|
|
2480
|
+
parsed.setUTCHours(clockTime.hours, clockTime.minutes, clockTime.seconds, 0);
|
|
2481
|
+
return parsed;
|
|
2482
|
+
}
|
|
2483
|
+
/** Keep a calendar date independent from both browser and configured zones. */
|
|
2484
|
+
function parseDateOnlyValue(value) {
|
|
2485
|
+
const match = /^(\d{4})-(\d{2})-(\d{2})(?=$|T)/.exec(value);
|
|
2486
|
+
if (!match)
|
|
2487
|
+
return null;
|
|
2488
|
+
const year = Number(match[1]);
|
|
2489
|
+
const monthIndex = Number(match[2]) - 1;
|
|
2490
|
+
const day = Number(match[3]);
|
|
2491
|
+
const parsed = new Date(0);
|
|
2492
|
+
parsed.setUTCFullYear(year, monthIndex, day);
|
|
2493
|
+
parsed.setUTCHours(0, 0, 0, 0);
|
|
2494
|
+
if (parsed.getUTCFullYear() !== year ||
|
|
2495
|
+
parsed.getUTCMonth() !== monthIndex ||
|
|
2496
|
+
parsed.getUTCDate() !== day) {
|
|
2497
|
+
throw new RangeError(`Invalid date-only value: ${value}`);
|
|
2498
|
+
}
|
|
2499
|
+
return parsed;
|
|
2500
|
+
}
|
|
2501
|
+
|
|
2502
|
+
/*
|
|
2503
|
+
* Public API Surface of components
|
|
2504
|
+
*/
|
|
2505
|
+
// Config
|
|
2506
|
+
|
|
2507
|
+
/**
|
|
2508
|
+
* Generated bundle index. Do not edit.
|
|
2509
|
+
*/
|
|
2510
|
+
|
|
2511
|
+
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 };
|
|
2512
|
+
//# sourceMappingURL=masterteam-components.mjs.map
|