@seniorsistemas/angular-components 14.16.15 → 14.16.16
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 +45 -4
- 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 +2 -0
- package/esm2015/components/table/frozen-position/frozen-position.directive.js +45 -4
- package/esm5/components/table/frozen-position/frozen-position.directive.js +46 -5
- package/fesm2015/seniorsistemas-angular-components.js +44 -3
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +45 -4
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -3805,16 +3805,14 @@ var RowTogllerDirective = /** @class */ (function (_super) {
|
|
|
3805
3805
|
|
|
3806
3806
|
var TableFrozenPositionDirective = /** @class */ (function () {
|
|
3807
3807
|
function TableFrozenPositionDirective(el, host) {
|
|
3808
|
-
var _this = this;
|
|
3809
3808
|
this.el = el;
|
|
3810
3809
|
this.host = host;
|
|
3811
3810
|
this.sTableFrozenPosition = "left";
|
|
3812
3811
|
this.isTableVisible = false;
|
|
3813
3812
|
this.onColumnsChanged = new EventEmitter();
|
|
3814
3813
|
this.table = host;
|
|
3815
|
-
this.
|
|
3816
|
-
|
|
3817
|
-
});
|
|
3814
|
+
this.table.styleClass = (this.table.styleClass || "") + " s-table-frozen-position";
|
|
3815
|
+
this.setUpTableEvents();
|
|
3818
3816
|
window.addEventListener("resize", this.handleWindowResize.bind(this));
|
|
3819
3817
|
var componentId = new Date().getTime();
|
|
3820
3818
|
var htmlHead = document.getElementsByTagName("head")[0];
|
|
@@ -3830,6 +3828,9 @@ var TableFrozenPositionDirective = /** @class */ (function () {
|
|
|
3830
3828
|
this.styleFixHeadRowHeight = document.createElement("style");
|
|
3831
3829
|
this.styleFixHeadRowHeight.innerHTML = "." + this.fixHeadRowClassName + " thead > tr { height: auto; }";
|
|
3832
3830
|
htmlHead.appendChild(this.styleFixHeadRowHeight);
|
|
3831
|
+
var expandFrozenStyle = document.createElement("style");
|
|
3832
|
+
expandFrozenStyle.innerHTML = ".s-table-frozen-position .ui-table-frozen-view .sds-expanded-row > td { visibility: hidden; }";
|
|
3833
|
+
htmlHead.appendChild(expandFrozenStyle);
|
|
3833
3834
|
}
|
|
3834
3835
|
Object.defineProperty(TableFrozenPositionDirective.prototype, "sTableFrozenValue", {
|
|
3835
3836
|
set: function (_) {
|
|
@@ -3861,6 +3862,44 @@ var TableFrozenPositionDirective = /** @class */ (function () {
|
|
|
3861
3862
|
if (this.tableHeadObservable) {
|
|
3862
3863
|
this.tableHeadObservable.disconnect();
|
|
3863
3864
|
}
|
|
3865
|
+
if (this.rowExpandedObserver) {
|
|
3866
|
+
this.rowExpandedObserver.disconnect();
|
|
3867
|
+
}
|
|
3868
|
+
};
|
|
3869
|
+
TableFrozenPositionDirective.prototype.setUpTableEvents = function () {
|
|
3870
|
+
var _this = this;
|
|
3871
|
+
this.table.onColResize.subscribe(function () {
|
|
3872
|
+
_this.handleColResize();
|
|
3873
|
+
});
|
|
3874
|
+
this.table.onRowExpand.subscribe(function () {
|
|
3875
|
+
if (_this.rowExpandedObserver) {
|
|
3876
|
+
_this.rowExpandedObserver.disconnect();
|
|
3877
|
+
}
|
|
3878
|
+
// The version of Angular/Typescript does not recognize the object ResizeObserver and breaks build
|
|
3879
|
+
_this.rowExpandedObserver = new window.ResizeObserver(function () {
|
|
3880
|
+
var frozenTDsToAdjust = _this.el.nativeElement.querySelectorAll(".ui-table-frozen-view .sds-expanded-row > td");
|
|
3881
|
+
var unFrozenTDs = _this.el.nativeElement.querySelectorAll(".ui-table-unfrozen-view .sds-expanded-row > td");
|
|
3882
|
+
frozenTDsToAdjust.forEach(function (frozenTd, index) {
|
|
3883
|
+
var unfrozenTD = unFrozenTDs[index];
|
|
3884
|
+
var unfrozenHeight = unfrozenTD.getBoundingClientRect().height;
|
|
3885
|
+
var frozenHeight = frozenTd.getBoundingClientRect().height;
|
|
3886
|
+
if (Math.abs(unfrozenHeight - frozenHeight) > 1) {
|
|
3887
|
+
frozenTd.style.height = unfrozenHeight + "px";
|
|
3888
|
+
}
|
|
3889
|
+
});
|
|
3890
|
+
});
|
|
3891
|
+
setTimeout(function () {
|
|
3892
|
+
var tdsToAdjust = _this.el.nativeElement.querySelectorAll(".ui-table-frozen-view .sds-expanded-row > td");
|
|
3893
|
+
var originalsTds = _this.el.nativeElement.querySelectorAll(".ui-table-unfrozen-view .sds-expanded-row > td");
|
|
3894
|
+
tdsToAdjust.forEach(function (td, index) {
|
|
3895
|
+
var originalTd = originalsTds[index];
|
|
3896
|
+
var height = originalTd.getBoundingClientRect().height;
|
|
3897
|
+
td.innerHTML = "<div style=\"height: " + height + "px\"></div>";
|
|
3898
|
+
td.style.padding = "0px";
|
|
3899
|
+
_this.rowExpandedObserver.observe(originalTd);
|
|
3900
|
+
});
|
|
3901
|
+
});
|
|
3902
|
+
});
|
|
3864
3903
|
};
|
|
3865
3904
|
TableFrozenPositionDirective.prototype.setUpColumnMonitoring = function () {
|
|
3866
3905
|
var _this = this;
|
|
@@ -3944,6 +3983,8 @@ var TableFrozenPositionDirective = /** @class */ (function () {
|
|
|
3944
3983
|
try {
|
|
3945
3984
|
for (var _e = (e_3 = void 0, __values(table.rows)), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
3946
3985
|
var tr = _f.value;
|
|
3986
|
+
if (tr.classList.contains("sds-expanded-row"))
|
|
3987
|
+
continue;
|
|
3947
3988
|
rowSizes.push(tr.getBoundingClientRect().height);
|
|
3948
3989
|
}
|
|
3949
3990
|
}
|