Skip to content

Commit

Permalink
chore(demo): deprecated sheet (#5760)
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode authored Oct 30, 2023
1 parent 0fcfa19 commit 6ea4134
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 0 deletions.
7 changes: 7 additions & 0 deletions projects/addon-mobile/components/sheet/sheet-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';

import {TuiSheet} from './sheet';

/**
* @deprecated: drop in v4.0
*/
export interface TuiSheetOptions<I = undefined, O = unknown> {
readonly closeable: boolean;
readonly data: I;
Expand All @@ -14,6 +17,9 @@ export interface TuiSheetOptions<I = undefined, O = unknown> {
readonly stops: readonly string[];
}

/**
* @deprecated: drop in v4.0
*/
export const TUI_SHEET_DEFAULT_OPTIONS: Omit<TuiSheetOptions, 'data'> = {
image: ``,
imageSlide: true,
Expand All @@ -25,6 +31,7 @@ export const TUI_SHEET_DEFAULT_OPTIONS: Omit<TuiSheetOptions, 'data'> = {
};

/**
* @deprecated: drop in v4.0
* Default parameters for sheet component
*/
export const TUI_SHEET_OPTIONS = tuiCreateToken<Omit<TuiSheetOptions, 'data'>>({
Expand Down
4 changes: 4 additions & 0 deletions projects/addon-mobile/components/sheet/sheet.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ import {TuiSheet} from './sheet';
import {TuiSheetService} from './sheet.service';
import {TuiSheetOptions} from './sheet-options';

/**
* @deprecated: use {@link TuiSheetDialogDirective}
* drop in v4.0
*/
@Directive({
selector: 'ng-template[tuiSheet]',
})
Expand Down
4 changes: 4 additions & 0 deletions projects/addon-mobile/components/sheet/sheet.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ import {TuiSheetTopDirective} from './directives/sheet-top/sheet-top.directive';
import {TuiSheetWrapperDirective} from './directives/sheet-wrapper/sheet-wrapper.directive';
import {TuiSheetDirective} from './sheet.directive';

/**
* @deprecated: use {@link TuiSheetDialogModule}
* drop in v4.0
*/
@NgModule({
imports: [
CommonModule,
Expand Down
4 changes: 4 additions & 0 deletions projects/addon-mobile/components/sheet/sheet.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import {BehaviorSubject, EMPTY, Observable} from 'rxjs';
import {TuiSheet} from './sheet';
import {TUI_SHEET_OPTIONS, TuiSheetOptions} from './sheet-options';

/**
* @deprecated: use {@link TuiSheetDialogService}
* drop in v4.0
*/
@Injectable({
providedIn: `root`,
})
Expand Down
6 changes: 6 additions & 0 deletions projects/addon-mobile/components/sheet/sheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import {Observable, Observer} from 'rxjs';

import type {TuiSheetOptions} from './sheet-options';

/**
* @deprecated: drop in v4.0
*/
export interface TuiSheet<O, I = undefined>
extends TuiSheetOptions<I, O>,
TuiContextWithImplicit<Observer<O>> {
Expand All @@ -12,6 +15,9 @@ export interface TuiSheet<O, I = undefined>
readonly scroll$: Observable<number>;
}

/**
* @deprecated: drop in v4.0
*/
export interface TuiSheetRequiredProps<T = unknown> {
item: TuiSheet<T>;
stops: readonly number[];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<tui-doc-page
deprecated
header="Sheet"
package="ADDON-MOBILE"
type="components"
Expand Down

0 comments on commit 6ea4134

Please sign in to comment.