@taiga-ui/addon-doc 2.54.1 → 2.57.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 (89) hide show
  1. package/bundles/taiga-ui-addon-doc.umd.js +241 -225
  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/example/example.component.d.ts +7 -1
  6. package/esm2015/components/code/code.component.js +5 -5
  7. package/esm2015/components/code/parse-code-block.js +3 -3
  8. package/esm2015/components/copy/copy.component.js +2 -2
  9. package/esm2015/components/demo/demo.component.js +12 -12
  10. package/esm2015/components/documentation/documentation-property-connector.directive.js +11 -11
  11. package/esm2015/components/documentation/documentation.component.js +30 -30
  12. package/esm2015/components/example/example-capitalize.pipe.js +3 -3
  13. package/esm2015/components/example/example-get-tabs.pipe.js +2 -2
  14. package/esm2015/components/example/example.component.js +29 -11
  15. package/esm2015/components/main/main.component.js +8 -8
  16. package/esm2015/components/navigation/navigation.component.js +16 -16
  17. package/esm2015/components/navigation/navigation.providers.js +4 -4
  18. package/esm2015/components/page/page-tab.directive.js +2 -2
  19. package/esm2015/components/page/page.component.js +10 -10
  20. package/esm2015/components/page/page.providers.js +4 -4
  21. package/esm2015/directives/scroll-into-view/scroll-into-view.directive.js +3 -3
  22. package/esm2015/interfaces/page.js +4 -4
  23. package/esm2015/internal/header/header.component.js +3 -3
  24. package/esm2015/internal/input-opacity/input-opacity.directive.js +3 -3
  25. package/esm2015/internal/see-also/see-also.component.js +4 -4
  26. package/esm2015/internal/source-code/source-code.component.js +6 -6
  27. package/esm2015/languages/russian.js +12 -12
  28. package/esm2015/tokens/code-actions.js +3 -3
  29. package/esm2015/tokens/code-editor.js +2 -2
  30. package/esm2015/tokens/default-tabs.js +2 -2
  31. package/esm2015/tokens/example-content-processor.js +2 -2
  32. package/esm2015/tokens/i18n.js +19 -19
  33. package/esm2015/tokens/logo.js +3 -3
  34. package/esm2015/tokens/page-loaded.js +2 -2
  35. package/esm2015/tokens/pages.js +2 -2
  36. package/esm2015/tokens/scroll-behavior.js +2 -2
  37. package/esm2015/tokens/see-also.js +2 -2
  38. package/esm2015/tokens/source-code.js +3 -3
  39. package/esm2015/tokens/title.js +3 -3
  40. package/esm2015/utils/coerce-value.js +6 -6
  41. package/esm2015/utils/color-conversion.js +5 -5
  42. package/esm2015/utils/generate-routes.js +3 -3
  43. package/esm2015/utils/inspect.js +13 -13
  44. package/esm2015/utils/transliterate-keyboard-layout.js +34 -34
  45. package/esm5/components/code/code.component.js +5 -5
  46. package/esm5/components/code/parse-code-block.js +3 -3
  47. package/esm5/components/copy/copy.component.js +2 -2
  48. package/esm5/components/demo/demo.component.js +12 -12
  49. package/esm5/components/documentation/documentation-property-connector.directive.js +11 -11
  50. package/esm5/components/documentation/documentation.component.js +30 -30
  51. package/esm5/components/example/example-capitalize.pipe.js +3 -3
  52. package/esm5/components/example/example-get-tabs.pipe.js +2 -2
  53. package/esm5/components/example/example.component.js +29 -11
  54. package/esm5/components/main/main.component.js +8 -8
  55. package/esm5/components/navigation/navigation.component.js +16 -16
  56. package/esm5/components/navigation/navigation.providers.js +4 -4
  57. package/esm5/components/page/page-tab.directive.js +2 -2
  58. package/esm5/components/page/page.component.js +10 -10
  59. package/esm5/components/page/page.providers.js +4 -4
  60. package/esm5/directives/scroll-into-view/scroll-into-view.directive.js +3 -3
  61. package/esm5/interfaces/page.js +4 -4
  62. package/esm5/internal/header/header.component.js +3 -3
  63. package/esm5/internal/input-opacity/input-opacity.directive.js +3 -3
  64. package/esm5/internal/see-also/see-also.component.js +4 -4
  65. package/esm5/internal/source-code/source-code.component.js +6 -6
  66. package/esm5/languages/russian.js +12 -12
  67. package/esm5/tokens/code-actions.js +3 -3
  68. package/esm5/tokens/code-editor.js +2 -2
  69. package/esm5/tokens/default-tabs.js +2 -2
  70. package/esm5/tokens/example-content-processor.js +2 -2
  71. package/esm5/tokens/i18n.js +19 -19
  72. package/esm5/tokens/logo.js +3 -3
  73. package/esm5/tokens/page-loaded.js +2 -2
  74. package/esm5/tokens/pages.js +2 -2
  75. package/esm5/tokens/scroll-behavior.js +2 -2
  76. package/esm5/tokens/see-also.js +2 -2
  77. package/esm5/tokens/source-code.js +3 -3
  78. package/esm5/tokens/title.js +3 -3
  79. package/esm5/utils/coerce-value.js +6 -6
  80. package/esm5/utils/color-conversion.js +5 -5
  81. package/esm5/utils/generate-routes.js +3 -3
  82. package/esm5/utils/inspect.js +13 -13
  83. package/esm5/utils/transliterate-keyboard-layout.js +34 -34
  84. package/fesm2015/taiga-ui-addon-doc.js +241 -225
  85. package/fesm2015/taiga-ui-addon-doc.js.map +1 -1
  86. package/fesm5/taiga-ui-addon-doc.js +241 -225
  87. package/fesm5/taiga-ui-addon-doc.js.map +1 -1
  88. package/package.json +5 -5
  89. package/taiga-ui-addon-doc.metadata.json +1 -1
@@ -285,12 +285,12 @@
285
285
  */
286
286
  // eslint-disable-next-line @typescript-eslint/naming-convention
