@taiga-ui/addon-doc 2.51.0 → 2.53.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 (69) hide show
  1. package/bundles/taiga-ui-addon-doc.umd.js +98 -26
  2. package/bundles/taiga-ui-addon-doc.umd.js.map +1 -1
  3. package/bundles/taiga-ui-addon-doc.umd.min.js +1 -1
  4. package/bundles/taiga-ui-addon-doc.umd.min.js.map +1 -1
  5. package/components/code/parse-code-block.d.ts +4 -0
  6. package/components/example/example.component.d.ts +2 -1
  7. package/components/navigation/navigation.component.d.ts +4 -1
  8. package/directives/scroll-into-view/scroll-into-view.directive.d.ts +3 -1
  9. package/esm2015/components/code/code.component.js +2 -2
  10. package/esm2015/components/code/parse-code-block.js +6 -1
  11. package/esm2015/components/demo/demo.component.js +2 -2
  12. package/esm2015/components/documentation/documentation.component.js +2 -2
  13. package/esm2015/components/example/example.component.js +10 -6
  14. package/esm2015/components/navigation/navigation.component.js +22 -12
  15. package/esm2015/components/navigation/navigation.providers.js +4 -1
  16. package/esm2015/components/page/page.component.js +2 -2
  17. package/esm2015/components/page/page.providers.js +2 -1
  18. package/esm2015/directives/scroll-into-view/scroll-into-view.directive.js +13 -9
  19. package/esm2015/internal/see-also/see-also.component.js +2 -2
  20. package/esm2015/public-api.js +4 -1
  21. package/esm2015/tokens/code-actions.js +5 -0
  22. package/esm2015/tokens/page-loaded.js +5 -0
  23. package/esm2015/tokens/scroll-behavior.js +3 -0
  24. package/esm2015/utils/coerce-value.js +7 -2
  25. package/esm2015/utils/color-conversion.js +10 -1
  26. package/esm2015/utils/generate-routes.js +4 -1
  27. package/esm2015/utils/inspect.js +4 -1
  28. package/esm2015/utils/raw-load-record.js +6 -1
  29. package/esm2015/utils/raw-load.js +6 -1
  30. package/esm2015/utils/transliterate-keyboard-layout.js +4 -1
  31. package/esm5/components/code/code.component.js +2 -2
  32. package/esm5/components/code/parse-code-block.js +6 -1
  33. package/esm5/components/demo/demo.component.js +2 -2
  34. package/esm5/components/documentation/documentation.component.js +2 -2
  35. package/esm5/components/example/example.component.js +10 -6
  36. package/esm5/components/navigation/navigation.component.js +22 -12
  37. package/esm5/components/navigation/navigation.providers.js +4 -1
  38. package/esm5/components/page/page.component.js +2 -2
  39. package/esm5/components/page/page.providers.js +2 -1
  40. package/esm5/directives/scroll-into-view/scroll-into-view.directive.js +13 -9
  41. package/esm5/internal/see-also/see-also.component.js +2 -2
  42. package/esm5/public-api.js +4 -1
  43. package/esm5/tokens/code-actions.js +5 -0
  44. package/esm5/tokens/page-loaded.js +5 -0
  45. package/esm5/tokens/scroll-behavior.js +3 -0
  46. package/esm5/utils/coerce-value.js +7 -2
  47. package/esm5/utils/color-conversion.js +10 -1
  48. package/esm5/utils/generate-routes.js +4 -1
  49. package/esm5/utils/inspect.js +4 -1
  50. package/esm5/utils/raw-load-record.js +6 -1
  51. package/esm5/utils/raw-load.js +6 -1
  52. package/esm5/utils/transliterate-keyboard-layout.js +4 -1
  53. package/fesm2015/taiga-ui-addon-doc.js +93 -29
  54. package/fesm2015/taiga-ui-addon-doc.js.map +1 -1
  55. package/fesm5/taiga-ui-addon-doc.js +93 -29
  56. package/fesm5/taiga-ui-addon-doc.js.map +1 -1
  57. package/package.json +5 -5
  58. package/public-api.d.ts +3 -0
  59. package/taiga-ui-addon-doc.metadata.json +1 -1
  60. package/tokens/code-actions.d.ts +4 -0
  61. package/tokens/page-loaded.d.ts +3 -0
  62. package/tokens/scroll-behavior.d.ts +2 -0
  63. package/utils/coerce-value.d.ts +4 -0
  64. package/utils/color-conversion.d.ts +7 -0
  65. package/utils/generate-routes.d.ts +2 -0
  66. package/utils/inspect.d.ts +2 -0
  67. package/utils/raw-load-record.d.ts +4 -0
  68. package/utils/raw-load.d.ts +4 -0
  69. package/utils/transliterate-keyboard-layout.d.ts +2 -0
@@ -1,7 +1,7 @@
1
1
  import { __awaiter, __decorate, __param } from 'tslib';
2
2
  import { Input, HostBinding, Component, NgModule, Inject, ChangeDetectionStrategy, InjectionToken, Renderer2, PLATFORM_ID, ViewChild, ContentChild, TemplateRef, HostListener, forwardRef, EventEmitter, Output, Directive, ChangeDetectorRef, ContentChildren, Attribute, Optional, Pipe, ViewEncapsulation, ElementRef } from '@angular/core';
3
- import { BehaviorSubject, Subject, timer, Observable, merge, identity } from 'rxjs';
4
- import { switchMap, map, switchMapTo, mapTo, startWith, takeUntil, debounceTime, filter, mergeMap, distinctUntilChanged } from 'rxjs/operators';
3
+ import { BehaviorSubject, Subject, timer, Observable, merge, identity, defer, of, ReplaySubject } from 'rxjs';
4
+ import { switchMap, map, switchMapTo, mapTo, startWith, takeUntil, filter, debounceTime, mergeMap, take, distinctUntilChanged } from 'rxjs/operators';
5
5
  import MarkdownIt from 'markdown-it';
6
6
  import { CommonModule, isPlatformBrowser, Location as Location$1, DOCUMENT } from '@angular/common';
7
7
  import { HighlightModule } from 'ngx-highlightjs';
@@ -17,12 +17,21 @@ import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
17
17
  import { TuiSidebarDirective, TuiSidebarModule } from '@taiga-ui/addon-mobile';
18
18
  import { Title } from '@angular/platform-browser';
19
19
 
20
+ /**
21
+ * @deprecated: use {@link tuiRawLoad} instead
22
+ */
23
+ // eslint-disable-next-line @typescript-eslint/naming-convention
20
24
  function rawLoad(content) {
21
25
  return __awaiter(this, void 0, void 0, function* () {
22
26
  return content instanceof Promise ? (yield content).default : content;
23
27
  });
24
28
  }
29
+ const tuiRawLoad = rawLoad;
25
30
 
