@scion/workbench 18.0.0-beta.1 → 18.0.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (275) hide show
  1. package/_index.scss +7 -5
  2. package/design/_workbench-global-styles.scss +18 -0
  3. package/design/_workbench-icon-font.scss +1 -1
  4. package/design/_workbench-popup-global-styles.scss +1 -1
  5. package/design/{_workbench-view-drag-image-global-styles.scss → _workbench-view-global-styles.scss} +1 -2
  6. package/esm2022/lib/common/class-list.mjs +67 -29
  7. package/esm2022/lib/common/math.util.mjs +16 -0
  8. package/esm2022/lib/common/objects.util.mjs +7 -1
  9. package/esm2022/lib/common/operators.mjs +1 -12
  10. package/esm2022/lib/common/uid.util.mjs +22 -0
  11. package/esm2022/lib/content-projection/content-as-overlay.component.mjs +85 -28
  12. package/esm2022/lib/content-projection/workbench-element-references.mjs +32 -0
  13. package/esm2022/lib/dialog/dialog-header/dialog-header.component.mjs +3 -8
  14. package/esm2022/lib/dialog/movable.directive.mjs +3 -3
  15. package/esm2022/lib/dialog/resizable.directive.mjs +3 -3
  16. package/esm2022/lib/dialog/workbench-dialog.component.mjs +25 -23
  17. package/esm2022/lib/dialog/workbench-dialog.mjs +61 -1
  18. package/esm2022/lib/dialog//311/265workbench-dialog.mjs +98 -60
  19. package/esm2022/lib/dialog//311/265workbench-dialog.service.mjs +26 -23
  20. package/esm2022/lib/executor/latest-task-executor.mjs +55 -0
  21. package/esm2022/lib/executor/single-task-executor.mjs +9 -19
  22. package/esm2022/lib/filter-field/filter-field.component.mjs +5 -5
  23. package/esm2022/lib/layout/grid-element/grid-element.component.mjs +8 -18
  24. package/esm2022/lib/layout/main-area-layout/main-area-layout.component.mjs +18 -21
  25. package/esm2022/lib/layout/migration/model/workbench-layout-migration-v5.model.mjs +11 -0
  26. package/esm2022/lib/layout/migration/model/workbench-layout-migration-v6.model.mjs +11 -0
  27. package/esm2022/lib/layout/migration/workbench-layout-migration-v3.service.mjs +4 -4
  28. package/esm2022/lib/layout/migration/workbench-layout-migration-v5.service.mjs +67 -0
  29. package/esm2022/lib/layout/migration/workbench-layout-migration-v6.service.mjs +59 -0
  30. package/esm2022/lib/layout/stringifier.mjs +70 -0
  31. package/esm2022/lib/layout/workbench-layout.component.mjs +18 -22
  32. package/esm2022/lib/layout/workbench-layout.mjs +1 -1
  33. package/esm2022/lib/layout/workbench-layout.model.mjs +1 -1
  34. package/esm2022/lib/layout/workbench-layout.service.mjs +26 -24
  35. package/esm2022/lib/layout/workbench-layouts.util.mjs +1 -9
  36. package/esm2022/lib/layout/workench-layout-serializer.service.mjs +19 -27
  37. package/esm2022/lib/layout//311/265workbench-layout.factory.mjs +3 -2
  38. package/esm2022/lib/layout//311/265workbench-layout.mjs +73 -62
  39. package/esm2022/lib/logging/logging-support.mjs +7 -13
  40. package/esm2022/lib/logging//311/265logger.mjs +10 -10
  41. package/esm2022/lib/message-box/message-box-footer/message-box-footer.component.mjs +7 -6
  42. package/esm2022/lib/message-box/message-box-header/message-box-header.component.mjs +3 -3
  43. package/esm2022/lib/message-box/workbench-message-box.component.mjs +2 -2
  44. package/esm2022/lib/message-box//311/265workbench-message-box.service.mjs +3 -2
  45. package/esm2022/lib/microfrontend-platform/common/microfrontend.util.mjs +22 -6
  46. package/esm2022/lib/microfrontend-platform/initialization/microfrontend-platform-initializer.service.mjs +28 -21
  47. package/esm2022/lib/microfrontend-platform/initialization/ng-zone-observable-decorator.mjs +3 -3
  48. package/esm2022/lib/microfrontend-platform/initialization/workbench-host-manifest-interceptor.service.mjs +11 -1
  49. package/esm2022/lib/microfrontend-platform/manifest-object-cache.service.mjs +63 -0
  50. package/esm2022/lib/microfrontend-platform/microfrontend-dialog/microfrontend-dialog-capability-validator.interceptor.mjs +5 -4
  51. package/esm2022/lib/microfrontend-platform/microfrontend-dialog/microfrontend-dialog.component.mjs +6 -10
  52. package/esm2022/lib/microfrontend-platform/microfrontend-host-dialog/microfrontend-host-dialog.component.mjs +18 -9
  53. package/esm2022/lib/microfrontend-platform/microfrontend-host-message-box/microfrontend-host-message-box.component.mjs +7 -6
  54. package/esm2022/lib/microfrontend-platform/microfrontend-host-message-box/text-message/text-message.component.mjs +3 -3
  55. package/esm2022/lib/microfrontend-platform/microfrontend-host-popup/microfrontend-host-popup.component.mjs +15 -13
  56. package/esm2022/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-capability-validator.interceptor.mjs +3 -2
  57. package/esm2022/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box.component.mjs +6 -11
  58. package/esm2022/lib/microfrontend-platform/microfrontend-perspective/microfrontend-perspective-capability-validator.interceptor.mjs +39 -0
  59. package/esm2022/lib/microfrontend-platform/microfrontend-perspective/microfrontend-perspective-installer.service.mjs +120 -0
  60. package/esm2022/lib/microfrontend-platform/microfrontend-perspective/microfrontend-perspective-intent-handler.interceptor.mjs +55 -0
  61. package/esm2022/lib/microfrontend-platform/microfrontend-perspective/workbench-perspective-data.mjs +19 -0
  62. package/esm2022/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup-capability-validator.interceptor.mjs +4 -3
  63. package/esm2022/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup-intent-handler.interceptor.mjs +11 -12
  64. package/esm2022/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup.component.mjs +12 -28
  65. package/esm2022/lib/microfrontend-platform/microfrontend-splash/microfrontend-splash.component.mjs +3 -3
  66. package/esm2022/lib/microfrontend-platform/microfrontend-view/microfrontend-view-command-handler.service.mjs +11 -27
  67. package/esm2022/lib/microfrontend-platform/microfrontend-view/microfrontend-view.component.mjs +91 -71
  68. package/esm2022/lib/microfrontend-platform/public_api.mjs +2 -1
  69. package/esm2022/lib/microfrontend-platform/routing/microfrontend-view-capability-validator.interceptor.mjs +5 -4
  70. package/esm2022/lib/microfrontend-platform/routing/microfrontend-view-intent-handler.interceptor.mjs +18 -16
  71. package/esm2022/lib/microfrontend-platform/routing/microfrontend-view-routes.mjs +30 -8
  72. package/esm2022/lib/microfrontend-platform/stable-capability-id-assigner.interceptor.mjs +32 -0
  73. package/esm2022/lib/microfrontend-platform/workbench-microfrontend-support.mjs +26 -8
  74. package/esm2022/lib/notification/notification-list.component.mjs +4 -8
  75. package/esm2022/lib/notification/notification.component.mjs +4 -5
  76. package/esm2022/lib/notification/notification.service.mjs +5 -4
  77. package/esm2022/lib/page-not-found/page-not-found.component.mjs +5 -7
  78. package/esm2022/lib/part/part-action-bar/part-action-bar.component.mjs +11 -19
  79. package/esm2022/lib/part/part-action-bar/part-action.directive.mjs +4 -4
  80. package/esm2022/lib/part/part-bar/part-bar.component.mjs +333 -264
  81. package/esm2022/lib/part/part-portal.pipe.mjs +8 -8
  82. package/esm2022/lib/part/part.component.mjs +33 -42
  83. package/esm2022/lib/part/view-context-menu/text.component.mjs +16 -12
  84. package/esm2022/lib/part/view-context-menu/view-menu.component.mjs +4 -6
  85. package/esm2022/lib/part/view-context-menu/view-menu.directive.mjs +2 -2
  86. package/esm2022/lib/part/view-context-menu/view-menu.service.mjs +48 -49
  87. package/esm2022/lib/part/view-list/view-list.component.mjs +41 -48
  88. package/esm2022/lib/part/view-list-button/view-list-button.component.mjs +22 -26
  89. package/esm2022/lib/part/view-list-item/view-list-item.component.mjs +15 -17
  90. package/esm2022/lib/part/view-tab/view-tab.component.mjs +99 -110
  91. package/esm2022/lib/part/view-tab-content/view-tab-content.component.mjs +3 -4
  92. package/esm2022/lib/part/view-tab-drag-image/view-tab-drag-image.component.mjs +16 -17
  93. package/esm2022/lib/part/workbench-part-action.registry.mjs +18 -42
  94. package/esm2022/lib/part/workbench-part.model.mjs +10 -1
  95. package/esm2022/lib/part/workbench-part.registry.mjs +11 -45
  96. package/esm2022/lib/part//311/265workbench-part.model.mjs +71 -55
  97. package/esm2022/lib/perspective/workbench-grid-merger.service.mjs +3 -3
  98. package/esm2022/lib/perspective/workbench-perspective.model.mjs +1 -1
  99. package/esm2022/lib/perspective/workbench-perspective.registry.mjs +11 -43
  100. package/esm2022/lib/perspective/workbench-perspective.service.mjs +71 -62
  101. package/esm2022/lib/perspective/workench-perspective-serializer.service.mjs +2 -2
  102. package/esm2022/lib/perspective//311/265workbench-perspective.model.mjs +62 -47
  103. package/esm2022/lib/popup/popup.component.mjs +3 -3
  104. package/esm2022/lib/popup/popup.config.mjs +27 -25
  105. package/esm2022/lib/popup/popup.service.mjs +169 -174
  106. package/esm2022/lib/portal/wb-component-portal.mjs +18 -17
  107. package/esm2022/lib/public_api.mjs +1 -1
  108. package/esm2022/lib/registry/workbench-object-registry.mjs +38 -17
  109. package/esm2022/lib/routing/public_api.mjs +2 -2
  110. package/esm2022/lib/routing/routing.model.mjs +1 -1
  111. package/esm2022/lib/routing/routing.util.mjs +215 -0
  112. package/esm2022/lib/routing/workbench-auxiliary-route-installer.service.mjs +110 -0
  113. package/esm2022/lib/routing/workbench-dialog-differ.mjs +3 -3
  114. package/esm2022/lib/routing/workbench-layout-differ.mjs +3 -10
  115. package/esm2022/lib/routing/workbench-message-box-differ.mjs +3 -3
  116. package/esm2022/lib/routing/workbench-navigational-states.mjs +2 -2
  117. package/esm2022/lib/routing/workbench-popup-differ.mjs +3 -3
  118. package/esm2022/lib/routing/workbench-route-guards.mjs +57 -0
  119. package/esm2022/lib/routing/workbench-url-observer.service.mjs +140 -148
  120. package/esm2022/lib/routing/workbench-view-outlet-differ.mjs +58 -0
  121. package/esm2022/lib/routing//311/265workbench-router.service.mjs +119 -74
  122. package/esm2022/lib/startup/splash/splash.component.mjs +3 -3
  123. package/esm2022/lib/startup/workbench-launcher.service.mjs +22 -10
  124. package/esm2022/lib/testing/workbench.provider.mjs +2 -2
  125. package/esm2022/lib/theme/workbench-theme-switcher.service.mjs +15 -19
  126. package/esm2022/lib/view/public_api.mjs +1 -2
  127. package/esm2022/lib/view/view-move-handler.service.mjs +71 -56
  128. package/esm2022/lib/view/view-portal.pipe.mjs +7 -7
  129. package/esm2022/lib/view/view.component.mjs +54 -42
  130. package/esm2022/lib/view/workbench-view.model.mjs +1 -1
  131. package/esm2022/lib/view/workbench-view.registry.mjs +11 -45
  132. package/esm2022/lib/view//311/265workbench-view.model.mjs +183 -153
  133. package/esm2022/lib/view-dnd/grid-drop-targets.util.mjs +2 -2
  134. package/esm2022/lib/view-dnd/view-drag.service.mjs +87 -71
  135. package/esm2022/lib/view-dnd/view-drop-placeholder-renderer.service.mjs +6 -6
  136. package/esm2022/lib/view-dnd/view-drop-zone.directive.mjs +6 -6
  137. package/esm2022/lib/view-dnd/view-tab-drag-image-renderer.service.mjs +43 -56
  138. package/esm2022/lib/workbench-config.mjs +2 -2
  139. package/esm2022/lib/workbench-id.mjs +3 -3
  140. package/esm2022/lib/workbench.component.mjs +66 -54
  141. package/esm2022/lib/workbench.constants.mjs +1 -5
  142. package/esm2022/lib/workbench.model.mjs +1 -1
  143. package/esm2022/lib/workbench.provider.mjs +3 -9
  144. package/esm2022/lib/workbench.service.mjs +1 -1
  145. package/esm2022/lib//311/265workbench.service.mjs +38 -42
  146. package/fesm2022/scion-workbench.mjs +4054 -3276
  147. package/fesm2022/scion-workbench.mjs.map +1 -1
  148. package/lib/common/class-list.d.ts +35 -22
  149. package/lib/common/math.util.d.ts +7 -0
  150. package/lib/common/objects.util.d.ts +4 -0
  151. package/lib/common/operators.d.ts +1 -6
  152. package/lib/common/uid.util.d.ts +9 -0
  153. package/lib/content-projection/content-as-overlay.component.d.ts +39 -22
  154. package/lib/content-projection/workbench-element-references.d.ts +13 -0
  155. package/lib/dialog/workbench-dialog.component.d.ts +3 -2
  156. package/lib/dialog/workbench-dialog.d.ts +57 -13
  157. package/lib/dialog//311/265workbench-dialog.d.ts +38 -24
  158. package/lib/dialog//311/265workbench-dialog.service.d.ts +10 -11
  159. package/lib/executor/latest-task-executor.d.ts +26 -0
  160. package/lib/executor/single-task-executor.d.ts +5 -8
  161. package/lib/filter-field/filter-field.component.d.ts +1 -1
  162. package/lib/layout/grid-element/grid-element.component.d.ts +1 -8
  163. package/lib/layout/main-area-layout/main-area-layout.component.d.ts +0 -4
  164. package/lib/layout/migration/model/workbench-layout-migration-v5.model.d.ts +36 -0
  165. package/lib/layout/migration/model/workbench-layout-migration-v6.model.d.ts +35 -0
  166. package/lib/layout/migration/workbench-layout-migration-v5.service.d.ts +12 -0
  167. package/lib/layout/migration/workbench-layout-migration-v6.service.d.ts +12 -0
  168. package/lib/layout/stringifier.d.ts +26 -0
  169. package/lib/layout/workbench-layout.component.d.ts +4 -5
  170. package/lib/layout/workbench-layout.d.ts +9 -6
  171. package/lib/layout/workbench-layout.model.d.ts +4 -3
  172. package/lib/layout/workbench-layout.service.d.ts +14 -16
  173. package/lib/layout/workbench-layouts.util.d.ts +0 -6
  174. package/lib/layout/workench-layout-serializer.service.d.ts +13 -16
  175. package/lib/layout//311/265workbench-layout.d.ts +18 -19
  176. package/lib/layout//311/265workbench-layout.factory.d.ts +3 -2
  177. package/lib/logging//311/265logger.d.ts +2 -3
  178. package/lib/microfrontend-platform/common/microfrontend.util.d.ts +5 -1
  179. package/lib/microfrontend-platform/initialization/microfrontend-platform-initializer.service.d.ts +7 -3
  180. package/lib/microfrontend-platform/manifest-object-cache.service.d.ts +33 -0
  181. package/lib/microfrontend-platform/microfrontend-host-dialog/microfrontend-host-dialog.component.d.ts +3 -6
  182. package/lib/microfrontend-platform/microfrontend-host-message-box/microfrontend-host-message-box.component.d.ts +2 -1
  183. package/lib/microfrontend-platform/microfrontend-host-message-box/text-message/text-message.component.d.ts +1 -1
  184. package/lib/microfrontend-platform/microfrontend-host-popup/microfrontend-host-popup.component.d.ts +2 -1
  185. package/lib/microfrontend-platform/microfrontend-perspective/microfrontend-perspective-capability-validator.interceptor.d.ts +10 -0
  186. package/lib/microfrontend-platform/microfrontend-perspective/microfrontend-perspective-installer.service.d.ts +24 -0
  187. package/lib/microfrontend-platform/microfrontend-perspective/microfrontend-perspective-intent-handler.interceptor.d.ts +20 -0
  188. package/lib/microfrontend-platform/microfrontend-perspective/workbench-perspective-data.d.ts +9 -0
  189. package/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup-intent-handler.interceptor.d.ts +4 -8
  190. package/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup.component.d.ts +0 -4
  191. package/lib/microfrontend-platform/microfrontend-view/microfrontend-view-command-handler.service.d.ts +5 -12
  192. package/lib/microfrontend-platform/microfrontend-view/microfrontend-view.component.d.ts +23 -33
  193. package/lib/microfrontend-platform/public_api.d.ts +1 -0
  194. package/lib/microfrontend-platform/routing/microfrontend-view-capability-validator.interceptor.d.ts +1 -1
  195. package/lib/microfrontend-platform/routing/microfrontend-view-intent-handler.interceptor.d.ts +3 -7
  196. package/lib/microfrontend-platform/routing/microfrontend-view-routes.d.ts +9 -2
  197. package/lib/microfrontend-platform/stable-capability-id-assigner.interceptor.d.ts +11 -0
  198. package/lib/notification/notification-list.component.d.ts +0 -2
  199. package/lib/page-not-found/page-not-found.component.d.ts +1 -0
  200. package/lib/part/part-action-bar/part-action-bar.component.d.ts +3 -4
  201. package/lib/part/part-action-bar/part-action.directive.d.ts +2 -2
  202. package/lib/part/part-bar/part-bar.component.d.ts +73 -63
  203. package/lib/part/part-portal.pipe.d.ts +3 -5
  204. package/lib/part/part.component.d.ts +9 -12
  205. package/lib/part/view-context-menu/text.component.d.ts +3 -4
  206. package/lib/part/view-context-menu/view-menu.directive.d.ts +1 -1
  207. package/lib/part/view-context-menu/view-menu.service.d.ts +13 -17
  208. package/lib/part/view-list/view-list.component.d.ts +8 -21
  209. package/lib/part/view-list-button/view-list-button.component.d.ts +8 -11
  210. package/lib/part/view-list-item/view-list-item.component.d.ts +3 -7
  211. package/lib/part/view-tab/view-tab.component.d.ts +19 -29
  212. package/lib/part/view-tab-drag-image/view-tab-drag-image.component.d.ts +4 -4
  213. package/lib/part/workbench-part-action.registry.d.ts +3 -23
  214. package/lib/part/workbench-part.model.d.ts +8 -27
  215. package/lib/part/workbench-part.registry.d.ts +3 -26
  216. package/lib/part//311/265workbench-part.model.d.ts +23 -17
  217. package/lib/perspective/workbench-perspective.model.d.ts +18 -25
  218. package/lib/perspective/workbench-perspective.registry.d.ts +3 -26
  219. package/lib/perspective/workbench-perspective.service.d.ts +16 -14
  220. package/lib/perspective/workench-perspective-serializer.service.d.ts +1 -1
  221. package/lib/perspective//311/265workbench-perspective.model.d.ts +30 -21
  222. package/lib/popup/popup.config.d.ts +11 -10
  223. package/lib/popup/popup.service.d.ts +15 -28
  224. package/lib/portal/wb-component-portal.d.ts +21 -5
  225. package/lib/public_api.d.ts +1 -1
  226. package/lib/registry/workbench-object-registry.d.ts +10 -6
  227. package/lib/routing/public_api.d.ts +2 -2
  228. package/lib/routing/routing.model.d.ts +25 -13
  229. package/lib/routing/{router.util.d.ts → routing.util.d.ts} +28 -1
  230. package/lib/routing/{workbench-auxiliary-routes-registrator.service.d.ts → workbench-auxiliary-route-installer.service.d.ts} +10 -3
  231. package/lib/routing/workbench-layout-differ.d.ts +1 -2
  232. package/lib/routing/workbench-navigational-states.d.ts +8 -4
  233. package/lib/{view/workbench-view-route-guards.d.ts → routing/workbench-route-guards.d.ts} +8 -2
  234. package/lib/routing/workbench-url-observer.service.d.ts +31 -55
  235. package/lib/routing/workbench-view-outlet-differ.d.ts +32 -0
  236. package/lib/routing//311/265workbench-router.service.d.ts +22 -18
  237. package/lib/startup/workbench-launcher.service.d.ts +4 -5
  238. package/lib/testing/workbench.provider.d.ts +3 -1
  239. package/lib/theme/workbench-theme-switcher.service.d.ts +4 -6
  240. package/lib/view/public_api.d.ts +0 -1
  241. package/lib/view/view-move-handler.service.d.ts +16 -14
  242. package/lib/view/view-portal.pipe.d.ts +1 -3
  243. package/lib/view/view.component.d.ts +21 -12
  244. package/lib/view/workbench-view.model.d.ts +88 -36
  245. package/lib/view/workbench-view.registry.d.ts +3 -27
  246. package/lib/view//311/265workbench-view.model.d.ts +62 -71
  247. package/lib/view-dnd/view-drag.service.d.ts +79 -49
  248. package/lib/view-dnd/view-drop-placeholder-renderer.service.d.ts +1 -1
  249. package/lib/view-dnd/view-tab-drag-image-renderer.service.d.ts +12 -36
  250. package/lib/workbench-config.d.ts +19 -7
  251. package/lib/workbench.component.d.ts +16 -30
  252. package/lib/workbench.constants.d.ts +0 -5
  253. package/lib/workbench.model.d.ts +31 -3
  254. package/lib/workbench.service.d.ts +58 -56
  255. package/lib//311/265workbench.service.d.ts +18 -31
  256. package/package.json +5 -5
  257. package/esm2022/lib/common/filter-by-predicate.pipe.mjs +0 -27
  258. package/esm2022/lib/common/filter-by-text.pipe.mjs +0 -39
  259. package/esm2022/lib/common/uuid.util.mjs +0 -17
  260. package/esm2022/lib/content-projection/content-projection.directive.mjs +0 -101
  261. package/esm2022/lib/content-projection/view-container.reference.mjs +0 -68
  262. package/esm2022/lib/microfrontend-platform/routing/microfrontend-view-capability-id-assigner.interceptor.mjs +0 -41
  263. package/esm2022/lib/page-not-found/format-url.pipe.mjs +0 -26
  264. package/esm2022/lib/part/part-action-bar/part-action-filter.pipe.mjs +0 -26
  265. package/esm2022/lib/routing/router.util.mjs +0 -126
  266. package/esm2022/lib/routing/workbench-auxiliary-routes-registrator.service.mjs +0 -94
  267. package/esm2022/lib/view/workbench-view-route-guards.mjs +0 -47
  268. package/lib/common/filter-by-predicate.pipe.d.ts +0 -10
  269. package/lib/common/filter-by-text.pipe.d.ts +0 -12
  270. package/lib/common/uuid.util.d.ts +0 -8
  271. package/lib/content-projection/content-projection.directive.d.ts +0 -30
  272. package/lib/content-projection/view-container.reference.d.ts +0 -42
  273. package/lib/microfrontend-platform/routing/microfrontend-view-capability-id-assigner.interceptor.d.ts +0 -10
  274. package/lib/page-not-found/format-url.pipe.d.ts +0 -11
  275. package/lib/part/part-action-bar/part-action-filter.pipe.d.ts +0 -11
