@ts-core/angular 13.1.15 → 13.1.16
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 -1
- package/cookie/CookieService.d.ts +2 -1
- package/esm2020/VICommonModule.mjs +3 -1
- package/esm2020/cookie/CookieModule.mjs +5 -4
- package/esm2020/cookie/CookieService.mjs +16 -4
- package/esm2020/public-api.mjs +3 -2
- package/esm2020/service/PlatformService.mjs +38 -0
- package/fesm2015/ts-core-angular.mjs +57 -9
- package/fesm2015/ts-core-angular.mjs.map +1 -1
- package/fesm2020/ts-core-angular.mjs +55 -9
- package/fesm2020/ts-core-angular.mjs.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/service/PlatformService.d.ts +11 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ViewContainerRef, Injectable, Directive, Input, Pipe, NgModule, InjectionToken, EventEmitter, Output, HostListener, Optional,
|
|
2
|
+
import { Component, ViewContainerRef, Injectable, Directive, Input, Pipe, NgModule, PLATFORM_ID, Inject, InjectionToken, EventEmitter, Output, HostListener, Optional, RendererStyleFlags2, NgModuleFactory } from '@angular/core';
|
|
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';
|
|
@@ -10,7 +10,7 @@ import numeral from 'numeral';
|
|
|
10
10
|
import * as i1 from '@angular/material/dialog';
|
|
11
11
|
import { MatDialogConfig, MatDialogModule, MatDialog } from '@angular/material/dialog';
|
|
12
12
|
import * as i4 from '@angular/common';
|
|
13
|
-
import { CommonModule, DOCUMENT, DatePipe } from '@angular/common';
|
|
13
|
+
import { CommonModule, isPlatformServer, isPlatformBrowser, DOCUMENT, DatePipe } from '@angular/common';
|
|
14
14
|
import * as i5 from '@angular/forms';
|
|
15
15
|
import { FormsModule, Validators } from '@angular/forms';
|
|
16
16
|
import * as Cookie from 'ngx-cookie';
|
|
@@ -1760,12 +1760,24 @@ class CookieService extends Cookie.CookieService {
|
|
|
1760
1760
|
// Constructor
|
|
1761
1761
|
//
|
|
1762
1762
|
// --------------------------------------------------------------------------
|
|
1763
|
-
constructor(options, nativeWindow) {
|
|
1763
|
+
constructor(options, nativeWindow, platform) {
|
|
1764
1764
|
super({ options });
|
|
1765
1765
|
// this['cookieString'] = nativeWindow.document.cookie;
|
|
1766
|
+
let cookieString = '';
|
|
1766
1767
|
Object.defineProperty(this, 'cookieString', {
|
|
1767
|
-
get: () =>
|
|
1768
|
-
|
|
1768
|
+
get: () => {
|
|
1769
|
+
console.log('cookieGet', platform.isPlatformBrowser);
|
|
1770
|
+
return platform.isPlatformBrowser ? nativeWindow.document.cookie : cookieString;
|
|
1771
|
+
},
|
|
1772
|
+
set: (value) => {
|
|
1773
|
+
console.log('cookieSet', platform.isPlatformBrowser);
|
|
1774
|
+
if (platform.isPlatformBrowser) {
|
|
1775
|
+
nativeWindow.document.cookie = value;
|
|
1776
|
+
}
|
|
1777
|
+
else {
|
|
1778
|
+
cookieString = value;
|
|
1779
|
+
}
|
|
1780
|
+
},
|
|
1769
1781
|
enumerable: true,
|
|
1770
1782
|
configurable: true
|
|
1771
1783
|
});
|
|
@@ -1818,6 +1830,39 @@ class CookieService extends Cookie.CookieService {
|
|
|
1818
1830
|
}
|
|
1819
1831
|
}
|
|
1820
1832
|
|
|
1833
|
+
class PlatformService extends DestroyableContainer {
|
|
1834
|
+
// --------------------------------------------------------------------------
|
|
1835
|
+
//
|
|
1836
|
+
// Constructor
|
|
1837
|
+
//
|
|
1838
|
+
// --------------------------------------------------------------------------
|
|
1839
|
+
constructor(platformId) {
|
|
1840
|
+
super();
|
|
1841
|
+
this._isPlatformServer = isPlatformServer(platformId);
|
|
1842
|
+
this._isPlatformBrowser = isPlatformBrowser(platformId);
|
|
1843
|
+
}
|
|
1844
|
+
// --------------------------------------------------------------------------
|
|
1845
|
+
//
|
|
1846
|
+
// Public Properties
|
|
1847
|
+
//
|
|
1848
|
+
// --------------------------------------------------------------------------
|
|
1849
|
+
get isPlatformServer() {
|
|
1850
|
+
return this._isPlatformServer;
|
|
1851
|
+
}
|
|
1852
|
+
get isPlatformBrowser() {
|
|
1853
|
+
return this._isPlatformBrowser;
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1856
|
+
PlatformService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PlatformService, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1857
|
+
PlatformService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PlatformService, providedIn: 'root' });
|
|
1858
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PlatformService, decorators: [{
|
|
1859
|
+
type: Injectable,
|
|
1860
|
+
args: [{ providedIn: 'root' }]
|
|
1861
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1862
|
+
type: Inject,
|
|
1863
|
+
args: [PLATFORM_ID]
|
|
1864
|
+
}] }]; } });
|
|
1865
|
+
|
|
1821
1866
|
class CookieModule {
|
|
1822
1867
|
// --------------------------------------------------------------------------
|
|
1823
1868
|
//
|
|
@@ -1834,7 +1879,7 @@ class CookieModule {
|
|
|
1834
1879
|
},
|
|
1835
1880
|
{
|
|
1836
1881
|
provide: CookieService,
|
|
1837
|
-
deps: [NativeWindowService, COOKIE_OPTIONS],
|
|
1882
|
+
deps: [NativeWindowService, PlatformService, COOKIE_OPTIONS],
|
|
1838
1883
|
useFactory: cookieServiceFactory
|
|
1839
1884
|
}
|
|
1840
1885
|
]
|
|
@@ -1847,7 +1892,7 @@ CookieModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
|
1847
1892
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CookieModule, decorators: [{
|
|
1848
1893
|
type: NgModule
|
|
1849
1894
|
}] });
|
|
1850
|
-
function cookieServiceFactory(nativeWindow, options) {
|
|
1895
|
+
function cookieServiceFactory(nativeWindow, platform, options) {
|
|
1851
1896
|
options = _.assign({
|
|
1852
1897
|
path: '/',
|
|
1853
1898
|
domain: null,
|
|
@@ -1855,7 +1900,7 @@ function cookieServiceFactory(nativeWindow, options) {
|
|
|
1855
1900
|
secure: false,
|
|
1856
1901
|
httpOnly: false
|
|
1857
1902
|
}, options);
|
|
1858
|
-
return new CookieService(options, nativeWindow);
|
|
1903
|
+
return new CookieService(options, nativeWindow, platform);
|
|
1859
1904
|
}
|
|
1860
1905
|
const COOKIE_OPTIONS = new InjectionToken(`COOKIE_OPTIONS`);
|
|
1861
1906
|
|
|
@@ -7102,6 +7147,7 @@ class VICommonModule {
|
|
|
7102
7147
|
ngModule: VICommonModule,
|
|
7103
7148
|
providers: [
|
|
7104
7149
|
LoadingService,
|
|
7150
|
+
PlatformService,
|
|
7105
7151
|
CanDeactivateGuard,
|
|
7106
7152
|
{ provide: VI_ANGULAR_OPTIONS, useValue: options || {} },
|
|
7107
7153
|
{ provide: Logger, deps: [VI_ANGULAR_OPTIONS], useFactory: loggerServiceFactory },
|
|
@@ -10058,5 +10104,5 @@ class TransportLazyModule {
|
|
|
10058
10104
|
* Generated bundle index. Do not edit.
|
|
10059
10105
|
*/
|
|
10060
10106
|
|
|
10061
|
-
export { APPLICATION_INJECTOR, ApplicationBaseComponent, ApplicationComponent, AspectRatioResizeDirective, AssetBackgroundDirective, AssetBackgroundPipe, AssetFilePipe, AssetIconPipe, AssetImagePipe, AssetModule, AssetSoundPipe, AssetVideoPipe, AutoScrollBottomDirective, BootstrapBreakpoint, BootstrapBreakpointService, BootstrapBreakpointServiceEvent, BottomSheetBaseComponent, BottomSheetService, COOKIE_OPTIONS, CamelCasePipe, CanDeactivateGuard, CdkTableBaseComponent, CdkTableCellClassNamePipe, CdkTableCellStyleNamePipe, CdkTableCellValuePipe, CdkTableCellValuePipePure, CdkTableColumnClassNamePipe, CdkTableColumnStyleNamePipe, CdkTableDataSource, CdkTableFilterableComponent, CdkTableFilterableMapCollection, CdkTablePaginableBookmarkComponent, CdkTablePaginableBookmarkMapCollection, CdkTablePaginableComponent, CdkTablePaginableMapCollection, CdkTableRowClassNamePipe, CdkTableRowStyleNamePipe, ClickToCopyDirective, ClickToSelectDirective, CookieModule, CookieOptions, CookieService, Direction, FinancePipe, FocusDirective, FocusManager, FormElementAsync, FormElementSync, HTMLContentTitleDirective, HTMLTitleDirective, INotification, INotificationContent, IUser, IVICommonOptions, IWindow, IWindowContent, InfiniteScrollDirective, LANGUAGE_OPTIONS, LanguageDirective, LanguageHasDirective, LanguageMatPaginatorIntl, LanguageModule, LanguageMomentDateAdapter, LanguagePipe, LanguagePipeHas, LanguagePipeHasPure, LanguagePipePure, LanguageRequireResolver, LanguageResolver, LanguageSelectorComponent, LazyModuleLoader, ListItem, ListItems, LoginBaseService, LoginBaseServiceEvent, LoginGuard, LoginIfCanGuard, LoginNotGuard, LoginRequireResolver, LoginResolver, MenuItem, MenuItemBase, MenuItems, MenuListComponent, MenuTriggerForDirective, MessageBaseComponent, MomentDateAdaptivePipe, MomentDateFromNowPipe, MomentDatePipe, MomentTimePipe, NavigationMenuItem, NgModelErrorPipe, NotificationBaseComponent, NotificationComponent, NotificationConfig, NotificationEvent, NotificationFactory, NotificationModule, NotificationService, NotificationServiceEvent, PipeBaseService, PrettifyPipe, PropertiesManager, QuestionEvent, QuestionManager, QuestionMode, ResizeDirective, ResizeManager, RouterBaseService, SanitizePipe, ScrollCheckDirective, ScrollDirective, SelectListComponent, SelectListItem, SelectListItems, SelectOnFocusDirective, ShellBaseComponent, StartCasePipe, THEME_OPTIONS, TabGroupComponent, ThemeAssetBackgroundDirective, ThemeAssetDirective, ThemeAssetImageDirective, ThemeModule, ThemeStyleDirective, ThemeStyleHoverDirective, ThemeToggleDirective, TimePipe, TransportLazy, TransportLazyModule, TransportLazyModuleLoadedEvent, TruncatePipe, UserBaseService, UserBaseServiceEvent, VICommonModule, VIComponentModule, VI_ANGULAR_OPTIONS, ViewUtil, WINDOW_CONTENT_CONTAINER, WindowAlign, WindowBase, WindowBaseComponent, WindowCloseElementComponent, WindowClosedError, WindowConfig, WindowDragAreaDirective, WindowElement, WindowEvent, WindowExpandElementComponent, WindowFactory, WindowImpl, WindowMinimizeElementComponent, WindowModule, WindowQuestionBaseComponent, WindowQuestionComponent, WindowResizeElementComponent, WindowService, WindowServiceEvent, cookieServiceFactory, languageServiceFactory, loggerServiceFactory, nativeWindowServiceFactory, notificationServiceFactory, themeAssetServiceFactory, themeServiceFactory };
|
|
10107
|
+
export { APPLICATION_INJECTOR, ApplicationBaseComponent, ApplicationComponent, AspectRatioResizeDirective, AssetBackgroundDirective, AssetBackgroundPipe, AssetFilePipe, AssetIconPipe, AssetImagePipe, AssetModule, AssetSoundPipe, AssetVideoPipe, AutoScrollBottomDirective, BootstrapBreakpoint, BootstrapBreakpointService, BootstrapBreakpointServiceEvent, BottomSheetBaseComponent, BottomSheetService, COOKIE_OPTIONS, CamelCasePipe, CanDeactivateGuard, CdkTableBaseComponent, CdkTableCellClassNamePipe, CdkTableCellStyleNamePipe, CdkTableCellValuePipe, CdkTableCellValuePipePure, CdkTableColumnClassNamePipe, CdkTableColumnStyleNamePipe, CdkTableDataSource, CdkTableFilterableComponent, CdkTableFilterableMapCollection, CdkTablePaginableBookmarkComponent, CdkTablePaginableBookmarkMapCollection, CdkTablePaginableComponent, CdkTablePaginableMapCollection, CdkTableRowClassNamePipe, CdkTableRowStyleNamePipe, ClickToCopyDirective, ClickToSelectDirective, CookieModule, CookieOptions, CookieService, Direction, FinancePipe, FocusDirective, FocusManager, FormElementAsync, FormElementSync, HTMLContentTitleDirective, HTMLTitleDirective, INotification, INotificationContent, IUser, IVICommonOptions, IWindow, IWindowContent, InfiniteScrollDirective, LANGUAGE_OPTIONS, LanguageDirective, LanguageHasDirective, LanguageMatPaginatorIntl, LanguageModule, LanguageMomentDateAdapter, LanguagePipe, LanguagePipeHas, LanguagePipeHasPure, LanguagePipePure, LanguageRequireResolver, LanguageResolver, LanguageSelectorComponent, LazyModuleLoader, ListItem, ListItems, LoginBaseService, LoginBaseServiceEvent, LoginGuard, LoginIfCanGuard, LoginNotGuard, LoginRequireResolver, LoginResolver, MenuItem, MenuItemBase, MenuItems, MenuListComponent, MenuTriggerForDirective, MessageBaseComponent, MomentDateAdaptivePipe, MomentDateFromNowPipe, MomentDatePipe, MomentTimePipe, NavigationMenuItem, NgModelErrorPipe, NotificationBaseComponent, NotificationComponent, NotificationConfig, NotificationEvent, NotificationFactory, NotificationModule, NotificationService, NotificationServiceEvent, PipeBaseService, PlatformService, PrettifyPipe, PropertiesManager, QuestionEvent, QuestionManager, QuestionMode, ResizeDirective, ResizeManager, RouterBaseService, SanitizePipe, ScrollCheckDirective, ScrollDirective, SelectListComponent, SelectListItem, SelectListItems, SelectOnFocusDirective, ShellBaseComponent, StartCasePipe, THEME_OPTIONS, TabGroupComponent, ThemeAssetBackgroundDirective, ThemeAssetDirective, ThemeAssetImageDirective, ThemeModule, ThemeStyleDirective, ThemeStyleHoverDirective, ThemeToggleDirective, TimePipe, TransportLazy, TransportLazyModule, TransportLazyModuleLoadedEvent, TruncatePipe, UserBaseService, UserBaseServiceEvent, VICommonModule, VIComponentModule, VI_ANGULAR_OPTIONS, ViewUtil, WINDOW_CONTENT_CONTAINER, WindowAlign, WindowBase, WindowBaseComponent, WindowCloseElementComponent, WindowClosedError, WindowConfig, WindowDragAreaDirective, WindowElement, WindowEvent, WindowExpandElementComponent, WindowFactory, WindowImpl, WindowMinimizeElementComponent, WindowModule, WindowQuestionBaseComponent, WindowQuestionComponent, WindowResizeElementComponent, WindowService, WindowServiceEvent, cookieServiceFactory, languageServiceFactory, loggerServiceFactory, nativeWindowServiceFactory, notificationServiceFactory, themeAssetServiceFactory, themeServiceFactory };
|
|
10062
10108
|
//# sourceMappingURL=ts-core-angular.mjs.map
|