@ng-doc/app 17.1.3 → 17.2.1

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 (104) hide show
  1. package/components/page/page.component.d.ts +4 -3
  2. package/components/page-link/page-link.component.d.ts +3 -3
  3. package/components/toc/toc-element/toc-element.component.d.ts +1 -2
  4. package/components/toc/toc.component.d.ts +5 -4
  5. package/esm2022/components/api-list/api-list.component.mjs +3 -3
  6. package/esm2022/components/breadcrumb/breadcrumb.component.mjs +3 -3
  7. package/esm2022/components/code/code.component.mjs +5 -7
  8. package/esm2022/components/demo/demo.component.mjs +3 -3
  9. package/esm2022/components/demo-displayer/demo-displayer.component.mjs +3 -3
  10. package/esm2022/components/demo-pane/demo-pane.component.mjs +3 -3
  11. package/esm2022/components/fullscreen-button/fullscreen-button.component.mjs +3 -3
  12. package/esm2022/components/kind-icon/kind-icon.component.mjs +3 -3
  13. package/esm2022/components/link/link.component.mjs +3 -3
  14. package/esm2022/components/navbar/navbar.component.mjs +17 -15
  15. package/esm2022/components/page/page.component.mjs +15 -18
  16. package/esm2022/components/page-link/page-link.component.mjs +10 -9
  17. package/esm2022/components/page-navigation/page-navigation.component.mjs +3 -3
  18. package/esm2022/components/playground/base-playground.mjs +3 -3
  19. package/esm2022/components/playground/playground-demo/playground-demo.component.mjs +3 -3
  20. package/esm2022/components/playground/playground-properties/playground-properties.component.mjs +3 -3
  21. package/esm2022/components/playground/playground-property/playground-property.component.mjs +3 -3
  22. package/esm2022/components/playground/playground.component.mjs +3 -3
  23. package/esm2022/components/root/root.component.mjs +9 -9
  24. package/esm2022/components/search/search.component.mjs +3 -3
  25. package/esm2022/components/search-result/search-result.component.mjs +3 -3
  26. package/esm2022/components/sidebar/sidebar-category/sidebar-category.component.mjs +3 -3
  27. package/esm2022/components/sidebar/sidebar-item/sidebar-item.component.mjs +3 -3
  28. package/esm2022/components/sidebar/sidebar.component.mjs +5 -5
  29. package/esm2022/components/tabs/tabs.component.mjs +3 -3
  30. package/esm2022/components/theme-toggle/theme-toggle.component.mjs +3 -3
  31. package/esm2022/components/toc/toc-element/toc-element.component.mjs +8 -8
  32. package/esm2022/components/toc/toc.component.mjs +43 -39
  33. package/esm2022/directives/code-highlighter/code-highlighter.directive.mjs +3 -3
  34. package/esm2022/directives/route-active/route-active.directive.mjs +3 -3
  35. package/esm2022/helpers/create-component.mjs +1 -2
  36. package/esm2022/interfaces/page-processor.mjs +1 -1
  37. package/esm2022/pipes/extract-value/extract-value.pipe.mjs +3 -3
  38. package/esm2022/pipes/filter-by-text/filter-by-text.pipe.mjs +3 -3
  39. package/esm2022/pipes/sanitize-html/sanitize-html.pipe.mjs +3 -3
  40. package/esm2022/processors/page-processor/page-processor.directive.mjs +19 -13
  41. package/esm2022/processors/processors/icon.processor.mjs +2 -2
  42. package/esm2022/processors/processors/tabs.processor.mjs +5 -3
  43. package/esm2022/processors/processors/tooltip.processor.mjs +3 -3
  44. package/esm2022/providers/ng-doc-app/provide-ng-doc-app.mjs +5 -5
  45. package/esm2022/services/sidebar/sidebar.service.mjs +3 -3
  46. package/esm2022/services/store/store.service.mjs +13 -7
  47. package/esm2022/services/theme/theme.service.mjs +12 -9
  48. package/esm2022/type-controls/boolean-control/boolean-control.component.mjs +3 -3
  49. package/esm2022/type-controls/number-control/number-control.component.mjs +3 -3
  50. package/esm2022/type-controls/string-control/string-control.component.mjs +3 -3
  51. package/esm2022/type-controls/type-alias-control/type-alias-control.component.mjs +3 -3
  52. package/fesm2022/ng-doc-app-components-api-list.mjs +3 -3
  53. package/fesm2022/ng-doc-app-components-breadcrumb.mjs +3 -3
  54. package/fesm2022/ng-doc-app-components-code.mjs +4 -6
  55. package/fesm2022/ng-doc-app-components-code.mjs.map +1 -1
  56. package/fesm2022/ng-doc-app-components-demo-displayer.mjs +3 -3
  57. package/fesm2022/ng-doc-app-components-demo-pane.mjs +3 -3
  58. package/fesm2022/ng-doc-app-components-demo.mjs +3 -3
  59. package/fesm2022/ng-doc-app-components-fullscreen-button.mjs +3 -3
  60. package/fesm2022/ng-doc-app-components-kind-icon.mjs +3 -3
  61. package/fesm2022/ng-doc-app-components-link.mjs +3 -3
  62. package/fesm2022/ng-doc-app-components-navbar.mjs +16 -14
  63. package/fesm2022/ng-doc-app-components-navbar.mjs.map +1 -1
  64. package/fesm2022/ng-doc-app-components-page-link.mjs +9 -8
  65. package/fesm2022/ng-doc-app-components-page-link.mjs.map +1 -1
  66. package/fesm2022/ng-doc-app-components-page-navigation.mjs +3 -3
  67. package/fesm2022/ng-doc-app-components-page.mjs +14 -17
  68. package/fesm2022/ng-doc-app-components-page.mjs.map +1 -1
  69. package/fesm2022/ng-doc-app-components-playground.mjs +15 -15
  70. package/fesm2022/ng-doc-app-components-root.mjs +9 -9
  71. package/fesm2022/ng-doc-app-components-search-result.mjs +3 -3
  72. package/fesm2022/ng-doc-app-components-search.mjs +3 -3
  73. package/fesm2022/ng-doc-app-components-sidebar.mjs +10 -10
  74. package/fesm2022/ng-doc-app-components-sidebar.mjs.map +1 -1
  75. package/fesm2022/ng-doc-app-components-tabs.mjs +3 -3
  76. package/fesm2022/ng-doc-app-components-theme-toggle.mjs +3 -3
  77. package/fesm2022/ng-doc-app-components-toc.mjs +48 -44
  78. package/fesm2022/ng-doc-app-components-toc.mjs.map +1 -1
  79. package/fesm2022/ng-doc-app-directives-code-highlighter.mjs +3 -3
  80. package/fesm2022/ng-doc-app-directives-route-active.mjs +3 -3
  81. package/fesm2022/ng-doc-app-helpers.mjs +0 -1
  82. package/fesm2022/ng-doc-app-helpers.mjs.map +1 -1
  83. package/fesm2022/ng-doc-app-pipes-extract-value.mjs +3 -3
  84. package/fesm2022/ng-doc-app-pipes-filter-by-text.mjs +3 -3
  85. package/fesm2022/ng-doc-app-pipes-sanitize-html.mjs +3 -3
  86. package/fesm2022/ng-doc-app-processors-page-processor.mjs +18 -12
  87. package/fesm2022/ng-doc-app-processors-page-processor.mjs.map +1 -1
  88. package/fesm2022/ng-doc-app-processors-processors.mjs +9 -8
  89. package/fesm2022/ng-doc-app-processors-processors.mjs.map +1 -1
  90. package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs +4 -4
  91. package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs.map +1 -1
  92. package/fesm2022/ng-doc-app-services-sidebar.mjs +3 -3
  93. package/fesm2022/ng-doc-app-services-store.mjs +12 -6
  94. package/fesm2022/ng-doc-app-services-store.mjs.map +1 -1
  95. package/fesm2022/ng-doc-app-services-theme.mjs +11 -8
  96. package/fesm2022/ng-doc-app-services-theme.mjs.map +1 -1
  97. package/fesm2022/ng-doc-app-type-controls-boolean-control.mjs +3 -3
  98. package/fesm2022/ng-doc-app-type-controls-number-control.mjs +3 -3
  99. package/fesm2022/ng-doc-app-type-controls-string-control.mjs +3 -3
  100. package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs +3 -3
  101. package/interfaces/page-processor.d.ts +3 -2
  102. package/package.json +3 -3
  103. package/processors/page-processor/page-processor.directive.d.ts +7 -6
  104. package/services/store/store.service.d.ts +1 -0
