@ts-core/angular 11.0.84 → 11.0.85

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.
@@ -28,7 +28,7 @@ import { MatButtonModule } from '@angular/material/button';
28
28
  import { MatBottomSheet, MatBottomSheetModule } from '@angular/material/bottom-sheet';
29
29
  import { RemoveFilterableCondition, GetFilterableCondition } from '@ts-core/common/dto';
30
30
  import { DomSanitizer } from '@angular/platform-browser';
31
- import { ThemeService } from '@ts-core/frontend/theme';
31
+ import { ThemeService, ThemeAssetService } from '@ts-core/frontend/theme';
32
32
  import { MatTabsModule } from '@angular/material/tabs';
33
33
  import { MatListModule } from '@angular/material/list';
34
34
  import { MatMenuModule } from '@angular/material/menu';
@@ -6258,15 +6258,17 @@ class ThemeAssetDirective extends Destroyable {
6258
6258
  // Constructor
6259
6259
  //
6260
6260
  // --------------------------------------------------------------------------
6261
- constructor(element, theme) {
6261
+ constructor(element, theme, themeAsset) {
6262
6262
  super();
6263
6263
  this.theme = theme;
6264
+ this.themeAsset = themeAsset;
6264
6265
  this._extension = 'png';
6265
6266
  this._isFile = false;
6266
6267
  this._isImage = false;
6267
6268
  this._isVideo = false;
6268
6269
  this._isSound = false;
6269
6270
  this._isBackground = false;
6271
+ this._isIgnoreTheme = true;
6270
6272
  this.element = ViewUtil.parseElement(element.nativeElement);
6271
6273
  this.theme.changed.pipe(takeUntil(this.destroyed)).subscribe(() => {
6272
6274
  this.isTriedThemeDefault = false;
@@ -6283,21 +6285,21 @@ class ThemeAssetDirective extends Destroyable {
6283
6285
  return null;
6284
6286
  }
6285
6287
  if (this.isImage) {
6286
- return Assets.getImage(id, this.extension);
6288
+ return this.themeAsset.getImage(id, this.extension, this.isIgnoreTheme);
6287
6289
  }
6288
6290
  if (this.isBackground) {
6289
- return Assets.getBackground(id, this.extension);
6291
+ return this.themeAsset.getBackground(id, this.extension, this.isIgnoreTheme);
6290
6292
  }
6291
6293
  if (this.isSound) {
6292
- return Assets.getSound(id, this.extension);
6294
+ return this.themeAsset.getSound(id, this.extension, this.isIgnoreTheme);
6293
6295
  }
6294
6296
  if (this.isVideo) {
6295
- return Assets.getVideo(id, this.extension);
6297
+ return this.themeAsset.getVideo(id, this.extension, this.isIgnoreTheme);
6296
6298
  }
6297
6299
  if (this.isFile) {
6298
- return Assets.getFile(id, this.extension);
6300
+ return this.themeAsset.getFile(id, this.extension, this.isIgnoreTheme);
6299
6301
  }
6300
- return Assets.getIcon(id, this.extension);
6302
+ return this.themeAsset.getIcon(id, this.extension, this.isIgnoreTheme);
6301
6303
  }
6302
6304
  // --------------------------------------------------------------------------
6303
6305
  //
@@ -6328,9 +6330,7 @@ class ThemeAssetDirective extends Destroyable {
6328
6330
  return !isNil(theme) ? this.name + capitalize(theme.name) : null;
6329
6331
  }
6330
6332
  getDefaultSourceId(theme) {
6331
- let value = this.name;
6332
- value += theme.isDark ? 'Dark' : 'Light';
6333
- return value;
6333
+ return `${this.name}${theme.isDark ? 'Dark' : 'Light'}`;
6334
6334
  }
6335
6335
  // --------------------------------------------------------------------------
6336
6336
  //
@@ -6401,6 +6401,16 @@ class ThemeAssetDirective extends Destroyable {
6401
6401
  get isBackground() {
6402
6402
  return this._isBackground;
6403
6403
  }
6404
+ set isIgnoreTheme(value) {
6405
+ if (value === this._isIgnoreTheme) {
6406
+ return;
6407
+ }
6408
+ this._isIgnoreTheme = value;
6409
+ this.setSourceProperties();
6410
+ }
6411
+ get isIgnoreTheme() {
6412
+ return this._isIgnoreTheme;
6413
+ }
6404
6414
  get name() {
6405
6415
  return this._name;
6406
6416
  }
@@ -6436,6 +6446,7 @@ ThemeAssetDirective.propDecorators = {
6436
6446
  isFile: [{ type: Input }],
6437
6447
  isImage: [{ type: Input }],
6438
6448
  isBackground: [{ type: Input }],
6449
+ isIgnoreTheme: [{ type: Input }],
6439
6450
  name: [{ type: Input }],
6440
6451
  extension: [{ type: Input }]
6441
6452
  };
@@ -6446,8 +6457,8 @@ class ThemeAssetBackgroundDirective extends ThemeAssetDirective {
6446
6457
  // Constructor
6447
6458
  //
6448
6459
  // --------------------------------------------------------------------------
6449
- constructor(element, theme) {
6450
- super(element, theme);
6460
+ constructor(element, theme, themeAsset) {
6461
+ super(element, theme, themeAsset);
6451
6462
  }
6452
6463
  // --------------------------------------------------------------------------
6453
6464
  //
@@ -6469,7 +6480,8 @@ ThemeAssetBackgroundDirective.decorators = [
6469
6480
  ];
6470
6481
  ThemeAssetBackgroundDirective.ctorParameters = () => [
6471
6482
  { type: ElementRef },
6472
- { type: ThemeService }
6483
+ { type: ThemeService },
6484
+ { type: ThemeAssetService }
6473
6485
  ];
6474
6486
 
6475
6487
  class ThemeAssetImageDirective extends ThemeAssetDirective {
@@ -6478,8 +6490,8 @@ class ThemeAssetImageDirective extends ThemeAssetDirective {
6478
6490
  // Constructor
6479
6491
  //
6480
6492
  // --------------------------------------------------------------------------
6481
- constructor(element, theme) {
6482
- super(element, theme);
6493
+ constructor(element, theme, themeAsset) {
6494
+ super(element, theme, themeAsset);
6483
6495
  }
6484
6496
  // --------------------------------------------------------------------------
6485
6497
  //
@@ -6500,7 +6512,8 @@ ThemeAssetImageDirective.decorators = [
6500
6512
  ];
6501
6513
  ThemeAssetImageDirective.ctorParameters = () => [
6502
6514
  { type: ElementRef },
6503
- { type: ThemeService }
6515
+ { type: ThemeService },
6516
+ { type: ThemeAssetService }
6504
6517
  ];
6505
6518
 
6506
6519
  class ThemeToggleDirective extends Destroyable {
@@ -6789,6 +6802,11 @@ class ThemeModule {
6789
6802
  provide: ThemeService,
6790
6803
  deps: [CookieService, THEME_OPTIONS],
6791
6804
  useFactory: themeServiceFactory
6805
+ },
6806
+ {
6807
+ provide: ThemeAssetService,
6808
+ deps: [ThemeService],
6809
+ useFactory: themeAssetServiceFactory
6792
6810
  }
6793
6811
  ]
6794
6812
  };
@@ -6807,6 +6825,9 @@ function themeServiceFactory(cookie, options) {
6807
6825
  }
6808
6826
  return new ThemeService(options);
6809
6827
  }
6828
+ function themeAssetServiceFactory(theme) {
6829
+ return new ThemeAssetService(theme);
6830
+ }
6810
6831
  const THEME_OPTIONS = new InjectionToken(`THEME_OPTIONS`);
6811
6832
 
6812
6833
  class WindowDragAreaDirective extends Destroyable {
@@ -7795,6 +7816,7 @@ class LoginBaseService extends Loadable {
7795
7816
  this._loginData = null;
7796
7817
  }
7797
7818
  parseLoginErrorResponse(error) { }
7819
+ parseLogoutErrorResponse(error) { }
7798
7820
  parseLoginSidResponse(response) {
7799
7821
  this._loginData = response;
7800
7822
  }
@@ -7804,6 +7826,7 @@ class LoginBaseService extends Loadable {
7804
7826
  }
7805
7827
  this.reset();
7806
7828
  }
7829
+ // public abstract registration(param: any): void;
7807
7830
  loginByResponse(param) {
7808
7831
  return __awaiter(this, void 0, void 0, function* () {
7809
7832
  if (this.isLoggedIn || this.isLoading) {
@@ -7831,17 +7854,26 @@ class LoginBaseService extends Loadable {
7831
7854
  return true;
7832
7855
  }
7833
7856
  logout() {
7834
- if (!this.isLoggedIn) {
7835
- return;
7836
- }
7837
- this.observer.next(new ObservableData(LoadableEvent.STARTED));
7838
- this.observer.next(new ObservableData(LoginBaseServiceEvent.LOGOUT_STARTED));
7839
- this.logoutRequest();
7840
- this.reset();
7841
- this._isLoggedIn = false;
7842
- this.status = LoadableStatus.NOT_LOADED;
7843
- this.observer.next(new ObservableData(LoadableEvent.FINISHED));
7844
- this.observer.next(new ObservableData(LoginBaseServiceEvent.LOGOUT_FINISHED));
7857
+ return __awaiter(this, void 0, void 0, function* () {
7858
+ if (!this.isLoggedIn) {
7859
+ return;
7860
+ }
7861
+ this.observer.next(new ObservableData(LoadableEvent.STARTED));
7862
+ this.observer.next(new ObservableData(LoginBaseServiceEvent.LOGOUT_STARTED));
7863
+ try {
7864
+ yield this.logoutRequest();
7865
+ }
7866
+ catch (error) {
7867
+ this.parseLogoutErrorResponse(ExtendedError.create(error));
7868
+ }
7869
+ finally {
7870
+ this.reset();
7871
+ this._isLoggedIn = false;
7872
+ this.status = LoadableStatus.NOT_LOADED;
7873
+ this.observer.next(new ObservableData(LoadableEvent.FINISHED));
7874
+ this.observer.next(new ObservableData(LoginBaseServiceEvent.LOGOUT_FINISHED));
7875
+ }
7876
+ });
7845
7877
  }
7846
7878
  isCanLoginWithSid() {
7847
7879
  return this.sid != null || this.getSavedSid() != null;
@@ -9076,7 +9108,7 @@ class UserBaseService {
9076
9108
  }
9077
9109
  return this.user.id === value;
9078
9110
  }
9079
- updateUser(data) {
9111
+ userUpdate(data) {
9080
9112
  if (!this.hasUser) {
9081
9113
  return;
9082
9114
  }
@@ -9126,5 +9158,5 @@ var UserBaseServiceEvent;
9126
9158
  * Generated bundle index. Do not edit.
9127
9159
  */
9128
9160
 
9129
- 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, 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 };
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 };
9130
9162
  //# sourceMappingURL=ts-core-angular.js.map