@ts-core/angular 13.0.56 → 13.0.59
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/esm2020/bottomSheet/BottomSheetImpl.mjs +4 -1
- package/esm2020/window/WindowImpl.mjs +6 -3
- package/esm2020/window/WindowService.mjs +34 -10
- package/esm2020/window/component/WindowDragable.mjs +2 -3
- package/esm2020/window/component/WindowResizeable.mjs +1 -3
- package/fesm2015/ts-core-angular.mjs +42 -15
- package/fesm2015/ts-core-angular.mjs.map +1 -1
- package/fesm2020/ts-core-angular.mjs +42 -15
- package/fesm2020/ts-core-angular.mjs.map +1 -1
- package/package.json +2 -2
- package/window/WindowService.d.ts +3 -0
|
@@ -4120,9 +4120,12 @@ class WindowImpl extends WindowBase {
|
|
|
4120
4120
|
ViewUtil.addClass(this.container, 'vi-window');
|
|
4121
4121
|
ViewUtil.toggleClass(this.container, 'vi-modal', this.config.isModal);
|
|
4122
4122
|
this.container.addEventListener('click', this.mouseClickHandlerProxy, true);
|
|
4123
|
+
this.container.addEventListener('mousedown', this.mouseDownHandlerProxy);
|
|
4124
|
+
/*
|
|
4123
4125
|
if (!this.config.isModal) {
|
|
4124
4126
|
this.container.addEventListener('mousedown', this.mouseDownHandlerProxy);
|
|
4125
4127
|
}
|
|
4128
|
+
*/
|
|
4126
4129
|
this.elementsCreate();
|
|
4127
4130
|
}
|
|
4128
4131
|
commitIsBlinkProperties() { }
|
|
@@ -4140,8 +4143,8 @@ class WindowImpl extends WindowBase {
|
|
|
4140
4143
|
}
|
|
4141
4144
|
isNeedClickStopPropagation(event) {
|
|
4142
4145
|
// return !this.isWasOnTop;
|
|
4143
|
-
if (this.isWasOnTop) {
|
|
4144
|
-
return
|
|
4146
|
+
if (!this.isWasOnTop && !this.isOnTop) {
|
|
4147
|
+
return true;
|
|
4145
4148
|
}
|
|
4146
4149
|
let element = _.find(this.elements, item => item.location.nativeElement === event.target);
|
|
4147
4150
|
if (_.isNil(element)) {
|
|
@@ -4370,7 +4373,6 @@ WindowImpl.BLINK_DELAY = 500;
|
|
|
4370
4373
|
WindowImpl.SHAKE_DELAY = 500;
|
|
4371
4374
|
WindowImpl.RESIZE_DELAY = 200;
|
|
4372
4375
|
|
|
4373
|
-
// import { ResizableOptions } from '@interactjs/types';
|
|
4374
4376
|
class WindowResizeable extends WindowImpl {
|
|
4375
4377
|
// --------------------------------------------------------------------------
|
|
4376
4378
|
//
|
|
@@ -4391,7 +4393,6 @@ class WindowResizeable extends WindowImpl {
|
|
|
4391
4393
|
edges.left = true;
|
|
4392
4394
|
edges.right = true;
|
|
4393
4395
|
edges.bottom = true;
|
|
4394
|
-
// let param = {} as ResizableOptions;
|
|
4395
4396
|
let param = {};
|
|
4396
4397
|
param.edges = edges;
|
|
4397
4398
|
this.interactable.resizable(param);
|
|
@@ -4456,7 +4457,6 @@ class WindowResizeable extends WindowImpl {
|
|
|
4456
4457
|
}
|
|
4457
4458
|
}
|
|
4458
4459
|
|
|
4459
|
-
// import { DraggableOptions } from '@interactjs/types';
|
|
4460
4460
|
class WindowDragable extends WindowResizeable {
|
|
4461
4461
|
constructor() {
|
|
4462
4462
|
// --------------------------------------------------------------------------
|
|
@@ -4483,8 +4483,8 @@ class WindowDragable extends WindowResizeable {
|
|
|
4483
4483
|
}
|
|
4484
4484
|
this.dragMoveHandlerProxy = this.dragMoveHandler.bind(this);
|
|
4485
4485
|
this.dragStartHandlerProxy = this.dragStartHandler.bind(this);
|
|
4486
|
-
// let param = {} as DraggableOptions;
|
|
4487
4486
|
let param = {};
|
|
4487
|
+
// let param = {} as any;
|
|
4488
4488
|
this.interactable.draggable(param);
|
|
4489
4489
|
this.interactable.on('dragmove', this.dragMoveHandlerProxy);
|
|
4490
4490
|
this.interactable.on('dragstart', this.dragStartHandlerProxy);
|
|
@@ -4593,6 +4593,7 @@ WindowBaseComponent.RESIZE_COMPONENT = WindowResizeElementComponent;
|
|
|
4593
4593
|
WindowBaseComponent.MINIMIZE_COMPONENT = WindowMinimizeElementComponent;
|
|
4594
4594
|
|
|
4595
4595
|
class WindowService extends Destroyable {
|
|
4596
|
+
// public topZIndex: number = 1001;
|
|
4596
4597
|
// --------------------------------------------------------------------------
|
|
4597
4598
|
//
|
|
4598
4599
|
// Constructor
|
|
@@ -4612,7 +4613,7 @@ class WindowService extends Destroyable {
|
|
|
4612
4613
|
this.paddingBottom = 25;
|
|
4613
4614
|
this.defaultVerticalAlign = WindowAlign.CENTER;
|
|
4614
4615
|
this.defaultHorizontalAlign = WindowAlign.CENTER;
|
|
4615
|
-
this.topZIndex =
|
|
4616
|
+
this.topZIndex = WindowService.Z_INDEX_MAX;
|
|
4616
4617
|
this._windows = new Map();
|
|
4617
4618
|
this.dialog = dialog;
|
|
4618
4619
|
this.language = language;
|
|
@@ -4623,23 +4624,40 @@ class WindowService extends Destroyable {
|
|
|
4623
4624
|
}
|
|
4624
4625
|
// --------------------------------------------------------------------------
|
|
4625
4626
|
//
|
|
4627
|
+
// Static Methods
|
|
4628
|
+
//
|
|
4629
|
+
// --------------------------------------------------------------------------
|
|
4630
|
+
static getZIndex(window) {
|
|
4631
|
+
return !_.isNil(window) && !_.isNil(window.container) ? parseInt(ViewUtil.getStyle(window.container.parentElement, 'zIndex'), 10) : -1;
|
|
4632
|
+
}
|
|
4633
|
+
static setZIndex(window, index) {
|
|
4634
|
+
if (_.isNil(window)) {
|
|
4635
|
+
return;
|
|
4636
|
+
}
|
|
4637
|
+
if (!_.isNil(window.backdrop)) {
|
|
4638
|
+
ViewUtil.setStyle(window.backdrop, 'zIndex', index);
|
|
4639
|
+
}
|
|
4640
|
+
if (!_.isNil(window.wrapper)) {
|
|
4641
|
+
ViewUtil.setStyle(window.wrapper, 'zIndex', index);
|
|
4642
|
+
}
|
|
4643
|
+
}
|
|
4644
|
+
// --------------------------------------------------------------------------
|
|
4645
|
+
//
|
|
4626
4646
|
// Private Methods
|
|
4627
4647
|
//
|
|
4628
4648
|
// --------------------------------------------------------------------------
|
|
4629
4649
|
sortFunction(first, second) {
|
|
4630
|
-
|
|
4631
|
-
let secondIndex = second.container ? parseInt(ViewUtil.getStyle(second.container.parentElement, 'zIndex'), 10) : -1;
|
|
4632
|
-
return firstIndex > secondIndex ? -1 : 1;
|
|
4650
|
+
return WindowService.getZIndex(first) > WindowService.getZIndex(second) ? -1 : 1;
|
|
4633
4651
|
}
|
|
4634
4652
|
updateTop() {
|
|
4635
4653
|
let zIndex = 0;
|
|
4636
4654
|
let topWindow = null;
|
|
4637
|
-
let windows = [this.
|
|
4655
|
+
let windows = [...this.windowsArray, this.sheet.window];
|
|
4638
4656
|
for (let window of windows) {
|
|
4639
4657
|
if (_.isNil(window) || _.isNil(window.container)) {
|
|
4640
4658
|
continue;
|
|
4641
4659
|
}
|
|
4642
|
-
let index =
|
|
4660
|
+
let index = WindowService.getZIndex(window);
|
|
4643
4661
|
if (zIndex >= index) {
|
|
4644
4662
|
continue;
|
|
4645
4663
|
}
|
|
@@ -4654,14 +4672,14 @@ class WindowService extends Destroyable {
|
|
|
4654
4672
|
}
|
|
4655
4673
|
setWindowOnTop(topWindow) {
|
|
4656
4674
|
let currentIndex = this.topZIndex - 2;
|
|
4657
|
-
|
|
4675
|
+
let windows = [...this.windowsArray, this.sheet.window];
|
|
4676
|
+
for (let window of windows) {
|
|
4658
4677
|
if (_.isNil(window.container)) {
|
|
4659
4678
|
continue;
|
|
4660
4679
|
}
|
|
4661
4680
|
window.isOnTop = window === topWindow;
|
|
4662
4681
|
let zIndex = window.isOnTop ? this.topZIndex : currentIndex--;
|
|
4663
|
-
|
|
4664
|
-
ViewUtil.setStyle(window.wrapper, 'zIndex', zIndex);
|
|
4682
|
+
WindowService.setZIndex(window, zIndex);
|
|
4665
4683
|
}
|
|
4666
4684
|
this.windowsArray.sort(this.sortFunction);
|
|
4667
4685
|
this.observer.next(new ObservableData(WindowServiceEvent.SETTED_ON_TOP, topWindow));
|
|
@@ -4867,6 +4885,12 @@ class WindowService extends Destroyable {
|
|
|
4867
4885
|
return this._windows;
|
|
4868
4886
|
}
|
|
4869
4887
|
}
|
|
4888
|
+
// --------------------------------------------------------------------------
|
|
4889
|
+
//
|
|
4890
|
+
// Constants
|
|
4891
|
+
//
|
|
4892
|
+
// --------------------------------------------------------------------------
|
|
4893
|
+
WindowService.Z_INDEX_MAX = 1000;
|
|
4870
4894
|
WindowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowService, deps: [{ token: i1.MatDialog }, { token: i1$1.LanguageService }, { token: CookieService }, { token: BottomSheetService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4871
4895
|
WindowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowService, providedIn: 'root' });
|
|
4872
4896
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowService, decorators: [{
|
|
@@ -5002,9 +5026,12 @@ class BottomSheetImpl extends DestroyableContainer {
|
|
|
5002
5026
|
ViewUtil.addClass(this.container, 'vi-bottom-sheet');
|
|
5003
5027
|
ViewUtil.toggleClass(this.container, 'vi-modal', this.config.isModal);
|
|
5004
5028
|
this.container.addEventListener('click', this.mouseClickHandlerProxy, true);
|
|
5029
|
+
this.container.addEventListener('mousedown', this.mouseDownHandlerProxy);
|
|
5030
|
+
/*
|
|
5005
5031
|
if (!this.config.isModal) {
|
|
5006
5032
|
this.container.addEventListener('mousedown', this.mouseDownHandlerProxy);
|
|
5007
5033
|
}
|
|
5034
|
+
*/
|
|
5008
5035
|
}
|
|
5009
5036
|
commitIsBlinkProperties() { }
|
|
5010
5037
|
commitIsDisabledProperties() { }
|