@ts-core/angular 11.0.84 → 11.0.88
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 +108 -88
- 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 +23 -42
- package/esm2015/login/LoginGuard.js +5 -4
- package/esm2015/login/LoginRequireResolver.js +2 -2
- package/esm2015/theme/ThemeAssetBackgroundDirective.js +6 -5
- package/esm2015/theme/ThemeAssetDirective.js +24 -14
- package/esm2015/theme/ThemeAssetImageDirective.js +6 -5
- package/esm2015/theme/ThemeModule.js +10 -2
- package/esm2015/user/UserBaseService.js +2 -2
- package/fesm2015/ts-core-angular.js +91 -89
- package/fesm2015/ts-core-angular.js.map +1 -1
- package/login/LoginBaseService.d.ts +3 -3
- package/login/LoginGuard.d.ts +4 -4
- package/login/LoginRequireResolver.d.ts +2 -2
- package/package.json +3 -3
- package/style/mat/bootstrap/_border.scss +4 -1
- package/theme/ThemeAssetBackgroundDirective.d.ts +2 -2
- package/theme/ThemeAssetDirective.d.ts +7 -3
- package/theme/ThemeAssetImageDirective.d.ts +2 -2
- package/theme/ThemeModule.d.ts +2 -1
- package/ts-core-angular.metadata.json +1 -1
- package/user/UserBaseService.d.ts +1 -1
|
@@ -7328,15 +7328,17 @@
|
|
|
7328
7328
|
// Constructor
|
|
7329
7329
|
//
|
|
7330
7330
|
// --------------------------------------------------------------------------
|
|
7331
|
-
function ThemeAssetDirective(element, theme) {
|
|
7331
|
+
function ThemeAssetDirective(element, theme, themeAsset) {
|
|
7332
7332
|
var _this = _super.call(this) || this;
|
|
7333
7333
|
_this.theme = theme;
|
|
7334
|
+
_this.themeAsset = themeAsset;
|
|
7334
7335
|
_this._extension = 'png';
|
|
7335
7336
|
_this._isFile = false;
|
|
7336
7337
|
_this._isImage = false;
|
|
7337
7338
|
_this._isVideo = false;
|
|
7338
7339
|
_this._isSound = false;
|
|
7339
7340
|
_this._isBackground = false;
|
|
7341
|
+
_this._isIgnoreTheme = true;
|
|
7340
7342
|
_this.element = ViewUtil.parseElement(element.nativeElement);
|
|
7341
7343
|
_this.theme.changed.pipe(operators.takeUntil(_this.destroyed)).subscribe(function () {
|
|
7342
7344
|
_this.isTriedThemeDefault = false;
|
|
@@ -7354,21 +7356,21 @@
|
|
|
7354
7356
|
return null;
|
|
7355
7357
|
}
|
|
7356
7358
|
if (this.isImage) {
|
|
7357
|
-
return
|
|
7359
|
+
return this.themeAsset.getImage(id, this.extension, this.isIgnoreTheme);
|
|
7358
7360
|
}
|
|
7359
7361
|
if (this.isBackground) {
|
|
7360
|
-
return
|
|
7362
|
+
return this.themeAsset.getBackground(id, this.extension, this.isIgnoreTheme);
|
|
7361
7363
|
}
|
|
7362
7364
|
if (this.isSound) {
|
|
7363
|
-
return
|
|
7365
|
+
return this.themeAsset.getSound(id, this.extension, this.isIgnoreTheme);
|
|
7364
7366
|
}
|
|
7365
7367
|
if (this.isVideo) {
|
|
7366
|
-
return
|
|
7368
|
+
return this.themeAsset.getVideo(id, this.extension, this.isIgnoreTheme);
|
|
7367
7369
|
}
|
|
7368
7370
|
if (this.isFile) {
|
|
7369
|
-
return
|
|
7371
|
+
return this.themeAsset.getFile(id, this.extension, this.isIgnoreTheme);
|
|
7370
7372
|
}
|
|
7371
|
-
return
|
|
7373
|
+
return this.themeAsset.getIcon(id, this.extension, this.isIgnoreTheme);
|
|
7372
7374
|
};
|
|
7373
7375
|
// --------------------------------------------------------------------------
|
|
7374
7376
|
//
|
|
@@ -7383,7 +7385,7 @@
|
|
|
7383
7385
|
return;
|
|
7384
7386
|
}
|
|
7385
7387
|
this.isTriedThemeDefault = true;
|
|
7386
|
-
this.source = this.getSource(this.getDefaultSourceId(
|
|
7388
|
+
this.source = this.getSource(this.getDefaultSourceId());
|
|
7387
7389
|
this.commitSourceProperties();
|
|
7388
7390
|
};
|
|
7389
7391
|
// --------------------------------------------------------------------------
|
|
@@ -7398,10 +7400,8 @@
|
|
|
7398
7400
|
ThemeAssetDirective.prototype.getSourceId = function (theme) {
|
|
7399
7401
|
return !_.isNil(theme) ? this.name + _.capitalize(theme.name) : null;
|
|
7400
7402
|
};
|
|
7401
|
-
ThemeAssetDirective.prototype.getDefaultSourceId = function (
|
|
7402
|
-
|
|
7403
|
-
value += theme.isDark ? 'Dark' : 'Light';
|
|
7404
|
-
return value;
|
|
7403
|
+
ThemeAssetDirective.prototype.getDefaultSourceId = function () {
|
|
7404
|
+
return this.themeAsset.getName(this.name, this.isIgnoreTheme);
|
|
7405
7405
|
};
|
|
7406
7406
|
// --------------------------------------------------------------------------
|
|
7407
7407
|
//
|
|
@@ -7492,6 +7492,20 @@
|
|
|
7492
7492
|
enumerable: false,
|
|
7493
7493
|
configurable: true
|
|
7494
7494
|
});
|
|
7495
|
+
Object.defineProperty(ThemeAssetDirective.prototype, "isIgnoreTheme", {
|
|
7496
|
+
get: function () {
|
|
7497
|
+
return this._isIgnoreTheme;
|
|
7498
|
+
},
|
|
7499
|
+
set: function (value) {
|
|
7500
|
+
if (value === this._isIgnoreTheme) {
|
|
7501
|
+
return;
|
|
7502
|
+
}
|
|
7503
|
+
this._isIgnoreTheme = value;
|
|
7504
|
+
this.setSourceProperties();
|
|
7505
|
+
},
|
|
7506
|
+
enumerable: false,
|
|
7507
|
+
configurable: true
|
|
7508
|
+
});
|
|
7495
7509
|
Object.defineProperty(ThemeAssetDirective.prototype, "name", {
|
|
7496
7510
|
get: function () {
|
|
7497
7511
|
return this._name;
|
|
@@ -7536,6 +7550,7 @@
|
|
|
7536
7550
|
isFile: [{ type: i0.Input }],
|
|
7537
7551
|
isImage: [{ type: i0.Input }],
|
|
7538
7552
|
isBackground: [{ type: i0.Input }],
|
|
7553
|
+
isIgnoreTheme: [{ type: i0.Input }],
|
|
7539
7554
|
name: [{ type: i0.Input }],
|
|
7540
7555
|
extension: [{ type: i0.Input }]
|
|
7541
7556
|
};
|
|
@@ -7547,8 +7562,8 @@
|
|
|
7547
7562
|
// Constructor
|
|
7548
7563
|
//
|
|
7549
7564
|
// --------------------------------------------------------------------------
|
|
7550
|
-
function ThemeAssetBackgroundDirective(element, theme) {
|
|
7551
|
-
return _super.call(this, element, theme) || this;
|
|
7565
|
+
function ThemeAssetBackgroundDirective(element, theme, themeAsset) {
|
|
7566
|
+
return _super.call(this, element, theme, themeAsset) || this;
|
|
7552
7567
|
}
|
|
7553
7568
|
// --------------------------------------------------------------------------
|
|
7554
7569
|
//
|
|
@@ -7571,7 +7586,8 @@
|
|
|
7571
7586
|
];
|
|
7572
7587
|
ThemeAssetBackgroundDirective.ctorParameters = function () { return [
|
|
7573
7588
|
{ type: i0.ElementRef },
|
|
7574
|
-
{ type: theme.ThemeService }
|
|
7589
|
+
{ type: theme.ThemeService },
|
|
7590
|
+
{ type: theme.ThemeAssetService }
|
|
7575
7591
|
]; };
|
|
7576
7592
|
|
|
7577
7593
|
var ThemeAssetImageDirective = /** @class */ (function (_super) {
|
|
@@ -7581,8 +7597,8 @@
|
|
|
7581
7597
|
// Constructor
|
|
7582
7598
|
//
|
|
7583
7599
|
// --------------------------------------------------------------------------
|
|
7584
|
-
function ThemeAssetImageDirective(element, theme) {
|
|
7585
|
-
return _super.call(this, element, theme) || this;
|
|
7600
|
+
function ThemeAssetImageDirective(element, theme, themeAsset) {
|
|
7601
|
+
return _super.call(this, element, theme, themeAsset) || this;
|
|
7586
7602
|
}
|
|
7587
7603
|
// --------------------------------------------------------------------------
|
|
7588
7604
|
//
|
|
@@ -7604,7 +7620,8 @@
|
|
|
7604
7620
|
];
|
|
7605
7621
|
ThemeAssetImageDirective.ctorParameters = function () { return [
|
|
7606
7622
|
{ type: i0.ElementRef },
|
|
7607
|
-
{ type: theme.ThemeService }
|
|
7623
|
+
{ type: theme.ThemeService },
|
|
7624
|
+
{ type: theme.ThemeAssetService }
|
|
7608
7625
|
]; };
|
|
7609
7626
|
|
|
7610
7627
|
var ThemeToggleDirective = /** @class */ (function (_super) {
|
|
@@ -7932,6 +7949,11 @@
|
|
|
7932
7949
|
provide: theme.ThemeService,
|
|
7933
7950
|
deps: [CookieService, THEME_OPTIONS],
|
|
7934
7951
|
useFactory: themeServiceFactory
|
|
7952
|
+
},
|
|
7953
|
+
{
|
|
7954
|
+
provide: theme.ThemeAssetService,
|
|
7955
|
+
deps: [theme.ThemeService],
|
|
7956
|
+
useFactory: themeAssetServiceFactory
|
|
7935
7957
|
}
|
|
7936
7958
|
]
|
|
7937
7959
|
};
|
|
@@ -7951,6 +7973,9 @@
|
|
|
7951
7973
|
}
|
|
7952
7974
|
return new theme.ThemeService(options);
|
|
7953
7975
|
}
|
|
7976
|
+
function themeAssetServiceFactory(theme$1) {
|
|
7977
|
+
return new theme.ThemeAssetService(theme$1);
|
|
7978
|
+
}
|
|
7954
7979
|
var THEME_OPTIONS = new i0.InjectionToken("THEME_OPTIONS");
|
|
7955
7980
|
|
|
7956
7981
|
var WindowDragAreaDirective = /** @class */ (function (_super) {
|
|
@@ -8990,36 +9015,6 @@
|
|
|
8990
9015
|
// Protected Methods
|
|
8991
9016
|
//
|
|
8992
9017
|
// --------------------------------------------------------------------------
|
|
8993
|
-
/*
|
|
8994
|
-
protected async loginByParam(param?: any): Promise<void> {
|
|
8995
|
-
if (this.isLoggedIn || this.isLoading) {
|
|
8996
|
-
return;
|
|
8997
|
-
}
|
|
8998
|
-
|
|
8999
|
-
this.status = LoadableStatus.LOADING;
|
|
9000
|
-
this.observer.next(new ObservableData(LoadableEvent.STARTED));
|
|
9001
|
-
this.observer.next(new ObservableData(LoginBaseServiceEvent.LOGIN_STARTED));
|
|
9002
|
-
|
|
9003
|
-
try {
|
|
9004
|
-
this.parseLoginResponse(await this.loginRequest(param));
|
|
9005
|
-
this.status = !this.isCanLoginWithSid() ? LoadableStatus.LOADED : LoadableStatus.LOADING;
|
|
9006
|
-
if (this.isLoading) {
|
|
9007
|
-
this.loginBySid();
|
|
9008
|
-
}
|
|
9009
|
-
} catch (error) {
|
|
9010
|
-
error = ExtendedError.create(error);
|
|
9011
|
-
|
|
9012
|
-
this.status = LoadableStatus.ERROR;
|
|
9013
|
-
this.parseLoginErrorResponse(error);
|
|
9014
|
-
this.observer.next(new ObservableData(LoginBaseServiceEvent.LOGIN_ERROR, null, error));
|
|
9015
|
-
}
|
|
9016
|
-
|
|
9017
|
-
if (!this.isLoading) {
|
|
9018
|
-
this.observer.next(new ObservableData(LoadableEvent.FINISHED));
|
|
9019
|
-
this.observer.next(new ObservableData(LoginBaseServiceEvent.LOGIN_FINISHED));
|
|
9020
|
-
}
|
|
9021
|
-
}
|
|
9022
|
-
*/
|
|
9023
9018
|
LoginBaseService.prototype.loginByParam = function (param) {
|
|
9024
9019
|
return __awaiter(this, void 0, void 0, function () {
|
|
9025
9020
|
var _this = this;
|
|
@@ -9115,6 +9110,7 @@
|
|
|
9115
9110
|
this._loginData = null;
|
|
9116
9111
|
};
|
|
9117
9112
|
LoginBaseService.prototype.parseLoginErrorResponse = function (error) { };
|
|
9113
|
+
LoginBaseService.prototype.parseLogoutErrorResponse = function (error) { };
|
|
9118
9114
|
LoginBaseService.prototype.parseLoginSidResponse = function (response) {
|
|
9119
9115
|
this._loginData = response;
|
|
9120
9116
|
};
|
|
@@ -9152,6 +9148,7 @@
|
|
|
9152
9148
|
return false;
|
|
9153
9149
|
}
|
|
9154
9150
|
if (!this.isLoggedIn && !this.isLoading) {
|
|
9151
|
+
this.status = common.LoadableStatus.LOADING;
|
|
9155
9152
|
this.observer.next(new observer.ObservableData(common.LoadableEvent.STARTED));
|
|
9156
9153
|
this.observer.next(new observer.ObservableData(exports.LoginBaseServiceEvent.LOGIN_STARTED));
|
|
9157
9154
|
this.loginBySid();
|
|
@@ -9159,17 +9156,38 @@
|
|
|
9159
9156
|
return true;
|
|
9160
9157
|
};
|
|
9161
9158
|
LoginBaseService.prototype.logout = function () {
|
|
9162
|
-
|
|
9163
|
-
|
|
9164
|
-
|
|
9165
|
-
|
|
9166
|
-
|
|
9167
|
-
|
|
9168
|
-
|
|
9169
|
-
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
|
|
9159
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
9160
|
+
var error_3;
|
|
9161
|
+
return __generator(this, function (_a) {
|
|
9162
|
+
switch (_a.label) {
|
|
9163
|
+
case 0:
|
|
9164
|
+
if (!this.isLoggedIn) {
|
|
9165
|
+
return [2 /*return*/];
|
|
9166
|
+
}
|
|
9167
|
+
this.observer.next(new observer.ObservableData(common.LoadableEvent.STARTED));
|
|
9168
|
+
this.observer.next(new observer.ObservableData(exports.LoginBaseServiceEvent.LOGOUT_STARTED));
|
|
9169
|
+
_a.label = 1;
|
|
9170
|
+
case 1:
|
|
9171
|
+
_a.trys.push([1, 3, 4, 5]);
|
|
9172
|
+
return [4 /*yield*/, this.logoutRequest()];
|
|
9173
|
+
case 2:
|
|
9174
|
+
_a.sent();
|
|
9175
|
+
return [3 /*break*/, 5];
|
|
9176
|
+
case 3:
|
|
9177
|
+
error_3 = _a.sent();
|
|
9178
|
+
this.parseLogoutErrorResponse(error.ExtendedError.create(error_3));
|
|
9179
|
+
return [3 /*break*/, 5];
|
|
9180
|
+
case 4:
|
|
9181
|
+
this.reset();
|
|
9182
|
+
this._isLoggedIn = false;
|
|
9183
|
+
this.status = common.LoadableStatus.NOT_LOADED;
|
|
9184
|
+
this.observer.next(new observer.ObservableData(common.LoadableEvent.FINISHED));
|
|
9185
|
+
this.observer.next(new observer.ObservableData(exports.LoginBaseServiceEvent.LOGOUT_FINISHED));
|
|
9186
|
+
return [7 /*endfinally*/];
|
|
9187
|
+
case 5: return [2 /*return*/];
|
|
9188
|
+
}
|
|
9189
|
+
});
|
|
9190
|
+
});
|
|
9173
9191
|
};
|
|
9174
9192
|
LoginBaseService.prototype.isCanLoginWithSid = function () {
|
|
9175
9193
|
return this.sid != null || this.getSavedSid() != null;
|
|
@@ -9243,33 +9261,6 @@
|
|
|
9243
9261
|
LoginBaseServiceEvent["REGISTRATION_FINISHED"] = "REGISTRATION_FINISHED";
|
|
9244
9262
|
})(exports.LoginBaseServiceEvent || (exports.LoginBaseServiceEvent = {}));
|
|
9245
9263
|
|
|
9246
|
-
var LoginGuard = /** @class */ (function () {
|
|
9247
|
-
// --------------------------------------------------------------------------
|
|
9248
|
-
//
|
|
9249
|
-
// Constructor
|
|
9250
|
-
//
|
|
9251
|
-
// --------------------------------------------------------------------------
|
|
9252
|
-
function LoginGuard(login) {
|
|
9253
|
-
this.login = login;
|
|
9254
|
-
}
|
|
9255
|
-
// --------------------------------------------------------------------------
|
|
9256
|
-
//
|
|
9257
|
-
// Public Methods
|
|
9258
|
-
//
|
|
9259
|
-
// --------------------------------------------------------------------------
|
|
9260
|
-
LoginGuard.prototype.canActivate = function (route, state) {
|
|
9261
|
-
return this.login.isLoggedIn;
|
|
9262
|
-
};
|
|
9263
|
-
return LoginGuard;
|
|
9264
|
-
}());
|
|
9265
|
-
LoginGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function LoginGuard_Factory() { return new LoginGuard(i0.ɵɵinject(LoginBaseService)); }, token: LoginGuard, providedIn: "root" });
|
|
9266
|
-
LoginGuard.decorators = [
|
|
9267
|
-
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
9268
|
-
];
|
|
9269
|
-
LoginGuard.ctorParameters = function () { return [
|
|
9270
|
-
{ type: LoginBaseService }
|
|
9271
|
-
]; };
|
|
9272
|
-
|
|
9273
9264
|
var LoginRequireResolver = /** @class */ (function () {
|
|
9274
9265
|
// --------------------------------------------------------------------------
|
|
9275
9266
|
//
|
|
@@ -9284,7 +9275,7 @@
|
|
|
9284
9275
|
// Public Methods
|
|
9285
9276
|
//
|
|
9286
9277
|
// --------------------------------------------------------------------------
|
|
9287
|
-
LoginRequireResolver.prototype.resolve = function (
|
|
9278
|
+
LoginRequireResolver.prototype.resolve = function () {
|
|
9288
9279
|
if (this.login.isLoggedIn) {
|
|
9289
9280
|
return Promise.resolve();
|
|
9290
9281
|
}
|
|
@@ -9305,6 +9296,34 @@
|
|
|
9305
9296
|
return LoginRequireResolver;
|
|
9306
9297
|
}());
|
|
9307
9298
|
|
|
9299
|
+
var LoginGuard = /** @class */ (function (_super) {
|
|
9300
|
+
__extends(LoginGuard, _super);
|
|
9301
|
+
// --------------------------------------------------------------------------
|
|
9302
|
+
//
|
|
9303
|
+
// Constructor
|
|
9304
|
+
//
|
|
9305
|
+
// --------------------------------------------------------------------------
|
|
9306
|
+
function LoginGuard(login) {
|
|
9307
|
+
return _super.call(this, login) || this;
|
|
9308
|
+
}
|
|
9309
|
+
// --------------------------------------------------------------------------
|
|
9310
|
+
//
|
|
9311
|
+
// Public Methods
|
|
9312
|
+
//
|
|
9313
|
+
// --------------------------------------------------------------------------
|
|
9314
|
+
LoginGuard.prototype.canActivate = function () {
|
|
9315
|
+
return this.login.isLoggedIn;
|
|
9316
|
+
};
|
|
9317
|
+
return LoginGuard;
|
|
9318
|
+
}(LoginRequireResolver));
|
|
9319
|
+
LoginGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function LoginGuard_Factory() { return new LoginGuard(i0.ɵɵinject(LoginBaseService)); }, token: LoginGuard, providedIn: "root" });
|
|
9320
|
+
LoginGuard.decorators = [
|
|
9321
|
+
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
9322
|
+
];
|
|
9323
|
+
LoginGuard.ctorParameters = function () { return [
|
|
9324
|
+
{ type: LoginBaseService }
|
|
9325
|
+
]; };
|
|
9326
|
+
|
|
9308
9327
|
var LoginResolver = /** @class */ (function (_super) {
|
|
9309
9328
|
__extends(LoginResolver, _super);
|
|
9310
9329
|
// --------------------------------------------------------------------------
|
|
@@ -10737,7 +10756,7 @@
|
|
|
10737
10756
|
}
|
|
10738
10757
|
return this.user.id === value;
|
|
10739
10758
|
};
|
|
10740
|
-
UserBaseService.prototype.
|
|
10759
|
+
UserBaseService.prototype.userUpdate = function (data) {
|
|
10741
10760
|
if (!this.hasUser) {
|
|
10742
10761
|
return;
|
|
10743
10762
|
}
|
|
@@ -10933,6 +10952,7 @@
|
|
|
10933
10952
|
exports.cookieServiceFactory = cookieServiceFactory;
|
|
10934
10953
|
exports.languageServiceFactory = languageServiceFactory;
|
|
10935
10954
|
exports.loggerServiceFactory = loggerServiceFactory;
|
|
10955
|
+
exports.themeAssetServiceFactory = themeAssetServiceFactory;
|
|
10936
10956
|
exports.themeServiceFactory = themeServiceFactory;
|
|
10937
10957
|
exports.ɵa = AssetFilePipe;
|
|
10938
10958
|
exports.ɵb = AssetSoundPipe;
|