@taiga-ui/addon-doc 3.25.0-dev.main-856bc57 → 3.25.0-dev.main-c3bbfaa

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 (191) hide show
  1. package/addon-doc.module.d.ts +2 -6
  2. package/bundles/taiga-ui-addon-doc-components.umd.js +2441 -0
  3. package/bundles/taiga-ui-addon-doc-components.umd.js.map +1 -0
  4. package/bundles/taiga-ui-addon-doc-directives.umd.js +101 -0
  5. package/bundles/taiga-ui-addon-doc-directives.umd.js.map +1 -0
  6. package/bundles/taiga-ui-addon-doc-interfaces.umd.js +22 -0
  7. package/bundles/taiga-ui-addon-doc-interfaces.umd.js.map +1 -0
  8. package/bundles/taiga-ui-addon-doc-languages.umd.js +54 -0
  9. package/bundles/taiga-ui-addon-doc-languages.umd.js.map +1 -0
  10. package/bundles/taiga-ui-addon-doc-services.umd.js +459 -0
  11. package/bundles/taiga-ui-addon-doc-services.umd.js.map +1 -0
  12. package/bundles/taiga-ui-addon-doc-tokens.umd.js +189 -0
  13. package/bundles/taiga-ui-addon-doc-tokens.umd.js.map +1 -0
  14. package/bundles/taiga-ui-addon-doc-types.umd.js +11 -0
  15. package/bundles/taiga-ui-addon-doc-types.umd.js.map +1 -0
  16. package/bundles/taiga-ui-addon-doc-utils.umd.js +638 -0
  17. package/bundles/taiga-ui-addon-doc-utils.umd.js.map +1 -0
  18. package/bundles/taiga-ui-addon-doc.umd.js +95 -3128
  19. package/bundles/taiga-ui-addon-doc.umd.js.map +1 -1
  20. package/components/code/code.component.d.ts +1 -1
  21. package/components/documentation/documentation.module.d.ts +1 -1
  22. package/components/example/example.component.d.ts +1 -2
  23. package/components/index.d.ts +40 -0
  24. package/{internal → components/internal}/header/header.module.d.ts +1 -1
  25. package/{internal → components/internal}/see-also/see-also.component.d.ts +1 -1
  26. package/{internal → components/internal}/source-code/source-code.component.d.ts +1 -1
  27. package/components/main/main.component.d.ts +1 -2
  28. package/components/main/main.module.d.ts +1 -1
  29. package/components/navigation/navigation.component.d.ts +2 -2
  30. package/components/navigation/navigation.module.d.ts +1 -1
  31. package/components/navigation/navigation.providers.d.ts +1 -1
  32. package/components/package.json +10 -0
  33. package/components/page/page.module.d.ts +2 -2
  34. package/components/taiga-ui-addon-doc-components.d.ts +5 -0
  35. package/directives/index.d.ts +2 -0
  36. package/directives/package.json +10 -0
  37. package/directives/taiga-ui-addon-doc-directives.d.ts +5 -0
  38. package/esm2015/addon-doc.module.js +2 -6
  39. package/esm2015/components/code/code.component.js +3 -3
  40. package/esm2015/components/code/code.module.js +1 -1
  41. package/esm2015/components/copy/copy.component.js +1 -1
  42. package/esm2015/components/copy/copy.module.js +1 -1
  43. package/esm2015/components/demo/demo.component.js +3 -4
  44. package/esm2015/components/demo/demo.module.js +1 -1
  45. package/esm2015/components/documentation/documentation-property-connector.directive.js +3 -3
  46. package/esm2015/components/documentation/documentation.component.js +3 -4
  47. package/esm2015/components/documentation/documentation.module.js +2 -2
  48. package/esm2015/components/documentation/pipes/cleaner.pipe.js +1 -1
  49. package/esm2015/components/documentation/pipes/content-tooltip.pipe.js +1 -1
  50. package/esm2015/components/documentation/pipes/inspect.pipe.js +2 -2
  51. package/esm2015/components/documentation/pipes/opacity.pipe.js +1 -1
  52. package/esm2015/components/documentation/pipes/optional.pipe.js +1 -1
  53. package/esm2015/components/documentation/pipes/primitive-polymorpheus-content.pipe.js +1 -1
  54. package/esm2015/components/documentation/pipes/strip-optional.pipe.js +1 -1
  55. package/esm2015/components/documentation/pipes//321/201olor.pipe.js +1 -1
  56. package/esm2015/components/example/example-capitalize.pipe.js +1 -1
  57. package/esm2015/components/example/example-get-tabs.pipe.js +1 -1
  58. package/esm2015/components/example/example-options.js +2 -2
  59. package/esm2015/components/example/example.component.js +3 -6
  60. package/esm2015/components/example/example.module.js +1 -1
  61. package/esm2015/components/index.js +41 -0
  62. package/esm2015/components/internal/header/header.component.js +56 -0
  63. package/esm2015/components/internal/header/header.module.js +42 -0
  64. package/esm2015/components/internal/input-opacity/input-opacity.directive.js +32 -0
  65. package/esm2015/{internal → components/internal}/input-opacity/input-opacity.module.js +1 -1
  66. package/esm2015/{internal → components/internal}/see-also/see-also.component.js +2 -3
  67. package/esm2015/{internal → components/internal}/see-also/see-also.module.js +1 -1
  68. package/esm2015/components/internal/source-code/source-code.component.js +56 -0
  69. package/esm2015/{internal → components/internal}/source-code/source-code.module.js +1 -1
  70. package/esm2015/components/language-switcher/language-switcher.component.js +1 -1
  71. package/esm2015/components/language-switcher/language-switcher.module.js +1 -1
  72. package/esm2015/components/main/main.component.js +5 -7
  73. package/esm2015/components/main/main.module.js +2 -2
  74. package/esm2015/components/navigation/navigation.component.js +4 -6
  75. package/esm2015/components/navigation/navigation.module.js +2 -2
  76. package/esm2015/components/navigation/navigation.providers.js +2 -3
  77. package/esm2015/components/page/page-tab.directive.js +1 -1
  78. package/esm2015/components/page/page.component.js +4 -4
  79. package/esm2015/components/page/page.module.js +3 -3
  80. package/esm2015/components/page/page.providers.js +2 -2
  81. package/esm2015/components/taiga-ui-addon-doc-components.js +5 -0
  82. package/esm2015/directives/index.js +3 -0
  83. package/esm2015/directives/scroll-into-view/scroll-into-view.directive.js +2 -2
  84. package/esm2015/directives/scroll-into-view/scroll-into-view.module.js +1 -1
  85. package/esm2015/directives/taiga-ui-addon-doc-directives.js +5 -0
  86. package/esm2015/index.js +10 -0
  87. package/esm2015/interfaces/code-editor.js +1 -1
  88. package/esm2015/interfaces/demo-params.js +1 -1
  89. package/esm2015/interfaces/index.js +5 -0
  90. package/esm2015/interfaces/page.js +1 -1
  91. package/esm2015/interfaces/source-code-path-options.js +1 -1
  92. package/esm2015/interfaces/taiga-ui-addon-doc-interfaces.js +5 -0
  93. package/esm2015/languages/index.js +2 -0
  94. package/esm2015/languages/russian.js +3 -2
  95. package/esm2015/languages/taiga-ui-addon-doc-languages.js +5 -0
  96. package/esm2015/services/index.js +5 -0
  97. package/esm2015/services/taiga-ui-addon-doc-services.js +5 -0
  98. package/esm2015/services/theme-night.options.js +1 -1
  99. package/esm2015/services/theme-night.service.js +1 -1
  100. package/esm2015/services/theme.options.js +1 -1
  101. package/esm2015/services/theme.service.js +1 -1
  102. package/esm2015/taiga-ui-addon-doc.js +2 -2
  103. package/esm2015/tokens/code-actions.js +1 -1
  104. package/esm2015/tokens/code-editor.js +1 -1
  105. package/esm2015/tokens/default-tabs.js +1 -1
  106. package/esm2015/tokens/example-content-processor.js +2 -2
  107. package/esm2015/tokens/excluded-properties.js +1 -1
  108. package/esm2015/tokens/i18n.js +1 -1
  109. package/esm2015/tokens/index.js +15 -0
  110. package/esm2015/tokens/logo.js +1 -1
  111. package/esm2015/tokens/page-loaded.js +1 -1
  112. package/esm2015/tokens/pages.js +2 -2
  113. package/esm2015/tokens/scroll-behavior.js +1 -1
  114. package/esm2015/tokens/see-also.js +1 -1
  115. package/esm2015/tokens/source-code.js +1 -1
  116. package/esm2015/tokens/taiga-ui-addon-doc-tokens.js +5 -0
  117. package/esm2015/tokens/title.js +1 -1
  118. package/esm2015/tokens/url-state-handler.js +1 -1
  119. package/esm2015/types/index.js +2 -0
  120. package/esm2015/types/pages.js +1 -1
  121. package/esm2015/types/taiga-ui-addon-doc-types.js +5 -0
  122. package/esm2015/utils/coerce-boolean.js +1 -1
  123. package/esm2015/utils/coerce-value.js +1 -1
  124. package/esm2015/utils/generate-routes.js +1 -1
  125. package/esm2015/utils/index.js +10 -0
  126. package/esm2015/utils/inspect.js +1 -1
  127. package/esm2015/utils/parse-code-block.js +9 -0
  128. package/esm2015/utils/raw-load-record.js +1 -1
  129. package/esm2015/utils/raw-load.js +1 -1
  130. package/esm2015/utils/taiga-ui-addon-doc-utils.js +5 -0
  131. package/esm2015/utils/to-flat-map-pages.js +1 -1
  132. package/esm2015/utils/transliterate-keyboard-layout.js +1 -1
  133. package/fesm2015/taiga-ui-addon-doc-components.js +1871 -0
  134. package/fesm2015/taiga-ui-addon-doc-components.js.map +1 -0
  135. package/fesm2015/taiga-ui-addon-doc-directives.js +65 -0
  136. package/fesm2015/taiga-ui-addon-doc-directives.js.map +1 -0
  137. package/fesm2015/taiga-ui-addon-doc-interfaces.js +12 -0
  138. package/fesm2015/taiga-ui-addon-doc-interfaces.js.map +1 -0
  139. package/fesm2015/taiga-ui-addon-doc-languages.js +46 -0
  140. package/fesm2015/taiga-ui-addon-doc-languages.js.map +1 -0
  141. package/fesm2015/taiga-ui-addon-doc-services.js +95 -0
  142. package/fesm2015/taiga-ui-addon-doc-services.js.map +1 -0
  143. package/fesm2015/taiga-ui-addon-doc-tokens.js +162 -0
  144. package/fesm2015/taiga-ui-addon-doc-tokens.js.map +1 -0
  145. package/fesm2015/taiga-ui-addon-doc-types.js +4 -0
  146. package/fesm2015/taiga-ui-addon-doc-types.js.map +1 -0
  147. package/fesm2015/taiga-ui-addon-doc-utils.js +228 -0
  148. package/fesm2015/taiga-ui-addon-doc-utils.js.map +1 -0
  149. package/fesm2015/taiga-ui-addon-doc.js +11 -2409
  150. package/fesm2015/taiga-ui-addon-doc.js.map +1 -1
  151. package/index.d.ts +9 -0
  152. package/interfaces/index.d.ts +4 -0
  153. package/interfaces/package.json +10 -0
  154. package/interfaces/taiga-ui-addon-doc-interfaces.d.ts +5 -0
  155. package/languages/index.d.ts +1 -0
  156. package/languages/package.json +10 -0
  157. package/languages/taiga-ui-addon-doc-languages.d.ts +5 -0
  158. package/package.json +1 -1
  159. package/services/index.d.ts +4 -0
  160. package/services/package.json +10 -0
  161. package/services/taiga-ui-addon-doc-services.d.ts +5 -0
  162. package/taiga-ui-addon-doc.d.ts +1 -1
  163. package/tokens/code-editor.d.ts +1 -1
  164. package/tokens/index.d.ts +14 -0
  165. package/tokens/package.json +10 -0
  166. package/tokens/pages.d.ts +2 -2
  167. package/tokens/source-code.d.ts +1 -1
  168. package/tokens/taiga-ui-addon-doc-tokens.d.ts +5 -0
  169. package/types/index.d.ts +1 -0
  170. package/types/package.json +10 -0
  171. package/types/pages.d.ts +1 -1
  172. package/types/taiga-ui-addon-doc-types.d.ts +5 -0
  173. package/utils/index.d.ts +9 -0
  174. package/utils/package.json +10 -0
  175. package/utils/raw-load-record.d.ts +1 -1
  176. package/utils/raw-load.d.ts +1 -1
  177. package/utils/taiga-ui-addon-doc-utils.d.ts +5 -0
  178. package/utils/to-flat-map-pages.d.ts +2 -2
  179. package/esm2015/components/code/parse-code-block.js +0 -9
  180. package/esm2015/internal/header/header.component.js +0 -57
  181. package/esm2015/internal/header/header.module.js +0 -42
  182. package/esm2015/internal/input-opacity/input-opacity.directive.js +0 -32
  183. package/esm2015/internal/source-code/source-code.component.js +0 -57
  184. package/esm2015/public-api.js +0 -69
  185. package/public-api.d.ts +0 -60
  186. /package/{internal → components/internal}/header/header.component.d.ts +0 -0
  187. /package/{internal → components/internal}/input-opacity/input-opacity.directive.d.ts +0 -0
  188. /package/{internal → components/internal}/input-opacity/input-opacity.module.d.ts +0 -0
  189. /package/{internal → components/internal}/see-also/see-also.module.d.ts +0 -0
  190. /package/{internal → components/internal}/source-code/source-code.module.d.ts +0 -0
  191. /package/{components/code → utils}/parse-code-block.d.ts +0 -0
