@sd-angular/core 19.0.0-beta.8 → 19.0.0-beta.80

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 (292) hide show
  1. package/README.md +686 -33
  2. package/assets/scss/ckeditor5.scss +61 -4
  3. package/assets/scss/core/bootstrap.scss +17 -0
  4. package/assets/scss/core/form.scss +32 -6
  5. package/assets/scss/core/grid.scss +40 -0
  6. package/assets/scss/sd-core.scss +5 -0
  7. package/assets/scss/themes/material-theme.scss +82 -40
  8. package/components/anchor-v2/src/components/anchor-item-v2/anchor-item-v2.component.d.ts +5 -5
  9. package/components/anchor-v2/src/components/anchor-v2/anchor-v2.component.d.ts +12 -18
  10. package/components/anchor-v2/src/components/anchor-vertical-v2/anchor-vertical-list-v2.component.d.ts +9 -10
  11. package/components/anchor-v2/src/models/sd-anchor-v2.model.d.ts +3 -3
  12. package/components/avatar/index.d.ts +1 -0
  13. package/components/avatar/src/avatar.component.d.ts +19 -0
  14. package/components/badge/src/badge.component.d.ts +77 -19
  15. package/components/button/src/button.component.d.ts +30 -28
  16. package/components/chart/index.d.ts +4 -0
  17. package/components/chart/src/bar-chart.component.d.ts +18 -0
  18. package/components/chart/src/doughnut-chart.component.d.ts +16 -0
  19. package/components/chart/src/line-chart.component.d.ts +18 -0
  20. package/components/chart/src/pie-chart.component.d.ts +16 -0
  21. package/components/code-editor/index.d.ts +1 -0
  22. package/components/code-editor/src/code-editor.component.d.ts +25 -0
  23. package/components/document-builder/index.d.ts +1 -0
  24. package/components/document-builder/src/document-builder.component.d.ts +12 -41
  25. package/components/document-builder/src/document-builder.model.d.ts +14 -11
  26. package/components/document-builder/src/plugins/block-space/block-space.plugin.d.ts +9 -0
  27. package/components/document-builder/src/plugins/ck-comment/ck-comment.plugin.d.ts +44 -0
  28. package/components/document-builder/src/plugins/ck-comment/ck-comment.plugin.model.d.ts +57 -0
  29. package/components/document-builder/src/plugins/heading/heading.plugin.d.ts +1 -0
  30. package/components/document-builder/src/plugins/highlight-range/highlight-range.plugin.d.ts +4 -0
  31. package/components/document-builder/src/plugins/image-custom/image-custom.plugin.d.ts +31 -0
  32. package/components/document-builder/src/plugins/index.d.ts +7 -2
  33. package/components/document-builder/src/plugins/page-orientation/page-orientation.plugin.d.ts +2 -2
  34. package/components/document-builder/src/plugins/paste-handler/filters/bookmark.d.ts +14 -0
  35. package/components/document-builder/src/plugins/paste-handler/filters/br.d.ts +15 -0
  36. package/components/document-builder/src/plugins/paste-handler/filters/image.d.ts +25 -0
  37. package/components/document-builder/src/plugins/paste-handler/filters/list.d.ts +29 -0
  38. package/components/document-builder/src/plugins/paste-handler/filters/parse.d.ts +35 -0
  39. package/components/document-builder/src/plugins/paste-handler/filters/removeboldwrapper.d.ts +15 -0
  40. package/components/document-builder/src/plugins/paste-handler/filters/removegooglesheetstag.d.ts +15 -0
  41. package/components/document-builder/src/plugins/paste-handler/filters/removeinvalidtablewidth.d.ts +15 -0
  42. package/components/document-builder/src/plugins/paste-handler/filters/removemsattributes.d.ts +15 -0
  43. package/components/document-builder/src/plugins/paste-handler/filters/removestyleblock.d.ts +15 -0
  44. package/components/document-builder/src/plugins/paste-handler/filters/removexmlns.d.ts +15 -0
  45. package/components/document-builder/src/plugins/paste-handler/filters/replacemsfootnotes.d.ts +54 -0
  46. package/components/document-builder/src/plugins/paste-handler/filters/replacetabswithinprewithspaces.d.ts +24 -0
  47. package/components/document-builder/src/plugins/paste-handler/filters/space.d.ts +27 -0
  48. package/components/document-builder/src/plugins/paste-handler/filters/table.d.ts +16 -0
  49. package/components/document-builder/src/plugins/paste-handler/filters/utils.d.ts +25 -0
  50. package/components/document-builder/src/plugins/paste-handler/index.d.ts +35 -0
  51. package/components/document-builder/src/plugins/paste-handler/normalizers/googledocsnormalizer.d.ts +31 -0
  52. package/components/document-builder/src/plugins/paste-handler/normalizers/googlesheetsnormalizer.d.ts +31 -0
  53. package/components/document-builder/src/plugins/paste-handler/normalizers/mswordnormalizer.d.ts +29 -0
  54. package/components/document-builder/src/plugins/paste-handler/types.d.ts +30 -0
  55. package/components/document-builder/src/plugins/table-custom/index.d.ts +34 -0
  56. package/components/document-builder/src/plugins/variable/variable.plugin.d.ts +39 -0
  57. package/components/index.d.ts +5 -0
  58. package/components/mini-editor/index.d.ts +2 -0
  59. package/components/mini-editor/src/mini-editor.component.d.ts +91 -0
  60. package/components/mini-editor/src/mini-editor.model.d.ts +44 -0
  61. package/components/modal/index.d.ts +1 -1
  62. package/components/modal/src/modal.component.d.ts +26 -0
  63. package/components/section/index.d.ts +1 -0
  64. package/components/section/src/section-item/section-item.component.d.ts +7 -0
  65. package/components/section/src/section.component.d.ts +11 -11
  66. package/components/side-drawer/src/side-drawer.component.d.ts +11 -24
  67. package/components/tab-router/src/components/tab-router-item/tab-router-item.component.d.ts +4 -1
  68. package/components/tab-router/src/components/tab-router-outlet/tab-router-outlet.component.d.ts +3 -15
  69. package/components/table/index.d.ts +2 -0
  70. package/components/table/src/components/column-filter/column-filter.component.d.ts +3 -3
  71. package/components/table/src/components/column-title/column-title.component.d.ts +10 -0
  72. package/components/table/src/components/desktop-cell/desktop-cell.component.d.ts +18 -11
  73. package/components/table/src/components/desktop-cell/view/view.component.d.ts +24 -0
  74. package/components/table/src/components/external-filter/external-filter.component.d.ts +1 -1
  75. package/components/table/src/components/index.d.ts +1 -0
  76. package/components/table/src/components/selector-action/action-filter.pipe.d.ts +11 -10
  77. package/components/table/src/components/selector-action/selector-action.component.d.ts +5 -3
  78. package/components/table/src/directives/index.d.ts +4 -0
  79. package/components/table/src/directives/sd-table-cell-def.directive.d.ts +2 -3
  80. package/components/table/src/directives/sd-table-column-filter-def.directive.d.ts +8 -0
  81. package/components/table/src/directives/sd-table-expand-def.directive.d.ts +0 -1
  82. package/components/table/src/directives/sd-table-filter-def.directive.d.ts +4 -6
  83. package/components/table/src/directives/sd-table-footer-def.directive.d.ts +2 -3
  84. package/components/table/src/directives/sd-table-title-def.directive.d.ts +8 -0
  85. package/components/table/src/directives/sticky-shadow.directive.d.ts +17 -0
  86. package/components/table/src/models/table-column.model.d.ts +49 -40
  87. package/components/table/src/models/table-command.model.d.ts +7 -3
  88. package/components/table/src/models/table-item.model.d.ts +5 -4
  89. package/components/table/src/models/table-option-config.model.d.ts +3 -0
  90. package/components/table/src/models/table-option-export.model.d.ts +3 -2
  91. package/components/table/src/models/table-option-selector.model.d.ts +17 -10
  92. package/components/table/src/models/table-option.model.d.ts +15 -8
  93. package/components/table/src/services/index.d.ts +3 -0
  94. package/components/table/src/services/table-export/table-export.service.d.ts +26 -0
  95. package/components/table/src/services/table-filter/table-filter.model.d.ts +6 -5
  96. package/components/table/src/services/table-format/table-format.service.d.ts +16 -0
  97. package/components/table/src/table.component.d.ts +46 -53
  98. package/components/upload-file/src/configurations/upload-file.configuration.d.ts +34 -1
  99. package/components/upload-file/src/services/upload-file.service.d.ts +0 -1
  100. package/components/upload-file/src/upload-file.component.d.ts +52 -54
  101. package/components/view/index.d.ts +1 -0
  102. package/components/view/src/view.component.d.ts +16 -0
  103. package/components/workflow/src/models/form-generic-component.model.d.ts +5 -4
  104. package/components/workflow/src/models/form-generic-expression.model.d.ts +1 -0
  105. package/components/workflow/src/models/index.d.ts +1 -0
  106. package/components/workflow/src/pipes/html.pipe.d.ts +4 -4
  107. package/directives/index.d.ts +2 -0
  108. package/directives/src/sd-href.directive.d.ts +9 -0
  109. package/directives/src/sd-tooltip.directive.d.ts +26 -0
  110. package/fesm2022/sd-angular-core-components-anchor-v2.mjs +79 -154
  111. package/fesm2022/sd-angular-core-components-anchor-v2.mjs.map +1 -1
  112. package/fesm2022/sd-angular-core-components-avatar.mjs +103 -0
  113. package/fesm2022/sd-angular-core-components-avatar.mjs.map +1 -0
  114. package/fesm2022/sd-angular-core-components-badge.mjs +101 -91
  115. package/fesm2022/sd-angular-core-components-badge.mjs.map +1 -1
  116. package/fesm2022/sd-angular-core-components-button.mjs +70 -96
  117. package/fesm2022/sd-angular-core-components-button.mjs.map +1 -1
  118. package/fesm2022/sd-angular-core-components-chart.mjs +290 -0
  119. package/fesm2022/sd-angular-core-components-chart.mjs.map +1 -0
  120. package/fesm2022/sd-angular-core-components-code-editor.mjs +127 -0
  121. package/fesm2022/sd-angular-core-components-code-editor.mjs.map +1 -0
  122. package/fesm2022/sd-angular-core-components-document-builder.mjs +4006 -611
  123. package/fesm2022/sd-angular-core-components-document-builder.mjs.map +1 -1
  124. package/fesm2022/sd-angular-core-components-history.mjs +1 -1
  125. package/fesm2022/sd-angular-core-components-history.mjs.map +1 -1
  126. package/fesm2022/sd-angular-core-components-import-excel.mjs +1 -1
  127. package/fesm2022/sd-angular-core-components-import-excel.mjs.map +1 -1
  128. package/fesm2022/sd-angular-core-components-mini-editor.mjs +332 -0
  129. package/fesm2022/sd-angular-core-components-mini-editor.mjs.map +1 -0
  130. package/fesm2022/sd-angular-core-components-modal.mjs +63 -92
  131. package/fesm2022/sd-angular-core-components-modal.mjs.map +1 -1
  132. package/fesm2022/sd-angular-core-components-preview.mjs +1 -1
  133. package/fesm2022/sd-angular-core-components-preview.mjs.map +1 -1
  134. package/fesm2022/sd-angular-core-components-quick-action.mjs +2 -2
  135. package/fesm2022/sd-angular-core-components-quick-action.mjs.map +1 -1
  136. package/fesm2022/sd-angular-core-components-section.mjs +41 -43
  137. package/fesm2022/sd-angular-core-components-section.mjs.map +1 -1
  138. package/fesm2022/sd-angular-core-components-side-drawer.mjs +78 -84
  139. package/fesm2022/sd-angular-core-components-side-drawer.mjs.map +1 -1
  140. package/fesm2022/sd-angular-core-components-tab-router.mjs +151 -241
  141. package/fesm2022/sd-angular-core-components-tab-router.mjs.map +1 -1
  142. package/fesm2022/sd-angular-core-components-table.mjs +1394 -1254
  143. package/fesm2022/sd-angular-core-components-table.mjs.map +1 -1
  144. package/fesm2022/sd-angular-core-components-upload-file.mjs +390 -443
  145. package/fesm2022/sd-angular-core-components-upload-file.mjs.map +1 -1
  146. package/fesm2022/sd-angular-core-components-view.mjs +45 -0
  147. package/fesm2022/sd-angular-core-components-view.mjs.map +1 -0
  148. package/fesm2022/sd-angular-core-components-workflow.mjs +165 -168
  149. package/fesm2022/sd-angular-core-components-workflow.mjs.map +1 -1
  150. package/fesm2022/sd-angular-core-components.mjs +5 -0
  151. package/fesm2022/sd-angular-core-components.mjs.map +1 -1
  152. package/fesm2022/sd-angular-core-directives.mjs +286 -27
  153. package/fesm2022/sd-angular-core-directives.mjs.map +1 -1
  154. package/fesm2022/sd-angular-core-forms-autocomplete.mjs +289 -363
  155. package/fesm2022/sd-angular-core-forms-autocomplete.mjs.map +1 -1
  156. package/fesm2022/sd-angular-core-forms-chip-calendar.mjs +170 -189
  157. package/fesm2022/sd-angular-core-forms-chip-calendar.mjs.map +1 -1
  158. package/fesm2022/sd-angular-core-forms-chip.mjs +184 -194
  159. package/fesm2022/sd-angular-core-forms-chip.mjs.map +1 -1
  160. package/fesm2022/sd-angular-core-forms-date-range.mjs +180 -242
  161. package/fesm2022/sd-angular-core-forms-date-range.mjs.map +1 -1
  162. package/fesm2022/sd-angular-core-forms-date.mjs +178 -270
  163. package/fesm2022/sd-angular-core-forms-date.mjs.map +1 -1
  164. package/fesm2022/sd-angular-core-forms-datetime.mjs +177 -285
  165. package/fesm2022/sd-angular-core-forms-datetime.mjs.map +1 -1
  166. package/fesm2022/sd-angular-core-forms-input-number.mjs +210 -337
  167. package/fesm2022/sd-angular-core-forms-input-number.mjs.map +1 -1
  168. package/fesm2022/sd-angular-core-forms-input.mjs +169 -286
  169. package/fesm2022/sd-angular-core-forms-input.mjs.map +1 -1
  170. package/fesm2022/sd-angular-core-forms-radio.mjs +3 -2
  171. package/fesm2022/sd-angular-core-forms-radio.mjs.map +1 -1
  172. package/fesm2022/sd-angular-core-forms-select.mjs +390 -447
  173. package/fesm2022/sd-angular-core-forms-select.mjs.map +1 -1
  174. package/fesm2022/sd-angular-core-forms-textarea.mjs +167 -226
  175. package/fesm2022/sd-angular-core-forms-textarea.mjs.map +1 -1
  176. package/fesm2022/sd-angular-core-modules-authom.mjs +359 -0
  177. package/fesm2022/sd-angular-core-modules-authom.mjs.map +1 -0
  178. package/fesm2022/sd-angular-core-modules-keycloak.mjs +126 -0
  179. package/fesm2022/sd-angular-core-modules-keycloak.mjs.map +1 -0
  180. package/fesm2022/sd-angular-core-modules-layout.mjs +709 -456
  181. package/fesm2022/sd-angular-core-modules-layout.mjs.map +1 -1
  182. package/fesm2022/sd-angular-core-modules-permission.mjs +160 -74
  183. package/fesm2022/sd-angular-core-modules-permission.mjs.map +1 -1
  184. package/fesm2022/sd-angular-core-modules.mjs +2 -1
  185. package/fesm2022/sd-angular-core-modules.mjs.map +1 -1
  186. package/fesm2022/sd-angular-core-services-api.mjs +5 -10
  187. package/fesm2022/sd-angular-core-services-api.mjs.map +1 -1
  188. package/fesm2022/sd-angular-core-services-confirm.mjs +9 -7
  189. package/fesm2022/sd-angular-core-services-confirm.mjs.map +1 -1
  190. package/fesm2022/sd-angular-core-services-docx.mjs +173 -0
  191. package/fesm2022/sd-angular-core-services-docx.mjs.map +1 -0
  192. package/fesm2022/sd-angular-core-services-notify.mjs +2 -2
  193. package/fesm2022/sd-angular-core-services-notify.mjs.map +1 -1
  194. package/fesm2022/sd-angular-core-services.mjs +1 -0
  195. package/fesm2022/sd-angular-core-services.mjs.map +1 -1
  196. package/fesm2022/sd-angular-core-utilities-extensions.mjs +58 -80
  197. package/fesm2022/sd-angular-core-utilities-extensions.mjs.map +1 -1
  198. package/fesm2022/sd-angular-core-utilities-models.mjs +15 -1
  199. package/fesm2022/sd-angular-core-utilities-models.mjs.map +1 -1
  200. package/fesm2022/sd-angular-core.mjs +0 -1
  201. package/fesm2022/sd-angular-core.mjs.map +1 -1
  202. package/forms/autocomplete/src/autocomplete.component.d.ts +55 -55
  203. package/forms/chip/src/chip.component.d.ts +37 -40
  204. package/forms/chip-calendar/src/chip-calendar.component.d.ts +37 -38
  205. package/forms/date/src/date.component.d.ts +48 -46
  206. package/forms/date-range/src/date-range.component.d.ts +35 -34
  207. package/forms/datetime/src/datetime.component.d.ts +48 -49
  208. package/forms/input/src/input.component.d.ts +54 -57
  209. package/forms/input-number/src/input-number.component.d.ts +53 -54
  210. package/forms/select/src/select.component.d.ts +67 -64
  211. package/forms/textarea/src/textarea.component.d.ts +40 -43
  212. package/modules/authom/authom.configuration.d.ts +17 -0
  213. package/modules/authom/authom.interceptor.d.ts +3 -0
  214. package/modules/authom/authom.module.d.ts +16 -0
  215. package/modules/authom/authom.service.d.ts +32 -0
  216. package/modules/authom/index.d.ts +35 -0
  217. package/modules/index.d.ts +2 -1
  218. package/modules/keycloak/index.d.ts +4 -0
  219. package/modules/keycloak/keycloak.configuration.d.ts +11 -0
  220. package/modules/keycloak/keycloak.interceptor.d.ts +2 -0
  221. package/modules/keycloak/keycloak.module.d.ts +18 -0
  222. package/modules/keycloak/keycloak.service.d.ts +14 -0
  223. package/modules/layout/components/index.d.ts +2 -0
  224. package/modules/layout/components/layout-main/layout-main.component.d.ts +8 -12
  225. package/modules/layout/components/page/page.component.d.ts +5 -7
  226. package/modules/layout/components/sidebar-mobile-v1/components/sidebar/sidebar.component.d.ts +35 -0
  227. package/modules/layout/components/sidebar-mobile-v1/components/user/user.component.d.ts +24 -0
  228. package/modules/layout/components/sidebar-mobile-v1/main.component.d.ts +21 -0
  229. package/modules/layout/components/sidebar-v1/components/sidebar/sidebar.component.d.ts +22 -29
  230. package/modules/layout/components/sidebar-v1/components/user/user.component.d.ts +11 -17
  231. package/modules/layout/components/sidebar-v1/main.component.d.ts +14 -14
  232. package/modules/layout/configurations/layout.configuration.d.ts +46 -3
  233. package/modules/layout/modules/forbidden/pages/root/root.component.d.ts +3 -8
  234. package/modules/layout/modules/home/components/home-page/home-page.component.d.ts +2 -5
  235. package/modules/layout/modules/not-found/pages/root/root.component.d.ts +3 -8
  236. package/modules/layout/pipes/high-light-search.pipe.d.ts +1 -1
  237. package/modules/layout/services/index.d.ts +1 -0
  238. package/modules/layout/services/layout.service.d.ts +10 -0
  239. package/modules/layout/services/menu/menu.model.d.ts +4 -1
  240. package/modules/layout/services/storage/storage.service.d.ts +0 -3
  241. package/modules/permission/src/configurations/permission.configuration.d.ts +56 -2
  242. package/modules/permission/src/directives/permission.directive.d.ts +5 -8
  243. package/modules/permission/src/guards/permission.guard.d.ts +2 -1
  244. package/modules/permission/src/services/permission.service.d.ts +6 -9
  245. package/package.json +93 -69
  246. package/public-api.d.ts +0 -1
  247. package/sd-angular-core-19.0.0-beta.80.tgz +0 -0
  248. package/services/api/src/api.model.d.ts +6 -1
  249. package/services/confirm/src/lib/confirm.service.d.ts +5 -0
  250. package/services/docx/index.d.ts +1 -0
  251. package/services/docx/src/lib/docx.model.d.ts +9 -0
  252. package/services/docx/src/lib/docx.service.d.ts +13 -0
  253. package/services/docx/src/public-api.d.ts +2 -0
  254. package/services/index.d.ts +1 -0
  255. package/services/notify/index.d.ts +1 -0
  256. package/services/notify/src/notify.model.d.ts +1 -1
  257. package/services/notify/src/notify.service.d.ts +5 -5
  258. package/utilities/extensions/src/string.extension.d.ts +3 -0
  259. package/utilities/extensions/src/utility.extension.d.ts +1 -0
  260. package/utilities/models/index.d.ts +3 -0
  261. package/utilities/models/src/filter.model.d.ts +17 -4
  262. package/utilities/models/src/icon.model.d.ts +2 -0
  263. package/utilities/models/src/nested-key-of.model.d.ts +5 -0
  264. package/utilities/models/src/order.model.d.ts +2 -1
  265. package/utilities/models/src/paging.model.d.ts +2 -1
  266. package/utilities/models/src/pattern.model.d.ts +1 -1
  267. package/utilities/models/src/unwrap-signal.model.d.ts +6 -0
  268. package/components/document-builder/src/plugins/comment/comment.plugin.d.ts +0 -4
  269. package/components/document-builder/src/plugins/table-fit/table-fit.plugin.d.ts +0 -4
  270. package/components/modal/src/modal/modal.component.d.ts +0 -31
  271. package/components/table/src/components/desktop-cell-view/desktop-cell-view.component.d.ts +0 -14
  272. package/fesm2022/sd-angular-core-guards-permission.mjs +0 -155
  273. package/fesm2022/sd-angular-core-guards-permission.mjs.map +0 -1
  274. package/fesm2022/sd-angular-core-guards.mjs +0 -6
  275. package/fesm2022/sd-angular-core-guards.mjs.map +0 -1
  276. package/fesm2022/sd-angular-core-modules-oidc.mjs +0 -127
  277. package/fesm2022/sd-angular-core-modules-oidc.mjs.map +0 -1
  278. package/guards/index.d.ts +0 -1
  279. package/guards/permission/index.d.ts +0 -4
  280. package/guards/permission/src/configurations/index.d.ts +0 -1
  281. package/guards/permission/src/configurations/permission.configuration.d.ts +0 -8
  282. package/guards/permission/src/directives/index.d.ts +0 -1
  283. package/guards/permission/src/directives/permission.directive.d.ts +0 -12
  284. package/guards/permission/src/guards/index.d.ts +0 -1
  285. package/guards/permission/src/guards/permission.guard.d.ts +0 -13
  286. package/guards/permission/src/services/index.d.ts +0 -1
  287. package/guards/permission/src/services/permission.service.d.ts +0 -15
  288. package/modules/oidc/dynamic-sts.loader.d.ts +0 -11
  289. package/modules/oidc/index.d.ts +0 -2
  290. package/modules/oidc/oidc.configuration.d.ts +0 -11
  291. package/modules/oidc/oidc.module.d.ts +0 -14
  292. package/sd-angular-core-19.0.0-beta.8.tgz +0 -0
