@scion/workbench 17.0.0-beta.7 → 17.0.0-beta.9

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 (304) 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/coerce-observable.pipe.mjs +3 -3
  5. package/esm2022/lib/common/filter-by-predicate.pipe.mjs +3 -3
  6. package/esm2022/lib/common/filter-by-text.pipe.mjs +3 -3
  7. package/esm2022/lib/common/grid-element-if-visible.pipe.mjs +6 -6
  8. package/esm2022/lib/common/instanceof.pipe.mjs +3 -3
  9. package/esm2022/lib/common/map-coerce.pipe.mjs +3 -3
  10. package/esm2022/lib/common/null-if-empty.pipe.mjs +3 -3
  11. package/esm2022/lib/common/objects.util.mjs +34 -0
  12. package/esm2022/lib/common/typeof.pipe.mjs +3 -3
  13. package/esm2022/lib/common/uuid.util.mjs +17 -0
  14. package/esm2022/lib/content-projection/content-as-overlay.component.mjs +3 -3
  15. package/esm2022/lib/content-projection/content-projection.directive.mjs +3 -3
  16. package/esm2022/lib/dialog/dialog-footer/dialog-action-filter.pipe.mjs +3 -3
  17. package/esm2022/lib/dialog/dialog-footer/dialog-footer.component.mjs +3 -3
  18. package/esm2022/lib/dialog/dialog-footer/workbench-dialog-action.directive.mjs +9 -6
  19. package/esm2022/lib/dialog/dialog-footer/workbench-dialog-footer.directive.mjs +9 -6
  20. package/esm2022/lib/dialog/dialog-header/dialog-header.component.mjs +3 -3
  21. package/esm2022/lib/dialog/dialog-header/workbench-dialog-header.directive.mjs +9 -6
  22. package/esm2022/lib/dialog/movable.directive.mjs +3 -3
  23. package/esm2022/lib/dialog/resizable.directive.mjs +3 -3
  24. package/esm2022/lib/dialog/workbench-dialog.component.mjs +53 -24
  25. package/esm2022/lib/dialog/workbench-dialog.mjs +1 -1
  26. package/esm2022/lib/dialog/workbench-dialog.options.mjs +1 -1
  27. package/esm2022/lib/dialog/workbench-dialog.registry.mjs +4 -4
  28. package/esm2022/lib/dialog/workbench-dialog.service.mjs +5 -5
  29. package/esm2022/lib/dialog//311/265workbench-dialog.mjs +7 -7
  30. package/esm2022/lib/dialog//311/265workbench-dialog.service.mjs +3 -3
  31. package/esm2022/lib/executor/single-task-executor.mjs +26 -7
  32. package/esm2022/lib/filter-field/filter-field.component.mjs +6 -6
  33. package/esm2022/lib/glass-pane/glass-pane.directive.mjs +15 -7
  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 +6 -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 +6 -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 +37 -1
  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.mjs +3 -3
  54. package/esm2022/lib/logging/logging-support.mjs +4 -4
  55. package/esm2022/lib/logging/logging.model.mjs +3 -3
  56. package/esm2022/lib/logging//311/265logger.mjs +3 -3
  57. package/esm2022/lib/message-box/message-box-footer/message-box-footer.component.mjs +18 -20
  58. package/esm2022/lib/message-box/message-box-header/message-box-header.component.mjs +3 -3
  59. package/esm2022/lib/message-box/workbench-message-box.component.mjs +15 -6
  60. package/esm2022/lib/message-box/workbench-message-box.options.mjs +1 -1
  61. package/esm2022/lib/message-box/workbench-message-box.service.mjs +5 -5
  62. package/esm2022/lib/message-box//311/265workbench-message-box.service.mjs +5 -5
  63. package/esm2022/lib/microfrontend-platform/initialization/microfrontend-platform-initializer.service.mjs +26 -13
  64. package/esm2022/lib/microfrontend-platform/initialization/ng-zone-observable-decorator.mjs +3 -3
  65. package/esm2022/lib/microfrontend-platform/initialization/workbench-host-manifest-interceptor.service.mjs +25 -13
  66. package/esm2022/lib/microfrontend-platform/microfrontend-dialog/microfrontend-dialog-capability-validator.interceptor.mjs +3 -3
  67. package/esm2022/lib/microfrontend-platform/microfrontend-dialog/microfrontend-dialog-intent-handler.interceptor.mjs +11 -11
  68. package/esm2022/lib/microfrontend-platform/microfrontend-dialog/microfrontend-dialog.component.mjs +5 -5
  69. package/esm2022/lib/microfrontend-platform/microfrontend-host-dialog/microfrontend-host-dialog.component.mjs +11 -9
  70. package/esm2022/lib/microfrontend-platform/microfrontend-host-message-box/microfrontend-host-message-box.component.mjs +112 -0
  71. package/esm2022/lib/microfrontend-platform/microfrontend-host-message-box/text-message/text-message.component.mjs +43 -0
  72. package/esm2022/lib/microfrontend-platform/microfrontend-host-popup/microfrontend-host-popup.component.mjs +16 -13
  73. package/esm2022/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-capability-validator.interceptor.mjs +34 -0
  74. package/esm2022/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-intent-handler.interceptor.mjs +88 -0
  75. package/esm2022/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-legacy-intent-translator.interceptor.mjs +32 -0
  76. package/esm2022/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box.component.mjs +121 -0
  77. package/esm2022/lib/microfrontend-platform/microfrontend-notification/microfrontend-notification-intent-handler.service.mjs +3 -3
  78. package/esm2022/lib/microfrontend-platform/microfrontend-platform-config-loader.mjs +3 -3
  79. package/esm2022/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup-capability-validator.interceptor.mjs +3 -3
  80. package/esm2022/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup-intent-handler.interceptor.mjs +9 -6
  81. package/esm2022/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup.component.mjs +9 -15
  82. package/esm2022/lib/microfrontend-platform/microfrontend-splash/microfrontend-splash.component.mjs +3 -3
  83. package/esm2022/lib/microfrontend-platform/microfrontend-view/microfrontend-view-command-handler.service.mjs +4 -4
  84. package/esm2022/lib/microfrontend-platform/microfrontend-view/microfrontend-view.component.mjs +37 -32
  85. package/esm2022/lib/microfrontend-platform/routing/microfrontend-view-capability-id-assigner.interceptor.mjs +3 -3
  86. package/esm2022/lib/microfrontend-platform/routing/microfrontend-view-capability-validator.interceptor.mjs +3 -3
  87. package/esm2022/lib/microfrontend-platform/routing/microfrontend-view-intent-handler.interceptor.mjs +13 -11
  88. package/esm2022/lib/microfrontend-platform/routing/microfrontend-view-routes.mjs +14 -9
  89. package/esm2022/lib/microfrontend-platform/workbench-microfrontend-support.mjs +54 -23
  90. package/esm2022/lib/migration/workbench-migration.mjs +11 -0
  91. package/esm2022/lib/migration/workbench-migrator.mjs +38 -0
  92. package/esm2022/lib/notification/notification-css-classes.pipe.mjs +3 -3
  93. package/esm2022/lib/notification/notification-list.component.mjs +3 -3
  94. package/esm2022/lib/notification/notification.component.mjs +3 -3
  95. package/esm2022/lib/notification/notification.config.mjs +1 -1
  96. package/esm2022/lib/notification/notification.mjs +1 -1
  97. package/esm2022/lib/notification/notification.service.mjs +9 -9
  98. package/esm2022/lib/notification/text-notification.component.mjs +3 -3
  99. package/esm2022/lib/page-not-found/format-url.pipe.mjs +26 -0
  100. package/esm2022/lib/page-not-found/page-not-found.component.mjs +28 -0
  101. package/esm2022/lib/part/part-action-bar/part-action-bar.component.mjs +3 -3
  102. package/esm2022/lib/part/part-action-bar/part-action-filter.pipe.mjs +3 -3
  103. package/esm2022/lib/part/part-action-bar/part-action.directive.mjs +4 -4
  104. package/esm2022/lib/part/part-bar/part-bar.component.mjs +10 -8
  105. package/esm2022/lib/part/part-portal.pipe.mjs +3 -3
  106. package/esm2022/lib/part/part.component.mjs +6 -4
  107. package/esm2022/lib/part/view-context-menu/accelerator-format.pipe.mjs +3 -3
  108. package/esm2022/lib/part/view-context-menu/text.component.mjs +3 -3
  109. package/esm2022/lib/part/view-context-menu/view-menu.component.mjs +3 -3
  110. package/esm2022/lib/part/view-context-menu/view-menu.directive.mjs +4 -4
  111. package/esm2022/lib/part/view-context-menu/view-menu.service.mjs +18 -18
  112. package/esm2022/lib/part/view-list/view-list.component.mjs +3 -3
  113. package/esm2022/lib/part/view-list-button/view-list-button.component.mjs +3 -3
  114. package/esm2022/lib/part/view-list-item/view-list-item.component.mjs +9 -9
  115. package/esm2022/lib/part/view-tab/view-tab.component.mjs +13 -11
  116. package/esm2022/lib/part/view-tab-content/view-tab-content.component.mjs +5 -5
  117. package/esm2022/lib/part/view-tab-drag-image/view-tab-drag-image.component.mjs +9 -9
  118. package/esm2022/lib/part/workbench-part-action.registry.mjs +3 -3
  119. package/esm2022/lib/part/workbench-part.model.mjs +1 -1
  120. package/esm2022/lib/part/workbench-part.registry.mjs +3 -3
  121. package/esm2022/lib/part//311/265workbench-part.model.mjs +3 -3
  122. package/esm2022/lib/perspective/migration/model/workbench-perspective-migration-v1.model.mjs +11 -0
  123. package/esm2022/lib/perspective/migration/model/workbench-perspective-migration-v2.model.mjs +11 -0
  124. package/esm2022/lib/perspective/migration/workbench-perspective-migration-v2.service.mjs +57 -0
  125. package/esm2022/lib/perspective/workbench-grid-merger.service.mjs +19 -51
  126. package/esm2022/lib/perspective/workbench-perspective-storage.service.mjs +23 -18
  127. package/esm2022/lib/perspective/workbench-perspective-view-conflict-resolver.service.mjs +27 -42
  128. package/esm2022/lib/perspective/workbench-perspective.model.mjs +1 -1
  129. package/esm2022/lib/perspective/workbench-perspective.registry.mjs +3 -3
  130. package/esm2022/lib/perspective/workbench-perspective.service.mjs +15 -10
  131. package/esm2022/lib/perspective/workench-perspective-serializer.service.mjs +62 -0
  132. package/esm2022/lib/perspective//311/265workbench-perspective.model.mjs +98 -78
  133. package/esm2022/lib/popup/popup.component.mjs +22 -10
  134. package/esm2022/lib/popup/popup.config.mjs +3 -1
  135. package/esm2022/lib/popup/popup.service.mjs +4 -4
  136. package/esm2022/lib/portal/workbench-portal-outlet.directive.mjs +6 -6
  137. package/esm2022/lib/public_api.mjs +3 -2
  138. package/esm2022/lib/registry/workbench-object-registry.mjs +3 -3
  139. package/esm2022/lib/routing/empty-outlet/empty-outlet.component.mjs +31 -0
  140. package/esm2022/lib/routing/public_api.mjs +1 -1
  141. package/esm2022/lib/routing/router.util.mjs +89 -35
  142. package/esm2022/lib/routing/routing.model.mjs +1 -1
  143. package/esm2022/lib/routing/url-segment-matcher.mjs +46 -0
  144. package/esm2022/lib/routing/workbench-auxiliary-routes-registrator.service.mjs +58 -49
  145. package/esm2022/lib/routing/workbench-dialog-differ.mjs +6 -6
  146. package/esm2022/lib/routing/workbench-layout-differ.mjs +14 -17
  147. package/esm2022/lib/routing/workbench-message-box-differ.mjs +51 -0
  148. package/esm2022/lib/routing/workbench-navigational-states.mjs +4 -28
  149. package/esm2022/lib/routing/workbench-popup-differ.mjs +6 -6
  150. package/esm2022/lib/routing/workbench-route-data.mjs +14 -4
  151. package/esm2022/lib/routing/workbench-router-link.directive.mjs +24 -32
  152. package/esm2022/lib/routing/workbench-router.service.mjs +13 -378
  153. package/esm2022/lib/routing/workbench-url-observer.service.mjs +69 -82
  154. package/esm2022/lib/routing//311/265location.mjs +3 -3
  155. package/esm2022/lib/routing//311/265workbench-router.service.mjs +314 -0
  156. package/esm2022/lib/startup/splash/splash.component.mjs +3 -3
  157. package/esm2022/lib/startup/workbench-launcher.service.mjs +11 -11
  158. package/esm2022/lib/storage/workbench-storage.mjs +3 -3
  159. package/esm2022/lib/testing/public_api.mjs +2 -1
  160. package/esm2022/lib/testing/workbench-testing.module.mjs +13 -39
  161. package/esm2022/lib/testing/workbench.provider.mjs +60 -0
  162. package/esm2022/lib/theme/workbench-theme-switcher.service.mjs +3 -3
  163. package/esm2022/lib/view/public_api.mjs +2 -1
  164. package/esm2022/lib/view/view-move-handler.service.mjs +42 -62
  165. package/esm2022/lib/view/view-portal.pipe.mjs +4 -4
  166. package/esm2022/lib/view/view.component.mjs +20 -40
  167. package/esm2022/lib/view/workbench-view-route-guards.mjs +47 -0
  168. package/esm2022/lib/view/workbench-view.model.mjs +6 -4
  169. package/esm2022/lib/view/workbench-view.registry.mjs +4 -4
  170. package/esm2022/lib/view//311/265workbench-view.model.mjs +106 -27
  171. package/esm2022/lib/view-dnd/requires-drop-zone.pipe.mjs +7 -7
  172. package/esm2022/lib/view-dnd/view-drag.service.mjs +6 -6
  173. package/esm2022/lib/view-dnd/view-drop-placeholder-renderer.service.mjs +3 -3
  174. package/esm2022/lib/view-dnd/view-drop-zone.directive.mjs +4 -4
  175. package/esm2022/lib/view-dnd/view-tab-drag-image-renderer.service.mjs +6 -4
  176. package/esm2022/lib/workbench-config.mjs +15 -0
  177. package/esm2022/lib/workbench-id.mjs +3 -3
  178. package/esm2022/lib/workbench.component.mjs +20 -12
  179. package/esm2022/lib/workbench.constants.mjs +7 -9
  180. package/esm2022/lib/workbench.model.mjs +1 -1
  181. package/esm2022/lib/workbench.module.mjs +15 -86
  182. package/esm2022/lib/workbench.provider.mjs +117 -0
  183. package/esm2022/lib/workbench.service.mjs +5 -5
  184. package/esm2022/lib//311/265workbench.service.mjs +15 -21
  185. package/fesm2022/scion-workbench.mjs +5490 -4166
  186. package/fesm2022/scion-workbench.mjs.map +1 -1
  187. package/lib/common/objects.util.d.ts +17 -0
  188. package/lib/common/uuid.util.d.ts +8 -0
  189. package/lib/dialog/workbench-dialog.component.d.ts +16 -7
  190. package/lib/dialog/workbench-dialog.d.ts +1 -1
  191. package/lib/dialog/workbench-dialog.options.d.ts +4 -3
  192. package/lib/dialog/workbench-dialog.registry.d.ts +4 -3
  193. package/lib/dialog/workbench-dialog.service.d.ts +1 -1
  194. package/lib/dialog//311/265workbench-dialog.d.ts +2 -2
  195. package/lib/executor/single-task-executor.d.ts +6 -1
  196. package/lib/filter-field/filter-field.component.d.ts +1 -1
  197. package/lib/glass-pane/glass-pane.directive.d.ts +21 -0
  198. package/lib/layout/grid-element/grid-element.component.d.ts +2 -2
  199. package/lib/layout/migration/model/workbench-layout-migration-v1.model.d.ts +16 -0
  200. package/lib/layout/migration/model/workbench-layout-migration-v2.model.d.ts +22 -0
  201. package/lib/layout/migration/model/workbench-layout-migration-v3.model.d.ts +30 -0
  202. package/lib/layout/migration/model/workbench-layout-migration-v4.model.d.ts +31 -0
  203. package/lib/layout/migration/workbench-layout-migration-v2.service.d.ts +13 -0
  204. package/lib/layout/migration/workbench-layout-migration-v3.service.d.ts +16 -0
  205. package/lib/layout/migration/workbench-layout-migration-v4.service.d.ts +12 -0
  206. package/lib/layout/workbench-layout.d.ts +61 -7
  207. package/lib/layout/workbench-layout.factory.d.ts +1 -1
  208. package/lib/layout/workbench-layout.model.d.ts +19 -9
  209. package/lib/layout/workbench-layouts.util.d.ts +18 -0
  210. package/lib/layout/workench-layout-serializer.service.d.ts +28 -7
  211. package/lib/layout//311/265workbench-layout.d.ts +172 -98
  212. package/lib/layout//311/265workbench-layout.factory.d.ts +4 -0
  213. package/lib/logging/logging-support.d.ts +2 -2
  214. package/lib/message-box/workbench-message-box.component.d.ts +3 -0
  215. package/lib/message-box/workbench-message-box.options.d.ts +4 -3
  216. package/lib/message-box/workbench-message-box.service.d.ts +1 -1
  217. package/lib/microfrontend-platform/initialization/microfrontend-platform-initializer.service.d.ts +7 -1
  218. package/lib/microfrontend-platform/microfrontend-host-dialog/microfrontend-host-dialog.component.d.ts +1 -0
  219. package/lib/microfrontend-platform/microfrontend-host-message-box/microfrontend-host-message-box.component.d.ts +39 -0
  220. package/lib/microfrontend-platform/microfrontend-host-message-box/text-message/text-message.component.d.ts +25 -0
  221. package/lib/microfrontend-platform/microfrontend-host-popup/microfrontend-host-popup.component.d.ts +4 -2
  222. package/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-capability-validator.interceptor.d.ts +10 -0
  223. package/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-intent-handler.interceptor.d.ts +28 -0
  224. package/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-legacy-intent-translator.interceptor.d.ts +11 -0
  225. package/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box.component.d.ts +48 -0
  226. package/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup.component.d.ts +3 -7
  227. package/lib/microfrontend-platform/microfrontend-view/microfrontend-view.component.d.ts +4 -9
  228. package/lib/microfrontend-platform/workbench-microfrontend-support.d.ts +3 -3
  229. package/lib/migration/workbench-migration.d.ts +9 -0
  230. package/lib/migration/workbench-migrator.d.ts +18 -0
  231. package/lib/notification/notification.config.d.ts +1 -1
  232. package/lib/notification/notification.d.ts +1 -3
  233. package/lib/page-not-found/format-url.pipe.d.ts +11 -0
  234. package/lib/page-not-found/page-not-found.component.d.ts +8 -0
  235. package/lib/part/part-action-bar/part-action.directive.d.ts +1 -1
  236. package/lib/part/part-bar/part-bar.component.d.ts +4 -3
  237. package/lib/part/view-context-menu/view-menu.directive.d.ts +1 -1
  238. package/lib/part/view-context-menu/view-menu.service.d.ts +5 -4
  239. package/lib/part/view-list-item/view-list-item.component.d.ts +5 -4
  240. package/lib/part/view-tab/view-tab.component.d.ts +6 -5
  241. package/lib/part/view-tab-drag-image/view-tab-drag-image.component.d.ts +3 -3
  242. package/lib/part/workbench-part.model.d.ts +5 -4
  243. package/lib/part//311/265workbench-part.model.d.ts +5 -4
  244. package/lib/perspective/migration/model/workbench-perspective-migration-v1.model.d.ts +8 -0
  245. package/lib/perspective/migration/model/workbench-perspective-migration-v2.model.d.ts +10 -0
  246. package/lib/perspective/migration/workbench-perspective-migration-v2.service.d.ts +13 -0
  247. package/lib/perspective/workbench-grid-merger.service.d.ts +9 -16
  248. package/lib/perspective/workbench-perspective-storage.service.d.ts +10 -28
  249. package/lib/perspective/workbench-perspective-view-conflict-resolver.service.d.ts +8 -25
  250. package/lib/perspective/workbench-perspective.model.d.ts +123 -14
  251. package/lib/perspective/workbench-perspective.service.d.ts +10 -3
  252. package/lib/perspective/workench-perspective-serializer.service.d.ts +26 -0
  253. package/lib/perspective//311/265workbench-perspective.model.d.ts +16 -14
  254. package/lib/popup/popup.component.d.ts +1 -0
  255. package/lib/popup/popup.config.d.ts +4 -3
  256. package/lib/portal/workbench-portal-outlet.directive.d.ts +2 -2
  257. package/lib/public_api.d.ts +4 -3
  258. package/lib/registry/workbench-object-registry.d.ts +2 -2
  259. package/lib/routing/empty-outlet/empty-outlet.component.d.ts +15 -0
  260. package/lib/routing/public_api.d.ts +2 -2
  261. package/lib/routing/router.util.d.ts +45 -19
  262. package/lib/routing/routing.model.d.ts +107 -8
  263. package/lib/routing/url-segment-matcher.d.ts +20 -0
  264. package/lib/routing/workbench-auxiliary-routes-registrator.service.d.ts +25 -15
  265. package/lib/routing/workbench-layout-differ.d.ts +4 -7
  266. package/lib/routing/workbench-message-box-differ.d.ts +25 -0
  267. package/lib/routing/workbench-navigational-states.d.ts +6 -19
  268. package/lib/routing/workbench-route-data.d.ts +13 -3
  269. package/lib/routing/workbench-router-link.directive.d.ts +22 -7
  270. package/lib/routing/workbench-router.service.d.ts +42 -142
  271. package/lib/routing/workbench-url-observer.service.d.ts +10 -28
  272. package/lib/routing//311/265workbench-router.service.d.ts +74 -0
  273. package/lib/startup/workbench-launcher.service.d.ts +4 -4
  274. package/lib/testing/public_api.d.ts +1 -0
  275. package/lib/testing/workbench-testing.module.d.ts +7 -6
  276. package/lib/testing/workbench.provider.d.ts +29 -0
  277. package/lib/view/public_api.d.ts +2 -1
  278. package/lib/view/view-move-handler.service.d.ts +2 -4
  279. package/lib/view/view-portal.pipe.d.ts +2 -1
  280. package/lib/view/view.component.d.ts +1 -11
  281. package/lib/view/workbench-view-route-guards.d.ts +36 -0
  282. package/lib/view/workbench-view.model.d.ts +37 -5
  283. package/lib/view/workbench-view.registry.d.ts +4 -3
  284. package/lib/view//311/265workbench-view.model.d.ts +61 -15
  285. package/lib/view-dnd/view-drag.service.d.ts +9 -4
  286. package/lib/view-dnd/view-drop-zone.directive.d.ts +1 -1
  287. package/lib/{workbench-module-config.d.ts → workbench-config.d.ts} +29 -71
  288. package/lib/workbench.component.d.ts +2 -2
  289. package/lib/workbench.constants.d.ts +6 -8
  290. package/lib/workbench.model.d.ts +20 -8
  291. package/lib/workbench.module.d.ts +12 -7
  292. package/lib/workbench.provider.d.ts +38 -0
  293. package/lib/workbench.service.d.ts +32 -8
  294. package/lib//311/265workbench.service.d.ts +9 -3
  295. package/package.json +8 -8
  296. package/esm2022/lib/layout/migration/workbench-layout-migrator.service.mjs +0 -38
  297. package/esm2022/lib/layout/migration/workbench-layout-v1-migrator.service.mjs +0 -59
  298. package/esm2022/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-intent-handler.service.mjs +0 -46
  299. package/esm2022/lib/view/workbench-view-pre-destroy.guard.mjs +0 -36
  300. package/esm2022/lib/workbench-module-config.mjs +0 -15
  301. package/lib/layout/migration/workbench-layout-migrator.service.d.ts +0 -15
  302. package/lib/layout/migration/workbench-layout-v1-migrator.service.d.ts +0 -12
  303. package/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-intent-handler.service.d.ts +0 -17
  304. package/lib/view/workbench-view-pre-destroy.guard.d.ts +0 -5
