Skip to content

Commit

Permalink
refactor!: remove deprecated properties from AbstractTuiInteractive (
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimirpotekhin authored and splincode committed Aug 30, 2022
1 parent 6f57462 commit 7b814e7
Show file tree
Hide file tree
Showing 145 changed files with 358 additions and 725 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
size="s"
appearance="whiteblock"
class="t-button"
[pseudoHovered]="active || null"
[pseudoHover]="active || null"
>
<div class="t-wrapper">
<ng-content select="tui-primitive-checkbox"></ng-content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,6 @@ export class TuiInputCardGroupedComponent
this.open = active && this.open;
}

onHovered(hovered: boolean): void {
this.updateHovered(hovered);
}

onMouseDown(event: MouseEvent): void {
tuiAssertIsElement(event.target);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {TuiFormatCardModule} from '@taiga-ui/addon-commerce/pipes';
import {
TuiActiveZoneModule,
TuiFocusableModule,
TuiHoveredModule,
TuiInputModeModule,
TuiLetModule,
TuiMapperPipeModule,
Expand All @@ -25,7 +24,6 @@ import {TuiInputCardGroupedComponent} from './input-card-grouped.component';
TuiFocusableModule,
TuiSvgModule,
TuiWrapperModule,
TuiHoveredModule,
TuiActiveZoneModule,
TuiInputModeModule,
TuiMapperPipeModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
[appearance]="appearance"
[readOnly]="readOnly"
[disabled]="computedDisabled"
[focused]="computedFocused"
[hover]="computedHovered"
[focus]="computedFocused"
[hover]="pseudoHover"
[invalid]="computedInvalid"
[tuiDropdown]="open"
[tuiDropdownContent]="dropdown || ''"
(tuiHoveredChange)="onHovered($event)"
(tuiActiveZoneChange)="onActiveZoneChange($event)"
(scroll)="onScroll($event)"
(mousedown)="onMouseDown($event)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,6 @@ export class TuiInputCardComponent
this.updateFocused(focused);
}

onHovered(hovered: boolean): void {
this.updateHovered(hovered);
}

writeValue(value: string | null): void {
const currentBin = this.bin;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@
[focusable]="focusable"
[nativeId]="nativeId"
[invalid]="computedInvalid"
[pseudoHovered]="pseudoHovered"
[pseudoPressed]="pseudoPressed"
[pseudoFocused]="pseudoFocused"
[pseudoHover]="pseudoHover"
[pseudoActive]="pseudoActive"
[pseudoFocus]="pseudoFocus"
[textMask]="textMaskOptions"
[value]="formattedCard"
(valueChange)="onValueChange($event)"
(focusedChange)="onFocused($event)"
(hoveredChange)="onHovered($event)"
>
<ng-content></ng-content>
</tui-primitive-textfield>
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@ export class TuiInputCVCComponent
this.updateFocused(focused);
}

onHovered(hovered: boolean): void {
this.updateHovered(hovered);
}

onCopy(): void {}

onValueChange(value: string): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@
[textMask]="textMaskOptions"
[invalid]="computedInvalid"
[focusable]="focusable"
[pseudoHovered]="pseudoHovered"
[pseudoPressed]="pseudoPressed"
[pseudoFocused]="pseudoFocused"
[pseudoHover]="pseudoHover"
[pseudoActive]="pseudoActive"
[pseudoFocus]="pseudoFocus"
[value]="value"
(valueChange)="onValueChange($event)"
(focusedChange)="onFocused($event)"
(hoveredChange)="onHovered($event)"
(copy.prevent)="onCopy()"
>
<ng-content></ng-content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@ export class TuiInputExpireComponent
this.updateFocused(focused);
}

onHovered(hovered: boolean): void {
this.updateHovered(hovered);
}