31
+ /**
32
+ * @deprecated: use {@link tuiTryParseMarkdownCodeBlock} instead
33
+ */
34
+ // eslint-disable-next-line @typescript-eslint/naming-convention
26
35
  function tryParseMarkdownCodeBlock(text = '') {
27
36
  const tokens = new MarkdownIt().parse(text, {});
28
37
  const result = tokens
@@ -30,6 +39,7 @@ function tryParseMarkdownCodeBlock(text = '') {
30
39
  .map(({ content }) => content);
31
40
  return result.length ? result : [text];
32
41
  }
42
+ const tuiTryParseMarkdownCodeBlock = tryParseMarkdownCodeBlock;
33
43
 
34
44
  let TuiDocCodeComponent = class TuiDocCodeComponent {
35
45
  constructor() {
@@ -56,7 +66,7 @@ __decorate([
56
66
  TuiDocCodeComponent = __decorate([
57
67
  Component({
58
68
  selector: 'tui-doc-code',
59
- template: "<p\n *ngIf=\"filename\"\n class=\"t-header\"\n>\n {{filename}}\n</p>\n<pre\n *ngFor=\"let content of processor$ | async\"\n class=\"t-code\"\n><code [lineNumbers]=\"true\" [highlight]=\"content\"></code></pre>\n",
69
+ template: "<p\n *ngIf=\"filename\"\n class=\"t-header\"\n>\n {{ filename }}\n</p>\n<pre\n *ngFor=\"let content of processor$ | async\"\n class=\"t-code\"\n><code [lineNumbers]=\"true\" [highlight]=\"content\"></code></pre>\n",
60
70
  styles: [":host{display:block}.t-header{font:var(--tui-font-text-s);font-weight:700}.t-code{margin:0}.t-code+.t-code{margin-top:1rem}.hljs:not(:empty){font:var(--tui-font-text-m);padding:1.5rem 2rem;font-family:monospace;background:var(--tui-clear-disabled);word-wrap:break-word;white-space:pre-wrap}@media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution:0.001dpcm){.hljs:not(:empty)::-webkit-scrollbar,.hljs:not(:empty)::-webkit-scrollbar-thumb{width:1rem;height:1rem;border-radius:6.25rem;background-clip:padding-box;border:2.667rem solid transparent}.hljs:not(:empty)::-webkit-scrollbar{background-color:transparent}.hljs:not(:empty)::-webkit-scrollbar-thumb{background-color:var(--tui-clear-hover)}.hljs:not(:empty)::-webkit-scrollbar-thumb:hover{background-color:var(--tui-clear-active)}.hljs:not(:empty)::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-03)}}:host._has-filename .hljs:not(:empty){border-radius:.75rem}:host-context(tui-root._mobile) .hljs:not(:empty){padding:1rem}"]
61
71
  })
62
72
  ], TuiDocCodeComponent);
@@ -284,7 +294,7 @@ __decorate([
284
294
  TuiDocDemoComponent = TuiDocDemoComponent_1 = __decorate([
285
295
  Component({
286
296
  selector: 'tui-doc-demo',
287
- template: "<div\n class=\"t-bg-toggle\"\n [tuiMode]=\"null\"\n>\n <ng-template #tooltip>\n {{ texts[0] }}\n <a\n tuiLink\n tuiMode=\"onDark\"\n routerLink=\"/directives/mode\"\n >\n <code>tuiMode</code>\n </a>\n </ng-template>\n <ng-container *ngIf=\"isMobile; else desktop\">\n <tui-select\n tuiTextfieldSize=\"s\"\n class=\"t-mode\"\n [tuiTextfieldCleaner]=\"true\"\n [tuiHintContent]=\"tooltip\"\n [formControl]=\"modeControl\"\n >\n tuiMode\n <tui-data-list-wrapper\n *tuiDataList\n [items]=\"items\"\n ></tui-data-list-wrapper>\n </tui-select>\n </ng-container>\n <ng-template #desktop>\n tuiMode:\n <tui-tooltip\n describeId=\"form\"\n [content]=\"tooltip\"\n ></tui-tooltip>\n <div\n tuiGroup\n class=\"t-group\"\n [collapsed]=\"true\"\n >\n <tui-radio-block\n size=\"s\"\n nativeId=\"form\"\n class=\"tui-group__auto-width-item\"\n [item]=\"null\"\n [hideRadio]=\"true\"\n [formControl]=\"modeControl\"\n >\n null\n </tui-radio-block>\n <tui-radio-block\n item=\"onDark\"\n size=\"s\"\n nativeId=\"form\"\n class=\"tui-group__auto-width-item\"\n [hideRadio]=\"true\"\n [formControl]=\"modeControl\"\n >\n onDark\n </tui-radio-block>\n <tui-radio-block\n item=\"onLight\"\n size=\"s\"\n nativeId=\"form\"\n class=\"tui-group__auto-width-item\"\n [hideRadio]=\"true\"\n [formControl]=\"modeControl\"\n >\n onLight\n </tui-radio-block>\n </div>\n </ng-template>\n <tui-checkbox-labeled\n size=\"m\"\n class=\"t-checkbox\"\n [(ngModel)]=\"opaque\"\n >\n {{ texts[1] }}\n </tui-checkbox-labeled>\n</div>\n<div\n #wrapper\n class=\"t-wrapper\"\n [class.t-wrapper_dark]=\"modeControl.value === 'onDark'\"\n [class.t-wrapper_gray]=\"modeControl.value === 'onLight'\"\n [class.t-wrapper_transparent]=\"!opaque\"\n>\n <div\n #content\n id=\"demoContent\"\n class=\"t-content\"\n >\n <form\n *ngIf=\"testForm\"\n class=\"t-form\"\n [formGroup]=\"testForm\"\n >\n <div class=\"t-input-wrapper\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </div>\n <button\n tuiButton\n type=\"button\"\n size=\"s\"\n class=\"t-button\"\n [iconRight]=\"icon\"\n (click)=\"toggleDetails()\"\n >\n {{ texts[2] }}\n </button>\n <ng-template #icon>\n <tui-svg\n src=\"tuiIconChevronDown\"\n class=\"t-icon\"\n [class.t-icon_rotated]=\"expanded\"\n ></tui-svg>\n </ng-template>\n <tui-expand\n class=\"t-expand\"\n [expanded]=\"expanded\"\n >\n <ng-template tuiExpandContent>\n <pre class=\"t-value\">\nForm data: {{ testForm.value | json }}</pre\n >\n <div\n tuiGroup\n class=\"t-form-controls\"\n >\n <tui-select\n tuiTextfieldSize=\"s\"\n class=\"t-select\"\n [ngModel]=\"updateOn\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"updateOnChange($event)\"\n >\n updateOn\n <tui-data-list-wrapper\n *tuiDataList\n [items]=\"updateOnVariants\"\n ></tui-data-list-wrapper>\n </tui-select>\n <button\n tuiButton\n type=\"reset\"\n size=\"s\"\n class=\"tui-group__auto-width-item\"\n >\n Reset\n </button>\n <button\n tuiButton\n type=\"submit\"\n size=\"s\"\n class=\"tui-group__auto-width-item\"\n >\n Submit\n </button>\n </div>\n </ng-template>\n </tui-expand>\n </form>\n <ng-content></ng-content>\n </div>\n <button\n tabindex=\"-1\"\n class=\"t-resizer\"\n (tuiDragStart)=\"onDragStart($event)\"\n (tuiDragContinues)=\"onDragContinues($event)\"\n (tuiDragEnd)=\"onDragEnd()\"\n >\n <span\n #resizerText\n class=\"t-resizer-text\"\n ></span>\n </button>\n</div>\n",
297
+ template: "<div\n class=\"t-bg-toggle\"\n [tuiMode]=\"null\"\n>\n <ng-template #tooltip>\n {{ texts[0] }}\n <a\n tuiLink\n tuiMode=\"onDark\"\n routerLink=\"/directives/mode\"\n >\n <code>tuiMode</code>\n </a>\n </ng-template>\n <ng-container *ngIf=\"isMobile; else desktop\">\n <tui-select\n tuiTextfieldSize=\"s\"\n class=\"t-mode\"\n [tuiTextfieldCleaner]=\"true\"\n [tuiHintContent]=\"tooltip\"\n [formControl]=\"modeControl\"\n >\n tuiMode\n <tui-data-list-wrapper\n *tuiDataList\n [items]=\"items\"\n ></tui-data-list-wrapper>\n </tui-select>\n </ng-container>\n <ng-template #desktop>\n tuiMode:\n <tui-tooltip\n describeId=\"form\"\n [content]=\"tooltip\"\n ></tui-tooltip>\n <div\n tuiGroup\n class=\"t-group\"\n [collapsed]=\"true\"\n >\n <tui-radio-block\n size=\"s\"\n nativeId=\"form\"\n class=\"tui-group__auto-width-item\"\n [item]=\"null\"\n [hideRadio]=\"true\"\n [formControl]=\"modeControl\"\n >\n null\n </tui-radio-block>\n <tui-radio-block\n item=\"onDark\"\n size=\"s\"\n nativeId=\"form\"\n class=\"tui-group__auto-width-item\"\n [hideRadio]=\"true\"\n [formControl]=\"modeControl\"\n >\n onDark\n </tui-radio-block>\n <tui-radio-block\n item=\"onLight\"\n size=\"s\"\n nativeId=\"form\"\n class=\"tui-group__auto-width-item\"\n [hideRadio]=\"true\"\n [formControl]=\"modeControl\"\n >\n onLight\n </tui-radio-block>\n </div>\n </ng-template>\n <tui-checkbox-labeled\n size=\"m\"\n class=\"t-checkbox\"\n [(ngModel)]=\"opaque\"\n >\n {{ texts[1] }}\n </tui-checkbox-labeled>\n</div>\n<div\n #wrapper\n class=\"t-wrapper\"\n [class.t-wrapper_dark]=\"modeControl.value === 'onDark'\"\n [class.t-wrapper_gray]=\"modeControl.value === 'onLight'\"\n [class.t-wrapper_transparent]=\"!opaque\"\n>\n <div\n #content\n id=\"demoContent\"\n class=\"t-content\"\n >\n <form\n *ngIf=\"testForm\"\n class=\"t-form\"\n [formGroup]=\"testForm\"\n >\n <div class=\"t-input-wrapper\">\n <ng-container [ngTemplateOutlet]=\"template\"></ng-container>\n </div>\n <button\n tuiButton\n type=\"button\"\n size=\"s\"\n class=\"t-button\"\n [iconRight]=\"icon\"\n (click)=\"toggleDetails()\"\n >\n {{ texts[2] }}\n </button>\n <ng-template #icon>\n <tui-svg\n src=\"tuiIconChevronDown\"\n class=\"t-icon\"\n [class.t-icon_rotated]=\"expanded\"\n ></tui-svg>\n </ng-template>\n <tui-expand\n class=\"t-expand\"\n [expanded]=\"expanded\"\n >\n <ng-template tuiExpandContent>\n <pre class=\"t-value\">Form data: {{ testForm.value | json }}</pre>\n <div\n tuiGroup\n class=\"t-form-controls\"\n >\n <tui-select\n tuiTextfieldSize=\"s\"\n class=\"t-select\"\n [ngModel]=\"updateOn\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"updateOnChange($event)\"\n >\n updateOn\n <tui-data-list-wrapper\n *tuiDataList\n [items]=\"updateOnVariants\"\n ></tui-data-list-wrapper>\n </tui-select>\n <button\n tuiButton\n type=\"reset\"\n size=\"s\"\n class=\"tui-group__auto-width-item\"\n >\n Reset\n </button>\n <button\n tuiButton\n type=\"submit\"\n size=\"s\"\n class=\"tui-group__auto-width-item\"\n >\n Submit\n </button>\n </div>\n </ng-template>\n </tui-expand>\n </form>\n <ng-content></ng-content>\n </div>\n <button\n tabindex=\"-1\"\n class=\"t-resizer\"\n (tuiDragStart)=\"onDragStart($event)\"\n (tuiDragContinues)=\"onDragContinues($event)\"\n (tuiDragEnd)=\"onDragEnd()\"\n >\n <span\n #resizerText\n class=\"t-resizer-text\"\n ></span>\n </button>\n</div>\n",
288
298
  changeDetection: ChangeDetectionStrategy.OnPush,
289
299
  providers: [
290
300
  TuiDestroyService,
@@ -335,11 +345,19 @@ TuiDocDemoModule = __decorate([
335
345
  ], TuiDocDemoModule);
336
346
 
337
347
  /**
348
+ * TODO: duplicate, need fix it before v3
338
349
  * TODO: move another package for reuse between addon-editor and addon-doc
350
+ * @deprecated: use {@link tuiRgbToHex} instead
339
351
  */
352
+ // eslint-disable-next-line @typescript-eslint/naming-convention
340
353
  function rgbToHex(r, g, b) {
341
354
  return `#${[r, g, b].map(x => x.toString(16).padStart(2, '0')).join('')}`;
342
355
  }
356
+ const tuiRgbToHex = rgbToHex;
357
+ /**
358
+ * @deprecated: use {@link tuiHexToRgb} instead
359
+ */
360
+ // eslint-disable-next-line @typescript-eslint/naming-convention
343
361
  function hexToRgb(hex) {
344
362
  const matches = hex
345
363
  .replace('#', '')
@@ -351,6 +369,7 @@ function hexToRgb(hex) {
351
369
  ? matches.map(x => Number.parseInt(x, 16))
352
370
  : [0, 0, 0];
353
371
  }
372
+ const tuiHexToRgb = hexToRgb;
354
373
 
355
374
  function inspectArray(array, depth) {
356
375
  if (depth === 0) {
@@ -390,11 +409,13 @@ function inspectObject(object, depth) {
390
409
  return `{${result}}`;
391
410
  }
392
411
  /**
412
+ * @deprecated: use {@link tuiInspectAny} instead
393
413
  * Returns readable JS entity
394
414
  * @param data
395
415
  * @param depth
396
416
  * @return readable JS entity
397
417
  */
418
+ // eslint-disable-next-line @typescript-eslint/naming-convention
398
419
  function inspectAny(data, depth) {
399
420
  if (data === null) {
400
421
  return 'null';
@@ -416,8 +437,12 @@ function inspectAny(data, depth) {
416
437
  }
417
438
  return inspectObject(data, depth);
418
439
  }
440
+ const tuiInspectAny = inspectAny;
419
441
 
420
- /* eslint-disable unicorn/no-unsafe-regex */
442
+ /**
443
+ * @deprecated: use {@link tuiCoerceValue} instead
444
+ */
445
+ // eslint-disable-next-line @typescript-eslint/naming-convention
421
446
  function coerceValue(value) {
422
447
  const prepared = String(value).trim();
423
448
  if (isEmptyParamValue(prepared)) {
@@ -439,6 +464,7 @@ function coerceValue(value) {
439
464
  return decodedValue;
440
465
  }
441
466
  }
467
+ const tuiCoerceValue = coerceValue;
442
468
  function isEmptyParamValue(value) {
443
469
  return ['undefined', 'null', 'NaN', 'Infinity'].includes(value);
444
470
  }
@@ -447,6 +473,7 @@ function isBooleanParamValue(value) {
447
473
  }
448
474
  function isNumberParamValue(value) {
449
475
  // TODO: investigate to disallow potentially catastrophic exponential-time regular expressions.
476
+ // eslint-disable-next-line unicorn/no-unsafe-regex
450
477
  return /^-?[\d.]+(?:e-?\d+)?$/.test(value);
451
478
  }
452
479
  function isPossibleArray(value) {
@@ -681,7 +708,7 @@ __decorate([
681
708
  TuiDocDocumentationComponent = __decorate([
682
709
  Component({
683
710
  selector: 'tui-doc-documentation',
684
- template: "<h1\n *ngIf=\"heading\"\n class=\"t-heading\"\n>\n {{ heading }}\n</h1>\n<ng-content></ng-content>\n<table class=\"t-table\">\n <tr class=\"t-row t-row_header\">\n <th class=\"t-th t-cell t-cell_prop\">{{ texts[2] }}</th>\n <th class=\"t-th\">{{ type }}</th>\n <th\n *ngIf=\"showValues && !isAPI\"\n class=\"t-th t-cell t-cell_value\"\n >\n {{ texts[3] }}\n </th>\n </tr>\n <tr\n *ngFor=\"let propertyConnector of propertiesConnectors\"\n class=\"t-row\"\n [class.t-deprecated]=\"propertyConnector.documentationPropertyDeprecated\"\n >\n <td class=\"t-cell\">\n <div\n automation-id=\"tui-documentation__property-name\"\n class=\"t-property\"\n >\n {{ stripOptional(propertyConnector.attrName) }}\n <tui-badge\n *ngIf=\"isOptional(propertyConnector.attrName)\"\n size=\"s\"\n value=\"Optional\"\n ></tui-badge>\n </div>\n <span\n *ngIf=\"propertyConnector.documentationPropertyDeprecated\"\n class=\"t-deprecated-label\"\n >\n deprecated\n </span>\n <ng-container\n *ngTemplateOutlet=\"propertyConnector.template\"\n ></ng-container>\n </td>\n <td class=\"t-cell\">\n <span class=\"type\">\n {{ propertyConnector.documentationPropertyType }}\n <tui-tooltip\n *ngIf=\"showContentTooltip(propertyConnector.documentationPropertyType)\"\n [describeId]=\"propertyConnector.attrName\"\n [content]=\"content\"\n >\n <ng-template #content>\n {{ texts[4] }}\n <a\n tuiLink\n tuiMode=\"onDark\"\n target=\"_blank\"\n href=\"https://github.com/tinkoff/ng-polymorpheus\"\n >\n <code>ng-polymorpheus</code>\n </a>\n </ng-template>\n </tui-tooltip>\n </span>\n </td>\n <td\n *ngIf=\"showValues\"\n class=\"t-cell\"\n >\n <ng-container\n *ngIf=\"propertyConnector.shouldShowValues; else elseEmitter\"\n >\n <tui-select\n *ngIf=\"propertyConnector.hasItems; else noItems\"\n tuiTextfieldSize=\"m\"\n tuiDropdownLimitWidth=\"min\"\n [tuiTextfieldCleaner]=\"showCleaner(propertyConnector.documentationPropertyType)\"\n [tuiTextfieldLabelOutside]=\"true\"\n [nativeId]=\"propertyConnector.attrName\"\n [valueContent]=\"selectContent\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n >\n <code class=\"t-exception\">null</code>\n <tui-data-list-wrapper\n *tuiDataList\n [items]=\"propertyConnector.documentationPropertyValues\"\n [itemContent]=\"selectContent\"\n ></tui-data-list-wrapper>\n </tui-select>\n <ng-template\n #selectContent\n let-data\n >\n <code>{{ inspectAny(data) }}</code>\n </ng-template>\n\n <ng-template #noItems>\n <ng-container\n [ngSwitch]=\"propertyConnector.documentationPropertyType\"\n >\n <tui-toggle\n *ngSwitchCase=\"'boolean'\"\n size=\"l\"\n [nativeId]=\"propertyConnector.attrName\"\n [showIcons]=\"true\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n ></tui-toggle>\n\n <tui-primitive-textfield\n *ngSwitchCase=\"'string'\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [tuiTextfieldCleaner]=\"true\"\n [value]=\"propertyConnector.documentationPropertyValue || ''\"\n (valueChange)=\"propertyConnector.onValueChange($event)\"\n ></tui-primitive-textfield>\n\n <div\n *ngSwitchCase=\"'color'\"\n tuiGroup\n >\n <tui-primitive-textfield\n tuiTextfieldType=\"text\"\n tuiTextfieldSize=\"m\"\n [attr.id]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [tuiInputOpacity]=\"getOpacity(propertyConnector.documentationPropertyValue)\"\n [value]=\"getColor(propertyConnector.documentationPropertyValue)\"\n (valueChange)=\"onColorChange(propertyConnector, $event)\"\n ></tui-primitive-textfield>\n <tui-input-count\n tuiTextfieldSize=\"m\"\n [max]=\"100\"\n [ngModel]=\"getOpacity(propertyConnector.documentationPropertyValue)\"\n (ngModelChange)=\"onOpacityChange(propertyConnector, $event)\"\n >\n Opacity\n </tui-input-count>\n </div>\n\n <tui-input-count\n *ngSwitchCase=\"'number'\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n ></tui-input-count>\n\n <ng-container *ngSwitchCase=\"'PolymorpheusContent'\">\n <tui-primitive-textfield\n *ngIf=\"isPrimitivePolymorpheusContent(propertyConnector.documentationPropertyValue)\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [tuiTextfieldCleaner]=\"true\"\n [value]=\"propertyConnector.documentationPropertyValue.toString()\"\n (valueChange)=\"propertyConnector.onValueChange($event)\"\n >\n Default content\n </tui-primitive-textfield>\n </ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n\n <ng-template #elseEmitter>\n <tui-notification\n class=\"t-output\"\n [@emitEvent]=\"propertyConnector.emits$ | async\"\n >\n Emit!\n </tui-notification>\n </ng-template>\n </td>\n </tr>\n</table>\n",
711
+ template: "<h1\n *ngIf=\"heading\"\n class=\"t-heading\"\n>\n {{ heading }}\n</h1>\n<ng-content></ng-content>\n<table class=\"t-table\">\n <tr class=\"t-row t-row_header\">\n <th class=\"t-th t-cell t-cell_prop\">{{ texts[2] }}</th>\n <th class=\"t-th\">{{ type }}</th>\n <th\n *ngIf=\"showValues && !isAPI\"\n class=\"t-th t-cell t-cell_value\"\n >\n {{ texts[3] }}\n </th>\n </tr>\n <tr\n *ngFor=\"let propertyConnector of propertiesConnectors\"\n class=\"t-row\"\n [class.t-deprecated]=\"propertyConnector.documentationPropertyDeprecated\"\n >\n <td class=\"t-cell\">\n <div\n automation-id=\"tui-documentation__property-name\"\n class=\"t-property\"\n >\n {{ stripOptional(propertyConnector.attrName) }}\n <tui-badge\n *ngIf=\"isOptional(propertyConnector.attrName)\"\n size=\"s\"\n value=\"Optional\"\n ></tui-badge>\n </div>\n <span\n *ngIf=\"propertyConnector.documentationPropertyDeprecated\"\n class=\"t-deprecated-label\"\n >\n deprecated\n </span>\n <ng-container [ngTemplateOutlet]=\"propertyConnector.template\"></ng-container>\n </td>\n <td class=\"t-cell\">\n <span class=\"type\">\n {{ propertyConnector.documentationPropertyType }}\n <tui-tooltip\n *ngIf=\"showContentTooltip(propertyConnector.documentationPropertyType)\"\n [describeId]=\"propertyConnector.attrName\"\n [content]=\"content\"\n >\n <ng-template #content>\n {{ texts[4] }}\n <a\n tuiLink\n tuiMode=\"onDark\"\n target=\"_blank\"\n href=\"https://github.com/tinkoff/ng-polymorpheus\"\n >\n <code>ng-polymorpheus</code>\n </a>\n </ng-template>\n </tui-tooltip>\n </span>\n </td>\n <td\n *ngIf=\"showValues\"\n class=\"t-cell\"\n >\n <ng-container *ngIf=\"propertyConnector.shouldShowValues; else elseEmitter\">\n <tui-select\n *ngIf=\"propertyConnector.hasItems; else noItems\"\n tuiTextfieldSize=\"m\"\n tuiDropdownLimitWidth=\"min\"\n [tuiTextfieldCleaner]=\"showCleaner(propertyConnector.documentationPropertyType)\"\n [tuiTextfieldLabelOutside]=\"true\"\n [nativeId]=\"propertyConnector.attrName\"\n [valueContent]=\"selectContent\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n >\n <code class=\"t-exception\">null</code>\n <tui-data-list-wrapper\n *tuiDataList\n [items]=\"propertyConnector.documentationPropertyValues\"\n [itemContent]=\"selectContent\"\n ></tui-data-list-wrapper>\n </tui-select>\n <ng-template\n #selectContent\n let-data\n >\n <code>{{ inspectAny(data) }}</code>\n </ng-template>\n\n <ng-template #noItems>\n <ng-container [ngSwitch]=\"propertyConnector.documentationPropertyType\">\n <tui-toggle\n *ngSwitchCase=\"'boolean'\"\n size=\"l\"\n [nativeId]=\"propertyConnector.attrName\"\n [showIcons]=\"true\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n ></tui-toggle>\n\n <tui-primitive-textfield\n *ngSwitchCase=\"'string'\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [tuiTextfieldCleaner]=\"true\"\n [value]=\"propertyConnector.documentationPropertyValue || ''\"\n (valueChange)=\"propertyConnector.onValueChange($event)\"\n ></tui-primitive-textfield>\n\n <div\n *ngSwitchCase=\"'color'\"\n tuiGroup\n >\n <tui-primitive-textfield\n tuiTextfieldType=\"text\"\n tuiTextfieldSize=\"m\"\n [attr.id]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [tuiInputOpacity]=\"getOpacity(propertyConnector.documentationPropertyValue)\"\n [value]=\"getColor(propertyConnector.documentationPropertyValue)\"\n (valueChange)=\"onColorChange(propertyConnector, $event)\"\n ></tui-primitive-textfield>\n <tui-input-count\n tuiTextfieldSize=\"m\"\n [max]=\"100\"\n [ngModel]=\"getOpacity(propertyConnector.documentationPropertyValue)\"\n (ngModelChange)=\"onOpacityChange(propertyConnector, $event)\"\n >\n Opacity\n </tui-input-count>\n </div>\n\n <tui-input-count\n *ngSwitchCase=\"'number'\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n ></tui-input-count>\n\n <ng-container *ngSwitchCase=\"'PolymorpheusContent'\">\n <tui-primitive-textfield\n *ngIf=\"isPrimitivePolymorpheusContent(propertyConnector.documentationPropertyValue)\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [tuiTextfieldCleaner]=\"true\"\n [value]=\"propertyConnector.documentationPropertyValue.toString()\"\n (valueChange)=\"propertyConnector.onValueChange($event)\"\n >\n Default content\n </tui-primitive-textfield>\n </ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n\n <ng-template #elseEmitter>\n <tui-notification\n class=\"t-output\"\n [@emitEvent]=\"propertyConnector.emits$ | async\"\n >\n Emit!\n </tui-notification>\n </ng-template>\n </td>\n </tr>\n</table>\n",
685
712
  changeDetection: ChangeDetectionStrategy.OnPush,
686
713
  animations: [
687
714
  trigger('emitEvent', [
@@ -766,10 +793,18 @@ TuiDocDocumentationModule = __decorate([
766
793
  })
767
794
  ], TuiDocDocumentationModule);
768
795
 
796
+ const TUI_DOC_CODE_ACTIONS = new InjectionToken('Code actions for the opened tab with code example', {
797
+ factory: () => '',
798
+ });
799
+
769
800
  const TUI_DOC_CODE_EDITOR = new InjectionToken('Contains service for opening online IDE e.g. Stackblitz');
770
801
 
771
802
  const TUI_DOC_EXAMPLE_CONTENT_PROCESSOR = new InjectionToken('Processes content in example', { factory: () => identity });
772
803
 
804
+ /**
805
+ * @deprecated: use {@link tuiRawLoadRecord} instead
806
+ */
807
+ // eslint-disable-next-line @typescript-eslint/naming-convention
773
808
  function rawLoadRecord(example) {
774
809
  return __awaiter(this, void 0, void 0, function* () {
775
810
  const processedContent = {};
@@ -781,11 +816,12 @@ function rawLoadRecord(example) {
781
816
  return processedContent;
782
817
  });
783
818
  }
819
+ const tuiRawLoadRecord = rawLoadRecord;
784
820
 
785
821
  // Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395
786
822
  // @dynamic
787
823
  let TuiDocExampleComponent = class TuiDocExampleComponent {
788
- constructor(id, clipboard, notifications, location, copyTexts$, texts, codeEditor, processContent, isCypress) {
824
+ constructor(id, clipboard, notifications, location, copyTexts$, texts, codeEditor, processContent, isCypress, codeActions) {
789
825
  this.id = id;
790
826
  this.clipboard = clipboard;
791
827
  this.notifications = notifications;
@@ -795,6 +831,7 @@ let TuiDocExampleComponent = class TuiDocExampleComponent {
795
831
  this.codeEditor = codeEditor;
796
832
  this.processContent = processContent;
797
833
  this.isCypress = isCypress;
834
+ this.codeActions = codeActions;
798
835
  this.rawLoader$$ = new BehaviorSubject({});
799
836
  this.heading = '';
800
837
  this.description = '';
@@ -838,7 +875,8 @@ TuiDocExampleComponent.ctorParameters = () => [
838
875
  { type: Array, decorators: [{ type: Inject, args: [TUI_DOC_EXAMPLE_TEXTS,] }] },
839
876
  { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [TUI_DOC_CODE_EDITOR,] }] },
840
877
  { type: undefined, decorators: [{ type: Inject, args: [TUI_DOC_EXAMPLE_CONTENT_PROCESSOR,] }] },
841
- { type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_CYPRESS,] }] }
878
+ { type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_CYPRESS,] }] },
879
+ { type: Array, decorators: [{ type: Inject, args: [TUI_DOC_CODE_ACTIONS,] }] }
842
880
  ];
843
881
  __decorate([
844
882
  Input()
@@ -855,9 +893,9 @@ __decorate([
855
893
  TuiDocExampleComponent = __decorate([
856
894
  Component({
857
895
  selector: 'tui-doc-example',
858
- template: "<h3\n *ngIf=\"heading\"\n class=\"t-title\"\n>\n <span\n polymorpheus-outlet\n [content]=\"heading | tuiDocExampleCapitalize\"\n ></span>\n <button\n *ngIf=\"id\"\n tuiIconButton\n type=\"button\"\n size=\"xs\"\n icon=\"tuiIconLinkLarge\"\n appearance=\"icon\"\n class=\"t-link-icon\"\n [title]=\"copy$ | async\"\n (click)=\"copyExampleLink()\"\n ></button>\n</h3>\n<h4\n *ngIf=\"description\"\n polymorpheus-outlet\n class=\"t-description\"\n [content]=\"description | tuiDocExampleCapitalize\"\n></h4>\n\n<div\n *ngIf=\"processor$ | async as files\"\n class=\"t-example\"\n>\n <ng-container *ngIf=\"files | tuiDocExampleGetTabs: defaultTab as tabs\">\n <div class=\"t-tabs-wrapper\">\n <tui-tabs-with-more\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n <ng-container *ngFor=\"let tab of tabs\">\n <button\n *tuiTab\n tuiTab\n >\n {{tab}}\n </button>\n </ng-container>\n </tui-tabs-with-more>\n\n <button\n *ngIf=\"codeEditor\"\n tuiButton\n appearance=\"flat\"\n size=\"s\"\n [showLoader]=\"!!(loading$ | async)\"\n (click)=\"edit(files)\"\n >\n Edit on {{codeEditor.name}}\n </button>\n </div>\n\n <div\n *ngFor=\"let tab of tabs; let index = index\"\n class=\"t-content\"\n [class.t-content_animated]=\"!isCypress\"\n [class.t-content_visible]=\"activeItemIndex === index\"\n >\n <ng-container *ngIf=\"index === defaultTabIndex; else anotherTab\">\n <ng-container *ngTemplateOutlet=\"preview\"></ng-container>\n </ng-container>\n <ng-template #anotherTab>\n <ng-container\n *ngTemplateOutlet=\"codeSection; context: { $implicit: files[tabs[activeItemIndex]] || '' }\"\n ></ng-container>\n </ng-template>\n </div>\n </ng-container>\n</div>\n\n<ng-template #preview>\n <div\n automation-id=\"tui-doc-example\"\n class=\"t-demo\"\n >\n <ng-content></ng-content>\n </div>\n</ng-template>\n\n<ng-template\n #codeSection\n let-code\n>\n <tui-doc-copy\n class=\"t-copy-code\"\n [cdkCopyToClipboard]=\"code\"\n ></tui-doc-copy>\n <tui-doc-code [code]=\"code\"></tui-doc-code>\n</ng-template>\n",
896
+ template: "<h3\n *ngIf=\"heading\"\n class=\"t-title\"\n>\n <span\n polymorpheus-outlet\n [content]=\"heading | tuiDocExampleCapitalize\"\n ></span>\n <button\n *ngIf=\"id\"\n tuiIconButton\n type=\"button\"\n size=\"xs\"\n icon=\"tuiIconLinkLarge\"\n appearance=\"icon\"\n class=\"t-link-icon\"\n [title]=\"copy$ | async\"\n (click)=\"copyExampleLink()\"\n ></button>\n</h3>\n<h4\n *ngIf=\"description\"\n polymorpheus-outlet\n class=\"t-description\"\n [content]=\"description | tuiDocExampleCapitalize\"\n></h4>\n\n<div\n *ngIf=\"processor$ | async as files\"\n class=\"t-example\"\n>\n <ng-container *ngIf=\"files | tuiDocExampleGetTabs: defaultTab as tabs\">\n <div class=\"t-tabs-wrapper\">\n <tui-tabs-with-more\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n <ng-container *ngFor=\"let tab of tabs\">\n <button\n *tuiTab\n tuiTab\n >\n {{ tab }}\n </button>\n </ng-container>\n </tui-tabs-with-more>\n\n <button\n *ngIf=\"codeEditor\"\n tuiButton\n appearance=\"flat\"\n size=\"s\"\n [showLoader]=\"!!(loading$ | async)\"\n (click)=\"edit(files)\"\n >\n Edit on {{ codeEditor.name }}\n </button>\n </div>\n\n <div\n *ngFor=\"let tab of tabs; let index = index\"\n class=\"t-content\"\n [class.t-content_animated]=\"!isCypress\"\n [class.t-content_visible]=\"activeItemIndex === index\"\n >\n <ng-container\n *ngIf=\"index === defaultTabIndex; else anotherTab\"\n [ngTemplateOutlet]=\"preview\"\n ></ng-container>\n <ng-template #anotherTab>\n <ng-container\n [ngTemplateOutlet]=\"codeSection\"\n [ngTemplateOutletContext]=\"{$implicit: files[tabs[activeItemIndex]] || ''}\"\n ></ng-container>\n </ng-template>\n </div>\n </ng-container>\n</div>\n\n<ng-template #preview>\n <div\n automation-id=\"tui-doc-example\"\n class=\"t-demo\"\n >\n <ng-content></ng-content>\n </div>\n</ng-template>\n\n<ng-template\n #codeSection\n let-code\n>\n <section class=\"t-code-actions\">\n <ng-container *ngFor=\"let action of codeActions\">\n <div\n polymorpheus-outlet\n [content]=\"action\"\n [context]=\"{$implicit: code}\"\n ></div>\n </ng-container>\n <tui-doc-copy [cdkCopyToClipboard]=\"code\"></tui-doc-copy>\n </section>\n <tui-doc-code [code]=\"code\"></tui-doc-code>\n</ng-template>\n",
859
897
  changeDetection: ChangeDetectionStrategy.OnPush,
860
- styles: [":host{position:relative;display:block;padding-top:3.5rem;clear:right}:host :host-context(tui-root._mobile){padding-top:2rem}.t-title{font:var(--tui-font-heading-5);margin:0 0 .5rem}:host-context(tui-root._mobile) .t-title{font:var(--tui-font-heading-6)}.t-description{font:var(--tui-font-text-m);font-weight:400;margin:0}.t-example{position:relative;margin-top:1.5rem;border:1px solid var(--tui-base-03);border-radius:var(--tui-radius-m);box-shadow:0 .125rem .1875rem rgba(0,0,0,.1)}:host-context(tui-root._mobile) .t-example{margin-top:.75rem}.t-tabs-wrapper{display:flex;padding:0 2rem;box-shadow:inset 0 -1px var(--tui-base-03);justify-content:space-between;align-items:center}:host-context(tui-root._mobile) .t-tabs-wrapper{padding:0 1rem}.t-tabs{flex-grow:1}.t-demo{padding:2rem;overflow-x:auto}@media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution:0.001dpcm){.t-demo::-webkit-scrollbar,.t-demo::-webkit-scrollbar-thumb{width:1rem;height:1rem;border-radius:6.25rem;background-clip:padding-box;border:2.667rem solid transparent}.t-demo::-webkit-scrollbar{background-color:transparent}.t-demo::-webkit-scrollbar-thumb{background-color:var(--tui-clear-hover)}.t-demo::-webkit-scrollbar-thumb:hover{background-color:var(--tui-clear-active)}.t-demo::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-03)}}:host-context(tui-root._mobile) .t-demo{padding:1rem}.t-copy-code{position:absolute;top:4.375rem;right:1rem}.t-link-icon{margin-left:.3rem;vertical-align:baseline}.t-content{will-change:opacity;height:0;visibility:hidden;opacity:0}.t-content_animated{transition:opacity .3s ease-in-out}.t-content_visible{height:auto;visibility:visible;opacity:1}"]
898
+ styles: [":host{position:relative;display:block;padding-top:3.5rem;clear:right}:host :host-context(tui-root._mobile){padding-top:2rem}.t-title{font:var(--tui-font-heading-5);margin:0 0 .5rem}:host-context(tui-root._mobile) .t-title{font:var(--tui-font-heading-6)}.t-description{font:var(--tui-font-text-m);font-weight:400;margin:0}.t-example{position:relative;margin-top:1.5rem;border:1px solid var(--tui-base-03);border-radius:var(--tui-radius-m);box-shadow:0 .125rem .1875rem rgba(0,0,0,.1)}:host-context(tui-root._mobile) .t-example{margin-top:.75rem}.t-tabs-wrapper{display:flex;padding:0 2rem;box-shadow:inset 0 -1px var(--tui-base-03);justify-content:space-between;align-items:center}:host-context(tui-root._mobile) .t-tabs-wrapper{padding:0 1rem}.t-tabs{flex-grow:1}.t-demo{padding:2rem;overflow-x:auto}@media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution:0.001dpcm){.t-demo::-webkit-scrollbar,.t-demo::-webkit-scrollbar-thumb{width:1rem;height:1rem;border-radius:6.25rem;background-clip:padding-box;border:2.667rem solid transparent}.t-demo::-webkit-scrollbar{background-color:transparent}.t-demo::-webkit-scrollbar-thumb{background-color:var(--tui-clear-hover)}.t-demo::-webkit-scrollbar-thumb:hover{background-color:var(--tui-clear-active)}.t-demo::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-03)}}:host-context(tui-root._mobile) .t-demo{padding:1rem}.t-code-actions{position:absolute;top:4.375rem;right:1rem;display:flex;justify-content:flex-end;align-items:center}.t-code-actions>*{margin-left:.5rem}.t-link-icon{margin-left:.3rem;vertical-align:baseline}.t-content{will-change:opacity;height:0;visibility:hidden;opacity:0}.t-content_animated{transition:opacity .3s ease-in-out}.t-content_visible{height:auto;visibility:visible;opacity:1}"]
861
899
  }),
862
900
  __param(0, Attribute('id')),
863
901
  __param(1, Inject(Clipboard)),
@@ -868,7 +906,8 @@ TuiDocExampleComponent = __decorate([
868
906
  __param(6, Optional()),
869
907
  __param(6, Inject(TUI_DOC_CODE_EDITOR)),
870
908
  __param(7, Inject(TUI_DOC_EXAMPLE_CONTENT_PROCESSOR)),
871
- __param(8, Inject(TUI_IS_CYPRESS))
909
+ __param(8, Inject(TUI_IS_CYPRESS)),
910
+ __param(9, Inject(TUI_DOC_CODE_ACTIONS))
872
911
  ], TuiDocExampleComponent);
873
912
 
874
913
  let TuiDocExampleCapitalizePipe = class TuiDocExampleCapitalizePipe {
@@ -960,6 +999,8 @@ TuiDocMainComponent = TuiDocMainComponent_1 = __decorate([
960
999
  __param(1, Inject(WINDOW))
961
1000
  ], TuiDocMainComponent);
962
1001
 
1002
+ const TUI_DOC_PAGE_LOADED = new InjectionToken('[TUI_DOC_PAGE_LOADED] Stream that emits if loading of page is over (for example, to begin scrollIntoView)', { factory: () => defer(() => timer(200).pipe(switchMapTo(of(true)))) });
1003
+
963
1004
  /**
964
1005
  * @deprecated: use {@link TuiScrollIntoViewLinkDirective}
965
1006
  * TODO: remove in v3.0
@@ -967,10 +1008,11 @@ TuiDocMainComponent = TuiDocMainComponent_1 = __decorate([
967
1008
  let ScrollIntoViewDirective =
968
1009
  // eslint-disable-next-line @typescript-eslint/naming-convention
969
1010
  class ScrollIntoViewDirective {
970
- constructor(destroy$, { nativeElement }) {
971
- this.scroll$ = new Subject();
972
- this.scroll$
973
- .pipe(debounceTime(750), filter(shallWe => shallWe && !!getElementObscurers(nativeElement)), takeUntil(destroy$))
1011
+ constructor(destroy$, { nativeElement }, readyToScroll$) {
1012
+ this.readyToScroll$ = readyToScroll$;
1013
+ this.scroll$ = new ReplaySubject(1);
1014
+ this.readyToScroll$
1015
+ .pipe(filter(Boolean), switchMapTo(this.scroll$), debounceTime(750), filter(shallWe => shallWe && !!getElementObscurers(nativeElement)), takeUntil(destroy$))
974
1016
  .subscribe(() => {
975
1017
  nativeElement.scrollIntoView();
976
1018
  });
@@ -981,7 +1023,8 @@ class ScrollIntoViewDirective {
981
1023
  };
982
1024
  ScrollIntoViewDirective.ctorParameters = () => [
983
1025
  { type: TuiDestroyService, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
984
- { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
1026
+ { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
1027
+ { type: Observable, decorators: [{ type: Inject, args: [TUI_DOC_PAGE_LOADED,] }] }
985
1028
  ];
986
1029
  __decorate([
987
1030
  Input()
@@ -994,7 +1037,8 @@ ScrollIntoViewDirective = __decorate([
994
1037
  // eslint-disable-next-line @typescript-eslint/naming-convention
995
1038
  ,
996
1039
  __param(0, Inject(TuiDestroyService)),
997
- __param(1, Inject(ElementRef))
1040
+ __param(1, Inject(ElementRef)),
1041
+ __param(2, Inject(TUI_DOC_PAGE_LOADED))
998
1042
  ], ScrollIntoViewDirective);
999
1043
  let TuiScrollIntoViewLinkDirective = class TuiScrollIntoViewLinkDirective extends ScrollIntoViewDirective {
1000
1044
  };
@@ -1029,6 +1073,8 @@ TuiScrollIntoViewLinkModule = __decorate([
1029
1073
  })
1030
1074
  ], TuiScrollIntoViewLinkModule);
1031
1075
 
1076
+ const TUI_DOC_SCROLL_BEHAVIOR = new InjectionToken('[TUI_DOC_SCROLL_BEHAVIOR] Defines the transition animation for scroll', { factory: () => 'smooth' });
1077
+
1032
1078
  const MAP = {
1033
1079
  а: 'f',
1034
1080
  б: ',',
@@ -1064,10 +1110,12 @@ const MAP = {
1064
1110
  я: 'z',
1065
1111
  };
1066
1112
  /**
1113
+ * @deprecated: use {@link tuiTransliterateKeyboardLayout} instead
1067
1114
  * Translates text mistakenly typed in the Russian layout into English
1068
1115
  * @param string string with Russian layout characters
1069
1116
  * @return string with English layout characters
1070
1117
  */
1118
+ // eslint-disable-next-line @typescript-eslint/naming-convention
1071
1119
  function transliterateKeyboardLayout(string) {
1072
1120
  let newStr = '';
1073
1121
  for (let i = 0; i < string.length; i++) {
@@ -1075,6 +1123,7 @@ function transliterateKeyboardLayout(string) {
1075
1123
  }
1076
1124
  return newStr;
1077
1125
  }
1126
+ const tuiTransliterateKeyboardLayout = transliterateKeyboardLayout;
1078
1127
 
1079
1128
  const TUI_DOC_PAGES = new InjectionToken('Documentation pages', {
1080
1129
  factory: () => [],
@@ -1105,15 +1154,18 @@ const NAVIGATION_PROVIDERS = [
1105
1154
  useFactory: itemsProviderFactory,
1106
1155
  },
1107
1156
  ];
1157
+ // eslint-disable-next-line @typescript-eslint/naming-convention
1108
1158
  function titleProviderFactory(router, activatedRoute, titlePrefix, destroy$) {
1109
1159
  return router.events.pipe(filter(event => event instanceof NavigationEnd), map(() => activatedRoute.firstChild), filter(isPresent), mergeMap(({ data }) => data), map(({ title }) => titlePrefix + title), takeUntil(destroy$));
1110
1160
  }
1161
+ // eslint-disable-next-line @typescript-eslint/naming-convention
1111
1162
  function labelsProviderFactory(pages) {
1112
1163
  return pages
1113
1164
  .map(({ section }) => section)
1114
1165
  .filter(isPresent)
1115
1166
  .filter((item, index, array) => array.indexOf(item) === index);
1116
1167
  }
1168
+ // eslint-disable-next-line @typescript-eslint/naming-convention
1117
1169
  function itemsProviderFactory(pages) {
1118
1170
  const labels = labelsProviderFactory(pages);
1119
1171
  return [
@@ -1122,10 +1174,9 @@ function itemsProviderFactory(pages) {
1122
1174
  ];
1123
1175
  }
1124
1176
 
1125
- const SCROLL_INTO_VIEW_DELAY = 200;
1126
1177
  // @dynamic
1127
1178
  let TuiDocNavigationComponent = class TuiDocNavigationComponent {
1128
- constructor(changeDetectorRef, titleService, title$, documentRef, mode, sidebar, labels, items, searchText, router, activatedRoute) {
1179
+ constructor(changeDetectorRef, titleService, title$, documentRef, mode, sidebar, labels, items, searchText, router, activatedRoute, destroy$, readyToScroll$, scrollBehavior) {
1129
1180
  this.documentRef = documentRef;
1130
1181
  this.mode = mode;
1131
1182
  this.sidebar = sidebar;
@@ -1134,6 +1185,9 @@ let TuiDocNavigationComponent = class TuiDocNavigationComponent {
1134
1185
  this.searchText = searchText;
1135
1186
  this.router = router;
1136
1187
  this.activatedRoute = activatedRoute;
1188
+ this.destroy$ = destroy$;
1189
+ this.readyToScroll$ = readyToScroll$;
1190
+ this.scrollBehavior = scrollBehavior;
1137
1191
  this.menuOpen = false;
1138
1192
  this.search = '';
1139
1193
  this.open = false;
@@ -1202,9 +1256,9 @@ let TuiDocNavigationComponent = class TuiDocNavigationComponent {
1202
1256
  return this.router.isActive(route, false);
1203
1257
  }
1204
1258
  handleAnchorLink(hash) {
1205
- setTimeout(() => {
1206
- this.navigateToAnchorLink(hash);
1207
- }, SCROLL_INTO_VIEW_DELAY);
1259
+ this.readyToScroll$
1260
+ .pipe(filter(Boolean), take(1), takeUntil(this.destroy$))
1261
+ .subscribe(() => this.navigateToAnchorLink(hash));
1208
1262
  }
1209
1263
  openActivePageGroup() {
1210
1264
  this.items.forEach((pages, pagesIndex) => {
@@ -1234,7 +1288,7 @@ let TuiDocNavigationComponent = class TuiDocNavigationComponent {
1234
1288
  element.scrollIntoView({
1235
1289
  block: 'start',
1236
1290
  inline: 'nearest',
1237
- behavior: 'smooth',
1291
+ behavior: this.scrollBehavior,
1238
1292
  });
1239
1293
  }
1240
1294
  };
@@ -1249,7 +1303,10 @@ TuiDocNavigationComponent.ctorParameters = () => [
1249
1303
  { type: undefined, decorators: [{ type: Inject, args: [NAVIGATION_ITEMS,] }] },
1250
1304
  { type: String, decorators: [{ type: Inject, args: [TUI_DOC_SEARCH_TEXT,] }] },
1251
1305
  { type: Router, decorators: [{ type: Inject, args: [Router,] }] },
1252
- { type: ActivatedRoute, decorators: [{ type: Inject, args: [ActivatedRoute,] }] }
1306
+ { type: ActivatedRoute, decorators: [{ type: Inject, args: [ActivatedRoute,] }] },
1307
+ { type: Observable, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
1308
+ { type: Observable, decorators: [{ type: Inject, args: [TUI_DOC_PAGE_LOADED,] }] },
1309
+ { type: undefined, decorators: [{ type: Inject, args: [TUI_DOC_SCROLL_BEHAVIOR,] }] }
1253
1310
  ];
1254
1311
  __decorate([
1255
1312
  HostBinding('class._open')
@@ -1263,7 +1320,7 @@ __decorate([
1263
1320
  TuiDocNavigationComponent = __decorate([
1264
1321
  Component({
1265
1322
  selector: 'tui-doc-navigation',
1266
- template: "<tui-hosted-dropdown\n *tuiLet=\"filteredItems as filtered\"\n tuiAutoFocus\n tuiDropdownLimitWidth=\"fixed\"\n class=\"t-input\"\n [autoFocus]=\"!!sidebar\"\n [content]=\"dropdown\"\n [canOpen]=\"canOpen\"\n [(open)]=\"open\"\n>\n <tui-primitive-textfield\n iconAlign=\"left\"\n tuiTextfieldSize=\"m\"\n iconContent=\"tuiIconSearch\"\n [pseudoFocused]=\"open || null\"\n [tuiTextfieldCleaner]=\"true\"\n [tuiTextfieldLabelOutside]=\"true\"\n [value]=\"search\"\n (valueChange)=\"onSearchChange($event)\"\n >\n {{ searchText }}\n </tui-primitive-textfield>\n <ng-template\n #dropdown\n let-activeZone\n >\n <tui-data-list>\n <tui-opt-group\n *ngFor=\"let group of filtered; let index = index\"\n [label]=\"labels[index] || ''\"\n >\n <a\n *ngFor=\"let item of group\"\n tuiOption\n [routerLink]=\"item.route\"\n (click)=\"onClick()\"\n >\n {{ item.title }}\n </a>\n </tui-opt-group>\n </tui-data-list>\n </ng-template>\n</tui-hosted-dropdown>\n\n<nav class=\"t-navigation\">\n <tui-scrollbar\n class=\"t-scrollbar\"\n [tuiMode]=\"mode$ | async\"\n >\n <tui-accordion\n [closeOthers]=\"false\"\n [rounded]=\"false\"\n >\n <tui-accordion-item\n *ngFor=\"let label of labels; index as index\"\n size=\"s\"\n [borders]=\"null\"\n [(open)]=\"!!openPagesArr[index]\"\n >\n <span class=\"t-label\">\n <strong>{{ label }}</strong>\n </span>\n <ng-template tuiAccordionItemContent>\n <div class=\"t-section\">\n <ng-container\n *ngFor=\"let item of items[index]; index as subIndex\"\n >\n <ng-container\n *ngTemplateOutlet=\"pages; context: {item: item, index: index * 100 + subIndex}\"\n ></ng-container>\n </ng-container>\n </div>\n </ng-template>\n </tui-accordion-item>\n </tui-accordion>\n <div class=\"t-items-container\">\n <ng-container\n *ngFor=\"let item of itemsWithoutSections; let index = index\"\n >\n <ng-container\n *ngTemplateOutlet=\"pages; context: {item: item, index: items.length - 1 + index}\"\n ></ng-container>\n </ng-container>\n </div>\n\n <ng-template\n #pages\n let-item=\"item\"\n let-index=\"index\"\n >\n <a\n *ngIf=\"!item.subPages; else subPages\"\n tuiLink\n routerLinkActive=\"sublink_active\"\n class=\"t-sublink\"\n [routerLink]=\"item.route\"\n [scrollIntoView]=\"isActive(item.route)\"\n (click)=\"closeMenu()\"\n >\n {{ item.title }}\n </a>\n <ng-template #subPages>\n <div\n routerLinkActive\n class=\"t-subsection\"\n [routerLinkActiveOptions]=\"{exact: false}\"\n >\n <button\n *ngIf=\"item.subPages\"\n tuiLink\n type=\"button\"\n class=\"t-sublink t-sublink_subsection\"\n (click)=\"onGroupClick(index)\"\n >\n <tui-svg\n src=\"tuiIconChevronRight\"\n class=\"t-chevron\"\n [class.t-chevron_active]=\"!!openPagesGroupsArr[index]\"\n ></tui-svg>\n {{ item.title }}\n </button>\n <tui-expand\n class=\"t-expand\"\n [expanded]=\"!!openPagesGroupsArr[index]\"\n >\n <div class=\"t-section t-section_bordered\">\n <a\n *ngFor=\"let subPage of item.subPages\"\n tuiLink\n routerLinkActive=\"sublink_active\"\n class=\"t-sublink t-sublink_small\"\n [routerLink]=\"subPage.route\"\n [scrollIntoView]=\"isActive(subPage.route)\"\n (click)=\"closeMenu()\"\n >\n {{ subPage.title }}\n </a>\n </div>\n </tui-expand>\n </div>\n </ng-template>\n </ng-template>\n </tui-scrollbar>\n</nav>\n\n<ng-content></ng-content>\n",
1323
+ template: "<tui-hosted-dropdown\n *tuiLet=\"filteredItems as filtered\"\n tuiAutoFocus\n tuiDropdownLimitWidth=\"fixed\"\n class=\"t-input\"\n [autoFocus]=\"!!sidebar\"\n [content]=\"dropdown\"\n [canOpen]=\"canOpen\"\n [(open)]=\"open\"\n>\n <tui-primitive-textfield\n iconAlign=\"left\"\n tuiTextfieldSize=\"m\"\n iconContent=\"tuiIconSearch\"\n [pseudoFocused]=\"open || null\"\n [tuiTextfieldCleaner]=\"true\"\n [tuiTextfieldLabelOutside]=\"true\"\n [value]=\"search\"\n (valueChange)=\"onSearchChange($event)\"\n >\n {{ searchText }}\n </tui-primitive-textfield>\n <ng-template\n #dropdown\n let-activeZone\n >\n <tui-data-list>\n <tui-opt-group\n *ngFor=\"let group of filtered; let index = index\"\n [label]=\"labels[index] || ''\"\n >\n <a\n *ngFor=\"let item of group\"\n tuiOption\n [routerLink]=\"item.route\"\n (click)=\"onClick()\"\n >\n {{ item.title }}\n </a>\n </tui-opt-group>\n </tui-data-list>\n </ng-template>\n</tui-hosted-dropdown>\n\n<nav class=\"t-navigation\">\n <tui-scrollbar\n class=\"t-scrollbar\"\n [tuiMode]=\"mode$ | async\"\n >\n <tui-accordion\n [closeOthers]=\"false\"\n [rounded]=\"false\"\n >\n <tui-accordion-item\n *ngFor=\"let label of labels; index as index\"\n size=\"s\"\n [borders]=\"null\"\n [(open)]=\"!!openPagesArr[index]\"\n >\n <span class=\"t-label\">\n <strong>{{ label }}</strong>\n </span>\n <ng-template tuiAccordionItemContent>\n <div class=\"t-section\">\n <ng-container\n *ngFor=\"let item of items[index]; index as subIndex\"\n [ngTemplateOutlet]=\"pages\"\n [ngTemplateOutletContext]=\"{item: item, index: index * 100 + subIndex}\"\n ></ng-container>\n </div>\n </ng-template>\n </tui-accordion-item>\n </tui-accordion>\n <div class=\"t-items-container\">\n <ng-container\n *ngFor=\"let item of itemsWithoutSections; let index = index\"\n [ngTemplateOutlet]=\"pages\"\n [ngTemplateOutletContext]=\"{item: item, index: items.length - 1 + index}\"\n ></ng-container>\n </div>\n\n <ng-template\n #pages\n let-item=\"item\"\n let-index=\"index\"\n >\n <a\n *ngIf=\"!item.subPages; else subPages\"\n tuiLink\n routerLinkActive=\"t-sublink_active\"\n class=\"t-sublink\"\n [routerLink]=\"item.route\"\n [scrollIntoView]=\"isActive(item.route)\"\n (click)=\"closeMenu()\"\n >\n {{ item.title }}\n </a>\n <ng-template #subPages>\n <div\n routerLinkActive\n class=\"t-subsection\"\n [routerLinkActiveOptions]=\"{exact: false}\"\n >\n <button\n *ngIf=\"item.subPages\"\n tuiLink\n type=\"button\"\n class=\"t-sublink t-sublink_subsection\"\n (click)=\"onGroupClick(index)\"\n >\n <tui-svg\n src=\"tuiIconChevronRight\"\n class=\"t-chevron\"\n [class.t-chevron_active]=\"!!openPagesGroupsArr[index]\"\n ></tui-svg>\n {{ item.title }}\n </button>\n <tui-expand\n class=\"t-expand\"\n [expanded]=\"!!openPagesGroupsArr[index]\"\n >\n <div class=\"t-section t-section_bordered\">\n <a\n *ngFor=\"let subPage of item.subPages\"\n tuiLink\n routerLinkActive=\"t-sublink_active\"\n class=\"t-sublink t-sublink_small\"\n [routerLink]=\"subPage.route\"\n [scrollIntoView]=\"isActive(subPage.route)\"\n (click)=\"closeMenu()\"\n >\n {{ subPage.title }}\n </a>\n </div>\n </tui-expand>\n </div>\n </ng-template>\n </ng-template>\n </tui-scrollbar>\n</nav>\n\n<ng-content></ng-content>\n",
1267
1324
  providers: NAVIGATION_PROVIDERS,
1268
1325
  changeDetection: ChangeDetectionStrategy.OnPush,
1269
1326
  styles: [":host{z-index:1;display:flex;flex-direction:column;text-align:center;background:var(--tui-base-01)}.t-input{display:block;margin:1.25rem}.t-navigation{display:flex;max-height:100%;min-height:0;flex:1 1 0;text-align:left}.t-scrollbar{width:100%;scroll-behavior:smooth}.t-items-container{display:flex;flex-direction:column;padding:0 1rem}.t-label{margin-left:.5rem}.t-expand{margin-left:.25rem}.t-section{display:flex;flex-direction:column;align-items:flex-start;margin:-1rem 0 -.5rem}.t-section_bordered{margin:.5rem 0;border-left:1px solid var(--tui-base-03)}.t-subsection{margin-left:.5rem}.t-sublink{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:1rem 0 0;border:0;background:0 0;font-size:inherit;line-height:inherit;font:var(--tui-font-text-m);margin-left:.5rem}.t-sublink_small{margin-left:1rem;line-height:1.5rem;padding-top:.5rem}.t-sublink_subsection{margin-left:0;line-height:1.6rem}.t-sublink_active{color:var(--tui-text-01)}.t-chevron{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;width:1rem;height:1rem;margin:-.25rem .25rem 0 -.1875rem}.t-chevron_active{transform:rotate(90deg)}"]
@@ -1279,7 +1336,10 @@ TuiDocNavigationComponent = __decorate([
1279
1336
  __param(7, Inject(NAVIGATION_ITEMS)),
1280
1337
  __param(8, Inject(TUI_DOC_SEARCH_TEXT)),
1281
1338
  __param(9, Inject(Router)),
1282
- __param(10, Inject(ActivatedRoute))
1339
+ __param(10, Inject(ActivatedRoute)),
1340
+ __param(11, Inject(TuiDestroyService)),
1341
+ __param(12, Inject(TUI_DOC_PAGE_LOADED)),
1342
+ __param(13, Inject(TUI_DOC_SCROLL_BEHAVIOR))
1283
1343
  ], TuiDocNavigationComponent);
1284
1344
 
1285
1345
  let TuiDocNavigationModule = class TuiDocNavigationModule {
@@ -1408,6 +1468,7 @@ const PAGE_PROVIDERS = [
1408
1468
  useFactory: seeAlsoProviderFactory,
1409
1469
  },
1410
1470
  ];
1471
+ // eslint-disable-next-line @typescript-eslint/naming-convention
1411
1472
  function seeAlsoProviderFactory({ nativeElement }, seeAlsoGroups) {
1412
1473
  const currentHeader = nativeElement.getAttribute('header');
1413
1474
  const groups = seeAlsoGroups.filter(group => group.includes(currentHeader)) || [];
@@ -1481,7 +1542,7 @@ __decorate([
1481
1542
  TuiDocPageComponent = __decorate([
1482
1543
  Component({
1483
1544
  selector: 'tui-doc-page',
1484
- template: "<header class=\"t-header\">\n <h1 class=\"t-title\">\n {{ header }}\n <tui-tag\n *ngIf=\"deprecated !== null\"\n value=\"deprecated\"\n status=\"custom\"\n class=\"t-tag t-tag_deprecated\"\n ></tui-tag>\n <tui-tag\n *ngIf=\"package\"\n status=\"custom\"\n class=\"t-tag t-tag_package\"\n [value]=\"package\"\n [autoColor]=\"true\"\n ></tui-tag>\n </h1>\n <tui-tabs-with-more\n *ngIf=\"tabConnectors.length\"\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n <ng-container\n *ngFor=\"let tab of tabConnectors; first as first; index as index\"\n >\n <ng-container *ngIf=\"first; else dynamicTab\">\n <a\n *tuiTab\n tuiTab\n routerLink=\"./\"\n routerLinkActive\n [routerLinkActiveOptions]=\"{exact: true}\"\n >\n {{ tab.pageTab || defaultTabs[index] }}\n </a>\n </ng-container>\n <ng-template #dynamicTab>\n <a\n *tuiTab\n tuiTab\n routerLinkActive\n [routerLink]=\"getRouterLink(tab.pageTab || defaultTabs[index])\"\n >\n {{ tab.pageTab || defaultTabs[index] }}\n </a>\n </ng-template>\n </ng-container>\n </tui-tabs-with-more>\n <tui-doc-source-code\n class=\"t-source-code\"\n [header]=\"header\"\n [package]=\"package\"\n [type]=\"type\"\n [path]=\"path\"\n ></tui-doc-source-code>\n</header>\n<div class=\"t-content\">\n <ng-content></ng-content>\n <tui-doc-see-also\n *ngIf=\"showSeeAlso\"\n class=\"t-see-also\"\n [seeAlso]=\"seeAlso\"\n ></tui-doc-see-also>\n <ng-container *ngFor=\"let tab of tabConnectors; index as index\">\n <ng-container *ngIf=\"index === activeItemIndex\">\n <ng-container *ngTemplateOutlet=\"tab.template\"></ng-container>\n </ng-container>\n </ng-container>\n</div>\n",
1545
+ template: "<header class=\"t-header\">\n <h1 class=\"t-title\">\n {{ header }}\n <tui-tag\n *ngIf=\"deprecated !== null\"\n value=\"deprecated\"\n status=\"custom\"\n class=\"t-tag t-tag_deprecated\"\n ></tui-tag>\n <tui-tag\n *ngIf=\"package\"\n status=\"custom\"\n class=\"t-tag t-tag_package\"\n [value]=\"package\"\n [autoColor]=\"true\"\n ></tui-tag>\n </h1>\n <tui-tabs-with-more\n *ngIf=\"tabConnectors.length\"\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n <ng-container *ngFor=\"let tab of tabConnectors; first as first; index as index\">\n <ng-container *ngIf=\"first; else dynamicTab\">\n <a\n *tuiTab\n tuiTab\n routerLink=\"./\"\n routerLinkActive\n [routerLinkActiveOptions]=\"{exact: true}\"\n >\n {{ tab.pageTab || defaultTabs[index] }}\n </a>\n </ng-container>\n <ng-template #dynamicTab>\n <a\n *tuiTab\n tuiTab\n routerLinkActive\n [routerLink]=\"getRouterLink(tab.pageTab || defaultTabs[index])\"\n >\n {{ tab.pageTab || defaultTabs[index] }}\n </a>\n </ng-template>\n </ng-container>\n </tui-tabs-with-more>\n <tui-doc-source-code\n class=\"t-source-code\"\n [header]=\"header\"\n [package]=\"package\"\n [type]=\"type\"\n [path]=\"path\"\n ></tui-doc-source-code>\n</header>\n<div class=\"t-content\">\n <ng-content></ng-content>\n <tui-doc-see-also\n *ngIf=\"showSeeAlso\"\n class=\"t-see-also\"\n [seeAlso]=\"seeAlso\"\n ></tui-doc-see-also>\n <ng-container *ngFor=\"let tab of tabConnectors; index as index\">\n <ng-container\n *ngIf=\"index === activeItemIndex\"\n [ngTemplateOutlet]=\"tab.template\"\n ></ng-container>\n </ng-container>\n</div>\n",
1485
1546
  changeDetection: ChangeDetectionStrategy.OnPush,
1486
1547
  providers: PAGE_PROVIDERS,
1487
1548
  styles: [":host{display:flex;flex-direction:column;min-height:0;flex-basis:0;flex-grow:1}.t-header{display:flex;font:var(--tui-font-heading-3);flex-wrap:wrap;min-height:7.25rem;color:var(--tui-text-01);box-shadow:inset 0 -1px 0 0 var(--tui-base-03);padding:3.75rem 0 0;box-sizing:border-box;flex-shrink:0;margin:0 min(10vw,8.75rem)}:host-context(tui-root._mobile) .t-header{font:var(--tui-font-heading-4);min-height:4.5rem;padding:1.25rem 1.25rem 0;margin:0}.t-title{min-width:100%;font-size:inherit;margin:0}.t-tag{vertical-align:middle;text-transform:uppercase;margin-right:.5rem}.t-tag_deprecated{background-color:var(--tui-error-fill)}.t-tag.t-tag_package{color:#000}.t-tabs{flex:1;margin:1.125rem .3125rem 0 0}:host-context(tui-root._mobile) .t-tabs{margin-top:.25rem}.t-content{padding:2rem 0;margin:0 min(10vw,8.75rem)}:host-context(tui-root._mobile) .t-content{padding:2rem 1.25rem;margin:0}.t-see-also{min-width:18.75rem;width:30%;float:right;margin-left:1.5rem}:host-context(tui-root._mobile) .t-see-also{float:none;width:100%;margin:0 0 1.5rem}.t-source-code{align-self:flex-end;line-height:2.75rem}"]
@@ -1521,7 +1582,7 @@ __decorate([
1521
1582
  TuiDocSeeAlsoComponent = __decorate([
1522
1583
  Component({
1523
1584
  selector: 'tui-doc-see-also',
1524
- template: "<h5 class=\"header\">{{ text }}</h5>\n<ng-container *ngFor=\"let item of seeAlso; last as last\">\n <a\n tuiLink\n [routerLink]=\"getRouterLink(item)\"\n >\n {{ item }}\n </a>\n <ng-container *ngIf=\"!last\">{{', '}}</ng-container>\n</ng-container>\n",
1585
+ template: "<h5 class=\"header\">{{ text }}</h5>\n<ng-container *ngFor=\"let item of seeAlso; last as last\">\n <a\n tuiLink\n [routerLink]=\"getRouterLink(item)\"\n >\n {{ item }}\n </a>\n <ng-container *ngIf=\"!last\">{{ ', ' }}</ng-container>\n</ng-container>\n",
1525
1586
  changeDetection: ChangeDetectionStrategy.OnPush,
1526
1587
  styles: [":host{display:block}.header{font-size:.6875rem;line-height:1rem;text-transform:uppercase;letter-spacing:.075em;color:var(--tui-text-02);margin:0 0 .5rem;white-space:nowrap}"]
1527
1588
  }),
@@ -1682,8 +1743,10 @@ TuiAddonDocModule = __decorate([
1682
1743
  ], TuiAddonDocModule);
1683
1744
 
1684
1745
  /**
1746
+ * @deprecated: use {@link tuiGenerateRoutes} instead
1685
1747
  * Generates typical page routing structure
1686
1748
  */
1749
+ // eslint-disable-next-line @typescript-eslint/naming-convention
1687
1750
  function generateRoutes(type) {
1688
1751
  return [
1689
1752
  {
@@ -1698,6 +1761,7 @@ function generateRoutes(type) {
1698
1761
  },
1699
1762
  ];
1700
1763
  }
1764
+ const tuiGenerateRoutes = generateRoutes;
1701
1765
 
1702
1766
  /**
1703
1767
  * Public API Surface of @taiga-ui/addon-doc
@@ -1707,5 +1771,5 @@ function generateRoutes(type) {
1707
1771
  * Generated bundle index. Do not edit.
1708
1772
  */
1709
1773
 
1710
- export { DEMO_TEXTS, DOC_TEXTS, EXAMPLE_TEXTS, ScrollIntoViewDirective, ScrollIntoViewModule, TUI_DOC_CODE_EDITOR, TUI_DOC_DEFAULT_TABS, TUI_DOC_DEMO_TEXTS, TUI_DOC_DOCUMENTATION_TEXTS, TUI_DOC_EXAMPLE_CONTENT_PROCESSOR, TUI_DOC_EXAMPLE_TEXTS, TUI_DOC_LOGO, TUI_DOC_MENU_TEXT, TUI_DOC_PAGES, TUI_DOC_RUSSIAN, TUI_DOC_SEARCH_TEXT, TUI_DOC_SEE_ALSO, TUI_DOC_SEE_ALSO_TEXT, TUI_DOC_SOURCE_CODE, TUI_DOC_SOURCE_CODE_TEXT, TUI_DOC_TITLE, TUI_EXAMPLE_PRIMARY_FILE_NAME, TuiAddonDocModule, TuiDocCodeComponent, TuiDocCodeModule, TuiDocCopyComponent, TuiDocCopyModule, TuiDocDemoComponent, TuiDocDemoModule, TuiDocDocumentationComponent, TuiDocDocumentationModule, TuiDocDocumentationPropertyConnectorDirective, TuiDocExampleComponent, TuiDocExampleModule, TuiDocMainComponent, TuiDocMainModule, TuiDocNavigationComponent, TuiDocNavigationModule, TuiDocPageComponent, TuiDocPageModule, TuiDocPageTabConnectorDirective, TuiScrollIntoViewLinkDirective, TuiScrollIntoViewLinkModule, coerceValue, generateRoutes, rawLoad, rawLoadRecord, tryParseMarkdownCodeBlock, TuiInputOpacityModule as ɵa, TuiInputOpacityDirective as ɵb, TuiDocExampleGetTabsPipe as ɵc, TuiDocExampleCapitalizePipe as ɵd, TuiDocHeaderModule as ɵe, NAVIGATION_TITLE as ɵf, NAVIGATION_LABELS as ɵg, NAVIGATION_ITEMS as ɵh, NAVIGATION_PROVIDERS as ɵi, titleProviderFactory as ɵj, labelsProviderFactory as ɵk, itemsProviderFactory as ɵl, TuiDocHeaderComponent as ɵm, PAGE_SEE_ALSO as ɵn, PAGE_PROVIDERS as ɵo, seeAlsoProviderFactory as ɵp, TuiDocSeeAlsoModule as ɵq, TuiDocSeeAlsoComponent as ɵr, TuiDocSourceCodeModule as ɵs, TuiDocSourceCodeComponent as ɵt };
1774
+ export { DEMO_TEXTS, DOC_TEXTS, EXAMPLE_TEXTS, ScrollIntoViewDirective, ScrollIntoViewModule, TUI_DOC_CODE_ACTIONS, TUI_DOC_CODE_EDITOR, TUI_DOC_DEFAULT_TABS, TUI_DOC_DEMO_TEXTS, TUI_DOC_DOCUMENTATION_TEXTS, TUI_DOC_EXAMPLE_CONTENT_PROCESSOR, TUI_DOC_EXAMPLE_TEXTS, TUI_DOC_LOGO, TUI_DOC_MENU_TEXT, TUI_DOC_PAGES, TUI_DOC_PAGE_LOADED, TUI_DOC_RUSSIAN, TUI_DOC_SCROLL_BEHAVIOR, TUI_DOC_SEARCH_TEXT, TUI_DOC_SEE_ALSO, TUI_DOC_SEE_ALSO_TEXT, TUI_DOC_SOURCE_CODE, TUI_DOC_SOURCE_CODE_TEXT, TUI_DOC_TITLE, TUI_EXAMPLE_PRIMARY_FILE_NAME, TuiAddonDocModule, TuiDocCodeComponent, TuiDocCodeModule, TuiDocCopyComponent, TuiDocCopyModule, TuiDocDemoComponent, TuiDocDemoModule, TuiDocDocumentationComponent, TuiDocDocumentationModule, TuiDocDocumentationPropertyConnectorDirective, TuiDocExampleComponent, TuiDocExampleModule, TuiDocMainComponent, TuiDocMainModule, TuiDocNavigationComponent, TuiDocNavigationModule, TuiDocPageComponent, TuiDocPageModule, TuiDocPageTabConnectorDirective, TuiScrollIntoViewLinkDirective, TuiScrollIntoViewLinkModule, coerceValue, generateRoutes, rawLoad, rawLoadRecord, tryParseMarkdownCodeBlock, tuiCoerceValue, tuiGenerateRoutes, tuiRawLoad, tuiRawLoadRecord, tuiTryParseMarkdownCodeBlock, TuiInputOpacityModule as ɵa, TuiInputOpacityDirective as ɵb, TuiDocExampleGetTabsPipe as ɵc, TuiDocExampleCapitalizePipe as ɵd, TuiDocHeaderModule as ɵe, NAVIGATION_TITLE as ɵf, NAVIGATION_LABELS as ɵg, NAVIGATION_ITEMS as ɵh, NAVIGATION_PROVIDERS as ɵi, titleProviderFactory as ɵj, labelsProviderFactory as ɵk, itemsProviderFactory as ɵl, TuiDocHeaderComponent as ɵm, PAGE_SEE_ALSO as ɵn, PAGE_PROVIDERS as ɵo, seeAlsoProviderFactory as ɵp, TuiDocSeeAlsoModule as ɵq, TuiDocSeeAlsoComponent as ɵr, TuiDocSourceCodeModule as ɵs, TuiDocSourceCodeComponent as ɵt };
1711
1775
  //# sourceMappingURL=taiga-ui-addon-doc.js.map