@tetacom/ng-components 1.0.31 → 1.0.35
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/common/contract/i-id.d.ts +3 -0
- package/common/contract/public-api.d.ts +1 -0
- package/component/chart-3d/chart3d/chart3d.component.d.ts +1 -0
- package/component/chart-3d/model/chart-3d-options.d.ts +1 -0
- package/component/date-picker/date-picker/date-picker.component.d.ts +9 -6
- package/component/date-picker/day-select/day-select.component.d.ts +5 -5
- package/component/date-picker/month-picker/month-picker.component.d.ts +5 -5
- package/component/date-picker/month-select/month-select.component.d.ts +2 -2
- package/component/dropdown/dropdown-base.d.ts +3 -2
- package/component/filter/base/filter-component-base.d.ts +3 -1
- package/component/filter/boolean-filter/boolean-filter.component.d.ts +5 -3
- package/component/filter/date-filter/date-filter.component.d.ts +11 -4
- package/component/filter/filter-host/filter-host.component.d.ts +6 -3
- package/component/filter/filter.module.d.ts +15 -16
- package/component/filter/list-filter/list-filter.component.d.ts +11 -4
- package/component/filter/numeric-filter/numeric-filter.component.d.ts +11 -4
- package/component/filter/public-api.d.ts +0 -1
- package/component/filter/string-filter/string-filter.component.d.ts +11 -4
- package/component/input/text-field/text-field.component.d.ts +2 -2
- package/component/select/select/select.component.d.ts +1 -1
- package/component/table/base/cell-component-base.d.ts +3 -1
- package/component/table/base/head-cell-component-base.d.ts +5 -3
- package/component/table/contract/i-cell-coordinates.d.ts +3 -5
- package/component/table/contract/i-cell-event.d.ts +1 -1
- package/component/table/contract/i-cell-instance.d.ts +12 -0
- package/component/table/contract/i-cell-value.d.ts +1 -2
- package/component/table/contract/public-api.d.ts +1 -1
- package/component/table/contract/table-column.d.ts +3 -3
- package/component/table/default/boolean-cell/boolean-cell.component.d.ts +1 -1
- package/component/table/default/date-cell/date-cell.component.d.ts +1 -1
- package/component/table/default/date-time-cell/date-time-cell.component.d.ts +1 -1
- package/component/table/default/default-head-cell/default-head-cell.component.d.ts +7 -3
- package/component/table/default/list-cell/list-cell.component.d.ts +1 -1
- package/component/table/default/numeric-cell/numeric-cell.component.d.ts +1 -1
- package/component/table/default/string-cell/string-cell.component.d.ts +1 -1
- package/component/table/enum/edit-type.enum.d.ts +3 -2
- package/component/table/head-cell/head-cell.component.d.ts +3 -2
- package/component/table/head-cell-dropdown/head-cell-dropdown.component.d.ts +12 -5
- package/component/table/head-cell-host/head-cell-host.component.d.ts +7 -3
- package/component/table/service/table.service.d.ts +38 -15
- package/component/table/table/table.component.d.ts +21 -32
- package/component/table/table-body/table-body.component.d.ts +12 -9
- package/component/table/table-head/table-head.component.d.ts +4 -4
- package/component/table/table-head-group/table-head-group.component.d.ts +5 -3
- package/component/table/table.module.d.ts +2 -1
- package/component/table/util/state-util.d.ts +3 -0
- package/component/table/util/table-util.d.ts +0 -1
- package/directive/loader/loader.directive.d.ts +3 -1
- package/esm2020/common/contract/i-id.mjs +2 -0
- package/esm2020/common/contract/public-api.mjs +2 -1
- package/esm2020/component/chart-3d/chart3d/chart3d.component.mjs +64 -57
- package/esm2020/component/chart-3d/model/chart-3d-options.mjs +1 -1
- package/esm2020/component/checkbox/checkbox/checkbox.component.mjs +3 -3
- package/esm2020/component/date-picker/date-picker/date-picker.component.mjs +17 -8
- package/esm2020/component/date-picker/day-select/day-select.component.mjs +10 -8
- package/esm2020/component/date-picker/month-picker/month-picker.component.mjs +10 -8
- package/esm2020/component/date-picker/month-select/month-select.component.mjs +5 -4
- package/esm2020/component/dropdown/dropdown-base.mjs +14 -6
- package/esm2020/component/filter/base/filter-base.mjs +4 -3
- package/esm2020/component/filter/base/filter-component-base.mjs +1 -1
- package/esm2020/component/filter/boolean-filter/boolean-filter.component.mjs +4 -2
- package/esm2020/component/filter/contarct/filter-item.mjs +4 -3
- package/esm2020/component/filter/contarct/sort-param.mjs +3 -2
- package/esm2020/component/filter/date-filter/date-filter.component.mjs +15 -9
- package/esm2020/component/filter/filter-host/filter-host.component.mjs +12 -2
- package/esm2020/component/filter/filter.module.mjs +3 -8
- package/esm2020/component/filter/list-filter/list-filter.component.mjs +20 -12
- package/esm2020/component/filter/numeric-filter/numeric-filter.component.mjs +15 -9
- package/esm2020/component/filter/public-api.mjs +1 -2
- package/esm2020/component/filter/string-filter/string-filter.component.mjs +16 -9
- package/esm2020/component/input/input/input.component.mjs +2 -2
- package/esm2020/component/input/text-field/text-field.component.mjs +8 -3
- package/esm2020/component/property-grid/property-grid/property-grid-item/property-grid-item.component.mjs +1 -1
- package/esm2020/component/select/select/select.component.mjs +12 -6
- package/esm2020/component/table/base/cell-component-base.mjs +20 -26
- package/esm2020/component/table/base/head-cell-component-base.mjs +1 -1
- package/esm2020/component/table/contract/i-cell-coordinates.mjs +1 -1
- package/esm2020/component/table/contract/i-cell-event.mjs +1 -1
- package/esm2020/component/table/contract/i-cell-instance.mjs +2 -0
- package/esm2020/component/table/contract/i-cell-value.mjs +1 -1
- package/esm2020/component/table/contract/public-api.mjs +2 -2
- package/esm2020/component/table/contract/table-column.mjs +1 -1
- package/esm2020/component/table/default/boolean-cell/boolean-cell.component.mjs +4 -4
- package/esm2020/component/table/default/date-cell/date-cell.component.mjs +4 -4
- package/esm2020/component/table/default/date-time-cell/date-time-cell.component.mjs +6 -6
- package/esm2020/component/table/default/default-head-cell/default-head-cell.component.mjs +14 -4
- package/esm2020/component/table/default/list-cell/list-cell.component.mjs +4 -4
- package/esm2020/component/table/default/numeric-cell/numeric-cell.component.mjs +13 -9
- package/esm2020/component/table/default/string-cell/string-cell.component.mjs +16 -10
- package/esm2020/component/table/enum/edit-type.enum.mjs +4 -3
- package/esm2020/component/table/head-cell/head-cell.component.mjs +19 -19
- package/esm2020/component/table/head-cell-dropdown/head-cell-dropdown.component.mjs +47 -31
- package/esm2020/component/table/head-cell-host/head-cell-host.component.mjs +14 -2
- package/esm2020/component/table/selection-head-cell/selection-head-cell.component.mjs +1 -1
- package/esm2020/component/table/service/table.service.mjs +213 -27
- package/esm2020/component/table/table/table.component.mjs +174 -156
- package/esm2020/component/table/table-body/table-body.component.mjs +26 -50
- package/esm2020/component/table/table-head/table-head.component.mjs +14 -35
- package/esm2020/component/table/table-head-group/table-head-group.component.mjs +29 -14
- package/esm2020/component/table/table.module.mjs +6 -2
- package/esm2020/component/table/util/state-util.mjs +20 -1
- package/esm2020/component/table/util/table-util.mjs +10 -14
- package/esm2020/component/toolbar/toolbar/toolbar.component.mjs +2 -2
- package/esm2020/directive/context-menu/context-menu.directive.mjs +7 -5
- package/esm2020/directive/dynamic-content-base.directive.mjs +6 -7
- package/esm2020/directive/loader/loader.directive.mjs +15 -2
- package/esm2020/locale/en.mjs +57 -0
- package/esm2020/locale/public-api.mjs +5 -0
- package/esm2020/locale/ru.mjs +57 -0
- package/esm2020/locale/teta-config.service.mjs +28 -0
- package/esm2020/locale/teta-localisation.mjs +2 -0
- package/esm2020/public-api.mjs +3 -1
- package/esm2020/util/string-util.mjs +5 -1
- package/fesm2015/tetacom-ng-components.mjs +1231 -844
- package/fesm2015/tetacom-ng-components.mjs.map +1 -1
- package/fesm2020/tetacom-ng-components.mjs +1161 -761
- package/fesm2020/tetacom-ng-components.mjs.map +1 -1
- package/locale/en.d.ts +2 -0
- package/locale/public-api.d.ts +4 -0
- package/locale/ru.d.ts +2 -0
- package/locale/teta-config.service.d.ts +11 -0
- package/locale/teta-localisation.d.ts +56 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/style/border.scss +1 -1
- package/style/button.scss +9 -5
- package/style/checkbox.scss +10 -2
- package/style/datepicker.scss +9 -7
- package/style/dropdown.scss +12 -2
- package/style/input.scss +6 -5
- package/style/list.scss +1 -1
- package/style/loader.scss +10 -0
- package/style/presets/color-presets.scss +62 -62
- package/style/presets/font-presets.scss +62 -45
- package/style/presets/shadow-presets.scss +3 -3
- package/style/select.scss +6 -6
- package/style/switch.scss +1 -1
- package/style/table.scss +44 -45
- package/style/tabs.scss +2 -2
- package/style/toolbar.scss +3 -6
- package/style/tree.scss +2 -2
- package/util/string-util.d.ts +1 -0
- package/component/date-picker/model/picker-locale-model.d.ts +0 -16
- package/component/date-picker/service/picker-locale.service.d.ts +0 -11
- package/component/filter/filter-panel/filter-panel.component.d.ts +0 -8
- package/component/table/contract/table-context-menu-config.d.ts +0 -14
- package/esm2020/component/date-picker/model/picker-locale-model.mjs +0 -13
- package/esm2020/component/date-picker/service/picker-locale.service.mjs +0 -30
- package/esm2020/component/filter/filter-panel/filter-panel.component.mjs +0 -13
- package/esm2020/component/table/contract/table-context-menu-config.mjs +0 -17
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Component, ChangeDetectionStrategy, HostBinding, Directive, Optional, Inject, ContentChild, Input, Host, HostListener, Injectable, NgModule, forwardRef, EventEmitter, ElementRef, Output, Pipe, ViewChild, ViewEncapsulation, ChangeDetectorRef, TemplateRef, Injector, ContentChildren } from '@angular/core';
|
|
3
|
-
import * as
|
|
3
|
+
import * as i3 from '@angular/common';
|
|
4
4
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1 from '@angular/common/http';
|
|
6
6
|
import { HttpClient, HttpClientModule } from '@angular/common/http';
|
|
7
7
|
import { map, takeWhile, throttleTime, bufferCount, tap, withLatestFrom, filter } from 'rxjs/operators';
|
|
8
|
-
import * as i3 from '@angular/forms';
|
|
8
|
+
import * as i3$1 from '@angular/forms';
|
|
9
9
|
import { NG_VALUE_ACCESSOR, FormsModule, FormControl, FormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
|
10
|
-
import { BehaviorSubject, Subject, fromEvent, ReplaySubject, combineLatest,
|
|
10
|
+
import { BehaviorSubject, Subject, fromEvent, ReplaySubject, combineLatest, merge } from 'rxjs';
|
|
11
11
|
import { trigger, transition, style, animate } from '@angular/animations';
|
|
12
12
|
import * as i4 from '@angular/cdk/scrolling';
|
|
13
13
|
import { ScrollingModule, CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
|
|
14
14
|
import * as i1$1 from '@ngneat/transloco';
|
|
15
15
|
import { TranslocoModule, TRANSLOCO_SCOPE } from '@ngneat/transloco';
|
|
16
|
-
import { __awaiter } from 'tslib';
|
|
17
16
|
import * as hash from 'object-hash';
|
|
18
17
|
import hash__default from 'object-hash';
|
|
18
|
+
import { __awaiter } from 'tslib';
|
|
19
19
|
import * as THREE from 'three';
|
|
20
20
|
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
|
|
21
21
|
import * as d3 from 'd3';
|
|
@@ -64,7 +64,7 @@ class AccordionItemComponent {
|
|
|
64
64
|
ngOnInit() { }
|
|
65
65
|
}
|
|
66
66
|
AccordionItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: AccordionItemComponent, deps: [{ token: AccordionComponent, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
67
|
-
AccordionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: AccordionItemComponent, selector: "teta-accordion-item", inputs: { open: "open", disabled: "disabled" }, host: { properties: { "class.accordion-item_active": "this.open", "class.accordion-item": "this.accordionItemClass" } }, queries: [{ propertyName: "content", first: true, predicate: AccordionContentDirective, descendants: true }], ngImport: i0, template: "<ng-content select=\"teta-accordion-head\"></ng-content>\n<div class=\"accordion-content\" *ngIf=\"open\">\n <ng-container *ngTemplateOutlet=\"content.template\"></ng-container>\n</div>\n", styles: [""], directives: [{ type:
|
|
67
|
+
AccordionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: AccordionItemComponent, selector: "teta-accordion-item", inputs: { open: "open", disabled: "disabled" }, host: { properties: { "class.accordion-item_active": "this.open", "class.accordion-item": "this.accordionItemClass" } }, queries: [{ propertyName: "content", first: true, predicate: AccordionContentDirective, descendants: true }], ngImport: i0, template: "<ng-content select=\"teta-accordion-head\"></ng-content>\n<div class=\"accordion-content\" *ngIf=\"open\">\n <ng-container *ngTemplateOutlet=\"content.template\"></ng-container>\n</div>\n", styles: [""], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
68
68
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: AccordionItemComponent, decorators: [{
|
|
69
69
|
type: Component,
|
|
70
70
|
args: [{ selector: 'teta-accordion-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"teta-accordion-head\"></ng-content>\n<div class=\"accordion-content\" *ngIf=\"open\">\n <ng-container *ngTemplateOutlet=\"content.template\"></ng-container>\n</div>\n", styles: [""] }]
|
|
@@ -154,7 +154,7 @@ class AccordionHeadComponent {
|
|
|
154
154
|
ngOnInit() { }
|
|
155
155
|
}
|
|
156
156
|
AccordionHeadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: AccordionHeadComponent, deps: [{ token: AccordionItemComponent, host: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
157
|
-
AccordionHeadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: AccordionHeadComponent, selector: "teta-accordion-head", inputs: { showToggle: "showToggle" }, host: { listeners: { "click": "toggle()" }, properties: { "class.accordion-head": "this.accordionHeadClass", "class.accordion-head_open": "this.open", "class.accordion-head_disabled": "this.disabled" } }, ngImport: i0, template: "<ng-content></ng-content>\n<div *ngIf=\"showToggle\" class=\"accordion-toggle\">\n <teta-icon [name]=\"open ? 'arrowUpKey' : 'arrowDownKey'\"\n [palette]=\"'text'\"></teta-icon>\n</div>\n\n", styles: [""], components: [{ type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], directives: [{ type:
|
|
157
|
+
AccordionHeadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: AccordionHeadComponent, selector: "teta-accordion-head", inputs: { showToggle: "showToggle" }, host: { listeners: { "click": "toggle()" }, properties: { "class.accordion-head": "this.accordionHeadClass", "class.accordion-head_open": "this.open", "class.accordion-head_disabled": "this.disabled" } }, ngImport: i0, template: "<ng-content></ng-content>\n<div *ngIf=\"showToggle\" class=\"accordion-toggle\">\n <teta-icon [name]=\"open ? 'arrowUpKey' : 'arrowDownKey'\"\n [palette]=\"'text'\"></teta-icon>\n</div>\n\n", styles: [""], components: [{ type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
158
158
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: AccordionHeadComponent, decorators: [{
|
|
159
159
|
type: Component,
|
|
160
160
|
args: [{ selector: 'teta-accordion-head', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n<div *ngIf=\"showToggle\" class=\"accordion-toggle\">\n <teta-icon [name]=\"open ? 'arrowUpKey' : 'arrowDownKey'\"\n [palette]=\"'text'\"></teta-icon>\n</div>\n\n", styles: [""] }]
|
|
@@ -471,10 +471,10 @@ class CheckboxComponent {
|
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
473
|
CheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: CheckboxComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
474
|
-
CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: CheckboxComponent, selector: "teta-checkbox", inputs: { class: "class", palette: "palette", noLabel: "noLabel", disabled: "disabled", value: "value", binary: "binary", allowNull: "allowNull" }, host: { listeners: { "click": "changeValue()" }, properties: { "attr.tabindex": "this.tabindex", "class": "this.getClass", "class.checkbox_disabled": "this.disabled" } }, providers: [CHECKBOX_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<div class=\"checkbox__tick\">\n <teta-icon [name]=\"checked ? 'tick' : checked === false ? '' : 'minus'\"></teta-icon>\n</div>\n<span class=\"font-body-3
|
|
474
|
+
CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: CheckboxComponent, selector: "teta-checkbox", inputs: { class: "class", palette: "palette", noLabel: "noLabel", disabled: "disabled", value: "value", binary: "binary", allowNull: "allowNull" }, host: { listeners: { "click": "changeValue()" }, properties: { "attr.tabindex": "this.tabindex", "class": "this.getClass", "class.checkbox_disabled": "this.disabled" } }, providers: [CHECKBOX_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<div class=\"checkbox__tick\" [class.checkbox__tick_active]=\"checked != false\">\n <teta-icon [name]=\"checked ? 'tick' : checked === false ? '' : 'minus'\"></teta-icon>\n</div>\n<span class=\"font-body-3\" *ngIf=\"!noLabel\">\n <ng-content></ng-content>\n</span>\n", styles: [""], components: [{ type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
475
475
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
476
476
|
type: Component,
|
|
477
|
-
args: [{ selector: 'teta-checkbox', providers: [CHECKBOX_CONTROL_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"checkbox__tick\">\n <teta-icon [name]=\"checked ? 'tick' : checked === false ? '' : 'minus'\"></teta-icon>\n</div>\n<span class=\"font-body-3
|
|
477
|
+
args: [{ selector: 'teta-checkbox', providers: [CHECKBOX_CONTROL_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"checkbox__tick\" [class.checkbox__tick_active]=\"checked != false\">\n <teta-icon [name]=\"checked ? 'tick' : checked === false ? '' : 'minus'\"></teta-icon>\n</div>\n<span class=\"font-body-3\" *ngIf=\"!noLabel\">\n <ng-content></ng-content>\n</span>\n", styles: [""] }]
|
|
478
478
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { tabindex: [{
|
|
479
479
|
type: HostBinding,
|
|
480
480
|
args: ['attr.tabindex']
|
|
@@ -928,39 +928,81 @@ var VerticalAlign;
|
|
|
928
928
|
VerticalAlign[VerticalAlign["auto"] = 3] = "auto";
|
|
929
929
|
})(VerticalAlign || (VerticalAlign = {}));
|
|
930
930
|
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
931
|
+
const enLocale = {
|
|
932
|
+
apply: 'Apply',
|
|
933
|
+
cancel: 'Cancel',
|
|
934
|
+
clear: 'Clear',
|
|
935
|
+
pin: 'Pin',
|
|
936
|
+
unpin: 'Unpin',
|
|
937
|
+
sortAsc: 'Sort asc',
|
|
938
|
+
sortDesc: 'Sort desc',
|
|
939
|
+
clearSort: 'Clear sort',
|
|
940
|
+
clearAllSort: 'Clear all sort',
|
|
941
|
+
clearFilter: 'Clear filter',
|
|
942
|
+
clearAllFilters: 'Clear all filters',
|
|
943
|
+
autosizeColumn: 'Autosize column',
|
|
944
|
+
autosizeAll: 'Autosize all columns',
|
|
945
|
+
resetColumnsSize: 'Reset columns size',
|
|
946
|
+
from: 'From',
|
|
947
|
+
to: 'To',
|
|
948
|
+
all: 'All',
|
|
949
|
+
min: 'Min',
|
|
950
|
+
max: 'Max',
|
|
951
|
+
sum: 'Sum',
|
|
952
|
+
avg: 'Avg',
|
|
953
|
+
search: 'Search',
|
|
954
|
+
months: [
|
|
955
|
+
'January',
|
|
956
|
+
'February',
|
|
957
|
+
'March',
|
|
958
|
+
'April',
|
|
959
|
+
'May',
|
|
960
|
+
'June',
|
|
961
|
+
'July',
|
|
962
|
+
'August',
|
|
963
|
+
'September',
|
|
964
|
+
'October',
|
|
965
|
+
'November',
|
|
966
|
+
'December'
|
|
967
|
+
],
|
|
968
|
+
days: [
|
|
969
|
+
'Sunday',
|
|
970
|
+
'Monday',
|
|
971
|
+
'Tuesday',
|
|
972
|
+
'Wednesday',
|
|
973
|
+
'Thursday',
|
|
974
|
+
'Friday',
|
|
975
|
+
'Saturday'
|
|
976
|
+
],
|
|
977
|
+
daysShort: [
|
|
978
|
+
'Su',
|
|
979
|
+
'Mo',
|
|
980
|
+
'Tu',
|
|
981
|
+
'We',
|
|
982
|
+
'Th',
|
|
983
|
+
'Fr',
|
|
984
|
+
'Sa'
|
|
985
|
+
]
|
|
986
|
+
};
|
|
943
987
|
|
|
944
|
-
class
|
|
988
|
+
class TetaConfigService {
|
|
945
989
|
constructor() {
|
|
946
|
-
this.
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
dayNamesMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
950
|
-
monthNames: ['January', 'February', 'March', 'April', 'May', 'June',
|
|
951
|
-
'July', 'August', 'September', 'October', 'November', 'December'],
|
|
952
|
-
monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
953
|
-
today: 'Today'
|
|
954
|
-
});
|
|
955
|
-
this.locale = new BehaviorSubject(this._defaults);
|
|
990
|
+
this.defaultLocale = enLocale;
|
|
991
|
+
this.locale$ = new BehaviorSubject(this.defaultLocale);
|
|
992
|
+
this.locale = this.locale$.asObservable();
|
|
956
993
|
}
|
|
957
|
-
setLocale(
|
|
958
|
-
|
|
994
|
+
setLocale(newLocale) {
|
|
995
|
+
if (newLocale) {
|
|
996
|
+
this.locale$.next(newLocale);
|
|
997
|
+
}
|
|
998
|
+
else {
|
|
999
|
+
this.locale$.next(this.defaultLocale);
|
|
1000
|
+
}
|
|
959
1001
|
}
|
|
960
1002
|
}
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type:
|
|
1003
|
+
TetaConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TetaConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1004
|
+
TetaConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TetaConfigService, providedIn: 'root' });
|
|
1005
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TetaConfigService, decorators: [{
|
|
964
1006
|
type: Injectable,
|
|
965
1007
|
args: [{
|
|
966
1008
|
providedIn: 'root'
|
|
@@ -1120,11 +1162,12 @@ class DropdownBase {
|
|
|
1120
1162
|
this._renderer = _renderer;
|
|
1121
1163
|
this.align = Align.left;
|
|
1122
1164
|
this.verticalAlign = VerticalAlign.bottom;
|
|
1123
|
-
this.
|
|
1165
|
+
this.backdrop = false;
|
|
1124
1166
|
this.openChange = new EventEmitter();
|
|
1125
1167
|
this.autoClose = true;
|
|
1126
1168
|
this.autoCloseIgnore = ['inside'];
|
|
1127
1169
|
this._body = null;
|
|
1170
|
+
this._backdrop = null;
|
|
1128
1171
|
this._open = false;
|
|
1129
1172
|
this._alive = true;
|
|
1130
1173
|
this._zone.onStable
|
|
@@ -1206,6 +1249,9 @@ class DropdownBase {
|
|
|
1206
1249
|
this._renderer.removeChild(this.container, this._body);
|
|
1207
1250
|
this._open = false;
|
|
1208
1251
|
this._body = null;
|
|
1252
|
+
if (this._backdrop) {
|
|
1253
|
+
this._renderer.removeChild(this._document.body, this._backdrop);
|
|
1254
|
+
}
|
|
1209
1255
|
this.openChange.emit(this.open);
|
|
1210
1256
|
}
|
|
1211
1257
|
}
|
|
@@ -1217,9 +1263,13 @@ class DropdownBase {
|
|
|
1217
1263
|
this.openChange.emit(this.open);
|
|
1218
1264
|
const renderer = this._renderer;
|
|
1219
1265
|
const content = this._content.nativeElement;
|
|
1220
|
-
const container = (this._body =
|
|
1221
|
-
this._body || renderer.createElement('div'));
|
|
1266
|
+
const container = (this._body = this._body || renderer.createElement('div'));
|
|
1222
1267
|
renderer.addClass(container, 'dropdown');
|
|
1268
|
+
if (this.backdrop) {
|
|
1269
|
+
this._backdrop = renderer.createElement('div');
|
|
1270
|
+
renderer.addClass(this._backdrop, 'dropdown-backdrop');
|
|
1271
|
+
renderer.appendChild(this._document.body, this._backdrop);
|
|
1272
|
+
}
|
|
1223
1273
|
if (this.className != null) {
|
|
1224
1274
|
if (this.className instanceof Array && this.className.length > 0) {
|
|
1225
1275
|
this.className.forEach((_) => {
|
|
@@ -1264,7 +1314,7 @@ class DropdownBase {
|
|
|
1264
1314
|
}
|
|
1265
1315
|
}
|
|
1266
1316
|
DropdownBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DropdownBase, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
1267
|
-
DropdownBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.1", type: DropdownBase, inputs: { align: "align", verticalAlign: "verticalAlign", appendToBody: "appendToBody", disabled: "disabled",
|
|
1317
|
+
DropdownBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.1", type: DropdownBase, inputs: { align: "align", verticalAlign: "verticalAlign", appendToBody: "appendToBody", disabled: "disabled", backdrop: "backdrop", className: "className", open: "open", autoClose: "autoClose", autoCloseIgnore: "autoCloseIgnore" }, outputs: { openChange: "openChange" }, host: { listeners: { "click": "click($event)", "document:click": "documentClick($event)", "window:keyup": "keyUp($event)" } }, queries: [{ propertyName: "_head", first: true, predicate: DropdownHeadDirective, descendants: true, read: ElementRef }, { propertyName: "_content", first: true, predicate: DropdownContentDirective, descendants: true }], ngImport: i0 });
|
|
1268
1318
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DropdownBase, decorators: [{
|
|
1269
1319
|
type: Directive
|
|
1270
1320
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: undefined }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { align: [{
|
|
@@ -1275,7 +1325,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
1275
1325
|
type: Input
|
|
1276
1326
|
}], disabled: [{
|
|
1277
1327
|
type: Input
|
|
1278
|
-
}],
|
|
1328
|
+
}], backdrop: [{
|
|
1279
1329
|
type: Input
|
|
1280
1330
|
}], className: [{
|
|
1281
1331
|
type: Input
|
|
@@ -1525,7 +1575,7 @@ class YearSelectComponent {
|
|
|
1525
1575
|
}
|
|
1526
1576
|
}
|
|
1527
1577
|
YearSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: YearSelectComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: PickerTouchService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1528
|
-
YearSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: YearSelectComponent, selector: "teta-year-select", inputs: { currentYear: "currentYear", today: "today", size: "size", minDate: "minDate", maxDate: "maxDate", allowableRange: "allowableRange" }, outputs: { yearSelected: "yearSelected", yearApplied: "yearApplied" }, ngImport: i0, template: "<div class=\"list row_auto margin-top-2\"\n (wheel)=\"scrollYearSelector($event);\">\n <div class=\"list-item list-item_interactive\"\n [class.list-item_active]=\"year === currentYear\"\n [class.list-item_disabled]=\"isYearDisabled(year)\"\n (click)=\"setYear($event, year)\"\n (dblclick)=\"applyYear($event, year)\"\n *ngFor=\"let year of years\">\n {{year}}\n </div>\n</div>\n", styles: [":host{display:flex}\n"], directives: [{ type:
|
|
1578
|
+
YearSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: YearSelectComponent, selector: "teta-year-select", inputs: { currentYear: "currentYear", today: "today", size: "size", minDate: "minDate", maxDate: "maxDate", allowableRange: "allowableRange" }, outputs: { yearSelected: "yearSelected", yearApplied: "yearApplied" }, ngImport: i0, template: "<div class=\"list row_auto margin-top-2\"\n (wheel)=\"scrollYearSelector($event);\">\n <div class=\"list-item list-item_interactive\"\n [class.list-item_active]=\"year === currentYear\"\n [class.list-item_disabled]=\"isYearDisabled(year)\"\n (click)=\"setYear($event, year)\"\n (dblclick)=\"applyYear($event, year)\"\n *ngFor=\"let year of years\">\n {{year}}\n </div>\n</div>\n", styles: [":host{display:flex}\n"], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1529
1579
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: YearSelectComponent, decorators: [{
|
|
1530
1580
|
type: Component,
|
|
1531
1581
|
args: [{ selector: 'teta-year-select', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"list row_auto margin-top-2\"\n (wheel)=\"scrollYearSelector($event);\">\n <div class=\"list-item list-item_interactive\"\n [class.list-item_active]=\"year === currentYear\"\n [class.list-item_disabled]=\"isYearDisabled(year)\"\n (click)=\"setYear($event, year)\"\n (dblclick)=\"applyYear($event, year)\"\n *ngFor=\"let year of years\">\n {{year}}\n </div>\n</div>\n", styles: [":host{display:flex}\n"] }]
|
|
@@ -1652,7 +1702,8 @@ class MonthSelectComponent {
|
|
|
1652
1702
|
}
|
|
1653
1703
|
return new Date(year, month, 1);
|
|
1654
1704
|
}
|
|
1655
|
-
ngOnInit() {
|
|
1705
|
+
ngOnInit() {
|
|
1706
|
+
}
|
|
1656
1707
|
ngOnDestroy() {
|
|
1657
1708
|
this._alive = false;
|
|
1658
1709
|
}
|
|
@@ -1683,10 +1734,10 @@ class MonthSelectComponent {
|
|
|
1683
1734
|
}
|
|
1684
1735
|
}
|
|
1685
1736
|
MonthSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: MonthSelectComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: PickerTouchService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1686
|
-
MonthSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: MonthSelectComponent, selector: "teta-month-select", inputs: { locale: "locale", minDate: "minDate", maxDate: "maxDate", size: "size", currentMonth: "currentMonth", currentYear: "currentYear" }, outputs: { monthSelected: "monthSelected", monthApplied: "monthApplied" }, ngImport: i0, template: "<div class=\"list row_auto margin-top-2\"\n (wheel)=\"scrollMonthSelector($event);\">\n <div *ngFor=\"let month of months\"\n class=\"list-item list-item_interactive\"\n [class.list-item_active]=\"month === _currentMonth\"\n [class.list-item_disabled]=\"isMonthDisabled(month)\"\n [class.datepicker__month__item_current]=\"month === today?.getMonth() && currentYear === today?.getFullYear()\"\n (click)=\"setMonth($event, month)\"\n (dblclick)=\"applyMonth($event, month)\">\n <span class=\"color-text-20 margin-right-2\">\n {{month + 1 | tetaPrependZero: 2}}\n </span>\n {{locale.
|
|
1737
|
+
MonthSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: MonthSelectComponent, selector: "teta-month-select", inputs: { locale: "locale", minDate: "minDate", maxDate: "maxDate", size: "size", currentMonth: "currentMonth", currentYear: "currentYear" }, outputs: { monthSelected: "monthSelected", monthApplied: "monthApplied" }, ngImport: i0, template: "<div class=\"list row_auto margin-top-2\"\n (wheel)=\"scrollMonthSelector($event);\">\n <div *ngFor=\"let month of months\"\n class=\"list-item list-item_interactive\"\n [class.list-item_active]=\"month === _currentMonth\"\n [class.list-item_disabled]=\"isMonthDisabled(month)\"\n [class.datepicker__month__item_current]=\"month === today?.getMonth() && currentYear === today?.getFullYear()\"\n (click)=\"setMonth($event, month)\"\n (dblclick)=\"applyMonth($event, month)\">\n <span class=\"color-text-20 margin-right-2\">\n {{month + 1 | tetaPrependZero: 2}}\n </span>\n {{locale.months[month]}}\n </div>\n</div>\n", styles: [":host{display:flex}\n"], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "tetaPrependZero": PrependZeroPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1687
1738
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: MonthSelectComponent, decorators: [{
|
|
1688
1739
|
type: Component,
|
|
1689
|
-
args: [{ selector: 'teta-month-select', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"list row_auto margin-top-2\"\n (wheel)=\"scrollMonthSelector($event);\">\n <div *ngFor=\"let month of months\"\n class=\"list-item list-item_interactive\"\n [class.list-item_active]=\"month === _currentMonth\"\n [class.list-item_disabled]=\"isMonthDisabled(month)\"\n [class.datepicker__month__item_current]=\"month === today?.getMonth() && currentYear === today?.getFullYear()\"\n (click)=\"setMonth($event, month)\"\n (dblclick)=\"applyMonth($event, month)\">\n <span class=\"color-text-20 margin-right-2\">\n {{month + 1 | tetaPrependZero: 2}}\n </span>\n {{locale.
|
|
1740
|
+
args: [{ selector: 'teta-month-select', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"list row_auto margin-top-2\"\n (wheel)=\"scrollMonthSelector($event);\">\n <div *ngFor=\"let month of months\"\n class=\"list-item list-item_interactive\"\n [class.list-item_active]=\"month === _currentMonth\"\n [class.list-item_disabled]=\"isMonthDisabled(month)\"\n [class.datepicker__month__item_current]=\"month === today?.getMonth() && currentYear === today?.getFullYear()\"\n (click)=\"setMonth($event, month)\"\n (dblclick)=\"applyMonth($event, month)\">\n <span class=\"color-text-20 margin-right-2\">\n {{month + 1 | tetaPrependZero: 2}}\n </span>\n {{locale.months[month]}}\n </div>\n</div>\n", styles: [":host{display:flex}\n"] }]
|
|
1690
1741
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: PickerTouchService }]; }, propDecorators: { locale: [{
|
|
1691
1742
|
type: Input
|
|
1692
1743
|
}], minDate: [{
|
|
@@ -1766,8 +1817,10 @@ class DaySelectComponent {
|
|
|
1766
1817
|
this.currentValue = model ? model : new Date();
|
|
1767
1818
|
this._cdr.markForCheck();
|
|
1768
1819
|
}
|
|
1769
|
-
onChange(_) {
|
|
1770
|
-
|
|
1820
|
+
onChange(_) {
|
|
1821
|
+
}
|
|
1822
|
+
onTouched() {
|
|
1823
|
+
}
|
|
1771
1824
|
registerOnChange(fn) {
|
|
1772
1825
|
this.onChange = fn;
|
|
1773
1826
|
}
|
|
@@ -1833,12 +1886,12 @@ class DaySelectComponent {
|
|
|
1833
1886
|
return false;
|
|
1834
1887
|
}
|
|
1835
1888
|
}
|
|
1836
|
-
DaySelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DaySelectComponent, deps: [{ token:
|
|
1837
|
-
DaySelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: DaySelectComponent, selector: "teta-day-select", inputs: { firstDayOfWeek: "firstDayOfWeek", disabledDates: "disabledDates", disabledPeriods: "disabledPeriods", disabledDays: "disabledDays", minDate: "minDate", maxDate: "maxDate", disabled: "disabled" }, outputs: { dateSelected: "dateSelected", monthSelected: "monthSelected", yearSelected: "yearSelected" }, providers: [DAY_SELECT_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<div class=\"datepicker-week font-caption color-text-80\">\n <div class=\"datepicker-day\"\n [class.font-caption-bold]=\"day === 0 || day === 6\"\n *ngFor=\"let day of weekDays\">\n {{locale.
|
|
1889
|
+
DaySelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DaySelectComponent, deps: [{ token: TetaConfigService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1890
|
+
DaySelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: DaySelectComponent, selector: "teta-day-select", inputs: { firstDayOfWeek: "firstDayOfWeek", disabledDates: "disabledDates", disabledPeriods: "disabledPeriods", disabledDays: "disabledDays", minDate: "minDate", maxDate: "maxDate", disabled: "disabled" }, outputs: { dateSelected: "dateSelected", monthSelected: "monthSelected", yearSelected: "yearSelected" }, providers: [DAY_SELECT_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<div class=\"datepicker-week font-caption color-text-80\">\n <div class=\"datepicker-day\"\n [class.font-caption-bold]=\"day === 0 || day === 6\"\n *ngFor=\"let day of weekDays\">\n {{locale.daysShort[day]}}\n </div>\n</div>\n<div class=\"datepicker-picker color-text-90 font-body-3\"\n (wheel)=\"scrollMonth($event)\">\n <div *ngFor=\"let day of days\"\n class=\"datepicker-date\"\n (click)=\"setDate(day, $event);\"\n (dblclick)=\"applyValue(day, $event);\"\n [class.datepicker-date_active]=\"day.selected\"\n [class.datepicker-date_disabled]=\"day.disabled || !day.isCurrentMonth\"\n [class.datepicker-date_weekend]=\"day.weekend\"\n [class.datepicker-date_today]=\"day.today\">\n <ng-container *ngIf=\"day !== null && day !== undefined\">\n {{day.date.getDate()}}\n </ng-container>\n </div>\n</div>\n", styles: [""], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1838
1891
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DaySelectComponent, decorators: [{
|
|
1839
1892
|
type: Component,
|
|
1840
|
-
args: [{ selector: 'teta-day-select', providers: [DAY_SELECT_CONTROL_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"datepicker-week font-caption color-text-80\">\n <div class=\"datepicker-day\"\n [class.font-caption-bold]=\"day === 0 || day === 6\"\n *ngFor=\"let day of weekDays\">\n {{locale.
|
|
1841
|
-
}], ctorParameters: function () { return [{ type:
|
|
1893
|
+
args: [{ selector: 'teta-day-select', providers: [DAY_SELECT_CONTROL_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"datepicker-week font-caption color-text-80\">\n <div class=\"datepicker-day\"\n [class.font-caption-bold]=\"day === 0 || day === 6\"\n *ngFor=\"let day of weekDays\">\n {{locale.daysShort[day]}}\n </div>\n</div>\n<div class=\"datepicker-picker color-text-90 font-body-3\"\n (wheel)=\"scrollMonth($event)\">\n <div *ngFor=\"let day of days\"\n class=\"datepicker-date\"\n (click)=\"setDate(day, $event);\"\n (dblclick)=\"applyValue(day, $event);\"\n [class.datepicker-date_active]=\"day.selected\"\n [class.datepicker-date_disabled]=\"day.disabled || !day.isCurrentMonth\"\n [class.datepicker-date_weekend]=\"day.weekend\"\n [class.datepicker-date_today]=\"day.today\">\n <ng-container *ngIf=\"day !== null && day !== undefined\">\n {{day.date.getDate()}}\n </ng-container>\n </div>\n</div>\n", styles: [""] }]
|
|
1894
|
+
}], ctorParameters: function () { return [{ type: TetaConfigService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { firstDayOfWeek: [{
|
|
1842
1895
|
type: Input
|
|
1843
1896
|
}], disabledDates: [{
|
|
1844
1897
|
type: Input
|
|
@@ -1941,6 +1994,7 @@ class DatePickerComponent {
|
|
|
1941
1994
|
this.firstDayOfWeek = 1;
|
|
1942
1995
|
this.align = Align.left;
|
|
1943
1996
|
this.verticalAlign = VerticalAlign.auto;
|
|
1997
|
+
this.allowNull = true;
|
|
1944
1998
|
this.showTime = false;
|
|
1945
1999
|
this.classDatepicker = true;
|
|
1946
2000
|
this.tabindex = 0;
|
|
@@ -2109,6 +2163,10 @@ class DatePickerComponent {
|
|
|
2109
2163
|
registerOnTouched(fn) {
|
|
2110
2164
|
this.onTouched = fn;
|
|
2111
2165
|
}
|
|
2166
|
+
setDisabledState(isDisabled) {
|
|
2167
|
+
this.disabled = isDisabled;
|
|
2168
|
+
this._cdr.detectChanges();
|
|
2169
|
+
}
|
|
2112
2170
|
ngOnInit() {
|
|
2113
2171
|
}
|
|
2114
2172
|
ngOnDestroy() {
|
|
@@ -2137,12 +2195,12 @@ class DatePickerComponent {
|
|
|
2137
2195
|
return DateUtil.truncateToDay(new Date());
|
|
2138
2196
|
}
|
|
2139
2197
|
}
|
|
2140
|
-
DatePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DatePickerComponent, deps: [{ token:
|
|
2141
|
-
DatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: DatePickerComponent, selector: "teta-date-picker", inputs: { disabled: "disabled", invalid: "invalid", firstDayOfWeek: "firstDayOfWeek", disabledDates: "disabledDates", disabledPeriods: "disabledPeriods", disabledDays: "disabledDays", minDate: "minDate", maxDate: "maxDate", minYearDate: "minYearDate", maxYearDate: "maxYearDate", align: "align", verticalAlign: "verticalAlign", appendToBody: "appendToBody", showTime: "showTime", format: "format" }, host: { listeners: { "window:keyup": "keyUp($event)" }, properties: { "class.datepicker-wide": "this.showTime", "class.datepicker_open": "this.open", "class.datepicker": "this.classDatepicker", "tabindex": "this.tabindex" } }, providers: [DATE_PICKER_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<teta-dropdown\n class=\"row row_auto\"\n [disabled]=\"disabled\"\n [open]=\"open\"\n [autoCloseIgnore]=\"['esc']\"\n (openChange)=\"openPicker($event)\"\n [align]=\"align\"\n [verticalAlign]=\"verticalAlign\"\n [appendToBody]=\"appendToBody\">\n <div tetaDropdownHead\n class=\"datepicker-head font-body-3\"\n [class.datepicker-head_disabled]=\"disabled\"\n [class.datepicker-head_invalid]=\"invalid\">\n <teta-icon [name]=\"'calendar'\" class=\"margin-right-1\"></teta-icon>\n <div class=\"row_auto\">\n {{currentValue !== null && currentValue !== undefined ? (currentValue | date : format) : ''}}\n </div>\n <teta-icon [name]=\"'closeBig'\"
|
|
2198
|
+
DatePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DatePickerComponent, deps: [{ token: TetaConfigService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2199
|
+
DatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: DatePickerComponent, selector: "teta-date-picker", inputs: { disabled: "disabled", invalid: "invalid", firstDayOfWeek: "firstDayOfWeek", disabledDates: "disabledDates", disabledPeriods: "disabledPeriods", disabledDays: "disabledDays", minDate: "minDate", maxDate: "maxDate", minYearDate: "minYearDate", maxYearDate: "maxYearDate", align: "align", verticalAlign: "verticalAlign", appendToBody: "appendToBody", allowNull: "allowNull", backdrop: "backdrop", showTime: "showTime", format: "format" }, host: { listeners: { "window:keyup": "keyUp($event)" }, properties: { "class.datepicker-wide": "this.showTime", "class.datepicker_open": "this.open", "class.datepicker": "this.classDatepicker", "tabindex": "this.tabindex" } }, providers: [DATE_PICKER_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<teta-dropdown\n class=\"row row_auto\"\n [disabled]=\"disabled\"\n [open]=\"open\"\n [autoCloseIgnore]=\"['esc']\"\n (openChange)=\"openPicker($event)\"\n [align]=\"align\"\n [verticalAlign]=\"verticalAlign\"\n [appendToBody]=\"appendToBody\"\n [backdrop]=\"backdrop\">\n <div tetaDropdownHead\n class=\"datepicker-head font-body-3\"\n [class.datepicker-head_disabled]=\"disabled\"\n [class.datepicker-head_invalid]=\"invalid\">\n <teta-icon [name]=\"'calendar'\" class=\"margin-right-1\"></teta-icon>\n <div class=\"row_auto nowrap\">\n {{currentValue !== null && currentValue !== undefined ? (currentValue | date : format) : ''}}\n </div>\n <teta-icon *ngIf=\"allowNull\"\n [name]=\"'closeBig'\"\n (click)=\"clearPicker($event);\"\n class=\"margin-left-1\"></teta-icon>\n </div>\n <div tetaDropdownContent class=\"scrollable\" (click)=\"$event.preventDefault()\">\n <div class=\"padding-3\">\n <div class=\"row align-center justify-content-between\">\n <div>\n <button teta-button\n [palette]=\"'text'\"\n [view]=\"displayMode===datePickerModeEnum.month ? 'primary' : 'ghost'\"\n (click)=\"setMode(datePickerModeEnum.month)\"\n (wheel)=\"scrollMonth($event);\">\n {{locale.months[internalValue?.getMonth()]}}\n </button>\n <button teta-button\n class=\"margin-left-2\"\n [palette]=\"'text'\"\n [view]=\"displayMode===datePickerModeEnum.year ? 'primary' : 'ghost'\"\n (click)=\"setMode(datePickerModeEnum.year)\"\n (wheel)=\"scrollYear($event);\">\n {{internalValue?.getFullYear()}}\n </button>\n </div>\n <button teta-button\n [palette]=\"'text'\"\n [view]=\"'ghost'\"\n (click)=\"setToday()\">\n <teta-icon [name]=\"'calendar'\"></teta-icon>\n </button>\n </div>\n <div class=\"datepicker-content\">\n <teta-year-select\n *ngIf=\"displayMode === datePickerModeEnum.year\"\n [currentYear]=\"internalValue?.getFullYear()\"\n [today]=\"today\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (yearSelected)=\"setYear($event)\">\n </teta-year-select>\n <teta-month-select\n *ngIf=\"displayMode === datePickerModeEnum.month\"\n [currentMonth]=\"internalValue?.getMonth()\"\n [currentYear]=\"internalValue?.getFullYear()\"\n [locale]=\"locale\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (monthSelected)=\"setMonth($event)\">\n </teta-month-select>\n <teta-day-select\n *ngIf=\"displayMode === datePickerModeEnum.date\"\n [ngModel]=\"currentValue\"\n (ngModelChange)=\"applyValue($event)\"\n (dateSelected)=\"setDate($event)\"\n (yearSelected)=\"setYear($event)\"\n (monthSelected)=\"setMonth($event)\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n [disabledDays]=\"disabledDays\"\n [disabledDates]=\"disabledDates\"\n [disabledPeriods]=\"disabledPeriods\"></teta-day-select>\n </div>\n </div>\n <div *ngIf=\"showTime\" class=\"datepicker-time padding-v-1 border-top border-text-10 font-body-3 color-text-90\">\n <teta-time-part-control [max]=\"23\" [ngModel]=\"internalValue?.getHours()\"\n (ngModelChange)=\"setHour($event)\"></teta-time-part-control>\n :\n <teta-time-part-control [ngModel]=\"internalValue?.getMinutes()\"\n (ngModelChange)=\"setMinute($event)\"></teta-time-part-control>\n :\n <teta-time-part-control [ngModel]=\"internalValue?.getSeconds()\"\n (ngModelChange)=\"setSecond($event)\"></teta-time-part-control>\n </div>\n </div>\n</teta-dropdown>\n", styles: [""], components: [{ type: DropdownComponent, selector: "teta-dropdown" }, { type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }, { type: ButtonComponent, selector: "button[teta-button], teta-button", inputs: ["palette", "class", "view", "square"] }, { type: YearSelectComponent, selector: "teta-year-select", inputs: ["currentYear", "today", "size", "minDate", "maxDate", "allowableRange"], outputs: ["yearSelected", "yearApplied"] }, { type: MonthSelectComponent, selector: "teta-month-select", inputs: ["locale", "minDate", "maxDate", "size", "currentMonth", "currentYear"], outputs: ["monthSelected", "monthApplied"] }, { type: DaySelectComponent, selector: "teta-day-select", inputs: ["firstDayOfWeek", "disabledDates", "disabledPeriods", "disabledDays", "minDate", "maxDate", "disabled"], outputs: ["dateSelected", "monthSelected", "yearSelected"] }, { type: TimePartControlComponent, selector: "teta-time-part-control", inputs: ["min", "max", "disabled"] }], directives: [{ type: DropdownHeadDirective, selector: "[tetaDropdownHead]" }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: DropdownContentDirective, selector: "[tetaDropdownContent]" }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "date": i3.DatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2142
2200
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DatePickerComponent, decorators: [{
|
|
2143
2201
|
type: Component,
|
|
2144
|
-
args: [{ selector: 'teta-date-picker', providers: [DATE_PICKER_CONTROL_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<teta-dropdown\n class=\"row row_auto\"\n [disabled]=\"disabled\"\n [open]=\"open\"\n [autoCloseIgnore]=\"['esc']\"\n (openChange)=\"openPicker($event)\"\n [align]=\"align\"\n [verticalAlign]=\"verticalAlign\"\n [appendToBody]=\"appendToBody\">\n <div tetaDropdownHead\n class=\"datepicker-head font-body-3\"\n [class.datepicker-head_disabled]=\"disabled\"\n [class.datepicker-head_invalid]=\"invalid\">\n <teta-icon [name]=\"'calendar'\" class=\"margin-right-1\"></teta-icon>\n <div class=\"row_auto\">\n {{currentValue !== null && currentValue !== undefined ? (currentValue | date : format) : ''}}\n </div>\n <teta-icon [name]=\"'closeBig'\"
|
|
2145
|
-
}], ctorParameters: function () { return [{ type:
|
|
2202
|
+
args: [{ selector: 'teta-date-picker', providers: [DATE_PICKER_CONTROL_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<teta-dropdown\n class=\"row row_auto\"\n [disabled]=\"disabled\"\n [open]=\"open\"\n [autoCloseIgnore]=\"['esc']\"\n (openChange)=\"openPicker($event)\"\n [align]=\"align\"\n [verticalAlign]=\"verticalAlign\"\n [appendToBody]=\"appendToBody\"\n [backdrop]=\"backdrop\">\n <div tetaDropdownHead\n class=\"datepicker-head font-body-3\"\n [class.datepicker-head_disabled]=\"disabled\"\n [class.datepicker-head_invalid]=\"invalid\">\n <teta-icon [name]=\"'calendar'\" class=\"margin-right-1\"></teta-icon>\n <div class=\"row_auto nowrap\">\n {{currentValue !== null && currentValue !== undefined ? (currentValue | date : format) : ''}}\n </div>\n <teta-icon *ngIf=\"allowNull\"\n [name]=\"'closeBig'\"\n (click)=\"clearPicker($event);\"\n class=\"margin-left-1\"></teta-icon>\n </div>\n <div tetaDropdownContent class=\"scrollable\" (click)=\"$event.preventDefault()\">\n <div class=\"padding-3\">\n <div class=\"row align-center justify-content-between\">\n <div>\n <button teta-button\n [palette]=\"'text'\"\n [view]=\"displayMode===datePickerModeEnum.month ? 'primary' : 'ghost'\"\n (click)=\"setMode(datePickerModeEnum.month)\"\n (wheel)=\"scrollMonth($event);\">\n {{locale.months[internalValue?.getMonth()]}}\n </button>\n <button teta-button\n class=\"margin-left-2\"\n [palette]=\"'text'\"\n [view]=\"displayMode===datePickerModeEnum.year ? 'primary' : 'ghost'\"\n (click)=\"setMode(datePickerModeEnum.year)\"\n (wheel)=\"scrollYear($event);\">\n {{internalValue?.getFullYear()}}\n </button>\n </div>\n <button teta-button\n [palette]=\"'text'\"\n [view]=\"'ghost'\"\n (click)=\"setToday()\">\n <teta-icon [name]=\"'calendar'\"></teta-icon>\n </button>\n </div>\n <div class=\"datepicker-content\">\n <teta-year-select\n *ngIf=\"displayMode === datePickerModeEnum.year\"\n [currentYear]=\"internalValue?.getFullYear()\"\n [today]=\"today\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (yearSelected)=\"setYear($event)\">\n </teta-year-select>\n <teta-month-select\n *ngIf=\"displayMode === datePickerModeEnum.month\"\n [currentMonth]=\"internalValue?.getMonth()\"\n [currentYear]=\"internalValue?.getFullYear()\"\n [locale]=\"locale\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (monthSelected)=\"setMonth($event)\">\n </teta-month-select>\n <teta-day-select\n *ngIf=\"displayMode === datePickerModeEnum.date\"\n [ngModel]=\"currentValue\"\n (ngModelChange)=\"applyValue($event)\"\n (dateSelected)=\"setDate($event)\"\n (yearSelected)=\"setYear($event)\"\n (monthSelected)=\"setMonth($event)\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n [disabledDays]=\"disabledDays\"\n [disabledDates]=\"disabledDates\"\n [disabledPeriods]=\"disabledPeriods\"></teta-day-select>\n </div>\n </div>\n <div *ngIf=\"showTime\" class=\"datepicker-time padding-v-1 border-top border-text-10 font-body-3 color-text-90\">\n <teta-time-part-control [max]=\"23\" [ngModel]=\"internalValue?.getHours()\"\n (ngModelChange)=\"setHour($event)\"></teta-time-part-control>\n :\n <teta-time-part-control [ngModel]=\"internalValue?.getMinutes()\"\n (ngModelChange)=\"setMinute($event)\"></teta-time-part-control>\n :\n <teta-time-part-control [ngModel]=\"internalValue?.getSeconds()\"\n (ngModelChange)=\"setSecond($event)\"></teta-time-part-control>\n </div>\n </div>\n</teta-dropdown>\n", styles: [""] }]
|
|
2203
|
+
}], ctorParameters: function () { return [{ type: TetaConfigService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { disabled: [{
|
|
2146
2204
|
type: Input
|
|
2147
2205
|
}], invalid: [{
|
|
2148
2206
|
type: Input
|
|
@@ -2168,6 +2226,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
2168
2226
|
type: Input
|
|
2169
2227
|
}], appendToBody: [{
|
|
2170
2228
|
type: Input
|
|
2229
|
+
}], allowNull: [{
|
|
2230
|
+
type: Input
|
|
2231
|
+
}], backdrop: [{
|
|
2232
|
+
type: Input
|
|
2171
2233
|
}], showTime: [{
|
|
2172
2234
|
type: HostBinding,
|
|
2173
2235
|
args: ['class.datepicker-wide']
|
|
@@ -2206,8 +2268,10 @@ class MonthPickerComponent {
|
|
|
2206
2268
|
this.displayMode = DatePickerMode.month;
|
|
2207
2269
|
this._value = null;
|
|
2208
2270
|
this._alive = true;
|
|
2209
|
-
this.onChange = (_) => {
|
|
2210
|
-
|
|
2271
|
+
this.onChange = (_) => {
|
|
2272
|
+
};
|
|
2273
|
+
this.onTouched = () => {
|
|
2274
|
+
};
|
|
2211
2275
|
this.isMinInvalid = (dat) => {
|
|
2212
2276
|
if (!this.minDate || !(this.minDate instanceof Date) || !dat) {
|
|
2213
2277
|
return false;
|
|
@@ -2399,12 +2463,12 @@ class MonthPickerComponent {
|
|
|
2399
2463
|
this.displayMode = result;
|
|
2400
2464
|
}
|
|
2401
2465
|
}
|
|
2402
|
-
MonthPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: MonthPickerComponent, deps: [{ token:
|
|
2403
|
-
MonthPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: MonthPickerComponent, selector: "teta-month-picker", inputs: { disabled: "disabled", minDate: "minDate", maxDate: "maxDate", showToday: "showToday", appendToBody: "appendToBody" }, host: { properties: { "class.datepicker_open": "this.showPicker", "class.datepicker": "this.classDatepicker", "tabindex": "this.tabindex" } }, providers: [MONTH_PICKER_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<teta-dropdown\n class=\"row row_auto\"\n [appendToBody]=\"appendToBody\"\n [(open)]=\"showPicker\"\n [disabled]=\"disabled\">\n <div tetaDropdownHead\n (wheel)=\"scrollMonth($event)\"\n class=\"datepicker-head font-body-3\">\n <teta-icon [name]=\"'calendar'\" class=\"margin-right-2\"></teta-icon>\n <div class=\"row_auto\">\n <ng-container *ngIf=\"_value !==null && _value!==undefined\">\n {{locale.
|
|
2466
|
+
MonthPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: MonthPickerComponent, deps: [{ token: TetaConfigService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2467
|
+
MonthPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: MonthPickerComponent, selector: "teta-month-picker", inputs: { disabled: "disabled", minDate: "minDate", maxDate: "maxDate", showToday: "showToday", appendToBody: "appendToBody" }, host: { properties: { "class.datepicker_open": "this.showPicker", "class.datepicker": "this.classDatepicker", "tabindex": "this.tabindex" } }, providers: [MONTH_PICKER_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<teta-dropdown\n class=\"row row_auto\"\n [appendToBody]=\"appendToBody\"\n [(open)]=\"showPicker\"\n [disabled]=\"disabled\">\n <div tetaDropdownHead\n (wheel)=\"scrollMonth($event)\"\n class=\"datepicker-head font-body-3\">\n <teta-icon [name]=\"'calendar'\" class=\"margin-right-2\"></teta-icon>\n <div class=\"row_auto\">\n <ng-container *ngIf=\"_value !==null && _value!==undefined\">\n {{locale.months[_value.getMonth()]}} {{_value.getFullYear()}}\n </ng-container>\n </div>\n <teta-icon [name]=\"'closeBig'\" (click)=\"clearPicker()\" class=\"margin-left-2\"></teta-icon>\n </div>\n <div tetaDropdownContent class=\"scrollable padding-3\">\n <div class=\"row align-center justify-content-between\">\n <div>\n <button teta-button\n [palette]=\"'text'\"\n [view]=\"displayMode===datePickerModeEnum.month ? 'primary' : 'ghost'\"\n (click)=\"setMode(datePickerModeEnum.month)\"\n (wheel)=\"scrollMonth($event);\">\n {{locale.months[_currentMonth || today.getMonth()]}}\n </button>\n <button teta-button\n class=\"margin-left-2\"\n [palette]=\"'text'\"\n [view]=\"displayMode===datePickerModeEnum.year ? 'primary' : 'ghost'\"\n (click)=\"setMode(datePickerModeEnum.year)\"\n (wheel)=\"scrollYear($event);\">\n {{_currentYear || today.getFullYear()}}\n </button>\n </div>\n <button teta-button\n [palette]=\"'text'\"\n [view]=\"'ghost'\"\n (click)=\"setToday()\">\n <teta-icon [name]=\"'calendar'\"></teta-icon>\n </button>\n </div>\n <div class=\"datepicker-content\">\n <teta-year-select\n *ngIf=\"displayMode === datePickerModeEnum.year\"\n [currentYear]=\"_currentYear\"\n [today]=\"today\"\n [size]=\"8\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (yearSelected)=\"setYear($event)\">\n </teta-year-select>\n <teta-month-select\n *ngIf=\"displayMode === datePickerModeEnum.month\"\n [currentMonth]=\"_currentMonth\"\n [locale]=\"locale\"\n [currentYear]=\"_currentYear\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (monthSelected)=\"setMonth($event)\">\n </teta-month-select>\n </div>\n </div>\n</teta-dropdown>\n", styles: [""], components: [{ type: DropdownComponent, selector: "teta-dropdown" }, { type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }, { type: ButtonComponent, selector: "button[teta-button], teta-button", inputs: ["palette", "class", "view", "square"] }, { type: YearSelectComponent, selector: "teta-year-select", inputs: ["currentYear", "today", "size", "minDate", "maxDate", "allowableRange"], outputs: ["yearSelected", "yearApplied"] }, { type: MonthSelectComponent, selector: "teta-month-select", inputs: ["locale", "minDate", "maxDate", "size", "currentMonth", "currentYear"], outputs: ["monthSelected", "monthApplied"] }], directives: [{ type: DropdownHeadDirective, selector: "[tetaDropdownHead]" }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: DropdownContentDirective, selector: "[tetaDropdownContent]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2404
2468
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: MonthPickerComponent, decorators: [{
|
|
2405
2469
|
type: Component,
|
|
2406
|
-
args: [{ selector: 'teta-month-picker', providers: [MONTH_PICKER_CONTROL_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<teta-dropdown\n class=\"row row_auto\"\n [appendToBody]=\"appendToBody\"\n [(open)]=\"showPicker\"\n [disabled]=\"disabled\">\n <div tetaDropdownHead\n (wheel)=\"scrollMonth($event)\"\n class=\"datepicker-head font-body-3\">\n <teta-icon [name]=\"'calendar'\" class=\"margin-right-2\"></teta-icon>\n <div class=\"row_auto\">\n <ng-container *ngIf=\"_value !==null && _value!==undefined\">\n {{locale.
|
|
2407
|
-
}], ctorParameters: function () { return [{ type:
|
|
2470
|
+
args: [{ selector: 'teta-month-picker', providers: [MONTH_PICKER_CONTROL_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<teta-dropdown\n class=\"row row_auto\"\n [appendToBody]=\"appendToBody\"\n [(open)]=\"showPicker\"\n [disabled]=\"disabled\">\n <div tetaDropdownHead\n (wheel)=\"scrollMonth($event)\"\n class=\"datepicker-head font-body-3\">\n <teta-icon [name]=\"'calendar'\" class=\"margin-right-2\"></teta-icon>\n <div class=\"row_auto\">\n <ng-container *ngIf=\"_value !==null && _value!==undefined\">\n {{locale.months[_value.getMonth()]}} {{_value.getFullYear()}}\n </ng-container>\n </div>\n <teta-icon [name]=\"'closeBig'\" (click)=\"clearPicker()\" class=\"margin-left-2\"></teta-icon>\n </div>\n <div tetaDropdownContent class=\"scrollable padding-3\">\n <div class=\"row align-center justify-content-between\">\n <div>\n <button teta-button\n [palette]=\"'text'\"\n [view]=\"displayMode===datePickerModeEnum.month ? 'primary' : 'ghost'\"\n (click)=\"setMode(datePickerModeEnum.month)\"\n (wheel)=\"scrollMonth($event);\">\n {{locale.months[_currentMonth || today.getMonth()]}}\n </button>\n <button teta-button\n class=\"margin-left-2\"\n [palette]=\"'text'\"\n [view]=\"displayMode===datePickerModeEnum.year ? 'primary' : 'ghost'\"\n (click)=\"setMode(datePickerModeEnum.year)\"\n (wheel)=\"scrollYear($event);\">\n {{_currentYear || today.getFullYear()}}\n </button>\n </div>\n <button teta-button\n [palette]=\"'text'\"\n [view]=\"'ghost'\"\n (click)=\"setToday()\">\n <teta-icon [name]=\"'calendar'\"></teta-icon>\n </button>\n </div>\n <div class=\"datepicker-content\">\n <teta-year-select\n *ngIf=\"displayMode === datePickerModeEnum.year\"\n [currentYear]=\"_currentYear\"\n [today]=\"today\"\n [size]=\"8\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (yearSelected)=\"setYear($event)\">\n </teta-year-select>\n <teta-month-select\n *ngIf=\"displayMode === datePickerModeEnum.month\"\n [currentMonth]=\"_currentMonth\"\n [locale]=\"locale\"\n [currentYear]=\"_currentYear\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (monthSelected)=\"setMonth($event)\">\n </teta-month-select>\n </div>\n </div>\n</teta-dropdown>\n", styles: [""] }]
|
|
2471
|
+
}], ctorParameters: function () { return [{ type: TetaConfigService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { disabled: [{
|
|
2408
2472
|
type: Input
|
|
2409
2473
|
}], minDate: [{
|
|
2410
2474
|
type: Input
|
|
@@ -2735,14 +2799,14 @@ class OnlyNumberDirective {
|
|
|
2735
2799
|
this._control.control.setValue(valid ? value : (_a = this._previousValue) !== null && _a !== void 0 ? _a : 0);
|
|
2736
2800
|
}
|
|
2737
2801
|
}
|
|
2738
|
-
OnlyNumberDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: OnlyNumberDirective, deps: [{ token: i0.ElementRef }, { token: i3.NgControl }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2802
|
+
OnlyNumberDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: OnlyNumberDirective, deps: [{ token: i0.ElementRef }, { token: i3$1.NgControl }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2739
2803
|
OnlyNumberDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.1", type: OnlyNumberDirective, selector: "[tetaOnlyNumber]", inputs: { tetaOnlyNumber: "tetaOnlyNumber", allowDecimals: "allowDecimals", allowSign: "allowSign", decimalSeparator: "decimalSeparator", commaSeparator: "commaSeparator" }, host: { listeners: { "change": "onChange($event)", "paste": "onPaste($event)", "keydown": "onKeyDown($event)" } }, ngImport: i0 });
|
|
2740
2804
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: OnlyNumberDirective, decorators: [{
|
|
2741
2805
|
type: Directive,
|
|
2742
2806
|
args: [{
|
|
2743
2807
|
selector: '[tetaOnlyNumber]',
|
|
2744
2808
|
}]
|
|
2745
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i3.NgControl }]; }, propDecorators: { tetaOnlyNumber: [{
|
|
2809
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i3$1.NgControl }]; }, propDecorators: { tetaOnlyNumber: [{
|
|
2746
2810
|
type: Input
|
|
2747
2811
|
}], allowDecimals: [{
|
|
2748
2812
|
type: Input
|
|
@@ -3136,7 +3200,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
3136
3200
|
|
|
3137
3201
|
class ToolbarComponent {
|
|
3138
3202
|
get getClass() {
|
|
3139
|
-
const result = [this.class, 'toolbar'
|
|
3203
|
+
const result = [this.class, 'toolbar'];
|
|
3140
3204
|
if (this.palette) {
|
|
3141
3205
|
result.push(`toolbar-${this.palette}`);
|
|
3142
3206
|
}
|
|
@@ -3195,7 +3259,7 @@ class ExpandPanelComponent {
|
|
|
3195
3259
|
}
|
|
3196
3260
|
}
|
|
3197
3261
|
ExpandPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ExpandPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3198
|
-
ExpandPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: ExpandPanelComponent, selector: "teta-expand-panel", inputs: { placeholder: "placeholder", open: "open", cookieName: "cookieName", direction: "direction" }, outputs: { openChange: "openChange" }, queries: [{ propertyName: "content", first: true, predicate: ExpandPanelContentDirective, descendants: true }, { propertyName: "head", first: true, predicate: ExpandPanelHeadDirective, descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"open\">\n <teta-toolbar\n style=\"display: flex\"\n [style.justifyContent]=\"direction === 'right' ? 'space-between' : 'unset'\"\n [style.flexDirection]=\"direction === 'right' ? 'row-reverse' : 'row'\">\n <button\n teta-button\n [square]=\"true\"\n [palette]=\"'text'\"\n [view]=\"'ghost'\"\n (click)=\"closePanel()\"\n >\n <teta-icon [name]=\"direction === 'right' ? 'arrowRight' : 'arrowLeft'\"></teta-icon>\n </button>\n <span class=\"font-title-2\" style=\"display: contents\"><ng-container *ngTemplateOutlet=\"head?.template\"></ng-container></span>\n </teta-toolbar>\n <ng-container *ngTemplateOutlet=\"content?.template\"></ng-container>\n</ng-container>\n<ng-container *ngIf=\"!open\">\n <div class=\"width-10 overflow-hidden\" style=\"height: 100%;\">\n <button\n teta-button\n style=\"\n transform-origin: 0 0;\n transform: rotate(-90deg) translateX(-100%);\n margin: 8px;\n \"\n [palette]=\"'text'\"\n [view]=\"'ghost'\"\n (click)=\"openPanel()\"\n >\n <div class=\"font-button-2 nowrap\">{{ placeholder }}</div>\n <teta-icon [name]=\"direction === 'right' ? 'arrowUp' : 'arrowDown'\"></teta-icon>\n </button>\n </div>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;min-width:0;min-height:0;height:100%}\n"], components: [{ type: ToolbarComponent, selector: "teta-toolbar", inputs: ["palette", "class"] }, { type: ButtonComponent, selector: "button[teta-button], teta-button", inputs: ["palette", "class", "view", "square"] }, { type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], directives: [{ type:
|
|
3262
|
+
ExpandPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: ExpandPanelComponent, selector: "teta-expand-panel", inputs: { placeholder: "placeholder", open: "open", cookieName: "cookieName", direction: "direction" }, outputs: { openChange: "openChange" }, queries: [{ propertyName: "content", first: true, predicate: ExpandPanelContentDirective, descendants: true }, { propertyName: "head", first: true, predicate: ExpandPanelHeadDirective, descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"open\">\n <teta-toolbar\n style=\"display: flex\"\n [style.justifyContent]=\"direction === 'right' ? 'space-between' : 'unset'\"\n [style.flexDirection]=\"direction === 'right' ? 'row-reverse' : 'row'\">\n <button\n teta-button\n [square]=\"true\"\n [palette]=\"'text'\"\n [view]=\"'ghost'\"\n (click)=\"closePanel()\"\n >\n <teta-icon [name]=\"direction === 'right' ? 'arrowRight' : 'arrowLeft'\"></teta-icon>\n </button>\n <span class=\"font-title-2\" style=\"display: contents\"><ng-container *ngTemplateOutlet=\"head?.template\"></ng-container></span>\n </teta-toolbar>\n <ng-container *ngTemplateOutlet=\"content?.template\"></ng-container>\n</ng-container>\n<ng-container *ngIf=\"!open\">\n <div class=\"width-10 overflow-hidden\" style=\"height: 100%;\">\n <button\n teta-button\n style=\"\n transform-origin: 0 0;\n transform: rotate(-90deg) translateX(-100%);\n margin: 8px;\n \"\n [palette]=\"'text'\"\n [view]=\"'ghost'\"\n (click)=\"openPanel()\"\n >\n <div class=\"font-button-2 nowrap\">{{ placeholder }}</div>\n <teta-icon [name]=\"direction === 'right' ? 'arrowUp' : 'arrowDown'\"></teta-icon>\n </button>\n </div>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;min-width:0;min-height:0;height:100%}\n"], components: [{ type: ToolbarComponent, selector: "teta-toolbar", inputs: ["palette", "class"] }, { type: ButtonComponent, selector: "button[teta-button], teta-button", inputs: ["palette", "class", "view", "square"] }, { type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3199
3263
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ExpandPanelComponent, decorators: [{
|
|
3200
3264
|
type: Component,
|
|
3201
3265
|
args: [{ selector: 'teta-expand-panel', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"open\">\n <teta-toolbar\n style=\"display: flex\"\n [style.justifyContent]=\"direction === 'right' ? 'space-between' : 'unset'\"\n [style.flexDirection]=\"direction === 'right' ? 'row-reverse' : 'row'\">\n <button\n teta-button\n [square]=\"true\"\n [palette]=\"'text'\"\n [view]=\"'ghost'\"\n (click)=\"closePanel()\"\n >\n <teta-icon [name]=\"direction === 'right' ? 'arrowRight' : 'arrowLeft'\"></teta-icon>\n </button>\n <span class=\"font-title-2\" style=\"display: contents\"><ng-container *ngTemplateOutlet=\"head?.template\"></ng-container></span>\n </teta-toolbar>\n <ng-container *ngTemplateOutlet=\"content?.template\"></ng-container>\n</ng-container>\n<ng-container *ngIf=\"!open\">\n <div class=\"width-10 overflow-hidden\" style=\"height: 100%;\">\n <button\n teta-button\n style=\"\n transform-origin: 0 0;\n transform: rotate(-90deg) translateX(-100%);\n margin: 8px;\n \"\n [palette]=\"'text'\"\n [view]=\"'ghost'\"\n (click)=\"openPanel()\"\n >\n <div class=\"font-button-2 nowrap\">{{ placeholder }}</div>\n <teta-icon [name]=\"direction === 'right' ? 'arrowUp' : 'arrowDown'\"></teta-icon>\n </button>\n </div>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;min-width:0;min-height:0;height:100%}\n"] }]
|
|
@@ -3375,22 +3439,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
3375
3439
|
}]
|
|
3376
3440
|
}] });
|
|
3377
3441
|
|
|
3378
|
-
class
|
|
3379
|
-
|
|
3380
|
-
|
|
3442
|
+
class StringUtil {
|
|
3443
|
+
static firstLetterToLower(input) {
|
|
3444
|
+
return input.charAt(0).toLocaleLowerCase() + input.slice(1);
|
|
3445
|
+
}
|
|
3446
|
+
;
|
|
3447
|
+
static firstLetterToUpper(input) {
|
|
3448
|
+
return input.charAt(0).toLocaleUpperCase() + input.slice(1);
|
|
3449
|
+
}
|
|
3450
|
+
;
|
|
3381
3451
|
}
|
|
3382
|
-
FilterPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3383
|
-
FilterPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: FilterPanelComponent, selector: "teta-filter-panel", ngImport: i0, template: "<p>filter-panel works!</p>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3384
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterPanelComponent, decorators: [{
|
|
3385
|
-
type: Component,
|
|
3386
|
-
args: [{ selector: 'teta-filter-panel', changeDetection: ChangeDetectionStrategy.OnPush, template: "<p>filter-panel works!</p>\n", styles: [""] }]
|
|
3387
|
-
}], ctorParameters: function () { return []; } });
|
|
3388
3452
|
|
|
3389
3453
|
class FilterBase {
|
|
3390
3454
|
constructor(options) {
|
|
3391
3455
|
if (options) {
|
|
3392
|
-
this.field = options.field;
|
|
3393
|
-
this.name = options.name;
|
|
3456
|
+
this.field = StringUtil.firstLetterToLower(options.field);
|
|
3457
|
+
this.name = StringUtil.firstLetterToLower(options.name);
|
|
3394
3458
|
}
|
|
3395
3459
|
}
|
|
3396
3460
|
}
|
|
@@ -3428,10 +3492,10 @@ class InputComponent {
|
|
|
3428
3492
|
ngOnInit() { }
|
|
3429
3493
|
}
|
|
3430
3494
|
InputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3431
|
-
InputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: InputComponent, selector: "teta-input", inputs: { label: "label", horizontal: "horizontal", required: "required" }, host: { properties: { "class.row": "this.horizontal", "class.column": "this.column" } }, ngImport: i0, template: "<div class=\"font-caption color-text-90 align-center row nowrap overflow-hidden text-overflow-ellipsis\"\n [class.row_6]=\"horizontal\"\n [class.text-field_required]=\"required\"\n *ngIf=\"label?.length > 0\">\n {{label}}\n</div>\n<div class=\"input-container\" [class.row_6]=\"horizontal\">\n <ng-content></ng-content>\n <div class=\"input-message font-error-message\">\n <ng-content select=\"message\"></ng-content>\n </div>\n</div>\n", styles: [":host{display:flex;grid-gap:
|
|
3495
|
+
InputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: InputComponent, selector: "teta-input", inputs: { label: "label", horizontal: "horizontal", required: "required" }, host: { properties: { "class.row": "this.horizontal", "class.column": "this.column" } }, ngImport: i0, template: "<div class=\"font-caption color-text-90 align-center row nowrap overflow-hidden text-overflow-ellipsis\"\n [class.row_6]=\"horizontal\"\n [class.text-field_required]=\"required\"\n *ngIf=\"label?.length > 0\">\n {{label}}\n</div>\n<div class=\"input-container\" [class.row_6]=\"horizontal\">\n <ng-content></ng-content>\n <div class=\"input-message font-error-message\">\n <ng-content select=\"message\"></ng-content>\n </div>\n</div>\n", styles: [":host{display:flex;grid-gap:4px;flex-grow:1;flex-basis:10px}\n"], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3432
3496
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: InputComponent, decorators: [{
|
|
3433
3497
|
type: Component,
|
|
3434
|
-
args: [{ selector: 'teta-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"font-caption color-text-90 align-center row nowrap overflow-hidden text-overflow-ellipsis\"\n [class.row_6]=\"horizontal\"\n [class.text-field_required]=\"required\"\n *ngIf=\"label?.length > 0\">\n {{label}}\n</div>\n<div class=\"input-container\" [class.row_6]=\"horizontal\">\n <ng-content></ng-content>\n <div class=\"input-message font-error-message\">\n <ng-content select=\"message\"></ng-content>\n </div>\n</div>\n", styles: [":host{display:flex;grid-gap:
|
|
3498
|
+
args: [{ selector: 'teta-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"font-caption color-text-90 align-center row nowrap overflow-hidden text-overflow-ellipsis\"\n [class.row_6]=\"horizontal\"\n [class.text-field_required]=\"required\"\n *ngIf=\"label?.length > 0\">\n {{label}}\n</div>\n<div class=\"input-container\" [class.row_6]=\"horizontal\">\n <ng-content></ng-content>\n <div class=\"input-message font-error-message\">\n <ng-content select=\"message\"></ng-content>\n </div>\n</div>\n", styles: [":host{display:flex;grid-gap:4px;flex-grow:1;flex-basis:10px}\n"] }]
|
|
3435
3499
|
}], ctorParameters: function () { return []; }, propDecorators: { label: [{
|
|
3436
3500
|
type: Input
|
|
3437
3501
|
}], horizontal: [{
|
|
@@ -3447,11 +3511,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
3447
3511
|
}] } });
|
|
3448
3512
|
|
|
3449
3513
|
class NumericFilterComponent extends FilterComponentBase {
|
|
3450
|
-
constructor(changeDetector) {
|
|
3514
|
+
constructor(changeDetector, _config) {
|
|
3451
3515
|
super();
|
|
3452
3516
|
this.changeDetector = changeDetector;
|
|
3517
|
+
this._config = _config;
|
|
3453
3518
|
this.filterOptions = [];
|
|
3454
3519
|
this.filterChanged = new EventEmitter();
|
|
3520
|
+
this.locale = this._config.locale;
|
|
3455
3521
|
}
|
|
3456
3522
|
set state(val) {
|
|
3457
3523
|
this.state$ = val;
|
|
@@ -3478,12 +3544,14 @@ class NumericFilterComponent extends FilterComponentBase {
|
|
|
3478
3544
|
return filter;
|
|
3479
3545
|
}
|
|
3480
3546
|
}
|
|
3481
|
-
NumericFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NumericFilterComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3482
|
-
NumericFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: NumericFilterComponent, selector: "teta-numeric-filter", inputs: { column: "column", filterOptions: "filterOptions", state: "state" }, outputs: { filterChanged: "filterChanged" }, usesInheritance: true, ngImport: i0, template: "<div class=\"form-row padding-3\">\n <teta-input [label]=\"
|
|
3547
|
+
NumericFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NumericFilterComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: TetaConfigService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3548
|
+
NumericFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: NumericFilterComponent, selector: "teta-numeric-filter", inputs: { column: "column", data: "data", filterOptions: "filterOptions", state: "state" }, outputs: { filterChanged: "filterChanged" }, usesInheritance: true, ngImport: i0, template: "<div class=\"form-row padding-3\" *ngIf=\"locale | async as loc\">\n <teta-input [label]=\"loc.from\">\n <input class=\"input\" type=\"text\"\n style=\"width: 110px\"\n [tetaOnlyNumber]=\"true\"\n [ngModel]=\"filter.value?.greaterThan\"\n (ngModelChange)=\"filter.value.greaterThan=$event\"/>\n </teta-input>\n <teta-input [label]=\"loc.to\">\n <input class=\"input\" type=\"text\"\n style=\"width: 110px\"\n [tetaOnlyNumber]=\"true\"\n [ngModel]=\"filter.value?.lessThan\"\n (ngModelChange)=\"filter.value.lessThan=$event\"/>\n </teta-input>\n</div>\n", styles: [""], components: [{ type: InputComponent, selector: "teta-input", inputs: ["label", "horizontal", "required"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: OnlyNumberDirective, selector: "[tetaOnlyNumber]", inputs: ["tetaOnlyNumber", "allowDecimals", "allowSign", "decimalSeparator", "commaSeparator"] }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3483
3549
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NumericFilterComponent, decorators: [{
|
|
3484
3550
|
type: Component,
|
|
3485
|
-
args: [{ selector: 'teta-numeric-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-row padding-3\">\n <teta-input [label]=\"
|
|
3486
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
3551
|
+
args: [{ selector: 'teta-numeric-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-row padding-3\" *ngIf=\"locale | async as loc\">\n <teta-input [label]=\"loc.from\">\n <input class=\"input\" type=\"text\"\n style=\"width: 110px\"\n [tetaOnlyNumber]=\"true\"\n [ngModel]=\"filter.value?.greaterThan\"\n (ngModelChange)=\"filter.value.greaterThan=$event\"/>\n </teta-input>\n <teta-input [label]=\"loc.to\">\n <input class=\"input\" type=\"text\"\n style=\"width: 110px\"\n [tetaOnlyNumber]=\"true\"\n [ngModel]=\"filter.value?.lessThan\"\n (ngModelChange)=\"filter.value.lessThan=$event\"/>\n </teta-input>\n</div>\n", styles: [""] }]
|
|
3552
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: TetaConfigService }]; }, propDecorators: { column: [{
|
|
3553
|
+
type: Input
|
|
3554
|
+
}], data: [{
|
|
3487
3555
|
type: Input
|
|
3488
3556
|
}], filterOptions: [{
|
|
3489
3557
|
type: Input
|
|
@@ -3524,11 +3592,13 @@ class StringFilter extends FilterBase {
|
|
|
3524
3592
|
}
|
|
3525
3593
|
|
|
3526
3594
|
class StringFilterComponent extends FilterComponentBase {
|
|
3527
|
-
constructor(changeDetector) {
|
|
3595
|
+
constructor(changeDetector, _config) {
|
|
3528
3596
|
super();
|
|
3529
3597
|
this.changeDetector = changeDetector;
|
|
3598
|
+
this._config = _config;
|
|
3530
3599
|
this.filterOptions = [];
|
|
3531
3600
|
this.filterChanged = new EventEmitter();
|
|
3601
|
+
this.locale = this._config.locale;
|
|
3532
3602
|
}
|
|
3533
3603
|
set state(val) {
|
|
3534
3604
|
this.state$ = val;
|
|
@@ -3538,7 +3608,8 @@ class StringFilterComponent extends FilterComponentBase {
|
|
|
3538
3608
|
get state() {
|
|
3539
3609
|
return this.state$;
|
|
3540
3610
|
}
|
|
3541
|
-
ngOnInit() {
|
|
3611
|
+
ngOnInit() {
|
|
3612
|
+
}
|
|
3542
3613
|
setFilter() {
|
|
3543
3614
|
this.filterChanged.emit(this.filter);
|
|
3544
3615
|
}
|
|
@@ -3556,12 +3627,14 @@ class StringFilterComponent extends FilterComponentBase {
|
|
|
3556
3627
|
return filter;
|
|
3557
3628
|
}
|
|
3558
3629
|
}
|
|
3559
|
-
StringFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: StringFilterComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3560
|
-
StringFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: StringFilterComponent, selector: "teta-string-filter", inputs: { column: "column", filterOptions: "filterOptions", state: "state" }, outputs: { filterChanged: "filterChanged" }, usesInheritance: true, ngImport: i0, template: "<div class=\"padding-3\">\n <teta-input [label]=\"
|
|
3630
|
+
StringFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: StringFilterComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: TetaConfigService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3631
|
+
StringFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: StringFilterComponent, selector: "teta-string-filter", inputs: { column: "column", data: "data", filterOptions: "filterOptions", state: "state" }, outputs: { filterChanged: "filterChanged" }, usesInheritance: true, ngImport: i0, template: "<div class=\"padding-3\">\n <teta-input [label]=\"(locale | async)?.search\">\n <input type=\"text\" class=\"input\" [(ngModel)]=\"filter.value\" (blur)=\"setFilter()\" (keydown.enter)=\"setFilter()\" />\n </teta-input>\n</div>\n\n", styles: [""], components: [{ type: InputComponent, selector: "teta-input", inputs: ["label", "horizontal", "required"] }], directives: [{ type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3561
3632
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: StringFilterComponent, decorators: [{
|
|
3562
3633
|
type: Component,
|
|
3563
|
-
args: [{ selector: 'teta-string-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"padding-3\">\n <teta-input [label]=\"
|
|
3564
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
3634
|
+
args: [{ selector: 'teta-string-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"padding-3\">\n <teta-input [label]=\"(locale | async)?.search\">\n <input type=\"text\" class=\"input\" [(ngModel)]=\"filter.value\" (blur)=\"setFilter()\" (keydown.enter)=\"setFilter()\" />\n </teta-input>\n</div>\n\n", styles: [""] }]
|
|
3635
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: TetaConfigService }]; }, propDecorators: { column: [{
|
|
3636
|
+
type: Input
|
|
3637
|
+
}], data: [{
|
|
3565
3638
|
type: Input
|
|
3566
3639
|
}], filterOptions: [{
|
|
3567
3640
|
type: Input
|
|
@@ -3593,11 +3666,16 @@ class TextFieldComponent {
|
|
|
3593
3666
|
this.placeholder = '';
|
|
3594
3667
|
this.disabled = false;
|
|
3595
3668
|
this.onlyNumber = false;
|
|
3596
|
-
this.tabindex = 0;
|
|
3597
3669
|
this.textField = true;
|
|
3598
3670
|
this.value = '';
|
|
3599
3671
|
}
|
|
3672
|
+
get tabindex() {
|
|
3673
|
+
return this.disabled ? null : 0;
|
|
3674
|
+
}
|
|
3600
3675
|
onFocus() {
|
|
3676
|
+
if (this.disabled) {
|
|
3677
|
+
return;
|
|
3678
|
+
}
|
|
3601
3679
|
this.input.nativeElement.focus();
|
|
3602
3680
|
}
|
|
3603
3681
|
keyPress(event) {
|
|
@@ -3616,7 +3694,7 @@ class TextFieldComponent {
|
|
|
3616
3694
|
}
|
|
3617
3695
|
setDisabledState(isDisabled) {
|
|
3618
3696
|
this.disabled = isDisabled;
|
|
3619
|
-
this._cdr.
|
|
3697
|
+
this._cdr.markForCheck();
|
|
3620
3698
|
}
|
|
3621
3699
|
writeValue(input) {
|
|
3622
3700
|
this.value = input;
|
|
@@ -3634,7 +3712,7 @@ TextFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
3634
3712
|
useExisting: forwardRef(() => TextFieldComponent),
|
|
3635
3713
|
multi: true,
|
|
3636
3714
|
},
|
|
3637
|
-
], 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\"\n [tetaOnlyNumber]=\"onlyNumber\"\n (ngModelChange)=\"value = $event; onChange($event);\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n (blur)=\"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: [""], components: [{ type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], directives: [{ type:
|
|
3715
|
+
], 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\"\n [tetaOnlyNumber]=\"onlyNumber\"\n (ngModelChange)=\"value = $event; onChange($event);\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n (blur)=\"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: [""], components: [{ type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: OnlyNumberDirective, selector: "[tetaOnlyNumber]", inputs: ["tetaOnlyNumber", "allowDecimals", "allowSign", "decimalSeparator", "commaSeparator"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3638
3716
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TextFieldComponent, decorators: [{
|
|
3639
3717
|
type: Component,
|
|
3640
3718
|
args: [{ selector: 'teta-text-field', providers: [
|
|
@@ -3675,16 +3753,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
3675
3753
|
}] } });
|
|
3676
3754
|
|
|
3677
3755
|
class ListFilterComponent extends FilterComponentBase {
|
|
3678
|
-
constructor(changeDetector) {
|
|
3756
|
+
constructor(changeDetector, _config) {
|
|
3679
3757
|
super();
|
|
3680
3758
|
this.changeDetector = changeDetector;
|
|
3759
|
+
this._config = _config;
|
|
3681
3760
|
this.filterOptions = [];
|
|
3682
3761
|
this.filterChanged = new EventEmitter();
|
|
3683
3762
|
this.search = '';
|
|
3763
|
+
this.locale = this._config.locale;
|
|
3684
3764
|
}
|
|
3685
3765
|
get visibleOptions() {
|
|
3686
3766
|
var _a;
|
|
3687
|
-
return (_a = this.filterOptions) === null || _a === void 0 ? void 0 : _a.filter((
|
|
3767
|
+
return (_a = this.filterOptions) === null || _a === void 0 ? void 0 : _a.filter((option) => {
|
|
3768
|
+
var _a;
|
|
3769
|
+
return ((_a = option.name) === null || _a === void 0 ? void 0 : _a.toString().indexOf(this.search)) >= 0;
|
|
3770
|
+
});
|
|
3688
3771
|
}
|
|
3689
3772
|
set state(val) {
|
|
3690
3773
|
this.state$ = val;
|
|
@@ -3694,7 +3777,8 @@ class ListFilterComponent extends FilterComponentBase {
|
|
|
3694
3777
|
get state() {
|
|
3695
3778
|
return this.state$;
|
|
3696
3779
|
}
|
|
3697
|
-
ngOnInit() {
|
|
3780
|
+
ngOnInit() {
|
|
3781
|
+
}
|
|
3698
3782
|
all() {
|
|
3699
3783
|
var _a, _b, _c, _d;
|
|
3700
3784
|
if (!((_a = this.filter) === null || _a === void 0 ? void 0 : _a.value) || ((_c = (_b = this.filter) === null || _b === void 0 ? void 0 : _b.value) === null || _c === void 0 ? void 0 : _c.length) === 0) {
|
|
@@ -3740,12 +3824,14 @@ class ListFilterComponent extends FilterComponentBase {
|
|
|
3740
3824
|
return filter;
|
|
3741
3825
|
}
|
|
3742
3826
|
}
|
|
3743
|
-
ListFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ListFilterComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3744
|
-
ListFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: ListFilterComponent, selector: "teta-list-filter", inputs: { column: "column", filterOptions: "filterOptions", state: "state" }, outputs: { filterChanged: "filterChanged" }, usesInheritance: true, ngImport: i0, template: "<div class=\"padding-2\">\n <teta-text-field [(ngModel)]=\"search\"></teta-text-field>\n</div>\n<div class=\"list padding-v-2 scrollable\">\n <div class=\"list-item\">\n <teta-checkbox [binary]=\"true\"\n [allowNull]=\"true\"\n [ngModel]=\"all()\"\n (ngModelChange)=\"setAll($event)\">\
|
|
3827
|
+
ListFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ListFilterComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: TetaConfigService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3828
|
+
ListFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: ListFilterComponent, selector: "teta-list-filter", inputs: { column: "column", data: "data", filterOptions: "filterOptions", state: "state" }, outputs: { filterChanged: "filterChanged" }, usesInheritance: true, ngImport: i0, template: "<div class=\"padding-2\">\n <teta-text-field [(ngModel)]=\"search\"></teta-text-field>\n</div>\n<div class=\"list padding-v-2 scrollable\">\n <div class=\"list-item\">\n <teta-checkbox [binary]=\"true\"\n [allowNull]=\"true\"\n [ngModel]=\"all()\"\n (ngModelChange)=\"setAll($event)\">\n {{(locale | async)?.all}}\n </teta-checkbox>\n </div>\n <div class=\"list-divider\"></div>\n <div class=\"list-item\" *ngFor=\"let option of visibleOptions\">\n <teta-checkbox [ngModel]=\"filter.value\"\n (ngModelChange)=\"setFilter($event)\"\n [value]=\"option.id\"\n [binary]=\"false\">\n {{option.name}}\n </teta-checkbox>\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column;flex-grow:1;min-height:0;min-width:0}\n"], components: [{ type: TextFieldComponent, selector: "teta-text-field", inputs: ["placeholder", "leftIconName", "disabled", "onlyNumber", "invalid"] }, { type: CheckboxComponent, selector: "teta-checkbox", inputs: ["class", "palette", "noLabel", "disabled", "value", "binary", "allowNull"] }], directives: [{ type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3745
3829
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ListFilterComponent, decorators: [{
|
|
3746
3830
|
type: Component,
|
|
3747
|
-
args: [{ selector: 'teta-list-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"padding-2\">\n <teta-text-field [(ngModel)]=\"search\"></teta-text-field>\n</div>\n<div class=\"list padding-v-2 scrollable\">\n <div class=\"list-item\">\n <teta-checkbox [binary]=\"true\"\n [allowNull]=\"true\"\n [ngModel]=\"all()\"\n (ngModelChange)=\"setAll($event)\">\
|
|
3748
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
3831
|
+
args: [{ selector: 'teta-list-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"padding-2\">\n <teta-text-field [(ngModel)]=\"search\"></teta-text-field>\n</div>\n<div class=\"list padding-v-2 scrollable\">\n <div class=\"list-item\">\n <teta-checkbox [binary]=\"true\"\n [allowNull]=\"true\"\n [ngModel]=\"all()\"\n (ngModelChange)=\"setAll($event)\">\n {{(locale | async)?.all}}\n </teta-checkbox>\n </div>\n <div class=\"list-divider\"></div>\n <div class=\"list-item\" *ngFor=\"let option of visibleOptions\">\n <teta-checkbox [ngModel]=\"filter.value\"\n (ngModelChange)=\"setFilter($event)\"\n [value]=\"option.id\"\n [binary]=\"false\">\n {{option.name}}\n </teta-checkbox>\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column;flex-grow:1;min-height:0;min-width:0}\n"] }]
|
|
3832
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: TetaConfigService }]; }, propDecorators: { column: [{
|
|
3833
|
+
type: Input
|
|
3834
|
+
}], data: [{
|
|
3749
3835
|
type: Input
|
|
3750
3836
|
}], filterOptions: [{
|
|
3751
3837
|
type: Input
|
|
@@ -3774,11 +3860,13 @@ class DateFilter extends FilterBase {
|
|
|
3774
3860
|
}
|
|
3775
3861
|
|
|
3776
3862
|
class DateFilterComponent extends FilterComponentBase {
|
|
3777
|
-
constructor(changeDetector) {
|
|
3863
|
+
constructor(changeDetector, _config) {
|
|
3778
3864
|
super();
|
|
3779
3865
|
this.changeDetector = changeDetector;
|
|
3866
|
+
this._config = _config;
|
|
3780
3867
|
this.filterOptions = [];
|
|
3781
3868
|
this.filterChanged = new EventEmitter();
|
|
3869
|
+
this.locale = this._config.locale;
|
|
3782
3870
|
}
|
|
3783
3871
|
set state(val) {
|
|
3784
3872
|
this.state$ = val;
|
|
@@ -3804,12 +3892,14 @@ class DateFilterComponent extends FilterComponentBase {
|
|
|
3804
3892
|
return filter;
|
|
3805
3893
|
}
|
|
3806
3894
|
}
|
|
3807
|
-
DateFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DateFilterComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3808
|
-
DateFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: DateFilterComponent, selector: "teta-date-filter", inputs: { column: "column", filterOptions: "filterOptions", state: "state" }, outputs: { filterChanged: "filterChanged" }, usesInheritance: true, ngImport: i0, template: "<div class=\"form-row padding-3\">\n <teta-input [label]=\"
|
|
3895
|
+
DateFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DateFilterComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: TetaConfigService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3896
|
+
DateFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: DateFilterComponent, selector: "teta-date-filter", inputs: { column: "column", data: "data", filterOptions: "filterOptions", state: "state" }, outputs: { filterChanged: "filterChanged" }, usesInheritance: true, ngImport: i0, template: "<div class=\"form-row padding-3\" *ngIf=\"locale | async as loc\">\n <teta-input [label]=\"loc.from\">\n <teta-date-picker style=\"width: 110px\"\n [ngModel]=\"filter.value?.greaterThan\"\n [appendToBody]=\"true\"\n (ngModelChange)=\"filter.value.greaterThan=$event\"></teta-date-picker>\n </teta-input>\n <teta-input [label]=\"loc.to\">\n <teta-date-picker style=\"width: 110px\"\n [ngModel]=\"filter.value?.lessThan\"\n [appendToBody]=\"true\"\n (ngModelChange)=\"filter.value.lessThan=$event\"></teta-date-picker>\n </teta-input>\n</div>\n", styles: [""], components: [{ type: InputComponent, selector: "teta-input", inputs: ["label", "horizontal", "required"] }, { type: DatePickerComponent, selector: "teta-date-picker", inputs: ["disabled", "invalid", "firstDayOfWeek", "disabledDates", "disabledPeriods", "disabledDays", "minDate", "maxDate", "minYearDate", "maxYearDate", "align", "verticalAlign", "appendToBody", "allowNull", "backdrop", "showTime", "format"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3809
3897
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DateFilterComponent, decorators: [{
|
|
3810
3898
|
type: Component,
|
|
3811
|
-
args: [{ selector: 'teta-date-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-row padding-3\">\n <teta-input [label]=\"
|
|
3812
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
3899
|
+
args: [{ selector: 'teta-date-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-row padding-3\" *ngIf=\"locale | async as loc\">\n <teta-input [label]=\"loc.from\">\n <teta-date-picker style=\"width: 110px\"\n [ngModel]=\"filter.value?.greaterThan\"\n [appendToBody]=\"true\"\n (ngModelChange)=\"filter.value.greaterThan=$event\"></teta-date-picker>\n </teta-input>\n <teta-input [label]=\"loc.to\">\n <teta-date-picker style=\"width: 110px\"\n [ngModel]=\"filter.value?.lessThan\"\n [appendToBody]=\"true\"\n (ngModelChange)=\"filter.value.lessThan=$event\"></teta-date-picker>\n </teta-input>\n</div>\n", styles: [""] }]
|
|
3900
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: TetaConfigService }]; }, propDecorators: { column: [{
|
|
3901
|
+
type: Input
|
|
3902
|
+
}], data: [{
|
|
3813
3903
|
type: Input
|
|
3814
3904
|
}], filterOptions: [{
|
|
3815
3905
|
type: Input
|
|
@@ -4110,7 +4200,7 @@ class RadioButtonComponent {
|
|
|
4110
4200
|
}
|
|
4111
4201
|
}
|
|
4112
4202
|
RadioButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: RadioButtonComponent, deps: [{ token: i0.ViewContainerRef }, { token: RadioComponent, host: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
4113
|
-
RadioButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: RadioButtonComponent, selector: "teta-radio-button", inputs: { checked: "checked", disabled: "disabled", value: "value" }, host: { listeners: { "click": "hostClick()" }, properties: { "class.radio-button": "this.radioButton", "class.radio-button-selected": "this.selected", "class.radio-button-checked": "this.checked", "class.radio-button_disabled": "this.disabled" } }, ngImport: i0, template: "<div class=\"radio-button-icon\">\n <div *ngIf=\"checked\" class=\"radio-button-small-icon\"></div>\n</div>\n<ng-content></ng-content>\n", styles: [""], directives: [{ type:
|
|
4203
|
+
RadioButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: RadioButtonComponent, selector: "teta-radio-button", inputs: { checked: "checked", disabled: "disabled", value: "value" }, host: { listeners: { "click": "hostClick()" }, properties: { "class.radio-button": "this.radioButton", "class.radio-button-selected": "this.selected", "class.radio-button-checked": "this.checked", "class.radio-button_disabled": "this.disabled" } }, ngImport: i0, template: "<div class=\"radio-button-icon\">\n <div *ngIf=\"checked\" class=\"radio-button-small-icon\"></div>\n</div>\n<ng-content></ng-content>\n", styles: [""], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
4114
4204
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: RadioButtonComponent, decorators: [{
|
|
4115
4205
|
type: Component,
|
|
4116
4206
|
args: [{ selector: 'teta-radio-button', encapsulation: ViewEncapsulation.None, template: "<div class=\"radio-button-icon\">\n <div *ngIf=\"checked\" class=\"radio-button-small-icon\"></div>\n</div>\n<ng-content></ng-content>\n", styles: [""] }]
|
|
@@ -4173,12 +4263,14 @@ class BooleanFilterComponent extends FilterComponentBase {
|
|
|
4173
4263
|
}
|
|
4174
4264
|
}
|
|
4175
4265
|
BooleanFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: BooleanFilterComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4176
|
-
BooleanFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: BooleanFilterComponent, selector: "teta-boolean-filter", inputs: { column: "column", 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\">null</teta-radio-button>\n <teta-radio-button [value]=\"true\">true</teta-radio-button>\n <teta-radio-button [value]=\"false\">false</teta-radio-button>\n </teta-radio>\n</div>\n", styles: [""], components: [{ type: RadioComponent, selector: "teta-radio", inputs: ["inline", "checkChangeSelected", "disabled", "value"] }, { type: RadioButtonComponent, selector: "teta-radio-button", inputs: ["checked", "disabled", "value"] }], directives: [{ type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4266
|
+
BooleanFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", 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\">null</teta-radio-button>\n <teta-radio-button [value]=\"true\">true</teta-radio-button>\n <teta-radio-button [value]=\"false\">false</teta-radio-button>\n </teta-radio>\n</div>\n", styles: [""], components: [{ type: RadioComponent, selector: "teta-radio", inputs: ["inline", "checkChangeSelected", "disabled", "value"] }, { type: RadioButtonComponent, selector: "teta-radio-button", inputs: ["checked", "disabled", "value"] }], directives: [{ type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4177
4267
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: BooleanFilterComponent, decorators: [{
|
|
4178
4268
|
type: Component,
|
|
4179
4269
|
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\">null</teta-radio-button>\n <teta-radio-button [value]=\"true\">true</teta-radio-button>\n <teta-radio-button [value]=\"false\">false</teta-radio-button>\n </teta-radio>\n</div>\n", styles: [""] }]
|
|
4180
4270
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
4181
4271
|
type: Input
|
|
4272
|
+
}], data: [{
|
|
4273
|
+
type: Input
|
|
4182
4274
|
}], filterOptions: [{
|
|
4183
4275
|
type: Input
|
|
4184
4276
|
}], filterChanged: [{
|
|
@@ -4218,6 +4310,13 @@ class FilterHostComponent {
|
|
|
4218
4310
|
this._componentRef.injector.get(ChangeDetectorRef).detectChanges();
|
|
4219
4311
|
}
|
|
4220
4312
|
}
|
|
4313
|
+
set data(data) {
|
|
4314
|
+
this._data = data;
|
|
4315
|
+
if (this._init) {
|
|
4316
|
+
this._componentRef.instance.data = this._data;
|
|
4317
|
+
this._componentRef.injector.get(ChangeDetectorRef).detectChanges();
|
|
4318
|
+
}
|
|
4319
|
+
}
|
|
4221
4320
|
set filterOptions(val) {
|
|
4222
4321
|
this._filterOptions = val;
|
|
4223
4322
|
if (this._init) {
|
|
@@ -4233,6 +4332,7 @@ class FilterHostComponent {
|
|
|
4233
4332
|
this.viewContainerRef.createComponent(this._column.filterComponent);
|
|
4234
4333
|
this._componentRef.instance.column = this._column;
|
|
4235
4334
|
this._componentRef.instance.state = this._state;
|
|
4335
|
+
this._componentRef.instance.data = this._data;
|
|
4236
4336
|
this._componentRef.instance.filterOptions = this._filterOptions;
|
|
4237
4337
|
this._componentRef.injector.get(ChangeDetectorRef).detectChanges();
|
|
4238
4338
|
this._init = true;
|
|
@@ -4247,7 +4347,7 @@ class FilterHostComponent {
|
|
|
4247
4347
|
}
|
|
4248
4348
|
}
|
|
4249
4349
|
FilterHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterHostComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4250
|
-
FilterHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: FilterHostComponent, selector: "teta-filter-host", inputs: { column: "column", state: "state", filterOptions: "filterOptions" }, outputs: { filterChanged: "filterChanged" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4350
|
+
FilterHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: FilterHostComponent, selector: "teta-filter-host", inputs: { column: "column", state: "state", data: "data", filterOptions: "filterOptions" }, outputs: { filterChanged: "filterChanged" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4251
4351
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterHostComponent, decorators: [{
|
|
4252
4352
|
type: Component,
|
|
4253
4353
|
args: [{
|
|
@@ -4260,6 +4360,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
4260
4360
|
type: Input
|
|
4261
4361
|
}], state: [{
|
|
4262
4362
|
type: Input
|
|
4363
|
+
}], data: [{
|
|
4364
|
+
type: Input
|
|
4263
4365
|
}], filterOptions: [{
|
|
4264
4366
|
type: Input
|
|
4265
4367
|
}], filterChanged: [{
|
|
@@ -4376,9 +4478,13 @@ class SelectComponent {
|
|
|
4376
4478
|
this.allowNull = true;
|
|
4377
4479
|
this.open = false;
|
|
4378
4480
|
this.selectClass = true;
|
|
4379
|
-
this.
|
|
4380
|
-
|
|
4381
|
-
this.onTouched = () => {
|
|
4481
|
+
this.onChange = () => {
|
|
4482
|
+
};
|
|
4483
|
+
this.onTouched = () => {
|
|
4484
|
+
};
|
|
4485
|
+
}
|
|
4486
|
+
get tabindex() {
|
|
4487
|
+
return this.disabled ? null : 0;
|
|
4382
4488
|
}
|
|
4383
4489
|
get isDisabled() {
|
|
4384
4490
|
return this.disabled;
|
|
@@ -4484,7 +4590,8 @@ class SelectComponent {
|
|
|
4484
4590
|
focus() {
|
|
4485
4591
|
this._elementRef.nativeElement.focus();
|
|
4486
4592
|
}
|
|
4487
|
-
ngOnInit() {
|
|
4593
|
+
ngOnInit() {
|
|
4594
|
+
}
|
|
4488
4595
|
writeValue(value) {
|
|
4489
4596
|
if (this.multiple) {
|
|
4490
4597
|
this.value =
|
|
@@ -4509,7 +4616,8 @@ class SelectComponent {
|
|
|
4509
4616
|
this.disabled = isDisabled;
|
|
4510
4617
|
this._cdr.markForCheck();
|
|
4511
4618
|
}
|
|
4512
|
-
getSelectedValue() {
|
|
4619
|
+
getSelectedValue() {
|
|
4620
|
+
}
|
|
4513
4621
|
}
|
|
4514
4622
|
SelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SelectComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4515
4623
|
SelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: SelectComponent, selector: "teta-select", inputs: { multiple: "multiple", options: "options", invalid: "invalid", align: "align", verticalAlign: "verticalAlign", autoClose: "autoClose", autoCloseIgnore: "autoCloseIgnore", disabled: "disabled", itemSize: "itemSize", virtual: "virtual", icon: "icon", placeholder: "placeholder", appendToBody: "appendToBody", allowNull: "allowNull", valueRef: "valueRef", textRef: "textRef", searchRef: "searchRef" }, host: { properties: { "class.select_multiple": "this.multiple", "class.select_open": "this.open", "class.select": "this.selectClass", "tabindex": "this.tabindex", "class.select_disabled": "this.isDisabled" } }, providers: [
|
|
@@ -4518,7 +4626,7 @@ SelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
4518
4626
|
useExisting: forwardRef(() => SelectComponent),
|
|
4519
4627
|
multi: true,
|
|
4520
4628
|
},
|
|
4521
|
-
], queries: [{ propertyName: "optionDirective", first: true, predicate: SelectOptionDirective, descendants: true, static: true }, { propertyName: "valueDirective", first: true, predicate: SelectValueDirective, descendants: true, static: true }], ngImport: i0, template: "<teta-dropdown [align]=\"align\"\n [verticalAlign]=\"verticalAlign\"\n [autoClose]=\"autoClose\"\n [autoCloseIgnore]=\"autoCloseIgnore\"\n [(open)]=\"open\"\n [appendToBody]=\"appendToBody\"\n [disabled]=\"disabled\"\n class=\"row row_auto\">\n <div tetaDropdownHead\n class=\"row row_auto select-head\"\n [class.select-head_invalid]=\"invalid\">\n <div class=\"row_auto flex align-center\">\n <teta-icon *ngIf=\"icon\" [name]=\"icon\" class=\"margin-right-1\"></teta-icon>\n <span class=\"placeholder\" *ngIf=\"(value == null || value?.length === 0) && placeholder\">\n {{placeholder}}\n </span>\n <ng-container\n *ngTemplateOutlet=\"valueDirective ? valueDirective.template : valueDefault; context: {$implicit: value, value: value}\"></ng-container>\n </div>\n <teta-icon [name]=\"'arrowDownSmall'\"></teta-icon>\n </div>\n <div *ngIf=\"options?.length\" tetaDropdownContent class=\"select-list scrollable row_auto\" (click)=\"$event.preventDefault()\">\n <ng-container *ngIf=\"searchRef\">\n <div class=\"select-search\">\n <teta-text-field [ngModel]=\"searchText\"\n (ngModelChange)=\"search($event)\"\n [placeholder]=\"'\u041F\u043E\u0438\u0441\u043A'\"\n [leftIconName]=\"'search'\"></teta-text-field>\n </div>\n <div class=\"list-divider\"></div>\n </ng-container>\n <ng-container *ngIf=\"!multiple && allowNull\">\n <div class=\"list-item list-item_interactive\"\n (click)=\"clear()\"\n [class.list-item_active]=\"value==null\">\n \u041D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u043E\n </div>\n <div class=\"list-divider\"></div>\n </ng-container>\n <ng-container *ngIf=\"!virtual\">\n <div class=\"list-item list-item_interactive\"\n *ngFor=\"let option of visibleOptions\"\n [class.select-list-item_active]=\"itemSelected(option) && multiple\"\n [class.list-item_active]=\"itemSelected(option)\"\n [class.select-list-item]=\"multiple\"\n (click)=\"clickOption(option, $event)\">\n <teta-icon *ngIf=\"itemSelected(option) && multiple\" [name]=\"'tick'\" [palette]=\"'primary'\"></teta-icon>\n <span [tetaHighlight]=\"searchText\">\n <ng-container\n *ngTemplateOutlet=\"optionDirective ? optionDirective.template : optionDefault; context: {$implicit: option, option: option}\">\n </ng-container>\n </span>\n </div>\n </ng-container>\n <cdk-virtual-scroll-viewport *ngIf=\"virtual\"\n [itemSize]=\"40\"\n minBufferPx=\"200\"\n maxBufferPx=\"600\">\n <div class=\"select-list-item select-list-item_interactive\"\n *cdkVirtualFor=\"let option of visibleOptions; templateCacheSize: 0;\"\n [class.select-list-item_active]=\"itemSelected(option)\"\n [tetaHighlight]=\"searchText\"\n (click)=\"clickOption(option, $event)\">\n <teta-icon *ngIf=\"itemSelected(option)\" [name]=\"'tick'\" [palette]=\"'primary'\" class=\"margin-left-2\"></teta-icon>\n <div [tetaHighlight]=\"searchText\">\n <ng-container\n *ngTemplateOutlet=\"optionDirective ? optionDirective.template : optionDefault; context: {$implicit: option, option: option}\">\n </ng-container>\n </div>\n </div>\n </cdk-virtual-scroll-viewport>\n <div class=\"row row_auto select-chip-field flex-wrap\" *ngIf=\"multiple && value?.length\">\n <div *ngFor=\"let item of value\" class=\"chip\">\n <teta-icon [name]=\"'closeCircle'\" (click)=\"removeItemClick(item, $event)\"></teta-icon>\n {{getText(item)}}\n </div>\n </div>\n </div>\n</teta-dropdown>\n\n<ng-template #optionDefault let-option>\n {{getText(option)}}\n</ng-template>\n<ng-template #valueDefault let-value>\n <div class=\"row_auto overflow-hidden text-overflow-ellipsis\" *ngIf=\"multiple\">\n <ng-container\n *ngFor=\"let item of value; let i = index\">{{getText(item) + (value.length === i + 1 ? '' : ', ') }}</ng-container>\n </div>\n <ng-container *ngIf=\"!multiple\">\n <span class=\"row row_auto overflow-hidden text-overflow-ellipsis\">{{getText(value)}}</span>\n </ng-container>\n</ng-template>\n", styles: [""], components: [{ type: DropdownComponent, selector: "teta-dropdown" }, { type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }, { type: TextFieldComponent, selector: "teta-text-field", inputs: ["placeholder", "leftIconName", "disabled", "onlyNumber", "invalid"] }, { type: i4.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }], directives: [{ type: DropdownHeadDirective, selector: "[tetaDropdownHead]" }, { type:
|
|
4629
|
+
], queries: [{ propertyName: "optionDirective", first: true, predicate: SelectOptionDirective, descendants: true, static: true }, { propertyName: "valueDirective", first: true, predicate: SelectValueDirective, descendants: true, static: true }], ngImport: i0, template: "<teta-dropdown [align]=\"align\"\n [verticalAlign]=\"verticalAlign\"\n [autoClose]=\"autoClose\"\n [autoCloseIgnore]=\"autoCloseIgnore\"\n [(open)]=\"open\"\n [appendToBody]=\"appendToBody\"\n [disabled]=\"disabled\"\n class=\"row row_auto\">\n <div tetaDropdownHead\n class=\"row row_auto select-head\"\n [class.select-head_invalid]=\"invalid\">\n <div class=\"row_auto flex align-center\">\n <teta-icon *ngIf=\"icon\" [name]=\"icon\" class=\"margin-right-1\"></teta-icon>\n <span class=\"placeholder\" *ngIf=\"(value == null || value?.length === 0) && placeholder\">\n {{placeholder}}\n </span>\n <ng-container\n *ngTemplateOutlet=\"valueDirective ? valueDirective.template : valueDefault; context: {$implicit: value, value: value}\"></ng-container>\n </div>\n <teta-icon [name]=\"'arrowDownSmall'\"></teta-icon>\n </div>\n <div *ngIf=\"options?.length\" tetaDropdownContent class=\"select-list scrollable row_auto\" (click)=\"$event.preventDefault()\">\n <ng-container *ngIf=\"searchRef\">\n <div class=\"select-search\">\n <teta-text-field [ngModel]=\"searchText\"\n (ngModelChange)=\"search($event)\"\n [placeholder]=\"'\u041F\u043E\u0438\u0441\u043A'\"\n [leftIconName]=\"'search'\"></teta-text-field>\n </div>\n <div class=\"list-divider\"></div>\n </ng-container>\n <ng-container *ngIf=\"!multiple && allowNull\">\n <div class=\"list-item list-item_interactive\"\n (click)=\"clear()\"\n [class.list-item_active]=\"value==null\">\n \u041D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u043E\n </div>\n <div class=\"list-divider\"></div>\n </ng-container>\n <ng-container *ngIf=\"!virtual\">\n <div class=\"list-item list-item_interactive\"\n *ngFor=\"let option of visibleOptions\"\n [class.select-list-item_active]=\"itemSelected(option) && multiple\"\n [class.list-item_active]=\"itemSelected(option)\"\n [class.select-list-item]=\"multiple\"\n (click)=\"clickOption(option, $event)\">\n <teta-icon *ngIf=\"itemSelected(option) && multiple\" [name]=\"'tick'\" [palette]=\"'primary'\"></teta-icon>\n <span [tetaHighlight]=\"searchText\">\n <ng-container\n *ngTemplateOutlet=\"optionDirective ? optionDirective.template : optionDefault; context: {$implicit: option, option: option}\">\n </ng-container>\n </span>\n </div>\n </ng-container>\n <cdk-virtual-scroll-viewport *ngIf=\"virtual\"\n [itemSize]=\"40\"\n minBufferPx=\"200\"\n maxBufferPx=\"600\">\n <div class=\"select-list-item select-list-item_interactive\"\n *cdkVirtualFor=\"let option of visibleOptions; templateCacheSize: 0;\"\n [class.select-list-item_active]=\"itemSelected(option)\"\n [tetaHighlight]=\"searchText\"\n (click)=\"clickOption(option, $event)\">\n <teta-icon *ngIf=\"itemSelected(option)\" [name]=\"'tick'\" [palette]=\"'primary'\" class=\"margin-left-2\"></teta-icon>\n <div [tetaHighlight]=\"searchText\">\n <ng-container\n *ngTemplateOutlet=\"optionDirective ? optionDirective.template : optionDefault; context: {$implicit: option, option: option}\">\n </ng-container>\n </div>\n </div>\n </cdk-virtual-scroll-viewport>\n <div class=\"row row_auto select-chip-field flex-wrap\" *ngIf=\"multiple && value?.length\">\n <div *ngFor=\"let item of value\" class=\"chip\">\n <teta-icon [name]=\"'closeCircle'\" (click)=\"removeItemClick(item, $event)\"></teta-icon>\n {{getText(item)}}\n </div>\n </div>\n </div>\n</teta-dropdown>\n\n<ng-template #optionDefault let-option>\n {{getText(option)}}\n</ng-template>\n<ng-template #valueDefault let-value>\n <div class=\"row_auto overflow-hidden text-overflow-ellipsis\" *ngIf=\"multiple\">\n <ng-container\n *ngFor=\"let item of value; let i = index\">{{getText(item) + (value.length === i + 1 ? '' : ', ') }}</ng-container>\n </div>\n <ng-container *ngIf=\"!multiple\">\n <span class=\"row row_auto overflow-hidden text-overflow-ellipsis\">{{getText(value)}}</span>\n </ng-container>\n</ng-template>\n", styles: [""], components: [{ type: DropdownComponent, selector: "teta-dropdown" }, { type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }, { type: TextFieldComponent, selector: "teta-text-field", inputs: ["placeholder", "leftIconName", "disabled", "onlyNumber", "invalid"] }, { type: i4.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }], directives: [{ type: DropdownHeadDirective, selector: "[tetaDropdownHead]" }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: DropdownContentDirective, selector: "[tetaDropdownContent]" }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: HighlightDirective, selector: "[tetaHighlight]", inputs: ["tetaHighlight"] }, { type: i4.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { type: i4.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4522
4630
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SelectComponent, decorators: [{
|
|
4523
4631
|
type: Component,
|
|
4524
4632
|
args: [{ selector: 'teta-select', providers: [
|
|
@@ -4686,8 +4794,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
4686
4794
|
class FilterModule {
|
|
4687
4795
|
}
|
|
4688
4796
|
FilterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4689
|
-
FilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterModule, declarations: [
|
|
4690
|
-
NumericFilterComponent,
|
|
4797
|
+
FilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterModule, declarations: [NumericFilterComponent,
|
|
4691
4798
|
StringFilterComponent,
|
|
4692
4799
|
ListFilterComponent,
|
|
4693
4800
|
DateFilterComponent,
|
|
@@ -4699,8 +4806,7 @@ FilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
4699
4806
|
RadioModule,
|
|
4700
4807
|
InputModule,
|
|
4701
4808
|
CheckboxModule,
|
|
4702
|
-
OnlyNumberModule], exports: [
|
|
4703
|
-
NumericFilterComponent,
|
|
4809
|
+
OnlyNumberModule], exports: [NumericFilterComponent,
|
|
4704
4810
|
StringFilterComponent,
|
|
4705
4811
|
ListFilterComponent,
|
|
4706
4812
|
DateFilterComponent,
|
|
@@ -4720,7 +4826,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
4720
4826
|
type: NgModule,
|
|
4721
4827
|
args: [{
|
|
4722
4828
|
declarations: [
|
|
4723
|
-
FilterPanelComponent,
|
|
4724
4829
|
NumericFilterComponent,
|
|
4725
4830
|
StringFilterComponent,
|
|
4726
4831
|
ListFilterComponent,
|
|
@@ -4729,7 +4834,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
4729
4834
|
BooleanFilterComponent,
|
|
4730
4835
|
],
|
|
4731
4836
|
exports: [
|
|
4732
|
-
FilterPanelComponent,
|
|
4733
4837
|
NumericFilterComponent,
|
|
4734
4838
|
StringFilterComponent,
|
|
4735
4839
|
ListFilterComponent,
|
|
@@ -4771,8 +4875,8 @@ class FilterItem {
|
|
|
4771
4875
|
this.hint = (_d = options === null || options === void 0 ? void 0 : options.hint) !== null && _d !== void 0 ? _d : '';
|
|
4772
4876
|
this.sortable = (_e = options === null || options === void 0 ? void 0 : options.sortable) !== null && _e !== void 0 ? _e : true;
|
|
4773
4877
|
this.filterable = (_f = options === null || options === void 0 ? void 0 : options.filterable) !== null && _f !== void 0 ? _f : true;
|
|
4774
|
-
this.sortField = (_g = options === null || options === void 0 ? void 0 : options.sortField) !== null && _g !== void 0 ? _g : this.name;
|
|
4775
|
-
this.filterField = (_h = options === null || options === void 0 ? void 0 : options.filterField) !== null && _h !== void 0 ? _h : this.name;
|
|
4878
|
+
this.sortField = StringUtil.firstLetterToLower((_g = options === null || options === void 0 ? void 0 : options.sortField) !== null && _g !== void 0 ? _g : this.name);
|
|
4879
|
+
this.filterField = StringUtil.firstLetterToLower((_h = options === null || options === void 0 ? void 0 : options.filterField) !== null && _h !== void 0 ? _h : this.name);
|
|
4776
4880
|
this.filterType = options === null || options === void 0 ? void 0 : options.filterType;
|
|
4777
4881
|
this.stringFilterType = (_j = options === null || options === void 0 ? void 0 : options.stringFilterType) !== null && _j !== void 0 ? _j : StringFilterType.Contains;
|
|
4778
4882
|
this.listFilterType = (_k = options === null || options === void 0 ? void 0 : options.listFilterType) !== null && _k !== void 0 ? _k : ListFilterType.None;
|
|
@@ -4788,7 +4892,7 @@ class SortParam {
|
|
|
4788
4892
|
*/
|
|
4789
4893
|
constructor(options) {
|
|
4790
4894
|
if (options) {
|
|
4791
|
-
this.field = options.field || this.field;
|
|
4895
|
+
this.field = StringUtil.firstLetterToLower(options.field || this.field);
|
|
4792
4896
|
this.asc = options.asc || false;
|
|
4793
4897
|
this.order = options.order || this.order;
|
|
4794
4898
|
}
|
|
@@ -5010,7 +5114,7 @@ class MessageComponent {
|
|
|
5010
5114
|
}
|
|
5011
5115
|
}
|
|
5012
5116
|
MessageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: MessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5013
|
-
MessageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: MessageComponent, selector: "teta-message", inputs: { message: "message", index: "index", class: "class" }, outputs: { closed: "closed" }, host: { listeners: { "mouseleave": "init()", "mouseenter": "reset()" }, properties: { "class": "this.getClass" } }, ngImport: i0, template: "<div class=\"row align-center justify-content-between\">\n <div class=\"font-title-3 padding-left-1\">\n {{message.title}}\n </div>\n <button teta-button\n [square]=\"true\"\n [palette]=\"message.palette\"\n [view]=\"'primary'\"\n (click)=\"closeMe($event)\">\n <teta-icon [name]=\"'closeBig'\"></teta-icon>\n </button>\n</div>\n<div class=\"font-body-3 padding-v-1\" *ngIf=\"!message.template && message.text\">\n {{message.text}}\n</div>\n<ng-container *ngIf=\"message.template\">\n <ng-container *ngTemplateOutlet=\"message.template; context: {$implicit: message}\"></ng-container>\n</ng-container>\n", styles: [""], components: [{ type: ButtonComponent, selector: "button[teta-button], teta-button", inputs: ["palette", "class", "view", "square"] }, { type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], directives: [{ type:
|
|
5117
|
+
MessageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: MessageComponent, selector: "teta-message", inputs: { message: "message", index: "index", class: "class" }, outputs: { closed: "closed" }, host: { listeners: { "mouseleave": "init()", "mouseenter": "reset()" }, properties: { "class": "this.getClass" } }, ngImport: i0, template: "<div class=\"row align-center justify-content-between\">\n <div class=\"font-title-3 padding-left-1\">\n {{message.title}}\n </div>\n <button teta-button\n [square]=\"true\"\n [palette]=\"message.palette\"\n [view]=\"'primary'\"\n (click)=\"closeMe($event)\">\n <teta-icon [name]=\"'closeBig'\"></teta-icon>\n </button>\n</div>\n<div class=\"font-body-3 padding-v-1\" *ngIf=\"!message.template && message.text\">\n {{message.text}}\n</div>\n<ng-container *ngIf=\"message.template\">\n <ng-container *ngTemplateOutlet=\"message.template; context: {$implicit: message}\"></ng-container>\n</ng-container>\n", styles: [""], components: [{ type: ButtonComponent, selector: "button[teta-button], teta-button", inputs: ["palette", "class", "view", "square"] }, { type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5014
5118
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: MessageComponent, decorators: [{
|
|
5015
5119
|
type: Component,
|
|
5016
5120
|
args: [{ selector: 'teta-message', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"row align-center justify-content-between\">\n <div class=\"font-title-3 padding-left-1\">\n {{message.title}}\n </div>\n <button teta-button\n [square]=\"true\"\n [palette]=\"message.palette\"\n [view]=\"'primary'\"\n (click)=\"closeMe($event)\">\n <teta-icon [name]=\"'closeBig'\"></teta-icon>\n </button>\n</div>\n<div class=\"font-body-3 padding-v-1\" *ngIf=\"!message.template && message.text\">\n {{message.text}}\n</div>\n<ng-container *ngIf=\"message.template\">\n <ng-container *ngTemplateOutlet=\"message.template; context: {$implicit: message}\"></ng-container>\n</ng-container>\n", styles: [""] }]
|
|
@@ -5097,7 +5201,7 @@ class MessageHostComponent {
|
|
|
5097
5201
|
}
|
|
5098
5202
|
}
|
|
5099
5203
|
MessageHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: MessageHostComponent, deps: [{ token: MessageService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
5100
|
-
MessageHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: MessageHostComponent, selector: "teta-message-host", inputs: { class: "class", align: "align", verticalAlign: "verticalAlign" }, outputs: { itemClose: "itemClose" }, host: { properties: { "class": "this.getClass" } }, ngImport: i0, template: "<teta-message\n *ngFor=\"let message of messages; let i=index\"\n (closed)=\"closedItem($event)\"\n [message]=\"message\"\n [index]=\"i\">\n</teta-message>\n", styles: [""], components: [{ type: MessageComponent, selector: "teta-message", inputs: ["message", "index", "class"], outputs: ["closed"] }], directives: [{ type:
|
|
5204
|
+
MessageHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: MessageHostComponent, selector: "teta-message-host", inputs: { class: "class", align: "align", verticalAlign: "verticalAlign" }, outputs: { itemClose: "itemClose" }, host: { properties: { "class": "this.getClass" } }, ngImport: i0, template: "<teta-message\n *ngFor=\"let message of messages; let i=index\"\n (closed)=\"closedItem($event)\"\n [message]=\"message\"\n [index]=\"i\">\n</teta-message>\n", styles: [""], components: [{ type: MessageComponent, selector: "teta-message", inputs: ["message", "index", "class"], outputs: ["closed"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5101
5205
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: MessageHostComponent, decorators: [{
|
|
5102
5206
|
type: Component,
|
|
5103
5207
|
args: [{ selector: 'teta-message-host', changeDetection: ChangeDetectionStrategy.OnPush, template: "<teta-message\n *ngFor=\"let message of messages; let i=index\"\n (closed)=\"closedItem($event)\"\n [message]=\"message\"\n [index]=\"i\">\n</teta-message>\n", styles: [""] }]
|
|
@@ -5278,7 +5382,7 @@ class DialogComponent {
|
|
|
5278
5382
|
ngOnInit() { }
|
|
5279
5383
|
}
|
|
5280
5384
|
DialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DialogComponent, deps: [{ token: CurrentModal }, { token: DynamicData }], target: i0.ɵɵFactoryTarget.Component });
|
|
5281
|
-
DialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: DialogComponent, selector: "teta-dialog", inputs: { message: "message", buttonText: "buttonText", buttonIcon: "buttonIcon", buttonPalette: "buttonPalette", showCancelButton: "showCancelButton" }, ngImport: i0, template: "<div class=\"padding-2 font-body-2\">\n {{message | transloco}}\n</div>\n<teta-toolbar class=\"justify-content-end\">\n <button teta-button\n *ngIf=\"showCancelButton\"\n (click)=\"cancel()\"\n [palette]=\"'text'\"\n [view]=\"'ghost'\">\n {{'common.cancel' | transloco}}\n </button>\n\n <button teta-button\n (click)=\"ok()\"\n [square]=\"!buttonText?.length\"\n [palette]=\"buttonPalette\">\n <teta-icon *ngIf=\"buttonIcon\" [name]=\"buttonIcon\"></teta-icon>\n <ng-container *ngIf=\"buttonText?.length > 0\">{{buttonText | transloco}}</ng-container>\n </button>\n</teta-toolbar>\n", styles: [":host{display:flex;flex-direction:column;width:240px}\n"], components: [{ type: ToolbarComponent, selector: "teta-toolbar", inputs: ["palette", "class"] }, { type: ButtonComponent, selector: "button[teta-button], teta-button", inputs: ["palette", "class", "view", "square"] }, { type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], directives: [{ type:
|
|
5385
|
+
DialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: DialogComponent, selector: "teta-dialog", inputs: { message: "message", buttonText: "buttonText", buttonIcon: "buttonIcon", buttonPalette: "buttonPalette", showCancelButton: "showCancelButton" }, ngImport: i0, template: "<div class=\"padding-2 font-body-2\">\n {{message | transloco}}\n</div>\n<teta-toolbar class=\"justify-content-end\">\n <button teta-button\n *ngIf=\"showCancelButton\"\n (click)=\"cancel()\"\n [palette]=\"'text'\"\n [view]=\"'ghost'\">\n {{'common.cancel' | transloco}}\n </button>\n\n <button teta-button\n (click)=\"ok()\"\n [square]=\"!buttonText?.length\"\n [palette]=\"buttonPalette\">\n <teta-icon *ngIf=\"buttonIcon\" [name]=\"buttonIcon\"></teta-icon>\n <ng-container *ngIf=\"buttonText?.length > 0\">{{buttonText | transloco}}</ng-container>\n </button>\n</teta-toolbar>\n", styles: [":host{display:flex;flex-direction:column;width:240px}\n"], components: [{ type: ToolbarComponent, selector: "teta-toolbar", inputs: ["palette", "class"] }, { type: ButtonComponent, selector: "button[teta-button], teta-button", inputs: ["palette", "class", "view", "square"] }, { type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "transloco": i1$1.TranslocoPipe } });
|
|
5282
5386
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DialogComponent, decorators: [{
|
|
5283
5387
|
type: Component,
|
|
5284
5388
|
args: [{ selector: 'teta-dialog', template: "<div class=\"padding-2 font-body-2\">\n {{message | transloco}}\n</div>\n<teta-toolbar class=\"justify-content-end\">\n <button teta-button\n *ngIf=\"showCancelButton\"\n (click)=\"cancel()\"\n [palette]=\"'text'\"\n [view]=\"'ghost'\">\n {{'common.cancel' | transloco}}\n </button>\n\n <button teta-button\n (click)=\"ok()\"\n [square]=\"!buttonText?.length\"\n [palette]=\"buttonPalette\">\n <teta-icon *ngIf=\"buttonIcon\" [name]=\"buttonIcon\"></teta-icon>\n <ng-container *ngIf=\"buttonText?.length > 0\">{{buttonText | transloco}}</ng-container>\n </button>\n</teta-toolbar>\n", styles: [":host{display:flex;flex-direction:column;width:240px}\n"] }]
|
|
@@ -6023,7 +6127,7 @@ class ToggleComponent {
|
|
|
6023
6127
|
}
|
|
6024
6128
|
}
|
|
6025
6129
|
ToggleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ToggleComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
6026
|
-
ToggleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: ToggleComponent, selector: "teta-toggle", inputs: { palette: "palette", noLabel: "noLabel", disabled: "disabled" }, host: { listeners: { "click": "changeValue()" }, properties: { "attr.tabindex": "this.tabindex", "class.toggle": "this.toggleClass", "class.toggle_disabled": "this.disabled" } }, providers: [TOGGLE_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<span class=\"font-body-3 row_auto\" *ngIf=\"!noLabel\">\n <ng-content></ng-content>\n</span>\n<div class=\"toggle-button\" [class.toggle-button-on]=\"model\" [ngClass]=\"paletteClass\">\n <div class=\"toggle-button-circle\"></div>\n</div>\n", styles: [""], directives: [{ type:
|
|
6130
|
+
ToggleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: ToggleComponent, selector: "teta-toggle", inputs: { palette: "palette", noLabel: "noLabel", disabled: "disabled" }, host: { listeners: { "click": "changeValue()" }, properties: { "attr.tabindex": "this.tabindex", "class.toggle": "this.toggleClass", "class.toggle_disabled": "this.disabled" } }, providers: [TOGGLE_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<span class=\"font-body-3 row_auto\" *ngIf=\"!noLabel\">\n <ng-content></ng-content>\n</span>\n<div class=\"toggle-button\" [class.toggle-button-on]=\"model\" [ngClass]=\"paletteClass\">\n <div class=\"toggle-button-circle\"></div>\n</div>\n", styles: [""], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6027
6131
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ToggleComponent, decorators: [{
|
|
6028
6132
|
type: Component,
|
|
6029
6133
|
args: [{ selector: 'teta-toggle', providers: [TOGGLE_CONTROL_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<span class=\"font-body-3 row_auto\" *ngIf=\"!noLabel\">\n <ng-content></ng-content>\n</span>\n<div class=\"toggle-button\" [class.toggle-button-on]=\"model\" [ngClass]=\"paletteClass\">\n <div class=\"toggle-button-circle\"></div>\n</div>\n", styles: [""] }]
|
|
@@ -6079,7 +6183,8 @@ class DynamicContentBaseDirective {
|
|
|
6079
6183
|
this._alive = false;
|
|
6080
6184
|
this.destroyContentRef();
|
|
6081
6185
|
}
|
|
6082
|
-
ngOnInit() {
|
|
6186
|
+
ngOnInit() {
|
|
6187
|
+
}
|
|
6083
6188
|
createContentRef(className) {
|
|
6084
6189
|
if (!this._componentRef) {
|
|
6085
6190
|
this._open = true;
|
|
@@ -6094,11 +6199,9 @@ class DynamicContentBaseDirective {
|
|
|
6094
6199
|
return this._componentRef;
|
|
6095
6200
|
}
|
|
6096
6201
|
destroyContentRef() {
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
this._componentRef = null;
|
|
6101
|
-
}
|
|
6202
|
+
this._open = false;
|
|
6203
|
+
this._service.destroy(this._componentRef, this._content, this.appendToBody ? this._document.body : this._elementRef.nativeElement);
|
|
6204
|
+
this._componentRef = null;
|
|
6102
6205
|
}
|
|
6103
6206
|
}
|
|
6104
6207
|
DynamicContentBaseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DynamicContentBaseDirective, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -6286,7 +6389,7 @@ class PropertyGridItemComponent {
|
|
|
6286
6389
|
}
|
|
6287
6390
|
}
|
|
6288
6391
|
PropertyGridItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridItemComponent, deps: [{ token: i1$1.TranslocoService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6289
|
-
PropertyGridItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: PropertyGridItemComponent, selector: "teta-property-grid-item", inputs: { column: "column", hideNonEditable: "hideNonEditable", dict: "dict", formGroup: "formGroup", horizontal: "horizontal" }, outputs: { controlValueChange: "controlValueChange" }, ngImport: i0, template: "<teta-input [label]=\"caption\"\n [tetaHint]=\"column.hint\"\n [align]=\"align.left\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal\"\n *ngIf=\"column.editable || !hideNonEditable\">\n <ng-container [ngSwitch]=\"column.filterType\">\n <teta-select class=\"row_auto\"\n *ngSwitchCase=\"filterTypeEnum.list\"\n [searchRef]=\"getDict()?.length > 10 ? 'name' : ''\"\n [allowNull]=\"!column.required\"\n [appendToBody]=\"true\"\n [invalid]=\"controlIsInvalid(column.name)\"\n [formControlName]=\"column.name\"\n [options]=\"getDict()\"\n [valueRef]=\"'id'\"\n [textRef]=\"'name'\"\n [multiple]=\"false\"></teta-select>\n <teta-date-picker *ngSwitchCase=\"filterTypeEnum.date\"\n class=\"row_auto\"\n [appendToBody]=\"true\"\n [invalid]=\"controlIsInvalid(column.name)\"\n [formControlName]=\"column.name\"></teta-date-picker>\n <teta-toggle *ngSwitchCase=\"filterTypeEnum.boolean\"\n [formControlName]=\"column.name\">{{column.caption}}</teta-toggle>\n <teta-text-field class=\"row_auto\"\n *ngSwitchDefault\n (focusout)=\"valueChange()\"\n [onlyNumber]=\"column.filterType === filterTypeEnum.number\"\n [placeholder]=\"column.caption\"\n [invalid]=\"controlIsInvalid(column.name)\"\n [formControlName]=\"column.name\"></teta-text-field>\n </ng-container>\n <div *ngIf=\"controlIsInvalid(column.name)\"\n ngProjectAs=\"message\"\n class=\"color-red-50\">\n {{getError(column)}}\n </div>\n</teta-input>\n", styles: [""], components: [{ type: InputComponent, selector: "teta-input", inputs: ["label", "horizontal", "required"] }, { type: SelectComponent, selector: "teta-select", inputs: ["multiple", "options", "invalid", "align", "verticalAlign", "autoClose", "autoCloseIgnore", "disabled", "itemSize", "virtual", "icon", "placeholder", "appendToBody", "allowNull", "valueRef", "textRef", "searchRef"] }, { type: DatePickerComponent, selector: "teta-date-picker", inputs: ["disabled", "invalid", "firstDayOfWeek", "disabledDates", "disabledPeriods", "disabledDays", "minDate", "maxDate", "minYearDate", "maxYearDate", "align", "verticalAlign", "appendToBody", "showTime", "format"] }, { type: ToggleComponent, selector: "teta-toggle", inputs: ["palette", "noLabel", "disabled"] }, { type: TextFieldComponent, selector: "teta-text-field", inputs: ["placeholder", "leftIconName", "disabled", "onlyNumber", "invalid"] }], directives: [{ type:
|
|
6392
|
+
PropertyGridItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: PropertyGridItemComponent, selector: "teta-property-grid-item", inputs: { column: "column", hideNonEditable: "hideNonEditable", dict: "dict", formGroup: "formGroup", horizontal: "horizontal" }, outputs: { controlValueChange: "controlValueChange" }, ngImport: i0, template: "<teta-input [label]=\"caption\"\n [tetaHint]=\"column.hint\"\n [align]=\"align.left\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal\"\n *ngIf=\"column.editable || !hideNonEditable\">\n <ng-container [ngSwitch]=\"column.filterType\">\n <teta-select class=\"row_auto\"\n *ngSwitchCase=\"filterTypeEnum.list\"\n [searchRef]=\"getDict()?.length > 10 ? 'name' : ''\"\n [allowNull]=\"!column.required\"\n [appendToBody]=\"true\"\n [invalid]=\"controlIsInvalid(column.name)\"\n [formControlName]=\"column.name\"\n [options]=\"getDict()\"\n [valueRef]=\"'id'\"\n [textRef]=\"'name'\"\n [multiple]=\"false\"></teta-select>\n <teta-date-picker *ngSwitchCase=\"filterTypeEnum.date\"\n class=\"row_auto\"\n [appendToBody]=\"true\"\n [invalid]=\"controlIsInvalid(column.name)\"\n [formControlName]=\"column.name\"></teta-date-picker>\n <teta-toggle *ngSwitchCase=\"filterTypeEnum.boolean\"\n [formControlName]=\"column.name\">{{column.caption}}</teta-toggle>\n <teta-text-field class=\"row_auto\"\n *ngSwitchDefault\n (focusout)=\"valueChange()\"\n [onlyNumber]=\"column.filterType === filterTypeEnum.number\"\n [placeholder]=\"column.caption\"\n [invalid]=\"controlIsInvalid(column.name)\"\n [formControlName]=\"column.name\"></teta-text-field>\n </ng-container>\n <div *ngIf=\"controlIsInvalid(column.name)\"\n ngProjectAs=\"message\"\n class=\"color-red-50\">\n {{getError(column)}}\n </div>\n</teta-input>\n", styles: [""], components: [{ type: InputComponent, selector: "teta-input", inputs: ["label", "horizontal", "required"] }, { type: SelectComponent, selector: "teta-select", inputs: ["multiple", "options", "invalid", "align", "verticalAlign", "autoClose", "autoCloseIgnore", "disabled", "itemSize", "virtual", "icon", "placeholder", "appendToBody", "allowNull", "valueRef", "textRef", "searchRef"] }, { type: DatePickerComponent, selector: "teta-date-picker", inputs: ["disabled", "invalid", "firstDayOfWeek", "disabledDates", "disabledPeriods", "disabledDays", "minDate", "maxDate", "minYearDate", "maxYearDate", "align", "verticalAlign", "appendToBody", "allowNull", "backdrop", "showTime", "format"] }, { type: ToggleComponent, selector: "teta-toggle", inputs: ["palette", "noLabel", "disabled"] }, { type: TextFieldComponent, selector: "teta-text-field", inputs: ["placeholder", "leftIconName", "disabled", "onlyNumber", "invalid"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: HintDirective, selector: "[tetaHint]", inputs: ["tetaHint", "align", "verticalAlign", "delay"] }, { type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }] });
|
|
6290
6393
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridItemComponent, decorators: [{
|
|
6291
6394
|
type: Component,
|
|
6292
6395
|
args: [{ selector: 'teta-property-grid-item', template: "<teta-input [label]=\"caption\"\n [tetaHint]=\"column.hint\"\n [align]=\"align.left\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal\"\n *ngIf=\"column.editable || !hideNonEditable\">\n <ng-container [ngSwitch]=\"column.filterType\">\n <teta-select class=\"row_auto\"\n *ngSwitchCase=\"filterTypeEnum.list\"\n [searchRef]=\"getDict()?.length > 10 ? 'name' : ''\"\n [allowNull]=\"!column.required\"\n [appendToBody]=\"true\"\n [invalid]=\"controlIsInvalid(column.name)\"\n [formControlName]=\"column.name\"\n [options]=\"getDict()\"\n [valueRef]=\"'id'\"\n [textRef]=\"'name'\"\n [multiple]=\"false\"></teta-select>\n <teta-date-picker *ngSwitchCase=\"filterTypeEnum.date\"\n class=\"row_auto\"\n [appendToBody]=\"true\"\n [invalid]=\"controlIsInvalid(column.name)\"\n [formControlName]=\"column.name\"></teta-date-picker>\n <teta-toggle *ngSwitchCase=\"filterTypeEnum.boolean\"\n [formControlName]=\"column.name\">{{column.caption}}</teta-toggle>\n <teta-text-field class=\"row_auto\"\n *ngSwitchDefault\n (focusout)=\"valueChange()\"\n [onlyNumber]=\"column.filterType === filterTypeEnum.number\"\n [placeholder]=\"column.caption\"\n [invalid]=\"controlIsInvalid(column.name)\"\n [formControlName]=\"column.name\"></teta-text-field>\n </ng-container>\n <div *ngIf=\"controlIsInvalid(column.name)\"\n ngProjectAs=\"message\"\n class=\"color-red-50\">\n {{getError(column)}}\n </div>\n</teta-input>\n", styles: [""] }]
|
|
@@ -6312,7 +6415,7 @@ class PropertyGridGroupComponent {
|
|
|
6312
6415
|
ngOnInit() { }
|
|
6313
6416
|
}
|
|
6314
6417
|
PropertyGridGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6315
|
-
PropertyGridGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: PropertyGridGroupComponent, selector: "teta-property-grid-group", inputs: { column: "column", hideNonEditable: "hideNonEditable", dict: "dict", formGroup: "formGroup", horizontal: "horizontal" }, outputs: { controlValueChange: "controlValueChange" }, host: { properties: { "class.form-container": "this.formClass" } }, ngImport: i0, template: "<div class=\"font-title-3\">{{column.caption}}</div>\n<ng-container *ngFor=\"let col of column.columns\">\n <ng-container *ngIf=\"col.columns?.length < 1\">\n <teta-property-grid-item *ngIf=\"column.editable || !hideNonEditable\"\n [dict]=\"dict\"\n [column]=\"col\"\n [hideNonEditable]=\"hideNonEditable\"\n (controlValueChange)=\"controlValueChange.emit($event)\"\n [horizontal]=\"horizontal\"\n [formGroup]=\"formGroup\"></teta-property-grid-item>\n </ng-container>\n <ng-container *ngIf=\"col.columns?.length > 0\">\n <teta-property-grid-group [dict]=\"dict\"\n [column]=\"col\"\n [hideNonEditable]=\"hideNonEditable\"\n [horizontal]=\"horizontal\"\n (controlValueChange)=\"controlValueChange.emit($event)\"\n [formGroup]=\"formGroup\"></teta-property-grid-group>\n </ng-container>\n</ng-container>\n", styles: [""], components: [{ type: PropertyGridItemComponent, selector: "teta-property-grid-item", inputs: ["column", "hideNonEditable", "dict", "formGroup", "horizontal"], outputs: ["controlValueChange"] }, { type: PropertyGridGroupComponent, selector: "teta-property-grid-group", inputs: ["column", "hideNonEditable", "dict", "formGroup", "horizontal"], outputs: ["controlValueChange"] }], directives: [{ type:
|
|
6418
|
+
PropertyGridGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: PropertyGridGroupComponent, selector: "teta-property-grid-group", inputs: { column: "column", hideNonEditable: "hideNonEditable", dict: "dict", formGroup: "formGroup", horizontal: "horizontal" }, outputs: { controlValueChange: "controlValueChange" }, host: { properties: { "class.form-container": "this.formClass" } }, ngImport: i0, template: "<div class=\"font-title-3\">{{column.caption}}</div>\n<ng-container *ngFor=\"let col of column.columns\">\n <ng-container *ngIf=\"col.columns?.length < 1\">\n <teta-property-grid-item *ngIf=\"column.editable || !hideNonEditable\"\n [dict]=\"dict\"\n [column]=\"col\"\n [hideNonEditable]=\"hideNonEditable\"\n (controlValueChange)=\"controlValueChange.emit($event)\"\n [horizontal]=\"horizontal\"\n [formGroup]=\"formGroup\"></teta-property-grid-item>\n </ng-container>\n <ng-container *ngIf=\"col.columns?.length > 0\">\n <teta-property-grid-group [dict]=\"dict\"\n [column]=\"col\"\n [hideNonEditable]=\"hideNonEditable\"\n [horizontal]=\"horizontal\"\n (controlValueChange)=\"controlValueChange.emit($event)\"\n [formGroup]=\"formGroup\"></teta-property-grid-group>\n </ng-container>\n</ng-container>\n", styles: [""], components: [{ type: PropertyGridItemComponent, selector: "teta-property-grid-item", inputs: ["column", "hideNonEditable", "dict", "formGroup", "horizontal"], outputs: ["controlValueChange"] }, { type: PropertyGridGroupComponent, selector: "teta-property-grid-group", inputs: ["column", "hideNonEditable", "dict", "formGroup", "horizontal"], outputs: ["controlValueChange"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
|
|
6316
6419
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridGroupComponent, decorators: [{
|
|
6317
6420
|
type: Component,
|
|
6318
6421
|
args: [{ selector: 'teta-property-grid-group', template: "<div class=\"font-title-3\">{{column.caption}}</div>\n<ng-container *ngFor=\"let col of column.columns\">\n <ng-container *ngIf=\"col.columns?.length < 1\">\n <teta-property-grid-item *ngIf=\"column.editable || !hideNonEditable\"\n [dict]=\"dict\"\n [column]=\"col\"\n [hideNonEditable]=\"hideNonEditable\"\n (controlValueChange)=\"controlValueChange.emit($event)\"\n [horizontal]=\"horizontal\"\n [formGroup]=\"formGroup\"></teta-property-grid-item>\n </ng-container>\n <ng-container *ngIf=\"col.columns?.length > 0\">\n <teta-property-grid-group [dict]=\"dict\"\n [column]=\"col\"\n [hideNonEditable]=\"hideNonEditable\"\n [horizontal]=\"horizontal\"\n (controlValueChange)=\"controlValueChange.emit($event)\"\n [formGroup]=\"formGroup\"></teta-property-grid-group>\n </ng-container>\n</ng-container>\n", styles: [""] }]
|
|
@@ -6366,7 +6469,7 @@ class PropertyGridComponent {
|
|
|
6366
6469
|
}
|
|
6367
6470
|
}
|
|
6368
6471
|
PropertyGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6369
|
-
PropertyGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: PropertyGridComponent, selector: "teta-property-grid", inputs: { hideNonEditable: "hideNonEditable", columns: "columns", dict: "dict", formGroup: "formGroup", horizontal: "horizontal" }, outputs: { controlValueChange: "controlValueChange" }, host: { properties: { "class.form-container": "this.formClass" } }, ngImport: i0, template: "<ng-container *ngIf=\"columns?.length\">\n <ng-container *ngFor=\"let column of columns\">\n <teta-property-grid-item *ngIf=\"column.columns?.length < 1 && (column.editable || !hideNonEditable)\"\n [dict]=\"dict\"\n [column]=\"column\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal\"\n (controlValueChange)=\"onControlValueChange($event)\"\n [hideNonEditable]=\"hideNonEditable\"></teta-property-grid-item>\n <teta-property-grid-group *ngIf=\"column.columns?.length > 0\"\n [dict]=\"dict\"\n [column]=\"column\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal\"\n (controlValueChange)=\"onControlValueChange($event)\"\n [hideNonEditable]=\"hideNonEditable\"></teta-property-grid-group>\n </ng-container>\n</ng-container>\n", styles: [":host{padding:12px 8px}\n"], components: [{ type: PropertyGridItemComponent, selector: "teta-property-grid-item", inputs: ["column", "hideNonEditable", "dict", "formGroup", "horizontal"], outputs: ["controlValueChange"] }, { type: PropertyGridGroupComponent, selector: "teta-property-grid-group", inputs: ["column", "hideNonEditable", "dict", "formGroup", "horizontal"], outputs: ["controlValueChange"] }], directives: [{ type:
|
|
6472
|
+
PropertyGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: PropertyGridComponent, selector: "teta-property-grid", inputs: { hideNonEditable: "hideNonEditable", columns: "columns", dict: "dict", formGroup: "formGroup", horizontal: "horizontal" }, outputs: { controlValueChange: "controlValueChange" }, host: { properties: { "class.form-container": "this.formClass" } }, ngImport: i0, template: "<ng-container *ngIf=\"columns?.length\">\n <ng-container *ngFor=\"let column of columns\">\n <teta-property-grid-item *ngIf=\"column.columns?.length < 1 && (column.editable || !hideNonEditable)\"\n [dict]=\"dict\"\n [column]=\"column\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal\"\n (controlValueChange)=\"onControlValueChange($event)\"\n [hideNonEditable]=\"hideNonEditable\"></teta-property-grid-item>\n <teta-property-grid-group *ngIf=\"column.columns?.length > 0\"\n [dict]=\"dict\"\n [column]=\"column\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal\"\n (controlValueChange)=\"onControlValueChange($event)\"\n [hideNonEditable]=\"hideNonEditable\"></teta-property-grid-group>\n </ng-container>\n</ng-container>\n", styles: [":host{padding:12px 8px}\n"], components: [{ type: PropertyGridItemComponent, selector: "teta-property-grid-item", inputs: ["column", "hideNonEditable", "dict", "formGroup", "horizontal"], outputs: ["controlValueChange"] }, { type: PropertyGridGroupComponent, selector: "teta-property-grid-group", inputs: ["column", "hideNonEditable", "dict", "formGroup", "horizontal"], outputs: ["controlValueChange"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
|
|
6370
6473
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridComponent, decorators: [{
|
|
6371
6474
|
type: Component,
|
|
6372
6475
|
args: [{ selector: 'teta-property-grid', template: "<ng-container *ngIf=\"columns?.length\">\n <ng-container *ngFor=\"let column of columns\">\n <teta-property-grid-item *ngIf=\"column.columns?.length < 1 && (column.editable || !hideNonEditable)\"\n [dict]=\"dict\"\n [column]=\"column\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal\"\n (controlValueChange)=\"onControlValueChange($event)\"\n [hideNonEditable]=\"hideNonEditable\"></teta-property-grid-item>\n <teta-property-grid-group *ngIf=\"column.columns?.length > 0\"\n [dict]=\"dict\"\n [column]=\"column\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal\"\n (controlValueChange)=\"onControlValueChange($event)\"\n [hideNonEditable]=\"hideNonEditable\"></teta-property-grid-group>\n </ng-container>\n</ng-container>\n", styles: [":host{padding:12px 8px}\n"] }]
|
|
@@ -6604,7 +6707,7 @@ class SidebarComponent {
|
|
|
6604
6707
|
ngOnInit() { }
|
|
6605
6708
|
}
|
|
6606
6709
|
SidebarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6607
|
-
SidebarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: SidebarComponent, selector: "teta-sidebar", inputs: { position: "position", backdrop: "backdrop", open: "open", className: "className" }, outputs: { openChange: "openChange" }, host: { properties: { "style.z-index": "this.zIndex" } }, ngImport: i0, template: "<div *ngIf=\"backdrop && open\"\n [@sidebar]\n (click)=\"setOpen(false)\"\n class=\"sidebar-backdrop\"></div>\n<div class=\"sidebar\"\n [@sidebar]\n [ngClass]=\"className\"\n [class.sidebar-top]=\"position === sidebarPosition.top\"\n [class.sidebar-bottom]=\"position === sidebarPosition.bottom\"\n [class.sidebar-left]=\"position === sidebarPosition.left\"\n [class.sidebar-right]=\"position === sidebarPosition.right\"\n *ngIf=\"open\">\n <ng-content></ng-content>\n</div>\n", styles: [""], directives: [{ type:
|
|
6710
|
+
SidebarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: SidebarComponent, selector: "teta-sidebar", inputs: { position: "position", backdrop: "backdrop", open: "open", className: "className" }, outputs: { openChange: "openChange" }, host: { properties: { "style.z-index": "this.zIndex" } }, ngImport: i0, template: "<div *ngIf=\"backdrop && open\"\n [@sidebar]\n (click)=\"setOpen(false)\"\n class=\"sidebar-backdrop\"></div>\n<div class=\"sidebar\"\n [@sidebar]\n [ngClass]=\"className\"\n [class.sidebar-top]=\"position === sidebarPosition.top\"\n [class.sidebar-bottom]=\"position === sidebarPosition.bottom\"\n [class.sidebar-left]=\"position === sidebarPosition.left\"\n [class.sidebar-right]=\"position === sidebarPosition.right\"\n *ngIf=\"open\">\n <ng-content></ng-content>\n</div>\n", styles: [""], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [
|
|
6608
6711
|
trigger('sidebar', [
|
|
6609
6712
|
transition('void => *', [
|
|
6610
6713
|
style({ opacity: '0' }),
|
|
@@ -6998,6 +7101,25 @@ class StateUtil {
|
|
|
6998
7101
|
}
|
|
6999
7102
|
return new FilterState(state);
|
|
7000
7103
|
}
|
|
7104
|
+
static sortAsc(sortEvent, state) {
|
|
7105
|
+
return StateUtil.sort(sortEvent, state, true);
|
|
7106
|
+
}
|
|
7107
|
+
static sortDesc(sortEvent, state) {
|
|
7108
|
+
return StateUtil.sort(sortEvent, state, false);
|
|
7109
|
+
}
|
|
7110
|
+
static sort(sortEvent, state, asc) {
|
|
7111
|
+
const column = sortEvent.column;
|
|
7112
|
+
const shiftKey = sortEvent.shiftKey;
|
|
7113
|
+
const sort = state.sortParams.find((sortParam) => sortParam.field === column.sortField);
|
|
7114
|
+
if (sort) {
|
|
7115
|
+
state.sortParams = StateUtil.clearSortParam(sort, state.sortParams);
|
|
7116
|
+
}
|
|
7117
|
+
if (!shiftKey) {
|
|
7118
|
+
state.sortParams.length = 0;
|
|
7119
|
+
}
|
|
7120
|
+
state.sortParams.push(new SortParam({ field: column.sortField, asc: asc, order: 0 }));
|
|
7121
|
+
return new FilterState(state);
|
|
7122
|
+
}
|
|
7001
7123
|
static clearSortParam(sort, sortParams) {
|
|
7002
7124
|
const index = sortParams.indexOf(sort);
|
|
7003
7125
|
sortParams.splice(index, 1);
|
|
@@ -7020,6 +7142,20 @@ var SelectType;
|
|
|
7020
7142
|
SelectType[SelectType["single"] = 2] = "single";
|
|
7021
7143
|
})(SelectType || (SelectType = {}));
|
|
7022
7144
|
|
|
7145
|
+
var EditType;
|
|
7146
|
+
(function (EditType) {
|
|
7147
|
+
EditType[EditType["none"] = 0] = "none";
|
|
7148
|
+
EditType[EditType["cell"] = 1] = "cell";
|
|
7149
|
+
EditType[EditType["row"] = 2] = "row";
|
|
7150
|
+
})(EditType || (EditType = {}));
|
|
7151
|
+
|
|
7152
|
+
var EditEvent;
|
|
7153
|
+
(function (EditEvent) {
|
|
7154
|
+
EditEvent[EditEvent["click"] = 0] = "click";
|
|
7155
|
+
EditEvent[EditEvent["focus"] = 1] = "focus";
|
|
7156
|
+
EditEvent[EditEvent["doubleClick"] = 2] = "doubleClick";
|
|
7157
|
+
})(EditEvent || (EditEvent = {}));
|
|
7158
|
+
|
|
7023
7159
|
class TableColumnStore {
|
|
7024
7160
|
constructor(options) {
|
|
7025
7161
|
var _a;
|
|
@@ -7035,12 +7171,17 @@ class TableColumnStore {
|
|
|
7035
7171
|
|
|
7036
7172
|
class TableService {
|
|
7037
7173
|
constructor() {
|
|
7174
|
+
this.selectType = SelectType.multiple;
|
|
7175
|
+
this.editType = EditType.cell;
|
|
7176
|
+
this.editEvent = EditEvent.doubleClick;
|
|
7177
|
+
this.trackRow = (index, row) => index;
|
|
7038
7178
|
this.initialColumns = [];
|
|
7039
7179
|
this.displayColumns = [];
|
|
7040
7180
|
this._columns = new BehaviorSubject([]);
|
|
7041
|
-
this.
|
|
7181
|
+
this._hiddenColumns = new BehaviorSubject([]);
|
|
7042
7182
|
this._displayData = new BehaviorSubject([]);
|
|
7043
7183
|
this._dict = new BehaviorSubject({});
|
|
7184
|
+
this._filterOptions = new BehaviorSubject({});
|
|
7044
7185
|
this._state = new BehaviorSubject(new FilterState());
|
|
7045
7186
|
this._editRowStart = new Subject();
|
|
7046
7187
|
this._editRowStop = new Subject();
|
|
@@ -7053,11 +7194,11 @@ class TableService {
|
|
|
7053
7194
|
this._groupToggle = new Subject();
|
|
7054
7195
|
this._selectedRows = new BehaviorSubject([]);
|
|
7055
7196
|
this._activeRow = new BehaviorSubject(null);
|
|
7056
|
-
this._hiddenColumns = new BehaviorSubject([]);
|
|
7057
7197
|
this._scrollIndex = new Subject();
|
|
7058
7198
|
this.columns = this._columns.asObservable();
|
|
7059
7199
|
this.displayData = this._displayData.asObservable();
|
|
7060
7200
|
this.dict = this._dict.asObservable();
|
|
7201
|
+
this.filterOptions = this._filterOptions.asObservable();
|
|
7061
7202
|
this.state = this._state.asObservable();
|
|
7062
7203
|
this.editRowStart = this._editRowStart.asObservable();
|
|
7063
7204
|
this.editRowStop = this._editRowStop.asObservable();
|
|
@@ -7073,17 +7214,21 @@ class TableService {
|
|
|
7073
7214
|
this.hiddenColumns = this._hiddenColumns.asObservable();
|
|
7074
7215
|
this.scrollIndex = this._scrollIndex.asObservable();
|
|
7075
7216
|
}
|
|
7076
|
-
// cellEditable: boolean | ((row: ICellCoordinates<T>) => boolean);
|
|
7077
7217
|
get dragSource() {
|
|
7078
7218
|
return this._dragSource;
|
|
7079
7219
|
}
|
|
7220
|
+
get currentEditCell() {
|
|
7221
|
+
return this._currentEditCell;
|
|
7222
|
+
}
|
|
7080
7223
|
setData(data) {
|
|
7081
|
-
this.
|
|
7082
|
-
this._displayData.next(this.initialData);
|
|
7224
|
+
this._displayData.next(data === null || data === void 0 ? void 0 : data.map((_) => new TableRow(_)));
|
|
7083
7225
|
}
|
|
7084
7226
|
setDict(dict) {
|
|
7085
7227
|
this._dict.next(dict);
|
|
7086
7228
|
}
|
|
7229
|
+
setFilterOptions(filterOptions) {
|
|
7230
|
+
this._filterOptions.next(filterOptions);
|
|
7231
|
+
}
|
|
7087
7232
|
setColumns(columns) {
|
|
7088
7233
|
this.initialColumns = columns ? columns.map((_) => new TableColumn(_)) : [];
|
|
7089
7234
|
this.initialColumnsHash = hash__default(this.initialColumns, {
|
|
@@ -7172,9 +7317,14 @@ class TableService {
|
|
|
7172
7317
|
const hiddenColumns = localStorage.getItem(this._hiddenCookieName) || '[]';
|
|
7173
7318
|
this._hiddenColumns.next(JSON.parse(hiddenColumns));
|
|
7174
7319
|
}
|
|
7175
|
-
|
|
7320
|
+
sortAsc(sortEvent) {
|
|
7176
7321
|
if (sortEvent.column.sortable) {
|
|
7177
|
-
this.setState(StateUtil.
|
|
7322
|
+
this.setState(StateUtil.sortAsc(sortEvent, this._state.value));
|
|
7323
|
+
}
|
|
7324
|
+
}
|
|
7325
|
+
sortDesc(sortEvent) {
|
|
7326
|
+
if (sortEvent.column.sortable) {
|
|
7327
|
+
this.setState(StateUtil.sortDesc(sortEvent, this._state.value));
|
|
7178
7328
|
}
|
|
7179
7329
|
}
|
|
7180
7330
|
clearSort(column) {
|
|
@@ -7293,35 +7443,42 @@ class TableService {
|
|
|
7293
7443
|
}
|
|
7294
7444
|
}
|
|
7295
7445
|
}
|
|
7296
|
-
startEditRow(
|
|
7446
|
+
startEditRow(cellEvent) {
|
|
7297
7447
|
var _a;
|
|
7298
|
-
if (((_a = this.
|
|
7299
|
-
if (this.
|
|
7300
|
-
|
|
7301
|
-
this._editRowStop.next(this._currentEditRow);
|
|
7448
|
+
if (((_a = this._currentEditCell) === null || _a === void 0 ? void 0 : _a.row) !== (cellEvent === null || cellEvent === void 0 ? void 0 : cellEvent.row)) {
|
|
7449
|
+
if (this._currentEditCell != null) {
|
|
7450
|
+
this._editRowStop.next(this._currentEditCell);
|
|
7302
7451
|
}
|
|
7303
|
-
if (
|
|
7304
|
-
this._editRowStart.next(
|
|
7305
|
-
this.
|
|
7452
|
+
if (cellEvent === null) {
|
|
7453
|
+
this._editRowStart.next(cellEvent);
|
|
7454
|
+
this._currentEditCell = cellEvent;
|
|
7306
7455
|
}
|
|
7307
7456
|
else {
|
|
7308
|
-
if (this.boolOrFuncCallback(this.rowEditable)(
|
|
7309
|
-
this._editRowStart.next(
|
|
7310
|
-
this.
|
|
7457
|
+
if (this.boolOrFuncCallback(this.rowEditable)(this.getRowByIndex(cellEvent === null || cellEvent === void 0 ? void 0 : cellEvent.row))) {
|
|
7458
|
+
this._editRowStart.next(cellEvent);
|
|
7459
|
+
this._currentEditCell = cellEvent;
|
|
7311
7460
|
}
|
|
7312
7461
|
}
|
|
7313
7462
|
}
|
|
7314
7463
|
}
|
|
7315
|
-
startEditCell(
|
|
7316
|
-
var _a, _b;
|
|
7317
|
-
if (((_a = this._currentEditCell) === null || _a === void 0 ? void 0 : _a.column
|
|
7318
|
-
((_b = this._currentEditCell) === null || _b === void 0 ? void 0 : _b.row) !== (
|
|
7464
|
+
startEditCell(cellEvent) {
|
|
7465
|
+
var _a, _b, _c;
|
|
7466
|
+
if (((_a = this._currentEditCell) === null || _a === void 0 ? void 0 : _a.column) !== (cellEvent === null || cellEvent === void 0 ? void 0 : cellEvent.column) ||
|
|
7467
|
+
((_b = this._currentEditCell) === null || _b === void 0 ? void 0 : _b.row) !== (cellEvent === null || cellEvent === void 0 ? void 0 : cellEvent.row)) {
|
|
7319
7468
|
if (this._currentEditCell != null) {
|
|
7320
7469
|
this._editCellStop.next(this._currentEditCell);
|
|
7321
7470
|
}
|
|
7322
|
-
|
|
7323
|
-
|
|
7324
|
-
this.
|
|
7471
|
+
const column = this.getColumnByName(cellEvent === null || cellEvent === void 0 ? void 0 : cellEvent.column);
|
|
7472
|
+
if (this.boolOrFuncCallback(column === null || column === void 0 ? void 0 : column.editable)({
|
|
7473
|
+
row: this.getRowByIndex(cellEvent === null || cellEvent === void 0 ? void 0 : cellEvent.row),
|
|
7474
|
+
column: column
|
|
7475
|
+
})) {
|
|
7476
|
+
this._editCellStart.next(cellEvent);
|
|
7477
|
+
this._currentEditCell = cellEvent;
|
|
7478
|
+
const key = (_c = cellEvent === null || cellEvent === void 0 ? void 0 : cellEvent.event) === null || _c === void 0 ? void 0 : _c.key;
|
|
7479
|
+
if (key && (key.length === 1 || (key === 'Delete' && !column.required))) {
|
|
7480
|
+
this.clearValue(cellEvent);
|
|
7481
|
+
}
|
|
7325
7482
|
}
|
|
7326
7483
|
}
|
|
7327
7484
|
}
|
|
@@ -7331,6 +7488,46 @@ class TableService {
|
|
|
7331
7488
|
selectRows(rows) {
|
|
7332
7489
|
this._selectedRows.next(rows);
|
|
7333
7490
|
}
|
|
7491
|
+
selectOrDeselectRow(row) {
|
|
7492
|
+
if (this._selectedRows.value.indexOf(row) >= 0) {
|
|
7493
|
+
this._selectedRows.next(this._selectedRows.value.filter((_) => _ !== row));
|
|
7494
|
+
}
|
|
7495
|
+
else {
|
|
7496
|
+
if (this.selectType === SelectType.single) {
|
|
7497
|
+
this._selectedRows.next([row]);
|
|
7498
|
+
}
|
|
7499
|
+
else {
|
|
7500
|
+
this._selectedRows.next([...this._selectedRows.value, row]);
|
|
7501
|
+
}
|
|
7502
|
+
}
|
|
7503
|
+
}
|
|
7504
|
+
selectRange(row) {
|
|
7505
|
+
const index = this._displayData.value.indexOf(row);
|
|
7506
|
+
let minIndex = this._selectedRows.value.reduce((prev, curr) => {
|
|
7507
|
+
const newIndex = this._displayData.value.indexOf(curr);
|
|
7508
|
+
if (newIndex < prev) {
|
|
7509
|
+
return newIndex;
|
|
7510
|
+
}
|
|
7511
|
+
return prev;
|
|
7512
|
+
}, this._displayData.value.length);
|
|
7513
|
+
let maxIndex = this._selectedRows.value.reduce((prev, curr) => {
|
|
7514
|
+
const newIndex = this._displayData.value.indexOf(curr);
|
|
7515
|
+
if (newIndex > prev) {
|
|
7516
|
+
return newIndex;
|
|
7517
|
+
}
|
|
7518
|
+
return prev;
|
|
7519
|
+
}, 0);
|
|
7520
|
+
if (index > maxIndex) {
|
|
7521
|
+
maxIndex = index;
|
|
7522
|
+
}
|
|
7523
|
+
if (index < minIndex) {
|
|
7524
|
+
minIndex = index;
|
|
7525
|
+
}
|
|
7526
|
+
if (minIndex < index && index < maxIndex) {
|
|
7527
|
+
maxIndex = index;
|
|
7528
|
+
}
|
|
7529
|
+
this._selectedRows.next([...this._displayData.value.slice(minIndex, maxIndex + 1)]);
|
|
7530
|
+
}
|
|
7334
7531
|
selectRow(row) {
|
|
7335
7532
|
if (this.selectType === SelectType.none) {
|
|
7336
7533
|
return;
|
|
@@ -7386,10 +7583,118 @@ class TableService {
|
|
|
7386
7583
|
this._valueChanged.next(coordinates);
|
|
7387
7584
|
}
|
|
7388
7585
|
setValue(cellValue) {
|
|
7389
|
-
|
|
7586
|
+
let value;
|
|
7587
|
+
if (typeof cellValue.row === 'object' && typeof cellValue.column === 'object') {
|
|
7588
|
+
value = {
|
|
7589
|
+
row: this.getRowIndex(cellValue.row),
|
|
7590
|
+
column: cellValue.column.name,
|
|
7591
|
+
value: cellValue.value
|
|
7592
|
+
};
|
|
7593
|
+
}
|
|
7594
|
+
else {
|
|
7595
|
+
value = cellValue;
|
|
7596
|
+
}
|
|
7597
|
+
this._valueSet.next(value);
|
|
7390
7598
|
}
|
|
7391
7599
|
getRowByIndex(rowIndex) {
|
|
7392
|
-
return this._displayData.value[
|
|
7600
|
+
return this._displayData.value[rowIndex];
|
|
7601
|
+
}
|
|
7602
|
+
getRowIndex(row) {
|
|
7603
|
+
return this._displayData.value.indexOf(row);
|
|
7604
|
+
}
|
|
7605
|
+
getNextEditableCell(coords) {
|
|
7606
|
+
const nextCell = this.getNextCell(coords);
|
|
7607
|
+
if (!nextCell) {
|
|
7608
|
+
return null;
|
|
7609
|
+
}
|
|
7610
|
+
const column = this.getColumnByName(nextCell === null || nextCell === void 0 ? void 0 : nextCell.column);
|
|
7611
|
+
if (this.boolOrFuncCallback(column.editable)({
|
|
7612
|
+
row: this.getRowByIndex(nextCell.row),
|
|
7613
|
+
column
|
|
7614
|
+
})) {
|
|
7615
|
+
return nextCell;
|
|
7616
|
+
}
|
|
7617
|
+
return this.getNextEditableCell(nextCell);
|
|
7618
|
+
}
|
|
7619
|
+
getPreviousEditableCell(coords) {
|
|
7620
|
+
const prevCell = this.getPreviousCell(coords);
|
|
7621
|
+
if (!prevCell) {
|
|
7622
|
+
return null;
|
|
7623
|
+
}
|
|
7624
|
+
const column = this.getColumnByName(prevCell === null || prevCell === void 0 ? void 0 : prevCell.column);
|
|
7625
|
+
if (this.boolOrFuncCallback(column.editable)({
|
|
7626
|
+
row: this.getRowByIndex(prevCell.row),
|
|
7627
|
+
column
|
|
7628
|
+
})) {
|
|
7629
|
+
return prevCell;
|
|
7630
|
+
}
|
|
7631
|
+
return this.getPreviousEditableCell(prevCell);
|
|
7632
|
+
}
|
|
7633
|
+
getNextCell(coords) {
|
|
7634
|
+
var _a;
|
|
7635
|
+
const columns = this.getFlatColumns();
|
|
7636
|
+
let colIndex = columns.findIndex((col) => col.name === (coords === null || coords === void 0 ? void 0 : coords.column));
|
|
7637
|
+
let rowIndex = coords === null || coords === void 0 ? void 0 : coords.row;
|
|
7638
|
+
if (colIndex >= 0 && rowIndex >= 0) {
|
|
7639
|
+
if (colIndex === columns.length - 1) {
|
|
7640
|
+
colIndex = 0;
|
|
7641
|
+
rowIndex = rowIndex + 1;
|
|
7642
|
+
}
|
|
7643
|
+
else {
|
|
7644
|
+
colIndex = colIndex + 1;
|
|
7645
|
+
}
|
|
7646
|
+
return {
|
|
7647
|
+
column: (_a = columns[colIndex]) === null || _a === void 0 ? void 0 : _a.name,
|
|
7648
|
+
row: rowIndex
|
|
7649
|
+
};
|
|
7650
|
+
}
|
|
7651
|
+
return null;
|
|
7652
|
+
}
|
|
7653
|
+
getPreviousCell(coords) {
|
|
7654
|
+
var _a;
|
|
7655
|
+
const columns = this.getFlatColumns();
|
|
7656
|
+
let colIndex = columns.findIndex((col) => col.name === (coords === null || coords === void 0 ? void 0 : coords.column));
|
|
7657
|
+
let rowIndex = coords === null || coords === void 0 ? void 0 : coords.row;
|
|
7658
|
+
if (colIndex >= 0 && rowIndex >= 0) {
|
|
7659
|
+
if (colIndex === 0) {
|
|
7660
|
+
colIndex = columns.length - 1;
|
|
7661
|
+
rowIndex = rowIndex - 1;
|
|
7662
|
+
}
|
|
7663
|
+
else {
|
|
7664
|
+
colIndex = colIndex - 1;
|
|
7665
|
+
}
|
|
7666
|
+
return {
|
|
7667
|
+
column: (_a = columns[colIndex]) === null || _a === void 0 ? void 0 : _a.name,
|
|
7668
|
+
row: rowIndex
|
|
7669
|
+
};
|
|
7670
|
+
}
|
|
7671
|
+
return null;
|
|
7672
|
+
}
|
|
7673
|
+
getNextRowCell(coords) {
|
|
7674
|
+
var _a;
|
|
7675
|
+
const columns = this.getFlatColumns();
|
|
7676
|
+
let colIndex = columns.findIndex((col) => col.name === (coords === null || coords === void 0 ? void 0 : coords.column));
|
|
7677
|
+
let rowIndex = coords === null || coords === void 0 ? void 0 : coords.row;
|
|
7678
|
+
if (colIndex >= 0 && rowIndex >= 0 && rowIndex < this._displayData.value.length - 1) {
|
|
7679
|
+
return {
|
|
7680
|
+
column: (_a = columns[colIndex]) === null || _a === void 0 ? void 0 : _a.name,
|
|
7681
|
+
row: rowIndex + 1
|
|
7682
|
+
};
|
|
7683
|
+
}
|
|
7684
|
+
return null;
|
|
7685
|
+
}
|
|
7686
|
+
getPreviousRowCell(coords) {
|
|
7687
|
+
var _a;
|
|
7688
|
+
const columns = this.getFlatColumns();
|
|
7689
|
+
let colIndex = columns.findIndex((col) => col.name === (coords === null || coords === void 0 ? void 0 : coords.column));
|
|
7690
|
+
let rowIndex = coords === null || coords === void 0 ? void 0 : coords.row;
|
|
7691
|
+
if (colIndex >= 0 && rowIndex > 1) {
|
|
7692
|
+
return {
|
|
7693
|
+
column: (_a = columns[colIndex]) === null || _a === void 0 ? void 0 : _a.name,
|
|
7694
|
+
row: rowIndex - 1
|
|
7695
|
+
};
|
|
7696
|
+
}
|
|
7697
|
+
return null;
|
|
7393
7698
|
}
|
|
7394
7699
|
getColumnByName(columnName) {
|
|
7395
7700
|
return ArrayUtil.findRecursive(this.displayColumns, (iterableNode) => columnName === iterableNode.name, 'columns');
|
|
@@ -7409,6 +7714,19 @@ class TableService {
|
|
|
7409
7714
|
return true;
|
|
7410
7715
|
};
|
|
7411
7716
|
}
|
|
7717
|
+
getVisibleColumns() {
|
|
7718
|
+
const visible = ArrayUtil.flatten(this._columns.value, 'columns', true).filter((_) => this._hiddenColumns.value.indexOf(_.name) < 0);
|
|
7719
|
+
return visible.sort((a, b) => Number(b.locked) - Number(a.locked));
|
|
7720
|
+
}
|
|
7721
|
+
getCellInstance(coords) {
|
|
7722
|
+
return coords ? {
|
|
7723
|
+
row: this.getRowByIndex(coords.row),
|
|
7724
|
+
column: this.getColumnByName(coords.column)
|
|
7725
|
+
} : null;
|
|
7726
|
+
}
|
|
7727
|
+
getFlatColumns() {
|
|
7728
|
+
return ArrayUtil.flatten(this.displayColumns, 'columns', true).sort((a, b) => Number(b.locked) - Number(a.locked));
|
|
7729
|
+
}
|
|
7412
7730
|
findParent(column, columns) {
|
|
7413
7731
|
const found = columns.find((x) => x.name === column.name);
|
|
7414
7732
|
if (found !== null && found !== undefined) {
|
|
@@ -7442,6 +7760,9 @@ class TableService {
|
|
|
7442
7760
|
column.flex = 0;
|
|
7443
7761
|
column.width = maxWidth + 20;
|
|
7444
7762
|
}
|
|
7763
|
+
clearValue(event) {
|
|
7764
|
+
this.setValue(Object.assign(Object.assign({}, event), { value: null }));
|
|
7765
|
+
}
|
|
7445
7766
|
}
|
|
7446
7767
|
TableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7447
7768
|
TableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableService, providedIn: 'root' });
|
|
@@ -7472,35 +7793,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
7472
7793
|
type: Input
|
|
7473
7794
|
}] } });
|
|
7474
7795
|
|
|
7475
|
-
|
|
7476
|
-
(
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
(
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
class TableContextMenuConfig {
|
|
7489
|
-
constructor(options) {
|
|
7490
|
-
this.contextMenu = true;
|
|
7491
|
-
this.copy = true;
|
|
7492
|
-
this.delete = true;
|
|
7493
|
-
this.add = true;
|
|
7494
|
-
this.paste = true;
|
|
7495
|
-
if (options) {
|
|
7496
|
-
this.contextMenu = options === null || options === void 0 ? void 0 : options.contextMenu;
|
|
7497
|
-
this.copy = options === null || options === void 0 ? void 0 : options.copy;
|
|
7498
|
-
this.delete = options === null || options === void 0 ? void 0 : options.delete;
|
|
7499
|
-
this.add = options === null || options === void 0 ? void 0 : options.add;
|
|
7500
|
-
this.paste = options === null || options === void 0 ? void 0 : options.paste;
|
|
7796
|
+
class SelectionHeadCellComponent {
|
|
7797
|
+
constructor(_svc, _cdr) {
|
|
7798
|
+
this._svc = _svc;
|
|
7799
|
+
this._cdr = _cdr;
|
|
7800
|
+
this.tableCellClass = true;
|
|
7801
|
+
this._alive = true;
|
|
7802
|
+
}
|
|
7803
|
+
selectAll(value) {
|
|
7804
|
+
if (value) {
|
|
7805
|
+
this._svc.selectAll();
|
|
7806
|
+
}
|
|
7807
|
+
else {
|
|
7808
|
+
this._svc.deselectAll();
|
|
7501
7809
|
}
|
|
7502
7810
|
}
|
|
7811
|
+
allSelected() {
|
|
7812
|
+
return this._svc.allRowsSelected();
|
|
7813
|
+
}
|
|
7814
|
+
ngOnInit() {
|
|
7815
|
+
this._svc.selectedRows
|
|
7816
|
+
.pipe(takeWhile((_) => this._alive))
|
|
7817
|
+
.subscribe((_) => {
|
|
7818
|
+
this._cdr.markForCheck();
|
|
7819
|
+
});
|
|
7820
|
+
}
|
|
7821
|
+
ngOnDestroy() {
|
|
7822
|
+
this._alive = false;
|
|
7823
|
+
}
|
|
7503
7824
|
}
|
|
7825
|
+
SelectionHeadCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SelectionHeadCellComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
7826
|
+
SelectionHeadCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: SelectionHeadCellComponent, selector: "teta-selection-head-cell", host: { properties: { "class.table-head__group": "this.tableCellClass" } }, ngImport: i0, template: "<teta-checkbox [binary]=\"true\"\n [allowNull]=\"true\"\n [noLabel]=\"true\"\n [ngModel]=\"allSelected()\"\n (ngModelChange)=\"selectAll($event)\"></teta-checkbox>\n", styles: [":host{display:flex;align-items:center;justify-content:center}\n"], components: [{ type: CheckboxComponent, selector: "teta-checkbox", inputs: ["class", "palette", "noLabel", "disabled", "value", "binary", "allowNull"] }], directives: [{ type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7827
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SelectionHeadCellComponent, decorators: [{
|
|
7828
|
+
type: Component,
|
|
7829
|
+
args: [{ selector: 'teta-selection-head-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<teta-checkbox [binary]=\"true\"\n [allowNull]=\"true\"\n [noLabel]=\"true\"\n [ngModel]=\"allSelected()\"\n (ngModelChange)=\"selectAll($event)\"></teta-checkbox>\n", styles: [":host{display:flex;align-items:center;justify-content:center}\n"] }]
|
|
7830
|
+
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { tableCellClass: [{
|
|
7831
|
+
type: HostBinding,
|
|
7832
|
+
args: ['class.table-head__group']
|
|
7833
|
+
}] } });
|
|
7504
7834
|
|
|
7505
7835
|
class TableUtil {
|
|
7506
7836
|
static getColumnLeaves(column) {
|
|
@@ -7510,10 +7840,6 @@ class TableUtil {
|
|
|
7510
7840
|
}
|
|
7511
7841
|
return null;
|
|
7512
7842
|
}
|
|
7513
|
-
static getGridTemplateColumns(columns) {
|
|
7514
|
-
const res = columns === null || columns === void 0 ? void 0 : columns.map((column) => column.flex > 0 ? `minmax(${column.width}px, ${column.flex}fr)` : `${column.width}px`).join(' ');
|
|
7515
|
-
return res;
|
|
7516
|
-
}
|
|
7517
7843
|
static getData(data, state) {
|
|
7518
7844
|
let result = data;
|
|
7519
7845
|
result = TableUtil.filterData(result, state);
|
|
@@ -7565,17 +7891,18 @@ class TableUtil {
|
|
|
7565
7891
|
return data;
|
|
7566
7892
|
}
|
|
7567
7893
|
const filterString = (row) => {
|
|
7894
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
7568
7895
|
const item = row;
|
|
7569
7896
|
if (filter.type === StringFilterType.EndsWith) {
|
|
7570
|
-
return item[filter.field].endsWith(filter.value);
|
|
7897
|
+
return (_a = item[filter.field]) === null || _a === void 0 ? void 0 : _a.toLowerCase().endsWith((_b = filter.value) === null || _b === void 0 ? void 0 : _b.toLowerCase());
|
|
7571
7898
|
}
|
|
7572
7899
|
if (filter.type === StringFilterType.Equals) {
|
|
7573
|
-
return item[filter.field] === filter.value;
|
|
7900
|
+
return ((_c = item[filter.field]) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === ((_d = filter.value) === null || _d === void 0 ? void 0 : _d.toLowerCase());
|
|
7574
7901
|
}
|
|
7575
7902
|
if (filter.type === StringFilterType.StartsWith) {
|
|
7576
|
-
return item[filter.field].startsWith(filter.value);
|
|
7903
|
+
return (_e = item[filter.field]) === null || _e === void 0 ? void 0 : _e.toLowerCase().startsWith((_f = filter.value) === null || _f === void 0 ? void 0 : _f.toLowerCase());
|
|
7577
7904
|
}
|
|
7578
|
-
return item[filter.field].indexOf(filter.value) >= 0;
|
|
7905
|
+
return ((_g = item[filter.field]) === null || _g === void 0 ? void 0 : _g.toLowerCase().indexOf((_h = filter.value) === null || _h === void 0 ? void 0 : _h.toLowerCase())) >= 0;
|
|
7579
7906
|
};
|
|
7580
7907
|
return data.filter(filterString);
|
|
7581
7908
|
}
|
|
@@ -7584,10 +7911,10 @@ class TableUtil {
|
|
|
7584
7911
|
const item = row;
|
|
7585
7912
|
return (filter.value.lessThan === null || filter.value.lessThan === undefined
|
|
7586
7913
|
? true
|
|
7587
|
-
: filter.value.lessThan.getTime()
|
|
7914
|
+
: filter.value.lessThan.getTime() >= item[filter.field].getTime()) &&
|
|
7588
7915
|
(filter.value.greaterThan === null || filter.value.greaterThan === undefined
|
|
7589
7916
|
? true
|
|
7590
|
-
: filter.value.greaterThan.getTime()
|
|
7917
|
+
: filter.value.greaterThan.getTime() <= item[filter.field].getTime());
|
|
7591
7918
|
};
|
|
7592
7919
|
return data.filter(filterDate);
|
|
7593
7920
|
}
|
|
@@ -7596,10 +7923,10 @@ class TableUtil {
|
|
|
7596
7923
|
const item = row;
|
|
7597
7924
|
return (filter.value.lessThan === null || filter.value.lessThan === undefined
|
|
7598
7925
|
? true
|
|
7599
|
-
: filter.value.lessThan
|
|
7926
|
+
: filter.value.lessThan >= item[filter.field]) &&
|
|
7600
7927
|
(filter.value.greaterThan === null || filter.value.greaterThan === undefined
|
|
7601
7928
|
? true
|
|
7602
|
-
: filter.value.greaterThan
|
|
7929
|
+
: filter.value.greaterThan <= item[filter.field]) &&
|
|
7603
7930
|
(filter.value.equalsTo === null || filter.value.equalsTo === undefined
|
|
7604
7931
|
? true
|
|
7605
7932
|
: filter.value.equalsTo === item[filter.field]);
|
|
@@ -7621,7 +7948,7 @@ class TableUtil {
|
|
|
7621
7948
|
}
|
|
7622
7949
|
static sort(data, sortParam) {
|
|
7623
7950
|
const res = data.sort(sortParam.asc ? TableUtil.asc(sortParam.field) : TableUtil.desc(sortParam.field));
|
|
7624
|
-
return res;
|
|
7951
|
+
return [...res];
|
|
7625
7952
|
}
|
|
7626
7953
|
static desc(field) {
|
|
7627
7954
|
const res = (a, b) => a[field] > b[field] ? -1 : 1;
|
|
@@ -7633,56 +7960,10 @@ class TableUtil {
|
|
|
7633
7960
|
}
|
|
7634
7961
|
}
|
|
7635
7962
|
|
|
7636
|
-
class
|
|
7637
|
-
constructor(
|
|
7638
|
-
this.
|
|
7639
|
-
this.
|
|
7640
|
-
this.tableCellClass = true;
|
|
7641
|
-
this._alive = true;
|
|
7642
|
-
}
|
|
7643
|
-
selectAll(value) {
|
|
7644
|
-
if (value) {
|
|
7645
|
-
this._svc.selectAll();
|
|
7646
|
-
}
|
|
7647
|
-
else {
|
|
7648
|
-
this._svc.deselectAll();
|
|
7649
|
-
}
|
|
7650
|
-
}
|
|
7651
|
-
allSelected() {
|
|
7652
|
-
return this._svc.allRowsSelected();
|
|
7653
|
-
}
|
|
7654
|
-
ngOnInit() {
|
|
7655
|
-
this._svc.selectedRows
|
|
7656
|
-
.pipe(takeWhile((_) => this._alive))
|
|
7657
|
-
.subscribe((_) => {
|
|
7658
|
-
this._cdr.markForCheck();
|
|
7659
|
-
});
|
|
7660
|
-
}
|
|
7661
|
-
ngOnDestroy() {
|
|
7662
|
-
this._alive = false;
|
|
7663
|
-
}
|
|
7664
|
-
}
|
|
7665
|
-
SelectionHeadCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SelectionHeadCellComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
7666
|
-
SelectionHeadCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: SelectionHeadCellComponent, selector: "teta-selection-head-cell", host: { properties: { "class.table-head__group": "this.tableCellClass" } }, ngImport: i0, template: "<teta-checkbox [binary]=\"true\"\n [allowNull]=\"true\"\n [noLabel]=\"true\"\n [ngModel]=\"allSelected()\"\n (ngModelChange)=\"selectAll($event)\"></teta-checkbox>\n", styles: [":host{display:flex;align-items:center;justify-content:center}\n"], components: [{ type: CheckboxComponent, selector: "teta-checkbox", inputs: ["class", "palette", "noLabel", "disabled", "value", "binary", "allowNull"] }], directives: [{ type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7667
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SelectionHeadCellComponent, decorators: [{
|
|
7668
|
-
type: Component,
|
|
7669
|
-
args: [{ selector: 'teta-selection-head-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<teta-checkbox [binary]=\"true\"\n [allowNull]=\"true\"\n [noLabel]=\"true\"\n [ngModel]=\"allSelected()\"\n (ngModelChange)=\"selectAll($event)\"></teta-checkbox>\n", styles: [":host{display:flex;align-items:center;justify-content:center}\n"] }]
|
|
7670
|
-
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { tableCellClass: [{
|
|
7671
|
-
type: HostBinding,
|
|
7672
|
-
args: ['class.table-head__group']
|
|
7673
|
-
}] } });
|
|
7674
|
-
|
|
7675
|
-
class ColumnResizeEvent {
|
|
7676
|
-
constructor(column, newWidth) {
|
|
7677
|
-
this.column = column;
|
|
7678
|
-
this.newWidth = newWidth;
|
|
7679
|
-
}
|
|
7680
|
-
}
|
|
7681
|
-
|
|
7682
|
-
class SortEvent {
|
|
7683
|
-
constructor(column, shiftKey) {
|
|
7684
|
-
this.column = column;
|
|
7685
|
-
this.shiftKey = shiftKey;
|
|
7963
|
+
class ColumnResizeEvent {
|
|
7964
|
+
constructor(column, newWidth) {
|
|
7965
|
+
this.column = column;
|
|
7966
|
+
this.newWidth = newWidth;
|
|
7686
7967
|
}
|
|
7687
7968
|
}
|
|
7688
7969
|
|
|
@@ -7713,15 +7994,25 @@ class DefaultHeadCellComponent extends HeadCellComponentBase {
|
|
|
7713
7994
|
get column() {
|
|
7714
7995
|
return this._column;
|
|
7715
7996
|
}
|
|
7716
|
-
|
|
7997
|
+
set data(data) {
|
|
7998
|
+
this._data = data;
|
|
7999
|
+
this._cdr.detectChanges();
|
|
8000
|
+
}
|
|
8001
|
+
get data() {
|
|
8002
|
+
return this._data;
|
|
8003
|
+
}
|
|
8004
|
+
ngOnInit() {
|
|
8005
|
+
}
|
|
7717
8006
|
}
|
|
7718
8007
|
DefaultHeadCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DefaultHeadCellComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
7719
|
-
DefaultHeadCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: DefaultHeadCellComponent, selector: "teta-default-head-cell", inputs: { column: "column" }, usesInheritance: true, ngImport: i0, template: "<div class=\"column column_auto
|
|
8008
|
+
DefaultHeadCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: DefaultHeadCellComponent, selector: "teta-default-head-cell", inputs: { column: "column", data: "data" }, usesInheritance: true, ngImport: i0, template: "<div class=\"column column_auto\" [tetaHint]=\"column.hint || column.caption\">\n <div class=\"table-head__cell__text\">\n {{column.caption}}\n </div>\n <div *ngIf=\"column.unit\" class=\"table-head__cell__text\" style=\"overflow: visible;\">\n [{{column.unit}}]\n </div>\n</div>\n", styles: [":host{align-items:center;justify-content:center;display:flex;min-width:0}\n"], directives: [{ type: HintDirective, selector: "[tetaHint]", inputs: ["tetaHint", "align", "verticalAlign", "delay"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7720
8009
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DefaultHeadCellComponent, decorators: [{
|
|
7721
8010
|
type: Component,
|
|
7722
|
-
args: [{ selector: 'teta-default-head-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"column column_auto
|
|
8011
|
+
args: [{ selector: 'teta-default-head-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"column column_auto\" [tetaHint]=\"column.hint || column.caption\">\n <div class=\"table-head__cell__text\">\n {{column.caption}}\n </div>\n <div *ngIf=\"column.unit\" class=\"table-head__cell__text\" style=\"overflow: visible;\">\n [{{column.unit}}]\n </div>\n</div>\n", styles: [":host{align-items:center;justify-content:center;display:flex;min-width:0}\n"] }]
|
|
7723
8012
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
7724
8013
|
type: Input
|
|
8014
|
+
}], data: [{
|
|
8015
|
+
type: Input
|
|
7725
8016
|
}] } });
|
|
7726
8017
|
|
|
7727
8018
|
class HeadCellHostComponent {
|
|
@@ -7737,6 +8028,15 @@ class HeadCellHostComponent {
|
|
|
7737
8028
|
get column() {
|
|
7738
8029
|
return this._column;
|
|
7739
8030
|
}
|
|
8031
|
+
set data(data) {
|
|
8032
|
+
this._data = data;
|
|
8033
|
+
if (this.init) {
|
|
8034
|
+
this.componentRef.instance.data = this._data;
|
|
8035
|
+
}
|
|
8036
|
+
}
|
|
8037
|
+
get data() {
|
|
8038
|
+
return this._data;
|
|
8039
|
+
}
|
|
7740
8040
|
ngOnInit() {
|
|
7741
8041
|
if (!HeadCellComponentBase.isPrototypeOf(this.column.headCellComponent)) {
|
|
7742
8042
|
this.column.headCellComponent = DefaultHeadCellComponent;
|
|
@@ -7744,18 +8044,28 @@ class HeadCellHostComponent {
|
|
|
7744
8044
|
this.componentRef =
|
|
7745
8045
|
this.viewContainerRef.createComponent(this.column.headCellComponent);
|
|
7746
8046
|
this.componentRef.instance.column = this.column;
|
|
8047
|
+
this.componentRef.instance.data = this.data;
|
|
7747
8048
|
this.init = true;
|
|
7748
8049
|
}
|
|
7749
8050
|
}
|
|
7750
8051
|
HeadCellHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HeadCellHostComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
7751
|
-
HeadCellHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: HeadCellHostComponent, selector: "teta-head-cell-host", inputs: { column: "column" }, ngImport: i0, template: '', isInline: true, styles: [":host{display:contents}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8052
|
+
HeadCellHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: HeadCellHostComponent, selector: "teta-head-cell-host", inputs: { column: "column", data: "data" }, ngImport: i0, template: '', isInline: true, styles: [":host{display:contents}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7752
8053
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HeadCellHostComponent, decorators: [{
|
|
7753
8054
|
type: Component,
|
|
7754
8055
|
args: [{ selector: 'teta-head-cell-host', template: '', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:contents}\n"] }]
|
|
7755
8056
|
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { column: [{
|
|
7756
8057
|
type: Input
|
|
8058
|
+
}], data: [{
|
|
8059
|
+
type: Input
|
|
7757
8060
|
}] } });
|
|
7758
8061
|
|
|
8062
|
+
class SortEvent {
|
|
8063
|
+
constructor(column, shiftKey) {
|
|
8064
|
+
this.column = column;
|
|
8065
|
+
this.shiftKey = shiftKey;
|
|
8066
|
+
}
|
|
8067
|
+
}
|
|
8068
|
+
|
|
7759
8069
|
class TabContentDirective {
|
|
7760
8070
|
constructor(template) {
|
|
7761
8071
|
this.template = template;
|
|
@@ -7870,7 +8180,7 @@ class TabsComponent {
|
|
|
7870
8180
|
}
|
|
7871
8181
|
}
|
|
7872
8182
|
TabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7873
|
-
TabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: TabsComponent, selector: "teta-tabs", inputs: { activeId: "activeId", destroyOnHide: "destroyOnHide" }, outputs: { tabChange: "tabChange" }, host: { properties: { "class.tabs": "this.classTabs" } }, queries: [{ propertyName: "tabs", predicate: TabComponent }], ngImport: i0, template: "<div class=\"tabs-head\" role=\"tablist\">\n <div class=\"tabs-head-item\"\n *ngFor=\"let tab of tabs\"\n (click)=\"select(tab.id);\"\n [class.tabs-head-item_active]=\"tab.id === activeId\"\n [class.tabs-head-item_disabled]=\"tab.disabled\">\n <span [id]=\"tab.id\" class=\"tabs-title\"\n role=\"tab\"\n [attr.tabindex]=\"(tab.disabled ? '-1': undefined)\"\n [attr.aria-controls]=\"(!destroyOnHide || tab.id === activeId ? tab.id + '-panel' : null)\"\n [attr.aria-expanded]=\"tab.id === activeId\"\n [attr.aria-disabled]=\"tab.disabled\">\n {{tab.title}}\n <ng-template [ngTemplateOutlet]=\"tab.titleTpl?.template\"></ng-template>\n </span>\n </div>\n</div>\n<div class=\"tabs-content\">\n <ng-template ngFor let-tab [ngForOf]=\"tabs\">\n <ng-container *ngIf=\"!destroyOnHide || tab.id === activeId\">\n <ng-template [ngTemplateOutlet]=\"tab.contentTpl?.template\"></ng-template>\n </ng-container>\n </ng-template>\n</div>\n", styles: [""], directives: [{ type:
|
|
8183
|
+
TabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: TabsComponent, selector: "teta-tabs", inputs: { activeId: "activeId", destroyOnHide: "destroyOnHide" }, outputs: { tabChange: "tabChange" }, host: { properties: { "class.tabs": "this.classTabs" } }, queries: [{ propertyName: "tabs", predicate: TabComponent }], ngImport: i0, template: "<div class=\"tabs-head\" role=\"tablist\">\n <div class=\"tabs-head-item\"\n *ngFor=\"let tab of tabs\"\n (click)=\"select(tab.id);\"\n [class.tabs-head-item_active]=\"tab.id === activeId\"\n [class.tabs-head-item_disabled]=\"tab.disabled\">\n <span [id]=\"tab.id\" class=\"tabs-title\"\n role=\"tab\"\n [attr.tabindex]=\"(tab.disabled ? '-1': undefined)\"\n [attr.aria-controls]=\"(!destroyOnHide || tab.id === activeId ? tab.id + '-panel' : null)\"\n [attr.aria-expanded]=\"tab.id === activeId\"\n [attr.aria-disabled]=\"tab.disabled\">\n {{tab.title}}\n <ng-template [ngTemplateOutlet]=\"tab.titleTpl?.template\"></ng-template>\n </span>\n </div>\n</div>\n<div class=\"tabs-content\">\n <ng-template ngFor let-tab [ngForOf]=\"tabs\">\n <ng-container *ngIf=\"!destroyOnHide || tab.id === activeId\">\n <ng-template [ngTemplateOutlet]=\"tab.contentTpl?.template\"></ng-template>\n </ng-container>\n </ng-template>\n</div>\n", styles: [""], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
7874
8184
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TabsComponent, decorators: [{
|
|
7875
8185
|
type: Component,
|
|
7876
8186
|
args: [{ selector: 'teta-tabs', template: "<div class=\"tabs-head\" role=\"tablist\">\n <div class=\"tabs-head-item\"\n *ngFor=\"let tab of tabs\"\n (click)=\"select(tab.id);\"\n [class.tabs-head-item_active]=\"tab.id === activeId\"\n [class.tabs-head-item_disabled]=\"tab.disabled\">\n <span [id]=\"tab.id\" class=\"tabs-title\"\n role=\"tab\"\n [attr.tabindex]=\"(tab.disabled ? '-1': undefined)\"\n [attr.aria-controls]=\"(!destroyOnHide || tab.id === activeId ? tab.id + '-panel' : null)\"\n [attr.aria-expanded]=\"tab.id === activeId\"\n [attr.aria-disabled]=\"tab.disabled\">\n {{tab.title}}\n <ng-template [ngTemplateOutlet]=\"tab.titleTpl?.template\"></ng-template>\n </span>\n </div>\n</div>\n<div class=\"tabs-content\">\n <ng-template ngFor let-tab [ngForOf]=\"tabs\">\n <ng-container *ngIf=\"!destroyOnHide || tab.id === activeId\">\n <ng-template [ngTemplateOutlet]=\"tab.contentTpl?.template\"></ng-template>\n </ng-container>\n </ng-template>\n</div>\n", styles: [""] }]
|
|
@@ -7978,7 +8288,7 @@ class TreeItemComponent {
|
|
|
7978
8288
|
}
|
|
7979
8289
|
}
|
|
7980
8290
|
TreeItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TreeItemComponent, deps: [{ token: TreeService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
7981
|
-
TreeItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: TreeItemComponent, selector: "teta-tree-item", inputs: { item: "item", depth: "depth", padding: "padding", childNodeName: "childNodeName", template: "template", noChildMode: "noChildMode" }, host: { properties: { "class.tree__item-container": "this.treeItemClass" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"tree__item_content\" [ngClass]=\"'tree__item_content-' + computedDepth\" (click)=\"openItem()\">\n <ng-container\n *ngTemplateOutlet=\"template; context: {$implicit: item, item: item, open: itemIsOpen, service: service, depth: depth}\"></ng-container>\n</div>\n<div [@children] class=\"tree__children\" *ngIf=\"itemIsOpen && item[childNodeName]?.length > 0\">\n <teta-tree-item *ngFor=\"let child of item[childNodeName];\"\n [item]=\"child\"\n [template]=\"template\"\n [padding]=\"padding\"\n [childNodeName]=\"childNodeName\"\n [depth]=\"depth + 1\"></teta-tree-item>\n</div>\n", styles: [""], components: [{ type: TreeItemComponent, selector: "teta-tree-item", inputs: ["item", "depth", "padding", "childNodeName", "template", "noChildMode"] }], directives: [{ type:
|
|
8291
|
+
TreeItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: TreeItemComponent, selector: "teta-tree-item", inputs: { item: "item", depth: "depth", padding: "padding", childNodeName: "childNodeName", template: "template", noChildMode: "noChildMode" }, host: { properties: { "class.tree__item-container": "this.treeItemClass" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"tree__item_content\" [ngClass]=\"'tree__item_content-' + computedDepth\" (click)=\"openItem()\">\n <ng-container\n *ngTemplateOutlet=\"template; context: {$implicit: item, item: item, open: itemIsOpen, service: service, depth: depth}\"></ng-container>\n</div>\n<div [@children] class=\"tree__children\" *ngIf=\"itemIsOpen && item[childNodeName]?.length > 0\">\n <teta-tree-item *ngFor=\"let child of item[childNodeName];\"\n [item]=\"child\"\n [template]=\"template\"\n [padding]=\"padding\"\n [childNodeName]=\"childNodeName\"\n [depth]=\"depth + 1\"></teta-tree-item>\n</div>\n", styles: [""], components: [{ type: TreeItemComponent, selector: "teta-tree-item", inputs: ["item", "depth", "padding", "childNodeName", "template", "noChildMode"] }], directives: [{ type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], animations: [
|
|
7982
8292
|
trigger('children', [
|
|
7983
8293
|
transition('void => *', [
|
|
7984
8294
|
style({ opacity: '0' }),
|
|
@@ -8055,7 +8365,7 @@ class TreeComponent {
|
|
|
8055
8365
|
}
|
|
8056
8366
|
}
|
|
8057
8367
|
TreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TreeComponent, deps: [{ token: TreeService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8058
|
-
TreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: TreeComponent, selector: "teta-tree", inputs: { data: "data", class: "class", padding: "padding", childNodeName: "childNodeName", openItems: "openItems", compareItems: "compareItems" }, outputs: { service: "service", openItemsChange: "openItemsChange" }, host: { properties: { "class": "this.getClass" } }, providers: [TreeService], queries: [{ propertyName: "template", first: true, predicate: TetaTemplateDirective, descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngFor=\"let item of data\">\n <teta-tree-item [item]=\"item\"\n [depth]=\"0\"\n [padding]=\"padding\"\n [childNodeName]=\"childNodeName\"\n [noChildMode]=\"noChildMode\"\n [template]=\"template?.template\"></teta-tree-item>\n</ng-container>\n", styles: [""], components: [{ type: TreeItemComponent, selector: "teta-tree-item", inputs: ["item", "depth", "padding", "childNodeName", "template", "noChildMode"] }], directives: [{ type:
|
|
8368
|
+
TreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: TreeComponent, selector: "teta-tree", inputs: { data: "data", class: "class", padding: "padding", childNodeName: "childNodeName", openItems: "openItems", compareItems: "compareItems" }, outputs: { service: "service", openItemsChange: "openItemsChange" }, host: { properties: { "class": "this.getClass" } }, providers: [TreeService], queries: [{ propertyName: "template", first: true, predicate: TetaTemplateDirective, descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngFor=\"let item of data\">\n <teta-tree-item [item]=\"item\"\n [depth]=\"0\"\n [padding]=\"padding\"\n [childNodeName]=\"childNodeName\"\n [noChildMode]=\"noChildMode\"\n [template]=\"template?.template\"></teta-tree-item>\n</ng-container>\n", styles: [""], components: [{ type: TreeItemComponent, selector: "teta-tree-item", inputs: ["item", "depth", "padding", "childNodeName", "template", "noChildMode"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8059
8369
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TreeComponent, decorators: [{
|
|
8060
8370
|
type: Component,
|
|
8061
8371
|
args: [{ selector: 'teta-tree', providers: [TreeService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngFor=\"let item of data\">\n <teta-tree-item [item]=\"item\"\n [depth]=\"0\"\n [padding]=\"padding\"\n [childNodeName]=\"childNodeName\"\n [noChildMode]=\"noChildMode\"\n [template]=\"template?.template\"></teta-tree-item>\n</ng-container>\n", styles: [""] }]
|
|
@@ -8097,7 +8407,7 @@ class TreeItemToggleComponent {
|
|
|
8097
8407
|
}
|
|
8098
8408
|
}
|
|
8099
8409
|
TreeItemToggleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TreeItemToggleComponent, deps: [{ token: TreeService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8100
|
-
TreeItemToggleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: TreeItemToggleComponent, selector: "teta-tree-item-toggle", inputs: { item: "item" }, ngImport: i0, template: "<teta-icon [name]=\"(open | async) ? 'arrowDownKey' : 'arrowRightKey'\"\n class=\"tree__icon\"></teta-icon>\n", styles: [":host{display:inline-flex;align-items:center}\n"], components: [{ type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], pipes: { "async":
|
|
8410
|
+
TreeItemToggleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: TreeItemToggleComponent, selector: "teta-tree-item-toggle", inputs: { item: "item" }, ngImport: i0, template: "<teta-icon [name]=\"(open | async) ? 'arrowDownKey' : 'arrowRightKey'\"\n class=\"tree__icon\"></teta-icon>\n", styles: [":host{display:inline-flex;align-items:center}\n"], components: [{ type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8101
8411
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TreeItemToggleComponent, decorators: [{
|
|
8102
8412
|
type: Component,
|
|
8103
8413
|
args: [{ selector: 'teta-tree-item-toggle', changeDetection: ChangeDetectionStrategy.OnPush, template: "<teta-icon [name]=\"(open | async) ? 'arrowDownKey' : 'arrowRightKey'\"\n class=\"tree__icon\"></teta-icon>\n", styles: [":host{display:inline-flex;align-items:center}\n"] }]
|
|
@@ -8106,14 +8416,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
8106
8416
|
}] } });
|
|
8107
8417
|
|
|
8108
8418
|
class HeadCellDropdownComponent {
|
|
8109
|
-
constructor(_svc, _cdr) {
|
|
8419
|
+
constructor(_svc, _config, _cdr) {
|
|
8110
8420
|
this._svc = _svc;
|
|
8421
|
+
this._config = _config;
|
|
8111
8422
|
this._cdr = _cdr;
|
|
8112
8423
|
this.dropDownOpenChange = new EventEmitter();
|
|
8113
8424
|
this.autosize = new EventEmitter();
|
|
8114
8425
|
this.autosizeAll = new EventEmitter();
|
|
8115
|
-
this.shadow = true;
|
|
8116
|
-
this.bg = true;
|
|
8117
8426
|
this._alive = true;
|
|
8118
8427
|
this.compareItems = (item) => item.name;
|
|
8119
8428
|
this.setChildrenVisibility = (column, visible, hiddenColumns) => {
|
|
@@ -8137,13 +8446,17 @@ class HeadCellDropdownComponent {
|
|
|
8137
8446
|
this.showParents(column, hiddenColumns);
|
|
8138
8447
|
}
|
|
8139
8448
|
};
|
|
8140
|
-
this.
|
|
8449
|
+
this.locale = this._config.locale;
|
|
8450
|
+
this.filterOptions = this._svc.filterOptions;
|
|
8141
8451
|
this._svc.hiddenColumns
|
|
8142
8452
|
.pipe(takeWhile((_) => this._alive), map((_) => [..._]))
|
|
8143
8453
|
.subscribe((_) => {
|
|
8144
8454
|
this.hiddenColumns = _;
|
|
8145
8455
|
});
|
|
8146
8456
|
}
|
|
8457
|
+
enter() {
|
|
8458
|
+
this.applyFilter();
|
|
8459
|
+
}
|
|
8147
8460
|
get sortParam() {
|
|
8148
8461
|
return StateUtil.getSortState(this.state, this.column);
|
|
8149
8462
|
}
|
|
@@ -8175,12 +8488,23 @@ class HeadCellDropdownComponent {
|
|
|
8175
8488
|
pinColumn() {
|
|
8176
8489
|
this._svc.pinColumn(this.column);
|
|
8177
8490
|
}
|
|
8491
|
+
sortAsc(event) {
|
|
8492
|
+
this._svc.sortAsc(new SortEvent(this.column, event.shiftKey));
|
|
8493
|
+
}
|
|
8494
|
+
sortDesc(event) {
|
|
8495
|
+
this._svc.sortDesc(new SortEvent(this.column, event.shiftKey));
|
|
8496
|
+
}
|
|
8178
8497
|
clearSort() {
|
|
8179
8498
|
this._svc.clearSort(this.column);
|
|
8180
8499
|
}
|
|
8181
8500
|
clearAllSort() {
|
|
8182
8501
|
this._svc.clearAllSort();
|
|
8183
8502
|
}
|
|
8503
|
+
// sortColumn(column: TableColumn, event: MouseEvent): void {
|
|
8504
|
+
// if (!event.defaultPrevented) {
|
|
8505
|
+
// this._svc.sort(new SortEvent(this.column, event.shiftKey));
|
|
8506
|
+
// }
|
|
8507
|
+
// }
|
|
8184
8508
|
hasFilteredColumns() {
|
|
8185
8509
|
return StateUtil.hasFilteredColumns(this.state);
|
|
8186
8510
|
}
|
|
@@ -8221,7 +8545,8 @@ class HeadCellDropdownComponent {
|
|
|
8221
8545
|
setColumnsVisibility() {
|
|
8222
8546
|
this._svc.setHiddenColumns(this.hiddenColumns);
|
|
8223
8547
|
}
|
|
8224
|
-
ngOnInit() {
|
|
8548
|
+
ngOnInit() {
|
|
8549
|
+
}
|
|
8225
8550
|
ngOnDestroy() {
|
|
8226
8551
|
this._alive = false;
|
|
8227
8552
|
}
|
|
@@ -8256,17 +8581,19 @@ class HeadCellDropdownComponent {
|
|
|
8256
8581
|
return ArrayUtil.findRecursive(columns, (iterableNode) => { var _a; return ((_a = iterableNode.columns) === null || _a === void 0 ? void 0 : _a.indexOf(column)) >= 0; }, 'columns');
|
|
8257
8582
|
}
|
|
8258
8583
|
}
|
|
8259
|
-
HeadCellDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HeadCellDropdownComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8260
|
-
HeadCellDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: HeadCellDropdownComponent, selector: "teta-head-cell-dropdown", inputs: { columns: "columns", column: "column", state: "state", dropDownOpen: "dropDownOpen" }, outputs: { dropDownOpenChange: "dropDownOpenChange", autosize: "autosize", autosizeAll: "autosizeAll" }, host: {
|
|
8584
|
+
HeadCellDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HeadCellDropdownComponent, deps: [{ token: TableService }, { token: TetaConfigService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8585
|
+
HeadCellDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: HeadCellDropdownComponent, selector: "teta-head-cell-dropdown", inputs: { columns: "columns", column: "column", state: "state", data: "data", dropDownOpen: "dropDownOpen" }, outputs: { dropDownOpenChange: "dropDownOpenChange", autosize: "autosize", autosizeAll: "autosizeAll" }, host: { listeners: { "keydown.enter": "enter()" } }, ngImport: i0, template: "<teta-tabs class=\"column_auto\" *ngIf=\"locale | async as loc\">\n <teta-tab>\n <ng-template tetaTabTitle>\n <teta-icon [name]=\"'menu'\"></teta-icon>\n </ng-template>\n <ng-template tetaTabContent>\n <div class=\"list column_auto\">\n <div class=\"list-item list-item_interactive\" (click)=\"pinColumn()\">\n {{column.locked ? loc.unpin : loc.pin}}\n </div>\n <div class=\"list-divider\"></div>\n <ng-container *ngIf=\"column.sortable\">\n <div class=\"list-item list-item_interactive\"\n (click)=\"sortAsc($event)\">\n {{loc.sortAsc}}\n </div>\n <div class=\"list-item list-item_interactive\"\n (click)=\"sortDesc($event)\">\n {{loc.sortDesc}}\n </div>\n <ng-container *ngIf=\"hasSortedColumns()\">\n <div class=\"list-item list-item_interactive\"\n *ngIf=\"sortParam\"\n (click)=\"clearSort()\">\n {{loc.clearSort}}\n </div>\n <div class=\"list-item list-item_interactive\"\n (click)=\"clearAllSort()\">\n {{loc.clearAllSort}}\n </div>\n <div class=\"list-divider\"></div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"hasFilteredColumns()\">\n <div class=\"list-item list-item_interactive\"\n *ngIf=\"filtered\"\n (click)=\"clearFilter()\">\n {{loc.clearFilter}}\n </div>\n <div class=\"list-item list-item_interactive\"\n (click)=\"clearAllFilters()\">\n {{loc.clearAllFilters}}\n </div>\n <div class=\"list-divider\"></div>\n </ng-container>\n <div class=\"list-item list-item_interactive\" (click)=\"autosize.emit()\">\n {{loc.autosizeColumn}}\n </div>\n <div class=\"list-item list-item_interactive\" (click)=\"autosizeAll.emit()\">\n {{loc.autosizeAll}}\n </div>\n <div class=\"list-divider\"></div>\n <div class=\"list-item list-item_interactive\" (click)=\"restoreDefaultColumns()\">\n {{loc.resetColumnsSize}}\n </div>\n </div>\n </ng-template>\n </teta-tab>\n <teta-tab *ngIf=\"column.filterable\">\n <ng-template tetaTabTitle>\n <teta-icon [name]=\"'filter'\"></teta-icon>\n </ng-template>\n <ng-template tetaTabContent>\n <teta-filter-host [column]=\"column\"\n [data]=\"data\"\n [state]=\"state\"\n *ngIf=\"filterOptions | async as options\"\n [filterOptions]=\"options[column.name]\"></teta-filter-host>\n <teta-toolbar class=\"justify-content-between\">\n <button teta-button [palette]=\"'text'\" [view]=\"'ghost'\" (click)=\"clearFilter()\">\n {{loc.clear}}\n </button>\n <button teta-button [palette]=\"'primary'\" (click)=\"applyFilter()\">\n <teta-icon [name]=\"'tick'\"></teta-icon>\n {{loc.apply}}\n </button>\n </teta-toolbar>\n </ng-template>\n </teta-tab>\n <teta-tab *ngIf=\"column.headDropdownTemplate\">\n <ng-template tetaTabTitle>\n <teta-icon [name]=\"'measurement'\"></teta-icon>\n </ng-template>\n <ng-template tetaTabContent>\n <ng-container\n *ngTemplateOutlet=\"column.headDropdownTemplate; context: {$implicit: column, column: column}\"></ng-container>\n </ng-template>\n </teta-tab>\n <teta-tab>\n <ng-template tetaTabTitle>\n <teta-icon [name]=\"'eye'\"></teta-icon>\n </ng-template>\n <ng-template tetaTabContent>\n <div class=\"list-item padding-left-6 padding-top-2\" [class.padding-left-9]=\"childMode\">\n <teta-checkbox [binary]=\"true\"\n [allowNull]=\"true\"\n [ngModel]=\"allColumnsVisible()\"\n (ngModelChange)=\"setAllColumns($event)\">\n {{loc.all}}\n </teta-checkbox>\n </div>\n <div class=\"list-divider\"></div>\n <div class=\"padding-v-2 column column_auto scrollable\">\n <teta-tree [data]=\"columns\"\n [openItems]=\"openItems\"\n (openItemsChange)=\"openItems = $event\"\n [childNodeName]=\"'columns'\"\n [compareItems]=\"compareItems\">\n <ng-template tetaTemplate let-item>\n <div class=\"tree__item\">\n <teta-tree-item-toggle [item]=\"item\" *ngIf=\"item.columns?.length > 0\"></teta-tree-item-toggle>\n <teta-checkbox\n [ngModel]=\"!columnIsHidden(item)\"\n (ngModelChange)=\"setColumnVisibility(item, $event)\"\n (click)=\"$event.stopPropagation()\"\n [binary]=\"true\"\n >\n {{item.caption}}\n </teta-checkbox>\n </div>\n </ng-template>\n </teta-tree>\n </div>\n <teta-toolbar class=\"justify-content-end\">\n <button teta-button\n [disabled]=\"allColumnsVisible() === false\"\n [palette]=\"'primary'\"\n (click)=\"setColumnsVisibility()\">\n {{loc.apply}}\n </button>\n </teta-toolbar>\n </ng-template>\n </teta-tab>\n</teta-tabs>\n", styles: [":host{display:flex;flex-grow:1;min-height:0;width:250px}\n"], components: [{ type: TabsComponent, selector: "teta-tabs", inputs: ["activeId", "destroyOnHide"], outputs: ["tabChange"] }, { type: TabComponent, selector: "teta-tab", inputs: ["id", "title", "disabled"] }, { type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }, { type: FilterHostComponent, selector: "teta-filter-host", inputs: ["column", "state", "data", "filterOptions"], outputs: ["filterChanged"] }, { type: ToolbarComponent, selector: "teta-toolbar", inputs: ["palette", "class"] }, { type: ButtonComponent, selector: "button[teta-button], teta-button", inputs: ["palette", "class", "view", "square"] }, { type: CheckboxComponent, selector: "teta-checkbox", inputs: ["class", "palette", "noLabel", "disabled", "value", "binary", "allowNull"] }, { type: TreeComponent, selector: "teta-tree", inputs: ["data", "class", "padding", "childNodeName", "openItems", "compareItems"], outputs: ["service", "openItemsChange"] }, { type: TreeItemToggleComponent, selector: "teta-tree-item-toggle", inputs: ["item"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: TabTitleDirective, selector: "[tetaTabTitle]" }, { type: TabContentDirective, selector: "[tetaTabContent]" }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: TetaTemplateDirective, selector: "[tetaTemplate]", inputs: ["tetaTemplate"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8261
8586
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HeadCellDropdownComponent, decorators: [{
|
|
8262
8587
|
type: Component,
|
|
8263
|
-
args: [{ selector: 'teta-head-cell-dropdown', changeDetection: ChangeDetectionStrategy.OnPush, template: "<teta-tabs class=\"column_auto\"
|
|
8264
|
-
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { columns: [{
|
|
8588
|
+
args: [{ selector: 'teta-head-cell-dropdown', changeDetection: ChangeDetectionStrategy.OnPush, template: "<teta-tabs class=\"column_auto\" *ngIf=\"locale | async as loc\">\n <teta-tab>\n <ng-template tetaTabTitle>\n <teta-icon [name]=\"'menu'\"></teta-icon>\n </ng-template>\n <ng-template tetaTabContent>\n <div class=\"list column_auto\">\n <div class=\"list-item list-item_interactive\" (click)=\"pinColumn()\">\n {{column.locked ? loc.unpin : loc.pin}}\n </div>\n <div class=\"list-divider\"></div>\n <ng-container *ngIf=\"column.sortable\">\n <div class=\"list-item list-item_interactive\"\n (click)=\"sortAsc($event)\">\n {{loc.sortAsc}}\n </div>\n <div class=\"list-item list-item_interactive\"\n (click)=\"sortDesc($event)\">\n {{loc.sortDesc}}\n </div>\n <ng-container *ngIf=\"hasSortedColumns()\">\n <div class=\"list-item list-item_interactive\"\n *ngIf=\"sortParam\"\n (click)=\"clearSort()\">\n {{loc.clearSort}}\n </div>\n <div class=\"list-item list-item_interactive\"\n (click)=\"clearAllSort()\">\n {{loc.clearAllSort}}\n </div>\n <div class=\"list-divider\"></div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"hasFilteredColumns()\">\n <div class=\"list-item list-item_interactive\"\n *ngIf=\"filtered\"\n (click)=\"clearFilter()\">\n {{loc.clearFilter}}\n </div>\n <div class=\"list-item list-item_interactive\"\n (click)=\"clearAllFilters()\">\n {{loc.clearAllFilters}}\n </div>\n <div class=\"list-divider\"></div>\n </ng-container>\n <div class=\"list-item list-item_interactive\" (click)=\"autosize.emit()\">\n {{loc.autosizeColumn}}\n </div>\n <div class=\"list-item list-item_interactive\" (click)=\"autosizeAll.emit()\">\n {{loc.autosizeAll}}\n </div>\n <div class=\"list-divider\"></div>\n <div class=\"list-item list-item_interactive\" (click)=\"restoreDefaultColumns()\">\n {{loc.resetColumnsSize}}\n </div>\n </div>\n </ng-template>\n </teta-tab>\n <teta-tab *ngIf=\"column.filterable\">\n <ng-template tetaTabTitle>\n <teta-icon [name]=\"'filter'\"></teta-icon>\n </ng-template>\n <ng-template tetaTabContent>\n <teta-filter-host [column]=\"column\"\n [data]=\"data\"\n [state]=\"state\"\n *ngIf=\"filterOptions | async as options\"\n [filterOptions]=\"options[column.name]\"></teta-filter-host>\n <teta-toolbar class=\"justify-content-between\">\n <button teta-button [palette]=\"'text'\" [view]=\"'ghost'\" (click)=\"clearFilter()\">\n {{loc.clear}}\n </button>\n <button teta-button [palette]=\"'primary'\" (click)=\"applyFilter()\">\n <teta-icon [name]=\"'tick'\"></teta-icon>\n {{loc.apply}}\n </button>\n </teta-toolbar>\n </ng-template>\n </teta-tab>\n <teta-tab *ngIf=\"column.headDropdownTemplate\">\n <ng-template tetaTabTitle>\n <teta-icon [name]=\"'measurement'\"></teta-icon>\n </ng-template>\n <ng-template tetaTabContent>\n <ng-container\n *ngTemplateOutlet=\"column.headDropdownTemplate; context: {$implicit: column, column: column}\"></ng-container>\n </ng-template>\n </teta-tab>\n <teta-tab>\n <ng-template tetaTabTitle>\n <teta-icon [name]=\"'eye'\"></teta-icon>\n </ng-template>\n <ng-template tetaTabContent>\n <div class=\"list-item padding-left-6 padding-top-2\" [class.padding-left-9]=\"childMode\">\n <teta-checkbox [binary]=\"true\"\n [allowNull]=\"true\"\n [ngModel]=\"allColumnsVisible()\"\n (ngModelChange)=\"setAllColumns($event)\">\n {{loc.all}}\n </teta-checkbox>\n </div>\n <div class=\"list-divider\"></div>\n <div class=\"padding-v-2 column column_auto scrollable\">\n <teta-tree [data]=\"columns\"\n [openItems]=\"openItems\"\n (openItemsChange)=\"openItems = $event\"\n [childNodeName]=\"'columns'\"\n [compareItems]=\"compareItems\">\n <ng-template tetaTemplate let-item>\n <div class=\"tree__item\">\n <teta-tree-item-toggle [item]=\"item\" *ngIf=\"item.columns?.length > 0\"></teta-tree-item-toggle>\n <teta-checkbox\n [ngModel]=\"!columnIsHidden(item)\"\n (ngModelChange)=\"setColumnVisibility(item, $event)\"\n (click)=\"$event.stopPropagation()\"\n [binary]=\"true\"\n >\n {{item.caption}}\n </teta-checkbox>\n </div>\n </ng-template>\n </teta-tree>\n </div>\n <teta-toolbar class=\"justify-content-end\">\n <button teta-button\n [disabled]=\"allColumnsVisible() === false\"\n [palette]=\"'primary'\"\n (click)=\"setColumnsVisibility()\">\n {{loc.apply}}\n </button>\n </teta-toolbar>\n </ng-template>\n </teta-tab>\n</teta-tabs>\n", styles: [":host{display:flex;flex-grow:1;min-height:0;width:250px}\n"] }]
|
|
8589
|
+
}], ctorParameters: function () { return [{ type: TableService }, { type: TetaConfigService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { columns: [{
|
|
8265
8590
|
type: Input
|
|
8266
8591
|
}], column: [{
|
|
8267
8592
|
type: Input
|
|
8268
8593
|
}], state: [{
|
|
8269
8594
|
type: Input
|
|
8595
|
+
}], data: [{
|
|
8596
|
+
type: Input
|
|
8270
8597
|
}], dropDownOpen: [{
|
|
8271
8598
|
type: Input
|
|
8272
8599
|
}], dropDownOpenChange: [{
|
|
@@ -8275,12 +8602,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
8275
8602
|
type: Output
|
|
8276
8603
|
}], autosizeAll: [{
|
|
8277
8604
|
type: Output
|
|
8278
|
-
}],
|
|
8279
|
-
type:
|
|
8280
|
-
args: ['
|
|
8281
|
-
}], bg: [{
|
|
8282
|
-
type: HostBinding,
|
|
8283
|
-
args: ['class.bg-background-50']
|
|
8605
|
+
}], enter: [{
|
|
8606
|
+
type: HostListener,
|
|
8607
|
+
args: ['keydown.enter']
|
|
8284
8608
|
}] } });
|
|
8285
8609
|
|
|
8286
8610
|
class ResizeDragDirective {
|
|
@@ -8421,11 +8745,6 @@ class HeadCellComponent {
|
|
|
8421
8745
|
autosizeAllColumns() {
|
|
8422
8746
|
this._svc.autosizeAllColumns(this._elementRef.nativeElement);
|
|
8423
8747
|
}
|
|
8424
|
-
sortColumn(column, event) {
|
|
8425
|
-
if (!event.defaultPrevented) {
|
|
8426
|
-
this._svc.sort(new SortEvent(this.column, event.shiftKey));
|
|
8427
|
-
}
|
|
8428
|
-
}
|
|
8429
8748
|
resizeStart(event) {
|
|
8430
8749
|
const rect = this._elementRef.nativeElement.getBoundingClientRect();
|
|
8431
8750
|
this._startPosition = rect.x;
|
|
@@ -8433,8 +8752,10 @@ class HeadCellComponent {
|
|
|
8433
8752
|
}
|
|
8434
8753
|
resizeProcess(event) {
|
|
8435
8754
|
if (this._startPosition && event.pageX > 0) {
|
|
8436
|
-
|
|
8437
|
-
|
|
8755
|
+
requestAnimationFrame(() => {
|
|
8756
|
+
this._svc.resizeColumn(new ColumnResizeEvent(this.column, event.pageX - this._startPosition));
|
|
8757
|
+
this._app.tick();
|
|
8758
|
+
});
|
|
8438
8759
|
}
|
|
8439
8760
|
}
|
|
8440
8761
|
resizeEnd() {
|
|
@@ -8442,14 +8763,19 @@ class HeadCellComponent {
|
|
|
8442
8763
|
}
|
|
8443
8764
|
}
|
|
8444
8765
|
HeadCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HeadCellComponent, deps: [{ token: TableService }, { token: i0.ApplicationRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8445
|
-
HeadCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: HeadCellComponent, selector: "teta-head-cell", inputs: { column: "column", showHeadCellMenu: "showHeadCellMenu" }, host: { listeners: { "dragstart": "dragstart($event)", "dragenter": "dragenter($event)", "dragover": "allowDrop($event)", "dragleave": "dragleave($event)", "dragend": "dragend($event)", "drop": "drop($event)" } }, ngImport: i0, template: "<div draggable=\"true\" class=\"row row_auto\">\n <
|
|
8766
|
+
HeadCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: HeadCellComponent, selector: "teta-head-cell", inputs: { column: "column", showHeadCellMenu: "showHeadCellMenu", data: "data" }, host: { listeners: { "dragstart": "dragstart($event)", "dragenter": "dragenter($event)", "dragover": "allowDrop($event)", "dragleave": "dragleave($event)", "dragend": "dragend($event)", "drop": "drop($event)" }, properties: { "class.table-head__cell_active": "this.dropDownOpen" } }, ngImport: i0, template: "<div draggable=\"true\" class=\"row row_auto\">\n <teta-dropdown [autoCloseIgnore]=\"['enter']\"\n [verticalAlign]=\"verticalAlign.bottom\"\n [appendToBody]=\"true\"\n [(open)]=\"dropDownOpen\"\n [align]=\"align.left\"\n (click)=\"$event.preventDefault()\"\n [class.table-head__cell__menu_open]=\"dropDownOpen\"\n class=\"column column_auto justify-content-center\">\n <div tetaDropdownHead class=\"table-head__cell__wrapper\"\n [ngClass]=\"column.headCellClass\">\n <teta-head-cell-host [column]=\"column\" [data]=\"data\"></teta-head-cell-host>\n <teta-icon *ngIf=\"iconName | async as icon\"\n [palette]=\"'text'\"\n [name]=\"icon\"></teta-icon>\n </div>\n <teta-head-cell-dropdown tetaDropdownContent\n *ngIf=\"showHeadCellMenu\"\n (autosize)=\"autosizeColumn()\"\n (autosizeAll)=\"autosizeAllColumns()\"\n [data]=\"data\"\n [column]=\"column\"\n [columns]=\"columns | async\"\n [state]=\"state | async\"\n [(dropDownOpen)]=\"dropDownOpen\"></teta-head-cell-dropdown>\n </teta-dropdown>\n <div class=\"drop-area\"\n draggable=\"false\"\n [class.drop-area_left]=\"showDrag === 'left'\"\n [class.drop-area_right]=\"showDrag === 'right'\"\n *ngIf=\"showDrag\"></div>\n</div>\n<div class=\"table-head__cell__resize\"\n draggable=\"false\"\n (dragstart)=\"$event.preventDefault();$event.stopPropagation()\"\n (drag)=\"$event.preventDefault();$event.stopPropagation()\"\n [tetaResizeDrag]=\"'vertical'\"\n (resizeStart)=\"resizeStart($event)\"\n (resizeProcess)=\"resizeProcess($event)\"\n (resizeEnd)=\"resizeEnd()\"></div>\n", styles: [".drop-area{position:absolute;width:1px;background:var(--color-text-50);top:0;bottom:0;z-index:10}.drop-area_left{left:-1px}.drop-area_right{right:-1px}\n"], components: [{ type: DropdownComponent, selector: "teta-dropdown" }, { type: HeadCellHostComponent, selector: "teta-head-cell-host", inputs: ["column", "data"] }, { type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }, { type: HeadCellDropdownComponent, selector: "teta-head-cell-dropdown", inputs: ["columns", "column", "state", "data", "dropDownOpen"], outputs: ["dropDownOpenChange", "autosize", "autosizeAll"] }], directives: [{ type: DropdownHeadDirective, selector: "[tetaDropdownHead]" }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: DropdownContentDirective, selector: "[tetaDropdownContent]" }, { type: ResizeDragDirective, selector: "[tetaResizeDrag]", inputs: ["tetaResizeDrag"], outputs: ["resizeStart", "resizeProcess", "resizeEnd"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8446
8767
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HeadCellComponent, decorators: [{
|
|
8447
8768
|
type: Component,
|
|
8448
|
-
args: [{ selector: 'teta-head-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div draggable=\"true\" class=\"row row_auto\">\n <
|
|
8769
|
+
args: [{ selector: 'teta-head-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div draggable=\"true\" class=\"row row_auto\">\n <teta-dropdown [autoCloseIgnore]=\"['enter']\"\n [verticalAlign]=\"verticalAlign.bottom\"\n [appendToBody]=\"true\"\n [(open)]=\"dropDownOpen\"\n [align]=\"align.left\"\n (click)=\"$event.preventDefault()\"\n [class.table-head__cell__menu_open]=\"dropDownOpen\"\n class=\"column column_auto justify-content-center\">\n <div tetaDropdownHead class=\"table-head__cell__wrapper\"\n [ngClass]=\"column.headCellClass\">\n <teta-head-cell-host [column]=\"column\" [data]=\"data\"></teta-head-cell-host>\n <teta-icon *ngIf=\"iconName | async as icon\"\n [palette]=\"'text'\"\n [name]=\"icon\"></teta-icon>\n </div>\n <teta-head-cell-dropdown tetaDropdownContent\n *ngIf=\"showHeadCellMenu\"\n (autosize)=\"autosizeColumn()\"\n (autosizeAll)=\"autosizeAllColumns()\"\n [data]=\"data\"\n [column]=\"column\"\n [columns]=\"columns | async\"\n [state]=\"state | async\"\n [(dropDownOpen)]=\"dropDownOpen\"></teta-head-cell-dropdown>\n </teta-dropdown>\n <div class=\"drop-area\"\n draggable=\"false\"\n [class.drop-area_left]=\"showDrag === 'left'\"\n [class.drop-area_right]=\"showDrag === 'right'\"\n *ngIf=\"showDrag\"></div>\n</div>\n<div class=\"table-head__cell__resize\"\n draggable=\"false\"\n (dragstart)=\"$event.preventDefault();$event.stopPropagation()\"\n (drag)=\"$event.preventDefault();$event.stopPropagation()\"\n [tetaResizeDrag]=\"'vertical'\"\n (resizeStart)=\"resizeStart($event)\"\n (resizeProcess)=\"resizeProcess($event)\"\n (resizeEnd)=\"resizeEnd()\"></div>\n", styles: [".drop-area{position:absolute;width:1px;background:var(--color-text-50);top:0;bottom:0;z-index:10}.drop-area_left{left:-1px}.drop-area_right{right:-1px}\n"] }]
|
|
8449
8770
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ApplicationRef }, { type: i0.ElementRef }]; }, propDecorators: { column: [{
|
|
8450
8771
|
type: Input
|
|
8451
8772
|
}], showHeadCellMenu: [{
|
|
8452
8773
|
type: Input
|
|
8774
|
+
}], data: [{
|
|
8775
|
+
type: Input
|
|
8776
|
+
}], dropDownOpen: [{
|
|
8777
|
+
type: HostBinding,
|
|
8778
|
+
args: ['class.table-head__cell_active']
|
|
8453
8779
|
}], dragstart: [{
|
|
8454
8780
|
type: HostListener,
|
|
8455
8781
|
args: ['dragstart', ['$event']]
|
|
@@ -8488,40 +8814,55 @@ class TableHeadGroupComponent {
|
|
|
8488
8814
|
get column() {
|
|
8489
8815
|
return this._column;
|
|
8490
8816
|
}
|
|
8491
|
-
get
|
|
8492
|
-
var _a;
|
|
8493
|
-
|
|
8817
|
+
get flexGrow() {
|
|
8818
|
+
var _a, _b, _c;
|
|
8819
|
+
if (((_b = (_a = this.column) === null || _a === void 0 ? void 0 : _a.columns) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
8820
|
+
const flat = ArrayUtil.flatten((_c = this.column) === null || _c === void 0 ? void 0 : _c.columns, 'columns', true);
|
|
8821
|
+
return flat === null || flat === void 0 ? void 0 : flat.reduce((prev, curr) => prev + curr.flex, 0);
|
|
8822
|
+
}
|
|
8823
|
+
return this.column.flex;
|
|
8494
8824
|
}
|
|
8495
|
-
get
|
|
8496
|
-
var _a;
|
|
8497
|
-
if (((_a = this.
|
|
8498
|
-
|
|
8825
|
+
get flexBasis() {
|
|
8826
|
+
var _a, _b, _c;
|
|
8827
|
+
if (((_b = (_a = this.column) === null || _a === void 0 ? void 0 : _a.columns) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
8828
|
+
const flat = ArrayUtil.flatten((_c = this.column) === null || _c === void 0 ? void 0 : _c.columns, 'columns', true);
|
|
8829
|
+
return flat === null || flat === void 0 ? void 0 : flat.reduce((prev, curr) => prev + curr.width, 0);
|
|
8499
8830
|
}
|
|
8500
|
-
return
|
|
8831
|
+
return this.column.width;
|
|
8501
8832
|
}
|
|
8502
|
-
get
|
|
8503
|
-
|
|
8833
|
+
get _leaves() {
|
|
8834
|
+
var _a;
|
|
8835
|
+
return (_a = TableUtil.getColumnLeaves(this._column)) === null || _a === void 0 ? void 0 : _a.filter((_) => this._hiddenColumns.indexOf(_.name) < 0);
|
|
8504
8836
|
}
|
|
8505
8837
|
columnIsHidden(column) {
|
|
8506
8838
|
return this._svc.columnIsHidden(column);
|
|
8507
8839
|
}
|
|
8508
|
-
ngOnInit() {
|
|
8840
|
+
ngOnInit() {
|
|
8841
|
+
}
|
|
8509
8842
|
ngOnDestroy() {
|
|
8510
8843
|
this._alive = false;
|
|
8511
8844
|
}
|
|
8512
8845
|
}
|
|
8513
8846
|
TableHeadGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableHeadGroupComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8514
|
-
TableHeadGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: TableHeadGroupComponent, selector: "teta-table-head-group", inputs: { showHeadCellMenu: "showHeadCellMenu", column: "column" }, host: { properties: { "style.
|
|
8847
|
+
TableHeadGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: TableHeadGroupComponent, selector: "teta-table-head-group", inputs: { showHeadCellMenu: "showHeadCellMenu", data: "data", column: "column" }, host: { properties: { "style.flex-grow": "this.flexGrow", "style.min-width.px": "this.flexBasis", "style.flex-basis.px": "this.flexBasis" } }, ngImport: i0, template: "<ng-container *ngIf=\"column.columns && column.columns.length > 0\">\n <div class=\"table-head__group__container\">\n <div class=\"table-head__group__caption\">\n {{column.caption}}\n </div>\n <div class=\"table-head__group__children\">\n <ng-container *ngFor=\"let col of column.columns\">\n <teta-table-head-group\n class=\"table-head__group\"\n *ngIf=\"!columnIsHidden(col)\"\n [data]=\"data\"\n [showHeadCellMenu]=\"showHeadCellMenu\"\n [column]=\"col\"></teta-table-head-group>\n </ng-container>\n </div>\n </div>\n</ng-container>\n<ng-container *ngIf=\"!column.columns || column.columns.length === 0\">\n <teta-head-cell\n *ngIf=\"!columnIsHidden(column)\"\n class=\"table-head__cell\"\n [data]=\"data\"\n [showHeadCellMenu]=\"showHeadCellMenu\"\n [attr.data-column]=\"column.name\"\n [column]=\"column\"></teta-head-cell>\n</ng-container>\n", styles: [""], components: [{ type: TableHeadGroupComponent, selector: "teta-table-head-group", inputs: ["showHeadCellMenu", "data", "column"] }, { type: HeadCellComponent, selector: "teta-head-cell", inputs: ["column", "showHeadCellMenu", "data"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8515
8848
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableHeadGroupComponent, decorators: [{
|
|
8516
8849
|
type: Component,
|
|
8517
|
-
args: [{ selector: 'teta-table-head-group', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"column.columns && column.columns.length > 0\">\n <div class=\"table-head__group__container\">\n <div class=\"table-head__group__caption\">\n {{column.caption}}\n </div>\n <div class=\"table-head__group__children\"
|
|
8850
|
+
args: [{ selector: 'teta-table-head-group', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"column.columns && column.columns.length > 0\">\n <div class=\"table-head__group__container\">\n <div class=\"table-head__group__caption\">\n {{column.caption}}\n </div>\n <div class=\"table-head__group__children\">\n <ng-container *ngFor=\"let col of column.columns\">\n <teta-table-head-group\n class=\"table-head__group\"\n *ngIf=\"!columnIsHidden(col)\"\n [data]=\"data\"\n [showHeadCellMenu]=\"showHeadCellMenu\"\n [column]=\"col\"></teta-table-head-group>\n </ng-container>\n </div>\n </div>\n</ng-container>\n<ng-container *ngIf=\"!column.columns || column.columns.length === 0\">\n <teta-head-cell\n *ngIf=\"!columnIsHidden(column)\"\n class=\"table-head__cell\"\n [data]=\"data\"\n [showHeadCellMenu]=\"showHeadCellMenu\"\n [attr.data-column]=\"column.name\"\n [column]=\"column\"></teta-head-cell>\n</ng-container>\n", styles: [""] }]
|
|
8518
8851
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { showHeadCellMenu: [{
|
|
8519
8852
|
type: Input
|
|
8853
|
+
}], data: [{
|
|
8854
|
+
type: Input
|
|
8520
8855
|
}], column: [{
|
|
8521
8856
|
type: Input
|
|
8522
|
-
}],
|
|
8857
|
+
}], flexGrow: [{
|
|
8858
|
+
type: HostBinding,
|
|
8859
|
+
args: ['style.flex-grow']
|
|
8860
|
+
}], flexBasis: [{
|
|
8861
|
+
type: HostBinding,
|
|
8862
|
+
args: ['style.min-width.px']
|
|
8863
|
+
}, {
|
|
8523
8864
|
type: HostBinding,
|
|
8524
|
-
args: ['style.
|
|
8865
|
+
args: ['style.flex-basis.px']
|
|
8525
8866
|
}] } });
|
|
8526
8867
|
|
|
8527
8868
|
class TableHeadComponent {
|
|
@@ -8539,22 +8880,21 @@ class TableHeadComponent {
|
|
|
8539
8880
|
const [columns, hiddenColumns] = values;
|
|
8540
8881
|
this._hiddenColumns = hiddenColumns;
|
|
8541
8882
|
this.columns = columns;
|
|
8542
|
-
|
|
8543
|
-
.filter((_) => this._hiddenColumns.indexOf(_.name) < 0)
|
|
8544
|
-
|
|
8883
|
+
const locked = ArrayUtil.flatten(columns, 'columns', true)
|
|
8884
|
+
.filter((_) => this._hiddenColumns.indexOf(_.name) < 0 && _.locked);
|
|
8885
|
+
const startWidth = this.selectType !== SelectType.none ? 28 : 0;
|
|
8886
|
+
this.lockedFlex = locked.reduce((prev, curr) => prev + curr.flex, 0);
|
|
8887
|
+
this.lockedWidth = locked.reduce((prev, curr) => prev + curr.width, startWidth);
|
|
8545
8888
|
this._cdr.markForCheck();
|
|
8546
8889
|
});
|
|
8547
8890
|
this._svc.state.pipe(takeWhile((_) => this._alive)).subscribe((_) => {
|
|
8548
8891
|
this.state = _;
|
|
8549
8892
|
this._cdr.markForCheck();
|
|
8550
8893
|
});
|
|
8551
|
-
|
|
8552
|
-
|
|
8553
|
-
|
|
8554
|
-
|
|
8555
|
-
template = `48px ${template}`;
|
|
8556
|
-
}
|
|
8557
|
-
return template;
|
|
8894
|
+
this._svc.displayData.pipe(takeWhile((_) => this._alive)).subscribe((_) => {
|
|
8895
|
+
this.data = _;
|
|
8896
|
+
this._cdr.markForCheck();
|
|
8897
|
+
});
|
|
8558
8898
|
}
|
|
8559
8899
|
set columns(columns) {
|
|
8560
8900
|
this._columns = columns;
|
|
@@ -8569,37 +8909,20 @@ class TableHeadComponent {
|
|
|
8569
8909
|
get unlocked() {
|
|
8570
8910
|
return this._columns.filter((_) => _.locked === false && this._hiddenColumns.indexOf(_.name) < 0);
|
|
8571
8911
|
}
|
|
8572
|
-
getSpan() {
|
|
8573
|
-
var _a;
|
|
8574
|
-
if (((_a = this.locked) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
8575
|
-
let span = this.locked.length;
|
|
8576
|
-
if (this.selectType !== SelectType.none) {
|
|
8577
|
-
span += 1;
|
|
8578
|
-
}
|
|
8579
|
-
return `span ${span}`;
|
|
8580
|
-
}
|
|
8581
|
-
return null;
|
|
8582
|
-
}
|
|
8583
|
-
getLockedGridTemplateColumns(columns) {
|
|
8584
|
-
let template = TableUtil.getGridTemplateColumns(columns);
|
|
8585
|
-
if (this.selectType !== SelectType.none) {
|
|
8586
|
-
template = `48px ${template}`;
|
|
8587
|
-
}
|
|
8588
|
-
return template;
|
|
8589
|
-
}
|
|
8590
8912
|
track(index, item) {
|
|
8591
8913
|
return item.name;
|
|
8592
8914
|
}
|
|
8593
|
-
ngOnInit() {
|
|
8915
|
+
ngOnInit() {
|
|
8916
|
+
}
|
|
8594
8917
|
ngOnDestroy() {
|
|
8595
8918
|
this._alive = false;
|
|
8596
8919
|
}
|
|
8597
8920
|
}
|
|
8598
8921
|
TableHeadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableHeadComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8599
|
-
TableHeadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: TableHeadComponent, selector: "teta-table-head", inputs: { selectType: "selectType", showHeadCellMenu: "showHeadCellMenu" }, host: { properties: { "class.table-head": "this.tableHeadClass"
|
|
8922
|
+
TableHeadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: TableHeadComponent, selector: "teta-table-head", inputs: { selectType: "selectType", showHeadCellMenu: "showHeadCellMenu" }, host: { properties: { "class.table-head": "this.tableHeadClass" } }, ngImport: i0, template: "<div class=\"table-head_locked\"\n *ngIf=\"locked?.length\"\n [style.flex-grow]=\"lockedFlex\"\n [style.flex-basis.px]=\"lockedWidth\"\n [style.min-width.px]=\"lockedWidth\">\n <teta-selection-head-cell\n *ngIf=\"selectType !== selectTypeEnum.none\"\n style=\"width: 28px;\"></teta-selection-head-cell>\n <teta-table-head-group\n *ngFor=\"let column of locked; trackBy: track\"\n class=\"table-head__group\"\n [data]=\"data\"\n [showHeadCellMenu]=\"showHeadCellMenu\"\n [column]=\"column\"></teta-table-head-group>\n</div>\n<ng-container *ngIf=\"unlocked?.length\">\n <teta-selection-head-cell\n *ngIf=\"selectType !== selectTypeEnum.none && locked?.length < 1\"\n style=\"width: 28px;\"></teta-selection-head-cell>\n <teta-table-head-group\n *ngFor=\"let column of unlocked; trackBy: track\"\n class=\"table-head__group\"\n [data]=\"data\"\n [showHeadCellMenu]=\"showHeadCellMenu\"\n [column]=\"column\"></teta-table-head-group>\n</ng-container>\n", styles: [""], components: [{ type: SelectionHeadCellComponent, selector: "teta-selection-head-cell" }, { type: TableHeadGroupComponent, selector: "teta-table-head-group", inputs: ["showHeadCellMenu", "data", "column"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8600
8923
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableHeadComponent, decorators: [{
|
|
8601
8924
|
type: Component,
|
|
8602
|
-
args: [{ selector: 'teta-table-head', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"table-head_locked\"\n *ngIf=\"locked?.length\"\n [style.
|
|
8925
|
+
args: [{ selector: 'teta-table-head', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"table-head_locked\"\n *ngIf=\"locked?.length\"\n [style.flex-grow]=\"lockedFlex\"\n [style.flex-basis.px]=\"lockedWidth\"\n [style.min-width.px]=\"lockedWidth\">\n <teta-selection-head-cell\n *ngIf=\"selectType !== selectTypeEnum.none\"\n style=\"width: 28px;\"></teta-selection-head-cell>\n <teta-table-head-group\n *ngFor=\"let column of locked; trackBy: track\"\n class=\"table-head__group\"\n [data]=\"data\"\n [showHeadCellMenu]=\"showHeadCellMenu\"\n [column]=\"column\"></teta-table-head-group>\n</div>\n<ng-container *ngIf=\"unlocked?.length\">\n <teta-selection-head-cell\n *ngIf=\"selectType !== selectTypeEnum.none && locked?.length < 1\"\n style=\"width: 28px;\"></teta-selection-head-cell>\n <teta-table-head-group\n *ngFor=\"let column of unlocked; trackBy: track\"\n class=\"table-head__group\"\n [data]=\"data\"\n [showHeadCellMenu]=\"showHeadCellMenu\"\n [column]=\"column\"></teta-table-head-group>\n</ng-container>\n", styles: [""] }]
|
|
8603
8926
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { selectType: [{
|
|
8604
8927
|
type: Input
|
|
8605
8928
|
}], showHeadCellMenu: [{
|
|
@@ -8607,9 +8930,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
8607
8930
|
}], tableHeadClass: [{
|
|
8608
8931
|
type: HostBinding,
|
|
8609
8932
|
args: ['class.table-head']
|
|
8610
|
-
}], getTemplateColumns: [{
|
|
8611
|
-
type: HostBinding,
|
|
8612
|
-
args: ['style.grid-template-columns']
|
|
8613
8933
|
}] } });
|
|
8614
8934
|
|
|
8615
8935
|
var AggregationType;
|
|
@@ -8650,7 +8970,7 @@ class SelectionCellComponent {
|
|
|
8650
8970
|
}
|
|
8651
8971
|
}
|
|
8652
8972
|
SelectionCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SelectionCellComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8653
|
-
SelectionCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: SelectionCellComponent, selector: "teta-selection-cell", inputs: { row: "row" }, host: { properties: { "class.cell": "this.tableCellClass" } }, ngImport: i0, template: "<teta-checkbox [binary]=\"true\"\n [noLabel]=\"true\"\n [ngModel]=\"selectedRows?.indexOf(row) >= 0\"\n (ngModelChange)=\"selectRow($event)\"></teta-checkbox>\n", styles: [":host{display:flex;align-items:center;justify-content:center}\n"], components: [{ type: CheckboxComponent, selector: "teta-checkbox", inputs: ["class", "palette", "noLabel", "disabled", "value", "binary", "allowNull"] }], directives: [{ type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8973
|
+
SelectionCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: SelectionCellComponent, selector: "teta-selection-cell", inputs: { row: "row" }, host: { properties: { "class.cell": "this.tableCellClass" } }, ngImport: i0, template: "<teta-checkbox [binary]=\"true\"\n [noLabel]=\"true\"\n [ngModel]=\"selectedRows?.indexOf(row) >= 0\"\n (ngModelChange)=\"selectRow($event)\"></teta-checkbox>\n", styles: [":host{display:flex;align-items:center;justify-content:center}\n"], components: [{ type: CheckboxComponent, selector: "teta-checkbox", inputs: ["class", "palette", "noLabel", "disabled", "value", "binary", "allowNull"] }], directives: [{ type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8654
8974
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SelectionCellComponent, decorators: [{
|
|
8655
8975
|
type: Component,
|
|
8656
8976
|
args: [{ selector: 'teta-selection-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<teta-checkbox [binary]=\"true\"\n [noLabel]=\"true\"\n [ngModel]=\"selectedRows?.indexOf(row) >= 0\"\n (ngModelChange)=\"selectRow($event)\"></teta-checkbox>\n", styles: [":host{display:flex;align-items:center;justify-content:center}\n"] }]
|
|
@@ -8671,18 +8991,23 @@ class CellComponentBase {
|
|
|
8671
8991
|
this._alive = true;
|
|
8672
8992
|
}
|
|
8673
8993
|
get edit() {
|
|
8674
|
-
return (this._edit &&
|
|
8675
|
-
this.svc.boolOrFuncCallback(this.column.editable)({
|
|
8676
|
-
column: this.column,
|
|
8677
|
-
row: this.row,
|
|
8678
|
-
}));
|
|
8994
|
+
return (this._edit && this.editable);
|
|
8679
8995
|
}
|
|
8680
|
-
|
|
8681
|
-
this.svc.
|
|
8996
|
+
get editable() {
|
|
8997
|
+
return this.svc.boolOrFuncCallback(this.column.editable)({
|
|
8682
8998
|
column: this.column,
|
|
8683
8999
|
row: this.row,
|
|
8684
9000
|
});
|
|
8685
9001
|
}
|
|
9002
|
+
get index() {
|
|
9003
|
+
return this.svc.getRowIndex(this.row);
|
|
9004
|
+
}
|
|
9005
|
+
valueChanged() {
|
|
9006
|
+
this.svc.changeValue({
|
|
9007
|
+
column: this.column.name,
|
|
9008
|
+
row: this.index,
|
|
9009
|
+
});
|
|
9010
|
+
}
|
|
8686
9011
|
ngOnDestroy() {
|
|
8687
9012
|
this._alive = false;
|
|
8688
9013
|
}
|
|
@@ -8693,38 +9018,27 @@ class CellComponentBase {
|
|
|
8693
9018
|
this.svc.editRowStart
|
|
8694
9019
|
.pipe(takeWhile((_) => this._alive))
|
|
8695
9020
|
.subscribe((cell) => {
|
|
8696
|
-
if (this.
|
|
8697
|
-
!this._edit
|
|
8698
|
-
// &&
|
|
8699
|
-
// this.svc.boolOrFuncCallback(this.svc.cellEditable)({
|
|
8700
|
-
// column: this.column,
|
|
8701
|
-
// row: this.row,
|
|
8702
|
-
// })
|
|
8703
|
-
) {
|
|
9021
|
+
if (this.index === (cell === null || cell === void 0 ? void 0 : cell.row) && !this._edit) {
|
|
8704
9022
|
this.start(cell, 'row');
|
|
8705
9023
|
}
|
|
8706
|
-
if (this.
|
|
9024
|
+
if (this.index !== (cell === null || cell === void 0 ? void 0 : cell.row) && this._edit) {
|
|
8707
9025
|
this.stop();
|
|
8708
9026
|
}
|
|
8709
9027
|
});
|
|
8710
9028
|
this.svc.editCellStart
|
|
8711
9029
|
.pipe(takeWhile((_) => this._alive))
|
|
8712
9030
|
.subscribe((cell) => {
|
|
8713
|
-
if (this.
|
|
8714
|
-
this.column.name === cell.column.name &&
|
|
8715
|
-
!this._edit) {
|
|
9031
|
+
if (this.index === (cell === null || cell === void 0 ? void 0 : cell.row) && this.column.name === (cell === null || cell === void 0 ? void 0 : cell.column) && !this._edit) {
|
|
8716
9032
|
this.start(cell, 'cell');
|
|
8717
9033
|
}
|
|
8718
|
-
if ((this.
|
|
8719
|
-
this._edit) {
|
|
9034
|
+
if ((this.index !== (cell === null || cell === void 0 ? void 0 : cell.row) || this.column.name !== (cell === null || cell === void 0 ? void 0 : cell.column)) && this._edit) {
|
|
8720
9035
|
this.stop();
|
|
8721
9036
|
}
|
|
8722
9037
|
});
|
|
8723
9038
|
this.svc.valueSet
|
|
8724
9039
|
.pipe(takeWhile((_) => this._alive))
|
|
8725
9040
|
.subscribe((cellValue) => {
|
|
8726
|
-
if (this.row === cellValue.
|
|
8727
|
-
&& this.column.name === cellValue.cell.column.name) {
|
|
9041
|
+
if (this.index === cellValue.row && this.column.name === cellValue.column) {
|
|
8728
9042
|
this.row.data[this.column.name] = cellValue.value;
|
|
8729
9043
|
this.cdr.detectChanges();
|
|
8730
9044
|
}
|
|
@@ -8732,15 +9046,15 @@ class CellComponentBase {
|
|
|
8732
9046
|
this.svc.valueChanged
|
|
8733
9047
|
.pipe(takeWhile((_) => this._alive))
|
|
8734
9048
|
.subscribe((cellValue) => {
|
|
8735
|
-
if (this.
|
|
9049
|
+
if (this.index === cellValue.row) {
|
|
8736
9050
|
this.cdr.detectChanges();
|
|
8737
9051
|
}
|
|
8738
9052
|
});
|
|
8739
9053
|
}
|
|
8740
9054
|
start(initiator, type) {
|
|
8741
9055
|
this._edit = true;
|
|
9056
|
+
this.cdr.detectChanges();
|
|
8742
9057
|
this.startEdit(initiator, type);
|
|
8743
|
-
this.cdr.markForCheck();
|
|
8744
9058
|
}
|
|
8745
9059
|
stop() {
|
|
8746
9060
|
this._edit = false;
|
|
@@ -8773,13 +9087,17 @@ class NumericCellComponent extends CellComponentBase {
|
|
|
8773
9087
|
super.ngOnInit();
|
|
8774
9088
|
}
|
|
8775
9089
|
startEdit(initiator, type) {
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
|
|
8782
|
-
|
|
9090
|
+
var _a;
|
|
9091
|
+
if ((initiator === null || initiator === void 0 ? void 0 : initiator.column) === this.column.name) {
|
|
9092
|
+
this.cdr.detectChanges();
|
|
9093
|
+
(_a = this.input.nativeElement) === null || _a === void 0 ? void 0 : _a.focus();
|
|
9094
|
+
// this.input.nativeElement?.select();
|
|
9095
|
+
// this.cdr.detectChanges();
|
|
9096
|
+
// setTimeout(() => {
|
|
9097
|
+
// this.input?.nativeElement.focus();
|
|
9098
|
+
// this.input?.nativeElement.select();
|
|
9099
|
+
// this.cdr.markForCheck();
|
|
9100
|
+
// }, 0);
|
|
8783
9101
|
}
|
|
8784
9102
|
}
|
|
8785
9103
|
stopEdit() {
|
|
@@ -8787,10 +9105,10 @@ class NumericCellComponent extends CellComponentBase {
|
|
|
8787
9105
|
}
|
|
8788
9106
|
}
|
|
8789
9107
|
NumericCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NumericCellComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8790
|
-
NumericCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: NumericCellComponent, selector: "teta-numeric-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'\"
|
|
9108
|
+
NumericCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: NumericCellComponent, selector: "teta-numeric-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 [class.cell-text_disabled]=\"!editable\">\n {{row.data[column.name] | tetaNumber : 2}}\n</span>\n<input #input\n *ngIf=\"edit\"\n tetaOnlyNumber\n type=\"text\"\n class=\"input row_auto border-radius-0\"\n (blur)=\"setValue()\"\n [ngModel]=\"row.data[column.name]\"\n (ngModelChange)=\"row.data[column.name]=$event;\"/>\n", styles: [""], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: OnlyNumberDirective, selector: "[tetaOnlyNumber]", inputs: ["tetaOnlyNumber", "allowDecimals", "allowSign", "decimalSeparator", "commaSeparator"] }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "tetaNumber": NumberPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8791
9109
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NumericCellComponent, decorators: [{
|
|
8792
9110
|
type: Component,
|
|
8793
|
-
args: [{ selector: 'teta-numeric-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"
|
|
9111
|
+
args: [{ selector: 'teta-numeric-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{row.data[column.name] | tetaNumber : 2}}\n</span>\n<input #input\n *ngIf=\"edit\"\n tetaOnlyNumber\n type=\"text\"\n class=\"input row_auto border-radius-0\"\n (blur)=\"setValue()\"\n [ngModel]=\"row.data[column.name]\"\n (ngModelChange)=\"row.data[column.name]=$event;\"/>\n", styles: [""] }]
|
|
8794
9112
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
8795
9113
|
type: Input
|
|
8796
9114
|
}], row: [{
|
|
@@ -8815,7 +9133,7 @@ class DateCellComponent extends CellComponentBase {
|
|
|
8815
9133
|
this.cdr.detectChanges();
|
|
8816
9134
|
}
|
|
8817
9135
|
startEdit(initiator, type) {
|
|
8818
|
-
if ((initiator === null || initiator === void 0 ? void 0 : initiator.column
|
|
9136
|
+
if ((initiator === null || initiator === void 0 ? void 0 : initiator.column) === this.column.name) {
|
|
8819
9137
|
setTimeout(() => {
|
|
8820
9138
|
var _a;
|
|
8821
9139
|
(_a = this.input) === null || _a === void 0 ? void 0 : _a.focus();
|
|
@@ -8828,10 +9146,10 @@ class DateCellComponent extends CellComponentBase {
|
|
|
8828
9146
|
}
|
|
8829
9147
|
}
|
|
8830
9148
|
DateCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DateCellComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8831
|
-
DateCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: DateCellComponent, selector: "teta-date-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'\"
|
|
9149
|
+
DateCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: DateCellComponent, selector: "teta-date-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 [class.cell-text_disabled]=\"!editable\">\n {{row.data[column.name] | date : 'dd.MM.yyyy'}}\n</span>\n<teta-date-picker class=\"datepicker-table\"\n #input\n *ngIf=\"edit\"\n [appendToBody]=\"true\"\n [showTime]=\"false\"\n [ngModel]=\"row.data[column.name]\"\n (ngModelChange)=\"setValue($event)\"\n></teta-date-picker>\n", styles: [""], components: [{ type: DatePickerComponent, selector: "teta-date-picker", inputs: ["disabled", "invalid", "firstDayOfWeek", "disabledDates", "disabledPeriods", "disabledDays", "minDate", "maxDate", "minYearDate", "maxYearDate", "align", "verticalAlign", "appendToBody", "allowNull", "backdrop", "showTime", "format"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "date": i3.DatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8832
9150
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DateCellComponent, decorators: [{
|
|
8833
9151
|
type: Component,
|
|
8834
|
-
args: [{ selector: 'teta-date-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"
|
|
9152
|
+
args: [{ selector: 'teta-date-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{row.data[column.name] | date : 'dd.MM.yyyy'}}\n</span>\n<teta-date-picker class=\"datepicker-table\"\n #input\n *ngIf=\"edit\"\n [appendToBody]=\"true\"\n [showTime]=\"false\"\n [ngModel]=\"row.data[column.name]\"\n (ngModelChange)=\"setValue($event)\"\n></teta-date-picker>\n", styles: [""] }]
|
|
8835
9153
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
8836
9154
|
type: Input
|
|
8837
9155
|
}], row: [{
|
|
@@ -8868,7 +9186,7 @@ class ListCellComponent extends CellComponentBase {
|
|
|
8868
9186
|
this.valueChanged();
|
|
8869
9187
|
}
|
|
8870
9188
|
startEdit(initiator, type) {
|
|
8871
|
-
if ((initiator === null || initiator === void 0 ? void 0 : initiator.column
|
|
9189
|
+
if ((initiator === null || initiator === void 0 ? void 0 : initiator.column) === this.column.name) {
|
|
8872
9190
|
setTimeout(() => {
|
|
8873
9191
|
var _a;
|
|
8874
9192
|
(_a = this.input) === null || _a === void 0 ? void 0 : _a.focus();
|
|
@@ -8896,10 +9214,10 @@ class ListCellComponent extends CellComponentBase {
|
|
|
8896
9214
|
}
|
|
8897
9215
|
}
|
|
8898
9216
|
ListCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ListCellComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8899
|
-
ListCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: ListCellComponent, selector: "teta-list-cell", inputs: { column: "column", row: "row", filterOptions: "filterOptions" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span [style.display]=\"edit ? 'none' : 'block'\"
|
|
9217
|
+
ListCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: ListCellComponent, selector: "teta-list-cell", inputs: { column: "column", row: "row", filterOptions: "filterOptions" }, 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 [class.cell-text_disabled]=\"!editable\">\n {{value}}\n</span>\n<teta-select #input\n class=\"row_auto select-table\"\n *ngIf=\"edit\"\n [allowNull]=\"!column.required\"\n [verticalAlign]=\"verticalAlign.auto\"\n [appendToBody]=\"true\"\n [options]=\"displayFilterOptions\"\n [valueRef]=\"'id'\"\n [textRef]=\"'name'\"\n [ngModel]=\"row.data[column.name]\"\n (ngModelChange)=\"setValue($event)\">\n</teta-select>\n", styles: [""], components: [{ type: SelectComponent, selector: "teta-select", inputs: ["multiple", "options", "invalid", "align", "verticalAlign", "autoClose", "autoCloseIgnore", "disabled", "itemSize", "virtual", "icon", "placeholder", "appendToBody", "allowNull", "valueRef", "textRef", "searchRef"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8900
9218
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ListCellComponent, decorators: [{
|
|
8901
9219
|
type: Component,
|
|
8902
|
-
args: [{ selector: 'teta-list-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"
|
|
9220
|
+
args: [{ selector: 'teta-list-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{value}}\n</span>\n<teta-select #input\n class=\"row_auto select-table\"\n *ngIf=\"edit\"\n [allowNull]=\"!column.required\"\n [verticalAlign]=\"verticalAlign.auto\"\n [appendToBody]=\"true\"\n [options]=\"displayFilterOptions\"\n [valueRef]=\"'id'\"\n [textRef]=\"'name'\"\n [ngModel]=\"row.data[column.name]\"\n (ngModelChange)=\"setValue($event)\">\n</teta-select>\n", styles: [""] }]
|
|
8903
9221
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
8904
9222
|
type: Input
|
|
8905
9223
|
}], row: [{
|
|
@@ -8924,24 +9242,30 @@ class StringCellComponent extends CellComponentBase {
|
|
|
8924
9242
|
super.ngOnInit();
|
|
8925
9243
|
}
|
|
8926
9244
|
startEdit(initiator, type) {
|
|
8927
|
-
|
|
8928
|
-
|
|
8929
|
-
|
|
8930
|
-
|
|
8931
|
-
|
|
8932
|
-
|
|
8933
|
-
|
|
9245
|
+
var _a, _b;
|
|
9246
|
+
if ((initiator === null || initiator === void 0 ? void 0 : initiator.column) === this.column.name) {
|
|
9247
|
+
this.cdr.detectChanges();
|
|
9248
|
+
(_a = this.input.nativeElement) === null || _a === void 0 ? void 0 : _a.focus();
|
|
9249
|
+
(_b = this.input.nativeElement) === null || _b === void 0 ? void 0 : _b.select();
|
|
9250
|
+
// this.cdr.detectChanges();
|
|
9251
|
+
// this.input.nativeElement?.focus();
|
|
9252
|
+
// this.input.nativeElement?.select();
|
|
9253
|
+
// this.cdr.detectChanges();
|
|
9254
|
+
// setTimeout(() => {
|
|
9255
|
+
// this.input.nativeElement?.focus();
|
|
9256
|
+
// this.input.nativeElement?.select();
|
|
9257
|
+
// }, 0);
|
|
8934
9258
|
}
|
|
8935
9259
|
}
|
|
8936
9260
|
stopEdit() {
|
|
8937
|
-
this.cdr.
|
|
9261
|
+
this.cdr.detectChanges();
|
|
8938
9262
|
}
|
|
8939
9263
|
}
|
|
8940
9264
|
StringCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: StringCellComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8941
|
-
StringCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", 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'\"
|
|
9265
|
+
StringCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", 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 [class.cell-text_disabled]=\"!editable\">\n {{row.data[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.data[column.name]\"\n (ngModelChange)=\"row.data[column.name]=$event\"/>\n\n", styles: [""], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8942
9266
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: StringCellComponent, decorators: [{
|
|
8943
9267
|
type: Component,
|
|
8944
|
-
args: [{ selector: 'teta-string-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"
|
|
9268
|
+
args: [{ selector: 'teta-string-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{row.data[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.data[column.name]\"\n (ngModelChange)=\"row.data[column.name]=$event\"/>\n\n", styles: [""] }]
|
|
8945
9269
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
8946
9270
|
type: Input
|
|
8947
9271
|
}], row: [{
|
|
@@ -8964,7 +9288,7 @@ class BooleanCellComponent extends CellComponentBase {
|
|
|
8964
9288
|
super.ngOnInit();
|
|
8965
9289
|
}
|
|
8966
9290
|
startEdit(initiator, type) {
|
|
8967
|
-
if ((initiator === null || initiator === void 0 ? void 0 : initiator.column
|
|
9291
|
+
if ((initiator === null || initiator === void 0 ? void 0 : initiator.column) === this.column.name) {
|
|
8968
9292
|
this.cdr.markForCheck();
|
|
8969
9293
|
setTimeout(() => {
|
|
8970
9294
|
var _a;
|
|
@@ -8977,10 +9301,10 @@ class BooleanCellComponent extends CellComponentBase {
|
|
|
8977
9301
|
}
|
|
8978
9302
|
}
|
|
8979
9303
|
BooleanCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: BooleanCellComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8980
|
-
BooleanCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: BooleanCellComponent, selector: "teta-boolean-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'\"
|
|
9304
|
+
BooleanCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: BooleanCellComponent, selector: "teta-boolean-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 [class.cell-text_disabled]=\"!editable\">\n {{ row.data[column.name] }}\n</span>\n<teta-checkbox\n #input\n *ngIf=\"edit\"\n [binary]=\"true\"\n [(ngModel)]=\"row.data[column.name]\"\n (blur)=\"setValue()\"\n></teta-checkbox>\n", styles: [""], components: [{ type: CheckboxComponent, selector: "teta-checkbox", inputs: ["class", "palette", "noLabel", "disabled", "value", "binary", "allowNull"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8981
9305
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: BooleanCellComponent, decorators: [{
|
|
8982
9306
|
type: Component,
|
|
8983
|
-
args: [{ selector: 'teta-boolean-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"
|
|
9307
|
+
args: [{ selector: 'teta-boolean-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{ row.data[column.name] }}\n</span>\n<teta-checkbox\n #input\n *ngIf=\"edit\"\n [binary]=\"true\"\n [(ngModel)]=\"row.data[column.name]\"\n (blur)=\"setValue()\"\n></teta-checkbox>\n", styles: [""] }]
|
|
8984
9308
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
8985
9309
|
type: Input
|
|
8986
9310
|
}], row: [{
|
|
@@ -9077,11 +9401,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9077
9401
|
}] } });
|
|
9078
9402
|
|
|
9079
9403
|
class TableBodyComponent {
|
|
9080
|
-
constructor(_svc, _cdr) {
|
|
9404
|
+
constructor(_svc, _config, _cdr) {
|
|
9081
9405
|
this._svc = _svc;
|
|
9406
|
+
this._config = _config;
|
|
9082
9407
|
this._cdr = _cdr;
|
|
9083
|
-
this.tableBodyClass = true;
|
|
9084
9408
|
this.selectedRows = [];
|
|
9409
|
+
this.tableBodyClass = true;
|
|
9085
9410
|
this.locked = [];
|
|
9086
9411
|
this.unlocked = [];
|
|
9087
9412
|
this.selectTypeEnum = SelectType;
|
|
@@ -9100,13 +9425,13 @@ class TableBodyComponent {
|
|
|
9100
9425
|
}
|
|
9101
9426
|
return success(data);
|
|
9102
9427
|
};
|
|
9428
|
+
this.locale = this._config.locale;
|
|
9103
9429
|
combineLatest([this._svc.columns, this._svc.hiddenColumns])
|
|
9104
9430
|
.pipe(takeWhile((_) => this._alive))
|
|
9105
9431
|
.subscribe((values) => {
|
|
9106
9432
|
const [columns, hiddenColumns] = values;
|
|
9107
9433
|
this._hiddenColumns = hiddenColumns;
|
|
9108
9434
|
this.columns = ArrayUtil.flatten(columns, 'columns', true).filter((_) => this._hiddenColumns.indexOf(_.name) < 0);
|
|
9109
|
-
this.gridTemplateColumns = TableUtil.getGridTemplateColumns(this.columns.sort((a, b) => Number(b.locked) - Number(a.locked)));
|
|
9110
9435
|
this._cdr.markForCheck();
|
|
9111
9436
|
});
|
|
9112
9437
|
this._svc.displayData.pipe(takeWhile((_) => this._alive)).subscribe((_) => {
|
|
@@ -9120,12 +9445,6 @@ class TableBodyComponent {
|
|
|
9120
9445
|
this._svc.scrollIndex
|
|
9121
9446
|
.pipe(takeWhile((_) => this._alive))
|
|
9122
9447
|
.subscribe((_) => __awaiter(this, void 0, void 0, function* () {
|
|
9123
|
-
// if (this.viewport && this.dataSource && _ !== null) {
|
|
9124
|
-
// await this.dataSource.adapter.relax();
|
|
9125
|
-
// await this.dataSource.adapter.fix({
|
|
9126
|
-
// scrollPosition: (_ + 1) * 24,
|
|
9127
|
-
// });
|
|
9128
|
-
// }
|
|
9129
9448
|
if (this.viewport) {
|
|
9130
9449
|
this.viewport.scrollToIndex(_, 'smooth');
|
|
9131
9450
|
}
|
|
@@ -9149,6 +9468,11 @@ class TableBodyComponent {
|
|
|
9149
9468
|
this._columns = columns;
|
|
9150
9469
|
this.locked = (_a = this._columns) === null || _a === void 0 ? void 0 : _a.filter((_) => _.locked === true);
|
|
9151
9470
|
this.unlocked = (_b = this._columns) === null || _b === void 0 ? void 0 : _b.filter((_) => _.locked === false);
|
|
9471
|
+
const startWidth = this.selectType !== SelectType.none ? 28 : 0;
|
|
9472
|
+
this.lockedFlex = this.locked.reduce((prev, curr) => prev + curr.flex, 0);
|
|
9473
|
+
this.lockedWidth = this.locked.reduce((prev, curr) => prev + curr.width, startWidth);
|
|
9474
|
+
this.totalFlex = this._columns.reduce((prev, curr) => prev + curr.flex, 0);
|
|
9475
|
+
this.totalWidth = this._columns.reduce((prev, curr) => prev + curr.width, startWidth);
|
|
9152
9476
|
}
|
|
9153
9477
|
get columns() {
|
|
9154
9478
|
return this._columns;
|
|
@@ -9177,44 +9501,19 @@ class TableBodyComponent {
|
|
|
9177
9501
|
}
|
|
9178
9502
|
getAggregateText(column) {
|
|
9179
9503
|
if (column.aggregate === AggregationType.sum) {
|
|
9180
|
-
return '
|
|
9504
|
+
return 'sum';
|
|
9181
9505
|
}
|
|
9182
9506
|
if (column.aggregate === AggregationType.avg) {
|
|
9183
|
-
return '
|
|
9507
|
+
return 'avg';
|
|
9184
9508
|
}
|
|
9185
9509
|
if (column.aggregate === AggregationType.min) {
|
|
9186
|
-
return '
|
|
9510
|
+
return 'min';
|
|
9187
9511
|
}
|
|
9188
9512
|
if (column.aggregate === AggregationType.max) {
|
|
9189
|
-
return '
|
|
9513
|
+
return 'max';
|
|
9190
9514
|
}
|
|
9191
9515
|
return '';
|
|
9192
9516
|
}
|
|
9193
|
-
getSpan() {
|
|
9194
|
-
var _a;
|
|
9195
|
-
if (((_a = this.locked) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
9196
|
-
let span = this.locked.length;
|
|
9197
|
-
if (this.selectType !== SelectType.none) {
|
|
9198
|
-
span += 1;
|
|
9199
|
-
}
|
|
9200
|
-
return `span ${span}`;
|
|
9201
|
-
}
|
|
9202
|
-
return null;
|
|
9203
|
-
}
|
|
9204
|
-
getTemplateColumns() {
|
|
9205
|
-
let template = this.gridTemplateColumns;
|
|
9206
|
-
if (this.selectType !== SelectType.none) {
|
|
9207
|
-
template = `48px ${template}`;
|
|
9208
|
-
}
|
|
9209
|
-
return template;
|
|
9210
|
-
}
|
|
9211
|
-
getLockedGridTemplateColumns(columns) {
|
|
9212
|
-
let template = TableUtil.getGridTemplateColumns(columns);
|
|
9213
|
-
if (this.selectType !== SelectType.none) {
|
|
9214
|
-
template = `48px ${template}`;
|
|
9215
|
-
}
|
|
9216
|
-
return template;
|
|
9217
|
-
}
|
|
9218
9517
|
trackRow(index, row) {
|
|
9219
9518
|
return index;
|
|
9220
9519
|
}
|
|
@@ -9241,16 +9540,16 @@ class TableBodyComponent {
|
|
|
9241
9540
|
: current.data[columnName], null);
|
|
9242
9541
|
}
|
|
9243
9542
|
}
|
|
9244
|
-
TableBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableBodyComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
9245
|
-
TableBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: TableBodyComponent, selector: "teta-table-body", inputs: { virtual: "virtual", activeRow: "activeRow",
|
|
9543
|
+
TableBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableBodyComponent, deps: [{ token: TableService }, { token: TetaConfigService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
9544
|
+
TableBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: TableBodyComponent, selector: "teta-table-body", inputs: { virtual: "virtual", activeRow: "activeRow", selectedRows: "selectedRows", additionalComponent: "additionalComponent", tree: "tree", aggregate: "aggregate", grouping: "grouping", groupRowComponent: "groupRowComponent", openLevels: "openLevels", selectType: "selectType", rowClass: "rowClass" }, host: { properties: { "class.table-body": "this.tableBodyClass" } }, viewQueries: [{ propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true }], ngImport: i0, template: "<cdk-virtual-scroll-viewport *ngIf=\"virtual\"\n class=\"table-body-container\"\n [itemSize]=\"28\">\n <ng-container *cdkVirtualFor=\"let row of data;templateCacheSize: 0; let rowIndex = index; trackBy: trackRow;\">\n <ng-container *ngTemplateOutlet=\"bodyTemplate; context: {row: row, rowIndex: rowIndex}\"></ng-container>\n </ng-container>\n</cdk-virtual-scroll-viewport>\n<div *ngIf=\"!virtual\"\n class=\"table-body-container\">\n <ng-container *ngFor=\"let row of data; let rowIndex = index; trackBy: trackRow;\">\n <ng-container *ngTemplateOutlet=\"bodyTemplate; context: {row: row, rowIndex: rowIndex}\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"aggregate\">\n <ng-container *ngTemplateOutlet=\"aggTemplate;\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #bodyTemplate let-row=\"row\" let-rowIndex=\"rowIndex\">\n <div class=\"table-row\"\n (click)=\"setActiveRow(row)\"\n (contextmenu)=\"setActiveRow(row)\"\n [attr.data-row]=\"rowIndex\"\n [class.table-row_odd]=\"rowIndex % 2 === 1\"\n [ngClass]=\"rowClass ? rowClass(row, rowIndex) : ''\"\n [class.table-row_active]=\"row === activeRow || (selectedRows && selectedRows.indexOf(row) >= 0)\"\n [style.flex-grow]=\"totalFlex\"\n [style.flex-basis.px]=\"totalWidth\"\n [style.min-width.px]=\"totalWidth\">\n <ng-container *ngIf=\"!grouping\">\n <div class=\"table-row_locked\"\n *ngIf=\"locked.length > 0\"\n [style.flex-grow]=\"lockedFlex\"\n [style.flex-basis.px]=\"lockedWidth\"\n [style.min-width.px]=\"lockedWidth\"\n [style.zIndex]=\"row === activeRow ? 1 : 'unset'\">\n <teta-selection-cell *ngIf=\"selectType !== selectTypeEnum.none && locked.length\"\n [row]=\"row\"\n style=\"width: 28px;\"></teta-selection-cell>\n <teta-cell\n *ngFor=\"let column of locked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-row]=\"rowIndex\"\n [attr.data-column]=\"column.name\"\n [column]=\"column\"\n [filterOptions]=\"dict?dict[column.name]:[]\"\n [dict]=\"dict\"\n [row]=\"row\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\"\n ></teta-cell>\n </div>\n <teta-selection-cell *ngIf=\"selectType !== selectTypeEnum.none && locked.length < 1\"\n [row]=\"row\"\n style=\"width: 28px;\"></teta-selection-cell>\n <teta-cell\n *ngFor=\"let column of unlocked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-row]=\"rowIndex\"\n [attr.data-column]=\"column.name\"\n [column]=\"column\"\n [filterOptions]=\"dict?dict[column.name]:[]\"\n [dict]=\"dict\"\n [row]=\"row\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\"\n ></teta-cell>\n </ng-container>\n <ng-container *ngIf=\"grouping\">\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #aggTemplate>\n <ng-container *ngIf=\"locale | async as loc\">\n <div class=\"table-row\"\n *ngIf=\"aggregate\"\n [class.table-row_virtual]=\"virtual\"\n [style.flex-grow]=\"virtual ? totalFlex : ''\"\n [style.flex-basis.px]=\"virtual ? totalWidth : ''\"\n [style.min-width.px]=\"virtual ? totalWidth : ''\">\n <div class=\"table-row_locked\"\n *ngIf=\"locked.length > 0\"\n [style.flex-grow]=\"lockedFlex\"\n [style.flex-basis.px]=\"lockedWidth\"\n [style.min-width.px]=\"lockedWidth\">\n <div class=\"cell align-center justify-content-center\"\n style=\"width: 28px;\">\n <teta-icon [name]=\"'sumColor'\"></teta-icon>\n </div>\n <div class=\"cell cell-component justify-content-end\"\n *ngFor=\"let column of locked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-column]=\"column.name\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\">\n <span class=\"cell-text cell-text_numeric font-title-3\">\n {{loc[getAggregateText(column)]}}:\n {{getAggregateValue(column) | tetaNumber : 2}}\n </span>\n </div>\n </div>\n <div class=\"cell align-center justify-content-center\"\n style=\"width: 28px;\"\n *ngIf=\"selectType !== selectTypeEnum.none && locked.length < 1\">\n <teta-icon [name]=\"'sumColor'\"></teta-icon>\n </div>\n <div class=\"cell cell-component justify-content-end\"\n *ngFor=\"let column of unlocked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-column]=\"column.name\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\">\n <span class=\"cell-text cell-text_numeric font-title-3\">\n {{loc[getAggregateText(column)]}}:\n {{getAggregateValue(column) | tetaNumber : 2}}\n </span>\n </div>\n </div>\n </ng-container>\n</ng-template>\n", styles: [""], components: [{ type: i4.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { type: SelectionCellComponent, selector: "teta-selection-cell", inputs: ["row"] }, { type: CellComponent, selector: "teta-cell", inputs: ["column", "filterOptions", "dict", "row"] }, { type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { type: i4.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i3.AsyncPipe, "tetaNumber": NumberPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9246
9545
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableBodyComponent, decorators: [{
|
|
9247
9546
|
type: Component,
|
|
9248
|
-
args: [{ selector: 'teta-table-body', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cdk-virtual-scroll-viewport *ngIf=\"virtual\"\n class=\"table-body-container\"\n [itemSize]=\"
|
|
9249
|
-
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { virtual: [{
|
|
9547
|
+
args: [{ selector: 'teta-table-body', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cdk-virtual-scroll-viewport *ngIf=\"virtual\"\n class=\"table-body-container\"\n [itemSize]=\"28\">\n <ng-container *cdkVirtualFor=\"let row of data;templateCacheSize: 0; let rowIndex = index; trackBy: trackRow;\">\n <ng-container *ngTemplateOutlet=\"bodyTemplate; context: {row: row, rowIndex: rowIndex}\"></ng-container>\n </ng-container>\n</cdk-virtual-scroll-viewport>\n<div *ngIf=\"!virtual\"\n class=\"table-body-container\">\n <ng-container *ngFor=\"let row of data; let rowIndex = index; trackBy: trackRow;\">\n <ng-container *ngTemplateOutlet=\"bodyTemplate; context: {row: row, rowIndex: rowIndex}\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"aggregate\">\n <ng-container *ngTemplateOutlet=\"aggTemplate;\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #bodyTemplate let-row=\"row\" let-rowIndex=\"rowIndex\">\n <div class=\"table-row\"\n (click)=\"setActiveRow(row)\"\n (contextmenu)=\"setActiveRow(row)\"\n [attr.data-row]=\"rowIndex\"\n [class.table-row_odd]=\"rowIndex % 2 === 1\"\n [ngClass]=\"rowClass ? rowClass(row, rowIndex) : ''\"\n [class.table-row_active]=\"row === activeRow || (selectedRows && selectedRows.indexOf(row) >= 0)\"\n [style.flex-grow]=\"totalFlex\"\n [style.flex-basis.px]=\"totalWidth\"\n [style.min-width.px]=\"totalWidth\">\n <ng-container *ngIf=\"!grouping\">\n <div class=\"table-row_locked\"\n *ngIf=\"locked.length > 0\"\n [style.flex-grow]=\"lockedFlex\"\n [style.flex-basis.px]=\"lockedWidth\"\n [style.min-width.px]=\"lockedWidth\"\n [style.zIndex]=\"row === activeRow ? 1 : 'unset'\">\n <teta-selection-cell *ngIf=\"selectType !== selectTypeEnum.none && locked.length\"\n [row]=\"row\"\n style=\"width: 28px;\"></teta-selection-cell>\n <teta-cell\n *ngFor=\"let column of locked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-row]=\"rowIndex\"\n [attr.data-column]=\"column.name\"\n [column]=\"column\"\n [filterOptions]=\"dict?dict[column.name]:[]\"\n [dict]=\"dict\"\n [row]=\"row\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\"\n ></teta-cell>\n </div>\n <teta-selection-cell *ngIf=\"selectType !== selectTypeEnum.none && locked.length < 1\"\n [row]=\"row\"\n style=\"width: 28px;\"></teta-selection-cell>\n <teta-cell\n *ngFor=\"let column of unlocked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-row]=\"rowIndex\"\n [attr.data-column]=\"column.name\"\n [column]=\"column\"\n [filterOptions]=\"dict?dict[column.name]:[]\"\n [dict]=\"dict\"\n [row]=\"row\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\"\n ></teta-cell>\n </ng-container>\n <ng-container *ngIf=\"grouping\">\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #aggTemplate>\n <ng-container *ngIf=\"locale | async as loc\">\n <div class=\"table-row\"\n *ngIf=\"aggregate\"\n [class.table-row_virtual]=\"virtual\"\n [style.flex-grow]=\"virtual ? totalFlex : ''\"\n [style.flex-basis.px]=\"virtual ? totalWidth : ''\"\n [style.min-width.px]=\"virtual ? totalWidth : ''\">\n <div class=\"table-row_locked\"\n *ngIf=\"locked.length > 0\"\n [style.flex-grow]=\"lockedFlex\"\n [style.flex-basis.px]=\"lockedWidth\"\n [style.min-width.px]=\"lockedWidth\">\n <div class=\"cell align-center justify-content-center\"\n style=\"width: 28px;\">\n <teta-icon [name]=\"'sumColor'\"></teta-icon>\n </div>\n <div class=\"cell cell-component justify-content-end\"\n *ngFor=\"let column of locked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-column]=\"column.name\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\">\n <span class=\"cell-text cell-text_numeric font-title-3\">\n {{loc[getAggregateText(column)]}}:\n {{getAggregateValue(column) | tetaNumber : 2}}\n </span>\n </div>\n </div>\n <div class=\"cell align-center justify-content-center\"\n style=\"width: 28px;\"\n *ngIf=\"selectType !== selectTypeEnum.none && locked.length < 1\">\n <teta-icon [name]=\"'sumColor'\"></teta-icon>\n </div>\n <div class=\"cell cell-component justify-content-end\"\n *ngFor=\"let column of unlocked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-column]=\"column.name\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\">\n <span class=\"cell-text cell-text_numeric font-title-3\">\n {{loc[getAggregateText(column)]}}:\n {{getAggregateValue(column) | tetaNumber : 2}}\n </span>\n </div>\n </div>\n </ng-container>\n</ng-template>\n", styles: [""] }]
|
|
9548
|
+
}], ctorParameters: function () { return [{ type: TableService }, { type: TetaConfigService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { virtual: [{
|
|
9250
9549
|
type: Input
|
|
9251
9550
|
}], activeRow: [{
|
|
9252
9551
|
type: Input
|
|
9253
|
-
}],
|
|
9552
|
+
}], selectedRows: [{
|
|
9254
9553
|
type: Input
|
|
9255
9554
|
}], additionalComponent: [{
|
|
9256
9555
|
type: Input
|
|
@@ -9276,120 +9575,305 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9276
9575
|
args: ['class.table-body']
|
|
9277
9576
|
}] } });
|
|
9278
9577
|
|
|
9279
|
-
class
|
|
9280
|
-
constructor(
|
|
9281
|
-
this.
|
|
9282
|
-
this.
|
|
9283
|
-
this.
|
|
9284
|
-
this.columns = [];
|
|
9285
|
-
this.rowHeight = 24;
|
|
9286
|
-
this.selectType = SelectType.none;
|
|
9287
|
-
this.groupRowComponent = GroupRowComponent;
|
|
9288
|
-
this.contextMenuConfig = new TableContextMenuConfig();
|
|
9289
|
-
this.showHeadCellMenu = true;
|
|
9290
|
-
this.stateChange = new EventEmitter();
|
|
9291
|
-
this.bodyLeft = new EventEmitter();
|
|
9292
|
-
this.activeRowChange = new EventEmitter();
|
|
9293
|
-
this.selectedRowsChange = new EventEmitter();
|
|
9294
|
-
this.rowLeft = new EventEmitter();
|
|
9295
|
-
this.rowEditStart = new EventEmitter();
|
|
9296
|
-
this.rowEditEnd = new EventEmitter();
|
|
9297
|
-
this.cellClick = new EventEmitter();
|
|
9298
|
-
this.cellDoubleClick = new EventEmitter();
|
|
9299
|
-
this.cellFocus = new EventEmitter();
|
|
9300
|
-
this.cellEditStart = new EventEmitter();
|
|
9301
|
-
this.cellEditEnd = new EventEmitter();
|
|
9302
|
-
this.valueChange = new EventEmitter();
|
|
9303
|
-
this.cellKeyUp = new EventEmitter();
|
|
9304
|
-
this.pasteRows = new EventEmitter();
|
|
9305
|
-
this.addRow = new EventEmitter();
|
|
9306
|
-
this.deleteRows = new EventEmitter();
|
|
9307
|
-
this.tableService = new EventEmitter();
|
|
9308
|
-
this.tableClass = true;
|
|
9309
|
-
this._alive = true;
|
|
9310
|
-
this.onScroll = () => {
|
|
9311
|
-
this._headElement.scrollLeft = this._bodyElement.scrollLeft;
|
|
9312
|
-
};
|
|
9313
|
-
this._svc.state
|
|
9314
|
-
.pipe(takeWhile((_) => this._alive), filter((state) => state !== this._state))
|
|
9315
|
-
.subscribe((state) => this.stateChange.next(state));
|
|
9316
|
-
this._svc.editCellStart
|
|
9317
|
-
.pipe(takeWhile((_) => this._alive))
|
|
9318
|
-
.subscribe((item) => this.cellEditStart.emit(item));
|
|
9319
|
-
this._svc.editCellStop
|
|
9320
|
-
.pipe(takeWhile((_) => this._alive))
|
|
9321
|
-
.subscribe((item) => this.cellEditEnd.emit(item));
|
|
9322
|
-
this._svc.editRowStart
|
|
9323
|
-
.pipe(takeWhile((_) => this._alive))
|
|
9324
|
-
.subscribe((item) => this.rowEditStart.emit(item === null || item === void 0 ? void 0 : item.row));
|
|
9325
|
-
this._svc.editRowStop
|
|
9326
|
-
.pipe(takeWhile((_) => this._alive))
|
|
9327
|
-
.subscribe((item) => this.rowEditEnd.emit(item === null || item === void 0 ? void 0 : item.row));
|
|
9328
|
-
this._svc.selectedRows
|
|
9329
|
-
.pipe(takeWhile((_) => this._alive))
|
|
9330
|
-
.subscribe((items) => {
|
|
9331
|
-
this.selectedRowsList = items;
|
|
9332
|
-
this.selectedRowsChange.emit(items);
|
|
9333
|
-
});
|
|
9334
|
-
this._svc.activeRow
|
|
9335
|
-
.pipe(takeWhile((_) => this._alive))
|
|
9336
|
-
.subscribe((item) => this.activeRowChange.emit(item));
|
|
9337
|
-
this._svc.valueChanged
|
|
9338
|
-
.pipe(takeWhile((_) => this._alive))
|
|
9339
|
-
.subscribe((coordinates) => {
|
|
9340
|
-
this.valueChange.emit(coordinates);
|
|
9341
|
-
});
|
|
9578
|
+
class ClickService {
|
|
9579
|
+
constructor(_document) {
|
|
9580
|
+
this._document = _document;
|
|
9581
|
+
this.click = fromEvent(this._document, 'click');
|
|
9582
|
+
this.contextMenu = fromEvent(this._document, 'contextmenu');
|
|
9342
9583
|
}
|
|
9343
|
-
|
|
9344
|
-
|
|
9584
|
+
}
|
|
9585
|
+
ClickService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ClickService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
9586
|
+
ClickService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ClickService, providedIn: 'root' });
|
|
9587
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ClickService, decorators: [{
|
|
9588
|
+
type: Injectable,
|
|
9589
|
+
args: [{
|
|
9590
|
+
providedIn: 'root',
|
|
9591
|
+
}]
|
|
9592
|
+
}], ctorParameters: function () {
|
|
9593
|
+
return [{ type: undefined, decorators: [{
|
|
9594
|
+
type: Inject,
|
|
9595
|
+
args: [DOCUMENT]
|
|
9596
|
+
}] }];
|
|
9597
|
+
} });
|
|
9598
|
+
|
|
9599
|
+
class ContextMenuDirective extends DynamicContentBaseDirective {
|
|
9600
|
+
constructor(_document, _elementRef, _service, _injector, _zone, _cdr, _click) {
|
|
9601
|
+
super(_document, _elementRef, _service, _injector, _zone, _cdr);
|
|
9602
|
+
this._document = _document;
|
|
9603
|
+
this._elementRef = _elementRef;
|
|
9604
|
+
this._service = _service;
|
|
9605
|
+
this._injector = _injector;
|
|
9606
|
+
this._zone = _zone;
|
|
9607
|
+
this._cdr = _cdr;
|
|
9608
|
+
this._click = _click;
|
|
9345
9609
|
}
|
|
9346
|
-
|
|
9347
|
-
this.
|
|
9610
|
+
get _dynamicContent() {
|
|
9611
|
+
return this.tetaContextMenu;
|
|
9348
9612
|
}
|
|
9349
|
-
|
|
9350
|
-
|
|
9351
|
-
|
|
9352
|
-
|
|
9353
|
-
|
|
9354
|
-
|
|
9355
|
-
}
|
|
9356
|
-
}
|
|
9357
|
-
if (!this.eventIsOnRow(event) && !event.defaultPrevented) {
|
|
9358
|
-
this._svc.startEditRow(null);
|
|
9613
|
+
showContent(event) {
|
|
9614
|
+
if (this.tetaContextMenu) {
|
|
9615
|
+
event.preventDefault();
|
|
9616
|
+
setTimeout(() => {
|
|
9617
|
+
this.createMenu(event);
|
|
9618
|
+
});
|
|
9359
9619
|
}
|
|
9360
9620
|
}
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
|
|
9621
|
+
click(event) {
|
|
9622
|
+
if (this._componentRef &&
|
|
9623
|
+
DomUtil.clickedInside(this._componentRef.location.nativeElement, event)) {
|
|
9624
|
+
event.preventDefault();
|
|
9625
|
+
event.stopPropagation();
|
|
9626
|
+
}
|
|
9627
|
+
}
|
|
9628
|
+
ngOnInit() {
|
|
9629
|
+
super.ngOnInit();
|
|
9630
|
+
merge(this._click.click, this._click.contextMenu)
|
|
9631
|
+
.pipe(takeWhile(() => this._alive), filter(() => this._open), filter(() => this._componentRef != null), filter((event) => !DomUtil.clickedInside(this._componentRef.location.nativeElement, event)), tap((_) => {
|
|
9632
|
+
this.destroyContentRef();
|
|
9633
|
+
this.openChange.emit(false);
|
|
9634
|
+
}))
|
|
9635
|
+
.subscribe();
|
|
9636
|
+
}
|
|
9637
|
+
ngOnDestroy() {
|
|
9638
|
+
super.ngOnDestroy();
|
|
9639
|
+
}
|
|
9640
|
+
setPosition() {
|
|
9641
|
+
if (this._componentRef && this._open) {
|
|
9642
|
+
const position = PositionUtil.getPosition({
|
|
9643
|
+
top: this._eventPoint.y,
|
|
9644
|
+
bottom: this._eventPoint.y,
|
|
9645
|
+
left: this._eventPoint.x,
|
|
9646
|
+
right: this._eventPoint.x,
|
|
9647
|
+
}, this._componentRef.location.nativeElement.getBoundingClientRect(), this.align, this.verticalAlign);
|
|
9648
|
+
PositionUtil.setElementPosition(this._componentRef.location.nativeElement, position);
|
|
9649
|
+
}
|
|
9650
|
+
}
|
|
9651
|
+
createMenu(event) {
|
|
9652
|
+
if (this.tetaContextMenu == null) {
|
|
9653
|
+
return;
|
|
9654
|
+
}
|
|
9655
|
+
this._eventPoint = event;
|
|
9656
|
+
this._componentRef = this.createContentRef();
|
|
9657
|
+
this._componentRef.instance.className = [
|
|
9658
|
+
...ArrayUtil.asArray(this.className),
|
|
9659
|
+
'context-menu',
|
|
9660
|
+
];
|
|
9661
|
+
this.openChange.emit(true);
|
|
9662
|
+
}
|
|
9663
|
+
}
|
|
9664
|
+
ContextMenuDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuDirective, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }, { token: DynamicComponentService }, { token: i0.Injector }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: ClickService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
9665
|
+
ContextMenuDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.1", type: ContextMenuDirective, selector: "[tetaContextMenu]", inputs: { tetaContextMenu: "tetaContextMenu" }, host: { listeners: { "contextmenu": "showContent($event)", "click": "click($event)" } }, usesInheritance: true, ngImport: i0 });
|
|
9666
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuDirective, decorators: [{
|
|
9667
|
+
type: Directive,
|
|
9668
|
+
args: [{
|
|
9669
|
+
selector: '[tetaContextMenu]',
|
|
9670
|
+
}]
|
|
9671
|
+
}], ctorParameters: function () {
|
|
9672
|
+
return [{ type: undefined, decorators: [{
|
|
9673
|
+
type: Inject,
|
|
9674
|
+
args: [DOCUMENT]
|
|
9675
|
+
}] }, { type: i0.ElementRef }, { type: DynamicComponentService }, { type: i0.Injector }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: ClickService }];
|
|
9676
|
+
}, propDecorators: { tetaContextMenu: [{
|
|
9677
|
+
type: Input
|
|
9678
|
+
}], showContent: [{
|
|
9679
|
+
type: HostListener,
|
|
9680
|
+
args: ['contextmenu', ['$event']]
|
|
9681
|
+
}], click: [{
|
|
9682
|
+
type: HostListener,
|
|
9683
|
+
args: ['click', ['$event']]
|
|
9684
|
+
}] } });
|
|
9685
|
+
|
|
9686
|
+
class TableComponent {
|
|
9687
|
+
constructor(_svc, _elementRef) {
|
|
9688
|
+
this._svc = _svc;
|
|
9689
|
+
this._elementRef = _elementRef;
|
|
9690
|
+
this.data = [];
|
|
9691
|
+
this.columns = [];
|
|
9692
|
+
this.selectType = SelectType.multiple;
|
|
9693
|
+
this.groupRowComponent = GroupRowComponent;
|
|
9694
|
+
this.trackRow = (index, row) => index;
|
|
9695
|
+
this.editType = EditType.cell;
|
|
9696
|
+
this.editEvent = EditEvent.doubleClick;
|
|
9697
|
+
this.showHeadCellMenu = true;
|
|
9698
|
+
this.contextMenuOpenChange = new EventEmitter();
|
|
9699
|
+
this.stateChange = new EventEmitter();
|
|
9700
|
+
this.bodyLeft = new EventEmitter();
|
|
9701
|
+
this.activeRowChange = new EventEmitter();
|
|
9702
|
+
this.selectedRowsChange = new EventEmitter();
|
|
9703
|
+
this.cellClick = new EventEmitter();
|
|
9704
|
+
this.cellDoubleClick = new EventEmitter();
|
|
9705
|
+
this.cellFocus = new EventEmitter();
|
|
9706
|
+
this.cellKeyDown = new EventEmitter();
|
|
9707
|
+
this.rowLeft = new EventEmitter();
|
|
9708
|
+
this.rowEditStart = new EventEmitter();
|
|
9709
|
+
this.rowEditEnd = new EventEmitter();
|
|
9710
|
+
this.cellEditStart = new EventEmitter();
|
|
9711
|
+
this.cellEditEnd = new EventEmitter();
|
|
9712
|
+
this.valueChange = new EventEmitter();
|
|
9713
|
+
this.tableService = new EventEmitter();
|
|
9714
|
+
this.tableClass = true;
|
|
9715
|
+
this._alive = true;
|
|
9716
|
+
this.onScroll = () => {
|
|
9717
|
+
this._headElement.scrollLeft = this._bodyElement.scrollLeft;
|
|
9718
|
+
};
|
|
9719
|
+
this._svc.state
|
|
9720
|
+
.pipe(takeWhile((_) => this._alive), filter((state) => state !== this._state))
|
|
9721
|
+
.subscribe((state) => this.stateChange.next(state));
|
|
9722
|
+
this._svc.editCellStart
|
|
9723
|
+
.pipe(takeWhile((_) => this._alive))
|
|
9724
|
+
.subscribe((item) => this.cellEditStart.emit(this._svc.getCellInstance(item)));
|
|
9725
|
+
this._svc.editCellStop
|
|
9726
|
+
.pipe(takeWhile((_) => this._alive))
|
|
9727
|
+
.subscribe((item) => this.cellEditEnd.emit(this._svc.getCellInstance(item)));
|
|
9728
|
+
this._svc.editRowStart
|
|
9729
|
+
.pipe(takeWhile((_) => this._alive))
|
|
9730
|
+
.subscribe((item) => this.rowEditStart.emit(this._svc.getCellInstance(item)));
|
|
9731
|
+
this._svc.editRowStop
|
|
9732
|
+
.pipe(takeWhile((_) => this._alive))
|
|
9733
|
+
.subscribe((item) => this.rowEditEnd.emit(this._svc.getRowByIndex(item === null || item === void 0 ? void 0 : item.row)));
|
|
9734
|
+
this._svc.selectedRows
|
|
9735
|
+
.pipe(takeWhile((_) => this._alive))
|
|
9736
|
+
.subscribe((items) => {
|
|
9737
|
+
this.selectedRowsList = items;
|
|
9738
|
+
this.selectedRowsChange.emit(items);
|
|
9739
|
+
});
|
|
9740
|
+
this._svc.activeRow
|
|
9741
|
+
.pipe(takeWhile((_) => this._alive))
|
|
9742
|
+
.subscribe((item) => this.activeRowChange.emit(item));
|
|
9743
|
+
this._svc.valueChanged
|
|
9744
|
+
.pipe(takeWhile((_) => this._alive))
|
|
9745
|
+
.subscribe((coordinates) => {
|
|
9746
|
+
this.valueChange.emit(this._svc.getCellInstance(coordinates));
|
|
9747
|
+
});
|
|
9748
|
+
}
|
|
9749
|
+
set state(state) {
|
|
9750
|
+
this._state = state;
|
|
9751
|
+
}
|
|
9752
|
+
set scrollToIndex(index) {
|
|
9753
|
+
this._svc.scrollToIndex(index);
|
|
9754
|
+
}
|
|
9755
|
+
handleClickOutsideAnyRow(event) {
|
|
9756
|
+
const coordinates = this.getCoordinates(event);
|
|
9757
|
+
if (coordinates) {
|
|
9758
|
+
this.cellClick.emit(Object.assign(Object.assign({}, this._svc.getCellInstance(coordinates)), { event }));
|
|
9759
|
+
if (this.editEvent === EditEvent.click) {
|
|
9366
9760
|
this.startEditRowOrCell(coordinates);
|
|
9367
9761
|
}
|
|
9762
|
+
else {
|
|
9763
|
+
if (this._svc.currentEditCell && (coordinates.row !== this._svc.currentEditCell.row || coordinates.column !== this._svc.currentEditCell.column)) {
|
|
9764
|
+
this.startEditRowOrCell(null);
|
|
9765
|
+
}
|
|
9766
|
+
}
|
|
9767
|
+
}
|
|
9768
|
+
const row = this.getRow(event);
|
|
9769
|
+
if (row) {
|
|
9770
|
+
if (event.ctrlKey) {
|
|
9771
|
+
this._svc.selectOrDeselectRow(row);
|
|
9772
|
+
}
|
|
9773
|
+
if (event.shiftKey) {
|
|
9774
|
+
this._svc.selectRange(row);
|
|
9775
|
+
}
|
|
9776
|
+
}
|
|
9777
|
+
if (!this.eventIsOnRow(event) && !event.defaultPrevented) {
|
|
9778
|
+
if (this.editType === EditType.row) {
|
|
9779
|
+
this._svc.startEditRow(null);
|
|
9780
|
+
}
|
|
9781
|
+
else {
|
|
9782
|
+
this._svc.startEditCell(null);
|
|
9783
|
+
}
|
|
9368
9784
|
}
|
|
9369
9785
|
}
|
|
9370
|
-
|
|
9786
|
+
focusIn(event) {
|
|
9371
9787
|
const coordinates = this.getCoordinates(event);
|
|
9372
9788
|
if (coordinates) {
|
|
9373
|
-
this.
|
|
9374
|
-
if (this.editEvent === EditEvent.
|
|
9789
|
+
this.cellFocus.emit(Object.assign(Object.assign({}, this._svc.getCellInstance(coordinates)), { event }));
|
|
9790
|
+
if (this.editEvent === EditEvent.focus) {
|
|
9375
9791
|
this.startEditRowOrCell(coordinates);
|
|
9376
9792
|
}
|
|
9377
9793
|
}
|
|
9378
9794
|
}
|
|
9379
|
-
|
|
9795
|
+
dblclick(event) {
|
|
9380
9796
|
const coordinates = this.getCoordinates(event);
|
|
9381
9797
|
if (coordinates) {
|
|
9382
|
-
this.
|
|
9798
|
+
this.cellDoubleClick.emit(Object.assign(Object.assign({}, this._svc.getCellInstance(coordinates)), { event }));
|
|
9799
|
+
if (this.editEvent === EditEvent.doubleClick) {
|
|
9800
|
+
this.startEditRowOrCell(coordinates);
|
|
9801
|
+
}
|
|
9383
9802
|
}
|
|
9384
|
-
|
|
9385
|
-
|
|
9803
|
+
}
|
|
9804
|
+
keydown(event) {
|
|
9805
|
+
if (event.key === 'Escape') {
|
|
9806
|
+
if (this.editType === EditType.row) {
|
|
9386
9807
|
this._svc.startEditRow(null);
|
|
9387
|
-
|
|
9388
|
-
|
|
9808
|
+
}
|
|
9809
|
+
else {
|
|
9810
|
+
this._svc.startEditCell(null);
|
|
9811
|
+
}
|
|
9812
|
+
}
|
|
9813
|
+
const coordinates = this.getCoordinates(event);
|
|
9814
|
+
if (event.key === 'Enter') {
|
|
9815
|
+
if (this.editType === EditType.row) {
|
|
9389
9816
|
this._svc.startEditRow(null);
|
|
9390
|
-
|
|
9391
|
-
|
|
9392
|
-
|
|
9817
|
+
}
|
|
9818
|
+
else {
|
|
9819
|
+
if (this._svc.currentEditCell) {
|
|
9820
|
+
const target = this._svc.getNextRowCell(coordinates);
|
|
9821
|
+
if (target) {
|
|
9822
|
+
this.startEditRowOrCell({
|
|
9823
|
+
row: target.row,
|
|
9824
|
+
column: target.column,
|
|
9825
|
+
event: undefined
|
|
9826
|
+
});
|
|
9827
|
+
}
|
|
9828
|
+
else {
|
|
9829
|
+
this._svc.startEditCell(null);
|
|
9830
|
+
}
|
|
9831
|
+
}
|
|
9832
|
+
}
|
|
9833
|
+
}
|
|
9834
|
+
if (coordinates) {
|
|
9835
|
+
this.cellKeyDown.emit(Object.assign(Object.assign({}, this._svc.getCellInstance(coordinates)), { event }));
|
|
9836
|
+
if (event.key && (event.key.length === 1 || event.key === 'Delete')) {
|
|
9837
|
+
this.startEditRowOrCell({
|
|
9838
|
+
row: coordinates.row,
|
|
9839
|
+
column: coordinates.column,
|
|
9840
|
+
event: event
|
|
9841
|
+
});
|
|
9842
|
+
}
|
|
9843
|
+
if (event.key === 'Tab' && this._svc.currentEditCell) {
|
|
9844
|
+
event.preventDefault();
|
|
9845
|
+
let target = this._svc.getNextEditableCell(coordinates);
|
|
9846
|
+
if (event.shiftKey) {
|
|
9847
|
+
target = this._svc.getPreviousEditableCell(coordinates);
|
|
9848
|
+
}
|
|
9849
|
+
if (target) {
|
|
9850
|
+
this.startEditRowOrCell({
|
|
9851
|
+
row: target.row,
|
|
9852
|
+
column: target.column,
|
|
9853
|
+
event: undefined
|
|
9854
|
+
});
|
|
9855
|
+
}
|
|
9856
|
+
}
|
|
9857
|
+
if (!this._svc.currentEditCell) {
|
|
9858
|
+
let target;
|
|
9859
|
+
if (event.key === 'ArrowRight') {
|
|
9860
|
+
target = this._svc.getNextCell(coordinates);
|
|
9861
|
+
}
|
|
9862
|
+
if (event.key === 'ArrowLeft') {
|
|
9863
|
+
target = this._svc.getPreviousCell(coordinates);
|
|
9864
|
+
}
|
|
9865
|
+
if (event.key === 'ArrowUp') {
|
|
9866
|
+
target = this._svc.getPreviousRowCell(coordinates);
|
|
9867
|
+
}
|
|
9868
|
+
if (event.key === 'ArrowDown') {
|
|
9869
|
+
target = this._svc.getNextRowCell(coordinates);
|
|
9870
|
+
}
|
|
9871
|
+
if (target) {
|
|
9872
|
+
event.preventDefault();
|
|
9873
|
+
const element = this.getCellElement(target);
|
|
9874
|
+
element === null || element === void 0 ? void 0 : element.focus();
|
|
9875
|
+
}
|
|
9876
|
+
}
|
|
9393
9877
|
}
|
|
9394
9878
|
}
|
|
9395
9879
|
mousedown(event) {
|
|
@@ -9397,51 +9881,6 @@ class TableComponent {
|
|
|
9397
9881
|
event.preventDefault();
|
|
9398
9882
|
}
|
|
9399
9883
|
}
|
|
9400
|
-
contextMenu(event) {
|
|
9401
|
-
var _a;
|
|
9402
|
-
if (this.getSelectedText() ||
|
|
9403
|
-
((_a = this.contextMenuConfig) === null || _a === void 0 ? void 0 : _a.contextMenu) === false) {
|
|
9404
|
-
return;
|
|
9405
|
-
}
|
|
9406
|
-
event.preventDefault();
|
|
9407
|
-
event.stopPropagation();
|
|
9408
|
-
this.contextMenuTarget = this.getCoordinates(event);
|
|
9409
|
-
this.showContextMenu = true;
|
|
9410
|
-
this.setPosition(event);
|
|
9411
|
-
}
|
|
9412
|
-
rowAdd() {
|
|
9413
|
-
this.addRow.emit();
|
|
9414
|
-
this.contextMenuTarget = null;
|
|
9415
|
-
this.showContextMenu = false;
|
|
9416
|
-
}
|
|
9417
|
-
copy(rows) {
|
|
9418
|
-
of(1)
|
|
9419
|
-
.pipe(withLatestFrom(this._svc.columns, this._svc.hiddenColumns))
|
|
9420
|
-
.subscribe((data) => {
|
|
9421
|
-
const [, columns, hidden] = data;
|
|
9422
|
-
navigator.clipboard.writeText(this.toClipboardString(rows, this.getVisibleColumns(columns, hidden)));
|
|
9423
|
-
this.contextMenuTarget = null;
|
|
9424
|
-
this.showContextMenu = false;
|
|
9425
|
-
});
|
|
9426
|
-
}
|
|
9427
|
-
delete(rows) {
|
|
9428
|
-
this.deleteRows.emit(rows);
|
|
9429
|
-
this.contextMenuTarget = null;
|
|
9430
|
-
this.showContextMenu = false;
|
|
9431
|
-
}
|
|
9432
|
-
pasteData() {
|
|
9433
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
9434
|
-
const result = yield navigator.clipboard.readText();
|
|
9435
|
-
of(1)
|
|
9436
|
-
.pipe(withLatestFrom(this._svc.columns, this._svc.hiddenColumns))
|
|
9437
|
-
.subscribe((data) => {
|
|
9438
|
-
const [, columns, hidden] = data;
|
|
9439
|
-
this.pasteRows.emit(this.fromClipboard(result, this.getVisibleColumns(columns, hidden)));
|
|
9440
|
-
});
|
|
9441
|
-
this.contextMenuTarget = null;
|
|
9442
|
-
this.showContextMenu = false;
|
|
9443
|
-
});
|
|
9444
|
-
}
|
|
9445
9884
|
ngOnInit() {
|
|
9446
9885
|
this._svc.restoreState();
|
|
9447
9886
|
this._svc.restoreHiddenColumns();
|
|
@@ -9484,8 +9923,19 @@ class TableComponent {
|
|
|
9484
9923
|
}
|
|
9485
9924
|
if (changes.hasOwnProperty('dict')) {
|
|
9486
9925
|
this._svc.setDict(this.dict);
|
|
9926
|
+
this._svc.setFilterOptions(this.dict);
|
|
9927
|
+
}
|
|
9928
|
+
if (changes.hasOwnProperty('filterOptions')) {
|
|
9929
|
+
this._svc.setFilterOptions(this.filterOptions);
|
|
9930
|
+
}
|
|
9931
|
+
if (changes.hasOwnProperty('trackRow')) {
|
|
9932
|
+
this._svc.trackRow = this.trackRow;
|
|
9487
9933
|
}
|
|
9488
9934
|
}
|
|
9935
|
+
setContextMenuOpen(value) {
|
|
9936
|
+
this.contextMenuOpen = value;
|
|
9937
|
+
this.contextMenuOpenChange.emit(this.contextMenuOpen);
|
|
9938
|
+
}
|
|
9489
9939
|
startEditRowOrCell(coordinates) {
|
|
9490
9940
|
if (this.editType === EditType.row) {
|
|
9491
9941
|
this._svc.startEditRow(coordinates);
|
|
@@ -9500,6 +9950,14 @@ class TableComponent {
|
|
|
9500
9950
|
return ((_a = target.tagName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'teta-cell';
|
|
9501
9951
|
});
|
|
9502
9952
|
}
|
|
9953
|
+
getEventRow(event) {
|
|
9954
|
+
return event.composedPath().find((target) => {
|
|
9955
|
+
return (target === null || target === void 0 ? void 0 : target.getAttribute) && (target === null || target === void 0 ? void 0 : target.getAttribute('data-row'));
|
|
9956
|
+
});
|
|
9957
|
+
}
|
|
9958
|
+
getCellElement(coordinates) {
|
|
9959
|
+
return this._elementRef.nativeElement.querySelector(`teta-cell[data-row="${coordinates.row}"][data-column="${coordinates.column}"]`);
|
|
9960
|
+
}
|
|
9503
9961
|
eventIsOnRow(event) {
|
|
9504
9962
|
const row = event.composedPath().find((target) => {
|
|
9505
9963
|
return (target === null || target === void 0 ? void 0 : target.getAttribute) && (target === null || target === void 0 ? void 0 : target.getAttribute('data-row'));
|
|
@@ -9509,77 +9967,43 @@ class TableComponent {
|
|
|
9509
9967
|
getCoordinates(event) {
|
|
9510
9968
|
const cell = this.getEventCell(event);
|
|
9511
9969
|
if (cell) {
|
|
9512
|
-
const rowIndex = cell.getAttribute('data-row');
|
|
9970
|
+
const rowIndex = parseInt(cell.getAttribute('data-row'), 10);
|
|
9513
9971
|
const columnName = cell.getAttribute('data-column');
|
|
9514
|
-
if (rowIndex && columnName) {
|
|
9515
|
-
const row = this._svc.getRowByIndex(rowIndex);
|
|
9516
|
-
const column = this._svc.getColumnByName(columnName);
|
|
9972
|
+
if (rowIndex >= 0 && columnName) {
|
|
9517
9973
|
return {
|
|
9518
|
-
row,
|
|
9519
|
-
column:
|
|
9974
|
+
row: rowIndex,
|
|
9975
|
+
column: columnName,
|
|
9520
9976
|
event,
|
|
9521
9977
|
};
|
|
9522
9978
|
}
|
|
9523
9979
|
}
|
|
9524
9980
|
return null;
|
|
9525
9981
|
}
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
if (
|
|
9529
|
-
|
|
9530
|
-
|
|
9531
|
-
|
|
9532
|
-
|
|
9533
|
-
|
|
9534
|
-
|
|
9535
|
-
top: event.y,
|
|
9536
|
-
bottom: event.y,
|
|
9537
|
-
left: event.x,
|
|
9538
|
-
right: event.x,
|
|
9539
|
-
}, this.menu.nativeElement.getBoundingClientRect(), Align.left, VerticalAlign.auto);
|
|
9540
|
-
PositionUtil.setElementPosition(this.menu.nativeElement, position);
|
|
9541
|
-
}
|
|
9542
|
-
toClipboardString(rows, columns) {
|
|
9543
|
-
return rows.reduce((res, currentRow, i) => `${res}${i === 0 ? '' : '\n'}${columns.reduce((columnResult, column, j) => { var _a; return `${columnResult}${j === 0 ? '' : '\t'}${(_a = currentRow.data[column.name]) !== null && _a !== void 0 ? _a : ''}`; }, '')}`, '');
|
|
9544
|
-
}
|
|
9545
|
-
fromClipboard(data, columns) {
|
|
9546
|
-
const rows = data.split('\n').filter((_) => (_ === null || _ === void 0 ? void 0 : _.length) > 0);
|
|
9547
|
-
const result = rows.map((_) => _.replace('\r', '').replace('\n', '').split('\t'));
|
|
9548
|
-
return result.map((row) => row.reduce((res, item, index) => {
|
|
9549
|
-
var _a, _b, _c;
|
|
9550
|
-
let value = item;
|
|
9551
|
-
if (((_a = columns[index]) === null || _a === void 0 ? void 0 : _a.filterType) === FilterType.number ||
|
|
9552
|
-
((_b = columns[index]) === null || _b === void 0 ? void 0 : _b.filterType) === FilterType.list) {
|
|
9553
|
-
value = parseFloat(item);
|
|
9554
|
-
}
|
|
9555
|
-
if (((_c = columns[index]) === null || _c === void 0 ? void 0 : _c.filterType) === FilterType.boolean) {
|
|
9556
|
-
value = Boolean(JSON.parse(item.toLowerCase()));
|
|
9557
|
-
}
|
|
9558
|
-
if (columns[index]) {
|
|
9559
|
-
res[columns[index].name] = value;
|
|
9560
|
-
}
|
|
9561
|
-
return res;
|
|
9562
|
-
}, {}));
|
|
9563
|
-
}
|
|
9564
|
-
getVisibleColumns(columns, hidden) {
|
|
9565
|
-
const visible = ArrayUtil.flatten(columns, 'columns', true).filter((_) => hidden.indexOf(_.name) < 0);
|
|
9566
|
-
return visible.sort((a, b) => Number(b.locked) - Number(a.locked));
|
|
9982
|
+
getRow(event) {
|
|
9983
|
+
const rowElement = this.getEventRow(event);
|
|
9984
|
+
if (rowElement) {
|
|
9985
|
+
const rowIndex = parseInt(rowElement.getAttribute('data-row'), 10);
|
|
9986
|
+
if (rowIndex >= 0) {
|
|
9987
|
+
return this._svc.getRowByIndex(rowIndex);
|
|
9988
|
+
}
|
|
9989
|
+
}
|
|
9990
|
+
return null;
|
|
9567
9991
|
}
|
|
9568
9992
|
}
|
|
9569
9993
|
TableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableComponent, deps: [{ token: TableService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
9570
|
-
TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: TableComponent, selector: "teta-table", inputs: { data: "data", columns: "columns", dict: "dict",
|
|
9994
|
+
TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: TableComponent, selector: "teta-table", inputs: { data: "data", columns: "columns", dict: "dict", filterOptions: "filterOptions", state: "state", cookieName: "cookieName", virtual: "virtual", detailComponent: "detailComponent", activeRow: "activeRow", selectedRows: "selectedRows", selectType: "selectType", aggregate: "aggregate", grouping: "grouping", groupRowComponent: "groupRowComponent", openLevels: "openLevels", tree: "tree", trackRow: "trackRow", editType: "editType", editEvent: "editEvent", rowEditable: "rowEditable", rowClass: "rowClass", scrollToIndex: "scrollToIndex", showHeadCellMenu: "showHeadCellMenu", contextMenu: "contextMenu", contextMenuOpen: "contextMenuOpen" }, outputs: { contextMenuOpenChange: "contextMenuOpenChange", stateChange: "stateChange", bodyLeft: "bodyLeft", activeRowChange: "activeRowChange", selectedRowsChange: "selectedRowsChange", cellClick: "cellClick", cellDoubleClick: "cellDoubleClick", cellFocus: "cellFocus", cellKeyDown: "cellKeyDown", rowLeft: "rowLeft", rowEditStart: "rowEditStart", rowEditEnd: "rowEditEnd", cellEditStart: "cellEditStart", cellEditEnd: "cellEditEnd", valueChange: "valueChange", tableService: "tableService" }, host: { listeners: { "document:click": "handleClickOutsideAnyRow($event)", "focusin": "focusIn($event)", "dblclick": "dblclick($event)", "keydown": "keydown($event)", "mousedown": "mousedown($event)" }, properties: { "class.table": "this.tableClass" } }, providers: [TableService], viewQueries: [{ propertyName: "menu", first: true, predicate: ["contextMenu"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"column column_auto\">\n <teta-table-head\n [selectType]=\"selectType\"\n [showHeadCellMenu]=\"showHeadCellMenu\"></teta-table-head>\n <teta-table-body\n [tetaContextMenu]=\"contextMenu\"\n [open]=\"contextMenuOpen\"\n (openChange)=\"setContextMenuOpen($event)\"\n [aggregate]=\"aggregate\"\n [virtual]=\"virtual\"\n [activeRow]=\"activeRow\"\n [selectedRows]=\"selectedRowsList\"\n [additionalComponent]=\"detailComponent\"\n [grouping]=\"grouping\"\n [groupRowComponent]=\"groupRowComponent\"\n [openLevels]=\"openLevels\"\n [selectType]=\"selectType\"\n [rowClass]=\"rowClass\"\n [tree]=\"tree\"></teta-table-body>\n</div>\n", styles: [""], components: [{ type: TableHeadComponent, selector: "teta-table-head", inputs: ["selectType", "showHeadCellMenu"] }, { type: TableBodyComponent, selector: "teta-table-body", inputs: ["virtual", "activeRow", "selectedRows", "additionalComponent", "tree", "aggregate", "grouping", "groupRowComponent", "openLevels", "selectType", "rowClass"] }], directives: [{ type: ContextMenuDirective, selector: "[tetaContextMenu]", inputs: ["tetaContextMenu"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9571
9995
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableComponent, decorators: [{
|
|
9572
9996
|
type: Component,
|
|
9573
|
-
args: [{ selector: 'teta-table', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TableService], template: "<div class=\"column column_auto\">\n <teta-table-head
|
|
9997
|
+
args: [{ selector: 'teta-table', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TableService], template: "<div class=\"column column_auto\">\n <teta-table-head\n [selectType]=\"selectType\"\n [showHeadCellMenu]=\"showHeadCellMenu\"></teta-table-head>\n <teta-table-body\n [tetaContextMenu]=\"contextMenu\"\n [open]=\"contextMenuOpen\"\n (openChange)=\"setContextMenuOpen($event)\"\n [aggregate]=\"aggregate\"\n [virtual]=\"virtual\"\n [activeRow]=\"activeRow\"\n [selectedRows]=\"selectedRowsList\"\n [additionalComponent]=\"detailComponent\"\n [grouping]=\"grouping\"\n [groupRowComponent]=\"groupRowComponent\"\n [openLevels]=\"openLevels\"\n [selectType]=\"selectType\"\n [rowClass]=\"rowClass\"\n [tree]=\"tree\"></teta-table-body>\n</div>\n", styles: [""] }]
|
|
9574
9998
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ElementRef }]; }, propDecorators: { data: [{
|
|
9575
9999
|
type: Input
|
|
9576
10000
|
}], columns: [{
|
|
9577
10001
|
type: Input
|
|
9578
10002
|
}], dict: [{
|
|
9579
10003
|
type: Input
|
|
9580
|
-
}],
|
|
10004
|
+
}], filterOptions: [{
|
|
9581
10005
|
type: Input
|
|
9582
|
-
}],
|
|
10006
|
+
}], state: [{
|
|
9583
10007
|
type: Input
|
|
9584
10008
|
}], cookieName: [{
|
|
9585
10009
|
type: Input
|
|
@@ -9603,7 +10027,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9603
10027
|
type: Input
|
|
9604
10028
|
}], tree: [{
|
|
9605
10029
|
type: Input
|
|
9606
|
-
}],
|
|
10030
|
+
}], trackRow: [{
|
|
9607
10031
|
type: Input
|
|
9608
10032
|
}], editType: [{
|
|
9609
10033
|
type: Input
|
|
@@ -9615,10 +10039,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9615
10039
|
type: Input
|
|
9616
10040
|
}], scrollToIndex: [{
|
|
9617
10041
|
type: Input
|
|
9618
|
-
}], contextMenuConfig: [{
|
|
9619
|
-
type: Input
|
|
9620
10042
|
}], showHeadCellMenu: [{
|
|
9621
10043
|
type: Input
|
|
10044
|
+
}], contextMenu: [{
|
|
10045
|
+
type: Input
|
|
10046
|
+
}], contextMenuOpen: [{
|
|
10047
|
+
type: Input
|
|
10048
|
+
}], contextMenuOpenChange: [{
|
|
10049
|
+
type: Output
|
|
9622
10050
|
}], stateChange: [{
|
|
9623
10051
|
type: Output
|
|
9624
10052
|
}], bodyLeft: [{
|
|
@@ -9627,31 +10055,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9627
10055
|
type: Output
|
|
9628
10056
|
}], selectedRowsChange: [{
|
|
9629
10057
|
type: Output
|
|
9630
|
-
}], rowLeft: [{
|
|
9631
|
-
type: Output
|
|
9632
|
-
}], rowEditStart: [{
|
|
9633
|
-
type: Output
|
|
9634
|
-
}], rowEditEnd: [{
|
|
9635
|
-
type: Output
|
|
9636
10058
|
}], cellClick: [{
|
|
9637
10059
|
type: Output
|
|
9638
10060
|
}], cellDoubleClick: [{
|
|
9639
10061
|
type: Output
|
|
9640
10062
|
}], cellFocus: [{
|
|
9641
10063
|
type: Output
|
|
9642
|
-
}],
|
|
10064
|
+
}], cellKeyDown: [{
|
|
9643
10065
|
type: Output
|
|
9644
|
-
}],
|
|
10066
|
+
}], rowLeft: [{
|
|
9645
10067
|
type: Output
|
|
9646
|
-
}],
|
|
10068
|
+
}], rowEditStart: [{
|
|
9647
10069
|
type: Output
|
|
9648
|
-
}],
|
|
10070
|
+
}], rowEditEnd: [{
|
|
9649
10071
|
type: Output
|
|
9650
|
-
}],
|
|
10072
|
+
}], cellEditStart: [{
|
|
9651
10073
|
type: Output
|
|
9652
|
-
}],
|
|
10074
|
+
}], cellEditEnd: [{
|
|
9653
10075
|
type: Output
|
|
9654
|
-
}],
|
|
10076
|
+
}], valueChange: [{
|
|
9655
10077
|
type: Output
|
|
9656
10078
|
}], tableService: [{
|
|
9657
10079
|
type: Output
|
|
@@ -9670,15 +10092,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9670
10092
|
}], dblclick: [{
|
|
9671
10093
|
type: HostListener,
|
|
9672
10094
|
args: ['dblclick', ['$event']]
|
|
9673
|
-
}],
|
|
10095
|
+
}], keydown: [{
|
|
9674
10096
|
type: HostListener,
|
|
9675
|
-
args: ['
|
|
10097
|
+
args: ['keydown', ['$event']]
|
|
9676
10098
|
}], mousedown: [{
|
|
9677
10099
|
type: HostListener,
|
|
9678
10100
|
args: ['mousedown', ['$event']]
|
|
9679
|
-
}], contextMenu: [{
|
|
9680
|
-
type: HostListener,
|
|
9681
|
-
args: ['contextmenu', ['$event']]
|
|
9682
10101
|
}] } });
|
|
9683
10102
|
|
|
9684
10103
|
class TabsModule {
|
|
@@ -9765,9 +10184,10 @@ class DateTimeCellComponent extends CellComponentBase {
|
|
|
9765
10184
|
this.valueChanged();
|
|
9766
10185
|
}
|
|
9767
10186
|
startEdit(initiator, type) {
|
|
9768
|
-
if ((initiator === null || initiator === void 0 ? void 0 : initiator.column
|
|
10187
|
+
if ((initiator === null || initiator === void 0 ? void 0 : initiator.column) === this.column.name) {
|
|
9769
10188
|
setTimeout(() => {
|
|
9770
|
-
|
|
10189
|
+
var _a;
|
|
10190
|
+
(_a = this.input) === null || _a === void 0 ? void 0 : _a.openPicker(true);
|
|
9771
10191
|
this.cdr.markForCheck();
|
|
9772
10192
|
}, 0);
|
|
9773
10193
|
}
|
|
@@ -9777,10 +10197,10 @@ class DateTimeCellComponent extends CellComponentBase {
|
|
|
9777
10197
|
}
|
|
9778
10198
|
}
|
|
9779
10199
|
DateTimeCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DateTimeCellComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
9780
|
-
DateTimeCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: DateTimeCellComponent, selector: "teta-date-time-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'\"
|
|
10200
|
+
DateTimeCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: DateTimeCellComponent, selector: "teta-date-time-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 [class.cell-text_disabled]=\"!editable\">\n {{row.data[column.name] | date : 'dd.MM.yyyy HH:mm:ss'}}\n</span>\n<teta-date-picker class=\"datepicker-table\" #input\n *ngIf=\"edit\"\n [appendToBody]=\"true\"\n [showTime]=\"true\"\n [ngModel]=\"row.data[column.name]\"\n (ngModelChange)=\"setValue($event)\"\n></teta-date-picker>\n", styles: [""], components: [{ type: DatePickerComponent, selector: "teta-date-picker", inputs: ["disabled", "invalid", "firstDayOfWeek", "disabledDates", "disabledPeriods", "disabledDays", "minDate", "maxDate", "minYearDate", "maxYearDate", "align", "verticalAlign", "appendToBody", "allowNull", "backdrop", "showTime", "format"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "date": i3.DatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9781
10201
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DateTimeCellComponent, decorators: [{
|
|
9782
10202
|
type: Component,
|
|
9783
|
-
args: [{ selector: 'teta-date-time-cell', template: "<span [style.display]=\"edit ? 'none' : 'block'\"
|
|
10203
|
+
args: [{ selector: 'teta-date-time-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{row.data[column.name] | date : 'dd.MM.yyyy HH:mm:ss'}}\n</span>\n<teta-date-picker class=\"datepicker-table\" #input\n *ngIf=\"edit\"\n [appendToBody]=\"true\"\n [showTime]=\"true\"\n [ngModel]=\"row.data[column.name]\"\n (ngModelChange)=\"setValue($event)\"\n></teta-date-picker>\n", styles: [""] }]
|
|
9784
10204
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
9785
10205
|
type: Input
|
|
9786
10206
|
}], row: [{
|
|
@@ -9804,6 +10224,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9804
10224
|
}]
|
|
9805
10225
|
}] });
|
|
9806
10226
|
|
|
10227
|
+
class ContextMenuModule {
|
|
10228
|
+
}
|
|
10229
|
+
ContextMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
10230
|
+
ContextMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, declarations: [ContextMenuDirective], imports: [CommonModule,
|
|
10231
|
+
DynamicComponentModule], exports: [ContextMenuDirective] });
|
|
10232
|
+
ContextMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, imports: [[
|
|
10233
|
+
CommonModule,
|
|
10234
|
+
DynamicComponentModule
|
|
10235
|
+
]] });
|
|
10236
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, decorators: [{
|
|
10237
|
+
type: NgModule,
|
|
10238
|
+
args: [{
|
|
10239
|
+
declarations: [ContextMenuDirective],
|
|
10240
|
+
exports: [ContextMenuDirective],
|
|
10241
|
+
imports: [
|
|
10242
|
+
CommonModule,
|
|
10243
|
+
DynamicComponentModule
|
|
10244
|
+
]
|
|
10245
|
+
}]
|
|
10246
|
+
}] });
|
|
10247
|
+
|
|
9807
10248
|
class TableModule {
|
|
9808
10249
|
}
|
|
9809
10250
|
TableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -9842,7 +10283,8 @@ TableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "1
|
|
|
9842
10283
|
ToolbarModule,
|
|
9843
10284
|
ClickOutsideModule,
|
|
9844
10285
|
ResizeDragModule,
|
|
9845
|
-
ScrollingModule
|
|
10286
|
+
ScrollingModule,
|
|
10287
|
+
ContextMenuModule], exports: [TableComponent,
|
|
9846
10288
|
NumericCellComponent,
|
|
9847
10289
|
ListCellComponent,
|
|
9848
10290
|
DateCellComponent,
|
|
@@ -9874,6 +10316,7 @@ TableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "1
|
|
|
9874
10316
|
ClickOutsideModule,
|
|
9875
10317
|
ResizeDragModule,
|
|
9876
10318
|
ScrollingModule,
|
|
10319
|
+
ContextMenuModule,
|
|
9877
10320
|
]] });
|
|
9878
10321
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableModule, decorators: [{
|
|
9879
10322
|
type: NgModule,
|
|
@@ -9933,6 +10376,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9933
10376
|
ClickOutsideModule,
|
|
9934
10377
|
ResizeDragModule,
|
|
9935
10378
|
ScrollingModule,
|
|
10379
|
+
ContextMenuModule,
|
|
9936
10380
|
],
|
|
9937
10381
|
}]
|
|
9938
10382
|
}] });
|
|
@@ -10040,7 +10484,8 @@ class Chart3dComponent {
|
|
|
10040
10484
|
ngOnInit() {
|
|
10041
10485
|
this._themeService.theme
|
|
10042
10486
|
.pipe(takeWhile((_) => this._alive), tap((_) => {
|
|
10043
|
-
this.gridColor = _ ? '#
|
|
10487
|
+
this.gridColor = _ ? '#5d6a73' : '#bdbdc6';
|
|
10488
|
+
this.axesColor = _ ? '#8e8f9d' : '#7d8f9a';
|
|
10044
10489
|
this.init();
|
|
10045
10490
|
}))
|
|
10046
10491
|
.subscribe();
|
|
@@ -10049,6 +10494,7 @@ class Chart3dComponent {
|
|
|
10049
10494
|
this.addResizeObserver();
|
|
10050
10495
|
this.createScene();
|
|
10051
10496
|
this.startRenderingLoop();
|
|
10497
|
+
this.init();
|
|
10052
10498
|
}
|
|
10053
10499
|
ngOnDestroy() {
|
|
10054
10500
|
this._alive = false;
|
|
@@ -10062,38 +10508,52 @@ class Chart3dComponent {
|
|
|
10062
10508
|
}
|
|
10063
10509
|
const { x, y, z } = this.getScales(this._config.series);
|
|
10064
10510
|
this.config.series.forEach((data, idx) => {
|
|
10065
|
-
var _a;
|
|
10066
|
-
|
|
10511
|
+
var _a, _b;
|
|
10512
|
+
if (!((_a = data.points) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
10513
|
+
return;
|
|
10514
|
+
}
|
|
10515
|
+
const points = data.points.map((_) => new THREE.Vector3(x(_.x), y(_.y), z(_.z)));
|
|
10067
10516
|
const color = d3.scaleOrdinal(d3.schemeTableau10);
|
|
10068
10517
|
const material = new THREE.LineBasicMaterial({
|
|
10069
|
-
color: (
|
|
10518
|
+
color: (_b = data === null || data === void 0 ? void 0 : data.color) !== null && _b !== void 0 ? _b : color(idx.toString()),
|
|
10070
10519
|
});
|
|
10071
|
-
const
|
|
10072
|
-
|
|
10073
|
-
|
|
10074
|
-
|
|
10520
|
+
const tubeGeometry = new THREE.TubeGeometry(new THREE.CatmullRomCurve3(points), 1024, 0.5, 20, false);
|
|
10521
|
+
let tube = new THREE.Line(tubeGeometry, material);
|
|
10522
|
+
this._scene.add(tube);
|
|
10523
|
+
});
|
|
10524
|
+
const circles = x.ticks(this.SIDE_SIZE / 10);
|
|
10525
|
+
const material = new THREE.LineBasicMaterial({ color: this.axesColor });
|
|
10526
|
+
const pointsLines = [];
|
|
10527
|
+
pointsLines.push(new THREE.Vector3(0, 0, 0));
|
|
10528
|
+
pointsLines.push(new THREE.Vector3(0, 0, z(-z.domain()[1])));
|
|
10529
|
+
pointsLines.push(new THREE.Vector3(0, 0, 0));
|
|
10530
|
+
pointsLines.push(new THREE.Vector3(x(-x.domain()[1]), 0, 0));
|
|
10531
|
+
const geometryLines = new THREE.BufferGeometry().setFromPoints(pointsLines);
|
|
10532
|
+
const line = new THREE.Line(geometryLines, material);
|
|
10533
|
+
this._scene.add(line);
|
|
10534
|
+
circles.forEach((r) => {
|
|
10535
|
+
const material = new THREE.LineDashedMaterial({
|
|
10536
|
+
color: this.gridColor,
|
|
10537
|
+
dashSize: 1,
|
|
10538
|
+
gapSize: 3
|
|
10539
|
+
});
|
|
10540
|
+
const circleGeometry = new THREE.BufferGeometry().setFromPoints(new THREE.Path().absarc(0, 0, x(r), 0, Math.PI * 2, false).getSpacedPoints(100));
|
|
10541
|
+
const circle = new THREE.LineSegments(circleGeometry, material);
|
|
10542
|
+
circle.geometry.rotateX(-Math.PI / 2);
|
|
10543
|
+
this._scene.add(circle);
|
|
10075
10544
|
});
|
|
10076
|
-
const plane = new THREE.GridHelper(this.SIDE_SIZE, this.SIDE_SIZE / 10, this.gridColor, this.gridColor);
|
|
10077
|
-
plane.position.set(this.SIDE_SIZE / 2, 0, this.SIDE_SIZE / 2);
|
|
10078
|
-
this._scene.add(plane);
|
|
10079
|
-
const gridX = new THREE.GridHelper(this.SIDE_SIZE, this.SIDE_SIZE / 10, this.gridColor, this.gridColor);
|
|
10080
|
-
gridX.geometry.rotateX(-Math.PI / 2);
|
|
10081
|
-
gridX.position.set(this.SIDE_SIZE / 2, this.SIDE_SIZE / 2, 0);
|
|
10082
|
-
this._scene.add(gridX);
|
|
10083
|
-
const gridY = new THREE.GridHelper(this.SIDE_SIZE, this.SIDE_SIZE / 10, this.gridColor, this.gridColor);
|
|
10084
|
-
gridY.geometry.rotateZ(Math.PI / 2);
|
|
10085
|
-
gridY.position.set(0, this.SIDE_SIZE / 2, this.SIDE_SIZE / 2);
|
|
10086
|
-
this._scene.add(gridY);
|
|
10087
10545
|
this.drawTicks(x, y, z);
|
|
10088
|
-
|
|
10089
|
-
|
|
10090
|
-
|
|
10091
|
-
|
|
10092
|
-
|
|
10093
|
-
|
|
10094
|
-
|
|
10095
|
-
|
|
10096
|
-
|
|
10546
|
+
if (!this._controls) {
|
|
10547
|
+
this._controls = new OrbitControls(this._camera, this._renderer.domElement);
|
|
10548
|
+
this._controls.enableDamping = true;
|
|
10549
|
+
this._controls.enablePan = true;
|
|
10550
|
+
this._controls.dampingFactor = 0.25;
|
|
10551
|
+
this._controls.screenSpacePanning = true;
|
|
10552
|
+
this._controls.minDistance = 0;
|
|
10553
|
+
this._controls.maxDistance = 10000;
|
|
10554
|
+
this._controls.maxPolarAngle = Math.PI / 2;
|
|
10555
|
+
this._controls.enableZoom = true;
|
|
10556
|
+
}
|
|
10097
10557
|
}
|
|
10098
10558
|
createScene() {
|
|
10099
10559
|
this._scene = new THREE.Scene();
|
|
@@ -10157,7 +10617,7 @@ class Chart3dComponent {
|
|
|
10157
10617
|
map: texture,
|
|
10158
10618
|
});
|
|
10159
10619
|
const sprite = new THREE.Sprite(spriteMaterial);
|
|
10160
|
-
sprite.scale.set(
|
|
10620
|
+
sprite.scale.set(0.4 * fontSize, 0.4 * fontSize, 0.4 * fontSize);
|
|
10161
10621
|
return sprite;
|
|
10162
10622
|
}
|
|
10163
10623
|
drawTicks(x, y, z) {
|
|
@@ -10169,28 +10629,31 @@ class Chart3dComponent {
|
|
|
10169
10629
|
generatedTicks.forEach((_) => {
|
|
10170
10630
|
const sprite = this.makeSprite(_);
|
|
10171
10631
|
if (idx === 0) {
|
|
10172
|
-
sprite.position.set(x(_),
|
|
10632
|
+
sprite.position.set(x(_), y(y.domain()[1]), 0);
|
|
10173
10633
|
}
|
|
10174
10634
|
if (idx === 1) {
|
|
10175
|
-
sprite.position.set(-
|
|
10635
|
+
sprite.position.set(-10, y(_), 0);
|
|
10176
10636
|
}
|
|
10177
10637
|
if (idx === 2) {
|
|
10178
|
-
sprite.position.set(0,
|
|
10638
|
+
sprite.position.set(0, y(y.domain()[1]), z(_));
|
|
10179
10639
|
}
|
|
10180
10640
|
ticks.add(sprite);
|
|
10181
10641
|
});
|
|
10182
10642
|
});
|
|
10183
|
-
const northLabel = this.makeSprite('
|
|
10184
|
-
const westLabel = this.makeSprite('
|
|
10643
|
+
const northLabel = this.makeSprite('X', { fontSize: 28 });
|
|
10644
|
+
const westLabel = this.makeSprite('Y', { fontSize: 28 });
|
|
10185
10645
|
const tvdLabel = this.makeSprite('TVD', { fontSize: 28 });
|
|
10186
|
-
northLabel.position.set(x(
|
|
10187
|
-
westLabel.position.set(0, 0, y(
|
|
10188
|
-
tvdLabel.position.set(0, z(
|
|
10646
|
+
northLabel.position.set(x(x.domain()[1]) + 5, 0, 0);
|
|
10647
|
+
westLabel.position.set(0, 0, y(y.domain()[0]) + 5);
|
|
10648
|
+
tvdLabel.position.set(0, z(z.domain()[1]) + 5, 0);
|
|
10189
10649
|
ticks.add(northLabel, westLabel, tvdLabel);
|
|
10650
|
+
const axesHelper = new THREE.AxesHelper(this.SIDE_SIZE);
|
|
10651
|
+
axesHelper.setColors(this.axesColor, this.axesColor, this.axesColor);
|
|
10652
|
+
this._scene.add(axesHelper);
|
|
10190
10653
|
this._scene.add(ticks);
|
|
10191
10654
|
}
|
|
10192
10655
|
getScales(series) {
|
|
10193
|
-
var _a, _b, _c, _d
|
|
10656
|
+
var _a, _b, _c, _d;
|
|
10194
10657
|
const extrems = series.map((_) => ({
|
|
10195
10658
|
x: d3.extent(_.points, (p) => p.x),
|
|
10196
10659
|
y: d3.extent(_.points, (p) => p.y),
|
|
@@ -10204,34 +10667,22 @@ class Chart3dComponent {
|
|
|
10204
10667
|
}, { x: [], y: [], z: [] });
|
|
10205
10668
|
const x = d3
|
|
10206
10669
|
.scaleLinear()
|
|
10207
|
-
.domain([
|
|
10208
|
-
|
|
10209
|
-
((_b = (_a = this._config) === null || _a === void 0 ? void 0 : _a.axes) === null || _b === void 0 ? void 0 : _b.max) == null
|
|
10210
|
-
? d3.max(flattenExtrems.x)
|
|
10670
|
+
.domain([0, ((_b = (_a = this._config) === null || _a === void 0 ? void 0 : _a.axes) === null || _b === void 0 ? void 0 : _b.max) == null
|
|
10671
|
+
? parseInt(d3.max(flattenExtrems.x))
|
|
10211
10672
|
: this._config.axes.max,
|
|
10212
10673
|
])
|
|
10213
|
-
.range([0, this.SIDE_SIZE])
|
|
10214
|
-
.nice();
|
|
10674
|
+
.range([0, this.SIDE_SIZE]).nice();
|
|
10215
10675
|
const y = d3
|
|
10216
10676
|
.scaleLinear()
|
|
10217
|
-
.domain([
|
|
10218
|
-
|
|
10219
|
-
((_d = (_c = this._config) === null || _c === void 0 ? void 0 : _c.axes) === null || _d === void 0 ? void 0 : _d.max) == null
|
|
10220
|
-
? d3.max(flattenExtrems.y)
|
|
10221
|
-
: this._config.axes.max,
|
|
10222
|
-
])
|
|
10223
|
-
.range([0, this.SIDE_SIZE])
|
|
10224
|
-
.nice();
|
|
10677
|
+
.domain([0, parseInt(d3.max(flattenExtrems.y), 10)])
|
|
10678
|
+
.range([this.SIDE_SIZE, 0]);
|
|
10225
10679
|
const z = d3
|
|
10226
10680
|
.scaleLinear()
|
|
10227
|
-
.domain([
|
|
10228
|
-
|
|
10229
|
-
|
|
10230
|
-
|
|
10231
|
-
|
|
10232
|
-
])
|
|
10233
|
-
.range([this.SIDE_SIZE, 0])
|
|
10234
|
-
.nice();
|
|
10681
|
+
.domain([0,
|
|
10682
|
+
((_d = (_c = this._config) === null || _c === void 0 ? void 0 : _c.axes) === null || _d === void 0 ? void 0 : _d.max) == null
|
|
10683
|
+
? parseInt(d3.max(flattenExtrems.z))
|
|
10684
|
+
: this._config.axes.max])
|
|
10685
|
+
.range([0, this.SIDE_SIZE]).nice();
|
|
10235
10686
|
return { x, y, z };
|
|
10236
10687
|
}
|
|
10237
10688
|
}
|
|
@@ -10270,133 +10721,6 @@ class Chart3dOptions {
|
|
|
10270
10721
|
|
|
10271
10722
|
/* accordion */
|
|
10272
10723
|
|
|
10273
|
-
class ClickService {
|
|
10274
|
-
constructor(_document) {
|
|
10275
|
-
this._document = _document;
|
|
10276
|
-
this.click = fromEvent(this._document, 'click');
|
|
10277
|
-
this.contextMenu = fromEvent(this._document, 'contextmenu');
|
|
10278
|
-
}
|
|
10279
|
-
}
|
|
10280
|
-
ClickService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ClickService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
10281
|
-
ClickService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ClickService, providedIn: 'root' });
|
|
10282
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ClickService, decorators: [{
|
|
10283
|
-
type: Injectable,
|
|
10284
|
-
args: [{
|
|
10285
|
-
providedIn: 'root',
|
|
10286
|
-
}]
|
|
10287
|
-
}], ctorParameters: function () {
|
|
10288
|
-
return [{ type: undefined, decorators: [{
|
|
10289
|
-
type: Inject,
|
|
10290
|
-
args: [DOCUMENT]
|
|
10291
|
-
}] }];
|
|
10292
|
-
} });
|
|
10293
|
-
|
|
10294
|
-
class ContextMenuDirective extends DynamicContentBaseDirective {
|
|
10295
|
-
constructor(_document, _elementRef, _service, _injector, _zone, _cdr, _click) {
|
|
10296
|
-
super(_document, _elementRef, _service, _injector, _zone, _cdr);
|
|
10297
|
-
this._document = _document;
|
|
10298
|
-
this._elementRef = _elementRef;
|
|
10299
|
-
this._service = _service;
|
|
10300
|
-
this._injector = _injector;
|
|
10301
|
-
this._zone = _zone;
|
|
10302
|
-
this._cdr = _cdr;
|
|
10303
|
-
this._click = _click;
|
|
10304
|
-
}
|
|
10305
|
-
get _dynamicContent() {
|
|
10306
|
-
return this.tetaContextMenu;
|
|
10307
|
-
}
|
|
10308
|
-
showContent(event) {
|
|
10309
|
-
event.preventDefault();
|
|
10310
|
-
setTimeout(() => {
|
|
10311
|
-
this.createMenu(event);
|
|
10312
|
-
});
|
|
10313
|
-
}
|
|
10314
|
-
click(event) {
|
|
10315
|
-
if (this._componentRef &&
|
|
10316
|
-
DomUtil.clickedInside(this._componentRef.location.nativeElement, event)) {
|
|
10317
|
-
event.preventDefault();
|
|
10318
|
-
event.stopPropagation();
|
|
10319
|
-
}
|
|
10320
|
-
}
|
|
10321
|
-
ngOnInit() {
|
|
10322
|
-
super.ngOnInit();
|
|
10323
|
-
merge(this._click.click, this._click.contextMenu)
|
|
10324
|
-
.pipe(takeWhile(() => this._alive), filter(() => this._open), filter(() => this._componentRef != null), filter((event) => !DomUtil.clickedInside(this._componentRef.location.nativeElement, event)), tap((_) => {
|
|
10325
|
-
this.destroyContentRef();
|
|
10326
|
-
this.openChange.emit(false);
|
|
10327
|
-
}))
|
|
10328
|
-
.subscribe();
|
|
10329
|
-
}
|
|
10330
|
-
ngOnDestroy() {
|
|
10331
|
-
super.ngOnDestroy();
|
|
10332
|
-
}
|
|
10333
|
-
setPosition() {
|
|
10334
|
-
if (this._componentRef && this._open) {
|
|
10335
|
-
const position = PositionUtil.getPosition({
|
|
10336
|
-
top: this._eventPoint.y,
|
|
10337
|
-
bottom: this._eventPoint.y,
|
|
10338
|
-
left: this._eventPoint.x,
|
|
10339
|
-
right: this._eventPoint.x,
|
|
10340
|
-
}, this._componentRef.location.nativeElement.getBoundingClientRect(), this.align, this.verticalAlign);
|
|
10341
|
-
PositionUtil.setElementPosition(this._componentRef.location.nativeElement, position);
|
|
10342
|
-
}
|
|
10343
|
-
}
|
|
10344
|
-
createMenu(event) {
|
|
10345
|
-
if (this.tetaContextMenu == null) {
|
|
10346
|
-
return;
|
|
10347
|
-
}
|
|
10348
|
-
this._eventPoint = event;
|
|
10349
|
-
this._componentRef = this.createContentRef();
|
|
10350
|
-
this._componentRef.instance.className = [
|
|
10351
|
-
...ArrayUtil.asArray(this.className),
|
|
10352
|
-
'context-menu',
|
|
10353
|
-
];
|
|
10354
|
-
this.openChange.emit(true);
|
|
10355
|
-
}
|
|
10356
|
-
}
|
|
10357
|
-
ContextMenuDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuDirective, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }, { token: DynamicComponentService }, { token: i0.Injector }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: ClickService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
10358
|
-
ContextMenuDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.1", type: ContextMenuDirective, selector: "[tetaContextMenu]", inputs: { tetaContextMenu: "tetaContextMenu" }, host: { listeners: { "contextmenu": "showContent($event)", "click": "click($event)" } }, usesInheritance: true, ngImport: i0 });
|
|
10359
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuDirective, decorators: [{
|
|
10360
|
-
type: Directive,
|
|
10361
|
-
args: [{
|
|
10362
|
-
selector: '[tetaContextMenu]',
|
|
10363
|
-
}]
|
|
10364
|
-
}], ctorParameters: function () {
|
|
10365
|
-
return [{ type: undefined, decorators: [{
|
|
10366
|
-
type: Inject,
|
|
10367
|
-
args: [DOCUMENT]
|
|
10368
|
-
}] }, { type: i0.ElementRef }, { type: DynamicComponentService }, { type: i0.Injector }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: ClickService }];
|
|
10369
|
-
}, propDecorators: { tetaContextMenu: [{
|
|
10370
|
-
type: Input
|
|
10371
|
-
}], showContent: [{
|
|
10372
|
-
type: HostListener,
|
|
10373
|
-
args: ['contextmenu', ['$event']]
|
|
10374
|
-
}], click: [{
|
|
10375
|
-
type: HostListener,
|
|
10376
|
-
args: ['click', ['$event']]
|
|
10377
|
-
}] } });
|
|
10378
|
-
|
|
10379
|
-
class ContextMenuModule {
|
|
10380
|
-
}
|
|
10381
|
-
ContextMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
10382
|
-
ContextMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, declarations: [ContextMenuDirective], imports: [CommonModule,
|
|
10383
|
-
DynamicComponentModule], exports: [ContextMenuDirective] });
|
|
10384
|
-
ContextMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, imports: [[
|
|
10385
|
-
CommonModule,
|
|
10386
|
-
DynamicComponentModule
|
|
10387
|
-
]] });
|
|
10388
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, decorators: [{
|
|
10389
|
-
type: NgModule,
|
|
10390
|
-
args: [{
|
|
10391
|
-
declarations: [ContextMenuDirective],
|
|
10392
|
-
exports: [ContextMenuDirective],
|
|
10393
|
-
imports: [
|
|
10394
|
-
CommonModule,
|
|
10395
|
-
DynamicComponentModule
|
|
10396
|
-
]
|
|
10397
|
-
}]
|
|
10398
|
-
}] });
|
|
10399
|
-
|
|
10400
10724
|
class DisableControlDirective {
|
|
10401
10725
|
constructor(ngControl) {
|
|
10402
10726
|
this.ngControl = ngControl;
|
|
@@ -10412,14 +10736,14 @@ class DisableControlDirective {
|
|
|
10412
10736
|
}
|
|
10413
10737
|
}
|
|
10414
10738
|
}
|
|
10415
|
-
DisableControlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DisableControlDirective, deps: [{ token: i3.NgControl }], target: i0.ɵɵFactoryTarget.Directive });
|
|
10739
|
+
DisableControlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DisableControlDirective, deps: [{ token: i3$1.NgControl }], target: i0.ɵɵFactoryTarget.Directive });
|
|
10416
10740
|
DisableControlDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.1", type: DisableControlDirective, selector: "[tetaDisableControl]", inputs: { tetaDisableControl: "tetaDisableControl" }, ngImport: i0 });
|
|
10417
10741
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DisableControlDirective, decorators: [{
|
|
10418
10742
|
type: Directive,
|
|
10419
10743
|
args: [{
|
|
10420
10744
|
selector: '[tetaDisableControl]'
|
|
10421
10745
|
}]
|
|
10422
|
-
}], ctorParameters: function () { return [{ type: i3.NgControl }]; }, propDecorators: { tetaDisableControl: [{
|
|
10746
|
+
}], ctorParameters: function () { return [{ type: i3$1.NgControl }]; }, propDecorators: { tetaDisableControl: [{
|
|
10423
10747
|
type: Input
|
|
10424
10748
|
}] } });
|
|
10425
10749
|
|
|
@@ -10635,6 +10959,7 @@ class LoaderDirective {
|
|
|
10635
10959
|
this._renderer = _renderer;
|
|
10636
10960
|
this._document = _document;
|
|
10637
10961
|
this.appendToBody = false;
|
|
10962
|
+
this.mask = false;
|
|
10638
10963
|
this._alive = true;
|
|
10639
10964
|
this._element = this._elementRef.nativeElement;
|
|
10640
10965
|
}
|
|
@@ -10659,6 +10984,13 @@ class LoaderDirective {
|
|
|
10659
10984
|
this._loader = this._renderer.createElement('div');
|
|
10660
10985
|
this._loader.setAttribute('class', 'loader');
|
|
10661
10986
|
}
|
|
10987
|
+
if ((this._mask === null || this._mask === undefined) && this.mask) {
|
|
10988
|
+
this._mask = this._renderer.createElement('div');
|
|
10989
|
+
this._mask.setAttribute('class', 'loader-mask');
|
|
10990
|
+
}
|
|
10991
|
+
if (this.mask) {
|
|
10992
|
+
this._renderer.appendChild(this.appendToBody ? this._document.body : this._element, this._mask);
|
|
10993
|
+
}
|
|
10662
10994
|
this._renderer.appendChild(this.appendToBody ? this._document.body : this._element, this._loader);
|
|
10663
10995
|
this.setPosition();
|
|
10664
10996
|
}
|
|
@@ -10666,6 +10998,9 @@ class LoaderDirective {
|
|
|
10666
10998
|
if (this._loader && this._loader.parentElement) {
|
|
10667
10999
|
this._renderer.removeChild(this._loader.parentElement, this._loader);
|
|
10668
11000
|
}
|
|
11001
|
+
if (this._mask && this._mask.parentElement) {
|
|
11002
|
+
this._renderer.removeChild(this._loader.parentElement, this._mask);
|
|
11003
|
+
}
|
|
10669
11004
|
}
|
|
10670
11005
|
setPosition() {
|
|
10671
11006
|
const position = this._element.getBoundingClientRect();
|
|
@@ -10674,7 +11009,7 @@ class LoaderDirective {
|
|
|
10674
11009
|
}
|
|
10675
11010
|
}
|
|
10676
11011
|
LoaderDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: LoaderDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
|
|
10677
|
-
LoaderDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.1", type: LoaderDirective, selector: "[tetaLoader]", inputs: { appendToBody: "appendToBody", tetaLoader: "tetaLoader" }, ngImport: i0 });
|
|
11012
|
+
LoaderDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.1", type: LoaderDirective, selector: "[tetaLoader]", inputs: { appendToBody: "appendToBody", mask: "mask", tetaLoader: "tetaLoader" }, ngImport: i0 });
|
|
10678
11013
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: LoaderDirective, decorators: [{
|
|
10679
11014
|
type: Directive,
|
|
10680
11015
|
args: [{
|
|
@@ -10687,6 +11022,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
10687
11022
|
}] }];
|
|
10688
11023
|
}, propDecorators: { appendToBody: [{
|
|
10689
11024
|
type: Input
|
|
11025
|
+
}], mask: [{
|
|
11026
|
+
type: Input
|
|
10690
11027
|
}], tetaLoader: [{
|
|
10691
11028
|
type: Input
|
|
10692
11029
|
}] } });
|
|
@@ -10845,7 +11182,7 @@ class ResizePanelComponent {
|
|
|
10845
11182
|
}
|
|
10846
11183
|
}
|
|
10847
11184
|
ResizePanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ResizePanelComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
|
|
10848
|
-
ResizePanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: ResizePanelComponent, selector: "teta-resize-panel", inputs: { direction: "direction", grabPosition: "grabPosition", name: "name", minSize: "minSize", maxSize: "maxSize" }, host: { properties: { "class.resize-panel": "this.resizePanelClass" } }, ngImport: i0, template: "<ng-content></ng-content>\n<div #grab class=\"resize-grab\"\n (resizeStart)=\"resizeStart($event)\"\n (resizeProcess)=\"resizeProcess($event)\"\n (resizeEnd)=\"resizeEnd($event)\"\n [tetaResizeDrag]=\"direction\"\n [ngClass]=\"getClassName()\">\n <teta-icon [name]=\"direction\"></teta-icon>\n</div>\n", styles: [""], components: [{ type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], directives: [{ type: ResizeDragDirective, selector: "[tetaResizeDrag]", inputs: ["tetaResizeDrag"], outputs: ["resizeStart", "resizeProcess", "resizeEnd"] }, { type:
|
|
11185
|
+
ResizePanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: ResizePanelComponent, selector: "teta-resize-panel", inputs: { direction: "direction", grabPosition: "grabPosition", name: "name", minSize: "minSize", maxSize: "maxSize" }, host: { properties: { "class.resize-panel": "this.resizePanelClass" } }, ngImport: i0, template: "<ng-content></ng-content>\n<div #grab class=\"resize-grab\"\n (resizeStart)=\"resizeStart($event)\"\n (resizeProcess)=\"resizeProcess($event)\"\n (resizeEnd)=\"resizeEnd($event)\"\n [tetaResizeDrag]=\"direction\"\n [ngClass]=\"getClassName()\">\n <teta-icon [name]=\"direction\"></teta-icon>\n</div>\n", styles: [""], components: [{ type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], directives: [{ type: ResizeDragDirective, selector: "[tetaResizeDrag]", inputs: ["tetaResizeDrag"], outputs: ["resizeStart", "resizeProcess", "resizeEnd"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10849
11186
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ResizePanelComponent, decorators: [{
|
|
10850
11187
|
type: Component,
|
|
10851
11188
|
args: [{ selector: 'teta-resize-panel', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n<div #grab class=\"resize-grab\"\n (resizeStart)=\"resizeStart($event)\"\n (resizeProcess)=\"resizeProcess($event)\"\n (resizeEnd)=\"resizeEnd($event)\"\n [tetaResizeDrag]=\"direction\"\n [ngClass]=\"getClassName()\">\n <teta-icon [name]=\"direction\"></teta-icon>\n</div>\n", styles: [""] }]
|
|
@@ -11045,12 +11382,62 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
11045
11382
|
}] }];
|
|
11046
11383
|
} });
|
|
11047
11384
|
|
|
11048
|
-
|
|
11049
|
-
|
|
11050
|
-
|
|
11051
|
-
|
|
11052
|
-
|
|
11053
|
-
|
|
11385
|
+
const ruLocale = {
|
|
11386
|
+
apply: 'Применить',
|
|
11387
|
+
cancel: 'Отменить',
|
|
11388
|
+
clear: 'Очистить',
|
|
11389
|
+
pin: 'Закрепить',
|
|
11390
|
+
unpin: 'Открепить',
|
|
11391
|
+
sortAsc: 'Сортировать по возрастанию',
|
|
11392
|
+
sortDesc: 'Сортировать по убыванию',
|
|
11393
|
+
clearSort: 'Сбросить сортировку',
|
|
11394
|
+
clearAllSort: 'Сбросить все сортировки',
|
|
11395
|
+
clearFilter: 'Очистить фильтр',
|
|
11396
|
+
clearAllFilters: 'Очистить все фильтры',
|
|
11397
|
+
autosizeColumn: 'Авторазмер колонки',
|
|
11398
|
+
autosizeAll: 'Авторазмер всех колонок',
|
|
11399
|
+
resetColumnsSize: 'Восстановить размер колонок',
|
|
11400
|
+
from: 'От',
|
|
11401
|
+
to: 'До',
|
|
11402
|
+
all: 'Все',
|
|
11403
|
+
min: 'Мин',
|
|
11404
|
+
max: 'Макс',
|
|
11405
|
+
sum: 'Сумма',
|
|
11406
|
+
avg: 'Средн',
|
|
11407
|
+
search: 'Поиск',
|
|
11408
|
+
months: [
|
|
11409
|
+
'Январь',
|
|
11410
|
+
'Февраль',
|
|
11411
|
+
'Март',
|
|
11412
|
+
'Апрель',
|
|
11413
|
+
'Май',
|
|
11414
|
+
'Июнь',
|
|
11415
|
+
'Июль',
|
|
11416
|
+
'Август',
|
|
11417
|
+
'Сентябрь',
|
|
11418
|
+
'Октябрь',
|
|
11419
|
+
'Ноябрь',
|
|
11420
|
+
'Декабрь'
|
|
11421
|
+
],
|
|
11422
|
+
days: [
|
|
11423
|
+
'Воскресенье',
|
|
11424
|
+
'Понедельник',
|
|
11425
|
+
'Вторник',
|
|
11426
|
+
'Среда',
|
|
11427
|
+
'Четверг',
|
|
11428
|
+
'Пятниуа',
|
|
11429
|
+
'Суббота'
|
|
11430
|
+
],
|
|
11431
|
+
daysShort: [
|
|
11432
|
+
'Вс',
|
|
11433
|
+
'Пн',
|
|
11434
|
+
'Вт',
|
|
11435
|
+
'Ср',
|
|
11436
|
+
'Чт',
|
|
11437
|
+
'Пт',
|
|
11438
|
+
'Сб'
|
|
11439
|
+
]
|
|
11440
|
+
};
|
|
11054
11441
|
|
|
11055
11442
|
/**
|
|
11056
11443
|
* Components
|
|
@@ -11060,5 +11447,5 @@ class StringUtil {
|
|
|
11060
11447
|
* Generated bundle index. Do not edit.
|
|
11061
11448
|
*/
|
|
11062
11449
|
|
|
11063
|
-
export { AccordionComponent, AccordionContentDirective, AccordionHeadComponent, AccordionItemComponent, AccordionModule, AggregationType, Align, ArrayUtil, BooleanCellComponent, BooleanFilter, BooleanFilterComponent, ButtonComponent, ButtonModule, CHECKBOX_CONTROL_VALUE_ACCESSOR, CellComponent, CellComponentBase, CellHostComponent, Chart3dComponent, Chart3dModule, Chart3dOptions, CheckboxComponent, CheckboxModule, ClickOutsideDirective, ClickOutsideModule, ClickService, ColumnReorderEvent, ColumnResizeEvent, ContextMenuDirective, ContextMenuModule, CurrentModal, DATE_PICKER_CONTROL_VALUE_ACCESSOR, DAY_SELECT_CONTROL_VALUE_ACCESSOR, DateCellComponent, DateFilter, DateFilterComponent, DateFilterValue, DatePeriod, DatePickerComponent, DatePickerModule, DateTimeCellComponent, DateUtil, DaySelectComponent, DelimiterComponent, DelimiterModule, DetailComponentBase, DialogComponent, DialogService, DisableControlDirective, DisableControlModule, DomUtil, DragSortContainerDirective, DragSortItemDirective, DragSortModule, DropdownComponent, DropdownContentDirective, DropdownDirective, DropdownHeadDirective, DropdownModule, DynamicComponentModule, DynamicComponentService, DynamicContentBaseDirective, DynamicData, EditEvent, EditType, ExpandPanelComponent, ExpandPanelContentDirective, ExpandPanelHeadDirective, ExpandPanelModule, FileItemComponent, FileUploadAreaComponent, FileUploadModule, FilterBase, FilterComponentBase, FilterHostComponent, FilterItem, FilterModule,
|
|
11450
|
+
export { AccordionComponent, AccordionContentDirective, AccordionHeadComponent, AccordionItemComponent, AccordionModule, AggregationType, Align, ArrayUtil, BooleanCellComponent, BooleanFilter, BooleanFilterComponent, ButtonComponent, ButtonModule, CHECKBOX_CONTROL_VALUE_ACCESSOR, CellComponent, CellComponentBase, CellHostComponent, Chart3dComponent, Chart3dModule, Chart3dOptions, CheckboxComponent, CheckboxModule, ClickOutsideDirective, ClickOutsideModule, ClickService, ColumnReorderEvent, ColumnResizeEvent, ContextMenuDirective, ContextMenuModule, CurrentModal, DATE_PICKER_CONTROL_VALUE_ACCESSOR, DAY_SELECT_CONTROL_VALUE_ACCESSOR, DateCellComponent, DateFilter, DateFilterComponent, DateFilterValue, DatePeriod, DatePickerComponent, DatePickerModule, DateTimeCellComponent, DateUtil, DaySelectComponent, DelimiterComponent, DelimiterModule, DetailComponentBase, DialogComponent, DialogService, DisableControlDirective, DisableControlModule, DomUtil, DragSortContainerDirective, DragSortItemDirective, DragSortModule, DropdownComponent, DropdownContentDirective, DropdownDirective, DropdownHeadDirective, DropdownModule, DynamicComponentModule, DynamicComponentService, DynamicContentBaseDirective, DynamicData, EditEvent, EditType, ExpandPanelComponent, ExpandPanelContentDirective, ExpandPanelHeadDirective, ExpandPanelModule, FileItemComponent, FileUploadAreaComponent, FileUploadModule, FilterBase, FilterComponentBase, FilterHostComponent, FilterItem, FilterModule, FilterState, FilterType, FormGroupTitleComponent, FormsUtil, GroupRowComponent, HeadCellComponentBase, HeadCellHostComponent, HighlightDirective, HighlightModule, HintDirective, HintModule, IconComponent, IconModule, IconService, IconSpriteDirective, InputComponent, InputModule, ListCellComponent, ListFilter, ListFilterComponent, ListFilterType, LoaderDirective, LoaderModule, MONTH_PICKER_CONTROL_VALUE_ACCESSOR, Message, MessageComponent, MessageHostComponent, MessageModule, MessageService, ModalCloseReason, ModalContainerComponent, ModalInstance, ModalModule, ModalService, MonthPickerComponent, NoAutofillDirective, NoAutofillModule, NumberPipe, NumberPipeModule, NumericCellComponent, NumericFilter, NumericFilterComponent, NumericFilterValue, OnlyNumberDirective, OnlyNumberModule, OverlayContainerService, PagerComponent, PagerModule, PagerState, PagerUtil, PanelComponent, PanelModule, PopupContentComponent, PositionUtil, ProgressBarComponent, ProgressBarModule, PropertyGridComponent, PropertyGridModule, RadioButtonComponent, RadioComponent, RadioModule, ResizeDragDirective, ResizeDragModule, ResizePanelComponent, ResizePanelModule, SLIDER_CONTROL_VALUE_ACCESSOR, SWITCH_CONTROL_VALUE_ACCESSOR, SelectComponent, SelectModule, SelectOptionDirective, SelectType, SelectValueDirective, SidebarComponent, SidebarModule, SidebarPosition, SortEvent, SortParam, StateUtil, StringCellComponent, StringFilter, StringFilterComponent, StringFilterType, StringUtil, SwitchButtonComponent, SwitchComponent, SwitchModule, TOGGLE_CONTROL_VALUE_ACCESSOR, TabComponent, TabContentDirective, TabTitleDirective, TableBodyComponent, TableColumn, TableColumnStore, TableComponent, TableHeadComponent, TableModule, TableRow, TableService, TableUtil, TabsComponent, TabsModule, TetaConfigService, TetaContentRef, TetaSize, TetaTemplateDirective, TetaTemplateModule, TextFieldComponent, ThemeSwitchComponent, ThemeSwitchModule, ThemeSwitchService, ToggleComponent, ToggleModule, ToolbarComponent, ToolbarModule, TooltipDirective, TooltipModule, TreeComponent, TreeItemToggleComponent, TreeModule, TreeService, VerticalAlign, enLocale, formatNumber, getCellComponent, getPrecision, prependZero, ruLocale };
|
|
11064
11451
|
//# sourceMappingURL=tetacom-ng-components.mjs.map
|