@@ -1,19 +1,19 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Pipe, Input, ChangeDetectionStrategy, Component, HostListener, ViewChild, createNgModule } from '@angular/core';
3
- import * as i1 from '@angular/router';
4
- import { RouterModule, RouterEvent, RoutesRecognized, NavigationEnd, ActivatedRoute } from '@angular/router';
5
- import * as i5 from '@angular/common';
2
+ import { Injectable, Pipe, Input, ChangeDetectionStrategy, Component, HostListener, ViewChild, signal, inject, Injector, NgModuleFactory, createNgModule } from '@angular/core';
3
+ import * as i2 from '@angular/router';
4
+ import { Router, ActivatedRoute, RouterEvent, NavigationEnd } from '@angular/router';
5
+ import * as i1 from '@angular/common';
6
6
  import { CommonModule } from '@angular/common';
7
7
  import * as i3 from '@angular/material/icon';
8
8
  import { MatIconModule } from '@angular/material/icon';
9
9
  import { MatTooltipModule } from '@angular/material/tooltip';
10
- import { BehaviorSubject, Subscription, Subject } from 'rxjs';
10
+ import { BehaviorSubject, Subscription, isObservable, lastValueFrom, Subject } from 'rxjs';
11
11
  import { debounceTime, startWith, map, filter, take } from 'rxjs/operators';