@@ -3,7 +3,7 @@ import { APP_INITIALIZER, Optional } from '@angular/core';
3
3
  import { NG_DOC_NIGHT_THEME, NG_DOC_STORE_THEME_KEY } from '@ng-doc/app/constants';
4
4
  import { NgDocThemeService, NgDocStoreService } from '@ng-doc/app/services';
5
5
  import { NG_DOC_THEME, NG_DOC_DEFAULT_THEME_ID } from '@ng-doc/app/tokens';
6
- import { asArray } from '@ng-doc/core';
6
+ import { asArray, isBrowser } from '@ng-doc/core';
7
7
  import { provideNgDocUiKitConfig } from '@ng-doc/ui-kit';
8
8
 
9
9
  /**
@@ -27,13 +27,13 @@ function provideNgDocApp(config) {
27
27
  {
28
28
  provide: APP_INITIALIZER,
29
29
  useFactory: (themeService, store, defaultThemeId) => {
30
- return () => {
31
- const savedThemeId = store.get(NG_DOC_STORE_THEME_KEY);
30
+ return async () => {
31
+ const savedThemeId = isBrowser ? store.get(NG_DOC_STORE_THEME_KEY) : null;
32
32
  if ((defaultThemeId === 'auto' && !savedThemeId) ||
33
33
  savedThemeId === NgDocThemeService.autoThemeId) {
34
34
  return themeService.enableAutoTheme(undefined, NG_DOC_NIGHT_THEME);
35
35
  }
36
- else {
36
+ else if (isBrowser) {
37
37
  return themeService.set(savedThemeId ?? defaultThemeId, false);
38
38
  }
39
39
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ng-doc-app-providers-ng-doc-app.mjs","sources":["../../../../libs/app/providers/ng-doc-app/provide-ng-doc-app.ts","../../../../libs/app/providers/ng-doc-app/ng-doc-app-providers-ng-doc-app.ts"],"sourcesContent":["import { ViewportScroller } from '@angular/common';\nimport { APP_INITIALIZER, Optional, Provider } from '@angular/core';\nimport { NG_DOC_NIGHT_THEME, NG_DOC_STORE_THEME_KEY } from '@ng-doc/app/constants';\nimport { NgDocTheme } from '@ng-doc/app/interfaces';\nimport { NgDocStoreService, NgDocThemeService } from '@ng-doc/app/services';\nimport { NG_DOC_DEFAULT_THEME_ID, NG_DOC_THEME } from '@ng-doc/app/tokens';\nimport { asArray } from '@ng-doc/core';\nimport { NgDocUiConfig, provideNgDocUiKitConfig } from '@ng-doc/ui-kit';\n\n/**\n * NgDoc application config.\n */\nexport interface NgDocApplicationConfig {\n\t/**\n\t * List of themes that will be registered in the application and can be used via `NgDocThemeService`.\n\t */\n\tthemes?: NgDocTheme[];\n\n\t/**\n\t * Default theme id.\n\t * You can use `auto` to automatically select the theme based on the user's operating system settings.\n\t */\n\tdefaultThemeId?: string | 'auto';\n\n\t/**\n\t * UI Kit configuration.\n\t */\n\tuiKit?: NgDocUiConfig;\n}\n\n/**\n * Provides the NgDoc application configuration.\n * @param config - The optional application configuration.\n */\nexport function provideNgDocApp(config?: NgDocApplicationConfig): Provider[] {\n\treturn [\n\t\t/* --- Themes --- */\n\t\t{ provide: NG_DOC_THEME, useValue: NG_DOC_NIGHT_THEME, multi: true },\n\t\t...asArray(config?.themes).map((theme: NgDocTheme) => ({\n\t\t\tprovide: NG_DOC_THEME,\n\t\t\tuseValue: theme,\n\t\t\tmulti: true,\n\t\t})),\n\t\t...asArray(config?.defaultThemeId).map((themeId: string) => ({\n\t\t\tprovide: NG_DOC_DEFAULT_THEME_ID,\n\t\t\tuseValue: themeId,\n\t\t})),\n\n\t\t/* --- Theme Initializer--- */\n\t\t{\n\t\t\tprovide: APP_INITIALIZER,\n\t\t\tuseFactory: (\n\t\t\t\tthemeService: NgDocThemeService,\n\t\t\t\tstore: NgDocStoreService,\n\t\t\t\tdefaultThemeId: string | 'auto',\n\t\t\t) => {\n\t\t\t\treturn () => {\n\t\t\t\t\tconst savedThemeId: string | null = store.get(NG_DOC_STORE_THEME_KEY);\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t(defaultThemeId === 'auto' && !savedThemeId) ||\n\t\t\t\t\t\tsavedThemeId === NgDocThemeService.autoThemeId\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn themeService.enableAutoTheme(undefined, NG_DOC_NIGHT_THEME);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn themeService.set(savedThemeId ?? defaultThemeId, false);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\t\t\tmulti: true,\n\t\t\tdeps: [NgDocThemeService, NgDocStoreService, [new Optional(), NG_DOC_DEFAULT_THEME_ID]],\n\t\t},\n\n\t\t/* --- Viewport Scroller --- */\n\t\t{\n\t\t\tprovide: APP_INITIALIZER,\n\t\t\tmulti: true,\n\t\t\tdeps: [ViewportScroller],\n\t\t\tuseFactory: (viewportScroller: ViewportScroller) => {\n\t\t\t\treturn () => viewportScroller.setOffset([0, 64]);\n\t\t\t},\n\t\t},\n\n\t\t/* --- UiKit --- */\n\t\t...provideNgDocUiKitConfig(config?.uiKit),\n\t];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AA8BA;;;AAGG;AACG,SAAU,eAAe,CAAC,MAA+B,EAAA;IAC9D,OAAO;;QAEN,EAAE,OAAO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B,CAAC;AACxB,YAAA,UAAU,EAAE,CAAC,gBAAkC,KAAI;AAClD,gBAAA,OAAO,MAAM,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;aACjD;AACD,SAAA;;AAGD,QAAA,GAAG,uBAAuB,CAAC,MAAM,EAAE,KAAK,CAAC;KACzC,CAAC;AACH;;ACtFA;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-doc-app-providers-ng-doc-app.mjs","sources":["../../../../libs/app/providers/ng-doc-app/provide-ng-doc-app.ts","../../../../libs/app/providers/ng-doc-app/ng-doc-app-providers-ng-doc-app.ts"],"sourcesContent":["import { ViewportScroller } from '@angular/common';\nimport { APP_INITIALIZER, Optional, Provider } from '@angular/core';\nimport { NG_DOC_NIGHT_THEME, NG_DOC_STORE_THEME_KEY } from '@ng-doc/app/constants';\nimport { NgDocTheme } from '@ng-doc/app/interfaces';\nimport { NgDocStoreService, NgDocThemeService } from '@ng-doc/app/services';\nimport { NG_DOC_DEFAULT_THEME_ID, NG_DOC_THEME } from '@ng-doc/app/tokens';\nimport { asArray, isBrowser } from '@ng-doc/core';\nimport { NgDocUiConfig, provideNgDocUiKitConfig } from '@ng-doc/ui-kit';\n\n/**\n * NgDoc application config.\n */\nexport interface NgDocApplicationConfig {\n\t/**\n\t * List of themes that will be registered in the application and can be used via `NgDocThemeService`.\n\t */\n\tthemes?: NgDocTheme[];\n\n\t/**\n\t * Default theme id.\n\t * You can use `auto` to automatically select the theme based on the user's operating system settings.\n\t */\n\tdefaultThemeId?: string | 'auto';\n\n\t/**\n\t * UI Kit configuration.\n\t */\n\tuiKit?: NgDocUiConfig;\n}\n\n/**\n * Provides the NgDoc application configuration.\n * @param config - The optional application configuration.\n */\nexport function provideNgDocApp(config?: NgDocApplicationConfig): Provider[] {\n\treturn [\n\t\t/* --- Themes --- */\n\t\t{ provide: NG_DOC_THEME, useValue: NG_DOC_NIGHT_THEME, multi: true },\n\t\t...asArray(config?.themes).map((theme: NgDocTheme) => ({\n\t\t\tprovide: NG_DOC_THEME,\n\t\t\tuseValue: theme,\n\t\t\tmulti: true,\n\t\t})),\n\t\t...asArray(config?.defaultThemeId).map((themeId: string) => ({\n\t\t\tprovide: NG_DOC_DEFAULT_THEME_ID,\n\t\t\tuseValue: themeId,\n\t\t})),\n\n\t\t/* --- Theme Initializer--- */\n\t\t{\n\t\t\tprovide: APP_INITIALIZER,\n\t\t\tuseFactory: (\n\t\t\t\tthemeService: NgDocThemeService,\n\t\t\t\tstore: NgDocStoreService,\n\t\t\t\tdefaultThemeId: string | 'auto',\n\t\t\t) => {\n\t\t\t\treturn async () => {\n\t\t\t\t\tconst savedThemeId: string | null = isBrowser ? store.get(NG_DOC_STORE_THEME_KEY) : null;\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t(defaultThemeId === 'auto' && !savedThemeId) ||\n\t\t\t\t\t\tsavedThemeId === NgDocThemeService.autoThemeId\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn themeService.enableAutoTheme(undefined, NG_DOC_NIGHT_THEME);\n\t\t\t\t\t} else if (isBrowser) {\n\t\t\t\t\t\treturn themeService.set(savedThemeId ?? defaultThemeId, false);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\t\t\tmulti: true,\n\t\t\tdeps: [NgDocThemeService, NgDocStoreService, [new Optional(), NG_DOC_DEFAULT_THEME_ID]],\n\t\t},\n\n\t\t/* --- Viewport Scroller --- */\n\t\t{\n\t\t\tprovide: APP_INITIALIZER,\n\t\t\tmulti: true,\n\t\t\tdeps: [ViewportScroller],\n\t\t\tuseFactory: (viewportScroller: ViewportScroller) => {\n\t\t\t\treturn () => viewportScroller.setOffset([0, 64]);\n\t\t\t},\n\t\t},\n\n\t\t/* --- UiKit --- */\n\t\t...provideNgDocUiKitConfig(config?.uiKit),\n\t];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AA8BA;;;AAGG;A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vF,SAAA;;AAGD,QAAA;AACC,YAAA,OAAO,EAAE,eAAe;AACxB,YAAA,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,CAAC,gBAAgB,CAAC;AACxB,YAAA,UAAU,EAAE,CAAC,gBAAkC,KAAI;AAClD,gBAAA,OAAO,MAAM,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;aACjD;AACD,SAAA;;AAGD,QAAA,GAAG,uBAAuB,CAAC,MAAM,EAAE,KAAK,CAAC;KACzC,CAAC;AACH;;ACtFA;;AAEG;;;;"}
@@ -77,8 +77,8 @@ let NgDocSidebarService = class NgDocSidebarService {
77
77
  toggle() {
78
78
  this.expanded.value ? this.hide() : this.show();
79
79
  }
80
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: NgDocSidebarService, deps: [{ token: DOCUMENT }, { token: i1.BreakpointObserver }, { token: i2.Router }, { token: i3.NgDocScrollService }], target: i0.ɵɵFactoryTarget.Injectable }); }
81
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: NgDocSidebarService, providedIn: 'root' }); }
80
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocSidebarService, deps: [{ token: DOCUMENT }, { token: i1.BreakpointObserver }, { token: i2.Router }, { token: i3.NgDocScrollService }], target: i0.ɵɵFactoryTarget.Injectable }); }
81
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocSidebarService, providedIn: 'root' }); }
82
82
  };
