@datarailsshared/datarailsshared 1.4.53-dragons → 1.4.54
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/bundles/datarailsshared-datarailsshared.umd.js +6 -27
- package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
- package/datarailsshared-datarailsshared-1.4.54.tgz +0 -0
- package/datarailsshared-datarailsshared.metadata.json +1 -1
- package/esm2015/lib/dr-dropdown/dr-dropdown.component.js +2 -6
- package/esm2015/lib/dr-dropdown/dr-dropdown.directive.js +5 -21
- package/fesm2015/datarailsshared-datarailsshared.js +5 -25
- package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
- package/lib/dr-dropdown/dr-dropdown.component.d.ts +0 -2
- package/lib/dr-dropdown/dr-dropdown.directive.d.ts +0 -2
- package/package.json +1 -1
- package/datarailsshared-datarailsshared-1.4.53-dragons.tgz +0 -0
|
@@ -2755,7 +2755,6 @@
|
|
|
2755
2755
|
this.menuService = menuService;
|
|
2756
2756
|
this.cdr = cdr;
|
|
2757
2757
|
this.position = 'left';
|
|
2758
|
-
this.wasHovered = false;
|
|
2759
2758
|
}
|
|
2760
2759
|
Object.defineProperty(DrDropdownComponent.prototype, "options", {
|
|
2761
2760
|
set: function (data) {
|
|
@@ -2781,9 +2780,6 @@
|
|
|
2781
2780
|
enumerable: false,
|
|
2782
2781
|
configurable: true
|
|
2783
2782
|
});
|
|
2784
|
-
DrDropdownComponent.prototype.onMouseEnter = function () {
|
|
2785
|
-
this.wasHovered = true;
|
|
2786
|
-
};
|
|
2787
2783
|
DrDropdownComponent.prototype.onMouseLeave = function () {
|
|
2788
2784
|
if (this.drDropdownInHover)
|
|
2789
2785
|
this.menuService.destroy();
|
|
@@ -2852,7 +2848,7 @@
|
|
|
2852
2848
|
DrDropdownComponent.decorators = [
|
|
2853
2849
|
{ type: i0.Component, args: [{
|
|
2854
2850
|
selector: 'dr-dropdown',
|
|
2855
|
-
template: "<div #menuContainer\n (mouseleave)=\"onMouseLeave()\"\n (
|
|
2851
|
+
template: "<div #menuContainer\n (mouseleave)=\"onMouseLeave()\"\n (clickOutside)=\"onClickedOutside()\"\n [drDropdownPosition]=\"option\"\n #dropdownPosition=\"dropdownPosition\"\n [position]=\"position\"\n [class]=\"containerClass\"\n class=\"dr-dropdown\">\n <div class=\"dr-dropdown__container\">\n <div *ngFor=\"let act of list | drDropdownItemShowPipe\"\n (click)=\"action(act)\"\n [drTooltip]=\"tooltipToShow(act)\"\n [drTooltipPosition]=\"tooltipPosition(dropdownPosition.widthMoreRight)\"\n [drTooltipOptions]=\"{ withoutArrow: true }\"\n [drTooltipClass]=\"'dr-dropdown__tooltip'\"\n class=\"dr-dropdown__container__item\"\n [class.item-disabled]=\"disabled(act)\"\n [class.item-selected]=\"selected(act)\"\n [class.separate-line]=\"act.separateLine\">\n <i *ngIf=\"act.icon\" [class]=\"act.icon\"></i>\n <span class=\"dr-dropdown__container__item__text\">{{act.title}}</span>\n <i *ngFor=\"let actionIcon of act.actionIcons\"\n [class]=\"actionIcon.icon\"\n [class.showOnHover]=\"actionIcon.showOnHover\"\n (click)=\"onActionIconClick($event, actionIcon, act.data)\"></i>\n <i *ngIf=\"act.children?.length\" class=\"dr-icon-arrow-right\"></i>\n <dr-dropdown *ngIf=\"act.children?.length\" [options]=\"act.childOptions\"></dr-dropdown>\n </div>\n </div>\n</div>\n",
|
|
2856
2852
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2857
2853
|
styles: ["::ng-deep .dr-dropdown__container__item .dr-dropdown{visibility:hidden;transition-delay:.2s}::ng-deep .dr-dropdown__container__item:hover>*>.dr-dropdown{visibility:visible;transition-delay:0s}::ng-deep .dr-dropdown__tooltip>.default-content{max-width:300px;white-space:normal!important}.dr-dropdown{position:absolute;z-index:-1;top:0;left:0;width:auto}.dr-dropdown__container{display:flex;flex-direction:column;background:#fff;border-radius:4px;box-shadow:0 4px 8px 1px #00000040;padding:8px 0;overflow-y:auto;max-height:60vh}.dr-dropdown__container__item{display:flex;align-items:center;justify-content:flex-start;cursor:pointer;min-width:15rem;font-style:normal;font-weight:400;font-size:14px;line-height:24px;clear:both;width:100%;white-space:nowrap;padding:0 12px;height:36px;flex-shrink:0}.dr-dropdown__container__item.separate-line{border-top:1px solid #BCBCBC}.dr-dropdown__container__item:hover{background-color:#f9faff}.dr-dropdown__container__item:hover .showOnHover{visibility:visible}.dr-dropdown__container__item.item-selected{background:#F3F7FF}.dr-dropdown__container__item.item-disabled,.dr-dropdown__container__item.item-disabled i,.dr-dropdown__container__item.item-disabled .dr-dropdown__container__item__text{color:#bcbcbc}.dr-dropdown__container__item i:first-child{margin-right:8px}.dr-dropdown__container__item__text{margin-right:auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.dr-dropdown__container__item i,.dr-dropdown__container__item__text{color:#151b3f}.dr-dropdown__container__item i{color:#4e566c}.dr-dropdown__container__item i:hover{color:#4646ce}.dr-dropdown__container__item .showOnHover{visibility:hidden}.dr-dropdown.content-top{transform:translate(-50%,-100%)}.dr-dropdown.content-top-left{transform:translate(-100%,-100%)}.dr-dropdown.content-bottom{transform:translate(-50%,50%)}.dr-dropdown.content-bottom-left{transform:translate(-90%,35%)}.dr-dropdown.content-bottom-right{transform:translateY(15%)}.dr-dropdown.content-left{transform:translate(-100%)}.dr-dropdown.content-left-center{transform:translate(-100%,-50%)}.dr-dropdown.content-right{transform:translate(5%)}\n"]
|
|
2858
2854
|
},] }
|
|
@@ -2875,7 +2871,6 @@
|
|
|
2875
2871
|
this.el = el;
|
|
2876
2872
|
this._document = _document;
|
|
2877
2873
|
this.position = 'left';
|
|
2878
|
-
this.mouseleaveTimeout = 200;
|
|
2879
2874
|
}
|
|
2880
2875
|
DrDropdownDirective.prototype.elementHover = function () {
|
|
2881
2876
|
if (!this.drDropdownInHover)
|
|
@@ -2885,17 +2880,6 @@
|
|
|
2885
2880
|
DrDropdownDirective.prototype.elementClick = function () {
|
|
2886
2881
|
this.openDropdown();
|
|
2887
2882
|
};
|
|
2888
|
-
DrDropdownDirective.prototype.leaveDropdownTriggerElement = function () {
|
|
2889
|
-
var _this = this;
|
|
2890
|
-
if (this.drDropdownInHover) {
|
|
2891
|
-
setTimeout(function (_) {
|
|
2892
|
-
if (_this.contentCmpRef && !_this.contentCmpRef.instance.wasHovered) {
|
|
2893
|
-
_this.contentCmpRef.destroy();
|
|
2894
|
-
_this.contentCmpRef = null;
|
|
2895
|
-
}
|
|
2896
|
-
}, this.mouseleaveTimeout);
|
|
2897
|
-
}
|
|
2898
|
-
};
|
|
2899
2883
|
DrDropdownDirective.prototype.documentClick = function (e) {
|
|
2900
2884
|
this.closeDropdown(e);
|
|
2901
2885
|
};
|
|
@@ -2918,17 +2902,13 @@
|
|
|
2918
2902
|
}
|
|
2919
2903
|
};
|
|
2920
2904
|
DrDropdownDirective.prototype.closeDropdown = function (e) {
|
|
2921
|
-
|
|
2905
|
+
var menuItem = e.target.classList;
|
|
2906
|
+
if (menuItem.contains('dr-dropdown__container__item') || menuItem.contains('dr-dropdown__container__item__text')) {
|
|
2922
2907
|
return;
|
|
2923
2908
|
}
|
|
2924
|
-
var
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
var isClickTriggerElement = triggerElement.contains(clickTarget) || triggerElement === clickTarget;
|
|
2928
|
-
var isClickDropdownContents = dropdownElement.contains(clickTarget);
|
|
2929
|
-
if (!isClickTriggerElement && !isClickDropdownContents) {
|
|
2930
|
-
var elems_1 = this._document.querySelectorAll('dr-dropdown');
|
|
2931
|
-
setTimeout(function () { return elems_1.forEach(function (item) { return item.remove(); }); }, 100);
|
|
2909
|
+
var elems = this._document.querySelectorAll('dr-dropdown');
|
|
2910
|
+
if (!e.target.contains(this.el.nativeElement) && this.contentCmpRef || elems.length && !e.target.contains(this.el.nativeElement)) {
|
|
2911
|
+
setTimeout(function () { return elems.forEach(function (item) { return item.remove(); }); }, 100);
|
|
2932
2912
|
}
|
|
2933
2913
|
};
|
|
2934
2914
|
DrDropdownDirective.prototype.showMenu = function (options) {
|
|
@@ -2966,7 +2946,6 @@
|
|
|
2966
2946
|
contentCmpRef: [{ type: i0.ViewChild, args: [DrDropdownComponent, { static: true, read: i0.ViewContainerRef },] }],
|
|
2967
2947
|
elementHover: [{ type: i0.HostListener, args: ['mouseenter',] }],
|
|
2968
2948
|
elementClick: [{ type: i0.HostListener, args: ['click',] }],
|
|
2969
|
-
leaveDropdownTriggerElement: [{ type: i0.HostListener, args: ['mouseleave',] }],
|
|
2970
2949
|
documentClick: [{ type: i0.HostListener, args: ['document:mouseup', ['$event'],] }]
|
|
2971
2950
|
};
|
|
2972
2951
|
|