@tetacom/ng-components 1.0.127 → 1.0.129
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/filter/boolean-filter/boolean-filter.component.d.ts +6 -1
- 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/filter/boolean-filter/boolean-filter.component.mjs +15 -10
- package/esm2020/component/table/table-body/table-body.component.mjs +13 -1
- package/esm2020/locale/en.mjs +3 -1
- package/esm2020/locale/ru.mjs +3 -1
- package/esm2020/locale/teta-localisation.mjs +1 -1
- package/fesm2015/tetacom-ng-components.mjs +31 -6
- package/fesm2015/tetacom-ng-components.mjs.map +1 -1
- package/fesm2020/tetacom-ng-components.mjs +30 -6
- package/fesm2020/tetacom-ng-components.mjs.map +1 -1
- package/locale/teta-localisation.d.ts +2 -0
- package/package.json +1 -1
|
@@ -978,6 +978,8 @@ const enLocale = {
|
|
|
978
978
|
avg: 'Avg',
|
|
979
979
|
search: 'Search',
|
|
980
980
|
notSelected: 'Not selected',
|
|
981
|
+
yes: 'Yes',
|
|
982
|
+
no: 'No',
|
|
981
983
|
months: [
|
|
982
984
|
'January',
|
|
983
985
|
'February',
|
|
@@ -4693,11 +4695,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
4693
4695
|
}] } });
|
|
4694
4696
|
|
|
4695
4697
|
class BooleanFilterComponent extends FilterComponentBase {
|
|
4696
|
-
constructor(changeDetector) {
|
|
4698
|
+
constructor(changeDetector, _config) {
|
|
4697
4699
|
super();
|
|
4698
4700
|
this.changeDetector = changeDetector;
|
|
4701
|
+
this._config = _config;
|
|
4699
4702
|
this.filterOptions = [];
|
|
4700
4703
|
this.filterChanged = new EventEmitter();
|
|
4704
|
+
this.locale = this._config.locale;
|
|
4701
4705
|
}
|
|
4702
4706
|
set state(val) {
|
|
4703
4707
|
this.state$ = val;
|
|
@@ -4707,7 +4711,8 @@ class BooleanFilterComponent extends FilterComponentBase {
|
|
|
4707
4711
|
get state() {
|
|
4708
4712
|
return this.state$;
|
|
4709
4713
|
}
|
|
4710
|
-
ngOnInit() {
|
|
4714
|
+
ngOnInit() {
|
|
4715
|
+
}
|
|
4711
4716
|
setFilter() {
|
|
4712
4717
|
this.filterChanged.emit(this.filter);
|
|
4713
4718
|
}
|
|
@@ -4723,12 +4728,12 @@ class BooleanFilterComponent extends FilterComponentBase {
|
|
|
4723
4728
|
return filter;
|
|
4724
4729
|
}
|
|
4725
4730
|
}
|
|
4726
|
-
BooleanFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: BooleanFilterComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4727
|
-
BooleanFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: BooleanFilterComponent, selector: "teta-boolean-filter", inputs: { column: "column", data: "data", filterOptions: "filterOptions", state: "state" }, outputs: { filterChanged: "filterChanged" }, usesInheritance: true, ngImport: i0, template: "<div class=\"padding-3\">\n <teta-radio [ngModel]=\"filter.value\" (ngModelChange)=\"setFilter()\">\n <teta-radio-button [value]=\"null\">
|
|
4731
|
+
BooleanFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: BooleanFilterComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: TetaConfigService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4732
|
+
BooleanFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: BooleanFilterComponent, selector: "teta-boolean-filter", inputs: { column: "column", data: "data", filterOptions: "filterOptions", state: "state" }, outputs: { filterChanged: "filterChanged" }, usesInheritance: true, ngImport: i0, template: "<div class=\"padding-3\" *ngIf=\"locale | async as loc\">\n <teta-radio [ngModel]=\"filter.value\" (ngModelChange)=\"setFilter()\">\n <teta-radio-button [value]=\"null\">{{loc?.notSelected}}</teta-radio-button>\n <teta-radio-button [value]=\"true\">{{loc?.yes}}</teta-radio-button>\n <teta-radio-button [value]=\"false\">{{loc?.no}}</teta-radio-button>\n </teta-radio>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: "component", type: RadioComponent, selector: "teta-radio", inputs: ["inline", "checkChangeSelected", "disabled", "value"] }, { kind: "component", type: RadioButtonComponent, selector: "teta-radio-button", inputs: ["checked", "disabled", "value"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4728
4733
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: BooleanFilterComponent, decorators: [{
|
|
4729
4734
|
type: Component,
|
|
4730
|
-
args: [{ selector: 'teta-boolean-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"padding-3\">\n <teta-radio [ngModel]=\"filter.value\" (ngModelChange)=\"setFilter()\">\n <teta-radio-button [value]=\"null\">
|
|
4731
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
4735
|
+
args: [{ selector: 'teta-boolean-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"padding-3\" *ngIf=\"locale | async as loc\">\n <teta-radio [ngModel]=\"filter.value\" (ngModelChange)=\"setFilter()\">\n <teta-radio-button [value]=\"null\">{{loc?.notSelected}}</teta-radio-button>\n <teta-radio-button [value]=\"true\">{{loc?.yes}}</teta-radio-button>\n <teta-radio-button [value]=\"false\">{{loc?.no}}</teta-radio-button>\n </teta-radio>\n</div>\n" }]
|
|
4736
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: TetaConfigService }]; }, propDecorators: { column: [{
|
|
4732
4737
|
type: Input
|
|
4733
4738
|
}], data: [{
|
|
4734
4739
|
type: Input
|
|
@@ -10058,9 +10063,11 @@ class TableBodyComponent {
|
|
|
10058
10063
|
this.activeRow = _;
|
|
10059
10064
|
this._cdr.markForCheck();
|
|
10060
10065
|
});
|
|
10066
|
+
this.addResizeObserver();
|
|
10061
10067
|
}
|
|
10062
10068
|
ngOnDestroy() {
|
|
10063
10069
|
this._alive = false;
|
|
10070
|
+
this.removeResizeObserver();
|
|
10064
10071
|
}
|
|
10065
10072
|
getAggregateValue(column) {
|
|
10066
10073
|
if (column.aggregate === AggregationType.sum) {
|
|
@@ -10100,6 +10107,16 @@ class TableBodyComponent {
|
|
|
10100
10107
|
trackColumns(index, column) {
|
|
10101
10108
|
return column.name;
|
|
10102
10109
|
}
|
|
10110
|
+
addResizeObserver() {
|
|
10111
|
+
this._obs = new ResizeObserver((_) => {
|
|
10112
|
+
this.viewport?.checkViewportSize();
|
|
10113
|
+
});
|
|
10114
|
+
this._obs.observe(this._elementRef.nativeElement);
|
|
10115
|
+
}
|
|
10116
|
+
removeResizeObserver() {
|
|
10117
|
+
this._obs.unobserve(this._elementRef.nativeElement);
|
|
10118
|
+
this._obs.disconnect();
|
|
10119
|
+
}
|
|
10103
10120
|
getSum(columnName) {
|
|
10104
10121
|
return this.data?.reduce((accum, current) => {
|
|
10105
10122
|
const val = parseFloat(current[columnName]);
|
|
@@ -10986,6 +11003,7 @@ class Chart3dComponent {
|
|
|
10986
11003
|
}
|
|
10987
11004
|
ngOnDestroy() {
|
|
10988
11005
|
this._alive = false;
|
|
11006
|
+
this.removeResizeObserver();
|
|
10989
11007
|
}
|
|
10990
11008
|
init() {
|
|
10991
11009
|
if (!this._scene) {
|
|
@@ -11081,6 +11099,10 @@ class Chart3dComponent {
|
|
|
11081
11099
|
});
|
|
11082
11100
|
this._obs.observe(this._elementRef.nativeElement);
|
|
11083
11101
|
}
|
|
11102
|
+
removeResizeObserver() {
|
|
11103
|
+
this._obs.unobserve(this._elementRef.nativeElement);
|
|
11104
|
+
this._obs.disconnect();
|
|
11105
|
+
}
|
|
11084
11106
|
makeSprite(text, opts) {
|
|
11085
11107
|
const fontSize = 20;
|
|
11086
11108
|
const canvas = document.createElement('canvas');
|
|
@@ -12507,6 +12529,8 @@ const ruLocale = {
|
|
|
12507
12529
|
avg: 'Средн',
|
|
12508
12530
|
search: 'Поиск',
|
|
12509
12531
|
notSelected: 'Не выбрано',
|
|
12532
|
+
yes: 'Да',
|
|
12533
|
+
no: 'Нет',
|
|
12510
12534
|
months: [
|
|
12511
12535
|
'Январь',
|
|
12512
12536
|
'Февраль',
|