@taiga-ui/addon-doc 3.19.0 → 3.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/bundles/taiga-ui-addon-doc.umd.js +86 -25
  2. package/bundles/taiga-ui-addon-doc.umd.js.map +1 -1
  3. package/components/example/example-options.d.ts +3 -0
  4. package/components/language-switcher/language-switcher.component.d.ts +1 -1
  5. package/components/navigation/navigation.providers.d.ts +9 -0
  6. package/components/page/page.providers.d.ts +3 -0
  7. package/esm2015/components/example/example-options.js +5 -2
  8. package/esm2015/components/language-switcher/language-switcher.component.js +1 -1
  9. package/esm2015/components/navigation/navigation.providers.js +13 -4
  10. package/esm2015/components/page/page.providers.js +5 -2
  11. package/esm2015/tokens/code-actions.js +5 -2
  12. package/esm2015/tokens/code-editor.js +5 -2
  13. package/esm2015/tokens/default-tabs.js +5 -2
  14. package/esm2015/tokens/example-content-processor.js +13 -3
  15. package/esm2015/tokens/excluded-properties.js +5 -2
  16. package/esm2015/tokens/i18n.js +11 -8
  17. package/esm2015/tokens/logo.js +5 -2
  18. package/esm2015/tokens/page-loaded.js +5 -2
  19. package/esm2015/tokens/pages.js +5 -2
  20. package/esm2015/tokens/scroll-behavior.js +5 -2
  21. package/esm2015/tokens/see-also.js +5 -2
  22. package/esm2015/tokens/source-code.js +5 -2
  23. package/esm2015/tokens/title.js +5 -2
  24. package/fesm2015/taiga-ui-addon-doc.js +86 -25
  25. package/fesm2015/taiga-ui-addon-doc.js.map +1 -1
  26. package/package.json +5 -5
  27. package/tokens/code-actions.d.ts +3 -0
  28. package/tokens/code-editor.d.ts +3 -0
  29. package/tokens/default-tabs.d.ts +3 -0
  30. package/tokens/example-content-processor.d.ts +6 -0
  31. package/tokens/excluded-properties.d.ts +3 -0
  32. package/tokens/i18n.d.ts +3 -0
  33. package/tokens/logo.d.ts +3 -0
  34. package/tokens/page-loaded.d.ts +3 -0
  35. package/tokens/pages.d.ts +3 -0
  36. package/tokens/scroll-behavior.d.ts +3 -0
  37. package/tokens/see-also.d.ts +3 -0
  38. package/tokens/source-code.d.ts +3 -0
  39. package/tokens/title.d.ts +3 -0
@@ -40,8 +40,18 @@ function tuiTryParseMarkdownCodeBlock(text = ``) {
40
40
  return result.length ? result : [text];
41
41
  }
42
42
 
43
- const TUI_DOC_EXAMPLE_CONTENT_PROCESSOR = new InjectionToken(`[TUI_DOC_EXAMPLE_CONTENT_PROCESSOR]: Processes content in example`, { factory: () => identity });
44
- const TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR = new InjectionToken(`[TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR]: Processes markdown in code block`, { factory: () => tuiTryParseMarkdownCodeBlock });
43
+ /**
44
+ * Processes content in example
45
+ */
46
+ const TUI_DOC_EXAMPLE_CONTENT_PROCESSOR = new InjectionToken(`[TUI_DOC_EXAMPLE_CONTENT_PROCESSOR]`, {
47
+ factory: () => identity,
48
+ });
49
+ /**
50
+ * Processes markdown in code block
51
+ */
52
+ const TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR = new InjectionToken(`[TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR]`, {
53
+ factory: () => tuiTryParseMarkdownCodeBlock,
54
+ });
45
55
 
