feat(platform): sprint 11.5 standardization
Some checks failed
Architecture Governance / architecture (push) Has been cancelled

This commit is contained in:
sdarbinyan
2026-07-09 02:29:12 +04:00
parent a16c856537
commit 8d652c8259
57 changed files with 2162 additions and 848 deletions

View File

@@ -1,6 +1,7 @@
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { ChangeDetectionStrategy, Component, Input, inject } from '@angular/core';
import { SectionConfig } from '../../shared/models/config';
import { RecentlyViewedStripComponent } from '../../features/website/user-experience/components/recently-viewed-strip/recently-viewed-strip.component';
import { TranslateService } from '../../i18n/translate.service';
@Component({
selector: 'app-recently-viewed-widget',
@@ -16,12 +17,14 @@ import { RecentlyViewedStripComponent } from '../../features/website/user-experi
changeDetection: ChangeDetectionStrategy.OnPush
})
export class RecentlyViewedWidgetComponent {
private readonly translate = inject(TranslateService);
@Input() section: SectionConfig | null = null;
@Input() data: { settings?: Record<string, unknown> } | null = null;
get title(): string {
const raw = this.data?.settings?.['title'];
return typeof raw === 'string' && raw.trim().length > 0 ? raw : 'Recently Viewed';
return typeof raw === 'string' && raw.trim().length > 0 ? raw : this.translate.t('ux.recentlyViewedTitle');
}
get maxItems(): number {

View File

@@ -1,11 +1,13 @@
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { TranslatePipe } from '../../i18n/translate.pipe';
@Component({
selector: 'app-unknown-widget',
standalone: true,
imports: [TranslatePipe],
template: `
<section class="unknown-widget" role="status" aria-live="polite">
<strong>Widget unavailable</strong>
<strong>{{ 'widgets.unavailable' | translate }}</strong>
<p>{{ widgetType }}@{{ widgetVersion }}</p>
</section>
`,