@@ -1,30 +1,129 @@
1
+ import { NavigationExtras, UrlSegment } from '@angular/router';
2
+ import { ViewId } from '../view/workbench-view.model';
3
+ import { WorkbenchLayout } from '../layout/workbench-layout';
4
+ /**
5
+ * Options to control the navigation.
6
+ */
7
+ export interface WorkbenchNavigationExtras extends NavigationExtras {
8
+ /**
9
+ * Controls where to open the view. Default is `auto`.
10
+ *
11
+ * One of:
12
+ * - 'auto': Navigates existing views that match the path, or opens a new view otherwise. Matrix params do not affect view resolution.
13
+ * - 'blank': Navigates in a new view.
14
+ * - <viewId>: Navigates the specified view. If already opened, replaces it, or opens a new view otherwise.
15
+ */
16
+ target?: ViewId | string | 'blank' | 'auto';
17
+ /**
18
+ * Controls which part to navigate views in.
19
+ *
20
+ * If target is `blank`, opens the view in the specified part.
21
+ * If target is `auto`, navigates matching views in the specified part, or opens a new view in that part otherwise.
22
+ *
23
+ * If the specified part is not in the layout, opens the view in the active part, with the active part of the main area taking precedence.
24
+ */
25
+ partId?: string;
26
+ /**
27
+ * Sets a hint to control navigation, e.g., for use in a `CanMatch` guard to differentiate between routes with an identical path.
28
+ *
29
+ * For example, views of the initial layout or a perspective are usually navigated to the empty path route to avoid cluttering the URL,
30
+ * requiring a navigation hint to differentiate between the routes. See {@link canMatchWorkbenchView} for an example.
31
+ *
32
+ * Like the path, a hint affects view resolution. If set, the router will only navigate views with an equivalent hint, or if not set, views without a hint.
33
+ *
34
+ * @see canMatchWorkbenchView
35
+ */
36
+ hint?: string;
37
+ /**
38
+ * Instructs the router to activate the view. Default is `true`.
39
+ */
40
+ activate?: boolean;
41
+ /**
42
+ * Specifies where to insert the view into the tab bar. Has no effect if navigating an existing view. Default is after the active view.
43
+ */
44
+ position?: number | 'start' | 'end' | 'before-active-view' | 'after-active-view';
45
+ /**
46
+ * Associates arbitrary state with a view navigation.
47
+ *
48
+ * Navigational state is stored in the browser's session history, supporting back/forward navigation, but is lost on page reload.
49
+ * Therefore, a view must be able to restore its state without relying on navigational state.
50
+ *
51
+ * Navigational state can be read from {@link WorkbenchView.state} or the browser's session history via `history.state`.
52
+ */
53
+ state?: ViewState;
54
+ /**
55
+ * Closes views that match the specified path and navigation hint. Matrix parameters do not affect view resolution.
56
+ * The path supports the asterisk wildcard segment (`*`) to match views with any value in a segment.
57
+ * To close a specific view, set a view target instead of a path.
58
+ */
59
+ close?: boolean;
60
+ /**
61
+ * Specifies CSS class(es) to add to the view, e.g., to locate the view in tests.
62
+ */
63
+ cssClass?: string | string[];
64
+ }
1
65
  /**
2
66
  * Represents an ordered list of path segments instructing the router which route to navigate to.
3
67
  *
4
- * A command can be either a `string` or an object literal. String literals represent path segments, while object literals associate data
5
- * with the preceding path segment. Multiple path segments can be combined into a single command, separated by a forward slash. The first
6
- * path segment supports the usage of navigational symbols such as `/`, `./`, or `../`.
68
+ * 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.
69
+ * Multiple segments can be combined into a single command, separated by a forward slash.
7
70
  *
8
- * Example:
9
- * - Navigate to the path 'path/to/view', passing two parameters:
71
+ * The first path segment supports the usage of navigational symbols such as `/`, `./`, or `../`.
72
+ *
73
+ * Examples:
74
+ * - Navigates to the path 'path/to/view', passing two parameters:
10
75
  * ['path', 'to', 'view', {param1: 'value1', param2: 'value2'}]
11
76
  * - Alternative syntax using a combined segment:
12
77
  * ['path/to/view', {param1: 'value1', param2: 'value2'}]
13
78
  */
