@masterteam/components 0.0.264 → 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/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 -278
- 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 -1907
- 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 -82
- 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 -92
- 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 -153
- package/fesm2022/masterteam-components-client-page-menu.mjs.map +0 -1
- package/fesm2022/masterteam-components-client-page.mjs +0 -413
- package/fesm2022/masterteam-components-client-page.mjs.map +0 -1
- package/fesm2022/masterteam-components-color-picker-field.mjs +0 -106
- 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 -158
- 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 -103
- package/fesm2022/masterteam-components-editor-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-empty-state.mjs +0 -53
- package/fesm2022/masterteam-components-empty-state.mjs.map +0 -1
- package/fesm2022/masterteam-components-entities.mjs +0 -2183
- package/fesm2022/masterteam-components-entities.mjs.map +0 -1
- package/fesm2022/masterteam-components-field-validation.mjs +0 -237
- 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 -158
- 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 -607
- 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 -321
- package/fesm2022/masterteam-components-multi-select-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-number-field.mjs +0 -102
- 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 -210
- 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 -131
- 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 -415
- 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 -3372
- 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 -202
- package/fesm2022/masterteam-components-text-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-textarea-field.mjs +0 -126
- 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 -846
- 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 -374
- package/fesm2022/masterteam-components-user-search-field.mjs.map +0 -1
- package/fesm2022/masterteam-components.mjs +0 -2512
- 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 -675
- package/types/masterteam-components-button-group.d.ts +0 -8
- package/types/masterteam-components-button.d.ts +0 -62
- package/types/masterteam-components-card.d.ts +0 -14
- package/types/masterteam-components-checkbox-field.d.ts +0 -38
- 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 -115
- package/types/masterteam-components-color-picker-field.d.ts +0 -39
- package/types/masterteam-components-confirmation.d.ts +0 -41
- package/types/masterteam-components-date-field.d.ts +0 -57
- 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 -39
- package/types/masterteam-components-empty-state.d.ts +0 -47
- package/types/masterteam-components-entities.d.ts +0 -1102
- package/types/masterteam-components-field-validation.d.ts +0 -59
- package/types/masterteam-components-formula.d.ts +0 -759
- package/types/masterteam-components-icon-field.d.ts +0 -44
- package/types/masterteam-components-list.d.ts +0 -18
- package/types/masterteam-components-location-field.d.ts +0 -173
- 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 -104
- package/types/masterteam-components-number-field.d.ts +0 -47
- 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 -65
- 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 -39
- 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 -136
- 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 -937
- package/types/masterteam-components-tabs.d.ts +0 -80
- package/types/masterteam-components-text-field.d.ts +0 -60
- package/types/masterteam-components-textarea-field.d.ts +0 -45
- 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 -112
- package/types/masterteam-components-uploader.d.ts +0 -53
- package/types/masterteam-components-user-search-field.d.ts +0 -110
- package/types/masterteam-components.d.ts +0 -1261
|
@@ -0,0 +1,1095 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AfterViewInit,
|
|
3
|
+
ChangeDetectionStrategy,
|
|
4
|
+
Component,
|
|
5
|
+
ElementRef,
|
|
6
|
+
NgZone,
|
|
7
|
+
OnDestroy,
|
|
8
|
+
ViewEncapsulation,
|
|
9
|
+
computed,
|
|
10
|
+
effect,
|
|
11
|
+
forwardRef,
|
|
12
|
+
inject,
|
|
13
|
+
input,
|
|
14
|
+
output,
|
|
15
|
+
signal,
|
|
16
|
+
viewChild,
|
|
17
|
+
} from '@angular/core';
|
|
18
|
+
import { CommonModule, DOCUMENT } from '@angular/common';
|
|
19
|
+
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
20
|
+
import type * as Monaco from 'monaco-editor';
|
|
21
|
+
import {
|
|
22
|
+
firstValueFrom,
|
|
23
|
+
isObservable,
|
|
24
|
+
Observable,
|
|
25
|
+
Subject,
|
|
26
|
+
Subscription,
|
|
27
|
+
from,
|
|
28
|
+
of,
|
|
29
|
+
} from 'rxjs';
|
|
30
|
+
import { debounceTime, catchError, takeUntil, filter } from 'rxjs/operators';
|
|
31
|
+
import type { SmartBlock } from '../models/smart-block.model';
|
|
32
|
+
import type {
|
|
33
|
+
AutocompleteRequest,
|
|
34
|
+
AutocompleteResponse,
|
|
35
|
+
} from '../models/validation-result.model';
|
|
36
|
+
import { buildCompletionFilterText } from './formula-completion-suggestion.util';
|
|
37
|
+
import { normalizeAutocompleteSuggestion } from './formula-autocomplete-normalization.util';
|
|
38
|
+
import {
|
|
39
|
+
resolveCompletionRangeBounds,
|
|
40
|
+
type CompletionRangeSuggestion,
|
|
41
|
+
} from './formula-completion-range.util';
|
|
42
|
+
|
|
43
|
+
type AutocompleteProvider = (
|
|
44
|
+
request: AutocompleteRequest,
|
|
45
|
+
) =>
|
|
46
|
+
| AutocompleteResponse
|
|
47
|
+
| Promise<AutocompleteResponse | null>
|
|
48
|
+
| Observable<AutocompleteResponse | null>
|
|
49
|
+
| null;
|
|
50
|
+
|
|
51
|
+
type MonacoModule = typeof Monaco;
|
|
52
|
+
type LoadedMonaco = { monaco: MonacoModule; fromAssets: boolean };
|
|
53
|
+
|
|
54
|
+
/** Path (relative to the document base) where the host copies monaco `min/vs`. */
|
|
55
|
+
const MONACO_ASSET_DIR = 'assets/monaco/vs';
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Shared, lazily-resolved Monaco loader promise (module scope so every editor
|
|
59
|
+
* instance reuses a single load).
|
|
60
|
+
*/
|
|
61
|
+
let monacoLoadPromise: Promise<LoadedMonaco> | null = null;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Shared, body-level container for Monaco's overflow widgets (the suggest and
|
|
65
|
+
* hover popups). Monaco renders those with `position: fixed`, which is meant to
|
|
66
|
+
* resolve against the viewport — but a `transform` / `will-change: transform`
|
|
67
|
+
* on ANY ancestor turns that ancestor into the containing block, so a popup
|
|
68
|
+
* inside a transformed host lands at the wrong offset. This is exactly what
|
|
69
|
+
* breaks the suggest dropdown inside a PrimeNG dialog/drawer (`.p-dialog` /
|
|
70
|
+
* `.p-drawer` carry `transform: scale(1)`) and the foblex-flow canvas (`scale`).
|
|
71
|
+
*
|
|
72
|
+
* Pointing the editor's `overflowWidgetsDomNode` at a node appended straight to
|
|
73
|
+
* <body> — which has no transformed ancestor — makes `position: fixed` resolve
|
|
74
|
+
* against the viewport again, fixing every host at once instead of patching one
|
|
75
|
+
* container type. Created once and reused by every editor instance (Monaco
|
|
76
|
+
* appends and cleans up its own per-editor sub-nodes inside it), mirroring how
|
|
77
|
+
* VS Code shares a single overflow container.
|
|
78
|
+
*/
|
|
79
|
+
let monacoOverflowWidgetsNode: HTMLElement | null = null;
|
|
80
|
+
|
|
81
|
+
function resolveOverflowWidgetsNode(doc: Document): HTMLElement {
|
|
82
|
+
if (monacoOverflowWidgetsNode?.isConnected) {
|
|
83
|
+
return monacoOverflowWidgetsNode;
|
|
84
|
+
}
|
|
85
|
+
const node = doc.createElement('div');
|
|
86
|
+
// `monaco-editor` lets Monaco's global, theme-driven suggest/hover CSS match;
|
|
87
|
+
// `mt-formula-editor-overflow` carries our cosmetic tweaks + escape z-index.
|
|
88
|
+
node.className = 'monaco-editor mt-formula-editor-overflow';
|
|
89
|
+
doc.body.appendChild(node);
|
|
90
|
+
monacoOverflowWidgetsNode = node;
|
|
91
|
+
return node;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** Absolute URL to the copied Monaco `vs` folder, with no trailing slash. */
|
|
95
|
+
function resolveMonacoAssetBase(doc: Document): string {
|
|
96
|
+
return new URL(`${MONACO_ASSET_DIR}/`, doc.baseURI)
|
|
97
|
+
.toString()
|
|
98
|
+
.replace(/\/$/, '');
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Point Monaco's web workers at the copied assets via a tiny same-origin proxy
|
|
103
|
+
* worker. Loading workers from `/assets/monaco/vs` (instead of node_modules)
|
|
104
|
+
* avoids the Vite `@fs` serving-allow-list 403 and the "define
|
|
105
|
+
* MonacoEnvironment.getWorkerUrl" warning. Set once; respects a host-provided
|
|
106
|
+
* MonacoEnvironment if one already exists.
|
|
107
|
+
*/
|
|
108
|
+
function configureMonacoWorker(base: string): void {
|
|
109
|
+
const globalScope = self as unknown as {
|
|
110
|
+
MonacoEnvironment?: { getWorkerUrl?: unknown; getWorker?: unknown };
|
|
111
|
+
};
|
|
112
|
+
if (globalScope.MonacoEnvironment) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
globalScope.MonacoEnvironment = {
|
|
116
|
+
getWorkerUrl: (): string => {
|
|
117
|
+
const proxy =
|
|
118
|
+
`self.MonacoEnvironment={baseUrl:'${base}/'};` +
|
|
119
|
+
`importScripts('${base}/base/worker/workerMain.js');`;
|
|
120
|
+
return `data:text/javascript;charset=utf-8,${encodeURIComponent(proxy)}`;
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Load Monaco via its own AMD loader from `/assets/monaco/vs`. This is fully
|
|
127
|
+
* self-contained: `editor.main` injects its CSS and the codicon font from the
|
|
128
|
+
* same folder, and workers resolve from there too — so no editor CSS/font is
|
|
129
|
+
* pulled into the app bundle and there is no node_modules/`@fs` access at all.
|
|
130
|
+
*/
|
|
131
|
+
function loadMonacoFromAssets(
|
|
132
|
+
doc: Document,
|
|
133
|
+
base: string,
|
|
134
|
+
): Promise<LoadedMonaco> {
|
|
135
|
+
return new Promise<LoadedMonaco>((resolve, reject) => {
|
|
136
|
+
const globalScope = window as unknown as {
|
|
137
|
+
monaco?: MonacoModule;
|
|
138
|
+
require?: {
|
|
139
|
+
(deps: string[], onOk: () => void, onErr?: (e: unknown) => void): void;
|
|
140
|
+
config?: (options: { paths: Record<string, string> }) => void;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
if (globalScope.monaco) {
|
|
145
|
+
resolve({ monaco: globalScope.monaco, fromAssets: true });
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const startRequire = (): void => {
|
|
150
|
+
const amdRequire = globalScope.require;
|
|
151
|
+
if (!amdRequire?.config) {
|
|
152
|
+
reject(new Error('Monaco AMD loader is unavailable'));
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
configureMonacoWorker(base);
|
|
156
|
+
amdRequire.config({ paths: { vs: base } });
|
|
157
|
+
amdRequire(
|
|
158
|
+
['vs/editor/editor.main'],
|
|
159
|
+
() =>
|
|
160
|
+
globalScope.monaco
|
|
161
|
+
? resolve({ monaco: globalScope.monaco, fromAssets: true })
|
|
162
|
+
: reject(new Error('Monaco did not initialize')),
|
|
163
|
+
(error: unknown) => reject(error),
|
|
164
|
+
);
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
if (globalScope.require?.config) {
|
|
168
|
+
startRequire();
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
const existing = doc.querySelector<HTMLScriptElement>(
|
|
173
|
+
'script[data-mt-monaco-loader]',
|
|
174
|
+
);
|
|
175
|
+
if (existing) {
|
|
176
|
+
existing.addEventListener('load', startRequire, { once: true });
|
|
177
|
+
existing.addEventListener(
|
|
178
|
+
'error',
|
|
179
|
+
() => reject(new Error('Monaco loader failed to load')),
|
|
180
|
+
{ once: true },
|
|
181
|
+
);
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
const script = doc.createElement('script');
|
|
186
|
+
script.src = `${base}/loader.js`;
|
|
187
|
+
script.async = true;
|
|
188
|
+
script.dataset['mtMonacoLoader'] = 'true';
|
|
189
|
+
script.addEventListener('load', startRequire, { once: true });
|
|
190
|
+
script.addEventListener(
|
|
191
|
+
'error',
|
|
192
|
+
() => reject(new Error('Monaco loader failed to load')),
|
|
193
|
+
{ once: true },
|
|
194
|
+
);
|
|
195
|
+
doc.head.appendChild(script);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Resolve Monaco once, preferring the self-contained assets loader and falling
|
|
201
|
+
* back to the bundled ESM build if `/assets/monaco/vs` is unavailable (so hosts
|
|
202
|
+
* that do not copy `min/vs` keep working, just without the asset-served CSS).
|
|
203
|
+
*/
|
|
204
|
+
function loadMonaco(doc: Document): Promise<LoadedMonaco> {
|
|
205
|
+
if (monacoLoadPromise) {
|
|
206
|
+
return monacoLoadPromise;
|
|
207
|
+
}
|
|
208
|
+
const base = resolveMonacoAssetBase(doc);
|
|
209
|
+
monacoLoadPromise = loadMonacoFromAssets(doc, base).catch(async (error) => {
|
|
210
|
+
console.warn(
|
|
211
|
+
`[mt-formula-editor-code] Could not load Monaco from ${base}; falling back ` +
|
|
212
|
+
`to the bundled monaco-editor. Copy "node_modules/monaco-editor/min/vs/" ` +
|
|
213
|
+
`to "/assets/monaco/vs/" in the host app's angular.json for the ` +
|
|
214
|
+
`self-contained loader (CSS, codicon font, and workers from assets).`,
|
|
215
|
+
error,
|
|
216
|
+
);
|
|
217
|
+
const monaco = (await import('monaco-editor')) as unknown as MonacoModule;
|
|
218
|
+
return { monaco, fromAssets: false };
|
|
219
|
+
});
|
|
220
|
+
return monacoLoadPromise;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
@Component({
|
|
224
|
+
selector: 'mt-formula-editor-code',
|
|
225
|
+
standalone: true,
|
|
226
|
+
imports: [CommonModule],
|
|
227
|
+
templateUrl: './formula-editor-code.html',
|
|
228
|
+
styleUrls: ['./formula-editor-code.scss'],
|
|
229
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
230
|
+
encapsulation: ViewEncapsulation.None,
|
|
231
|
+
host: {
|
|
232
|
+
class: 'block mt-formula-editor-code',
|
|
233
|
+
},
|
|
234
|
+
providers: [
|
|
235
|
+
{
|
|
236
|
+
provide: NG_VALUE_ACCESSOR,
|
|
237
|
+
useExisting: forwardRef(() => FormulaEditorCode),
|
|
238
|
+
multi: true,
|
|
239
|
+
},
|
|
240
|
+
],
|
|
241
|
+
})
|
|
242
|
+
export class FormulaEditorCode
|
|
243
|
+
implements ControlValueAccessor, AfterViewInit, OnDestroy
|
|
244
|
+
{
|
|
245
|
+
readonly placeholder = input('Enter formula...');
|
|
246
|
+
readonly initialFormula = input('');
|
|
247
|
+
readonly disabled = input(false);
|
|
248
|
+
readonly language = input('formula');
|
|
249
|
+
readonly theme = input<
|
|
250
|
+
'vs' | 'vs-dark' | 'hc-black' | 'formula-light' | 'formula-dark'
|
|
251
|
+
>('formula-light');
|
|
252
|
+
readonly borderless = input(false);
|
|
253
|
+
readonly autocompleteProvider = input<AutocompleteProvider | null>(null);
|
|
254
|
+
readonly autocompleteDebounceMs = input(150);
|
|
255
|
+
|
|
256
|
+
readonly formulaChange = output<string>();
|
|
257
|
+
readonly onBlur = output<void>();
|
|
258
|
+
readonly onFocus = output<void>();
|
|
259
|
+
|
|
260
|
+
private readonly editorHost =
|
|
261
|
+
viewChild<ElementRef<HTMLDivElement>>('editorHost');
|
|
262
|
+
private readonly zone = inject(NgZone);
|
|
263
|
+
private readonly document = inject(DOCUMENT);
|
|
264
|
+
|
|
265
|
+
private monaco: typeof Monaco | null = null;
|
|
266
|
+
private editor: Monaco.editor.IStandaloneCodeEditor | null = null;
|
|
267
|
+
private model: Monaco.editor.ITextModel | null = null;
|
|
268
|
+
private readonly disposables: Monaco.IDisposable[] = [];
|
|
269
|
+
private resizeObserver: ResizeObserver | null = null;
|
|
270
|
+
private completionProvider: Monaco.IDisposable | null = null;
|
|
271
|
+
|
|
272
|
+
// Autocomplete state - using RxJS for proper debounce and cancellation
|
|
273
|
+
private readonly autocompleteSubject = new Subject<void>();
|
|
274
|
+
private autocompleteSubscription: Subscription | null = null;
|
|
275
|
+
private readonly cancelAutocomplete$ = new Subject<void>();
|
|
276
|
+
private currentAutocompleteRequestId = 0;
|
|
277
|
+
|
|
278
|
+
private static formulaAssetsReady = false;
|
|
279
|
+
private static monacoStylesReady = false;
|
|
280
|
+
|
|
281
|
+
readonly value = signal('');
|
|
282
|
+
readonly isFocused = signal(false);
|
|
283
|
+
readonly showPlaceholder = computed(
|
|
284
|
+
() => this.value().length === 0 && !this.isFocused(),
|
|
285
|
+
);
|
|
286
|
+
readonly containerClasses = computed(() => {
|
|
287
|
+
const base =
|
|
288
|
+
'relative flex min-h-20 flex-col bg-white dark:bg-surface-800 font-mono text-sm';
|
|
289
|
+
if (this.borderless()) {
|
|
290
|
+
return base;
|
|
291
|
+
}
|
|
292
|
+
return `${base} rounded-md border border-surface-200 dark:border-surface-700 focus-within:border-primary focus-within:ring-2 focus-within:ring-primary/10`;
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
private hasWrittenValue = false;
|
|
296
|
+
private isApplyingExternalValue = false;
|
|
297
|
+
|
|
298
|
+
private onChange: (value: string) => void = () => {};
|
|
299
|
+
private onTouched: () => void = () => {};
|
|
300
|
+
|
|
301
|
+
constructor() {
|
|
302
|
+
effect(() => {
|
|
303
|
+
const initial = this.initialFormula();
|
|
304
|
+
if (!this.hasWrittenValue && this.value().length === 0 && initial) {
|
|
305
|
+
this.value.set(initial);
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
effect(() => {
|
|
310
|
+
const readOnly = this.disabled();
|
|
311
|
+
if (this.editor) {
|
|
312
|
+
this.editor.updateOptions({ readOnly });
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
effect(() => {
|
|
317
|
+
const theme = this.theme();
|
|
318
|
+
if (this.monaco) {
|
|
319
|
+
this.monaco.editor.setTheme(theme);
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
|
|
323
|
+
effect(() => {
|
|
324
|
+
const language = this.language();
|
|
325
|
+
if (this.monaco && this.model) {
|
|
326
|
+
this.ensureFormulaAssets(this.monaco);
|
|
327
|
+
this.monaco.editor.setModelLanguage(this.model, language);
|
|
328
|
+
// Completion provider is registered in the autocompleteProvider effect
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
effect(() => {
|
|
333
|
+
// Track both language and provider changes - reading signals to subscribe
|
|
334
|
+
const _provider = this.autocompleteProvider();
|
|
335
|
+
const language = this.language();
|
|
336
|
+
if (this.monaco && language) {
|
|
337
|
+
this.registerCompletionProvider();
|
|
338
|
+
}
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
ngAfterViewInit(): void {
|
|
343
|
+
this.zone.runOutsideAngular(() => {
|
|
344
|
+
void this.initEditor();
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
ngOnDestroy(): void {
|
|
349
|
+
this.resizeObserver?.disconnect();
|
|
350
|
+
|
|
351
|
+
// Cancel any pending autocomplete
|
|
352
|
+
this.cancelAutocomplete$.next();
|
|
353
|
+
this.cancelAutocomplete$.complete();
|
|
354
|
+
this.autocompleteSubject.complete();
|
|
355
|
+
this.autocompleteSubscription?.unsubscribe();
|
|
356
|
+
|
|
357
|
+
if (this.completionProvider) {
|
|
358
|
+
this.completionProvider.dispose();
|
|
359
|
+
this.completionProvider = null;
|
|
360
|
+
}
|
|
361
|
+
this.disposables.forEach((disposable) => disposable.dispose());
|
|
362
|
+
this.editor?.dispose();
|
|
363
|
+
this.model?.dispose();
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
writeValue(value: string | null): void {
|
|
367
|
+
this.hasWrittenValue = true;
|
|
368
|
+
const next = value ?? '';
|
|
369
|
+
this.value.set(next);
|
|
370
|
+
this.syncEditorValue(next);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
registerOnChange(fn: (value: string) => void): void {
|
|
374
|
+
this.onChange = fn;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
registerOnTouched(fn: () => void): void {
|
|
378
|
+
this.onTouched = fn;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
addBlock(block: SmartBlock): void {
|
|
382
|
+
if (this.disabled()) return;
|
|
383
|
+
const { text, cursorOffset } = this.smartBlockToText(block);
|
|
384
|
+
this.insertText(text, cursorOffset);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
insertText(text: string, cursorOffset: number = 0): void {
|
|
388
|
+
if (this.disabled()) return;
|
|
389
|
+
|
|
390
|
+
if (!this.editor || !this.model || !this.monaco) {
|
|
391
|
+
const next = `${this.value()}${text}`;
|
|
392
|
+
this.emitValue(next);
|
|
393
|
+
return;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
const selection =
|
|
397
|
+
this.editor.getSelection() ?? new this.monaco.Selection(1, 1, 1, 1);
|
|
398
|
+
|
|
399
|
+
this.editor.executeEdits('formula-editor-code', [
|
|
400
|
+
{ range: selection, text, forceMoveMarkers: true },
|
|
401
|
+
]);
|
|
402
|
+
|
|
403
|
+
const startOffset = this.model.getOffsetAt(selection.getStartPosition());
|
|
404
|
+
const nextOffset = Math.max(
|
|
405
|
+
0,
|
|
406
|
+
Math.min(
|
|
407
|
+
startOffset + text.length + cursorOffset,
|
|
408
|
+
this.model.getValueLength(),
|
|
409
|
+
),
|
|
410
|
+
);
|
|
411
|
+
const nextPos = this.model.getPositionAt(nextOffset);
|
|
412
|
+
this.editor.setSelection(
|
|
413
|
+
new this.monaco.Selection(
|
|
414
|
+
nextPos.lineNumber,
|
|
415
|
+
nextPos.column,
|
|
416
|
+
nextPos.lineNumber,
|
|
417
|
+
nextPos.column,
|
|
418
|
+
),
|
|
419
|
+
);
|
|
420
|
+
this.editor.focus();
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
clear(): void {
|
|
424
|
+
if (this.disabled()) return;
|
|
425
|
+
if (this.model) {
|
|
426
|
+
this.isApplyingExternalValue = true;
|
|
427
|
+
this.model.setValue('');
|
|
428
|
+
this.isApplyingExternalValue = false;
|
|
429
|
+
}
|
|
430
|
+
this.emitValue('');
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
getValue(): string {
|
|
434
|
+
return this.value();
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
private async initEditor(): Promise<void> {
|
|
438
|
+
const host = this.editorHost()?.nativeElement;
|
|
439
|
+
if (!host) return;
|
|
440
|
+
|
|
441
|
+
let loaded: LoadedMonaco;
|
|
442
|
+
try {
|
|
443
|
+
loaded = await loadMonaco(this.document);
|
|
444
|
+
} catch (error) {
|
|
445
|
+
console.warn('Failed to load Monaco editor:', error);
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
const monaco = loaded.monaco;
|
|
450
|
+
// The assets (AMD) path injects its own CSS + codicon font from
|
|
451
|
+
// /assets/monaco/vs. Only the bundled ESM fallback needs the manual link.
|
|
452
|
+
if (!loaded.fromAssets) {
|
|
453
|
+
this.ensureMonacoStylesLoaded();
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
this.monaco = monaco;
|
|
457
|
+
this.ensureFormulaAssets(monaco);
|
|
458
|
+
|
|
459
|
+
const model = monaco.editor.createModel(this.value(), this.language());
|
|
460
|
+
this.model = model;
|
|
461
|
+
|
|
462
|
+
const editor = monaco.editor.create(host, {
|
|
463
|
+
model,
|
|
464
|
+
theme: this.theme(),
|
|
465
|
+
readOnly: this.disabled(),
|
|
466
|
+
minimap: { enabled: false },
|
|
467
|
+
scrollBeyondLastLine: false,
|
|
468
|
+
wordWrap: 'on',
|
|
469
|
+
fontSize: 14,
|
|
470
|
+
lineHeight: 21,
|
|
471
|
+
lineNumbers: 'on',
|
|
472
|
+
lineNumbersMinChars: 3,
|
|
473
|
+
lineDecorationsWidth: 10,
|
|
474
|
+
glyphMargin: false,
|
|
475
|
+
automaticLayout: true,
|
|
476
|
+
fixedOverflowWidgets: true,
|
|
477
|
+
// Render suggest/hover popups in a body-level node so their
|
|
478
|
+
// `position: fixed` resolves against the viewport, not a transformed
|
|
479
|
+
// ancestor (PrimeNG dialog/drawer, foblex-flow canvas). See
|
|
480
|
+
// resolveOverflowWidgetsNode above.
|
|
481
|
+
overflowWidgetsDomNode: resolveOverflowWidgetsNode(this.document),
|
|
482
|
+
suggestOnTriggerCharacters: true,
|
|
483
|
+
quickSuggestions: { other: true, comments: false, strings: true },
|
|
484
|
+
renderLineHighlight: 'line',
|
|
485
|
+
matchBrackets: 'always',
|
|
486
|
+
bracketPairColorization: { enabled: true },
|
|
487
|
+
padding: { top: 4, bottom: 4 },
|
|
488
|
+
fontFamily: "Consolas, 'Courier New', monospace",
|
|
489
|
+
fontLigatures: false,
|
|
490
|
+
cursorBlinking: 'blink',
|
|
491
|
+
cursorStyle: 'line',
|
|
492
|
+
cursorWidth: 2,
|
|
493
|
+
renderWhitespace: 'selection',
|
|
494
|
+
folding: false,
|
|
495
|
+
occurrencesHighlight: 'singleFile',
|
|
496
|
+
selectionHighlight: true,
|
|
497
|
+
roundedSelection: true,
|
|
498
|
+
smoothScrolling: true,
|
|
499
|
+
mouseWheelZoom: false,
|
|
500
|
+
contextmenu: true,
|
|
501
|
+
scrollbar: {
|
|
502
|
+
vertical: 'auto',
|
|
503
|
+
horizontal: 'auto',
|
|
504
|
+
verticalScrollbarSize: 14,
|
|
505
|
+
horizontalScrollbarSize: 10,
|
|
506
|
+
useShadows: false,
|
|
507
|
+
},
|
|
508
|
+
});
|
|
509
|
+
|
|
510
|
+
this.editor = editor;
|
|
511
|
+
this.attachEditorListeners(editor, model);
|
|
512
|
+
this.setupResizeObserver(host, editor);
|
|
513
|
+
this.registerCompletionProvider();
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
private ensureMonacoStylesLoaded(): void {
|
|
517
|
+
if (FormulaEditorCode.monacoStylesReady) {
|
|
518
|
+
return;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
const doc = this.document;
|
|
522
|
+
if (!doc?.head) {
|
|
523
|
+
return;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
const existing = doc.head.querySelector(
|
|
527
|
+
'link[data-mt-monaco-style="editor-main"]',
|
|
528
|
+
);
|
|
529
|
+
if (existing) {
|
|
530
|
+
FormulaEditorCode.monacoStylesReady = true;
|
|
531
|
+
return;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
// Monaco assets are copied by the app to /assets/monaco/vs/.
|
|
535
|
+
const stylesheetHref = new URL(
|
|
536
|
+
'assets/monaco/vs/editor/editor.main.css',
|
|
537
|
+
doc.baseURI,
|
|
538
|
+
).toString();
|
|
539
|
+
|
|
540
|
+
const link = doc.createElement('link');
|
|
541
|
+
link.rel = 'stylesheet';
|
|
542
|
+
link.href = stylesheetHref;
|
|
543
|
+
link.dataset['mtMonacoStyle'] = 'editor-main';
|
|
544
|
+
link.onerror = () => {
|
|
545
|
+
console.warn(
|
|
546
|
+
`[mt-formula-editor-code] Failed to load Monaco stylesheet at ${stylesheetHref}. ` +
|
|
547
|
+
`The editor will render without styles. Ensure the host app installs "monaco-editor" ` +
|
|
548
|
+
`and copies "node_modules/monaco-editor/min/vs/" to "/assets/monaco/vs/" in angular.json.`,
|
|
549
|
+
);
|
|
550
|
+
};
|
|
551
|
+
doc.head.appendChild(link);
|
|
552
|
+
|
|
553
|
+
FormulaEditorCode.monacoStylesReady = true;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
private ensureFormulaAssets(monaco: typeof Monaco): void {
|
|
557
|
+
if (FormulaEditorCode.formulaAssetsReady) return;
|
|
558
|
+
|
|
559
|
+
monaco.languages.register({ id: 'formula' });
|
|
560
|
+
monaco.languages.setMonarchTokensProvider('formula', {
|
|
561
|
+
keywords: ['true', 'false', 'null'],
|
|
562
|
+
operators: [
|
|
563
|
+
'==',
|
|
564
|
+
'!=',
|
|
565
|
+
'>=',
|
|
566
|
+
'<=',
|
|
567
|
+
'>',
|
|
568
|
+
'<',
|
|
569
|
+
'+',
|
|
570
|
+
'-',
|
|
571
|
+
'*',
|
|
572
|
+
'/',
|
|
573
|
+
'%',
|
|
574
|
+
'^',
|
|
575
|
+
'&&',
|
|
576
|
+
'||',
|
|
577
|
+
'!',
|
|
578
|
+
],
|
|
579
|
+
symbols: /[=><!~?:&|+\-*/^%]+/,
|
|
580
|
+
tokenizer: {
|
|
581
|
+
root: [
|
|
582
|
+
[/@[a-zA-Z_][\w.]*::[\w_]+/, 'type.identifier'],
|
|
583
|
+
[/@[a-zA-Z_][\w.]*/, 'type.identifier'],
|
|
584
|
+
[/\b[A-Z_][A-Z0-9_]*\b/, 'function'],
|
|
585
|
+
[
|
|
586
|
+
/[a-zA-Z_][\w_]*/,
|
|
587
|
+
{
|
|
588
|
+
cases: {
|
|
589
|
+
'@keywords': 'keyword',
|
|
590
|
+
'@default': 'identifier',
|
|
591
|
+
},
|
|
592
|
+
},
|
|
593
|
+
],
|
|
594
|
+
[/[0-9]+(\.[0-9]+)?/, 'number'],
|
|
595
|
+
[/"/, { token: 'string.quote', bracket: '@open', next: '@string' }],
|
|
596
|
+
[/'[^'\\]*(?:\\.[^'\\]*)*'/, 'string'],
|
|
597
|
+
[/@symbols/, { cases: { '@operators': 'operator', '@default': '' } }],
|
|
598
|
+
[/[()[\]{}]/, '@brackets'],
|
|
599
|
+
[/[;,.]/, 'delimiter'],
|
|
600
|
+
{ include: '@whitespace' },
|
|
601
|
+
],
|
|
602
|
+
whitespace: [
|
|
603
|
+
[/\s+/, 'white'],
|
|
604
|
+
[/\/\/.*$/, 'comment'],
|
|
605
|
+
[/\/\*/, 'comment', '@comment'],
|
|
606
|
+
],
|
|
607
|
+
comment: [
|
|
608
|
+
[/[^/*]+/, 'comment'],
|
|
609
|
+
[/\*\//, 'comment', '@pop'],
|
|
610
|
+
[/[/*]/, 'comment'],
|
|
611
|
+
],
|
|
612
|
+
string: [
|
|
613
|
+
[/[^\\"]+/, 'string'],
|
|
614
|
+
[/\\./, 'string.escape'],
|
|
615
|
+
[/"/, { token: 'string.quote', bracket: '@close', next: '@pop' }],
|
|
616
|
+
],
|
|
617
|
+
},
|
|
618
|
+
});
|
|
619
|
+
|
|
620
|
+
monaco.languages.setLanguageConfiguration('formula', {
|
|
621
|
+
brackets: [
|
|
622
|
+
['{', '}'],
|
|
623
|
+
['[', ']'],
|
|
624
|
+
['(', ')'],
|
|
625
|
+
],
|
|
626
|
+
autoClosingPairs: [
|
|
627
|
+
{ open: '{', close: '}' },
|
|
628
|
+
{ open: '[', close: ']' },
|
|
629
|
+
{ open: '(', close: ')' },
|
|
630
|
+
{ open: '"', close: '"' },
|
|
631
|
+
{ open: "'", close: "'" },
|
|
632
|
+
],
|
|
633
|
+
surroundingPairs: [
|
|
634
|
+
{ open: '{', close: '}' },
|
|
635
|
+
{ open: '[', close: ']' },
|
|
636
|
+
{ open: '(', close: ')' },
|
|
637
|
+
{ open: '"', close: '"' },
|
|
638
|
+
{ open: "'", close: "'" },
|
|
639
|
+
],
|
|
640
|
+
});
|
|
641
|
+
|
|
642
|
+
monaco.editor.defineTheme('formula-light', {
|
|
643
|
+
base: 'vs',
|
|
644
|
+
inherit: true,
|
|
645
|
+
rules: [
|
|
646
|
+
// VS Code Light+ token colors
|
|
647
|
+
{ token: 'function', foreground: '795E26', fontStyle: 'bold' },
|
|
648
|
+
{ token: 'type.identifier', foreground: '267F99' },
|
|
649
|
+
{ token: 'keyword', foreground: '0000FF', fontStyle: 'bold' },
|
|
650
|
+
{ token: 'number', foreground: '098658' },
|
|
651
|
+
{ token: 'string', foreground: 'A31515' },
|
|
652
|
+
{ token: 'string.escape', foreground: 'EE0000' },
|
|
653
|
+
{ token: 'operator', foreground: '000000' },
|
|
654
|
+
{ token: 'delimiter', foreground: '000000' },
|
|
655
|
+
{ token: 'comment', foreground: '008000', fontStyle: 'italic' },
|
|
656
|
+
{ token: 'identifier', foreground: '001080' },
|
|
657
|
+
{ token: 'variable', foreground: '001080' },
|
|
658
|
+
],
|
|
659
|
+
colors: {
|
|
660
|
+
// Editor core
|
|
661
|
+
'editor.background': '#FFFFFF',
|
|
662
|
+
'editor.foreground': '#000000',
|
|
663
|
+
'editorCursor.foreground': '#000000',
|
|
664
|
+
// Line numbers
|
|
665
|
+
'editorLineNumber.foreground': '#237893',
|
|
666
|
+
'editorLineNumber.activeForeground': '#0B216F',
|
|
667
|
+
// Line highlight
|
|
668
|
+
'editorLineHighlight.background': '#00000000',
|
|
669
|
+
'editorLineHighlight.border': '#EEF0F1',
|
|
670
|
+
// Selection
|
|
671
|
+
'editor.selectionBackground': '#ADD6FF',
|
|
672
|
+
'editor.inactiveSelectionBackground': '#E5EBF1',
|
|
673
|
+
'editor.selectionHighlightBackground': '#ADD6FF80',
|
|
674
|
+
// Word highlight (when cursor is on a word/function)
|
|
675
|
+
'editor.wordHighlightBackground': '#57575740',
|
|
676
|
+
'editor.wordHighlightStrongBackground': '#0E639C40',
|
|
677
|
+
'editor.wordHighlightBorder': '#595959',
|
|
678
|
+
'editor.wordHighlightStrongBorder': '#0E639C',
|
|
679
|
+
// Find match
|
|
680
|
+
'editor.findMatchBackground': '#A8AC94',
|
|
681
|
+
'editor.findMatchHighlightBackground': '#EA5C0055',
|
|
682
|
+
// Bracket matching
|
|
683
|
+
'editorBracketMatch.background': '#0064001A',
|
|
684
|
+
'editorBracketMatch.border': '#B9B9B9',
|
|
685
|
+
// Indent guides
|
|
686
|
+
'editorIndentGuide.background': '#D3D3D3',
|
|
687
|
+
'editorIndentGuide.activeBackground': '#939393',
|
|
688
|
+
// Gutter
|
|
689
|
+
'editorGutter.background': '#FFFFFF',
|
|
690
|
+
// Suggest widget
|
|
691
|
+
'editorSuggestWidget.background': '#F3F3F3',
|
|
692
|
+
'editorSuggestWidget.border': '#C8C8C8',
|
|
693
|
+
'editorSuggestWidget.foreground': '#000000',
|
|
694
|
+
'editorSuggestWidget.selectedBackground': '#0060C0',
|
|
695
|
+
'editorSuggestWidget.selectedForeground': '#FFFFFF',
|
|
696
|
+
'editorSuggestWidget.highlightForeground': '#0066BF',
|
|
697
|
+
'editorSuggestWidget.focusHighlightForeground': '#FFFFFF',
|
|
698
|
+
// Hover widget
|
|
699
|
+
'editorHoverWidget.background': '#F3F3F3',
|
|
700
|
+
'editorHoverWidget.border': '#C8C8C8',
|
|
701
|
+
'editorHoverWidget.foreground': '#000000',
|
|
702
|
+
// Generic widget
|
|
703
|
+
'editorWidget.background': '#F3F3F3',
|
|
704
|
+
'editorWidget.border': '#C8C8C8',
|
|
705
|
+
// Scrollbar
|
|
706
|
+
'scrollbarSlider.background': '#64646433',
|
|
707
|
+
'scrollbarSlider.hoverBackground': '#646464B3',
|
|
708
|
+
'scrollbarSlider.activeBackground': '#646464B3',
|
|
709
|
+
},
|
|
710
|
+
});
|
|
711
|
+
|
|
712
|
+
monaco.editor.defineTheme('formula-dark', {
|
|
713
|
+
base: 'vs-dark',
|
|
714
|
+
inherit: true,
|
|
715
|
+
rules: [
|
|
716
|
+
// VS Code Dark+ token colors
|
|
717
|
+
{ token: 'function', foreground: 'DCDCAA', fontStyle: 'bold' },
|
|
718
|
+
{ token: 'type.identifier', foreground: '4EC9B0' },
|
|
719
|
+
{ token: 'keyword', foreground: '569CD6', fontStyle: 'bold' },
|
|
720
|
+
{ token: 'number', foreground: 'B5CEA8' },
|
|
721
|
+
{ token: 'string', foreground: 'CE9178' },
|
|
722
|
+
{ token: 'string.escape', foreground: 'D7BA7D' },
|
|
723
|
+
{ token: 'operator', foreground: 'D4D4D4' },
|
|
724
|
+
{ token: 'delimiter', foreground: 'D4D4D4' },
|
|
725
|
+
{ token: 'comment', foreground: '6A9955', fontStyle: 'italic' },
|
|
726
|
+
{ token: 'identifier', foreground: '9CDCFE' },
|
|
727
|
+
{ token: 'variable', foreground: '9CDCFE' },
|
|
728
|
+
],
|
|
729
|
+
colors: {
|
|
730
|
+
// Editor core
|
|
731
|
+
'editor.background': '#1E1E1E',
|
|
732
|
+
'editor.foreground': '#D4D4D4',
|
|
733
|
+
'editorCursor.foreground': '#AEAFAD',
|
|
734
|
+
// Line numbers
|
|
735
|
+
'editorLineNumber.foreground': '#858585',
|
|
736
|
+
'editorLineNumber.activeForeground': '#C6C6C6',
|
|
737
|
+
// Line highlight
|
|
738
|
+
'editorLineHighlight.background': '#2A2D2E',
|
|
739
|
+
'editorLineHighlight.border': '#282828',
|
|
740
|
+
// Selection
|
|
741
|
+
'editor.selectionBackground': '#264F78',
|
|
742
|
+
'editor.inactiveSelectionBackground': '#3A3D41',
|
|
743
|
+
'editor.selectionHighlightBackground': '#ADD6FF26',
|
|
744
|
+
// Word highlight (when cursor is on a word/function)
|
|
745
|
+
'editor.wordHighlightBackground': '#575757B3',
|
|
746
|
+
'editor.wordHighlightStrongBackground': '#004972B3',
|
|
747
|
+
'editor.wordHighlightBorder': '#858585',
|
|
748
|
+
'editor.wordHighlightStrongBorder': '#007ACC',
|
|
749
|
+
// Find match
|
|
750
|
+
'editor.findMatchBackground': '#515C6A',
|
|
751
|
+
'editor.findMatchHighlightBackground': '#EA5C0055',
|
|
752
|
+
// Bracket matching
|
|
753
|
+
'editorBracketMatch.background': '#0064001A',
|
|
754
|
+
'editorBracketMatch.border': '#888888',
|
|
755
|
+
// Indent guides
|
|
756
|
+
'editorIndentGuide.background': '#404040',
|
|
757
|
+
'editorIndentGuide.activeBackground': '#707070',
|
|
758
|
+
// Gutter
|
|
759
|
+
'editorGutter.background': '#1E1E1E',
|
|
760
|
+
// Suggest widget
|
|
761
|
+
'editorSuggestWidget.background': '#252526',
|
|
762
|
+
'editorSuggestWidget.border': '#454545',
|
|
763
|
+
'editorSuggestWidget.foreground': '#D4D4D4',
|
|
764
|
+
'editorSuggestWidget.selectedBackground': '#04395E',
|
|
765
|
+
'editorSuggestWidget.selectedForeground': '#FFFFFF',
|
|
766
|
+
'editorSuggestWidget.highlightForeground': '#18A3FF',
|
|
767
|
+
'editorSuggestWidget.focusHighlightForeground': '#18A3FF',
|
|
768
|
+
// Hover widget
|
|
769
|
+
'editorHoverWidget.background': '#252526',
|
|
770
|
+
'editorHoverWidget.border': '#454545',
|
|
771
|
+
'editorHoverWidget.foreground': '#D4D4D4',
|
|
772
|
+
// Generic widget
|
|
773
|
+
'editorWidget.background': '#252526',
|
|
774
|
+
'editorWidget.border': '#454545',
|
|
775
|
+
// Scrollbar
|
|
776
|
+
'scrollbarSlider.background': '#79797966',
|
|
777
|
+
'scrollbarSlider.hoverBackground': '#646464B3',
|
|
778
|
+
'scrollbarSlider.activeBackground': '#BFBFBF66',
|
|
779
|
+
},
|
|
780
|
+
});
|
|
781
|
+
|
|
782
|
+
FormulaEditorCode.formulaAssetsReady = true;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
private attachEditorListeners(
|
|
786
|
+
editor: Monaco.editor.IStandaloneCodeEditor,
|
|
787
|
+
model: Monaco.editor.ITextModel,
|
|
788
|
+
): void {
|
|
789
|
+
this.disposables.push(
|
|
790
|
+
model.onDidChangeContent(() => {
|
|
791
|
+
if (this.isApplyingExternalValue) return;
|
|
792
|
+
const next = model.getValue();
|
|
793
|
+
this.emitValue(next);
|
|
794
|
+
this.scheduleAutocomplete();
|
|
795
|
+
}),
|
|
796
|
+
editor.onDidFocusEditorText(() => {
|
|
797
|
+
this.zone.run(() => {
|
|
798
|
+
this.isFocused.set(true);
|
|
799
|
+
this.onFocus.emit();
|
|
800
|
+
});
|
|
801
|
+
}),
|
|
802
|
+
editor.onDidBlurEditorText(() => {
|
|
803
|
+
this.zone.run(() => {
|
|
804
|
+
this.isFocused.set(false);
|
|
805
|
+
this.onTouched();
|
|
806
|
+
this.onBlur.emit();
|
|
807
|
+
});
|
|
808
|
+
}),
|
|
809
|
+
);
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
private setupResizeObserver(
|
|
813
|
+
host: HTMLDivElement,
|
|
814
|
+
editor: Monaco.editor.IStandaloneCodeEditor,
|
|
815
|
+
): void {
|
|
816
|
+
if (typeof ResizeObserver === 'undefined') return;
|
|
817
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
818
|
+
editor.layout();
|
|
819
|
+
});
|
|
820
|
+
this.resizeObserver.observe(host);
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
private scheduleAutocomplete(): void {
|
|
824
|
+
if (!this.editor || !this.autocompleteProvider()) return;
|
|
825
|
+
// Emit to subject - debouncing is handled in setupAutocompleteStream
|
|
826
|
+
this.autocompleteSubject.next();
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
private setupAutocompleteStream(): void {
|
|
830
|
+
// Clean up previous subscription
|
|
831
|
+
this.autocompleteSubscription?.unsubscribe();
|
|
832
|
+
|
|
833
|
+
const debounceMs = Math.max(0, this.autocompleteDebounceMs());
|
|
834
|
+
|
|
835
|
+
this.autocompleteSubscription = this.autocompleteSubject
|
|
836
|
+
.pipe(
|
|
837
|
+
debounceTime(debounceMs),
|
|
838
|
+
filter(() => !!this.editor && !!this.autocompleteProvider()),
|
|
839
|
+
)
|
|
840
|
+
.subscribe(() => {
|
|
841
|
+
// Trigger Monaco's suggest widget - this will call provideCompletionItems
|
|
842
|
+
this.editor?.trigger(
|
|
843
|
+
'formula-editor-code',
|
|
844
|
+
'editor.action.triggerSuggest',
|
|
845
|
+
{},
|
|
846
|
+
);
|
|
847
|
+
});
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
private registerCompletionProvider(): void {
|
|
851
|
+
if (!this.monaco) return;
|
|
852
|
+
|
|
853
|
+
// Clean up previous provider
|
|
854
|
+
if (this.completionProvider) {
|
|
855
|
+
this.completionProvider.dispose();
|
|
856
|
+
this.completionProvider = null;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
const provider = this.autocompleteProvider();
|
|
860
|
+
if (!provider) return;
|
|
861
|
+
|
|
862
|
+
const language = this.language();
|
|
863
|
+
|
|
864
|
+
// Setup the autocomplete stream for debouncing
|
|
865
|
+
this.setupAutocompleteStream();
|
|
866
|
+
|
|
867
|
+
this.completionProvider =
|
|
868
|
+
this.monaco.languages.registerCompletionItemProvider(language, {
|
|
869
|
+
triggerCharacters: ['@', '.', ':', '(', ',', ' '],
|
|
870
|
+
provideCompletionItems: async (model, position) => {
|
|
871
|
+
// Cancel any previous in-flight request
|
|
872
|
+
this.cancelAutocomplete$.next();
|
|
873
|
+
|
|
874
|
+
// Generate unique request ID
|
|
875
|
+
const requestId = ++this.currentAutocompleteRequestId;
|
|
876
|
+
const cursorPosition = model.getOffsetAt(position);
|
|
877
|
+
const formula = model.getValue();
|
|
878
|
+
|
|
879
|
+
try {
|
|
880
|
+
const response = await this.resolveAutocompleteResponse(
|
|
881
|
+
provider,
|
|
882
|
+
{ formula, cursorPosition },
|
|
883
|
+
requestId,
|
|
884
|
+
);
|
|
885
|
+
|
|
886
|
+
// Check if this request is still the current one
|
|
887
|
+
if (!response || requestId !== this.currentAutocompleteRequestId) {
|
|
888
|
+
return { suggestions: [] };
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
return {
|
|
892
|
+
suggestions: (response.suggestions ?? []).map(
|
|
893
|
+
(suggestion, index) => {
|
|
894
|
+
const normalizedSuggestion = normalizeAutocompleteSuggestion(
|
|
895
|
+
suggestion,
|
|
896
|
+
response.context,
|
|
897
|
+
);
|
|
898
|
+
const label =
|
|
899
|
+
normalizedSuggestion.displayText?.trim() ||
|
|
900
|
+
normalizedSuggestion.text;
|
|
901
|
+
const description =
|
|
902
|
+
normalizedSuggestion.description?.trim() || '';
|
|
903
|
+
const detail =
|
|
904
|
+
description || normalizedSuggestion.category || '';
|
|
905
|
+
const insertText =
|
|
906
|
+
normalizedSuggestion.insertText ??
|
|
907
|
+
normalizedSuggestion.text;
|
|
908
|
+
const { text, rule } = this.applyCursorOffset(
|
|
909
|
+
insertText,
|
|
910
|
+
normalizedSuggestion.cursorOffset ?? 0,
|
|
911
|
+
);
|
|
912
|
+
|
|
913
|
+
return {
|
|
914
|
+
label,
|
|
915
|
+
kind: this.mapSuggestionKind(normalizedSuggestion.type),
|
|
916
|
+
insertText: text,
|
|
917
|
+
insertTextRules: rule,
|
|
918
|
+
detail,
|
|
919
|
+
documentation: description
|
|
920
|
+
? { value: description }
|
|
921
|
+
: undefined,
|
|
922
|
+
range: this.getCompletionRanges(
|
|
923
|
+
model,
|
|
924
|
+
position,
|
|
925
|
+
normalizedSuggestion,
|
|
926
|
+
),
|
|
927
|
+
sortText: String(index).padStart(4, '0'),
|
|
928
|
+
filterText: buildCompletionFilterText(normalizedSuggestion),
|
|
929
|
+
} as Monaco.languages.CompletionItem;
|
|
930
|
+
},
|
|
931
|
+
),
|
|
932
|
+
};
|
|
933
|
+
} catch (error) {
|
|
934
|
+
// Request was cancelled or failed - return empty
|
|
935
|
+
console.debug('Autocomplete request cancelled or failed:', error);
|
|
936
|
+
return { suggestions: [] };
|
|
937
|
+
}
|
|
938
|
+
},
|
|
939
|
+
});
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
private async resolveAutocompleteResponse(
|
|
943
|
+
provider: AutocompleteProvider,
|
|
944
|
+
request: AutocompleteRequest,
|
|
945
|
+
_requestId: number,
|
|
946
|
+
): Promise<AutocompleteResponse | null> {
|
|
947
|
+
const result = provider(request);
|
|
948
|
+
if (!result) return null;
|
|
949
|
+
|
|
950
|
+
// Convert to Observable for unified handling with cancellation
|
|
951
|
+
let source$: Observable<AutocompleteResponse | null>;
|
|
952
|
+
|
|
953
|
+
if (isObservable(result)) {
|
|
954
|
+
source$ = result;
|
|
955
|
+
} else if (result instanceof Promise) {
|
|
956
|
+
source$ = from(result);
|
|
957
|
+
} else {
|
|
958
|
+
// Synchronous result
|
|
959
|
+
return result;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
// Use takeUntil for cancellation
|
|
963
|
+
return await firstValueFrom(
|
|
964
|
+
source$.pipe(
|
|
965
|
+
takeUntil(this.cancelAutocomplete$),
|
|
966
|
+
catchError(() => of(null)),
|
|
967
|
+
),
|
|
968
|
+
).catch(() => null);
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
private applyCursorOffset(
|
|
972
|
+
insertText: string,
|
|
973
|
+
cursorOffset: number,
|
|
974
|
+
): { text: string; rule?: Monaco.languages.CompletionItemInsertTextRule } {
|
|
975
|
+
if (!cursorOffset) {
|
|
976
|
+
return { text: insertText };
|
|
977
|
+
}
|
|
978
|
+
const cursorIndex = Math.max(
|
|
979
|
+
0,
|
|
980
|
+
Math.min(insertText.length + cursorOffset, insertText.length),
|
|
981
|
+
);
|
|
982
|
+
const snippet =
|
|
983
|
+
insertText.slice(0, cursorIndex) + '$0' + insertText.slice(cursorIndex);
|
|
984
|
+
return {
|
|
985
|
+
text: snippet,
|
|
986
|
+
rule: this.monaco?.languages.CompletionItemInsertTextRule.InsertAsSnippet,
|
|
987
|
+
};
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
private getCompletionRanges(
|
|
991
|
+
model: Monaco.editor.ITextModel,
|
|
992
|
+
position: Monaco.Position,
|
|
993
|
+
suggestion: CompletionRangeSuggestion,
|
|
994
|
+
): Monaco.IRange | Monaco.languages.CompletionItemRanges {
|
|
995
|
+
const word = model.getWordUntilPosition(position);
|
|
996
|
+
const { startColumn, endColumn } = resolveCompletionRangeBounds(
|
|
997
|
+
model.getLineContent(position.lineNumber),
|
|
998
|
+
position.column,
|
|
999
|
+
word.startColumn,
|
|
1000
|
+
Math.max(word.endColumn, position.column),
|
|
1001
|
+
suggestion,
|
|
1002
|
+
);
|
|
1003
|
+
|
|
1004
|
+
return {
|
|
1005
|
+
insert: new this.monaco!.Range(
|
|
1006
|
+
position.lineNumber,
|
|
1007
|
+
startColumn,
|
|
1008
|
+
position.lineNumber,
|
|
1009
|
+
position.column,
|
|
1010
|
+
),
|
|
1011
|
+
replace: new this.monaco!.Range(
|
|
1012
|
+
position.lineNumber,
|
|
1013
|
+
startColumn,
|
|
1014
|
+
position.lineNumber,
|
|
1015
|
+
endColumn,
|
|
1016
|
+
),
|
|
1017
|
+
};
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
private mapSuggestionKind(type: string): Monaco.languages.CompletionItemKind {
|
|
1021
|
+
if (!this.monaco) {
|
|
1022
|
+
return 17;
|
|
1023
|
+
}
|
|
1024
|
+
switch (type) {
|
|
1025
|
+
case 'Function':
|
|
1026
|
+
return this.monaco.languages.CompletionItemKind.Function;
|
|
1027
|
+
case 'Operator':
|
|
1028
|
+
return this.monaco.languages.CompletionItemKind.Operator;
|
|
1029
|
+
case 'Property':
|
|
1030
|
+
return this.monaco.languages.CompletionItemKind.Field;
|
|
1031
|
+
case 'Context':
|
|
1032
|
+
return this.monaco.languages.CompletionItemKind.Module;
|
|
1033
|
+
case 'Keyword':
|
|
1034
|
+
return this.monaco.languages.CompletionItemKind.Keyword;
|
|
1035
|
+
default:
|
|
1036
|
+
return this.monaco.languages.CompletionItemKind.Text;
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
private syncEditorValue(value: string): void {
|
|
1040
|
+
if (!this.model) return;
|
|
1041
|
+
if (this.model.getValue() === value) return;
|
|
1042
|
+
this.isApplyingExternalValue = true;
|
|
1043
|
+
this.model.setValue(value);
|
|
1044
|
+
this.isApplyingExternalValue = false;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
private smartBlockToText(block: SmartBlock): {
|
|
1048
|
+
text: string;
|
|
1049
|
+
cursorOffset: number;
|
|
1050
|
+
} {
|
|
1051
|
+
switch (block.type) {
|
|
1052
|
+
case 'function': {
|
|
1053
|
+
const text =
|
|
1054
|
+
block.insertText ??
|
|
1055
|
+
block.signature ??
|
|
1056
|
+
`${block.functionName ?? block.value}()`;
|
|
1057
|
+
const cursorOffset =
|
|
1058
|
+
block.cursorOffset ?? (text.endsWith(')') ? -1 : 0);
|
|
1059
|
+
return { text, cursorOffset };
|
|
1060
|
+
}
|
|
1061
|
+
case 'property':
|
|
1062
|
+
return { text: block.value ?? '', cursorOffset: 0 };
|
|
1063
|
+
case 'operator':
|
|
1064
|
+
return {
|
|
1065
|
+
text: block.operatorSymbol ?? block.value ?? '',
|
|
1066
|
+
cursorOffset: 0,
|
|
1067
|
+
};
|
|
1068
|
+
case 'literal':
|
|
1069
|
+
return {
|
|
1070
|
+
text: this.formatLiteral(block.literalValue ?? block.value ?? ''),
|
|
1071
|
+
cursorOffset: 0,
|
|
1072
|
+
};
|
|
1073
|
+
default:
|
|
1074
|
+
return { text: block.value ?? '', cursorOffset: 0 };
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
private formatLiteral(value: string | number | boolean): string {
|
|
1079
|
+
if (typeof value === 'string') {
|
|
1080
|
+
if (value.startsWith('"') && value.endsWith('"')) {
|
|
1081
|
+
return value;
|
|
1082
|
+
}
|
|
1083
|
+
return `"${value}"`;
|
|
1084
|
+
}
|
|
1085
|
+
return String(value);
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
private emitValue(value: string): void {
|
|
1089
|
+
this.zone.run(() => {
|
|
1090
|
+
this.value.set(value);
|
|
1091
|
+
this.formulaChange.emit(value);
|
|
1092
|
+
this.onChange(value);
|
|
1093
|
+
});
|
|
1094
|
+
}
|
|
1095
|
+
}
|