@ts-core/angular 15.0.1 → 15.0.2
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/bottomSheet/BottomSheetImpl.d.ts +0 -11
- package/bottomSheet/component/BottomSheetBaseComponent.d.ts +0 -5
- package/component/tab-group/tab-group.component.d.ts +4 -2
- package/directive/ResizeDirective.d.ts +2 -2
- package/directive/SelectOnFocusDirective.d.ts +1 -1
- package/esm2020/bottomSheet/BottomSheetImpl.mjs +2 -47
- package/esm2020/bottomSheet/BottomSheetService.mjs +2 -2
- package/esm2020/bottomSheet/component/BottomSheetBaseComponent.mjs +1 -16
- package/esm2020/component/tab-group/tab-group.component.mjs +15 -4
- package/esm2020/directive/AutoScrollBottomDirective.mjs +2 -2
- package/esm2020/directive/MenuTriggerForDirective.mjs +5 -3
- package/esm2020/directive/ResizeDirective.mjs +5 -5
- package/esm2020/directive/SelectOnFocusDirective.mjs +2 -2
- package/esm2020/language/LanguageMatPaginatorIntl.mjs +5 -7
- package/esm2020/manager/ResizeManager.mjs +3 -11
- package/esm2020/notification/NotificationService.mjs +2 -2
- package/esm2020/theme/ThemeStyleDirective.mjs +2 -2
- package/esm2020/util/ViewUtil.mjs +1 -1
- package/esm2020/window/IWindow.mjs +2 -1
- package/esm2020/window/WindowImpl.mjs +10 -17
- package/esm2020/window/WindowService.mjs +2 -2
- package/fesm2015/ts-core-angular.mjs +867 -931
- package/fesm2015/ts-core-angular.mjs.map +1 -1
- package/fesm2020/ts-core-angular.mjs +867 -931
- package/fesm2020/ts-core-angular.mjs.map +1 -1
- package/htdocs/common.js +3 -3
- package/manager/ResizeManager.d.ts +1 -1
- package/package.json +1 -2
- package/style/_filter.scss +14 -0
- package/style/_mouse.scss +27 -0
- package/style/_scroll.scss +20 -0
- package/style/_text.scss +12 -0
- package/style/mat/_core.scss +317 -0
- package/style/mat/_index.scss +169 -0
- package/style/mat/_variables.scss +1 -0
- package/style/mat/bootstrap/_background.scss +22 -4
- package/style/mat/bootstrap/_border.scss +67 -72
- package/style/mat/bootstrap/_index.scss +27 -0
- package/style/mat/bootstrap/_text.scss +28 -24
- package/style/mat/helper/_theme.scss +96 -0
- package/style/mat/helper/_typography.scss +15 -0
- package/window/IWindow.d.ts +1 -0
- package/window/WindowImpl.d.ts +1 -2
- package/style/mat/bootstrap/_variables.scss +0 -8
- package/style/mat/vi-mat-bootstrap.scss +0 -50
- package/style/mat/vi-mat.scss +0 -570
- package/style/mixin.scss +0 -69
- package/style/mouse.scss +0 -47
|
@@ -358,6 +358,7 @@ var WindowEvent;
|
|
|
358
358
|
WindowEvent["RESIZED"] = "RESIZED";
|
|
359
359
|
WindowEvent["DISABLED_CHANGED"] = "DISABLED_CHANGED";
|
|
360
360
|
WindowEvent["MINIMIZED_CHANGED"] = "MINIMIZED_CHANGED";
|
|
361
|
+
WindowEvent["IS_ON_TOP_CHANGED"] = "IS_ON_TOP_CHANGED";
|
|
361
362
|
WindowEvent["EXPAND"] = "EXPAND";
|
|
362
363
|
WindowEvent["SET_ON_TOP"] = "SET_ON_TOP";
|
|
363
364
|
})(WindowEvent || (WindowEvent = {}));
|
|
@@ -1224,7 +1225,7 @@ class NotificationService {
|
|
|
1224
1225
|
}
|
|
1225
1226
|
this.setDefaultProperties(config);
|
|
1226
1227
|
let reference = this.dialog.open(component, config);
|
|
1227
|
-
notification = this.factory.create({ config, reference, overlay: reference.
|
|
1228
|
+
notification = this.factory.create({ config, reference, overlay: reference['_ref'].overlayRef });
|
|
1228
1229
|
let subscription = notification.events.subscribe(event => {
|
|
1229
1230
|
switch (event) {
|
|
1230
1231
|
case WindowEvent.OPENED:
|
|
@@ -1951,7 +1952,7 @@ class ResizeManager {
|
|
|
1951
1952
|
// Event Handlers
|
|
1952
1953
|
//
|
|
1953
1954
|
// --------------------------------------------------------------------------
|
|
1954
|
-
this.
|
|
1955
|
+
this.handlerItem = (item) => {
|
|
1955
1956
|
if (!ResizeManager.isSizeValid(item)) {
|
|
1956
1957
|
return;
|
|
1957
1958
|
}
|
|
@@ -1963,12 +1964,11 @@ class ResizeManager {
|
|
|
1963
1964
|
};
|
|
1964
1965
|
this.handler2 = (items) => {
|
|
1965
1966
|
if (!_.isEmpty(items)) {
|
|
1966
|
-
this.
|
|
1967
|
+
this.handlerItem(items[0].contentRect);
|
|
1967
1968
|
}
|
|
1968
1969
|
};
|
|
1969
1970
|
this.element = ViewUtil.parseElement(element);
|
|
1970
1971
|
this.subject = new BehaviorSubject({ width: ViewUtil.getWidth(this.element), height: ViewUtil.getHeight(this.element) });
|
|
1971
|
-
// this.sensor = new ResizeSensor(this.element, this.handler);
|
|
1972
1972
|
// Could be undefined in ssr
|
|
1973
1973
|
try {
|
|
1974
1974
|
this.sensor = new ResizeObserver(this.handler2);
|
|
@@ -2008,13 +2008,6 @@ class ResizeManager {
|
|
|
2008
2008
|
this.sensor.unobserve(this.element);
|
|
2009
2009
|
this.sensor.disconnect();
|
|
2010
2010
|
this.sensor = null;
|
|
2011
|
-
/*
|
|
2012
|
-
this.sensor.detach(this.handler);
|
|
2013
|
-
try {
|
|
2014
|
-
this.sensor.reset();
|
|
2015
|
-
} catch (error) {}
|
|
2016
|
-
this.sensor = null;
|
|
2017
|
-
*/
|
|
2018
2011
|
}
|
|
2019
2012
|
if (!_.isNil(this.subject)) {
|
|
2020
2013
|
this.subject.complete();
|
|
@@ -2365,7 +2358,7 @@ class AutoScrollBottomDirective extends InfiniteScrollDirective {
|
|
|
2365
2358
|
//
|
|
2366
2359
|
// --------------------------------------------------------------------------
|
|
2367
2360
|
initialize() {
|
|
2368
|
-
if (
|
|
2361
|
+
if (this._scrollValue) {
|
|
2369
2362
|
this._scrollValue = this.scrollHeight;
|
|
2370
2363
|
}
|
|
2371
2364
|
super.initialize();
|
|
@@ -2642,7 +2635,7 @@ class SelectOnFocusDirective extends Destroyable {
|
|
|
2642
2635
|
//
|
|
2643
2636
|
// --------------------------------------------------------------------------
|
|
2644
2637
|
focusHandler() {
|
|
2645
|
-
ViewUtil.selectContent(this.element
|
|
2638
|
+
ViewUtil.selectContent(this.element);
|
|
2646
2639
|
}
|
|
2647
2640
|
// --------------------------------------------------------------------------
|
|
2648
2641
|
//
|
|
@@ -2875,7 +2868,7 @@ class ResizeDirective extends Destroyable {
|
|
|
2875
2868
|
// Properties
|
|
2876
2869
|
//
|
|
2877
2870
|
// --------------------------------------------------------------------------
|
|
2878
|
-
this.
|
|
2871
|
+
this.resized = new EventEmitter();
|
|
2879
2872
|
this.isTop = false;
|
|
2880
2873
|
this.isLeft = false;
|
|
2881
2874
|
this.isRight = false;
|
|
@@ -2887,7 +2880,7 @@ class ResizeDirective extends Destroyable {
|
|
|
2887
2880
|
// --------------------------------------------------------------------------
|
|
2888
2881
|
this.resizeHandler = (event) => {
|
|
2889
2882
|
if (event.dx !== 0 || event.dy !== 0) {
|
|
2890
|
-
this.
|
|
2883
|
+
this.resized.emit(event);
|
|
2891
2884
|
}
|
|
2892
2885
|
};
|
|
2893
2886
|
this.interactable = interact.default(ViewUtil.parseElement(element));
|
|
@@ -2917,13 +2910,13 @@ class ResizeDirective extends Destroyable {
|
|
|
2917
2910
|
}
|
|
2918
2911
|
}
|
|
2919
2912
|
ResizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ResizeDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2920
|
-
ResizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ResizeDirective, selector: "[vi-resize]", inputs: { isTop: "isTop", isLeft: "isLeft", isRight: "isRight", isBottom: "isBottom" }, outputs: {
|
|
2913
|
+
ResizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ResizeDirective, selector: "[vi-resize]", inputs: { isTop: "isTop", isLeft: "isLeft", isRight: "isRight", isBottom: "isBottom" }, outputs: { resized: "resized" }, usesInheritance: true, ngImport: i0 });
|
|
2921
2914
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ResizeDirective, decorators: [{
|
|
2922
2915
|
type: Directive,
|
|
2923
2916
|
args: [{
|
|
2924
2917
|
selector: '[vi-resize]'
|
|
2925
2918
|
}]
|
|
2926
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: {
|
|
2919
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { resized: [{
|
|
2927
2920
|
type: Output
|
|
2928
2921
|
}], isTop: [{
|
|
2929
2922
|
type: Input
|
|
@@ -3032,6 +3025,55 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
3032
3025
|
args: ['vi-scroll-check']
|
|
3033
3026
|
}] } });
|
|
3034
3027
|
|
|
3028
|
+
class FinancePipe {
|
|
3029
|
+
// --------------------------------------------------------------------------
|
|
3030
|
+
//
|
|
3031
|
+
// Static Methods
|
|
3032
|
+
//
|
|
3033
|
+
// --------------------------------------------------------------------------
|
|
3034
|
+
static format(value, format) {
|
|
3035
|
+
value = Number(value);
|
|
3036
|
+
try {
|
|
3037
|
+
return numeral(value).format(format);
|
|
3038
|
+
}
|
|
3039
|
+
catch (error) {
|
|
3040
|
+
return value.toString();
|
|
3041
|
+
}
|
|
3042
|
+
}
|
|
3043
|
+
// --------------------------------------------------------------------------
|
|
3044
|
+
//
|
|
3045
|
+
// Public Methods
|
|
3046
|
+
//
|
|
3047
|
+
// --------------------------------------------------------------------------
|
|
3048
|
+
transform(value, format, isNeedPlus = false) {
|
|
3049
|
+
value = Number(value);
|
|
3050
|
+
if (_.isNaN(value)) {
|
|
3051
|
+
return '---';
|
|
3052
|
+
}
|
|
3053
|
+
if (_.isNil(format)) {
|
|
3054
|
+
format = FinancePipe.DEFAULT_FORMAT;
|
|
3055
|
+
}
|
|
3056
|
+
if (isNeedPlus) {
|
|
3057
|
+
format = '+' + format;
|
|
3058
|
+
}
|
|
3059
|
+
return FinancePipe.format(value, format);
|
|
3060
|
+
}
|
|
3061
|
+
}
|
|
3062
|
+
// --------------------------------------------------------------------------
|
|
3063
|
+
//
|
|
3064
|
+
// Static Properties
|
|
3065
|
+
//
|
|
3066
|
+
// --------------------------------------------------------------------------
|
|
3067
|
+
FinancePipe.DEFAULT_FORMAT = '0,0';
|
|
3068
|
+
FinancePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: FinancePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3069
|
+
FinancePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: FinancePipe, name: "viFinance" });
|
|
3070
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: FinancePipe, decorators: [{
|
|
3071
|
+
type: Pipe,
|
|
3072
|
+
args: [{
|
|
3073
|
+
name: 'viFinance'
|
|
3074
|
+
}]
|
|
3075
|
+
}] });
|
|
3076
|
+
|
|
3035
3077
|
class LanguageMatPaginatorIntl extends MatPaginatorIntl {
|
|
3036
3078
|
// --------------------------------------------------------------------------
|
|
3037
3079
|
//
|
|
@@ -3043,16 +3085,13 @@ class LanguageMatPaginatorIntl extends MatPaginatorIntl {
|
|
|
3043
3085
|
this.language = language;
|
|
3044
3086
|
this.languageRangeLabel = (page, pageSize, length) => {
|
|
3045
3087
|
let translation = { current: '0', total: '0' };
|
|
3046
|
-
if (length
|
|
3047
|
-
translation.total = length.toString();
|
|
3048
|
-
}
|
|
3049
|
-
else {
|
|
3088
|
+
if (length > 0 && pageSize > 0) {
|
|
3050
3089
|
length = Math.max(length, 0);
|
|
3051
3090
|
let startIndex = page * pageSize;
|
|
3052
3091
|
let endIndex = startIndex < length ? Math.min(startIndex + pageSize, length) : startIndex + pageSize;
|
|
3053
3092
|
translation.current = `${startIndex + 1} – ${endIndex}`;
|
|
3054
|
-
translation.total = length.toString();
|
|
3055
3093
|
}
|
|
3094
|
+
translation.total = FinancePipe.format(length, FinancePipe.DEFAULT_FORMAT);
|
|
3056
3095
|
return this.language.translate('paginator.pageRange', translation);
|
|
3057
3096
|
};
|
|
3058
3097
|
this.commitLanguageProperties();
|
|
@@ -3064,12 +3103,12 @@ class LanguageMatPaginatorIntl extends MatPaginatorIntl {
|
|
|
3064
3103
|
//
|
|
3065
3104
|
// --------------------------------------------------------------------------
|
|
3066
3105
|
commitLanguageProperties() {
|
|
3106
|
+
this.getRangeLabel = this.languageRangeLabel;
|
|
3067
3107
|
this.lastPageLabel = this.language.translate('paginator.lastPage');
|
|
3068
3108
|
this.nextPageLabel = this.language.translate('paginator.nextPage');
|
|
3069
3109
|
this.firstPageLabel = this.language.translate('paginator.firstPage');
|
|
3070
3110
|
this.previousPageLabel = this.language.translate('paginator.previousPage');
|
|
3071
3111
|
this.itemsPerPageLabel = this.language.translate('paginator.itemsPerPage');
|
|
3072
|
-
this.getRangeLabel = this.languageRangeLabel;
|
|
3073
3112
|
}
|
|
3074
3113
|
// --------------------------------------------------------------------------
|
|
3075
3114
|
//
|
|
@@ -3717,1098 +3756,1047 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
3717
3756
|
args: [{ template: "<p class=\"text m-4 text-center mouse-inactive text-word-wrap-break-word\" [innerHTML]=\"text\"></p>\n\n<div class=\"text-center border-sm-top p-3\">\n\n <button (click)=\"data?.closeClickHandler()\" mat-stroked-button *ngIf=\"data?.isInfo\">\n <span [innerHTML]=\"data?.closeText\"></span>\n </button>\n\n <button class=\"mr-3 me-3\" (click)=\"data?.yesClickHandler()\" color=\"primary\" mat-stroked-button *ngIf=\"data?.isQuestion\">\n <span [innerHTML]=\"data?.yesText\"></span>\n </button>\n\n <button (click)=\"data?.notClickHandler()\" mat-stroked-button *ngIf=\"data?.isQuestion\">\n <span [innerHTML]=\"data?.notText\"></span>\n </button>\n\n</div>" }]
|
|
3718
3757
|
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i1$1.LanguageService }]; } });
|
|
3719
3758
|
|
|
3720
|
-
class
|
|
3759
|
+
class BottomSheetImpl extends DestroyableContainer {
|
|
3721
3760
|
// --------------------------------------------------------------------------
|
|
3722
3761
|
//
|
|
3723
|
-
//
|
|
3762
|
+
// Constructor
|
|
3724
3763
|
//
|
|
3725
3764
|
// --------------------------------------------------------------------------
|
|
3726
|
-
constructor() {
|
|
3765
|
+
constructor(properties) {
|
|
3727
3766
|
super();
|
|
3767
|
+
this._isDisabled = false;
|
|
3728
3768
|
// --------------------------------------------------------------------------
|
|
3729
3769
|
//
|
|
3730
|
-
//
|
|
3770
|
+
// Protected Methods
|
|
3731
3771
|
//
|
|
3732
3772
|
// --------------------------------------------------------------------------
|
|
3733
|
-
this.
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
this.
|
|
3773
|
+
this.setClosed = () => {
|
|
3774
|
+
this.emit(WindowEvent.CLOSED);
|
|
3775
|
+
this.destroy();
|
|
3776
|
+
};
|
|
3777
|
+
this.setOpened = () => {
|
|
3778
|
+
this.emit(WindowEvent.OPENED);
|
|
3779
|
+
};
|
|
3780
|
+
this.mouseDownHandlerProxy = (event) => {
|
|
3781
|
+
this.mouseDownHandler(event);
|
|
3782
|
+
};
|
|
3783
|
+
this.mouseClickHandlerProxy = (event) => {
|
|
3784
|
+
this.mouseClickHandler(event);
|
|
3785
|
+
};
|
|
3786
|
+
this.observer = new Subject();
|
|
3787
|
+
this.properties = properties;
|
|
3788
|
+
this.content.window = this;
|
|
3789
|
+
// Have to save for unsubscribe on destroy
|
|
3790
|
+
this._wrapper = this.properties.overlay.hostElement;
|
|
3791
|
+
this._backdrop = this.properties.overlay.backdropElement;
|
|
3792
|
+
this._container = this.properties.overlay.overlayElement;
|
|
3793
|
+
this.setProperties();
|
|
3794
|
+
this.elementsCreate();
|
|
3795
|
+
this.getReference().afterOpened().pipe(takeUntil(this.destroyed)).subscribe(this.setOpened);
|
|
3796
|
+
this.getReference().afterDismissed().pipe(takeUntil(this.destroyed)).subscribe(this.setClosed);
|
|
3797
|
+
}
|
|
3798
|
+
// --------------------------------------------------------------------------
|
|
3799
|
+
//
|
|
3800
|
+
// Elements Methods
|
|
3801
|
+
//
|
|
3802
|
+
// --------------------------------------------------------------------------
|
|
3803
|
+
elementsCreate() {
|
|
3804
|
+
this.elements = new Array();
|
|
3805
|
+
}
|
|
3806
|
+
elementsDestroy() {
|
|
3807
|
+
this.elements.forEach(item => this.elementDestroy(item));
|
|
3808
|
+
this.elements = null;
|
|
3809
|
+
}
|
|
3810
|
+
elementAdd(item) {
|
|
3811
|
+
this.elements.push(item);
|
|
3812
|
+
item.instance.window = this;
|
|
3813
|
+
return item;
|
|
3814
|
+
}
|
|
3815
|
+
elementRemove(item) {
|
|
3816
|
+
ArrayUtil.remove(this.elements, item);
|
|
3817
|
+
this.elementDestroy(item);
|
|
3818
|
+
return item;
|
|
3819
|
+
}
|
|
3820
|
+
elementDestroy(item) {
|
|
3821
|
+
item.instance.window = null;
|
|
3822
|
+
item.destroy();
|
|
3823
|
+
return item;
|
|
3738
3824
|
}
|
|
3739
3825
|
setProperties() {
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3826
|
+
ViewUtil.addClass(this.container, 'vi-bottom-sheet');
|
|
3827
|
+
ViewUtil.toggleClass(this.container, 'vi-modal', this.config.isModal);
|
|
3828
|
+
this.container.addEventListener('click', this.mouseClickHandlerProxy, true);
|
|
3829
|
+
this.container.addEventListener('mousedown', this.mouseDownHandlerProxy);
|
|
3830
|
+
/*
|
|
3831
|
+
if (!this.config.isModal) {
|
|
3832
|
+
this.container.addEventListener('mousedown', this.mouseDownHandlerProxy);
|
|
3746
3833
|
}
|
|
3834
|
+
*/
|
|
3747
3835
|
}
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
case WindowAlign.START:
|
|
3752
|
-
this.x = !_.isNaN(this.paddingLeft) ? this.paddingLeft : 0;
|
|
3753
|
-
break;
|
|
3754
|
-
case WindowAlign.END:
|
|
3755
|
-
let value = ViewUtil.getStageWidth() - this.calculateWidth();
|
|
3756
|
-
if (!_.isNaN(this.paddingRight)) {
|
|
3757
|
-
value -= this.paddingRight;
|
|
3758
|
-
}
|
|
3759
|
-
this.x = value;
|
|
3760
|
-
break;
|
|
3761
|
-
default:
|
|
3762
|
-
this.x = (ViewUtil.getStageWidth() - this.calculateWidth()) / 2;
|
|
3763
|
-
break;
|
|
3764
|
-
}
|
|
3765
|
-
switch (config.verticalAlign) {
|
|
3766
|
-
case WindowAlign.START:
|
|
3767
|
-
this.y = !_.isNaN(this.paddingTop) ? this.paddingTop : 0;
|
|
3768
|
-
break;
|
|
3769
|
-
case WindowAlign.END:
|
|
3770
|
-
let value = ViewUtil.getStageHeight() - this.calculateHeight();
|
|
3771
|
-
if (!_.isNaN(this.paddingBottom)) {
|
|
3772
|
-
value -= this.paddingBottom;
|
|
3773
|
-
}
|
|
3774
|
-
this.y = value;
|
|
3775
|
-
break;
|
|
3776
|
-
default:
|
|
3777
|
-
this.y = (ViewUtil.getStageHeight() - this.calculateHeight()) / 2;
|
|
3778
|
-
break;
|
|
3779
|
-
}
|
|
3836
|
+
commitIsDisabledProperties() { }
|
|
3837
|
+
getConfig() {
|
|
3838
|
+
return this.properties.config;
|
|
3780
3839
|
}
|
|
3781
|
-
|
|
3782
|
-
this.
|
|
3783
|
-
this._y = NaN;
|
|
3784
|
-
this._width = NaN;
|
|
3785
|
-
this._height = NaN;
|
|
3840
|
+
getContainer() {
|
|
3841
|
+
return this.container;
|
|
3786
3842
|
}
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
let height = !_.isNaN(this.height) ? this.height + 'px' : 'auto';
|
|
3790
|
-
this.getReference().updateSize(width, height);
|
|
3843
|
+
getReference() {
|
|
3844
|
+
return this.properties.reference;
|
|
3791
3845
|
}
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
let position = {};
|
|
3797
|
-
if (!_.isNaN(this._y)) {
|
|
3798
|
-
position.top = this._y + 'px';
|
|
3799
|
-
}
|
|
3800
|
-
if (!_.isNaN(this._x)) {
|
|
3801
|
-
position.left = this._x + 'px';
|
|
3846
|
+
isNeedClickStopPropagation(event) {
|
|
3847
|
+
let element = _.find(this.elements, item => item.location.nativeElement === event.target);
|
|
3848
|
+
if (_.isNil(element)) {
|
|
3849
|
+
return false;
|
|
3802
3850
|
}
|
|
3803
|
-
|
|
3851
|
+
element.instance.clickHandler(event);
|
|
3852
|
+
return true;
|
|
3804
3853
|
}
|
|
3805
3854
|
// --------------------------------------------------------------------------
|
|
3806
3855
|
//
|
|
3807
|
-
//
|
|
3856
|
+
// Event Handlers
|
|
3808
3857
|
//
|
|
3809
3858
|
// --------------------------------------------------------------------------
|
|
3810
|
-
|
|
3811
|
-
|
|
3859
|
+
mouseDownHandler(event) {
|
|
3860
|
+
this.setOnTop();
|
|
3812
3861
|
}
|
|
3813
|
-
|
|
3814
|
-
|
|
3862
|
+
mouseClickHandler(event) {
|
|
3863
|
+
if (this.isNeedClickStopPropagation(event)) {
|
|
3864
|
+
event.stopPropagation();
|
|
3865
|
+
}
|
|
3815
3866
|
}
|
|
3816
3867
|
// --------------------------------------------------------------------------
|
|
3817
3868
|
//
|
|
3818
|
-
//
|
|
3869
|
+
// Public Methods
|
|
3819
3870
|
//
|
|
3820
3871
|
// --------------------------------------------------------------------------
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
}
|
|
3824
|
-
set width(value) {
|
|
3825
|
-
value = this.getConfig().parseWidth(value);
|
|
3826
|
-
if (value === this._width) {
|
|
3827
|
-
return;
|
|
3828
|
-
}
|
|
3829
|
-
this._width = value;
|
|
3830
|
-
this.commitSizeProperties();
|
|
3872
|
+
emit(event) {
|
|
3873
|
+
this.observer.next(event);
|
|
3831
3874
|
}
|
|
3832
|
-
|
|
3833
|
-
|
|
3875
|
+
close() {
|
|
3876
|
+
this.getReference().dismiss();
|
|
3834
3877
|
}
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
if (value === this._height) {
|
|
3878
|
+
destroy() {
|
|
3879
|
+
if (this.isDestroyed) {
|
|
3838
3880
|
return;
|
|
3839
3881
|
}
|
|
3840
|
-
|
|
3841
|
-
this.
|
|
3882
|
+
super.destroy();
|
|
3883
|
+
this.elementsDestroy();
|
|
3884
|
+
this._container.removeEventListener('click', this.mouseClickHandlerProxy, true);
|
|
3885
|
+
this._container.removeEventListener('mousedown', this.mouseDownHandlerProxy);
|
|
3886
|
+
if (!_.isNil(this.content)) {
|
|
3887
|
+
this.content.destroy();
|
|
3888
|
+
}
|
|
3889
|
+
if (!_.isNil(this.observer)) {
|
|
3890
|
+
this.observer.complete();
|
|
3891
|
+
this.observer = null;
|
|
3892
|
+
}
|
|
3893
|
+
this.properties = null;
|
|
3894
|
+
this._wrapper = null;
|
|
3895
|
+
this._backdrop = null;
|
|
3896
|
+
this._container = null;
|
|
3842
3897
|
}
|
|
3898
|
+
blink() { }
|
|
3899
|
+
shake() { }
|
|
3900
|
+
setOnTop() { }
|
|
3843
3901
|
// --------------------------------------------------------------------------
|
|
3844
3902
|
//
|
|
3845
|
-
//
|
|
3903
|
+
// Size Methods
|
|
3846
3904
|
//
|
|
3847
3905
|
// --------------------------------------------------------------------------
|
|
3848
|
-
|
|
3849
|
-
return
|
|
3850
|
-
}
|
|
3851
|
-
set x(value) {
|
|
3852
|
-
value = this.getConfig().parseX(value);
|
|
3853
|
-
if (value === this._x) {
|
|
3854
|
-
return;
|
|
3855
|
-
}
|
|
3856
|
-
this._x = value;
|
|
3857
|
-
this.commitPositionProperties();
|
|
3858
|
-
}
|
|
3859
|
-
get y() {
|
|
3860
|
-
return this._y;
|
|
3861
|
-
}
|
|
3862
|
-
set y(value) {
|
|
3863
|
-
value = this.getConfig().parseY(value);
|
|
3864
|
-
if (value === this._y) {
|
|
3865
|
-
return;
|
|
3866
|
-
}
|
|
3867
|
-
this._y = value;
|
|
3868
|
-
this.commitPositionProperties();
|
|
3869
|
-
}
|
|
3870
|
-
get paddingTop() {
|
|
3871
|
-
return this.getConfig().paddingTop;
|
|
3906
|
+
getWidth() {
|
|
3907
|
+
return NaN;
|
|
3872
3908
|
}
|
|
3873
|
-
|
|
3874
|
-
return
|
|
3909
|
+
getHeight() {
|
|
3910
|
+
return NaN;
|
|
3875
3911
|
}
|
|
3876
|
-
|
|
3877
|
-
|
|
3912
|
+
setWidth(value, isNeedNotify = true) { }
|
|
3913
|
+
setHeight(value, isNeedNotify = true) { }
|
|
3914
|
+
setSize(width, height) { }
|
|
3915
|
+
// --------------------------------------------------------------------------
|
|
3916
|
+
//
|
|
3917
|
+
// Move Methods
|
|
3918
|
+
//
|
|
3919
|
+
// --------------------------------------------------------------------------
|
|
3920
|
+
getX() {
|
|
3921
|
+
return NaN;
|
|
3878
3922
|
}
|
|
3879
|
-
|
|
3880
|
-
|
|
3923
|
+
setX(value, isNeedNotify = true) { }
|
|
3924
|
+
getY() {
|
|
3925
|
+
return NaN;
|
|
3881
3926
|
}
|
|
3882
|
-
}
|
|
3883
|
-
|
|
3884
|
-
class WindowImpl extends WindowBase {
|
|
3927
|
+
setY(value, isNeedNotify = true) { }
|
|
3928
|
+
move(x, y) { }
|
|
3885
3929
|
// --------------------------------------------------------------------------
|
|
3886
3930
|
//
|
|
3887
|
-
//
|
|
3931
|
+
// Private Properties
|
|
3888
3932
|
//
|
|
3889
3933
|
// --------------------------------------------------------------------------
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
// --------------------------------------------------------------------------
|
|
3893
|
-
//
|
|
3894
|
-
// Properties
|
|
3895
|
-
//
|
|
3896
|
-
// --------------------------------------------------------------------------
|
|
3897
|
-
this._isBlink = false;
|
|
3898
|
-
this._isShaking = false;
|
|
3899
|
-
this._isOnTop = false;
|
|
3900
|
-
this._isDisabled = false;
|
|
3901
|
-
this._isMinimized = false;
|
|
3902
|
-
this.isOpened = false;
|
|
3903
|
-
this.isWasOnTop = false;
|
|
3904
|
-
// --------------------------------------------------------------------------
|
|
3905
|
-
//
|
|
3906
|
-
// Protected Methods
|
|
3907
|
-
//
|
|
3908
|
-
// --------------------------------------------------------------------------
|
|
3909
|
-
this.setClosed = () => {
|
|
3910
|
-
this.isOpened = false;
|
|
3911
|
-
this.emit(WindowEvent.CLOSED);
|
|
3912
|
-
this.destroy();
|
|
3913
|
-
};
|
|
3914
|
-
this.setOpened = () => {
|
|
3915
|
-
this.isOpened = true;
|
|
3916
|
-
this.emit(WindowEvent.OPENED);
|
|
3917
|
-
};
|
|
3918
|
-
this.blinkToggle = () => {
|
|
3919
|
-
this.isBlink = !this.isBlink;
|
|
3920
|
-
};
|
|
3921
|
-
this.stopShaking = () => {
|
|
3922
|
-
this.isShaking = false;
|
|
3923
|
-
};
|
|
3924
|
-
this.emitResize = () => {
|
|
3925
|
-
this.emit(WindowEvent.RESIZED);
|
|
3926
|
-
};
|
|
3927
|
-
this.resizeHandler = () => {
|
|
3928
|
-
if (!this.isOpened) {
|
|
3929
|
-
return;
|
|
3930
|
-
}
|
|
3931
|
-
clearTimeout(this.resizeTimer);
|
|
3932
|
-
this.resizeTimer = setTimeout(this.emitResize, WindowImpl.RESIZE_DELAY);
|
|
3933
|
-
};
|
|
3934
|
-
this.mouseDownHandlerProxy = (event) => {
|
|
3935
|
-
this.mouseDownHandler(event);
|
|
3936
|
-
};
|
|
3937
|
-
this.mouseClickHandlerProxy = (event) => {
|
|
3938
|
-
this.mouseClickHandler(event);
|
|
3939
|
-
};
|
|
3940
|
-
this.observer = new Subject();
|
|
3941
|
-
this.elements = new Array();
|
|
3942
|
-
this.properties = properties;
|
|
3943
|
-
this.content.window = this;
|
|
3944
|
-
// Have to save for unsubscribe on destroy
|
|
3945
|
-
this._wrapper = this.properties.overlay.hostElement;
|
|
3946
|
-
this._backdrop = this.properties.overlay.backdropElement;
|
|
3947
|
-
this._container = this.properties.overlay.overlayElement;
|
|
3948
|
-
this.setProperties();
|
|
3949
|
-
this.getReference().afterOpened().pipe(takeUntil(this.destroyed)).subscribe(this.setOpened);
|
|
3950
|
-
this.getReference().afterClosed().pipe(takeUntil(this.destroyed)).subscribe(this.setClosed);
|
|
3951
|
-
this.events
|
|
3952
|
-
.pipe(filter(event => event === WindowEvent.CONTENT_READY), takeUntil(this.destroyed))
|
|
3953
|
-
.subscribe(this.updatePosition);
|
|
3934
|
+
get reference() {
|
|
3935
|
+
return this.properties.reference;
|
|
3954
3936
|
}
|
|
3955
3937
|
// --------------------------------------------------------------------------
|
|
3956
3938
|
//
|
|
3957
|
-
//
|
|
3939
|
+
// Public Properties
|
|
3958
3940
|
//
|
|
3959
3941
|
// --------------------------------------------------------------------------
|
|
3960
|
-
|
|
3961
|
-
this.
|
|
3962
|
-
}
|
|
3963
|
-
elementsDestroy() {
|
|
3964
|
-
this.elements.forEach(item => this.elementDestroy(item));
|
|
3965
|
-
this.elements = null;
|
|
3942
|
+
get events() {
|
|
3943
|
+
return this.observer.asObservable();
|
|
3966
3944
|
}
|
|
3967
|
-
|
|
3968
|
-
this.
|
|
3969
|
-
item.instance.window = this;
|
|
3970
|
-
return item;
|
|
3945
|
+
get config() {
|
|
3946
|
+
return this.properties.config;
|
|
3971
3947
|
}
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
this.elementDestroy(item);
|
|
3975
|
-
return item;
|
|
3948
|
+
get content() {
|
|
3949
|
+
return !_.isNil(this.reference) ? this.reference.instance : null;
|
|
3976
3950
|
}
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
item.destroy();
|
|
3980
|
-
return item;
|
|
3951
|
+
get container() {
|
|
3952
|
+
return this._container;
|
|
3981
3953
|
}
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
ViewUtil.addClass(this.container, 'vi-window');
|
|
3985
|
-
ViewUtil.toggleClass(this.container, 'vi-modal', this.config.isModal);
|
|
3986
|
-
this.container.addEventListener('click', this.mouseClickHandlerProxy, true);
|
|
3987
|
-
this.container.addEventListener('mousedown', this.mouseDownHandlerProxy);
|
|
3988
|
-
/*
|
|
3989
|
-
if (!this.config.isModal) {
|
|
3990
|
-
this.container.addEventListener('mousedown', this.mouseDownHandlerProxy);
|
|
3991
|
-
}
|
|
3992
|
-
*/
|
|
3993
|
-
this.elementsCreate();
|
|
3954
|
+
get wrapper() {
|
|
3955
|
+
return this._wrapper;
|
|
3994
3956
|
}
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
commitIsDisabledProperties() { }
|
|
3998
|
-
commitIsMinimizedProperties() { }
|
|
3999
|
-
getConfig() {
|
|
4000
|
-
return this.properties.config;
|
|
3957
|
+
get backdrop() {
|
|
3958
|
+
return this._backdrop;
|
|
4001
3959
|
}
|
|
4002
|
-
|
|
4003
|
-
return
|
|
3960
|
+
get isOnTop() {
|
|
3961
|
+
return false;
|
|
4004
3962
|
}
|
|
4005
|
-
|
|
4006
|
-
|
|
3963
|
+
set isOnTop(value) { }
|
|
3964
|
+
get isMinimized() {
|
|
3965
|
+
return false;
|
|
4007
3966
|
}
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
}
|
|
4012
|
-
let element = _.find(this.elements, item => item.location.nativeElement === event.target);
|
|
4013
|
-
if (_.isNil(element)) {
|
|
4014
|
-
return false;
|
|
4015
|
-
}
|
|
4016
|
-
element.instance.clickHandler(event);
|
|
4017
|
-
return true;
|
|
3967
|
+
set isMinimized(value) { }
|
|
3968
|
+
get isDisabled() {
|
|
3969
|
+
return this._isDisabled;
|
|
4018
3970
|
}
|
|
4019
|
-
|
|
4020
|
-
this.
|
|
4021
|
-
if (!this.blinkTimer) {
|
|
3971
|
+
set isDisabled(value) {
|
|
3972
|
+
if (value === this._isDisabled) {
|
|
4022
3973
|
return;
|
|
4023
3974
|
}
|
|
4024
|
-
|
|
4025
|
-
this.
|
|
3975
|
+
this._isDisabled = value;
|
|
3976
|
+
this.commitIsDisabledProperties();
|
|
3977
|
+
this.emit(WindowEvent.DISABLED_CHANGED);
|
|
4026
3978
|
}
|
|
4027
|
-
|
|
4028
|
-
|
|
3979
|
+
}
|
|
3980
|
+
|
|
3981
|
+
class WindowElement extends DestroyableContainer {
|
|
3982
|
+
// --------------------------------------------------------------------------
|
|
3983
|
+
//
|
|
3984
|
+
// Constructor
|
|
3985
|
+
//
|
|
3986
|
+
// --------------------------------------------------------------------------
|
|
3987
|
+
constructor(element) {
|
|
3988
|
+
super();
|
|
3989
|
+
this.element = element;
|
|
4029
3990
|
}
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
3991
|
+
// --------------------------------------------------------------------------
|
|
3992
|
+
//
|
|
3993
|
+
// Private Methods
|
|
3994
|
+
//
|
|
3995
|
+
// --------------------------------------------------------------------------
|
|
3996
|
+
checkWindowParent() {
|
|
3997
|
+
let container = this.getContainer();
|
|
3998
|
+
if (!_.isNil(container)) {
|
|
3999
|
+
ViewUtil.appendChild(container, this.element.nativeElement);
|
|
4033
4000
|
}
|
|
4034
|
-
|
|
4035
|
-
|
|
4001
|
+
}
|
|
4002
|
+
getContainer() {
|
|
4003
|
+
let item = ViewUtil.parseElement(this.element.nativeElement);
|
|
4004
|
+
while (!_.isNil(item) && item.nodeName.toLowerCase() !== 'mat-dialog-container') {
|
|
4005
|
+
item = item.parentElement;
|
|
4036
4006
|
}
|
|
4007
|
+
return item;
|
|
4037
4008
|
}
|
|
4009
|
+
createChildren() { }
|
|
4010
|
+
destroyChildren() { }
|
|
4011
|
+
commitWindowProperties() { }
|
|
4038
4012
|
// --------------------------------------------------------------------------
|
|
4039
4013
|
//
|
|
4040
|
-
//
|
|
4014
|
+
// Public Methods
|
|
4041
4015
|
//
|
|
4042
4016
|
// --------------------------------------------------------------------------
|
|
4043
|
-
|
|
4044
|
-
this.
|
|
4045
|
-
|
|
4046
|
-
close() {
|
|
4047
|
-
this.getReference().close();
|
|
4017
|
+
ngAfterViewInit() {
|
|
4018
|
+
this.createChildren();
|
|
4019
|
+
this.checkWindowParent();
|
|
4048
4020
|
}
|
|
4049
4021
|
destroy() {
|
|
4050
4022
|
if (this.isDestroyed) {
|
|
4051
4023
|
return;
|
|
4052
4024
|
}
|
|
4053
4025
|
super.destroy();
|
|
4054
|
-
this.
|
|
4055
|
-
this.
|
|
4056
|
-
this.
|
|
4057
|
-
if (!_.isNil(this.content)) {
|
|
4058
|
-
this.content.destroy();
|
|
4059
|
-
}
|
|
4060
|
-
if (!_.isNil(this.observer)) {
|
|
4061
|
-
this.observer.complete();
|
|
4062
|
-
this.observer = null;
|
|
4063
|
-
}
|
|
4064
|
-
this.properties = null;
|
|
4065
|
-
this._wrapper = null;
|
|
4066
|
-
this._backdrop = null;
|
|
4067
|
-
this._container = null;
|
|
4068
|
-
clearInterval(this.blinkTimer);
|
|
4069
|
-
this.blinkTimer = null;
|
|
4070
|
-
clearInterval(this.shakeTimer);
|
|
4071
|
-
this.shakeTimer = null;
|
|
4072
|
-
clearTimeout(this.resizeTimer);
|
|
4073
|
-
this.resizeTimer = null;
|
|
4074
|
-
}
|
|
4075
|
-
blink() {
|
|
4076
|
-
clearInterval(this.blinkTimer);
|
|
4077
|
-
this.blinkTimer = setInterval(this.blinkToggle, WindowImpl.BLINK_DELAY);
|
|
4078
|
-
}
|
|
4079
|
-
shake() {
|
|
4080
|
-
if (this.isShaking) {
|
|
4081
|
-
return;
|
|
4082
|
-
}
|
|
4083
|
-
this.isShaking = true;
|
|
4084
|
-
clearInterval(this.shakeTimer);
|
|
4085
|
-
this.shakeTimer = setInterval(this.stopShaking, WindowImpl.SHAKE_DELAY);
|
|
4086
|
-
}
|
|
4087
|
-
setOnTop() {
|
|
4088
|
-
this.isWasOnTop = this.isOnTop;
|
|
4089
|
-
this.emit(WindowEvent.SET_ON_TOP);
|
|
4026
|
+
this.destroyChildren();
|
|
4027
|
+
this.element = null;
|
|
4028
|
+
this.window = null;
|
|
4090
4029
|
}
|
|
4091
4030
|
// --------------------------------------------------------------------------
|
|
4092
4031
|
//
|
|
4093
|
-
//
|
|
4032
|
+
// Event Handlers
|
|
4094
4033
|
//
|
|
4095
4034
|
// --------------------------------------------------------------------------
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
}
|
|
4099
|
-
getHeight() {
|
|
4100
|
-
return this.height;
|
|
4101
|
-
}
|
|
4102
|
-
setWidth(value, isNeedNotify = true) {
|
|
4103
|
-
this.width = value;
|
|
4104
|
-
if (isNeedNotify) {
|
|
4105
|
-
this.resizeHandler();
|
|
4106
|
-
}
|
|
4107
|
-
}
|
|
4108
|
-
setHeight(value, isNeedNotify = true) {
|
|
4109
|
-
this.height = value;
|
|
4110
|
-
if (isNeedNotify) {
|
|
4111
|
-
this.resizeHandler();
|
|
4112
|
-
}
|
|
4113
|
-
}
|
|
4114
|
-
setSize(width, height) {
|
|
4115
|
-
this.setWidth(width, false);
|
|
4116
|
-
this.setHeight(height, false);
|
|
4117
|
-
this.resizeHandler();
|
|
4035
|
+
clickHandler(event) {
|
|
4036
|
+
event.stopPropagation();
|
|
4118
4037
|
}
|
|
4119
4038
|
// --------------------------------------------------------------------------
|
|
4120
4039
|
//
|
|
4121
|
-
//
|
|
4040
|
+
// Protected Properties
|
|
4122
4041
|
//
|
|
4123
4042
|
// --------------------------------------------------------------------------
|
|
4124
|
-
|
|
4125
|
-
return this.
|
|
4126
|
-
}
|
|
4127
|
-
setX(value, isNeedNotify = true) {
|
|
4128
|
-
this.x = value;
|
|
4129
|
-
if (isNeedNotify) {
|
|
4130
|
-
this.emit(WindowEvent.MOVED);
|
|
4131
|
-
}
|
|
4132
|
-
}
|
|
4133
|
-
getY() {
|
|
4134
|
-
return this.y;
|
|
4135
|
-
}
|
|
4136
|
-
setY(value, isNeedNotify = true) {
|
|
4137
|
-
this.y = value;
|
|
4138
|
-
if (isNeedNotify) {
|
|
4139
|
-
this.emit(WindowEvent.MOVED);
|
|
4140
|
-
}
|
|
4141
|
-
}
|
|
4142
|
-
move(x, y) {
|
|
4143
|
-
this.setX(x, false);
|
|
4144
|
-
this.setY(y, false);
|
|
4145
|
-
this.emit(WindowEvent.MOVED);
|
|
4043
|
+
get nativeElement() {
|
|
4044
|
+
return this.element ? this.element.nativeElement : null;
|
|
4146
4045
|
}
|
|
4147
4046
|
// --------------------------------------------------------------------------
|
|
4148
4047
|
//
|
|
4149
|
-
//
|
|
4048
|
+
// Public Properties
|
|
4150
4049
|
//
|
|
4151
4050
|
// --------------------------------------------------------------------------
|
|
4152
|
-
get
|
|
4153
|
-
return this.
|
|
4051
|
+
get window() {
|
|
4052
|
+
return this._window;
|
|
4154
4053
|
}
|
|
4155
|
-
set
|
|
4156
|
-
if (value === this.
|
|
4054
|
+
set window(value) {
|
|
4055
|
+
if (value === this._window) {
|
|
4157
4056
|
return;
|
|
4158
4057
|
}
|
|
4159
|
-
this.
|
|
4160
|
-
this.
|
|
4161
|
-
|
|
4162
|
-
get isShaking() {
|
|
4163
|
-
return this._isShaking;
|
|
4164
|
-
}
|
|
4165
|
-
set isShaking(value) {
|
|
4166
|
-
if (value === this._isShaking) {
|
|
4167
|
-
return;
|
|
4058
|
+
this._window = value;
|
|
4059
|
+
if (this.window) {
|
|
4060
|
+
this.commitWindowProperties();
|
|
4168
4061
|
}
|
|
4169
|
-
this._isShaking = value;
|
|
4170
|
-
this.commitIsShakingProperties();
|
|
4171
4062
|
}
|
|
4063
|
+
}
|
|
4064
|
+
WindowElement.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WindowElement, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4065
|
+
WindowElement.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: WindowElement, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
4066
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WindowElement, decorators: [{
|
|
4067
|
+
type: Component,
|
|
4068
|
+
args: [{ template: '' }]
|
|
4069
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
4070
|
+
|
|
4071
|
+
class WindowCloseElementComponent extends WindowElement {
|
|
4172
4072
|
// --------------------------------------------------------------------------
|
|
4173
4073
|
//
|
|
4174
|
-
//
|
|
4074
|
+
// Constructor
|
|
4175
4075
|
//
|
|
4176
4076
|
// --------------------------------------------------------------------------
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
}
|
|
4180
|
-
get config() {
|
|
4181
|
-
return this.properties.config;
|
|
4182
|
-
}
|
|
4183
|
-
get content() {
|
|
4184
|
-
return this.properties.reference ? this.properties.reference.componentInstance : null;
|
|
4185
|
-
}
|
|
4186
|
-
get container() {
|
|
4187
|
-
return this._container;
|
|
4188
|
-
}
|
|
4189
|
-
get wrapper() {
|
|
4190
|
-
return this._wrapper;
|
|
4191
|
-
}
|
|
4192
|
-
get backdrop() {
|
|
4193
|
-
return this._backdrop;
|
|
4194
|
-
}
|
|
4195
|
-
get isOnTop() {
|
|
4196
|
-
return this._isOnTop;
|
|
4077
|
+
constructor(element) {
|
|
4078
|
+
super(element);
|
|
4197
4079
|
}
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4080
|
+
// --------------------------------------------------------------------------
|
|
4081
|
+
//
|
|
4082
|
+
// Private Methods
|
|
4083
|
+
//
|
|
4084
|
+
// --------------------------------------------------------------------------
|
|
4085
|
+
createChildren() {
|
|
4086
|
+
super.createChildren();
|
|
4087
|
+
if (!_.isNil(WindowCloseElementComponent.ICON_VALUE)) {
|
|
4088
|
+
ViewUtil.setProperty(this.nativeElement, 'innerHTML', WindowCloseElementComponent.ICON_VALUE);
|
|
4201
4089
|
}
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
this.isBlink = false;
|
|
4205
|
-
}
|
|
4206
|
-
get isMinimized() {
|
|
4207
|
-
return this._isMinimized;
|
|
4208
|
-
}
|
|
4209
|
-
set isMinimized(value) {
|
|
4210
|
-
if (value === this._isMinimized) {
|
|
4211
|
-
return;
|
|
4090
|
+
if (!_.isNil(WindowCloseElementComponent.ICON_CLASS)) {
|
|
4091
|
+
ViewUtil.addClasses(this.nativeElement, WindowCloseElementComponent.ICON_CLASS);
|
|
4212
4092
|
}
|
|
4213
|
-
this.
|
|
4214
|
-
this.commitIsMinimizedProperties();
|
|
4215
|
-
this.emit(WindowEvent.MINIMIZED_CHANGED);
|
|
4216
|
-
this.stopBlinkIfNeed();
|
|
4217
|
-
}
|
|
4218
|
-
get isDisabled() {
|
|
4219
|
-
return this._isDisabled;
|
|
4093
|
+
ViewUtil.addClass(this.nativeElement, 'mouse-active');
|
|
4220
4094
|
}
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4095
|
+
// --------------------------------------------------------------------------
|
|
4096
|
+
//
|
|
4097
|
+
// Event Handlers
|
|
4098
|
+
//
|
|
4099
|
+
// --------------------------------------------------------------------------
|
|
4100
|
+
clickHandler(event) {
|
|
4101
|
+
super.clickHandler(event);
|
|
4102
|
+
if (!_.isNil(this.window)) {
|
|
4103
|
+
this.window.close();
|
|
4224
4104
|
}
|
|
4225
|
-
this._isDisabled = value;
|
|
4226
|
-
this.commitIsDisabledProperties();
|
|
4227
|
-
this.emit(WindowEvent.DISABLED_CHANGED);
|
|
4228
4105
|
}
|
|
4229
4106
|
}
|
|
4230
4107
|
// --------------------------------------------------------------------------
|
|
4231
4108
|
//
|
|
4232
|
-
//
|
|
4109
|
+
// Constants
|
|
4233
4110
|
//
|
|
4234
4111
|
// --------------------------------------------------------------------------
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4112
|
+
WindowCloseElementComponent.ICON_CLASS = 'fas fa-times';
|
|
4113
|
+
WindowCloseElementComponent.ICON_VALUE = null;
|
|
4114
|
+
WindowCloseElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WindowCloseElementComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4115
|
+
WindowCloseElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: WindowCloseElementComponent, selector: "vi-window-close-element", usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] });
|
|
4116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WindowCloseElementComponent, decorators: [{
|
|
4117
|
+
type: Component,
|
|
4118
|
+
args: [{ selector: 'vi-window-close-element', template: '', styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] }]
|
|
4119
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
4238
4120
|
|
|
4239
|
-
class
|
|
4121
|
+
class WindowExpandElementComponent extends WindowElement {
|
|
4240
4122
|
// --------------------------------------------------------------------------
|
|
4241
4123
|
//
|
|
4242
|
-
//
|
|
4124
|
+
// Constructor
|
|
4243
4125
|
//
|
|
4244
4126
|
// --------------------------------------------------------------------------
|
|
4245
|
-
constructor(
|
|
4246
|
-
super();
|
|
4247
|
-
// --------------------------------------------------------------------------
|
|
4248
|
-
//
|
|
4249
|
-
// Properties
|
|
4250
|
-
//
|
|
4251
|
-
// --------------------------------------------------------------------------
|
|
4252
|
-
this._isBlink = false;
|
|
4253
|
-
this._isDisabled = false;
|
|
4254
|
-
// --------------------------------------------------------------------------
|
|
4255
|
-
//
|
|
4256
|
-
// Protected Methods
|
|
4257
|
-
//
|
|
4258
|
-
// --------------------------------------------------------------------------
|
|
4259
|
-
this.setClosed = () => {
|
|
4260
|
-
this.emit(WindowEvent.CLOSED);
|
|
4261
|
-
this.destroy();
|
|
4262
|
-
};
|
|
4263
|
-
this.setOpened = () => {
|
|
4264
|
-
this.emit(WindowEvent.OPENED);
|
|
4265
|
-
};
|
|
4266
|
-
this.blinkToggle = () => {
|
|
4267
|
-
this.isBlink = !this.isBlink;
|
|
4268
|
-
};
|
|
4269
|
-
this.mouseDownHandlerProxy = (event) => {
|
|
4270
|
-
this.mouseDownHandler(event);
|
|
4271
|
-
};
|
|
4272
|
-
this.mouseClickHandlerProxy = (event) => {
|
|
4273
|
-
this.mouseClickHandler(event);
|
|
4274
|
-
};
|
|
4275
|
-
this.observer = new Subject();
|
|
4276
|
-
this.properties = properties;
|
|
4277
|
-
this.content.window = this;
|
|
4278
|
-
// Have to save for unsubscribe on destroy
|
|
4279
|
-
this._wrapper = this.properties.overlay.hostElement;
|
|
4280
|
-
this._backdrop = this.properties.overlay.backdropElement;
|
|
4281
|
-
this._container = this.properties.overlay.overlayElement;
|
|
4282
|
-
this.setProperties();
|
|
4283
|
-
this.elementsCreate();
|
|
4284
|
-
this.getReference().afterOpened().pipe(takeUntil(this.destroyed)).subscribe(this.setOpened);
|
|
4285
|
-
this.getReference().afterDismissed().pipe(takeUntil(this.destroyed)).subscribe(this.setClosed);
|
|
4127
|
+
constructor(element) {
|
|
4128
|
+
super(element);
|
|
4286
4129
|
}
|
|
4287
4130
|
// --------------------------------------------------------------------------
|
|
4288
4131
|
//
|
|
4289
|
-
//
|
|
4132
|
+
// Private Methods
|
|
4290
4133
|
//
|
|
4291
4134
|
// --------------------------------------------------------------------------
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
this.
|
|
4301
|
-
item.instance.window = this;
|
|
4302
|
-
return item;
|
|
4303
|
-
}
|
|
4304
|
-
elementRemove(item) {
|
|
4305
|
-
ArrayUtil.remove(this.elements, item);
|
|
4306
|
-
this.elementDestroy(item);
|
|
4307
|
-
return item;
|
|
4308
|
-
}
|
|
4309
|
-
elementDestroy(item) {
|
|
4310
|
-
item.instance.window = null;
|
|
4311
|
-
item.destroy();
|
|
4312
|
-
return item;
|
|
4313
|
-
}
|
|
4314
|
-
setProperties() {
|
|
4315
|
-
ViewUtil.addClass(this.container, 'vi-bottom-sheet');
|
|
4316
|
-
ViewUtil.toggleClass(this.container, 'vi-modal', this.config.isModal);
|
|
4317
|
-
this.container.addEventListener('click', this.mouseClickHandlerProxy, true);
|
|
4318
|
-
this.container.addEventListener('mousedown', this.mouseDownHandlerProxy);
|
|
4319
|
-
/*
|
|
4320
|
-
if (!this.config.isModal) {
|
|
4321
|
-
this.container.addEventListener('mousedown', this.mouseDownHandlerProxy);
|
|
4322
|
-
}
|
|
4323
|
-
*/
|
|
4324
|
-
}
|
|
4325
|
-
commitIsBlinkProperties() { }
|
|
4326
|
-
commitIsDisabledProperties() { }
|
|
4327
|
-
getConfig() {
|
|
4328
|
-
return this.properties.config;
|
|
4329
|
-
}
|
|
4330
|
-
getContainer() {
|
|
4331
|
-
return this.container;
|
|
4332
|
-
}
|
|
4333
|
-
getReference() {
|
|
4334
|
-
return this.properties.reference;
|
|
4335
|
-
}
|
|
4336
|
-
isNeedClickStopPropagation(event) {
|
|
4337
|
-
let element = _.find(this.elements, item => item.location.nativeElement === event.target);
|
|
4338
|
-
if (_.isNil(element)) {
|
|
4339
|
-
return false;
|
|
4340
|
-
}
|
|
4341
|
-
element.instance.clickHandler(event);
|
|
4342
|
-
return true;
|
|
4343
|
-
}
|
|
4344
|
-
stopBlinkIfNeed() {
|
|
4345
|
-
this.isBlink = false;
|
|
4346
|
-
if (!this.blinkTimer) {
|
|
4347
|
-
return;
|
|
4348
|
-
}
|
|
4349
|
-
clearInterval(this.blinkTimer);
|
|
4350
|
-
this.blinkTimer = null;
|
|
4135
|
+
createChildren() {
|
|
4136
|
+
super.createChildren();
|
|
4137
|
+
if (!_.isNil(WindowExpandElementComponent.ICON_VALUE)) {
|
|
4138
|
+
ViewUtil.setProperty(this.nativeElement, 'innerHTML', WindowExpandElementComponent.ICON_VALUE);
|
|
4139
|
+
}
|
|
4140
|
+
if (!_.isNil(WindowExpandElementComponent.ICON_CLASS)) {
|
|
4141
|
+
ViewUtil.addClasses(this.nativeElement, WindowExpandElementComponent.ICON_CLASS);
|
|
4142
|
+
}
|
|
4143
|
+
ViewUtil.addClass(this.nativeElement, 'mouse-active');
|
|
4351
4144
|
}
|
|
4352
4145
|
// --------------------------------------------------------------------------
|
|
4353
4146
|
//
|
|
4354
|
-
//
|
|
4147
|
+
// Event Handlers
|
|
4355
4148
|
//
|
|
4356
4149
|
// --------------------------------------------------------------------------
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
if (this.isNeedClickStopPropagation(event)) {
|
|
4362
|
-
event.stopPropagation();
|
|
4150
|
+
clickHandler(event) {
|
|
4151
|
+
super.clickHandler(event);
|
|
4152
|
+
if (!_.isNil(this.window)) {
|
|
4153
|
+
this.window.emit(WindowEvent.EXPAND);
|
|
4363
4154
|
}
|
|
4364
4155
|
}
|
|
4156
|
+
}
|
|
4157
|
+
// --------------------------------------------------------------------------
|
|
4158
|
+
//
|
|
4159
|
+
// Constants
|
|
4160
|
+
//
|
|
4161
|
+
// --------------------------------------------------------------------------
|
|
4162
|
+
WindowExpandElementComponent.ICON_CLASS = 'fas fa-angle-double-up';
|
|
4163
|
+
WindowExpandElementComponent.ICON_VALUE = null;
|
|
4164
|
+
WindowExpandElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WindowExpandElementComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4165
|
+
WindowExpandElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: WindowExpandElementComponent, selector: "vi-window-expand-element", usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] });
|
|
4166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WindowExpandElementComponent, decorators: [{
|
|
4167
|
+
type: Component,
|
|
4168
|
+
args: [{ selector: 'vi-window-expand-element', template: '', styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] }]
|
|
4169
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
4170
|
+
|
|
4171
|
+
class WindowResizeElementComponent extends WindowElement {
|
|
4365
4172
|
// --------------------------------------------------------------------------
|
|
4366
4173
|
//
|
|
4367
|
-
//
|
|
4174
|
+
// Constructor
|
|
4368
4175
|
//
|
|
4369
4176
|
// --------------------------------------------------------------------------
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
}
|
|
4373
|
-
close() {
|
|
4374
|
-
this.getReference().dismiss();
|
|
4177
|
+
constructor(element) {
|
|
4178
|
+
super(element);
|
|
4375
4179
|
}
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
this.content.destroy();
|
|
4180
|
+
// --------------------------------------------------------------------------
|
|
4181
|
+
//
|
|
4182
|
+
// Private Methods
|
|
4183
|
+
//
|
|
4184
|
+
// --------------------------------------------------------------------------
|
|
4185
|
+
createChildren() {
|
|
4186
|
+
super.createChildren();
|
|
4187
|
+
if (!_.isNil(WindowResizeElementComponent.ICON_VALUE)) {
|
|
4188
|
+
ViewUtil.setProperty(this.nativeElement, 'innerHTML', WindowResizeElementComponent.ICON_VALUE);
|
|
4386
4189
|
}
|
|
4387
|
-
if (!_.isNil(
|
|
4388
|
-
this.
|
|
4389
|
-
this.observer = null;
|
|
4190
|
+
if (!_.isNil(WindowResizeElementComponent.ICON_CLASS)) {
|
|
4191
|
+
ViewUtil.addClasses(this.nativeElement, WindowResizeElementComponent.ICON_CLASS);
|
|
4390
4192
|
}
|
|
4391
|
-
this.
|
|
4392
|
-
this._wrapper = null;
|
|
4393
|
-
this._backdrop = null;
|
|
4394
|
-
this._container = null;
|
|
4395
|
-
clearInterval(this.blinkTimer);
|
|
4396
|
-
this.blinkTimer = null;
|
|
4397
|
-
}
|
|
4398
|
-
blink() {
|
|
4399
|
-
clearInterval(this.blinkTimer);
|
|
4400
|
-
this.blinkTimer = setInterval(this.blinkToggle, WindowImpl.BLINK_DELAY);
|
|
4193
|
+
ViewUtil.setStyle(this.nativeElement, 'cursor', 'pointer');
|
|
4401
4194
|
}
|
|
4402
|
-
shake() { }
|
|
4403
|
-
setOnTop() { }
|
|
4404
4195
|
// --------------------------------------------------------------------------
|
|
4405
4196
|
//
|
|
4406
|
-
//
|
|
4197
|
+
// Event Handlers
|
|
4407
4198
|
//
|
|
4408
4199
|
// --------------------------------------------------------------------------
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4200
|
+
clickHandler(event) {
|
|
4201
|
+
super.clickHandler(event);
|
|
4202
|
+
if (!_.isNil(this.window)) {
|
|
4203
|
+
this.window.emit(WindowEvent.EXPAND);
|
|
4204
|
+
}
|
|
4414
4205
|
}
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4206
|
+
}
|
|
4207
|
+
// --------------------------------------------------------------------------
|
|
4208
|
+
//
|
|
4209
|
+
// Constants
|
|
4210
|
+
//
|
|
4211
|
+
// --------------------------------------------------------------------------
|
|
4212
|
+
WindowResizeElementComponent.ICON_CLASS = 'fas fa-arrows-alt';
|
|
4213
|
+
WindowResizeElementComponent.ICON_VALUE = null;
|
|
4214
|
+
WindowResizeElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WindowResizeElementComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4215
|
+
WindowResizeElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: WindowResizeElementComponent, selector: "vi-window-resize-element", usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] });
|
|
4216
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WindowResizeElementComponent, decorators: [{
|
|
4217
|
+
type: Component,
|
|
4218
|
+
args: [{ selector: 'vi-window-resize-element', template: '', styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] }]
|
|
4219
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
4220
|
+
|
|
4221
|
+
class WindowMinimizeElementComponent extends WindowElement {
|
|
4418
4222
|
// --------------------------------------------------------------------------
|
|
4419
4223
|
//
|
|
4420
|
-
//
|
|
4224
|
+
// Constructor
|
|
4421
4225
|
//
|
|
4422
4226
|
// --------------------------------------------------------------------------
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4227
|
+
constructor(element) {
|
|
4228
|
+
super(element);
|
|
4229
|
+
// --------------------------------------------------------------------------
|
|
4230
|
+
//
|
|
4231
|
+
// Private Methods
|
|
4232
|
+
//
|
|
4233
|
+
// --------------------------------------------------------------------------
|
|
4234
|
+
this.commitIconProperties = () => {
|
|
4235
|
+
let icon = this.window.isMinimized ? WindowMinimizeElementComponent.ICON_MAXIMIZE_VALUE : WindowMinimizeElementComponent.ICON_MINIMIZE_VALUE;
|
|
4236
|
+
ViewUtil.setProperty(this.nativeElement, 'innerHTML', icon);
|
|
4237
|
+
};
|
|
4429
4238
|
}
|
|
4430
|
-
setY(value, isNeedNotify = true) { }
|
|
4431
|
-
move(x, y) { }
|
|
4432
4239
|
// --------------------------------------------------------------------------
|
|
4433
4240
|
//
|
|
4434
|
-
//
|
|
4241
|
+
// Protected Methods
|
|
4435
4242
|
//
|
|
4436
4243
|
// --------------------------------------------------------------------------
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4244
|
+
commitWindowProperties() {
|
|
4245
|
+
super.commitWindowProperties();
|
|
4246
|
+
this.window.events.pipe(takeUntil(this.destroyed)).subscribe(event => {
|
|
4247
|
+
if (event === WindowEvent.MINIMIZED_CHANGED) {
|
|
4248
|
+
this.commitIconProperties();
|
|
4249
|
+
}
|
|
4250
|
+
});
|
|
4442
4251
|
}
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4252
|
+
createChildren() {
|
|
4253
|
+
super.createChildren();
|
|
4254
|
+
if (!_.isNil(WindowMinimizeElementComponent.ICON_MINIMIZE_VALUE)) {
|
|
4255
|
+
ViewUtil.setProperty(this.nativeElement, 'innerHTML', WindowMinimizeElementComponent.ICON_MINIMIZE_VALUE);
|
|
4446
4256
|
}
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
return false;
|
|
4257
|
+
if (!_.isNil(WindowMinimizeElementComponent.ICON_CLASS)) {
|
|
4258
|
+
ViewUtil.addClasses(this.nativeElement, WindowMinimizeElementComponent.ICON_CLASS);
|
|
4259
|
+
}
|
|
4260
|
+
ViewUtil.addClass(this.nativeElement, 'mouse-active');
|
|
4452
4261
|
}
|
|
4453
|
-
set isShaking(value) { }
|
|
4454
4262
|
// --------------------------------------------------------------------------
|
|
4455
4263
|
//
|
|
4456
|
-
//
|
|
4264
|
+
// Event Handlers
|
|
4457
4265
|
//
|
|
4458
4266
|
// --------------------------------------------------------------------------
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
return this.properties.config;
|
|
4464
|
-
}
|
|
4465
|
-
get content() {
|
|
4466
|
-
return !_.isNil(this.reference) ? this.reference.instance : null;
|
|
4467
|
-
}
|
|
4468
|
-
get container() {
|
|
4469
|
-
return this._container;
|
|
4470
|
-
}
|
|
4471
|
-
get wrapper() {
|
|
4472
|
-
return this._wrapper;
|
|
4473
|
-
}
|
|
4474
|
-
get backdrop() {
|
|
4475
|
-
return this._backdrop;
|
|
4476
|
-
}
|
|
4477
|
-
get isOnTop() {
|
|
4478
|
-
return false;
|
|
4479
|
-
}
|
|
4480
|
-
set isOnTop(value) { }
|
|
4481
|
-
get isMinimized() {
|
|
4482
|
-
return false;
|
|
4483
|
-
}
|
|
4484
|
-
set isMinimized(value) { }
|
|
4485
|
-
get isDisabled() {
|
|
4486
|
-
return this._isDisabled;
|
|
4487
|
-
}
|
|
4488
|
-
set isDisabled(value) {
|
|
4489
|
-
if (value === this._isDisabled) {
|
|
4490
|
-
return;
|
|
4267
|
+
clickHandler(event) {
|
|
4268
|
+
super.clickHandler(event);
|
|
4269
|
+
if (!_.isNil(this.window)) {
|
|
4270
|
+
this.window.isMinimized = !this.window.isMinimized;
|
|
4491
4271
|
}
|
|
4492
|
-
this._isDisabled = value;
|
|
4493
|
-
this.commitIsDisabledProperties();
|
|
4494
|
-
this.emit(WindowEvent.DISABLED_CHANGED);
|
|
4495
4272
|
}
|
|
4496
4273
|
}
|
|
4497
4274
|
// --------------------------------------------------------------------------
|
|
4498
4275
|
//
|
|
4499
|
-
//
|
|
4276
|
+
// Constants
|
|
4500
4277
|
//
|
|
4501
4278
|
// --------------------------------------------------------------------------
|
|
4502
|
-
|
|
4503
|
-
|
|
4279
|
+
WindowMinimizeElementComponent.ICON_CLASS = null;
|
|
4280
|
+
WindowMinimizeElementComponent.ICON_MINIMIZE_VALUE = null;
|
|
4281
|
+
WindowMinimizeElementComponent.ICON_MAXIMIZE_VALUE = null;
|
|
4282
|
+
WindowMinimizeElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WindowMinimizeElementComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4283
|
+
WindowMinimizeElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: WindowMinimizeElementComponent, selector: "vi-window-minimize-element", usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] });
|
|
4284
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WindowMinimizeElementComponent, decorators: [{
|
|
4285
|
+
type: Component,
|
|
4286
|
+
args: [{ selector: 'vi-window-minimize-element', template: '', styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] }]
|
|
4287
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
4504
4288
|
|
|
4505
|
-
class
|
|
4289
|
+
class WindowBase extends DestroyableContainer {
|
|
4506
4290
|
// --------------------------------------------------------------------------
|
|
4507
4291
|
//
|
|
4508
4292
|
// Constructor
|
|
4509
4293
|
//
|
|
4510
4294
|
// --------------------------------------------------------------------------
|
|
4511
|
-
constructor(
|
|
4295
|
+
constructor() {
|
|
4512
4296
|
super();
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4297
|
+
// --------------------------------------------------------------------------
|
|
4298
|
+
//
|
|
4299
|
+
// Properties
|
|
4300
|
+
//
|
|
4301
|
+
// --------------------------------------------------------------------------
|
|
4302
|
+
this._x = NaN;
|
|
4303
|
+
this._width = NaN;
|
|
4304
|
+
this._y = NaN;
|
|
4305
|
+
this._height = NaN;
|
|
4306
|
+
this.updatePosition = () => this.setPosition();
|
|
4307
|
+
}
|
|
4308
|
+
setProperties() {
|
|
4309
|
+
let config = this.getConfig();
|
|
4310
|
+
if (!_.isNaN(config.defaultWidth)) {
|
|
4311
|
+
this.width = config.defaultWidth;
|
|
4312
|
+
}
|
|
4313
|
+
if (!_.isNaN(config.defaultHeight)) {
|
|
4314
|
+
this.height = config.defaultHeight;
|
|
4524
4315
|
}
|
|
4525
4316
|
}
|
|
4526
|
-
|
|
4527
|
-
let
|
|
4528
|
-
|
|
4529
|
-
|
|
4317
|
+
setPosition() {
|
|
4318
|
+
let config = this.getConfig();
|
|
4319
|
+
switch (config.horizontalAlign) {
|
|
4320
|
+
case WindowAlign.START:
|
|
4321
|
+
this.x = !_.isNaN(this.paddingLeft) ? this.paddingLeft : 0;
|
|
4322
|
+
break;
|
|
4323
|
+
case WindowAlign.END:
|
|
4324
|
+
let value = ViewUtil.getStageWidth() - this.calculateWidth();
|
|
4325
|
+
if (!_.isNaN(this.paddingRight)) {
|
|
4326
|
+
value -= this.paddingRight;
|
|
4327
|
+
}
|
|
4328
|
+
this.x = value;
|
|
4329
|
+
break;
|
|
4330
|
+
default:
|
|
4331
|
+
this.x = (ViewUtil.getStageWidth() - this.calculateWidth()) / 2;
|
|
4332
|
+
break;
|
|
4333
|
+
}
|
|
4334
|
+
switch (config.verticalAlign) {
|
|
4335
|
+
case WindowAlign.START:
|
|
4336
|
+
this.y = !_.isNaN(this.paddingTop) ? this.paddingTop : 0;
|
|
4337
|
+
break;
|
|
4338
|
+
case WindowAlign.END:
|
|
4339
|
+
let value = ViewUtil.getStageHeight() - this.calculateHeight();
|
|
4340
|
+
if (!_.isNaN(this.paddingBottom)) {
|
|
4341
|
+
value -= this.paddingBottom;
|
|
4342
|
+
}
|
|
4343
|
+
this.y = value;
|
|
4344
|
+
break;
|
|
4345
|
+
default:
|
|
4346
|
+
this.y = (ViewUtil.getStageHeight() - this.calculateHeight()) / 2;
|
|
4347
|
+
break;
|
|
4530
4348
|
}
|
|
4531
|
-
return item;
|
|
4532
4349
|
}
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
// Public Methods
|
|
4539
|
-
//
|
|
4540
|
-
// --------------------------------------------------------------------------
|
|
4541
|
-
ngAfterViewInit() {
|
|
4542
|
-
this.createChildren();
|
|
4543
|
-
this.checkWindowParent();
|
|
4350
|
+
clearSize() {
|
|
4351
|
+
this._x = NaN;
|
|
4352
|
+
this._y = NaN;
|
|
4353
|
+
this._width = NaN;
|
|
4354
|
+
this._height = NaN;
|
|
4544
4355
|
}
|
|
4545
|
-
|
|
4546
|
-
|
|
4356
|
+
commitSizeProperties() {
|
|
4357
|
+
let width = !_.isNaN(this.width) ? this.width + 'px' : 'auto';
|
|
4358
|
+
let height = !_.isNaN(this.height) ? this.height + 'px' : 'auto';
|
|
4359
|
+
this.getReference().updateSize(width, height);
|
|
4360
|
+
}
|
|
4361
|
+
commitPositionProperties() {
|
|
4362
|
+
if (_.isNaN(this._x) && _.isNaN(this._y)) {
|
|
4547
4363
|
return;
|
|
4548
4364
|
}
|
|
4549
|
-
|
|
4550
|
-
this.
|
|
4551
|
-
|
|
4552
|
-
|
|
4365
|
+
let position = {};
|
|
4366
|
+
if (!_.isNaN(this._y)) {
|
|
4367
|
+
position.top = this._y + 'px';
|
|
4368
|
+
}
|
|
4369
|
+
if (!_.isNaN(this._x)) {
|
|
4370
|
+
position.left = this._x + 'px';
|
|
4371
|
+
}
|
|
4372
|
+
this.getReference().updatePosition(position);
|
|
4553
4373
|
}
|
|
4554
4374
|
// --------------------------------------------------------------------------
|
|
4555
4375
|
//
|
|
4556
|
-
//
|
|
4376
|
+
// Public Methods
|
|
4557
4377
|
//
|
|
4558
4378
|
// --------------------------------------------------------------------------
|
|
4559
|
-
|
|
4560
|
-
|
|
4379
|
+
calculateWidth() {
|
|
4380
|
+
return !_.isNaN(this.width) ? this.width : ViewUtil.getWidth(this.getContainer());
|
|
4561
4381
|
}
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
// Protected Properties
|
|
4565
|
-
//
|
|
4566
|
-
// --------------------------------------------------------------------------
|
|
4567
|
-
get nativeElement() {
|
|
4568
|
-
return this.element ? this.element.nativeElement : null;
|
|
4382
|
+
calculateHeight() {
|
|
4383
|
+
return !_.isNaN(this.height) ? this.height : ViewUtil.getHeight(this.getContainer());
|
|
4569
4384
|
}
|
|
4570
4385
|
// --------------------------------------------------------------------------
|
|
4571
4386
|
//
|
|
4572
|
-
//
|
|
4387
|
+
// Private Properties
|
|
4573
4388
|
//
|
|
4574
4389
|
// --------------------------------------------------------------------------
|
|
4575
|
-
get
|
|
4576
|
-
return this.
|
|
4390
|
+
get width() {
|
|
4391
|
+
return this._width;
|
|
4577
4392
|
}
|
|
4578
|
-
set
|
|
4579
|
-
|
|
4393
|
+
set width(value) {
|
|
4394
|
+
value = this.getConfig().parseWidth(value);
|
|
4395
|
+
if (value === this._width) {
|
|
4580
4396
|
return;
|
|
4581
4397
|
}
|
|
4582
|
-
this.
|
|
4583
|
-
|
|
4584
|
-
|
|
4398
|
+
this._width = value;
|
|
4399
|
+
this.commitSizeProperties();
|
|
4400
|
+
}
|
|
4401
|
+
get height() {
|
|
4402
|
+
return this._height;
|
|
4403
|
+
}
|
|
4404
|
+
set height(value) {
|
|
4405
|
+
value = this.getConfig().parseHeight(value);
|
|
4406
|
+
if (value === this._height) {
|
|
4407
|
+
return;
|
|
4585
4408
|
}
|
|
4409
|
+
this._height = value;
|
|
4410
|
+
this.commitSizeProperties();
|
|
4586
4411
|
}
|
|
4587
|
-
}
|
|
4588
|
-
WindowElement.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WindowElement, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4589
|
-
WindowElement.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: WindowElement, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
4590
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WindowElement, decorators: [{
|
|
4591
|
-
type: Component,
|
|
4592
|
-
args: [{ template: '' }]
|
|
4593
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
4594
|
-
|
|
4595
|
-
class WindowCloseElementComponent extends WindowElement {
|
|
4596
4412
|
// --------------------------------------------------------------------------
|
|
4597
4413
|
//
|
|
4598
|
-
//
|
|
4414
|
+
// Public Properties
|
|
4599
4415
|
//
|
|
4600
4416
|
// --------------------------------------------------------------------------
|
|
4601
|
-
|
|
4602
|
-
|
|
4417
|
+
get x() {
|
|
4418
|
+
return this._x;
|
|
4603
4419
|
}
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
// --------------------------------------------------------------------------
|
|
4609
|
-
createChildren() {
|
|
4610
|
-
super.createChildren();
|
|
4611
|
-
if (!_.isNil(WindowCloseElementComponent.ICON_VALUE)) {
|
|
4612
|
-
ViewUtil.setProperty(this.nativeElement, 'innerHTML', WindowCloseElementComponent.ICON_VALUE);
|
|
4613
|
-
}
|
|
4614
|
-
if (!_.isNil(WindowCloseElementComponent.ICON_CLASS)) {
|
|
4615
|
-
ViewUtil.addClasses(this.nativeElement, WindowCloseElementComponent.ICON_CLASS);
|
|
4420
|
+
set x(value) {
|
|
4421
|
+
value = this.getConfig().parseX(value);
|
|
4422
|
+
if (value === this._x) {
|
|
4423
|
+
return;
|
|
4616
4424
|
}
|
|
4617
|
-
|
|
4425
|
+
this._x = value;
|
|
4426
|
+
this.commitPositionProperties();
|
|
4618
4427
|
}
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
if (!_.isNil(this.window)) {
|
|
4627
|
-
this.window.close();
|
|
4428
|
+
get y() {
|
|
4429
|
+
return this._y;
|
|
4430
|
+
}
|
|
4431
|
+
set y(value) {
|
|
4432
|
+
value = this.getConfig().parseY(value);
|
|
4433
|
+
if (value === this._y) {
|
|
4434
|
+
return;
|
|
4628
4435
|
}
|
|
4436
|
+
this._y = value;
|
|
4437
|
+
this.commitPositionProperties();
|
|
4438
|
+
}
|
|
4439
|
+
get paddingTop() {
|
|
4440
|
+
return this.getConfig().paddingTop;
|
|
4441
|
+
}
|
|
4442
|
+
get paddingLeft() {
|
|
4443
|
+
return this.getConfig().paddingLeft;
|
|
4444
|
+
}
|
|
4445
|
+
get paddingRight() {
|
|
4446
|
+
return this.getConfig().paddingRight;
|
|
4447
|
+
}
|
|
4448
|
+
get paddingBottom() {
|
|
4449
|
+
return this.getConfig().paddingBottom;
|
|
4629
4450
|
}
|
|
4630
4451
|
}
|
|
4631
|
-
// --------------------------------------------------------------------------
|
|
4632
|
-
//
|
|
4633
|
-
// Constants
|
|
4634
|
-
//
|
|
4635
|
-
// --------------------------------------------------------------------------
|
|
4636
|
-
WindowCloseElementComponent.ICON_CLASS = 'fas fa-times';
|
|
4637
|
-
WindowCloseElementComponent.ICON_VALUE = null;
|
|
4638
|
-
WindowCloseElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WindowCloseElementComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4639
|
-
WindowCloseElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: WindowCloseElementComponent, selector: "vi-window-close-element", usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] });
|
|
4640
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WindowCloseElementComponent, decorators: [{
|
|
4641
|
-
type: Component,
|
|
4642
|
-
args: [{ selector: 'vi-window-close-element', template: '', styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] }]
|
|
4643
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
4644
4452
|
|
|
4645
|
-
class
|
|
4453
|
+
class WindowImpl extends WindowBase {
|
|
4646
4454
|
// --------------------------------------------------------------------------
|
|
4647
4455
|
//
|
|
4648
|
-
//
|
|
4456
|
+
// Constructor
|
|
4649
4457
|
//
|
|
4650
4458
|
// --------------------------------------------------------------------------
|
|
4651
|
-
constructor(
|
|
4652
|
-
super(
|
|
4459
|
+
constructor(properties) {
|
|
4460
|
+
super();
|
|
4461
|
+
// --------------------------------------------------------------------------
|
|
4462
|
+
//
|
|
4463
|
+
// Properties
|
|
4464
|
+
//
|
|
4465
|
+
// --------------------------------------------------------------------------
|
|
4466
|
+
this._isBlink = false;
|
|
4467
|
+
this._isShaking = false;
|
|
4468
|
+
this._isOnTop = false;
|
|
4469
|
+
this._isDisabled = false;
|
|
4470
|
+
this._isMinimized = false;
|
|
4471
|
+
this.isOpened = false;
|
|
4472
|
+
this.isWasOnTop = false;
|
|
4473
|
+
// --------------------------------------------------------------------------
|
|
4474
|
+
//
|
|
4475
|
+
// Protected Methods
|
|
4476
|
+
//
|
|
4477
|
+
// --------------------------------------------------------------------------
|
|
4478
|
+
this.setClosed = () => {
|
|
4479
|
+
this.isOpened = false;
|
|
4480
|
+
this.emit(WindowEvent.CLOSED);
|
|
4481
|
+
this.destroy();
|
|
4482
|
+
};
|
|
4483
|
+
this.setOpened = () => {
|
|
4484
|
+
this.isOpened = true;
|
|
4485
|
+
this.emit(WindowEvent.OPENED);
|
|
4486
|
+
};
|
|
4487
|
+
this.blinkToggle = () => {
|
|
4488
|
+
this.isBlink = !this.isBlink;
|
|
4489
|
+
};
|
|
4490
|
+
this.stopShaking = () => {
|
|
4491
|
+
this.isShaking = false;
|
|
4492
|
+
};
|
|
4493
|
+
this.emitResize = () => {
|
|
4494
|
+
this.emit(WindowEvent.RESIZED);
|
|
4495
|
+
};
|
|
4496
|
+
this.resizeHandler = () => {
|
|
4497
|
+
if (!this.isOpened) {
|
|
4498
|
+
return;
|
|
4499
|
+
}
|
|
4500
|
+
clearTimeout(this.resizeTimer);
|
|
4501
|
+
this.resizeTimer = setTimeout(this.emitResize, WindowImpl.RESIZE_DELAY);
|
|
4502
|
+
};
|
|
4503
|
+
this.mouseDownHandlerProxy = (event) => {
|
|
4504
|
+
this.mouseDownHandler(event);
|
|
4505
|
+
};
|
|
4506
|
+
this.mouseClickHandlerProxy = (event) => {
|
|
4507
|
+
this.mouseClickHandler(event);
|
|
4508
|
+
};
|
|
4509
|
+
this.observer = new Subject();
|
|
4510
|
+
this.elements = new Array();
|
|
4511
|
+
this.properties = properties;
|
|
4512
|
+
this.content.window = this;
|
|
4513
|
+
// Have to save for unsubscribe on destroy
|
|
4514
|
+
this._wrapper = this.properties.overlay.hostElement;
|
|
4515
|
+
this._backdrop = this.properties.overlay.backdropElement;
|
|
4516
|
+
this._container = this.properties.overlay.overlayElement;
|
|
4517
|
+
this.setProperties();
|
|
4518
|
+
this.getReference().afterOpened().pipe(takeUntil(this.destroyed)).subscribe(this.setOpened);
|
|
4519
|
+
this.getReference().afterClosed().pipe(takeUntil(this.destroyed)).subscribe(this.setClosed);
|
|
4520
|
+
this.events
|
|
4521
|
+
.pipe(filter(event => event === WindowEvent.CONTENT_READY), takeUntil(this.destroyed))
|
|
4522
|
+
.subscribe(this.updatePosition);
|
|
4653
4523
|
}
|
|
4654
4524
|
// --------------------------------------------------------------------------
|
|
4655
4525
|
//
|
|
4656
|
-
//
|
|
4526
|
+
// Elements Methods
|
|
4657
4527
|
//
|
|
4658
4528
|
// --------------------------------------------------------------------------
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4529
|
+
elementsCreate() {
|
|
4530
|
+
this.elements = new Array();
|
|
4531
|
+
}
|
|
4532
|
+
elementsDestroy() {
|
|
4533
|
+
this.elements.forEach(item => this.elementDestroy(item));
|
|
4534
|
+
this.elements = null;
|
|
4535
|
+
}
|
|
4536
|
+
elementAdd(item) {
|
|
4537
|
+
this.elements.push(item);
|
|
4538
|
+
item.instance.window = this;
|
|
4539
|
+
return item;
|
|
4540
|
+
}
|
|
4541
|
+
elementRemove(item) {
|
|
4542
|
+
ArrayUtil.remove(this.elements, item);
|
|
4543
|
+
this.elementDestroy(item);
|
|
4544
|
+
return item;
|
|
4545
|
+
}
|
|
4546
|
+
elementDestroy(item) {
|
|
4547
|
+
item.instance.window = null;
|
|
4548
|
+
item.destroy();
|
|
4549
|
+
return item;
|
|
4550
|
+
}
|
|
4551
|
+
setProperties() {
|
|
4552
|
+
super.setProperties();
|
|
4553
|
+
ViewUtil.addClass(this.container, 'vi-window');
|
|
4554
|
+
ViewUtil.toggleClass(this.container, 'vi-modal', this.config.isModal);
|
|
4555
|
+
this.container.addEventListener('click', this.mouseClickHandlerProxy, true);
|
|
4556
|
+
this.container.addEventListener('mousedown', this.mouseDownHandlerProxy);
|
|
4557
|
+
/*
|
|
4558
|
+
if (!this.config.isModal) {
|
|
4559
|
+
this.container.addEventListener('mousedown', this.mouseDownHandlerProxy);
|
|
4663
4560
|
}
|
|
4664
|
-
|
|
4665
|
-
|
|
4561
|
+
*/
|
|
4562
|
+
this.elementsCreate();
|
|
4563
|
+
}
|
|
4564
|
+
commitIsBlinkProperties() { }
|
|
4565
|
+
commitIsShakingProperties() { }
|
|
4566
|
+
commitIsDisabledProperties() { }
|
|
4567
|
+
commitIsOnTopProperties() {
|
|
4568
|
+
this.isBlink = false;
|
|
4569
|
+
}
|
|
4570
|
+
commitIsMinimizedProperties() {
|
|
4571
|
+
this.isBlink = false;
|
|
4572
|
+
}
|
|
4573
|
+
getConfig() {
|
|
4574
|
+
return this.properties.config;
|
|
4575
|
+
}
|
|
4576
|
+
getContainer() {
|
|
4577
|
+
return this.container;
|
|
4578
|
+
}
|
|
4579
|
+
getReference() {
|
|
4580
|
+
return this.properties.reference;
|
|
4581
|
+
}
|
|
4582
|
+
isNeedClickStopPropagation(event) {
|
|
4583
|
+
if (!this.isWasOnTop) {
|
|
4584
|
+
return true;
|
|
4666
4585
|
}
|
|
4667
|
-
|
|
4586
|
+
let element = _.find(this.elements, item => item.location.nativeElement === event.target);
|
|
4587
|
+
if (_.isNil(element)) {
|
|
4588
|
+
return false;
|
|
4589
|
+
}
|
|
4590
|
+
element.instance.clickHandler(event);
|
|
4591
|
+
return true;
|
|
4668
4592
|
}
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
if (!
|
|
4677
|
-
this.
|
|
4593
|
+
mouseDownHandler(event) {
|
|
4594
|
+
this.setOnTop();
|
|
4595
|
+
}
|
|
4596
|
+
mouseClickHandler(event) {
|
|
4597
|
+
if (this.isNeedClickStopPropagation(event)) {
|
|
4598
|
+
event.stopPropagation();
|
|
4599
|
+
}
|
|
4600
|
+
if (!this.isWasOnTop) {
|
|
4601
|
+
this.isWasOnTop = true;
|
|
4678
4602
|
}
|
|
4679
4603
|
}
|
|
4680
|
-
}
|
|
4681
|
-
// --------------------------------------------------------------------------
|
|
4682
|
-
//
|
|
4683
|
-
// Constants
|
|
4684
|
-
//
|
|
4685
|
-
// --------------------------------------------------------------------------
|
|
4686
|
-
WindowExpandElementComponent.ICON_CLASS = 'fas fa-angle-double-up';
|
|
4687
|
-
WindowExpandElementComponent.ICON_VALUE = null;
|
|
4688
|
-
WindowExpandElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WindowExpandElementComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4689
|
-
WindowExpandElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: WindowExpandElementComponent, selector: "vi-window-expand-element", usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] });
|
|
4690
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WindowExpandElementComponent, decorators: [{
|
|
4691
|
-
type: Component,
|
|
4692
|
-
args: [{ selector: 'vi-window-expand-element', template: '', styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] }]
|
|
4693
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
4694
|
-
|
|
4695
|
-
class WindowResizeElementComponent extends WindowElement {
|
|
4696
4604
|
// --------------------------------------------------------------------------
|
|
4697
4605
|
//
|
|
4698
|
-
//
|
|
4606
|
+
// Public Methods
|
|
4699
4607
|
//
|
|
4700
4608
|
// --------------------------------------------------------------------------
|
|
4701
|
-
|
|
4702
|
-
|
|
4609
|
+
emit(event) {
|
|
4610
|
+
this.observer.next(event);
|
|
4703
4611
|
}
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
super.createChildren();
|
|
4711
|
-
if (!_.isNil(WindowResizeElementComponent.ICON_VALUE)) {
|
|
4712
|
-
ViewUtil.setProperty(this.nativeElement, 'innerHTML', WindowResizeElementComponent.ICON_VALUE);
|
|
4612
|
+
close() {
|
|
4613
|
+
this.getReference().close();
|
|
4614
|
+
}
|
|
4615
|
+
destroy() {
|
|
4616
|
+
if (this.isDestroyed) {
|
|
4617
|
+
return;
|
|
4713
4618
|
}
|
|
4714
|
-
|
|
4715
|
-
|
|
4619
|
+
super.destroy();
|
|
4620
|
+
this.elementsDestroy();
|
|
4621
|
+
this._container.removeEventListener('click', this.mouseClickHandlerProxy, true);
|
|
4622
|
+
this._container.removeEventListener('mousedown', this.mouseDownHandlerProxy);
|
|
4623
|
+
if (!_.isNil(this.content)) {
|
|
4624
|
+
this.content.destroy();
|
|
4625
|
+
}
|
|
4626
|
+
if (!_.isNil(this.observer)) {
|
|
4627
|
+
this.observer.complete();
|
|
4628
|
+
this.observer = null;
|
|
4629
|
+
}
|
|
4630
|
+
this.properties = null;
|
|
4631
|
+
this._wrapper = null;
|
|
4632
|
+
this._backdrop = null;
|
|
4633
|
+
this._container = null;
|
|
4634
|
+
clearInterval(this.shakeTimer);
|
|
4635
|
+
this.shakeTimer = null;
|
|
4636
|
+
clearTimeout(this.resizeTimer);
|
|
4637
|
+
this.resizeTimer = null;
|
|
4638
|
+
}
|
|
4639
|
+
blink() {
|
|
4640
|
+
this.isBlink = true;
|
|
4641
|
+
}
|
|
4642
|
+
shake() {
|
|
4643
|
+
if (this.isShaking) {
|
|
4644
|
+
return;
|
|
4716
4645
|
}
|
|
4717
|
-
|
|
4646
|
+
this.isShaking = true;
|
|
4647
|
+
clearInterval(this.shakeTimer);
|
|
4648
|
+
this.shakeTimer = setInterval(this.stopShaking, WindowImpl.SHAKE_DELAY);
|
|
4649
|
+
}
|
|
4650
|
+
setOnTop() {
|
|
4651
|
+
this.isWasOnTop = this.isOnTop;
|
|
4652
|
+
this.emit(WindowEvent.SET_ON_TOP);
|
|
4718
4653
|
}
|
|
4719
4654
|
// --------------------------------------------------------------------------
|
|
4720
4655
|
//
|
|
4721
|
-
//
|
|
4656
|
+
// Size Methods
|
|
4722
4657
|
//
|
|
4723
4658
|
// --------------------------------------------------------------------------
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4659
|
+
getWidth() {
|
|
4660
|
+
return this.width;
|
|
4661
|
+
}
|
|
4662
|
+
getHeight() {
|
|
4663
|
+
return this.height;
|
|
4664
|
+
}
|
|
4665
|
+
setWidth(value, isNeedNotify = true) {
|
|
4666
|
+
this.width = value;
|
|
4667
|
+
if (isNeedNotify) {
|
|
4668
|
+
this.resizeHandler();
|
|
4728
4669
|
}
|
|
4729
4670
|
}
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
type: Component,
|
|
4742
|
-
args: [{ selector: 'vi-window-resize-element', template: '', styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] }]
|
|
4743
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
4744
|
-
|
|
4745
|
-
class WindowMinimizeElementComponent extends WindowElement {
|
|
4671
|
+
setHeight(value, isNeedNotify = true) {
|
|
4672
|
+
this.height = value;
|
|
4673
|
+
if (isNeedNotify) {
|
|
4674
|
+
this.resizeHandler();
|
|
4675
|
+
}
|
|
4676
|
+
}
|
|
4677
|
+
setSize(width, height) {
|
|
4678
|
+
this.setWidth(width, false);
|
|
4679
|
+
this.setHeight(height, false);
|
|
4680
|
+
this.resizeHandler();
|
|
4681
|
+
}
|
|
4746
4682
|
// --------------------------------------------------------------------------
|
|
4747
4683
|
//
|
|
4748
|
-
//
|
|
4684
|
+
// Move Methods
|
|
4749
4685
|
//
|
|
4750
4686
|
// --------------------------------------------------------------------------
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4687
|
+
getX() {
|
|
4688
|
+
return this.x;
|
|
4689
|
+
}
|
|
4690
|
+
setX(value, isNeedNotify = true) {
|
|
4691
|
+
this.x = value;
|
|
4692
|
+
if (isNeedNotify) {
|
|
4693
|
+
this.emit(WindowEvent.MOVED);
|
|
4694
|
+
}
|
|
4695
|
+
}
|
|
4696
|
+
getY() {
|
|
4697
|
+
return this.y;
|
|
4698
|
+
}
|
|
4699
|
+
setY(value, isNeedNotify = true) {
|
|
4700
|
+
this.y = value;
|
|
4701
|
+
if (isNeedNotify) {
|
|
4702
|
+
this.emit(WindowEvent.MOVED);
|
|
4703
|
+
}
|
|
4704
|
+
}
|
|
4705
|
+
move(x, y) {
|
|
4706
|
+
this.setX(x, false);
|
|
4707
|
+
this.setY(y, false);
|
|
4708
|
+
this.emit(WindowEvent.MOVED);
|
|
4762
4709
|
}
|
|
4763
4710
|
// --------------------------------------------------------------------------
|
|
4764
4711
|
//
|
|
4765
|
-
//
|
|
4712
|
+
// Private Properties
|
|
4766
4713
|
//
|
|
4767
4714
|
// --------------------------------------------------------------------------
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
this.window.events.pipe(takeUntil(this.destroyed)).subscribe(event => {
|
|
4771
|
-
if (event === WindowEvent.MINIMIZED_CHANGED) {
|
|
4772
|
-
this.commitIconProperties();
|
|
4773
|
-
}
|
|
4774
|
-
});
|
|
4715
|
+
get isBlink() {
|
|
4716
|
+
return this._isBlink;
|
|
4775
4717
|
}
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
ViewUtil.setProperty(this.nativeElement, 'innerHTML', WindowMinimizeElementComponent.ICON_MINIMIZE_VALUE);
|
|
4718
|
+
set isBlink(value) {
|
|
4719
|
+
if (value === this._isBlink) {
|
|
4720
|
+
return;
|
|
4780
4721
|
}
|
|
4781
|
-
|
|
4782
|
-
|
|
4722
|
+
this._isBlink = value;
|
|
4723
|
+
this.commitIsBlinkProperties();
|
|
4724
|
+
}
|
|
4725
|
+
get isShaking() {
|
|
4726
|
+
return this._isShaking;
|
|
4727
|
+
}
|
|
4728
|
+
set isShaking(value) {
|
|
4729
|
+
if (value === this._isShaking) {
|
|
4730
|
+
return;
|
|
4783
4731
|
}
|
|
4784
|
-
|
|
4732
|
+
this._isShaking = value;
|
|
4733
|
+
this.commitIsShakingProperties();
|
|
4785
4734
|
}
|
|
4786
4735
|
// --------------------------------------------------------------------------
|
|
4787
4736
|
//
|
|
4788
|
-
//
|
|
4737
|
+
// Public Properties
|
|
4789
4738
|
//
|
|
4790
4739
|
// --------------------------------------------------------------------------
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4740
|
+
get events() {
|
|
4741
|
+
return this.observer.asObservable();
|
|
4742
|
+
}
|
|
4743
|
+
get config() {
|
|
4744
|
+
return this.properties.config;
|
|
4745
|
+
}
|
|
4746
|
+
get content() {
|
|
4747
|
+
return this.properties.reference ? this.properties.reference.componentInstance : null;
|
|
4748
|
+
}
|
|
4749
|
+
get container() {
|
|
4750
|
+
return this._container;
|
|
4751
|
+
}
|
|
4752
|
+
get wrapper() {
|
|
4753
|
+
return this._wrapper;
|
|
4754
|
+
}
|
|
4755
|
+
get backdrop() {
|
|
4756
|
+
return this._backdrop;
|
|
4757
|
+
}
|
|
4758
|
+
get isOnTop() {
|
|
4759
|
+
return this._isOnTop;
|
|
4760
|
+
}
|
|
4761
|
+
set isOnTop(value) {
|
|
4762
|
+
if (value === this._isOnTop) {
|
|
4763
|
+
return;
|
|
4764
|
+
}
|
|
4765
|
+
this._isOnTop = value;
|
|
4766
|
+
this.commitIsOnTopProperties();
|
|
4767
|
+
this.emit(WindowEvent.IS_ON_TOP_CHANGED);
|
|
4768
|
+
}
|
|
4769
|
+
get isMinimized() {
|
|
4770
|
+
return this._isMinimized;
|
|
4771
|
+
}
|
|
4772
|
+
set isMinimized(value) {
|
|
4773
|
+
if (value === this._isMinimized) {
|
|
4774
|
+
return;
|
|
4775
|
+
}
|
|
4776
|
+
this._isMinimized = value;
|
|
4777
|
+
this.commitIsMinimizedProperties();
|
|
4778
|
+
this.emit(WindowEvent.MINIMIZED_CHANGED);
|
|
4779
|
+
}
|
|
4780
|
+
get isDisabled() {
|
|
4781
|
+
return this._isDisabled;
|
|
4782
|
+
}
|
|
4783
|
+
set isDisabled(value) {
|
|
4784
|
+
if (value === this._isDisabled) {
|
|
4785
|
+
return;
|
|
4795
4786
|
}
|
|
4787
|
+
this._isDisabled = value;
|
|
4788
|
+
this.commitIsDisabledProperties();
|
|
4789
|
+
this.emit(WindowEvent.DISABLED_CHANGED);
|
|
4796
4790
|
}
|
|
4797
4791
|
}
|
|
4798
4792
|
// --------------------------------------------------------------------------
|
|
4799
4793
|
//
|
|
4800
|
-
//
|
|
4794
|
+
// Constants
|
|
4801
4795
|
//
|
|
4802
4796
|
// --------------------------------------------------------------------------
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
WindowMinimizeElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WindowMinimizeElementComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4807
|
-
WindowMinimizeElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: WindowMinimizeElementComponent, selector: "vi-window-minimize-element", usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] });
|
|
4808
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WindowMinimizeElementComponent, decorators: [{
|
|
4809
|
-
type: Component,
|
|
4810
|
-
args: [{ selector: 'vi-window-minimize-element', template: '', styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] }]
|
|
4811
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
4797
|
+
WindowImpl.BLINK_DELAY = 500;
|
|
4798
|
+
WindowImpl.SHAKE_DELAY = 500;
|
|
4799
|
+
WindowImpl.RESIZE_DELAY = 200;
|
|
4812
4800
|
|
|
4813
4801
|
class WindowResizeable extends WindowImpl {
|
|
4814
4802
|
// --------------------------------------------------------------------------
|
|
@@ -5047,34 +5035,19 @@ class BottomSheetBaseComponent extends BottomSheetImpl {
|
|
|
5047
5035
|
this.elementAdd(this.content.container.createComponent(BottomSheetBaseComponent.EXPAND_COMPONENT));
|
|
5048
5036
|
}
|
|
5049
5037
|
}
|
|
5050
|
-
commitIsBlinkProperties() {
|
|
5051
|
-
ViewUtil.toggleClass(this.container, this.blinkClass, this.isBlink);
|
|
5052
|
-
}
|
|
5053
5038
|
commitIsDisabledProperties() {
|
|
5054
5039
|
ViewUtil.toggleClass(this.container, this.disabledClass, this.isDisabled);
|
|
5055
5040
|
ViewUtil.toggleClass(this.content.element, this.disabledClass, this.isDisabled);
|
|
5056
5041
|
ViewUtil.toggleClass(this.content.element.nativeElement.parentElement, this.disabledClass, this.isDisabled);
|
|
5057
5042
|
}
|
|
5058
|
-
commitIsShakingProperties() {
|
|
5059
|
-
ViewUtil.toggleClass(this.container, this.shakingClass, this.isShaking);
|
|
5060
|
-
}
|
|
5061
5043
|
// --------------------------------------------------------------------------
|
|
5062
5044
|
//
|
|
5063
5045
|
// Protected Properties
|
|
5064
5046
|
//
|
|
5065
5047
|
// --------------------------------------------------------------------------
|
|
5066
|
-
get blinkClass() {
|
|
5067
|
-
return 'vi-blink';
|
|
5068
|
-
}
|
|
5069
5048
|
get disabledClass() {
|
|
5070
5049
|
return 'vi-disabled';
|
|
5071
5050
|
}
|
|
5072
|
-
get minimizedClass() {
|
|
5073
|
-
return 'vi-minimized';
|
|
5074
|
-
}
|
|
5075
|
-
get shakingClass() {
|
|
5076
|
-
return 'shake-constant shake-horizontal';
|
|
5077
|
-
}
|
|
5078
5051
|
}
|
|
5079
5052
|
// --------------------------------------------------------------------------
|
|
5080
5053
|
//
|
|
@@ -5105,7 +5078,7 @@ class BottomSheetService extends Destroyable {
|
|
|
5105
5078
|
// --------------------------------------------------------------------------
|
|
5106
5079
|
open(component, config) {
|
|
5107
5080
|
let reference = this.dialog.open(component, config);
|
|
5108
|
-
let window = this.factory.create({ config, reference: reference, overlay: reference.
|
|
5081
|
+
let window = this.factory.create({ config, reference: reference, overlay: reference['_ref'].overlayRef });
|
|
5109
5082
|
this.observer.next(new ObservableData(WindowServiceEvent.OPEN_STARTED, window));
|
|
5110
5083
|
let subscription = window.events.subscribe(event => {
|
|
5111
5084
|
switch (event) {
|
|
@@ -5654,55 +5627,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
5654
5627
|
}]
|
|
5655
5628
|
}], ctorParameters: function () { return []; } });
|
|
5656
5629
|
|
|
5657
|
-
class FinancePipe {
|
|
5658
|
-
// --------------------------------------------------------------------------
|
|
5659
|
-
//
|
|
5660
|
-
// Static Methods
|
|
5661
|
-
//
|
|
5662
|
-
// --------------------------------------------------------------------------
|
|
5663
|
-
static format(value, format) {
|
|
5664
|
-
value = Number(value);
|
|
5665
|
-
try {
|
|
5666
|
-
return numeral(value).format(format);
|
|
5667
|
-
}
|
|
5668
|
-
catch (error) {
|
|
5669
|
-
return value.toString();
|
|
5670
|
-
}
|
|
5671
|
-
}
|
|
5672
|
-
// --------------------------------------------------------------------------
|
|
5673
|
-
//
|
|
5674
|
-
// Public Methods
|
|
5675
|
-
//
|
|
5676
|
-
// --------------------------------------------------------------------------
|
|
5677
|
-
transform(value, format, isNeedPlus = false) {
|
|
5678
|
-
value = Number(value);
|
|
5679
|
-
if (_.isNaN(value)) {
|
|
5680
|
-
return '---';
|
|
5681
|
-
}
|
|
5682
|
-
if (_.isNil(format)) {
|
|
5683
|
-
format = FinancePipe.DEFAULT_FORMAT;
|
|
5684
|
-
}
|
|
5685
|
-
if (isNeedPlus) {
|
|
5686
|
-
format = '+' + format;
|
|
5687
|
-
}
|
|
5688
|
-
return FinancePipe.format(value, format);
|
|
5689
|
-
}
|
|
5690
|
-
}
|
|
5691
|
-
// --------------------------------------------------------------------------
|
|
5692
|
-
//
|
|
5693
|
-
// Static Properties
|
|
5694
|
-
//
|
|
5695
|
-
// --------------------------------------------------------------------------
|
|
5696
|
-
FinancePipe.DEFAULT_FORMAT = '0,0';
|
|
5697
|
-
FinancePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: FinancePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
5698
|
-
FinancePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: FinancePipe, name: "viFinance" });
|
|
5699
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: FinancePipe, decorators: [{
|
|
5700
|
-
type: Pipe,
|
|
5701
|
-
args: [{
|
|
5702
|
-
name: 'viFinance'
|
|
5703
|
-
}]
|
|
5704
|
-
}] });
|
|
5705
|
-
|
|
5706
5630
|
class MomentDatePipe {
|
|
5707
5631
|
// --------------------------------------------------------------------------
|
|
5708
5632
|
//
|
|
@@ -6472,7 +6396,7 @@ class ThemeStyleDirective extends Destroyable {
|
|
|
6472
6396
|
super();
|
|
6473
6397
|
this.theme = theme;
|
|
6474
6398
|
this.element = ViewUtil.parseElement(element.nativeElement);
|
|
6475
|
-
this.theme.changed.pipe(takeUntil(this.destroyed)).subscribe(() => this.
|
|
6399
|
+
this.theme.changed.pipe(takeUntil(this.destroyed)).subscribe(() => this.stylePropertiesCheck());
|
|
6476
6400
|
}
|
|
6477
6401
|
// --------------------------------------------------------------------------
|
|
6478
6402
|
//
|
|
@@ -6918,7 +6842,7 @@ class WindowService extends Destroyable {
|
|
|
6918
6842
|
// let dialog = this.dialog as any;
|
|
6919
6843
|
// dialog._getOverlayState = config.isModal ? dialog.getOverlayStateModal : dialog.getOverlayStateNonModal;
|
|
6920
6844
|
let reference = this.dialog.open(component, config);
|
|
6921
|
-
window = this.factory.create({ config, reference, overlay: reference.
|
|
6845
|
+
window = this.factory.create({ config, reference, overlay: reference['_ref'].overlayRef });
|
|
6922
6846
|
this.observer.next(new ObservableData(WindowServiceEvent.OPEN_STARTED, window));
|
|
6923
6847
|
let subscription = window.events.subscribe(event => {
|
|
6924
6848
|
switch (event) {
|
|
@@ -7272,8 +7196,9 @@ class MenuTriggerForDirective extends MatMenuTrigger {
|
|
|
7272
7196
|
//
|
|
7273
7197
|
//--------------------------------------------------------------------------
|
|
7274
7198
|
openMenuOn(target) {
|
|
7275
|
-
if (_.isNil(target))
|
|
7199
|
+
if (_.isNil(target)) {
|
|
7276
7200
|
return;
|
|
7201
|
+
}
|
|
7277
7202
|
this.openMenu();
|
|
7278
7203
|
let strategy = this.getPositionStrategy();
|
|
7279
7204
|
if (strategy instanceof FlexibleConnectedPositionStrategy) {
|
|
@@ -7287,7 +7212,8 @@ class MenuTriggerForDirective extends MatMenuTrigger {
|
|
|
7287
7212
|
//
|
|
7288
7213
|
//--------------------------------------------------------------------------
|
|
7289
7214
|
getPositionStrategy() {
|
|
7290
|
-
|
|
7215
|
+
let reference = this['_overlayRef'];
|
|
7216
|
+
return !_.isNil(reference) ? reference.getConfig().positionStrategy : null;
|
|
7291
7217
|
}
|
|
7292
7218
|
//--------------------------------------------------------------------------
|
|
7293
7219
|
//
|
|
@@ -7543,6 +7469,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
7543
7469
|
}] } });
|
|
7544
7470
|
|
|
7545
7471
|
class TabGroupComponent extends DestroyableContainer {
|
|
7472
|
+
constructor() {
|
|
7473
|
+
super(...arguments);
|
|
7474
|
+
this.isStretch = true;
|
|
7475
|
+
}
|
|
7546
7476
|
// --------------------------------------------------------------------------
|
|
7547
7477
|
//
|
|
7548
7478
|
// Protected Methods
|
|
@@ -7554,7 +7484,12 @@ class TabGroupComponent extends DestroyableContainer {
|
|
|
7554
7484
|
// Event Handlers
|
|
7555
7485
|
//
|
|
7556
7486
|
// --------------------------------------------------------------------------
|
|
7557
|
-
|
|
7487
|
+
selectedIndexChanged(event) {
|
|
7488
|
+
if (!_.isNil(this.list)) {
|
|
7489
|
+
this.list.selectedIndex = event;
|
|
7490
|
+
}
|
|
7491
|
+
}
|
|
7492
|
+
selectedTabChanged(event) {
|
|
7558
7493
|
if (_.isNil(this.list)) {
|
|
7559
7494
|
return;
|
|
7560
7495
|
}
|
|
@@ -7597,12 +7532,14 @@ class TabGroupComponent extends DestroyableContainer {
|
|
|
7597
7532
|
}
|
|
7598
7533
|
}
|
|
7599
7534
|
TabGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TabGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7600
|
-
TabGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: TabGroupComponent, selector: "vi-tab-group", inputs: { className: "className", list: "list" }, usesInheritance: true, ngImport: i0, template: "<mat-tab-group
|
|
7535
|
+
TabGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: TabGroupComponent, selector: "vi-tab-group", inputs: { className: "className", isStretch: "isStretch", list: "list" }, usesInheritance: true, ngImport: i0, template: "<mat-tab-group\n [ngClass]=\"className\"\n [mat-stretch-tabs]=\"isStretch\"\n [selectedIndex]=\"list?.selectedIndex\"\n (selectedIndexChange)=\"selectedIndexChanged($event)\"\n (selectedTabChange)=\"selectedTabChanged($event)\"\n>\n <mat-tab\n [ngClass]=\"item.className\"\n [label]=\"item.label\"\n [disabled]=\"!item.isEnabled\"\n (click)=\"list?.actionItem(item)\"\n *ngFor=\"let item of list?.collection\"\n ></mat-tab>\n</mat-tab-group>\n", dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2$2.MatTab, selector: "mat-tab", inputs: ["disabled"], exportAs: ["matTab"] }, { kind: "component", type: i2$2.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple", "fitInkBarToContent", "mat-stretch-tabs"], exportAs: ["matTabGroup"] }] });
|
|
7601
7536
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TabGroupComponent, decorators: [{
|
|
7602
7537
|
type: Component,
|
|
7603
|
-
args: [{ selector: 'vi-tab-group', template: "<mat-tab-group
|
|
7538
|
+
args: [{ selector: 'vi-tab-group', template: "<mat-tab-group\n [ngClass]=\"className\"\n [mat-stretch-tabs]=\"isStretch\"\n [selectedIndex]=\"list?.selectedIndex\"\n (selectedIndexChange)=\"selectedIndexChanged($event)\"\n (selectedTabChange)=\"selectedTabChanged($event)\"\n>\n <mat-tab\n [ngClass]=\"item.className\"\n [label]=\"item.label\"\n [disabled]=\"!item.isEnabled\"\n (click)=\"list?.actionItem(item)\"\n *ngFor=\"let item of list?.collection\"\n ></mat-tab>\n</mat-tab-group>\n" }]
|
|
7604
7539
|
}], propDecorators: { className: [{
|
|
7605
7540
|
type: Input
|
|
7541
|
+
}], isStretch: [{
|
|
7542
|
+
type: Input
|
|
7606
7543
|
}], list: [{
|
|
7607
7544
|
type: Input
|
|
7608
7545
|
}] } });
|
|
@@ -10328,4 +10265,3 @@ class TransportLazyModule {
|
|
|
10328
10265
|
|
|
10329
10266
|
export { APPLICATION_INJECTOR, ApplicationBaseComponent, ApplicationComponent, AspectRatioResizeDirective, AssetBackgroundDirective, AssetBackgroundPipe, AssetFilePipe, AssetIconPipe, AssetImagePipe, AssetModule, AssetSoundPipe, AssetVideoPipe, AutoScrollBottomDirective, BootstrapBreakpoint, BootstrapBreakpointService, BootstrapBreakpointServiceEvent, BottomSheetBaseComponent, BottomSheetModule, 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, IsBrowserDirective, IsServerDirective, 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, ThemeAssetIconDirective, 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 };
|
|
10330
10267
|
//# sourceMappingURL=ts-core-angular.mjs.map
|
|
10331
|
-
//# sourceMappingURL=ts-core-angular.mjs.map
|