@ts-core/angular 13.1.16 → 13.1.17
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/esm2020/VICommonModule.mjs +8 -1
- package/esm2020/cookie/CookieService.mjs +1 -14
- package/esm2020/theme/ThemeModule.mjs +6 -5
- package/esm2020/util/ViewUtil.mjs +20 -9
- package/fesm2015/ts-core-angular.mjs +30 -26
- package/fesm2015/ts-core-angular.mjs.map +1 -1
- package/fesm2020/ts-core-angular.mjs +30 -26
- package/fesm2020/ts-core-angular.mjs.map +1 -1
- package/package.json +1 -1
- package/theme/ThemeModule.d.ts +2 -2
- package/util/ViewUtil.d.ts +5 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ViewContainerRef, Injectable, Directive, Input, Pipe, NgModule, PLATFORM_ID, Inject,
|
|
2
|
+
import { Component, ViewContainerRef, InjectionToken, Injectable, Directive, Input, Pipe, NgModule, PLATFORM_ID, Inject, 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';
|
|
@@ -141,6 +141,18 @@ class ViewUtil {
|
|
|
141
141
|
}
|
|
142
142
|
ViewUtil._renderer = value;
|
|
143
143
|
}
|
|
144
|
+
static get document() {
|
|
145
|
+
if (_.isNil(ViewUtil._document)) {
|
|
146
|
+
throw new ExtendedError(`ViewUtil is not initialized: document in nil`);
|
|
147
|
+
}
|
|
148
|
+
return ViewUtil._document;
|
|
149
|
+
}
|
|
150
|
+
static set document(value) {
|
|
151
|
+
if (value === ViewUtil._document) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
ViewUtil._document = value;
|
|
155
|
+
}
|
|
144
156
|
// --------------------------------------------------------------------------
|
|
145
157
|
//
|
|
146
158
|
// Private Methods
|
|
@@ -148,7 +160,7 @@ class ViewUtil {
|
|
|
148
160
|
// --------------------------------------------------------------------------
|
|
149
161
|
static copyToClipboard() {
|
|
150
162
|
try {
|
|
151
|
-
document.execCommand('copy');
|
|
163
|
+
ViewUtil.document.execCommand('copy');
|
|
152
164
|
}
|
|
153
165
|
catch (error) { }
|
|
154
166
|
}
|
|
@@ -157,9 +169,6 @@ class ViewUtil {
|
|
|
157
169
|
// Common Properties
|
|
158
170
|
//
|
|
159
171
|
// --------------------------------------------------------------------------
|
|
160
|
-
static initialize(renderer) {
|
|
161
|
-
ViewUtil._renderer = renderer;
|
|
162
|
-
}
|
|
163
172
|
static parseElement(element) {
|
|
164
173
|
if (element instanceof HTMLElement) {
|
|
165
174
|
return element;
|
|
@@ -201,7 +210,7 @@ class ViewUtil {
|
|
|
201
210
|
else {
|
|
202
211
|
let selection = window.getSelection();
|
|
203
212
|
selection.removeAllRanges();
|
|
204
|
-
let range = document.createRange();
|
|
213
|
+
let range = ViewUtil.document.createRange();
|
|
205
214
|
if (!_.isNil(container)) {
|
|
206
215
|
range.selectNodeContents(container);
|
|
207
216
|
}
|
|
@@ -263,10 +272,10 @@ class ViewUtil {
|
|
|
263
272
|
//
|
|
264
273
|
// --------------------------------------------------------------------------
|
|
265
274
|
static getStageWidth() {
|
|
266
|
-
return window.innerWidth || document.body.clientWidth;
|
|
275
|
+
return window.innerWidth || ViewUtil.document.body.clientWidth;
|
|
267
276
|
}
|
|
268
277
|
static getStageHeight() {
|
|
269
|
-
return window.innerHeight || document.body.clientHeight;
|
|
278
|
+
return window.innerHeight || ViewUtil.document.body.clientHeight;
|
|
270
279
|
}
|
|
271
280
|
static getWidth(container) {
|
|
272
281
|
container = ViewUtil.parseElement(container);
|
|
@@ -670,6 +679,8 @@ class ViewUtil {
|
|
|
670
679
|
//
|
|
671
680
|
// --------------------------------------------------------------------------
|
|
672
681
|
ViewUtil._renderer = null;
|
|
682
|
+
ViewUtil._document = document;
|
|
683
|
+
const VIEW_UTIL = new InjectionToken('VIEW_UTIL');
|
|
673
684
|
|
|
674
685
|
class ApplicationComponent extends ApplicationBaseComponent {
|
|
675
686
|
// --------------------------------------------------------------------------
|
|
@@ -1784,19 +1795,6 @@ class CookieService extends Cookie.CookieService {
|
|
|
1784
1795
|
}
|
|
1785
1796
|
// --------------------------------------------------------------------------
|
|
1786
1797
|
//
|
|
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
1798
|
// Public Methods
|
|
1801
1799
|
//
|
|
1802
1800
|
// --------------------------------------------------------------------------
|
|
@@ -6891,12 +6889,12 @@ class ThemeModule {
|
|
|
6891
6889
|
},
|
|
6892
6890
|
{
|
|
6893
6891
|
provide: ThemeService,
|
|
6894
|
-
deps: [CookieService, THEME_OPTIONS],
|
|
6892
|
+
deps: [NativeWindowService, CookieService, THEME_OPTIONS],
|
|
6895
6893
|
useFactory: themeServiceFactory
|
|
6896
6894
|
},
|
|
6897
6895
|
{
|
|
6898
6896
|
provide: ThemeAssetService,
|
|
6899
|
-
deps: [ThemeService],
|
|
6897
|
+
deps: [ThemeService, NativeWindowService],
|
|
6900
6898
|
useFactory: themeAssetServiceFactory
|
|
6901
6899
|
}
|
|
6902
6900
|
]
|
|
@@ -6914,11 +6912,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
6914
6912
|
exports: declarations
|
|
6915
6913
|
}]
|
|
6916
6914
|
}] });
|
|
6917
|
-
function themeServiceFactory(cookie, options) {
|
|
6915
|
+
function themeServiceFactory(nativeWindow, cookie, options) {
|
|
6918
6916
|
if (!_.isNil(options) && _.isNil(options.service)) {
|
|
6919
6917
|
options.service = cookie;
|
|
6920
6918
|
}
|
|
6921
|
-
return new ThemeService(options);
|
|
6919
|
+
return new ThemeService(nativeWindow, options);
|
|
6922
6920
|
}
|
|
6923
6921
|
function themeAssetServiceFactory(theme) {
|
|
6924
6922
|
return new ThemeAssetService(theme);
|
|
@@ -7149,6 +7147,7 @@ class VICommonModule {
|
|
|
7149
7147
|
LoadingService,
|
|
7150
7148
|
PlatformService,
|
|
7151
7149
|
CanDeactivateGuard,
|
|
7150
|
+
{ provide: VIEW_UTIL, useFactory: viewUtilFactory },
|
|
7152
7151
|
{ provide: VI_ANGULAR_OPTIONS, useValue: options || {} },
|
|
7153
7152
|
{ provide: Logger, deps: [VI_ANGULAR_OPTIONS], useFactory: loggerServiceFactory },
|
|
7154
7153
|
{ provide: NativeWindowService, deps: [DOCUMENT], useFactory: nativeWindowServiceFactory },
|
|
@@ -7223,6 +7222,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
7223
7222
|
}] });
|
|
7224
7223
|
class IVICommonOptions extends ICookieOptions {
|
|
7225
7224
|
}
|
|
7225
|
+
function viewUtilFactory(nativeWindow, renderer) {
|
|
7226
|
+
ViewUtil.renderer = renderer;
|
|
7227
|
+
ViewUtil.document = nativeWindow.document;
|
|
7228
|
+
return ViewUtil;
|
|
7229
|
+
}
|
|
7226
7230
|
function loggerServiceFactory(options) {
|
|
7227
7231
|
return new DefaultLogger(!_.isNil(options.loggerLevel) ? options.loggerLevel : LoggerLevel.LOG);
|
|
7228
7232
|
}
|
|
@@ -10104,5 +10108,5 @@ class TransportLazyModule {
|
|
|
10104
10108
|
* Generated bundle index. Do not edit.
|
|
10105
10109
|
*/
|
|
10106
10110
|
|
|
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 };
|
|
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, VIEW_UTIL, 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, viewUtilFactory };
|
|
10108
10112
|
//# sourceMappingURL=ts-core-angular.mjs.map
|