@@ -1,3146 +1,113 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('rxjs/operators'), require('markdown-it'), require('@angular/common'), require('ngx-highlightjs'), require('@taiga-ui/cdk'), require('@taiga-ui/kit'), require('@taiga-ui/core'), require('@angular/forms'), require('@angular/router'), require('@angular/animations'), require('@angular/cdk/clipboard'), require('@ng-web-apis/common'), require('@tinkoff/ng-polymorpheus'), require('@taiga-ui/i18n'), require('@taiga-ui/cdk/constants'), require('@angular/platform-browser'), require('@taiga-ui/addon-mobile')) :
3
- typeof define === 'function' && define.amd ? define('@taiga-ui/addon-doc', ['exports', '@angular/core', 'rxjs', 'rxjs/operators', 'markdown-it', '@angular/common', 'ngx-highlightjs', '@taiga-ui/cdk', '@taiga-ui/kit', '@taiga-ui/core', '@angular/forms', '@angular/router', '@angular/animations', '@angular/cdk/clipboard', '@ng-web-apis/common', '@tinkoff/ng-polymorpheus', '@taiga-ui/i18n', '@taiga-ui/cdk/constants', '@angular/platform-browser', '@taiga-ui/addon-mobile'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"]["addon-doc"] = {}), global.ng.core, global.rxjs, global.rxjs.operators, global.MarkdownIt, global.ng.common, global.i2, global.i6, global.i1, global.i2$1, global.ng.forms, global.ng.router, global.ng.animations, global.ng.cdk.clipboard, global.common, global.i6$2, global.i5$1, global.constants, global.ng.platformBrowser, global.i4$1));
5
- })(this, (function (exports, i0, i9, operators, MarkdownIt, i4, i2, i6, i1, i2$1, i5, i6$1, animations, i8, common, i6$2, i5$1, constants, i8$1, i4$1) { 'use strict';
6
-
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
-
9
- function _interopNamespace(e) {
10
- if (e && e.__esModule) return e;
11
- var n = Object.create(null);
12
- if (e) {
13
- Object.keys(e).forEach(function (k) {
14
- if (k !== 'default') {
15
- var d = Object.getOwnPropertyDescriptor(e, k);
16
- Object.defineProperty(n, k, d.get ? d : {
17
- enumerable: true,
18
- get: function () { return e[k]; }
19
- });
20
- }
21
- });
22
- }
23
- n["default"] = e;
24
- return Object.freeze(n);
25
- }
26
-
27
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
- var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
29
- var MarkdownIt__default = /*#__PURE__*/_interopDefaultLegacy(MarkdownIt);
30
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
31
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
32
- var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6);
33
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
34
- var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
35
- var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
36
- var i6__namespace = /*#__PURE__*/_interopNamespace(i6$1);
37
- var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
38
- var i6__namespace$2 = /*#__PURE__*/_interopNamespace(i6$2);
39
- var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
40
- var i8__namespace$1 = /*#__PURE__*/_interopNamespace(i8$1);
41
- var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
42
-
43
- function tuiTryParseMarkdownCodeBlock(text) {
44
- if (text === void 0) { text = ""; }
45
- var tokens = new MarkdownIt__default["default"]().parse(text, {});
46
- var result = tokens
47
- .filter(function (_a) {
48
- var tag = _a.tag, type = _a.type;
49
- return tag === "code" && type === "fence";
50
- })
51
- .map(function (_a) {
52
- var content = _a.content;
53
- return content;
54
- });
55
- return result.length ? result : [text];
56
- }
57
-
58
- /**
59
- * Processes content in example
60
- */
61
- var TUI_DOC_EXAMPLE_CONTENT_PROCESSOR = new i0.InjectionToken("[TUI_DOC_EXAMPLE_CONTENT_PROCESSOR]", {
62
- factory: function () { return i9.identity; },
63
- });
64
- /**
65
- * Processes markdown in code block
66
- */
67
- var TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR = new i0.InjectionToken("[TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR]", {
68
- factory: function () { return tuiTryParseMarkdownCodeBlock; },
69
- });
70
-
71
- /*! *****************************************************************************
72
- Copyright (c) Microsoft Corporation.
73
-
74
- Permission to use, copy, modify, and/or distribute this software for any
75
- purpose with or without fee is hereby granted.
76
-
77
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
78
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
79
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
80
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
81
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
82
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
83
- PERFORMANCE OF THIS SOFTWARE.
84
- ***************************************************************************** */
85
- /* global Reflect, Promise */
86
- var extendStatics = function (d, b) {
87
- extendStatics = Object.setPrototypeOf ||
88
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
89
- function (d, b) { for (var p in b)
90
- if (Object.prototype.hasOwnProperty.call(b, p))
91
- d[p] = b[p]; };
92
- return extendStatics(d, b);
93
- };
94
- function __extends(d, b) {
95
- if (typeof b !== "function" && b !== null)
96
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
97
- extendStatics(d, b);
98
- function __() { this.constructor = d; }
99
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
100
- }
101
- var __assign = function () {
102
- __assign = Object.assign || function __assign(t) {
103
- for (var s, i = 1, n = arguments.length; i < n; i++) {
104
- s = arguments[i];
105
- for (var p in s)
106
- if (Object.prototype.hasOwnProperty.call(s, p))
107
- t[p] = s[p];
108
- }
109
- return t;
110
- };
111
- return __assign.apply(this, arguments);
112
- };
113
- function __rest(s, e) {
114
- var t = {};
115
- for (var p in s)
116
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
117
- t[p] = s[p];
118
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
119
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
120
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
121
- t[p[i]] = s[p[i]];
122
- }
123
- return t;
124
- }
125
- function __decorate(decorators, target, key, desc) {
126
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
127
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
128
- r = Reflect.decorate(decorators, target, key, desc);
129
- else
130
- for (var i = decorators.length - 1; i >= 0; i--)
131
- if (d = decorators[i])
132
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
133
- return c > 3 && r && Object.defineProperty(target, key, r), r;
134
- }
135
- function __param(paramIndex, decorator) {
136
- return function (target, key) { decorator(target, key, paramIndex); };
137
- }
138
- function __metadata(metadataKey, metadataValue) {
139
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
140
- return Reflect.metadata(metadataKey, metadataValue);
141
- }
142
- function __awaiter(thisArg, _arguments, P, generator) {
143
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
144
- return new (P || (P = Promise))(function (resolve, reject) {
145
- function fulfilled(value) { try {
146
- step(generator.next(value));
147
- }
148
- catch (e) {
149
- reject(e);
150
- } }
151
- function rejected(value) { try {
152
- step(generator["throw"](value));
153
- }
154
- catch (e) {
155
- reject(e);
156
- } }
157
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
158
- step((generator = generator.apply(thisArg, _arguments || [])).next());
159
- });
160
- }
161
- function __generator(thisArg, body) {
162
- var _ = { label: 0, sent: function () { if (t[0] & 1)
163
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
164
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
165
- function verb(n) { return function (v) { return step([n, v]); }; }
166
- function step(op) {
167
- if (f)
168
- throw new TypeError("Generator is already executing.");
169
- while (_)
170
- try {
171
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
172
- return t;
173
- if (y = 0, t)
174
- op = [op[0] & 2, t.value];
175
- switch (op[0]) {
176
- case 0:
177
- case 1:
178
- t = op;
179
- break;
180
- case 4:
181
- _.label++;
182
- return { value: op[1], done: false };
183
- case 5:
184
- _.label++;
185
- y = op[1];
186
- op = [0];
187
- continue;
188
- case 7:
189
- op = _.ops.pop();
190
- _.trys.pop();
191
- continue;
192
- default:
193
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
194
- _ = 0;
195
- continue;
196
- }
197
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
198
- _.label = op[1];
199
- break;
200
- }
201
- if (op[0] === 6 && _.label < t[1]) {
202
- _.label = t[1];
203
- t = op;
204
- break;
205
- }
206
- if (t && _.label < t[2]) {
207
- _.label = t[2];
208
- _.ops.push(op);
209
- break;
210
- }
211
- if (t[2])
212
- _.ops.pop();
213
- _.trys.pop();
214
- continue;
215
- }
216
- op = body.call(thisArg, _);
217
- }
218
- catch (e) {
219
- op = [6, e];
220
- y = 0;
221
- }
222
- finally {
223
- f = t = 0;
224
- }
225
- if (op[0] & 5)
226
- throw op[1];
227
- return { value: op[0] ? op[1] : void 0, done: true };
228
- }
229
- }
230
- var __createBinding = Object.create ? (function (o, m, k, k2) {
231
- if (k2 === undefined)
232
- k2 = k;
233
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
234
- }) : (function (o, m, k, k2) {
235
- if (k2 === undefined)
236
- k2 = k;
237
- o[k2] = m[k];
238
- });
239
- function __exportStar(m, o) {
240
- for (var p in m)
241
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
242
- __createBinding(o, m, p);
243
- }
244
- function __values(o) {
245
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
246
- if (m)
247
- return m.call(o);
248
- if (o && typeof o.length === "number")
249
- return {
250
- next: function () {
251
- if (o && i >= o.length)
252
- o = void 0;
253
- return { value: o && o[i++], done: !o };
254
- }
255
- };
256
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
257
- }
258
- function __read(o, n) {
259
- var m = typeof Symbol === "function" && o[Symbol.iterator];
260
- if (!m)
261
- return o;
262
- var i = m.call(o), r, ar = [], e;
263
- try {
264
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
265
- ar.push(r.value);
266
- }
267
- catch (error) {
268
- e = { error: error };
269
- }
270
- finally {
271
- try {
272
- if (r && !r.done && (m = i["return"]))
273
- m.call(i);
274
- }
275
- finally {
276
- if (e)
277
- throw e.error;
278
- }
279
- }
280
- return ar;
281
- }
282
- /** @deprecated */
283
- function __spread() {
284
- for (var ar = [], i = 0; i < arguments.length; i++)
285
- ar = ar.concat(__read(arguments[i]));
286
- return ar;
287
- }
288
- /** @deprecated */
289
- function __spreadArrays() {
290
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
291
- s += arguments[i].length;
292
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
293
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
294
- r[k] = a[j];
295
- return r;
296
- }
297
- function __spreadArray(to, from, pack) {
298
- if (pack || arguments.length === 2)
299
- for (var i = 0, l = from.length, ar; i < l; i++) {
300
- if (ar || !(i in from)) {
301
- if (!ar)
302
- ar = Array.prototype.slice.call(from, 0, i);
303
- ar[i] = from[i];
304
- }
305
- }
306
- return to.concat(ar || from);
307
- }
308
- function __await(v) {
309
- return this instanceof __await ? (this.v = v, this) : new __await(v);
310
- }
311
- function __asyncGenerator(thisArg, _arguments, generator) {
312
- if (!Symbol.asyncIterator)
313
- throw new TypeError("Symbol.asyncIterator is not defined.");
314
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
315
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
316
- function verb(n) { if (g[n])
317
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
318
- function resume(n, v) { try {
319
- step(g[n](v));
320
- }
321
- catch (e) {
322
- settle(q[0][3], e);
323
- } }
324
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
325
- function fulfill(value) { resume("next", value); }
326
- function reject(value) { resume("throw", value); }
327
- function settle(f, v) { if (f(v), q.shift(), q.length)
328
- resume(q[0][0], q[0][1]); }
329
- }
330
- function __asyncDelegator(o) {
331
- var i, p;
332
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
333
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
334
- }
335
- function __asyncValues(o) {
336
- if (!Symbol.asyncIterator)
337
- throw new TypeError("Symbol.asyncIterator is not defined.");
338
- var m = o[Symbol.asyncIterator], i;
339
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
340
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
341
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
342
- }
343
- function __makeTemplateObject(cooked, raw) {
344
- if (Object.defineProperty) {
345
- Object.defineProperty(cooked, "raw", { value: raw });
346
- }
347
- else {
348
- cooked.raw = raw;
349
- }
350
- return cooked;
351
- }
352
- ;
353
- var __setModuleDefault = Object.create ? (function (o, v) {
354
- Object.defineProperty(o, "default", { enumerable: true, value: v });
355
- }) : function (o, v) {
356
- o["default"] = v;
357
- };
358
- function __importStar(mod) {
359
- if (mod && mod.__esModule)
360
- return mod;
361
- var result = {};
362
- if (mod != null)
363
- for (var k in mod)
364
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
365
- __createBinding(result, mod, k);
366
- __setModuleDefault(result, mod);
367
- return result;
368
- }
369
- function __importDefault(mod) {
370
- return (mod && mod.__esModule) ? mod : { default: mod };
371
- }
372
- function __classPrivateFieldGet(receiver, state, kind, f) {
373
- if (kind === "a" && !f)
374
- throw new TypeError("Private accessor was defined without a getter");
375
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
376
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
377
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
378
- }
379
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
380
- if (kind === "m")
381
- throw new TypeError("Private method is not writable");
382
- if (kind === "a" && !f)
383
- throw new TypeError("Private accessor was defined without a setter");
384
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
385
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
386
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
387
- }
388
-
389
- function tuiRawLoad(content) {
390
- return __awaiter(this, void 0, void 0, function () {
391
- var _a;
392
- return __generator(this, function (_b) {
393
- switch (_b.label) {
394
- case 0:
395
- if (!(content instanceof Promise)) return [3 /*break*/, 2];
396
- return [4 /*yield*/, content];
397
- case 1:
398
- _a = (_b.sent()).default;
399
- return [3 /*break*/, 3];
400
- case 2:
401
- _a = content;
402
- _b.label = 3;
403
- case 3: return [2 /*return*/, _a];
404
- }
405
- });
406
- });
407
- }
408
-
409
- var TuiDocCodeComponent = /** @class */ (function () {
410
- function TuiDocCodeComponent(markdownCodeProcessor) {
411
- var _this = this;
412
- this.markdownCodeProcessor = markdownCodeProcessor;
413
- this.rawLoader$$ = new i9.BehaviorSubject('');
414
- this.filename = '';
415
- this.processor$ = this.rawLoader$$.pipe(operators.switchMap(tuiRawLoad), operators.map(function (value) { return _this.markdownCodeProcessor(value); }));
416
- }
417
- Object.defineProperty(TuiDocCodeComponent.prototype, "code", {
418
- set: function (code) {
419
- this.rawLoader$$.next(code);
420
- },
421
- enumerable: false,
422
- configurable: true
423
- });
424
- Object.defineProperty(TuiDocCodeComponent.prototype, "hasFilename", {
425
- get: function () {
426
- return !!this.filename;
427
- },
428
- enumerable: false,
429
- configurable: true
430
- });
431
- return TuiDocCodeComponent;
432
- }());
433
- TuiDocCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeComponent, deps: [{ token: TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR }], target: i0__namespace.ɵɵFactoryTarget.Component });
434
- TuiDocCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocCodeComponent, selector: "tui-doc-code", inputs: { filename: "filename", code: "code" }, host: { properties: { "class._has-filename": "this.hasFilename" } }, ngImport: i0__namespace, template: "<!-- eslint-disable @html-eslint/element-newline -->\n<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", styles: [":host{display:block}.t-header{font:var(--tui-font-text-s);font-weight:bold}.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);word-wrap:break-word;white-space:pre-wrap}@media all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .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}\n"], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.Highlight, selector: "[highlight]", inputs: ["highlight", "languages", "lineNumbers"], outputs: ["highlighted"] }], pipes: { "async": i4__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
435
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeComponent, decorators: [{
436
- type: i0.Component,
437
- args: [{
438
- selector: 'tui-doc-code',
439
- templateUrl: './code.template.html',
440
- styleUrls: ['./code.style.less'],
441
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
442
- }]
443
- }], ctorParameters: function () {
444
- return [{ type: undefined, decorators: [{
445
- type: i0.Inject,
446
- args: [TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR]
447
- }] }];
448
- }, propDecorators: { filename: [{
449
- type: i0.Input
450
- }], code: [{
451
- type: i0.Input
452
- }], hasFilename: [{
453
- type: i0.HostBinding,
454
- args: ['class._has-filename']
455
- }] } });
456
-
457
- var TuiDocCodeModule = /** @class */ (function () {
458
- function TuiDocCodeModule() {
459
- }
460
- return TuiDocCodeModule;
461
- }());
462
- TuiDocCodeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
463
- TuiDocCodeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeModule, declarations: [TuiDocCodeComponent], imports: [i4.CommonModule, i2.HighlightModule], exports: [TuiDocCodeComponent] });
464
- TuiDocCodeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeModule, imports: [[i4.CommonModule, i2.HighlightModule]] });
465
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeModule, decorators: [{
466
- type: i0.NgModule,
467
- args: [{
468
- imports: [i4.CommonModule, i2.HighlightModule],
469
- declarations: [TuiDocCodeComponent],
470
- exports: [TuiDocCodeComponent],
471
- }]
472
- }] });
473
-
474
- var COPIED_TIMEOUT = 1500;
475
- var TuiDocCopyComponent = /** @class */ (function () {
476
- function TuiDocCopyComponent(texts$) {
477
- this.texts$ = texts$;
478
- this.copy$ = new i9.Subject();
479
- }
480
- Object.defineProperty(TuiDocCopyComponent.prototype, "copied$", {
481
- get: function () {
482
- return this.copy$.pipe(operators.switchMap(function () { return i9.timer(COPIED_TIMEOUT).pipe(operators.map(i6.ALWAYS_FALSE_HANDLER), operators.startWith(true)); }));
483
- },
484
- enumerable: false,
485
- configurable: true
486
- });
487
- TuiDocCopyComponent.prototype.onClick = function () {
488
- this.copy$.next();
489
- };
490
- return TuiDocCopyComponent;
491
- }());
492
- TuiDocCopyComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCopyComponent, deps: [{ token: i1.TUI_COPY_TEXTS }], target: i0__namespace.ɵɵFactoryTarget.Component });
493
- TuiDocCopyComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocCopyComponent, selector: "tui-doc-copy", providers: [i6.TuiDestroyService], ngImport: i0__namespace, 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", styles: [":host{position:relative;display:inline-block;vertical-align:middle}.t-copy{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;width:100%;color:var(--tui-text-01);background:var(--tui-base-01);overflow:hidden}.t-copy:hover{background:var(--tui-base-02)}.t-initial{white-space:nowrap}.t-initial:empty:before{content:attr(data-text)}.t-content{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:flex;flex-direction:column;transform:translateY(1rem);text-align:center;line-height:2rem}.t-content_moved{transform:translateY(-1rem)}\n"], components: [{ type: i2__namespace$1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i4__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
494
- __decorate([
495
- i6.tuiPure
496
- ], TuiDocCopyComponent.prototype, "copied$", null);
497
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCopyComponent, decorators: [{
498
- type: i0.Component,
499
- args: [{
500
- selector: 'tui-doc-copy',
501
- templateUrl: './copy.template.html',
502
- styleUrls: ['./copy.style.less'],
503
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
504
- providers: [i6.TuiDestroyService],
505
- }]
506
- }], ctorParameters: function () {
507
- return [{ type: i9__namespace.Observable, decorators: [{
508
- type: i0.Inject,
509
- args: [i1.TUI_COPY_TEXTS]
510
- }] }];
511
- }, propDecorators: { copied$: [] } });
512
-
513
- var TuiDocCopyModule = /** @class */ (function () {
514
- function TuiDocCopyModule() {
515
- }
516
- return TuiDocCopyModule;
517
- }());
518
- TuiDocCopyModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCopyModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
519
- TuiDocCopyModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCopyModule, declarations: [TuiDocCopyComponent], imports: [i4.CommonModule, i2$1.TuiButtonModule], exports: [TuiDocCopyComponent] });
520
- TuiDocCopyModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCopyModule, imports: [[i4.CommonModule, i2$1.TuiButtonModule]] });
521
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCopyModule, decorators: [{
522
- type: i0.NgModule,
523
- args: [{
524
- imports: [i4.CommonModule, i2$1.TuiButtonModule],
525
- declarations: [TuiDocCopyComponent],
526
- exports: [TuiDocCopyComponent],
527
- }]
528
- }] });
529
-
530
- /**
531
- * TODO: think about reorganization in @taiga-ui/i18n way
532
- */
533
- /**
534
- * tui-doc-demo i18n texts
535
- * Works with a tuple
536
- * [@string tuiMode tooltip content, @string word 'background', @string 'form value']
537
- */
538
- var TUI_DOC_DEMO_TEXTS = new i0.InjectionToken("[TUI_DOC_DEMO_TEXTS]", {
539
- factory: function () { return ["Read more more about modes: ", "Background", "Form value"]; },
540
- });
541
- /**
542
- * tui-doc-documentation i18n texts
543
- * Works with a tuple
544
- * [
545
- * @string word 'argument',
546
- * @string word 'type',
547
- * @string 'name and description',
548
- * @string word 'value'
549
- * @string message for tooltip about ng-polymorpheus
550
- * ]
551
- */
552
- var TUI_DOC_DOCUMENTATION_TEXTS = new i0.InjectionToken("[TUI_DOC_DOCUMENTATION_TEXTS]", {
553
- factory: function () { return [
554
- "Argument",
555
- "Type",
556
- "Name and description",
557
- "Value",
558
- "Learn about our dynamic templates from ",
559
- ]; },
560
- });
561
- /**
562
- * tui-doc-example i18n texts
563
- * Works with a tuple
564
- * [
565
- * @string default tab name,
566
- * @string link to a sample copied message text,
567
- * @string link to a sample copied message label
568
- * ]
569
- */
570
- var TUI_DOC_EXAMPLE_TEXTS = new i0.InjectionToken("[TUI_DOC_EXAMPLE_TEXTS]", {
571
- factory: function () { return ["Preview", "Link to a sample was successfully copied", "Done"]; },
572
- });
573
- var TUI_DOC_MENU_TEXT = new i0.InjectionToken("[TUI_DOC_MENU_TEXT]", {
574
- factory: function () { return "Menu"; },
575
- });
576
- var TUI_DOC_SEARCH_TEXT = new i0.InjectionToken("[TUI_DOC_SEARCH_TEXT]", {
577
- factory: function () { return "Search"; },
578
- });
579
- var TUI_DOC_SEE_ALSO_TEXT = new i0.InjectionToken("[TUI_DOC_SEE_ALSO_TEXT]", {
580
- factory: function () { return "See also"; },
581
- });
582
- var TUI_DOC_SOURCE_CODE_TEXT = new i0.InjectionToken("[TUI_DOC_SOURCE_CODE_TEXT]", {
583
- factory: function () { return "Source code"; },
584
- });
585
-
586
- var TUI_DOC_URL_STATE_HANDLER = new i0.InjectionToken("[TUI_DOC_URL_STATE_HANDLER]", {
587
- factory: function () { return String; },
588
- });
589
-
590
- function tuiCoerceValueIsTrue(value) {
591
- return (value === null || value === void 0 ? void 0 : value.toString()) === "true";
592
- }
593
-
594
- var MIN_WIDTH = 160;
595
- var TuiDocDemoComponent = /** @class */ (function () {
596
- function TuiDocDemoComponent(isMobile, el, locationRef, urlSerializer, texts, urlStateHandler) {
597
- var _a, _b;
598
- this.isMobile = isMobile;
599
- this.el = el;
600
- this.locationRef = locationRef;
601
- this.urlSerializer = urlSerializer;
602
- this.texts = texts;
603
- this.urlStateHandler = urlStateHandler;
604
- this.control = null;
605
- this.template = null;
606
- this.updateOnVariants = ['change', 'blur', 'submit'];
607
- this.updateOn = this.params.updateOn || this.updateOnVariants[0];
608
- this.opaque = tuiCoerceValueIsTrue((_a = this.params.sandboxOpaque) !== null && _a !== void 0 ? _a : true);
609
- this.expanded = tuiCoerceValueIsTrue((_b = this.params.sandboxExpanded) !== null && _b !== void 0 ? _b : false);
610
- this.mode = this.params.tuiMode || null;
611
- this.sandboxWidth = i6.tuiToInteger(this.params.sandboxWidth);
612
- this.change$ = new i9.Subject();
613
- this.items = ['onLight', 'onDark'];
614
- }
615
- TuiDocDemoComponent.prototype.onResize = function () {
616
- this.updateWidth();
617
- this.onMouseUp();
618
- };
619
- TuiDocDemoComponent.prototype.onMouseUp = function () {
620
- this.updateUrl({ sandboxWidth: this.sandboxWidth });
621
- };
622
- TuiDocDemoComponent.prototype.ngOnInit = function () {
623
- this.createForm();
624
- this.updateWidth(this.sandboxWidth + this.delta);
625
- };
626
- TuiDocDemoComponent.prototype.onModeChange = function (mode) {
627
- this.mode = mode;
628
- this.updateUrl({ sandboxWidth: this.sandboxWidth });
629
- this.change$.next();
630
- };
631
- TuiDocDemoComponent.prototype.toggleDetails = function () {
632
- this.expanded = !this.expanded;
633
- this.updateUrl({ sandboxExpanded: this.expanded });
634
- };
635
- TuiDocDemoComponent.prototype.changeOpaque = function (opaque) {
636
- this.opaque = opaque;
637
- this.updateUrl({ sandboxOpaque: this.opaque });
638
- };
639
- TuiDocDemoComponent.prototype.updateOnChange = function (updateOn) {
640
- this.updateOn = updateOn;
641
- this.updateUrl({ updateOn: updateOn });
642
- this.createForm();
643
- };
644
- TuiDocDemoComponent.prototype.updateWidth = function (width) {
645
- if (width === void 0) { width = NaN; }
646
- if (!this.resizer || !this.resizeable || !this.content) {
647
- return;
648
- }
649
- var safe = width || this.resizeable.nativeElement.clientWidth;
650
- var total = this.el.nativeElement.clientWidth;
651
- var clamped = Math.round(i6.tuiClamp(safe, MIN_WIDTH, total)) - this.delta;
652
- var validated = safe < total ? clamped : NaN;
653
- this.resizer.nativeElement.textContent = String(clamped || '-');
654
- this.resizeable.nativeElement.style.width = validated ? i6.tuiPx(safe) : '';
655
- this.sandboxWidth = validated;
656
- };
657
- Object.defineProperty(TuiDocDemoComponent.prototype, "delta", {
658
- get: function () {
659
- return this.resizeable && this.content
660
- ? this.resizeable.nativeElement.clientWidth -
661
- this.content.nativeElement.clientWidth
662
- : 0;
663
- },
664
- enumerable: false,
665
- configurable: true
666
- });
667
- TuiDocDemoComponent.prototype.updateUrl = function (params) {
668
- var tree = this.getUrlTree();
669
- var queryParams = tree.queryParams;
670
- delete queryParams.sandboxWidth;
671
- delete queryParams.tuiMode;
672
- tree.queryParams = Object.assign(Object.assign({}, queryParams), i6.tuiCleanObject(Object.assign({ tuiMode: this.mode }, params)));
673
- this.locationRef.go(this.urlStateHandler(tree));
674
- };
675
- TuiDocDemoComponent.prototype.createForm = function () {
676
- var _c = this, control = _c.control, updateOn = _c.updateOn;
677
- if (control) {
678
- this.testForm = new i5.FormGroup({ testValue: control }, { updateOn: updateOn });
679
- }
680
- };
681
- TuiDocDemoComponent.prototype.getUrlTree = function () {
682
- return this.urlSerializer.parse(this.locationRef.path());
683
- };
684
- Object.defineProperty(TuiDocDemoComponent.prototype, "params", {
685
- get: function () {
686
- return this.getUrlTree().queryParams;
687
- },
688
- enumerable: false,
689
- configurable: true
690
- });
691
- return TuiDocDemoComponent;
692
- }());
693
- TuiDocDemoComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDemoComponent, deps: [{ token: i6.TUI_IS_MOBILE }, { token: i0.ElementRef }, { token: i4.Location }, { token: i6$1.UrlSerializer }, { token: TUI_DOC_DEMO_TEXTS }, { token: TUI_DOC_URL_STATE_HANDLER }], target: i0__namespace.ɵɵFactoryTarget.Component });
694
- TuiDocDemoComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocDemoComponent, selector: "tui-doc-demo", inputs: { control: "control" }, host: { listeners: { "window:resize": "onResize()", "document:mouseup.silent": "onMouseUp()" } }, providers: [
695
- i6.TuiDestroyService,
696
- {
697
- provide: i2$1.TuiModeDirective,
698
- useExisting: i0.forwardRef(function () { return TuiDocDemoComponent; }),
699
- },
700
- ], queries: [{ propertyName: "template", first: true, predicate: i0.TemplateRef, descendants: true }], viewQueries: [{ propertyName: "resizeable", first: true, predicate: i6.TuiResizeableDirective, descendants: true, static: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true, static: true }, { propertyName: "resizer", first: true, predicate: ["resizer"], descendants: true, static: true }], ngImport: i0__namespace, 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 [ngModel]=\"mode\"\n (ngModelChange)=\"onModeChange($event)\"\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 [ngModel]=\"mode\"\n (ngModelChange)=\"onModeChange($event)\"\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 [ngModel]=\"mode\"\n (ngModelChange)=\"onModeChange($event)\"\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 [ngModel]=\"mode\"\n (ngModelChange)=\"onModeChange($event)\"\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 (ngModelChange)=\"changeOpaque($event)\"\n >\n {{ texts[1] }}\n </tui-checkbox-labeled>\n</div>\n<div\n tuiResizeable\n class=\"t-wrapper\"\n [class.t-wrapper_dark]=\"mode === 'onDark'\"\n [class.t-wrapper_gray]=\"mode === 'onLight'\"\n [class.t-wrapper_transparent]=\"!opaque\"\n>\n <div\n id=\"demo-content\"\n class=\"t-content\"\n >\n <div #content>\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 automation-id=\"tui-demo-button__toggle-details\"\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 automation-id=\"tui-demo-select__expand-update-on\"\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 automation-id=\"tui-demo-button__reset-state\"\n class=\"tui-group__auto-width-item\"\n >\n Reset\n </button>\n <button\n tuiButton\n type=\"submit\"\n size=\"s\"\n automation-id=\"tui-demo-button__submit-state\"\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 </div>\n <div\n #resizer\n class=\"t-resizer\"\n [tuiResizer]=\"[1, 0]\"\n (tuiSizeChange)=\"updateWidth($event[0])\"\n ></div>\n</div>\n", styles: [":host{position:relative;display:block;min-width:100%;margin:1.5rem 0}.t-bg-toggle{position:absolute;bottom:calc(100% + .75rem);display:flex;align-items:center;justify-content:flex-end;pointer-events:none;width:100%}.t-bg-toggle>*{pointer-events:auto}.t-wrapper{box-shadow:0 1.5rem 1rem #00000008,0 .75rem .75rem #0000000a,0 .25rem .375rem #0000000d;display:flex;border:1px solid var(--tui-base-03);border-radius:var(--tui-radius-m);max-width:100%;min-height:6rem;width:100%;min-width:10rem;background-color:var(--tui-base-01);overflow:hidden}.t-wrapper.t-wrapper_transparent{background-image:linear-gradient(45deg,var(--tui-base-02) 25%,transparent 25%),linear-gradient(-45deg,var(--tui-base-02) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--tui-base-02) 75%),linear-gradient(-45deg,transparent 75%,var(--tui-base-02) 75%);background-size:1.25rem 1.25rem;background-position:0 0,0 .625rem,.625rem -.625rem,-.625rem 0}.t-wrapper.t-wrapper_dark{background-color:#454e58;color:var(--tui-base-01)}.t-wrapper.t-wrapper_gray{background-color:#e5e7ea}.t-wrapper.t-wrapper_dark.t-wrapper_transparent{background-image:linear-gradient(45deg,var(--tui-focus) 25%,transparent 25%),linear-gradient(-45deg,var(--tui-focus) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--tui-focus) 75%),linear-gradient(-45deg,transparent 75%,var(--tui-focus) 75%)}.t-wrapper.t-wrapper_gray.t-wrapper_transparent{background-image:linear-gradient(45deg,var(--tui-base-05) 25%,transparent 25%),linear-gradient(-45deg,var(--tui-base-05) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--tui-base-05) 75%),linear-gradient(-45deg,transparent 75%,var(--tui-base-05) 75%)}:host-context(tui-root._mobile) .t-wrapper{min-height:auto}.t-content{flex:1 1 0;min-width:0;padding:1.5rem;box-sizing:border-box;overflow:hidden}:host-context(tui-root._mobile) .t-content{padding:1rem}.t-form{display:flex;flex-wrap:wrap;align-items:flex-start}.t-input-wrapper{width:100%;margin-bottom:.5rem}.t-expand{width:100%}.t-icon{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-icon_rotated{transform:rotate(180deg)}.t-value{flex:1;background:var(--tui-clear-inverse);padding:.75rem;border-radius:.25rem}.t-mode{width:12.5rem}.t-select{max-width:15rem}.t-resizer{box-shadow:0 1.5rem 1rem #00000008,0 .75rem .75rem #0000000a,0 .25rem .375rem #0000000d;position:relative;width:3.5rem;min-height:inherit;display:flex;align-items:center;justify-content:center;flex-shrink:0;border-left:1px solid var(--tui-base-03);outline:none;background:var(--tui-base-01);color:var(--tui-text-01)}.t-resizer:before,.t-resizer:after{content:\"\";position:absolute;top:.75rem;left:50%;bottom:calc(50% + 1rem);width:1px;background:var(--tui-base-04);box-shadow:-.25rem 0 var(--tui-base-04);transform:translate(0)}.t-resizer:after{bottom:.75rem;top:calc(50% + 1rem)}:host-context(tui-root._mobile) .t-resizer{display:none}.t-resizer-text{font:var(--tui-font-text-s);position:relative;z-index:1;padding:.75rem;background:var(--tui-base-01)}.wrapper_light .t-resizer-text{background:#3e464e}.t-group,.t-checkbox{margin-left:.75rem}.t-button,.t-form-controls{margin-top:.75rem}@supports ((position: -webkit-sticky) or (position: sticky)){@media screen and (min-height: 37.5rem){:host{position:-webkit-sticky;position:sticky;top:4.625rem;z-index:2}}}\n"], components: [{ type: i2__namespace$1.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { type: i1__namespace.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { type: i1__namespace.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels])", inputs: ["items"] }, { type: i2__namespace$1.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId"] }, { type: i1__namespace.TuiRadioBlockComponent, selector: "tui-radio-block", inputs: ["item", "identityMatcher", "contentAlign", "size", "hideRadio", "pseudoDisabled"] }, { type: i1__namespace.TuiCheckboxLabeledComponent, selector: "tui-checkbox-labeled", inputs: ["size"] }, { type: i2__namespace$1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { type: i2__namespace$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i2__namespace$1.TuiExpandComponent, selector: "tui-expand", inputs: ["async", "expanded"] }], directives: [{ type: i2__namespace$1.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { type: i6__namespace.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.TuiSelectDirective, selector: "tui-select" }, { type: i2__namespace$1.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { type: i2__namespace$1.TuiTextfieldCleanerDirective, selector: "[tuiTextfieldCleaner]", inputs: ["tuiTextfieldCleaner"] }, { type: i2__namespace$1.TuiHintOptionsDirective, selector: "[tuiHintContent]", inputs: ["tuiHintContent", "tuiHintDirection", "tuiHintAppearance", "tuiHintShowDelay", "tuiHintHideDelay"] }, { type: i5__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2__namespace$1.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { type: i2__namespace$1.TuiGroupDirective, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "adaptive", "collapsed", "rounded", "size"] }, { type: i6__namespace$1.TuiResizeableDirective, selector: "[tuiResizeable]" }, { type: i5__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i5__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i5__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2__namespace$1.TuiExpandContentDirective, selector: "[tuiExpandContent]" }, { type: i6__namespace$1.TuiResizerDirective, selector: "[tuiResizer]", inputs: ["tuiResizer"], outputs: ["tuiSizeChange"] }], pipes: { "json": i4__namespace.JsonPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
701
- __decorate([
702
- i6.tuiPure
703
- ], TuiDocDemoComponent.prototype, "updateUrl", null);
704
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDemoComponent, decorators: [{
705
- type: i0.Component,
706
- args: [{
707
- selector: 'tui-doc-demo',
708
- templateUrl: './demo.template.html',
709
- styleUrls: ['./demo.style.less'],
710
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
711
- providers: [
712
- i6.TuiDestroyService,
713
- {
714
- provide: i2$1.TuiModeDirective,
715
- useExisting: i0.forwardRef(function () { return TuiDocDemoComponent; }),
716
- },
717
- ],
718
- }]
719
- }], ctorParameters: function () {
720
- return [{ type: undefined, decorators: [{
721
- type: i0.Inject,
722
- args: [i6.TUI_IS_MOBILE]
723
- }] }, { type: i0__namespace.ElementRef, decorators: [{
724
- type: i0.Inject,
725
- args: [i0.ElementRef]
726
- }] }, { type: i4__namespace.Location, decorators: [{
727
- type: i0.Inject,
728
- args: [i4.Location]
729
- }] }, { type: i6__namespace.UrlSerializer, decorators: [{
730
- type: i0.Inject,
731
- args: [i6$1.UrlSerializer]
732
- }] }, { type: undefined, decorators: [{
733
- type: i0.Inject,
734
- args: [TUI_DOC_DEMO_TEXTS]
735
- }] }, { type: undefined, decorators: [{
736
- type: i0.Inject,
737
- args: [TUI_DOC_URL_STATE_HANDLER]
738
- }] }];
739
- }, propDecorators: { resizeable: [{
740
- type: i0.ViewChild,
741
- args: [i6.TuiResizeableDirective, { static: true }]
742
- }], content: [{
743
- type: i0.ViewChild,
744
- args: ['content', { static: true }]
745
- }], resizer: [{
746
- type: i0.ViewChild,
747
- args: ['resizer', { static: true }]
748
- }], control: [{
749
- type: i0.Input
750
- }], template: [{
751
- type: i0.ContentChild,
752
- args: [i0.TemplateRef]
753
- }], onResize: [{
754
- type: i0.HostListener,
755
- args: ['window:resize']
756
- }], onMouseUp: [{
757
- type: i0.HostListener,
758
- args: ['document:mouseup.silent']
759
- }], updateUrl: [] } });
760
-
761
- var TuiDocDemoModule = /** @class */ (function () {
762
- function TuiDocDemoModule() {
763
- }
764
- return TuiDocDemoModule;
765
- }());
766
- TuiDocDemoModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDemoModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
767
- TuiDocDemoModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDemoModule, declarations: [TuiDocDemoComponent], imports: [i4.CommonModule,
768
- i5.ReactiveFormsModule,
769
- i5.FormsModule,
770
- i6$1.RouterModule,
771
- i2$1.TuiLinkModule,
772
- i2$1.TuiButtonModule,
773
- i1.TuiSelectModule,
774
- i2$1.TuiExpandModule,
775
- i2$1.TuiGroupModule,
776
- i2$1.TuiTooltipModule,
777
- i2$1.TuiModeModule,
778
- i1.TuiRadioBlockModule,
779
- i1.TuiCheckboxLabeledModule,
780
- i2$1.TuiSvgModule,
781
- i1.TuiDataListWrapperModule,
782
- i2$1.TuiDataListModule,
783
- i2$1.TuiTextfieldControllerModule,
784
- i2$1.TuiHintModule,
785
- i6.TuiResizerModule], exports: [TuiDocDemoComponent] });
786
- TuiDocDemoModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDemoModule, imports: [[
787
- i4.CommonModule,
788
- i5.ReactiveFormsModule,
789
- i5.FormsModule,
790
- i6$1.RouterModule,
791
- i2$1.TuiLinkModule,
792
- i2$1.TuiButtonModule,
793
- i1.TuiSelectModule,
794
- i2$1.TuiExpandModule,
795
- i2$1.TuiGroupModule,
796
- i2$1.TuiTooltipModule,
797
- i2$1.TuiModeModule,
798
- i1.TuiRadioBlockModule,
799
- i1.TuiCheckboxLabeledModule,
800
- i2$1.TuiSvgModule,
801
- i1.TuiDataListWrapperModule,
802
- i2$1.TuiDataListModule,
803
- i2$1.TuiTextfieldControllerModule,
804
- i2$1.TuiHintModule,
805
- i6.TuiResizerModule,
806
- ]] });
807
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDemoModule, decorators: [{
808
- type: i0.NgModule,
809
- args: [{
810
- imports: [
811
- i4.CommonModule,
812
- i5.ReactiveFormsModule,
813
- i5.FormsModule,
814
- i6$1.RouterModule,
815
- i2$1.TuiLinkModule,
816
- i2$1.TuiButtonModule,
817
- i1.TuiSelectModule,
818
- i2$1.TuiExpandModule,
819
- i2$1.TuiGroupModule,
820
- i2$1.TuiTooltipModule,
821
- i2$1.TuiModeModule,
822
- i1.TuiRadioBlockModule,
823
- i1.TuiCheckboxLabeledModule,
824
- i2$1.TuiSvgModule,
825
- i1.TuiDataListWrapperModule,
826
- i2$1.TuiDataListModule,
827
- i2$1.TuiTextfieldControllerModule,
828
- i2$1.TuiHintModule,
829
- i6.TuiResizerModule,
830
- ],
831
- declarations: [TuiDocDemoComponent],
832
- exports: [TuiDocDemoComponent],
833
- }]
834
- }] });
835
-
836
- /**
837
- * Token to exclude inherited documentation properties
838
- */
839
- var TUI_DOC_EXCLUDED_PROPERTIES = new i0.InjectionToken("[TUI_DOC_EXCLUDED_PROPERTIES]", { factory: function () { return new Set([]); } });
840
- function tuiDocExcludeProperties(properties) {
841
- return { provide: TUI_DOC_EXCLUDED_PROPERTIES, useValue: new Set(properties) };
842
- }
843
-
844
- function tuiCoerceValue(value) {
845
- var prepared = String(value).trim();
846
- if (isEmptyParamValue(prepared)) {
847
- return null;
848
- }
849
- if (isBooleanParamValue(prepared)) {
850
- return String(prepared) === "true";
851
- }
852
- if (isNumberParamValue(prepared)) {
853
- return Number(prepared);
854
- }
855
- var decodedValue = decodeURIComponent(prepared);
856
- try {
857
- return isPossibleArray(decodedValue) || isPossibleObject(decodedValue)
858
- ? JSON.parse(decodedValue)
859
- : decodedValue;
860
- }
861
- catch (_a) {
862
- return decodedValue;
863
- }
864
- }
865
- function isEmptyParamValue(value) {
866
- return ["undefined", "null", "NaN"].includes(value);
867
- }
868
- function isBooleanParamValue(value) {
869
- return value === "true" || value === "false";
870
- }
871
- function isNumberParamValue(value) {
872
- return !!value.trim() && !Number.isNaN(Number(value)) && !value.startsWith("+");
873
- }
874
- function isPossibleArray(value) {
875
- return value.startsWith("[") && value.endsWith("]");
876
- }
877
- function isPossibleObject(value) {
878
- return value.startsWith("{") && value.endsWith("}");
879
- }
880
-
881
- var SERIALIZED_SUFFIX = '$';
882
- // @bad TODO: refactor output and value sync
883
- var TuiDocDocumentationPropertyConnectorDirective = /** @class */ (function () {
884
- function TuiDocDocumentationPropertyConnectorDirective(template, locationRef, activatedRoute, urlSerializer, urlStateHandler) {
885
- this.template = template;
886
- this.locationRef = locationRef;
887
- this.activatedRoute = activatedRoute;
888
- this.urlSerializer = urlSerializer;
889
- this.urlStateHandler = urlStateHandler;
890
- this.documentationPropertyName = '';
891
- this.documentationPropertyMode = null;
892
- this.documentationPropertyType = '';
893
- this.documentationPropertyDeprecated = false;
894
- this.documentationPropertyValues = null;
895
- this.documentationPropertyValueChange = new i0.EventEmitter();
896
- this.changed$ = new i9.Subject();
897
- this.emits$ = new i9.BehaviorSubject(1);
898
- }
899
- TuiDocDocumentationPropertyConnectorDirective.prototype.ngOnInit = function () {
900
- this.parseParams(this.activatedRoute.snapshot.queryParams);
901
- };
902
- Object.defineProperty(TuiDocDocumentationPropertyConnectorDirective.prototype, "attrName", {
903
- get: function () {
904
- switch (this.documentationPropertyMode) {
905
- case 'input':
906
- return "[" + this.documentationPropertyName + "]";
907
- case 'output':
908
- return "(" + this.documentationPropertyName + ")";
909
- case 'input-output':
910
- return "[(" + this.documentationPropertyName + ")]";
911
- default:
912
- return this.documentationPropertyName;
913
- }
914
- },
915
- enumerable: false,
916
- configurable: true
917
- });
918
- Object.defineProperty(TuiDocDocumentationPropertyConnectorDirective.prototype, "hasItems", {
919
- get: function () {
920
- return !!this.documentationPropertyValues;
921
- },
922
- enumerable: false,
923
- configurable: true
924
- });
925
- Object.defineProperty(TuiDocDocumentationPropertyConnectorDirective.prototype, "shouldShowValues", {
926
- get: function () {
927
- return this.documentationPropertyMode !== 'output';
928
- },
929
- enumerable: false,
930
- configurable: true
931
- });
932
- TuiDocDocumentationPropertyConnectorDirective.prototype.ngOnChanges = function () {
933
- this.changed$.next();
934
- };
935
- TuiDocDocumentationPropertyConnectorDirective.prototype.onValueChange = function (value) {
936
- this.documentationPropertyValue = value;
937
- this.documentationPropertyValueChange.emit(value);
938
- this.setQueryParam(value);
939
- };
940
- TuiDocDocumentationPropertyConnectorDirective.prototype.emitEvent = function (event) {
941
- // For more convenient debugging
942
- console.info(this.attrName, event);
943
- this.emits$.next(this.emits$.value + 1);
944
- };
945
- TuiDocDocumentationPropertyConnectorDirective.prototype.parseParams = function (params) {
946
- var propertyValue = params[this.documentationPropertyName];
947
- var propertyValueWithSuffix = params["" + this.documentationPropertyName + SERIALIZED_SUFFIX];
948
- if (!propertyValue && !propertyValueWithSuffix) {
949
- return;
950
- }
951
- var value = !!propertyValueWithSuffix && this.documentationPropertyValues
952
- ? this.documentationPropertyValues[propertyValueWithSuffix]
953
- : tuiCoerceValue(propertyValue);
954
- if (this.documentationPropertyType === 'string' && i6.tuiIsNumber(value)) {
955
- value = value.toString();
956
- }
957
- this.onValueChange(value);
958
- };
959
- TuiDocDocumentationPropertyConnectorDirective.prototype.setQueryParam = function (value) {
960
- var _a;
961
- var tree = this.urlSerializer.parse(this.locationRef.path());
962
- var isValueAvailableByKey = value instanceof Object;
963
- var computedValue = isValueAvailableByKey && this.documentationPropertyValues
964
- ? this.documentationPropertyValues.indexOf(value)
965
- : value;
966
- var suffix = isValueAvailableByKey ? SERIALIZED_SUFFIX : '';
967
- var propName = this.documentationPropertyName + suffix;
968
- tree.queryParams = Object.assign(Object.assign({}, tree.queryParams), (_a = {}, _a[propName] = computedValue, _a));
969
- this.locationRef.go(this.urlStateHandler(tree));
970
- };
971
- return TuiDocDocumentationPropertyConnectorDirective;
972
- }());
973
- TuiDocDocumentationPropertyConnectorDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDocumentationPropertyConnectorDirective, deps: [{ token: i0.TemplateRef }, { token: i4.Location }, { token: i6$1.ActivatedRoute }, { token: i6$1.UrlSerializer }, { token: TUI_DOC_URL_STATE_HANDLER }], target: i0__namespace.ɵɵFactoryTarget.Directive });
974
- TuiDocDocumentationPropertyConnectorDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocDocumentationPropertyConnectorDirective, selector: "ng-template[documentationPropertyName]", inputs: { documentationPropertyName: "documentationPropertyName", documentationPropertyMode: "documentationPropertyMode", documentationPropertyType: "documentationPropertyType", documentationPropertyValue: "documentationPropertyValue", documentationPropertyDeprecated: "documentationPropertyDeprecated", documentationPropertyValues: "documentationPropertyValues" }, outputs: { documentationPropertyValueChange: "documentationPropertyValueChange" }, exportAs: ["documentationProperty"], usesOnChanges: true, ngImport: i0__namespace });
975
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDocumentationPropertyConnectorDirective, decorators: [{
976
- type: i0.Directive,
977
- args: [{
978
- selector: 'ng-template[documentationPropertyName]',
979
- exportAs: 'documentationProperty',
980
- }]
981
- }], ctorParameters: function () {
982
- return [{ type: i0__namespace.TemplateRef, decorators: [{
983
- type: i0.Inject,
984
- args: [i0.TemplateRef]
985
- }] }, { type: i4__namespace.Location, decorators: [{
986
- type: i0.Inject,
987
- args: [i4.Location]
988
- }] }, { type: i6__namespace.ActivatedRoute, decorators: [{
989
- type: i0.Inject,
990
- args: [i6$1.ActivatedRoute]
991
- }] }, { type: i6__namespace.UrlSerializer, decorators: [{
992
- type: i0.Inject,
993
- args: [i6$1.UrlSerializer]
994
- }] }, { type: undefined, decorators: [{
995
- type: i0.Inject,
996
- args: [TUI_DOC_URL_STATE_HANDLER]
997
- }] }];
998
- }, propDecorators: { documentationPropertyName: [{
999
- type: i0.Input
1000
- }], documentationPropertyMode: [{
1001
- type: i0.Input
1002
- }], documentationPropertyType: [{
1003
- type: i0.Input
1004
- }], documentationPropertyValue: [{
1005
- type: i0.Input
1006
- }], documentationPropertyDeprecated: [{
1007
- type: i0.Input
1008
- }], documentationPropertyValues: [{
1009
- type: i0.Input
1010
- }], documentationPropertyValueChange: [{
1011
- type: i0.Output
1012
- }] } });
1013
-
1014
- var TuiGetOpacityPipe = /** @class */ (function () {
1015
- function TuiGetOpacityPipe() {
1016
- }
1017
- TuiGetOpacityPipe.prototype.transform = function (color) {
1018
- if (color.startsWith("#") || color.startsWith("rgb(")) {
1019
- return 100;
1020
- }
1021
- if (color === "transparent") {
1022
- return 0;
1023
- }
1024
- var lastComma = color.lastIndexOf(",");
1025
- var parsed = color
1026
- .slice(lastComma)
1027
- .replace(")", "")
1028
- .replace(" ", "")
1029
- .replace(",", "");
1030
- return Math.round(Number.parseFloat(parsed) * 100);
1031
- };
1032
- return TuiGetOpacityPipe;
1033
- }());
1034
- TuiGetOpacityPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiGetOpacityPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1035
- TuiGetOpacityPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiGetOpacityPipe, name: "tuiGetOpacity" });
1036
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiGetOpacityPipe, decorators: [{
1037
- type: i0.Pipe,
1038
- args: [{ name: "tuiGetOpacity" }]
1039
- }] });
1040
-
1041
- var TuiGetColorPipe = /** @class */ (function () {
1042
- function TuiGetColorPipe() {
1043
- }
1044
- TuiGetColorPipe.prototype.transform = function (color) {
1045
- if (color.length === 4) {
1046
- return color
1047
- .split("")
1048
- .reduce(function (result, current) { return __spreadArray(__spreadArray([], __read(result)), [current, current]); }, [])
1049
- .join("")
1050
- .replace("#", "");
1051
- }
1052
- if (color.startsWith("#")) {
1053
- return color;
1054
- }
1055
- if (color === "transparent") {
1056
- return "#000000";
1057
- }
1058
- var parsed = color
1059
- .replace("rgb(", "")
1060
- .replace("rgba(", "")
1061
- .replace(")", "")
1062
- .replace(" ", "")
1063
- .split(",")
1064
- .map(function (v) { return Number.parseInt(v, 10); });
1065
- return i6.tuiRgbToHex.apply(void 0, __spreadArray([], __read(parsed)));
1066
- };
1067
- return TuiGetColorPipe;
1068
- }());
1069
- TuiGetColorPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiGetColorPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1070
- TuiGetColorPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiGetColorPipe, name: "tuiGetColorPipe" });
1071
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiGetColorPipe, decorators: [{
1072
- type: i0.Pipe,
1073
- args: [{ name: "tuiGetColorPipe" }]
1074
- }] });
1075
-
1076
- var TuiInputOpacityDirective = /** @class */ (function () {
1077
- function TuiInputOpacityDirective(renderer, focusable) {
1078
- this.renderer = renderer;
1079
- this.focusable = focusable;
1080
- }
1081
- Object.defineProperty(TuiInputOpacityDirective.prototype, "tuiInputOpacity", {
1082
- set: function (opacity) {
1083
- var nativeFocusableElement = this.focusable.nativeFocusableElement;
1084
- if (nativeFocusableElement) {
1085
- this.renderer.setStyle(nativeFocusableElement, 'opacity', opacity / 100);
1086
- }
1087
- },
1088
- enumerable: false,
1089
- configurable: true
1090
- });
1091
- return TuiInputOpacityDirective;
1092
- }());
1093
- TuiInputOpacityDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputOpacityDirective, deps: [{ token: i0.Renderer2 }, { token: i6.TUI_FOCUSABLE_ITEM_ACCESSOR }], target: i0__namespace.ɵɵFactoryTarget.Directive });
1094
- TuiInputOpacityDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiInputOpacityDirective, selector: "[tuiInputOpacity]", inputs: { tuiInputOpacity: "tuiInputOpacity" }, ngImport: i0__namespace });
1095
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputOpacityDirective, decorators: [{
1096
- type: i0.Directive,
1097
- args: [{
1098
- selector: '[tuiInputOpacity]',
1099
- }]
1100
- }], ctorParameters: function () {
1101
- return [{ type: i0__namespace.Renderer2, decorators: [{
1102
- type: i0.Inject,
1103
- args: [i0.Renderer2]
1104
- }] }, { type: undefined, decorators: [{
1105
- type: i0.Inject,
1106
- args: [i6.TUI_FOCUSABLE_ITEM_ACCESSOR]
1107
- }] }];
1108
- }, propDecorators: { tuiInputOpacity: [{
1109
- type: i0.Input
1110
- }] } });
1111
-
1112
- var TuiStripOptionalPipe = /** @class */ (function () {
1113
- function TuiStripOptionalPipe() {
1114
- }
1115
- TuiStripOptionalPipe.prototype.transform = function (name) {
1116
- return name.replace("?", "");
1117
- };
1118
- return TuiStripOptionalPipe;
1119
- }());
1120
- TuiStripOptionalPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiStripOptionalPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1121
- TuiStripOptionalPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiStripOptionalPipe, name: "tuiStripOptionalPipe" });
1122
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiStripOptionalPipe, decorators: [{
1123
- type: i0.Pipe,
1124
- args: [{ name: "tuiStripOptionalPipe" }]
1125
- }] });
1126
-
1127
- var TuiIsOptionalPipe = /** @class */ (function () {
1128
- function TuiIsOptionalPipe() {
1129
- }
1130
- TuiIsOptionalPipe.prototype.transform = function (name) {
1131
- return name.includes("?");
1132
- };
1133
- return TuiIsOptionalPipe;
1134
- }());
1135
- TuiIsOptionalPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIsOptionalPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1136
- TuiIsOptionalPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIsOptionalPipe, name: "tuiIsOptionalPipe" });
1137
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIsOptionalPipe, decorators: [{
1138
- type: i0.Pipe,
1139
- args: [{ name: "tuiIsOptionalPipe" }]
1140
- }] });
1141
-
1142
- var TuiShowContentTooltip = /** @class */ (function () {
1143
- function TuiShowContentTooltip() {
1144
- }
1145
- TuiShowContentTooltip.prototype.transform = function (type) {
1146
- return type.includes("PolymorpheusContent");
1147
- };
1148
- return TuiShowContentTooltip;
1149
- }());
1150
- TuiShowContentTooltip.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiShowContentTooltip, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1151
- TuiShowContentTooltip.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiShowContentTooltip, name: "tuiShowContentTooltip" });
1152
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiShowContentTooltip, decorators: [{
1153
- type: i0.Pipe,
1154
- args: [{ name: "tuiShowContentTooltip" }]
1155
- }] });
1156
-
1157
- var TuiShowCleanerPipe = /** @class */ (function () {
1158
- function TuiShowCleanerPipe() {
1159
- }
1160
- TuiShowCleanerPipe.prototype.transform = function (type) {
1161
- return type.includes("null");
1162
- };
1163
- return TuiShowCleanerPipe;
1164
- }());
1165
- TuiShowCleanerPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiShowCleanerPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1166
- TuiShowCleanerPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiShowCleanerPipe, name: "tuiShowCleanerPipe" });
1167
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiShowCleanerPipe, decorators: [{
1168
- type: i0.Pipe,
1169
- args: [{ name: "tuiShowCleanerPipe" }]
1170
- }] });
1171
-
1172
- function inspectArray(array, depth) {
1173
- if (depth === 0) {
1174
- return "[\u2026]";
1175
- }
1176
- var result = "";
1177
- var first = true;
1178
- for (var index = 0; index < array.length; index++) {
1179
- if (first) {
1180
- first = false;
1181
- }
1182
- else {
1183
- result += ", ";
1184
- }
1185
- result += index in array ? tuiInspectAny(array[index], depth - 1) : "empty";
1186
- }
1187
- return "[" + result + "]";
1188
- }
1189
- function inspectObject(object, depth) {
1190
- if (depth === 0) {
1191
- return "{\u2026}";
1192
- }
1193
- var result = "";
1194
- var first = true;
1195
- for (var key in object) {
1196
- if (!object.hasOwnProperty(key)) {
1197
- continue;
1198
- }
1199
- if (first) {
1200
- first = false;
1201
- }
1202
- else {
1203
- result += ", ";
1204
- }
1205
- result += key + ": " + tuiInspectAny(object[key], depth - 1);
1206
- }
1207
- return "{" + result + "}";
1208
- }
1209
- /**
1210
- * Returns readable JS entity
1211
- * @param data
1212
- * @param depth
1213
- * @return readable JS entity
1214
- */
1215
- function tuiInspectAny(data, depth) {
1216
- if (data === null) {
1217
- return "null";
1218
- }
1219
- switch (typeof data) {
1220
- case "string":
1221
- return "'" + data + "'";
1222
- case "undefined":
1223
- case "number":
1224
- case "boolean":
1225
- case "function":
1226
- return String(data);
1227
- default:
1228
- break;
1229
- }
1230
- if (data instanceof RegExp) {
1231
- return String(data);
1232
- }
1233
- if (Array.isArray(data)) {
1234
- return inspectArray(data, depth);
1235
- }
1236
- return inspectObject(data, depth);
1237
- }
1238
-
1239
- var TuiInspectPipe = /** @class */ (function () {
1240
- function TuiInspectPipe(isCypress) {
1241
- this.isCypress = isCypress;
1242
- }
1243
- TuiInspectPipe.prototype.transform = function (value, depth) {
1244
- if (depth === void 0) { depth = 2; }
1245
- if (this.isCypress && typeof value === "function") {
1246
- /**
1247
- * @description:
1248
- * When developing in production mode the webpack bundler minify
1249
- * functions in different ways, then due to which the string content
1250
- * of the function may differ from build to build, which can be to
1251
- * various problems when screenshot testing on e2e.
1252
- */
1253
- return "\u03BB(x) => y";
1254
- }
1255
- return tuiInspectAny(value, depth);
1256
- };
1257
- return TuiInspectPipe;
1258
- }());
1259
- TuiInspectPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInspectPipe, deps: [{ token: i6.TUI_IS_CYPRESS }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1260
- TuiInspectPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInspectPipe, name: "tuiInspectAny" });
1261
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInspectPipe, decorators: [{
1262
- type: i0.Pipe,
1263
- args: [{ name: "tuiInspectAny" }]
1264
- }], ctorParameters: function () {
1265
- return [{ type: undefined, decorators: [{
1266
- type: i0.Inject,
1267
- args: [i6.TUI_IS_CYPRESS]
1268
- }] }];
1269
- } });
1270
-
1271
- var TuiIsPrimitivePolymorpheusContentPipe = /** @class */ (function () {
1272
- function TuiIsPrimitivePolymorpheusContentPipe() {
1273
- }
1274
- TuiIsPrimitivePolymorpheusContentPipe.prototype.transform = function (value) {
1275
- return i6.tuiIsString(value) || i6.tuiIsNumber(value);
1276
- };
1277
- return TuiIsPrimitivePolymorpheusContentPipe;
1278
- }());
1279
- TuiIsPrimitivePolymorpheusContentPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIsPrimitivePolymorpheusContentPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1280
- TuiIsPrimitivePolymorpheusContentPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIsPrimitivePolymorpheusContentPipe, name: "tuiIsPrimitivePolymorpheusContentPipe" });
1281
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIsPrimitivePolymorpheusContentPipe, decorators: [{
1282
- type: i0.Pipe,
1283
- args: [{ name: "tuiIsPrimitivePolymorpheusContentPipe" }]
1284
- }] });
1285
-
1286
- // @bad TODO subscribe propertiesConnectors changes
1287
- // @bad TODO refactor to make more flexible
1288
- var TuiDocDocumentationComponent = /** @class */ (function () {
1289
- function TuiDocDocumentationComponent(cdr, texts, excludedProperties, destroy$, getColor, getOpacity) {
1290
- this.cdr = cdr;
1291
- this.texts = texts;
1292
- this.excludedProperties = excludedProperties;
1293
- this.destroy$ = destroy$;
1294
- this.getColor = getColor;
1295
- this.getOpacity = getOpacity;
1296
- this.heading = '';
1297
- this.showValues = true;
1298
- this.isAPI = false;
1299
- this.propertiesConnectors = i6.EMPTY_QUERY;
1300
- this.activeItemIndex = 0;
1301
- this.matcher = function (item, exclusions) { return !exclusions.has(item.documentationPropertyName); };
1302
- }
1303
- TuiDocDocumentationComponent.prototype.ngAfterContentInit = function () {
1304
- i6.tuiQueryListChanges(this.propertiesConnectors)
1305
- .pipe(operators.switchMap(function (items) { return i9.merge.apply(void 0, __spreadArray([], __read(items.map(function (_a) {
1306
- var changed$ = _a.changed$;
1307
- return changed$;
1308
- })))); }), i6.tuiWatch(this.cdr), operators.takeUntil(this.destroy$))
1309
- .subscribe();
1310
- };
1311
- Object.defineProperty(TuiDocDocumentationComponent.prototype, "type", {
1312
- get: function () {
1313
- return this.isAPI ? this.texts[0] : this.texts[1];
1314
- },
1315
- enumerable: false,
1316
- configurable: true
1317
- });
1318
- TuiDocDocumentationComponent.prototype.onColorChange = function (connector, color) {
1319
- var opacity = this.getOpacity.transform(connector.documentationPropertyValue || '');
1320
- if (opacity === 100) {
1321
- connector.onValueChange(color);
1322
- return;
1323
- }
1324
- var rgb = i6.tuiHexToRgb(color).join(', ');
1325
- var result = "rgba(" + rgb + ", " + opacity / 100 + ")";
1326
- connector.onValueChange(result);
1327
- };
1328
- TuiDocDocumentationComponent.prototype.onOpacityChange = function (connector, opacity) {
1329
- var hex = this.getColor.transform(connector.documentationPropertyValue || '');
1330
- var rgb = i6.tuiHexToRgb(hex);
1331
- var result = "rgba(" + rgb + ", " + opacity / 100 + ")";
1332
- connector.onValueChange(result);
1333
- };
1334
- return TuiDocDocumentationComponent;
1335
- }());
1336
- TuiDocDocumentationComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDocumentationComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: TUI_DOC_DOCUMENTATION_TEXTS }, { token: TUI_DOC_EXCLUDED_PROPERTIES }, { token: i6.TuiDestroyService, self: true }, { token: TuiGetColorPipe }, { token: TuiGetOpacityPipe }], target: i0__namespace.ɵɵFactoryTarget.Component });
1337
- TuiDocDocumentationComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocDocumentationComponent, selector: "tui-doc-documentation", inputs: { heading: "heading", showValues: "showValues", isAPI: "isAPI" }, providers: [TuiGetColorPipe, TuiGetOpacityPipe, i6.TuiDestroyService], queries: [{ propertyName: "propertiesConnectors", predicate: TuiDocDocumentationPropertyConnectorDirective }], ngImport: i0__namespace, template: "<h1\n *ngIf=\"heading\"\n class=\"t-heading\"\n>\n {{ heading }}\n</h1>\n<ng-content></ng-content>\n<ng-container *ngIf=\"$any(propertiesConnectors) | tuiFilter : matcher : excludedProperties as properties\">\n <table\n *ngIf=\"properties.length\"\n class=\"t-table\"\n >\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-th_value\"\n >\n {{ texts[3] }}\n </th>\n </tr>\n <tr\n *ngFor=\"let propertyConnector of properties\"\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 {{ propertyConnector.attrName | tuiStripOptionalPipe }}\n <tui-badge\n *ngIf=\"propertyConnector.attrName | tuiIsOptionalPipe\"\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=\"propertyConnector.documentationPropertyType | tuiShowContentTooltip\"\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 rel=\"noreferrer\"\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 t-cell_value\"\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]=\"propertyConnector.documentationPropertyType | tuiShowCleanerPipe\"\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>{{ data | tuiInspectAny }}</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 tuiTextfieldSize=\"m\"\n [attr.id]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [tuiInputOpacity]=\"propertyConnector.documentationPropertyValue | tuiGetOpacity\"\n [value]=\"propertyConnector.documentationPropertyValue | tuiGetColorPipe\"\n (valueChange)=\"onColorChange(propertyConnector, $event)\"\n >\n <input\n tuiTextfield\n type=\"text\"\n />\n </tui-primitive-textfield>\n <tui-input-count\n tuiTextfieldSize=\"m\"\n [max]=\"100\"\n [ngModel]=\"propertyConnector.documentationPropertyValue | tuiGetOpacity\"\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=\"\n propertyConnector.documentationPropertyValue\n | tuiIsPrimitivePolymorpheusContentPipe\n \"\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</ng-container>\n", 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}.t-cell_prop{width:40%}.t-cell_value{text-align:right}: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:normal;text-align:left}.t-th_value{max-width:20rem;text-align:right}:host-context(tui-root._mobile) .t-th_value{width:9.375rem}.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:max-content}.t-output{text-align:left;opacity:0}.t-heading{font:var(--tui-font-heading-4)}\n"], components: [{ type: i1__namespace.TuiBadgeComponent, selector: "tui-badge", inputs: ["value", "size", "status", "hoverable"] }, { type: i2__namespace$1.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId"] }, { type: i2__namespace$1.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { type: i1__namespace.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { type: i1__namespace.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels])", inputs: ["items"] }, { type: i1__namespace.TuiToggleComponent, selector: "tui-toggle", inputs: ["singleColor", "showIcons", "showLoader", "size"] }, { type: i2__namespace$1.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "filler", "iconCleaner", "readOnly", "invalid", "disabled", "prefix", "postfix", "value"], outputs: ["valueChange"] }, { type: i2__namespace$1.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { type: i1__namespace.TuiInputCountComponent, selector: "tui-input-count", inputs: ["step", "min", "max", "hideButtons", "prefix", "postfix"] }, { type: i2__namespace$1.TuiNotificationComponent, selector: "tui-notification", inputs: ["hasIcon", "status", "hideClose"], outputs: ["close"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2__namespace$1.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { type: i1__namespace.TuiSelectDirective, selector: "tui-select" }, { type: i2__namespace$1.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { type: i2__namespace$1.TuiDropdownOptionsDirective, selector: "[tuiDropdownAlign], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownOffset]", inputs: ["tuiDropdownAlign", "tuiDropdownDirection", "tuiDropdownLimitWidth", "tuiDropdownMinHeight", "tuiDropdownMaxHeight", "tuiDropdownOffset"] }, { type: i2__namespace$1.TuiTextfieldCleanerDirective, selector: "[tuiTextfieldCleaner]", inputs: ["tuiTextfieldCleaner"] }, { type: i2__namespace$1.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { type: i5__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2__namespace$1.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { type: i4__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2__namespace$1.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i2__namespace$1.TuiGroupDirective, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "adaptive", "collapsed", "rounded", "size"] }, { type: TuiInputOpacityDirective, selector: "[tuiInputOpacity]", inputs: ["tuiInputOpacity"] }, { type: i1__namespace.TuiInputCountDirective, selector: "tui-input-count" }], pipes: { "tuiFilter": i6__namespace$1.TuiFilterPipe, "tuiStripOptionalPipe": TuiStripOptionalPipe, "tuiIsOptionalPipe": TuiIsOptionalPipe, "tuiShowContentTooltip": TuiShowContentTooltip, "tuiShowCleanerPipe": TuiShowCleanerPipe, "tuiInspectAny": TuiInspectPipe, "tuiGetOpacity": TuiGetOpacityPipe, "tuiGetColorPipe": TuiGetColorPipe, "tuiIsPrimitivePolymorpheusContentPipe": TuiIsPrimitivePolymorpheusContentPipe, "async": i4__namespace.AsyncPipe }, animations: [
1338
- animations.trigger('emitEvent', [
1339
- animations.transition(':increment', [animations.style({ opacity: 1 }), animations.animate('500ms ease-in')]),
1340
- ]),
1341
- ], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1342
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDocumentationComponent, decorators: [{
1343
- type: i0.Component,
1344
- args: [{
1345
- selector: 'tui-doc-documentation',
1346
- templateUrl: './documentation.template.html',
1347
- styleUrls: ['./documentation.style.less'],
1348
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1349
- animations: [
1350
- animations.trigger('emitEvent', [
1351
- animations.transition(':increment', [animations.style({ opacity: 1 }), animations.animate('500ms ease-in')]),
1352
- ]),
1353
- ],
1354
- providers: [TuiGetColorPipe, TuiGetOpacityPipe, i6.TuiDestroyService],
1355
- }]
1356
- }], ctorParameters: function () {
1357
- return [{ type: i0__namespace.ChangeDetectorRef, decorators: [{
1358
- type: i0.Inject,
1359
- args: [i0.ChangeDetectorRef]
1360
- }] }, { type: undefined, decorators: [{
1361
- type: i0.Inject,
1362
- args: [TUI_DOC_DOCUMENTATION_TEXTS]
1363
- }] }, { type: Set, decorators: [{
1364
- type: i0.Inject,
1365
- args: [TUI_DOC_EXCLUDED_PROPERTIES]
1366
- }] }, { type: i6__namespace$1.TuiDestroyService, decorators: [{
1367
- type: i0.Self
1368
- }, {
1369
- type: i0.Inject,
1370
- args: [i6.TuiDestroyService]
1371
- }] }, { type: TuiGetColorPipe, decorators: [{
1372
- type: i0.Inject,
1373
- args: [TuiGetColorPipe]
1374
- }] }, { type: TuiGetOpacityPipe, decorators: [{
1375
- type: i0.Inject,
1376
- args: [TuiGetOpacityPipe]
1377
- }] }];
1378
- }, propDecorators: { heading: [{
1379
- type: i0.Input
1380
- }], showValues: [{
1381
- type: i0.Input
1382
- }], isAPI: [{
1383
- type: i0.Input
1384
- }], propertiesConnectors: [{
1385
- type: i0.ContentChildren,
1386
- args: [TuiDocDocumentationPropertyConnectorDirective]
1387
- }] } });
1388
-
1389
- var TuiInputOpacityModule = /** @class */ (function () {
1390
- function TuiInputOpacityModule() {
1391
- }
1392
- return TuiInputOpacityModule;
1393
- }());
1394
- TuiInputOpacityModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputOpacityModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1395
- TuiInputOpacityModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputOpacityModule, declarations: [TuiInputOpacityDirective], exports: [TuiInputOpacityDirective] });
1396
- TuiInputOpacityModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputOpacityModule });
1397
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputOpacityModule, decorators: [{
1398
- type: i0.NgModule,
1399
- args: [{
1400
- declarations: [TuiInputOpacityDirective],
1401
- exports: [TuiInputOpacityDirective],
1402
- }]
1403
- }] });
1404
-
1405
- var TuiDocDocumentationModule = /** @class */ (function () {
1406
- function TuiDocDocumentationModule() {
1407
- }
1408
- return TuiDocDocumentationModule;
1409
- }());
1410
- TuiDocDocumentationModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDocumentationModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1411
- TuiDocDocumentationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDocumentationModule, declarations: [TuiInspectPipe,
1412
- TuiGetColorPipe,
1413
- TuiGetOpacityPipe,
1414
- TuiIsOptionalPipe,
1415
- TuiShowCleanerPipe,
1416
- TuiStripOptionalPipe,
1417
- TuiShowContentTooltip,
1418
- TuiDocDocumentationComponent,
1419
- TuiIsPrimitivePolymorpheusContentPipe,
1420
- TuiDocDocumentationPropertyConnectorDirective], imports: [i4.CommonModule,
1421
- i5.FormsModule,
1422
- i6$1.RouterModule,
1423
- i1.TuiBadgeModule,
1424
- i1.TuiSelectModule,
1425
- i1.TuiToggleModule,
1426
- i2$1.TuiTooltipModule,
1427
- i2$1.TuiLinkModule,
1428
- i1.TuiInputCountModule,
1429
- i2$1.TuiModeModule,
1430
- i2$1.TuiGroupModule,
1431
- TuiInputOpacityModule,
1432
- i2$1.TuiPrimitiveTextfieldModule,
1433
- i2$1.TuiTextfieldControllerModule,
1434
- i2$1.TuiDropdownModule,
1435
- i2$1.TuiDataListModule,
1436
- i1.TuiDataListWrapperModule,
1437
- i2$1.TuiNotificationModule,
1438
- i6.TuiFilterPipeModule], exports: [TuiDocDocumentationComponent,
1439
- TuiDocDocumentationPropertyConnectorDirective] });
1440
- TuiDocDocumentationModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDocumentationModule, imports: [[
1441
- i4.CommonModule,
1442
- i5.FormsModule,
1443
- i6$1.RouterModule,
1444
- i1.TuiBadgeModule,
1445
- i1.TuiSelectModule,
1446
- i1.TuiToggleModule,
1447
- i2$1.TuiTooltipModule,
1448
- i2$1.TuiLinkModule,
1449
- i1.TuiInputCountModule,
1450
- i2$1.TuiModeModule,
1451
- i2$1.TuiGroupModule,
1452
- TuiInputOpacityModule,
1453
- i2$1.TuiPrimitiveTextfieldModule,
1454
- i2$1.TuiTextfieldControllerModule,
1455
- i2$1.TuiDropdownModule,
1456
- i2$1.TuiDataListModule,
1457
- i1.TuiDataListWrapperModule,
1458
- i2$1.TuiNotificationModule,
1459
- i6.TuiFilterPipeModule,
1460
- ]] });
1461
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDocumentationModule, decorators: [{
1462
- type: i0.NgModule,
1463
- args: [{
1464
- imports: [
1465
- i4.CommonModule,
1466
- i5.FormsModule,
1467
- i6$1.RouterModule,
1468
- i1.TuiBadgeModule,
1469
- i1.TuiSelectModule,
1470
- i1.TuiToggleModule,
1471
- i2$1.TuiTooltipModule,
1472
- i2$1.TuiLinkModule,
1473
- i1.TuiInputCountModule,
1474
- i2$1.TuiModeModule,
1475
- i2$1.TuiGroupModule,
1476
- TuiInputOpacityModule,
1477
- i2$1.TuiPrimitiveTextfieldModule,
1478
- i2$1.TuiTextfieldControllerModule,
1479
- i2$1.TuiDropdownModule,
1480
- i2$1.TuiDataListModule,
1481
- i1.TuiDataListWrapperModule,
1482
- i2$1.TuiNotificationModule,
1483
- i6.TuiFilterPipeModule,
1484
- ],
1485
- declarations: [
1486
- TuiInspectPipe,
1487
- TuiGetColorPipe,
1488
- TuiGetOpacityPipe,
1489
- TuiIsOptionalPipe,
1490
- TuiShowCleanerPipe,
1491
- TuiStripOptionalPipe,
1492
- TuiShowContentTooltip,
1493
- TuiDocDocumentationComponent,
1494
- TuiIsPrimitivePolymorpheusContentPipe,
1495
- TuiDocDocumentationPropertyConnectorDirective,
1496
- ],
1497
- exports: [
1498
- TuiDocDocumentationComponent,
1499
- TuiDocDocumentationPropertyConnectorDirective,
1500
- ],
1501
- }]
1502
- }] });
1503
-
1504
- /**
1505
- * Code actions for the opened tab with code example
1506
- */
1507
- var TUI_DOC_CODE_ACTIONS = new i0.InjectionToken("[TUI_DOC_CODE_ACTIONS]", {
1508
- factory: function () { return ""; },
1509
- });
1510
-
1511
- /**
1512
- * Service for opening online IDE e.g. Stackblitz
1513
- */
1514
- var TUI_DOC_CODE_EDITOR = new i0.InjectionToken("[TUI_DOC_CODE_EDITOR]");
1515
-
1516
- function tuiRawLoadRecord(example) {
1517
- return __awaiter(this, void 0, void 0, function () {
1518
- var processedContent, _a, _b, _c, key, content, _d, _e, e_1_1;
1519
- var e_1, _f;
1520
- return __generator(this, function (_g) {
1521
- switch (_g.label) {
1522
- case 0:
1523
- processedContent = {};
1524
- _g.label = 1;
1525
- case 1:
1526
- _g.trys.push([1, 6, 7, 8]);
1527
- _a = __values(Object.entries(example)), _b = _a.next();
1528
- _g.label = 2;
1529
- case 2:
1530
- if (!!_b.done) return [3 /*break*/, 5];
1531
- _c = __read(_b.value, 2), key = _c[0], content = _c[1];
1532
- if (!content) return [3 /*break*/, 4];
1533
- _d = processedContent;
1534
- _e = key;
1535
- return [4 /*yield*/, tuiRawLoad(content)];
1536
- case 3:
1537
- _d[_e] = _g.sent();
1538
- _g.label = 4;
1539
- case 4:
1540
- _b = _a.next();
1541
- return [3 /*break*/, 2];
1542
- case 5: return [3 /*break*/, 8];
1543
- case 6:
1544
- e_1_1 = _g.sent();
1545
- e_1 = { error: e_1_1 };
1546
- return [3 /*break*/, 8];
1547
- case 7:
1548
- try {
1549
- if (_b && !_b.done && (_f = _a.return)) _f.call(_a);
1550
- }
1551
- finally { if (e_1) throw e_1.error; }
1552
- return [7 /*endfinally*/];
1553
- case 8: return [2 /*return*/, processedContent];
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/addon-doc/components'), require('@taiga-ui/addon-doc/directives'), require('@taiga-ui/addon-doc/interfaces'), require('@taiga-ui/addon-doc/languages'), require('@taiga-ui/addon-doc/services'), require('@taiga-ui/addon-doc/tokens'), require('@taiga-ui/addon-doc/types'), require('@taiga-ui/addon-doc/utils')) :
3
+ typeof define === 'function' && define.amd ? define('@taiga-ui/addon-doc', ['exports', '@angular/core', '@taiga-ui/addon-doc/components', '@taiga-ui/addon-doc/directives', '@taiga-ui/addon-doc/interfaces', '@taiga-ui/addon-doc/languages', '@taiga-ui/addon-doc/services', '@taiga-ui/addon-doc/tokens', '@taiga-ui/addon-doc/types', '@taiga-ui/addon-doc/utils'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"]["addon-doc"] = {}), global.ng.core, global["taiga-ui"]["addon-doc"].components, global["taiga-ui"]["addon-doc"].directives, global["taiga-ui"]["addon-doc"].interfaces, global["taiga-ui"]["addon-doc"].languages, global["taiga-ui"]["addon-doc"].services, global["taiga-ui"]["addon-doc"].tokens, global["taiga-ui"]["addon-doc"].types, global["taiga-ui"]["addon-doc"].utils));
5
+ })(this, (function (exports, i0, components, directives, interfaces, languages, services, tokens, types, utils) { 'use strict';
6
+
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
18
+ }
19
+ });
1554
20
  }
1555
- });
1556
- });
1557
- }
1558
-
1559
- var TUI_EXAMPLE_PRIMARY_FILE_NAME = {
1560
- TS: "TypeScript",
1561
- LESS: "LESS",
1562
- HTML: "HTML",
1563
- };
1564
-
1565
- var TUI_DOC_EXAMPLE_DEFAULT_OPTIONS = {
1566
- codeEditorVisibilityHandler: function (files) { return Boolean(files[TUI_EXAMPLE_PRIMARY_FILE_NAME.TS] &&
1567
- files[TUI_EXAMPLE_PRIMARY_FILE_NAME.HTML]); },
1568
- };
1569
- /**
1570
- * Default parameters for DocExample component
1571
- */
1572
- var TUI_DOC_EXAMPLE_OPTIONS = new i0.InjectionToken("[TUI_DOC_EXAMPLE_OPTIONS]", {
1573
- factory: function () { return TUI_DOC_EXAMPLE_DEFAULT_OPTIONS; },
1574
- });
1575
- function tuiDocExampleOptionsProvider(options) {
1576
- return {
1577
- provide: TUI_DOC_EXAMPLE_OPTIONS,
1578
- useValue: Object.assign(Object.assign({}, TUI_DOC_EXAMPLE_DEFAULT_OPTIONS), options),
1579
- };
1580
- }
1581
-
1582
- var TuiDocExampleCapitalizePipe = /** @class */ (function () {
1583
- function TuiDocExampleCapitalizePipe() {
1584
- }
1585
- TuiDocExampleCapitalizePipe.prototype.transform = function (content) {
1586
- return i6.tuiIsString(content) ? i2$1.tuiCapitalizeFirstLetter(content) : content;
1587
- };
1588
- return TuiDocExampleCapitalizePipe;
1589
- }());
1590
- TuiDocExampleCapitalizePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocExampleCapitalizePipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1591
- TuiDocExampleCapitalizePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocExampleCapitalizePipe, name: "tuiDocExampleCapitalize" });
1592
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocExampleCapitalizePipe, decorators: [{
1593
- type: i0.Pipe,
1594
- args: [{ name: "tuiDocExampleCapitalize" }]
1595
- }] });
1596
-
1597
- var TuiDocExampleGetTabsPipe = /** @class */ (function () {
1598
- function TuiDocExampleGetTabsPipe() {
1599
- }
1600
- TuiDocExampleGetTabsPipe.prototype.transform = function (content, defaultTab) {
1601
- return __spreadArray([defaultTab], __read(Object.keys(content)));
1602
- };
1603
- return TuiDocExampleGetTabsPipe;
1604
- }());
1605
- TuiDocExampleGetTabsPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocExampleGetTabsPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1606
- TuiDocExampleGetTabsPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocExampleGetTabsPipe, name: "tuiDocExampleGetTabs" });
1607
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocExampleGetTabsPipe, decorators: [{
1608
- type: i0.Pipe,
1609
- args: [{ name: "tuiDocExampleGetTabs" }]
1610
- }] });
21
+ n["default"] = e;
22
+ return Object.freeze(n);
23
+ }
24
+
25
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
+
27
+ var TuiAddonDocModule = /** @class */ (function () {
28
+ function TuiAddonDocModule() {
29
+ }
30
+ return TuiAddonDocModule;
31
+ }());
32
+ TuiAddonDocModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAddonDocModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
33
+ TuiAddonDocModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAddonDocModule, exports: [components.TuiDocCodeModule,
34
+ components.TuiDocDemoModule,
35
+ components.TuiDocDocumentationModule,
36
+ components.TuiDocPageModule,
37
+ components.TuiDocExampleModule] });
38
+ TuiAddonDocModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAddonDocModule, imports: [components.TuiDocCodeModule,
39
+ components.TuiDocDemoModule,
40
+ components.TuiDocDocumentationModule,
41
+ components.TuiDocPageModule,
42
+ components.TuiDocExampleModule] });
43
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAddonDocModule, decorators: [{
44
+ type: i0.NgModule,
45
+ args: [{
46
+ exports: [
47
+ components.TuiDocCodeModule,
48
+ components.TuiDocDemoModule,
49
+ components.TuiDocDocumentationModule,
50
+ components.TuiDocPageModule,
51
+ components.TuiDocExampleModule,
52
+ ],
53
+ }]
54
+ }] });
1611
55
 
