From 071eff95bdfbaf2ad6cdfeb05edeb1b90e501fd9 Mon Sep 17 00:00:00 2001 From: Maksim Ivanov Date: Thu, 22 Aug 2024 14:46:03 +0300 Subject: [PATCH] refactor(core): support noUncheckedIndexedAccess (#8622) --- .../core/components/calendar/calendar-sheet.template.html | 6 +++--- .../core/components/notification/notification.options.ts | 2 +- projects/core/components/textfield/textfield.component.ts | 4 ++++ projects/core/components/textfield/textfield.template.html | 2 +- projects/core/pipes/month/month.pipe.ts | 2 +- projects/core/services/breakpoint.service.ts | 2 +- projects/core/utils/format/number-to-string-without-exp.ts | 2 +- 7 files changed, 12 insertions(+), 8 deletions(-) diff --git a/projects/core/components/calendar/calendar-sheet.template.html b/projects/core/components/calendar/calendar-sheet.template.html index 4480ed290f6d..5bbbe0c1f610 100644 --- a/projects/core/components/calendar/calendar-sheet.template.html +++ b/projects/core/components/calendar/calendar-sheet.template.html @@ -11,10 +11,10 @@ automation-id="tui-calendar-sheet__row" class="t-row" > - - + +
= { /** Default values for the notification options. */ export const TUI_NOTIFICATION_DEFAULT_OPTIONS: TuiNotificationOptions = { appearance: 'info', - icon: (appearance) => ICONS[appearance], + icon: (appearance) => ICONS[appearance] ?? '', size: 'l', }; diff --git a/projects/core/components/textfield/textfield.component.ts b/projects/core/components/textfield/textfield.component.ts index 1979956f3f33..3630d7a010d6 100644 --- a/projects/core/components/textfield/textfield.component.ts +++ b/projects/core/components/textfield/textfield.component.ts @@ -125,4 +125,8 @@ export class TuiTextfieldComponent implements TuiDataListHost { protected get hasLabel(): boolean { return Boolean(this.label?.nativeElement?.childNodes.length); } + + protected onResize(entry: readonly ResizeObserverEntry[]): void { + this.side = entry[0]?.contentRect?.width || 0; + } } diff --git a/projects/core/components/textfield/textfield.template.html b/projects/core/components/textfield/textfield.template.html index 0e1b03adc834..8224652242b0 100644 --- a/projects/core/components/textfield/textfield.template.html +++ b/projects/core/components/textfield/textfield.template.html @@ -3,7 +3,7 @@