@seniorsistemas/angular-components 14.16.23 → 14.16.25

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.
Files changed (21) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +37 -27
  2. package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
  4. package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
  5. package/components/dynamic-form/configurations/fields/calendar-field.d.ts +2 -0
  6. package/components/dynamic-form/configurations/form-field.d.ts +4 -0
  7. package/components/table/frozen-position/frozen-position.directive.d.ts +2 -0
  8. package/esm2015/components/dynamic-form/components/fields/calendar/calendar-field.component.js +2 -2
  9. package/esm2015/components/dynamic-form/configurations/fields/calendar-field.js +2 -1
  10. package/esm2015/components/dynamic-form/configurations/form-field.js +1 -1
  11. package/esm2015/components/table/frozen-position/frozen-position.directive.js +35 -27
  12. package/esm5/components/dynamic-form/components/fields/calendar/calendar-field.component.js +2 -2
  13. package/esm5/components/dynamic-form/configurations/fields/calendar-field.js +2 -1
  14. package/esm5/components/dynamic-form/configurations/form-field.js +1 -1
  15. package/esm5/components/table/frozen-position/frozen-position.directive.js +36 -27
  16. package/fesm2015/seniorsistemas-angular-components.js +36 -27
  17. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  18. package/fesm5/seniorsistemas-angular-components.js +37 -27
  19. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  20. package/package.json +1 -1
  21. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -1559,6 +1559,7 @@ var CalendarField = /** @class */ (function (_super) {
1559
1559
  _this.view = config.view || "date";
1560
1560
  _this.minDate = config.minDate;
1561
1561
  _this.maxDate = config.maxDate;
1562
+ _this.defaultDate = config.defaultDate;
1562
1563
  _this.appendTo = config.appendTo;
1563
1564
  _this.showOnFocus = typeof config.showOnFocus === "boolean" ? config.showOnFocus : true;
1564
1565
  _this.calendarLocaleOptions = config.calendarLocaleOptions || new CalendarLocaleOptions();
@@ -3848,6 +3849,7 @@ var TableFrozenPositionDirective = /** @class */ (function () {
3848
3849
  var _this = this;
3849
3850
  setTimeout(function () {
3850
3851
  _this.synchronizeRowHeight();
3852
+ _this.setUpRowResizeMonitoring();
3851
3853
  });
3852
3854
  },
3853
3855
  enumerable: true,
@@ -3883,32 +3885,27 @@ var TableFrozenPositionDirective = /** @class */ (function () {
3883
3885
  _this.handleColResize();
3884
3886
  });
3885
3887
  this.table.onRowExpand.subscribe(function () {
3886
- if (_this.rowExpandedObserver) {
3887
- _this.rowExpandedObserver.disconnect();
3888
- }
3889
- // The version of Angular/Typescript does not recognize the object ResizeObserver and breaks build
3890
- _this.rowExpandedObserver = new window.ResizeObserver(function () {
3891
- var frozenTDsToAdjust = _this.el.nativeElement.querySelectorAll(".ui-table-frozen-view .sds-expanded-row > td");
3892
- var unFrozenTDs = _this.el.nativeElement.querySelectorAll(".ui-table-unfrozen-view .sds-expanded-row > td");
3893
- frozenTDsToAdjust.forEach(function (frozenTd, index) {
3894
- var unfrozenTD = unFrozenTDs[index];
3895
- var unfrozenHeight = unfrozenTD.getBoundingClientRect().height;
3896
- var frozenHeight = frozenTd.getBoundingClientRect().height;
3897
- if (Math.abs(unfrozenHeight - frozenHeight) > 1) {
3898
- frozenTd.style.height = unfrozenHeight + "px";
3899
- }
3900
- });
3901
- });
3902
- setTimeout(function () {
3903
- var tdsToAdjust = _this.el.nativeElement.querySelectorAll(".ui-table-frozen-view .sds-expanded-row > td");
3904
- var originalsTds = _this.el.nativeElement.querySelectorAll(".ui-table-unfrozen-view .sds-expanded-row > td");
3905
- tdsToAdjust.forEach(function (td, index) {
3906
- var originalTd = originalsTds[index];
3907
- var height = originalTd.getBoundingClientRect().height;
3908
- td.innerHTML = "<div style=\"height: " + height + "px\"></div>";
3909
- td.style.padding = "0px";
3910
- _this.rowExpandedObserver.observe(originalTd);
3911
- });
3888
+ _this.setUpRowResizeMonitoring();
3889
+ });
3890
+ };
3891
+ TableFrozenPositionDirective.prototype.setUpRowResizeMonitoring = function () {
3892
+ var _this = this;
3893
+ if (this.rowExpandedObserver) {
3894
+ this.rowExpandedObserver.disconnect();
3895
+ }
3896
+ // The version of Angular/Typescript does not recognize the object ResizeObserver and breaks build
3897
+ this.rowExpandedObserver = new window.ResizeObserver(function () {
3898
+ _this.applyHeightForExpandedRows();
3899
+ });
3900
+ setTimeout(function () {
3901
+ var tdsToAdjust = _this.el.nativeElement.querySelectorAll(".ui-table-frozen-view .sds-expanded-row > td");
3902
+ var originalsTds = _this.el.nativeElement.querySelectorAll(".ui-table-unfrozen-view .sds-expanded-row > td");
3903
+ tdsToAdjust.forEach(function (td, index) {
3904
+ var originalTd = originalsTds[index];
3905
+ var height = originalTd.getBoundingClientRect().height;
3906
+ td.innerHTML = "<div style=\"height: " + height + "px\"></div>";
3907
+ td.style.padding = "0px";
3908
+ _this.rowExpandedObserver.observe(originalTd);
3912
3909
  });
3913
3910
  });
3914
3911
  };
@@ -3926,6 +3923,19 @@ var TableFrozenPositionDirective = /** @class */ (function () {
3926
3923
  });
3927
3924
  });
3928
3925
  };
3926
+ TableFrozenPositionDirective.prototype.applyHeightForExpandedRows = function () {
3927
+ var frozenTDsToAdjust = this.el.nativeElement.querySelectorAll(".ui-table-frozen-view .sds-expanded-row > td");
3928
+ var unFrozenTDs = this.el.nativeElement.querySelectorAll(".ui-table-unfrozen-view .sds-expanded-row > td");
3929
+ frozenTDsToAdjust.forEach(function (frozenTd, index) {
3930
+ var unfrozenTD = unFrozenTDs[index];
3931
+ var unfrozenHeight = unfrozenTD.getBoundingClientRect().height;
3932
+ var frozenHeight = frozenTd.getBoundingClientRect().height;
3933
+ if (Math.abs(unfrozenHeight - frozenHeight) > 1) {
3934
+ frozenTd.style.height = unfrozenHeight + "px";
3935
+ frozenTd.innerHTML = "<div></div>";
3936
+ }
3937
+ });
3938
+ };
3929
3939
  TableFrozenPositionDirective.prototype.applyStylesForTable = function () {
3930
3940
  var scrollWrapper = this.el.nativeElement.querySelector(".ui-table-scrollable-wrapper");
3931
3941
  if (!scrollWrapper) {
@@ -4642,7 +4652,7 @@ var CalendarFieldComponent = /** @class */ (function () {
4642
4652
  ], CalendarFieldComponent.prototype, "timeOnly", void 0);
4643
4653
  CalendarFieldComponent = __decorate([
4644
4654
  Component({
4645
- template: "<div [pTooltip]=\"field.tooltip\" tooltipPosition=\"top\" [showDelay]=\"500\" [appendTo]=\"field.appendTo || 'body'\">\n <!-- Remover as propriedades [showTransitionOptions] e [hideTransitionOptions] quando atualizar para o PrimeNG v10, esses atributos foram\n usados para remover um bug ocasionado pela anima\u00E7\u00E3o do componente p-calendar, bug explicado nas issues: #ERPROM-5534, #ERPROM-8248 e #DSN-1045. -->\n \n <p-calendar\n #calendar\n sCalendarMask\n [inputId]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [showIcon]=\"true\"\n [timeOnly]=\"timeOnly\"\n [selectionMode]=\"field.selectionMode\"\n [rangeSeparator]=\"field.rangeSeparator\"\n [showTime]=\"showTime\"\n [showSeconds]=\"field.showSeconds\"\n [showOnFocus]=\"field.showOnFocus\"\n [formControl]=\"formControl\"\n icon=\"fa fa-calendar\"\n [minDate]=\"field.minDate\"\n [maxDate]=\"field.maxDate\"\n [locale]=\"field.calendarLocaleOptions\"\n [dateFormat]=\"field.calendarLocaleOptions.dateFormat\"\n [hourFormat]=\"field.calendarLocaleOptions.hourFormat\"\n [view]=\"field.view\"\n [placeholder]=\"field.placeholder\"\n inputStyleClass=\"mousetrap\"\n [appendTo]=\"field.appendTo\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event): null\"\n (onSelect)=\"field.onSelect ? field.onSelect($event) : null\"\n (onClose)=\"field.onClose ? field.onClose($event) : null\"\n (onTodayClick)=\"field.onTodayClick ? field.onTodayClick($event) : null\"\n (onClearClick)=\"field.onClearClick ? field.onClearClick($event) : null\"\n (onMonthChange)=\"field.onMonthChange ? field.onMonthChange($event) : null\"\n (onYearChange)=\"field.onYearChange ? field.onYearChange($event) : null\"\n [showTransitionOptions]=\"'0ms'\"\n [hideTransitionOptions]=\"'0ms'\"\n ></p-calendar>\n</div>\n"
4655
+ template: "<div [pTooltip]=\"field.tooltip\" tooltipPosition=\"top\" [showDelay]=\"500\" [appendTo]=\"field.appendTo || 'body'\">\n <!-- Remover as propriedades [showTransitionOptions] e [hideTransitionOptions] quando atualizar para o PrimeNG v10, esses atributos foram\n usados para remover um bug ocasionado pela anima\u00E7\u00E3o do componente p-calendar, bug explicado nas issues: #ERPROM-5534, #ERPROM-8248 e #DSN-1045. -->\n\n <p-calendar\n #calendar\n sCalendarMask\n [inputId]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [showIcon]=\"true\"\n [timeOnly]=\"timeOnly\"\n [selectionMode]=\"field.selectionMode\"\n [rangeSeparator]=\"field.rangeSeparator\"\n [showTime]=\"showTime\"\n [showSeconds]=\"field.showSeconds\"\n [showOnFocus]=\"field.showOnFocus\"\n [formControl]=\"formControl\"\n icon=\"fa fa-calendar\"\n [minDate]=\"field.minDate\"\n [maxDate]=\"field.maxDate\"\n [defaultDate]=\"field.defaultDate\"\n [locale]=\"field.calendarLocaleOptions\"\n [dateFormat]=\"field.calendarLocaleOptions.dateFormat\"\n [hourFormat]=\"field.calendarLocaleOptions.hourFormat\"\n [view]=\"field.view\"\n [placeholder]=\"field.placeholder\"\n inputStyleClass=\"mousetrap\"\n [appendTo]=\"field.appendTo\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event): null\"\n (onSelect)=\"field.onSelect ? field.onSelect($event) : null\"\n (onClose)=\"field.onClose ? field.onClose($event) : null\"\n (onTodayClick)=\"field.onTodayClick ? field.onTodayClick($event) : null\"\n (onClearClick)=\"field.onClearClick ? field.onClearClick($event) : null\"\n (onMonthChange)=\"field.onMonthChange ? field.onMonthChange($event) : null\"\n (onYearChange)=\"field.onYearChange ? field.onYearChange($event) : null\"\n [showTransitionOptions]=\"'0ms'\"\n [hideTransitionOptions]=\"'0ms'\"\n ></p-calendar>\n</div>\n"
4646
4656
  })
4647
4657
  ], CalendarFieldComponent);
4648
4658
  return CalendarFieldComponent;