@ts-core/angular 13.1.17 → 13.1.20
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/VICommonModule.d.ts +2 -2
- package/cookie/CookieService.d.ts +4 -2
- package/esm2020/VICommonModule.mjs +13 -7
- package/esm2020/cookie/CookieModule.mjs +2 -2
- package/esm2020/cookie/CookieService.mjs +13 -7
- package/esm2020/theme/ThemeModule.mjs +2 -2
- package/esm2020/util/ViewUtil.mjs +4 -11
- package/fesm2015/ts-core-angular.mjs +28 -23
- package/fesm2015/ts-core-angular.mjs.map +1 -1
- package/fesm2020/ts-core-angular.mjs +28 -23
- package/fesm2020/ts-core-angular.mjs.map +1 -1
- package/package.json +2 -2
- package/util/ViewUtil.d.ts +1 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ViewContainerRef,
|
|
2
|
+
import { Component, ViewContainerRef, Injectable, Directive, Input, Pipe, NgModule, PLATFORM_ID, Inject, InjectionToken, EventEmitter, Output, HostListener, Optional, RendererStyleFlags2, APP_INITIALIZER, RendererFactory2, 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';
|
|
@@ -142,15 +142,9 @@ class ViewUtil {
|
|
|
142
142
|
ViewUtil._renderer = value;
|
|
143
143
|
}
|
|
144
144
|
static get document() {
|
|
145
|
-
|
|
146
|
-
throw new ExtendedError(`ViewUtil is not initialized: document in nil`);
|
|
147
|
-
}
|
|
148
|
-
return ViewUtil._document;
|
|
145
|
+
return !_.isNil(ViewUtil._document) ? ViewUtil._document : document;
|
|
149
146
|
}
|
|
150
147
|
static set document(value) {
|
|
151
|
-
if (value === ViewUtil._document) {
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
148
|
ViewUtil._document = value;
|
|
155
149
|
}
|
|
156
150
|
// --------------------------------------------------------------------------
|
|
@@ -679,8 +673,7 @@ class ViewUtil {
|
|
|
679
673
|
//
|
|
680
674
|
// --------------------------------------------------------------------------
|
|
681
675
|
ViewUtil._renderer = null;
|
|
682
|
-
ViewUtil._document =
|
|
683
|
-
const VIEW_UTIL = new InjectionToken('VIEW_UTIL');
|
|
676
|
+
ViewUtil._document = null;
|
|
684
677
|
|
|
685
678
|
class ApplicationComponent extends ApplicationBaseComponent {
|
|
686
679
|
// --------------------------------------------------------------------------
|
|
@@ -1771,19 +1764,17 @@ class CookieService extends Cookie.CookieService {
|
|
|
1771
1764
|
// Constructor
|
|
1772
1765
|
//
|
|
1773
1766
|
// --------------------------------------------------------------------------
|
|
1774
|
-
constructor(options,
|
|
1767
|
+
constructor(options, platform, item) {
|
|
1775
1768
|
super({ options });
|
|
1776
|
-
|
|
1769
|
+
this._document = !_.isNil(item) ? item : document;
|
|
1777
1770
|
let cookieString = '';
|
|
1778
1771
|
Object.defineProperty(this, 'cookieString', {
|
|
1779
1772
|
get: () => {
|
|
1780
|
-
|
|
1781
|
-
return platform.isPlatformBrowser ? nativeWindow.document.cookie : cookieString;
|
|
1773
|
+
return platform.isPlatformBrowser ? this.document.cookie : cookieString;
|
|
1782
1774
|
},
|
|
1783
1775
|
set: (value) => {
|
|
1784
|
-
console.log('cookieSet', platform.isPlatformBrowser);
|
|
1785
1776
|
if (platform.isPlatformBrowser) {
|
|
1786
|
-
|
|
1777
|
+
this.document.cookie = value;
|
|
1787
1778
|
}
|
|
1788
1779
|
else {
|
|
1789
1780
|
cookieString = value;
|
|
@@ -1826,6 +1817,14 @@ class CookieService extends Cookie.CookieService {
|
|
|
1826
1817
|
this.remove(key);
|
|
1827
1818
|
}
|
|
1828
1819
|
}
|
|
1820
|
+
// --------------------------------------------------------------------------
|
|
1821
|
+
//
|
|
1822
|
+
// Private Properties
|
|
1823
|
+
//
|
|
1824
|
+
// --------------------------------------------------------------------------
|
|
1825
|
+
get document() {
|
|
1826
|
+
return this._document;
|
|
1827
|
+
}
|
|
1829
1828
|
}
|
|
1830
1829
|
|
|
1831
1830
|
class PlatformService extends DestroyableContainer {
|
|
@@ -1898,7 +1897,7 @@ function cookieServiceFactory(nativeWindow, platform, options) {
|
|
|
1898
1897
|
secure: false,
|
|
1899
1898
|
httpOnly: false
|
|
1900
1899
|
}, options);
|
|
1901
|
-
return new CookieService(options,
|
|
1900
|
+
return new CookieService(options, platform, nativeWindow.document);
|
|
1902
1901
|
}
|
|
1903
1902
|
const COOKIE_OPTIONS = new InjectionToken(`COOKIE_OPTIONS`);
|
|
1904
1903
|
|
|
@@ -6916,7 +6915,7 @@ function themeServiceFactory(nativeWindow, cookie, options) {
|
|
|
6916
6915
|
if (!_.isNil(options) && _.isNil(options.service)) {
|
|
6917
6916
|
options.service = cookie;
|
|
6918
6917
|
}
|
|
6919
|
-
return new ThemeService(
|
|
6918
|
+
return new ThemeService(options, nativeWindow.document);
|
|
6920
6919
|
}
|
|
6921
6920
|
function themeAssetServiceFactory(theme) {
|
|
6922
6921
|
return new ThemeAssetService(theme);
|
|
@@ -7144,10 +7143,15 @@ class VICommonModule {
|
|
|
7144
7143
|
return {
|
|
7145
7144
|
ngModule: VICommonModule,
|
|
7146
7145
|
providers: [
|
|
7146
|
+
{
|
|
7147
|
+
provide: APP_INITIALIZER,
|
|
7148
|
+
deps: [NativeWindowService, RendererFactory2],
|
|
7149
|
+
useFactory: initializerFactory,
|
|
7150
|
+
multi: true
|
|
7151
|
+
},
|
|
7147
7152
|
LoadingService,
|
|
7148
7153
|
PlatformService,
|
|
7149
7154
|
CanDeactivateGuard,
|
|
7150
|
-
{ provide: VIEW_UTIL, useFactory: viewUtilFactory },
|
|
7151
7155
|
{ provide: VI_ANGULAR_OPTIONS, useValue: options || {} },
|
|
7152
7156
|
{ provide: Logger, deps: [VI_ANGULAR_OPTIONS], useFactory: loggerServiceFactory },
|
|
7153
7157
|
{ provide: NativeWindowService, deps: [DOCUMENT], useFactory: nativeWindowServiceFactory },
|
|
@@ -7222,10 +7226,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
7222
7226
|
}] });
|
|
7223
7227
|
class IVICommonOptions extends ICookieOptions {
|
|
7224
7228
|
}
|
|
7225
|
-
function
|
|
7226
|
-
|
|
7229
|
+
function initializerFactory(nativeWindow, rendererFactory2) {
|
|
7230
|
+
console.log('initializerFactory called');
|
|
7231
|
+
ViewUtil.renderer = rendererFactory2.createRenderer(null, null);
|
|
7227
7232
|
ViewUtil.document = nativeWindow.document;
|
|
7228
|
-
return
|
|
7233
|
+
return () => Promise.resolve();
|
|
7229
7234
|
}
|
|
7230
7235
|
function loggerServiceFactory(options) {
|
|
7231
7236
|
return new DefaultLogger(!_.isNil(options.loggerLevel) ? options.loggerLevel : LoggerLevel.LOG);
|
|
@@ -10108,5 +10113,5 @@ class TransportLazyModule {
|
|
|
10108
10113
|
* Generated bundle index. Do not edit.
|
|
10109
10114
|
*/
|
|
10110
10115
|
|
|
10111
|
-
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,
|
|
10116
|
+
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, initializerFactory, languageServiceFactory, loggerServiceFactory, nativeWindowServiceFactory, notificationServiceFactory, themeAssetServiceFactory, themeServiceFactory };
|
|
10112
10117
|
//# sourceMappingURL=ts-core-angular.mjs.map
|