Skip to content

Commit

Permalink
refactor: remove interfaces entry points (#7529)
Browse files Browse the repository at this point in the history
Signed-off-by: waterplea <[email protected]>
  • Loading branch information
waterplea authored May 23, 2024
1 parent 3c17aa0 commit 6e699f0
Show file tree
Hide file tree
Showing 78 changed files with 154 additions and 206 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
NgZone,
ViewChildren,
} from '@angular/core';
import type {TuiLineChartHintContext} from '@taiga-ui/addon-charts/interfaces';
import type {TuiLineChartHintContext} from '@taiga-ui/addon-charts/types';
import {tuiDraw} from '@taiga-ui/addon-charts/utils';
import type {TuiStringHandler} from '@taiga-ui/cdk';
import {
Expand Down
1 change: 0 additions & 1 deletion projects/addon-charts/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from '@taiga-ui/addon-charts/components';
export * from '@taiga-ui/addon-charts/constants';
export * from '@taiga-ui/addon-charts/interfaces';
export * from '@taiga-ui/addon-charts/types';
1 change: 0 additions & 1 deletion projects/addon-charts/interfaces/index.ts

This file was deleted.

5 changes: 0 additions & 5 deletions projects/addon-charts/interfaces/ng-package.json

This file was deleted.

1 change: 1 addition & 0 deletions projects/addon-charts/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './line-chart-hint-context';
export * from './line-handler';
export * from './line-type';
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ import {maskitoDateOptionsGenerator} from '@maskito/kit';
import {ResizeObserverModule} from '@ng-web-apis/resize-observer';
import {AbstractTuiInputCard} from '@taiga-ui/addon-commerce/components/input-card';
import {TUI_CARD_MASK} from '@taiga-ui/addon-commerce/constants';
import type {TuiCard} from '@taiga-ui/addon-commerce/interfaces';
import {TuiFormatCardPipe} from '@taiga-ui/addon-commerce/pipes';
import type {TuiCodeCVCLength} from '@taiga-ui/addon-commerce/types';
import type {TuiCard, TuiCodeCVCLength} from '@taiga-ui/addon-commerce/types';
import type {TuiFocusableElementAccessor} from '@taiga-ui/cdk';
import {
TUI_DIGIT_REGEXP,
Expand Down
2 changes: 0 additions & 2 deletions projects/addon-commerce/enums/index.ts

This file was deleted.

5 changes: 0 additions & 5 deletions projects/addon-commerce/enums/ng-package.json

This file was deleted.

2 changes: 0 additions & 2 deletions projects/addon-commerce/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
export * from '@taiga-ui/addon-commerce/components';
export * from '@taiga-ui/addon-commerce/constants';
export * from '@taiga-ui/addon-commerce/enums';
export * from '@taiga-ui/addon-commerce/interfaces';
export * from '@taiga-ui/addon-commerce/pipes';
export * from '@taiga-ui/addon-commerce/tokens';
export * from '@taiga-ui/addon-commerce/types';
Expand Down
1 change: 0 additions & 1 deletion projects/addon-commerce/interfaces/index.ts

This file was deleted.

5 changes: 0 additions & 5 deletions projects/addon-commerce/interfaces/ng-package.json

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// cspell:disable
/**
* **Active ISO 4217 numeric currency codes**
*
Expand Down
3 changes: 2 additions & 1 deletion projects/addon-commerce/types/currency-variants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type {TuiCurrency, TuiCurrencyCode} from '@taiga-ui/addon-commerce/enums';
import type {TuiCurrency} from './currency';
import type {TuiCurrencyCode} from './currency-code';

export type TuiCurrencyAutocompletion =
| keyof Record<TuiCurrency, string>
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions projects/addon-commerce/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
export * from './card';
export * from './code-length';
export * from './currency';
export * from './currency-code';
export * from './currency-variants';
export * from './money-sign';
export * from './payment-system';
2 changes: 1 addition & 1 deletion projects/addon-commerce/utils/get-code-by-currency.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// cspell:disable
import {TuiCurrency, TuiCurrencyCode} from '@taiga-ui/addon-commerce/enums';
import {TuiCurrency, TuiCurrencyCode} from '@taiga-ui/addon-commerce/types';

export const TUI_CODE_DICTIONARY: Record<TuiCurrency, TuiCurrencyCode> = {
[TuiCurrency.Ruble]: TuiCurrencyCode.Ruble,
Expand Down
2 changes: 1 addition & 1 deletion projects/addon-commerce/utils/get-currency-by-code.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// cspell:disable
import {TuiCurrency, TuiCurrencyCode} from '@taiga-ui/addon-commerce/enums';
import {TuiCurrency, TuiCurrencyCode} from '@taiga-ui/addon-commerce/types';

export const TUI_CURRENCY_DICTIONARY: Record<TuiCurrencyCode, TuiCurrency> = {
[TuiCurrencyCode.Ruble]: TuiCurrency.Ruble,
Expand Down
2 changes: 1 addition & 1 deletion projects/addon-commerce/utils/get-currency-symbol.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {TuiCurrency, TuiCurrencyCode} from '@taiga-ui/addon-commerce/enums';
import type {TuiCurrencyVariants} from '@taiga-ui/addon-commerce/types';
import {TuiCurrency, TuiCurrencyCode} from '@taiga-ui/addon-commerce/types';

export function tuiGetCurrencySymbol(currency: TuiCurrencyVariants): string | null {
switch (currency) {
Expand Down
2 changes: 1 addition & 1 deletion projects/addon-doc/components/code/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
inject,
Input,
} from '@angular/core';
import type {TuiRawLoaderContent} from '@taiga-ui/addon-doc/interfaces';
import {TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR} from '@taiga-ui/addon-doc/tokens';
import type {TuiRawLoaderContent} from '@taiga-ui/addon-doc/types';
import {tuiRawLoad} from '@taiga-ui/addon-doc/utils';
import type {TuiHandler} from '@taiga-ui/cdk';
import {TuiButtonDirective} from '@taiga-ui/core';
Expand Down
2 changes: 1 addition & 1 deletion projects/addon-doc/components/demo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import type {AbstractControl} from '@angular/forms';
import {FormGroup, FormsModule, ReactiveFormsModule} from '@angular/forms';
import type {Params, UrlTree} from '@angular/router';
import {UrlSerializer} from '@angular/router';
import type {TuiDemoParams} from '@taiga-ui/addon-doc/interfaces';
import {TuiThemeDarkService} from '@taiga-ui/addon-doc/services';
import {TUI_DOC_DEMO_TEXTS, TUI_DOC_URL_STATE_HANDLER} from '@taiga-ui/addon-doc/tokens';
import type {TuiDemoParams} from '@taiga-ui/addon-doc/types';
import {tuiCoerceValueIsTrue} from '@taiga-ui/addon-doc/utils';
import {
tuiClamp,
Expand Down
2 changes: 1 addition & 1 deletion projects/addon-doc/components/example/example.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import {
} from '@angular/core';
import {RouterLink} from '@angular/router';
import {LOCATION} from '@ng-web-apis/common';
import type {TuiDocExample} from '@taiga-ui/addon-doc/interfaces';
import {
TUI_DOC_CODE_ACTIONS,
TUI_DOC_CODE_EDITOR,
TUI_DOC_EXAMPLE_CONTENT_PROCESSOR,
TUI_DOC_EXAMPLE_TEXTS,
} from '@taiga-ui/addon-doc/tokens';
import type {TuiDocExample} from '@taiga-ui/addon-doc/types';
import {tuiRawLoadRecord} from '@taiga-ui/addon-doc/utils';
import type {TuiContext} from '@taiga-ui/cdk';
import {TUI_IS_E2E, TuiItemDirective, TuiMapperPipe} from '@taiga-ui/cdk';
Expand Down
2 changes: 1 addition & 1 deletion projects/addon-doc/components/example/example.options.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {Provider} from '@angular/core';
import {TUI_EXAMPLE_PRIMARY_FILE_NAME} from '@taiga-ui/addon-doc/interfaces';
import {TUI_EXAMPLE_PRIMARY_FILE_NAME} from '@taiga-ui/addon-doc/types';
import type {TuiBooleanHandler} from '@taiga-ui/cdk';
import {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk';
import type {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {ChangeDetectionStrategy, Component, inject, Input} from '@angular/core';
import type {TuiDocSourceCodePathOptions} from '@taiga-ui/addon-doc/interfaces';
import {
TUI_DOC_ICONS,
TUI_DOC_SOURCE_CODE,
TUI_DOC_SOURCE_CODE_TEXT,
} from '@taiga-ui/addon-doc/tokens';
import type {TuiDocSourceCodePathOptions} from '@taiga-ui/addon-doc/types';
import {tuiPure} from '@taiga-ui/cdk';
import {TuiButtonDirective} from '@taiga-ui/core';
import {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ import {
Scroll,
} from '@angular/router';
import {TuiScrollIntoViewLinkDirective} from '@taiga-ui/addon-doc/directives';
import type {TuiDocPage} from '@taiga-ui/addon-doc/interfaces';
import {
TUI_DOC_ICONS,
TUI_DOC_PAGE_LOADED,
TUI_DOC_SEARCH_TEXT,
} from '@taiga-ui/addon-doc/tokens';
import type {TuiDocPages} from '@taiga-ui/addon-doc/types';
import type {TuiDocPage, TuiDocPages} from '@taiga-ui/addon-doc/types';
import {tuiTransliterateKeyboardLayout} from '@taiga-ui/addon-doc/utils';
import {TuiSidebarDirective} from '@taiga-ui/addon-mobile';
import {
Expand Down
1 change: 0 additions & 1 deletion projects/addon-doc/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export * from './addon-doc.module';
export * from '@taiga-ui/addon-doc/components';
export * from '@taiga-ui/addon-doc/directives';
export * from '@taiga-ui/addon-doc/interfaces';
export * from '@taiga-ui/addon-doc/pipes';
export * from '@taiga-ui/addon-doc/services';
export * from '@taiga-ui/addon-doc/tokens';
Expand Down
4 changes: 0 additions & 4 deletions projects/addon-doc/interfaces/index.ts

This file was deleted.

5 changes: 0 additions & 5 deletions projects/addon-doc/interfaces/ng-package.json

This file was deleted.

2 changes: 1 addition & 1 deletion projects/addon-doc/pipes/markdown/markdown.pipe.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type {PipeTransform} from '@angular/core';
import {inject, Pipe, SecurityContext} from '@angular/core';
import {DomSanitizer} from '@angular/platform-browser';
import type {TuiRawLoaderContent} from '@taiga-ui/addon-doc/interfaces';
import type {TuiRawLoaderContent} from '@taiga-ui/addon-doc/types';
import {tuiRawLoad} from '@taiga-ui/addon-doc/utils';
import type {TuiSafeHtml, TuiStringHandler} from '@taiga-ui/cdk';
import {TUI_SANITIZER} from '@taiga-ui/core';
Expand Down
2 changes: 1 addition & 1 deletion projects/addon-doc/tokens/code-editor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {InjectionToken} from '@angular/core';
import type {TuiCodeEditor} from '@taiga-ui/addon-doc/interfaces';
import type {TuiCodeEditor} from '@taiga-ui/addon-doc/types';

/**
* Service for opening online IDE e.g. Stackblitz
Expand Down
3 changes: 1 addition & 2 deletions projects/addon-doc/tokens/pages.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type {InjectionToken} from '@angular/core';
import {inject} from '@angular/core';
import type {TuiDocPage} from '@taiga-ui/addon-doc/interfaces';
import type {TuiDocPages} from '@taiga-ui/addon-doc/types';
import type {TuiDocPage, TuiDocPages} from '@taiga-ui/addon-doc/types';
import {tuiToFlatMapPages} from '@taiga-ui/addon-doc/utils';
import {tuiCreateToken, tuiCreateTokenFromFactory} from '@taiga-ui/cdk';

Expand Down
2 changes: 1 addition & 1 deletion projects/addon-doc/tokens/source-code.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {TuiDocSourceCodePathOptions} from '@taiga-ui/addon-doc/interfaces';
import type {TuiDocSourceCodePathOptions} from '@taiga-ui/addon-doc/types';
import {tuiCreateToken} from '@taiga-ui/cdk';
import type {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';

Expand Down
File renamed without changes.
File renamed without changes.
5 changes: 4 additions & 1 deletion projects/addon-doc/types/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
export * from './pages';
export * from './code-editor';
export * from './demo-params';
export * from './page';
export * from './source-code-path-options';
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import type {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';

export type TuiDocPages = ReadonlyArray<TuiDocPage | TuiDocPageGroup>;

export interface TuiDocPageBase {
readonly section?: string;
readonly title: string;
Expand Down
3 changes: 0 additions & 3 deletions projects/addon-doc/types/pages.ts

This file was deleted.

2 changes: 1 addition & 1 deletion projects/addon-doc/utils/is-page-group.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {TuiDocPage, TuiDocPageGroup} from '@taiga-ui/addon-doc/interfaces';
import type {TuiDocPage, TuiDocPageGroup} from '@taiga-ui/addon-doc/types';

export function tuiIsPageGroup(
page: TuiDocPage | TuiDocPageGroup,
Expand Down
2 changes: 1 addition & 1 deletion projects/addon-doc/utils/raw-load-record.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {TuiDocExample} from '@taiga-ui/addon-doc/interfaces';
import type {TuiDocExample} from '@taiga-ui/addon-doc/types';

import {tuiRawLoad} from './raw-load';

Expand Down
2 changes: 1 addition & 1 deletion projects/addon-doc/utils/raw-load.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {TuiRawLoaderContent} from '@taiga-ui/addon-doc/interfaces';
import type {TuiRawLoaderContent} from '@taiga-ui/addon-doc/types';

export async function tuiRawLoad(content: TuiRawLoaderContent): Promise<string> {
return content instanceof Promise ? (await content).default : content;
Expand Down
2 changes: 1 addition & 1 deletion projects/addon-doc/utils/sort-pages.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {TuiDocPage, TuiDocPageGroup} from '@taiga-ui/addon-doc/interfaces';
import type {TuiDocPage, TuiDocPageGroup} from '@taiga-ui/addon-doc/types';

import {tuiIsPageGroup} from './is-page-group';

Expand Down
3 changes: 1 addition & 2 deletions projects/addon-doc/utils/to-flat-map-pages.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/// <reference types="@taiga-ui/tsconfig/ng-dev-mode" />
import type {TuiDocPage} from '@taiga-ui/addon-doc/interfaces';
import type {TuiDocPages} from '@taiga-ui/addon-doc/types';
import type {TuiDocPage, TuiDocPages} from '@taiga-ui/addon-doc/types';

function assertTitle(page: TuiDocPage, map: Map<string, TuiDocPage>): void {
if (map.has(page.title) && map.get(page.title)?.route !== page.route) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@ import {TuiMobileCalendarComponent} from '@taiga-ui/addon-mobile/components/mobi
import type {TuiBooleanHandler, TuiDay, TuiDayRange} from '@taiga-ui/cdk';
import {TUI_FALSE_HANDLER, TUI_FIRST_DAY, TUI_LAST_DAY} from '@taiga-ui/cdk';
import type {TuiDialogContext} from '@taiga-ui/core';
import type {TuiMobileCalendarData} from '@taiga-ui/kit';
import {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';

export interface TuiMobileCalendarData {
disabledItemHandler?: TuiBooleanHandler<TuiDay>;
max?: TuiDay | null;
min?: TuiDay | null;
multi?: boolean;
single?: boolean;
}

/**
* @deprecated in favor of dropdown
* TODO: remove before 4.0
Expand Down
1 change: 0 additions & 1 deletion projects/addon-mobile/const/index.ts

This file was deleted.

28 changes: 0 additions & 28 deletions projects/addon-mobile/const/mobile-alert-options.ts

This file was deleted.

5 changes: 0 additions & 5 deletions projects/addon-mobile/const/ng-package.json

This file was deleted.

2 changes: 0 additions & 2 deletions projects/addon-mobile/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
export * from '@taiga-ui/addon-mobile/components';
export * from '@taiga-ui/addon-mobile/const';
export * from '@taiga-ui/addon-mobile/directives';
export * from '@taiga-ui/addon-mobile/interfaces';
export * from '@taiga-ui/addon-mobile/services';
export * from '@taiga-ui/addon-mobile/types';
export * from '@taiga-ui/addon-mobile/utils';
1 change: 0 additions & 1 deletion projects/addon-mobile/interfaces/index.ts

This file was deleted.

7 changes: 0 additions & 7 deletions projects/addon-mobile/interfaces/mobile-alert-data.ts

This file was deleted.

5 changes: 0 additions & 5 deletions projects/addon-mobile/interfaces/ng-package.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Directive, inject, Input, TemplateRef} from '@angular/core';
import type {TuiRowContext} from '@taiga-ui/addon-table/interfaces';
import type {TuiRowContext} from '@taiga-ui/addon-table/types';

/**
* @deprecated use `*ngFor` + `tuiTableSort`-pipe instead.
Expand Down
1 change: 0 additions & 1 deletion projects/addon-table/interfaces/index.ts

This file was deleted.

5 changes: 0 additions & 5 deletions projects/addon-table/interfaces/ng-package.json

This file was deleted.

1 change: 1 addition & 0 deletions projects/addon-table/types/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './comparator';
export * from './row-context';
File renamed without changes.
7 changes: 6 additions & 1 deletion projects/addon-tablebars/classes/table-bar.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import type {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';
import type {Observer} from 'rxjs';

import type {TuiTableBarOptions} from '../interfaces/table-bar-options';
export interface TuiTableBarOptions {
readonly adaptive?: boolean;
readonly hasCloseButton?: boolean;
// TODO: rename before 4.0
readonly mode?: 'onDark' | 'onLight';
}

export class TuiTableBar {
public readonly adaptive: boolean;
Expand Down
1 change: 0 additions & 1 deletion projects/addon-tablebars/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from './classes/table-bar';
export * from './components/table-bars-host/table-bars-host.component';
export * from './interfaces/table-bar-options';
export * from './services/table-bars.service';
6 changes: 0 additions & 6 deletions projects/addon-tablebars/interfaces/table-bar-options.ts

This file was deleted.

Loading

0 comments on commit 6e699f0

Please sign in to comment.