@tetacom/ng-components 1.0.71 → 1.0.74

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.
@@ -1466,6 +1466,22 @@ class DaySelectComponent {
1466
1466
  this.locale = locale;
1467
1467
  });
1468
1468
  }
1469
+ set minDate(d) {
1470
+ this._minDate = d;
1471
+ if (this._currentValue) {
1472
+ this.createDays();
1473
+ }
1474
+ this._cdr.markForCheck();
1475
+ }
1476
+ ;
1477
+ set maxDate(d) {
1478
+ this._maxDate = d;
1479
+ if (this._currentValue) {
1480
+ this.createDays();
1481
+ }
1482
+ this._cdr.markForCheck();
1483
+ }
1484
+ ;
1469
1485
  set currentValue(val) {
1470
1486
  if (!this._currentValue ||
1471
1487
  DateUtil.truncateToDay(val)?.getTime() !==
@@ -1558,7 +1574,7 @@ class DaySelectComponent {
1558
1574
  return result;
1559
1575
  }
1560
1576
  createDays() {
1561
- this.days = DatePickerUtil.getPickerDays(this.currentValue, this.firstDayOfWeek, this.minDate, this.maxDate, this.disabledDates, this.disabledDays, this.disabledPeriods);
1577
+ this.days = DatePickerUtil.getPickerDays(this.currentValue, this.firstDayOfWeek, this._minDate, this._maxDate, this.disabledDates, this.disabledDays, this.disabledPeriods);
1562
1578
  }
1563
1579
  checkDays() {
1564
1580
  if (this.days) {
@@ -2146,7 +2162,7 @@ class DatePickerComponent {
2146
2162
  if (this.isScrollIgnored()) {
2147
2163
  return false;
2148
2164
  }
2149
- this.currentValue = DatePickerUtil.scrollMonth(e.deltaY, this.internalValue);
2165
+ this.currentValue = DatePickerUtil.scrollYear(e.deltaY, this.internalValue);
2150
2166
  };
2151
2167
  this.openPicker = (show) => {
2152
2168
  if (this.disabled) {
@@ -8671,6 +8687,7 @@ class TreeComponent {
8671
8687
  .pipe(takeWhile((_) => this._alive), filter((_) => this._openItems !== _))
8672
8688
  .subscribe((_) => {
8673
8689
  this._openItems = _;
8690
+ this.displayData = this.getDisplayData(this._data, 0);
8674
8691
  this.openItemsChange.emit(_);
8675
8692
  });
8676
8693
  }
@@ -8696,7 +8713,7 @@ class TreeComponent {
8696
8713
  ngOnChanges(changes) {
8697
8714
  this.displayData = this.getDisplayData(this._data, 0);
8698
8715
  this.childPadding = this.hasChildren(this._data);
8699
- this._cdr.detectChanges();
8716
+ //this._cdr.detectChanges();
8700
8717
  }
8701
8718
  ngOnDestroy() {
8702
8719
  this._alive = false;
@@ -8718,10 +8735,10 @@ class TreeComponent {
8718
8735
  }
8719
8736
  }
8720
8737
  TreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TreeComponent, deps: [{ token: TreeService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
8721
- TreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: TreeComponent, selector: "teta-tree", inputs: { data: "data", padding: "padding", childNodeName: "childNodeName", virtual: "virtual", height: "height", openItems: "openItems", compareItems: "compareItems" }, outputs: { service: "service", openItemsChange: "openItemsChange" }, host: { properties: { "class.tree": "this.treeClass" } }, providers: [TreeService], queries: [{ propertyName: "template", first: true, predicate: TetaTemplateDirective, descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<cdk-virtual-scroll-viewport *ngIf=\"virtual; else default\"\n class=\"table-body-container\"\n [itemSize]=\"height\">\n <teta-tree-item *cdkVirtualFor=\"let item of displayData;templateCacheSize: 0; trackBy: trackRow;\"\n [item]=\"item\"\n [style.height.px]=\"height\"\n [depth]=\"item['level']\"\n [padding]=\"padding\"\n [childNodeName]=\"childNodeName\"\n [childPadding]=\"childPadding\"\n [template]=\"template?.template\"></teta-tree-item>\n</cdk-virtual-scroll-viewport>\n<ng-template #default>\n <teta-tree-item *ngFor=\"let item of displayData\"\n [item]=\"item\"\n [style.height.px]=\"height\"\n [depth]=\"item['level']\"\n [padding]=\"padding\"\n [childNodeName]=\"childNodeName\"\n [childPadding]=\"childPadding\"\n [template]=\"template?.template\"></teta-tree-item>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i5.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i5.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: TreeItemComponent, selector: "teta-tree-item", inputs: ["item", "depth", "padding", "childNodeName", "template", "childPadding"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8738
+ TreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: TreeComponent, selector: "teta-tree", inputs: { data: "data", padding: "padding", childNodeName: "childNodeName", virtual: "virtual", height: "height", openItems: "openItems", compareItems: "compareItems" }, outputs: { service: "service", openItemsChange: "openItemsChange" }, host: { properties: { "class.tree": "this.treeClass" } }, providers: [TreeService], queries: [{ propertyName: "template", first: true, predicate: TetaTemplateDirective, descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<cdk-virtual-scroll-viewport *ngIf=\"virtual; else default\"\n class=\"table-body-container\"\n [itemSize]=\"height\">\n <teta-tree-item *cdkVirtualFor=\"let item of displayData;templateCacheSize: 0; trackBy: trackRow;\"\n [item]=\"item\"\n [style.height.px]=\"height\"\n [depth]=\"item['level']\"\n [padding]=\"padding\"\n [childNodeName]=\"childNodeName\"\n [childPadding]=\"childPadding\"\n [template]=\"template?.template\"></teta-tree-item>\n</cdk-virtual-scroll-viewport>\n<ng-template #default>\n <teta-tree-item *ngFor=\"let item of displayData; trackBy: trackRow\"\n [item]=\"item\"\n [style.height.px]=\"height\"\n [depth]=\"item['level']\"\n [padding]=\"padding\"\n [childNodeName]=\"childNodeName\"\n [childPadding]=\"childPadding\"\n [template]=\"template?.template\"></teta-tree-item>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i5.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i5.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: TreeItemComponent, selector: "teta-tree-item", inputs: ["item", "depth", "padding", "childNodeName", "template", "childPadding"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8722
8739
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TreeComponent, decorators: [{
8723
8740
  type: Component,
8724
- args: [{ selector: 'teta-tree', providers: [TreeService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<cdk-virtual-scroll-viewport *ngIf=\"virtual; else default\"\n class=\"table-body-container\"\n [itemSize]=\"height\">\n <teta-tree-item *cdkVirtualFor=\"let item of displayData;templateCacheSize: 0; trackBy: trackRow;\"\n [item]=\"item\"\n [style.height.px]=\"height\"\n [depth]=\"item['level']\"\n [padding]=\"padding\"\n [childNodeName]=\"childNodeName\"\n [childPadding]=\"childPadding\"\n [template]=\"template?.template\"></teta-tree-item>\n</cdk-virtual-scroll-viewport>\n<ng-template #default>\n <teta-tree-item *ngFor=\"let item of displayData\"\n [item]=\"item\"\n [style.height.px]=\"height\"\n [depth]=\"item['level']\"\n [padding]=\"padding\"\n [childNodeName]=\"childNodeName\"\n [childPadding]=\"childPadding\"\n [template]=\"template?.template\"></teta-tree-item>\n</ng-template>\n" }]
8741
+ args: [{ selector: 'teta-tree', providers: [TreeService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<cdk-virtual-scroll-viewport *ngIf=\"virtual; else default\"\n class=\"table-body-container\"\n [itemSize]=\"height\">\n <teta-tree-item *cdkVirtualFor=\"let item of displayData;templateCacheSize: 0; trackBy: trackRow;\"\n [item]=\"item\"\n [style.height.px]=\"height\"\n [depth]=\"item['level']\"\n [padding]=\"padding\"\n [childNodeName]=\"childNodeName\"\n [childPadding]=\"childPadding\"\n [template]=\"template?.template\"></teta-tree-item>\n</cdk-virtual-scroll-viewport>\n<ng-template #default>\n <teta-tree-item *ngFor=\"let item of displayData; trackBy: trackRow\"\n [item]=\"item\"\n [style.height.px]=\"height\"\n [depth]=\"item['level']\"\n [padding]=\"padding\"\n [childNodeName]=\"childNodeName\"\n [childPadding]=\"childPadding\"\n [template]=\"template?.template\"></teta-tree-item>\n</ng-template>\n" }]
8725
8742
  }], ctorParameters: function () { return [{ type: TreeService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { data: [{
8726
8743
  type: Input
8727
8744
  }], padding: [{
@@ -11083,12 +11100,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
11083
11100
  /* accordion */
11084
11101
 
11085
11102
  class AutoPositionDirective {
11086
- constructor(_elementRef) {
11103
+ constructor(_elementRef, _zone) {
11087
11104
  this._elementRef = _elementRef;
11105
+ this._zone = _zone;
11088
11106
  this.fixed = 'fixed';
11107
+ this._alive = true;
11089
11108
  }
11090
11109
  ngAfterViewInit() {
11091
11110
  this.setPosition();
11111
+ this._zone.onStable.pipe(takeWhile(() => this._alive)).subscribe(() => {
11112
+ this.setPosition();
11113
+ });
11114
+ }
11115
+ ngOnDestroy() {
11116
+ this._alive = false;
11092
11117
  }
11093
11118
  setPosition() {
11094
11119
  const target = this._elementRef.nativeElement;
@@ -11120,14 +11145,14 @@ class AutoPositionDirective {
11120
11145
  PositionUtil.setElementPosition(target, position);
11121
11146
  }
11122
11147
  }
11123
- AutoPositionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AutoPositionDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
11148
+ AutoPositionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AutoPositionDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
11124
11149
  AutoPositionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.2", type: AutoPositionDirective, selector: "[tetaAutoPosition]", inputs: { align: "align", verticalAlign: "verticalAlign" }, host: { properties: { "style.position": "this.fixed" } }, ngImport: i0 });
11125
11150
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AutoPositionDirective, decorators: [{
11126
11151
  type: Directive,
11127
11152
  args: [{
11128
11153
  selector: '[tetaAutoPosition]'
11129
11154
  }]
11130
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { align: [{
11155
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { align: [{
11131
11156
  type: Input
11132
11157
  }], verticalAlign: [{
11133
11158
  type: Input