12
- import * as i2 from '@angular/cdk/drag-drop';
12
+ import { SdNotifyService } from '@sd-angular/core/services/notify';
13
+ import { SdUtilities } from '@sd-angular/core/utilities';
14
+ import * as i2$1 from '@angular/cdk/drag-drop';
13
15
  import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
14
16
  import { SdBadge } from '@sd-angular/core/components/badge';
15
- import { SdUtilities } from '@sd-angular/core/utilities';
16
- import * as i4 from '@sd-angular/core/services/notify';
17
17
 
18
18
  class SdTabBase {
19
19
  #tab;
@@ -114,6 +114,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
114
114
  }]
115
115
  }], ctorParameters: () => [] });
116
116
 
117
+ class SdTabDecoratorService {
118
+ static tabRouterService = new BehaviorSubject(undefined);
119
+ constructor(tabRouterService) {
120
+ SdTabDecoratorService.tabRouterService.next(tabRouterService);
121
+ }
122
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdTabDecoratorService, deps: [{ token: SdTabRouterService }], target: i0.ɵɵFactoryTarget.Injectable });
123
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdTabDecoratorService, providedIn: 'root' });
124
+ }
125
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdTabDecoratorService, decorators: [{
126
+ type: Injectable,
127
+ args: [{
128
+ providedIn: 'root',
129
+ }]
130
+ }], ctorParameters: () => [{ type: SdTabRouterService }] });
131
+
117
132
  class SdTabInfoPipe {
118
133
  tabRouterService;
119
134
  constructor(tabRouterService) {
@@ -153,12 +168,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
153
168
  class SdTabRouterItemComponent {
154
169
  cdRef;
155
170
  tabRouterService;
171
+ router;
156
172
  tab;
157
173
  #subsctiption = new Subscription();
158
174
  tabInfo;
159
- constructor(cdRef, tabRouterService) {
175
+ constructor(cdRef, tabRouterService, router) {
160
176
  this.cdRef = cdRef;
161
177
  this.tabRouterService = tabRouterService;
178
+ this.router = router;
162
179
  }
163
180
  ngOnInit() {
164
181
  this.#subsctiption.add(this.tabRouterService.events.pipe(debounceTime(100)).subscribe(() => {
@@ -174,6 +191,13 @@ class SdTabRouterItemComponent {
174
191
  ngOnDestroy() {
175
192
  this.#subsctiption.unsubscribe();
176
193
  }
194
+ onTabClick = (event) => {
195
+ event.preventDefault();
196
+ this.router.navigate([this.tab.url], {
197
+ queryParams: this.tab.queryParams,
198
+ state: { switchTab: true },
199
+ });
200
+ };
177
201
  close = (event) => {
178
202
  event.preventDefault();
179
203
  event.stopPropagation();
@@ -212,13 +236,13 @@ class SdTabRouterItemComponent {
212
236
  this.tabRouterService.close(this.tab);
213
237
  }
214
238
  };
215
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdTabRouterItemComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: SdTabRouterService }], target: i0.ɵɵFactoryTarget.Component });
216
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: SdTabRouterItemComponent, isStandalone: true, selector: "sd-tab-router-item", inputs: { tab: "tab" }, ngImport: i0, template: "<a\n [routerLink]=\"[tab.url]\"\n [queryParams]=\"tab.queryParams\"\n [state]=\"{ switchTab: true }\"\n class=\"tab-router__item d-flex align-items-center\"\n style=\"gap: 8px\"\n [class.tab-router__item--active]=\"tab.isActive\"\n (mousedown)=\"onMousedown($event)\"\n (mouseup)=\"onMouseup($event)\">\n @let info = tabInfo | sdTabInfo: tab;\n @if (info) {\n <sd-badge\n style=\"overflow: hidden;white-space: nowrap;\"\n [icon]=\"info.icon\"\n [title]=\"info.icon\"\n [tooltip]=\"info.tooltip || info.name\"\n [title]=\"info.name\"\n [color]=\"info.color\"></sd-badge>\n <button\n aria-hidden=\"true\"\n class=\"tab-router__close d-flex align-items-center justify-content-center ml-auto p-0\"\n (click)=\"close($event)\"\n (mousedown)=\"$event.stopPropagation()\">\n <mat-icon aria-hidden=\"true\" fontIcon=\"close\"></mat-icon>\n </button>\n }\n</a>\n", styles: [":host{display:block;overflow:hidden;position:relative;flex:1 1 64px;max-width:240px}:host:after{content:\"\";position:absolute;right:0;top:0;bottom:0;height:16px;width:1px;background:#dde0e5;margin:auto}:host:last-child:after{content:none}:host::ng-deep .tab-router__item sd-badge .c-badge-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:184px}.flex-1{flex:1}.tab-router__icon{background-color:#5c6bc0;width:16px;height:16px;line-height:16px;text-align:center;font-size:10px;color:#fff;border-radius:2px;text-transform:uppercase}.tab-router__icon .mat-icon{height:10px;width:10px;font-size:10px}.tab-router__close{color:#757575;outline:none;border:0;background:none;border-radius:50%;height:16px;width:16px}.tab-router__close:hover{background-color:#0000001f}.tab-router__close .mat-icon{font-size:12px;height:12px;width:12px}.tab-router__item{background:#f2f3f4;padding:8px;color:inherit;text-decoration:none;font-size:12px;line-height:16px;overflow:hidden}.tab-router__item:hover{background-color:#fff}.tab-router__name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tab-router__item--active{border-radius:8px 8px 0 0;background-color:#fff}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: SdBadge, selector: "sd-badge", inputs: ["type", "color", "primary", "secondary", "success", "info", "warning", "error", "fontSet", "title", "description", "tooltip", "icon", "size"], outputs: ["sdClick"] }, { kind: "pipe", type: SdTabInfoPipe, name: "sdTabInfo" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
239
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdTabRouterItemComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: SdTabRouterService }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component });
240
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: SdTabRouterItemComponent, isStandalone: true, selector: "sd-tab-router-item", inputs: { tab: "tab" }, ngImport: i0, template: "<a\r\n [href]=\"[tab.url]\"\r\n class=\"tab-router__item d-flex align-items-center gap-8\"\r\n [class.tab-router__item--active]=\"tab.isActive\"\r\n (click)=\"onTabClick($event)\"\r\n (mousedown)=\"onMousedown($event)\"\r\n (mouseup)=\"onMouseup($event)\">\r\n @let info = tabInfo | sdTabInfo: tab;\r\n @if (info) {\r\n <sd-badge\r\n style=\"overflow: hidden;white-space: nowrap;\"\r\n [icon]=\"info.icon\"\r\n [title]=\"info.icon\"\r\n [tooltip]=\"info.tooltip || info.name\"\r\n [title]=\"info.name\"\r\n [color]=\"info.color\"\r\n (click)=\"onTabClick($event)\"></sd-badge>\r\n <button\r\n aria-hidden=\"true\"\r\n class=\"tab-router__close d-flex align-items-center justify-content-center ml-auto p-0\"\r\n (click)=\"close($event)\"\r\n (mousedown)=\"$event.stopPropagation()\">\r\n <mat-icon aria-hidden=\"true\" fontIcon=\"close\"></mat-icon>\r\n </button>\r\n }\r\n</a>\r\n", styles: [":host{display:block;overflow:hidden;position:relative;flex:1 1 64px;max-width:240px}:host:after{content:\"\";position:absolute;right:0;top:0;bottom:0;height:16px;width:1px;background:#dde0e5;margin:auto}:host:last-child:after{content:none}:host::ng-deep .tab-router__item sd-badge .c-badge-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:184px}.flex-1{flex:1}.tab-router__icon{background-color:#5c6bc0;width:16px;height:16px;line-height:16px;text-align:center;font-size:10px;color:#fff;border-radius:2px;text-transform:uppercase}.tab-router__icon .mat-icon{height:10px;width:10px;font-size:10px}.tab-router__close{color:#757575;outline:none;border:0;background:none;border-radius:50%;height:16px;width:16px}.tab-router__close:hover{background-color:#0000001f}.tab-router__close .mat-icon{font-size:12px;height:12px;width:12px}.tab-router__item{background:#f2f3f4;padding:8px;color:inherit;text-decoration:none;font-size:12px;line-height:16px;overflow:hidden}.tab-router__item:hover{background-color:#fff}.tab-router__name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tab-router__item--active{border-radius:8px 8px 0 0;background-color:#fff}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: SdBadge, selector: "sd-badge", inputs: ["type", "color", "primary", "secondary", "success", "info", "warning", "error", "fontSet", "title", "description", "tooltip", "icon", "size"], outputs: ["click"] }, { kind: "pipe", type: SdTabInfoPipe, name: "sdTabInfo" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
217
241
  }
