@tetacom/ng-components 1.0.33 → 1.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/contract/i-id.d.ts +3 -0
- package/common/contract/public-api.d.ts +1 -0
- package/component/chart-3d/chart3d/chart3d.component.d.ts +1 -0
- package/component/chart-3d/model/chart-3d-options.d.ts +1 -0
- package/component/date-picker/date-picker/date-picker.component.d.ts +9 -6
- package/component/date-picker/day-select/day-select.component.d.ts +5 -5
- package/component/date-picker/month-picker/month-picker.component.d.ts +5 -5
- package/component/date-picker/month-select/month-select.component.d.ts +2 -2
- package/component/dropdown/dropdown-base.d.ts +3 -2
- package/component/filter/base/filter-component-base.d.ts +3 -1
- package/component/filter/boolean-filter/boolean-filter.component.d.ts +5 -3
- package/component/filter/date-filter/date-filter.component.d.ts +11 -4
- package/component/filter/filter-host/filter-host.component.d.ts +6 -3
- package/component/filter/filter.module.d.ts +15 -16
- package/component/filter/list-filter/list-filter.component.d.ts +11 -4
- package/component/filter/numeric-filter/numeric-filter.component.d.ts +11 -4
- package/component/filter/public-api.d.ts +0 -1
- package/component/filter/string-filter/string-filter.component.d.ts +11 -4
- package/component/input/text-field/text-field.component.d.ts +2 -2
- package/component/select/select/select.component.d.ts +1 -1
- package/component/table/base/cell-component-base.d.ts +3 -1
- package/component/table/base/head-cell-component-base.d.ts +5 -3
- package/component/table/contract/i-cell-coordinates.d.ts +3 -5
- package/component/table/contract/i-cell-event.d.ts +1 -1
- package/component/table/contract/i-cell-instance.d.ts +12 -0
- package/component/table/contract/i-cell-value.d.ts +1 -2
- package/component/table/contract/public-api.d.ts +1 -1
- package/component/table/contract/table-column.d.ts +3 -3
- package/component/table/default/boolean-cell/boolean-cell.component.d.ts +1 -1
- package/component/table/default/date-cell/date-cell.component.d.ts +1 -1
- package/component/table/default/date-time-cell/date-time-cell.component.d.ts +1 -1
- package/component/table/default/default-head-cell/default-head-cell.component.d.ts +7 -3
- package/component/table/default/list-cell/list-cell.component.d.ts +1 -1
- package/component/table/default/numeric-cell/numeric-cell.component.d.ts +1 -1
- package/component/table/default/string-cell/string-cell.component.d.ts +1 -1
- package/component/table/enum/edit-type.enum.d.ts +3 -2
- package/component/table/head-cell/head-cell.component.d.ts +3 -2
- package/component/table/head-cell-dropdown/head-cell-dropdown.component.d.ts +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/chart-3d/chart3d/chart3d.component.mjs +64 -57
- package/esm2020/component/chart-3d/model/chart-3d-options.mjs +1 -1
- package/esm2020/component/checkbox/checkbox/checkbox.component.mjs +3 -3
- package/esm2020/component/date-picker/date-picker/date-picker.component.mjs +17 -8
- package/esm2020/component/date-picker/day-select/day-select.component.mjs +10 -8
- package/esm2020/component/date-picker/month-picker/month-picker.component.mjs +10 -8
- package/esm2020/component/date-picker/month-select/month-select.component.mjs +5 -4
- package/esm2020/component/dropdown/dropdown-base.mjs +14 -6
- package/esm2020/component/filter/base/filter-base.mjs +4 -3
- package/esm2020/component/filter/base/filter-component-base.mjs +1 -1
- package/esm2020/component/filter/boolean-filter/boolean-filter.component.mjs +4 -2
- package/esm2020/component/filter/contarct/filter-item.mjs +4 -3
- package/esm2020/component/filter/contarct/sort-param.mjs +3 -2
- package/esm2020/component/filter/date-filter/date-filter.component.mjs +15 -9
- package/esm2020/component/filter/filter-host/filter-host.component.mjs +12 -2
- package/esm2020/component/filter/filter.module.mjs +3 -8
- package/esm2020/component/filter/list-filter/list-filter.component.mjs +20 -12
- package/esm2020/component/filter/numeric-filter/numeric-filter.component.mjs +15 -9
- package/esm2020/component/filter/public-api.mjs +1 -2
- package/esm2020/component/filter/string-filter/string-filter.component.mjs +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/date-util.mjs +41 -1
- package/esm2020/util/string-util.mjs +5 -1
- package/fesm2015/tetacom-ng-components.mjs +1180 -774
- package/fesm2015/tetacom-ng-components.mjs.map +1 -1
- package/fesm2020/tetacom-ng-components.mjs +1177 -758
- 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 +43 -45
- package/style/tabs.scss +2 -2
- package/style/toolbar.scss +3 -6
- package/style/tree.scss +2 -2
- package/util/date-util.d.ts +1 -0
- package/util/string-util.d.ts +1 -0
- package/component/date-picker/model/picker-locale-model.d.ts +0 -16
- package/component/date-picker/service/picker-locale.service.d.ts +0 -11
- package/component/filter/filter-panel/filter-panel.component.d.ts +0 -8
- package/component/table/contract/table-context-menu-config.d.ts +0 -14
- package/esm2020/component/date-picker/model/picker-locale-model.mjs +0 -13
- package/esm2020/component/date-picker/service/picker-locale.service.mjs +0 -30
- package/esm2020/component/filter/filter-panel/filter-panel.component.mjs +0 -13
- package/esm2020/component/table/contract/table-context-menu-config.mjs +0 -17
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Component, ChangeDetectionStrategy, HostBinding, Directive, Optional, Inject, ContentChild, Input, Host, HostListener, Injectable, NgModule, forwardRef, EventEmitter, ElementRef, Output, Pipe, ViewChild, ViewEncapsulation, ChangeDetectorRef, TemplateRef, Injector, ContentChildren } from '@angular/core';
|
|
3
|
-
import * as
|
|
3
|
+
import * as i3 from '@angular/common';
|
|
4
4
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1 from '@angular/common/http';
|
|
6
6
|
import { HttpClient, HttpClientModule } from '@angular/common/http';
|
|
7
7
|
import { map, takeWhile, throttleTime, bufferCount, tap, withLatestFrom, filter } from 'rxjs/operators';
|
|
8
|
-
import * as i3 from '@angular/forms';
|
|
8
|
+
import * as i3$1 from '@angular/forms';
|
|
9
9
|
import { NG_VALUE_ACCESSOR, FormsModule, FormControl, FormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
|
10
|
-
import { BehaviorSubject, Subject, fromEvent, ReplaySubject, combineLatest,
|
|
10
|
+
import { BehaviorSubject, Subject, fromEvent, ReplaySubject, combineLatest, merge } from 'rxjs';
|
|
11
11
|
import { trigger, transition, style, animate } from '@angular/animations';
|
|
12
12
|
import * as i4 from '@angular/cdk/scrolling';
|
|
13
13
|
import { ScrollingModule, CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
|
|
14
14
|
import * as i1$1 from '@ngneat/transloco';
|
|
15
15
|
import { TranslocoModule, TRANSLOCO_SCOPE } from '@ngneat/transloco';
|
|
16
|
-
import { __awaiter } from 'tslib';
|
|
17
16
|
import * as hash from 'object-hash';
|
|
18
17
|
import hash__default from 'object-hash';
|
|
18
|
+
import { __awaiter } from 'tslib';
|
|
19
19
|
import * as THREE from 'three';
|
|
20
20
|
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
|
|
21
21
|
import * as d3 from 'd3';
|
|
@@ -64,7 +64,7 @@ class AccordionItemComponent {
|
|
|
64
64
|
ngOnInit() { }
|
|
65
65
|
}
|
|
66
66
|
AccordionItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: AccordionItemComponent, deps: [{ token: AccordionComponent, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
67
|
-
AccordionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: AccordionItemComponent, selector: "teta-accordion-item", inputs: { open: "open", disabled: "disabled" }, host: { properties: { "class.accordion-item_active": "this.open", "class.accordion-item": "this.accordionItemClass" } }, queries: [{ propertyName: "content", first: true, predicate: AccordionContentDirective, descendants: true }], ngImport: i0, template: "<ng-content select=\"teta-accordion-head\"></ng-content>\n<div class=\"accordion-content\" *ngIf=\"open\">\n <ng-container *ngTemplateOutlet=\"content.template\"></ng-container>\n</div>\n", styles: [""], directives: [{ type:
|
|
67
|
+
AccordionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: AccordionItemComponent, selector: "teta-accordion-item", inputs: { open: "open", disabled: "disabled" }, host: { properties: { "class.accordion-item_active": "this.open", "class.accordion-item": "this.accordionItemClass" } }, queries: [{ propertyName: "content", first: true, predicate: AccordionContentDirective, descendants: true }], ngImport: i0, template: "<ng-content select=\"teta-accordion-head\"></ng-content>\n<div class=\"accordion-content\" *ngIf=\"open\">\n <ng-container *ngTemplateOutlet=\"content.template\"></ng-container>\n</div>\n", styles: [""], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
68
68
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: AccordionItemComponent, decorators: [{
|
|
69
69
|
type: Component,
|
|
70
70
|
args: [{ selector: 'teta-accordion-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"teta-accordion-head\"></ng-content>\n<div class=\"accordion-content\" *ngIf=\"open\">\n <ng-container *ngTemplateOutlet=\"content.template\"></ng-container>\n</div>\n", styles: [""] }]
|
|
@@ -154,7 +154,7 @@ class AccordionHeadComponent {
|
|
|
154
154
|
ngOnInit() { }
|
|
155
155
|
}
|
|
156
156
|
AccordionHeadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: AccordionHeadComponent, deps: [{ token: AccordionItemComponent, host: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
157
|
-
AccordionHeadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: AccordionHeadComponent, selector: "teta-accordion-head", inputs: { showToggle: "showToggle" }, host: { listeners: { "click": "toggle()" }, properties: { "class.accordion-head": "this.accordionHeadClass", "class.accordion-head_open": "this.open", "class.accordion-head_disabled": "this.disabled" } }, ngImport: i0, template: "<ng-content></ng-content>\n<div *ngIf=\"showToggle\" class=\"accordion-toggle\">\n <teta-icon [name]=\"open ? 'arrowUpKey' : 'arrowDownKey'\"\n [palette]=\"'text'\"></teta-icon>\n</div>\n\n", styles: [""], components: [{ type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], directives: [{ type:
|
|
157
|
+
AccordionHeadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: AccordionHeadComponent, selector: "teta-accordion-head", inputs: { showToggle: "showToggle" }, host: { listeners: { "click": "toggle()" }, properties: { "class.accordion-head": "this.accordionHeadClass", "class.accordion-head_open": "this.open", "class.accordion-head_disabled": "this.disabled" } }, ngImport: i0, template: "<ng-content></ng-content>\n<div *ngIf=\"showToggle\" class=\"accordion-toggle\">\n <teta-icon [name]=\"open ? 'arrowUpKey' : 'arrowDownKey'\"\n [palette]=\"'text'\"></teta-icon>\n</div>\n\n", styles: [""], components: [{ type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
158
158
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: AccordionHeadComponent, decorators: [{
|
|
159
159
|
type: Component,
|
|
160
160
|
args: [{ selector: 'teta-accordion-head', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n<div *ngIf=\"showToggle\" class=\"accordion-toggle\">\n <teta-icon [name]=\"open ? 'arrowUpKey' : 'arrowDownKey'\"\n [palette]=\"'text'\"></teta-icon>\n</div>\n\n", styles: [""] }]
|
|
@@ -471,10 +471,10 @@ class CheckboxComponent {
|
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
473
|
CheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: CheckboxComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
474
|
-
CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: CheckboxComponent, selector: "teta-checkbox", inputs: { class: "class", palette: "palette", noLabel: "noLabel", disabled: "disabled", value: "value", binary: "binary", allowNull: "allowNull" }, host: { listeners: { "click": "changeValue()" }, properties: { "attr.tabindex": "this.tabindex", "class": "this.getClass", "class.checkbox_disabled": "this.disabled" } }, providers: [CHECKBOX_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<div class=\"checkbox__tick\">\n <teta-icon [name]=\"checked ? 'tick' : checked === false ? '' : 'minus'\"></teta-icon>\n</div>\n<span class=\"font-body-3
|
|
474
|
+
CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: CheckboxComponent, selector: "teta-checkbox", inputs: { class: "class", palette: "palette", noLabel: "noLabel", disabled: "disabled", value: "value", binary: "binary", allowNull: "allowNull" }, host: { listeners: { "click": "changeValue()" }, properties: { "attr.tabindex": "this.tabindex", "class": "this.getClass", "class.checkbox_disabled": "this.disabled" } }, providers: [CHECKBOX_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<div class=\"checkbox__tick\" [class.checkbox__tick_active]=\"checked != false\">\n <teta-icon [name]=\"checked ? 'tick' : checked === false ? '' : 'minus'\"></teta-icon>\n</div>\n<span class=\"font-body-3\" *ngIf=\"!noLabel\">\n <ng-content></ng-content>\n</span>\n", styles: [""], components: [{ type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
475
475
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
476
476
|
type: Component,
|
|
477
|
-
args: [{ selector: 'teta-checkbox', providers: [CHECKBOX_CONTROL_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"checkbox__tick\">\n <teta-icon [name]=\"checked ? 'tick' : checked === false ? '' : 'minus'\"></teta-icon>\n</div>\n<span class=\"font-body-3
|
|
477
|
+
args: [{ selector: 'teta-checkbox', providers: [CHECKBOX_CONTROL_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"checkbox__tick\" [class.checkbox__tick_active]=\"checked != false\">\n <teta-icon [name]=\"checked ? 'tick' : checked === false ? '' : 'minus'\"></teta-icon>\n</div>\n<span class=\"font-body-3\" *ngIf=\"!noLabel\">\n <ng-content></ng-content>\n</span>\n", styles: [""] }]
|
|
478
478
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { tabindex: [{
|
|
479
479
|
type: HostBinding,
|
|
480
480
|
args: ['attr.tabindex']
|
|
@@ -704,6 +704,46 @@ class DateUtil {
|
|
|
704
704
|
static isValidDate(date) {
|
|
705
705
|
return date instanceof Date && !isNaN(date.getTime());
|
|
706
706
|
}
|
|
707
|
+
static millisecondToHumanFormat(milliSeconds, maxValue = 5000, showDays = false) {
|
|
708
|
+
const negative = milliSeconds < 0;
|
|
709
|
+
if (negative) {
|
|
710
|
+
milliSeconds = -milliSeconds;
|
|
711
|
+
}
|
|
712
|
+
let d;
|
|
713
|
+
if (showDays) {
|
|
714
|
+
d = Math.trunc(milliSeconds / (60000 * 60 * 24));
|
|
715
|
+
milliSeconds = milliSeconds - 60000 * 60 * 24 * d;
|
|
716
|
+
}
|
|
717
|
+
const h = Math.trunc(milliSeconds / (60000 * 60));
|
|
718
|
+
milliSeconds = milliSeconds - 60000 * 60 * h;
|
|
719
|
+
const m = Math.trunc(milliSeconds / 60000);
|
|
720
|
+
milliSeconds = milliSeconds - 60000 * m;
|
|
721
|
+
const s = Math.trunc(milliSeconds / 1000);
|
|
722
|
+
milliSeconds = milliSeconds - 1000 * s;
|
|
723
|
+
const frac = milliSeconds;
|
|
724
|
+
let result = m ? m + ' м ' : ''; // start with minutes
|
|
725
|
+
if (maxValue < 60000 * 60) {
|
|
726
|
+
if (s) {
|
|
727
|
+
result = result + s + ' с '; // add seconds value
|
|
728
|
+
}
|
|
729
|
+
if (s === 0 && !m) {
|
|
730
|
+
result = result + '0 c';
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
if (maxValue < 5000) {
|
|
734
|
+
result = frac ? result + frac + ' мс ' : result;
|
|
735
|
+
}
|
|
736
|
+
if (h) {
|
|
737
|
+
result = h + ' ч ' + result;
|
|
738
|
+
}
|
|
739
|
+
if (d) {
|
|
740
|
+
result = d + 'д ' + result;
|
|
741
|
+
}
|
|
742
|
+
if (negative) {
|
|
743
|
+
result = '-' + result;
|
|
744
|
+
}
|
|
745
|
+
return result.trim();
|
|
746
|
+
}
|
|
707
747
|
static fillConvertDates(result, input) {
|
|
708
748
|
for (const key in input) {
|
|
709
749
|
if (!input.hasOwnProperty || !input.hasOwnProperty(key)) {
|
|
@@ -928,39 +968,81 @@ var VerticalAlign;
|
|
|
928
968
|
VerticalAlign[VerticalAlign["auto"] = 3] = "auto";
|
|
929
969
|
})(VerticalAlign || (VerticalAlign = {}));
|
|
930
970
|
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
971
|
+
const enLocale = {
|
|
972
|
+
apply: 'Apply',
|
|
973
|
+
cancel: 'Cancel',
|
|
974
|
+
clear: 'Clear',
|
|
975
|
+
pin: 'Pin',
|
|
976
|
+
unpin: 'Unpin',
|
|
977
|
+
sortAsc: 'Sort asc',
|
|
978
|
+
sortDesc: 'Sort desc',
|
|
979
|
+
clearSort: 'Clear sort',
|
|
980
|
+
clearAllSort: 'Clear all sort',
|
|
981
|
+
clearFilter: 'Clear filter',
|
|
982
|
+
clearAllFilters: 'Clear all filters',
|
|
983
|
+
autosizeColumn: 'Autosize column',
|
|
984
|
+
autosizeAll: 'Autosize all columns',
|
|
985
|
+
resetColumnsSize: 'Reset columns size',
|
|
986
|
+
from: 'From',
|
|
987
|
+
to: 'To',
|
|
988
|
+
all: 'All',
|
|
989
|
+
min: 'Min',
|
|
990
|
+
max: 'Max',
|
|
991
|
+
sum: 'Sum',
|
|
992
|
+
avg: 'Avg',
|
|
993
|
+
search: 'Search',
|
|
994
|
+
months: [
|
|
995
|
+
'January',
|
|
996
|
+
'February',
|
|
997
|
+
'March',
|
|
998
|
+
'April',
|
|
999
|
+
'May',
|
|
1000
|
+
'June',
|
|
1001
|
+
'July',
|
|
1002
|
+
'August',
|
|
1003
|
+
'September',
|
|
1004
|
+
'October',
|
|
1005
|
+
'November',
|
|
1006
|
+
'December'
|
|
1007
|
+
],
|
|
1008
|
+
days: [
|
|
1009
|
+
'Sunday',
|
|
1010
|
+
'Monday',
|
|
1011
|
+
'Tuesday',
|
|
1012
|
+
'Wednesday',
|
|
1013
|
+
'Thursday',
|
|
1014
|
+
'Friday',
|
|
1015
|
+
'Saturday'
|
|
1016
|
+
],
|
|
1017
|
+
daysShort: [
|
|
1018
|
+
'Su',
|
|
1019
|
+
'Mo',
|
|
1020
|
+
'Tu',
|
|
1021
|
+
'We',
|
|
1022
|
+
'Th',
|
|
1023
|
+
'Fr',
|
|
1024
|
+
'Sa'
|
|
1025
|
+
]
|
|
1026
|
+
};
|
|
943
1027
|
|
|
944
|
-
class
|
|
1028
|
+
class TetaConfigService {
|
|
945
1029
|
constructor() {
|
|
946
|
-
this.
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
dayNamesMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
950
|
-
monthNames: ['January', 'February', 'March', 'April', 'May', 'June',
|
|
951
|
-
'July', 'August', 'September', 'October', 'November', 'December'],
|
|
952
|
-
monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
953
|
-
today: 'Today'
|
|
954
|
-
});
|
|
955
|
-
this.locale = new BehaviorSubject(this._defaults);
|
|
1030
|
+
this.defaultLocale = enLocale;
|
|
1031
|
+
this.locale$ = new BehaviorSubject(this.defaultLocale);
|
|
1032
|
+
this.locale = this.locale$.asObservable();
|
|
956
1033
|
}
|
|
957
|
-
setLocale(
|
|
958
|
-
|
|
1034
|
+
setLocale(newLocale) {
|
|
1035
|
+
if (newLocale) {
|
|
1036
|
+
this.locale$.next(newLocale);
|
|
1037
|
+
}
|
|
1038
|
+
else {
|
|
1039
|
+
this.locale$.next(this.defaultLocale);
|
|
1040
|
+
}
|
|
959
1041
|
}
|
|
960
1042
|
}
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type:
|
|
1043
|
+
TetaConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TetaConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1044
|
+
TetaConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TetaConfigService, providedIn: 'root' });
|
|
1045
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TetaConfigService, decorators: [{
|
|
964
1046
|
type: Injectable,
|
|
965
1047
|
args: [{
|
|
966
1048
|
providedIn: 'root'
|
|
@@ -1120,11 +1202,12 @@ class DropdownBase {
|
|
|
1120
1202
|
this._renderer = _renderer;
|
|
1121
1203
|
this.align = Align.left;
|
|
1122
1204
|
this.verticalAlign = VerticalAlign.bottom;
|
|
1123
|
-
this.
|
|
1205
|
+
this.backdrop = false;
|
|
1124
1206
|
this.openChange = new EventEmitter();
|
|
1125
1207
|
this.autoClose = true;
|
|
1126
1208
|
this.autoCloseIgnore = ['inside'];
|
|
1127
1209
|
this._body = null;
|
|
1210
|
+
this._backdrop = null;
|
|
1128
1211
|
this._open = false;
|
|
1129
1212
|
this._alive = true;
|
|
1130
1213
|
this._zone.onStable
|
|
@@ -1206,6 +1289,9 @@ class DropdownBase {
|
|
|
1206
1289
|
this._renderer.removeChild(this.container, this._body);
|
|
1207
1290
|
this._open = false;
|
|
1208
1291
|
this._body = null;
|
|
1292
|
+
if (this._backdrop) {
|
|
1293
|
+
this._renderer.removeChild(this._document.body, this._backdrop);
|
|
1294
|
+
}
|
|
1209
1295
|
this.openChange.emit(this.open);
|
|
1210
1296
|
}
|
|
1211
1297
|
}
|
|
@@ -1217,9 +1303,13 @@ class DropdownBase {
|
|
|
1217
1303
|
this.openChange.emit(this.open);
|
|
1218
1304
|
const renderer = this._renderer;
|
|
1219
1305
|
const content = this._content.nativeElement;
|
|
1220
|
-
const container = (this._body =
|
|
1221
|
-
this._body || renderer.createElement('div'));
|
|
1306
|
+
const container = (this._body = this._body || renderer.createElement('div'));
|
|
1222
1307
|
renderer.addClass(container, 'dropdown');
|
|
1308
|
+
if (this.backdrop) {
|
|
1309
|
+
this._backdrop = renderer.createElement('div');
|
|
1310
|
+
renderer.addClass(this._backdrop, 'dropdown-backdrop');
|
|
1311
|
+
renderer.appendChild(this._document.body, this._backdrop);
|
|
1312
|
+
}
|
|
1223
1313
|
if (this.className != null) {
|
|
1224
1314
|
if (this.className instanceof Array && this.className.length > 0) {
|
|
1225
1315
|
this.className.forEach((_) => {
|
|
@@ -1264,7 +1354,7 @@ class DropdownBase {
|
|
|
1264
1354
|
}
|
|
1265
1355
|
}
|
|
1266
1356
|
DropdownBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DropdownBase, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
1267
|
-
DropdownBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.1", type: DropdownBase, inputs: { align: "align", verticalAlign: "verticalAlign", appendToBody: "appendToBody", disabled: "disabled",
|
|
1357
|
+
DropdownBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.1", type: DropdownBase, inputs: { align: "align", verticalAlign: "verticalAlign", appendToBody: "appendToBody", disabled: "disabled", backdrop: "backdrop", className: "className", open: "open", autoClose: "autoClose", autoCloseIgnore: "autoCloseIgnore" }, outputs: { openChange: "openChange" }, host: { listeners: { "click": "click($event)", "document:click": "documentClick($event)", "window:keyup": "keyUp($event)" } }, queries: [{ propertyName: "_head", first: true, predicate: DropdownHeadDirective, descendants: true, read: ElementRef }, { propertyName: "_content", first: true, predicate: DropdownContentDirective, descendants: true }], ngImport: i0 });
|
|
1268
1358
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DropdownBase, decorators: [{
|
|
1269
1359
|
type: Directive
|
|
1270
1360
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: undefined }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { align: [{
|
|
@@ -1275,7 +1365,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
1275
1365
|
type: Input
|
|
1276
1366
|
}], disabled: [{
|
|
1277
1367
|
type: Input
|
|
1278
|
-
}],
|
|
1368
|
+
}], backdrop: [{
|
|
1279
1369
|
type: Input
|
|
1280
1370
|
}], className: [{
|
|
1281
1371
|
type: Input
|
|
@@ -1525,7 +1615,7 @@ class YearSelectComponent {
|
|
|
1525
1615
|
}
|
|
1526
1616
|
}
|
|
1527
1617
|
YearSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: YearSelectComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: PickerTouchService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1528
|
-
YearSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: YearSelectComponent, selector: "teta-year-select", inputs: { currentYear: "currentYear", today: "today", size: "size", minDate: "minDate", maxDate: "maxDate", allowableRange: "allowableRange" }, outputs: { yearSelected: "yearSelected", yearApplied: "yearApplied" }, ngImport: i0, template: "<div class=\"list row_auto margin-top-2\"\n (wheel)=\"scrollYearSelector($event);\">\n <div class=\"list-item list-item_interactive\"\n [class.list-item_active]=\"year === currentYear\"\n [class.list-item_disabled]=\"isYearDisabled(year)\"\n (click)=\"setYear($event, year)\"\n (dblclick)=\"applyYear($event, year)\"\n *ngFor=\"let year of years\">\n {{year}}\n </div>\n</div>\n", styles: [":host{display:flex}\n"], directives: [{ type:
|
|
1618
|
+
YearSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: YearSelectComponent, selector: "teta-year-select", inputs: { currentYear: "currentYear", today: "today", size: "size", minDate: "minDate", maxDate: "maxDate", allowableRange: "allowableRange" }, outputs: { yearSelected: "yearSelected", yearApplied: "yearApplied" }, ngImport: i0, template: "<div class=\"list row_auto margin-top-2\"\n (wheel)=\"scrollYearSelector($event);\">\n <div class=\"list-item list-item_interactive\"\n [class.list-item_active]=\"year === currentYear\"\n [class.list-item_disabled]=\"isYearDisabled(year)\"\n (click)=\"setYear($event, year)\"\n (dblclick)=\"applyYear($event, year)\"\n *ngFor=\"let year of years\">\n {{year}}\n </div>\n</div>\n", styles: [":host{display:flex}\n"], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1529
1619
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: YearSelectComponent, decorators: [{
|
|
1530
1620
|
type: Component,
|
|
1531
1621
|
args: [{ selector: 'teta-year-select', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"list row_auto margin-top-2\"\n (wheel)=\"scrollYearSelector($event);\">\n <div class=\"list-item list-item_interactive\"\n [class.list-item_active]=\"year === currentYear\"\n [class.list-item_disabled]=\"isYearDisabled(year)\"\n (click)=\"setYear($event, year)\"\n (dblclick)=\"applyYear($event, year)\"\n *ngFor=\"let year of years\">\n {{year}}\n </div>\n</div>\n", styles: [":host{display:flex}\n"] }]
|
|
@@ -1652,7 +1742,8 @@ class MonthSelectComponent {
|
|
|
1652
1742
|
}
|
|
1653
1743
|
return new Date(year, month, 1);
|
|
1654
1744
|
}
|
|
1655
|
-
ngOnInit() {
|
|
1745
|
+
ngOnInit() {
|
|
1746
|
+
}
|
|
1656
1747
|
ngOnDestroy() {
|
|
1657
1748
|
this._alive = false;
|
|
1658
1749
|
}
|
|
@@ -1683,10 +1774,10 @@ class MonthSelectComponent {
|
|
|
1683
1774
|
}
|
|
1684
1775
|
}
|
|
1685
1776
|
MonthSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: MonthSelectComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: PickerTouchService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1686
|
-
MonthSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: MonthSelectComponent, selector: "teta-month-select", inputs: { locale: "locale", minDate: "minDate", maxDate: "maxDate", size: "size", currentMonth: "currentMonth", currentYear: "currentYear" }, outputs: { monthSelected: "monthSelected", monthApplied: "monthApplied" }, ngImport: i0, template: "<div class=\"list row_auto margin-top-2\"\n (wheel)=\"scrollMonthSelector($event);\">\n <div *ngFor=\"let month of months\"\n class=\"list-item list-item_interactive\"\n [class.list-item_active]=\"month === _currentMonth\"\n [class.list-item_disabled]=\"isMonthDisabled(month)\"\n [class.datepicker__month__item_current]=\"month === today?.getMonth() && currentYear === today?.getFullYear()\"\n (click)=\"setMonth($event, month)\"\n (dblclick)=\"applyMonth($event, month)\">\n <span class=\"color-text-20 margin-right-2\">\n {{month + 1 | tetaPrependZero: 2}}\n </span>\n {{locale.
|
|
1777
|
+
MonthSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: MonthSelectComponent, selector: "teta-month-select", inputs: { locale: "locale", minDate: "minDate", maxDate: "maxDate", size: "size", currentMonth: "currentMonth", currentYear: "currentYear" }, outputs: { monthSelected: "monthSelected", monthApplied: "monthApplied" }, ngImport: i0, template: "<div class=\"list row_auto margin-top-2\"\n (wheel)=\"scrollMonthSelector($event);\">\n <div *ngFor=\"let month of months\"\n class=\"list-item list-item_interactive\"\n [class.list-item_active]=\"month === _currentMonth\"\n [class.list-item_disabled]=\"isMonthDisabled(month)\"\n [class.datepicker__month__item_current]=\"month === today?.getMonth() && currentYear === today?.getFullYear()\"\n (click)=\"setMonth($event, month)\"\n (dblclick)=\"applyMonth($event, month)\">\n <span class=\"color-text-20 margin-right-2\">\n {{month + 1 | tetaPrependZero: 2}}\n </span>\n {{locale.months[month]}}\n </div>\n</div>\n", styles: [":host{display:flex}\n"], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "tetaPrependZero": PrependZeroPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1687
1778
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: MonthSelectComponent, decorators: [{
|
|
1688
1779
|
type: Component,
|
|
1689
|
-
args: [{ selector: 'teta-month-select', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"list row_auto margin-top-2\"\n (wheel)=\"scrollMonthSelector($event);\">\n <div *ngFor=\"let month of months\"\n class=\"list-item list-item_interactive\"\n [class.list-item_active]=\"month === _currentMonth\"\n [class.list-item_disabled]=\"isMonthDisabled(month)\"\n [class.datepicker__month__item_current]=\"month === today?.getMonth() && currentYear === today?.getFullYear()\"\n (click)=\"setMonth($event, month)\"\n (dblclick)=\"applyMonth($event, month)\">\n <span class=\"color-text-20 margin-right-2\">\n {{month + 1 | tetaPrependZero: 2}}\n </span>\n {{locale.
|
|
1780
|
+
args: [{ selector: 'teta-month-select', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"list row_auto margin-top-2\"\n (wheel)=\"scrollMonthSelector($event);\">\n <div *ngFor=\"let month of months\"\n class=\"list-item list-item_interactive\"\n [class.list-item_active]=\"month === _currentMonth\"\n [class.list-item_disabled]=\"isMonthDisabled(month)\"\n [class.datepicker__month__item_current]=\"month === today?.getMonth() && currentYear === today?.getFullYear()\"\n (click)=\"setMonth($event, month)\"\n (dblclick)=\"applyMonth($event, month)\">\n <span class=\"color-text-20 margin-right-2\">\n {{month + 1 | tetaPrependZero: 2}}\n </span>\n {{locale.months[month]}}\n </div>\n</div>\n", styles: [":host{display:flex}\n"] }]
|
|
1690
1781
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: PickerTouchService }]; }, propDecorators: { locale: [{
|
|
1691
1782
|
type: Input
|
|
1692
1783
|
}], minDate: [{
|
|
@@ -1766,8 +1857,10 @@ class DaySelectComponent {
|
|
|
1766
1857
|
this.currentValue = model ? model : new Date();
|
|
1767
1858
|
this._cdr.markForCheck();
|
|
1768
1859
|
}
|
|
1769
|
-
onChange(_) {
|
|
1770
|
-
|
|
1860
|
+
onChange(_) {
|
|
1861
|
+
}
|
|
1862
|
+
onTouched() {
|
|
1863
|
+
}
|
|
1771
1864
|
registerOnChange(fn) {
|
|
1772
1865
|
this.onChange = fn;
|
|
1773
1866
|
}
|
|
@@ -1833,12 +1926,12 @@ class DaySelectComponent {
|
|
|
1833
1926
|
return false;
|
|
1834
1927
|
}
|
|
1835
1928
|
}
|
|
1836
|
-
DaySelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DaySelectComponent, deps: [{ token:
|
|
1837
|
-
DaySelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: DaySelectComponent, selector: "teta-day-select", inputs: { firstDayOfWeek: "firstDayOfWeek", disabledDates: "disabledDates", disabledPeriods: "disabledPeriods", disabledDays: "disabledDays", minDate: "minDate", maxDate: "maxDate", disabled: "disabled" }, outputs: { dateSelected: "dateSelected", monthSelected: "monthSelected", yearSelected: "yearSelected" }, providers: [DAY_SELECT_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<div class=\"datepicker-week font-caption color-text-80\">\n <div class=\"datepicker-day\"\n [class.font-caption-bold]=\"day === 0 || day === 6\"\n *ngFor=\"let day of weekDays\">\n {{locale.
|
|
1929
|
+
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 });
|
|
1930
|
+
DaySelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: DaySelectComponent, selector: "teta-day-select", inputs: { firstDayOfWeek: "firstDayOfWeek", disabledDates: "disabledDates", disabledPeriods: "disabledPeriods", disabledDays: "disabledDays", minDate: "minDate", maxDate: "maxDate", disabled: "disabled" }, outputs: { dateSelected: "dateSelected", monthSelected: "monthSelected", yearSelected: "yearSelected" }, providers: [DAY_SELECT_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<div class=\"datepicker-week font-caption color-text-80\">\n <div class=\"datepicker-day\"\n [class.font-caption-bold]=\"day === 0 || day === 6\"\n *ngFor=\"let day of weekDays\">\n {{locale.daysShort[day]}}\n </div>\n</div>\n<div class=\"datepicker-picker color-text-90 font-body-3\"\n (wheel)=\"scrollMonth($event)\">\n <div *ngFor=\"let day of days\"\n class=\"datepicker-date\"\n (click)=\"setDate(day, $event);\"\n (dblclick)=\"applyValue(day, $event);\"\n [class.datepicker-date_active]=\"day.selected\"\n [class.datepicker-date_disabled]=\"day.disabled || !day.isCurrentMonth\"\n [class.datepicker-date_weekend]=\"day.weekend\"\n [class.datepicker-date_today]=\"day.today\">\n <ng-container *ngIf=\"day !== null && day !== undefined\">\n {{day.date.getDate()}}\n </ng-container>\n </div>\n</div>\n", styles: [""], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1838
1931
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DaySelectComponent, decorators: [{
|
|
1839
1932
|
type: Component,
|
|
1840
|
-
args: [{ selector: 'teta-day-select', providers: [DAY_SELECT_CONTROL_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"datepicker-week font-caption color-text-80\">\n <div class=\"datepicker-day\"\n [class.font-caption-bold]=\"day === 0 || day === 6\"\n *ngFor=\"let day of weekDays\">\n {{locale.
|
|
1841
|
-
}], ctorParameters: function () { return [{ type:
|
|
1933
|
+
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: [""] }]
|
|
1934
|
+
}], ctorParameters: function () { return [{ type: TetaConfigService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { firstDayOfWeek: [{
|
|
1842
1935
|
type: Input
|
|
1843
1936
|
}], disabledDates: [{
|
|
1844
1937
|
type: Input
|
|
@@ -1941,6 +2034,7 @@ class DatePickerComponent {
|
|
|
1941
2034
|
this.firstDayOfWeek = 1;
|
|
1942
2035
|
this.align = Align.left;
|
|
1943
2036
|
this.verticalAlign = VerticalAlign.auto;
|
|
2037
|
+
this.allowNull = true;
|
|
1944
2038
|
this.showTime = false;
|
|
1945
2039
|
this.classDatepicker = true;
|
|
1946
2040
|
this.tabindex = 0;
|
|
@@ -2109,6 +2203,10 @@ class DatePickerComponent {
|
|
|
2109
2203
|
registerOnTouched(fn) {
|
|
2110
2204
|
this.onTouched = fn;
|
|
2111
2205
|
}
|
|
2206
|
+
setDisabledState(isDisabled) {
|
|
2207
|
+
this.disabled = isDisabled;
|
|
2208
|
+
this._cdr.detectChanges();
|
|
2209
|
+
}
|
|
2112
2210
|
ngOnInit() {
|
|
2113
2211
|
}
|
|
2114
2212
|
ngOnDestroy() {
|
|
@@ -2137,12 +2235,12 @@ class DatePickerComponent {
|
|
|
2137
2235
|
return DateUtil.truncateToDay(new Date());
|
|
2138
2236
|
}
|
|
2139
2237
|
}
|
|
2140
|
-
DatePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DatePickerComponent, deps: [{ token:
|
|
2141
|
-
DatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: DatePickerComponent, selector: "teta-date-picker", inputs: { disabled: "disabled", invalid: "invalid", firstDayOfWeek: "firstDayOfWeek", disabledDates: "disabledDates", disabledPeriods: "disabledPeriods", disabledDays: "disabledDays", minDate: "minDate", maxDate: "maxDate", minYearDate: "minYearDate", maxYearDate: "maxYearDate", align: "align", verticalAlign: "verticalAlign", appendToBody: "appendToBody", showTime: "showTime", format: "format" }, host: { listeners: { "window:keyup": "keyUp($event)" }, properties: { "class.datepicker-wide": "this.showTime", "class.datepicker_open": "this.open", "class.datepicker": "this.classDatepicker", "tabindex": "this.tabindex" } }, providers: [DATE_PICKER_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<teta-dropdown\n class=\"row row_auto\"\n [disabled]=\"disabled\"\n [open]=\"open\"\n [autoCloseIgnore]=\"['esc']\"\n (openChange)=\"openPicker($event)\"\n [align]=\"align\"\n [verticalAlign]=\"verticalAlign\"\n [appendToBody]=\"appendToBody\">\n <div tetaDropdownHead\n class=\"datepicker-head font-body-3\"\n [class.datepicker-head_disabled]=\"disabled\"\n [class.datepicker-head_invalid]=\"invalid\">\n <teta-icon [name]=\"'calendar'\" class=\"margin-right-1\"></teta-icon>\n <div class=\"row_auto\">\n {{currentValue !== null && currentValue !== undefined ? (currentValue | date : format) : ''}}\n </div>\n <teta-icon [name]=\"'closeBig'\"
|
|
2238
|
+
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 });
|
|
2239
|
+
DatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: DatePickerComponent, selector: "teta-date-picker", inputs: { disabled: "disabled", invalid: "invalid", firstDayOfWeek: "firstDayOfWeek", disabledDates: "disabledDates", disabledPeriods: "disabledPeriods", disabledDays: "disabledDays", minDate: "minDate", maxDate: "maxDate", minYearDate: "minYearDate", maxYearDate: "maxYearDate", align: "align", verticalAlign: "verticalAlign", appendToBody: "appendToBody", allowNull: "allowNull", backdrop: "backdrop", showTime: "showTime", format: "format" }, host: { listeners: { "window:keyup": "keyUp($event)" }, properties: { "class.datepicker-wide": "this.showTime", "class.datepicker_open": "this.open", "class.datepicker": "this.classDatepicker", "tabindex": "this.tabindex" } }, providers: [DATE_PICKER_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<teta-dropdown\n class=\"row row_auto\"\n [disabled]=\"disabled\"\n [open]=\"open\"\n [autoCloseIgnore]=\"['esc']\"\n (openChange)=\"openPicker($event)\"\n [align]=\"align\"\n [verticalAlign]=\"verticalAlign\"\n [appendToBody]=\"appendToBody\"\n [backdrop]=\"backdrop\">\n <div tetaDropdownHead\n class=\"datepicker-head font-body-3\"\n [class.datepicker-head_disabled]=\"disabled\"\n [class.datepicker-head_invalid]=\"invalid\">\n <teta-icon [name]=\"'calendar'\" class=\"margin-right-1\"></teta-icon>\n <div class=\"row_auto nowrap\">\n {{currentValue !== null && currentValue !== undefined ? (currentValue | date : format) : ''}}\n </div>\n <teta-icon *ngIf=\"allowNull\"\n [name]=\"'closeBig'\"\n (click)=\"clearPicker($event);\"\n class=\"margin-left-1\"></teta-icon>\n </div>\n <div tetaDropdownContent class=\"scrollable\" (click)=\"$event.preventDefault()\">\n <div class=\"padding-3\">\n <div class=\"row align-center justify-content-between\">\n <div>\n <button teta-button\n [palette]=\"'text'\"\n [view]=\"displayMode===datePickerModeEnum.month ? 'primary' : 'ghost'\"\n (click)=\"setMode(datePickerModeEnum.month)\"\n (wheel)=\"scrollMonth($event);\">\n {{locale.months[internalValue?.getMonth()]}}\n </button>\n <button teta-button\n class=\"margin-left-2\"\n [palette]=\"'text'\"\n [view]=\"displayMode===datePickerModeEnum.year ? 'primary' : 'ghost'\"\n (click)=\"setMode(datePickerModeEnum.year)\"\n (wheel)=\"scrollYear($event);\">\n {{internalValue?.getFullYear()}}\n </button>\n </div>\n <button teta-button\n [palette]=\"'text'\"\n [view]=\"'ghost'\"\n (click)=\"setToday()\">\n <teta-icon [name]=\"'calendar'\"></teta-icon>\n </button>\n </div>\n <div class=\"datepicker-content\">\n <teta-year-select\n *ngIf=\"displayMode === datePickerModeEnum.year\"\n [currentYear]=\"internalValue?.getFullYear()\"\n [today]=\"today\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (yearSelected)=\"setYear($event)\">\n </teta-year-select>\n <teta-month-select\n *ngIf=\"displayMode === datePickerModeEnum.month\"\n [currentMonth]=\"internalValue?.getMonth()\"\n [currentYear]=\"internalValue?.getFullYear()\"\n [locale]=\"locale\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (monthSelected)=\"setMonth($event)\">\n </teta-month-select>\n <teta-day-select\n *ngIf=\"displayMode === datePickerModeEnum.date\"\n [ngModel]=\"currentValue\"\n (ngModelChange)=\"applyValue($event)\"\n (dateSelected)=\"setDate($event)\"\n (yearSelected)=\"setYear($event)\"\n (monthSelected)=\"setMonth($event)\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n [disabledDays]=\"disabledDays\"\n [disabledDates]=\"disabledDates\"\n [disabledPeriods]=\"disabledPeriods\"></teta-day-select>\n </div>\n </div>\n <div *ngIf=\"showTime\" class=\"datepicker-time padding-v-1 border-top border-text-10 font-body-3 color-text-90\">\n <teta-time-part-control [max]=\"23\" [ngModel]=\"internalValue?.getHours()\"\n (ngModelChange)=\"setHour($event)\"></teta-time-part-control>\n :\n <teta-time-part-control [ngModel]=\"internalValue?.getMinutes()\"\n (ngModelChange)=\"setMinute($event)\"></teta-time-part-control>\n :\n <teta-time-part-control [ngModel]=\"internalValue?.getSeconds()\"\n (ngModelChange)=\"setSecond($event)\"></teta-time-part-control>\n </div>\n </div>\n</teta-dropdown>\n", styles: [""], components: [{ type: DropdownComponent, selector: "teta-dropdown" }, { type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }, { type: ButtonComponent, selector: "button[teta-button], teta-button", inputs: ["palette", "class", "view", "square"] }, { type: YearSelectComponent, selector: "teta-year-select", inputs: ["currentYear", "today", "size", "minDate", "maxDate", "allowableRange"], outputs: ["yearSelected", "yearApplied"] }, { type: MonthSelectComponent, selector: "teta-month-select", inputs: ["locale", "minDate", "maxDate", "size", "currentMonth", "currentYear"], outputs: ["monthSelected", "monthApplied"] }, { type: DaySelectComponent, selector: "teta-day-select", inputs: ["firstDayOfWeek", "disabledDates", "disabledPeriods", "disabledDays", "minDate", "maxDate", "disabled"], outputs: ["dateSelected", "monthSelected", "yearSelected"] }, { type: TimePartControlComponent, selector: "teta-time-part-control", inputs: ["min", "max", "disabled"] }], directives: [{ type: DropdownHeadDirective, selector: "[tetaDropdownHead]" }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: DropdownContentDirective, selector: "[tetaDropdownContent]" }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "date": i3.DatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2142
2240
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DatePickerComponent, decorators: [{
|
|
2143
2241
|
type: Component,
|
|
2144
|
-
args: [{ selector: 'teta-date-picker', providers: [DATE_PICKER_CONTROL_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<teta-dropdown\n class=\"row row_auto\"\n [disabled]=\"disabled\"\n [open]=\"open\"\n [autoCloseIgnore]=\"['esc']\"\n (openChange)=\"openPicker($event)\"\n [align]=\"align\"\n [verticalAlign]=\"verticalAlign\"\n [appendToBody]=\"appendToBody\">\n <div tetaDropdownHead\n class=\"datepicker-head font-body-3\"\n [class.datepicker-head_disabled]=\"disabled\"\n [class.datepicker-head_invalid]=\"invalid\">\n <teta-icon [name]=\"'calendar'\" class=\"margin-right-1\"></teta-icon>\n <div class=\"row_auto\">\n {{currentValue !== null && currentValue !== undefined ? (currentValue | date : format) : ''}}\n </div>\n <teta-icon [name]=\"'closeBig'\"
|
|
2145
|
-
}], ctorParameters: function () { return [{ type:
|
|
2242
|
+
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: [""] }]
|
|
2243
|
+
}], ctorParameters: function () { return [{ type: TetaConfigService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { disabled: [{
|
|
2146
2244
|
type: Input
|
|
2147
2245
|
}], invalid: [{
|
|
2148
2246
|
type: Input
|
|
@@ -2168,6 +2266,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
2168
2266
|
type: Input
|
|
2169
2267
|
}], appendToBody: [{
|
|
2170
2268
|
type: Input
|
|
2269
|
+
}], allowNull: [{
|
|
2270
|
+
type: Input
|
|
2271
|
+
}], backdrop: [{
|
|
2272
|
+
type: Input
|
|
2171
2273
|
}], showTime: [{
|
|
2172
2274
|
type: HostBinding,
|
|
2173
2275
|
args: ['class.datepicker-wide']
|
|
@@ -2206,8 +2308,10 @@ class MonthPickerComponent {
|
|
|
2206
2308
|
this.displayMode = DatePickerMode.month;
|
|
2207
2309
|
this._value = null;
|
|
2208
2310
|
this._alive = true;
|
|
2209
|
-
this.onChange = (_) => {
|
|
2210
|
-
|
|
2311
|
+
this.onChange = (_) => {
|
|
2312
|
+
};
|
|
2313
|
+
this.onTouched = () => {
|
|
2314
|
+
};
|
|
2211
2315
|
this.isMinInvalid = (dat) => {
|
|
2212
2316
|
if (!this.minDate || !(this.minDate instanceof Date) || !dat) {
|
|
2213
2317
|
return false;
|
|
@@ -2399,12 +2503,12 @@ class MonthPickerComponent {
|
|
|
2399
2503
|
this.displayMode = result;
|
|
2400
2504
|
}
|
|
2401
2505
|
}
|
|
2402
|
-
MonthPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: MonthPickerComponent, deps: [{ token:
|
|
2403
|
-
MonthPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: MonthPickerComponent, selector: "teta-month-picker", inputs: { disabled: "disabled", minDate: "minDate", maxDate: "maxDate", showToday: "showToday", appendToBody: "appendToBody" }, host: { properties: { "class.datepicker_open": "this.showPicker", "class.datepicker": "this.classDatepicker", "tabindex": "this.tabindex" } }, providers: [MONTH_PICKER_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<teta-dropdown\n class=\"row row_auto\"\n [appendToBody]=\"appendToBody\"\n [(open)]=\"showPicker\"\n [disabled]=\"disabled\">\n <div tetaDropdownHead\n (wheel)=\"scrollMonth($event)\"\n class=\"datepicker-head font-body-3\">\n <teta-icon [name]=\"'calendar'\" class=\"margin-right-2\"></teta-icon>\n <div class=\"row_auto\">\n <ng-container *ngIf=\"_value !==null && _value!==undefined\">\n {{locale.
|
|
2506
|
+
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 });
|
|
2507
|
+
MonthPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: MonthPickerComponent, selector: "teta-month-picker", inputs: { disabled: "disabled", minDate: "minDate", maxDate: "maxDate", showToday: "showToday", appendToBody: "appendToBody" }, host: { properties: { "class.datepicker_open": "this.showPicker", "class.datepicker": "this.classDatepicker", "tabindex": "this.tabindex" } }, providers: [MONTH_PICKER_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<teta-dropdown\n class=\"row row_auto\"\n [appendToBody]=\"appendToBody\"\n [(open)]=\"showPicker\"\n [disabled]=\"disabled\">\n <div tetaDropdownHead\n (wheel)=\"scrollMonth($event)\"\n class=\"datepicker-head font-body-3\">\n <teta-icon [name]=\"'calendar'\" class=\"margin-right-2\"></teta-icon>\n <div class=\"row_auto\">\n <ng-container *ngIf=\"_value !==null && _value!==undefined\">\n {{locale.months[_value.getMonth()]}} {{_value.getFullYear()}}\n </ng-container>\n </div>\n <teta-icon [name]=\"'closeBig'\" (click)=\"clearPicker()\" class=\"margin-left-2\"></teta-icon>\n </div>\n <div tetaDropdownContent class=\"scrollable padding-3\">\n <div class=\"row align-center justify-content-between\">\n <div>\n <button teta-button\n [palette]=\"'text'\"\n [view]=\"displayMode===datePickerModeEnum.month ? 'primary' : 'ghost'\"\n (click)=\"setMode(datePickerModeEnum.month)\"\n (wheel)=\"scrollMonth($event);\">\n {{locale.months[_currentMonth || today.getMonth()]}}\n </button>\n <button teta-button\n class=\"margin-left-2\"\n [palette]=\"'text'\"\n [view]=\"displayMode===datePickerModeEnum.year ? 'primary' : 'ghost'\"\n (click)=\"setMode(datePickerModeEnum.year)\"\n (wheel)=\"scrollYear($event);\">\n {{_currentYear || today.getFullYear()}}\n </button>\n </div>\n <button teta-button\n [palette]=\"'text'\"\n [view]=\"'ghost'\"\n (click)=\"setToday()\">\n <teta-icon [name]=\"'calendar'\"></teta-icon>\n </button>\n </div>\n <div class=\"datepicker-content\">\n <teta-year-select\n *ngIf=\"displayMode === datePickerModeEnum.year\"\n [currentYear]=\"_currentYear\"\n [today]=\"today\"\n [size]=\"8\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (yearSelected)=\"setYear($event)\">\n </teta-year-select>\n <teta-month-select\n *ngIf=\"displayMode === datePickerModeEnum.month\"\n [currentMonth]=\"_currentMonth\"\n [locale]=\"locale\"\n [currentYear]=\"_currentYear\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (monthSelected)=\"setMonth($event)\">\n </teta-month-select>\n </div>\n </div>\n</teta-dropdown>\n", styles: [""], components: [{ type: DropdownComponent, selector: "teta-dropdown" }, { type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }, { type: ButtonComponent, selector: "button[teta-button], teta-button", inputs: ["palette", "class", "view", "square"] }, { type: YearSelectComponent, selector: "teta-year-select", inputs: ["currentYear", "today", "size", "minDate", "maxDate", "allowableRange"], outputs: ["yearSelected", "yearApplied"] }, { type: MonthSelectComponent, selector: "teta-month-select", inputs: ["locale", "minDate", "maxDate", "size", "currentMonth", "currentYear"], outputs: ["monthSelected", "monthApplied"] }], directives: [{ type: DropdownHeadDirective, selector: "[tetaDropdownHead]" }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: DropdownContentDirective, selector: "[tetaDropdownContent]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2404
2508
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: MonthPickerComponent, decorators: [{
|
|
2405
2509
|
type: Component,
|
|
2406
|
-
args: [{ selector: 'teta-month-picker', providers: [MONTH_PICKER_CONTROL_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<teta-dropdown\n class=\"row row_auto\"\n [appendToBody]=\"appendToBody\"\n [(open)]=\"showPicker\"\n [disabled]=\"disabled\">\n <div tetaDropdownHead\n (wheel)=\"scrollMonth($event)\"\n class=\"datepicker-head font-body-3\">\n <teta-icon [name]=\"'calendar'\" class=\"margin-right-2\"></teta-icon>\n <div class=\"row_auto\">\n <ng-container *ngIf=\"_value !==null && _value!==undefined\">\n {{locale.
|
|
2407
|
-
}], ctorParameters: function () { return [{ type:
|
|
2510
|
+
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: [""] }]
|
|
2511
|
+
}], ctorParameters: function () { return [{ type: TetaConfigService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { disabled: [{
|
|
2408
2512
|
type: Input
|
|
2409
2513
|
}], minDate: [{
|
|
2410
2514
|
type: Input
|
|
@@ -2735,14 +2839,14 @@ class OnlyNumberDirective {
|
|
|
2735
2839
|
this._control.control.setValue(valid ? value : (_a = this._previousValue) !== null && _a !== void 0 ? _a : 0);
|
|
2736
2840
|
}
|
|
2737
2841
|
}
|
|
2738
|
-
OnlyNumberDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: OnlyNumberDirective, deps: [{ token: i0.ElementRef }, { token: i3.NgControl }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2842
|
+
OnlyNumberDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: OnlyNumberDirective, deps: [{ token: i0.ElementRef }, { token: i3$1.NgControl }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2739
2843
|
OnlyNumberDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.1", type: OnlyNumberDirective, selector: "[tetaOnlyNumber]", inputs: { tetaOnlyNumber: "tetaOnlyNumber", allowDecimals: "allowDecimals", allowSign: "allowSign", decimalSeparator: "decimalSeparator", commaSeparator: "commaSeparator" }, host: { listeners: { "change": "onChange($event)", "paste": "onPaste($event)", "keydown": "onKeyDown($event)" } }, ngImport: i0 });
|
|
2740
2844
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: OnlyNumberDirective, decorators: [{
|
|
2741
2845
|
type: Directive,
|
|
2742
2846
|
args: [{
|
|
2743
2847
|
selector: '[tetaOnlyNumber]',
|
|
2744
2848
|
}]
|
|
2745
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i3.NgControl }]; }, propDecorators: { tetaOnlyNumber: [{
|
|
2849
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i3$1.NgControl }]; }, propDecorators: { tetaOnlyNumber: [{
|
|
2746
2850
|
type: Input
|
|
2747
2851
|
}], allowDecimals: [{
|
|
2748
2852
|
type: Input
|
|
@@ -3136,7 +3240,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
3136
3240
|
|
|
3137
3241
|
class ToolbarComponent {
|
|
3138
3242
|
get getClass() {
|
|
3139
|
-
const result = [this.class, 'toolbar'
|
|
3243
|
+
const result = [this.class, 'toolbar'];
|
|
3140
3244
|
if (this.palette) {
|
|
3141
3245
|
result.push(`toolbar-${this.palette}`);
|
|
3142
3246
|
}
|
|
@@ -3195,7 +3299,7 @@ class ExpandPanelComponent {
|
|
|
3195
3299
|
}
|
|
3196
3300
|
}
|
|
3197
3301
|
ExpandPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ExpandPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3198
|
-
ExpandPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: ExpandPanelComponent, selector: "teta-expand-panel", inputs: { placeholder: "placeholder", open: "open", cookieName: "cookieName", direction: "direction" }, outputs: { openChange: "openChange" }, queries: [{ propertyName: "content", first: true, predicate: ExpandPanelContentDirective, descendants: true }, { propertyName: "head", first: true, predicate: ExpandPanelHeadDirective, descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"open\">\n <teta-toolbar\n style=\"display: flex\"\n [style.justifyContent]=\"direction === 'right' ? 'space-between' : 'unset'\"\n [style.flexDirection]=\"direction === 'right' ? 'row-reverse' : 'row'\">\n <button\n teta-button\n [square]=\"true\"\n [palette]=\"'text'\"\n [view]=\"'ghost'\"\n (click)=\"closePanel()\"\n >\n <teta-icon [name]=\"direction === 'right' ? 'arrowRight' : 'arrowLeft'\"></teta-icon>\n </button>\n <span class=\"font-title-2\" style=\"display: contents\"><ng-container *ngTemplateOutlet=\"head?.template\"></ng-container></span>\n </teta-toolbar>\n <ng-container *ngTemplateOutlet=\"content?.template\"></ng-container>\n</ng-container>\n<ng-container *ngIf=\"!open\">\n <div class=\"width-10 overflow-hidden\" style=\"height: 100%;\">\n <button\n teta-button\n style=\"\n transform-origin: 0 0;\n transform: rotate(-90deg) translateX(-100%);\n margin: 8px;\n \"\n [palette]=\"'text'\"\n [view]=\"'ghost'\"\n (click)=\"openPanel()\"\n >\n <div class=\"font-button-2 nowrap\">{{ placeholder }}</div>\n <teta-icon [name]=\"direction === 'right' ? 'arrowUp' : 'arrowDown'\"></teta-icon>\n </button>\n </div>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;min-width:0;min-height:0;height:100%}\n"], components: [{ type: ToolbarComponent, selector: "teta-toolbar", inputs: ["palette", "class"] }, { type: ButtonComponent, selector: "button[teta-button], teta-button", inputs: ["palette", "class", "view", "square"] }, { type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], directives: [{ type:
|
|
3302
|
+
ExpandPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: ExpandPanelComponent, selector: "teta-expand-panel", inputs: { placeholder: "placeholder", open: "open", cookieName: "cookieName", direction: "direction" }, outputs: { openChange: "openChange" }, queries: [{ propertyName: "content", first: true, predicate: ExpandPanelContentDirective, descendants: true }, { propertyName: "head", first: true, predicate: ExpandPanelHeadDirective, descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"open\">\n <teta-toolbar\n style=\"display: flex\"\n [style.justifyContent]=\"direction === 'right' ? 'space-between' : 'unset'\"\n [style.flexDirection]=\"direction === 'right' ? 'row-reverse' : 'row'\">\n <button\n teta-button\n [square]=\"true\"\n [palette]=\"'text'\"\n [view]=\"'ghost'\"\n (click)=\"closePanel()\"\n >\n <teta-icon [name]=\"direction === 'right' ? 'arrowRight' : 'arrowLeft'\"></teta-icon>\n </button>\n <span class=\"font-title-2\" style=\"display: contents\"><ng-container *ngTemplateOutlet=\"head?.template\"></ng-container></span>\n </teta-toolbar>\n <ng-container *ngTemplateOutlet=\"content?.template\"></ng-container>\n</ng-container>\n<ng-container *ngIf=\"!open\">\n <div class=\"width-10 overflow-hidden\" style=\"height: 100%;\">\n <button\n teta-button\n style=\"\n transform-origin: 0 0;\n transform: rotate(-90deg) translateX(-100%);\n margin: 8px;\n \"\n [palette]=\"'text'\"\n [view]=\"'ghost'\"\n (click)=\"openPanel()\"\n >\n <div class=\"font-button-2 nowrap\">{{ placeholder }}</div>\n <teta-icon [name]=\"direction === 'right' ? 'arrowUp' : 'arrowDown'\"></teta-icon>\n </button>\n </div>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;min-width:0;min-height:0;height:100%}\n"], components: [{ type: ToolbarComponent, selector: "teta-toolbar", inputs: ["palette", "class"] }, { type: ButtonComponent, selector: "button[teta-button], teta-button", inputs: ["palette", "class", "view", "square"] }, { type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3199
3303
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ExpandPanelComponent, decorators: [{
|
|
3200
3304
|
type: Component,
|
|
3201
3305
|
args: [{ selector: 'teta-expand-panel', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"open\">\n <teta-toolbar\n style=\"display: flex\"\n [style.justifyContent]=\"direction === 'right' ? 'space-between' : 'unset'\"\n [style.flexDirection]=\"direction === 'right' ? 'row-reverse' : 'row'\">\n <button\n teta-button\n [square]=\"true\"\n [palette]=\"'text'\"\n [view]=\"'ghost'\"\n (click)=\"closePanel()\"\n >\n <teta-icon [name]=\"direction === 'right' ? 'arrowRight' : 'arrowLeft'\"></teta-icon>\n </button>\n <span class=\"font-title-2\" style=\"display: contents\"><ng-container *ngTemplateOutlet=\"head?.template\"></ng-container></span>\n </teta-toolbar>\n <ng-container *ngTemplateOutlet=\"content?.template\"></ng-container>\n</ng-container>\n<ng-container *ngIf=\"!open\">\n <div class=\"width-10 overflow-hidden\" style=\"height: 100%;\">\n <button\n teta-button\n style=\"\n transform-origin: 0 0;\n transform: rotate(-90deg) translateX(-100%);\n margin: 8px;\n \"\n [palette]=\"'text'\"\n [view]=\"'ghost'\"\n (click)=\"openPanel()\"\n >\n <div class=\"font-button-2 nowrap\">{{ placeholder }}</div>\n <teta-icon [name]=\"direction === 'right' ? 'arrowUp' : 'arrowDown'\"></teta-icon>\n </button>\n </div>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;min-width:0;min-height:0;height:100%}\n"] }]
|
|
@@ -3375,22 +3479,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
3375
3479
|
}]
|
|
3376
3480
|
}] });
|
|
3377
3481
|
|
|
3378
|
-
class
|
|
3379
|
-
|
|
3380
|
-
|
|
3482
|
+
class StringUtil {
|
|
3483
|
+
static firstLetterToLower(input) {
|
|
3484
|
+
return input.charAt(0).toLocaleLowerCase() + input.slice(1);
|
|
3485
|
+
}
|
|
3486
|
+
;
|
|
3487
|
+
static firstLetterToUpper(input) {
|
|
3488
|
+
return input.charAt(0).toLocaleUpperCase() + input.slice(1);
|
|
3489
|
+
}
|
|
3490
|
+
;
|
|
3381
3491
|
}
|
|
3382
|
-
FilterPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3383
|
-
FilterPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: FilterPanelComponent, selector: "teta-filter-panel", ngImport: i0, template: "<p>filter-panel works!</p>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3384
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterPanelComponent, decorators: [{
|
|
3385
|
-
type: Component,
|
|
3386
|
-
args: [{ selector: 'teta-filter-panel', changeDetection: ChangeDetectionStrategy.OnPush, template: "<p>filter-panel works!</p>\n", styles: [""] }]
|
|
3387
|
-
}], ctorParameters: function () { return []; } });
|
|
3388
3492
|
|
|
3389
3493
|
class FilterBase {
|
|
3390
3494
|
constructor(options) {
|
|
3391
3495
|
if (options) {
|
|
3392
|
-
this.field = options.field;
|
|
3393
|
-
this.name = options.name;
|
|
3496
|
+
this.field = StringUtil.firstLetterToLower(options.field);
|
|
3497
|
+
this.name = StringUtil.firstLetterToLower(options.name);
|
|
3394
3498
|
}
|
|
3395
3499
|
}
|
|
3396
3500
|
}
|
|
@@ -3428,10 +3532,10 @@ class InputComponent {
|
|
|
3428
3532
|
ngOnInit() { }
|
|
3429
3533
|
}
|
|
3430
3534
|
InputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3431
|
-
InputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: InputComponent, selector: "teta-input", inputs: { label: "label", horizontal: "horizontal", required: "required" }, host: { properties: { "class.row": "this.horizontal", "class.column": "this.column" } }, ngImport: i0, template: "<div class=\"font-caption color-text-90 align-center row nowrap overflow-hidden text-overflow-ellipsis\"\n [class.row_6]=\"horizontal\"\n [class.text-field_required]=\"required\"\n *ngIf=\"label?.length > 0\">\n {{label}}\n</div>\n<div class=\"input-container\" [class.row_6]=\"horizontal\">\n <ng-content></ng-content>\n <div class=\"input-message font-error-message\">\n <ng-content select=\"message\"></ng-content>\n </div>\n</div>\n", styles: [":host{display:flex;grid-gap:
|
|
3535
|
+
InputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: InputComponent, selector: "teta-input", inputs: { label: "label", horizontal: "horizontal", required: "required" }, host: { properties: { "class.row": "this.horizontal", "class.column": "this.column" } }, ngImport: i0, template: "<div class=\"font-caption color-text-90 align-center row nowrap overflow-hidden text-overflow-ellipsis\"\n [class.row_6]=\"horizontal\"\n [class.text-field_required]=\"required\"\n *ngIf=\"label?.length > 0\">\n {{label}}\n</div>\n<div class=\"input-container\" [class.row_6]=\"horizontal\">\n <ng-content></ng-content>\n <div class=\"input-message font-error-message\">\n <ng-content select=\"message\"></ng-content>\n </div>\n</div>\n", styles: [":host{display:flex;grid-gap:4px;flex-grow:1;flex-basis:10px}\n"], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3432
3536
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: InputComponent, decorators: [{
|
|
3433
3537
|
type: Component,
|
|
3434
|
-
args: [{ selector: 'teta-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"font-caption color-text-90 align-center row nowrap overflow-hidden text-overflow-ellipsis\"\n [class.row_6]=\"horizontal\"\n [class.text-field_required]=\"required\"\n *ngIf=\"label?.length > 0\">\n {{label}}\n</div>\n<div class=\"input-container\" [class.row_6]=\"horizontal\">\n <ng-content></ng-content>\n <div class=\"input-message font-error-message\">\n <ng-content select=\"message\"></ng-content>\n </div>\n</div>\n", styles: [":host{display:flex;grid-gap:
|
|
3538
|
+
args: [{ selector: 'teta-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"font-caption color-text-90 align-center row nowrap overflow-hidden text-overflow-ellipsis\"\n [class.row_6]=\"horizontal\"\n [class.text-field_required]=\"required\"\n *ngIf=\"label?.length > 0\">\n {{label}}\n</div>\n<div class=\"input-container\" [class.row_6]=\"horizontal\">\n <ng-content></ng-content>\n <div class=\"input-message font-error-message\">\n <ng-content select=\"message\"></ng-content>\n </div>\n</div>\n", styles: [":host{display:flex;grid-gap:4px;flex-grow:1;flex-basis:10px}\n"] }]
|
|
3435
3539
|
}], ctorParameters: function () { return []; }, propDecorators: { label: [{
|
|
3436
3540
|
type: Input
|
|
3437
3541
|
}], horizontal: [{
|
|
@@ -3447,11 +3551,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
3447
3551
|
}] } });
|
|
3448
3552
|
|
|
3449
3553
|
class NumericFilterComponent extends FilterComponentBase {
|
|
3450
|
-
constructor(changeDetector) {
|
|
3554
|
+
constructor(changeDetector, _config) {
|
|
3451
3555
|
super();
|
|
3452
3556
|
this.changeDetector = changeDetector;
|
|
3557
|
+
this._config = _config;
|
|
3453
3558
|
this.filterOptions = [];
|
|
3454
3559
|
this.filterChanged = new EventEmitter();
|
|
3560
|
+
this.locale = this._config.locale;
|
|
3455
3561
|
}
|
|
3456
3562
|
set state(val) {
|
|
3457
3563
|
this.state$ = val;
|
|
@@ -3478,12 +3584,14 @@ class NumericFilterComponent extends FilterComponentBase {
|
|
|
3478
3584
|
return filter;
|
|
3479
3585
|
}
|
|
3480
3586
|
}
|
|
3481
|
-
NumericFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NumericFilterComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3482
|
-
NumericFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: NumericFilterComponent, selector: "teta-numeric-filter", inputs: { column: "column", filterOptions: "filterOptions", state: "state" }, outputs: { filterChanged: "filterChanged" }, usesInheritance: true, ngImport: i0, template: "<div class=\"form-row padding-3\">\n <teta-input [label]=\"
|
|
3587
|
+
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 });
|
|
3588
|
+
NumericFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: NumericFilterComponent, selector: "teta-numeric-filter", inputs: { column: "column", data: "data", filterOptions: "filterOptions", state: "state" }, outputs: { filterChanged: "filterChanged" }, usesInheritance: true, ngImport: i0, template: "<div class=\"form-row padding-3\" *ngIf=\"locale | async as loc\">\n <teta-input [label]=\"loc.from\">\n <input class=\"input\" type=\"text\"\n style=\"width: 110px\"\n [tetaOnlyNumber]=\"true\"\n [ngModel]=\"filter.value?.greaterThan\"\n (ngModelChange)=\"filter.value.greaterThan=$event\"/>\n </teta-input>\n <teta-input [label]=\"loc.to\">\n <input class=\"input\" type=\"text\"\n style=\"width: 110px\"\n [tetaOnlyNumber]=\"true\"\n [ngModel]=\"filter.value?.lessThan\"\n (ngModelChange)=\"filter.value.lessThan=$event\"/>\n </teta-input>\n</div>\n", styles: [""], components: [{ type: InputComponent, selector: "teta-input", inputs: ["label", "horizontal", "required"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: OnlyNumberDirective, selector: "[tetaOnlyNumber]", inputs: ["tetaOnlyNumber", "allowDecimals", "allowSign", "decimalSeparator", "commaSeparator"] }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3483
3589
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NumericFilterComponent, decorators: [{
|
|
3484
3590
|
type: Component,
|
|
3485
|
-
args: [{ selector: 'teta-numeric-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-row padding-3\">\n <teta-input [label]=\"
|
|
3486
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
3591
|
+
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: [""] }]
|
|
3592
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: TetaConfigService }]; }, propDecorators: { column: [{
|
|
3593
|
+
type: Input
|
|
3594
|
+
}], data: [{
|
|
3487
3595
|
type: Input
|
|
3488
3596
|
}], filterOptions: [{
|
|
3489
3597
|
type: Input
|
|
@@ -3524,11 +3632,13 @@ class StringFilter extends FilterBase {
|
|
|
3524
3632
|
}
|
|
3525
3633
|
|
|
3526
3634
|
class StringFilterComponent extends FilterComponentBase {
|
|
3527
|
-
constructor(changeDetector) {
|
|
3635
|
+
constructor(changeDetector, _config) {
|
|
3528
3636
|
super();
|
|
3529
3637
|
this.changeDetector = changeDetector;
|
|
3638
|
+
this._config = _config;
|
|
3530
3639
|
this.filterOptions = [];
|
|
3531
3640
|
this.filterChanged = new EventEmitter();
|
|
3641
|
+
this.locale = this._config.locale;
|
|
3532
3642
|
}
|
|
3533
3643
|
set state(val) {
|
|
3534
3644
|
this.state$ = val;
|
|
@@ -3557,12 +3667,14 @@ class StringFilterComponent extends FilterComponentBase {
|
|
|
3557
3667
|
return filter;
|
|
3558
3668
|
}
|
|
3559
3669
|
}
|
|
3560
|
-
StringFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: StringFilterComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3561
|
-
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]=\"
|
|
3670
|
+
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 });
|
|
3671
|
+
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 });
|
|
3562
3672
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: StringFilterComponent, decorators: [{
|
|
3563
3673
|
type: Component,
|
|
3564
|
-
args: [{ selector: 'teta-string-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"padding-3\">\n <teta-input [label]=\"
|
|
3565
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
3674
|
+
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: [""] }]
|
|
3675
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: TetaConfigService }]; }, propDecorators: { column: [{
|
|
3676
|
+
type: Input
|
|
3677
|
+
}], data: [{
|
|
3566
3678
|
type: Input
|
|
3567
3679
|
}], filterOptions: [{
|
|
3568
3680
|
type: Input
|
|
@@ -3594,11 +3706,16 @@ class TextFieldComponent {
|
|
|
3594
3706
|
this.placeholder = '';
|
|
3595
3707
|
this.disabled = false;
|
|
3596
3708
|
this.onlyNumber = false;
|
|
3597
|
-
this.tabindex = 0;
|
|
3598
3709
|
this.textField = true;
|
|
3599
3710
|
this.value = '';
|
|
3600
3711
|
}
|
|
3712
|
+
get tabindex() {
|
|
3713
|
+
return this.disabled ? null : 0;
|
|
3714
|
+
}
|
|
3601
3715
|
onFocus() {
|
|
3716
|
+
if (this.disabled) {
|
|
3717
|
+
return;
|
|
3718
|
+
}
|
|
3602
3719
|
this.input.nativeElement.focus();
|
|
3603
3720
|
}
|
|
3604
3721
|
keyPress(event) {
|
|
@@ -3617,7 +3734,7 @@ class TextFieldComponent {
|
|
|
3617
3734
|
}
|
|
3618
3735
|
setDisabledState(isDisabled) {
|
|
3619
3736
|
this.disabled = isDisabled;
|
|
3620
|
-
this._cdr.
|
|
3737
|
+
this._cdr.markForCheck();
|
|
3621
3738
|
}
|
|
3622
3739
|
writeValue(input) {
|
|
3623
3740
|
this.value = input;
|
|
@@ -3635,7 +3752,7 @@ TextFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
3635
3752
|
useExisting: forwardRef(() => TextFieldComponent),
|
|
3636
3753
|
multi: true,
|
|
3637
3754
|
},
|
|
3638
|
-
], 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:
|
|
3755
|
+
], 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 });
|
|
3639
3756
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TextFieldComponent, decorators: [{
|
|
3640
3757
|
type: Component,
|
|
3641
3758
|
args: [{ selector: 'teta-text-field', providers: [
|
|
@@ -3676,16 +3793,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
3676
3793
|
}] } });
|
|
3677
3794
|
|
|
3678
3795
|
class ListFilterComponent extends FilterComponentBase {
|
|
3679
|
-
constructor(changeDetector) {
|
|
3796
|
+
constructor(changeDetector, _config) {
|
|
3680
3797
|
super();
|
|
3681
3798
|
this.changeDetector = changeDetector;
|
|
3799
|
+
this._config = _config;
|
|
3682
3800
|
this.filterOptions = [];
|
|
3683
3801
|
this.filterChanged = new EventEmitter();
|
|
3684
3802
|
this.search = '';
|
|
3803
|
+
this.locale = this._config.locale;
|
|
3685
3804
|
}
|
|
3686
3805
|
get visibleOptions() {
|
|
3687
3806
|
var _a;
|
|
3688
|
-
return (_a = this.filterOptions) === null || _a === void 0 ? void 0 : _a.filter((
|
|
3807
|
+
return (_a = this.filterOptions) === null || _a === void 0 ? void 0 : _a.filter((option) => {
|
|
3808
|
+
var _a;
|
|
3809
|
+
return ((_a = option.name) === null || _a === void 0 ? void 0 : _a.toString().indexOf(this.search)) >= 0;
|
|
3810
|
+
});
|
|
3689
3811
|
}
|
|
3690
3812
|
set state(val) {
|
|
3691
3813
|
this.state$ = val;
|
|
@@ -3695,7 +3817,8 @@ class ListFilterComponent extends FilterComponentBase {
|
|
|
3695
3817
|
get state() {
|
|
3696
3818
|
return this.state$;
|
|
3697
3819
|
}
|
|
3698
|
-
ngOnInit() {
|
|
3820
|
+
ngOnInit() {
|
|
3821
|
+
}
|
|
3699
3822
|
all() {
|
|
3700
3823
|
var _a, _b, _c, _d;
|
|
3701
3824
|
if (!((_a = this.filter) === null || _a === void 0 ? void 0 : _a.value) || ((_c = (_b = this.filter) === null || _b === void 0 ? void 0 : _b.value) === null || _c === void 0 ? void 0 : _c.length) === 0) {
|
|
@@ -3741,12 +3864,14 @@ class ListFilterComponent extends FilterComponentBase {
|
|
|
3741
3864
|
return filter;
|
|
3742
3865
|
}
|
|
3743
3866
|
}
|
|
3744
|
-
ListFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ListFilterComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3745
|
-
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)\">\
|
|
3867
|
+
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 });
|
|
3868
|
+
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 });
|
|
3746
3869
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ListFilterComponent, decorators: [{
|
|
3747
3870
|
type: Component,
|
|
3748
|
-
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)\">\
|
|
3749
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
3871
|
+
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"] }]
|
|
3872
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: TetaConfigService }]; }, propDecorators: { column: [{
|
|
3873
|
+
type: Input
|
|
3874
|
+
}], data: [{
|
|
3750
3875
|
type: Input
|
|
3751
3876
|
}], filterOptions: [{
|
|
3752
3877
|
type: Input
|
|
@@ -3775,11 +3900,13 @@ class DateFilter extends FilterBase {
|
|
|
3775
3900
|
}
|
|
3776
3901
|
|
|
3777
3902
|
class DateFilterComponent extends FilterComponentBase {
|
|
3778
|
-
constructor(changeDetector) {
|
|
3903
|
+
constructor(changeDetector, _config) {
|
|
3779
3904
|
super();
|
|
3780
3905
|
this.changeDetector = changeDetector;
|
|
3906
|
+
this._config = _config;
|
|
3781
3907
|
this.filterOptions = [];
|
|
3782
3908
|
this.filterChanged = new EventEmitter();
|
|
3909
|
+
this.locale = this._config.locale;
|
|
3783
3910
|
}
|
|
3784
3911
|
set state(val) {
|
|
3785
3912
|
this.state$ = val;
|
|
@@ -3805,12 +3932,14 @@ class DateFilterComponent extends FilterComponentBase {
|
|
|
3805
3932
|
return filter;
|
|
3806
3933
|
}
|
|
3807
3934
|
}
|
|
3808
|
-
DateFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DateFilterComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3809
|
-
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]=\"
|
|
3935
|
+
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 });
|
|
3936
|
+
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 });
|
|
3810
3937
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DateFilterComponent, decorators: [{
|
|
3811
3938
|
type: Component,
|
|
3812
|
-
args: [{ selector: 'teta-date-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-row padding-3\">\n <teta-input [label]=\"
|
|
3813
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
3939
|
+
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: [""] }]
|
|
3940
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: TetaConfigService }]; }, propDecorators: { column: [{
|
|
3941
|
+
type: Input
|
|
3942
|
+
}], data: [{
|
|
3814
3943
|
type: Input
|
|
3815
3944
|
}], filterOptions: [{
|
|
3816
3945
|
type: Input
|
|
@@ -4111,7 +4240,7 @@ class RadioButtonComponent {
|
|
|
4111
4240
|
}
|
|
4112
4241
|
}
|
|
4113
4242
|
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 });
|
|
4114
|
-
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:
|
|
4243
|
+
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 });
|
|
4115
4244
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: RadioButtonComponent, decorators: [{
|
|
4116
4245
|
type: Component,
|
|
4117
4246
|
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: [""] }]
|
|
@@ -4174,12 +4303,14 @@ class BooleanFilterComponent extends FilterComponentBase {
|
|
|
4174
4303
|
}
|
|
4175
4304
|
}
|
|
4176
4305
|
BooleanFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: BooleanFilterComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4177
|
-
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 });
|
|
4306
|
+
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 });
|
|
4178
4307
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: BooleanFilterComponent, decorators: [{
|
|
4179
4308
|
type: Component,
|
|
4180
4309
|
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: [""] }]
|
|
4181
4310
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
4182
4311
|
type: Input
|
|
4312
|
+
}], data: [{
|
|
4313
|
+
type: Input
|
|
4183
4314
|
}], filterOptions: [{
|
|
4184
4315
|
type: Input
|
|
4185
4316
|
}], filterChanged: [{
|
|
@@ -4219,6 +4350,13 @@ class FilterHostComponent {
|
|
|
4219
4350
|
this._componentRef.injector.get(ChangeDetectorRef).detectChanges();
|
|
4220
4351
|
}
|
|
4221
4352
|
}
|
|
4353
|
+
set data(data) {
|
|
4354
|
+
this._data = data;
|
|
4355
|
+
if (this._init) {
|
|
4356
|
+
this._componentRef.instance.data = this._data;
|
|
4357
|
+
this._componentRef.injector.get(ChangeDetectorRef).detectChanges();
|
|
4358
|
+
}
|
|
4359
|
+
}
|
|
4222
4360
|
set filterOptions(val) {
|
|
4223
4361
|
this._filterOptions = val;
|
|
4224
4362
|
if (this._init) {
|
|
@@ -4234,6 +4372,7 @@ class FilterHostComponent {
|
|
|
4234
4372
|
this.viewContainerRef.createComponent(this._column.filterComponent);
|
|
4235
4373
|
this._componentRef.instance.column = this._column;
|
|
4236
4374
|
this._componentRef.instance.state = this._state;
|
|
4375
|
+
this._componentRef.instance.data = this._data;
|
|
4237
4376
|
this._componentRef.instance.filterOptions = this._filterOptions;
|
|
4238
4377
|
this._componentRef.injector.get(ChangeDetectorRef).detectChanges();
|
|
4239
4378
|
this._init = true;
|
|
@@ -4248,7 +4387,7 @@ class FilterHostComponent {
|
|
|
4248
4387
|
}
|
|
4249
4388
|
}
|
|
4250
4389
|
FilterHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterHostComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4251
|
-
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 });
|
|
4390
|
+
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 });
|
|
4252
4391
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterHostComponent, decorators: [{
|
|
4253
4392
|
type: Component,
|
|
4254
4393
|
args: [{
|
|
@@ -4261,6 +4400,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
4261
4400
|
type: Input
|
|
4262
4401
|
}], state: [{
|
|
4263
4402
|
type: Input
|
|
4403
|
+
}], data: [{
|
|
4404
|
+
type: Input
|
|
4264
4405
|
}], filterOptions: [{
|
|
4265
4406
|
type: Input
|
|
4266
4407
|
}], filterChanged: [{
|
|
@@ -4377,9 +4518,13 @@ class SelectComponent {
|
|
|
4377
4518
|
this.allowNull = true;
|
|
4378
4519
|
this.open = false;
|
|
4379
4520
|
this.selectClass = true;
|
|
4380
|
-
this.
|
|
4381
|
-
|
|
4382
|
-
this.onTouched = () => {
|
|
4521
|
+
this.onChange = () => {
|
|
4522
|
+
};
|
|
4523
|
+
this.onTouched = () => {
|
|
4524
|
+
};
|
|
4525
|
+
}
|
|
4526
|
+
get tabindex() {
|
|
4527
|
+
return this.disabled ? null : 0;
|
|
4383
4528
|
}
|
|
4384
4529
|
get isDisabled() {
|
|
4385
4530
|
return this.disabled;
|
|
@@ -4485,7 +4630,8 @@ class SelectComponent {
|
|
|
4485
4630
|
focus() {
|
|
4486
4631
|
this._elementRef.nativeElement.focus();
|
|
4487
4632
|
}
|
|
4488
|
-
ngOnInit() {
|
|
4633
|
+
ngOnInit() {
|
|
4634
|
+
}
|
|
4489
4635
|
writeValue(value) {
|
|
4490
4636
|
if (this.multiple) {
|
|
4491
4637
|
this.value =
|
|
@@ -4510,7 +4656,8 @@ class SelectComponent {
|
|
|
4510
4656
|
this.disabled = isDisabled;
|
|
4511
4657
|
this._cdr.markForCheck();
|
|
4512
4658
|
}
|
|
4513
|
-
getSelectedValue() {
|
|
4659
|
+
getSelectedValue() {
|
|
4660
|
+
}
|
|
4514
4661
|
}
|
|
4515
4662
|
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 });
|
|
4516
4663
|
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: [
|
|
@@ -4519,7 +4666,7 @@ SelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
4519
4666
|
useExisting: forwardRef(() => SelectComponent),
|
|
4520
4667
|
multi: true,
|
|
4521
4668
|
},
|
|
4522
|
-
], 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:
|
|
4669
|
+
], 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 });
|
|
4523
4670
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SelectComponent, decorators: [{
|
|
4524
4671
|
type: Component,
|
|
4525
4672
|
args: [{ selector: 'teta-select', providers: [
|
|
@@ -4687,8 +4834,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
4687
4834
|
class FilterModule {
|
|
4688
4835
|
}
|
|
4689
4836
|
FilterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4690
|
-
FilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterModule, declarations: [
|
|
4691
|
-
NumericFilterComponent,
|
|
4837
|
+
FilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: FilterModule, declarations: [NumericFilterComponent,
|
|
4692
4838
|
StringFilterComponent,
|
|
4693
4839
|
ListFilterComponent,
|
|
4694
4840
|
DateFilterComponent,
|
|
@@ -4700,8 +4846,7 @@ FilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
4700
4846
|
RadioModule,
|
|
4701
4847
|
InputModule,
|
|
4702
4848
|
CheckboxModule,
|
|
4703
|
-
OnlyNumberModule], exports: [
|
|
4704
|
-
NumericFilterComponent,
|
|
4849
|
+
OnlyNumberModule], exports: [NumericFilterComponent,
|
|
4705
4850
|
StringFilterComponent,
|
|
4706
4851
|
ListFilterComponent,
|
|
4707
4852
|
DateFilterComponent,
|
|
@@ -4721,7 +4866,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
4721
4866
|
type: NgModule,
|
|
4722
4867
|
args: [{
|
|
4723
4868
|
declarations: [
|
|
4724
|
-
FilterPanelComponent,
|
|
4725
4869
|
NumericFilterComponent,
|
|
4726
4870
|
StringFilterComponent,
|
|
4727
4871
|
ListFilterComponent,
|
|
@@ -4730,7 +4874,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
4730
4874
|
BooleanFilterComponent,
|
|
4731
4875
|
],
|
|
4732
4876
|
exports: [
|
|
4733
|
-
FilterPanelComponent,
|
|
4734
4877
|
NumericFilterComponent,
|
|
4735
4878
|
StringFilterComponent,
|
|
4736
4879
|
ListFilterComponent,
|
|
@@ -4772,8 +4915,8 @@ class FilterItem {
|
|
|
4772
4915
|
this.hint = (_d = options === null || options === void 0 ? void 0 : options.hint) !== null && _d !== void 0 ? _d : '';
|
|
4773
4916
|
this.sortable = (_e = options === null || options === void 0 ? void 0 : options.sortable) !== null && _e !== void 0 ? _e : true;
|
|
4774
4917
|
this.filterable = (_f = options === null || options === void 0 ? void 0 : options.filterable) !== null && _f !== void 0 ? _f : true;
|
|
4775
|
-
this.sortField = (_g = options === null || options === void 0 ? void 0 : options.sortField) !== null && _g !== void 0 ? _g : this.name;
|
|
4776
|
-
this.filterField = (_h = options === null || options === void 0 ? void 0 : options.filterField) !== null && _h !== void 0 ? _h : this.name;
|
|
4918
|
+
this.sortField = StringUtil.firstLetterToLower((_g = options === null || options === void 0 ? void 0 : options.sortField) !== null && _g !== void 0 ? _g : this.name);
|
|
4919
|
+
this.filterField = StringUtil.firstLetterToLower((_h = options === null || options === void 0 ? void 0 : options.filterField) !== null && _h !== void 0 ? _h : this.name);
|
|
4777
4920
|
this.filterType = options === null || options === void 0 ? void 0 : options.filterType;
|
|
4778
4921
|
this.stringFilterType = (_j = options === null || options === void 0 ? void 0 : options.stringFilterType) !== null && _j !== void 0 ? _j : StringFilterType.Contains;
|
|
4779
4922
|
this.listFilterType = (_k = options === null || options === void 0 ? void 0 : options.listFilterType) !== null && _k !== void 0 ? _k : ListFilterType.None;
|
|
@@ -4789,7 +4932,7 @@ class SortParam {
|
|
|
4789
4932
|
*/
|
|
4790
4933
|
constructor(options) {
|
|
4791
4934
|
if (options) {
|
|
4792
|
-
this.field = options.field || this.field;
|
|
4935
|
+
this.field = StringUtil.firstLetterToLower(options.field || this.field);
|
|
4793
4936
|
this.asc = options.asc || false;
|
|
4794
4937
|
this.order = options.order || this.order;
|
|
4795
4938
|
}
|
|
@@ -5011,7 +5154,7 @@ class MessageComponent {
|
|
|
5011
5154
|
}
|
|
5012
5155
|
}
|
|
5013
5156
|
MessageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: MessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5014
|
-
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:
|
|
5157
|
+
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 });
|
|
5015
5158
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: MessageComponent, decorators: [{
|
|
5016
5159
|
type: Component,
|
|
5017
5160
|
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: [""] }]
|
|
@@ -5098,7 +5241,7 @@ class MessageHostComponent {
|
|
|
5098
5241
|
}
|
|
5099
5242
|
}
|
|
5100
5243
|
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 });
|
|
5101
|
-
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:
|
|
5244
|
+
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 });
|
|
5102
5245
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: MessageHostComponent, decorators: [{
|
|
5103
5246
|
type: Component,
|
|
5104
5247
|
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: [""] }]
|
|
@@ -5279,7 +5422,7 @@ class DialogComponent {
|
|
|
5279
5422
|
ngOnInit() { }
|
|
5280
5423
|
}
|
|
5281
5424
|
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 });
|
|
5282
|
-
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:
|
|
5425
|
+
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 } });
|
|
5283
5426
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DialogComponent, decorators: [{
|
|
5284
5427
|
type: Component,
|
|
5285
5428
|
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"] }]
|
|
@@ -6024,7 +6167,7 @@ class ToggleComponent {
|
|
|
6024
6167
|
}
|
|
6025
6168
|
}
|
|
6026
6169
|
ToggleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ToggleComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
6027
|
-
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:
|
|
6170
|
+
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 });
|
|
6028
6171
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ToggleComponent, decorators: [{
|
|
6029
6172
|
type: Component,
|
|
6030
6173
|
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: [""] }]
|
|
@@ -6080,7 +6223,8 @@ class DynamicContentBaseDirective {
|
|
|
6080
6223
|
this._alive = false;
|
|
6081
6224
|
this.destroyContentRef();
|
|
6082
6225
|
}
|
|
6083
|
-
ngOnInit() {
|
|
6226
|
+
ngOnInit() {
|
|
6227
|
+
}
|
|
6084
6228
|
createContentRef(className) {
|
|
6085
6229
|
if (!this._componentRef) {
|
|
6086
6230
|
this._open = true;
|
|
@@ -6095,11 +6239,9 @@ class DynamicContentBaseDirective {
|
|
|
6095
6239
|
return this._componentRef;
|
|
6096
6240
|
}
|
|
6097
6241
|
destroyContentRef() {
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
this._componentRef = null;
|
|
6102
|
-
}
|
|
6242
|
+
this._open = false;
|
|
6243
|
+
this._service.destroy(this._componentRef, this._content, this.appendToBody ? this._document.body : this._elementRef.nativeElement);
|
|
6244
|
+
this._componentRef = null;
|
|
6103
6245
|
}
|
|
6104
6246
|
}
|
|
6105
6247
|
DynamicContentBaseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DynamicContentBaseDirective, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -6287,7 +6429,7 @@ class PropertyGridItemComponent {
|
|
|
6287
6429
|
}
|
|
6288
6430
|
}
|
|
6289
6431
|
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 });
|
|
6290
|
-
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:
|
|
6432
|
+
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]" }] });
|
|
6291
6433
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridItemComponent, decorators: [{
|
|
6292
6434
|
type: Component,
|
|
6293
6435
|
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: [""] }]
|
|
@@ -6313,7 +6455,7 @@ class PropertyGridGroupComponent {
|
|
|
6313
6455
|
ngOnInit() { }
|
|
6314
6456
|
}
|
|
6315
6457
|
PropertyGridGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6316
|
-
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:
|
|
6458
|
+
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"] }] });
|
|
6317
6459
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridGroupComponent, decorators: [{
|
|
6318
6460
|
type: Component,
|
|
6319
6461
|
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: [""] }]
|
|
@@ -6367,7 +6509,7 @@ class PropertyGridComponent {
|
|
|
6367
6509
|
}
|
|
6368
6510
|
}
|
|
6369
6511
|
PropertyGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6370
|
-
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:
|
|
6512
|
+
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"] }] });
|
|
6371
6513
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridComponent, decorators: [{
|
|
6372
6514
|
type: Component,
|
|
6373
6515
|
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"] }]
|
|
@@ -6605,7 +6747,7 @@ class SidebarComponent {
|
|
|
6605
6747
|
ngOnInit() { }
|
|
6606
6748
|
}
|
|
6607
6749
|
SidebarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6608
|
-
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:
|
|
6750
|
+
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: [
|
|
6609
6751
|
trigger('sidebar', [
|
|
6610
6752
|
transition('void => *', [
|
|
6611
6753
|
style({ opacity: '0' }),
|
|
@@ -6999,6 +7141,25 @@ class StateUtil {
|
|
|
6999
7141
|
}
|
|
7000
7142
|
return new FilterState(state);
|
|
7001
7143
|
}
|
|
7144
|
+
static sortAsc(sortEvent, state) {
|
|
7145
|
+
return StateUtil.sort(sortEvent, state, true);
|
|
7146
|
+
}
|
|
7147
|
+
static sortDesc(sortEvent, state) {
|
|
7148
|
+
return StateUtil.sort(sortEvent, state, false);
|
|
7149
|
+
}
|
|
7150
|
+
static sort(sortEvent, state, asc) {
|
|
7151
|
+
const column = sortEvent.column;
|
|
7152
|
+
const shiftKey = sortEvent.shiftKey;
|
|
7153
|
+
const sort = state.sortParams.find((sortParam) => sortParam.field === column.sortField);
|
|
7154
|
+
if (sort) {
|
|
7155
|
+
state.sortParams = StateUtil.clearSortParam(sort, state.sortParams);
|
|
7156
|
+
}
|
|
7157
|
+
if (!shiftKey) {
|
|
7158
|
+
state.sortParams.length = 0;
|
|
7159
|
+
}
|
|
7160
|
+
state.sortParams.push(new SortParam({ field: column.sortField, asc: asc, order: 0 }));
|
|
7161
|
+
return new FilterState(state);
|
|
7162
|
+
}
|
|
7002
7163
|
static clearSortParam(sort, sortParams) {
|
|
7003
7164
|
const index = sortParams.indexOf(sort);
|
|
7004
7165
|
sortParams.splice(index, 1);
|
|
@@ -7021,6 +7182,20 @@ var SelectType;
|
|
|
7021
7182
|
SelectType[SelectType["single"] = 2] = "single";
|
|
7022
7183
|
})(SelectType || (SelectType = {}));
|
|
7023
7184
|
|
|
7185
|
+
var EditType;
|
|
7186
|
+
(function (EditType) {
|
|
7187
|
+
EditType[EditType["none"] = 0] = "none";
|
|
7188
|
+
EditType[EditType["cell"] = 1] = "cell";
|
|
7189
|
+
EditType[EditType["row"] = 2] = "row";
|
|
7190
|
+
})(EditType || (EditType = {}));
|
|
7191
|
+
|
|
7192
|
+
var EditEvent;
|
|
7193
|
+
(function (EditEvent) {
|
|
7194
|
+
EditEvent[EditEvent["click"] = 0] = "click";
|
|
7195
|
+
EditEvent[EditEvent["focus"] = 1] = "focus";
|
|
7196
|
+
EditEvent[EditEvent["doubleClick"] = 2] = "doubleClick";
|
|
7197
|
+
})(EditEvent || (EditEvent = {}));
|
|
7198
|
+
|
|
7024
7199
|
class TableColumnStore {
|
|
7025
7200
|
constructor(options) {
|
|
7026
7201
|
var _a;
|
|
@@ -7036,12 +7211,17 @@ class TableColumnStore {
|
|
|
7036
7211
|
|
|
7037
7212
|
class TableService {
|
|
7038
7213
|
constructor() {
|
|
7214
|
+
this.selectType = SelectType.multiple;
|
|
7215
|
+
this.editType = EditType.cell;
|
|
7216
|
+
this.editEvent = EditEvent.doubleClick;
|
|
7217
|
+
this.trackRow = (index, row) => index;
|
|
7039
7218
|
this.initialColumns = [];
|
|
7040
7219
|
this.displayColumns = [];
|
|
7041
7220
|
this._columns = new BehaviorSubject([]);
|
|
7042
|
-
this.
|
|
7221
|
+
this._hiddenColumns = new BehaviorSubject([]);
|
|
7043
7222
|
this._displayData = new BehaviorSubject([]);
|
|
7044
7223
|
this._dict = new BehaviorSubject({});
|
|
7224
|
+
this._filterOptions = new BehaviorSubject({});
|
|
7045
7225
|
this._state = new BehaviorSubject(new FilterState());
|
|
7046
7226
|
this._editRowStart = new Subject();
|
|
7047
7227
|
this._editRowStop = new Subject();
|
|
@@ -7054,11 +7234,11 @@ class TableService {
|
|
|
7054
7234
|
this._groupToggle = new Subject();
|
|
7055
7235
|
this._selectedRows = new BehaviorSubject([]);
|
|
7056
7236
|
this._activeRow = new BehaviorSubject(null);
|
|
7057
|
-
this._hiddenColumns = new BehaviorSubject([]);
|
|
7058
7237
|
this._scrollIndex = new Subject();
|
|
7059
7238
|
this.columns = this._columns.asObservable();
|
|
7060
7239
|
this.displayData = this._displayData.asObservable();
|
|
7061
7240
|
this.dict = this._dict.asObservable();
|
|
7241
|
+
this.filterOptions = this._filterOptions.asObservable();
|
|
7062
7242
|
this.state = this._state.asObservable();
|
|
7063
7243
|
this.editRowStart = this._editRowStart.asObservable();
|
|
7064
7244
|
this.editRowStop = this._editRowStop.asObservable();
|
|
@@ -7074,17 +7254,21 @@ class TableService {
|
|
|
7074
7254
|
this.hiddenColumns = this._hiddenColumns.asObservable();
|
|
7075
7255
|
this.scrollIndex = this._scrollIndex.asObservable();
|
|
7076
7256
|
}
|
|
7077
|
-
// cellEditable: boolean | ((row: ICellCoordinates<T>) => boolean);
|
|
7078
7257
|
get dragSource() {
|
|
7079
7258
|
return this._dragSource;
|
|
7080
7259
|
}
|
|
7260
|
+
get currentEditCell() {
|
|
7261
|
+
return this._currentEditCell;
|
|
7262
|
+
}
|
|
7081
7263
|
setData(data) {
|
|
7082
|
-
this.
|
|
7083
|
-
this._displayData.next(this.initialData);
|
|
7264
|
+
this._displayData.next(data === null || data === void 0 ? void 0 : data.map((_) => new TableRow(_)));
|
|
7084
7265
|
}
|
|
7085
7266
|
setDict(dict) {
|
|
7086
7267
|
this._dict.next(dict);
|
|
7087
7268
|
}
|
|
7269
|
+
setFilterOptions(filterOptions) {
|
|
7270
|
+
this._filterOptions.next(filterOptions);
|
|
7271
|
+
}
|
|
7088
7272
|
setColumns(columns) {
|
|
7089
7273
|
this.initialColumns = columns ? columns.map((_) => new TableColumn(_)) : [];
|
|
7090
7274
|
this.initialColumnsHash = hash__default(this.initialColumns, {
|
|
@@ -7173,9 +7357,14 @@ class TableService {
|
|
|
7173
7357
|
const hiddenColumns = localStorage.getItem(this._hiddenCookieName) || '[]';
|
|
7174
7358
|
this._hiddenColumns.next(JSON.parse(hiddenColumns));
|
|
7175
7359
|
}
|
|
7176
|
-
|
|
7360
|
+
sortAsc(sortEvent) {
|
|
7361
|
+
if (sortEvent.column.sortable) {
|
|
7362
|
+
this.setState(StateUtil.sortAsc(sortEvent, this._state.value));
|
|
7363
|
+
}
|
|
7364
|
+
}
|
|
7365
|
+
sortDesc(sortEvent) {
|
|
7177
7366
|
if (sortEvent.column.sortable) {
|
|
7178
|
-
this.setState(StateUtil.
|
|
7367
|
+
this.setState(StateUtil.sortDesc(sortEvent, this._state.value));
|
|
7179
7368
|
}
|
|
7180
7369
|
}
|
|
7181
7370
|
clearSort(column) {
|
|
@@ -7294,35 +7483,42 @@ class TableService {
|
|
|
7294
7483
|
}
|
|
7295
7484
|
}
|
|
7296
7485
|
}
|
|
7297
|
-
startEditRow(
|
|
7486
|
+
startEditRow(cellEvent) {
|
|
7298
7487
|
var _a;
|
|
7299
|
-
if (((_a = this.
|
|
7300
|
-
if (this.
|
|
7301
|
-
|
|
7302
|
-
this._editRowStop.next(this._currentEditRow);
|
|
7488
|
+
if (((_a = this._currentEditCell) === null || _a === void 0 ? void 0 : _a.row) !== (cellEvent === null || cellEvent === void 0 ? void 0 : cellEvent.row)) {
|
|
7489
|
+
if (this._currentEditCell != null) {
|
|
7490
|
+
this._editRowStop.next(this._currentEditCell);
|
|
7303
7491
|
}
|
|
7304
|
-
if (
|
|
7305
|
-
this._editRowStart.next(
|
|
7306
|
-
this.
|
|
7492
|
+
if (cellEvent === null) {
|
|
7493
|
+
this._editRowStart.next(cellEvent);
|
|
7494
|
+
this._currentEditCell = cellEvent;
|
|
7307
7495
|
}
|
|
7308
7496
|
else {
|
|
7309
|
-
if (this.boolOrFuncCallback(this.rowEditable)(
|
|
7310
|
-
this._editRowStart.next(
|
|
7311
|
-
this.
|
|
7497
|
+
if (this.boolOrFuncCallback(this.rowEditable)(this.getRowByIndex(cellEvent === null || cellEvent === void 0 ? void 0 : cellEvent.row))) {
|
|
7498
|
+
this._editRowStart.next(cellEvent);
|
|
7499
|
+
this._currentEditCell = cellEvent;
|
|
7312
7500
|
}
|
|
7313
7501
|
}
|
|
7314
7502
|
}
|
|
7315
7503
|
}
|
|
7316
|
-
startEditCell(
|
|
7317
|
-
var _a, _b;
|
|
7318
|
-
if (((_a = this._currentEditCell) === null || _a === void 0 ? void 0 : _a.column
|
|
7319
|
-
((_b = this._currentEditCell) === null || _b === void 0 ? void 0 : _b.row) !== (
|
|
7504
|
+
startEditCell(cellEvent) {
|
|
7505
|
+
var _a, _b, _c;
|
|
7506
|
+
if (((_a = this._currentEditCell) === null || _a === void 0 ? void 0 : _a.column) !== (cellEvent === null || cellEvent === void 0 ? void 0 : cellEvent.column) ||
|
|
7507
|
+
((_b = this._currentEditCell) === null || _b === void 0 ? void 0 : _b.row) !== (cellEvent === null || cellEvent === void 0 ? void 0 : cellEvent.row)) {
|
|
7320
7508
|
if (this._currentEditCell != null) {
|
|
7321
7509
|
this._editCellStop.next(this._currentEditCell);
|
|
7322
7510
|
}
|
|
7323
|
-
|
|
7324
|
-
|
|
7325
|
-
this.
|
|
7511
|
+
const column = this.getColumnByName(cellEvent === null || cellEvent === void 0 ? void 0 : cellEvent.column);
|
|
7512
|
+
if (this.boolOrFuncCallback(column === null || column === void 0 ? void 0 : column.editable)({
|
|
7513
|
+
row: this.getRowByIndex(cellEvent === null || cellEvent === void 0 ? void 0 : cellEvent.row),
|
|
7514
|
+
column: column
|
|
7515
|
+
})) {
|
|
7516
|
+
this._editCellStart.next(cellEvent);
|
|
7517
|
+
this._currentEditCell = cellEvent;
|
|
7518
|
+
const key = (_c = cellEvent === null || cellEvent === void 0 ? void 0 : cellEvent.event) === null || _c === void 0 ? void 0 : _c.key;
|
|
7519
|
+
if (key && (key.length === 1 || (key === 'Delete' && !column.required))) {
|
|
7520
|
+
this.clearValue(cellEvent);
|
|
7521
|
+
}
|
|
7326
7522
|
}
|
|
7327
7523
|
}
|
|
7328
7524
|
}
|
|
@@ -7332,6 +7528,46 @@ class TableService {
|
|
|
7332
7528
|
selectRows(rows) {
|
|
7333
7529
|
this._selectedRows.next(rows);
|
|
7334
7530
|
}
|
|
7531
|
+
selectOrDeselectRow(row) {
|
|
7532
|
+
if (this._selectedRows.value.indexOf(row) >= 0) {
|
|
7533
|
+
this._selectedRows.next(this._selectedRows.value.filter((_) => _ !== row));
|
|
7534
|
+
}
|
|
7535
|
+
else {
|
|
7536
|
+
if (this.selectType === SelectType.single) {
|
|
7537
|
+
this._selectedRows.next([row]);
|
|
7538
|
+
}
|
|
7539
|
+
else {
|
|
7540
|
+
this._selectedRows.next([...this._selectedRows.value, row]);
|
|
7541
|
+
}
|
|
7542
|
+
}
|
|
7543
|
+
}
|
|
7544
|
+
selectRange(row) {
|
|
7545
|
+
const index = this._displayData.value.indexOf(row);
|
|
7546
|
+
let minIndex = this._selectedRows.value.reduce((prev, curr) => {
|
|
7547
|
+
const newIndex = this._displayData.value.indexOf(curr);
|
|
7548
|
+
if (newIndex < prev) {
|
|
7549
|
+
return newIndex;
|
|
7550
|
+
}
|
|
7551
|
+
return prev;
|
|
7552
|
+
}, this._displayData.value.length);
|
|
7553
|
+
let maxIndex = this._selectedRows.value.reduce((prev, curr) => {
|
|
7554
|
+
const newIndex = this._displayData.value.indexOf(curr);
|
|
7555
|
+
if (newIndex > prev) {
|
|
7556
|
+
return newIndex;
|
|
7557
|
+
}
|
|
7558
|
+
return prev;
|
|
7559
|
+
}, 0);
|
|
7560
|
+
if (index > maxIndex) {
|
|
7561
|
+
maxIndex = index;
|
|
7562
|
+
}
|
|
7563
|
+
if (index < minIndex) {
|
|
7564
|
+
minIndex = index;
|
|
7565
|
+
}
|
|
7566
|
+
if (minIndex < index && index < maxIndex) {
|
|
7567
|
+
maxIndex = index;
|
|
7568
|
+
}
|
|
7569
|
+
this._selectedRows.next([...this._displayData.value.slice(minIndex, maxIndex + 1)]);
|
|
7570
|
+
}
|
|
7335
7571
|
selectRow(row) {
|
|
7336
7572
|
if (this.selectType === SelectType.none) {
|
|
7337
7573
|
return;
|
|
@@ -7387,10 +7623,118 @@ class TableService {
|
|
|
7387
7623
|
this._valueChanged.next(coordinates);
|
|
7388
7624
|
}
|
|
7389
7625
|
setValue(cellValue) {
|
|
7390
|
-
|
|
7626
|
+
let value;
|
|
7627
|
+
if (typeof cellValue.row === 'object' && typeof cellValue.column === 'object') {
|
|
7628
|
+
value = {
|
|
7629
|
+
row: this.getRowIndex(cellValue.row),
|
|
7630
|
+
column: cellValue.column.name,
|
|
7631
|
+
value: cellValue.value
|
|
7632
|
+
};
|
|
7633
|
+
}
|
|
7634
|
+
else {
|
|
7635
|
+
value = cellValue;
|
|
7636
|
+
}
|
|
7637
|
+
this._valueSet.next(value);
|
|
7391
7638
|
}
|
|
7392
7639
|
getRowByIndex(rowIndex) {
|
|
7393
|
-
return this._displayData.value[
|
|
7640
|
+
return this._displayData.value[rowIndex];
|
|
7641
|
+
}
|
|
7642
|
+
getRowIndex(row) {
|
|
7643
|
+
return this._displayData.value.indexOf(row);
|
|
7644
|
+
}
|
|
7645
|
+
getNextEditableCell(coords) {
|
|
7646
|
+
const nextCell = this.getNextCell(coords);
|
|
7647
|
+
if (!nextCell) {
|
|
7648
|
+
return null;
|
|
7649
|
+
}
|
|
7650
|
+
const column = this.getColumnByName(nextCell === null || nextCell === void 0 ? void 0 : nextCell.column);
|
|
7651
|
+
if (this.boolOrFuncCallback(column.editable)({
|
|
7652
|
+
row: this.getRowByIndex(nextCell.row),
|
|
7653
|
+
column
|
|
7654
|
+
})) {
|
|
7655
|
+
return nextCell;
|
|
7656
|
+
}
|
|
7657
|
+
return this.getNextEditableCell(nextCell);
|
|
7658
|
+
}
|
|
7659
|
+
getPreviousEditableCell(coords) {
|
|
7660
|
+
const prevCell = this.getPreviousCell(coords);
|
|
7661
|
+
if (!prevCell) {
|
|
7662
|
+
return null;
|
|
7663
|
+
}
|
|
7664
|
+
const column = this.getColumnByName(prevCell === null || prevCell === void 0 ? void 0 : prevCell.column);
|
|
7665
|
+
if (this.boolOrFuncCallback(column.editable)({
|
|
7666
|
+
row: this.getRowByIndex(prevCell.row),
|
|
7667
|
+
column
|
|
7668
|
+
})) {
|
|
7669
|
+
return prevCell;
|
|
7670
|
+
}
|
|
7671
|
+
return this.getPreviousEditableCell(prevCell);
|
|
7672
|
+
}
|
|
7673
|
+
getNextCell(coords) {
|
|
7674
|
+
var _a;
|
|
7675
|
+
const columns = this.getFlatColumns();
|
|
7676
|
+
let colIndex = columns.findIndex((col) => col.name === (coords === null || coords === void 0 ? void 0 : coords.column));
|
|
7677
|
+
let rowIndex = coords === null || coords === void 0 ? void 0 : coords.row;
|
|
7678
|
+
if (colIndex >= 0 && rowIndex >= 0) {
|
|
7679
|
+
if (colIndex === columns.length - 1) {
|
|
7680
|
+
colIndex = 0;
|
|
7681
|
+
rowIndex = rowIndex + 1;
|
|
7682
|
+
}
|
|
7683
|
+
else {
|
|
7684
|
+
colIndex = colIndex + 1;
|
|
7685
|
+
}
|
|
7686
|
+
return {
|
|
7687
|
+
column: (_a = columns[colIndex]) === null || _a === void 0 ? void 0 : _a.name,
|
|
7688
|
+
row: rowIndex
|
|
7689
|
+
};
|
|
7690
|
+
}
|
|
7691
|
+
return null;
|
|
7692
|
+
}
|
|
7693
|
+
getPreviousCell(coords) {
|
|
7694
|
+
var _a;
|
|
7695
|
+
const columns = this.getFlatColumns();
|
|
7696
|
+
let colIndex = columns.findIndex((col) => col.name === (coords === null || coords === void 0 ? void 0 : coords.column));
|
|
7697
|
+
let rowIndex = coords === null || coords === void 0 ? void 0 : coords.row;
|
|
7698
|
+
if (colIndex >= 0 && rowIndex >= 0) {
|
|
7699
|
+
if (colIndex === 0) {
|
|
7700
|
+
colIndex = columns.length - 1;
|
|
7701
|
+
rowIndex = rowIndex - 1;
|
|
7702
|
+
}
|
|
7703
|
+
else {
|
|
7704
|
+
colIndex = colIndex - 1;
|
|
7705
|
+
}
|
|
7706
|
+
return {
|
|
7707
|
+
column: (_a = columns[colIndex]) === null || _a === void 0 ? void 0 : _a.name,
|
|
7708
|
+
row: rowIndex
|
|
7709
|
+
};
|
|
7710
|
+
}
|
|
7711
|
+
return null;
|
|
7712
|
+
}
|
|
7713
|
+
getNextRowCell(coords) {
|
|
7714
|
+
var _a;
|
|
7715
|
+
const columns = this.getFlatColumns();
|
|
7716
|
+
let colIndex = columns.findIndex((col) => col.name === (coords === null || coords === void 0 ? void 0 : coords.column));
|
|
7717
|
+
let rowIndex = coords === null || coords === void 0 ? void 0 : coords.row;
|
|
7718
|
+
if (colIndex >= 0 && rowIndex >= 0 && rowIndex < this._displayData.value.length - 1) {
|
|
7719
|
+
return {
|
|
7720
|
+
column: (_a = columns[colIndex]) === null || _a === void 0 ? void 0 : _a.name,
|
|
7721
|
+
row: rowIndex + 1
|
|
7722
|
+
};
|
|
7723
|
+
}
|
|
7724
|
+
return null;
|
|
7725
|
+
}
|
|
7726
|
+
getPreviousRowCell(coords) {
|
|
7727
|
+
var _a;
|
|
7728
|
+
const columns = this.getFlatColumns();
|
|
7729
|
+
let colIndex = columns.findIndex((col) => col.name === (coords === null || coords === void 0 ? void 0 : coords.column));
|
|
7730
|
+
let rowIndex = coords === null || coords === void 0 ? void 0 : coords.row;
|
|
7731
|
+
if (colIndex >= 0 && rowIndex > 1) {
|
|
7732
|
+
return {
|
|
7733
|
+
column: (_a = columns[colIndex]) === null || _a === void 0 ? void 0 : _a.name,
|
|
7734
|
+
row: rowIndex - 1
|
|
7735
|
+
};
|
|
7736
|
+
}
|
|
7737
|
+
return null;
|
|
7394
7738
|
}
|
|
7395
7739
|
getColumnByName(columnName) {
|
|
7396
7740
|
return ArrayUtil.findRecursive(this.displayColumns, (iterableNode) => columnName === iterableNode.name, 'columns');
|
|
@@ -7410,6 +7754,19 @@ class TableService {
|
|
|
7410
7754
|
return true;
|
|
7411
7755
|
};
|
|
7412
7756
|
}
|
|
7757
|
+
getVisibleColumns() {
|
|
7758
|
+
const visible = ArrayUtil.flatten(this._columns.value, 'columns', true).filter((_) => this._hiddenColumns.value.indexOf(_.name) < 0);
|
|
7759
|
+
return visible.sort((a, b) => Number(b.locked) - Number(a.locked));
|
|
7760
|
+
}
|
|
7761
|
+
getCellInstance(coords) {
|
|
7762
|
+
return coords ? {
|
|
7763
|
+
row: this.getRowByIndex(coords.row),
|
|
7764
|
+
column: this.getColumnByName(coords.column)
|
|
7765
|
+
} : null;
|
|
7766
|
+
}
|
|
7767
|
+
getFlatColumns() {
|
|
7768
|
+
return ArrayUtil.flatten(this.displayColumns, 'columns', true).sort((a, b) => Number(b.locked) - Number(a.locked));
|
|
7769
|
+
}
|
|
7413
7770
|
findParent(column, columns) {
|
|
7414
7771
|
const found = columns.find((x) => x.name === column.name);
|
|
7415
7772
|
if (found !== null && found !== undefined) {
|
|
@@ -7443,6 +7800,9 @@ class TableService {
|
|
|
7443
7800
|
column.flex = 0;
|
|
7444
7801
|
column.width = maxWidth + 20;
|
|
7445
7802
|
}
|
|
7803
|
+
clearValue(event) {
|
|
7804
|
+
this.setValue(Object.assign(Object.assign({}, event), { value: null }));
|
|
7805
|
+
}
|
|
7446
7806
|
}
|
|
7447
7807
|
TableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7448
7808
|
TableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableService, providedIn: 'root' });
|
|
@@ -7473,35 +7833,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
7473
7833
|
type: Input
|
|
7474
7834
|
}] } });
|
|
7475
7835
|
|
|
7476
|
-
|
|
7477
|
-
(
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
(
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
EditEvent[EditEvent["doubleClick"] = 2] = "doubleClick";
|
|
7487
|
-
})(EditEvent || (EditEvent = {}));
|
|
7488
|
-
|
|
7489
|
-
class TableContextMenuConfig {
|
|
7490
|
-
constructor(options) {
|
|
7491
|
-
this.contextMenu = true;
|
|
7492
|
-
this.copy = true;
|
|
7493
|
-
this.delete = true;
|
|
7494
|
-
this.add = true;
|
|
7495
|
-
this.paste = true;
|
|
7496
|
-
if (options) {
|
|
7497
|
-
this.contextMenu = options === null || options === void 0 ? void 0 : options.contextMenu;
|
|
7498
|
-
this.copy = options === null || options === void 0 ? void 0 : options.copy;
|
|
7499
|
-
this.delete = options === null || options === void 0 ? void 0 : options.delete;
|
|
7500
|
-
this.add = options === null || options === void 0 ? void 0 : options.add;
|
|
7501
|
-
this.paste = options === null || options === void 0 ? void 0 : options.paste;
|
|
7836
|
+
class SelectionHeadCellComponent {
|
|
7837
|
+
constructor(_svc, _cdr) {
|
|
7838
|
+
this._svc = _svc;
|
|
7839
|
+
this._cdr = _cdr;
|
|
7840
|
+
this.tableCellClass = true;
|
|
7841
|
+
this._alive = true;
|
|
7842
|
+
}
|
|
7843
|
+
selectAll(value) {
|
|
7844
|
+
if (value) {
|
|
7845
|
+
this._svc.selectAll();
|
|
7502
7846
|
}
|
|
7847
|
+
else {
|
|
7848
|
+
this._svc.deselectAll();
|
|
7849
|
+
}
|
|
7850
|
+
}
|
|
7851
|
+
allSelected() {
|
|
7852
|
+
return this._svc.allRowsSelected();
|
|
7853
|
+
}
|
|
7854
|
+
ngOnInit() {
|
|
7855
|
+
this._svc.selectedRows
|
|
7856
|
+
.pipe(takeWhile((_) => this._alive))
|
|
7857
|
+
.subscribe((_) => {
|
|
7858
|
+
this._cdr.markForCheck();
|
|
7859
|
+
});
|
|
7860
|
+
}
|
|
7861
|
+
ngOnDestroy() {
|
|
7862
|
+
this._alive = false;
|
|
7503
7863
|
}
|
|
7504
7864
|
}
|
|
7865
|
+
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 });
|
|
7866
|
+
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 });
|
|
7867
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SelectionHeadCellComponent, decorators: [{
|
|
7868
|
+
type: Component,
|
|
7869
|
+
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"] }]
|
|
7870
|
+
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { tableCellClass: [{
|
|
7871
|
+
type: HostBinding,
|
|
7872
|
+
args: ['class.table-head__group']
|
|
7873
|
+
}] } });
|
|
7505
7874
|
|
|
7506
7875
|
class TableUtil {
|
|
7507
7876
|
static getColumnLeaves(column) {
|
|
@@ -7511,10 +7880,6 @@ class TableUtil {
|
|
|
7511
7880
|
}
|
|
7512
7881
|
return null;
|
|
7513
7882
|
}
|
|
7514
|
-
static getGridTemplateColumns(columns) {
|
|
7515
|
-
const res = columns === null || columns === void 0 ? void 0 : columns.map((column) => column.flex > 0 ? `minmax(${column.width}px, ${column.flex}fr)` : `${column.width}px`).join(' ');
|
|
7516
|
-
return res;
|
|
7517
|
-
}
|
|
7518
7883
|
static getData(data, state) {
|
|
7519
7884
|
let result = data;
|
|
7520
7885
|
result = TableUtil.filterData(result, state);
|
|
@@ -7566,17 +7931,18 @@ class TableUtil {
|
|
|
7566
7931
|
return data;
|
|
7567
7932
|
}
|
|
7568
7933
|
const filterString = (row) => {
|
|
7934
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
7569
7935
|
const item = row;
|
|
7570
7936
|
if (filter.type === StringFilterType.EndsWith) {
|
|
7571
|
-
return item[filter.field].endsWith(filter.value);
|
|
7937
|
+
return (_a = item[filter.field]) === null || _a === void 0 ? void 0 : _a.toLowerCase().endsWith((_b = filter.value) === null || _b === void 0 ? void 0 : _b.toLowerCase());
|
|
7572
7938
|
}
|
|
7573
7939
|
if (filter.type === StringFilterType.Equals) {
|
|
7574
|
-
return item[filter.field] === filter.value;
|
|
7940
|
+
return ((_c = item[filter.field]) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === ((_d = filter.value) === null || _d === void 0 ? void 0 : _d.toLowerCase());
|
|
7575
7941
|
}
|
|
7576
7942
|
if (filter.type === StringFilterType.StartsWith) {
|
|
7577
|
-
return item[filter.field].startsWith(filter.value);
|
|
7943
|
+
return (_e = item[filter.field]) === null || _e === void 0 ? void 0 : _e.toLowerCase().startsWith((_f = filter.value) === null || _f === void 0 ? void 0 : _f.toLowerCase());
|
|
7578
7944
|
}
|
|
7579
|
-
return item[filter.field].indexOf(filter.value) >= 0;
|
|
7945
|
+
return ((_g = item[filter.field]) === null || _g === void 0 ? void 0 : _g.toLowerCase().indexOf((_h = filter.value) === null || _h === void 0 ? void 0 : _h.toLowerCase())) >= 0;
|
|
7580
7946
|
};
|
|
7581
7947
|
return data.filter(filterString);
|
|
7582
7948
|
}
|
|
@@ -7585,10 +7951,10 @@ class TableUtil {
|
|
|
7585
7951
|
const item = row;
|
|
7586
7952
|
return (filter.value.lessThan === null || filter.value.lessThan === undefined
|
|
7587
7953
|
? true
|
|
7588
|
-
: filter.value.lessThan.getTime()
|
|
7954
|
+
: filter.value.lessThan.getTime() >= item[filter.field].getTime()) &&
|
|
7589
7955
|
(filter.value.greaterThan === null || filter.value.greaterThan === undefined
|
|
7590
7956
|
? true
|
|
7591
|
-
: filter.value.greaterThan.getTime()
|
|
7957
|
+
: filter.value.greaterThan.getTime() <= item[filter.field].getTime());
|
|
7592
7958
|
};
|
|
7593
7959
|
return data.filter(filterDate);
|
|
7594
7960
|
}
|
|
@@ -7597,10 +7963,10 @@ class TableUtil {
|
|
|
7597
7963
|
const item = row;
|
|
7598
7964
|
return (filter.value.lessThan === null || filter.value.lessThan === undefined
|
|
7599
7965
|
? true
|
|
7600
|
-
: filter.value.lessThan
|
|
7966
|
+
: filter.value.lessThan >= item[filter.field]) &&
|
|
7601
7967
|
(filter.value.greaterThan === null || filter.value.greaterThan === undefined
|
|
7602
7968
|
? true
|
|
7603
|
-
: filter.value.greaterThan
|
|
7969
|
+
: filter.value.greaterThan <= item[filter.field]) &&
|
|
7604
7970
|
(filter.value.equalsTo === null || filter.value.equalsTo === undefined
|
|
7605
7971
|
? true
|
|
7606
7972
|
: filter.value.equalsTo === item[filter.field]);
|
|
@@ -7622,7 +7988,7 @@ class TableUtil {
|
|
|
7622
7988
|
}
|
|
7623
7989
|
static sort(data, sortParam) {
|
|
7624
7990
|
const res = data.sort(sortParam.asc ? TableUtil.asc(sortParam.field) : TableUtil.desc(sortParam.field));
|
|
7625
|
-
return res;
|
|
7991
|
+
return [...res];
|
|
7626
7992
|
}
|
|
7627
7993
|
static desc(field) {
|
|
7628
7994
|
const res = (a, b) => a[field] > b[field] ? -1 : 1;
|
|
@@ -7634,45 +8000,6 @@ class TableUtil {
|
|
|
7634
8000
|
}
|
|
7635
8001
|
}
|
|
7636
8002
|
|
|
7637
|
-
class SelectionHeadCellComponent {
|
|
7638
|
-
constructor(_svc, _cdr) {
|
|
7639
|
-
this._svc = _svc;
|
|
7640
|
-
this._cdr = _cdr;
|
|
7641
|
-
this.tableCellClass = true;
|
|
7642
|
-
this._alive = true;
|
|
7643
|
-
}
|
|
7644
|
-
selectAll(value) {
|
|
7645
|
-
if (value) {
|
|
7646
|
-
this._svc.selectAll();
|
|
7647
|
-
}
|
|
7648
|
-
else {
|
|
7649
|
-
this._svc.deselectAll();
|
|
7650
|
-
}
|
|
7651
|
-
}
|
|
7652
|
-
allSelected() {
|
|
7653
|
-
return this._svc.allRowsSelected();
|
|
7654
|
-
}
|
|
7655
|
-
ngOnInit() {
|
|
7656
|
-
this._svc.selectedRows
|
|
7657
|
-
.pipe(takeWhile((_) => this._alive))
|
|
7658
|
-
.subscribe((_) => {
|
|
7659
|
-
this._cdr.markForCheck();
|
|
7660
|
-
});
|
|
7661
|
-
}
|
|
7662
|
-
ngOnDestroy() {
|
|
7663
|
-
this._alive = false;
|
|
7664
|
-
}
|
|
7665
|
-
}
|
|
7666
|
-
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 });
|
|
7667
|
-
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 });
|
|
7668
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SelectionHeadCellComponent, decorators: [{
|
|
7669
|
-
type: Component,
|
|
7670
|
-
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"] }]
|
|
7671
|
-
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { tableCellClass: [{
|
|
7672
|
-
type: HostBinding,
|
|
7673
|
-
args: ['class.table-head__group']
|
|
7674
|
-
}] } });
|
|
7675
|
-
|
|
7676
8003
|
class ColumnResizeEvent {
|
|
7677
8004
|
constructor(column, newWidth) {
|
|
7678
8005
|
this.column = column;
|
|
@@ -7680,13 +8007,6 @@ class ColumnResizeEvent {
|
|
|
7680
8007
|
}
|
|
7681
8008
|
}
|
|
7682
8009
|
|
|
7683
|
-
class SortEvent {
|
|
7684
|
-
constructor(column, shiftKey) {
|
|
7685
|
-
this.column = column;
|
|
7686
|
-
this.shiftKey = shiftKey;
|
|
7687
|
-
}
|
|
7688
|
-
}
|
|
7689
|
-
|
|
7690
8010
|
// eslint-disable-next-line @angular-eslint/component-class-suffix
|
|
7691
8011
|
class HeadCellComponentBase {
|
|
7692
8012
|
}
|
|
@@ -7714,15 +8034,25 @@ class DefaultHeadCellComponent extends HeadCellComponentBase {
|
|
|
7714
8034
|
get column() {
|
|
7715
8035
|
return this._column;
|
|
7716
8036
|
}
|
|
7717
|
-
|
|
8037
|
+
set data(data) {
|
|
8038
|
+
this._data = data;
|
|
8039
|
+
this._cdr.detectChanges();
|
|
8040
|
+
}
|
|
8041
|
+
get data() {
|
|
8042
|
+
return this._data;
|
|
8043
|
+
}
|
|
8044
|
+
ngOnInit() {
|
|
8045
|
+
}
|
|
7718
8046
|
}
|
|
7719
8047
|
DefaultHeadCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DefaultHeadCellComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
7720
|
-
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
|
|
8048
|
+
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;padding:6px 8px}\n"], directives: [{ type: HintDirective, selector: "[tetaHint]", inputs: ["tetaHint", "align", "verticalAlign", "delay"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7721
8049
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DefaultHeadCellComponent, decorators: [{
|
|
7722
8050
|
type: Component,
|
|
7723
|
-
args: [{ selector: 'teta-default-head-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"column column_auto
|
|
8051
|
+
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;padding:6px 8px}\n"] }]
|
|
7724
8052
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
7725
8053
|
type: Input
|
|
8054
|
+
}], data: [{
|
|
8055
|
+
type: Input
|
|
7726
8056
|
}] } });
|
|
7727
8057
|
|
|
7728
8058
|
class HeadCellHostComponent {
|
|
@@ -7738,6 +8068,15 @@ class HeadCellHostComponent {
|
|
|
7738
8068
|
get column() {
|
|
7739
8069
|
return this._column;
|
|
7740
8070
|
}
|
|
8071
|
+
set data(data) {
|
|
8072
|
+
this._data = data;
|
|
8073
|
+
if (this.init) {
|
|
8074
|
+
this.componentRef.instance.data = this._data;
|
|
8075
|
+
}
|
|
8076
|
+
}
|
|
8077
|
+
get data() {
|
|
8078
|
+
return this._data;
|
|
8079
|
+
}
|
|
7741
8080
|
ngOnInit() {
|
|
7742
8081
|
if (!HeadCellComponentBase.isPrototypeOf(this.column.headCellComponent)) {
|
|
7743
8082
|
this.column.headCellComponent = DefaultHeadCellComponent;
|
|
@@ -7745,18 +8084,28 @@ class HeadCellHostComponent {
|
|
|
7745
8084
|
this.componentRef =
|
|
7746
8085
|
this.viewContainerRef.createComponent(this.column.headCellComponent);
|
|
7747
8086
|
this.componentRef.instance.column = this.column;
|
|
8087
|
+
this.componentRef.instance.data = this.data;
|
|
7748
8088
|
this.init = true;
|
|
7749
8089
|
}
|
|
7750
8090
|
}
|
|
7751
8091
|
HeadCellHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HeadCellHostComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
7752
|
-
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 });
|
|
8092
|
+
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 });
|
|
7753
8093
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HeadCellHostComponent, decorators: [{
|
|
7754
8094
|
type: Component,
|
|
7755
8095
|
args: [{ selector: 'teta-head-cell-host', template: '', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:contents}\n"] }]
|
|
7756
8096
|
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { column: [{
|
|
7757
8097
|
type: Input
|
|
8098
|
+
}], data: [{
|
|
8099
|
+
type: Input
|
|
7758
8100
|
}] } });
|
|
7759
8101
|
|
|
8102
|
+
class SortEvent {
|
|
8103
|
+
constructor(column, shiftKey) {
|
|
8104
|
+
this.column = column;
|
|
8105
|
+
this.shiftKey = shiftKey;
|
|
8106
|
+
}
|
|
8107
|
+
}
|
|
8108
|
+
|
|
7760
8109
|
class TabContentDirective {
|
|
7761
8110
|
constructor(template) {
|
|
7762
8111
|
this.template = template;
|
|
@@ -7871,7 +8220,7 @@ class TabsComponent {
|
|
|
7871
8220
|
}
|
|
7872
8221
|
}
|
|
7873
8222
|
TabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7874
|
-
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:
|
|
8223
|
+
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"] }] });
|
|
7875
8224
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TabsComponent, decorators: [{
|
|
7876
8225
|
type: Component,
|
|
7877
8226
|
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: [""] }]
|
|
@@ -7979,7 +8328,7 @@ class TreeItemComponent {
|
|
|
7979
8328
|
}
|
|
7980
8329
|
}
|
|
7981
8330
|
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 });
|
|
7982
|
-
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:
|
|
8331
|
+
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: [
|
|
7983
8332
|
trigger('children', [
|
|
7984
8333
|
transition('void => *', [
|
|
7985
8334
|
style({ opacity: '0' }),
|
|
@@ -8056,7 +8405,7 @@ class TreeComponent {
|
|
|
8056
8405
|
}
|
|
8057
8406
|
}
|
|
8058
8407
|
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 });
|
|
8059
|
-
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:
|
|
8408
|
+
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 });
|
|
8060
8409
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TreeComponent, decorators: [{
|
|
8061
8410
|
type: Component,
|
|
8062
8411
|
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: [""] }]
|
|
@@ -8098,7 +8447,7 @@ class TreeItemToggleComponent {
|
|
|
8098
8447
|
}
|
|
8099
8448
|
}
|
|
8100
8449
|
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 });
|
|
8101
|
-
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":
|
|
8450
|
+
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 });
|
|
8102
8451
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TreeItemToggleComponent, decorators: [{
|
|
8103
8452
|
type: Component,
|
|
8104
8453
|
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"] }]
|
|
@@ -8107,14 +8456,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
8107
8456
|
}] } });
|
|
8108
8457
|
|
|
8109
8458
|
class HeadCellDropdownComponent {
|
|
8110
|
-
constructor(_svc, _cdr) {
|
|
8459
|
+
constructor(_svc, _config, _cdr) {
|
|
8111
8460
|
this._svc = _svc;
|
|
8461
|
+
this._config = _config;
|
|
8112
8462
|
this._cdr = _cdr;
|
|
8113
8463
|
this.dropDownOpenChange = new EventEmitter();
|
|
8114
8464
|
this.autosize = new EventEmitter();
|
|
8115
8465
|
this.autosizeAll = new EventEmitter();
|
|
8116
|
-
this.shadow = true;
|
|
8117
|
-
this.bg = true;
|
|
8118
8466
|
this._alive = true;
|
|
8119
8467
|
this.compareItems = (item) => item.name;
|
|
8120
8468
|
this.setChildrenVisibility = (column, visible, hiddenColumns) => {
|
|
@@ -8138,7 +8486,8 @@ class HeadCellDropdownComponent {
|
|
|
8138
8486
|
this.showParents(column, hiddenColumns);
|
|
8139
8487
|
}
|
|
8140
8488
|
};
|
|
8141
|
-
this.
|
|
8489
|
+
this.locale = this._config.locale;
|
|
8490
|
+
this.filterOptions = this._svc.filterOptions;
|
|
8142
8491
|
this._svc.hiddenColumns
|
|
8143
8492
|
.pipe(takeWhile((_) => this._alive), map((_) => [..._]))
|
|
8144
8493
|
.subscribe((_) => {
|
|
@@ -8179,12 +8528,23 @@ class HeadCellDropdownComponent {
|
|
|
8179
8528
|
pinColumn() {
|
|
8180
8529
|
this._svc.pinColumn(this.column);
|
|
8181
8530
|
}
|
|
8531
|
+
sortAsc(event) {
|
|
8532
|
+
this._svc.sortAsc(new SortEvent(this.column, event.shiftKey));
|
|
8533
|
+
}
|
|
8534
|
+
sortDesc(event) {
|
|
8535
|
+
this._svc.sortDesc(new SortEvent(this.column, event.shiftKey));
|
|
8536
|
+
}
|
|
8182
8537
|
clearSort() {
|
|
8183
8538
|
this._svc.clearSort(this.column);
|
|
8184
8539
|
}
|
|
8185
8540
|
clearAllSort() {
|
|
8186
8541
|
this._svc.clearAllSort();
|
|
8187
8542
|
}
|
|
8543
|
+
// sortColumn(column: TableColumn, event: MouseEvent): void {
|
|
8544
|
+
// if (!event.defaultPrevented) {
|
|
8545
|
+
// this._svc.sort(new SortEvent(this.column, event.shiftKey));
|
|
8546
|
+
// }
|
|
8547
|
+
// }
|
|
8188
8548
|
hasFilteredColumns() {
|
|
8189
8549
|
return StateUtil.hasFilteredColumns(this.state);
|
|
8190
8550
|
}
|
|
@@ -8261,17 +8621,19 @@ class HeadCellDropdownComponent {
|
|
|
8261
8621
|
return ArrayUtil.findRecursive(columns, (iterableNode) => { var _a; return ((_a = iterableNode.columns) === null || _a === void 0 ? void 0 : _a.indexOf(column)) >= 0; }, 'columns');
|
|
8262
8622
|
}
|
|
8263
8623
|
}
|
|
8264
|
-
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 });
|
|
8265
|
-
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()" }
|
|
8624
|
+
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 });
|
|
8625
|
+
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 });
|
|
8266
8626
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HeadCellDropdownComponent, decorators: [{
|
|
8267
8627
|
type: Component,
|
|
8268
|
-
args: [{ selector: 'teta-head-cell-dropdown', changeDetection: ChangeDetectionStrategy.OnPush, template: "<teta-tabs class=\"column_auto\"
|
|
8269
|
-
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { columns: [{
|
|
8628
|
+
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"] }]
|
|
8629
|
+
}], ctorParameters: function () { return [{ type: TableService }, { type: TetaConfigService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { columns: [{
|
|
8270
8630
|
type: Input
|
|
8271
8631
|
}], column: [{
|
|
8272
8632
|
type: Input
|
|
8273
8633
|
}], state: [{
|
|
8274
8634
|
type: Input
|
|
8635
|
+
}], data: [{
|
|
8636
|
+
type: Input
|
|
8275
8637
|
}], dropDownOpen: [{
|
|
8276
8638
|
type: Input
|
|
8277
8639
|
}], dropDownOpenChange: [{
|
|
@@ -8280,12 +8642,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
8280
8642
|
type: Output
|
|
8281
8643
|
}], autosizeAll: [{
|
|
8282
8644
|
type: Output
|
|
8283
|
-
}], shadow: [{
|
|
8284
|
-
type: HostBinding,
|
|
8285
|
-
args: ['class.shadow-2']
|
|
8286
|
-
}], bg: [{
|
|
8287
|
-
type: HostBinding,
|
|
8288
|
-
args: ['class.bg-background-50']
|
|
8289
8645
|
}], enter: [{
|
|
8290
8646
|
type: HostListener,
|
|
8291
8647
|
args: ['keydown.enter']
|
|
@@ -8429,11 +8785,6 @@ class HeadCellComponent {
|
|
|
8429
8785
|
autosizeAllColumns() {
|
|
8430
8786
|
this._svc.autosizeAllColumns(this._elementRef.nativeElement);
|
|
8431
8787
|
}
|
|
8432
|
-
sortColumn(column, event) {
|
|
8433
|
-
if (!event.defaultPrevented) {
|
|
8434
|
-
this._svc.sort(new SortEvent(this.column, event.shiftKey));
|
|
8435
|
-
}
|
|
8436
|
-
}
|
|
8437
8788
|
resizeStart(event) {
|
|
8438
8789
|
const rect = this._elementRef.nativeElement.getBoundingClientRect();
|
|
8439
8790
|
this._startPosition = rect.x;
|
|
@@ -8441,8 +8792,10 @@ class HeadCellComponent {
|
|
|
8441
8792
|
}
|
|
8442
8793
|
resizeProcess(event) {
|
|
8443
8794
|
if (this._startPosition && event.pageX > 0) {
|
|
8444
|
-
|
|
8445
|
-
|
|
8795
|
+
requestAnimationFrame(() => {
|
|
8796
|
+
this._svc.resizeColumn(new ColumnResizeEvent(this.column, event.pageX - this._startPosition));
|
|
8797
|
+
this._app.tick();
|
|
8798
|
+
});
|
|
8446
8799
|
}
|
|
8447
8800
|
}
|
|
8448
8801
|
resizeEnd() {
|
|
@@ -8450,14 +8803,19 @@ class HeadCellComponent {
|
|
|
8450
8803
|
}
|
|
8451
8804
|
}
|
|
8452
8805
|
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 });
|
|
8453
|
-
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 <
|
|
8806
|
+
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 });
|
|
8454
8807
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HeadCellComponent, decorators: [{
|
|
8455
8808
|
type: Component,
|
|
8456
|
-
args: [{ selector: 'teta-head-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div draggable=\"true\" class=\"row row_auto\">\n <
|
|
8809
|
+
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"] }]
|
|
8457
8810
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ApplicationRef }, { type: i0.ElementRef }]; }, propDecorators: { column: [{
|
|
8458
8811
|
type: Input
|
|
8459
8812
|
}], showHeadCellMenu: [{
|
|
8460
8813
|
type: Input
|
|
8814
|
+
}], data: [{
|
|
8815
|
+
type: Input
|
|
8816
|
+
}], dropDownOpen: [{
|
|
8817
|
+
type: HostBinding,
|
|
8818
|
+
args: ['class.table-head__cell_active']
|
|
8461
8819
|
}], dragstart: [{
|
|
8462
8820
|
type: HostListener,
|
|
8463
8821
|
args: ['dragstart', ['$event']]
|
|
@@ -8496,40 +8854,55 @@ class TableHeadGroupComponent {
|
|
|
8496
8854
|
get column() {
|
|
8497
8855
|
return this._column;
|
|
8498
8856
|
}
|
|
8499
|
-
get
|
|
8500
|
-
var _a;
|
|
8501
|
-
|
|
8857
|
+
get flexGrow() {
|
|
8858
|
+
var _a, _b, _c;
|
|
8859
|
+
if (((_b = (_a = this.column) === null || _a === void 0 ? void 0 : _a.columns) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
8860
|
+
const flat = ArrayUtil.flatten((_c = this.column) === null || _c === void 0 ? void 0 : _c.columns, 'columns', true);
|
|
8861
|
+
return flat === null || flat === void 0 ? void 0 : flat.reduce((prev, curr) => prev + curr.flex, 0);
|
|
8862
|
+
}
|
|
8863
|
+
return this.column.flex;
|
|
8502
8864
|
}
|
|
8503
|
-
get
|
|
8504
|
-
var _a;
|
|
8505
|
-
if (((_a = this.
|
|
8506
|
-
|
|
8865
|
+
get flexBasis() {
|
|
8866
|
+
var _a, _b, _c;
|
|
8867
|
+
if (((_b = (_a = this.column) === null || _a === void 0 ? void 0 : _a.columns) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
8868
|
+
const flat = ArrayUtil.flatten((_c = this.column) === null || _c === void 0 ? void 0 : _c.columns, 'columns', true);
|
|
8869
|
+
return flat === null || flat === void 0 ? void 0 : flat.reduce((prev, curr) => prev + curr.width, 0);
|
|
8507
8870
|
}
|
|
8508
|
-
return
|
|
8871
|
+
return this.column.width;
|
|
8509
8872
|
}
|
|
8510
|
-
get
|
|
8511
|
-
|
|
8873
|
+
get _leaves() {
|
|
8874
|
+
var _a;
|
|
8875
|
+
return (_a = TableUtil.getColumnLeaves(this._column)) === null || _a === void 0 ? void 0 : _a.filter((_) => this._hiddenColumns.indexOf(_.name) < 0);
|
|
8512
8876
|
}
|
|
8513
8877
|
columnIsHidden(column) {
|
|
8514
8878
|
return this._svc.columnIsHidden(column);
|
|
8515
8879
|
}
|
|
8516
|
-
ngOnInit() {
|
|
8880
|
+
ngOnInit() {
|
|
8881
|
+
}
|
|
8517
8882
|
ngOnDestroy() {
|
|
8518
8883
|
this._alive = false;
|
|
8519
8884
|
}
|
|
8520
8885
|
}
|
|
8521
8886
|
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 });
|
|
8522
|
-
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.
|
|
8887
|
+
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 });
|
|
8523
8888
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableHeadGroupComponent, decorators: [{
|
|
8524
8889
|
type: Component,
|
|
8525
|
-
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\"
|
|
8890
|
+
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: [""] }]
|
|
8526
8891
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { showHeadCellMenu: [{
|
|
8527
8892
|
type: Input
|
|
8893
|
+
}], data: [{
|
|
8894
|
+
type: Input
|
|
8528
8895
|
}], column: [{
|
|
8529
8896
|
type: Input
|
|
8530
|
-
}],
|
|
8897
|
+
}], flexGrow: [{
|
|
8531
8898
|
type: HostBinding,
|
|
8532
|
-
args: ['style.
|
|
8899
|
+
args: ['style.flex-grow']
|
|
8900
|
+
}], flexBasis: [{
|
|
8901
|
+
type: HostBinding,
|
|
8902
|
+
args: ['style.min-width.px']
|
|
8903
|
+
}, {
|
|
8904
|
+
type: HostBinding,
|
|
8905
|
+
args: ['style.flex-basis.px']
|
|
8533
8906
|
}] } });
|
|
8534
8907
|
|
|
8535
8908
|
class TableHeadComponent {
|
|
@@ -8547,22 +8920,21 @@ class TableHeadComponent {
|
|
|
8547
8920
|
const [columns, hiddenColumns] = values;
|
|
8548
8921
|
this._hiddenColumns = hiddenColumns;
|
|
8549
8922
|
this.columns = columns;
|
|
8550
|
-
|
|
8551
|
-
.filter((_) => this._hiddenColumns.indexOf(_.name) < 0)
|
|
8552
|
-
|
|
8923
|
+
const locked = ArrayUtil.flatten(columns, 'columns', true)
|
|
8924
|
+
.filter((_) => this._hiddenColumns.indexOf(_.name) < 0 && _.locked);
|
|
8925
|
+
const startWidth = this.selectType !== SelectType.none ? 28 : 0;
|
|
8926
|
+
this.lockedFlex = locked.reduce((prev, curr) => prev + curr.flex, 0);
|
|
8927
|
+
this.lockedWidth = locked.reduce((prev, curr) => prev + curr.width, startWidth);
|
|
8553
8928
|
this._cdr.markForCheck();
|
|
8554
8929
|
});
|
|
8555
8930
|
this._svc.state.pipe(takeWhile((_) => this._alive)).subscribe((_) => {
|
|
8556
8931
|
this.state = _;
|
|
8557
8932
|
this._cdr.markForCheck();
|
|
8558
8933
|
});
|
|
8559
|
-
|
|
8560
|
-
|
|
8561
|
-
|
|
8562
|
-
|
|
8563
|
-
template = `48px ${template}`;
|
|
8564
|
-
}
|
|
8565
|
-
return template;
|
|
8934
|
+
this._svc.displayData.pipe(takeWhile((_) => this._alive)).subscribe((_) => {
|
|
8935
|
+
this.data = _;
|
|
8936
|
+
this._cdr.markForCheck();
|
|
8937
|
+
});
|
|
8566
8938
|
}
|
|
8567
8939
|
set columns(columns) {
|
|
8568
8940
|
this._columns = columns;
|
|
@@ -8577,37 +8949,20 @@ class TableHeadComponent {
|
|
|
8577
8949
|
get unlocked() {
|
|
8578
8950
|
return this._columns.filter((_) => _.locked === false && this._hiddenColumns.indexOf(_.name) < 0);
|
|
8579
8951
|
}
|
|
8580
|
-
getSpan() {
|
|
8581
|
-
var _a;
|
|
8582
|
-
if (((_a = this.locked) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
8583
|
-
let span = this.locked.length;
|
|
8584
|
-
if (this.selectType !== SelectType.none) {
|
|
8585
|
-
span += 1;
|
|
8586
|
-
}
|
|
8587
|
-
return `span ${span}`;
|
|
8588
|
-
}
|
|
8589
|
-
return null;
|
|
8590
|
-
}
|
|
8591
|
-
getLockedGridTemplateColumns(columns) {
|
|
8592
|
-
let template = TableUtil.getGridTemplateColumns(columns);
|
|
8593
|
-
if (this.selectType !== SelectType.none) {
|
|
8594
|
-
template = `48px ${template}`;
|
|
8595
|
-
}
|
|
8596
|
-
return template;
|
|
8597
|
-
}
|
|
8598
8952
|
track(index, item) {
|
|
8599
8953
|
return item.name;
|
|
8600
8954
|
}
|
|
8601
|
-
ngOnInit() {
|
|
8955
|
+
ngOnInit() {
|
|
8956
|
+
}
|
|
8602
8957
|
ngOnDestroy() {
|
|
8603
8958
|
this._alive = false;
|
|
8604
8959
|
}
|
|
8605
8960
|
}
|
|
8606
8961
|
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 });
|
|
8607
|
-
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"
|
|
8962
|
+
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 });
|
|
8608
8963
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableHeadComponent, decorators: [{
|
|
8609
8964
|
type: Component,
|
|
8610
|
-
args: [{ selector: 'teta-table-head', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"table-head_locked\"\n *ngIf=\"locked?.length\"\n [style.
|
|
8965
|
+
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: [""] }]
|
|
8611
8966
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { selectType: [{
|
|
8612
8967
|
type: Input
|
|
8613
8968
|
}], showHeadCellMenu: [{
|
|
@@ -8615,9 +8970,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
8615
8970
|
}], tableHeadClass: [{
|
|
8616
8971
|
type: HostBinding,
|
|
8617
8972
|
args: ['class.table-head']
|
|
8618
|
-
}], getTemplateColumns: [{
|
|
8619
|
-
type: HostBinding,
|
|
8620
|
-
args: ['style.grid-template-columns']
|
|
8621
8973
|
}] } });
|
|
8622
8974
|
|
|
8623
8975
|
var AggregationType;
|
|
@@ -8658,7 +9010,7 @@ class SelectionCellComponent {
|
|
|
8658
9010
|
}
|
|
8659
9011
|
}
|
|
8660
9012
|
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 });
|
|
8661
|
-
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 });
|
|
9013
|
+
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 });
|
|
8662
9014
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SelectionCellComponent, decorators: [{
|
|
8663
9015
|
type: Component,
|
|
8664
9016
|
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"] }]
|
|
@@ -8679,18 +9031,23 @@ class CellComponentBase {
|
|
|
8679
9031
|
this._alive = true;
|
|
8680
9032
|
}
|
|
8681
9033
|
get edit() {
|
|
8682
|
-
return (this._edit &&
|
|
8683
|
-
this.svc.boolOrFuncCallback(this.column.editable)({
|
|
8684
|
-
column: this.column,
|
|
8685
|
-
row: this.row,
|
|
8686
|
-
}));
|
|
9034
|
+
return (this._edit && this.editable);
|
|
8687
9035
|
}
|
|
8688
|
-
|
|
8689
|
-
this.svc.
|
|
9036
|
+
get editable() {
|
|
9037
|
+
return this.svc.boolOrFuncCallback(this.column.editable)({
|
|
8690
9038
|
column: this.column,
|
|
8691
9039
|
row: this.row,
|
|
8692
9040
|
});
|
|
8693
9041
|
}
|
|
9042
|
+
get index() {
|
|
9043
|
+
return this.svc.getRowIndex(this.row);
|
|
9044
|
+
}
|
|
9045
|
+
valueChanged() {
|
|
9046
|
+
this.svc.changeValue({
|
|
9047
|
+
column: this.column.name,
|
|
9048
|
+
row: this.index,
|
|
9049
|
+
});
|
|
9050
|
+
}
|
|
8694
9051
|
ngOnDestroy() {
|
|
8695
9052
|
this._alive = false;
|
|
8696
9053
|
}
|
|
@@ -8701,38 +9058,27 @@ class CellComponentBase {
|
|
|
8701
9058
|
this.svc.editRowStart
|
|
8702
9059
|
.pipe(takeWhile((_) => this._alive))
|
|
8703
9060
|
.subscribe((cell) => {
|
|
8704
|
-
if (this.
|
|
8705
|
-
!this._edit
|
|
8706
|
-
// &&
|
|
8707
|
-
// this.svc.boolOrFuncCallback(this.svc.cellEditable)({
|
|
8708
|
-
// column: this.column,
|
|
8709
|
-
// row: this.row,
|
|
8710
|
-
// })
|
|
8711
|
-
) {
|
|
9061
|
+
if (this.index === (cell === null || cell === void 0 ? void 0 : cell.row) && !this._edit) {
|
|
8712
9062
|
this.start(cell, 'row');
|
|
8713
9063
|
}
|
|
8714
|
-
if (this.
|
|
9064
|
+
if (this.index !== (cell === null || cell === void 0 ? void 0 : cell.row) && this._edit) {
|
|
8715
9065
|
this.stop();
|
|
8716
9066
|
}
|
|
8717
9067
|
});
|
|
8718
9068
|
this.svc.editCellStart
|
|
8719
9069
|
.pipe(takeWhile((_) => this._alive))
|
|
8720
9070
|
.subscribe((cell) => {
|
|
8721
|
-
if (this.
|
|
8722
|
-
this.column.name === cell.column.name &&
|
|
8723
|
-
!this._edit) {
|
|
9071
|
+
if (this.index === (cell === null || cell === void 0 ? void 0 : cell.row) && this.column.name === (cell === null || cell === void 0 ? void 0 : cell.column) && !this._edit) {
|
|
8724
9072
|
this.start(cell, 'cell');
|
|
8725
9073
|
}
|
|
8726
|
-
if ((this.
|
|
8727
|
-
this._edit) {
|
|
9074
|
+
if ((this.index !== (cell === null || cell === void 0 ? void 0 : cell.row) || this.column.name !== (cell === null || cell === void 0 ? void 0 : cell.column)) && this._edit) {
|
|
8728
9075
|
this.stop();
|
|
8729
9076
|
}
|
|
8730
9077
|
});
|
|
8731
9078
|
this.svc.valueSet
|
|
8732
9079
|
.pipe(takeWhile((_) => this._alive))
|
|
8733
9080
|
.subscribe((cellValue) => {
|
|
8734
|
-
if (this.row === cellValue.
|
|
8735
|
-
&& this.column.name === cellValue.cell.column.name) {
|
|
9081
|
+
if (this.index === cellValue.row && this.column.name === cellValue.column) {
|
|
8736
9082
|
this.row.data[this.column.name] = cellValue.value;
|
|
8737
9083
|
this.cdr.detectChanges();
|
|
8738
9084
|
}
|
|
@@ -8740,15 +9086,15 @@ class CellComponentBase {
|
|
|
8740
9086
|
this.svc.valueChanged
|
|
8741
9087
|
.pipe(takeWhile((_) => this._alive))
|
|
8742
9088
|
.subscribe((cellValue) => {
|
|
8743
|
-
if (this.
|
|
9089
|
+
if (this.index === cellValue.row) {
|
|
8744
9090
|
this.cdr.detectChanges();
|
|
8745
9091
|
}
|
|
8746
9092
|
});
|
|
8747
9093
|
}
|
|
8748
9094
|
start(initiator, type) {
|
|
8749
9095
|
this._edit = true;
|
|
9096
|
+
this.cdr.detectChanges();
|
|
8750
9097
|
this.startEdit(initiator, type);
|
|
8751
|
-
this.cdr.markForCheck();
|
|
8752
9098
|
}
|
|
8753
9099
|
stop() {
|
|
8754
9100
|
this._edit = false;
|
|
@@ -8781,13 +9127,17 @@ class NumericCellComponent extends CellComponentBase {
|
|
|
8781
9127
|
super.ngOnInit();
|
|
8782
9128
|
}
|
|
8783
9129
|
startEdit(initiator, type) {
|
|
8784
|
-
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
|
|
8788
|
-
|
|
8789
|
-
|
|
8790
|
-
|
|
9130
|
+
var _a;
|
|
9131
|
+
if ((initiator === null || initiator === void 0 ? void 0 : initiator.column) === this.column.name) {
|
|
9132
|
+
this.cdr.detectChanges();
|
|
9133
|
+
(_a = this.input.nativeElement) === null || _a === void 0 ? void 0 : _a.focus();
|
|
9134
|
+
// this.input.nativeElement?.select();
|
|
9135
|
+
// this.cdr.detectChanges();
|
|
9136
|
+
// setTimeout(() => {
|
|
9137
|
+
// this.input?.nativeElement.focus();
|
|
9138
|
+
// this.input?.nativeElement.select();
|
|
9139
|
+
// this.cdr.markForCheck();
|
|
9140
|
+
// }, 0);
|
|
8791
9141
|
}
|
|
8792
9142
|
}
|
|
8793
9143
|
stopEdit() {
|
|
@@ -8795,10 +9145,10 @@ class NumericCellComponent extends CellComponentBase {
|
|
|
8795
9145
|
}
|
|
8796
9146
|
}
|
|
8797
9147
|
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 });
|
|
8798
|
-
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'\"
|
|
9148
|
+
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 });
|
|
8799
9149
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NumericCellComponent, decorators: [{
|
|
8800
9150
|
type: Component,
|
|
8801
|
-
args: [{ selector: 'teta-numeric-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"
|
|
9151
|
+
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: [""] }]
|
|
8802
9152
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
8803
9153
|
type: Input
|
|
8804
9154
|
}], row: [{
|
|
@@ -8823,7 +9173,7 @@ class DateCellComponent extends CellComponentBase {
|
|
|
8823
9173
|
this.cdr.detectChanges();
|
|
8824
9174
|
}
|
|
8825
9175
|
startEdit(initiator, type) {
|
|
8826
|
-
if ((initiator === null || initiator === void 0 ? void 0 : initiator.column
|
|
9176
|
+
if ((initiator === null || initiator === void 0 ? void 0 : initiator.column) === this.column.name) {
|
|
8827
9177
|
setTimeout(() => {
|
|
8828
9178
|
var _a;
|
|
8829
9179
|
(_a = this.input) === null || _a === void 0 ? void 0 : _a.focus();
|
|
@@ -8836,10 +9186,10 @@ class DateCellComponent extends CellComponentBase {
|
|
|
8836
9186
|
}
|
|
8837
9187
|
}
|
|
8838
9188
|
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 });
|
|
8839
|
-
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'\"
|
|
9189
|
+
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 });
|
|
8840
9190
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DateCellComponent, decorators: [{
|
|
8841
9191
|
type: Component,
|
|
8842
|
-
args: [{ selector: 'teta-date-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"
|
|
9192
|
+
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: [""] }]
|
|
8843
9193
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
8844
9194
|
type: Input
|
|
8845
9195
|
}], row: [{
|
|
@@ -8876,7 +9226,7 @@ class ListCellComponent extends CellComponentBase {
|
|
|
8876
9226
|
this.valueChanged();
|
|
8877
9227
|
}
|
|
8878
9228
|
startEdit(initiator, type) {
|
|
8879
|
-
if ((initiator === null || initiator === void 0 ? void 0 : initiator.column
|
|
9229
|
+
if ((initiator === null || initiator === void 0 ? void 0 : initiator.column) === this.column.name) {
|
|
8880
9230
|
setTimeout(() => {
|
|
8881
9231
|
var _a;
|
|
8882
9232
|
(_a = this.input) === null || _a === void 0 ? void 0 : _a.focus();
|
|
@@ -8904,10 +9254,10 @@ class ListCellComponent extends CellComponentBase {
|
|
|
8904
9254
|
}
|
|
8905
9255
|
}
|
|
8906
9256
|
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 });
|
|
8907
|
-
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'\"
|
|
9257
|
+
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 });
|
|
8908
9258
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ListCellComponent, decorators: [{
|
|
8909
9259
|
type: Component,
|
|
8910
|
-
args: [{ selector: 'teta-list-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"
|
|
9260
|
+
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: [""] }]
|
|
8911
9261
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
8912
9262
|
type: Input
|
|
8913
9263
|
}], row: [{
|
|
@@ -8932,24 +9282,30 @@ class StringCellComponent extends CellComponentBase {
|
|
|
8932
9282
|
super.ngOnInit();
|
|
8933
9283
|
}
|
|
8934
9284
|
startEdit(initiator, type) {
|
|
8935
|
-
|
|
8936
|
-
|
|
8937
|
-
|
|
8938
|
-
|
|
8939
|
-
|
|
8940
|
-
|
|
8941
|
-
|
|
9285
|
+
var _a, _b;
|
|
9286
|
+
if ((initiator === null || initiator === void 0 ? void 0 : initiator.column) === this.column.name) {
|
|
9287
|
+
this.cdr.detectChanges();
|
|
9288
|
+
(_a = this.input.nativeElement) === null || _a === void 0 ? void 0 : _a.focus();
|
|
9289
|
+
(_b = this.input.nativeElement) === null || _b === void 0 ? void 0 : _b.select();
|
|
9290
|
+
// this.cdr.detectChanges();
|
|
9291
|
+
// this.input.nativeElement?.focus();
|
|
9292
|
+
// this.input.nativeElement?.select();
|
|
9293
|
+
// this.cdr.detectChanges();
|
|
9294
|
+
// setTimeout(() => {
|
|
9295
|
+
// this.input.nativeElement?.focus();
|
|
9296
|
+
// this.input.nativeElement?.select();
|
|
9297
|
+
// }, 0);
|
|
8942
9298
|
}
|
|
8943
9299
|
}
|
|
8944
9300
|
stopEdit() {
|
|
8945
|
-
this.cdr.
|
|
9301
|
+
this.cdr.detectChanges();
|
|
8946
9302
|
}
|
|
8947
9303
|
}
|
|
8948
9304
|
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 });
|
|
8949
|
-
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'\"
|
|
9305
|
+
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 });
|
|
8950
9306
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: StringCellComponent, decorators: [{
|
|
8951
9307
|
type: Component,
|
|
8952
|
-
args: [{ selector: 'teta-string-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"
|
|
9308
|
+
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: [""] }]
|
|
8953
9309
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
8954
9310
|
type: Input
|
|
8955
9311
|
}], row: [{
|
|
@@ -8972,7 +9328,7 @@ class BooleanCellComponent extends CellComponentBase {
|
|
|
8972
9328
|
super.ngOnInit();
|
|
8973
9329
|
}
|
|
8974
9330
|
startEdit(initiator, type) {
|
|
8975
|
-
if ((initiator === null || initiator === void 0 ? void 0 : initiator.column
|
|
9331
|
+
if ((initiator === null || initiator === void 0 ? void 0 : initiator.column) === this.column.name) {
|
|
8976
9332
|
this.cdr.markForCheck();
|
|
8977
9333
|
setTimeout(() => {
|
|
8978
9334
|
var _a;
|
|
@@ -8985,10 +9341,10 @@ class BooleanCellComponent extends CellComponentBase {
|
|
|
8985
9341
|
}
|
|
8986
9342
|
}
|
|
8987
9343
|
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 });
|
|
8988
|
-
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'\"
|
|
9344
|
+
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 });
|
|
8989
9345
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: BooleanCellComponent, decorators: [{
|
|
8990
9346
|
type: Component,
|
|
8991
|
-
args: [{ selector: 'teta-boolean-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"
|
|
9347
|
+
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: [""] }]
|
|
8992
9348
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
8993
9349
|
type: Input
|
|
8994
9350
|
}], row: [{
|
|
@@ -9085,11 +9441,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9085
9441
|
}] } });
|
|
9086
9442
|
|
|
9087
9443
|
class TableBodyComponent {
|
|
9088
|
-
constructor(_svc, _cdr) {
|
|
9444
|
+
constructor(_svc, _config, _cdr) {
|
|
9089
9445
|
this._svc = _svc;
|
|
9446
|
+
this._config = _config;
|
|
9090
9447
|
this._cdr = _cdr;
|
|
9091
|
-
this.tableBodyClass = true;
|
|
9092
9448
|
this.selectedRows = [];
|
|
9449
|
+
this.tableBodyClass = true;
|
|
9093
9450
|
this.locked = [];
|
|
9094
9451
|
this.unlocked = [];
|
|
9095
9452
|
this.selectTypeEnum = SelectType;
|
|
@@ -9108,13 +9465,13 @@ class TableBodyComponent {
|
|
|
9108
9465
|
}
|
|
9109
9466
|
return success(data);
|
|
9110
9467
|
};
|
|
9468
|
+
this.locale = this._config.locale;
|
|
9111
9469
|
combineLatest([this._svc.columns, this._svc.hiddenColumns])
|
|
9112
9470
|
.pipe(takeWhile((_) => this._alive))
|
|
9113
9471
|
.subscribe((values) => {
|
|
9114
9472
|
const [columns, hiddenColumns] = values;
|
|
9115
9473
|
this._hiddenColumns = hiddenColumns;
|
|
9116
9474
|
this.columns = ArrayUtil.flatten(columns, 'columns', true).filter((_) => this._hiddenColumns.indexOf(_.name) < 0);
|
|
9117
|
-
this.gridTemplateColumns = TableUtil.getGridTemplateColumns(this.columns.sort((a, b) => Number(b.locked) - Number(a.locked)));
|
|
9118
9475
|
this._cdr.markForCheck();
|
|
9119
9476
|
});
|
|
9120
9477
|
this._svc.displayData.pipe(takeWhile((_) => this._alive)).subscribe((_) => {
|
|
@@ -9128,12 +9485,6 @@ class TableBodyComponent {
|
|
|
9128
9485
|
this._svc.scrollIndex
|
|
9129
9486
|
.pipe(takeWhile((_) => this._alive))
|
|
9130
9487
|
.subscribe((_) => __awaiter(this, void 0, void 0, function* () {
|
|
9131
|
-
// if (this.viewport && this.dataSource && _ !== null) {
|
|
9132
|
-
// await this.dataSource.adapter.relax();
|
|
9133
|
-
// await this.dataSource.adapter.fix({
|
|
9134
|
-
// scrollPosition: (_ + 1) * 24,
|
|
9135
|
-
// });
|
|
9136
|
-
// }
|
|
9137
9488
|
if (this.viewport) {
|
|
9138
9489
|
this.viewport.scrollToIndex(_, 'smooth');
|
|
9139
9490
|
}
|
|
@@ -9157,6 +9508,11 @@ class TableBodyComponent {
|
|
|
9157
9508
|
this._columns = columns;
|
|
9158
9509
|
this.locked = (_a = this._columns) === null || _a === void 0 ? void 0 : _a.filter((_) => _.locked === true);
|
|
9159
9510
|
this.unlocked = (_b = this._columns) === null || _b === void 0 ? void 0 : _b.filter((_) => _.locked === false);
|
|
9511
|
+
const startWidth = this.selectType !== SelectType.none ? 28 : 0;
|
|
9512
|
+
this.lockedFlex = this.locked.reduce((prev, curr) => prev + curr.flex, 0);
|
|
9513
|
+
this.lockedWidth = this.locked.reduce((prev, curr) => prev + curr.width, startWidth);
|
|
9514
|
+
this.totalFlex = this._columns.reduce((prev, curr) => prev + curr.flex, 0);
|
|
9515
|
+
this.totalWidth = this._columns.reduce((prev, curr) => prev + curr.width, startWidth);
|
|
9160
9516
|
}
|
|
9161
9517
|
get columns() {
|
|
9162
9518
|
return this._columns;
|
|
@@ -9185,44 +9541,19 @@ class TableBodyComponent {
|
|
|
9185
9541
|
}
|
|
9186
9542
|
getAggregateText(column) {
|
|
9187
9543
|
if (column.aggregate === AggregationType.sum) {
|
|
9188
|
-
return '
|
|
9544
|
+
return 'sum';
|
|
9189
9545
|
}
|
|
9190
9546
|
if (column.aggregate === AggregationType.avg) {
|
|
9191
|
-
return '
|
|
9547
|
+
return 'avg';
|
|
9192
9548
|
}
|
|
9193
9549
|
if (column.aggregate === AggregationType.min) {
|
|
9194
|
-
return '
|
|
9550
|
+
return 'min';
|
|
9195
9551
|
}
|
|
9196
9552
|
if (column.aggregate === AggregationType.max) {
|
|
9197
|
-
return '
|
|
9553
|
+
return 'max';
|
|
9198
9554
|
}
|
|
9199
9555
|
return '';
|
|
9200
9556
|
}
|
|
9201
|
-
getSpan() {
|
|
9202
|
-
var _a;
|
|
9203
|
-
if (((_a = this.locked) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
9204
|
-
let span = this.locked.length;
|
|
9205
|
-
if (this.selectType !== SelectType.none) {
|
|
9206
|
-
span += 1;
|
|
9207
|
-
}
|
|
9208
|
-
return `span ${span}`;
|
|
9209
|
-
}
|
|
9210
|
-
return null;
|
|
9211
|
-
}
|
|
9212
|
-
getTemplateColumns() {
|
|
9213
|
-
let template = this.gridTemplateColumns;
|
|
9214
|
-
if (this.selectType !== SelectType.none) {
|
|
9215
|
-
template = `48px ${template}`;
|
|
9216
|
-
}
|
|
9217
|
-
return template;
|
|
9218
|
-
}
|
|
9219
|
-
getLockedGridTemplateColumns(columns) {
|
|
9220
|
-
let template = TableUtil.getGridTemplateColumns(columns);
|
|
9221
|
-
if (this.selectType !== SelectType.none) {
|
|
9222
|
-
template = `48px ${template}`;
|
|
9223
|
-
}
|
|
9224
|
-
return template;
|
|
9225
|
-
}
|
|
9226
9557
|
trackRow(index, row) {
|
|
9227
9558
|
return index;
|
|
9228
9559
|
}
|
|
@@ -9249,16 +9580,16 @@ class TableBodyComponent {
|
|
|
9249
9580
|
: current.data[columnName], null);
|
|
9250
9581
|
}
|
|
9251
9582
|
}
|
|
9252
|
-
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 });
|
|
9253
|
-
TableBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: TableBodyComponent, selector: "teta-table-body", inputs: { virtual: "virtual", activeRow: "activeRow",
|
|
9583
|
+
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 });
|
|
9584
|
+
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 });
|
|
9254
9585
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableBodyComponent, decorators: [{
|
|
9255
9586
|
type: Component,
|
|
9256
|
-
args: [{ selector: 'teta-table-body', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cdk-virtual-scroll-viewport *ngIf=\"virtual\"\n class=\"table-body-container\"\n [itemSize]=\"
|
|
9257
|
-
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { virtual: [{
|
|
9587
|
+
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: [""] }]
|
|
9588
|
+
}], ctorParameters: function () { return [{ type: TableService }, { type: TetaConfigService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { virtual: [{
|
|
9258
9589
|
type: Input
|
|
9259
9590
|
}], activeRow: [{
|
|
9260
9591
|
type: Input
|
|
9261
|
-
}],
|
|
9592
|
+
}], selectedRows: [{
|
|
9262
9593
|
type: Input
|
|
9263
9594
|
}], additionalComponent: [{
|
|
9264
9595
|
type: Input
|
|
@@ -9284,34 +9615,141 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9284
9615
|
args: ['class.table-body']
|
|
9285
9616
|
}] } });
|
|
9286
9617
|
|
|
9618
|
+
class ClickService {
|
|
9619
|
+
constructor(_document) {
|
|
9620
|
+
this._document = _document;
|
|
9621
|
+
this.click = fromEvent(this._document, 'click');
|
|
9622
|
+
this.contextMenu = fromEvent(this._document, 'contextmenu');
|
|
9623
|
+
}
|
|
9624
|
+
}
|
|
9625
|
+
ClickService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ClickService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
9626
|
+
ClickService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ClickService, providedIn: 'root' });
|
|
9627
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ClickService, decorators: [{
|
|
9628
|
+
type: Injectable,
|
|
9629
|
+
args: [{
|
|
9630
|
+
providedIn: 'root',
|
|
9631
|
+
}]
|
|
9632
|
+
}], ctorParameters: function () {
|
|
9633
|
+
return [{ type: undefined, decorators: [{
|
|
9634
|
+
type: Inject,
|
|
9635
|
+
args: [DOCUMENT]
|
|
9636
|
+
}] }];
|
|
9637
|
+
} });
|
|
9638
|
+
|
|
9639
|
+
class ContextMenuDirective extends DynamicContentBaseDirective {
|
|
9640
|
+
constructor(_document, _elementRef, _service, _injector, _zone, _cdr, _click) {
|
|
9641
|
+
super(_document, _elementRef, _service, _injector, _zone, _cdr);
|
|
9642
|
+
this._document = _document;
|
|
9643
|
+
this._elementRef = _elementRef;
|
|
9644
|
+
this._service = _service;
|
|
9645
|
+
this._injector = _injector;
|
|
9646
|
+
this._zone = _zone;
|
|
9647
|
+
this._cdr = _cdr;
|
|
9648
|
+
this._click = _click;
|
|
9649
|
+
}
|
|
9650
|
+
get _dynamicContent() {
|
|
9651
|
+
return this.tetaContextMenu;
|
|
9652
|
+
}
|
|
9653
|
+
showContent(event) {
|
|
9654
|
+
if (this.tetaContextMenu) {
|
|
9655
|
+
event.preventDefault();
|
|
9656
|
+
setTimeout(() => {
|
|
9657
|
+
this.createMenu(event);
|
|
9658
|
+
});
|
|
9659
|
+
}
|
|
9660
|
+
}
|
|
9661
|
+
click(event) {
|
|
9662
|
+
if (this._componentRef &&
|
|
9663
|
+
DomUtil.clickedInside(this._componentRef.location.nativeElement, event)) {
|
|
9664
|
+
event.preventDefault();
|
|
9665
|
+
event.stopPropagation();
|
|
9666
|
+
}
|
|
9667
|
+
}
|
|
9668
|
+
ngOnInit() {
|
|
9669
|
+
super.ngOnInit();
|
|
9670
|
+
merge(this._click.click, this._click.contextMenu)
|
|
9671
|
+
.pipe(takeWhile(() => this._alive), filter(() => this._open), filter(() => this._componentRef != null), filter((event) => !DomUtil.clickedInside(this._componentRef.location.nativeElement, event)), tap((_) => {
|
|
9672
|
+
this.destroyContentRef();
|
|
9673
|
+
this.openChange.emit(false);
|
|
9674
|
+
}))
|
|
9675
|
+
.subscribe();
|
|
9676
|
+
}
|
|
9677
|
+
ngOnDestroy() {
|
|
9678
|
+
super.ngOnDestroy();
|
|
9679
|
+
}
|
|
9680
|
+
setPosition() {
|
|
9681
|
+
if (this._componentRef && this._open) {
|
|
9682
|
+
const position = PositionUtil.getPosition({
|
|
9683
|
+
top: this._eventPoint.y,
|
|
9684
|
+
bottom: this._eventPoint.y,
|
|
9685
|
+
left: this._eventPoint.x,
|
|
9686
|
+
right: this._eventPoint.x,
|
|
9687
|
+
}, this._componentRef.location.nativeElement.getBoundingClientRect(), this.align, this.verticalAlign);
|
|
9688
|
+
PositionUtil.setElementPosition(this._componentRef.location.nativeElement, position);
|
|
9689
|
+
}
|
|
9690
|
+
}
|
|
9691
|
+
createMenu(event) {
|
|
9692
|
+
if (this.tetaContextMenu == null) {
|
|
9693
|
+
return;
|
|
9694
|
+
}
|
|
9695
|
+
this._eventPoint = event;
|
|
9696
|
+
this._componentRef = this.createContentRef();
|
|
9697
|
+
this._componentRef.instance.className = [
|
|
9698
|
+
...ArrayUtil.asArray(this.className),
|
|
9699
|
+
'context-menu',
|
|
9700
|
+
];
|
|
9701
|
+
this.openChange.emit(true);
|
|
9702
|
+
}
|
|
9703
|
+
}
|
|
9704
|
+
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 });
|
|
9705
|
+
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 });
|
|
9706
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuDirective, decorators: [{
|
|
9707
|
+
type: Directive,
|
|
9708
|
+
args: [{
|
|
9709
|
+
selector: '[tetaContextMenu]',
|
|
9710
|
+
}]
|
|
9711
|
+
}], ctorParameters: function () {
|
|
9712
|
+
return [{ type: undefined, decorators: [{
|
|
9713
|
+
type: Inject,
|
|
9714
|
+
args: [DOCUMENT]
|
|
9715
|
+
}] }, { type: i0.ElementRef }, { type: DynamicComponentService }, { type: i0.Injector }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: ClickService }];
|
|
9716
|
+
}, propDecorators: { tetaContextMenu: [{
|
|
9717
|
+
type: Input
|
|
9718
|
+
}], showContent: [{
|
|
9719
|
+
type: HostListener,
|
|
9720
|
+
args: ['contextmenu', ['$event']]
|
|
9721
|
+
}], click: [{
|
|
9722
|
+
type: HostListener,
|
|
9723
|
+
args: ['click', ['$event']]
|
|
9724
|
+
}] } });
|
|
9725
|
+
|
|
9287
9726
|
class TableComponent {
|
|
9288
9727
|
constructor(_svc, _elementRef) {
|
|
9289
9728
|
this._svc = _svc;
|
|
9290
9729
|
this._elementRef = _elementRef;
|
|
9291
9730
|
this.data = [];
|
|
9292
9731
|
this.columns = [];
|
|
9293
|
-
this.
|
|
9294
|
-
this.selectType = SelectType.none;
|
|
9732
|
+
this.selectType = SelectType.multiple;
|
|
9295
9733
|
this.groupRowComponent = GroupRowComponent;
|
|
9296
|
-
this.
|
|
9734
|
+
this.trackRow = (index, row) => index;
|
|
9735
|
+
this.editType = EditType.cell;
|
|
9736
|
+
this.editEvent = EditEvent.doubleClick;
|
|
9297
9737
|
this.showHeadCellMenu = true;
|
|
9738
|
+
this.contextMenuOpenChange = new EventEmitter();
|
|
9298
9739
|
this.stateChange = new EventEmitter();
|
|
9299
9740
|
this.bodyLeft = new EventEmitter();
|
|
9300
9741
|
this.activeRowChange = new EventEmitter();
|
|
9301
9742
|
this.selectedRowsChange = new EventEmitter();
|
|
9302
|
-
this.rowLeft = new EventEmitter();
|
|
9303
|
-
this.rowEditStart = new EventEmitter();
|
|
9304
|
-
this.rowEditEnd = new EventEmitter();
|
|
9305
9743
|
this.cellClick = new EventEmitter();
|
|
9306
9744
|
this.cellDoubleClick = new EventEmitter();
|
|
9307
9745
|
this.cellFocus = new EventEmitter();
|
|
9746
|
+
this.cellKeyDown = new EventEmitter();
|
|
9747
|
+
this.rowLeft = new EventEmitter();
|
|
9748
|
+
this.rowEditStart = new EventEmitter();
|
|
9749
|
+
this.rowEditEnd = new EventEmitter();
|
|
9308
9750
|
this.cellEditStart = new EventEmitter();
|
|
9309
9751
|
this.cellEditEnd = new EventEmitter();
|
|
9310
9752
|
this.valueChange = new EventEmitter();
|
|
9311
|
-
this.cellKeyUp = new EventEmitter();
|
|
9312
|
-
this.pasteRows = new EventEmitter();
|
|
9313
|
-
this.addRow = new EventEmitter();
|
|
9314
|
-
this.deleteRows = new EventEmitter();
|
|
9315
9753
|
this.tableService = new EventEmitter();
|
|
9316
9754
|
this.tableClass = true;
|
|
9317
9755
|
this._alive = true;
|
|
@@ -9323,16 +9761,16 @@ class TableComponent {
|
|
|
9323
9761
|
.subscribe((state) => this.stateChange.next(state));
|
|
9324
9762
|
this._svc.editCellStart
|
|
9325
9763
|
.pipe(takeWhile((_) => this._alive))
|
|
9326
|
-
.subscribe((item) => this.cellEditStart.emit(item));
|
|
9764
|
+
.subscribe((item) => this.cellEditStart.emit(this._svc.getCellInstance(item)));
|
|
9327
9765
|
this._svc.editCellStop
|
|
9328
9766
|
.pipe(takeWhile((_) => this._alive))
|
|
9329
|
-
.subscribe((item) => this.cellEditEnd.emit(item));
|
|
9767
|
+
.subscribe((item) => this.cellEditEnd.emit(this._svc.getCellInstance(item)));
|
|
9330
9768
|
this._svc.editRowStart
|
|
9331
9769
|
.pipe(takeWhile((_) => this._alive))
|
|
9332
|
-
.subscribe((item) => this.rowEditStart.emit(item
|
|
9770
|
+
.subscribe((item) => this.rowEditStart.emit(this._svc.getCellInstance(item)));
|
|
9333
9771
|
this._svc.editRowStop
|
|
9334
9772
|
.pipe(takeWhile((_) => this._alive))
|
|
9335
|
-
.subscribe((item) => this.rowEditEnd.emit(item === null || item === void 0 ? void 0 : item.row));
|
|
9773
|
+
.subscribe((item) => this.rowEditEnd.emit(this._svc.getRowByIndex(item === null || item === void 0 ? void 0 : item.row)));
|
|
9336
9774
|
this._svc.selectedRows
|
|
9337
9775
|
.pipe(takeWhile((_) => this._alive))
|
|
9338
9776
|
.subscribe((items) => {
|
|
@@ -9345,7 +9783,7 @@ class TableComponent {
|
|
|
9345
9783
|
this._svc.valueChanged
|
|
9346
9784
|
.pipe(takeWhile((_) => this._alive))
|
|
9347
9785
|
.subscribe((coordinates) => {
|
|
9348
|
-
this.valueChange.emit(coordinates);
|
|
9786
|
+
this.valueChange.emit(this._svc.getCellInstance(coordinates));
|
|
9349
9787
|
});
|
|
9350
9788
|
}
|
|
9351
9789
|
set state(state) {
|
|
@@ -9357,19 +9795,38 @@ class TableComponent {
|
|
|
9357
9795
|
handleClickOutsideAnyRow(event) {
|
|
9358
9796
|
const coordinates = this.getCoordinates(event);
|
|
9359
9797
|
if (coordinates) {
|
|
9360
|
-
this.cellClick.emit(coordinates);
|
|
9798
|
+
this.cellClick.emit(Object.assign(Object.assign({}, this._svc.getCellInstance(coordinates)), { event }));
|
|
9361
9799
|
if (this.editEvent === EditEvent.click) {
|
|
9362
9800
|
this.startEditRowOrCell(coordinates);
|
|
9363
9801
|
}
|
|
9802
|
+
else {
|
|
9803
|
+
if (this._svc.currentEditCell && (coordinates.row !== this._svc.currentEditCell.row || coordinates.column !== this._svc.currentEditCell.column)) {
|
|
9804
|
+
this.startEditRowOrCell(null);
|
|
9805
|
+
}
|
|
9806
|
+
}
|
|
9807
|
+
}
|
|
9808
|
+
const row = this.getRow(event);
|
|
9809
|
+
if (row) {
|
|
9810
|
+
if (event.ctrlKey) {
|
|
9811
|
+
this._svc.selectOrDeselectRow(row);
|
|
9812
|
+
}
|
|
9813
|
+
if (event.shiftKey) {
|
|
9814
|
+
this._svc.selectRange(row);
|
|
9815
|
+
}
|
|
9364
9816
|
}
|
|
9365
9817
|
if (!this.eventIsOnRow(event) && !event.defaultPrevented) {
|
|
9366
|
-
this.
|
|
9818
|
+
if (this.editType === EditType.row) {
|
|
9819
|
+
this._svc.startEditRow(null);
|
|
9820
|
+
}
|
|
9821
|
+
else {
|
|
9822
|
+
this._svc.startEditCell(null);
|
|
9823
|
+
}
|
|
9367
9824
|
}
|
|
9368
9825
|
}
|
|
9369
9826
|
focusIn(event) {
|
|
9370
9827
|
const coordinates = this.getCoordinates(event);
|
|
9371
9828
|
if (coordinates) {
|
|
9372
|
-
this.cellFocus.emit(coordinates);
|
|
9829
|
+
this.cellFocus.emit(Object.assign(Object.assign({}, this._svc.getCellInstance(coordinates)), { event }));
|
|
9373
9830
|
if (this.editEvent === EditEvent.focus) {
|
|
9374
9831
|
this.startEditRowOrCell(coordinates);
|
|
9375
9832
|
}
|
|
@@ -9378,26 +9835,85 @@ class TableComponent {
|
|
|
9378
9835
|
dblclick(event) {
|
|
9379
9836
|
const coordinates = this.getCoordinates(event);
|
|
9380
9837
|
if (coordinates) {
|
|
9381
|
-
this.cellDoubleClick.emit(coordinates);
|
|
9838
|
+
this.cellDoubleClick.emit(Object.assign(Object.assign({}, this._svc.getCellInstance(coordinates)), { event }));
|
|
9382
9839
|
if (this.editEvent === EditEvent.doubleClick) {
|
|
9383
9840
|
this.startEditRowOrCell(coordinates);
|
|
9384
9841
|
}
|
|
9385
9842
|
}
|
|
9386
9843
|
}
|
|
9387
|
-
|
|
9388
|
-
|
|
9389
|
-
|
|
9390
|
-
this.cellKeyUp.emit(coordinates);
|
|
9391
|
-
}
|
|
9392
|
-
switch (event.key) {
|
|
9393
|
-
case 'Enter':
|
|
9844
|
+
keydown(event) {
|
|
9845
|
+
if (event.key === 'Escape') {
|
|
9846
|
+
if (this.editType === EditType.row) {
|
|
9394
9847
|
this._svc.startEditRow(null);
|
|
9395
|
-
|
|
9396
|
-
|
|
9848
|
+
}
|
|
9849
|
+
else {
|
|
9850
|
+
this._svc.startEditCell(null);
|
|
9851
|
+
}
|
|
9852
|
+
}
|
|
9853
|
+
const coordinates = this.getCoordinates(event);
|
|
9854
|
+
if (event.key === 'Enter') {
|
|
9855
|
+
if (this.editType === EditType.row) {
|
|
9397
9856
|
this._svc.startEditRow(null);
|
|
9398
|
-
|
|
9399
|
-
|
|
9400
|
-
|
|
9857
|
+
}
|
|
9858
|
+
else {
|
|
9859
|
+
if (this._svc.currentEditCell) {
|
|
9860
|
+
const target = this._svc.getNextRowCell(coordinates);
|
|
9861
|
+
if (target) {
|
|
9862
|
+
this.startEditRowOrCell({
|
|
9863
|
+
row: target.row,
|
|
9864
|
+
column: target.column,
|
|
9865
|
+
event: undefined
|
|
9866
|
+
});
|
|
9867
|
+
}
|
|
9868
|
+
else {
|
|
9869
|
+
this._svc.startEditCell(null);
|
|
9870
|
+
}
|
|
9871
|
+
}
|
|
9872
|
+
}
|
|
9873
|
+
}
|
|
9874
|
+
if (coordinates) {
|
|
9875
|
+
this.cellKeyDown.emit(Object.assign(Object.assign({}, this._svc.getCellInstance(coordinates)), { event }));
|
|
9876
|
+
if (event.key && (event.key.length === 1 || event.key === 'Delete')) {
|
|
9877
|
+
this.startEditRowOrCell({
|
|
9878
|
+
row: coordinates.row,
|
|
9879
|
+
column: coordinates.column,
|
|
9880
|
+
event: event
|
|
9881
|
+
});
|
|
9882
|
+
}
|
|
9883
|
+
if (event.key === 'Tab' && this._svc.currentEditCell) {
|
|
9884
|
+
event.preventDefault();
|
|
9885
|
+
let target = this._svc.getNextEditableCell(coordinates);
|
|
9886
|
+
if (event.shiftKey) {
|
|
9887
|
+
target = this._svc.getPreviousEditableCell(coordinates);
|
|
9888
|
+
}
|
|
9889
|
+
if (target) {
|
|
9890
|
+
this.startEditRowOrCell({
|
|
9891
|
+
row: target.row,
|
|
9892
|
+
column: target.column,
|
|
9893
|
+
event: undefined
|
|
9894
|
+
});
|
|
9895
|
+
}
|
|
9896
|
+
}
|
|
9897
|
+
if (!this._svc.currentEditCell) {
|
|
9898
|
+
let target;
|
|
9899
|
+
if (event.key === 'ArrowRight') {
|
|
9900
|
+
target = this._svc.getNextCell(coordinates);
|
|
9901
|
+
}
|
|
9902
|
+
if (event.key === 'ArrowLeft') {
|
|
9903
|
+
target = this._svc.getPreviousCell(coordinates);
|
|
9904
|
+
}
|
|
9905
|
+
if (event.key === 'ArrowUp') {
|
|
9906
|
+
target = this._svc.getPreviousRowCell(coordinates);
|
|
9907
|
+
}
|
|
9908
|
+
if (event.key === 'ArrowDown') {
|
|
9909
|
+
target = this._svc.getNextRowCell(coordinates);
|
|
9910
|
+
}
|
|
9911
|
+
if (target) {
|
|
9912
|
+
event.preventDefault();
|
|
9913
|
+
const element = this.getCellElement(target);
|
|
9914
|
+
element === null || element === void 0 ? void 0 : element.focus();
|
|
9915
|
+
}
|
|
9916
|
+
}
|
|
9401
9917
|
}
|
|
9402
9918
|
}
|
|
9403
9919
|
mousedown(event) {
|
|
@@ -9405,51 +9921,6 @@ class TableComponent {
|
|
|
9405
9921
|
event.preventDefault();
|
|
9406
9922
|
}
|
|
9407
9923
|
}
|
|
9408
|
-
contextMenu(event) {
|
|
9409
|
-
var _a;
|
|
9410
|
-
if (this.getSelectedText() ||
|
|
9411
|
-
((_a = this.contextMenuConfig) === null || _a === void 0 ? void 0 : _a.contextMenu) === false) {
|
|
9412
|
-
return;
|
|
9413
|
-
}
|
|
9414
|
-
event.preventDefault();
|
|
9415
|
-
event.stopPropagation();
|
|
9416
|
-
this.contextMenuTarget = this.getCoordinates(event);
|
|
9417
|
-
this.showContextMenu = true;
|
|
9418
|
-
this.setPosition(event);
|
|
9419
|
-
}
|
|
9420
|
-
rowAdd() {
|
|
9421
|
-
this.addRow.emit();
|
|
9422
|
-
this.contextMenuTarget = null;
|
|
9423
|
-
this.showContextMenu = false;
|
|
9424
|
-
}
|
|
9425
|
-
copy(rows) {
|
|
9426
|
-
of(1)
|
|
9427
|
-
.pipe(withLatestFrom(this._svc.columns, this._svc.hiddenColumns))
|
|
9428
|
-
.subscribe((data) => {
|
|
9429
|
-
const [, columns, hidden] = data;
|
|
9430
|
-
navigator.clipboard.writeText(this.toClipboardString(rows, this.getVisibleColumns(columns, hidden)));
|
|
9431
|
-
this.contextMenuTarget = null;
|
|
9432
|
-
this.showContextMenu = false;
|
|
9433
|
-
});
|
|
9434
|
-
}
|
|
9435
|
-
delete(rows) {
|
|
9436
|
-
this.deleteRows.emit(rows);
|
|
9437
|
-
this.contextMenuTarget = null;
|
|
9438
|
-
this.showContextMenu = false;
|
|
9439
|
-
}
|
|
9440
|
-
pasteData() {
|
|
9441
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
9442
|
-
const result = yield navigator.clipboard.readText();
|
|
9443
|
-
of(1)
|
|
9444
|
-
.pipe(withLatestFrom(this._svc.columns, this._svc.hiddenColumns))
|
|
9445
|
-
.subscribe((data) => {
|
|
9446
|
-
const [, columns, hidden] = data;
|
|
9447
|
-
this.pasteRows.emit(this.fromClipboard(result, this.getVisibleColumns(columns, hidden)));
|
|
9448
|
-
});
|
|
9449
|
-
this.contextMenuTarget = null;
|
|
9450
|
-
this.showContextMenu = false;
|
|
9451
|
-
});
|
|
9452
|
-
}
|
|
9453
9924
|
ngOnInit() {
|
|
9454
9925
|
this._svc.restoreState();
|
|
9455
9926
|
this._svc.restoreHiddenColumns();
|
|
@@ -9492,7 +9963,18 @@ class TableComponent {
|
|
|
9492
9963
|
}
|
|
9493
9964
|
if (changes.hasOwnProperty('dict')) {
|
|
9494
9965
|
this._svc.setDict(this.dict);
|
|
9966
|
+
this._svc.setFilterOptions(this.dict);
|
|
9967
|
+
}
|
|
9968
|
+
if (changes.hasOwnProperty('filterOptions')) {
|
|
9969
|
+
this._svc.setFilterOptions(this.filterOptions);
|
|
9495
9970
|
}
|
|
9971
|
+
if (changes.hasOwnProperty('trackRow')) {
|
|
9972
|
+
this._svc.trackRow = this.trackRow;
|
|
9973
|
+
}
|
|
9974
|
+
}
|
|
9975
|
+
setContextMenuOpen(value) {
|
|
9976
|
+
this.contextMenuOpen = value;
|
|
9977
|
+
this.contextMenuOpenChange.emit(this.contextMenuOpen);
|
|
9496
9978
|
}
|
|
9497
9979
|
startEditRowOrCell(coordinates) {
|
|
9498
9980
|
if (this.editType === EditType.row) {
|
|
@@ -9508,6 +9990,14 @@ class TableComponent {
|
|
|
9508
9990
|
return ((_a = target.tagName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'teta-cell';
|
|
9509
9991
|
});
|
|
9510
9992
|
}
|
|
9993
|
+
getEventRow(event) {
|
|
9994
|
+
return event.composedPath().find((target) => {
|
|
9995
|
+
return (target === null || target === void 0 ? void 0 : target.getAttribute) && (target === null || target === void 0 ? void 0 : target.getAttribute('data-row'));
|
|
9996
|
+
});
|
|
9997
|
+
}
|
|
9998
|
+
getCellElement(coordinates) {
|
|
9999
|
+
return this._elementRef.nativeElement.querySelector(`teta-cell[data-row="${coordinates.row}"][data-column="${coordinates.column}"]`);
|
|
10000
|
+
}
|
|
9511
10001
|
eventIsOnRow(event) {
|
|
9512
10002
|
const row = event.composedPath().find((target) => {
|
|
9513
10003
|
return (target === null || target === void 0 ? void 0 : target.getAttribute) && (target === null || target === void 0 ? void 0 : target.getAttribute('data-row'));
|
|
@@ -9517,77 +10007,43 @@ class TableComponent {
|
|
|
9517
10007
|
getCoordinates(event) {
|
|
9518
10008
|
const cell = this.getEventCell(event);
|
|
9519
10009
|
if (cell) {
|
|
9520
|
-
const rowIndex = cell.getAttribute('data-row');
|
|
10010
|
+
const rowIndex = parseInt(cell.getAttribute('data-row'), 10);
|
|
9521
10011
|
const columnName = cell.getAttribute('data-column');
|
|
9522
|
-
if (rowIndex && columnName) {
|
|
9523
|
-
const row = this._svc.getRowByIndex(rowIndex);
|
|
9524
|
-
const column = this._svc.getColumnByName(columnName);
|
|
10012
|
+
if (rowIndex >= 0 && columnName) {
|
|
9525
10013
|
return {
|
|
9526
|
-
row,
|
|
9527
|
-
column:
|
|
10014
|
+
row: rowIndex,
|
|
10015
|
+
column: columnName,
|
|
9528
10016
|
event,
|
|
9529
10017
|
};
|
|
9530
10018
|
}
|
|
9531
10019
|
}
|
|
9532
10020
|
return null;
|
|
9533
10021
|
}
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
-
if (
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
top: event.y,
|
|
9544
|
-
bottom: event.y,
|
|
9545
|
-
left: event.x,
|
|
9546
|
-
right: event.x,
|
|
9547
|
-
}, this.menu.nativeElement.getBoundingClientRect(), Align.left, VerticalAlign.auto);
|
|
9548
|
-
PositionUtil.setElementPosition(this.menu.nativeElement, position);
|
|
9549
|
-
}
|
|
9550
|
-
toClipboardString(rows, columns) {
|
|
9551
|
-
return rows.reduce((res, currentRow, i) => `${res}${i === 0 ? '' : '\n'}${columns.reduce((columnResult, column, j) => { var _a; return `${columnResult}${j === 0 ? '' : '\t'}${(_a = currentRow.data[column.name]) !== null && _a !== void 0 ? _a : ''}`; }, '')}`, '');
|
|
9552
|
-
}
|
|
9553
|
-
fromClipboard(data, columns) {
|
|
9554
|
-
const rows = data.split('\n').filter((_) => (_ === null || _ === void 0 ? void 0 : _.length) > 0);
|
|
9555
|
-
const result = rows.map((_) => _.replace('\r', '').replace('\n', '').split('\t'));
|
|
9556
|
-
return result.map((row) => row.reduce((res, item, index) => {
|
|
9557
|
-
var _a, _b, _c;
|
|
9558
|
-
let value = item;
|
|
9559
|
-
if (((_a = columns[index]) === null || _a === void 0 ? void 0 : _a.filterType) === FilterType.number ||
|
|
9560
|
-
((_b = columns[index]) === null || _b === void 0 ? void 0 : _b.filterType) === FilterType.list) {
|
|
9561
|
-
value = parseFloat(item);
|
|
9562
|
-
}
|
|
9563
|
-
if (((_c = columns[index]) === null || _c === void 0 ? void 0 : _c.filterType) === FilterType.boolean) {
|
|
9564
|
-
value = Boolean(JSON.parse(item.toLowerCase()));
|
|
9565
|
-
}
|
|
9566
|
-
if (columns[index]) {
|
|
9567
|
-
res[columns[index].name] = value;
|
|
9568
|
-
}
|
|
9569
|
-
return res;
|
|
9570
|
-
}, {}));
|
|
9571
|
-
}
|
|
9572
|
-
getVisibleColumns(columns, hidden) {
|
|
9573
|
-
const visible = ArrayUtil.flatten(columns, 'columns', true).filter((_) => hidden.indexOf(_.name) < 0);
|
|
9574
|
-
return visible.sort((a, b) => Number(b.locked) - Number(a.locked));
|
|
10022
|
+
getRow(event) {
|
|
10023
|
+
const rowElement = this.getEventRow(event);
|
|
10024
|
+
if (rowElement) {
|
|
10025
|
+
const rowIndex = parseInt(rowElement.getAttribute('data-row'), 10);
|
|
10026
|
+
if (rowIndex >= 0) {
|
|
10027
|
+
return this._svc.getRowByIndex(rowIndex);
|
|
10028
|
+
}
|
|
10029
|
+
}
|
|
10030
|
+
return null;
|
|
9575
10031
|
}
|
|
9576
10032
|
}
|
|
9577
10033
|
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 });
|
|
9578
|
-
TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: TableComponent, selector: "teta-table", inputs: { data: "data", columns: "columns", dict: "dict",
|
|
10034
|
+
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 });
|
|
9579
10035
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableComponent, decorators: [{
|
|
9580
10036
|
type: Component,
|
|
9581
|
-
args: [{ selector: 'teta-table', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TableService], template: "<div class=\"column column_auto\">\n <teta-table-head
|
|
10037
|
+
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: [""] }]
|
|
9582
10038
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ElementRef }]; }, propDecorators: { data: [{
|
|
9583
10039
|
type: Input
|
|
9584
10040
|
}], columns: [{
|
|
9585
10041
|
type: Input
|
|
9586
10042
|
}], dict: [{
|
|
9587
10043
|
type: Input
|
|
9588
|
-
}],
|
|
10044
|
+
}], filterOptions: [{
|
|
9589
10045
|
type: Input
|
|
9590
|
-
}],
|
|
10046
|
+
}], state: [{
|
|
9591
10047
|
type: Input
|
|
9592
10048
|
}], cookieName: [{
|
|
9593
10049
|
type: Input
|
|
@@ -9611,7 +10067,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9611
10067
|
type: Input
|
|
9612
10068
|
}], tree: [{
|
|
9613
10069
|
type: Input
|
|
9614
|
-
}],
|
|
10070
|
+
}], trackRow: [{
|
|
9615
10071
|
type: Input
|
|
9616
10072
|
}], editType: [{
|
|
9617
10073
|
type: Input
|
|
@@ -9623,10 +10079,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9623
10079
|
type: Input
|
|
9624
10080
|
}], scrollToIndex: [{
|
|
9625
10081
|
type: Input
|
|
9626
|
-
}], contextMenuConfig: [{
|
|
9627
|
-
type: Input
|
|
9628
10082
|
}], showHeadCellMenu: [{
|
|
9629
10083
|
type: Input
|
|
10084
|
+
}], contextMenu: [{
|
|
10085
|
+
type: Input
|
|
10086
|
+
}], contextMenuOpen: [{
|
|
10087
|
+
type: Input
|
|
10088
|
+
}], contextMenuOpenChange: [{
|
|
10089
|
+
type: Output
|
|
9630
10090
|
}], stateChange: [{
|
|
9631
10091
|
type: Output
|
|
9632
10092
|
}], bodyLeft: [{
|
|
@@ -9635,31 +10095,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9635
10095
|
type: Output
|
|
9636
10096
|
}], selectedRowsChange: [{
|
|
9637
10097
|
type: Output
|
|
9638
|
-
}], rowLeft: [{
|
|
9639
|
-
type: Output
|
|
9640
|
-
}], rowEditStart: [{
|
|
9641
|
-
type: Output
|
|
9642
|
-
}], rowEditEnd: [{
|
|
9643
|
-
type: Output
|
|
9644
10098
|
}], cellClick: [{
|
|
9645
10099
|
type: Output
|
|
9646
10100
|
}], cellDoubleClick: [{
|
|
9647
10101
|
type: Output
|
|
9648
10102
|
}], cellFocus: [{
|
|
9649
10103
|
type: Output
|
|
9650
|
-
}],
|
|
10104
|
+
}], cellKeyDown: [{
|
|
9651
10105
|
type: Output
|
|
9652
|
-
}],
|
|
10106
|
+
}], rowLeft: [{
|
|
9653
10107
|
type: Output
|
|
9654
|
-
}],
|
|
10108
|
+
}], rowEditStart: [{
|
|
9655
10109
|
type: Output
|
|
9656
|
-
}],
|
|
10110
|
+
}], rowEditEnd: [{
|
|
9657
10111
|
type: Output
|
|
9658
|
-
}],
|
|
10112
|
+
}], cellEditStart: [{
|
|
9659
10113
|
type: Output
|
|
9660
|
-
}],
|
|
10114
|
+
}], cellEditEnd: [{
|
|
9661
10115
|
type: Output
|
|
9662
|
-
}],
|
|
10116
|
+
}], valueChange: [{
|
|
9663
10117
|
type: Output
|
|
9664
10118
|
}], tableService: [{
|
|
9665
10119
|
type: Output
|
|
@@ -9678,15 +10132,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9678
10132
|
}], dblclick: [{
|
|
9679
10133
|
type: HostListener,
|
|
9680
10134
|
args: ['dblclick', ['$event']]
|
|
9681
|
-
}],
|
|
10135
|
+
}], keydown: [{
|
|
9682
10136
|
type: HostListener,
|
|
9683
|
-
args: ['
|
|
10137
|
+
args: ['keydown', ['$event']]
|
|
9684
10138
|
}], mousedown: [{
|
|
9685
10139
|
type: HostListener,
|
|
9686
10140
|
args: ['mousedown', ['$event']]
|
|
9687
|
-
}], contextMenu: [{
|
|
9688
|
-
type: HostListener,
|
|
9689
|
-
args: ['contextmenu', ['$event']]
|
|
9690
10141
|
}] } });
|
|
9691
10142
|
|
|
9692
10143
|
class TabsModule {
|
|
@@ -9773,9 +10224,10 @@ class DateTimeCellComponent extends CellComponentBase {
|
|
|
9773
10224
|
this.valueChanged();
|
|
9774
10225
|
}
|
|
9775
10226
|
startEdit(initiator, type) {
|
|
9776
|
-
if ((initiator === null || initiator === void 0 ? void 0 : initiator.column
|
|
10227
|
+
if ((initiator === null || initiator === void 0 ? void 0 : initiator.column) === this.column.name) {
|
|
9777
10228
|
setTimeout(() => {
|
|
9778
|
-
|
|
10229
|
+
var _a;
|
|
10230
|
+
(_a = this.input) === null || _a === void 0 ? void 0 : _a.openPicker(true);
|
|
9779
10231
|
this.cdr.markForCheck();
|
|
9780
10232
|
}, 0);
|
|
9781
10233
|
}
|
|
@@ -9785,10 +10237,10 @@ class DateTimeCellComponent extends CellComponentBase {
|
|
|
9785
10237
|
}
|
|
9786
10238
|
}
|
|
9787
10239
|
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 });
|
|
9788
|
-
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'\"
|
|
10240
|
+
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 });
|
|
9789
10241
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DateTimeCellComponent, decorators: [{
|
|
9790
10242
|
type: Component,
|
|
9791
|
-
args: [{ selector: 'teta-date-time-cell', template: "<span [style.display]=\"edit ? 'none' : 'block'\"
|
|
10243
|
+
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: [""] }]
|
|
9792
10244
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
9793
10245
|
type: Input
|
|
9794
10246
|
}], row: [{
|
|
@@ -9812,6 +10264,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9812
10264
|
}]
|
|
9813
10265
|
}] });
|
|
9814
10266
|
|
|
10267
|
+
class ContextMenuModule {
|
|
10268
|
+
}
|
|
10269
|
+
ContextMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
10270
|
+
ContextMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, declarations: [ContextMenuDirective], imports: [CommonModule,
|
|
10271
|
+
DynamicComponentModule], exports: [ContextMenuDirective] });
|
|
10272
|
+
ContextMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, imports: [[
|
|
10273
|
+
CommonModule,
|
|
10274
|
+
DynamicComponentModule
|
|
10275
|
+
]] });
|
|
10276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, decorators: [{
|
|
10277
|
+
type: NgModule,
|
|
10278
|
+
args: [{
|
|
10279
|
+
declarations: [ContextMenuDirective],
|
|
10280
|
+
exports: [ContextMenuDirective],
|
|
10281
|
+
imports: [
|
|
10282
|
+
CommonModule,
|
|
10283
|
+
DynamicComponentModule
|
|
10284
|
+
]
|
|
10285
|
+
}]
|
|
10286
|
+
}] });
|
|
10287
|
+
|
|
9815
10288
|
class TableModule {
|
|
9816
10289
|
}
|
|
9817
10290
|
TableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -9850,7 +10323,8 @@ TableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "1
|
|
|
9850
10323
|
ToolbarModule,
|
|
9851
10324
|
ClickOutsideModule,
|
|
9852
10325
|
ResizeDragModule,
|
|
9853
|
-
ScrollingModule
|
|
10326
|
+
ScrollingModule,
|
|
10327
|
+
ContextMenuModule], exports: [TableComponent,
|
|
9854
10328
|
NumericCellComponent,
|
|
9855
10329
|
ListCellComponent,
|
|
9856
10330
|
DateCellComponent,
|
|
@@ -9882,6 +10356,7 @@ TableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "1
|
|
|
9882
10356
|
ClickOutsideModule,
|
|
9883
10357
|
ResizeDragModule,
|
|
9884
10358
|
ScrollingModule,
|
|
10359
|
+
ContextMenuModule,
|
|
9885
10360
|
]] });
|
|
9886
10361
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TableModule, decorators: [{
|
|
9887
10362
|
type: NgModule,
|
|
@@ -9941,6 +10416,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
9941
10416
|
ClickOutsideModule,
|
|
9942
10417
|
ResizeDragModule,
|
|
9943
10418
|
ScrollingModule,
|
|
10419
|
+
ContextMenuModule,
|
|
9944
10420
|
],
|
|
9945
10421
|
}]
|
|
9946
10422
|
}] });
|
|
@@ -10048,7 +10524,8 @@ class Chart3dComponent {
|
|
|
10048
10524
|
ngOnInit() {
|
|
10049
10525
|
this._themeService.theme
|
|
10050
10526
|
.pipe(takeWhile((_) => this._alive), tap((_) => {
|
|
10051
|
-
this.gridColor = _ ? '#
|
|
10527
|
+
this.gridColor = _ ? '#5d6a73' : '#bdbdc6';
|
|
10528
|
+
this.axesColor = _ ? '#8e8f9d' : '#7d8f9a';
|
|
10052
10529
|
this.init();
|
|
10053
10530
|
}))
|
|
10054
10531
|
.subscribe();
|
|
@@ -10057,6 +10534,7 @@ class Chart3dComponent {
|
|
|
10057
10534
|
this.addResizeObserver();
|
|
10058
10535
|
this.createScene();
|
|
10059
10536
|
this.startRenderingLoop();
|
|
10537
|
+
this.init();
|
|
10060
10538
|
}
|
|
10061
10539
|
ngOnDestroy() {
|
|
10062
10540
|
this._alive = false;
|
|
@@ -10070,38 +10548,52 @@ class Chart3dComponent {
|
|
|
10070
10548
|
}
|
|
10071
10549
|
const { x, y, z } = this.getScales(this._config.series);
|
|
10072
10550
|
this.config.series.forEach((data, idx) => {
|
|
10073
|
-
var _a;
|
|
10074
|
-
|
|
10551
|
+
var _a, _b;
|
|
10552
|
+
if (!((_a = data.points) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
10553
|
+
return;
|
|
10554
|
+
}
|
|
10555
|
+
const points = data.points.map((_) => new THREE.Vector3(x(_.x), y(_.y), z(_.z)));
|
|
10075
10556
|
const color = d3.scaleOrdinal(d3.schemeTableau10);
|
|
10076
10557
|
const material = new THREE.LineBasicMaterial({
|
|
10077
|
-
color: (
|
|
10558
|
+
color: (_b = data === null || data === void 0 ? void 0 : data.color) !== null && _b !== void 0 ? _b : color(idx.toString()),
|
|
10559
|
+
});
|
|
10560
|
+
const tubeGeometry = new THREE.TubeGeometry(new THREE.CatmullRomCurve3(points), 1024, 0.5, 20, false);
|
|
10561
|
+
let tube = new THREE.Line(tubeGeometry, material);
|
|
10562
|
+
this._scene.add(tube);
|
|
10563
|
+
});
|
|
10564
|
+
const circles = x.ticks(this.SIDE_SIZE / 10);
|
|
10565
|
+
const material = new THREE.LineBasicMaterial({ color: this.axesColor });
|
|
10566
|
+
const pointsLines = [];
|
|
10567
|
+
pointsLines.push(new THREE.Vector3(0, 0, 0));
|
|
10568
|
+
pointsLines.push(new THREE.Vector3(0, 0, z(-z.domain()[1])));
|
|
10569
|
+
pointsLines.push(new THREE.Vector3(0, 0, 0));
|
|
10570
|
+
pointsLines.push(new THREE.Vector3(x(-x.domain()[1]), 0, 0));
|
|
10571
|
+
const geometryLines = new THREE.BufferGeometry().setFromPoints(pointsLines);
|
|
10572
|
+
const line = new THREE.Line(geometryLines, material);
|
|
10573
|
+
this._scene.add(line);
|
|
10574
|
+
circles.forEach((r) => {
|
|
10575
|
+
const material = new THREE.LineDashedMaterial({
|
|
10576
|
+
color: this.gridColor,
|
|
10577
|
+
dashSize: 1,
|
|
10578
|
+
gapSize: 3
|
|
10078
10579
|
});
|
|
10079
|
-
const
|
|
10080
|
-
|
|
10081
|
-
|
|
10082
|
-
this._scene.add(
|
|
10580
|
+
const circleGeometry = new THREE.BufferGeometry().setFromPoints(new THREE.Path().absarc(0, 0, x(r), 0, Math.PI * 2, false).getSpacedPoints(100));
|
|
10581
|
+
const circle = new THREE.LineSegments(circleGeometry, material);
|
|
10582
|
+
circle.geometry.rotateX(-Math.PI / 2);
|
|
10583
|
+
this._scene.add(circle);
|
|
10083
10584
|
});
|
|
10084
|
-
const plane = new THREE.GridHelper(this.SIDE_SIZE, this.SIDE_SIZE / 10, this.gridColor, this.gridColor);
|
|
10085
|
-
plane.position.set(this.SIDE_SIZE / 2, 0, this.SIDE_SIZE / 2);
|
|
10086
|
-
this._scene.add(plane);
|
|
10087
|
-
const gridX = new THREE.GridHelper(this.SIDE_SIZE, this.SIDE_SIZE / 10, this.gridColor, this.gridColor);
|
|
10088
|
-
gridX.geometry.rotateX(-Math.PI / 2);
|
|
10089
|
-
gridX.position.set(this.SIDE_SIZE / 2, this.SIDE_SIZE / 2, 0);
|
|
10090
|
-
this._scene.add(gridX);
|
|
10091
|
-
const gridY = new THREE.GridHelper(this.SIDE_SIZE, this.SIDE_SIZE / 10, this.gridColor, this.gridColor);
|
|
10092
|
-
gridY.geometry.rotateZ(Math.PI / 2);
|
|
10093
|
-
gridY.position.set(0, this.SIDE_SIZE / 2, this.SIDE_SIZE / 2);
|
|
10094
|
-
this._scene.add(gridY);
|
|
10095
10585
|
this.drawTicks(x, y, z);
|
|
10096
|
-
|
|
10097
|
-
|
|
10098
|
-
|
|
10099
|
-
|
|
10100
|
-
|
|
10101
|
-
|
|
10102
|
-
|
|
10103
|
-
|
|
10104
|
-
|
|
10586
|
+
if (!this._controls) {
|
|
10587
|
+
this._controls = new OrbitControls(this._camera, this._renderer.domElement);
|
|
10588
|
+
this._controls.enableDamping = true;
|
|
10589
|
+
this._controls.enablePan = true;
|
|
10590
|
+
this._controls.dampingFactor = 0.25;
|
|
10591
|
+
this._controls.screenSpacePanning = true;
|
|
10592
|
+
this._controls.minDistance = 0;
|
|
10593
|
+
this._controls.maxDistance = 10000;
|
|
10594
|
+
this._controls.maxPolarAngle = Math.PI / 2;
|
|
10595
|
+
this._controls.enableZoom = true;
|
|
10596
|
+
}
|
|
10105
10597
|
}
|
|
10106
10598
|
createScene() {
|
|
10107
10599
|
this._scene = new THREE.Scene();
|
|
@@ -10165,7 +10657,7 @@ class Chart3dComponent {
|
|
|
10165
10657
|
map: texture,
|
|
10166
10658
|
});
|
|
10167
10659
|
const sprite = new THREE.Sprite(spriteMaterial);
|
|
10168
|
-
sprite.scale.set(
|
|
10660
|
+
sprite.scale.set(0.4 * fontSize, 0.4 * fontSize, 0.4 * fontSize);
|
|
10169
10661
|
return sprite;
|
|
10170
10662
|
}
|
|
10171
10663
|
drawTicks(x, y, z) {
|
|
@@ -10177,28 +10669,31 @@ class Chart3dComponent {
|
|
|
10177
10669
|
generatedTicks.forEach((_) => {
|
|
10178
10670
|
const sprite = this.makeSprite(_);
|
|
10179
10671
|
if (idx === 0) {
|
|
10180
|
-
sprite.position.set(x(_),
|
|
10672
|
+
sprite.position.set(x(_), y(y.domain()[1]), 0);
|
|
10181
10673
|
}
|
|
10182
10674
|
if (idx === 1) {
|
|
10183
|
-
sprite.position.set(-
|
|
10675
|
+
sprite.position.set(-10, y(_), 0);
|
|
10184
10676
|
}
|
|
10185
10677
|
if (idx === 2) {
|
|
10186
|
-
sprite.position.set(0,
|
|
10678
|
+
sprite.position.set(0, y(y.domain()[1]), z(_));
|
|
10187
10679
|
}
|
|
10188
10680
|
ticks.add(sprite);
|
|
10189
10681
|
});
|
|
10190
10682
|
});
|
|
10191
|
-
const northLabel = this.makeSprite('
|
|
10192
|
-
const westLabel = this.makeSprite('
|
|
10683
|
+
const northLabel = this.makeSprite('X', { fontSize: 28 });
|
|
10684
|
+
const westLabel = this.makeSprite('Y', { fontSize: 28 });
|
|
10193
10685
|
const tvdLabel = this.makeSprite('TVD', { fontSize: 28 });
|
|
10194
|
-
northLabel.position.set(x(
|
|
10195
|
-
westLabel.position.set(0, 0, y(
|
|
10196
|
-
tvdLabel.position.set(0, z(
|
|
10686
|
+
northLabel.position.set(x(x.domain()[1]) + 5, 0, 0);
|
|
10687
|
+
westLabel.position.set(0, 0, y(y.domain()[0]) + 5);
|
|
10688
|
+
tvdLabel.position.set(0, z(z.domain()[1]) + 5, 0);
|
|
10197
10689
|
ticks.add(northLabel, westLabel, tvdLabel);
|
|
10690
|
+
const axesHelper = new THREE.AxesHelper(this.SIDE_SIZE);
|
|
10691
|
+
axesHelper.setColors(this.axesColor, this.axesColor, this.axesColor);
|
|
10692
|
+
this._scene.add(axesHelper);
|
|
10198
10693
|
this._scene.add(ticks);
|
|
10199
10694
|
}
|
|
10200
10695
|
getScales(series) {
|
|
10201
|
-
var _a, _b, _c, _d
|
|
10696
|
+
var _a, _b, _c, _d;
|
|
10202
10697
|
const extrems = series.map((_) => ({
|
|
10203
10698
|
x: d3.extent(_.points, (p) => p.x),
|
|
10204
10699
|
y: d3.extent(_.points, (p) => p.y),
|
|
@@ -10212,34 +10707,22 @@ class Chart3dComponent {
|
|
|
10212
10707
|
}, { x: [], y: [], z: [] });
|
|
10213
10708
|
const x = d3
|
|
10214
10709
|
.scaleLinear()
|
|
10215
|
-
.domain([
|
|
10216
|
-
|
|
10217
|
-
((_b = (_a = this._config) === null || _a === void 0 ? void 0 : _a.axes) === null || _b === void 0 ? void 0 : _b.max) == null
|
|
10218
|
-
? d3.max(flattenExtrems.x)
|
|
10710
|
+
.domain([0, ((_b = (_a = this._config) === null || _a === void 0 ? void 0 : _a.axes) === null || _b === void 0 ? void 0 : _b.max) == null
|
|
10711
|
+
? parseInt(d3.max(flattenExtrems.x))
|
|
10219
10712
|
: this._config.axes.max,
|
|
10220
10713
|
])
|
|
10221
|
-
.range([0, this.SIDE_SIZE])
|
|
10222
|
-
.nice();
|
|
10714
|
+
.range([0, this.SIDE_SIZE]).nice();
|
|
10223
10715
|
const y = d3
|
|
10224
10716
|
.scaleLinear()
|
|
10225
|
-
.domain([
|
|
10226
|
-
|
|
10227
|
-
((_d = (_c = this._config) === null || _c === void 0 ? void 0 : _c.axes) === null || _d === void 0 ? void 0 : _d.max) == null
|
|
10228
|
-
? d3.max(flattenExtrems.y)
|
|
10229
|
-
: this._config.axes.max,
|
|
10230
|
-
])
|
|
10231
|
-
.range([0, this.SIDE_SIZE])
|
|
10232
|
-
.nice();
|
|
10717
|
+
.domain([0, parseInt(d3.max(flattenExtrems.y), 10)])
|
|
10718
|
+
.range([this.SIDE_SIZE, 0]);
|
|
10233
10719
|
const z = d3
|
|
10234
10720
|
.scaleLinear()
|
|
10235
|
-
.domain([
|
|
10236
|
-
|
|
10237
|
-
|
|
10238
|
-
|
|
10239
|
-
|
|
10240
|
-
])
|
|
10241
|
-
.range([this.SIDE_SIZE, 0])
|
|
10242
|
-
.nice();
|
|
10721
|
+
.domain([0,
|
|
10722
|
+
((_d = (_c = this._config) === null || _c === void 0 ? void 0 : _c.axes) === null || _d === void 0 ? void 0 : _d.max) == null
|
|
10723
|
+
? parseInt(d3.max(flattenExtrems.z))
|
|
10724
|
+
: this._config.axes.max])
|
|
10725
|
+
.range([0, this.SIDE_SIZE]).nice();
|
|
10243
10726
|
return { x, y, z };
|
|
10244
10727
|
}
|
|
10245
10728
|
}
|
|
@@ -10278,133 +10761,6 @@ class Chart3dOptions {
|
|
|
10278
10761
|
|
|
10279
10762
|
/* accordion */
|
|
10280
10763
|
|
|
10281
|
-
class ClickService {
|
|
10282
|
-
constructor(_document) {
|
|
10283
|
-
this._document = _document;
|
|
10284
|
-
this.click = fromEvent(this._document, 'click');
|
|
10285
|
-
this.contextMenu = fromEvent(this._document, 'contextmenu');
|
|
10286
|
-
}
|
|
10287
|
-
}
|
|
10288
|
-
ClickService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ClickService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
10289
|
-
ClickService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ClickService, providedIn: 'root' });
|
|
10290
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ClickService, decorators: [{
|
|
10291
|
-
type: Injectable,
|
|
10292
|
-
args: [{
|
|
10293
|
-
providedIn: 'root',
|
|
10294
|
-
}]
|
|
10295
|
-
}], ctorParameters: function () {
|
|
10296
|
-
return [{ type: undefined, decorators: [{
|
|
10297
|
-
type: Inject,
|
|
10298
|
-
args: [DOCUMENT]
|
|
10299
|
-
}] }];
|
|
10300
|
-
} });
|
|
10301
|
-
|
|
10302
|
-
class ContextMenuDirective extends DynamicContentBaseDirective {
|
|
10303
|
-
constructor(_document, _elementRef, _service, _injector, _zone, _cdr, _click) {
|
|
10304
|
-
super(_document, _elementRef, _service, _injector, _zone, _cdr);
|
|
10305
|
-
this._document = _document;
|
|
10306
|
-
this._elementRef = _elementRef;
|
|
10307
|
-
this._service = _service;
|
|
10308
|
-
this._injector = _injector;
|
|
10309
|
-
this._zone = _zone;
|
|
10310
|
-
this._cdr = _cdr;
|
|
10311
|
-
this._click = _click;
|
|
10312
|
-
}
|
|
10313
|
-
get _dynamicContent() {
|
|
10314
|
-
return this.tetaContextMenu;
|
|
10315
|
-
}
|
|
10316
|
-
showContent(event) {
|
|
10317
|
-
event.preventDefault();
|
|
10318
|
-
setTimeout(() => {
|
|
10319
|
-
this.createMenu(event);
|
|
10320
|
-
});
|
|
10321
|
-
}
|
|
10322
|
-
click(event) {
|
|
10323
|
-
if (this._componentRef &&
|
|
10324
|
-
DomUtil.clickedInside(this._componentRef.location.nativeElement, event)) {
|
|
10325
|
-
event.preventDefault();
|
|
10326
|
-
event.stopPropagation();
|
|
10327
|
-
}
|
|
10328
|
-
}
|
|
10329
|
-
ngOnInit() {
|
|
10330
|
-
super.ngOnInit();
|
|
10331
|
-
merge(this._click.click, this._click.contextMenu)
|
|
10332
|
-
.pipe(takeWhile(() => this._alive), filter(() => this._open), filter(() => this._componentRef != null), filter((event) => !DomUtil.clickedInside(this._componentRef.location.nativeElement, event)), tap((_) => {
|
|
10333
|
-
this.destroyContentRef();
|
|
10334
|
-
this.openChange.emit(false);
|
|
10335
|
-
}))
|
|
10336
|
-
.subscribe();
|
|
10337
|
-
}
|
|
10338
|
-
ngOnDestroy() {
|
|
10339
|
-
super.ngOnDestroy();
|
|
10340
|
-
}
|
|
10341
|
-
setPosition() {
|
|
10342
|
-
if (this._componentRef && this._open) {
|
|
10343
|
-
const position = PositionUtil.getPosition({
|
|
10344
|
-
top: this._eventPoint.y,
|
|
10345
|
-
bottom: this._eventPoint.y,
|
|
10346
|
-
left: this._eventPoint.x,
|
|
10347
|
-
right: this._eventPoint.x,
|
|
10348
|
-
}, this._componentRef.location.nativeElement.getBoundingClientRect(), this.align, this.verticalAlign);
|
|
10349
|
-
PositionUtil.setElementPosition(this._componentRef.location.nativeElement, position);
|
|
10350
|
-
}
|
|
10351
|
-
}
|
|
10352
|
-
createMenu(event) {
|
|
10353
|
-
if (this.tetaContextMenu == null) {
|
|
10354
|
-
return;
|
|
10355
|
-
}
|
|
10356
|
-
this._eventPoint = event;
|
|
10357
|
-
this._componentRef = this.createContentRef();
|
|
10358
|
-
this._componentRef.instance.className = [
|
|
10359
|
-
...ArrayUtil.asArray(this.className),
|
|
10360
|
-
'context-menu',
|
|
10361
|
-
];
|
|
10362
|
-
this.openChange.emit(true);
|
|
10363
|
-
}
|
|
10364
|
-
}
|
|
10365
|
-
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 });
|
|
10366
|
-
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 });
|
|
10367
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuDirective, decorators: [{
|
|
10368
|
-
type: Directive,
|
|
10369
|
-
args: [{
|
|
10370
|
-
selector: '[tetaContextMenu]',
|
|
10371
|
-
}]
|
|
10372
|
-
}], ctorParameters: function () {
|
|
10373
|
-
return [{ type: undefined, decorators: [{
|
|
10374
|
-
type: Inject,
|
|
10375
|
-
args: [DOCUMENT]
|
|
10376
|
-
}] }, { type: i0.ElementRef }, { type: DynamicComponentService }, { type: i0.Injector }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: ClickService }];
|
|
10377
|
-
}, propDecorators: { tetaContextMenu: [{
|
|
10378
|
-
type: Input
|
|
10379
|
-
}], showContent: [{
|
|
10380
|
-
type: HostListener,
|
|
10381
|
-
args: ['contextmenu', ['$event']]
|
|
10382
|
-
}], click: [{
|
|
10383
|
-
type: HostListener,
|
|
10384
|
-
args: ['click', ['$event']]
|
|
10385
|
-
}] } });
|
|
10386
|
-
|
|
10387
|
-
class ContextMenuModule {
|
|
10388
|
-
}
|
|
10389
|
-
ContextMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
10390
|
-
ContextMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, declarations: [ContextMenuDirective], imports: [CommonModule,
|
|
10391
|
-
DynamicComponentModule], exports: [ContextMenuDirective] });
|
|
10392
|
-
ContextMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, imports: [[
|
|
10393
|
-
CommonModule,
|
|
10394
|
-
DynamicComponentModule
|
|
10395
|
-
]] });
|
|
10396
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ContextMenuModule, decorators: [{
|
|
10397
|
-
type: NgModule,
|
|
10398
|
-
args: [{
|
|
10399
|
-
declarations: [ContextMenuDirective],
|
|
10400
|
-
exports: [ContextMenuDirective],
|
|
10401
|
-
imports: [
|
|
10402
|
-
CommonModule,
|
|
10403
|
-
DynamicComponentModule
|
|
10404
|
-
]
|
|
10405
|
-
}]
|
|
10406
|
-
}] });
|
|
10407
|
-
|
|
10408
10764
|
class DisableControlDirective {
|
|
10409
10765
|
constructor(ngControl) {
|
|
10410
10766
|
this.ngControl = ngControl;
|
|
@@ -10420,14 +10776,14 @@ class DisableControlDirective {
|
|
|
10420
10776
|
}
|
|
10421
10777
|
}
|
|
10422
10778
|
}
|
|
10423
|
-
DisableControlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DisableControlDirective, deps: [{ token: i3.NgControl }], target: i0.ɵɵFactoryTarget.Directive });
|
|
10779
|
+
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 });
|
|
10424
10780
|
DisableControlDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.1", type: DisableControlDirective, selector: "[tetaDisableControl]", inputs: { tetaDisableControl: "tetaDisableControl" }, ngImport: i0 });
|
|
10425
10781
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DisableControlDirective, decorators: [{
|
|
10426
10782
|
type: Directive,
|
|
10427
10783
|
args: [{
|
|
10428
10784
|
selector: '[tetaDisableControl]'
|
|
10429
10785
|
}]
|
|
10430
|
-
}], ctorParameters: function () { return [{ type: i3.NgControl }]; }, propDecorators: { tetaDisableControl: [{
|
|
10786
|
+
}], ctorParameters: function () { return [{ type: i3$1.NgControl }]; }, propDecorators: { tetaDisableControl: [{
|
|
10431
10787
|
type: Input
|
|
10432
10788
|
}] } });
|
|
10433
10789
|
|
|
@@ -10866,7 +11222,7 @@ class ResizePanelComponent {
|
|
|
10866
11222
|
}
|
|
10867
11223
|
}
|
|
10868
11224
|
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 });
|
|
10869
|
-
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:
|
|
11225
|
+
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 });
|
|
10870
11226
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ResizePanelComponent, decorators: [{
|
|
10871
11227
|
type: Component,
|
|
10872
11228
|
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: [""] }]
|
|
@@ -11066,12 +11422,62 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
11066
11422
|
}] }];
|
|
11067
11423
|
} });
|
|
11068
11424
|
|
|
11069
|
-
|
|
11070
|
-
|
|
11071
|
-
|
|
11072
|
-
|
|
11073
|
-
|
|
11074
|
-
|
|
11425
|
+
const ruLocale = {
|
|
11426
|
+
apply: 'Применить',
|
|
11427
|
+
cancel: 'Отменить',
|
|
11428
|
+
clear: 'Очистить',
|
|
11429
|
+
pin: 'Закрепить',
|
|
11430
|
+
unpin: 'Открепить',
|
|
11431
|
+
sortAsc: 'Сортировать по возрастанию',
|
|
11432
|
+
sortDesc: 'Сортировать по убыванию',
|
|
11433
|
+
clearSort: 'Сбросить сортировку',
|
|
11434
|
+
clearAllSort: 'Сбросить все сортировки',
|
|
11435
|
+
clearFilter: 'Очистить фильтр',
|
|
11436
|
+
clearAllFilters: 'Очистить все фильтры',
|
|
11437
|
+
autosizeColumn: 'Авторазмер колонки',
|
|
11438
|
+
autosizeAll: 'Авторазмер всех колонок',
|
|
11439
|
+
resetColumnsSize: 'Восстановить размер колонок',
|
|
11440
|
+
from: 'От',
|
|
11441
|
+
to: 'До',
|
|
11442
|
+
all: 'Все',
|
|
11443
|
+
min: 'Мин',
|
|
11444
|
+
max: 'Макс',
|
|
11445
|
+
sum: 'Сумма',
|
|
11446
|
+
avg: 'Средн',
|
|
11447
|
+
search: 'Поиск',
|
|
11448
|
+
months: [
|
|
11449
|
+
'Январь',
|
|
11450
|
+
'Февраль',
|
|
11451
|
+
'Март',
|
|
11452
|
+
'Апрель',
|
|
11453
|
+
'Май',
|
|
11454
|
+
'Июнь',
|
|
11455
|
+
'Июль',
|
|
11456
|
+
'Август',
|
|
11457
|
+
'Сентябрь',
|
|
11458
|
+
'Октябрь',
|
|
11459
|
+
'Ноябрь',
|
|
11460
|
+
'Декабрь'
|
|
11461
|
+
],
|
|
11462
|
+
days: [
|
|
11463
|
+
'Воскресенье',
|
|
11464
|
+
'Понедельник',
|
|
11465
|
+
'Вторник',
|
|
11466
|
+
'Среда',
|
|
11467
|
+
'Четверг',
|
|
11468
|
+
'Пятниуа',
|
|
11469
|
+
'Суббота'
|
|
11470
|
+
],
|
|
11471
|
+
daysShort: [
|
|
11472
|
+
'Вс',
|
|
11473
|
+
'Пн',
|
|
11474
|
+
'Вт',
|
|
11475
|
+
'Ср',
|
|
11476
|
+
'Чт',
|
|
11477
|
+
'Пт',
|
|
11478
|
+
'Сб'
|
|
11479
|
+
]
|
|
11480
|
+
};
|
|
11075
11481
|
|
|
11076
11482
|
/**
|
|
11077
11483
|
* Components
|
|
@@ -11081,5 +11487,5 @@ class StringUtil {
|
|
|
11081
11487
|
* Generated bundle index. Do not edit.
|
|
11082
11488
|
*/
|
|
11083
11489
|
|
|
11084
|
-
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,
|
|
11490
|
+
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 };
|
|
11085
11491
|
//# sourceMappingURL=tetacom-ng-components.mjs.map
|