83
83
  NgDocSidebarService = __decorate([
84
84
  UntilDestroy(),
@@ -87,7 +87,7 @@ NgDocSidebarService = __decorate([
87
87
  Router,
88
88
  NgDocScrollService])
89
89
  ], NgDocSidebarService);
90
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: NgDocSidebarService, decorators: [{
90
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocSidebarService, decorators: [{
91
91
  type: Injectable,
92
92
  args: [{
93
93
  providedIn: 'root',
@@ -1,18 +1,24 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable } from '@angular/core';
2
+ import { inject, Injectable } from '@angular/core';
3
+ import { LOCAL_STORAGE } from '@ng-web-apis/common';
3
4
 
4
5
  const DEFAULT_SERIALIZE = (v) => String(v);
5
6
  class NgDocStoreService {
7
+ constructor() {
8
+ this.localStorage = inject(LOCAL_STORAGE);
9
+ }
6
10
  set(key, data, serialize = DEFAULT_SERIALIZE) {
7
- return localStorage.setItem(key, serialize(data));
11
+ return this.localStorage.setItem(key, serialize(data));
8
12
  }
9
13
  get(key, deserialize) {
10
- return deserialize ? deserialize(localStorage.getItem(key)) : localStorage.getItem(key);
14
+ return deserialize
15
+ ? deserialize(this.localStorage.getItem(key))
16
+ : this.localStorage.getItem(key);
11
17
  }
12
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: NgDocStoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
13
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: NgDocStoreService, providedIn: 'root' }); }
18
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocStoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
19
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocStoreService, providedIn: 'root' }); }
14
20
  }
