@scion/workbench 17.0.0-beta.6 → 17.0.0-beta.8

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 (314) hide show
  1. package/README.md +1 -1
  2. package/esm2022/lib/activation-instant.provider.mjs +3 -3
  3. package/esm2022/lib/common/asserts.util.mjs +2 -2
  4. package/esm2022/lib/common/class-list.mjs +61 -0
  5. package/esm2022/lib/common/coerce-observable.pipe.mjs +3 -3
  6. package/esm2022/lib/common/filter-by-predicate.pipe.mjs +3 -3
  7. package/esm2022/lib/common/filter-by-text.pipe.mjs +3 -3
  8. package/esm2022/lib/common/grid-element-if-visible.pipe.mjs +6 -6
  9. package/esm2022/lib/common/instanceof.pipe.mjs +3 -3
  10. package/esm2022/lib/common/map-coerce.pipe.mjs +3 -3
  11. package/esm2022/lib/common/null-if-empty.pipe.mjs +3 -3
  12. package/esm2022/lib/common/objects.util.mjs +34 -0
  13. package/esm2022/lib/common/typeof.pipe.mjs +3 -3
  14. package/esm2022/lib/common/uuid.util.mjs +17 -0
  15. package/esm2022/lib/content-projection/content-as-overlay.component.mjs +3 -3
  16. package/esm2022/lib/content-projection/content-projection.directive.mjs +3 -3
  17. package/esm2022/lib/dialog/dialog-footer/dialog-action-filter.pipe.mjs +3 -3
  18. package/esm2022/lib/dialog/dialog-footer/dialog-footer.component.mjs +3 -3
  19. package/esm2022/lib/dialog/dialog-footer/workbench-dialog-action.directive.mjs +3 -3
  20. package/esm2022/lib/dialog/dialog-footer/workbench-dialog-footer.directive.mjs +3 -3
  21. package/esm2022/lib/dialog/dialog-header/dialog-header.component.mjs +3 -3
  22. package/esm2022/lib/dialog/dialog-header/workbench-dialog-header.directive.mjs +3 -3
  23. package/esm2022/lib/dialog/movable.directive.mjs +3 -3
  24. package/esm2022/lib/dialog/resizable.directive.mjs +3 -3
  25. package/esm2022/lib/dialog/workbench-dialog.component.mjs +3 -3
  26. package/esm2022/lib/dialog/workbench-dialog.mjs +1 -1
  27. package/esm2022/lib/dialog/workbench-dialog.options.mjs +1 -1
  28. package/esm2022/lib/dialog/workbench-dialog.registry.mjs +4 -4
  29. package/esm2022/lib/dialog/workbench-dialog.service.mjs +5 -5
  30. package/esm2022/lib/dialog//311/265workbench-dialog.mjs +8 -26
  31. package/esm2022/lib/dialog//311/265workbench-dialog.service.mjs +3 -3
  32. package/esm2022/lib/filter-field/filter-field.component.mjs +6 -6
  33. package/esm2022/lib/glass-pane/glass-pane.directive.mjs +3 -3
  34. package/esm2022/lib/layout/grid-element/grid-element.component.mjs +10 -10
  35. package/esm2022/lib/layout/main-area-layout/main-area-layout.component.mjs +7 -4
  36. package/esm2022/lib/layout/migration/model/workbench-layout-migration-v1.model.mjs +11 -0
  37. package/esm2022/lib/layout/migration/model/workbench-layout-migration-v2.model.mjs +11 -0
  38. package/esm2022/lib/layout/migration/model/workbench-layout-migration-v3.model.mjs +11 -0
  39. package/esm2022/lib/layout/migration/model/workbench-layout-migration-v4.model.mjs +11 -0
  40. package/esm2022/lib/layout/migration/workbench-layout-migration-v2.service.mjs +59 -0
  41. package/esm2022/lib/layout/migration/workbench-layout-migration-v3.service.mjs +117 -0
  42. package/esm2022/lib/layout/migration/workbench-layout-migration-v4.service.mjs +57 -0
  43. package/esm2022/lib/layout/workbench-layout.component.mjs +7 -4
  44. package/esm2022/lib/layout/workbench-layout.factory.mjs +4 -4
  45. package/esm2022/lib/layout/workbench-layout.mjs +1 -1
  46. package/esm2022/lib/layout/workbench-layout.model.mjs +5 -6
  47. package/esm2022/lib/layout/workbench-layout.service.mjs +3 -3
  48. package/esm2022/lib/layout/workbench-layouts.util.mjs +53 -16
  49. package/esm2022/lib/layout/workench-layout-serializer.service.mjs +53 -21
  50. package/esm2022/lib/layout//311/265workbench-layout.factory.mjs +8 -5
  51. package/esm2022/lib/layout//311/265workbench-layout.mjs +382 -195
  52. package/esm2022/lib/logging/console-appender.service.mjs +3 -3
  53. package/esm2022/lib/logging/logger-names.mjs +8 -9
  54. package/esm2022/lib/logging/logger.mjs +3 -3
  55. package/esm2022/lib/logging/logging-support.mjs +4 -4
  56. package/esm2022/lib/logging/logging.model.mjs +3 -3
  57. package/esm2022/lib/logging//311/265logger.mjs +3 -3
  58. package/esm2022/lib/message-box/message-box-footer/message-box-footer.component.mjs +18 -20
  59. package/esm2022/lib/message-box/message-box-header/message-box-header.component.mjs +3 -3
  60. package/esm2022/lib/message-box/workbench-message-box.component.mjs +3 -3
  61. package/esm2022/lib/message-box/workbench-message-box.options.mjs +1 -1
  62. package/esm2022/lib/message-box/workbench-message-box.service.mjs +5 -5
  63. package/esm2022/lib/message-box//311/265workbench-message-box.service.mjs +5 -5
  64. package/esm2022/lib/microfrontend-platform/common/microfrontend.util.mjs +55 -0
  65. package/esm2022/lib/microfrontend-platform/initialization/microfrontend-platform-initializer.service.mjs +34 -22
  66. package/esm2022/lib/microfrontend-platform/initialization/ng-zone-observable-decorator.mjs +3 -3
  67. package/esm2022/lib/microfrontend-platform/initialization/workbench-host-manifest-interceptor.service.mjs +3 -3
  68. package/esm2022/lib/microfrontend-platform/microfrontend-dialog/microfrontend-dialog-capability-validator.interceptor.mjs +53 -0
  69. package/esm2022/lib/microfrontend-platform/microfrontend-dialog/microfrontend-dialog-intent-handler.interceptor.mjs +85 -0
  70. package/esm2022/lib/microfrontend-platform/microfrontend-dialog/microfrontend-dialog.component.mjs +140 -0
  71. package/esm2022/lib/microfrontend-platform/microfrontend-host-dialog/microfrontend-host-dialog.component.mjs +122 -0
  72. package/esm2022/lib/microfrontend-platform/microfrontend-host-popup/microfrontend-host-popup.component.mjs +11 -10
  73. package/esm2022/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-intent-handler.service.mjs +3 -3
  74. package/esm2022/lib/microfrontend-platform/microfrontend-notification/microfrontend-notification-intent-handler.service.mjs +3 -3
  75. package/esm2022/lib/microfrontend-platform/microfrontend-platform-config-loader.mjs +3 -3
  76. package/esm2022/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup-capability-validator.interceptor.mjs +30 -0
  77. package/esm2022/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup-intent-handler.interceptor.mjs +130 -0
  78. package/esm2022/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup.component.mjs +18 -30
  79. package/esm2022/lib/microfrontend-platform/microfrontend-splash/microfrontend-splash.component.mjs +3 -3
  80. package/esm2022/lib/microfrontend-platform/microfrontend-view/microfrontend-view-command-handler.service.mjs +9 -31
  81. package/esm2022/lib/microfrontend-platform/microfrontend-view/microfrontend-view.component.mjs +88 -144
  82. package/esm2022/lib/microfrontend-platform/microfrontend-view/microfrontend-workbench-view.model.mjs +23 -0
  83. package/esm2022/lib/microfrontend-platform/routing/microfrontend-view-capability-id-assigner.interceptor.mjs +41 -0
  84. package/esm2022/lib/microfrontend-platform/routing/microfrontend-view-capability-validator.interceptor.mjs +30 -0
  85. package/esm2022/lib/microfrontend-platform/routing/microfrontend-view-intent-handler.interceptor.mjs +125 -0
  86. package/esm2022/lib/microfrontend-platform/routing/microfrontend-view-routes.mjs +103 -0
  87. package/esm2022/lib/microfrontend-platform/workbench-microfrontend-support.mjs +45 -47
  88. package/esm2022/lib/migration/workbench-migration.mjs +11 -0
  89. package/esm2022/lib/migration/workbench-migrator.mjs +38 -0
  90. package/esm2022/lib/notification/notification-css-classes.pipe.mjs +3 -3
  91. package/esm2022/lib/notification/notification-list.component.mjs +3 -3
  92. package/esm2022/lib/notification/notification.component.mjs +3 -3
  93. package/esm2022/lib/notification/notification.config.mjs +1 -1
  94. package/esm2022/lib/notification/notification.mjs +1 -1
  95. package/esm2022/lib/notification/notification.service.mjs +9 -9
  96. package/esm2022/lib/notification/text-notification.component.mjs +3 -3
  97. package/esm2022/lib/page-not-found/format-url.pipe.mjs +26 -0
  98. package/esm2022/lib/page-not-found/page-not-found.component.mjs +28 -0
  99. package/esm2022/lib/part/part-action-bar/part-action-bar.component.mjs +3 -3
  100. package/esm2022/lib/part/part-action-bar/part-action-filter.pipe.mjs +3 -3
  101. package/esm2022/lib/part/part-action-bar/part-action.directive.mjs +4 -4
  102. package/esm2022/lib/part/part-bar/part-bar.component.mjs +11 -8
  103. package/esm2022/lib/part/part-portal.pipe.mjs +3 -3
  104. package/esm2022/lib/part/part.component.mjs +7 -4
  105. package/esm2022/lib/part/view-context-menu/accelerator-format.pipe.mjs +3 -3
  106. package/esm2022/lib/part/view-context-menu/text.component.mjs +3 -3
  107. package/esm2022/lib/part/view-context-menu/view-menu.component.mjs +3 -3
  108. package/esm2022/lib/part/view-context-menu/view-menu.directive.mjs +4 -4
  109. package/esm2022/lib/part/view-context-menu/view-menu.service.mjs +19 -19
  110. package/esm2022/lib/part/view-list/view-list.component.mjs +3 -3
  111. package/esm2022/lib/part/view-list-button/view-list-button.component.mjs +3 -3
  112. package/esm2022/lib/part/view-list-item/view-list-item.component.mjs +9 -9
  113. package/esm2022/lib/part/view-tab/view-tab.component.mjs +16 -13
  114. package/esm2022/lib/part/view-tab-content/view-tab-content.component.mjs +5 -5
  115. package/esm2022/lib/part/view-tab-drag-image/view-tab-drag-image.component.mjs +9 -9
  116. package/esm2022/lib/part/workbench-part-action.registry.mjs +3 -3
  117. package/esm2022/lib/part/workbench-part.model.mjs +1 -1
  118. package/esm2022/lib/part/workbench-part.registry.mjs +3 -3
  119. package/esm2022/lib/part//311/265workbench-part.model.mjs +3 -3
  120. package/esm2022/lib/perspective/migration/model/workbench-perspective-migration-v1.model.mjs +11 -0
  121. package/esm2022/lib/perspective/migration/model/workbench-perspective-migration-v2.model.mjs +11 -0
  122. package/esm2022/lib/perspective/migration/workbench-perspective-migration-v2.service.mjs +57 -0
  123. package/esm2022/lib/perspective/workbench-grid-merger.service.mjs +19 -51
  124. package/esm2022/lib/perspective/workbench-perspective-storage.service.mjs +23 -18
  125. package/esm2022/lib/perspective/workbench-perspective-view-conflict-resolver.service.mjs +27 -42
  126. package/esm2022/lib/perspective/workbench-perspective.model.mjs +1 -1
  127. package/esm2022/lib/perspective/workbench-perspective.registry.mjs +3 -3
  128. package/esm2022/lib/perspective/workbench-perspective.service.mjs +15 -10
  129. package/esm2022/lib/perspective/workench-perspective-serializer.service.mjs +62 -0
  130. package/esm2022/lib/perspective//311/265workbench-perspective.model.mjs +98 -78
  131. package/esm2022/lib/popup/popup.component.mjs +3 -3
  132. package/esm2022/lib/popup/popup.config.mjs +1 -1
  133. package/esm2022/lib/popup/popup.service.mjs +3 -3
  134. package/esm2022/lib/portal/workbench-portal-outlet.directive.mjs +6 -6
  135. package/esm2022/lib/public_api.mjs +3 -2
  136. package/esm2022/lib/registry/workbench-object-registry.mjs +3 -3
  137. package/esm2022/lib/routing/empty-outlet/empty-outlet.component.mjs +31 -0
  138. package/esm2022/lib/routing/public_api.mjs +1 -1
  139. package/esm2022/lib/routing/router.util.mjs +96 -71
  140. package/esm2022/lib/routing/routing.model.mjs +11 -0
  141. package/esm2022/lib/routing/url-segment-matcher.mjs +46 -0
  142. package/esm2022/lib/routing/workbench-auxiliary-routes-registrator.service.mjs +58 -50
  143. package/esm2022/lib/routing/workbench-dialog-differ.mjs +51 -0
  144. package/esm2022/lib/routing/workbench-layout-differ.mjs +14 -17
  145. package/esm2022/lib/routing/workbench-navigational-states.mjs +11 -25
  146. package/esm2022/lib/routing/workbench-popup-differ.mjs +6 -6
  147. package/esm2022/lib/routing/workbench-route-data.mjs +15 -14
  148. package/esm2022/lib/routing/workbench-router-link.directive.mjs +24 -33
  149. package/esm2022/lib/routing/workbench-router.service.mjs +13 -378
  150. package/esm2022/lib/routing/workbench-url-observer.service.mjs +65 -36
  151. package/esm2022/lib/routing//311/265location.mjs +3 -3
  152. package/esm2022/lib/routing//311/265workbench-router.service.mjs +317 -0
  153. package/esm2022/lib/startup/splash/splash.component.mjs +3 -3
  154. package/esm2022/lib/startup/workbench-launcher.service.mjs +11 -11
  155. package/esm2022/lib/storage/workbench-storage.mjs +3 -3
  156. package/esm2022/lib/testing/public_api.mjs +2 -1
  157. package/esm2022/lib/testing/workbench-testing.module.mjs +13 -39
  158. package/esm2022/lib/testing/workbench.provider.mjs +60 -0
  159. package/esm2022/lib/theme/workbench-theme-switcher.service.mjs +3 -3
  160. package/esm2022/lib/view/public_api.mjs +2 -1
  161. package/esm2022/lib/view/view-move-handler.service.mjs +42 -62
  162. package/esm2022/lib/view/view-portal.pipe.mjs +4 -4
  163. package/esm2022/lib/view/view.component.mjs +8 -38
  164. package/esm2022/lib/view/workbench-view-route-guards.mjs +47 -0
  165. package/esm2022/lib/view/workbench-view.model.mjs +6 -4
  166. package/esm2022/lib/view/workbench-view.registry.mjs +4 -4
  167. package/esm2022/lib/view//311/265workbench-view.model.mjs +135 -28
  168. package/esm2022/lib/view-dnd/grid-drop-targets.util.mjs +33 -32
  169. package/esm2022/lib/view-dnd/requires-drop-zone.pipe.mjs +7 -7
  170. package/esm2022/lib/view-dnd/view-drag.service.mjs +6 -6
  171. package/esm2022/lib/view-dnd/view-drop-placeholder-renderer.service.mjs +3 -3
  172. package/esm2022/lib/view-dnd/view-drop-zone.directive.mjs +4 -4
  173. package/esm2022/lib/view-dnd/view-tab-drag-image-renderer.service.mjs +11 -9
  174. package/esm2022/lib/workbench-config.mjs +15 -0
  175. package/esm2022/lib/workbench-id.mjs +3 -3
  176. package/esm2022/lib/workbench.component.mjs +14 -10
  177. package/esm2022/lib/workbench.constants.mjs +8 -10
  178. package/esm2022/lib/workbench.model.mjs +1 -1
  179. package/esm2022/lib/workbench.module.mjs +15 -86
  180. package/esm2022/lib/workbench.provider.mjs +117 -0
  181. package/esm2022/lib/workbench.service.mjs +5 -5
  182. package/esm2022/lib//311/265workbench.service.mjs +15 -21
  183. package/fesm2022/scion-workbench.mjs +5527 -4289
  184. package/fesm2022/scion-workbench.mjs.map +1 -1
  185. package/lib/common/class-list.d.ts +51 -0
  186. package/lib/common/objects.util.d.ts +17 -0
  187. package/lib/common/uuid.util.d.ts +8 -0
  188. package/lib/dialog/workbench-dialog.d.ts +3 -7
  189. package/lib/dialog/workbench-dialog.options.d.ts +5 -4
  190. package/lib/dialog/workbench-dialog.registry.d.ts +4 -3
  191. package/lib/dialog/workbench-dialog.service.d.ts +1 -1
  192. package/lib/dialog//311/265workbench-dialog.d.ts +4 -6
  193. package/lib/filter-field/filter-field.component.d.ts +1 -1
  194. package/lib/layout/grid-element/grid-element.component.d.ts +2 -2
  195. package/lib/layout/migration/model/workbench-layout-migration-v1.model.d.ts +16 -0
  196. package/lib/layout/migration/model/workbench-layout-migration-v2.model.d.ts +22 -0
  197. package/lib/layout/migration/model/workbench-layout-migration-v3.model.d.ts +30 -0
  198. package/lib/layout/migration/model/workbench-layout-migration-v4.model.d.ts +31 -0
  199. package/lib/layout/migration/workbench-layout-migration-v2.service.d.ts +13 -0
  200. package/lib/layout/migration/workbench-layout-migration-v3.service.d.ts +16 -0
  201. package/lib/layout/migration/workbench-layout-migration-v4.service.d.ts +12 -0
  202. package/lib/layout/workbench-layout.d.ts +61 -7
  203. package/lib/layout/workbench-layout.factory.d.ts +1 -1
  204. package/lib/layout/workbench-layout.model.d.ts +19 -9
  205. package/lib/layout/workbench-layouts.util.d.ts +22 -6
  206. package/lib/layout/workench-layout-serializer.service.d.ts +28 -7
  207. package/lib/layout//311/265workbench-layout.d.ts +172 -98
  208. package/lib/layout//311/265workbench-layout.factory.d.ts +4 -0
  209. package/lib/logging/logger-names.d.ts +7 -7
  210. package/lib/logging/logging-support.d.ts +2 -2
  211. package/lib/message-box/workbench-message-box.options.d.ts +4 -3
  212. package/lib/message-box/workbench-message-box.service.d.ts +1 -1
  213. package/lib/microfrontend-platform/common/microfrontend.util.d.ts +22 -0
  214. package/lib/microfrontend-platform/initialization/microfrontend-platform-initializer.service.d.ts +15 -9
  215. package/lib/microfrontend-platform/microfrontend-dialog/microfrontend-dialog-capability-validator.interceptor.d.ts +11 -0
  216. package/lib/microfrontend-platform/microfrontend-dialog/microfrontend-dialog-intent-handler.interceptor.d.ts +28 -0
  217. package/lib/microfrontend-platform/microfrontend-dialog/microfrontend-dialog.component.d.ts +52 -0
  218. package/lib/microfrontend-platform/microfrontend-host-dialog/microfrontend-host-dialog.component.d.ts +37 -0
  219. package/lib/microfrontend-platform/microfrontend-host-popup/microfrontend-host-popup.component.d.ts +2 -1
  220. package/lib/microfrontend-platform/microfrontend-popup/{microfrontend-popup-capability-interceptor.service.d.ts → microfrontend-popup-capability-validator.interceptor.d.ts} +3 -3
  221. package/lib/microfrontend-platform/microfrontend-popup/{microfrontend-popup-intent-interceptor.service.d.ts → microfrontend-popup-intent-handler.interceptor.d.ts} +9 -6
  222. package/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup.component.d.ts +7 -10
  223. package/lib/microfrontend-platform/microfrontend-view/microfrontend-view-command-handler.service.d.ts +2 -9
  224. package/lib/microfrontend-platform/microfrontend-view/microfrontend-view.component.d.ts +12 -23
  225. package/lib/microfrontend-platform/microfrontend-view/microfrontend-workbench-view.model.d.ts +14 -0
  226. package/lib/microfrontend-platform/routing/microfrontend-view-capability-id-assigner.interceptor.d.ts +10 -0
  227. package/lib/microfrontend-platform/routing/{microfrontend-view-capability-interceptor.service.d.ts → microfrontend-view-capability-validator.interceptor.d.ts} +3 -3
  228. package/lib/microfrontend-platform/routing/{microfrontend-view-intent-interceptor.service.d.ts → microfrontend-view-intent-handler.interceptor.d.ts} +6 -5
  229. package/lib/microfrontend-platform/routing/microfrontend-view-routes.d.ts +49 -0
  230. package/lib/microfrontend-platform/workbench-microfrontend-support.d.ts +3 -2
  231. package/lib/migration/workbench-migration.d.ts +9 -0
  232. package/lib/migration/workbench-migrator.d.ts +18 -0
  233. package/lib/notification/notification.config.d.ts +1 -1
  234. package/lib/notification/notification.d.ts +1 -3
  235. package/lib/page-not-found/format-url.pipe.d.ts +11 -0
  236. package/lib/page-not-found/page-not-found.component.d.ts +8 -0
  237. package/lib/part/part-action-bar/part-action.directive.d.ts +1 -1
  238. package/lib/part/part-bar/part-bar.component.d.ts +4 -3
  239. package/lib/part/view-context-menu/view-menu.directive.d.ts +1 -1
  240. package/lib/part/view-context-menu/view-menu.service.d.ts +5 -4
  241. package/lib/part/view-list-item/view-list-item.component.d.ts +5 -4
  242. package/lib/part/view-tab/view-tab.component.d.ts +6 -5
  243. package/lib/part/view-tab-drag-image/view-tab-drag-image.component.d.ts +3 -3
  244. package/lib/part/workbench-part.model.d.ts +5 -4
  245. package/lib/part//311/265workbench-part.model.d.ts +5 -4
  246. package/lib/perspective/migration/model/workbench-perspective-migration-v1.model.d.ts +8 -0
  247. package/lib/perspective/migration/model/workbench-perspective-migration-v2.model.d.ts +10 -0
  248. package/lib/perspective/migration/workbench-perspective-migration-v2.service.d.ts +13 -0
  249. package/lib/perspective/workbench-grid-merger.service.d.ts +9 -16
  250. package/lib/perspective/workbench-perspective-storage.service.d.ts +10 -28
  251. package/lib/perspective/workbench-perspective-view-conflict-resolver.service.d.ts +8 -25
  252. package/lib/perspective/workbench-perspective.model.d.ts +123 -14
  253. package/lib/perspective/workbench-perspective.service.d.ts +10 -3
  254. package/lib/perspective/workench-perspective-serializer.service.d.ts +26 -0
  255. package/lib/perspective//311/265workbench-perspective.model.d.ts +16 -14
  256. package/lib/popup/popup.config.d.ts +4 -3
  257. package/lib/portal/workbench-portal-outlet.directive.d.ts +2 -2
  258. package/lib/public_api.d.ts +4 -3
  259. package/lib/registry/workbench-object-registry.d.ts +2 -2
  260. package/lib/routing/empty-outlet/empty-outlet.component.d.ts +15 -0
  261. package/lib/routing/public_api.d.ts +2 -1
  262. package/lib/routing/router.util.d.ts +45 -31
  263. package/lib/routing/routing.model.d.ts +129 -0
  264. package/lib/routing/url-segment-matcher.d.ts +20 -0
  265. package/lib/routing/workbench-auxiliary-routes-registrator.service.d.ts +25 -16
  266. package/lib/routing/workbench-dialog-differ.d.ts +25 -0
  267. package/lib/routing/workbench-layout-differ.d.ts +4 -7
  268. package/lib/routing/workbench-navigational-states.d.ts +11 -21
  269. package/lib/routing/workbench-route-data.d.ts +14 -12
  270. package/lib/routing/workbench-router-link.directive.d.ts +22 -7
  271. package/lib/routing/workbench-router.service.d.ts +42 -157
  272. package/lib/routing/workbench-url-observer.service.d.ts +18 -6
  273. package/lib/routing//311/265workbench-router.service.d.ts +75 -0
  274. package/lib/startup/workbench-launcher.service.d.ts +4 -4
  275. package/lib/testing/public_api.d.ts +1 -0
  276. package/lib/testing/workbench-testing.module.d.ts +7 -6
  277. package/lib/testing/workbench.provider.d.ts +29 -0
  278. package/lib/view/public_api.d.ts +2 -1
  279. package/lib/view/view-move-handler.service.d.ts +2 -4
  280. package/lib/view/view-portal.pipe.d.ts +2 -1
  281. package/lib/view/view.component.d.ts +1 -11
  282. package/lib/view/workbench-view-route-guards.d.ts +36 -0
  283. package/lib/view/workbench-view.model.d.ts +46 -13
  284. package/lib/view/workbench-view.registry.d.ts +4 -3
  285. package/lib/view//311/265workbench-view.model.d.ts +79 -14
  286. package/lib/view-dnd/grid-drop-targets.util.d.ts +15 -17
  287. package/lib/view-dnd/view-drag.service.d.ts +12 -4
  288. package/lib/view-dnd/view-drop-zone.directive.d.ts +1 -1
  289. package/lib/{workbench-module-config.d.ts → workbench-config.d.ts} +29 -71
  290. package/lib/workbench.component.d.ts +2 -2
  291. package/lib/workbench.constants.d.ts +6 -8
  292. package/lib/workbench.model.d.ts +20 -8
  293. package/lib/workbench.module.d.ts +12 -7
  294. package/lib/workbench.provider.d.ts +38 -0
  295. package/lib/workbench.service.d.ts +32 -8
  296. package/lib//311/265workbench.service.d.ts +9 -3
  297. package/package.json +8 -8
  298. package/esm2022/lib/layout/migration/workbench-layout-migrator.service.mjs +0 -38
  299. package/esm2022/lib/layout/migration/workbench-layout-v1-migrator.service.mjs +0 -59
  300. package/esm2022/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup-capability-interceptor.service.mjs +0 -30
  301. package/esm2022/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup-intent-interceptor.service.mjs +0 -130
  302. package/esm2022/lib/microfrontend-platform/routing/microfrontend-navigational-states.mjs +0 -22
  303. package/esm2022/lib/microfrontend-platform/routing/microfrontend-routes.mjs +0 -71
  304. package/esm2022/lib/microfrontend-platform/routing/microfrontend-view-capability-interceptor.service.mjs +0 -54
  305. package/esm2022/lib/microfrontend-platform/routing/microfrontend-view-intent-interceptor.service.mjs +0 -123
  306. package/esm2022/lib/routing/navigation-state.resolver.mjs +0 -54
  307. package/esm2022/lib/view/workbench-view-pre-destroy.guard.mjs +0 -36
  308. package/esm2022/lib/workbench-module-config.mjs +0 -15
  309. package/lib/layout/migration/workbench-layout-migrator.service.d.ts +0 -15
  310. package/lib/layout/migration/workbench-layout-v1-migrator.service.d.ts +0 -12
  311. package/lib/microfrontend-platform/routing/microfrontend-navigational-states.d.ts +0 -11
  312. package/lib/microfrontend-platform/routing/microfrontend-routes.d.ts +0 -38
  313. package/lib/routing/navigation-state.resolver.d.ts +0 -12
  314. package/lib/view/workbench-view-pre-destroy.guard.d.ts +0 -5
