Browse Source

Build ng packages

pull/1974/head
mehmet-erim 7 years ago
parent
commit
dbb951e505
  1. 2
      npm/ng-packs/dist/theme-basic/abp-ng.theme.basic.metadata.json
  2. 12
      npm/ng-packs/dist/theme-basic/bundles/abp-ng.theme.basic.umd.js
  3. 2
      npm/ng-packs/dist/theme-basic/bundles/abp-ng.theme.basic.umd.js.map
  4. 2
      npm/ng-packs/dist/theme-basic/bundles/abp-ng.theme.basic.umd.min.js
  5. 2
      npm/ng-packs/dist/theme-basic/bundles/abp-ng.theme.basic.umd.min.js.map
  6. 18
      npm/ng-packs/dist/theme-basic/esm2015/lib/components/application-layout/application-layout.component.js
  7. 18
      npm/ng-packs/dist/theme-basic/esm5/lib/components/application-layout/application-layout.component.js
  8. 12
      npm/ng-packs/dist/theme-basic/fesm2015/abp-ng.theme.basic.js
  9. 2
      npm/ng-packs/dist/theme-basic/fesm2015/abp-ng.theme.basic.js.map
  10. 12
      npm/ng-packs/dist/theme-basic/fesm5/abp-ng.theme.basic.js
  11. 2
      npm/ng-packs/dist/theme-basic/fesm5/abp-ng.theme.basic.js.map
  12. 2
      npm/ng-packs/dist/theme-basic/lib/components/application-layout/application-layout.component.d.ts
  13. 1
      npm/ng-packs/packages/account-config/src/lib/services/account-config.service.ts
  14. 14
      npm/ng-packs/packages/account/src/lib/account-routing.module.ts
  15. 12
      npm/ng-packs/packages/account/src/lib/account.module.ts
  16. 19
      npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.html
  17. 63
      npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts
  18. 3
      npm/ng-packs/packages/account/src/lib/components/index.ts
  19. 36
      npm/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.html
  20. 13
      npm/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.ts
  21. 31
      npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.html
  22. 52
      npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts

2
npm/ng-packs/dist/theme-basic/abp-ng.theme.basic.metadata.json

File diff suppressed because one or more lines are too long

12
npm/ng-packs/dist/theme-basic/bundles/abp-ng.theme.basic.umd.js

