@datorama/core 22.10.0 → 22.10.1-rc.1
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/datorama-core.umd.js +117 -96
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +10 -3
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/datorama-core.metadata.json +1 -1
- package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +26 -12
- package/esm2015/lib/select/select.component.js +10 -2
- package/esm2015/lib/select/trigger-single/trigger-single.component.js +4 -1
- package/esm2015/lib/version.js +1 -1
- package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +25 -14
- package/esm5/lib/select/select.component.js +10 -2
- package/esm5/lib/select/trigger-single/trigger-single.component.js +4 -1
- package/esm5/lib/version.js +1 -1
- package/fesm2015/datorama-core.js +101 -77
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +117 -96
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/grid-v2/grid-controller/grid-controller.component.d.ts +1 -0
- package/lib/select/select.component.d.ts +2 -0
- package/lib/select/trigger-single/trigger-single.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -8430,6 +8430,91 @@
|
|
|
8430
8430
|
return !!window.Cypress;
|
|
8431
8431
|
}
|
|
8432
8432
|
|
|
8433
|
+
/**
|
|
8434
|
+
* @license
|
|
8435
|
+
* Copyright Datorama. All Rights Reserved.
|
|
8436
|
+
*
|
|
8437
|
+
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
8438
|
+
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
8439
|
+
*/
|
|
8440
|
+
var DatoTriggerSingle = /** @class */ (function () {
|
|
8441
|
+
function DatoTriggerSingle(cdr) {
|
|
8442
|
+
this.cdr = cdr;
|
|
8443
|
+
this._placeholder = '';
|
|
8444
|
+
}
|
|
8445
|
+
Object.defineProperty(DatoTriggerSingle.prototype, "placeholder", {
|
|
8446
|
+
set: function (value) {
|
|
8447
|
+
this._placeholder = value;
|
|
8448
|
+
this.cdr.detectChanges();
|
|
8449
|
+
},
|
|
8450
|
+
enumerable: true,
|
|
8451
|
+
configurable: true
|
|
8452
|
+
});
|
|
8453
|
+
Object.defineProperty(DatoTriggerSingle.prototype, "context", {
|
|
8454
|
+
set: function (value) {
|
|
8455
|
+
this._model = { $implicit: value };
|
|
8456
|
+
this.cdr.detectChanges();
|
|
8457
|
+
},
|
|
8458
|
+
enumerable: true,
|
|
8459
|
+
configurable: true
|
|
8460
|
+
});
|
|
8461
|
+
Object.defineProperty(DatoTriggerSingle.prototype, "hidePlaceholder", {
|
|
8462
|
+
get: function () {
|
|
8463
|
+
return !this._model || !this._model.$implicit;
|
|
8464
|
+
},
|
|
8465
|
+
enumerable: true,
|
|
8466
|
+
configurable: true
|
|
8467
|
+
});
|
|
8468
|
+
DatoTriggerSingle.prototype.ngOnInit = function () {
|
|
8469
|
+
this.cdr.detach();
|
|
8470
|
+
};
|
|
8471
|
+
Object.defineProperty(DatoTriggerSingle.prototype, "getLabel", {
|
|
8472
|
+
get: function () {
|
|
8473
|
+
return this._model && this._model.$implicit && this._model.$implicit[this.labelKey];
|
|
8474
|
+
},
|
|
8475
|
+
enumerable: true,
|
|
8476
|
+
configurable: true
|
|
8477
|
+
});
|
|
8478
|
+
DatoTriggerSingle.prototype.triggerChangeDetection = function () {
|
|
8479
|
+
this.cdr.detectChanges();
|
|
8480
|
+
};
|
|
8481
|
+
DatoTriggerSingle.ctorParameters = function () { return [
|
|
8482
|
+
{ type: core.ChangeDetectorRef }
|
|
8483
|
+
]; };
|
|
8484
|
+
__decorate([
|
|
8485
|
+
core.Input(),
|
|
8486
|
+
__metadata("design:type", core.TemplateRef)
|
|
8487
|
+
], DatoTriggerSingle.prototype, "loadingTemplate", void 0);
|
|
8488
|
+
__decorate([
|
|
8489
|
+
core.Input(),
|
|
8490
|
+
__metadata("design:type", DatoSelectActiveDirective)
|
|
8491
|
+
], DatoTriggerSingle.prototype, "active", void 0);
|
|
8492
|
+
__decorate([
|
|
8493
|
+
core.Input(),
|
|
8494
|
+
__metadata("design:type", Object),
|
|
8495
|
+
__metadata("design:paramtypes", [Object])
|
|
8496
|
+
], DatoTriggerSingle.prototype, "placeholder", null);
|
|
8497
|
+
__decorate([
|
|
8498
|
+
core.Input(),
|
|
8499
|
+
__metadata("design:type", String)
|
|
8500
|
+
], DatoTriggerSingle.prototype, "labelKey", void 0);
|
|
8501
|
+
__decorate([
|
|
8502
|
+
core.Input(),
|
|
8503
|
+
__metadata("design:type", Object),
|
|
8504
|
+
__metadata("design:paramtypes", [Object])
|
|
8505
|
+
], DatoTriggerSingle.prototype, "context", null);
|
|
8506
|
+
DatoTriggerSingle = __decorate([
|
|
8507
|
+
core.Component({
|
|
8508
|
+
selector: 'dato-trigger-single',
|
|
8509
|
+
template: "<ng-template *ngIf=\"loadingTemplate\" [ngTemplateOutlet]=\"loadingTemplate\"></ng-template>\n<ng-container\n *ngIf=\"active && !hidePlaceholder\"\n [ngTemplateOutlet]=\"active.tpl\"\n [ngTemplateOutletContext]=\"_model\">\n</ng-container>\n<ng-container *ngIf=\"!active\">{{getLabel | translate}}</ng-container>\n<span class=\"dato-select__placeholder\" *ngIf=\"hidePlaceholder\">{{_placeholder}}</span>\n<dato-icon datoIcon=\"arrow-down\" datoSize=\"sm\" class=\"dato-select__single__arrow\"></dato-icon>\n",
|
|
8510
|
+
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
8511
|
+
styles: [":host{display:block;position:relative;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host dato-icon{position:absolute;top:50%;transform:translateY(-50%);right:10px}"]
|
|
8512
|
+
}),
|
|
8513
|
+
__metadata("design:paramtypes", [core.ChangeDetectorRef])
|
|
8514
|
+
], DatoTriggerSingle);
|
|
8515
|
+
return DatoTriggerSingle;
|
|
8516
|
+
}());
|
|
8517
|
+
|
|
8433
8518
|
/**
|
|
8434
8519
|
* @license
|
|
8435
8520
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -9311,6 +9396,9 @@
|
|
|
9311
9396
|
setTimeout(function () { return _this.datoOverlay.scheduleUpdate(); }, 0);
|
|
9312
9397
|
}
|
|
9313
9398
|
};
|
|
9399
|
+
DatoSelectComponent.prototype.triggerChangeDetectionInDatoSingle = function () {
|
|
9400
|
+
this.datoTriggerSingle.triggerChangeDetection();
|
|
9401
|
+
};
|
|
9314
9402
|
DatoSelectComponent.ctorParameters = function () { return [
|
|
9315
9403
|
{ type: core.ChangeDetectorRef },
|
|
9316
9404
|
{ type: DatoTranslateService },
|
|
@@ -9320,6 +9408,10 @@
|
|
|
9320
9408
|
{ type: undefined, decorators: [{ type: core.Attribute, args: ['datoSize',] }] },
|
|
9321
9409
|
{ type: String, decorators: [{ type: core.Attribute, args: ['width',] }] }
|
|
9322
9410
|
]; };
|
|
9411
|
+
__decorate([
|
|
9412
|
+
core.ViewChild('datoTriggerSingle'),
|
|
9413
|
+
__metadata("design:type", DatoTriggerSingle)
|
|
9414
|
+
], DatoSelectComponent.prototype, "datoTriggerSingle", void 0);
|
|
9323
9415
|
__decorate([
|
|
9324
9416
|
core.ViewChild('dropdown'),
|
|
9325
9417
|
__metadata("design:type", core.TemplateRef)
|
|
@@ -9486,7 +9578,7 @@
|
|
|
9486
9578
|
DatoSelectComponent = __decorate([
|
|
9487
9579
|
core.Component({
|
|
9488
9580
|
selector: 'dato-select',
|
|
9489
|
-
template: "<section class=\"dato-select__trigger\" [class.dato-select--naked]=\"_naked\" [class.dato-select--disabled]=\"_disabled\">\n\n <div class=\"dato-select__single\" *ngIf=\"isSingle\" [ngClass]=\"_dropdownClass\">\n <dato-input [class.force-hide]=\"(!open && isCombo) || !isCombo\" [placeholder]=\"searchPlaceholder | translate\"\n (keyup)=\"keyup($event)\" [isFocused]=\"_focus\" [isLoading]=\"isLoading\" [formControl]=\"searchControl\" type=\"search\">\n </dato-input>\n\n <dato-trigger-single [loadingTemplate]=\"loadingTemplate\" [active]=\"active\" datoErrorValidationBorderAnchor tabindex=\"0\" [labelKey]=\"labelKey\"\n [context]=\"_model[0]\" [class.force-hide]=\"open && isCombo\" [placeholder]=\"placeholder | translate\"\n class=\"ontop-overlay\" (keydown)=\"preventBodyScroll($event)\" (keyup)=\"keyup($event)\" (click)=\"openDropdown()\">\n </dato-trigger-single>\n </div>\n\n <dato-trigger-multi [loadingTemplate]=\"loadingTemplate\" [options]=\"_model\" datoErrorValidationBorderAnchor [control]=\"searchControl\"\n [placeholder]=\"placeholder | translate\" [labelKey]=\"labelKey\" [idKey]=\"idKey\" (keyup)=\"keyup($event)\"\n [isLoading]=\"isLoading\" [keepFocus]=\"keepFocus\" [limitTo]=\"limitTo\" [clickOutside]=\"_clickOutside\" [isSortable]=\"isSortable\"\n [selectAllChipTxt]=\"selectAllChipTxt\"\n [showSelectAllChip]=\"selectAllChipTxt && showSelectAllChip\"\n (unselectAll)=\"checkAll(false)\"\n (removeOption)=\"removeOption($event)\" (reorderOptions)=\"reorderOptions($event)\" *ngIf=\"isMulti\"\n (click)=\"openDropdown($event)\"></dato-trigger-multi>\n\n</section>\n\n<ng-template #dropdown>\n <section class=\"dato-select__dropdown-container\" tabindex=\"0\" (keyup)=\"keyup($event)\">\n\n <!-- HEADER -->\n\n <header class=\"dato-select__header dato-select__option dato-select__option--simple\" data-is-floating\n *ngIf=\"isMulti && allowSelectAll\" [class.force-hide]=\"_showEmptyResults\" [class.ml-10]=\"containsGroups\">\n <dato-checkbox [checked]=\"_isAllChecked\" (check)=\"checkAll($event)\"\n [indeterminatelyChecked]=\"_isIndeterminatelyChecked\">\n {{'core.select-all' | translate}}<span class=\"primary-300-color note-italic ml-5\">{{_count}}</span>\n </dato-checkbox>\n </header>\n\n <!-- END HEADER -->\n\n <!-- DROPDOWN -->\n\n <div class=\"dato-select__dropdown\">\n\n <ng-content></ng-content>\n\n <dato-select-empty [show]=\"_showEmptyResults\">{{_noItemsLabel}}</dato-select-empty>\n <div class=\"dato-select__option dato-select-infinite-spinner\" data-is-floating *ngIf=\"infiniteScrollLoading\">\n <span class=\"dato-input__spinner\"></span>\n </div>\n\n </div>\n\n <!-- END DROPDOWN -->\n\n\n <!-- FOOTER -->\n\n <footer class=\"dato-select__footer d-flex\" [class.with-actions]=\"_withActions\">\n\n <ng-content select=\"[datoSelectFooter]\"></ng-content>\n\n <ng-container *ngIf=\"_withActions\">\n <dato-link class=\"mr-20\" datoType=\"secondary\" (click)=\"close()\">Cancel</dato-link>\n <dato-button datoSize=\"sm\" (click)=\"save.emit(); close();\">Save</dato-button>\n </ng-container>\n\n </footer>\n\n <!-- END FOOTER -->\n\n </section>\n\n</ng-template>\n",
|
|
9581
|
+
template: "<section class=\"dato-select__trigger\" [class.dato-select--naked]=\"_naked\" [class.dato-select--disabled]=\"_disabled\">\n\n <div class=\"dato-select__single\" *ngIf=\"isSingle\" [ngClass]=\"_dropdownClass\">\n <dato-input [class.force-hide]=\"(!open && isCombo) || !isCombo\" [placeholder]=\"searchPlaceholder | translate\"\n (keyup)=\"keyup($event)\" [isFocused]=\"_focus\" [isLoading]=\"isLoading\" [formControl]=\"searchControl\" type=\"search\">\n </dato-input>\n\n <dato-trigger-single #datoTriggerSingle [loadingTemplate]=\"loadingTemplate\" [active]=\"active\" datoErrorValidationBorderAnchor tabindex=\"0\" [labelKey]=\"labelKey\"\n [context]=\"_model[0]\" [class.force-hide]=\"open && isCombo\" [placeholder]=\"placeholder | translate\"\n class=\"ontop-overlay\" (keydown)=\"preventBodyScroll($event)\" (keyup)=\"keyup($event)\" (click)=\"openDropdown()\">\n </dato-trigger-single>\n </div>\n\n <dato-trigger-multi [loadingTemplate]=\"loadingTemplate\" [options]=\"_model\" datoErrorValidationBorderAnchor [control]=\"searchControl\"\n [placeholder]=\"placeholder | translate\" [labelKey]=\"labelKey\" [idKey]=\"idKey\" (keyup)=\"keyup($event)\"\n [isLoading]=\"isLoading\" [keepFocus]=\"keepFocus\" [limitTo]=\"limitTo\" [clickOutside]=\"_clickOutside\" [isSortable]=\"isSortable\"\n [selectAllChipTxt]=\"selectAllChipTxt\"\n [showSelectAllChip]=\"selectAllChipTxt && showSelectAllChip\"\n (unselectAll)=\"checkAll(false)\"\n (removeOption)=\"removeOption($event)\" (reorderOptions)=\"reorderOptions($event)\" *ngIf=\"isMulti\"\n (click)=\"openDropdown($event)\"></dato-trigger-multi>\n\n</section>\n\n<ng-template #dropdown>\n <section class=\"dato-select__dropdown-container\" tabindex=\"0\" (keyup)=\"keyup($event)\">\n\n <!-- HEADER -->\n\n <header class=\"dato-select__header dato-select__option dato-select__option--simple\" data-is-floating\n *ngIf=\"isMulti && allowSelectAll\" [class.force-hide]=\"_showEmptyResults\" [class.ml-10]=\"containsGroups\">\n <dato-checkbox [checked]=\"_isAllChecked\" (check)=\"checkAll($event)\"\n [indeterminatelyChecked]=\"_isIndeterminatelyChecked\">\n {{'core.select-all' | translate}}<span class=\"primary-300-color note-italic ml-5\">{{_count}}</span>\n </dato-checkbox>\n </header>\n\n <!-- END HEADER -->\n\n <!-- DROPDOWN -->\n\n <div class=\"dato-select__dropdown\">\n\n <ng-content></ng-content>\n\n <dato-select-empty [show]=\"_showEmptyResults\">{{_noItemsLabel}}</dato-select-empty>\n <div class=\"dato-select__option dato-select-infinite-spinner\" data-is-floating *ngIf=\"infiniteScrollLoading\">\n <span class=\"dato-input__spinner\"></span>\n </div>\n\n </div>\n\n <!-- END DROPDOWN -->\n\n\n <!-- FOOTER -->\n\n <footer class=\"dato-select__footer d-flex\" [class.with-actions]=\"_withActions\">\n\n <ng-content select=\"[datoSelectFooter]\"></ng-content>\n\n <ng-container *ngIf=\"_withActions\">\n <dato-link class=\"mr-20\" datoType=\"secondary\" (click)=\"close()\">Cancel</dato-link>\n <dato-button datoSize=\"sm\" (click)=\"save.emit(); close();\">Save</dato-button>\n </ng-container>\n\n </footer>\n\n <!-- END FOOTER -->\n\n </section>\n\n</ng-template>\n",
|
|
9490
9582
|
preserveWhitespaces: false,
|
|
9491
9583
|
providers: [valueAccessor$3, DatoOverlay],
|
|
9492
9584
|
encapsulation: core.ViewEncapsulation.None,
|
|
@@ -9504,88 +9596,6 @@
|
|
|
9504
9596
|
return DatoSelectComponent;
|
|
9505
9597
|
}(BaseCustomControl));
|
|
9506
9598
|
|
|
9507
|
-
/**
|
|
9508
|
-
* @license
|
|
9509
|
-
* Copyright Datorama. All Rights Reserved.
|
|
9510
|
-
*
|
|
9511
|
-
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
9512
|
-
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
9513
|
-
*/
|
|
9514
|
-
var DatoTriggerSingle = /** @class */ (function () {
|
|
9515
|
-
function DatoTriggerSingle(cdr) {
|
|
9516
|
-
this.cdr = cdr;
|
|
9517
|
-
this._placeholder = '';
|
|
9518
|
-
}
|
|
9519
|
-
Object.defineProperty(DatoTriggerSingle.prototype, "placeholder", {
|
|
9520
|
-
set: function (value) {
|
|
9521
|
-
this._placeholder = value;
|
|
9522
|
-
this.cdr.detectChanges();
|
|
9523
|
-
},
|
|
9524
|
-
enumerable: true,
|
|
9525
|
-
configurable: true
|
|
9526
|
-
});
|
|
9527
|
-
Object.defineProperty(DatoTriggerSingle.prototype, "context", {
|
|
9528
|
-
set: function (value) {
|
|
9529
|
-
this._model = { $implicit: value };
|
|
9530
|
-
this.cdr.detectChanges();
|
|
9531
|
-
},
|
|
9532
|
-
enumerable: true,
|
|
9533
|
-
configurable: true
|
|
9534
|
-
});
|
|
9535
|
-
Object.defineProperty(DatoTriggerSingle.prototype, "hidePlaceholder", {
|
|
9536
|
-
get: function () {
|
|
9537
|
-
return !this._model || !this._model.$implicit;
|
|
9538
|
-
},
|
|
9539
|
-
enumerable: true,
|
|
9540
|
-
configurable: true
|
|
9541
|
-
});
|
|
9542
|
-
DatoTriggerSingle.prototype.ngOnInit = function () {
|
|
9543
|
-
this.cdr.detach();
|
|
9544
|
-
};
|
|
9545
|
-
Object.defineProperty(DatoTriggerSingle.prototype, "getLabel", {
|
|
9546
|
-
get: function () {
|
|
9547
|
-
return this._model && this._model.$implicit && this._model.$implicit[this.labelKey];
|
|
9548
|
-
},
|
|
9549
|
-
enumerable: true,
|
|
9550
|
-
configurable: true
|
|
9551
|
-
});
|
|
9552
|
-
DatoTriggerSingle.ctorParameters = function () { return [
|
|
9553
|
-
{ type: core.ChangeDetectorRef }
|
|
9554
|
-
]; };
|
|
9555
|
-
__decorate([
|
|
9556
|
-
core.Input(),
|
|
9557
|
-
__metadata("design:type", core.TemplateRef)
|
|
9558
|
-
], DatoTriggerSingle.prototype, "loadingTemplate", void 0);
|
|
9559
|
-
__decorate([
|
|
9560
|
-
core.Input(),
|
|
9561
|
-
__metadata("design:type", DatoSelectActiveDirective)
|
|
9562
|
-
], DatoTriggerSingle.prototype, "active", void 0);
|
|
9563
|
-
__decorate([
|
|
9564
|
-
core.Input(),
|
|
9565
|
-
__metadata("design:type", Object),
|
|
9566
|
-
__metadata("design:paramtypes", [Object])
|
|
9567
|
-
], DatoTriggerSingle.prototype, "placeholder", null);
|
|
9568
|
-
__decorate([
|
|
9569
|
-
core.Input(),
|
|
9570
|
-
__metadata("design:type", String)
|
|
9571
|
-
], DatoTriggerSingle.prototype, "labelKey", void 0);
|
|
9572
|
-
__decorate([
|
|
9573
|
-
core.Input(),
|
|
9574
|
-
__metadata("design:type", Object),
|
|
9575
|
-
__metadata("design:paramtypes", [Object])
|
|
9576
|
-
], DatoTriggerSingle.prototype, "context", null);
|
|
9577
|
-
DatoTriggerSingle = __decorate([
|
|
9578
|
-
core.Component({
|
|
9579
|
-
selector: 'dato-trigger-single',
|
|
9580
|
-
template: "<ng-template *ngIf=\"loadingTemplate\" [ngTemplateOutlet]=\"loadingTemplate\"></ng-template>\n<ng-container\n *ngIf=\"active && !hidePlaceholder\"\n [ngTemplateOutlet]=\"active.tpl\"\n [ngTemplateOutletContext]=\"_model\">\n</ng-container>\n<ng-container *ngIf=\"!active\">{{getLabel | translate}}</ng-container>\n<span class=\"dato-select__placeholder\" *ngIf=\"hidePlaceholder\">{{_placeholder}}</span>\n<dato-icon datoIcon=\"arrow-down\" datoSize=\"sm\" class=\"dato-select__single__arrow\"></dato-icon>\n",
|
|
9581
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
9582
|
-
styles: [":host{display:block;position:relative;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host dato-icon{position:absolute;top:50%;transform:translateY(-50%);right:10px}"]
|
|
9583
|
-
}),
|
|
9584
|
-
__metadata("design:paramtypes", [core.ChangeDetectorRef])
|
|
9585
|
-
], DatoTriggerSingle);
|
|
9586
|
-
return DatoTriggerSingle;
|
|
9587
|
-
}());
|
|
9588
|
-
|
|
9589
9599
|
/**
|
|
9590
9600
|
* @license
|
|
9591
9601
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -15654,7 +15664,7 @@
|
|
|
15654
15664
|
});
|
|
15655
15665
|
DatoGridControllerComponent.prototype.ngOnDestroy = function () {
|
|
15656
15666
|
this.contentInit.complete();
|
|
15657
|
-
this.
|
|
15667
|
+
this.clearTooltip();
|
|
15658
15668
|
this.rowHoverComponent && this.rowHoverComponent.destroy();
|
|
15659
15669
|
this.rowHoverComponent = null;
|
|
15660
15670
|
};
|
|
@@ -15881,40 +15891,51 @@
|
|
|
15881
15891
|
});
|
|
15882
15892
|
this.addOnHoverElement();
|
|
15883
15893
|
}
|
|
15884
|
-
agGrid.cellMouseOver
|
|
15885
|
-
.
|
|
15886
|
-
|
|
15887
|
-
|
|
15888
|
-
|
|
15889
|
-
|
|
15890
|
-
lastHoveredCell =
|
|
15894
|
+
agGrid.cellMouseOver.pipe(ngxTakeUntilDestroy.untilDestroyed(this)).subscribe(function (event) {
|
|
15895
|
+
var node = event.node, column = event.column;
|
|
15896
|
+
if (lastHoveredCell === node.id + "-" + column.getColId()) {
|
|
15897
|
+
clearTimeout(_this.cellMouseOutTimer);
|
|
15898
|
+
return;
|
|
15899
|
+
}
|
|
15900
|
+
lastHoveredCell = node.id + "-" + column.getColId();
|
|
15891
15901
|
_this.showTooltip(event);
|
|
15892
15902
|
var row = event.event.target.parentElement;
|
|
15893
|
-
if (onHoverEnabled && (
|
|
15903
|
+
if (onHoverEnabled && (node.group === false || isNil(node.group)) && _this.lastHoveredRow !== row) {
|
|
15894
15904
|
var previousNode = _this.lastHoveredRow;
|
|
15895
15905
|
_this.lastHoveredRow = row;
|
|
15896
15906
|
_this.toggleRowHoverClass([previousNode, _this.lastHoveredRow]);
|
|
15897
15907
|
_this.setOnHoverState(true, event);
|
|
15898
15908
|
}
|
|
15899
15909
|
});
|
|
15900
|
-
var onTooltipOut = rxjs.merge(rxjs.fromEvent(bodyViewport, 'scroll'), rxjs.fromEvent(this.agGridEl, 'mouseleave')
|
|
15901
|
-
onTooltipOut
|
|
15910
|
+
var onTooltipOut = rxjs.merge(rxjs.fromEvent(bodyViewport, 'scroll'), rxjs.fromEvent(this.agGridEl, 'mouseleave'));
|
|
15911
|
+
onTooltipOut.pipe(ngxTakeUntilDestroy.untilDestroyed(this)).subscribe(function () {
|
|
15912
|
+
lastHoveredCell = null;
|
|
15913
|
+
_this.clearTooltip();
|
|
15914
|
+
});
|
|
15915
|
+
agGrid.cellMouseOut
|
|
15902
15916
|
.pipe(operators.filter(function () { return !isNil(_this.tooltip); }), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
15903
15917
|
.subscribe(function () {
|
|
15904
|
-
_this.clearTooltip();
|
|
15918
|
+
_this.cellMouseOutTimer = window.setTimeout(function () { return _this.clearTooltip(); });
|
|
15905
15919
|
});
|
|
15906
15920
|
};
|
|
15907
15921
|
/**
|
|
15908
15922
|
* Dispose the tooltip
|
|
15909
15923
|
*/
|
|
15910
15924
|
DatoGridControllerComponent.prototype.clearTooltip = function () {
|
|
15911
|
-
this.tooltip.dispose();
|
|
15925
|
+
this.tooltip && this.tooltip.dispose();
|
|
15912
15926
|
this.tooltip = null;
|
|
15913
15927
|
};
|
|
15914
15928
|
DatoGridControllerComponent.prototype.showTooltip = function (event) {
|
|
15915
15929
|
var cell = event.event.target;
|
|
15930
|
+
if (cell.tagName === 'SPAN' && cell.scrollWidth === 0) {
|
|
15931
|
+
cell = cell.parentElement;
|
|
15932
|
+
}
|
|
15933
|
+
if (event.colDef.editable) {
|
|
15934
|
+
cell = cell.querySelector('.value-wrapper') || cell;
|
|
15935
|
+
}
|
|
15916
15936
|
var textOverflow = cell.offsetWidth < cell.scrollWidth;
|
|
15917
15937
|
if (textOverflow) {
|
|
15938
|
+
clearTimeout(this.cellMouseOutTimer);
|
|
15918
15939
|
var params = { cell: cell, value: cell.innerText };
|
|
15919
15940
|
isNil(this.tooltip) ? this.createAndShowTooltip(params) : this.updateTooltip(params);
|
|
15920
15941
|
}
|