From 6478f57317473b381f8909834314e2f5c29aa2be Mon Sep 17 00:00:00 2001 From: Arman Ozak Date: Wed, 17 Jun 2020 18:42:15 +0300 Subject: [PATCH] feat: add node, nav, and tab types --- .../packages/core/src/lib/models/common.ts | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/npm/ng-packs/packages/core/src/lib/models/common.ts b/npm/ng-packs/packages/core/src/lib/models/common.ts index 773233857f..ee160fef6d 100644 --- a/npm/ng-packs/packages/core/src/lib/models/common.ts +++ b/npm/ng-packs/packages/core/src/lib/models/common.ts @@ -1,4 +1,4 @@ -import { EventEmitter } from '@angular/core'; +import { EventEmitter, Type } from '@angular/core'; import { Router } from '@angular/router'; import { Subject } from 'rxjs'; import { eLayoutType } from '../enums/common'; @@ -35,21 +35,25 @@ export namespace ABP { maxResultCount?: number; } - export interface Route { - children?: Route[]; - invisible?: boolean; - layout?: eLayoutType; + export interface Node { name: string; - order?: number; parentName?: string; + order?: number; + invisible?: boolean; + } + + export interface Nav extends Node { path: string; requiredPolicy?: string; + } + + export interface Route extends Nav { + layout?: eLayoutType; iconClass?: string; } - export interface FullRoute extends Route { - url?: string; - wrapper?: boolean; + export interface Tab extends Nav { + component: Type; } export interface BasicItem {