@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';
|
|
@@ -143,15 +143,9 @@ class ViewUtil {
|
|
|
143
143
|
ViewUtil._renderer = value;
|
|
144
144
|
}
|
|
145
145
|
static get document() {
|
|
146
|
-
|
|
147
|
-
throw new ExtendedError(`ViewUtil is not initialized: document in nil`);
|
|
148
|
-
}
|
|
149
|
-
return ViewUtil._document;
|
|
146
|
+
return !_.isNil(ViewUtil._document) ? ViewUtil._document : document;
|
|
150
147
|
}
|
|
151
148
|
static set document(value) {
|
|
152
|
-
if (value === ViewUtil._document) {
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
149
|
ViewUtil._document = value;
|
|
156
150
|
}
|
|
157
151
|
// --------------------------------------------------------------------------
|
|
@@ -680,8 +674,7 @@ class ViewUtil {
|
|
|
680
674
|
//
|
|
681
675
|
// --------------------------------------------------------------------------
|
|
682
676
|
ViewUtil._renderer = null;
|
|
683
|
-
ViewUtil._document =
|
|
684
|
-
const VIEW_UTIL = new InjectionToken('VIEW_UTIL');
|
|
677
|
+
ViewUtil._document = null;
|
|
685
678
|
|
|
686
679
|
class ApplicationComponent extends ApplicationBaseComponent {
|
|
687
680
|
// --------------------------------------------------------------------------
|
|
@@ -1772,19 +1765,17 @@ class CookieService extends Cookie.CookieService {
|
|
|
1772
1765
|
// Constructor
|
|
1773
1766
|
//
|
|
1774
1767
|
// --------------------------------------------------------------------------
|
|
1775
|
-
constructor(options,
|
|
1768
|
+
constructor(options, platform, item) {
|
|
1776
1769
|
super({ options });
|
|
1777
|
-
|
|
1770
|
+
this._document = !_.isNil(item) ? item : document;
|
|
1778
1771
|
let cookieString = '';
|
|
1779
1772
|
Object.defineProperty(this, 'cookieString', {
|
|
1780
1773
|
get: () => {
|
|
1781
|
-
|
|
1782
|
-
return platform.isPlatformBrowser ? nativeWindow.document.cookie : cookieString;
|
|
1774
|
+
return platform.isPlatformBrowser ? this.document.cookie : cookieString;
|
|
1783
1775
|
},
|
|
1784
1776
|
set: (value) => {
|
|
1785
|
-
console.log('cookieSet', platform.isPlatformBrowser);
|
|
1786
1777
|
if (platform.isPlatformBrowser) {
|
|
1787
|
-
|
|
1778
|
+
this.document.cookie = value;
|
|
1788
1779
|
}
|
|
1789
1780
|
else {
|
|
1790
1781
|
cookieString = value;
|
|
@@ -1827,6 +1818,14 @@ class CookieService extends Cookie.CookieService {
|
|
|
1827
1818
|
this.remove(key);
|
|
1828
1819
|
}
|
|
1829
1820
|
}
|
|
1821
|
+
// --------------------------------------------------------------------------
|
|
1822
|
+
//
|
|
1823
|
+
// Private Properties
|
|
1824
|
+
//
|
|
1825
|
+
// --------------------------------------------------------------------------
|
|
1826
|
+
get document() {
|
|
1827
|
+
return this._document;
|
|
1828
|
+
}
|
|
1830
1829
|
}
|
|
1831
1830
|
|
|
1832
1831
|
class PlatformService extends DestroyableContainer {
|
|
@@ -1901,7 +1900,7 @@ function cookieServiceFactory(nativeWindow, platform, options) {
|
|
|
1901
1900
|
secure: false,
|
|
1902
1901
|
httpOnly: false
|
|
1903
1902
|
}, options);
|
|
1904
|
-
return new CookieService(options,
|
|
1903
|
+
return new CookieService(options, platform, nativeWindow.document);
|
|
1905
1904
|
}
|
|
1906
1905
|
const COOKIE_OPTIONS = new InjectionToken(`COOKIE_OPTIONS`);
|
|
1907
1906
|
|
|
@@ -6921,7 +6920,7 @@ function themeServiceFactory(nativeWindow, cookie, options) {
|
|
|
6921
6920
|
if (!_.isNil(options) && _.isNil(options.service)) {
|
|
6922
6921
|
options.service = cookie;
|
|
6923
6922
|
}
|
|
6924
|
-
return new ThemeService(
|
|
6923
|
+
return new ThemeService(options, nativeWindow.document);
|
|
6925
6924
|
}
|
|
6926
6925
|
function themeAssetServiceFactory(theme) {
|
|
6927
6926
|
return new ThemeAssetService(theme);
|
|
@@ -7149,10 +7148,15 @@ class VICommonModule {
|
|
|
7149
7148
|
return {
|
|
7150
7149
|
ngModule: VICommonModule,
|
|
7151
7150
|
providers: [
|
|
7151
|
+
{
|
|
7152
|
+
provide: APP_INITIALIZER,
|
|
7153
|
+
deps: [NativeWindowService, RendererFactory2],
|
|
7154
|
+
useFactory: initializerFactory,
|
|
7155
|
+
multi: true
|
|
7156
|
+
},
|
|
7152
7157
|
LoadingService,
|
|
7153
7158
|
PlatformService,
|
|
7154
7159
|
CanDeactivateGuard,
|
|
7155
|
-
{ provide: VIEW_UTIL, useFactory: viewUtilFactory },
|
|
7156
7160
|
{ provide: VI_ANGULAR_OPTIONS, useValue: options || {} },
|
|
7157
7161
|
{ provide: Logger, deps: [VI_ANGULAR_OPTIONS], useFactory: loggerServiceFactory },
|
|
7158
7162
|
{ provide: NativeWindowService, deps: [DOCUMENT], useFactory: nativeWindowServiceFactory },
|
|
@@ -7227,10 +7231,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
7227
7231
|
}] });
|
|
7228
7232
|
class IVICommonOptions extends ICookieOptions {
|
|
7229
7233
|
}
|
|
7230
|
-
function
|
|
7231
|
-
|
|
7234
|
+
function initializerFactory(nativeWindow, rendererFactory2) {
|
|
7235
|
+
console.log('initializerFactory called');
|
|
7236
|
+
ViewUtil.renderer = rendererFactory2.createRenderer(null, null);
|
|
7232
7237
|
ViewUtil.document = nativeWindow.document;
|
|
7233
|
-
return
|
|
7238
|
+
return () => Promise.resolve();
|
|
7234
7239
|
}
|
|
7235
7240
|
function loggerServiceFactory(options) {
|
|
7236
7241
|
return new DefaultLogger(!_.isNil(options.loggerLevel) ? options.loggerLevel : LoggerLevel.LOG);
|
|
@@ -10157,5 +10162,5 @@ class TransportLazyModule {
|
|
|
10157
10162
|
* Generated bundle index. Do not edit.
|
|
10158
10163
|
*/
|
|
10159
10164
|
|
|
10160
|
-
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,
|
|
10165
|
+
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 };
|
|
10161
10166
|
//# sourceMappingURL=ts-core-angular.mjs.map
|