diff --git a/npm/ng-packs/packages/core/src/lib/plugins/config.plugin.ts b/npm/ng-packs/packages/core/src/lib/plugins/config.plugin.ts index 719de83566..a55b815064 100644 --- a/npm/ng-packs/packages/core/src/lib/plugins/config.plugin.ts +++ b/npm/ng-packs/packages/core/src/lib/plugins/config.plugin.ts @@ -1,9 +1,9 @@ -import { Injectable, Inject, InjectionToken, Type } from '@angular/core'; -import { NgxsPlugin, setValue, actionMatcher, InitState, UpdateState, NgxsNextPluginFn } from '@ngxs/store'; +import { Inject, Injectable, InjectionToken } from '@angular/core'; import { Router, Routes } from '@angular/router'; -import { ABP } from '../models'; +import { actionMatcher, InitState, NgxsNextPluginFn, NgxsPlugin, setValue, UpdateState } from '@ngxs/store'; import snq from 'snq'; -import { setChildRoute, sortRoutes, organizeRoutes } from '../utils/route-utils'; +import { ABP } from '../models'; +import { organizeRoutes } from '../utils/route-utils'; export const NGXS_CONFIG_PLUGIN_OPTIONS = new InjectionToken('NGXS_CONFIG_PLUGIN_OPTIONS'); @@ -45,7 +45,7 @@ function transformRoutes(routes: Routes = [], wrappers: ABP.FullRoute[] = []): a wrappers = abpRoutes.filter(ar => ar.wrapper); const transformed = [] as ABP.FullRoute[]; routes - .filter(route => route.component || route.loadChildren) + .filter(route => route.component || route.loadChildren || (route.data || {}).routes) .forEach(route => { const abpPackage = abpRoutes.find(abp => abp.path.toLowerCase() === route.path.toLowerCase()); const { length } = transformed; diff --git a/npm/ng-packs/packages/theme-basic/src/lib/components/layout/layout.component.html b/npm/ng-packs/packages/theme-basic/src/lib/components/layout/layout.component.html index 969f41fa1c..0aebd0927b 100644 --- a/npm/ng-packs/packages/theme-basic/src/lib/components/layout/layout.component.html +++ b/npm/ng-packs/packages/theme-basic/src/lib/components/layout/layout.component.html @@ -8,8 +8,12 @@ -
- +
+
diff --git a/npm/ng-packs/packages/theme-basic/src/lib/components/layout/layout.component.ts b/npm/ng-packs/packages/theme-basic/src/lib/components/layout/layout.component.ts index cc2113d31a..8e5fddcc46 100644 --- a/npm/ng-packs/packages/theme-basic/src/lib/components/layout/layout.component.ts +++ b/npm/ng-packs/packages/theme-basic/src/lib/components/layout/layout.component.ts @@ -1,8 +1,10 @@ import { Component } from '@angular/core'; +import { slideFromBottom } from '@abp/ng.theme.shared'; @Component({ selector: ' abp-layout', templateUrl: './layout.component.html', + animations: [slideFromBottom], }) export class LayoutComponent { isCollapsed: boolean = false; diff --git a/npm/ng-packs/packages/theme-shared/src/lib/abstracts/toaster.ts b/npm/ng-packs/packages/theme-shared/src/lib/abstracts/toaster.ts index 0e7d017edd..ece1288c7a 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/abstracts/toaster.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/abstracts/toaster.ts @@ -2,12 +2,12 @@ import { MessageService } from 'primeng/components/common/messageservice'; import { Observable, Subject } from 'rxjs'; import { Toaster } from '../models/toaster'; -export class AbstractToasterClass { - protected status$: Subject; +export class AbstractToaster { + status$: Subject; - protected key: string = 'abpToast'; + key: string = 'abpToast'; - protected sticky: boolean = false; + sticky: boolean = false; constructor(protected messageService: MessageService) {} info(message: string, title: string, options?: T): Observable { diff --git a/npm/ng-packs/packages/theme-shared/src/lib/animations/index.ts b/npm/ng-packs/packages/theme-shared/src/lib/animations/index.ts new file mode 100644 index 0000000000..6fd1d939c4 --- /dev/null +++ b/npm/ng-packs/packages/theme-shared/src/lib/animations/index.ts @@ -0,0 +1 @@ +export * from './slide.animation'; diff --git a/npm/ng-packs/packages/theme-shared/src/lib/animations/slide.animation.ts b/npm/ng-packs/packages/theme-shared/src/lib/animations/slide.animation.ts new file mode 100644 index 0000000000..90f46662be --- /dev/null +++ b/npm/ng-packs/packages/theme-shared/src/lib/animations/slide.animation.ts @@ -0,0 +1,6 @@ +import { animate, state, style, transition, trigger, query } from '@angular/animations'; +export const slideFromBottom = trigger('routeAnimations', [ + state('void', style({ 'margin-top': '20px', opacity: '0' })), + state('*', style({ 'margin-top': '0px', opacity: '1' })), + transition(':enter', [animate('0.2s ease-out', style({ opacity: '1', 'margin-top': '0px' }))]), +]); diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.html b/npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.html index 607350879f..8387246db3 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.html +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.html @@ -1,9 +1,8 @@