@tetacom/ng-components 1.1.18 → 1.1.20

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.
Files changed (30) hide show
  1. package/assets/icons.svg +726 -950
  2. package/component/icon/icon/icon.component.d.ts +1 -4
  3. package/component/property-grid/property-grid/property-grid-group/property-grid-group.component.d.ts +10 -7
  4. package/component/property-grid/property-grid/property-grid-item/property-grid-item.component.d.ts +8 -8
  5. package/component/property-grid/property-grid/property-grid.component.d.ts +3 -4
  6. package/component/table/contract/i-cell-instance.d.ts +4 -0
  7. package/component/table/contract/table-column.d.ts +3 -9
  8. package/component/table/service/table.service.d.ts +0 -2
  9. package/component/table/table-head/visibility-dropdown-tab/visibility-dropdown-tab.component.d.ts +6 -7
  10. package/directive/scrollable/scrollable/scrollable.component.d.ts +7 -9
  11. package/esm2022/component/icon/icon/icon.component.mjs +2 -4
  12. package/esm2022/component/property-grid/property-grid/property-grid-group/property-grid-group.component.mjs +32 -11
  13. package/esm2022/component/property-grid/property-grid/property-grid-item/property-grid-item.component.mjs +15 -10
  14. package/esm2022/component/property-grid/property-grid/property-grid.component.mjs +10 -5
  15. package/esm2022/component/table/base/cell-component-base.mjs +4 -3
  16. package/esm2022/component/table/contract/i-cell-instance.mjs +1 -1
  17. package/esm2022/component/table/contract/table-column.mjs +1 -7
  18. package/esm2022/component/table/service/table.service.mjs +6 -19
  19. package/esm2022/component/table/table-head/visibility-dropdown-tab/visibility-dropdown-tab.component.mjs +10 -12
  20. package/esm2022/directive/scrollable/scrollable/scrollable.component.mjs +33 -42
  21. package/esm2022/util/bool-or-func.mjs +13 -0
  22. package/esm2022/util/is-function.mjs +4 -0
  23. package/esm2022/util/public-api.mjs +4 -2
  24. package/fesm2022/tetacom-ng-components.mjs +182 -171
  25. package/fesm2022/tetacom-ng-components.mjs.map +1 -1
  26. package/package.json +1 -1
  27. package/style/icon.scss +1 -0
  28. package/util/bool-or-func.d.ts +1 -0
  29. package/util/is-function.d.ts +1 -0
  30. package/util/public-api.d.ts +3 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, HostBinding, Directive, Optional, Inject, ContentChild, Input, Host, HostListener, Injectable, NgModule, forwardRef, EventEmitter, Output, PLATFORM_ID, ElementRef, TemplateRef, Injector, Pipe, ViewChild, InjectionToken, inject, ViewContainerRef, ViewEncapsulation, ChangeDetectorRef, ContentChildren, CUSTOM_ELEMENTS_SCHEMA, SkipSelf } from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, HostBinding, Directive, Optional, Inject, ContentChild, Input, Host, HostListener, Injectable, NgModule, forwardRef, EventEmitter, Output, PLATFORM_ID, ElementRef, TemplateRef, Injector, Pipe, ViewChild, ViewEncapsulation, ChangeDetectorRef, ViewContainerRef, ContentChildren, inject, CUSTOM_ELEMENTS_SCHEMA, SkipSelf, InjectionToken } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { DOCUMENT, CommonModule, isPlatformBrowser, DatePipe } from '@angular/common';
5
5
  import * as i1$1 from '@angular/common/http';
@@ -12,8 +12,7 @@ import { MaskitoModule } from '@maskito/angular';
12
12
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
13
13
  import { trigger, transition, style, animate } from '@angular/animations';
14
14
  import dayjs from 'dayjs';
15
- import * as i3$1 from 'rxjs';
16
- import { ReplaySubject, BehaviorSubject, combineLatest, takeWhile as takeWhile$1, filter as filter$1, map as map$1, shareReplay, Observable, share, pipe, fromEvent, tap, Subject, merge } from 'rxjs';
15
+ import { ReplaySubject, BehaviorSubject, combineLatest, takeWhile as takeWhile$1, filter as filter$1, map as map$1, shareReplay, fromEvent, tap, Subject, merge, Observable, pipe, share } from 'rxjs';
17
16
  import { maskitoDateTimeOptionsGenerator, maskitoDateOptionsGenerator, maskitoDateRangeOptionsGenerator } from '@maskito/kit';
18
17
  import * as i1$2 from '@ngneat/transloco';
19
18
  import { TranslocoModule, TRANSLOCO_SCOPE } from '@ngneat/transloco';
@@ -131,8 +130,6 @@ class IconComponent {
131
130
  }
132
131
  return result.join(' ');
133
132
  }
134
- constructor() { }
135
- ngOnInit() { }
136
133
  getName() {
137
134
  return `#${this.name}`;
138
135
  }
@@ -142,7 +139,7 @@ class IconComponent {
142
139
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: IconComponent, decorators: [{
143
140
  type: Component,
144
141
  args: [{ selector: 'teta-icon', changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg class=\"icon__image\">\n <use [attr.xlink:href]=\"getName()\"></use>\n</svg>\n" }]
145
- }], ctorParameters: function () { return []; }, propDecorators: { name: [{
142
+ }], propDecorators: { name: [{
146
143
  type: Input
147
144
  }], size: [{
148
145
  type: Input
@@ -4348,90 +4345,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImpor
4348
4345
  args: ['class.scrollable_hide_scroll']
4349
4346
  }] } });
4350
4347
 
4351
- const ANIMATION_FRAME = new InjectionToken('Shared Observable based on `window.requestAnimationFrame`', {
4352
- factory: () => {
4353
- const { requestAnimationFrame, cancelAnimationFrame } = inject(WINDOW);
4354
- const animationFrame$ = new Observable(subscriber => {
4355
- let id = NaN;
4356
- const callback = (timestamp) => {
4357
- subscriber.next(timestamp);
4358
- id = requestAnimationFrame(callback);
4359
- };
4360
- id = requestAnimationFrame(callback);
4361
- return () => {
4362
- cancelAnimationFrame(id);
4363
- };
4364
- });
4365
- return animationFrame$.pipe(share());
4366
- },
4367
- });
4368
- const WINDOW = new InjectionToken('An abstraction over global window object', {
4369
- factory: () => {
4370
- const { defaultView } = inject(DOCUMENT);
4371
- if (!defaultView) {
4372
- throw new Error('Window is not available');
4373
- }
4374
- return defaultView;
4375
- },
4376
- });
4377
-
4378
- function tetaZoneFull(ngZone) {
4379
- return source => new Observable(subscriber => source.subscribe({
4380
- next: value => ngZone.run(() => subscriber.next(value)),
4381
- error: (error) => ngZone.run(() => subscriber.error(error)),
4382
- complete: () => ngZone.run(() => subscriber.complete()),
4383
- }));
4384
- }
4385
- function tetaZoneFree(ngZone) {
4386
- return source => new Observable(subscriber => ngZone.runOutsideAngular(() => source.subscribe(subscriber)));
4387
- }
4388
- function tetaZoneOptimized(ngZone) {
4389
- return pipe(tetaZoneFree(ngZone), tetaZoneFull(ngZone));
4390
- }
4391
-
4392
- class LetDirective {
4393
- tetaLet;
4394
- constructor(viewContainer, templateRef) {
4395
- viewContainer.createEmbeddedView(templateRef, new LetContext(this));
4396
- }
4397
- static ngTemplateContextGuard(_dir, _ctx) {
4398
- return true;
4399
- }
4400
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: LetDirective, deps: [{ token: ViewContainerRef }, { token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
4401
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.1", type: LetDirective, selector: "[tetaLet]", inputs: { tetaLet: "tetaLet" }, ngImport: i0 });
4402
- }
4403
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: LetDirective, decorators: [{
4404
- type: Directive,
4405
- args: [{
4406
- selector: '[tetaLet]'
4407
- }]
4408
- }], ctorParameters: function () { return [{ type: i0.ViewContainerRef, decorators: [{
4409
- type: Inject,
4410
- args: [ViewContainerRef]
4411
- }] }, { type: i0.TemplateRef, decorators: [{
4412
- type: Inject,
4413
- args: [TemplateRef]
4414
- }] }]; }, propDecorators: { tetaLet: [{
4415
- type: Input
4416
- }] } });
4417
- class LetContext {
4418
- internalDirectiveInstance;
4419
- constructor(internalDirectiveInstance) {
4420
- this.internalDirectiveInstance = internalDirectiveInstance;
4421
- }
4422
- get $implicit() {
4423
- return this.internalDirectiveInstance.tetaLet;
4424
- }
4425
- get tetaLet() {
4426
- return this.internalDirectiveInstance.tetaLet;
4427
- }
4428
- }
4429
-
4430
4348
  class ScrollableComponent {
4431
- _elementRef;
4432
- _injector;
4433
- _ngZone;
4434
- _animationFrame;
4349
+ _cdr;
4435
4350
  _scrollDirective;
4436
4351
  _scrollableWrapper;
4437
4352
  _scrollbarVertical;
@@ -4443,29 +4358,25 @@ class ScrollableComponent {
4443
4358
  scrollSize;
4444
4359
  _container;
4445
4360
  _alive = true;
4446
- constructor(_elementRef, _injector, _ngZone, _animationFrame) {
4447
- this._elementRef = _elementRef;
4448
- this._injector = _injector;
4449
- this._ngZone = _ngZone;
4450
- this._animationFrame = _animationFrame;
4451
- this.scrollSize = this._animationFrame.pipe(throttleTime(300), map(() => ({
4361
+ _observer;
4362
+ constructor(_cdr) {
4363
+ this._cdr = _cdr;
4364
+ this._observer = new ResizeObserver(this._observe);
4365
+ }
4366
+ _observe = () => {
4367
+ this.scrollSize = {
4452
4368
  scrollHeight: this._container.nativeElement.scrollHeight,
4453
4369
  scrollWidth: this._container.nativeElement.scrollWidth,
4454
4370
  clientHeight: this._container.nativeElement.clientHeight,
4455
4371
  clientWidth: this._container.nativeElement.clientWidth,
4456
- })), tetaZoneFull(this._ngZone));
4457
- }
4372
+ };
4373
+ this._cdr.detectChanges();
4374
+ };
4458
4375
  scrollVertical(event) {
4459
4376
  this._container.nativeElement.scrollTop = event.target.scrollTop;
4460
- // event.scrollLeft = this._container.nativeElement.scrollLeft;
4461
- // this._elementRef.nativeElement.dispatchEvent(event);
4462
- // this.scroll.emit(event);
4463
4377
  }
4464
4378
  scrollHorizontal(event) {
4465
4379
  this._container.nativeElement.scrollLeft = event.target.scrollLeft;
4466
- // event.scrollTop = this._container.nativeElement.scrollTop;
4467
- // this._elementRef.nativeElement.dispatchEvent(event);
4468
- // this.scroll.emit(event);
4469
4380
  }
4470
4381
  ngOnInit() {
4471
4382
  this._container = this._scrollableWrapper;
@@ -4474,44 +4385,46 @@ class ScrollableComponent {
4474
4385
  }
4475
4386
  fromEvent(this._container.nativeElement, 'scroll')
4476
4387
  .pipe(takeWhile(() => this._alive), tap((event) => {
4477
- this._scrollbarHorizontal.nativeElement.scrollLeft = event.target.scrollLeft;
4478
- this._scrollbarVertical.nativeElement.scrollTop = event.target.scrollTop;
4479
- // this._elementRef.nativeElement.dispatchEvent(event);
4388
+ this._scrollbarHorizontal.nativeElement.scrollLeft =
4389
+ event.target.scrollLeft;
4390
+ this._scrollbarVertical.nativeElement.scrollTop =
4391
+ event.target.scrollTop;
4480
4392
  this.scroll.emit(event);
4481
- })).subscribe();
4393
+ }))
4394
+ .subscribe();
4395
+ this._observer.observe(this._container.nativeElement);
4482
4396
  }
