Skip to content

Commit

Permalink
chore: show deprecation message (#7920)
Browse files Browse the repository at this point in the history
Co-authored-by: taiga-family-bot <[email protected]>
  • Loading branch information
splincode and taiga-family-bot authored Jun 25, 2024
1 parent a174135 commit c64beba
Show file tree
Hide file tree
Showing 151 changed files with 596 additions and 30 deletions.
3 changes: 3 additions & 0 deletions projects/legacy/classes/abstract-native-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ import {TUI_TEXTFIELD_HOST} from '@taiga-ui/legacy/tokens';

import {AbstractTuiControl} from './control';

/**
* @deprecated: drop in v5.0
*/
@Directive()
export abstract class AbstractTuiNativeSelect<H = TuiTextfieldHost, T = string> {
private readonly idService = inject(TuiIdService);
Expand Down
2 changes: 1 addition & 1 deletion projects/legacy/classes/abstract-textfield-host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {TuiTextfieldHost} from '@taiga-ui/legacy/tokens';
import {AbstractTuiControl} from './control';

/**
* @deprecated
* @deprecated: drop in v5.0
*/
@Directive()
export abstract class AbstractTuiTextfieldHost<T extends AbstractTuiControl<any>>
Expand Down
1 change: 1 addition & 0 deletions projects/legacy/classes/control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
import {AbstractTuiInteractive} from './interactive';

/**
* @deprecated: drop in v5.0
* Basic ControlValueAccessor class to build form components upon
*/
@Directive()
Expand Down
2 changes: 1 addition & 1 deletion projects/legacy/classes/interactive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {Directive, EventEmitter, HostBinding, Input, Output} from '@angular/core
const TUI = 'tui_interactive_';

/**
* @deprecated
* @deprecated: drop in v5.0
*/
@Directive()
export abstract class AbstractTuiInteractive {
Expand Down
3 changes: 3 additions & 0 deletions projects/legacy/classes/multiple-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import {Directive} from '@angular/core';

import {AbstractTuiControl} from './control';

/**
* @deprecated: drop in v5.0
*/
@Directive()
export abstract class AbstractTuiMultipleControl<T> extends AbstractTuiControl<
readonly T[]
Expand Down
3 changes: 3 additions & 0 deletions projects/legacy/classes/named-day.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import type {TuiDay} from '@taiga-ui/cdk/date-time';

/**
* @deprecated: drop in v5.0
*/
export class TuiNamedDay {
constructor(
public readonly day: TuiDay,
Expand Down
3 changes: 3 additions & 0 deletions projects/legacy/classes/nullable-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import {Directive} from '@angular/core';

import {AbstractTuiControl} from './control';

/**
* @deprecated: drop in v5.0
*/
@Directive()
export abstract class AbstractTuiNullableControl<T> extends AbstractTuiControl<T | null> {
protected getFallbackValue(): T | null {
Expand Down
1 change: 1 addition & 0 deletions projects/legacy/classes/stringifiable-item.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type {TuiStringHandler} from '@taiga-ui/cdk/types';

/**
* @deprecated: drop in v5.0
* Wrapper around an item to add `toString()` method
*/
export class TuiStringifiableItem<T> {
Expand Down
6 changes: 6 additions & 0 deletions projects/legacy/components/arrow/arrow.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ import {

import {TUI_ARROW_OPTIONS} from './arrow.options';

/**
* @deprecated: drop in v5.0
*/
@Component({
standalone: true,
selector: 'tui-arrow',
Expand Down Expand Up @@ -43,4 +46,7 @@ export class TuiArrowComponent {
}
}

/**
* @deprecated: drop in v5.0
*/
export const TUI_ARROW = new PolymorpheusComponent(TuiArrowComponent);
12 changes: 11 additions & 1 deletion projects/legacy/components/arrow/arrow.options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,32 @@ import type {Provider} from '@angular/core';
import {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';
import type {PolymorpheusContent} from '@taiga-ui/polymorpheus';

/**
* @deprecated: drop in v5.0
*/
export interface TuiArrowOptions {
readonly iconLarge: PolymorpheusContent;
readonly iconSmall: PolymorpheusContent;
}

/** Default values for arrow options */
/**
* @deprecated: drop in v5.0
* Default values for arrow options
*/
export const TUI_ARROW_DEFAULT_OPTIONS: TuiArrowOptions = {
iconSmall: '@tui.chevron-down',
iconLarge: '@tui.chevron-down',
};

/**
* @deprecated: drop in v5.0
* Default parameters for arrow component
*/
export const TUI_ARROW_OPTIONS = tuiCreateToken(TUI_ARROW_DEFAULT_OPTIONS);

/**
* @deprecated: drop in v5.0
*/
export function tuiArrowOptionsProvider(options: Partial<TuiArrowOptions>): Provider {
return tuiProvideOptions(TUI_ARROW_OPTIONS, options, TUI_ARROW_DEFAULT_OPTIONS);
}
10 changes: 10 additions & 0 deletions projects/legacy/components/arrow/arrow.providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,31 @@ import type {PolymorpheusContent} from '@taiga-ui/polymorpheus';

import {TUI_ARROW} from './arrow.component';

/**
* @deprecated: drop in v5.0
*/
export interface TuiArrowMode {
readonly disabled: PolymorpheusContent<TuiContext<TuiSizeL | TuiSizeM | TuiSizeS>>;
readonly interactive: PolymorpheusContent<TuiContext<TuiSizeL | TuiSizeM | TuiSizeS>>;
}

/**
* @deprecated: drop in v5.0
*/
export const TUI_ARROW_DEFAULT_MODE: TuiArrowMode = {
interactive: TUI_ARROW,
disabled: TUI_ARROW,
};

/**
* @deprecated: drop in v5.0
* Type of icon in dropdowns for interactive or disable mode
*/
export const TUI_ARROW_MODE = tuiCreateToken(TUI_ARROW_DEFAULT_MODE);

/**
* @deprecated: drop in v5.0
*/
export function tuiArrowModeProvider(options: Partial<TuiArrowMode>): Provider {
return tuiProvideOptions(TUI_ARROW_MODE, options, TUI_ARROW_DEFAULT_MODE);
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import {Directive, HostListener, inject, Input} from '@angular/core';

import {TuiComboBoxComponent} from './combo-box.component';

/**
* @deprecated: drop in v5.0
*/
@Directive({
selector: 'tui-combo-box[strict]',
})
Expand Down
3 changes: 3 additions & 0 deletions projects/legacy/components/combo-box/combo-box.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ import {tuiAsFocusableItemAccessor} from '@taiga-ui/legacy/tokens';
import {FIXED_DROPDOWN_CONTROLLER_PROVIDER} from '@taiga-ui/legacy/utils';
import type {PolymorpheusContent} from '@taiga-ui/polymorpheus';

/**
* @deprecated: drop in v5.0
*/
@Component({
selector: 'tui-combo-box',
templateUrl: './combo-box.template.html',
Expand Down
3 changes: 3 additions & 0 deletions projects/legacy/components/combo-box/combo-box.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import {tuiAsTextfieldHost} from '@taiga-ui/legacy/tokens';

import type {TuiComboBoxComponent} from './combo-box.component';

/**
* @deprecated: drop in v5.0
*/
@Directive({
selector: 'tui-combo-box',
providers: [tuiAsTextfieldHost(TuiComboBoxDirective)],
Expand Down
3 changes: 3 additions & 0 deletions projects/legacy/components/combo-box/combo-box.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import {TuiComboBoxComponent} from './combo-box.component';
import {TuiComboBoxDirective} from './combo-box.directive';
import {TuiComboBoxStrictDirective} from './combo-box-strict.directive';

/**
* @deprecated: drop in v5.0
*/
@NgModule({
imports: [
CommonModule,
Expand Down
3 changes: 3 additions & 0 deletions projects/legacy/components/input-copy/input-copy.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ import {BehaviorSubject, map, merge, of, switchMap, timer} from 'rxjs';
import type {TuiInputCopyOptions} from './input-copy.options';
import {TUI_INPUT_COPY_OPTIONS} from './input-copy.options';

/**
* @deprecated: drop in v5.0
*/
@Component({
selector: 'tui-input-copy',
templateUrl: './input-copy.template.html',
Expand Down
3 changes: 3 additions & 0 deletions projects/legacy/components/input-copy/input-copy.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import {tuiAsTextfieldHost} from '@taiga-ui/legacy/tokens';

import type {TuiInputCopyComponent} from './input-copy.component';

/**
* @deprecated: drop in v5.0
*/
@Directive({
selector: 'tui-input-copy',
providers: [tuiAsTextfieldHost(TuiInputCopyDirective)],
Expand Down
3 changes: 3 additions & 0 deletions projects/legacy/components/input-copy/input-copy.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import {PolymorpheusOutlet, PolymorpheusTemplate} from '@taiga-ui/polymorpheus';
import {TuiInputCopyComponent} from './input-copy.component';
import {TuiInputCopyDirective} from './input-copy.directive';

/**
* @deprecated: drop in v5.0
*/
@NgModule({
imports: [
CommonModule,
Expand Down
12 changes: 12 additions & 0 deletions projects/legacy/components/input-copy/input-copy.options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,34 @@ import type {TuiHintDirection} from '@taiga-ui/core/directives/hint';
import type {TuiSizeL, TuiSizeS} from '@taiga-ui/core/types';
import type {PolymorpheusContent} from '@taiga-ui/polymorpheus';

/**
* @deprecated: drop in v5.0
*/
export interface TuiInputCopyOptions {
readonly icon: PolymorpheusContent<TuiContext<TuiSizeL | TuiSizeS>>;
readonly messageAppearance: string;
readonly messageDirection: TuiHintDirection;
readonly successMessage: PolymorpheusContent;
}

/**
* @deprecated: drop in v5.0
*/
export const TUI_INPUT_COPY_DEFAULT_OPTIONS: TuiInputCopyOptions = {
successMessage: '',
messageDirection: 'bottom-left',
messageAppearance: '',
icon: () => '@tui.copy',
};

/**
* @deprecated: drop in v5.0
*/
export const TUI_INPUT_COPY_OPTIONS = tuiCreateToken(TUI_INPUT_COPY_DEFAULT_OPTIONS);

/**
* @deprecated: drop in v5.0
*/
export function tuiInputCopyOptionsProvider(
options: Partial<TuiInputCopyOptions>,
): Provider {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ import {tuiAsFocusableItemAccessor} from '@taiga-ui/legacy/tokens';
import type {Observable} from 'rxjs';
import {map} from 'rxjs';

/**
* @deprecated: drop in v5.0
*/
@Component({
selector: 'tui-input-date[multiple]',
templateUrl: './input-date-multi.template.html',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import {PolymorpheusOutlet, PolymorpheusTemplate} from '@taiga-ui/polymorpheus';

import {TuiInputDateMultiComponent} from './input-date-multi.component';

/**
* @deprecated: drop in v5.0
*/
@NgModule({
imports: [
CommonModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ import {TUI_DATE_MODE_MASKITO_ADAPTER} from '@taiga-ui/legacy/utils';
import type {PolymorpheusContent} from '@taiga-ui/polymorpheus';
import {map} from 'rxjs';

/**
* @deprecated: drop in v5.0
*/
@Component({
selector: 'tui-input-date-range',
templateUrl: './input-date-range.template.html',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import {tuiAsTextfieldHost} from '@taiga-ui/legacy/tokens';

import type {TuiInputDateRangeComponent} from './input-date-range.component';

/**
* @deprecated: drop in v5.0
*/
@Directive({
selector: 'tui-input-date-range',
providers: [tuiAsTextfieldHost(TuiInputDateRangeDirective)],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ import {PolymorpheusOutlet, PolymorpheusTemplate} from '@taiga-ui/polymorpheus';
import {TuiInputDateRangeComponent} from './input-date-range.component';
import {TuiInputDateRangeDirective} from './input-date-range.directive';

/**
* @deprecated: drop in v5.0
*/
@NgModule({
imports: [
CommonModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ import {BehaviorSubject, combineLatest, map, timer} from 'rxjs';

const DATE_TIME_SEPARATOR = ', ';

/**
* @deprecated: drop in v5.0
*/
@Component({
selector: 'tui-input-date-time',
templateUrl: './input-date-time.template.html',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import {tuiAsTextfieldHost} from '@taiga-ui/legacy/tokens';

import type {TuiInputDateTimeComponent} from './input-date-time.component';

/**
* @deprecated: drop in v5.0
*/
@Directive({
selector: 'tui-input-date-time',
providers: [tuiAsTextfieldHost(TuiInputDateTimeDirective)],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ import {TuiInputDateTimeComponent} from './input-date-time.component';
import {TuiInputDateTimeDirective} from './input-date-time.directive';
import {TuiNativeDateTimeDirective} from './native-date-time/native-date-time.directive';

/**
* @deprecated: drop in v5.0
*/
@NgModule({
imports: [
CommonModule,
Expand Down
3 changes: 3 additions & 0 deletions projects/legacy/components/input-date/input-date.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ import {TUI_DATE_MODE_MASKITO_ADAPTER} from '@taiga-ui/legacy/utils';
import type {Observable} from 'rxjs';
import {map} from 'rxjs';

/**
* @deprecated: drop in v5.0
*/
@Component({
selector: 'tui-input-date:not([multiple])',
templateUrl: './input-date.template.html',
Expand Down
3 changes: 3 additions & 0 deletions projects/legacy/components/input-date/input-date.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import {tuiAsTextfieldHost} from '@taiga-ui/legacy/tokens';

import type {TuiInputDateComponent} from './input-date.component';

/**
* @deprecated: drop in v5.0
*/
@Directive({
selector: 'tui-input-date:not([multiple])',
providers: [tuiAsTextfieldHost(TuiInputDateDirective)],
Expand Down
3 changes: 3 additions & 0 deletions projects/legacy/components/input-date/input-date.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ import {TuiInputDateComponent} from './input-date.component';
import {TuiInputDateDirective} from './input-date.directive';
import {TuiNativeDateDirective} from './native-date/native-date.component';

/**
* @deprecated: drop in v5.0
*/
@NgModule({
imports: [
CommonModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import {TUI_TEXTFIELD_HOST, tuiAsTextfieldHost} from '@taiga-ui/legacy/tokens';

import {TuiInputDateDirective} from '../input-date.directive';

/**
* @deprecated: drop in v5.0
*/
@Directive({
selector: 'input[tuiDate]',
providers: [tuiAsTextfieldHost(TuiInputDateDirective)],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ import {
tuiAsFocusableItemAccessor,
} from '@taiga-ui/legacy/tokens';

/**
* @deprecated: drop in v5.0
*/
@Component({
selector: 'tui-input-month-range',
templateUrl: './input-month-range.template.html',
Expand Down
Loading

0 comments on commit c64beba

Please sign in to comment.