@ts-core/angular 13.0.4 → 13.0.5
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 +15 -14
- package/directive/ScrollCheckDirective.d.ts +15 -0
- package/directive/ScrollDirective.d.ts +2 -4
- package/esm2020/VICommonModule.mjs +5 -1
- package/esm2020/directive/ScrollCheckDirective.mjs +71 -0
- package/esm2020/directive/ScrollDirective.mjs +5 -15
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/ts-core-angular.mjs +75 -17
- package/fesm2015/ts-core-angular.mjs.map +1 -1
- package/fesm2020/ts-core-angular.mjs +75 -17
- package/fesm2020/ts-core-angular.mjs.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/style/mat/vi-mat.scss +1 -1
|
@@ -4,12 +4,12 @@ import { DestroyableContainer, LoadableEvent, Destroyable, IDestroyable, Loadabl
|
|
|
4
4
|
import { PromiseHandler } from '@ts-core/common/promise';
|
|
5
5
|
import * as _ from 'lodash';
|
|
6
6
|
import { Assets } from '@ts-core/frontend/asset';
|
|
7
|
-
import { takeUntil, filter, map } from 'rxjs/operators';
|
|
7
|
+
import { takeUntil, filter, debounceTime, map } from 'rxjs/operators';
|
|
8
8
|
import moment from 'moment';
|
|
9
9
|
import numeral from 'numeral';
|
|
10
10
|
import { ObservableData } from '@ts-core/common/observer';
|
|
11
11
|
import { DateUtil, ObjectUtil, ArrayUtil } from '@ts-core/common/util';
|
|
12
|
-
import { Subject, takeUntil as takeUntil$1, filter as filter$1, BehaviorSubject, of, merge } from 'rxjs';
|
|
12
|
+
import { Subject, fromEvent, takeUntil as takeUntil$1, filter as filter$1, BehaviorSubject, of, merge } from 'rxjs';
|
|
13
13
|
import * as i1 from '@angular/material/dialog';
|
|
14
14
|
import { MatDialogConfig, MatDialogModule, MatDialog } from '@angular/material/dialog';
|
|
15
15
|
import * as i1$1 from '@ts-core/frontend/language';
|
|
@@ -1995,15 +1995,9 @@ class ScrollDirective extends Destroyable {
|
|
|
1995
1995
|
//
|
|
1996
1996
|
// --------------------------------------------------------------------------
|
|
1997
1997
|
this.scrolled = new EventEmitter();
|
|
1998
|
-
this.delay = 100;
|
|
1999
1998
|
this.isInitialized = false;
|
|
2000
1999
|
this._scrollValue = 0;
|
|
2001
|
-
this.
|
|
2002
|
-
this.scrollChangedHandler();
|
|
2003
|
-
};
|
|
2004
|
-
this.initializeHandler = () => {
|
|
2005
|
-
this.initialize();
|
|
2006
|
-
};
|
|
2000
|
+
this.initializeHandler = () => this.initialize();
|
|
2007
2001
|
this.element = ViewUtil.parseElement(element);
|
|
2008
2002
|
this.timer = setTimeout(this.initializeHandler, ScrollDirective.INITIALIZATION_DELAY);
|
|
2009
2003
|
}
|
|
@@ -2028,11 +2022,9 @@ class ScrollDirective extends Destroyable {
|
|
|
2028
2022
|
//
|
|
2029
2023
|
// --------------------------------------------------------------------------
|
|
2030
2024
|
scrollHandler() {
|
|
2031
|
-
if (
|
|
2032
|
-
|
|
2025
|
+
if (this.isInitialized) {
|
|
2026
|
+
this.scrollChangedHandler();
|
|
2033
2027
|
}
|
|
2034
|
-
clearTimeout(this.timer);
|
|
2035
|
-
this.timer = setTimeout(this.scrollChanged, this.delay);
|
|
2036
2028
|
}
|
|
2037
2029
|
scrollChangedHandler() {
|
|
2038
2030
|
this._scrollValue = this.scrollTop;
|
|
@@ -2087,7 +2079,7 @@ class ScrollDirective extends Destroyable {
|
|
|
2087
2079
|
// --------------------------------------------------------------------------
|
|
2088
2080
|
ScrollDirective.INITIALIZATION_DELAY = 1;
|
|
2089
2081
|
ScrollDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ScrollDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2090
|
-
ScrollDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: ScrollDirective, selector: "[vi-scroll]", inputs: {
|
|
2082
|
+
ScrollDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: ScrollDirective, selector: "[vi-scroll]", inputs: { scrollValue: "scrollValue" }, outputs: { scrolled: "scrolled" }, host: { listeners: { "scroll": "scrollHandler()" } }, usesInheritance: true, ngImport: i0 });
|
|
2091
2083
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ScrollDirective, decorators: [{
|
|
2092
2084
|
type: Directive,
|
|
2093
2085
|
args: [{
|
|
@@ -2095,8 +2087,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
2095
2087
|
}]
|
|
2096
2088
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { scrolled: [{
|
|
2097
2089
|
type: Output
|
|
2098
|
-
}], delay: [{
|
|
2099
|
-
type: Input
|
|
2100
2090
|
}], scrollHandler: [{
|
|
2101
2091
|
type: HostListener,
|
|
2102
2092
|
args: ['scroll']
|
|
@@ -2651,6 +2641,71 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
2651
2641
|
type: Input
|
|
2652
2642
|
}] } });
|
|
2653
2643
|
|
|
2644
|
+
class ScrollCheckDirective extends DestroyableContainer {
|
|
2645
|
+
//--------------------------------------------------------------------------
|
|
2646
|
+
//
|
|
2647
|
+
// Constructor
|
|
2648
|
+
//
|
|
2649
|
+
//--------------------------------------------------------------------------
|
|
2650
|
+
constructor(element) {
|
|
2651
|
+
super();
|
|
2652
|
+
//--------------------------------------------------------------------------
|
|
2653
|
+
//
|
|
2654
|
+
// Properties
|
|
2655
|
+
//
|
|
2656
|
+
//--------------------------------------------------------------------------
|
|
2657
|
+
this.limitExceed = new EventEmitter();
|
|
2658
|
+
this.isExceedLimit = false;
|
|
2659
|
+
this._scrollValue = element.nativeElement.scrollTop;
|
|
2660
|
+
fromEvent(element.nativeElement, 'scroll')
|
|
2661
|
+
.pipe(debounceTime(DateUtil.MILISECONDS_SECOND / 10), takeUntil(this.destroyed))
|
|
2662
|
+
.subscribe(() => {
|
|
2663
|
+
this._scrollValue = element.nativeElement.scrollTop;
|
|
2664
|
+
this.check();
|
|
2665
|
+
});
|
|
2666
|
+
}
|
|
2667
|
+
//--------------------------------------------------------------------------
|
|
2668
|
+
//
|
|
2669
|
+
// Protected Methods
|
|
2670
|
+
//
|
|
2671
|
+
//--------------------------------------------------------------------------
|
|
2672
|
+
check() {
|
|
2673
|
+
let value = this._scrollValue >= this.scrollLimit;
|
|
2674
|
+
if (value !== this.isExceedLimit) {
|
|
2675
|
+
this.isExceedLimit = value;
|
|
2676
|
+
this.limitExceed.emit(this.isExceedLimit);
|
|
2677
|
+
}
|
|
2678
|
+
}
|
|
2679
|
+
//--------------------------------------------------------------------------
|
|
2680
|
+
//
|
|
2681
|
+
// Public Properties
|
|
2682
|
+
//
|
|
2683
|
+
//--------------------------------------------------------------------------
|
|
2684
|
+
set scrollLimit(value) {
|
|
2685
|
+
if (value == this._scrollLimit) {
|
|
2686
|
+
return;
|
|
2687
|
+
}
|
|
2688
|
+
this._scrollLimit = value;
|
|
2689
|
+
this.check();
|
|
2690
|
+
}
|
|
2691
|
+
get scrollLimit() {
|
|
2692
|
+
return this._scrollLimit;
|
|
2693
|
+
}
|
|
2694
|
+
}
|
|
2695
|
+
ScrollCheckDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ScrollCheckDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2696
|
+
ScrollCheckDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: ScrollCheckDirective, selector: "[vi-scroll-check]", inputs: { scrollLimit: ["vi-scroll-check", "scrollLimit"] }, outputs: { limitExceed: "limitExceed" }, usesInheritance: true, ngImport: i0 });
|
|
2697
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ScrollCheckDirective, decorators: [{
|
|
2698
|
+
type: Directive,
|
|
2699
|
+
args: [{
|
|
2700
|
+
selector: '[vi-scroll-check]'
|
|
2701
|
+
}]
|
|
2702
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { limitExceed: [{
|
|
2703
|
+
type: Output
|
|
2704
|
+
}], scrollLimit: [{
|
|
2705
|
+
type: Input,
|
|
2706
|
+
args: ['vi-scroll-check']
|
|
2707
|
+
}] } });
|
|
2708
|
+
|
|
2654
2709
|
class LanguageMatPaginatorIntl extends MatPaginatorIntl {
|
|
2655
2710
|
// --------------------------------------------------------------------------
|
|
2656
2711
|
//
|
|
@@ -6746,6 +6801,7 @@ const DECLARATIONS$1 = [
|
|
|
6746
6801
|
FocusDirective,
|
|
6747
6802
|
ResizeDirective,
|
|
6748
6803
|
ScrollDirective,
|
|
6804
|
+
ScrollCheckDirective,
|
|
6749
6805
|
ClickToCopyDirective,
|
|
6750
6806
|
SelectOnFocusDirective,
|
|
6751
6807
|
ClickToSelectDirective,
|
|
@@ -6794,6 +6850,7 @@ VICommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
6794
6850
|
FocusDirective,
|
|
6795
6851
|
ResizeDirective,
|
|
6796
6852
|
ScrollDirective,
|
|
6853
|
+
ScrollCheckDirective,
|
|
6797
6854
|
ClickToCopyDirective,
|
|
6798
6855
|
SelectOnFocusDirective,
|
|
6799
6856
|
ClickToSelectDirective,
|
|
@@ -6815,6 +6872,7 @@ VICommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
6815
6872
|
FocusDirective,
|
|
6816
6873
|
ResizeDirective,
|
|
6817
6874
|
ScrollDirective,
|
|
6875
|
+
ScrollCheckDirective,
|
|
6818
6876
|
ClickToCopyDirective,
|
|
6819
6877
|
SelectOnFocusDirective,
|
|
6820
6878
|
ClickToSelectDirective,
|
|
@@ -9515,5 +9573,5 @@ class TransportLazyModule {
|
|
|
9515
9573
|
* Generated bundle index. Do not edit.
|
|
9516
9574
|
*/
|
|
9517
9575
|
|
|
9518
|
-
export { APPLICATION_INJECTOR, ApplicationBaseComponent, ApplicationComponent2, AspectRatioResizeDirective, AssetBackgroundDirective, AssetBackgroundPipe, AssetFilePipe, AssetIconPipe, AssetImagePipe, AssetModule, AssetSoundPipe, AssetVideoPipe, AutoScrollBottomDirective, BootstrapBreakpoint, BootstrapBreakpointService, BootstrapBreakpointServiceEvent, BottomSheetService, COOKIE_OPTIONS, CamelCasePipe, CanDeactivateGuard, CdkTableBaseComponent, CdkTableCellClassNamePipe, CdkTableColumnClassNamePipe, CdkTableColumnStyleNamePipe, CdkTableColumnValuePipe, CdkTableDataSource, CdkTableFilterableComponent, CdkTableFilterableMapCollection, CdkTablePaginableBookmarkMapCollection, CdkTablePaginableComponent, CdkTablePaginableMapCollection, CdkTableRowClassNamePipe, CdkTableRowStyleNamePipe, ClickToCopyDirective, ClickToSelectDirective, CookieModule, CookieOptions, CookieService, Direction, FinancePipe, FocusDirective, FocusManager, FormElementAsync, FormElementSync, HTMLContentTitleDirective, 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, LoginRedirectResolver, LoginRequireResolver, LoginResolver, MenuItem, MenuItemBase, MenuItems, MenuListComponent, 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, 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, WindowConfig, WindowDragAreaDirective, WindowEvent, WindowFactory, WindowImpl, WindowMinimizeElementComponent, WindowModule, WindowQuestionBaseComponent, WindowQuestionComponent, WindowResizeElementComponent, WindowService, WindowServiceEvent, cookieServiceFactory, languageServiceFactory, loggerServiceFactory, notificationServiceFactory, themeAssetServiceFactory, themeServiceFactory, windowServiceFactory };
|
|
9576
|
+
export { APPLICATION_INJECTOR, ApplicationBaseComponent, ApplicationComponent2, AspectRatioResizeDirective, AssetBackgroundDirective, AssetBackgroundPipe, AssetFilePipe, AssetIconPipe, AssetImagePipe, AssetModule, AssetSoundPipe, AssetVideoPipe, AutoScrollBottomDirective, BootstrapBreakpoint, BootstrapBreakpointService, BootstrapBreakpointServiceEvent, BottomSheetService, COOKIE_OPTIONS, CamelCasePipe, CanDeactivateGuard, CdkTableBaseComponent, CdkTableCellClassNamePipe, CdkTableColumnClassNamePipe, CdkTableColumnStyleNamePipe, CdkTableColumnValuePipe, CdkTableDataSource, CdkTableFilterableComponent, CdkTableFilterableMapCollection, CdkTablePaginableBookmarkMapCollection, CdkTablePaginableComponent, CdkTablePaginableMapCollection, CdkTableRowClassNamePipe, CdkTableRowStyleNamePipe, ClickToCopyDirective, ClickToSelectDirective, CookieModule, CookieOptions, CookieService, Direction, FinancePipe, FocusDirective, FocusManager, FormElementAsync, FormElementSync, HTMLContentTitleDirective, 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, LoginRedirectResolver, LoginRequireResolver, LoginResolver, MenuItem, MenuItemBase, MenuItems, MenuListComponent, 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, WindowConfig, WindowDragAreaDirective, WindowEvent, WindowFactory, WindowImpl, WindowMinimizeElementComponent, WindowModule, WindowQuestionBaseComponent, WindowQuestionComponent, WindowResizeElementComponent, WindowService, WindowServiceEvent, cookieServiceFactory, languageServiceFactory, loggerServiceFactory, notificationServiceFactory, themeAssetServiceFactory, themeServiceFactory, windowServiceFactory };
|
|
9519
9577
|
//# sourceMappingURL=ts-core-angular.mjs.map
|