@tetacom/ng-components 1.0.34 → 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/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 +11 -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/esm2020/common/contract/i-id.mjs +2 -0
- package/esm2020/common/contract/public-api.mjs +2 -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 +14 -8
- 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 +39 -30
- 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/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 +1077 -718
- package/fesm2015/tetacom-ng-components.mjs.map +1 -1
- package/fesm2020/tetacom-ng-components.mjs +1074 -702
- 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/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,13 +1,13 @@
|
|
|
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';
|
|
@@ -63,7 +63,7 @@ class AccordionItemComponent {
|
|
|
63
63
|
ngOnInit() { }
|
|
64
64
|
}
|
|
65
65
|
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 });
|
|
66
|
-
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:
|
|
66
|
+
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 });
|
|
67
67
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: AccordionItemComponent, decorators: [{
|
|
68
68
|
type: Component,
|
|
69
69
|
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: [""] }]
|
|
@@ -151,7 +151,7 @@ class AccordionHeadComponent {
|
|
|
151
151
|
ngOnInit() { }
|
|
152
152
|
}
|
|
153
153
|
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 });
|
|
154
|
-
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:
|
|
154
|
+
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 });
|
|
155
155
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: AccordionHeadComponent, decorators: [{
|
|
156
156
|
type: Component,
|
|
157
157
|
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: [""] }]
|
|
@@ -463,10 +463,10 @@ class CheckboxComponent {
|
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
465
|
CheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: CheckboxComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
466
|
-
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
|
|
466
|
+
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 });
|
|
467
467
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
468
468
|
type: Component,
|
|
469
|
-
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
|
|
469
|
+
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: [""] }]
|
|
470
470
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { tabindex: [{
|
|
471
471
|
type: HostBinding,
|
|
472
472
|
args: ['attr.tabindex']
|
|
@@ -919,39 +919,81 @@ var VerticalAlign;
|
|
|
919
919
|
VerticalAlign[VerticalAlign["auto"] = 3] = "auto";
|
|
920
920
|
})(VerticalAlign || (VerticalAlign = {}));
|
|
921
921
|
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
922
|
+
const enLocale = {
|
|
923
|
+
apply: 'Apply',
|
|
924
|
+
cancel: 'Cancel',
|
|
925
|
+
clear: 'Clear',
|
|
926
|
+
pin: 'Pin',
|
|
927
|
+
unpin: 'Unpin',
|
|
928
|
+
sortAsc: 'Sort asc',
|
|
929
|
+
sortDesc: 'Sort desc',
|
|
930
|
+
clearSort: 'Clear sort',
|
|
931
|
+
clearAllSort: 'Clear all sort',
|
|
932
|
+
clearFilter: 'Clear filter',
|
|
933
|
+
clearAllFilters: 'Clear all filters',
|
|
934
|
+
autosizeColumn: 'Autosize column',
|
|
935
|
+
autosizeAll: 'Autosize all columns',
|
|
936
|
+
resetColumnsSize: 'Reset columns size',
|
|
937
|
+
from: 'From',
|
|
938
|
+
to: 'To',
|
|
939
|
+
all: 'All',
|
|
940
|
+
min: 'Min',
|
|
941
|
+
max: 'Max',
|
|
942
|
+
sum: 'Sum',
|
|
943
|
+
avg: 'Avg',
|
|
944
|
+
search: 'Search',
|
|
945
|
+
months: [
|
|
946
|
+
'January',
|
|
947
|
+
'February',
|
|
948
|
+
'March',
|
|
949
|
+
'April',
|
|
950
|
+
'May',
|
|
951
|
+
'June',
|
|
952
|
+
'July',
|
|
953
|
+
'August',
|
|
954
|
+
'September',
|
|
955
|
+
'October',
|
|
956
|
+
'November',
|
|
957
|
+
'December'
|
|
958
|
+
],
|
|
959
|
+
days: [
|
|
960
|
+
'Sunday',
|
|
961
|
+
'Monday',
|
|
962
|
+
'Tuesday',
|
|
963
|
+
'Wednesday',
|
|
964
|
+
'Thursday',
|
|
965
|
+
'Friday',
|
|
966
|
+
'Saturday'
|
|
967
|
+
],
|
|
968
|
+
daysShort: [
|
|
969
|
+
'Su',
|
|
970
|
+
'Mo',
|
|
971
|
+
'Tu',
|
|
972
|
+
'We',
|
|
973
|
+
'Th',
|
|
974
|
+
'Fr',
|
|
975
|
+
'Sa'
|
|
976
|
+
]
|
|
977
|
+
};
|
|
934
978
|
|
|
935
|
-
class
|
|
979
|
+
class TetaConfigService {
|
|
936
980
|
constructor() {
|
|
937
|
-
this.
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
dayNamesMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
941
|
-
monthNames: ['January', 'February', 'March', 'April', 'May', 'June',
|
|
942
|
-
'July', 'August', 'September', 'October', 'November', 'December'],
|
|
943
|
-
monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
944
|
-
today: 'Today'
|
|
945
|
-
});
|
|
946
|
-
this.locale = new BehaviorSubject(this._defaults);
|
|
981
|
+
this.defaultLocale = enLocale;
|
|
982
|
+
this.locale$ = new BehaviorSubject(this.defaultLocale);
|
|
983
|
+
this.locale = this.locale$.asObservable();
|
|
947
984
|
}
|
|
948
|
-
setLocale(
|
|
949
|
-
|
|
985
|
+
setLocale(newLocale) {
|
|
986
|
+
if (newLocale) {
|
|
987
|
+
this.locale$.next(newLocale);
|
|
988
|
+
}
|
|
989
|
+
else {
|
|
990
|
+
this.locale$.next(this.defaultLocale);
|
|
991
|
+
}
|
|
950
992
|
}
|
|
951
993
|
}
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type:
|
|
994
|
+
TetaConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TetaConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
995
|
+
TetaConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TetaConfigService, providedIn: 'root' });
|
|
996
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TetaConfigService, decorators: [{
|
|
955
997
|
type: Injectable,
|
|
956
998
|
args: [{
|
|
957
999
|
providedIn: 'root'
|
|
@@ -1109,11 +1151,12 @@ class DropdownBase {
|
|
|
1109
1151
|
this._renderer = _renderer;
|
|
1110
1152
|
this.align = Align.left;
|
|
1111
1153
|
this.verticalAlign = VerticalAlign.bottom;
|
|
1112
|
-
this.
|
|
1154
|
+
this.backdrop = false;
|
|
1113
1155
|
this.openChange = new EventEmitter();
|
|
1114
1156
|
this.autoClose = true;
|
|
1115
1157
|
this.autoCloseIgnore = ['inside'];
|
|
1116
1158
|
this._body = null;
|
|
1159
|
+
this._backdrop = null;
|
|
1117
1160
|
this._open = false;
|
|
1118
1161
|
this._alive = true;
|
|
1119
1162
|
this._zone.onStable
|
|
@@ -1193,6 +1236,9 @@ class DropdownBase {
|
|
|
1193
1236
|
this._renderer.removeChild(this.container, this._body);
|
|
1194
1237
|
this._open = false;
|
|
1195
1238
|
this._body = null;
|
|
1239
|
+
if (this._backdrop) {
|
|
1240
|
+
this._renderer.removeChild(this._document.body, this._backdrop);
|
|
1241
|
+
}
|
|
1196
1242
|
this.openChange.emit(this.open);
|
|
1197
1243
|
}
|
|
1198
1244
|
}
|
|
@@ -1204,9 +1250,13 @@ class DropdownBase {
|
|
|
1204
1250
|
this.openChange.emit(this.open);
|
|
1205
1251
|
const renderer = this._renderer;
|
|
1206
1252
|
const content = this._content.nativeElement;
|
|
1207
|
-
const container = (this._body =
|
|
1208
|
-
this._body || renderer.createElement('div'));
|
|
1253
|
+
const container = (this._body = this._body || renderer.createElement('div'));
|
|
1209
1254
|
renderer.addClass(container, 'dropdown');
|
|
1255
|
+
if (this.backdrop) {
|
|
1256
|
+
this._backdrop = renderer.createElement('div');
|
|
1257
|
+
renderer.addClass(this._backdrop, 'dropdown-backdrop');
|
|
1258
|
+
renderer.appendChild(this._document.body, this._backdrop);
|
|
1259
|
+
}
|
|
1210
1260
|
if (this.className != null) {
|
|
1211
1261
|
if (this.className instanceof Array && this.className.length > 0) {
|
|
1212
1262
|
this.className.forEach((_) => {
|
|
@@ -1251,7 +1301,7 @@ class DropdownBase {
|
|
|
1251
1301
|
}
|
|
1252
1302
|
}
|
|
1253
1303
|
DropdownBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DropdownBase, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
1254
|
-
DropdownBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.1", type: DropdownBase, inputs: { align: "align", verticalAlign: "verticalAlign", appendToBody: "appendToBody", disabled: "disabled",
|
|
1304
|
+
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 });
|
|
1255
1305
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DropdownBase, decorators: [{
|
|
1256
1306
|
type: Directive
|
|
1257
1307
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: undefined }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { align: [{
|
|
@@ -1262,7 +1312,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
1262
1312
|
type: Input
|
|
1263
1313
|
}], disabled: [{
|
|
1264
1314
|
type: Input
|
|
1265
|
-
}],
|
|
1315
|
+
}], backdrop: [{
|
|
1266
1316
|
type: Input
|
|
1267
1317
|
}], className: [{
|
|
1268
1318
|
type: Input
|
|
@@ -1510,7 +1560,7 @@ class YearSelectComponent {
|
|
|
1510
1560
|
}
|
|
1511
1561
|
}
|
|
1512
1562
|
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 });
|
|
1513
|
-
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:
|
|
1563
|
+
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 });
|
|
1514
1564
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: YearSelectComponent, decorators: [{
|
|
1515
1565
|
type: Component,
|
|
1516
1566
|
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"] }]
|
|
@@ -1637,7 +1687,8 @@ class MonthSelectComponent {
|
|
|
1637
1687
|
}
|
|
1638
1688
|
return new Date(year, month, 1);
|
|
1639
1689
|
}
|
|
1640
|
-
ngOnInit() {
|
|
1690
|
+
ngOnInit() {
|
|
1691
|
+
}
|
|
1641
1692
|
ngOnDestroy() {
|
|
1642
1693
|
this._alive = false;
|
|
1643
1694
|
}
|
|
@@ -1668,10 +1719,10 @@ class MonthSelectComponent {
|
|
|
1668
1719
|
}
|
|
1669
1720
|
}
|
|
1670
1721
|
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 });
|
|
1671
|
-
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.
|
|
1722
|
+
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 });
|
|
1672
1723
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: MonthSelectComponent, decorators: [{
|
|
1673
1724
|
type: Component,
|
|
1674
|
-
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.
|
|
1725
|
+
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"] }]
|
|
1675
1726
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: PickerTouchService }]; }, propDecorators: { locale: [{
|
|
1676
1727
|
type: Input
|
|
1677
1728
|
}], minDate: [{
|
|
@@ -1750,8 +1801,10 @@ class DaySelectComponent {
|
|
|
1750
1801
|
this.currentValue = model ? model : new Date();
|
|
1751
1802
|
this._cdr.markForCheck();
|
|
1752
1803
|
}
|
|
1753
|
-
onChange(_) {
|
|
1754
|
-
|
|
1804
|
+
onChange(_) {
|
|
1805
|
+
}
|
|
1806
|
+
onTouched() {
|
|
1807
|
+
}
|
|
1755
1808
|
registerOnChange(fn) {
|
|
1756
1809
|
this.onChange = fn;
|
|
1757
1810
|
}
|
|
@@ -1820,12 +1873,12 @@ class DaySelectComponent {
|
|
|
1820
1873
|
return false;
|
|
1821
1874
|
}
|
|
1822
1875
|
}
|
|
1823
|
-
DaySelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DaySelectComponent, deps: [{ token:
|
|
1824
|
-
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.
|
|
1876
|
+
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 });
|
|
1877
|
+
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 });
|
|
1825
1878
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DaySelectComponent, decorators: [{
|
|
1826
1879
|
type: Component,
|
|
1827
|
-
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.
|
|
1828
|
-
}], ctorParameters: function () { return [{ type:
|
|
1880
|
+
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: [""] }]
|
|
1881
|
+
}], ctorParameters: function () { return [{ type: TetaConfigService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { firstDayOfWeek: [{
|
|
1829
1882
|
type: Input
|
|
1830
1883
|
}], disabledDates: [{
|
|
1831
1884
|
type: Input
|
|
@@ -1927,6 +1980,7 @@ class DatePickerComponent {
|
|
|
1927
1980
|
this.firstDayOfWeek = 1;
|
|
1928
1981
|
this.align = Align.left;
|
|
1929
1982
|
this.verticalAlign = VerticalAlign.auto;
|
|
1983
|
+
this.allowNull = true;
|
|
1930
1984
|
this.showTime = false;
|
|
1931
1985
|
this.classDatepicker = true;
|
|
1932
1986
|
this.tabindex = 0;
|
|
@@ -2092,6 +2146,10 @@ class DatePickerComponent {
|
|
|
2092
2146
|
registerOnTouched(fn) {
|
|
2093
2147
|
this.onTouched = fn;
|
|
2094
2148
|
}
|
|
2149
|
+
setDisabledState(isDisabled) {
|
|
2150
|
+
this.disabled = isDisabled;
|
|
2151
|
+
this._cdr.detectChanges();
|
|
2152
|
+
}
|
|
2095
2153
|
ngOnInit() {
|
|
2096
2154
|
}
|
|
2097
2155
|
ngOnDestroy() {
|
|
@@ -2120,12 +2178,12 @@ class DatePickerComponent {
|
|
|
2120
2178
|
return DateUtil.truncateToDay(new Date());
|
|
2121
2179
|
}
|
|
2122
2180
|
}
|
|
2123
|
-
DatePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DatePickerComponent, deps: [{ token:
|
|
2124
|
-
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'\"
|
|
2181
|
+
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 });
|
|
2182
|
+
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 });
|
|
2125
2183
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DatePickerComponent, decorators: [{
|
|
2126
2184
|
type: Component,
|
|
2127
|
-
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'\"
|
|
2128
|
-
}], ctorParameters: function () { return [{ type:
|
|
2185
|
+
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: [""] }]
|
|
2186
|
+
}], ctorParameters: function () { return [{ type: TetaConfigService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { disabled: [{
|
|
2129
2187
|
type: Input
|
|
2130
2188
|
}], invalid: [{
|
|
2131
2189
|
type: Input
|
|
@@ -2151,6 +2209,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
2151
2209
|
type: Input
|
|
2152
2210
|
}], appendToBody: [{
|
|
2153
2211
|
type: Input
|
|
2212
|
+
}], allowNull: [{
|
|
2213
|
+
type: Input
|
|
2214
|
+
}], backdrop: [{
|
|
2215
|
+
type: Input
|
|
2154
2216
|
}], showTime: [{
|
|
2155
2217
|
type: HostBinding,
|
|
2156
2218
|
args: ['class.datepicker-wide']
|
|
@@ -2189,8 +2251,10 @@ class MonthPickerComponent {
|
|
|
2189
2251
|
this.displayMode = DatePickerMode.month;
|
|
2190
2252
|
this._value = null;
|
|
2191
2253
|
this._alive = true;
|
|
2192
|
-
this.onChange = (_) => {
|
|
2193
|
-
|
|
2254
|
+
this.onChange = (_) => {
|
|
2255
|
+
};
|
|
2256
|
+
this.onTouched = () => {
|
|
2257
|
+
};
|
|
2194
2258
|
this.isMinInvalid = (dat) => {
|
|
2195
2259
|
if (!this.minDate || !(this.minDate instanceof Date) || !dat) {
|
|
2196
2260
|
return false;
|
|
@@ -2382,12 +2446,12 @@ class MonthPickerComponent {
|
|
|
2382
2446
|
this.displayMode = result;
|
|
2383
2447
|
}
|
|
2384
2448
|
}
|
|
2385
|
-
MonthPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: MonthPickerComponent, deps: [{ token:
|
|
2386
|
-
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.
|
|
2449
|
+
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 });
|
|
2450
|
+
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 });
|
|
2387
2451
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: MonthPickerComponent, decorators: [{
|
|
2388
2452
|
type: Component,
|
|
2389
|
-
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.
|
|
2390
|
-
}], ctorParameters: function () { return [{ type:
|
|
2453
|
+
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: [""] }]
|
|
2454
|
+
}], ctorParameters: function () { return [{ type: TetaConfigService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { disabled: [{
|
|
2391
2455
|
type: Input
|
|
2392
2456
|
}], minDate: [{
|
|
2393
2457
|
type: Input
|
|
@@ -2714,14 +2778,14 @@ class OnlyNumberDirective {
|
|
|
2714
2778
|
this._control.control.setValue(valid ? value : this._previousValue ?? 0);
|
|
2715
2779
|
}
|
|
2716
2780
|
}
|
|
2717
|
-
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 });
|
|
2781
|
+
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 });
|
|
2718
2782
|
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 });
|
|
2719
2783
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: OnlyNumberDirective, decorators: [{
|
|
2720
2784
|
type: Directive,
|
|
2721
2785
|
args: [{
|
|
2722
2786
|
selector: '[tetaOnlyNumber]',
|
|
2723
2787
|
}]
|
|
2724
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i3.NgControl }]; }, propDecorators: { tetaOnlyNumber: [{
|
|
2788
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i3$1.NgControl }]; }, propDecorators: { tetaOnlyNumber: [{
|
|
2725
2789
|
type: Input
|
|
2726
2790
|
}], allowDecimals: [{
|
|
2727
2791
|
type: Input
|
|
@@ -3115,7 +3179,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
3115
3179
|
|
|
3116
3180
|
class ToolbarComponent {
|
|
3117
3181
|
get getClass() {
|
|
3118
|
-
const result = [this.class, 'toolbar'
|
|
3182
|
+
const result = [this.class, 'toolbar'];
|
|
3119
3183
|
if (this.palette) {
|
|
3120
3184
|
result.push(`toolbar-${this.palette}`);
|
|
3121
3185
|
}
|
|
@@ -3172,7 +3236,7 @@ class ExpandPanelComponent {
|
|
|
3172
3236
|
}
|
|
3173
3237
|
}
|
|
3174
3238
|
ExpandPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ExpandPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3175
|
-
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:
|
|
3239
|
+
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 });
|
|
3176
3240
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ExpandPanelComponent, decorators: [{
|
|
3177
3241
|
type: Component,
|
|
3178
3242
|
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"] }]
|
|
@@ -3352,22 +3416,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
3352
3416
|
}]
|
|
3353
3417
|
}] });
|
|
3354
3418
|
|
|
3355
|
-
class
|
|
3356
|
-
|
|
3357
|
-
|
|
3419
|
+
class StringUtil {
|
|
3420
|
+
static firstLetterToLower(input) {
|
|
3421
|
+
return input.charAt(0).toLocaleLowerCase() + input.slice(1);
|
|
3422
|
+
}
|
|
3423
|
+
;
|
|
3424
|
+
static firstLetterToUpper(input) {
|
|
3425
|
+
return input.charAt(0).toLocaleUpperCase() + input.slice(1);
|
|
3426
|
+
}
|
|
3427
|
+
;
|
|
3358
3428
|
}
|
|
3359
|
-
FilterPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3360
|
-
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 });
|
|
3361
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterPanelComponent, decorators: [{
|
|
3362
|
-
type: Component,
|
|
3363
|
-
args: [{ selector: 'teta-filter-panel', changeDetection: ChangeDetectionStrategy.OnPush, template: "<p>filter-panel works!</p>\n", styles: [""] }]
|
|
3364
|
-
}], ctorParameters: function () { return []; } });
|
|
3365
3429
|
|
|
3366
3430
|
class FilterBase {
|
|
3367
3431
|
constructor(options) {
|
|
3368
3432
|
if (options) {
|
|
3369
|
-
this.field = options.field;
|
|
3370
|
-
this.name = options.name;
|
|
3433
|
+
this.field = StringUtil.firstLetterToLower(options.field);
|
|
3434
|
+
this.name = StringUtil.firstLetterToLower(options.name);
|
|
3371
3435
|
}
|
|
3372
3436
|
}
|
|
3373
3437
|
}
|
|
@@ -3405,10 +3469,10 @@ class InputComponent {
|
|
|
3405
3469
|
ngOnInit() { }
|
|
3406
3470
|
}
|
|
3407
3471
|
InputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3408
|
-
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:
|
|
3472
|
+
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 });
|
|
3409
3473
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: InputComponent, decorators: [{
|
|
3410
3474
|
type: Component,
|
|
3411
|
-
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:
|
|
3475
|
+
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"] }]
|
|
3412
3476
|
}], ctorParameters: function () { return []; }, propDecorators: { label: [{
|
|
3413
3477
|
type: Input
|
|
3414
3478
|
}], horizontal: [{
|
|
@@ -3424,11 +3488,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
3424
3488
|
}] } });
|
|
3425
3489
|
|
|
3426
3490
|
class NumericFilterComponent extends FilterComponentBase {
|
|
3427
|
-
constructor(changeDetector) {
|
|
3491
|
+
constructor(changeDetector, _config) {
|
|
3428
3492
|
super();
|
|
3429
3493
|
this.changeDetector = changeDetector;
|
|
3494
|
+
this._config = _config;
|
|
3430
3495
|
this.filterOptions = [];
|
|
3431
3496
|
this.filterChanged = new EventEmitter();
|
|
3497
|
+
this.locale = this._config.locale;
|
|
3432
3498
|
}
|
|
3433
3499
|
set state(val) {
|
|
3434
3500
|
this.state$ = val;
|
|
@@ -3454,12 +3520,14 @@ class NumericFilterComponent extends FilterComponentBase {
|
|
|
3454
3520
|
return filter;
|
|
3455
3521
|
}
|
|
3456
3522
|
}
|
|
3457
|
-
NumericFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NumericFilterComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3458
|
-
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]=\"
|
|
3523
|
+
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 });
|
|
3524
|
+
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 });
|
|
3459
3525
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NumericFilterComponent, decorators: [{
|
|
3460
3526
|
type: Component,
|
|
3461
|
-
args: [{ selector: 'teta-numeric-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-row padding-3\">\n <teta-input [label]=\"
|
|
3462
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
3527
|
+
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: [""] }]
|
|
3528
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: TetaConfigService }]; }, propDecorators: { column: [{
|
|
3529
|
+
type: Input
|
|
3530
|
+
}], data: [{
|
|
3463
3531
|
type: Input
|
|
3464
3532
|
}], filterOptions: [{
|
|
3465
3533
|
type: Input
|
|
@@ -3500,11 +3568,13 @@ class StringFilter extends FilterBase {
|
|
|
3500
3568
|
}
|
|
3501
3569
|
|
|
3502
3570
|
class StringFilterComponent extends FilterComponentBase {
|
|
3503
|
-
constructor(changeDetector) {
|
|
3571
|
+
constructor(changeDetector, _config) {
|
|
3504
3572
|
super();
|
|
3505
3573
|
this.changeDetector = changeDetector;
|
|
3574
|
+
this._config = _config;
|
|
3506
3575
|
this.filterOptions = [];
|
|
3507
3576
|
this.filterChanged = new EventEmitter();
|
|
3577
|
+
this.locale = this._config.locale;
|
|
3508
3578
|
}
|
|
3509
3579
|
set state(val) {
|
|
3510
3580
|
this.state$ = val;
|
|
@@ -3533,12 +3603,14 @@ class StringFilterComponent extends FilterComponentBase {
|
|
|
3533
3603
|
return filter;
|
|
3534
3604
|
}
|
|
3535
3605
|
}
|
|
3536
|
-
StringFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: StringFilterComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3537
|
-
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]=\"
|
|
3606
|
+
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 });
|
|
3607
|
+
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 });
|
|
3538
3608
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: StringFilterComponent, decorators: [{
|
|
3539
3609
|
type: Component,
|
|
3540
|
-
args: [{ selector: 'teta-string-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"padding-3\">\n <teta-input [label]=\"
|
|
3541
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
3610
|
+
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: [""] }]
|
|
3611
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: TetaConfigService }]; }, propDecorators: { column: [{
|
|
3612
|
+
type: Input
|
|
3613
|
+
}], data: [{
|
|
3542
3614
|
type: Input
|
|
3543
3615
|
}], filterOptions: [{
|
|
3544
3616
|
type: Input
|
|
@@ -3570,11 +3642,16 @@ class TextFieldComponent {
|
|
|
3570
3642
|
this.placeholder = '';
|
|
3571
3643
|
this.disabled = false;
|
|
3572
3644
|
this.onlyNumber = false;
|
|
3573
|
-
this.tabindex = 0;
|
|
3574
3645
|
this.textField = true;
|
|
3575
3646
|
this.value = '';
|
|
3576
3647
|
}
|
|
3648
|
+
get tabindex() {
|
|
3649
|
+
return this.disabled ? null : 0;
|
|
3650
|
+
}
|
|
3577
3651
|
onFocus() {
|
|
3652
|
+
if (this.disabled) {
|
|
3653
|
+
return;
|
|
3654
|
+
}
|
|
3578
3655
|
this.input.nativeElement.focus();
|
|
3579
3656
|
}
|
|
3580
3657
|
keyPress(event) {
|
|
@@ -3593,7 +3670,7 @@ class TextFieldComponent {
|
|
|
3593
3670
|
}
|
|
3594
3671
|
setDisabledState(isDisabled) {
|
|
3595
3672
|
this.disabled = isDisabled;
|
|
3596
|
-
this._cdr.
|
|
3673
|
+
this._cdr.markForCheck();
|
|
3597
3674
|
}
|
|
3598
3675
|
writeValue(input) {
|
|
3599
3676
|
this.value = input;
|
|
@@ -3611,7 +3688,7 @@ TextFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
3611
3688
|
useExisting: forwardRef(() => TextFieldComponent),
|
|
3612
3689
|
multi: true,
|
|
3613
3690
|
},
|
|
3614
|
-
], 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:
|
|
3691
|
+
], 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 });
|
|
3615
3692
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TextFieldComponent, decorators: [{
|
|
3616
3693
|
type: Component,
|
|
3617
3694
|
args: [{ selector: 'teta-text-field', providers: [
|
|
@@ -3652,15 +3729,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
3652
3729
|
}] } });
|
|
3653
3730
|
|
|
3654
3731
|
class ListFilterComponent extends FilterComponentBase {
|
|
3655
|
-
constructor(changeDetector) {
|
|
3732
|
+
constructor(changeDetector, _config) {
|
|
3656
3733
|
super();
|
|
3657
3734
|
this.changeDetector = changeDetector;
|
|
3735
|
+
this._config = _config;
|
|
3658
3736
|
this.filterOptions = [];
|
|
3659
3737
|
this.filterChanged = new EventEmitter();
|
|
3660
3738
|
this.search = '';
|
|
3739
|
+
this.locale = this._config.locale;
|
|
3661
3740
|
}
|
|
3662
3741
|
get visibleOptions() {
|
|
3663
|
-
return this.filterOptions?.filter((
|
|
3742
|
+
return this.filterOptions?.filter((option) => {
|
|
3743
|
+
return option.name?.toString().indexOf(this.search) >= 0;
|
|
3744
|
+
});
|
|
3664
3745
|
}
|
|
3665
3746
|
set state(val) {
|
|
3666
3747
|
this.state$ = val;
|
|
@@ -3670,7 +3751,8 @@ class ListFilterComponent extends FilterComponentBase {
|
|
|
3670
3751
|
get state() {
|
|
3671
3752
|
return this.state$;
|
|
3672
3753
|
}
|
|
3673
|
-
ngOnInit() {
|
|
3754
|
+
ngOnInit() {
|
|
3755
|
+
}
|
|
3674
3756
|
all() {
|
|
3675
3757
|
if (!this.filter?.value || this.filter?.value?.length === 0) {
|
|
3676
3758
|
return false;
|
|
@@ -3713,12 +3795,14 @@ class ListFilterComponent extends FilterComponentBase {
|
|
|
3713
3795
|
return filter;
|
|
3714
3796
|
}
|
|
3715
3797
|
}
|
|
3716
|
-
ListFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ListFilterComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3717
|
-
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)\">\
|
|
3798
|
+
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 });
|
|
3799
|
+
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 });
|
|
3718
3800
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ListFilterComponent, decorators: [{
|
|
3719
3801
|
type: Component,
|
|
3720
|
-
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)\">\
|
|
3721
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
3802
|
+
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"] }]
|
|
3803
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: TetaConfigService }]; }, propDecorators: { column: [{
|
|
3804
|
+
type: Input
|
|
3805
|
+
}], data: [{
|
|
3722
3806
|
type: Input
|
|
3723
3807
|
}], filterOptions: [{
|
|
3724
3808
|
type: Input
|
|
@@ -3747,11 +3831,13 @@ class DateFilter extends FilterBase {
|
|
|
3747
3831
|
}
|
|
3748
3832
|
|
|
3749
3833
|
class DateFilterComponent extends FilterComponentBase {
|
|
3750
|
-
constructor(changeDetector) {
|
|
3834
|
+
constructor(changeDetector, _config) {
|
|
3751
3835
|
super();
|
|
3752
3836
|
this.changeDetector = changeDetector;
|
|
3837
|
+
this._config = _config;
|
|
3753
3838
|
this.filterOptions = [];
|
|
3754
3839
|
this.filterChanged = new EventEmitter();
|
|
3840
|
+
this.locale = this._config.locale;
|
|
3755
3841
|
}
|
|
3756
3842
|
set state(val) {
|
|
3757
3843
|
this.state$ = val;
|
|
@@ -3777,12 +3863,14 @@ class DateFilterComponent extends FilterComponentBase {
|
|
|
3777
3863
|
return filter;
|
|
3778
3864
|
}
|
|
3779
3865
|
}
|
|
3780
|
-
DateFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DateFilterComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3781
|
-
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]=\"
|
|
3866
|
+
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 });
|
|
3867
|
+
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 });
|
|
3782
3868
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DateFilterComponent, decorators: [{
|
|
3783
3869
|
type: Component,
|
|
3784
|
-
args: [{ selector: 'teta-date-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-row padding-3\">\n <teta-input [label]=\"
|
|
3785
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
3870
|
+
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: [""] }]
|
|
3871
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: TetaConfigService }]; }, propDecorators: { column: [{
|
|
3872
|
+
type: Input
|
|
3873
|
+
}], data: [{
|
|
3786
3874
|
type: Input
|
|
3787
3875
|
}], filterOptions: [{
|
|
3788
3876
|
type: Input
|
|
@@ -4083,7 +4171,7 @@ class RadioButtonComponent {
|
|
|
4083
4171
|
}
|
|
4084
4172
|
}
|
|
4085
4173
|
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 });
|
|
4086
|
-
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:
|
|
4174
|
+
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 });
|
|
4087
4175
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: RadioButtonComponent, decorators: [{
|
|
4088
4176
|
type: Component,
|
|
4089
4177
|
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: [""] }]
|
|
@@ -4144,12 +4232,14 @@ class BooleanFilterComponent extends FilterComponentBase {
|
|
|
4144
4232
|
}
|
|
4145
4233
|
}
|
|
4146
4234
|
BooleanFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: BooleanFilterComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4147
|
-
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 });
|
|
4235
|
+
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 });
|
|
4148
4236
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: BooleanFilterComponent, decorators: [{
|
|
4149
4237
|
type: Component,
|
|
4150
4238
|
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: [""] }]
|
|
4151
4239
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
4152
4240
|
type: Input
|
|
4241
|
+
}], data: [{
|
|
4242
|
+
type: Input
|
|
4153
4243
|
}], filterOptions: [{
|
|
4154
4244
|
type: Input
|
|
4155
4245
|
}], filterChanged: [{
|
|
@@ -4189,6 +4279,13 @@ class FilterHostComponent {
|
|
|
4189
4279
|
this._componentRef.injector.get(ChangeDetectorRef).detectChanges();
|
|
4190
4280
|
}
|
|
4191
4281
|
}
|
|
4282
|
+
set data(data) {
|
|
4283
|
+
this._data = data;
|
|
4284
|
+
if (this._init) {
|
|
4285
|
+
this._componentRef.instance.data = this._data;
|
|
4286
|
+
this._componentRef.injector.get(ChangeDetectorRef).detectChanges();
|
|
4287
|
+
}
|
|
4288
|
+
}
|
|
4192
4289
|
set filterOptions(val) {
|
|
4193
4290
|
this._filterOptions = val;
|
|
4194
4291
|
if (this._init) {
|
|
@@ -4204,6 +4301,7 @@ class FilterHostComponent {
|
|
|
4204
4301
|
this.viewContainerRef.createComponent(this._column.filterComponent);
|
|
4205
4302
|
this._componentRef.instance.column = this._column;
|
|
4206
4303
|
this._componentRef.instance.state = this._state;
|
|
4304
|
+
this._componentRef.instance.data = this._data;
|
|
4207
4305
|
this._componentRef.instance.filterOptions = this._filterOptions;
|
|
4208
4306
|
this._componentRef.injector.get(ChangeDetectorRef).detectChanges();
|
|
4209
4307
|
this._init = true;
|
|
@@ -4218,7 +4316,7 @@ class FilterHostComponent {
|
|
|
4218
4316
|
}
|
|
4219
4317
|
}
|
|
4220
4318
|
FilterHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterHostComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4221
|
-
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 });
|
|
4319
|
+
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 });
|
|
4222
4320
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterHostComponent, decorators: [{
|
|
4223
4321
|
type: Component,
|
|
4224
4322
|
args: [{
|
|
@@ -4231,6 +4329,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
4231
4329
|
type: Input
|
|
4232
4330
|
}], state: [{
|
|
4233
4331
|
type: Input
|
|
4332
|
+
}], data: [{
|
|
4333
|
+
type: Input
|
|
4234
4334
|
}], filterOptions: [{
|
|
4235
4335
|
type: Input
|
|
4236
4336
|
}], filterChanged: [{
|
|
@@ -4347,9 +4447,13 @@ class SelectComponent {
|
|
|
4347
4447
|
this.allowNull = true;
|
|
4348
4448
|
this.open = false;
|
|
4349
4449
|
this.selectClass = true;
|
|
4350
|
-
this.
|
|
4351
|
-
|
|
4352
|
-
this.onTouched = () => {
|
|
4450
|
+
this.onChange = () => {
|
|
4451
|
+
};
|
|
4452
|
+
this.onTouched = () => {
|
|
4453
|
+
};
|
|
4454
|
+
}
|
|
4455
|
+
get tabindex() {
|
|
4456
|
+
return this.disabled ? null : 0;
|
|
4353
4457
|
}
|
|
4354
4458
|
get isDisabled() {
|
|
4355
4459
|
return this.disabled;
|
|
@@ -4452,7 +4556,8 @@ class SelectComponent {
|
|
|
4452
4556
|
focus() {
|
|
4453
4557
|
this._elementRef.nativeElement.focus();
|
|
4454
4558
|
}
|
|
4455
|
-
ngOnInit() {
|
|
4559
|
+
ngOnInit() {
|
|
4560
|
+
}
|
|
4456
4561
|
writeValue(value) {
|
|
4457
4562
|
if (this.multiple) {
|
|
4458
4563
|
this.value =
|
|
@@ -4477,7 +4582,8 @@ class SelectComponent {
|
|
|
4477
4582
|
this.disabled = isDisabled;
|
|
4478
4583
|
this._cdr.markForCheck();
|
|
4479
4584
|
}
|
|
4480
|
-
getSelectedValue() {
|
|
4585
|
+
getSelectedValue() {
|
|
4586
|
+
}
|
|
4481
4587
|
}
|
|
4482
4588
|
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 });
|
|
4483
4589
|
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: [
|
|
@@ -4486,7 +4592,7 @@ SelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
4486
4592
|
useExisting: forwardRef(() => SelectComponent),
|
|
4487
4593
|
multi: true,
|
|
4488
4594
|
},
|
|
4489
|
-
], 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:
|
|
4595
|
+
], 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 });
|
|
4490
4596
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SelectComponent, decorators: [{
|
|
4491
4597
|
type: Component,
|
|
4492
4598
|
args: [{ selector: 'teta-select', providers: [
|
|
@@ -4654,8 +4760,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
4654
4760
|
class FilterModule {
|
|
4655
4761
|
}
|
|
4656
4762
|
FilterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4657
|
-
FilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterModule, declarations: [
|
|
4658
|
-
NumericFilterComponent,
|
|
4763
|
+
FilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterModule, declarations: [NumericFilterComponent,
|
|
4659
4764
|
StringFilterComponent,
|
|
4660
4765
|
ListFilterComponent,
|
|
4661
4766
|
DateFilterComponent,
|
|
@@ -4667,8 +4772,7 @@ FilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
4667
4772
|
RadioModule,
|
|
4668
4773
|
InputModule,
|
|
4669
4774
|
CheckboxModule,
|
|
4670
|
-
OnlyNumberModule], exports: [
|
|
4671
|
-
NumericFilterComponent,
|
|
4775
|
+
OnlyNumberModule], exports: [NumericFilterComponent,
|
|
4672
4776
|
StringFilterComponent,
|
|
4673
4777
|
ListFilterComponent,
|
|
4674
4778
|
DateFilterComponent,
|
|
@@ -4688,7 +4792,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
4688
4792
|
type: NgModule,
|
|
4689
4793
|
args: [{
|
|
4690
4794
|
declarations: [
|
|
4691
|
-
FilterPanelComponent,
|
|
4692
4795
|
NumericFilterComponent,
|
|
4693
4796
|
StringFilterComponent,
|
|
4694
4797
|
ListFilterComponent,
|
|
@@ -4697,7 +4800,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
4697
4800
|
BooleanFilterComponent,
|
|
4698
4801
|
],
|
|
4699
4802
|
exports: [
|
|
4700
|
-
FilterPanelComponent,
|
|
4701
4803
|
NumericFilterComponent,
|
|
4702
4804
|
StringFilterComponent,
|
|
4703
4805
|
ListFilterComponent,
|
|
@@ -4738,8 +4840,8 @@ class FilterItem {
|
|
|
4738
4840
|
this.hint = options?.hint ?? '';
|
|
4739
4841
|
this.sortable = options?.sortable ?? true;
|
|
4740
4842
|
this.filterable = options?.filterable ?? true;
|
|
4741
|
-
this.sortField = options?.sortField ?? this.name;
|
|
4742
|
-
this.filterField = options?.filterField ?? this.name;
|
|
4843
|
+
this.sortField = StringUtil.firstLetterToLower(options?.sortField ?? this.name);
|
|
4844
|
+
this.filterField = StringUtil.firstLetterToLower(options?.filterField ?? this.name);
|
|
4743
4845
|
this.filterType = options?.filterType;
|
|
4744
4846
|
this.stringFilterType = options?.stringFilterType ?? StringFilterType.Contains;
|
|
4745
4847
|
this.listFilterType = options?.listFilterType ?? ListFilterType.None;
|
|
@@ -4755,7 +4857,7 @@ class SortParam {
|
|
|
4755
4857
|
*/
|
|
4756
4858
|
constructor(options) {
|
|
4757
4859
|
if (options) {
|
|
4758
|
-
this.field = options.field || this.field;
|
|
4860
|
+
this.field = StringUtil.firstLetterToLower(options.field || this.field);
|
|
4759
4861
|
this.asc = options.asc || false;
|
|
4760
4862
|
this.order = options.order || this.order;
|
|
4761
4863
|
}
|
|
@@ -4976,7 +5078,7 @@ class MessageComponent {
|
|
|
4976
5078
|
}
|
|
4977
5079
|
}
|
|
4978
5080
|
MessageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: MessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4979
|
-
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:
|
|
5081
|
+
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 });
|
|
4980
5082
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: MessageComponent, decorators: [{
|
|
4981
5083
|
type: Component,
|
|
4982
5084
|
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: [""] }]
|
|
@@ -5062,7 +5164,7 @@ class MessageHostComponent {
|
|
|
5062
5164
|
}
|
|
5063
5165
|
}
|
|
5064
5166
|
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 });
|
|
5065
|
-
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:
|
|
5167
|
+
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 });
|
|
5066
5168
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: MessageHostComponent, decorators: [{
|
|
5067
5169
|
type: Component,
|
|
5068
5170
|
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: [""] }]
|
|
@@ -5243,7 +5345,7 @@ class DialogComponent {
|
|
|
5243
5345
|
ngOnInit() { }
|
|
5244
5346
|
}
|
|
5245
5347
|
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 });
|
|
5246
|
-
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:
|
|
5348
|
+
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 } });
|
|
5247
5349
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DialogComponent, decorators: [{
|
|
5248
5350
|
type: Component,
|
|
5249
5351
|
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"] }]
|
|
@@ -5983,7 +6085,7 @@ class ToggleComponent {
|
|
|
5983
6085
|
}
|
|
5984
6086
|
}
|
|
5985
6087
|
ToggleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ToggleComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
5986
|
-
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:
|
|
6088
|
+
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 });
|
|
5987
6089
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ToggleComponent, decorators: [{
|
|
5988
6090
|
type: Component,
|
|
5989
6091
|
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: [""] }]
|
|
@@ -6039,7 +6141,8 @@ class DynamicContentBaseDirective {
|
|
|
6039
6141
|
this._alive = false;
|
|
6040
6142
|
this.destroyContentRef();
|
|
6041
6143
|
}
|
|
6042
|
-
ngOnInit() {
|
|
6144
|
+
ngOnInit() {
|
|
6145
|
+
}
|
|
6043
6146
|
createContentRef(className) {
|
|
6044
6147
|
if (!this._componentRef) {
|
|
6045
6148
|
this._open = true;
|
|
@@ -6054,11 +6157,9 @@ class DynamicContentBaseDirective {
|
|
|
6054
6157
|
return this._componentRef;
|
|
6055
6158
|
}
|
|
6056
6159
|
destroyContentRef() {
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
this._componentRef = null;
|
|
6061
|
-
}
|
|
6160
|
+
this._open = false;
|
|
6161
|
+
this._service.destroy(this._componentRef, this._content, this.appendToBody ? this._document.body : this._elementRef.nativeElement);
|
|
6162
|
+
this._componentRef = null;
|
|
6062
6163
|
}
|
|
6063
6164
|
}
|
|
6064
6165
|
DynamicContentBaseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DynamicContentBaseDirective, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -6241,7 +6342,7 @@ class PropertyGridItemComponent {
|
|
|
6241
6342
|
}
|
|
6242
6343
|
}
|
|
6243
6344
|
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 });
|
|
6244
|
-
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:
|
|
6345
|
+
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]" }] });
|
|
6245
6346
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridItemComponent, decorators: [{
|
|
6246
6347
|
type: Component,
|
|
6247
6348
|
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: [""] }]
|
|
@@ -6267,7 +6368,7 @@ class PropertyGridGroupComponent {
|
|
|
6267
6368
|
ngOnInit() { }
|
|
6268
6369
|
}
|
|
6269
6370
|
PropertyGridGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6270
|
-
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:
|
|
6371
|
+
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"] }] });
|
|
6271
6372
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridGroupComponent, decorators: [{
|
|
6272
6373
|
type: Component,
|
|
6273
6374
|
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: [""] }]
|
|
@@ -6320,7 +6421,7 @@ class PropertyGridComponent {
|
|
|
6320
6421
|
}
|
|
6321
6422
|
}
|
|
6322
6423
|
PropertyGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6323
|
-
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:
|
|
6424
|
+
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"] }] });
|
|
6324
6425
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridComponent, decorators: [{
|
|
6325
6426
|
type: Component,
|
|
6326
6427
|
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"] }]
|
|
@@ -6558,7 +6659,7 @@ class SidebarComponent {
|
|
|
6558
6659
|
ngOnInit() { }
|
|
6559
6660
|
}
|
|
6560
6661
|
SidebarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6561
|
-
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:
|
|
6662
|
+
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: [
|
|
6562
6663
|
trigger('sidebar', [
|
|
6563
6664
|
transition('void => *', [
|
|
6564
6665
|
style({ opacity: '0' }),
|
|
@@ -6951,6 +7052,25 @@ class StateUtil {
|
|
|
6951
7052
|
}
|
|
6952
7053
|
return new FilterState(state);
|
|
6953
7054
|
}
|
|
7055
|
+
static sortAsc(sortEvent, state) {
|
|
7056
|
+
return StateUtil.sort(sortEvent, state, true);
|
|
7057
|
+
}
|
|
7058
|
+
static sortDesc(sortEvent, state) {
|
|
7059
|
+
return StateUtil.sort(sortEvent, state, false);
|
|
7060
|
+
}
|
|
7061
|
+
static sort(sortEvent, state, asc) {
|
|
7062
|
+
const column = sortEvent.column;
|
|
7063
|
+
const shiftKey = sortEvent.shiftKey;
|
|
7064
|
+
const sort = state.sortParams.find((sortParam) => sortParam.field === column.sortField);
|
|
7065
|
+
if (sort) {
|
|
7066
|
+
state.sortParams = StateUtil.clearSortParam(sort, state.sortParams);
|
|
7067
|
+
}
|
|
7068
|
+
if (!shiftKey) {
|
|
7069
|
+
state.sortParams.length = 0;
|
|
7070
|
+
}
|
|
7071
|
+
state.sortParams.push(new SortParam({ field: column.sortField, asc: asc, order: 0 }));
|
|
7072
|
+
return new FilterState(state);
|
|
7073
|
+
}
|
|
6954
7074
|
static clearSortParam(sort, sortParams) {
|
|
6955
7075
|
const index = sortParams.indexOf(sort);
|
|
6956
7076
|
sortParams.splice(index, 1);
|
|
@@ -6973,6 +7093,20 @@ var SelectType;
|
|
|
6973
7093
|
SelectType[SelectType["single"] = 2] = "single";
|
|
6974
7094
|
})(SelectType || (SelectType = {}));
|
|
6975
7095
|
|
|
7096
|
+
var EditType;
|
|
7097
|
+
(function (EditType) {
|
|
7098
|
+
EditType[EditType["none"] = 0] = "none";
|
|
7099
|
+
EditType[EditType["cell"] = 1] = "cell";
|
|
7100
|
+
EditType[EditType["row"] = 2] = "row";
|
|
7101
|
+
})(EditType || (EditType = {}));
|
|
7102
|
+
|
|
7103
|
+
var EditEvent;
|
|
7104
|
+
(function (EditEvent) {
|
|
7105
|
+
EditEvent[EditEvent["click"] = 0] = "click";
|
|
7106
|
+
EditEvent[EditEvent["focus"] = 1] = "focus";
|
|
7107
|
+
EditEvent[EditEvent["doubleClick"] = 2] = "doubleClick";
|
|
7108
|
+
})(EditEvent || (EditEvent = {}));
|
|
7109
|
+
|
|
6976
7110
|
class TableColumnStore {
|
|
6977
7111
|
constructor(options) {
|
|
6978
7112
|
if (options) {
|
|
@@ -6987,12 +7121,17 @@ class TableColumnStore {
|
|
|
6987
7121
|
|
|
6988
7122
|
class TableService {
|
|
6989
7123
|
constructor() {
|
|
7124
|
+
this.selectType = SelectType.multiple;
|
|
7125
|
+
this.editType = EditType.cell;
|
|
7126
|
+
this.editEvent = EditEvent.doubleClick;
|
|
7127
|
+
this.trackRow = (index, row) => index;
|
|
6990
7128
|
this.initialColumns = [];
|
|
6991
7129
|
this.displayColumns = [];
|
|
6992
7130
|
this._columns = new BehaviorSubject([]);
|
|
6993
|
-
this.
|
|
7131
|
+
this._hiddenColumns = new BehaviorSubject([]);
|
|
6994
7132
|
this._displayData = new BehaviorSubject([]);
|
|
6995
7133
|
this._dict = new BehaviorSubject({});
|
|
7134
|
+
this._filterOptions = new BehaviorSubject({});
|
|
6996
7135
|
this._state = new BehaviorSubject(new FilterState());
|
|
6997
7136
|
this._editRowStart = new Subject();
|
|
6998
7137
|
this._editRowStop = new Subject();
|
|
@@ -7005,11 +7144,11 @@ class TableService {
|
|
|
7005
7144
|
this._groupToggle = new Subject();
|
|
7006
7145
|
this._selectedRows = new BehaviorSubject([]);
|
|
7007
7146
|
this._activeRow = new BehaviorSubject(null);
|
|
7008
|
-
this._hiddenColumns = new BehaviorSubject([]);
|
|
7009
7147
|
this._scrollIndex = new Subject();
|
|
7010
7148
|
this.columns = this._columns.asObservable();
|
|
7011
7149
|
this.displayData = this._displayData.asObservable();
|
|
7012
7150
|
this.dict = this._dict.asObservable();
|
|
7151
|
+
this.filterOptions = this._filterOptions.asObservable();
|
|
7013
7152
|
this.state = this._state.asObservable();
|
|
7014
7153
|
this.editRowStart = this._editRowStart.asObservable();
|
|
7015
7154
|
this.editRowStop = this._editRowStop.asObservable();
|
|
@@ -7025,17 +7164,21 @@ class TableService {
|
|
|
7025
7164
|
this.hiddenColumns = this._hiddenColumns.asObservable();
|
|
7026
7165
|
this.scrollIndex = this._scrollIndex.asObservable();
|
|
7027
7166
|
}
|
|
7028
|
-
// cellEditable: boolean | ((row: ICellCoordinates<T>) => boolean);
|
|
7029
7167
|
get dragSource() {
|
|
7030
7168
|
return this._dragSource;
|
|
7031
7169
|
}
|
|
7170
|
+
get currentEditCell() {
|
|
7171
|
+
return this._currentEditCell;
|
|
7172
|
+
}
|
|
7032
7173
|
setData(data) {
|
|
7033
|
-
this.
|
|
7034
|
-
this._displayData.next(this.initialData);
|
|
7174
|
+
this._displayData.next(data?.map((_) => new TableRow(_)));
|
|
7035
7175
|
}
|
|
7036
7176
|
setDict(dict) {
|
|
7037
7177
|
this._dict.next(dict);
|
|
7038
7178
|
}
|
|
7179
|
+
setFilterOptions(filterOptions) {
|
|
7180
|
+
this._filterOptions.next(filterOptions);
|
|
7181
|
+
}
|
|
7039
7182
|
setColumns(columns) {
|
|
7040
7183
|
this.initialColumns = columns ? columns.map((_) => new TableColumn(_)) : [];
|
|
7041
7184
|
this.initialColumnsHash = hash__default(this.initialColumns, {
|
|
@@ -7122,9 +7265,14 @@ class TableService {
|
|
|
7122
7265
|
const hiddenColumns = localStorage.getItem(this._hiddenCookieName) || '[]';
|
|
7123
7266
|
this._hiddenColumns.next(JSON.parse(hiddenColumns));
|
|
7124
7267
|
}
|
|
7125
|
-
|
|
7268
|
+
sortAsc(sortEvent) {
|
|
7269
|
+
if (sortEvent.column.sortable) {
|
|
7270
|
+
this.setState(StateUtil.sortAsc(sortEvent, this._state.value));
|
|
7271
|
+
}
|
|
7272
|
+
}
|
|
7273
|
+
sortDesc(sortEvent) {
|
|
7126
7274
|
if (sortEvent.column.sortable) {
|
|
7127
|
-
this.setState(StateUtil.
|
|
7275
|
+
this.setState(StateUtil.sortDesc(sortEvent, this._state.value));
|
|
7128
7276
|
}
|
|
7129
7277
|
}
|
|
7130
7278
|
clearSort(column) {
|
|
@@ -7243,33 +7391,40 @@ class TableService {
|
|
|
7243
7391
|
}
|
|
7244
7392
|
}
|
|
7245
7393
|
}
|
|
7246
|
-
startEditRow(
|
|
7247
|
-
if (this.
|
|
7248
|
-
if (this.
|
|
7249
|
-
|
|
7250
|
-
this._editRowStop.next(this._currentEditRow);
|
|
7394
|
+
startEditRow(cellEvent) {
|
|
7395
|
+
if (this._currentEditCell?.row !== cellEvent?.row) {
|
|
7396
|
+
if (this._currentEditCell != null) {
|
|
7397
|
+
this._editRowStop.next(this._currentEditCell);
|
|
7251
7398
|
}
|
|
7252
|
-
if (
|
|
7253
|
-
this._editRowStart.next(
|
|
7254
|
-
this.
|
|
7399
|
+
if (cellEvent === null) {
|
|
7400
|
+
this._editRowStart.next(cellEvent);
|
|
7401
|
+
this._currentEditCell = cellEvent;
|
|
7255
7402
|
}
|
|
7256
7403
|
else {
|
|
7257
|
-
if (this.boolOrFuncCallback(this.rowEditable)(
|
|
7258
|
-
this._editRowStart.next(
|
|
7259
|
-
this.
|
|
7404
|
+
if (this.boolOrFuncCallback(this.rowEditable)(this.getRowByIndex(cellEvent?.row))) {
|
|
7405
|
+
this._editRowStart.next(cellEvent);
|
|
7406
|
+
this._currentEditCell = cellEvent;
|
|
7260
7407
|
}
|
|
7261
7408
|
}
|
|
7262
7409
|
}
|
|
7263
7410
|
}
|
|
7264
|
-
startEditCell(
|
|
7265
|
-
if (this._currentEditCell?.column
|
|
7266
|
-
this._currentEditCell?.row !==
|
|
7411
|
+
startEditCell(cellEvent) {
|
|
7412
|
+
if (this._currentEditCell?.column !== cellEvent?.column ||
|
|
7413
|
+
this._currentEditCell?.row !== cellEvent?.row) {
|
|
7267
7414
|
if (this._currentEditCell != null) {
|
|
7268
7415
|
this._editCellStop.next(this._currentEditCell);
|
|
7269
7416
|
}
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
this.
|
|
7417
|
+
const column = this.getColumnByName(cellEvent?.column);
|
|
7418
|
+
if (this.boolOrFuncCallback(column?.editable)({
|
|
7419
|
+
row: this.getRowByIndex(cellEvent?.row),
|
|
7420
|
+
column: column
|
|
7421
|
+
})) {
|
|
7422
|
+
this._editCellStart.next(cellEvent);
|
|
7423
|
+
this._currentEditCell = cellEvent;
|
|
7424
|
+
const key = cellEvent?.event?.key;
|
|
7425
|
+
if (key && (key.length === 1 || (key === 'Delete' && !column.required))) {
|
|
7426
|
+
this.clearValue(cellEvent);
|
|
7427
|
+
}
|
|
7273
7428
|
}
|
|
7274
7429
|
}
|
|
7275
7430
|
}
|
|
@@ -7279,6 +7434,46 @@ class TableService {
|
|
|
7279
7434
|
selectRows(rows) {
|
|
7280
7435
|
this._selectedRows.next(rows);
|
|
7281
7436
|
}
|
|
7437
|
+
selectOrDeselectRow(row) {
|
|
7438
|
+
if (this._selectedRows.value.indexOf(row) >= 0) {
|
|
7439
|
+
this._selectedRows.next(this._selectedRows.value.filter((_) => _ !== row));
|
|
7440
|
+
}
|
|
7441
|
+
else {
|
|
7442
|
+
if (this.selectType === SelectType.single) {
|
|
7443
|
+
this._selectedRows.next([row]);
|
|
7444
|
+
}
|
|
7445
|
+
else {
|
|
7446
|
+
this._selectedRows.next([...this._selectedRows.value, row]);
|
|
7447
|
+
}
|
|
7448
|
+
}
|
|
7449
|
+
}
|
|
7450
|
+
selectRange(row) {
|
|
7451
|
+
const index = this._displayData.value.indexOf(row);
|
|
7452
|
+
let minIndex = this._selectedRows.value.reduce((prev, curr) => {
|
|
7453
|
+
const newIndex = this._displayData.value.indexOf(curr);
|
|
7454
|
+
if (newIndex < prev) {
|
|
7455
|
+
return newIndex;
|
|
7456
|
+
}
|
|
7457
|
+
return prev;
|
|
7458
|
+
}, this._displayData.value.length);
|
|
7459
|
+
let maxIndex = this._selectedRows.value.reduce((prev, curr) => {
|
|
7460
|
+
const newIndex = this._displayData.value.indexOf(curr);
|
|
7461
|
+
if (newIndex > prev) {
|
|
7462
|
+
return newIndex;
|
|
7463
|
+
}
|
|
7464
|
+
return prev;
|
|
7465
|
+
}, 0);
|
|
7466
|
+
if (index > maxIndex) {
|
|
7467
|
+
maxIndex = index;
|
|
7468
|
+
}
|
|
7469
|
+
if (index < minIndex) {
|
|
7470
|
+
minIndex = index;
|
|
7471
|
+
}
|
|
7472
|
+
if (minIndex < index && index < maxIndex) {
|
|
7473
|
+
maxIndex = index;
|
|
7474
|
+
}
|
|
7475
|
+
this._selectedRows.next([...this._displayData.value.slice(minIndex, maxIndex + 1)]);
|
|
7476
|
+
}
|
|
7282
7477
|
selectRow(row) {
|
|
7283
7478
|
if (this.selectType === SelectType.none) {
|
|
7284
7479
|
return;
|
|
@@ -7333,10 +7528,114 @@ class TableService {
|
|
|
7333
7528
|
this._valueChanged.next(coordinates);
|
|
7334
7529
|
}
|
|
7335
7530
|
setValue(cellValue) {
|
|
7336
|
-
|
|
7531
|
+
let value;
|
|
7532
|
+
if (typeof cellValue.row === 'object' && typeof cellValue.column === 'object') {
|
|
7533
|
+
value = {
|
|
7534
|
+
row: this.getRowIndex(cellValue.row),
|
|
7535
|
+
column: cellValue.column.name,
|
|
7536
|
+
value: cellValue.value
|
|
7537
|
+
};
|
|
7538
|
+
}
|
|
7539
|
+
else {
|
|
7540
|
+
value = cellValue;
|
|
7541
|
+
}
|
|
7542
|
+
this._valueSet.next(value);
|
|
7337
7543
|
}
|
|
7338
7544
|
getRowByIndex(rowIndex) {
|
|
7339
|
-
return this._displayData.value[
|
|
7545
|
+
return this._displayData.value[rowIndex];
|
|
7546
|
+
}
|
|
7547
|
+
getRowIndex(row) {
|
|
7548
|
+
return this._displayData.value.indexOf(row);
|
|
7549
|
+
}
|
|
7550
|
+
getNextEditableCell(coords) {
|
|
7551
|
+
const nextCell = this.getNextCell(coords);
|
|
7552
|
+
if (!nextCell) {
|
|
7553
|
+
return null;
|
|
7554
|
+
}
|
|
7555
|
+
const column = this.getColumnByName(nextCell?.column);
|
|
7556
|
+
if (this.boolOrFuncCallback(column.editable)({
|
|
7557
|
+
row: this.getRowByIndex(nextCell.row),
|
|
7558
|
+
column
|
|
7559
|
+
})) {
|
|
7560
|
+
return nextCell;
|
|
7561
|
+
}
|
|
7562
|
+
return this.getNextEditableCell(nextCell);
|
|
7563
|
+
}
|
|
7564
|
+
getPreviousEditableCell(coords) {
|
|
7565
|
+
const prevCell = this.getPreviousCell(coords);
|
|
7566
|
+
if (!prevCell) {
|
|
7567
|
+
return null;
|
|
7568
|
+
}
|
|
7569
|
+
const column = this.getColumnByName(prevCell?.column);
|
|
7570
|
+
if (this.boolOrFuncCallback(column.editable)({
|
|
7571
|
+
row: this.getRowByIndex(prevCell.row),
|
|
7572
|
+
column
|
|
7573
|
+
})) {
|
|
7574
|
+
return prevCell;
|
|
7575
|
+
}
|
|
7576
|
+
return this.getPreviousEditableCell(prevCell);
|
|
7577
|
+
}
|
|
7578
|
+
getNextCell(coords) {
|
|
7579
|
+
const columns = this.getFlatColumns();
|
|
7580
|
+
let colIndex = columns.findIndex((col) => col.name === coords?.column);
|
|
7581
|
+
let rowIndex = coords?.row;
|
|
7582
|
+
if (colIndex >= 0 && rowIndex >= 0) {
|
|
7583
|
+
if (colIndex === columns.length - 1) {
|
|
7584
|
+
colIndex = 0;
|
|
7585
|
+
rowIndex = rowIndex + 1;
|
|
7586
|
+
}
|
|
7587
|
+
else {
|
|
7588
|
+
colIndex = colIndex + 1;
|
|
7589
|
+
}
|
|
7590
|
+
return {
|
|
7591
|
+
column: columns[colIndex]?.name,
|
|
7592
|
+
row: rowIndex
|
|
7593
|
+
};
|
|
7594
|
+
}
|
|
7595
|
+
return null;
|
|
7596
|
+
}
|
|
7597
|
+
getPreviousCell(coords) {
|
|
7598
|
+
const columns = this.getFlatColumns();
|
|
7599
|
+
let colIndex = columns.findIndex((col) => col.name === coords?.column);
|
|
7600
|
+
let rowIndex = coords?.row;
|
|
7601
|
+
if (colIndex >= 0 && rowIndex >= 0) {
|
|
7602
|
+
if (colIndex === 0) {
|
|
7603
|
+
colIndex = columns.length - 1;
|
|
7604
|
+
rowIndex = rowIndex - 1;
|
|
7605
|
+
}
|
|
7606
|
+
else {
|
|
7607
|
+
colIndex = colIndex - 1;
|
|
7608
|
+
}
|
|
7609
|
+
return {
|
|
7610
|
+
column: columns[colIndex]?.name,
|
|
7611
|
+
row: rowIndex
|
|
7612
|
+
};
|
|
7613
|
+
}
|
|
7614
|
+
return null;
|
|
7615
|
+
}
|
|
7616
|
+
getNextRowCell(coords) {
|
|
7617
|
+
const columns = this.getFlatColumns();
|
|
7618
|
+
let colIndex = columns.findIndex((col) => col.name === coords?.column);
|
|
7619
|
+
let rowIndex = coords?.row;
|
|
7620
|
+
if (colIndex >= 0 && rowIndex >= 0 && rowIndex < this._displayData.value.length - 1) {
|
|
7621
|
+
return {
|
|
7622
|
+
column: columns[colIndex]?.name,
|
|
7623
|
+
row: rowIndex + 1
|
|
7624
|
+
};
|
|
7625
|
+
}
|
|
7626
|
+
return null;
|
|
7627
|
+
}
|
|
7628
|
+
getPreviousRowCell(coords) {
|
|
7629
|
+
const columns = this.getFlatColumns();
|
|
7630
|
+
let colIndex = columns.findIndex((col) => col.name === coords?.column);
|
|
7631
|
+
let rowIndex = coords?.row;
|
|
7632
|
+
if (colIndex >= 0 && rowIndex > 1) {
|
|
7633
|
+
return {
|
|
7634
|
+
column: columns[colIndex]?.name,
|
|
7635
|
+
row: rowIndex - 1
|
|
7636
|
+
};
|
|
7637
|
+
}
|
|
7638
|
+
return null;
|
|
7340
7639
|
}
|
|
7341
7640
|
getColumnByName(columnName) {
|
|
7342
7641
|
return ArrayUtil.findRecursive(this.displayColumns, (iterableNode) => columnName === iterableNode.name, 'columns');
|
|
@@ -7356,6 +7655,19 @@ class TableService {
|
|
|
7356
7655
|
return true;
|
|
7357
7656
|
};
|
|
7358
7657
|
}
|
|
7658
|
+
getVisibleColumns() {
|
|
7659
|
+
const visible = ArrayUtil.flatten(this._columns.value, 'columns', true).filter((_) => this._hiddenColumns.value.indexOf(_.name) < 0);
|
|
7660
|
+
return visible.sort((a, b) => Number(b.locked) - Number(a.locked));
|
|
7661
|
+
}
|
|
7662
|
+
getCellInstance(coords) {
|
|
7663
|
+
return coords ? {
|
|
7664
|
+
row: this.getRowByIndex(coords.row),
|
|
7665
|
+
column: this.getColumnByName(coords.column)
|
|
7666
|
+
} : null;
|
|
7667
|
+
}
|
|
7668
|
+
getFlatColumns() {
|
|
7669
|
+
return ArrayUtil.flatten(this.displayColumns, 'columns', true).sort((a, b) => Number(b.locked) - Number(a.locked));
|
|
7670
|
+
}
|
|
7359
7671
|
findParent(column, columns) {
|
|
7360
7672
|
const found = columns.find((x) => x.name === column.name);
|
|
7361
7673
|
if (found !== null && found !== undefined) {
|
|
@@ -7389,6 +7701,12 @@ class TableService {
|
|
|
7389
7701
|
column.flex = 0;
|
|
7390
7702
|
column.width = maxWidth + 20;
|
|
7391
7703
|
}
|
|
7704
|
+
clearValue(event) {
|
|
7705
|
+
this.setValue({
|
|
7706
|
+
...event,
|
|
7707
|
+
value: null
|
|
7708
|
+
});
|
|
7709
|
+
}
|
|
7392
7710
|
}
|
|
7393
7711
|
TableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7394
7712
|
TableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableService, providedIn: 'root' });
|
|
@@ -7419,35 +7737,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
7419
7737
|
type: Input
|
|
7420
7738
|
}] } });
|
|
7421
7739
|
|
|
7422
|
-
|
|
7423
|
-
(
|
|
7424
|
-
|
|
7425
|
-
|
|
7426
|
-
|
|
7427
|
-
|
|
7428
|
-
|
|
7429
|
-
(
|
|
7430
|
-
|
|
7431
|
-
|
|
7432
|
-
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
class TableContextMenuConfig {
|
|
7436
|
-
constructor(options) {
|
|
7437
|
-
this.contextMenu = true;
|
|
7438
|
-
this.copy = true;
|
|
7439
|
-
this.delete = true;
|
|
7440
|
-
this.add = true;
|
|
7441
|
-
this.paste = true;
|
|
7442
|
-
if (options) {
|
|
7443
|
-
this.contextMenu = options?.contextMenu;
|
|
7444
|
-
this.copy = options?.copy;
|
|
7445
|
-
this.delete = options?.delete;
|
|
7446
|
-
this.add = options?.add;
|
|
7447
|
-
this.paste = options?.paste;
|
|
7740
|
+
class SelectionHeadCellComponent {
|
|
7741
|
+
constructor(_svc, _cdr) {
|
|
7742
|
+
this._svc = _svc;
|
|
7743
|
+
this._cdr = _cdr;
|
|
7744
|
+
this.tableCellClass = true;
|
|
7745
|
+
this._alive = true;
|
|
7746
|
+
}
|
|
7747
|
+
selectAll(value) {
|
|
7748
|
+
if (value) {
|
|
7749
|
+
this._svc.selectAll();
|
|
7750
|
+
}
|
|
7751
|
+
else {
|
|
7752
|
+
this._svc.deselectAll();
|
|
7448
7753
|
}
|
|
7449
7754
|
}
|
|
7755
|
+
allSelected() {
|
|
7756
|
+
return this._svc.allRowsSelected();
|
|
7757
|
+
}
|
|
7758
|
+
ngOnInit() {
|
|
7759
|
+
this._svc.selectedRows
|
|
7760
|
+
.pipe(takeWhile((_) => this._alive))
|
|
7761
|
+
.subscribe((_) => {
|
|
7762
|
+
this._cdr.markForCheck();
|
|
7763
|
+
});
|
|
7764
|
+
}
|
|
7765
|
+
ngOnDestroy() {
|
|
7766
|
+
this._alive = false;
|
|
7767
|
+
}
|
|
7450
7768
|
}
|
|
7769
|
+
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 });
|
|
7770
|
+
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 });
|
|
7771
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SelectionHeadCellComponent, decorators: [{
|
|
7772
|
+
type: Component,
|
|
7773
|
+
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"] }]
|
|
7774
|
+
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { tableCellClass: [{
|
|
7775
|
+
type: HostBinding,
|
|
7776
|
+
args: ['class.table-head__group']
|
|
7777
|
+
}] } });
|
|
7451
7778
|
|
|
7452
7779
|
class TableUtil {
|
|
7453
7780
|
static getColumnLeaves(column) {
|
|
@@ -7456,10 +7783,6 @@ class TableUtil {
|
|
|
7456
7783
|
}
|
|
7457
7784
|
return null;
|
|
7458
7785
|
}
|
|
7459
|
-
static getGridTemplateColumns(columns) {
|
|
7460
|
-
const res = columns?.map((column) => column.flex > 0 ? `minmax(${column.width}px, ${column.flex}fr)` : `${column.width}px`).join(' ');
|
|
7461
|
-
return res;
|
|
7462
|
-
}
|
|
7463
7786
|
static getData(data, state) {
|
|
7464
7787
|
let result = data;
|
|
7465
7788
|
result = TableUtil.filterData(result, state);
|
|
@@ -7511,15 +7834,15 @@ class TableUtil {
|
|
|
7511
7834
|
const filterString = (row) => {
|
|
7512
7835
|
const item = row;
|
|
7513
7836
|
if (filter.type === StringFilterType.EndsWith) {
|
|
7514
|
-
return item[filter.field].endsWith(filter.value);
|
|
7837
|
+
return item[filter.field]?.toLowerCase().endsWith(filter.value?.toLowerCase());
|
|
7515
7838
|
}
|
|
7516
7839
|
if (filter.type === StringFilterType.Equals) {
|
|
7517
|
-
return item[filter.field] === filter.value;
|
|
7840
|
+
return item[filter.field]?.toLowerCase() === filter.value?.toLowerCase();
|
|
7518
7841
|
}
|
|
7519
7842
|
if (filter.type === StringFilterType.StartsWith) {
|
|
7520
|
-
return item[filter.field].startsWith(filter.value);
|
|
7843
|
+
return item[filter.field]?.toLowerCase().startsWith(filter.value?.toLowerCase());
|
|
7521
7844
|
}
|
|
7522
|
-
return item[filter.field].indexOf(filter.value) >= 0;
|
|
7845
|
+
return item[filter.field]?.toLowerCase().indexOf(filter.value?.toLowerCase()) >= 0;
|
|
7523
7846
|
};
|
|
7524
7847
|
return data.filter(filterString);
|
|
7525
7848
|
}
|
|
@@ -7528,10 +7851,10 @@ class TableUtil {
|
|
|
7528
7851
|
const item = row;
|
|
7529
7852
|
return (filter.value.lessThan === null || filter.value.lessThan === undefined
|
|
7530
7853
|
? true
|
|
7531
|
-
: filter.value.lessThan.getTime()
|
|
7854
|
+
: filter.value.lessThan.getTime() >= item[filter.field].getTime()) &&
|
|
7532
7855
|
(filter.value.greaterThan === null || filter.value.greaterThan === undefined
|
|
7533
7856
|
? true
|
|
7534
|
-
: filter.value.greaterThan.getTime()
|
|
7857
|
+
: filter.value.greaterThan.getTime() <= item[filter.field].getTime());
|
|
7535
7858
|
};
|
|
7536
7859
|
return data.filter(filterDate);
|
|
7537
7860
|
}
|
|
@@ -7540,10 +7863,10 @@ class TableUtil {
|
|
|
7540
7863
|
const item = row;
|
|
7541
7864
|
return (filter.value.lessThan === null || filter.value.lessThan === undefined
|
|
7542
7865
|
? true
|
|
7543
|
-
: filter.value.lessThan
|
|
7866
|
+
: filter.value.lessThan >= item[filter.field]) &&
|
|
7544
7867
|
(filter.value.greaterThan === null || filter.value.greaterThan === undefined
|
|
7545
7868
|
? true
|
|
7546
|
-
: filter.value.greaterThan
|
|
7869
|
+
: filter.value.greaterThan <= item[filter.field]) &&
|
|
7547
7870
|
(filter.value.equalsTo === null || filter.value.equalsTo === undefined
|
|
7548
7871
|
? true
|
|
7549
7872
|
: filter.value.equalsTo === item[filter.field]);
|
|
@@ -7565,7 +7888,7 @@ class TableUtil {
|
|
|
7565
7888
|
}
|
|
7566
7889
|
static sort(data, sortParam) {
|
|
7567
7890
|
const res = data.sort(sortParam.asc ? TableUtil.asc(sortParam.field) : TableUtil.desc(sortParam.field));
|
|
7568
|
-
return res;
|
|
7891
|
+
return [...res];
|
|
7569
7892
|
}
|
|
7570
7893
|
static desc(field) {
|
|
7571
7894
|
const res = (a, b) => a[field] > b[field] ? -1 : 1;
|
|
@@ -7577,56 +7900,10 @@ class TableUtil {
|
|
|
7577
7900
|
}
|
|
7578
7901
|
}
|
|
7579
7902
|
|
|
7580
|
-
class
|
|
7581
|
-
constructor(
|
|
7582
|
-
this.
|
|
7583
|
-
this.
|
|
7584
|
-
this.tableCellClass = true;
|
|
7585
|
-
this._alive = true;
|
|
7586
|
-
}
|
|
7587
|
-
selectAll(value) {
|
|
7588
|
-
if (value) {
|
|
7589
|
-
this._svc.selectAll();
|
|
7590
|
-
}
|
|
7591
|
-
else {
|
|
7592
|
-
this._svc.deselectAll();
|
|
7593
|
-
}
|
|
7594
|
-
}
|
|
7595
|
-
allSelected() {
|
|
7596
|
-
return this._svc.allRowsSelected();
|
|
7597
|
-
}
|
|
7598
|
-
ngOnInit() {
|
|
7599
|
-
this._svc.selectedRows
|
|
7600
|
-
.pipe(takeWhile((_) => this._alive))
|
|
7601
|
-
.subscribe((_) => {
|
|
7602
|
-
this._cdr.markForCheck();
|
|
7603
|
-
});
|
|
7604
|
-
}
|
|
7605
|
-
ngOnDestroy() {
|
|
7606
|
-
this._alive = false;
|
|
7607
|
-
}
|
|
7608
|
-
}
|
|
7609
|
-
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 });
|
|
7610
|
-
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 });
|
|
7611
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SelectionHeadCellComponent, decorators: [{
|
|
7612
|
-
type: Component,
|
|
7613
|
-
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"] }]
|
|
7614
|
-
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { tableCellClass: [{
|
|
7615
|
-
type: HostBinding,
|
|
7616
|
-
args: ['class.table-head__group']
|
|
7617
|
-
}] } });
|
|
7618
|
-
|
|
7619
|
-
class ColumnResizeEvent {
|
|
7620
|
-
constructor(column, newWidth) {
|
|
7621
|
-
this.column = column;
|
|
7622
|
-
this.newWidth = newWidth;
|
|
7623
|
-
}
|
|
7624
|
-
}
|
|
7625
|
-
|
|
7626
|
-
class SortEvent {
|
|
7627
|
-
constructor(column, shiftKey) {
|
|
7628
|
-
this.column = column;
|
|
7629
|
-
this.shiftKey = shiftKey;
|
|
7903
|
+
class ColumnResizeEvent {
|
|
7904
|
+
constructor(column, newWidth) {
|
|
7905
|
+
this.column = column;
|
|
7906
|
+
this.newWidth = newWidth;
|
|
7630
7907
|
}
|
|
7631
7908
|
}
|
|
7632
7909
|
|
|
@@ -7657,15 +7934,25 @@ class DefaultHeadCellComponent extends HeadCellComponentBase {
|
|
|
7657
7934
|
get column() {
|
|
7658
7935
|
return this._column;
|
|
7659
7936
|
}
|
|
7660
|
-
|
|
7937
|
+
set data(data) {
|
|
7938
|
+
this._data = data;
|
|
7939
|
+
this._cdr.detectChanges();
|
|
7940
|
+
}
|
|
7941
|
+
get data() {
|
|
7942
|
+
return this._data;
|
|
7943
|
+
}
|
|
7944
|
+
ngOnInit() {
|
|
7945
|
+
}
|
|
7661
7946
|
}
|
|
7662
7947
|
DefaultHeadCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DefaultHeadCellComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
7663
|
-
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
|
|
7948
|
+
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 });
|
|
7664
7949
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DefaultHeadCellComponent, decorators: [{
|
|
7665
7950
|
type: Component,
|
|
7666
|
-
args: [{ selector: 'teta-default-head-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"column column_auto
|
|
7951
|
+
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"] }]
|
|
7667
7952
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
7668
7953
|
type: Input
|
|
7954
|
+
}], data: [{
|
|
7955
|
+
type: Input
|
|
7669
7956
|
}] } });
|
|
7670
7957
|
|
|
7671
7958
|
class HeadCellHostComponent {
|
|
@@ -7681,6 +7968,15 @@ class HeadCellHostComponent {
|
|
|
7681
7968
|
get column() {
|
|
7682
7969
|
return this._column;
|
|
7683
7970
|
}
|
|
7971
|
+
set data(data) {
|
|
7972
|
+
this._data = data;
|
|
7973
|
+
if (this.init) {
|
|
7974
|
+
this.componentRef.instance.data = this._data;
|
|
7975
|
+
}
|
|
7976
|
+
}
|
|
7977
|
+
get data() {
|
|
7978
|
+
return this._data;
|
|
7979
|
+
}
|
|
7684
7980
|
ngOnInit() {
|
|
7685
7981
|
if (!HeadCellComponentBase.isPrototypeOf(this.column.headCellComponent)) {
|
|
7686
7982
|
this.column.headCellComponent = DefaultHeadCellComponent;
|
|
@@ -7688,18 +7984,28 @@ class HeadCellHostComponent {
|
|
|
7688
7984
|
this.componentRef =
|
|
7689
7985
|
this.viewContainerRef.createComponent(this.column.headCellComponent);
|
|
7690
7986
|
this.componentRef.instance.column = this.column;
|
|
7987
|
+
this.componentRef.instance.data = this.data;
|
|
7691
7988
|
this.init = true;
|
|
7692
7989
|
}
|
|
7693
7990
|
}
|
|
7694
7991
|
HeadCellHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HeadCellHostComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
7695
|
-
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 });
|
|
7992
|
+
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 });
|
|
7696
7993
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HeadCellHostComponent, decorators: [{
|
|
7697
7994
|
type: Component,
|
|
7698
7995
|
args: [{ selector: 'teta-head-cell-host', template: '', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:contents}\n"] }]
|
|
7699
7996
|
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { column: [{
|
|
7700
7997
|
type: Input
|
|
7998
|
+
}], data: [{
|
|
7999
|
+
type: Input
|
|
7701
8000
|
}] } });
|
|
7702
8001
|
|
|
8002
|
+
class SortEvent {
|
|
8003
|
+
constructor(column, shiftKey) {
|
|
8004
|
+
this.column = column;
|
|
8005
|
+
this.shiftKey = shiftKey;
|
|
8006
|
+
}
|
|
8007
|
+
}
|
|
8008
|
+
|
|
7703
8009
|
class TabContentDirective {
|
|
7704
8010
|
constructor(template) {
|
|
7705
8011
|
this.template = template;
|
|
@@ -7814,7 +8120,7 @@ class TabsComponent {
|
|
|
7814
8120
|
}
|
|
7815
8121
|
}
|
|
7816
8122
|
TabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7817
|
-
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:
|
|
8123
|
+
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"] }] });
|
|
7818
8124
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TabsComponent, decorators: [{
|
|
7819
8125
|
type: Component,
|
|
7820
8126
|
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: [""] }]
|
|
@@ -7921,7 +8227,7 @@ class TreeItemComponent {
|
|
|
7921
8227
|
}
|
|
7922
8228
|
}
|
|
7923
8229
|
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 });
|
|
7924
|
-
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:
|
|
8230
|
+
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: [
|
|
7925
8231
|
trigger('children', [
|
|
7926
8232
|
transition('void => *', [
|
|
7927
8233
|
style({ opacity: '0' }),
|
|
@@ -7998,7 +8304,7 @@ class TreeComponent {
|
|
|
7998
8304
|
}
|
|
7999
8305
|
}
|
|
8000
8306
|
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 });
|
|
8001
|
-
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:
|
|
8307
|
+
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 });
|
|
8002
8308
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TreeComponent, decorators: [{
|
|
8003
8309
|
type: Component,
|
|
8004
8310
|
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: [""] }]
|
|
@@ -8040,7 +8346,7 @@ class TreeItemToggleComponent {
|
|
|
8040
8346
|
}
|
|
8041
8347
|
}
|
|
8042
8348
|
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 });
|
|
8043
|
-
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":
|
|
8349
|
+
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 });
|
|
8044
8350
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TreeItemToggleComponent, decorators: [{
|
|
8045
8351
|
type: Component,
|
|
8046
8352
|
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"] }]
|
|
@@ -8049,14 +8355,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
8049
8355
|
}] } });
|
|
8050
8356
|
|
|
8051
8357
|
class HeadCellDropdownComponent {
|
|
8052
|
-
constructor(_svc, _cdr) {
|
|
8358
|
+
constructor(_svc, _config, _cdr) {
|
|
8053
8359
|
this._svc = _svc;
|
|
8360
|
+
this._config = _config;
|
|
8054
8361
|
this._cdr = _cdr;
|
|
8055
8362
|
this.dropDownOpenChange = new EventEmitter();
|
|
8056
8363
|
this.autosize = new EventEmitter();
|
|
8057
8364
|
this.autosizeAll = new EventEmitter();
|
|
8058
|
-
this.shadow = true;
|
|
8059
|
-
this.bg = true;
|
|
8060
8365
|
this._alive = true;
|
|
8061
8366
|
this.compareItems = (item) => item.name;
|
|
8062
8367
|
this.setChildrenVisibility = (column, visible, hiddenColumns) => {
|
|
@@ -8080,7 +8385,8 @@ class HeadCellDropdownComponent {
|
|
|
8080
8385
|
this.showParents(column, hiddenColumns);
|
|
8081
8386
|
}
|
|
8082
8387
|
};
|
|
8083
|
-
this.
|
|
8388
|
+
this.locale = this._config.locale;
|
|
8389
|
+
this.filterOptions = this._svc.filterOptions;
|
|
8084
8390
|
this._svc.hiddenColumns
|
|
8085
8391
|
.pipe(takeWhile((_) => this._alive), map((_) => [..._]))
|
|
8086
8392
|
.subscribe((_) => {
|
|
@@ -8121,12 +8427,23 @@ class HeadCellDropdownComponent {
|
|
|
8121
8427
|
pinColumn() {
|
|
8122
8428
|
this._svc.pinColumn(this.column);
|
|
8123
8429
|
}
|
|
8430
|
+
sortAsc(event) {
|
|
8431
|
+
this._svc.sortAsc(new SortEvent(this.column, event.shiftKey));
|
|
8432
|
+
}
|
|
8433
|
+
sortDesc(event) {
|
|
8434
|
+
this._svc.sortDesc(new SortEvent(this.column, event.shiftKey));
|
|
8435
|
+
}
|
|
8124
8436
|
clearSort() {
|
|
8125
8437
|
this._svc.clearSort(this.column);
|
|
8126
8438
|
}
|
|
8127
8439
|
clearAllSort() {
|
|
8128
8440
|
this._svc.clearAllSort();
|
|
8129
8441
|
}
|
|
8442
|
+
// sortColumn(column: TableColumn, event: MouseEvent): void {
|
|
8443
|
+
// if (!event.defaultPrevented) {
|
|
8444
|
+
// this._svc.sort(new SortEvent(this.column, event.shiftKey));
|
|
8445
|
+
// }
|
|
8446
|
+
// }
|
|
8130
8447
|
hasFilteredColumns() {
|
|
8131
8448
|
return StateUtil.hasFilteredColumns(this.state);
|
|
8132
8449
|
}
|
|
@@ -8202,17 +8519,19 @@ class HeadCellDropdownComponent {
|
|
|
8202
8519
|
return ArrayUtil.findRecursive(columns, (iterableNode) => iterableNode.columns?.indexOf(column) >= 0, 'columns');
|
|
8203
8520
|
}
|
|
8204
8521
|
}
|
|
8205
|
-
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 });
|
|
8206
|
-
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: { listeners: { "keydown.enter": "enter()" }
|
|
8522
|
+
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 });
|
|
8523
|
+
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 });
|
|
8207
8524
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HeadCellDropdownComponent, decorators: [{
|
|
8208
8525
|
type: Component,
|
|
8209
|
-
args: [{ selector: 'teta-head-cell-dropdown', changeDetection: ChangeDetectionStrategy.OnPush, template: "<teta-tabs class=\"column_auto\"
|
|
8210
|
-
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { columns: [{
|
|
8526
|
+
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"] }]
|
|
8527
|
+
}], ctorParameters: function () { return [{ type: TableService }, { type: TetaConfigService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { columns: [{
|
|
8211
8528
|
type: Input
|
|
8212
8529
|
}], column: [{
|
|
8213
8530
|
type: Input
|
|
8214
8531
|
}], state: [{
|
|
8215
8532
|
type: Input
|
|
8533
|
+
}], data: [{
|
|
8534
|
+
type: Input
|
|
8216
8535
|
}], dropDownOpen: [{
|
|
8217
8536
|
type: Input
|
|
8218
8537
|
}], dropDownOpenChange: [{
|
|
@@ -8221,12 +8540,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
8221
8540
|
type: Output
|
|
8222
8541
|
}], autosizeAll: [{
|
|
8223
8542
|
type: Output
|
|
8224
|
-
}], shadow: [{
|
|
8225
|
-
type: HostBinding,
|
|
8226
|
-
args: ['class.shadow-2']
|
|
8227
|
-
}], bg: [{
|
|
8228
|
-
type: HostBinding,
|
|
8229
|
-
args: ['class.bg-background-50']
|
|
8230
8543
|
}], enter: [{
|
|
8231
8544
|
type: HostListener,
|
|
8232
8545
|
args: ['keydown.enter']
|
|
@@ -8368,11 +8681,6 @@ class HeadCellComponent {
|
|
|
8368
8681
|
autosizeAllColumns() {
|
|
8369
8682
|
this._svc.autosizeAllColumns(this._elementRef.nativeElement);
|
|
8370
8683
|
}
|
|
8371
|
-
sortColumn(column, event) {
|
|
8372
|
-
if (!event.defaultPrevented) {
|
|
8373
|
-
this._svc.sort(new SortEvent(this.column, event.shiftKey));
|
|
8374
|
-
}
|
|
8375
|
-
}
|
|
8376
8684
|
resizeStart(event) {
|
|
8377
8685
|
const rect = this._elementRef.nativeElement.getBoundingClientRect();
|
|
8378
8686
|
this._startPosition = rect.x;
|
|
@@ -8380,8 +8688,10 @@ class HeadCellComponent {
|
|
|
8380
8688
|
}
|
|
8381
8689
|
resizeProcess(event) {
|
|
8382
8690
|
if (this._startPosition && event.pageX > 0) {
|
|
8383
|
-
|
|
8384
|
-
|
|
8691
|
+
requestAnimationFrame(() => {
|
|
8692
|
+
this._svc.resizeColumn(new ColumnResizeEvent(this.column, event.pageX - this._startPosition));
|
|
8693
|
+
this._app.tick();
|
|
8694
|
+
});
|
|
8385
8695
|
}
|
|
8386
8696
|
}
|
|
8387
8697
|
resizeEnd() {
|
|
@@ -8389,14 +8699,19 @@ class HeadCellComponent {
|
|
|
8389
8699
|
}
|
|
8390
8700
|
}
|
|
8391
8701
|
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 });
|
|
8392
|
-
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 <
|
|
8702
|
+
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 });
|
|
8393
8703
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HeadCellComponent, decorators: [{
|
|
8394
8704
|
type: Component,
|
|
8395
|
-
args: [{ selector: 'teta-head-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div draggable=\"true\" class=\"row row_auto\">\n <
|
|
8705
|
+
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"] }]
|
|
8396
8706
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ApplicationRef }, { type: i0.ElementRef }]; }, propDecorators: { column: [{
|
|
8397
8707
|
type: Input
|
|
8398
8708
|
}], showHeadCellMenu: [{
|
|
8399
8709
|
type: Input
|
|
8710
|
+
}], data: [{
|
|
8711
|
+
type: Input
|
|
8712
|
+
}], dropDownOpen: [{
|
|
8713
|
+
type: HostBinding,
|
|
8714
|
+
args: ['class.table-head__cell_active']
|
|
8400
8715
|
}], dragstart: [{
|
|
8401
8716
|
type: HostListener,
|
|
8402
8717
|
args: ['dragstart', ['$event']]
|
|
@@ -8435,38 +8750,52 @@ class TableHeadGroupComponent {
|
|
|
8435
8750
|
get column() {
|
|
8436
8751
|
return this._column;
|
|
8437
8752
|
}
|
|
8438
|
-
get
|
|
8439
|
-
|
|
8753
|
+
get flexGrow() {
|
|
8754
|
+
if (this.column?.columns?.length > 0) {
|
|
8755
|
+
const flat = ArrayUtil.flatten(this.column?.columns, 'columns', true);
|
|
8756
|
+
return flat?.reduce((prev, curr) => prev + curr.flex, 0);
|
|
8757
|
+
}
|
|
8758
|
+
return this.column.flex;
|
|
8440
8759
|
}
|
|
8441
|
-
get
|
|
8442
|
-
if (this.
|
|
8443
|
-
|
|
8760
|
+
get flexBasis() {
|
|
8761
|
+
if (this.column?.columns?.length > 0) {
|
|
8762
|
+
const flat = ArrayUtil.flatten(this.column?.columns, 'columns', true);
|
|
8763
|
+
return flat?.reduce((prev, curr) => prev + curr.width, 0);
|
|
8444
8764
|
}
|
|
8445
|
-
return
|
|
8765
|
+
return this.column.width;
|
|
8446
8766
|
}
|
|
8447
|
-
get
|
|
8448
|
-
return TableUtil.
|
|
8767
|
+
get _leaves() {
|
|
8768
|
+
return TableUtil.getColumnLeaves(this._column)?.filter((_) => this._hiddenColumns.indexOf(_.name) < 0);
|
|
8449
8769
|
}
|
|
8450
8770
|
columnIsHidden(column) {
|
|
8451
8771
|
return this._svc.columnIsHidden(column);
|
|
8452
8772
|
}
|
|
8453
|
-
ngOnInit() {
|
|
8773
|
+
ngOnInit() {
|
|
8774
|
+
}
|
|
8454
8775
|
ngOnDestroy() {
|
|
8455
8776
|
this._alive = false;
|
|
8456
8777
|
}
|
|
8457
8778
|
}
|
|
8458
8779
|
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 });
|
|
8459
|
-
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.
|
|
8780
|
+
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 });
|
|
8460
8781
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableHeadGroupComponent, decorators: [{
|
|
8461
8782
|
type: Component,
|
|
8462
|
-
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\"
|
|
8783
|
+
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: [""] }]
|
|
8463
8784
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { showHeadCellMenu: [{
|
|
8464
8785
|
type: Input
|
|
8786
|
+
}], data: [{
|
|
8787
|
+
type: Input
|
|
8465
8788
|
}], column: [{
|
|
8466
8789
|
type: Input
|
|
8467
|
-
}],
|
|
8790
|
+
}], flexGrow: [{
|
|
8791
|
+
type: HostBinding,
|
|
8792
|
+
args: ['style.flex-grow']
|
|
8793
|
+
}], flexBasis: [{
|
|
8468
8794
|
type: HostBinding,
|
|
8469
|
-
args: ['style.
|
|
8795
|
+
args: ['style.min-width.px']
|
|
8796
|
+
}, {
|
|
8797
|
+
type: HostBinding,
|
|
8798
|
+
args: ['style.flex-basis.px']
|
|
8470
8799
|
}] } });
|
|
8471
8800
|
|
|
8472
8801
|
class TableHeadComponent {
|
|
@@ -8484,22 +8813,21 @@ class TableHeadComponent {
|
|
|
8484
8813
|
const [columns, hiddenColumns] = values;
|
|
8485
8814
|
this._hiddenColumns = hiddenColumns;
|
|
8486
8815
|
this.columns = columns;
|
|
8487
|
-
|
|
8488
|
-
.filter((_) => this._hiddenColumns.indexOf(_.name) < 0)
|
|
8489
|
-
|
|
8816
|
+
const locked = ArrayUtil.flatten(columns, 'columns', true)
|
|
8817
|
+
.filter((_) => this._hiddenColumns.indexOf(_.name) < 0 && _.locked);
|
|
8818
|
+
const startWidth = this.selectType !== SelectType.none ? 28 : 0;
|
|
8819
|
+
this.lockedFlex = locked.reduce((prev, curr) => prev + curr.flex, 0);
|
|
8820
|
+
this.lockedWidth = locked.reduce((prev, curr) => prev + curr.width, startWidth);
|
|
8490
8821
|
this._cdr.markForCheck();
|
|
8491
8822
|
});
|
|
8492
8823
|
this._svc.state.pipe(takeWhile((_) => this._alive)).subscribe((_) => {
|
|
8493
8824
|
this.state = _;
|
|
8494
8825
|
this._cdr.markForCheck();
|
|
8495
8826
|
});
|
|
8496
|
-
|
|
8497
|
-
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
template = `48px ${template}`;
|
|
8501
|
-
}
|
|
8502
|
-
return template;
|
|
8827
|
+
this._svc.displayData.pipe(takeWhile((_) => this._alive)).subscribe((_) => {
|
|
8828
|
+
this.data = _;
|
|
8829
|
+
this._cdr.markForCheck();
|
|
8830
|
+
});
|
|
8503
8831
|
}
|
|
8504
8832
|
set columns(columns) {
|
|
8505
8833
|
this._columns = columns;
|
|
@@ -8514,36 +8842,20 @@ class TableHeadComponent {
|
|
|
8514
8842
|
get unlocked() {
|
|
8515
8843
|
return this._columns.filter((_) => _.locked === false && this._hiddenColumns.indexOf(_.name) < 0);
|
|
8516
8844
|
}
|
|
8517
|
-
getSpan() {
|
|
8518
|
-
if (this.locked?.length > 0) {
|
|
8519
|
-
let span = this.locked.length;
|
|
8520
|
-
if (this.selectType !== SelectType.none) {
|
|
8521
|
-
span += 1;
|
|
8522
|
-
}
|
|
8523
|
-
return `span ${span}`;
|
|
8524
|
-
}
|
|
8525
|
-
return null;
|
|
8526
|
-
}
|
|
8527
|
-
getLockedGridTemplateColumns(columns) {
|
|
8528
|
-
let template = TableUtil.getGridTemplateColumns(columns);
|
|
8529
|
-
if (this.selectType !== SelectType.none) {
|
|
8530
|
-
template = `48px ${template}`;
|
|
8531
|
-
}
|
|
8532
|
-
return template;
|
|
8533
|
-
}
|
|
8534
8845
|
track(index, item) {
|
|
8535
8846
|
return item.name;
|
|
8536
8847
|
}
|
|
8537
|
-
ngOnInit() {
|
|
8848
|
+
ngOnInit() {
|
|
8849
|
+
}
|
|
8538
8850
|
ngOnDestroy() {
|
|
8539
8851
|
this._alive = false;
|
|
8540
8852
|
}
|
|
8541
8853
|
}
|
|
8542
8854
|
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 });
|
|
8543
|
-
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"
|
|
8855
|
+
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 });
|
|
8544
8856
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableHeadComponent, decorators: [{
|
|
8545
8857
|
type: Component,
|
|
8546
|
-
args: [{ selector: 'teta-table-head', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"table-head_locked\"\n *ngIf=\"locked?.length\"\n [style.
|
|
8858
|
+
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: [""] }]
|
|
8547
8859
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { selectType: [{
|
|
8548
8860
|
type: Input
|
|
8549
8861
|
}], showHeadCellMenu: [{
|
|
@@ -8551,9 +8863,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
8551
8863
|
}], tableHeadClass: [{
|
|
8552
8864
|
type: HostBinding,
|
|
8553
8865
|
args: ['class.table-head']
|
|
8554
|
-
}], getTemplateColumns: [{
|
|
8555
|
-
type: HostBinding,
|
|
8556
|
-
args: ['style.grid-template-columns']
|
|
8557
8866
|
}] } });
|
|
8558
8867
|
|
|
8559
8868
|
var AggregationType;
|
|
@@ -8594,7 +8903,7 @@ class SelectionCellComponent {
|
|
|
8594
8903
|
}
|
|
8595
8904
|
}
|
|
8596
8905
|
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 });
|
|
8597
|
-
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 });
|
|
8906
|
+
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 });
|
|
8598
8907
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SelectionCellComponent, decorators: [{
|
|
8599
8908
|
type: Component,
|
|
8600
8909
|
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"] }]
|
|
@@ -8615,18 +8924,23 @@ class CellComponentBase {
|
|
|
8615
8924
|
this._alive = true;
|
|
8616
8925
|
}
|
|
8617
8926
|
get edit() {
|
|
8618
|
-
return (this._edit &&
|
|
8619
|
-
this.svc.boolOrFuncCallback(this.column.editable)({
|
|
8620
|
-
column: this.column,
|
|
8621
|
-
row: this.row,
|
|
8622
|
-
}));
|
|
8927
|
+
return (this._edit && this.editable);
|
|
8623
8928
|
}
|
|
8624
|
-
|
|
8625
|
-
this.svc.
|
|
8929
|
+
get editable() {
|
|
8930
|
+
return this.svc.boolOrFuncCallback(this.column.editable)({
|
|
8626
8931
|
column: this.column,
|
|
8627
8932
|
row: this.row,
|
|
8628
8933
|
});
|
|
8629
8934
|
}
|
|
8935
|
+
get index() {
|
|
8936
|
+
return this.svc.getRowIndex(this.row);
|
|
8937
|
+
}
|
|
8938
|
+
valueChanged() {
|
|
8939
|
+
this.svc.changeValue({
|
|
8940
|
+
column: this.column.name,
|
|
8941
|
+
row: this.index,
|
|
8942
|
+
});
|
|
8943
|
+
}
|
|
8630
8944
|
ngOnDestroy() {
|
|
8631
8945
|
this._alive = false;
|
|
8632
8946
|
}
|
|
@@ -8637,38 +8951,27 @@ class CellComponentBase {
|
|
|
8637
8951
|
this.svc.editRowStart
|
|
8638
8952
|
.pipe(takeWhile((_) => this._alive))
|
|
8639
8953
|
.subscribe((cell) => {
|
|
8640
|
-
if (this.
|
|
8641
|
-
!this._edit
|
|
8642
|
-
// &&
|
|
8643
|
-
// this.svc.boolOrFuncCallback(this.svc.cellEditable)({
|
|
8644
|
-
// column: this.column,
|
|
8645
|
-
// row: this.row,
|
|
8646
|
-
// })
|
|
8647
|
-
) {
|
|
8954
|
+
if (this.index === cell?.row && !this._edit) {
|
|
8648
8955
|
this.start(cell, 'row');
|
|
8649
8956
|
}
|
|
8650
|
-
if (this.
|
|
8957
|
+
if (this.index !== cell?.row && this._edit) {
|
|
8651
8958
|
this.stop();
|
|
8652
8959
|
}
|
|
8653
8960
|
});
|
|
8654
8961
|
this.svc.editCellStart
|
|
8655
8962
|
.pipe(takeWhile((_) => this._alive))
|
|
8656
8963
|
.subscribe((cell) => {
|
|
8657
|
-
if (this.row === cell.
|
|
8658
|
-
this.column.name === cell.column.name &&
|
|
8659
|
-
!this._edit) {
|
|
8964
|
+
if (this.index === cell?.row && this.column.name === cell?.column && !this._edit) {
|
|
8660
8965
|
this.start(cell, 'cell');
|
|
8661
8966
|
}
|
|
8662
|
-
if ((this.
|
|
8663
|
-
this._edit) {
|
|
8967
|
+
if ((this.index !== cell?.row || this.column.name !== cell?.column) && this._edit) {
|
|
8664
8968
|
this.stop();
|
|
8665
8969
|
}
|
|
8666
8970
|
});
|
|
8667
8971
|
this.svc.valueSet
|
|
8668
8972
|
.pipe(takeWhile((_) => this._alive))
|
|
8669
8973
|
.subscribe((cellValue) => {
|
|
8670
|
-
if (this.row === cellValue.
|
|
8671
|
-
&& this.column.name === cellValue.cell.column.name) {
|
|
8974
|
+
if (this.index === cellValue.row && this.column.name === cellValue.column) {
|
|
8672
8975
|
this.row.data[this.column.name] = cellValue.value;
|
|
8673
8976
|
this.cdr.detectChanges();
|
|
8674
8977
|
}
|
|
@@ -8676,15 +8979,15 @@ class CellComponentBase {
|
|
|
8676
8979
|
this.svc.valueChanged
|
|
8677
8980
|
.pipe(takeWhile((_) => this._alive))
|
|
8678
8981
|
.subscribe((cellValue) => {
|
|
8679
|
-
if (this.
|
|
8982
|
+
if (this.index === cellValue.row) {
|
|
8680
8983
|
this.cdr.detectChanges();
|
|
8681
8984
|
}
|
|
8682
8985
|
});
|
|
8683
8986
|
}
|
|
8684
8987
|
start(initiator, type) {
|
|
8685
8988
|
this._edit = true;
|
|
8989
|
+
this.cdr.detectChanges();
|
|
8686
8990
|
this.startEdit(initiator, type);
|
|
8687
|
-
this.cdr.markForCheck();
|
|
8688
8991
|
}
|
|
8689
8992
|
stop() {
|
|
8690
8993
|
this._edit = false;
|
|
@@ -8717,12 +9020,16 @@ class NumericCellComponent extends CellComponentBase {
|
|
|
8717
9020
|
super.ngOnInit();
|
|
8718
9021
|
}
|
|
8719
9022
|
startEdit(initiator, type) {
|
|
8720
|
-
if (initiator?.column
|
|
8721
|
-
|
|
8722
|
-
|
|
8723
|
-
|
|
8724
|
-
|
|
8725
|
-
|
|
9023
|
+
if (initiator?.column === this.column.name) {
|
|
9024
|
+
this.cdr.detectChanges();
|
|
9025
|
+
this.input.nativeElement?.focus();
|
|
9026
|
+
// this.input.nativeElement?.select();
|
|
9027
|
+
// this.cdr.detectChanges();
|
|
9028
|
+
// setTimeout(() => {
|
|
9029
|
+
// this.input?.nativeElement.focus();
|
|
9030
|
+
// this.input?.nativeElement.select();
|
|
9031
|
+
// this.cdr.markForCheck();
|
|
9032
|
+
// }, 0);
|
|
8726
9033
|
}
|
|
8727
9034
|
}
|
|
8728
9035
|
stopEdit() {
|
|
@@ -8730,10 +9037,10 @@ class NumericCellComponent extends CellComponentBase {
|
|
|
8730
9037
|
}
|
|
8731
9038
|
}
|
|
8732
9039
|
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 });
|
|
8733
|
-
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'\"
|
|
9040
|
+
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 });
|
|
8734
9041
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NumericCellComponent, decorators: [{
|
|
8735
9042
|
type: Component,
|
|
8736
|
-
args: [{ selector: 'teta-numeric-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"
|
|
9043
|
+
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: [""] }]
|
|
8737
9044
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
8738
9045
|
type: Input
|
|
8739
9046
|
}], row: [{
|
|
@@ -8758,7 +9065,7 @@ class DateCellComponent extends CellComponentBase {
|
|
|
8758
9065
|
this.cdr.detectChanges();
|
|
8759
9066
|
}
|
|
8760
9067
|
startEdit(initiator, type) {
|
|
8761
|
-
if (initiator?.column
|
|
9068
|
+
if (initiator?.column === this.column.name) {
|
|
8762
9069
|
setTimeout(() => {
|
|
8763
9070
|
this.input?.focus();
|
|
8764
9071
|
this.cdr.markForCheck();
|
|
@@ -8770,10 +9077,10 @@ class DateCellComponent extends CellComponentBase {
|
|
|
8770
9077
|
}
|
|
8771
9078
|
}
|
|
8772
9079
|
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 });
|
|
8773
|
-
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'\"
|
|
9080
|
+
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 });
|
|
8774
9081
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DateCellComponent, decorators: [{
|
|
8775
9082
|
type: Component,
|
|
8776
|
-
args: [{ selector: 'teta-date-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"
|
|
9083
|
+
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: [""] }]
|
|
8777
9084
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
8778
9085
|
type: Input
|
|
8779
9086
|
}], row: [{
|
|
@@ -8809,7 +9116,7 @@ class ListCellComponent extends CellComponentBase {
|
|
|
8809
9116
|
this.valueChanged();
|
|
8810
9117
|
}
|
|
8811
9118
|
startEdit(initiator, type) {
|
|
8812
|
-
if (initiator?.column
|
|
9119
|
+
if (initiator?.column === this.column.name) {
|
|
8813
9120
|
setTimeout(() => {
|
|
8814
9121
|
this.input?.focus();
|
|
8815
9122
|
this.cdr.markForCheck();
|
|
@@ -8836,10 +9143,10 @@ class ListCellComponent extends CellComponentBase {
|
|
|
8836
9143
|
}
|
|
8837
9144
|
}
|
|
8838
9145
|
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 });
|
|
8839
|
-
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'\"
|
|
9146
|
+
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 });
|
|
8840
9147
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ListCellComponent, decorators: [{
|
|
8841
9148
|
type: Component,
|
|
8842
|
-
args: [{ selector: 'teta-list-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"
|
|
9149
|
+
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: [""] }]
|
|
8843
9150
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
8844
9151
|
type: Input
|
|
8845
9152
|
}], row: [{
|
|
@@ -8864,23 +9171,29 @@ class StringCellComponent extends CellComponentBase {
|
|
|
8864
9171
|
super.ngOnInit();
|
|
8865
9172
|
}
|
|
8866
9173
|
startEdit(initiator, type) {
|
|
8867
|
-
if (initiator?.column
|
|
8868
|
-
this.cdr.
|
|
8869
|
-
|
|
8870
|
-
|
|
8871
|
-
|
|
8872
|
-
|
|
9174
|
+
if (initiator?.column === this.column.name) {
|
|
9175
|
+
this.cdr.detectChanges();
|
|
9176
|
+
this.input.nativeElement?.focus();
|
|
9177
|
+
this.input.nativeElement?.select();
|
|
9178
|
+
// this.cdr.detectChanges();
|
|
9179
|
+
// this.input.nativeElement?.focus();
|
|
9180
|
+
// this.input.nativeElement?.select();
|
|
9181
|
+
// this.cdr.detectChanges();
|
|
9182
|
+
// setTimeout(() => {
|
|
9183
|
+
// this.input.nativeElement?.focus();
|
|
9184
|
+
// this.input.nativeElement?.select();
|
|
9185
|
+
// }, 0);
|
|
8873
9186
|
}
|
|
8874
9187
|
}
|
|
8875
9188
|
stopEdit() {
|
|
8876
|
-
this.cdr.
|
|
9189
|
+
this.cdr.detectChanges();
|
|
8877
9190
|
}
|
|
8878
9191
|
}
|
|
8879
9192
|
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 });
|
|
8880
|
-
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'\"
|
|
9193
|
+
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 });
|
|
8881
9194
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: StringCellComponent, decorators: [{
|
|
8882
9195
|
type: Component,
|
|
8883
|
-
args: [{ selector: 'teta-string-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"
|
|
9196
|
+
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: [""] }]
|
|
8884
9197
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
8885
9198
|
type: Input
|
|
8886
9199
|
}], row: [{
|
|
@@ -8903,7 +9216,7 @@ class BooleanCellComponent extends CellComponentBase {
|
|
|
8903
9216
|
super.ngOnInit();
|
|
8904
9217
|
}
|
|
8905
9218
|
startEdit(initiator, type) {
|
|
8906
|
-
if (initiator?.column
|
|
9219
|
+
if (initiator?.column === this.column.name) {
|
|
8907
9220
|
this.cdr.markForCheck();
|
|
8908
9221
|
setTimeout(() => {
|
|
8909
9222
|
this.input?.nativeElement.focus();
|
|
@@ -8915,10 +9228,10 @@ class BooleanCellComponent extends CellComponentBase {
|
|
|
8915
9228
|
}
|
|
8916
9229
|
}
|
|
8917
9230
|
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 });
|
|
8918
|
-
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'\"
|
|
9231
|
+
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 });
|
|
8919
9232
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: BooleanCellComponent, decorators: [{
|
|
8920
9233
|
type: Component,
|
|
8921
|
-
args: [{ selector: 'teta-boolean-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"
|
|
9234
|
+
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: [""] }]
|
|
8922
9235
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
8923
9236
|
type: Input
|
|
8924
9237
|
}], row: [{
|
|
@@ -9015,11 +9328,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9015
9328
|
}] } });
|
|
9016
9329
|
|
|
9017
9330
|
class TableBodyComponent {
|
|
9018
|
-
constructor(_svc, _cdr) {
|
|
9331
|
+
constructor(_svc, _config, _cdr) {
|
|
9019
9332
|
this._svc = _svc;
|
|
9333
|
+
this._config = _config;
|
|
9020
9334
|
this._cdr = _cdr;
|
|
9021
|
-
this.tableBodyClass = true;
|
|
9022
9335
|
this.selectedRows = [];
|
|
9336
|
+
this.tableBodyClass = true;
|
|
9023
9337
|
this.locked = [];
|
|
9024
9338
|
this.unlocked = [];
|
|
9025
9339
|
this.selectTypeEnum = SelectType;
|
|
@@ -9037,13 +9351,13 @@ class TableBodyComponent {
|
|
|
9037
9351
|
}
|
|
9038
9352
|
return success(data);
|
|
9039
9353
|
};
|
|
9354
|
+
this.locale = this._config.locale;
|
|
9040
9355
|
combineLatest([this._svc.columns, this._svc.hiddenColumns])
|
|
9041
9356
|
.pipe(takeWhile((_) => this._alive))
|
|
9042
9357
|
.subscribe((values) => {
|
|
9043
9358
|
const [columns, hiddenColumns] = values;
|
|
9044
9359
|
this._hiddenColumns = hiddenColumns;
|
|
9045
9360
|
this.columns = ArrayUtil.flatten(columns, 'columns', true).filter((_) => this._hiddenColumns.indexOf(_.name) < 0);
|
|
9046
|
-
this.gridTemplateColumns = TableUtil.getGridTemplateColumns(this.columns.sort((a, b) => Number(b.locked) - Number(a.locked)));
|
|
9047
9361
|
this._cdr.markForCheck();
|
|
9048
9362
|
});
|
|
9049
9363
|
this._svc.displayData.pipe(takeWhile((_) => this._alive)).subscribe((_) => {
|
|
@@ -9057,12 +9371,6 @@ class TableBodyComponent {
|
|
|
9057
9371
|
this._svc.scrollIndex
|
|
9058
9372
|
.pipe(takeWhile((_) => this._alive))
|
|
9059
9373
|
.subscribe(async (_) => {
|
|
9060
|
-
// if (this.viewport && this.dataSource && _ !== null) {
|
|
9061
|
-
// await this.dataSource.adapter.relax();
|
|
9062
|
-
// await this.dataSource.adapter.fix({
|
|
9063
|
-
// scrollPosition: (_ + 1) * 24,
|
|
9064
|
-
// });
|
|
9065
|
-
// }
|
|
9066
9374
|
if (this.viewport) {
|
|
9067
9375
|
this.viewport.scrollToIndex(_, 'smooth');
|
|
9068
9376
|
}
|
|
@@ -9085,6 +9393,11 @@ class TableBodyComponent {
|
|
|
9085
9393
|
this._columns = columns;
|
|
9086
9394
|
this.locked = this._columns?.filter((_) => _.locked === true);
|
|
9087
9395
|
this.unlocked = this._columns?.filter((_) => _.locked === false);
|
|
9396
|
+
const startWidth = this.selectType !== SelectType.none ? 28 : 0;
|
|
9397
|
+
this.lockedFlex = this.locked.reduce((prev, curr) => prev + curr.flex, 0);
|
|
9398
|
+
this.lockedWidth = this.locked.reduce((prev, curr) => prev + curr.width, startWidth);
|
|
9399
|
+
this.totalFlex = this._columns.reduce((prev, curr) => prev + curr.flex, 0);
|
|
9400
|
+
this.totalWidth = this._columns.reduce((prev, curr) => prev + curr.width, startWidth);
|
|
9088
9401
|
}
|
|
9089
9402
|
get columns() {
|
|
9090
9403
|
return this._columns;
|
|
@@ -9113,43 +9426,19 @@ class TableBodyComponent {
|
|
|
9113
9426
|
}
|
|
9114
9427
|
getAggregateText(column) {
|
|
9115
9428
|
if (column.aggregate === AggregationType.sum) {
|
|
9116
|
-
return '
|
|
9429
|
+
return 'sum';
|
|
9117
9430
|
}
|
|
9118
9431
|
if (column.aggregate === AggregationType.avg) {
|
|
9119
|
-
return '
|
|
9432
|
+
return 'avg';
|
|
9120
9433
|
}
|
|
9121
9434
|
if (column.aggregate === AggregationType.min) {
|
|
9122
|
-
return '
|
|
9435
|
+
return 'min';
|
|
9123
9436
|
}
|
|
9124
9437
|
if (column.aggregate === AggregationType.max) {
|
|
9125
|
-
return '
|
|
9438
|
+
return 'max';
|
|
9126
9439
|
}
|
|
9127
9440
|
return '';
|
|
9128
9441
|
}
|
|
9129
|
-
getSpan() {
|
|
9130
|
-
if (this.locked?.length > 0) {
|
|
9131
|
-
let span = this.locked.length;
|
|
9132
|
-
if (this.selectType !== SelectType.none) {
|
|
9133
|
-
span += 1;
|
|
9134
|
-
}
|
|
9135
|
-
return `span ${span}`;
|
|
9136
|
-
}
|
|
9137
|
-
return null;
|
|
9138
|
-
}
|
|
9139
|
-
getTemplateColumns() {
|
|
9140
|
-
let template = this.gridTemplateColumns;
|
|
9141
|
-
if (this.selectType !== SelectType.none) {
|
|
9142
|
-
template = `48px ${template}`;
|
|
9143
|
-
}
|
|
9144
|
-
return template;
|
|
9145
|
-
}
|
|
9146
|
-
getLockedGridTemplateColumns(columns) {
|
|
9147
|
-
let template = TableUtil.getGridTemplateColumns(columns);
|
|
9148
|
-
if (this.selectType !== SelectType.none) {
|
|
9149
|
-
template = `48px ${template}`;
|
|
9150
|
-
}
|
|
9151
|
-
return template;
|
|
9152
|
-
}
|
|
9153
9442
|
trackRow(index, row) {
|
|
9154
9443
|
return index;
|
|
9155
9444
|
}
|
|
@@ -9173,16 +9462,16 @@ class TableBodyComponent {
|
|
|
9173
9462
|
: current.data[columnName], null);
|
|
9174
9463
|
}
|
|
9175
9464
|
}
|
|
9176
|
-
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 });
|
|
9177
|
-
TableBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: TableBodyComponent, selector: "teta-table-body", inputs: { virtual: "virtual", activeRow: "activeRow",
|
|
9465
|
+
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 });
|
|
9466
|
+
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 });
|
|
9178
9467
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableBodyComponent, decorators: [{
|
|
9179
9468
|
type: Component,
|
|
9180
|
-
args: [{ selector: 'teta-table-body', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cdk-virtual-scroll-viewport *ngIf=\"virtual\"\n class=\"table-body-container\"\n [itemSize]=\"
|
|
9181
|
-
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { virtual: [{
|
|
9469
|
+
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: [""] }]
|
|
9470
|
+
}], ctorParameters: function () { return [{ type: TableService }, { type: TetaConfigService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { virtual: [{
|
|
9182
9471
|
type: Input
|
|
9183
9472
|
}], activeRow: [{
|
|
9184
9473
|
type: Input
|
|
9185
|
-
}],
|
|
9474
|
+
}], selectedRows: [{
|
|
9186
9475
|
type: Input
|
|
9187
9476
|
}], additionalComponent: [{
|
|
9188
9477
|
type: Input
|
|
@@ -9208,34 +9497,137 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9208
9497
|
args: ['class.table-body']
|
|
9209
9498
|
}] } });
|
|
9210
9499
|
|
|
9500
|
+
class ClickService {
|
|
9501
|
+
constructor(_document) {
|
|
9502
|
+
this._document = _document;
|
|
9503
|
+
this.click = fromEvent(this._document, 'click');
|
|
9504
|
+
this.contextMenu = fromEvent(this._document, 'contextmenu');
|
|
9505
|
+
}
|
|
9506
|
+
}
|
|
9507
|
+
ClickService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ClickService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
9508
|
+
ClickService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ClickService, providedIn: 'root' });
|
|
9509
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ClickService, decorators: [{
|
|
9510
|
+
type: Injectable,
|
|
9511
|
+
args: [{
|
|
9512
|
+
providedIn: 'root',
|
|
9513
|
+
}]
|
|
9514
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
9515
|
+
type: Inject,
|
|
9516
|
+
args: [DOCUMENT]
|
|
9517
|
+
}] }]; } });
|
|
9518
|
+
|
|
9519
|
+
class ContextMenuDirective extends DynamicContentBaseDirective {
|
|
9520
|
+
constructor(_document, _elementRef, _service, _injector, _zone, _cdr, _click) {
|
|
9521
|
+
super(_document, _elementRef, _service, _injector, _zone, _cdr);
|
|
9522
|
+
this._document = _document;
|
|
9523
|
+
this._elementRef = _elementRef;
|
|
9524
|
+
this._service = _service;
|
|
9525
|
+
this._injector = _injector;
|
|
9526
|
+
this._zone = _zone;
|
|
9527
|
+
this._cdr = _cdr;
|
|
9528
|
+
this._click = _click;
|
|
9529
|
+
}
|
|
9530
|
+
get _dynamicContent() {
|
|
9531
|
+
return this.tetaContextMenu;
|
|
9532
|
+
}
|
|
9533
|
+
showContent(event) {
|
|
9534
|
+
if (this.tetaContextMenu) {
|
|
9535
|
+
event.preventDefault();
|
|
9536
|
+
setTimeout(() => {
|
|
9537
|
+
this.createMenu(event);
|
|
9538
|
+
});
|
|
9539
|
+
}
|
|
9540
|
+
}
|
|
9541
|
+
click(event) {
|
|
9542
|
+
if (this._componentRef &&
|
|
9543
|
+
DomUtil.clickedInside(this._componentRef.location.nativeElement, event)) {
|
|
9544
|
+
event.preventDefault();
|
|
9545
|
+
event.stopPropagation();
|
|
9546
|
+
}
|
|
9547
|
+
}
|
|
9548
|
+
ngOnInit() {
|
|
9549
|
+
super.ngOnInit();
|
|
9550
|
+
merge(this._click.click, this._click.contextMenu)
|
|
9551
|
+
.pipe(takeWhile(() => this._alive), filter(() => this._open), filter(() => this._componentRef != null), filter((event) => !DomUtil.clickedInside(this._componentRef.location.nativeElement, event)), tap((_) => {
|
|
9552
|
+
this.destroyContentRef();
|
|
9553
|
+
this.openChange.emit(false);
|
|
9554
|
+
}))
|
|
9555
|
+
.subscribe();
|
|
9556
|
+
}
|
|
9557
|
+
ngOnDestroy() {
|
|
9558
|
+
super.ngOnDestroy();
|
|
9559
|
+
}
|
|
9560
|
+
setPosition() {
|
|
9561
|
+
if (this._componentRef && this._open) {
|
|
9562
|
+
const position = PositionUtil.getPosition({
|
|
9563
|
+
top: this._eventPoint.y,
|
|
9564
|
+
bottom: this._eventPoint.y,
|
|
9565
|
+
left: this._eventPoint.x,
|
|
9566
|
+
right: this._eventPoint.x,
|
|
9567
|
+
}, this._componentRef.location.nativeElement.getBoundingClientRect(), this.align, this.verticalAlign);
|
|
9568
|
+
PositionUtil.setElementPosition(this._componentRef.location.nativeElement, position);
|
|
9569
|
+
}
|
|
9570
|
+
}
|
|
9571
|
+
createMenu(event) {
|
|
9572
|
+
if (this.tetaContextMenu == null) {
|
|
9573
|
+
return;
|
|
9574
|
+
}
|
|
9575
|
+
this._eventPoint = event;
|
|
9576
|
+
this._componentRef = this.createContentRef();
|
|
9577
|
+
this._componentRef.instance.className = [
|
|
9578
|
+
...ArrayUtil.asArray(this.className),
|
|
9579
|
+
'context-menu',
|
|
9580
|
+
];
|
|
9581
|
+
this.openChange.emit(true);
|
|
9582
|
+
}
|
|
9583
|
+
}
|
|
9584
|
+
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 });
|
|
9585
|
+
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 });
|
|
9586
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuDirective, decorators: [{
|
|
9587
|
+
type: Directive,
|
|
9588
|
+
args: [{
|
|
9589
|
+
selector: '[tetaContextMenu]',
|
|
9590
|
+
}]
|
|
9591
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
9592
|
+
type: Inject,
|
|
9593
|
+
args: [DOCUMENT]
|
|
9594
|
+
}] }, { type: i0.ElementRef }, { type: DynamicComponentService }, { type: i0.Injector }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: ClickService }]; }, propDecorators: { tetaContextMenu: [{
|
|
9595
|
+
type: Input
|
|
9596
|
+
}], showContent: [{
|
|
9597
|
+
type: HostListener,
|
|
9598
|
+
args: ['contextmenu', ['$event']]
|
|
9599
|
+
}], click: [{
|
|
9600
|
+
type: HostListener,
|
|
9601
|
+
args: ['click', ['$event']]
|
|
9602
|
+
}] } });
|
|
9603
|
+
|
|
9211
9604
|
class TableComponent {
|
|
9212
9605
|
constructor(_svc, _elementRef) {
|
|
9213
9606
|
this._svc = _svc;
|
|
9214
9607
|
this._elementRef = _elementRef;
|
|
9215
9608
|
this.data = [];
|
|
9216
9609
|
this.columns = [];
|
|
9217
|
-
this.
|
|
9218
|
-
this.selectType = SelectType.none;
|
|
9610
|
+
this.selectType = SelectType.multiple;
|
|
9219
9611
|
this.groupRowComponent = GroupRowComponent;
|
|
9220
|
-
this.
|
|
9612
|
+
this.trackRow = (index, row) => index;
|
|
9613
|
+
this.editType = EditType.cell;
|
|
9614
|
+
this.editEvent = EditEvent.doubleClick;
|
|
9221
9615
|
this.showHeadCellMenu = true;
|
|
9616
|
+
this.contextMenuOpenChange = new EventEmitter();
|
|
9222
9617
|
this.stateChange = new EventEmitter();
|
|
9223
9618
|
this.bodyLeft = new EventEmitter();
|
|
9224
9619
|
this.activeRowChange = new EventEmitter();
|
|
9225
9620
|
this.selectedRowsChange = new EventEmitter();
|
|
9226
|
-
this.rowLeft = new EventEmitter();
|
|
9227
|
-
this.rowEditStart = new EventEmitter();
|
|
9228
|
-
this.rowEditEnd = new EventEmitter();
|
|
9229
9621
|
this.cellClick = new EventEmitter();
|
|
9230
9622
|
this.cellDoubleClick = new EventEmitter();
|
|
9231
9623
|
this.cellFocus = new EventEmitter();
|
|
9624
|
+
this.cellKeyDown = new EventEmitter();
|
|
9625
|
+
this.rowLeft = new EventEmitter();
|
|
9626
|
+
this.rowEditStart = new EventEmitter();
|
|
9627
|
+
this.rowEditEnd = new EventEmitter();
|
|
9232
9628
|
this.cellEditStart = new EventEmitter();
|
|
9233
9629
|
this.cellEditEnd = new EventEmitter();
|
|
9234
9630
|
this.valueChange = new EventEmitter();
|
|
9235
|
-
this.cellKeyUp = new EventEmitter();
|
|
9236
|
-
this.pasteRows = new EventEmitter();
|
|
9237
|
-
this.addRow = new EventEmitter();
|
|
9238
|
-
this.deleteRows = new EventEmitter();
|
|
9239
9631
|
this.tableService = new EventEmitter();
|
|
9240
9632
|
this.tableClass = true;
|
|
9241
9633
|
this._alive = true;
|
|
@@ -9247,16 +9639,16 @@ class TableComponent {
|
|
|
9247
9639
|
.subscribe((state) => this.stateChange.next(state));
|
|
9248
9640
|
this._svc.editCellStart
|
|
9249
9641
|
.pipe(takeWhile((_) => this._alive))
|
|
9250
|
-
.subscribe((item) => this.cellEditStart.emit(item));
|
|
9642
|
+
.subscribe((item) => this.cellEditStart.emit(this._svc.getCellInstance(item)));
|
|
9251
9643
|
this._svc.editCellStop
|
|
9252
9644
|
.pipe(takeWhile((_) => this._alive))
|
|
9253
|
-
.subscribe((item) => this.cellEditEnd.emit(item));
|
|
9645
|
+
.subscribe((item) => this.cellEditEnd.emit(this._svc.getCellInstance(item)));
|
|
9254
9646
|
this._svc.editRowStart
|
|
9255
9647
|
.pipe(takeWhile((_) => this._alive))
|
|
9256
|
-
.subscribe((item) => this.rowEditStart.emit(item
|
|
9648
|
+
.subscribe((item) => this.rowEditStart.emit(this._svc.getCellInstance(item)));
|
|
9257
9649
|
this._svc.editRowStop
|
|
9258
9650
|
.pipe(takeWhile((_) => this._alive))
|
|
9259
|
-
.subscribe((item) => this.rowEditEnd.emit(item?.row));
|
|
9651
|
+
.subscribe((item) => this.rowEditEnd.emit(this._svc.getRowByIndex(item?.row)));
|
|
9260
9652
|
this._svc.selectedRows
|
|
9261
9653
|
.pipe(takeWhile((_) => this._alive))
|
|
9262
9654
|
.subscribe((items) => {
|
|
@@ -9269,7 +9661,7 @@ class TableComponent {
|
|
|
9269
9661
|
this._svc.valueChanged
|
|
9270
9662
|
.pipe(takeWhile((_) => this._alive))
|
|
9271
9663
|
.subscribe((coordinates) => {
|
|
9272
|
-
this.valueChange.emit(coordinates);
|
|
9664
|
+
this.valueChange.emit(this._svc.getCellInstance(coordinates));
|
|
9273
9665
|
});
|
|
9274
9666
|
}
|
|
9275
9667
|
set state(state) {
|
|
@@ -9281,19 +9673,44 @@ class TableComponent {
|
|
|
9281
9673
|
handleClickOutsideAnyRow(event) {
|
|
9282
9674
|
const coordinates = this.getCoordinates(event);
|
|
9283
9675
|
if (coordinates) {
|
|
9284
|
-
this.cellClick.emit(
|
|
9676
|
+
this.cellClick.emit({
|
|
9677
|
+
...this._svc.getCellInstance(coordinates),
|
|
9678
|
+
event
|
|
9679
|
+
});
|
|
9285
9680
|
if (this.editEvent === EditEvent.click) {
|
|
9286
9681
|
this.startEditRowOrCell(coordinates);
|
|
9287
9682
|
}
|
|
9683
|
+
else {
|
|
9684
|
+
if (this._svc.currentEditCell && (coordinates.row !== this._svc.currentEditCell.row || coordinates.column !== this._svc.currentEditCell.column)) {
|
|
9685
|
+
this.startEditRowOrCell(null);
|
|
9686
|
+
}
|
|
9687
|
+
}
|
|
9688
|
+
}
|
|
9689
|
+
const row = this.getRow(event);
|
|
9690
|
+
if (row) {
|
|
9691
|
+
if (event.ctrlKey) {
|
|
9692
|
+
this._svc.selectOrDeselectRow(row);
|
|
9693
|
+
}
|
|
9694
|
+
if (event.shiftKey) {
|
|
9695
|
+
this._svc.selectRange(row);
|
|
9696
|
+
}
|
|
9288
9697
|
}
|
|
9289
9698
|
if (!this.eventIsOnRow(event) && !event.defaultPrevented) {
|
|
9290
|
-
this.
|
|
9699
|
+
if (this.editType === EditType.row) {
|
|
9700
|
+
this._svc.startEditRow(null);
|
|
9701
|
+
}
|
|
9702
|
+
else {
|
|
9703
|
+
this._svc.startEditCell(null);
|
|
9704
|
+
}
|
|
9291
9705
|
}
|
|
9292
9706
|
}
|
|
9293
9707
|
focusIn(event) {
|
|
9294
9708
|
const coordinates = this.getCoordinates(event);
|
|
9295
9709
|
if (coordinates) {
|
|
9296
|
-
this.cellFocus.emit(
|
|
9710
|
+
this.cellFocus.emit({
|
|
9711
|
+
...this._svc.getCellInstance(coordinates),
|
|
9712
|
+
event
|
|
9713
|
+
});
|
|
9297
9714
|
if (this.editEvent === EditEvent.focus) {
|
|
9298
9715
|
this.startEditRowOrCell(coordinates);
|
|
9299
9716
|
}
|
|
@@ -9302,26 +9719,91 @@ class TableComponent {
|
|
|
9302
9719
|
dblclick(event) {
|
|
9303
9720
|
const coordinates = this.getCoordinates(event);
|
|
9304
9721
|
if (coordinates) {
|
|
9305
|
-
this.cellDoubleClick.emit(
|
|
9722
|
+
this.cellDoubleClick.emit({
|
|
9723
|
+
...this._svc.getCellInstance(coordinates),
|
|
9724
|
+
event
|
|
9725
|
+
});
|
|
9306
9726
|
if (this.editEvent === EditEvent.doubleClick) {
|
|
9307
9727
|
this.startEditRowOrCell(coordinates);
|
|
9308
9728
|
}
|
|
9309
9729
|
}
|
|
9310
9730
|
}
|
|
9311
|
-
|
|
9312
|
-
|
|
9313
|
-
|
|
9314
|
-
this.cellKeyUp.emit(coordinates);
|
|
9315
|
-
}
|
|
9316
|
-
switch (event.key) {
|
|
9317
|
-
case 'Enter':
|
|
9731
|
+
keydown(event) {
|
|
9732
|
+
if (event.key === 'Escape') {
|
|
9733
|
+
if (this.editType === EditType.row) {
|
|
9318
9734
|
this._svc.startEditRow(null);
|
|
9319
|
-
|
|
9320
|
-
|
|
9735
|
+
}
|
|
9736
|
+
else {
|
|
9737
|
+
this._svc.startEditCell(null);
|
|
9738
|
+
}
|
|
9739
|
+
}
|
|
9740
|
+
const coordinates = this.getCoordinates(event);
|
|
9741
|
+
if (event.key === 'Enter') {
|
|
9742
|
+
if (this.editType === EditType.row) {
|
|
9321
9743
|
this._svc.startEditRow(null);
|
|
9322
|
-
|
|
9323
|
-
|
|
9324
|
-
|
|
9744
|
+
}
|
|
9745
|
+
else {
|
|
9746
|
+
if (this._svc.currentEditCell) {
|
|
9747
|
+
const target = this._svc.getNextRowCell(coordinates);
|
|
9748
|
+
if (target) {
|
|
9749
|
+
this.startEditRowOrCell({
|
|
9750
|
+
row: target.row,
|
|
9751
|
+
column: target.column,
|
|
9752
|
+
event: undefined
|
|
9753
|
+
});
|
|
9754
|
+
}
|
|
9755
|
+
else {
|
|
9756
|
+
this._svc.startEditCell(null);
|
|
9757
|
+
}
|
|
9758
|
+
}
|
|
9759
|
+
}
|
|
9760
|
+
}
|
|
9761
|
+
if (coordinates) {
|
|
9762
|
+
this.cellKeyDown.emit({
|
|
9763
|
+
...this._svc.getCellInstance(coordinates),
|
|
9764
|
+
event
|
|
9765
|
+
});
|
|
9766
|
+
if (event.key && (event.key.length === 1 || event.key === 'Delete')) {
|
|
9767
|
+
this.startEditRowOrCell({
|
|
9768
|
+
row: coordinates.row,
|
|
9769
|
+
column: coordinates.column,
|
|
9770
|
+
event: event
|
|
9771
|
+
});
|
|
9772
|
+
}
|
|
9773
|
+
if (event.key === 'Tab' && this._svc.currentEditCell) {
|
|
9774
|
+
event.preventDefault();
|
|
9775
|
+
let target = this._svc.getNextEditableCell(coordinates);
|
|
9776
|
+
if (event.shiftKey) {
|
|
9777
|
+
target = this._svc.getPreviousEditableCell(coordinates);
|
|
9778
|
+
}
|
|
9779
|
+
if (target) {
|
|
9780
|
+
this.startEditRowOrCell({
|
|
9781
|
+
row: target.row,
|
|
9782
|
+
column: target.column,
|
|
9783
|
+
event: undefined
|
|
9784
|
+
});
|
|
9785
|
+
}
|
|
9786
|
+
}
|
|
9787
|
+
if (!this._svc.currentEditCell) {
|
|
9788
|
+
let target;
|
|
9789
|
+
if (event.key === 'ArrowRight') {
|
|
9790
|
+
target = this._svc.getNextCell(coordinates);
|
|
9791
|
+
}
|
|
9792
|
+
if (event.key === 'ArrowLeft') {
|
|
9793
|
+
target = this._svc.getPreviousCell(coordinates);
|
|
9794
|
+
}
|
|
9795
|
+
if (event.key === 'ArrowUp') {
|
|
9796
|
+
target = this._svc.getPreviousRowCell(coordinates);
|
|
9797
|
+
}
|
|
9798
|
+
if (event.key === 'ArrowDown') {
|
|
9799
|
+
target = this._svc.getNextRowCell(coordinates);
|
|
9800
|
+
}
|
|
9801
|
+
if (target) {
|
|
9802
|
+
event.preventDefault();
|
|
9803
|
+
const element = this.getCellElement(target);
|
|
9804
|
+
element?.focus();
|
|
9805
|
+
}
|
|
9806
|
+
}
|
|
9325
9807
|
}
|
|
9326
9808
|
}
|
|
9327
9809
|
mousedown(event) {
|
|
@@ -9329,48 +9811,6 @@ class TableComponent {
|
|
|
9329
9811
|
event.preventDefault();
|
|
9330
9812
|
}
|
|
9331
9813
|
}
|
|
9332
|
-
contextMenu(event) {
|
|
9333
|
-
if (this.getSelectedText() ||
|
|
9334
|
-
this.contextMenuConfig?.contextMenu === false) {
|
|
9335
|
-
return;
|
|
9336
|
-
}
|
|
9337
|
-
event.preventDefault();
|
|
9338
|
-
event.stopPropagation();
|
|
9339
|
-
this.contextMenuTarget = this.getCoordinates(event);
|
|
9340
|
-
this.showContextMenu = true;
|
|
9341
|
-
this.setPosition(event);
|
|
9342
|
-
}
|
|
9343
|
-
rowAdd() {
|
|
9344
|
-
this.addRow.emit();
|
|
9345
|
-
this.contextMenuTarget = null;
|
|
9346
|
-
this.showContextMenu = false;
|
|
9347
|
-
}
|
|
9348
|
-
copy(rows) {
|
|
9349
|
-
of(1)
|
|
9350
|
-
.pipe(withLatestFrom(this._svc.columns, this._svc.hiddenColumns))
|
|
9351
|
-
.subscribe((data) => {
|
|
9352
|
-
const [, columns, hidden] = data;
|
|
9353
|
-
navigator.clipboard.writeText(this.toClipboardString(rows, this.getVisibleColumns(columns, hidden)));
|
|
9354
|
-
this.contextMenuTarget = null;
|
|
9355
|
-
this.showContextMenu = false;
|
|
9356
|
-
});
|
|
9357
|
-
}
|
|
9358
|
-
delete(rows) {
|
|
9359
|
-
this.deleteRows.emit(rows);
|
|
9360
|
-
this.contextMenuTarget = null;
|
|
9361
|
-
this.showContextMenu = false;
|
|
9362
|
-
}
|
|
9363
|
-
async pasteData() {
|
|
9364
|
-
const result = await navigator.clipboard.readText();
|
|
9365
|
-
of(1)
|
|
9366
|
-
.pipe(withLatestFrom(this._svc.columns, this._svc.hiddenColumns))
|
|
9367
|
-
.subscribe((data) => {
|
|
9368
|
-
const [, columns, hidden] = data;
|
|
9369
|
-
this.pasteRows.emit(this.fromClipboard(result, this.getVisibleColumns(columns, hidden)));
|
|
9370
|
-
});
|
|
9371
|
-
this.contextMenuTarget = null;
|
|
9372
|
-
this.showContextMenu = false;
|
|
9373
|
-
}
|
|
9374
9814
|
ngOnInit() {
|
|
9375
9815
|
this._svc.restoreState();
|
|
9376
9816
|
this._svc.restoreHiddenColumns();
|
|
@@ -9413,7 +9853,18 @@ class TableComponent {
|
|
|
9413
9853
|
}
|
|
9414
9854
|
if (changes.hasOwnProperty('dict')) {
|
|
9415
9855
|
this._svc.setDict(this.dict);
|
|
9856
|
+
this._svc.setFilterOptions(this.dict);
|
|
9857
|
+
}
|
|
9858
|
+
if (changes.hasOwnProperty('filterOptions')) {
|
|
9859
|
+
this._svc.setFilterOptions(this.filterOptions);
|
|
9416
9860
|
}
|
|
9861
|
+
if (changes.hasOwnProperty('trackRow')) {
|
|
9862
|
+
this._svc.trackRow = this.trackRow;
|
|
9863
|
+
}
|
|
9864
|
+
}
|
|
9865
|
+
setContextMenuOpen(value) {
|
|
9866
|
+
this.contextMenuOpen = value;
|
|
9867
|
+
this.contextMenuOpenChange.emit(this.contextMenuOpen);
|
|
9417
9868
|
}
|
|
9418
9869
|
startEditRowOrCell(coordinates) {
|
|
9419
9870
|
if (this.editType === EditType.row) {
|
|
@@ -9428,6 +9879,14 @@ class TableComponent {
|
|
|
9428
9879
|
return target.tagName?.toLowerCase() === 'teta-cell';
|
|
9429
9880
|
});
|
|
9430
9881
|
}
|
|
9882
|
+
getEventRow(event) {
|
|
9883
|
+
return event.composedPath().find((target) => {
|
|
9884
|
+
return target?.getAttribute && target?.getAttribute('data-row');
|
|
9885
|
+
});
|
|
9886
|
+
}
|
|
9887
|
+
getCellElement(coordinates) {
|
|
9888
|
+
return this._elementRef.nativeElement.querySelector(`teta-cell[data-row="${coordinates.row}"][data-column="${coordinates.column}"]`);
|
|
9889
|
+
}
|
|
9431
9890
|
eventIsOnRow(event) {
|
|
9432
9891
|
const row = event.composedPath().find((target) => {
|
|
9433
9892
|
return target?.getAttribute && target?.getAttribute('data-row');
|
|
@@ -9437,76 +9896,43 @@ class TableComponent {
|
|
|
9437
9896
|
getCoordinates(event) {
|
|
9438
9897
|
const cell = this.getEventCell(event);
|
|
9439
9898
|
if (cell) {
|
|
9440
|
-
const rowIndex = cell.getAttribute('data-row');
|
|
9899
|
+
const rowIndex = parseInt(cell.getAttribute('data-row'), 10);
|
|
9441
9900
|
const columnName = cell.getAttribute('data-column');
|
|
9442
|
-
if (rowIndex && columnName) {
|
|
9443
|
-
const row = this._svc.getRowByIndex(rowIndex);
|
|
9444
|
-
const column = this._svc.getColumnByName(columnName);
|
|
9901
|
+
if (rowIndex >= 0 && columnName) {
|
|
9445
9902
|
return {
|
|
9446
|
-
row,
|
|
9447
|
-
column:
|
|
9903
|
+
row: rowIndex,
|
|
9904
|
+
column: columnName,
|
|
9448
9905
|
event,
|
|
9449
9906
|
};
|
|
9450
9907
|
}
|
|
9451
9908
|
}
|
|
9452
9909
|
return null;
|
|
9453
9910
|
}
|
|
9454
|
-
|
|
9455
|
-
|
|
9456
|
-
if (
|
|
9457
|
-
|
|
9458
|
-
|
|
9459
|
-
|
|
9460
|
-
|
|
9461
|
-
|
|
9462
|
-
|
|
9463
|
-
top: event.y,
|
|
9464
|
-
bottom: event.y,
|
|
9465
|
-
left: event.x,
|
|
9466
|
-
right: event.x,
|
|
9467
|
-
}, this.menu.nativeElement.getBoundingClientRect(), Align.left, VerticalAlign.auto);
|
|
9468
|
-
PositionUtil.setElementPosition(this.menu.nativeElement, position);
|
|
9469
|
-
}
|
|
9470
|
-
toClipboardString(rows, columns) {
|
|
9471
|
-
return rows.reduce((res, currentRow, i) => `${res}${i === 0 ? '' : '\n'}${columns.reduce((columnResult, column, j) => `${columnResult}${j === 0 ? '' : '\t'}${currentRow.data[column.name] ?? ''}`, '')}`, '');
|
|
9472
|
-
}
|
|
9473
|
-
fromClipboard(data, columns) {
|
|
9474
|
-
const rows = data.split('\n').filter((_) => _?.length > 0);
|
|
9475
|
-
const result = rows.map((_) => _.replace('\r', '').replace('\n', '').split('\t'));
|
|
9476
|
-
return result.map((row) => row.reduce((res, item, index) => {
|
|
9477
|
-
let value = item;
|
|
9478
|
-
if (columns[index]?.filterType === FilterType.number ||
|
|
9479
|
-
columns[index]?.filterType === FilterType.list) {
|
|
9480
|
-
value = parseFloat(item);
|
|
9481
|
-
}
|
|
9482
|
-
if (columns[index]?.filterType === FilterType.boolean) {
|
|
9483
|
-
value = Boolean(JSON.parse(item.toLowerCase()));
|
|
9484
|
-
}
|
|
9485
|
-
if (columns[index]) {
|
|
9486
|
-
res[columns[index].name] = value;
|
|
9487
|
-
}
|
|
9488
|
-
return res;
|
|
9489
|
-
}, {}));
|
|
9490
|
-
}
|
|
9491
|
-
getVisibleColumns(columns, hidden) {
|
|
9492
|
-
const visible = ArrayUtil.flatten(columns, 'columns', true).filter((_) => hidden.indexOf(_.name) < 0);
|
|
9493
|
-
return visible.sort((a, b) => Number(b.locked) - Number(a.locked));
|
|
9911
|
+
getRow(event) {
|
|
9912
|
+
const rowElement = this.getEventRow(event);
|
|
9913
|
+
if (rowElement) {
|
|
9914
|
+
const rowIndex = parseInt(rowElement.getAttribute('data-row'), 10);
|
|
9915
|
+
if (rowIndex >= 0) {
|
|
9916
|
+
return this._svc.getRowByIndex(rowIndex);
|
|
9917
|
+
}
|
|
9918
|
+
}
|
|
9919
|
+
return null;
|
|
9494
9920
|
}
|
|
9495
9921
|
}
|
|
9496
9922
|
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 });
|
|
9497
|
-
TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: TableComponent, selector: "teta-table", inputs: { data: "data", columns: "columns", dict: "dict",
|
|
9923
|
+
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 });
|
|
9498
9924
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableComponent, decorators: [{
|
|
9499
9925
|
type: Component,
|
|
9500
|
-
args: [{ selector: 'teta-table', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TableService], template: "<div class=\"column column_auto\">\n <teta-table-head
|
|
9926
|
+
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: [""] }]
|
|
9501
9927
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ElementRef }]; }, propDecorators: { data: [{
|
|
9502
9928
|
type: Input
|
|
9503
9929
|
}], columns: [{
|
|
9504
9930
|
type: Input
|
|
9505
9931
|
}], dict: [{
|
|
9506
9932
|
type: Input
|
|
9507
|
-
}],
|
|
9933
|
+
}], filterOptions: [{
|
|
9508
9934
|
type: Input
|
|
9509
|
-
}],
|
|
9935
|
+
}], state: [{
|
|
9510
9936
|
type: Input
|
|
9511
9937
|
}], cookieName: [{
|
|
9512
9938
|
type: Input
|
|
@@ -9530,7 +9956,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9530
9956
|
type: Input
|
|
9531
9957
|
}], tree: [{
|
|
9532
9958
|
type: Input
|
|
9533
|
-
}],
|
|
9959
|
+
}], trackRow: [{
|
|
9534
9960
|
type: Input
|
|
9535
9961
|
}], editType: [{
|
|
9536
9962
|
type: Input
|
|
@@ -9542,10 +9968,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9542
9968
|
type: Input
|
|
9543
9969
|
}], scrollToIndex: [{
|
|
9544
9970
|
type: Input
|
|
9545
|
-
}], contextMenuConfig: [{
|
|
9546
|
-
type: Input
|
|
9547
9971
|
}], showHeadCellMenu: [{
|
|
9548
9972
|
type: Input
|
|
9973
|
+
}], contextMenu: [{
|
|
9974
|
+
type: Input
|
|
9975
|
+
}], contextMenuOpen: [{
|
|
9976
|
+
type: Input
|
|
9977
|
+
}], contextMenuOpenChange: [{
|
|
9978
|
+
type: Output
|
|
9549
9979
|
}], stateChange: [{
|
|
9550
9980
|
type: Output
|
|
9551
9981
|
}], bodyLeft: [{
|
|
@@ -9554,31 +9984,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9554
9984
|
type: Output
|
|
9555
9985
|
}], selectedRowsChange: [{
|
|
9556
9986
|
type: Output
|
|
9557
|
-
}], rowLeft: [{
|
|
9558
|
-
type: Output
|
|
9559
|
-
}], rowEditStart: [{
|
|
9560
|
-
type: Output
|
|
9561
|
-
}], rowEditEnd: [{
|
|
9562
|
-
type: Output
|
|
9563
9987
|
}], cellClick: [{
|
|
9564
9988
|
type: Output
|
|
9565
9989
|
}], cellDoubleClick: [{
|
|
9566
9990
|
type: Output
|
|
9567
9991
|
}], cellFocus: [{
|
|
9568
9992
|
type: Output
|
|
9569
|
-
}],
|
|
9993
|
+
}], cellKeyDown: [{
|
|
9570
9994
|
type: Output
|
|
9571
|
-
}],
|
|
9995
|
+
}], rowLeft: [{
|
|
9572
9996
|
type: Output
|
|
9573
|
-
}],
|
|
9997
|
+
}], rowEditStart: [{
|
|
9574
9998
|
type: Output
|
|
9575
|
-
}],
|
|
9999
|
+
}], rowEditEnd: [{
|
|
9576
10000
|
type: Output
|
|
9577
|
-
}],
|
|
10001
|
+
}], cellEditStart: [{
|
|
9578
10002
|
type: Output
|
|
9579
|
-
}],
|
|
10003
|
+
}], cellEditEnd: [{
|
|
9580
10004
|
type: Output
|
|
9581
|
-
}],
|
|
10005
|
+
}], valueChange: [{
|
|
9582
10006
|
type: Output
|
|
9583
10007
|
}], tableService: [{
|
|
9584
10008
|
type: Output
|
|
@@ -9597,15 +10021,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9597
10021
|
}], dblclick: [{
|
|
9598
10022
|
type: HostListener,
|
|
9599
10023
|
args: ['dblclick', ['$event']]
|
|
9600
|
-
}],
|
|
10024
|
+
}], keydown: [{
|
|
9601
10025
|
type: HostListener,
|
|
9602
|
-
args: ['
|
|
10026
|
+
args: ['keydown', ['$event']]
|
|
9603
10027
|
}], mousedown: [{
|
|
9604
10028
|
type: HostListener,
|
|
9605
10029
|
args: ['mousedown', ['$event']]
|
|
9606
|
-
}], contextMenu: [{
|
|
9607
|
-
type: HostListener,
|
|
9608
|
-
args: ['contextmenu', ['$event']]
|
|
9609
10030
|
}] } });
|
|
9610
10031
|
|
|
9611
10032
|
class TabsModule {
|
|
@@ -9692,9 +10113,9 @@ class DateTimeCellComponent extends CellComponentBase {
|
|
|
9692
10113
|
this.valueChanged();
|
|
9693
10114
|
}
|
|
9694
10115
|
startEdit(initiator, type) {
|
|
9695
|
-
if (initiator?.column
|
|
10116
|
+
if (initiator?.column === this.column.name) {
|
|
9696
10117
|
setTimeout(() => {
|
|
9697
|
-
this.input
|
|
10118
|
+
this.input?.openPicker(true);
|
|
9698
10119
|
this.cdr.markForCheck();
|
|
9699
10120
|
}, 0);
|
|
9700
10121
|
}
|
|
@@ -9704,10 +10125,10 @@ class DateTimeCellComponent extends CellComponentBase {
|
|
|
9704
10125
|
}
|
|
9705
10126
|
}
|
|
9706
10127
|
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 });
|
|
9707
|
-
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'\"
|
|
10128
|
+
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 });
|
|
9708
10129
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DateTimeCellComponent, decorators: [{
|
|
9709
10130
|
type: Component,
|
|
9710
|
-
args: [{ selector: 'teta-date-time-cell', template: "<span [style.display]=\"edit ? 'none' : 'block'\"
|
|
10131
|
+
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: [""] }]
|
|
9711
10132
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
9712
10133
|
type: Input
|
|
9713
10134
|
}], row: [{
|
|
@@ -9731,6 +10152,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9731
10152
|
}]
|
|
9732
10153
|
}] });
|
|
9733
10154
|
|
|
10155
|
+
class ContextMenuModule {
|
|
10156
|
+
}
|
|
10157
|
+
ContextMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
10158
|
+
ContextMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, declarations: [ContextMenuDirective], imports: [CommonModule,
|
|
10159
|
+
DynamicComponentModule], exports: [ContextMenuDirective] });
|
|
10160
|
+
ContextMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, imports: [[
|
|
10161
|
+
CommonModule,
|
|
10162
|
+
DynamicComponentModule
|
|
10163
|
+
]] });
|
|
10164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, decorators: [{
|
|
10165
|
+
type: NgModule,
|
|
10166
|
+
args: [{
|
|
10167
|
+
declarations: [ContextMenuDirective],
|
|
10168
|
+
exports: [ContextMenuDirective],
|
|
10169
|
+
imports: [
|
|
10170
|
+
CommonModule,
|
|
10171
|
+
DynamicComponentModule
|
|
10172
|
+
]
|
|
10173
|
+
}]
|
|
10174
|
+
}] });
|
|
10175
|
+
|
|
9734
10176
|
class TableModule {
|
|
9735
10177
|
}
|
|
9736
10178
|
TableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -9769,7 +10211,8 @@ TableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "1
|
|
|
9769
10211
|
ToolbarModule,
|
|
9770
10212
|
ClickOutsideModule,
|
|
9771
10213
|
ResizeDragModule,
|
|
9772
|
-
ScrollingModule
|
|
10214
|
+
ScrollingModule,
|
|
10215
|
+
ContextMenuModule], exports: [TableComponent,
|
|
9773
10216
|
NumericCellComponent,
|
|
9774
10217
|
ListCellComponent,
|
|
9775
10218
|
DateCellComponent,
|
|
@@ -9801,6 +10244,7 @@ TableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "1
|
|
|
9801
10244
|
ClickOutsideModule,
|
|
9802
10245
|
ResizeDragModule,
|
|
9803
10246
|
ScrollingModule,
|
|
10247
|
+
ContextMenuModule,
|
|
9804
10248
|
]] });
|
|
9805
10249
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableModule, decorators: [{
|
|
9806
10250
|
type: NgModule,
|
|
@@ -9860,6 +10304,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9860
10304
|
ClickOutsideModule,
|
|
9861
10305
|
ResizeDragModule,
|
|
9862
10306
|
ScrollingModule,
|
|
10307
|
+
ContextMenuModule,
|
|
9863
10308
|
],
|
|
9864
10309
|
}]
|
|
9865
10310
|
}] });
|
|
@@ -10200,129 +10645,6 @@ class Chart3dOptions {
|
|
|
10200
10645
|
|
|
10201
10646
|
/* accordion */
|
|
10202
10647
|
|
|
10203
|
-
class ClickService {
|
|
10204
|
-
constructor(_document) {
|
|
10205
|
-
this._document = _document;
|
|
10206
|
-
this.click = fromEvent(this._document, 'click');
|
|
10207
|
-
this.contextMenu = fromEvent(this._document, 'contextmenu');
|
|
10208
|
-
}
|
|
10209
|
-
}
|
|
10210
|
-
ClickService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ClickService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
10211
|
-
ClickService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ClickService, providedIn: 'root' });
|
|
10212
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ClickService, decorators: [{
|
|
10213
|
-
type: Injectable,
|
|
10214
|
-
args: [{
|
|
10215
|
-
providedIn: 'root',
|
|
10216
|
-
}]
|
|
10217
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
10218
|
-
type: Inject,
|
|
10219
|
-
args: [DOCUMENT]
|
|
10220
|
-
}] }]; } });
|
|
10221
|
-
|
|
10222
|
-
class ContextMenuDirective extends DynamicContentBaseDirective {
|
|
10223
|
-
constructor(_document, _elementRef, _service, _injector, _zone, _cdr, _click) {
|
|
10224
|
-
super(_document, _elementRef, _service, _injector, _zone, _cdr);
|
|
10225
|
-
this._document = _document;
|
|
10226
|
-
this._elementRef = _elementRef;
|
|
10227
|
-
this._service = _service;
|
|
10228
|
-
this._injector = _injector;
|
|
10229
|
-
this._zone = _zone;
|
|
10230
|
-
this._cdr = _cdr;
|
|
10231
|
-
this._click = _click;
|
|
10232
|
-
}
|
|
10233
|
-
get _dynamicContent() {
|
|
10234
|
-
return this.tetaContextMenu;
|
|
10235
|
-
}
|
|
10236
|
-
showContent(event) {
|
|
10237
|
-
event.preventDefault();
|
|
10238
|
-
setTimeout(() => {
|
|
10239
|
-
this.createMenu(event);
|
|
10240
|
-
});
|
|
10241
|
-
}
|
|
10242
|
-
click(event) {
|
|
10243
|
-
if (this._componentRef &&
|
|
10244
|
-
DomUtil.clickedInside(this._componentRef.location.nativeElement, event)) {
|
|
10245
|
-
event.preventDefault();
|
|
10246
|
-
event.stopPropagation();
|
|
10247
|
-
}
|
|
10248
|
-
}
|
|
10249
|
-
ngOnInit() {
|
|
10250
|
-
super.ngOnInit();
|
|
10251
|
-
merge(this._click.click, this._click.contextMenu)
|
|
10252
|
-
.pipe(takeWhile(() => this._alive), filter(() => this._open), filter(() => this._componentRef != null), filter((event) => !DomUtil.clickedInside(this._componentRef.location.nativeElement, event)), tap((_) => {
|
|
10253
|
-
this.destroyContentRef();
|
|
10254
|
-
this.openChange.emit(false);
|
|
10255
|
-
}))
|
|
10256
|
-
.subscribe();
|
|
10257
|
-
}
|
|
10258
|
-
ngOnDestroy() {
|
|
10259
|
-
super.ngOnDestroy();
|
|
10260
|
-
}
|
|
10261
|
-
setPosition() {
|
|
10262
|
-
if (this._componentRef && this._open) {
|
|
10263
|
-
const position = PositionUtil.getPosition({
|
|
10264
|
-
top: this._eventPoint.y,
|
|
10265
|
-
bottom: this._eventPoint.y,
|
|
10266
|
-
left: this._eventPoint.x,
|
|
10267
|
-
right: this._eventPoint.x,
|
|
10268
|
-
}, this._componentRef.location.nativeElement.getBoundingClientRect(), this.align, this.verticalAlign);
|
|
10269
|
-
PositionUtil.setElementPosition(this._componentRef.location.nativeElement, position);
|
|
10270
|
-
}
|
|
10271
|
-
}
|
|
10272
|
-
createMenu(event) {
|
|
10273
|
-
if (this.tetaContextMenu == null) {
|
|
10274
|
-
return;
|
|
10275
|
-
}
|
|
10276
|
-
this._eventPoint = event;
|
|
10277
|
-
this._componentRef = this.createContentRef();
|
|
10278
|
-
this._componentRef.instance.className = [
|
|
10279
|
-
...ArrayUtil.asArray(this.className),
|
|
10280
|
-
'context-menu',
|
|
10281
|
-
];
|
|
10282
|
-
this.openChange.emit(true);
|
|
10283
|
-
}
|
|
10284
|
-
}
|
|
10285
|
-
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 });
|
|
10286
|
-
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 });
|
|
10287
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuDirective, decorators: [{
|
|
10288
|
-
type: Directive,
|
|
10289
|
-
args: [{
|
|
10290
|
-
selector: '[tetaContextMenu]',
|
|
10291
|
-
}]
|
|
10292
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
10293
|
-
type: Inject,
|
|
10294
|
-
args: [DOCUMENT]
|
|
10295
|
-
}] }, { type: i0.ElementRef }, { type: DynamicComponentService }, { type: i0.Injector }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: ClickService }]; }, propDecorators: { tetaContextMenu: [{
|
|
10296
|
-
type: Input
|
|
10297
|
-
}], showContent: [{
|
|
10298
|
-
type: HostListener,
|
|
10299
|
-
args: ['contextmenu', ['$event']]
|
|
10300
|
-
}], click: [{
|
|
10301
|
-
type: HostListener,
|
|
10302
|
-
args: ['click', ['$event']]
|
|
10303
|
-
}] } });
|
|
10304
|
-
|
|
10305
|
-
class ContextMenuModule {
|
|
10306
|
-
}
|
|
10307
|
-
ContextMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
10308
|
-
ContextMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, declarations: [ContextMenuDirective], imports: [CommonModule,
|
|
10309
|
-
DynamicComponentModule], exports: [ContextMenuDirective] });
|
|
10310
|
-
ContextMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, imports: [[
|
|
10311
|
-
CommonModule,
|
|
10312
|
-
DynamicComponentModule
|
|
10313
|
-
]] });
|
|
10314
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, decorators: [{
|
|
10315
|
-
type: NgModule,
|
|
10316
|
-
args: [{
|
|
10317
|
-
declarations: [ContextMenuDirective],
|
|
10318
|
-
exports: [ContextMenuDirective],
|
|
10319
|
-
imports: [
|
|
10320
|
-
CommonModule,
|
|
10321
|
-
DynamicComponentModule
|
|
10322
|
-
]
|
|
10323
|
-
}]
|
|
10324
|
-
}] });
|
|
10325
|
-
|
|
10326
10648
|
class DisableControlDirective {
|
|
10327
10649
|
constructor(ngControl) {
|
|
10328
10650
|
this.ngControl = ngControl;
|
|
@@ -10338,14 +10660,14 @@ class DisableControlDirective {
|
|
|
10338
10660
|
}
|
|
10339
10661
|
}
|
|
10340
10662
|
}
|
|
10341
|
-
DisableControlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DisableControlDirective, deps: [{ token: i3.NgControl }], target: i0.ɵɵFactoryTarget.Directive });
|
|
10663
|
+
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 });
|
|
10342
10664
|
DisableControlDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.1", type: DisableControlDirective, selector: "[tetaDisableControl]", inputs: { tetaDisableControl: "tetaDisableControl" }, ngImport: i0 });
|
|
10343
10665
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DisableControlDirective, decorators: [{
|
|
10344
10666
|
type: Directive,
|
|
10345
10667
|
args: [{
|
|
10346
10668
|
selector: '[tetaDisableControl]'
|
|
10347
10669
|
}]
|
|
10348
|
-
}], ctorParameters: function () { return [{ type: i3.NgControl }]; }, propDecorators: { tetaDisableControl: [{
|
|
10670
|
+
}], ctorParameters: function () { return [{ type: i3$1.NgControl }]; }, propDecorators: { tetaDisableControl: [{
|
|
10349
10671
|
type: Input
|
|
10350
10672
|
}] } });
|
|
10351
10673
|
|
|
@@ -10778,7 +11100,7 @@ class ResizePanelComponent {
|
|
|
10778
11100
|
}
|
|
10779
11101
|
}
|
|
10780
11102
|
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 });
|
|
10781
|
-
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:
|
|
11103
|
+
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 });
|
|
10782
11104
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ResizePanelComponent, decorators: [{
|
|
10783
11105
|
type: Component,
|
|
10784
11106
|
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: [""] }]
|
|
@@ -10972,12 +11294,62 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
10972
11294
|
args: [DOCUMENT]
|
|
10973
11295
|
}] }]; } });
|
|
10974
11296
|
|
|
10975
|
-
|
|
10976
|
-
|
|
10977
|
-
|
|
10978
|
-
|
|
10979
|
-
|
|
10980
|
-
|
|
11297
|
+
const ruLocale = {
|
|
11298
|
+
apply: 'Применить',
|
|
11299
|
+
cancel: 'Отменить',
|
|
11300
|
+
clear: 'Очистить',
|
|
11301
|
+
pin: 'Закрепить',
|
|
11302
|
+
unpin: 'Открепить',
|
|
11303
|
+
sortAsc: 'Сортировать по возрастанию',
|
|
11304
|
+
sortDesc: 'Сортировать по убыванию',
|
|
11305
|
+
clearSort: 'Сбросить сортировку',
|
|
11306
|
+
clearAllSort: 'Сбросить все сортировки',
|
|
11307
|
+
clearFilter: 'Очистить фильтр',
|
|
11308
|
+
clearAllFilters: 'Очистить все фильтры',
|
|
11309
|
+
autosizeColumn: 'Авторазмер колонки',
|
|
11310
|
+
autosizeAll: 'Авторазмер всех колонок',
|
|
11311
|
+
resetColumnsSize: 'Восстановить размер колонок',
|
|
11312
|
+
from: 'От',
|
|
11313
|
+
to: 'До',
|
|
11314
|
+
all: 'Все',
|
|
11315
|
+
min: 'Мин',
|
|
11316
|
+
max: 'Макс',
|
|
11317
|
+
sum: 'Сумма',
|
|
11318
|
+
avg: 'Средн',
|
|
11319
|
+
search: 'Поиск',
|
|
11320
|
+
months: [
|
|
11321
|
+
'Январь',
|
|
11322
|
+
'Февраль',
|
|
11323
|
+
'Март',
|
|
11324
|
+
'Апрель',
|
|
11325
|
+
'Май',
|
|
11326
|
+
'Июнь',
|
|
11327
|
+
'Июль',
|
|
11328
|
+
'Август',
|
|
11329
|
+
'Сентябрь',
|
|
11330
|
+
'Октябрь',
|
|
11331
|
+
'Ноябрь',
|
|
11332
|
+
'Декабрь'
|
|
11333
|
+
],
|
|
11334
|
+
days: [
|
|
11335
|
+
'Воскресенье',
|
|
11336
|
+
'Понедельник',
|
|
11337
|
+
'Вторник',
|
|
11338
|
+
'Среда',
|
|
11339
|
+
'Четверг',
|
|
11340
|
+
'Пятниуа',
|
|
11341
|
+
'Суббота'
|
|
11342
|
+
],
|
|
11343
|
+
daysShort: [
|
|
11344
|
+
'Вс',
|
|
11345
|
+
'Пн',
|
|
11346
|
+
'Вт',
|
|
11347
|
+
'Ср',
|
|
11348
|
+
'Чт',
|
|
11349
|
+
'Пт',
|
|
11350
|
+
'Сб'
|
|
11351
|
+
]
|
|
11352
|
+
};
|
|
10981
11353
|
|
|
10982
11354
|
/**
|
|
10983
11355
|
* Components
|
|
@@ -10987,5 +11359,5 @@ class StringUtil {
|
|
|
10987
11359
|
* Generated bundle index. Do not edit.
|
|
10988
11360
|
*/
|
|
10989
11361
|
|
|
10990
|
-
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,
|
|
11362
|
+
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 };
|
|
10991
11363
|
//# sourceMappingURL=tetacom-ng-components.mjs.map
|