@@ -1,5 +1,4 @@
1
1
  import { InjectionToken } from '@angular/core';
2
- import { WorkbenchLayoutFn, WorkbenchPerspectives } from './perspective/workbench-perspective.model';
3
2
  /**
4
3
  * Represents the id prefix of views.
5
4
  *
@@ -34,10 +33,6 @@ export type ViewTabRenderingContext = 'tab' | 'list-item' | 'drag-image';
34
33
  * DI token to inject the context in which the view tab is rendered.
35
34
  */
36
35
  export declare const VIEW_TAB_RENDERING_CONTEXT: InjectionToken<ViewTabRenderingContext>;
37
- /**
38
- * DI token representing the configured workbench layout.
39
- */
40
- export declare const WORKBENCH_LAYOUT_CONFIG: InjectionToken<WorkbenchLayoutFn | WorkbenchPerspectives>;
41
36
  /**
42
37
  * Prefix used to identify an anonymous perspective that the workbench creates for views moved to a new window.
43
38
  */
@@ -18,19 +18,39 @@ import { WorkbenchPart } from './part/workbench-part.model';
18
18
  * }
19
19
  * }
20
20
  * ```
21
+ * @deprecated since version 18.0.0-beta.9. Register a callback on {@link WorkbenchView.canClose} instead of implementing the {@link CanClose} lifecycle hook. Refer to the {@link WorkbenchView.canClose} documentation for an example. This API will be removed in a future release.
21
22
  */
22
23
  export interface CanClose {
23
24
  /**
24
25
  * Decides whether this view can be closed.
25
26
  *
26
27
  * This function can call `inject` to get any required dependencies.
28
+ *
29
+ * @deprecated since version 18.0.0-beta.9. Register a callback on {@link WorkbenchView.canClose} instead of implementing the {@link CanClose} lifecycle hook. Refer to the {@link WorkbenchView.canClose} documentation for an example. This API will be removed in a future release.
27
30
  */
28
31
  canClose(): Observable<boolean> | Promise<boolean> | boolean;
29
32
  }
33
+ /**
34
+ * The signature of a function to confirm closing a view., e.g., if dirty.
35
+ *
36
+ * The function can call `inject` to get dependencies.
37
+ */
38
+ export type CanCloseFn = () => Observable<boolean> | Promise<boolean> | boolean;
39
+ /**
40
+ * Reference to a `CanClose` guard registered on a view.
41
+ */
42
+ export interface CanCloseRef {
43
+ /**
44
+ * Removes the `CanClose` guard from the view.
45
+ *
46
+ * Has no effect if another guard was registered in the meantime.
47
+ */
48
+ dispose(): void;
49
+ }
30
50
  /**
31
51
  * Describes an action contributed to a part.
32
52
  *
33
- * Part actions are displayed to the right of the view tab bar and enable interaction with the part and its content.
53
+ * Part actions are displayed to the right of the view tabs and enable interaction with the part and its content.
34
54
  */
35
55
  export interface WorkbenchPartAction {
36
56
  /**
@@ -48,7 +68,10 @@ export interface WorkbenchPartAction {
48
68
  *
49
69
  * By default, if not specified, matches any part.
50
70
  *
51
- * The function can call `inject` to get any required dependencies.
71
+ * The function:
72
+ * - Can call `inject` to get any required dependencies.
73
+ * - Runs in a reactive context, re-evaluating when tracked signals change.
74
+ * To execute code outside this reactive context, use Angular's `untracked` function.
52
75
  */
53
76
  canMatch?: CanMatchPartFn;
54
77
  /**
@@ -59,11 +82,16 @@ export interface WorkbenchPartAction {
59
82
  /**
60
83
  * The signature of a function used as a `canMatch` condition for a part.
61
84
  *
62
- * The function can call `inject` to get any required dependencies.
85
+ * The function:
86
+ * - Can call `inject` to get any required dependencies.
87
+ * - Runs in a reactive context, re-evaluating when tracked signals change.
88
+ * To execute code outside this reactive context, use Angular's `untracked` function.
63
89
  */
64
90
  export type CanMatchPartFn = (part: WorkbenchPart) => boolean;
65
91
  /**
66
92
  * Factory function to create a {@link WorkbenchMenuItem}.
93
+ *
94
+ * The function will be invoked when opening a view's context menu. Use the passed view handle to decide whether to display the menu item.
67
95
  */
68
96
  export type WorkbenchMenuItemFactoryFn = (view: WorkbenchView) => WorkbenchMenuItem | null;
69
97
  /**
@@ -1,9 +1,9 @@
1
- import { Observable } from 'rxjs';
2
1
  import { Disposable } from './common/disposable';
3
2
  import { WorkbenchMenuItemFactoryFn, WorkbenchPartAction, WorkbenchTheme } from './workbench.model';
4
3
  import { ViewId, WorkbenchView } from './view/workbench-view.model';
5
4
  import { WorkbenchPerspective, WorkbenchPerspectiveDefinition } from './perspective/workbench-perspective.model';
6
5
  import { WorkbenchPart } from './part/workbench-part.model';
6
+ import { Signal } from '@angular/core';
7
7
  import { WorkbenchLayout } from './layout/workbench-layout';
8
8
  import * as i0 from "@angular/core";
9
9
  /**
@@ -25,86 +25,64 @@ import * as i0 from "@angular/core";
25
25
  */
26
26
  export declare abstract class WorkbenchService {
27
27
  /**
28
- * Returns the current {@link WorkbenchLayout}.
28
+ * Provides the snapshot of the current workbench layout.
29
29
  *
30
30
  * The layout is an immutable object. Modifications have no side effects. The layout can be modified using {@link WorkbenchRouter.navigate}.
31
31
  */
32
- abstract readonly layout: WorkbenchLayout;
32
+ abstract readonly layout: Signal<WorkbenchLayout>;
33
33
  /**
34
- * Emits the current {@link WorkbenchLayout}.
34
+ * Provides the handles of the perspectives registered in the workbench.
35
35
  *
36
- * Upon subscription, emits the current workbench layout, and then emits continuously
37
- * when the layout changes. It never completes.
38
- *
39
- * The layout is an immutable object. Modifications have no side effects. The layout can be modified using {@link WorkbenchRouter.navigate}.
40
- */
41
- abstract readonly layout$: Observable<WorkbenchLayout>;
42
- /**
43
- * Perspectives registered with the workbench.
36
+ * Each handle represents a perspective registered in the workbench. The handle has methods to interact with the perspective.
37
+ * Perspectives are registered via {@link WorkbenchConfig} passed to {@link provideWorkbench} or via {@link WorkbenchService}.
44
38
  */
45
- abstract readonly perspectives: readonly WorkbenchPerspective[];
39
+ abstract readonly perspectives: Signal<WorkbenchPerspective[]>;
46
40
  /**
47
- * Emits the perspectives registered with the workbench.
48
- *
49
- * Upon subscription, emits registered perspectives, and then emits continuously
50
- * when new perspectives are registered or existing perspectives unregistered. It never completes.
41
+ * Provides the active perspective, or `undefined` if none is active (e.g., during workbench startup).
51
42
  */
52
- abstract readonly perspectives$: Observable<readonly WorkbenchPerspective[]>;
43
+ abstract readonly activePerspective: Signal<WorkbenchPerspective | undefined>;
53
44
  /**
54
- * Returns a reference to the specified {@link WorkbenchPerspective}, or `null` if not found.
45
+ * Returns the handle of the specified perspective, or `null` if not found.
55
46
  */
56
47
  abstract getPerspective(perspectiveId: string): WorkbenchPerspective | null;
57
48
  /**
58
- * Registers the given perspective to arrange views around the main area.
59
- * The perspective can be activated via the {@link WorkbenchService#switchPerspective} method.
49
+ * Registers the given perspective.
60
50
  *
61
- * @see WorkbenchPerspective
51
+ * The perspective can be activated via {@link WorkbenchService#switchPerspective}.
62
52
  */
63
53
  abstract registerPerspective(perspective: WorkbenchPerspectiveDefinition): Promise<void>;
64
54
  /**
65
- * Switches to the specified perspective. Layout and views of the main area do not change.
55
+ * Switches to the specified perspective.
56
+ *
57
+ * Switching perspective does not change the layout of the main area, if any.
66
58
  */
67
59
  abstract switchPerspective(id: string): Promise<boolean>;
68
60
  /**
69
- * Resets the currently active perspective to its initial layout. Layout and views of the main area do not change.
61
+ * Resets the currently active perspective to its initial layout. Resetting the perspective does not change the layout of the main area, if any.
70
62
  */
71
63
  abstract resetPerspective(): Promise<void>;
72
64
  /**
73
- * Parts in the workbench layout.
74
- *
75
- * Each {@link WorkbenchPart} object represents a part in the workbench layout that can be interacted with.
76
- */
77
- abstract readonly parts: readonly WorkbenchPart[];
78
- /**
79
- * Emits the parts in the workbench layout.
65
+ * Provides the handles of the parts in the current workbench layout.
80
66
  *
81
- * Upon subscription, emits parts contained in the layout, and then emits continuously
82
- * when new parts are added or existing parts removed. It never completes.
67
+ * Each handle represents a part in the layout. The handle has methods to interact with the part. Parts are added to the layout via {@link WorkbenchRouter}.
83
68
  */
84
- abstract readonly parts$: Observable<readonly WorkbenchPart[]>;
69
+ abstract readonly parts: Signal<WorkbenchPart[]>;
85
70
  /**
86
- * Returns a reference to the specified {@link WorkbenchPart}, or `null` if not found.
71
+ * Returns the handle of the specified part, or `null` if not found.
87
72
  *
88
- * A {@link WorkbenchPart} object represents a part in the workbench layout that can be interacted with.
73
+ * A handle represents a part in the layout. The handle has methods to interact with the part. A part is added to the layout via {@link WorkbenchRouter}.
89
74
  */
90
75
  abstract getPart(partId: string): WorkbenchPart | null;
91
76
  /**
92
- * Views in the workbench layout.
93
- *
94
- * Each {@link WorkbenchView} object represents a view in the workbench layout that can be interacted with.
95
- */
96
- abstract readonly views: readonly WorkbenchView[];
97
- /**
98
- * Emits the views opened in the workbench.
77
+ * Provides the handles of the views in the current workbench layout.
99
78
  *
100
- * Upon subscription, emits views contained in the layout, and then emits continuously
101
- * when new views are opened or existing views closed. It never completes.
79
+ * Each handle represents a view in the layout. The handle has methods to interact with the view. Views are opened via {@link WorkbenchRouter}.
102
80
  */
103
- abstract readonly views$: Observable<readonly WorkbenchView[]>;
81
+ abstract readonly views: Signal<WorkbenchView[]>;
104
82
  /**
105
- * Returns a reference to the specified {@link WorkbenchView}, or `null` if not found.
83
+ * Returns the handle of the specified view, or `null` if not found.
106
84
  *
107
- * A {@link WorkbenchView} object represents a view in the workbench layout that can be interacted with.
85
+ * A handle represents a view in the layout. The handle has methods to interact with the view. A view is opened via {@link WorkbenchRouter}.
108
86
  */
109
87
  abstract getView(viewId: ViewId): WorkbenchView | null;
110
88
  /**
@@ -114,17 +92,43 @@ export declare abstract class WorkbenchService {
114
92
  */
115
93
  abstract closeViews(...viewIds: ViewId[]): Promise<boolean>;
116
94
  /**
117
- * Contributes an action to a part's action bar.
95
+ * Contributes an action to the action bar of a {@link WorkbenchPart}.
118
96
  *
119
- * Part actions are displayed to the right of the view tab bar and enable interaction with the part and its content.
97
+ * Part actions are displayed to the right of the view tabs and enable interaction with the part and its content.
98
+ *
99
+ * ---
100
+ * As an alternative to programmatic registration, actions can be contributed declaratively from an HTML template.
101
+ * Declaring an action in the HTML template of a workbench view displays it only if that view is active. To display it for every
102
+ * view or based on some condition, declare it outside a view context, such as in `app.component.html`, or register it programmatically.
103
+ * Refer to {@link WorkbenchPartActionDirective} for more information.
104
+ *
105
+ * Example:
106
+ * ```html
107
+ * <ng-template wbPartAction>
108
+ * <button wbRouterLink="/path/to/view" [wbRouterLinkExtras]="{target: 'blank'}" class="material-icons">
109
+ * add
110
+ * </button>
111
+ * </ng-template>
112
+ * ```
120
113
  *
121
114
  * @return handle to unregister the part action.
122
115
  */
123
116
  abstract registerPartAction(action: WorkbenchPartAction): Disposable;
124
117
  /**
125
- * Registers a view menu item which is added to the context menu of every view tab.
118
+ * Contributes a menu item to a view's context menu.
126
119
  *
127
- * The factory function is invoked with the view as its argument when the menu is about to show.
120
+ * ---
121
+ * As an alternative to programmatic registration, menu items can be contributed declaratively from an HTML template.
122
+ * Declaring a menu item in the HTML template of a workbench view adds it to that view only. To add it to every view,
123
+ * declare it outside a view context, such as in `app.component.html`, or register it programmatically.
124
+ * Refer to {@link WorkbenchViewMenuItemDirective} for more information.
125
+ *
126
+ * Example:
127
+ * ```html
128
+ * <ng-template wbViewMenuItem [accelerator]="['ctrl', 'b']" (action)="..." let-view>
129
+ * ...
130
+ * </ng-template>
131
+ * ```
128
132
  *
129
133
  * @return handle to unregister the menu item.
130
134
  */
@@ -141,11 +145,9 @@ export declare abstract class WorkbenchService {
141
145
  */
142
146
  abstract switchTheme(theme: string): Promise<void>;
143
147
  /**
144
- * Emits the current workbench theme.
145
- *
146
- * Upon subscription, emits the current theme, and then continuously emits when switching the theme. It never completes.
148
+ * Provides the current workbench theme, if any.
147
149
  */
148
- abstract readonly theme$: Observable<WorkbenchTheme | null>;
150
+ abstract readonly theme: Signal<WorkbenchTheme | null>;
149
151
  static ɵfac: i0.ɵɵFactoryDeclaration<WorkbenchService, never>;
150
152
  static ɵprov: i0.ɵɵInjectableDeclaration<WorkbenchService>;
151
153
  }
@@ -1,50 +1,37 @@
1
- import { BehaviorSubject, Observable } from 'rxjs';
1
+ import { Signal } from '@angular/core';
2
+ import { BehaviorSubject } from 'rxjs';
2
3
  import { WorkbenchMenuItemFactoryFn, WorkbenchPartAction, WorkbenchTheme } from './workbench.model';
3
4
  import { Disposable } from './common/disposable';
4
5
  import { WorkbenchService } from './workbench.service';
5
- import { WorkbenchRouter } from './routing/workbench-router.service';
6
- import { WorkbenchViewRegistry } from './view/workbench-view.registry';
7
- import { WorkbenchPerspectiveService } from './perspective/workbench-perspective.service';
8
- import { WorkbenchPerspectiveDefinition } from './perspective/workbench-perspective.model';
9
- import { WorkbenchPartRegistry } from './part/workbench-part.registry';
6
+ import { WorkbenchPerspective, WorkbenchPerspectiveDefinition } from './perspective/workbench-perspective.model';
10
7
  import { ɵWorkbenchView } from './view/ɵworkbench-view.model';
11
8
  import { ɵWorkbenchPart } from './part/ɵworkbench-part.model';
12
9
  import { ɵWorkbenchPerspective } from './perspective/ɵworkbench-perspective.model';
13
- import { WorkbenchPerspectiveRegistry } from './perspective/workbench-perspective.registry';
14
- import { WorkbenchPartActionRegistry } from './part/workbench-part-action.registry';
15
- import { WorkbenchThemeSwitcher } from './theme/workbench-theme-switcher.service';
16
10
  import { ViewId } from './view/workbench-view.model';
17
11
  import { ɵWorkbenchLayout } from './layout/ɵworkbench-layout';
18
- import { WorkbenchLayoutService } from './layout/workbench-layout.service';
19
12
  import * as i0 from "@angular/core";
20
13
  export declare class ɵWorkbenchService implements WorkbenchService {
21
- private _workbenchRouter;
22
- private _perspectiveRegistry;
23
- private _partRegistry;
24
- private _partActionRegistry;
25
- private _viewRegistry;
26
- private _perspectiveService;
27
- private _layoutService;
28
- private _workbenchThemeSwitcher;
29
- readonly layout$: Observable<ɵWorkbenchLayout>;
30
- readonly perspectives$: Observable<readonly ɵWorkbenchPerspective[]>;
31
- readonly parts$: Observable<readonly ɵWorkbenchPart[]>;
32
- readonly views$: Observable<readonly ɵWorkbenchView[]>;
33
- readonly theme$: Observable<WorkbenchTheme | null>;
14
+ private readonly _workbenchRouter;
15
+ private readonly _perspectiveRegistry;
16
+ private readonly _partRegistry;
17
+ private readonly _partActionRegistry;
18
+ private readonly _viewRegistry;
19
+ private readonly _perspectiveService;
20
+ private readonly _layoutService;
21
+ private readonly _workbenchThemeSwitcher;
22
+ readonly layout: Signal<ɵWorkbenchLayout>;
23
+ readonly perspectives: Signal<ɵWorkbenchPerspective[]>;
24
+ readonly parts: Signal<ɵWorkbenchPart[]>;
25
+ readonly views: Signal<ɵWorkbenchView[]>;
26
+ readonly theme: Signal<WorkbenchTheme | null>;
27
+ readonly activePerspective: Signal<WorkbenchPerspective | undefined>;
34
28
  readonly viewMenuItemProviders$: BehaviorSubject<WorkbenchMenuItemFactoryFn[]>;
35
- constructor(_workbenchRouter: WorkbenchRouter, _perspectiveRegistry: WorkbenchPerspectiveRegistry, _partRegistry: WorkbenchPartRegistry, _partActionRegistry: WorkbenchPartActionRegistry, _viewRegistry: WorkbenchViewRegistry, _perspectiveService: WorkbenchPerspectiveService, _layoutService: WorkbenchLayoutService, _workbenchThemeSwitcher: WorkbenchThemeSwitcher);
36
- get layout(): ɵWorkbenchLayout;
37
- /** @inheritDoc */
38
- get perspectives(): readonly ɵWorkbenchPerspective[];
29
+ constructor();
39
30
  /** @inheritDoc */
40
31
  getPerspective(perspectiveId: string): ɵWorkbenchPerspective | null;
41
32
  /** @inheritDoc */
42
- get parts(): readonly ɵWorkbenchPart[];
43
- /** @inheritDoc */
44
33
  getPart(partId: string): ɵWorkbenchPart | null;
45
34
  /** @inheritDoc */
46
- get views(): readonly ɵWorkbenchView[];
47
- /** @inheritDoc */
48
35
  getView(viewId: ViewId): ɵWorkbenchView | null;
49
36
  /** @inheritDoc */
50
37
  registerPerspective(perspective: WorkbenchPerspectiveDefinition): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scion/workbench",
3
- "version": "18.0.0-beta.1",
3
+ "version": "18.0.0-beta.10",
4
4
  "description": "SCION Workbench enables the creation of Angular web applications that require a flexible layout to arrange content side-by-side or stacked, all personalizable by the user via drag & drop.",
5
5
  "license": "EPL-2.0",
6
6
  "private": false,
@@ -36,10 +36,10 @@
36
36
  "@angular/animations": "^18.0.0",
37
37
  "@angular/forms": "^18.0.0",
38
38
  "@angular/router": "^18.0.0",
39
- "@scion/components": "^18.0.0",
40
- "@scion/toolkit": "^1.4.0",
41
- "@scion/microfrontend-platform": "^1.2.1",
42
- "@scion/workbench-client": "^1.0.0-beta.23",
39
+ "@scion/components": "^18.1.1",
40
+ "@scion/toolkit": "^1.6.0",
41
+ "@scion/microfrontend-platform": "^1.3.0",
42
+ "@scion/workbench-client": "^1.0.0-beta.26",
43
43
  "rxjs": "^7.8.0"
44
44
  },
45
45
  "peerDependenciesMeta": {
@@ -1,27 +0,0 @@
1
- /*
2
- * Copyright (c) 2018-2023 Swiss Federal Railways
3
- *
4
- * This program and the accompanying materials are made
5
- * available under the terms of the Eclipse Public License 2.0
6
- * which is available at https://www.eclipse.org/legal/epl-2.0/
7
- *
8
- * SPDX-License-Identifier: EPL-2.0
9
- */
10
- import { Pipe } from '@angular/core';
11
- import { Arrays } from '@scion/toolkit/util';
12
- import * as i0 from "@angular/core";
13
- /**
14
- * Filters items that match the given predicate.
15
- */
16
- export class FilterByPredicatePipe {
17
- transform(items, predicate) {
18
- return Arrays.coerce(items).filter(predicate);
19
- }
20
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: FilterByPredicatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
21
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.2", ngImport: i0, type: FilterByPredicatePipe, isStandalone: true, name: "wbFilterByPredicate" }); }
22
- }
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: FilterByPredicatePipe, decorators: [{
24
- type: Pipe,
25
- args: [{ name: 'wbFilterByPredicate', standalone: true }]
26
- }] });
27
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsdGVyLWJ5LXByZWRpY2F0ZS5waXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc2Npb24vd29ya2JlbmNoL3NyYy9saWIvY29tbW9uL2ZpbHRlci1ieS1wcmVkaWNhdGUucGlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7R0FRRztBQUVILE9BQU8sRUFBQyxJQUFJLEVBQTJCLE1BQU0sZUFBZSxDQUFDO0FBQzdELE9BQU8sRUFBQyxNQUFNLEVBQUMsTUFBTSxxQkFBcUIsQ0FBQzs7QUFFM0M7O0dBRUc7QUFFSCxN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YXNzIEZpbHRlckJ5UHJlZGljYXRlUGlwZSBpbXBsZW1lbnRzIFBpcGVUcmFuc2Zvcm0ge1xuXG4gIHB1YmxpYyB0cmFuc2Zvcm08VD4oaXRlbXM6IFRbXSB8IG51bGwgfCB1bmRlZmluZWQsIHByZWRpY2F0ZTogUHJlZGljYXRlPFQ+KTogVFtdIHtcbiAgICByZXR1cm4gQXJyYXlzLmNvZXJjZShpdGVtcykuZmlsdGVyKHByZWRpY2F0ZSk7XG4gIH1cbn1cbiJdfQ==
@@ -1,39 +0,0 @@
1
- /*
2
- * Copyright (c) 2018-2023 Swiss Federal Railways
3
- *
4
- * This program and the accompanying materials are made
5
- * available under the terms of the Eclipse Public License 2.0
6
- * which is available at https://www.eclipse.org/legal/epl-2.0/
7
- *
8
- * SPDX-License-Identifier: EPL-2.0
9
- */
10
- import { Pipe } from '@angular/core';
11
- import { filterArray } from '@scion/toolkit/operators';
12
- import { expand, map, take } from 'rxjs/operators';
13
- import { Arrays } from '@scion/toolkit/util';
14
- import { of } from 'rxjs';
15
- import * as i0 from "@angular/core";
16
- /**
17
- * Filters items that match the text of the given {@link FormControl}.
18
- */
19
- export class FilterByTextPipe {
20
- transform(items, filterControl, itemTextFn) {
21
- return of(Arrays.coerce(items))
22
- .pipe(expand(it => filterControl.valueChanges.pipe(take(1), map(() => it))), filterArray(it => !filterControl.value || !!itemTextFn(it)?.match(toFilterRegExp(filterControl.value))));
23
- }
24
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: FilterByTextPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
25
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.2", ngImport: i0, type: FilterByTextPipe, isStandalone: true, name: "wbFilterByText$" }); }
26
- }
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: FilterByTextPipe, decorators: [{
28
- type: Pipe,
29
- args: [{ name: 'wbFilterByText$', standalone: true }]
30
- }] });
31
- /**
32
- * Creates a regular expression of the given filter text.
33
- */
34
- function toFilterRegExp(filterText) {
35
- // Escape the user filter input and add wildcard support
36
- const escapedString = filterText.replace(/[-[\]/{}()*+?.\\^$|]/g, '\\$&');
37
- return new RegExp(escapedString, 'i');
38
- }
39
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsdGVyLWJ5LXRleHQucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3NjaW9uL3dvcmtiZW5jaC9zcmMvbGliL2NvbW1vbi9maWx0ZXItYnktdGV4dC5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7OztHQVFHO0FBRUgsT0FBTyxFQUFDLElBQUksRUFBZ0IsTUFBTSxlQUFlLENBQUM7QUFFbEQsT0FBTyxFQUFDLFdBQVcsRUFBQyxNQUFNLDBCQUEwQixDQUFDO0FBQ3JELE9BQU8sRUFBQyxNQUFNLEVBQUUsR0FBRyxFQUFFLElBQUksRUFBQyxNQUFNLGdCQUFnQixDQUFDO0FBQ2pELE9BQU8sRUFBQyxNQUFNLEVBQUMsTUFBTSxxQkFBcUIsQ0FBQztBQUMzQyxPQUFPLEVBQWEsRUFBRSxFQUFDLE1BQU0sTUFBTSxDQUFDOztBQUVwQzs7R0FFRztBQUVILE1BQU0sT0FBTyxnQkFBZ0I7SUFFcEIsU0FBUyxDQUFJLEtBQTZCLEVBQUUsYUFBa0MsRUFBRSxVQUEyQztRQUNoSSxPQUFPLEVBQUUsQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQyxDQUFDO2FBQzVCLElBQUksQ0FDSCxNQUFNLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxhQUFhLENBQUMsWUFBWSxDQUFDLEl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BpcGUodGFrZSgxKSwgbWFwKCgpID0+IGl0KSkpLFxuICAgICAgICBmaWx0ZXJBcnJheShpdCA9PiAhZmlsdGVyQ29udHJvbC52YWx1ZSB8fCAhIWl0ZW1UZXh0Rm4oaXQpPy5tYXRjaCh0b0ZpbHRlclJlZ0V4cChmaWx0ZXJDb250cm9sLnZhbHVlKSkpLFxuICAgICAgKTtcbiAgfVxufVxuXG4vKipcbiAqIENyZWF0ZXMgYSByZWd1bGFyIGV4cHJlc3Npb24gb2YgdGhlIGdpdmVuIGZpbHRlciB0ZXh0LlxuICovXG5mdW5jdGlvbiB0b0ZpbHRlclJlZ0V4cChmaWx0ZXJUZXh0OiBzdHJpbmcpOiBSZWdFeHAge1xuICAvLyBFc2NhcGUgdGhlIHVzZXIgZmlsdGVyIGlucHV0IGFuZCBhZGQgd2lsZGNhcmQgc3VwcG9ydFxuICBjb25zdCBlc2NhcGVkU3RyaW5nID0gZmlsdGVyVGV4dC5yZXBsYWNlKC9bLVtcXF0ve30oKSorPy5cXFxcXiR8XS9nLCAnXFxcXCQmJyk7XG4gIHJldHVybiBuZXcgUmVnRXhwKGVzY2FwZWRTdHJpbmcsICdpJyk7XG59XG4iXX0=
@@ -1,17 +0,0 @@
1
- /*
2
- * Copyright (c) 2018-2024 Swiss Federal Railways
3
- *
4
- * This program and the accompanying materials are made
5
- * available under the terms of the Eclipse Public License 2.0
6
- * which is available at https://www.eclipse.org/legal/epl-2.0/
7
- *
8
- * SPDX-License-Identifier: EPL-2.0
9
- */
10
- import { UUID } from '@scion/toolkit/uuid';
11
- /**
12
- * Generates a UUID (universally unique identifier) compliant with the RFC 4122 version 4.
13
- */
14
- export function randomUUID() {
15
- return UUID.randomUUID();
16
- }
17
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXVpZC51dGlsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc2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pIGNvbXBsaWFudCB3aXRoIHRoZSBSRkMgNDEyMiB2ZXJzaW9uIDQuXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiByYW5kb21VVUlEKCk6IFVVSUQge1xuICByZXR1cm4gVVVJRC5yYW5kb21VVUlEKCkgYXMgVVVJRDtcbn1cbiJdfQ==
@@ -1,101 +0,0 @@
1
- /*
2
- * Copyright (c) 2018-2022 Swiss Federal Railways
3
- *
4
- * This program and the accompanying materials are made
5
- * available under the terms of the Eclipse Public License 2.0
6
- * which is available at https://www.eclipse.org/legal/epl-2.0/
7
- *
8
- * SPDX-License-Identifier: EPL-2.0
9
- */
10
- import { Directive, Input, Optional } from '@angular/core';
11
- import { fromDimension$ } from '@scion/toolkit/observable';
12
- import { setStyle } from '../common/dom.util';
13
- import { Subject } from 'rxjs';
14
- import { takeUntil } from 'rxjs/operators';
15
- import * as i0 from "@angular/core";
16
- import * as i1 from "../view/\u0275workbench-view.model";
17
- /**
18
- * Renders a given template as overlay. The template will stick to the bounding box of the host element of this directive.
19
- */
20
- export class ContentProjectionDirective {
21
- constructor(_host, _view) {
22
- this._host = _host;
23
- this._view = _view;
24
- }
25
- ngOnChanges(changes) {
26
- this._contentViewRef?.destroy();
27
- if (!this.overlayHost) {
28
- return;
29
- }
30
- // Create embedded view from content template and align it to the bounds of the host element.
31
- this._contentViewRef = this.overlayHost.createEmbeddedView(this.contentTemplateRef, null);
32
- this._contentViewRef.detectChanges();
33
- // Register dispose notifier.
34
- const dispose$ = new Subject();
35
- this._contentViewRef.onDestroy(() => dispose$.next());
36
- // Position projected content out of the document flow relative to the page viewport.
37
- this.styleContent({ position: 'fixed' });
38
- // Align content each time the bounding box element changes its size.
39
- fromDimension$(this._host.nativeElement)
40
- .pipe(takeUntil(dispose$))
41
- .subscribe(dimension => {
42
- if (isNullDimension(dimension)) {
43
- // When removing the bounding box element (this directive's host) from the DOM, its dimension drops to 0.
44
- // We ignore this event to preserve the dimension of projected content, crucial, for example, if projected
45
- // content implements virtual scrolling. Otherwise, its content would reload when adding the host to the DOM again.
46
- // For example, inactive views are removed from the DOM.
47
- return;
48
- }
49
- this.alignContentToHostBoundaries();
50
- });
51
- // Hide content when contextual view is detached, e.g., if not active, or located in the peripheral area and the main area is maximized.
52
- this._view?.portal.attached$
53
- .pipe(takeUntil(dispose$))
54
- .subscribe(attached => {
55
- this.setVisible(attached);
56
- });
57
- }
58
- /**
59
- * Aligns the content of the projection to the boundaries of the host element.
60
- */
61
- alignContentToHostBoundaries() {
62
- const hostPosition = this._host.nativeElement.getBoundingClientRect();
63
- this.styleContent({
64
- top: `${hostPosition.top}px`,
65
- left: `${hostPosition.left}px`,
66
- width: `${hostPosition.width}px`,
67
- height: `${hostPosition.height}px`,
68
- });
69
- }
70
- setVisible(visible) {
71
- // We use `visibility: hidden` and not `display: none` to preserve the dimension of projected content.
72
- // Otherwise:
73
- // - Projected content would flicker when attaching the contextual view, most noticeable with content that displays a microfrontend.
74
- // - Projected content would not retain virtual scrollable content since `display:none` sets width and height to 0.
75
- this.styleContent({ visibility: visible ? null : 'hidden' });
76
- }
77
- styleContent(style) {
78
- this._contentViewRef.rootNodes.forEach(node => setStyle(node, style));
79
- }
80
- ngOnDestroy() {
81
- this._contentViewRef?.destroy();
82
- }
83
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: ContentProjectionDirective, deps: [{ token: i0.ElementRef }, { token: i1.ɵWorkbenchView, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
84
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.2", type: ContentProjectionDirective, isStandalone: true, selector: "[wbContentProjection]", inputs: { overlayHost: ["wbContentProjectionOverlayHost", "overlayHost"], contentTemplateRef: ["wbContentProjectionContent", "contentTemplateRef"] }, usesOnChanges: true, ngImport: i0 }); }
85
- }
86
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: ContentProjectionDirective, decorators: [{
87
- type: Directive,
88
- args: [{ selector: '[wbContentProjection]', standalone: true }]
89
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.ɵWorkbenchView, decorators: [{
90
- type: Optional
91
- }] }], propDecorators: { overlayHost: [{
92
- type: Input,
93
- args: [{ alias: 'wbContentProjectionOverlayHost', required: true }]
94
- }], contentTemplateRef: [{
95
- type: Input,
96
- args: [{ alias: 'wbContentProjectionContent', required: true }]
97
- }] } });
98
- function isNullDimension(dimension) {
99
- return dimension.offsetWidth === 0 && dimension.offsetHeight === 0;
100
- }
101
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudC1wcm9qZWN0aW9uLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3NjaW9uL3dvcmtiZW5jaC9zcmMvbGliL2NvbnRlbnQtcHJvamVjdGlvbi9jb250ZW50LXByb2plY3Rpb24uZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7OztHQVFHO0FBRUgsT0FBTyxFQUFDLFNBQVMsRUFBK0IsS0FBSyxFQUF3QixRQUFRLEVBQStDLE1BQU0sZUFBZSxDQUFDO0FBRTFKLE9BQU8sRUFBWSxjQUFjLEVBQUMsTUFBTSwyQkFBMkIsQ0FBQztBQUNwRSxPQUFPLEVBQUMsUUFBUSxFQUFDLE1BQU0sb0JBQW9CLENBQUM7QUFDNUMsT0FBTyxFQUFDLE9BQU8sRUFBQyxNQUFNLE1BQU0sQ0FBQztBQUM3QixPQUFPLEVBQUMsU0FBUyxFQUFDLE1BQU0sZ0JBQWdCLENBQUM7OztBQUV6Qzs7R0FFRztBQUVILE1BQU0sT0FBTywwQkFBMEI7SUFnQnJDLFlBQW9CLEtBQThCLEVBQXNCLEtBQXFCO1FBQXpFLFV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