@ts-core/angular 13.0.15 → 13.0.18
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.
- package/esm2020/login/LoginGuard.mjs +17 -14
- package/esm2020/login/LoginNotGuard.mjs +17 -14
- package/esm2020/login/LoginRequireResolver.mjs +3 -3
- package/esm2020/login/LoginResolver.mjs +8 -13
- package/esm2020/public-api.mjs +2 -3
- package/fesm2015/ts-core-angular.mjs +51 -57
- package/fesm2015/ts-core-angular.mjs.map +1 -1
- package/fesm2020/ts-core-angular.mjs +45 -57
- package/fesm2020/ts-core-angular.mjs.map +1 -1
- package/login/LoginGuard.d.ts +9 -9
- package/login/LoginNotGuard.d.ts +9 -9
- package/login/LoginRequireResolver.d.ts +4 -4
- package/login/LoginResolver.d.ts +4 -7
- package/package.json +1 -1
- package/public-api.d.ts +1 -2
- package/esm2020/login/LoginRedirectResolver.mjs +0 -21
- package/login/LoginRedirectResolver.d.ts +0 -7
|
@@ -56,9 +56,10 @@ import * as i3$1 from '@angular/material/progress-bar';
|
|
|
56
56
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
57
57
|
import { MomentDateAdapter } from '@angular/material-moment-adapter';
|
|
58
58
|
import { TransportTimeoutError, TransportNoConnectionError, TransportEvent } from '@ts-core/common/transport';
|
|
59
|
+
import * as i1$9 from '@angular/router';
|
|
59
60
|
import { NavigationStart, NavigationEnd, NavigationCancel, NavigationError, ActivatedRoute } from '@angular/router';
|
|
60
61
|
import { FilterableMapCollection, MapCollection } from '@ts-core/common/map';
|
|
61
|
-
import * as i1$
|
|
62
|
+
import * as i1$a from '@angular/cdk/layout';
|
|
62
63
|
import { TransportLocal } from '@ts-core/common/transport/local';
|
|
63
64
|
|
|
64
65
|
class ApplicationBaseComponent extends DestroyableContainer {
|
|
@@ -8228,7 +8229,7 @@ class LoginRequireResolver {
|
|
|
8228
8229
|
// --------------------------------------------------------------------------
|
|
8229
8230
|
resolve() {
|
|
8230
8231
|
if (this.isLoggedIn()) {
|
|
8231
|
-
return Promise.resolve(
|
|
8232
|
+
return Promise.resolve();
|
|
8232
8233
|
}
|
|
8233
8234
|
let promise = PromiseHandler.create();
|
|
8234
8235
|
let subscription = this.login.events.subscribe(data => {
|
|
@@ -8236,7 +8237,7 @@ class LoginRequireResolver {
|
|
|
8236
8237
|
promise.reject(data.error.toString());
|
|
8237
8238
|
}
|
|
8238
8239
|
else if (data.type === LoginBaseServiceEvent.LOGIN_COMPLETE) {
|
|
8239
|
-
promise.resolve(
|
|
8240
|
+
promise.resolve();
|
|
8240
8241
|
}
|
|
8241
8242
|
else if (data.type === LoginBaseServiceEvent.LOGIN_FINISHED) {
|
|
8242
8243
|
subscription.unsubscribe();
|
|
@@ -8249,31 +8250,6 @@ class LoginRequireResolver {
|
|
|
8249
8250
|
}
|
|
8250
8251
|
}
|
|
8251
8252
|
|
|
8252
|
-
class LoginResolver extends LoginRequireResolver {
|
|
8253
|
-
// --------------------------------------------------------------------------
|
|
8254
|
-
//
|
|
8255
|
-
// Constructor
|
|
8256
|
-
//
|
|
8257
|
-
// --------------------------------------------------------------------------
|
|
8258
|
-
constructor(login) {
|
|
8259
|
-
super(login);
|
|
8260
|
-
}
|
|
8261
|
-
}
|
|
8262
|
-
// --------------------------------------------------------------------------
|
|
8263
|
-
//
|
|
8264
|
-
// Properties
|
|
8265
|
-
//
|
|
8266
|
-
// --------------------------------------------------------------------------
|
|
8267
|
-
LoginResolver.logoutUrl = '/login';
|
|
8268
|
-
LoginResolver.loggedInUrl = '/';
|
|
8269
|
-
LoginResolver.notLoggedInUrl = '/login';
|
|
8270
|
-
LoginResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: LoginResolver, deps: [{ token: LoginBaseService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8271
|
-
LoginResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: LoginResolver, providedIn: 'root' });
|
|
8272
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: LoginResolver, decorators: [{
|
|
8273
|
-
type: Injectable,
|
|
8274
|
-
args: [{ providedIn: 'root' }]
|
|
8275
|
-
}], ctorParameters: function () { return [{ type: LoginBaseService }]; } });
|
|
8276
|
-
|
|
8277
8253
|
class LoginGuard extends LoginRequireResolver {
|
|
8278
8254
|
// --------------------------------------------------------------------------
|
|
8279
8255
|
//
|
|
@@ -8289,20 +8265,25 @@ class LoginGuard extends LoginRequireResolver {
|
|
|
8289
8265
|
// Public Methods
|
|
8290
8266
|
//
|
|
8291
8267
|
// --------------------------------------------------------------------------
|
|
8292
|
-
canActivate() {
|
|
8293
|
-
|
|
8294
|
-
return true;
|
|
8295
|
-
}
|
|
8296
|
-
let url = !_.isNil(this.redirectUrl) ? this.redirectUrl : LoginResolver.notLoggedInUrl;
|
|
8297
|
-
return this.router.router.parseUrl(url);
|
|
8268
|
+
canActivate(route, state) {
|
|
8269
|
+
return this.isLoggedIn() ? true : this.router.parseUrl(LoginGuard.redirectUrl);
|
|
8298
8270
|
}
|
|
8299
8271
|
}
|
|
8300
|
-
|
|
8272
|
+
// --------------------------------------------------------------------------
|
|
8273
|
+
//
|
|
8274
|
+
// Properties
|
|
8275
|
+
//
|
|
8276
|
+
// --------------------------------------------------------------------------
|
|
8277
|
+
LoginGuard.redirectUrl = '/login';
|
|
8278
|
+
LoginGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: LoginGuard, deps: [{ token: LoginBaseService }, { token: i1$9.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8301
8279
|
LoginGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: LoginGuard, providedIn: 'root' });
|
|
8302
8280
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: LoginGuard, decorators: [{
|
|
8303
8281
|
type: Injectable,
|
|
8304
8282
|
args: [{ providedIn: 'root' }]
|
|
8305
|
-
}], ctorParameters: function () { return [{ type:
|
|
8283
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
8284
|
+
type: Inject,
|
|
8285
|
+
args: [LoginBaseService]
|
|
8286
|
+
}] }, { type: i1$9.Router }]; } });
|
|
8306
8287
|
|
|
8307
8288
|
class LoginNotGuard extends LoginRequireResolver {
|
|
8308
8289
|
// --------------------------------------------------------------------------
|
|
@@ -8319,38 +8300,45 @@ class LoginNotGuard extends LoginRequireResolver {
|
|
|
8319
8300
|
// Public Methods
|
|
8320
8301
|
//
|
|
8321
8302
|
// --------------------------------------------------------------------------
|
|
8322
|
-
canActivate() {
|
|
8323
|
-
|
|
8324
|
-
return true;
|
|
8325
|
-
}
|
|
8326
|
-
let url = !_.isNil(this.redirectUrl) ? this.redirectUrl : LoginResolver.loggedInUrl;
|
|
8327
|
-
return this.router.router.parseUrl(url);
|
|
8303
|
+
canActivate(route, state) {
|
|
8304
|
+
return !this.isLoggedIn() ? true : this.router.parseUrl(LoginNotGuard.redirectUrl);
|
|
8328
8305
|
}
|
|
8329
8306
|
}
|
|
8330
|
-
|
|
8307
|
+
// --------------------------------------------------------------------------
|
|
8308
|
+
//
|
|
8309
|
+
// Properties
|
|
8310
|
+
//
|
|
8311
|
+
// --------------------------------------------------------------------------
|
|
8312
|
+
LoginNotGuard.redirectUrl = '/';
|
|
8313
|
+
LoginNotGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: LoginNotGuard, deps: [{ token: LoginBaseService }, { token: i1$9.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8331
8314
|
LoginNotGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: LoginNotGuard, providedIn: 'root' });
|
|
8332
8315
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: LoginNotGuard, decorators: [{
|
|
8333
8316
|
type: Injectable,
|
|
8334
8317
|
args: [{ providedIn: 'root' }]
|
|
8335
|
-
}], ctorParameters: function () { return [{ type:
|
|
8318
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
8319
|
+
type: Inject,
|
|
8320
|
+
args: [LoginBaseService]
|
|
8321
|
+
}] }, { type: i1$9.Router }]; } });
|
|
8336
8322
|
|
|
8337
|
-
class
|
|
8323
|
+
class LoginResolver extends LoginRequireResolver {
|
|
8338
8324
|
// --------------------------------------------------------------------------
|
|
8339
8325
|
//
|
|
8340
|
-
//
|
|
8341
|
-
|
|
8326
|
+
// Constructor
|
|
8327
|
+
//
|
|
8342
8328
|
// --------------------------------------------------------------------------
|
|
8343
|
-
|
|
8344
|
-
|
|
8345
|
-
return true;
|
|
8329
|
+
constructor(login) {
|
|
8330
|
+
super(login);
|
|
8346
8331
|
}
|
|
8347
8332
|
}
|
|
8348
|
-
|
|
8349
|
-
|
|
8350
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type:
|
|
8333
|
+
LoginResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: LoginResolver, deps: [{ token: LoginBaseService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8334
|
+
LoginResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: LoginResolver, providedIn: 'root' });
|
|
8335
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: LoginResolver, decorators: [{
|
|
8351
8336
|
type: Injectable,
|
|
8352
8337
|
args: [{ providedIn: 'root' }]
|
|
8353
|
-
}]
|
|
8338
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
8339
|
+
type: Inject,
|
|
8340
|
+
args: [LoginBaseService]
|
|
8341
|
+
}] }]; } });
|
|
8354
8342
|
|
|
8355
8343
|
class MenuItemBase {
|
|
8356
8344
|
// --------------------------------------------------------------------------
|
|
@@ -9130,12 +9118,12 @@ BootstrapBreakpointService.DEFAULT_MD = 768;
|
|
|
9130
9118
|
BootstrapBreakpointService.DEFAULT_LG = 992;
|
|
9131
9119
|
BootstrapBreakpointService.DEFAULT_XL = 1200;
|
|
9132
9120
|
BootstrapBreakpointService.DEFAULT_XXL = 1400;
|
|
9133
|
-
BootstrapBreakpointService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: BootstrapBreakpointService, deps: [{ token: i1$
|
|
9121
|
+
BootstrapBreakpointService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: BootstrapBreakpointService, deps: [{ token: i1$a.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
9134
9122
|
BootstrapBreakpointService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: BootstrapBreakpointService, providedIn: 'root' });
|
|
9135
9123
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: BootstrapBreakpointService, decorators: [{
|
|
9136
9124
|
type: Injectable,
|
|
9137
9125
|
args: [{ providedIn: 'root' }]
|
|
9138
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
9126
|
+
}], ctorParameters: function () { return [{ type: i1$a.BreakpointObserver }]; } });
|
|
9139
9127
|
var BootstrapBreakpointServiceEvent;
|
|
9140
9128
|
(function (BootstrapBreakpointServiceEvent) {
|
|
9141
9129
|
BootstrapBreakpointServiceEvent["CHANGED"] = "CHANGED";
|
|
@@ -9691,5 +9679,5 @@ class TransportLazyModule {
|
|
|
9691
9679
|
* Generated bundle index. Do not edit.
|
|
9692
9680
|
*/
|
|
9693
9681
|
|
|
9694
|
-
export { APPLICATION_INJECTOR, ApplicationBaseComponent, ApplicationComponent, AspectRatioResizeDirective, AssetBackgroundDirective, AssetBackgroundPipe, AssetFilePipe, AssetIconPipe, AssetImagePipe, AssetModule, AssetSoundPipe, AssetVideoPipe, AutoScrollBottomDirective, BootstrapBreakpoint, BootstrapBreakpointService, BootstrapBreakpointServiceEvent, BottomSheetService, COOKIE_OPTIONS, CamelCasePipe, CanDeactivateGuard, CdkTableBaseComponent, CdkTableCellClassNamePipe, CdkTableColumnClassNamePipe, CdkTableColumnStyleNamePipe, CdkTableColumnValuePipe, CdkTableDataSource, CdkTableFilterableComponent, CdkTableFilterableMapCollection, CdkTablePaginableBookmarkComponent, CdkTablePaginableBookmarkMapCollection, CdkTablePaginableComponent, CdkTablePaginableMapCollection, CdkTableRowClassNamePipe, CdkTableRowStyleNamePipe, ClickToCopyDirective, ClickToSelectDirective, CookieModule, CookieOptions, CookieService, Direction, FinancePipe, FocusDirective, FocusManager, FormElementAsync, FormElementSync, HTMLContentTitleDirective, INotification, INotificationContent, IUser, IVICommonOptions, IWindow, IWindowContent, InfiniteScrollDirective, LANGUAGE_OPTIONS, LanguageDirective, LanguageHasDirective, LanguageMatPaginatorIntl, LanguageModule, LanguageMomentDateAdapter, LanguagePipe, LanguagePipeHas, LanguagePipeHasPure, LanguagePipePure, LanguageRequireResolver, LanguageResolver, LanguageSelectorComponent, LazyModuleLoader, ListItem, ListItems, LoginBaseService, LoginBaseServiceEvent, LoginGuard, LoginNotGuard,
|
|
9682
|
+
export { APPLICATION_INJECTOR, ApplicationBaseComponent, ApplicationComponent, AspectRatioResizeDirective, AssetBackgroundDirective, AssetBackgroundPipe, AssetFilePipe, AssetIconPipe, AssetImagePipe, AssetModule, AssetSoundPipe, AssetVideoPipe, AutoScrollBottomDirective, BootstrapBreakpoint, BootstrapBreakpointService, BootstrapBreakpointServiceEvent, BottomSheetService, COOKIE_OPTIONS, CamelCasePipe, CanDeactivateGuard, CdkTableBaseComponent, CdkTableCellClassNamePipe, CdkTableColumnClassNamePipe, CdkTableColumnStyleNamePipe, CdkTableColumnValuePipe, CdkTableDataSource, CdkTableFilterableComponent, CdkTableFilterableMapCollection, CdkTablePaginableBookmarkComponent, CdkTablePaginableBookmarkMapCollection, CdkTablePaginableComponent, CdkTablePaginableMapCollection, CdkTableRowClassNamePipe, CdkTableRowStyleNamePipe, ClickToCopyDirective, ClickToSelectDirective, CookieModule, CookieOptions, CookieService, Direction, FinancePipe, FocusDirective, FocusManager, FormElementAsync, FormElementSync, HTMLContentTitleDirective, INotification, INotificationContent, IUser, IVICommonOptions, IWindow, IWindowContent, InfiniteScrollDirective, LANGUAGE_OPTIONS, LanguageDirective, LanguageHasDirective, LanguageMatPaginatorIntl, LanguageModule, LanguageMomentDateAdapter, LanguagePipe, LanguagePipeHas, LanguagePipeHasPure, LanguagePipePure, LanguageRequireResolver, LanguageResolver, LanguageSelectorComponent, LazyModuleLoader, ListItem, ListItems, LoginBaseService, LoginBaseServiceEvent, LoginGuard, LoginNotGuard, LoginRequireResolver, LoginResolver, MenuItem, MenuItemBase, MenuItems, MenuListComponent, MenuTriggerForDirective, MessageBaseComponent, MomentDateAdaptivePipe, MomentDateFromNowPipe, MomentDatePipe, MomentTimePipe, NavigationMenuItem, NgModelErrorPipe, NotificationBaseComponent, NotificationComponent, NotificationConfig, NotificationEvent, NotificationFactory, NotificationModule, NotificationService, NotificationServiceEvent, PipeBaseService, PrettifyPipe, PropertiesManager, QuestionEvent, QuestionManager, QuestionMode, ResizeDirective, ResizeManager, RouterBaseService, SanitizePipe, ScrollCheckDirective, ScrollDirective, SelectListComponent, SelectListItem, SelectListItems, SelectOnFocusDirective, ShellBaseComponent, StartCasePipe, THEME_OPTIONS, TabGroupComponent, ThemeAssetBackgroundDirective, ThemeAssetDirective, ThemeAssetImageDirective, ThemeModule, ThemeStyleDirective, ThemeStyleHoverDirective, ThemeToggleDirective, TimePipe, TransportLazy, TransportLazyModule, TransportLazyModuleLoadedEvent, TruncatePipe, UserBaseService, UserBaseServiceEvent, VICommonModule, VIComponentModule, VI_ANGULAR_OPTIONS, ViewUtil, WINDOW_CONTENT_CONTAINER, WindowAlign, WindowBase, WindowBaseComponent, WindowCloseElementComponent, WindowConfig, WindowDragAreaDirective, WindowEvent, WindowFactory, WindowImpl, WindowMinimizeElementComponent, WindowModule, WindowQuestionBaseComponent, WindowQuestionComponent, WindowResizeElementComponent, WindowService, WindowServiceEvent, cookieServiceFactory, languageServiceFactory, loggerServiceFactory, notificationServiceFactory, themeAssetServiceFactory, themeServiceFactory, windowServiceFactory };
|
|
9695
9683
|
//# sourceMappingURL=ts-core-angular.mjs.map
|