@@ -1,180 +1,65 @@
1
- import { NavigationExtras, Router } from '@angular/router';
2
- import { Dictionary } from '@scion/toolkit/util';
3
- import { NgZone, OnDestroy } from '@angular/core';
4
- import { WorkbenchLayoutService } from '../layout/workbench-layout.service';
5
- import { WorkbenchViewRegistry } from '../view/workbench-view.registry';
6
- import { ɵWorkbenchLayout } from '../layout/ɵworkbench-layout';
1
+ import { NavigationExtras } from '@angular/router';
2
+ import { Commands, NavigateFn, WorkbenchNavigationExtras } from './routing.model';
7
3
  import * as i0 from "@angular/core";
8
4
  /**
9
- * Provides workbench view navigation capabilities based on Angular Router.
5
+ * Enables navigation of workbench views and modification of the workbench layout.
6
+ *
7
+ * A view is a visual workbench element for displaying content side-by-side or stacked. A view can be navigated to any route.
8
+ *
9
+ * A view can inject `ActivatedRoute` to obtain parameters passed to the navigation and/or read data associated with the route.
10
10
  */
11
- export declare class WorkbenchRouter implements OnDestroy {
12
- private _router;
13
- private _viewRegistry;
14
- private _workbenchLayoutService;
15
- private _zone;
16
- private _singleTaskExecutor;
17
- /**
18
- * Holds the current navigational context during a workbench navigation, or `null` if no navigation is in progress.
19
- */
20
- private _currentNavigationContext;
21
- constructor(_router: Router, _viewRegistry: WorkbenchViewRegistry, _workbenchLayoutService: WorkbenchLayoutService, _zone: NgZone);
11
+ export declare abstract class WorkbenchRouter {
22
12
  /**
23
- * Navigates based on the provided array of commands, and is like 'Router.navigate(...)' but with a workbench view as the router outlet target.
24
- * Navigation is absolute unless providing a `relativeTo` route in navigational extras.
13
+ * Navigates based on the provided array of commands and extras. This method is similar to Angular's `Router.navigate(...)`, but with a view as the navigation target.
25
14
  *
26
- * By passing navigation extras, you can control navigation. By default, the router opens a new view tab if no view is found that matches the
27
- * specified path. Matrix parameters do not affect view resolution. If one (or more) view(s) match the specified path, they are navigated
28
- * instead of opening the view in a new view tab, e.g., to update matrix parameters.
15
+ * A command can be a string or an object literal. A string represents a path segment, an object literal associates matrix parameters with the preceding segment.
16
+ * Multiple segments can be combined into a single command, separated by a forward slash.
29
17
  *
30
- * The router supports for closing views matching the routing commands by setting `close` in navigational extras.
18
+ * By default, navigates existing views that match the path, or opens a new view otherwise. Matrix params do not affect view resolution.
19
+ * This behavior can be changed by setting an explicit navigation target in navigation extras.
31
20
  *
32
- * ### Commands
33
- * - Multiple static segments can be merged into one, e.g. `['/team/11/user', userName, {details: true}]`
34
- * - The first segment name can be prepended with `/`, `./`, or `../`
35
- * - Matrix parameters can be used to associate optional data with the URL, e.g. `['user', userName, {details: true}]`
36
- * Matrix parameters are like regular URL parameters, but do not affect route and view resolution. Unlike query parameters, matrix parameters
37
- * are not global but part of the routing path, which makes them suitable for auxiliary routes.
21
+ * By default, navigation is absolute. Set `relativeTo` in extras for relative navigation.
38
22
  *
39
- * ### Usage
23
+ * The router supports for closing views matching the routing commands by setting `close` in navigation extras.
40
24
  *
25
+ * ### Usage
41
26
  * ```
42
- * router.navigate(['team', 33, 'user', 11]);
43
- * router.navigate(['team/11/user', userName, {details: true}]); // multiple static segments can be merged into one
44
- * router.navigate(['teams', {selection: 33'}]); // matrix parameter 'selection' with the value '33'.
27
+ * inject(WorkbenchRouter).navigate(['team', 33, 'user', 11]);
28
+ * inject(WorkbenchRouter).navigate(['team/11/user', userName, {details: true}]); // multiple static segments can be merged into one
29
+ * inject(WorkbenchRouter).navigate(['teams', {selection: 33'}]); // matrix parameter `selection` with the value `33`.
45
30
  * ```
46
31
  *
47
32
  * @see WorkbenchRouterLinkDirective
48
33
  */
49
- navigate(commands: Commands, extras?: WorkbenchNavigationExtras): Promise<boolean>;
50
- /**
51
- * Experimental API for modifying the workbench layout.
52
- *
53
- * @param onNavigate - Callback to modify the current layout.
54
- * The callback is passed the current layout which can be modified and returned for navigation. Returning `null` does not perform the navigation.
55
- * @param extras - Controls how to perform the navigation.
56
- */
57
- ɵnavigate(onNavigate: (layout: ɵWorkbenchLayout) => Promise<ɵWorkbenchLayout | WorkbenchNavigation | null> | ɵWorkbenchLayout | WorkbenchNavigation | null, extras?: NavigationExtras): Promise<boolean>;
58
- /**
59
- * This method name begins with underscores to indicate that it must only be invoked from within {@link SingleTaskExecutor}.
60
- */
61
- private __createUrlTree;
62
- /**
63
- * @see normalizeCommands
64
- */
65
- private normalizeOutletCommands;
34
+ abstract navigate(commands: Commands, extras?: WorkbenchNavigationExtras): Promise<boolean>;
66
35
  /**
67
- * Normalizes commands to their absolute form.
36
+ * Performs changes to the current workbench layout.
68
37
  *
69
- * ---
70
- * As of Angular 6.x, commands which target a named outlet (auxiliary route) are not normalized, meaning that
71
- * relative navigational symbols like `/`, `./`, or `../` are not resolved (see `create_url_tree.ts` method: `computeNavigation`).
38
+ * The router will invoke the passed function with the current workbench layout. The layout has methods for modifying it.
39
+ * The layout is immutable, so each modification creates a new instance. Use the instance for further modifications and finally return it.
72
40
  *
73
- * Example: router.navigate([{outlets: {[outlet]: commands}}])
74
- *
75
- * To bypass that restriction, we first create a URL tree without specifying the target outlet. As expected, this translates into a
76
- * URL with all navigational symbols resolved. Then, we extract the URL segments of the resolved route and convert it back into commands.
77
- * The resulting commands are in their absolute form and may be used for the effective navigation to target a named router outlet.
78
- */
79
- private normalizeCommands;
80
- /**
81
- * Blocks until the initial layout is available, i.e. after completion of Angular's initial navigation.
82
- */
83
- private waitForInitialLayout;
84
- /**
85
- * Serializes given commands into valid URL segments.
86
- */
87
- private serializeCommands;
88
- ngOnDestroy(): void;
89
- static ɵfac: i0.ɵɵFactoryDeclaration<WorkbenchRouter, never>;
90
- static ɵprov: i0.ɵɵInjectableDeclaration<WorkbenchRouter>;
91
- }
92
- /**
93
- * Represents the extra options used during navigation.
94
- */
95
- export interface WorkbenchNavigationExtras extends NavigationExtras {
96
- /**
97
- * Instructs the router to activate the view. Defaults to `true` if not specified.
98
- */
99
- activate?: boolean;
100
- /**
101
- * Closes the view(s) that match the specified path. Matrix parameters do not affect view resolution.
102
- * The path supports the asterisk wildcard segment (`*`) to match view(s) with any value in that segment.
103
- * To close a specific view, set a view target instead of a path.
104
- */
105
- close?: boolean;
106
- /**
107
- * Controls where to open the view.
41
+ * The function can call `inject` to get any required dependencies.
108
42
  *
109
- * One of:
110
- * - 'auto': Opens the view in a new view tab if no view is found that matches the specified path. Matrix parameters do not affect
111
- * view resolution. If one (or more) view(s) match the specified path, they are navigated instead of opening the view
112
- * in a new view tab, e.g., to update matrix parameters. This is the default behavior if not set.
113
- * - 'blank': Opens the view in a new view tab.
114
- * - <view.id>: Navigates the specified view. If already opened, replaces it, or opens the view in a new view tab otherwise.
115
- * Note that the passed view identifier must start with `view.`, e.g., `view.5`.
43
+ * ## Workbench Layout
44
+ * The workbench layout is a grid of parts. Parts are aligned relative to each other. A part is a stack of views. Content is displayed in views.
116
45
  *
117
- * If not specified, defaults to `auto`.
118
- */
119
- target?: string | 'blank' | 'auto';
120
- /**
121
- * Specifies in which part to open the view. By default, if not specified, opens the view in the active part of the main area,
122
- * if the layout has one, otherwise in the active part of the layout.
123
- */
124
- blankPartId?: string;
125
- /**
126
- * Specifies the position where to insert the view into the tab bar when using 'blank' view target strategy.
127
- * If not specified, the view is inserted after the active view. Set the index to 'start' or 'end' for inserting
128
- * the view at the beginning or at the end.
129
- */
130
- blankInsertionIndex?: number | 'start' | 'end';
131
- /**
132
- * State that will be passed to the navigation.
46
+ * ## Example
47
+ * The following example adds a part to the left of the main area, inserts a view and navigates it.
133
48
  *
134
- * See {@link NavigationExtras#state} for detailed instructions on how to access passed state during and after the navigation.
49
+ * ```ts
50
+ * inject(WorkbenchRouter).navigate(layout => layout
51
+ * .addPart('left', {relativeTo: MAIN_AREA, align: 'left'})
52
+ * .addView('navigator', {partId: 'left'})
53
+ * .navigateView('navigator', ['path/to/view'])
54
+ * .activateView('navigator')
55
+ * );
56
+ * ```
135
57
  *
136
- * In addition, the workbench router makes state available to the routed component as resolved data under the key {@link WorkbenchRouteData.state}.
137
- */
138
- state?: Dictionary;
139
- /**
140
- * Specifies CSS class(es) to be added to the view, useful in end-to-end tests for locating view and view tab.
141
- * CSS class(es) will not be added to the browser URL, consequently will not survive a page reload.
142
- */
143
- cssClass?: string | string[];
144
- }
145
- /**
146
- * An array of URL fragments with which to construct a view's URL.
147
- *
148
- * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path segments,
149
- * followed by the parameters for each segment.
150
- *
151
- * The last segment allows adding matrix parameters in the form of a dictionary to provide additional data along
152
- * with the URL. Matrix parameters do not affect route resolution. In the routed component, matrix parameters are
153
- * available in {@link ActivatedRoute#params}.
154
- *
155
- * Example command array with 'details' as matrix parameter: `['user', userName, {details: true}]`,
156
- */
157
- export type Commands = any[];
158
- /**
159
- * Information about a workbench navigation operation.
160
- */
161
- export interface WorkbenchNavigation {
162
- /**
163
- * The target layout to apply.
164
- */
165
- layout: ɵWorkbenchLayout;
166
- /**
167
- * View outlet delta to apply to the current URL. For each outlet to add, remove, or change,
168
- * add a property to this dictionary and set the commands to construct the outlet URL.
169
- * To remove an outlet from the URL, set its commands to `null`.
170
- */
171
- viewOutlets?: {
172
- [outlet: string]: Commands | null;
173
- };
174
- /**
175
- * State to be passed to the routed component as resolved data under the key {@link WorkbenchRouteData.state}.
58
+ * @param onNavigate - Specifies the callback to modify the layout.
59
+ * @param extras - Controls how to perform the navigation.
60
+ * @see NavigateFn
176
61
  */
177
- viewStates?: {
178
- [outlet: string]: Dictionary;
179
- };
62
+ abstract navigate(onNavigate: NavigateFn, extras?: Omit<NavigationExtras, 'relativeTo' | 'state'>): Promise<boolean>;
63
+ static ɵfac: i0.ɵɵFactoryDeclaration<WorkbenchRouter, never>;
64
+ static ɵprov: i0.ɵɵInjectableDeclaration<WorkbenchRouter>;
180
65
  }
@@ -4,16 +4,17 @@ import { WorkbenchAuxiliaryRoutesRegistrator } from './workbench-auxiliary-route
4
4
  import { WorkbenchViewRegistry } from '../view/workbench-view.registry';
5
5
  import { WorkbenchPartRegistry } from '../part/workbench-part.registry';
6
6
  import { WorkbenchLayoutService } from '../layout/workbench-layout.service';
7
- import { WorkbenchRouter } from './workbench-router.service';
8
7
  import { WorkbenchLayoutDiffer } from './workbench-layout-differ';
9
8
  import { WorkbenchPopupDiffer } from './workbench-popup-differ';
10
9
  import { Logger } from '../logging';
11
10
  import { ɵWorkbenchLayoutFactory } from '../layout/ɵworkbench-layout.factory';
11
+ import { WorkbenchDialogDiffer } from './workbench-dialog-differ';
12
+ import { ɵWorkbenchRouter } from './ɵworkbench-router.service';
12
13
  import * as i0 from "@angular/core";
13
14
  /**
14
15
  * Tracks the browser URL for workbench layout changes.
15
16
  *
16
- * - For each added view, constructs a {@link WorkbenchView} and registers view specific auxiliary routes of all primary routes
17
+ * - For each added view, constructs a {@link WorkbenchView} and registers view specific auxiliary routes of all top-level routes
17
18
  * - For each removed view, destroys {@link WorkbenchView} and unregisters its auxiliary routes
18
19
  * - For each added part, constructs a {@link WorkbenchPart}
19
20
  * - For each removed part, destroys {@link WorkbenchPart}
@@ -21,7 +22,7 @@ import * as i0 from "@angular/core";
21
22
  */
22
23
  export declare class WorkbenchUrlObserver {
23
24
  private _router;
24
- private _auxRoutesRegistrator;
25
+ private _auxiliaryRoutesRegistrator;
25
26
  private _viewRegistry;
26
27
  private _partRegistry;
27
28
  private _workbenchLayoutService;
@@ -30,8 +31,9 @@ export declare class WorkbenchUrlObserver {
30
31
  private _workbenchLayoutFactory;
31
32
  private _workbenchLayoutDiffer;
32
33
  private _workbenchPopupDiffer;
34
+ private _workbenchDialogDiffer;
33
35
  private _logger;
34
- constructor(_router: Router, _auxRoutesRegistrator: WorkbenchAuxiliaryRoutesRegistrator, _viewRegistry: WorkbenchViewRegistry, _partRegistry: WorkbenchPartRegistry, _workbenchLayoutService: WorkbenchLayoutService, _environmentInjector: EnvironmentInjector, _workbenchRouter: WorkbenchRouter, _workbenchLayoutFactory: ɵWorkbenchLayoutFactory, _workbenchLayoutDiffer: WorkbenchLayoutDiffer, _workbenchPopupDiffer: WorkbenchPopupDiffer, _logger: Logger);
36
+ constructor(_router: Router, _auxiliaryRoutesRegistrator: WorkbenchAuxiliaryRoutesRegistrator, _viewRegistry: WorkbenchViewRegistry, _partRegistry: WorkbenchPartRegistry, _workbenchLayoutService: WorkbenchLayoutService, _environmentInjector: EnvironmentInjector, _workbenchRouter: ɵWorkbenchRouter, _workbenchLayoutFactory: ɵWorkbenchLayoutFactory, _workbenchLayoutDiffer: WorkbenchLayoutDiffer, _workbenchPopupDiffer: WorkbenchPopupDiffer, _workbenchDialogDiffer: WorkbenchDialogDiffer, _logger: Logger);
35
37
  /** Invoked at the beginning of each navigation */
36
38
  private onNavigationStart;
37
39
  /** Invoked upon successful navigation */
@@ -47,13 +49,17 @@ export declare class WorkbenchUrlObserver {
47
49
  */
48
50
  private createWorkbenchNavigationContext;
49
51
  /**
50
- * For each added view, registers auxiliary routes of all primary routes.
52
+ * For each added view, registers auxiliary routes of all top-level routes.
51
53
  */
52
54
  private registerAddedViewAuxiliaryRoutes;
53
55
  /**
54
- * For each added popup, registers auxiliary routes of all primary routes.
56
+ * For each added popup, registers auxiliary routes of all top-level routes.
55
57
  */
56
58
  registerAddedPopupAuxiliaryRoutes(): void;
59
+ /**
60
+ * For each added dialog, registers auxiliary routes of all top-level routes.
61
+ */
62
+ registerAddedDialogAuxiliaryRoutes(): void;
57
63
  /**
58
64
  * Reverts the workbench layout differ to the state before the navigation.
59
65
  *
@@ -66,6 +72,12 @@ export declare class WorkbenchUrlObserver {
66
72
  * Invoke this method after navigation failure or cancellation. The navigation is cancelled when guards perform a redirect or reject navigation.
67
73
  */
68
74
  private undoWorkbenchPopupDiffer;
75
+ /**
76
+ * Reverts the dialog outlet differ to the state before the navigation.
77
+ *
78
+ * Invoke this method after navigation failure or cancellation. The navigation is cancelled when guards perform a redirect or reject navigation.
79
+ */
80
+ private undoWorkbenchDialogDiffer;
69
81
  /**
70
82
  * Undoes the registration of auxiliary routes.
71
83
  *
@@ -0,0 +1,75 @@
1
+ import { NavigationExtras, Router, UrlTree } from '@angular/router';
2
+ import { WorkbenchRouter } from './workbench-router.service';
3
+ import { Injector, NgZone, OnDestroy } from '@angular/core';
4
+ import { WorkbenchLayoutService } from '../layout/workbench-layout.service';
5
+ import { ɵWorkbenchLayout } from '../layout/ɵworkbench-layout';
6
+ import { Commands, WorkbenchNavigationContext, WorkbenchNavigationExtras } from './routing.model';
7
+ import { WorkbenchViewRegistry } from '../view/workbench-view.registry';
8
+ import { Logger } from '../logging';
9
+ import * as i0 from "@angular/core";
10
+ /** @inheritDoc */
11
+ export declare class ɵWorkbenchRouter implements WorkbenchRouter, OnDestroy {
12
+ private _router;
13
+ private _workbenchLayoutService;
14
+ private _workbenchViewRegistry;
15
+ private _injector;
16
+ private _logger;
17
+ private _zone;
18
+ private _singleTaskExecutor;
19
+ /**
20
+ * Holds the current navigational context during a workbench navigation, or `null` if no navigation is in progress.
21
+ */
22
+ private _currentNavigationContext;
23
+ constructor(_router: Router, _workbenchLayoutService: WorkbenchLayoutService, _workbenchViewRegistry: WorkbenchViewRegistry, _injector: Injector, _logger: Logger, _zone: NgZone);
24
+ /** @inheritDoc */
25
+ navigate(commands: Commands, extras?: WorkbenchNavigationExtras): Promise<boolean>;
26
+ navigate(navigateFn: ɵNavigateFn, extras?: Omit<NavigationExtras, 'relativeTo' | 'state'>): Promise<boolean>;
27
+ navigate(commandsOrNavigateFn: Commands | ɵNavigateFn, extras?: WorkbenchNavigationExtras | Omit<NavigationExtras, 'relativeTo' | 'state'>): Promise<boolean>;
28
+ /**
29
+ * Performs changes to the current workbench layout.
30
+ *
31
+ * Unlike {@link navigate}, does not perform the navigation but returns the URL tree instead.
32
+ *
33
+ * The router will invoke the callback and pass the current layout for modification. The callback can call `inject` to get any required dependencies.
34
+ *
35
+ * The following example adds a part to the left of the main area, inserts a view and navigates it.
36
+ *
37
+ * ```ts
38
+ * inject(WorkbenchRouter).createUrlTree(layout => layout
39
+ * .addPart('left', {relativeTo: MAIN_AREA, align: 'left'})
40
+ * .addView('navigator', {partId: 'left'})
41
+ * .navigateView('navigator', ['path/to/view'])
42
+ * .activateView('navigator'),
43
+ * );
44
+ * ```
45
+ *
46
+ * @param onNavigate - Specifies the callback to modify the layout.
47
+ * @param extras - Controls how to perform the navigation.
48
+ * @see NavigateFn
49
+ */
50
+ createUrlTree(onNavigate: (layout: ɵWorkbenchLayout) => Promise<ɵWorkbenchLayout | null> | ɵWorkbenchLayout | null, extras?: Omit<NavigationExtras, 'relativeTo' | 'state'>): Promise<UrlTree | null>;
51
+ /**
52
+ * Decides if given view can be closed, invoking `CanClose` guard if implemented.
53
+ */
54
+ private canCloseView;
55
+ /**
56
+ * Returns the context of the current workbench navigation, when being invoked during navigation, or throws an error otherwise.
57
+ */
58
+ getCurrentNavigationContext(): WorkbenchNavigationContext;
59
+ /**
60
+ * Sets navigational contextual data.
61
+ */
62
+ setCurrentNavigationContext(context: WorkbenchNavigationContext | null): void;
63
+ /**
64
+ * Blocks until the initial layout is available, i.e. after completion of Angular's initial navigation.
65
+ */
66
+ private waitForInitialLayout;
67
+ ngOnDestroy(): void;
68
+ static ɵfac: i0.ɵɵFactoryDeclaration<ɵWorkbenchRouter, never>;
69
+ static ɵprov: i0.ɵɵInjectableDeclaration<ɵWorkbenchRouter>;
70
+ }
71
+ /**
72
+ * @inheritDoc
73
+ * @see NavigateFn
74
+ */
75
+ export type ɵNavigateFn = (layout: ɵWorkbenchLayout) => Promise<ɵWorkbenchLayout | null> | ɵWorkbenchLayout | null;
@@ -1,4 +1,4 @@
1
- import { WorkbenchModuleConfig } from '../workbench-module-config';
1
+ import { WorkbenchConfig } from '../workbench-config';
2
2
  import { EnvironmentProviders, Injector, NgZone } from '@angular/core';
3
3
  import { Logger } from '../logging';
4
4
  import * as i0 from "@angular/core";
@@ -9,7 +9,7 @@ import * as i0 from "@angular/core";
9
9
  * Workbench initializers may execute in parallel. To register a workbench initializer, provide a class implementing
10
10
  * {@link WorkbenchInitializer} as a multi-provider using the DI class token {@link WorkbenchInitializer}.
11
11
  *
12
- * When importing the {@link WorkbenchModule}, you can configure which workbench launching strategy to use.
12
+ * The SCION Workbench supports the following launchers:
13
13
  *
14
14
  * - **APP_INITIALIZER**
15
15
  * Launches the workbench in an Angular `APP_INITIALIZER`, which is before bootstrapping the app component.
@@ -23,7 +23,7 @@ import * as i0 from "@angular/core";
23
23
  * tree.
24
24
  *
25
25
  * The workbench component displays a startup splash until completed startup. You can configure a custom splash in
26
- * {@link WorkbenchModuleConfig#startup#splash}. When launching the workbench in an Angular `APP_INITIALIZER`, no splash will
26
+ * {@link WorkbenchConfig#startup#splash}. When launching the workbench in an Angular `APP_INITIALIZER`, no splash will
27
27
  * display since the workbench will start upfront.
28
28
  */
29
29
  export declare class WorkbenchLauncher {
@@ -97,4 +97,4 @@ export declare class WorkbenchStartup {
97
97
  /**
98
98
  * Provides a set of DI providers for launching the workbench.
99
99
  */
100
- export declare function provideWorkbenchLauncher(workbenchModuleConfig: WorkbenchModuleConfig): EnvironmentProviders | [];
100
+ export declare function provideWorkbenchLauncher(workbenchConfig: WorkbenchConfig): EnvironmentProviders | [];
@@ -1 +1,2 @@
1
1
  export { WorkbenchTestingModule } from './workbench-testing.module';
2
+ export { provideWorkbenchForTest } from './workbench.provider';
@@ -1,12 +1,11 @@
1
1
  import { ModuleWithProviders } from '@angular/core';
2
- import { WorkbenchModuleConfig } from '../workbench-module-config';
2
+ import { WorkbenchConfig } from '../workbench-config';
3
3
  import * as i0 from "@angular/core";
4
- import * as i1 from "../workbench.module";
5
4
  /**
6
5
  * Sets up the SCION Workbench to be used for testing.
7
6
  *
8
- * It does the following:
9
- * - provides the workbench applying given config
7
+ * Does the following:
8
+ * - provides the workbench with given config
10
9
  * - configures the workbench to name the initial part 'main'
11
10
  * - installs a sequence for activation instants
12
11
  * - configures the testbed to auto-detect changes
@@ -27,13 +26,15 @@ import * as i1 from "../workbench.module";
27
26
  * });
28
27
  * });
29
28
  * ```
29
+ *
30
+ * @deprecated since version 17.0.0-beta.8; Register SCION Workbench providers using `provideWorkbench` function instead; API will be removed in a future release; API will be removed in a future release.
30
31
  */
31
32
  export declare class WorkbenchTestingModule {
32
33
  /**
33
34
  * Sets up the SCION Workbench to be used for testing.
34
35
  */
35
- static forTest(config?: WorkbenchModuleConfig): ModuleWithProviders<WorkbenchTestingModule>;
36
+ static forTest(config?: WorkbenchConfig): ModuleWithProviders<WorkbenchTestingModule>;
36
37
  static ɵfac: i0.ɵɵFactoryDeclaration<WorkbenchTestingModule, never>;
37
- static ɵmod: i0.ɵɵNgModuleDeclaration<WorkbenchTestingModule, never, never, [typeof i1.WorkbenchModule]>;
38
+ static ɵmod: i0.ɵɵNgModuleDeclaration<WorkbenchTestingModule, never, never, never>;
38
39
  static ɵinj: i0.ɵɵInjectorDeclaration<WorkbenchTestingModule>;
39
40
  }
@@ -0,0 +1,29 @@
1
+ import { WorkbenchConfig } from '../workbench-config';
2
+ import { EnvironmentProviders } from '@angular/core';
3
+ /**
4
+ * Returns the set of dependency-injection providers to enable and configure the SCION Workbench in tests.
5
+ *
6
+ * Does the following:
7
+ * - provides the workbench with given config
8
+ * - configures the workbench to name the initial part 'main'
9
+ * - installs a sequence for activation instants
10
+ * - configures the testbed to auto-detect changes
11
+ * - disables animations
12
+ * - performs the initial navigation
13
+ *
14
+ * ### Usage
15
+ *
16
+ * ```
17
+ * beforeEach(() => {
18
+ * TestBed.configureTestingModule({
19
+ * imports: [
20
+ * WorkbenchTestingModule.forTest(),
21
+ * RouterTestingModule.withRoutes([
22
+ * {path: 'test-view', component: TestComponent},
23
+ * ]),
24
+ * ],
25
+ * });
26
+ * });
27
+ * ```
28
+ */
29
+ export declare function provideWorkbenchForTest(config?: WorkbenchConfig): EnvironmentProviders;
@@ -1 +1,2 @@
1
- export { WorkbenchView } from './workbench-view.model';
1
+ export { WorkbenchView, ViewId } from './workbench-view.model';
2
+ export { canMatchWorkbenchView } from './workbench-view-route-guards';
@@ -1,8 +1,7 @@
1
- import { Injector } from '@angular/core';
2
1
  import { ViewDragService } from '../view-dnd/view-drag.service';
3
2
  import { Router } from '@angular/router';
4
3
  import { LocationStrategy } from '@angular/common';
5
- import { WorkbenchRouter } from '../routing/workbench-router.service';
4
+ import { ɵWorkbenchRouter } from '../routingworkbench-router.service';
6
5
  import { ɵWorkbenchLayoutFactory } from '../layout/ɵworkbench-layout.factory';
7
6
  import * as i0 from "@angular/core";
8
7
  /**
@@ -15,8 +14,7 @@ export declare class ViewMoveHandler {
15
14
  private _viewDragService;
16
15
  private _router;
17
16
  private _locationStrategy;
18
- private _injector;
19
- constructor(_workbenchId: string, _workbenchRouter: WorkbenchRouter, _workbenchLayoutFactory: ɵWorkbenchLayoutFactory, _viewDragService: ViewDragService, _router: Router, _locationStrategy: LocationStrategy, _injector: Injector);
17
+ constructor(_workbenchId: string, _workbenchRouter: ɵWorkbenchRouter, _workbenchLayoutFactory: ɵWorkbenchLayoutFactory, _viewDragService: ViewDragService, _router: Router, _locationStrategy: LocationStrategy);
20
18
  private installViewMoveListener;
21
19
  private addView;
22
20
  private moveViewToNewWindow;
@@ -2,6 +2,7 @@ import { PipeTransform } from '@angular/core';
2
2
  import { WorkbenchViewRegistry } from './workbench-view.registry';
3
3
  import { WbComponentPortal } from '../portal/wb-component-portal';
4
4
  import type { ViewComponent } from '../view/view.component';
5
+ import { ViewId } from './workbench-view.model';
5
6
  import * as i0 from "@angular/core";
6
7
  /**
7
8
  * Resolves the portal for the given view, or throws an error if the view is not registered.
@@ -9,7 +10,7 @@ import * as i0 from "@angular/core";
9
10
  export declare class ViewPortalPipe implements PipeTransform {
10
11
  private _viewRegistry;
11
12
  constructor(_viewRegistry: WorkbenchViewRegistry);
12
- transform(viewId: string | null): WbComponentPortal<ViewComponent> | null;
13
+ transform(viewId: ViewId | null): WbComponentPortal<ViewComponent> | null;
13
14
  static ɵfac: i0.ɵɵFactoryDeclaration<ViewPortalPipe, never>;
14
15
  static ɵpipe: i0.ɵɵPipeDeclaration<ViewPortalPipe, "wbViewPortal", true>;
15
16
  }
@@ -1,5 +1,4 @@
1
1
  import { ElementRef, OnDestroy } from '@angular/core';
2
- import { ActivatedRoute, RouterOutlet } from '@angular/router';
3
2
  import { SciViewportComponent } from '@scion/components/viewport';
4
3
  import { ViewMenuService } from '../part/view-context-menu/view-menu.service';
5
4
  import { ɵWorkbenchView } from './ɵworkbench-view.model';
@@ -8,13 +7,7 @@ import { ViewDragService } from '../view-dnd/view-drag.service';
8
7
  import * as i0 from "@angular/core";
9
8
  import * as i1 from "../glass-pane/glass-pane.directive";
10
9
  /**
11
- * Is the graphical representation of a workbench view.
12
- *
13
- * The view has its dedicated router outlet to display view content. Use route path parameters
14
- * to decide what specific content to present. Use matrix parameters to associate optional data
15
- * with the view outlet URL.
16
- *
17
- * Title and heading of this view are either set via `WorkbenchView`, or given as route data or matrix parameter.
10
+ * Renders the workbench view, using a router-outlet to display view content.
18
11
  */
19
12
  export declare class ViewComponent implements OnDestroy {
20
13
  private _view;
@@ -23,15 +16,12 @@ export declare class ViewComponent implements OnDestroy {
23
16
  private _viewDragService;
24
17
  private _viewport$;
25
18
  set setViewport(viewport: SciViewportComponent);
26
- routerOutlet: RouterOutlet;
27
19
  get viewId(): string;
28
20
  get cssClasses(): string;
29
21
  get isViewDragActive(): boolean;
30
22
  constructor(_view: ɵWorkbenchView, _logger: Logger, _host: ElementRef<HTMLElement>, _viewDragService: ViewDragService, viewContextMenuService: ViewMenuService);
31
23
  private onActivateView;
32
24
  private onDeactivateView;
33
- onActivateRoute(route: ActivatedRoute): void;
34
- onDeactivateRoute(): void;
35
25
  ngOnDestroy(): void;
36
26
  static ɵfac: i0.ɵɵFactoryDeclaration<ViewComponent, never>;
37
27
  static ɵcmp: i0.ɵɵComponentDeclaration<ViewComponent, "wb-view", never, {}, {}, never, never, true, [{ directive: typeof i1.GlassPaneDirective; inputs: {}; outputs: {}; }]>;
@@ -0,0 +1,36 @@
1
+ import { CanMatchFn } from '@angular/router';
2
+ /**
3
+ * Matches the route if target of a workbench view and navigating with the given hint.
4
+ *
5
+ * Can be used to differentiate between routes with an identical path. For example, the views of the initial layout or a perspective
6
+ * are usually navigated to the empty path route to avoid cluttering the URL. A hint can be set when navigating the view to match a
7
+ * particular route.
8
+ *
9
+ * ### Example:
10
+ *
11
+ * The following routes both match the empty path, but only if navigated with a specific hint.
12
+ * ```ts
13
+ * const routes: Routes = [
14
+ * {path: '', canMatch: [canMatchWorkbenchView('navigator')], component: NavigatorComponent},
15
+ * {path: '', canMatch: [canMatchWorkbenchView('outline')], component: OutlineComponent},
16
+ * ];
17
+ * ```
18
+ *
19
+ * The following example navigates to the `OutlineComponent`, passing a hint to match the route.
20
+ * ```ts
21
+ * inject(WorkbenchRouter).navigate([], {hint: 'outline'});
22
+ * ```
23
+ */
24
+ export declare function canMatchWorkbenchView(navigationHint: string): CanMatchFn;
25
+ /**
26
+ * Matches the route if, or if not target of a workbench view.
27
+ *
28
+ * Can be used to guard the application's root route from matching an empty path view navigation.
29
+ */
30
+ export declare function canMatchWorkbenchView(canMatch: boolean): CanMatchFn;
31
+ /**
32
+ * Matches if the view has been navigated (or cannot be found).
33
+ *
34
+ * The view cannot be found during initial navigation as the workbench layout is loaded asynchronously.
35
+ */
36
+ export declare const canMatchNotFoundPage: CanMatchFn;