@masterteam/components 0.0.263 → 0.0.265
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.angular/cache/21.2.7/@masterteam/components/.tsbuildinfo +1 -0
- 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 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/0727b170af3d53236c0cafe16ea670d089e48d4c5c525b1dbcc1c684bb6e99c7 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/0873bc9048494ebc33fe0a7b856324c7c4ca681b0dcaa87338e3290186906d49 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/1010cd8fc996d0c2df519ed60085f4b1f38ccfc873900055bc75fc20a3c26bab +1 -0
- package/.angular/cache/21.2.7/ng-packagr/12379a8ab7254ad3df2635823a358cfce32e6d0f390be68596cc97e02307e6c4 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/1239e7a937657b62f858d17d47738ed30facbdaa91032511e29ed148b748400b +1 -0
- package/.angular/cache/21.2.7/ng-packagr/133b9ecf47ba424244902da90d77cd3f135b85f95c01b16de7b2247f57518f01 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/175d45dc6da51834e7fe937c09d23dbf28d2a823f838ef5271fd3e148776d6ec +1 -0
- package/.angular/cache/21.2.7/ng-packagr/19d99ad4d927324b03cdbef34331ba2c58bd580f1f0ca591cb5f8dbf436c913c +1 -0
- package/.angular/cache/21.2.7/ng-packagr/1a86918763f95c1c2b9fa781bda1ceedf15aead87f0e11ea1324318af43a897a +1 -0
- package/.angular/cache/21.2.7/ng-packagr/1f08100dbc280be7da64c809315376eb7d0cfd074916a6042f609f03f4276a8e +1 -0
- package/.angular/cache/21.2.7/ng-packagr/2224877a7e762b86541428e4c40d61f54f505867c305769ae42e67e4aa81bd93 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/24957fb7ec060692ebcf1471e1bdce39f40aed938959e580048ade58015762d2 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/295fcdc1c4462e7feae96a24255369508a559faaecc4676267749a7ce23e4b6d +1 -0
- package/.angular/cache/21.2.7/ng-packagr/2b37e2f2d6564d10bad1fd0ecc16453962fd855cd1e36ad7aa24baf3e4f2e8b3 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/2c20f0929771e857b570ba2beffe91f598f299ce26d4825fe4315bfe5a3dd40a +1 -0
- package/.angular/cache/21.2.7/ng-packagr/37dea2e5798cad4a21d66292eeed5be26d04500d9a1534332ad42ce664a058c2 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/3b6239b640fcb5ea7067a2655a2901d32f55372812b586aa008e77c59e8f2090 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/3beb1b4dfe75d1e6749cf91f05d51ba4eece939f5c15f6f33ed587bfd198f0a3 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/3f161e6c2ead4519d0663dd79199dafceb2cc22da7ce92a72b809b93bfce0bb0 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/43551862d17cd02626e18b30243390081a6247784485660048b060a3d4ab7fa7 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/47aedf032519b41d96866fcf8fbd4f1dfd29f9e9a534b39dee0e44d402227d2d +1 -0
- package/.angular/cache/21.2.7/ng-packagr/4a1768888c60921955bfdfba8b31c8d853bd7b2a7d3a7b83934de049e1e6e6a2 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/4a783e339117597607bff17eeca0ad24d84b8cbc1e28927e7e453ccfa6223180 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/4d9331b2050326f586cd8f6593a9e04e1c7944b2f9e98023649023c099597a5d +1 -0
- package/.angular/cache/21.2.7/ng-packagr/4e379f506919d47af7008658c75242aa05f0056c1caec4061d7fa5746f776049 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/55009bb7d44552dd816ce32fa2b0f7985f3f08fefd6409c2b4f6b9ffe35dad83 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/58ae3f1f9664f7b16844d2e4a279dd4ca9371de014cf5687320c2d5cb259a74f +1 -0
- package/.angular/cache/21.2.7/ng-packagr/5c08e906bd3fe1aa6c1d62f2bbb2b3f276e1c17fe45ef081e76bd1b865ac3dfa +1 -0
- package/.angular/cache/21.2.7/ng-packagr/5ce333a40ad635188347fa9bc601d5fd14be6baacbae7d096259d725ac9757af +1 -0
- package/.angular/cache/21.2.7/ng-packagr/5f32cceaee6a6ea19cc6cbff5ea089b752f13a0fdcd32597d4c99d5e1e031bb5 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/691ad4ccdc0a8ede36e1f4e5e97638c20c2d3142916ffac3a1b172178c139205 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/6b57160e0d2da3f31693831e84a3f4209c1f33a04abd636e34af03956e7329d8 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/70bc711a1d7b631845885c26adc2d6b1bff47d11332b2625cedfa11e9d5ac79a +1 -0
- package/.angular/cache/21.2.7/ng-packagr/7427c266237012afaef486c2af94ee08a491e8d7b6fc7e5ee887980830bbd333 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/7e8fa7c61cf9a932ba3a0e65eb73c7412e81666b7a8f923dac7b75acfbb94b1d +1 -0
- package/.angular/cache/21.2.7/ng-packagr/81aab7fdab43cbdfa869db759d6113ae01ec6f5e0e9061d7fc089c260886e4d1 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/83a81758045ff710a34ea3cf6f54435a1f5dea9839d8c0adda0bbce7c3fb6e8b +1 -0
- package/.angular/cache/21.2.7/ng-packagr/883eae810a4c09f06617bdc2e4bc30a69f09726401b2a051840969f635d076f1 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/8a6b9be66de40c57054dca5fde376c3cec1bec1ae191a16f1ae6a83306d9ebfe +1 -0
- package/.angular/cache/21.2.7/ng-packagr/8d42c8144f6929de46984094bf390a0c4168404ab13a5194839f6ba5e42bc3ce +1 -0
- package/.angular/cache/21.2.7/ng-packagr/91093656c61a5404f0d576f872247eeb480dd938e6999d481a97893c72b5f3d0 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/91e881172037c63d819e30d30e390e0d7dc0dee9808b3902275ccc8b1887d864 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/9ef28cf3a676e7bd0d37762c4868b4810efca2f241ed0dae75ebca41988e2c00 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/a07cbea405c1831b3f686a8e57c4b500d89cbab2b95e110487890269945feeaa +1 -0
- package/.angular/cache/21.2.7/ng-packagr/a463deba940880d9461612c9cd00d90062bf97aa31b1c4556b8b47a967cb6882 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/ab03ed1e4a371113b41b663d526d2b06565ceb062e6f033f726f1e455fc5d1d6 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/ad0e84be4f2211aff6187b4bec9adbe15f0e8b36851e9c6c63b38303c2daad37 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/aece79242dae70eb748605e37483e75e122e4ce414fa8be875499e8af26ee5d6 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/aff32db91ce03de30d2bbc84f266fe3fb2c6629d5eeb39a364204d9499484368 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/b0671e73a162927d28ef1742ec008e514264bc2ce29f2255bedaea553492fe5d +1 -0
- package/.angular/cache/21.2.7/ng-packagr/bb50d71f3cdeebbb85fd983be8103f9c216060464f8e7e534271197391e6dcf7 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/c64241290ab30d8761b2f5493a039427f5cda1a48b5be88ce62ee5c714c0f690 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/c794d2e79b26ab378c0dbf8afa7b8ac1337ba9afb288941d44a086cb1bd4bad2 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/d942edf8fd8e8e884138ffcdb1a07ad14a0b5e211f8ccea1dc9ea0b48f50cfc9 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/dbe0b9b9f18ba7b96d9c84f4fd16cde158c9701c202d00113e6f88ba93407bce +1 -0
- package/.angular/cache/21.2.7/ng-packagr/f564395a410a2723aac48e582f5fe416bfeaa48677cea47b10c5152d4f2b6672 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/fc9b0d27f081ca7b2a4cbefa75136d7bd7a8c341dbaa0587855071a6003906b8 +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-avatar-text.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-avatar.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-breadcrumb.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-business-fields.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-button-group.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-button.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-card.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-checkbox-field.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-chip.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-client-page-menu.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-client-page.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-color-picker-field.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-confirmation.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-date-field.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-dialog.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-drawer.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-dynamic-drawer.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-editor-field.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-empty-state.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-entities.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-field-validation.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-formula.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-icon-field.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-list.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-location-field.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-menu.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-modal.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-module-summary-card.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-multi-select-field.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-number-field.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-page-header.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-page.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-paginator.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-pick-list-field.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-progress.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-property-filter-builder.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-radio-button-field.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-radio-cards-field.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-radio-cards.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-runtime-action.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-select-field.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-sidebar.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-slider-field.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-statistic-card.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-table.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-tabs.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-text-field.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-textarea-field.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-toast.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-toggle-field.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-tooltip.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-topbar.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-tree.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-treeselect-field.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-upload-field.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-uploader.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components-user-search-field.tsbuildinfo +1 -0
- package/.angular/cache/21.2.7/ng-packagr/tsbuildinfo/masterteam-components.tsbuildinfo +1 -0
- package/angular.json +32 -0
- package/api/api.ts +1 -0
- package/api/public-api.ts +5 -0
- package/assets/common.css +309 -2
- package/assets/i18n/ar.json +10 -2
- package/assets/i18n/en.json +10 -2
- package/avatar/avatar.html +32 -0
- package/avatar/avatar.scss +0 -0
- package/avatar/avatar.ts +54 -0
- package/avatar/ng-package.json +6 -0
- package/avatar/public-api.ts +1 -0
- package/avatar-text/avatar-text.html +26 -0
- package/avatar-text/avatar-text.scss +0 -0
- package/avatar-text/avatar-text.ts +52 -0
- package/avatar-text/ng-package.json +6 -0
- package/avatar-text/public-api.ts +1 -0
- package/breadcrumb/breadcrumb.html +53 -0
- package/breadcrumb/breadcrumb.scss +0 -0
- package/breadcrumb/breadcrumb.ts +26 -0
- package/breadcrumb/ng-package.json +6 -0
- package/breadcrumb/public-api.ts +1 -0
- package/business-fields/entity-list-field/entity-list-add-token.ts +25 -0
- package/business-fields/entity-list-field/entity-list-field.html +70 -0
- package/business-fields/entity-list-field/entity-list-field.scss +3 -0
- package/business-fields/entity-list-field/entity-list-field.ts +1067 -0
- package/business-fields/lookup-matrix-field/lookup-matrix-field.html +38 -0
- package/business-fields/lookup-matrix-field/lookup-matrix-field.spec.ts +183 -0
- package/business-fields/lookup-matrix-field/lookup-matrix-field.ts +239 -0
- package/business-fields/lookup-module-check-list-field/lookup-module-check-list-field.html +95 -0
- package/business-fields/lookup-module-check-list-field/lookup-module-check-list-field.ts +336 -0
- package/business-fields/lookup-module-check-list-field/lookup-module-check-list-form-token.ts +42 -0
- package/business-fields/ng-package.json +6 -0
- package/business-fields/public-api.ts +8 -0
- package/business-fields/schedule-item-selector-field/schedule-item-selector-field.html +32 -0
- package/business-fields/schedule-item-selector-field/schedule-item-selector-field.ts +272 -0
- package/business-fields/schedule-predecessor-field/schedule-predecessor-field.html +89 -0
- package/business-fields/schedule-predecessor-field/schedule-predecessor-field.ts +441 -0
- package/business-fields/schema-connection-field/schema-connection-field.html +58 -0
- package/business-fields/schema-connection-field/schema-connection-field.scss +0 -0
- package/business-fields/schema-connection-field/schema-connection-field.ts +456 -0
- package/button/button.html +44 -0
- package/button/button.scss +0 -0
- package/button/button.ts +120 -0
- package/button/ng-package.json +6 -0
- package/button/public-api.ts +1 -0
- package/button-group/button-group.html +3 -0
- package/button-group/button-group.scss +20 -0
- package/button-group/button-group.ts +12 -0
- package/button-group/ng-package.json +6 -0
- package/button-group/public-api.ts +1 -0
- package/card/card.html +26 -0
- package/card/card.scss +0 -0
- package/card/card.ts +29 -0
- package/card/ng-package.json +6 -0
- package/card/public-api.ts +1 -0
- package/checkbox-field/checkbox-field.html +31 -0
- package/checkbox-field/checkbox-field.scss +0 -0
- package/checkbox-field/checkbox-field.spec.ts +21 -0
- package/checkbox-field/checkbox-field.ts +123 -0
- package/checkbox-field/ng-package.json +6 -0
- package/checkbox-field/public-api.ts +1 -0
- package/chip/chip.html +16 -0
- package/chip/chip.scss +19 -0
- package/chip/chip.ts +45 -0
- package/chip/ng-package.json +6 -0
- package/chip/public-api.ts +1 -0
- package/client-page/client-page.html +232 -0
- package/client-page/client-page.ts +588 -0
- package/client-page/index.ts +2 -0
- package/client-page/ng-package.json +6 -0
- package/client-page/public-api.ts +1 -0
- package/client-page-menu/client-page-menu.html +142 -0
- package/client-page-menu/client-page-menu.ts +199 -0
- package/client-page-menu/index.ts +2 -0
- package/client-page-menu/ng-package.json +6 -0
- package/client-page-menu/public-api.ts +1 -0
- package/color-picker-field/color-picker-field.html +45 -0
- package/color-picker-field/color-picker-field.scss +52 -0
- package/color-picker-field/color-picker-field.ts +131 -0
- package/color-picker-field/ng-package.json +6 -0
- package/color-picker-field/public-api.ts +1 -0
- package/confirmation/confirmation-dialog.html +83 -0
- package/confirmation/confirmation-dialog.scss +0 -0
- package/confirmation/confirmation-dialog.ts +15 -0
- package/confirmation/confirmation.spec.ts +43 -0
- package/confirmation/confirmation.ts +103 -0
- package/confirmation/ng-package.json +6 -0
- package/confirmation/public-api.ts +2 -0
- package/date-field/date-field.html +65 -0
- package/date-field/date-field.scss +0 -0
- package/date-field/date-field.spec.ts +118 -0
- package/date-field/date-field.ts +196 -0
- package/date-field/ng-package.json +6 -0
- package/date-field/public-api.ts +1 -0
- package/dialog/dialog.ts +29 -0
- package/dialog/ng-package.json +6 -0
- package/dialog/public-api.ts +1 -0
- package/drawer/drawer.html +67 -0
- package/drawer/drawer.scss +1 -0
- package/drawer/drawer.ts +348 -0
- package/drawer/ng-package.json +5 -0
- package/drawer/public-api.ts +1 -0
- package/dynamic-drawer/dynamic-drawer-host.ts +476 -0
- package/dynamic-drawer/dynamic-drawer.spec.ts +204 -0
- package/dynamic-drawer/dynamic-drawer.ts +235 -0
- package/dynamic-drawer/ng-package.json +6 -0
- package/dynamic-drawer/public-api.ts +2 -0
- package/editor-field/editor-field.html +38 -0
- package/editor-field/editor-field.scss +219 -0
- package/editor-field/editor-field.ts +126 -0
- package/editor-field/ng-package.json +6 -0
- package/editor-field/public-api.ts +1 -0
- package/empty-state/empty-state.html +236 -0
- package/empty-state/empty-state.ts +85 -0
- package/empty-state/ng-package.json +6 -0
- package/empty-state/public-api.ts +1 -0
- package/entities/comparison/comparison-entity-list/comparison-entity-list.html +87 -0
- package/entities/comparison/comparison-entity-list/comparison-entity-list.ts +93 -0
- package/entities/comparison/comparison-value/comparison-value.html +31 -0
- package/entities/comparison/comparison-value/comparison-value.ts +53 -0
- package/entities/currency-display.utils.spec.ts +94 -0
- package/entities/currency-display.utils.ts +92 -0
- package/entities/entities-manage/entities-manage.html +74 -0
- package/entities/entities-manage/entities-manage.scss +72 -0
- package/entities/entities-manage/entities-manage.ts +121 -0
- package/entities/entities-manage/entities-resize-base.ts +153 -0
- package/entities/entities-preview/entities-preview.css +77 -0
- package/entities/entities-preview/entities-preview.html +56 -0
- package/entities/entities-preview/entities-preview.ts +281 -0
- package/entities/entity-attachment/entity-attachment.html +49 -0
- package/entities/entity-attachment/entity-attachment.ts +462 -0
- package/entities/entity-checkbox/entity-checkbox.html +28 -0
- package/entities/entity-checkbox/entity-checkbox.ts +65 -0
- package/entities/entity-comparison.model.ts +39 -0
- package/entities/entity-connection/entity-connection.html +12 -0
- package/entities/entity-connection/entity-connection.ts +75 -0
- package/entities/entity-currency/entity-currency.html +12 -0
- package/entities/entity-currency/entity-currency.ts +59 -0
- package/entities/entity-date/entity-date.html +16 -0
- package/entities/entity-date/entity-date.ts +50 -0
- package/entities/entity-display.utils.ts +94 -0
- package/entities/entity-field/entity-field.ts +94 -0
- package/entities/entity-leaf-details/entity-leaf-details.html +35 -0
- package/entities/entity-leaf-details/entity-leaf-details.ts +56 -0
- package/entities/entity-location/entity-location.html +34 -0
- package/entities/entity-location/entity-location.ts +98 -0
- package/entities/entity-long-text/entity-long-text.html +9 -0
- package/entities/entity-long-text/entity-long-text.ts +45 -0
- package/entities/entity-lookup/entity-lookup.html +25 -0
- package/entities/entity-lookup/entity-lookup.ts +68 -0
- package/entities/entity-lookup-module-check-list/entity-lookup-module-check-list.html +39 -0
- package/entities/entity-lookup-module-check-list/entity-lookup-module-check-list.spec.ts +148 -0
- package/entities/entity-lookup-module-check-list/entity-lookup-module-check-list.ts +152 -0
- package/entities/entity-percentage/entity-percentage.html +22 -0
- package/entities/entity-percentage/entity-percentage.ts +163 -0
- package/entities/entity-phase-gate/entity-phase-gate.html +20 -0
- package/entities/entity-phase-gate/entity-phase-gate.ts +129 -0
- package/entities/entity-preview/entity-preview-body.html +8 -0
- package/entities/entity-preview/entity-preview-body.ts +19 -0
- package/entities/entity-preview/entity-preview.html +14 -0
- package/entities/entity-preview/entity-preview.ts +33 -0
- package/entities/entity-preview/entity-value-preview.html +62 -0
- package/entities/entity-preview/entity-value-preview.spec.ts +191 -0
- package/entities/entity-preview/entity-value-preview.ts +69 -0
- package/entities/entity-schedule-item/entity-schedule-item.html +19 -0
- package/entities/entity-schedule-item/entity-schedule-item.ts +41 -0
- package/entities/entity-sections.util.ts +103 -0
- package/entities/entity-status/entity-status.html +20 -0
- package/entities/entity-status/entity-status.ts +60 -0
- package/entities/entity-text/entity-text.html +20 -0
- package/entities/entity-text/entity-text.ts +35 -0
- package/entities/entity-user/entity-user.html +181 -0
- package/entities/entity-user/entity-user.ts +179 -0
- package/entities/entity.model.ts +407 -0
- package/entities/leaf-details-display.utils.ts +269 -0
- package/entities/ng-package.json +6 -0
- package/entities/percentage-color.utils.spec.ts +94 -0
- package/entities/percentage-color.utils.ts +80 -0
- package/entities/public-api.ts +30 -0
- package/field-validation/character-limit.validator.ts +22 -0
- package/field-validation/error-message.pipe.spec.ts +184 -0
- package/field-validation/error-message.pipe.ts +80 -0
- package/field-validation/field-validation.ts +168 -0
- package/field-validation/ng-package.json +6 -0
- package/field-validation/public-api.ts +2 -0
- package/formula/formula-editor/formula-editor.html +89 -0
- package/formula/formula-editor/formula-editor.scss +25 -0
- package/formula/formula-editor/formula-editor.ts +467 -0
- package/formula/formula-editor/index.ts +1 -0
- package/formula/formula-editor-code/formula-autocomplete-normalization.util.spec.ts +58 -0
- package/formula/formula-editor-code/formula-autocomplete-normalization.util.ts +64 -0
- package/formula/formula-editor-code/formula-completion-range.util.spec.ts +62 -0
- package/formula/formula-editor-code/formula-completion-range.util.ts +71 -0
- package/formula/formula-editor-code/formula-completion-suggestion.util.spec.ts +23 -0
- package/formula/formula-editor-code/formula-completion-suggestion.util.ts +18 -0
- package/formula/formula-editor-code/formula-editor-code.html +15 -0
- package/formula/formula-editor-code/formula-editor-code.scss +90 -0
- package/formula/formula-editor-code/formula-editor-code.ts +1095 -0
- package/formula/formula-editor-code/index.ts +1 -0
- package/formula/formula-status-bar/formula-status-bar.html +119 -0
- package/formula/formula-status-bar/formula-status-bar.ts +66 -0
- package/formula/formula-status-bar/index.ts +1 -0
- package/formula/formula-toolbar/formula-toolbar.html +361 -0
- package/formula/formula-toolbar/formula-toolbar.ts +532 -0
- package/formula/formula-toolbar/index.ts +2 -0
- package/formula/formula-toolbar/operators.ts +122 -0
- package/formula/models/formula-block.model.ts +61 -0
- package/formula/models/formula-token.model.spec.ts +57 -0
- package/formula/models/formula-token.model.ts +852 -0
- package/formula/models/index.ts +5 -0
- package/formula/models/smart-block.model.ts +132 -0
- package/formula/models/validation-result.model.ts +80 -0
- package/formula/ng-package.json +6 -0
- package/formula/public-api.ts +8 -0
- package/formula/runtime/formula-runtime-catalogs.ts +554 -0
- package/formula/runtime/formula-runtime-engine.spec.ts +328 -0
- package/formula/runtime/formula-runtime-engine.ts +794 -0
- package/formula/runtime/formula-runtime.model.ts +53 -0
- package/formula/runtime/index.ts +3 -0
- package/formula/toolbar-item/index.ts +1 -0
- package/formula/toolbar-item/toolbar-item.html +143 -0
- package/formula/toolbar-item/toolbar-item.scss +14 -0
- package/formula/toolbar-item/toolbar-item.ts +223 -0
- package/icon-field/icon-field.html +58 -0
- package/icon-field/icon-field.scss +24 -0
- package/icon-field/icon-field.spec.ts +77 -0
- package/icon-field/icon-field.ts +205 -0
- package/icon-field/ng-package.json +6 -0
- package/icon-field/public-api.ts +1 -0
- package/list/list.html +22 -0
- package/list/list.ts +36 -0
- package/list/ng-package.json +6 -0
- package/list/public-api.ts +1 -0
- package/location-field/location-field.html +86 -0
- package/location-field/location-field.spec.ts +295 -0
- package/location-field/location-field.ts +662 -0
- package/location-field/location-manual-dialog.html +43 -0
- package/location-field/location-manual-dialog.ts +104 -0
- package/location-field/location-value.ts +67 -0
- package/location-field/ng-package.json +6 -0
- package/location-field/public-api.ts +3 -0
- package/menu/menu.html +71 -0
- package/menu/menu.scss +3 -0
- package/menu/menu.ts +186 -0
- package/menu/ng-package.json +6 -0
- package/menu/public-api.ts +1 -0
- package/modal/modal.ts +127 -0
- package/modal/ng-package.json +6 -0
- package/modal/public-api.ts +1 -0
- package/module-summary-card/module-summary-card.html +43 -0
- package/module-summary-card/module-summary-card.scss +0 -0
- package/module-summary-card/module-summary-card.ts +40 -0
- package/module-summary-card/ng-package.json +6 -0
- package/module-summary-card/public-api.ts +1 -0
- package/multi-select-field/multi-select-field.html +140 -0
- package/multi-select-field/multi-select-field.scss +0 -0
- package/multi-select-field/multi-select-field.spec.ts +21 -0
- package/multi-select-field/multi-select-field.ts +397 -0
- package/multi-select-field/ng-package.json +6 -0
- package/multi-select-field/public-api.ts +1 -0
- package/ng-package.json +9 -0
- package/number-field/ng-package.json +6 -0
- package/number-field/number-field.html +39 -0
- package/number-field/number-field.scss +8 -0
- package/number-field/number-field.spec.ts +21 -0
- package/number-field/number-field.ts +124 -0
- package/number-field/public-api.ts +1 -0
- package/package.json +54 -274
- package/page/index.ts +1 -0
- package/page/ng-package.json +6 -0
- package/page/page.html +37 -0
- package/page/page.ts +43 -0
- package/page/public-api.ts +1 -0
- package/page-header/index.ts +2 -0
- package/page-header/ng-package.json +6 -0
- package/page-header/page-header.html +60 -0
- package/page-header/page-header.ts +54 -0
- package/page-header/public-api.ts +1 -0
- package/paginator/ng-package.json +6 -0
- package/paginator/paginator.html +50 -0
- package/paginator/paginator.scss +0 -0
- package/paginator/paginator.ts +53 -0
- package/paginator/public-api.ts +1 -0
- package/pick-list-field/ng-package.json +6 -0
- package/pick-list-field/pick-list-field.html +39 -0
- package/pick-list-field/pick-list-field.scss +26 -0
- package/pick-list-field/pick-list-field.ts +259 -0
- package/pick-list-field/public-api.ts +1 -0
- package/progress/ng-package.json +6 -0
- package/progress/progress.html +36 -0
- package/progress/progress.ts +61 -0
- package/progress/public-api.ts +1 -0
- package/property-filter-builder/ng-package.json +6 -0
- package/property-filter-builder/property-filter-builder.html +192 -0
- package/property-filter-builder/property-filter-builder.ts +548 -0
- package/property-filter-builder/public-api.ts +1 -0
- package/radio-button-field/ng-package.json +6 -0
- package/radio-button-field/public-api.ts +1 -0
- package/radio-button-field/radio-button-field.html +44 -0
- package/radio-button-field/radio-button-field.scss +0 -0
- package/radio-button-field/radio-button-field.ts +114 -0
- package/radio-cards/ng-package.json +6 -0
- package/radio-cards/public-api.ts +1 -0
- package/radio-cards/radio-cards.css +3 -0
- package/radio-cards/radio-cards.html +54 -0
- package/radio-cards/radio-cards.spec.ts +22 -0
- package/radio-cards/radio-cards.ts +92 -0
- package/radio-cards-field/ng-package.json +6 -0
- package/radio-cards-field/public-api.ts +1 -0
- package/radio-cards-field/radio-cards-field.css +0 -0
- package/radio-cards-field/radio-cards-field.html +38 -0
- package/radio-cards-field/radio-cards-field.spec.ts +22 -0
- package/radio-cards-field/radio-cards-field.ts +182 -0
- package/runtime-action/ng-package.json +6 -0
- package/runtime-action/payload-builder.ts +246 -0
- package/runtime-action/public-api.ts +4 -0
- package/runtime-action/runtime-action-context.store.ts +26 -0
- package/runtime-action/runtime-action.runner.ts +302 -0
- package/runtime-action/runtime-action.types.ts +82 -0
- package/select-field/current-user.util.ts +54 -0
- package/select-field/ng-package.json +6 -0
- package/select-field/public-api.ts +1 -0
- package/select-field/select-field.html +142 -0
- package/select-field/select-field.scss +0 -0
- package/select-field/select-field.spec.ts +21 -0
- package/select-field/select-field.ts +471 -0
- package/sidebar/ng-package.json +6 -0
- package/sidebar/public-api.ts +1 -0
- package/sidebar/sidebar.html +368 -0
- package/sidebar/sidebar.ts +303 -0
- package/slider-field/ng-package.json +7 -0
- package/slider-field/public-api.ts +1 -0
- package/slider-field/slider-field.html +33 -0
- package/slider-field/slider-field.scss +11 -0
- package/slider-field/slider-field.spec.ts +44 -0
- package/slider-field/slider-field.ts +166 -0
- package/src/lib/base/base.facade.ts +159 -0
- package/src/lib/base/crud-base.state.ts +248 -0
- package/src/lib/config/date-format.config.ts +55 -0
- package/src/lib/config/ds-identity.preset.ts +538 -0
- package/src/lib/config/ds-identity.tokens.ts +209 -0
- package/src/lib/config/dynamic-form.model.ts +1162 -0
- package/src/lib/config/povide-messages.ts +5 -0
- package/src/lib/config/provide-confirmation.ts +5 -0
- package/src/lib/config/providemt.ts +506 -0
- package/src/lib/config/public-api.ts +0 -0
- package/src/lib/pipes/mt-date-format.pipe.spec.ts +60 -0
- package/src/lib/pipes/mt-date-format.pipe.ts +81 -0
- package/src/lib/utils/api-request.helper.ts +59 -0
- package/src/lib/utils/clock-time.util.ts +58 -0
- package/src/lib/utils/color.utils.ts +187 -0
- package/src/lib/utils/entity-adapter.ts +50 -0
- package/src/lib/utils/field-id.ts +42 -0
- package/src/lib/utils/http-context.ts +35 -0
- package/src/lib/utils/inputs.ts +6 -0
- package/src/lib/utils/state-helpers.ts +49 -0
- package/src/lib/utils/theme.ts +281 -0
- package/src/public-api.ts +30 -0
- package/statistic-card/ng-package.json +6 -0
- package/statistic-card/public-api.ts +1 -0
- package/statistic-card/statistic-card.html +31 -0
- package/statistic-card/statistic-card.scss +0 -0
- package/statistic-card/statistic-card.ts +59 -0
- package/table/ng-package.json +7 -0
- package/table/public-api.ts +10 -0
- package/table/table-actions-menu/public-api.ts +1 -0
- package/table/table-actions-menu/table-actions-menu.html +75 -0
- package/table/table-actions-menu/table-actions-menu.ts +171 -0
- package/table/table-caption/public-api.ts +1 -0
- package/table/table-caption/table-caption.html +118 -0
- package/table/table-caption/table-caption.ts +221 -0
- package/table/table-column-filter/public-api.ts +1 -0
- package/table/table-column-filter/table-column-filter.html +44 -0
- package/table/table-column-filter/table-column-filter.ts +106 -0
- package/table/table-export/html-to-text.util.ts +67 -0
- package/table/table-export/public-api.ts +1 -0
- package/table/table-export/table-export.service.spec.ts +186 -0
- package/table/table-export/table-export.service.ts +325 -0
- package/table/table-filter/public-api.ts +1 -0
- package/table/table-filter/table-filter.css +9 -0
- package/table/table-filter/table-filter.html +63 -0
- package/table/table-filter/table-filter.ts +126 -0
- package/table/table-filter-field/public-api.ts +1 -0
- package/table/table-filter-field/table-filter-field.html +182 -0
- package/table/table-filter-field/table-filter-field.ts +208 -0
- package/table/table-grouping/public-api.ts +1 -0
- package/table/table-grouping/table-grouping.spec.ts +218 -0
- package/table/table-grouping/table-grouping.ts +237 -0
- package/table/table-types.ts +242 -0
- package/table/table-value.utils.spec.ts +63 -0
- package/table/table-value.utils.ts +1014 -0
- package/table/table.css +145 -0
- package/table/table.html +572 -0
- package/table/table.ts +2042 -0
- package/tabs/ng-package.json +6 -0
- package/tabs/public-api.ts +1 -0
- package/tabs/tabs.html +417 -0
- package/tabs/tabs.scss +3 -0
- package/tabs/tabs.spec.ts +79 -0
- package/tabs/tabs.ts +397 -0
- package/text-field/ng-package.json +6 -0
- package/text-field/public-api.ts +1 -0
- package/text-field/text-field.html +75 -0
- package/text-field/text-field.scss +56 -0
- package/text-field/text-field.ts +251 -0
- package/textarea-field/ng-package.json +6 -0
- package/textarea-field/public-api.ts +1 -0
- package/textarea-field/textarea-field.html +37 -0
- package/textarea-field/textarea-field.scss +0 -0
- package/textarea-field/textarea-field.spec.ts +21 -0
- package/textarea-field/textarea-field.ts +169 -0
- package/toast/ng-package.json +6 -0
- package/toast/public-api.ts +2 -0
- package/toast/toast.html +18 -0
- package/toast/toast.service.ts +67 -0
- package/toast/toast.ts +21 -0
- package/toggle-field/ng-package.json +6 -0
- package/toggle-field/public-api.ts +1 -0
- package/toggle-field/toggle-field.html +78 -0
- package/toggle-field/toggle-field.scss +24 -0
- package/toggle-field/toggle-field.ts +150 -0
- package/tooltip/ng-package.json +6 -0
- package/tooltip/public-api.ts +2 -0
- package/tooltip/tooltip.ts +30 -0
- package/tooltip/truncate-tooltip.ts +124 -0
- package/topbar/ng-package.json +6 -0
- package/topbar/public-api.ts +1 -0
- package/topbar/topbar.html +52 -0
- package/topbar/topbar.ts +27 -0
- package/tree/ng-package.json +6 -0
- package/tree/public-api.ts +2 -0
- package/tree/tree-types.ts +55 -0
- package/tree/tree.html +126 -0
- package/tree/tree.scss +1 -0
- package/tree/tree.ts +303 -0
- package/treeselect-field/ng-package.json +6 -0
- package/treeselect-field/public-api.ts +1 -0
- package/treeselect-field/treeselect-field.html +71 -0
- package/treeselect-field/treeselect-field.ts +348 -0
- package/tsconfig.check.json +20 -0
- package/tsconfig.json +16 -0
- package/tsconfig.spec.json +24 -0
- package/upload-field/ng-package.json +6 -0
- package/upload-field/public-api.ts +2 -0
- package/upload-field/secure-image.pipe.ts +258 -0
- package/upload-field/upload-field.html +274 -0
- package/upload-field/upload-field.scss +0 -0
- package/upload-field/upload-field.spec.ts +169 -0
- package/upload-field/upload-field.ts +764 -0
- package/upload-field/upload-file-preview/upload-file-preview.html +41 -0
- package/upload-field/upload-file-preview/upload-file-preview.scss +0 -0
- package/upload-field/upload-file-preview/upload-file-preview.ts +57 -0
- package/upload-field/upload-user-preview/upload-user-preview.css +0 -0
- package/upload-field/upload-user-preview/upload-user-preview.html +73 -0
- package/upload-field/upload-user-preview/upload-user-preview.ts +54 -0
- package/uploader/ng-package.json +6 -0
- package/uploader/public-api.ts +1 -0
- package/uploader/uploader.service.spec.ts +271 -0
- package/uploader/uploader.service.ts +733 -0
- package/user-search-field/ng-package.json +6 -0
- package/user-search-field/public-api.ts +1 -0
- package/user-search-field/user-search-field.html +88 -0
- package/user-search-field/user-search-field.scss +4 -0
- package/user-search-field/user-search-field.spec.ts +176 -0
- package/user-search-field/user-search-field.ts +483 -0
- package/fesm2022/masterteam-components-avatar-text.mjs +0 -46
- package/fesm2022/masterteam-components-avatar-text.mjs.map +0 -1
- package/fesm2022/masterteam-components-avatar.mjs +0 -50
- package/fesm2022/masterteam-components-avatar.mjs.map +0 -1
- package/fesm2022/masterteam-components-breadcrumb.mjs +0 -27
- package/fesm2022/masterteam-components-breadcrumb.mjs.map +0 -1
- package/fesm2022/masterteam-components-business-fields.mjs +0 -1902
- package/fesm2022/masterteam-components-business-fields.mjs.map +0 -1
- package/fesm2022/masterteam-components-button-group.mjs +0 -20
- package/fesm2022/masterteam-components-button-group.mjs.map +0 -1
- package/fesm2022/masterteam-components-button.mjs +0 -52
- package/fesm2022/masterteam-components-button.mjs.map +0 -1
- package/fesm2022/masterteam-components-card.mjs +0 -28
- package/fesm2022/masterteam-components-card.mjs.map +0 -1
- package/fesm2022/masterteam-components-checkbox-field.mjs +0 -88
- package/fesm2022/masterteam-components-checkbox-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-chip.mjs +0 -39
- package/fesm2022/masterteam-components-chip.mjs.map +0 -1
- package/fesm2022/masterteam-components-client-page-menu.mjs +0 -152
- package/fesm2022/masterteam-components-client-page-menu.mjs.map +0 -1
- package/fesm2022/masterteam-components-client-page.mjs +0 -371
- package/fesm2022/masterteam-components-client-page.mjs.map +0 -1
- package/fesm2022/masterteam-components-color-picker-field.mjs +0 -102
- package/fesm2022/masterteam-components-color-picker-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-confirmation.mjs +0 -98
- package/fesm2022/masterteam-components-confirmation.mjs.map +0 -1
- package/fesm2022/masterteam-components-date-field.mjs +0 -154
- package/fesm2022/masterteam-components-date-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-dialog.mjs +0 -33
- package/fesm2022/masterteam-components-dialog.mjs.map +0 -1
- package/fesm2022/masterteam-components-drawer.mjs +0 -268
- package/fesm2022/masterteam-components-drawer.mjs.map +0 -1
- package/fesm2022/masterteam-components-dynamic-drawer.mjs +0 -608
- package/fesm2022/masterteam-components-dynamic-drawer.mjs.map +0 -1
- package/fesm2022/masterteam-components-editor-field.mjs +0 -99
- package/fesm2022/masterteam-components-editor-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-entities.mjs +0 -2033
- package/fesm2022/masterteam-components-entities.mjs.map +0 -1
- package/fesm2022/masterteam-components-field-validation.mjs +0 -158
- package/fesm2022/masterteam-components-field-validation.mjs.map +0 -1
- package/fesm2022/masterteam-components-formula.mjs +0 -3848
- package/fesm2022/masterteam-components-formula.mjs.map +0 -1
- package/fesm2022/masterteam-components-icon-field.mjs +0 -161
- package/fesm2022/masterteam-components-icon-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-list.mjs +0 -31
- package/fesm2022/masterteam-components-list.mjs.map +0 -1
- package/fesm2022/masterteam-components-location-field.mjs +0 -603
- package/fesm2022/masterteam-components-location-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-menu.mjs +0 -135
- package/fesm2022/masterteam-components-menu.mjs.map +0 -1
- package/fesm2022/masterteam-components-modal.mjs +0 -108
- package/fesm2022/masterteam-components-modal.mjs.map +0 -1
- package/fesm2022/masterteam-components-module-summary-card.mjs +0 -34
- package/fesm2022/masterteam-components-module-summary-card.mjs.map +0 -1
- package/fesm2022/masterteam-components-multi-select-field.mjs +0 -317
- package/fesm2022/masterteam-components-multi-select-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-number-field.mjs +0 -98
- package/fesm2022/masterteam-components-number-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-page-header.mjs +0 -42
- package/fesm2022/masterteam-components-page-header.mjs.map +0 -1
- package/fesm2022/masterteam-components-page.mjs +0 -35
- package/fesm2022/masterteam-components-page.mjs.map +0 -1
- package/fesm2022/masterteam-components-paginator.mjs +0 -43
- package/fesm2022/masterteam-components-paginator.mjs.map +0 -1
- package/fesm2022/masterteam-components-pick-list-field.mjs +0 -206
- package/fesm2022/masterteam-components-pick-list-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-progress.mjs +0 -63
- package/fesm2022/masterteam-components-progress.mjs.map +0 -1
- package/fesm2022/masterteam-components-property-filter-builder.mjs +0 -386
- package/fesm2022/masterteam-components-property-filter-builder.mjs.map +0 -1
- package/fesm2022/masterteam-components-radio-button-field.mjs +0 -85
- package/fesm2022/masterteam-components-radio-button-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-radio-cards-field.mjs +0 -126
- package/fesm2022/masterteam-components-radio-cards-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-radio-cards.mjs +0 -74
- package/fesm2022/masterteam-components-radio-cards.mjs.map +0 -1
- package/fesm2022/masterteam-components-runtime-action.mjs +0 -406
- package/fesm2022/masterteam-components-runtime-action.mjs.map +0 -1
- package/fesm2022/masterteam-components-select-field.mjs +0 -411
- package/fesm2022/masterteam-components-select-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-sidebar.mjs +0 -155
- package/fesm2022/masterteam-components-sidebar.mjs.map +0 -1
- package/fesm2022/masterteam-components-slider-field.mjs +0 -128
- package/fesm2022/masterteam-components-slider-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-statistic-card.mjs +0 -42
- package/fesm2022/masterteam-components-statistic-card.mjs.map +0 -1
- package/fesm2022/masterteam-components-table.mjs +0 -3197
- package/fesm2022/masterteam-components-table.mjs.map +0 -1
- package/fesm2022/masterteam-components-tabs.mjs +0 -289
- package/fesm2022/masterteam-components-tabs.mjs.map +0 -1
- package/fesm2022/masterteam-components-text-field.mjs +0 -198
- package/fesm2022/masterteam-components-text-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-textarea-field.mjs +0 -122
- package/fesm2022/masterteam-components-textarea-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-toast.mjs +0 -80
- package/fesm2022/masterteam-components-toast.mjs.map +0 -1
- package/fesm2022/masterteam-components-toggle-field.mjs +0 -116
- package/fesm2022/masterteam-components-toggle-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-tooltip.mjs +0 -147
- package/fesm2022/masterteam-components-tooltip.mjs.map +0 -1
- package/fesm2022/masterteam-components-topbar.mjs +0 -32
- package/fesm2022/masterteam-components-topbar.mjs.map +0 -1
- package/fesm2022/masterteam-components-tree.mjs +0 -260
- package/fesm2022/masterteam-components-tree.mjs.map +0 -1
- package/fesm2022/masterteam-components-treeselect-field.mjs +0 -265
- package/fesm2022/masterteam-components-treeselect-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-upload-field.mjs +0 -841
- package/fesm2022/masterteam-components-upload-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-uploader.mjs +0 -425
- package/fesm2022/masterteam-components-uploader.mjs.map +0 -1
- package/fesm2022/masterteam-components-user-search-field.mjs +0 -370
- package/fesm2022/masterteam-components-user-search-field.mjs.map +0 -1
- package/fesm2022/masterteam-components.mjs +0 -2334
- package/fesm2022/masterteam-components.mjs.map +0 -1
- package/types/masterteam-components-avatar-text.d.ts +0 -23
- package/types/masterteam-components-avatar.d.ts +0 -23
- package/types/masterteam-components-breadcrumb.d.ts +0 -18
- package/types/masterteam-components-business-fields.d.ts +0 -671
- package/types/masterteam-components-button-group.d.ts +0 -8
- package/types/masterteam-components-button.d.ts +0 -36
- package/types/masterteam-components-card.d.ts +0 -14
- package/types/masterteam-components-checkbox-field.d.ts +0 -34
- package/types/masterteam-components-chip.d.ts +0 -21
- package/types/masterteam-components-client-page-menu.d.ts +0 -55
- package/types/masterteam-components-client-page.d.ts +0 -109
- package/types/masterteam-components-color-picker-field.d.ts +0 -35
- package/types/masterteam-components-confirmation.d.ts +0 -41
- package/types/masterteam-components-date-field.d.ts +0 -53
- package/types/masterteam-components-dialog.d.ts +0 -12
- package/types/masterteam-components-drawer.d.ts +0 -62
- package/types/masterteam-components-dynamic-drawer.d.ts +0 -159
- package/types/masterteam-components-editor-field.d.ts +0 -35
- package/types/masterteam-components-entities.d.ts +0 -1030
- package/types/masterteam-components-field-validation.d.ts +0 -23
- package/types/masterteam-components-formula.d.ts +0 -759
- package/types/masterteam-components-icon-field.d.ts +0 -40
- package/types/masterteam-components-list.d.ts +0 -18
- package/types/masterteam-components-location-field.d.ts +0 -169
- package/types/masterteam-components-menu.d.ts +0 -55
- package/types/masterteam-components-modal.d.ts +0 -30
- package/types/masterteam-components-module-summary-card.d.ts +0 -18
- package/types/masterteam-components-multi-select-field.d.ts +0 -100
- package/types/masterteam-components-number-field.d.ts +0 -43
- package/types/masterteam-components-page-header.d.ts +0 -30
- package/types/masterteam-components-page.d.ts +0 -26
- package/types/masterteam-components-paginator.d.ts +0 -20
- package/types/masterteam-components-pick-list-field.d.ts +0 -61
- package/types/masterteam-components-progress.d.ts +0 -30
- package/types/masterteam-components-property-filter-builder.d.ts +0 -90
- package/types/masterteam-components-radio-button-field.d.ts +0 -41
- package/types/masterteam-components-radio-cards-field.d.ts +0 -35
- package/types/masterteam-components-radio-cards.d.ts +0 -33
- package/types/masterteam-components-runtime-action.d.ts +0 -105
- package/types/masterteam-components-select-field.d.ts +0 -132
- package/types/masterteam-components-sidebar.d.ts +0 -71
- package/types/masterteam-components-slider-field.d.ts +0 -41
- package/types/masterteam-components-statistic-card.d.ts +0 -28
- package/types/masterteam-components-table.d.ts +0 -827
- package/types/masterteam-components-tabs.d.ts +0 -80
- package/types/masterteam-components-text-field.d.ts +0 -56
- package/types/masterteam-components-textarea-field.d.ts +0 -41
- package/types/masterteam-components-toast.d.ts +0 -27
- package/types/masterteam-components-toggle-field.d.ts +0 -44
- package/types/masterteam-components-tooltip.d.ts +0 -26
- package/types/masterteam-components-topbar.d.ts +0 -20
- package/types/masterteam-components-tree.d.ts +0 -106
- package/types/masterteam-components-treeselect-field.d.ts +0 -79
- package/types/masterteam-components-upload-field.d.ts +0 -108
- package/types/masterteam-components-uploader.d.ts +0 -53
- package/types/masterteam-components-user-search-field.d.ts +0 -106
- package/types/masterteam-components.d.ts +0 -1181
|
@@ -0,0 +1,1014 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EntityData,
|
|
3
|
+
EntityMultiUserValue,
|
|
4
|
+
EntityViewType,
|
|
5
|
+
} from '@masterteam/components/entities';
|
|
6
|
+
import {
|
|
7
|
+
clockTimeToSeconds,
|
|
8
|
+
parseClockTime,
|
|
9
|
+
toClockTimeParts,
|
|
10
|
+
} from '@masterteam/components';
|
|
11
|
+
import {
|
|
12
|
+
ColumnDef,
|
|
13
|
+
FilterConfig,
|
|
14
|
+
FilterOption,
|
|
15
|
+
FilterValue,
|
|
16
|
+
} from './table-types';
|
|
17
|
+
|
|
18
|
+
export type TableEntityUsage = 'sort' | 'export' | 'filter';
|
|
19
|
+
|
|
20
|
+
export class TableValueResolver {
|
|
21
|
+
/**
|
|
22
|
+
* View types the table knows how to filter/sort/export. Deliberately a
|
|
23
|
+
* subset of `EntityViewType` — the richer ones (`Location`, `Connection`,
|
|
24
|
+
* `LookupModuleCheckList`, `LeafDetails`) have no scalar the table could
|
|
25
|
+
* compare, so they stay out and simply render. Anything listed here also
|
|
26
|
+
* needs a branch in `getColumnFilterType` and `getEntityValueByType`.
|
|
27
|
+
*/
|
|
28
|
+
private static readonly ALL_ENTITY_VIEW_TYPES: EntityViewType[] = [
|
|
29
|
+
'Text',
|
|
30
|
+
'LongText',
|
|
31
|
+
'Date',
|
|
32
|
+
'DateTime',
|
|
33
|
+
'Time',
|
|
34
|
+
'Number',
|
|
35
|
+
'Percentage',
|
|
36
|
+
'Status',
|
|
37
|
+
'Currency',
|
|
38
|
+
'Checkbox',
|
|
39
|
+
'User',
|
|
40
|
+
'MultiUser',
|
|
41
|
+
'Lookup',
|
|
42
|
+
'LookupMatrix',
|
|
43
|
+
'PhaseGate',
|
|
44
|
+
'Attachment',
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
private static readonly UNSORTABLE_ENTITY_VIEW_TYPES =
|
|
48
|
+
new Set<EntityViewType>(['Attachment', 'Checkbox']);
|
|
49
|
+
|
|
50
|
+
private static readonly EXPORTABLE_ENTITY_VIEW_TYPES =
|
|
51
|
+
new Set<EntityViewType>([
|
|
52
|
+
'Text',
|
|
53
|
+
'LongText',
|
|
54
|
+
'Date',
|
|
55
|
+
'DateTime',
|
|
56
|
+
'Time',
|
|
57
|
+
'Number',
|
|
58
|
+
'Percentage',
|
|
59
|
+
'Status',
|
|
60
|
+
'Currency',
|
|
61
|
+
'Checkbox',
|
|
62
|
+
'User',
|
|
63
|
+
'MultiUser',
|
|
64
|
+
'Lookup',
|
|
65
|
+
'LookupMatrix',
|
|
66
|
+
'PhaseGate',
|
|
67
|
+
]);
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* `Time` is sortable and exportable but not filterable: a time-of-day has no
|
|
71
|
+
* meaningful date-range filter, and a date picker cannot express one — it
|
|
72
|
+
* would silently filter by day instead of by clock time.
|
|
73
|
+
*/
|
|
74
|
+
private static readonly FILTERABLE_ENTITY_VIEW_TYPES =
|
|
75
|
+
new Set<EntityViewType>(
|
|
76
|
+
TableValueResolver.ALL_ENTITY_VIEW_TYPES.filter(
|
|
77
|
+
(viewType) =>
|
|
78
|
+
viewType !== 'Attachment' &&
|
|
79
|
+
viewType !== 'Time' &&
|
|
80
|
+
viewType !== 'MultiUser',
|
|
81
|
+
),
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Sentinel `key` value that resolves to the whole row instead of a property
|
|
86
|
+
* path. Use it when a cell renderer (e.g. `type: 'user'`) needs the full
|
|
87
|
+
* record, not a single field — `key: '{{record}}'` in the column def.
|
|
88
|
+
*/
|
|
89
|
+
static readonly RECORD_KEY = '{{record}}';
|
|
90
|
+
|
|
91
|
+
static getProperty(obj: unknown, key: string): unknown {
|
|
92
|
+
if (key === TableValueResolver.RECORD_KEY) {
|
|
93
|
+
return obj;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return key.split('.').reduce<unknown>((current, segment) => {
|
|
97
|
+
if (!current || typeof current !== 'object') {
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return (current as Record<string, unknown>)[segment];
|
|
102
|
+
}, obj);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Recursively scans `value` for any string field that contains `searchTerm`.
|
|
107
|
+
* Used by the general-search box so nested displays (e.g. `name.display` on a
|
|
108
|
+
* lookup row, where the row's top-level `name` is an object) are still
|
|
109
|
+
* matched. `searchTerm` is expected to be lowercase.
|
|
110
|
+
*/
|
|
111
|
+
static matchesSearchTerm(
|
|
112
|
+
value: unknown,
|
|
113
|
+
searchTerm: string,
|
|
114
|
+
depth = 0,
|
|
115
|
+
): boolean {
|
|
116
|
+
if (value === null || value === undefined) {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (typeof value === 'string') {
|
|
121
|
+
return value.toLowerCase().includes(searchTerm);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (depth >= 4) {
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (Array.isArray(value)) {
|
|
129
|
+
return value.some((entry) =>
|
|
130
|
+
TableValueResolver.matchesSearchTerm(entry, searchTerm, depth + 1),
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if (typeof value === 'object') {
|
|
135
|
+
return Object.values(value as Record<string, unknown>).some((entry) =>
|
|
136
|
+
TableValueResolver.matchesSearchTerm(entry, searchTerm, depth + 1),
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
static getColumnFilterType(
|
|
144
|
+
column: ColumnDef,
|
|
145
|
+
row?: Record<string, unknown>,
|
|
146
|
+
): FilterConfig['type'] | null {
|
|
147
|
+
if (column.filterConfig?.type) {
|
|
148
|
+
return column.filterConfig.type;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (column.type === 'date' || column.type === 'dateTime') {
|
|
152
|
+
return 'date';
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (column.type === 'number') {
|
|
156
|
+
return 'numberRange';
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (column.type === 'boolean') {
|
|
160
|
+
return 'boolean';
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
if (column.type === 'user') {
|
|
164
|
+
return 'user';
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if (column.type === 'status') {
|
|
168
|
+
return 'select';
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
if (column.type !== 'entity') {
|
|
172
|
+
return null;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const viewType = TableValueResolver.getEntityViewType(column, row);
|
|
176
|
+
if (
|
|
177
|
+
!viewType ||
|
|
178
|
+
!TableValueResolver.FILTERABLE_ENTITY_VIEW_TYPES.has(viewType)
|
|
179
|
+
) {
|
|
180
|
+
return null;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
switch (viewType) {
|
|
184
|
+
case 'Date':
|
|
185
|
+
case 'DateTime':
|
|
186
|
+
return 'date';
|
|
187
|
+
case 'Checkbox':
|
|
188
|
+
return 'boolean';
|
|
189
|
+
case 'Status':
|
|
190
|
+
case 'Lookup':
|
|
191
|
+
case 'LookupMatrix':
|
|
192
|
+
case 'PhaseGate':
|
|
193
|
+
return 'select';
|
|
194
|
+
case 'User':
|
|
195
|
+
return 'userSelect';
|
|
196
|
+
case 'Percentage':
|
|
197
|
+
case 'Number':
|
|
198
|
+
return 'numberRange';
|
|
199
|
+
case 'Text':
|
|
200
|
+
case 'LongText':
|
|
201
|
+
case 'Currency':
|
|
202
|
+
default:
|
|
203
|
+
return 'text';
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Returns a column with its filterConfig normalized for rendering:
|
|
209
|
+
* - `type` is resolved via `getColumnFilterType`
|
|
210
|
+
* - `options` for `select` filters are auto-generated from `data` when not provided
|
|
211
|
+
*
|
|
212
|
+
* Used by both popover and per-column filter modes so option-building stays in one place.
|
|
213
|
+
*/
|
|
214
|
+
static buildFilterableColumn(column: ColumnDef, data: any[]): ColumnDef {
|
|
215
|
+
const sampleRow = data[0];
|
|
216
|
+
const filterType = TableValueResolver.getColumnFilterType(
|
|
217
|
+
column,
|
|
218
|
+
sampleRow,
|
|
219
|
+
);
|
|
220
|
+
|
|
221
|
+
if (
|
|
222
|
+
(filterType === 'select' || filterType === 'userSelect') &&
|
|
223
|
+
!column.filterConfig?.options?.length
|
|
224
|
+
) {
|
|
225
|
+
const uniqueOptions = Array.from(
|
|
226
|
+
data.reduce<Map<string, FilterOption>>((options, row) => {
|
|
227
|
+
const value = TableValueResolver.getColumnFilterValue(row, column);
|
|
228
|
+
|
|
229
|
+
if (value === null || value === undefined || value === '') {
|
|
230
|
+
return options;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
const optionKey = `${typeof value}:${String(value)}`;
|
|
234
|
+
if (!options.has(optionKey)) {
|
|
235
|
+
options.set(optionKey, {
|
|
236
|
+
label: String(value),
|
|
237
|
+
value,
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
return options;
|
|
242
|
+
}, new Map()),
|
|
243
|
+
)
|
|
244
|
+
.map(([, option]) => option)
|
|
245
|
+
.sort((a, b) => a.label.localeCompare(b.label));
|
|
246
|
+
|
|
247
|
+
return {
|
|
248
|
+
...column,
|
|
249
|
+
filterConfig: {
|
|
250
|
+
...column.filterConfig,
|
|
251
|
+
type: filterType,
|
|
252
|
+
options: uniqueOptions,
|
|
253
|
+
},
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
return {
|
|
258
|
+
...column,
|
|
259
|
+
filterConfig: {
|
|
260
|
+
...column.filterConfig,
|
|
261
|
+
type: filterType ?? column.filterConfig?.type ?? 'text',
|
|
262
|
+
},
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Returns true when `item` passes the filter for `key`. Pure function — callers
|
|
268
|
+
* pass `column` so the resolver can apply type-aware normalisation (entity,
|
|
269
|
+
* status, user, date, boolean). Shared by `mt-table` row-filtering and
|
|
270
|
+
* `client-list-cards-view` card-filtering.
|
|
271
|
+
*/
|
|
272
|
+
static matchesFilter(
|
|
273
|
+
item: unknown,
|
|
274
|
+
key: string,
|
|
275
|
+
filterValue: FilterValue | unknown,
|
|
276
|
+
column: ColumnDef | undefined,
|
|
277
|
+
): boolean {
|
|
278
|
+
if (
|
|
279
|
+
filterValue === null ||
|
|
280
|
+
filterValue === undefined ||
|
|
281
|
+
filterValue === '' ||
|
|
282
|
+
(typeof filterValue === 'string' && filterValue.trim() === '')
|
|
283
|
+
) {
|
|
284
|
+
return true;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
if (Array.isArray(filterValue)) {
|
|
288
|
+
if (filterValue.length === 0) return true;
|
|
289
|
+
return filterValue.some((entry) =>
|
|
290
|
+
TableValueResolver.matchesFilter(item, key, entry, column),
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
const itemValue = TableValueResolver.getProperty(item, key);
|
|
295
|
+
const normalizedFilterValue = column
|
|
296
|
+
? TableValueResolver.getColumnFilterValue(
|
|
297
|
+
item as Record<string, unknown>,
|
|
298
|
+
column,
|
|
299
|
+
)
|
|
300
|
+
: TableValueResolver.resolveDisplayValue(itemValue);
|
|
301
|
+
const filterType = column
|
|
302
|
+
? TableValueResolver.getColumnFilterType(
|
|
303
|
+
column,
|
|
304
|
+
item as Record<string, unknown>,
|
|
305
|
+
)
|
|
306
|
+
: null;
|
|
307
|
+
|
|
308
|
+
if (typeof filterValue === 'object' && filterValue !== null) {
|
|
309
|
+
const objectFilter = filterValue as FilterValue & {
|
|
310
|
+
userName?: string;
|
|
311
|
+
id?: string;
|
|
312
|
+
displayName?: string;
|
|
313
|
+
};
|
|
314
|
+
if (
|
|
315
|
+
filterType === 'numberRange' &&
|
|
316
|
+
(objectFilter.from != null || objectFilter.to != null)
|
|
317
|
+
) {
|
|
318
|
+
const itemNumericValue =
|
|
319
|
+
column?.type === 'entity'
|
|
320
|
+
? TableValueResolver.normalizeNumericSortValue(
|
|
321
|
+
(itemValue as { rawValue?: unknown; value?: unknown })
|
|
322
|
+
?.rawValue ??
|
|
323
|
+
(itemValue as { value?: unknown })?.value ??
|
|
324
|
+
itemValue,
|
|
325
|
+
)
|
|
326
|
+
: TableValueResolver.normalizeNumericSortValue(itemValue);
|
|
327
|
+
|
|
328
|
+
if (itemNumericValue === null) {
|
|
329
|
+
return true;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
const fromNumeric =
|
|
333
|
+
objectFilter.from != null ? Number(objectFilter.from) : null;
|
|
334
|
+
const toNumeric =
|
|
335
|
+
objectFilter.to != null ? Number(objectFilter.to) : null;
|
|
336
|
+
|
|
337
|
+
if (
|
|
338
|
+
fromNumeric !== null &&
|
|
339
|
+
!Number.isNaN(fromNumeric) &&
|
|
340
|
+
itemNumericValue < fromNumeric
|
|
341
|
+
) {
|
|
342
|
+
return false;
|
|
343
|
+
}
|
|
344
|
+
if (
|
|
345
|
+
toNumeric !== null &&
|
|
346
|
+
!Number.isNaN(toNumeric) &&
|
|
347
|
+
itemNumericValue > toNumeric
|
|
348
|
+
) {
|
|
349
|
+
return false;
|
|
350
|
+
}
|
|
351
|
+
return true;
|
|
352
|
+
}
|
|
353
|
+
if (objectFilter.from || objectFilter.to) {
|
|
354
|
+
const itemDateValue =
|
|
355
|
+
filterType === 'date'
|
|
356
|
+
? typeof normalizedFilterValue === 'number'
|
|
357
|
+
? normalizedFilterValue
|
|
358
|
+
: normalizedFilterValue != null && normalizedFilterValue !== ''
|
|
359
|
+
? new Date(String(normalizedFilterValue)).getTime()
|
|
360
|
+
: null
|
|
361
|
+
: itemValue instanceof Date
|
|
362
|
+
? itemValue.getTime()
|
|
363
|
+
: new Date(String(itemValue)).getTime();
|
|
364
|
+
|
|
365
|
+
if (
|
|
366
|
+
itemDateValue === null ||
|
|
367
|
+
itemDateValue === undefined ||
|
|
368
|
+
Number.isNaN(itemDateValue)
|
|
369
|
+
) {
|
|
370
|
+
return true;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
if (
|
|
374
|
+
objectFilter.from &&
|
|
375
|
+
itemDateValue < new Date(objectFilter.from).getTime()
|
|
376
|
+
) {
|
|
377
|
+
return false;
|
|
378
|
+
}
|
|
379
|
+
if (objectFilter.to) {
|
|
380
|
+
const toDate = new Date(objectFilter.to);
|
|
381
|
+
toDate.setHours(23, 59, 59, 999);
|
|
382
|
+
if (itemDateValue > toDate.getTime()) {
|
|
383
|
+
return false;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
return true;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
if (objectFilter.userName) {
|
|
390
|
+
const normalizedItemUser = itemValue as Record<string, unknown> | null;
|
|
391
|
+
if (!normalizedItemUser) return false;
|
|
392
|
+
return (
|
|
393
|
+
normalizedItemUser['id'] === objectFilter.id ||
|
|
394
|
+
normalizedItemUser['userName'] === objectFilter.userName ||
|
|
395
|
+
normalizedItemUser['displayName'] === objectFilter.displayName
|
|
396
|
+
);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
if (filterType === 'treeSelect') {
|
|
400
|
+
const filterLabel =
|
|
401
|
+
TableValueResolver.resolveTreeFilterLabel(filterValue);
|
|
402
|
+
|
|
403
|
+
if (!filterLabel) {
|
|
404
|
+
return true;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
const itemLabel =
|
|
408
|
+
normalizedFilterValue ??
|
|
409
|
+
TableValueResolver.resolveTreeFilterLabel(itemValue);
|
|
410
|
+
|
|
411
|
+
return itemLabel === null || itemLabel === undefined
|
|
412
|
+
? false
|
|
413
|
+
: String(itemLabel).toLowerCase().includes(filterLabel.toLowerCase());
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
if (typeof filterValue === 'boolean') {
|
|
418
|
+
return normalizedFilterValue === filterValue;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
if (filterType === 'select' || filterType === 'userSelect') {
|
|
422
|
+
return (
|
|
423
|
+
String(normalizedFilterValue).toLowerCase() ===
|
|
424
|
+
String(filterValue).trim().toLowerCase()
|
|
425
|
+
);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
if (
|
|
429
|
+
typeof normalizedFilterValue === 'string' ||
|
|
430
|
+
typeof normalizedFilterValue === 'number'
|
|
431
|
+
) {
|
|
432
|
+
// Trim the query so " john " matches "john smith"; the whitespace-only
|
|
433
|
+
// case already short-circuited via the guard above.
|
|
434
|
+
return String(normalizedFilterValue)
|
|
435
|
+
.toLowerCase()
|
|
436
|
+
.includes(String(filterValue).trim().toLowerCase());
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
return normalizedFilterValue === filterValue;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Applies every entry of `filters` against `item` — used by cards view and
|
|
444
|
+
* anywhere else that consumes the same filter shape as mt-table.
|
|
445
|
+
*/
|
|
446
|
+
static matchesAllFilters(
|
|
447
|
+
item: unknown,
|
|
448
|
+
filters: Record<string, unknown>,
|
|
449
|
+
columns: ColumnDef[],
|
|
450
|
+
): boolean {
|
|
451
|
+
return Object.keys(filters).every((key) => {
|
|
452
|
+
if (key === 'generalSearch') return true;
|
|
453
|
+
const column = columns.find((col) => col.key === key);
|
|
454
|
+
return TableValueResolver.matchesFilter(item, key, filters[key], column);
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* True when a filter slot holds a meaningful value (scalar, text, date-range bounds,
|
|
460
|
+
* or user lookup). Shared by popover and per-column modes to compute active counts.
|
|
461
|
+
*/
|
|
462
|
+
static hasFilterValue(value: unknown): boolean {
|
|
463
|
+
if (value === null || value === undefined || value === '') {
|
|
464
|
+
return false;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
// A whitespace-only text filter is not a real value — keeps it out of the
|
|
468
|
+
// active-filter count and makes the column-filter Apply clear instead of
|
|
469
|
+
// committing " ".
|
|
470
|
+
if (typeof value === 'string') {
|
|
471
|
+
return value.trim().length > 0;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
if (Array.isArray(value)) {
|
|
475
|
+
return value.length > 0;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
if (typeof value === 'object') {
|
|
479
|
+
const filterValue = value as {
|
|
480
|
+
from?: unknown;
|
|
481
|
+
to?: unknown;
|
|
482
|
+
value?: unknown;
|
|
483
|
+
userName?: unknown;
|
|
484
|
+
id?: unknown;
|
|
485
|
+
key?: unknown;
|
|
486
|
+
label?: unknown;
|
|
487
|
+
data?: unknown;
|
|
488
|
+
};
|
|
489
|
+
return (
|
|
490
|
+
filterValue.from != null ||
|
|
491
|
+
filterValue.to != null ||
|
|
492
|
+
filterValue.value != null ||
|
|
493
|
+
filterValue.userName != null ||
|
|
494
|
+
filterValue.id != null ||
|
|
495
|
+
filterValue.key != null ||
|
|
496
|
+
filterValue.label != null ||
|
|
497
|
+
filterValue.data != null
|
|
498
|
+
);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
return true;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Produces the filter payload a cell-click should apply for `column`.
|
|
506
|
+
* Returns null when the cell type is not click-filterable.
|
|
507
|
+
*
|
|
508
|
+
* Shapes match `Table.matchesFilter` branches:
|
|
509
|
+
* - user / entity(User) → `{ id, userName, displayName }`
|
|
510
|
+
* - status / entity(Status|Lookup) → scalar display string
|
|
511
|
+
* - boolean → boolean
|
|
512
|
+
*/
|
|
513
|
+
static buildClickFilterValue(
|
|
514
|
+
row: unknown,
|
|
515
|
+
column: ColumnDef,
|
|
516
|
+
): unknown | null {
|
|
517
|
+
const cellValue = TableValueResolver.getProperty(row, column.key);
|
|
518
|
+
if (cellValue === null || cellValue === undefined || cellValue === '') {
|
|
519
|
+
return null;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
const filterType = TableValueResolver.getColumnFilterType(
|
|
523
|
+
column,
|
|
524
|
+
row as Record<string, unknown>,
|
|
525
|
+
);
|
|
526
|
+
|
|
527
|
+
if (column.type === 'user' || filterType === 'user') {
|
|
528
|
+
// Entity(User) envelopes store the user object under `.value`; plain user
|
|
529
|
+
// columns may hold it directly. Both paths produce the {id,userName,displayName} shape.
|
|
530
|
+
const source =
|
|
531
|
+
column.type === 'entity' &&
|
|
532
|
+
cellValue &&
|
|
533
|
+
typeof cellValue === 'object' &&
|
|
534
|
+
'value' in (cellValue as Record<string, unknown>)
|
|
535
|
+
? (cellValue as Record<string, unknown>)['value']
|
|
536
|
+
: cellValue;
|
|
537
|
+
return TableValueResolver.extractUserFilterValue(source);
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
// Entity-typed columns carry a `{ viewType, value, rawValue, ... }` envelope.
|
|
541
|
+
// Unwrap once so boolean / scalar branches below operate on the inner value,
|
|
542
|
+
// matching what `matchesFilter` -> `getColumnFilterValue` compares against.
|
|
543
|
+
const normalized =
|
|
544
|
+
column.type === 'entity'
|
|
545
|
+
? TableValueResolver.getEntityValueByType(cellValue, 'filter')
|
|
546
|
+
: cellValue;
|
|
547
|
+
|
|
548
|
+
if (normalized === null || normalized === undefined || normalized === '') {
|
|
549
|
+
return null;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
if (filterType === 'boolean') {
|
|
553
|
+
return TableValueResolver.resolveBooleanValue(normalized);
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
if (
|
|
557
|
+
filterType === 'select' ||
|
|
558
|
+
filterType === 'userSelect' ||
|
|
559
|
+
filterType === 'text'
|
|
560
|
+
) {
|
|
561
|
+
if (column.type === 'entity') {
|
|
562
|
+
return String(normalized);
|
|
563
|
+
}
|
|
564
|
+
const display = TableValueResolver.resolveDisplayValue(cellValue);
|
|
565
|
+
return display === null ? null : String(display);
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
return null;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* True when two filter values refer to the same thing. Mirrors the branches
|
|
573
|
+
* in `Table.matchesFilter`: scalar equality, boolean equality, or user-object
|
|
574
|
+
* identity on id / userName / displayName.
|
|
575
|
+
*/
|
|
576
|
+
static isFilterValueEqual(a: unknown, b: unknown): boolean {
|
|
577
|
+
if (a === b) return true;
|
|
578
|
+
if (a === null || a === undefined || b === null || b === undefined) {
|
|
579
|
+
return false;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
if (typeof a === 'object' && typeof b === 'object') {
|
|
583
|
+
const left = a as Record<string, unknown>;
|
|
584
|
+
const right = b as Record<string, unknown>;
|
|
585
|
+
if (left['id'] != null && left['id'] === right['id']) return true;
|
|
586
|
+
if (left['key'] != null && left['key'] === right['key']) return true;
|
|
587
|
+
if (left['userName'] != null && left['userName'] === right['userName']) {
|
|
588
|
+
return true;
|
|
589
|
+
}
|
|
590
|
+
if (
|
|
591
|
+
left['displayName'] != null &&
|
|
592
|
+
left['displayName'] === right['displayName']
|
|
593
|
+
) {
|
|
594
|
+
return true;
|
|
595
|
+
}
|
|
596
|
+
return false;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
return String(a) === String(b);
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
private static extractUserFilterValue(
|
|
603
|
+
value: unknown,
|
|
604
|
+
): Record<string, unknown> | string | null {
|
|
605
|
+
if (value === null || value === undefined) return null;
|
|
606
|
+
|
|
607
|
+
if (typeof value === 'object') {
|
|
608
|
+
const record = value as Record<string, unknown>;
|
|
609
|
+
const inner =
|
|
610
|
+
record['value'] && typeof record['value'] === 'object'
|
|
611
|
+
? (record['value'] as Record<string, unknown>)
|
|
612
|
+
: record;
|
|
613
|
+
|
|
614
|
+
const id = inner['id'];
|
|
615
|
+
const userName = inner['userName'] ?? inner['username'];
|
|
616
|
+
const displayName = inner['displayName'] ?? inner['name'];
|
|
617
|
+
|
|
618
|
+
if (id == null && userName == null && displayName == null) {
|
|
619
|
+
const fallback = TableValueResolver.resolveDisplayValue(value);
|
|
620
|
+
return fallback === null ? null : String(fallback);
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
return {
|
|
624
|
+
...(id != null ? { id } : {}),
|
|
625
|
+
...(userName != null ? { userName } : {}),
|
|
626
|
+
...(displayName != null ? { displayName } : {}),
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
return String(value);
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
static getColumnFilterValue(
|
|
634
|
+
row: Record<string, unknown>,
|
|
635
|
+
column: ColumnDef,
|
|
636
|
+
): string | number | boolean | null {
|
|
637
|
+
const cellValue = TableValueResolver.getProperty(row, column.key);
|
|
638
|
+
|
|
639
|
+
if (cellValue === null || cellValue === undefined) {
|
|
640
|
+
return null;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
if (column.type === 'entity') {
|
|
644
|
+
const filterType = TableValueResolver.getColumnFilterType(column, row);
|
|
645
|
+
|
|
646
|
+
if (filterType === 'date') {
|
|
647
|
+
return TableValueResolver.getEntityValueByType(cellValue, 'sort');
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
return TableValueResolver.getEntityValueByType(cellValue, 'filter');
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
if (column.type === 'date' || column.type === 'dateTime') {
|
|
654
|
+
return TableValueResolver.normalizeDateSortValue(cellValue);
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
if (column.type === 'number') {
|
|
658
|
+
return TableValueResolver.normalizeNumericSortValue(cellValue);
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
if (column.type === 'boolean') {
|
|
662
|
+
return TableValueResolver.resolveBooleanValue(cellValue);
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
return TableValueResolver.resolveDisplayValue(cellValue);
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
static resolveDateValue(value: unknown): string | number | Date | null {
|
|
669
|
+
if (value === null || value === undefined || value === '') {
|
|
670
|
+
return null;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
if (
|
|
674
|
+
typeof value === 'string' ||
|
|
675
|
+
typeof value === 'number' ||
|
|
676
|
+
value instanceof Date
|
|
677
|
+
) {
|
|
678
|
+
return value;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
if (typeof value === 'object') {
|
|
682
|
+
const objectValue = value as Record<string, unknown>;
|
|
683
|
+
return TableValueResolver.resolveDateValue(
|
|
684
|
+
objectValue['actualValue'] ??
|
|
685
|
+
objectValue['rawValue'] ??
|
|
686
|
+
objectValue['value'] ??
|
|
687
|
+
objectValue['displayValue'],
|
|
688
|
+
);
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
return String(value);
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
static getEntityValueByType(
|
|
695
|
+
value: unknown,
|
|
696
|
+
usage: TableEntityUsage,
|
|
697
|
+
): string | number | boolean | null {
|
|
698
|
+
if (value === null || value === undefined) {
|
|
699
|
+
return null;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
if (typeof value !== 'object') {
|
|
703
|
+
return TableValueResolver.resolveDisplayValue(value);
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
const entityData = value as EntityData;
|
|
707
|
+
|
|
708
|
+
// ChangeRequest snapshot cells carry a frozen old→new comparison. On screen
|
|
709
|
+
// the cell renders the "after" side (see EntityPreview/ComparisonValue), so
|
|
710
|
+
// export/sort/filter must resolve that same new value — not `entityData.value`,
|
|
711
|
+
// which is the pre-change base and would export identically for every row.
|
|
712
|
+
if (entityData.comparison?.kind === 'Value') {
|
|
713
|
+
const after = entityData.comparison.newValue;
|
|
714
|
+
return TableValueResolver.getEntityValueByType(
|
|
715
|
+
{
|
|
716
|
+
...entityData,
|
|
717
|
+
value: (after.display ?? after.value ?? '') as EntityData['value'],
|
|
718
|
+
comparison: undefined,
|
|
719
|
+
},
|
|
720
|
+
usage,
|
|
721
|
+
);
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
if (
|
|
725
|
+
usage === 'sort' &&
|
|
726
|
+
TableValueResolver.UNSORTABLE_ENTITY_VIEW_TYPES.has(entityData.viewType)
|
|
727
|
+
) {
|
|
728
|
+
return null;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
if (
|
|
732
|
+
usage === 'export' &&
|
|
733
|
+
!TableValueResolver.EXPORTABLE_ENTITY_VIEW_TYPES.has(entityData.viewType)
|
|
734
|
+
) {
|
|
735
|
+
return TableValueResolver.resolveDisplayValue(entityData.value);
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
switch (entityData.viewType) {
|
|
739
|
+
case 'Currency':
|
|
740
|
+
case 'Percentage':
|
|
741
|
+
case 'Number':
|
|
742
|
+
return usage === 'sort'
|
|
743
|
+
? TableValueResolver.normalizeNumericSortValue(
|
|
744
|
+
entityData.rawValue ?? entityData.value,
|
|
745
|
+
)
|
|
746
|
+
: TableValueResolver.resolveDisplayValue(entityData.value);
|
|
747
|
+
case 'Date':
|
|
748
|
+
case 'DateTime':
|
|
749
|
+
return usage === 'sort'
|
|
750
|
+
? TableValueResolver.normalizeDateSortValue(
|
|
751
|
+
entityData.rawValue ?? entityData.value,
|
|
752
|
+
)
|
|
753
|
+
: TableValueResolver.resolveDisplayValue(entityData.value);
|
|
754
|
+
// `Time` sorts by clock, not by instant — a time of day has no calendar
|
|
755
|
+
// date to order by. Its export runs through `mtDateFormat` in the
|
|
756
|
+
// table/cards date path, not here, because the backend `value` for a Time
|
|
757
|
+
// property is the unformatted stored value.
|
|
758
|
+
case 'Time':
|
|
759
|
+
return usage === 'sort'
|
|
760
|
+
? TableValueResolver.normalizeClockSortValue(
|
|
761
|
+
entityData.rawValue ?? entityData.value,
|
|
762
|
+
)
|
|
763
|
+
: TableValueResolver.resolveDisplayValue(entityData.value);
|
|
764
|
+
case 'Checkbox':
|
|
765
|
+
return TableValueResolver.resolveBooleanValue(
|
|
766
|
+
entityData.rawValue ?? entityData.value,
|
|
767
|
+
);
|
|
768
|
+
case 'LongText':
|
|
769
|
+
// Rich-text value holds HTML (rendered via [innerHTML] on screen).
|
|
770
|
+
// Strip tags so the export shows clean text instead of <p>…</p> markup.
|
|
771
|
+
return TableValueResolver.stripHtml(
|
|
772
|
+
TableValueResolver.resolveDisplayValue(entityData.value),
|
|
773
|
+
);
|
|
774
|
+
case 'MultiUser': {
|
|
775
|
+
const users = Array.isArray(entityData.value)
|
|
776
|
+
? (entityData.value as EntityMultiUserValue)
|
|
777
|
+
: [];
|
|
778
|
+
const names = users
|
|
779
|
+
.map((user) => user.displayName ?? user.name ?? user.userName)
|
|
780
|
+
.filter(
|
|
781
|
+
(name): name is string =>
|
|
782
|
+
typeof name === 'string' && name.trim().length > 0,
|
|
783
|
+
);
|
|
784
|
+
|
|
785
|
+
return names.length ? names.join(', ') : null;
|
|
786
|
+
}
|
|
787
|
+
case 'Status':
|
|
788
|
+
case 'Lookup':
|
|
789
|
+
case 'PhaseGate':
|
|
790
|
+
case 'User':
|
|
791
|
+
case 'Text':
|
|
792
|
+
default:
|
|
793
|
+
return TableValueResolver.resolveDisplayValue(entityData.value);
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
// Export cells use simple rich-text markup. Keep this lightweight unless
|
|
798
|
+
// nested or encoded markup requires a DOM parser later.
|
|
799
|
+
static stripHtml(
|
|
800
|
+
value: string | number | boolean | null,
|
|
801
|
+
): string | number | boolean | null {
|
|
802
|
+
if (typeof value !== 'string') {
|
|
803
|
+
return value;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
const text = value
|
|
807
|
+
.replace(/<br\s*\/?>/gi, ' ')
|
|
808
|
+
.replace(/<\/(p|div|li|h[1-6])>/gi, ' ')
|
|
809
|
+
.replace(/<[^>]*>/g, '')
|
|
810
|
+
.replace(/ /gi, ' ')
|
|
811
|
+
.replace(/&/gi, '&')
|
|
812
|
+
.replace(/</gi, '<')
|
|
813
|
+
.replace(/>/gi, '>')
|
|
814
|
+
.replace(/"/gi, '"')
|
|
815
|
+
.replace(/'/gi, "'")
|
|
816
|
+
.replace(/\s+/g, ' ')
|
|
817
|
+
.trim();
|
|
818
|
+
|
|
819
|
+
return text === '' ? null : text;
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
static resolveDisplayValue(value: unknown): string | number | boolean | null {
|
|
823
|
+
if (value === null || value === undefined || value === '') {
|
|
824
|
+
return null;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
if (
|
|
828
|
+
typeof value === 'string' ||
|
|
829
|
+
typeof value === 'number' ||
|
|
830
|
+
typeof value === 'boolean'
|
|
831
|
+
) {
|
|
832
|
+
return value;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
if (value instanceof Date) {
|
|
836
|
+
return value.toISOString();
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
if (typeof value === 'object') {
|
|
840
|
+
const objectValue = value as Record<string, unknown>;
|
|
841
|
+
const displayCandidate =
|
|
842
|
+
objectValue['display'] ??
|
|
843
|
+
objectValue['displayValue'] ??
|
|
844
|
+
objectValue['displayName'] ??
|
|
845
|
+
objectValue['pathLabel'] ??
|
|
846
|
+
objectValue['name'] ??
|
|
847
|
+
objectValue['label'] ??
|
|
848
|
+
objectValue['code'] ??
|
|
849
|
+
objectValue['value'];
|
|
850
|
+
|
|
851
|
+
return TableValueResolver.resolveDisplayValue(displayCandidate);
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
return String(value);
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
static resolveBooleanValue(value: unknown): boolean | null {
|
|
858
|
+
if (value === null || value === undefined || value === '') {
|
|
859
|
+
return null;
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
if (typeof value === 'boolean') {
|
|
863
|
+
return value;
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
if (typeof value === 'string') {
|
|
867
|
+
return ['true', '1', 'yes', 'on'].includes(value.toLowerCase());
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
if (typeof value === 'number') {
|
|
871
|
+
return value === 1;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
return null;
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
static normalizeTextSortValue(value: unknown): string | null {
|
|
878
|
+
if (value === null || value === undefined || value === '') {
|
|
879
|
+
return null;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
return String(value).toLocaleLowerCase();
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
static normalizeNumericSortValue(value: unknown): number | null {
|
|
886
|
+
if (value === null || value === undefined || value === '') {
|
|
887
|
+
return null;
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
const numericValue =
|
|
891
|
+
typeof value === 'number'
|
|
892
|
+
? value
|
|
893
|
+
: Number.parseFloat(String(value).replace(/[^0-9.-]/g, ''));
|
|
894
|
+
|
|
895
|
+
return Number.isNaN(numericValue) ? null : numericValue;
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
static normalizeDateSortValue(value: unknown): number | null {
|
|
899
|
+
const resolvedValue = TableValueResolver.resolveDateValue(value);
|
|
900
|
+
|
|
901
|
+
if (
|
|
902
|
+
resolvedValue === null ||
|
|
903
|
+
resolvedValue === undefined ||
|
|
904
|
+
resolvedValue === ''
|
|
905
|
+
) {
|
|
906
|
+
return null;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
const timestamp =
|
|
910
|
+
resolvedValue instanceof Date
|
|
911
|
+
? resolvedValue.getTime()
|
|
912
|
+
: new Date(String(resolvedValue)).getTime();
|
|
913
|
+
|
|
914
|
+
return Number.isNaN(timestamp) ? null : timestamp;
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
/**
|
|
918
|
+
* Order a `Time` cell by seconds since midnight. The stored shape is a
|
|
919
|
+
* wall-clock `HH:mm:ss`, which `Date` cannot parse at all; values still held
|
|
920
|
+
* as a full instant contribute their local clock, so a column holding both
|
|
921
|
+
* shapes still sorts by time of day rather than by the date part.
|
|
922
|
+
*/
|
|
923
|
+
static normalizeClockSortValue(value: unknown): number | null {
|
|
924
|
+
const resolvedValue = TableValueResolver.resolveDateValue(value);
|
|
925
|
+
|
|
926
|
+
if (
|
|
927
|
+
resolvedValue === null ||
|
|
928
|
+
resolvedValue === undefined ||
|
|
929
|
+
resolvedValue === ''
|
|
930
|
+
) {
|
|
931
|
+
return null;
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
const clockTime = parseClockTime(resolvedValue);
|
|
935
|
+
if (clockTime) return clockTimeToSeconds(clockTime);
|
|
936
|
+
|
|
937
|
+
const parsed =
|
|
938
|
+
resolvedValue instanceof Date
|
|
939
|
+
? resolvedValue
|
|
940
|
+
: new Date(String(resolvedValue));
|
|
941
|
+
const parsedClockTime = toClockTimeParts(parsed);
|
|
942
|
+
|
|
943
|
+
return parsedClockTime ? clockTimeToSeconds(parsedClockTime) : null;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
/**
|
|
947
|
+
* Resolves an entity column's view type from the column def, falling back to
|
|
948
|
+
* a sample row's cell. Public because grouping decides what it can bucket
|
|
949
|
+
* from the entity view type, which is finer-grained than the filter type
|
|
950
|
+
* (`Lookup` and `LookupMatrix` both filter as `select`-ish but only the view
|
|
951
|
+
* type says whether the values are categorical).
|
|
952
|
+
*/
|
|
953
|
+
static getEntityViewType(
|
|
954
|
+
column: ColumnDef,
|
|
955
|
+
row?: Record<string, unknown>,
|
|
956
|
+
): EntityViewType | null {
|
|
957
|
+
const explicitViewType = (column as { viewType?: unknown }).viewType;
|
|
958
|
+
if (TableValueResolver.isEntityViewType(explicitViewType)) {
|
|
959
|
+
return explicitViewType;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
const cellValue = row
|
|
963
|
+
? TableValueResolver.getProperty(row, column.key)
|
|
964
|
+
: undefined;
|
|
965
|
+
if (
|
|
966
|
+
cellValue &&
|
|
967
|
+
typeof cellValue === 'object' &&
|
|
968
|
+
'viewType' in (cellValue as Record<string, unknown>)
|
|
969
|
+
) {
|
|
970
|
+
const viewType = (cellValue as EntityData).viewType;
|
|
971
|
+
if (TableValueResolver.isEntityViewType(viewType)) {
|
|
972
|
+
return viewType;
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
return null;
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
private static isEntityViewType(value: unknown): value is EntityViewType {
|
|
980
|
+
return (
|
|
981
|
+
typeof value === 'string' &&
|
|
982
|
+
TableValueResolver.ALL_ENTITY_VIEW_TYPES.includes(value as EntityViewType)
|
|
983
|
+
);
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
private static resolveTreeFilterLabel(value: unknown): string | null {
|
|
987
|
+
if (!value || typeof value !== 'object') {
|
|
988
|
+
return null;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
const record = value as Record<string, unknown>;
|
|
992
|
+
const data = record['data'];
|
|
993
|
+
|
|
994
|
+
if (data && typeof data === 'object') {
|
|
995
|
+
const pathLabel = (data as Record<string, unknown>)['pathLabel'];
|
|
996
|
+
if (typeof pathLabel === 'string' && pathLabel.trim().length > 0) {
|
|
997
|
+
return pathLabel.trim();
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
const pathLabel = record['pathLabel'];
|
|
1002
|
+
if (typeof pathLabel === 'string' && pathLabel.trim().length > 0) {
|
|
1003
|
+
return pathLabel.trim();
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
const label = record['label'];
|
|
1007
|
+
if (typeof label === 'string' && label.trim().length > 0) {
|
|
1008
|
+
return label.trim();
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
const key = record['key'];
|
|
1012
|
+
return typeof key === 'string' && key.trim().length > 0 ? key.trim() : null;
|
|
1013
|
+
}
|
|
1014
|
+
}
|