protected getFallbackValue(): string {
return ``;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@
[disabled]="disabled"
[readOnly]="readOnly"
[invalid]="computedInvalid"
[pseudoHovered]="pseudoHovered"
[pseudoPressed]="pseudoPressed"
[pseudoFocused]="pseudoFocused"
[pseudoHover]="pseudoHover"
[pseudoActive]="pseudoActive"
[pseudoFocus]="pseudoFocus"
[textMask]="textMaskOptions"
[value]="value"
(valueChange)="onValueChange($event)"
(focusedChange)="onFocused($event)"
(hoveredChange)="onHovered($event)"
>
<ng-content></ng-content>
</tui-primitive-textfield>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<tui-primitive-textfield
tuiTextfieldSize="m"
tuiTextfieldIconLeft="tuiIconSearch"
[pseudoFocused]="open || null"
[pseudoFocus]="open || null"
[tuiTextfieldCleaner]="true"
[tuiTextfieldLabelOutside]="true"
[value]="search"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
class="t-outline"
[readOnly]="readOnly"
[disabled]="disabled"
[focused]="computedFocused"
[hover]="computedHovered"
[focus]="computedFocused"
[hover]="pseudoHover"
[invalid]="computedInvalid"
>
<div
*tuiLet="editorLoaded$ | async as editorLoaded"
class="t-wrapper"
[class.t-wrapper_disabled]="disabled"
(tuiHoveredChange)="onHovered($event)"
(tuiActiveZoneChange)="onActiveZone($event)"
>
<div class="t-toolbar-wrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@ export class TuiEditorNewComponent
);
}

onHovered(hovered: boolean): void {
this.updateHovered(hovered);
}