14
79
  export type Commands = any[];
80
+ /**
81
+ * URL segments of views contained in the workbench layout.
82
+ */
83
+ export type ViewOutlets = {
84
+ [viewId: ViewId]: UrlSegment[];
85
+ };
15
86
  /**
16
87
  * Navigational view states associated with a workbench navigation.
17
88
  */
18
89
  export type ViewStates = {
19
- [viewId: string]: ViewState;
90
+ [viewId: ViewId]: ViewState;
20
91
  };
21
92
  /**
22
93
  * State associated with a view navigation.
23
94
  *
24
- * State is written to the browser session history, not to the URL, so will be lost on page reload.
95
+ * Navigational state is stored in the browser's session history, supporting back/forward navigation, but is lost on page reload.
96
+ * Therefore, a view must be able to restore its state without relying on navigational state.
25
97
  *
26
- * State can be read from {@link WorkbenchView.state}, or the browser's session history via `history.state`.
98
+ * Navigational state can be read from {@link WorkbenchView.state} or the browser's session history via `history.state`.
27
99
  */
28
100
  export type ViewState = {
29
101
  [key: string]: unknown;
30
102
  };
103
+ /**
104
+ * Signature of a function to modify the workbench layout.
105
+ *
106
+ * The router will invoke this function with the current workbench layout. The layout has methods for modifying it.
107
+ * The layout is immutable, so each modification creates a new instance. Use the instance for further modifications and finally return it.
108
+ *
109
+ * The function can call `inject` to get any required dependencies.
110
+ *
111
+ * ## Workbench Layout
112
+ * 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.
113
+ *
114
+ * ## Example
115
+ * The following example adds a part to the left of the main area, inserts a view and navigates it.
116
+ *
117
+ * ```ts
118
+ * inject(WorkbenchRouter).navigate(layout => layout
119
+ * .addPart('left', {relativeTo: MAIN_AREA, align: 'left'})
120
+ * .addView('navigator', {partId: 'left'})
121
+ * .navigateView('navigator', ['path/to/view'])
122
+ * .activateView('navigator')
123
+ * );
124
+ * ```
125
+ *
126
+ * @param layout - Reference to the current workbench layout for modification.
127
+ * @return Modified layout, or `null` to cancel navigation.
128
+ */
129
+ export type NavigateFn = (layout: WorkbenchLayout) => Promise<WorkbenchLayout | null> | WorkbenchLayout | null;
@@ -0,0 +1,20 @@
1
+ import { UrlSegment } from '@angular/router';
2
+ /**
3
+ * Matches an array of URL segments against another array of URL segments.
4
+ *
5
+ * Flags:
6
+ * - matchWildcardPath: Indicates if wildcard path matching is enabled. If enabled, the asterisk `*` path matches any path of a segment.
7
+ * - matchMatrixParams: Controls whether to match matrix parameters.
8
+ */
9
+ export declare class UrlSegmentMatcher {
10
+ private _pattern;
11
+ private _flags;
12
+ constructor(_pattern: UrlSegment[], _flags: {
13
+ matchWildcardPath: boolean;
14
+ matchMatrixParams: boolean;
15
+ });
16
+ /**
17
+ * Matches given array of URL segments.
18
+ */
19
+ matches(segments: UrlSegment[]): boolean;
20
+ }
@@ -1,23 +1,25 @@
1
- import { CanActivateFn, CanDeactivateFn, Data, Router, Routes } from '@angular/router';
1
+ import { InjectionToken } from '@angular/core';
2
+ import { CanMatchFn, Router, Routes } from '@angular/router';
3
+ import { WorkbenchConfig } from '../workbench-config';
2
4
  import * as i0 from "@angular/core";
