@ts-core/angular 13.1.12 → 13.1.13
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/cookie/CookieModule.d.ts +2 -2
- package/cookie/CookieService.d.ts +2 -2
- package/esm2020/cookie/CookieModule.mjs +13 -4
- package/esm2020/cookie/CookieService.mjs +25 -9
- package/fesm2015/ts-core-angular.mjs +35 -12
- package/fesm2015/ts-core-angular.mjs.map +1 -1
- package/fesm2020/ts-core-angular.mjs +35 -12
- package/fesm2020/ts-core-angular.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -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,
|
|
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,32 @@ 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
|
+
/*
|
|
1767
|
+
Object.defineProperty(this, 'cookieString', {
|
|
1768
|
+
get: (): string => nativeWindow.document.cookie,
|
|
1769
|
+
set: (value: string) => nativeWindow.document.cookie = value,
|
|
1770
|
+
writable: true,
|
|
1771
|
+
enumerable: true,
|
|
1772
|
+
configurable: true
|
|
1773
|
+
});
|
|
1774
|
+
*/
|
|
1775
|
+
}
|
|
1776
|
+
// --------------------------------------------------------------------------
|
|
1777
|
+
//
|
|
1778
|
+
// Protected Methods
|
|
1779
|
+
//
|
|
1780
|
+
// --------------------------------------------------------------------------
|
|
1781
|
+
/*
|
|
1782
|
+
protected get cookieString(): string {
|
|
1783
|
+
return document.cookie || '';
|
|
1784
|
+
}
|
|
1785
|
+
protected override set cookieString(value: string) {
|
|
1786
|
+
document.cookie = value;
|
|
1772
1787
|
}
|
|
1788
|
+
*/
|
|
1773
1789
|
// --------------------------------------------------------------------------
|
|
1774
1790
|
//
|
|
1775
1791
|
// Public Methods
|
|
@@ -1821,7 +1837,7 @@ class CookieModule {
|
|
|
1821
1837
|
},
|
|
1822
1838
|
{
|
|
1823
1839
|
provide: CookieService,
|
|
1824
|
-
deps: [COOKIE_OPTIONS],
|
|
1840
|
+
deps: [NativeWindowService, COOKIE_OPTIONS],
|
|
1825
1841
|
useFactory: cookieServiceFactory
|
|
1826
1842
|
}
|
|
1827
1843
|
]
|
|
@@ -1834,8 +1850,15 @@ CookieModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
|
1834
1850
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CookieModule, decorators: [{
|
|
1835
1851
|
type: NgModule
|
|
1836
1852
|
}] });
|
|
1837
|
-
function cookieServiceFactory(options) {
|
|
1838
|
-
|
|
1853
|
+
function cookieServiceFactory(nativeWindow, options) {
|
|
1854
|
+
options = _.assign({
|
|
1855
|
+
path: '/',
|
|
1856
|
+
domain: null,
|
|
1857
|
+
expires: null,
|
|
1858
|
+
secure: false,
|
|
1859
|
+
httpOnly: false
|
|
1860
|
+
}, options);
|
|
1861
|
+
return new CookieService(options, nativeWindow);
|
|
1839
1862
|
}
|
|
1840
1863
|
const COOKIE_OPTIONS = new InjectionToken(`COOKIE_OPTIONS`);
|
|
1841
1864
|
|