@tetacom/ng-components 1.0.70 → 1.0.73
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/component/date-picker/day-select/day-select.component.d.ts +4 -2
- package/component/table/default/string-cell/string-cell.component.d.ts +2 -0
- package/directive/auto-position/auto-position.directive.d.ts +6 -3
- package/esm2020/component/date-picker/date-picker/date-picker.component.mjs +2 -2
- package/esm2020/component/date-picker/day-select/day-select.component.mjs +18 -2
- package/esm2020/component/table/default/string-cell/string-cell.component.mjs +5 -3
- package/esm2020/directive/auto-position/auto-position.directive.mjs +13 -4
- package/fesm2015/tetacom-ng-components.mjs +32 -7
- package/fesm2015/tetacom-ng-components.mjs.map +1 -1
- package/fesm2020/tetacom-ng-components.mjs +32 -7
- package/fesm2020/tetacom-ng-components.mjs.map +1 -1
- package/package.json +1 -1
- package/style/table.scss +1 -1
|
@@ -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.
|
|
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.
|
|
2165
|
+
this.currentValue = DatePickerUtil.scrollYear(e.deltaY, this.internalValue);
|
|
2150
2166
|
};
|
|
2151
2167
|
this.openPicker = (show) => {
|
|
2152
2168
|
if (this.disabled) {
|
|
@@ -9479,6 +9495,7 @@ class StringCellComponent extends CellComponentBase {
|
|
|
9479
9495
|
super(svc, cdr);
|
|
9480
9496
|
this.svc = svc;
|
|
9481
9497
|
this.cdr = cdr;
|
|
9498
|
+
this.align = Align;
|
|
9482
9499
|
}
|
|
9483
9500
|
setValue() {
|
|
9484
9501
|
this.valueChanged();
|
|
@@ -9506,10 +9523,10 @@ class StringCellComponent extends CellComponentBase {
|
|
|
9506
9523
|
}
|
|
9507
9524
|
}
|
|
9508
9525
|
StringCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: StringCellComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
9509
|
-
StringCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: StringCellComponent, selector: "teta-string-cell", inputs: { column: "column", row: "row" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [tetaHint]=\"row[column.name]\"\n [appendToBody]=\"true\"\n [overflownOnly]=\"true\"\n [class.cell-text_disabled]=\"!editable\">\n {{row[column.name]}}\n</span>\n<input #input\n *ngIf=\"edit\"\n type=\"text\"\n class=\"input row_auto border-radius-0\"\n (blur)=\"setValue()\"\n [ngModel]=\"row[column.name]\"\n (ngModelChange)=\"row[column.name]=$event\"/>\n\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: HintDirective, selector: "[tetaHint]", inputs: ["tetaHint", "align", "verticalAlign", "delay", "overflownOnly"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9526
|
+
StringCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: StringCellComponent, selector: "teta-string-cell", inputs: { column: "column", row: "row" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [tetaHint]=\"row[column.name]\"\n [align]=\"align.auto\"\n [appendToBody]=\"true\"\n [overflownOnly]=\"true\"\n [class.cell-text_disabled]=\"!editable\">\n {{row[column.name]}}\n</span>\n<input #input\n *ngIf=\"edit\"\n type=\"text\"\n class=\"input row_auto border-radius-0\"\n (blur)=\"setValue()\"\n [ngModel]=\"row[column.name]\"\n (ngModelChange)=\"row[column.name]=$event\"/>\n\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: HintDirective, selector: "[tetaHint]", inputs: ["tetaHint", "align", "verticalAlign", "delay", "overflownOnly"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9510
9527
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: StringCellComponent, decorators: [{
|
|
9511
9528
|
type: Component,
|
|
9512
|
-
args: [{ selector: 'teta-string-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [tetaHint]=\"row[column.name]\"\n [appendToBody]=\"true\"\n [overflownOnly]=\"true\"\n [class.cell-text_disabled]=\"!editable\">\n {{row[column.name]}}\n</span>\n<input #input\n *ngIf=\"edit\"\n type=\"text\"\n class=\"input row_auto border-radius-0\"\n (blur)=\"setValue()\"\n [ngModel]=\"row[column.name]\"\n (ngModelChange)=\"row[column.name]=$event\"/>\n\n" }]
|
|
9529
|
+
args: [{ selector: 'teta-string-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [tetaHint]=\"row[column.name]\"\n [align]=\"align.auto\"\n [appendToBody]=\"true\"\n [overflownOnly]=\"true\"\n [class.cell-text_disabled]=\"!editable\">\n {{row[column.name]}}\n</span>\n<input #input\n *ngIf=\"edit\"\n type=\"text\"\n class=\"input row_auto border-radius-0\"\n (blur)=\"setValue()\"\n [ngModel]=\"row[column.name]\"\n (ngModelChange)=\"row[column.name]=$event\"/>\n\n" }]
|
|
9513
9530
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
9514
9531
|
type: Input
|
|
9515
9532
|
}], row: [{
|
|
@@ -11082,12 +11099,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
11082
11099
|
/* accordion */
|
|
11083
11100
|
|
|
11084
11101
|
class AutoPositionDirective {
|
|
11085
|
-
constructor(_elementRef) {
|
|
11102
|
+
constructor(_elementRef, _zone) {
|
|
11086
11103
|
this._elementRef = _elementRef;
|
|
11104
|
+
this._zone = _zone;
|
|
11087
11105
|
this.fixed = 'fixed';
|
|
11106
|
+
this._alive = true;
|
|
11088
11107
|
}
|
|
11089
11108
|
ngAfterViewInit() {
|
|
11090
11109
|
this.setPosition();
|
|
11110
|
+
this._zone.onStable.pipe(takeWhile(() => this._alive)).subscribe(() => {
|
|
11111
|
+
this.setPosition();
|
|
11112
|
+
});
|
|
11113
|
+
}
|
|
11114
|
+
ngOnDestroy() {
|
|
11115
|
+
this._alive = false;
|
|
11091
11116
|
}
|
|
11092
11117
|
setPosition() {
|
|
11093
11118
|
const target = this._elementRef.nativeElement;
|
|
@@ -11119,14 +11144,14 @@ class AutoPositionDirective {
|
|
|
11119
11144
|
PositionUtil.setElementPosition(target, position);
|
|
11120
11145
|
}
|
|
11121
11146
|
}
|
|
11122
|
-
AutoPositionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AutoPositionDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
11147
|
+
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 });
|
|
11123
11148
|
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 });
|
|
11124
11149
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AutoPositionDirective, decorators: [{
|
|
11125
11150
|
type: Directive,
|
|
11126
11151
|
args: [{
|
|
11127
11152
|
selector: '[tetaAutoPosition]'
|
|
11128
11153
|
}]
|
|
11129
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { align: [{
|
|
11154
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { align: [{
|
|
11130
11155
|
type: Input
|
|
11131
11156
|
}], verticalAlign: [{
|
|
11132
11157
|
type: Input
|