3
5
  /**
4
- * Registers auxiliary routes for views.
6
+ * Facilitates the registration of auxiliary routes of top-level routes.
5
7
  */
6
8
  export declare class WorkbenchAuxiliaryRoutesRegistrator {
9
+ private _workbenchConfig;
7
10
  private _router;
8
- constructor(_router: Router);
11
+ constructor(_workbenchConfig: WorkbenchConfig, _router: Router);
9
12
  /**
10
- * Registers an auxiliary route for every primary route found in the router config, allowing
11
- * primary routes to be used in named router outlets.
13
+ * Registers an auxiliary route for each top-level route, enabling navigation in the specified router outlet(s).
12
14
  *
13
- * @param outletName - outlet names for which to create named auxiliary routes
14
- * @param config of the auxiliary route
15
+ * @param outlets - Specifies outlets for which to create auxiliary routes.
16
+ * @param config - Specifies the config of the auxiliary routes.
15
17
  */
16
- registerOutletAuxiliaryRoutes(outletName: string | string[], config?: OutletAuxiliaryRouteConfig): Routes;
18
+ registerAuxiliaryRoutes(outlets: string[], config?: AuxiliaryRouteConfig): Routes;
17
19
  /**
18
- * Unregisters all auxiliary routes for the given outlet.
20
+ * Unregisters auxiliary routes for the given outlet.
19
21
  */
20
- unregisterOutletAuxiliaryRoutes(outletName: string | string[]): void;
22
+ unregisterAuxiliaryRoutes(outlets: string[]): void;
21
23
  /**
22
24
  * Replaces the router configuration to install or uninstall auxiliary routes.
23
25
  */
@@ -26,10 +28,18 @@ export declare class WorkbenchAuxiliaryRoutesRegistrator {
26
28
  static ɵprov: i0.ɵɵInjectableDeclaration<WorkbenchAuxiliaryRoutesRegistrator>;
27
29
  }
28
30
  /**
29
- * Controls the creation of auxiliary routes for a named router outlet.
31
+ * Configures auxiliary routes.
30
32
  */
31
- export interface OutletAuxiliaryRouteConfig {
32
- canActivate?: CanActivateFn[];
33
- canDeactivate?: CanDeactivateFn<any>[];
34
- data?: Data;
33
+ export interface AuxiliaryRouteConfig {
34
+ /**
35
+ * Specifies "CanMatch" guard(s) to install on the wildcard route (`**`),
36
+ * selected by the router if no route matches the requested URL.
37
+ */
38
+ canMatchNotFoundPage?: Array<CanMatchFn>;
35
39
  }
40
+ /**
41
+ * DI token to inject the outlet name of a workbench auxiliary route.
42
+ *
43
+ * Can be injected in a `CanMatch` guard to obtain a reference to the workbench element.
44
+ */
45
+ export declare const WORKBENCH_AUXILIARY_ROUTE_OUTLET: InjectionToken<string>;
@@ -1,6 +1,7 @@
1
1
  import { IterableChanges, IterableDiffers } from '@angular/core';
2
2
  import { ɵWorkbenchLayout } from '../layout/ɵworkbench-layout';
3
3
  import { UrlTree } from '@angular/router';
4
+ import { ViewId } from '../view/workbench-view.model';
4
5
  import * as i0 from "@angular/core";
5
6
  /**
6
7
  * Stateful differ for finding added/removed workbench layout elements.
@@ -8,7 +9,6 @@ import * as i0 from "@angular/core";
8
9
  export declare class WorkbenchLayoutDiffer {
9
10
  private _partsDiffer;
10
11
  private _viewsDiffer;
11
- private _viewOutletsDiffer;
12
12
  constructor(differs: IterableDiffers);
13
13
  /**
14
14
  * Computes differences in the layout since last time {@link WorkbenchLayoutDiffer#diff} was invoked.
@@ -23,14 +23,11 @@ export declare class WorkbenchLayoutDiffer {
23
23
  export declare class WorkbenchLayoutDiff {
24
24
  readonly addedParts: string[];
25
25
  readonly removedParts: string[];
26
- readonly addedViews: string[];
27
- readonly removedViews: string[];
28
- readonly addedViewOutlets: string[];
29
- readonly removedViewOutlets: string[];
26
+ readonly addedViews: `view.${number}`[];
27
+ readonly removedViews: `view.${number}`[];
30
28
  constructor(changes: {
31
29
  parts: IterableChanges<string> | null;
32
- views: IterableChanges<string> | null;
33
- viewOutlets: IterableChanges<string> | null;
30
+ views: IterableChanges<ViewId> | null;
34
31
  });
35
32
  toString(): string;
36
33
  }
@@ -0,0 +1,25 @@
1
+ import { IterableChanges, IterableDiffers } from '@angular/core';
2
+ import { UrlTree } from '@angular/router';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Stateful differ for finding added/removed message boxes.
6
+ */
7
+ export declare class WorkbenchMessageBoxDiffer {
8
+ private _messageBoxDiffer;
9
+ constructor(differs: IterableDiffers);
10
+ /**
11
+ * Computes differences in the URL since last time {@link WorkbenchMessageBoxDiffer#diff} was invoked.
12
+ */
13
+ diff(urlTree: UrlTree): WorkbenchMessageBoxDiff;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<WorkbenchMessageBoxDiffer, never>;
15
+ static ɵprov: i0.ɵɵInjectableDeclaration<WorkbenchMessageBoxDiffer>;
16
+ }
17
+ /**
18
+ * Lists the message boxes added/removed in the current navigation.
19
+ */
20
+ export declare class WorkbenchMessageBoxDiff {
21
+ readonly addedMessageBoxOutlets: string[];
22
+ readonly removedMessageBoxOutlets: string[];
23
+ constructor(changes: IterableChanges<string> | null);
24
+ toString(): string;
25
+ }
@@ -1,5 +1,5 @@
1
- import { Navigation, NavigationExtras } from '@angular/router';
2
- import { ViewState, ViewStates } from './routing.model';
1
+ import { Navigation } from '@angular/router';
2
+ import { ViewStates } from './routing.model';
3
3
  /**
4
4
  * Provides methods to associate {@link WorkbenchNavigationalState} with a navigation.
5
5
  */
@@ -9,15 +9,11 @@ export declare const WorkbenchNavigationalStates: {
9
9
  */
10
10
  readonly fromNavigation: (navigation: Navigation) => WorkbenchNavigationalState | null;
11
11
  /**
12
- * Resolves navigational state associated with a view.
13
- *
14
- * TODO [WB-LAYOUT] Remove when migrated to the new Router API as state is retained in layout.
15
- */
16
- readonly resolveViewState: (viewId: string) => ViewState | undefined;
17
- /**
18
- * Associates workbench-specific state with given navigation extras.
12
+ * Creates a state object with workbench-specific data that can be passed to a workbench navigation.
19
13
  */
20
- readonly addToNavigationExtras: (extras: NavigationExtras, state: WorkbenchNavigationalState) => void;
14
+ readonly create: (state: WorkbenchNavigationalState) => {
15
+ [key: string]: unknown;
16
+ };
21
17
  };
22
18
  /**
23
19
  * Represents workbench-specific state associated with a navigation.
@@ -38,12 +34,3 @@ export interface WorkbenchNavigationalState {
38
34
  */
39
35
  viewStates: ViewStates;
40
36
  }
41
- /**
42
- * Keys for associating state with a view navigation.
43
- */
44
- export declare const WorkbenchNavigationalViewStates: {
45
- /**
46
- * Key for associating CSS class(es) with a view state.
47
- */
48
- readonly cssClass: "ɵcssClass";
49
- };
@@ -5,15 +5,25 @@
5
5
  */
6
6
  export declare const WorkbenchRouteData: {
7
7
  /**
8
- * Key to define the title of a view in {@link Route.data}.
8
+ * Property to set the title of a view in {@link Route.data}.
9
9
  */
10
10
  readonly title: "ɵworkbenchViewTitle";
11
11
  /**
12
- * Key to define the heading of a view in {@link Route.data}.
12
+ * Property to set the heading of a view in {@link Route.data}.
13
13
  */
14
14
  readonly heading: "ɵworkbenchViewHeading";
15
15
  /**
16
- * Key to associate CSS class(es) with a view in {@link Route.data}, useful in end-to-end tests for locating views and view tabs.
16
+ * Property to associate CSS class(es) with a view in {@link Route.data}, e.g., to locate the view in tests.
17
17
  */
18
18
  readonly cssClass: "ɵworkbenchViewCssClass";
19
+ /**
20
+ * @internal
21
+ *
22
+ * Property to obtain the outlet name of the route. This property is only set on the top-level route.
23
+ *
24
+ * Use if the route's injection context is not available, e.g., in a {@link UrlMatcher}.
25
+ * Otherwise, the outlet can be injected using the {@link WORKBENCH_AUXILIARY_ROUTE_OUTLET} DI token,
26
+ * even in child routes, e.g., in guards.
27
+ */
28
+ readonly ɵoutlet: "ɵworkbenchOutlet";
19
29
  };
@@ -1,17 +1,32 @@
1
1
  import { ChangeDetectorRef, ElementRef, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
2
- import { WorkbenchNavigationExtras, WorkbenchRouter } from './workbench-router.service';
2
+ import { WorkbenchRouter } from './workbench-router.service';
3
3
  import { LocationStrategy } from '@angular/common';
4
4
  import { ActivatedRoute, Router } from '@angular/router';
5
5
  import { WorkbenchView } from '../view/workbench-view.model';
6
+ import { Commands, WorkbenchNavigationExtras } from './routing.model';
6
7
  import * as i0 from "@angular/core";
7
8
  /**
8
- * Like 'RouterLink' but with functionality to target a view outlet.
9
+ * Like the Angular 'RouterLink' directive but with functionality to navigate a view.
9
10
  *
10
- * If in the context of a view in the main area and CTRL (Mac: ⌘, Windows: ⊞) key is not pressed, by default, navigation
11
- * replaces the content of the current view. Override this default behavior by setting a view target strategy in navigation extras.
11
+ * Use this directive to navigate the current view. If the user presses the CTRL key (Mac: ⌘, Windows: ⊞), this directive will open a new view.
12
+ *
13
+ * ```html
14
+ * <a [wbRouterLink]="['../path/to/view']">Link</a>
15
+ * ```
16
+ *
17
+ * You can override the default behavior by setting an explicit navigation target in navigation extras.
18
+ *
19
+ * ```html
20
+ * <a [wbRouterLink]="['../path/to/view']" [wbRouterLinkExtras]="{target: 'blank'}">Link</a>
21
+ * ```
12
22
  *
13
23
  * By default, navigation is relative to the currently activated route, if any.
24
+ *
14
25
  * Prepend the path with a forward slash '/' to navigate absolutely, or set `relativeTo` property in navigational extras to `null`.
26
+ *
27
+ * ```html
28
+ * <a [wbRouterLink]="['/path/to/view']">Link</a>
29
+ * ```
15
30
  */
16
31
  export declare class WorkbenchRouterLinkDirective implements OnChanges, OnDestroy {
17
32
  private _workbenchRouter;
@@ -25,14 +40,14 @@ export declare class WorkbenchRouterLinkDirective implements OnChanges, OnDestro
25
40
  private _ngOnChange$;
26
41
  private _ngOnDestroy$;
27
42
  href: string | null;
28
- set wbRouterLink(commands: any[] | string | undefined | null);
29
- set extras(extras: WorkbenchNavigationExtras | undefined);
43
+ set wbRouterLink(commands: Commands | string | undefined | null);
44
+ set extras(extras: Omit<WorkbenchNavigationExtras, 'close'> | undefined);
30
45
  constructor(_workbenchRouter: WorkbenchRouter, _router: Router, _route: ActivatedRoute, _locationStrategy: LocationStrategy, _cd: ChangeDetectorRef, host: ElementRef, _view: WorkbenchView | null);
31
46
  onClick(button: number, ctrlKey: boolean, metaKey: boolean): boolean;
32
47
  /**
33
48
  * Computes navigation extras based on the given extras and this directive's injection context.
34
49
  */
35
- protected computeNavigationExtras(ctrlKey?: boolean, metaKey?: boolean): WorkbenchNavigationExtras;
50
+ protected computeNavigationExtras(ctrlKey?: boolean, metaKey?: boolean): Omit<WorkbenchNavigationExtras, 'close'>;
36
51
  /**
37
52
  * Updates the link's href based on given array of commands and navigation extras.
38
53
  */
@@ -1,165 +1,65 @@
1
- import { NavigationExtras, Router } from '@angular/router';
2
- import { NgZone, OnDestroy } from '@angular/core';
3
- import { WorkbenchLayoutService } from '../layout/workbench-layout.service';
4
- import { WorkbenchViewRegistry } from '../view/workbench-view.registry';
5
- import { ɵWorkbenchLayout } from '../layout/ɵworkbench-layout';
6
- import { Commands, ViewState, ViewStates } from './routing.model';
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;
11
+ export declare abstract class WorkbenchRouter {
17
12
  /**
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);
22
- /**
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>;
34
+ abstract navigate(commands: Commands, extras?: WorkbenchNavigationExtras): Promise<boolean>;
50
35
  /**
51
- * Experimental API for modifying the workbench layout.
36
+ * Performs changes to the current workbench layout.
52
37
  *
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;
66
- /**
67
- * Normalizes commands to their absolute form.
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.
68
40
  *
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`).
41
+ * The function can call `inject` to get any required dependencies.
72
42
  *
73
- * Example: router.navigate([{outlets: {[outlet]: commands}}])
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.
74
45
  *
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.
108
- *
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`.
116
- *
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
- * Associates state with a view 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
- * State is written to the browser session history, not to the URL, so will be lost on page reload.
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
- * State can be read from {@link WorkbenchView.state}, or the browser's session history via `history.state`.
137
- */
138
- state?: ViewState;
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
- * Information about a workbench navigation operation.
147
- */
148
- export interface WorkbenchNavigation {
149
- /**
150
- * The target layout to apply.
151
- */
152
- layout: ɵWorkbenchLayout;
153
- /**
154
- * View outlet delta to apply to the current URL. For each outlet to add, remove, or change,
155
- * add a property to this dictionary and set the commands to construct the outlet URL.
156
- * To remove an outlet from the URL, set its commands to `null`.
157
- */
158
- viewOutlets?: {
159
- [outlet: string]: Commands | null;
160
- };
161
- /**
162
- * View states to be associated with the navigation.
58
+ * @param onNavigate - Specifies the callback to modify the layout.
59
+ * @param extras - Controls how to perform the navigation.
60
+ * @see NavigateFn
163
61
  */
164
- viewStates?: ViewStates;
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>;
165
65
  }