@ -401,8 +401,6 @@
function ApplicationLayoutComponent(store, oauthService) { function ApplicationLayoutComponent(store, oauthService) {
this.store = store; this.store = store;
this.oauthService = oauthService; this.oauthService = oauthService;
this.isOpenChangePassword = false;
this.isOpenProfile = false;
this.rightPartElements = []; this.rightPartElements = [];
this.trackByFn = (/** this.trackByFn = (/**
* @param {?} _ * @param {?} _
@ -534,7 +532,7 @@
if (navigations.indexOf('LanguageRef') < 0) { if (navigations.indexOf('LanguageRef') < 0) {
this.store.dispatch(new AddNavigationElement([ this.store.dispatch(new AddNavigationElement([
{ element: this.languageRef, order: 4, name: 'LanguageRef' }, { element: this.languageRef, order: 4, name: 'LanguageRef' },
{ element: this.currentUserRef, order: 5, name: 'CurrentUserRef' } { element: this.currentUserRef, order: 5, name: 'CurrentUserRef' },
])); ]));
} }
this.navElements$ this.navElements$
@ -601,7 +599,7 @@
function () { function () {
this.oauthService.logOut(); this.oauthService.logOut();
this.store.dispatch(new routerPlugin.Navigate(['/'], null, { this.store.dispatch(new routerPlugin.Navigate(['/'], null, {
state: { redirectUrl: this.store.selectSnapshot(routerPlugin.RouterState).state.url } state: { redirectUrl: this.store.selectSnapshot(routerPlugin.RouterState).state.url },
})); }));
this.store.dispatch(new ng_core.GetAppConfiguration()); this.store.dispatch(new ng_core.GetAppConfiguration());
}; };
@ -610,7 +608,7 @@
ApplicationLayoutComponent.decorators = [ ApplicationLayoutComponent.decorators = [
{ type: core.Component, args: [{ { type: core.Component, args: [{
selector: 'abp-layout-application', selector: 'abp-layout-application',
template: "<abp-layout>\n <ul class=\"navbar-nav mr-auto\">\n <ng-container\n *ngFor=\"let route of visibleRoutes$ | async; trackBy: trackByFn\"\n [ngTemplateOutlet]=\"route?.children?.length ? dropdownLink : defaultLink\"\n [ngTemplateOutletContext]=\"{ $implicit: route }\"\n >\n </ng-container>\n\n <ng-template #defaultLink let-route>\n <li class=\"nav-item\" [abpPermission]=\"route.requiredPolicy\">\n <a class=\"nav-link\" [routerLink]=\"[route.url]\">{{ route.name | abpLocalization }}</a>\n </li>\n </ng-template>\n\n <ng-template #dropdownLink let-route>\n <li\n #navbarRootDropdown\n ngbDropdown\n [abpPermission]=\"route.requiredPolicy\"\n [abpVisibility]=\"routeContainer\"\n class=\"nav-item dropdown pointer\"\n display=\"static\"\n >\n <a ngbDropdownToggle class=\"nav-link dropdown-toggle pointer\" data-toggle=\"dropdown\">\n {{ route.name | abpLocalization }}\n </a>\n <div #routeContainer ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <ng-template\n #forTemplate\n ngFor\n [ngForOf]=\"route.children\"\n [ngForTrackBy]=\"trackByFn\"\n [ngForTemplate]=\"childWrapper\"\n ></ng-template>\n </div>\n </li>\n </ng-template>\n\n <ng-template #childWrapper let-child>\n <ng-template\n [ngTemplateOutlet]=\"child?.children?.length ? dropdownChild : defaultChild\"\n [ngTemplateOutletContext]=\"{ $implicit: child }\"\n ></ng-template>\n </ng-template>\n\n <ng-template #defaultChild let-child>\n <div class=\"dropdown-submenu\" [abpPermission]=\"child.requiredPolicy\">\n <a class=\"dropdown-item py-2 px-2\" [routerLink]=\"[child.url]\">\n <i *ngIf=\"child.iconClass\" [ngClass]=\"child.iconClass\"></i>\n {{ child.name | abpLocalization }}</a\n >\n </div>\n </ng-template>\n\n <ng-template #dropdownChild let-child>\n <div\n [abpVisibility]=\"childrenContainer\"\n class=\"dropdown-submenu pointer\"\n ngbDropdown\n [display]=\"isDropdownChildDynamic ? 'dynamic' : 'static'\"\n placement=\"right-top\"\n [abpPermission]=\"child.requiredPolicy\"\n >\n <div ngbDropdownToggle [class.dropdown-toggle]=\"false\" class=\"pointer\">\n <a\n abpEllipsis=\"210px\"\n [abpEllipsisEnabled]=\"isDropdownChildDynamic\"\n role=\"button\"\n class=\"btn d-block text-left py-2 px-2 dropdown-toggle\"\n >\n <i *ngIf=\"child.iconClass\" [ngClass]=\"child.iconClass\"></i>\n {{ child.name | abpLocalization }}\n </a>\n </div>\n <div #childrenContainer ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <ng-template\n ngFor\n [ngForOf]=\"child.children\"\n [ngForTrackBy]=\"trackByFn\"\n [ngForTemplate]=\"childWrapper\"\n ></ng-template>\n </div>\n </div>\n </ng-template>\n </ul>\n\n <ul class=\"navbar-nav ml-auto\">\n <ng-container\n *ngFor=\"let element of rightPartElements; trackBy: trackElementByFn\"\n [ngTemplateOutlet]=\"element\"\n ></ng-container>\n </ul>\n</abp-layout>\n\n<ng-template #language>\n <li class=\"nav-item dropdown pointer\" ngbDropdown>\n <a ngbDropdownToggle class=\"nav-link dropdown-toggle text-white pointer\" data-toggle=\"dropdown\">\n {{ defaultLanguage$ | async }}\n </a>\n <div ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <a\n *ngFor=\"let lang of dropdownLanguages$ | async\"\n class=\"dropdown-item\"\n (click)=\"onChangeLang(lang.cultureName)\"\n >{{ lang?.displayName }}</a\n >\n </div>\n </li>\n</ng-template>\n\n<ng-template #currentUser>\n <li *ngIf=\"(currentUser$ | async)?.isAuthenticated\" class=\"nav-item dropdown pointer\" ngbDropdown>\n <a ngbDropdownToggle class=\"nav-link dropdown-toggle text-white pointer\" data-toggle=\"dropdown\">\n {{ (currentUser$ | async)?.userName }}\n </a>\n <div ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <a class=\"dropdown-item pointer\" (click)=\"isOpenChangePassword = true\">{{\n 'AbpUi::ChangePassword' | abpLocalization\n }}</a>\n <a class=\"dropdown-item pointer\" (click)=\"isOpenProfile = true\">{{ 'AbpUi::PersonalInfo' | abpLocalization }}</a>\n <a class=\"dropdown-item pointer\" (click)=\"logout()\">{{ 'AbpUi::Logout' | abpLocalization }}</a>\n </div>\n </li>\n\n <abp-change-password [(visible)]=\"isOpenChangePassword\"></abp-change-password>\n\n <abp-profile [(visible)]=\"isOpenProfile\"></abp-profile>\n</ng-template>\n" template: "<abp-layout>\n <ul class=\"navbar-nav mr-auto\">\n <ng-container\n *ngFor=\"let route of visibleRoutes$ | async; trackBy: trackByFn\"\n [ngTemplateOutlet]=\"route?.children?.length ? dropdownLink : defaultLink\"\n [ngTemplateOutletContext]=\"{ $implicit: route }\"\n >\n </ng-container>\n\n <ng-template #defaultLink let-route>\n <li class=\"nav-item\" [abpPermission]=\"route.requiredPolicy\">\n <a class=\"nav-link\" [routerLink]=\"[route.url]\">{{ route.name | abpLocalization }}</a>\n </li>\n </ng-template>\n\n <ng-template #dropdownLink let-route>\n <li\n #navbarRootDropdown\n ngbDropdown\n [abpPermission]=\"route.requiredPolicy\"\n [abpVisibility]=\"routeContainer\"\n class=\"nav-item dropdown pointer\"\n display=\"static\"\n >\n <a ngbDropdownToggle class=\"nav-link dropdown-toggle pointer\" data-toggle=\"dropdown\">\n {{ route.name | abpLocalization }}\n </a>\n <div #routeContainer ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <ng-template\n #forTemplate\n ngFor\n [ngForOf]=\"route.children\"\n [ngForTrackBy]=\"trackByFn\"\n [ngForTemplate]=\"childWrapper\"\n ></ng-template>\n </div>\n </li>\n </ng-template>\n\n <ng-template #childWrapper let-child>\n <ng-template\n [ngTemplateOutlet]=\"child?.children?.length ? dropdownChild : defaultChild\"\n [ngTemplateOutletContext]=\"{ $implicit: child }\"\n ></ng-template>\n </ng-template>\n\n <ng-template #defaultChild let-child>\n <div class=\"dropdown-submenu\" [abpPermission]=\"child.requiredPolicy\">\n <a class=\"dropdown-item py-2 px-2\" [routerLink]=\"[child.url]\">\n <i *ngIf=\"child.iconClass\" [ngClass]=\"child.iconClass\"></i>\n {{ child.name | abpLocalization }}</a\n >\n </div>\n </ng-template>\n\n <ng-template #dropdownChild let-child>\n <div\n [abpVisibility]=\"childrenContainer\"\n class=\"dropdown-submenu pointer\"\n ngbDropdown\n [display]=\"isDropdownChildDynamic ? 'dynamic' : 'static'\"\n placement=\"right-top\"\n [abpPermission]=\"child.requiredPolicy\"\n >\n <div ngbDropdownToggle [class.dropdown-toggle]=\"false\" class=\"pointer\">\n <a\n abpEllipsis=\"210px\"\n [abpEllipsisEnabled]=\"isDropdownChildDynamic\"\n role=\"button\"\n class=\"btn d-block text-left py-2 px-2 dropdown-toggle\"\n >\n <i *ngIf=\"child.iconClass\" [ngClass]=\"child.iconClass\"></i>\n {{ child.name | abpLocalization }}\n </a>\n </div>\n <div #childrenContainer ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <ng-template\n ngFor\n [ngForOf]=\"child.children\"\n [ngForTrackBy]=\"trackByFn\"\n [ngForTemplate]=\"childWrapper\"\n ></ng-template>\n </div>\n </div>\n </ng-template>\n </ul>\n\n <ul class=\"navbar-nav ml-auto\">\n <ng-container\n *ngFor=\"let element of rightPartElements; trackBy: trackElementByFn\"\n [ngTemplateOutlet]=\"element\"\n ></ng-container>\n </ul>\n</abp-layout>\n\n<ng-template #language>\n <li class=\"nav-item dropdown pointer\" ngbDropdown>\n <a ngbDropdownToggle class=\"nav-link dropdown-toggle text-white pointer\" data-toggle=\"dropdown\">\n {{ defaultLanguage$ | async }}\n </a>\n <div ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <a\n *ngFor=\"let lang of dropdownLanguages$ | async\"\n class=\"dropdown-item\"\n (click)=\"onChangeLang(lang.cultureName)\"\n >{{ lang?.displayName }}</a\n >\n </div>\n </li>\n</ng-template>\n\n<ng-template #currentUser>\n <li *ngIf=\"(currentUser$ | async)?.isAuthenticated\" class=\"nav-item dropdown pointer\" ngbDropdown>\n <a ngbDropdownToggle class=\"nav-link dropdown-toggle text-white pointer\" data-toggle=\"dropdown\">\n {{ (currentUser$ | async)?.userName }}\n </a>\n <div ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <a class=\"dropdown-item pointer\" routerLink=\"/account/manage-profile\">{{\n 'AbpAccount::ManageYourProfile' | abpLocalization\n }}</a>\n <a class=\"dropdown-item pointer\" (click)=\"logout()\">{{ 'AbpUi::Logout' | abpLocalization }}</a>\n </div>\n </li>\n</ng-template>\n"
}] } }] }
]; ];
/** @nocollapse */ /** @nocollapse */
@ -659,10 +657,6 @@
/** @type {?} */ /** @type {?} */
ApplicationLayoutComponent.prototype.navbarRootDropdowns; ApplicationLayoutComponent.prototype.navbarRootDropdowns;
/** @type {?} */ /** @type {?} */
ApplicationLayoutComponent.prototype.isOpenChangePassword;
/** @type {?} */
ApplicationLayoutComponent.prototype.isOpenProfile;
/** @type {?} */
ApplicationLayoutComponent.prototype.isDropdownChildDynamic; ApplicationLayoutComponent.prototype.isDropdownChildDynamic;
/** @type {?} */ /** @type {?} */
ApplicationLayoutComponent.prototype.rightPartElements; ApplicationLayoutComponent.prototype.rightPartElements;

2
npm/ng-packs/dist/theme-basic/bundles/abp-ng.theme.basic.umd.js.map

File diff suppressed because one or more lines are too long

2
npm/ng-packs/dist/theme-basic/bundles/abp-ng.theme.basic.umd.min.js

File diff suppressed because one or more lines are too long

2
npm/ng-packs/dist/theme-basic/bundles/abp-ng.theme.basic.umd.min.js.map

File diff suppressed because one or more lines are too long

18
npm/ng-packs/dist/theme-basic/esm2015/lib/components/application-layout/application-layout.component.js

File diff suppressed because one or more lines are too long

18
npm/ng-packs/dist/theme-basic/esm5/lib/components/application-layout/application-layout.component.js

File diff suppressed because one or more lines are too long

12
npm/ng-packs/dist/theme-basic/fesm2015/abp-ng.theme.basic.js

@ -189,8 +189,6 @@ class ApplicationLayoutComponent {
constructor(store, oauthService) { constructor(store, oauthService) {
this.store = store; this.store = store;
this.oauthService = oauthService; this.oauthService = oauthService;
this.isOpenChangePassword = false;
this.isOpenProfile = false;
this.rightPartElements = []; this.rightPartElements = [];
this.trackByFn = (/** this.trackByFn = (/**
* @param {?} _ * @param {?} _
@ -292,7 +290,7 @@ class ApplicationLayoutComponent {
if (navigations.indexOf('LanguageRef') < 0) { if (navigations.indexOf('LanguageRef') < 0) {
this.store.dispatch(new AddNavigationElement([ this.store.dispatch(new AddNavigationElement([
{ element: this.languageRef, order: 4, name: 'LanguageRef' }, { element: this.languageRef, order: 4, name: 'LanguageRef' },
{ element: this.currentUserRef, order: 5, name: 'CurrentUserRef' } { element: this.currentUserRef, order: 5, name: 'CurrentUserRef' },
])); ]));
} }
this.navElements$ this.navElements$
@ -346,7 +344,7 @@ class ApplicationLayoutComponent {
logout() { logout() {
this.oauthService.logOut(); this.oauthService.logOut();
this.store.dispatch(new Navigate(['/'], null, { this.store.dispatch(new Navigate(['/'], null, {
state: { redirectUrl: this.store.selectSnapshot(RouterState).state.url } state: { redirectUrl: this.store.selectSnapshot(RouterState).state.url },
})); }));
this.store.dispatch(new GetAppConfiguration()); this.store.dispatch(new GetAppConfiguration());
} }
@ -356,7 +354,7 @@ ApplicationLayoutComponent.type = "application" /* application */;
ApplicationLayoutComponent.decorators = [ ApplicationLayoutComponent.decorators = [
{ type: Component, args: [{ { type: Component, args: [{
selector: 'abp-layout-application', selector: 'abp-layout-application',
template: "<abp-layout>\n <ul class=\"navbar-nav mr-auto\">\n <ng-container\n *ngFor=\"let route of visibleRoutes$ | async; trackBy: trackByFn\"\n [ngTemplateOutlet]=\"route?.children?.length ? dropdownLink : defaultLink\"\n [ngTemplateOutletContext]=\"{ $implicit: route }\"\n >\n </ng-container>\n\n <ng-template #defaultLink let-route>\n <li class=\"nav-item\" [abpPermission]=\"route.requiredPolicy\">\n <a class=\"nav-link\" [routerLink]=\"[route.url]\">{{ route.name | abpLocalization }}</a>\n </li>\n </ng-template>\n\n <ng-template #dropdownLink let-route>\n <li\n #navbarRootDropdown\n ngbDropdown\n [abpPermission]=\"route.requiredPolicy\"\n [abpVisibility]=\"routeContainer\"\n class=\"nav-item dropdown pointer\"\n display=\"static\"\n >\n <a ngbDropdownToggle class=\"nav-link dropdown-toggle pointer\" data-toggle=\"dropdown\">\n {{ route.name | abpLocalization }}\n </a>\n <div #routeContainer ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <ng-template\n #forTemplate\n ngFor\n [ngForOf]=\"route.children\"\n [ngForTrackBy]=\"trackByFn\"\n [ngForTemplate]=\"childWrapper\"\n ></ng-template>\n </div>\n </li>\n </ng-template>\n\n <ng-template #childWrapper let-child>\n <ng-template\n [ngTemplateOutlet]=\"child?.children?.length ? dropdownChild : defaultChild\"\n [ngTemplateOutletContext]=\"{ $implicit: child }\"\n ></ng-template>\n </ng-template>\n\n <ng-template #defaultChild let-child>\n <div class=\"dropdown-submenu\" [abpPermission]=\"child.requiredPolicy\">\n <a class=\"dropdown-item py-2 px-2\" [routerLink]=\"[child.url]\">\n <i *ngIf=\"child.iconClass\" [ngClass]=\"child.iconClass\"></i>\n {{ child.name | abpLocalization }}</a\n >\n </div>\n </ng-template>\n\n <ng-template #dropdownChild let-child>\n <div\n [abpVisibility]=\"childrenContainer\"\n class=\"dropdown-submenu pointer\"\n ngbDropdown\n [display]=\"isDropdownChildDynamic ? 'dynamic' : 'static'\"\n placement=\"right-top\"\n [abpPermission]=\"child.requiredPolicy\"\n >\n <div ngbDropdownToggle [class.dropdown-toggle]=\"false\" class=\"pointer\">\n <a\n abpEllipsis=\"210px\"\n [abpEllipsisEnabled]=\"isDropdownChildDynamic\"\n role=\"button\"\n class=\"btn d-block text-left py-2 px-2 dropdown-toggle\"\n >\n <i *ngIf=\"child.iconClass\" [ngClass]=\"child.iconClass\"></i>\n {{ child.name | abpLocalization }}\n </a>\n </div>\n <div #childrenContainer ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <ng-template\n ngFor\n [ngForOf]=\"child.children\"\n [ngForTrackBy]=\"trackByFn\"\n [ngForTemplate]=\"childWrapper\"\n ></ng-template>\n </div>\n </div>\n </ng-template>\n </ul>\n\n <ul class=\"navbar-nav ml-auto\">\n <ng-container\n *ngFor=\"let element of rightPartElements; trackBy: trackElementByFn\"\n [ngTemplateOutlet]=\"element\"\n ></ng-container>\n </ul>\n</abp-layout>\n\n<ng-template #language>\n <li class=\"nav-item dropdown pointer\" ngbDropdown>\n <a ngbDropdownToggle class=\"nav-link dropdown-toggle text-white pointer\" data-toggle=\"dropdown\">\n {{ defaultLanguage$ | async }}\n </a>\n <div ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <a\n *ngFor=\"let lang of dropdownLanguages$ | async\"\n class=\"dropdown-item\"\n (click)=\"onChangeLang(lang.cultureName)\"\n >{{ lang?.displayName }}</a\n >\n </div>\n </li>\n</ng-template>\n\n<ng-template #currentUser>\n <li *ngIf=\"(currentUser$ | async)?.isAuthenticated\" class=\"nav-item dropdown pointer\" ngbDropdown>\n <a ngbDropdownToggle class=\"nav-link dropdown-toggle text-white pointer\" data-toggle=\"dropdown\">\n {{ (currentUser$ | async)?.userName }}\n </a>\n <div ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <a class=\"dropdown-item pointer\" (click)=\"isOpenChangePassword = true\">{{\n 'AbpUi::ChangePassword' | abpLocalization\n }}</a>\n <a class=\"dropdown-item pointer\" (click)=\"isOpenProfile = true\">{{ 'AbpUi::PersonalInfo' | abpLocalization }}</a>\n <a class=\"dropdown-item pointer\" (click)=\"logout()\">{{ 'AbpUi::Logout' | abpLocalization }}</a>\n </div>\n </li>\n\n <abp-change-password [(visible)]=\"isOpenChangePassword\"></abp-change-password>\n\n <abp-profile [(visible)]=\"isOpenProfile\"></abp-profile>\n</ng-template>\n" template: "<abp-layout>\n <ul class=\"navbar-nav mr-auto\">\n <ng-container\n *ngFor=\"let route of visibleRoutes$ | async; trackBy: trackByFn\"\n [ngTemplateOutlet]=\"route?.children?.length ? dropdownLink : defaultLink\"\n [ngTemplateOutletContext]=\"{ $implicit: route }\"\n >\n </ng-container>\n\n <ng-template #defaultLink let-route>\n <li class=\"nav-item\" [abpPermission]=\"route.requiredPolicy\">\n <a class=\"nav-link\" [routerLink]=\"[route.url]\">{{ route.name | abpLocalization }}</a>\n </li>\n </ng-template>\n\n <ng-template #dropdownLink let-route>\n <li\n #navbarRootDropdown\n ngbDropdown\n [abpPermission]=\"route.requiredPolicy\"\n [abpVisibility]=\"routeContainer\"\n class=\"nav-item dropdown pointer\"\n display=\"static\"\n >\n <a ngbDropdownToggle class=\"nav-link dropdown-toggle pointer\" data-toggle=\"dropdown\">\n {{ route.name | abpLocalization }}\n </a>\n <div #routeContainer ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <ng-template\n #forTemplate\n ngFor\n [ngForOf]=\"route.children\"\n [ngForTrackBy]=\"trackByFn\"\n [ngForTemplate]=\"childWrapper\"\n ></ng-template>\n </div>\n </li>\n </ng-template>\n\n <ng-template #childWrapper let-child>\n <ng-template\n [ngTemplateOutlet]=\"child?.children?.length ? dropdownChild : defaultChild\"\n [ngTemplateOutletContext]=\"{ $implicit: child }\"\n ></ng-template>\n </ng-template>\n\n <ng-template #defaultChild let-child>\n <div class=\"dropdown-submenu\" [abpPermission]=\"child.requiredPolicy\">\n <a class=\"dropdown-item py-2 px-2\" [routerLink]=\"[child.url]\">\n <i *ngIf=\"child.iconClass\" [ngClass]=\"child.iconClass\"></i>\n {{ child.name | abpLocalization }}</a\n >\n </div>\n </ng-template>\n\n <ng-template #dropdownChild let-child>\n <div\n [abpVisibility]=\"childrenContainer\"\n class=\"dropdown-submenu pointer\"\n ngbDropdown\n [display]=\"isDropdownChildDynamic ? 'dynamic' : 'static'\"\n placement=\"right-top\"\n [abpPermission]=\"child.requiredPolicy\"\n >\n <div ngbDropdownToggle [class.dropdown-toggle]=\"false\" class=\"pointer\">\n <a\n abpEllipsis=\"210px\"\n [abpEllipsisEnabled]=\"isDropdownChildDynamic\"\n role=\"button\"\n class=\"btn d-block text-left py-2 px-2 dropdown-toggle\"\n >\n <i *ngIf=\"child.iconClass\" [ngClass]=\"child.iconClass\"></i>\n {{ child.name | abpLocalization }}\n </a>\n </div>\n <div #childrenContainer ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <ng-template\n ngFor\n [ngForOf]=\"child.children\"\n [ngForTrackBy]=\"trackByFn\"\n [ngForTemplate]=\"childWrapper\"\n ></ng-template>\n </div>\n </div>\n </ng-template>\n </ul>\n\n <ul class=\"navbar-nav ml-auto\">\n <ng-container\n *ngFor=\"let element of rightPartElements; trackBy: trackElementByFn\"\n [ngTemplateOutlet]=\"element\"\n ></ng-container>\n </ul>\n</abp-layout>\n\n<ng-template #language>\n <li class=\"nav-item dropdown pointer\" ngbDropdown>\n <a ngbDropdownToggle class=\"nav-link dropdown-toggle text-white pointer\" data-toggle=\"dropdown\">\n {{ defaultLanguage$ | async }}\n </a>\n <div ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <a\n *ngFor=\"let lang of dropdownLanguages$ | async\"\n class=\"dropdown-item\"\n (click)=\"onChangeLang(lang.cultureName)\"\n >{{ lang?.displayName }}</a\n >\n </div>\n </li>\n</ng-template>\n\n<ng-template #currentUser>\n <li *ngIf=\"(currentUser$ | async)?.isAuthenticated\" class=\"nav-item dropdown pointer\" ngbDropdown>\n <a ngbDropdownToggle class=\"nav-link dropdown-toggle text-white pointer\" data-toggle=\"dropdown\">\n {{ (currentUser$ | async)?.userName }}\n </a>\n <div ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <a class=\"dropdown-item pointer\" routerLink=\"/account/manage-profile\">{{\n 'AbpAccount::ManageYourProfile' | abpLocalization\n }}</a>\n <a class=\"dropdown-item pointer\" (click)=\"logout()\">{{ 'AbpUi::Logout' | abpLocalization }}</a>\n </div>\n </li>\n</ng-template>\n"
}] } }] }
]; ];
/** @nocollapse */ /** @nocollapse */
@ -403,10 +401,6 @@ if (false) {
/** @type {?} */ /** @type {?} */
ApplicationLayoutComponent.prototype.navbarRootDropdowns; ApplicationLayoutComponent.prototype.navbarRootDropdowns;
/** @type {?} */ /** @type {?} */
ApplicationLayoutComponent.prototype.isOpenChangePassword;
/** @type {?} */
ApplicationLayoutComponent.prototype.isOpenProfile;
/** @type {?} */
ApplicationLayoutComponent.prototype.isDropdownChildDynamic; ApplicationLayoutComponent.prototype.isDropdownChildDynamic;
/** @type {?} */ /** @type {?} */
ApplicationLayoutComponent.prototype.rightPartElements; ApplicationLayoutComponent.prototype.rightPartElements;

2
npm/ng-packs/dist/theme-basic/fesm2015/abp-ng.theme.basic.js.map

File diff suppressed because one or more lines are too long

12
npm/ng-packs/dist/theme-basic/fesm5/abp-ng.theme.basic.js

@ -210,8 +210,6 @@ var ApplicationLayoutComponent = /** @class */ (function () {
function ApplicationLayoutComponent(store, oauthService) { function ApplicationLayoutComponent(store, oauthService) {
this.store = store; this.store = store;
this.oauthService = oauthService; this.oauthService = oauthService;
this.isOpenChangePassword = false;
this.isOpenProfile = false;
this.rightPartElements = []; this.rightPartElements = [];
this.trackByFn = (/** this.trackByFn = (/**
* @param {?} _ * @param {?} _
@ -343,7 +341,7 @@ var ApplicationLayoutComponent = /** @class */ (function () {
if (navigations.indexOf('LanguageRef') < 0) { if (navigations.indexOf('LanguageRef') < 0) {
this.store.dispatch(new AddNavigationElement([ this.store.dispatch(new AddNavigationElement([
{ element: this.languageRef, order: 4, name: 'LanguageRef' }, { element: this.languageRef, order: 4, name: 'LanguageRef' },
{ element: this.currentUserRef, order: 5, name: 'CurrentUserRef' } { element: this.currentUserRef, order: 5, name: 'CurrentUserRef' },
])); ]));
} }
this.navElements$ this.navElements$
@ -410,7 +408,7 @@ var ApplicationLayoutComponent = /** @class */ (function () {
function () { function () {
this.oauthService.logOut(); this.oauthService.logOut();
this.store.dispatch(new Navigate(['/'], null, { this.store.dispatch(new Navigate(['/'], null, {
state: { redirectUrl: this.store.selectSnapshot(RouterState).state.url } state: { redirectUrl: this.store.selectSnapshot(RouterState).state.url },
})); }));
this.store.dispatch(new GetAppConfiguration()); this.store.dispatch(new GetAppConfiguration());
}; };
@ -419,7 +417,7 @@ var ApplicationLayoutComponent = /** @class */ (function () {
ApplicationLayoutComponent.decorators = [ ApplicationLayoutComponent.decorators = [
{ type: Component, args: [{ { type: Component, args: [{
selector: 'abp-layout-application', selector: 'abp-layout-application',
template: "<abp-layout>\n <ul class=\"navbar-nav mr-auto\">\n <ng-container\n *ngFor=\"let route of visibleRoutes$ | async; trackBy: trackByFn\"\n [ngTemplateOutlet]=\"route?.children?.length ? dropdownLink : defaultLink\"\n [ngTemplateOutletContext]=\"{ $implicit: route }\"\n >\n </ng-container>\n\n <ng-template #defaultLink let-route>\n <li class=\"nav-item\" [abpPermission]=\"route.requiredPolicy\">\n <a class=\"nav-link\" [routerLink]=\"[route.url]\">{{ route.name | abpLocalization }}</a>\n </li>\n </ng-template>\n\n <ng-template #dropdownLink let-route>\n <li\n #navbarRootDropdown\n ngbDropdown\n [abpPermission]=\"route.requiredPolicy\"\n [abpVisibility]=\"routeContainer\"\n class=\"nav-item dropdown pointer\"\n display=\"static\"\n >\n <a ngbDropdownToggle class=\"nav-link dropdown-toggle pointer\" data-toggle=\"dropdown\">\n {{ route.name | abpLocalization }}\n </a>\n <div #routeContainer ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <ng-template\n #forTemplate\n ngFor\n [ngForOf]=\"route.children\"\n [ngForTrackBy]=\"trackByFn\"\n [ngForTemplate]=\"childWrapper\"\n ></ng-template>\n </div>\n </li>\n </ng-template>\n\n <ng-template #childWrapper let-child>\n <ng-template\n [ngTemplateOutlet]=\"child?.children?.length ? dropdownChild : defaultChild\"\n [ngTemplateOutletContext]=\"{ $implicit: child }\"\n ></ng-template>\n </ng-template>\n\n <ng-template #defaultChild let-child>\n <div class=\"dropdown-submenu\" [abpPermission]=\"child.requiredPolicy\">\n <a class=\"dropdown-item py-2 px-2\" [routerLink]=\"[child.url]\">\n <i *ngIf=\"child.iconClass\" [ngClass]=\"child.iconClass\"></i>\n {{ child.name | abpLocalization }}</a\n >\n </div>\n </ng-template>\n\n <ng-template #dropdownChild let-child>\n <div\n [abpVisibility]=\"childrenContainer\"\n class=\"dropdown-submenu pointer\"\n ngbDropdown\n [display]=\"isDropdownChildDynamic ? 'dynamic' : 'static'\"\n placement=\"right-top\"\n [abpPermission]=\"child.requiredPolicy\"\n >\n <div ngbDropdownToggle [class.dropdown-toggle]=\"false\" class=\"pointer\">\n <a\n abpEllipsis=\"210px\"\n [abpEllipsisEnabled]=\"isDropdownChildDynamic\"\n role=\"button\"\n class=\"btn d-block text-left py-2 px-2 dropdown-toggle\"\n >\n <i *ngIf=\"child.iconClass\" [ngClass]=\"child.iconClass\"></i>\n {{ child.name | abpLocalization }}\n </a>\n </div>\n <div #childrenContainer ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <ng-template\n ngFor\n [ngForOf]=\"child.children\"\n [ngForTrackBy]=\"trackByFn\"\n [ngForTemplate]=\"childWrapper\"\n ></ng-template>\n </div>\n </div>\n </ng-template>\n </ul>\n\n <ul class=\"navbar-nav ml-auto\">\n <ng-container\n *ngFor=\"let element of rightPartElements; trackBy: trackElementByFn\"\n [ngTemplateOutlet]=\"element\"\n ></ng-container>\n </ul>\n</abp-layout>\n\n<ng-template #language>\n <li class=\"nav-item dropdown pointer\" ngbDropdown>\n <a ngbDropdownToggle class=\"nav-link dropdown-toggle text-white pointer\" data-toggle=\"dropdown\">\n {{ defaultLanguage$ | async }}\n </a>\n <div ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <a\n *ngFor=\"let lang of dropdownLanguages$ | async\"\n class=\"dropdown-item\"\n (click)=\"onChangeLang(lang.cultureName)\"\n >{{ lang?.displayName }}</a\n >\n </div>\n </li>\n</ng-template>\n\n<ng-template #currentUser>\n <li *ngIf=\"(currentUser$ | async)?.isAuthenticated\" class=\"nav-item dropdown pointer\" ngbDropdown>\n <a ngbDropdownToggle class=\"nav-link dropdown-toggle text-white pointer\" data-toggle=\"dropdown\">\n {{ (currentUser$ | async)?.userName }}\n </a>\n <div ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <a class=\"dropdown-item pointer\" (click)=\"isOpenChangePassword = true\">{{\n 'AbpUi::ChangePassword' | abpLocalization\n }}</a>\n <a class=\"dropdown-item pointer\" (click)=\"isOpenProfile = true\">{{ 'AbpUi::PersonalInfo' | abpLocalization }}</a>\n <a class=\"dropdown-item pointer\" (click)=\"logout()\">{{ 'AbpUi::Logout' | abpLocalization }}</a>\n </div>\n </li>\n\n <abp-change-password [(visible)]=\"isOpenChangePassword\"></abp-change-password>\n\n <abp-profile [(visible)]=\"isOpenProfile\"></abp-profile>\n</ng-template>\n" template: "<abp-layout>\n <ul class=\"navbar-nav mr-auto\">\n <ng-container\n *ngFor=\"let route of visibleRoutes$ | async; trackBy: trackByFn\"\n [ngTemplateOutlet]=\"route?.children?.length ? dropdownLink : defaultLink\"\n [ngTemplateOutletContext]=\"{ $implicit: route }\"\n >\n </ng-container>\n\n <ng-template #defaultLink let-route>\n <li class=\"nav-item\" [abpPermission]=\"route.requiredPolicy\">\n <a class=\"nav-link\" [routerLink]=\"[route.url]\">{{ route.name | abpLocalization }}</a>\n </li>\n </ng-template>\n\n <ng-template #dropdownLink let-route>\n <li\n #navbarRootDropdown\n ngbDropdown\n [abpPermission]=\"route.requiredPolicy\"\n [abpVisibility]=\"routeContainer\"\n class=\"nav-item dropdown pointer\"\n display=\"static\"\n >\n <a ngbDropdownToggle class=\"nav-link dropdown-toggle pointer\" data-toggle=\"dropdown\">\n {{ route.name | abpLocalization }}\n </a>\n <div #routeContainer ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <ng-template\n #forTemplate\n ngFor\n [ngForOf]=\"route.children\"\n [ngForTrackBy]=\"trackByFn\"\n [ngForTemplate]=\"childWrapper\"\n ></ng-template>\n </div>\n </li>\n </ng-template>\n\n <ng-template #childWrapper let-child>\n <ng-template\n [ngTemplateOutlet]=\"child?.children?.length ? dropdownChild : defaultChild\"\n [ngTemplateOutletContext]=\"{ $implicit: child }\"\n ></ng-template>\n </ng-template>\n\n <ng-template #defaultChild let-child>\n <div class=\"dropdown-submenu\" [abpPermission]=\"child.requiredPolicy\">\n <a class=\"dropdown-item py-2 px-2\" [routerLink]=\"[child.url]\">\n <i *ngIf=\"child.iconClass\" [ngClass]=\"child.iconClass\"></i>\n {{ child.name | abpLocalization }}</a\n >\n </div>\n </ng-template>\n\n <ng-template #dropdownChild let-child>\n <div\n [abpVisibility]=\"childrenContainer\"\n class=\"dropdown-submenu pointer\"\n ngbDropdown\n [display]=\"isDropdownChildDynamic ? 'dynamic' : 'static'\"\n placement=\"right-top\"\n [abpPermission]=\"child.requiredPolicy\"\n >\n <div ngbDropdownToggle [class.dropdown-toggle]=\"false\" class=\"pointer\">\n <a\n abpEllipsis=\"210px\"\n [abpEllipsisEnabled]=\"isDropdownChildDynamic\"\n role=\"button\"\n class=\"btn d-block text-left py-2 px-2 dropdown-toggle\"\n >\n <i *ngIf=\"child.iconClass\" [ngClass]=\"child.iconClass\"></i>\n {{ child.name | abpLocalization }}\n </a>\n </div>\n <div #childrenContainer ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <ng-template\n ngFor\n [ngForOf]=\"child.children\"\n [ngForTrackBy]=\"trackByFn\"\n [ngForTemplate]=\"childWrapper\"\n ></ng-template>\n </div>\n </div>\n </ng-template>\n </ul>\n\n <ul class=\"navbar-nav ml-auto\">\n <ng-container\n *ngFor=\"let element of rightPartElements; trackBy: trackElementByFn\"\n [ngTemplateOutlet]=\"element\"\n ></ng-container>\n </ul>\n</abp-layout>\n\n<ng-template #language>\n <li class=\"nav-item dropdown pointer\" ngbDropdown>\n <a ngbDropdownToggle class=\"nav-link dropdown-toggle text-white pointer\" data-toggle=\"dropdown\">\n {{ defaultLanguage$ | async }}\n </a>\n <div ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <a\n *ngFor=\"let lang of dropdownLanguages$ | async\"\n class=\"dropdown-item\"\n (click)=\"onChangeLang(lang.cultureName)\"\n >{{ lang?.displayName }}</a\n >\n </div>\n </li>\n</ng-template>\n\n<ng-template #currentUser>\n <li *ngIf=\"(currentUser$ | async)?.isAuthenticated\" class=\"nav-item dropdown pointer\" ngbDropdown>\n <a ngbDropdownToggle class=\"nav-link dropdown-toggle text-white pointer\" data-toggle=\"dropdown\">\n {{ (currentUser$ | async)?.userName }}\n </a>\n <div ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <a class=\"dropdown-item pointer\" routerLink=\"/account/manage-profile\">{{\n 'AbpAccount::ManageYourProfile' | abpLocalization\n }}</a>\n <a class=\"dropdown-item pointer\" (click)=\"logout()\">{{ 'AbpUi::Logout' | abpLocalization }}</a>\n </div>\n </li>\n</ng-template>\n"
}] } }] }
]; ];
/** @nocollapse */ /** @nocollapse */
@ -468,10 +466,6 @@ if (false) {
/** @type {?} */ /** @type {?} */
ApplicationLayoutComponent.prototype.navbarRootDropdowns; ApplicationLayoutComponent.prototype.navbarRootDropdowns;
/** @type {?} */ /** @type {?} */
ApplicationLayoutComponent.prototype.isOpenChangePassword;
/** @type {?} */
ApplicationLayoutComponent.prototype.isOpenProfile;
/** @type {?} */
ApplicationLayoutComponent.prototype.isDropdownChildDynamic; ApplicationLayoutComponent.prototype.isDropdownChildDynamic;
/** @type {?} */ /** @type {?} */
ApplicationLayoutComponent.prototype.rightPartElements; ApplicationLayoutComponent.prototype.rightPartElements;

2
npm/ng-packs/dist/theme-basic/fesm5/abp-ng.theme.basic.js.map

File diff suppressed because one or more lines are too long

2
npm/ng-packs/dist/theme-basic/lib/components/application-layout/application-layout.component.d.ts

@ -16,8 +16,6 @@ export declare class ApplicationLayoutComponent implements AfterViewInit, OnDest
currentUserRef: TemplateRef<any>; currentUserRef: TemplateRef<any>;
languageRef: TemplateRef<any>; languageRef: TemplateRef<any>;
navbarRootDropdowns: QueryList<NgbDropdown>; navbarRootDropdowns: QueryList<NgbDropdown>;
isOpenChangePassword: boolean;
isOpenProfile: boolean;
isDropdownChildDynamic: boolean; isDropdownChildDynamic: boolean;
readonly visibleRoutes$: Observable<ABP.FullRoute[]>; readonly visibleRoutes$: Observable<ABP.FullRoute[]>;
readonly defaultLanguage$: Observable<string>; readonly defaultLanguage$: Observable<string>;

1
npm/ng-packs/packages/account-config/src/lib/services/account-config.service.ts

@ -15,6 +15,7 @@ export class AccountConfigService {
children: [ children: [
{ path: 'login', name: 'AbpAccount::Login', order: 1 }, { path: 'login', name: 'AbpAccount::Login', order: 1 },
{ path: 'register', name: 'AbpAccount::Register', order: 2 }, { path: 'register', name: 'AbpAccount::Register', order: 2 },
{ path: 'manage-profile', name: 'AbpAccount::ManageYourProfile', order: 3 },
], ],
}); });
} }

14
npm/ng-packs/packages/account/src/lib/account-routing.module.ts

@ -1,15 +1,23 @@
import { DynamicLayoutComponent } from '@abp/ng.core';
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router'; import { RouterModule, Routes } from '@angular/router';
import { LoginComponent } from './components/login/login.component'; import { LoginComponent } from './components/login/login.component';
import { ManageProfileComponent } from './components/manage-profile/manage-profile.component';
import { RegisterComponent } from './components/register/register.component'; import { RegisterComponent } from './components/register/register.component';
import { DynamicLayoutComponent } from '@abp/ng.core';
const routes: Routes = [ const routes: Routes = [
{ path: '', pathMatch: 'full', redirectTo: 'login' }, { path: '', pathMatch: 'full', redirectTo: 'login' },
{ {
path: '', path: '',
component: DynamicLayoutComponent, component: DynamicLayoutComponent,
children: [{ path: 'login', component: LoginComponent }, { path: 'register', component: RegisterComponent }], children: [
{ path: 'login', component: LoginComponent },
{ path: 'register', component: RegisterComponent },
{
path: 'manage-profile',
component: ManageProfileComponent,
},
],
}, },
]; ];

12
npm/ng-packs/packages/account/src/lib/account.module.ts

@ -5,14 +5,24 @@ import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
import { NgxValidateCoreModule } from '@ngx-validate/core'; import { NgxValidateCoreModule } from '@ngx-validate/core';
import { TableModule } from 'primeng/table'; import { TableModule } from 'primeng/table';
import { AccountRoutingModule } from './account-routing.module'; import { AccountRoutingModule } from './account-routing.module';
import { ChangePasswordComponent } from './components/change-password/change-password.component';
import { LoginComponent } from './components/login/login.component'; import { LoginComponent } from './components/login/login.component';
import { ManageProfileComponent } from './components/manage-profile/manage-profile.component';
import { PersonalSettingsComponent } from './components/personal-settings/personal-settings.component';
import { RegisterComponent } from './components/register/register.component'; import { RegisterComponent } from './components/register/register.component';
import { TenantBoxComponent } from './components/tenant-box/tenant-box.component'; import { TenantBoxComponent } from './components/tenant-box/tenant-box.component';
import { Options } from './models/options'; import { Options } from './models/options';
import { ACCOUNT_OPTIONS, optionsFactory } from './tokens/options.token'; import { ACCOUNT_OPTIONS, optionsFactory } from './tokens/options.token';
@NgModule({ @NgModule({
declarations: [LoginComponent, RegisterComponent, TenantBoxComponent], declarations: [
LoginComponent,
RegisterComponent,
TenantBoxComponent,
ChangePasswordComponent,
ManageProfileComponent,
PersonalSettingsComponent,
],
imports: [CoreModule, AccountRoutingModule, ThemeSharedModule, TableModule, NgbDropdownModule, NgxValidateCoreModule], imports: [CoreModule, AccountRoutingModule, ThemeSharedModule, TableModule, NgbDropdownModule, NgxValidateCoreModule],
exports: [], exports: [],
}) })

19
npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.html

@ -0,0 +1,19 @@
<form [formGroup]="form" (ngSubmit)="onSubmit()" [mapErrorsFn]="mapErrorsFn">
<div class="form-group">
<label for="current-password">{{ 'AbpIdentity::DisplayName:CurrentPassword' | abpLocalization }}</label
><span> * </span
><input type="password" id="current-password" class="form-control" formControlName="password" autofocus />
</div>
<div class="form-group">
<label for="new-password">{{ 'AbpIdentity::DisplayName:NewPassword' | abpLocalization }}</label
><span> * </span><input type="password" id="new-password" class="form-control" formControlName="newPassword" />
</div>
<div class="form-group">
<label for="confirm-new-password">{{ 'AbpIdentity::DisplayName:NewPasswordConfirm' | abpLocalization }}</label
><span> * </span
><input type="password" id="confirm-new-password" class="form-control" formControlName="repeatNewPassword" />
</div>
<abp-button iconClass="fa fa-check" buttonClass="btn btn-primary color-white" (click)="onSubmit()">{{
'AbpIdentity::Save' | abpLocalization
}}</abp-button>
</form>

63
npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts

@ -0,0 +1,63 @@
import { ChangePassword } from '@abp/ng.core';
import { ToasterService } from '@abp/ng.theme.shared';
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { comparePasswords, Validation } from '@ngx-validate/core';
import { Store } from '@ngxs/store';
import snq from 'snq';
const { minLength, required } = Validators;
const PASSWORD_FIELDS = ['newPassword', 'repeatNewPassword'];
@Component({
selector: 'abp-change-password-form',
templateUrl: './change-password.component.html',
})
export class ChangePasswordComponent implements OnInit {
form: FormGroup;
mapErrorsFn: Validation.MapErrorsFn = (errors, groupErrors, control) => {
if (PASSWORD_FIELDS.indexOf(control.name) < 0) return errors;
return errors.concat(groupErrors.filter(({ key }) => key === 'passwordMismatch'));
}
constructor(private fb: FormBuilder, private store: Store, private toasterService: ToasterService) {}
ngOnInit(): void {
this.form = this.fb.group(
{
password: ['', required],
newPassword: ['', required],
repeatNewPassword: ['', required],
},
{
validators: [comparePasswords(PASSWORD_FIELDS)],
},
);
}
onSubmit() {
if (this.form.invalid) return;
this.store
.dispatch(
new ChangePassword({
currentPassword: this.form.get('password').value,
newPassword: this.form.get('newPassword').value,
}),
)
.subscribe({
next: () => {
this.form.reset();
this.toasterService.success('AbpAccount::PasswordChangedMessage', 'Success', { life: 5000 });
},
error: err => {
this.toasterService.error(snq(() => err.error.error.message, 'AbpAccount::DefaultErrorMessage'), 'Error', {
life: 7000,
});
},
});
}
}

3
npm/ng-packs/packages/account/src/lib/components/index.ts

@ -1,2 +1,5 @@
export * from './change-password/change-password.component';
export * from './login/login.component'; export * from './login/login.component';
export * from './manage-profile/manage-profile.component';
export * from './register/register.component'; export * from './register/register.component';
export * from './personal-settings/personal-settings.component';

36
npm/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.html

@ -0,0 +1,36 @@
<div class="row entry-row">
<div class="col-auto"></div>
<div id="breadcrumb" class="col-md-auto pl-md-0"></div>
<div class="col"></div>
</div>
<div id="ManageProfileWrapper">
<div class="row">
<div class="col-3">
<ul class="nav flex-column nav-pills" id="nav-tab" role="tablist">
<li class="nav-item pointer" (click)="selectedTab = 0">
<a class="nav-link" [ngClass]="{ active: selectedTab === 0 }" role="tab">{{
'AbpUi::ChangePassword' | abpLocalization
}}</a>
</li>
<li class="nav-item pointer" (click)="selectedTab = 1">
<a class="nav-link" [ngClass]="{ active: selectedTab === 1 }" role="tab">{{
'AbpAccount::PersonalSettings' | abpLocalization
}}</a>
</li>
</ul>
</div>
<div class="col-9">
<div class="tab-content" *ngIf="selectedTab === 0">
<div class="tab-pane fade show active" role="tabpanel">
<abp-change-password-form></abp-change-password-form>
</div>
</div>
<div class="tab-content" *ngIf="selectedTab === 1">
<div class="tab-pane fade show active" role="tabpanel">
<abp-personal-settings-form></abp-personal-settings-form>
</div>
</div>
</div>
</div>
</div>

13
npm/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.ts

@ -0,0 +1,13 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'abp-manage-profile',
templateUrl: './manage-profile.component.html',
})
export class ManageProfileComponent implements OnInit {
selectedTab = 0;
constructor() {}
ngOnInit(): void {}
}

31
npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.html

@ -0,0 +1,31 @@
<form novalidate *ngIf="form" [formGroup]="form" (ngSubmit)="submit()">
<div class="form-group">
<label for="username">{{ 'AbpIdentity::DisplayName:UserName' | abpLocalization }}</label
><span> * </span><input type="text" id="username" class="form-control" formControlName="userName" autofocus />
</div>
<div class="row">
<div class="col col-md-6">
<div class="form-group">
<label for="name">{{ 'AbpIdentity::DisplayName:Name' | abpLocalization }}</label
><input type="text" id="name" class="form-control" formControlName="name" />
</div>
</div>
<div class="col col-md-6">
<div class="form-group">
<label for="surname">{{ 'AbpIdentity::DisplayName:Surname' | abpLocalization }}</label
><input type="text" id="surname" class="form-control" formControlName="surname" />
</div>
</div>
</div>
<div class="form-group">
<label for="email-address">{{ 'AbpIdentity::DisplayName:Email' | abpLocalization }}</label
><span> * </span><input type="text" id="email-address" class="form-control" formControlName="email" />
</div>
<div class="form-group">
<label for="phone-number">{{ 'AbpIdentity::DisplayName:PhoneNumber' | abpLocalization }}</label
><input type="text" id="phone-number" class="form-control" formControlName="phoneNumber" />
</div>
<abp-button iconClass="fa fa-check" buttonClass="btn btn-primary color-white" (click)="submit()">
{{ 'AbpIdentity::Save' | abpLocalization }}</abp-button
>
</form>

52
npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts

@ -0,0 +1,52 @@
import { GetProfile, Profile, ProfileState, UpdateProfile } from '@abp/ng.core';
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Select, Store } from '@ngxs/store';
import { Observable } from 'rxjs';
import { take, withLatestFrom } from 'rxjs/operators';
import { ToasterService } from '@abp/ng.theme.shared';
const { maxLength, required, email } = Validators;
@Component({
selector: 'abp-personal-settings-form',
templateUrl: './personal-settings.component.html',
})
export class PersonalSettingsComponent implements OnInit {
@Select(ProfileState.getProfile)
profile$: Observable<Profile.Response>;
form: FormGroup;
constructor(private fb: FormBuilder, private store: Store, private toasterService: ToasterService) {}
buildForm() {
this.store
.dispatch(new GetProfile())
.pipe(
withLatestFrom(this.profile$),
take(1),
)
.subscribe(([, profile]) => {
this.form = this.fb.group({
userName: [profile.userName, [required, maxLength(256)]],
email: [profile.email, [required, email, maxLength(256)]],
name: [profile.name || '', [maxLength(64)]],
surname: [profile.surname || '', [maxLength(64)]],
phoneNumber: [profile.phoneNumber || '', [maxLength(16)]],
});
});
}
submit() {
if (this.form.invalid) return;
this.store.dispatch(new UpdateProfile(this.form.value)).subscribe(() => {
this.toasterService.success('AbpAccount::PersonalSettingsSaved', 'Success', { life: 5000 });
});
}
ngOnInit() {
this.buildForm();
}
}
Loading…
Cancel
Save