@ts-core/angular 11.0.85 → 11.0.89
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/bundles/ts-core-angular.umd.js +357 -71
- package/bundles/ts-core-angular.umd.js.map +1 -1
- package/bundles/ts-core-angular.umd.min.js +1 -1
- package/bundles/ts-core-angular.umd.min.js.map +1 -1
- package/esm2015/login/LoginBaseService.js +3 -33
- package/esm2015/login/LoginGuard.js +5 -4
- package/esm2015/login/LoginRequireResolver.js +2 -2
- package/esm2015/module/LazyModuleLoader.js +98 -0
- package/esm2015/public-api.js +7 -1
- package/esm2015/theme/ThemeAssetDirective.js +4 -4
- package/esm2015/transport/TransportLazy.js +98 -0
- package/esm2015/transport/TransportLazyModule.js +28 -0
- package/esm2015/transport/TransportLazyModuleLoadedEvent.js +18 -0
- package/esm2015/user/UserBaseService.js +5 -5
- package/fesm2015/ts-core-angular.js +270 -71
- package/fesm2015/ts-core-angular.js.map +1 -1
- package/login/LoginBaseService.d.ts +1 -1
- package/login/LoginGuard.d.ts +4 -4
- package/login/LoginRequireResolver.d.ts +2 -2
- package/module/LazyModuleLoader.d.ts +21 -0
- package/package.json +1 -1
- package/public-api.d.ts +4 -0
- package/theme/ThemeAssetDirective.d.ts +1 -1
- package/transport/TransportLazy.d.ts +15 -0
- package/transport/TransportLazyModule.d.ts +16 -0
- package/transport/TransportLazyModuleLoadedEvent.d.ts +6 -0
- package/ts-core-angular.metadata.json +1 -1
- package/user/UserBaseService.d.ts +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DestroyableContainer, LoadableEvent, Destroyable, IDestroyable, Loadable, LoadableStatus } from '@ts-core/common';
|
|
2
2
|
import { PromiseHandler } from '@ts-core/common/promise';
|
|
3
|
-
import { isNil, isNaN as isNaN$1, isEmpty, isFunction, assign, find, camelCase, isDate, isString, isNumber, keys, truncate, capitalize, isBoolean, findIndex } from 'lodash';
|
|
3
|
+
import { isNil, isNaN as isNaN$1, isEmpty, isFunction, assign, find, camelCase, isDate, isString, isNumber, keys, truncate, capitalize, isBoolean, findIndex, includes } from 'lodash';
|
|
4
4
|
import { Assets } from '@ts-core/frontend/asset';
|
|
5
5
|
import { takeUntil, filter as filter$1, map } from 'rxjs/operators';
|
|
6
|
-
import { ViewContainerRef, Input, HostListener, Component, ɵɵdefineInjectable, ɵɵinject, Injectable, Directive, ElementRef, Pipe, NgModule, InjectionToken, EventEmitter, Output, TemplateRef, ComponentFactoryResolver, RendererStyleFlags2 } from '@angular/core';
|
|
6
|
+
import { ViewContainerRef, Input, HostListener, Component, ɵɵdefineInjectable, ɵɵinject, Injectable, Directive, ElementRef, Pipe, NgModule, InjectionToken, EventEmitter, Output, TemplateRef, ComponentFactoryResolver, RendererStyleFlags2, NgModuleFactory, Compiler, INJECTOR, Injector } from '@angular/core';
|
|
7
7
|
import moment from 'moment';
|
|
8
8
|
import numeral from 'numeral';
|
|
9
9
|
import { MatDialogConfig, MatDialog, MatDialogModule } from '@angular/material/dialog';
|
|
@@ -39,10 +39,11 @@ import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
|
39
39
|
import { MomentDateAdapter } from '@angular/material-moment-adapter';
|
|
40
40
|
import { __awaiter } from 'tslib';
|
|
41
41
|
import { ExtendedError } from '@ts-core/common/error';
|
|
42
|
-
import { TransportTimeoutError, TransportNoConnectionError } from '@ts-core/common/transport';
|
|
43
|
-
import { FilterableMapCollection } from '@ts-core/common/map';
|
|
42
|
+
import { TransportTimeoutError, TransportNoConnectionError, TransportEvent } from '@ts-core/common/transport';
|
|
43
|
+
import { FilterableMapCollection, MapCollection } from '@ts-core/common/map';
|
|
44
44
|
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
45
45
|
import { NavigationStart, NavigationEnd, NavigationCancel, NavigationError, ActivatedRoute } from '@angular/router';
|
|
46
|
+
import { TransportLocal } from '@ts-core/common/transport/local';
|
|
46
47
|
|
|
47
48
|
class ApplicationBaseComponent extends DestroyableContainer {
|
|
48
49
|
// --------------------------------------------------------------------------
|
|
@@ -6314,7 +6315,7 @@ class ThemeAssetDirective extends Destroyable {
|
|
|
6314
6315
|
return;
|
|
6315
6316
|
}
|
|
6316
6317
|
this.isTriedThemeDefault = true;
|
|
6317
|
-
this.source = this.getSource(this.getDefaultSourceId(
|
|
6318
|
+
this.source = this.getSource(this.getDefaultSourceId());
|
|
6318
6319
|
this.commitSourceProperties();
|
|
6319
6320
|
}
|
|
6320
6321
|
// --------------------------------------------------------------------------
|
|
@@ -6329,8 +6330,8 @@ class ThemeAssetDirective extends Destroyable {
|
|
|
6329
6330
|
getSourceId(theme) {
|
|
6330
6331
|
return !isNil(theme) ? this.name + capitalize(theme.name) : null;
|
|
6331
6332
|
}
|
|
6332
|
-
getDefaultSourceId(
|
|
6333
|
-
return
|
|
6333
|
+
getDefaultSourceId() {
|
|
6334
|
+
return this.themeAsset.getName(this.name, this.isIgnoreTheme);
|
|
6334
6335
|
}
|
|
6335
6336
|
// --------------------------------------------------------------------------
|
|
6336
6337
|
//
|
|
@@ -7718,36 +7719,6 @@ class LoginBaseService extends Loadable {
|
|
|
7718
7719
|
// Protected Methods
|
|
7719
7720
|
//
|
|
7720
7721
|
// --------------------------------------------------------------------------
|
|
7721
|
-
/*
|
|
7722
|
-
protected async loginByParam(param?: any): Promise<void> {
|
|
7723
|
-
if (this.isLoggedIn || this.isLoading) {
|
|
7724
|
-
return;
|
|
7725
|
-
}
|
|
7726
|
-
|
|
7727
|
-
this.status = LoadableStatus.LOADING;
|
|
7728
|
-
this.observer.next(new ObservableData(LoadableEvent.STARTED));
|
|
7729
|
-
this.observer.next(new ObservableData(LoginBaseServiceEvent.LOGIN_STARTED));
|
|
7730
|
-
|
|
7731
|
-
try {
|
|
7732
|
-
this.parseLoginResponse(await this.loginRequest(param));
|
|
7733
|
-
this.status = !this.isCanLoginWithSid() ? LoadableStatus.LOADED : LoadableStatus.LOADING;
|
|
7734
|
-
if (this.isLoading) {
|
|
7735
|
-
this.loginBySid();
|
|
7736
|
-
}
|
|
7737
|
-
} catch (error) {
|
|
7738
|
-
error = ExtendedError.create(error);
|
|
7739
|
-
|
|
7740
|
-
this.status = LoadableStatus.ERROR;
|
|
7741
|
-
this.parseLoginErrorResponse(error);
|
|
7742
|
-
this.observer.next(new ObservableData(LoginBaseServiceEvent.LOGIN_ERROR, null, error));
|
|
7743
|
-
}
|
|
7744
|
-
|
|
7745
|
-
if (!this.isLoading) {
|
|
7746
|
-
this.observer.next(new ObservableData(LoadableEvent.FINISHED));
|
|
7747
|
-
this.observer.next(new ObservableData(LoginBaseServiceEvent.LOGIN_FINISHED));
|
|
7748
|
-
}
|
|
7749
|
-
}
|
|
7750
|
-
*/
|
|
7751
7722
|
loginByParam(param) {
|
|
7752
7723
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7753
7724
|
return this.loginByFunction(() => this.loginRequest(param));
|
|
@@ -7826,7 +7797,6 @@ class LoginBaseService extends Loadable {
|
|
|
7826
7797
|
}
|
|
7827
7798
|
this.reset();
|
|
7828
7799
|
}
|
|
7829
|
-
// public abstract registration(param: any): void;
|
|
7830
7800
|
loginByResponse(param) {
|
|
7831
7801
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7832
7802
|
if (this.isLoggedIn || this.isLoading) {
|
|
@@ -7847,6 +7817,7 @@ class LoginBaseService extends Loadable {
|
|
|
7847
7817
|
return false;
|
|
7848
7818
|
}
|
|
7849
7819
|
if (!this.isLoggedIn && !this.isLoading) {
|
|
7820
|
+
this.status = LoadableStatus.LOADING;
|
|
7850
7821
|
this.observer.next(new ObservableData(LoadableEvent.STARTED));
|
|
7851
7822
|
this.observer.next(new ObservableData(LoginBaseServiceEvent.LOGIN_STARTED));
|
|
7852
7823
|
this.loginBySid();
|
|
@@ -7864,7 +7835,7 @@ class LoginBaseService extends Loadable {
|
|
|
7864
7835
|
yield this.logoutRequest();
|
|
7865
7836
|
}
|
|
7866
7837
|
catch (error) {
|
|
7867
|
-
this.parseLogoutErrorResponse(
|
|
7838
|
+
this.parseLogoutErrorResponse(error);
|
|
7868
7839
|
}
|
|
7869
7840
|
finally {
|
|
7870
7841
|
this.reset();
|
|
@@ -7923,32 +7894,6 @@ var LoginBaseServiceEvent;
|
|
|
7923
7894
|
LoginBaseServiceEvent["REGISTRATION_FINISHED"] = "REGISTRATION_FINISHED";
|
|
7924
7895
|
})(LoginBaseServiceEvent || (LoginBaseServiceEvent = {}));
|
|
7925
7896
|
|
|
7926
|
-
class LoginGuard {
|
|
7927
|
-
// --------------------------------------------------------------------------
|
|
7928
|
-
//
|
|
7929
|
-
// Constructor
|
|
7930
|
-
//
|
|
7931
|
-
// --------------------------------------------------------------------------
|
|
7932
|
-
constructor(login) {
|
|
7933
|
-
this.login = login;
|
|
7934
|
-
}
|
|
7935
|
-
// --------------------------------------------------------------------------
|
|
7936
|
-
//
|
|
7937
|
-
// Public Methods
|
|
7938
|
-
//
|
|
7939
|
-
// --------------------------------------------------------------------------
|
|
7940
|
-
canActivate(route, state) {
|
|
7941
|
-
return this.login.isLoggedIn;
|
|
7942
|
-
}
|
|
7943
|
-
}
|
|
7944
|
-
LoginGuard.ɵprov = ɵɵdefineInjectable({ factory: function LoginGuard_Factory() { return new LoginGuard(ɵɵinject(LoginBaseService)); }, token: LoginGuard, providedIn: "root" });
|
|
7945
|
-
LoginGuard.decorators = [
|
|
7946
|
-
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7947
|
-
];
|
|
7948
|
-
LoginGuard.ctorParameters = () => [
|
|
7949
|
-
{ type: LoginBaseService }
|
|
7950
|
-
];
|
|
7951
|
-
|
|
7952
7897
|
class LoginRequireResolver {
|
|
7953
7898
|
// --------------------------------------------------------------------------
|
|
7954
7899
|
//
|
|
@@ -7963,7 +7908,7 @@ class LoginRequireResolver {
|
|
|
7963
7908
|
// Public Methods
|
|
7964
7909
|
//
|
|
7965
7910
|
// --------------------------------------------------------------------------
|
|
7966
|
-
resolve(
|
|
7911
|
+
resolve() {
|
|
7967
7912
|
if (this.login.isLoggedIn) {
|
|
7968
7913
|
return Promise.resolve();
|
|
7969
7914
|
}
|
|
@@ -7983,6 +7928,32 @@ class LoginRequireResolver {
|
|
|
7983
7928
|
}
|
|
7984
7929
|
}
|
|
7985
7930
|
|
|
7931
|
+
class LoginGuard extends LoginRequireResolver {
|
|
7932
|
+
// --------------------------------------------------------------------------
|
|
7933
|
+
//
|
|
7934
|
+
// Constructor
|
|
7935
|
+
//
|
|
7936
|
+
// --------------------------------------------------------------------------
|
|
7937
|
+
constructor(login) {
|
|
7938
|
+
super(login);
|
|
7939
|
+
}
|
|
7940
|
+
// --------------------------------------------------------------------------
|
|
7941
|
+
//
|
|
7942
|
+
// Public Methods
|
|
7943
|
+
//
|
|
7944
|
+
// --------------------------------------------------------------------------
|
|
7945
|
+
canActivate() {
|
|
7946
|
+
return this.login.isLoggedIn;
|
|
7947
|
+
}
|
|
7948
|
+
}
|
|
7949
|
+
LoginGuard.ɵprov = ɵɵdefineInjectable({ factory: function LoginGuard_Factory() { return new LoginGuard(ɵɵinject(LoginBaseService)); }, token: LoginGuard, providedIn: "root" });
|
|
7950
|
+
LoginGuard.decorators = [
|
|
7951
|
+
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7952
|
+
];
|
|
7953
|
+
LoginGuard.ctorParameters = () => [
|
|
7954
|
+
{ type: LoginBaseService }
|
|
7955
|
+
];
|
|
7956
|
+
|
|
7986
7957
|
class LoginResolver extends LoginRequireResolver {
|
|
7987
7958
|
// --------------------------------------------------------------------------
|
|
7988
7959
|
//
|
|
@@ -9100,13 +9071,13 @@ class UserBaseService {
|
|
|
9100
9071
|
//
|
|
9101
9072
|
// --------------------------------------------------------------------------
|
|
9102
9073
|
isUser(value) {
|
|
9103
|
-
if (
|
|
9074
|
+
if (isNil(value) || isNil(this.user)) {
|
|
9104
9075
|
return false;
|
|
9105
9076
|
}
|
|
9106
|
-
if (value
|
|
9107
|
-
return this.user.id
|
|
9077
|
+
if (isString(value) || isNumber(value)) {
|
|
9078
|
+
return value === this.user.id;
|
|
9108
9079
|
}
|
|
9109
|
-
return this.user.id
|
|
9080
|
+
return value.id === this.user.id;
|
|
9110
9081
|
}
|
|
9111
9082
|
userUpdate(data) {
|
|
9112
9083
|
if (!this.hasUser) {
|
|
@@ -9152,11 +9123,239 @@ var UserBaseServiceEvent;
|
|
|
9152
9123
|
UserBaseServiceEvent["LOGOUTED"] = "LOGOUTED";
|
|
9153
9124
|
})(UserBaseServiceEvent || (UserBaseServiceEvent = {}));
|
|
9154
9125
|
|
|
9126
|
+
class LazyModuleLoader extends Loadable {
|
|
9127
|
+
//--------------------------------------------------------------------------
|
|
9128
|
+
//
|
|
9129
|
+
// Constructor
|
|
9130
|
+
//
|
|
9131
|
+
//--------------------------------------------------------------------------
|
|
9132
|
+
constructor(compiler, injector) {
|
|
9133
|
+
super();
|
|
9134
|
+
this.compiler = compiler;
|
|
9135
|
+
this.injector = injector;
|
|
9136
|
+
this._modules = new MapCollection('id');
|
|
9137
|
+
}
|
|
9138
|
+
//--------------------------------------------------------------------------
|
|
9139
|
+
//
|
|
9140
|
+
// Protected Methods
|
|
9141
|
+
//
|
|
9142
|
+
//--------------------------------------------------------------------------
|
|
9143
|
+
load(item) {
|
|
9144
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9145
|
+
item.reference = yield this.loadReference(item.path);
|
|
9146
|
+
});
|
|
9147
|
+
}
|
|
9148
|
+
loadReference(path) {
|
|
9149
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9150
|
+
let moduleFactory = null;
|
|
9151
|
+
let elementModuleOrFactory = yield path();
|
|
9152
|
+
if (elementModuleOrFactory instanceof NgModuleFactory) {
|
|
9153
|
+
moduleFactory = elementModuleOrFactory;
|
|
9154
|
+
}
|
|
9155
|
+
else {
|
|
9156
|
+
moduleFactory = yield this.compiler.compileModuleAsync(elementModuleOrFactory);
|
|
9157
|
+
}
|
|
9158
|
+
return moduleFactory.create(this.injector);
|
|
9159
|
+
});
|
|
9160
|
+
}
|
|
9161
|
+
isNeedLoad(item) {
|
|
9162
|
+
return isNil(item.reference);
|
|
9163
|
+
}
|
|
9164
|
+
//--------------------------------------------------------------------------
|
|
9165
|
+
//
|
|
9166
|
+
// Public Methods
|
|
9167
|
+
//
|
|
9168
|
+
//--------------------------------------------------------------------------
|
|
9169
|
+
loadIfNeed(id) {
|
|
9170
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9171
|
+
let item = this.modules.get(id);
|
|
9172
|
+
if (isNil(item)) {
|
|
9173
|
+
throw new ExtendedError(`Unable to find "${id}" module: it must be registered first`);
|
|
9174
|
+
}
|
|
9175
|
+
if (!this.isNeedLoad(item)) {
|
|
9176
|
+
return item;
|
|
9177
|
+
}
|
|
9178
|
+
try {
|
|
9179
|
+
this.observer.next(new ObservableData(LoadableEvent.STARTED));
|
|
9180
|
+
yield this.load(item);
|
|
9181
|
+
}
|
|
9182
|
+
finally {
|
|
9183
|
+
this.observer.next(new ObservableData(LoadableEvent.FINISHED));
|
|
9184
|
+
}
|
|
9185
|
+
return item;
|
|
9186
|
+
});
|
|
9187
|
+
}
|
|
9188
|
+
destroy() {
|
|
9189
|
+
if (this.isDestroyed) {
|
|
9190
|
+
return;
|
|
9191
|
+
}
|
|
9192
|
+
super.destroy();
|
|
9193
|
+
if (!isNil(this._modules)) {
|
|
9194
|
+
this._modules.destroy();
|
|
9195
|
+
this._modules = null;
|
|
9196
|
+
}
|
|
9197
|
+
}
|
|
9198
|
+
//--------------------------------------------------------------------------
|
|
9199
|
+
//
|
|
9200
|
+
// Public Properties
|
|
9201
|
+
//
|
|
9202
|
+
//--------------------------------------------------------------------------
|
|
9203
|
+
get modules() {
|
|
9204
|
+
return this._modules;
|
|
9205
|
+
}
|
|
9206
|
+
}
|
|
9207
|
+
LazyModuleLoader.ɵprov = ɵɵdefineInjectable({ factory: function LazyModuleLoader_Factory() { return new LazyModuleLoader(ɵɵinject(Compiler), ɵɵinject(INJECTOR)); }, token: LazyModuleLoader, providedIn: "root" });
|
|
9208
|
+
LazyModuleLoader.decorators = [
|
|
9209
|
+
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
9210
|
+
];
|
|
9211
|
+
LazyModuleLoader.ctorParameters = () => [
|
|
9212
|
+
{ type: Compiler },
|
|
9213
|
+
{ type: Injector }
|
|
9214
|
+
];
|
|
9215
|
+
|
|
9216
|
+
class TransportLazyModuleLoadedEvent extends TransportEvent {
|
|
9217
|
+
// --------------------------------------------------------------------------
|
|
9218
|
+
//
|
|
9219
|
+
// Constructor
|
|
9220
|
+
//
|
|
9221
|
+
// --------------------------------------------------------------------------
|
|
9222
|
+
constructor(request) {
|
|
9223
|
+
super(TransportLazyModuleLoadedEvent.NAME, request);
|
|
9224
|
+
}
|
|
9225
|
+
}
|
|
9226
|
+
// --------------------------------------------------------------------------
|
|
9227
|
+
//
|
|
9228
|
+
// Public Static Properties
|
|
9229
|
+
//
|
|
9230
|
+
// --------------------------------------------------------------------------
|
|
9231
|
+
TransportLazyModuleLoadedEvent.NAME = 'TransportLazyModuleLoadedEvent';
|
|
9232
|
+
|
|
9233
|
+
class TransportLazy extends TransportLocal {
|
|
9234
|
+
// --------------------------------------------------------------------------
|
|
9235
|
+
//
|
|
9236
|
+
// Constructor
|
|
9237
|
+
//
|
|
9238
|
+
// --------------------------------------------------------------------------
|
|
9239
|
+
constructor(logger, loader, settings) {
|
|
9240
|
+
super(logger, settings, null);
|
|
9241
|
+
this.loader = loader;
|
|
9242
|
+
this.getDispatcher(TransportLazyModuleLoadedEvent.NAME).subscribe(event => this.moduleLoadedHandler(event.data));
|
|
9243
|
+
}
|
|
9244
|
+
// --------------------------------------------------------------------------
|
|
9245
|
+
//
|
|
9246
|
+
// Event Handlers
|
|
9247
|
+
//
|
|
9248
|
+
// --------------------------------------------------------------------------
|
|
9249
|
+
moduleLoadedHandler(module) {
|
|
9250
|
+
let item = this.loader.modules.get(module.id);
|
|
9251
|
+
if (isNil(item)) {
|
|
9252
|
+
item = this.loader.modules.add(module);
|
|
9253
|
+
}
|
|
9254
|
+
if (isNil(item.reference)) {
|
|
9255
|
+
item.reference = module.reference;
|
|
9256
|
+
}
|
|
9257
|
+
}
|
|
9258
|
+
// --------------------------------------------------------------------------
|
|
9259
|
+
//
|
|
9260
|
+
// Protected Methods
|
|
9261
|
+
//
|
|
9262
|
+
// --------------------------------------------------------------------------
|
|
9263
|
+
dispatchCommand(command, options, isNeedReply) {
|
|
9264
|
+
const _super = Object.create(null, {
|
|
9265
|
+
dispatchCommand: { get: () => super.dispatchCommand }
|
|
9266
|
+
});
|
|
9267
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9268
|
+
let item = this.getModuleByCommand(command.name);
|
|
9269
|
+
console.log(command.name, item);
|
|
9270
|
+
if (!isNil(item)) {
|
|
9271
|
+
yield this.loader.loadIfNeed(item.id);
|
|
9272
|
+
}
|
|
9273
|
+
_super.dispatchCommand.call(this, command, options, isNeedReply);
|
|
9274
|
+
});
|
|
9275
|
+
}
|
|
9276
|
+
getModuleByCommand(name) {
|
|
9277
|
+
if (this.loader.modules.length === 0) {
|
|
9278
|
+
return null;
|
|
9279
|
+
}
|
|
9280
|
+
for (let item of this.loader.modules.collection) {
|
|
9281
|
+
if (isEmpty(item.commands)) {
|
|
9282
|
+
continue;
|
|
9283
|
+
}
|
|
9284
|
+
if (includes(item.commands, name)) {
|
|
9285
|
+
return item;
|
|
9286
|
+
}
|
|
9287
|
+
}
|
|
9288
|
+
return null;
|
|
9289
|
+
}
|
|
9290
|
+
getModuleByEvent(name) {
|
|
9291
|
+
if (isNil(this.loader) || this.loader.modules.length === 0) {
|
|
9292
|
+
return null;
|
|
9293
|
+
}
|
|
9294
|
+
for (let item of this.loader.modules.collection) {
|
|
9295
|
+
if (isEmpty(item.events)) {
|
|
9296
|
+
continue;
|
|
9297
|
+
}
|
|
9298
|
+
if (includes(item.events, name)) {
|
|
9299
|
+
return item;
|
|
9300
|
+
}
|
|
9301
|
+
}
|
|
9302
|
+
return null;
|
|
9303
|
+
}
|
|
9304
|
+
// --------------------------------------------------------------------------
|
|
9305
|
+
//
|
|
9306
|
+
// Public Methods
|
|
9307
|
+
//
|
|
9308
|
+
// --------------------------------------------------------------------------
|
|
9309
|
+
dispatch(event) {
|
|
9310
|
+
let item = this.getModuleByEvent(event.name);
|
|
9311
|
+
if (!isNil(this.loader) && !isNil(item)) {
|
|
9312
|
+
this.loader.loadIfNeed(item.id).then(() => super.dispatch(event));
|
|
9313
|
+
}
|
|
9314
|
+
else {
|
|
9315
|
+
super.dispatch(event);
|
|
9316
|
+
}
|
|
9317
|
+
}
|
|
9318
|
+
destroy() {
|
|
9319
|
+
if (this.isDestroyed) {
|
|
9320
|
+
return;
|
|
9321
|
+
}
|
|
9322
|
+
super.destroy();
|
|
9323
|
+
this.loader = null;
|
|
9324
|
+
}
|
|
9325
|
+
}
|
|
9326
|
+
|
|
9327
|
+
class TransportLazyModule {
|
|
9328
|
+
//--------------------------------------------------------------------------
|
|
9329
|
+
//
|
|
9330
|
+
// Constructor
|
|
9331
|
+
//
|
|
9332
|
+
//--------------------------------------------------------------------------
|
|
9333
|
+
constructor(reference, transport) {
|
|
9334
|
+
this.reference = reference;
|
|
9335
|
+
this.transport = transport;
|
|
9336
|
+
this.moduleLoadedDispatch();
|
|
9337
|
+
}
|
|
9338
|
+
//--------------------------------------------------------------------------
|
|
9339
|
+
//
|
|
9340
|
+
// Protected Methods
|
|
9341
|
+
//
|
|
9342
|
+
//--------------------------------------------------------------------------
|
|
9343
|
+
moduleLoadedDispatch() {
|
|
9344
|
+
this.transport.dispatch(new TransportLazyModuleLoadedEvent(this));
|
|
9345
|
+
}
|
|
9346
|
+
get events() {
|
|
9347
|
+
return new Array();
|
|
9348
|
+
}
|
|
9349
|
+
get commands() {
|
|
9350
|
+
return new Array();
|
|
9351
|
+
}
|
|
9352
|
+
}
|
|
9353
|
+
|
|
9155
9354
|
/* ======= */
|
|
9156
9355
|
|
|
9157
9356
|
/**
|
|
9158
9357
|
* Generated bundle index. Do not edit.
|
|
9159
9358
|
*/
|
|
9160
9359
|
|
|
9161
|
-
export { APPLICATION_INJECTOR, ApplicationBaseComponent, ApplicationComponent, ApplicationComponent2, AspectRatioResizeDirective, AssetBackgroundDirective, AssetBackgroundPipe, AssetIconPipe, AssetImagePipe, AssetModule, AutoScrollBottomDirective, BootstrapBreakpoint, BootstrapBreakpointService, BootstrapBreakpointServiceEvent, BottomSheetService, COOKIE_OPTIONS, CamelCasePipe, CanDeactivateGuard, CdkTableBaseComponent, CdkTableDataSource, CdkTableFilterableMapCollection, CdkTablePaginableBookmarkMapCollection, CdkTablePaginableMapCollection, 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, ListItem, ListItems, LoginBaseService, LoginBaseServiceEvent, LoginGuard, LoginRedirectResolver, LoginRequireResolver, LoginResolver, MenuItem, MenuItemBase, MenuItems, MenuListComponent, MessageBaseComponent, MomentDateAdaptivePipe, MomentDateFromNowPipe, MomentDatePipe, MomentTimePipe, NavigationMenuItem, NgModelErrorPipe, NotificationConfig, NotificationEvent, NotificationFactory, NotificationModule, NotificationService, NotificationServiceEvent, PipeBaseService, PrettifyPipe, PropertiesManager, QuestionEvent, QuestionManager, QuestionMode, ResizeDirective, ResizeManager, RouterBaseService, SanitizePipe, ScrollDirective, SelectListComponent, SelectListItem, SelectListItems, SelectOnFocusDirective, ShellBaseComponent, StartCasePipe, THEME_OPTIONS, TabGroupComponent, ThemeAssetBackgroundDirective, ThemeAssetDirective, ThemeAssetImageDirective, ThemeModule, ThemeStyleDirective, ThemeStyleHoverDirective, ThemeToggleDirective, TimePipe, TruncatePipe, UserBaseService, UserBaseServiceEvent, VICommonModule, VIComponentModule, VI_ANGULAR_OPTIONS, ViewUtil, WindowAlign, WindowBase, WindowConfig, WindowEvent, WindowFactory, WindowImpl, WindowModule, WindowService, WindowServiceEvent, cookieServiceFactory, languageServiceFactory, loggerServiceFactory, themeAssetServiceFactory, themeServiceFactory, AssetFilePipe as ɵa, AssetSoundPipe as ɵb, AssetVideoPipe as ɵc, WindowDragAreaDirective as ɵd, WindowQuestionComponent as ɵe, WindowQuestionBaseComponent as ɵf, WindowCloseElementComponent as ɵg, WindowElement as ɵh, WindowResizeElementComponent as ɵi, WindowMinimizeElementComponent as ɵj, NotificationComponent as ɵk, NotificationQuestionBaseComponent as ɵl, BottomSheetModule as ɵm, BottomSheetCloseElementComponent as ɵn, CdkTableColumnValuePipe as ɵo, CdkTableColumnClassNamePipe as ɵp, CdkTableColumnStyleNamePipe as ɵq, CdkTableRowStyleNamePipe as ɵr, CdkTableRowClassNamePipe as ɵs, CdkTableCellClassNamePipe as ɵt, CdkTablePaginableComponent as ɵu, CdkTableFilterableComponent as ɵv, ValueAccessor as ɵw };
|
|
9360
|
+
export { APPLICATION_INJECTOR, ApplicationBaseComponent, ApplicationComponent, ApplicationComponent2, AspectRatioResizeDirective, AssetBackgroundDirective, AssetBackgroundPipe, AssetIconPipe, AssetImagePipe, AssetModule, AutoScrollBottomDirective, BootstrapBreakpoint, BootstrapBreakpointService, BootstrapBreakpointServiceEvent, BottomSheetService, COOKIE_OPTIONS, CamelCasePipe, CanDeactivateGuard, CdkTableBaseComponent, CdkTableDataSource, CdkTableFilterableMapCollection, CdkTablePaginableBookmarkMapCollection, CdkTablePaginableMapCollection, 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, LoginRedirectResolver, LoginRequireResolver, LoginResolver, MenuItem, MenuItemBase, MenuItems, MenuListComponent, MessageBaseComponent, MomentDateAdaptivePipe, MomentDateFromNowPipe, MomentDatePipe, MomentTimePipe, NavigationMenuItem, NgModelErrorPipe, NotificationConfig, NotificationEvent, NotificationFactory, NotificationModule, NotificationService, NotificationServiceEvent, PipeBaseService, PrettifyPipe, PropertiesManager, QuestionEvent, QuestionManager, QuestionMode, ResizeDirective, ResizeManager, RouterBaseService, SanitizePipe, 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, WindowAlign, WindowBase, WindowConfig, WindowEvent, WindowFactory, WindowImpl, WindowModule, WindowService, WindowServiceEvent, cookieServiceFactory, languageServiceFactory, loggerServiceFactory, themeAssetServiceFactory, themeServiceFactory, AssetFilePipe as ɵa, AssetSoundPipe as ɵb, AssetVideoPipe as ɵc, WindowDragAreaDirective as ɵd, WindowQuestionComponent as ɵe, WindowQuestionBaseComponent as ɵf, WindowCloseElementComponent as ɵg, WindowElement as ɵh, WindowResizeElementComponent as ɵi, WindowMinimizeElementComponent as ɵj, NotificationComponent as ɵk, NotificationQuestionBaseComponent as ɵl, BottomSheetModule as ɵm, BottomSheetCloseElementComponent as ɵn, CdkTableColumnValuePipe as ɵo, CdkTableColumnClassNamePipe as ɵp, CdkTableColumnStyleNamePipe as ɵq, CdkTableRowStyleNamePipe as ɵr, CdkTableRowClassNamePipe as ɵs, CdkTableCellClassNamePipe as ɵt, CdkTablePaginableComponent as ɵu, CdkTableFilterableComponent as ɵv, ValueAccessor as ɵw };
|
|
9162
9361
|
//# sourceMappingURL=ts-core-angular.js.map
|