@ts-core/angular 13.1.16 → 13.1.19
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 +3 -1
- package/cookie/CookieService.d.ts +4 -2
- package/esm2020/VICommonModule.mjs +15 -2
- package/esm2020/cookie/CookieModule.mjs +2 -2
- package/esm2020/cookie/CookieService.mjs +13 -20
- package/esm2020/theme/ThemeModule.mjs +6 -5
- package/esm2020/util/ViewUtil.mjs +12 -8
- package/fesm2015/ts-core-angular.mjs +42 -33
- package/fesm2015/ts-core-angular.mjs.map +1 -1
- package/fesm2020/ts-core-angular.mjs +42 -33
- package/fesm2020/ts-core-angular.mjs.map +1 -1
- package/package.json +2 -2
- package/theme/ThemeModule.d.ts +2 -2
- package/util/ViewUtil.d.ts +3 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ViewContainerRef, Injectable, Directive, Input, Pipe, NgModule, PLATFORM_ID, Inject, InjectionToken, EventEmitter, Output, HostListener, Optional, RendererStyleFlags2, NgModuleFactory } from '@angular/core';
|
|
2
|
+
import { Component, ViewContainerRef, Injectable, Directive, Input, Pipe, NgModule, PLATFORM_ID, Inject, InjectionToken, EventEmitter, Output, HostListener, Optional, RendererStyleFlags2, APP_INITIALIZER, Renderer2, 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';
|
|
@@ -141,6 +141,12 @@ class ViewUtil {
|
|
|
141
141
|
}
|
|
142
142
|
ViewUtil._renderer = value;
|
|
143
143
|
}
|
|
144
|
+
static get document() {
|
|
145
|
+
return !_.isNil(ViewUtil._document) ? ViewUtil._document : document;
|
|
146
|
+
}
|
|
147
|
+
static set document(value) {
|
|
148
|
+
ViewUtil._document = value;
|
|
149
|
+
}
|
|
144
150
|
// --------------------------------------------------------------------------
|
|
145
151
|
//
|
|
146
152
|
// Private Methods
|
|
@@ -148,7 +154,7 @@ class ViewUtil {
|
|
|
148
154
|
// --------------------------------------------------------------------------
|
|
149
155
|
static copyToClipboard() {
|
|
150
156
|
try {
|
|
151
|
-
document.execCommand('copy');
|
|
157
|
+
ViewUtil.document.execCommand('copy');
|
|
152
158
|
}
|
|
153
159
|
catch (error) { }
|
|
154
160
|
}
|
|
@@ -157,9 +163,6 @@ class ViewUtil {
|
|
|
157
163
|
// Common Properties
|
|
158
164
|
//
|
|
159
165
|
// --------------------------------------------------------------------------
|
|
160
|
-
static initialize(renderer) {
|
|
161
|
-
ViewUtil._renderer = renderer;
|
|
162
|
-
}
|
|
163
166
|
static parseElement(element) {
|
|
164
167
|
if (element instanceof HTMLElement) {
|
|
165
168
|
return element;
|
|
@@ -201,7 +204,7 @@ class ViewUtil {
|
|
|
201
204
|
else {
|
|
202
205
|
let selection = window.getSelection();
|
|
203
206
|
selection.removeAllRanges();
|
|
204
|
-
let range = document.createRange();
|
|
207
|
+
let range = ViewUtil.document.createRange();
|
|
205
208
|
if (!_.isNil(container)) {
|
|
206
209
|
range.selectNodeContents(container);
|
|
207
210
|
}
|
|
@@ -263,10 +266,10 @@ class ViewUtil {
|
|
|
263
266
|
//
|
|
264
267
|
// --------------------------------------------------------------------------
|
|
265
268
|
static getStageWidth() {
|
|
266
|
-
return window.innerWidth || document.body.clientWidth;
|
|
269
|
+
return window.innerWidth || ViewUtil.document.body.clientWidth;
|
|
267
270
|
}
|
|
268
271
|
static getStageHeight() {
|
|
269
|
-
return window.innerHeight || document.body.clientHeight;
|
|
272
|
+
return window.innerHeight || ViewUtil.document.body.clientHeight;
|
|
270
273
|
}
|
|
271
274
|
static getWidth(container) {
|
|
272
275
|
container = ViewUtil.parseElement(container);
|
|
@@ -670,6 +673,7 @@ class ViewUtil {
|
|
|
670
673
|
//
|
|
671
674
|
// --------------------------------------------------------------------------
|
|
672
675
|
ViewUtil._renderer = null;
|
|
676
|
+
ViewUtil._document = null;
|
|
673
677
|
|
|
674
678
|
class ApplicationComponent extends ApplicationBaseComponent {
|
|
675
679
|
// --------------------------------------------------------------------------
|
|
@@ -1760,19 +1764,17 @@ class CookieService extends Cookie.CookieService {
|
|
|
1760
1764
|
// Constructor
|
|
1761
1765
|
//
|
|
1762
1766
|
// --------------------------------------------------------------------------
|
|
1763
|
-
constructor(options,
|
|
1767
|
+
constructor(options, platform, item) {
|
|
1764
1768
|
super({ options });
|
|
1765
|
-
|
|
1769
|
+
this._document = !_.isNil(item) ? item : document;
|
|
1766
1770
|
let cookieString = '';
|
|
1767
1771
|
Object.defineProperty(this, 'cookieString', {
|
|
1768
1772
|
get: () => {
|
|
1769
|
-
|
|
1770
|
-
return platform.isPlatformBrowser ? nativeWindow.document.cookie : cookieString;
|
|
1773
|
+
return platform.isPlatformBrowser ? this.document.cookie : cookieString;
|
|
1771
1774
|
},
|
|
1772
1775
|
set: (value) => {
|
|
1773
|
-
console.log('cookieSet', platform.isPlatformBrowser);
|
|
1774
1776
|
if (platform.isPlatformBrowser) {
|
|
1775
|
-
|
|
1777
|
+
this.document.cookie = value;
|
|
1776
1778
|
}
|
|
1777
1779
|
else {
|
|
1778
1780
|
cookieString = value;
|
|
@@ -1784,19 +1786,6 @@ class CookieService extends Cookie.CookieService {
|
|
|
1784
1786
|
}
|
|
1785
1787
|
// --------------------------------------------------------------------------
|
|
1786
1788
|
//
|
|
1787
|
-
// Protected Methods
|
|
1788
|
-
//
|
|
1789
|
-
// --------------------------------------------------------------------------
|
|
1790
|
-
/*
|
|
1791
|
-
protected get cookieString(): string {
|
|
1792
|
-
return document.cookie || '';
|
|
1793
|
-
}
|
|
1794
|
-
protected override set cookieString(value: string) {
|
|
1795
|
-
document.cookie = value;
|
|
1796
|
-
}
|
|
1797
|
-
*/
|
|
1798
|
-
// --------------------------------------------------------------------------
|
|
1799
|
-
//
|
|
1800
1789
|
// Public Methods
|
|
1801
1790
|
//
|
|
1802
1791
|
// --------------------------------------------------------------------------
|
|
@@ -1828,6 +1817,14 @@ class CookieService extends Cookie.CookieService {
|
|
|
1828
1817
|
this.remove(key);
|
|
1829
1818
|
}
|
|
1830
1819
|
}
|
|
1820
|
+
// --------------------------------------------------------------------------
|
|
1821
|
+
//
|
|
1822
|
+
// Private Properties
|
|
1823
|
+
//
|
|
1824
|
+
// --------------------------------------------------------------------------
|
|
1825
|
+
get document() {
|
|
1826
|
+
return this._document;
|
|
1827
|
+
}
|
|
1831
1828
|
}
|
|
1832
1829
|
|
|
1833
1830
|
class PlatformService extends DestroyableContainer {
|
|
@@ -1900,7 +1897,7 @@ function cookieServiceFactory(nativeWindow, platform, options) {
|
|
|
1900
1897
|
secure: false,
|
|
1901
1898
|
httpOnly: false
|
|
1902
1899
|
}, options);
|
|
1903
|
-
return new CookieService(options,
|
|
1900
|
+
return new CookieService(options, platform, nativeWindow.document);
|
|
1904
1901
|
}
|
|
1905
1902
|
const COOKIE_OPTIONS = new InjectionToken(`COOKIE_OPTIONS`);
|
|
1906
1903
|
|
|
@@ -6891,12 +6888,12 @@ class ThemeModule {
|
|
|
6891
6888
|
},
|
|
6892
6889
|
{
|
|
6893
6890
|
provide: ThemeService,
|
|
6894
|
-
deps: [CookieService, THEME_OPTIONS],
|
|
6891
|
+
deps: [NativeWindowService, CookieService, THEME_OPTIONS],
|
|
6895
6892
|
useFactory: themeServiceFactory
|
|
6896
6893
|
},
|
|
6897
6894
|
{
|
|
6898
6895
|
provide: ThemeAssetService,
|
|
6899
|
-
deps: [ThemeService],
|
|
6896
|
+
deps: [ThemeService, NativeWindowService],
|
|
6900
6897
|
useFactory: themeAssetServiceFactory
|
|
6901
6898
|
}
|
|
6902
6899
|
]
|
|
@@ -6914,11 +6911,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
6914
6911
|
exports: declarations
|
|
6915
6912
|
}]
|
|
6916
6913
|
}] });
|
|
6917
|
-
function themeServiceFactory(cookie, options) {
|
|
6914
|
+
function themeServiceFactory(nativeWindow, cookie, options) {
|
|
6918
6915
|
if (!_.isNil(options) && _.isNil(options.service)) {
|
|
6919
6916
|
options.service = cookie;
|
|
6920
6917
|
}
|
|
6921
|
-
return new ThemeService(options);
|
|
6918
|
+
return new ThemeService(options, nativeWindow.document);
|
|
6922
6919
|
}
|
|
6923
6920
|
function themeAssetServiceFactory(theme) {
|
|
6924
6921
|
return new ThemeAssetService(theme);
|
|
@@ -7146,6 +7143,12 @@ class VICommonModule {
|
|
|
7146
7143
|
return {
|
|
7147
7144
|
ngModule: VICommonModule,
|
|
7148
7145
|
providers: [
|
|
7146
|
+
{
|
|
7147
|
+
provide: APP_INITIALIZER,
|
|
7148
|
+
deps: [NativeWindowService, Renderer2],
|
|
7149
|
+
useFactory: initializerFactory,
|
|
7150
|
+
multi: true
|
|
7151
|
+
},
|
|
7149
7152
|
LoadingService,
|
|
7150
7153
|
PlatformService,
|
|
7151
7154
|
CanDeactivateGuard,
|
|
@@ -7223,6 +7226,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
7223
7226
|
}] });
|
|
7224
7227
|
class IVICommonOptions extends ICookieOptions {
|
|
7225
7228
|
}
|
|
7229
|
+
function initializerFactory(nativeWindow, renderer) {
|
|
7230
|
+
console.log('initializerFactory called');
|
|
7231
|
+
ViewUtil.renderer = renderer;
|
|
7232
|
+
ViewUtil.document = nativeWindow.document;
|
|
7233
|
+
return () => Promise.resolve();
|
|
7234
|
+
}
|
|
7226
7235
|
function loggerServiceFactory(options) {
|
|
7227
7236
|
return new DefaultLogger(!_.isNil(options.loggerLevel) ? options.loggerLevel : LoggerLevel.LOG);
|
|
7228
7237
|
}
|
|
@@ -10104,5 +10113,5 @@ class TransportLazyModule {
|
|
|
10104
10113
|
* Generated bundle index. Do not edit.
|
|
10105
10114
|
*/
|
|
10106
10115
|
|
|
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 };
|
|
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 };
|
|
10108
10117
|
//# sourceMappingURL=ts-core-angular.mjs.map
|