@abp/ng.theme.basic 5.0.1 → 5.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/{esm2015/abp-ng.theme.basic.js → esm2020/abp-ng.theme.basic.mjs} +0 -0
  2. package/esm2020/lib/components/account-layout/account-layout.component.mjs +32 -0
  3. package/esm2020/lib/components/account-layout/auth-wrapper/auth-wrapper.component.mjs +19 -0
  4. package/esm2020/lib/components/account-layout/tenant-box/tenant-box.component.mjs +20 -0
  5. package/esm2020/lib/components/application-layout/application-layout.component.mjs +31 -0
  6. package/{esm2015/lib/components/empty-layout/empty-layout.component.js → esm2020/lib/components/empty-layout/empty-layout.component.mjs} +5 -5
  7. package/{esm2015/lib/components/index.js → esm2020/lib/components/index.mjs} +2 -2
  8. package/{esm2015/lib/components/logo/logo.component.js → esm2020/lib/components/logo/logo.component.mjs} +5 -5
  9. package/esm2020/lib/components/nav-items/current-user.component.mjs +39 -0
  10. package/esm2020/lib/components/nav-items/languages.component.mjs +107 -0
  11. package/esm2020/lib/components/nav-items/nav-items.component.mjs +19 -0
  12. package/esm2020/lib/components/page-alert-container/page-alert-container.component.mjs +18 -0
  13. package/esm2020/lib/components/routes/routes.component.mjs +37 -0
  14. package/esm2020/lib/components/validation-error/validation-error.component.mjs +44 -0
  15. package/{esm2015/lib/constants/styles.js → esm2020/lib/constants/styles.mjs} +0 -0
  16. package/{esm2015/lib/enums/components.js → esm2020/lib/enums/components.mjs} +0 -0
  17. package/{esm2015/lib/enums/index.js → esm2020/lib/enums/index.mjs} +2 -1
  18. package/esm2020/lib/enums/user-menu-items.mjs +2 -0
  19. package/{esm2015/lib/handlers/index.js → esm2020/lib/handlers/index.mjs} +0 -0
  20. package/{esm2015/lib/handlers/lazy-style.handler.js → esm2020/lib/handlers/lazy-style.handler.mjs} +4 -4
  21. package/{esm2015/lib/models/index.js → esm2020/lib/models/index.mjs} +0 -0
  22. package/{esm2015/lib/models/layout.js → esm2020/lib/models/layout.mjs} +0 -0
  23. package/{esm2015/lib/providers/index.js → esm2020/lib/providers/index.mjs} +2 -1
  24. package/{esm2015/lib/providers/nav-item.provider.js → esm2020/lib/providers/nav-item.provider.mjs} +0 -0
  25. package/{esm2015/lib/providers/styles.provider.js → esm2020/lib/providers/styles.provider.mjs} +0 -0
  26. package/esm2020/lib/providers/user-menu.provider.mjs +41 -0
  27. package/{esm2015/lib/services/layout.service.js → esm2020/lib/services/layout.service.mjs} +4 -4
  28. package/esm2020/lib/theme-basic.module.mjs +128 -0
  29. package/{esm2015/lib/tokens/index.js → esm2020/lib/tokens/index.mjs} +0 -0
  30. package/{esm2015/lib/tokens/lazy-styles.token.js → esm2020/lib/tokens/lazy-styles.token.mjs} +0 -0
  31. package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
  32. package/{esm2015/testing/abp-ng.theme.basic-testing.js → esm2020/testing/abp-ng.theme.basic-testing.mjs} +0 -0
  33. package/{esm2015/testing/lib/theme-basic-testing.module.js → esm2020/testing/lib/theme-basic-testing.module.mjs} +5 -5
  34. package/{esm2015/testing/public-api.js → esm2020/testing/public-api.mjs} +0 -0
  35. package/fesm2015/{abp-ng.theme.basic-testing.js → abp-ng.theme.basic-testing.mjs} +5 -5
  36. package/fesm2015/abp-ng.theme.basic-testing.mjs.map +1 -0
  37. package/fesm2015/abp-ng.theme.basic.mjs +833 -0
  38. package/fesm2015/abp-ng.theme.basic.mjs.map +1 -0
  39. package/fesm2020/abp-ng.theme.basic-testing.mjs +45 -0
  40. package/fesm2020/abp-ng.theme.basic-testing.mjs.map +1 -0
  41. package/fesm2020/abp-ng.theme.basic.mjs +835 -0
  42. package/fesm2020/abp-ng.theme.basic.mjs.map +1 -0
  43. package/lib/components/index.d.ts +1 -1
  44. package/lib/components/nav-items/current-user.component.d.ts +6 -2
  45. package/lib/enums/index.d.ts +1 -0
  46. package/lib/enums/user-menu-items.d.ts +4 -0
  47. package/lib/providers/index.d.ts +1 -0
  48. package/lib/providers/user-menu.provider.d.ts +8 -0
  49. package/package.json +30 -9
  50. package/testing/package.json +5 -5
  51. package/bundles/abp-ng.theme.basic-testing.umd.js +0 -73
  52. package/bundles/abp-ng.theme.basic-testing.umd.js.map +0 -1
  53. package/bundles/abp-ng.theme.basic.umd.js +0 -989
  54. package/bundles/abp-ng.theme.basic.umd.js.map +0 -1
  55. package/esm2015/lib/components/account-layout/account-layout.component.js +0 -36
  56. package/esm2015/lib/components/account-layout/auth-wrapper/auth-wrapper.component.js +0 -23
  57. package/esm2015/lib/components/account-layout/tenant-box/tenant-box.component.js +0 -24
  58. package/esm2015/lib/components/application-layout/application-layout.component.js +0 -36
  59. package/esm2015/lib/components/nav-items/current-user.component.js +0 -38
  60. package/esm2015/lib/components/nav-items/languages.component.js +0 -107
  61. package/esm2015/lib/components/nav-items/nav-items.component.js +0 -22
  62. package/esm2015/lib/components/page-alert-container/page-alert-container.component.js +0 -22
  63. package/esm2015/lib/components/routes/routes.component.js +0 -40
  64. package/esm2015/lib/components/validation-error/validation-error.component.js +0 -40
  65. package/esm2015/lib/theme-basic.module.js +0 -127
  66. package/fesm2015/abp-ng.theme.basic-testing.js.map +0 -1
  67. package/fesm2015/abp-ng.theme.basic.js +0 -821
  68. package/fesm2015/abp-ng.theme.basic.js.map +0 -1