selectLinkIfClosest(): void {
if (this.getMarkedLinkBeforeSelectClosest()) {
this.editor?.selectClosest();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ import {NgModule} from '@angular/core';
import {TuiEditLinkModule} from '@taiga-ui/addon-editor/components/edit-link';
import {TuiToolbarNewModule} from '@taiga-ui/addon-editor/components/toolbar-new';
import {TuiTiptapEditorModule} from '@taiga-ui/addon-editor/directives';
import {
TuiActiveZoneModule,
TuiHoveredModule,
TuiItemDirective,
TuiLetModule,
} from '@taiga-ui/cdk';
import {TuiActiveZoneModule, TuiItemDirective, TuiLetModule} from '@taiga-ui/cdk';
import {TuiScrollbarModule, TuiWrapperModule} from '@taiga-ui/core';
import {TuiDropdownSelectionModule} from '@taiga-ui/kit';

Expand All @@ -26,7 +21,6 @@ import {TuiEditorPortalHostComponent} from './portal/editor-portal-host.componen
CommonModule,
TuiToolbarNewModule,
TuiWrapperModule,
TuiHoveredModule,
TuiScrollbarModule,
TuiEditLinkModule,
TuiActiveZoneModule,
Expand Down
4 changes: 0 additions & 4 deletions projects/addon-editor/components/editor/editor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,6 @@ export class TuiEditorComponent extends AbstractTuiControl<string> implements On
this.updateValue(value.trim() === '<br>' ? '' : value);
}

onHovered(hovered: boolean): void {
this.updateHovered(hovered);
}

onFocusedChange(focused: boolean): void {
this.updateFocused(focused);
this.linkDropdownEnabled = focused || this.linkDropdownEnabled;
Expand Down
8 changes: 1 addition & 7 deletions projects/addon-editor/components/editor/editor.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ import {
import {TuiToolbarModule} from '@taiga-ui/addon-editor/components/toolbar';
import {TuiToolbarNewModule} from '@taiga-ui/addon-editor/components/toolbar-new';
import {TuiDesignModeModule} from '@taiga-ui/addon-editor/directives/design-mode';
import {
TuiActiveZoneModule,
TuiHoveredModule,
TuiItemDirective,
TuiLetModule,
} from '@taiga-ui/cdk';
import {TuiActiveZoneModule, TuiItemDirective, TuiLetModule} from '@taiga-ui/cdk';
import {
TuiButtonModule,
TuiLinkModule,
Expand All @@ -30,7 +25,6 @@ import {TuiEditorComponent} from './editor.component';
CommonModule,
FormsModule,
TuiLetModule,
TuiHoveredModule,
TuiActiveZoneModule,
TuiWrapperModule,
TuiScrollbarModule,
Expand Down
5 changes: 2 additions & 3 deletions projects/addon-editor/components/editor/editor.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
class="t-outline"
[readOnly]="readOnly"
[disabled]="disabled"
[focused]="computedFocused"
[hover]="computedHovered"
[focus]="computedFocused"
[hover]="pseudoHover"
[invalid]="computedInvalid"
></div>
<div
class="t-wrapper"
(tuiHoveredChange)="onHovered($event)"
(mousedown)="onMouseDown($event)"
>
<div class="t-toolbar-wrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,6 @@ export class TuiInputColorComponent
this.updateFocused(focused);
}

onHovered(hovered: boolean): void {
this.updateHovered(hovered);
}

onPressed(pressed: boolean): void {
this.updatePressed(pressed);
}

protected getFallbackValue(): string {
return `#000000`;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
tuiTextfieldAutocomplete="off"
class="t-textfield"
[tuiTextfieldIconLeft]="color"
[pseudoFocused]="computedFocused"
[pseudoHovered]="pseudoHovered"
[pseudoPressed]="pseudoPressed"
[pseudoFocus]="computedFocused"
[pseudoHover]="pseudoHover"
[pseudoActive]="pseudoActive"
[invalid]="computedInvalid"
[focusable]="focusable"
[nativeId]="nativeId"
Expand All @@ -18,8 +18,6 @@
[value]="value"
(valueChange)="onValueChange($event)"
(focusedChange)="onFocused($event)"
(hoveredChange)="onHovered($event)"
(pressedChange)="onPressed($event)"
>
<ng-content></ng-content>
</tui-primitive-textfield>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
[tuiHint]="texts.quote"
[tuiHintId]="quoteBtn.id"
[tuiDescribedBy]="quoteBtn.id"
[pseudoPressed]="blockquote"
[pseudoActive]="blockquote"
[disabled]="unorderedList || orderedList"
[focusable]="false"
(click)="toggleQuote()"
Expand All @@ -128,7 +128,7 @@
[tuiHint]="texts.link"
[tuiHintId]="linkBtn.id"
[tuiDescribedBy]="linkBtn.id"
[pseudoPressed]="link.open || a"
[pseudoActive]="link.open || a"
[focusable]="link.open"
></button>
<ng-template #linkDropdown>
Expand Down Expand Up @@ -177,7 +177,7 @@
[tuiHint]="texts.subscript"
[tuiHintId]="subBtn.id"
[tuiDescribedBy]="subBtn.id"
[pseudoPressed]="subscript"
[pseudoActive]="subscript"
[focusable]="false"
(click)="toggleSubscript()"
></button>
Expand All @@ -196,7 +196,7 @@
[tuiHint]="texts.superscript"
[tuiHintId]="supBtn.id"
[tuiDescribedBy]="supBtn.id"
[pseudoPressed]="superscript"
[pseudoActive]="superscript"
[focusable]="false"
(click)="toggleSuperscript()"
></button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
[tuiHint]="texts.justify"
[tuiHintId]="alignBtn.id"
[tuiDescribedBy]="alignBtn.id"
[pseudoPressed]="align.open"
[pseudoActive]="align.open"
[focusable]="align.open"
></button>
<ng-template #alignDropdown>
Expand All @@ -28,7 +28,7 @@
icon="tuiIconAlignLeftLarge"
appearance="icon"
class="t-option t-option_margin"
[pseudoPressed]="alignState.left"
[pseudoActive]="alignState.left"
[tuiHint]="texts.justifyLeft"
(click)="editor.onAlign('left')"
></button>
Expand All @@ -39,7 +39,7 @@
icon="tuiIconAlignCenterLarge"
appearance="icon"
class="t-option t-option_margin"
[pseudoPressed]="alignState.center"
[pseudoActive]="alignState.center"
[tuiHint]="texts.justifyCenter"
(click)="editor.onAlign('center')"
></button>
Expand All @@ -50,7 +50,7 @@
icon="tuiIconAlignRightLarge"
appearance="icon"
class="t-option t-option_margin"
[pseudoPressed]="alignState.right"
[pseudoActive]="alignState.right"
[tuiHint]="texts.justifyRight"
(click)="editor.onAlign('right')"
></button>
Expand All @@ -61,7 +61,7 @@
icon="tuiIconAlignJustifyLarge"
appearance="icon"
class="t-option t-option_margin"
[pseudoPressed]="alignState.justify"
[pseudoActive]="alignState.justify"
[tuiHint]="texts.justifyFull"
(click)="editor.onAlign('justify')"
></button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[tuiHint]="hintText$ | async"
[tuiHintId]="codeBtn.id"
[tuiDescribedBy]="codeBtn.id"
[pseudoPressed]="codes.open || (insideCode$ | async)"
[pseudoActive]="codes.open || (insideCode$ | async)"
[focusable]="codes.open"
></button>
<ng-template #codesDropdown>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[tuiHint]="fontText$ | async"
[tuiHintId]="fontsBtn.id"
[tuiDescribedBy]="fontsBtn.id"
[pseudoPressed]="fonts.open"
[pseudoActive]="fonts.open"
[focusable]="fonts.open"
></button>
<ng-template #fontsDropdown>
Expand Down
Loading

0 comments on commit 7b814e7

Please sign in to comment.