@datarailsshared/datarailsshared 1.4.51 → 1.4.53-dragons
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 +31 -8
- package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
- package/datarailsshared-datarailsshared-1.4.53-dragons.tgz +0 -0
- package/datarailsshared-datarailsshared.metadata.json +1 -1
- package/esm2015/lib/dr-dropdown/dr-dropdown.component.js +6 -2
- package/esm2015/lib/dr-dropdown/dr-dropdown.directive.js +21 -5
- package/esm2015/lib/dr-tabs/dr-tabs.component.js +5 -3
- package/fesm2015/datarailsshared-datarailsshared.js +29 -7
- package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
- package/lib/dr-dropdown/dr-dropdown.component.d.ts +2 -0
- package/lib/dr-dropdown/dr-dropdown.directive.d.ts +2 -0
- package/lib/dr-tabs/dr-tabs.component.d.ts +1 -0
- package/package.json +1 -1
- package/datarailsshared-datarailsshared-1.4.51.tgz +0 -0
|
@@ -2755,6 +2755,7 @@
|
|
|
2755
2755
|
this.menuService = menuService;
|
|
2756
2756
|
this.cdr = cdr;
|
|
2757
2757
|
this.position = 'left';
|
|
2758
|
+
this.wasHovered = false;
|
|
2758
2759
|
}
|
|
2759
2760
|
Object.defineProperty(DrDropdownComponent.prototype, "options", {
|
|
2760
2761
|
set: function (data) {
|
|
@@ -2780,6 +2781,9 @@
|
|
|
2780
2781
|
enumerable: false,
|
|
2781
2782
|
configurable: true
|
|
2782
2783
|
});
|
|
2784
|
+
DrDropdownComponent.prototype.onMouseEnter = function () {
|
|
2785
|
+
this.wasHovered = true;
|
|
2786
|
+
};
|
|
2783
2787
|
DrDropdownComponent.prototype.onMouseLeave = function () {
|
|
2784
2788
|
if (this.drDropdownInHover)
|
|
2785
2789
|
this.menuService.destroy();
|
|
@@ -2848,7 +2852,7 @@
|
|
|
2848
2852
|
DrDropdownComponent.decorators = [
|
|
2849
2853
|
{ type: i0.Component, args: [{
|
|
2850
2854
|
selector: 'dr-dropdown',
|
|
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",
|
|
2855
|
+
template: "<div #menuContainer\n (mouseleave)=\"onMouseLeave()\"\n (mouseenter)=\"onMouseEnter()\"\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",
|
|
2852
2856
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2853
2857
|
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"]
|
|
2854
2858
|
},] }
|
|
@@ -2871,6 +2875,7 @@
|
|
|
2871
2875
|
this.el = el;
|
|
2872
2876
|
this._document = _document;
|
|
2873
2877
|
this.position = 'left';
|
|
2878
|
+
this.mouseleaveTimeout = 200;
|
|
2874
2879
|
}
|
|
2875
2880
|
DrDropdownDirective.prototype.elementHover = function () {
|
|
2876
2881
|
if (!this.drDropdownInHover)
|
|
@@ -2880,6 +2885,17 @@
|
|
|
2880
2885
|
DrDropdownDirective.prototype.elementClick = function () {
|
|
2881
2886
|
this.openDropdown();
|
|
2882
2887
|
};
|
|
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
|
+
};
|
|
2883
2899
|
DrDropdownDirective.prototype.documentClick = function (e) {
|
|
2884
2900
|
this.closeDropdown(e);
|
|
2885
2901
|
};
|
|
@@ -2902,13 +2918,17 @@
|
|
|
2902
2918
|
}
|
|
2903
2919
|
};
|
|
2904
2920
|
DrDropdownDirective.prototype.closeDropdown = function (e) {
|
|
2905
|
-
|
|
2906
|
-
if (menuItem.contains('dr-dropdown__container__item') || menuItem.contains('dr-dropdown__container__item__text')) {
|
|
2921
|
+
if (!this.contentCmpRef) {
|
|
2907
2922
|
return;
|
|
2908
2923
|
}
|
|
2909
|
-
var
|
|
2910
|
-
|
|
2911
|
-
|
|
2924
|
+
var clickTarget = e.target;
|
|
2925
|
+
var triggerElement = this.el.nativeElement;
|
|
2926
|
+
var dropdownElement = this.contentCmpRef.location.nativeElement;
|
|
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);
|
|
2912
2932
|
}
|
|
2913
2933
|
};
|
|
2914
2934
|
DrDropdownDirective.prototype.showMenu = function (options) {
|
|
@@ -2946,6 +2966,7 @@
|
|
|
2946
2966
|
contentCmpRef: [{ type: i0.ViewChild, args: [DrDropdownComponent, { static: true, read: i0.ViewContainerRef },] }],
|
|
2947
2967
|
elementHover: [{ type: i0.HostListener, args: ['mouseenter',] }],
|
|
2948
2968
|
elementClick: [{ type: i0.HostListener, args: ['click',] }],
|
|
2969
|
+
leaveDropdownTriggerElement: [{ type: i0.HostListener, args: ['mouseleave',] }],
|
|
2949
2970
|
documentClick: [{ type: i0.HostListener, args: ['document:mouseup', ['$event'],] }]
|
|
2950
2971
|
};
|
|
2951
2972
|
|
|
@@ -3088,6 +3109,7 @@
|
|
|
3088
3109
|
var DrTabsComponent = /** @class */ (function () {
|
|
3089
3110
|
function DrTabsComponent() {
|
|
3090
3111
|
this.selectedTab = 0;
|
|
3112
|
+
this.noBodyPadding = false;
|
|
3091
3113
|
this.selectedTabChange = new i0.EventEmitter();
|
|
3092
3114
|
}
|
|
3093
3115
|
DrTabsComponent.prototype.selectedIndexChange = function ($event) {
|
|
@@ -3099,8 +3121,8 @@
|
|
|
3099
3121
|
DrTabsComponent.decorators = [
|
|
3100
3122
|
{ type: i0.Component, args: [{
|
|
3101
3123
|
selector: 'dr-tabs',
|
|
3102
|
-
template: "<mat-tab-group disableRipple [selectedIndex]=\"selectedTab\"\n (selectedIndexChange)=\"selectedIndexChange($event)\"\n [class.with-radio]=\"withRadio\"\n [class.vertical]=\"vertical\"\n [animationDuration]=\" vertical ? '0ms' : '500ms'\">\n <mat-tab *ngFor=\"let tab of tabsContentList; let index = index\" label=\"{{tab.label}}\" [disabled]=\"tab.disabled\" >\n <ng-container *ngIf=\"withRadio\">\n <ng-template mat-tab-label>\n <dr-radio-button [value]=\"index\"\n [(ngModel)]=\"selectedTab\">\n </dr-radio-button>\n {{tab.label}}\n </ng-template>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"tab.contentTemplate\" ></ng-container>\n </mat-tab>\n</mat-tab-group>\n",
|
|
3103
|
-
styles: [":host{width:100%}:host ::ng-deep .mat-tab-group,:host ::ng-deep .mat-tab-body-wrapper{height:100%}:host ::ng-deep .mat-tab-nav-bar,:host ::ng-deep .mat-tab-header{border-bottom:1px solid #D5DAE5}:host ::ng-deep .mat-tab-labels{padding:0 17px}:host ::ng-deep .mat-tab-label{padding:0 8px;min-width:0;height:38px;opacity:1}:host ::ng-deep .mat-tab-label:not(:last-child){margin-right:21px}:host ::ng-deep .mat-tab-label-active .mat-tab-label-content{color:#579bf2;font-weight:700}:host ::ng-deep .mat-tab-label-content{font-weight:400;font-size:14px;line-height:22px;color:#51566f;font-family:\"Poppins\",sans-serif}:host ::ng-deep .mat-ink-bar{height:3px;border-radius:5px;background-color:#579bf2!important}:host ::ng-deep .with-radio .mat-tab-labels{padding:0;margin-bottom:8px}:host ::ng-deep .with-radio .mat-tab-label{padding:8px 16px;min-width:0;flex-grow:1;justify-content:start;height:38px;opacity:1}:host ::ng-deep .with-radio .mat-tab-label:not(:last-child){margin-right:8px}:host ::ng-deep .with-radio .mat-tab-label-active{background:#F6F7F8;border-radius:3px}:host ::ng-deep .with-radio .mat-tab-label-active .mat-tab-label-content{color:#0c142b;font-weight:600}:host ::ng-deep .with-radio .mat-ink-bar{display:none!important}:host ::ng-deep .vertical.mat-tab-group{flex-direction:row}:host ::ng-deep .vertical .mat-tab-header{border-bottom:none}:host ::ng-deep .vertical .mat-tab-
|
|
3124
|
+
template: "<mat-tab-group disableRipple [selectedIndex]=\"selectedTab\"\n (selectedIndexChange)=\"selectedIndexChange($event)\"\n [class.with-radio]=\"withRadio\"\n [class.vertical]=\"vertical\"\n [class.no-body-padding]=\"noBodyPadding\"\n [animationDuration]=\" vertical ? '0ms' : '500ms'\">\n <mat-tab *ngFor=\"let tab of tabsContentList; let index = index\" label=\"{{tab.label}}\" [disabled]=\"tab.disabled\" >\n <ng-container *ngIf=\"withRadio\">\n <ng-template mat-tab-label>\n <dr-radio-button [value]=\"index\"\n [(ngModel)]=\"selectedTab\">\n </dr-radio-button>\n {{tab.label}}\n </ng-template>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"tab.contentTemplate\" ></ng-container>\n </mat-tab>\n</mat-tab-group>\n",
|
|
3125
|
+
styles: [":host{width:100%}:host ::ng-deep .mat-tab-group,:host ::ng-deep .mat-tab-body-wrapper{height:100%}:host ::ng-deep .mat-tab-group{font-family:\"Poppins\",sans-serif}:host ::ng-deep .mat-tab-nav-bar,:host ::ng-deep .mat-tab-header{border-bottom:1px solid #D5DAE5}:host ::ng-deep .mat-tab-labels{padding:0 17px}:host ::ng-deep .mat-tab-label{padding:0 8px;min-width:0;height:38px;opacity:1}:host ::ng-deep .mat-tab-label:not(:last-child){margin-right:21px}:host ::ng-deep .mat-tab-label-active .mat-tab-label-content{color:#579bf2;font-weight:700}:host ::ng-deep .mat-tab-label-content{font-weight:400;font-size:14px;line-height:22px;color:#51566f;font-family:\"Poppins\",sans-serif}:host ::ng-deep .mat-ink-bar{height:3px;border-radius:5px;background-color:#579bf2!important}:host ::ng-deep .with-radio .mat-tab-labels{padding:0;margin-bottom:8px}:host ::ng-deep .with-radio .mat-tab-label{padding:8px 16px;min-width:0;flex-grow:1;justify-content:start;height:38px;opacity:1}:host ::ng-deep .with-radio .mat-tab-label:not(:last-child){margin-right:8px}:host ::ng-deep .with-radio .mat-tab-label-active{background:#F6F7F8;border-radius:3px}:host ::ng-deep .with-radio .mat-tab-label-active .mat-tab-label-content{color:#0c142b;font-weight:600}:host ::ng-deep .with-radio .mat-ink-bar{display:none!important}:host ::ng-deep .vertical.mat-tab-group{flex-direction:row}:host ::ng-deep .vertical .mat-tab-header{border-bottom:none}:host ::ng-deep .vertical .mat-tab-label-container{border-right:1px solid #D5DAE5}:host ::ng-deep .vertical .mat-tab-label-container .mat-tab-labels{flex-direction:column;padding:0}:host ::ng-deep .vertical .mat-ink-bar{display:none!important}:host ::ng-deep .vertical .mat-tab-label{border-bottom:1px solid #D5DAE5;margin:0!important;justify-content:flex-start;padding:1rem 2rem;height:40px}:host ::ng-deep .vertical .mat-tab-label:before{content:\"\";width:2px;height:100%;display:flex;position:absolute;top:0;left:0}:host ::ng-deep .vertical .mat-tab-label-active{background-color:#f3f7ff}:host ::ng-deep .vertical .mat-tab-label-active:before{background-color:#151a41}:host ::ng-deep .vertical .mat-tab-label-active .mat-tab-label-content{font-weight:normal;color:#151a41}:host ::ng-deep .vertical .mat-tab-body-wrapper{width:100%;padding:16px}:host ::ng-deep mat-tab-group.no-body-padding .mat-tab-body-wrapper{padding:0}\n"]
|
|
3104
3126
|
},] }
|
|
3105
3127
|
];
|
|
3106
3128
|
DrTabsComponent.ctorParameters = function () { return []; };
|
|
@@ -3108,6 +3130,7 @@
|
|
|
3108
3130
|
selectedTab: [{ type: i0.Input }],
|
|
3109
3131
|
withRadio: [{ type: i0.Input }],
|
|
3110
3132
|
vertical: [{ type: i0.Input }],
|
|
3133
|
+
noBodyPadding: [{ type: i0.Input }],
|
|
3111
3134
|
selectedTabChange: [{ type: i0.Output }],
|
|
3112
3135
|
tabsContentList: [{ type: i0.ContentChildren, args: [DrTabComponent,] }]
|
|
3113
3136
|
};
|