4483
4397
  ngOnDestroy() {
4484
4398
  this._alive = false;
4399
+ this._observer.unobserve(this._container.nativeElement);
4400
+ this._observer.disconnect();
4485
4401
  }
4486
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: ScrollableComponent, deps: [{ token: i0.ElementRef }, { token: i0.Injector }, { token: i0.NgZone }, { token: ANIMATION_FRAME }], target: i0.ɵɵFactoryTarget.Component });
4487
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: ScrollableComponent, selector: "teta-scrollable", inputs: { direction: "direction", showScrollbars: "showScrollbars", contentClass: "contentClass" }, outputs: { scroll: "scroll" }, host: { properties: { "class.show-scrollbars": "this.showScrollbars" } }, queries: [{ propertyName: "_scrollDirective", first: true, predicate: ScrollableDirective, descendants: true, read: ElementRef, static: true }], viewQueries: [{ propertyName: "_scrollableWrapper", first: true, predicate: ["scrollableWrapper"], descendants: true, static: true }, { propertyName: "_scrollbarVertical", first: true, predicate: ["scrollbarVertical"], descendants: true, static: true }, { propertyName: "_scrollbarHorizontal", first: true, predicate: ["scrollbarHorizontal"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"scroll-controls\" *tetaLet=\"scrollSize | async as size\">\n <div #scrollbarVertical\n [class.display-none]=\"size?.scrollHeight <= size?.clientHeight\"\n class=\"scroll-scrollbar scroll-scrollbar-vertical\"\n (scroll)=\"scrollVertical($event)\">\n <div [style.height.px]=\"size?.scrollHeight\" style=\"width: 1px;\"></div>\n </div>\n <div #scrollbarHorizontal\n [class.display-none]=\"size?.scrollWidth <= size?.clientWidth\"\n class=\"scroll-scrollbar scroll-scrollbar-horizontal\"\n (scroll)=\"scrollHorizontal($event)\">\n <div [style.width.px]=\"size?.scrollWidth\" style=\"height: 1px;\"></div>\n </div>\n</div>\n\n\n<!--<div #scrollableWrapper class=\"scroll-content-wrapper\">-->\n<!-- <div class=\"scroll-content\"-->\n<!-- [class.column]=\"direction === 'column'\">-->\n<!-- &lt;!&ndash; <div class=\"scroll-content\">&ndash;&gt;-->\n<!-- <ng-content></ng-content>-->\n<!-- </div>-->\n<!--</div>-->\n<div #scrollableWrapper class=\"scroll-content-wrapper\"\n [ngClass]=\"contentClass\"\n [class.column]=\"direction === 'column'\">\n <ng-content></ng-content>\n</div>\n", styles: [":host{overflow:hidden;position:relative;z-index:0;display:flex}:host:hover .scroll-controls{opacity:1}:host.show-scrollbars .scroll-controls{opacity:1}:host::-webkit-scrollbar{width:0;height:0}.scroll-content-wrapper{display:flex;overflow:auto;flex-grow:1}.scroll-content-wrapper::-webkit-scrollbar{width:0;height:0}.scroll-content{position:relative;z-index:0;flex:1;display:flex;height:auto;min-width:0}.scroll-controls{position:absolute;inset:0;z-index:1;pointer-events:none;opacity:0;transition:opacity .5s linear}.scroll-scrollbar{position:absolute;overflow:auto;pointer-events:auto}.scroll-scrollbar-vertical{right:0;top:0;bottom:12px;width:12px}.scroll-scrollbar-horizontal{right:12px;left:0;bottom:0;height:12px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: LetDirective, selector: "[tetaLet]", inputs: ["tetaLet"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4402
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: ScrollableComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
4403
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: ScrollableComponent, selector: "teta-scrollable", inputs: { direction: "direction", showScrollbars: "showScrollbars", contentClass: "contentClass" }, outputs: { scroll: "scroll" }, host: { properties: { "class.show-scrollbars": "this.showScrollbars" } }, queries: [{ propertyName: "_scrollDirective", first: true, predicate: ScrollableDirective, descendants: true, read: ElementRef, static: true }], viewQueries: [{ propertyName: "_scrollableWrapper", first: true, predicate: ["scrollableWrapper"], descendants: true, static: true }, { propertyName: "_scrollbarVertical", first: true, predicate: ["scrollbarVertical"], descendants: true, static: true }, { propertyName: "_scrollbarHorizontal", first: true, predicate: ["scrollbarHorizontal"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"scroll-controls\">\n <div #scrollbarVertical\n [class.display-none]=\"scrollSize?.scrollHeight <= scrollSize?.clientHeight\"\n class=\"scroll-scrollbar scroll-scrollbar-vertical\"\n (scroll)=\"scrollVertical($event)\">\n <div [style.height.px]=\"scrollSize?.scrollHeight\" style=\"width: 1px;\"></div>\n </div>\n <div #scrollbarHorizontal\n [class.display-none]=\"scrollSize?.scrollWidth <= scrollSize?.clientWidth\"\n class=\"scroll-scrollbar scroll-scrollbar-horizontal\"\n (scroll)=\"scrollHorizontal($event)\">\n <div [style.width.px]=\"scrollSize?.scrollWidth\" style=\"height: 1px;\"></div>\n </div>\n</div>\n\n\n<!--<div #scrollableWrapper class=\"scroll-content-wrapper\">-->\n<!-- <div class=\"scroll-content\"-->\n<!-- [class.column]=\"direction === 'column'\">-->\n<!-- &lt;!&ndash; <div class=\"scroll-content\">&ndash;&gt;-->\n<!-- <ng-content></ng-content>-->\n<!-- </div>-->\n<!--</div>-->\n<div #scrollableWrapper class=\"scroll-content-wrapper\"\n [ngClass]=\"contentClass\"\n [class.column]=\"direction === 'column'\">\n <ng-content></ng-content>\n</div>\n", styles: [":host{overflow:hidden;position:relative;z-index:0;display:flex}:host:hover .scroll-controls{opacity:1}:host.show-scrollbars .scroll-controls{opacity:1}:host::-webkit-scrollbar{width:0;height:0}.scroll-content-wrapper{display:flex;overflow:auto;flex-grow:1}.scroll-content-wrapper::-webkit-scrollbar{width:0;height:0}.scroll-content{position:relative;z-index:0;flex:1;display:flex;height:auto;min-width:0}.scroll-controls{position:absolute;inset:0;z-index:1;pointer-events:none;opacity:0;transition:opacity .5s linear}.scroll-scrollbar{position:absolute;overflow:auto;pointer-events:auto}.scroll-scrollbar-vertical{right:0;top:0;bottom:12px;width:12px}.scroll-scrollbar-horizontal{right:12px;left:0;bottom:0;height:12px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4488
4404
  }
4489
4405
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: ScrollableComponent, decorators: [{
4490
4406
  type: Component,
4491
- args: [{ selector: 'teta-scrollable', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"scroll-controls\" *tetaLet=\"scrollSize | async as size\">\n <div #scrollbarVertical\n [class.display-none]=\"size?.scrollHeight <= size?.clientHeight\"\n class=\"scroll-scrollbar scroll-scrollbar-vertical\"\n (scroll)=\"scrollVertical($event)\">\n <div [style.height.px]=\"size?.scrollHeight\" style=\"width: 1px;\"></div>\n </div>\n <div #scrollbarHorizontal\n [class.display-none]=\"size?.scrollWidth <= size?.clientWidth\"\n class=\"scroll-scrollbar scroll-scrollbar-horizontal\"\n (scroll)=\"scrollHorizontal($event)\">\n <div [style.width.px]=\"size?.scrollWidth\" style=\"height: 1px;\"></div>\n </div>\n</div>\n\n\n<!--<div #scrollableWrapper class=\"scroll-content-wrapper\">-->\n<!-- <div class=\"scroll-content\"-->\n<!-- [class.column]=\"direction === 'column'\">-->\n<!-- &lt;!&ndash; <div class=\"scroll-content\">&ndash;&gt;-->\n<!-- <ng-content></ng-content>-->\n<!-- </div>-->\n<!--</div>-->\n<div #scrollableWrapper class=\"scroll-content-wrapper\"\n [ngClass]=\"contentClass\"\n [class.column]=\"direction === 'column'\">\n <ng-content></ng-content>\n</div>\n", styles: [":host{overflow:hidden;position:relative;z-index:0;display:flex}:host:hover .scroll-controls{opacity:1}:host.show-scrollbars .scroll-controls{opacity:1}:host::-webkit-scrollbar{width:0;height:0}.scroll-content-wrapper{display:flex;overflow:auto;flex-grow:1}.scroll-content-wrapper::-webkit-scrollbar{width:0;height:0}.scroll-content{position:relative;z-index:0;flex:1;display:flex;height:auto;min-width:0}.scroll-controls{position:absolute;inset:0;z-index:1;pointer-events:none;opacity:0;transition:opacity .5s linear}.scroll-scrollbar{position:absolute;overflow:auto;pointer-events:auto}.scroll-scrollbar-vertical{right:0;top:0;bottom:12px;width:12px}.scroll-scrollbar-horizontal{right:12px;left:0;bottom:0;height:12px}\n"] }]
4492
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Injector }, { type: i0.NgZone }, { type: i3$1.Observable, decorators: [{
4493
- type: Inject,
4494
- args: [ANIMATION_FRAME]
4495
- }] }]; }, propDecorators: { _scrollDirective: [{
4407
+ args: [{ selector: 'teta-scrollable', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"scroll-controls\">\n <div #scrollbarVertical\n [class.display-none]=\"scrollSize?.scrollHeight <= scrollSize?.clientHeight\"\n class=\"scroll-scrollbar scroll-scrollbar-vertical\"\n (scroll)=\"scrollVertical($event)\">\n <div [style.height.px]=\"scrollSize?.scrollHeight\" style=\"width: 1px;\"></div>\n </div>\n <div #scrollbarHorizontal\n [class.display-none]=\"scrollSize?.scrollWidth <= scrollSize?.clientWidth\"\n class=\"scroll-scrollbar scroll-scrollbar-horizontal\"\n (scroll)=\"scrollHorizontal($event)\">\n <div [style.width.px]=\"scrollSize?.scrollWidth\" style=\"height: 1px;\"></div>\n </div>\n</div>\n\n\n<!--<div #scrollableWrapper class=\"scroll-content-wrapper\">-->\n<!-- <div class=\"scroll-content\"-->\n<!-- [class.column]=\"direction === 'column'\">-->\n<!-- &lt;!&ndash; <div class=\"scroll-content\">&ndash;&gt;-->\n<!-- <ng-content></ng-content>-->\n<!-- </div>-->\n<!--</div>-->\n<div #scrollableWrapper class=\"scroll-content-wrapper\"\n [ngClass]=\"contentClass\"\n [class.column]=\"direction === 'column'\">\n <ng-content></ng-content>\n</div>\n", styles: [":host{overflow:hidden;position:relative;z-index:0;display:flex}:host:hover .scroll-controls{opacity:1}:host.show-scrollbars .scroll-controls{opacity:1}:host::-webkit-scrollbar{width:0;height:0}.scroll-content-wrapper{display:flex;overflow:auto;flex-grow:1}.scroll-content-wrapper::-webkit-scrollbar{width:0;height:0}.scroll-content{position:relative;z-index:0;flex:1;display:flex;height:auto;min-width:0}.scroll-controls{position:absolute;inset:0;z-index:1;pointer-events:none;opacity:0;transition:opacity .5s linear}.scroll-scrollbar{position:absolute;overflow:auto;pointer-events:auto}.scroll-scrollbar-vertical{right:0;top:0;bottom:12px;width:12px}.scroll-scrollbar-horizontal{right:12px;left:0;bottom:0;height:12px}\n"] }]
4408
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { _scrollDirective: [{
4496
4409
  type: ContentChild,
4497
4410
  args: [ScrollableDirective, {
4498
4411
  static: true,
4499
- read: ElementRef
4412
+ read: ElementRef,
4500
4413
  }]
4501
4414
  }], _scrollableWrapper: [{
4502
4415
  type: ViewChild,
4503
4416
  args: ['scrollableWrapper', {
4504
- static: true
4417
+ static: true,
4505
4418
  }]
4506
4419
  }], _scrollbarVertical: [{
4507
4420
  type: ViewChild,
4508
4421
  args: ['scrollbarVertical', {
4509
- static: true
4422
+ static: true,
4510
4423
  }]
4511
4424
  }], _scrollbarHorizontal: [{
4512
4425
  type: ViewChild,
4513
4426
  args: ['scrollbarHorizontal', {
4514
- static: true
4427
+ static: true,
4515
4428
  }]
4516
4429
  }], direction: [{
4517
4430
  type: Input
@@ -5280,6 +5193,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImpor
5280
5193
  type: Input
5281
5194
  }] } });
5282
5195
 
5196
+ class LetDirective {
5197
+ tetaLet;
5198
+ constructor(viewContainer, templateRef) {
5199
+ viewContainer.createEmbeddedView(templateRef, new LetContext(this));
5200
+ }
5201
+ static ngTemplateContextGuard(_dir, _ctx) {
5202
+ return true;
5203
+ }
5204
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: LetDirective, deps: [{ token: ViewContainerRef }, { token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
5205
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.1", type: LetDirective, selector: "[tetaLet]", inputs: { tetaLet: "tetaLet" }, ngImport: i0 });
5206
+ }
5207
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: LetDirective, decorators: [{
5208
+ type: Directive,
5209
+ args: [{
5210
+ selector: '[tetaLet]'
5211
+ }]
5212
+ }], ctorParameters: function () { return [{ type: i0.ViewContainerRef, decorators: [{
5213
+ type: Inject,
5214
+ args: [ViewContainerRef]
5215
+ }] }, { type: i0.TemplateRef, decorators: [{
5216
+ type: Inject,
5217
+ args: [TemplateRef]
5218
+ }] }]; }, propDecorators: { tetaLet: [{
5219
+ type: Input
5220
+ }] } });
5221
+ class LetContext {
5222
+ internalDirectiveInstance;
5223
+ constructor(internalDirectiveInstance) {
5224
+ this.internalDirectiveInstance = internalDirectiveInstance;
5225
+ }
5226
+ get $implicit() {
5227
+ return this.internalDirectiveInstance.tetaLet;
5228
+ }
5229
+ get tetaLet() {
5230
+ return this.internalDirectiveInstance.tetaLet;
5231
+ }
5232
+ }
5233
+
5283
5234
  class SelectComponent {
5284
5235
  _cdr;
5285
5236
  _elementRef;
@@ -6934,6 +6885,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImpor
6934
6885
  }]
6935
6886
  }] });
6936
6887
 
6888
+ function isFunction(obj) {
6889
+ return !!(obj && obj?.constructor && obj?.call && obj?.apply);
6890
+ }
6891
+
6892
+ function boolOrFuncCallback(variable) {
6893
+ return (args) => {
6894
+ if (typeof variable === 'boolean') {
6895
+ return variable;
6896
+ }
6897
+ else if (isFunction(variable)) {
6898
+ return variable(args);
6899
+ }
6900
+ return true;
6901
+ };
6902
+ }
6903
+
6937
6904
  class FormsUtil {
6938
6905
  static validateAllFormFields(formGroup) {
6939
6906
  formGroup.updateValueAndValidity();
@@ -7144,7 +7111,7 @@ class PropertyGridItemComponent {
7144
7111
  item;
7145
7112
  itemTemplates;
7146
7113
  get template() {
7147
- return this.itemTemplates.find((item) => item.name === this.column.name);
7114
+ return this.itemTemplates.find(item => item.name === this.column.name);
7148
7115
  }
7149
7116
  get formGroup() {
7150
7117
  if (this._formGroup instanceof FormGroup) {
@@ -7155,6 +7122,12 @@ class PropertyGridItemComponent {
7155
7122
  }
7156
7123
  return null;
7157
7124
  }
7125
+ get editable() {
7126
+ return boolOrFuncCallback(this.column.editable)({
7127
+ column: this.column,
7128
+ row: this.formGroup?.getRawValue(),
7129
+ });
7130
+ }
7158
7131
  horizontal;
7159
7132
  controlValueChange = new EventEmitter();
7160
7133
  align = Align;
@@ -7198,8 +7171,6 @@ class PropertyGridItemComponent {
7198
7171
  });
7199
7172
  }
7200
7173
  }
7201
- ngOnInit() {
7202
- }
7203
7174
  ngOnDestroy() {
7204
7175
  this._alive = false;
7205
7176
  this._formSub?.unsubscribe();
@@ -7210,7 +7181,7 @@ class PropertyGridItemComponent {
7210
7181
  this._formSub?.unsubscribe();
7211
7182
  this._formSub = this.formGroup?.controls[this.column.name]?.valueChanges
7212
7183
  .pipe(takeWhile(() => this._alive))
7213
- .subscribe((_) => {
7184
+ .subscribe(_ => {
7214
7185
  this.controlValueChange.emit({
7215
7186
  id: _,
7216
7187
  name: this.column.name,
@@ -7219,11 +7190,11 @@ class PropertyGridItemComponent {
7219
7190
  }
7220
7191
  }
7221
7192
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: PropertyGridItemComponent, deps: [{ token: i1$2.TranslocoService }, { token: i3.ControlContainer, optional: true }], target: i0.ɵɵFactoryTarget.Component });
7222
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: PropertyGridItemComponent, selector: "teta-property-grid-item", inputs: { column: "column", hideNonEditable: "hideNonEditable", dict: "dict", decimalPart: "decimalPart", item: "item", itemTemplates: "itemTemplates", horizontal: "horizontal" }, outputs: { controlValueChange: "controlValueChange" }, usesOnChanges: true, ngImport: i0, template: "<teta-input [label]=\"caption\"\n [hint]=\"column.hint\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal\"\n [required]=\"column.required\"\n *ngIf=\"column.editable || !hideNonEditable\">\n <ng-container *ngIf=\"template; else default\">\n <ng-container *ngTemplateOutlet=\"template.template;context: {$implicit: formGroup?.get(column.name)}\"></ng-container>\n </ng-container>\n <ng-template #default>\n <ng-container [ngSwitch]=\"column.filterType\"\n *ngIf=\"formGroup?.get(column.name)\">\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\">\n {{column.caption}}\n </teta-toggle>\n <teta-text-field class=\"row_auto\"\n *ngSwitchDefault\n\n [decimalPart]=\"column.filterType === filterTypeEnum.number ? decimalPart : null\"\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 </ng-template>\n <div *ngIf=\"controlIsInvalid(column.name)\"\n ngProjectAs=\"message\"\n class=\"color-red-50\">\n {{getError(column)}}\n </div>\n</teta-input>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: DatePickerComponent, selector: "teta-date-picker", inputs: ["date", "locale", "showTime", "minDate", "maxDate", "invalid", "disabled", "align", "verticalAlign", "viewType", "appendToBody", "backdrop", "allowNull", "firstDayOfWeek", "disabledDates", "disabledPeriods", "disabledDays", "minYearDate", "maxYearDate"], outputs: ["selectDate"] }, { kind: "component", type: SelectComponent, selector: "teta-select", inputs: ["multiple", "options", "invalid", "align", "verticalAlign", "autoClose", "autoCloseIgnore", "disabled", "itemSize", "virtual", "icon", "placeholder", "appendToBody", "allowNull", "viewType", "notFoundText", "valueRef", "textRef", "searchRef"] }, { kind: "component", type: InputComponent, selector: "teta-input", inputs: ["label", "hint", "viewType", "horizontal", "required"] }, { kind: "component", type: TextFieldComponent, selector: "teta-text-field", inputs: ["placeholder", "leftIconName", "disabled", "onlyNumber", "decimalPart", "invalid"] }, { kind: "component", type: ToggleComponent, selector: "teta-toggle", inputs: ["palette", "noLabel", "disabled"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [FormsUtil.formProvider] });
7193
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: PropertyGridItemComponent, selector: "teta-property-grid-item", inputs: { column: "column", hideNonEditable: "hideNonEditable", dict: "dict", decimalPart: "decimalPart", item: "item", itemTemplates: "itemTemplates", horizontal: "horizontal" }, outputs: { controlValueChange: "controlValueChange" }, usesOnChanges: true, ngImport: i0, template: "<teta-input [label]=\"caption\"\n [hint]=\"column.hint\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal\"\n [required]=\"column.required\"\n *ngIf=\"editable || !hideNonEditable\">\n <ng-container *ngIf=\"template; else default\">\n <ng-container *ngTemplateOutlet=\"template.template;context: {$implicit: formGroup?.get(column.name)}\"></ng-container>\n </ng-container>\n <ng-template #default>\n <ng-container [ngSwitch]=\"column.filterType\"\n *ngIf=\"formGroup?.get(column.name)\">\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\">\n {{column.caption}}\n </teta-toggle>\n <teta-text-field class=\"row_auto\"\n *ngSwitchDefault\n [decimalPart]=\"column.filterType === filterTypeEnum.number ? decimalPart : null\"\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 </ng-template>\n <div *ngIf=\"controlIsInvalid(column.name)\"\n ngProjectAs=\"message\"\n class=\"color-red-50\">\n {{getError(column)}}\n </div>\n</teta-input>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: DatePickerComponent, selector: "teta-date-picker", inputs: ["date", "locale", "showTime", "minDate", "maxDate", "invalid", "disabled", "align", "verticalAlign", "viewType", "appendToBody", "backdrop", "allowNull", "firstDayOfWeek", "disabledDates", "disabledPeriods", "disabledDays", "minYearDate", "maxYearDate"], outputs: ["selectDate"] }, { kind: "component", type: SelectComponent, selector: "teta-select", inputs: ["multiple", "options", "invalid", "align", "verticalAlign", "autoClose", "autoCloseIgnore", "disabled", "itemSize", "virtual", "icon", "placeholder", "appendToBody", "allowNull", "viewType", "notFoundText", "valueRef", "textRef", "searchRef"] }, { kind: "component", type: InputComponent, selector: "teta-input", inputs: ["label", "hint", "viewType", "horizontal", "required"] }, { kind: "component", type: TextFieldComponent, selector: "teta-text-field", inputs: ["placeholder", "leftIconName", "disabled", "onlyNumber", "decimalPart", "invalid"] }, { kind: "component", type: ToggleComponent, selector: "teta-toggle", inputs: ["palette", "noLabel", "disabled"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [FormsUtil.formProvider] });
7223
7194
  }
7224
7195
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: PropertyGridItemComponent, decorators: [{
7225
7196
  type: Component,
7226
- args: [{ selector: 'teta-property-grid-item', viewProviders: [FormsUtil.formProvider], template: "<teta-input [label]=\"caption\"\n [hint]=\"column.hint\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal\"\n [required]=\"column.required\"\n *ngIf=\"column.editable || !hideNonEditable\">\n <ng-container *ngIf=\"template; else default\">\n <ng-container *ngTemplateOutlet=\"template.template;context: {$implicit: formGroup?.get(column.name)}\"></ng-container>\n </ng-container>\n <ng-template #default>\n <ng-container [ngSwitch]=\"column.filterType\"\n *ngIf=\"formGroup?.get(column.name)\">\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\">\n {{column.caption}}\n </teta-toggle>\n <teta-text-field class=\"row_auto\"\n *ngSwitchDefault\n\n [decimalPart]=\"column.filterType === filterTypeEnum.number ? decimalPart : null\"\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 </ng-template>\n <div *ngIf=\"controlIsInvalid(column.name)\"\n ngProjectAs=\"message\"\n class=\"color-red-50\">\n {{getError(column)}}\n </div>\n</teta-input>\n" }]
7197
+ args: [{ selector: 'teta-property-grid-item', viewProviders: [FormsUtil.formProvider], template: "<teta-input [label]=\"caption\"\n [hint]=\"column.hint\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal\"\n [required]=\"column.required\"\n *ngIf=\"editable || !hideNonEditable\">\n <ng-container *ngIf=\"template; else default\">\n <ng-container *ngTemplateOutlet=\"template.template;context: {$implicit: formGroup?.get(column.name)}\"></ng-container>\n </ng-container>\n <ng-template #default>\n <ng-container [ngSwitch]=\"column.filterType\"\n *ngIf=\"formGroup?.get(column.name)\">\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\">\n {{column.caption}}\n </teta-toggle>\n <teta-text-field class=\"row_auto\"\n *ngSwitchDefault\n [decimalPart]=\"column.filterType === filterTypeEnum.number ? decimalPart : null\"\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 </ng-template>\n <div *ngIf=\"controlIsInvalid(column.name)\"\n ngProjectAs=\"message\"\n class=\"color-red-50\">\n {{getError(column)}}\n </div>\n</teta-input>\n" }]
7227
7198
  }], ctorParameters: function () { return [{ type: i1$2.TranslocoService }, { type: i3.ControlContainer, decorators: [{
7228
7199
  type: Optional
7229
7200
  }] }]; }, propDecorators: { column: [{
@@ -7245,6 +7216,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImpor
7245
7216
  }] } });
7246
7217
 
7247
7218
  class PropertyGridGroupComponent {
7219
+ _formGroup;
7248
7220
  column;
7249
7221
  hideNonEditable;
7250
7222
  dict;
@@ -7253,20 +7225,36 @@ class PropertyGridGroupComponent {
7253
7225
  controlValueChange = new EventEmitter();
7254
7226
  decimalPart;
7255
7227
  itemTemplates;
7256
- constructor() {
7228
+ get formGroup() {
7229
+ if (this._formGroup instanceof FormGroup) {
7230
+ return this._formGroup;
7231
+ }
7232
+ if (this._formGroup instanceof NgForm) {
7233
+ return this._formGroup.form;
7234
+ }
7235
+ return null;
7257
7236
  }
7258
- ngOnInit() {
7237
+ get editable() {
7238
+ return boolOrFuncCallback(this.column.editable)({
7239
+ column: this.column,
7240
+ row: this.formGroup?.getRawValue(),
7241
+ });
7242
+ }
7243
+ constructor(_formGroup) {
7244
+ this._formGroup = _formGroup;
7259
7245
  }
7260
7246
  trackColumns(index, column) {
7261
7247
  return column.name;
7262
7248
  }
7263
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: PropertyGridGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7264
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: PropertyGridGroupComponent, selector: "teta-property-grid-group", inputs: { column: "column", hideNonEditable: "hideNonEditable", dict: "dict", item: "item", horizontal: "horizontal", decimalPart: "decimalPart", itemTemplates: "itemTemplates" }, outputs: { controlValueChange: "controlValueChange" }, ngImport: i0, template: "<teta-expand-item>\n <span ngProjectAs='head'>\n {{column.caption}}\n </span>\n <div class=\"form-container\">\n <ng-container *ngFor=\"let col of column.columns; trackBy: trackColumns\">\n <ng-container *ngIf=\"col.columns?.length < 1\">\n <teta-property-grid-item *ngIf=\"column.editable || !hideNonEditable\"\n [id]=\"col.name\"\n [dict]=\"dict\"\n [column]=\"col\"\n [item]=\"item\"\n [itemTemplates]=\"itemTemplates\"\n [decimalPart]=\"decimalPart\"\n [hideNonEditable]=\"hideNonEditable\"\n (controlValueChange)=\"controlValueChange.emit($event)\"\n [horizontal]=\"horizontal\"></teta-property-grid-item>\n </ng-container>\n <ng-container *ngIf=\"col.columns?.length > 0\">\n <teta-property-grid-group [id]=\"col.name\"\n [dict]=\"dict\"\n [column]=\"col\"\n [item]=\"item\"\n [itemTemplates]=\"itemTemplates\"\n [decimalPart]=\"decimalPart\"\n [hideNonEditable]=\"hideNonEditable\"\n [horizontal]=\"horizontal\"\n (controlValueChange)=\"controlValueChange.emit($event)\"></teta-property-grid-group>\n </ng-container>\n </ng-container>\n </div>\n</teta-expand-item>\n", styles: [":host{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ExpandItemComponent, selector: "teta-expand-item", inputs: ["open"], outputs: ["openChange"], exportAs: ["expand-item"] }, { kind: "component", type: PropertyGridGroupComponent, selector: "teta-property-grid-group", inputs: ["column", "hideNonEditable", "dict", "item", "horizontal", "decimalPart", "itemTemplates"], outputs: ["controlValueChange"] }, { kind: "component", type: PropertyGridItemComponent, selector: "teta-property-grid-item", inputs: ["column", "hideNonEditable", "dict", "decimalPart", "item", "itemTemplates", "horizontal"], outputs: ["controlValueChange"] }] });
7249
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: PropertyGridGroupComponent, deps: [{ token: i3.ControlContainer, optional: true }], target: i0.ɵɵFactoryTarget.Component });
7250
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: PropertyGridGroupComponent, selector: "teta-property-grid-group", inputs: { column: "column", hideNonEditable: "hideNonEditable", dict: "dict", item: "item", horizontal: "horizontal", decimalPart: "decimalPart", itemTemplates: "itemTemplates" }, outputs: { controlValueChange: "controlValueChange" }, ngImport: i0, template: "<teta-expand-item>\n <span ngProjectAs='head'>\n {{column.caption}}\n </span>\n <div class=\"form-container\">\n <ng-container *ngFor=\"let col of column.columns; trackBy: trackColumns\">\n <ng-container *ngIf=\"col.columns?.length < 1\">\n <teta-property-grid-item *ngIf=\"column.editable || !hideNonEditable\"\n [id]=\"col.name\"\n [dict]=\"dict\"\n [column]=\"col\"\n [item]=\"item\"\n [itemTemplates]=\"itemTemplates\"\n [decimalPart]=\"decimalPart\"\n [hideNonEditable]=\"hideNonEditable\"\n (controlValueChange)=\"controlValueChange.emit($event)\"\n [horizontal]=\"horizontal\"></teta-property-grid-item>\n </ng-container>\n <ng-container *ngIf=\"col.columns?.length > 0\">\n <teta-property-grid-group [id]=\"col.name\"\n [dict]=\"dict\"\n [column]=\"col\"\n [item]=\"item\"\n [itemTemplates]=\"itemTemplates\"\n [decimalPart]=\"decimalPart\"\n [hideNonEditable]=\"hideNonEditable\"\n [horizontal]=\"horizontal\"\n (controlValueChange)=\"controlValueChange.emit($event)\"></teta-property-grid-group>\n </ng-container>\n </ng-container>\n </div>\n</teta-expand-item>\n", styles: [":host{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ExpandItemComponent, selector: "teta-expand-item", inputs: ["open"], outputs: ["openChange"], exportAs: ["expand-item"] }, { kind: "component", type: PropertyGridGroupComponent, selector: "teta-property-grid-group", inputs: ["column", "hideNonEditable", "dict", "item", "horizontal", "decimalPart", "itemTemplates"], outputs: ["controlValueChange"] }, { kind: "component", type: PropertyGridItemComponent, selector: "teta-property-grid-item", inputs: ["column", "hideNonEditable", "dict", "decimalPart", "item", "itemTemplates", "horizontal"], outputs: ["controlValueChange"] }], viewProviders: [FormsUtil.formProvider] });
7265
7251
  }
7266
7252
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: PropertyGridGroupComponent, decorators: [{
7267
7253
  type: Component,
7268
- args: [{ selector: 'teta-property-grid-group', template: "<teta-expand-item>\n <span ngProjectAs='head'>\n {{column.caption}}\n </span>\n <div class=\"form-container\">\n <ng-container *ngFor=\"let col of column.columns; trackBy: trackColumns\">\n <ng-container *ngIf=\"col.columns?.length < 1\">\n <teta-property-grid-item *ngIf=\"column.editable || !hideNonEditable\"\n [id]=\"col.name\"\n [dict]=\"dict\"\n [column]=\"col\"\n [item]=\"item\"\n [itemTemplates]=\"itemTemplates\"\n [decimalPart]=\"decimalPart\"\n [hideNonEditable]=\"hideNonEditable\"\n (controlValueChange)=\"controlValueChange.emit($event)\"\n [horizontal]=\"horizontal\"></teta-property-grid-item>\n </ng-container>\n <ng-container *ngIf=\"col.columns?.length > 0\">\n <teta-property-grid-group [id]=\"col.name\"\n [dict]=\"dict\"\n [column]=\"col\"\n [item]=\"item\"\n [itemTemplates]=\"itemTemplates\"\n [decimalPart]=\"decimalPart\"\n [hideNonEditable]=\"hideNonEditable\"\n [horizontal]=\"horizontal\"\n (controlValueChange)=\"controlValueChange.emit($event)\"></teta-property-grid-group>\n </ng-container>\n </ng-container>\n </div>\n</teta-expand-item>\n", styles: [":host{display:flex;flex-direction:column}\n"] }]
7269
- }], ctorParameters: function () { return []; }, propDecorators: { column: [{
7254
+ args: [{ selector: 'teta-property-grid-group', viewProviders: [FormsUtil.formProvider], template: "<teta-expand-item>\n <span ngProjectAs='head'>\n {{column.caption}}\n </span>\n <div class=\"form-container\">\n <ng-container *ngFor=\"let col of column.columns; trackBy: trackColumns\">\n <ng-container *ngIf=\"col.columns?.length < 1\">\n <teta-property-grid-item *ngIf=\"column.editable || !hideNonEditable\"\n [id]=\"col.name\"\n [dict]=\"dict\"\n [column]=\"col\"\n [item]=\"item\"\n [itemTemplates]=\"itemTemplates\"\n [decimalPart]=\"decimalPart\"\n [hideNonEditable]=\"hideNonEditable\"\n (controlValueChange)=\"controlValueChange.emit($event)\"\n [horizontal]=\"horizontal\"></teta-property-grid-item>\n </ng-container>\n <ng-container *ngIf=\"col.columns?.length > 0\">\n <teta-property-grid-group [id]=\"col.name\"\n [dict]=\"dict\"\n [column]=\"col\"\n [item]=\"item\"\n [itemTemplates]=\"itemTemplates\"\n [decimalPart]=\"decimalPart\"\n [hideNonEditable]=\"hideNonEditable\"\n [horizontal]=\"horizontal\"\n (controlValueChange)=\"controlValueChange.emit($event)\"></teta-property-grid-group>\n </ng-container>\n </ng-container>\n </div>\n</teta-expand-item>\n", styles: [":host{display:flex;flex-direction:column}\n"] }]
7255
+ }], ctorParameters: function () { return [{ type: i3.ControlContainer, decorators: [{
7256
+ type: Optional
7257
+ }] }]; }, propDecorators: { column: [{
7270
7258
  type: Input
7271
7259
  }], hideNonEditable: [{
7272
7260
  type: Input
@@ -7319,6 +7307,12 @@ class PropertyGridComponent {
7319
7307
  constructor(_formGroup) {
7320
7308
  this._formGroup = _formGroup;
7321
7309
  }
7310
+ getEditable(column) {
7311
+ return boolOrFuncCallback(column.editable)({
7312
+ column: column,
7313
+ row: this.formGroup?.getRawValue(),
7314
+ });
7315
+ }
7322
7316
  onControlValueChange(event) {
7323
7317
  const affected = this.columns.filter(_ => _.parentName === event.name);
7324
7318
  if (affected?.length) {
@@ -7336,7 +7330,6 @@ class PropertyGridComponent {
7336
7330
  }
7337
7331
  this.controlValueChange.emit(event);
7338
7332
  }
7339
- ngOnInit() { }
7340
7333
  ngOnDestroy() {
7341
7334
  this._alive = false;
7342
7335
  }
@@ -7346,13 +7339,12 @@ class PropertyGridComponent {
7346
7339
  getDictValue(value, name) {
7347
7340
  return this.dict[name]?.find(_ => _.id === value);
7348
7341
  }
7349
- ngAfterViewInit() { }
7350
7342
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: PropertyGridComponent, deps: [{ token: i3.ControlContainer, optional: true }], target: i0.ɵɵFactoryTarget.Component });
7351
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: PropertyGridComponent, selector: "teta-property-grid", inputs: { hideNonEditable: "hideNonEditable", columns: "columns", dict: "dict", item: "item", horizontal: "horizontal", decimalPart: "decimalPart" }, outputs: { controlValueChange: "controlValueChange" }, host: { properties: { "class.form-container": "this.formClass" } }, queries: [{ propertyName: "itemTemplates", predicate: PropertyGridItemDescriptionDirective }], ngImport: i0, template: "<ng-container *ngIf=\"columns?.length\">\n <ng-container *ngFor=\"let column of columns; trackBy: trackColumns\">\n <teta-property-grid-item *ngIf=\"column.columns?.length < 1 && (column.editable || !hideNonEditable)\"\n [dict]=\"dict\"\n [column]=\"column\"\n [item]=\"item\"\n [id]=\"column.name\"\n [itemTemplates]=\"itemTemplates\"\n [decimalPart]=\"decimalPart\"\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 && (column.editable || !hideNonEditable)\"\n [id]=\"column.name\"\n [dict]=\"dict\"\n [column]=\"column\"\n [item]=\"item\"\n [itemTemplates]=\"itemTemplates\"\n [decimalPart]=\"decimalPart\"\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"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: PropertyGridGroupComponent, selector: "teta-property-grid-group", inputs: ["column", "hideNonEditable", "dict", "item", "horizontal", "decimalPart", "itemTemplates"], outputs: ["controlValueChange"] }, { kind: "component", type: PropertyGridItemComponent, selector: "teta-property-grid-item", inputs: ["column", "hideNonEditable", "dict", "decimalPart", "item", "itemTemplates", "horizontal"], outputs: ["controlValueChange"] }], viewProviders: [FormsUtil.formProvider] });
7343
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: PropertyGridComponent, selector: "teta-property-grid", inputs: { hideNonEditable: "hideNonEditable", columns: "columns", dict: "dict", item: "item", horizontal: "horizontal", decimalPart: "decimalPart" }, outputs: { controlValueChange: "controlValueChange" }, host: { properties: { "class.form-container": "this.formClass" } }, queries: [{ propertyName: "itemTemplates", predicate: PropertyGridItemDescriptionDirective }], ngImport: i0, template: "<ng-container *ngIf='columns?.length'>\n <ng-container *ngFor='let column of columns; trackBy: trackColumns'>\n <teta-property-grid-item *ngIf='column.columns?.length < 1 && (getEditable(column) || !hideNonEditable)'\n [dict]='dict'\n [column]='column'\n [item]='item'\n [id]='column.name'\n [itemTemplates]='itemTemplates'\n [decimalPart]='decimalPart'\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 && (getEditable(column) || !hideNonEditable)'\n [id]='column.name'\n [dict]='dict'\n [column]='column'\n [item]='item'\n [itemTemplates]='itemTemplates'\n [decimalPart]='decimalPart'\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"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: PropertyGridGroupComponent, selector: "teta-property-grid-group", inputs: ["column", "hideNonEditable", "dict", "item", "horizontal", "decimalPart", "itemTemplates"], outputs: ["controlValueChange"] }, { kind: "component", type: PropertyGridItemComponent, selector: "teta-property-grid-item", inputs: ["column", "hideNonEditable", "dict", "decimalPart", "item", "itemTemplates", "horizontal"], outputs: ["controlValueChange"] }], viewProviders: [FormsUtil.formProvider] });
7352
7344
  }
7353
7345
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: PropertyGridComponent, decorators: [{
7354
7346
  type: Component,
7355
- args: [{ selector: 'teta-property-grid', viewProviders: [FormsUtil.formProvider], template: "<ng-container *ngIf=\"columns?.length\">\n <ng-container *ngFor=\"let column of columns; trackBy: trackColumns\">\n <teta-property-grid-item *ngIf=\"column.columns?.length < 1 && (column.editable || !hideNonEditable)\"\n [dict]=\"dict\"\n [column]=\"column\"\n [item]=\"item\"\n [id]=\"column.name\"\n [itemTemplates]=\"itemTemplates\"\n [decimalPart]=\"decimalPart\"\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 && (column.editable || !hideNonEditable)\"\n [id]=\"column.name\"\n [dict]=\"dict\"\n [column]=\"column\"\n [item]=\"item\"\n [itemTemplates]=\"itemTemplates\"\n [decimalPart]=\"decimalPart\"\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"] }]
7347
+ args: [{ selector: 'teta-property-grid', viewProviders: [FormsUtil.formProvider], template: "<ng-container *ngIf='columns?.length'>\n <ng-container *ngFor='let column of columns; trackBy: trackColumns'>\n <teta-property-grid-item *ngIf='column.columns?.length < 1 && (getEditable(column) || !hideNonEditable)'\n [dict]='dict'\n [column]='column'\n [item]='item'\n [id]='column.name'\n [itemTemplates]='itemTemplates'\n [decimalPart]='decimalPart'\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 && (getEditable(column) || !hideNonEditable)'\n [id]='column.name'\n [dict]='dict'\n [column]='column'\n [item]='item'\n [itemTemplates]='itemTemplates'\n [decimalPart]='decimalPart'\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"] }]
7356
7348
  }], ctorParameters: function () { return [{ type: i3.ControlContainer, decorators: [{
7357
7349
  type: Optional
7358
7350
  }] }]; }, propDecorators: { formClass: [{
@@ -7961,16 +7953,10 @@ class TableColumn extends FilterItem {
7961
7953
  * Стобец закреплен
7962
7954
  */
7963
7955
  locked;
7964
- /**
7965
- * Название столбца в строке результатов
7966
- */
7967
7956
  /**
7968
7957
  * Название столбца родителя
7969
7958
  */
7970
7959
  parentName;
7971
- /**
7972
- * Название столбца для заголовка таблицы
7973
- */
7974
7960
  /**
7975
7961
  * Единицы измерения
7976
7962
  */
@@ -8579,7 +8565,7 @@ class TableService {
8579
8565
  this._currentEditCell = cellEvent;
8580
8566
  }
8581
8567
  else {
8582
- if (this.boolOrFuncCallback(!!this.rowEditable)(this.getRowByIndex(cellEvent?.row)?.data)) {
8568
+ if (boolOrFuncCallback(!!this.rowEditable)(this.getRowByIndex(cellEvent?.row)?.data)) {
8583
8569
  this._editRowStart.next(cellEvent);
8584
8570
  this._currentEditCell = cellEvent;
8585
8571
  }
@@ -8593,7 +8579,7 @@ class TableService {
8593
8579
  this._editCellStop.next(this._currentEditCell);
8594
8580
  }
8595
8581
  const column = this.getColumnByName(cellEvent?.column);
8596
- if (this.boolOrFuncCallback(column?.editable)({
8582
+ if (boolOrFuncCallback(column?.editable)({
8597
8583
  row: this.getRowByIndex(cellEvent?.row),
8598
8584
  column: column,
8599
8585
  })) {
@@ -8731,7 +8717,7 @@ class TableService {
8731
8717
  return null;
8732
8718
  }
8733
8719
  const column = this.getColumnByName(nextCell?.column);
8734
- if (this.boolOrFuncCallback(column.editable)({
8720
+ if (boolOrFuncCallback(column.editable)({
8735
8721
  row: this.getRowByIndex(nextCell.row),
8736
8722
  column,
8737
8723
  })) {
@@ -8745,7 +8731,7 @@ class TableService {
8745
8731
  return null;
8746
8732
  }
8747
8733
  const column = this.getColumnByName(prevCell?.column);
8748
- if (this.boolOrFuncCallback(column.editable)({
8734
+ if (boolOrFuncCallback(column.editable)({
8749
8735
  row: this.getRowByIndex(prevCell.row),
8750
8736
  column,
8751
8737
  })) {
@@ -8824,17 +8810,6 @@ class TableService {
8824
8810
  this._scrollIndex.next(null);
8825
8811
  this._scrollIndex.next(index);
8826
8812
  }
8827
- boolOrFuncCallback(variable) {
8828
- return (args) => {
8829
- if (typeof variable === 'boolean') {
8830
- return variable;
8831
- }
8832
- else if (this.isFunction(variable)) {
8833
- return variable(args);
8834
- }
8835
- return true;
8836
- };
8837
- }
8838
8813
  getVisibleColumns() {
8839
8814
  const visible = ArrayUtil.flatten(this._columns.value, 'columns', true).filter(_ => this._hiddenColumns.value.indexOf(_.name) < 0);
8840
8815
  return visible.sort((a, b) => Number(b.locked) - Number(a.locked));
@@ -8885,9 +8860,6 @@ class TableService {
8885
8860
  getTableElement(element) {
8886
8861
  return element.closest('teta-table');
8887
8862
  }
8888
- isFunction(obj) {
8889
- return !!(obj && obj?.constructor && obj?.call && obj?.apply);
8890
- }
8891
8863
  setColumnAutoWidth(column, table) {
8892
8864
  const cells = table.querySelectorAll(`teta-cell[data-column="${column.name}"] .cell-text`);
8893
8865
  let maxWidth = 0;
@@ -10061,7 +10033,7 @@ class VisibilityDropdownTabComponent {
10061
10033
  hiddenColumns;
10062
10034
  get openItems() {
10063
10035
  if (this._openItems == null) {
10064
- this._openItems = this.columns.map((_) => _);
10036
+ this._openItems = this.columns.map(_ => _);
10065
10037
  }
10066
10038
  return this._openItems;
10067
10039
  }
@@ -10080,8 +10052,8 @@ class VisibilityDropdownTabComponent {
10080
10052
  this._cdr = _cdr;
10081
10053
  this.locale = this._config.locale;
10082
10054
  this._svc.hiddenColumns
10083
- .pipe(takeWhile((_) => this._alive), map((_) => [..._]))
10084
- .subscribe((_) => {
10055
+ .pipe(takeWhile(_ => this._alive), map(_ => [..._]))
10056
+ .subscribe(_ => {
10085
10057
  this.hiddenColumns = _;
10086
10058
  });
10087
10059
  }
@@ -10093,7 +10065,7 @@ class VisibilityDropdownTabComponent {
10093
10065
  return true;
10094
10066
  }
10095
10067
  const columns = ArrayUtil.flatten(this.columns, 'columns');
10096
- const notHidden = columns.find((_) => this.hiddenColumns.indexOf(_.name) < 0);
10068
+ const notHidden = columns.find(_ => this.hiddenColumns.indexOf(_.name) < 0);
10097
10069
  if (!notHidden) {
10098
10070
  return false;
10099
10071
  }
@@ -10104,7 +10076,7 @@ class VisibilityDropdownTabComponent {
10104
10076
  this.hiddenColumns = [];
10105
10077
  }
10106
10078
  else {
10107
- this.hiddenColumns = ArrayUtil.flatten(this.columns, 'columns').map((_) => _.name);
10079
+ this.hiddenColumns = ArrayUtil.flatten(this.columns, 'columns').map(_ => _.name);
10108
10080
  }
10109
10081
  }
10110
10082
  setColumnsVisibility() {
@@ -10123,7 +10095,7 @@ class VisibilityDropdownTabComponent {
10123
10095
  this.hideColumn(column, hiddenColumns);
10124
10096
  }
10125
10097
  if (column.columns) {
10126
- column.columns.forEach((x) => {
10098
+ column.columns.forEach(x => {
10127
10099
  this.setChildrenVisibility(x, visible, hiddenColumns);
10128
10100
  });
10129
10101
  }
@@ -10148,7 +10120,7 @@ class VisibilityDropdownTabComponent {
10148
10120
  if (parent &&
10149
10121
  !this.columnIsHidden(parent) &&
10150
10122
  parent.columns &&
10151
- parent.columns.every((_) => this.columnIsHidden(_))) {
10123
+ parent.columns.every(_ => this.columnIsHidden(_))) {
10152
10124
  this.hideColumn(parent, hiddenColumns);
10153
10125
  this.hideParents(parent, hiddenColumns);
10154
10126
  }
@@ -10160,9 +10132,7 @@ class VisibilityDropdownTabComponent {
10160
10132
  hiddenColumns.splice(hiddenColumns.indexOf(column.name), 1);
10161
10133
  }
10162
10134
  findParentColumn(column, columns) {
10163
- return ArrayUtil.findRecursive(columns, (iterableNode) => iterableNode.columns?.indexOf(column) >= 0, 'columns');
10164
- }
10165
- ngOnInit() {
10135
+ return ArrayUtil.findRecursive(columns, iterableNode => iterableNode.columns?.indexOf(column) >= 0, 'columns');
10166
10136
  }
10167
10137
  ngOnDestroy() {
10168
10138
  this._alive = false;
@@ -10620,9 +10590,9 @@ class CellComponentBase {
10620
10590
  return this._edit && this.editable;
10621
10591
  }
10622
10592
  get editable() {
10623
- return this.svc.boolOrFuncCallback(this.column.editable)({
10593
+ return boolOrFuncCallback(this.column.editable)({
10624
10594
  column: this.column,
10625
- row: this.row,
10595
+ row: this.row.data,
10626
10596
  });
10627
10597
  }
10628
10598
  get index() {
@@ -14263,6 +14233,47 @@ const ruLocale = {
14263
14233
  ]
14264
14234
  };
14265
14235
 
14236
+ function tetaZoneFull(ngZone) {
14237
+ return source => new Observable(subscriber => source.subscribe({
14238
+ next: value => ngZone.run(() => subscriber.next(value)),
14239
+ error: (error) => ngZone.run(() => subscriber.error(error)),
14240
+ complete: () => ngZone.run(() => subscriber.complete()),
14241
+ }));
14242
+ }
14243
+ function tetaZoneFree(ngZone) {
14244
+ return source => new Observable(subscriber => ngZone.runOutsideAngular(() => source.subscribe(subscriber)));
14245
+ }
14246
+ function tetaZoneOptimized(ngZone) {
14247
+ return pipe(tetaZoneFree(ngZone), tetaZoneFull(ngZone));
14248
+ }
14249
+
14250
+ const ANIMATION_FRAME = new InjectionToken('Shared Observable based on `window.requestAnimationFrame`', {
14251
+ factory: () => {
14252
+ const { requestAnimationFrame, cancelAnimationFrame } = inject(WINDOW);
14253
+ const animationFrame$ = new Observable(subscriber => {
14254
+ let id = NaN;
14255
+ const callback = (timestamp) => {
14256
+ subscriber.next(timestamp);
14257
+ id = requestAnimationFrame(callback);
14258
+ };
14259
+ id = requestAnimationFrame(callback);
14260
+ return () => {
14261
+ cancelAnimationFrame(id);
14262
+ };
14263
+ });
14264
+ return animationFrame$.pipe(share());
14265
+ },
14266
+ });
14267
+ const WINDOW = new InjectionToken('An abstraction over global window object', {
14268
+ factory: () => {
14269
+ const { defaultView } = inject(DOCUMENT);
14270
+ if (!defaultView) {
14271
+ throw new Error('Window is not available');
14272
+ }
14273
+ return defaultView;
14274
+ },
14275
+ });
14276
+
14266
14277
  /**
14267
14278
  * Components
14268
14279
  */
@@ -14271,5 +14282,5 @@ const ruLocale = {
14271
14282
  * Generated bundle index. Do not edit.
14272
14283
  */
14273
14284
 
14274
- export { ANIMATION_FRAME, AccordionComponent, AccordionContentDirective, AccordionHeadComponent, AccordionItemComponent, AccordionModule, AggregationType, Align, Area3dComponent, ArrayUtil, AutoPositionDirective, AutoPositionModule, AutocompleteComponent, AutocompleteModule, AvatarComponent, AvatarModule, Axes3dComponent, Base3dSeriesComponent, Block3dComponent, BooleanCellComponent, BooleanFilter, BooleanFilterComponent, ButtonComponent, ButtonModule, CHECKBOX_CONTROL_VALUE_ACCESSOR, Canvas3dHost, CanvasComponent, CellComponent, CellComponentBase, CellHostComponent, Chart3dComponent, Chart3dModule, Chart3dOptions, CheckboxComponent, CheckboxModule, ClickOutsideDirective, ClickOutsideModule, ClickService, ColorInputComponent, ColumnReorderEvent, ColumnResizeEvent, ContextMenuDirective, ContextMenuModule, CurrentModal, CustomSeriesComponent, DATE_PICKER_CONTROL_VALUE_ACCESSOR, DATE_Range_CONTROL_VALUE_ACCESSOR, DateCalendarComponent, DateCellComponent, DateFilter, DateFilterComponent, DateFilterValue, DatePeriod, DatePickerComponent, DatePickerMode, DatePickerModule, DateRangeComponent, DateTimeCellComponent, DateUtil, DayModel, DelimiterComponent, DelimiterModule, DetailComponentBase, DialogComponent, DialogService, DisableControlDirective, DisableControlModule, DividerComponent, DividerModule, DomUtil, DragContainerDirective, DragContainerInstance, DragDirective, DragDropModule, DragDropService, DragInstance, DragPlaceholderDirective, DragPreviewDirective, DragSortContainerDirective, DragSortItemDirective, DragSortModule, DropdownComponent, DropdownContentDirective, DropdownDirective, DropdownHeadDirective, DropdownModule, DynamicComponentModule, DynamicComponentService, DynamicContentBaseDirective, DynamicData, EditEvent, EditType, ExpandCardComponent, ExpandCardModule, ExpandItemComponent, ExpandPanelComponent, ExpandPanelContentDirective, ExpandPanelHeadDirective, ExpandPanelModule, ExportType, FileItemComponent, FileUploadAreaComponent, FileUploadModule, FilterBase, FilterComponentBase, FilterHostComponent, FilterItem, FilterModule, FilterState, FilterType, FormGroupTitleComponent, FormsUtil, HeadCellComponentBase, HeadCellHostComponent, HighlightDirective, HighlightModule, HintDirective, HintModule, IconComponent, IconFileComponent, IconFileModule, IconModule, IconService, IconSpriteDirective, InputComponent, InputModule, LetContext, LetDirective, LetModule, Line3dComponent, ListCellComponent, ListFilter, ListFilterComponent, ListFilterType, LoaderDirective, LoaderModule, Message, MessageComponent, MessageHostComponent, MessageModule, MessageService, ModalCloseReason, ModalContainerComponent, ModalInstance, ModalModule, ModalService, NoAutofillDirective, NoAutofillModule, NumberPipe, NumberPipeModule, NumericCellComponent, NumericFilter, NumericFilterComponent, NumericFilterValue, OnlyNumberDirective, OnlyNumberModule, OverlayContainerService, PagerComponent, PagerModule, PagerState, PagerUtil, PanelComponent, PanelModule, PopupContentComponent, PositionUtil, ProgressBarComponent, ProgressBarModule, PropertyGridComponent, PropertyGridItemDescriptionDirective, PropertyGridModule, RadioButtonComponent, RadioComponent, RadioModule, RangeCalendarComponent, ResizeDragDirective, ResizeDragModule, ResizePanelComponent, ResizePanelModule, SLIDER_CONTROL_VALUE_ACCESSOR, SWITCH_CONTROL_VALUE_ACCESSOR, SceneComponent, ScrollIntoViewDirective, ScrollIntoViewModule, ScrollableComponent, ScrollableDirective, ScrollableModule, SelectComponent, SelectModule, SelectOptionDirective, SelectType, SelectValueDirective, Series3dHost, Series3dType, 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, TetaDatePipe, TetaDatePipeModule, TetaSize, TetaTemplateDirective, TetaTemplateModule, TextFieldComponent, ThemeSwitchComponent, ThemeSwitchModule, ThemeSwitchService, ThreeChartComponent, ToggleComponent, ToggleModule, ToolbarComponent, ToolbarModule, TooltipDirective, TooltipModule, TreeComponent, TreeItemToggleComponent, TreeModule, TreeService, VerticalAlign, WINDOW, enLocale, exportDomToImage, formatNumber, getCellComponent, getPrecision, prependZero, ruLocale, tetaZoneFree, tetaZoneFull, tetaZoneOptimized };
14285
+ export { ANIMATION_FRAME, AccordionComponent, AccordionContentDirective, AccordionHeadComponent, AccordionItemComponent, AccordionModule, AggregationType, Align, Area3dComponent, ArrayUtil, AutoPositionDirective, AutoPositionModule, AutocompleteComponent, AutocompleteModule, AvatarComponent, AvatarModule, Axes3dComponent, Base3dSeriesComponent, Block3dComponent, BooleanCellComponent, BooleanFilter, BooleanFilterComponent, ButtonComponent, ButtonModule, CHECKBOX_CONTROL_VALUE_ACCESSOR, Canvas3dHost, CanvasComponent, CellComponent, CellComponentBase, CellHostComponent, Chart3dComponent, Chart3dModule, Chart3dOptions, CheckboxComponent, CheckboxModule, ClickOutsideDirective, ClickOutsideModule, ClickService, ColorInputComponent, ColumnReorderEvent, ColumnResizeEvent, ContextMenuDirective, ContextMenuModule, CurrentModal, CustomSeriesComponent, DATE_PICKER_CONTROL_VALUE_ACCESSOR, DATE_Range_CONTROL_VALUE_ACCESSOR, DateCalendarComponent, DateCellComponent, DateFilter, DateFilterComponent, DateFilterValue, DatePeriod, DatePickerComponent, DatePickerMode, DatePickerModule, DateRangeComponent, DateTimeCellComponent, DateUtil, DayModel, DelimiterComponent, DelimiterModule, DetailComponentBase, DialogComponent, DialogService, DisableControlDirective, DisableControlModule, DividerComponent, DividerModule, DomUtil, DragContainerDirective, DragContainerInstance, DragDirective, DragDropModule, DragDropService, DragInstance, DragPlaceholderDirective, DragPreviewDirective, DragSortContainerDirective, DragSortItemDirective, DragSortModule, DropdownComponent, DropdownContentDirective, DropdownDirective, DropdownHeadDirective, DropdownModule, DynamicComponentModule, DynamicComponentService, DynamicContentBaseDirective, DynamicData, EditEvent, EditType, ExpandCardComponent, ExpandCardModule, ExpandItemComponent, ExpandPanelComponent, ExpandPanelContentDirective, ExpandPanelHeadDirective, ExpandPanelModule, ExportType, FileItemComponent, FileUploadAreaComponent, FileUploadModule, FilterBase, FilterComponentBase, FilterHostComponent, FilterItem, FilterModule, FilterState, FilterType, FormGroupTitleComponent, FormsUtil, HeadCellComponentBase, HeadCellHostComponent, HighlightDirective, HighlightModule, HintDirective, HintModule, IconComponent, IconFileComponent, IconFileModule, IconModule, IconService, IconSpriteDirective, InputComponent, InputModule, LetContext, LetDirective, LetModule, Line3dComponent, ListCellComponent, ListFilter, ListFilterComponent, ListFilterType, LoaderDirective, LoaderModule, Message, MessageComponent, MessageHostComponent, MessageModule, MessageService, ModalCloseReason, ModalContainerComponent, ModalInstance, ModalModule, ModalService, NoAutofillDirective, NoAutofillModule, NumberPipe, NumberPipeModule, NumericCellComponent, NumericFilter, NumericFilterComponent, NumericFilterValue, OnlyNumberDirective, OnlyNumberModule, OverlayContainerService, PagerComponent, PagerModule, PagerState, PagerUtil, PanelComponent, PanelModule, PopupContentComponent, PositionUtil, ProgressBarComponent, ProgressBarModule, PropertyGridComponent, PropertyGridItemDescriptionDirective, PropertyGridModule, RadioButtonComponent, RadioComponent, RadioModule, RangeCalendarComponent, ResizeDragDirective, ResizeDragModule, ResizePanelComponent, ResizePanelModule, SLIDER_CONTROL_VALUE_ACCESSOR, SWITCH_CONTROL_VALUE_ACCESSOR, SceneComponent, ScrollIntoViewDirective, ScrollIntoViewModule, ScrollableComponent, ScrollableDirective, ScrollableModule, SelectComponent, SelectModule, SelectOptionDirective, SelectType, SelectValueDirective, Series3dHost, Series3dType, 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, TetaDatePipe, TetaDatePipeModule, TetaSize, TetaTemplateDirective, TetaTemplateModule, TextFieldComponent, ThemeSwitchComponent, ThemeSwitchModule, ThemeSwitchService, ThreeChartComponent, ToggleComponent, ToggleModule, ToolbarComponent, ToolbarModule, TooltipDirective, TooltipModule, TreeComponent, TreeItemToggleComponent, TreeModule, TreeService, VerticalAlign, WINDOW, boolOrFuncCallback, enLocale, exportDomToImage, formatNumber, getCellComponent, getPrecision, isFunction, prependZero, ruLocale, tetaZoneFree, tetaZoneFull, tetaZoneOptimized };
14275
14286
  //# sourceMappingURL=tetacom-ng-components.mjs.map