@ts-core/angular 13.1.12 → 13.1.15

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,29 @@ 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
+ enumerable: true,
1770
+ configurable: true
1771
+ });
1772
+ }
1773
+ // --------------------------------------------------------------------------
1774
+ //
1775
+ // Protected Methods
1776
+ //
1777
+ // --------------------------------------------------------------------------
1778
+ /*
1779
+ protected get cookieString(): string {
1780
+ return document.cookie || '';
1781
+ }
1782
+ protected override set cookieString(value: string) {
1783
+ document.cookie = value;
1772
1784
  }
1785
+ */
1773
1786
  // --------------------------------------------------------------------------
1774
1787
  //
1775
1788
  // Public Methods
@@ -1821,7 +1834,7 @@ class CookieModule {
1821
1834
  },
1822
1835
  {
1823
1836
  provide: CookieService,
1824
- deps: [COOKIE_OPTIONS],
1837
+ deps: [NativeWindowService, COOKIE_OPTIONS],
1825
1838
  useFactory: cookieServiceFactory
1826
1839
  }
1827
1840
  ]
@@ -1834,8 +1847,15 @@ CookieModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
1834
1847
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CookieModule, decorators: [{
1835
1848
  type: NgModule
1836
1849
  }] });
1837
- function cookieServiceFactory(options) {
1838
- return new CookieService(options);
1850
+ function cookieServiceFactory(nativeWindow, options) {
1851
+ options = _.assign({
1852
+ path: '/',
1853
+ domain: null,
1854
+ expires: null,
1855
+ secure: false,
1856
+ httpOnly: false
1857
+ }, options);
1858
+ return new CookieService(options, nativeWindow);
1839
1859
  }
1840
1860
  const COOKIE_OPTIONS = new InjectionToken(`COOKIE_OPTIONS`);
1841
1861