287
287
  function tryParseMarkdownCodeBlock(text) {
288
- if (text === void 0) { text = ''; }
288
+ if (text === void 0) { text = ""; }
289
289
  var tokens = new MarkdownIt().parse(text, {});
290
290
  var result = tokens
291
291
  .filter(function (_a) {
292
292
  var tag = _a.tag, type = _a.type;
293
- return tag === 'code' && type === 'fence';
293
+ return tag === "code" && type === "fence";
294
294
  })
295
295
  .map(function (_a) {
296
296
  var content = _a.content;
@@ -302,8 +302,8 @@
302
302
 
303
303
  var TuiDocCodeComponent = /** @class */ (function () {
304
304
  function TuiDocCodeComponent() {
305
- this.rawLoader$$ = new rxjs.BehaviorSubject('');
306
- this.filename = '';
305
+ this.rawLoader$$ = new rxjs.BehaviorSubject("");
306
+ this.filename = "";
307
307
  this.processor$ = this.rawLoader$$.pipe(operators.switchMap(rawLoad), operators.map(tryParseMarkdownCodeBlock));
308
308
  }
309
309
  Object.defineProperty(TuiDocCodeComponent.prototype, "code", {
@@ -327,11 +327,11 @@
327
327
  core.Input()
328
328
  ], TuiDocCodeComponent.prototype, "code", null);
329
329
  __decorate([
330
- core.HostBinding('class._has-filename')
330
+ core.HostBinding("class._has-filename")
331
331
  ], TuiDocCodeComponent.prototype, "hasFilename", null);
332
332
  TuiDocCodeComponent = __decorate([
333
333
  core.Component({
334
- selector: 'tui-doc-code',
334
+ selector: "tui-doc-code",
335
335
  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",
336
336
  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}"]
337
337
  })
@@ -377,7 +377,7 @@
377
377
  ], TuiDocCopyComponent.prototype, "copied$", null);
378
378
  TuiDocCopyComponent = __decorate([
379
379
  core.Component({
380
- selector: 'tui-doc-copy',
380
+ selector: "tui-doc-copy",
381
381
  template: "<button\n *ngIf=\"texts$ | async as texts\"\n tuiButton\n type=\"button\"\n appearance=\"\"\n size=\"s\"\n class=\"t-copy\"\n [title]=\"texts[0]\"\n (click)=\"onClick()\"\n>\n <span\n class=\"t-content\"\n [class.t-content_moved]=\"copied$ | async\"\n >\n <span\n class=\"t-initial\"\n [attr.data-text]=\"texts[0]\"\n >\n <ng-content></ng-content>\n </span>\n {{ texts[1] }}\n </span>\n</button>\n",
382
382
  changeDetection: core.ChangeDetectionStrategy.OnPush,
383
383
  providers: [cdk.TuiDestroyService],
@@ -408,8 +408,8 @@
408
408
  * Works with a tuple
409
409
  * [@string tuiMode tooltip content, @string word 'background', @string 'form value']
410
410
  */
411
- var TUI_DOC_DEMO_TEXTS = new core.InjectionToken('tui-doc-demo i18n texts', {
412
- factory: function () { return ['Read more more about modes: ', 'Background', 'Form value']; },
411
+ var TUI_DOC_DEMO_TEXTS = new core.InjectionToken("tui-doc-demo i18n texts", {
412
+ factory: function () { return ["Read more more about modes: ", "Background", "Form value"]; },
413
413
  });
414
414
  /**
415
415
  * Works with a tuple
@@ -421,13 +421,13 @@
421
421
  * @string message for tooltip about ng-polymorpheus
422
422
  * ]
423
423
  */
424
- var TUI_DOC_DOCUMENTATION_TEXTS = new core.InjectionToken('tui-doc-documentation i18n texts', {
424
+ var TUI_DOC_DOCUMENTATION_TEXTS = new core.InjectionToken("tui-doc-documentation i18n texts", {
425
425
  factory: function () { return [
426
- 'Argument',
427
- 'Type',
428
- 'Name and description',
429
- 'Value',
430
- 'Learn about our dynamic templates from ',
426
+ "Argument",
427
+ "Type",
428
+ "Name and description",
429
+ "Value",
430
+ "Learn about our dynamic templates from ",
431
431
  ]; },
432
432
  });
433
433
  /**
@@ -438,20 +438,20 @@
438
438
  * @string link to a sample copied message label
439
439
  * ]
440
440
  */
441
- var TUI_DOC_EXAMPLE_TEXTS = new core.InjectionToken('tui-doc-example i18n texts', {
442
- factory: function () { return ['Preview', 'Link to a sample was successfully copied', 'Done']; },
441
+ var TUI_DOC_EXAMPLE_TEXTS = new core.InjectionToken("tui-doc-example i18n texts", {
442
+ factory: function () { return ["Preview", "Link to a sample was successfully copied", "Done"]; },
443
443
  });
444
- var TUI_DOC_MENU_TEXT = new core.InjectionToken('menu i18n text', {
445
- factory: function () { return 'Menu'; },
444
+ var TUI_DOC_MENU_TEXT = new core.InjectionToken("menu i18n text", {
445
+ factory: function () { return "Menu"; },
446
446
  });
447
- var TUI_DOC_SEARCH_TEXT = new core.InjectionToken('search i18n text', {
448
- factory: function () { return 'Search'; },
447
+ var TUI_DOC_SEARCH_TEXT = new core.InjectionToken("search i18n text", {
448
+ factory: function () { return "Search"; },
449
449
  });
450
- var TUI_DOC_SEE_ALSO_TEXT = new core.InjectionToken('tui-doc-see-also i18n text', {
451
- factory: function () { return 'See also'; },
450
+ var TUI_DOC_SEE_ALSO_TEXT = new core.InjectionToken("tui-doc-see-also i18n text", {
451
+ factory: function () { return "See also"; },
452
452
  });
453
- var TUI_DOC_SOURCE_CODE_TEXT = new core.InjectionToken('tui-doc-source-code i18n text', {
454
- factory: function () { return 'Source code'; },
453
+ var TUI_DOC_SOURCE_CODE_TEXT = new core.InjectionToken("tui-doc-source-code i18n text", {
454
+ factory: function () { return "Source code"; },
455
455
  });
456
456
 
457
457
  var MIN_COMPONENT_WIDTH = 104;
@@ -467,14 +467,14 @@
467
467
  this.wrapperWidth = 0;
468
468
  this.control = null;
469
469
  this.template = null;
470
- this.updateOnVariants = ['change', 'blur', 'submit'];
471
- this.updateOn = 'change';
470
+ this.updateOnVariants = ["change", "blur", "submit"];
471
+ this.updateOn = "change";
472
472
  this.expanded = false;
473
473
  this.opaque = true;
474
474
  this.modeControl = new forms.FormControl();
475
475
  this.mode = null;
476
476
  this.change$ = new rxjs.Subject();
477
- this.items = ['onLight', 'onDark'];
477
+ this.items = ["onLight", "onDark"];
478
478
  this.isBrowser = common.isPlatformBrowser(platformId);
479
479
  var parsedMode = locationRef.path().match(/tuiMode=(onDark|onLight)/);
480
480
  if (parsedMode !== null && parsedMode.length > 0) {
@@ -506,9 +506,9 @@
506
506
  }
507
507
  var paddingLeft = this.isBrowser
508
508
  ? getComputedStyle(this.content.nativeElement).paddingLeft
509
- : '0';
509
+ : "0";
510
510
  var offsetWidth = this.content.nativeElement.offsetWidth;
511
- this.resizerText.nativeElement.textContent = String(offsetWidth - parseInt(paddingLeft || '0', 10) * 2);
511
+ this.resizerText.nativeElement.textContent = String(offsetWidth - parseInt(paddingLeft || "0", 10) * 2);
512
512
  };
513
513
  TuiDocDemoComponent.prototype.onDragStart = function (event) {
514
514
  event.preventDefault();
@@ -541,7 +541,7 @@
541
541
  if (!this.wrapper) {
542
542
  return;
543
543
  }
544
- this.renderer.setStyle(this.wrapper.nativeElement, 'width', cdk.px(Math.max(this.wrapperWidth - delta, MIN_COMPONENT_WIDTH)));
544
+ this.renderer.setStyle(this.wrapper.nativeElement, "width", cdk.px(Math.max(this.wrapperWidth - delta, MIN_COMPONENT_WIDTH)));
545
545
  };
546
546
  var TuiDocDemoComponent_1;
547
547
  TuiDocDemoComponent.ctorParameters = function () { return [
@@ -554,13 +554,13 @@
554
554
  { type: Array, decorators: [{ type: core.Inject, args: [TUI_DOC_DEMO_TEXTS,] }] }
555
555
  ]; };
556
556
  __decorate([
557
- core.ViewChild('content')
557
+ core.ViewChild("content")
558
558
  ], TuiDocDemoComponent.prototype, "content", void 0);
559
559
  __decorate([
560
- core.ViewChild('wrapper')
560
+ core.ViewChild("wrapper")
561
561
  ], TuiDocDemoComponent.prototype, "wrapper", void 0);
562
562
  __decorate([
563
- core.ViewChild('resizerText')
563
+ core.ViewChild("resizerText")
564
564
  ], TuiDocDemoComponent.prototype, "resizerText", void 0);
565
565
  __decorate([
566
566
  core.Input()
@@ -569,11 +569,11 @@
569
569
  core.ContentChild(core.TemplateRef)
570
570
  ], TuiDocDemoComponent.prototype, "template", void 0);
571
571
  __decorate([
572
- core.HostListener('window:resize')
572
+ core.HostListener("window:resize")
573
573
  ], TuiDocDemoComponent.prototype, "onResize", null);
574
574
  TuiDocDemoComponent = TuiDocDemoComponent_1 = __decorate([
575
575
  core.Component({
576
- selector: 'tui-doc-demo',
576
+ selector: "tui-doc-demo",
577
577
  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",
578
578
  changeDetection: core.ChangeDetectionStrategy.OnPush,
579
579
  providers: [
@@ -636,7 +636,7 @@
636
636
  */
637
637
  // eslint-disable-next-line @typescript-eslint/naming-convention
638
638
  function rgbToHex(r, g, b) {
639
- return "#" + [r, g, b].map(function (x) { return x.toString(16).padStart(2, '0'); }).join('');
639
+ return "#" + [r, g, b].map(function (x) { return x.toString(16).padStart(2, "0"); }).join("");
640
640
  }
641
641
  var tuiRgbToHex = rgbToHex;
642
642
  /**
@@ -645,10 +645,10 @@
645
645
  // eslint-disable-next-line @typescript-eslint/naming-convention
646
646
  function hexToRgb(hex) {
647
647
  var matches = hex
648
- .replace('#', '')
649
- .split('')
648
+ .replace("#", "")
649
+ .split("")
650
650
  .map(function (char, _, array) { return (array.length === 3 ? char + char : char); })
651
- .join('')
651
+ .join("")
652
652
  .match(/.{2}/g);
653
653
  return matches
654
654
  ? matches.map(function (x) { return Number.parseInt(x, 16); })
@@ -658,18 +658,18 @@
658
658
 
659
659
  function inspectArray(array, depth) {
660
660
  if (depth === 0) {
661
- return '[]';
661
+ return "[\u2026]";
662
662
  }
663
- var result = '';
663
+ var result = "";
664
664
  var first = true;
665
665
  for (var index = 0; index < array.length; index++) {
666
666
  if (first) {
667
667
  first = false;
668
668
  }
669
669
  else {
670
- result += ', ';
670
+ result += ", ";
671
671
  }
672
- result += index in array ? inspectAny(array[index], depth - 1) : 'empty';
672
+ result += index in array ? inspectAny(array[index], depth - 1) : "empty";
673
673
  }
674
674
  return "[" + result + "]";
675
675
  }
@@ -677,7 +677,7 @@
677
677
  if (depth === 0) {
678
678
  return "{\u2026}";
679
679
  }
680
- var result = '';
680
+ var result = "";
681
681
  var first = true;
682
682
  for (var key in object) {
683
683
  if (!object.hasOwnProperty(key)) {
@@ -687,7 +687,7 @@
687
687
  first = false;
688
688
  }
689
689
  else {
690
- result += ', ';
690
+ result += ", ";
691
691
  }
692
692
  result += key + ": " + inspectAny(object[key], depth - 1);
693
693
  }
@@ -703,15 +703,15 @@
703
703
  // eslint-disable-next-line @typescript-eslint/naming-convention
704
704
  function inspectAny(data, depth) {
705
705
  if (data === null) {
706
- return 'null';
706
+ return "null";
707
707
  }
708
708
  switch (typeof data) {
709
- case 'string':
709
+ case "string":
710
710
  return "'" + data + "'";
711
- case 'undefined':
712
- case 'number':
713
- case 'boolean':
714
- case 'function':
711
+ case "undefined":
712
+ case "number":
713
+ case "boolean":
714
+ case "function":
715
715
  return String(data);
716
716
  }
717
717
  if (data instanceof RegExp) {
@@ -734,7 +734,7 @@
734
734
  return null;
735
735
  }
736
736
  else if (isBooleanParamValue(prepared)) {
737
- return String(prepared) === 'true';
737
+ return String(prepared) === "true";
738
738
  }
739
739
  else if (isNumberParamValue(prepared)) {
740
740
  return Number(prepared);
@@ -751,10 +751,10 @@
751
751
  }
752
752
  var tuiCoerceValue = coerceValue;
753
753
  function isEmptyParamValue(value) {
754
- return ['undefined', 'null', 'NaN', 'Infinity'].includes(value);
754
+ return ["undefined", "null", "NaN", "Infinity"].includes(value);
755
755
  }
756
756
  function isBooleanParamValue(value) {
757
- return value === 'true' || value === 'false';
757
+ return value === "true" || value === "false";
758
758
  }
759
759
  function isNumberParamValue(value) {
760
760
  // TODO: investigate to disallow potentially catastrophic exponential-time regular expressions.
@@ -762,13 +762,13 @@
762
762
  return /^-?[\d.]+(?:e-?\d+)?$/.test(value);
763
763
  }
764
764
  function isPossibleArray(value) {
765
- return value.startsWith('[') && value.endsWith(']');
765
+ return value.startsWith("[") && value.endsWith("]");
766
766
  }
767
767
  function isPossibleObject(value) {
768
- return value.startsWith('{') && value.endsWith('}');
768
+ return value.startsWith("{") && value.endsWith("}");
769
769
  }
770
770
 
771
- var SERIALIZED_SUFFIX = '$';
771
+ var SERIALIZED_SUFFIX = "$";
772
772
  // @bad TODO: refactor output and value sync
773
773
  var TuiDocDocumentationPropertyConnectorDirective = /** @class */ (function () {
774
774
  function TuiDocDocumentationPropertyConnectorDirective(template, locationRef, activatedRoute, urlSerializer) {
@@ -776,9 +776,9 @@
776
776
  this.locationRef = locationRef;
777
777
  this.activatedRoute = activatedRoute;
778
778
  this.urlSerializer = urlSerializer;
779
- this.documentationPropertyName = '';
779
+ this.documentationPropertyName = "";
780
780
  this.documentationPropertyMode = null;
781
- this.documentationPropertyType = '';
781
+ this.documentationPropertyType = "";
782
782
  this.documentationPropertyDeprecated = false;
783
783
  this.documentationPropertyValues = null;
784
784
  this.documentationPropertyValueChange = new core.EventEmitter();
@@ -791,11 +791,11 @@
791
791
  Object.defineProperty(TuiDocDocumentationPropertyConnectorDirective.prototype, "attrName", {
792
792
  get: function () {
793
793
  switch (this.documentationPropertyMode) {
794
- case 'input':
794
+ case "input":
795
795
  return "[" + this.documentationPropertyName + "]";
796
- case 'output':
796
+ case "output":
797
797
  return "(" + this.documentationPropertyName + ")";
798
- case 'input-output':
798
+ case "input-output":
799
799
  return "[(" + this.documentationPropertyName + ")]";
800
800
  default:
801
801
  return this.documentationPropertyName;
@@ -813,7 +813,7 @@
813
813
  });
814
814
  Object.defineProperty(TuiDocDocumentationPropertyConnectorDirective.prototype, "shouldShowValues", {
815
815
  get: function () {
816
- return this.documentationPropertyMode !== 'output';
816
+ return this.documentationPropertyMode !== "output";
817
817
  },
818
818
  enumerable: true,
819
819
  configurable: true
@@ -849,7 +849,7 @@
849
849
  var computedValue = isValueAvailableByKey && this.documentationPropertyValues
850
850
  ? this.documentationPropertyValues.indexOf(value)
851
851
  : value;
852
- var suffix = isValueAvailableByKey ? SERIALIZED_SUFFIX : '';
852
+ var suffix = isValueAvailableByKey ? SERIALIZED_SUFFIX : "";
853
853
  var propName = this.documentationPropertyName + suffix;
854
854
  tree.queryParams = __assign(__assign({}, tree.queryParams), (_a = {}, _a[propName] = computedValue, _a));
855
855
  this.locationRef.go(String(tree));
@@ -883,8 +883,8 @@
883
883
  ], TuiDocDocumentationPropertyConnectorDirective.prototype, "documentationPropertyValueChange", void 0);
884
884
  TuiDocDocumentationPropertyConnectorDirective = __decorate([
885
885
  core.Directive({
886
- selector: 'ng-template[documentationPropertyName]',
887
- exportAs: 'documentationProperty',
886
+ selector: "ng-template[documentationPropertyName]",
887
+ exportAs: "documentationProperty",
888
888
  }),
889
889
  __param(0, core.Inject(core.TemplateRef)),
890
890
  __param(1, core.Inject(common.Location)),
@@ -901,7 +901,7 @@
901
901
  function TuiDocDocumentationComponent(changeDetectorRef, texts) {
902
902
  this.changeDetectorRef = changeDetectorRef;
903
903
  this.texts = texts;
904
- this.heading = '';
904
+ this.heading = "";
905
905
  this.showValues = true;
906
906
  this.isAPI = false;
907
907
  this.propertiesConnectors = cdk.EMPTY_QUERY;
@@ -925,71 +925,71 @@
925
925
  TuiDocDocumentationComponent.prototype.getColor = function (color) {
926
926
  if (color.length === 4) {
927
927
  return color
928
- .split('')
928
+ .split("")
929
929
  .reduce(function (result, current) { return __spread(result, [current, current]); }, [])
930
- .join('')
931
- .replace('#', '');
930
+ .join("")
931
+ .replace("#", "");
932
932
  }
933
- if (color.startsWith('#')) {
933
+ if (color.startsWith("#")) {
934
934
  return color;
935
935
  }
936
- if (color === 'transparent') {
937
- return '#000000';
936
+ if (color === "transparent") {
937
+ return "#000000";
938
938
  }
939
939
  var parsed = color
940
- .replace('rgb(', '')
941
- .replace('rgba(', '')
942
- .replace(')', '')
943
- .replace(' ', '')
944
- .split(',')
940
+ .replace("rgb(", "")
941
+ .replace("rgba(", "")
942
+ .replace(")", "")
943
+ .replace(" ", "")
944
+ .split(",")
945
945
  .map(function (v) { return Number.parseInt(v, 10); });
946
946
  return rgbToHex.apply(void 0, __spread(parsed));
947
947
  };
948
948
  TuiDocDocumentationComponent.prototype.getOpacity = function (color) {
949
- if (color.startsWith('#') || color.startsWith('rgb(')) {
949
+ if (color.startsWith("#") || color.startsWith("rgb(")) {
950
950
  return 100;
951
951
  }
952
- if (color === 'transparent') {
952
+ if (color === "transparent") {
953
953
  return 0;
954
954
  }
955
- var lastComma = color.lastIndexOf(',');
955
+ var lastComma = color.lastIndexOf(",");
956
956
  var parsed = color
957
957
  .slice(lastComma)
958
- .replace(')', '')
959
- .replace(' ', '')
960
- .replace(',', '');
958
+ .replace(")", "")
959
+ .replace(" ", "")
960
+ .replace(",", "");
961
961
  return Math.round(Number.parseFloat(parsed) * 100);
962
962
  };
963
963
  TuiDocDocumentationComponent.prototype.onColorChange = function (connector, color) {
964
- var opacity = this.getOpacity(connector.documentationPropertyValue || '');
964
+ var opacity = this.getOpacity(connector.documentationPropertyValue || "");
965
965
  if (opacity === 100) {
966
966
  connector.onValueChange(color);
967
967
  return;
968
968
  }
969
- var rgb = hexToRgb(color).join(', ');
969
+ var rgb = hexToRgb(color).join(", ");
970
970
  var result = "rgba(" + rgb + ", " + opacity / 100 + ")";
971
971
  connector.onValueChange(result);
972
972
  };
973
973
  TuiDocDocumentationComponent.prototype.onOpacityChange = function (connector, opacity) {
974
- var hex = this.getColor(connector.documentationPropertyValue || '');
974
+ var hex = this.getColor(connector.documentationPropertyValue || "");
975
975
  var rgb = hexToRgb(hex);
976
976
  var result = "rgba(" + rgb + ", " + opacity / 100 + ")";
977
977
  connector.onValueChange(result);
978
978
  };
979
979
  TuiDocDocumentationComponent.prototype.stripOptional = function (name) {
980
- return name.replace('?', '');
980
+ return name.replace("?", "");
981
981
  };
982
982
  TuiDocDocumentationComponent.prototype.isOptional = function (name) {
983
- return name.includes('?');
983
+ return name.includes("?");
984
984
  };
985
985
  TuiDocDocumentationComponent.prototype.isPrimitivePolymorpheusContent = function (value) {
986
- return typeof value === 'string' || typeof value === 'number';
986
+ return typeof value === "string" || typeof value === "number";
987
987
  };
988
988
  TuiDocDocumentationComponent.prototype.showCleaner = function (type) {
989
- return type.includes('null');
989
+ return type.includes("null");
990
990
  };
991
991
  TuiDocDocumentationComponent.prototype.showContentTooltip = function (type) {
992
- return type.includes('PolymorpheusContent');
992
+ return type.includes("PolymorpheusContent");
993
993
  };
994
994
  TuiDocDocumentationComponent.prototype.inspectAny = function (data) {
995
995
  return inspectAny(data, 2);
@@ -1012,12 +1012,12 @@
1012
1012
  ], TuiDocDocumentationComponent.prototype, "propertiesConnectors", void 0);
1013
1013
  TuiDocDocumentationComponent = __decorate([
1014
1014
  core.Component({
1015
- selector: 'tui-doc-documentation',
1015
+ selector: "tui-doc-documentation",
1016
1016
  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",
1017
1017
  changeDetection: core.ChangeDetectionStrategy.OnPush,
1018
1018
  animations: [
1019
- animations.trigger('emitEvent', [
1020
- animations.transition(':increment', [animations.style({ opacity: 1 }), animations.animate('500ms ease-in')]),
1019
+ animations.trigger("emitEvent", [
1020
+ animations.transition(":increment", [animations.style({ opacity: 1 }), animations.animate("500ms ease-in")]),
1021
1021
  ]),
1022
1022
  ],
1023
1023
  styles: [":host{display:block;min-width:100%}.t-table{width:100%;table-layout:fixed}.t-row:not(:last-child){border-bottom:1px solid var(--tui-base-03)}:host-context(tui-root._mobile) .t-row{display:flex;flex-wrap:wrap}:host-context(tui-root._mobile) .t-row_header{display:none}.t-cell{padding:1rem 1rem .875rem}.t-cell:first-child{padding-left:0}.t-cell:last-child{padding-right:0;text-align:right}.t-cell_prop{width:40%}.t-cell_value{max-width:20rem}:host-context(tui-root._mobile) .t-cell_value{width:9.375rem}:host-context(tui-root._mobile) .t-cell{width:100%;height:auto;padding:.5rem 0;text-align:left}.t-th{padding:.5rem 1rem;color:var(--tui-text-02);font-weight:400;text-align:left}.t-property{font:var(--tui-font-text-m);margin-bottom:.25rem;font-family:monospace;color:#8f75d1}:host-context(tui-root._mobile) .t-property{padding:.5rem 0}.t-type{font-family:monospace}.t-deprecated{background-color:var(--tui-error-bg);box-shadow:-1rem 0 var(--tui-error-bg),1rem 0 var(--tui-error-bg)}.t-deprecated-label{margin-right:.125rem;color:var(--tui-error-fill)}.t-exception{display:block;width:-webkit-max-content;width:-moz-max-content;width:max-content}.t-output{text-align:left;opacity:0}.t-heading{font:var(--tui-font-heading-4)}"]
@@ -1037,7 +1037,7 @@
1037
1037
  set: function (opacity) {
1038
1038
  var nativeFocusableElement = this.tuiFocusableComponent.nativeFocusableElement;
1039
1039
  if (nativeFocusableElement) {
1040
- this.renderer.setStyle(nativeFocusableElement, 'opacity', opacity / 100);
1040
+ this.renderer.setStyle(nativeFocusableElement, "opacity", opacity / 100);
1041
1041
  }
1042
1042
  },
1043
1043
  enumerable: true,
@@ -1052,7 +1052,7 @@
1052
1052
  ], TuiInputOpacityDirective.prototype, "tuiInputOpacity", null);
1053
1053
  TuiInputOpacityDirective = __decorate([
1054
1054
  core.Directive({
1055
- selector: '[tuiInputOpacity]',
1055
+ selector: "[tuiInputOpacity]",
1056
1056
  }),
1057
1057
  __param(0, core.Inject(core.Renderer2)),
1058
1058
  __param(1, core.Inject(cdk.TUI_FOCUSABLE_ITEM_ACCESSOR))
@@ -1111,13 +1111,13 @@
1111
1111
  return TuiDocDocumentationModule;
1112
1112
  }());
1113
1113
 
1114
- var TUI_DOC_CODE_ACTIONS = new core.InjectionToken('Code actions for the opened tab with code example', {
1115
- factory: function () { return ''; },
1114
+ var TUI_DOC_CODE_ACTIONS = new core.InjectionToken("Code actions for the opened tab with code example", {
1115
+ factory: function () { return ""; },
1116
1116
  });
1117
1117
 
1118
- var TUI_DOC_CODE_EDITOR = new core.InjectionToken('Contains service for opening online IDE e.g. Stackblitz');
1118
+ var TUI_DOC_CODE_EDITOR = new core.InjectionToken("Contains service for opening online IDE e.g. Stackblitz");
1119
1119
 
1120
- var TUI_DOC_EXAMPLE_CONTENT_PROCESSOR = new core.InjectionToken('Processes content in example', { factory: function () { return rxjs.identity; } });
1120
+ var TUI_DOC_EXAMPLE_CONTENT_PROCESSOR = new core.InjectionToken("Processes content in example", { factory: function () { return rxjs.identity; } });
1121
1121
 
1122
1122
  /**
1123
1123
  * @deprecated: use {@link tuiRawLoadRecord} instead
@@ -1170,7 +1170,7 @@
1170
1170
  // Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395
1171
1171
  // @dynamic
1172
1172
  var TuiDocExampleComponent = /** @class */ (function () {
1173
- function TuiDocExampleComponent(id, clipboard, notifications, location, copyTexts$, texts, codeEditor, processContent, isCypress, codeActions) {
1173
+ function TuiDocExampleComponent(id, clipboard, notifications, location, copyTexts$, texts, codeEditor, processContent, isCypress, codeActions, router, route, ngLocation) {
1174
1174
  var _this = this;
1175
1175
  this.id = id;
1176
1176
  this.clipboard = clipboard;
@@ -1182,9 +1182,12 @@
1182
1182
  this.processContent = processContent;
1183
1183
  this.isCypress = isCypress;
1184
1184
  this.codeActions = codeActions;
1185
+ this.router = router;
1186
+ this.route = route;
1187
+ this.ngLocation = ngLocation;
1185
1188
  this.rawLoader$$ = new rxjs.BehaviorSubject({});
1186
- this.heading = '';
1187
- this.description = '';
1189
+ this.heading = "";
1190
+ this.description = "";
1188
1191
  this.componentName = this.location.pathname.slice(1);
1189
1192
  this.defaultTabIndex = 0;
1190
1193
  this.defaultTab = this.texts[this.defaultTabIndex];
@@ -1204,11 +1207,12 @@
1204
1207
  configurable: true
1205
1208
  });
1206
1209
  TuiDocExampleComponent.prototype.copyExampleLink = function () {
1207
- var hashPosition = this.location.href.indexOf('#');
1210
+ var hashPosition = this.location.href.indexOf("#");
1208
1211
  var currentUrl = hashPosition > -1
1209
1212
  ? this.location.href.slice(0, Math.max(0, hashPosition))
1210
1213
  : this.location.href;
1211
1214
  var url = currentUrl + "#" + this.id;
1215
+ this.setFragmentWithoutRedirect(this.id);
1212
1216
  this.clipboard.copy(url);
1213
1217
  this.notifications
1214
1218
  .show(this.texts[1], {
@@ -1221,10 +1225,16 @@
1221
1225
  var _this = this;
1222
1226
  var _a, _b;
1223
1227
  this.loading$.next(true);
1224
- (_a = this.codeEditor) === null || _a === void 0 ? void 0 : _a.edit(this.componentName, (_b = this.id) !== null && _b !== void 0 ? _b : '', files).finally(function () { return _this.loading$.next(false); });
1228
+ (_a = this.codeEditor) === null || _a === void 0 ? void 0 : _a.edit(this.componentName, (_b = this.id) !== null && _b !== void 0 ? _b : "", files).finally(function () { return _this.loading$.next(false); });
1229
+ };
1230
+ TuiDocExampleComponent.prototype.setFragmentWithoutRedirect = function (id) {
1231
+ var url = this.router
1232
+ .createUrlTree([], { relativeTo: this.route, fragment: id || "" })
1233
+ .toString();
1234
+ this.ngLocation.go(url);
1225
1235
  };
1226
1236
  TuiDocExampleComponent.ctorParameters = function () { return [
1227
- { type: String, decorators: [{ type: core.Attribute, args: ['id',] }] },
1237
+ { type: String, decorators: [{ type: core.Attribute, args: ["id",] }] },
1228
1238
  { type: clipboard.Clipboard, decorators: [{ type: core.Inject, args: [clipboard.Clipboard,] }] },
1229
1239
  { type: core$1.TuiNotificationsService, decorators: [{ type: core.Inject, args: [core$1.TuiNotificationsService,] }] },
1230
1240
  { type: Location, decorators: [{ type: core.Inject, args: [common$1.LOCATION,] }] },
@@ -1233,7 +1243,10 @@
1233
1243
  { type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [TUI_DOC_CODE_EDITOR,] }] },
1234
1244
  { type: undefined, decorators: [{ type: core.Inject, args: [TUI_DOC_EXAMPLE_CONTENT_PROCESSOR,] }] },
1235
1245
  { type: Boolean, decorators: [{ type: core.Inject, args: [cdk.TUI_IS_CYPRESS,] }] },
1236
- { type: Array, decorators: [{ type: core.Inject, args: [TUI_DOC_CODE_ACTIONS,] }] }
1246
+ { type: Array, decorators: [{ type: core.Inject, args: [TUI_DOC_CODE_ACTIONS,] }] },
1247
+ { type: router.Router, decorators: [{ type: core.Inject, args: [router.Router,] }] },
1248
+ { type: router.ActivatedRoute, decorators: [{ type: core.Inject, args: [router.ActivatedRoute,] }] },
1249
+ { type: common.Location, decorators: [{ type: core.Inject, args: [common.Location,] }] }
1237
1250
  ]; };
1238
1251
  __decorate([
1239
1252
  core.Input()
@@ -1249,12 +1262,12 @@
1249
1262
  ], TuiDocExampleComponent.prototype, "componentName", void 0);
1250
1263
  TuiDocExampleComponent = __decorate([
1251
1264
  core.Component({
1252
- selector: 'tui-doc-example',
1265
+ selector: "tui-doc-example",
1253
1266
  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",
1254
1267
  changeDetection: core.ChangeDetectionStrategy.OnPush,
1255
1268
  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}"]
1256
1269
  }),
1257
- __param(0, core.Attribute('id')),
1270
+ __param(0, core.Attribute("id")),
1258
1271
  __param(1, core.Inject(clipboard.Clipboard)),
1259
1272
  __param(2, core.Inject(core$1.TuiNotificationsService)),
1260
1273
  __param(3, core.Inject(common$1.LOCATION)),
@@ -1264,7 +1277,10 @@
1264
1277
  __param(6, core.Inject(TUI_DOC_CODE_EDITOR)),
1265
1278
  __param(7, core.Inject(TUI_DOC_EXAMPLE_CONTENT_PROCESSOR)),
1266
1279
  __param(8, core.Inject(cdk.TUI_IS_CYPRESS)),
1267
- __param(9, core.Inject(TUI_DOC_CODE_ACTIONS))
1280
+ __param(9, core.Inject(TUI_DOC_CODE_ACTIONS)),
1281
+ __param(10, core.Inject(router.Router)),
1282
+ __param(11, core.Inject(router.ActivatedRoute)),
1283
+ __param(12, core.Inject(common.Location))
1268
1284
  ], TuiDocExampleComponent);
1269
1285
  return TuiDocExampleComponent;
1270
1286
  }());
@@ -1273,10 +1289,10 @@
1273
1289
  function TuiDocExampleCapitalizePipe() {
1274
1290
  }
1275
1291
  TuiDocExampleCapitalizePipe.prototype.transform = function (content) {
1276
- return typeof content === 'string' ? core$1.capitalizeFirstLetter(content) : content;
1292
+ return typeof content === "string" ? core$1.capitalizeFirstLetter(content) : content;
1277
1293
  };
1278
1294
  TuiDocExampleCapitalizePipe = __decorate([
1279
- core.Pipe({ name: 'tuiDocExampleCapitalize' })
1295
+ core.Pipe({ name: "tuiDocExampleCapitalize" })
1280
1296
  ], TuiDocExampleCapitalizePipe);
1281
1297
  return TuiDocExampleCapitalizePipe;
1282
1298
  }());
@@ -1288,7 +1304,7 @@
1288
1304
  return __spread([defaultTab], Object.keys(content));
1289
1305
  };
1290
1306
  TuiDocExampleGetTabsPipe = __decorate([
1291
- core.Pipe({ name: 'tuiDocExampleGetTabs' })
1307
+ core.Pipe({ name: "tuiDocExampleGetTabs" })
1292
1308
  ], TuiDocExampleGetTabsPipe);
1293
1309
  return TuiDocExampleGetTabsPipe;
1294
1310
  }());
@@ -1327,15 +1343,15 @@
1327
1343
  function TuiDocMainComponent(storage, windowRef) {
1328
1344
  this.storage = storage;
1329
1345
  this.windowRef = windowRef;
1330
- this.night = this.storage.getItem('night') === 'true' ||
1331
- (this.storage.getItem('night') === null &&
1332
- this.windowRef.matchMedia('(prefers-color-scheme: dark)').matches);
1346
+ this.night = this.storage.getItem("night") === "true" ||
1347
+ (this.storage.getItem("night") === null &&
1348
+ this.windowRef.matchMedia("(prefers-color-scheme: dark)").matches);
1333
1349
  this.change$ = new rxjs.Subject();
1334
1350
  }
1335
1351
  TuiDocMainComponent_1 = TuiDocMainComponent;
1336
1352
  Object.defineProperty(TuiDocMainComponent.prototype, "mode", {
1337
1353
  get: function () {
1338
- return this.night ? 'onDark' : null;
1354
+ return this.night ? "onDark" : null;
1339
1355
  },
1340
1356
  enumerable: true,
1341
1357
  configurable: true
@@ -1343,7 +1359,7 @@
1343
1359
  TuiDocMainComponent.prototype.onMode = function (night) {
1344
1360
  this.night = night;
1345
1361
  this.change$.next();
1346
- this.storage.setItem('night', String(night));
1362
+ this.storage.setItem("night", String(night));
1347
1363
  };
1348
1364
  var TuiDocMainComponent_1;
1349
1365
  TuiDocMainComponent.ctorParameters = function () { return [
@@ -1351,11 +1367,11 @@
1351
1367
  { type: Window, decorators: [{ type: core.Inject, args: [common$1.WINDOW,] }] }
1352
1368
  ]; };
1353
1369
  __decorate([
1354
- core.HostBinding('attr.data-mode')
1370
+ core.HostBinding("attr.data-mode")
1355
1371
  ], TuiDocMainComponent.prototype, "mode", null);
1356
1372
  TuiDocMainComponent = TuiDocMainComponent_1 = __decorate([
1357
1373
  core.Component({
1358
- selector: 'tui-doc-main',
1374
+ selector: "tui-doc-main",
1359
1375
  template: "<tui-theme-night *ngIf=\"night\"></tui-theme-night>\n<tui-root>\n <div class=\"tui-doc-page\">\n <tui-doc-navigation class=\"tui-doc-navigation\">\n <ng-content select=\"tuiDocNavigation\"></ng-content>\n </tui-doc-navigation>\n <div class=\"tui-doc-content\">\n <router-outlet class=\"tui-doc-outlet\"></router-outlet>\n </div>\n </div>\n <header tuiDocHeader>\n <label class=\"night-mode\">\n Night mode\n <tui-toggle\n class=\"tui-toggle\"\n [ngModel]=\"night\"\n (ngModelChange)=\"onMode($event)\"\n ></tui-toggle>\n </label>\n <ng-content select=\"tuiDocHeader\"></ng-content>\n </header>\n <ng-container ngProjectAs=\"tuiOverContent\">\n <ng-content select=\"tuiOverContent\"></ng-content>\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverDialogs\">\n <ng-content select=\"tuiOverDialogs\"></ng-content>\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverAlerts\">\n <ng-content select=\"tuiOverAlerts\"></ng-content>\n </ng-container>\n <!-- TODO: 3.0 Remove-->\n <ng-container ngProjectAs=\"tuiOverNotifications\">\n <ng-content select=\"tuiOverNotifications\"></ng-content>\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverPortals\">\n <ng-content select=\"tuiOverPortals\"></ng-content>\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverHints\">\n <ng-content select=\"tuiOverHints\"></ng-content>\n </ng-container>\n</tui-root>\n",
1360
1376
  encapsulation: core.ViewEncapsulation.None,
1361
1377
  providers: [
@@ -1373,7 +1389,7 @@
1373
1389
  return TuiDocMainComponent;
1374
1390
  }());
1375
1391
 
1376
- var TUI_DOC_PAGE_LOADED = new core.InjectionToken('[TUI_DOC_PAGE_LOADED] Stream that emits if loading of page is over (for example, to begin scrollIntoView)', { factory: function () { return rxjs.defer(function () { return rxjs.timer(200).pipe(operators.switchMapTo(rxjs.of(true))); }); } });
1392
+ var TUI_DOC_PAGE_LOADED = new core.InjectionToken("[TUI_DOC_PAGE_LOADED] Stream that emits if loading of page is over (for example, to begin scrollIntoView)", { factory: function () { return rxjs.defer(function () { return rxjs.timer(200).pipe(operators.switchMapTo(rxjs.of(true))); }); } });
1377
1393
 
1378
1394
  /**
1379
1395
  * @deprecated: use {@link TuiScrollIntoViewLinkDirective}
@@ -1407,7 +1423,7 @@
1407
1423
  ], ScrollIntoViewDirective.prototype, "scrollIntoView", null);
1408
1424
  ScrollIntoViewDirective = __decorate([
1409
1425
  core.Directive({
1410
- selector: '[scrollIntoView]',
1426
+ selector: "[scrollIntoView]",
1411
1427
  providers: [cdk.TuiDestroyService],
1412
1428
  })
1413
1429
  // eslint-disable-next-line @typescript-eslint/naming-convention
@@ -1425,7 +1441,7 @@
1425
1441
  }
1426
1442
  TuiScrollIntoViewLinkDirective = __decorate([
1427
1443
  core.Directive({
1428
- selector: '[tuiScrollIntoViewLink]',
1444
+ selector: "[tuiScrollIntoViewLink]",
1429
1445
  providers: [cdk.TuiDestroyService],
1430
1446
  })
1431
1447
  ], TuiScrollIntoViewLinkDirective);
@@ -1461,41 +1477,41 @@
1461
1477
  return TuiScrollIntoViewLinkModule;
1462
1478
  }());
1463
1479
 
1464
- var TUI_DOC_SCROLL_BEHAVIOR = new core.InjectionToken('[TUI_DOC_SCROLL_BEHAVIOR] Defines the transition animation for scroll', { factory: function () { return 'smooth'; } });
1480
+ var TUI_DOC_SCROLL_BEHAVIOR = new core.InjectionToken("[TUI_DOC_SCROLL_BEHAVIOR] Defines the transition animation for scroll", { factory: function () { return "smooth"; } });
1465
1481
 
1466
1482
  var MAP = {
1467
- а: 'f',
1468
- б: ',',
1469
- в: 'd',
1470
- г: 'u',
1471
- д: 'l',
1472
- е: 't',
1473
- ё: '`',
1474
- ж: ';',
1475
- з: 'p',
1476
- и: 'b',
1477
- й: 'q',
1478
- к: 'r',
1479
- л: 'k',
1480
- м: 'v',
1481
- н: 'y',
1482
- о: 'j',
1483
- п: 'g',
1484
- р: 'h',
1485
- с: 'c',
1486
- т: 'n',
1487
- у: 'e',
1488
- ф: 'a',
1489
- х: '[',
1490
- ц: 'w',
1491
- ч: 'x',
1492
- ш: 'i',
1493
- щ: 'o',
1494
- ъ: ']',
1495
- ы: 's',
1496
- ь: 'm',
1497
- ю: '.',
1498
- я: 'z',
1483
+ а: "f",
1484
+ б: ",",
1485
+ в: "d",
1486
+ г: "u",
1487
+ д: "l",
1488
+ е: "t",
1489
+ ё: "`",
1490
+ ж: ";",
1491
+ з: "p",
1492
+ и: "b",
1493
+ й: "q",
1494
+ к: "r",
1495
+ л: "k",
1496
+ м: "v",
1497
+ н: "y",
1498
+ о: "j",
1499
+ п: "g",
1500
+ р: "h",
1501
+ с: "c",
1502
+ т: "n",
1503
+ у: "e",
1504
+ ф: "a",
1505
+ х: "[",
1506
+ ц: "w",
1507
+ ч: "x",
1508
+ ш: "i",
1509
+ щ: "o",
1510
+ ъ: "]",
1511
+ ы: "s",
1512
+ ь: "m",
1513
+ ю: ".",
1514
+ я: "z",
1499
1515
  };
1500
1516
  /**
1501
1517
  * @deprecated: use {@link tuiTransliterateKeyboardLayout} instead
@@ -1505,7 +1521,7 @@
1505
1521
  */
1506
1522
  // eslint-disable-next-line @typescript-eslint/naming-convention
1507
1523
  function transliterateKeyboardLayout(string) {
1508
- var newStr = '';
1524
+ var newStr = "";
1509
1525
  for (var i = 0; i < string.length; i++) {
1510
1526
  newStr += string.charAt(i) in MAP ? MAP[string.charAt(i)] : string.charAt(i);
1511
1527
  }
@@ -1513,17 +1529,17 @@
1513
1529
  }
1514
1530
  var tuiTransliterateKeyboardLayout = transliterateKeyboardLayout;
1515
1531
 
1516
- var TUI_DOC_PAGES = new core.InjectionToken('Documentation pages', {
1532
+ var TUI_DOC_PAGES = new core.InjectionToken("Documentation pages", {
1517
1533
  factory: function () { return []; },
1518
1534
  });
1519
1535
 
1520
- var TUI_DOC_TITLE = new core.InjectionToken('Page title', {
1521
- factory: function () { return ''; },
1536
+ var TUI_DOC_TITLE = new core.InjectionToken("Page title", {
1537
+ factory: function () { return ""; },
1522
1538
  });
1523
1539
 
1524
- var NAVIGATION_TITLE = new core.InjectionToken('Page title');
1525
- var NAVIGATION_LABELS = new core.InjectionToken('Navigation sections labels for search');
1526
- var NAVIGATION_ITEMS = new core.InjectionToken('Navigation pages');
1540
+ var NAVIGATION_TITLE = new core.InjectionToken("Page title");
1541
+ var NAVIGATION_LABELS = new core.InjectionToken("Navigation sections labels for search");
1542
+ var NAVIGATION_ITEMS = new core.InjectionToken("Navigation pages");
1527
1543
  var NAVIGATION_PROVIDERS = [
1528
1544
  cdk.TuiDestroyService,
1529
1545
  {
@@ -1589,12 +1605,12 @@
1589
1605
  this.readyToScroll$ = readyToScroll$;
1590
1606
  this.scrollBehavior = scrollBehavior;
1591
1607
  this.menuOpen = false;
1592
- this.search = '';
1608
+ this.search = "";
1593
1609
  this.open = false;
1594
1610
  this.openPagesArr = [];
1595
1611
  this.openPagesGroupsArr = [];
1596
- this.active = '';
1597
- this.mode$ = this.mode.change$.pipe(operators.startWith(null), operators.map(function () { return _this.mode.mode || 'onLight'; }));
1612
+ this.active = "";
1613
+ this.mode$ = this.mode.change$.pipe(operators.startWith(null), operators.map(function () { return _this.mode.mode || "onLight"; }));
1598
1614
  // Angular can't navigate no anchor links
1599
1615
  // https://stackoverflow.com/questions/36101756/angular2-routing-with-hashtag-to-page-anchor
1600
1616
  title$.subscribe(function (title) {
@@ -1641,13 +1657,13 @@
1641
1657
  TuiDocNavigationComponent.prototype.onClick = function () {
1642
1658
  this.open = false;
1643
1659
  this.menuOpen = false;
1644
- this.search = '';
1660
+ this.search = "";
1645
1661
  this.openActivePageGroup();
1646
1662
  };
1647
1663
  TuiDocNavigationComponent.prototype.filterItems = function (items, search) {
1648
1664
  return items.map(function (section) {
1649
1665
  return cdk.uniqBy(section.filter(function (_a) {
1650
- var title = _a.title, _b = _a.keywords, keywords = _b === void 0 ? '' : _b;
1666
+ var title = _a.title, _b = _a.keywords, keywords = _b === void 0 ? "" : _b;
1651
1667
  title = title.toLowerCase();
1652
1668
  search = search.toLowerCase();
1653
1669
  keywords = keywords.toLowerCase();
@@ -1655,14 +1671,14 @@
1655
1671
  keywords.includes(search) ||
1656
1672
  title.includes(transliterateKeyboardLayout(search)) ||
1657
1673
  keywords.includes(transliterateKeyboardLayout(search)) ||
1658
- search.replace(/-/gi, '').includes(title));
1659
- }), 'title');
1674
+ search.replace(/-/gi, "").includes(title));
1675
+ }), "title");
1660
1676
  });
1661
1677
  };
1662
1678
  TuiDocNavigationComponent.prototype.flattenSubPages = function (items) {
1663
1679
  return items.reduce(function (array, item) { return __spread(array, [
1664
1680
  item.reduce(function (pages, page) {
1665
- return 'subPages' in page
1681
+ return "subPages" in page
1666
1682
  ? __spread(pages, page.subPages) : __spread(pages, [page]);
1667
1683
  }, []),
1668
1684
  ]); }, []);
@@ -1680,11 +1696,11 @@
1680
1696
  var _this = this;
1681
1697
  this.items.forEach(function (pages, pagesIndex) {
1682
1698
  pages.forEach(function (page, pageIndex) {
1683
- if ('route' in page && _this.isActiveRoute(page.route)) {
1699
+ if ("route" in page && _this.isActiveRoute(page.route)) {
1684
1700
  _this.openPagesArr[pagesIndex] = true;
1685
1701
  _this.active = page.route;
1686
1702
  }
1687
- if ('subPages' in page) {
1703
+ if ("subPages" in page) {
1688
1704
  page.subPages.forEach(function (subPage) {
1689
1705
  if (_this.isActiveRoute(subPage.route)) {
1690
1706
  _this.openPagesArr[pagesIndex] = true;
@@ -1701,10 +1717,10 @@
1701
1717
  if (!element) {
1702
1718
  return;
1703
1719
  }
1704
- element.classList.add('tui-doc-animated-example');
1720
+ element.classList.add("tui-doc-animated-example");
1705
1721
  element.scrollIntoView({
1706
- block: 'start',
1707
- inline: 'nearest',
1722
+ block: "start",
1723
+ inline: "nearest",
1708
1724
  behavior: this.scrollBehavior,
1709
1725
  });
1710
1726
  };
@@ -1725,7 +1741,7 @@
1725
1741
  { type: undefined, decorators: [{ type: core.Inject, args: [TUI_DOC_SCROLL_BEHAVIOR,] }] }
1726
1742
  ]; };
1727
1743
  __decorate([
1728
- core.HostBinding('class._open')
1744
+ core.HostBinding("class._open")
1729
1745
  ], TuiDocNavigationComponent.prototype, "menuOpen", void 0);
1730
1746
  __decorate([
1731
1747
  cdk.tuiPure
@@ -1735,7 +1751,7 @@
1735
1751
  ], TuiDocNavigationComponent.prototype, "flattenSubPages", null);
1736
1752
  TuiDocNavigationComponent = __decorate([
1737
1753
  core.Component({
1738
- selector: 'tui-doc-navigation',
1754
+ selector: "tui-doc-navigation",
1739
1755
  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",
1740
1756
  providers: NAVIGATION_PROVIDERS,
1741
1757
  changeDetection: core.ChangeDetectionStrategy.OnPush,
@@ -1794,8 +1810,8 @@
1794
1810
  return TuiDocNavigationModule;
1795
1811
  }());
1796
1812
 
1797
- var TUI_DOC_LOGO = new core.InjectionToken('Main logo', {
1798
- factory: function () { return ''; },
1813
+ var TUI_DOC_LOGO = new core.InjectionToken("Main logo", {
1814
+ factory: function () { return ""; },
1799
1815
  });
1800
1816
 
1801
1817
  var TuiDocHeaderComponent = /** @class */ (function () {
@@ -1805,7 +1821,7 @@
1805
1821
  this.router = router;
1806
1822
  this.swipes$ = swipes$;
1807
1823
  this.stream$ = new rxjs.Subject();
1808
- this.open$ = rxjs.merge(this.router.events.pipe(operators.mapTo(false)), this.stream$, this.swipes$.pipe(operators.filter(function (swipe) { return swipe.direction === 'left' || swipe.direction === 'right'; }), operators.map(function (swipe) { return swipe.direction === 'right'; }))).pipe(operators.startWith(false), operators.distinctUntilChanged());
1824
+ this.open$ = rxjs.merge(this.router.events.pipe(operators.mapTo(false)), this.stream$, this.swipes$.pipe(operators.filter(function (swipe) { return swipe.direction === "left" || swipe.direction === "right"; }), operators.map(function (swipe) { return swipe.direction === "right"; }))).pipe(operators.startWith(false), operators.distinctUntilChanged());
1809
1825
  }
1810
1826
  TuiDocHeaderComponent.prototype.onClick = function () {
1811
1827
  this.stream$.next(true);
@@ -1823,7 +1839,7 @@
1823
1839
  ]; };
1824
1840
  TuiDocHeaderComponent = __decorate([
1825
1841
  core.Component({
1826
- selector: 'header[tuiDocHeader]',
1842
+ selector: "header[tuiDocHeader]",
1827
1843
  template: "<button\n tuiIconButton\n icon=\"tuiIconMenuLarge\"\n appearance=\"icon\"\n class=\"t-menu\"\n [title]=\"menu\"\n (click)=\"onClick()\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <tui-doc-navigation\n *tuiSidebar=\"!!(open$ | async)\"\n class=\"t-navigation\"\n ></tui-doc-navigation>\n</button>\n<div\n polymorpheus-outlet\n class=\"t-logo\"\n [content]=\"logo\"\n>\n <ng-template let-src>\n <img\n alt=\"Logo\"\n class=\"t-img\"\n [src]=\"src\"\n />\n </ng-template>\n</div>\n<ng-content></ng-content>\n",
1828
1844
  changeDetection: core.ChangeDetectionStrategy.OnPush,
1829
1845
  styles: [":host{box-shadow:0 .125rem 1rem rgba(0,0,0,.08);position:fixed;top:0;left:0;right:0;z-index:1;display:flex;height:3.9375rem;align-items:center;padding:0 1.25rem;background:var(--tui-base-01);border-bottom:1px solid var(--tui-base-03)}.t-logo{margin-right:auto;font:var(--tui-font-heading-5)}.t-img{display:block}.t-menu{margin-left:-1.25rem}@media screen and (min-width:48em){.t-menu{display:none}}.t-navigation{min-height:100%}"]
@@ -1880,15 +1896,15 @@
1880
1896
  return TuiDocMainModule;
1881
1897
  }());
1882
1898
 
1883
- var TUI_DOC_DEFAULT_TABS = new core.InjectionToken('Array of default tab names', {
1899
+ var TUI_DOC_DEFAULT_TABS = new core.InjectionToken("Array of default tab names", {
1884
1900
  factory: function () { return []; },
1885
1901
  });
1886
1902
 
1887
- var TUI_DOC_SEE_ALSO = new core.InjectionToken('Array of arrays of related pages', {
1903
+ var TUI_DOC_SEE_ALSO = new core.InjectionToken("Array of arrays of related pages", {
1888
1904
  factory: function () { return []; },
1889
1905
  });
1890
1906
 
1891
- var PAGE_SEE_ALSO = new core.InjectionToken('Page see also');
1907
+ var PAGE_SEE_ALSO = new core.InjectionToken("Page see also");
1892
1908
  var PAGE_PROVIDERS = [
1893
1909
  {
1894
1910
  provide: PAGE_SEE_ALSO,
@@ -1899,11 +1915,11 @@
1899
1915
  // eslint-disable-next-line @typescript-eslint/naming-convention
1900
1916
  function seeAlsoProviderFactory(_a, seeAlsoGroups) {
1901
1917
  var nativeElement = _a.nativeElement;
1902
- var currentHeader = nativeElement.getAttribute('header');
1918
+ var currentHeader = nativeElement.getAttribute("header");
1903
1919
  var groups = seeAlsoGroups.filter(function (group) { return group.includes(currentHeader); }) || [];
1904
1920
  var seeAlsoSet = new Set(groups
1905
1921
  .join()
1906
- .split(',')
1922
+ .split(",")
1907
1923
  .filter(function (component) { return component && component !== currentHeader; }));
1908
1924
  return Array.from(seeAlsoSet);
1909
1925
  }
@@ -1921,7 +1937,7 @@
1921
1937
  ], TuiDocPageTabConnectorDirective.prototype, "pageTab", void 0);
1922
1938
  TuiDocPageTabConnectorDirective = __decorate([
1923
1939
  core.Directive({
1924
- selector: '[pageTab]',
1940
+ selector: "[pageTab]",
1925
1941
  }),
1926
1942
  __param(0, core.Inject(core.TemplateRef))
1927
1943
  ], TuiDocPageTabConnectorDirective);
@@ -1935,10 +1951,10 @@
1935
1951
  this.deprecated = deprecated;
1936
1952
  this.defaultTabs = defaultTabs;
1937
1953
  this.seeAlso = seeAlso;
1938
- this.header = '';
1939
- this.package = '';
1940
- this.type = '';
1941
- this.path = '';
1954
+ this.header = "";
1955
+ this.package = "";
1956
+ this.type = "";
1957
+ this.path = "";
1942
1958
  this.tabConnectors = cdk.EMPTY_QUERY;
1943
1959
  this.activeItemIndex = NaN;
1944
1960
  }
@@ -1950,11 +1966,11 @@
1950
1966
  configurable: true
1951
1967
  });
1952
1968
  TuiDocPageComponent.prototype.getRouterLink = function (tab) {
1953
- if (tab === void 0) { tab = ''; }
1954
- return "./" + tab.replace(/ /g, '_');
1969
+ if (tab === void 0) { tab = ""; }
1970
+ return "./" + tab.replace(/ /g, "_");
1955
1971
  };
1956
1972
  TuiDocPageComponent.ctorParameters = function () { return [
1957
- { type: String, decorators: [{ type: core.Attribute, args: ['deprecated',] }] },
1973
+ { type: String, decorators: [{ type: core.Attribute, args: ["deprecated",] }] },
1958
1974
  { type: undefined, decorators: [{ type: core.Inject, args: [TUI_DOC_DEFAULT_TABS,] }] },
1959
1975
  { type: undefined, decorators: [{ type: core.Inject, args: [PAGE_SEE_ALSO,] }] }
1960
1976
  ]; };
@@ -1975,13 +1991,13 @@
1975
1991
  ], TuiDocPageComponent.prototype, "tabConnectors", void 0);
1976
1992
  TuiDocPageComponent = __decorate([
1977
1993
  core.Component({
1978
- selector: 'tui-doc-page',
1994
+ selector: "tui-doc-page",
1979
1995
  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",
1980
1996
  changeDetection: core.ChangeDetectionStrategy.OnPush,
1981
1997
  providers: PAGE_PROVIDERS,
1982
1998
  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}"]
1983
1999
  }),
1984
- __param(0, core.Attribute('deprecated')),
2000
+ __param(0, core.Attribute("deprecated")),
1985
2001
  __param(1, core.Inject(TUI_DOC_DEFAULT_TABS)),
1986
2002
  __param(2, core.Inject(PAGE_SEE_ALSO))
1987
2003
  ], TuiDocPageComponent);
@@ -1998,14 +2014,14 @@
1998
2014
  TuiDocSeeAlsoComponent.prototype.getRouterLink = function (pageTitle) {
1999
2015
  for (var i = 0; i < this.pages.length; i++) {
2000
2016
  var page = this.pages
2001
- .map(function (page) { return ('subPages' in page ? page.subPages : [page]); })
2017
+ .map(function (page) { return ("subPages" in page ? page.subPages : [page]); })
2002
2018
  .reduce(function (pages, subPages) { return __spread(pages, subPages); }, [])
2003
2019
  .find(function (page) { return page.title === pageTitle; });
2004
2020
  if (page === null || page === void 0 ? void 0 : page.route) {
2005
2021
  return page.route;
2006
2022
  }
2007
2023
  }
2008
- return '';
2024
+ return "";
2009
2025
  };
2010
2026
  TuiDocSeeAlsoComponent.ctorParameters = function () { return [
2011
2027
  { type: String, decorators: [{ type: core.Inject, args: [TUI_DOC_SEE_ALSO_TEXT,] }] },
@@ -2016,7 +2032,7 @@
2016
2032
  ], TuiDocSeeAlsoComponent.prototype, "seeAlso", void 0);
2017
2033
  TuiDocSeeAlsoComponent = __decorate([
2018
2034
  core.Component({
2019
- selector: 'tui-doc-see-also',
2035
+ selector: "tui-doc-see-also",
2020
2036
  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",
2021
2037
  changeDetection: core.ChangeDetectionStrategy.OnPush,
2022
2038
  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}"]
@@ -2040,18 +2056,18 @@
2040
2056
  return TuiDocSeeAlsoModule;
2041
2057
  }());
2042
2058
 
2043
- var TUI_DOC_SOURCE_CODE = new core.InjectionToken('Source code link', {
2044
- factory: function () { return ''; },
2059
+ var TUI_DOC_SOURCE_CODE = new core.InjectionToken("Source code link", {
2060
+ factory: function () { return ""; },
2045
2061
  });
2046
2062
 
2047
2063
  var TuiDocSourceCodeComponent = /** @class */ (function () {
2048
2064
  function TuiDocSourceCodeComponent(sourceCode, text) {
2049
2065
  this.sourceCode = sourceCode;
2050
2066
  this.text = text;
2051
- this.header = '';
2052
- this.package = '';
2053
- this.type = '';
2054
- this.path = '';
2067
+ this.header = "";
2068
+ this.package = "";
2069
+ this.type = "";
2070
+ this.path = "";
2055
2071
  }
2056
2072
  Object.defineProperty(TuiDocSourceCodeComponent.prototype, "pathOptions", {
2057
2073
  get: function () {
@@ -2089,7 +2105,7 @@
2089
2105
  ], TuiDocSourceCodeComponent.prototype, "getPathOptions", null);
2090
2106
  TuiDocSourceCodeComponent = __decorate([
2091
2107
  core.Component({
2092
- selector: 'tui-doc-source-code',
2108
+ selector: "tui-doc-source-code",
2093
2109
  template: "<div\n *ngIf=\"!!sourceCode\"\n polymorpheus-outlet\n [content]=\"sourceCode\"\n [context]=\"pathOptions\"\n>\n <ng-template let-link>\n <a\n *ngIf=\"link\"\n tuiIconButton\n type=\"button\"\n icon=\"tuiIconCodeLarge\"\n appearance=\"icon\"\n target=\"_blank\"\n size=\"s\"\n [title]=\"text\"\n [href]=\"link\"\n ></a>\n </ng-template>\n</div>\n",
2094
2110
  changeDetection: core.ChangeDetectionStrategy.OnPush
2095
2111
  }),
@@ -2133,21 +2149,21 @@
2133
2149
  }());
2134
2150
 
2135
2151
  var TUI_EXAMPLE_PRIMARY_FILE_NAME = {
2136
- TS: 'TypeScript',
2137
- LESS: 'LESS',
2138
- HTML: 'HTML',
2152
+ TS: "TypeScript",
2153
+ LESS: "LESS",
2154
+ HTML: "HTML",
2139
2155
  };
2140
2156
 
2141
2157
  // TODO: 3.0 remove in ivy compilation
2142
- var DEMO_TEXTS = ['Сделано с помощью директивы: ', 'Фон', 'Детали формы'];
2158
+ var DEMO_TEXTS = ["\u0421\u0434\u0435\u043B\u0430\u043D\u043E \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u0434\u0438\u0440\u0435\u043A\u0442\u0438\u0432\u044B: ", "\u0424\u043E\u043D", "\u0414\u0435\u0442\u0430\u043B\u0438 \u0444\u043E\u0440\u043C\u044B"];
2143
2159
  var DOC_TEXTS = [
2144
- 'Аргумент',
2145
- 'Тип',
2146
- 'Имя и описание',
2147
- 'Значение',
2148
- 'Для работы с динамическими шаблонами используется',
2160
+ "\u0410\u0440\u0433\u0443\u043C\u0435\u043D\u0442",
2161
+ "\u0422\u0438\u043F",
2162
+ "\u0418\u043C\u044F \u0438 \u043E\u043F\u0438\u0441\u0430\u043D\u0438\u0435",
2163
+ "\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435",
2164
+ "\u0414\u043B\u044F \u0440\u0430\u0431\u043E\u0442\u044B \u0441 \u0434\u0438\u043D\u0430\u043C\u0438\u0447\u0435\u0441\u043A\u0438\u043C\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0430\u043C\u0438 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F",
2149
2165
  ];
2150
- var EXAMPLE_TEXTS = ['Превью', 'Ссылка на пример скопирована', 'Готово'];
2166
+ var EXAMPLE_TEXTS = ["\u041F\u0440\u0435\u0432\u044C\u044E", "\u0421\u0441\u044B\u043B\u043A\u0430 \u043D\u0430 \u043F\u0440\u0438\u043C\u0435\u0440 \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u0430", "\u0413\u043E\u0442\u043E\u0432\u043E"];
2151
2167
  var TUI_DOC_RUSSIAN = [
2152
2168
  {
2153
2169
  provide: TUI_DOC_DEMO_TEXTS,
@@ -2163,19 +2179,19 @@
2163
2179
  },
2164
2180
  {
2165
2181
  provide: TUI_DOC_MENU_TEXT,
2166
- useValue: 'Меню',
2182
+ useValue: "\u041C\u0435\u043D\u044E",
2167
2183
  },
2168
2184
  {
2169
2185
  provide: TUI_DOC_SEARCH_TEXT,
2170
- useValue: 'Поиск',
2186
+ useValue: "\u041F\u043E\u0438\u0441\u043A",
2171
2187
  },
2172
2188
  {
2173
2189
  provide: TUI_DOC_SEE_ALSO_TEXT,
2174
- useValue: 'Смотрите также',
2190
+ useValue: "\u0421\u043C\u043E\u0442\u0440\u0438\u0442\u0435 \u0442\u0430\u043A\u0436\u0435",
2175
2191
  },
2176
2192
  {
2177
2193
  provide: TUI_DOC_SOURCE_CODE_TEXT,
2178
- useValue: 'Исходный код',
2194
+ useValue: "\u0418\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u043A\u043E\u0434",
2179
2195
  },
2180
2196
  ];
2181
2197
 
@@ -2204,11 +2220,11 @@
2204
2220
  function generateRoutes(type) {
2205
2221
  return [
2206
2222
  {
2207
- path: '',
2223
+ path: "",
2208
2224
  component: type,
2209
2225
  children: [
2210
2226
  {
2211
- path: ':tab',
2227
+ path: ":tab",
2212
2228
  component: type,
2213
2229
  },
2214
2230
  ],