1612
- var TuiDocExampleComponent = /** @class */ (function () {
1613
- function TuiDocExampleComponent(clipboard, alerts, location, copyTexts$, texts, codeEditor, processContent, isCypress, codeActions, router, route, ngLocation, options) {
1614
- var _this = this;
1615
- this.clipboard = clipboard;
1616
- this.alerts = alerts;
1617
- this.location = location;
1618
- this.copyTexts$ = copyTexts$;
1619
- this.texts = texts;
1620
- this.codeEditor = codeEditor;
1621
- this.processContent = processContent;
1622
- this.isCypress = isCypress;
1623
- this.codeActions = codeActions;
1624
- this.router = router;
1625
- this.route = route;
1626
- this.ngLocation = ngLocation;
1627
- this.options = options;
1628
- this.rawLoader$$ = new i9.BehaviorSubject({});
1629
- this.id = null;
1630
- this.heading = '';
1631
- this.description = '';
1632
- this.componentName = this.location.pathname.slice(1);
1633
- this.defaultTabIndex = 0;
1634
- this.defaultTab = this.texts[this.defaultTabIndex];
1635
- this.activeItemIndex = this.defaultTabIndex;
1636
- this.copy$ = this.copyTexts$.pipe(operators.map(function (_b) {
1637
- var _c = __read(_b, 1), copy = _c[0];
1638
- return copy;
1639
- }));
1640
- this.processor$ = this.rawLoader$$.pipe(operators.switchMap(tuiRawLoadRecord), operators.map(function (value) { return _this.processContent(value); }));
1641
- this.loading$ = new i9.Subject();
1642
- this.visible = function (files) { return Boolean(_this.codeEditor && _this.options.codeEditorVisibilityHandler(files)); };
1643
- }
1644
- Object.defineProperty(TuiDocExampleComponent.prototype, "content", {
1645
- set: function (content) {
1646
- this.rawLoader$$.next(content);
1647
- },
1648
- enumerable: false,
1649
- configurable: true
1650
- });
1651
- TuiDocExampleComponent.prototype.copyExampleLink = function () {
1652
- var hashPosition = this.location.href.indexOf('#');
1653
- var currentUrl = hashPosition > -1
1654
- ? this.location.href.slice(0, Math.max(0, hashPosition))
1655
- : this.location.href;
1656
- var url = currentUrl + "#" + this.id;
1657
- this.setFragmentWithoutRedirect(this.id);
1658
- this.clipboard.copy(url);
1659
- this.alerts
1660
- .open(this.texts[1], {
1661
- label: this.texts[2],
1662
- status: "success" /* Success */,
1663
- })
1664
- .subscribe();
1665
- };
1666
- TuiDocExampleComponent.prototype.edit = function (files) {
1667
- var _this = this;
1668
- var _a;
1669
- this.loading$.next(true);
1670
- (_a = this.codeEditor) === null || _a === void 0 ? void 0 : _a.edit(this.componentName, this.id || '', files).then(function () { return _this.loading$.next(false); }).catch(function () { return _this.loading$.next(false); });
1671
- };
1672
- TuiDocExampleComponent.prototype.setFragmentWithoutRedirect = function (id) {
1673
- var url = this.router
1674
- .createUrlTree([], { relativeTo: this.route, fragment: id || '' })
1675
- .toString();
1676
- this.ngLocation.go(url);
1677
- };
1678
- return TuiDocExampleComponent;
1679
- }());
1680
- TuiDocExampleComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocExampleComponent, deps: [{ token: i8.Clipboard }, { token: i2$1.TuiAlertService }, { token: common.LOCATION }, { token: i1.TUI_COPY_TEXTS }, { token: TUI_DOC_EXAMPLE_TEXTS }, { token: TUI_DOC_CODE_EDITOR, optional: true }, { token: TUI_DOC_EXAMPLE_CONTENT_PROCESSOR }, { token: i6.TUI_IS_CYPRESS }, { token: TUI_DOC_CODE_ACTIONS }, { token: i6$1.Router }, { token: i6$1.ActivatedRoute }, { token: i4.Location }, { token: TUI_DOC_EXAMPLE_OPTIONS }], target: i0__namespace.ɵɵFactoryTarget.Component });
1681
- TuiDocExampleComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocExampleComponent, selector: "tui-doc-example", inputs: { id: "id", heading: "heading", description: "description", content: "content", componentName: "componentName" }, ngImport: i0__namespace, template: "<h3\n *ngIf=\"heading\"\n class=\"t-title\"\n>\n <span\n *polymorpheusOutlet=\"heading | tuiDocExampleCapitalize as text\"\n [textContent]=\"text\"\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 class=\"t-description\"\n>\n <ng-container *polymorpheusOutlet=\"description | tuiDocExampleCapitalize as text\">\n {{ text }}\n </ng-container>\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 *tuiItem\n tuiTab\n >\n {{ tab }}\n </button>\n </ng-container>\n </tui-tabs-with-more>\n\n <tui-loader\n *ngIf=\"files | tuiMapper : visible\"\n size=\"xs\"\n [overlay]=\"true\"\n [showLoader]=\"!!(loading$ | async)\"\n (click)=\"edit(files)\"\n >\n <ng-container *ngIf=\"codeEditor?.content as content; else defaultEditContent\">\n <ng-container *polymorpheusOutlet=\"content as editContent\">\n {{ editContent }}\n </ng-container>\n </ng-container>\n\n <ng-template #defaultEditContent>\n <button\n tuiButton\n appearance=\"flat\"\n size=\"s\"\n type=\"button\"\n >\n Edit on {{ codeEditor!.name }}\n </button>\n </ng-template>\n </tui-loader>\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 <ng-container *polymorpheusOutlet=\"action as text; context: {$implicit: code}\">\n {{ text }}\n </ng-container>\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", 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:normal;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 #0000001a}: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: .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}\n"], components: [{ type: i2__namespace$1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { type: i1__namespace.TuiTabsWithMoreComponent, selector: "tui-tabs-with-more, nav[tuiTabsWithMore]", inputs: ["moreContent", "dropdownContent", "underline", "activeItemIndex", "itemsLimit"], outputs: ["activeItemIndexChange"] }, { type: i1__namespace.TuiTabComponent, selector: "a[tuiTab]:not([routerLink]), a[tuiTab][routerLink][routerLinkActive], button[tuiTab]" }, { type: i2__namespace$1.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { type: TuiDocCopyComponent, selector: "tui-doc-copy" }, { type: TuiDocCodeComponent, selector: "tui-doc-code", inputs: ["filename", "code"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace$2.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace$1.TuiItemDirective, selector: "[tuiItem]" }, { type: i4__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i8__namespace.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }], pipes: { "tuiDocExampleCapitalize": TuiDocExampleCapitalizePipe, "async": i4__namespace.AsyncPipe, "tuiDocExampleGetTabs": TuiDocExampleGetTabsPipe, "tuiMapper": i6__namespace$1.TuiMapperPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1682
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocExampleComponent, decorators: [{
1683
- type: i0.Component,
1684
- args: [{
1685
- selector: 'tui-doc-example',
1686
- templateUrl: './example.template.html',
1687
- styleUrls: ['./example.style.less'],
1688
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1689
- }]
1690
- }], ctorParameters: function () {
1691
- return [{ type: i8__namespace.Clipboard, decorators: [{
1692
- type: i0.Inject,
1693
- args: [i8.Clipboard]
1694
- }] }, { type: i2__namespace$1.TuiAlertService, decorators: [{
1695
- type: i0.Inject,
1696
- args: [i2$1.TuiAlertService]
1697
- }] }, { type: Location, decorators: [{
1698
- type: i0.Inject,
1699
- args: [common.LOCATION]
1700
- }] }, { type: i9__namespace.Observable, decorators: [{
1701
- type: i0.Inject,
1702
- args: [i1.TUI_COPY_TEXTS]
1703
- }] }, { type: undefined, decorators: [{
1704
- type: i0.Inject,
1705
- args: [TUI_DOC_EXAMPLE_TEXTS]
1706
- }] }, { type: undefined, decorators: [{
1707
- type: i0.Optional
1708
- }, {
1709
- type: i0.Inject,
1710
- args: [TUI_DOC_CODE_EDITOR]
1711
- }] }, { type: undefined, decorators: [{
1712
- type: i0.Inject,
1713
- args: [TUI_DOC_EXAMPLE_CONTENT_PROCESSOR]
1714
- }] }, { type: undefined, decorators: [{
1715
- type: i0.Inject,
1716
- args: [i6.TUI_IS_CYPRESS]
1717
- }] }, { type: Array, decorators: [{
1718
- type: i0.Inject,
1719
- args: [TUI_DOC_CODE_ACTIONS]
1720
- }] }, { type: i6__namespace.Router, decorators: [{
1721
- type: i0.Inject,
1722
- args: [i6$1.Router]
1723
- }] }, { type: i6__namespace.ActivatedRoute, decorators: [{
1724
- type: i0.Inject,
1725
- args: [i6$1.ActivatedRoute]
1726
- }] }, { type: i4__namespace.Location, decorators: [{
1727
- type: i0.Inject,
1728
- args: [i4.Location]
1729
- }] }, { type: undefined, decorators: [{
1730
- type: i0.Inject,
1731
- args: [TUI_DOC_EXAMPLE_OPTIONS]
1732
- }] }];
1733
- }, propDecorators: { id: [{
1734
- type: i0.Input
1735
- }], heading: [{
1736
- type: i0.Input
1737
- }], description: [{
1738
- type: i0.Input
1739
- }], content: [{
1740
- type: i0.Input
1741
- }], componentName: [{
1742
- type: i0.Input
1743
- }] } });
1744
-
1745
- var TuiDocExampleModule = /** @class */ (function () {
1746
- function TuiDocExampleModule() {
1747
- }
1748
- return TuiDocExampleModule;
1749
- }());
1750
- TuiDocExampleModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocExampleModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1751
- TuiDocExampleModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocExampleModule, declarations: [TuiDocExampleComponent,
1752
- TuiDocExampleGetTabsPipe,
1753
- TuiDocExampleCapitalizePipe], imports: [i4.CommonModule,
1754
- i8.ClipboardModule,
1755
- i1.TuiTabsModule,
1756
- i2$1.TuiButtonModule,
1757
- TuiDocCopyModule,
1758
- TuiDocCodeModule,
1759
- i6$2.PolymorpheusModule,
1760
- i6.TuiMapperPipeModule,
1761
- i2$1.TuiLoaderModule], exports: [TuiDocExampleComponent,
1762
- TuiDocExampleGetTabsPipe,
1763
- TuiDocExampleCapitalizePipe] });
1764
- TuiDocExampleModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocExampleModule, imports: [[
1765
- i4.CommonModule,
1766
- i8.ClipboardModule,
1767
- i1.TuiTabsModule,
1768
- i2$1.TuiButtonModule,
1769
- TuiDocCopyModule,
1770
- TuiDocCodeModule,
1771
- i6$2.PolymorpheusModule,
1772
- i6.TuiMapperPipeModule,
1773
- i2$1.TuiLoaderModule,
1774
- ]] });
1775
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocExampleModule, decorators: [{
1776
- type: i0.NgModule,
1777
- args: [{
1778
- imports: [
1779
- i4.CommonModule,
1780
- i8.ClipboardModule,
1781
- i1.TuiTabsModule,
1782
- i2$1.TuiButtonModule,
1783
- TuiDocCopyModule,
1784
- TuiDocCodeModule,
1785
- i6$2.PolymorpheusModule,
1786
- i6.TuiMapperPipeModule,
1787
- i2$1.TuiLoaderModule,
1788
- ],
1789
- declarations: [
1790
- TuiDocExampleComponent,
1791
- TuiDocExampleGetTabsPipe,
1792
- TuiDocExampleCapitalizePipe,
1793
- ],
1794
- exports: [
1795
- TuiDocExampleComponent,
1796
- TuiDocExampleGetTabsPipe,
1797
- TuiDocExampleCapitalizePipe,
1798
- ],
1799
- }]
1800
- }] });
1801
-
1802
- var TuiLanguageSwitcherComponent = /** @class */ (function () {
1803
- function TuiLanguageSwitcherComponent(switcher, flagPipe) {
1804
- this.switcher = switcher;
1805
- this.flagPipe = flagPipe;
1806
- this.language = new i5.FormControl(i2$1.tuiCapitalizeFirstLetter(this.switcher.language));
1807
- this.flags = new Map([
1808
- ['chinese', i5$1.TuiCountryIsoCode.CN],
1809
- ['dutch', i5$1.TuiCountryIsoCode.NL],
1810
- ['english', i5$1.TuiCountryIsoCode.GB],
1811
- ['french', i5$1.TuiCountryIsoCode.FR],
1812
- ['german', i5$1.TuiCountryIsoCode.DE],
1813
- ['italian', i5$1.TuiCountryIsoCode.IT],
1814
- ['polish', i5$1.TuiCountryIsoCode.PL],
1815
- ['portuguese', i5$1.TuiCountryIsoCode.PT],
1816
- ['russian', i5$1.TuiCountryIsoCode.RU],
1817
- ['spanish', i5$1.TuiCountryIsoCode.ES],
1818
- ['turkish', i5$1.TuiCountryIsoCode.TR],
1819
- ['ukrainian', i5$1.TuiCountryIsoCode.UA],
1820
- ['vietnamese', i5$1.TuiCountryIsoCode.VN],
1821
- ]);
1822
- this.names = Array.from(this.flags.keys());
1823
- }
1824
56
  /**
1825
- * @deprecated use `<img [src]="countryIsoCode | tuiFlagPipe" />`
1826
- * TODO drop in v4.0
57
+ * Generated bundle index. Do not edit.
1827
58
  */
1828
- TuiLanguageSwitcherComponent.prototype.getFlagPath = function (code) {
1829
- return this.flagPipe.transform(code);
1830
- };
1831
- return TuiLanguageSwitcherComponent;
1832
- }());
1833
- TuiLanguageSwitcherComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiLanguageSwitcherComponent, deps: [{ token: i5$1.TuiLanguageSwitcher }, { token: i2$1.TuiFlagPipe }], target: i0__namespace.ɵɵFactoryTarget.Component });
1834
- TuiLanguageSwitcherComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiLanguageSwitcherComponent, selector: "tui-language-switcher", providers: [
1835
- // TODO: for backward compatibility only. Drop in v4.0
1836
- i2$1.TuiFlagPipe,
1837
- ], ngImport: i0__namespace, template: "<tui-select [formControl]=\"language\">\n <ng-content></ng-content>\n <tui-data-list *tuiDataList>\n <button\n *ngFor=\"let name of names\"\n tuiOption\n [value]=\"name | titlecase\"\n (click)=\"switcher.setLanguage(name)\"\n >\n <img\n alt=\"\"\n class=\"t-flag\"\n [src]=\"flags.get(name) | tuiFlag\"\n />\n {{ name | titlecase }}\n </button>\n </tui-data-list>\n</tui-select>\n", styles: [".t-flag{width:1.75rem;height:1.25rem;margin-right:.5rem}\n"], components: [{ type: i1__namespace.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { type: i2__namespace$1.TuiDataListComponent, selector: "tui-data-list", inputs: ["role", "emptyContent", "size"] }, { type: i2__namespace$1.TuiOptionComponent, selector: "button[tuiOption], a[tuiOption]", inputs: ["size", "role", "disabled", "value"] }], directives: [{ type: i1__namespace.TuiSelectDirective, selector: "tui-select" }, { type: i5__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2__namespace$1.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "titlecase": i4__namespace.TitleCasePipe, "tuiFlag": i2__namespace$1.TuiFlagPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1838
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiLanguageSwitcherComponent, decorators: [{
1839
- type: i0.Component,
1840
- args: [{
1841
- selector: 'tui-language-switcher',
1842
- templateUrl: './language-switcher.component.html',
1843
- styleUrls: ['./language-switcher.component.less'],
1844
- providers: [
1845
- // TODO: for backward compatibility only. Drop in v4.0
1846
- i2$1.TuiFlagPipe,
1847
- ],
1848
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1849
- }]
1850
- }], ctorParameters: function () {
1851
- return [{ type: i5__namespace$1.TuiLanguageSwitcher, decorators: [{
1852
- type: i0.Inject,
1853
- args: [i5$1.TuiLanguageSwitcher]
1854
- }] }, { type: i2__namespace$1.TuiFlagPipe, decorators: [{
1855
- type: i0.Inject,
1856
- args: [i2$1.TuiFlagPipe]
1857
- }] }];
1858
- } });
1859
59
 
1860
- var TuiLanguageSwitcherModule = /** @class */ (function () {
1861
- function TuiLanguageSwitcherModule() {
1862
- }
1863
- return TuiLanguageSwitcherModule;
1864
- }());
1865
- TuiLanguageSwitcherModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiLanguageSwitcherModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1866
- TuiLanguageSwitcherModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiLanguageSwitcherModule, declarations: [TuiLanguageSwitcherComponent], imports: [i4.CommonModule,
1867
- i2$1.TuiFlagPipeModule,
1868
- i1.TuiSelectModule,
1869
- i2$1.TuiDataListModule,
1870
- i5.ReactiveFormsModule], exports: [TuiLanguageSwitcherComponent] });
1871
- TuiLanguageSwitcherModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiLanguageSwitcherModule, imports: [[
1872
- i4.CommonModule,
1873
- i2$1.TuiFlagPipeModule,
1874
- i1.TuiSelectModule,
1875
- i2$1.TuiDataListModule,
1876
- i5.ReactiveFormsModule,
1877
- ]] });
1878
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiLanguageSwitcherModule, decorators: [{
1879
- type: i0.NgModule,
1880
- args: [{
1881
- exports: [TuiLanguageSwitcherComponent],
1882
- declarations: [TuiLanguageSwitcherComponent],
1883
- imports: [
1884
- i4.CommonModule,
1885
- i2$1.TuiFlagPipeModule,
1886
- i1.TuiSelectModule,
1887
- i2$1.TuiDataListModule,
1888
- i5.ReactiveFormsModule,
1889
- ],
1890
- }]
1891
- }] });
1892
-
1893
- var TUI_THEME_STORAGE_DEFAULT_KEY = "tuiTheme";
1894
- var TUI_THEME_STORAGE_KEY = new i0.InjectionToken("[TUI_THEME_STORAGE_KEY]", { factory: function () { return TUI_THEME_STORAGE_DEFAULT_KEY; } });
1895
- var TUI_THEME_DEFAULT_NAME = "Taiga UI";
1896
- var TUI_THEME_NAME = new i0.InjectionToken("[TUI_THEME_NAME]", {
1897
- factory: function () { return TUI_THEME_DEFAULT_NAME; },
1898
- });
1899
-
1900
- var TuiThemeService = /** @class */ (function (_super) {
1901
- __extends(TuiThemeService, _super);
1902
- function TuiThemeService(initialTheme, key, storage) {
1903
- var _this = _super.call(this, storage.getItem(key) || initialTheme) || this;
1904
- _this.initialTheme = initialTheme;
1905
- _this.key = key;
1906
- _this.storage = storage;
1907
- return _this;
1908
- }
1909
- TuiThemeService.prototype.next = function (theme) {
1910
- this.storage.setItem(this.key, theme);
1911
- _super.prototype.next.call(this, theme);
1912
- };
1913
- Object.defineProperty(TuiThemeService.prototype, "isDefaultTheme", {
1914
- get: function () {
1915
- return this.value === TUI_THEME_DEFAULT_NAME;
1916
- },
1917
- enumerable: false,
1918
- configurable: true
60
+ exports.TuiAddonDocModule = TuiAddonDocModule;
61
+ Object.keys(components).forEach(function (k) {
62
+ if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
63
+ enumerable: true,
64
+ get: function () { return components[k]; }
65
+ });
1919
66
  });
1920
- return TuiThemeService;
1921
- }(i9.BehaviorSubject));
1922
- TuiThemeService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiThemeService, deps: [{ token: TUI_THEME_NAME }, { token: TUI_THEME_STORAGE_KEY }, { token: common.LOCAL_STORAGE }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1923
- TuiThemeService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiThemeService, providedIn: "root" });
1924
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiThemeService, decorators: [{
1925
- type: i0.Injectable,
1926
- args: [{
1927
- providedIn: "root",
1928
- }]
1929
- }], ctorParameters: function () {
1930
- return [{ type: undefined, decorators: [{
1931
- type: i0.Inject,
1932
- args: [TUI_THEME_NAME]
1933
- }] }, { type: undefined, decorators: [{
1934
- type: i0.Inject,
1935
- args: [TUI_THEME_STORAGE_KEY]
1936
- }] }, { type: Storage, decorators: [{
1937
- type: i0.Inject,
1938
- args: [common.LOCAL_STORAGE]
1939
- }] }];
1940
- } });
1941
-
1942
- var TUI_THEME_NIGHT_STORAGE_DEFAULT_KEY = "tuiNight";
1943
- var TUI_THEME_NIGHT_STORAGE_KEY = new i0.InjectionToken("[TUI_THEME_NIGHT_STORAGE_KEY]", { factory: function () { return TUI_THEME_NIGHT_STORAGE_DEFAULT_KEY; } });
1944
- var TUI_USE_DEFAULT_NIGHT_THEME = new i0.InjectionToken("[TUI_USE_DEFAULT_NIGHT_THEME]", { factory: constants.ALWAYS_TRUE_HANDLER });
1945
-
1946
- var TuiThemeNightService = /** @class */ (function (_super) {
1947
- __extends(TuiThemeNightService, _super);
1948
- function TuiThemeNightService(win, storage, key, useDefaultNightTheme) {
1949
- var _this = _super.call(this, storage.getItem(key) === "true" ||
1950
- (storage.getItem(key) === null &&
1951
- win.matchMedia("(prefers-color-scheme: dark)").matches)) || this;
1952
- _this.win = win;
1953
- _this.storage = storage;
1954
- _this.key = key;
1955
- _this.useDefaultNightTheme = useDefaultNightTheme;
1956
- return _this;
1957
- }
1958
- TuiThemeNightService.prototype.next = function (night) {
1959
- this.storage.setItem(this.key, String(night));
1960
- _super.prototype.next.call(this, night);
1961
- };
1962
- TuiThemeNightService.prototype.toggle = function () {
1963
- this.next(!this.value);
1964
- };
1965
- return TuiThemeNightService;
1966
- }(i9.BehaviorSubject));
1967
- TuiThemeNightService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiThemeNightService, deps: [{ token: common.WINDOW }, { token: common.LOCAL_STORAGE }, { token: TUI_THEME_NIGHT_STORAGE_KEY }, { token: TUI_USE_DEFAULT_NIGHT_THEME }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1968
- TuiThemeNightService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiThemeNightService, providedIn: "root" });
1969
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiThemeNightService, decorators: [{
1970
- type: i0.Injectable,
1971
- args: [{
1972
- providedIn: "root",
1973
- }]
1974
- }], ctorParameters: function () {
1975
- return [{ type: Window, decorators: [{
1976
- type: i0.Inject,
1977
- args: [common.WINDOW]
1978
- }] }, { type: Storage, decorators: [{
1979
- type: i0.Inject,
1980
- args: [common.LOCAL_STORAGE]
1981
- }] }, { type: undefined, decorators: [{
1982
- type: i0.Inject,
1983
- args: [TUI_THEME_NIGHT_STORAGE_KEY]
1984
- }] }, { type: undefined, decorators: [{
1985
- type: i0.Inject,
1986
- args: [TUI_USE_DEFAULT_NIGHT_THEME]
1987
- }] }];
1988
- } });
1989
-
1990
- /**
1991
- * Stream that emits if loading of page is over (for example, to begin scrollIntoView)
1992
- */
1993
- var TUI_DOC_PAGE_LOADED = new i0.InjectionToken("[TUI_DOC_PAGE_LOADED]", { factory: function () { return i9.defer(function () { return i9.timer(200).pipe(operators.switchMap(function () { return i9.of(true); })); }); } });
1994
-
1995
- /**
1996
- * Defines the transition animation for scroll
1997
- */
1998
- var TUI_DOC_SCROLL_BEHAVIOR = new i0.InjectionToken("[TUI_DOC_SCROLL_BEHAVIOR]", { factory: function () { return "smooth"; } });
1999
-
2000
- var MAP = {
2001
- а: "f",
2002
- б: ",",
2003
- в: "d",
2004
- г: "u",
2005
- д: "l",
2006
- е: "t",
2007
- ё: "`",
2008
- ж: ";",
2009
- з: "p",
2010
- и: "b",
2011
- й: "q",
2012
- к: "r",
2013
- л: "k",
2014
- м: "v",
2015
- н: "y",
2016
- о: "j",
2017
- п: "g",
2018
- р: "h",
2019
- с: "c",
2020
- т: "n",
2021
- у: "e",
2022
- ф: "a",
2023
- х: "[",
2024
- ц: "w",
2025
- ч: "x",
2026
- ш: "i",
2027
- щ: "o",
2028
- ъ: "]",
2029
- ы: "s",
2030
- ь: "m",
2031
- ю: ".",
2032
- я: "z",
2033
- };
2034
- /**
2035
- * Translates text mistakenly typed in the Russian layout into English
2036
- * @param string string with Russian layout characters
2037
- * @return string with English layout characters
2038
- */
2039
- function tuiTransliterateKeyboardLayout(string) {
2040
- var newStr = "";
2041
- for (var i = 0; i < string.length; i++) {
2042
- newStr += string.charAt(i) in MAP ? MAP[string.charAt(i)] : string.charAt(i);
2043
- }
2044
- return newStr;
2045
- }
2046
-
2047
- function tuiToFlatMapPages(pages) {
2048
- var e_1, _b, e_2, _c;
2049
- var map = new Map();
2050
- try {
2051
- for (var pages_1 = __values(pages), pages_1_1 = pages_1.next(); !pages_1_1.done; pages_1_1 = pages_1.next()) {
2052
- var page = pages_1_1.value;
2053
- if ("subPages" in page) {
2054
- try {
2055
- for (var _d = (e_2 = void 0, __values(page.subPages)), _e = _d.next(); !_e.done; _e = _d.next()) {
2056
- var subPage = _e.value;
2057
- ngDevMode && assertTitle(subPage, map);
2058
- map.set(subPage.title, subPage);
2059
- }
2060
- }
2061
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
2062
- finally {
2063
- try {
2064
- if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
2065
- }
2066
- finally { if (e_2) throw e_2.error; }
2067
- }
2068
- }
2069
- else {
2070
- ngDevMode && assertTitle(page, map);
2071
- map.set(page.title, page);
2072
- }
2073
- }
2074
- }
2075
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
2076
- finally {
2077
- try {
2078
- if (pages_1_1 && !pages_1_1.done && (_b = pages_1.return)) _b.call(pages_1);
2079
- }
2080
- finally { if (e_1) throw e_1.error; }
2081
- }
2082
- return map;
2083
- }
2084
- function assertTitle(page, map) {
2085
- var _a;
2086
- if (map.has(page.title) && ((_a = map.get(page.title)) === null || _a === void 0 ? void 0 : _a.route) !== page.route) {
2087
- console.error("Title for page should be unique for prevent inconsistent page names", page, "<== Collisions between ==>", map.get(page.title));
2088
- }
2089
- }
2090
-
2091
- /**
2092
- * Documentation pages
2093
- */
2094
- var TUI_DOC_PAGES = new i0.InjectionToken("[TUI_DOC_PAGES]", {
2095
- factory: function () { return []; },
2096
- });
2097
- var TUI_DOC_MAP_PAGES = new i0.InjectionToken("[TUI_DOC_MAP_PAGES]", {
2098
- factory: function () {
2099
- var pages = i0.inject(TUI_DOC_PAGES);
2100
- return tuiToFlatMapPages(pages);
2101
- },
2102
- });
2103
-
2104
- /**
2105
- * Page title prefix
2106
- */
2107
- var TUI_DOC_TITLE = new i0.InjectionToken("[TUI_DOC_TITLE]", {
2108
- factory: function () { return ""; },
2109
- });
2110
-
2111
- /**
2112
- * Page title
2113
- */
2114
- var NAVIGATION_TITLE = new i0.InjectionToken("[NAVIGATION_TITLE]");
2115
- /**
2116
- * Navigation sections labels for search
2117
- */
2118
- var NAVIGATION_LABELS = new i0.InjectionToken("[NAVIGATION_LABELS]");
2119
- /**
2120
- * Navigation pages
2121
- */
2122
- var NAVIGATION_ITEMS = new i0.InjectionToken("[NAVIGATION_ITEMS]");
2123
- var NAVIGATION_PROVIDERS = [
2124
- i6.TuiDestroyService,
2125
- {
2126
- provide: NAVIGATION_TITLE,
2127
- deps: [i6$1.Router, i6$1.ActivatedRoute, TUI_DOC_TITLE, i6.TuiDestroyService],
2128
- useFactory: function (router, activatedRoute, titlePrefix, destroy$) {
2129
- return router.events.pipe(operators.filter(function (event) { return event instanceof i6$1.NavigationEnd; }), operators.map(function () { return activatedRoute.firstChild; }), operators.filter(i6.tuiIsPresent), operators.mergeMap(function (_a) {
2130
- var data = _a.data;
2131
- return data;
2132
- }), operators.map(function (_a) {
2133
- var title = _a.title;
2134
- return "" + titlePrefix + title;
2135
- }), operators.takeUntil(destroy$));
2136
- },
2137
- },
2138
- {
2139
- provide: NAVIGATION_LABELS,
2140
- deps: [TUI_DOC_PAGES],
2141
- useFactory: labelsProviderFactory,
2142
- },
2143
- {
2144
- provide: NAVIGATION_ITEMS,
2145
- deps: [TUI_DOC_PAGES],
2146
- useFactory: function (pages) {
2147
- var labels = labelsProviderFactory(pages);
2148
- return __spreadArray(__spreadArray([], __read(labels.map(function (label) { return pages.filter(function (_a) {
2149
- var section = _a.section;
2150
- return section === label;
2151
- }); }))), [
2152
- pages.filter(function (page) { return !page.section; }),
2153
- ]);
2154
- },
2155
- },
2156
- ];
2157
- function labelsProviderFactory(pages) {
2158
- return pages
2159
- .map(function (_a) {
2160
- var section = _a.section;
2161
- return section;
2162
- })
2163
- .filter(i6.tuiIsPresent)
2164
- .filter(function (item, index, array) { return array.indexOf(item) === index; });
2165
- }
2166
-
2167
- var TuiScrollIntoViewLinkDirective = /** @class */ (function () {
2168
- function TuiScrollIntoViewLinkDirective(destroy$, _a, readyToScroll$) {
2169
- var _this = this;
2170
- var nativeElement = _a.nativeElement;
2171
- this.readyToScroll$ = readyToScroll$;
2172
- this.scroll$ = new i9.ReplaySubject(1);
2173
- this.readyToScroll$
2174
- .pipe(operators.filter(Boolean), operators.switchMap(function () { return _this.scroll$; }), operators.debounceTime(750), operators.filter(function (shallWe) { return shallWe && !!i6.tuiGetElementObscures(nativeElement); }), operators.takeUntil(destroy$))
2175
- .subscribe(function () {
2176
- nativeElement.scrollIntoView();
2177
- });
2178
- }
2179
- Object.defineProperty(TuiScrollIntoViewLinkDirective.prototype, "tuiScrollIntoViewLink", {
2180
- set: function (shallWe) {
2181
- this.scroll$.next(shallWe);
2182
- },
2183
- enumerable: false,
2184
- configurable: true
67
+ Object.keys(directives).forEach(function (k) {
68
+ if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
69
+ enumerable: true,
70
+ get: function () { return directives[k]; }
71
+ });
2185
72
  });
2186
- return TuiScrollIntoViewLinkDirective;
2187
- }());
2188
- TuiScrollIntoViewLinkDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiScrollIntoViewLinkDirective, deps: [{ token: i6.TuiDestroyService, self: true }, { token: i0.ElementRef }, { token: TUI_DOC_PAGE_LOADED }], target: i0__namespace.ɵɵFactoryTarget.Directive });
2189
- TuiScrollIntoViewLinkDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiScrollIntoViewLinkDirective, selector: "[tuiScrollIntoViewLink]", inputs: { tuiScrollIntoViewLink: "tuiScrollIntoViewLink" }, providers: [i6.TuiDestroyService], ngImport: i0__namespace });
2190
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiScrollIntoViewLinkDirective, decorators: [{
2191
- type: i0.Directive,
2192
- args: [{
2193
- selector: '[tuiScrollIntoViewLink]',
2194
- providers: [i6.TuiDestroyService],
2195
- }]
2196
- }], ctorParameters: function () {
2197
- return [{ type: i6__namespace$1.TuiDestroyService, decorators: [{
2198
- type: i0.Self
2199
- }, {
2200
- type: i0.Inject,
2201
- args: [i6.TuiDestroyService]
2202
- }] }, { type: i0__namespace.ElementRef, decorators: [{
2203
- type: i0.Inject,
2204
- args: [i0.ElementRef]
2205
- }] }, { type: i9__namespace.Observable, decorators: [{
2206
- type: i0.Inject,
2207
- args: [TUI_DOC_PAGE_LOADED]
2208
- }] }];
2209
- }, propDecorators: { tuiScrollIntoViewLink: [{
2210
- type: i0.Input
2211
- }] } });
2212
-
2213
- var TuiDocNavigationComponent = /** @class */ (function () {
2214
- function TuiDocNavigationComponent(cdr, titleService, title$, doc, mode, sidebar, labels, items, searchText, router, activatedRoute, destroy$, readyToScroll$, scrollBehavior) {
2215
- var _this = this;
2216
- this.doc = doc;
2217
- this.mode = mode;
2218
- this.sidebar = sidebar;
2219
- this.labels = labels;
2220
- this.items = items;
2221
- this.searchText = searchText;
2222
- this.router = router;
2223
- this.activatedRoute = activatedRoute;
2224
- this.destroy$ = destroy$;
2225
- this.readyToScroll$ = readyToScroll$;
2226
- this.scrollBehavior = scrollBehavior;
2227
- this.menuOpen = false;
2228
- this.openPagesArr = [];
2229
- this.openPagesGroupsArr = [];
2230
- this.active = '';
2231
- this.search = new i5.FormControl('');
2232
- this.filtered$ = i6.tuiControlValue(this.search).pipe(operators.filter(function (search) { return search.length > 2; }), operators.map(function (search) { return _this.filterItems(_this.flattenSubPages(_this.items), search); }));
2233
- this.mode$ = this.mode.change$.pipe(operators.startWith(null), operators.map(function () { return _this.mode.mode || 'onLight'; }));
2234
- // Angular can't navigate no anchor links
2235
- // https://stackoverflow.com/questions/36101756/angular2-routing-with-hashtag-to-page-anchor
2236
- title$.subscribe(function (title) {
2237
- cdr.markForCheck();
2238
- titleService.setTitle(title);
2239
- _this.openActivePageGroup();
2240
- _this.handleAnchorLink(_this.activatedRoute.snapshot.fragment || '');
2241
- });
2242
- }
2243
- Object.defineProperty(TuiDocNavigationComponent.prototype, "canOpen", {
2244
- get: function () {
2245
- var _a, _b;
2246
- return ((_b = (_a = this.search.value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 2;
2247
- },
2248
- enumerable: false,
2249
- configurable: true
73
+ Object.keys(interfaces).forEach(function (k) {
74
+ if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
75
+ enumerable: true,
76
+ get: function () { return interfaces[k]; }
77
+ });
2250
78
  });
2251
- Object.defineProperty(TuiDocNavigationComponent.prototype, "itemsWithoutSections", {
2252
- get: function () {
2253
- return this.items[this.items.length - 1];
2254
- },
2255
- enumerable: false,
2256
- configurable: true
79
+ Object.keys(languages).forEach(function (k) {
80
+ if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
81
+ enumerable: true,
82
+ get: function () { return languages[k]; }
83
+ });
2257
84
  });
2258
- TuiDocNavigationComponent.prototype.isActive = function (route) {
2259
- return route === this.active;
2260
- };
2261
- TuiDocNavigationComponent.prototype.onGroupClick = function (index) {
2262
- this.openPagesGroupsArr[index] = !this.openPagesGroupsArr[index];
2263
- };
2264
- TuiDocNavigationComponent.prototype.closeMenu = function () {
2265
- this.menuOpen = false;
2266
- };
2267
- TuiDocNavigationComponent.prototype.onClick = function (input) {
2268
- input.open = false;
2269
- this.menuOpen = false;
2270
- this.search.setValue('');
2271
- this.openActivePageGroup();
2272
- };
2273
- TuiDocNavigationComponent.prototype.filterItems = function (items, search) {
2274
- return items.map(function (section) { return i6.tuiUniqBy(section.filter(function (_c) {
2275
- var title = _c.title, _d = _c.keywords, keywords = _d === void 0 ? '' : _d;
2276
- title = title.toLowerCase();
2277
- search = search.toLowerCase();
2278
- keywords = keywords.toLowerCase();
2279
- return (title.includes(search) ||
2280
- keywords.includes(search) ||
2281
- title.includes(tuiTransliterateKeyboardLayout(search)) ||
2282
- keywords.includes(tuiTransliterateKeyboardLayout(search)) ||
2283
- search.replace(/-/gi, '').includes(title));
2284
- }), 'title'); });
2285
- };
2286
- TuiDocNavigationComponent.prototype.flattenSubPages = function (items) {
2287
- return items.reduce(function (array, item) { return __spreadArray(__spreadArray([], __read(array)), [
2288
- item.reduce(function (pages, page) { return 'subPages' in page
2289
- ? __spreadArray(__spreadArray([], __read(pages)), __read(page.subPages)) : __spreadArray(__spreadArray([], __read(pages)), [page]); }, []),
2290
- ]); }, []);
2291
- };
2292
- TuiDocNavigationComponent.prototype.isActiveRoute = function (route) {
2293
- return this.router.isActive(route, {
2294
- paths: 'subset',
2295
- queryParams: 'subset',
2296
- fragment: 'ignored',
2297
- matrixParams: 'ignored',
2298
- });
2299
- };
2300
- TuiDocNavigationComponent.prototype.handleAnchorLink = function (hash) {
2301
- var _this = this;
2302
- this.readyToScroll$
2303
- .pipe(operators.filter(Boolean), operators.take(1), operators.takeUntil(this.destroy$))
2304
- .subscribe(function () { return _this.navigateToAnchorLink(hash); });
2305
- };
2306
- TuiDocNavigationComponent.prototype.openActivePageGroup = function () {
2307
- var _this = this;
2308
- this.items.forEach(function (pages, pagesIndex) {
2309
- pages.forEach(function (page, pageIndex) {
2310
- if ('route' in page && _this.isActiveRoute(page.route)) {
2311
- _this.openPagesArr[pagesIndex] = true;
2312
- _this.active = page.route;
2313
- }
2314
- if ('subPages' in page) {
2315
- page.subPages.forEach(function (subPage) {
2316
- if (_this.isActiveRoute(subPage.route)) {
2317
- _this.openPagesArr[pagesIndex] = true;
2318
- _this.openPagesGroupsArr[pagesIndex * 100 + pageIndex] = true;
2319
- _this.active = subPage.route;
2320
- }
2321
- });
2322
- }
85
+ Object.keys(services).forEach(function (k) {
86
+ if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
87
+ enumerable: true,
88
+ get: function () { return services[k]; }
2323
89
  });
2324
- });
2325
- };
2326
- TuiDocNavigationComponent.prototype.navigateToAnchorLink = function (fragment) {
2327
- var nodes = fragment ? this.doc.querySelectorAll("#" + fragment) : [];
2328
- var element = nodes.length && nodes[nodes.length - 1];
2329
- if (!element) {
2330
- return;
2331
- }
2332
- element.classList.add('tui-doc-animated-example');
2333
- element.scrollIntoView({
2334
- block: 'start',
2335
- inline: 'nearest',
2336
- behavior: this.scrollBehavior,
2337
- });
2338
- };
2339
- return TuiDocNavigationComponent;
2340
- }());
2341
- TuiDocNavigationComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocNavigationComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i8$1.Title }, { token: NAVIGATION_TITLE }, { token: i4.DOCUMENT }, { token: i2$1.TuiModeDirective }, { token: i4$1.TuiSidebarDirective, optional: true }, { token: NAVIGATION_LABELS }, { token: NAVIGATION_ITEMS }, { token: TUI_DOC_SEARCH_TEXT }, { token: i6$1.Router }, { token: i6$1.ActivatedRoute }, { token: i6.TuiDestroyService, self: true }, { token: TUI_DOC_PAGE_LOADED }, { token: TUI_DOC_SCROLL_BEHAVIOR }], target: i0__namespace.ɵɵFactoryTarget.Component });
2342
- TuiDocNavigationComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocNavigationComponent, selector: "tui-doc-navigation", host: { properties: { "class._open": "this.menuOpen" } }, providers: NAVIGATION_PROVIDERS, ngImport: i0__namespace, template: "<tui-input\n #input\n tuiTextfieldSize=\"m\"\n tuiTextfieldIconLeft=\"tuiIconSearch\"\n class=\"t-input\"\n [formControl]=\"search\"\n [tuiAutoFocus]=\"!!sidebar\"\n [tuiTextfieldCleaner]=\"true\"\n [tuiTextfieldLabelOutside]=\"true\"\n>\n {{ searchText }}\n <ng-container *ngIf=\"canOpen\">\n <tui-data-list *tuiDataList>\n <tui-opt-group\n *ngFor=\"let group of filtered$ | async; 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(input)\"\n >\n {{ item.title }}\n </a>\n </tui-opt-group>\n </tui-data-list>\n </ng-container>\n</tui-input>\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 [tuiScrollIntoViewLink]=\"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 [tuiScrollIntoViewLink]=\"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", styles: [":host{z-index:1;display:flex;flex-direction:column;text-align:center;background:var(--tui-base-01)}.t-input{margin:1.25rem}.t-navigation{display:flex;max-height:100%;min-height:0;flex:1 1 0;text-align:left}.t-scrollbar{scroll-behavior:smooth;width:100%}@media screen and (prefers-reduced-motion: reduce){.t-scrollbar{scroll-behavior:auto}}.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:none;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, .3s);transition-timing-function:ease-in-out;width:1rem;height:1rem;margin:-.25rem .25rem 0 -.1875rem}.t-chevron_active{transform:rotate(90deg)}\n"], components: [{ type: i1__namespace.TuiInputComponent, selector: "tui-input" }, { type: i2__namespace$1.TuiDataListComponent, selector: "tui-data-list", inputs: ["role", "emptyContent", "size"] }, { type: i2__namespace$1.TuiOptionComponent, selector: "button[tuiOption], a[tuiOption]", inputs: ["size", "role", "disabled", "value"] }, { type: i2__namespace$1.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }, { type: i1__namespace.TuiAccordionComponent, selector: "tui-accordion", inputs: ["closeOthers", "rounded"] }, { type: i1__namespace.TuiAccordionItemComponent, selector: "tui-accordion-item", inputs: ["noPadding", "showArrow", "borders", "size", "disabled", "disableHover", "open", "async"], outputs: ["openChange"] }, { type: i2__namespace$1.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { type: i2__namespace$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i2__namespace$1.TuiExpandComponent, selector: "tui-expand", inputs: ["async", "expanded"] }], directives: [{ type: i1__namespace.TuiInputDirective, selector: "tui-input" }, { type: i2__namespace$1.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { type: i2__namespace$1.TuiTextfieldIconLeftDirective, selector: "[tuiTextfieldIconLeft]", inputs: ["tuiTextfieldIconLeft"] }, { type: i5__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i6__namespace$1.TuiAutoFocusDirective, selector: "[tuiAutoFocus]", inputs: ["tuiAutoFocus"] }, { type: i2__namespace$1.TuiTextfieldCleanerDirective, selector: "[tuiTextfieldCleaner]", inputs: ["tuiTextfieldCleaner"] }, { type: i2__namespace$1.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$1.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace$1.TuiOptGroupDirective, selector: "tui-opt-group", inputs: ["label"] }, { type: i6__namespace.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i2__namespace$1.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { type: i1__namespace.TuiAccordionItemContentDirective, selector: "ng-template[tuiAccordionItemContent]" }, { type: i4__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6__namespace.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], exportAs: ["routerLinkActive"] }, { type: TuiScrollIntoViewLinkDirective, selector: "[tuiScrollIntoViewLink]", inputs: ["tuiScrollIntoViewLink"] }], pipes: { "async": i4__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
2343
- __decorate([
2344
- i6.tuiPure
2345
- ], TuiDocNavigationComponent.prototype, "filterItems", null);
2346
- __decorate([
2347
- i6.tuiPure
2348
- ], TuiDocNavigationComponent.prototype, "flattenSubPages", null);
2349
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocNavigationComponent, decorators: [{
2350
- type: i0.Component,
2351
- args: [{
2352
- selector: 'tui-doc-navigation',
2353
- templateUrl: './navigation.template.html',
2354
- styleUrls: ['./navigation.style.less'],
2355
- providers: NAVIGATION_PROVIDERS,
2356
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
2357
- }]
2358
- }], ctorParameters: function () {
2359
- return [{ type: i0__namespace.ChangeDetectorRef, decorators: [{
2360
- type: i0.Inject,
2361
- args: [i0.ChangeDetectorRef]
2362
- }] }, { type: i8__namespace$1.Title, decorators: [{
2363
- type: i0.Inject,
2364
- args: [i8$1.Title]
2365
- }] }, { type: i9__namespace.Observable, decorators: [{
2366
- type: i0.Inject,
2367
- args: [NAVIGATION_TITLE]
2368
- }] }, { type: Document, decorators: [{
2369
- type: i0.Inject,
2370
- args: [i4.DOCUMENT]
2371
- }] }, { type: i2__namespace$1.TuiModeDirective, decorators: [{
2372
- type: i0.Inject,
2373
- args: [i2$1.TuiModeDirective]
2374
- }] }, { type: undefined, decorators: [{
2375
- type: i0.Optional
2376
- }, {
2377
- type: i0.Inject,
2378
- args: [i4$1.TuiSidebarDirective]
2379
- }] }, { type: undefined, decorators: [{
2380
- type: i0.Inject,
2381
- args: [NAVIGATION_LABELS]
2382
- }] }, { type: undefined, decorators: [{
2383
- type: i0.Inject,
2384
- args: [NAVIGATION_ITEMS]
2385
- }] }, { type: undefined, decorators: [{
2386
- type: i0.Inject,
2387
- args: [TUI_DOC_SEARCH_TEXT]
2388
- }] }, { type: i6__namespace.Router, decorators: [{
2389
- type: i0.Inject,
2390
- args: [i6$1.Router]
2391
- }] }, { type: i6__namespace.ActivatedRoute, decorators: [{
2392
- type: i0.Inject,
2393
- args: [i6$1.ActivatedRoute]
2394
- }] }, { type: i9__namespace.Observable, decorators: [{
2395
- type: i0.Self
2396
- }, {
2397
- type: i0.Inject,
2398
- args: [i6.TuiDestroyService]
2399
- }] }, { type: i9__namespace.Observable, decorators: [{
2400
- type: i0.Inject,
2401
- args: [TUI_DOC_PAGE_LOADED]
2402
- }] }, { type: undefined, decorators: [{
2403
- type: i0.Inject,
2404
- args: [TUI_DOC_SCROLL_BEHAVIOR]
2405
- }] }];
2406
- }, propDecorators: { menuOpen: [{
2407
- type: i0.HostBinding,
2408
- args: ['class._open']
2409
- }], filterItems: [], flattenSubPages: [] } });
2410
-
2411
- /**
2412
- * Main logo
2413
- */
2414
- var TUI_DOC_LOGO = new i0.InjectionToken("[TUI_DOC_LOGO]", {
2415
- factory: function () { return ""; },
2416
- });
2417
-
2418
- var TuiDocHeaderComponent = /** @class */ (function () {
2419
- function TuiDocHeaderComponent(logo, menu, router, swipes$) {
2420
- this.logo = logo;
2421
- this.menu = menu;
2422
- this.router = router;
2423
- this.swipes$ = swipes$;
2424
- this.stream$ = new i9.Subject();
2425
- this.open$ = i9.merge(this.router.events.pipe(operators.map(i6.ALWAYS_FALSE_HANDLER)), 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());
2426
- }
2427
- TuiDocHeaderComponent.prototype.onClick = function () {
2428
- this.stream$.next(true);
2429
- };
2430
- TuiDocHeaderComponent.prototype.onActiveZone = function (active) {
2431
- if (!active) {
2432
- this.stream$.next(false);
2433
- }
2434
- };
2435
- return TuiDocHeaderComponent;
2436
- }());
2437
- TuiDocHeaderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocHeaderComponent, deps: [{ token: TUI_DOC_LOGO }, { token: TUI_DOC_MENU_TEXT }, { token: i6$1.Router }, { token: i6.TuiSwipeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
2438
- TuiDocHeaderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocHeaderComponent, selector: "header[tuiDocHeader]", ngImport: i0__namespace, template: "<button\n tuiIconButton\n icon=\"tuiIconMenuLarge\"\n appearance=\"icon\"\n type=\"button\"\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 class=\"t-logo\">\n <img\n *polymorpheusOutlet=\"logo as src\"\n alt=\"Logo\"\n class=\"t-img\"\n [src]=\"src\"\n />\n</div>\n<ng-content></ng-content>\n", styles: [":host{box-shadow:0 .125rem 1rem #00000014;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%}\n"], components: [{ type: i2__namespace$1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { type: TuiDocNavigationComponent, selector: "tui-doc-navigation" }], directives: [{ type: i6__namespace$1.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i4__namespace$1.TuiSidebarDirective, selector: "[tuiSidebar]", inputs: ["tuiSidebarDirection", "tuiSidebarAutoWidth", "tuiSidebar"] }, { type: i6__namespace$2.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i4__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
2439
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocHeaderComponent, decorators: [{
2440
- type: i0.Component,
2441
- args: [{
2442
- selector: 'header[tuiDocHeader]',
2443
- templateUrl: './header.template.html',
2444
- styleUrls: ['./header.style.less'],
2445
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
2446
- }]
2447
- }], ctorParameters: function () {
2448
- return [{ type: undefined, decorators: [{
2449
- type: i0.Inject,
2450
- args: [TUI_DOC_LOGO]
2451
- }] }, { type: undefined, decorators: [{
2452
- type: i0.Inject,
2453
- args: [TUI_DOC_MENU_TEXT]
2454
- }] }, { type: i6__namespace.Router, decorators: [{
2455
- type: i0.Inject,
2456
- args: [i6$1.Router]
2457
- }] }, { type: i6__namespace$1.TuiSwipeService, decorators: [{
2458
- type: i0.Inject,
2459
- args: [i6.TuiSwipeService]
2460
- }] }];
2461
- } });
2462
-
2463
- var TuiDocMainComponent = /** @class */ (function () {
2464
- function TuiDocMainComponent(theme, night) {
2465
- var _this = this;
2466
- this.theme = theme;
2467
- this.night = night;
2468
- this.change$ = this.night;
2469
- this.night$ = this.change$.pipe(operators.startWith(null), operators.map(function () { return _this.night.value; }), operators.distinctUntilChanged(), operators.share());
2470
- }
2471
- Object.defineProperty(TuiDocMainComponent.prototype, "mode", {
2472
- get: function () {
2473
- return this.night.value ? 'onDark' : null;
2474
- },
2475
- enumerable: false,
2476
- configurable: true
2477
90
  });
2478
- return TuiDocMainComponent;
2479
- }());
2480
- TuiDocMainComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocMainComponent, deps: [{ token: TuiThemeService }, { token: TuiThemeNightService }], target: i0__namespace.ɵɵFactoryTarget.Component });
2481
- TuiDocMainComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocMainComponent, selector: "tui-doc-main", host: { properties: { "attr.data-mode": "this.mode" } }, providers: [
2482
- {
2483
- provide: i2$1.TuiModeDirective,
2484
- useExisting: i0.forwardRef(function () { return TuiDocMainComponent; }),
2485
- },
2486
- i6.TuiSwipeService,
2487
- ], ngImport: i0__namespace, template: "<tui-theme-night *ngIf=\"theme.isDefaultTheme && night.useDefaultNightTheme && (night$ | async)\"></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 <ng-content select=\"tuiDocHeader\"></ng-content>\n <button\n tuiIconButton\n tuiMode=\"onLight\"\n appearance=\"secondary\"\n size=\"s\"\n shape=\"rounded\"\n type=\"button\"\n class=\"tui-doc-night-mode-switch\"\n [icon]=\"night.value ? 'tuiIconSunLarge' : 'tuiIconMoonLarge'\"\n (click)=\"night.toggle()\"\n ></button>\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 <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", styles: ["html{scroll-padding-top:4rem;height:auto}tui-root>tui-scroll-controls>.t-bar_vertical{top:4rem!important}@keyframes tuiShaking{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-.3125rem)}20%,40%,60%,80%{transform:translate(.3125rem)}}body{background:var(--tui-base-01);height:auto}tui-doc-main{display:block}code:not(pre code):not(.hljs):not([class*=\"language-\"]){transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;background:var(--tui-base-02);color:var(--tui-text-02);vertical-align:middle;box-shadow:inset 0 -2px var(--tui-secondary);padding:.375rem .5rem;font-size:.875rem;border-radius:.5rem}button:focus code,a:focus code{background:var(--tui-base-01)}.tui-doc-page{position:relative;z-index:0;padding-top:4rem}tui-doc-navigation.tui-doc-navigation{position:fixed;top:4rem;bottom:0;width:16.25rem;border-right:1px solid var(--tui-base-03)}@media screen and (max-width: 47.9625em){tui-doc-navigation.tui-doc-navigation{display:none}}.tui-doc-content{margin-left:16.25rem}@media screen and (max-width: 47.9625em){.tui-doc-content{margin-left:0}}.tui-doc-outlet+*{display:block}.tui-doc-animated-example{animation:1s .3s tuiShaking}.tui-doc-night-mode-switch{margin-left:1rem}.tui-doc-night-mode-switch tui-svg{color:var(--tui-text-02)}tui-doc-code .hljs-tag{background:none}tui-doc-code .hljs{display:block;overflow-x:auto;padding:.5em;color:var(--tui-text-01);background-color:var(--tui-clear)}tui-doc-code .hljs.hljs-line-numbers{background:transparent}tui-doc-code .hljs-subst,tui-doc-code .hljs-title{font-weight:normal;color:var(--tui-text-01)}tui-doc-code .hljs-comment,tui-doc-code .hljs-quote{color:var(--tui-text-03);font-style:italic}tui-doc-code .hljs-meta{color:#e38162}tui-doc-code .hljs-section,tui-doc-code .hljs-name,tui-doc-code .hljs-literal,tui-doc-code .hljs-keyword,tui-doc-code .hljs-selector-tag,tui-doc-code .hljs-type,tui-doc-code .hljs-selector-id,tui-doc-code .hljs-selector-class{font-weight:bold;color:var(--tui-link)}tui-doc-code .hljs-attribute,tui-doc-code .hljs-number,tui-doc-code .hljs-regexp,tui-doc-code .hljs-link{font-weight:bold;color:var(--tui-support-06)}tui-doc-code .hljs-number,tui-doc-code .hljs-regexp,tui-doc-code .hljs-link{font-weight:normal}tui-doc-code .hljs-string{color:var(--tui-positive);font-weight:bold}tui-doc-code .hljs-symbol,tui-doc-code .hljs-bullet,tui-doc-code .hljs-formula{color:var(--tui-text-01);background:var(--tui-base-02);font-style:italic}tui-doc-code .hljs-doctag{text-decoration:underline}tui-doc-code .hljs-variable,tui-doc-code .hljs-template-variable{color:var(--tui-link-hover)}tui-doc-code [data-mode=onDark] .hljs-variable,tui-doc-code [data-mode=onDark] .hljs-template-variable{color:var(--tui-warning-fill)}tui-doc-code .hljs-addition{background:var(--tui-success-bg)}tui-doc-code .hljs-deletion{background:var(--tui-error-bg)}tui-doc-code .hljs-emphasis{font-style:italic}tui-doc-code .hljs-strong{font-weight:bold}tui-doc-code .hljs .hljs-line-numbers{padding:0}tui-doc-code .hljs-ln-numbers{vertical-align:top;opacity:.3;text-align:right;padding-right:1em!important}\n"], components: [{ type: i2__namespace$1.TuiThemeNightComponent, selector: "tui-theme-night" }, { type: i2__namespace$1.TuiRootComponent, selector: "tui-root" }, { type: TuiDocNavigationComponent, selector: "tui-doc-navigation" }, { type: TuiDocHeaderComponent, selector: "header[tuiDocHeader]" }, { type: i2__namespace$1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }, { type: i2__namespace$1.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }], pipes: { "async": i4__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.Default, encapsulation: i0__namespace.ViewEncapsulation.None });
2488
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocMainComponent, decorators: [{
2489
- type: i0.Component,
2490
- args: [{
2491
- selector: 'tui-doc-main',
2492
- templateUrl: './main.template.html',
2493
- styleUrls: ['./main.style.less'],
2494
- encapsulation: i0.ViewEncapsulation.None,
2495
- // @note: This one was default on purpose so we can test demo in default mode.
2496
- // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
2497
- changeDetection: i0.ChangeDetectionStrategy.Default,
2498
- providers: [
2499
- {
2500
- provide: i2$1.TuiModeDirective,
2501
- useExisting: i0.forwardRef(function () { return TuiDocMainComponent; }),
2502
- },
2503
- i6.TuiSwipeService,
2504
- ],
2505
- }]
2506
- }], ctorParameters: function () {
2507
- return [{ type: TuiThemeService, decorators: [{
2508
- type: i0.Inject,
2509
- args: [TuiThemeService]
2510
- }] }, { type: TuiThemeNightService, decorators: [{
2511
- type: i0.Inject,
2512
- args: [TuiThemeNightService]
2513
- }] }];
2514
- }, propDecorators: { mode: [{
2515
- type: i0.HostBinding,
2516
- args: ['attr.data-mode']
2517
- }] } });
2518
-
2519
- var TuiScrollIntoViewLinkModule = /** @class */ (function () {
2520
- function TuiScrollIntoViewLinkModule() {
2521
- }
2522
- return TuiScrollIntoViewLinkModule;
2523
- }());
2524
- TuiScrollIntoViewLinkModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiScrollIntoViewLinkModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2525
- TuiScrollIntoViewLinkModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiScrollIntoViewLinkModule, declarations: [TuiScrollIntoViewLinkDirective], exports: [TuiScrollIntoViewLinkDirective] });
2526
- TuiScrollIntoViewLinkModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiScrollIntoViewLinkModule });
2527
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiScrollIntoViewLinkModule, decorators: [{
2528
- type: i0.NgModule,
2529
- args: [{
2530
- declarations: [TuiScrollIntoViewLinkDirective],
2531
- exports: [TuiScrollIntoViewLinkDirective],
2532
- }]
2533
- }] });
2534
-
2535
- var TuiDocNavigationModule = /** @class */ (function () {
2536
- function TuiDocNavigationModule() {
2537
- }
2538
- return TuiDocNavigationModule;
2539
- }());
2540
- TuiDocNavigationModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocNavigationModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2541
- TuiDocNavigationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocNavigationModule, declarations: [TuiDocNavigationComponent], imports: [i4.CommonModule,
2542
- i5.ReactiveFormsModule,
2543
- i6$1.RouterModule,
2544
- i6$2.PolymorpheusModule,
2545
- TuiScrollIntoViewLinkModule,
2546
- i2$1.TuiButtonModule,
2547
- i1.TuiInputModule,
2548
- i2$1.TuiTextfieldControllerModule,
2549
- i6.TuiActiveZoneModule,
2550
- i6.TuiLetModule,
2551
- i2$1.TuiModeModule,
2552
- i2$1.TuiLinkModule,
2553
- i2$1.TuiExpandModule,
2554
- i2$1.TuiHostedDropdownModule,
2555
- i2$1.TuiDropdownModule,
2556
- i1.TuiAccordionModule,
2557
- i2$1.TuiScrollbarModule,
2558
- i2$1.TuiSvgModule,
2559
- i2$1.TuiDataListModule,
2560
- i6.TuiAutoFocusModule], exports: [TuiDocNavigationComponent] });
2561
- TuiDocNavigationModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocNavigationModule, imports: [[
2562
- i4.CommonModule,
2563
- i5.ReactiveFormsModule,
2564
- i6$1.RouterModule,
2565
- i6$2.PolymorpheusModule,
2566
- TuiScrollIntoViewLinkModule,
2567
- i2$1.TuiButtonModule,
2568
- i1.TuiInputModule,
2569
- i2$1.TuiTextfieldControllerModule,
2570
- i6.TuiActiveZoneModule,
2571
- i6.TuiLetModule,
2572
- i2$1.TuiModeModule,
2573
- i2$1.TuiLinkModule,
2574
- i2$1.TuiExpandModule,
2575
- i2$1.TuiHostedDropdownModule,
2576
- i2$1.TuiDropdownModule,
2577
- i1.TuiAccordionModule,
2578
- i2$1.TuiScrollbarModule,
2579
- i2$1.TuiSvgModule,
2580
- i2$1.TuiDataListModule,
2581
- i6.TuiAutoFocusModule,
2582
- ]] });
2583
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocNavigationModule, decorators: [{
2584
- type: i0.NgModule,
2585
- args: [{
2586
- imports: [
2587
- i4.CommonModule,
2588
- i5.ReactiveFormsModule,
2589
- i6$1.RouterModule,
2590
- i6$2.PolymorpheusModule,
2591
- TuiScrollIntoViewLinkModule,
2592
- i2$1.TuiButtonModule,
2593
- i1.TuiInputModule,
2594
- i2$1.TuiTextfieldControllerModule,
2595
- i6.TuiActiveZoneModule,
2596
- i6.TuiLetModule,
2597
- i2$1.TuiModeModule,
2598
- i2$1.TuiLinkModule,
2599
- i2$1.TuiExpandModule,
2600
- i2$1.TuiHostedDropdownModule,
2601
- i2$1.TuiDropdownModule,
2602
- i1.TuiAccordionModule,
2603
- i2$1.TuiScrollbarModule,
2604
- i2$1.TuiSvgModule,
2605
- i2$1.TuiDataListModule,
2606
- i6.TuiAutoFocusModule,
2607
- ],
2608
- declarations: [TuiDocNavigationComponent],
2609
- exports: [TuiDocNavigationComponent],
2610
- }]
2611
- }] });
2612
-
2613
- var TuiDocHeaderModule = /** @class */ (function () {
2614
- function TuiDocHeaderModule() {
2615
- }
2616
- return TuiDocHeaderModule;
2617
- }());
2618
- TuiDocHeaderModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocHeaderModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2619
- TuiDocHeaderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocHeaderModule, declarations: [TuiDocHeaderComponent], imports: [i4.CommonModule,
2620
- i6$2.PolymorpheusModule,
2621
- i2$1.TuiButtonModule,
2622
- i4$1.TuiSidebarModule,
2623
- i6.TuiActiveZoneModule,
2624
- TuiDocNavigationModule], exports: [TuiDocHeaderComponent] });
2625
- TuiDocHeaderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocHeaderModule, imports: [[
2626
- i4.CommonModule,
2627
- i6$2.PolymorpheusModule,
2628
- i2$1.TuiButtonModule,
2629
- i4$1.TuiSidebarModule,
2630
- i6.TuiActiveZoneModule,
2631
- TuiDocNavigationModule,
2632
- ]] });
2633
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocHeaderModule, decorators: [{
2634
- type: i0.NgModule,
2635
- args: [{
2636
- imports: [
2637
- i4.CommonModule,
2638
- i6$2.PolymorpheusModule,
2639
- i2$1.TuiButtonModule,
2640
- i4$1.TuiSidebarModule,
2641
- i6.TuiActiveZoneModule,
2642
- TuiDocNavigationModule,
2643
- ],
2644
- declarations: [TuiDocHeaderComponent],
2645
- exports: [TuiDocHeaderComponent],
2646
- }]
2647
- }] });
2648
-
2649
- var TuiDocMainModule = /** @class */ (function () {
2650
- function TuiDocMainModule() {
2651
- }
2652
- return TuiDocMainModule;
2653
- }());
2654
- TuiDocMainModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocMainModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2655
- TuiDocMainModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocMainModule, declarations: [TuiDocMainComponent], imports: [i4.CommonModule,
2656
- i6$1.RouterModule,
2657
- i2$1.TuiThemeNightModule,
2658
- TuiDocHeaderModule,
2659
- i2$1.TuiRootModule,
2660
- i2$1.TuiDialogModule,
2661
- i2$1.TuiAlertModule,
2662
- i2$1.TuiButtonModule,
2663
- i2$1.TuiModeModule,
2664
- TuiDocNavigationModule], exports: [TuiDocMainComponent] });
2665
- TuiDocMainModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocMainModule, imports: [[
2666
- i4.CommonModule,
2667
- i6$1.RouterModule,
2668
- i2$1.TuiThemeNightModule,
2669
- TuiDocHeaderModule,
2670
- i2$1.TuiRootModule,
2671
- i2$1.TuiDialogModule,
2672
- i2$1.TuiAlertModule,
2673
- i2$1.TuiButtonModule,
2674
- i2$1.TuiModeModule,
2675
- TuiDocNavigationModule,
2676
- ]] });
2677
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocMainModule, decorators: [{
2678
- type: i0.NgModule,
2679
- args: [{
2680
- imports: [
2681
- i4.CommonModule,
2682
- i6$1.RouterModule,
2683
- i2$1.TuiThemeNightModule,
2684
- TuiDocHeaderModule,
2685
- i2$1.TuiRootModule,
2686
- i2$1.TuiDialogModule,
2687
- i2$1.TuiAlertModule,
2688
- i2$1.TuiButtonModule,
2689
- i2$1.TuiModeModule,
2690
- TuiDocNavigationModule,
2691
- ],
2692
- declarations: [TuiDocMainComponent],
2693
- exports: [TuiDocMainComponent],
2694
- }]
2695
- }] });
2696
-
2697
- /**
2698
- * Array of default tab names
2699
- */
2700
- var TUI_DOC_DEFAULT_TABS = new i0.InjectionToken("[TUI_DOC_DEFAULT_TABS]", {
2701
- factory: function () { return []; },
2702
- });
2703
-
2704
- /**
2705
- * Array of arrays of related pages
2706
- */
2707
- var TUI_DOC_SEE_ALSO = new i0.InjectionToken("[TUI_DOC_SEE_ALSO]", {
2708
- factory: function () { return []; },
2709
- });
2710
-
2711
- /**
2712
- * Array if related page titles
2713
- */
2714
- var PAGE_SEE_ALSO = new i0.InjectionToken("[PAGE_SEE_ALSO]");
2715
- var PAGE_PROVIDERS = [
2716
- {
2717
- provide: PAGE_SEE_ALSO,
2718
- deps: [i0.ElementRef, TUI_DOC_SEE_ALSO],
2719
- useFactory: function (_a, seeAlsoGroups) {
2720
- var nativeElement = _a.nativeElement;
2721
- var currentHeader = nativeElement.getAttribute("header");
2722
- var groups = seeAlsoGroups.filter(function (group) { return group.includes(currentHeader); }) || [];
2723
- var seeAlsoSet = new Set(groups
2724
- .join()
2725
- .split(",")
2726
- .filter(function (component) { return component && component !== currentHeader; }));
2727
- return Array.from(seeAlsoSet);
2728
- },
2729
- },
2730
- ];
2731
-
2732
- var TuiDocPageTabConnectorDirective = /** @class */ (function () {
2733
- function TuiDocPageTabConnectorDirective(template) {
2734
- this.template = template;
2735
- }
2736
- return TuiDocPageTabConnectorDirective;
2737
- }());
2738
- TuiDocPageTabConnectorDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocPageTabConnectorDirective, deps: [{ token: i0.TemplateRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
2739
- TuiDocPageTabConnectorDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocPageTabConnectorDirective, selector: "[pageTab]", inputs: { pageTab: "pageTab" }, ngImport: i0__namespace });
2740
- __decorate([
2741
- i6.tuiDefaultProp()
2742
- ], TuiDocPageTabConnectorDirective.prototype, "pageTab", void 0);
2743
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocPageTabConnectorDirective, decorators: [{
2744
- type: i0.Directive,
2745
- args: [{
2746
- selector: '[pageTab]',
2747
- }]
2748
- }], ctorParameters: function () {
2749
- return [{ type: i0__namespace.TemplateRef, decorators: [{
2750
- type: i0.Inject,
2751
- args: [i0.TemplateRef]
2752
- }] }];
2753
- }, propDecorators: { pageTab: [{
2754
- type: i0.Input
2755
- }] } });
2756
-
2757
- /**
2758
- * Source code link
2759
- */
2760
- var TUI_DOC_SOURCE_CODE = new i0.InjectionToken("[TUI_DOC_SOURCE_CODE]", {
2761
- factory: function () { return null; },
2762
- });
2763
-
2764
- var TuiDocSourceCodeComponent = /** @class */ (function () {
2765
- function TuiDocSourceCodeComponent(sourceCode, text) {
2766
- this.sourceCode = sourceCode;
2767
- this.text = text;
2768
- this.header = '';
2769
- this.package = '';
2770
- this.type = '';
2771
- this.path = '';
2772
- }
2773
- Object.defineProperty(TuiDocSourceCodeComponent.prototype, "pathOptions", {
2774
- get: function () {
2775
- return this.getPathOptions(this.header, this.package, this.type, this.path);
2776
- },
2777
- enumerable: false,
2778
- configurable: true
91
+ Object.keys(tokens).forEach(function (k) {
92
+ if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
93
+ enumerable: true,
94
+ get: function () { return tokens[k]; }
95
+ });
2779
96
  });
2780
- TuiDocSourceCodeComponent.prototype.getPathOptions = function (header, packageName, type, path) {
2781
- return {
2782
- header: header,
2783
- package: packageName,
2784
- type: type,
2785
- path: path,
2786
- };
2787
- };
2788
- return TuiDocSourceCodeComponent;
2789
- }());
2790
- TuiDocSourceCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSourceCodeComponent, deps: [{ token: TUI_DOC_SOURCE_CODE }, { token: TUI_DOC_SOURCE_CODE_TEXT }], target: i0__namespace.ɵɵFactoryTarget.Component });
2791
- TuiDocSourceCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocSourceCodeComponent, selector: "tui-doc-source-code", inputs: { header: "header", package: "package", type: "type", path: "path" }, ngImport: i0__namespace, template: "<a\n *polymorpheusOutlet=\"sourceCode as link; context: pathOptions\"\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", components: [{ type: i2__namespace$1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i6__namespace$2.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
2792
- __decorate([
2793
- i6.tuiPure
2794
- ], TuiDocSourceCodeComponent.prototype, "getPathOptions", null);
2795
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSourceCodeComponent, decorators: [{
2796
- type: i0.Component,
2797
- args: [{
2798
- selector: 'tui-doc-source-code',
2799
- templateUrl: './source-code.template.html',
2800
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
2801
- }]
2802
- }], ctorParameters: function () {
2803
- return [{ type: undefined, decorators: [{
2804
- type: i0.Inject,
2805
- args: [TUI_DOC_SOURCE_CODE]
2806
- }] }, { type: undefined, decorators: [{
2807
- type: i0.Inject,
2808
- args: [TUI_DOC_SOURCE_CODE_TEXT]
2809
- }] }];
2810
- }, propDecorators: { header: [{
2811
- type: i0.Input
2812
- }], package: [{
2813
- type: i0.Input
2814
- }], type: [{
2815
- type: i0.Input
2816
- }], path: [{
2817
- type: i0.Input
2818
- }], getPathOptions: [] } });
2819
-
2820
- var TuiDocSeeAlsoComponent = /** @class */ (function () {
2821
- function TuiDocSeeAlsoComponent(text, pages) {
2822
- this.text = text;
2823
- this.pages = pages;
2824
- this.seeAlso = [];
2825
- }
2826
- TuiDocSeeAlsoComponent.prototype.getRouterLink = function (pageTitle) {
2827
- var _a, _b;
2828
- return (_b = (_a = this.pages.get(pageTitle)) === null || _a === void 0 ? void 0 : _a.route) !== null && _b !== void 0 ? _b : '';
2829
- };
2830
- return TuiDocSeeAlsoComponent;
2831
- }());
2832
- TuiDocSeeAlsoComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSeeAlsoComponent, deps: [{ token: TUI_DOC_SEE_ALSO_TEXT }, { token: TUI_DOC_MAP_PAGES }], target: i0__namespace.ɵɵFactoryTarget.Component });
2833
- TuiDocSeeAlsoComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocSeeAlsoComponent, selector: "tui-doc-see-also", inputs: { seeAlso: "seeAlso" }, ngImport: i0__namespace, template: "<h5 class=\"t-header\">{{ text }}</h5>\n<ng-container *ngFor=\"let item of seeAlso; last as last\">\n <a\n tuiLink\n [routerLink]=\"getRouterLink(item)\"\n [innerText]=\"item\"\n ></a>\n <ng-container *ngIf=\"!last\">{{ ', ' }}</ng-container>\n</ng-container>\n", styles: [":host{display:block}.t-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}\n"], components: [{ type: i2__namespace$1.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }], directives: [{ type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
2834
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSeeAlsoComponent, decorators: [{
2835
- type: i0.Component,
2836
- args: [{
2837
- selector: 'tui-doc-see-also',
2838
- templateUrl: './see-also.template.html',
2839
- styleUrls: ['./see-also.style.less'],
2840
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
2841
- }]
2842
- }], ctorParameters: function () {
2843
- return [{ type: undefined, decorators: [{
2844
- type: i0.Inject,
2845
- args: [TUI_DOC_SEE_ALSO_TEXT]
2846
- }] }, { type: Map, decorators: [{
2847
- type: i0.Inject,
2848
- args: [TUI_DOC_MAP_PAGES]
2849
- }] }];
2850
- }, propDecorators: { seeAlso: [{
2851
- type: i0.Input
2852
- }] } });
2853
-
2854
- var TuiDocPageComponent = /** @class */ (function () {
2855
- function TuiDocPageComponent(defaultTabs, seeAlso) {
2856
- this.defaultTabs = defaultTabs;
2857
- this.seeAlso = seeAlso;
2858
- this.header = '';
2859
- this.package = '';
2860
- this.type = '';
2861
- this.path = '';
2862
- this.deprecated = false;
2863
- this.tabConnectors = i6.EMPTY_QUERY;
2864
- this.activeItemIndex = 0;
2865
- this.from = / /g;
2866
- this.to = '_';
2867
- }
2868
- Object.defineProperty(TuiDocPageComponent.prototype, "showSeeAlso", {
2869
- get: function () {
2870
- return !!this.seeAlso.length && this.activeItemIndex === 0;
2871
- },
2872
- enumerable: false,
2873
- configurable: true
97
+ Object.keys(types).forEach(function (k) {
98
+ if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
99
+ enumerable: true,
100
+ get: function () { return types[k]; }
101
+ });
102
+ });
103
+ Object.keys(utils).forEach(function (k) {
104
+ if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
105
+ enumerable: true,
106
+ get: function () { return utils[k]; }
107
+ });
2874
108
  });
