From 5197c8b7b3cf7576f1198e4b59a7d6484e793107 Mon Sep 17 00:00:00 2001 From: Idan Amit Date: Mon, 15 Jan 2018 14:31:42 +0200 Subject: Designer-view component for top-nav Create a designer-view component for opening a designer view from the top-nav Updated the API to return the designers as a list and not as an object Created a designer-frame component that will get a designer url to open in the dedicated position Change-Id: Ic42f7695277e88aacdeaa74d4d0f95b49ce44999 Issue-ID: SDC-884 Signed-off-by: Idan Amit --- catalog-ui/src/app/ng2/pipes/global-pipes.module.ts | 10 ++++++---- catalog-ui/src/app/ng2/pipes/safeUrlSanitizer.pipe.ts | 10 ++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 catalog-ui/src/app/ng2/pipes/safeUrlSanitizer.pipe.ts (limited to 'catalog-ui/src/app/ng2/pipes') diff --git a/catalog-ui/src/app/ng2/pipes/global-pipes.module.ts b/catalog-ui/src/app/ng2/pipes/global-pipes.module.ts index 1d81a1a4bf..e89a816e95 100644 --- a/catalog-ui/src/app/ng2/pipes/global-pipes.module.ts +++ b/catalog-ui/src/app/ng2/pipes/global-pipes.module.ts @@ -3,21 +3,23 @@ import {SearchFilterPipe} from "./searchFilter.pipe"; import {KeysPipe} from "./keys.pipe"; import {GroupByPipe} from "./groupBy.pipe"; import {NgModule} from "@angular/core"; +import {SafeUrlSanitizerPipe} from "./safeUrlSanitizer.pipe"; @NgModule({ declarations: [ ContentAfterLastDotPipe, GroupByPipe, KeysPipe, - SearchFilterPipe - + SearchFilterPipe, + SafeUrlSanitizerPipe ], - + exports: [ ContentAfterLastDotPipe, GroupByPipe, KeysPipe, - SearchFilterPipe + SearchFilterPipe, + SafeUrlSanitizerPipe ] }) diff --git a/catalog-ui/src/app/ng2/pipes/safeUrlSanitizer.pipe.ts b/catalog-ui/src/app/ng2/pipes/safeUrlSanitizer.pipe.ts new file mode 100644 index 0000000000..9d8588030e --- /dev/null +++ b/catalog-ui/src/app/ng2/pipes/safeUrlSanitizer.pipe.ts @@ -0,0 +1,10 @@ +import { Pipe, PipeTransform } from '@angular/core'; +import { DomSanitizer } from '@angular/platform-browser'; + +@Pipe({ name: 'safeUrlSanitizer' }) +export class SafeUrlSanitizerPipe implements PipeTransform { + constructor(private sanitizer: DomSanitizer) {} + transform(url) { + return this.sanitizer.bypassSecurityTrustResourceUrl(url); + } +} -- cgit 1.2.3-korg