From 21b48f746e2330510a8534bd08ef8d73ca7f020f Mon Sep 17 00:00:00 2001 From: splincode Date: Mon, 26 Feb 2024 10:47:29 +0300 Subject: [PATCH 1/4] feat(addon-doc): support target property for links --- .../addon-doc/components/navigation/navigation.template.html | 3 +++ projects/addon-doc/interfaces/page.ts | 1 + projects/demo/src/modules/app/pages.ts | 2 ++ 3 files changed, 6 insertions(+) diff --git a/projects/addon-doc/components/navigation/navigation.template.html b/projects/addon-doc/components/navigation/navigation.template.html index 27e72cdf546b..8117147dabfb 100644 --- a/projects/addon-doc/components/navigation/navigation.template.html +++ b/projects/addon-doc/components/navigation/navigation.template.html @@ -20,6 +20,7 @@ tuiOption [fragment]="item.fragment" [routerLink]="item.route" + [target]="item.target" (click)="onClick(input)" > {{ item.title }} @@ -82,6 +83,7 @@ tuiLink class="t-sublink" [routerLink]="item.route" + [target]="item.target" [tuiScrollIntoViewLink]="isActive(item.route)" (click)="closeMenu()" > @@ -130,6 +132,7 @@ class="t-sublink t-sublink_small" [fragment]="subPage.fragment" [routerLink]="subPage.route" + [target]="item.target" [tuiScrollIntoViewLink]="isActive(subPage.route)" (click)="closeMenu()" > diff --git a/projects/addon-doc/interfaces/page.ts b/projects/addon-doc/interfaces/page.ts index 8cbf5587411e..b80d8b96cfca 100644 --- a/projects/addon-doc/interfaces/page.ts +++ b/projects/addon-doc/interfaces/page.ts @@ -10,6 +10,7 @@ export interface TuiDocPage extends TuiDocPageBase { readonly keywords?: string; readonly route: string; readonly icon?: PolymorpheusContent; + readonly target?: '_blank' | '_parent' | '_self' | '_top'; } export interface TuiDocPageGroup extends TuiDocPageBase { diff --git a/projects/demo/src/modules/app/pages.ts b/projects/demo/src/modules/app/pages.ts index e9e9d652df09..4a334460d5d2 100644 --- a/projects/demo/src/modules/app/pages.ts +++ b/projects/demo/src/modules/app/pages.ts @@ -44,6 +44,8 @@ export const pages: TuiDocPages = [ title: 'StackBlitz', keywords: 'reproduce, issue, bug, sandbox, playground, test', route: '/stackblitz', + target: '_blank', + icon: 'tuiIconExternalLink', }, { section: 'Documentation', From 4743e9c412e94623e2ea3a6dc3ea419ead89edbc Mon Sep 17 00:00:00 2001 From: taiga-family-bot Date: Mon, 26 Feb 2024 07:49:01 +0000 Subject: [PATCH 2/4] chore: icons have changed [bot] --- projects/demo/used-icons.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/demo/used-icons.ts b/projects/demo/used-icons.ts index 89f0a6c7139c..e5fa84124f58 100644 --- a/projects/demo/used-icons.ts +++ b/projects/demo/used-icons.ts @@ -8,6 +8,7 @@ export const TUI_USED_ICONS = [ 'tuiIconCheck', 'tuiIconAlertCircleLarge', 'tuiIconButton', + 'tuiIconExternalLink', 'tuiIconClose', 'tuiIconSearchLarge', 'tuiIconCalendarLarge', From 8b698fdc26b9177487e4328d5c46dab2d7ece86a Mon Sep 17 00:00:00 2001 From: Maksim Ivanov Date: Mon, 26 Feb 2024 12:21:33 +0300 Subject: [PATCH 3/4] chore: update pages.ts --- projects/demo/src/modules/app/pages.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/projects/demo/src/modules/app/pages.ts b/projects/demo/src/modules/app/pages.ts index 4a334460d5d2..6af47a460a7d 100644 --- a/projects/demo/src/modules/app/pages.ts +++ b/projects/demo/src/modules/app/pages.ts @@ -45,7 +45,6 @@ export const pages: TuiDocPages = [ keywords: 'reproduce, issue, bug, sandbox, playground, test', route: '/stackblitz', target: '_blank', - icon: 'tuiIconExternalLink', }, { section: 'Documentation', From 264c98e02adc7f65c657ba842b023cf8be7f225d Mon Sep 17 00:00:00 2001 From: taiga-family-bot Date: Mon, 26 Feb 2024 09:22:54 +0000 Subject: [PATCH 4/4] chore: icons have changed [bot] --- projects/demo/used-icons.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/projects/demo/used-icons.ts b/projects/demo/used-icons.ts index e5fa84124f58..89f0a6c7139c 100644 --- a/projects/demo/used-icons.ts +++ b/projects/demo/used-icons.ts @@ -8,7 +8,6 @@ export const TUI_USED_ICONS = [ 'tuiIconCheck', 'tuiIconAlertCircleLarge', 'tuiIconButton', - 'tuiIconExternalLink', 'tuiIconClose', 'tuiIconSearchLarge', 'tuiIconCalendarLarge',