@ts-core/angular 13.1.11 → 13.1.14

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.
@@ -3,7 +3,7 @@ import { Component, ViewContainerRef, Injectable, Directive, Input, Pipe, NgModu
3
3
  import { DestroyableContainer, PromiseHandler, ExtendedError, LoadableEvent, Destroyable, IDestroyable, DateUtil, ObservableData, ObjectUtil, ArrayUtil, RemoveFilterableCondition, GetFilterableCondition, Logger, LoggerLevel, DataSourceMapCollectionEvent, FilterableDataSourceMapCollection, PaginableDataSourceMapCollection, PaginableBookmarkDataSourceMapCollection, Loadable, LoadableStatus, TransportTimeoutError, TransportNoConnectionError, FilterableMapCollection, MapCollection, TransportEvent, TransportLocal } from '@ts-core/common';
4
4
  import * as _ from 'lodash';
5
5
  import * as i1$1 from '@ts-core/frontend';
6
- import { Assets, AssetUrlProvider, LanguageService, ThemeService, ThemeAssetService, LoadingService, NativeWindowService, ICookieOptions, DefaultLogger } from '@ts-core/frontend';
6
+ import { Assets, AssetUrlProvider, NativeWindowService, LanguageService, ThemeService, ThemeAssetService, LoadingService, ICookieOptions, DefaultLogger } from '@ts-core/frontend';
7
7
  import { takeUntil, Subject, filter, BehaviorSubject, distinctUntilChanged, debounceTime, fromEvent, of, map, merge } from 'rxjs';
8
8
  import moment from 'moment';
9
9
  import numeral from 'numeral';
@@ -1760,16 +1760,30 @@ class CookieService extends Cookie.CookieService {
1760
1760
  // Constructor
1761
1761
  //
1762
1762
  // --------------------------------------------------------------------------
1763
- constructor(options) {
1764
- options = _.assign({
1765
- path: '/',
1766
- domain: null,
1767
- expires: null,
1768
- secure: false,
1769
- httpOnly: false
1770
- }, options);
1763
+ constructor(options, nativeWindow) {
1771
1764
  super({ options });
1765
+ // this['cookieString'] = nativeWindow.document.cookie;
1766
+ Object.defineProperty(this, 'cookieString', {
1767
+ get: () => nativeWindow.document.cookie,
1768
+ set: (value) => (nativeWindow.document.cookie = value),
1769
+ writable: true,
1770
+ enumerable: true,
1771
+ configurable: true
1772
+ });
1773
+ }
1774
+ // --------------------------------------------------------------------------
1775
+ //
1776
+ // Protected Methods
1777
+ //
1778
+ // --------------------------------------------------------------------------
1779
+ /*
1780
+ protected get cookieString(): string {
1781
+ return document.cookie || '';
1782
+ }
1783
+ protected override set cookieString(value: string) {
1784
+ document.cookie = value;
1772
1785
  }
1786
+ */
1773
1787
  // --------------------------------------------------------------------------
1774
1788
  //
1775
1789
  // Public Methods
@@ -1821,7 +1835,7 @@ class CookieModule {
1821
1835
  },
1822
1836
  {
1823
1837
  provide: CookieService,
1824
- deps: [COOKIE_OPTIONS],
1838
+ deps: [NativeWindowService, COOKIE_OPTIONS],
1825
1839
  useFactory: cookieServiceFactory
1826
1840
  }
1827
1841
  ]
@@ -1834,8 +1848,15 @@ CookieModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
1834
1848
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CookieModule, decorators: [{
1835
1849
  type: NgModule
1836
1850
  }] });
1837
- function cookieServiceFactory(options) {
1838
- return new CookieService(options);
1851
+ function cookieServiceFactory(nativeWindow, options) {
1852
+ options = _.assign({
1853
+ path: '/',
1854
+ domain: null,
1855
+ expires: null,
1856
+ secure: false,
1857
+ httpOnly: false
1858
+ }, options);
1859
+ return new CookieService(options, nativeWindow);
1839
1860
  }
1840
1861
  const COOKIE_OPTIONS = new InjectionToken(`COOKIE_OPTIONS`);
1841
1862
 
@@ -7083,7 +7104,6 @@ class VICommonModule {
7083
7104
  providers: [
7084
7105
  LoadingService,
7085
7106
  CanDeactivateGuard,
7086
- NativeWindowService,
7087
7107
  { provide: VI_ANGULAR_OPTIONS, useValue: options || {} },
7088
7108
  { provide: Logger, deps: [VI_ANGULAR_OPTIONS], useFactory: loggerServiceFactory },
7089
7109
  { provide: NativeWindowService, deps: [DOCUMENT], useFactory: nativeWindowServiceFactory },