@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
|
@@ -987,6 +987,8 @@ const enLocale = {
|
|
|
987
987
|
avg: 'Avg',
|
|
988
988
|
search: 'Search',
|
|
989
989
|
notSelected: 'Not selected',
|
|
990
|
+
yes: 'Yes',
|
|
991
|
+
no: 'No',
|
|
990
992
|
months: [
|
|
991
993
|
'January',
|
|
992
994
|
'February',
|
|
@@ -4725,11 +4727,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
4725
4727
|
}] } });
|
|
4726
4728
|
|
|
4727
4729
|
class BooleanFilterComponent extends FilterComponentBase {
|
|
4728
|
-
constructor(changeDetector) {
|
|
4730
|
+
constructor(changeDetector, _config) {
|
|
4729
4731
|
super();
|
|
4730
4732
|
this.changeDetector = changeDetector;
|
|
4733
|
+
this._config = _config;
|
|
4731
4734
|
this.filterOptions = [];
|
|
4732
4735
|
this.filterChanged = new EventEmitter();
|
|
4736
|
+
this.locale = this._config.locale;
|
|
4733
4737
|
}
|
|
4734
4738
|
set state(val) {
|
|
4735
4739
|
this.state$ = val;
|
|
@@ -4739,7 +4743,8 @@ class BooleanFilterComponent extends FilterComponentBase {
|
|
|
4739
4743
|
get state() {
|
|
4740
4744
|
return this.state$;
|
|
4741
4745
|
}
|
|
4742
|
-
ngOnInit() {
|
|
4746
|
+
ngOnInit() {
|
|
4747
|
+
}
|
|
4743
4748
|
setFilter() {
|
|
4744
4749
|
this.filterChanged.emit(this.filter);
|
|
4745
4750
|
}
|
|
@@ -4755,12 +4760,12 @@ class BooleanFilterComponent extends FilterComponentBase {
|
|
|
4755
4760
|
return filter;
|
|
4756
4761
|
}
|
|
4757
4762
|
}
|
|
4758
|
-
BooleanFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: BooleanFilterComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4759
|
-
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\">
|
|
4763
|
+
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 });
|
|
4764
|
+
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 });
|
|
4760
4765
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: BooleanFilterComponent, decorators: [{
|
|
4761
4766
|
type: Component,
|
|
4762
|
-
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\">
|
|
4763
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
4767
|
+
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" }]
|
|
4768
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: TetaConfigService }]; }, propDecorators: { column: [{
|
|
4764
4769
|
type: Input
|
|
4765
4770
|
}], data: [{
|
|
4766
4771
|
type: Input
|
|
@@ -10150,9 +10155,11 @@ class TableBodyComponent {
|
|
|
10150
10155
|
this.activeRow = _;
|
|
10151
10156
|
this._cdr.markForCheck();
|
|
10152
10157
|
}));
|
|
10158
|
+
this.addResizeObserver();
|
|
10153
10159
|
}
|
|
10154
10160
|
ngOnDestroy() {
|
|
10155
10161
|
this._alive = false;
|
|
10162
|
+
this.removeResizeObserver();
|
|
10156
10163
|
}
|
|
10157
10164
|
getAggregateValue(column) {
|
|
10158
10165
|
if (column.aggregate === AggregationType.sum) {
|
|
@@ -10192,6 +10199,17 @@ class TableBodyComponent {
|
|
|
10192
10199
|
trackColumns(index, column) {
|
|
10193
10200
|
return column.name;
|
|
10194
10201
|
}
|
|
10202
|
+
addResizeObserver() {
|
|
10203
|
+
this._obs = new ResizeObserver((_) => {
|
|
10204
|
+
var _a;
|
|
10205
|
+
(_a = this.viewport) === null || _a === void 0 ? void 0 : _a.checkViewportSize();
|
|
10206
|
+
});
|
|
10207
|
+
this._obs.observe(this._elementRef.nativeElement);
|
|
10208
|
+
}
|
|
10209
|
+
removeResizeObserver() {
|
|
10210
|
+
this._obs.unobserve(this._elementRef.nativeElement);
|
|
10211
|
+
this._obs.disconnect();
|
|
10212
|
+
}
|
|
10195
10213
|
getSum(columnName) {
|
|
10196
10214
|
var _a;
|
|
10197
10215
|
return (_a = this.data) === null || _a === void 0 ? void 0 : _a.reduce((accum, current) => {
|
|
@@ -11072,6 +11090,7 @@ class Chart3dComponent {
|
|
|
11072
11090
|
}
|
|
11073
11091
|
ngOnDestroy() {
|
|
11074
11092
|
this._alive = false;
|
|
11093
|
+
this.removeResizeObserver();
|
|
11075
11094
|
}
|
|
11076
11095
|
init() {
|
|
11077
11096
|
if (!this._scene) {
|
|
@@ -11170,6 +11189,10 @@ class Chart3dComponent {
|
|
|
11170
11189
|
});
|
|
11171
11190
|
this._obs.observe(this._elementRef.nativeElement);
|
|
11172
11191
|
}
|
|
11192
|
+
removeResizeObserver() {
|
|
11193
|
+
this._obs.unobserve(this._elementRef.nativeElement);
|
|
11194
|
+
this._obs.disconnect();
|
|
11195
|
+
}
|
|
11173
11196
|
makeSprite(text, opts) {
|
|
11174
11197
|
const fontSize = 20;
|
|
11175
11198
|
const canvas = document.createElement('canvas');
|
|
@@ -12622,6 +12645,8 @@ const ruLocale = {
|
|
|
12622
12645
|
avg: 'Средн',
|
|
12623
12646
|
search: 'Поиск',
|
|
12624
12647
|
notSelected: 'Не выбрано',
|
|
12648
|
+
yes: 'Да',
|
|
12649
|
+
no: 'Нет',
|
|
12625
12650
|
months: [
|
|
12626
12651
|
'Январь',
|
|
12627
12652
|
'Февраль',
|