46
56
  function tuiRawLoad(content) {
47
57
  return __awaiter(this, void 0, void 0, function* () {
@@ -149,13 +159,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
149
159
  * TODO: think about reorganization in @taiga-ui/i18n way
150
160
  */
151
161
  /**
162
+ * tui-doc-demo i18n texts
152
163
  * Works with a tuple
153
164
  * [@string tuiMode tooltip content, @string word 'background', @string 'form value']
154
165
  */
155
- const TUI_DOC_DEMO_TEXTS = new InjectionToken(`[TUI_DOC_DEMO_TEXTS]: tui-doc-demo i18n texts`, {
166
+ const TUI_DOC_DEMO_TEXTS = new InjectionToken(`[TUI_DOC_DEMO_TEXTS]`, {
156
167
  factory: () => [`Read more more about modes: `, `Background`, `Form value`],
157
168
  });
158
169
  /**
170
+ * tui-doc-documentation i18n texts
159
171
  * Works with a tuple
160
172
  * [
161
173
  * @string word 'argument',
@@ -165,7 +177,7 @@ const TUI_DOC_DEMO_TEXTS = new InjectionToken(`[TUI_DOC_DEMO_TEXTS]: tui-doc-dem
165
177
  * @string message for tooltip about ng-polymorpheus
166
178
  * ]
167
179
  */
168
- const TUI_DOC_DOCUMENTATION_TEXTS = new InjectionToken(`[TUI_DOC_DOCUMENTATION_TEXTS]: tui-doc-documentation i18n texts`, {
180
+ const TUI_DOC_DOCUMENTATION_TEXTS = new InjectionToken(`[TUI_DOC_DOCUMENTATION_TEXTS]`, {
169
181
  factory: () => [
170
182
  `Argument`,
171
183
  `Type`,
@@ -175,6 +187,7 @@ const TUI_DOC_DOCUMENTATION_TEXTS = new InjectionToken(`[TUI_DOC_DOCUMENTATION_T
175
187
  ],
176
188
  });
177
189
  /**
190
+ * tui-doc-example i18n texts
178
191
  * Works with a tuple
179
192
  * [
180
193
  * @string default tab name,
@@ -182,19 +195,19 @@ const TUI_DOC_DOCUMENTATION_TEXTS = new InjectionToken(`[TUI_DOC_DOCUMENTATION_T
182
195
  * @string link to a sample copied message label
183
196
  * ]
184
197
  */
185
- const TUI_DOC_EXAMPLE_TEXTS = new InjectionToken(`[TUI_DOC_EXAMPLE_TEXTS]: tui-doc-example i18n texts`, {
198
+ const TUI_DOC_EXAMPLE_TEXTS = new InjectionToken(`[TUI_DOC_EXAMPLE_TEXTS]`, {
186
199
  factory: () => [`Preview`, `Link to a sample was successfully copied`, `Done`],
187
200
  });
188
- const TUI_DOC_MENU_TEXT = new InjectionToken(`[TUI_DOC_MENU_TEXT]: menu i18n text`, {
201
+ const TUI_DOC_MENU_TEXT = new InjectionToken(`[TUI_DOC_MENU_TEXT]`, {
189
202
  factory: () => `Menu`,
190
203
  });
191
- const TUI_DOC_SEARCH_TEXT = new InjectionToken(`[TUI_DOC_SEARCH_TEXT]: search i18n text`, {
204
+ const TUI_DOC_SEARCH_TEXT = new InjectionToken(`[TUI_DOC_SEARCH_TEXT]`, {
192
205
  factory: () => `Search`,
193
206
  });
194
- const TUI_DOC_SEE_ALSO_TEXT = new InjectionToken(`[TUI_DOC_SEE_ALSO_TEXT]: tui-doc-see-also i18n text`, {
207
+ const TUI_DOC_SEE_ALSO_TEXT = new InjectionToken(`[TUI_DOC_SEE_ALSO_TEXT]`, {
195
208
  factory: () => `See also`,
196
209
  });
197
- const TUI_DOC_SOURCE_CODE_TEXT = new InjectionToken(`[TUI_DOC_SOURCE_CODE_TEXT]: tui-doc-source-code i18n text`, {
210
+ const TUI_DOC_SOURCE_CODE_TEXT = new InjectionToken(`[TUI_DOC_SOURCE_CODE_TEXT]`, {
198
211
  factory: () => `Source code`,
199
212
  });
200
213
 
@@ -413,7 +426,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
413
426
  }]
414
427
  }] });
415
428
 
416
- const TUI_DOC_EXCLUDED_PROPERTIES = new InjectionToken(`[TUI_DOC_EXCLUDED_PROPERTIES]: Token to exclude inherited documentation properties`, { factory: () => new Set([]) });
429
+ /**
430
+ * Token to exclude inherited documentation properties
431
+ */
432
+ const TUI_DOC_EXCLUDED_PROPERTIES = new InjectionToken(`[TUI_DOC_EXCLUDED_PROPERTIES]`, { factory: () => new Set([]) });
417
433
  function tuiDocExcludeProperties(properties) {
418
434
  return { provide: TUI_DOC_EXCLUDED_PROPERTIES, useValue: new Set(properties) };
419
435
  }
@@ -1008,11 +1024,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
1008
1024
  }]
1009
1025
  }] });
1010
1026
 
1011
- const TUI_DOC_CODE_ACTIONS = new InjectionToken(`[TUI_DOC_CODE_ACTIONS]: Code actions for the opened tab with code example`, {
1027
+ /**
1028
+ * Code actions for the opened tab with code example
1029
+ */
1030
+ const TUI_DOC_CODE_ACTIONS = new InjectionToken(`[TUI_DOC_CODE_ACTIONS]`, {
1012
1031
  factory: () => ``,
1013
1032
  });
1014
1033
 
1015
- const TUI_DOC_CODE_EDITOR = new InjectionToken(`[TUI_DOC_CODE_EDITOR]: Contains service for opening online IDE e.g. Stackblitz`);
1034
+ /**
1035
+ * Service for opening online IDE e.g. Stackblitz
1036
+ */
1037
+ const TUI_DOC_CODE_EDITOR = new InjectionToken(`[TUI_DOC_CODE_EDITOR]`);
1016
1038
 
1017
1039
  function tuiRawLoadRecord(example) {
1018
1040
  return __awaiter(this, void 0, void 0, function* () {
@@ -1036,7 +1058,10 @@ const TUI_DOC_EXAMPLE_DEFAULT_OPTIONS = {
1036
1058
  codeEditorVisibilityHandler: files => Boolean(files[TUI_EXAMPLE_PRIMARY_FILE_NAME.TS] &&
1037
1059
  files[TUI_EXAMPLE_PRIMARY_FILE_NAME.HTML]),
1038
1060
  };
1039
- const TUI_DOC_EXAMPLE_OPTIONS = new InjectionToken(`[TUI_DOC_EXAMPLE_OPTIONS]: Default parameters for DocExample component`, {
1061
+ /**
1062
+ * Default parameters for DocExample component
1063
+ */
1064
+ const TUI_DOC_EXAMPLE_OPTIONS = new InjectionToken(`[TUI_DOC_EXAMPLE_OPTIONS]`, {
1040
1065
  factory: () => TUI_DOC_EXAMPLE_DEFAULT_OPTIONS,
1041
1066
  });
1042
1067
  function tuiDocExampleOptionsProvider(options) {
@@ -1327,9 +1352,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
1327
1352
  }]
1328
1353
  }] });
1329
1354
 
1330
- const TUI_DOC_PAGE_LOADED = new InjectionToken(`[TUI_DOC_PAGE_LOADED] Stream that emits if loading of page is over (for example, to begin scrollIntoView)`, { factory: () => defer(() => timer(200).pipe(switchMap(() => of(true)))) });
1355
+ /**
1356
+ * Stream that emits if loading of page is over (for example, to begin scrollIntoView)
1357
+ */
1358
+ const TUI_DOC_PAGE_LOADED = new InjectionToken(`[TUI_DOC_PAGE_LOADED]`, { factory: () => defer(() => timer(200).pipe(switchMap(() => of(true)))) });
1331
1359
 
1332
- const TUI_DOC_SCROLL_BEHAVIOR = new InjectionToken(`[TUI_DOC_SCROLL_BEHAVIOR] Defines the transition animation for scroll`, { factory: () => `smooth` });
1360
+ /**
1361
+ * Defines the transition animation for scroll
1362
+ */
1363
+ const TUI_DOC_SCROLL_BEHAVIOR = new InjectionToken(`[TUI_DOC_SCROLL_BEHAVIOR]`, { factory: () => `smooth` });
1333
1364
 
1334
1365
  const MAP = {
1335
1366
  а: `f`,
@@ -1378,17 +1409,32 @@ function tuiTransliterateKeyboardLayout(string) {
1378
1409
  return newStr;
1379
1410
  }
1380
1411
 
1381
- const TUI_DOC_PAGES = new InjectionToken(`[TUI_DOC_PAGES]: Documentation pages`, {
1412
+ /**
1413
+ * Documentation pages
1414
+ */
1415
+ const TUI_DOC_PAGES = new InjectionToken(`[TUI_DOC_PAGES]`, {
1382
1416
  factory: () => [],
1383
1417
  });
1384
1418
 
1385
- const TUI_DOC_TITLE = new InjectionToken(`[TUI_DOC_TITLE]: Page title`, {
1419
+ /**
1420
+ * Page title prefix
1421
+ */
1422
+ const TUI_DOC_TITLE = new InjectionToken(`[TUI_DOC_TITLE]`, {
1386
1423
  factory: () => ``,
1387
1424
  });
1388
1425
 
1389
- const NAVIGATION_TITLE = new InjectionToken(`[NAVIGATION_TITLE]: Page title`);
1390
- const NAVIGATION_LABELS = new InjectionToken(`[NAVIGATION_LABELS]: Navigation sections labels for search`);
1391
- const NAVIGATION_ITEMS = new InjectionToken(`[NAVIGATION_ITEMS]: Navigation pages`);
1426
+ /**
1427
+ * Page title
1428
+ */
1429
+ const NAVIGATION_TITLE = new InjectionToken(`[NAVIGATION_TITLE]`);
1430
+ /**
1431
+ * Navigation sections labels for search
1432
+ */
1433
+ const NAVIGATION_LABELS = new InjectionToken(`[NAVIGATION_LABELS]`);
1434
+ /**
1435
+ * Navigation pages
1436
+ */
1437
+ const NAVIGATION_ITEMS = new InjectionToken(`[NAVIGATION_ITEMS]`);
1392
1438
  const NAVIGATION_PROVIDERS = [
1393
1439
  TuiDestroyService,
1394
1440
  {
@@ -1644,7 +1690,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
1644
1690
  args: ['class._open']
1645
1691
  }], filterItems: [], flattenSubPages: [] } });
1646
1692
 
1647
- const TUI_DOC_LOGO = new InjectionToken(`[TUI_DOC_LOGO]: Main logo`, {
1693
+ /**
1694
+ * Main logo
1695
+ */
1696
+ const TUI_DOC_LOGO = new InjectionToken(`[TUI_DOC_LOGO]`, {
1648
1697
  factory: () => ``,
1649
1698
  });
1650
1699
 
@@ -1911,15 +1960,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
1911
1960
  }]
1912
1961
  }] });
1913
1962
 
1914
- const TUI_DOC_DEFAULT_TABS = new InjectionToken(`[TUI_DOC_DEFAULT_TABS]: Array of default tab names`, {
1963
+ /**
1964
+ * Array of default tab names
1965
+ */
1966
+ const TUI_DOC_DEFAULT_TABS = new InjectionToken(`[TUI_DOC_DEFAULT_TABS]`, {
1915
1967
  factory: () => [],
1916
1968
  });
1917
1969
 
1918
- const TUI_DOC_SEE_ALSO = new InjectionToken(`[TUI_DOC_SEE_ALSO]: Array of arrays of related pages`, {
1970
+ /**
1971
+ * Array of arrays of related pages
1972
+ */
1973
+ const TUI_DOC_SEE_ALSO = new InjectionToken(`[TUI_DOC_SEE_ALSO]`, {
1919
1974
  factory: () => [],
1920
1975
  });
1921
1976
 
1922
- const PAGE_SEE_ALSO = new InjectionToken(`[PAGE_SEE_ALSO]: Page see also`);
1977
+ /**
1978
+ * Array if related page titles
1979
+ */
1980
+ const PAGE_SEE_ALSO = new InjectionToken(`[PAGE_SEE_ALSO]`);
1923
1981
  const PAGE_PROVIDERS = [
1924
1982
  {
1925
1983
  provide: PAGE_SEE_ALSO,
@@ -1958,7 +2016,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
1958
2016
  type: Input
1959
2017
  }] } });
1960
2018
 
1961
- const TUI_DOC_SOURCE_CODE = new InjectionToken(`[TUI_DOC_SOURCE_CODE]: Source code link`, {
2019
+ /**
2020
+ * Source code link
2021
+ */
2022
+ const TUI_DOC_SOURCE_CODE = new InjectionToken(`[TUI_DOC_SOURCE_CODE]`, {
1962
2023
  factory: () => null,
1963
2024
  });
1964
2025