@ts-core/angular 13.1.13 → 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 +17 -8
- package/esm2020/public-api.mjs +3 -2
- package/esm2020/service/PlatformService.mjs +38 -0
- package/fesm2015/ts-core-angular.mjs +58 -13
- package/fesm2015/ts-core-angular.mjs.map +1 -1
- package/fesm2020/ts-core-angular.mjs +56 -13
- 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,18 +1760,27 @@ 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
|
-
this
|
|
1766
|
-
|
|
1765
|
+
// this['cookieString'] = nativeWindow.document.cookie;
|
|
1766
|
+
let cookieString = '';
|
|
1767
1767
|
Object.defineProperty(this, 'cookieString', {
|
|
1768
|
-
get: ()
|
|
1769
|
-
|
|
1770
|
-
|
|
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
|
+
},
|
|
1771
1781
|
enumerable: true,
|
|
1772
1782
|
configurable: true
|
|
1773
1783
|
});
|
|
1774
|
-
*/
|
|
1775
1784
|
}
|
|
1776
1785
|
// --------------------------------------------------------------------------
|
|
1777
1786
|
//
|
|
@@ -1821,6 +1830,39 @@ class CookieService extends Cookie.CookieService {
|
|
|
1821
1830
|
}
|
|
1822
1831
|
}
|
|
1823
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
|
+
|
|
1824
1866
|
class CookieModule {
|
|
1825
1867
|
// --------------------------------------------------------------------------
|
|
1826
1868
|
//
|
|
@@ -1837,7 +1879,7 @@ class CookieModule {
|
|
|
1837
1879
|
},
|
|
1838
1880
|
{
|
|
1839
1881
|
provide: CookieService,
|
|
1840
|
-
deps: [NativeWindowService, COOKIE_OPTIONS],
|
|
1882
|
+
deps: [NativeWindowService, PlatformService, COOKIE_OPTIONS],
|
|
1841
1883
|
useFactory: cookieServiceFactory
|
|
1842
1884
|
}
|
|
1843
1885
|
]
|
|
@@ -1850,7 +1892,7 @@ CookieModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
|
1850
1892
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CookieModule, decorators: [{
|
|
1851
1893
|
type: NgModule
|
|
1852
1894
|
}] });
|
|
1853
|
-
function cookieServiceFactory(nativeWindow, options) {
|
|
1895
|
+
function cookieServiceFactory(nativeWindow, platform, options) {
|
|
1854
1896
|
options = _.assign({
|
|
1855
1897
|
path: '/',
|
|
1856
1898
|
domain: null,
|
|
@@ -1858,7 +1900,7 @@ function cookieServiceFactory(nativeWindow, options) {
|
|
|
1858
1900
|
secure: false,
|
|
1859
1901
|
httpOnly: false
|
|
1860
1902
|
}, options);
|
|
1861
|
-
return new CookieService(options, nativeWindow);
|
|
1903
|
+
return new CookieService(options, nativeWindow, platform);
|
|
1862
1904
|
}
|
|
1863
1905
|
const COOKIE_OPTIONS = new InjectionToken(`COOKIE_OPTIONS`);
|
|
1864
1906
|
|
|
@@ -7105,6 +7147,7 @@ class VICommonModule {
|
|
|
7105
7147
|
ngModule: VICommonModule,
|
|
7106
7148
|
providers: [
|
|
7107
7149
|
LoadingService,
|
|
7150
|
+
PlatformService,
|
|
7108
7151
|
CanDeactivateGuard,
|
|
7109
7152
|
{ provide: VI_ANGULAR_OPTIONS, useValue: options || {} },
|
|
7110
7153
|
{ provide: Logger, deps: [VI_ANGULAR_OPTIONS], useFactory: loggerServiceFactory },
|
|
@@ -10061,5 +10104,5 @@ class TransportLazyModule {
|
|
|
10061
10104
|
* Generated bundle index. Do not edit.
|
|
10062
10105
|
*/
|
|
10063
10106
|
|
|
10064
|
-
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 };
|
|
10065
10108
|
//# sourceMappingURL=ts-core-angular.mjs.map
|