218
242
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdTabRouterItemComponent, decorators: [{
219
243
  type: Component,
220
- args: [{ selector: 'sd-tab-router-item', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, RouterModule, MatIconModule, SdBadge, SdTabInfoPipe], template: "<a\n [routerLink]=\"[tab.url]\"\n [queryParams]=\"tab.queryParams\"\n [state]=\"{ switchTab: true }\"\n class=\"tab-router__item d-flex align-items-center\"\n style=\"gap: 8px\"\n [class.tab-router__item--active]=\"tab.isActive\"\n (mousedown)=\"onMousedown($event)\"\n (mouseup)=\"onMouseup($event)\">\n @let info = tabInfo | sdTabInfo: tab;\n @if (info) {\n <sd-badge\n style=\"overflow: hidden;white-space: nowrap;\"\n [icon]=\"info.icon\"\n [title]=\"info.icon\"\n [tooltip]=\"info.tooltip || info.name\"\n [title]=\"info.name\"\n [color]=\"info.color\"></sd-badge>\n <button\n aria-hidden=\"true\"\n class=\"tab-router__close d-flex align-items-center justify-content-center ml-auto p-0\"\n (click)=\"close($event)\"\n (mousedown)=\"$event.stopPropagation()\">\n <mat-icon aria-hidden=\"true\" fontIcon=\"close\"></mat-icon>\n </button>\n }\n</a>\n", styles: [":host{display:block;overflow:hidden;position:relative;flex:1 1 64px;max-width:240px}:host:after{content:\"\";position:absolute;right:0;top:0;bottom:0;height:16px;width:1px;background:#dde0e5;margin:auto}:host:last-child:after{content:none}:host::ng-deep .tab-router__item sd-badge .c-badge-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:184px}.flex-1{flex:1}.tab-router__icon{background-color:#5c6bc0;width:16px;height:16px;line-height:16px;text-align:center;font-size:10px;color:#fff;border-radius:2px;text-transform:uppercase}.tab-router__icon .mat-icon{height:10px;width:10px;font-size:10px}.tab-router__close{color:#757575;outline:none;border:0;background:none;border-radius:50%;height:16px;width:16px}.tab-router__close:hover{background-color:#0000001f}.tab-router__close .mat-icon{font-size:12px;height:12px;width:12px}.tab-router__item{background:#f2f3f4;padding:8px;color:inherit;text-decoration:none;font-size:12px;line-height:16px;overflow:hidden}.tab-router__item:hover{background-color:#fff}.tab-router__name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tab-router__item--active{border-radius:8px 8px 0 0;background-color:#fff}\n"] }]
221
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: SdTabRouterService }], propDecorators: { tab: [{
244
+ args: [{ selector: 'sd-tab-router-item', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, MatIconModule, SdBadge, SdTabInfoPipe], template: "<a\r\n [href]=\"[tab.url]\"\r\n class=\"tab-router__item d-flex align-items-center gap-8\"\r\n [class.tab-router__item--active]=\"tab.isActive\"\r\n (click)=\"onTabClick($event)\"\r\n (mousedown)=\"onMousedown($event)\"\r\n (mouseup)=\"onMouseup($event)\">\r\n @let info = tabInfo | sdTabInfo: tab;\r\n @if (info) {\r\n <sd-badge\r\n style=\"overflow: hidden;white-space: nowrap;\"\r\n [icon]=\"info.icon\"\r\n [title]=\"info.icon\"\r\n [tooltip]=\"info.tooltip || info.name\"\r\n [title]=\"info.name\"\r\n [color]=\"info.color\"\r\n (click)=\"onTabClick($event)\"></sd-badge>\r\n <button\r\n aria-hidden=\"true\"\r\n class=\"tab-router__close d-flex align-items-center justify-content-center ml-auto p-0\"\r\n (click)=\"close($event)\"\r\n (mousedown)=\"$event.stopPropagation()\">\r\n <mat-icon aria-hidden=\"true\" fontIcon=\"close\"></mat-icon>\r\n </button>\r\n }\r\n</a>\r\n", styles: [":host{display:block;overflow:hidden;position:relative;flex:1 1 64px;max-width:240px}:host:after{content:\"\";position:absolute;right:0;top:0;bottom:0;height:16px;width:1px;background:#dde0e5;margin:auto}:host:last-child:after{content:none}:host::ng-deep .tab-router__item sd-badge .c-badge-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:184px}.flex-1{flex:1}.tab-router__icon{background-color:#5c6bc0;width:16px;height:16px;line-height:16px;text-align:center;font-size:10px;color:#fff;border-radius:2px;text-transform:uppercase}.tab-router__icon .mat-icon{height:10px;width:10px;font-size:10px}.tab-router__close{color:#757575;outline:none;border:0;background:none;border-radius:50%;height:16px;width:16px}.tab-router__close:hover{background-color:#0000001f}.tab-router__close .mat-icon{font-size:12px;height:12px;width:12px}.tab-router__item{background:#f2f3f4;padding:8px;color:inherit;text-decoration:none;font-size:12px;line-height:16px;overflow:hidden}.tab-router__item:hover{background-color:#fff}.tab-router__name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tab-router__item--active{border-radius:8px 8px 0 0;background-color:#fff}\n"] }]
245
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: SdTabRouterService }, { type: i2.Router }], propDecorators: { tab: [{
222
246
  type: Input,
223
247
  args: [{ required: true }]
224
248
  }] } });
