@ts-core/angular 11.0.82 → 11.0.86
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 +101 -37
- 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/language/LanguageModule.js +3 -2
- package/esm2015/login/LoginBaseService.js +23 -12
- package/esm2015/service/RouterBaseService.js +12 -5
- 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 +11 -3
- package/esm2015/user/UserBaseService.js +2 -2
- package/fesm2015/ts-core-angular.js +77 -38
- package/fesm2015/ts-core-angular.js.map +1 -1
- package/login/LoginBaseService.d.ts +3 -3
- package/package.json +3 -3
- package/service/RouterBaseService.d.ts +5 -2
- 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
|
@@ -4722,7 +4722,7 @@
|
|
|
4722
4722
|
},] }
|
|
4723
4723
|
];
|
|
4724
4724
|
function languageServiceFactory(cookie, options) {
|
|
4725
|
-
if (options &&
|
|
4725
|
+
if (!_.isNil(options) && _.isNil(options.service)) {
|
|
4726
4726
|
options.service = cookie;
|
|
4727
4727
|
}
|
|
4728
4728
|
return new language.LanguageService(options);
|
|
@@ -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
|
};
|
|
@@ -7946,11 +7968,14 @@
|
|
|
7946
7968
|
},] }
|
|
7947
7969
|
];
|
|
7948
7970
|
function themeServiceFactory(cookie, options) {
|
|
7949
|
-
if (!_.isNil(options) &&
|
|
7971
|
+
if (!_.isNil(options) && _.isNil(options.service)) {
|
|
7950
7972
|
options.service = cookie;
|
|
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) {
|
|
@@ -9115,6 +9140,7 @@
|
|
|
9115
9140
|
this._loginData = null;
|
|
9116
9141
|
};
|
|
9117
9142
|
LoginBaseService.prototype.parseLoginErrorResponse = function (error) { };
|
|
9143
|
+
LoginBaseService.prototype.parseLogoutErrorResponse = function (error) { };
|
|
9118
9144
|
LoginBaseService.prototype.parseLoginSidResponse = function (response) {
|
|
9119
9145
|
this._loginData = response;
|
|
9120
9146
|
};
|
|
@@ -9124,6 +9150,7 @@
|
|
|
9124
9150
|
}
|
|
9125
9151
|
this.reset();
|
|
9126
9152
|
};
|
|
9153
|
+
// public abstract registration(param: any): void;
|
|
9127
9154
|
LoginBaseService.prototype.loginByResponse = function (param) {
|
|
9128
9155
|
return __awaiter(this, void 0, void 0, function () {
|
|
9129
9156
|
return __generator(this, function (_a) {
|
|
@@ -9159,17 +9186,38 @@
|
|
|
9159
9186
|
return true;
|
|
9160
9187
|
};
|
|
9161
9188
|
LoginBaseService.prototype.logout = function () {
|
|
9162
|
-
|
|
9163
|
-
|
|
9164
|
-
|
|
9165
|
-
|
|
9166
|
-
|
|
9167
|
-
|
|
9168
|
-
|
|
9169
|
-
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
|
|
9189
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
9190
|
+
var error_3;
|
|
9191
|
+
return __generator(this, function (_a) {
|
|
9192
|
+
switch (_a.label) {
|
|
9193
|
+
case 0:
|
|
9194
|
+
if (!this.isLoggedIn) {
|
|
9195
|
+
return [2 /*return*/];
|
|
9196
|
+
}
|
|
9197
|
+
this.observer.next(new observer.ObservableData(common.LoadableEvent.STARTED));
|
|
9198
|
+
this.observer.next(new observer.ObservableData(exports.LoginBaseServiceEvent.LOGOUT_STARTED));
|
|
9199
|
+
_a.label = 1;
|
|
9200
|
+
case 1:
|
|
9201
|
+
_a.trys.push([1, 3, 4, 5]);
|
|
9202
|
+
return [4 /*yield*/, this.logoutRequest()];
|
|
9203
|
+
case 2:
|
|
9204
|
+
_a.sent();
|
|
9205
|
+
return [3 /*break*/, 5];
|
|
9206
|
+
case 3:
|
|
9207
|
+
error_3 = _a.sent();
|
|
9208
|
+
this.parseLogoutErrorResponse(error.ExtendedError.create(error_3));
|
|
9209
|
+
return [3 /*break*/, 5];
|
|
9210
|
+
case 4:
|
|
9211
|
+
this.reset();
|
|
9212
|
+
this._isLoggedIn = false;
|
|
9213
|
+
this.status = common.LoadableStatus.NOT_LOADED;
|
|
9214
|
+
this.observer.next(new observer.ObservableData(common.LoadableEvent.FINISHED));
|
|
9215
|
+
this.observer.next(new observer.ObservableData(exports.LoginBaseServiceEvent.LOGOUT_FINISHED));
|
|
9216
|
+
return [7 /*endfinally*/];
|
|
9217
|
+
case 5: return [2 /*return*/];
|
|
9218
|
+
}
|
|
9219
|
+
});
|
|
9220
|
+
});
|
|
9173
9221
|
};
|
|
9174
9222
|
LoginBaseService.prototype.isCanLoginWithSid = function () {
|
|
9175
9223
|
return this.sid != null || this.getSavedSid() != null;
|
|
@@ -10424,6 +10472,7 @@
|
|
|
10424
10472
|
var _this = this;
|
|
10425
10473
|
this.router.events.pipe(operators.takeUntil(this.destroyed)).subscribe(function (event) {
|
|
10426
10474
|
if (event instanceof router.NavigationStart) {
|
|
10475
|
+
_this._previousUrl = _this.url;
|
|
10427
10476
|
_this.status = common.LoadableStatus.LOADING;
|
|
10428
10477
|
}
|
|
10429
10478
|
else if (event instanceof router.NavigationEnd || event instanceof router.NavigationCancel || event instanceof router.NavigationError) {
|
|
@@ -10468,7 +10517,7 @@
|
|
|
10468
10517
|
this.isNeedUpdateExtras = false;
|
|
10469
10518
|
this.applyExtras(this.extrasToApply);
|
|
10470
10519
|
}
|
|
10471
|
-
this.observer.next(new observer.ObservableData(common.LoadableEvent.COMPLETE, { url: this.url,
|
|
10520
|
+
this.observer.next(new observer.ObservableData(common.LoadableEvent.COMPLETE, { url: this.url, previousUrl: this.previousUrl }));
|
|
10472
10521
|
break;
|
|
10473
10522
|
}
|
|
10474
10523
|
if (newStatus === common.LoadableStatus.LOADED || newStatus === common.LoadableStatus.ERROR) {
|
|
@@ -10614,16 +10663,16 @@
|
|
|
10614
10663
|
enumerable: false,
|
|
10615
10664
|
configurable: true
|
|
10616
10665
|
});
|
|
10617
|
-
Object.defineProperty(RouterBaseService.prototype, "
|
|
10666
|
+
Object.defineProperty(RouterBaseService.prototype, "urlTree", {
|
|
10618
10667
|
get: function () {
|
|
10619
|
-
return this.
|
|
10668
|
+
return this.router.parseUrl(this.url);
|
|
10620
10669
|
},
|
|
10621
10670
|
enumerable: false,
|
|
10622
10671
|
configurable: true
|
|
10623
10672
|
});
|
|
10624
|
-
Object.defineProperty(RouterBaseService.prototype, "
|
|
10673
|
+
Object.defineProperty(RouterBaseService.prototype, "lastUrl", {
|
|
10625
10674
|
get: function () {
|
|
10626
|
-
return this.
|
|
10675
|
+
return this._lastUrl;
|
|
10627
10676
|
},
|
|
10628
10677
|
enumerable: false,
|
|
10629
10678
|
configurable: true
|
|
@@ -10635,6 +10684,20 @@
|
|
|
10635
10684
|
enumerable: false,
|
|
10636
10685
|
configurable: true
|
|
10637
10686
|
});
|
|
10687
|
+
Object.defineProperty(RouterBaseService.prototype, "previousUrl", {
|
|
10688
|
+
get: function () {
|
|
10689
|
+
return this._previousUrl;
|
|
10690
|
+
},
|
|
10691
|
+
enumerable: false,
|
|
10692
|
+
configurable: true
|
|
10693
|
+
});
|
|
10694
|
+
Object.defineProperty(RouterBaseService.prototype, "previousUrlTree", {
|
|
10695
|
+
get: function () {
|
|
10696
|
+
return this.router.parseUrl(this.previousUrl);
|
|
10697
|
+
},
|
|
10698
|
+
enumerable: false,
|
|
10699
|
+
configurable: true
|
|
10700
|
+
});
|
|
10638
10701
|
Object.defineProperty(RouterBaseService.prototype, "router", {
|
|
10639
10702
|
get: function () {
|
|
10640
10703
|
return this._router;
|
|
@@ -10722,7 +10785,7 @@
|
|
|
10722
10785
|
}
|
|
10723
10786
|
return this.user.id === value;
|
|
10724
10787
|
};
|
|
10725
|
-
UserBaseService.prototype.
|
|
10788
|
+
UserBaseService.prototype.userUpdate = function (data) {
|
|
10726
10789
|
if (!this.hasUser) {
|
|
10727
10790
|
return;
|
|
10728
10791
|
}
|
|
@@ -10918,6 +10981,7 @@
|
|
|
10918
10981
|
exports.cookieServiceFactory = cookieServiceFactory;
|
|
10919
10982
|
exports.languageServiceFactory = languageServiceFactory;
|
|
10920
10983
|
exports.loggerServiceFactory = loggerServiceFactory;
|
|
10984
|
+
exports.themeAssetServiceFactory = themeAssetServiceFactory;
|
|
10921
10985
|
exports.themeServiceFactory = themeServiceFactory;
|
|
10922
10986
|
exports.ɵa = AssetFilePipe;
|
|
10923
10987
|
exports.ɵb = AssetSoundPipe;
|