2875
- return TuiDocPageComponent;
2876
- }());
2877
- TuiDocPageComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocPageComponent, deps: [{ token: TUI_DOC_DEFAULT_TABS }, { token: PAGE_SEE_ALSO }], target: i0__namespace.ɵɵFactoryTarget.Component });
2878
- TuiDocPageComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocPageComponent, selector: "tui-doc-page", inputs: { header: "header", package: "package", type: "type", path: "path", deprecated: "deprecated" }, providers: PAGE_PROVIDERS, queries: [{ propertyName: "tabConnectors", predicate: TuiDocPageTabConnectorDirective }], ngImport: i0__namespace, template: "<header class=\"t-header\">\n <h1 class=\"t-title\">\n {{ header }}\n <tui-tag\n *ngIf=\"!!deprecated || deprecated === ''\"\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=\"tab.pageTab || defaultTabs[index] as tabName\">\n <a\n *tuiItem\n tuiTab\n routerLinkActive\n [routerLinkActiveOptions]=\"{exact: first}\"\n [routerLink]=\"first ? './' : (tabName | tuiReplace : from : to)\"\n >\n {{ tabName }}\n </a>\n </ng-container>\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", 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;margin-left:auto}\n"], components: [{ type: i1__namespace.TuiTagComponent, selector: "tui-tag, a[tuiTag], button[tuiTag]", inputs: ["value", "editable", "separator", "maxLength", "size", "showLoader", "status", "hoverable", "removable", "disabled", "autoColor", "leftContent"], outputs: ["edited"] }, { type: i1__namespace.TuiTabsWithMoreComponent, selector: "tui-tabs-with-more, nav[tuiTabsWithMore]", inputs: ["moreContent", "dropdownContent", "underline", "activeItemIndex", "itemsLimit"], outputs: ["activeItemIndexChange"] }, { type: i1__namespace.TuiTabComponent, selector: "a[tuiTab]:not([routerLink]), a[tuiTab][routerLink][routerLinkActive], button[tuiTab]" }, { type: TuiDocSourceCodeComponent, selector: "tui-doc-source-code", inputs: ["header", "package", "type", "path"] }, { type: TuiDocSeeAlsoComponent, selector: "tui-doc-see-also", inputs: ["seeAlso"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace$1.TuiItemDirective, selector: "[tuiItem]" }, { type: i6__namespace.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i6__namespace.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], exportAs: ["routerLinkActive"] }, { type: i4__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "tuiReplace": i6__namespace$1.TuiReplacePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
2879
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocPageComponent, decorators: [{
2880
- type: i0.Component,
2881
- args: [{
2882
- selector: 'tui-doc-page',
2883
- templateUrl: './page.template.html',
2884
- styleUrls: ['./page.style.less'],
2885
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
2886
- providers: PAGE_PROVIDERS,
2887
- }]
2888
- }], ctorParameters: function () {
2889
- return [{ type: undefined, decorators: [{
2890
- type: i0.Inject,
2891
- args: [TUI_DOC_DEFAULT_TABS]
2892
- }] }, { type: undefined, decorators: [{
2893
- type: i0.Inject,
2894
- args: [PAGE_SEE_ALSO]
2895
- }] }];
2896
- }, propDecorators: { header: [{
2897
- type: i0.Input
2898
- }], package: [{
2899
- type: i0.Input
2900
- }], type: [{
2901
- type: i0.Input
2902
- }], path: [{
2903
- type: i0.Input
2904
- }], deprecated: [{
2905
- type: i0.Input
2906
- }], tabConnectors: [{
2907
- type: i0.ContentChildren,
2908
- args: [TuiDocPageTabConnectorDirective]
2909
- }] } });
2910
-
2911
- var TuiDocSeeAlsoModule = /** @class */ (function () {
2912
- function TuiDocSeeAlsoModule() {
2913
- }
2914
- return TuiDocSeeAlsoModule;
2915
- }());
2916
- TuiDocSeeAlsoModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSeeAlsoModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2917
- TuiDocSeeAlsoModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSeeAlsoModule, declarations: [TuiDocSeeAlsoComponent], imports: [i4.CommonModule, i6$1.RouterModule, i2$1.TuiLinkModule], exports: [TuiDocSeeAlsoComponent] });
2918
- TuiDocSeeAlsoModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSeeAlsoModule, imports: [[i4.CommonModule, i6$1.RouterModule, i2$1.TuiLinkModule]] });
2919
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSeeAlsoModule, decorators: [{
2920
- type: i0.NgModule,
2921
- args: [{
2922
- imports: [i4.CommonModule, i6$1.RouterModule, i2$1.TuiLinkModule],
2923
- declarations: [TuiDocSeeAlsoComponent],
2924
- exports: [TuiDocSeeAlsoComponent],
2925
- }]
2926
- }] });
2927
-
2928
- var TuiDocSourceCodeModule = /** @class */ (function () {
2929
- function TuiDocSourceCodeModule() {
2930
- }
2931
- return TuiDocSourceCodeModule;
2932
- }());
2933
- TuiDocSourceCodeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSourceCodeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2934
- TuiDocSourceCodeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSourceCodeModule, declarations: [TuiDocSourceCodeComponent], imports: [i4.CommonModule, i6$2.PolymorpheusModule, i2$1.TuiButtonModule], exports: [TuiDocSourceCodeComponent] });
2935
- TuiDocSourceCodeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSourceCodeModule, imports: [[i4.CommonModule, i6$2.PolymorpheusModule, i2$1.TuiButtonModule]] });
2936
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSourceCodeModule, decorators: [{
2937
- type: i0.NgModule,
2938
- args: [{
2939
- declarations: [TuiDocSourceCodeComponent],
2940
- imports: [i4.CommonModule, i6$2.PolymorpheusModule, i2$1.TuiButtonModule],
2941
- exports: [TuiDocSourceCodeComponent],
2942
- }]
2943
- }] });
2944
-
2945
- var TuiDocPageModule = /** @class */ (function () {
2946
- function TuiDocPageModule() {
2947
- }
2948
- return TuiDocPageModule;
2949
- }());
2950
- TuiDocPageModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocPageModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2951
- TuiDocPageModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocPageModule, declarations: [TuiDocPageComponent, TuiDocPageTabConnectorDirective], imports: [i4.CommonModule,
2952
- i6$1.RouterModule,
2953
- TuiDocSeeAlsoModule,
2954
- i1.TuiTabsModule,
2955
- i1.TuiTagModule,
2956
- TuiDocSourceCodeModule,
2957
- i6.TuiReplacePipeModule], exports: [TuiDocPageComponent, TuiDocPageTabConnectorDirective] });
2958
- TuiDocPageModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocPageModule, imports: [[
2959
- i4.CommonModule,
2960
- i6$1.RouterModule,
2961
- TuiDocSeeAlsoModule,
2962
- i1.TuiTabsModule,
2963
- i1.TuiTagModule,
2964
- TuiDocSourceCodeModule,
2965
- i6.TuiReplacePipeModule,
2966
- ]] });
2967
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocPageModule, decorators: [{
2968
- type: i0.NgModule,
2969
- args: [{
2970
- imports: [
2971
- i4.CommonModule,
2972
- i6$1.RouterModule,
2973
- TuiDocSeeAlsoModule,
2974
- i1.TuiTabsModule,
2975
- i1.TuiTagModule,
2976
- TuiDocSourceCodeModule,
2977
- i6.TuiReplacePipeModule,
2978
- ],
2979
- declarations: [TuiDocPageComponent, TuiDocPageTabConnectorDirective],
2980
- exports: [TuiDocPageComponent, TuiDocPageTabConnectorDirective],
2981
- }]
2982
- }] });
2983
-
2984
- var TUI_DOC_RUSSIAN = [
2985
- {
2986
- provide: TUI_DOC_DEMO_TEXTS,
2987
- useValue: ["\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"],
2988
- },
2989
- {
2990
- provide: TUI_DOC_DOCUMENTATION_TEXTS,
2991
- useValue: [
2992
- "\u0410\u0440\u0433\u0443\u043C\u0435\u043D\u0442",
2993
- "\u0422\u0438\u043F",
2994
- "\u0418\u043C\u044F \u0438 \u043E\u043F\u0438\u0441\u0430\u043D\u0438\u0435",
2995
- "\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435",
2996
- "\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",
2997
- ],
2998
- },
2999
- {
3000
- provide: TUI_DOC_EXAMPLE_TEXTS,
3001
- useValue: ["\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"],
3002
- },
3003
- {
3004
- provide: TUI_DOC_MENU_TEXT,
3005
- useValue: "\u041C\u0435\u043D\u044E",
3006
- },
3007
- {
3008
- provide: TUI_DOC_SEARCH_TEXT,
3009
- useValue: "\u041F\u043E\u0438\u0441\u043A",
3010
- },
3011
- {
3012
- provide: TUI_DOC_SEE_ALSO_TEXT,
3013
- useValue: "\u0421\u043C\u043E\u0442\u0440\u0438\u0442\u0435 \u0442\u0430\u043A\u0436\u0435",
3014
- },
3015
- {
3016
- provide: TUI_DOC_SOURCE_CODE_TEXT,
3017
- useValue: "\u0418\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u043A\u043E\u0434",
3018
- },
3019
- ];
3020
-
3021
- var TuiAddonDocModule = /** @class */ (function () {
3022
- function TuiAddonDocModule() {
3023
- }
3024
- return TuiAddonDocModule;
3025
- }());
3026
- TuiAddonDocModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAddonDocModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
3027
- TuiAddonDocModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAddonDocModule, exports: [TuiDocCodeModule,
3028
- TuiDocDemoModule,
3029
- TuiDocDocumentationModule,
3030
- TuiDocPageModule,
3031
- TuiDocExampleModule] });
3032
- TuiAddonDocModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAddonDocModule, imports: [TuiDocCodeModule,
3033
- TuiDocDemoModule,
3034
- TuiDocDocumentationModule,
3035
- TuiDocPageModule,
3036
- TuiDocExampleModule] });
3037
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiAddonDocModule, decorators: [{
3038
- type: i0.NgModule,
3039
- args: [{
3040
- exports: [
3041
- TuiDocCodeModule,
3042
- TuiDocDemoModule,
3043
- TuiDocDocumentationModule,
3044
- TuiDocPageModule,
3045
- TuiDocExampleModule,
3046
- ],
3047
- }]
3048
- }] });
3049
-
3050
- function tuiGenerateRoutes(type) {
3051
- return [
3052
- {
3053
- path: "",
3054
- component: type,
3055
- children: [
3056
- {
3057
- path: ":tab",
3058
- component: type,
3059
- },
3060
- ],
3061
- },
3062
- ];
3063
- }
3064
-
3065
- /**
3066
- * Public API Surface of @taiga-ui/addon-doc
3067
- */
3068
-
3069
- /**
3070
- * Generated bundle index. Do not edit.
3071
- */
3072
-
3073
- exports.TUI_DOC_CODE_ACTIONS = TUI_DOC_CODE_ACTIONS;
3074
- exports.TUI_DOC_CODE_EDITOR = TUI_DOC_CODE_EDITOR;
3075
- exports.TUI_DOC_DEFAULT_TABS = TUI_DOC_DEFAULT_TABS;
3076
- exports.TUI_DOC_DEMO_TEXTS = TUI_DOC_DEMO_TEXTS;
3077
- exports.TUI_DOC_DOCUMENTATION_TEXTS = TUI_DOC_DOCUMENTATION_TEXTS;
3078
- exports.TUI_DOC_EXAMPLE_CONTENT_PROCESSOR = TUI_DOC_EXAMPLE_CONTENT_PROCESSOR;
3079
- exports.TUI_DOC_EXAMPLE_DEFAULT_OPTIONS = TUI_DOC_EXAMPLE_DEFAULT_OPTIONS;
3080
- exports.TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR = TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR;
3081
- exports.TUI_DOC_EXAMPLE_OPTIONS = TUI_DOC_EXAMPLE_OPTIONS;
3082
- exports.TUI_DOC_EXAMPLE_TEXTS = TUI_DOC_EXAMPLE_TEXTS;
3083
- exports.TUI_DOC_EXCLUDED_PROPERTIES = TUI_DOC_EXCLUDED_PROPERTIES;
3084
- exports.TUI_DOC_LOGO = TUI_DOC_LOGO;
3085
- exports.TUI_DOC_MAP_PAGES = TUI_DOC_MAP_PAGES;
3086
- exports.TUI_DOC_MENU_TEXT = TUI_DOC_MENU_TEXT;
3087
- exports.TUI_DOC_PAGES = TUI_DOC_PAGES;
3088
- exports.TUI_DOC_PAGE_LOADED = TUI_DOC_PAGE_LOADED;
3089
- exports.TUI_DOC_RUSSIAN = TUI_DOC_RUSSIAN;
3090
- exports.TUI_DOC_SCROLL_BEHAVIOR = TUI_DOC_SCROLL_BEHAVIOR;
3091
- exports.TUI_DOC_SEARCH_TEXT = TUI_DOC_SEARCH_TEXT;
3092
- exports.TUI_DOC_SEE_ALSO = TUI_DOC_SEE_ALSO;
3093
- exports.TUI_DOC_SEE_ALSO_TEXT = TUI_DOC_SEE_ALSO_TEXT;
3094
- exports.TUI_DOC_SOURCE_CODE = TUI_DOC_SOURCE_CODE;
3095
- exports.TUI_DOC_SOURCE_CODE_TEXT = TUI_DOC_SOURCE_CODE_TEXT;
3096
- exports.TUI_DOC_TITLE = TUI_DOC_TITLE;
3097
- exports.TUI_DOC_URL_STATE_HANDLER = TUI_DOC_URL_STATE_HANDLER;
3098
- exports.TUI_EXAMPLE_PRIMARY_FILE_NAME = TUI_EXAMPLE_PRIMARY_FILE_NAME;
3099
- exports.TUI_THEME_DEFAULT_NAME = TUI_THEME_DEFAULT_NAME;
3100
- exports.TUI_THEME_NAME = TUI_THEME_NAME;
3101
- exports.TUI_THEME_NIGHT_STORAGE_DEFAULT_KEY = TUI_THEME_NIGHT_STORAGE_DEFAULT_KEY;
3102
- exports.TUI_THEME_NIGHT_STORAGE_KEY = TUI_THEME_NIGHT_STORAGE_KEY;
3103
- exports.TUI_THEME_STORAGE_DEFAULT_KEY = TUI_THEME_STORAGE_DEFAULT_KEY;
3104
- exports.TUI_THEME_STORAGE_KEY = TUI_THEME_STORAGE_KEY;
3105
- exports.TUI_USE_DEFAULT_NIGHT_THEME = TUI_USE_DEFAULT_NIGHT_THEME;
3106
- exports.TuiAddonDocModule = TuiAddonDocModule;
3107
- exports.TuiDocCodeComponent = TuiDocCodeComponent;
3108
- exports.TuiDocCodeModule = TuiDocCodeModule;
3109
- exports.TuiDocCopyComponent = TuiDocCopyComponent;
3110
- exports.TuiDocCopyModule = TuiDocCopyModule;
3111
- exports.TuiDocDemoComponent = TuiDocDemoComponent;
3112
- exports.TuiDocDemoModule = TuiDocDemoModule;
3113
- exports.TuiDocDocumentationComponent = TuiDocDocumentationComponent;
3114
- exports.TuiDocDocumentationModule = TuiDocDocumentationModule;
3115
- exports.TuiDocDocumentationPropertyConnectorDirective = TuiDocDocumentationPropertyConnectorDirective;
3116
- exports.TuiDocExampleCapitalizePipe = TuiDocExampleCapitalizePipe;
3117
- exports.TuiDocExampleComponent = TuiDocExampleComponent;
3118
- exports.TuiDocExampleGetTabsPipe = TuiDocExampleGetTabsPipe;
3119
- exports.TuiDocExampleModule = TuiDocExampleModule;
3120
- exports.TuiDocMainComponent = TuiDocMainComponent;
3121
- exports.TuiDocMainModule = TuiDocMainModule;
3122
- exports.TuiDocNavigationComponent = TuiDocNavigationComponent;
3123
- exports.TuiDocNavigationModule = TuiDocNavigationModule;
3124
- exports.TuiDocPageComponent = TuiDocPageComponent;
3125
- exports.TuiDocPageModule = TuiDocPageModule;
3126
- exports.TuiDocPageTabConnectorDirective = TuiDocPageTabConnectorDirective;
3127
- exports.TuiInspectPipe = TuiInspectPipe;
3128
- exports.TuiLanguageSwitcherComponent = TuiLanguageSwitcherComponent;
3129
- exports.TuiLanguageSwitcherModule = TuiLanguageSwitcherModule;
3130
- exports.TuiScrollIntoViewLinkDirective = TuiScrollIntoViewLinkDirective;
3131
- exports.TuiScrollIntoViewLinkModule = TuiScrollIntoViewLinkModule;
3132
- exports.TuiThemeNightService = TuiThemeNightService;
3133
- exports.TuiThemeService = TuiThemeService;
3134
- exports.tuiCoerceValue = tuiCoerceValue;
3135
- exports.tuiCoerceValueIsTrue = tuiCoerceValueIsTrue;
3136
- exports.tuiDocExampleOptionsProvider = tuiDocExampleOptionsProvider;
3137
- exports.tuiDocExcludeProperties = tuiDocExcludeProperties;
3138
- exports.tuiGenerateRoutes = tuiGenerateRoutes;
3139
- exports.tuiRawLoad = tuiRawLoad;
3140
- exports.tuiRawLoadRecord = tuiRawLoadRecord;
3141
- exports.tuiTryParseMarkdownCodeBlock = tuiTryParseMarkdownCodeBlock;
3142
109
 
3143
- Object.defineProperty(exports, '__esModule', { value: true });
110
+ Object.defineProperty(exports, '__esModule', { value: true });
3144
111
 
3145
112
  }));
3146
113
  //# sourceMappingURL=taiga-ui-addon-doc.umd.js.map