@ng-doc/app 22.0.0 → 22.2.0

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 (173) hide show
  1. package/LICENSE +21 -0
  2. package/fesm2022/ng-doc-app-classes-content-controller.mjs +22 -4
  3. package/fesm2022/ng-doc-app-classes-content-controller.mjs.map +1 -1
  4. package/fesm2022/ng-doc-app-classes-default-search-engine.mjs +36 -12
  5. package/fesm2022/ng-doc-app-classes-default-search-engine.mjs.map +1 -1
  6. package/fesm2022/ng-doc-app-classes-root-page.mjs.map +1 -1
  7. package/fesm2022/ng-doc-app-components-api-list.mjs +7 -5
  8. package/fesm2022/ng-doc-app-components-api-list.mjs.map +1 -1
  9. package/fesm2022/ng-doc-app-components-breadcrumb.mjs +5 -3
  10. package/fesm2022/ng-doc-app-components-breadcrumb.mjs.map +1 -1
  11. package/fesm2022/ng-doc-app-components-code.mjs +6 -4
  12. package/fesm2022/ng-doc-app-components-code.mjs.map +1 -1
  13. package/fesm2022/ng-doc-app-components-command-palette.mjs +35 -27
  14. package/fesm2022/ng-doc-app-components-command-palette.mjs.map +1 -1
  15. package/fesm2022/ng-doc-app-components-copy-button.mjs +6 -4
  16. package/fesm2022/ng-doc-app-components-copy-button.mjs.map +1 -1
  17. package/fesm2022/ng-doc-app-components-demo-displayer.mjs +19 -4
  18. package/fesm2022/ng-doc-app-components-demo-displayer.mjs.map +1 -1
  19. package/fesm2022/ng-doc-app-components-demo-frame.mjs +279 -0
  20. package/fesm2022/ng-doc-app-components-demo-frame.mjs.map +1 -0
  21. package/fesm2022/ng-doc-app-components-demo-pane.mjs +2 -2
  22. package/fesm2022/ng-doc-app-components-demo-pane.mjs.map +1 -1
  23. package/fesm2022/ng-doc-app-components-demo.mjs +97 -14
  24. package/fesm2022/ng-doc-app-components-demo.mjs.map +1 -1
  25. package/fesm2022/ng-doc-app-components-fullscreen-button.mjs +5 -3
  26. package/fesm2022/ng-doc-app-components-fullscreen-button.mjs.map +1 -1
  27. package/fesm2022/ng-doc-app-components-fullscreen-toggle.mjs +4 -2
  28. package/fesm2022/ng-doc-app-components-fullscreen-toggle.mjs.map +1 -1
  29. package/fesm2022/ng-doc-app-components-heading-anchor.mjs +5 -3
  30. package/fesm2022/ng-doc-app-components-heading-anchor.mjs.map +1 -1
  31. package/fesm2022/ng-doc-app-components-image-viewer.mjs +5 -3
  32. package/fesm2022/ng-doc-app-components-image-viewer.mjs.map +1 -1
  33. package/fesm2022/ng-doc-app-components-navbar.mjs +4 -2
  34. package/fesm2022/ng-doc-app-components-navbar.mjs.map +1 -1
  35. package/fesm2022/ng-doc-app-components-page-navigation.mjs +5 -3
  36. package/fesm2022/ng-doc-app-components-page-navigation.mjs.map +1 -1
  37. package/fesm2022/ng-doc-app-components-page-wrapper.mjs +2 -2
  38. package/fesm2022/ng-doc-app-components-page-wrapper.mjs.map +1 -1
  39. package/fesm2022/ng-doc-app-components-page.mjs +83 -16
  40. package/fesm2022/ng-doc-app-components-page.mjs.map +1 -1
  41. package/fesm2022/ng-doc-app-components-playground.mjs +838 -141
  42. package/fesm2022/ng-doc-app-components-playground.mjs.map +1 -1
  43. package/fesm2022/ng-doc-app-components-root.mjs +51 -4
  44. package/fesm2022/ng-doc-app-components-root.mjs.map +1 -1
  45. package/fesm2022/ng-doc-app-components-search-result.mjs +8 -6
  46. package/fesm2022/ng-doc-app-components-search-result.mjs.map +1 -1
  47. package/fesm2022/ng-doc-app-components-search.mjs +7 -5
  48. package/fesm2022/ng-doc-app-components-search.mjs.map +1 -1
  49. package/fesm2022/ng-doc-app-components-sidebar.mjs +4 -3
  50. package/fesm2022/ng-doc-app-components-sidebar.mjs.map +1 -1
  51. package/fesm2022/ng-doc-app-components-tabs.mjs +21 -3
  52. package/fesm2022/ng-doc-app-components-tabs.mjs.map +1 -1
  53. package/fesm2022/ng-doc-app-components-theme-toggle.mjs +7 -5
  54. package/fesm2022/ng-doc-app-components-theme-toggle.mjs.map +1 -1
  55. package/fesm2022/ng-doc-app-components-toc.mjs +4 -2
  56. package/fesm2022/ng-doc-app-components-toc.mjs.map +1 -1
  57. package/fesm2022/ng-doc-app-components.mjs +1 -0
  58. package/fesm2022/ng-doc-app-components.mjs.map +1 -1
  59. package/fesm2022/ng-doc-app-constants.mjs +11 -1
  60. package/fesm2022/ng-doc-app-constants.mjs.map +1 -1
  61. package/fesm2022/ng-doc-app-demo-app.mjs +779 -0
  62. package/fesm2022/ng-doc-app-demo-app.mjs.map +1 -0
  63. package/fesm2022/ng-doc-app-helpers.mjs +147 -7
  64. package/fesm2022/ng-doc-app-helpers.mjs.map +1 -1
  65. package/fesm2022/ng-doc-app-processors-processors.mjs +30 -9
  66. package/fesm2022/ng-doc-app-processors-processors.mjs.map +1 -1
  67. package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs +29 -18
  68. package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs.map +1 -1
  69. package/fesm2022/ng-doc-app-providers-texts.mjs +53 -0
  70. package/fesm2022/ng-doc-app-providers-texts.mjs.map +1 -0
  71. package/fesm2022/ng-doc-app-providers-title.mjs +129 -0
  72. package/fesm2022/ng-doc-app-providers-title.mjs.map +1 -0
  73. package/fesm2022/ng-doc-app-providers.mjs +2 -0
  74. package/fesm2022/ng-doc-app-providers.mjs.map +1 -1
  75. package/fesm2022/ng-doc-app-services-content-scroll-intent.mjs +27 -2
  76. package/fesm2022/ng-doc-app-services-content-scroll-intent.mjs.map +1 -1
  77. package/fesm2022/ng-doc-app-services-highlighter.mjs +23 -16
  78. package/fesm2022/ng-doc-app-services-highlighter.mjs.map +1 -1
  79. package/fesm2022/ng-doc-app-services-route-preloader.mjs +34 -10
  80. package/fesm2022/ng-doc-app-services-route-preloader.mjs.map +1 -1
  81. package/fesm2022/ng-doc-app-services-shortcuts.mjs +38 -4
  82. package/fesm2022/ng-doc-app-services-shortcuts.mjs.map +1 -1
  83. package/fesm2022/ng-doc-app-texts-ar.mjs +238 -0
  84. package/fesm2022/ng-doc-app-texts-ar.mjs.map +1 -0
  85. package/fesm2022/ng-doc-app-texts-de.mjs +205 -0
  86. package/fesm2022/ng-doc-app-texts-de.mjs.map +1 -0
  87. package/fesm2022/ng-doc-app-texts-es.mjs +205 -0
  88. package/fesm2022/ng-doc-app-texts-es.mjs.map +1 -0
  89. package/fesm2022/ng-doc-app-texts-fr.mjs +205 -0
  90. package/fesm2022/ng-doc-app-texts-fr.mjs.map +1 -0
  91. package/fesm2022/ng-doc-app-texts-hi.mjs +219 -0
  92. package/fesm2022/ng-doc-app-texts-hi.mjs.map +1 -0
  93. package/fesm2022/ng-doc-app-texts-ja.mjs +205 -0
  94. package/fesm2022/ng-doc-app-texts-ja.mjs.map +1 -0
  95. package/fesm2022/ng-doc-app-texts-ko.mjs +205 -0
  96. package/fesm2022/ng-doc-app-texts-ko.mjs.map +1 -0
  97. package/fesm2022/ng-doc-app-texts-pt-br.mjs +205 -0
  98. package/fesm2022/ng-doc-app-texts-pt-br.mjs.map +1 -0
  99. package/fesm2022/ng-doc-app-texts-ru.mjs +231 -0
  100. package/fesm2022/ng-doc-app-texts-ru.mjs.map +1 -0
  101. package/fesm2022/ng-doc-app-texts-uk.mjs +231 -0
  102. package/fesm2022/ng-doc-app-texts-uk.mjs.map +1 -0
  103. package/fesm2022/ng-doc-app-texts-zh.mjs +205 -0
  104. package/fesm2022/ng-doc-app-texts-zh.mjs.map +1 -0
  105. package/fesm2022/ng-doc-app-tokens.mjs +214 -1
  106. package/fesm2022/ng-doc-app-tokens.mjs.map +1 -1
  107. package/fesm2022/ng-doc-app-type-controls-json-control.mjs +90 -0
  108. package/fesm2022/ng-doc-app-type-controls-json-control.mjs.map +1 -0
  109. package/fesm2022/ng-doc-app-type-controls-list-control.mjs +792 -0
  110. package/fesm2022/ng-doc-app-type-controls-list-control.mjs.map +1 -0
  111. package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs +45 -8
  112. package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs.map +1 -1
  113. package/fesm2022/ng-doc-app-type-controls.mjs +2 -0
  114. package/fesm2022/ng-doc-app-type-controls.mjs.map +1 -1
  115. package/package.json +73 -4
  116. package/styles/global.css +4 -0
  117. package/styles/main.css +4 -0
  118. package/styles/themes/dark.css +10 -0
  119. package/types/ng-doc-app-classes-default-search-engine.d.ts +11 -0
  120. package/types/ng-doc-app-classes-root-page.d.ts +13 -0
  121. package/types/ng-doc-app-components-api-list.d.ts +3 -1
  122. package/types/ng-doc-app-components-breadcrumb.d.ts +2 -1
  123. package/types/ng-doc-app-components-code.d.ts +2 -0
  124. package/types/ng-doc-app-components-command-palette.d.ts +3 -1
  125. package/types/ng-doc-app-components-copy-button.d.ts +3 -1
  126. package/types/ng-doc-app-components-demo-displayer.d.ts +13 -1
  127. package/types/ng-doc-app-components-demo-frame.d.ts +107 -0
  128. package/types/ng-doc-app-components-demo.d.ts +47 -10
  129. package/types/ng-doc-app-components-fullscreen-button.d.ts +2 -0
  130. package/types/ng-doc-app-components-fullscreen-toggle.d.ts +2 -0
  131. package/types/ng-doc-app-components-heading-anchor.d.ts +2 -0
  132. package/types/ng-doc-app-components-image-viewer.d.ts +2 -0
  133. package/types/ng-doc-app-components-navbar.d.ts +2 -0
  134. package/types/ng-doc-app-components-page-navigation.d.ts +2 -1
  135. package/types/ng-doc-app-components-page.d.ts +10 -1
  136. package/types/ng-doc-app-components-playground.d.ts +260 -42
  137. package/types/ng-doc-app-components-root.d.ts +18 -0
  138. package/types/ng-doc-app-components-search-result.d.ts +2 -0
  139. package/types/ng-doc-app-components-search.d.ts +2 -0
  140. package/types/ng-doc-app-components-sidebar.d.ts +2 -1
  141. package/types/ng-doc-app-components-tabs.d.ts +13 -3
  142. package/types/ng-doc-app-components-theme-toggle.d.ts +4 -1
  143. package/types/ng-doc-app-components-toc.d.ts +2 -1
  144. package/types/ng-doc-app-components.d.ts +1 -0
  145. package/types/ng-doc-app-constants.d.ts +11 -1
  146. package/types/ng-doc-app-demo-app.d.ts +297 -0
  147. package/types/ng-doc-app-helpers.d.ts +75 -4
  148. package/types/ng-doc-app-interfaces.d.ts +635 -6
  149. package/types/ng-doc-app-processors-processors.d.ts +5 -0
  150. package/types/ng-doc-app-providers-ng-doc-app.d.ts +7 -1
  151. package/types/ng-doc-app-providers-texts.d.ts +28 -0
  152. package/types/ng-doc-app-providers-title.d.ts +59 -0
  153. package/types/ng-doc-app-providers.d.ts +2 -0
  154. package/types/ng-doc-app-services-content-scroll-intent.d.ts +11 -1
  155. package/types/ng-doc-app-services-highlighter.d.ts +15 -6
  156. package/types/ng-doc-app-services-route-preloader.d.ts +13 -1
  157. package/types/ng-doc-app-services-shortcuts.d.ts +16 -0
  158. package/types/ng-doc-app-texts-ar.d.ts +13 -0
  159. package/types/ng-doc-app-texts-de.d.ts +12 -0
  160. package/types/ng-doc-app-texts-es.d.ts +12 -0
  161. package/types/ng-doc-app-texts-fr.d.ts +12 -0
  162. package/types/ng-doc-app-texts-hi.d.ts +12 -0
  163. package/types/ng-doc-app-texts-ja.d.ts +12 -0
  164. package/types/ng-doc-app-texts-ko.d.ts +12 -0
  165. package/types/ng-doc-app-texts-pt-br.d.ts +12 -0
  166. package/types/ng-doc-app-texts-ru.d.ts +12 -0
  167. package/types/ng-doc-app-texts-uk.d.ts +12 -0
  168. package/types/ng-doc-app-texts-zh.d.ts +12 -0
  169. package/types/ng-doc-app-tokens.d.ts +21 -2
  170. package/types/ng-doc-app-type-controls-json-control.d.ts +38 -0
  171. package/types/ng-doc-app-type-controls-list-control.d.ts +313 -0
  172. package/types/ng-doc-app-type-controls-type-alias-control.d.ts +28 -5
  173. package/types/ng-doc-app-type-controls.d.ts +2 -0
@@ -1,7 +1,10 @@
1
+ import { ViewportScroller } from '@angular/common';
1
2
  import * as i0 from '@angular/core';
2
- import { Directive, input, booleanAttribute, inject, DOCUMENT, viewChild, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { Directive, inject, input, booleanAttribute, DOCUMENT, ElementRef, viewChild, DestroyRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
4
  import { NgDocFullscreenRouteService } from '@ng-doc/app/services/fullscreen-route';
5
+ import { NgDocShortcutsService } from '@ng-doc/app/services/shortcuts';
4
6
  import { NgDocSidebarService } from '@ng-doc/app/services/sidebar';
7
+ import { NG_DOC_TEXTS } from '@ng-doc/app/tokens';
5
8
  import { NgDocSidenavComponent } from '@ng-doc/ui-kit';
6
9
  import { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
7
10
 
@@ -51,6 +54,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
51
54
  selector: '[ngDocCustomSidebar]',
52
55
  }]
53
56
  }] });
57
+ /**
58
+ * How far the router scrolls an anchor below the top of the layout, in pixels: the navbar, the
59
+ * sticky page tabs and some space. The layout's top offset (the CSS variable that makes room for
60
+ * an application header above the layout) is added to it.
61
+ */
62
+ const SCROLL_OFFSET = 120;
54
63
  /**
55
64
  * Root layout of the NgDoc application: the navbar, the sidebar, the page and the footer.
56
65
  *
@@ -59,9 +68,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
59
68
  *
60
69
  * While a page shows one of its fullscreen routes (`NgDocFullscreenRouteService`), only the page
61
70
  * is shown: the navbar, the sidebar, the footer and the skip link are hidden.
71
+ *
72
+ * While it is shown, the router scrolls anchors below the navbar (the scroll offset of
73
+ * `ViewportScroller`), and the keyboard shortcuts of the documentation work
74
+ * (`NgDocShortcutsService`). When it is destroyed, for example when the reader leaves
75
+ * documentation served under a route, the previous scroll offset comes back and the shortcuts
76
+ * stop. Without navbar content, it renders no header.
62
77
  */
