@seniorsistemas/angular-components 14.15.0 → 14.15.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/seniorsistemas-angular-components.umd.js +23 -3
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/table/frozen-position/frozen-position.directive.d.ts +4 -1
- package/esm2015/components/table/frozen-position/frozen-position.directive.js +24 -5
- package/esm5/components/table/frozen-position/frozen-position.directive.js +25 -5
- package/fesm2015/seniorsistemas-angular-components.js +22 -3
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +23 -3
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -3946,23 +3946,25 @@
|
|
|
3946
3946
|
this.el = el;
|
|
3947
3947
|
this.host = host;
|
|
3948
3948
|
this.sTableFrozenPosition = "left";
|
|
3949
|
+
this.onColumnsChanged = new core.EventEmitter();
|
|
3949
3950
|
this.host.onColResize.subscribe(function () {
|
|
3950
3951
|
_this.handleColResize();
|
|
3951
3952
|
});
|
|
3952
3953
|
window.addEventListener("resize", this.handleWindowResize.bind(this));
|
|
3953
3954
|
var componentId = new Date().getTime();
|
|
3955
|
+
var htmlHead = document.getElementsByTagName("head")[0];
|
|
3954
3956
|
this.resetRowHeightClassName = "resetTableRowsHeight_" + componentId;
|
|
3955
3957
|
var styleReset = document.createElement("style");
|
|
3956
3958
|
styleReset.innerHTML = "." + this.resetRowHeightClassName + " tbody > tr, ." + this.resetRowHeightClassName + " thead > tr { height: auto; }";
|
|
3957
|
-
|
|
3959
|
+
htmlHead.appendChild(styleReset);
|
|
3958
3960
|
this.fixBodyRowClassName = "fixTableBodyRowsHeight_" + componentId;
|
|
3959
3961
|
this.styleFixBodyRowHeight = document.createElement("style");
|
|
3960
3962
|
this.styleFixBodyRowHeight.innerHTML = "." + this.fixBodyRowClassName + " tbody > tr { height: auto; }";
|
|
3961
|
-
|
|
3963
|
+
htmlHead.appendChild(this.styleFixBodyRowHeight);
|
|
3962
3964
|
this.fixHeadRowClassName = "fixTableHeadRowsHeight_" + componentId;
|
|
3963
3965
|
this.styleFixHeadRowHeight = document.createElement("style");
|
|
3964
3966
|
this.styleFixHeadRowHeight.innerHTML = "." + this.fixHeadRowClassName + " thead > tr { height: auto; }";
|
|
3965
|
-
|
|
3967
|
+
htmlHead.appendChild(this.styleFixHeadRowHeight);
|
|
3966
3968
|
}
|
|
3967
3969
|
Object.defineProperty(TableFrozenPositionDirective.prototype, "sTableFrozenValue", {
|
|
3968
3970
|
set: function (_) {
|
|
@@ -3978,9 +3980,27 @@
|
|
|
3978
3980
|
if (this.sTableFrozenPosition === "left")
|
|
3979
3981
|
return;
|
|
3980
3982
|
this.applyStylesForTable();
|
|
3983
|
+
this.setUpColumnMonitoring();
|
|
3981
3984
|
};
|
|
3982
3985
|
TableFrozenPositionDirective.prototype.ngOnDestroy = function () {
|
|
3983
3986
|
window.removeEventListener("resize", this.handleWindowResize.bind(this));
|
|
3987
|
+
if (this.tableHeadObservable) {
|
|
3988
|
+
this.tableHeadObservable.disconnect();
|
|
3989
|
+
}
|
|
3990
|
+
};
|
|
3991
|
+
TableFrozenPositionDirective.prototype.setUpColumnMonitoring = function () {
|
|
3992
|
+
var _this = this;
|
|
3993
|
+
this.tableHeadObservable = new MutationObserver(function () {
|
|
3994
|
+
_this.synchronizeRowHeight();
|
|
3995
|
+
_this.onColumnsChanged.emit(null);
|
|
3996
|
+
});
|
|
3997
|
+
var tableHeads = __spread(this.el.nativeElement.getElementsByTagName("thead"));
|
|
3998
|
+
tableHeads.forEach(function (tableHead) {
|
|
3999
|
+
_this.tableHeadObservable.observe(tableHead, {
|
|
4000
|
+
subtree: true,
|
|
4001
|
+
childList: true
|
|
4002
|
+
});
|
|
4003
|
+
});
|
|
3984
4004
|
};
|
|
3985
4005
|
TableFrozenPositionDirective.prototype.applyStylesForTable = function () {
|
|
3986
4006
|
var scrollWrapper = this.el.nativeElement.querySelector(".ui-table-scrollable-wrapper");
|