Skip to content

Commit

Permalink
chore: migrate rxjs (#6223)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimirpotekhin authored Dec 14, 2023
1 parent 3bc2a0c commit 80bd43b
Show file tree
Hide file tree
Showing 283 changed files with 710 additions and 561 deletions.
5 changes: 4 additions & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ const config: Config = {
/**
* A map from regular expressions to paths to transformers.
*/
transform: {'^.+\\.(ts|js|mjs|html|svg)$': `jest-preset-angular`},
transform: {
'^.+\\.(ts|js|mjs|html|svg)$': `jest-preset-angular`,
},
transformIgnorePatterns: [`node_modules/(?!@angular|rxjs|ngx-highlightjs)`],

/**
* The glob patterns Jest uses to detect test files.
Expand Down
132 changes: 116 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"@angular/router": "15.2.10",
"core-js": "2.6.12",
"parse5": "6.0.1",
"rxjs": "6.6.7",
"rxjs": "7.5.0",
"zone.js": "0.12.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ import {
import {DomSanitizer, SafeValue} from '@angular/platform-browser';
import {tuiTypedFromEvent} from '@taiga-ui/cdk';
import {TuiSizeXL} from '@taiga-ui/core';
import {merge, Observable, ReplaySubject} from 'rxjs';
import {map, startWith, switchMap, tap} from 'rxjs/operators';

import {map, merge, Observable, ReplaySubject, startWith, switchMap, tap} from 'rxjs';
// 3/4 with 1% safety offset
const ARC = 0.76;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ import {
} from '@taiga-ui/cdk';
import {TuiPoint} from '@taiga-ui/core';
import {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';
import {combineLatest, Observable} from 'rxjs';
import {
combineLatest,
distinctUntilChanged,
filter,
map,
Observable,
startWith,
switchMap,
takeUntil,
} from 'rxjs/operators';
} from 'rxjs';

import {TuiLineChartComponent} from './line-chart.component';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ import {
TuiPoint,
} from '@taiga-ui/core';
import {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';
import {Observable, Subject} from 'rxjs';
import {distinctUntilChanged} from 'rxjs/operators';
import {distinctUntilChanged, Observable, Subject} from 'rxjs';

import {TUI_LINE_CHART_OPTIONS, TuiLineChartOptions} from './line-chart.options';
import {TuiLineChartHintDirective} from './line-chart-hint.directive';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ import {
} from '@taiga-ui/cdk';
import {TuiPoint} from '@taiga-ui/core';
import {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';
import {combineLatest, Observable} from 'rxjs';
import {filter, takeUntil} from 'rxjs/operators';
import {combineLatest, filter, Observable, takeUntil} from 'rxjs';

import {TuiLineDaysChartComponent} from './line-days-chart.component';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ import {
} from '@taiga-ui/cdk';
import {TuiPoint} from '@taiga-ui/core';
import {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';
import {combineLatest, Observable} from 'rxjs';
import {filter, takeUntil} from 'rxjs/operators';
import {combineLatest, filter, Observable, takeUntil} from 'rxjs';

import {TuiLineDaysChartHintDirective} from './line-days-chart-hint.directive';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@ import {ANIMATION_FRAME, PERFORMANCE} from '@ng-web-apis/common';
import {tuiDescribeSector} from '@taiga-ui/addon-charts/utils';
import {tuiClamp, TuiDestroyService, tuiEaseInOutQuad, tuiZonefree} from '@taiga-ui/cdk';
import {TUI_ANIMATIONS_DURATION} from '@taiga-ui/core';
import {BehaviorSubject, Observable} from 'rxjs';
import {map, pairwise, switchMap, takeUntil, takeWhile} from 'rxjs/operators';
import {
BehaviorSubject,
map,
Observable,
pairwise,
switchMap,
takeUntil,
takeWhile,
} from 'rxjs';

@Directive({
selector: 'path[tuiPieChart]',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import {
} from '@taiga-ui/addon-commerce/tokens';
import {tuiCreateTokenFromFactory, tuiTypedFromEvent} from '@taiga-ui/cdk';
import {TUI_MEDIA} from '@taiga-ui/core';
import {combineLatest, Observable, of} from 'rxjs';
import {map, startWith, switchMap} from 'rxjs/operators';
import {combineLatest, map, Observable, of, startWith, switchMap} from 'rxjs';

export interface TuiCardGroupedTexts {
readonly cardNumberText: string;
Expand Down
3 changes: 1 addition & 2 deletions projects/addon-doc/components/code/code.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import {TuiRawLoaderContent} from '@taiga-ui/addon-doc/interfaces';
import {TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR} from '@taiga-ui/addon-doc/tokens';
import {tuiRawLoad} from '@taiga-ui/addon-doc/utils';
import {TuiHandler} from '@taiga-ui/cdk';
import {BehaviorSubject, Subject, timer} from 'rxjs';
import {map, startWith, switchMap} from 'rxjs/operators';
import {BehaviorSubject, map, startWith, Subject, switchMap, timer} from 'rxjs';

@Component({
selector: 'tui-doc-code',
Expand Down
3 changes: 1 addition & 2 deletions projects/addon-doc/components/copy/copy.component.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import {ChangeDetectionStrategy, Component, Inject} from '@angular/core';
import {ALWAYS_FALSE_HANDLER, TuiDestroyService, tuiPure} from '@taiga-ui/cdk';
import {TUI_COPY_TEXTS} from '@taiga-ui/kit';
import {Observable, Subject, timer} from 'rxjs';
import {map, startWith, switchMap} from 'rxjs/operators';
import {map, Observable, startWith, Subject, switchMap, timer} from 'rxjs';

const COPIED_TIMEOUT = 1500;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ import {
TuiTypedMatcher,
tuiWatch,
} from '@taiga-ui/cdk';
import {merge} from 'rxjs';
import {switchMap, takeUntil} from 'rxjs/operators';
import {merge, switchMap, takeUntil} from 'rxjs';

import {TuiDocDocumentationPropertyConnectorDirective} from './documentation-property-connector.directive';
import {TuiGetColorPipe} from './pipes/color.pipe';
Expand Down
3 changes: 1 addition & 2 deletions projects/addon-doc/components/example/example.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ import {TUI_IS_E2E, TuiContextWithImplicit, TuiHandler} from '@taiga-ui/cdk';
import {TuiAlertService} from '@taiga-ui/core';
import {TUI_COPY_TEXTS} from '@taiga-ui/kit';
import {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';
import {BehaviorSubject, Observable, Subject} from 'rxjs';
import {map, switchMap} from 'rxjs/operators';
import {BehaviorSubject, map, Observable, Subject, switchMap} from 'rxjs';

import {TUI_DOC_EXAMPLE_OPTIONS, TuiDocExampleOptions} from './example.options';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import {
} from '@taiga-ui/addon-doc/tokens';
import {ALWAYS_FALSE_HANDLER, TuiSwipeService} from '@taiga-ui/cdk';
import {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';
import {merge, Subject} from 'rxjs';
import {distinctUntilChanged, filter, map, startWith} from 'rxjs/operators';
import {distinctUntilChanged, filter, map, merge, startWith, Subject} from 'rxjs';

@Component({
selector: 'header[tuiDocHeader]',
Expand Down
2 changes: 1 addition & 1 deletion projects/addon-doc/components/main/main.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {TuiThemeNightService, TuiThemeService} from '@taiga-ui/addon-doc/service
import {TUI_DOC_ICONS, TuiDocIcons} from '@taiga-ui/addon-doc/tokens';
import {TuiSwipeService} from '@taiga-ui/cdk';
import {TuiBrightness, TuiModeDirective} from '@taiga-ui/core';
import {distinctUntilChanged, map, share, startWith} from 'rxjs/operators';
import {distinctUntilChanged, map, share, startWith} from 'rxjs';

@Component({
selector: 'tui-doc-main',
Expand Down
12 changes: 10 additions & 2 deletions projects/addon-doc/components/navigation/navigation.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,16 @@ import {
TuiModeDirective,
} from '@taiga-ui/core';
import {TuiInputComponent} from '@taiga-ui/kit';
import {combineLatest, Observable} from 'rxjs';
import {filter, map, startWith, switchMap, take, takeUntil} from 'rxjs/operators';
import {
combineLatest,
filter,
map,
Observable,
startWith,
switchMap,
take,
takeUntil,
} from 'rxjs';

import {
NAVIGATION_ITEMS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import {ActivatedRoute, NavigationEnd, Router} from '@angular/router';
import {TUI_DOC_PAGES, TUI_DOC_TITLE} from '@taiga-ui/addon-doc/tokens';
import {TuiDocPages} from '@taiga-ui/addon-doc/types';
import {TuiDestroyService, tuiIsPresent} from '@taiga-ui/cdk';
import {Observable} from 'rxjs';
import {filter, map, mergeMap, takeUntil} from 'rxjs/operators';
import {filter, map, mergeMap, Observable, takeUntil} from 'rxjs';

function labelsProviderFactory(pages: TuiDocPages): readonly string[] {
return pages
Expand Down
Loading

0 comments on commit 80bd43b

Please sign in to comment.