Skip to content

Commit

Permalink
chore(deps): update taiga-ui (#7559)
Browse files Browse the repository at this point in the history
  • Loading branch information
taiga-family-bot authored Jun 3, 2024
1 parent 5b8ee8a commit 1c83424
Show file tree
Hide file tree
Showing 172 changed files with 1,014 additions and 1,054 deletions.
401 changes: 209 additions & 192 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@
"@taiga-ui/browserslist-config": "0.6.0",
"@taiga-ui/commitlint-config": "0.7.5",
"@taiga-ui/cspell-config": "0.40.0",
"@taiga-ui/eslint-plugin-experience": "0.74.10",
"@taiga-ui/prettier-config": "0.11.7",
"@taiga-ui/stylelint-config": "0.22.2",
"@taiga-ui/eslint-plugin-experience": "0.75.3",
"@taiga-ui/prettier-config": "0.11.9",
"@taiga-ui/stylelint-config": "0.22.3",
"@taiga-ui/tsconfig": "0.17.0",
"@tinkoff/ng-event-plugins": "3.2.0",
"@types/glob": "8.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ export class TuiArcChartComponent {
private readonly sanitizer = inject(DomSanitizer);
private readonly arcs$ = new ReplaySubject<QueryList<ElementRef<SVGElement>>>(1);

protected initialized = false;

@Input()
public value: readonly number[] = [];

Expand Down Expand Up @@ -90,8 +92,6 @@ export class TuiArcChartComponent {
}),
);

protected initialized = false;

