-
Notifications
You must be signed in to change notification settings - Fork 477
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
53 changed files
with
446 additions
and
574 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
import {inject, InjectionToken} from '@angular/core'; | ||
import type {TuiDocPage} from '@taiga-ui/addon-doc/interfaces'; | ||
import {inject} from '@angular/core'; | ||
import type {TuiDocPages} from '@taiga-ui/addon-doc/types'; | ||
import {tuiToFlatMapPages} from '@taiga-ui/addon-doc/utils'; | ||
import {tuiCreateToken} from '@taiga-ui/cdk'; | ||
import {tuiCreateToken, tuiCreateTokenFromFactory} from '@taiga-ui/cdk'; | ||
|
||
/** | ||
* Documentation pages | ||
*/ | ||
export const TUI_DOC_PAGES = tuiCreateToken<TuiDocPages>([]); | ||
|
||
export const TUI_DOC_MAP_PAGES = new InjectionToken<Map<string, TuiDocPage>>( | ||
`[TUI_DOC_MAP_PAGES]`, | ||
{ | ||
factory: () => tuiToFlatMapPages(inject(TUI_DOC_PAGES)), | ||
}, | ||
export const TUI_DOC_MAP_PAGES = tuiCreateTokenFromFactory(() => | ||
tuiToFlatMapPages(inject(TUI_DOC_PAGES)), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import {InjectionToken} from '@angular/core'; | ||
import {tuiCreateTokenFromFactory} from '@taiga-ui/cdk'; | ||
import {tuiExtractI18n} from '@taiga-ui/i18n'; | ||
|
||
/** | ||
* tui-preview i18n | ||
*/ | ||
export const TUI_PREVIEW_TEXTS = new InjectionToken(`[TUI_PREVIEW_TEXTS]`, { | ||
factory: tuiExtractI18n(`previewTexts`), | ||
}); | ||
export const TUI_PREVIEW_TEXTS = tuiCreateTokenFromFactory( | ||
tuiExtractI18n(`previewTexts`), | ||
); | ||
|
||
/** | ||
* tui-preview zoom i18n | ||
*/ | ||
export const TUI_PREVIEW_ZOOM_TEXTS = new InjectionToken(`[TUI_PREVIEW_ZOOM_TEXTS]`, { | ||
factory: tuiExtractI18n(`zoomTexts`), | ||
}); | ||
export const TUI_PREVIEW_ZOOM_TEXTS = tuiCreateTokenFromFactory( | ||
tuiExtractI18n(`zoomTexts`), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,16 @@ | ||
import {InjectionToken} from '@angular/core'; | ||
import {tuiCreateTokenFromFactory} from '@taiga-ui/cdk'; | ||
import {tuiExtractI18n} from '@taiga-ui/i18n'; | ||
|
||
/** | ||
* tui-reorder i18n button | ||
*/ | ||
export const TUI_TABLE_SHOW_HIDE_MESSAGE = new InjectionToken( | ||
`[TUI_TABLE_SHOW_HIDE_MESSAGE]`, | ||
{ | ||
factory: tuiExtractI18n(`showHideText`), | ||
}, | ||
export const TUI_TABLE_SHOW_HIDE_MESSAGE = tuiCreateTokenFromFactory( | ||
tuiExtractI18n(`showHideText`), | ||
); | ||
|
||
/** | ||
* tui-table-pagination i18n texts | ||
*/ | ||
export const TUI_TABLE_PAGINATION_TEXTS = new InjectionToken( | ||
`[TUI_TABLE_PAGINATION_TEXTS]`, | ||
{ | ||
factory: tuiExtractI18n(`paginationTexts`), | ||
}, | ||
export const TUI_TABLE_PAGINATION_TEXTS = tuiCreateTokenFromFactory( | ||
tuiExtractI18n(`paginationTexts`), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
import {inject, InjectionToken, Renderer2, RendererFactory2} from '@angular/core'; | ||
import {inject, Renderer2, RendererFactory2} from '@angular/core'; | ||
import {tuiCreateTokenFromFactory} from '@taiga-ui/cdk/utils'; | ||
|
||
/** | ||
* A Renderer2 for global services | ||
* https://github.com/angular/angular/issues/17824#issuecomment-353239017 | ||
* @deprecated unnecessary | ||
* TODO: remove in 4.0 | ||
*/ | ||
export const TUI_DEFAULT_RENDERER = new InjectionToken<Renderer2>( | ||
`[TUI_DEFAULT_RENDERER]`, | ||
{ | ||
// @ts-ignore | ||
factory: () => inject(RendererFactory2).createRenderer(null, null), | ||
}, | ||
export const TUI_DEFAULT_RENDERER = tuiCreateTokenFromFactory<Renderer2>( | ||
// @ts-ignore | ||
() => inject(RendererFactory2).createRenderer(null, null), | ||
); |
Oops, something went wrong.