63
78
  class NgDocRootComponent {
64
79
  constructor() {
80
+ this.texts = inject(NG_DOC_TEXTS).navigation;
65
81
  /**
66
82
  * If `true` then the sidebar will be shown
67
83
  * You can use it for example for landing page to hide sidebar
@@ -80,8 +96,15 @@ class NgDocRootComponent {
80
96
  this.sidebarService = inject(NgDocSidebarService);
81
97
  this.fullscreenRoute = inject(NgDocFullscreenRouteService);
82
98
  this.document = inject(DOCUMENT);
99
+ this.host = inject(ElementRef).nativeElement;
83
100
  this.sidenavQuery = viewChild(NgDocSidenavComponent, /* @ts-ignore */
84
101
  ...(ngDevMode ? [{ debugName: "sidenavQuery" }] : /* istanbul ignore next */ []));
102
+ const stopShortcuts = inject(NgDocShortcutsService).listen();
103
+ const restoreScrollOffset = this.setScrollOffset();
104
+ inject(DestroyRef).onDestroy(() => {
105
+ stopShortcuts();
106
+ restoreScrollOffset();
107
+ });
85
108
  }
86
109
  /**
87
110
  * The sidenav that holds the sidebar and the page.
@@ -97,16 +120,40 @@ class NgDocRootComponent {
97
120
  event?.preventDefault();
98
121
  this.document.getElementById('ng-doc-content')?.focus();
99
122
  }
123
+ /**
124
+ * Makes the router scroll anchors below the layout's header, and below an application header
125
+ * that the layout makes room for.
126
+ * @returns A function that restores the previous offset, unless it was changed since.
127
+ */
128
+ setScrollOffset() {
129
+ const viewport = inject(ViewportScroller);
130
+ // `BrowserViewportScroller` keeps the offset in a field; the server's scroller has none.
131
+ const read = () => viewport.offset;
132
+ const previous = read();
133
+ const offset = () => [0, SCROLL_OFFSET + this.layoutTop()];
134
+ viewport.setOffset(offset);
135
+ return () => {
136
+ if (read() === offset) {
137
+ viewport.setOffset(typeof previous === 'function' ? previous : [0, 0]);
138
+ }
139
+ };
140
+ }
141
+ /** The layout's top offset in pixels, read from the margin it gives the page area. */
142
+ layoutTop() {
143
+ const main = this.host.querySelector(':scope > .ng-doc-root-wrapper > main');
144
+ const view = this.document.defaultView;
145
+ return (main && view && parseFloat(view.getComputedStyle(main).marginTop)) || 0;
146
+ }
100
147
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocRootComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
101
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: NgDocRootComponent, isStandalone: true, selector: "ng-doc-root", inputs: { sidebar: { classPropertyName: "sidebar", publicName: "sidebar", isSignal: true, isRequired: false, transformFunction: null }, footerContent: { classPropertyName: "footerContent", publicName: "footerContent", isSignal: true, isRequired: false, transformFunction: null }, noWidthLimit: { classPropertyName: "noWidthLimit", publicName: "noWidthLimit", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-ng-doc-no-width-limit": "noWidthLimit()", "attr.data-ng-doc-fullscreen-route": "fullscreenRoute.active()" } }, viewQueries: [{ propertyName: "sidenavQuery", first: true, predicate: NgDocSidenavComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<a class=\"ng-doc-skip-link\" href=\"#ng-doc-content\" (click)=\"skipToContent($event)\">\n Skip to content\n</a>\n<div class=\"ng-doc-root-wrapper\">\n <div class=\"ng-doc-header\">\n <ng-content select=\"ng-doc-navbar\"></ng-content>\n <ng-content select=\"[ngDocCustomNavbar]\"></ng-content>\n </div>\n <main>\n <ng-doc-sidenav\n [sidebar]=\"sidebar() ? sidebarContent : null\"\n [opened]=\"sidebarService.expandedState()\"\n [hasBackdrop]=\"sidebarService.isMobile\"\n (closeEvent)=\"sidebarService.hide()\">\n <ng-template #sidebarContent>\n <ng-content select=\"ng-doc-sidebar\"></ng-content>\n <ng-content select=\"[ngDocCustomSidebar]\"></ng-content>\n </ng-template>\n\n <div class=\"ng-doc-content\" id=\"ng-doc-content\" tabindex=\"-1\">\n <ng-content></ng-content>\n </div>\n </ng-doc-sidenav>\n </main>\n @if (footerContent()) {\n <footer>\n <ng-container *polymorpheusOutlet=\"footerContent() as text\"> {{ text }}</ng-container>\n </footer>\n }\n</div>\n", styles: [":host[data-ng-doc-no-width-limit=true] .ng-doc-root-wrapper main{max-width:none}:host .ng-doc-root-wrapper{display:flex;flex-direction:column;height:100%}:host .ng-doc-root-wrapper main{display:flex;width:100%;margin-left:auto;margin-right:auto;max-width:var(--ng-doc-app-max-width);padding:var(--ng-doc-main-padding);--ng-doc-sidenav-top: var(--ng-doc-navbar-height);--ng-doc-sidenav-width: var(--ng-doc-sidebar-width);--ng-doc-sidenav-content-padding: var(--ng-doc-page-padding)}:host .ng-doc-root-wrapper footer{margin-top:auto}:host .ng-doc-root-wrapper .ng-doc-content{outline:none}:host .ng-doc-root-wrapper .ng-doc-header{position:fixed;top:0;height:var(--ng-doc-navbar-height);width:100%;z-index:15}:host .ng-doc-skip-link{position:fixed;top:var(--ng-doc-space-2);left:var(--ng-doc-space-4);z-index:70;display:inline-flex;align-items:center;height:36px;padding:0 var(--ng-doc-space-3);border:1px solid var(--ng-doc-border-color);border-radius:var(--ng-doc-radius-md);background:var(--ng-doc-background);color:var(--ng-doc-heading-color);font-family:var(--ng-doc-font-family);font-size:var(--ng-doc-text-sm-size);line-height:20px;font-weight:500;text-decoration:none;box-shadow:var(--ng-doc-shadow-md);transform:translateY(calc(-100% - var(--ng-doc-space-16)))}:host .ng-doc-skip-link:focus{transform:none}:host .ng-doc-skip-link:focus-visible{outline:none;box-shadow:var(--ng-doc-focus-ring),var(--ng-doc-shadow-md)}@media(max-width:640px){:host:not([data-ng-doc-no-width-limit=true]) .ng-doc-root-wrapper main{--ng-doc-sidenav-content-padding: var(--ng-doc-space-5) var(--ng-doc-space-4)}}:host[data-ng-doc-fullscreen-route=true] .ng-doc-skip-link,:host[data-ng-doc-fullscreen-route=true] .ng-doc-header,:host[data-ng-doc-fullscreen-route=true] footer{display:none}:host[data-ng-doc-fullscreen-route=true] .ng-doc-root-wrapper main{max-width:none;padding:0;--ng-doc-sidenav-width: 0px;--ng-doc-sidenav-content-padding: 0}:host[data-ng-doc-fullscreen-route=true] ::ng-deep .ng-doc-sidenav{display:none}\n"], dependencies: [{ kind: "component", type: NgDocSidenavComponent, selector: "ng-doc-sidenav", inputs: ["sidebar", "opened", "hasBackdrop"], outputs: ["closeEvent"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
148
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: NgDocRootComponent, isStandalone: true, selector: "ng-doc-root", inputs: { sidebar: { classPropertyName: "sidebar", publicName: "sidebar", isSignal: true, isRequired: false, transformFunction: null }, footerContent: { classPropertyName: "footerContent", publicName: "footerContent", isSignal: true, isRequired: false, transformFunction: null }, noWidthLimit: { classPropertyName: "noWidthLimit", publicName: "noWidthLimit", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-ng-doc-no-width-limit": "noWidthLimit()", "attr.data-ng-doc-fullscreen-route": "fullscreenRoute.active()" } }, viewQueries: [{ propertyName: "sidenavQuery", first: true, predicate: NgDocSidenavComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<a class=\"ng-doc-skip-link\" href=\"#ng-doc-content\" (click)=\"skipToContent($event)\">\n {{ texts.skipToContent }}\n</a>\n<div class=\"ng-doc-root-wrapper\">\n <div class=\"ng-doc-header\">\n <ng-content select=\"ng-doc-navbar\"></ng-content>\n <ng-content select=\"[ngDocCustomNavbar]\"></ng-content>\n </div>\n <main>\n <ng-doc-sidenav\n [sidebar]=\"sidebar() ? sidebarContent : null\"\n [opened]=\"sidebarService.expandedState()\"\n [hasBackdrop]=\"sidebarService.isMobile\"\n (closeEvent)=\"sidebarService.hide()\">\n <ng-template #sidebarContent>\n <ng-content select=\"ng-doc-sidebar\"></ng-content>\n <ng-content select=\"[ngDocCustomSidebar]\"></ng-content>\n </ng-template>\n\n <div class=\"ng-doc-content\" id=\"ng-doc-content\" tabindex=\"-1\">\n <ng-content></ng-content>\n </div>\n </ng-doc-sidenav>\n </main>\n @if (footerContent()) {\n <footer>\n <ng-container *polymorpheusOutlet=\"footerContent() as text\"> {{ text }}</ng-container>\n </footer>\n }\n</div>\n", styles: [":host:has(>.ng-doc-root-wrapper>.ng-doc-header:empty){--ng-doc-navbar-height: 0px;--ng-doc-main-padding: var(--ng-doc-navbar-height) 0 0 0}:host[data-ng-doc-no-width-limit=true] .ng-doc-root-wrapper main{max-width:none}:host .ng-doc-root-wrapper{display:flex;flex-direction:column;height:100%}:host .ng-doc-root-wrapper main{display:flex;width:100%;margin-left:auto;margin-right:auto;max-width:var(--ng-doc-app-max-width);margin-top:var(--ng-doc-layout-top);padding:var(--ng-doc-main-padding);--ng-doc-sidenav-top: calc(var(--ng-doc-navbar-height) + var(--ng-doc-layout-top));--ng-doc-sidenav-width: var(--ng-doc-sidebar-width);--ng-doc-sidenav-content-padding: var(--ng-doc-page-padding)}:host .ng-doc-root-wrapper footer{margin-top:auto}:host .ng-doc-root-wrapper .ng-doc-content{outline:none}:host .ng-doc-root-wrapper .ng-doc-header{position:fixed;top:var(--ng-doc-layout-top);height:var(--ng-doc-navbar-height);width:100%;z-index:15}:host .ng-doc-root-wrapper .ng-doc-header:empty{display:none}:host .ng-doc-skip-link{position:fixed;top:calc(var(--ng-doc-layout-top) + var(--ng-doc-space-2));left:var(--ng-doc-space-4);z-index:70;display:inline-flex;align-items:center;height:36px;padding:0 var(--ng-doc-space-3);border:1px solid var(--ng-doc-border-color);border-radius:var(--ng-doc-radius-md);background:var(--ng-doc-background);color:var(--ng-doc-heading-color);font-family:var(--ng-doc-font-family);font-size:var(--ng-doc-text-sm-size);line-height:20px;font-weight:500;text-decoration:none;box-shadow:var(--ng-doc-shadow-md);transform:translateY(calc(-100% - var(--ng-doc-space-16)))}:host .ng-doc-skip-link:focus{transform:none}:host .ng-doc-skip-link:focus-visible{outline:none;box-shadow:var(--ng-doc-focus-ring),var(--ng-doc-shadow-md)}@media(max-width:640px){:host:not([data-ng-doc-no-width-limit=true]) .ng-doc-root-wrapper main{--ng-doc-sidenav-content-padding: var(--ng-doc-space-5) var(--ng-doc-space-4)}}:host[data-ng-doc-fullscreen-route=true] .ng-doc-skip-link,:host[data-ng-doc-fullscreen-route=true] .ng-doc-header,:host[data-ng-doc-fullscreen-route=true] footer{display:none}:host[data-ng-doc-fullscreen-route=true] .ng-doc-root-wrapper main{max-width:none;padding:0;--ng-doc-sidenav-width: 0px;--ng-doc-sidenav-content-padding: 0}:host[data-ng-doc-fullscreen-route=true] ::ng-deep .ng-doc-sidenav{display:none}\n"], dependencies: [{ kind: "component", type: NgDocSidenavComponent, selector: "ng-doc-sidenav", inputs: ["sidebar", "opened", "hasBackdrop"], outputs: ["closeEvent"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
102
149
  }
103
150
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocRootComponent, decorators: [{
104
151
  type: Component,
105
152
  args: [{ selector: 'ng-doc-root', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgDocSidenavComponent, PolymorpheusOutlet], host: {
106
153
  '[attr.data-ng-doc-no-width-limit]': 'noWidthLimit()',
107
154
  '[attr.data-ng-doc-fullscreen-route]': 'fullscreenRoute.active()',
108
- }, template: "<a class=\"ng-doc-skip-link\" href=\"#ng-doc-content\" (click)=\"skipToContent($event)\">\n Skip to content\n</a>\n<div class=\"ng-doc-root-wrapper\">\n <div class=\"ng-doc-header\">\n <ng-content select=\"ng-doc-navbar\"></ng-content>\n <ng-content select=\"[ngDocCustomNavbar]\"></ng-content>\n </div>\n <main>\n <ng-doc-sidenav\n [sidebar]=\"sidebar() ? sidebarContent : null\"\n [opened]=\"sidebarService.expandedState()\"\n [hasBackdrop]=\"sidebarService.isMobile\"\n (closeEvent)=\"sidebarService.hide()\">\n <ng-template #sidebarContent>\n <ng-content select=\"ng-doc-sidebar\"></ng-content>\n <ng-content select=\"[ngDocCustomSidebar]\"></ng-content>\n </ng-template>\n\n <div class=\"ng-doc-content\" id=\"ng-doc-content\" tabindex=\"-1\">\n <ng-content></ng-content>\n </div>\n </ng-doc-sidenav>\n </main>\n @if (footerContent()) {\n <footer>\n <ng-container *polymorpheusOutlet=\"footerContent() as text\"> {{ text }}</ng-container>\n </footer>\n }\n</div>\n", styles: [":host[data-ng-doc-no-width-limit=true] .ng-doc-root-wrapper main{max-width:none}:host .ng-doc-root-wrapper{display:flex;flex-direction:column;height:100%}:host .ng-doc-root-wrapper main{display:flex;width:100%;margin-left:auto;margin-right:auto;max-width:var(--ng-doc-app-max-width);padding:var(--ng-doc-main-padding);--ng-doc-sidenav-top: var(--ng-doc-navbar-height);--ng-doc-sidenav-width: var(--ng-doc-sidebar-width);--ng-doc-sidenav-content-padding: var(--ng-doc-page-padding)}:host .ng-doc-root-wrapper footer{margin-top:auto}:host .ng-doc-root-wrapper .ng-doc-content{outline:none}:host .ng-doc-root-wrapper .ng-doc-header{position:fixed;top:0;height:var(--ng-doc-navbar-height);width:100%;z-index:15}:host .ng-doc-skip-link{position:fixed;top:var(--ng-doc-space-2);left:var(--ng-doc-space-4);z-index:70;display:inline-flex;align-items:center;height:36px;padding:0 var(--ng-doc-space-3);border:1px solid var(--ng-doc-border-color);border-radius:var(--ng-doc-radius-md);background:var(--ng-doc-background);color:var(--ng-doc-heading-color);font-family:var(--ng-doc-font-family);font-size:var(--ng-doc-text-sm-size);line-height:20px;font-weight:500;text-decoration:none;box-shadow:var(--ng-doc-shadow-md);transform:translateY(calc(-100% - var(--ng-doc-space-16)))}:host .ng-doc-skip-link:focus{transform:none}:host .ng-doc-skip-link:focus-visible{outline:none;box-shadow:var(--ng-doc-focus-ring),var(--ng-doc-shadow-md)}@media(max-width:640px){:host:not([data-ng-doc-no-width-limit=true]) .ng-doc-root-wrapper main{--ng-doc-sidenav-content-padding: var(--ng-doc-space-5) var(--ng-doc-space-4)}}:host[data-ng-doc-fullscreen-route=true] .ng-doc-skip-link,:host[data-ng-doc-fullscreen-route=true] .ng-doc-header,:host[data-ng-doc-fullscreen-route=true] footer{display:none}:host[data-ng-doc-fullscreen-route=true] .ng-doc-root-wrapper main{max-width:none;padding:0;--ng-doc-sidenav-width: 0px;--ng-doc-sidenav-content-padding: 0}:host[data-ng-doc-fullscreen-route=true] ::ng-deep .ng-doc-sidenav{display:none}\n"] }]
109
- }], propDecorators: { sidebar: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidebar", required: false }] }], footerContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerContent", required: false }] }], noWidthLimit: [{ type: i0.Input, args: [{ isSignal: true, alias: "noWidthLimit", required: false }] }], sidenavQuery: [{ type: i0.ViewChild, args: [i0.forwardRef(() => NgDocSidenavComponent), { isSignal: true }] }] } });
155
+ }, template: "<a class=\"ng-doc-skip-link\" href=\"#ng-doc-content\" (click)=\"skipToContent($event)\">\n {{ texts.skipToContent }}\n</a>\n<div class=\"ng-doc-root-wrapper\">\n <div class=\"ng-doc-header\">\n <ng-content select=\"ng-doc-navbar\"></ng-content>\n <ng-content select=\"[ngDocCustomNavbar]\"></ng-content>\n </div>\n <main>\n <ng-doc-sidenav\n [sidebar]=\"sidebar() ? sidebarContent : null\"\n [opened]=\"sidebarService.expandedState()\"\n [hasBackdrop]=\"sidebarService.isMobile\"\n (closeEvent)=\"sidebarService.hide()\">\n <ng-template #sidebarContent>\n <ng-content select=\"ng-doc-sidebar\"></ng-content>\n <ng-content select=\"[ngDocCustomSidebar]\"></ng-content>\n </ng-template>\n\n <div class=\"ng-doc-content\" id=\"ng-doc-content\" tabindex=\"-1\">\n <ng-content></ng-content>\n </div>\n </ng-doc-sidenav>\n </main>\n @if (footerContent()) {\n <footer>\n <ng-container *polymorpheusOutlet=\"footerContent() as text\"> {{ text }}</ng-container>\n </footer>\n }\n</div>\n", styles: [":host:has(>.ng-doc-root-wrapper>.ng-doc-header:empty){--ng-doc-navbar-height: 0px;--ng-doc-main-padding: var(--ng-doc-navbar-height) 0 0 0}:host[data-ng-doc-no-width-limit=true] .ng-doc-root-wrapper main{max-width:none}:host .ng-doc-root-wrapper{display:flex;flex-direction:column;height:100%}:host .ng-doc-root-wrapper main{display:flex;width:100%;margin-left:auto;margin-right:auto;max-width:var(--ng-doc-app-max-width);margin-top:var(--ng-doc-layout-top);padding:var(--ng-doc-main-padding);--ng-doc-sidenav-top: calc(var(--ng-doc-navbar-height) + var(--ng-doc-layout-top));--ng-doc-sidenav-width: var(--ng-doc-sidebar-width);--ng-doc-sidenav-content-padding: var(--ng-doc-page-padding)}:host .ng-doc-root-wrapper footer{margin-top:auto}:host .ng-doc-root-wrapper .ng-doc-content{outline:none}:host .ng-doc-root-wrapper .ng-doc-header{position:fixed;top:var(--ng-doc-layout-top);height:var(--ng-doc-navbar-height);width:100%;z-index:15}:host .ng-doc-root-wrapper .ng-doc-header:empty{display:none}:host .ng-doc-skip-link{position:fixed;top:calc(var(--ng-doc-layout-top) + var(--ng-doc-space-2));left:var(--ng-doc-space-4);z-index:70;display:inline-flex;align-items:center;height:36px;padding:0 var(--ng-doc-space-3);border:1px solid var(--ng-doc-border-color);border-radius:var(--ng-doc-radius-md);background:var(--ng-doc-background);color:var(--ng-doc-heading-color);font-family:var(--ng-doc-font-family);font-size:var(--ng-doc-text-sm-size);line-height:20px;font-weight:500;text-decoration:none;box-shadow:var(--ng-doc-shadow-md);transform:translateY(calc(-100% - var(--ng-doc-space-16)))}:host .ng-doc-skip-link:focus{transform:none}:host .ng-doc-skip-link:focus-visible{outline:none;box-shadow:var(--ng-doc-focus-ring),var(--ng-doc-shadow-md)}@media(max-width:640px){:host:not([data-ng-doc-no-width-limit=true]) .ng-doc-root-wrapper main{--ng-doc-sidenav-content-padding: var(--ng-doc-space-5) var(--ng-doc-space-4)}}:host[data-ng-doc-fullscreen-route=true] .ng-doc-skip-link,:host[data-ng-doc-fullscreen-route=true] .ng-doc-header,:host[data-ng-doc-fullscreen-route=true] footer{display:none}:host[data-ng-doc-fullscreen-route=true] .ng-doc-root-wrapper main{max-width:none;padding:0;--ng-doc-sidenav-width: 0px;--ng-doc-sidenav-content-padding: 0}:host[data-ng-doc-fullscreen-route=true] ::ng-deep .ng-doc-sidenav{display:none}\n"] }]
156
+ }], ctorParameters: () => [], propDecorators: { sidebar: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidebar", required: false }] }], footerContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerContent", required: false }] }], noWidthLimit: [{ type: i0.Input, args: [{ isSignal: true, alias: "noWidthLimit", required: false }] }], sidenavQuery: [{ type: i0.ViewChild, args: [i0.forwardRef(() => NgDocSidenavComponent), { isSignal: true }] }] } });
110
157
 
