@ts-core/angular 15.0.44 → 15.0.45

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.
@@ -12,7 +12,7 @@ import * as Cookie from 'ngx-cookie';
12
12
  import * as interact from 'interactjs';
13
13
  import { Validators } from '@angular/forms';
14
14
  import * as i1$1 from '@angular/router';
15
- import { NavigationStart, NavigationEnd, NavigationCancel, NavigationError, ActivatedRoute } from '@angular/router';
15
+ import { NavigationStart, NavigationEnd, NavigationCancel, NavigationError } from '@angular/router';
16
16
  import * as i1$2 from '@angular/platform-browser';
17
17
 
18
18
  class ApplicationBaseComponent extends DestroyableContainer {
@@ -3996,6 +3996,51 @@ class SelectListItems extends ListItems {
3996
3996
  }
3997
3997
  }
3998
3998
 
3999
+ class RouterSelectListItems extends SelectListItems {
4000
+ //--------------------------------------------------------------------------
4001
+ //
4002
+ // Constructor
4003
+ //
4004
+ //--------------------------------------------------------------------------
4005
+ constructor(router, language) {
4006
+ super(language, true);
4007
+ this.router = router;
4008
+ //--------------------------------------------------------------------------
4009
+ //
4010
+ // Protected Methods
4011
+ //
4012
+ //--------------------------------------------------------------------------
4013
+ this.setData = () => {
4014
+ this.selectedData = this.getRouterSelectedData();
4015
+ };
4016
+ this.setFragment = (item) => {
4017
+ this.router.setFragment(item.data.toString());
4018
+ };
4019
+ this.changed.pipe(takeUntil(this.destroyed)).subscribe(this.setFragment);
4020
+ this.router.completed.pipe(takeUntil(this.destroyed)).subscribe(this.setData);
4021
+ }
4022
+ getRouterSelectedData() {
4023
+ let item = _.find(this.collection, { data: this.router.getFragment() });
4024
+ return !_.isNil(item) ? item.data : null;
4025
+ }
4026
+ //--------------------------------------------------------------------------
4027
+ //
4028
+ // Public Methods
4029
+ //
4030
+ //--------------------------------------------------------------------------
4031
+ complete() {
4032
+ let item = this.getRouterSelectedData();
4033
+ super.complete(_.isNil(item) ? 0 : item);
4034
+ }
4035
+ destroy() {
4036
+ if (this.isDestroyed) {
4037
+ return;
4038
+ }
4039
+ super.destroy();
4040
+ this.router = null;
4041
+ }
4042
+ }
4043
+
3999
4044
  class PrettifyPipe {
4000
4045
  // --------------------------------------------------------------------------
4001
4046
  //
@@ -4640,9 +4685,10 @@ class RouterBaseService extends Loadable {
4640
4685
  // Constructor
4641
4686
  //
4642
4687
  // --------------------------------------------------------------------------
4643
- constructor(_router, window) {
4688
+ constructor(_router, _route, window) {
4644
4689
  super();
4645
4690
  this._router = _router;
4691
+ this._route = _route;
4646
4692
  this.window = window;
4647
4693
  this.isNeedUpdateExtras = false;
4648
4694
  this.params = new Map();
@@ -4806,8 +4852,8 @@ class RouterBaseService extends Loadable {
4806
4852
  //
4807
4853
  // --------------------------------------------------------------------------
4808
4854
  getFragment(snapshot, defaultValue) {
4809
- if (snapshot instanceof ActivatedRoute) {
4810
- snapshot = snapshot.snapshot;
4855
+ if (_.isNil(snapshot)) {
4856
+ snapshot = this.route.snapshot;
4811
4857
  }
4812
4858
  return !_.isNil(snapshot.fragment) ? snapshot.fragment : defaultValue;
4813
4859
  }
@@ -4837,6 +4883,9 @@ class RouterBaseService extends Loadable {
4837
4883
  get previousUrlTree() {
4838
4884
  return this.router.parseUrl(this.previousUrl);
4839
4885
  }
4886
+ get route() {
4887
+ return this._route;
4888
+ }
4840
4889
  get router() {
4841
4890
  return this._router;
4842
4891
  }
@@ -6880,5 +6929,5 @@ const VI_ANGULAR_OPTIONS = new InjectionToken(`VI_ANGULAR_OPTIONS`);
6880
6929
  * Generated bundle index. Do not edit.
6881
6930
  */
6882
6931
 
6883
- export { APPLICATION_INJECTOR, ApplicationBaseComponent, ApplicationComponent, AspectRatioResizeDirective, AssetBackgroundDirective, AssetBackgroundPipe, AssetFilePipe, AssetIconPipe, AssetImagePipe, AssetModule, AssetSoundPipe, AssetVideoPipe, AutoScrollBottomDirective, BooleanValueStorage, BottomSheetService, COOKIE_OPTIONS, CamelCasePipe, CanDeactivateGuard, ClickToCopyDirective, ClickToSelectDirective, CookieModule, CookieOptions, CookieService, DateValueStorage, Direction, FinancePipe, FocusDirective, FocusManager, FormElementAsync, FormElementSync, HTMLContentTitleDirective, HTMLTitleDirective, INotification, INotificationContent, IUser, IVIOptions, IWindow, IWindowContent, InfiniteScrollDirective, IsBrowserDirective, IsServerDirective, LANGUAGE_OPTIONS, LanguageDirective, LanguageHasDirective, LanguageModule, LanguagePipe, LanguagePipeHas, LanguagePipeHasPure, LanguagePipePure, LanguageRequireResolver, LanguageResolver, LazyModuleLoader, ListItem, ListItems, LocalStorageService, LoginBaseService, LoginBaseServiceEvent, LoginGuard, LoginIfCanGuard, LoginNotGuard, LoginRequireResolver, LoginResolver, LoginTokenStorage, MenuItem, MenuItemBase, MenuItems, MessageBaseComponent, MomentDateAdaptivePipe, MomentDateFromNowPipe, MomentDatePipe, MomentTimePipe, NavigationMenuItem, NgModelErrorPipe, NotificationConfig, NotificationEvent, NotificationService, NotificationServiceEvent, PipeBaseService, PlatformService, PrettifyPipe, QuestionEvent, QuestionManager, QuestionMode, ResizeDirective, ResizeManager, RouterBaseService, SanitizePipe, ScrollCheckDirective, ScrollDirective, SelectListItem, SelectListItems, SelectOnFocusDirective, StartCasePipe, StructureDirective, THEME_OPTIONS, ThemeAssetBackgroundDirective, ThemeAssetDirective, ThemeAssetIconDirective, ThemeAssetImageDirective, ThemeModule, ThemeStyleDirective, ThemeStyleHoverDirective, ThemeToggleDirective, TimePipe, TransportLazy, TransportLazyModule, TransportLazyModuleLoadedEvent, TruncatePipe, UserBaseService, UserBaseServiceEvent, VIModule, VI_ANGULAR_OPTIONS, ValueStorage, ViewUtil, WINDOW_CONTENT_CONTAINER, WindowAlign, WindowBase, WindowClosedError, WindowConfig, WindowEvent, WindowService, WindowServiceEvent, cookieServiceFactory, initializerFactory, languageServiceFactory, localStorageServiceFactory, loggerServiceFactory, loginTokenStorageServiceFactory, nativeWindowServiceFactory, themeAssetServiceFactory, themeServiceFactory };
6932
+ export { APPLICATION_INJECTOR, ApplicationBaseComponent, ApplicationComponent, AspectRatioResizeDirective, AssetBackgroundDirective, AssetBackgroundPipe, AssetFilePipe, AssetIconPipe, AssetImagePipe, AssetModule, AssetSoundPipe, AssetVideoPipe, AutoScrollBottomDirective, BooleanValueStorage, BottomSheetService, COOKIE_OPTIONS, CamelCasePipe, CanDeactivateGuard, ClickToCopyDirective, ClickToSelectDirective, CookieModule, CookieOptions, CookieService, DateValueStorage, Direction, FinancePipe, FocusDirective, FocusManager, FormElementAsync, FormElementSync, HTMLContentTitleDirective, HTMLTitleDirective, INotification, INotificationContent, IUser, IVIOptions, IWindow, IWindowContent, InfiniteScrollDirective, IsBrowserDirective, IsServerDirective, LANGUAGE_OPTIONS, LanguageDirective, LanguageHasDirective, LanguageModule, LanguagePipe, LanguagePipeHas, LanguagePipeHasPure, LanguagePipePure, LanguageRequireResolver, LanguageResolver, LazyModuleLoader, ListItem, ListItems, LocalStorageService, LoginBaseService, LoginBaseServiceEvent, LoginGuard, LoginIfCanGuard, LoginNotGuard, LoginRequireResolver, LoginResolver, LoginTokenStorage, MenuItem, MenuItemBase, MenuItems, MessageBaseComponent, MomentDateAdaptivePipe, MomentDateFromNowPipe, MomentDatePipe, MomentTimePipe, NavigationMenuItem, NgModelErrorPipe, NotificationConfig, NotificationEvent, NotificationService, NotificationServiceEvent, PipeBaseService, PlatformService, PrettifyPipe, QuestionEvent, QuestionManager, QuestionMode, ResizeDirective, ResizeManager, RouterBaseService, RouterSelectListItems, SanitizePipe, ScrollCheckDirective, ScrollDirective, SelectListItem, SelectListItems, SelectOnFocusDirective, StartCasePipe, StructureDirective, THEME_OPTIONS, ThemeAssetBackgroundDirective, ThemeAssetDirective, ThemeAssetIconDirective, ThemeAssetImageDirective, ThemeModule, ThemeStyleDirective, ThemeStyleHoverDirective, ThemeToggleDirective, TimePipe, TransportLazy, TransportLazyModule, TransportLazyModuleLoadedEvent, TruncatePipe, UserBaseService, UserBaseServiceEvent, VIModule, VI_ANGULAR_OPTIONS, ValueStorage, ViewUtil, WINDOW_CONTENT_CONTAINER, WindowAlign, WindowBase, WindowClosedError, WindowConfig, WindowEvent, WindowService, WindowServiceEvent, cookieServiceFactory, initializerFactory, languageServiceFactory, localStorageServiceFactory, loggerServiceFactory, loginTokenStorageServiceFactory, nativeWindowServiceFactory, themeAssetServiceFactory, themeServiceFactory };
6884
6933
  //# sourceMappingURL=ts-core-angular.mjs.map