@@ -253,7 +277,7 @@ class SdTabRouterNavComponent {
253
277
  moveItemInArray(this.tabs, event.previousIndex, event.currentIndex);
254
278
  };
255
279
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdTabRouterNavComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
256
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: SdTabRouterNavComponent, isStandalone: true, selector: "sd-tab-router-nav", inputs: { tabs: "tabs" }, host: { listeners: { "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "tabRouterNav", first: true, predicate: ["tabRouterNav"], descendants: true }], ngImport: i0, template: "<div\n #tabRouterNav\n cdkDropList\n cdkDropListLockAxis=\"x\"\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListDropped)=\"onDrop($event)\"\n class=\"tab-router__nav tab-router__nav--{{ mode }} d-flex align-items-center flex-nowrap\"\n [class.d-none]=\"tabs.length > 1\">\n <ng-container *ngFor=\"let tab of tabs\">\n <sd-tab-router-item [tab]=\"tab\" cdkDrag [cdkDragBoundary]=\"elementRef?.nativeElement\"></sd-tab-router-item>\n </ng-container>\n</div>\n", styles: [".tab-router__nav{background:#f9f9f9;overflow:hidden}.tab-router__nav--compact::ng-deep .tab-router__name{display:none}.tab-router__nav--compact::ng-deep .tab-router__icon{margin:0!important}.tab-router__nav--compact::ng-deep .tab-router__item--active{min-width:240px}.tab-router__nav--compact::ng-deep .tab-router__item--active .tab-router__icon{margin-right:8px!important}.tab-router__nav--compact::ng-deep .tab-router__item--active .tab-router__name{display:-webkit-box}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: SdTabRouterItemComponent, selector: "sd-tab-router-item", inputs: ["tab"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
280
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: SdTabRouterNavComponent, isStandalone: true, selector: "sd-tab-router-nav", inputs: { tabs: "tabs" }, host: { listeners: { "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "tabRouterNav", first: true, predicate: ["tabRouterNav"], descendants: true }], ngImport: i0, template: "<div\n #tabRouterNav\n cdkDropList\n cdkDropListLockAxis=\"x\"\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListDropped)=\"onDrop($event)\"\n class=\"tab-router__nav tab-router__nav--{{ mode }} d-flex align-items-center flex-nowrap\"\n [class.d-none]=\"tabs.length > 1\">\n <ng-container *ngFor=\"let tab of tabs\">\n <sd-tab-router-item [tab]=\"tab\" cdkDrag [cdkDragBoundary]=\"elementRef?.nativeElement\"></sd-tab-router-item>\n </ng-container>\n</div>\n", styles: [".tab-router__nav{background:#f9f9f9;overflow:hidden}.tab-router__nav--compact::ng-deep .tab-router__name{display:none}.tab-router__nav--compact::ng-deep .tab-router__icon{margin:0!important}.tab-router__nav--compact::ng-deep .tab-router__item--active{min-width:240px}.tab-router__nav--compact::ng-deep .tab-router__item--active .tab-router__icon{margin-right:8px!important}.tab-router__nav--compact::ng-deep .tab-router__item--active .tab-router__name{display:-webkit-box}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i2$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: SdTabRouterItemComponent, selector: "sd-tab-router-item", inputs: ["tab"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
257
281
  }
258
282
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdTabRouterNavComponent, decorators: [{
259
283
  type: Component,
@@ -268,64 +292,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
268
292
  args: ['window:resize', ['$event']]
269
293
  }] } });