@@ -1,821 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable, Component, Input, ViewChildren, ViewEncapsulation, Inject, ChangeDetectionStrategy, InjectionToken, APP_INITIALIZER, NgModule } from '@angular/core';
3
- import * as i1 from '@abp/ng.core';
4
- import { SubscriptionService, NAVIGATE_TO_MANAGE_PROFILE, LazyLoadService, LOADING_STRATEGY, DomInsertionService, ReplaceableComponentsService, CONTENT_STRATEGY, CoreModule, noop } from '@abp/ng.core';
5
- import { fromEvent } from 'rxjs';
6
- import { debounceTime, map } from 'rxjs/operators';
7
- import * as i2 from '@angular/router';
8
- import * as i2$1 from '@angular/common';
9
- import * as i3 from '@ng-bootstrap/ng-bootstrap';
10
- import { NgbCollapseModule, NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
11
- import * as i1$1 from '@abp/ng.theme.shared';
12
- import { slideFromBottom, collapseWithMargin, DocumentDirHandlerService, NavItemsService, ThemeSharedModule } from '@abp/ng.theme.shared';
13
- import * as i1$2 from '@abp/ng.account.core';
14
- import { TenantBoxService, AuthWrapperService } from '@abp/ng.account.core';
15
- import * as i4 from '@angular/forms';
16
- import { ValidationErrorComponent as ValidationErrorComponent$1, NgxValidateCoreModule, VALIDATION_ERROR_TEMPLATE, VALIDATION_TARGET_SELECTOR, VALIDATION_INVALID_CLASSES } from '@ngx-validate/core';
17
-
18
- class LayoutService {
19
- constructor(subscription, cdRef) {
20
- this.subscription = subscription;
21
- this.cdRef = cdRef;
22
- this.isCollapsed = true;
23
- this.logoComponentKey = "Theme.LogoComponent" /* Logo */;
24
- this.routesComponentKey = "Theme.RoutesComponent" /* Routes */;
25
- this.navItemsComponentKey = "Theme.NavItemsComponent" /* NavItems */;
26
- }
27
- checkWindowWidth() {
28
- const isSmallScreen = window.innerWidth < 992;
29
- if (isSmallScreen && this.smallScreen === false) {
30
- this.isCollapsed = false;
31
- setTimeout(() => {
32
- this.isCollapsed = true;
33
- }, 100);
34
- }
35
- this.smallScreen = isSmallScreen;
36
- this.cdRef.detectChanges();
37
- }
38
- subscribeWindowSize() {
39
- this.checkWindowWidth();
40
- const resize$ = fromEvent(window, 'resize').pipe(debounceTime(150));
41
- this.subscription.addOne(resize$, () => this.checkWindowWidth());
42
- }
43
- }
44
- LayoutService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LayoutService, deps: [{ token: i1.SubscriptionService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Injectable });
45
- LayoutService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LayoutService });
46
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LayoutService, decorators: [{
47
- type: Injectable
48
- }], ctorParameters: function () { return [{ type: i1.SubscriptionService }, { type: i0.ChangeDetectorRef }]; } });
49
-
50
- class LogoComponent {
51
- constructor(environment) {
52
- this.environment = environment;
53
- }
54
- get appInfo() {
55
- return this.environment.getEnvironment().application;
56
- }
57
- }
58
- LogoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LogoComponent, deps: [{ token: i1.EnvironmentService }], target: i0.ɵɵFactoryTarget.Component });
59
- LogoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: LogoComponent, selector: "abp-logo", ngImport: i0, template: `
60
- <a class="navbar-brand" routerLink="/">
61
- <img
62
- *ngIf="appInfo.logoUrl; else appName"
63
- [src]="appInfo.logoUrl"
64
- [alt]="appInfo.name"
65
- width="100%"
66
- height="auto"
67
- />
68
- </a>
69
-
70
- <ng-template #appName>
71
- {{ appInfo.name }}
72
- </ng-template>
73
- `, isInline: true, directives: [{ type: i2.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
74
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LogoComponent, decorators: [{
75
- type: Component,
76
- args: [{
77
- selector: 'abp-logo',
78
- template: `
79
- <a class="navbar-brand" routerLink="/">
80
- <img
81
- *ngIf="appInfo.logoUrl; else appName"
82
- [src]="appInfo.logoUrl"
83
- [alt]="appInfo.name"
84
- width="100%"
85
- height="auto"
86
- />
87
- </a>
88
-
89
- <ng-template #appName>
90
- {{ appInfo.name }}
91
- </ng-template>
92
- `,
93
- }]
94
- }], ctorParameters: function () { return [{ type: i1.EnvironmentService }]; } });
95
-
96
- class RoutesComponent {
97
- constructor(routesService, renderer) {
98
- this.routesService = routesService;
99
- this.renderer = renderer;
100
- this.rootDropdownExpand = {};
101
- this.trackByFn = (_, item) => item.name;
102
- }
103
- isDropdown(node) {
104
- return !(node === null || node === void 0 ? void 0 : node.isLeaf) || this.routesService.hasChildren(node.name);
105
- }
106
- closeDropdown() {
107
- this.childrenContainers.forEach(({ nativeElement }) => {
108
- this.renderer.addClass(nativeElement, 'd-none');
109
- setTimeout(() => this.renderer.removeClass(nativeElement, 'd-none'), 0);
110
- });
111
- }
112
- }
113
- RoutesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RoutesComponent, deps: [{ token: i1.RoutesService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
114
- RoutesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: RoutesComponent, selector: "abp-routes", inputs: { smallScreen: "smallScreen" }, viewQueries: [{ propertyName: "childrenContainers", predicate: ["childrenContainer"], descendants: true }], ngImport: i0, template: "<ul class=\"navbar-nav\">\r\n <ng-container\r\n *ngFor=\"let route of routesService.visible$ | async; trackBy: trackByFn\"\r\n [ngTemplateOutlet]=\"isDropdown(route) ? dropdownLink : defaultLink\"\r\n [ngTemplateOutletContext]=\"{ $implicit: route }\"\r\n >\r\n </ng-container>\r\n\r\n <ng-template #defaultLink let-route>\r\n <li class=\"nav-item\" *abpPermission=\"route.requiredPolicy\">\r\n <a class=\"nav-link\" [routerLink]=\"[route.path]\"\r\n ><i *ngIf=\"route.iconClass\" [ngClass]=\"route.iconClass\"></i>\r\n {{ route.name | abpLocalization }}</a\r\n >\r\n </li>\r\n </ng-template>\r\n\r\n <ng-template #dropdownLink let-route>\r\n <ng-container *ngIf=\"route.children?.length\">\r\n <li\r\n class=\"nav-item dropdown\"\r\n display=\"static\"\r\n *abpPermission=\"route.requiredPolicy\"\r\n (click)=\"\r\n rootDropdownExpand[route.name]\r\n ? (rootDropdownExpand[route.name] = false)\r\n : (rootDropdownExpand[route.name] = true)\r\n \"\r\n >\r\n <a\r\n class=\"nav-link dropdown-toggle\"\r\n data-toggle=\"dropdown\"\r\n aria-haspopup=\"true\"\r\n aria-expanded=\"false\"\r\n href=\"javascript:void(0)\"\r\n >\r\n <i *ngIf=\"route.iconClass\" [ngClass]=\"route.iconClass\"></i>\r\n {{ route.name | abpLocalization }}\r\n </a>\r\n <div\r\n #routeContainer\r\n class=\"dropdown-menu border-0 shadow-sm\"\r\n (click)=\"$event.preventDefault(); $event.stopPropagation()\"\r\n [class.d-block]=\"smallScreen && rootDropdownExpand[route.name]\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"forTemplate; context: { $implicit: route }\"\r\n ></ng-container>\r\n </div>\r\n </li>\r\n </ng-container>\r\n </ng-template>\r\n\r\n <ng-template #forTemplate let-route>\r\n <ng-container *ngFor=\"let child of route.children\">\r\n <ng-template\r\n [ngTemplateOutlet]=\"child.children?.length ? dropdownChild : defaultChild\"\r\n [ngTemplateOutletContext]=\"{ $implicit: child }\"\r\n ></ng-template>\r\n </ng-container>\r\n </ng-template>\r\n\r\n <ng-template #defaultChild let-child>\r\n <ng-container *ngIf=\"child.path\">\r\n <div class=\"dropdown-submenu\" *abpPermission=\"child.requiredPolicy\">\r\n <a class=\"dropdown-item\" [routerLink]=\"[child.path]\" (click)=\"closeDropdown()\">\r\n <i *ngIf=\"child.iconClass\" [ngClass]=\"child.iconClass\"></i>\r\n {{ child.name | abpLocalization }}</a\r\n >\r\n </div>\r\n </ng-container>\r\n </ng-template>\r\n\r\n <ng-template #dropdownChild let-child>\r\n <div\r\n class=\"dropdown-submenu\"\r\n ngbDropdown\r\n #dropdownSubmenu=\"ngbDropdown\"\r\n placement=\"right-top\"\r\n [autoClose]=\"true\"\r\n *abpPermission=\"child.requiredPolicy\"\r\n >\r\n <div ngbDropdownToggle [class.dropdown-toggle]=\"false\">\r\n <a\r\n abpEllipsis=\"210px\"\r\n [abpEllipsisEnabled]=\"!smallScreen\"\r\n role=\"button\"\r\n class=\"btn d-block text-start dropdown-toggle\"\r\n >\r\n <i *ngIf=\"child.iconClass\" [ngClass]=\"child.iconClass\"></i>\r\n {{ child.name | abpLocalization }}\r\n </a>\r\n </div>\r\n <div\r\n #childrenContainer\r\n class=\"dropdown-menu dropdown-menu-start border-0 shadow-sm\"\r\n [class.d-block]=\"smallScreen && dropdownSubmenu.isOpen()\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"forTemplate; context: { $implicit: child }\"></ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n</ul>\r\n", directives: [{ type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission"] }, { type: i2.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgbDropdown, selector: "[ngbDropdown]", inputs: ["open", "placement", "container", "autoClose", "display", "dropdownClass"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { type: i3.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { type: i1$1.EllipsisDirective, selector: "[abpEllipsis]", inputs: ["abpEllipsis", "title", "abpEllipsisEnabled"] }], pipes: { "async": i2$1.AsyncPipe, "abpLocalization": i1.LocalizationPipe } });
115
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RoutesComponent, decorators: [{
116
- type: Component,
117
- args: [{
118
- selector: 'abp-routes',
119
- templateUrl: 'routes.component.html',
120
- }]
121
- }], ctorParameters: function () { return [{ type: i1.RoutesService }, { type: i0.Renderer2 }]; }, propDecorators: { smallScreen: [{
122
- type: Input
123
- }], childrenContainers: [{
124
- type: ViewChildren,
125
- args: ['childrenContainer']
126
- }] } });
127
-
128
- class NavItemsComponent {
129
- constructor(navItems) {
130
- this.navItems = navItems;
131
- this.trackByFn = (_, element) => element.id;
132
- }
133
- }
134
- NavItemsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: NavItemsComponent, deps: [{ token: i1$1.NavItemsService }], target: i0.ɵɵFactoryTarget.Component });
135
- NavItemsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: NavItemsComponent, selector: "abp-nav-items", ngImport: i0, template: "<ul class=\"navbar-nav\">\r\n <ng-container *ngFor=\"let item of navItems.items$ | async; trackBy: trackByFn\">\r\n <ng-container *ngIf=\"item.visible && item.visible()\">\r\n <li class=\"nav-item d-flex align-items-center\" *abpPermission=\"item.requiredPolicy\">\r\n <ng-container\r\n *ngIf=\"item.component; else htmlTemplate\"\r\n [ngComponentOutlet]=\"item.component\"\r\n ></ng-container>\r\n\r\n <ng-template #htmlTemplate>\r\n <div [innerHTML]=\"item.html\" (click)=\"item.action ? item.action() : null\"></div>\r\n </ng-template>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n</ul>\r\n", directives: [{ type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission"] }, { type: i2$1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModuleFactory"] }], pipes: { "async": i2$1.AsyncPipe } });
136
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: NavItemsComponent, decorators: [{
137
- type: Component,
138
- args: [{
139
- selector: 'abp-nav-items',
140
- templateUrl: 'nav-items.component.html',
141
- }]
142
- }], ctorParameters: function () { return [{ type: i1$1.NavItemsService }]; } });
143
-
144
- class PageAlertContainerComponent {
145
- constructor(service) {
146
- this.service = service;
147
- }
148
- }
149
- PageAlertContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageAlertContainerComponent, deps: [{ token: i1$1.PageAlertService }], target: i0.ɵɵFactoryTarget.Component });
150
- PageAlertContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: PageAlertContainerComponent, selector: "abp-page-alert-container", ngImport: i0, template: "<ng-container *ngFor=\"let alert of service.alerts$ | async; let i = index\">\r\n <div\r\n class=\"alert alert-{{ alert.type }} fade show\"\r\n [ngClass]=\"{ 'alert-dismissible fade show': alert.dismissible }\"\r\n role=\"alert\"\r\n >\r\n <h4 class=\"alert-heading\" *ngIf=\"alert.title\">\r\n {{ alert.title | abpLocalization: alert.titleLocalizationParams }}\r\n </h4>\r\n {{ alert.message | abpLocalization: alert.messageLocalizationParams }}\r\n <button\r\n *ngIf=\"alert.dismissible\"\r\n type=\"button\"\r\n class=\"btn-close\"\r\n data-dismiss=\"alert\"\r\n aria-label=\"Close\"\r\n (click)=\"service.remove(i)\"\r\n ></button>\r\n </div>\r\n</ng-container>\r\n", directives: [{ type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i2$1.AsyncPipe, "abpLocalization": i1.LocalizationPipe }, encapsulation: i0.ViewEncapsulation.None });
151
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageAlertContainerComponent, decorators: [{
152
- type: Component,
153
- args: [{
154
- selector: 'abp-page-alert-container',
155
- templateUrl: './page-alert-container.component.html',
156
- encapsulation: ViewEncapsulation.None,
157
- }]
158
- }], ctorParameters: function () { return [{ type: i1$1.PageAlertService }]; } });
159
-
160
- class TenantBoxComponent {
161
- constructor(service) {
162
- this.service = service;
163
- }
164
- }
165
- TenantBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: TenantBoxComponent, deps: [{ token: i1$2.TenantBoxService }], target: i0.ɵɵFactoryTarget.Component });
166
- TenantBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: TenantBoxComponent, selector: "abp-tenant-box", providers: [TenantBoxService], ngImport: i0, template: "<ng-container *ngIf=\"(service.currentTenant$ | async) || { name: '' } as currentTenant\">\r\n <div class=\"card shadow-sm rounded mb-3\">\r\n <div class=\"card-body px-5\">\r\n <div class=\"row\">\r\n <div class=\"col\">\r\n <span style=\"font-size: 0.8em\" class=\"text-uppercase text-muted\">{{\r\n 'AbpUiMultiTenancy::Tenant' | abpLocalization\r\n }}</span\r\n ><br />\r\n <h6 class=\"m-0 d-inline-block\">\r\n <i>{{ currentTenant.name || ('AbpUiMultiTenancy::NotSelected' | abpLocalization) }}</i>\r\n </h6>\r\n </div>\r\n <div class=\"col-auto\">\r\n <a\r\n id=\"AbpTenantSwitchLink\"\r\n href=\"javascript:void(0);\"\r\n class=\"btn btn-sm mt-3 btn-outline-primary\"\r\n (click)=\"service.onSwitch()\"\r\n >{{ 'AbpUiMultiTenancy::Switch' | abpLocalization }}</a\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <abp-modal [(visible)]=\"service.isModalVisible\" [busy]=\"service.modalBusy\">\r\n <ng-template #abpHeader>\r\n <h5>Switch Tenant</h5>\r\n </ng-template>\r\n <ng-template #abpBody>\r\n <form (ngSubmit)=\"service.save()\">\r\n <div class=\"mt-2\">\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"name\" class=\"form-label\">{{\r\n 'AbpUiMultiTenancy::Name' | abpLocalization\r\n }}</label>\r\n <input\r\n [(ngModel)]=\"service.name\"\r\n type=\"text\"\r\n id=\"name\"\r\n name=\"tenant\"\r\n class=\"form-control\"\r\n autofocus\r\n />\r\n </div>\r\n <p>{{ 'AbpUiMultiTenancy::SwitchTenantHint' | abpLocalization }}</p>\r\n </div>\r\n </form>\r\n </ng-template>\r\n <ng-template #abpFooter>\r\n <button abpClose type=\"button\" class=\"btn btn-secondary\">\r\n {{ 'AbpTenantManagement::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button\r\n type=\"abp-button\"\r\n iconClass=\"fa fa-check\"\r\n (click)=\"service.save()\"\r\n [disabled]=\"currentTenant?.name === service.name\"\r\n >\r\n <span>{{ 'AbpTenantManagement::Save' | abpLocalization }}</span>\r\n </abp-button>\r\n </ng-template>\r\n </abp-modal>\r\n</ng-container>\r\n", components: [{ type: i1$1.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { type: i1$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1.AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1$1.ModalCloseDirective, selector: "[abpClose]" }], pipes: { "async": i2$1.AsyncPipe, "abpLocalization": i1.LocalizationPipe } });
167
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: TenantBoxComponent, decorators: [{
168
- type: Component,
169
- args: [{
170
- selector: 'abp-tenant-box',
171
- templateUrl: './tenant-box.component.html',
172
- providers: [TenantBoxService],
173
- }]
174
- }], ctorParameters: function () { return [{ type: i1$2.TenantBoxService }]; } });
175
-
176
- class AuthWrapperComponent {
177
- constructor(service) {
178
- this.service = service;
179
- }
180
- }
181
- AuthWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: AuthWrapperComponent, deps: [{ token: i1$2.AuthWrapperService }], target: i0.ɵɵFactoryTarget.Component });
182
- AuthWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: AuthWrapperComponent, selector: "abp-auth-wrapper", providers: [AuthWrapperService], ngImport: i0, template: "<div class=\"row\">\r\n <div class=\"mx-auto col col-md-5\">\r\n <ng-container *ngIf=\"(service.isMultiTenancyEnabled$ | async) && service.isTenantBoxVisible\">\r\n <abp-tenant-box\r\n *abpReplaceableTemplate=\"{ componentKey: service.tenantBoxKey }\"\r\n ></abp-tenant-box>\r\n </ng-container>\r\n\r\n <div class=\"abp-account-container\">\r\n <div\r\n *ngIf=\"service.enableLocalLogin$ | async; else disableLocalLoginTemplate\"\r\n class=\"card mt-3 shadow-sm rounded\"\r\n >\r\n <div class=\"card-body p-5\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #disableLocalLoginTemplate>\r\n <div class=\"alert alert-warning\">\r\n <strong>{{ 'AbpAccount::InvalidLoginRequest' | abpLocalization }}</strong>\r\n {{ 'AbpAccount::ThereAreNoLoginSchemesConfiguredForThisClient' | abpLocalization }}\r\n </div>\r\n</ng-template>\r\n", components: [{ type: TenantBoxComponent, selector: "abp-tenant-box" }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }], pipes: { "async": i2$1.AsyncPipe, "abpLocalization": i1.LocalizationPipe } });
183
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: AuthWrapperComponent, decorators: [{
184
- type: Component,
185
- args: [{
186
- selector: 'abp-auth-wrapper',
187
- templateUrl: './auth-wrapper.component.html',
188
- providers: [AuthWrapperService],
189
- }]
190
- }], ctorParameters: function () { return [{ type: i1$2.AuthWrapperService }]; } });
191
-
192
- class AccountLayoutComponent {
193
- constructor(service) {
194
- this.service = service;
195
- this.authWrapperKey = 'Account.AuthWrapperComponent';
196
- }
197
- ngAfterViewInit() {
198
- this.service.subscribeWindowSize();
199
- }
200
- }
201
- // required for dynamic component
202
- AccountLayoutComponent.type = "account" /* account */;
203
- AccountLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: AccountLayoutComponent, deps: [{ token: LayoutService }], target: i0.ɵɵFactoryTarget.Component });
204
- AccountLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: AccountLayoutComponent, selector: "abp-layout-account", providers: [LayoutService, SubscriptionService], ngImport: i0, template: "<nav\r\n class=\"navbar navbar-expand-lg navbar-dark bg-dark shadow-sm flex-column flex-md-row mb-4\"\r\n id=\"main-navbar\"\r\n style=\"min-height: 4rem\"\r\n>\r\n <div class=\"container\">\r\n <abp-logo *abpReplaceableTemplate=\"{ componentKey: service.logoComponentKey }\"></abp-logo>\r\n <button\r\n class=\"navbar-toggler\"\r\n type=\"button\"\r\n [attr.aria-expanded]=\"!service.isCollapsed\"\r\n (click)=\"service.isCollapsed = !service.isCollapsed\"\r\n >\r\n <span class=\"navbar-toggler-icon\"></span>\r\n </button>\r\n <div\r\n class=\"navbar-collapse\"\r\n [class.overflow-hidden]=\"service.smallScreen\"\r\n id=\"main-navbar-collapse\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"!service.smallScreen ? navigations : null\"></ng-container>\r\n\r\n <div\r\n *ngIf=\"service.smallScreen\"\r\n [@collapseWithMargin]=\"service.isCollapsed ? 'collapsed' : 'expanded'\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"navigations\"></ng-container>\r\n </div>\r\n\r\n <ng-template #navigations>\r\n <abp-routes\r\n *abpReplaceableTemplate=\"{\r\n componentKey: service.routesComponentKey,\r\n inputs: {\r\n smallScreen: { value: service.smallScreen }\r\n }\r\n }\"\r\n class=\"mx-auto\"\r\n [smallScreen]=\"service.smallScreen\"\r\n ></abp-routes>\r\n\r\n <abp-nav-items\r\n *abpReplaceableTemplate=\"{\r\n componentKey: service.navItemsComponentKey\r\n }\"\r\n ></abp-nav-items>\r\n </ng-template>\r\n </div>\r\n </div>\r\n</nav>\r\n\r\n<!-- [@slideFromBottom]=\"outlet.isActivated && outlet.activatedRoute?.routeConfig?.path\" TODO: throws ExpressionChangedAfterItHasBeenCheck when animation is active. It should be fixed -->\r\n<div class=\"container\">\r\n <abp-page-alert-container></abp-page-alert-container>\r\n <abp-auth-wrapper\r\n *abpReplaceableTemplate=\"{\r\n componentKey: authWrapperKey\r\n }\"\r\n >\r\n <router-outlet #outlet=\"outlet\"></router-outlet>\r\n </abp-auth-wrapper>\r\n</div>\r\n", components: [{ type: LogoComponent, selector: "abp-logo" }, { type: RoutesComponent, selector: "abp-routes", inputs: ["smallScreen"] }, { type: NavItemsComponent, selector: "abp-nav-items" }, { type: PageAlertContainerComponent, selector: "abp-page-alert-container" }, { type: AuthWrapperComponent, selector: "abp-auth-wrapper" }], directives: [{ type: i3.NgbNavbar, selector: ".navbar" }, { type: i1.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }] });
205
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: AccountLayoutComponent, decorators: [{
206
- type: Component,
207
- args: [{
208
- selector: 'abp-layout-account',
209
- templateUrl: './account-layout.component.html',
210
- providers: [LayoutService, SubscriptionService],
211
- }]
212
- }], ctorParameters: function () { return [{ type: LayoutService }]; } });
213
-
214
- class ApplicationLayoutComponent {
215
- constructor(service) {
216
- this.service = service;
217
- }
218
- ngAfterViewInit() {
219
- this.service.subscribeWindowSize();
220
- }
221
- }
222
- // required for dynamic component
223
- ApplicationLayoutComponent.type = "application" /* application */;
224
- ApplicationLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ApplicationLayoutComponent, deps: [{ token: LayoutService }], target: i0.ɵɵFactoryTarget.Component });
225
- ApplicationLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ApplicationLayoutComponent, selector: "abp-layout-application", providers: [LayoutService, SubscriptionService], ngImport: i0, template: "<nav\r\n class=\"navbar navbar-expand-lg navbar-dark bg-dark shadow-sm flex-column flex-md-row mb-4\"\r\n id=\"main-navbar\"\r\n style=\"min-height: 4rem\"\r\n>\r\n <div class=\"container\">\r\n <abp-logo *abpReplaceableTemplate=\"{ componentKey: service.logoComponentKey }\"></abp-logo>\r\n <button\r\n class=\"navbar-toggler\"\r\n type=\"button\"\r\n [attr.aria-expanded]=\"!service.isCollapsed\"\r\n (click)=\"service.isCollapsed = !service.isCollapsed\"\r\n >\r\n <span class=\"navbar-toggler-icon\"></span>\r\n </button>\r\n <div class=\"navbar-collapse\" [class.overflow-hidden]=\"service.smallScreen\" id=\"main-navbar-collapse\">\r\n <ng-container *ngTemplateOutlet=\"!service.smallScreen ? navigations : null\"></ng-container>\r\n\r\n <div *ngIf=\"service.smallScreen\" [@collapseWithMargin]=\"service.isCollapsed ? 'collapsed' : 'expanded'\">\r\n <ng-container *ngTemplateOutlet=\"navigations\"></ng-container>\r\n </div>\r\n\r\n <ng-template #navigations>\r\n <abp-routes\r\n *abpReplaceableTemplate=\"{\r\n componentKey: service.routesComponentKey,\r\n inputs: {\r\n smallScreen: { value: service.smallScreen }\r\n }\r\n }\"\r\n class=\"mx-auto\"\r\n [smallScreen]=\"service.smallScreen\"\r\n ></abp-routes>\r\n\r\n <abp-nav-items\r\n *abpReplaceableTemplate=\"{\r\n componentKey: service.navItemsComponentKey\r\n }\"\r\n ></abp-nav-items>\r\n </ng-template>\r\n </div>\r\n </div>\r\n</nav>\r\n\r\n<!-- [@slideFromBottom]=\"outlet.isActivated && outlet.activatedRoute?.routeConfig?.path\" TODO: throws ExpressionChangedAfterItHasBeenCheck when animation is active. It should be fixed -->\r\n<div class=\"container\">\r\n <abp-page-alert-container></abp-page-alert-container>\r\n\r\n <router-outlet #outlet=\"outlet\"></router-outlet>\r\n</div>\r\n", components: [{ type: LogoComponent, selector: "abp-logo" }, { type: RoutesComponent, selector: "abp-routes", inputs: ["smallScreen"] }, { type: NavItemsComponent, selector: "abp-nav-items" }, { type: PageAlertContainerComponent, selector: "abp-page-alert-container" }], directives: [{ type: i3.NgbNavbar, selector: ".navbar" }, { type: i1.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }], animations: [slideFromBottom, collapseWithMargin] });
226
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ApplicationLayoutComponent, decorators: [{
227
- type: Component,
228
- args: [{
229
- selector: 'abp-layout-application',
230
- templateUrl: './application-layout.component.html',
231
- animations: [slideFromBottom, collapseWithMargin],
232
- providers: [LayoutService, SubscriptionService],
233
- }]
234
- }], ctorParameters: function () { return [{ type: LayoutService }]; } });
235
-
236
- class EmptyLayoutComponent {
237
- }
238
- EmptyLayoutComponent.type = "empty" /* empty */;
239
- EmptyLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: EmptyLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
240
- EmptyLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: EmptyLayoutComponent, selector: "abp-layout-empty", ngImport: i0, template: `
241
- <router-outlet></router-outlet>
242
- <abp-confirmation></abp-confirmation>
243
- `, isInline: true, components: [{ type: i1$1.ConfirmationComponent, selector: "abp-confirmation" }], directives: [{ type: i2.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }] });
244
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: EmptyLayoutComponent, decorators: [{
245
- type: Component,
246
- args: [{
247
- selector: 'abp-layout-empty',
248
- template: `
249
- <router-outlet></router-outlet>
250
- <abp-confirmation></abp-confirmation>
251
- `,
252
- }]
253
- }] });
254
-
255
- class CurrentUserComponent {
256
- constructor(navigateToManageProfile, authService, configState, sessionState) {
257
- this.navigateToManageProfile = navigateToManageProfile;
258
- this.authService = authService;
259
- this.configState = configState;
260
- this.sessionState = sessionState;
261
- this.currentUser$ = this.configState.getOne$('currentUser');
262
- this.selectedTenant$ = this.sessionState.getTenant$();
263
- }
264
- get smallScreen() {
265
- return window.innerWidth < 992;
266
- }
267
- navigateToLogin() {
268
- this.authService.navigateToLogin();
269
- }
270
- logout() {
271
- this.authService.logout().subscribe();
272
- }
273
- }
274
- CurrentUserComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: CurrentUserComponent, deps: [{ token: NAVIGATE_TO_MANAGE_PROFILE }, { token: i1.AuthService }, { token: i1.ConfigStateService }, { token: i1.SessionStateService }], target: i0.ɵɵFactoryTarget.Component });
275
- CurrentUserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: CurrentUserComponent, selector: "abp-current-user", ngImport: i0, template: "<ng-template #loginBtn>\r\n <a role=\"button\" class=\"nav-link pointer\" (click)=\"navigateToLogin()\">{{\r\n 'AbpAccount::Login' | abpLocalization\r\n }}</a>\r\n</ng-template>\r\n<div\r\n *ngIf=\"(currentUser$ | async)?.isAuthenticated; else loginBtn\"\r\n ngbDropdown\r\n class=\"dropdown\"\r\n #currentUserDropdown=\"ngbDropdown\"\r\n display=\"static\"\r\n>\r\n <a\r\n ngbDropdownToggle\r\n class=\"nav-link\"\r\n href=\"javascript:void(0)\"\r\n role=\"button\"\r\n id=\"dropdownMenuLink\"\r\n data-toggle=\"dropdown\"\r\n aria-haspopup=\"true\"\r\n aria-expanded=\"false\"\r\n >\r\n <small *ngIf=\"(selectedTenant$ | async)?.name as tenantName\"\r\n ><i>{{ tenantName }}</i\r\n >\\</small\r\n >\r\n <strong>{{ (currentUser$ | async)?.userName }}</strong>\r\n </a>\r\n <div\r\n class=\"dropdown-menu dropdown-menu-end border-0 shadow-sm\"\r\n aria-labelledby=\"dropdownMenuLink\"\r\n [class.d-block]=\"smallScreen && currentUserDropdown.isOpen()\"\r\n >\r\n <a class=\"dropdown-item pointer\" (click)=\"navigateToManageProfile()\"\r\n ><i class=\"fa fa-cog me-1\"></i>{{ 'AbpAccount::MyAccount' | abpLocalization }}</a\r\n >\r\n <a class=\"dropdown-item\" href=\"javascript:void(0)\" (click)=\"logout()\"\r\n ><i class=\"fa fa-power-off me-1\"></i>{{ 'AbpUi::Logout' | abpLocalization }}</a\r\n >\r\n </div>\r\n</div>\r\n", directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgbDropdown, selector: "[ngbDropdown]", inputs: ["open", "placement", "container", "autoClose", "display", "dropdownClass"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { type: i3.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }], pipes: { "abpLocalization": i1.LocalizationPipe, "async": i2$1.AsyncPipe } });
276
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: CurrentUserComponent, decorators: [{
277
- type: Component,
278
- args: [{
279
- selector: 'abp-current-user',
280
- templateUrl: './current-user.component.html',
281
- }]
282
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
283
- type: Inject,
284
- args: [NAVIGATE_TO_MANAGE_PROFILE]
285
- }] }, { type: i1.AuthService }, { type: i1.ConfigStateService }, { type: i1.SessionStateService }]; } });
286
-
287
- class LanguagesComponent {
288
- constructor(sessionState, configState) {
289
- this.sessionState = sessionState;
290
- this.configState = configState;
291
- this.languages$ = this.configState.getDeep$('localization.languages');
292
- }
293
- get smallScreen() {
294
- return window.innerWidth < 992;
295
- }
296
- get defaultLanguage$() {
297
- return this.languages$.pipe(map(languages => { var _a; return ((_a = languages === null || languages === void 0 ? void 0 : languages.find(lang => lang.cultureName === this.selectedLangCulture)) === null || _a === void 0 ? void 0 : _a.displayName) || ''; }));
298
- }
299
- get dropdownLanguages$() {
300
- return this.languages$.pipe(map(languages => (languages === null || languages === void 0 ? void 0 : languages.filter(lang => lang.cultureName !== this.selectedLangCulture)) || []));
301
- }
302
- get selectedLangCulture() {
303
- return this.sessionState.getLanguage();
304
- }
305
- onChangeLang(cultureName) {
306
- this.sessionState.setLanguage(cultureName);
307
- }
308
- }
309
- LanguagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LanguagesComponent, deps: [{ token: i1.SessionStateService }, { token: i1.ConfigStateService }], target: i0.ɵɵFactoryTarget.Component });
310
- LanguagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: LanguagesComponent, selector: "abp-languages", ngImport: i0, template: `
311
- <div
312
- *ngIf="((dropdownLanguages$ | async)?.length || 0) > 0"
313
- class="dropdown"
314
- ngbDropdown
315
- #languageDropdown="ngbDropdown"
316
- display="static"
317
- >
318
- <a
319
- ngbDropdownToggle
320
- class="nav-link"
321
- href="javascript:void(0)"
322
- role="button"
323
- id="dropdownMenuLink"
324
- data-toggle="dropdown"
325
- aria-haspopup="true"
326
- aria-expanded="false"
327
- >
328
- {{ defaultLanguage$ | async }}
329
- </a>
330
- <div
331
- class="dropdown-menu dropdown-menu-end border-0 shadow-sm"
332
- aria-labelledby="dropdownMenuLink"
333
- [class.d-block]="smallScreen && languageDropdown.isOpen()"
334
- >
335
- <a
336
- *ngFor="let lang of dropdownLanguages$ | async"
337
- href="javascript:void(0)"
338
- class="dropdown-item"
339
- (click)="onChangeLang(lang.cultureName || '')"
340
- >{{ lang?.displayName }}</a
341
- >
342
- </div>
343
- </div>
344
- `, isInline: true, directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgbDropdown, selector: "[ngbDropdown]", inputs: ["open", "placement", "container", "autoClose", "display", "dropdownClass"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { type: i3.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i2$1.AsyncPipe } });
345
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LanguagesComponent, decorators: [{
346
- type: Component,
347
- args: [{
348
- selector: 'abp-languages',
349
- template: `
350
- <div
351
- *ngIf="((dropdownLanguages$ | async)?.length || 0) > 0"
352
- class="dropdown"
353
- ngbDropdown
354
- #languageDropdown="ngbDropdown"
355
- display="static"
356
- >
357
- <a
358
- ngbDropdownToggle
359
- class="nav-link"
360
- href="javascript:void(0)"
361
- role="button"
362
- id="dropdownMenuLink"
363
- data-toggle="dropdown"
364
- aria-haspopup="true"
365
- aria-expanded="false"
366
- >
367
- {{ defaultLanguage$ | async }}
368
- </a>
369
- <div
370
- class="dropdown-menu dropdown-menu-end border-0 shadow-sm"
371
- aria-labelledby="dropdownMenuLink"
372
- [class.d-block]="smallScreen && languageDropdown.isOpen()"
373
- >
374
- <a
375
- *ngFor="let lang of dropdownLanguages$ | async"
376
- href="javascript:void(0)"
377
- class="dropdown-item"
378
- (click)="onChangeLang(lang.cultureName || '')"
379
- >{{ lang?.displayName }}</a
380
- >
381
- </div>
382
- </div>
383
- `,
384
- }]
385
- }], ctorParameters: function () { return [{ type: i1.SessionStateService }, { type: i1.ConfigStateService }]; } });
386
-
387
- class ValidationErrorComponent extends ValidationErrorComponent$1 {
388
- get abpErrors() {
389
- if (!this.errors || !this.errors.length)
390
- return [];
391
- return this.errors.map(error => {
392
- if (!error.message)
393
- return error;
394
- const index = error.message.indexOf('[');
395
- if (index > -1) {
396
- return Object.assign(Object.assign({}, error), { message: error.message.slice(0, index), interpoliteParams: error.message.slice(index + 1, error.message.length - 1).split(',') });
397
- }
398
- return error;
399
- });
400
- }
401
- }
402
- ValidationErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ValidationErrorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
403
- ValidationErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ValidationErrorComponent, selector: "abp-validation-error", usesInheritance: true, ngImport: i0, template: `
404
- <div class="invalid-feedback" *ngFor="let error of abpErrors; trackBy: trackByFn">
405
- {{ error.message | abpLocalization: error.interpoliteParams }}
406
- </div>
407
- `, isInline: true, directives: [{ type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "abpLocalization": i1.LocalizationPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
408
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ValidationErrorComponent, decorators: [{
409
- type: Component,
410
- args: [{
411
- selector: 'abp-validation-error',
412
- template: `
413
- <div class="invalid-feedback" *ngFor="let error of abpErrors; trackBy: trackByFn">
414
- {{ error.message | abpLocalization: error.interpoliteParams }}
415
- </div>
416
- `,
417
- changeDetection: ChangeDetectionStrategy.OnPush,
418
- encapsulation: ViewEncapsulation.None,
419
- }]
420
- }] });
421
-
422
- const LAZY_STYLES = new InjectionToken('LAZY_STYLES');
423
-
424
- const BOOTSTRAP = 'bootstrap-{{dir}}.min.css';
425
- class LazyStyleHandler {
426
- constructor(injector) {
427
- this._dir = 'ltr';
428
- this.loaded = new Map();
429
- this.setStyles(injector);
430
- this.setLazyLoad(injector);
431
- this.listenToDirectionChanges(injector);
432
- }
433
- set dir(dir) {
434
- if (dir === this._dir)
435
- return;
436
- this.switchCSS(dir);
437
- this._dir = dir;
438
- }
439
- get dir() {
440
- return this._dir;
441
- }
442
- getHrefFromLink(link) {
443
- if (!link)
444
- return '';
445
- const a = document.createElement('a');
446
- a.href = link.href;
447
- return a.pathname.replace(/^\//, '');
448
- }
449
- getLoadedBootstrap() {
450
- const href = createLazyStyleHref(BOOTSTRAP, this.dir);
451
- const selector = `[href*="${href.replace(/\.css$/, '')}"]`;
452
- const link = document.querySelector(selector);
453
- return { href, link };
454
- }
455
- listenToDirectionChanges(injector) {
456
- const docDirHandler = injector.get(DocumentDirHandlerService);
457
- // will always listen, no need to unsubscribe
458
- docDirHandler.dir$.subscribe(dir => {
459
- this.dir = dir;
460
- });
461
- }
462
- setLazyLoad(injector) {
463
- this.lazyLoad = injector.get(LazyLoadService);
464
- const { href, link } = this.getLoadedBootstrap();
465
- this.lazyLoad.loaded.set(href, link);
466
- }
467
- setStyles(injector) {
468
- this.styles = injector.get(LAZY_STYLES, [BOOTSTRAP]);
469
- }
470
- switchCSS(dir) {
471
- this.styles.forEach(style => {
472
- const oldHref = createLazyStyleHref(style, this.dir);
473
- const newHref = createLazyStyleHref(style, dir);
474
- const link = this.loaded.get(newHref);
475
- const href = this.getHrefFromLink(link) || newHref;
476
- const strategy = LOADING_STRATEGY.PrependAnonymousStyleToHead(href);
477
- this.lazyLoad.load(strategy).subscribe(() => {
478
- const oldLink = this.lazyLoad.loaded.get(oldHref);
479
- this.loaded.delete(newHref);
480
- this.loaded.set(oldHref, oldLink);
481
- const newLink = this.lazyLoad.loaded.get(href);
482
- this.lazyLoad.loaded.delete(href);
483
- this.lazyLoad.loaded.set(newHref, newLink);
484
- this.lazyLoad.remove(oldHref);
485
- });
486
- });
487
- }
488
- }
489
- LazyStyleHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LazyStyleHandler, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
490
- LazyStyleHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LazyStyleHandler });
491
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LazyStyleHandler, decorators: [{
492
- type: Injectable
493
- }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
494
- function createLazyStyleHref(style, dir) {
495
- return style.replace(/{{\s*dir\s*}}/g, dir);
496
- }
497
- function initLazyStyleHandler(injector) {
498
- return () => new LazyStyleHandler(injector);
499
- }
500
-
501
- const BASIC_THEME_NAV_ITEM_PROVIDERS = [
502
- {
503
- provide: APP_INITIALIZER,
504
- useFactory: configureNavItems,
505
- deps: [NavItemsService],
506
- multi: true,
507
- },
508
- ];
509
- function configureNavItems(navItems) {
510
- return () => {
511
- navItems.addItems([
512
- {
513
- id: "Theme.LanguagesComponent" /* Languages */,
514
- order: 100,
515
- component: LanguagesComponent,
516
- },
517
- {
518
- id: "Theme.CurrentUserComponent" /* CurrentUser */,
519
- order: 100,
520
- component: CurrentUserComponent,
521
- },
522
- ]);
523
- };
524
- }
525
-
526
- var styles = `
527
- .content-header-title {
528
- font-size: 24px;
529
- }
530
- .entry-row {
531
- margin-bottom: 15px;
532
- }
533
- #main-navbar-tools a.dropdown-toggle {
534
- text-decoration: none;
535
- color: #fff;
536
- }
537
- .navbar .dropdown-submenu {
538
- position: relative;
539
- }
540
- .navbar .dropdown-menu {
541
- margin: 0;
542
- padding: 0;
543
- }
544
- .navbar .dropdown-menu a {
545
- font-size: .9em;
546
- padding: 10px 15px;
547
- display: block;
548
- min-width: 210px;
549
- text-align: left;
550
- border-radius: 0.25rem;
551
- min-height: 44px;
552
- }
553
- [dir=rtl] .navbar .dropdown-menu a {
554
- text-align: right!important;
555
- }
556
- .navbar .dropdown-submenu a::after {
557
- transform: rotate(-90deg);
558
- position: absolute;
559
- right: 16px;
560
- top: 18px;
561
- }
562
- [dir=rtl] .navbar .dropdown-submenu a::after {
563
- transform: rotate(90deg);
564
- left: 16px;
565
- right: auto;
566
- top: 20px;
567
- }
568
- .navbar .dropdown-submenu .dropdown-menu {
569
- top: 0;
570
- left: 100%;
571
- }
572
- /* work around for rtl. Track https://github.com/ng-bootstrap/ng-bootstrap/issues/4100 issue */
573
- [dir=rtl] .navbar .dropdown-submenu .dropdown-menu {
574
- top: 0;
575
- right: 100%;
576
- }
577
- .card-header .btn {
578
- padding: 2px 6px;
579
- }
580
- .card-header h5 {
581
- margin: 0;
582
- }
583
- .container > .card {
584
- box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
585
- }
586
- @media screen and (min-width: 992px) {
587
- .navbar .dropdown:hover > .dropdown-menu {
588
- display: block;
589
- }
590
-
591
- .navbar .dropdown-submenu:hover > .dropdown-menu {
592
- display: block;
593
- }
594
- }
595
- .input-validation-error {
596
- border-color: #dc3545;
597
- }
598
- .field-validation-error {
599
- font-size: 0.8em;
600
- }
601
- .ui-table .ui-table-tbody > tr.empty-row > div.empty-row-content {
602
- border: 1px solid #c8c8c8;
603
- }
604
- .abp-loading {
605
- background: rgba(0, 0, 0, 0.05);
606
- }
607
- .modal-backdrop {
608
- background-color: rgba(0, 0, 0, 0.6);
609
- }
610
-
611
- .confirmation .confirmation-backdrop {
612
- background: rgba(0, 0, 0, 0.7) !important;
613
- }
614
- .confirmation .confirmation-dialog {
615
- border: none;
616
- border-radius: 10px;
617
- background-color: #fff;
618
- box-shadow: 0 0 10px -5px rgba(0, 0, 0, 0.5);
619
- }
620
- .confirmation .confirmation-dialog .icon-container .icon {
621
- stroke: #fff;
622
- color: #fff;
623
- }
624
- .confirmation .confirmation-dialog .icon-container.info .icon {
625
- stroke: #2f96b4;
626
- color: #2f96b4;
627
- }
628
- .confirmation .confirmation-dialog .icon-container.success .icon {
629
- stroke: #51a351;
630
- color: #51a351;
631
- }
632
- .confirmation .confirmation-dialog .icon-container.warning .icon {
633
- stroke: #f89406;
634
- color: #f89406;
635
- }
636
- .confirmation .confirmation-dialog .icon-container.error .icon {
637
- stroke: #bd362f;
638
- color: #bd362f;
639
- }
640
- .confirmation .confirmation-dialog .content .title {
641
- color: #222;
642
- }
643
- .confirmation .confirmation-dialog .content .message {
644
- color: #777;
645
- }
646
- .confirmation .confirmation-dialog .footer {
647
- background: transparent;
648
- }
649
- .confirmation .confirmation-dialog .footer .confirmation-button {
650
- background-color: #eee;
651
- color: #777;
652
- }
653
- .confirmation .confirmation-dialog .footer .confirmation-button:hover, .confirmation .confirmation-dialog .footer .confirmation-button:focus, .confirmation .confirmation-dialog .footer .confirmation-button:active {
654
- background-color: #bbb;
655
- }
656
- .confirmation .confirmation-dialog .footer .confirmation-button--confirm {
657
- background-color: #2f96b4;
658
- color: #fff;
659
- }
660
- .confirmation .confirmation-dialog .footer .confirmation-button--confirm:hover {
661
- background-color: #2e819b;
662
- }
663
- .ui-table .pagination-wrapper {
664
- background-color: #f4f4f4;
665
- border: 1px solid #c8c8c8;
666
- }
667
- .bordered .datatable-body-row {
668
- border-top: 1px solid #eee;
669
- margin-top: -1px;
670
- }
671
- .breadcrumb {
672
- background-color: transparent;
673
- padding: 0.27rem;
674
- }
675
- `;
676
-
677
- const BASIC_THEME_STYLES_PROVIDERS = [
678
- {
679
- provide: APP_INITIALIZER,
680
- useFactory: configureStyles,
681
- deps: [DomInsertionService, ReplaceableComponentsService],
682
- multi: true,
683
- },
684
- ];
685
- function configureStyles(domInsertion, replaceableComponents) {
686
- return () => {
687
- domInsertion.insertContent(CONTENT_STRATEGY.AppendStyleToHead(styles));
688
- initLayouts(replaceableComponents);
689
- };
690
- }
691
- function initLayouts(replaceableComponents) {
692
- replaceableComponents.add({
693
- key: "Theme.ApplicationLayoutComponent" /* ApplicationLayout */,
694
- component: ApplicationLayoutComponent,
695
- });
696
- replaceableComponents.add({
697
- key: "Theme.AccountLayoutComponent" /* AccountLayout */,
698
- component: AccountLayoutComponent,
699
- });
700
- replaceableComponents.add({
701
- key: "Theme.EmptyLayoutComponent" /* EmptyLayout */,
702
- component: EmptyLayoutComponent,
703
- });
704
- }
705
-
706
- const LAYOUTS = [ApplicationLayoutComponent, AccountLayoutComponent, EmptyLayoutComponent];
707
- class BaseThemeBasicModule {
708
- }
709
- BaseThemeBasicModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: BaseThemeBasicModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
710
- BaseThemeBasicModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: BaseThemeBasicModule, declarations: [ApplicationLayoutComponent, AccountLayoutComponent, EmptyLayoutComponent, ValidationErrorComponent,
711
- LogoComponent,
712
- NavItemsComponent,
713
- RoutesComponent,
714
- CurrentUserComponent,
715
- LanguagesComponent,
716
- PageAlertContainerComponent,
717
- TenantBoxComponent,
718
- AuthWrapperComponent], imports: [CoreModule,
719
- ThemeSharedModule,
720
- NgbCollapseModule,
721
- NgbDropdownModule,
722
- NgxValidateCoreModule], exports: [ApplicationLayoutComponent, AccountLayoutComponent, EmptyLayoutComponent, ValidationErrorComponent,
723
- LogoComponent,
724
- NavItemsComponent,
725
- RoutesComponent,
726
- CurrentUserComponent,
727
- LanguagesComponent,
728
- PageAlertContainerComponent] });
729
- BaseThemeBasicModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: BaseThemeBasicModule, imports: [[
730
- CoreModule,
731
- ThemeSharedModule,
732
- NgbCollapseModule,
733
- NgbDropdownModule,
734
- NgxValidateCoreModule,
735
- ]] });
736
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: BaseThemeBasicModule, decorators: [{
737
- type: NgModule,
738
- args: [{
739
- declarations: [
740
- ...LAYOUTS,
741
- ValidationErrorComponent,
742
- LogoComponent,
743
- NavItemsComponent,
744
- RoutesComponent,
745
- CurrentUserComponent,
746
- LanguagesComponent,
747
- PageAlertContainerComponent,
748
- TenantBoxComponent,
749
- AuthWrapperComponent,
750
- ],
751
- exports: [
752
- ...LAYOUTS,
753
- ValidationErrorComponent,
754
- LogoComponent,
755
- NavItemsComponent,
756
- RoutesComponent,
757
- CurrentUserComponent,
758
- LanguagesComponent,
759
- PageAlertContainerComponent,
760
- ],
761
- imports: [
762
- CoreModule,
763
- ThemeSharedModule,
764
- NgbCollapseModule,
765
- NgbDropdownModule,
766
- NgxValidateCoreModule,
767
- ],
768
- entryComponents: [...LAYOUTS, ValidationErrorComponent, CurrentUserComponent, LanguagesComponent],
769
- }]
770
- }] });
771
- class ThemeBasicModule {
772
- static forRoot() {
773
- return {
774
- ngModule: ThemeBasicModule,
775
- providers: [
776
- BASIC_THEME_NAV_ITEM_PROVIDERS,
777
- BASIC_THEME_STYLES_PROVIDERS,
778
- {
779
- provide: VALIDATION_ERROR_TEMPLATE,
780
- useValue: ValidationErrorComponent,
781
- },
782
- {
783
- provide: VALIDATION_TARGET_SELECTOR,
784
- useValue: '.form-group',
785
- },
786
- {
787
- provide: VALIDATION_INVALID_CLASSES,
788
- useValue: 'is-invalid',
789
- },
790
- LazyStyleHandler,
791
- {
792
- provide: APP_INITIALIZER,
793
- useFactory: noop,
794
- multi: true,
795
- deps: [LazyStyleHandler],
796
- },
797
- ],
798
- };
799
- }
800
- }
801
- ThemeBasicModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ThemeBasicModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
802
- ThemeBasicModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ThemeBasicModule, imports: [BaseThemeBasicModule], exports: [BaseThemeBasicModule] });
803
- ThemeBasicModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ThemeBasicModule, imports: [[BaseThemeBasicModule], BaseThemeBasicModule] });
804
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ThemeBasicModule, decorators: [{
805
- type: NgModule,
806
- args: [{
807
- exports: [BaseThemeBasicModule],
808
- imports: [BaseThemeBasicModule],
809
- }]
810
- }] });
811
-
812
- /*
813
- * Public API Surface of theme-basic
814
- */
815
-
816
- /**
817
- * Generated bundle index. Do not edit.
818
- */
819
-
820
- export { AccountLayoutComponent, ApplicationLayoutComponent, AuthWrapperComponent, BASIC_THEME_NAV_ITEM_PROVIDERS, BASIC_THEME_STYLES_PROVIDERS, BOOTSTRAP, BaseThemeBasicModule, CurrentUserComponent, EmptyLayoutComponent, LAYOUTS, LAZY_STYLES, LanguagesComponent, LazyStyleHandler, LogoComponent, NavItemsComponent, PageAlertContainerComponent, RoutesComponent, TenantBoxComponent, ThemeBasicModule, ValidationErrorComponent, configureNavItems, configureStyles, createLazyStyleHref, initLazyStyleHandler };
821
- //# sourceMappingURL=abp-ng.theme.basic.js.map