15
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: NgDocStoreService, decorators: [{
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocStoreService, decorators: [{
16
22
  type: Injectable,
17
23
  args: [{
18
24
  providedIn: 'root',
@@ -1 +1 @@
1
- {"version":3,"file":"ng-doc-app-services-store.mjs","sources":["../../../../libs/app/services/store/store.service.ts","../../../../libs/app/services/store/ng-doc-app-services-store.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\nconst DEFAULT_SERIALIZE: (v: unknown) => string = (v: unknown) => String(v);\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class NgDocStoreService {\n\tset(key: string, data: string): void;\n\tset<T>(key: string, data: T, serialize: (v: T) => string): void;\n\tset<T>(key: string, data: T, serialize: (v: T) => string = DEFAULT_SERIALIZE): void {\n\t\treturn localStorage.setItem(key, serialize(data));\n\t}\n\n\tget(key: string): string | null;\n\tget<T>(key: string, deserialize: (v: string | null) => T): T;\n\tget<T>(key: string, deserialize?: (v: string | null) => T): T | string | null {\n\t\treturn deserialize ? deserialize(localStorage.getItem(key)) : localStorage.getItem(key);\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA,MAAM,iBAAiB,GAA2B,CAAC,CAAU,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC;MAK/D,iBAAiB,CAAA;AAG7B,IAAA,GAAG,CAAI,GAAW,EAAE,IAAO,EAAE,YAA8B,iBAAiB,EAAA;QAC3E,OAAO,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;KAClD;IAID,GAAG,CAAI,GAAW,EAAE,WAAqC,EAAA;QACxD,OAAO,WAAW,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;KACxF;8GAXW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,cAFjB,MAAM,EAAA,CAAA,CAAA,EAAA;;2FAEN,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACX,oBAAA,UAAU,EAAE,MAAM;AAClB,iBAAA,CAAA;;;ACND;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-doc-app-services-store.mjs","sources":["../../../../libs/app/services/store/store.service.ts","../../../../libs/app/services/store/ng-doc-app-services-store.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { LOCAL_STORAGE } from '@ng-web-apis/common';\n\nconst DEFAULT_SERIALIZE: (v: unknown) => string = (v: unknown) => String(v);\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class NgDocStoreService {\n\tprotected readonly localStorage: Storage = inject(LOCAL_STORAGE);\n\n\tset(key: string, data: string): void;\n\tset<T>(key: string, data: T, serialize: (v: T) => string): void;\n\tset<T>(key: string, data: T, serialize: (v: T) => string = DEFAULT_SERIALIZE): void {\n\t\treturn this.localStorage.setItem(key, serialize(data));\n\t}\n\n\tget(key: string): string | null;\n\tget<T>(key: string, deserialize: (v: string | null) => T): T;\n\tget<T>(key: string, deserialize?: (v: string | null) => T): T | string | null {\n\t\treturn deserialize\n\t\t\t? deserialize(this.localStorage.getItem(key))\n\t\t\t: this.localStorage.getItem(key);\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGA,MAAM,iBAAiB,GAA2B,CAAC,CAAU,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC;MAK/D,iBAAiB,CAAA;AAH9B,IAAA,WAAA,GAAA;AAIoB,QAAA,IAAA,CAAA,YAAY,GAAY,MAAM,CAAC,aAAa,CAAC,CAAC;AAejE,KAAA;AAXA,IAAA,GAAG,CAAI,GAAW,EAAE,IAAO,EAAE,YAA8B,iBAAiB,EAAA;AAC3E,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;KACvD;IAID,GAAG,CAAI,GAAW,EAAE,WAAqC,EAAA;AACxD,QAAA,OAAO,WAAW;cACf,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;cAC3C,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;KAClC;8GAfW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,cAFjB,MAAM,EAAA,CAAA,CAAA,EAAA;;2FAEN,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACX,oBAAA,UAAU,EAAE,MAAM;AAClB,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
@@ -1,11 +1,12 @@
1
1
  import { __metadata, __decorate } from 'tslib';
2
2
  import { DOCUMENT } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { Injectable, Inject } from '@angular/core';
4
+ import { afterNextRender, Injectable, Inject } from '@angular/core';
5
5
  import { NG_DOC_STORE_THEME_KEY } from '@ng-doc/app/constants';
6
6
  import * as i1 from '@ng-doc/app/services/store';
7
7
  import { NgDocStoreService } from '@ng-doc/app/services/store';
8
8
  import { NG_DOC_THEME } from '@ng-doc/app/tokens';
9
+ import { isBrowser } from '@ng-doc/core';
9
10
  import { WINDOW } from '@ng-web-apis/common';
10
11
  import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';
11
12
  import { Subject, fromEvent } from 'rxjs';
@@ -25,9 +26,11 @@ let NgDocThemeService = class NgDocThemeService {
25
26
  this.theme = undefined;
26
27
  this.theme$ = new Subject();
27
28
  this.autoTheme = undefined;
28
- fromEvent(this.window.matchMedia('(prefers-color-scheme: dark)'), 'change')
29
- .pipe(untilDestroyed(this))
30
- .subscribe(() => this.setAutoTheme());
29
+ afterNextRender(() => {
30
+ fromEvent(this.window.matchMedia('(prefers-color-scheme: dark)'), 'change')
31
+ .pipe(untilDestroyed(this))
32
+ .subscribe(() => this.setAutoTheme());
33
+ });
31
34
  }
32
35
  /**
33
36
  * Returns the current theme.
@@ -113,22 +116,22 @@ let NgDocThemeService = class NgDocThemeService {
113
116
  }
114
117
  }
115
118
  async setAutoTheme() {
116
- if (this.autoTheme !== undefined) {
119
+ if (this.autoTheme !== undefined && isBrowser) {
117
120
  const isDark = this.window.matchMedia('(prefers-color-scheme: dark)').matches;
118
121
  const [light, dark] = this.autoTheme;
119
122
  this.store.set(NG_DOC_STORE_THEME_KEY, NgDocThemeService_1.autoThemeId);
120
123
  return this.set(isDark ? dark?.id : light?.id, false);
121
124
  }
122
125
  }
123
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: NgDocThemeService, deps: [{ token: WINDOW }, { token: DOCUMENT }, { token: NG_DOC_THEME }, { token: i1.NgDocStoreService }], target: i0.ɵɵFactoryTarget.Injectable }); }
124
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: NgDocThemeService, providedIn: 'root' }); }
126
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocThemeService, deps: [{ token: WINDOW }, { token: DOCUMENT }, { token: NG_DOC_THEME }, { token: i1.NgDocStoreService }], target: i0.ɵɵFactoryTarget.Injectable }); }
127
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocThemeService, providedIn: 'root' }); }
125
128
  };
126
129
  NgDocThemeService = NgDocThemeService_1 = __decorate([
127
130
  UntilDestroy(),
128
131
  __metadata("design:paramtypes", [Window,
129
132
  Document, Array, NgDocStoreService])
130
133
  ], NgDocThemeService);
131
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: NgDocThemeService, decorators: [{
134
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocThemeService, decorators: [{
132
135
  type: Injectable,
133
136
  args: [{
134
137
  providedIn: 'root',
@@ -1 +1 @@
1
- {"version":3,"file":"ng-doc-app-services-theme.mjs","sources":["../../../../libs/app/services/theme/theme.service.ts","../../../../libs/app/services/theme/ng-doc-app-services-theme.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { Inject, Injectable } from '@angular/core';\nimport { NG_DOC_STORE_THEME_KEY } from '@ng-doc/app/constants';\nimport { NgDocTheme } from '@ng-doc/app/interfaces';\nimport { NgDocStoreService } from '@ng-doc/app/services/store';\nimport { NG_DOC_THEME } from '@ng-doc/app/tokens';\nimport { WINDOW } from '@ng-web-apis/common';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { fromEvent, Observable, Subject } from 'rxjs';\n\n/**\n * Service for managing themes.\n */\n@Injectable({\n\tprovidedIn: 'root',\n})\n@UntilDestroy()\nexport class NgDocThemeService {\n\tstatic readonly autoThemeId: string = 'ng-doc-auto';\n\n\tprivate linkElement?: HTMLLinkElement;\n\tprivate theme: NgDocTheme | undefined = undefined;\n\tprivate readonly theme$: Subject<NgDocTheme | undefined> = new Subject<NgDocTheme | undefined>();\n\tprivate autoTheme: [NgDocTheme | undefined, NgDocTheme | undefined] | undefined = undefined;\n\n\tconstructor(\n\t\t@Inject(WINDOW)\n\t\tprivate readonly window: Window,\n\t\t@Inject(DOCUMENT)\n\t\tprivate readonly document: Document,\n\t\t@Inject(NG_DOC_THEME)\n\t\tprivate readonly themes: NgDocTheme[],\n\t\tprivate readonly store: NgDocStoreService,\n\t) {\n\t\tfromEvent<MediaQueryList>(this.window.matchMedia('(prefers-color-scheme: dark)'), 'change')\n\t\t\t.pipe(untilDestroyed(this))\n\t\t\t.subscribe(() => this.setAutoTheme());\n\t}\n\n\t/**\n\t * Returns the current theme.\n\t */\n\tget currentTheme(): NgDocTheme | undefined {\n\t\treturn this.theme;\n\t}\n\n\t/**\n\t * Returns whether automatic theme switching based on the user's operating system settings is enabled.\n\t */\n\tget isAutoThemeEnabled(): boolean {\n\t\treturn this.autoTheme !== undefined;\n\t}\n\n\t/**\n\t * Enables automatic theme switching based on the user's operating system settings.\n\t * @param light - Theme for light mode.\n\t * @param dark - Theme for dark mode.\n\t */\n\tasync enableAutoTheme(\n\t\tlight: NgDocTheme | undefined,\n\t\tdark: NgDocTheme | undefined,\n\t): Promise<void> {\n\t\tthis.autoTheme = [light, dark];\n\n\t\treturn this.setAutoTheme();\n\t}\n\n\t/**\n\t * Disables automatic theme switching based on the user's operating system settings.\n\t */\n\tasync disableAutoTheme(): Promise<void> {\n\t\tthis.autoTheme = undefined;\n\n\t\treturn this.set(this.store.get(NG_DOC_STORE_THEME_KEY) ?? undefined);\n\t}\n\n\t/**\n\t * Sets the theme by id.\n\t * @param id - Theme id.\n\t * @param save - Whether to save the theme in the store to restore it when the page is reloaded. (`true` by default)\n\t */\n\tasync set(id?: string, save: boolean = true): Promise<void> {\n\t\tthis.removeLink();\n\n\t\tif (save) {\n\t\t\tthis.autoTheme = undefined;\n\t\t}\n\n\t\tif (id && id !== 'ng-doc-day') {\n\t\t\tconst theme: NgDocTheme | undefined = this.themes.find(\n\t\t\t\t(theme: NgDocTheme) => theme.id === id,\n\t\t\t);\n\n\t\t\tif (!theme) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t`Theme with id \"${id}\" is not registered. Make sure that you registered it in the root of your application.`,\n\t\t\t\t);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.createLinkIfNoExists();\n\n\t\t\tif (this.linkElement) {\n\t\t\t\tthis.linkElement.href = theme.path;\n\t\t\t\tsave && this.store.set(NG_DOC_STORE_THEME_KEY, theme.id);\n\t\t\t\tthis.theme = theme;\n\n\t\t\t\treturn new Promise<void>((resolve: () => void, reject: (err: Event | string) => void) => {\n\t\t\t\t\tif (this.linkElement) {\n\t\t\t\t\t\tthis.linkElement.onload = () => {\n\t\t\t\t\t\t\tthis.theme$.next(theme);\n\t\t\t\t\t\t\tresolve();\n\t\t\t\t\t\t};\n\t\t\t\t\t\tthis.linkElement.onerror = reject;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tsave && this.store.set(NG_DOC_STORE_THEME_KEY, 'ng-doc-day');\n\n\t\tthis.theme$.next(undefined);\n\n\t\treturn Promise.resolve();\n\t}\n\n\t/**\n\t * Returns an observable that emits when the theme changes.\n\t */\n\tthemeChanges(): Observable<NgDocTheme | undefined> {\n\t\treturn this.theme$.asObservable();\n\t}\n\n\tprivate removeLink(): void {\n\t\tthis.theme = undefined;\n\t\tthis.linkElement?.remove();\n\t\tthis.linkElement = undefined;\n\t}\n\n\tprivate createLinkIfNoExists(): void {\n\t\tif (!this.linkElement) {\n\t\t\tthis.linkElement = this.document.createElement('link');\n\t\t\tthis.linkElement.setAttribute('rel', 'stylesheet');\n\t\t\tthis.linkElement.setAttribute('type', 'text/css');\n\t\t\tthis.document.getElementsByTagName('head')[0].appendChild(this.linkElement);\n\t\t}\n\t}\n\n\tprivate async setAutoTheme(): Promise<void> {\n\t\tif (this.autoTheme !== undefined) {\n\t\t\tconst isDark: boolean = this.window.matchMedia('(prefers-color-scheme: dark)').matches;\n\t\t\tconst [light, dark] = this.autoTheme;\n\t\t\tthis.store.set(NG_DOC_STORE_THEME_KEY, NgDocThemeService.autoThemeId);\n\n\t\t\treturn this.set(isDark ? dark?.id : light?.id, false);\n\t\t}\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAUA;;AAEG;AAKU,IAAA,iBAAiB,GAAvB,MAAM,iBAAiB,CAAA;;aACb,IAAW,CAAA,WAAA,GAAW,aAAX,CAAyB,EAAA;AAOpD,IAAA,WAAA,CAEkB,MAAc,EAEd,QAAkB,EAElB,MAAoB,EACpB,KAAwB,EAAA;QALxB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QAEd,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;QAElB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAc;QACpB,IAAK,CAAA,KAAA,GAAL,KAAK,CAAmB;QAXlC,IAAK,CAAA,KAAA,GAA2B,SAAS,CAAC;AACjC,QAAA,IAAA,CAAA,MAAM,GAAoC,IAAI,OAAO,EAA0B,CAAC;QACzF,IAAS,CAAA,SAAA,GAAiE,SAAS,CAAC;QAW3F,SAAS,CAAiB,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,8BAA8B,CAAC,EAAE,QAAQ,CAAC;AACzF,aAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;aAC1B,SAAS,CAAC,MAAM,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;KACvC;AAED;;AAEG;AACH,IAAA,IAAI,YAAY,GAAA;QACf,OAAO,IAAI,CAAC,KAAK,CAAC;KAClB;AAED;;AAEG;AACH,IAAA,IAAI,kBAAkB,GAAA;AACrB,QAAA,OAAO,IAAI,CAAC,SAAS,KAAK,SAAS,CAAC;KACpC;AAED;;;;AAIG;AACH,IAAA,MAAM,eAAe,CACpB,KAA6B,EAC7B,IAA4B,EAAA;Q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AAA,EAAA,iBAAiB,CA4I7B,CAAA;2FA5IY,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACX,oBAAA,UAAU,EAAE,MAAM;AAClB,iBAAA,CAAA;;0BAWE,MAAM;2BAAC,MAAM,CAAA;;0BAEb,MAAM;2BAAC,QAAQ,CAAA;;0BAEf,MAAM;2BAAC,YAAY,CAAA;;;AC9BtB;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-doc-app-services-theme.mjs","sources":["../../../../libs/app/services/theme/theme.service.ts","../../../../libs/app/services/theme/ng-doc-app-services-theme.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { afterNextRender, Inject, Injectable } from '@angular/core';\nimport { NG_DOC_STORE_THEME_KEY } from '@ng-doc/app/constants';\nimport { NgDocTheme } from '@ng-doc/app/interfaces';\nimport { NgDocStoreService } from '@ng-doc/app/services/store';\nimport { NG_DOC_THEME } from '@ng-doc/app/tokens';\nimport { isBrowser } from '@ng-doc/core';\nimport { WINDOW } from '@ng-web-apis/common';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { fromEvent, Observable, Subject } from 'rxjs';\n\n/**\n * Service for managing themes.\n */\n@Injectable({\n\tprovidedIn: 'root',\n})\n@UntilDestroy()\nexport class NgDocThemeService {\n\tstatic readonly autoThemeId: string = 'ng-doc-auto';\n\n\tprivate linkElement?: HTMLLinkElement;\n\tprivate theme: NgDocTheme | undefined = undefined;\n\tprivate readonly theme$: Subject<NgDocTheme | undefined> = new Subject<NgDocTheme | undefined>();\n\tprivate autoTheme: [NgDocTheme | undefined, NgDocTheme | undefined] | undefined = undefined;\n\n\tconstructor(\n\t\t@Inject(WINDOW)\n\t\tprivate readonly window: Window,\n\t\t@Inject(DOCUMENT)\n\t\tprivate readonly document: Document,\n\t\t@Inject(NG_DOC_THEME)\n\t\tprivate readonly themes: NgDocTheme[],\n\t\tprivate readonly store: NgDocStoreService,\n\t) {\n\t\tafterNextRender(() => {\n\t\t\tfromEvent<MediaQueryList>(this.window.matchMedia('(prefers-color-scheme: dark)'), 'change')\n\t\t\t\t.pipe(untilDestroyed(this))\n\t\t\t\t.subscribe(() => this.setAutoTheme());\n\t\t});\n\t}\n\n\t/**\n\t * Returns the current theme.\n\t */\n\tget currentTheme(): NgDocTheme | undefined {\n\t\treturn this.theme;\n\t}\n\n\t/**\n\t * Returns whether automatic theme switching based on the user's operating system settings is enabled.\n\t */\n\tget isAutoThemeEnabled(): boolean {\n\t\treturn this.autoTheme !== undefined;\n\t}\n\n\t/**\n\t * Enables automatic theme switching based on the user's operating system settings.\n\t * @param light - Theme for light mode.\n\t * @param dark - Theme for dark mode.\n\t */\n\tasync enableAutoTheme(\n\t\tlight: NgDocTheme | undefined,\n\t\tdark: NgDocTheme | undefined,\n\t): Promise<void> {\n\t\tthis.autoTheme = [light, dark];\n\n\t\treturn this.setAutoTheme();\n\t}\n\n\t/**\n\t * Disables automatic theme switching based on the user's operating system settings.\n\t */\n\tasync disableAutoTheme(): Promise<void> {\n\t\tthis.autoTheme = undefined;\n\n\t\treturn this.set(this.store.get(NG_DOC_STORE_THEME_KEY) ?? undefined);\n\t}\n\n\t/**\n\t * Sets the theme by id.\n\t * @param id - Theme id.\n\t * @param save - Whether to save the theme in the store to restore it when the page is reloaded. (`true` by default)\n\t */\n\tasync set(id?: string, save: boolean = true): Promise<void> {\n\t\tthis.removeLink();\n\n\t\tif (save) {\n\t\t\tthis.autoTheme = undefined;\n\t\t}\n\n\t\tif (id && id !== 'ng-doc-day') {\n\t\t\tconst theme: NgDocTheme | undefined = this.themes.find(\n\t\t\t\t(theme: NgDocTheme) => theme.id === id,\n\t\t\t);\n\n\t\t\tif (!theme) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t`Theme with id \"${id}\" is not registered. Make sure that you registered it in the root of your application.`,\n\t\t\t\t);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.createLinkIfNoExists();\n\n\t\t\tif (this.linkElement) {\n\t\t\t\tthis.linkElement.href = theme.path;\n\t\t\t\tsave && this.store.set(NG_DOC_STORE_THEME_KEY, theme.id);\n\t\t\t\tthis.theme = theme;\n\n\t\t\t\treturn new Promise<void>((resolve: () => void, reject: (err: Event | string) => void) => {\n\t\t\t\t\tif (this.linkElement) {\n\t\t\t\t\t\tthis.linkElement.onload = () => {\n\t\t\t\t\t\t\tthis.theme$.next(theme);\n\t\t\t\t\t\t\tresolve();\n\t\t\t\t\t\t};\n\t\t\t\t\t\tthis.linkElement.onerror = reject;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tsave && this.store.set(NG_DOC_STORE_THEME_KEY, 'ng-doc-day');\n\n\t\tthis.theme$.next(undefined);\n\n\t\treturn Promise.resolve();\n\t}\n\n\t/**\n\t * Returns an observable that emits when the theme changes.\n\t */\n\tthemeChanges(): Observable<NgDocTheme | undefined> {\n\t\treturn this.theme$.asObservable();\n\t}\n\n\tprivate removeLink(): void {\n\t\tthis.theme = undefined;\n\t\tthis.linkElement?.remove();\n\t\tthis.linkElement = undefined;\n\t}\n\n\tprivate createLinkIfNoExists(): void {\n\t\tif (!this.linkElement) {\n\t\t\tthis.linkElement = this.document.createElement('link');\n\t\t\tthis.linkElement.setAttribute('rel', 'stylesheet');\n\t\t\tthis.linkElement.setAttribute('type', 'text/css');\n\t\t\tthis.document.getElementsByTagName('head')[0].appendChild(this.linkElement);\n\t\t}\n\t}\n\n\tprivate async setAutoTheme(): Promise<void> {\n\t\tif (this.autoTheme !== undefined && isBrowser) {\n\t\t\tconst isDark: boolean = this.window.matchMedia('(prefers-color-scheme: dark)').matches;\n\t\t\tconst [light, dark] = this.autoTheme;\n\t\t\tthis.store.set(NG_DOC_STORE_THEME_KEY, NgDocThemeService.autoThemeId);\n\n\t\t\treturn this.set(isDark ? dark?.id : light?.id, false);\n\t\t}\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index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ClB,iBAAA,CAAA;;0BAWE,MAAM;2BAAC,MAAM,CAAA;;0BAEb,MAAM;2BAAC,QAAQ,CAAA;;0BAEf,MAAM;2BAAC,YAAY,CAAA;;;AC/BtB;;AAEG;;;;"}
@@ -16,10 +16,10 @@ class NgDocBooleanControlComponent extends DIControl {
16
16
  updateModel(obj) {
17
17
  super.updateModel(obj ? obj : !this.defaultValue ? this.defaultValue : false);
18
18
  }
19
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: NgDocBooleanControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
20
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.2", type: NgDocBooleanControlComponent, isStandalone: true, selector: "ng-doc-boolean-control", providers: [provideHostControl(NgDocBooleanControlComponent)], usesInheritance: true, ngImport: i0, template: "<ng-doc-checkbox [ngDocTooltip]=\"tooltipTemplate\" [canOpen]=\"!!description\">\n\t{{ name }}\n\t<ng-template #tooltipTemplate>\n\t\t<div [innerHTML]=\"description | ngDocSanitizeHtml\"></div>\n\t</ng-template>\n</ng-doc-checkbox>\n", styles: [":host{display:inline-flex;width:100%}\n"], dependencies: [{ kind: "component", type: NgDocCheckboxComponent, selector: "ng-doc-checkbox", inputs: ["color"] }, { 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: NgDocSanitizeHtmlPipe, name: "ngDocSanitizeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
19
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocBooleanControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
20
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.7", type: NgDocBooleanControlComponent, isStandalone: true, selector: "ng-doc-boolean-control", providers: [provideHostControl(NgDocBooleanControlComponent)], usesInheritance: true, ngImport: i0, template: "<ng-doc-checkbox [ngDocTooltip]=\"tooltipTemplate\" [canOpen]=\"!!description\">\n\t{{ name }}\n\t<ng-template #tooltipTemplate>\n\t\t<div [innerHTML]=\"description | ngDocSanitizeHtml\"></div>\n\t</ng-template>\n</ng-doc-checkbox>\n", styles: [":host{display:inline-flex;width:100%}\n"], dependencies: [{ kind: "component", type: NgDocCheckboxComponent, selector: "ng-doc-checkbox", inputs: ["color"] }, { 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: NgDocSanitizeHtmlPipe, name: "ngDocSanitizeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
21
21
  }
22
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: NgDocBooleanControlComponent, decorators: [{
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocBooleanControlComponent, decorators: [{
23
23
  type: Component,
24
24
  args: [{ selector: 'ng-doc-boolean-control', providers: [provideHostControl(NgDocBooleanControlComponent)], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgDocCheckboxComponent, NgDocTooltipDirective, NgDocSanitizeHtmlPipe], template: "<ng-doc-checkbox [ngDocTooltip]=\"tooltipTemplate\" [canOpen]=\"!!description\">\n\t{{ name }}\n\t<ng-template #tooltipTemplate>\n\t\t<div [innerHTML]=\"description | ngDocSanitizeHtml\"></div>\n\t</ng-template>\n</ng-doc-checkbox>\n", styles: [":host{display:inline-flex;width:100%}\n"] }]
25
25
  }], ctorParameters: () => [] });
@@ -13,10 +13,10 @@ class NgDocNumberControlComponent extends DIControl {
13
13
  changeModel(value) {
14
14
  this.updateModel(value === null && this.default ? this.default : value);
15
15
  }
16
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: NgDocNumberControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
17
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.2", type: NgDocNumberControlComponent, isStandalone: true, selector: "ng-doc-number-control", inputs: { default: "default" }, usesInheritance: true, ngImport: i0, template: "<ng-doc-input-wrapper diControlSilencer [rightContent]=\"rightContent\">\n\t<input ngDocInputNumber type=\"number\" [ngModel]=\"model\" (ngModelChange)=\"changeModel($event)\" />\n\t<ng-template #rightContent>\n\t\t<button\n\t\t\tng-doc-button-icon\n\t\t\tsize=\"large\"\n\t\t\t[ngDocFocusable]=\"false\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[rounded]=\"false\"\n\t\t\t(click)=\"updateModel(default ?? null)\"\n\t\t\t(focusout)=\"touch()\"\n\t\t\t*ngIf=\"model() && model() !== default\">\n\t\t\t<ng-doc-icon icon=\"x\"></ng-doc-icon>\n\t\t</button>\n\t</ng-template>\n</ng-doc-input-wrapper>\n", styles: [":host{display:block;width:100%}\n"], dependencies: [{ kind: "component", type: NgDocInputWrapperComponent, selector: "ng-doc-input-wrapper", inputs: ["blurContent", "blurContext", "leftContent", "rightContent", "align"] }, { kind: "directive", type: DIControlSilencerDirective, selector: "[diControlSilencer]" }, { kind: "directive", type: NgDocInputNumberDirective, selector: "input[ngDocInputNumber]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgDocButtonIconComponent, selector: "button[ng-doc-button-icon], a[ng-doc-button-icon]", inputs: ["size", "rounded"] }, { kind: "directive", type: NgDocFocusableDirective, selector: "[ngDocFocusable]", inputs: ["ngDocFocusable"], exportAs: ["ngDocFocusable"] }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "customIcon", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocNumberControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
17
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.7", type: NgDocNumberControlComponent, isStandalone: true, selector: "ng-doc-number-control", inputs: { default: "default" }, usesInheritance: true, ngImport: i0, template: "<ng-doc-input-wrapper diControlSilencer [rightContent]=\"rightContent\">\n\t<input ngDocInputNumber type=\"number\" [ngModel]=\"model\" (ngModelChange)=\"changeModel($event)\" />\n\t<ng-template #rightContent>\n\t\t<button\n\t\t\tng-doc-button-icon\n\t\t\tsize=\"large\"\n\t\t\t[ngDocFocusable]=\"false\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[rounded]=\"false\"\n\t\t\t(click)=\"updateModel(default ?? null)\"\n\t\t\t(focusout)=\"touch()\"\n\t\t\t*ngIf=\"model() && model() !== default\">\n\t\t\t<ng-doc-icon icon=\"x\"></ng-doc-icon>\n\t\t</button>\n\t</ng-template>\n</ng-doc-input-wrapper>\n", styles: [":host{display:block;width:100%}\n"], dependencies: [{ kind: "component", type: NgDocInputWrapperComponent, selector: "ng-doc-input-wrapper", inputs: ["blurContent", "blurContext", "leftContent", "rightContent", "align"] }, { kind: "directive", type: DIControlSilencerDirective, selector: "[diControlSilencer]" }, { kind: "directive", type: NgDocInputNumberDirective, selector: "input[ngDocInputNumber]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgDocButtonIconComponent, selector: "button[ng-doc-button-icon], a[ng-doc-button-icon]", inputs: ["size", "rounded"] }, { kind: "directive", type: NgDocFocusableDirective, selector: "[ngDocFocusable]", inputs: ["ngDocFocusable"], exportAs: ["ngDocFocusable"] }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "customIcon", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
18
18
  }
19
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: NgDocNumberControlComponent, decorators: [{
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocNumberControlComponent, decorators: [{
20
20
  type: Component,
21
21
  args: [{ selector: 'ng-doc-number-control', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
22
22
  NgDocInputWrapperComponent,
@@ -16,10 +16,10 @@ class NgDocStringControlComponent extends DIControl {
16
16
  writeValue(value) {
17
17
  super.writeValue(value);
18
18
  }
19
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: NgDocStringControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
20
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.2", type: NgDocStringControlComponent, isStandalone: true, selector: "ng-doc-string-control", inputs: { default: "default" }, usesInheritance: true, ngImport: i0, template: "<ng-doc-input-wrapper [rightContent]=\"rightContent\" diControlSilencer>\n\t<input ngDocInputString [ngModel]=\"model()\" (ngModelChange)=\"changeModel($event)\" />\n\t<ng-template #rightContent>\n\t\t<button\n\t\t\tng-doc-button-icon\n\t\t\tsize=\"large\"\n\t\t\t[ngDocFocusable]=\"false\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[rounded]=\"false\"\n\t\t\t(click)=\"updateModel(default ?? null)\"\n\t\t\t(focusout)=\"touch()\"\n\t\t\t*ngIf=\"model() && model() !== default\">\n\t\t\t<ng-doc-icon icon=\"x\"></ng-doc-icon>\n\t\t</button>\n\t</ng-template>\n</ng-doc-input-wrapper>\n", styles: [":host{display:block;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: NgDocInputWrapperComponent, selector: "ng-doc-input-wrapper", inputs: ["blurContent", "blurContext", "leftContent", "rightContent", "align"] }, { kind: "directive", type: NgDocInputStringDirective, selector: "input[ngDocInputString]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgDocButtonIconComponent, selector: "button[ng-doc-button-icon], a[ng-doc-button-icon]", inputs: ["size", "rounded"] }, { kind: "directive", type: NgDocFocusableDirective, selector: "[ngDocFocusable]", inputs: ["ngDocFocusable"], exportAs: ["ngDocFocusable"] }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "customIcon", "size"] }, { kind: "directive", type: DIControlSilencerDirective, selector: "[diControlSilencer]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
19
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocStringControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
20
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.7", type: NgDocStringControlComponent, isStandalone: true, selector: "ng-doc-string-control", inputs: { default: "default" }, usesInheritance: true, ngImport: i0, template: "<ng-doc-input-wrapper [rightContent]=\"rightContent\" diControlSilencer>\n\t<input ngDocInputString [ngModel]=\"model()\" (ngModelChange)=\"changeModel($event)\" />\n\t<ng-template #rightContent>\n\t\t<button\n\t\t\tng-doc-button-icon\n\t\t\tsize=\"large\"\n\t\t\t[ngDocFocusable]=\"false\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[rounded]=\"false\"\n\t\t\t(click)=\"updateModel(default ?? null)\"\n\t\t\t(focusout)=\"touch()\"\n\t\t\t*ngIf=\"model() && model() !== default\">\n\t\t\t<ng-doc-icon icon=\"x\"></ng-doc-icon>\n\t\t</button>\n\t</ng-template>\n</ng-doc-input-wrapper>\n", styles: [":host{display:block;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: NgDocInputWrapperComponent, selector: "ng-doc-input-wrapper", inputs: ["blurContent", "blurContext", "leftContent", "rightContent", "align"] }, { kind: "directive", type: NgDocInputStringDirective, selector: "input[ngDocInputString]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgDocButtonIconComponent, selector: "button[ng-doc-button-icon], a[ng-doc-button-icon]", inputs: ["size", "rounded"] }, { kind: "directive", type: NgDocFocusableDirective, selector: "[ngDocFocusable]", inputs: ["ngDocFocusable"], exportAs: ["ngDocFocusable"] }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "customIcon", "size"] }, { kind: "directive", type: DIControlSilencerDirective, selector: "[diControlSilencer]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
21
21
  }
22
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: NgDocStringControlComponent, decorators: [{
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocStringControlComponent, decorators: [{
23
23
  type: Component,
24
24
  args: [{ selector: 'ng-doc-string-control', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
25
25
  FormsModule,
@@ -18,10 +18,10 @@ class NgDocTypeAliasControlComponent extends DIControl {
18
18
  changeModel(value) {
19
19
  this.updateModel(value === null && this.default ? this.default : value);
20
20
  }
21
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: NgDocTypeAliasControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
22
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.2", type: NgDocTypeAliasControlComponent, isStandalone: true, selector: "ng-doc-type-alias-control", inputs: { default: "default" }, usesInheritance: true, ngImport: i0, template: "<ng-doc-combobox\n\t[ngModel]=\"model()\"\n\t[readonly]=\"true\"\n\t[valueContent]=\"valueTemplate\"\n\t[clearButton]=\"false\"\n\t[rightContent]=\"rightContent\"\n\t(ngModelChange)=\"changeModel($event)\">\n\t<ng-doc-list *ngDocData>\n\t\t<ng-container *ngFor=\"let option of options\">\n\t\t\t<ng-container *ngIf=\"option | ngDocExtractValue as value\">\n\t\t\t\t<ng-doc-option [value]=\"value\">\n\t\t\t\t\t<ng-container\n\t\t\t\t\t\t*ngTemplateOutlet=\"valueTemplate; context: { $implicit: value }\"></ng-container>\n\t\t\t\t</ng-doc-option>\n\t\t\t</ng-container>\n\t\t</ng-container>\n\t</ng-doc-list>\n\t<ng-template let-value #valueTemplate>\n\t\t<div ng-doc-text>\n\t\t\t<ng-doc-kind-icon\n\t\t\t\t[kind]=\"typeOf(value)\"\n\t\t\t\t[type]=\"'type'\"\n\t\t\t\t[ngDocTooltip]=\"typeOf(value)\"\n\t\t\t\tpositions=\"left-center\"\n\t\t\t\tngDocTextLeft>\n\t\t\t</ng-doc-kind-icon>\n\t\t\t<div>{{ value }}</div>\n\t\t\t<span ng-doc-text color=\"muted\" size=\"small\" *ngIf=\"value === default\" ngDocTextRight\n\t\t\t\t>[default]</span\n\t\t\t>\n\t\t</div>\n\t</ng-template>\n\t<ng-template #rightContent>\n\t\t<button\n\t\t\tng-doc-button-icon\n\t\t\tsize=\"large\"\n\t\t\t[ngDocFocusable]=\"false\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[rounded]=\"false\"\n\t\t\t(click)=\"updateModel(default ?? null)\"\n\t\t\t(focusout)=\"touch()\"\n\t\t\t*ngIf=\"model() && model() !== default\">\n\t\t\t<ng-doc-icon icon=\"x\"></ng-doc-icon>\n\t\t</button>\n\t</ng-template>\n</ng-doc-combobox>\n", styles: [":host{display:block;width:100%}\n"], dependencies: [{ kind: "component", type: NgDocComboboxComponent, selector: "ng-doc-combobox", inputs: ["readonly", "placeholder", "clearButton", "rightContent", "valueContent"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgDocDataDirective, selector: "[ngDocData]" }, { kind: "component", type: NgDocListComponent, selector: "ng-doc-list" }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgDocOptionComponent, selector: "ng-doc-option" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NgDocTextComponent, selector: "[ng-doc-text]", inputs: ["size", "color", "align", "absoluteContent"] }, { kind: "component", type: NgDocKindIconComponent, selector: "ng-doc-kind-icon", inputs: ["kind", "type"] }, { kind: "directive", type: NgDocTextLeftDirective, selector: "[ngDocTextLeft]" }, { 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: "directive", type: NgDocTextRightDirective, selector: "[ngDocTextRight]" }, { kind: "component", type: NgDocButtonIconComponent, selector: "button[ng-doc-button-icon], a[ng-doc-button-icon]", inputs: ["size", "rounded"] }, { kind: "directive", type: NgDocFocusableDirective, selector: "[ngDocFocusable]", inputs: ["ngDocFocusable"], exportAs: ["ngDocFocusable"] }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "customIcon", "size"] }, { kind: "pipe", type: NgDocExtractValuePipe, name: "ngDocExtractValue" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
21
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocTypeAliasControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
22
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.7", type: NgDocTypeAliasControlComponent, isStandalone: true, selector: "ng-doc-type-alias-control", inputs: { default: "default" }, usesInheritance: true, ngImport: i0, template: "<ng-doc-combobox\n\t[ngModel]=\"model()\"\n\t[readonly]=\"true\"\n\t[valueContent]=\"valueTemplate\"\n\t[clearButton]=\"false\"\n\t[rightContent]=\"rightContent\"\n\t(ngModelChange)=\"changeModel($event)\">\n\t<ng-doc-list *ngDocData>\n\t\t<ng-container *ngFor=\"let option of options\">\n\t\t\t<ng-container *ngIf=\"option | ngDocExtractValue as value\">\n\t\t\t\t<ng-doc-option [value]=\"value\">\n\t\t\t\t\t<ng-container\n\t\t\t\t\t\t*ngTemplateOutlet=\"valueTemplate; context: { $implicit: value }\"></ng-container>\n\t\t\t\t</ng-doc-option>\n\t\t\t</ng-container>\n\t\t</ng-container>\n\t</ng-doc-list>\n\t<ng-template let-value #valueTemplate>\n\t\t<div ng-doc-text>\n\t\t\t<ng-doc-kind-icon\n\t\t\t\t[kind]=\"typeOf(value)\"\n\t\t\t\t[type]=\"'type'\"\n\t\t\t\t[ngDocTooltip]=\"typeOf(value)\"\n\t\t\t\tpositions=\"left-center\"\n\t\t\t\tngDocTextLeft>\n\t\t\t</ng-doc-kind-icon>\n\t\t\t<div>{{ value }}</div>\n\t\t\t<span ng-doc-text color=\"muted\" size=\"small\" *ngIf=\"value === default\" ngDocTextRight\n\t\t\t\t>[default]</span\n\t\t\t>\n\t\t</div>\n\t</ng-template>\n\t<ng-template #rightContent>\n\t\t<button\n\t\t\tng-doc-button-icon\n\t\t\tsize=\"large\"\n\t\t\t[ngDocFocusable]=\"false\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[rounded]=\"false\"\n\t\t\t(click)=\"updateModel(default ?? null)\"\n\t\t\t(focusout)=\"touch()\"\n\t\t\t*ngIf=\"model() && model() !== default\">\n\t\t\t<ng-doc-icon icon=\"x\"></ng-doc-icon>\n\t\t</button>\n\t</ng-template>\n</ng-doc-combobox>\n", styles: [":host{display:block;width:100%}\n"], dependencies: [{ kind: "component", type: NgDocComboboxComponent, selector: "ng-doc-combobox", inputs: ["readonly", "placeholder", "clearButton", "rightContent", "valueContent"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgDocDataDirective, selector: "[ngDocData]" }, { kind: "component", type: NgDocListComponent, selector: "ng-doc-list" }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgDocOptionComponent, selector: "ng-doc-option" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NgDocTextComponent, selector: "[ng-doc-text]", inputs: ["size", "color", "align", "absoluteContent"] }, { kind: "component", type: NgDocKindIconComponent, selector: "ng-doc-kind-icon", inputs: ["kind", "type"] }, { kind: "directive", type: NgDocTextLeftDirective, selector: "[ngDocTextLeft]" }, { 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: "directive", type: NgDocTextRightDirective, selector: "[ngDocTextRight]" }, { kind: "component", type: NgDocButtonIconComponent, selector: "button[ng-doc-button-icon], a[ng-doc-button-icon]", inputs: ["size", "rounded"] }, { kind: "directive", type: NgDocFocusableDirective, selector: "[ngDocFocusable]", inputs: ["ngDocFocusable"], exportAs: ["ngDocFocusable"] }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "customIcon", "size"] }, { kind: "pipe", type: NgDocExtractValuePipe, name: "ngDocExtractValue" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
23
23
  }
24
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: NgDocTypeAliasControlComponent, decorators: [{
24
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocTypeAliasControlComponent, decorators: [{
25
25
  type: Component,
26
26
  args: [{ selector: 'ng-doc-type-alias-control', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
27
27
  NgDocComboboxComponent,
@@ -1,4 +1,4 @@
1
- import { Type } from '@angular/core';
1
+ import { Injector, Type } from '@angular/core';
2
2
  import { NgDocProcessorOptions } from './processor-options';
3
3
  /**
4
4
  * Interface to create a processor that will be used to replace html nodes with an Angular component.
@@ -21,6 +21,7 @@ export interface NgDocPageProcessor<T = unknown> {
21
21
  /**
22
22
  * Can be used to find a node to replace instead of the node that was found by selector.
23
23
  * @param element - Html node to replace.
24
+ * @param injector - Injector to get dependencies.
24
25
  */
25
- nodeToReplace?: (element: Element) => Element;
26
+ nodeToReplace?: (element: Element, injector: Injector) => Element;
26
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-doc/app",
3
- "version": "17.1.3",
3
+ "version": "17.2.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=17.0.0",
6
6
  "@angular/core": ">=17.0.0",
@@ -12,8 +12,8 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "tslib": "^2.6.2",
15
- "@ng-doc/core": "17.1.3",
16
- "@ng-doc/ui-kit": "17.1.3",
15
+ "@ng-doc/core": "17.2.1",
16
+ "@ng-doc/ui-kit": "17.2.1",
17
17
  "@orama/plugin-match-highlight": "1.0.2",
18
18
  "@orama/stemmers": "1.0.2",
19
19
  "highlight.js": "11.5.1"
@@ -1,4 +1,4 @@
1
- import { ElementRef, Injector, OnInit, ViewContainerRef } from '@angular/core';
1
+ import { ElementRef, Injector, OnInit, Renderer2, ViewContainerRef } from '@angular/core';
2
2
  import { NgDocPageProcessor } from '@ng-doc/app/interfaces';
3
3
  import * as i0 from "@angular/core";
4
4
  /**
@@ -6,14 +6,15 @@ import * as i0 from "@angular/core";
6
6
  * html nodes with an Angular component.
7
7
  */
8
8
  export declare class NgDocPageProcessorDirective implements OnInit {
9
- protected readonly elementRef: ElementRef<HTMLElement>;
10
- protected readonly viewContainerRef: ViewContainerRef;
9
+ html: string;
11
10
  processors: Array<NgDocPageProcessor<unknown>>;
12
11
  customProcessors: Array<NgDocPageProcessor<unknown>>;
13
- injector: Injector;
14
- constructor(elementRef: ElementRef<HTMLElement>, viewContainerRef: ViewContainerRef);
12
+ protected readonly elementRef: ElementRef<HTMLElement>;
13
+ protected readonly viewContainerRef: ViewContainerRef;
14
+ protected readonly injector: Injector;
15
+ protected readonly renderer: Renderer2;
15
16
  ngOnInit(): void;
16
17
  private process;
17
18
  static ɵfac: i0.ɵɵFactoryDeclaration<NgDocPageProcessorDirective, never>;
18
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgDocPageProcessorDirective, "[ngDocPageProcessor]", never, {}, {}, never, never, true, never>;
19
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgDocPageProcessorDirective, "[ngDocPageProcessor]", never, { "html": { "alias": "ngDocPageProcessor"; "required": true; }; }, {}, never, never, true, never>;
19
20
  }
@@ -1,5 +1,6 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class NgDocStoreService {
3
+ protected readonly localStorage: Storage;
3
4
  set(key: string, data: string): void;
4
5
  set<T>(key: string, data: T, serialize: (v: T) => string): void;
5
6
  get(key: string): string | null;