270
294
 
271
- class SdTabDecoratorService {
272
- static tabRouterService = new BehaviorSubject(undefined);
273
- constructor(tabRouterService) {
274
- SdTabDecoratorService.tabRouterService.next(tabRouterService);
275
- }
276
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdTabDecoratorService, deps: [{ token: SdTabRouterService }], target: i0.ɵɵFactoryTarget.Injectable });
277
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdTabDecoratorService, providedIn: 'root' });
278
- }
279
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdTabDecoratorService, decorators: [{
280
- type: Injectable,
281
- args: [{
282
- providedIn: 'root',
283
- }]
284
- }], ctorParameters: () => [{ type: SdTabRouterService }] });
285
-
286
295
  /* eslint-disable @typescript-eslint/no-explicit-any */
287
296
  class SdTabRouterOutletComponent {
288
- router;
289
- activatedRoute;
290
- cd;
291
- injector;
292
- tabDecoratorService;
293
- tabRouterService;
294
- sdNotifyService;
295
297
  tabRouterNav;
296
- tabs = [];
298
+ tabs = signal([]);
299
+ #router = inject(Router);
300
+ #activatedRoute = inject(ActivatedRoute);
301
+ #injector = inject(Injector);
302
+ #tabRouterService = inject(SdTabRouterService);
303
+ #sdNotifyService = inject(SdNotifyService);
304
+ #tabDecoratorService = inject(SdTabDecoratorService);
297
305
  #rootRoute;
298
306
  #subscription = new Subscription();
299
- #firstLoad = true;
300
- constructor(router, activatedRoute, cd, injector, tabDecoratorService, // KHÔNG XÓA
301
- tabRouterService, sdNotifyService) {
302
- this.router = router;
303
- this.activatedRoute = activatedRoute;
304
- this.cd = cd;
305
- this.injector = injector;
306
- this.tabDecoratorService = tabDecoratorService;
307
- this.tabRouterService = tabRouterService;
308
- this.sdNotifyService = sdNotifyService;
309
- this.#subscription.add(router.events
310
- .pipe(map((event) => (event instanceof RouterEvent ? event : event.routerEvent)), filter(event => {
311
- return event instanceof RoutesRecognized || event instanceof NavigationEnd;
312
- }))
307
+ constructor() {
308
+ this.#subscription.add(this.#router.events
309
+ .pipe(map((event) => (event instanceof RouterEvent ? event : event.routerEvent)), filter(event => event instanceof NavigationEnd))
313
310
  .subscribe(async (event) => {
314
- if (this.#firstLoad && event instanceof NavigationEnd) {
315
- this.#firstLoad = false;
316
- const route = this.#getActivatedRouteSnapshot(this.activatedRoute.snapshot);
317
- this.#rootRoute = this.router.routerState.root;
318
- await this.#activeRoute(event.urlAfterRedirects || event.url, route);
319
- return;
320
- }
321
- if (!this.#firstLoad && event instanceof RoutesRecognized) {
322
- const route = this.#getActivatedRouteSnapshot(event.state.root);
323
- this.#rootRoute = this.router.routerState.root;
324
- await this.#activeRoute(event.urlAfterRedirects || event.url, route);
325
- }
311
+ const route = this.#getActivatedRouteSnapshot(this.#activatedRoute.snapshot);
312
+ this.#rootRoute = this.#router.routerState.root;
313
+ await this.#activeRoute(event.urlAfterRedirects || event.url, route);
326
314
  }));
327
- this.#subscription.add(tabRouterService.actions.subscribe((event) => {
328
- if (event && event.type === 'close') {
315
+ this.#subscription.add(this.#tabRouterService.actions.subscribe((event) => {
316
+ if (event?.type === 'close') {
329
317
  this.#closeTab(event.tab);
330
318
  }
331
319
  }));
@@ -333,61 +321,42 @@ class SdTabRouterOutletComponent {
333
321
  ngOnDestroy() {
334
322
  this.#subscription.unsubscribe();
335
323
  }
336
- tabTrackBy = (index, tab) => {
337
- return tab.key;
338
- };
324
+ tabTrackBy = (index, tab) => tab.key;
339
325
  #closeTab = (tab) => {
326
+ const currentTabs = this.tabs();
340
327
  const { isActive, key: activeKey } = tab;
341
328
  if (isActive) {
342
- const activeIndex = this.tabs.findIndex(({ key }) => key === activeKey);
343
- const nextTab = this.tabs[activeIndex + 1] || this.tabs[activeIndex - 1];
329
+ const activeIndex = currentTabs.findIndex(({ key }) => key === activeKey);
330
+ const nextTab = currentTabs[activeIndex + 1] || currentTabs[activeIndex - 1];
331
+ this.tabs.set(currentTabs.filter(({ key }) => key !== activeKey));
344
332
  if (nextTab) {
345
- const { url: nextUrl } = nextTab;
346
- const nextQueryParams = {
347
- ...(nextTab.queryParams || {}),
348
- };
349
- this.tabs = this.tabs.filter(({ key }) => key !== activeKey);
350
- this.router.navigate([nextUrl], {
351
- queryParams: nextQueryParams,
352
- state: {
353
- switchTab: true,
354
- },
333
+ this.#router.navigate([nextTab.url], {
334
+ queryParams: { ...(nextTab.queryParams || {}) },
335
+ state: { switchTab: true },
355
336
  });
356
337
  }
357
338
  else {
358
- this.tabs = this.tabs.filter(({ key }) => key !== activeKey);
359
- this.router.navigateByUrl('/', {
360
- state: {
361
- switchTab: true,
362
- },
363
- });
339
+ this.#router.navigateByUrl('/', { state: { switchTab: true } });
364
340
  }
365
341
  }
366
342
  else {
367
- this.tabs = this.tabs.filter(({ key }) => key !== tab.key);
343
+ this.tabs.set(currentTabs.filter(({ key }) => key !== tab.key));
368
344
  this.tabRouterNav?.checkUI();
369
- this.cd.markForCheck();
370
345
  }
371
346
  };
372
347
  #activeRoute = async (fullUrl, route) => {
373
- if (!route?.component) {
348
+ if (!route?.component)
374
349
  return;
375
- }
376
350
  const component = route.component;
377
- const queryParams = {
378
- ...(route.queryParams || {}),
379
- };
380
- const params = {
381
- ...(route.params || {}),
382
- };
383
- const data = {
384
- ...(route.data || {}),
385
- };
351
+ const queryParams = { ...(route.queryParams || {}) };
352
+ const params = { ...(route.params || {}) };
353
+ const data = { ...(route.data || {}) };
386
354
  const [url] = fullUrl.split('?');
387
355
  const key = SdUtilities.hash({ url, queryParams });
388
356
  let existedIndex = -1;