constructor() {
timer(0)
.pipe(tuiWatch(inject(ChangeDetectorRef)), takeUntilDestroyed())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ export class TuiBarChartComponent {
private readonly hintOptions = inject(TuiHintOptionsDirective, {optional: true});
private readonly autoIdString = inject(TuiIdService).generate();

@ViewChildren(TuiHintHoverDirective)
protected readonly drivers: QueryList<Observable<boolean>> = EMPTY_QUERY;

@Input()
public value: ReadonlyArray<readonly number[]> = [];

Expand All @@ -45,9 +48,6 @@ export class TuiBarChartComponent {
@Input()
public collapsed = false;

@ViewChildren(TuiHintHoverDirective)
protected readonly drivers: QueryList<Observable<boolean>> = EMPTY_QUERY;

public get transposed(): ReadonlyArray<readonly number[]> {
return this.transpose(this.value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ export class TuiLineChartComponent {
private readonly hover$ = new Subject<number>();
private readonly autoIdString = inject(TuiIdService).generate();

protected readonly hintDirective = inject(TuiLineChartHintDirective, {
optional: true,
});

protected readonly hintOptions = inject(TuiHintOptionsDirective, {optional: true});

@ViewChildren(TuiHintHoverDirective)
public readonly drivers: QueryList<Observable<boolean>> = EMPTY_QUERY;

Expand Down Expand Up @@ -81,12 +87,6 @@ export class TuiLineChartComponent {

public value: readonly TuiPoint[] = [];

protected readonly hintDirective = inject(TuiLineChartHintDirective, {
optional: true,
});

protected readonly hintOptions = inject(TuiHintOptionsDirective, {optional: true});

@Input('value')
public set valueSetter(value: readonly TuiPoint[]) {
this.value = value.filter(item => !item.some(Number.isNaN));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,6 @@ export class TuiInputCardGroupedComponent
private readonly el = tuiInjectElement();
private expireInert = false;

@Input()
public exampleText = this.options.exampleText;

@Input()
public cardValidator = this.options.cardValidator;

@Output()
public readonly autofilledChange = new EventEmitter<boolean>();

public open = false;

@ContentChild(TuiDataListDirective, {read: TemplateRef})
protected readonly dropdown: PolymorpheusContent;

Expand Down Expand Up @@ -160,6 +149,17 @@ export class TuiInputCardGroupedComponent
protected readonly controller = inject(TUI_TEXTFIELD_WATCHED_CONTROLLER);
protected readonly icons = inject(TUI_COMMON_ICONS);

@Input()
public exampleText = this.options.exampleText;

@Input()
public cardValidator = this.options.cardValidator;

@Output()
public readonly autofilledChange = new EventEmitter<boolean>();

public open = false;

constructor() {
super(inject(TUI_INPUT_CARD_GROUPED_OPTIONS));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ export abstract class AbstractTuiInputCard<
extends AbstractTuiNullableControl<T>
implements TuiFocusableElementAccessor
{
protected paymentIcons: Record<TuiPaymentSystem, string> = inject(
TUI_PAYMENT_SYSTEM_ICONS,
);

@Input()
public cardSrc: PolymorpheusContent;

Expand All @@ -24,10 +28,6 @@ export abstract class AbstractTuiInputCard<
@Output()
public readonly binChange = new EventEmitter<string | null>();

protected paymentIcons: Record<TuiPaymentSystem, string> = inject(
TUI_PAYMENT_SYSTEM_ICONS,
);

protected constructor(protected readonly options: Options) {
super();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ export class TuiInputExpireComponent

private readonly textfieldSize = inject(TUI_TEXTFIELD_SIZE);

@Input()
public autocompleteEnabled = false;

protected readonly maskOptions = maskitoDateOptionsGenerator({
mode: 'mm/yy',
separator: '/',
});

@Input()
public autocompleteEnabled = false;

public get nativeFocusableElement(): HTMLInputElement | null {
return this.input?.nativeFocusableElement ?? null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ import {TUI_ICON_RESOLVER, TuiIconComponent} from '@taiga-ui/core';
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class TuiThumbnailCardComponent {
protected readonly paymentIcons = inject(TUI_PAYMENT_SYSTEM_ICONS);
protected readonly resolver = inject<TuiStringHandler<string>>(TUI_ICON_RESOLVER);

@Input()
@HostBinding('attr.data-size')
public size: TuiSizeL | TuiSizeS = 'm';
Expand All @@ -34,9 +37,6 @@ export class TuiThumbnailCardComponent {
@Input()
public iconRight = '';

protected readonly paymentIcons = inject(TUI_PAYMENT_SYSTEM_ICONS);
protected readonly resolver = inject<TuiStringHandler<string>>(TUI_ICON_RESOLVER);

// TODO: Revisit this approach in 4.0 when icons are moved away from InputCard options
protected get isMono(): boolean {
switch (this.paymentSystem) {
Expand Down
6 changes: 3 additions & 3 deletions projects/addon-doc/components/code/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ import {BehaviorSubject, map, startWith, Subject, switchMap, timer} from 'rxjs';
export class TuiDocCodeComponent {
private readonly rawLoader$$ = new BehaviorSubject<TuiRawLoaderContent>('');

@Input()
public filename = '';

protected readonly markdownCodeProcessor = inject<TuiHandler<string, string[]>>(
TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR,
);
Expand All @@ -49,6 +46,9 @@ export class TuiDocCodeComponent {
map((value: string): string[] => this.markdownCodeProcessor(value)),
);

@Input()
public filename = '';

@Input()
public set code(code: TuiRawLoaderContent) {
this.rawLoader$$.next(code);
Expand Down
14 changes: 7 additions & 7 deletions projects/addon-doc/components/demo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,6 @@ export class TuiDocDemoComponent implements OnInit {
private readonly urlSerializer = inject(UrlSerializer);
private readonly urlStateHandler = inject(TUI_DOC_URL_STATE_HANDLER);

@Input()
public control: AbstractControl | null = null;

@Input()
@HostBinding('class._sticky')
public sticky = true;

@ContentChild(TemplateRef)
protected readonly template: TemplateRef<Record<string, unknown>> | null = null;

Expand All @@ -105,6 +98,13 @@ export class TuiDocDemoComponent implements OnInit {
protected sandboxWidth = tuiToInteger(this.params.sandboxWidth);
protected readonly texts = inject(TUI_DOC_DEMO_TEXTS);

@Input()
public control: AbstractControl | null = null;

@Input()
@HostBinding('class._sticky')
public sticky = true;

public ngOnInit(): void {
this.createForm();
this.updateWidth(this.sandboxWidth + this.delta);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,6 @@ export class TuiDocDocumentationComponent implements AfterContentInit {
private readonly getColor = inject(TuiGetColorPipe);
private readonly getOpacity = inject(TuiGetOpacityPipe);

@Input()
public heading = '';

@Input()
public showValues = true;

@Input()
public isAPI = false;

@ContentChildren(TuiDocDocumentationPropertyConnectorDirective)
protected propertiesConnectors: QueryList<
TuiDocDocumentationPropertyConnectorDirective<any>
Expand All @@ -125,6 +116,15 @@ export class TuiDocDocumentationComponent implements AfterContentInit {
protected readonly excludedProperties = inject(TUI_DOC_EXCLUDED_PROPERTIES);
protected activeItemIndex = 0;

@Input()
public heading = '';

@Input()
public showValues = true;

@Input()
public isAPI = false;

public ngAfterContentInit(): void {
tuiQueryListChanges(this.propertiesConnectors)
.pipe(
Expand Down
38 changes: 17 additions & 21 deletions projects/addon-doc/components/example/example.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,6 @@ export class TuiDocExampleComponent {
1,
);

@Input()
@HostBinding('attr.id')
public id: string | null = null;

@Input()
public heading: PolymorpheusContent;

@Input()
public description: PolymorpheusContent;

@Input()
@HostBinding('class._fullsize')
public fullsize = inject(TUI_DOC_EXAMPLE_OPTIONS).fullsize;

@Input()
public componentName: string = this.location.pathname.slice(1);

protected readonly options = inject(TUI_DOC_EXAMPLE_OPTIONS);
protected readonly texts = inject(TUI_DOC_EXAMPLE_TEXTS);
protected readonly codeEditor = inject(TUI_DOC_CODE_EDITOR, {optional: true});
Expand All @@ -91,12 +74,10 @@ export class TuiDocExampleComponent {
);

protected readonly defaultTabIndex = 0;

protected readonly defaultTab = this.texts[this.defaultTabIndex];

protected activeItemIndex = this.defaultTabIndex;

protected readonly copy$ = this.copyTexts$.pipe(map(([copy]) => copy));
protected readonly loading$ = new Subject<boolean>();

protected readonly processor$: Observable<Record<string, string>> =
this.rawLoader$$.pipe(
Expand All @@ -109,7 +90,22 @@ export class TuiDocExampleComponent {
map(module => new PolymorpheusComponent(module.default)),
);

protected readonly loading$ = new Subject<boolean>();
@Input()
@HostBinding('attr.id')
public id: string | null = null;

@Input()
public heading: PolymorpheusContent;

@Input()
public description: PolymorpheusContent;

@Input()
@HostBinding('class._fullsize')
public fullsize = inject(TUI_DOC_EXAMPLE_OPTIONS).fullsize;

@Input()
public componentName: string = this.location.pathname.slice(1);

@Input()
public set content(content: TuiDocExample) {
Expand Down
3 changes: 1 addition & 2 deletions projects/addon-doc/components/internal/see-also/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ import {TuiLinkDirective} from '@taiga-ui/core';
})
export class TuiDocSeeAlsoComponent {
private readonly pages = inject(TUI_DOC_MAP_PAGES);
protected readonly text = inject(TUI_DOC_SEE_ALSO_TEXT);

@Input()
public seeAlso: readonly string[] = [];

protected readonly text = inject(TUI_DOC_SEE_ALSO_TEXT);

protected getRouterLink(pageTitle: string): string {
return this.pages.get(pageTitle)?.route ?? '';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ import {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class TuiDocSourceCodeComponent {
protected readonly icons = inject(TUI_DOC_ICONS);
protected readonly sourceCode = inject(TUI_DOC_SOURCE_CODE);
protected readonly text = inject(TUI_DOC_SOURCE_CODE_TEXT);

@Input()
public header = '';

Expand All @@ -29,10 +33,6 @@ export class TuiDocSourceCodeComponent {
@Input()
public path = '';

protected readonly icons = inject(TUI_DOC_ICONS);
protected readonly sourceCode = inject(TUI_DOC_SOURCE_CODE);
protected readonly text = inject(TUI_DOC_SOURCE_CODE_TEXT);

protected get pathOptions(): TuiDocSourceCodePathOptions {
return this.getPathOptions(this.header, this.package, this.type, this.path);
}
Expand Down
9 changes: 4 additions & 5 deletions projects/addon-doc/components/language-switcher/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ import {TuiSelectModule} from '@taiga-ui/legacy';
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class TuiLanguageSwitcherComponent {
protected readonly switcher = inject(TuiLanguageSwitcher);
protected readonly language = new FormControl(capitalize(this.switcher.language));

public readonly flags = new Map<TuiLanguageName, TuiCountryIsoCode>([
['belarusian', 'BY'],
['chinese', 'CN'],
Expand All @@ -41,11 +44,7 @@ export class TuiLanguageSwitcherComponent {
['vietnamese', 'VN'],
]);

protected readonly switcher = inject(TuiLanguageSwitcher);

protected readonly language = new FormControl(capitalize(this.switcher.language));

protected readonly names: TuiLanguageName[] = Array.from(this.flags.keys());
public readonly names: TuiLanguageName[] = Array.from(this.flags.keys());
}

function capitalize(value: string): string {
Expand Down
9 changes: 4 additions & 5 deletions projects/addon-doc/components/page/page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ import {TuiDocPageTabConnectorDirective} from './page-tab.directive';
providers: PAGE_PROVIDERS,
})
export class TuiDocPageComponent {
protected readonly defaultTabs = inject(TUI_DOC_DEFAULT_TABS);
protected readonly from = / /g;
protected readonly to = '_';

@Input()
public header = '';

Expand All @@ -64,11 +68,6 @@ export class TuiDocPageComponent {
public activeItemIndex = 0;
public readonly seeAlso = inject(PAGE_SEE_ALSO);

protected readonly from = / /g;
protected readonly to = '_';

protected readonly defaultTabs = inject(TUI_DOC_DEFAULT_TABS);

public get showSeeAlso(): boolean {
return !!this.seeAlso.length && this.activeItemIndex === 0;
}
Expand Down
Loading

0 comments on commit 1c83424

Please sign in to comment.