111
158
  /**
112
159
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"ng-doc-app-components-root.mjs","sources":["../../../../libs/app/components/root/root.component.ts","../../../../libs/app/components/root/root.component.html","../../../../libs/app/components/root/ng-doc-app-components-root.ts"],"sourcesContent":["import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n Directive,\n DOCUMENT,\n inject,\n input,\n viewChild,\n} from '@angular/core';\nimport { NgDocFullscreenRouteService } from '@ng-doc/app/services/fullscreen-route';\nimport { NgDocSidebarService } from '@ng-doc/app/services/sidebar';\nimport { NgDocContent, NgDocSidenavComponent } from '@ng-doc/ui-kit';\nimport { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';\n\n/**\n * Directive uses for providing custom navbar, you should mark element with this directive\n * and the `NgDocRootComponent` will use it as a navbar\n *\n * ```html\n * <ng-doc-root>\n * <my-custom-navbar ngDocCustomNavbar></my-custom-navbar>\n *\n * <ng-doc-sidebar></ng-doc-sidebar>\n * <router-outlet></router-outlet>\n * </ng-doc-root>\n * ```\n */\n@Directive({\n selector: '[ngDocCustomNavbar]',\n})\nexport class NgDocCustomNavbarDirective {}\n\n/**\n * Directive uses for providing custom sidebar, you should mark element with this directive\n * and the `NgDocRootComponent` will use it as a sidebar\n *\n * ```html\n * <ng-doc-root>\n * <ng-doc-navbar></ng-doc-sidebar>\n *\n * <my-custom-sidebar ngDocCustomSidebar></my-custom-sidebar>\n * <router-outlet></router-outlet>\n * </ng-doc-root>\n * ```\n */\n@Directive({\n selector: '[ngDocCustomSidebar]',\n})\nexport class NgDocCustomSidebarDirective {}\n\n/**\n * Root layout of the NgDoc application: the navbar, the sidebar, the page and the footer.\n *\n * Its first focusable element is a \"Skip to content\" link, shown only while it has focus, that\n * moves keyboard focus past the navbar and the sidebar to the page.\n *\n * While a page shows one of its fullscreen routes (`NgDocFullscreenRouteService`), only the page\n * is shown: the navbar, the sidebar, the footer and the skip link are hidden.\n */\n@Component({\n selector: 'ng-doc-root',\n templateUrl: './root.component.html',\n styleUrls: ['./root.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgDocSidenavComponent, PolymorpheusOutlet],\n host: {\n '[attr.data-ng-doc-no-width-limit]': 'noWidthLimit()',\n '[attr.data-ng-doc-fullscreen-route]': 'fullscreenRoute.active()',\n },\n})\nexport class NgDocRootComponent {\n /**\n * If `true` then the sidebar will be shown\n * You can use it for example for landing page to hide sidebar\n */\n readonly sidebar = input<boolean, unknown>(true, { transform: booleanAttribute });\n\n /**\n * Content for footer\n */\n readonly footerContent = input<NgDocContent>('');\n\n /**\n * If `true` then page will be shown without width limit.\n * You can use it for example for landing page\n */\n readonly noWidthLimit = input<boolean, unknown>(false, { transform: booleanAttribute });\n\n protected readonly sidebarService = inject(NgDocSidebarService);\n protected readonly fullscreenRoute = inject(NgDocFullscreenRouteService);\n private readonly document = inject(DOCUMENT);\n private readonly sidenavQuery = viewChild(NgDocSidenavComponent);\n\n /**\n * The sidenav that holds the sidebar and the page.\n */\n get sidenav(): NgDocSidenavComponent | undefined {\n return this.sidenavQuery();\n }\n\n /**\n * Moves keyboard focus to the page content, as the skip link does.\n * @param event - The click on the skip link; its navigation to a fragment is cancelled.\n */\n skipToContent(event?: Event): void {\n event?.preventDefault();\n this.document.getElementById('ng-doc-content')?.focus();\n }\n}\n","<a class=\"ng-doc-skip-link\" href=\"#ng-doc-content\" (click)=\"skipToContent($event)\">\n Skip to content\n</a>\n<div class=\"ng-doc-root-wrapper\">\n <div class=\"ng-doc-header\">\n <ng-content select=\"ng-doc-navbar\"></ng-content>\n <ng-content select=\"[ngDocCustomNavbar]\"></ng-content>\n </div>\n <main>\n <ng-doc-sidenav\n [sidebar]=\"sidebar() ? sidebarContent : null\"\n [opened]=\"sidebarService.expandedState()\"\n [hasBackdrop]=\"sidebarService.isMobile\"\n (closeEvent)=\"sidebarService.hide()\">\n <ng-template #sidebarContent>\n <ng-content select=\"ng-doc-sidebar\"></ng-content>\n <ng-content select=\"[ngDocCustomSidebar]\"></ng-content>\n </ng-template>\n\n <div class=\"ng-doc-content\" id=\"ng-doc-content\" tabindex=\"-1\">\n <ng-content></ng-content>\n </div>\n </ng-doc-sidenav>\n </main>\n @if (footerContent()) {\n <footer>\n <ng-container *polymorpheusOutlet=\"footerContent() as text\"> {{ text }}</ng-container>\n </footer>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAeA;;;;;;;;;;;;AAYG;MAIU,0BAA0B,CAAA;8GAA1B,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA1B,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAHtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,qBAAqB;AAChC,iBAAA;;AAGD;;;;;;;;;;;;AAYG;MAIU,2BAA2B,CAAA;8GAA3B,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA3B,2BAA2B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA3B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qBAqBa,qBAAqB,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC5FjE,siCA8BA,EAAA,MAAA,EAAA,CAAA,89DAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDmCY,qBAAqB,kIAAE,kBAAkB,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,oBAAA,EAAA,2BAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAMxC,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAX9B,SAAS;+BACE,aAAa,EAAA,eAAA,EAGN,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,EAAA,IAAA,EAC9C;AACJ,wBAAA,mCAAmC,EAAE,gBAAgB;AACrD,wBAAA,qCAAqC,EAAE,0BAA0B;AAClE,qBAAA,EAAA,QAAA,EAAA,siCAAA,EAAA,MAAA,EAAA,CAAA,89DAAA,CAAA,EAAA;8YAuByC,qBAAqB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE5FjE;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-doc-app-components-root.mjs","sources":["../../../../libs/app/components/root/root.component.ts","../../../../libs/app/components/root/root.component.html","../../../../libs/app/components/root/ng-doc-app-components-root.ts"],"sourcesContent":["import { ViewportScroller } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n Directive,\n DOCUMENT,\n ElementRef,\n inject,\n input,\n viewChild,\n} from '@angular/core';\nimport type { NgDocNavigationTexts } from '@ng-doc/app/interfaces';\nimport { NgDocFullscreenRouteService } from '@ng-doc/app/services/fullscreen-route';\nimport { NgDocShortcutsService } from '@ng-doc/app/services/shortcuts';\nimport { NgDocSidebarService } from '@ng-doc/app/services/sidebar';\nimport { NG_DOC_TEXTS } from '@ng-doc/app/tokens';\nimport { NgDocContent, NgDocSidenavComponent } from '@ng-doc/ui-kit';\nimport { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';\n\n/**\n * Directive uses for providing custom navbar, you should mark element with this directive\n * and the `NgDocRootComponent` will use it as a navbar\n *\n * ```html\n * <ng-doc-root>\n * <my-custom-navbar ngDocCustomNavbar></my-custom-navbar>\n *\n * <ng-doc-sidebar></ng-doc-sidebar>\n * <router-outlet></router-outlet>\n * </ng-doc-root>\n * ```\n */\n@Directive({\n selector: '[ngDocCustomNavbar]',\n})\nexport class NgDocCustomNavbarDirective {}\n\n/**\n * Directive uses for providing custom sidebar, you should mark element with this directive\n * and the `NgDocRootComponent` will use it as a sidebar\n *\n * ```html\n * <ng-doc-root>\n * <ng-doc-navbar></ng-doc-sidebar>\n *\n * <my-custom-sidebar ngDocCustomSidebar></my-custom-sidebar>\n * <router-outlet></router-outlet>\n * </ng-doc-root>\n * ```\n */\n@Directive({\n selector: '[ngDocCustomSidebar]',\n})\nexport class NgDocCustomSidebarDirective {}\n\n/**\n * How far the router scrolls an anchor below the top of the layout, in pixels: the navbar, the\n * sticky page tabs and some space. The layout's top offset (the CSS variable that makes room for\n * an application header above the layout) is added to it.\n */\nconst SCROLL_OFFSET = 120;\n\n/** The offset function of `ViewportScroller`, which has no public getter. */\ntype NgDocScrollOffset = () => [number, number];\n\n/**\n * Root layout of the NgDoc application: the navbar, the sidebar, the page and the footer.\n *\n * Its first focusable element is a \"Skip to content\" link, shown only while it has focus, that\n * moves keyboard focus past the navbar and the sidebar to the page.\n *\n * While a page shows one of its fullscreen routes (`NgDocFullscreenRouteService`), only the page\n * is shown: the navbar, the sidebar, the footer and the skip link are hidden.\n *\n * While it is shown, the router scrolls anchors below the navbar (the scroll offset of\n * `ViewportScroller`), and the keyboard shortcuts of the documentation work\n * (`NgDocShortcutsService`). When it is destroyed, for example when the reader leaves\n * documentation served under a route, the previous scroll offset comes back and the shortcuts\n * stop. Without navbar content, it renders no header.\n */\n@Component({\n selector: 'ng-doc-root',\n templateUrl: './root.component.html',\n styleUrls: ['./root.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgDocSidenavComponent, PolymorpheusOutlet],\n host: {\n '[attr.data-ng-doc-no-width-limit]': 'noWidthLimit()',\n '[attr.data-ng-doc-fullscreen-route]': 'fullscreenRoute.active()',\n },\n})\nexport class NgDocRootComponent {\n protected readonly texts: NgDocNavigationTexts = inject(NG_DOC_TEXTS).navigation;\n\n /**\n * If `true` then the sidebar will be shown\n * You can use it for example for landing page to hide sidebar\n */\n readonly sidebar = input<boolean, unknown>(true, { transform: booleanAttribute });\n\n /**\n * Content for footer\n */\n readonly footerContent = input<NgDocContent>('');\n\n /**\n * If `true` then page will be shown without width limit.\n * You can use it for example for landing page\n */\n readonly noWidthLimit = input<boolean, unknown>(false, { transform: booleanAttribute });\n\n protected readonly sidebarService = inject(NgDocSidebarService);\n protected readonly fullscreenRoute = inject(NgDocFullscreenRouteService);\n private readonly document = inject(DOCUMENT);\n private readonly host: HTMLElement = inject(ElementRef).nativeElement;\n private readonly sidenavQuery = viewChild(NgDocSidenavComponent);\n\n constructor() {\n const stopShortcuts = inject(NgDocShortcutsService).listen();\n const restoreScrollOffset = this.setScrollOffset();\n\n inject(DestroyRef).onDestroy(() => {\n stopShortcuts();\n restoreScrollOffset();\n });\n }\n\n /**\n * The sidenav that holds the sidebar and the page.\n */\n get sidenav(): NgDocSidenavComponent | undefined {\n return this.sidenavQuery();\n }\n\n /**\n * Moves keyboard focus to the page content, as the skip link does.\n * @param event - The click on the skip link; its navigation to a fragment is cancelled.\n */\n skipToContent(event?: Event): void {\n event?.preventDefault();\n this.document.getElementById('ng-doc-content')?.focus();\n }\n\n /**\n * Makes the router scroll anchors below the layout's header, and below an application header\n * that the layout makes room for.\n * @returns A function that restores the previous offset, unless it was changed since.\n */\n private setScrollOffset(): () => void {\n const viewport = inject(ViewportScroller);\n // `BrowserViewportScroller` keeps the offset in a field; the server's scroller has none.\n const read = (): unknown => (viewport as unknown as { offset?: unknown }).offset;\n const previous = read();\n const offset: NgDocScrollOffset = () => [0, SCROLL_OFFSET + this.layoutTop()];\n\n viewport.setOffset(offset);\n\n return () => {\n if (read() === offset) {\n viewport.setOffset(\n typeof previous === 'function' ? (previous as NgDocScrollOffset) : [0, 0],\n );\n }\n };\n }\n\n /** The layout's top offset in pixels, read from the margin it gives the page area. */\n private layoutTop(): number {\n const main = this.host.querySelector(':scope > .ng-doc-root-wrapper > main');\n const view = this.document.defaultView;\n\n return (main && view && parseFloat(view.getComputedStyle(main).marginTop)) || 0;\n }\n}\n","<a class=\"ng-doc-skip-link\" href=\"#ng-doc-content\" (click)=\"skipToContent($event)\">\n {{ texts.skipToContent }}\n</a>\n<div class=\"ng-doc-root-wrapper\">\n <div class=\"ng-doc-header\">\n <ng-content select=\"ng-doc-navbar\"></ng-content>\n <ng-content select=\"[ngDocCustomNavbar]\"></ng-content>\n </div>\n <main>\n <ng-doc-sidenav\n [sidebar]=\"sidebar() ? sidebarContent : null\"\n [opened]=\"sidebarService.expandedState()\"\n [hasBackdrop]=\"sidebarService.isMobile\"\n (closeEvent)=\"sidebarService.hide()\">\n <ng-template #sidebarContent>\n <ng-content select=\"ng-doc-sidebar\"></ng-content>\n <ng-content select=\"[ngDocCustomSidebar]\"></ng-content>\n </ng-template>\n\n <div class=\"ng-doc-content\" id=\"ng-doc-content\" tabindex=\"-1\">\n <ng-content></ng-content>\n </div>\n </ng-doc-sidenav>\n </main>\n @if (footerContent()) {\n <footer>\n <ng-container *polymorpheusOutlet=\"footerContent() as text\"> {{ text }}</ng-container>\n </footer>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAqBA;;;;;;;;;;;;AAYG;MAIU,0BAA0B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,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,EAAA,IAAA,EAC9C;AACJ,wBAAA,mCAAmC,EAAE,gBAAgB;AACrD,wBAAA,qCAAqC,EAAE,0BAA0B;AAClE,qBAAA,EAAA,QAAA,EAAA,gjCAAA,EAAA,MAAA,EAAA,CAAA,myEAAA,CAAA,EAAA;waA0ByC,qBAAqB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AErHjE;;AAEG;;;;"}
@@ -1,8 +1,9 @@
1
1
  import { KeyValuePipe } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { inject, input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
4
4
  import { RouterLink } from '@angular/router';
5
5
  import { NgDocKindIconComponent } from '@ng-doc/app/components/kind-icon';
6
+ import { NG_DOC_TEXTS } from '@ng-doc/app/tokens';
6
7
  import { NgDocTextComponent, NgDocTooltipDirective } from '@ng-doc/ui-kit';
7
8
 
8
9
  /**
@@ -10,6 +11,7 @@ import { NgDocTextComponent, NgDocTooltipDirective } from '@ng-doc/ui-kit';
10
11
  */
11
12
  class NgDocSearchResultComponent {
12
13
  constructor() {
14
+ this.texts = inject(NG_DOC_TEXTS).search;
13
15
  /** The pages to list. */
14
16
  this.result = input([], /* @ts-ignore */
15
17
  ...(ngDevMode ? [{ debugName: "result" }] : /* istanbul ignore next */ []));
@@ -27,15 +29,15 @@ class NgDocSearchResultComponent {
27
29
  typeToLabel(type) {
28
30
  switch (type) {
29
31
  case 'api':
30
- return 'API';
32
+ return this.texts.resultApi;
31
33
  case 'guide':
32
- return 'Guides';
34
+ return this.texts.resultGuides;
33
35
  default:
34
- return 'Unknown';
36
+ return this.texts.resultUnknown;
35
37
  }
36
38
  }
37
39
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocSearchResultComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
38
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: NgDocSearchResultComponent, isStandalone: true, selector: "ng-doc-search-result", inputs: { result: { classPropertyName: "result", publicName: "result", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (groupedResult() | keyvalue; as results) {\n <div class=\"ng-doc-search-result-wrapper\">\n @if (results.length) {\n @for (item of results; track item) {\n <div class=\"ng-doc-search-result-category\">\n <h4 class=\"ng-doc-search-result-title\" ng-doc-text>{{ typeToLabel(item.key) }}</h4>\n <ul class=\"ng-doc-search-result-pages\">\n @for (page of item.value; track page) {\n <li class=\"ng-doc-search-result-page\">\n <a class=\"ng-doc-search-result-page-link\" [routerLink]=\"[page.route]\">\n @if (page.kind) {\n <ng-doc-kind-icon\n [kind]=\"page.kind\"\n [ngDocTooltip]=\"page.kind\"></ng-doc-kind-icon>\n }\n {{ page.title }}\n </a>\n </li>\n }\n </ul>\n </div>\n }\n } @else {\n <div ng-doc-text color=\"muted\">Nothing was found...</div>\n }\n </div>\n}\n", styles: [":host{display:block}:host .ng-doc-search-result-wrapper{display:flex;flex-direction:row}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category:not(:last-child){margin-right:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-title{margin:0 0 calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages{list-style:none;padding:0;margin:0}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages .ng-doc-search-result-page{margin-bottom:var(--ng-doc-base-gutter)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages .ng-doc-search-result-page .ng-doc-search-result-page-link{display:flex;align-items:center;text-decoration:none;color:var(--ng-doc-text)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages .ng-doc-search-result-page .ng-doc-search-result-page-link ng-doc-kind-icon{margin-right:var(--ng-doc-base-gutter)}\n"], dependencies: [{ kind: "component", type: NgDocTextComponent, selector: "[ng-doc-text]", inputs: ["size", "color", "align", "absoluteContent"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "component", type: NgDocKindIconComponent, selector: "ng-doc-kind-icon", inputs: ["kind", "type", "size"] }, { kind: "directive", type: NgDocTooltipDirective, selector: "[ngDocTooltip]", inputs: ["ngDocTooltip", "delay", "displayOrigin", "pointerOrigin", "positions", "canOpen", "panelClass", "minHeight", "maxHeight", "height", "minWidth", "maxWidth", "width"], outputs: ["beforeOpen", "afterOpen", "beforeClose", "afterClose"], exportAs: ["ngDocTooltip"] }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
40
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: NgDocSearchResultComponent, isStandalone: true, selector: "ng-doc-search-result", inputs: { result: { classPropertyName: "result", publicName: "result", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (groupedResult() | keyvalue; as results) {\n <div class=\"ng-doc-search-result-wrapper\">\n @if (results.length) {\n @for (item of results; track item) {\n <div class=\"ng-doc-search-result-category\">\n <h4 class=\"ng-doc-search-result-title\" ng-doc-text>{{ typeToLabel(item.key) }}</h4>\n <ul class=\"ng-doc-search-result-pages\">\n @for (page of item.value; track page) {\n <li class=\"ng-doc-search-result-page\">\n <a class=\"ng-doc-search-result-page-link\" [routerLink]=\"[page.route]\">\n @if (page.kind) {\n <ng-doc-kind-icon\n [kind]=\"page.kind\"\n [ngDocTooltip]=\"page.kind\"></ng-doc-kind-icon>\n }\n {{ page.title }}\n </a>\n </li>\n }\n </ul>\n </div>\n }\n } @else {\n <div ng-doc-text color=\"muted\">{{ texts.nothingFound }}</div>\n }\n </div>\n}\n", styles: [":host{display:block}:host .ng-doc-search-result-wrapper{display:flex;flex-direction:row}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category:not(:last-child){margin-right:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-title{margin:0 0 calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages{list-style:none;padding:0;margin:0}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages .ng-doc-search-result-page{margin-bottom:var(--ng-doc-base-gutter)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages .ng-doc-search-result-page .ng-doc-search-result-page-link{display:flex;align-items:center;text-decoration:none;color:var(--ng-doc-text)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages .ng-doc-search-result-page .ng-doc-search-result-page-link ng-doc-kind-icon{margin-right:var(--ng-doc-base-gutter)}\n"], dependencies: [{ kind: "component", type: NgDocTextComponent, selector: "[ng-doc-text]", inputs: ["size", "color", "align", "absoluteContent"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "component", type: NgDocKindIconComponent, selector: "ng-doc-kind-icon", inputs: ["kind", "type", "size"] }, { kind: "directive", type: NgDocTooltipDirective, selector: "[ngDocTooltip]", inputs: ["ngDocTooltip", "delay", "displayOrigin", "pointerOrigin", "positions", "canOpen", "panelClass", "minHeight", "maxHeight", "height", "minWidth", "maxWidth", "width"], outputs: ["beforeOpen", "afterOpen", "beforeClose", "afterClose"], exportAs: ["ngDocTooltip"] }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
39
41
  }
40
42
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocSearchResultComponent, decorators: [{
41
43
  type: Component,
@@ -45,7 +47,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
45
47
  NgDocKindIconComponent,
46
48
  NgDocTooltipDirective,
47
49
  KeyValuePipe,
48
- ], template: "@if (groupedResult() | keyvalue; as results) {\n <div class=\"ng-doc-search-result-wrapper\">\n @if (results.length) {\n @for (item of results; track item) {\n <div class=\"ng-doc-search-result-category\">\n <h4 class=\"ng-doc-search-result-title\" ng-doc-text>{{ typeToLabel(item.key) }}</h4>\n <ul class=\"ng-doc-search-result-pages\">\n @for (page of item.value; track page) {\n <li class=\"ng-doc-search-result-page\">\n <a class=\"ng-doc-search-result-page-link\" [routerLink]=\"[page.route]\">\n @if (page.kind) {\n <ng-doc-kind-icon\n [kind]=\"page.kind\"\n [ngDocTooltip]=\"page.kind\"></ng-doc-kind-icon>\n }\n {{ page.title }}\n </a>\n </li>\n }\n </ul>\n </div>\n }\n } @else {\n <div ng-doc-text color=\"muted\">Nothing was found...</div>\n }\n </div>\n}\n", styles: [":host{display:block}:host .ng-doc-search-result-wrapper{display:flex;flex-direction:row}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category:not(:last-child){margin-right:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-title{margin:0 0 calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages{list-style:none;padding:0;margin:0}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages .ng-doc-search-result-page{margin-bottom:var(--ng-doc-base-gutter)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages .ng-doc-search-result-page .ng-doc-search-result-page-link{display:flex;align-items:center;text-decoration:none;color:var(--ng-doc-text)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages .ng-doc-search-result-page .ng-doc-search-result-page-link ng-doc-kind-icon{margin-right:var(--ng-doc-base-gutter)}\n"] }]
50
+ ], template: "@if (groupedResult() | keyvalue; as results) {\n <div class=\"ng-doc-search-result-wrapper\">\n @if (results.length) {\n @for (item of results; track item) {\n <div class=\"ng-doc-search-result-category\">\n <h4 class=\"ng-doc-search-result-title\" ng-doc-text>{{ typeToLabel(item.key) }}</h4>\n <ul class=\"ng-doc-search-result-pages\">\n @for (page of item.value; track page) {\n <li class=\"ng-doc-search-result-page\">\n <a class=\"ng-doc-search-result-page-link\" [routerLink]=\"[page.route]\">\n @if (page.kind) {\n <ng-doc-kind-icon\n [kind]=\"page.kind\"\n [ngDocTooltip]=\"page.kind\"></ng-doc-kind-icon>\n }\n {{ page.title }}\n </a>\n </li>\n }\n </ul>\n </div>\n }\n } @else {\n <div ng-doc-text color=\"muted\">{{ texts.nothingFound }}</div>\n }\n </div>\n}\n", styles: [":host{display:block}:host .ng-doc-search-result-wrapper{display:flex;flex-direction:row}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category:not(:last-child){margin-right:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-title{margin:0 0 calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages{list-style:none;padding:0;margin:0}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages .ng-doc-search-result-page{margin-bottom:var(--ng-doc-base-gutter)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages .ng-doc-search-result-page .ng-doc-search-result-page-link{display:flex;align-items:center;text-decoration:none;color:var(--ng-doc-text)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages .ng-doc-search-result-page .ng-doc-search-result-page-link ng-doc-kind-icon{margin-right:var(--ng-doc-base-gutter)}\n"] }]
49
51
  }], propDecorators: { result: [{ type: i0.Input, args: [{ isSignal: true, alias: "result", required: false }] }] } });
50
52
 
51
53
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ng-doc-app-components-search-result.mjs","sources":["../../../../libs/app/components/search-result/search-result.component.ts","../../../../libs/app/components/search-result/search-result.component.html","../../../../libs/app/components/search-result/ng-doc-app-components-search-result.ts"],"sourcesContent":["import { KeyValuePipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input, Signal } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { NgDocKindIconComponent } from '@ng-doc/app/components/kind-icon';\nimport { NgDocPageInfo } from '@ng-doc/core/interfaces';\nimport { NgDocTextComponent, NgDocTooltipDirective } from '@ng-doc/ui-kit';\n\n/**\n * A list of pages grouped by their type (guides and API).\n */\n@Component({\n selector: 'ng-doc-search-result',\n templateUrl: './search-result.component.html',\n styleUrls: ['./search-result.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgDocTextComponent,\n RouterLink,\n NgDocKindIconComponent,\n NgDocTooltipDirective,\n KeyValuePipe,\n ],\n})\nexport class NgDocSearchResultComponent {\n /** The pages to list. */\n readonly result = input<NgDocPageInfo[] | null>([]);\n\n /** The pages grouped by their type. */\n readonly groupedResult: Signal<Record<string, NgDocPageInfo[]>> = computed(() =>\n (this.result() ?? []).reduce(\n (grouped: Record<string, NgDocPageInfo[]>, item: NgDocPageInfo) => {\n (grouped[item.type] ??= []).push(item);\n\n return grouped;\n },\n {},\n ),\n );\n\n /**\n * Returns the heading of a group.\n * @param type - The page type of the group.\n */\n typeToLabel(type: string): string {\n switch (type) {\n case 'api':\n return 'API';\n case 'guide':\n return 'Guides';\n default:\n return 'Unknown';\n }\n }\n}\n","@if (groupedResult() | keyvalue; as results) {\n <div class=\"ng-doc-search-result-wrapper\">\n @if (results.length) {\n @for (item of results; track item) {\n <div class=\"ng-doc-search-result-category\">\n <h4 class=\"ng-doc-search-result-title\" ng-doc-text>{{ typeToLabel(item.key) }}</h4>\n <ul class=\"ng-doc-search-result-pages\">\n @for (page of item.value; track page) {\n <li class=\"ng-doc-search-result-page\">\n <a class=\"ng-doc-search-result-page-link\" [routerLink]=\"[page.route]\">\n @if (page.kind) {\n <ng-doc-kind-icon\n [kind]=\"page.kind\"\n [ngDocTooltip]=\"page.kind\"></ng-doc-kind-icon>\n }\n {{ page.title }}\n </a>\n </li>\n }\n </ul>\n </div>\n }\n } @else {\n <div ng-doc-text color=\"muted\">Nothing was found...</div>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAOA;;AAEG;MAcU,0BAA0B,CAAA;AAbvC,IAAA,WAAA,GAAA;;QAeW,IAAA,CAAA,MAAM,GAAG,KAAK,CAAyB,EAAE;mFAAC;;QAG1C,IAAA,CAAA,aAAa,GAA4C,QAAQ,CAAC,MACzE,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,MAAM,CAC1B,CAAC,OAAwC,EAAE,IAAmB,KAAI;AAChE,YAAA,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC;AAEtC,YAAA,OAAO,OAAO;QAChB,CAAC,EACD,EAAE,CACH;0FACF;AAgBF,IAAA;AAdC;;;AAGG;AACH,IAAA,WAAW,CAAC,IAAY,EAAA;QACtB,QAAQ,IAAI;AACV,YAAA,KAAK,KAAK;AACR,gBAAA,OAAO,KAAK;AACd,YAAA,KAAK,OAAO;AACV,gBAAA,OAAO,QAAQ;AACjB,YAAA;AACE,gBAAA,OAAO,SAAS;;IAEtB;8GA7BW,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAA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AA,EAAA,aAAA,EAAA,YAAA,CAAA,EAAA,QAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EACrB,YAAY,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGH,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAbtC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,EAAA,eAAA,EAGf,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACP,kBAAkB;wBAClB,UAAU;wBACV,sBAAsB;wBACtB,qBAAqB;wBACrB,YAAY;AACb,qBAAA,EAAA,QAAA,EAAA,mgCAAA,EAAA,MAAA,EAAA,CAAA,6kCAAA,CAAA,EAAA;;;AErBH;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-doc-app-components-search-result.mjs","sources":["../../../../libs/app/components/search-result/search-result.component.ts","../../../../libs/app/components/search-result/search-result.component.html","../../../../libs/app/components/search-result/ng-doc-app-components-search-result.ts"],"sourcesContent":["import { KeyValuePipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject, input, Signal } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { NgDocKindIconComponent } from '@ng-doc/app/components/kind-icon';\nimport type { NgDocSearchTexts } from '@ng-doc/app/interfaces';\nimport { NG_DOC_TEXTS } from '@ng-doc/app/tokens';\nimport { NgDocPageInfo } from '@ng-doc/core/interfaces';\nimport { NgDocTextComponent, NgDocTooltipDirective } from '@ng-doc/ui-kit';\n\n/**\n * A list of pages grouped by their type (guides and API).\n */\n@Component({\n selector: 'ng-doc-search-result',\n templateUrl: './search-result.component.html',\n styleUrls: ['./search-result.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgDocTextComponent,\n RouterLink,\n NgDocKindIconComponent,\n NgDocTooltipDirective,\n KeyValuePipe,\n ],\n})\nexport class NgDocSearchResultComponent {\n protected readonly texts: NgDocSearchTexts = inject(NG_DOC_TEXTS).search;\n\n /** The pages to list. */\n readonly result = input<NgDocPageInfo[] | null>([]);\n\n /** The pages grouped by their type. */\n readonly groupedResult: Signal<Record<string, NgDocPageInfo[]>> = computed(() =>\n (this.result() ?? []).reduce(\n (grouped: Record<string, NgDocPageInfo[]>, item: NgDocPageInfo) => {\n (grouped[item.type] ??= []).push(item);\n\n return grouped;\n },\n {},\n ),\n );\n\n /**\n * Returns the heading of a group.\n * @param type - The page type of the group.\n */\n typeToLabel(type: string): string {\n switch (type) {\n case 'api':\n return this.texts.resultApi;\n case 'guide':\n return this.texts.resultGuides;\n default:\n return this.texts.resultUnknown;\n }\n }\n}\n","@if (groupedResult() | keyvalue; as results) {\n <div class=\"ng-doc-search-result-wrapper\">\n @if (results.length) {\n @for (item of results; track item) {\n <div class=\"ng-doc-search-result-category\">\n <h4 class=\"ng-doc-search-result-title\" ng-doc-text>{{ typeToLabel(item.key) }}</h4>\n <ul class=\"ng-doc-search-result-pages\">\n @for (page of item.value; track page) {\n <li class=\"ng-doc-search-result-page\">\n <a class=\"ng-doc-search-result-page-link\" [routerLink]=\"[page.route]\">\n @if (page.kind) {\n <ng-doc-kind-icon\n [kind]=\"page.kind\"\n [ngDocTooltip]=\"page.kind\"></ng-doc-kind-icon>\n }\n {{ page.title }}\n </a>\n </li>\n }\n </ul>\n </div>\n }\n } @else {\n <div ng-doc-text color=\"muted\">{{ texts.nothingFound }}</div>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AASA;;AAEG;MAcU,0BAA0B,CAAA;AAbvC,IAAA,WAAA,GAAA;AAcqB,QAAA,IAAA,CAAA,KAAK,GAAqB,MAAM,CAAC,YAAY,CAAC,CAAC,MAAM;;QAG/D,IAAA,CAAA,MAAM,GAAG,KAAK,CAAyB,EAAE;mFAA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,EAAA;;;AEvBH;;AAEG;;;;"}
@@ -4,7 +4,8 @@ import { inject, signal, DOCUMENT, PLATFORM_ID, DestroyRef, afterNextRender, Cha
4
4
  import { NgDocSearchEngine } from '@ng-doc/app/classes';
5
5
  import { NgDocCommandPaletteComponent } from '@ng-doc/app/components/command-palette';
6
6
  import { NgDocShortcutsService } from '@ng-doc/app/services/shortcuts';
7
- import { NgDocDialogService, NgDocComponentContent, NgDocButtonIconComponent } from '@ng-doc/ui-kit';
7
+ import { NG_DOC_TEXTS } from '@ng-doc/app/tokens';
8
+ import { NgDocDialogService, NgDocComponentContent, NgDocButtonIconComponent, NgDocOverlayService } from '@ng-doc/ui-kit';
8
9
 
9
10
  /**
10
11
  * The search button of the navbar. It opens the search palette on click, with Command+K
@@ -16,8 +17,9 @@ class NgDocSearchComponent {
16
17
  this.dialog = inject(NgDocDialogService);
17
18
  this.searchEngine = inject(NgDocSearchEngine, { optional: true });
18
19
  this.shortcuts = inject(NgDocShortcutsService);
20
+ this.texts = inject(NG_DOC_TEXTS).search;
19
21
  /** The chord that opens the search, as the reader's platform labels it. */
20
- this.chord = signal('⌘K', /* @ts-ignore */
22
+ this.chord = signal(this.texts.shortcutMac, /* @ts-ignore */
21
23
  ...(ngDevMode ? [{ debugName: "chord" }] : /* istanbul ignore next */ []));
22
24
  this.document = inject(DOCUMENT);
23
25
  this.browser = isPlatformBrowser(inject(PLATFORM_ID));
@@ -40,7 +42,7 @@ class NgDocSearchComponent {
40
42
  // The platform is known only in the browser; the server renders the macOS label.
41
43
  afterNextRender(() => {
42
44
  if (!/Mac|iPhone|iPad/i.test(this.document.defaultView?.navigator.platform ?? '')) {
43
- this.chord.set('Ctrl K');
45
+ this.chord.set(this.texts.shortcutOther);
44
46
  }
45
47
  });
46
48
  }
@@ -74,11 +76,11 @@ class NgDocSearchComponent {
74
76
  });
75
77
  }
76
78
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
77
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.2.1", type: NgDocSearchComponent, isStandalone: true, selector: "ng-doc-search", ngImport: i0, template: "<button\n class=\"ng-doc-search-field\"\n type=\"button\"\n aria-haspopup=\"dialog\"\n [attr.aria-label]=\"'Search (' + chord() + ')'\"\n aria-keyshortcuts=\"Meta+K Control+K\"\n (click)=\"open()\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </svg>\n <span class=\"ng-doc-search-placeholder\">Search docs\u2026</span>\n <kbd>{{ chord() }}</kbd>\n</button>\n<button\n class=\"ng-doc-search-button\"\n type=\"button\"\n ng-doc-button-icon\n size=\"large\"\n [rounded]=\"false\"\n aria-haspopup=\"dialog\"\n [attr.aria-label]=\"'Search (' + chord() + ')'\"\n aria-keyshortcuts=\"Meta+K Control+K\"\n (click)=\"open()\">\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </svg>\n</button>\n", styles: [":host{display:flex;align-items:center}.ng-doc-search-field{display:flex;align-items:center;gap:var(--ng-doc-space-2);width:220px;height:36px;padding:0 var(--ng-doc-space-2) 0 var(--ng-doc-space-3);border:1px solid var(--ng-doc-border-color);border-radius:var(--ng-doc-radius-md);background:var(--ng-doc-base-1);color:var(--ng-doc-text-muted);font:400 var(--ng-doc-text-sm-size)/20px var(--ng-doc-font-family);text-align:left;cursor:pointer;transition:border-color var(--ng-doc-transition)}.ng-doc-search-field:hover{border-color:var(--ng-doc-border-hover-color)}.ng-doc-search-field:focus-visible{outline:none;box-shadow:var(--ng-doc-focus-ring)}.ng-doc-search-field svg{flex:none}.ng-doc-search-field kbd{margin-left:auto;padding:0 6px;border:1px solid var(--ng-doc-kbd-border-color);border-radius:var(--ng-doc-radius-xs);background:var(--ng-doc-kbd-background);font:500 11px/18px var(--ng-doc-font-family);color:var(--ng-doc-text-muted)}.ng-doc-search-placeholder{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ng-doc-search-button{display:none!important}@media(max-width:1024px){.ng-doc-search-field{display:none}.ng-doc-search-button{display:inline-flex!important}}\n"], dependencies: [{ kind: "component", type: NgDocButtonIconComponent, selector: "button[ng-doc-button-icon], a[ng-doc-button-icon], button[ng-doc-button-icon-raised], a[ng-doc-button-icon-raised], button[ng-doc-button-icon-transparent], a[ng-doc-button-icon-transparent]", inputs: ["size", "rounded"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
79
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.2.1", type: NgDocSearchComponent, isStandalone: true, selector: "ng-doc-search", providers: [NgDocDialogService, NgDocOverlayService], ngImport: i0, template: "<button\n class=\"ng-doc-search-field\"\n type=\"button\"\n aria-haspopup=\"dialog\"\n [attr.aria-label]=\"texts.label({ shortcut: chord() })\"\n aria-keyshortcuts=\"Meta+K Control+K\"\n (click)=\"open()\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </svg>\n <span class=\"ng-doc-search-placeholder\">{{ texts.placeholder }}</span>\n <kbd>{{ chord() }}</kbd>\n</button>\n<button\n class=\"ng-doc-search-button\"\n type=\"button\"\n ng-doc-button-icon\n size=\"large\"\n [rounded]=\"false\"\n aria-haspopup=\"dialog\"\n [attr.aria-label]=\"texts.label({ shortcut: chord() })\"\n aria-keyshortcuts=\"Meta+K Control+K\"\n (click)=\"open()\">\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </svg>\n</button>\n", styles: [":host{display:flex;align-items:center}.ng-doc-search-field{display:flex;align-items:center;gap:var(--ng-doc-space-2);width:220px;height:36px;padding:0 var(--ng-doc-space-2) 0 var(--ng-doc-space-3);border:1px solid var(--ng-doc-border-color);border-radius:var(--ng-doc-radius-md);background:var(--ng-doc-base-1);color:var(--ng-doc-text-muted);font:400 var(--ng-doc-text-sm-size)/20px var(--ng-doc-font-family);text-align:left;cursor:pointer;transition:border-color var(--ng-doc-transition)}.ng-doc-search-field:hover{border-color:var(--ng-doc-border-hover-color)}.ng-doc-search-field:focus-visible{outline:none;box-shadow:var(--ng-doc-focus-ring)}.ng-doc-search-field svg{flex:none}.ng-doc-search-field kbd{margin-left:auto;padding:0 6px;border:1px solid var(--ng-doc-kbd-border-color);border-radius:var(--ng-doc-radius-xs);background:var(--ng-doc-kbd-background);font:500 11px/18px var(--ng-doc-font-family);color:var(--ng-doc-text-muted)}.ng-doc-search-placeholder{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ng-doc-search-button{display:none!important}@media(max-width:1024px){.ng-doc-search-field{display:none}.ng-doc-search-button{display:inline-flex!important}}\n"], dependencies: [{ kind: "component", type: NgDocButtonIconComponent, selector: "button[ng-doc-button-icon], a[ng-doc-button-icon], button[ng-doc-button-icon-raised], a[ng-doc-button-icon-raised], button[ng-doc-button-icon-transparent], a[ng-doc-button-icon-transparent]", inputs: ["size", "rounded"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
78
80
  }
79
81
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocSearchComponent, decorators: [{
80
82
  type: Component,
81
- args: [{ selector: 'ng-doc-search', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgDocButtonIconComponent], template: "<button\n class=\"ng-doc-search-field\"\n type=\"button\"\n aria-haspopup=\"dialog\"\n [attr.aria-label]=\"'Search (' + chord() + ')'\"\n aria-keyshortcuts=\"Meta+K Control+K\"\n (click)=\"open()\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </svg>\n <span class=\"ng-doc-search-placeholder\">Search docs\u2026</span>\n <kbd>{{ chord() }}</kbd>\n</button>\n<button\n class=\"ng-doc-search-button\"\n type=\"button\"\n ng-doc-button-icon\n size=\"large\"\n [rounded]=\"false\"\n aria-haspopup=\"dialog\"\n [attr.aria-label]=\"'Search (' + chord() + ')'\"\n aria-keyshortcuts=\"Meta+K Control+K\"\n (click)=\"open()\">\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </svg>\n</button>\n", styles: [":host{display:flex;align-items:center}.ng-doc-search-field{display:flex;align-items:center;gap:var(--ng-doc-space-2);width:220px;height:36px;padding:0 var(--ng-doc-space-2) 0 var(--ng-doc-space-3);border:1px solid var(--ng-doc-border-color);border-radius:var(--ng-doc-radius-md);background:var(--ng-doc-base-1);color:var(--ng-doc-text-muted);font:400 var(--ng-doc-text-sm-size)/20px var(--ng-doc-font-family);text-align:left;cursor:pointer;transition:border-color var(--ng-doc-transition)}.ng-doc-search-field:hover{border-color:var(--ng-doc-border-hover-color)}.ng-doc-search-field:focus-visible{outline:none;box-shadow:var(--ng-doc-focus-ring)}.ng-doc-search-field svg{flex:none}.ng-doc-search-field kbd{margin-left:auto;padding:0 6px;border:1px solid var(--ng-doc-kbd-border-color);border-radius:var(--ng-doc-radius-xs);background:var(--ng-doc-kbd-background);font:500 11px/18px var(--ng-doc-font-family);color:var(--ng-doc-text-muted)}.ng-doc-search-placeholder{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ng-doc-search-button{display:none!important}@media(max-width:1024px){.ng-doc-search-field{display:none}.ng-doc-search-button{display:inline-flex!important}}\n"] }]
83
+ args: [{ selector: 'ng-doc-search', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgDocButtonIconComponent], providers: [NgDocDialogService, NgDocOverlayService], template: "<button\n class=\"ng-doc-search-field\"\n type=\"button\"\n aria-haspopup=\"dialog\"\n [attr.aria-label]=\"texts.label({ shortcut: chord() })\"\n aria-keyshortcuts=\"Meta+K Control+K\"\n (click)=\"open()\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </svg>\n <span class=\"ng-doc-search-placeholder\">{{ texts.placeholder }}</span>\n <kbd>{{ chord() }}</kbd>\n</button>\n<button\n class=\"ng-doc-search-button\"\n type=\"button\"\n ng-doc-button-icon\n size=\"large\"\n [rounded]=\"false\"\n aria-haspopup=\"dialog\"\n [attr.aria-label]=\"texts.label({ shortcut: chord() })\"\n aria-keyshortcuts=\"Meta+K Control+K\"\n (click)=\"open()\">\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </svg>\n</button>\n", styles: [":host{display:flex;align-items:center}.ng-doc-search-field{display:flex;align-items:center;gap:var(--ng-doc-space-2);width:220px;height:36px;padding:0 var(--ng-doc-space-2) 0 var(--ng-doc-space-3);border:1px solid var(--ng-doc-border-color);border-radius:var(--ng-doc-radius-md);background:var(--ng-doc-base-1);color:var(--ng-doc-text-muted);font:400 var(--ng-doc-text-sm-size)/20px var(--ng-doc-font-family);text-align:left;cursor:pointer;transition:border-color var(--ng-doc-transition)}.ng-doc-search-field:hover{border-color:var(--ng-doc-border-hover-color)}.ng-doc-search-field:focus-visible{outline:none;box-shadow:var(--ng-doc-focus-ring)}.ng-doc-search-field svg{flex:none}.ng-doc-search-field kbd{margin-left:auto;padding:0 6px;border:1px solid var(--ng-doc-kbd-border-color);border-radius:var(--ng-doc-radius-xs);background:var(--ng-doc-kbd-background);font:500 11px/18px var(--ng-doc-font-family);color:var(--ng-doc-text-muted)}.ng-doc-search-placeholder{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ng-doc-search-button{display:none!important}@media(max-width:1024px){.ng-doc-search-field{display:none}.ng-doc-search-button{display:inline-flex!important}}\n"] }]
82
84
  }], ctorParameters: () => [] });
83
85
 
84
86
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ng-doc-app-components-search.mjs","sources":["../../../../libs/app/components/search/search.component.ts","../../../../libs/app/components/search/search.component.html","../../../../libs/app/components/search/ng-doc-app-components-search.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n DOCUMENT,\n inject,\n PLATFORM_ID,\n signal,\n} from '@angular/core';\nimport { NgDocSearchEngine } from '@ng-doc/app/classes';\nimport {\n NgDocCommandPaletteComponent,\n NgDocCommandPaletteData,\n} from '@ng-doc/app/components/command-palette';\nimport { NgDocShortcutsService } from '@ng-doc/app/services/shortcuts';\nimport {\n NgDocButtonIconComponent,\n NgDocComponentContent,\n NgDocDialogService,\n} from '@ng-doc/ui-kit';\nimport { NgDocOverlayRef } from '@ng-doc/ui-kit/classes';\n\n/**\n * The search button of the navbar. It opens the search palette on click, with Command+K\n * (Control+K) and, while single-key shortcuts are on, with the slash key. Wide screens show a\n * search field with the key hint; narrow screens show an icon button.\n */\n@Component({\n selector: 'ng-doc-search',\n templateUrl: './search.component.html',\n styleUrls: ['./search.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgDocButtonIconComponent],\n})\nexport class NgDocSearchComponent {\n protected readonly dialog = inject(NgDocDialogService);\n protected readonly searchEngine = inject(NgDocSearchEngine, { optional: true });\n protected readonly shortcuts = inject(NgDocShortcutsService);\n /** The chord that opens the search, as the reader's platform labels it. */\n protected readonly chord = signal('⌘K');\n\n private readonly document = inject(DOCUMENT);\n private readonly browser = isPlatformBrowser(inject(PLATFORM_ID));\n private dialogRef?: NgDocOverlayRef;\n\n constructor() {\n if (!this.searchEngine) {\n throw new Error(`NgDoc: Search engine is not provided,\n\t\t\tplease check this article: https://ng-doc.com/docs/get-started/installation#4-add-the-providers\n\t\t\tto learn how to provide it.`);\n }\n\n const removeSlash = this.shortcuts.register({ key: '/', handler: () => this.open() });\n const removeChord = this.shortcuts.register({\n key: 'k',\n chord: true,\n handler: () => (this.dialogRef ? this.dialogRef.close() : this.open()),\n });\n\n inject(DestroyRef).onDestroy(() => {\n removeSlash();\n removeChord();\n this.dialogRef?.close();\n });\n\n // The platform is known only in the browser; the server renders the macOS label.\n afterNextRender(() => {\n if (!/Mac|iPhone|iPad/i.test(this.document.defaultView?.navigator.platform ?? '')) {\n this.chord.set('Ctrl K');\n }\n });\n }\n\n /**\n * Opens the search palette. Focus returns to the element that had it when the palette closes.\n * @param query - The text the search field starts with.\n */\n open(query: string = ''): void {\n if (this.dialogRef || !this.browser) {\n return;\n }\n\n const opener = this.document.activeElement;\n const narrow = !!this.document.defaultView?.matchMedia?.('(max-width: 640px)').matches;\n const data: NgDocCommandPaletteData = { query };\n const dialogRef = this.dialog.open(new NgDocComponentContent(NgDocCommandPaletteComponent), {\n hasBackdrop: true,\n backdropClass: 'ng-doc-command-palette-backdrop',\n panelClass: ['ng-doc-transparent-dialog', 'ng-doc-command-palette-pane'],\n positionStrategy: this.dialog\n .positionStrategy()\n .centerHorizontally()\n .top(narrow ? '8px' : '10vh'),\n data,\n });\n\n this.dialogRef = dialogRef;\n dialogRef.afterClose().subscribe(() => {\n this.dialogRef = undefined;\n\n if (opener instanceof HTMLElement && opener.isConnected && opener !== this.document.body) {\n opener.focus({ preventScroll: true });\n }\n });\n }\n}\n","<button\n class=\"ng-doc-search-field\"\n type=\"button\"\n aria-haspopup=\"dialog\"\n [attr.aria-label]=\"'Search (' + chord() + ')'\"\n aria-keyshortcuts=\"Meta+K Control+K\"\n (click)=\"open()\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </svg>\n <span class=\"ng-doc-search-placeholder\">Search docs…</span>\n <kbd>{{ chord() }}</kbd>\n</button>\n<button\n class=\"ng-doc-search-button\"\n type=\"button\"\n ng-doc-button-icon\n size=\"large\"\n [rounded]=\"false\"\n aria-haspopup=\"dialog\"\n [attr.aria-label]=\"'Search (' + chord() + ')'\"\n aria-keyshortcuts=\"Meta+K Control+K\"\n (click)=\"open()\">\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </sv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,CAAC,WAAW,IAAI,MAAM,KAAK,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;gBACxF,MAAM,CAAC,KAAK,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;YACvC;AACF,QAAA,CAAC,CAAC;IACJ;8GAtEW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECpCjC,0pCA6CA,EAAA,MAAA,EAAA,CAAA,iqCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDXY,wBAAwB,EAAA,QAAA,EAAA,+LAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAEvB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAPhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,mBAGR,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,wBAAwB,CAAC,EAAA,QAAA,EAAA,0pCAAA,EAAA,MAAA,EAAA,CAAA,iqCAAA,CAAA,EAAA;;;AElCrC;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-doc-app-components-search.mjs","sources":["../../../../libs/app/components/search/search.component.ts","../../../../libs/app/components/search/search.component.html","../../../../libs/app/components/search/ng-doc-app-components-search.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n DOCUMENT,\n inject,\n PLATFORM_ID,\n signal,\n} from '@angular/core';\nimport { NgDocSearchEngine } from '@ng-doc/app/classes';\nimport {\n NgDocCommandPaletteComponent,\n NgDocCommandPaletteData,\n} from '@ng-doc/app/components/command-palette';\nimport type { NgDocSearchTexts } from '@ng-doc/app/interfaces';\nimport { NgDocShortcutsService } from '@ng-doc/app/services/shortcuts';\nimport { NG_DOC_TEXTS } from '@ng-doc/app/tokens';\nimport {\n NgDocButtonIconComponent,\n NgDocComponentContent,\n NgDocDialogService,\n NgDocOverlayService,\n} from '@ng-doc/ui-kit';\nimport { NgDocOverlayRef } from '@ng-doc/ui-kit/classes';\n\n/**\n * The search button of the navbar. It opens the search palette on click, with Command+K\n * (Control+K) and, while single-key shortcuts are on, with the slash key. Wide screens show a\n * search field with the key hint; narrow screens show an icon button.\n */\n@Component({\n selector: 'ng-doc-search',\n templateUrl: './search.component.html',\n styleUrls: ['./search.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgDocButtonIconComponent],\n // The palette is created with this component's injector, not the root one: it reads the search\n // engine and the generated context, which may be provided by the route that holds the docs.\n providers: [NgDocDialogService, NgDocOverlayService],\n})\nexport class NgDocSearchComponent {\n protected readonly dialog = inject(NgDocDialogService);\n protected readonly searchEngine = inject(NgDocSearchEngine, { optional: true });\n protected readonly shortcuts = inject(NgDocShortcutsService);\n protected readonly texts: NgDocSearchTexts = inject(NG_DOC_TEXTS).search;\n /** The chord that opens the search, as the reader's platform labels it. */\n protected readonly chord = signal(this.texts.shortcutMac);\n\n private readonly document = inject(DOCUMENT);\n private readonly browser = isPlatformBrowser(inject(PLATFORM_ID));\n private dialogRef?: NgDocOverlayRef;\n\n constructor() {\n if (!this.searchEngine) {\n throw new Error(`NgDoc: Search engine is not provided,\n\t\t\tplease check this article: https://ng-doc.com/docs/get-started/installation#4-add-the-providers\n\t\t\tto learn how to provide it.`);\n }\n\n const removeSlash = this.shortcuts.register({ key: '/', handler: () => this.open() });\n const removeChord = this.shortcuts.register({\n key: 'k',\n chord: true,\n handler: () => (this.dialogRef ? this.dialogRef.close() : this.open()),\n });\n\n inject(DestroyRef).onDestroy(() => {\n removeSlash();\n removeChord();\n this.dialogRef?.close();\n });\n\n // The platform is known only in the browser; the server renders the macOS label.\n afterNextRender(() => {\n if (!/Mac|iPhone|iPad/i.test(this.document.defaultView?.navigator.platform ?? '')) {\n this.chord.set(this.texts.shortcutOther);\n }\n });\n }\n\n /**\n * Opens the search palette. Focus returns to the element that had it when the palette closes.\n * @param query - The text the search field starts with.\n */\n open(query: string = ''): void {\n if (this.dialogRef || !this.browser) {\n return;\n }\n\n const opener = this.document.activeElement;\n const narrow = !!this.document.defaultView?.matchMedia?.('(max-width: 640px)').matches;\n const data: NgDocCommandPaletteData = { query };\n const dialogRef = this.dialog.open(new NgDocComponentContent(NgDocCommandPaletteComponent), {\n hasBackdrop: true,\n backdropClass: 'ng-doc-command-palette-backdrop',\n panelClass: ['ng-doc-transparent-dialog', 'ng-doc-command-palette-pane'],\n positionStrategy: this.dialog\n .positionStrategy()\n .centerHorizontally()\n .top(narrow ? '8px' : '10vh'),\n data,\n });\n\n this.dialogRef = dialogRef;\n dialogRef.afterClose().subscribe(() => {\n this.dialogRef = undefined;\n\n if (opener instanceof HTMLElement && opener.isConnected && opener !== this.document.body) {\n opener.focus({ preventScroll: true });\n }\n });\n }\n}\n","<button\n class=\"ng-doc-search-field\"\n type=\"button\"\n aria-haspopup=\"dialog\"\n [attr.aria-label]=\"texts.label({ shortcut: chord() })\"\n aria-keyshortcuts=\"Meta+K Control+K\"\n (click)=\"open()\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </svg>\n <span class=\"ng-doc-search-placeholder\">{{ texts.placeholder }}</span>\n <kbd>{{ chord() }}</kbd>\n</button>\n<button\n class=\"ng-doc-search-button\"\n type=\"button\"\n ng-doc-button-icon\n size=\"large\"\n [rounded]=\"false\"\n aria-haspopup=\"dialog\"\n [attr.aria-label]=\"texts.label({ shortcut: chord() })\"\n aria-keyshortcuts=\"Meta+K Control+K\"\n (click)=\"open()\">\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </svg>\n</button>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AA2BA;;;;AAIG;MAWU,oBAAoB,CAAA;AAY/B,IAAA,WAAA,GAAA;AAXmB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,kBAAkB,CAAC;QACnC,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,iBAAiB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAC5D,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACzC,QAAA,IAAA,CAAA,KAAK,GAAqB,MAAM,CAAC,YAAY,CAAC,CAAC,MAAM;;AAErD,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW;kFAAC;AAExC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC3B,IAAA,CAAA,OAAO,GAAG,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAI/D,QAAA,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YACtB,MAAM,IAAI,KAAK,CAAC,CAAA;;AAES,8BAAA,CAAA,CAAC;QAC5B;QAEA,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,IAAI,E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AAA,CAAA,EAAA,QAAA,EAAA,eAAe,EAAA,eAAA,EAGR,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,wBAAwB,CAAC,EAAA,SAAA,EAGxB,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,EAAA,QAAA,EAAA,grCAAA,EAAA,MAAA,EAAA,CAAA,iqCAAA,CAAA,EAAA;;;AExCtD;;AAEG;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { Location, NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
3
  import { input, booleanAttribute, linkedSignal, inject, ChangeDetectionStrategy, Component, computed } from '@angular/core';
4
- import { NG_DOC_CONTEXT } from '@ng-doc/app/tokens';
4
+ import { NG_DOC_TEXTS, NG_DOC_CONTEXT } from '@ng-doc/app/tokens';
5
5
  import { NgDocExpanderComponent, NgDocExecutePipe, NgDocBindPipe } from '@ng-doc/ui-kit';
6
6
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
7
7
  import { Router, NavigationEnd, RouterLinkActive, RouterLink } from '@angular/router';
@@ -118,6 +118,7 @@ function sentenceCase(text) {
118
118
 
119
119
  class NgDocSidebarComponent {
120
120
  constructor() {
121
+ this.texts = inject(NG_DOC_TEXTS).navigation;
121
122
  this.location = inject(Location);
122
123
  this.context = inject(NG_DOC_CONTEXT);
123
124
  }
@@ -128,7 +129,7 @@ class NgDocSidebarComponent {
128
129
  return this.location.path().includes(route ?? '', 0);
129
130
  }
130
131
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
131
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: NgDocSidebarComponent, isStandalone: true, selector: "ng-doc-sidebar", ngImport: i0, template: "<nav class=\"ng-doc-side-bar-wrapper\" aria-label=\"Documentation\">\n @for (item of getNavigation | bind: this | execute; track item) {\n <ng-container\n *ngTemplateOutlet=\"sidebarTemplate; context: { item: item, root: true }\"></ng-container>\n }\n\n <ng-template let-item=\"item\" let-root=\"root\" #sidebarTemplate>\n @if (item.children?.length) {\n @if (!item.hidden) {\n <ng-doc-sidebar-category\n [category]=\"item\"\n [expandable]=\"!!item?.expandable\"\n [expanded]=\"\n !!item?.expanded || !item?.expandable || (matchRoute | bind: this | execute: item.route)\n \"\n [isRoot]=\"!!root\"\n [content]=\"categoryContent\">\n </ng-doc-sidebar-category>\n }\n <ng-template #categoryContent>\n @for (child of getNavigation | bind: this | execute: item; track child) {\n <ng-container\n *ngTemplateOutlet=\"\n sidebarTemplate;\n context: { item: child, root: false }\n \"></ng-container>\n }\n </ng-template>\n } @else {\n @if (!item.hidden) {\n <ng-doc-sidebar-item [item]=\"item\" [isRoot]=\"!!root\"></ng-doc-sidebar-item>\n }\n }\n </ng-template>\n</nav>\n", styles: [":host{display:block;height:calc(100vh - var(--ng-doc-navbar-height));width:100%;overflow:hidden;background:var(--ng-doc-sidebar-background);border-right:1px solid var(--ng-doc-border-color);box-shadow:var(--ng-doc-sidebar-shadow);font-family:var(--ng-doc-font-family);font-size:var(--ng-doc-text-sm-size);line-height:20px;--ng-doc-sidebar-item-indent: var(--ng-doc-space-2)}.ng-doc-side-bar-wrapper{position:relative;overflow:auto;max-height:100%;padding:calc(var(--ng-doc-sidebar-padding) + var(--ng-doc-space-1)) calc(var(--ng-doc-sidebar-horizontal-padding) / 2) calc(var(--ng-doc-sidebar-padding) * 2.5)}.ng-doc-side-bar-wrapper>*+*,ng-doc-sidebar-category+ng-doc-sidebar-category{margin-top:2px}.ng-doc-side-bar-wrapper ng-doc-sidebar-category[data-ng-doc-expanded=true]+*,.ng-doc-side-bar-wrapper *+ng-doc-sidebar-category[data-ng-doc-expanded=true]{margin-top:var(--ng-doc-space-2)}.ng-doc-side-bar-wrapper ng-doc-sidebar-category ng-doc-sidebar-item+ng-doc-sidebar-item{margin-top:0}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NgDocSidebarCategoryComponent, selector: "ng-doc-sidebar-category", inputs: ["category", "isRoot", "content", "expandable", "expanded"] }, { kind: "component", type: NgDocSidebarItemComponent, selector: "ng-doc-sidebar-item", inputs: ["item", "isRoot"] }, { kind: "pipe", type: NgDocExecutePipe, name: "execute" }, { kind: "pipe", type: NgDocBindPipe, name: "bind" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
132
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: NgDocSidebarComponent, isStandalone: true, selector: "ng-doc-sidebar", ngImport: i0, template: "<nav class=\"ng-doc-side-bar-wrapper\" [attr.aria-label]=\"texts.sidebar\">\n @for (item of getNavigation | bind: this | execute; track item) {\n <ng-container\n *ngTemplateOutlet=\"sidebarTemplate; context: { item: item, root: true }\"></ng-container>\n }\n\n <ng-template let-item=\"item\" let-root=\"root\" #sidebarTemplate>\n @if (item.children?.length) {\n @if (!item.hidden) {\n <ng-doc-sidebar-category\n [category]=\"item\"\n [expandable]=\"!!item?.expandable\"\n [expanded]=\"\n !!item?.expanded || !item?.expandable || (matchRoute | bind: this | execute: item.route)\n \"\n [isRoot]=\"!!root\"\n [content]=\"categoryContent\">\n </ng-doc-sidebar-category>\n }\n <ng-template #categoryContent>\n @for (child of getNavigation | bind: this | execute: item; track child) {\n <ng-container\n *ngTemplateOutlet=\"\n sidebarTemplate;\n context: { item: child, root: false }\n \"></ng-container>\n }\n </ng-template>\n } @else {\n @if (!item.hidden) {\n <ng-doc-sidebar-item [item]=\"item\" [isRoot]=\"!!root\"></ng-doc-sidebar-item>\n }\n }\n </ng-template>\n</nav>\n", styles: [":host{display:block;height:calc(100vh - var(--ng-doc-navbar-height) - var(--ng-doc-layout-top));width:100%;overflow:hidden;background:var(--ng-doc-sidebar-background);border-right:1px solid var(--ng-doc-border-color);box-shadow:var(--ng-doc-sidebar-shadow);font-family:var(--ng-doc-font-family);font-size:var(--ng-doc-text-sm-size);line-height:20px;--ng-doc-sidebar-item-indent: var(--ng-doc-space-2)}.ng-doc-side-bar-wrapper{position:relative;overflow:auto;max-height:100%;padding:calc(var(--ng-doc-sidebar-padding) + var(--ng-doc-space-1)) calc(var(--ng-doc-sidebar-horizontal-padding) / 2) calc(var(--ng-doc-sidebar-padding) * 2.5)}.ng-doc-side-bar-wrapper>*+*,ng-doc-sidebar-category+ng-doc-sidebar-category{margin-top:2px}.ng-doc-side-bar-wrapper ng-doc-sidebar-category[data-ng-doc-expanded=true]+*,.ng-doc-side-bar-wrapper *+ng-doc-sidebar-category[data-ng-doc-expanded=true]{margin-top:var(--ng-doc-space-2)}.ng-doc-side-bar-wrapper ng-doc-sidebar-category ng-doc-sidebar-item+ng-doc-sidebar-item{margin-top:0}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NgDocSidebarCategoryComponent, selector: "ng-doc-sidebar-category", inputs: ["category", "isRoot", "content", "expandable", "expanded"] }, { kind: "component", type: NgDocSidebarItemComponent, selector: "ng-doc-sidebar-item", inputs: ["item", "isRoot"] }, { kind: "pipe", type: NgDocExecutePipe, name: "execute" }, { kind: "pipe", type: NgDocBindPipe, name: "bind" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
132
133
  }
133
134
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocSidebarComponent, decorators: [{
134
135
  type: Component,
@@ -138,7 +139,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
138
139
  NgDocSidebarItemComponent,
139
140
  NgDocExecutePipe,
140
141
  NgDocBindPipe,
141
- ], template: "<nav class=\"ng-doc-side-bar-wrapper\" aria-label=\"Documentation\">\n @for (item of getNavigation | bind: this | execute; track item) {\n <ng-container\n *ngTemplateOutlet=\"sidebarTemplate; context: { item: item, root: true }\"></ng-container>\n }\n\n <ng-template let-item=\"item\" let-root=\"root\" #sidebarTemplate>\n @if (item.children?.length) {\n @if (!item.hidden) {\n <ng-doc-sidebar-category\n [category]=\"item\"\n [expandable]=\"!!item?.expandable\"\n [expanded]=\"\n !!item?.expanded || !item?.expandable || (matchRoute | bind: this | execute: item.route)\n \"\n [isRoot]=\"!!root\"\n [content]=\"categoryContent\">\n </ng-doc-sidebar-category>\n }\n <ng-template #categoryContent>\n @for (child of getNavigation | bind: this | execute: item; track child) {\n <ng-container\n *ngTemplateOutlet=\"\n sidebarTemplate;\n context: { item: child, root: false }\n \"></ng-container>\n }\n </ng-template>\n } @else {\n @if (!item.hidden) {\n <ng-doc-sidebar-item [item]=\"item\" [isRoot]=\"!!root\"></ng-doc-sidebar-item>\n }\n }\n </ng-template>\n</nav>\n", styles: [":host{display:block;height:calc(100vh - var(--ng-doc-navbar-height));width:100%;overflow:hidden;background:var(--ng-doc-sidebar-background);border-right:1px solid var(--ng-doc-border-color);box-shadow:var(--ng-doc-sidebar-shadow);font-family:var(--ng-doc-font-family);font-size:var(--ng-doc-text-sm-size);line-height:20px;--ng-doc-sidebar-item-indent: var(--ng-doc-space-2)}.ng-doc-side-bar-wrapper{position:relative;overflow:auto;max-height:100%;padding:calc(var(--ng-doc-sidebar-padding) + var(--ng-doc-space-1)) calc(var(--ng-doc-sidebar-horizontal-padding) / 2) calc(var(--ng-doc-sidebar-padding) * 2.5)}.ng-doc-side-bar-wrapper>*+*,ng-doc-sidebar-category+ng-doc-sidebar-category{margin-top:2px}.ng-doc-side-bar-wrapper ng-doc-sidebar-category[data-ng-doc-expanded=true]+*,.ng-doc-side-bar-wrapper *+ng-doc-sidebar-category[data-ng-doc-expanded=true]{margin-top:var(--ng-doc-space-2)}.ng-doc-side-bar-wrapper ng-doc-sidebar-category ng-doc-sidebar-item+ng-doc-sidebar-item{margin-top:0}\n"] }]
142
+ ], template: "<nav class=\"ng-doc-side-bar-wrapper\" [attr.aria-label]=\"texts.sidebar\">\n @for (item of getNavigation | bind: this | execute; track item) {\n <ng-container\n *ngTemplateOutlet=\"sidebarTemplate; context: { item: item, root: true }\"></ng-container>\n }\n\n <ng-template let-item=\"item\" let-root=\"root\" #sidebarTemplate>\n @if (item.children?.length) {\n @if (!item.hidden) {\n <ng-doc-sidebar-category\n [category]=\"item\"\n [expandable]=\"!!item?.expandable\"\n [expanded]=\"\n !!item?.expanded || !item?.expandable || (matchRoute | bind: this | execute: item.route)\n \"\n [isRoot]=\"!!root\"\n [content]=\"categoryContent\">\n </ng-doc-sidebar-category>\n }\n <ng-template #categoryContent>\n @for (child of getNavigation | bind: this | execute: item; track child) {\n <ng-container\n *ngTemplateOutlet=\"\n sidebarTemplate;\n context: { item: child, root: false }\n \"></ng-container>\n }\n </ng-template>\n } @else {\n @if (!item.hidden) {\n <ng-doc-sidebar-item [item]=\"item\" [isRoot]=\"!!root\"></ng-doc-sidebar-item>\n }\n }\n </ng-template>\n</nav>\n", styles: [":host{display:block;height:calc(100vh - var(--ng-doc-navbar-height) - var(--ng-doc-layout-top));width:100%;overflow:hidden;background:var(--ng-doc-sidebar-background);border-right:1px solid var(--ng-doc-border-color);box-shadow:var(--ng-doc-sidebar-shadow);font-family:var(--ng-doc-font-family);font-size:var(--ng-doc-text-sm-size);line-height:20px;--ng-doc-sidebar-item-indent: var(--ng-doc-space-2)}.ng-doc-side-bar-wrapper{position:relative;overflow:auto;max-height:100%;padding:calc(var(--ng-doc-sidebar-padding) + var(--ng-doc-space-1)) calc(var(--ng-doc-sidebar-horizontal-padding) / 2) calc(var(--ng-doc-sidebar-padding) * 2.5)}.ng-doc-side-bar-wrapper>*+*,ng-doc-sidebar-category+ng-doc-sidebar-category{margin-top:2px}.ng-doc-side-bar-wrapper ng-doc-sidebar-category[data-ng-doc-expanded=true]+*,.ng-doc-side-bar-wrapper *+ng-doc-sidebar-category[data-ng-doc-expanded=true]{margin-top:var(--ng-doc-space-2)}.ng-doc-side-bar-wrapper ng-doc-sidebar-category ng-doc-sidebar-item+ng-doc-sidebar-item{margin-top:0}\n"] }]
142
143
  }] });
143
144
 
144
145
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ng-doc-app-components-sidebar.mjs","sources":["../../../../libs/app/components/sidebar/sidebar-category/sidebar-category.component.ts","../../../../libs/app/components/sidebar/sidebar-category/sidebar-category.component.html","../../../../libs/app/components/sidebar/sidebar-item/sidebar-item.component.ts","../../../../libs/app/components/sidebar/sidebar-item/sidebar-item.component.html","../../../../libs/app/components/sidebar/sidebar.component.ts","../../../../libs/app/components/sidebar/sidebar.component.html","../../../../libs/app/components/sidebar/ng-doc-app-components-sidebar.ts"],"sourcesContent":["import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n inject,\n input,\n linkedSignal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NavigationEnd, Router } from '@angular/router';\nimport { NgDocNavigation } from '@ng-doc/app/interfaces';\nimport { NgDocContent, NgDocExpanderComponent } from '@ng-doc/ui-kit';\nimport { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';\nimport { filter } from 'rxjs/operators';\n\nlet nextId = 0;\n\n/**\n * A category of the sidebar: a header row that expands and collapses the pages below it.\n *\n * An expandable category opens by itself when the reader navigates to one of its pages.\n */\n@Component({\n selector: 'ng-doc-sidebar-category',\n templateUrl: './sidebar-category.component.html',\n styleUrls: ['./sidebar-category.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgDocExpanderComponent, PolymorpheusOutlet],\n host: {\n '[attr.data-ng-doc-is-root]': 'isRoot()',\n '[attr.data-ng-doc-expandable]': 'expandable()',\n '[attr.data-ng-doc-expanded]': 'isExpanded()',\n },\n})\nexport class NgDocSidebarCategoryComponent {\n /** The category. */\n readonly category = input.required<NgDocNavigation>();\n\n /** Whether the category sits at the top level of the sidebar. */\n readonly isRoot = input<boolean, unknown>(false, { transform: booleanAttribute });\n\n /** The pages and categories inside the category. */\n readonly content = input<NgDocContent>('');\n\n /** Whether the reader can collapse the category. A category that cannot is always open. */\n readonly expandable = input<boolean, unknown>(true, { transform: booleanAttribute });\n\n /** Whether the category starts open. */\n readonly expanded = input<boolean, unknown>(true, { transform: booleanAttribute });\n\n /** Whether the category is open: it starts from `expanded` and follows the reader. */\n readonly isExpanded = linkedSignal(() => this.expanded() || !this.expandable());\n\n /** Id of the element that holds the pages, for the header's `aria-controls`. */\n protected readonly childrenId = `ng-doc-sidebar-category-${nextId++}`;\n\n constructor() {\n const router = inject(Router);\n\n router.events\n .pipe(\n filter((event) => event instanceof NavigationEnd),\n takeUntilDestroyed(),\n )\n .subscribe(() => {\n const route: string = this.category().route ?? '';\n\n if (router.url.includes(route)) {\n this.expand();\n }\n });\n }\n\n /** Opens the category if it is open, or closes it otherwise. */\n toggle(): void {\n this.isExpanded() ? this.collapse() : this.expand();\n }\n\n /** Opens the category. */\n expand(): void {\n if (this.expandable()) {\n this.isExpanded.set(true);\n }\n }\n\n /** Closes the category, unless it cannot be collapsed. */\n collapse(): void {\n if (this.expandable()) {\n this.isExpanded.set(false);\n }\n }\n}\n","@if (expandable()) {\n <button\n type=\"button\"\n class=\"ng-doc-sidebar-category-button\"\n [attr.aria-expanded]=\"isExpanded()\"\n [attr.aria-controls]=\"childrenId\"\n (click)=\"toggle()\">\n <span class=\"ng-doc-sidebar-category-title\">{{ category().title }}</span>\n <svg\n class=\"ng-doc-sidebar-category-chevron\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </button>\n} @else {\n <div class=\"ng-doc-sidebar-category-button\">\n <span class=\"ng-doc-sidebar-category-title\">{{ category().title }}</span>\n </div>\n}\n<ng-doc-expander [expanded]=\"isExpanded()\" [content]=\"contentTemplate\" collapseMod=\"hide\" />\n<ng-template #contentTemplate>\n <!-- The content comes through a template, so the child components keep their state. -->\n <div class=\"ng-doc-sidebar-category-children\" [id]=\"childrenId\">\n <ng-content></ng-content>\n <ng-container *polymorpheusOutlet=\"content() as text\">{{ text }}</ng-container>\n </div>\n</ng-template>\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n} from '@angular/core';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport { NgDocNavigation } from '@ng-doc/app/interfaces';\nimport { NgDocColor } from '@ng-doc/ui-kit';\n\n/** A status badge of a sidebar item, from the page's JSDoc status tag. */\nexport interface NgDocSidebarItemStatus {\n /** Colour of the badge. */\n type: NgDocColor;\n /** Text of the badge, in sentence case. */\n text: string;\n}\n\n/**\n * A page link in the sidebar, with the status badges of the page.\n */\n@Component({\n selector: 'ng-doc-sidebar-item',\n templateUrl: './sidebar-item.component.html',\n styleUrls: ['./sidebar-item.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [RouterLinkActive, RouterLink],\n host: {\n '[attr.data-ng-doc-is-root]': 'isRoot()',\n },\n})\nexport class NgDocSidebarItemComponent {\n /** The page. */\n readonly item = input.required<NgDocNavigation>();\n\n /** Whether the page sits at the top level of the sidebar, beside the categories. */\n readonly isRoot = input<boolean, unknown>(false, { transform: booleanAttribute });\n\n /**\n * The badges of the page: one per JSDoc status tag, in the tag's colour (green without one)\n * and with its text in sentence case.\n */\n readonly statuses = computed<NgDocSidebarItemStatus[]>(() => {\n const statuses: string[] = this.item().metadata?.tags['status'] ?? [];\n\n return statuses.map((status: string) => {\n // The tag reads `:<colour> <text>`; a tag without the colour is all text.\n const [type, text = ''] = status.startsWith(':')\n ? status.slice(1).split(/\\s+(.+)/)\n : ['', status];\n\n return { type: (type || 'success') as NgDocColor, text: sentenceCase(text) };\n });\n });\n}\n\n/**\n * Writes a badge text in sentence case (\"NEW STYLES\" becomes \"New styles\").\n * @param text - The text of the status tag.\n * @returns The text in sentence case.\n */\nfunction sentenceCase(text: string): string {\n const lower: string = text.trim().toLowerCase();\n\n return lower.charAt(0).toUpperCase() + lower.slice(1);\n}\n","<a\n class=\"ng-doc-sidebar-link\"\n [routerLink]=\"[item().route]\"\n routerLinkActive=\"active\"\n ariaCurrentWhenActive=\"page\">\n <span class=\"ng-doc-sidebar-link-title\">{{ item().title }}</span>\n @for (status of statuses(); track $index) {\n <span class=\"ng-doc-sidebar-status\" [attr.data-ng-doc-color]=\"status.type\">{{\n status.text\n }}</span>\n }\n</a>\n","import { Location, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { NgDocNavigation } from '@ng-doc/app/interfaces';\nimport { NG_DOC_CONTEXT } from '@ng-doc/app/tokens';\nimport { NgDocBindPipe, NgDocExecutePipe } from '@ng-doc/ui-kit';\n\nimport { NgDocSidebarCategoryComponent } from './sidebar-category/sidebar-category.component';\nimport { NgDocSidebarItemComponent } from './sidebar-item/sidebar-item.component';\n\n@Component({\n selector: 'ng-doc-sidebar',\n templateUrl: './sidebar.component.html',\n styleUrls: ['./sidebar.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgTemplateOutlet,\n NgDocSidebarCategoryComponent,\n NgDocSidebarItemComponent,\n NgDocExecutePipe,\n NgDocBindPipe,\n ],\n})\nexport class NgDocSidebarComponent {\n protected readonly location = inject(Location);\n protected readonly context = inject(NG_DOC_CONTEXT);\n\n getNavigation(nav?: NgDocNavigation): NgDocNavigation[] {\n return nav ? nav.children ?? [] : this.context.navigation;\n }\n\n matchRoute(route: string): boolean {\n return this.location.path().includes(route ?? '', 0);\n }\n}\n","<nav class=\"ng-doc-side-bar-wrapper\" aria-label=\"Documentation\">\n @for (item of getNavigation | bind: this | execute; track item) {\n <ng-container\n *ngTemplateOutlet=\"sidebarTemplate; context: { item: item, root: true }\"></ng-container>\n }\n\n <ng-template let-item=\"item\" let-root=\"root\" #sidebarTemplate>\n @if (item.children?.length) {\n @if (!item.hidden) {\n <ng-doc-sidebar-category\n [category]=\"item\"\n [expandable]=\"!!item?.expandable\"\n [expanded]=\"\n !!item?.expanded || !item?.expandable || (matchRoute | bind: this | execute: item.route)\n \"\n [isRoot]=\"!!root\"\n [content]=\"categoryContent\">\n </ng-doc-sidebar-category>\n }\n <ng-template #categoryContent>\n @for (child of getNavigation | bind: this | execute: item; track child) {\n <ng-container\n *ngTemplateOutlet=\"\n sidebarTemplate;\n context: { item: child, root: false }\n \"></ng-container>\n }\n </ng-template>\n } @else {\n @if (!item.hidden) {\n <ng-doc-sidebar-item [item]=\"item\" [isRoot]=\"!!root\"></ng-doc-sidebar-item>\n }\n }\n </ng-template>\n</nav>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAeA,IAAI,MAAM,GAAG,CAAC;AAEd;;;;AAIG;MAaU,6BAA6B,CAAA;AAsBxC,IAAA,WAAA,GAAA;;QApBS,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,QAAQ;qFAAmB;;QAG5C,IAAA,CAAA,MAAM,GAAG,KAAK,CAAmB,KAAK,8EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;QAGxE,IAAA,CAAA,OAAO,GAAG,KAAK,CAAe,EAAE;oFAAC;;QAGjC,IAAA,CAAA,UAAU,GAAG,KAAK,CAAmB,IAAI,kFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;QAG3E,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAmB,IAAI,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAGzE,QAAA,IAAA,CAAA,UAAU,GAAG,YAAY,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;uFAAC;;AAG5D,QAAA,IAAA,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BAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAChB,6BAA6B,EAAA,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,SAAA,EAAA,YAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAC7B,yBAAyB,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EACzB,gBAAgB,EAAA,IAAA,EAAA,SAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAChB,aAAa,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGJ,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAbjC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,EAAA,eAAA,EAGT,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACP,gBAAgB;wBAChB,6BAA6B;wBAC7B,yBAAyB;wBACzB,gBAAgB;wBAChB,aAAa;AACd,qBAAA,EAAA,QAAA,EAAA,yvCAAA,EAAA,MAAA,EAAA,CAAA,m+BAAA,CAAA,EAAA;;;AEpBH;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-doc-app-components-sidebar.mjs","sources":["../../../../libs/app/components/sidebar/sidebar-category/sidebar-category.component.ts","../../../../libs/app/components/sidebar/sidebar-category/sidebar-category.component.html","../../../../libs/app/components/sidebar/sidebar-item/sidebar-item.component.ts","../../../../libs/app/components/sidebar/sidebar-item/sidebar-item.component.html","../../../../libs/app/components/sidebar/sidebar.component.ts","../../../../libs/app/components/sidebar/sidebar.component.html","../../../../libs/app/components/sidebar/ng-doc-app-components-sidebar.ts"],"sourcesContent":["import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n inject,\n input,\n linkedSignal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NavigationEnd, Router } from '@angular/router';\nimport { NgDocNavigation } from '@ng-doc/app/interfaces';\nimport { NgDocContent, NgDocExpanderComponent } from '@ng-doc/ui-kit';\nimport { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';\nimport { filter } from 'rxjs/operators';\n\nlet nextId = 0;\n\n/**\n * A category of the sidebar: a header row that expands and collapses the pages below it.\n *\n * An expandable category opens by itself when the reader navigates to one of its pages.\n */\n@Component({\n selector: 'ng-doc-sidebar-category',\n templateUrl: './sidebar-category.component.html',\n styleUrls: ['./sidebar-category.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgDocExpanderComponent, PolymorpheusOutlet],\n host: {\n '[attr.data-ng-doc-is-root]': 'isRoot()',\n '[attr.data-ng-doc-expandable]': 'expandable()',\n '[attr.data-ng-doc-expanded]': 'isExpanded()',\n },\n})\nexport class NgDocSidebarCategoryComponent {\n /** The category. */\n readonly category = input.required<NgDocNavigation>();\n\n /** Whether the category sits at the top level of the sidebar. */\n readonly isRoot = input<boolean, unknown>(false, { transform: booleanAttribute });\n\n /** The pages and categories inside the category. */\n readonly content = input<NgDocContent>('');\n\n /** Whether the reader can collapse the category. A category that cannot is always open. */\n readonly expandable = input<boolean, unknown>(true, { transform: booleanAttribute });\n\n /** Whether the category starts open. */\n readonly expanded = input<boolean, unknown>(true, { transform: booleanAttribute });\n\n /** Whether the category is open: it starts from `expanded` and follows the reader. */\n readonly isExpanded = linkedSignal(() => this.expanded() || !this.expandable());\n\n /** Id of the element that holds the pages, for the header's `aria-controls`. */\n protected readonly childrenId = `ng-doc-sidebar-category-${nextId++}`;\n\n constructor() {\n const router = inject(Router);\n\n router.events\n .pipe(\n filter((event) => event instanceof NavigationEnd),\n takeUntilDestroyed(),\n )\n .subscribe(() => {\n const route: string = this.category().route ?? '';\n\n if (router.url.includes(route)) {\n this.expand();\n }\n });\n }\n\n /** Opens the category if it is open, or closes it otherwise. */\n toggle(): void {\n this.isExpanded() ? this.collapse() : this.expand();\n }\n\n /** Opens the category. */\n expand(): void {\n if (this.expandable()) {\n this.isExpanded.set(true);\n }\n }\n\n /** Closes the category, unless it cannot be collapsed. */\n collapse(): void {\n if (this.expandable()) {\n this.isExpanded.set(false);\n }\n }\n}\n","@if (expandable()) {\n <button\n type=\"button\"\n class=\"ng-doc-sidebar-category-button\"\n [attr.aria-expanded]=\"isExpanded()\"\n [attr.aria-controls]=\"childrenId\"\n (click)=\"toggle()\">\n <span class=\"ng-doc-sidebar-category-title\">{{ category().title }}</span>\n <svg\n class=\"ng-doc-sidebar-category-chevron\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </button>\n} @else {\n <div class=\"ng-doc-sidebar-category-button\">\n <span class=\"ng-doc-sidebar-category-title\">{{ category().title }}</span>\n </div>\n}\n<ng-doc-expander [expanded]=\"isExpanded()\" [content]=\"contentTemplate\" collapseMod=\"hide\" />\n<ng-template #contentTemplate>\n <!-- The content comes through a template, so the child components keep their state. -->\n <div class=\"ng-doc-sidebar-category-children\" [id]=\"childrenId\">\n <ng-content></ng-content>\n <ng-container *polymorpheusOutlet=\"content() as text\">{{ text }}</ng-container>\n </div>\n</ng-template>\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n} from '@angular/core';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport { NgDocNavigation } from '@ng-doc/app/interfaces';\nimport { NgDocColor } from '@ng-doc/ui-kit';\n\n/** A status badge of a sidebar item, from the page's JSDoc status tag. */\nexport interface NgDocSidebarItemStatus {\n /** Colour of the badge. */\n type: NgDocColor;\n /** Text of the badge, in sentence case. */\n text: string;\n}\n\n/**\n * A page link in the sidebar, with the status badges of the page.\n */\n@Component({\n selector: 'ng-doc-sidebar-item',\n templateUrl: './sidebar-item.component.html',\n styleUrls: ['./sidebar-item.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [RouterLinkActive, RouterLink],\n host: {\n '[attr.data-ng-doc-is-root]': 'isRoot()',\n },\n})\nexport class NgDocSidebarItemComponent {\n /** The page. */\n readonly item = input.required<NgDocNavigation>();\n\n /** Whether the page sits at the top level of the sidebar, beside the categories. */\n readonly isRoot = input<boolean, unknown>(false, { transform: booleanAttribute });\n\n /**\n * The badges of the page: one per JSDoc status tag, in the tag's colour (green without one)\n * and with its text in sentence case.\n */\n readonly statuses = computed<NgDocSidebarItemStatus[]>(() => {\n const statuses: string[] = this.item().metadata?.tags['status'] ?? [];\n\n return statuses.map((status: string) => {\n // The tag reads `:<colour> <text>`; a tag without the colour is all text.\n const [type, text = ''] = status.startsWith(':')\n ? status.slice(1).split(/\\s+(.+)/)\n : ['', status];\n\n return { type: (type || 'success') as NgDocColor, text: sentenceCase(text) };\n });\n });\n}\n\n/**\n * Writes a badge text in sentence case (\"NEW STYLES\" becomes \"New styles\").\n * @param text - The text of the status tag.\n * @returns The text in sentence case.\n */\nfunction sentenceCase(text: string): string {\n const lower: string = text.trim().toLowerCase();\n\n return lower.charAt(0).toUpperCase() + lower.slice(1);\n}\n","<a\n class=\"ng-doc-sidebar-link\"\n [routerLink]=\"[item().route]\"\n routerLinkActive=\"active\"\n ariaCurrentWhenActive=\"page\">\n <span class=\"ng-doc-sidebar-link-title\">{{ item().title }}</span>\n @for (status of statuses(); track $index) {\n <span class=\"ng-doc-sidebar-status\" [attr.data-ng-doc-color]=\"status.type\">{{\n status.text\n }}</span>\n }\n</a>\n","import { Location, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { NgDocNavigation, NgDocNavigationTexts } from '@ng-doc/app/interfaces';\nimport { NG_DOC_CONTEXT, NG_DOC_TEXTS } from '@ng-doc/app/tokens';\nimport { NgDocBindPipe, NgDocExecutePipe } from '@ng-doc/ui-kit';\n\nimport { NgDocSidebarCategoryComponent } from './sidebar-category/sidebar-category.component';\nimport { NgDocSidebarItemComponent } from './sidebar-item/sidebar-item.component';\n\n@Component({\n selector: 'ng-doc-sidebar',\n templateUrl: './sidebar.component.html',\n styleUrls: ['./sidebar.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgTemplateOutlet,\n NgDocSidebarCategoryComponent,\n NgDocSidebarItemComponent,\n NgDocExecutePipe,\n NgDocBindPipe,\n ],\n})\nexport class NgDocSidebarComponent {\n protected readonly texts: NgDocNavigationTexts = inject(NG_DOC_TEXTS).navigation;\n\n protected readonly location = inject(Location);\n protected readonly context = inject(NG_DOC_CONTEXT);\n\n getNavigation(nav?: NgDocNavigation): NgDocNavigation[] {\n return nav ? nav.children ?? [] : this.context.navigation;\n }\n\n matchRoute(route: string): boolean {\n return this.location.path().includes(route ?? '', 0);\n }\n}\n","<nav class=\"ng-doc-side-bar-wrapper\" [attr.aria-label]=\"texts.sidebar\">\n @for (item of getNavigation | bind: this | execute; track item) {\n <ng-container\n *ngTemplateOutlet=\"sidebarTemplate; context: { item: item, root: true }\"></ng-container>\n }\n\n <ng-template let-item=\"item\" let-root=\"root\" #sidebarTemplate>\n @if (item.children?.length) {\n @if (!item.hidden) {\n <ng-doc-sidebar-category\n [category]=\"item\"\n [expandable]=\"!!item?.expandable\"\n [expanded]=\"\n !!item?.expanded || !item?.expandable || (matchRoute | bind: this | execute: item.route)\n \"\n [isRoot]=\"!!root\"\n [content]=\"categoryContent\">\n </ng-doc-sidebar-category>\n }\n <ng-template #categoryContent>\n @for (child of getNavigation | bind: this | execute: item; track child) {\n <ng-container\n *ngTemplateOutlet=\"\n sidebarTemplate;\n context: { item: child, root: false }\n \"></ng-container>\n }\n </ng-template>\n } @else {\n @if (!item.hidden) {\n <ng-doc-sidebar-item [item]=\"item\" [isRoot]=\"!!root\"></ng-doc-sidebar-item>\n }\n }\n </ng-template>\n</nav>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAeA,IAAI,MAAM,GAAG,CAAC;AAEd;;;;AAIG;MAaU,6BAA6B,CAAA;AAsBxC,IAAA,WAAA,GAAA;;QApBS,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,QAAQ;qFAAmB;;QAG5C,IAAA,CAAA,MAAM,GAAG,KAAK,CAAmB,KAAK,8EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;QAGxE,IAAA,CAAA,OAAO,GAAG,KAAK,CAAe,EAAE;oFAAC;;QAGjC,IAAA,CAAA,UAAU,GAAG,KAAK,CAAmB,IAAI,kFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;QAG3E,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAmB,IAAI,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAGzE,QAAA,IAAA,CAAA,UAAU,GAAG,YAAY,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;uFAAC;;AAG5D,QAAA,IAAA,CAAA,UAAU,GAAG,CAAA,wBAAA,EAA2B,MAAM,EAAE,EAAE;AAGnE,QAAA,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAE7B,QAAA,MAAM,CAAC;AACJ,aAAA,IAAI,CACH,MAAM,CAAC,CAAC,KAAK,KAAK,KAAK,YAAY,aAAa,CAAC,EACjD,kBAAkB,EAAE;aAErB,SAAS,CAAC,MAAK;YACd,MAAM,KAAK,GAAW,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,IAAI,EAAE;YAEjD,IAAI,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;gBAC9B,IAAI,CA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