389
357
  let activatedIndex = -1;
390
- this.tabs.forEach((tab, index) => {
358
+ const currentTabs = this.tabs();
359
+ currentTabs.forEach((tab, index) => {
391
360
  if (tab.key === key) {
392
361
  tab.isActive = true;
393
362
  existedIndex = index;
@@ -395,179 +364,120 @@ class SdTabRouterOutletComponent {
395
364
  else {
396
365
  if (tab.isActive) {
397
366
  activatedIndex = index;
398
- this.tabRouterService.pushEvent(tab, SdTabDeactivated);
367
+ this.#tabRouterService.pushEvent(tab, SdTabDeactivated);
399
368
  }
400
369
  tab.isActive = false;
401
370
  }
402
371
  });
403
- const currentNavigation = this.router.getCurrentNavigation();
404
- // Switch tab sẽ ko re-render lại trang
405
- const switchTab = currentNavigation?.extras?.state?.['switchTab'];
406
- // Replace tab sẽ close trang hiện tại
372
+ const currentNavigation = this.#router.getCurrentNavigation();
407
373
  const replaceTab = currentNavigation?.extras?.state?.['replaceTab'];
408
- if (existedIndex >= 0) {
409
- const existedTab = this.tabs[existedIndex];
410
- if (replaceTab && activatedIndex >= 0) {
411
- if (activatedIndex >= 0) {
412
- this.tabs.splice(activatedIndex, 1);
374
+ // --- XỬ LÝ INJECTOR VÀ FIX LỖI TYPE TS(2345) ---
375
+ const getBestInjector = async (snapshot) => {
376
+ // 1. Nếu là Standalone Route, lấy injector từ chính route config (đã được router resolve)
377
+ const routeInjector = snapshot._resolvedGui || snapshot.routeConfig?._injector;
378
+ if (routeInjector)
379
+ return routeInjector;
380
+ // 2. Xử lý NgModule (Lazy load kiểu cũ)
381
+ const loadChildren = snapshot.parent?.routeConfig?.loadChildren;
382
+ if (typeof loadChildren === 'function') {
383
+ let loaded = await loadChildren();
384
+ // Unwrap Observable
385
+ if (isObservable(loaded)) {
386
+ loaded = await lastValueFrom(loaded);
413
387
  }
414
- }
415
- if (switchTab) {
416
- this.tabRouterService.setCurrentTab(existedTab);
417
- this.tabRouterService.pushEvent(existedTab, SdTabActivated);
418
- }
419
- else {
420
- if (typeof route?.parent?.routeConfig?.loadChildren === 'function') {
421
- const module = (await route.parent.routeConfig.loadChildren());
422
- const moduleRef = createNgModule(module, this.injector);
423
- const activatedRoute = this.#getActivatedRoute(this.#rootRoute, component);
424
- const tab = {
425
- key,
426
- component,
427
- injector: new SdOutletInjector(activatedRoute, moduleRef),
428
- isActive: true,
429
- url,
430
- params,
431
- queryParams,
432
- data,
433
- tabInfoChanges: new Subject(),
434
- };
435
- this.tabs[this.tabs.indexOf(existedTab)] = tab;
388
+ // Unwrap Default Export (ES Module)
389
+ if (loaded && typeof loaded === 'object' && 'default' in loaded) {
390
+ loaded = loaded.default;
391
+ }
392
+ // Nếu là NgModuleFactory (Angular cũ hơn)
393
+ if (loaded instanceof NgModuleFactory) {
394
+ return loaded.create(this.#injector).injector;
395
+ }
396
+ // Nếu Type (Class NgModule) - Đây là chỗ fix lỗi TS(2345)
397
+ if (typeof loaded === 'function' && !Array.isArray(loaded)) {
398
+ try {
399
+ return createNgModule(loaded, this.#injector).injector;
400
+ }
401
+ catch {
402
+ return this.#injector;
403
+ }
436
404
  }
437
405
  }
406
+ return this.#injector;
407
+ };
408
+ const finalInjector = await getBestInjector(route);
409
+ const activatedRoute = this.#getActivatedRoute(this.#rootRoute, component);
410
+ const newTab = {
411
+ key,
412
+ component,
413
+ injector: new SdOutletInjector(activatedRoute, finalInjector),
414
+ isActive: true,
415
+ url,
416
+ params,
417
+ queryParams,
418
+ data,
419
+ tabInfoChanges: new Subject(),
420
+ };
421
+ if (existedIndex >= 0) {
422
+ const updatedTabs = [...currentTabs];
423
+ if (replaceTab && activatedIndex >= 0) {
424
+ updatedTabs.splice(activatedIndex, 1);
425
+ }
426
+ this.#tabRouterService.setCurrentTab(updatedTabs[existedIndex]);
427
+ this.#tabRouterService.pushEvent(updatedTabs[existedIndex], SdTabActivated);
428
+ this.tabs.set(updatedTabs);
438
429
  }
439
430
  else {
440
- if (typeof route?.parent?.routeConfig?.loadChildren === 'function') {
441
- const module = (await route.parent.routeConfig.loadChildren());
442
- const moduleRef = createNgModule(module, this.injector);
443
- const activatedRoute = this.#getActivatedRoute(this.#rootRoute, component);
444
- const tab = {
445
- key,
446
- component,
447
- injector: new SdOutletInjector(activatedRoute, moduleRef),
448
- isActive: true,
449
- url,
450
- params,
451
- queryParams,
452
- data,
453
- tabInfoChanges: new Subject(),
454
- };
455
- this.tabRouterService.setCurrentTab(tab);
456
- if (activatedIndex >= 0 && replaceTab) {
457
- this.tabs.splice(activatedIndex, 1);
458
- }
459
- this.tabs.push(tab);
460
- // if (existedIndex >= 0 && !switchTab) {
461
- // this.tabs[existedIndex] = tab;
462
- // } else {
463
- // this.tabs.push(tab);
464
- // }
431
+ const updatedTabs = [...currentTabs];
432
+ this.#tabRouterService.setCurrentTab(newTab);
433
+ if (activatedIndex >= 0 && replaceTab) {
434
+ updatedTabs.splice(activatedIndex, 1);
465
435
  }
466
- this.tabRouterNav?.checkUI();
467
- if (this.tabs.length > 10) {
468
- this.sdNotifyService.warning('Bạn đã mở quá nhiều tab. Vui lòng tắt các tab không dùng để hệ thống hoạt động tốt hơn.');
436
+ this.tabs.set([...updatedTabs, newTab]);
437
+ if (this.tabs().length > 30) {
438
+ this.#sdNotifyService.warning('Bạn đã mở quá nhiều tab.');
469
439
  }
470
- // if (this.tabs.length > 15) {
471
- // this.tabs.splice(0, this.tabs.length - 10);
472
- // }
473
440
  }
474
- // if (existedIndex >= 0 && switchTab) {
475
- // const existedTab = this.tabs[existedIndex];
476
- // this.tabRouterService.setCurrentTab(existedTab);
477
- // this.tabRouterService.pushEvent(existedTab, SdTabActivated);
478
- // } else {
479
- // if (typeof route?.parent?.routeConfig?.loadChildren === 'function') {
480
- // const module = await route.parent.routeConfig.loadChildren();
481
- // const factory = await this.compiler.compileModuleAsync(module);
482
- // const injector = factory.create(this.injector);
483
- // const activatedRoute = this.#getActivatedRoute(
484
- // this.#rootRoute,
485
- // component
486
- // );
487
- // const tab = {
488
- // key,
489
- // component,
490
- // injector: new SdOutletInjector(activatedRoute, injector),
491
- // isActive: true,
492
- // name: url,
493
- // url,
494
- // params,
495
- // queryParams,
496
- // data
497
- // };
498
- // this.tabRouterService.setCurrentTab(tab);
499
- // if (activatedIndex >= 0 && replaceTab) {
500
- // this.tabs.splice(activatedIndex, 1);
501
- // }
502
- // if (existedIndex >= 0 && !switchTab) {
503
- // this.tabs[existedIndex] = tab;
504
- // } else {
505
- // this.tabs.push(tab);
506
- // }
507
- // }
508
- // this.tabRouterNav?.checkUI();
509
- // if (this.tabs.length > 10) {
510
- // this.sdNotifyService.notify.warning(
511
- // 'Bạn đã mở quá nhiều tab. Vui lòng tắt các tab không dùng để hệ thống hoạt động tốt hơn.'
512
- // );
513
- // }
514
- // if (this.tabs.length > 15) {
515
- // this.tabs.splice(0, this.tabs.length - 10);
516
- // }
517
- // }
518
- this.cd.markForCheck();
441
+ this.tabRouterNav?.checkUI();
519
442
  };
520
- #getActivatedRouteSnapshot = (activatedRouteSnapshot) => {
521
- if (!activatedRouteSnapshot) {
522
- return null;
523
- }
524
- while (activatedRouteSnapshot.firstChild) {
525
- activatedRouteSnapshot = activatedRouteSnapshot.firstChild;
526
- }
527
- return activatedRouteSnapshot;
443
+ #getActivatedRouteSnapshot = (snapshot) => {
444
+ let node = snapshot;
445
+ while (node.firstChild)
446
+ node = node.firstChild;
447
+ return node;
528
448
  };
529
449
  #getActivatedRoute = (activatedRoute, component) => {
530
- if (!activatedRoute) {
531
- return null;
532
- }
533
- if (activatedRoute.component && activatedRoute.component === component) {
450
+ if (activatedRoute.component === component)
534
451
  return activatedRoute;
535
- }
536
- while (activatedRoute.firstChild) {
537
- activatedRoute = activatedRoute.firstChild;
538
- if (activatedRoute.component && activatedRoute.component === component) {
539
- return activatedRoute;
540
- }
452
+ for (const child of activatedRoute.children) {
453
+ const result = this.#getActivatedRoute(child, component);
454
+ if (result)
455
+ return result;
541
456
  }
542
457
  return null;
543
458
  };
544
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdTabRouterOutletComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i0.ChangeDetectorRef }, { token: i0.Injector }, { token: SdTabDecoratorService }, { token: SdTabRouterService }, { token: i4.SdNotifyService }], target: i0.ɵɵFactoryTarget.Component });
545
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: SdTabRouterOutletComponent, isStandalone: true, selector: "sd-tab-router-outlet", viewQueries: [{ propertyName: "tabRouterNav", first: true, predicate: ["tabRouterNav"], descendants: true }], ngImport: i0, template: "<sd-tab-router-nav [tabs]=\"tabs\" #tabRouterNav></sd-tab-router-nav>\n\n<div class=\"tab-router__list\">\n <ng-container *ngFor=\"let tab of tabs; trackBy: tabTrackBy\">\n <div class=\"tab-router__pane\" [class.active]=\"tab.isActive\" [id]=\"tab.key\">\n <div class=\"tab-router__content\">\n <ng-container *ngComponentOutlet=\"tab.component; injector: tab.injector\"></ng-container>\n </div>\n </div>\n </ng-container>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:100%;height:calc(100vh - 64px)}:host ::ng-deep .sd-loading{max-width:100%;max-height:100%}.tab-router__list{flex:1}.tab-router__pane{display:none;position:relative;height:100%;width:100%}.tab-router__pane.active{display:block}.tab-router__content{position:absolute;inset:0;overflow:auto;height:100%;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "component", type: SdTabRouterNavComponent, selector: "sd-tab-router-nav", inputs: ["tabs"] }] });
459
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdTabRouterOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
460
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: SdTabRouterOutletComponent, isStandalone: true, selector: "sd-tab-router-outlet", viewQueries: [{ propertyName: "tabRouterNav", first: true, predicate: ["tabRouterNav"], descendants: true }], ngImport: i0, template: "<sd-tab-router-nav [tabs]=\"tabs()\" #tabRouterNav></sd-tab-router-nav>\n\n<div class=\"tab-router__list\">\n @for (tab of tabs(); track tab.key) {\n <div class=\"tab-router__pane\" [class.active]=\"tab.isActive\" [id]=\"tab.key\">\n <div class=\"tab-router__content\">\n <ng-container *ngComponentOutlet=\"tab.component; injector: tab.injector\"></ng-container>\n </div>\n </div>\n } @empty {\n <div class=\"tab-router__empty\">\n </div>\n }\n</div>", styles: [":host{display:flex;flex-direction:column;width:100%;height:calc(100vh - 64px)}:host ::ng-deep .sd-loading{max-width:100%;max-height:100%}.tab-router__list{flex:1}.tab-router__pane{display:none;position:relative;height:100%;width:100%}.tab-router__pane.active{display:block}.tab-router__content{position:absolute;inset:0;overflow:auto;height:100%;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "component", type: SdTabRouterNavComponent, selector: "sd-tab-router-nav", inputs: ["tabs"] }] });
546
461
  }
547
462
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdTabRouterOutletComponent, decorators: [{
548
463
  type: Component,
549
- args: [{ selector: 'sd-tab-router-outlet', standalone: true, imports: [CommonModule, MatIconModule, MatTooltipModule, SdTabRouterNavComponent], template: "<sd-tab-router-nav [tabs]=\"tabs\" #tabRouterNav></sd-tab-router-nav>\n\n<div class=\"tab-router__list\">\n <ng-container *ngFor=\"let tab of tabs; trackBy: tabTrackBy\">\n <div class=\"tab-router__pane\" [class.active]=\"tab.isActive\" [id]=\"tab.key\">\n <div class=\"tab-router__content\">\n <ng-container *ngComponentOutlet=\"tab.component; injector: tab.injector\"></ng-container>\n </div>\n </div>\n </ng-container>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:100%;height:calc(100vh - 64px)}:host ::ng-deep .sd-loading{max-width:100%;max-height:100%}.tab-router__list{flex:1}.tab-router__pane{display:none;position:relative;height:100%;width:100%}.tab-router__pane.active{display:block}.tab-router__content{position:absolute;inset:0;overflow:auto;height:100%;width:100%}\n"] }]
550
- }], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i0.ChangeDetectorRef }, { type: i0.Injector }, { type: SdTabDecoratorService }, { type: SdTabRouterService }, { type: i4.SdNotifyService }], propDecorators: { tabRouterNav: [{
464
+ args: [{ selector: 'sd-tab-router-outlet', standalone: true, imports: [CommonModule, MatIconModule, MatTooltipModule, SdTabRouterNavComponent], template: "<sd-tab-router-nav [tabs]=\"tabs()\" #tabRouterNav></sd-tab-router-nav>\n\n<div class=\"tab-router__list\">\n @for (tab of tabs(); track tab.key) {\n <div class=\"tab-router__pane\" [class.active]=\"tab.isActive\" [id]=\"tab.key\">\n <div class=\"tab-router__content\">\n <ng-container *ngComponentOutlet=\"tab.component; injector: tab.injector\"></ng-container>\n </div>\n </div>\n } @empty {\n <div class=\"tab-router__empty\">\n </div>\n }\n</div>", styles: [":host{display:flex;flex-direction:column;width:100%;height:calc(100vh - 64px)}:host ::ng-deep .sd-loading{max-width:100%;max-height:100%}.tab-router__list{flex:1}.tab-router__pane{display:none;position:relative;height:100%;width:100%}.tab-router__pane.active{display:block}.tab-router__content{position:absolute;inset:0;overflow:auto;height:100%;width:100%}\n"] }]
465
+ }], ctorParameters: () => [], propDecorators: { tabRouterNav: [{
551
466
  type: ViewChild,
552
467
  args: ['tabRouterNav']
553
468
  }] } });
554
469
  class SdOutletInjector {
555
470
  route;
556
- parent;
557
- constructor(route,
558
- // private childContexts: ChildrenOutletContexts,
559
- parent) {
471
+ parentInjector;
472
+ constructor(route, parentInjector) {
560
473
  this.route = route;
561
- this.parent = parent;
474
+ this.parentInjector = parentInjector;
562
475
  }
563
476
  get(token, notFoundValue) {
564
- if (token === ActivatedRoute && this.route) {
565
- return this.route;
477
+ if (token === ActivatedRoute) {
478
+ return this.route || notFoundValue;
566
479
  }
567
- // if (token === ChildrenOutletContexts) {
568
- // return this.childContexts;
569
- // }
570
- return this.parent.injector.get(token, notFoundValue);
480
+ return this.parentInjector.get(token, notFoundValue);
571
481
  }
572
482
  }
573
483