@tetacom/ng-components 1.0.126 → 1.0.128
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/assets/icons.svg +5 -0
- package/component/chart-3d/chart3d/chart3d.component.d.ts +1 -0
- package/component/table/table-body/table-body.component.d.ts +3 -0
- package/esm2020/component/chart-3d/chart3d/chart3d.component.mjs +6 -1
- package/esm2020/component/input/text-field/text-field.component.mjs +3 -3
- package/esm2020/component/table/table-body/table-body.component.mjs +13 -1
- package/fesm2015/tetacom-ng-components.mjs +20 -2
- package/fesm2015/tetacom-ng-components.mjs.map +1 -1
- package/fesm2020/tetacom-ng-components.mjs +19 -2
- package/fesm2020/tetacom-ng-components.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -4181,7 +4181,7 @@ TextFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ver
|
|
|
4181
4181
|
useExisting: forwardRef(() => TextFieldComponent),
|
|
4182
4182
|
multi: true,
|
|
4183
4183
|
},
|
|
4184
|
-
], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<teta-icon *ngIf=\"leftIconName\" [name]=\"leftIconName\"></teta-icon>\n<input\n #input\n [ngModel]=\"value | tetaNumber : inputFocused ? null : decimalPart\"\n [tetaOnlyNumber]=\"onlyNumber\"\n (ngModelChange)=\"value = $event; onChange($event);\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n (focus)='inputFocused = true'\n (blur)=\"inputFocused = false;emitBlur()\"\n (keydown)=\"keyPress($event)\"\n autocomplete=\"off\"\n type=\"text\"\n/>\n<teta-icon\n *ngIf=\"value && !disabled\"\n class=\"close-icon\"\n [name]=\"'closeCircle'\"\n (click)=\"value = ''; onChange('');\"\n></teta-icon>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }, { 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: OnlyNumberDirective, selector: "[tetaOnlyNumber]", inputs: ["tetaOnlyNumber", "allowDecimals", "allowSign", "decimalSeparator", "commaSeparator"] }, { kind: "pipe", type: NumberPipe, name: "tetaNumber" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4184
|
+
], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<teta-icon *ngIf=\"leftIconName\" [name]=\"leftIconName\"></teta-icon>\n<input\n #input\n [ngModel]=\"value | tetaNumber : (inputFocused || !onlyNumber) ? null : decimalPart\"\n [tetaOnlyNumber]=\"onlyNumber\"\n (ngModelChange)=\"value = $event; onChange($event);\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n (focus)='inputFocused = true'\n (blur)=\"inputFocused = false;emitBlur()\"\n (keydown)=\"keyPress($event)\"\n autocomplete=\"off\"\n type=\"text\"\n/>\n<teta-icon\n *ngIf=\"value && !disabled\"\n class=\"close-icon\"\n [name]=\"'closeCircle'\"\n (click)=\"value = ''; onChange('');\"\n></teta-icon>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }, { 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: OnlyNumberDirective, selector: "[tetaOnlyNumber]", inputs: ["tetaOnlyNumber", "allowDecimals", "allowSign", "decimalSeparator", "commaSeparator"] }, { kind: "pipe", type: NumberPipe, name: "tetaNumber" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4185
4185
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TextFieldComponent, decorators: [{
|
|
4186
4186
|
type: Component,
|
|
4187
4187
|
args: [{ selector: 'teta-text-field', providers: [
|
|
@@ -4190,7 +4190,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
4190
4190
|
useExisting: forwardRef(() => TextFieldComponent),
|
|
4191
4191
|
multi: true,
|
|
4192
4192
|
},
|
|
4193
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<teta-icon *ngIf=\"leftIconName\" [name]=\"leftIconName\"></teta-icon>\n<input\n #input\n [ngModel]=\"value | tetaNumber : inputFocused ? null : decimalPart\"\n [tetaOnlyNumber]=\"onlyNumber\"\n (ngModelChange)=\"value = $event; onChange($event);\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n (focus)='inputFocused = true'\n (blur)=\"inputFocused = false;emitBlur()\"\n (keydown)=\"keyPress($event)\"\n autocomplete=\"off\"\n type=\"text\"\n/>\n<teta-icon\n *ngIf=\"value && !disabled\"\n class=\"close-icon\"\n [name]=\"'closeCircle'\"\n (click)=\"value = ''; onChange('');\"\n></teta-icon>\n" }]
|
|
4193
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<teta-icon *ngIf=\"leftIconName\" [name]=\"leftIconName\"></teta-icon>\n<input\n #input\n [ngModel]=\"value | tetaNumber : (inputFocused || !onlyNumber) ? null : decimalPart\"\n [tetaOnlyNumber]=\"onlyNumber\"\n (ngModelChange)=\"value = $event; onChange($event);\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n (focus)='inputFocused = true'\n (blur)=\"inputFocused = false;emitBlur()\"\n (keydown)=\"keyPress($event)\"\n autocomplete=\"off\"\n type=\"text\"\n/>\n<teta-icon\n *ngIf=\"value && !disabled\"\n class=\"close-icon\"\n [name]=\"'closeCircle'\"\n (click)=\"value = ''; onChange('');\"\n></teta-icon>\n" }]
|
|
4194
4194
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { placeholder: [{
|
|
4195
4195
|
type: Input
|
|
4196
4196
|
}], leftIconName: [{
|
|
@@ -10058,9 +10058,11 @@ class TableBodyComponent {
|
|
|
10058
10058
|
this.activeRow = _;
|
|
10059
10059
|
this._cdr.markForCheck();
|
|
10060
10060
|
});
|
|
10061
|
+
this.addResizeObserver();
|
|
10061
10062
|
}
|
|
10062
10063
|
ngOnDestroy() {
|
|
10063
10064
|
this._alive = false;
|
|
10065
|
+
this.removeResizeObserver();
|
|
10064
10066
|
}
|
|
10065
10067
|
getAggregateValue(column) {
|
|
10066
10068
|
if (column.aggregate === AggregationType.sum) {
|
|
@@ -10100,6 +10102,16 @@ class TableBodyComponent {
|
|
|
10100
10102
|
trackColumns(index, column) {
|
|
10101
10103
|
return column.name;
|
|
10102
10104
|
}
|
|
10105
|
+
addResizeObserver() {
|
|
10106
|
+
this._obs = new ResizeObserver((_) => {
|
|
10107
|
+
this.viewport?.checkViewportSize();
|
|
10108
|
+
});
|
|
10109
|
+
this._obs.observe(this._elementRef.nativeElement);
|
|
10110
|
+
}
|
|
10111
|
+
removeResizeObserver() {
|
|
10112
|
+
this._obs.unobserve(this._elementRef.nativeElement);
|
|
10113
|
+
this._obs.disconnect();
|
|
10114
|
+
}
|
|
10103
10115
|
getSum(columnName) {
|
|
10104
10116
|
return this.data?.reduce((accum, current) => {
|
|
10105
10117
|
const val = parseFloat(current[columnName]);
|
|
@@ -10986,6 +10998,7 @@ class Chart3dComponent {
|
|
|
10986
10998
|
}
|
|
10987
10999
|
ngOnDestroy() {
|
|
10988
11000
|
this._alive = false;
|
|
11001
|
+
this.removeResizeObserver();
|
|
10989
11002
|
}
|
|
10990
11003
|
init() {
|
|
10991
11004
|
if (!this._scene) {
|
|
@@ -11081,6 +11094,10 @@ class Chart3dComponent {
|
|
|
11081
11094
|
});
|
|
11082
11095
|
this._obs.observe(this._elementRef.nativeElement);
|
|
11083
11096
|
}
|
|
11097
|
+
removeResizeObserver() {
|
|
11098
|
+
this._obs.unobserve(this._elementRef.nativeElement);
|
|
11099
|
+
this._obs.disconnect();
|
|
11100
|
+
}
|
|
11084
11101
|
makeSprite(text, opts) {
|
|
11085
11102
|
const fontSize = 20;
|
|
11086
11103
|
const canvas = document.createElement('canvas');
|